From 19955c3d7453757271d05859958ca1804a5d2d67 Mon Sep 17 00:00:00 2001 From: "Manjunathappa, Prakash" Date: Wed, 19 Jun 2013 14:45:38 +0530 Subject: ARM: davinci: uart: move to devid based clk_get For modules having single clock, clk_get should be done with dev_id. But current davinci implementation handles multiple instances of the UART devices with single platform_device_register. Hence clk_get is based on con_id rather than dev_id, this is not correct. Do platform_device_register for each instance and clk_get on dev_id. Signed-off-by: Manjunathappa, Prakash [nsekhar@ti.com: actually stop using con_id in clk_get(), squash the patch adding OF aux data into this one] Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/devices-tnetv107x.c | 37 ++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 6 deletions(-) (limited to 'arch/arm/mach-davinci/devices-tnetv107x.c') diff --git a/arch/arm/mach-davinci/devices-tnetv107x.c b/arch/arm/mach-davinci/devices-tnetv107x.c index 128cb9ae80f4..fc4a0feb4a47 100644 --- a/arch/arm/mach-davinci/devices-tnetv107x.c +++ b/arch/arm/mach-davinci/devices-tnetv107x.c @@ -126,7 +126,7 @@ static struct platform_device edma_device = { .dev.platform_data = tnetv107x_edma_info, }; -static struct plat_serial8250_port serial_data[] = { +static struct plat_serial8250_port serial0_platform_data[] = { { .mapbase = TNETV107X_UART0_BASE, .irq = IRQ_TNETV107X_UART0, @@ -136,6 +136,11 @@ static struct plat_serial8250_port serial_data[] = { .iotype = UPIO_MEM32, .regshift = 2, }, + { + .flags = 0, + } +}; +static struct plat_serial8250_port serial1_platform_data[] = { { .mapbase = TNETV107X_UART1_BASE, .irq = IRQ_TNETV107X_UART1, @@ -145,6 +150,11 @@ static struct plat_serial8250_port serial_data[] = { .iotype = UPIO_MEM32, .regshift = 2, }, + { + .flags = 0, + } +}; +static struct plat_serial8250_port serial2_platform_data[] = { { .mapbase = TNETV107X_UART2_BASE, .irq = IRQ_TNETV107X_UART2, @@ -156,13 +166,28 @@ static struct plat_serial8250_port serial_data[] = { }, { .flags = 0, - }, + } }; -struct platform_device tnetv107x_serial_device = { - .name = "serial8250", - .id = PLAT8250_DEV_PLATFORM, - .dev.platform_data = serial_data, + +struct platform_device tnetv107x_serial_device[] = { + { + .name = "serial8250", + .id = PLAT8250_DEV_PLATFORM, + .dev.platform_data = serial0_platform_data, + }, + { + .name = "serial8250", + .id = PLAT8250_DEV_PLATFORM1, + .dev.platform_data = serial1_platform_data, + }, + { + .name = "serial8250", + .id = PLAT8250_DEV_PLATFORM2, + .dev.platform_data = serial2_platform_data, + }, + { + } }; static struct resource mmc0_resources[] = { -- cgit v1.2.3