From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org, Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [PATCH 2/4] ARM: at91: debug_ll: make UART base address configurable
Date: Tue, 26 Feb 2019 10:09:18 +0100 [thread overview]
Message-ID: <6be6c901-8f12-6239-d3f8-0cf1aed3153f@pengutronix.de> (raw)
In-Reply-To: <20190220075552.uwkd46bevpdl775t@pengutronix.de>
Hello Sascha,
On 20/2/19 08:55, Sascha Hauer wrote:
> On Tue, Feb 19, 2019 at 10:10:02PM +0100, Ahmad Fatoum wrote:
>> Hello Sam,
>>
>> On 19/2/19 21:42, Sam Ravnborg wrote:
>>> Hi Ahmad.
>>>
>>> On Tue, Feb 19, 2019 at 01:06:10PM +0100, Ahmad Fatoum wrote:
>>>> This is in line with other platforms such as i.MX, which allow
>>>> specifying a debug port. As we can't use port indices because
>>>> the UARTs aren't mapped consecutively, allow specifying a hex
>>>> base at configuration time.
>>>>
>>>> A side effect of this patch is that sama5d4's HAVE_AT91_DBGU2
>>>> is now honored as well. Previously anything besides DBGU0
>>>> defaulted to DBGU1.
>>>
>>> This approch hardcoded the DBGU address based on the configuration.
>>> Can you somehow come up with something that is run-time configured?
>>
>> I think it should remain build-time configurable, to account for cases
>> such as when the designated debug port isn't usable for whatever reason
>> (e.g. its exposed via a USB-to-UART bridge and you want to use a proper
>> UART, because you hate that the disconnection on power cycle..).
>
> Something like this should work:
>
> config AT91_DEBUG_DEFAULT_BASE
> hex
> default 0xfffff200 if AT91_DBGU_AT91RM9200
> default 0xffffee00 if AT91_DBGU_AT91SAM9263
> default 0xfc069000 if AT91_DBGU_AT91SAMA5D4
>
> choice
> prompt "Choose Lowlevel debug UART"
>
> config AT91_DBGU_AT91RM9200
> bool "AT91RM9200, AT91SAM926[01], AT91SAM9x5, AT91SAM9N12"
> config AT91_DBGU_AT91SAM9263
> bool "AT91SAM9263, AT91SAM9G45, ARCH_SAMA5D3"
> config AT91_DBGU_AT91SAMA5D4
> bool "AT91SAMA5D4"
> endchoice
>
> This lets you choose the right one if multiple SoCs are enabled during
> build. Of course it only works if you choose the correct one for the SoC
> you are running on later.
I would like to keep it configurable, i.e. the user can choose which
UART port to choose. Is this ok?
>
> Sascha
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-02-26 9:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 12:06 [PATCH 0/4] ARM: at91: misc fixes and cleanup Ahmad Fatoum
2019-02-19 12:06 ` [PATCH 1/4] ARM: at91: replace __raw_{readl, writel} of peripherals with readl, writel Ahmad Fatoum
2019-02-19 12:06 ` [PATCH 2/4] ARM: at91: debug_ll: make UART base address configurable Ahmad Fatoum
2019-02-19 20:42 ` Sam Ravnborg
2019-02-19 21:10 ` Ahmad Fatoum
2019-02-19 21:12 ` Ahmad Fatoum
2019-02-19 21:30 ` Sam Ravnborg
2019-02-20 7:55 ` Sascha Hauer
2019-02-26 9:09 ` Ahmad Fatoum [this message]
2019-02-19 12:06 ` [PATCH 3/4] ARM: at91: fix at91sama5_get_ddram_size for sama5d4 Ahmad Fatoum
2019-02-19 12:06 ` [PATCH 4/4] ARM: at91: remove duplicate get_ddram_size code Ahmad Fatoum
2019-02-24 12:35 ` Sam Ravnborg
2019-02-26 9:10 ` Ahmad Fatoum
2019-02-26 9:56 ` Ahmad Fatoum
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=6be6c901-8f12-6239-d3f8-0cf1aed3153f@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
--cc=sam@ravnborg.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox