13 #include <linux/kernel.h>
20 #include <linux/input.h>
21 #include <linux/i2c.h>
40 #define NET2BIG_NOR_BOOT_BASE 0xfff80000
41 #define NET2BIG_NOR_BOOT_SIZE SZ_512K
62 .parts = net2big_partitions,
66 static struct resource net2big_nor_flash_resource = {
74 .name =
"physmap-flash",
77 .platform_data = &net2big_nor_flash_data,
80 .resource = &net2big_nor_flash_resource,
116 #define NET2BIG_GPIO_SATA_POWER_REQ 19
117 #define NET2BIG_GPIO_SATA0_POWER 23
118 #define NET2BIG_GPIO_SATA1_POWER 25
120 static void __init net2big_sata_power_init(
void)
135 pr_err(
"net2big: failed to setup SATA0 power GPIO\n");
146 pr_err(
"net2big: failed to setup SATA1 power GPIO\n");
157 pr_err(
"net2big: failed to setup SATA power request GPIO\n");
174 pr_info(
"net2big: power up SATA hard disks\n");
207 #define NET2BIG_GPIO_PWR_RED_LED 6
208 #define NET2BIG_GPIO_PWR_BLUE_LED 16
209 #define NET2BIG_GPIO_PWR_LED_BLINK_STOP 7
211 #define NET2BIG_GPIO_SATA0_RED_LED 11
212 #define NET2BIG_GPIO_SATA1_RED_LED 10
214 #define NET2BIG_GPIO_SATA0_BLUE_LED 17
215 #define NET2BIG_GPIO_SATA1_BLUE_LED 13
217 static struct gpio_led net2big_leds[] = {
219 .name =
"net2big:red:power",
223 .name =
"net2big:blue:power",
227 .name =
"net2big:red:sata0",
231 .name =
"net2big:red:sata1",
238 .leds = net2big_leds,
245 .platform_data = &net2big_led_data,
249 static void __init net2big_gpio_leds_init(
void)
255 "Power LED blink stop");
262 pr_err(
"net2big: failed to setup power LED blink GPIO\n");
269 "SATA0 blue LED control");
276 pr_err(
"net2big: failed to setup SATA0 blue LED GPIO\n");
279 "SATA1 blue LED control");
286 pr_err(
"net2big: failed to setup SATA1 blue LED GPIO\n");
295 #define NET2BIG_GPIO_PUSH_BUTTON 18
296 #define NET2BIG_GPIO_POWER_SWITCH_ON 8
297 #define NET2BIG_GPIO_POWER_SWITCH_OFF 9
299 #define NET2BIG_SWITCH_POWER_ON 0x1
300 #define NET2BIG_SWITCH_POWER_OFF 0x2
307 .desc =
"Power rocker switch (auto|off)",
314 .desc =
"Power rocker switch (on|auto)",
321 .desc =
"Front Push Button",
327 .buttons = net2big_buttons,
335 .platform_data = &net2big_button_data,
343 static unsigned int net2big_mpp_modes[]
__initdata = {
371 #define NET2BIG_GPIO_POWER_OFF 24
373 static void net2big_power_off(
void)
378 static void __init net2big_init(
void)
397 net2big_sata_power_init();
405 net2big_gpio_leds_init();
416 pr_err(
"net2big: failed to configure power-off GPIO\n");
418 pr_notice(
"net2big: Flash writing is not yet supported.\n");
423 .atag_offset = 0x100,
424 .init_machine = net2big_init,