diff options
Diffstat (limited to 'arch/arm/plat-mxc/devices/platform-flexcan.c')
| -rw-r--r-- | arch/arm/plat-mxc/devices/platform-flexcan.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/devices/platform-flexcan.c b/arch/arm/plat-mxc/devices/platform-flexcan.c new file mode 100644 index 00000000000..5e97a01f14f --- /dev/null +++ b/arch/arm/plat-mxc/devices/platform-flexcan.c | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Pengutronix, Marc Kleine-Budde <kernel@pengutronix.de> | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it under | ||
| 5 | * the terms of the GNU General Public License version 2 as published by the | ||
| 6 | * Free Software Foundation. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #include <mach/devices-common.h> | ||
| 10 | |||
| 11 | struct platform_device *__init imx_add_flexcan(int id, | ||
| 12 | resource_size_t iobase, resource_size_t iosize, | ||
| 13 | resource_size_t irq, | ||
| 14 | const struct flexcan_platform_data *pdata) | ||
| 15 | { | ||
| 16 | struct resource res[] = { | ||
| 17 | { | ||
| 18 | .start = iobase, | ||
| 19 | .end = iobase + iosize - 1, | ||
| 20 | .flags = IORESOURCE_MEM, | ||
| 21 | }, { | ||
| 22 | .start = irq, | ||
| 23 | .end = irq, | ||
| 24 | .flags = IORESOURCE_IRQ, | ||
| 25 | }, | ||
| 26 | }; | ||
| 27 | |||
| 28 | return imx_add_platform_device("flexcan", id, res, ARRAY_SIZE(res), | ||
| 29 | pdata, sizeof(*pdata)); | ||
| 30 | } | ||
