diff mbox

[U-Boot,1/2] board/spear/common: move code to arch/arm/cpu/arm926ejs/spear/

Message ID 20170815205245.21496-1-thomas.petazzoni@free-electrons.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Thomas Petazzoni Aug. 15, 2017, 8:52 p.m. UTC
The code in board/spear/common/ is not board-specific but
SoC-specific. Therefore, boards from other vendors than "spear" may
want to re-use this code, which is currently difficult with the code
being placed in board/spear/common/.

Since this code really is SoC-specific, this commit moves it to
arch/arm/cpu/arm926ejs/spear/, with the rest of the SPEAr related
code.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 arch/arm/cpu/arm926ejs/spear/Makefile                      |  2 ++
 .../arm/cpu/arm926ejs/spear}/spr_lowlevel_init.S           |  0
 .../common => arch/arm/cpu/arm926ejs/spear}/spr_misc.c     |  0
 board/spear/common/Makefile                                | 14 --------------
 4 files changed, 2 insertions(+), 14 deletions(-)
 rename {board/spear/common => arch/arm/cpu/arm926ejs/spear}/spr_lowlevel_init.S (100%)
 rename {board/spear/common => arch/arm/cpu/arm926ejs/spear}/spr_misc.c (100%)
 delete mode 100644 board/spear/common/Makefile

Comments

Tom Rini Aug. 15, 2017, 10:06 p.m. UTC | #1
On Tue, Aug 15, 2017 at 10:52:44PM +0200, Thomas Petazzoni wrote:

> The code in board/spear/common/ is not board-specific but
> SoC-specific. Therefore, boards from other vendors than "spear" may
> want to re-use this code, which is currently difficult with the code
> being placed in board/spear/common/.
> 
> Since this code really is SoC-specific, this commit moves it to
> arch/arm/cpu/arm926ejs/spear/, with the rest of the SPEAr related
> code.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  arch/arm/cpu/arm926ejs/spear/Makefile                      |  2 ++
>  .../arm/cpu/arm926ejs/spear}/spr_lowlevel_init.S           |  0
>  .../common => arch/arm/cpu/arm926ejs/spear}/spr_misc.c     |  0
>  board/spear/common/Makefile                                | 14 --------------
>  4 files changed, 2 insertions(+), 14 deletions(-)
>  rename {board/spear/common => arch/arm/cpu/arm926ejs/spear}/spr_lowlevel_init.S (100%)
>  rename {board/spear/common => arch/arm/cpu/arm926ejs/spear}/spr_misc.c (100%)
>  delete mode 100644 board/spear/common/Makefile

So, I asked Stefan to do some cleanups related to SPEAr a while ago, but
he's been unable to find the time I believe.  Would you have interest in
being perhaps co-maintainer of these platforms?  Otherwise I fear they
need dropping due to lack of Kconfig migration.  Thanks!
Thomas Petazzoni Aug. 19, 2017, 10:06 a.m. UTC | #2
Hello,

On Tue, 15 Aug 2017 18:06:15 -0400, Tom Rini wrote:

> >  arch/arm/cpu/arm926ejs/spear/Makefile                      |  2 ++
> >  .../arm/cpu/arm926ejs/spear}/spr_lowlevel_init.S           |  0
> >  .../common => arch/arm/cpu/arm926ejs/spear}/spr_misc.c     |  0
> >  board/spear/common/Makefile                                | 14 --------------
> >  4 files changed, 2 insertions(+), 14 deletions(-)
> >  rename {board/spear/common => arch/arm/cpu/arm926ejs/spear}/spr_lowlevel_init.S (100%)
> >  rename {board/spear/common => arch/arm/cpu/arm926ejs/spear}/spr_misc.c (100%)
> >  delete mode 100644 board/spear/common/Makefile  
> 
> So, I asked Stefan to do some cleanups related to SPEAr a while ago, but
> he's been unable to find the time I believe.  Would you have interest in
> being perhaps co-maintainer of these platforms?  Otherwise I fear they
> need dropping due to lack of Kconfig migration.  Thanks!

I'm not sure I'll have a long term interest in SPEAr, so that probably
doesn't justify me being a co-maintainer. However, if you can list what
needs to be done in terms of cleanup/Kconfig migration, I can try to
find some time to look into that.

Thanks!

Thomas
Tom Rini Aug. 19, 2017, 4:20 p.m. UTC | #3
On Sat, Aug 19, 2017 at 12:06:35PM +0200, Thomas Petazzoni wrote:
> Hello,
> 
> On Tue, 15 Aug 2017 18:06:15 -0400, Tom Rini wrote:
> 
> > >  arch/arm/cpu/arm926ejs/spear/Makefile                      |  2 ++
> > >  .../arm/cpu/arm926ejs/spear}/spr_lowlevel_init.S           |  0
> > >  .../common => arch/arm/cpu/arm926ejs/spear}/spr_misc.c     |  0
> > >  board/spear/common/Makefile                                | 14 --------------
> > >  4 files changed, 2 insertions(+), 14 deletions(-)
> > >  rename {board/spear/common => arch/arm/cpu/arm926ejs/spear}/spr_lowlevel_init.S (100%)
> > >  rename {board/spear/common => arch/arm/cpu/arm926ejs/spear}/spr_misc.c (100%)
> > >  delete mode 100644 board/spear/common/Makefile  
> > 
> > So, I asked Stefan to do some cleanups related to SPEAr a while ago, but
> > he's been unable to find the time I believe.  Would you have interest in
> > being perhaps co-maintainer of these platforms?  Otherwise I fear they
> > need dropping due to lack of Kconfig migration.  Thanks!
> 
> I'm not sure I'll have a long term interest in SPEAr, so that probably
> doesn't justify me being a co-maintainer. However, if you can list what
> needs to be done in terms of cleanup/Kconfig migration, I can try to
> find some time to look into that.

Everything that shows up under 'grep SPEAR scripts/config_whitelist.txt'
needs to be migrated (or if it makes sense, moved out of CONFIG
namespace instead).  Thanks!
Tom Rini Aug. 26, 2017, 8:45 p.m. UTC | #4
On Tue, Aug 15, 2017 at 10:52:44PM +0200, Thomas Petazzoni wrote:

> The code in board/spear/common/ is not board-specific but
> SoC-specific. Therefore, boards from other vendors than "spear" may
> want to re-use this code, which is currently difficult with the code
> being placed in board/spear/common/.
> 
> Since this code really is SoC-specific, this commit moves it to
> arch/arm/cpu/arm926ejs/spear/, with the rest of the SPEAr related
> code.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/arch/arm/cpu/arm926ejs/spear/Makefile b/arch/arm/cpu/arm926ejs/spear/Makefile
index 7b15d4e..3992401 100644
--- a/arch/arm/cpu/arm926ejs/spear/Makefile
+++ b/arch/arm/cpu/arm926ejs/spear/Makefile
@@ -16,6 +16,8 @@  obj-$(CONFIG_DDR_MT47H64M16) += spr600_mt47h64m16_3_333_cl5_psync.o
 obj-$(CONFIG_DDR_MT47H32M16) += spr600_mt47h32m16_333_cl5_psync.o
 obj-$(CONFIG_DDR_MT47H32M16) += spr600_mt47h32m16_37e_166_cl4_sync.o
 obj-$(CONFIG_DDR_MT47H128M8) += spr600_mt47h128m8_3_266_cl5_async.o
+else
+obj-y += spr_misc.o spr_lowlevel_init.o
 endif
 
 extra-$(CONFIG_SPL_BUILD) := start.o
diff --git a/board/spear/common/spr_lowlevel_init.S b/arch/arm/cpu/arm926ejs/spear/spr_lowlevel_init.S
similarity index 100%
rename from board/spear/common/spr_lowlevel_init.S
rename to arch/arm/cpu/arm926ejs/spear/spr_lowlevel_init.S
diff --git a/board/spear/common/spr_misc.c b/arch/arm/cpu/arm926ejs/spear/spr_misc.c
similarity index 100%
rename from board/spear/common/spr_misc.c
rename to arch/arm/cpu/arm926ejs/spear/spr_misc.c
diff --git a/board/spear/common/Makefile b/board/spear/common/Makefile
deleted file mode 100644
index b0ba320..0000000
--- a/board/spear/common/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@ 
-#
-# (C) Copyright 2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier:	GPL-2.0+
-#
-
-ifdef CONFIG_SPL_BUILD
-# necessary to create built-in.o
-obj- := __dummy__.o
-else
-obj-y	:= spr_misc.o
-obj-y	+= spr_lowlevel_init.o
-endif