void __init mpc83xx_early_serial_map(void) { #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB_8250) struct uart_port serial_req; #endif struct plat_serial8250_port *pdata; bd_t *binfo = (bd_t *) __res; pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(MPC83xx_DUART); /* Setup serial port access */ pdata[0].uartclk = binfo->bi_busfreq; pdata[0].mapbase += binfo->bi_immr_base; pdata[0].membase = ioremap(pdata[0].mapbase, 0x100); #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB_8250) memset(&serial_req, 0, sizeof (serial_req)); serial_req.iotype = SERIAL_IO_MEM; serial_req.mapbase = pdata[0].mapbase; serial_req.membase = pdata[0].membase; serial_req.regshift = 0; serial_req.uartclk = pdata[0].uartclk; serial_req.irq = pdata[0].irq; serial_req.line = pdata[0].line; serial_req.flags = pdata[0].flags; if (early_serial_setup(&serial_req) != 0) printk("Early serial init of port 0 failed\n"); #if defined(CONFIG_SERIAL_TEXT_DEBUG) gen550_init(0, &serial_req); #endif #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(0, &serial_req); #endif #endif pdata[1].uartclk = binfo->bi_busfreq; pdata[1].mapbase += binfo->bi_immr_base; pdata[1].membase = ioremap(pdata[1].mapbase, 0x100); #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB_8250) /* Assume gen550_init() doesn't modify serial_req */ serial_req.mapbase = pdata[1].mapbase; serial_req.membase = pdata[1].membase; serial_req.line = pdata[1].line; if (early_serial_setup(&serial_req) != 0) printk("Early serial init of port 1 failed\n"); #if defined(CONFIG_SERIAL_TEXT_DEBUG) gen550_init(1, &serial_req); #endif #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(1, &serial_req); #endif #endif }
static void __init ebony_early_serial_map(void) { struct uart_port port; /* Setup ioremapped serial port access */ memset(&port, 0, sizeof(port)); port.membase = ioremap64(PPC440GP_UART0_ADDR, 8); port.irq = 0; port.uartclk = clocks.uart0; port.regshift = 0; port.iotype = SERIAL_IO_MEM; port.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; port.line = 0; #ifdef CONFIG_SERIAL_8250 if (early_serial_setup(&port) != 0) printk("Early serial init of port 0 failed\n"); #endif #ifdef CONFIG_SERIAL_TEXT_DEBUG /* Configure debug serial access */ gen550_init(0, &port); #endif #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(0, &port); #endif #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB_8250) /* Purge TLB entry added in head_44x.S for early serial access */ _tlbie(UART0_IO_BASE); #endif port.membase = ioremap64(PPC440GP_UART1_ADDR, 8); port.irq = 1; port.uartclk = clocks.uart1; port.line = 1; #ifdef CONFIG_SERIAL_8250 if (early_serial_setup(&port) != 1) printk("Early serial init of port 1 failed\n"); #endif #ifdef CONFIG_SERIAL_TEXT_DEBUG /* Configure debug serial access */ gen550_init(1, &port); #endif #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(1, &port); #endif }
static void __init ixdp2x01_map_io(void) { ixp2000_map_io(); iotable_init(&ixdp2x01_io_desc, 1); early_serial_setup(&ixdp2x01_serial_ports[0]); early_serial_setup(&ixdp2x01_serial_ports[1]); #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(0, &ixdp2x01_serial_ports[0]); kgdb8250_add_port(1, &ixdp2x01_serial_ports[1]); #endif }
static void __init luan_early_serial_map(void) { struct uart_port port; /* Setup ioremapped serial port access */ memset(&port, 0, sizeof(port)); port.membase = ioremap64(PPC440SP_UART0_ADDR, 8); port.irq = UART0_INT; port.uartclk = clocks.uart0; port.regshift = 0; port.iotype = SERIAL_IO_MEM; port.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; port.line = 0; if (early_serial_setup(&port) != 0) { printk("Early serial init of port 0 failed\n"); } #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(0, &port); #endif port.membase = ioremap64(PPC440SP_UART1_ADDR, 8); port.irq = UART1_INT; port.uartclk = clocks.uart1; port.line = 1; if (early_serial_setup(&port) != 0) { printk("Early serial init of port 1 failed\n"); } #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(1, &port); #endif /* Enable UART2 */ SDR_WRITE(DCRN_SDR_PFC1, SDR_READ(DCRN_SDR_PFC1) | 0x01000000); port.membase = ioremap64(PPC440SP_UART2_ADDR, 8); port.irq = UART2_INT; port.uartclk = clocks.uart2; port.line = 2; if (early_serial_setup(&port) != 0) { printk("Early serial init of port 2 failed\n"); } #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(2, &port); #endif }
static void __init ixdp425_init(void) { ixp4xx_sys_init(); ixdp425_flash_resource.start = IXP4XX_EXP_BUS_BASE(0); ixdp425_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1; platform_add_devices(ixdp425_devices, ARRAY_SIZE(ixdp425_devices)); #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(0, &ixdp425_serial_ports[0]); kgdb8250_add_port(1, &ixdp425_serial_ports[1]); #endif }
void __init ixp2000_uart_init(void) { platform_device_register(&ixp2000_serial_device); #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(0, &ixp2000_serial_port); #endif }
void __init ixp2000_map_io(void) { extern unsigned int processor_id; /* * On IXP2400 CPUs we need to use MT_IXP2000_DEVICE for * tweaking the PMDs so XCB=101. On IXP2800s we use the normal * PMD flags. */ if ((processor_id & 0xfffffff0) == 0x69054190) { int i; printk(KERN_INFO "Enabling IXP2400 erratum #66 workaround\n"); for(i=0;i<ARRAY_SIZE(ixp2000_io_desc);i++) ixp2000_io_desc[i].type = MT_IXP2000_DEVICE; } iotable_init(ixp2000_io_desc, ARRAY_SIZE(ixp2000_io_desc)); early_serial_setup(&ixp2000_serial_port); #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(0, &ixp2000_serial_port); #endif /* Set slowport to 8-bit mode. */ ixp2000_reg_write(IXP2000_SLOWPORT_FRM, 1); }
/* The serial clock for the chip is an internal clock determined by * different clock speeds/dividers. * Calculate the proper input baud rate and setup the serial driver. */ static void __init bubinga_early_serial_map(void) { u32 uart_div; int uart_clock; struct uart_port port; /* Calculate the serial clock input frequency * * The base baud is the PLL OUTA (provided in the board info * structure) divided by the external UART Divisor, divided * by 16. */ uart_div = (mfdcr(DCRN_CPC0_UCR_BASE) & DCRN_CPC0_UCR_U0DIV); uart_clock = __res.bi_procfreq / uart_div; /* Setup serial port access */ memset(&port, 0, sizeof(port)); port.membase = (void*)ACTING_UART0_IO_BASE; port.irq = ACTING_UART0_INT; port.uartclk = uart_clock; port.regshift = 0; port.iotype = UPIO_MEM; port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; port.line = 0; #ifdef CONFIG_SERIAL_8250 if (early_serial_setup(&port) != 0) printk("Early serial init of port 0 failed\n"); #endif #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(0, &port); #endif port.membase = (void*)ACTING_UART1_IO_BASE; port.irq = ACTING_UART1_INT; port.line = 1; #ifdef CONFIG_SERIAL_8250 if (early_serial_setup(&port) != 0) printk("Early serial init of port 1 failed\n"); #endif #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(1, &port); #endif }
static void __init yosemite_early_serial_map(void) { struct uart_port port; /* Setup ioremapped serial port access */ memset(&port, 0, sizeof(port)); port.mapbase = PPC440EP_UART0_ADDR; port.membase = ioremap64(PPC440EP_UART0_ADDR, 8); port.irq = 0; port.uartclk = clocks.uart0; port.regshift = 0; port.iotype = SERIAL_IO_MEM; port.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; port.line = 0; if (early_serial_setup(&port) != 0) { printk("Early serial init of port 0 failed\n"); } #if defined(CONFIG_SERIAL_TEXT_DEBUG) /* Configure debug serial access */ gen550_init(0, &port); #endif #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(0, &port); #endif port.mapbase = PPC440EP_UART1_ADDR; port.membase = ioremap64(PPC440EP_UART1_ADDR, 8); port.irq = 1; port.uartclk = clocks.uart1; port.line = 1; if (early_serial_setup(&port) != 0) { printk("Early serial init of port 1 failed\n"); } #if defined(CONFIG_SERIAL_TEXT_DEBUG) /* Configure debug serial access */ gen550_init(1, &port); #endif #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(1, &port); #endif }
static void __init ixdp425_init(void) { ixp4xx_sys_init(); /* * IXP465 has 32MB window */ if (machine_is_ixdp465()) { ixdp425_flash_resource.end += IXDP425_FLASH_SIZE; } platform_add_devices(ixdp425_devices, ARRAY_SIZE(ixdp425_devices)); #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(0, &ixdp425_serial_ports[0]); kgdb8250_add_port(1, &ixdp425_serial_ports[1]); #endif }
static void __init sbc8560_early_serial_map(void) { struct uart_port uart_req; /* Setup serial port access */ memset(&uart_req, 0, sizeof (uart_req)); uart_req.irq = MPC85xx_IRQ_EXT9; uart_req.flags = STD_COM_FLAGS; uart_req.uartclk = BASE_BAUD * 16; uart_req.iotype = UPIO_MEM; uart_req.mapbase = UARTA_ADDR; uart_req.membase = ioremap(uart_req.mapbase, MPC85xx_UART0_SIZE); uart_req.type = PORT_16650; #ifdef CONFIG_SERIAL_8250 if (early_serial_setup(&uart_req) != 0) printk("Early serial init of port 0 failed\n"); #endif #ifdef CONFIG_SERIAL_TEXT_DEBUG gen550_init(0, &uart_req); #endif #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(0, &uart_req); #endif /* Assume early_serial_setup() doesn't modify uart_req */ uart_req.line = 1; uart_req.mapbase = UARTB_ADDR; uart_req.membase = ioremap(uart_req.mapbase, MPC85xx_UART1_SIZE); uart_req.irq = MPC85xx_IRQ_EXT10; #ifdef CONFIG_SERIAL_8250 if (early_serial_setup(&uart_req) != 0) printk("Early serial init of port 0 failed\n"); #endif #ifdef CONFIG_SERIAL_TEXT_DEBUG gen550_init(0, &uart_req); #endif #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(0, &uart_req); #endif }
static void __init taiga_early_serial_map(void) { struct uart_port serial_req; /* Setup serial port access */ memset(&serial_req, 0, sizeof(serial_req)); serial_req.uartclk = UART_CLK; serial_req.irq = IRQ_TSI108_UART0; serial_req.flags = STD_COM_FLAGS; serial_req.iotype = SERIAL_IO_MEM; /* CONFIG_TAIGA: remapped */ serial_req.membase = (u_char *) (TAIGA_SERIAL_0 | TSI108_CSR_ADDR_VIRT); #ifdef CONFIG_SERIAL_TEXT_DEBUG gen550_init(0, &serial_req); #endif #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(0, &serial_req); #endif if (early_serial_setup(&serial_req) != 0) printk(KERN_ERR "Early serial init of port 0 failed\n"); /* Assume early_serial_setup() doesn't modify serial_req */ serial_req.line = 1; serial_req.irq = IRQ_TSI108_UART1; /* CONFIG_TAIGA: remapped */ serial_req.membase = (u_char *) (TAIGA_SERIAL_1 | TSI108_CSR_ADDR_VIRT); #ifdef CONFIG_SERIAL_TEXT_DEBUG gen550_init(1, &serial_req); #endif #ifdef CONFIG_KGDB_8250 kgdb8250_add_port(1, &serial_req); #endif if (early_serial_setup(&serial_req) != 0) printk(KERN_ERR "Early serial init of port 1 failed\n"); }