29 #include <linux/kernel.h>
30 #include <linux/types.h>
32 #include <linux/list.h>
39 #include <linux/serial_core.h>
52 #include <linux/i2c.h>
62 #include <linux/input.h>
72 #include <mach/regs-irq.h>
73 #include <mach/regs-gpio.h>
77 #include <mach/regs-mem.h>
78 #include <mach/hardware.h>
100 static long gta02_panic_blink(
int state)
105 led = (
state) ? 1 : 0;
114 .virtual = 0xe0000000,
121 #define UCON (S3C2410_UCON_DEFAULT | S3C2443_UCON_RXERR_IRQEN)
122 #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
123 #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
149 #ifdef CONFIG_CHARGER_PCF50633
158 #define ADC_NOM_CHG_DETECT_1A 6
159 #define ADC_NOM_CHG_DETECT_USB 43
167 if (res < ((ADC_NOM_CHG_DETECT_USB + ADC_NOM_CHG_DETECT_1A) / 2)) {
183 static int gta02_usb_vbus_draw;
187 if (gta02_usb_vbus_draw) {
192 #ifdef CONFIG_PCF50633_ADC
196 gta02_configure_pmu_for_charger,
207 #define GTA02_CHARGER_CONFIGURE_TIMEOUT ((3000 * HZ) / 1000)
213 GTA02_CHARGER_CONFIGURE_TIMEOUT);
220 gta02_usb_vbus_draw = 0;
229 gta02_usb_vbus_draw = ma;
232 GTA02_CHARGER_CONFIGURE_TIMEOUT);
235 #define gta02_pmu_event_callback NULL
236 #define gta02_udc_vbus_draw NULL
247 static void gta02_pmu_attach_child_devices(
struct pcf50633 *pcf);
250 static char *gta02_batteries[] = {
255 .default_brightness = 0x3f,
256 .default_brightness_limit = 0,
272 .batteries = gta02_batteries,
275 .charger_reference_current_ma = 1000,
277 .backlight_data = >a02_backlight_data,
375 .probe_done = gta02_pmu_attach_child_devices,
382 #define GTA02_FLASH_BASE 0x18000000
383 #define GTA02_FLASH_SIZE 0x200000
389 static struct resource gta02_nor_flash_resource =
393 .name =
"physmap-flash",
396 .platform_data = >a02_nor_flash_data,
398 .resource = >a02_nor_flash_resource,
404 .name =
"s3c24xx_pwm",
416 .platform_data = >a02_pcf_pdata,
431 .name =
"neo1973-nand",
447 .sets = gta02_nand_sets,
471 .oversampling_shift = 2,
481 .debounce_interval = 100,
488 .debounce_interval = 100,
493 .buttons = gta02_buttons,
501 .platform_data = >a02_buttons_pdata,
505 static void __init gta02_map_io(
void)
526 >a02_dfbmcs320_device,
527 >a02_buttons_device,
548 static void gta02_pmu_attach_child_devices(
struct pcf50633 *pcf)
555 for (n = 0; n <
ARRAY_SIZE(gta02_devices_pmu_children); n++)
556 gta02_devices_pmu_children[n]->
dev.parent = pcf->
dev;
562 static void gta02_poweroff(
void)
567 static void __init gta02_machine_init(
void)
574 #ifdef CONFIG_CHARGER_PCF50633
595 .atag_offset = 0x100,
596 .map_io = gta02_map_io,
598 .init_machine = gta02_machine_init,