]> git.baikalelectronics.ru Git - kernel.git/commitdiff
MIPS: jz4740: Register jz4740 DMA device
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 30 May 2013 16:25:03 +0000 (18:25 +0200)
committerVinod Koul <vinod.koul@intel.com>
Fri, 5 Jul 2013 06:10:51 +0000 (11:40 +0530)
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>
arch/mips/include/asm/mach-jz4740/platform.h
arch/mips/jz4740/board-qi_lb60.c
arch/mips/jz4740/platform.c

index 72cfebdb5a47dbfd91b01f00acca65cfc7cdfc12..05988c2d65650970adc3861fd3e31d78a5f43140 100644 (file)
@@ -32,6 +32,7 @@ extern struct platform_device jz4740_codec_device;
 extern struct platform_device jz4740_adc_device;
 extern struct platform_device jz4740_wdt_device;
 extern struct platform_device jz4740_pwm_device;
+extern struct platform_device jz4740_dma_device;
 
 void jz4740_serial_device_register(void);
 
index be2b3deeef1da7acf3fd3f62a665874e3e689a9e..8a5ec0eedeb0649067355907220fe2af395b4878 100644 (file)
@@ -438,6 +438,7 @@ static struct platform_device *jz_platform_devices[] __initdata = {
        &jz4740_rtc_device,
        &jz4740_adc_device,
        &jz4740_pwm_device,
+       &jz4740_dma_device,
        &qi_lb60_gpio_keys,
        &qi_lb60_pwm_beeper,
        &qi_lb60_charger_device,
index e9348fd26a35fb9c4825f06585bb3161cb166488..df65677f3d0b20ef38c4873607c0c1719c484684 100644 (file)
@@ -329,3 +329,24 @@ struct platform_device jz4740_pwm_device = {
        .name = "jz4740-pwm",
        .id   = -1,
 };
+
+/* DMA */
+static struct resource jz4740_dma_resources[] = {
+       {
+               .start  = JZ4740_DMAC_BASE_ADDR,
+               .end    = JZ4740_DMAC_BASE_ADDR + 0x400 - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       {
+               .start  = JZ4740_IRQ_DMAC,
+               .end    = JZ4740_IRQ_DMAC,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device jz4740_dma_device = {
+       .name           = "jz4740-dma",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(jz4740_dma_resources),
+       .resource       = jz4740_dma_resources,
+};