msm: 8064: hsic: Add msm_bus vote for hsic controller driver
Drivers need to specify their bandwidth requirements to
bus-scaling driver to get guaranteed bandwidth on fabrics.
HSIC USB performance depends upon system fabric frequency
as HSIC USB controller has to support high bi-directional
data transfers. Hence, request for high bus bandwidth as
long as HSIC is active.
Also add debugfs entry to enable/disable the bus voting:-
echo enable > /sys/kernel/debug/ehci_hsic_msm_dbg/bus_voting
echo disable > /sys/kernel/debug/ehci_hsic_msm_dbg/bus_voting
CRs-Fixed: 342032
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Change-Id: I7e208d67ef1c0168cd7621aeae4e8b123adef255
diff --git a/arch/arm/mach-msm/board-8064.c b/arch/arm/mach-msm/board-8064.c
index df20d60..d01af99 100644
--- a/arch/arm/mach-msm/board-8064.c
+++ b/arch/arm/mach-msm/board-8064.c
@@ -479,9 +479,59 @@
}
#ifdef CONFIG_USB_EHCI_MSM_HSIC
+/* Bandwidth requests (zero) if no vote placed */
+static struct msm_bus_vectors hsic_init_vectors[] = {
+ {
+ .src = MSM_BUS_MASTER_SPS,
+ .dst = MSM_BUS_SLAVE_EBI_CH0,
+ .ab = 0,
+ .ib = 0,
+ },
+ {
+ .src = MSM_BUS_MASTER_SPS,
+ .dst = MSM_BUS_SLAVE_SPS,
+ .ab = 0,
+ .ib = 0,
+ },
+};
+
+/* Bus bandwidth requests in Bytes/sec */
+static struct msm_bus_vectors hsic_max_vectors[] = {
+ {
+ .src = MSM_BUS_MASTER_SPS,
+ .dst = MSM_BUS_SLAVE_EBI_CH0,
+ .ab = 60000000, /* At least 480Mbps on bus. */
+ .ib = 960000000, /* MAX bursts rate */
+ },
+ {
+ .src = MSM_BUS_MASTER_SPS,
+ .dst = MSM_BUS_SLAVE_SPS,
+ .ab = 0,
+ .ib = 512000000, /*vote for 64Mhz dfab clk rate*/
+ },
+};
+
+static struct msm_bus_paths hsic_bus_scale_usecases[] = {
+ {
+ ARRAY_SIZE(hsic_init_vectors),
+ hsic_init_vectors,
+ },
+ {
+ ARRAY_SIZE(hsic_max_vectors),
+ hsic_max_vectors,
+ },
+};
+
+static struct msm_bus_scale_pdata hsic_bus_scale_pdata = {
+ hsic_bus_scale_usecases,
+ ARRAY_SIZE(hsic_bus_scale_usecases),
+ .name = "hsic",
+};
+
static struct msm_hsic_host_platform_data msm_hsic_pdata = {
- .strobe = 88,
- .data = 89,
+ .strobe = 88,
+ .data = 89,
+ .bus_scale_table = &hsic_bus_scale_pdata,
};
#else
static struct msm_hsic_host_platform_data msm_hsic_pdata;