Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172706
b: refs/heads/master
c: 84f90c9
h: refs/heads/master
v: v3
  • Loading branch information
Tony Lindgren committed Oct 16, 2009
1 parent d266de6 commit 3194465
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a2bb28a0dbcc1370104a543d25eb28aab81d4a91
refs/heads/master: 84f90c9cc81d8db172d4f768fc4010f508897366
11 changes: 8 additions & 3 deletions trunk/arch/arm/mach-omap1/serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ static void __init omap_serial_reset(struct plat_serial8250_port *p)

static struct plat_serial8250_port serial_platform_data[] = {
{
.membase = OMAP1_IO_ADDRESS(OMAP_UART1_BASE),
.mapbase = OMAP_UART1_BASE,
.irq = INT_UART1,
.flags = UPF_BOOT_AUTOCONF,
Expand All @@ -73,7 +72,6 @@ static struct plat_serial8250_port serial_platform_data[] = {
.uartclk = OMAP16XX_BASE_BAUD * 16,
},
{
.membase = OMAP1_IO_ADDRESS(OMAP_UART2_BASE),
.mapbase = OMAP_UART2_BASE,
.irq = INT_UART2,
.flags = UPF_BOOT_AUTOCONF,
Expand All @@ -82,7 +80,6 @@ static struct plat_serial8250_port serial_platform_data[] = {
.uartclk = OMAP16XX_BASE_BAUD * 16,
},
{
.membase = OMAP1_IO_ADDRESS(OMAP_UART3_BASE),
.mapbase = OMAP_UART3_BASE,
.irq = INT_UART3,
.flags = UPF_BOOT_AUTOCONF,
Expand Down Expand Up @@ -126,6 +123,14 @@ void __init omap_serial_init(void)
for (i = 0; i < OMAP_MAX_NR_PORTS; i++) {
unsigned char reg;

/* Static mapping, never released */
serial_platform_data[i].membase =
ioremap(serial_platform_data[i].mapbase, SZ_2K);
if (!serial_platform_data[i].membase) {
printk(KERN_ERR "Could not ioremap uart%i\n", i);
continue;
}

switch (i) {
case 0:
uart1_ck = clk_get(NULL, "uart1_ck");
Expand Down
14 changes: 10 additions & 4 deletions trunk/arch/arm/mach-omap2/serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ static LIST_HEAD(uart_list);

static struct plat_serial8250_port serial_platform_data0[] = {
{
.membase = OMAP2_IO_ADDRESS(OMAP_UART1_BASE),
.mapbase = OMAP_UART1_BASE,
.irq = 72,
.flags = UPF_BOOT_AUTOCONF,
Expand All @@ -87,7 +86,6 @@ static struct plat_serial8250_port serial_platform_data0[] = {

static struct plat_serial8250_port serial_platform_data1[] = {
{
.membase = OMAP2_IO_ADDRESS(OMAP_UART2_BASE),
.mapbase = OMAP_UART2_BASE,
.irq = 73,
.flags = UPF_BOOT_AUTOCONF,
Expand All @@ -101,7 +99,6 @@ static struct plat_serial8250_port serial_platform_data1[] = {

static struct plat_serial8250_port serial_platform_data2[] = {
{
.membase = OMAP2_IO_ADDRESS(OMAP_UART3_BASE),
.mapbase = OMAP_UART3_BASE,
.irq = 74,
.flags = UPF_BOOT_AUTOCONF,
Expand All @@ -126,7 +123,6 @@ static struct plat_serial8250_port serial_platform_data2[] = {
#ifdef CONFIG_ARCH_OMAP4
static struct plat_serial8250_port serial_platform_data3[] = {
{
.membase = OMAP2_IO_ADDRESS(OMAP_UART4_BASE),
.mapbase = OMAP_UART4_BASE,
.irq = 70,
.flags = UPF_BOOT_AUTOCONF,
Expand Down Expand Up @@ -605,6 +601,16 @@ void __init omap_serial_early_init(void)
struct device *dev = &pdev->dev;
struct plat_serial8250_port *p = dev->platform_data;

/*
* Module 4KB + L4 interconnect 4KB
* Static mapping, never released
*/
p->membase = ioremap(p->mapbase, SZ_8K);
if (!p->membase) {
printk(KERN_ERR "ioremap failed for uart%i\n", i + 1);
continue;
}

sprintf(name, "uart%d_ick", i+1);
uart->ick = clk_get(NULL, name);
if (IS_ERR(uart->ick)) {
Expand Down

0 comments on commit 3194465

Please sign in to comment.