aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-01-20 19:00:44 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-01-20 19:00:44 -0500
commit50f4df4e6a7ae111fd9b8fada4155675a4410e99 (patch)
treea174a42f1f38660d0c4d3c4e81e5bb1e14fab0d1 /arch/powerpc
parent12fcdba1b7ae8b25696433f420b775aeb556d89b (diff)
parentb49d81ded47e9d01f7128fce50d224ccc2150960 (diff)
Merge remote branch 'kumar/next' into merge
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/boot/dts/mpc8308rdb.dts2
-rw-r--r--arch/powerpc/boot/dts/p1022ds.dts4
-rw-r--r--arch/powerpc/include/asm/immap_qe.h21
-rw-r--r--arch/powerpc/include/asm/reg.h2
-rw-r--r--arch/powerpc/include/asm/reg_booke.h14
-rw-r--r--arch/powerpc/kernel/cpu_setup_fsl_booke.S6
-rw-r--r--arch/powerpc/platforms/83xx/mpc83xx.h2
-rw-r--r--arch/powerpc/platforms/83xx/usb.c21
-rw-r--r--arch/powerpc/sysdev/fsl_rio.c2
9 files changed, 58 insertions, 16 deletions
diff --git a/arch/powerpc/boot/dts/mpc8308rdb.dts b/arch/powerpc/boot/dts/mpc8308rdb.dts
index d3db02f98ddd..a0bd1881081e 100644
--- a/arch/powerpc/boot/dts/mpc8308rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8308rdb.dts
@@ -109,7 +109,7 @@
109 #address-cells = <1>; 109 #address-cells = <1>;
110 #size-cells = <1>; 110 #size-cells = <1>;
111 device_type = "soc"; 111 device_type = "soc";
112 compatible = "fsl,mpc8315-immr", "simple-bus"; 112 compatible = "fsl,mpc8308-immr", "simple-bus";
113 ranges = <0 0xe0000000 0x00100000>; 113 ranges = <0 0xe0000000 0x00100000>;
114 reg = <0xe0000000 0x00000200>; 114 reg = <0xe0000000 0x00000200>;
115 bus-frequency = <0>; 115 bus-frequency = <0>;
diff --git a/arch/powerpc/boot/dts/p1022ds.dts b/arch/powerpc/boot/dts/p1022ds.dts
index 2bbecbb4cbf9..69422eb24d97 100644
--- a/arch/powerpc/boot/dts/p1022ds.dts
+++ b/arch/powerpc/boot/dts/p1022ds.dts
@@ -291,13 +291,13 @@
291 ranges = <0x0 0xc100 0x200>; 291 ranges = <0x0 0xc100 0x200>;
292 cell-index = <1>; 292 cell-index = <1>;
293 dma00: dma-channel@0 { 293 dma00: dma-channel@0 {
294 compatible = "fsl,eloplus-dma-channel"; 294 compatible = "fsl,ssi-dma-channel";
295 reg = <0x0 0x80>; 295 reg = <0x0 0x80>;
296 cell-index = <0>; 296 cell-index = <0>;
297 interrupts = <76 2>; 297 interrupts = <76 2>;
298 }; 298 };
299 dma01: dma-channel@80 { 299 dma01: dma-channel@80 {
300 compatible = "fsl,eloplus-dma-channel"; 300 compatible = "fsl,ssi-dma-channel";
301 reg = <0x80 0x80>; 301 reg = <0x80 0x80>;
302 cell-index = <1>; 302 cell-index = <1>;
303 interrupts = <77 2>; 303 interrupts = <77 2>;
diff --git a/arch/powerpc/include/asm/immap_qe.h b/arch/powerpc/include/asm/immap_qe.h
index 4e10f508570a..0edb6842b13d 100644
--- a/arch/powerpc/include/asm/immap_qe.h
+++ b/arch/powerpc/include/asm/immap_qe.h
@@ -467,13 +467,22 @@ struct qe_immap {
467extern struct qe_immap __iomem *qe_immr; 467extern struct qe_immap __iomem *qe_immr;
468extern phys_addr_t get_qe_base(void); 468extern phys_addr_t get_qe_base(void);
469 469
470static inline unsigned long immrbar_virt_to_phys(void *address) 470/*
471 * Returns the offset within the QE address space of the given pointer.
472 *
473 * Note that the QE does not support 36-bit physical addresses, so if
474 * get_qe_base() returns a number above 4GB, the caller will probably fail.
475 */
476static inline phys_addr_t immrbar_virt_to_phys(void *address)
471{ 477{
472 if ( ((u32)address >= (u32)qe_immr) && 478 void *q = (void *)qe_immr;
473 ((u32)address < ((u32)qe_immr + QE_IMMAP_SIZE)) ) 479
474 return (unsigned long)(address - (u32)qe_immr + 480 /* Is it a MURAM address? */
475 (u32)get_qe_base()); 481 if ((address >= q) && (address < (q + QE_IMMAP_SIZE)))
476 return (unsigned long)virt_to_phys(address); 482 return get_qe_base() + (address - q);
483
484 /* It's an address returned by kmalloc */
485 return virt_to_phys(address);
477} 486}
478 487
479#endif /* __KERNEL__ */ 488#endif /* __KERNEL__ */
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
index ff0005eec7dd..125fc1ad665d 100644
--- a/arch/powerpc/include/asm/reg.h
+++ b/arch/powerpc/include/asm/reg.h
@@ -283,6 +283,7 @@
283#define HID0_NOPTI (1<<0) /* No-op dcbt and dcbst instr. */ 283#define HID0_NOPTI (1<<0) /* No-op dcbt and dcbst instr. */
284 284
285#define SPRN_HID1 0x3F1 /* Hardware Implementation Register 1 */ 285#define SPRN_HID1 0x3F1 /* Hardware Implementation Register 1 */
286#ifdef CONFIG_6xx
286#define HID1_EMCP (1<<31) /* 7450 Machine Check Pin Enable */ 287#define HID1_EMCP (1<<31) /* 7450 Machine Check Pin Enable */
287#define HID1_DFS (1<<22) /* 7447A Dynamic Frequency Scaling */ 288#define HID1_DFS (1<<22) /* 7447A Dynamic Frequency Scaling */
288#define HID1_PC0 (1<<16) /* 7450 PLL_CFG[0] */ 289#define HID1_PC0 (1<<16) /* 7450 PLL_CFG[0] */
@@ -292,6 +293,7 @@
292#define HID1_SYNCBE (1<<11) /* 7450 ABE for sync, eieio */ 293#define HID1_SYNCBE (1<<11) /* 7450 ABE for sync, eieio */
293#define HID1_ABE (1<<10) /* 7450 Address Broadcast Enable */ 294#define HID1_ABE (1<<10) /* 7450 Address Broadcast Enable */
294#define HID1_PS (1<<16) /* 750FX PLL selection */ 295#define HID1_PS (1<<16) /* 750FX PLL selection */
296#endif
295#define SPRN_HID2 0x3F8 /* Hardware Implementation Register 2 */ 297#define SPRN_HID2 0x3F8 /* Hardware Implementation Register 2 */
296#define SPRN_HID2_GEKKO 0x398 /* Gekko HID2 Register */ 298#define SPRN_HID2_GEKKO 0x398 /* Gekko HID2 Register */
297#define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */ 299#define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */
diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h
index 667a498eaee1..e68c69bf741a 100644
--- a/arch/powerpc/include/asm/reg_booke.h
+++ b/arch/powerpc/include/asm/reg_booke.h
@@ -246,6 +246,20 @@
246 store or cache line push */ 246 store or cache line push */
247#endif 247#endif
248 248
249/* Bit definitions for the HID1 */
250#ifdef CONFIG_E500
251/* e500v1/v2 */
252#define HID1_PLL_CFG_MASK 0xfc000000 /* PLL_CFG input pins */
253#define HID1_RFXE 0x00020000 /* Read fault exception enable */
254#define HID1_R1DPE 0x00008000 /* R1 data bus parity enable */
255#define HID1_R2DPE 0x00004000 /* R2 data bus parity enable */
256#define HID1_ASTME 0x00002000 /* Address bus streaming mode enable */
257#define HID1_ABE 0x00001000 /* Address broadcast enable */
258#define HID1_MPXTT 0x00000400 /* MPX re-map transfer type */
259#define HID1_ATS 0x00000080 /* Atomic status */
260#define HID1_MID_MASK 0x0000000f /* MID input pins */
261#endif
262
249/* Bit definitions for the DBSR. */ 263/* Bit definitions for the DBSR. */
250/* 264/*
251 * DBSR bits which have conflicting definitions on true Book E versus IBM 40x. 265 * DBSR bits which have conflicting definitions on true Book E versus IBM 40x.
diff --git a/arch/powerpc/kernel/cpu_setup_fsl_booke.S b/arch/powerpc/kernel/cpu_setup_fsl_booke.S
index 894e64fa481e..5c518ad3445c 100644
--- a/arch/powerpc/kernel/cpu_setup_fsl_booke.S
+++ b/arch/powerpc/kernel/cpu_setup_fsl_booke.S
@@ -64,6 +64,12 @@ _GLOBAL(__setup_cpu_e500v2)
64 bl __e500_icache_setup 64 bl __e500_icache_setup
65 bl __e500_dcache_setup 65 bl __e500_dcache_setup
66 bl __setup_e500_ivors 66 bl __setup_e500_ivors
67#ifdef CONFIG_RAPIDIO
68 /* Ensure that RFXE is set */
69 mfspr r3,SPRN_HID1
70 oris r3,r3,HID1_RFXE@h
71 mtspr SPRN_HID1,r3
72#endif
67 mtlr r4 73 mtlr r4
68 blr 74 blr
69_GLOBAL(__setup_cpu_e500mc) 75_GLOBAL(__setup_cpu_e500mc)
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h
index 0fea8811d45b..82a434510d83 100644
--- a/arch/powerpc/platforms/83xx/mpc83xx.h
+++ b/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -35,6 +35,8 @@
35 35
36/* system i/o configuration register high */ 36/* system i/o configuration register high */
37#define MPC83XX_SICRH_OFFS 0x118 37#define MPC83XX_SICRH_OFFS 0x118
38#define MPC8308_SICRH_USB_MASK 0x000c0000
39#define MPC8308_SICRH_USB_ULPI 0x00040000
38#define MPC834X_SICRH_USB_UTMI 0x00020000 40#define MPC834X_SICRH_USB_UTMI 0x00020000
39#define MPC831X_SICRH_USB_MASK 0x000000e0 41#define MPC831X_SICRH_USB_MASK 0x000000e0
40#define MPC831X_SICRH_USB_ULPI 0x000000a0 42#define MPC831X_SICRH_USB_ULPI 0x000000a0
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c
index 3ba4bb7d41bb..2c64164722d0 100644
--- a/arch/powerpc/platforms/83xx/usb.c
+++ b/arch/powerpc/platforms/83xx/usb.c
@@ -127,7 +127,8 @@ int mpc831x_usb_cfg(void)
127 127
128 /* Configure clock */ 128 /* Configure clock */
129 immr_node = of_get_parent(np); 129 immr_node = of_get_parent(np);
130 if (immr_node && of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) 130 if (immr_node && (of_device_is_compatible(immr_node, "fsl,mpc8315-immr") ||
131 of_device_is_compatible(immr_node, "fsl,mpc8308-immr")))
131 clrsetbits_be32(immap + MPC83XX_SCCR_OFFS, 132 clrsetbits_be32(immap + MPC83XX_SCCR_OFFS,
132 MPC8315_SCCR_USB_MASK, 133 MPC8315_SCCR_USB_MASK,
133 MPC8315_SCCR_USB_DRCM_01); 134 MPC8315_SCCR_USB_DRCM_01);
@@ -138,7 +139,11 @@ int mpc831x_usb_cfg(void)
138 139
139 /* Configure pin mux for ULPI. There is no pin mux for UTMI */ 140 /* Configure pin mux for ULPI. There is no pin mux for UTMI */
140 if (prop && !strcmp(prop, "ulpi")) { 141 if (prop && !strcmp(prop, "ulpi")) {
141 if (of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) { 142 if (of_device_is_compatible(immr_node, "fsl,mpc8308-immr")) {
143 clrsetbits_be32(immap + MPC83XX_SICRH_OFFS,
144 MPC8308_SICRH_USB_MASK,
145 MPC8308_SICRH_USB_ULPI);
146 } else if (of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) {
142 clrsetbits_be32(immap + MPC83XX_SICRL_OFFS, 147 clrsetbits_be32(immap + MPC83XX_SICRL_OFFS,
143 MPC8315_SICRL_USB_MASK, 148 MPC8315_SICRL_USB_MASK,
144 MPC8315_SICRL_USB_ULPI); 149 MPC8315_SICRL_USB_ULPI);
@@ -173,6 +178,9 @@ int mpc831x_usb_cfg(void)
173 !strcmp(prop, "utmi"))) { 178 !strcmp(prop, "utmi"))) {
174 u32 refsel; 179 u32 refsel;
175 180
181 if (of_device_is_compatible(immr_node, "fsl,mpc8308-immr"))
182 goto out;
183
176 if (of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) 184 if (of_device_is_compatible(immr_node, "fsl,mpc8315-immr"))
177 refsel = CONTROL_REFSEL_24MHZ; 185 refsel = CONTROL_REFSEL_24MHZ;
178 else 186 else
@@ -186,9 +194,11 @@ int mpc831x_usb_cfg(void)
186 temp = CONTROL_PHY_CLK_SEL_ULPI; 194 temp = CONTROL_PHY_CLK_SEL_ULPI;
187#ifdef CONFIG_USB_OTG 195#ifdef CONFIG_USB_OTG
188 /* Set OTG_PORT */ 196 /* Set OTG_PORT */
189 dr_mode = of_get_property(np, "dr_mode", NULL); 197 if (!of_device_is_compatible(immr_node, "fsl,mpc8308-immr")) {
190 if (dr_mode && !strcmp(dr_mode, "otg")) 198 dr_mode = of_get_property(np, "dr_mode", NULL);
191 temp |= CONTROL_OTG_PORT; 199 if (dr_mode && !strcmp(dr_mode, "otg"))
200 temp |= CONTROL_OTG_PORT;
201 }
192#endif /* CONFIG_USB_OTG */ 202#endif /* CONFIG_USB_OTG */
193 out_be32(usb_regs + FSL_USB2_CONTROL_OFFS, temp); 203 out_be32(usb_regs + FSL_USB2_CONTROL_OFFS, temp);
194 } else { 204 } else {
@@ -196,6 +206,7 @@ int mpc831x_usb_cfg(void)
196 ret = -EINVAL; 206 ret = -EINVAL;
197 } 207 }
198 208
209out:
199 iounmap(usb_regs); 210 iounmap(usb_regs);
200 of_node_put(np); 211 of_node_put(np);
201 return ret; 212 return ret;
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index 9f99bef2adec..8c6cab013278 100644
--- a/arch/powerpc/sysdev/fsl_rio.c
+++ b/arch/powerpc/sysdev/fsl_rio.c
@@ -1555,8 +1555,6 @@ int fsl_rio_setup(struct platform_device *dev)
1555 saved_mcheck_exception = ppc_md.machine_check_exception; 1555 saved_mcheck_exception = ppc_md.machine_check_exception;
1556 ppc_md.machine_check_exception = fsl_rio_mcheck_exception; 1556 ppc_md.machine_check_exception = fsl_rio_mcheck_exception;
1557#endif 1557#endif
1558 /* Ensure that RFXE is set */
1559 mtspr(SPRN_HID1, (mfspr(SPRN_HID1) | 0x20000));
1560 1558
1561 return 0; 1559 return 0;
1562err: 1560err: