metag: perf: don't reset TXTACTCYC
[linux-2.6.git] / arch / arm / mach-clps711x / board-cdb89712.c
blobbaab7da33c9b62b1351d43ae9be6e953c8fb7446
1 /*
2 * linux/arch/arm/mach-clps711x/cdb89712.c
4 * Copyright (C) 2000-2001 Deep Blue Solutions Ltd
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.
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.
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
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>
25 #include <linux/io.h>
26 #include <linux/interrupt.h>
27 #include <linux/platform_device.h>
29 #include <linux/mtd/physmap.h>
30 #include <linux/mtd/plat-ram.h>
31 #include <linux/mtd/partitions.h>
33 #include <mach/hardware.h>
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>
41 #include "common.h"
43 #define CDB89712_CS8900_BASE (CS2_PHYS_BASE + 0x300)
44 #define CDB89712_CS8900_IRQ (IRQ_EINT3)
46 static struct resource cdb89712_cs8900_resource[] __initdata = {
47 DEFINE_RES_MEM(CDB89712_CS8900_BASE, SZ_1K),
48 DEFINE_RES_IRQ(CDB89712_CS8900_IRQ),
51 static struct mtd_partition cdb89712_flash_partitions[] __initdata = {
53 .name = "Flash",
54 .offset = 0,
55 .size = MTDPART_SIZ_FULL,
59 static 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),
66 static struct resource cdb89712_flash_resources[] __initdata = {
67 DEFINE_RES_MEM(CS0_PHYS_BASE, SZ_8M),
70 static 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,
80 static struct mtd_partition cdb89712_bootrom_partitions[] __initdata = {
82 .name = "BootROM",
83 .offset = 0,
84 .size = MTDPART_SIZ_FULL,
88 static 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),
95 static struct resource cdb89712_bootrom_resources[] __initdata = {
96 DEFINE_RES_NAMED(CS7_PHYS_BASE, SZ_128, "BOOTROM", IORESOURCE_MEM |
97 IORESOURCE_CACHEABLE | IORESOURCE_READONLY),
100 static 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,
110 static struct platdata_mtd_ram cdb89712_sram_pdata __initdata = {
111 .bankwidth = 4,
114 static struct resource cdb89712_sram_resources[] __initdata = {
115 DEFINE_RES_MEM(CLPS711X_SRAM_BASE, CLPS711X_SRAM_SIZE),
118 static 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,
128 static void __init cdb89712_init(void)
130 platform_device_register(&cdb89712_flash_pdev);
131 platform_device_register(&cdb89712_bootrom_pdev);
132 platform_device_register(&cdb89712_sram_pdev);
133 platform_device_register_simple("cs89x0", 0, cdb89712_cs8900_resource,
134 ARRAY_SIZE(cdb89712_cs8900_resource));
137 MACHINE_START(CDB89712, "Cirrus-CDB89712")
138 /* Maintainer: Ray Lehtiniemi */
139 .atag_offset = 0x100,
140 .nr_irqs = CLPS711X_NR_IRQS,
141 .map_io = clps711x_map_io,
142 .init_irq = clps711x_init_irq,
143 .init_time = clps711x_timer_init,
144 .init_machine = cdb89712_init,
145 .handle_irq = clps711x_handle_irq,
146 .restart = clps711x_restart,
147 MACHINE_END