13 #include <linux/kernel.h>
16 #include <linux/pci.h>
22 #include <linux/input.h>
23 #include <linux/i2c.h>
42 #define D2NET_NOR_BOOT_BASE 0xfff80000
43 #define D2NET_NOR_BOOT_SIZE SZ_512K
64 .parts = d2net_partitions,
68 static struct resource d2net_nor_flash_resource = {
76 .name =
"physmap-flash",
79 .platform_data = &d2net_nor_flash_data,
82 .resource = &d2net_nor_flash_resource,
121 #define D2NET_GPIO_SATA0_POWER 3
122 #define D2NET_GPIO_SATA1_POWER 12
124 static void __init d2net_sata_power_init(
void)
135 pr_err(
"d2net: failed to configure SATA0 power GPIO\n");
144 pr_err(
"d2net: failed to configure SATA1 power GPIO\n");
169 #define D2NET_GPIO_RED_LED 6
170 #define D2NET_GPIO_BLUE_LED_BLINK_CTRL 16
171 #define D2NET_GPIO_BLUE_LED_OFF 23
173 static struct gpio_led d2net_leds[] = {
175 .name =
"d2net:blue:sata",
176 .default_trigger =
"default-on",
181 .name =
"d2net:red:fail",
195 .platform_data = &d2net_led_data,
199 static void __init d2net_gpio_leds_init(
void)
214 pr_err(
"d2net: failed to configure blue LED blink GPIO\n");
223 #define D2NET_GPIO_PUSH_BUTTON 18
224 #define D2NET_GPIO_POWER_SWITCH_ON 8
225 #define D2NET_GPIO_POWER_SWITCH_OFF 9
227 #define D2NET_SWITCH_POWER_ON 0x1
228 #define D2NET_SWITCH_POWER_OFF 0x2
235 .desc =
"Power rocker switch (auto|off)",
242 .desc =
"Power rocker switch (on|auto)",
249 .desc =
"Front Push Button",
255 .buttons = d2net_buttons,
263 .platform_data = &d2net_button_data,
271 static unsigned int d2net_mpp_modes[]
__initdata = {
298 #define D2NET_GPIO_INHIBIT_POWER_OFF 24
300 static void __init d2net_init(
void)
317 d2net_sata_power_init();
326 d2net_gpio_leds_init();
328 pr_notice(
"d2net: Flash write are not yet supported.\n");
338 #ifdef CONFIG_MACH_D2NET
340 .atag_offset = 0x100,
341 .init_machine = d2net_init,
351 #ifdef CONFIG_MACH_BIGDISK
353 .atag_offset = 0x100,
354 .init_machine = d2net_init,