From ec781b303bcbf6dd62c55d5f3ea74f879b01b753 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Wed, 8 Jun 2016 15:27:06 +0000 Subject: Use fdt to find the console to initialise. Try to use /chosen/stdout-path if present otherwise fallback to /aliases/serial0. Don't require a platform match to run the various console init functions so the init functions will run for unknown board ids. With and ok kettenis@ on a earlier version. --- sys/arch/armv7/armv7/armv7_machdep.c | 38 ++++++++++++++++++++++++- sys/arch/armv7/armv7/armv7_machdep.h | 3 +- sys/arch/armv7/armv7/platform.c | 18 ++++++++++-- sys/arch/armv7/exynos/exuart.c | 26 +++++++++++++---- sys/arch/armv7/exynos/exynos_machdep.c | 45 +----------------------------- sys/arch/armv7/imx/imx_machdep.c | 36 +----------------------- sys/arch/armv7/imx/imxuart.c | 22 ++++++++++++++- sys/arch/armv7/omap/omap_com.c | 24 +++++++++++++++- sys/arch/armv7/omap/omap_machdep.c | 27 +----------------- sys/arch/armv7/sunxi/sunxi_machdep.c | 25 +---------------- sys/arch/armv7/sunxi/sxiuart.c | 23 ++++++++++++++- sys/arch/armv7/vexpress/pl011.c | 22 ++++++++++++++- sys/arch/armv7/vexpress/vexpress_machdep.c | 22 +-------------- 13 files changed, 168 insertions(+), 163 deletions(-) (limited to 'sys/arch') diff --git a/sys/arch/armv7/armv7/armv7_machdep.c b/sys/arch/armv7/armv7/armv7_machdep.c index 27726122941..40599baf2b7 100644 --- a/sys/arch/armv7/armv7/armv7_machdep.c +++ b/sys/arch/armv7/armv7/armv7_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: armv7_machdep.c,v 1.28 2016/06/04 18:09:16 jsg Exp $ */ +/* $OpenBSD: armv7_machdep.c,v 1.29 2016/06/08 15:27:05 jsg Exp $ */ /* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */ /* @@ -900,6 +900,42 @@ process_kernel_args(char *args) } } +void * +fdt_find_cons(const char *name) +{ + char *alias = "serial0"; + char *stdout = NULL; + void *node; + + /* First check if "stdout-path" is set. */ + node = fdt_find_node("/chosen"); + if (node) { + if (fdt_node_property(node, "stdout-path", &stdout)) { + if (stdout[0] != '/') { + /* It's an alias. */ + alias = stdout; + stdout = NULL; + } + } + } + + /* Perform alias lookup if necessary. */ + if (stdout == NULL) { + node = fdt_find_node("/aliases"); + if (node) + fdt_node_property(node, alias, &stdout); + } + + /* Lookup the physical address of the interface. */ + if (stdout) { + node = fdt_find_node(stdout); + if (node && fdt_is_compatible(node, name)) + return (node); + } + + return (NULL); +} + void consinit(void) { diff --git a/sys/arch/armv7/armv7/armv7_machdep.h b/sys/arch/armv7/armv7/armv7_machdep.h index a90676625fb..7533582c6bf 100644 --- a/sys/arch/armv7/armv7/armv7_machdep.h +++ b/sys/arch/armv7/armv7/armv7_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: armv7_machdep.h,v 1.7 2016/06/04 18:09:16 jsg Exp $ */ +/* $OpenBSD: armv7_machdep.h,v 1.8 2016/06/08 15:27:05 jsg Exp $ */ /* * Copyright (c) 2013 Sylvestre Gallon * @@ -25,6 +25,7 @@ void platform_init_cons(void); void platform_init_mainbus(struct device *); void platform_disable_l2_if_needed(void); struct board_dev *platform_board_devs(); +void *fdt_find_cons(const char *); struct armv7_platform { struct board_dev *devs; diff --git a/sys/arch/armv7/armv7/platform.c b/sys/arch/armv7/armv7/platform.c index 073a53f870c..67a8a686cb0 100644 --- a/sys/arch/armv7/armv7/platform.c +++ b/sys/arch/armv7/armv7/platform.c @@ -1,4 +1,4 @@ -/* $OpenBSD: platform.c,v 1.6 2016/06/04 18:09:16 jsg Exp $ */ +/* $OpenBSD: platform.c,v 1.7 2016/06/08 15:27:05 jsg Exp $ */ /* * Copyright (c) 2014 Patrick Wildt * @@ -33,6 +33,12 @@ static struct armv7_platform *platform; +void exuart_init_cons(void); +void imxuart_init_cons(void); +void omapuart_init_cons(void); +void sxiuart_init_cons(void); +void pl011_init_cons(void); + struct armv7_platform *imx_platform_match(void); struct armv7_platform *omap_platform_match(void); struct armv7_platform *sunxi_platform_match(void); @@ -82,7 +88,15 @@ platform_smc_write(bus_space_tag_t iot, bus_space_handle_t ioh, bus_size_t off, void platform_init_cons(void) { - platform->init_cons(); + if (platform && platform->init_cons) { + platform->init_cons(); + return; + } + exuart_init_cons(); + imxuart_init_cons(); + omapuart_init_cons(); + sxiuart_init_cons(); + pl011_init_cons(); } void diff --git a/sys/arch/armv7/exynos/exuart.c b/sys/arch/armv7/exynos/exuart.c index 8112b8dc283..6b016ac1ef6 100644 --- a/sys/arch/armv7/exynos/exuart.c +++ b/sys/arch/armv7/exynos/exuart.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exuart.c,v 1.3 2016/04/24 00:57:23 patrick Exp $ */ +/* $OpenBSD: exuart.c,v 1.4 2016/06/08 15:27:05 jsg Exp $ */ /* * Copyright (c) 2005 Dale Rahn * @@ -31,20 +31,20 @@ #include - #ifdef DDB #include #endif #include -#if NFDT > 0 -#include -#endif +#include #include #include #include +#include #include +#include + #define DEVUNIT(x) (minor(x) & 0x7f) #define DEVCUA(x) (minor(x) & 0x80) @@ -110,6 +110,8 @@ struct exuart_softc *exuart_sc(dev_t dev); int exuart_intr(void *); +extern int comcnspeed; +extern int comcnmode; /* XXX - we imitate 'com' serial ports and take over their entry points */ /* XXX: These belong elsewhere */ @@ -132,6 +134,20 @@ bus_addr_t exuartconsaddr; tcflag_t exuartconscflag = TTYDEF_CFLAG; int exuartdefaultrate = B115200; +void +exuart_init_cons(void) +{ + struct fdt_memory mem; + void *node; + + if ((node = fdt_find_cons("samsung,exynos4210-uart")) == NULL) + return; + if (fdt_get_memory_address(node, 0, &mem)) + return; + + exuartcnattach(&armv7_bs_tag, mem.addr, comcnspeed, comcnmode); +} + int exuartprobe(struct device *parent, void *self, void *aux) { diff --git a/sys/arch/armv7/exynos/exynos_machdep.c b/sys/arch/armv7/exynos/exynos_machdep.c index 9766982c166..b799dce2477 100644 --- a/sys/arch/armv7/exynos/exynos_machdep.c +++ b/sys/arch/armv7/exynos/exynos_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exynos_machdep.c,v 1.8 2016/06/04 18:09:16 jsg Exp $ */ +/* $OpenBSD: exynos_machdep.c,v 1.9 2016/06/08 15:27:05 jsg Exp $ */ /* * Copyright (c) 2013 Patrick Wildt * @@ -22,10 +22,6 @@ #include -#if NFDT > 0 -#include -#endif - #include #include #include @@ -37,8 +33,6 @@ extern void exdog_reset(void); extern struct board_dev *exynos_board_devs(void); extern void exynos_board_init(void); -extern int comcnspeed; -extern int comcnmode; static void exynos_platform_smc_write(bus_space_tag_t iot, bus_space_handle_t ioh, bus_size_t off, @@ -47,42 +41,6 @@ exynos_platform_smc_write(bus_space_tag_t iot, bus_space_handle_t ioh, bus_size_ bus_space_write_4(iot, ioh, off, val); } -static void -exynos_platform_init_cons(void) -{ - paddr_t paddr; - size_t size; - - switch (board_id) { - case BOARD_ID_EXYNOS5_CHROMEBOOK: -#if NFDT > 0 - void *node; - node = fdt_find_node("/framebuffer"); - if (node != NULL) { - uint32_t *mem; - if (fdt_node_property(node, "reg", (char **)&mem) >= 2*sizeof(uint32_t)) { - paddr = betoh32(*mem++); - size = betoh32(*mem); - } - } -#else - paddr = 0xbfc00000; - size = 0x202000; -#endif - exdisplay_cnattach(&armv7_bs_tag, paddr, size); - break; - case BOARD_ID_EXYNOS4_SMDKC210: - case BOARD_ID_EXYNOS4_NURI: - paddr = 0x13800000; - exuartcnattach(&armv7_bs_tag, paddr, comcnspeed, comcnmode); - break; - default: - printf("board type %x unknown", board_id); - return; - /* XXX - HELP */ - } -} - void exynos_platform_init_mainbus(struct device *self) { @@ -117,7 +75,6 @@ exynos_platform_board_init(void) struct armv7_platform exynos_platform = { .board_init = exynos_platform_board_init, .smc_write = exynos_platform_smc_write, - .init_cons = exynos_platform_init_cons, .watchdog_reset = exynos_platform_watchdog_reset, .powerdown = exynos_platform_powerdown, .disable_l2_if_needed = exynos_platform_disable_l2_if_needed, diff --git a/sys/arch/armv7/imx/imx_machdep.c b/sys/arch/armv7/imx/imx_machdep.c index 91226433440..23b96d45c4b 100644 --- a/sys/arch/armv7/imx/imx_machdep.c +++ b/sys/arch/armv7/imx/imx_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imx_machdep.c,v 1.18 2016/06/04 18:09:16 jsg Exp $ */ +/* $OpenBSD: imx_machdep.c,v 1.19 2016/06/08 15:27:05 jsg Exp $ */ /* * Copyright (c) 2013 Sylvestre Gallon * @@ -36,8 +36,6 @@ extern void imxdog_reset(void); extern struct board_dev *imx_board_devs(void); extern void imx_board_init(void); -extern int comcnspeed; -extern int comcnmode; void imx_platform_smc_write(bus_space_tag_t iot, bus_space_handle_t ioh, bus_size_t off, @@ -46,37 +44,6 @@ imx_platform_smc_write(bus_space_tag_t iot, bus_space_handle_t ioh, bus_size_t o bus_space_write_4(iot, ioh, off, val); } -void -imx_platform_init_cons(void) -{ - paddr_t paddr; - - switch (board_id) { - /* UART1 */ - case BOARD_ID_IMX6_CUBOXI: - case BOARD_ID_IMX6_HUMMINGBOARD: - case BOARD_ID_IMX6_SABRESD: - case BOARD_ID_IMX6_WANDBOARD: - paddr = 0x02020000; - break; - /* UART2 */ - case BOARD_ID_IMX6_SABRELITE: - case BOARD_ID_IMX6_UDOO: - case BOARD_ID_IMX6_NOVENA: - paddr = 0x021e8000; - break; - /* UART4 */ - case BOARD_ID_IMX6_UTILITE: - paddr = 0x021f0000; - break; - default: - printf("board type %x unknown", board_id); - return; - /* XXX - HELP */ - } - imxuartcnattach(&armv7_bs_tag, paddr, comcnspeed, comcnmode); -} - void imx_platform_init_mainbus(struct device *self) { @@ -111,7 +78,6 @@ imx_platform_board_init(void) struct armv7_platform imx_platform = { .board_init = imx_platform_board_init, .smc_write = imx_platform_smc_write, - .init_cons = imx_platform_init_cons, .watchdog_reset = imx_platform_watchdog_reset, .powerdown = imx_platform_powerdown, .disable_l2_if_needed = imx_platform_disable_l2_if_needed, diff --git a/sys/arch/armv7/imx/imxuart.c b/sys/arch/armv7/imx/imxuart.c index 54fbb777ee4..1b284fdb221 100644 --- a/sys/arch/armv7/imx/imxuart.c +++ b/sys/arch/armv7/imx/imxuart.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imxuart.c,v 1.4 2016/05/18 06:49:28 kettenis Exp $ */ +/* $OpenBSD: imxuart.c,v 1.5 2016/06/08 15:27:05 jsg Exp $ */ /* * Copyright (c) 2005 Dale Rahn * @@ -37,11 +37,15 @@ #endif #include +#include #include #include #include +#include #include +#include + #define DEVUNIT(x) (minor(x) & 0x7f) #define DEVCUA(x) (minor(x) & 0x80) @@ -104,6 +108,8 @@ struct imxuart_softc *imxuart_sc(dev_t dev); int imxuart_intr(void *); +extern int comcnspeed; +extern int comcnmode; /* XXX - we imitate 'com' serial ports and take over their entry points */ /* XXX: These belong elsewhere */ @@ -126,6 +132,20 @@ int imxuartdefaultrate = B115200; struct cdevsw imxuartdev = cdev_tty_init(3/*XXX NIMXUART */ ,imxuart); /* 12: serial port */ +void +imxuart_init_cons(void) +{ + struct fdt_memory mem; + void *node; + + if ((node = fdt_find_cons("fsl,imx21-uart")) == NULL) + return; + if (fdt_get_memory_address(node, 0, &mem)) + return; + + imxuartcnattach(&armv7_bs_tag, mem.addr, comcnspeed, comcnmode); +} + void imxuartattach(struct device *parent, struct device *self, void *args) { diff --git a/sys/arch/armv7/omap/omap_com.c b/sys/arch/armv7/omap/omap_com.c index 9a3a94c4f20..a7ee6ba427f 100644 --- a/sys/arch/armv7/omap/omap_com.c +++ b/sys/arch/armv7/omap/omap_com.c @@ -1,4 +1,4 @@ -/* $OpenBSD: omap_com.c,v 1.2 2013/11/06 19:03:07 syl Exp $ */ +/* $OpenBSD: omap_com.c,v 1.3 2016/06/08 15:27:05 jsg Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. * All rights reserved. @@ -49,6 +49,9 @@ #include #include +#include + +#include #define com_isr 8 #define ISR_RECV (ISR_RXPL | ISR_XMODE | ISR_RCVEIR) @@ -56,11 +59,30 @@ void omapuart_attach(struct device *, struct device *, void *); int omapuart_activate(struct device *, int); +extern int comcnspeed; +extern int comcnmode; + struct cfattach com_omap_ca = { sizeof (struct com_softc), NULL, omapuart_attach, NULL, omapuart_activate }; +void +omapuart_init_cons(void) +{ + struct fdt_memory mem; + void *node; + + if ((node = fdt_find_cons("ti,omap3-uart")) == NULL) + return; + if (fdt_get_memory_address(node, 0, &mem)) + return; + + comcnattach(&armv7_a4x_bs_tag, mem.addr, comcnspeed, 48000000, + comcnmode); + comdefaultrate = comcnspeed; +} + void omapuart_attach(struct device *parent, struct device *self, void *aux) { diff --git a/sys/arch/armv7/omap/omap_machdep.c b/sys/arch/armv7/omap/omap_machdep.c index 2a08eadf0e8..a7c95fc8e2b 100644 --- a/sys/arch/armv7/omap/omap_machdep.c +++ b/sys/arch/armv7/omap/omap_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: omap_machdep.c,v 1.8 2016/06/04 18:09:16 jsg Exp $ */ +/* $OpenBSD: omap_machdep.c,v 1.9 2016/06/08 15:27:05 jsg Exp $ */ /* * Copyright (c) 2013 Sylvestre Gallon * @@ -37,8 +37,6 @@ extern void omap4_smc_call(uint32_t, uint32_t); extern void omdog_reset(void); extern struct board_dev *omap_board_devs(void); extern void omap_board_init(void); -extern int comcnspeed; -extern int comcnmode; void omap_platform_smc_write(bus_space_tag_t iot, bus_space_handle_t ioh, @@ -55,28 +53,6 @@ omap_platform_smc_write(bus_space_tag_t iot, bus_space_handle_t ioh, omap4_smc_call(op, val); } -void -omap_platform_init_cons(void) -{ - paddr_t paddr; - - switch (board_id) { - case BOARD_ID_OMAP3_BEAGLE: - case BOARD_ID_OMAP3_OVERO: - paddr = 0x49020000; - break; - case BOARD_ID_AM335X_BEAGLEBONE: - paddr = 0x44e09000; - break; - case BOARD_ID_OMAP4_PANDA: - paddr = 0x48020000; - break; - } - - comcnattach(&armv7_a4x_bs_tag, paddr, comcnspeed, 48000000, comcnmode); - comdefaultrate = comcnspeed; -} - void omap_platform_init_mainbus(struct device *self) { @@ -116,7 +92,6 @@ omap_platform_board_init(void) struct armv7_platform omap_platform = { .board_init = omap_platform_board_init, .smc_write = omap_platform_smc_write, - .init_cons = omap_platform_init_cons, .watchdog_reset = omap_platform_watchdog_reset, .powerdown = omap_platform_powerdown, .disable_l2_if_needed = omap_platform_disable_l2_if_needed, diff --git a/sys/arch/armv7/sunxi/sunxi_machdep.c b/sys/arch/armv7/sunxi/sunxi_machdep.c index ea60f789914..2f16f561f62 100644 --- a/sys/arch/armv7/sunxi/sunxi_machdep.c +++ b/sys/arch/armv7/sunxi/sunxi_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sunxi_machdep.c,v 1.10 2016/06/04 18:09:16 jsg Exp $ */ +/* $OpenBSD: sunxi_machdep.c,v 1.11 2016/06/08 15:27:05 jsg Exp $ */ /* * Copyright (c) 2013 Sylvestre Gallon * @@ -36,8 +36,6 @@ extern int sxiuartcnattach(bus_space_tag_t, bus_addr_t, int, long, tcflag_t); extern void sxidog_reset(void); extern struct board_dev *sunxi_board_devs(void); extern void sunxi_board_init(void); -extern int comcnspeed; -extern int comcnmode; void sunxi_platform_smc_write(bus_space_tag_t iot, bus_space_handle_t ioh, @@ -46,26 +44,6 @@ sunxi_platform_smc_write(bus_space_tag_t iot, bus_space_handle_t ioh, } -void -sunxi_platform_init_cons(void) -{ - paddr_t paddr; - - switch (board_id) { - case BOARD_ID_SUN4I_A10: - case BOARD_ID_SUN7I_A20: - paddr = 0x01c28000; /* UART0 */ - break; - default: - sxiuartcnattach(&armv7_a4x_bs_tag, paddr, comcnspeed, - 24000000, comcnmode); - panic("board type %x unknown", board_id); - } - - sxiuartcnattach(&armv7_a4x_bs_tag, paddr, comcnspeed, 24000000, - comcnmode); -} - void sunxi_platform_init_mainbus(struct device *self) { @@ -100,7 +78,6 @@ sunxi_platform_board_init(void) struct armv7_platform sunxi_platform = { .board_init = sunxi_platform_board_init, .smc_write = sunxi_platform_smc_write, - .init_cons = sunxi_platform_init_cons, .watchdog_reset = sunxi_platform_watchdog_reset, .powerdown = sunxi_platform_powerdown, .disable_l2_if_needed = sunxi_platform_disable_l2_if_needed, diff --git a/sys/arch/armv7/sunxi/sxiuart.c b/sys/arch/armv7/sunxi/sxiuart.c index 5a7136f0e43..a00475feebe 100644 --- a/sys/arch/armv7/sunxi/sxiuart.c +++ b/sys/arch/armv7/sunxi/sxiuart.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sxiuart.c,v 1.4 2015/04/22 11:39:04 jsg Exp $ */ +/* $OpenBSD: sxiuart.c,v 1.5 2016/06/08 15:27:05 jsg Exp $ */ /* * Copyright (c) 2005 Dale Rahn * Copyright (c) 2013 Artturi Alm @@ -38,10 +38,14 @@ #include +#include #include +#include #include #include +#include + #define DEVUNIT(x) (minor(x) & 0x7f) #define DEVCUA(x) (minor(x) & 0x80) @@ -103,6 +107,8 @@ void sxiuart_raisedtr(void *); void sxiuart_softint(void *); int sxiuart_intr(void *); +extern int comcnspeed; +extern int comcnmode; struct sxiuart_softc *sxiuart_sc(dev_t); @@ -134,6 +140,21 @@ int sxiuartdefaultrate = B115200; struct cdevsw sxiuartdev = cdev_tty_init(1/*XXX NIMXUART */ , sxiuart); /* 12: serial port */ +void +sxiuart_init_cons(void) +{ + struct fdt_memory mem; + void *node; + + if ((node = fdt_find_cons("snps,dw-apb-uart")) == NULL) + return; + if (fdt_get_memory_address(node, 0, &mem)) + return; + + sxiuartcnattach(&armv7_a4x_bs_tag, mem.addr, comcnspeed, 24000000, + comcnmode); +} + void sxiuartattach(struct device *parent, struct device *self, void *args) { diff --git a/sys/arch/armv7/vexpress/pl011.c b/sys/arch/armv7/vexpress/pl011.c index 50a902b6be3..5006388ec7c 100644 --- a/sys/arch/armv7/vexpress/pl011.c +++ b/sys/arch/armv7/vexpress/pl011.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pl011.c,v 1.2 2016/04/24 00:57:23 patrick Exp $ */ +/* $OpenBSD: pl011.c,v 1.3 2016/06/08 15:27:05 jsg Exp $ */ /* * Copyright (c) 2014 Patrick Wildt @@ -42,9 +42,13 @@ #if NFDT > 0 #include #endif +#include #include #include #include +#include + +#include #define DEVUNIT(x) (minor(x) & 0x7f) #define DEVCUA(x) (minor(x) & 0x80) @@ -112,6 +116,8 @@ struct pl011_softc *pl011_sc(dev_t dev); int pl011_intr(void *); +extern int comcnspeed; +extern int comcnmode; /* XXX - we imitate 'com' serial ports and take over their entry points */ /* XXX: These belong elsewhere */ @@ -131,6 +137,20 @@ bus_addr_t pl011consaddr; tcflag_t pl011conscflag = TTYDEF_CFLAG; int pl011defaultrate = B38400; +void +pl011_init_cons(void) +{ + struct fdt_memory mem; + void *node; + + if ((node = fdt_find_cons("arm,pl011")) == NULL) + return; + if (fdt_get_memory_address(node, 0, &mem)) + return; + + pl011cnattach(&armv7_bs_tag, mem.addr, comcnspeed, comcnmode); +} + int pl011probe(struct device *parent, void *self, void *aux) { diff --git a/sys/arch/armv7/vexpress/vexpress_machdep.c b/sys/arch/armv7/vexpress/vexpress_machdep.c index 2d9104276a9..005cbe57973 100644 --- a/sys/arch/armv7/vexpress/vexpress_machdep.c +++ b/sys/arch/armv7/vexpress/vexpress_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vexpress_machdep.c,v 1.3 2016/06/04 18:09:16 jsg Exp $ */ +/* $OpenBSD: vexpress_machdep.c,v 1.4 2016/06/08 15:27:05 jsg Exp $ */ /* * Copyright (c) 2013 Sylvestre Gallon * @@ -38,8 +38,6 @@ extern void sysconf_shutdown(void); extern struct board_dev *vexpress_board_devs(void); extern void vexpress_board_init(void); extern int vexpress_legacy_map(void); -extern int comcnspeed; -extern int comcnmode; void vexpress_platform_smc_write(bus_space_tag_t iot, bus_space_handle_t ioh, bus_size_t off, @@ -48,23 +46,6 @@ vexpress_platform_smc_write(bus_space_tag_t iot, bus_space_handle_t ioh, bus_siz bus_space_write_4(iot, ioh, off, val); } -void -vexpress_platform_init_cons(void) -{ - paddr_t paddr; - - switch (board_id) { - default: - case BOARD_ID_VEXPRESS: - if (vexpress_legacy_map()) - paddr = 0x10009000; - else - paddr = 0x1c090000; - break; - } - pl011cnattach(&armv7_bs_tag, paddr, comcnspeed, comcnmode); -} - void vexpress_platform_init_mainbus(struct device *self) { @@ -99,7 +80,6 @@ vexpress_platform_board_init(void) struct armv7_platform vexpress_platform = { .board_init = vexpress_platform_board_init, .smc_write = vexpress_platform_smc_write, - .init_cons = vexpress_platform_init_cons, .watchdog_reset = vexpress_platform_watchdog_reset, .powerdown = vexpress_platform_powerdown, .disable_l2_if_needed = vexpress_platform_disable_l2_if_needed, -- cgit v1.2.3