msm: 8064: Add UART device for APQ8064 RUMI3
Add the device declaration and initialization code for the
GSBI1 UART device on the APQ8064 RUMI3.
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-apq8064.c b/arch/arm/mach-msm/board-apq8064.c
index 0a255bc..9f36efb 100644
--- a/arch/arm/mach-msm/board-apq8064.c
+++ b/arch/arm/mach-msm/board-apq8064.c
@@ -113,7 +113,6 @@
}
static struct platform_device *common_devices[] __initdata = {
- &apq8064_device_uart_gsbi3,
&apq8064_device_qup_i2c_gsbi4,
&apq8064_device_qup_spi_gsbi5,
&apq8064_device_ssbi_pmic1,
@@ -122,6 +121,11 @@
static struct platform_device *sim_devices[] __initdata = {
&apq8064_device_dmov,
+ &apq8064_device_uart_gsbi3,
+};
+
+static struct platform_device *rumi3_devices[] __initdata = {
+ &apq8064_device_uart_gsbi1,
};
static struct msm_spi_platform_data apq8064_qup_spi_gsbi5_pdata = {
@@ -219,6 +223,7 @@
static void __init apq8064_rumi3_init(void)
{
apq8064_common_init();
+ platform_add_devices(rumi3_devices, ARRAY_SIZE(rumi3_devices));
}
MACHINE_START(APQ8064_SIM, "QCT APQ8064 SIMULATOR")
diff --git a/arch/arm/mach-msm/devices-8064.c b/arch/arm/mach-msm/devices-8064.c
index 61b0626..8ae1f1c 100644
--- a/arch/arm/mach-msm/devices-8064.c
+++ b/arch/arm/mach-msm/devices-8064.c
@@ -23,6 +23,7 @@
#include "devices.h"
/* Address of GSBI blocks */
+#define MSM_GSBI1_PHYS 0x12440000
#define MSM_GSBI3_PHYS 0x16200000
#define MSM_GSBI4_PHYS 0x16300000
#define MSM_GSBI5_PHYS 0x1A200000
@@ -30,6 +31,7 @@
#define MSM_GSBI7_PHYS 0x16600000
/* GSBI UART devices */
+#define MSM_UART1DM_PHYS (MSM_GSBI1_PHYS + 0x10000)
#define MSM_UART3DM_PHYS (MSM_GSBI3_PHYS + 0x40000)
/* GSBI QUP devices */
@@ -65,6 +67,33 @@
.num_resources = ARRAY_SIZE(msm_dmov_resource),
};
+static struct resource resources_uart_gsbi1[] = {
+ {
+ .start = APQ8064_GSBI1_UARTDM_IRQ,
+ .end = APQ8064_GSBI1_UARTDM_IRQ,
+ .flags = IORESOURCE_IRQ,
+ },
+ {
+ .start = MSM_UART1DM_PHYS,
+ .end = MSM_UART1DM_PHYS + PAGE_SIZE - 1,
+ .name = "uartdm_resource",
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .start = MSM_GSBI1_PHYS,
+ .end = MSM_GSBI1_PHYS + PAGE_SIZE - 1,
+ .name = "gsbi_resource",
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+struct platform_device apq8064_device_uart_gsbi1 = {
+ .name = "msm_serial_hsl",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(resources_uart_gsbi1),
+ .resource = resources_uart_gsbi1,
+};
+
static struct resource resources_uart_gsbi3[] = {
{
.start = GSBI3_UARTDM_IRQ,
diff --git a/arch/arm/mach-msm/devices.h b/arch/arm/mach-msm/devices.h
index 1689ce0..6297505 100644
--- a/arch/arm/mach-msm/devices.h
+++ b/arch/arm/mach-msm/devices.h
@@ -54,6 +54,7 @@
extern struct platform_device msm8960_device_qup_spi_gsbi1;
extern struct platform_device msm8960_gemini_device;
+extern struct platform_device apq8064_device_uart_gsbi1;
extern struct platform_device apq8064_device_uart_gsbi3;
extern struct platform_device apq8064_device_qup_i2c_gsbi4;
extern struct platform_device apq8064_device_qup_spi_gsbi5;