14 #include <linux/kernel.h>
22 #include <linux/input.h>
24 #include <linux/omapfb.h>
32 #include <mach/flash.h>
36 #include <mach/hardware.h>
43 #define fsample_cpld_read(reg) __raw_readb(reg)
44 #define fsample_cpld_write(val, reg) __raw_writeb(val, reg)
46 #define FSAMPLE_CPLD_BASE 0xE8100000
47 #define FSAMPLE_CPLD_SIZE SZ_4K
48 #define FSAMPLE_CPLD_START 0x05080000
50 #define FSAMPLE_CPLD_REG_A (FSAMPLE_CPLD_BASE + 0x00)
51 #define FSAMPLE_CPLD_SWITCH (FSAMPLE_CPLD_BASE + 0x02)
52 #define FSAMPLE_CPLD_UART (FSAMPLE_CPLD_BASE + 0x02)
53 #define FSAMPLE_CPLD_REG_B (FSAMPLE_CPLD_BASE + 0x04)
54 #define FSAMPLE_CPLD_VERSION (FSAMPLE_CPLD_BASE + 0x06)
55 #define FSAMPLE_CPLD_SET_CLR (FSAMPLE_CPLD_BASE + 0x06)
57 #define FSAMPLE_CPLD_BIT_BT_RESET 0
58 #define FSAMPLE_CPLD_BIT_LCD_RESET 1
59 #define FSAMPLE_CPLD_BIT_CAM_PWDN 2
60 #define FSAMPLE_CPLD_BIT_CHARGER_ENABLE 3
61 #define FSAMPLE_CPLD_BIT_SD_MMC_EN 4
62 #define FSAMPLE_CPLD_BIT_aGPS_PWREN 5
63 #define FSAMPLE_CPLD_BIT_BACKLIGHT 6
64 #define FSAMPLE_CPLD_BIT_aGPS_EN_RESET 7
65 #define FSAMPLE_CPLD_BIT_aGPS_SLEEPx_N 8
66 #define FSAMPLE_CPLD_BIT_OTG_RESET 9
68 #define fsample_cpld_set(bit) \
69 fsample_cpld_write((((bit) & 15) << 4) | 0x0f, FSAMPLE_CPLD_SET_CLR)
71 #define fsample_cpld_clear(bit) \
72 fsample_cpld_write(0xf0 | ((bit) & 15), FSAMPLE_CPLD_SET_CLR)
74 static const unsigned int fsample_keymap[] = {
111 static struct resource smc91x_resources[] = {
124 static void __init fsample_init_smc91x(
void)
136 .name =
"bootloader",
167 .parts = nor_partitions,
171 static struct resource nor_resource = {
178 .name =
"physmap-flash",
181 .platform_data = &nor_data,
184 .resource = &nor_resource,
187 #define FSAMPLE_NAND_RB_GPIO_PIN 62
189 static int nand_dev_ready(
struct mtd_info *mtd)
202 .dev_ready = nand_dev_ready,
206 static struct resource nand_resource = {
216 .platform_data = &nand_data,
219 .resource = &nand_resource,
226 .platform_data = &smc91x_info,
228 .num_resources =
ARRAY_SIZE(smc91x_resources),
229 .resource = smc91x_resources,
232 static struct resource kp_resources[] = {
241 .keymap = fsample_keymap,
248 .keymap_data = &fsample_keymap_data,
253 .name =
"omap-keypad",
256 .platform_data = &kp_data,
259 .resource = kp_resources,
270 .ctrl_name =
"internal",
273 static void __init omap_fsample_init(
void)
308 fsample_init_smc91x();
338 static struct map_desc omap_fsample_io_desc[] __initdata = {
353 static void __init omap_fsample_map_io(
void)
362 .atag_offset = 0x100,
363 .map_io = omap_fsample_map_io,
367 .init_machine = omap_fsample_init,