[PATCH] arm64: renesas: Align configuration headers

Align R-Car Gen2/Gen3/Gen4 configuration header file to look basically the same way across these three SoC generations. There are subtle difference between the remaining bits in those files across SoC generations, but the common bits are now aligned. There is not much left in those headers either, most of the configuration is now converted to Kconfig.
Specifically for R-Car Gen3, GIC registers have been moved to architecture specific header file rcar-gen3-base.h , the rest of the changes here are comment changes and indentation changes.
Signed-off-by: Marek Vasut marek.vasut+renesas@mailbox.org --- Cc: Nobuhiro Iwamatsu iwamatsu@nigauri.org Cc: Paul Barker paul.barker.ct@bp.renesas.com Cc: Tom Rini trini@konsulko.com Cc: u-boot@lists.denx.de --- .../include/mach/rcar-gen3-base.h | 5 +++++ include/configs/rcar-gen2-common.h | 10 ++++++---- include/configs/rcar-gen3-common.h | 19 ++++++------------- include/configs/rcar-gen4-common.h | 8 +++----- 4 files changed, 20 insertions(+), 22 deletions(-)
diff --git a/arch/arm/mach-renesas/include/mach/rcar-gen3-base.h b/arch/arm/mach-renesas/include/mach/rcar-gen3-base.h index 5e2e9eca452..7b4f5f0c651 100644 --- a/arch/arm/mach-renesas/include/mach/rcar-gen3-base.h +++ b/arch/arm/mach-renesas/include/mach/rcar-gen3-base.h @@ -67,6 +67,11 @@ #define SMSTPCR10 0xE6150998 #define SMSTPCR11 0xE615099C
+/* GICv3 */ +/* Distributor Registers */ +#define GICD_BASE 0xF1010000 +#define GICC_BASE 0xF1020000 + /* PFC */ #define PFC_PUEN5 0xE6060414 #define PUEN_SSI_SDATA4 BIT(17) diff --git a/include/configs/rcar-gen2-common.h b/include/configs/rcar-gen2-common.h index 67c9faeca57..020e79ca2a8 100644 --- a/include/configs/rcar-gen2-common.h +++ b/include/configs/rcar-gen2-common.h @@ -1,8 +1,9 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* * include/configs/rcar-gen2-common.h + * This file is R-Car Gen2 common configuration file. * - * Copyright (C) 2013,2014 Renesas Electronics Corporation + * Copyright (C) 2013-2024 Renesas Electronics Corporation */
#ifndef __RCAR_GEN2_COMMON_H @@ -10,14 +11,15 @@
#include <asm/arch/renesas.h>
-/* console */ -#define CFG_SYS_BAUDRATE_TABLE { 38400, 115200 } +/* Console */ +#define CFG_SYS_BAUDRATE_TABLE { 38400, 115200 }
+/* Memory */ #define CFG_SYS_SDRAM_BASE (RCAR_GEN2_SDRAM_BASE) #define CFG_SYS_SDRAM_SIZE (RCAR_GEN2_UBOOT_SDRAM_SIZE)
/* Timer */ -#define CFG_SYS_TIMER_COUNTER (TMU_BASE + 0xc) /* TCNT0 */ +#define CFG_SYS_TIMER_COUNTER (TMU_BASE + 0xc) /* TCNT0 */ #define CFG_SYS_TIMER_RATE (get_board_sys_clk() / 8)
#endif /* __RCAR_GEN2_COMMON_H */ diff --git a/include/configs/rcar-gen3-common.h b/include/configs/rcar-gen3-common.h index 3f0831a901c..bedb1c0843e 100644 --- a/include/configs/rcar-gen3-common.h +++ b/include/configs/rcar-gen3-common.h @@ -3,7 +3,7 @@ * include/configs/rcar-gen3-common.h * This file is R-Car Gen3 common configuration file. * - * Copyright (C) 2015-2017 Renesas Electronics Corporation + * Copyright (C) 2015-2024 Renesas Electronics Corporation */
#ifndef __RCAR_GEN3_COMMON_H @@ -11,24 +11,17 @@
#include <asm/arch/renesas.h>
-/* boot option */ +/* Console */ +#define CFG_SYS_BAUDRATE_TABLE { 115200, 38400 }
-/* Generic Interrupt Controller Definitions */ -#define GICD_BASE 0xF1010000 -#define GICC_BASE 0xF1020000 - -/* console */ -#define CFG_SYS_BAUDRATE_TABLE { 115200, 38400 } - -/* MEMORY */ +/* Memory */ #define DRAM_RSV_SIZE 0x08000000 #define CFG_SYS_SDRAM_BASE (0x40000000 + DRAM_RSV_SIZE) #define CFG_SYS_SDRAM_SIZE (0x80000000u - DRAM_RSV_SIZE) #define CFG_MAX_MEM_MAPPED (0x80000000u - DRAM_RSV_SIZE)
-/* ENV setting */ - -#define CFG_EXTRA_ENV_SETTINGS \ +/* Environment setting */ +#define CFG_EXTRA_ENV_SETTINGS \ "bootm_size=0x10000000\0"
#endif /* __RCAR_GEN3_COMMON_H */ diff --git a/include/configs/rcar-gen4-common.h b/include/configs/rcar-gen4-common.h index 37a37c013df..1a00adb79d1 100644 --- a/include/configs/rcar-gen4-common.h +++ b/include/configs/rcar-gen4-common.h @@ -3,7 +3,7 @@ * include/configs/rcar-gen4-common.h * This file is R-Car Gen4 common configuration file. * - * Copyright (C) 2021 Renesas Electronics Corporation + * Copyright (C) 2021-2024 Renesas Electronics Corporation */
#ifndef __RCAR_GEN4_COMMON_H @@ -12,7 +12,7 @@ #include <asm/arch/renesas.h>
/* Console */ -#define CFG_SYS_BAUDRATE_TABLE { 38400, 115200, 921600, 1843200 } +#define CFG_SYS_BAUDRATE_TABLE { 38400, 115200, 921600, 1843200 }
/* Memory */ #define DRAM_RSV_SIZE 0x08000000 @@ -20,10 +20,8 @@ #define CFG_SYS_SDRAM_SIZE (0x80000000u - DRAM_RSV_SIZE) #define CFG_MAX_MEM_MAPPED (0x80000000u - DRAM_RSV_SIZE)
-/* PHY needs a longer autoneg timeout */ - /* Environment setting */ -#define CFG_EXTRA_ENV_SETTINGS \ +#define CFG_EXTRA_ENV_SETTINGS \ "bootm_size=0x10000000\0"
#endif /* __RCAR_GEN4_COMMON_H */

On Sat, Dec 14, 2024 at 11:45:11PM +0100, Marek Vasut wrote:
Align R-Car Gen2/Gen3/Gen4 configuration header file to look basically the same way across these three SoC generations. There are subtle difference between the remaining bits in those files across SoC generations, but the common bits are now aligned. There is not much left in those headers either, most of the configuration is now converted to Kconfig.
Specifically for R-Car Gen3, GIC registers have been moved to architecture specific header file rcar-gen3-base.h , the rest of the changes here are comment changes and indentation changes.
Signed-off-by: Marek Vasut marek.vasut+renesas@mailbox.org
Cc: Nobuhiro Iwamatsu iwamatsu@nigauri.org Cc: Paul Barker paul.barker.ct@bp.renesas.com Cc: Tom Rini trini@konsulko.com Cc: u-boot@lists.denx.de
.../include/mach/rcar-gen3-base.h | 5 +++++ include/configs/rcar-gen2-common.h | 10 ++++++---- include/configs/rcar-gen3-common.h | 19 ++++++------------- include/configs/rcar-gen4-common.h | 8 +++----- 4 files changed, 20 insertions(+), 22 deletions(-)
This is good. As a follow-up, since it's a functional change, can we just switch to the default CFG_SYS_BAUDRATE_TABLE of { 9600, 19200, 38400, 57600, 115200 } ?

On 12/15/24 5:48 PM, Tom Rini wrote:
On Sat, Dec 14, 2024 at 11:45:11PM +0100, Marek Vasut wrote:
Align R-Car Gen2/Gen3/Gen4 configuration header file to look basically the same way across these three SoC generations. There are subtle difference between the remaining bits in those files across SoC generations, but the common bits are now aligned. There is not much left in those headers either, most of the configuration is now converted to Kconfig.
Specifically for R-Car Gen3, GIC registers have been moved to architecture specific header file rcar-gen3-base.h , the rest of the changes here are comment changes and indentation changes.
Signed-off-by: Marek Vasut marek.vasut+renesas@mailbox.org
Cc: Nobuhiro Iwamatsu iwamatsu@nigauri.org Cc: Paul Barker paul.barker.ct@bp.renesas.com Cc: Tom Rini trini@konsulko.com Cc: u-boot@lists.denx.de
.../include/mach/rcar-gen3-base.h | 5 +++++ include/configs/rcar-gen2-common.h | 10 ++++++---- include/configs/rcar-gen3-common.h | 19 ++++++------------- include/configs/rcar-gen4-common.h | 8 +++----- 4 files changed, 20 insertions(+), 22 deletions(-)
This is good. As a follow-up, since it's a functional change
Is it ?
, can we just switch to the default CFG_SYS_BAUDRATE_TABLE of { 9600, 19200, 38400, 57600, 115200 } ?
We cannot, because the new(er) SoC generations use 1843200 Bdps UART baudrate .
participants (3)
-
Marek Vasut
-
Marek Vasut
-
Tom Rini