Patchwork [U-Boot] powerpc/8xxx: Reduce NAND-SPL build size

login
register
mail settings
Submitter Kumar Gala
Date March 7, 2011, 4:16 a.m.
Message ID <1299471395-26596-1-git-send-email-galak@kernel.crashing.org>
Download mbox | patch
Permalink /patch/85658/
State Superseded
Delegated to: Kumar Gala
Headers show

Comments

Kumar Gala - March 7, 2011, 4:16 a.m.
We don't use disable_law in the SPL code so only build it if
!CONFIG_NAND_SPL.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 drivers/misc/fsl_law.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Wolfgang Denk - March 13, 2011, 9:40 p.m.
Dear Kumar Gala,

In message <1299471395-26596-1-git-send-email-galak@kernel.crashing.org> you wrote:
> We don't use disable_law in the SPL code so only build it if
> !CONFIG_NAND_SPL.

Does -ffunction-sections / --gc-sections not catch this automatically?

Best regards,

Wolfgang Denk
Kumar Gala - March 14, 2011, 5:33 a.m.
On Mar 13, 2011, at 4:40 PM, Wolfgang Denk wrote:

> Dear Kumar Gala,
> 
> In message <1299471395-26596-1-git-send-email-galak@kernel.crashing.org> you wrote:
>> We don't use disable_law in the SPL code so only build it if
>> !CONFIG_NAND_SPL.
> 
> Does -ffunction-sections / --gc-sections not catch this automatically?

Doesn't appear to, but not sure if the NAND makefiles are utilizing those options.

- k
Wolfgang Denk - March 14, 2011, 6:27 a.m.
Dear Kumar Gala,

In message <BCF2A946-E0CC-43F6-A875-A0E5A0DE7A6D@kernel.crashing.org> you wrote:
> 
> >> We don't use disable_law in the SPL code so only build it if
> >> !CONFIG_NAND_SPL.
> > 
> > Does -ffunction-sections / --gc-sections not catch this automatically?
>
> Doesn't appear to, but not sure if the NAND makefiles are utilizing those options.

Can you please verify this first?

At first glace it looks as if the compilation was done with
-ffunction-sections and -fdata-sections, but I don't see --gc-sections
on the linker command line

Best regards,

Wolfgang Denk
Kumar Gala - March 14, 2011, 11:45 a.m.
On Mar 14, 2011, at 1:27 AM, Wolfgang Denk wrote:

> Dear Kumar Gala,
> 
> In message <BCF2A946-E0CC-43F6-A875-A0E5A0DE7A6D@kernel.crashing.org> you wrote:
>> 
>>>> We don't use disable_law in the SPL code so only build it if
>>>> !CONFIG_NAND_SPL.
>>> 
>>> Does -ffunction-sections / --gc-sections not catch this automatically?
>> 
>> Doesn't appear to, but not sure if the NAND makefiles are utilizing those options.
> 
> Can you please verify this first?
> 
> At first glace it looks as if the compilation was done with
> -ffunction-sections and -fdata-sections, but I don't see --gc-sections
> on the linker command line

commit 8aba9dceebb14144e07d19593111ee3a999c37fc
Author: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Date:   Thu Jan 6 10:23:54 2011 +0900

    Divides variable of linker flags to LDFLAGS-u-boot and LDFLAGS

However, I think this is fixed via:

http://patchwork.ozlabs.org/patch/84010/

Which we need anyways, because Haiying's patch fixes nand boot in general.

- k
Kumar Gala - March 25, 2011, 1:43 p.m.
On Mar 6, 2011, at 10:16 PM, Kumar Gala wrote:

> We don't use disable_law in the SPL code so only build it if
> !CONFIG_NAND_SPL.
> 
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
> drivers/misc/fsl_law.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)

not need, fixed by --gc-sections / -ffunction-sections working properly

- k

Patch

diff --git a/drivers/misc/fsl_law.c b/drivers/misc/fsl_law.c
index 3233ff2..9b25ddc 100644
--- a/drivers/misc/fsl_law.c
+++ b/drivers/misc/fsl_law.c
@@ -79,6 +79,7 @@  void set_law(u8 idx, phys_addr_t addr, enum law_size sz, enum law_trgt_if id)
 	in_be32(LAWAR_ADDR(idx));
 }
 
+#ifndef CONFIG_NAND_SPL
 void disable_law(u8 idx)
 {
 	gd->used_laws &= ~(1 << idx);
@@ -92,7 +93,6 @@  void disable_law(u8 idx)
 	return;
 }
 
-#ifndef CONFIG_NAND_SPL
 static int get_law_entry(u8 i, struct law_entry *e)
 {
 	u32 lawar;