omap: Change low-level serial init to use ioremap
Change low-level serial init to use ioremap Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
parent
a2bb28a0db
commit
84f90c9cc8
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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");
|
||||
|
|
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue