aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu/platform/532x/config.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-03-28 16:29:51 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-03-28 16:29:51 -0400
commited40d0c472b136682b2fcba05f89762859c7374f (patch)
tree076b83a26bcd63d6158463735dd34c10bbc591dc /arch/m68knommu/platform/532x/config.c
parent9e495834e59ca9b29f1a1f63b9f5533bb022ac49 (diff)
parent5d80f8e5a9dc9c9a94d4aeaa567e219a808b8a4a (diff)
Merge branch 'origin' into devel
Conflicts: sound/soc/pxa/pxa2xx-i2s.c
Diffstat (limited to 'arch/m68knommu/platform/532x/config.c')
-rw-r--r--arch/m68knommu/platform/532x/config.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/arch/m68knommu/platform/532x/config.c b/arch/m68knommu/platform/532x/config.c
index a347623d6ee6..591f2f801134 100644
--- a/arch/m68knommu/platform/532x/config.c
+++ b/arch/m68knommu/platform/532x/config.c
@@ -61,8 +61,38 @@ static struct platform_device m532x_uart = {
61 .dev.platform_data = m532x_uart_platform, 61 .dev.platform_data = m532x_uart_platform,
62}; 62};
63 63
64static struct resource m532x_fec_resources[] = {
65 {
66 .start = 0xfc030000,
67 .end = 0xfc0307ff,
68 .flags = IORESOURCE_MEM,
69 },
70 {
71 .start = 64 + 36,
72 .end = 64 + 36,
73 .flags = IORESOURCE_IRQ,
74 },
75 {
76 .start = 64 + 40,
77 .end = 64 + 40,
78 .flags = IORESOURCE_IRQ,
79 },
80 {
81 .start = 64 + 42,
82 .end = 64 + 42,
83 .flags = IORESOURCE_IRQ,
84 },
85};
86
87static struct platform_device m532x_fec = {
88 .name = "fec",
89 .id = 0,
90 .num_resources = ARRAY_SIZE(m532x_fec_resources),
91 .resource = m532x_fec_resources,
92};
64static struct platform_device *m532x_devices[] __initdata = { 93static struct platform_device *m532x_devices[] __initdata = {
65 &m532x_uart, 94 &m532x_uart,
95 &m532x_fec,
66}; 96};
67 97
68/***************************************************************************/ 98/***************************************************************************/
@@ -93,6 +123,24 @@ static void __init m532x_uarts_init(void)
93 for (line = 0; (line < nrlines); line++) 123 for (line = 0; (line < nrlines); line++)
94 m532x_uart_init_line(line, m532x_uart_platform[line].irq); 124 m532x_uart_init_line(line, m532x_uart_platform[line].irq);
95} 125}
126/***************************************************************************/
127
128static void __init m532x_fec_init(void)
129{
130 /* Unmask FEC interrupts at ColdFire interrupt controller */
131 MCF_INTC0_ICR36 = 0x2;
132 MCF_INTC0_ICR40 = 0x2;
133 MCF_INTC0_ICR42 = 0x2;
134
135 MCF_INTC0_IMRH &= ~(MCF_INTC_IMRH_INT_MASK36 |
136 MCF_INTC_IMRH_INT_MASK40 | MCF_INTC_IMRH_INT_MASK42);
137
138 /* Set multi-function pins to ethernet mode for fec0 */
139 MCF_GPIO_PAR_FECI2C |= (MCF_GPIO_PAR_FECI2C_PAR_MDC_EMDC |
140 MCF_GPIO_PAR_FECI2C_PAR_MDIO_EMDIO);
141 MCF_GPIO_PAR_FEC = (MCF_GPIO_PAR_FEC_PAR_FEC_7W_FEC |
142 MCF_GPIO_PAR_FEC_PAR_FEC_MII_FEC);
143}
96 144
97/***************************************************************************/ 145/***************************************************************************/
98 146
@@ -150,6 +198,7 @@ void __init config_BSP(char *commandp, int size)
150static int __init init_BSP(void) 198static int __init init_BSP(void)
151{ 199{
152 m532x_uarts_init(); 200 m532x_uarts_init();
201 m532x_fec_init();
153 platform_add_devices(m532x_devices, ARRAY_SIZE(m532x_devices)); 202 platform_add_devices(m532x_devices, ARRAY_SIZE(m532x_devices));
154 return 0; 203 return 0;
155} 204}