blob: 7fa7e9c9246803f74e95c97719009b3387ad660a [file] [log] [blame]
Uwe Kleine-König8a8d2062010-10-08 16:00:11 +02001/*
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önig8a8d2062010-10-08 16:00:11 +02009#include <mach/devices-common.h>
Uwe Kleine-König8a8d2062010-10-08 16:00:11 +020010
Shawn Guo36223602011-06-22 22:41:30 +080011struct 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önig8a8d2062010-10-08 16:00:11 +020016
Shawn Guo62550cd2011-07-13 21:33:17 +080017struct platform_device __init __maybe_unused *imx_add_imx_sdma(char *name,
Shawn Guo36223602011-06-22 22:41:30 +080018 resource_size_t iobase, int irq, struct sdma_platform_data *pdata)
Uwe Kleine-König8a8d2062010-10-08 16:00:11 +020019{
20 struct resource res[] = {
21 {
Shawn Guo36223602011-06-22 22:41:30 +080022 .start = iobase,
23 .end = iobase + SZ_16K - 1,
Uwe Kleine-König8a8d2062010-10-08 16:00:11 +020024 .flags = IORESOURCE_MEM,
25 }, {
Shawn Guo36223602011-06-22 22:41:30 +080026 .start = irq,
27 .end = irq,
Uwe Kleine-König8a8d2062010-10-08 16:00:11 +020028 .flags = IORESOURCE_IRQ,
29 },
30 };
31
Shawn Guo62550cd2011-07-13 21:33:17 +080032 return platform_device_register_resndata(&mxc_ahb_bus, name,
Shawn Guo36223602011-06-22 22:41:30 +080033 -1, res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
Uwe Kleine-König8a8d2062010-10-08 16:00:11 +020034}