diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2011-06-04 08:09:15 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:42:45 -0800 |
commit | 9861fceb761977f655c640d5fa28e03b6de11cf4 (patch) | |
tree | 1bd9ece70f37fd1f04429ea739c201ef79e81201 /arch/arm/mach-tegra/devices.c | |
parent | a70b5b9eafb0c10012f8cf2fcf22b9b87f0004ca (diff) |
arm: tegra: devices: device entry for uart debug ports
Adding device entry for the uart port as a debug console.
The device struture will be used in board files to invoke the
debug console driver.
bug 832273
Original-Change-Id: I61c1dbdd946d5c371d7a9b23517119048a7487cb
Reviewed-on: http://git-master/r/34445
Tested-by: Jay Agarwal <jagarwal@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Rebase-Id: R28de1684d8f7fce67c09d909f7bda51259128c0b
Diffstat (limited to 'arch/arm/mach-tegra/devices.c')
-rw-r--r-- | arch/arm/mach-tegra/devices.c | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c index 76daaa67d066..b53ad734a3ce 100644 --- a/arch/arm/mach-tegra/devices.c +++ b/arch/arm/mach-tegra/devices.c @@ -714,6 +714,130 @@ struct platform_device tegra_uarte_device = { }, }; +static struct plat_serial8250_port debug_uarta_platform_data[] = { + { + .membase = IO_ADDRESS(TEGRA_UARTA_BASE), + .mapbase = TEGRA_UARTA_BASE, + .irq = INT_UARTA, + .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE, + .type = PORT_TEGRA, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = 216000000, + }, + { + .flags = 0, + }, +}; + +static struct plat_serial8250_port debug_uartb_platform_data[] = { + { + .membase = IO_ADDRESS(TEGRA_UARTB_BASE), + .mapbase = TEGRA_UARTB_BASE, + .irq = INT_UARTB, + .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE, + .type = PORT_TEGRA, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = 216000000, + }, + { + .flags = 0, + }, +}; + +static struct plat_serial8250_port debug_uartc_platform_data[] = { + { + .membase = IO_ADDRESS(TEGRA_UARTC_BASE), + .mapbase = TEGRA_UARTC_BASE, + .irq = INT_UARTC, + .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE, + .type = PORT_TEGRA, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = 216000000, + }, + { + .flags = 0, + }, +}; + +static struct plat_serial8250_port debug_uartd_platform_data[] = { + { + .membase = IO_ADDRESS(TEGRA_UARTD_BASE), + .mapbase = TEGRA_UARTD_BASE, + .irq = INT_UARTD, + .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE, + .type = PORT_TEGRA, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = 216000000, + }, + { + .flags = 0, + }, +}; + +#if !defined(CONFIG_ARCH_TEGRA_2x_SOC) +static struct plat_serial8250_port debug_uarte_platform_data[] = { + { + .membase = IO_ADDRESS(TEGRA_UARTE_BASE), + .mapbase = TEGRA_UARTE_BASE, + .irq = INT_UARTE, + .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE, + .type = PORT_TEGRA, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = 216000000, + }, + { + .flags = 0, + }, +}; +#endif + +struct platform_device debug_uarta_device = { + .name = "serial8250", + .id = PLAT8250_DEV_PLATFORM, + .dev = { + .platform_data = debug_uarta_platform_data, + }, +}; + +struct platform_device debug_uartb_device = { + .name = "serial8250", + .id = PLAT8250_DEV_PLATFORM, + .dev = { + .platform_data = debug_uartb_platform_data, + }, +}; + +struct platform_device debug_uartc_device = { + .name = "serial8250", + .id = PLAT8250_DEV_PLATFORM, + .dev = { + .platform_data = debug_uartc_platform_data, + }, +}; + +struct platform_device debug_uartd_device = { + .name = "serial8250", + .id = PLAT8250_DEV_PLATFORM, + .dev = { + .platform_data = debug_uartd_platform_data, + }, +}; + +#if !defined(CONFIG_ARCH_TEGRA_2x_SOC) +struct platform_device debug_uarte_device = { + .name = "serial8250", + .id = PLAT8250_DEV_PLATFORM, + .dev = { + .platform_data = debug_uarte_platform_data, + }, +}; +#endif + #ifdef CONFIG_ARCH_TEGRA_2x_SOC static struct resource i2s_resource1[] = { [0] = { |