aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/board-evm.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-12 21:11:33 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-12 21:11:33 -0400
commitf7d02ae76ebbf5b8a9531fe150c49e126a397704 (patch)
treebcfdcab6e70658d55a3c843694e04e938bf9168f /arch/arm/mach-davinci/board-evm.c
parent78db2ad6f4df9145bfd6aab1c0f1c56d615288ec (diff)
parent158304ef09a28c7f2dd37d78f536a4e09ba084a1 (diff)
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (30 commits) [ARM] Use new get_irqnr_preamble [ARM] Ensure machine class menu is sorted alphabetically [ARM] 4333/2: KS8695: Micrel Development board [ARM] 4332/2: KS8695: Serial driver [ARM] 4331/3: Support for Micrel/Kendin KS8695 processor [ARM] 4371/1: AT91: Support for Atmel AT91SAM9RL-EK development board [ARM] 4372/1: Define byte sizes in asm-arm/sizes.h [ARM] 4370/3: AT91: Support for Atmel AT91SAM9RL processors. [ARM] Update mach-types [ARM] export symbol csum_partial_copy_from_user [ARM] iop13xx: msi support [ARM] stacktrace fix [ARM] Spinlock initializer cleanup [ARM] remove useless config option GENERIC_BUST_SPINLOCK [ARM] 4303/3: base kernel support for TI DaVinci [ARM] 4369/1: AT91: Fix circular dependency in header files [ARM] 4368/1: S3C24xx: build fix [ARM] 4364/1: AT91: LEDS on AT91SAM9261-EK [ARM] Fix iop32x/iop33x build [ARM] EBSA110: fix build errors caused by missing "const" ...
Diffstat (limited to 'arch/arm/mach-davinci/board-evm.c')
-rw-r--r--arch/arm/mach-davinci/board-evm.c131
1 files changed, 131 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/board-evm.c b/arch/arm/mach-davinci/board-evm.c
new file mode 100644
index 000000000000..633c12e43044
--- /dev/null
+++ b/arch/arm/mach-davinci/board-evm.c
@@ -0,0 +1,131 @@
1/*
2 * TI DaVinci EVM board support
3 *
4 * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
5 *
6 * 2007 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11#include <linux/kernel.h>
12#include <linux/module.h>
13#include <linux/init.h>
14#include <linux/dma-mapping.h>
15#include <linux/platform_device.h>
16#include <linux/mtd/mtd.h>
17#include <linux/mtd/partitions.h>
18#include <linux/mtd/physmap.h>
19
20#include <asm/setup.h>
21#include <asm/io.h>
22#include <asm/mach-types.h>
23#include <asm/hardware.h>
24
25#include <asm/mach/arch.h>
26#include <asm/mach/map.h>
27#include <asm/mach/flash.h>
28
29#include <asm/arch/common.h>
30
31/* other misc. init functions */
32void __init davinci_psc_init(void);
33void __init davinci_irq_init(void);
34void __init davinci_map_common_io(void);
35
36/* NOR Flash base address set to CS0 by default */
37#define NOR_FLASH_PHYS 0x02000000
38
39static struct mtd_partition davinci_evm_partitions[] = {
40 /* bootloader (U-Boot, etc) in first 4 sectors */
41 {
42 .name = "bootloader",
43 .offset = 0,
44 .size = 4 * SZ_64K,
45 .mask_flags = MTD_WRITEABLE, /* force read-only */
46 },
47 /* bootloader params in the next 1 sectors */
48 {
49 .name = "params",
50 .offset = MTDPART_OFS_APPEND,
51 .size = SZ_64K,
52 .mask_flags = 0,
53 },
54 /* kernel */
55 {
56 .name = "kernel",
57 .offset = MTDPART_OFS_APPEND,
58 .size = SZ_2M,
59 .mask_flags = 0
60 },
61 /* file system */
62 {
63 .name = "filesystem",
64 .offset = MTDPART_OFS_APPEND,
65 .size = MTDPART_SIZ_FULL,
66 .mask_flags = 0
67 }
68};
69
70static struct physmap_flash_data davinci_evm_flash_data = {
71 .width = 2,
72 .parts = davinci_evm_partitions,
73 .nr_parts = ARRAY_SIZE(davinci_evm_partitions),
74};
75
76/* NOTE: CFI probe will correctly detect flash part as 32M, but EMIF
77 * limits addresses to 16M, so using addresses past 16M will wrap */
78static struct resource davinci_evm_flash_resource = {
79 .start = NOR_FLASH_PHYS,
80 .end = NOR_FLASH_PHYS + SZ_16M - 1,
81 .flags = IORESOURCE_MEM,
82};
83
84static struct platform_device davinci_evm_flash_device = {
85 .name = "physmap-flash",
86 .id = 0,
87 .dev = {
88 .platform_data = &davinci_evm_flash_data,
89 },
90 .num_resources = 1,
91 .resource = &davinci_evm_flash_resource,
92};
93
94static struct platform_device *davinci_evm_devices[] __initdata = {
95 &davinci_evm_flash_device,
96};
97
98static void __init
99davinci_evm_map_io(void)
100{
101 davinci_map_common_io();
102}
103
104static __init void davinci_evm_init(void)
105{
106 davinci_psc_init();
107
108#if defined(CONFIG_BLK_DEV_DAVINCI) || defined(CONFIG_BLK_DEV_DAVINCI_MODULE)
109 printk(KERN_WARNING "WARNING: both IDE and NOR flash are enabled, "
110 "but share pins.\n\t Disable IDE for NOR support.\n");
111#endif
112
113 platform_add_devices(davinci_evm_devices,
114 ARRAY_SIZE(davinci_evm_devices));
115}
116
117static __init void davinci_evm_irq_init(void)
118{
119 davinci_irq_init();
120}
121
122MACHINE_START(DAVINCI_EVM, "DaVinci EVM")
123 /* Maintainer: MontaVista Software <source@mvista.com> */
124 .phys_io = IO_PHYS,
125 .io_pg_offst = (io_p2v(IO_PHYS) >> 18) & 0xfffc,
126 .boot_params = (DAVINCI_DDR_BASE + 0x100),
127 .map_io = davinci_evm_map_io,
128 .init_irq = davinci_evm_irq_init,
129 .timer = &davinci_timer,
130 .init_machine = davinci_evm_init,
131MACHINE_END