All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/2] config.mk: Delete unnecessary code
@ 2013-09-01  6:04 Masahiro Yamada
  2013-09-01  6:04 ` [U-Boot] [PATCH v2 1/2] " Masahiro Yamada
  2013-09-01  6:04 ` [U-Boot] [PATCH v2 2/2] cam_enc_4xx: Move CONFIG_SPL_PAD_TO to a config header Masahiro Yamada
  0 siblings, 2 replies; 4+ messages in thread
From: Masahiro Yamada @ 2013-09-01  6:04 UTC (permalink / raw)
  To: u-boot

These consecutive patches delete the following code
in the top-level config.mk


ifneq ($(CONFIG_SPL_TEXT_BASE),)
CPPFLAGS += -DCONFIG_SPL_TEXT_BASE=$(CONFIG_SPL_TEXT_BASE)
endif

ifneq ($(CONFIG_SPL_PAD_TO),)
CPPFLAGS += -DCONFIG_SPL_PAD_TO=$(CONFIG_SPL_PAD_TO)
endif

ifneq ($(CONFIG_TPL_PAD_TO),)
CPPFLAGS += -DCONFIG_TPL_PAD_TO=$(CONFIG_TPL_PAD_TO)
endif

ifneq ($(CONFIG_UBOOT_PAD_TO),)
CPPFLAGS += -DCONFIG_UBOOT_PAD_TO=$(CONFIG_UBOOT_PAD_TO)
endif

ifneq ($(RESET_VECTOR_ADDRESS),)
CPPFLAGS += -DRESET_VECTOR_ADDRESS=$(RESET_VECTOR_ADDRESS)
endif


As for CONFIG_SPL_TEXT_BASE, CONFIG_UBOOT_PAD_TO,
CONFIG_RESET_VECTOR_ADDRESS, CONFIG_TPL_PAD_TO,
they are not defined in makefiles but only in config headers.
So, we can simply delete them. (This is done in 0001.)

As for CONFIG_SPL_PAD_TO, there is only one board which defines it in a makefile.
For refactoring, 0002 patch moves the definition of CONFIG_SPL_PAD_TO
from board/ait/cam_enc_4xx/config.mk to include/configs/cam_enc_4xx.h.
I added Cc Heiko Schocher, the maintainer of cam_enc_4xx board.

Heiko, a review is welcome if the refactoring in 0002 is acceptable or not.
If it is not acceptable, please apply only 0001 patch.

Note:
We have one more left in config.mk

ifneq ($(CONFIG_SYS_TEXT_BASE),)
CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE)
endif

But too many boards still define CONFIG_SYS_TEXT_BASE in makefiles.
So I could not touch for now.
I think board maintainers should make effort to move
the CONFIG definition from config.mk to headers.

Cc: Heiko Schocher <hs@denx.de>

Masahiro Yamada (2):
  config.mk: Delete unnecessary code
  cam_enc_4xx: Move CONFIG_SPL_PAD_TO to a config header

 board/ait/cam_enc_4xx/config.mk |  2 --
 config.mk                       | 20 --------------------
 include/configs/cam_enc_4xx.h   |  2 ++
 3 files changed, 2 insertions(+), 22 deletions(-)

-- 
1.8.1.2

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

* [U-Boot] [PATCH v2 1/2] config.mk: Delete unnecessary code
  2013-09-01  6:04 [U-Boot] [PATCH v2 0/2] config.mk: Delete unnecessary code Masahiro Yamada
@ 2013-09-01  6:04 ` Masahiro Yamada
  2013-09-06 21:25   ` [U-Boot] [U-Boot,v2,1/2] " Tom Rini
  2013-09-01  6:04 ` [U-Boot] [PATCH v2 2/2] cam_enc_4xx: Move CONFIG_SPL_PAD_TO to a config header Masahiro Yamada
  1 sibling, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2013-09-01  6:04 UTC (permalink / raw)
  To: u-boot

Currently no makefiles (board-specific config.mk)
set the following variables:

CONFIG_SPL_TEXT_BASE
CONFIG_UBOOT_PAD_TO
CONFIG_RESET_VECTOR_ADDRESS
CONFIG_TPL_PAD_TO

For all target boards using above macros
they are set in header files (include/configs/*.h),
so we do not need to set them as CPPFLAGS.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

Changes for v2
   - Additionaly delete a glue code for CONFIG_TPL_PAD_TO

 config.mk | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/config.mk b/config.mk
index b3ecaa7..5dfbad7 100644
--- a/config.mk
+++ b/config.mk
@@ -232,22 +232,10 @@ ifneq ($(CONFIG_SYS_TEXT_BASE),)
 CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE)
 endif
 
-ifneq ($(CONFIG_SPL_TEXT_BASE),)
-CPPFLAGS += -DCONFIG_SPL_TEXT_BASE=$(CONFIG_SPL_TEXT_BASE)
-endif
-
 ifneq ($(CONFIG_SPL_PAD_TO),)
 CPPFLAGS += -DCONFIG_SPL_PAD_TO=$(CONFIG_SPL_PAD_TO)
 endif
 
-ifneq ($(CONFIG_TPL_PAD_TO),)
-CPPFLAGS += -DCONFIG_TPL_PAD_TO=$(CONFIG_TPL_PAD_TO)
-endif
-
-ifneq ($(CONFIG_UBOOT_PAD_TO),)
-CPPFLAGS += -DCONFIG_UBOOT_PAD_TO=$(CONFIG_UBOOT_PAD_TO)
-endif
-
 ifeq ($(CONFIG_SPL_BUILD),y)
 CPPFLAGS += -DCONFIG_SPL_BUILD
 ifeq ($(CONFIG_TPL_BUILD),y)
@@ -263,10 +251,6 @@ Please undefined CONFIG_SYS_GENERIC_BOARD in your board config file)
 endif
 endif
 
-ifneq ($(RESET_VECTOR_ADDRESS),)
-CPPFLAGS += -DRESET_VECTOR_ADDRESS=$(RESET_VECTOR_ADDRESS)
-endif
-
 ifneq ($(OBJTREE),$(SRCTREE))
 CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include
 endif
-- 
1.8.1.2

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

* [U-Boot] [PATCH v2 2/2] cam_enc_4xx: Move CONFIG_SPL_PAD_TO to a config header
  2013-09-01  6:04 [U-Boot] [PATCH v2 0/2] config.mk: Delete unnecessary code Masahiro Yamada
  2013-09-01  6:04 ` [U-Boot] [PATCH v2 1/2] " Masahiro Yamada
@ 2013-09-01  6:04 ` Masahiro Yamada
  1 sibling, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2013-09-01  6:04 UTC (permalink / raw)
  To: u-boot

For most boards which define CONFIG_SPL_PAD_TO,
it is defined in config header files.
Currently, there exists only one exception, cam_enc_4xx board.

This patch moves CONFIG_SPL_PAD_TO definition
from board/ait/cam_enc_4xx/config.mk
to include/configs/cam_enc_4xx.h.

With this modification, we can delete a glue code
in the top level config.mk:

ifneq ($(CONFIG_SPL_PAD_TO),)
CPPFLAGS += -DCONFIG_SPL_PAD_TO=$(CONFIG_SPL_PAD_TO)
endif

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Heiko Schocher <hs@denx.de>
---
 board/ait/cam_enc_4xx/config.mk | 2 --
 config.mk                       | 4 ----
 include/configs/cam_enc_4xx.h   | 2 ++
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/board/ait/cam_enc_4xx/config.mk b/board/ait/cam_enc_4xx/config.mk
index c280029..d7e7894 100644
--- a/board/ait/cam_enc_4xx/config.mk
+++ b/board/ait/cam_enc_4xx/config.mk
@@ -7,8 +7,6 @@
 # (mem base + reserved)
 #
 
-#Provide at least 16MB spacing between us and the Linux Kernel image
-CONFIG_SPL_PAD_TO := 12320
 UBL_CONFIG = $(SRCTREE)/board/$(BOARDDIR)/ublimage.cfg
 ifndef CONFIG_SPL_BUILD
 ALL-y += $(obj)u-boot.ubl
diff --git a/config.mk b/config.mk
index 5dfbad7..b55ed56 100644
--- a/config.mk
+++ b/config.mk
@@ -232,10 +232,6 @@ ifneq ($(CONFIG_SYS_TEXT_BASE),)
 CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE)
 endif
 
-ifneq ($(CONFIG_SPL_PAD_TO),)
-CPPFLAGS += -DCONFIG_SPL_PAD_TO=$(CONFIG_SPL_PAD_TO)
-endif
-
 ifeq ($(CONFIG_SPL_BUILD),y)
 CPPFLAGS += -DCONFIG_SPL_BUILD
 ifeq ($(CONFIG_TPL_BUILD),y)
diff --git a/include/configs/cam_enc_4xx.h b/include/configs/cam_enc_4xx.h
index ac7ed81..db9eb0f 100644
--- a/include/configs/cam_enc_4xx.h
+++ b/include/configs/cam_enc_4xx.h
@@ -216,6 +216,8 @@
 #define CONFIG_SPL_STACK		(0x00010000 + 0x7f00)
 
 #define CONFIG_SPL_TEXT_BASE		0x00000020 /*CONFIG_SYS_SRAM_START*/
+/* Provide at least 16MB spacing between us and the Linux Kernel image */
+#define CONFIG_SPL_PAD_TO		12320
 #define CONFIG_SPL_MAX_FOOTPRINT	12288
 
 #ifndef CONFIG_SPL_BUILD
-- 
1.8.1.2

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

* [U-Boot] [U-Boot,v2,1/2] config.mk: Delete unnecessary code
  2013-09-01  6:04 ` [U-Boot] [PATCH v2 1/2] " Masahiro Yamada
@ 2013-09-06 21:25   ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2013-09-06 21:25 UTC (permalink / raw)
  To: u-boot

On Sun, Sep 01, 2013 at 03:04:26PM +0900, Masahiro Yamada wrote:

> Currently no makefiles (board-specific config.mk)
> set the following variables:
> 
> CONFIG_SPL_TEXT_BASE
> CONFIG_UBOOT_PAD_TO
> CONFIG_RESET_VECTOR_ADDRESS
> CONFIG_TPL_PAD_TO
> 
> For all target boards using above macros
> they are set in header files (include/configs/*.h),
> so we do not need to set them as CPPFLAGS.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Applied to u-boot/master along with 2/2, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130906/3c47ae7e/attachment.pgp>

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

end of thread, other threads:[~2013-09-06 21:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-01  6:04 [U-Boot] [PATCH v2 0/2] config.mk: Delete unnecessary code Masahiro Yamada
2013-09-01  6:04 ` [U-Boot] [PATCH v2 1/2] " Masahiro Yamada
2013-09-06 21:25   ` [U-Boot] [U-Boot,v2,1/2] " Tom Rini
2013-09-01  6:04 ` [U-Boot] [PATCH v2 2/2] cam_enc_4xx: Move CONFIG_SPL_PAD_TO to a config header Masahiro Yamada

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.