Re: [U-Boot] [PATCH v3 09/20] sunxi: disable direct MMC environment for 64 bit boards

2018-03-02 Thread Andre Przywara
Hi,

On 02/03/18 15:56, Maxime Ripard wrote:
> Hi,
> 
> On Fri, Mar 02, 2018 at 12:56:48AM +, Andre Przywara wrote:
>> Since the dawn of time for the Allwinner support in mainline U-Boot
>> we store the environment to the SD card and write directly at
>> 544KB from the beginning of the device. This leads to problems when
>> the U-Boot proper image grows beyond 504KB and eventually overlaps.
>> With one release of having the environment preferably in a FAT
>> partition, let's now turn off the MMC variant fallback, so we get back
>> all the space we need to implement features.
>> In case someone desperately needs to turn direct MMC environment back
>> on, let's move that to 896KB (128K below 1MB), so that we won't be
>> easily limited anymore.
>>
>> Signed-off-by: Andre Przywara 
>> ---
>>  env/Kconfig| 5 +++--
>>  include/configs/sunxi-common.h | 2 +-
>>  2 files changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/env/Kconfig b/env/Kconfig
>> index a3c6298273..b404855542 100644
>> --- a/env/Kconfig
>> +++ b/env/Kconfig
>> @@ -152,7 +152,7 @@ config ENV_IS_IN_MMC
>>  bool "Environment in an MMC device"
>>  depends on !CHAIN_OF_TRUST
>>  depends on MMC
>> -default y if ARCH_SUNXI
>> +default y if ARCH_SUNXI && !ARM64
> 
> I'd go even further and remove it for everyone.

Fine, if you say so!

> 
>>  default y if ARCH_EXYNOS4
>>  default y if MX6SX || MX7D
>>  default y if TEGRA30 || TEGRA124
>> @@ -443,7 +443,8 @@ config ENV_OFFSET
>>  hex "Environment Offset"
>>  depends on !ENV_IS_IN_UBI
>>  depends on !ENV_IS_NOWHERE
>> -default 0x88000 if ARCH_SUNXI
>> +default 0x88000 if ARCH_SUNXI && !ARM64
>> +default 0xe if ARCH_SUNXI && ARM64
> 
> However, I'm not sure why that would be needed. I would rather keep
> the old value to have an easy fallback to the old environment, given
> that you disable a few things afterwards.

Yeah, fair enough. Wasn't so sure about it anyway.

Cheers,
Andre.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 09/20] sunxi: disable direct MMC environment for 64 bit boards

2018-03-02 Thread Maxime Ripard
Hi,

On Fri, Mar 02, 2018 at 12:56:48AM +, Andre Przywara wrote:
> Since the dawn of time for the Allwinner support in mainline U-Boot
> we store the environment to the SD card and write directly at
> 544KB from the beginning of the device. This leads to problems when
> the U-Boot proper image grows beyond 504KB and eventually overlaps.
> With one release of having the environment preferably in a FAT
> partition, let's now turn off the MMC variant fallback, so we get back
> all the space we need to implement features.
> In case someone desperately needs to turn direct MMC environment back
> on, let's move that to 896KB (128K below 1MB), so that we won't be
> easily limited anymore.
> 
> Signed-off-by: Andre Przywara 
> ---
>  env/Kconfig| 5 +++--
>  include/configs/sunxi-common.h | 2 +-
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/env/Kconfig b/env/Kconfig
> index a3c6298273..b404855542 100644
> --- a/env/Kconfig
> +++ b/env/Kconfig
> @@ -152,7 +152,7 @@ config ENV_IS_IN_MMC
>   bool "Environment in an MMC device"
>   depends on !CHAIN_OF_TRUST
>   depends on MMC
> - default y if ARCH_SUNXI
> + default y if ARCH_SUNXI && !ARM64

I'd go even further and remove it for everyone.

>   default y if ARCH_EXYNOS4
>   default y if MX6SX || MX7D
>   default y if TEGRA30 || TEGRA124
> @@ -443,7 +443,8 @@ config ENV_OFFSET
>   hex "Environment Offset"
>   depends on !ENV_IS_IN_UBI
>   depends on !ENV_IS_NOWHERE
> - default 0x88000 if ARCH_SUNXI
> + default 0x88000 if ARCH_SUNXI && !ARM64
> + default 0xe if ARCH_SUNXI && ARM64

However, I'm not sure why that would be needed. I would rather keep
the old value to have an easy fallback to the old environment, given
that you disable a few things afterwards.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com


signature.asc
Description: PGP signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot