treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
[linux-2.6-block.git] / arch / arm / mach-imx / devices / platform-pata_imx.c
CommitLineData
d2912cb1 1// SPDX-License-Identifier: GPL-2.0-only
50f2de61 2#include "../hardware.h"
e0557c0d 3#include "devices-common.h"
a45adf1c 4
236c4e8b 5#define imx_pata_imx_data_entry_single(soc, _size) \
a45adf1c
APR
6 { \
7 .iobase = soc ## _ATA_BASE_ADDR, \
236c4e8b
FE
8 .iosize = _size, \
9 .irq = soc ## _INT_ATA, \
a45adf1c
APR
10 }
11
236c4e8b
FE
12#ifdef CONFIG_SOC_IMX27
13const struct imx_pata_imx_data imx27_pata_imx_data __initconst =
14 imx_pata_imx_data_entry_single(MX27, SZ_4K);
15#endif /* ifdef CONFIG_SOC_IMX27 */
16
17#ifdef CONFIG_SOC_IMX31
18const struct imx_pata_imx_data imx31_pata_imx_data __initconst =
19 imx_pata_imx_data_entry_single(MX31, SZ_16K);
20#endif /* ifdef CONFIG_SOC_IMX31 */
21
22#ifdef CONFIG_SOC_IMX35
23const struct imx_pata_imx_data imx35_pata_imx_data __initconst =
24 imx_pata_imx_data_entry_single(MX35, SZ_16K);
25#endif /* ifdef CONFIG_SOC_IMX35 */
26
a45adf1c
APR
27struct platform_device *__init imx_add_pata_imx(
28 const struct imx_pata_imx_data *data)
29{
30 struct resource res[] = {
31 {
32 .start = data->iobase,
318007e9 33 .end = data->iobase + data->iosize - 1,
a45adf1c
APR
34 .flags = IORESOURCE_MEM,
35 },
36 {
37 .start = data->irq,
38 .end = data->irq,
39 .flags = IORESOURCE_IRQ,
40 },
41 };
42 return imx_add_platform_device("pata_imx", -1,
43 res, ARRAY_SIZE(res), NULL, 0);
44}
45