Re: [PATCH] clk: ti: Fix FAPLL udelay in clk_enable with clk_prepare

2015-09-22 Thread Russell King - ARM Linux
On Tue, Sep 22, 2015 at 02:23:05PM -0700, Tony Lindgren wrote: > As recently pointed out (again) by Thomas and Russell, we must not > wait in in clk_enable. The wait for PLL to lock needs to happen > in clk_prepare instead. > > It seems this is a common copy paste error with the PLL drivers, >

[PATCH] clk: ti: Fix FAPLL udelay in clk_enable with clk_prepare

2015-09-22 Thread Tony Lindgren
As recently pointed out (again) by Thomas and Russell, we must not wait in in clk_enable. The wait for PLL to lock needs to happen in clk_prepare instead. It seems this is a common copy paste error with the PLL drivers, and similar fixes should be applied to other PLL drivers after testing. Cc:

[PATCH v3 1/3] mailbox/omap: Add ti,mbox-send-noirq quirk to fix AM33xx CPU Idle

2015-09-22 Thread Dave Gerlach
The mailbox framework controls the transmission queue and requires either its controller implementations or clients to run the state machine for the Tx queue. The OMAP mailbox controller uses a Tx-ready interrupt as the equivalent of a Tx-done interrupt to run this Tx queue state-machine. The

[PATCH v3 3/3] soc: ti: Add wkup_m3_ipc driver

2015-09-22 Thread Dave Gerlach
Introduce a wkup_m3_ipc driver to handle communication between the MPU and Cortex M3 wkup_m3 present on am335x. This driver is responsible for actually booting the wkup_m3_rproc and also handling all IPC which is done using the IPC registers in the control module, a mailbox, and a separate

[PATCH v3 0/3] soc: ti: Introduce wkup_m3_ipc driver

2015-09-22 Thread Dave Gerlach
Hi, This series is version 3 of the code to introduce a wkup_m3_ipc driver to handle communication between the MPU and Cortex M3 present on TI AM335x and AM437x SoCs. v2 of this series can be found at [1]. Only patch 3 has been changed based on a request from Tony and a few cleanups: - Rather

[PATCH v3 2/3] Documentation: dt: add bindings for TI Wakeup M3 IPC device

2015-09-22 Thread Dave Gerlach
Add the device tree bindings document for the TI Wakeup M3 IPC device on AM33xx and AM43xx SoCs. These devices are used by the TI wkup_m3_ipc driver, and contain the registers upon which the IPC protocol to communicate with the Wakeup M3 processor is implemented. Signed-off-by: Dave Gerlach

Re: [PATCH 00/38] Fixes related to incorrect usage of unsigned types

2015-09-22 Thread Andrzej Hajda
On 09/21/2015 03:42 PM, David Howells wrote: > Andrzej Hajda wrote: > >> Semantic patch finds comparisons of types: >> unsigned < 0 >> unsigned >= 0 >> The former is always false, the latter is always true. >> Such comparisons are useless,

Re: [PATCH 3/3] mfd: Add battery charger as subdevice to the tps65217.

2015-09-22 Thread Enric Balletbo Serra
2015-09-20 6:19 GMT+02:00 Lee Jones : > On Tue, 08 Sep 2015, Enric Balletbo i Serra wrote: > >> Add tps65217 battery charger subdevice. >> >> Signed-off-by: Enric Balletbo i Serra >> --- >> drivers/mfd/tps65217.c | 4 >> 1 file changed, 4

Re: [PATCH 2/3] power_supply: Add support for tps65217-charger.

2015-09-22 Thread Sebastian Reichel
Hi, On Tue, Sep 08, 2015 at 10:09:38AM +0200, Enric Balletbo i Serra wrote: > This patch adds support for the tps65217 charger driver. This driver is > responsible for controlling the charger aspect of the tps65217 mfd. > Currently, this mainly consists of turning on and off the charger, but >

[PATCH v3 19/24] dmaengine: edma: Simplify the interrupt handling

2015-09-22 Thread Peter Ujfalusi
With the merger of the arch/arm/common/edma.c code into the dmaengine driver, there is no longer need to have per channel callback/data storage for interrupt events. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 447

[PATCH v3 08/24] ARM/dmaengine: edma: Remove limitation on the number of eDMA controllers

2015-09-22 Thread Peter Ujfalusi
Since the driver stack no longer depends on lookup with id number in a global array of pointers, the limitation for the number of eDMAs are no longer needed. We can handle as many eDMAs in legacy and DT boot as we have memory for them to allocate the needed structures. Signed-off-by: Peter

[PATCH v3 04/24] ARM: davinci/common: Convert edma driver to handle one eDMA instance per driver

2015-09-22 Thread Peter Ujfalusi
Currently we have one device created to handle all (maximum 2) eDMAs in the system. With this change all eDMA instance will have it's own device/driver. This change is needed for further cleanups in the eDMA driver stack since the one device/driver to handle all eDMAs in the system was not

[PATCH v3 09/24] ARM: davinci: Use platform_device_register_full() to create pdev for eDMA

2015-09-22 Thread Peter Ujfalusi
Convert the eDMA platform device creation to use struct platform_device_info XX __initconst and platform_device_register_full() This will allow us to cleanly specify the dma_mask for the devices in an upcoming patch. Signed-off-by: Peter Ujfalusi ---

[PATCH v3 12/24] dmaengine: edma: Parameter alignment and long line fixes

2015-09-22 Thread Peter Ujfalusi
Makes the code a bit more readable. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 84 -- 1 file changed, 44 insertions(+), 40 deletions(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index

[PATCH v3 11/24] dmaengine: edma: Allocate memory dynamically for bitmaps and structures

2015-09-22 Thread Peter Ujfalusi
Instead of using defines to specify the size of different arrays and bitmaps, allocate the memory for them based on the information we get from the HW itself. Since these defines are set based on the worst case, there are devices where they are not valid. Signed-off-by: Peter Ujfalusi

[PATCH v3 06/24] ARM: common: edma: Internal API to use pointer to 'struct edma'

2015-09-22 Thread Peter Ujfalusi
Merge the iomem into the 'struct edma' and change the internal (static) functions to use pointer to the edma_cc instead of the ctlr number. Signed-off-by: Peter Ujfalusi --- arch/arm/common/edma.c | 400 - 1 file changed,

[PATCH v3 14/24] dmaengine: edma: Cleanup regarding the use of dev around the code

2015-09-22 Thread Peter Ujfalusi
Be consistent and do not mix the use of dev, >dev, etc in the functions. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index

[PATCH v3 13/24] dmaengine: edma: Use devm_kcalloc when possible

2015-09-22 Thread Peter Ujfalusi
When allocating a memory for number of items it is better (looks better) to use devm_kcalloc. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index

[PATCH v3 16/24] dmaengine: edma: Use the edma_write_slot instead open coded memcpy_toio

2015-09-22 Thread Peter Ujfalusi
edma_write_slot() is for writing an entire paRAM slot. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index fe8cde21b497..d759abc80bef 100644 ---

[PATCH v3 15/24] dmaengine: edma: Use dev_dbg instead pr_debug

2015-09-22 Thread Peter Ujfalusi
We have access to dev, so it is better to use the dev_dbg for debug prints. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index

[PATCH v3 07/24] ARM/dmaengine: edma: Public API to use private struct pointer

2015-09-22 Thread Peter Ujfalusi
Instead of relying on indexes pointing to edma private date in the global pointer array, pass the private data pointer via the public API. Signed-off-by: Peter Ujfalusi --- arch/arm/common/edma.c | 305 ++--- drivers/dma/edma.c

[PATCH v3 17/24] dmaengine: edma: Print warning when linking slots from different eDMA

2015-09-22 Thread Peter Ujfalusi
Warning message in case of linking between paRAM slots in different eDMA controllers. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index d759abc80bef..b0102984e98d

Re: [PATCH 00/38] Fixes related to incorrect usage of unsigned types

2015-09-22 Thread Jacek Anaszewski
On 09/22/2015 11:13 AM, Andrzej Hajda wrote: On 09/21/2015 03:42 PM, David Howells wrote: Andrzej Hajda wrote: Semantic patch finds comparisons of types: unsigned < 0 unsigned >= 0 The former is always false, the latter is always

[PATCH v3 10/24] ARM: davinci: Add set dma_mask to eDMA devices

2015-09-22 Thread Peter Ujfalusi
The upcoming change to merge the arch/arm/common/edma.c into drivers/dma/edma.c will need this change when booting daVinci devices in no DT mode. Signed-off-by: Peter Ujfalusi --- arch/arm/Kconfig |1 - arch/arm/common/Kconfig |3

[PATCH v3 22/24] dmaengine: edma: Read channel mapping support only once from HW

2015-09-22 Thread Peter Ujfalusi
Instead of directly reading it from CCCFG register take the information out once when we set up the configuration from the HW. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git

[PATCH v3 20/24] dmaengine: edma: Move the pending error check into helper function

2015-09-22 Thread Peter Ujfalusi
In the ccerr interrupt handler the code checks for pending errors in the error status registers in two different places. Move the check out to a helper function. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 20 1 file changed, 12

[PATCH v3 18/24] dmaengine: edma: Consolidate the comments for functions

2015-09-22 Thread Peter Ujfalusi
Remove or rewrite the comments for the internal functions. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 86 +++--- 1 file changed, 11 insertions(+), 75 deletions(-) diff --git a/drivers/dma/edma.c

[PATCH v3 23/24] dmaengine: edma: Rename bitfields for slot and channel usage tracking

2015-09-22 Thread Peter Ujfalusi
The names chosen for the bitfields were quite confusing and given no real information on what they are used for... edma_inuse -> slot_inuse: tracks the slot usage/availability edma_unused -> channel_unused: tracks the channel usage/availability Signed-off-by: Peter Ujfalusi

[PATCH v3 21/24] dmaengine: edma: Simplify and optimize ccerr interrupt handler

2015-09-22 Thread Peter Ujfalusi
No need to run through the bits in QEMR and CCERR events since they will not trigger any action, so just clearing the errors there is fine. In case of the missed event the loop can be optimized so we spend less time to handle the event. Signed-off-by: Peter Ujfalusi ---

[PATCH v3 00/24] dmaengine/ARM: Merge the edma drivers into one

2015-09-22 Thread Peter Ujfalusi
Hi, Changes since v2: - devm_kasprintf format string fixed - Additional patch to enable dynamic paRAM slot usage when the channel mapping is supported by the eDMA module. On am335x we have 256 paRAM slots and 64 DMA channels, this means that we had 64 slots 'locked away' all the time. The

[PATCH v3 03/24] dmaengine: edma: Simplify and optimize the edma_execute path

2015-09-22 Thread Peter Ujfalusi
The code path in edma_execute() and edma_callback() can be simplified and make it more optimal. There is not need to call in to edma_execute() when the transfer has been finished for example. Also the handling of missed/first or next batch of paRAMs can be done in a more optimal way.

[PATCH v3 02/24] ARM: common: edma: Remove unused functions

2015-09-22 Thread Peter Ujfalusi
We no longer have users for these functions so they can be removed. Remove also unused enums from the header file. Signed-off-by: Peter Ujfalusi --- arch/arm/common/edma.c | 376 - include/linux/platform_data/edma.h | 33

[PATCH v3 05/24] ARM/dmaengine: edma: Move of_dma_controller_register to the dmaengine driver

2015-09-22 Thread Peter Ujfalusi
If the of_dma_controller is registered in the non dmaengine driver we could have race condition: the of_dma_controller has been registered, but the dmaengine driver is not yet probed. Drivers requesting DMA channels during this window will fail since we do not yet have dmaengine drivers

[PATCH v3 01/24] ARM: common: edma: Fix channel parameter for irq callbacks

2015-09-22 Thread Peter Ujfalusi
In case when the interrupt happened for the second eDMA the channel number was incorrectly passed to the client driver. Signed-off-by: Peter Ujfalusi CC: --- arch/arm/common/edma.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff

[PATCH v3 24/24] dmaengine: edma: Dynamic paRAM slot handling if HW supports it

2015-09-22 Thread Peter Ujfalusi
If the eDMA3 has support for channel paRAM slot mapping we can utilize it to allocate slots on demand and save precious slots for real transfers. On am335x the eDMA has 64 channels which means we can unlock 64 paRAM slots out from the available 256. Signed-off-by: Peter Ujfalusi

Re: [PATCH 3/3] mfd: Add battery charger as subdevice to the tps65217.

2015-09-22 Thread Sebastian Reichel
Hi, On Tue, Sep 22, 2015 at 09:43:50AM +0200, Enric Balletbo Serra wrote: > 2015-09-20 6:19 GMT+02:00 Lee Jones : > > On Tue, 08 Sep 2015, Enric Balletbo i Serra wrote: > > > >> Add tps65217 battery charger subdevice. > >> > >> Signed-off-by: Enric Balletbo i Serra