Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16763
b: refs/heads/master
c: 2b9ac7c
h: refs/heads/master
i:
  16761: a9de25f
  16759: abfa9b7
v: v3
  • Loading branch information
Dan Williams authored and Russell King committed Jan 5, 2006
1 parent 4162552 commit d622a9d
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 27 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: 6a2273d6fc627d28a4de9beadf77ae6636b1e5d0
refs/heads/master: 2b9ac7c15c0c5c9d6057b9e297dabaebd208ffe8
94 changes: 68 additions & 26 deletions trunk/arch/arm/mach-iop3xx/iop331-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <linux/platform_device.h>
#include <linux/serial.h>
#include <linux/tty.h>
#include <linux/serial_core.h>
#include <linux/serial_8250.h>

#include <asm/io.h>
#include <asm/pgtable.h>
Expand Down Expand Up @@ -50,32 +50,74 @@ static struct map_desc iop331_std_desc[] __initdata = {
}
};

static struct uart_port iop331_serial_ports[] = {
{
.membase = (char*)(IOP331_UART0_VIRT),
.mapbase = (IOP331_UART0_PHYS),
.irq = IRQ_IOP331_UART0,
.flags = UPF_SKIP_TEST,
.iotype = UPIO_MEM,
.regshift = 2,
.uartclk = IOP331_UART_XTAL,
.line = 0,
.type = PORT_XSCALE,
.fifosize = 32
} , {
.membase = (char*)(IOP331_UART1_VIRT),
.mapbase = (IOP331_UART1_PHYS),
.irq = IRQ_IOP331_UART1,
.flags = UPF_SKIP_TEST,
.iotype = UPIO_MEM,
.regshift = 2,
.uartclk = IOP331_UART_XTAL,
.line = 1,
.type = PORT_XSCALE,
.fifosize = 32
static struct resource iop33x_uart0_resources[] = {
[0] = {
.start = IOP331_UART0_PHYS,
.end = IOP331_UART0_PHYS + 0x3f,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_IOP331_UART0,
.end = IRQ_IOP331_UART0,
.flags = IORESOURCE_IRQ
}
};

static struct resource iop33x_uart1_resources[] = {
[0] = {
.start = IOP331_UART1_PHYS,
.end = IOP331_UART1_PHYS + 0x3f,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_IOP331_UART1,
.end = IRQ_IOP331_UART1,
.flags = IORESOURCE_IRQ
}
};

static struct plat_serial8250_port iop33x_uart0_data[] = {
{
.membase = (char*)(IOP331_UART0_VIRT),
.mapbase = (IOP331_UART0_PHYS),
.irq = IRQ_IOP331_UART0,
.uartclk = IOP331_UART_XTAL,
.regshift = 2,
.iotype = UPIO_MEM,
.flags = UPF_SKIP_TEST,
},
{ },
};

static struct plat_serial8250_port iop33x_uart1_data[] = {
{
.membase = (char*)(IOP331_UART1_VIRT),
.mapbase = (IOP331_UART1_PHYS),
.irq = IRQ_IOP331_UART1,
.uartclk = IOP331_UART_XTAL,
.regshift = 2,
.iotype = UPIO_MEM,
.flags = UPF_SKIP_TEST,
},
{ },
};

static struct platform_device iop33x_uart0 = {
.name = "serial8250",
.id = 0,
.dev.platform_data = iop33x_uart0_data,
.num_resources = 2,
.resource = iop33x_uart0_resources,
};

static struct platform_device iop33x_uart1 = {
.name = "serial8250",
.id = 1,
.dev.platform_data = iop33x_uart1_data,
.num_resources = 2,
.resource = iop33x_uart1_resources,
};

static struct resource iop33x_i2c_0_resources[] = {
[0] = {
.start = 0xfffff680,
Expand Down Expand Up @@ -117,6 +159,8 @@ static struct platform_device iop33x_i2c_1_controller = {
};

static struct platform_device *iop33x_devices[] __initdata = {
&iop33x_uart0,
&iop33x_uart1,
&iop33x_i2c_0_controller,
&iop33x_i2c_1_controller
};
Expand All @@ -133,8 +177,6 @@ void __init iop33x_init(void)
void __init iop331_map_io(void)
{
iotable_init(iop331_std_desc, ARRAY_SIZE(iop331_std_desc));
early_serial_setup(&iop331_serial_ports[0]);
early_serial_setup(&iop331_serial_ports[1]);
}

#ifdef CONFIG_ARCH_IOP331
Expand Down

0 comments on commit d622a9d

Please sign in to comment.