aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAlexander Shiyan <shc_work@mail.ru>2013-12-11 10:50:50 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-17 12:28:40 -0500
commitbc00024502edd2ca5d786a06270b1ba47e5907ef (patch)
tree13545bbb167820ad43ff71b45338330c6554d77c /arch
parent6a8c62f3e97fdf184fde60bc99155476e8e9cd55 (diff)
serial: clps711x: Driver refactor
This is a complex patch for refactoring CLPS711X serial driver. Major changes: - Eliminate <mach/hardware.h> usage. - Devicetree support. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-clps711x/devices.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-clps711x/devices.c b/arch/arm/mach-clps711x/devices.c
index fb77d1448fec..2001488a5ef2 100644
--- a/arch/arm/mach-clps711x/devices.c
+++ b/arch/arm/mach-clps711x/devices.c
@@ -61,8 +61,29 @@ static void __init clps711x_add_syscon(void)
61 &clps711x_syscon_res[i], 1); 61 &clps711x_syscon_res[i], 1);
62} 62}
63 63
64static const struct resource clps711x_uart1_res[] __initconst = {
65 DEFINE_RES_MEM(CLPS711X_PHYS_BASE + UARTDR1, SZ_128),
66 DEFINE_RES_IRQ(IRQ_UTXINT1),
67 DEFINE_RES_IRQ(IRQ_URXINT1),
68};
69
70static const struct resource clps711x_uart2_res[] __initconst = {
71 DEFINE_RES_MEM(CLPS711X_PHYS_BASE + UARTDR2, SZ_128),
72 DEFINE_RES_IRQ(IRQ_UTXINT2),
73 DEFINE_RES_IRQ(IRQ_URXINT2),
74};
75
76static void __init clps711x_add_uart(void)
77{
78 platform_device_register_simple("clps711x-uart", 0, clps711x_uart1_res,
79 ARRAY_SIZE(clps711x_uart1_res));
80 platform_device_register_simple("clps711x-uart", 1, clps711x_uart2_res,
81 ARRAY_SIZE(clps711x_uart2_res));
82};
83
64void __init clps711x_devices_init(void) 84void __init clps711x_devices_init(void)
65{ 85{
66 clps711x_add_gpio(); 86 clps711x_add_gpio();
67 clps711x_add_syscon(); 87 clps711x_add_syscon();
88 clps711x_add_uart();
68} 89}