2 * linux/arch/arm/mach-clps711x/guide-a07.c
4 * Copyright (C) 2003 Iders Incorporated
5 * Copyright (C) 2000-2001 Deep Blue Solutions Ltd
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include <linux/init.h>
22 #include <linux/types.h>
23 #include <linux/string.h>
24 #include <linux/sched.h>
26 #include <linux/config.h>
28 #include <asm/hardware.h>
30 #include <asm/pgtable.h>
32 #include <asm/setup.h>
33 #include <asm/mach-types.h>
34 #include <asm/mach/arch.h>
35 #include <asm/mach/map.h>
37 extern void clps711x_init_irq(void);
38 extern void clps711x_map_io(void);
40 #ifndef CONFIG_I2C_GUIDE
41 #error Config error - The Guide A07 requires I2C Guide GPIO support. Please enable it.
45 * Map the CS89712 Ethernet port. That should be moved to the
46 * ethernet driver, perhaps.
47 * also map the Guide FPGA and persistance locations
49 static struct map_desc guide_a07_io_desc[] __initdata = {
50 { ETHER_BASE, ETHER_START, ETHER_SIZE,
51 DOMAIN_IO, 0, 1, 0, 0 },
52 { GD_A07_FPGA_BASE, GD_A07_FPGA_START, GD_A07_FPGA_SIZE,
53 DOMAIN_IO, 0, 1, 0, 0 },
54 { GD_A07_PERSISTANCE_BASE, GD_A07_PERSISTANCE_START, GD_A07_PERSISTANCE_SIZE,
55 DOMAIN_IO, 0, 1, 0, 0 },
60 fixup_guide_a07(struct machine_desc *desc, struct param_struct *params,
61 char **cmdline, struct meminfo *mi)
65 static void __init guide_a07_map_io(void)
68 iotable_init(guide_a07_io_desc);
71 MACHINE_START(GUIDEA07, "Guide A07 (cs89712 core)")
72 MAINTAINER("Cam Mayor")
73 VIDEO(0x60000000, 0x6000bfff)
74 BOOT_MEM(0xc0000000, 0x80000000, 0xff000000)
75 BOOT_PARAMS(0xc0000100)
76 FIXUP(fixup_guide_a07)
77 MAPIO(guide_a07_map_io)
78 INITIRQ(clps711x_init_irq)
81 static int guide_a07_hw_init(void)
83 /* in cs[1] (the FPGA), set zero wait states, clkenb, and sqaen */
84 u32 memcfg1 = 0xfc << 8;
85 memcfg1 |= clps_readl(MEMCFG1);
86 clps_writel(memcfg1, MEMCFG1);
91 __initcall(guide_a07_hw_init);