diff options
author | Tony Lindgren <tony@atomide.com> | 2011-10-05 18:14:02 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-10-19 19:34:10 -0400 |
commit | 7b88e62f5d219a86d81bdf4388012c97dc42e8f8 (patch) | |
tree | 174143f866565578b15b3fc368b23e906a878a55 /arch/arm/mach-omap1/board-nokia770.c | |
parent | 3ae3e253db7385238dd9d6c67c085afa3e770a56 (diff) |
ARM: OMAP1: Use generic map_io, init_early and init_irq
This allows removing omap hacks for map_io allowing generic
map_io.
Note that in the future we can't do cpu_is_omapxxxx detection
until in init_early. This means that board-innovator.c now
assumes 15xx only, and board-generic.c assumes 16xx only.
This is best fixed later on by passing the SoC type from
device tree.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1/board-nokia770.c')
-rw-r--r-- | arch/arm/mach-omap1/board-nokia770.c | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index 5469ce247ffe..9b348b6ee3ee 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c | |||
@@ -39,21 +39,6 @@ | |||
39 | 39 | ||
40 | #define ADS7846_PENDOWN_GPIO 15 | 40 | #define ADS7846_PENDOWN_GPIO 15 |
41 | 41 | ||
42 | static void __init omap_nokia770_init_irq(void) | ||
43 | { | ||
44 | /* On Nokia 770, the SleepX signal is masked with an | ||
45 | * MPUIO line by default. It has to be unmasked for it | ||
46 | * to become functional */ | ||
47 | |||
48 | /* SleepX mask direction */ | ||
49 | omap_writew((omap_readw(0xfffb5008) & ~2), 0xfffb5008); | ||
50 | /* Unmask SleepX signal */ | ||
51 | omap_writew((omap_readw(0xfffb5004) & ~2), 0xfffb5004); | ||
52 | |||
53 | omap1_init_common_hw(); | ||
54 | omap1_init_irq(); | ||
55 | } | ||
56 | |||
57 | static const unsigned int nokia770_keymap[] = { | 42 | static const unsigned int nokia770_keymap[] = { |
58 | KEY(1, 0, GROUP_0 | KEY_UP), | 43 | KEY(1, 0, GROUP_0 | KEY_UP), |
59 | KEY(2, 0, GROUP_1 | KEY_F5), | 44 | KEY(2, 0, GROUP_1 | KEY_F5), |
@@ -246,6 +231,15 @@ static inline void nokia770_mmc_init(void) | |||
246 | 231 | ||
247 | static void __init omap_nokia770_init(void) | 232 | static void __init omap_nokia770_init(void) |
248 | { | 233 | { |
234 | /* On Nokia 770, the SleepX signal is masked with an | ||
235 | * MPUIO line by default. It has to be unmasked for it | ||
236 | * to become functional */ | ||
237 | |||
238 | /* SleepX mask direction */ | ||
239 | omap_writew((omap_readw(0xfffb5008) & ~2), 0xfffb5008); | ||
240 | /* Unmask SleepX signal */ | ||
241 | omap_writew((omap_readw(0xfffb5004) & ~2), 0xfffb5004); | ||
242 | |||
249 | platform_add_devices(nokia770_devices, ARRAY_SIZE(nokia770_devices)); | 243 | platform_add_devices(nokia770_devices, ARRAY_SIZE(nokia770_devices)); |
250 | spi_register_board_info(nokia770_spi_board_info, | 244 | spi_register_board_info(nokia770_spi_board_info, |
251 | ARRAY_SIZE(nokia770_spi_board_info)); | 245 | ARRAY_SIZE(nokia770_spi_board_info)); |
@@ -258,16 +252,12 @@ static void __init omap_nokia770_init(void) | |||
258 | nokia770_mmc_init(); | 252 | nokia770_mmc_init(); |
259 | } | 253 | } |
260 | 254 | ||
261 | static void __init omap_nokia770_map_io(void) | ||
262 | { | ||
263 | omap1_map_common_io(); | ||
264 | } | ||
265 | |||
266 | MACHINE_START(NOKIA770, "Nokia 770") | 255 | MACHINE_START(NOKIA770, "Nokia 770") |
267 | .boot_params = 0x10000100, | 256 | .boot_params = 0x10000100, |
268 | .map_io = omap_nokia770_map_io, | 257 | .map_io = omap16xx_map_io, |
258 | .init_early = omap1_init_early, | ||
269 | .reserve = omap_reserve, | 259 | .reserve = omap_reserve, |
270 | .init_irq = omap_nokia770_init_irq, | 260 | .init_irq = omap1_init_irq, |
271 | .init_machine = omap_nokia770_init, | 261 | .init_machine = omap_nokia770_init, |
272 | .timer = &omap1_timer, | 262 | .timer = &omap1_timer, |
273 | MACHINE_END | 263 | MACHINE_END |