From cd97dd4f2c80900a295ec1b7fc6c789b94455c4e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 15 Nov 2010 06:42:42 -0500 Subject: Blackfin: stick ins/outs funcs into their own .text section This lets the linker garbage collect these functions when they aren't actually used by placing them into the standard .text. section. Signed-off-by: Mike Frysinger --- arch/blackfin/lib/ins.S | 1 + arch/blackfin/lib/outs.S | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/arch/blackfin/lib/ins.S b/arch/blackfin/lib/ins.S index 4519596..3ac6d84 100644 --- a/arch/blackfin/lib/ins.S +++ b/arch/blackfin/lib/ins.S @@ -71,6 +71,7 @@ */ #define COMMON_INS(func, ops) \ +.section .text._ins##func; \ ENTRY(_ins##func) \ P0 = R0; /* P0 = port */ \ CLI_OUTER; /* 3 instructions before first read access */ \ diff --git a/arch/blackfin/lib/outs.S b/arch/blackfin/lib/outs.S index 90c6033..253d4c3 100644 --- a/arch/blackfin/lib/outs.S +++ b/arch/blackfin/lib/outs.S @@ -12,6 +12,7 @@ .align 2 +.section .text._outsl ENTRY(_outsl) P0 = R0; /* P0 = port */ P1 = R1; /* P1 = address */ @@ -23,6 +24,7 @@ ENTRY(_outsl) RTS; ENDPROC(_outsl) +.section .text._outsw ENTRY(_outsw) P0 = R0; /* P0 = port */ P1 = R1; /* P1 = address */ @@ -34,6 +36,7 @@ ENTRY(_outsw) RTS; ENDPROC(_outsw) +.section .text._outsb ENTRY(_outsb) P0 = R0; /* P0 = port */ P1 = R1; /* P1 = address */ @@ -45,6 +48,7 @@ ENTRY(_outsb) RTS; ENDPROC(_outsb) +.section .text._outsw_8 ENTRY(_outsw_8) P0 = R0; /* P0 = port */ P1 = R1; /* P1 = address */ -- cgit v1.1 From 49508d4c591fd2c462cb3707541add0fee921ed4 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 15 Nov 2010 08:16:19 -0500 Subject: Blackfin: make sure bss len is multiple of 4 bytes The Blackfin on-chip BootROM requires that fill operations (which is used for the bss) be aligned to 4 bytes (base addr and total len). Plus, the Blackfin early init asm code assumes the same thing. So rather than making things work for no real gain, make sure the bss len is padded to 4 bytes in the linker script. Signed-off-by: Mike Frysinger --- arch/blackfin/lib/u-boot.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/blackfin/lib/u-boot.lds.S b/arch/blackfin/lib/u-boot.lds.S index 9163d20..f15c97e 100644 --- a/arch/blackfin/lib/u-boot.lds.S +++ b/arch/blackfin/lib/u-boot.lds.S @@ -147,6 +147,7 @@ SECTIONS *(.dynbss) *(.bss .bss.*) *(COMMON) + . = ALIGN(4); } >ram_data __bss_vma = ADDR(.bss); __bss_len = SIZEOF(.bss); -- cgit v1.1