platform-drivers: msm: sps: Add SPS/BAM support for MDM9x15
Signed-off-by: Yan He <yanhe@codeaurora.org>
diff --git a/arch/arm/configs/msm9615_defconfig b/arch/arm/configs/msm9615_defconfig
index fbd2cd4..dcb8108 100644
--- a/arch/arm/configs/msm9615_defconfig
+++ b/arch/arm/configs/msm9615_defconfig
@@ -83,6 +83,8 @@
# CONFIG_HID_SUPPORT is not set
# CONFIG_USB_SUPPORT is not set
CONFIG_MSM_SSBI=y
+CONFIG_SPS=y
+CONFIG_SPS_SUPPORT_BAMDMA=y
CONFIG_VFAT_FS=y
CONFIG_TMPFS=y
# CONFIG_MISC_FILESYSTEMS is not set
diff --git a/arch/arm/mach-msm/board-9615.c b/arch/arm/mach-msm/board-9615.c
index 37c31c98..f13e238 100644
--- a/arch/arm/mach-msm/board-9615.c
+++ b/arch/arm/mach-msm/board-9615.c
@@ -30,6 +30,7 @@
&msm9615_device_ssbi_pmic1,
&msm9615_device_qup_i2c_gsbi5,
&msm9615_device_qup_spi_gsbi3,
+ &msm_device_sps,
};
static struct pm8xxx_irq_platform_data pm8xxx_irq_pdata __devinitdata = {
diff --git a/arch/arm/mach-msm/devices-9615.c b/arch/arm/mach-msm/devices-9615.c
index 07f7f8b..0e186d4 100644
--- a/arch/arm/mach-msm/devices-9615.c
+++ b/arch/arm/mach-msm/devices-9615.c
@@ -21,6 +21,7 @@
#include <mach/irqs.h>
#include <mach/socinfo.h>
#include <asm/hardware/cache-l2x0.h>
+#include <mach/msm_sps.h>
#include "devices.h"
#include "acpuclock.h"
@@ -143,6 +144,45 @@
.num_resources = ARRAY_SIZE(resources_ssbi_pmic1),
};
+static struct resource resources_sps[] = {
+ {
+ .name = "pipe_mem",
+ .start = 0x12800000,
+ .end = 0x12800000 + 0x4000 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .name = "bamdma_dma",
+ .start = 0x12240000,
+ .end = 0x12240000 + 0x1000 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .name = "bamdma_bam",
+ .start = 0x12244000,
+ .end = 0x12244000 + 0x4000 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .name = "bamdma_irq",
+ .start = SPS_BAM_DMA_IRQ,
+ .end = SPS_BAM_DMA_IRQ,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+struct msm_sps_platform_data msm_sps_pdata = {
+ .bamdma_restricted_pipes = 0x06,
+};
+
+struct platform_device msm_device_sps = {
+ .name = "msm_sps",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(resources_sps),
+ .resource = resources_sps,
+ .dev.platform_data = &msm_sps_pdata,
+};
+
#ifdef CONFIG_CACHE_L2X0
static int __init l2x0_cache_init(void)
{
diff --git a/drivers/platform/msm/Kconfig b/drivers/platform/msm/Kconfig
index 3e04dc6..75a6b5e 100644
--- a/drivers/platform/msm/Kconfig
+++ b/drivers/platform/msm/Kconfig
@@ -12,7 +12,8 @@
config SPS
bool "SPS support"
- depends on (HAS_IOMEM && (ARCH_MSM8960 || ARCH_MSM8X60 || ARCH_APQ8064))
+ depends on (HAS_IOMEM && (ARCH_MSM8960 || ARCH_MSM8X60 \
+ || ARCH_APQ8064 || ARCH_MSM9615))
select GENERIC_ALLOCATOR
default n
help