From: Jules Maselbas <jmaselbas@zdiv.net>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC PATCH 05/11] arm: sunxi: Add debug_ll
Date: Fri, 19 May 2023 12:36:16 +0200 [thread overview]
Message-ID: <ZGdRIO61IrqeuVn8@tour> (raw)
In-Reply-To: <ff0cb7f1-9487-06c4-4db0-942a13a10ecc@pengutronix.de>
On Thu, May 18, 2023 at 09:05:21PM +0200, Ahmad Fatoum wrote:
> On 11.05.23 01:37, Jules Maselbas wrote:
snip
> > diff --git a/include/mach/sunxi/debug_ll.h b/include/mach/sunxi/debug_ll.h
> > new file mode 100644
> > index 0000000000..64c65a5917
> > --- /dev/null
> > +++ b/include/mach/sunxi/debug_ll.h
> > @@ -0,0 +1,35 @@
> > +/* SPDX-License-Identifier: GPL-2.0-only */
> > +
> > +#ifndef __MACH_DEBUG_LL_H__
> > +#define __MACH_DEBUG_LL_H__
> > +
> > +#include <io.h>
> > +
> > +#define DEBUG_LL_UART_ADDR CONFIG_SUNXI_DEBUG_LL_UART_BASE
> > +
> > +static inline uint8_t debug_ll_read_reg(int reg)
> > +{
> > + return readl(IOMEM(DEBUG_LL_UART_ADDR) + reg * sizeof(uint32_t));
> > +}
> > +
> > +static inline void debug_ll_write_reg(int reg, uint8_t val)
> > +{
> > + writel(val, IOMEM(DEBUG_LL_UART_ADDR) + reg * sizeof(uint32_t));
> > +}
> > +
> > +#include <debug_ll/ns16550.h>
> > +
> > +static inline void debug_ll_init(void)
> > +{
> > + uint16_t divisor;
>
> Call sunxi_uart_setup here?
While taking look at this, the initial code (in sun50i_cpu_lowlevel_init)
and now the lowlevel board code. There is bits done every where, and the
acctual pin mux is done in lowlevel board code, in a function setup_uart.
I think I will "fuse" setup_uart and the bits originally done by
sun50i_cpu_lowlevel_init: lowlevel code will call sunxi_uart_setup (for
clock gating, un-reset and pinmux).
> > +
> > + divisor = debug_ll_ns16550_calc_divisor(24 * 1000 * 1000);
> > + debug_ll_ns16550_init(divisor);
> > +}
> > +
> > +static inline void PUTC_LL(int c)
> > +{
> > + debug_ll_ns16550_putc(c);
> > +}
> > +
> > +#endif
>
> --
> Pengutronix e.K. | |
> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
>
next prev parent reply other threads:[~2023-05-19 10:37 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-10 23:37 [RFC PATCH 00/11] Add support for Allwinner (sunxi) A64 SoC Jules Maselbas
2023-05-10 23:37 ` [RFC PATCH 01/11] scripts: Add Allwinner eGON image support Jules Maselbas
2023-05-11 7:25 ` Sascha Hauer
2023-05-11 20:14 ` Jules Maselbas
2023-05-18 18:47 ` Ahmad Fatoum
2023-05-19 9:40 ` Jules Maselbas
2023-05-10 23:37 ` [RFC PATCH 02/11] sunxi: introduce mach-sunxi Jules Maselbas
2023-05-11 7:27 ` Sascha Hauer
2023-05-18 18:46 ` Ahmad Fatoum
2023-05-19 10:09 ` Jules Maselbas
2023-05-22 10:32 ` Ahmad Fatoum
2023-05-10 23:37 ` [RFC PATCH 03/11] ARM: dls: Add ENTRY_HEADER macro to add .text section Jules Maselbas
2023-05-18 18:49 ` Ahmad Fatoum
2023-05-10 23:37 ` [RFC PATCH 04/11] sunxi: Add lowlevel switch to aarch64 Jules Maselbas
2023-05-18 19:01 ` Ahmad Fatoum
2023-05-10 23:37 ` [RFC PATCH 05/11] arm: sunxi: Add debug_ll Jules Maselbas
2023-05-18 19:05 ` Ahmad Fatoum
2023-05-19 10:36 ` Jules Maselbas [this message]
2023-05-10 23:37 ` [RFC PATCH 06/11] clk: Add clock driver for sun50i-a64 Jules Maselbas
2023-05-18 19:06 ` Ahmad Fatoum
2023-05-10 23:37 ` [RFC PATCH 07/11] pinctrl: Add sun50i-a64 pinctrl driver Jules Maselbas
2023-05-18 19:10 ` Ahmad Fatoum
2023-05-19 10:52 ` Jules Maselbas
2023-05-10 23:37 ` [RFC PATCH 08/11] mci: Add sunxi-mmc driver Jules Maselbas
2023-05-18 19:26 ` Ahmad Fatoum
2023-05-19 5:51 ` Sascha Hauer
2023-05-19 6:51 ` Ahmad Fatoum
2023-05-10 23:37 ` [RFC PATCH 09/11] arm: sunxi: Add sun50i SDRAM init Jules Maselbas
2023-05-11 7:39 ` Sascha Hauer
2023-05-10 23:37 ` [RFC PATCH 10/11] arm: boards: sunxi: Add initial support for the pinephone Jules Maselbas
2023-05-18 19:39 ` Ahmad Fatoum
2023-05-10 23:37 ` [RFC PATCH 11/11] arm: boards: sunxi: Add pine64 board Jules Maselbas
2023-05-18 19:44 ` Ahmad Fatoum
2023-05-19 16:30 ` Jules Maselbas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZGdRIO61IrqeuVn8@tour \
--to=jmaselbas@zdiv.net \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.