* [PATCH 1/2] powerpc/8xxx: remove 85xx/86xx restrictions from fsl_guts.h
@ 2012-02-16 17:21 Timur Tabi
2012-02-16 17:21 ` [PATCH 2/2] [v2] powerpc/fsl: add PAMUBYPENR register definition to fsl_guts.h Timur Tabi
2012-03-16 19:06 ` [PATCH 1/2] powerpc/8xxx: remove 85xx/86xx restrictions from fsl_guts.h Kumar Gala
0 siblings, 2 replies; 6+ messages in thread
From: Timur Tabi @ 2012-02-16 17:21 UTC (permalink / raw)
To: galak, linuxppc-dev
Remove the check for CONFIG_PPC_85xx and CONFIG_PPC_86xx from fsl_guts.h.
The check was originally intended to allow the same header file to
be used on 85xx and 86xx systems, even though the Global Utilities
register could be different. It turns out that they're not actually
different, and so the check is not necessary. In addition, neither
macro is defined for 64-bit e5500 kernels, so that causes a build
break.
To maintain backwards compatibility, we also define macros for
ccsr_guts_85xx and ccsr_guts_86xx. This eliminates the need to
change all the files that #include fsl_guts.h. Those files will
be updated at a later time, and then the macros can be deleted.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
arch/powerpc/include/asm/fsl_guts.h | 26 +++++++-------------------
1 files changed, 7 insertions(+), 19 deletions(-)
diff --git a/arch/powerpc/include/asm/fsl_guts.h b/arch/powerpc/include/asm/fsl_guts.h
index bebd124..a880377 100644
--- a/arch/powerpc/include/asm/fsl_guts.h
+++ b/arch/powerpc/include/asm/fsl_guts.h
@@ -16,15 +16,6 @@
#define __ASM_POWERPC_FSL_GUTS_H__
#ifdef __KERNEL__
-/*
- * These #ifdefs are safe because it's not possible to build a kernel that
- * runs on e500 and e600 cores.
- */
-
-#if !defined(CONFIG_PPC_85xx) && !defined(CONFIG_PPC_86xx)
-#error Only 85xx and 86xx SOCs are supported
-#endif
-
/**
* Global Utility Registers.
*
@@ -36,11 +27,7 @@
* different names. In these cases, one name is chosen to avoid extraneous
* #ifdefs.
*/
-#ifdef CONFIG_PPC_85xx
-struct ccsr_guts_85xx {
-#else
-struct ccsr_guts_86xx {
-#endif
+struct ccsr_guts {
__be32 porpllsr; /* 0x.0000 - POR PLL Ratio Status Register */
__be32 porbmsr; /* 0x.0004 - POR Boot Mode Status Register */
__be32 porimpscr; /* 0x.0008 - POR I/O Impedance Status and Control Register */
@@ -77,11 +64,8 @@ struct ccsr_guts_86xx {
u8 res0a8[0xb0 - 0xa8];
__be32 rstcr; /* 0x.00b0 - Reset Control Register */
u8 res0b4[0xc0 - 0xb4];
-#ifdef CONFIG_PPC_85xx
- __be32 iovselsr; /* 0x.00c0 - I/O voltage select status register */
-#else
- __be32 elbcvselcr; /* 0x.00c0 - eLBC Voltage Select Ctrl Reg */
-#endif
+ __be32 iovselsr; /* 0x.00c0 - I/O voltage select status register
+ Called 'elbcvselcr' on 86xx SOCs */
u8 res0c4[0x224 - 0xc4];
__be32 iodelay1; /* 0x.0224 - IO delay control register 1 */
__be32 iodelay2; /* 0x.0228 - IO delay control register 2 */
@@ -114,6 +98,10 @@ struct ccsr_guts_86xx {
__be32 srds2cr1; /* 0x.0f44 - SerDes2 Control Register 0 */
} __attribute__ ((packed));
+/* For backwards-compatibility */
+#define ccsr_guts_85xx ccsr_guts
+#define ccsr_guts_86xx ccsr_guts
+
#ifdef CONFIG_PPC_86xx
#define CCSR_GUTS_DMACR_DEV_SSI 0 /* DMA controller/channel set to SSI */
--
1.7.3.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] [v2] powerpc/fsl: add PAMUBYPENR register definition to fsl_guts.h
2012-02-16 17:21 [PATCH 1/2] powerpc/8xxx: remove 85xx/86xx restrictions from fsl_guts.h Timur Tabi
@ 2012-02-16 17:21 ` Timur Tabi
2012-03-16 19:07 ` Kumar Gala
2012-03-16 19:06 ` [PATCH 1/2] powerpc/8xxx: remove 85xx/86xx restrictions from fsl_guts.h Kumar Gala
1 sibling, 1 reply; 6+ messages in thread
From: Timur Tabi @ 2012-02-16 17:21 UTC (permalink / raw)
To: galak, linuxppc-dev
Add a defintion of register PAMUBYPENR (offset 0x604) to the global
utilities structure.
PAMUBYPENR is the PAMU bypass enable register. It contains control
bits for enabling bypass mode on each PAMU.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
arch/powerpc/include/asm/fsl_guts.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/include/asm/fsl_guts.h b/arch/powerpc/include/asm/fsl_guts.h
index a880377..23e483d 100644
--- a/arch/powerpc/include/asm/fsl_guts.h
+++ b/arch/powerpc/include/asm/fsl_guts.h
@@ -69,7 +69,9 @@ struct ccsr_guts {
u8 res0c4[0x224 - 0xc4];
__be32 iodelay1; /* 0x.0224 - IO delay control register 1 */
__be32 iodelay2; /* 0x.0228 - IO delay control register 2 */
- u8 res22c[0x800 - 0x22c];
+ u8 res22c[0x604 - 0x22c];
+ __be32 pamubypenr; /* 0x.0604 - PAMU bypass enable register */
+ u8 res608[0x800 - 0x608];
__be32 clkdvdr; /* 0x.0800 - Clock Divide Register */
u8 res804[0x900 - 0x804];
__be32 ircr; /* 0x.0900 - Infrared Control Register */
--
1.7.3.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] [v2] powerpc/fsl: add PAMUBYPENR register definition to fsl_guts.h
2012-02-16 17:21 ` [PATCH 2/2] [v2] powerpc/fsl: add PAMUBYPENR register definition to fsl_guts.h Timur Tabi
@ 2012-03-16 19:07 ` Kumar Gala
2012-03-16 19:08 ` Timur Tabi
0 siblings, 1 reply; 6+ messages in thread
From: Kumar Gala @ 2012-03-16 19:07 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev
On Feb 16, 2012, at 11:21 AM, Timur Tabi wrote:
> Add a defintion of register PAMUBYPENR (offset 0x604) to the global
> utilities structure.
>=20
> PAMUBYPENR is the PAMU bypass enable register. It contains control
> bits for enabling bypass mode on each PAMU.
>=20
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> arch/powerpc/include/asm/fsl_guts.h | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
Sticking with my original point of not applying this til PAMU driver is =
ready as well.
- k=
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] powerpc/8xxx: remove 85xx/86xx restrictions from fsl_guts.h
2012-02-16 17:21 [PATCH 1/2] powerpc/8xxx: remove 85xx/86xx restrictions from fsl_guts.h Timur Tabi
2012-02-16 17:21 ` [PATCH 2/2] [v2] powerpc/fsl: add PAMUBYPENR register definition to fsl_guts.h Timur Tabi
@ 2012-03-16 19:06 ` Kumar Gala
2012-03-16 19:09 ` Timur Tabi
1 sibling, 1 reply; 6+ messages in thread
From: Kumar Gala @ 2012-03-16 19:06 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev
On Feb 16, 2012, at 11:21 AM, Timur Tabi wrote:
> Remove the check for CONFIG_PPC_85xx and CONFIG_PPC_86xx from =
fsl_guts.h.
> The check was originally intended to allow the same header file to
> be used on 85xx and 86xx systems, even though the Global Utilities
> register could be different. It turns out that they're not actually
> different, and so the check is not necessary. In addition, neither
> macro is defined for 64-bit e5500 kernels, so that causes a build
> break.
>=20
> To maintain backwards compatibility, we also define macros for
> ccsr_guts_85xx and ccsr_guts_86xx. This eliminates the need to
> change all the files that #include fsl_guts.h. Those files will
> be updated at a later time, and then the macros can be deleted.
If you are doing this clean, just finish it. There are only a small =
handful of users of ccsr_guts_8{5,6}xx:
arch/powerpc/include/asm/fsl_guts.h:static inline void =
guts_set_dmacr(struct ccsr_guts_86xx __iomem *guts,
arch/powerpc/include/asm/fsl_guts.h:static inline void =
guts_set_pmuxcr_dma(struct ccsr_guts_86xx __iomem *guts,
arch/powerpc/platforms/86xx/mpc8610_hpcd.c: struct ccsr_guts_86xx =
__iomem *guts;
arch/powerpc/platforms/85xx/p1022_ds.c: struct ccsr_guts_85xx __iomem =
*guts;
arch/powerpc/platforms/85xx/p1022_ds.c: struct ccsr_guts_85xx __iomem =
*guts;
- k
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] powerpc/8xxx: remove 85xx/86xx restrictions from fsl_guts.h
2012-03-16 19:06 ` [PATCH 1/2] powerpc/8xxx: remove 85xx/86xx restrictions from fsl_guts.h Kumar Gala
@ 2012-03-16 19:09 ` Timur Tabi
0 siblings, 0 replies; 6+ messages in thread
From: Timur Tabi @ 2012-03-16 19:09 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
Kumar Gala wrote:
> If you are doing this clean, just finish it. There are only a small handful of users of ccsr_guts_8{5,6}xx:
>
> arch/powerpc/include/asm/fsl_guts.h:static inline void guts_set_dmacr(struct ccsr_guts_86xx __iomem *guts,
> arch/powerpc/include/asm/fsl_guts.h:static inline void guts_set_pmuxcr_dma(struct ccsr_guts_86xx __iomem *guts,
> arch/powerpc/platforms/86xx/mpc8610_hpcd.c: struct ccsr_guts_86xx __iomem *guts;
> arch/powerpc/platforms/85xx/p1022_ds.c: struct ccsr_guts_85xx __iomem *guts;
> arch/powerpc/platforms/85xx/p1022_ds.c: struct ccsr_guts_85xx __iomem *guts;
Ok. Can you push your tree to git.kernel.org, so that I can be sure to
provide a clean patch?
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-03-16 19:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-16 17:21 [PATCH 1/2] powerpc/8xxx: remove 85xx/86xx restrictions from fsl_guts.h Timur Tabi
2012-02-16 17:21 ` [PATCH 2/2] [v2] powerpc/fsl: add PAMUBYPENR register definition to fsl_guts.h Timur Tabi
2012-03-16 19:07 ` Kumar Gala
2012-03-16 19:08 ` Timur Tabi
2012-03-16 19:06 ` [PATCH 1/2] powerpc/8xxx: remove 85xx/86xx restrictions from fsl_guts.h Kumar Gala
2012-03-16 19:09 ` Timur Tabi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).