1 /* arch/arm/mach-rk29/board-rk29.c
\r
3 * Copyright (C) 2010 ROCKCHIP, Inc.
\r
5 * This software is licensed under the terms of the GNU General Public
\r
6 * License version 2, as published by the Free Software Foundation, and
\r
7 * may be copied, distributed, and modified under those terms.
\r
9 * This program is distributed in the hope that it will be useful,
\r
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
12 * GNU General Public License for more details.
\r
16 #include <linux/kernel.h>
\r
17 #include <linux/init.h>
\r
18 #include <linux/platform_device.h>
\r
19 #include <linux/input.h>
\r
20 #include <linux/io.h>
\r
21 #include <linux/delay.h>
\r
22 #include <linux/i2c.h>
\r
23 #include <linux/spi/spi.h>
\r
24 #include <linux/mmc/host.h>
\r
26 #include <mach/hardware.h>
\r
27 #include <asm/mach-types.h>
\r
28 #include <asm/mach/arch.h>
\r
29 #include <asm/mach/map.h>
\r
30 #include <asm/mach/flash.h>
\r
31 #include <asm/hardware/gic.h>
\r
33 #include <mach/irqs.h>
\r
34 #include <mach/rk29_iomap.h>
\r
35 #include <mach/board.h>
\r
38 #include <linux/mtd/nand.h>
\r
39 #include <linux/mtd/partitions.h>
\r
41 #include "devices.h"
\r
43 extern struct sys_timer rk29_timer;
\r
45 static struct platform_device *devices[] __initdata = {
\r
46 #ifdef CONFIG_UART1_RK29
\r
52 static void __init rk29_gic_init_irq(void)
\r
54 gic_dist_init(0, (void __iomem *)RK29_GICPERI_BASE, 32);
\r
55 gic_cpu_init(0, (void __iomem *)RK29_GICCPU_BASE);
\r
58 static void __init machine_rk29_init_irq(void)
\r
60 rk29_gic_init_irq();
\r
61 //rk29_gpio_init(rk29_gpioBank, 8);
\r
62 //rk29_gpio_irq_setup();
\r
64 static void __init machine_rk29_board_init(void)
\r
66 platform_add_devices(devices, ARRAY_SIZE(devices));
\r
69 static void __init machine_rk29_mapio(void)
\r
71 rk29_map_common_io();
\r
72 //rk29_clock_init();
\r
73 //rk29_iomux_init();
\r
76 MACHINE_START(RK29, "RK29board")
\r
78 /* UART for LL DEBUG */
\r
79 .phys_io = RK29_UART1_PHYS,
\r
80 .io_pg_offst = ((RK29_UART1_BASE) >> 18) & 0xfffc,
\r
81 .boot_params = RK29_SDRAM_PHYS + 0x88000,
\r
82 .map_io = machine_rk29_mapio,
\r
83 .init_irq = machine_rk29_init_irq,
\r
84 .init_machine = machine_rk29_board_init,
\r
85 .timer = &rk29_timer,
\r