2 * linux/arch/arm/mach-nomadik/board-8815nhk.c
4 * Copyright (C) STMicroelectronics
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2, as
8 * published by the Free Software Foundation.
10 * NHK15 board specifc driver definition
12 #include <linux/types.h>
13 #include <linux/kernel.h>
14 #include <linux/init.h>
15 #include <linux/platform_device.h>
16 #include <linux/amba/bus.h>
17 #include <asm/mach-types.h>
18 #include <asm/mach/arch.h>
19 #include <asm/mach/irq.h>
20 #include <mach/setup.h>
23 #define __MEM_4K_RESOURCE(x) \
24 .res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM}
26 static struct amba_device uart0_device = {
27 .dev = { .init_name = "uart0" },
28 __MEM_4K_RESOURCE(NOMADIK_UART0_BASE),
29 .irq = {IRQ_UART0, NO_IRQ},
32 static struct amba_device uart1_device = {
33 .dev = { .init_name = "uart1" },
34 __MEM_4K_RESOURCE(NOMADIK_UART1_BASE),
35 .irq = {IRQ_UART1, NO_IRQ},
38 static struct amba_device *amba_devs[] __initdata = {
43 /* We have a fixed clock alone, by now */
44 static struct clk nhk8815_clk_48 = {
48 static struct platform_device *nhk8815_platform_devices[] __initdata = {
49 /* currently empty, will add keypad, touchscreen etc */
52 static void __init nhk8815_platform_init(void)
56 cpu8815_platform_init();
57 platform_add_devices(nhk8815_platform_devices,
58 ARRAY_SIZE(nhk8815_platform_devices));
60 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
61 nmdk_clk_create(&nhk8815_clk_48, amba_devs[i]->dev.init_name);
62 amba_device_register(amba_devs[i], &iomem_resource);
66 MACHINE_START(NOMADIK, "NHK8815")
67 /* Maintainer: ST MicroElectronics */
68 .phys_io = NOMADIK_UART0_BASE,
69 .io_pg_offst = (IO_ADDRESS(NOMADIK_UART0_BASE) >> 18) & 0xfffc,
71 .map_io = cpu8815_map_io,
72 .init_irq = cpu8815_init_irq,
73 .timer = &nomadik_timer,
74 .init_machine = nhk8815_platform_init,