EHCI: HSIC: Pass interrupt threshold value as platform data
Interrupt threshold value is the maximum rate at which HSIC controller will issue interrupts to processor. Increasing this value results in fewer interrupts which may save power as processor has to handle fewer interrupts. Side effect of increasing this value is higher data latency. For fusion3, set the ITC(interrupt threshold control) to 5 and default for other targets. Also, allow ehci stack to set ITC value per controller basis. CRs-Fixed: 374661 Change-Id: I0e6bc210679ef211c2850ffbe1dfc80da2f65bf0 Signed-off-by: Hemant Kumar <hemantk@codeaurora.org> Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
This commit is contained in:
committed by
Iliyan Malchev
parent
77af5d3270
commit
e8cbb4da04
@@ -2950,6 +2950,7 @@ static void __init apq8064_common_init(void)
|
||||
ARRAY_SIZE(common_not_mpq_devices));
|
||||
enable_ddr3_regulator();
|
||||
if (machine_is_apq8064_mtp()) {
|
||||
msm_hsic_pdata.log2_irq_thresh = 5,
|
||||
apq8064_device_hsic_host.dev.platform_data = &msm_hsic_pdata;
|
||||
device_initialize(&apq8064_device_hsic_host.dev);
|
||||
}
|
||||
|
||||
@@ -691,8 +691,7 @@ static int ehci_init(struct usb_hcd *hcd)
|
||||
hw->hw_alt_next = QTD_NEXT(ehci, ehci->async->dummy->qtd_dma);
|
||||
|
||||
/* clear interrupt enables, set irq latency */
|
||||
if (ehci->max_log2_irq_thresh)
|
||||
log2_irq_thresh = ehci->max_log2_irq_thresh;
|
||||
log2_irq_thresh = ehci->log2_irq_thresh;
|
||||
|
||||
if (log2_irq_thresh < 0 || log2_irq_thresh > 6)
|
||||
log2_irq_thresh = 0;
|
||||
|
||||
@@ -1516,13 +1516,15 @@ static int __devinit ehci_hsic_msm_probe(struct platform_device *pdev)
|
||||
|
||||
mehci = hcd_to_hsic(hcd);
|
||||
mehci->dev = &pdev->dev;
|
||||
pdata = mehci->dev->platform_data;
|
||||
|
||||
mehci->ehci.susp_sof_bug = 1;
|
||||
mehci->ehci.reset_sof_bug = 1;
|
||||
|
||||
mehci->ehci.resume_sof_bug = 1;
|
||||
|
||||
mehci->ehci.max_log2_irq_thresh = 6;
|
||||
if (pdata)
|
||||
mehci->ehci.log2_irq_thresh = pdata->log2_irq_thresh;
|
||||
|
||||
res = platform_get_resource_byname(pdev,
|
||||
IORESOURCE_IRQ,
|
||||
@@ -1607,7 +1609,6 @@ static int __devinit ehci_hsic_msm_probe(struct platform_device *pdev)
|
||||
dev_dbg(&pdev->dev, "mode debugfs file is"
|
||||
"not available\n");
|
||||
|
||||
pdata = mehci->dev->platform_data;
|
||||
if (pdata && pdata->bus_scale_table) {
|
||||
mehci->bus_perf_client =
|
||||
msm_bus_scale_register_client(pdata->bus_scale_table);
|
||||
|
||||
@@ -135,7 +135,7 @@ struct ehci_hcd { /* one per controller */
|
||||
ktime_t last_periodic_enable;
|
||||
u32 command;
|
||||
|
||||
unsigned max_log2_irq_thresh;
|
||||
unsigned log2_irq_thresh;
|
||||
|
||||
/* SILICON QUIRKS */
|
||||
unsigned no_selective_suspend:1;
|
||||
|
||||
@@ -379,6 +379,7 @@ struct msm_hsic_host_platform_data {
|
||||
unsigned strobe;
|
||||
unsigned data;
|
||||
struct msm_bus_scale_pdata *bus_scale_table;
|
||||
unsigned log2_irq_thresh;
|
||||
};
|
||||
|
||||
struct msm_usb_host_platform_data {
|
||||
|
||||
Reference in New Issue
Block a user