[U-Boot] [PATCH 1/3] Update Makefile for new dirs to be included in tag list

Signed-off-by: Li Yang leoli@freescale.com --- Makefile | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile index bcb3fe9..4d71366 100644 --- a/Makefile +++ b/Makefile @@ -406,6 +406,8 @@ TAG_SUBDIRS += include TAG_SUBDIRS += lib_generic board/$(BOARDDIR) TAG_SUBDIRS += cpu/$(CPU) TAG_SUBDIRS += lib_$(ARCH) +TAG_SUBDIRS += $(shell if [ -d board/$(VENDOR)/common ]; then echo \ + "board/$(VENDOR)/common"; fi) TAG_SUBDIRS += fs/cramfs TAG_SUBDIRS += fs/fat TAG_SUBDIRS += fs/fdos @@ -414,6 +416,7 @@ TAG_SUBDIRS += fs/yaffs2 TAG_SUBDIRS += net TAG_SUBDIRS += disk TAG_SUBDIRS += common +TAG_SUBDIRS += libfdt TAG_SUBDIRS += drivers/bios_emulator TAG_SUBDIRS += drivers/block TAG_SUBDIRS += drivers/gpio

For removing node easily by path or alias.
Signed-off-by: Li Yang leoli@freescale.com --- common/fdt_support.c | 10 ++++++++++ include/fdt_support.h | 1 + 2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/common/fdt_support.c b/common/fdt_support.c index f89a3ee..8f1186e 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -757,3 +757,13 @@ int fdt_fixup_nor_flash_size(void *blob, int cs, u32 size) return -1; } #endif + +int fdt_del_node_by_path(void *fdt, const char *path) +{ + int off = fdt_path_offset(fdt, path); + + if (off >= 0) + return fdt_del_node(fdt, off); + else + return off; +} diff --git a/include/fdt_support.h b/include/fdt_support.h index 0a9dd0d..d0705d1 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -80,6 +80,7 @@ void set_working_fdt_addr(void *addr); int fdt_resize(void *blob);
int fdt_fixup_nor_flash_size(void *blob, int cs, u32 size); +int fdt_del_node_by_path(void *fdt, const char *path);
#endif /* ifdef CONFIG_OF_LIBFDT */ #endif /* ifndef __FDT_SUPPORT_H */

Signed-off-by: Li Yang leoli@freescale.com --- include/asm-ppc/fsl_law.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/include/asm-ppc/fsl_law.h b/include/asm-ppc/fsl_law.h index 31bb754..34c56a2 100644 --- a/include/asm-ppc/fsl_law.h +++ b/include/asm-ppc/fsl_law.h @@ -46,6 +46,8 @@ enum law_size { LAW_SIZE_32G, };
+#define law_size_bits(sz) (__ilog2_u64(sz) - 1) + #ifdef CONFIG_FSL_CORENET enum law_trgt_if { LAW_TRGT_IF_PCIE_1 = 0x00, @@ -78,6 +80,7 @@ enum law_trgt_if { LAW_TRGT_IF_CCSR = 0x08, LAW_TRGT_IF_DDR_INTRLV = 0x0b, LAW_TRGT_IF_RIO = 0x0c, + LAW_TRGT_IF_RIO_2 = 0x0d, LAW_TRGT_IF_DDR = 0x0f, LAW_TRGT_IF_DDR_2 = 0x16, /* 2nd controller */ };

On Dec 9, 2009, at 12:26 AM, Li Yang wrote:
Signed-off-by: Li Yang leoli@freescale.com
include/asm-ppc/fsl_law.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
applied to 85xx-next
- k

Hi Li,
Li Yang wrote:
For removing node easily by path or alias.
Signed-off-by: Li Yang leoli@freescale.com
common/fdt_support.c | 10 ++++++++++ include/fdt_support.h | 1 + 2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/common/fdt_support.c b/common/fdt_support.c index f89a3ee..8f1186e 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -757,3 +757,13 @@ int fdt_fixup_nor_flash_size(void *blob, int cs, u32 size) return -1; } #endif
+int fdt_del_node_by_path(void *fdt, const char *path) +{
- int off = fdt_path_offset(fdt, path);
- if (off >= 0)
return fdt_del_node(fdt, off);
- else
return off;
+} diff --git a/include/fdt_support.h b/include/fdt_support.h index 0a9dd0d..d0705d1 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -80,6 +80,7 @@ void set_working_fdt_addr(void *addr); int fdt_resize(void *blob);
int fdt_fixup_nor_flash_size(void *blob, int cs, u32 size); +int fdt_del_node_by_path(void *fdt, const char *path);
#endif /* ifdef CONFIG_OF_LIBFDT */ #endif /* ifndef __FDT_SUPPORT_H */
This seems like a reasonable function, but I don't see it used anywhere?
Best regards, gvb

Subject: Re: [U-Boot] [PATCH 2/3] fdt: add fdt_del_node_by_path() API
Hi Li,
Li Yang wrote:
For removing node easily by path or alias.
Signed-off-by: Li Yang leoli@freescale.com
common/fdt_support.c | 10 ++++++++++ include/fdt_support.h | 1 + 2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/common/fdt_support.c b/common/fdt_support.c index f89a3ee..8f1186e 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -757,3 +757,13 @@ int fdt_fixup_nor_flash_size(void
*blob, int cs, u32 size)
return -1; } #endif
+int fdt_del_node_by_path(void *fdt, const char *path) {
- int off = fdt_path_offset(fdt, path);
- if (off >= 0)
return fdt_del_node(fdt, off);
- else
return off;
+} diff --git a/include/fdt_support.h b/include/fdt_support.h index 0a9dd0d..d0705d1 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -80,6 +80,7 @@ void set_working_fdt_addr(void *addr); int fdt_resize(void *blob);
int fdt_fixup_nor_flash_size(void *blob, int cs, u32 size); +int fdt_del_node_by_path(void *fdt, const char *path);
#endif /* ifdef CONFIG_OF_LIBFDT */ #endif /* ifndef __FDT_SUPPORT_H */
This seems like a reasonable function, but I don't see it used anywhere?
It will be used in patches to be submitted, we want to remove the nodes of devices which are not enabled depending on the board configuration.
- Leo

Dear "Li Yang-R58472",
In message 3A45394FD742FA419B760BB8D398F9EDE667CD@zch01exm26.fsl.freescale.net you wrote:
It will be used in patches to be submitted, we want to remove the nodes of devices which are not enabled depending on the board configuration.
The rule is that we don't add dead code, so this patch should be part of a patch series that also adds users of this new code.
Best regards,
Wolfgang Denk

Subject: Re: [U-Boot] [PATCH 2/3] fdt: add fdt_del_node_by_path() API
Dear "Li Yang-R58472",
In message <3A45394FD742FA419B760BB8D398F9EDE667CD@zch01exm26.fsl.freescal e.net> you wrote:
It will be used in patches to be submitted, we want to remove the nodes of devices which are not enabled depending on the
board configuration.
The rule is that we don't add dead code, so this patch should be part of a patch series that also adds users of this new code.
All right. I will include this in the patch series to come.
- Leo

Dear Li Yang,
In message 1260339968-28169-1-git-send-email-leoli@freescale.com you wrote:
Signed-off-by: Li Yang leoli@freescale.com
Makefile | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile index bcb3fe9..4d71366 100644 --- a/Makefile +++ b/Makefile @@ -406,6 +406,8 @@ TAG_SUBDIRS += include TAG_SUBDIRS += lib_generic board/$(BOARDDIR) TAG_SUBDIRS += cpu/$(CPU) TAG_SUBDIRS += lib_$(ARCH) +TAG_SUBDIRS += $(shell if [ -d board/$(VENDOR)/common ]; then echo \
- "board/$(VENDOR)/common"; fi)
Would it not be easier to do something like
TAG_SUBDIRS = $(dir $(LIBS))
and get rid of all these duplicated settings?
[Warning: untested!]
Best regards,
Wolfgang Denk

Subject: Re: [U-Boot] [PATCH 1/3] Update Makefile for new dirs to be included in tag list
Dear Li Yang,
In message 1260339968-28169-1-git-send-email-leoli@freescale.com you wrote:
Signed-off-by: Li Yang leoli@freescale.com
Makefile | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile index bcb3fe9..4d71366 100644 --- a/Makefile +++ b/Makefile @@ -406,6 +406,8 @@ TAG_SUBDIRS += include TAG_SUBDIRS +=
lib_generic
board/$(BOARDDIR) TAG_SUBDIRS += cpu/$(CPU) TAG_SUBDIRS += lib_$(ARCH) +TAG_SUBDIRS += $(shell if [ -d board/$(VENDOR)/common ]; then echo \
- "board/$(VENDOR)/common"; fi)
Would it not be easier to do something like
TAG_SUBDIRS = $(dir $(LIBS))
Should be $(__LIBS)
and get rid of all these duplicated settings?
Great idea! I will come up a patch.
- Leo

On Wednesday 09 December 2009 01:26:06 Li Yang wrote:
diff --git a/Makefile b/Makefile index bcb3fe9..4d71366 100644 --- a/Makefile +++ b/Makefile +TAG_SUBDIRS += $(shell if [ -d board/$(VENDOR)/common ]; then echo \
- "board/$(VENDOR)/common"; fi)
ugh, dont do that. using $(shell) is awful. if you need to do things based on a dynamic path, use: ifneq ($(wildcard some/path),) ... endif
perhaps even better would be to let each dir define a tags.in or something and have the toplevel Makefile source that -mike

On Wednesday 09 December 2009 05:28:33 Mike Frysinger wrote:
On Wednesday 09 December 2009 01:26:06 Li Yang wrote:
diff --git a/Makefile b/Makefile index bcb3fe9..4d71366 100644 --- a/Makefile +++ b/Makefile +TAG_SUBDIRS += $(shell if [ -d board/$(VENDOR)/common ]; then echo \
- "board/$(VENDOR)/common"; fi)
ugh, dont do that. using $(shell) is awful. if you need to do things based on a dynamic path, use: ifneq ($(wildcard some/path),) ... endif
perhaps even better would be to let each dir define a tags.in or something and have the toplevel Makefile source that
nm, Wolfgang proposed a better idea already -mike
participants (6)
-
Jerry Van Baren
-
Kumar Gala
-
Li Yang
-
Li Yang-R58472
-
Mike Frysinger
-
Wolfgang Denk