All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] riscv: Rename spl_soc_init() to spl_dram_init()
@ 2024-04-24  7:43 lukas.funke-oss
  2024-04-24  7:43 ` [PATCH v3 1/2] board: sifive: " lukas.funke-oss
  2024-04-24  7:43 ` [PATCH v3 2/2] board: starfive: " lukas.funke-oss
  0 siblings, 2 replies; 7+ messages in thread
From: lukas.funke-oss @ 2024-04-24  7:43 UTC (permalink / raw
  To: u-boot
  Cc: E Shattow, Heinrich Schuchardt, Lukas Funke, Atish Patra,
	Aurelien Jarno, Chanho Park, Green Wan, Minda Chen, Nylon Chen,
	Palmer Dabbelt, Shiji Yang, Simon Glass, Tom Rini

From: Lukas Funke <lukas.funke@weidmueller.com>


This patch series renames spl_soc_init() to spl_dram_init() since the
purpose of the function is to initialization the DRAM on sifive/starfive
boards. spl_dram_init() is a commonly used function for this purpose.

Changes in v3:
 - Reorganize patches such that each patch can be built individually

Changes in v2:
 - capitalized acronym DRAM

Lukas Funke (2):
  board: sifive: Rename spl_soc_init() to spl_dram_init()
  board: starfive: Rename spl_soc_init() to spl_dram_init()

 arch/riscv/cpu/fu540/spl.c               | 2 +-
 arch/riscv/cpu/fu740/spl.c               | 2 +-
 arch/riscv/cpu/jh7110/spl.c              | 2 +-
 arch/riscv/include/asm/arch-fu540/spl.h  | 2 +-
 arch/riscv/include/asm/arch-fu740/spl.h  | 2 +-
 arch/riscv/include/asm/arch-jh7110/spl.h | 2 +-
 board/sifive/unleashed/spl.c             | 4 ++--
 board/sifive/unmatched/spl.c             | 4 ++--
 board/starfive/visionfive2/spl.c         | 4 ++--
 9 files changed, 12 insertions(+), 12 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v3 1/2] board: sifive: Rename spl_soc_init() to spl_dram_init()
  2024-04-24  7:43 [PATCH v3 0/2] riscv: Rename spl_soc_init() to spl_dram_init() lukas.funke-oss
@ 2024-04-24  7:43 ` lukas.funke-oss
  2024-04-26  7:51   ` Leo Liang
  2024-04-24  7:43 ` [PATCH v3 2/2] board: starfive: " lukas.funke-oss
  1 sibling, 1 reply; 7+ messages in thread
From: lukas.funke-oss @ 2024-04-24  7:43 UTC (permalink / raw
  To: u-boot
  Cc: E Shattow, Heinrich Schuchardt, Lukas Funke, Anup Patel,
	Atish Patra, Green Wan, Leo, Nylon Chen, Palmer Dabbelt,
	Paul Walmsley, Tom Rini, Vincent Chen, Zong Li

From: Lukas Funke <lukas.funke@weidmueller.com>

Rename spl_soc_init() to spl_dram_init() because the generic function
name does not reflect what the function actually does. Also
spl_dram_init() is commonly used for dram initialization and should be
called from board_init_f().

Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
---

(no changes since v1)

 arch/riscv/cpu/fu540/spl.c              | 2 +-
 arch/riscv/cpu/fu740/spl.c              | 2 +-
 arch/riscv/include/asm/arch-fu540/spl.h | 2 +-
 arch/riscv/include/asm/arch-fu740/spl.h | 2 +-
 board/sifive/unleashed/spl.c            | 4 ++--
 board/sifive/unmatched/spl.c            | 4 ++--
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/riscv/cpu/fu540/spl.c b/arch/riscv/cpu/fu540/spl.c
index 45657b7909..cedb70b66a 100644
--- a/arch/riscv/cpu/fu540/spl.c
+++ b/arch/riscv/cpu/fu540/spl.c
@@ -7,7 +7,7 @@
 #include <dm.h>
 #include <log.h>
 
-int spl_soc_init(void)
+int spl_dram_init(void)
 {
 	int ret;
 	struct udevice *dev;
diff --git a/arch/riscv/cpu/fu740/spl.c b/arch/riscv/cpu/fu740/spl.c
index c6816e9ed4..16b307f036 100644
--- a/arch/riscv/cpu/fu740/spl.c
+++ b/arch/riscv/cpu/fu740/spl.c
@@ -10,7 +10,7 @@
 
 #define CSR_U74_FEATURE_DISABLE	0x7c1
 
-int spl_soc_init(void)
+int spl_dram_init(void)
 {
 	int ret;
 	struct udevice *dev;
diff --git a/arch/riscv/include/asm/arch-fu540/spl.h b/arch/riscv/include/asm/arch-fu540/spl.h
index 4697279f43..519e7eb210 100644
--- a/arch/riscv/include/asm/arch-fu540/spl.h
+++ b/arch/riscv/include/asm/arch-fu540/spl.h
@@ -9,6 +9,6 @@
 #ifndef _SPL_SIFIVE_H
 #define _SPL_SIFIVE_H
 
-int spl_soc_init(void);
+int spl_dram_init(void);
 
 #endif /* _SPL_SIFIVE_H */
diff --git a/arch/riscv/include/asm/arch-fu740/spl.h b/arch/riscv/include/asm/arch-fu740/spl.h
index 15ad9e7c8b..b327ac5036 100644
--- a/arch/riscv/include/asm/arch-fu740/spl.h
+++ b/arch/riscv/include/asm/arch-fu740/spl.h
@@ -9,6 +9,6 @@
 #ifndef _SPL_SIFIVE_H
 #define _SPL_SIFIVE_H
 
-int spl_soc_init(void);
+int spl_dram_init(void);
 
 #endif /* _SPL_SIFIVE_H */
diff --git a/board/sifive/unleashed/spl.c b/board/sifive/unleashed/spl.c
index fe27316b2d..9df9c68604 100644
--- a/board/sifive/unleashed/spl.c
+++ b/board/sifive/unleashed/spl.c
@@ -27,9 +27,9 @@ int spl_board_init_f(void)
 {
 	int ret;
 
-	ret = spl_soc_init();
+	ret = spl_dram_init();
 	if (ret) {
-		debug("FU540 SPL init failed: %d\n", ret);
+		debug("FU540 DRAM init failed: %d\n", ret);
 		return ret;
 	}
 
diff --git a/board/sifive/unmatched/spl.c b/board/sifive/unmatched/spl.c
index e69bed9d99..6fc1d80954 100644
--- a/board/sifive/unmatched/spl.c
+++ b/board/sifive/unmatched/spl.c
@@ -134,9 +134,9 @@ int spl_board_init_f(void)
 {
 	int ret;
 
-	ret = spl_soc_init();
+	ret = spl_dram_init();
 	if (ret) {
-		debug("HiFive Unmatched FU740 SPL init failed: %d\n", ret);
+		debug("HiFive Unmatched FU740 DRAM init failed: %d\n", ret);
 		goto end;
 	}
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v3 2/2] board: starfive: Rename spl_soc_init() to spl_dram_init()
  2024-04-24  7:43 [PATCH v3 0/2] riscv: Rename spl_soc_init() to spl_dram_init() lukas.funke-oss
  2024-04-24  7:43 ` [PATCH v3 1/2] board: sifive: " lukas.funke-oss
@ 2024-04-24  7:43 ` lukas.funke-oss
  2024-04-24 11:01   ` Heinrich Schuchardt
  1 sibling, 1 reply; 7+ messages in thread
From: lukas.funke-oss @ 2024-04-24  7:43 UTC (permalink / raw
  To: u-boot
  Cc: E Shattow, Heinrich Schuchardt, Lukas Funke, Aurelien Jarno,
	Bo Gan, Chanho Park, Leo, Minda Chen, Shiji Yang, Simon Glass,
	Tom Rini, Yanhong Wang

From: Lukas Funke <lukas.funke@weidmueller.com>

Rename spl_soc_init() to spl_dram_init() because the generic function
name does not reflect what the function actually does. Also
spl_dram_init() is commonly used for dram initialization and should be
called from board_init_f().

Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
---

Changes in v3:
 - Reorganize patches such that each patch can be built individually

Changes in v2:
 - capitalized acronym DRAM

 arch/riscv/cpu/jh7110/spl.c              | 2 +-
 arch/riscv/include/asm/arch-jh7110/spl.h | 2 +-
 board/starfive/visionfive2/spl.c         | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/riscv/cpu/jh7110/spl.c b/arch/riscv/cpu/jh7110/spl.c
index 6bdf8b9c72..87aaf86524 100644
--- a/arch/riscv/cpu/jh7110/spl.c
+++ b/arch/riscv/cpu/jh7110/spl.c
@@ -28,7 +28,7 @@ static bool check_ddr_size(phys_size_t size)
 	}
 }
 
-int spl_soc_init(void)
+int spl_dram_init(void)
 {
 	int ret;
 	struct udevice *dev;
diff --git a/arch/riscv/include/asm/arch-jh7110/spl.h b/arch/riscv/include/asm/arch-jh7110/spl.h
index 23ce8871b3..d73355bf35 100644
--- a/arch/riscv/include/asm/arch-jh7110/spl.h
+++ b/arch/riscv/include/asm/arch-jh7110/spl.h
@@ -7,6 +7,6 @@
 #ifndef _SPL_STARFIVE_H
 #define _SPL_STARFIVE_H
 
-int spl_soc_init(void);
+int spl_dram_init(void);
 
 #endif /* _SPL_STARFIVE_H */
diff --git a/board/starfive/visionfive2/spl.c b/board/starfive/visionfive2/spl.c
index 45848db6d8..ca61b5be22 100644
--- a/board/starfive/visionfive2/spl.c
+++ b/board/starfive/visionfive2/spl.c
@@ -285,9 +285,9 @@ int spl_board_init_f(void)
 
 	jh7110_jtag_init();
 
-	ret = spl_soc_init();
+	ret = spl_dram_init();
 	if (ret) {
-		debug("JH7110 SPL init failed: %d\n", ret);
+		debug("JH7110 DRAM init failed: %d\n", ret);
 		return ret;
 	}
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 2/2] board: starfive: Rename spl_soc_init() to spl_dram_init()
  2024-04-24  7:43 ` [PATCH v3 2/2] board: starfive: " lukas.funke-oss
@ 2024-04-24 11:01   ` Heinrich Schuchardt
  2024-05-02  6:06     ` Lukas Funke
  0 siblings, 1 reply; 7+ messages in thread
From: Heinrich Schuchardt @ 2024-04-24 11:01 UTC (permalink / raw
  To: lukas.funke-oss
  Cc: E Shattow, Lukas Funke, Aurelien Jarno, Bo Gan, Chanho Park, Leo,
	Minda Chen, Shiji Yang, Simon Glass, Tom Rini, Yanhong Wang,
	u-boot

On 24.04.24 09:43, lukas.funke-oss@weidmueller.com wrote:
> From: Lukas Funke <lukas.funke@weidmueller.com>
>
> Rename spl_soc_init() to spl_dram_init() because the generic function
> name does not reflect what the function actually does. Also
> spl_dram_init() is commonly used for dram initialization and should be
> called from board_init_f().
>
> Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

> ---
>
> Changes in v3:
>   - Reorganize patches such that each patch can be built individually
>
> Changes in v2:
>   - capitalized acronym DRAM
>
>   arch/riscv/cpu/jh7110/spl.c              | 2 +-
>   arch/riscv/include/asm/arch-jh7110/spl.h | 2 +-
>   board/starfive/visionfive2/spl.c         | 4 ++--
>   3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/riscv/cpu/jh7110/spl.c b/arch/riscv/cpu/jh7110/spl.c
> index 6bdf8b9c72..87aaf86524 100644
> --- a/arch/riscv/cpu/jh7110/spl.c
> +++ b/arch/riscv/cpu/jh7110/spl.c
> @@ -28,7 +28,7 @@ static bool check_ddr_size(phys_size_t size)
>   	}
>   }
>
> -int spl_soc_init(void)
> +int spl_dram_init(void)
>   {
>   	int ret;
>   	struct udevice *dev;
> diff --git a/arch/riscv/include/asm/arch-jh7110/spl.h b/arch/riscv/include/asm/arch-jh7110/spl.h
> index 23ce8871b3..d73355bf35 100644
> --- a/arch/riscv/include/asm/arch-jh7110/spl.h
> +++ b/arch/riscv/include/asm/arch-jh7110/spl.h
> @@ -7,6 +7,6 @@
>   #ifndef _SPL_STARFIVE_H
>   #define _SPL_STARFIVE_H
>
> -int spl_soc_init(void);
> +int spl_dram_init(void);
>
>   #endif /* _SPL_STARFIVE_H */
> diff --git a/board/starfive/visionfive2/spl.c b/board/starfive/visionfive2/spl.c
> index 45848db6d8..ca61b5be22 100644
> --- a/board/starfive/visionfive2/spl.c
> +++ b/board/starfive/visionfive2/spl.c
> @@ -285,9 +285,9 @@ int spl_board_init_f(void)
>
>   	jh7110_jtag_init();
>
> -	ret = spl_soc_init();
> +	ret = spl_dram_init();
>   	if (ret) {
> -		debug("JH7110 SPL init failed: %d\n", ret);
> +		debug("JH7110 DRAM init failed: %d\n", ret);
>   		return ret;
>   	}
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 1/2] board: sifive: Rename spl_soc_init() to spl_dram_init()
  2024-04-24  7:43 ` [PATCH v3 1/2] board: sifive: " lukas.funke-oss
@ 2024-04-26  7:51   ` Leo Liang
  0 siblings, 0 replies; 7+ messages in thread
From: Leo Liang @ 2024-04-26  7:51 UTC (permalink / raw
  To: lukas.funke-oss
  Cc: u-boot, E Shattow, Heinrich Schuchardt, Lukas Funke, Anup Patel,
	Atish Patra, Green Wan, Nylon Chen, Palmer Dabbelt, Paul Walmsley,
	Tom Rini, Vincent Chen, Zong Li

On Wed, Apr 24, 2024 at 09:43:38AM +0200, lukas.funke-oss@weidmueller.com wrote:
> From: Lukas Funke <lukas.funke@weidmueller.com>
> 
> Rename spl_soc_init() to spl_dram_init() because the generic function
> name does not reflect what the function actually does. Also
> spl_dram_init() is commonly used for dram initialization and should be
> called from board_init_f().
> 
> Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
> ---
> 
> (no changes since v1)
> 
>  arch/riscv/cpu/fu540/spl.c              | 2 +-
>  arch/riscv/cpu/fu740/spl.c              | 2 +-
>  arch/riscv/include/asm/arch-fu540/spl.h | 2 +-
>  arch/riscv/include/asm/arch-fu740/spl.h | 2 +-
>  board/sifive/unleashed/spl.c            | 4 ++--
>  board/sifive/unmatched/spl.c            | 4 ++--
>  6 files changed, 8 insertions(+), 8 deletions(-)

Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 2/2] board: starfive: Rename spl_soc_init() to spl_dram_init()
  2024-04-24 11:01   ` Heinrich Schuchardt
@ 2024-05-02  6:06     ` Lukas Funke
  2024-05-02  6:33       ` Leo Liang
  0 siblings, 1 reply; 7+ messages in thread
From: Lukas Funke @ 2024-05-02  6:06 UTC (permalink / raw
  To: u-boot
  Cc: E Shattow, Lukas Funke, Leo, Minda Chen, Simon Glass,
	Yanhong Wang, Heinrich Schuchardt, Tom Rini

On 24.04.2024 13:01, Heinrich Schuchardt wrote:
> On 24.04.24 09:43, lukas.funke-oss@weidmueller.com wrote:
>> From: Lukas Funke <lukas.funke@weidmueller.com>
>>
>> Rename spl_soc_init() to spl_dram_init() because the generic function
>> name does not reflect what the function actually does. Also
>> spl_dram_init() is commonly used for dram initialization and should be
>> called from board_init_f().
>>
>> Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
> 
> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> 
>> ---
>>
>> Changes in v3:
>>   - Reorganize patches such that each patch can be built individually
>>
>> Changes in v2:
>>   - capitalized acronym DRAM
>>
>>   arch/riscv/cpu/jh7110/spl.c              | 2 +-
>>   arch/riscv/include/asm/arch-jh7110/spl.h | 2 +-
>>   board/starfive/visionfive2/spl.c         | 4 ++--
>>   3 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/riscv/cpu/jh7110/spl.c b/arch/riscv/cpu/jh7110/spl.c
>> index 6bdf8b9c72..87aaf86524 100644
>> --- a/arch/riscv/cpu/jh7110/spl.c
>> +++ b/arch/riscv/cpu/jh7110/spl.c
>> @@ -28,7 +28,7 @@ static bool check_ddr_size(phys_size_t size)
>>       }
>>   }
>>
>> -int spl_soc_init(void)
>> +int spl_dram_init(void)
>>   {
>>       int ret;
>>       struct udevice *dev;
>> diff --git a/arch/riscv/include/asm/arch-jh7110/spl.h 
>> b/arch/riscv/include/asm/arch-jh7110/spl.h
>> index 23ce8871b3..d73355bf35 100644
>> --- a/arch/riscv/include/asm/arch-jh7110/spl.h
>> +++ b/arch/riscv/include/asm/arch-jh7110/spl.h
>> @@ -7,6 +7,6 @@
>>   #ifndef _SPL_STARFIVE_H
>>   #define _SPL_STARFIVE_H
>>
>> -int spl_soc_init(void);
>> +int spl_dram_init(void);
>>
>>   #endif /* _SPL_STARFIVE_H */
>> diff --git a/board/starfive/visionfive2/spl.c 
>> b/board/starfive/visionfive2/spl.c
>> index 45848db6d8..ca61b5be22 100644
>> --- a/board/starfive/visionfive2/spl.c
>> +++ b/board/starfive/visionfive2/spl.c
>> @@ -285,9 +285,9 @@ int spl_board_init_f(void)
>>
>>       jh7110_jtag_init();
>>
>> -    ret = spl_soc_init();
>> +    ret = spl_dram_init();
>>       if (ret) {
>> -        debug("JH7110 SPL init failed: %d\n", ret);
>> +        debug("JH7110 DRAM init failed: %d\n", ret);
>>           return ret;
>>       }
>>
> 

Any objection on this one?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 2/2] board: starfive: Rename spl_soc_init() to spl_dram_init()
  2024-05-02  6:06     ` Lukas Funke
@ 2024-05-02  6:33       ` Leo Liang
  0 siblings, 0 replies; 7+ messages in thread
From: Leo Liang @ 2024-05-02  6:33 UTC (permalink / raw
  To: Lukas Funke
  Cc: u-boot, E Shattow, Lukas Funke, Minda Chen, Simon Glass,
	Yanhong Wang, Heinrich Schuchardt, Tom Rini

On Thu, May 02, 2024 at 08:06:43AM +0200, Lukas Funke wrote:
> [EXTERNAL MAIL]
> 
> On 24.04.2024 13:01, Heinrich Schuchardt wrote:
> > On 24.04.24 09:43, lukas.funke-oss@weidmueller.com wrote:
> > > From: Lukas Funke <lukas.funke@weidmueller.com>
> > > 
> > > Rename spl_soc_init() to spl_dram_init() because the generic function
> > > name does not reflect what the function actually does. Also
> > > spl_dram_init() is commonly used for dram initialization and should be
> > > called from board_init_f().
> > > 
> > > Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
> > 
> > Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Any objection on this one?

Hi Lukas,

This patch has been merged to u-boot-riscv. Thanks!

Best regards,
Leo

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-05-02  6:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-24  7:43 [PATCH v3 0/2] riscv: Rename spl_soc_init() to spl_dram_init() lukas.funke-oss
2024-04-24  7:43 ` [PATCH v3 1/2] board: sifive: " lukas.funke-oss
2024-04-26  7:51   ` Leo Liang
2024-04-24  7:43 ` [PATCH v3 2/2] board: starfive: " lukas.funke-oss
2024-04-24 11:01   ` Heinrich Schuchardt
2024-05-02  6:06     ` Lukas Funke
2024-05-02  6:33       ` Leo Liang

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.