[U-Boot] [PATCH] rockchip: Disable SPL_MMC_SUPPORT if ROCKCHIP_SPL_BACK_TO_BROM is enabled.

Simon Glass sjg at chromium.org
Thu Aug 25 14:05:04 CEST 2016


Hi Sandy,

On 24 August 2016 at 15:00, Sandy Patterson <apatterson at sightlogix.com> wrote:
>
> On Wed, Aug 24, 2016 at 9:27 AM, Sandy Patterson <apatterson at sightlogix.com>
> wrote:
>>
>>
>> On Fri, Aug 12, 2016 at 8:59 PM, Sandy Patterson
>> <apatterson at sightlogix.com> wrote:
>>>
>>> CONFIG_SPL_MMC_SUPPORT is used pretty much for every board except jerry,
>>> so we can refactor the define into rk3288_common.h. Then only define it
>>> if
>>> we are using using the Bootrom to load the non SPL U-Boot.
>>>
>>> With this change the SPL binary shrinks from 32k to 23k when
>>> ROCKCHIP_SPL_BACK_TO_BROM is enabled. This has been tested on the rock2
>>> board. It should work with any rk3288 though since the bootrom is
>>> loading the SPL already it should load the main U-Boot as well.
>>>
>>> Rock2 has been tested with ROCKCHIP_SPL_BACK_TO_BROM So enabled for
>>> rock2.
>>>
>>> Signed-off-by: Sandy Patterson <apatterson at sightlogix.com>
>>> ---
>>>
>>>  configs/rock2_defconfig            | 1 +
>>>  include/configs/chromebook_jerry.h | 1 +
>>>  include/configs/evb_rk3288.h       | 2 --
>>>  include/configs/fennec_rk3288.h    | 2 --
>>>  include/configs/firefly-rk3288.h   | 2 --
>>>  include/configs/miniarm_rk3288.h   | 2 --
>>>  include/configs/popmetal_rk3288.h  | 2 --
>>>  include/configs/rk3288_common.h    | 4 ++++
>>>  include/configs/rock2.h            | 2 --
>>>  9 files changed, 6 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/configs/rock2_defconfig b/configs/rock2_defconfig
>>> index 3b6d7d9..8f730e5 100644
>>> --- a/configs/rock2_defconfig
>>> +++ b/configs/rock2_defconfig
>>> @@ -67,3 +67,4 @@ CONFIG_USE_PRIVATE_LIBGCC=y
>>>  CONFIG_USE_TINY_PRINTF=y
>>>  CONFIG_CMD_DHRYSTONE=y
>>>  CONFIG_ERRNO_STR=y
>>> +CONFIG_ROCKCHIP_SPL_BACK_TO_BROM=y
>>> diff --git a/include/configs/chromebook_jerry.h
>>> b/include/configs/chromebook_jerry.h
>>> index d1f5b46..9800ffb 100644
>>> --- a/include/configs/chromebook_jerry.h
>>> +++ b/include/configs/chromebook_jerry.h
>>> @@ -22,6 +22,7 @@
>>>
>>>  #define CONFIG_CMD_SF_TEST
>>>
>>> +#undef CONFIG_SPL_MMC_SUPPORT
>>>  #undef CONFIG_SPL_GPIO_SUPPORT
>>>
>>>  #define CONFIG_KEYBOARD
>>> diff --git a/include/configs/evb_rk3288.h b/include/configs/evb_rk3288.h
>>> index 342557f..390c243 100644
>>> --- a/include/configs/evb_rk3288.h
>>> +++ b/include/configs/evb_rk3288.h
>>> @@ -10,8 +10,6 @@
>>>  #define ROCKCHIP_DEVICE_SETTINGS
>>>  #include <configs/rk3288_common.h>
>>>
>>> -#define CONFIG_SPL_MMC_SUPPORT
>>> -
>>>  #define CONFIG_ENV_IS_IN_MMC
>>>  #define CONFIG_SYS_MMC_ENV_DEV 1
>>>  /* SPL @ 32k for ~36k
>>> diff --git a/include/configs/fennec_rk3288.h
>>> b/include/configs/fennec_rk3288.h
>>> index 342557f..390c243 100644
>>> --- a/include/configs/fennec_rk3288.h
>>> +++ b/include/configs/fennec_rk3288.h
>>> @@ -10,8 +10,6 @@
>>>  #define ROCKCHIP_DEVICE_SETTINGS
>>>  #include <configs/rk3288_common.h>
>>>
>>> -#define CONFIG_SPL_MMC_SUPPORT
>>> -
>>>  #define CONFIG_ENV_IS_IN_MMC
>>>  #define CONFIG_SYS_MMC_ENV_DEV 1
>>>  /* SPL @ 32k for ~36k
>>> diff --git a/include/configs/firefly-rk3288.h
>>> b/include/configs/firefly-rk3288.h
>>> index a29f557..ee924c3 100644
>>> --- a/include/configs/firefly-rk3288.h
>>> +++ b/include/configs/firefly-rk3288.h
>>> @@ -14,8 +14,6 @@
>>>
>>>  #include <configs/rk3288_common.h>
>>>
>>> -#define CONFIG_SPL_MMC_SUPPORT
>>> -
>>>  #define CONFIG_ENV_IS_IN_MMC
>>>  #define CONFIG_SYS_MMC_ENV_DEV 0
>>>  /* SPL @ 32k for ~36k
>>> diff --git a/include/configs/miniarm_rk3288.h
>>> b/include/configs/miniarm_rk3288.h
>>> index 342557f..390c243 100644
>>> --- a/include/configs/miniarm_rk3288.h
>>> +++ b/include/configs/miniarm_rk3288.h
>>> @@ -10,8 +10,6 @@
>>>  #define ROCKCHIP_DEVICE_SETTINGS
>>>  #include <configs/rk3288_common.h>
>>>
>>> -#define CONFIG_SPL_MMC_SUPPORT
>>> -
>>>  #define CONFIG_ENV_IS_IN_MMC
>>>  #define CONFIG_SYS_MMC_ENV_DEV 1
>>>  /* SPL @ 32k for ~36k
>>> diff --git a/include/configs/popmetal_rk3288.h
>>> b/include/configs/popmetal_rk3288.h
>>> index 342557f..390c243 100644
>>> --- a/include/configs/popmetal_rk3288.h
>>> +++ b/include/configs/popmetal_rk3288.h
>>> @@ -10,8 +10,6 @@
>>>  #define ROCKCHIP_DEVICE_SETTINGS
>>>  #include <configs/rk3288_common.h>
>>>
>>> -#define CONFIG_SPL_MMC_SUPPORT
>>> -
>>>  #define CONFIG_ENV_IS_IN_MMC
>>>  #define CONFIG_SYS_MMC_ENV_DEV 1
>>>  /* SPL @ 32k for ~36k
>>> diff --git a/include/configs/rk3288_common.h
>>> b/include/configs/rk3288_common.h
>>> index d3d4c68..bc0de3d 100644
>>> --- a/include/configs/rk3288_common.h
>>> +++ b/include/configs/rk3288_common.h
>>> @@ -33,6 +33,10 @@
>>>  #define CONFIG_SYS_NS16550_MEM32
>>>  #define CONFIG_SPL_BOARD_INIT
>>>
>>> +#ifndef CONFIG_ROCKCHIP_SPL_BACK_TO_BROM
>>> +#define CONFIG_SPL_MMC_SUPPORT
>>> +#endif
>>> +
>>>  #ifdef CONFIG_ROCKCHIP_SPL_BACK_TO_BROM
>>>  /* Bootrom will load u-boot binary to 0x0 once return from SPL */
>>>  #define CONFIG_SYS_TEXT_BASE           0x00000000
>>> diff --git a/include/configs/rock2.h b/include/configs/rock2.h
>>> index a29f557..ee924c3 100644
>>> --- a/include/configs/rock2.h
>>> +++ b/include/configs/rock2.h
>>> @@ -14,8 +14,6 @@
>>>
>>>  #include <configs/rk3288_common.h>
>>>
>>> -#define CONFIG_SPL_MMC_SUPPORT
>>> -
>>>  #define CONFIG_ENV_IS_IN_MMC
>>>  #define CONFIG_SYS_MMC_ENV_DEV 0
>>>  /* SPL @ 32k for ~36k
>>> --
>>> 1.9.1
>>>
>>
>>
>> Hi Simon,
>>
>> Just wondering if this commit got lost, or maybe there is some advice you
>> could give me on how to make this more helpful.
>>
>> Sandy
>
>
> Ah, I see why you didn't grab this. I'll resubmit after I've had a chance to
> digest the SPL Kconfig changeset.

No it's not that. You patch comes before that series.

But I would like to see review/ tags from others on Rockchip patches -
just so that I know that people are on-board with the change.

Will add my tag to encourage people!

Acked-by: Simon Glass <sjg at chromium.org>

Regards,
Simon


More information about the U-Boot mailing list