msm: 8064: Add fabric devices to enable bus scaling on 8064
Add fabric devices to the kernel tree by listing them in
initialization data to enable bus scaling on APQ8064
Change-Id: Id56fbfde410f7bd268de7111eae0752eab733d59
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-8064.c b/arch/arm/mach-msm/board-8064.c
index 1aedd55..0ba7434 100644
--- a/arch/arm/mach-msm/board-8064.c
+++ b/arch/arm/mach-msm/board-8064.c
@@ -46,6 +46,7 @@
#include <linux/bootmem.h>
#include <asm/setup.h>
#include <mach/dma.h>
+#include <mach/msm_bus_board.h>
#include "msm_watchdog.h"
#include "board-8064.h"
@@ -558,6 +559,22 @@
},
};
+static void __init apq8064_init_buses(void)
+{
+ msm_bus_rpm_set_mt_mask();
+ msm_bus_8064_apps_fabric_pdata.rpm_enabled = 1;
+ msm_bus_8064_sys_fabric_pdata.rpm_enabled = 1;
+ msm_bus_8064_mm_fabric_pdata.rpm_enabled = 1;
+ msm_bus_8064_apps_fabric.dev.platform_data =
+ &msm_bus_8064_apps_fabric_pdata;
+ msm_bus_8064_sys_fabric.dev.platform_data =
+ &msm_bus_8064_sys_fabric_pdata;
+ msm_bus_8064_mm_fabric.dev.platform_data =
+ &msm_bus_8064_mm_fabric_pdata;
+ msm_bus_8064_sys_fpb.dev.platform_data = &msm_bus_8064_sys_fpb_pdata;
+ msm_bus_8064_cpss_fpb.dev.platform_data = &msm_bus_8064_cpss_fpb_pdata;
+}
+
static struct platform_device *common_devices[] __initdata = {
&apq8064_device_dmov,
&apq8064_device_qup_i2c_gsbi4,
@@ -619,6 +636,11 @@
&apq_pcm_afe,
&apq_cpudai_auxpcm_rx,
&apq_cpudai_auxpcm_tx,
+ &msm_bus_8064_apps_fabric,
+ &msm_bus_8064_sys_fabric,
+ &msm_bus_8064_mm_fabric,
+ &msm_bus_8064_sys_fpb,
+ &msm_bus_8064_cpss_fpb,
};
static struct platform_device *sim_devices[] __initdata = {
@@ -712,6 +734,7 @@
&apq8064_qup_spi_gsbi5_pdata;
apq8064_init_pmic();
apq8064_device_otg.dev.platform_data = &msm_otg_pdata;
+ apq8064_init_buses();
platform_add_devices(common_devices, ARRAY_SIZE(common_devices));
apq8064_init_mmc();
slim_register_board_info(apq8064_slim_devices,
diff --git a/arch/arm/mach-msm/devices-8064.c b/arch/arm/mach-msm/devices-8064.c
index 12a00e6..9c77f3d 100644
--- a/arch/arm/mach-msm/devices-8064.c
+++ b/arch/arm/mach-msm/devices-8064.c
@@ -24,6 +24,7 @@
#include <mach/dma.h>
#include <sound/msm-dai-q6.h>
#include <sound/apr_audio.h>
+#include <mach/msm_bus_board.h>
#include "clock.h"
#include "devices.h"
#include "msm_watchdog.h"
@@ -694,6 +695,27 @@
},
};
+struct platform_device msm_bus_8064_sys_fabric = {
+ .name = "msm_bus_fabric",
+ .id = MSM_BUS_FAB_SYSTEM,
+};
+struct platform_device msm_bus_8064_apps_fabric = {
+ .name = "msm_bus_fabric",
+ .id = MSM_BUS_FAB_APPSS,
+};
+struct platform_device msm_bus_8064_mm_fabric = {
+ .name = "msm_bus_fabric",
+ .id = MSM_BUS_FAB_MMSS,
+};
+struct platform_device msm_bus_8064_sys_fpb = {
+ .name = "msm_bus_fabric",
+ .id = MSM_BUS_FAB_SYSTEM_FPB,
+};
+struct platform_device msm_bus_8064_cpss_fpb = {
+ .name = "msm_bus_fabric",
+ .id = MSM_BUS_FAB_CPSS_FPB,
+};
+
static struct msm_sps_platform_data msm_sps_pdata = {
.bamdma_restricted_pipes = 0x06,
};
diff --git a/arch/arm/mach-msm/devices.h b/arch/arm/mach-msm/devices.h
index 33a543d..5d28fa9 100644
--- a/arch/arm/mach-msm/devices.h
+++ b/arch/arm/mach-msm/devices.h
@@ -264,3 +264,9 @@
extern struct platform_device msm_funnel_device;
extern struct platform_device msm_ptm_device;
#endif
+
+extern struct platform_device msm_bus_8064_apps_fabric;
+extern struct platform_device msm_bus_8064_sys_fabric;
+extern struct platform_device msm_bus_8064_mm_fabric;
+extern struct platform_device msm_bus_8064_sys_fpb;
+extern struct platform_device msm_bus_8064_cpss_fpb;