diff options
| author | Olof Johansson <olof@lixom.net> | 2012-12-12 16:10:45 -0800 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2012-12-12 16:10:45 -0800 |
| commit | 9c7466b217af784280d9fc841bbd559ef3bf33e9 (patch) | |
| tree | c21ee243e48912201b4041fbf3f9bd9165603bd8 /arch/arm/mach-imx/devices/platform-imxdi_rtc.c | |
| parent | 4a76411ea3f1da9032e031f8fff8894b97d141b2 (diff) | |
| parent | 48d224d1efec98b0b78e511150b4f5752beceb7c (diff) | |
ARM: arm-soc: Merge branch 'next/pm2' into next/pm
Another smaller branch merged into next/pm before pull request.
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-imx/devices/platform-imxdi_rtc.c')
| -rw-r--r-- | arch/arm/mach-imx/devices/platform-imxdi_rtc.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/devices/platform-imxdi_rtc.c b/arch/arm/mach-imx/devices/platform-imxdi_rtc.c new file mode 100644 index 00000000000..5bb490d556e --- /dev/null +++ b/arch/arm/mach-imx/devices/platform-imxdi_rtc.c @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2010 Pengutronix + * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License version 2 as published by the + * Free Software Foundation. + */ +#include <asm/sizes.h> + +#include "../hardware.h" +#include "devices-common.h" + +#define imx_imxdi_rtc_data_entry_single(soc) \ + { \ + .iobase = soc ## _DRYICE_BASE_ADDR, \ + .irq = soc ## _INT_DRYICE, \ + } + +#ifdef CONFIG_SOC_IMX25 +const struct imx_imxdi_rtc_data imx25_imxdi_rtc_data __initconst = + imx_imxdi_rtc_data_entry_single(MX25); +#endif /* ifdef CONFIG_SOC_IMX25 */ + +struct platform_device *__init imx_add_imxdi_rtc( + const struct imx_imxdi_rtc_data *data) +{ + struct resource res[] = { + { + .start = data->iobase, + .end = data->iobase + SZ_16K - 1, + .flags = IORESOURCE_MEM, + }, { + .start = data->irq, + .end = data->irq, + .flags = IORESOURCE_IRQ, + }, + }; + + return imx_add_platform_device("imxdi_rtc", 0, + res, ARRAY_SIZE(res), NULL, 0); +} |
