public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] board/spear/common: move code to arch/arm/cpu/arm926ejs/spear/
@ 2017-08-15 20:52 Thomas Petazzoni
  2017-08-15 20:52 ` [U-Boot] [PATCH 2/2] arch/arm/cpu/arm926ejs/spear/cpu.c: guard do_switch_ecc() with CONFIG_NAND_FSMC Thomas Petazzoni
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2017-08-15 20:52 UTC (permalink / raw)
  To: u-boot

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

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 at 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
-- 
2.9.4

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

* [U-Boot] [PATCH 2/2] arch/arm/cpu/arm926ejs/spear/cpu.c: guard do_switch_ecc() with CONFIG_NAND_FSMC
  2017-08-15 20:52 [U-Boot] [PATCH 1/2] board/spear/common: move code to arch/arm/cpu/arm926ejs/spear/ Thomas Petazzoni
@ 2017-08-15 20:52 ` Thomas Petazzoni
  2017-08-26 20:45   ` [U-Boot] [U-Boot, " Tom Rini
  2017-08-15 22:06 ` [U-Boot] [PATCH 1/2] board/spear/common: move code to arch/arm/cpu/arm926ejs/spear/ Tom Rini
  2017-08-26 20:45 ` [U-Boot] [U-Boot, " Tom Rini
  2 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2017-08-15 20:52 UTC (permalink / raw)
  To: u-boot

do_switch_ecc() calls fsmc_nand_switch_ecc(), which is a direct
function call into drivers/mtd/nand/fsmc_nand.c. However, this
function is not guarded by CONFIG_NAND_FSMC, which results to a build
failure if CONFIG_NAND_FSMC is disabled.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 arch/arm/cpu/arm926ejs/spear/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/cpu/arm926ejs/spear/cpu.c b/arch/arm/cpu/arm926ejs/spear/cpu.c
index be0d14f..7b9dc65 100644
--- a/arch/arm/cpu/arm926ejs/spear/cpu.c
+++ b/arch/arm/cpu/arm926ejs/spear/cpu.c
@@ -84,7 +84,7 @@ int print_cpuinfo(void)
 }
 #endif
 
-#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_NAND_ECC_BCH)
+#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_NAND_ECC_BCH) && defined(CONFIG_NAND_FSMC)
 static int do_switch_ecc(cmd_tbl_t *cmdtp, int flag, int argc,
 			 char *const argv[])
 {
-- 
2.9.4

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

* [U-Boot] [PATCH 1/2] board/spear/common: move code to arch/arm/cpu/arm926ejs/spear/
  2017-08-15 20:52 [U-Boot] [PATCH 1/2] board/spear/common: move code to arch/arm/cpu/arm926ejs/spear/ Thomas Petazzoni
  2017-08-15 20:52 ` [U-Boot] [PATCH 2/2] arch/arm/cpu/arm926ejs/spear/cpu.c: guard do_switch_ecc() with CONFIG_NAND_FSMC Thomas Petazzoni
@ 2017-08-15 22:06 ` Tom Rini
  2017-08-19 10:06   ` Thomas Petazzoni
  2017-08-26 20:45 ` [U-Boot] [U-Boot, " Tom Rini
  2 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2017-08-15 22:06 UTC (permalink / raw)
  To: u-boot

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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170815/04bf38be/attachment.sig>

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

* [U-Boot] [PATCH 1/2] board/spear/common: move code to arch/arm/cpu/arm926ejs/spear/
  2017-08-15 22:06 ` [U-Boot] [PATCH 1/2] board/spear/common: move code to arch/arm/cpu/arm926ejs/spear/ Tom Rini
@ 2017-08-19 10:06   ` Thomas Petazzoni
  2017-08-19 16:20     ` Tom Rini
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2017-08-19 10:06 UTC (permalink / raw)
  To: u-boot

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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [U-Boot] [PATCH 1/2] board/spear/common: move code to arch/arm/cpu/arm926ejs/spear/
  2017-08-19 10:06   ` Thomas Petazzoni
@ 2017-08-19 16:20     ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2017-08-19 16:20 UTC (permalink / raw)
  To: u-boot

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170819/ab2f8dc4/attachment.sig>

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

* [U-Boot] [U-Boot, 1/2] board/spear/common: move code to arch/arm/cpu/arm926ejs/spear/
  2017-08-15 20:52 [U-Boot] [PATCH 1/2] board/spear/common: move code to arch/arm/cpu/arm926ejs/spear/ Thomas Petazzoni
  2017-08-15 20:52 ` [U-Boot] [PATCH 2/2] arch/arm/cpu/arm926ejs/spear/cpu.c: guard do_switch_ecc() with CONFIG_NAND_FSMC Thomas Petazzoni
  2017-08-15 22:06 ` [U-Boot] [PATCH 1/2] board/spear/common: move code to arch/arm/cpu/arm926ejs/spear/ Tom Rini
@ 2017-08-26 20:45 ` Tom Rini
  2 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2017-08-26 20:45 UTC (permalink / raw)
  To: u-boot

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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170826/44b3534d/attachment.sig>

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

* [U-Boot] [U-Boot, 2/2] arch/arm/cpu/arm926ejs/spear/cpu.c: guard do_switch_ecc() with CONFIG_NAND_FSMC
  2017-08-15 20:52 ` [U-Boot] [PATCH 2/2] arch/arm/cpu/arm926ejs/spear/cpu.c: guard do_switch_ecc() with CONFIG_NAND_FSMC Thomas Petazzoni
@ 2017-08-26 20:45   ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2017-08-26 20:45 UTC (permalink / raw)
  To: u-boot

On Tue, Aug 15, 2017 at 10:52:45PM +0200, Thomas Petazzoni wrote:

> do_switch_ecc() calls fsmc_nand_switch_ecc(), which is a direct
> function call into drivers/mtd/nand/fsmc_nand.c. However, this
> function is not guarded by CONFIG_NAND_FSMC, which results to a build
> failure if CONFIG_NAND_FSMC is disabled.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.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: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170826/c2c5abbd/attachment.sig>

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

end of thread, other threads:[~2017-08-26 20:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-15 20:52 [U-Boot] [PATCH 1/2] board/spear/common: move code to arch/arm/cpu/arm926ejs/spear/ Thomas Petazzoni
2017-08-15 20:52 ` [U-Boot] [PATCH 2/2] arch/arm/cpu/arm926ejs/spear/cpu.c: guard do_switch_ecc() with CONFIG_NAND_FSMC Thomas Petazzoni
2017-08-26 20:45   ` [U-Boot] [U-Boot, " Tom Rini
2017-08-15 22:06 ` [U-Boot] [PATCH 1/2] board/spear/common: move code to arch/arm/cpu/arm926ejs/spear/ Tom Rini
2017-08-19 10:06   ` Thomas Petazzoni
2017-08-19 16:20     ` Tom Rini
2017-08-26 20:45 ` [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