msm: Add SSBI support for MSM9615
Add the device definitions and platform data to support
SSBI on MSM9615 targets.
Signed-off-by: Kenneth Heitke <kheitke@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-9615.c b/arch/arm/mach-msm/board-9615.c
index f391e30..d35de58 100644
--- a/arch/arm/mach-msm/board-9615.c
+++ b/arch/arm/mach-msm/board-9615.c
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/i2c.h>
+#include <linux/msm_ssbi.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/board.h>
@@ -25,10 +26,18 @@
static struct platform_device *common_devices[] = {
&msm9615_device_uart_gsbi4,
+ &msm9615_device_ssbi_pmic1,
&msm9615_device_qup_i2c_gsbi5,
&msm9615_device_qup_spi_gsbi3,
};
+static struct msm_ssbi_platform_data msm9615_ssbi_pm8018_pdata __devinitdata = {
+ .controller_type = MSM_SBI_CTRL_PMIC_ARBITER,
+ .slave = {
+ .name = "pm8018-core",
+ },
+};
+
static struct gpiomux_setting gsbi4 = {
.func = GPIOMUX_FUNC_1,
.drv = GPIOMUX_DRV_8MA,
@@ -160,6 +169,8 @@
msm9615_i2c_init();
msm9615_device_qup_spi_gsbi3.dev.platform_data =
&msm9615_qup_spi_gsbi3_pdata;
+ msm9615_device_ssbi_pmic1.dev.platform_data =
+ &msm9615_ssbi_pm8018_pdata;
platform_add_devices(common_devices, ARRAY_SIZE(common_devices));
}
diff --git a/arch/arm/mach-msm/devices-9615.c b/arch/arm/mach-msm/devices-9615.c
index 6a14ace..61bc5fd 100644
--- a/arch/arm/mach-msm/devices-9615.c
+++ b/arch/arm/mach-msm/devices-9615.c
@@ -41,6 +41,10 @@
#define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000)
#define MSM_QUP_SIZE SZ_4K
+/* Address of SSBI CMD */
+#define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000
+#define MSM_PMIC_SSBI_SIZE SZ_4K
+
static struct resource resources_uart_gsbi4[] = {
{
.start = GSBI4_UARTDM_IRQ,
@@ -124,6 +128,21 @@
.resource = resources_qup_spi_gsbi3,
};
+static struct resource resources_ssbi_pmic1[] = {
+ {
+ .start = MSM_PMIC1_SSBI_CMD_PHYS,
+ .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+struct platform_device msm9615_device_ssbi_pmic1 = {
+ .name = "msm_ssbi",
+ .id = 0,
+ .resource = resources_ssbi_pmic1,
+ .num_resources = ARRAY_SIZE(resources_ssbi_pmic1),
+};
+
#ifdef CONFIG_CACHE_L2X0
static int __init l2x0_cache_init(void)
{
diff --git a/arch/arm/mach-msm/devices.h b/arch/arm/mach-msm/devices.h
index 3fab424..86697fc 100644
--- a/arch/arm/mach-msm/devices.h
+++ b/arch/arm/mach-msm/devices.h
@@ -69,6 +69,7 @@
extern struct platform_device msm9615_device_uart_gsbi4;
extern struct platform_device msm9615_device_qup_i2c_gsbi5;
extern struct platform_device msm9615_device_qup_spi_gsbi3;
+extern struct platform_device msm9615_device_ssbi_pmic1;
extern struct platform_device msm_device_sdc1;
extern struct platform_device msm_device_sdc2;