Unsure of the author's intentions, rather than just removing the nop,
we're replacing it with a comment containing the possible intention
of the statement OR:ing with 0.
Cc: Dan Williams <[email protected]>
Cc: Per Forlin <[email protected]>
Cc: Rabin Vincent <[email protected]>
Acked-by: Vinod Koul <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
When a DMA client requests and configures a DMA channel, it requests
data_width in Bytes. The DMA40 driver then swiftly converts it over to
the necessary register bit value. Unfortunately, for any subsequent
calculations we have to shift '1' by the bit pattern (1 << data_width)
times to make any sense of it.
This patch flips the semantics on its head and only converts the value
to its respective register bit pattern when writing to registers. This
way we can use the true data_width (in Bytes) value.
Cc: Dan Williams <[email protected]>
Cc: Per Forlin <[email protected]>
Cc: Rabin Vincent <[email protected]>
Acked-by: Vinod Koul <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
STEDMA40_*_TO_* direction definitions are identical in all but name to
the pre-defined generic DMA_*_TO_* ones. Let's make things easy by not
duplicating such things.
Cc: Dan Williams <[email protected]>
Cc: Per Forlin <[email protected]>
Cc: Rabin Vincent <[email protected]>
Acked-by: Vinod Koul <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
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]>
During the initial setup of a logical channel, it is necessary to unmask
the GIM in order to receive generated terminal count and error interrupts.
We're separating out this required code so it will be possible to move
the remaining code in d40_phy_cfg(), which is mostly runtime configuration
into the runtime_config() routine.
Cc: Dan Williams <[email protected]>
Cc: Per Forlin <[email protected]>
Cc: Rabin Vincent <[email protected]>
Acked-by: Vinod Koul <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Devices which utilise DMA use the same device numbers for transmitting
and receiving. In this patch we encode the source and destination
information into one single attribute. We can subsequently exploit the
direction attribute to see which of the transfer directions are being
described. This also lessens the burden on platform data.
Cc: Dan Williams <[email protected]>
Cc: Per Forlin <[email protected]>
Cc: Rabin Vincent <[email protected]>
Acked-by: Vinod Koul <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
lcpa and lcla are written often and the cache_sync() overhead in writel
is costly, especially for wlan where every single network packet (in RX
mode) corresponds to a separate DMA transfer.
Signed-off-by: Per Forlin <[email protected]>
Reviewed-by: Narayanan Gopalakrishnan <[email protected]>
Reviewed-by: Rabin Vincent <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Acked-by: Vinod Koul <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
This patch sets the SSCFG/SDCFG bit[7] PRI only for physical channel
requests with high priority. For logical channels, this bit will be
zero.
Signed-off-by: Narayanan G <[email protected]>
Reviewed-by: Rabin Vincent <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Acked-by: Vinod Koul <[email protected]>
Signed-off-by: Fabio Baltieri <[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]>
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]>
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 don't want interrupts when the source is done, only when
the destination is done and everything is complete at the
recieveing end of a transfer.
Signed-off-by: Jonas Aaberg <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
This cleans up some extra newlines, removes some code duplication
and moves the code to comply better with checkpatch.
Signed-off-by: Jonas Aaberg <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Dan Williams <[email protected]>