spi-topcliff-pch: supports a spi mode setup and bit order setup by IO control
[zen-stable.git] / arch / arm / mach-mxs / devices / platform-rtc-stmp3xxx.c
blob639eaee155532926e6633568f8783b4824af8881
1 /*
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.
7 */
8 #include <asm/sizes.h>
9 #include <mach/mx23.h>
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,
21 }, {
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),
29 NULL, 0);
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,
41 }, {
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),
49 NULL, 0);
51 #endif /* CONFIG_SOC_IMX28 */