5 #include <linux/module.h>
7 #include <linux/kernel.h>
10 #include <linux/string.h>
19 #include <mach/hardware.h>
20 #include <asm/setup.h>
29 #include <mach/irqs.h>
31 #include <linux/serial_core.h>
33 #include <linux/input.h>
44 static long cs3_shadow;
46 static struct gpio_chip cs3_gpio;
60 static void __simpad_write_cs3(
void)
72 spin_unlock_irqrestore(&cs3_lock, flags);
83 spin_unlock_irqrestore(&cs3_lock, flags);
87 static void cs3_gpio_set(
struct gpio_chip *
chip,
unsigned offset,
int value)
97 static int cs3_gpio_get(
struct gpio_chip *chip,
unsigned offset)
104 static int cs3_gpio_direction_input(
struct gpio_chip *chip,
unsigned offset)
111 static int cs3_gpio_direction_output(
struct gpio_chip *chip,
unsigned offset,
116 cs3_gpio_set(chip, offset, value);
122 .virtual = 0xf2800000,
124 .length = 0x00800000,
129 .length = 0x00100000,
151 .pm = simpad_uart_pm,
157 .name =
"SIMpad boot firmware",
162 .name =
"SIMpad kernel",
166 .name =
"SIMpad root jffs2",
173 .map_name =
"cfi_probe",
174 .parts = simpad_partitions,
179 static struct resource simpad_flash_resources [] = {
190 .sclk_rate = 11981000,
191 .codec_pdata = &simpad_ucb1x00_data,
196 static void __init simpad_map_io(
void)
205 __simpad_write_cs3();
229 static void simpad_power_off(
void)
233 __simpad_write_cs3();
263 .buttons = simpad_button_table,
270 .platform_data = &simpad_keys_data,
284 .buttons = simpad_polled_button_table,
285 .nbuttons =
ARRAY_SIZE(simpad_polled_button_table),
290 .name =
"gpio-keys-polled",
292 .platform_data = &simpad_polled_keys_data,
300 static struct gpio_led simpad_leds[] = {
302 .name =
"simpad:power",
305 .default_trigger =
"default-on",
318 .platform_data = &simpad_led_data,
336 .platform_data = &simpad_i2c_data,
344 .name =
"simpad-mq200",
358 static int __init simpad_init(
void)
364 cs3_gpio.label =
"simpad_cs3";
367 cs3_gpio.set = cs3_gpio_set;
368 cs3_gpio.get = cs3_gpio_get;
369 cs3_gpio.direction_input = cs3_gpio_direction_input;
370 cs3_gpio.direction_output = cs3_gpio_direction_output;
394 .atag_offset = 0x100,
395 .map_io = simpad_map_io,