21 #include <linux/if_ether.h>
25 #include <linux/serial.h>
28 #include <linux/reboot.h>
29 #include <linux/i2c.h>
36 #define NAS100D_SDA_PIN 5
37 #define NAS100D_SCL_PIN 6
40 #define NAS100D_PB_GPIO 14
41 #define NAS100D_RB_GPIO 4
44 #define NAS100D_PO_GPIO 12
47 #define NAS100D_LED_WLAN_GPIO 0
48 #define NAS100D_LED_DISK_GPIO 3
49 #define NAS100D_LED_PWR_GPIO 15
52 .map_name =
"cfi_probe",
56 static struct resource nas100d_flash_resource = {
61 .name =
"IXP4XX-Flash",
63 .dev.platform_data = &nas100d_flash_data,
65 .resource = &nas100d_flash_resource,
74 static struct gpio_led nas100d_led_pins[] = {
76 .name =
"nas100d:green:wlan",
81 .name =
"nas100d:blue:power",
86 .name =
"nas100d:yellow:disk",
94 .leds = nas100d_led_pins,
100 .dev.platform_data = &nas100d_led_data,
112 .platform_data = &nas100d_i2c_gpio_data,
116 static struct resource nas100d_uart_resources[] = {
152 .name =
"serial8250",
154 .dev.platform_data = nas100d_uart_data,
156 .resource = nas100d_uart_resources,
170 .name =
"ixp4xx_eth",
172 .dev.platform_data = nas100d_plat_eth,
183 static void nas100d_power_off(
void)
197 static int power_button_countdown;
200 #define PBUTTON_HOLDDOWN_COUNT 4
202 static void nas100d_power_handler(
unsigned long data);
203 static DEFINE_TIMER(nas100d_power_timer, nas100d_power_handler, 0, 0);
205 static void nas100d_power_handler(
unsigned long data)
214 if (power_button_countdown > 0)
215 power_button_countdown--;
220 if (power_button_countdown == 0) {
245 static void __init nas100d_init(
void)
256 nas100d_flash_resource.
end =
275 "NAS100D reset button",
NULL) < 0) {
301 for (i = 0; i < 6; i++)
303 nas100d_plat_eth[0].hwaddr[i] =
readb(f + 0xFC0FD8 + i);
305 nas100d_plat_eth[0].
hwaddr[
i] =
readb(f + 0xFC0FD8 + (i^3));
310 nas100d_plat_eth[0].hwaddr);
316 .atag_offset = 0x100,
321 .init_machine = nas100d_init,
322 #if defined(CONFIG_PCI)