Javier Martin | 6d8c452 | 2012-07-26 05:45:32 -0300 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2012 Vista Silicon |
| 3 | * Javier Martin <javier.martin@vista-silicon.com> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify it under |
| 6 | * the terms of the GNU General Public License version 2 as published by the |
| 7 | * Free Software Foundation. |
| 8 | */ |
| 9 | |
Shawn Guo | 50f2de6 | 2012-09-14 14:14:45 +0800 | [diff] [blame] | 10 | #include "../hardware.h" |
Shawn Guo | e0557c0 | 2012-09-13 15:51:15 +0800 | [diff] [blame] | 11 | #include "devices-common.h" |
Javier Martin | 6d8c452 | 2012-07-26 05:45:32 -0300 | [diff] [blame] | 12 | |
| 13 | #ifdef CONFIG_SOC_IMX27 |
| 14 | const struct imx_imx27_coda_data imx27_coda_data __initconst = { |
| 15 | .iobase = MX27_VPU_BASE_ADDR, |
| 16 | .iosize = SZ_512, |
| 17 | .irq = MX27_INT_VPU, |
| 18 | }; |
| 19 | #endif |
| 20 | |
| 21 | struct platform_device *__init imx_add_imx27_coda( |
| 22 | const struct imx_imx27_coda_data *data) |
| 23 | { |
| 24 | struct resource res[] = { |
| 25 | { |
| 26 | .start = data->iobase, |
| 27 | .end = data->iobase + data->iosize - 1, |
| 28 | .flags = IORESOURCE_MEM, |
| 29 | }, { |
| 30 | .start = data->irq, |
| 31 | .end = data->irq, |
| 32 | .flags = IORESOURCE_IRQ, |
| 33 | }, |
| 34 | }; |
| 35 | return imx_add_platform_device_dmamask("coda-imx27", 0, res, 2, NULL, |
| 36 | 0, DMA_BIT_MASK(32)); |
| 37 | } |