diff options
Diffstat (limited to 'arch/m68knommu/platform/5272/config.c')
-rw-r--r-- | arch/m68knommu/platform/5272/config.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c index 230bae691a7f..e049245f4092 100644 --- a/arch/m68knommu/platform/5272/config.c +++ b/arch/m68knommu/platform/5272/config.c | |||
@@ -55,8 +55,39 @@ static struct platform_device m5272_uart = { | |||
55 | .dev.platform_data = m5272_uart_platform, | 55 | .dev.platform_data = m5272_uart_platform, |
56 | }; | 56 | }; |
57 | 57 | ||
58 | static struct resource m5272_fec_resources[] = { | ||
59 | { | ||
60 | .start = MCF_MBAR + 0x840, | ||
61 | .end = MCF_MBAR + 0x840 + 0x1cf, | ||
62 | .flags = IORESOURCE_MEM, | ||
63 | }, | ||
64 | { | ||
65 | .start = 86, | ||
66 | .end = 86, | ||
67 | .flags = IORESOURCE_IRQ, | ||
68 | }, | ||
69 | { | ||
70 | .start = 87, | ||
71 | .end = 87, | ||
72 | .flags = IORESOURCE_IRQ, | ||
73 | }, | ||
74 | { | ||
75 | .start = 88, | ||
76 | .end = 88, | ||
77 | .flags = IORESOURCE_IRQ, | ||
78 | }, | ||
79 | }; | ||
80 | |||
81 | static struct platform_device m5272_fec = { | ||
82 | .name = "fec", | ||
83 | .id = 0, | ||
84 | .num_resources = ARRAY_SIZE(m5272_fec_resources), | ||
85 | .resource = m5272_fec_resources, | ||
86 | }; | ||
87 | |||
58 | static struct platform_device *m5272_devices[] __initdata = { | 88 | static struct platform_device *m5272_devices[] __initdata = { |
59 | &m5272_uart, | 89 | &m5272_uart, |
90 | &m5272_fec, | ||
60 | }; | 91 | }; |
61 | 92 | ||
62 | /***************************************************************************/ | 93 | /***************************************************************************/ |
@@ -91,6 +122,22 @@ static void __init m5272_uarts_init(void) | |||
91 | 122 | ||
92 | /***************************************************************************/ | 123 | /***************************************************************************/ |
93 | 124 | ||
125 | static void __init m5272_fec_init(void) | ||
126 | { | ||
127 | u32 imr; | ||
128 | |||
129 | /* Unmask FEC interrupts at ColdFire interrupt controller */ | ||
130 | imr = readl(MCF_MBAR + MCFSIM_ICR3); | ||
131 | imr = (imr & ~0x00000fff) | 0x00000ddd; | ||
132 | writel(imr, MCF_MBAR + MCFSIM_ICR3); | ||
133 | |||
134 | imr = readl(MCF_MBAR + MCFSIM_ICR1); | ||
135 | imr = (imr & ~0x0f000000) | 0x0d000000; | ||
136 | writel(imr, MCF_MBAR + MCFSIM_ICR1); | ||
137 | } | ||
138 | |||
139 | /***************************************************************************/ | ||
140 | |||
94 | void mcf_disableall(void) | 141 | void mcf_disableall(void) |
95 | { | 142 | { |
96 | volatile unsigned long *icrp; | 143 | volatile unsigned long *icrp; |
@@ -155,6 +202,7 @@ void __init config_BSP(char *commandp, int size) | |||
155 | static int __init init_BSP(void) | 202 | static int __init init_BSP(void) |
156 | { | 203 | { |
157 | m5272_uarts_init(); | 204 | m5272_uarts_init(); |
205 | m5272_fec_init(); | ||
158 | platform_add_devices(m5272_devices, ARRAY_SIZE(m5272_devices)); | 206 | platform_add_devices(m5272_devices, ARRAY_SIZE(m5272_devices)); |
159 | return 0; | 207 | return 0; |
160 | } | 208 | } |