usb: gadget: Add HSIC Peripheral over SPS support
Add support in HSIC peripheral(device)
over SPS.
Only one USB core can be use - currently HSUSB
is enabled by default.
To enable HSIC core defconfig file should be changed.
Change-Id: I256aecd9e6dfd8bfd71719c32beed8b24225e11c
Signed-off-by: Ofir Cohen <ofirc@codeaurora.org>
diff --git a/arch/arm/mach-msm/devices-9615.c b/arch/arm/mach-msm/devices-9615.c
index 8b0c9bd..4fc05ce 100644
--- a/arch/arm/mach-msm/devices-9615.c
+++ b/arch/arm/mach-msm/devices-9615.c
@@ -102,7 +102,9 @@
};
#define MSM_USB_BAM_BASE 0x12502000
-#define MSM_USB_BAM_SIZE 0x3DFFF
+#define MSM_USB_BAM_SIZE SZ_16K
+#define MSM_HSIC_BAM_BASE 0x12542000
+#define MSM_HSIC_BAM_SIZE SZ_16K
static struct resource resources_otg[] = {
{
@@ -144,7 +146,7 @@
{
.name = "usb_bam_addr",
.start = MSM_USB_BAM_BASE,
- .end = MSM_USB_BAM_BASE + MSM_USB_BAM_SIZE,
+ .end = MSM_USB_BAM_BASE + MSM_USB_BAM_SIZE - 1,
.flags = IORESOURCE_MEM,
},
{
@@ -153,6 +155,18 @@
.end = USB1_HS_BAM_IRQ,
.flags = IORESOURCE_IRQ,
},
+ {
+ .name = "hsic_bam_addr",
+ .start = MSM_HSIC_BAM_BASE,
+ .end = MSM_HSIC_BAM_BASE + MSM_HSIC_BAM_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .name = "hsic_bam_irq",
+ .start = USB_HSIC_BAM_IRQ,
+ .end = USB_HSIC_BAM_IRQ,
+ .flags = IORESOURCE_IRQ,
+ },
};
struct platform_device msm_device_usb_bam = {
diff --git a/arch/arm/mach-msm/include/mach/irqs-9615.h b/arch/arm/mach-msm/include/mach/irqs-9615.h
index 5fba24e..cd8f2a3 100644
--- a/arch/arm/mach-msm/include/mach/irqs-9615.h
+++ b/arch/arm/mach-msm/include/mach/irqs-9615.h
@@ -179,6 +179,7 @@
#define TLMM_MSM_DIR_CONN_IRQ_21 (GIC_SPI_START + 224)
#define MSM_SPARE0_IRQ (GIC_SPI_START + 225)
#define PMIC_SEC_IRQ_N (GIC_SPI_START + 226)
+#define USB_HSIC_BAM_IRQ (GIC_SPI_START + 231)
#define USB_HSIC_IRQ (GIC_SPI_START + 232)
#define NR_MSM_IRQS 288