Commit dd3dd384 authored by Mike Frysinger's avatar Mike Frysinger Committed by Bryan Wu

Blackfin arch: rewrite dma_memcpy() and dma in/out functions

- unify all dma in/out functions (takes ~35 lines of code now)
- unify dma_memcpy with dma in/out functions (1 place that touches MDMA0
  registers)
- add support for 32bit transfers
- cleanup dma_memcpy code to be much more readable
- irqs are disabled only while programming MDMA registers rather than
  the entire transaction
Signed-off-by: default avatarMike Frysinger <vapier.adi@gmail.com>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent 49946e73
...@@ -178,6 +178,7 @@ void dma_enable_irq(unsigned int channel); ...@@ -178,6 +178,7 @@ void dma_enable_irq(unsigned int channel);
void clear_dma_irqstat(unsigned int channel); void clear_dma_irqstat(unsigned int channel);
void *dma_memcpy(void *dest, const void *src, size_t count); void *dma_memcpy(void *dest, const void *src, size_t count);
void *safe_dma_memcpy(void *dest, const void *src, size_t count); void *safe_dma_memcpy(void *dest, const void *src, size_t count);
void blackfin_dma_early_init(void);
extern int channel2irq(unsigned int channel); extern int channel2irq(unsigned int channel);
extern struct dma_register *dma_io_base_addr[MAX_DMA_CHANNELS]; extern struct dma_register *dma_io_base_addr[MAX_DMA_CHANNELS];
......
This diff is collapsed.
...@@ -154,6 +154,8 @@ void __init bfin_relocate_l1_mem(void) ...@@ -154,6 +154,8 @@ void __init bfin_relocate_l1_mem(void)
unsigned long l1_data_b_length; unsigned long l1_data_b_length;
unsigned long l2_length; unsigned long l2_length;
blackfin_dma_early_init();
l1_code_length = _etext_l1 - _stext_l1; l1_code_length = _etext_l1 - _stext_l1;
if (l1_code_length > L1_CODE_LENGTH) if (l1_code_length > L1_CODE_LENGTH)
panic("L1 Instruction SRAM Overflow\n"); panic("L1 Instruction SRAM Overflow\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment