diff options
Diffstat (limited to 'arch/arm/mach-ks8695/devices.c')
-rw-r--r-- | arch/arm/mach-ks8695/devices.c | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/arch/arm/mach-ks8695/devices.c b/arch/arm/mach-ks8695/devices.c index 4bd251482c8f..36ab0fd3d9b6 100644 --- a/arch/arm/mach-ks8695/devices.c +++ b/arch/arm/mach-ks8695/devices.c | |||
@@ -25,19 +25,20 @@ | |||
25 | #include <mach/regs-wan.h> | 25 | #include <mach/regs-wan.h> |
26 | #include <mach/regs-lan.h> | 26 | #include <mach/regs-lan.h> |
27 | #include <mach/regs-hpna.h> | 27 | #include <mach/regs-hpna.h> |
28 | #include <mach/regs-switch.h> | ||
29 | #include <mach/regs-misc.h> | ||
28 | 30 | ||
29 | 31 | ||
30 | /* -------------------------------------------------------------------- | 32 | /* -------------------------------------------------------------------- |
31 | * Ethernet | 33 | * Ethernet |
32 | * -------------------------------------------------------------------- */ | 34 | * -------------------------------------------------------------------- */ |
33 | 35 | ||
34 | #if defined(CONFIG_ARM_KS8695_ETHER) || defined(CONFIG_ARM_KS8695_ETHER_MODULE) | ||
35 | static u64 eth_dmamask = 0xffffffffUL; | 36 | static u64 eth_dmamask = 0xffffffffUL; |
36 | 37 | ||
37 | static struct resource ks8695_wan_resources[] = { | 38 | static struct resource ks8695_wan_resources[] = { |
38 | [0] = { | 39 | [0] = { |
39 | .start = KS8695_WAN_VA, | 40 | .start = KS8695_WAN_PA, |
40 | .end = KS8695_WAN_VA + 0x00ff, | 41 | .end = KS8695_WAN_PA + 0x00ff, |
41 | .flags = IORESOURCE_MEM, | 42 | .flags = IORESOURCE_MEM, |
42 | }, | 43 | }, |
43 | [1] = { | 44 | [1] = { |
@@ -58,6 +59,12 @@ static struct resource ks8695_wan_resources[] = { | |||
58 | .end = KS8695_IRQ_WAN_LINK, | 59 | .end = KS8695_IRQ_WAN_LINK, |
59 | .flags = IORESOURCE_IRQ, | 60 | .flags = IORESOURCE_IRQ, |
60 | }, | 61 | }, |
62 | [4] = { | ||
63 | .name = "WAN PHY", | ||
64 | .start = KS8695_MISC_PA, | ||
65 | .end = KS8695_MISC_PA + 0x1f, | ||
66 | .flags = IORESOURCE_MEM, | ||
67 | }, | ||
61 | }; | 68 | }; |
62 | 69 | ||
63 | static struct platform_device ks8695_wan_device = { | 70 | static struct platform_device ks8695_wan_device = { |
@@ -74,8 +81,8 @@ static struct platform_device ks8695_wan_device = { | |||
74 | 81 | ||
75 | static struct resource ks8695_lan_resources[] = { | 82 | static struct resource ks8695_lan_resources[] = { |
76 | [0] = { | 83 | [0] = { |
77 | .start = KS8695_LAN_VA, | 84 | .start = KS8695_LAN_PA, |
78 | .end = KS8695_LAN_VA + 0x00ff, | 85 | .end = KS8695_LAN_PA + 0x00ff, |
79 | .flags = IORESOURCE_MEM, | 86 | .flags = IORESOURCE_MEM, |
80 | }, | 87 | }, |
81 | [1] = { | 88 | [1] = { |
@@ -90,6 +97,12 @@ static struct resource ks8695_lan_resources[] = { | |||
90 | .end = KS8695_IRQ_LAN_TX_STATUS, | 97 | .end = KS8695_IRQ_LAN_TX_STATUS, |
91 | .flags = IORESOURCE_IRQ, | 98 | .flags = IORESOURCE_IRQ, |
92 | }, | 99 | }, |
100 | [3] = { | ||
101 | .name = "LAN SWITCH", | ||
102 | .start = KS8695_SWITCH_PA, | ||
103 | .end = KS8695_SWITCH_PA + 0x4f, | ||
104 | .flags = IORESOURCE_MEM, | ||
105 | }, | ||
93 | }; | 106 | }; |
94 | 107 | ||
95 | static struct platform_device ks8695_lan_device = { | 108 | static struct platform_device ks8695_lan_device = { |
@@ -106,8 +119,8 @@ static struct platform_device ks8695_lan_device = { | |||
106 | 119 | ||
107 | static struct resource ks8695_hpna_resources[] = { | 120 | static struct resource ks8695_hpna_resources[] = { |
108 | [0] = { | 121 | [0] = { |
109 | .start = KS8695_HPNA_VA, | 122 | .start = KS8695_HPNA_PA, |
110 | .end = KS8695_HPNA_VA + 0x00ff, | 123 | .end = KS8695_HPNA_PA + 0x00ff, |
111 | .flags = IORESOURCE_MEM, | 124 | .flags = IORESOURCE_MEM, |
112 | }, | 125 | }, |
113 | [1] = { | 126 | [1] = { |
@@ -149,18 +162,12 @@ void __init ks8696_add_device_hpna(void) | |||
149 | { | 162 | { |
150 | platform_device_register(&ks8695_hpna_device); | 163 | platform_device_register(&ks8695_hpna_device); |
151 | } | 164 | } |
152 | #else | ||
153 | void __init ks8695_add_device_wan(void) {} | ||
154 | void __init ks8695_add_device_lan(void) {} | ||
155 | void __init ks8696_add_device_hpna(void) {} | ||
156 | #endif | ||
157 | 165 | ||
158 | 166 | ||
159 | /* -------------------------------------------------------------------- | 167 | /* -------------------------------------------------------------------- |
160 | * Watchdog | 168 | * Watchdog |
161 | * -------------------------------------------------------------------- */ | 169 | * -------------------------------------------------------------------- */ |
162 | 170 | ||
163 | #if defined(CONFIG_KS8695_WATCHDOG) || defined(CONFIG_KS8695_WATCHDOG_MODULE) | ||
164 | static struct platform_device ks8695_wdt_device = { | 171 | static struct platform_device ks8695_wdt_device = { |
165 | .name = "ks8695_wdt", | 172 | .name = "ks8695_wdt", |
166 | .id = -1, | 173 | .id = -1, |
@@ -171,9 +178,6 @@ static void __init ks8695_add_device_watchdog(void) | |||
171 | { | 178 | { |
172 | platform_device_register(&ks8695_wdt_device); | 179 | platform_device_register(&ks8695_wdt_device); |
173 | } | 180 | } |
174 | #else | ||
175 | static void __init ks8695_add_device_watchdog(void) {} | ||
176 | #endif | ||
177 | 181 | ||
178 | 182 | ||
179 | /* -------------------------------------------------------------------- | 183 | /* -------------------------------------------------------------------- |
@@ -190,7 +194,7 @@ void __init ks8695_init_leds(u8 cpu_led, u8 timer_led) | |||
190 | gpio_direction_output(cpu_led, 1); | 194 | gpio_direction_output(cpu_led, 1); |
191 | gpio_direction_output(timer_led, 1); | 195 | gpio_direction_output(timer_led, 1); |
192 | 196 | ||
193 | ks8695_leds_cpu = cpu_led; | 197 | ks8695_leds_cpu = cpu_led; |
194 | ks8695_leds_timer = timer_led; | 198 | ks8695_leds_timer = timer_led; |
195 | } | 199 | } |
196 | #else | 200 | #else |