diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-05-30 12:25:03 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-07-05 02:10:51 -0400 |
commit | cdcb90ad48816f51fdb4e93b2a33fe6038ce0949 (patch) | |
tree | b170a90e819a463e96efd5a926456049ecdc5ba6 | |
parent | 7c169a42d961daccf5638ea41d1c76700ad6ca42 (diff) |
MIPS: jz4740: Register jz4740 DMA device
Register a device for the newly added jz4740 dmaengine driver.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
[manually edited to align struct assignment]
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | arch/mips/include/asm/mach-jz4740/platform.h | 1 | ||||
-rw-r--r-- | arch/mips/jz4740/board-qi_lb60.c | 1 | ||||
-rw-r--r-- | arch/mips/jz4740/platform.c | 21 |
3 files changed, 23 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-jz4740/platform.h b/arch/mips/include/asm/mach-jz4740/platform.h index 72cfebdb5a47..05988c2d6565 100644 --- a/arch/mips/include/asm/mach-jz4740/platform.h +++ b/arch/mips/include/asm/mach-jz4740/platform.h | |||
@@ -32,6 +32,7 @@ extern struct platform_device jz4740_codec_device; | |||
32 | extern struct platform_device jz4740_adc_device; | 32 | extern struct platform_device jz4740_adc_device; |
33 | extern struct platform_device jz4740_wdt_device; | 33 | extern struct platform_device jz4740_wdt_device; |
34 | extern struct platform_device jz4740_pwm_device; | 34 | extern struct platform_device jz4740_pwm_device; |
35 | extern struct platform_device jz4740_dma_device; | ||
35 | 36 | ||
36 | void jz4740_serial_device_register(void); | 37 | void jz4740_serial_device_register(void); |
37 | 38 | ||
diff --git a/arch/mips/jz4740/board-qi_lb60.c b/arch/mips/jz4740/board-qi_lb60.c index be2b3deeef1d..8a5ec0eedeb0 100644 --- a/arch/mips/jz4740/board-qi_lb60.c +++ b/arch/mips/jz4740/board-qi_lb60.c | |||
@@ -438,6 +438,7 @@ static struct platform_device *jz_platform_devices[] __initdata = { | |||
438 | &jz4740_rtc_device, | 438 | &jz4740_rtc_device, |
439 | &jz4740_adc_device, | 439 | &jz4740_adc_device, |
440 | &jz4740_pwm_device, | 440 | &jz4740_pwm_device, |
441 | &jz4740_dma_device, | ||
441 | &qi_lb60_gpio_keys, | 442 | &qi_lb60_gpio_keys, |
442 | &qi_lb60_pwm_beeper, | 443 | &qi_lb60_pwm_beeper, |
443 | &qi_lb60_charger_device, | 444 | &qi_lb60_charger_device, |
diff --git a/arch/mips/jz4740/platform.c b/arch/mips/jz4740/platform.c index e9348fd26a35..df65677f3d0b 100644 --- a/arch/mips/jz4740/platform.c +++ b/arch/mips/jz4740/platform.c | |||
@@ -329,3 +329,24 @@ struct platform_device jz4740_pwm_device = { | |||
329 | .name = "jz4740-pwm", | 329 | .name = "jz4740-pwm", |
330 | .id = -1, | 330 | .id = -1, |
331 | }; | 331 | }; |
332 | |||
333 | /* DMA */ | ||
334 | static struct resource jz4740_dma_resources[] = { | ||
335 | { | ||
336 | .start = JZ4740_DMAC_BASE_ADDR, | ||
337 | .end = JZ4740_DMAC_BASE_ADDR + 0x400 - 1, | ||
338 | .flags = IORESOURCE_MEM, | ||
339 | }, | ||
340 | { | ||
341 | .start = JZ4740_IRQ_DMAC, | ||
342 | .end = JZ4740_IRQ_DMAC, | ||
343 | .flags = IORESOURCE_IRQ, | ||
344 | }, | ||
345 | }; | ||
346 | |||
347 | struct platform_device jz4740_dma_device = { | ||
348 | .name = "jz4740-dma", | ||
349 | .id = -1, | ||
350 | .num_resources = ARRAY_SIZE(jz4740_dma_resources), | ||
351 | .resource = jz4740_dma_resources, | ||
352 | }; | ||