diff options
author | Cory Maccarrone <darkstar6262@gmail.com> | 2010-08-02 07:21:39 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-08-02 07:21:39 -0400 |
commit | 8b8fbd39e20b5db95f8f4b3bda4c9d3fcf8e3afc (patch) | |
tree | 2e164da265d61b97cf2edfa55579032e24dd77df | |
parent | 35ddf7c003f54fc9878a15384beb9a900d40319d (diff) |
omap1: omap7xx clocks, mux, serial fixes
This change adds in the necessary clocks and mux pins for UART
control on omap7xx devices. I also made a change in the serial
code to only try and initialize two UARTs in omap_serial_init, as
these devices don't have three.
Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | arch/arm/mach-omap1/clock_data.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-omap1/mux.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap1/serial.c | 7 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/mux.h | 4 |
4 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/clock_data.c b/arch/arm/mach-omap1/clock_data.c index aa8558adbf1c..9240bc1026a3 100644 --- a/arch/arm/mach-omap1/clock_data.c +++ b/arch/arm/mach-omap1/clock_data.c | |||
@@ -478,6 +478,24 @@ static struct clk usb_dc_ck7xx = { | |||
478 | .enable_bit = 8, | 478 | .enable_bit = 8, |
479 | }; | 479 | }; |
480 | 480 | ||
481 | static struct clk uart1_7xx = { | ||
482 | .name = "uart1_ck", | ||
483 | .ops = &clkops_generic, | ||
484 | /* Direct from ULPD, no parent */ | ||
485 | .rate = 12000000, | ||
486 | .enable_reg = OMAP1_IO_ADDRESS(SOFT_REQ_REG), | ||
487 | .enable_bit = 9, | ||
488 | }; | ||
489 | |||
490 | static struct clk uart2_7xx = { | ||
491 | .name = "uart2_ck", | ||
492 | .ops = &clkops_generic, | ||
493 | /* Direct from ULPD, no parent */ | ||
494 | .rate = 12000000, | ||
495 | .enable_reg = OMAP1_IO_ADDRESS(SOFT_REQ_REG), | ||
496 | .enable_bit = 11, | ||
497 | }; | ||
498 | |||
481 | static struct clk mclk_1510 = { | 499 | static struct clk mclk_1510 = { |
482 | .name = "mclk", | 500 | .name = "mclk", |
483 | .ops = &clkops_generic, | 501 | .ops = &clkops_generic, |
@@ -620,7 +638,9 @@ static struct omap_clk omap_clks[] = { | |||
620 | /* ULPD clocks */ | 638 | /* ULPD clocks */ |
621 | CLK(NULL, "uart1_ck", &uart1_1510, CK_1510 | CK_310), | 639 | CLK(NULL, "uart1_ck", &uart1_1510, CK_1510 | CK_310), |
622 | CLK(NULL, "uart1_ck", &uart1_16xx.clk, CK_16XX), | 640 | CLK(NULL, "uart1_ck", &uart1_16xx.clk, CK_16XX), |
641 | CLK(NULL, "uart1_ck", &uart1_7xx, CK_7XX), | ||
623 | CLK(NULL, "uart2_ck", &uart2_ck, CK_16XX | CK_1510 | CK_310), | 642 | CLK(NULL, "uart2_ck", &uart2_ck, CK_16XX | CK_1510 | CK_310), |
643 | CLK(NULL, "uart2_ck", &uart2_7xx, CK_7XX), | ||
624 | CLK(NULL, "uart3_ck", &uart3_1510, CK_1510 | CK_310), | 644 | CLK(NULL, "uart3_ck", &uart3_1510, CK_1510 | CK_310), |
625 | CLK(NULL, "uart3_ck", &uart3_16xx.clk, CK_16XX), | 645 | CLK(NULL, "uart3_ck", &uart3_16xx.clk, CK_16XX), |
626 | CLK(NULL, "usb_clko", &usb_clko, CK_16XX | CK_1510 | CK_310), | 646 | CLK(NULL, "usb_clko", &usb_clko, CK_16XX | CK_1510 | CK_310), |
diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c index 84341377232d..6a9b42f4113f 100644 --- a/arch/arm/mach-omap1/mux.c +++ b/arch/arm/mach-omap1/mux.c | |||
@@ -70,6 +70,10 @@ MUX_CFG_7XX("SPI_7XX_3", 6, 13, 4, 12, 1, 0) | |||
70 | MUX_CFG_7XX("SPI_7XX_4", 6, 17, 4, 16, 1, 0) | 70 | MUX_CFG_7XX("SPI_7XX_4", 6, 17, 4, 16, 1, 0) |
71 | MUX_CFG_7XX("SPI_7XX_5", 8, 25, 0, 24, 0, 0) | 71 | MUX_CFG_7XX("SPI_7XX_5", 8, 25, 0, 24, 0, 0) |
72 | MUX_CFG_7XX("SPI_7XX_6", 9, 5, 0, 4, 0, 0) | 72 | MUX_CFG_7XX("SPI_7XX_6", 9, 5, 0, 4, 0, 0) |
73 | |||
74 | /* UART pins */ | ||
75 | MUX_CFG_7XX("UART_7XX_1", 3, 21, 0, 20, 0, 0) | ||
76 | MUX_CFG_7XX("UART_7XX_2", 8, 1, 6, 0, 0, 0) | ||
73 | }; | 77 | }; |
74 | #define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins) | 78 | #define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins) |
75 | #else | 79 | #else |
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c index 349de90194e3..b78d0749f13d 100644 --- a/arch/arm/mach-omap1/serial.c +++ b/arch/arm/mach-omap1/serial.c | |||
@@ -122,6 +122,13 @@ void __init omap_serial_init(void) | |||
122 | 122 | ||
123 | for (i = 0; i < ARRAY_SIZE(serial_platform_data) - 1; i++) { | 123 | for (i = 0; i < ARRAY_SIZE(serial_platform_data) - 1; i++) { |
124 | 124 | ||
125 | /* Don't look at UARTs higher than 2 for omap7xx */ | ||
126 | if (cpu_is_omap7xx() && i > 1) { | ||
127 | serial_platform_data[i].membase = NULL; | ||
128 | serial_platform_data[i].mapbase = 0; | ||
129 | continue; | ||
130 | } | ||
131 | |||
125 | /* Static mapping, never released */ | 132 | /* Static mapping, never released */ |
126 | serial_platform_data[i].membase = | 133 | serial_platform_data[i].membase = |
127 | ioremap(serial_platform_data[i].mapbase, SZ_2K); | 134 | ioremap(serial_platform_data[i].mapbase, SZ_2K); |
diff --git a/arch/arm/plat-omap/include/plat/mux.h b/arch/arm/plat-omap/include/plat/mux.h index c7472a28ce24..82c374c2f868 100644 --- a/arch/arm/plat-omap/include/plat/mux.h +++ b/arch/arm/plat-omap/include/plat/mux.h | |||
@@ -191,6 +191,10 @@ enum omap7xx_index { | |||
191 | SPI_7XX_4, | 191 | SPI_7XX_4, |
192 | SPI_7XX_5, | 192 | SPI_7XX_5, |
193 | SPI_7XX_6, | 193 | SPI_7XX_6, |
194 | |||
195 | /* UART */ | ||
196 | UART_7XX_1, | ||
197 | UART_7XX_2, | ||
194 | }; | 198 | }; |
195 | 199 | ||
196 | enum omap1xxx_index { | 200 | enum omap1xxx_index { |