Re: [PATCH v3 08/10] MIPS: port all mach* to multiimage

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

 



Am 05.12.18 um 09:50 schrieb Antony Pavlov:
> On Tue, 27 Nov 2018 10:19:33 +0100
> Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> wrote:
> 
> 
> ...
> 
>> diff --git a/arch/mips/boards/8devices-lima/include/board/board_pbl_start.h b/arch/mips/boards/8devices-lima/lowlevel.S
>> similarity index 78%
>> rename from arch/mips/boards/8devices-lima/include/board/board_pbl_start.h
>> rename to arch/mips/boards/8devices-lima/lowlevel.S
>> index e95aa49256..a619747f39 100644
>> --- a/arch/mips/boards/8devices-lima/include/board/board_pbl_start.h
>> +++ b/arch/mips/boards/8devices-lima/lowlevel.S
>> @@ -15,51 +15,39 @@
>>   *
>>   */
>>  
>> -#include <mach/debug_ll_ar9344.h>
>> +#define BOARD_PBL_START start_8devices_lima
>> +
>> +#include <mach/debug_ll.h>
>> +#include <asm/asm.h>
>>  #include <asm/pbl_macros.h>
>>  #include <mach/pbl_macros.h>
>>  #include <mach/pbl_ll_init_qca4531.h>
>>  #include <asm/pbl_nmon.h>
>>  
>> -	.macro	board_pbl_start
>> -	.set	push
>> -	.set	noreorder
>> +ENTRY_FUNCTION(BOARD_PBL_START)
>>  
>>  	mips_barebox_10h
>>  
>> -	debug_ll_ar9344_init
>> -
>> -	debug_ll_outc '1'
>> +	debug_ll_ath79_init
>>  
> 
> I suppose there is a problem with simultaneous debug_ll support for AR9344 and AR9331 in one binary.
> the Kconfig DEBUG_AR9331_UART and DEBUG_AR9344_UART options are mutually exclusive.
> 
> Your approach makes it possible to build barebox binary image for AR9331 board with debug_ll code for AR9344
> and vice versa.

yes, same issues as with most of DEBUG_LL related configurations in
common/Kconfig. It is possible to misconfigure the DEBUG_LL for board or
SoC. Currently I don't have a solution except of remove DEBUG_LL support
completely from Kconfig for MIPS, or introduce some dynamic
configuration, which is not related to this patch set.

@Sascha?

>>  	hornet_mips24k_cp0_setup
>> -	debug_ll_outc '2'
>>  
>>  	/* test if we are in the SRAM */
>>  	pbl_blt 0xbd000000 1f t8
> 
> "if $pc < 0xbd000000 then jump to 1f"
> 
>> -	debug_ll_outc '3'
>>  	b skip_flash_test
>>  	nop
>>  1:
>>  	/* test if we are in the flash */
>>  	pbl_blt 0xbf000000 skip_pll_ram_config t8
> 
> "if $pc < 0xbf000000 then jump to skip_pll_ram_config"
> 
> 
> The code checks that $pc is less than 0xbd000000 if true then the code checks
> that $pc is less than 0xbf000000. The second check is redundant!

It is not a regression introduced by this patch, so it should be fixed
separately.

> 
>> -	debug_ll_outc '4'
>>  skip_flash_test:
>>  
>>  	pbl_qca4531_ddr2_550_550_init
>>  
>> -	debug_ll_outc '5'
>>  	/* Initialize caches... */
>>  	mips_cache_reset
>>  
>>  	/* ... and enable them */
>>  	dcache_enable
>>  skip_pll_ram_config:
>> -	debug_ll_outc '6'
>> -	debug_ll_outnl
>> -
>> -	mips_nmon
>> -
>> -	copy_to_link_location	pbl_start
>>  
>> -	.set	pop
>> -	.endm
>> +ENTRY_FUNCTION_END(BOARD_PBL_START, qca4531_8devices_lima)

Did you tested this patches?

-- 
Regards,
Oleksij

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
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