Re: [PATCH v3 06/15] ARM: at91: import lowlevel clock initialization from at91bootstrap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Sam,

On 2/4/19 19:42, Sam Ravnborg wrote:
> Hi Ahmad.
> 
> On Mon, Apr 01, 2019 at 12:18:14PM +0200, Ahmad Fatoum wrote:
>> For use by future at91 first stage bootloaders, this commit imports
>> https://github.com/linux4sam/at91bootstrap/blob/v3.8.12/driver/pmc.c
>>
>> Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
>> ---
>>  arch/arm/mach-at91/Makefile                   |   1 +
>>  arch/arm/mach-at91/at91_pmc_ll.c              | 184 ++++++++++++++++++
>>  arch/arm/mach-at91/include/mach/at91_pmc.h    |  24 ++-
>>  arch/arm/mach-at91/include/mach/at91_pmc_ll.h |  78 ++++++++
>>  4 files changed, 284 insertions(+), 3 deletions(-)
>>  create mode 100644 arch/arm/mach-at91/at91_pmc_ll.c
>>  create mode 100644 arch/arm/mach-at91/include/mach/at91_pmc_ll.h
>>
>> diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
>> index d81683ac121a..91b06c085107 100644
>> --- a/arch/arm/mach-at91/Makefile
>> +++ b/arch/arm/mach-at91/Makefile
>> @@ -1,4 +1,5 @@
>>  obj-y += setup.o
>> +pbl-y += at91_pmc_ll.o
> 
> Will this always make my pbl image larger or do we have some linker
> magic that throws away the unused code?

My understanding is that barebox instructs GCC to place each out-of-line function
into a separate section (with -ffunction-sections) and then the linker prunes all
unreferenced sections. 

> If the pbl image become larger then we need to add this in a conditional manner
> as we cannot allow this for all at91 variants.

I used to have conditional function definitions in a prior version (albeit
for the SDRAM variants initialization routines) and Sascha commented that
the #ifdefery can be removed as the linker takes care of it. 

> 
> 	Sam
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux