public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] bootcount: Move bootcount.c from arch/powerpc/lib to lib
@ 2012-05-31  8:58 Stefan Roese
  2012-05-31 10:42 ` Heiko Schocher
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Roese @ 2012-05-31  8:58 UTC (permalink / raw)
  To: u-boot

By moving this code to a non-platform specific directory, we can use
it on other architectures as well (e.g. ARM).

Signed-off-by: Stefan Roese <sr@denx.de>
---
 arch/powerpc/lib/Makefile             |    1 -
 lib/Makefile                          |    1 +
 {arch/powerpc/lib => lib}/bootcount.c |    0
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename {arch/powerpc/lib => lib}/bootcount.c (100%)

diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index cdd62a2..965f9ea 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -46,7 +46,6 @@ SOBJS-y	+= reloc.o
 COBJS-$(CONFIG_BAT_RW) += bat_rw.o
 COBJS-y	+= board.o
 COBJS-y	+= bootm.o
-COBJS-$(CONFIG_BOOTCOUNT_LIMIT) += bootcount.o
 COBJS-y	+= cache.o
 COBJS-y	+= extable.o
 COBJS-y	+= interrupts.o
diff --git a/lib/Makefile b/lib/Makefile
index 663d185..9500763 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -34,6 +34,7 @@ COBJS-$(CONFIG_BZIP2) += bzlib_crctable.o
 COBJS-$(CONFIG_BZIP2) += bzlib_decompress.o
 COBJS-$(CONFIG_BZIP2) += bzlib_randtable.o
 COBJS-$(CONFIG_BZIP2) += bzlib_huffman.o
+COBJS-$(CONFIG_BOOTCOUNT_LIMIT) += bootcount.o
 COBJS-$(CONFIG_USB_TTY) += circbuf.o
 COBJS-y += crc7.o
 COBJS-y += crc16.o
diff --git a/arch/powerpc/lib/bootcount.c b/lib/bootcount.c
similarity index 100%
rename from arch/powerpc/lib/bootcount.c
rename to lib/bootcount.c
-- 
1.7.10.3

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

* [U-Boot] [PATCH] bootcount: Move bootcount.c from arch/powerpc/lib to lib
  2012-05-31  8:58 [U-Boot] [PATCH] bootcount: Move bootcount.c from arch/powerpc/lib to lib Stefan Roese
@ 2012-05-31 10:42 ` Heiko Schocher
  2012-05-31 11:23   ` Stefan Roese
  0 siblings, 1 reply; 3+ messages in thread
From: Heiko Schocher @ 2012-05-31 10:42 UTC (permalink / raw)
  To: u-boot

Hello Stefan,

On 31.05.2012 10:58, Stefan Roese wrote:
> By moving this code to a non-platform specific directory, we can use
> it on other architectures as well (e.g. ARM).
>
> Signed-off-by: Stefan Roese<sr@denx.de>
> ---
>   arch/powerpc/lib/Makefile             |    1 -
>   lib/Makefile                          |    1 +
>   {arch/powerpc/lib =>  lib}/bootcount.c |    0
>   3 files changed, 1 insertion(+), 1 deletion(-)
>   rename {arch/powerpc/lib =>  lib}/bootcount.c (100%)
>
> diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
> index cdd62a2..965f9ea 100644
> --- a/arch/powerpc/lib/Makefile
> +++ b/arch/powerpc/lib/Makefile
> @@ -46,7 +46,6 @@ SOBJS-y	+= reloc.o
>   COBJS-$(CONFIG_BAT_RW) += bat_rw.o
>   COBJS-y	+= board.o
>   COBJS-y	+= bootm.o
> -COBJS-$(CONFIG_BOOTCOUNT_LIMIT) += bootcount.o
>   COBJS-y	+= cache.o
>   COBJS-y	+= extable.o
>   COBJS-y	+= interrupts.o
> diff --git a/lib/Makefile b/lib/Makefile
> index 663d185..9500763 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -34,6 +34,7 @@ COBJS-$(CONFIG_BZIP2) += bzlib_crctable.o
>   COBJS-$(CONFIG_BZIP2) += bzlib_decompress.o
>   COBJS-$(CONFIG_BZIP2) += bzlib_randtable.o
>   COBJS-$(CONFIG_BZIP2) += bzlib_huffman.o
> +COBJS-$(CONFIG_BOOTCOUNT_LIMIT) += bootcount.o
>   COBJS-$(CONFIG_USB_TTY) += circbuf.o
>   COBJS-y += crc7.o
>   COBJS-y += crc16.o
> diff --git a/arch/powerpc/lib/bootcount.c b/lib/bootcount.c
> similarity index 100%
> rename from arch/powerpc/lib/bootcount.c
> rename to lib/bootcount.c

If we do this, we should try to move all bootcounter implementations
to this file, see:

[hs at pollux u-boot]$ grep -lr bootcount_store .
./common/main.c
./arch/powerpc/lib/bootcount.c
./arch/arm/cpu/arm926ejs/at91/cpu.c
./arch/arm/cpu/armv7/highbank/bootcount.c
./arch/arm/cpu/ixp/cpu.c
./arch/blackfin/cpu/bootcount.c
./board/enbw/enbw_cmc/enbw_cmc.c
./board/omicron/calimain/calimain.c
./board/keymile/km_arm/km_arm.c
./include/common.h
[hs at pollux u-boot]$

and should provide a possibility to add board specific code,
for example needed for the

board/keymile/km_arm/km_arm.c boards.

Have you done a "MAKEALL arm"? I think (didn;t tried it) this
would fail with your patch ...

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

* [U-Boot] [PATCH] bootcount: Move bootcount.c from arch/powerpc/lib to lib
  2012-05-31 10:42 ` Heiko Schocher
@ 2012-05-31 11:23   ` Stefan Roese
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Roese @ 2012-05-31 11:23 UTC (permalink / raw)
  To: u-boot

Hi Heiko,

On Thursday 31 May 2012 12:42:12 Heiko Schocher wrote:
> > diff --git a/arch/powerpc/lib/bootcount.c b/lib/bootcount.c
> > similarity index 100%
> > rename from arch/powerpc/lib/bootcount.c
> > rename to lib/bootcount.c
> 
> If we do this, we should try to move all bootcounter implementations
> to this file, see:
> 
> [hs at pollux u-boot]$ grep -lr bootcount_store .
> ./common/main.c
> ./arch/powerpc/lib/bootcount.c
> ./arch/arm/cpu/arm926ejs/at91/cpu.c
> ./arch/arm/cpu/armv7/highbank/bootcount.c
> ./arch/arm/cpu/ixp/cpu.c
> ./arch/blackfin/cpu/bootcount.c
> ./board/enbw/enbw_cmc/enbw_cmc.c
> ./board/omicron/calimain/calimain.c
> ./board/keymile/km_arm/km_arm.c
> ./include/common.h
> [hs at pollux u-boot]$
> 
> and should provide a possibility to add board specific code,
> for example needed for the
> 
> board/keymile/km_arm/km_arm.c boards.
> 
> Have you done a "MAKEALL arm"? I think (didn;t tried it) this
> would fail with your patch ...

No. You're right. It fails for some boards. I'll try to come up with a more 
generic solution to enable those board specific implementations.
 
Thanks,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

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

end of thread, other threads:[~2012-05-31 11:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-31  8:58 [U-Boot] [PATCH] bootcount: Move bootcount.c from arch/powerpc/lib to lib Stefan Roese
2012-05-31 10:42 ` Heiko Schocher
2012-05-31 11:23   ` Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox