diff options
Diffstat (limited to 'arch/arm/mach-omap1/board-fsample.c')
-rw-r--r-- | arch/arm/mach-omap1/board-fsample.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index 30308294e7c1..19e0e9232336 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c | |||
@@ -34,7 +34,39 @@ | |||
34 | #include <mach/keypad.h> | 34 | #include <mach/keypad.h> |
35 | #include <mach/common.h> | 35 | #include <mach/common.h> |
36 | #include <mach/board.h> | 36 | #include <mach/board.h> |
37 | #include <mach/board-fsample.h> | 37 | |
38 | /* fsample is pretty close to p2-sample */ | ||
39 | |||
40 | #define fsample_cpld_read(reg) __raw_readb(reg) | ||
41 | #define fsample_cpld_write(val, reg) __raw_writeb(val, reg) | ||
42 | |||
43 | #define FSAMPLE_CPLD_BASE 0xE8100000 | ||
44 | #define FSAMPLE_CPLD_SIZE SZ_4K | ||
45 | #define FSAMPLE_CPLD_START 0x05080000 | ||
46 | |||
47 | #define FSAMPLE_CPLD_REG_A (FSAMPLE_CPLD_BASE + 0x00) | ||
48 | #define FSAMPLE_CPLD_SWITCH (FSAMPLE_CPLD_BASE + 0x02) | ||
49 | #define FSAMPLE_CPLD_UART (FSAMPLE_CPLD_BASE + 0x02) | ||
50 | #define FSAMPLE_CPLD_REG_B (FSAMPLE_CPLD_BASE + 0x04) | ||
51 | #define FSAMPLE_CPLD_VERSION (FSAMPLE_CPLD_BASE + 0x06) | ||
52 | #define FSAMPLE_CPLD_SET_CLR (FSAMPLE_CPLD_BASE + 0x06) | ||
53 | |||
54 | #define FSAMPLE_CPLD_BIT_BT_RESET 0 | ||
55 | #define FSAMPLE_CPLD_BIT_LCD_RESET 1 | ||
56 | #define FSAMPLE_CPLD_BIT_CAM_PWDN 2 | ||
57 | #define FSAMPLE_CPLD_BIT_CHARGER_ENABLE 3 | ||
58 | #define FSAMPLE_CPLD_BIT_SD_MMC_EN 4 | ||
59 | #define FSAMPLE_CPLD_BIT_aGPS_PWREN 5 | ||
60 | #define FSAMPLE_CPLD_BIT_BACKLIGHT 6 | ||
61 | #define FSAMPLE_CPLD_BIT_aGPS_EN_RESET 7 | ||
62 | #define FSAMPLE_CPLD_BIT_aGPS_SLEEPx_N 8 | ||
63 | #define FSAMPLE_CPLD_BIT_OTG_RESET 9 | ||
64 | |||
65 | #define fsample_cpld_set(bit) \ | ||
66 | fsample_cpld_write((((bit) & 15) << 4) | 0x0f, FSAMPLE_CPLD_SET_CLR) | ||
67 | |||
68 | #define fsample_cpld_clear(bit) \ | ||
69 | fsample_cpld_write(0xf0 | ((bit) & 15), FSAMPLE_CPLD_SET_CLR) | ||
38 | 70 | ||
39 | static int fsample_keymap[] = { | 71 | static int fsample_keymap[] = { |
40 | KEY(0,0,KEY_UP), | 72 | KEY(0,0,KEY_UP), |