2 * Copyright (C) 2011 Pengutronix, Wolfram Sang <w.sang@pengutronix.de>
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.
10 #include <mach/mx28.h>
11 #include <mach/devices-common.h>
13 #ifdef CONFIG_SOC_IMX23
14 struct platform_device
*__init
mx23_add_rtc_stmp3xxx(void)
16 struct resource res
[] = {
18 .start
= MX23_RTC_BASE_ADDR
,
19 .end
= MX23_RTC_BASE_ADDR
+ SZ_8K
- 1,
20 .flags
= IORESOURCE_MEM
,
22 .start
= MX23_INT_RTC_ALARM
,
23 .end
= MX23_INT_RTC_ALARM
,
24 .flags
= IORESOURCE_IRQ
,
28 return mxs_add_platform_device("stmp3xxx-rtc", 0, res
, ARRAY_SIZE(res
),
31 #endif /* CONFIG_SOC_IMX23 */
33 #ifdef CONFIG_SOC_IMX28
34 struct platform_device
*__init
mx28_add_rtc_stmp3xxx(void)
36 struct resource res
[] = {
38 .start
= MX28_RTC_BASE_ADDR
,
39 .end
= MX28_RTC_BASE_ADDR
+ SZ_8K
- 1,
40 .flags
= IORESOURCE_MEM
,
42 .start
= MX28_INT_RTC_ALARM
,
43 .end
= MX28_INT_RTC_ALARM
,
44 .flags
= IORESOURCE_IRQ
,
48 return mxs_add_platform_device("stmp3xxx-rtc", 0, res
, ARRAY_SIZE(res
),
51 #endif /* CONFIG_SOC_IMX28 */