Merge branch 'bkl/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic...
[sfrench/cifs-2.6.git] / arch / arm / mach-ux500 / cpu-db5500.c
1 /*
2  * Copyright (C) ST-Ericsson SA 2010
3  *
4  * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
5  * License terms: GNU General Public License (GPL) version 2
6  */
7
8 #include <linux/platform_device.h>
9 #include <linux/amba/bus.h>
10 #include <linux/io.h>
11
12 #include <asm/mach/map.h>
13
14 #include <mach/hardware.h>
15 #include <mach/devices.h>
16 #include <mach/setup.h>
17
18 static struct map_desc u5500_io_desc[] __initdata = {
19         __IO_DEV_DESC(U5500_GPIO0_BASE, SZ_4K),
20         __IO_DEV_DESC(U5500_GPIO1_BASE, SZ_4K),
21         __IO_DEV_DESC(U5500_GPIO2_BASE, SZ_4K),
22         __IO_DEV_DESC(U5500_GPIO3_BASE, SZ_4K),
23         __IO_DEV_DESC(U5500_GPIO4_BASE, SZ_4K),
24         __IO_DEV_DESC(U5500_PRCMU_BASE, SZ_4K),
25 };
26
27 static struct platform_device *u5500_platform_devs[] __initdata = {
28         &u5500_gpio_devs[0],
29         &u5500_gpio_devs[1],
30         &u5500_gpio_devs[2],
31         &u5500_gpio_devs[3],
32         &u5500_gpio_devs[4],
33         &u5500_gpio_devs[5],
34         &u5500_gpio_devs[6],
35         &u5500_gpio_devs[7],
36 };
37
38 void __init u5500_map_io(void)
39 {
40         ux500_map_io();
41
42         iotable_init(u5500_io_desc, ARRAY_SIZE(u5500_io_desc));
43 }
44
45 void __init u5500_init_devices(void)
46 {
47         ux500_init_devices();
48
49         platform_add_devices(u5500_platform_devs,
50                              ARRAY_SIZE(u5500_platform_devs));
51 }