Uwe Kleine-König | 8a8d206 | 2010-10-08 16:00:11 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 Pengutronix |
| 3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> |
| 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 | */ |
Uwe Kleine-König | 8a8d206 | 2010-10-08 16:00:11 +0200 | [diff] [blame] | 9 | #include <mach/devices-common.h> |
Uwe Kleine-König | 8a8d206 | 2010-10-08 16:00:11 +0200 | [diff] [blame] | 10 | |
Shawn Guo | 3622360 | 2011-06-22 22:41:30 +0800 | [diff] [blame] | 11 | struct platform_device __init __maybe_unused *imx_add_imx_dma(void) |
| 12 | { |
| 13 | return platform_device_register_resndata(&mxc_ahb_bus, |
| 14 | "imx-dma", -1, NULL, 0, NULL, 0); |
| 15 | } |
Uwe Kleine-König | 8a8d206 | 2010-10-08 16:00:11 +0200 | [diff] [blame] | 16 | |
Shawn Guo | 62550cd | 2011-07-13 21:33:17 +0800 | [diff] [blame^] | 17 | struct platform_device __init __maybe_unused *imx_add_imx_sdma(char *name, |
Shawn Guo | 3622360 | 2011-06-22 22:41:30 +0800 | [diff] [blame] | 18 | resource_size_t iobase, int irq, struct sdma_platform_data *pdata) |
Uwe Kleine-König | 8a8d206 | 2010-10-08 16:00:11 +0200 | [diff] [blame] | 19 | { |
| 20 | struct resource res[] = { |
| 21 | { |
Shawn Guo | 3622360 | 2011-06-22 22:41:30 +0800 | [diff] [blame] | 22 | .start = iobase, |
| 23 | .end = iobase + SZ_16K - 1, |
Uwe Kleine-König | 8a8d206 | 2010-10-08 16:00:11 +0200 | [diff] [blame] | 24 | .flags = IORESOURCE_MEM, |
| 25 | }, { |
Shawn Guo | 3622360 | 2011-06-22 22:41:30 +0800 | [diff] [blame] | 26 | .start = irq, |
| 27 | .end = irq, |
Uwe Kleine-König | 8a8d206 | 2010-10-08 16:00:11 +0200 | [diff] [blame] | 28 | .flags = IORESOURCE_IRQ, |
| 29 | }, |
| 30 | }; |
| 31 | |
Shawn Guo | 62550cd | 2011-07-13 21:33:17 +0800 | [diff] [blame^] | 32 | return platform_device_register_resndata(&mxc_ahb_bus, name, |
Shawn Guo | 3622360 | 2011-06-22 22:41:30 +0800 | [diff] [blame] | 33 | -1, res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); |
Uwe Kleine-König | 8a8d206 | 2010-10-08 16:00:11 +0200 | [diff] [blame] | 34 | } |