Merge commit 'v2.6.36-rc1' into kbuild/rc-fixes
[pandora-kernel.git] / arch / arm / plat-mxc / devices / platform-spi_imx.c
1 /*
2  * Copyright (C) 2009-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  */
9 #include <asm/sizes.h>
10 #include <mach/devices-common.h>
11
12 struct platform_device *__init imx_add_spi_imx(int id,
13                 resource_size_t iobase, resource_size_t iosize, int irq,
14                 const struct spi_imx_master *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("spi_imx", id, res, ARRAY_SIZE(res),
29                         pdata, sizeof(*pdata));
30 }