* [U-Boot] [PATCH 1/1] Add UART base addresses for additional UARTs
@ 2017-10-25 13:46 Landheer-Cieslak, Ronald
2017-10-25 14:45 ` Bin Meng
2017-11-17 19:08 ` [U-Boot] [U-Boot, " Tom Rini
0 siblings, 2 replies; 4+ messages in thread
From: Landheer-Cieslak, Ronald @ 2017-10-25 13:46 UTC (permalink / raw)
To: u-boot
UARTs 1 through 5 were missing in the code - added.
Also pick the default according to the configuration setting for the
console index.
Signed-off-by: Ronald Landheer-Cieslak <ronaldlandheercieslak@eaton.com>
---
arch/arm/include/asm/arch-am33xx/hardware.h | 14 +++++++++++++-
arch/arm/include/asm/arch-am33xx/hardware_am33xx.h | 5 +++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/arch-am33xx/hardware.h b/arch/arm/include/asm/arch-am33xx/hardware.h
index dd950e5..873098e 100644
--- a/arch/arm/include/asm/arch-am33xx/hardware.h
+++ b/arch/arm/include/asm/arch-am33xx/hardware.h
@@ -53,7 +53,19 @@
#define DDR_CONTROL_BASE_ADDR 0x44E11404
/* UART */
-#define DEFAULT_UART_BASE UART0_BASE
+#if CONFIG_CONS_INDEX == 1
+# define DEFAULT_UART_BASE UART0_BASE
+#elif CONFIG_CONS_INDEX == 2
+# define DEFAULT_UART_BASE UART1_BASE
+#elif CONFIG_CONS_INDEX == 3
+# define DEFAULT_UART_BASE UART2_BASE
+#elif CONFIG_CONS_INDEX == 4
+# define DEFAULT_UART_BASE UART3_BASE
+#elif CONFIG_CONS_INDEX == 5
+# define DEFAULT_UART_BASE UART4_BASE
+#elif CONFIG_CONS_INDEX == 6
+# define DEFAULT_UART_BASE UART5_BASE
+#endif
/* GPMC Base address */
#define GPMC_BASE 0x50000000
diff --git a/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h b/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h
index fa9b84f..3e46283 100644
--- a/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h
+++ b/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h
@@ -15,6 +15,11 @@
/* UART Base Address */
#define UART0_BASE 0x44E09000
+#define UART1_BASE 0x48022000
+#define UART2_BASE 0x48024000
+#define UART3_BASE 0x481A6000
+#define UART4_BASE 0x481A8000
+#define UART5_BASE 0x481AA000
/* GPIO Base address */
#define GPIO2_BASE 0x481AC000
--
2.7.4
--
Ronald Landheer-Cieslak
Lead Developer - Substation Automation
Développeur Logiciel Sénior - Automatisation de poste
Energy Automation Solutions Division
Eaton
1990, 5e Rue, bureau 220
St-Romuald Quebec
Canada G6W 5M6
Tel: (418) 830-5946
Fax. : (514) 227-5256
RonaldLandheerCieslak at Eaton.com
www.eaton.com/smartgrid
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 1/1] Add UART base addresses for additional UARTs
2017-10-25 13:46 [U-Boot] [PATCH 1/1] Add UART base addresses for additional UARTs Landheer-Cieslak, Ronald
@ 2017-10-25 14:45 ` Bin Meng
2017-10-25 15:54 ` [U-Boot] [EXTERNAL] " Landheer-Cieslak, Ronald
2017-11-17 19:08 ` [U-Boot] [U-Boot, " Tom Rini
1 sibling, 1 reply; 4+ messages in thread
From: Bin Meng @ 2017-10-25 14:45 UTC (permalink / raw)
To: u-boot
Hi,
On Wed, Oct 25, 2017 at 9:46 PM, Landheer-Cieslak, Ronald
<ronaldlandheercieslak@eaton.com> wrote:
> UARTs 1 through 5 were missing in the code - added.
> Also pick the default according to the configuration setting for the
> console index.
>
> Signed-off-by: Ronald Landheer-Cieslak <ronaldlandheercieslak@eaton.com>
> ---
> arch/arm/include/asm/arch-am33xx/hardware.h | 14 +++++++++++++-
> arch/arm/include/asm/arch-am33xx/hardware_am33xx.h | 5 +++++
> 2 files changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/include/asm/arch-am33xx/hardware.h b/arch/arm/include/asm/arch-am33xx/hardware.h
> index dd950e5..873098e 100644
> --- a/arch/arm/include/asm/arch-am33xx/hardware.h
> +++ b/arch/arm/include/asm/arch-am33xx/hardware.h
> @@ -53,7 +53,19 @@
> #define DDR_CONTROL_BASE_ADDR 0x44E11404
>
> /* UART */
> -#define DEFAULT_UART_BASE UART0_BASE
> +#if CONFIG_CONS_INDEX == 1
> +# define DEFAULT_UART_BASE UART0_BASE
> +#elif CONFIG_CONS_INDEX == 2
> +# define DEFAULT_UART_BASE UART1_BASE
> +#elif CONFIG_CONS_INDEX == 3
> +# define DEFAULT_UART_BASE UART2_BASE
> +#elif CONFIG_CONS_INDEX == 4
> +# define DEFAULT_UART_BASE UART3_BASE
> +#elif CONFIG_CONS_INDEX == 5
> +# define DEFAULT_UART_BASE UART4_BASE
> +#elif CONFIG_CONS_INDEX == 6
> +# define DEFAULT_UART_BASE UART5_BASE
> +#endif
>
Shouldn't these be in device tree?
> /* GPMC Base address */
> #define GPMC_BASE 0x50000000
> diff --git a/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h b/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h
> index fa9b84f..3e46283 100644
> --- a/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h
> +++ b/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h
> @@ -15,6 +15,11 @@
>
> /* UART Base Address */
> #define UART0_BASE 0x44E09000
> +#define UART1_BASE 0x48022000
> +#define UART2_BASE 0x48024000
> +#define UART3_BASE 0x481A6000
> +#define UART4_BASE 0x481A8000
> +#define UART5_BASE 0x481AA000
>
> /* GPIO Base address */
> #define GPIO2_BASE 0x481AC000
> --
>
Regards,
Bin
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [EXTERNAL] Re: [PATCH 1/1] Add UART base addresses for additional UARTs
2017-10-25 14:45 ` Bin Meng
@ 2017-10-25 15:54 ` Landheer-Cieslak, Ronald
0 siblings, 0 replies; 4+ messages in thread
From: Landheer-Cieslak, Ronald @ 2017-10-25 15:54 UTC (permalink / raw)
To: u-boot
Hi Bin,
On Wednesday, October 25, 2017 10:45, Bin Meng wrote:
> On Wed, Oct 25, 2017 at 9:46 PM, Landheer-Cieslak, Ronald <ronaldlandheercieslak@eaton.com> wrote:
>> UARTs 1 through 5 were missing in the code - added.
>> Also pick the default according to the configuration setting for the
>> console index.
>>
>> Signed-off-by: Ronald Landheer-Cieslak
>> <ronaldlandheercieslak@eaton.com>
>> ---
>> arch/arm/include/asm/arch-am33xx/hardware.h | 14 +++++++++++++-
>> arch/arm/include/asm/arch-am33xx/hardware_am33xx.h | 5 +++++
>> 2 files changed, 18 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/include/asm/arch-am33xx/hardware.h
>> b/arch/arm/include/asm/arch-am33xx/hardware.h
>> index dd950e5..873098e 100644
>> --- a/arch/arm/include/asm/arch-am33xx/hardware.h
>> +++ b/arch/arm/include/asm/arch-am33xx/hardware.h
>> @@ -53,7 +53,19 @@
>> #define DDR_CONTROL_BASE_ADDR 0x44E11404
>>
>> /* UART */
>> -#define DEFAULT_UART_BASE UART0_BASE
>> +#if CONFIG_CONS_INDEX == 1
>> +# define DEFAULT_UART_BASE UART0_BASE
>> +#elif CONFIG_CONS_INDEX == 2
>> +# define DEFAULT_UART_BASE UART1_BASE
>> +#elif CONFIG_CONS_INDEX == 3
>> +# define DEFAULT_UART_BASE UART2_BASE
>> +#elif CONFIG_CONS_INDEX == 4
>> +# define DEFAULT_UART_BASE UART3_BASE
>> +#elif CONFIG_CONS_INDEX == 5
>> +# define DEFAULT_UART_BASE UART4_BASE
>> +#elif CONFIG_CONS_INDEX == 6
>> +# define DEFAULT_UART_BASE UART5_BASE
>> +#endif
> Shouldn't these be in device tree?
The device tree isn't loaded at this point, so no: the boot needs to know where the UART registers are in order to use them, and needs to use the right ones according to its configuration.
The previous version of the code allowd board-specific code (i.e. board/<vendor>/<name>/*.c) to configure the pins as needed, but that didn't change the base address being used for the UART - just the pins. That means that if you have a board for which the uart0 pins are muxed elsewhere (i.e., in my case, an SPI bus), you have to change code outside of the board directory to get the boot loader to use the right UART.
With this patch in place, you'll no longer have to do that (your board-specific code just has to mux the pins correctly).
<snip/>
Regards,
Ronald
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [U-Boot, 1/1] Add UART base addresses for additional UARTs
2017-10-25 13:46 [U-Boot] [PATCH 1/1] Add UART base addresses for additional UARTs Landheer-Cieslak, Ronald
2017-10-25 14:45 ` Bin Meng
@ 2017-11-17 19:08 ` Tom Rini
1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2017-11-17 19:08 UTC (permalink / raw)
To: u-boot
On Wed, Oct 25, 2017 at 01:46:53PM +0000, Landheer-Cieslak, Ronald wrote:
> UARTs 1 through 5 were missing in the code - added.
> Also pick the default according to the configuration setting for the
> console index.
>
> Signed-off-by: Ronald Landheer-Cieslak <ronaldlandheercieslak@eaton.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171117/ec683d4c/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-17 19:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-25 13:46 [U-Boot] [PATCH 1/1] Add UART base addresses for additional UARTs Landheer-Cieslak, Ronald
2017-10-25 14:45 ` Bin Meng
2017-10-25 15:54 ` [U-Boot] [EXTERNAL] " Landheer-Cieslak, Ronald
2017-11-17 19:08 ` [U-Boot] [U-Boot, " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox