aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2009-08-18 19:28:17 -0400
committerKumar Gala <galak@kernel.crashing.org>2009-08-25 10:44:06 -0400
commit818fcac554397a04987d49e2bd2dfc2d394b265c (patch)
tree5a4a21808be73365ba96c882f28bb8cfa3ba5944 /arch/powerpc/platforms
parenta70e88bc78d220a506394058d48cedd1c491a256 (diff)
powerpc/82xx: Add CPM USB Gadget support for MPC8272ADS boards
- Add usb node; - Configure pins and clocks; - Enable USB function in BCSR. The support was successfully tested using serial and ethernet gadget drivers. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/82xx/mpc8272_ads.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/82xx/mpc8272_ads.c b/arch/powerpc/platforms/82xx/mpc8272_ads.c
index 67e2184f4243..30394b409b3f 100644
--- a/arch/powerpc/platforms/82xx/mpc8272_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc8272_ads.c
@@ -99,6 +99,15 @@ static struct cpm_pin mpc8272_ads_pins[] = {
99 /* I2C */ 99 /* I2C */
100 {3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, 100 {3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN},
101 {3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, 101 {3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN},
102
103 /* USB */
104 {2, 10, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
105 {2, 11, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
106 {2, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
107 {2, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
108 {3, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
109 {3, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
110 {3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
102}; 111};
103 112
104static void __init init_ioports(void) 113static void __init init_ioports(void)
@@ -112,6 +121,8 @@ static void __init init_ioports(void)
112 121
113 cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX); 122 cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX);
114 cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX); 123 cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX);
124 cpm2_clk_setup(CPM_CLK_SCC3, CPM_CLK8, CPM_CLK_RX);
125 cpm2_clk_setup(CPM_CLK_SCC3, CPM_CLK8, CPM_CLK_TX);
115 cpm2_clk_setup(CPM_CLK_SCC4, CPM_BRG4, CPM_CLK_RX); 126 cpm2_clk_setup(CPM_CLK_SCC4, CPM_BRG4, CPM_CLK_RX);
116 cpm2_clk_setup(CPM_CLK_SCC4, CPM_BRG4, CPM_CLK_TX); 127 cpm2_clk_setup(CPM_CLK_SCC4, CPM_BRG4, CPM_CLK_TX);
117 cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK11, CPM_CLK_RX); 128 cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK11, CPM_CLK_RX);
@@ -147,6 +158,7 @@ static void __init mpc8272_ads_setup_arch(void)
147#define BCSR1_FETH_RST 0x04000000 158#define BCSR1_FETH_RST 0x04000000
148#define BCSR1_RS232_EN1 0x02000000 159#define BCSR1_RS232_EN1 0x02000000
149#define BCSR1_RS232_EN2 0x01000000 160#define BCSR1_RS232_EN2 0x01000000
161#define BCSR3_USB_nEN 0x80000000
150#define BCSR3_FETHIEN2 0x10000000 162#define BCSR3_FETHIEN2 0x10000000
151#define BCSR3_FETH2_RST 0x08000000 163#define BCSR3_FETH2_RST 0x08000000
152 164
@@ -156,6 +168,8 @@ static void __init mpc8272_ads_setup_arch(void)
156 clrbits32(&bcsr[3], BCSR3_FETHIEN2); 168 clrbits32(&bcsr[3], BCSR3_FETHIEN2);
157 setbits32(&bcsr[3], BCSR3_FETH2_RST); 169 setbits32(&bcsr[3], BCSR3_FETH2_RST);
158 170
171 clrbits32(&bcsr[3], BCSR3_USB_nEN);
172
159 iounmap(bcsr); 173 iounmap(bcsr);
160 174
161 init_ioports(); 175 init_ioports();