From acc543651810831a81f57fe900fab7aa04bcf5f0 Mon Sep 17 00:00:00 2001 From: make shi Date: Wed, 25 Jul 2012 10:10:45 +0800 Subject: ENGR00215520-03 Mx6:USB host: USB Host1 modulization - remove mx6_usb_h1_init() in board specific initialization files - Add module_init(mx6_usb_h1_init) and module_exit(mx6_usb_h1_exit) in usb_h1.c to support the usb_h1 modulization - Export necessary function which is used in usb_h1.c Signed-off-by: make shi --- arch/arm/plat-mxc/devices/platform-fsl-usb2-wakeup.c | 1 + arch/arm/plat-mxc/devices/platform-mxc-ehci.c | 2 ++ arch/arm/plat-mxc/usb_common.c | 17 +++++++++++++++++ arch/arm/plat-mxc/usb_wakeup.c | 11 ++++++++++- 4 files changed, 30 insertions(+), 1 deletion(-) (limited to 'arch/arm/plat-mxc') diff --git a/arch/arm/plat-mxc/devices/platform-fsl-usb2-wakeup.c b/arch/arm/plat-mxc/devices/platform-fsl-usb2-wakeup.c index 986b766fabde..3dacd287c6b8 100644 --- a/arch/arm/plat-mxc/devices/platform-fsl-usb2-wakeup.c +++ b/arch/arm/plat-mxc/devices/platform-fsl-usb2-wakeup.c @@ -52,3 +52,4 @@ struct platform_device *__init imx_add_fsl_usb2_wakeup( res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32)); } +EXPORT_SYMBOL(imx_add_fsl_usb2_wakeup); diff --git a/arch/arm/plat-mxc/devices/platform-mxc-ehci.c b/arch/arm/plat-mxc/devices/platform-mxc-ehci.c index c39f6d7561c6..2b9cdff2ff97 100644 --- a/arch/arm/plat-mxc/devices/platform-mxc-ehci.c +++ b/arch/arm/plat-mxc/devices/platform-mxc-ehci.c @@ -83,6 +83,7 @@ struct platform_device *__init imx_add_mxc_ehci( res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32)); } +EXPORT_SYMBOL(imx_add_mxc_ehci); /* FSL internal non-upstream code */ struct platform_device *__init imx_add_fsl_ehci( @@ -104,3 +105,4 @@ struct platform_device *__init imx_add_fsl_ehci( res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32)); } +EXPORT_SYMBOL(imx_add_fsl_ehci); diff --git a/arch/arm/plat-mxc/usb_common.c b/arch/arm/plat-mxc/usb_common.c index b18f5239c8b9..168808e77a18 100755 --- a/arch/arm/plat-mxc/usb_common.c +++ b/arch/arm/plat-mxc/usb_common.c @@ -49,8 +49,12 @@ #include #include #include +typedef void (*driver_vbus_func)(bool); void __iomem *imx_otg_base; +static driver_vbus_func s_driver_vbus; + +EXPORT_SYMBOL(imx_otg_base); #define MXC_NUMBER_USB_TRANSCEIVER 6 struct fsl_xcvr_ops *g_xc_ops[MXC_NUMBER_USB_TRANSCEIVER] = { NULL }; @@ -62,6 +66,19 @@ bool usb_icbug_swfix_need(void) else return true; } +EXPORT_SYMBOL(usb_icbug_swfix_need); + +void mx6_set_host1_vbus_func(driver_vbus_func driver_vbus) +{ + s_driver_vbus = driver_vbus; +} + +void mx6_set_usb_host1_vbus_func(driver_vbus_func *driver_vbus) +{ + *driver_vbus = s_driver_vbus; +} +EXPORT_SYMBOL(mx6_set_usb_host1_vbus_func); + enum fsl_usb2_modes get_usb_mode(struct fsl_usb2_platform_data *pdata) { diff --git a/arch/arm/plat-mxc/usb_wakeup.c b/arch/arm/plat-mxc/usb_wakeup.c index 4704eae91a51..e67c2219e52d 100755 --- a/arch/arm/plat-mxc/usb_wakeup.c +++ b/arch/arm/plat-mxc/usb_wakeup.c @@ -32,6 +32,7 @@ struct wakeup_ctrl { int wakeup_irq; int usb_irq; + bool thread_close; struct fsl_usb2_wakeup_platform_data *pdata; struct task_struct *thread; struct completion event; @@ -145,12 +146,18 @@ static int wakeup_event_thread(void *param) { struct wakeup_ctrl *ctrl = (struct wakeup_ctrl *)param; struct sched_param sch_param = {.sched_priority = 1}; + u32 timeout = 0; sched_setscheduler(current, SCHED_RR, &sch_param); while (1) { wait_for_completion_interruptible(&ctrl->event); - if (kthread_should_stop()) + if (ctrl->thread_close) { + while (!kthread_should_stop() && (timeout < 1000)) { + timeout++; + msleep(1); + } break; + } wakeup_event_handler(ctrl); enable_irq(ctrl->wakeup_irq); if ((ctrl->usb_irq > 0) && (ctrl->wakeup_irq != ctrl->usb_irq)) @@ -184,6 +191,7 @@ static int wakeup_dev_probe(struct platform_device *pdev) */ ctrl->wakeup_irq = platform_get_irq(pdev, 1); ctrl->usb_irq = platform_get_irq(pdev, 1); + ctrl->thread_close = false; if (ctrl->wakeup_irq != ctrl->usb_irq) interrupt_flag = IRQF_DISABLED; else @@ -210,6 +218,7 @@ error1: static int wakeup_dev_exit(struct platform_device *pdev) { if (g_ctrl->thread) { + g_ctrl->thread_close = true; complete(&g_ctrl->event); kthread_stop(g_ctrl->thread); } -- cgit v1.2.3 From caf2a31d3947ddccff5f1660bce6ed8948007f9c Mon Sep 17 00:00:00 2001 From: Chen Liangjun Date: Mon, 23 Jul 2012 10:24:58 +0800 Subject: ENGR00218013-1 DMA:Add HDMI DMA type and priv data for imx_dma_data 1 Add HDMI sdma periphal enum type. 2 Add private data type for imx_dma_data. Signed-off-by: Chen Liangjun --- arch/arm/plat-mxc/include/mach/dma.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/plat-mxc') diff --git a/arch/arm/plat-mxc/include/mach/dma.h b/arch/arm/plat-mxc/include/mach/dma.h index ba00959c19fa..3fccb3be9e15 100644 --- a/arch/arm/plat-mxc/include/mach/dma.h +++ b/arch/arm/plat-mxc/include/mach/dma.h @@ -45,6 +45,7 @@ enum sdma_peripheral_type { IMX_DMATYPE_IPU_MEMORY, /* IPU Memory */ IMX_DMATYPE_ASRC, /* ASRC */ IMX_DMATYPE_ESAI, /* ESAI */ + IMX_DMATYPE_HDMI, }; enum imx_dma_prio { @@ -58,6 +59,7 @@ struct imx_dma_data { int dma_request_p2p; enum sdma_peripheral_type peripheral_type; int priority; + void *private; }; struct imx_pcm_dma_params { -- cgit v1.2.3 From f4f931e400ede4b5fd6152be1323446f75394219 Mon Sep 17 00:00:00 2001 From: Chen Liangjun Date: Mon, 23 Jul 2012 10:26:37 +0800 Subject: ENGR00218013-2 SDMA:Add script address for HDMI Add hdmi-sdma script enum type for SDMA script. Signed-off-by: Chen Liangjun --- arch/arm/plat-mxc/include/mach/sdma.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/plat-mxc') diff --git a/arch/arm/plat-mxc/include/mach/sdma.h b/arch/arm/plat-mxc/include/mach/sdma.h index a145c56b649d..cee7fe490188 100644 --- a/arch/arm/plat-mxc/include/mach/sdma.h +++ b/arch/arm/plat-mxc/include/mach/sdma.h @@ -45,6 +45,7 @@ struct sdma_script_start_addrs { s32 ram_code_start_addr; s32 mcu_2_ssish_addr; s32 ssish_2_mcu_addr; + s32 hdmi_dma_addr; }; /** -- cgit v1.2.3 From ba6f00cf2230db0a264566bf3720b4f1db8d3e43 Mon Sep 17 00:00:00 2001 From: make shi Date: Mon, 30 Jul 2012 15:35:11 +0800 Subject: ENGR00218771 mx6 USB:USB disconnect issue verification on MX6QTO1.2/MX6DLTO1.1 - for Rigel1.1/Arik1.2, bit 17 of HW_USBPHY_IP will be set, it will fix the issue that no wakeup between SUSP/PHCD. And the usb_platform_rh_suspend/ usb_platform_rh_resume do not need do complex software workaround, only need set/clear the workaround bit. - for Megrez , bit 17 and bit 18 of HW_USBPHY_IP will be set, it will fix the issue that no wakeup between SUSP/PHCD and disconnect after resume. No need do any software workaround. Signed-off-by: make shi --- arch/arm/plat-mxc/usb_common.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'arch/arm/plat-mxc') diff --git a/arch/arm/plat-mxc/usb_common.c b/arch/arm/plat-mxc/usb_common.c index 168808e77a18..97d963a54a54 100755 --- a/arch/arm/plat-mxc/usb_common.c +++ b/arch/arm/plat-mxc/usb_common.c @@ -63,8 +63,11 @@ bool usb_icbug_swfix_need(void) { if (cpu_is_mx6sl()) return false; - else - return true; + else if ((mx6q_revision() > IMX_CHIP_REVISION_1_1)) + return false; + else if ((mx6dl_revision() > IMX_CHIP_REVISION_1_0)) + return false; + return true; } EXPORT_SYMBOL(usb_icbug_swfix_need); -- cgit v1.2.3 From 51e5dcf9e8b61a0af97852769c4b7ae1c01951d3 Mon Sep 17 00:00:00 2001 From: Ranjani Vaidyanathan Date: Fri, 27 Jul 2012 16:41:58 -0500 Subject: ENGR00218747 - MX6Q/MX6DL: WAIT mode support for MX6QTO1.2/MX6DLTO1.1 Add the new WAIT mode workaround added for MX6Q1.2 and MX6DLTO1.1. A new bit is added to CCM_CGPR (bit 17). This bit needs to be enabled for the WAIT mode fix to be active and needs to be disabled before the system enters STOP mode with power gating enabled. Fix WAIT mode bug when system is in low power IDLE mode: In low power IDLE mode (AHB @ 24MHz), switch ARM to run from 24MHz on MX6QTO1.1 and MX6DLTO1.0 chips when ARM core enters WAIT mode. We still need to use the ARM:IPG_CLK ratio of 12:5. Since IPG_CLK is at 12MHz, we need to run ARM below 28.8MHz. Signed-off-by: Ranjani Vaidyanathan --- arch/arm/plat-mxc/cpufreq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'arch/arm/plat-mxc') diff --git a/arch/arm/plat-mxc/cpufreq.c b/arch/arm/plat-mxc/cpufreq.c index b31970c667d2..765f05e23712 100755 --- a/arch/arm/plat-mxc/cpufreq.c +++ b/arch/arm/plat-mxc/cpufreq.c @@ -56,6 +56,7 @@ extern struct regulator *cpu_regulator; extern int dvfs_core_is_active; extern struct cpu_op *(*get_cpu_op)(int *op); extern int low_bus_freq_mode; +extern int audio_bus_freq_mode; extern int high_bus_freq_mode; extern int set_low_bus_freq(void); extern int set_high_bus_freq(int high_bus_speed); @@ -85,7 +86,7 @@ int set_cpu_freq(int freq) #endif /*Set the voltage for the GP domain. */ if (freq > org_cpu_rate) { - if (low_bus_freq_mode) + if (low_bus_freq_mode || audio_bus_freq_mode) set_high_bus_freq(0); ret = regulator_set_voltage(cpu_regulator, gp_volt, gp_volt); @@ -108,7 +109,8 @@ int set_cpu_freq(int freq) printk(KERN_DEBUG "COULD NOT SET GP VOLTAGE!!!!\n"); return ret; } - if (low_freq_bus_used() && !low_bus_freq_mode) + if (low_freq_bus_used() && + !(low_bus_freq_mode || audio_bus_freq_mode)) set_low_bus_freq(); } -- cgit v1.2.3