diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-shmobile/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-bockw.c | 38 |
2 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 549e05985745..1a517e2fe449 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -133,6 +133,7 @@ config MACH_BOCKW | |||
133 | bool "BOCK-W platform" | 133 | bool "BOCK-W platform" |
134 | depends on ARCH_R8A7778 | 134 | depends on ARCH_R8A7778 |
135 | select ARCH_REQUIRE_GPIOLIB | 135 | select ARCH_REQUIRE_GPIOLIB |
136 | select RENESAS_INTC_IRQPIN | ||
136 | select USE_OF | 137 | select USE_OF |
137 | 138 | ||
138 | config MACH_MARZEN | 139 | config MACH_MARZEN |
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index 56ab56ed5f59..38e5e50fb318 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c | |||
@@ -19,14 +19,52 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/smsc911x.h> | ||
22 | #include <mach/common.h> | 23 | #include <mach/common.h> |
24 | #include <mach/irqs.h> | ||
23 | #include <mach/r8a7778.h> | 25 | #include <mach/r8a7778.h> |
24 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
25 | 27 | ||
28 | static struct smsc911x_platform_config smsc911x_data = { | ||
29 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
30 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, | ||
31 | .flags = SMSC911X_USE_32BIT, | ||
32 | .phy_interface = PHY_INTERFACE_MODE_MII, | ||
33 | }; | ||
34 | |||
35 | static struct resource smsc911x_resources[] = { | ||
36 | DEFINE_RES_MEM(0x18300000, 0x1000), | ||
37 | DEFINE_RES_IRQ(irq_pin(0)), /* IRQ 0 */ | ||
38 | }; | ||
39 | |||
40 | #define IRQ0MR 0x30 | ||
26 | static void __init bockw_init(void) | 41 | static void __init bockw_init(void) |
27 | { | 42 | { |
43 | void __iomem *fpga; | ||
44 | |||
28 | r8a7778_clock_init(); | 45 | r8a7778_clock_init(); |
46 | r8a7778_init_irq_extpin(1); | ||
29 | r8a7778_add_standard_devices(); | 47 | r8a7778_add_standard_devices(); |
48 | |||
49 | fpga = ioremap_nocache(0x18200000, SZ_1M); | ||
50 | if (fpga) { | ||
51 | /* | ||
52 | * CAUTION | ||
53 | * | ||
54 | * IRQ0/1 is cascaded interrupt from FPGA. | ||
55 | * it should be cared in the future | ||
56 | * Now, it is assuming IRQ0 was used only from SMSC. | ||
57 | */ | ||
58 | u16 val = ioread16(fpga + IRQ0MR); | ||
59 | val &= ~(1 << 4); /* enable SMSC911x */ | ||
60 | iowrite16(val, fpga + IRQ0MR); | ||
61 | iounmap(fpga); | ||
62 | |||
63 | platform_device_register_resndata( | ||
64 | &platform_bus, "smsc911x", -1, | ||
65 | smsc911x_resources, ARRAY_SIZE(smsc911x_resources), | ||
66 | &smsc911x_data, sizeof(smsc911x_data)); | ||
67 | } | ||
30 | } | 68 | } |
31 | 69 | ||
32 | static const char *bockw_boards_compat_dt[] __initdata = { | 70 | static const char *bockw_boards_compat_dt[] __initdata = { |