hh.org updates
[hh.org.git] / arch / arm / mach-pxa / aximx30 / aximx30_core_minimal.c
blob3c596a25e8790ffd84395f9886e86915c114d1ed
1 /*
2 * Machine initialization for Dell Axim X3
4 * Authors: Andrew Zabolotny <zap@homelink.ru>
6 * For now this is mostly a placeholder file; since I don't own an Axim X3
7 * it is supposed the project to be overtaken by somebody else. The code
8 * in here is *supposed* to work so that you can at least boot to the command
9 * line, but there is no guarantee.
11 * This file is subject to the terms and conditions of the GNU General Public
12 * License. See the file COPYING in the main directory of this archive for
13 * more details.
16 #include <linux/module.h>
17 #include <linux/init.h>
18 #include <linux/notifier.h>
20 #include <asm/setup.h>
21 #include <asm/mach/arch.h>
22 #include <asm/mach/map.h>
23 #include <asm/mach-types.h>
24 #include <asm/io.h>
25 #include <asm/hardware.h>
26 #include <asm/arch/irqs.h>
28 #include <asm/arch/aximx30-init.h>
29 #include <asm/arch/aximx30-gpio.h>
31 #include "../generic.h"
34 static void __init x30_init_irq (void)
36 /* Initialize standard IRQs */
37 pxa_init_irq();
39 // @@@ todo
40 // set_irq_type (IRQ_GPIO(GPIO_NR_AXIMX3_CABEL_RDY_N), IRQT_BOTHEDGE);
41 // setup_irq (IRQ_GPIO(GPIO_NR_AXIMX3_CABEL_RDY_N), &aximx3_charge_irq);
42 // set_irq_type (IRQ_GPIO(GPIO_NR_AXIMX3_BATTERY_LATCH_N), IRQT_BOTHEDGE);
43 // setup_irq (IRQ_GPIO(GPIO_NR_AXIMX3_BATTERY_LATCH_N), &aximx3_charge_irq);
44 // set_irq_type (IRQ_GPIO(GPIO_NR_AXIMX3_CHARGING_N), IRQT_BOTHEDGE);
45 // setup_irq (IRQ_GPIO(GPIO_NR_AXIMX3_CHARGING_N), &aximx3_charge_irq);
48 static void __init x30_map_io(void)
50 pxa_map_io();
52 #if 0
53 /* Configure power management stuff. */
54 PGSR0 = GPSRx_SleepValue;
55 PGSR1 = GPSRy_SleepValue;
56 PGSR2 = GPSRz_SleepValue;
58 /* Wake up on CF/SD card insertion, Power and Record buttons,
59 AC adapter plug/unplug */
60 PWER = PWER_GPIO0 | PWER_GPIO6 | PWER_GPIO7 | PWER_GPIO10
61 | PWER_RTC | PWER_GPIO4;
62 PFER = PWER_GPIO0 | PWER_GPIO4 | PWER_RTC;
63 PRER = PWER_GPIO4 | PWER_GPIO10;
64 PCFR = PCFR_OPDE;
66 /* Set up GPIO direction and alternate function registers */
67 GAFR0_L = GAFR0x_InitValue;
68 GAFR0_U = GAFR1x_InitValue;
69 GAFR1_L = GAFR0y_InitValue;
70 GAFR1_U = GAFR1y_InitValue;
71 GAFR2_L = GAFR0z_InitValue;
72 GAFR2_U = GAFR1z_InitValue;
74 GPDR0 = GPDRx_InitValue;
75 GPDR1 = GPDRy_InitValue;
76 GPDR2 = GPDRz_InitValue;
77 #endif
79 // GPCR0 = 0x0fffffff; /* All outputs are set low by default */
82 static void __init x30_init (void)
84 /* nothing to do here now */
87 MACHINE_START(X30, "Dell Axim X30")
88 MAINTAINER("Giusepe Zompatori <giuseppe_zompatori@yahoo.it>")
89 BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
90 BOOT_PARAMS(0xa0000100)
91 MAPIO(x30_map_io)
92 INITIRQ(x30_init_irq)
93 .init_machine = x30_init,
94 MACHINE_END