提交 5a5c419f 编写于 作者: B Ben Dooks

ARM: Merge for-2635/acer-n35

Merge branch 'for-2635/acer-n35' into for-linus/samsung2
...@@ -95,12 +95,19 @@ config PM_H1940 ...@@ -95,12 +95,19 @@ config PM_H1940
config MACH_N30 config MACH_N30
bool "Acer N30 family" bool "Acer N30 family"
select CPU_S3C2410 select CPU_S3C2410
select MACH_N35
select S3C_DEV_USB_HOST select S3C_DEV_USB_HOST
select S3C_DEV_NAND select S3C_DEV_NAND
help help
Say Y here if you want suppt for the Acer N30, Acer N35, Say Y here if you want suppt for the Acer N30, Acer N35,
Navman PiN570, Yakumo AlphaX or Airis NC05 PDAs. Navman PiN570, Yakumo AlphaX or Airis NC05 PDAs.
config MACH_N35
bool
help
Internal node in order to enable support for Acer N35 if Acer N30 is
selected.
config ARCH_BAST config ARCH_BAST
bool "Simtec Electronics BAST (EB2410ITX)" bool "Simtec Electronics BAST (EB2410ITX)"
select CPU_S3C2410 select CPU_S3C2410
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/mmc/host.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -46,6 +47,7 @@ ...@@ -46,6 +47,7 @@
#include <plat/clock.h> #include <plat/clock.h>
#include <plat/cpu.h> #include <plat/cpu.h>
#include <plat/devs.h> #include <plat/devs.h>
#include <plat/mci.h>
#include <plat/s3c2410.h> #include <plat/s3c2410.h>
#include <plat/udc.h> #include <plat/udc.h>
...@@ -86,10 +88,10 @@ static void n30_udc_pullup(enum s3c2410_udc_cmd_e cmd) ...@@ -86,10 +88,10 @@ static void n30_udc_pullup(enum s3c2410_udc_cmd_e cmd)
{ {
switch (cmd) { switch (cmd) {
case S3C2410_UDC_P_ENABLE : case S3C2410_UDC_P_ENABLE :
s3c2410_gpio_setpin(S3C2410_GPB(3), 1); gpio_set_value(S3C2410_GPB(3), 1);
break; break;
case S3C2410_UDC_P_DISABLE : case S3C2410_UDC_P_DISABLE :
s3c2410_gpio_setpin(S3C2410_GPB(3), 0); gpio_set_value(S3C2410_GPB(3), 0);
break; break;
case S3C2410_UDC_P_RESET : case S3C2410_UDC_P_RESET :
break; break;
...@@ -172,8 +174,10 @@ static struct gpio_keys_button n35_buttons[] = { ...@@ -172,8 +174,10 @@ static struct gpio_keys_button n35_buttons[] = {
{ {
.gpio = S3C2410_GPF(0), .gpio = S3C2410_GPF(0),
.code = KEY_POWER, .code = KEY_POWER,
.type = EV_PWR,
.desc = "Power", .desc = "Power",
.active_low = 0, .active_low = 0,
.wakeup = 1,
}, },
{ {
.gpio = S3C2410_GPG(9), .gpio = S3C2410_GPG(9),
...@@ -264,6 +268,14 @@ static struct s3c24xx_led_platdata n30_blue_led_pdata = { ...@@ -264,6 +268,14 @@ static struct s3c24xx_led_platdata n30_blue_led_pdata = {
.def_trigger = "", .def_trigger = "",
}; };
/* This is the blue LED on the device. Originaly used to indicate GPS activity
* by flashing. */
static struct s3c24xx_led_platdata n35_blue_led_pdata = {
.name = "blue_led",
.gpio = S3C2410_GPD(8),
.def_trigger = "",
};
/* This LED is driven by the battery microcontroller, and is blinking /* This LED is driven by the battery microcontroller, and is blinking
* red, blinking green or solid green when the battery is low, * red, blinking green or solid green when the battery is low,
* charging or full respectively. By driving GPD9 low, it's possible * charging or full respectively. By driving GPD9 low, it's possible
...@@ -275,6 +287,13 @@ static struct s3c24xx_led_platdata n30_warning_led_pdata = { ...@@ -275,6 +287,13 @@ static struct s3c24xx_led_platdata n30_warning_led_pdata = {
.def_trigger = "", .def_trigger = "",
}; };
static struct s3c24xx_led_platdata n35_warning_led_pdata = {
.name = "warning_led",
.flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
.gpio = S3C2410_GPD(9),
.def_trigger = "",
};
static struct platform_device n30_blue_led = { static struct platform_device n30_blue_led = {
.name = "s3c24xx_led", .name = "s3c24xx_led",
.id = 1, .id = 1,
...@@ -283,6 +302,14 @@ static struct platform_device n30_blue_led = { ...@@ -283,6 +302,14 @@ static struct platform_device n30_blue_led = {
}, },
}; };
static struct platform_device n35_blue_led = {
.name = "s3c24xx_led",
.id = 1,
.dev = {
.platform_data = &n35_blue_led_pdata,
},
};
static struct platform_device n30_warning_led = { static struct platform_device n30_warning_led = {
.name = "s3c24xx_led", .name = "s3c24xx_led",
.id = 2, .id = 2,
...@@ -291,6 +318,14 @@ static struct platform_device n30_warning_led = { ...@@ -291,6 +318,14 @@ static struct platform_device n30_warning_led = {
}, },
}; };
static struct platform_device n35_warning_led = {
.name = "s3c24xx_led",
.id = 2,
.dev = {
.platform_data = &n35_warning_led_pdata,
},
};
static struct s3c2410fb_display n30_display __initdata = { static struct s3c2410fb_display n30_display __initdata = {
.type = S3C2410_LCDCON1_TFT, .type = S3C2410_LCDCON1_TFT,
.width = 240, .width = 240,
...@@ -317,13 +352,36 @@ static struct s3c2410fb_mach_info n30_fb_info __initdata = { ...@@ -317,13 +352,36 @@ static struct s3c2410fb_mach_info n30_fb_info __initdata = {
.lpcsel = 0x06, .lpcsel = 0x06,
}; };
static void n30_sdi_set_power(unsigned char power_mode, unsigned short vdd)
{
switch (power_mode) {
case MMC_POWER_ON:
case MMC_POWER_UP:
gpio_set_value(S3C2410_GPG(4), 1);
break;
case MMC_POWER_OFF:
default:
gpio_set_value(S3C2410_GPG(4), 0);
break;
}
}
static struct s3c24xx_mci_pdata n30_mci_cfg __initdata = {
.gpio_detect = S3C2410_GPF(1),
.gpio_wprotect = S3C2410_GPG(10),
.ocr_avail = MMC_VDD_32_33,
.set_power = n30_sdi_set_power,
};
static struct platform_device *n30_devices[] __initdata = { static struct platform_device *n30_devices[] __initdata = {
&s3c_device_lcd, &s3c_device_lcd,
&s3c_device_wdt, &s3c_device_wdt,
&s3c_device_i2c0, &s3c_device_i2c0,
&s3c_device_iis, &s3c_device_iis,
&s3c_device_ohci, &s3c_device_ohci,
&s3c_device_rtc,
&s3c_device_usbgadget, &s3c_device_usbgadget,
&s3c_device_sdi,
&n30_button_device, &n30_button_device,
&n30_blue_led, &n30_blue_led,
&n30_warning_led, &n30_warning_led,
...@@ -334,8 +392,12 @@ static struct platform_device *n35_devices[] __initdata = { ...@@ -334,8 +392,12 @@ static struct platform_device *n35_devices[] __initdata = {
&s3c_device_wdt, &s3c_device_wdt,
&s3c_device_i2c0, &s3c_device_i2c0,
&s3c_device_iis, &s3c_device_iis,
&s3c_device_rtc,
&s3c_device_usbgadget, &s3c_device_usbgadget,
&s3c_device_sdi,
&n35_button_device, &n35_button_device,
&n35_blue_led,
&n35_warning_led,
}; };
static struct s3c2410_platform_i2c __initdata n30_i2ccfg = { static struct s3c2410_platform_i2c __initdata n30_i2ccfg = {
...@@ -490,17 +552,15 @@ static void __init n30_map_io(void) ...@@ -490,17 +552,15 @@ static void __init n30_map_io(void)
s3c24xx_init_uarts(n30_uartcfgs, ARRAY_SIZE(n30_uartcfgs)); s3c24xx_init_uarts(n30_uartcfgs, ARRAY_SIZE(n30_uartcfgs));
} }
static void __init n30_init_irq(void)
{
s3c24xx_init_irq();
}
/* GPB3 is the line that controls the pull-up for the USB D+ line */ /* GPB3 is the line that controls the pull-up for the USB D+ line */
static void __init n30_init(void) static void __init n30_init(void)
{ {
WARN_ON(gpio_request(S3C2410_GPG(4), "mmc power"));
s3c24xx_fb_set_platdata(&n30_fb_info); s3c24xx_fb_set_platdata(&n30_fb_info);
s3c24xx_udc_set_platdata(&n30_udc_cfg); s3c24xx_udc_set_platdata(&n30_udc_cfg);
s3c24xx_mci_set_platdata(&n30_mci_cfg);
s3c_i2c0_set_platdata(&n30_i2ccfg); s3c_i2c0_set_platdata(&n30_i2ccfg);
/* Turn off suspend on both USB ports, and switch the /* Turn off suspend on both USB ports, and switch the
...@@ -532,7 +592,7 @@ static void __init n30_init(void) ...@@ -532,7 +592,7 @@ static void __init n30_init(void)
s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST | s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST |
S3C2410_MISCCR_USBSUSPND0 | S3C2410_MISCCR_USBSUSPND0 |
S3C2410_MISCCR_USBSUSPND1, S3C2410_MISCCR_USBSUSPND1,
S3C2410_MISCCR_USBSUSPND1); S3C2410_MISCCR_USBSUSPND0);
platform_add_devices(n35_devices, ARRAY_SIZE(n35_devices)); platform_add_devices(n35_devices, ARRAY_SIZE(n35_devices));
} }
...@@ -547,7 +607,7 @@ MACHINE_START(N30, "Acer-N30") ...@@ -547,7 +607,7 @@ MACHINE_START(N30, "Acer-N30")
.boot_params = S3C2410_SDRAM_PA + 0x100, .boot_params = S3C2410_SDRAM_PA + 0x100,
.timer = &s3c24xx_timer, .timer = &s3c24xx_timer,
.init_machine = n30_init, .init_machine = n30_init,
.init_irq = n30_init_irq, .init_irq = s3c24xx_init_irq,
.map_io = n30_map_io, .map_io = n30_map_io,
MACHINE_END MACHINE_END
...@@ -559,6 +619,6 @@ MACHINE_START(N35, "Acer-N35") ...@@ -559,6 +619,6 @@ MACHINE_START(N35, "Acer-N35")
.boot_params = S3C2410_SDRAM_PA + 0x100, .boot_params = S3C2410_SDRAM_PA + 0x100,
.timer = &s3c24xx_timer, .timer = &s3c24xx_timer,
.init_machine = n30_init, .init_machine = n30_init,
.init_irq = n30_init_irq, .init_irq = s3c24xx_init_irq,
.map_io = n30_map_io, .map_io = n30_map_io,
MACHINE_END MACHINE_END
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册