diff options
Diffstat (limited to 'arch/mips/txx9/generic/setup_tx4938.c')
-rw-r--r-- | arch/mips/txx9/generic/setup_tx4938.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/arch/mips/txx9/generic/setup_tx4938.c b/arch/mips/txx9/generic/setup_tx4938.c index 3925219b897..b2b85293cd4 100644 --- a/arch/mips/txx9/generic/setup_tx4938.c +++ b/arch/mips/txx9/generic/setup_tx4938.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <asm/txx9pio.h> | 24 | #include <asm/txx9pio.h> |
25 | #include <asm/txx9/generic.h> | 25 | #include <asm/txx9/generic.h> |
26 | #include <asm/txx9/ndfmc.h> | 26 | #include <asm/txx9/ndfmc.h> |
27 | #include <asm/txx9/dmac.h> | ||
27 | #include <asm/txx9/tx4938.h> | 28 | #include <asm/txx9/tx4938.h> |
28 | 29 | ||
29 | static void __init tx4938_wdr_init(void) | 30 | static void __init tx4938_wdr_init(void) |
@@ -239,11 +240,6 @@ void __init tx4938_setup(void) | |||
239 | for (i = 0; i < TX4938_NR_TMR; i++) | 240 | for (i = 0; i < TX4938_NR_TMR; i++) |
240 | txx9_tmr_init(TX4938_TMR_REG(i) & 0xfffffffffULL); | 241 | txx9_tmr_init(TX4938_TMR_REG(i) & 0xfffffffffULL); |
241 | 242 | ||
242 | /* DMA */ | ||
243 | for (i = 0; i < 2; i++) | ||
244 | ____raw_writeq(TX4938_DMA_MCR_MSTEN, | ||
245 | (void __iomem *)(TX4938_DMA_REG(i) + 0x50)); | ||
246 | |||
247 | /* PIO */ | 243 | /* PIO */ |
248 | txx9_gpio_init(TX4938_PIO_REG & 0xfffffffffULL, 0, TX4938_NUM_PIO); | 244 | txx9_gpio_init(TX4938_PIO_REG & 0xfffffffffULL, 0, TX4938_NUM_PIO); |
249 | __raw_writel(0, &tx4938_pioptr->maskcpu); | 245 | __raw_writel(0, &tx4938_pioptr->maskcpu); |
@@ -403,6 +399,21 @@ void __init tx4938_ndfmc_init(unsigned int hold, unsigned int spw) | |||
403 | txx9_ndfmc_init(baseaddr, &plat_data); | 399 | txx9_ndfmc_init(baseaddr, &plat_data); |
404 | } | 400 | } |
405 | 401 | ||
402 | void __init tx4938_dmac_init(int memcpy_chan0, int memcpy_chan1) | ||
403 | { | ||
404 | struct txx9dmac_platform_data plat_data = { | ||
405 | .have_64bit_regs = true, | ||
406 | }; | ||
407 | int i; | ||
408 | |||
409 | for (i = 0; i < 2; i++) { | ||
410 | plat_data.memcpy_chan = i ? memcpy_chan1 : memcpy_chan0; | ||
411 | txx9_dmac_init(i, TX4938_DMA_REG(i) & 0xfffffffffULL, | ||
412 | TXX9_IRQ_BASE + TX4938_IR_DMA(i, 0), | ||
413 | &plat_data); | ||
414 | } | ||
415 | } | ||
416 | |||
406 | static void __init tx4938_stop_unused_modules(void) | 417 | static void __init tx4938_stop_unused_modules(void) |
407 | { | 418 | { |
408 | __u64 pcfg, rst = 0, ckd = 0; | 419 | __u64 pcfg, rst = 0, ckd = 0; |