diff options
| -rw-r--r-- | arch/m68knommu/platform/5249/config.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/arch/m68knommu/platform/5249/config.c b/arch/m68knommu/platform/5249/config.c index 72fc4ae0e663..ceb31e5744a6 100644 --- a/arch/m68knommu/platform/5249/config.c +++ b/arch/m68knommu/platform/5249/config.c | |||
| @@ -40,6 +40,30 @@ static struct platform_device m5249_uart = { | |||
| 40 | .dev.platform_data = m5249_uart_platform, | 40 | .dev.platform_data = m5249_uart_platform, |
| 41 | }; | 41 | }; |
| 42 | 42 | ||
| 43 | #ifdef CONFIG_M5249C3 | ||
| 44 | |||
| 45 | static struct resource m5249_smc91x_resources[] = { | ||
| 46 | { | ||
| 47 | .start = 0xe0000300, | ||
| 48 | .end = 0xe0000300 + 0x100, | ||
| 49 | .flags = IORESOURCE_MEM, | ||
| 50 | }, | ||
| 51 | { | ||
| 52 | .start = MCFINTC2_GPIOIRQ6, | ||
| 53 | .end = MCFINTC2_GPIOIRQ6, | ||
| 54 | .flags = IORESOURCE_IRQ, | ||
| 55 | }, | ||
| 56 | }; | ||
| 57 | |||
| 58 | static struct platform_device m5249_smc91x = { | ||
| 59 | .name = "smc91x", | ||
| 60 | .id = 0, | ||
| 61 | .num_resources = ARRAY_SIZE(m5249_smc91x_resources), | ||
| 62 | .resource = m5249_smc91x_resources, | ||
| 63 | }; | ||
| 64 | |||
| 65 | #endif /* CONFIG_M5249C3 */ | ||
| 66 | |||
| 43 | #if defined(CONFIG_SPI_COLDFIRE_QSPI) || defined(CONFIG_SPI_COLDFIRE_QSPI_MODULE) | 67 | #if defined(CONFIG_SPI_COLDFIRE_QSPI) || defined(CONFIG_SPI_COLDFIRE_QSPI_MODULE) |
| 44 | static struct resource m5249_qspi_resources[] = { | 68 | static struct resource m5249_qspi_resources[] = { |
| 45 | { | 69 | { |
| @@ -200,6 +224,9 @@ static void __init m5249_qspi_init(void) | |||
| 200 | 224 | ||
| 201 | static struct platform_device *m5249_devices[] __initdata = { | 225 | static struct platform_device *m5249_devices[] __initdata = { |
| 202 | &m5249_uart, | 226 | &m5249_uart, |
| 227 | #ifdef CONFIG_M5249C3 | ||
| 228 | &m5249_smc91x, | ||
| 229 | #endif | ||
| 203 | #if defined(CONFIG_SPI_COLDFIRE_QSPI) || defined(CONFIG_SPI_COLDFIRE_QSPI_MODULE) | 230 | #if defined(CONFIG_SPI_COLDFIRE_QSPI) || defined(CONFIG_SPI_COLDFIRE_QSPI_MODULE) |
| 204 | &m5249_qspi, | 231 | &m5249_qspi, |
| 205 | #endif | 232 | #endif |
| @@ -231,6 +258,24 @@ static void __init m5249_uarts_init(void) | |||
| 231 | 258 | ||
| 232 | /***************************************************************************/ | 259 | /***************************************************************************/ |
| 233 | 260 | ||
| 261 | #ifdef CONFIG_M5249C3 | ||
| 262 | |||
| 263 | static void __init m5249_smc91x_init(void) | ||
| 264 | { | ||
| 265 | u32 gpio; | ||
| 266 | |||
| 267 | /* Set the GPIO line as interrupt source for smc91x device */ | ||
| 268 | gpio = readl(MCF_MBAR2 + MCFSIM2_GPIOINTENABLE); | ||
| 269 | writel(gpio | 0x40, MCF_MBAR2 + MCFSIM2_GPIOINTENABLE); | ||
| 270 | |||
| 271 | gpio = readl(MCF_MBAR2 + MCFSIM2_INTLEVEL5); | ||
| 272 | writel(gpio | 0x04000000, MCF_MBAR2 + MCFSIM2_INTLEVEL5); | ||
| 273 | } | ||
| 274 | |||
| 275 | #endif /* CONFIG_M5249C3 */ | ||
| 276 | |||
| 277 | /***************************************************************************/ | ||
| 278 | |||
| 234 | static void __init m5249_timers_init(void) | 279 | static void __init m5249_timers_init(void) |
| 235 | { | 280 | { |
| 236 | /* Timer1 is always used as system timer */ | 281 | /* Timer1 is always used as system timer */ |
| @@ -264,6 +309,9 @@ void __init config_BSP(char *commandp, int size) | |||
| 264 | mach_reset = m5249_cpu_reset; | 309 | mach_reset = m5249_cpu_reset; |
| 265 | m5249_timers_init(); | 310 | m5249_timers_init(); |
| 266 | m5249_uarts_init(); | 311 | m5249_uarts_init(); |
| 312 | #ifdef CONFIG_M5249C3 | ||
| 313 | m5249_smc91x_init(); | ||
| 314 | #endif | ||
| 267 | #if defined(CONFIG_SPI_COLDFIRE_QSPI) || defined(CONFIG_SPI_COLDFIRE_QSPI_MODULE) | 315 | #if defined(CONFIG_SPI_COLDFIRE_QSPI) || defined(CONFIG_SPI_COLDFIRE_QSPI_MODULE) |
| 268 | m5249_qspi_init(); | 316 | m5249_qspi_init(); |
| 269 | #endif | 317 | #endif |
