diff mbox

[U-Boot,2/2] x86: galileo: Enable saving environment in SPI flash

Message ID 1426065749-3881-2-git-send-email-bmeng.cn@gmail.com
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Bin Meng March 11, 2015, 9:22 a.m. UTC
Saving U-Boot's environment in SPI flash on Intel Galileo board.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 include/configs/galileo.h | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Simon Glass March 12, 2015, 10:15 p.m. UTC | #1
On 11 March 2015 at 02:22, Bin Meng <bmeng.cn@gmail.com> wrote:
> Saving U-Boot's environment in SPI flash on Intel Galileo board.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
>  include/configs/galileo.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/include/configs/galileo.h b/include/configs/galileo.h
> index 65a2c3e..288acf3 100644
> --- a/include/configs/galileo.h
> +++ b/include/configs/galileo.h
> @@ -62,4 +62,12 @@
>  #define CONFIG_DW_ALTDESCRIPTOR
>  #define CONFIG_PHYLIB
>
> +/* Environment configuration */
> +#undef CONFIG_ENV_IS_NOWHERE
> +#undef CONFIG_ENV_SIZE
> +#define CONFIG_ENV_IS_IN_SPI_FLASH
> +#define CONFIG_ENV_SIZE                        0x1000
> +#define CONFIG_ENV_SECT_SIZE           0x1000
> +#define CONFIG_ENV_OFFSET              0
> +
>  #endif /* __CONFIG_H */
> --
> 1.8.2.1
>

Acked-by: Simon Glass <sg@chromium.org>

I wonder at what point we should move some of this to x86-common.h?
Bin Meng March 13, 2015, 1:40 a.m. UTC | #2
Hi Simon,

On Fri, Mar 13, 2015 at 6:15 AM, Simon Glass <sjg@chromium.org> wrote:
> On 11 March 2015 at 02:22, Bin Meng <bmeng.cn@gmail.com> wrote:
>> Saving U-Boot's environment in SPI flash on Intel Galileo board.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> ---
>>
>>  include/configs/galileo.h | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/include/configs/galileo.h b/include/configs/galileo.h
>> index 65a2c3e..288acf3 100644
>> --- a/include/configs/galileo.h
>> +++ b/include/configs/galileo.h
>> @@ -62,4 +62,12 @@
>>  #define CONFIG_DW_ALTDESCRIPTOR
>>  #define CONFIG_PHYLIB
>>
>> +/* Environment configuration */
>> +#undef CONFIG_ENV_IS_NOWHERE
>> +#undef CONFIG_ENV_SIZE
>> +#define CONFIG_ENV_IS_IN_SPI_FLASH
>> +#define CONFIG_ENV_SIZE                        0x1000
>> +#define CONFIG_ENV_SECT_SIZE           0x1000
>> +#define CONFIG_ENV_OFFSET              0
>> +
>>  #endif /* __CONFIG_H */
>> --
>> 1.8.2.1
>>
>
> Acked-by: Simon Glass <sg@chromium.org>
>
> I wonder at what point we should move some of this to x86-common.h?

I believe we can only put

#define CONFIG_ENV_IS_IN_SPI_FLASH

in x86-common.h and leave others still in the board file due to they
are spi flash/board-specific.

Regards,
Bin
Simon Glass March 25, 2015, 10:35 p.m. UTC | #3
On 12 March 2015 at 19:40, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Simon,
>
> On Fri, Mar 13, 2015 at 6:15 AM, Simon Glass <sjg@chromium.org> wrote:
>> On 11 March 2015 at 02:22, Bin Meng <bmeng.cn@gmail.com> wrote:
>>> Saving U-Boot's environment in SPI flash on Intel Galileo board.
>>>
>>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>>> ---
>>>
>>>  include/configs/galileo.h | 8 ++++++++
>>>  1 file changed, 8 insertions(+)
>>>
>>> diff --git a/include/configs/galileo.h b/include/configs/galileo.h
>>> index 65a2c3e..288acf3 100644
>>> --- a/include/configs/galileo.h
>>> +++ b/include/configs/galileo.h
>>> @@ -62,4 +62,12 @@
>>>  #define CONFIG_DW_ALTDESCRIPTOR
>>>  #define CONFIG_PHYLIB
>>>
>>> +/* Environment configuration */
>>> +#undef CONFIG_ENV_IS_NOWHERE
>>> +#undef CONFIG_ENV_SIZE
>>> +#define CONFIG_ENV_IS_IN_SPI_FLASH
>>> +#define CONFIG_ENV_SIZE                        0x1000
>>> +#define CONFIG_ENV_SECT_SIZE           0x1000
>>> +#define CONFIG_ENV_OFFSET              0
>>> +
>>>  #endif /* __CONFIG_H */
>>> --
>>> 1.8.2.1
>>>
>>
>> Acked-by: Simon Glass <sg@chromium.org>
>>
>> I wonder at what point we should move some of this to x86-common.h?
>
> I believe we can only put
>
> #define CONFIG_ENV_IS_IN_SPI_FLASH
>
> in x86-common.h and leave others still in the board file due to they
> are spi flash/board-specific.

Yes that sounds right.

Applied to u-boot-x86, thanks!
diff mbox

Patch

diff --git a/include/configs/galileo.h b/include/configs/galileo.h
index 65a2c3e..288acf3 100644
--- a/include/configs/galileo.h
+++ b/include/configs/galileo.h
@@ -62,4 +62,12 @@ 
 #define CONFIG_DW_ALTDESCRIPTOR
 #define CONFIG_PHYLIB
 
+/* Environment configuration */
+#undef CONFIG_ENV_IS_NOWHERE
+#undef CONFIG_ENV_SIZE
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_ENV_SIZE			0x1000
+#define CONFIG_ENV_SECT_SIZE		0x1000
+#define CONFIG_ENV_OFFSET		0
+
 #endif	/* __CONFIG_H */