MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git] / arch / arm / mach-pxa / idp.c
blob6f8b4873e788ca6eda4bf1523b1e5c4186b9daeb
1 /*
2 * linux/arch/arm/mach-pxa/idp.c
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
8 * Copyright (c) 2001 Cliff Brake, Accelent Systems Inc.
10 * 2001-09-13: Cliff Brake <cbrake@accelent.com>
11 * Initial code
13 * Expected command line: mem=32M initrd=0xa1000000,4M root=/dev/ram ramdisk=8192
15 #include <linux/kernel.h>
16 #include <linux/init.h>
17 #include <linux/major.h>
18 #include <linux/fs.h>
19 #include <linux/interrupt.h>
21 #include <asm/setup.h>
22 #include <asm/memory.h>
23 #include <asm/mach-types.h>
24 #include <asm/hardware.h>
25 #include <asm/irq.h>
27 #include <asm/mach/arch.h>
28 #include <asm/mach/map.h>
30 #include <asm/arch/pxa-regs.h>
31 #include <asm/arch/idp.h>
33 #include "generic.h"
35 #ifndef PXA_IDP_REV02
36 /* shadow registers for write only registers */
37 unsigned int idp_cpld_led_control_shadow = 0x1;
38 unsigned int idp_cpld_periph_pwr_shadow = 0xd;
39 unsigned int ipd_cpld_cir_shadow = 0;
40 unsigned int idp_cpld_kb_col_high_shadow = 0;
41 unsigned int idp_cpld_kb_col_low_shadow = 0;
42 unsigned int idp_cpld_pccard_en_shadow = 0xC3;
43 unsigned int idp_cpld_gpioh_dir_shadow = 0;
44 unsigned int idp_cpld_gpioh_value_shadow = 0;
45 unsigned int idp_cpld_gpiol_dir_shadow = 0;
46 unsigned int idp_cpld_gpiol_value_shadow = 0;
49 * enable all LCD signals -- they should still be on
50 * write protect flash
51 * enable all serial port transceivers
54 unsigned int idp_control_port_shadow = ((0x7 << 21) | /* LCD power */
55 (0x1 << 19) | /* disable flash write enable */
56 (0x7 << 9)); /* enable serial port transeivers */
58 #endif
60 static void __init idp_init(void)
62 printk("idp_init()\n");
65 static void __init idp_init_irq(void)
67 pxa_init_irq();
70 static struct map_desc idp_io_desc[] __initdata = {
71 /* virtual physical length type */
74 #ifndef PXA_IDP_REV02
75 { IDP_CTRL_PORT_BASE,
76 IDP_CTRL_PORT_PHYS,
77 IDP_CTRL_PORT_SIZE,
78 MT_DEVICE },
79 #endif
81 { IDP_IDE_BASE,
82 IDP_IDE_PHYS,
83 IDP_IDE_SIZE,
84 MT_DEVICE },
85 { IDP_ETH_BASE,
86 IDP_ETH_PHYS,
87 IDP_ETH_SIZE,
88 MT_DEVICE },
89 { IDP_COREVOLT_BASE,
90 IDP_COREVOLT_PHYS,
91 IDP_COREVOLT_SIZE,
92 MT_DEVICE },
93 { IDP_CPLD_BASE,
94 IDP_CPLD_PHYS,
95 IDP_CPLD_SIZE,
96 MT_DEVICE }
99 static void __init idp_map_io(void)
101 pxa_map_io();
102 iotable_init(idp_io_desc, ARRAY_SIZE(idp_io_desc));
104 set_irq_type(TOUCH_PANEL_IRQ, TOUCH_PANEL_IRQ_EDGE);
106 // serial ports 2 & 3
107 pxa_gpio_mode(GPIO42_BTRXD_MD);
108 pxa_gpio_mode(GPIO43_BTTXD_MD);
109 pxa_gpio_mode(GPIO44_BTCTS_MD);
110 pxa_gpio_mode(GPIO45_BTRTS_MD);
111 pxa_gpio_mode(GPIO46_STRXD_MD);
112 pxa_gpio_mode(GPIO47_STTXD_MD);
117 MACHINE_START(PXA_IDP, "Accelent Xscale IDP")
118 MAINTAINER("Accelent Systems Inc.")
119 BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
120 MAPIO(idp_map_io)
121 INITIRQ(idp_init_irq)
122 INITTIME(pxa_init_time)
123 INIT_MACHINE(idp_init)
124 MACHINE_END