[U-Boot] [PATCH 1/3] rockchip: make boot_mode releated codes reused across all platforms

Andy Yan andy.yan at rock-chips.com
Thu Sep 21 09:04:46 UTC 2017


Hi Heiko:


On 2017年09月21日 17:02, Heiko Stuebner wrote:
> Hi Andy,
>
> Am Dienstag, 12. September 2017, 21:57:32 CEST schrieb Andy Yan:
>> setup_boot_mode function use the same logic but different
>> mode register address across all the rockchip platforms,
>> so it's better to make this function reused across all the
>> platforms, and let the mode register address setting from
>> the config file.
>>
>> Signed-off-by: Andy Yan <andy.yan at rock-chips.com>
>>
>> ---
>>
>>   arch/arm/include/asm/arch-rockchip/boot_mode.h |  2 ++
>>   arch/arm/mach-rockchip/Kconfig                 | 14 +++++++++++
>>   arch/arm/mach-rockchip/Makefile                |  5 +++-
>>   arch/arm/mach-rockchip/boot_mode.c             | 33 ++++++++++++++++++++++++++
>>   arch/arm/mach-rockchip/rk3036-board.c          | 24 -------------------
>>   arch/arm/mach-rockchip/rk322x-board.c          | 24 -------------------
>>   arch/arm/mach-rockchip/rk3288-board.c          | 25 -------------------
>>   arch/arm/mach-rockchip/rk3399-board.c          | 14 +++++++++++
>>   8 files changed, 67 insertions(+), 74 deletions(-)
>>   create mode 100644 arch/arm/mach-rockchip/boot_mode.c
>>   create mode 100644 arch/arm/mach-rockchip/rk3399-board.c
>>
>> diff --git a/arch/arm/include/asm/arch-rockchip/boot_mode.h b/arch/arm/include/asm/arch-rockchip/boot_mode.h
>> index bd65f60..163b2e7 100644
>> --- a/arch/arm/include/asm/arch-rockchip/boot_mode.h
>> +++ b/arch/arm/include/asm/arch-rockchip/boot_mode.h
>> @@ -16,4 +16,6 @@
>>   /* enter usb mass storage mode */
>>   #define BOOT_UMS		(REBOOT_FLAG + 12)
>>   
>> +int setup_boot_mode(void);
>> +
>>   #endif
>> diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
>> index d9b25d5..527ca60 100644
>> --- a/arch/arm/mach-rockchip/Kconfig
>> +++ b/arch/arm/mach-rockchip/Kconfig
>> @@ -114,6 +114,7 @@ config ROCKCHIP_RK3399
>>   	select SPL_DRIVERS_MISC_SUPPORT
>>   	select ENABLE_ARM_SOC_BOOT0_HOOK
>>   	select DEBUG_UART_BOARD_INIT
>> +	select BOARD_LATE_INIT
>>   	help
>>   	  The Rockchip RK3399 is a ARM-based SoC with a dual-core Cortex-A72
>>   	  and quad-core Cortex-A53.
>> @@ -149,6 +150,19 @@ config TPL_ROCKCHIP_BACK_TO_BROM
>>             SPL will return to the boot rom, which will then load the U-Boot
>>             binary to keep going on.
>>   
>> +config ROCKCHIP_BOOT_MODE_REG
>> +	hex "Rockchip boot mode flag register address"
>> +	default 0x200081c8 if ROCKCHIP_RK3036
>> +	default 0x110005d8 if ROCKCHIP_RK322X
>> +	default 0xff730094 if ROCKCHIP_RK3288
>> +	default 0xff738200 if ROCKCHIP_RK3368
>> +	default 0xff320300 if ROCKCHIP_RK3399
>> +	default 0x10300580 if ROCKCHIP_RV1108
> could you possibly look up if the rk3188 and rk3066 also support
> the subsequent boot to maskrom download mode from the later
> patches and include the register if possible?

Okay, I will add support for them in next version.
>
>
> Thanks
> Heiko
>
>
>
>




More information about the U-Boot mailing list