static int __init mxc_early_uart_setup(struct console *console, char *options) { struct mxc_early_uart_device *device = &mxc_early_device; struct uart_port *port = &device->port; int length; if (device->port.membase || device->port.iobase) return -ENODEV; /* Enable Early MXC UART Clock */ port->uartclk = 115200; port->iotype = UPIO_MEM; /*port->membase = ioremap(port->mapbase, SZ_4K);*/ port->membase = MVF_IO_ADDRESS(port->mapbase); if (options) { device->baud = simple_strtoul(options, NULL, 0); length = min(strlen(options), sizeof(device->options)); strncpy(device->options, options, length); } else { device->baud = probe_baud(port); snprintf(device->options, sizeof(device->options), "%u", device->baud); } printk(KERN_INFO "MXC_Early serial console at MMIO 0x%x (options '%s')\n", port->membase, device->options); return 0; }
static int __init post_cpu_init(void) { iram_init(MVF_IRAM_BASE_ADDR, MVF_IRAM_SIZE); /* Move wait routine into iRAM */ ccm_base = MVF_IO_ADDRESS(MVF_CCM_BASE_ADDR); return 0; }