aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnish Trivedi <anish@freescale.com>2011-04-18 13:59:27 -0500
committerRichard Zhao <richard.zhao@freescale.com>2011-04-20 15:22:29 +0800
commitd457f27bb617e9baf2648d6e4662aeec833b695a (patch)
treeacca12f8bc98e95a940f41b7e4c8a8b1db454655
parentbb7da540855ce6800bae25b17d77d0ac76339109 (diff)
downloadlinux-linaro-natty-d457f27bb617e9baf2648d6e4662aeec833b695a.tar.gz
ENGR00142296-1 ARM: MX5: Add SRTC device support
Machine layer changes to add SRTC device for MX5x platforms. Signed-off-by: Anish Trivedi <anish@freescale.com> Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
-rw-r--r--arch/arm/mach-mx5/board-mx50_rdp.c1
-rw-r--r--arch/arm/mach-mx5/board-mx51_babbage.c2
-rw-r--r--arch/arm/mach-mx5/board-mx53_ard.c1
-rw-r--r--arch/arm/mach-mx5/board-mx53_evk.c1
-rw-r--r--arch/arm/mach-mx5/devices-imx50.h4
-rw-r--r--arch/arm/mach-mx5/devices-imx51.h4
-rw-r--r--arch/arm/plat-mxc/devices/platform-imx_srtc.c10
-rw-r--r--arch/arm/plat-mxc/include/mach/mx51.h4
8 files changed, 25 insertions, 2 deletions
diff --git a/arch/arm/mach-mx5/board-mx50_rdp.c b/arch/arm/mach-mx5/board-mx50_rdp.c
index a3129986c3fa..28b9afbf6101 100644
--- a/arch/arm/mach-mx5/board-mx50_rdp.c
+++ b/arch/arm/mach-mx5/board-mx50_rdp.c
@@ -226,6 +226,7 @@ static void __init mx50_rdp_board_init(void)
imx50_add_imx_uart(0, NULL);
imx50_add_imx_uart(1, NULL);
+ imx50_add_srtc();
mx50_rdp_fec_reset();
imx50_add_fec(&fec_data);
imx50_add_imx_i2c(0, &i2c_data);
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c
index be1e642654b8..07a7fdddf71a 100644
--- a/arch/arm/mach-mx5/board-mx51_babbage.c
+++ b/arch/arm/mach-mx5/board-mx51_babbage.c
@@ -596,6 +596,8 @@ static void __init mx51_babbage_init(void)
imx51_add_imx_uart(1, &uart_pdata);
imx51_add_imx_uart(2, &uart_pdata);
+ imx51_add_srtc();
+
babbage_fec_reset();
imx51_add_fec(NULL);
diff --git a/arch/arm/mach-mx5/board-mx53_ard.c b/arch/arm/mach-mx5/board-mx53_ard.c
index 070c26fadd65..d728de1123b0 100644
--- a/arch/arm/mach-mx5/board-mx53_ard.c
+++ b/arch/arm/mach-mx5/board-mx53_ard.c
@@ -230,6 +230,7 @@ static void __init mx53_ard_board_init(void)
mxc_iomux_v3_setup_multiple_pads(mx53_ard_pads,
ARRAY_SIZE(mx53_ard_pads));
mx53_ard_init_uart();
+ imx53_add_srtc();
imx53_add_imx2_wdt(0, NULL);
imx53_add_sdhci_esdhc_imx(0, &mx53_ard_sd1_data);
imx53_add_sdhci_esdhc_imx(1, &mx53_ard_sd2_data);
diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c
index 5a747fcc9096..20a5c910e545 100644
--- a/arch/arm/mach-mx5/board-mx53_evk.c
+++ b/arch/arm/mach-mx5/board-mx53_evk.c
@@ -724,6 +724,7 @@ static void __init mx53_evk_board_init(void)
mx53_evk_io_init();
mx53_evk_init_uart();
+ imx53_add_srtc();
mx53_evk_fec_reset();
imx53_add_fec(&mx53_evk_fec_pdata);
diff --git a/arch/arm/mach-mx5/devices-imx50.h b/arch/arm/mach-mx5/devices-imx50.h
index e24b1f742b88..6da0f8751a9b 100644
--- a/arch/arm/mach-mx5/devices-imx50.h
+++ b/arch/arm/mach-mx5/devices-imx50.h
@@ -25,6 +25,10 @@ extern const struct imx_imx_uart_1irq_data imx50_imx_uart_data[] __initconst;
#define imx50_add_imx_uart(id, pdata) \
imx_add_imx_uart_1irq(&imx50_imx_uart_data[id], pdata)
+extern const struct imx_srtc_data imx50_imx_srtc_data __initconst;
+#define imx50_add_srtc() \
+ imx_add_srtc(&imx50_imx_srtc_data)
+
extern const struct imx_fec_data imx50_fec_data __initconst;
#define imx50_add_fec(pdata) \
imx_add_fec(&imx50_fec_data, pdata)
diff --git a/arch/arm/mach-mx5/devices-imx51.h b/arch/arm/mach-mx5/devices-imx51.h
index c352bdb7bd13..e7f9dc2cc847 100644
--- a/arch/arm/mach-mx5/devices-imx51.h
+++ b/arch/arm/mach-mx5/devices-imx51.h
@@ -15,6 +15,10 @@ extern const struct imx_fec_data imx51_fec_data __initconst;
#define imx51_add_gpio_keys(pdata) imx_add_gpio_keys(pdata)
+extern const struct imx_srtc_data imx51_imx_srtc_data __initconst;
+#define imx51_add_srtc() \
+ imx_add_srtc(&imx51_imx_srtc_data)
+
extern const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst;
#define imx51_add_imx_i2c(id, pdata) \
imx_add_imx_i2c(&imx51_imx_i2c_data[id], pdata)
diff --git a/arch/arm/plat-mxc/devices/platform-imx_srtc.c b/arch/arm/plat-mxc/devices/platform-imx_srtc.c
index 1f27f48f4110..9e4191ecd521 100644
--- a/arch/arm/plat-mxc/devices/platform-imx_srtc.c
+++ b/arch/arm/plat-mxc/devices/platform-imx_srtc.c
@@ -28,6 +28,16 @@
.irq = soc ## _INT_SRTC_NTZ, \
}
+#ifdef CONFIG_SOC_IMX50
+const struct imx_srtc_data imx50_imx_srtc_data __initconst =
+ imx_imx_srtc_data_entry_single(MX50);
+#endif /* ifdef CONFIG_SOC_IMX50 */
+
+#ifdef CONFIG_SOC_IMX51
+const struct imx_srtc_data imx51_imx_srtc_data __initconst =
+ imx_imx_srtc_data_entry_single(MX51);
+#endif /* ifdef CONFIG_SOC_IMX51 */
+
#ifdef CONFIG_SOC_IMX53
const struct imx_srtc_data imx53_imx_srtc_data __initconst =
imx_imx_srtc_data_entry_single(MX53);
diff --git a/arch/arm/plat-mxc/include/mach/mx51.h b/arch/arm/plat-mxc/include/mach/mx51.h
index 7a993ef3b455..a2ee1d90c280 100644
--- a/arch/arm/plat-mxc/include/mach/mx51.h
+++ b/arch/arm/plat-mxc/include/mach/mx51.h
@@ -291,8 +291,8 @@
#define MX51_INT_SCC_SMN 21
#define MX51_INT_SCC_STZ 22
#define MX51_INT_SCC_SCM 23
-#define MX51_MXC_INT_SRTC_NTZ 24
-#define MX51_MXC_INT_SRTC_TZ 25
+#define MX51_INT_SRTC_NTZ 24
+#define MX51_INT_SRTC_TZ 25
#define MX51_MXC_INT_RTIC 26
#define MX51_MXC_INT_CSU 27
#define MX51_MXC_INT_SLIM_B 28