diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2013-05-13 21:07:36 +0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-06-11 15:47:45 -0700 |
commit | 6597619f9c85a0782d427d6723c96cf768e99086 (patch) | |
tree | 169e320427656ed43056e12d7f8510362a461e09 /arch/arm/mach-clps711x/devices.c | |
parent | e337d724e8ec40f80ade3371c002454f419a2c87 (diff) | |
download | lwn-6597619f9c85a0782d427d6723c96cf768e99086.tar.gz lwn-6597619f9c85a0782d427d6723c96cf768e99086.zip |
ARM: clps711x: Add support for SYSCON driver
This patch adds support for SYSCON driver for CLPS711X targets.
At this time there are no users for this driver, but it is will
be used as start point to use in CLPS711X drivers and remove
<mach/xx> dependencies.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-clps711x/devices.c')
-rw-r--r-- | arch/arm/mach-clps711x/devices.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-clps711x/devices.c b/arch/arm/mach-clps711x/devices.c index 21161ed4c0c4..856b81cf2f8a 100644 --- a/arch/arm/mach-clps711x/devices.c +++ b/arch/arm/mach-clps711x/devices.c @@ -10,6 +10,7 @@ */ #include <linux/platform_device.h> +#include <linux/sizes.h> #include <mach/hardware.h> @@ -42,7 +43,26 @@ static void __init clps711x_add_gpio(void) } } +const struct resource clps711x_syscon_res[] __initconst = { + /* SYSCON1, SYSFLG1 */ + DEFINE_RES_MEM(CLPS711X_PHYS_BASE + SYSCON1, SZ_128), + /* SYSCON2, SYSFLG2 */ + DEFINE_RES_MEM(CLPS711X_PHYS_BASE + SYSCON2, SZ_128), + /* SYSCON3 */ + DEFINE_RES_MEM(CLPS711X_PHYS_BASE + SYSCON3, SZ_64), +}; + +static void __init clps711x_add_syscon(void) +{ + unsigned i; + + for (i = 0; i < ARRAY_SIZE(clps711x_syscon_res); i++) + platform_device_register_simple("clps711x-syscon", i + 1, + &clps711x_syscon_res[i], 1); +} + void __init clps711x_devices_init(void) { clps711x_add_gpio(); + clps711x_add_syscon(); } |