[PATCH] arm: omap4: panda: fix initialize musb

2010-12-09 Thread tom . leiming
From: Ming Lei Obviously we should only initialize musb once. Signed-off-by: Ming Lei --- arch/arm/mach-omap2/board-omap4panda.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 225

[PATCH 1/2] USB: musb-gadget: fix bulk IN infinite hangs in double buffer case

2010-08-27 Thread tom . leiming
From: Ming Lei This patch fixes one infinite hang of bulk IN transfer in double buffer case, the hang can be observed easily by test #6 of usbtest if musb is configured as g_zero and fifo mode 3 is taken to enable double fifo. In fact, the patch only removes the check for non-empty fifo before l

[PATCH 2/2] USB: musb-gadget: fix OUT transfer in double buffer case

2010-08-27 Thread tom . leiming
From: Ming Lei This patch fixes two bugs of OUT transfer in double buffer case: -USE_MODE1 should be enabled except for ANOMALY_05000456 case, or else may cause infinite hang and data error bug in double buffer -DMA length should not go beyond the availabe space of reque

[PATCH 1/2] USB: musb-gadget: enable autoclear for OUT transfer in both DMA 0 and DMA 1

2010-08-27 Thread tom . leiming
From: Ming Lei This patch fixes one bugs of OUT transfer in double buffer case: -the current code only enable autoclear for dma mode 1, and not for dma mode 0 Without this patch, test #5 of usbtest can't be passed if we configure musb as g_zero and use fifo mode 3 to enable double buffer mode.

[PATCH 2/2] USB: musb-gadget: fix DMA length for OUT transfer

2010-08-27 Thread tom . leiming
From: Ming Lei DMA length should not go beyond the availabe space of request buffer, so fix it. Signed-off-by: Ming Lei Cc: Anand Gadiyar Cc: Mike Frysinger Cc: Sergei Shtylyov --- drivers/usb/musb/musb_gadget.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dr

[PATCH] USB: musb: move musb debugfs entry under usb debugfs root dir

2010-08-27 Thread tom . leiming
From: Ming Lei All hcd's debugfs entries are under usb debugfs root dir already, so musb should not be a exception. Signed-off-by: Ming Lei --- drivers/usb/musb/musb_debugfs.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/musb/musb_debugfs.c b/drivers/us

[PATCH] USB: otg: twl4030: fix phy initialization

2010-09-02 Thread tom . leiming
From: Ming Lei Commit 461c317705eca5cac09a360f488715927fd0a927(into 2.6.36-v3) is put forward to power down phy if no usb cable is connected, but does introduce the two issues below: 1), phy is not into work state if usb cable is connected with PC during poweron, so musb device mode is not usabl

[PATCH] USB: otg: twl4030: fix phy initialization(v1)

2010-09-06 Thread tom . leiming
From: Ming Lei Commit 461c317705eca5cac09a360f488715927fd0a927(into 2.6.36-v3) is put forward to power down phy if no usb cable is connected, but does introduce the two issues below: 1), phy is not into work state if usb cable is connected with PC during poweron, so musb device mode is not usabl

[RESEND/PATCH 0/6] USB: musb-gadget: bug fix

2010-09-07 Thread tom . leiming
This patch set fixes two kinds of musb-gadget bug: -fix kernel panic if using out ep with FIFO_TXRX style -make double buffer mode usable, fix infinate hangs and buffer corrupt bug when using double buffer mode to do data transfer; now we can use musb double buffer

[RESEND/PATCH 1/6] USB: musb-gadget: fix kernel panic if using out ep with FIFO_TXRX style(v1)

2010-09-07 Thread tom . leiming
From: Ming Lei For shared fifo hw endpoint(with FIFO_TXRX style), only ep_in field of musb_hw_ep is intialized in musb_g_init_endpoints, and ep_out is not initialized, but musb_g_rx and rxstate may access ep_out field of musb_hw_ep by the method below: musb_ep = &musb->endpoints[epnum].e

[RESEND/PATCH 2/6] USB: musb-gadget: fix bulk IN infinite hangs in double buffer case

2010-09-07 Thread tom . leiming
From: Ming Lei This patch fixes one infinite hang of bulk IN transfer in double buffer case, the hang can be observed easily by test #6 of usbtest if musb is configured as g_zero and fifo mode 3 is taken to enable double fifo. In fact, the patch only removes the check for non-empty fifo before l

[RESEND/PATCH 3/6] USB: musb-gadget: enable autoclear for OUT transfer in both DMA 0 and DMA 1

2010-09-07 Thread tom . leiming
From: Ming Lei This patch fixes one bugs of OUT transfer in double buffer case: -the current code only enable autoclear for dma mode 1, and not for dma mode 0 Without this patch, test #5 of usbtest can't be passed if we configure musb as g_zero and use fifo mode 3 to enable doub

[RESEND/PATCH 4/6] USB: musb-gadget: fix DMA length for OUT transfer

2010-09-07 Thread tom . leiming
From: Ming Lei DMA length should not go beyond the availabe space of request buffer, so fix it. Signed-off-by: Ming Lei Acked-by: Anand Gadiyar Cc: David Brownell Cc: Felipe Balbi Cc: Anand Gadiyar Cc: Mike Frysinger Cc: Sergei Shtylyov --- drivers/usb/musb/musb_gadget.c |5 +++--

[RESEND/PATCH 5/6] USB: musb-gadget: complete request only if data is transfered over

2010-09-07 Thread tom . leiming
From: Ming Lei Complete the current request only if the data transfer is over. Signed-off-by: Ming Lei Cc: David Brownell Cc: Felipe Balbi Cc: Anand Gadiyar Cc: Mike Frysinger Cc: Sergei Shtylyov --- drivers/usb/musb/musb_gadget.c | 16 1 files changed, 8 insertions(+),

[RESEND/PATCH 6/6] USB: musb-gadget: fix dma length in txstate

2010-09-07 Thread tom . leiming
From: Ming Lei DMA length should not go beyond the availabe space of request buffer, so fix it. Signed-off-by: Ming Lei Cc: David Brownell Cc: Felipe Balbi Cc: Anand Gadiyar Cc: Mike Frysinger Cc: Sergei Shtylyov --- drivers/usb/musb/musb_gadget.c | 18 +- 1 files change

[PATCH] mfd: speedup twl4030 irq response time and decrease irq disable time

2010-09-21 Thread tom . leiming
From: Ming Lei This patch sets scheduler policy of twl4030 irq thread (twl4030_irq_thread) as SCHED_FIFO to speedup irq response time, just like taken by kernel threaded irq in irq_thread (kernel/irq/manage.c). Also higher priority than that of threaded irq is taken to avoid preemption from twl40

[PATCH] OMAP: mmc: remove ifdef in omap_mmc_platform_data defination

2010-10-04 Thread tom . leiming
From: Ming Lei The instance of omap_mmc_platform_data is alwasy passed to mmc omap host driver from board, so remove ifdef in omap_mmc_platform_data defination to simplify handling it in mmc omap host driver. The patch fixes the compile error below: drivers/mmc/host/omap.c: In function 'mmc_oma

[PATCH] arm: omap4: panda: remove usb_nop_xceiv_register

2011-01-04 Thread tom . leiming
From: Ming Lei Panda uses twl6030 otg phy instead of internal phy, so removes usb_nop_xceiv_register to make musb working. Cc: Felipe Balbi Signed-off-by: Ming Lei --- arch/arm/mach-omap2/board-omap4panda.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/arm/mac

[PATCH] arm: omap4: panda: remove usb_nop_xceiv_register(v1)

2011-01-05 Thread tom . leiming
From: Ming Lei Panda uses both twl6030 otg phy(vbus, id) and internal phy(data lines, DP/DM), so removes usb_nop_xceiv_register to make twl6030 otg driver working since current otg code only supports one global transceiver. Otherwise, musb doesn't work without the remove. Reviewd-by: Felipe Balb

[PATCH] OMAP3:PM: fix lockdep warning caused by omap3_pm_init

2009-08-22 Thread tom . leiming
From: Ming Lei This patch uses kmalloc(size,GFP_ATOMIC) instead of kmalloc(size,GFP_KERNEL) to allocate memory for instance of struct power_state in pwrdms_setup(), since it may be called by pwrdm_for_each() with irq disabled. It is a easy fix for the following lockdep warning caused by kmalloc(

[PATCH 3/3] arm: omap4: support pmu

2011-03-01 Thread tom . leiming
From: Ming Lei This patch supports pmu irq routed from CTI, so make pmu/perf working on OMAP4. The idea is from Woodruff Richard in the disscussion "Oprofile on Pandaboard / Omap4" of pandabo...@googlegroups.com. Cc: Woodruff Richard Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Signed-off

[patch v1 3/3] arm: omap4: support pmu

2011-03-01 Thread tom . leiming
From: Ming Lei This patch supports pmu irq routed from CTI, so make pmu/perf working on OMAP4. The idea is from Woodruff Richard in the disscussion "Oprofile on Pandaboard / Omap4" of pandabo...@googlegroups.com. Cc: Woodruff Richard Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Signed-off

[patch v2 3/3] arm: omap4: support pmu

2011-03-02 Thread tom . leiming
From: Ming Lei This patch supports pmu irq routed from CTI, so make pmu/perf working on OMAP4. The idea is from Woodruff Richard in the disscussion about "Oprofile on Pandaboard / Omap4" on pandabo...@googlegroups.com. Cc: Woodruff Richard Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Sign

[patch v3 3/3] arm: omap4: support pmu

2011-03-03 Thread tom . leiming
From: Ming Lei This patch supports pmu irq routed from CTI, so make pmu/perf working on OMAP4. The idea is from Woodruff Richard in the disscussion about "Oprofile on Pandaboard / Omap4" on pandabo...@googlegroups.com. Cc: Santosh Shilimkar Cc: Woodruff Richard Cc: Tony Lindgren Cc: linux-om

[patch v4 3/3] arm: omap4: support pmu

2011-03-08 Thread tom . leiming
From: Ming Lei This patch supports pmu irq routed from CTI, so make pmu/perf working on OMAP4. The idea is from Woodruff Richard in the disscussion about "Oprofile on Pandaboard / Omap4" on pandabo...@googlegroups.com. Acked-by: Jean Pihet Acked-by: Tony Lindgren Acked-by: Santosh Shilimkar

[PATCH] arm: omap2: fix build failure

2011-11-07 Thread tom . leiming
From: Ming Lei The patch fixes the compile failure: CC arch/arm/mach-omap2/cpuidle34xx.o arch/arm/mach-omap2/cpuidle34xx.c:317:12: error: 'THIS_MODULE' undeclared here (not in a function) make[1]: *** [arch/arm/mach-omap2/cpuidle34xx.o] Error 1 make: *** [arch/arm/mach-omap2] Error 2 make

[PATCH] arm: omap2: select ARM_AMBA if OMAP3_EMU is defined

2011-11-07 Thread tom . leiming
From: Ming Lei This patch selects ARM_AMBA if OMAP3_EMU is defined because OC_ETM depends on ARM_AMBA, so fix the link failure[1]. [1], arch/arm/kernel/built-in.o: In function `etm_remove': /home/tom/git/omap/linux-2.6-omap/arch/arm/kernel/etm.c:609: undefined reference to `amba_release_regions'

[PATCH] iommu: omap: fix compile failure

2011-11-08 Thread tom . leiming
From: Ming Lei Fix the failure below: CC drivers/iommu/omap-iommu-debug.o drivers/iommu/omap-iommu-debug.c:416:20: error: expected declaration specifiers or '...' before string constant drivers/iommu/omap-iommu-debug.c:416:1: warning: data definition has no type or storage class drivers/i

[PATCH -next] arm: omap2: fix compile failure on arch/arm/mach-omap2/cpuidle34xx.c

2011-11-16 Thread tom . leiming
From: Ming Lei CC arch/arm/mach-omap2/cpuidle34xx.o arch/arm/mach-omap2/cpuidle34xx.c: In function 'omap3_enter_idle': arch/arm/mach-omap2/cpuidle34xx.c:117:2: error: implicit declaration of function 'omap_irq_pending' make[1]: *** [arch/arm/mach-omap2/cpuidle34xx.o] Error 1 make: *** [arc

[PATCH] mfd: omap-usb-host: fix build failure

2011-08-19 Thread tom . leiming
From: Ming Lei The patch fixes the build failure: drivers/mfd/omap-usb-host.c:1034:1: warning: data definition has no type or storage class drivers/mfd/omap-usb-host.c:1034:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' drivers/mfd/omap-usb-host.c:1034:1: warning: param

[PATCH 1/3] trace points: power: remove 'cpu_id' from trace_clock_*

2011-08-19 Thread tom . leiming
From: Ming Lei This patch removes the 'cpu_id' parameter of the clock_* trace point, based on the ideas below: - the cpu_id which is passed to trace point is always the current cpu - the current cpu info has been included into the trace result already - smp_processor_id() can't be used safely

[PATCH 2/3] trace points: power: remove 'cpu_id' from trace_power_domain_target

2011-08-19 Thread tom . leiming
From: Ming Lei This patch removes the 'cpu_id' parameter of the power_domain_target trace point, based on the ideas below: - the cpu_id which is passed to trace point is always the current cpu - the current cpu info has been included into the trace result already - smp_processor_id() can't b

[PATCH 3/3] trace points: power: remove 'cpu_id' from trace_cpu_idle

2011-08-19 Thread tom . leiming
From: Ming Lei This patch removes the 'cpu_id' parameter of the cpu_idle trace point, based on the ideas below: - the cpu_id which is passed to trace point is always the current cpu - the current cpu info has been included into the trace result already - smp_processor_id() can't be used safe

[PATCH] ARM: fix mistaken dependency for CPU_HAS_PMU

2011-05-17 Thread tom . leiming
From: Ming Lei Obviously it is mistake for CPU_HAS_PMU to depend on (!ARCH_OMAP3 || OMAP3_EMU). No mattery it is omap3 or not, we can build pmu.o into kernel safely. In fact, arm-v7 of omap3 has pmu inside also. So fix it that we can build pmu into kernel to support perf for some valid config(s

[PATCH 0/3] OMAP4&drivers/misc: introduce face detection module driver

2011-11-25 Thread tom . leiming
Hi, These patches(against -next tree) introduce a device driver under drivers/misc for enabling one face detection IP[1] which is integrated inside OMAP4 SoC currently, and have some OMAP4 platform dependent changes to make the module workable on OMAP4 SoC. For verification purpose, I write one u

[PATCH 1/3] omap4: introduce fdif(face detect module) hwmod

2011-11-25 Thread tom . leiming
From: Ming Lei Signed-off-by: Ming Lei --- arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 81 1 files changed, 81 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 6cf21ee..30db

[PATCH 2/3] omap4: build fdif omap device from hwmod

2011-11-25 Thread tom . leiming
From: Ming Lei Signed-off-by: Ming Lei --- arch/arm/mach-omap2/devices.c | 33 + 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 1166bdc..a392af5 100644 --- a/arch/arm/mach-omap

[PATCH 3/3] drivers/misc: introduce face detection module driver(fdif)

2011-11-25 Thread tom . leiming
From: Ming Lei One face detection IP[1] is integared inside OMAP4 SoC, so introduce this driver to make face detection function work on OMAP4 SoC. This driver is platform independent, so in theory can be used to drive same IP module on other platforms. [1], ch9 of OMAP4 TRM Signed-off-by: Ming