msm: board-msm8960: Add support for USB HSIC Host mode

Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/board-msm8960.c
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c
index 895d6dc..948b815 100644
--- a/arch/arm/mach-msm/board-msm8960.c
+++ b/arch/arm/mach-msm/board-msm8960.c
@@ -3326,6 +3326,7 @@
 	&msm8960_device_otg,
 	&msm8960_device_gadget_peripheral,
 	&msm_device_hsusb_host,
+	&msm_device_hsic_host,
 	&android_usb_device,
 	&msm_device_vidc,
 	&mipi_dsi_simulator_panel_device,
@@ -3376,6 +3377,7 @@
 	&msm8960_device_otg,
 	&msm8960_device_gadget_peripheral,
 	&msm_device_hsusb_host,
+	&msm_device_hsic_host,
 	&android_usb_device,
 	&msm_pcm,
 	&msm_pcm_routing,
diff --git a/arch/arm/mach-msm/devices-8960.c b/arch/arm/mach-msm/devices-8960.c
index 0b57dcd..98f54ee 100644
--- a/arch/arm/mach-msm/devices-8960.c
+++ b/arch/arm/mach-msm/devices-8960.c
@@ -140,7 +140,7 @@
 	},
 };
 
-static u64 dma_mask = 0xffffffffULL;
+static u64 dma_mask = DMA_BIT_MASK(32);
 struct platform_device msm_device_hsusb_host = {
 	.name           = "msm_hsusb_host",
 	.id             = -1,
@@ -152,6 +152,30 @@
 	},
 };
 
+static struct resource resources_hsic_host[] = {
+	{
+		.start	= MSM_HSIC_PHYS,
+		.end	= MSM_HSIC_PHYS + MSM_HSIC_SIZE - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	{
+		.start	= USB_HSIC_IRQ,
+		.end	= USB_HSIC_IRQ,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+struct platform_device msm_device_hsic_host = {
+	.name		= "msm_hsic_host",
+	.id		= -1,
+	.num_resources	= ARRAY_SIZE(resources_hsic_host),
+	.resource	= resources_hsic_host,
+	.dev		= {
+		.dma_mask		= &dma_mask,
+		.coherent_dma_mask	= DMA_BIT_MASK(32),
+	},
+};
+
 static struct resource resources_uart_gsbi2[] = {
 	{
 		.start	= MSM8960_GSBI2_UARTDM_IRQ,
diff --git a/arch/arm/mach-msm/devices.h b/arch/arm/mach-msm/devices.h
index 7cf1eb1..d5cad07 100644
--- a/arch/arm/mach-msm/devices.h
+++ b/arch/arm/mach-msm/devices.h
@@ -81,6 +81,7 @@
 extern struct platform_device msm_device_gadget_peripheral;
 extern struct platform_device msm_device_hsusb_host;
 extern struct platform_device msm_device_hsusb_host2;
+extern struct platform_device msm_device_hsic_host;
 
 extern struct platform_device msm_device_otg;
 
diff --git a/arch/arm/mach-msm/include/mach/irqs-8960.h b/arch/arm/mach-msm/include/mach/irqs-8960.h
index 14d2fad..6d121f9 100644
--- a/arch/arm/mach-msm/include/mach/irqs-8960.h
+++ b/arch/arm/mach-msm/include/mach/irqs-8960.h
@@ -267,6 +267,7 @@
 #define TLMM_MSM_DIR_CONN_IRQ_21		(GIC_SPI_START + 224)
 #define PM8921_SEC_IRQ_104			(GIC_SPI_START + 225)
 #define PM8018_SEC_IRQ_107			(GIC_SPI_START + 226)
+#define USB_HSIC_IRQ				(GIC_SPI_START + 229)
 
 /* Backwards compatible IRQ macros. */
 #define INT_ADM_AARM				ADM_0_SCSS_0_IRQ
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-8960.h b/arch/arm/mach-msm/include/mach/msm_iomap-8960.h
index 9252387..e6b7beb 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-8960.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-8960.h
@@ -101,6 +101,9 @@
 #define MSM8960_HSUSB_PHYS		0x12500000
 #define MSM8960_HSUSB_SIZE		SZ_4K
 
+#define MSM_HSIC_PHYS			0x12520000
+#define MSM_HSIC_SIZE			SZ_4K
+
 #define MSM8960_HDMI_PHYS		0x04A00000
 #define MSM8960_HDMI_SIZE		SZ_4K