The majority of configuration done in d40_phy_config() pertains
to physical channels. Move the call over to runtime config which
has different code paths for physical and logical channels already,
and make it an exclusive physical channel config function as the
name implies, and drop the is_log argument.
Since we moved the call to runtime_config() it only gets called
for device transfers, so encode the small snippet of configuration
pertaining to memcpy channels into the d40_config_memcpy()
function.
Acked-by: Vinod Koul <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
[rewrote the commit message]
Signed-off-by: Linus Walleij <[email protected]>
U8540 DMA controller is different from u9540 we need define new
registers and use them to support handling more than 128 event lines.
Signed-off-by: Tong Liu <[email protected]>
Reviewed-by: Per Forlin <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Acked-by: Vinod Koul <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
can be directly stopped by issuing a SUSPEND_REQ on the EE
bits. There is no need to suspend the physical channel and
restart it.
Also, the support for pre-V2 hw is discontinued.
EE bits for writing:
00: disable only if AS=11 or AS=00
01: enable
10: suspend_req only if AS=01 & EE=01 or EE=11
11: round / no change for writing
Signed-off-by: Narayanan G <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
This patch adds power management support to the dma40
driver. The DMA registers are backed up and restored,
during suspend/resume. Also flags to track the dma usage
have been introduced to facilitate this. Patch also includes
few other minor changes, related to formatting, comments.
Signed-off-by: Narayanan G <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
The DMA40 is not a PrimeCell from ARM, but it still use the same
ID registers. So let's utilize the existing macros in the
PrimeCell header to identify manufacturer and revision of the IP
block instead of reinventing the wheel.
Cc: Robert Marklund <[email protected]>
Cc: Per Forlin <[email protected]>
Cc: Rabin Vincent <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
The maximum transfer size of the stedma40 is (64k-1) x data-width.
If the transfer size of one element exceeds this limit
the job is split up and sent as linked transfer.
Signed-off-by: Per Forlin <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
Defaults are "basic mode" for physical channels, and "logical source
logical destination" for logical channels.
Acked-by: Jonas Aaberg <[email protected]>
Signed-off-by: Rabin Vincent <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
LLI allocation is now done on job level instead of channel level.
Previously the maximum length of a linked job in hw on a logical
channel was 8, since the LLIs where evenly divided. Now only
executing jobs have allocated LLIs which increase the length to
a maximum of 64 links in HW.
Signed-off-by: Jonas Aaberg <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
This patch includes non functional code clean up changes,
file header updates and a few magic numbers got defined.
Signed-off-by: Jonas Aaberg <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
If a new job is added on a physical channel that already has
a job, the new job is linked in hw to the old job instead of
queueing up the jobs.
Signed-off-by: Jonas Aaberg <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
Make sure to extract the revision field explicitly and document
what bits are being accessed here without magic numbers.
Signed-off-by: Jonas Aaberg <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
The callback got called even when it was not supposed to. Also
removed some not needed interrupt trigger on/off code.
Signed-off-by: Jonas Aaberg <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
Switch to allocating LCLA in memory instead of having a fixed
address.
Signed-off-by: Jonas Aaberg <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
We only need to write the configuration to a physical channel if
it is free, else it is already written.
Signed-off-by: Jonas Aaberg <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Dan Williams <[email protected]>