diff options
author | Eric Bénard <eric@eukrea.com> | 2010-06-08 05:03:00 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-07-26 08:18:13 -0400 |
commit | 8402ed30e16c65ad8560ba3293c7cf9c259712eb (patch) | |
tree | 1a3a2ccde8c6c6f93e4f8fe75fa21d8dccb886cf /arch/arm/mach-mx25 | |
parent | 2518507f727e6bf663fd0f276369cbdeb6a0ccc0 (diff) |
i.MX25: add AUDMUX and SSI support
* add clocks for audmux and ssi 1 & 2
* add irq for ssi 1 & 2
* add devices platform for ssi1 & 2
* update audmux-v2 for i.MX25
* add base addresses for audmux & ssi 1 & 2
* add iomux configuration for GPIO for AUD5 port
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx25')
-rw-r--r-- | arch/arm/mach-mx25/clock.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-mx25/devices.c | 38 | ||||
-rw-r--r-- | arch/arm/mach-mx25/devices.h | 2 |
3 files changed, 58 insertions, 0 deletions
diff --git a/arch/arm/mach-mx25/clock.c b/arch/arm/mach-mx25/clock.c index 84f0f1efea4b..caeea7551582 100644 --- a/arch/arm/mach-mx25/clock.c +++ b/arch/arm/mach-mx25/clock.c | |||
@@ -109,6 +109,16 @@ static unsigned long get_rate_uart(struct clk *clk) | |||
109 | return get_rate_per(15); | 109 | return get_rate_per(15); |
110 | } | 110 | } |
111 | 111 | ||
112 | static unsigned long get_rate_ssi2(struct clk *clk) | ||
113 | { | ||
114 | return get_rate_per(14); | ||
115 | } | ||
116 | |||
117 | static unsigned long get_rate_ssi1(struct clk *clk) | ||
118 | { | ||
119 | return get_rate_per(13); | ||
120 | } | ||
121 | |||
112 | static unsigned long get_rate_i2c(struct clk *clk) | 122 | static unsigned long get_rate_i2c(struct clk *clk) |
113 | { | 123 | { |
114 | return get_rate_per(6); | 124 | return get_rate_per(6); |
@@ -171,6 +181,8 @@ static void clk_cgcr_disable(struct clk *clk) | |||
171 | 181 | ||
172 | DEFINE_CLOCK(gpt_clk, 0, CCM_CGCR0, 5, get_rate_gpt, NULL, NULL); | 182 | DEFINE_CLOCK(gpt_clk, 0, CCM_CGCR0, 5, get_rate_gpt, NULL, NULL); |
173 | DEFINE_CLOCK(uart_per_clk, 0, CCM_CGCR0, 15, get_rate_uart, NULL, NULL); | 183 | DEFINE_CLOCK(uart_per_clk, 0, CCM_CGCR0, 15, get_rate_uart, NULL, NULL); |
184 | DEFINE_CLOCK(ssi1_per_clk, 0, CCM_CGCR0, 13, get_rate_ipg, NULL, NULL); | ||
185 | DEFINE_CLOCK(ssi2_per_clk, 0, CCM_CGCR0, 14, get_rate_ipg, NULL, NULL); | ||
174 | DEFINE_CLOCK(cspi1_clk, 0, CCM_CGCR1, 5, get_rate_ipg, NULL, NULL); | 186 | DEFINE_CLOCK(cspi1_clk, 0, CCM_CGCR1, 5, get_rate_ipg, NULL, NULL); |
175 | DEFINE_CLOCK(cspi2_clk, 0, CCM_CGCR1, 6, get_rate_ipg, NULL, NULL); | 187 | DEFINE_CLOCK(cspi2_clk, 0, CCM_CGCR1, 6, get_rate_ipg, NULL, NULL); |
176 | DEFINE_CLOCK(cspi3_clk, 0, CCM_CGCR1, 7, get_rate_ipg, NULL, NULL); | 188 | DEFINE_CLOCK(cspi3_clk, 0, CCM_CGCR1, 7, get_rate_ipg, NULL, NULL); |
@@ -194,6 +206,9 @@ DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL); | |||
194 | DEFINE_CLOCK(fec_clk, 0, CCM_CGCR1, 15, get_rate_ipg, NULL, &fec_ahb_clk); | 206 | DEFINE_CLOCK(fec_clk, 0, CCM_CGCR1, 15, get_rate_ipg, NULL, &fec_ahb_clk); |
195 | DEFINE_CLOCK(dryice_clk, 0, CCM_CGCR1, 8, get_rate_ipg, NULL, NULL); | 207 | DEFINE_CLOCK(dryice_clk, 0, CCM_CGCR1, 8, get_rate_ipg, NULL, NULL); |
196 | DEFINE_CLOCK(lcdc_clk, 0, CCM_CGCR1, 29, get_rate_lcdc, NULL, &lcdc_per_clk); | 208 | DEFINE_CLOCK(lcdc_clk, 0, CCM_CGCR1, 29, get_rate_lcdc, NULL, &lcdc_per_clk); |
209 | DEFINE_CLOCK(ssi1_clk, 0, CCM_CGCR2, 11, get_rate_ssi1, NULL, &ssi1_per_clk); | ||
210 | DEFINE_CLOCK(ssi2_clk, 1, CCM_CGCR2, 12, get_rate_ssi2, NULL, &ssi2_per_clk); | ||
211 | DEFINE_CLOCK(audmux_clk, 0, CCM_CGCR1, 0, NULL, NULL, NULL); | ||
197 | 212 | ||
198 | #define _REGISTER_CLOCK(d, n, c) \ | 213 | #define _REGISTER_CLOCK(d, n, c) \ |
199 | { \ | 214 | { \ |
@@ -228,6 +243,9 @@ static struct clk_lookup lookups[] = { | |||
228 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) | 243 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) |
229 | _REGISTER_CLOCK("imxdi_rtc.0", NULL, dryice_clk) | 244 | _REGISTER_CLOCK("imxdi_rtc.0", NULL, dryice_clk) |
230 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) | 245 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) |
246 | _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) | ||
247 | _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) | ||
248 | _REGISTER_CLOCK(NULL, "audmux", audmux_clk) | ||
231 | }; | 249 | }; |
232 | 250 | ||
233 | int __init mx25_clocks_init(void) | 251 | int __init mx25_clocks_init(void) |
diff --git a/arch/arm/mach-mx25/devices.c b/arch/arm/mach-mx25/devices.c index d9766d4d5046..baf0a7913644 100644 --- a/arch/arm/mach-mx25/devices.c +++ b/arch/arm/mach-mx25/devices.c | |||
@@ -533,3 +533,41 @@ struct platform_device mx25_kpp_device = { | |||
533 | .num_resources = ARRAY_SIZE(mx25_kpp_resources), | 533 | .num_resources = ARRAY_SIZE(mx25_kpp_resources), |
534 | .resource = mx25_kpp_resources, | 534 | .resource = mx25_kpp_resources, |
535 | }; | 535 | }; |
536 | |||
537 | static struct resource imx_ssi_resources0[] = { | ||
538 | { | ||
539 | .start = MX25_SSI1_BASE_ADDR, | ||
540 | .end = MX25_SSI1_BASE_ADDR + 0x3fff, | ||
541 | .flags = IORESOURCE_MEM, | ||
542 | }, { | ||
543 | .start = MX25_INT_SSI1, | ||
544 | .end = MX25_INT_SSI1, | ||
545 | .flags = IORESOURCE_IRQ, | ||
546 | }, | ||
547 | }; | ||
548 | |||
549 | static struct resource imx_ssi_resources1[] = { | ||
550 | { | ||
551 | .start = MX25_SSI2_BASE_ADDR, | ||
552 | .end = MX25_SSI2_BASE_ADDR + 0x3fff, | ||
553 | .flags = IORESOURCE_MEM | ||
554 | }, { | ||
555 | .start = MX25_INT_SSI2, | ||
556 | .end = MX25_INT_SSI2, | ||
557 | .flags = IORESOURCE_IRQ, | ||
558 | }, | ||
559 | }; | ||
560 | |||
561 | struct platform_device imx_ssi_device0 = { | ||
562 | .name = "imx-ssi", | ||
563 | .id = 0, | ||
564 | .num_resources = ARRAY_SIZE(imx_ssi_resources0), | ||
565 | .resource = imx_ssi_resources0, | ||
566 | }; | ||
567 | |||
568 | struct platform_device imx_ssi_device1 = { | ||
569 | .name = "imx-ssi", | ||
570 | .id = 1, | ||
571 | .num_resources = ARRAY_SIZE(imx_ssi_resources1), | ||
572 | .resource = imx_ssi_resources1, | ||
573 | }; | ||
diff --git a/arch/arm/mach-mx25/devices.h b/arch/arm/mach-mx25/devices.h index 8247fd451118..290843bdddf3 100644 --- a/arch/arm/mach-mx25/devices.h +++ b/arch/arm/mach-mx25/devices.h | |||
@@ -23,3 +23,5 @@ extern struct platform_device mx25_rtc_device; | |||
23 | extern struct platform_device mx25_fb_device; | 23 | extern struct platform_device mx25_fb_device; |
24 | extern struct platform_device mxc_wdt; | 24 | extern struct platform_device mxc_wdt; |
25 | extern struct platform_device mx25_kpp_device; | 25 | extern struct platform_device mx25_kpp_device; |
26 | extern struct platform_device imx_ssi_device0; | ||
27 | extern struct platform_device imx_ssi_device1; | ||