From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from magratgarlick.emantor.de ([78.46.208.201] helo=margratgarlick.emantor.de) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZa0B-0000b5-Le for barebox@lists.infradead.org; Wed, 19 Dec 2018 11:27:01 +0000 References: From: Rouven Czerwinski In-reply-to: Date: Wed, 19 Dec 2018 12:26:44 +0100 Message-ID: <8736qtdaff.fsf@czerwinskis.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH v5 6/9] ARM: rpi: add NS16550 support To: Rouven Czerwinski Cc: barebox@lists.infradead.org Rouven Czerwinski writes: > Since the 16550 driver now supports the RPI3 miniuart, enable it in the default > config. > > Signed-off-by: Rouven Czerwinski > --- > arch/arm/configs/rpi_defconfig | 1 + > drivers/serial/serial_ns16550.c | 6 +++++- > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/configs/rpi_defconfig b/arch/arm/configs/rpi_defconfig > index 2bb6158..dc5ab1f 100644 > --- a/arch/arm/configs/rpi_defconfig > +++ b/arch/arm/configs/rpi_defconfig > @@ -63,6 +63,7 @@ CONFIG_CMD_OF_PROPERTY=y > CONFIG_CMD_OFTREE=y > CONFIG_CMD_TIME=y > CONFIG_SERIAL_AMBA_PL011=y > +CONFIG_DRIVER_SERIAL_NS16550=y > CONFIG_MCI=y > CONFIG_MCI_BCM283X=y > CONFIG_LED=y > diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c > index 256063a..5e5b671 100644 > --- a/drivers/serial/serial_ns16550.c > +++ b/drivers/serial/serial_ns16550.c > @@ -253,11 +253,15 @@ static void ns16550_jz_init_port(struct console_device *cdev) > ns16550_serial_init_port(cdev); > } > > +#define BCM2836_AUX_CLOCK_ENB 0x3f215004 /* BCM2835 AUX Clock enable register */ > +#define BCM2836_AUX_CLOCK_EN_UART BIT(0) /* Bit 0 enables the Miniuart */ > + > static void rpi_init_port(struct console_device *cdev) > { > + uint8_t val; ^ This leftover should be removed > struct ns16550_priv *priv = to_ns16550_priv(cdev); > > - writeb(0x01, 0x3f215004); > + writeb(BCM2835_AUX_CLOCK_EN_UART, BCM2835_AUX_CLOCK_ENB); ^ this is broken, the Define uses 6 not 5 (since for rpi2 and 3 the address is different) I'll resend the series with these changes squashed into the previous commit which touches this file. > priv->plat.shift = 2; > /* > * We double the clock rate since the 16550 will divide by 16 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox