diff options
author | Heiko Schocher <hs@denx.de> | 2009-08-03 03:34:50 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-08-19 20:27:30 -0400 |
commit | 9239c89bc9c51c412b89eb8040077eaaee361326 (patch) | |
tree | 39693452f20f9897893ffcf3ed050466c7cb1de2 /arch/powerpc/platforms/82xx | |
parent | 8640d3bf71fa0f25adf86527fe69a32372427d4b (diff) |
powerpc/82xx: mgcoge - updates for 2.6.32
- add I2C support
- add FCC1 and FCC2 support
- fix bogus gpio numbering in plattform code
Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/82xx')
-rw-r--r-- | arch/powerpc/platforms/82xx/mgcoge.c | 69 |
1 files changed, 60 insertions, 9 deletions
diff --git a/arch/powerpc/platforms/82xx/mgcoge.c b/arch/powerpc/platforms/82xx/mgcoge.c index c2af169c1d1d..7a5de9eb3c73 100644 --- a/arch/powerpc/platforms/82xx/mgcoge.c +++ b/arch/powerpc/platforms/82xx/mgcoge.c | |||
@@ -50,16 +50,63 @@ struct cpm_pin { | |||
50 | static __initdata struct cpm_pin mgcoge_pins[] = { | 50 | static __initdata struct cpm_pin mgcoge_pins[] = { |
51 | 51 | ||
52 | /* SMC2 */ | 52 | /* SMC2 */ |
53 | {1, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 53 | {0, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
54 | {1, 9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | 54 | {0, 9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, |
55 | 55 | ||
56 | /* SCC4 */ | 56 | /* SCC4 */ |
57 | {3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 57 | {2, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
58 | {3, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 58 | {2, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
59 | {3, 9, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 59 | {2, 9, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
60 | {3, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 60 | {2, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
61 | {4, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 61 | {3, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
62 | {4, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | 62 | {3, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, |
63 | |||
64 | /* FCC1 */ | ||
65 | {0, 14, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
66 | {0, 15, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
67 | {0, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
68 | {0, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
69 | {0, 18, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
70 | {0, 19, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
71 | {0, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
72 | {0, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
73 | {0, 26, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, | ||
74 | {0, 27, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, | ||
75 | {0, 28, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, | ||
76 | {0, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, | ||
77 | {0, 30, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, | ||
78 | {0, 31, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, | ||
79 | |||
80 | {2, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
81 | {2, 23, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
82 | |||
83 | /* FCC2 */ | ||
84 | {1, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
85 | {1, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
86 | {1, 20, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
87 | {1, 21, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
88 | {1, 22, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
89 | {1, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
90 | {1, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
91 | {1, 25, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
92 | {1, 26, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
93 | {1, 27, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
94 | {1, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
95 | {1, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, | ||
96 | {1, 30, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
97 | {1, 31, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
98 | |||
99 | {2, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
100 | {2, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
101 | |||
102 | /* MDC */ | ||
103 | {0, 13, CPM_PIN_OUTPUT | CPM_PIN_GPIO}, | ||
104 | |||
105 | #if defined(CONFIG_I2C_CPM) | ||
106 | /* I2C */ | ||
107 | {3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, | ||
108 | {3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, | ||
109 | #endif | ||
63 | }; | 110 | }; |
64 | 111 | ||
65 | static void __init init_ioports(void) | 112 | static void __init init_ioports(void) |
@@ -68,12 +115,16 @@ static void __init init_ioports(void) | |||
68 | 115 | ||
69 | for (i = 0; i < ARRAY_SIZE(mgcoge_pins); i++) { | 116 | for (i = 0; i < ARRAY_SIZE(mgcoge_pins); i++) { |
70 | const struct cpm_pin *pin = &mgcoge_pins[i]; | 117 | const struct cpm_pin *pin = &mgcoge_pins[i]; |
71 | cpm2_set_pin(pin->port - 1, pin->pin, pin->flags); | 118 | cpm2_set_pin(pin->port, pin->pin, pin->flags); |
72 | } | 119 | } |
73 | 120 | ||
74 | cpm2_smc_clk_setup(CPM_CLK_SMC2, CPM_BRG8); | 121 | cpm2_smc_clk_setup(CPM_CLK_SMC2, CPM_BRG8); |
75 | cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK7, CPM_CLK_RX); | 122 | cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK7, CPM_CLK_RX); |
76 | cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK8, CPM_CLK_TX); | 123 | cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK8, CPM_CLK_TX); |
124 | cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK10, CPM_CLK_RX); | ||
125 | cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK9, CPM_CLK_TX); | ||
126 | cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK13, CPM_CLK_RX); | ||
127 | cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK14, CPM_CLK_TX); | ||
77 | } | 128 | } |
78 | 129 | ||
79 | static void __init mgcoge_setup_arch(void) | 130 | static void __init mgcoge_setup_arch(void) |