aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/include/asm/fsl_guts.h26
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_rdb.c2
-rw-r--r--arch/powerpc/platforms/85xx/p1022_ds.c4
-rw-r--r--arch/powerpc/platforms/86xx/mpc8610_hpcd.c2
-rw-r--r--sound/soc/fsl/mpc8610_hpcd.c8
-rw-r--r--sound/soc/fsl/p1022_ds.c10
7 files changed, 19 insertions, 35 deletions
diff --git a/arch/powerpc/include/asm/fsl_guts.h b/arch/powerpc/include/asm/fsl_guts.h
index ce04530d2000..aa4c488589ce 100644
--- a/arch/powerpc/include/asm/fsl_guts.h
+++ b/arch/powerpc/include/asm/fsl_guts.h
@@ -16,15 +16,6 @@
16#define __ASM_POWERPC_FSL_GUTS_H__ 16#define __ASM_POWERPC_FSL_GUTS_H__
17#ifdef __KERNEL__ 17#ifdef __KERNEL__
18 18
19/*
20 * These #ifdefs are safe because it's not possible to build a kernel that
21 * runs on e500 and e600 cores.
22 */
23
24#if !defined(CONFIG_PPC_85xx) && !defined(CONFIG_PPC_86xx)
25#error Only 85xx and 86xx SOCs are supported
26#endif
27
28/** 19/**
29 * Global Utility Registers. 20 * Global Utility Registers.
30 * 21 *
@@ -36,11 +27,7 @@
36 * different names. In these cases, one name is chosen to avoid extraneous 27 * different names. In these cases, one name is chosen to avoid extraneous
37 * #ifdefs. 28 * #ifdefs.
38 */ 29 */
39#ifdef CONFIG_PPC_85xx 30struct ccsr_guts {
40struct ccsr_guts_85xx {
41#else
42struct ccsr_guts_86xx {
43#endif
44 __be32 porpllsr; /* 0x.0000 - POR PLL Ratio Status Register */ 31 __be32 porpllsr; /* 0x.0000 - POR PLL Ratio Status Register */
45 __be32 porbmsr; /* 0x.0004 - POR Boot Mode Status Register */ 32 __be32 porbmsr; /* 0x.0004 - POR Boot Mode Status Register */
46 __be32 porimpscr; /* 0x.0008 - POR I/O Impedance Status and Control Register */ 33 __be32 porimpscr; /* 0x.0008 - POR I/O Impedance Status and Control Register */
@@ -77,11 +64,8 @@ struct ccsr_guts_86xx {
77 u8 res0a8[0xb0 - 0xa8]; 64 u8 res0a8[0xb0 - 0xa8];
78 __be32 rstcr; /* 0x.00b0 - Reset Control Register */ 65 __be32 rstcr; /* 0x.00b0 - Reset Control Register */
79 u8 res0b4[0xc0 - 0xb4]; 66 u8 res0b4[0xc0 - 0xb4];
80#ifdef CONFIG_PPC_85xx 67 __be32 iovselsr; /* 0x.00c0 - I/O voltage select status register
81 __be32 iovselsr; /* 0x.00c0 - I/O voltage select status register */ 68 Called 'elbcvselcr' on 86xx SOCs */
82#else
83 __be32 elbcvselcr; /* 0x.00c0 - eLBC Voltage Select Ctrl Reg */
84#endif
85 u8 res0c4[0x224 - 0xc4]; 69 u8 res0c4[0x224 - 0xc4];
86 __be32 iodelay1; /* 0x.0224 - IO delay control register 1 */ 70 __be32 iodelay1; /* 0x.0224 - IO delay control register 1 */
87 __be32 iodelay2; /* 0x.0228 - IO delay control register 2 */ 71 __be32 iodelay2; /* 0x.0228 - IO delay control register 2 */
@@ -136,7 +120,7 @@ struct ccsr_guts_86xx {
136 * ch: The channel on the DMA controller (0, 1, 2, or 3) 120 * ch: The channel on the DMA controller (0, 1, 2, or 3)
137 * device: The device to set as the source (CCSR_GUTS_DMACR_DEV_xx) 121 * device: The device to set as the source (CCSR_GUTS_DMACR_DEV_xx)
138 */ 122 */
139static inline void guts_set_dmacr(struct ccsr_guts_86xx __iomem *guts, 123static inline void guts_set_dmacr(struct ccsr_guts __iomem *guts,
140 unsigned int co, unsigned int ch, unsigned int device) 124 unsigned int co, unsigned int ch, unsigned int device)
141{ 125{
142 unsigned int shift = 16 + (8 * (1 - co) + 2 * (3 - ch)); 126 unsigned int shift = 16 + (8 * (1 - co) + 2 * (3 - ch));
@@ -172,7 +156,7 @@ static inline void guts_set_dmacr(struct ccsr_guts_86xx __iomem *guts,
172 * ch: The channel on the DMA controller (0, 1, 2, or 3) 156 * ch: The channel on the DMA controller (0, 1, 2, or 3)
173 * value: the new value for the bit (0 or 1) 157 * value: the new value for the bit (0 or 1)
174 */ 158 */
175static inline void guts_set_pmuxcr_dma(struct ccsr_guts_86xx __iomem *guts, 159static inline void guts_set_pmuxcr_dma(struct ccsr_guts __iomem *guts,
176 unsigned int co, unsigned int ch, unsigned int value) 160 unsigned int co, unsigned int ch, unsigned int value)
177{ 161{
178 if ((ch == 0) || (ch == 3)) { 162 if ((ch == 0) || (ch == 3)) {
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index f33662b46b8d..e82f06f0854f 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -271,7 +271,7 @@ static void __init mpc85xx_mds_qe_init(void)
271 271
272 if (machine_is(p1021_mds)) { 272 if (machine_is(p1021_mds)) {
273 273
274 struct ccsr_guts_85xx __iomem *guts; 274 struct ccsr_guts __iomem *guts;
275 275
276 np = of_find_node_by_name(NULL, "global-utilities"); 276 np = of_find_node_by_name(NULL, "global-utilities");
277 if (np) { 277 if (np) {
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
index db214cd4c822..1a66c3ddcbbf 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
@@ -128,7 +128,7 @@ static void __init mpc85xx_rdb_setup_arch(void)
128#if defined(CONFIG_UCC_GETH) || defined(CONFIG_SERIAL_QE) 128#if defined(CONFIG_UCC_GETH) || defined(CONFIG_SERIAL_QE)
129 if (machine_is(p1025_rdb)) { 129 if (machine_is(p1025_rdb)) {
130 130
131 struct ccsr_guts_85xx __iomem *guts; 131 struct ccsr_guts __iomem *guts;
132 132
133 np = of_find_node_by_name(NULL, "global-utilities"); 133 np = of_find_node_by_name(NULL, "global-utilities");
134 if (np) { 134 if (np) {
diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c b/arch/powerpc/platforms/85xx/p1022_ds.c
index 0fe88e39945e..e74b7cde9aee 100644
--- a/arch/powerpc/platforms/85xx/p1022_ds.c
+++ b/arch/powerpc/platforms/85xx/p1022_ds.c
@@ -150,7 +150,7 @@ static void p1022ds_set_monitor_port(enum fsl_diu_monitor_port port)
150{ 150{
151 struct device_node *guts_node; 151 struct device_node *guts_node;
152 struct device_node *indirect_node = NULL; 152 struct device_node *indirect_node = NULL;
153 struct ccsr_guts_85xx __iomem *guts; 153 struct ccsr_guts __iomem *guts;
154 u8 __iomem *lbc_lcs0_ba = NULL; 154 u8 __iomem *lbc_lcs0_ba = NULL;
155 u8 __iomem *lbc_lcs1_ba = NULL; 155 u8 __iomem *lbc_lcs1_ba = NULL;
156 u8 b; 156 u8 b;
@@ -269,7 +269,7 @@ exit:
269void p1022ds_set_pixel_clock(unsigned int pixclock) 269void p1022ds_set_pixel_clock(unsigned int pixclock)
270{ 270{
271 struct device_node *guts_np = NULL; 271 struct device_node *guts_np = NULL;
272 struct ccsr_guts_85xx __iomem *guts; 272 struct ccsr_guts __iomem *guts;
273 unsigned long freq; 273 unsigned long freq;
274 u64 temp; 274 u64 temp;
275 u32 pxclk; 275 u32 pxclk;
diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
index 13fa9a6403e6..b8b1f3356ce8 100644
--- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
+++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
@@ -226,7 +226,7 @@ void mpc8610hpcd_set_monitor_port(enum fsl_diu_monitor_port port)
226void mpc8610hpcd_set_pixel_clock(unsigned int pixclock) 226void mpc8610hpcd_set_pixel_clock(unsigned int pixclock)
227{ 227{
228 struct device_node *guts_np = NULL; 228 struct device_node *guts_np = NULL;
229 struct ccsr_guts_86xx __iomem *guts; 229 struct ccsr_guts __iomem *guts;
230 unsigned long freq; 230 unsigned long freq;
231 u64 temp; 231 u64 temp;
232 u32 pxclk; 232 u32 pxclk;
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c
index afbabf427f27..3fea5a15ffe8 100644
--- a/sound/soc/fsl/mpc8610_hpcd.c
+++ b/sound/soc/fsl/mpc8610_hpcd.c
@@ -58,9 +58,9 @@ static int mpc8610_hpcd_machine_probe(struct snd_soc_card *card)
58{ 58{
59 struct mpc8610_hpcd_data *machine_data = 59 struct mpc8610_hpcd_data *machine_data =
60 container_of(card, struct mpc8610_hpcd_data, card); 60 container_of(card, struct mpc8610_hpcd_data, card);
61 struct ccsr_guts_86xx __iomem *guts; 61 struct ccsr_guts __iomem *guts;
62 62
63 guts = ioremap(guts_phys, sizeof(struct ccsr_guts_86xx)); 63 guts = ioremap(guts_phys, sizeof(struct ccsr_guts));
64 if (!guts) { 64 if (!guts) {
65 dev_err(card->dev, "could not map global utilities\n"); 65 dev_err(card->dev, "could not map global utilities\n");
66 return -ENOMEM; 66 return -ENOMEM;
@@ -142,9 +142,9 @@ static int mpc8610_hpcd_machine_remove(struct snd_soc_card *card)
142{ 142{
143 struct mpc8610_hpcd_data *machine_data = 143 struct mpc8610_hpcd_data *machine_data =
144 container_of(card, struct mpc8610_hpcd_data, card); 144 container_of(card, struct mpc8610_hpcd_data, card);
145 struct ccsr_guts_86xx __iomem *guts; 145 struct ccsr_guts __iomem *guts;
146 146
147 guts = ioremap(guts_phys, sizeof(struct ccsr_guts_86xx)); 147 guts = ioremap(guts_phys, sizeof(struct ccsr_guts));
148 if (!guts) { 148 if (!guts) {
149 dev_err(card->dev, "could not map global utilities\n"); 149 dev_err(card->dev, "could not map global utilities\n");
150 return -ENOMEM; 150 return -ENOMEM;
diff --git a/sound/soc/fsl/p1022_ds.c b/sound/soc/fsl/p1022_ds.c
index 46623405a2ce..982a1c944983 100644
--- a/sound/soc/fsl/p1022_ds.c
+++ b/sound/soc/fsl/p1022_ds.c
@@ -46,7 +46,7 @@
46 * ch: The channel on the DMA controller (0, 1, 2, or 3) 46 * ch: The channel on the DMA controller (0, 1, 2, or 3)
47 * device: The device to set as the target (CCSR_GUTS_DMUXCR_xxx) 47 * device: The device to set as the target (CCSR_GUTS_DMUXCR_xxx)
48 */ 48 */
49static inline void guts_set_dmuxcr(struct ccsr_guts_85xx __iomem *guts, 49static inline void guts_set_dmuxcr(struct ccsr_guts __iomem *guts,
50 unsigned int co, unsigned int ch, unsigned int device) 50 unsigned int co, unsigned int ch, unsigned int device)
51{ 51{
52 unsigned int shift = 16 + (8 * (1 - co) + 2 * (3 - ch)); 52 unsigned int shift = 16 + (8 * (1 - co) + 2 * (3 - ch));
@@ -90,9 +90,9 @@ static int p1022_ds_machine_probe(struct snd_soc_card *card)
90{ 90{
91 struct machine_data *mdata = 91 struct machine_data *mdata =
92 container_of(card, struct machine_data, card); 92 container_of(card, struct machine_data, card);
93 struct ccsr_guts_85xx __iomem *guts; 93 struct ccsr_guts __iomem *guts;
94 94
95 guts = ioremap(guts_phys, sizeof(struct ccsr_guts_85xx)); 95 guts = ioremap(guts_phys, sizeof(struct ccsr_guts));
96 if (!guts) { 96 if (!guts) {
97 dev_err(card->dev, "could not map global utilities\n"); 97 dev_err(card->dev, "could not map global utilities\n");
98 return -ENOMEM; 98 return -ENOMEM;
@@ -164,9 +164,9 @@ static int p1022_ds_machine_remove(struct snd_soc_card *card)
164{ 164{
165 struct machine_data *mdata = 165 struct machine_data *mdata =
166 container_of(card, struct machine_data, card); 166 container_of(card, struct machine_data, card);
167 struct ccsr_guts_85xx __iomem *guts; 167 struct ccsr_guts __iomem *guts;
168 168
169 guts = ioremap(guts_phys, sizeof(struct ccsr_guts_85xx)); 169 guts = ioremap(guts_phys, sizeof(struct ccsr_guts));
170 if (!guts) { 170 if (!guts) {
171 dev_err(card->dev, "could not map global utilities\n"); 171 dev_err(card->dev, "could not map global utilities\n");
172 return -ENOMEM; 172 return -ENOMEM;