ARM: remove struct sys_timer suspend and resume fields
[deliverable/linux.git] / arch / arm / mach-clps711x / board-cdb89712.c
CommitLineData
1da177e4
LT
1/*
2 * linux/arch/arm/mach-clps711x/cdb89712.c
3 *
4 * Copyright (C) 2000-2001 Deep Blue Solutions Ltd
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#include <linux/kernel.h>
21#include <linux/init.h>
22#include <linux/types.h>
23#include <linux/string.h>
24#include <linux/mm.h>
fced80c7 25#include <linux/io.h>
200daa36
AS
26#include <linux/interrupt.h>
27#include <linux/platform_device.h>
1da177e4 28
86449336
AS
29#include <linux/mtd/physmap.h>
30#include <linux/mtd/plat-ram.h>
31#include <linux/mtd/partitions.h>
32
a09e64fb 33#include <mach/hardware.h>
1da177e4
LT
34#include <asm/pgtable.h>
35#include <asm/page.h>
36#include <asm/setup.h>
37#include <asm/mach-types.h>
38#include <asm/mach/arch.h>
39#include <asm/mach/map.h>
40
41#include "common.h"
42
200daa36
AS
43#define CDB89712_CS8900_BASE (CS2_PHYS_BASE + 0x300)
44#define CDB89712_CS8900_IRQ (IRQ_EINT3)
45
46static struct resource cdb89712_cs8900_resource[] __initdata = {
47 DEFINE_RES_MEM(CDB89712_CS8900_BASE, SZ_1K),
48 DEFINE_RES_IRQ(CDB89712_CS8900_IRQ),
1da177e4
LT
49};
50
86449336
AS
51static struct mtd_partition cdb89712_flash_partitions[] __initdata = {
52 {
53 .name = "Flash",
54 .offset = 0,
55 .size = MTDPART_SIZ_FULL,
56 },
57};
58
59static struct physmap_flash_data cdb89712_flash_pdata __initdata = {
60 .width = 4,
61 .probe_type = "map_rom",
62 .parts = cdb89712_flash_partitions,
63 .nr_parts = ARRAY_SIZE(cdb89712_flash_partitions),
64};
65
66static struct resource cdb89712_flash_resources[] __initdata = {
67 DEFINE_RES_MEM(CS0_PHYS_BASE, SZ_8M),
68};
69
70static struct platform_device cdb89712_flash_pdev __initdata = {
71 .name = "physmap-flash",
72 .id = 0,
73 .resource = cdb89712_flash_resources,
74 .num_resources = ARRAY_SIZE(cdb89712_flash_resources),
75 .dev = {
76 .platform_data = &cdb89712_flash_pdata,
77 },
78};
79
80static struct mtd_partition cdb89712_bootrom_partitions[] __initdata = {
81 {
82 .name = "BootROM",
83 .offset = 0,
84 .size = MTDPART_SIZ_FULL,
85 },
86};
87
88static struct physmap_flash_data cdb89712_bootrom_pdata __initdata = {
89 .width = 4,
90 .probe_type = "map_rom",
91 .parts = cdb89712_bootrom_partitions,
92 .nr_parts = ARRAY_SIZE(cdb89712_bootrom_partitions),
93};
94
95static struct resource cdb89712_bootrom_resources[] __initdata = {
96 DEFINE_RES_NAMED(CS7_PHYS_BASE, SZ_128, "BOOTROM", IORESOURCE_MEM |
97 IORESOURCE_CACHEABLE | IORESOURCE_READONLY),
98};
99
100static struct platform_device cdb89712_bootrom_pdev __initdata = {
101 .name = "physmap-flash",
102 .id = 1,
103 .resource = cdb89712_bootrom_resources,
104 .num_resources = ARRAY_SIZE(cdb89712_bootrom_resources),
105 .dev = {
106 .platform_data = &cdb89712_bootrom_pdata,
107 },
108};
109
110static struct platdata_mtd_ram cdb89712_sram_pdata __initdata = {
111 .bankwidth = 4,
112};
113
114static struct resource cdb89712_sram_resources[] __initdata = {
115 DEFINE_RES_MEM(CLPS711X_SRAM_BASE, CLPS711X_SRAM_SIZE),
116};
117
118static struct platform_device cdb89712_sram_pdev __initdata = {
119 .name = "mtd-ram",
120 .id = 0,
121 .resource = cdb89712_sram_resources,
122 .num_resources = ARRAY_SIZE(cdb89712_sram_resources),
123 .dev = {
124 .platform_data = &cdb89712_sram_pdata,
125 },
126};
127
200daa36 128static void __init cdb89712_init(void)
1da177e4 129{
86449336
AS
130 platform_device_register(&cdb89712_flash_pdev);
131 platform_device_register(&cdb89712_bootrom_pdev);
132 platform_device_register(&cdb89712_sram_pdev);
200daa36
AS
133 platform_device_register_simple("cs89x0", 0, cdb89712_cs8900_resource,
134 ARRAY_SIZE(cdb89712_cs8900_resource));
1da177e4
LT
135}
136
137MACHINE_START(CDB89712, "Cirrus-CDB89712")
e9dea0c6 138 /* Maintainer: Ray Lehtiniemi */
6244fa9c 139 .atag_offset = 0x100,
0d8be81c 140 .nr_irqs = CLPS711X_NR_IRQS,
200daa36 141 .map_io = clps711x_map_io,
e9dea0c6 142 .init_irq = clps711x_init_irq,
1da177e4 143 .timer = &clps711x_timer,
200daa36 144 .init_machine = cdb89712_init,
99f04c8f 145 .handle_irq = clps711x_handle_irq,
6c000712 146 .restart = clps711x_restart,
1da177e4 147MACHINE_END
This page took 0.605029 seconds and 5 git commands to generate.