2 * linux/arch/arm/mach-omap2/board-n8x0.c
4 * Copyright (C) 2005-2009 Nokia Corporation
5 * Author: Juha Yrjola <juha.yrjola@nokia.com>
7 * Modified from mach-omap2/board-generic.c
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
14 #include <linux/clk.h>
15 #include <linux/delay.h>
16 #include <linux/gpio.h>
17 #include <linux/init.h>
19 #include <linux/stddef.h>
20 #include <linux/spi/spi.h>
21 #include <linux/usb/musb.h>
23 #include <asm/mach/arch.h>
24 #include <asm/mach-types.h>
26 #include <plat/board.h>
27 #include <plat/common.h>
28 #include <mach/irqs.h>
29 #include <plat/mcspi.h>
30 #include <plat/onenand.h>
31 #include <plat/serial.h>
33 static struct omap2_mcspi_device_config p54spi_mcspi_config
= {
38 static struct spi_board_info n800_spi_board_info
[] __initdata
= {
43 .max_speed_hz
= 48000000,
44 .controller_data
= &p54spi_mcspi_config
,
48 #if defined(CONFIG_MTD_ONENAND_OMAP2) || \
49 defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
51 static struct mtd_partition onenand_partitions
[] = {
56 .mask_flags
= MTD_WRITEABLE
, /* Force read-only */
60 .offset
= MTDPART_OFS_APPEND
,
65 .offset
= MTDPART_OFS_APPEND
,
70 .offset
= MTDPART_OFS_APPEND
,
75 .offset
= MTDPART_OFS_APPEND
,
76 .size
= MTDPART_SIZ_FULL
,
80 static struct omap_onenand_platform_data board_onenand_data
= {
83 .parts
= onenand_partitions
,
84 .nr_parts
= ARRAY_SIZE(onenand_partitions
),
85 .flags
= ONENAND_SYNC_READ
,
88 static void __init
n8x0_onenand_init(void)
90 gpmc_onenand_init(&board_onenand_data
);
95 static void __init
n8x0_onenand_init(void) {}
99 static void __init
n8x0_map_io(void)
101 omap2_set_globals_242x();
102 omap2_map_common_io();
105 static void __init
n8x0_init_irq(void)
107 omap2_init_common_hw(NULL
, NULL
);
112 static void __init
n8x0_init_machine(void)
114 /* FIXME: add n810 spi devices */
115 spi_register_board_info(n800_spi_board_info
,
116 ARRAY_SIZE(n800_spi_board_info
));
122 MACHINE_START(NOKIA_N800
, "Nokia N800")
123 .phys_io
= 0x48000000,
124 .io_pg_offst
= ((0xfa000000) >> 18) & 0xfffc,
125 .boot_params
= 0x80000100,
126 .map_io
= n8x0_map_io
,
127 .init_irq
= n8x0_init_irq
,
128 .init_machine
= n8x0_init_machine
,
129 .timer
= &omap_timer
,
132 MACHINE_START(NOKIA_N810
, "Nokia N810")
133 .phys_io
= 0x48000000,
134 .io_pg_offst
= ((0xfa000000) >> 18) & 0xfffc,
135 .boot_params
= 0x80000100,
136 .map_io
= n8x0_map_io
,
137 .init_irq
= n8x0_init_irq
,
138 .init_machine
= n8x0_init_machine
,
139 .timer
= &omap_timer
,
142 MACHINE_START(NOKIA_N810_WIMAX
, "Nokia N810 WiMAX")
143 .phys_io
= 0x48000000,
144 .io_pg_offst
= ((0xfa000000) >> 18) & 0xfffc,
145 .boot_params
= 0x80000100,
146 .map_io
= n8x0_map_io
,
147 .init_irq
= n8x0_init_irq
,
148 .init_machine
= n8x0_init_machine
,
149 .timer
= &omap_timer
,