diff options
author | Djamil Elaidi <d-elaidi@ti.com> | 2011-09-13 12:54:56 +0200 |
---|---|---|
committer | Benoit Goby <benoit@android.com> | 2011-09-13 20:48:11 -0700 |
commit | f3b6951f514ce82e12c9e90992c6f7751d1419ee (patch) | |
tree | 169687f2d7ff8a1d357b22d1f65f73c45045c9bf /drivers/omap_hsi | |
parent | 325a3caa26c87debb5ba342f9c9afb0143af7861 (diff) | |
download | kernel_samsung_tuna-f3b6951f514ce82e12c9e90992c6f7751d1419ee.zip kernel_samsung_tuna-f3b6951f514ce82e12c9e90992c6f7751d1419ee.tar.gz kernel_samsung_tuna-f3b6951f514ce82e12c9e90992c6f7751d1419ee.tar.bz2 |
OMAP4:HSI: Fix CA_WAKE IRQ loss in L3INIT OSWRET
In Open Switch Retention, the asynchronous wake up of the HSI IP
is not possible from the CA_WAKE signal.
Open Switch Retention is possible in Idle mode, so we forbid the idle
mode in this patch when we need it.
In details:
When CAWAKE goes low with data still in RX FIFO, HSI driver tries
to disable the clocks, but aborts because FIFO is not empty. So IO
Daisy chain is not enabled.
Since CAWAKE is low, HSI driver sets SYSCONFIG to SMART_IDLE_WAKEUP
and SMART_STBY_WAKEUP, so L3INIT_PD might be powered down. Since
IO daisy chain has not been enabeld, we miss the following CAWAKE
high event.
Fix consists in always forcing SYSCONFIG to NO_IDLE while there
is any HSI activity, and let omap_hwmod re-enable the
SMART_WAKEUP features as soon as HSI doesn't need the clocks anymore.
Change-Id: I86994aafa4701e549faa52e9d8648f6bd4a464ef
Signed-off-by: Cedric Poignet <a0919860@ti.com>
Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>
Diffstat (limited to 'drivers/omap_hsi')
-rw-r--r-- | drivers/omap_hsi/hsi_driver.c | 5 | ||||
-rw-r--r-- | drivers/omap_hsi/hsi_driver_int.c | 14 |
2 files changed, 3 insertions, 16 deletions
diff --git a/drivers/omap_hsi/hsi_driver.c b/drivers/omap_hsi/hsi_driver.c index 7bfa262..d729427 100644 --- a/drivers/omap_hsi/hsi_driver.c +++ b/drivers/omap_hsi/hsi_driver.c @@ -446,7 +446,7 @@ void hsi_softreset_driver(struct hsi_dev *hsi_ctrl) hsi_port_channels_reset(&hsi_ctrl->hsi_port[port]); } - hsi_set_pm_default(hsi_ctrl); + hsi_set_pm_force_hsi_on(hsi_ctrl); /* Re-Configure HSI ports */ hsi_set_ports_default(hsi_ctrl, pd); @@ -765,6 +765,7 @@ static int __init hsi_controller_init(struct hsi_dev *hsi_ctrl, return -ENXIO; } hsi_ctrl->max_p = pdata->num_ports; + hsi_ctrl->clock_enabled = false; hsi_ctrl->in_dma_tasklet = false; hsi_ctrl->fifo_mapping_strategy = pdata->fifo_mapping_strategy; hsi_ctrl->dev = &pd->dev; @@ -840,7 +841,7 @@ static int __init hsi_platform_device_probe(struct platform_device *pd) if (err < 0) goto rollback2; - hsi_set_pm_default(hsi_ctrl); + hsi_set_pm_force_hsi_on(hsi_ctrl); /* Configure HSI ports */ hsi_set_ports_default(hsi_ctrl, pd); diff --git a/drivers/omap_hsi/hsi_driver_int.c b/drivers/omap_hsi/hsi_driver_int.c index 7080407..c59e730 100644 --- a/drivers/omap_hsi/hsi_driver_int.c +++ b/drivers/omap_hsi/hsi_driver_int.c @@ -450,13 +450,6 @@ int hsi_do_cawake_process(struct hsi_port *pport) } pport->cawake_status = 1; - /* Force HSI to ON_ACTIVE when CAWAKE is high */ - hsi_set_pm_force_hsi_on(hsi_ctrl); - /* - * TODO: Use pm_qos() to set latency constraint to prevent - * L3INIT to enter RET/OFF when CAWAKE is high. - */ - spin_unlock(&hsi_ctrl->lock); hsi_port_event_handler(pport, HSI_EVENT_CAWAKE_UP, NULL); spin_lock(&hsi_ctrl->lock); @@ -481,13 +474,6 @@ int hsi_do_cawake_process(struct hsi_port *pport) } pport->cawake_status = 0; - /* Allow HSI HW to enter IDLE when CAWAKE is low */ - hsi_set_pm_default(hsi_ctrl); - /* - * TODO: Use pm_qos() to release latency constraint to allow - * L3INIT to enter RET/OFF when CAWAKE is low - */ - spin_unlock(&hsi_ctrl->lock); hsi_port_event_handler(pport, HSI_EVENT_CAWAKE_DOWN, NULL); spin_lock(&hsi_ctrl->lock); |