diff mbox

[U-Boot] da850evm: Use generic board and libfdt, fix size for SPI flash

Message ID 1418778876.2455.7.camel@nswph.gme.net.au
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Peter Howard Dec. 17, 2014, 1:14 a.m. UTC
Add defines to use CONFIG_SYS_GENERIC_BOARD and CONFIG_OF_LIBFDT.
Semi-separate to this: the size of the image for the da850evm has
increased to the point that the size in da850evm.h and the offset for
the environment in SPI flash no longer work.  They are modified to
account for the larger image size.

Signed-off-by: Peter Howard <phoward@gme.net.au>
---
 include/configs/da850evm.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Jagan Teki Dec. 18, 2014, 7:03 a.m. UTC | #1
On 17 December 2014 at 06:44, Peter Howard <pjh@northern-ridge.com.au> wrote:
> Add defines to use CONFIG_SYS_GENERIC_BOARD and CONFIG_OF_LIBFDT.
> Semi-separate to this: the size of the image for the da850evm has
> increased to the point that the size in da850evm.h and the offset for
> the environment in SPI flash no longer work.  They are modified to
> account for the larger image size.
>
> Signed-off-by: Peter Howard <phoward@gme.net.au>
> ---
>  include/configs/da850evm.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
> index e5f8afe..e5a612c 100644
> --- a/include/configs/da850evm.h
> +++ b/include/configs/da850evm.h
> @@ -157,7 +157,7 @@
>  #define CONFIG_SPL_SPI_FLASH_SUPPORT
>  #define CONFIG_SPL_SPI_LOAD
>  #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x8000
> -#define CONFIG_SYS_SPI_U_BOOT_SIZE     0x30000
> +#define CONFIG_SYS_SPI_U_BOOT_SIZE     0x40000
>  #endif
>
>  /*
> @@ -251,7 +251,7 @@
>  #undef CONFIG_ENV_IS_IN_NAND
>  #define CONFIG_ENV_IS_IN_SPI_FLASH
>  #define CONFIG_ENV_SIZE                        (64 << 10)
> -#define CONFIG_ENV_OFFSET              (256 << 10)
> +#define CONFIG_ENV_OFFSET              (512 << 10)

Please make sure the proper testing of this new flash env size.

Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>

>  #define CONFIG_ENV_SECT_SIZE           (64 << 10)
>  #define CONFIG_SYS_NO_FLASH
>  #endif
> @@ -259,6 +259,7 @@
>  /*
>   * U-Boot general configuration
>   */
> +#define CONFIG_SYS_GENERIC_BOARD
>  #define CONFIG_MISC_INIT_R
>  #define CONFIG_BOARD_EARLY_INIT_F
>  #define CONFIG_BOOTFILE                "uImage" /* Boot file name */
> @@ -275,6 +276,7 @@
>  #define CONFIG_SYS_LONGHELP
>  #define CONFIG_CRC32_VERIFY
>  #define CONFIG_MX_CYCLIC
> +#define CONFIG_OF_LIBFDT
>
>  /*
>   * Linux Information
> --
> 1.9.3
>

thanks!
Peter Howard Dec. 18, 2014, 9:24 p.m. UTC | #2
On Thu, 2014-12-18 at 12:33 +0530, Jagan Teki wrote:
> On 17 December 2014 at 06:44, Peter Howard <pjh@northern-ridge.com.au> wrote:
> > Add defines to use CONFIG_SYS_GENERIC_BOARD and CONFIG_OF_LIBFDT.
> > Semi-separate to this: the size of the image for the da850evm has
> > increased to the point that the size in da850evm.h and the offset for
> > the environment in SPI flash no longer work.  They are modified to
> > account for the larger image size.
> >
> > Signed-off-by: Peter Howard <phoward@gme.net.au>
> > ---
> >  include/configs/da850evm.h | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
> > index e5f8afe..e5a612c 100644
> > --- a/include/configs/da850evm.h
> > +++ b/include/configs/da850evm.h
> > @@ -157,7 +157,7 @@
> >  #define CONFIG_SPL_SPI_FLASH_SUPPORT
> >  #define CONFIG_SPL_SPI_LOAD
> >  #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x8000
> > -#define CONFIG_SYS_SPI_U_BOOT_SIZE     0x30000
> > +#define CONFIG_SYS_SPI_U_BOOT_SIZE     0x40000
> >  #endif
> >
> >  /*
> > @@ -251,7 +251,7 @@
> >  #undef CONFIG_ENV_IS_IN_NAND
> >  #define CONFIG_ENV_IS_IN_SPI_FLASH
> >  #define CONFIG_ENV_SIZE                        (64 << 10)
> > -#define CONFIG_ENV_OFFSET              (256 << 10)
> > +#define CONFIG_ENV_OFFSET              (512 << 10)
> 
> Please make sure the proper testing of this new flash env size.
> 

What sort of testing were you thinking of?  I've confirmed that it
basically works (i.e. saving/loading/editing+save) - env size is 64K,
SPI is 8MB and offset is only 512K in, so it fits.  u-boot image size is
~260K so there's plenty of room before the env.

Is there something more you wanted?  

Thanks.

> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
> 
> >  #define CONFIG_ENV_SECT_SIZE           (64 << 10)
> >  #define CONFIG_SYS_NO_FLASH
> >  #endif
> > @@ -259,6 +259,7 @@
> >  /*
> >   * U-Boot general configuration
> >   */
> > +#define CONFIG_SYS_GENERIC_BOARD
> >  #define CONFIG_MISC_INIT_R
> >  #define CONFIG_BOARD_EARLY_INIT_F
> >  #define CONFIG_BOOTFILE                "uImage" /* Boot file name */
> > @@ -275,6 +276,7 @@
> >  #define CONFIG_SYS_LONGHELP
> >  #define CONFIG_CRC32_VERIFY
> >  #define CONFIG_MX_CYCLIC
> > +#define CONFIG_OF_LIBFDT
> >
> >  /*
> >   * Linux Information
> > --
> > 1.9.3
> >
> 
> thanks!
Jagan Teki Dec. 19, 2014, 6:44 a.m. UTC | #3
On 19 December 2014 at 02:54, Peter Howard <pjh@northern-ridge.com.au> wrote:
> On Thu, 2014-12-18 at 12:33 +0530, Jagan Teki wrote:
>> On 17 December 2014 at 06:44, Peter Howard <pjh@northern-ridge.com.au> wrote:
>> > Add defines to use CONFIG_SYS_GENERIC_BOARD and CONFIG_OF_LIBFDT.
>> > Semi-separate to this: the size of the image for the da850evm has
>> > increased to the point that the size in da850evm.h and the offset for
>> > the environment in SPI flash no longer work.  They are modified to
>> > account for the larger image size.
>> >
>> > Signed-off-by: Peter Howard <phoward@gme.net.au>
>> > ---
>> >  include/configs/da850evm.h | 6 ++++--
>> >  1 file changed, 4 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
>> > index e5f8afe..e5a612c 100644
>> > --- a/include/configs/da850evm.h
>> > +++ b/include/configs/da850evm.h
>> > @@ -157,7 +157,7 @@
>> >  #define CONFIG_SPL_SPI_FLASH_SUPPORT
>> >  #define CONFIG_SPL_SPI_LOAD
>> >  #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x8000
>> > -#define CONFIG_SYS_SPI_U_BOOT_SIZE     0x30000
>> > +#define CONFIG_SYS_SPI_U_BOOT_SIZE     0x40000
>> >  #endif
>> >
>> >  /*
>> > @@ -251,7 +251,7 @@
>> >  #undef CONFIG_ENV_IS_IN_NAND
>> >  #define CONFIG_ENV_IS_IN_SPI_FLASH
>> >  #define CONFIG_ENV_SIZE                        (64 << 10)
>> > -#define CONFIG_ENV_OFFSET              (256 << 10)
>> > +#define CONFIG_ENV_OFFSET              (512 << 10)
>>
>> Please make sure the proper testing of this new flash env size.
>>
>
> What sort of testing were you thinking of?  I've confirmed that it
> basically works (i.e. saving/loading/editing+save) - env size is 64K,
> SPI is 8MB and offset is only 512K in, so it fits.  u-boot image size is
> ~260K so there's plenty of room before the env.

Looks fine to me, but we have some recent changes in sf which we published
on master 5 days back - did you test on top of that?

>
> Is there something more you wanted?
>
> Thanks.
>
>> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
>>
>> >  #define CONFIG_ENV_SECT_SIZE           (64 << 10)
>> >  #define CONFIG_SYS_NO_FLASH
>> >  #endif
>> > @@ -259,6 +259,7 @@
>> >  /*
>> >   * U-Boot general configuration
>> >   */
>> > +#define CONFIG_SYS_GENERIC_BOARD
>> >  #define CONFIG_MISC_INIT_R
>> >  #define CONFIG_BOARD_EARLY_INIT_F
>> >  #define CONFIG_BOOTFILE                "uImage" /* Boot file name */
>> > @@ -275,6 +276,7 @@
>> >  #define CONFIG_SYS_LONGHELP
>> >  #define CONFIG_CRC32_VERIFY
>> >  #define CONFIG_MX_CYCLIC
>> > +#define CONFIG_OF_LIBFDT
>> >
>> >  /*
>> >   * Linux Information
>> > --
>> > 1.9.3

thanks!
Peter Howard Dec. 21, 2014, 8:57 p.m. UTC | #4
On Fri, 2014-12-19 at 12:14 +0530, Jagan Teki wrote:
> On 19 December 2014 at 02:54, Peter Howard <pjh@northern-ridge.com.au> wrote:
> > On Thu, 2014-12-18 at 12:33 +0530, Jagan Teki wrote:
> >> On 17 December 2014 at 06:44, Peter Howard <pjh@northern-ridge.com.au> wrote:
> >> > Add defines to use CONFIG_SYS_GENERIC_BOARD and CONFIG_OF_LIBFDT.
> >> > Semi-separate to this: the size of the image for the da850evm has
> >> > increased to the point that the size in da850evm.h and the offset for
> >> > the environment in SPI flash no longer work.  They are modified to
> >> > account for the larger image size.
> >> >
> >> > Signed-off-by: Peter Howard <phoward@gme.net.au>
> >> > ---
> >> >  include/configs/da850evm.h | 6 ++++--
> >> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >> >
> >> > diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
> >> > index e5f8afe..e5a612c 100644
> >> > --- a/include/configs/da850evm.h
> >> > +++ b/include/configs/da850evm.h
> >> > @@ -157,7 +157,7 @@
> >> >  #define CONFIG_SPL_SPI_FLASH_SUPPORT
> >> >  #define CONFIG_SPL_SPI_LOAD
> >> >  #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x8000
> >> > -#define CONFIG_SYS_SPI_U_BOOT_SIZE     0x30000
> >> > +#define CONFIG_SYS_SPI_U_BOOT_SIZE     0x40000
> >> >  #endif
> >> >
> >> >  /*
> >> > @@ -251,7 +251,7 @@
> >> >  #undef CONFIG_ENV_IS_IN_NAND
> >> >  #define CONFIG_ENV_IS_IN_SPI_FLASH
> >> >  #define CONFIG_ENV_SIZE                        (64 << 10)
> >> > -#define CONFIG_ENV_OFFSET              (256 << 10)
> >> > +#define CONFIG_ENV_OFFSET              (512 << 10)
> >>
> >> Please make sure the proper testing of this new flash env size.
> >>
> >
> > What sort of testing were you thinking of?  I've confirmed that it
> > basically works (i.e. saving/loading/editing+save) - env size is 64K,
> > SPI is 8MB and offset is only 512K in, so it fits.  u-boot image size is
> > ~260K so there's plenty of room before the env.
> 
> Looks fine to me, but we have some recent changes in sf which we published
> on master 5 days back - did you test on top of that?
> 

If you're referring to commits 54ba653ab63b31c8f5405fb0ee9dfba05cbb1521,
74c2cee4e82bb71953267e87900e279ab5aa1dc3,
b648742a17c16639976ac5b38f246cb0f7d41da5, and
6dd6e90e13acc4014634d78fc469e7e82eefc255, then yes I tested on top of
those.

> >
> > Is there something more you wanted?
> >
> > Thanks.
> >
> >> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
> >>
> >> >  #define CONFIG_ENV_SECT_SIZE           (64 << 10)
> >> >  #define CONFIG_SYS_NO_FLASH
> >> >  #endif
> >> > @@ -259,6 +259,7 @@
> >> >  /*
> >> >   * U-Boot general configuration
> >> >   */
> >> > +#define CONFIG_SYS_GENERIC_BOARD
> >> >  #define CONFIG_MISC_INIT_R
> >> >  #define CONFIG_BOARD_EARLY_INIT_F
> >> >  #define CONFIG_BOOTFILE                "uImage" /* Boot file name */
> >> > @@ -275,6 +276,7 @@
> >> >  #define CONFIG_SYS_LONGHELP
> >> >  #define CONFIG_CRC32_VERIFY
> >> >  #define CONFIG_MX_CYCLIC
> >> > +#define CONFIG_OF_LIBFDT
> >> >
> >> >  /*
> >> >   * Linux Information
> >> > --
> >> > 1.9.3
> 
> thanks!
Jagan Teki Dec. 29, 2014, 4:58 p.m. UTC | #5
On 22 December 2014 at 02:27, Peter Howard <pjh@northern-ridge.com.au> wrote:
> On Fri, 2014-12-19 at 12:14 +0530, Jagan Teki wrote:
>> On 19 December 2014 at 02:54, Peter Howard <pjh@northern-ridge.com.au> wrote:
>> > On Thu, 2014-12-18 at 12:33 +0530, Jagan Teki wrote:
>> >> On 17 December 2014 at 06:44, Peter Howard <pjh@northern-ridge.com.au> wrote:
>> >> > Add defines to use CONFIG_SYS_GENERIC_BOARD and CONFIG_OF_LIBFDT.
>> >> > Semi-separate to this: the size of the image for the da850evm has
>> >> > increased to the point that the size in da850evm.h and the offset for
>> >> > the environment in SPI flash no longer work.  They are modified to
>> >> > account for the larger image size.
>> >> >
>> >> > Signed-off-by: Peter Howard <phoward@gme.net.au>
>> >> > ---
>> >> >  include/configs/da850evm.h | 6 ++++--
>> >> >  1 file changed, 4 insertions(+), 2 deletions(-)
>> >> >
>> >> > diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
>> >> > index e5f8afe..e5a612c 100644
>> >> > --- a/include/configs/da850evm.h
>> >> > +++ b/include/configs/da850evm.h
>> >> > @@ -157,7 +157,7 @@
>> >> >  #define CONFIG_SPL_SPI_FLASH_SUPPORT
>> >> >  #define CONFIG_SPL_SPI_LOAD
>> >> >  #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x8000
>> >> > -#define CONFIG_SYS_SPI_U_BOOT_SIZE     0x30000
>> >> > +#define CONFIG_SYS_SPI_U_BOOT_SIZE     0x40000
>> >> >  #endif
>> >> >
>> >> >  /*
>> >> > @@ -251,7 +251,7 @@
>> >> >  #undef CONFIG_ENV_IS_IN_NAND
>> >> >  #define CONFIG_ENV_IS_IN_SPI_FLASH
>> >> >  #define CONFIG_ENV_SIZE                        (64 << 10)
>> >> > -#define CONFIG_ENV_OFFSET              (256 << 10)
>> >> > +#define CONFIG_ENV_OFFSET              (512 << 10)
>> >>
>> >> Please make sure the proper testing of this new flash env size.
>> >>
>> >
>> > What sort of testing were you thinking of?  I've confirmed that it
>> > basically works (i.e. saving/loading/editing+save) - env size is 64K,
>> > SPI is 8MB and offset is only 512K in, so it fits.  u-boot image size is
>> > ~260K so there's plenty of room before the env.
>>
>> Looks fine to me, but we have some recent changes in sf which we published
>> on master 5 days back - did you test on top of that?
>>
>
> If you're referring to commits 54ba653ab63b31c8f5405fb0ee9dfba05cbb1521,
> 74c2cee4e82bb71953267e87900e279ab5aa1dc3,
> b648742a17c16639976ac5b38f246cb0f7d41da5, and
> 6dd6e90e13acc4014634d78fc469e7e82eefc255, then yes I tested on top of
> those.
>
>> >
>> > Is there something more you wanted?
>> >
>> > Thanks.
>> >
>> >> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
>> >>
>> >> >  #define CONFIG_ENV_SECT_SIZE           (64 << 10)
>> >> >  #define CONFIG_SYS_NO_FLASH
>> >> >  #endif
>> >> > @@ -259,6 +259,7 @@
>> >> >  /*
>> >> >   * U-Boot general configuration
>> >> >   */
>> >> > +#define CONFIG_SYS_GENERIC_BOARD
>> >> >  #define CONFIG_MISC_INIT_R
>> >> >  #define CONFIG_BOARD_EARLY_INIT_F
>> >> >  #define CONFIG_BOOTFILE                "uImage" /* Boot file name */
>> >> > @@ -275,6 +276,7 @@
>> >> >  #define CONFIG_SYS_LONGHELP
>> >> >  #define CONFIG_CRC32_VERIFY
>> >> >  #define CONFIG_MX_CYCLIC
>> >> > +#define CONFIG_OF_LIBFDT
>> >> >
>> >> >  /*
>> >> >   * Linux Information
>> >> > --
>> >> > 1.9.3

Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>

thanks!
Tom Rini Jan. 7, 2015, 3:12 p.m. UTC | #6
On Wed, Dec 17, 2014 at 12:14:36PM +1100, Peter Howard wrote:

> Add defines to use CONFIG_SYS_GENERIC_BOARD and CONFIG_OF_LIBFDT.
> Semi-separate to this: the size of the image for the da850evm has
> increased to the point that the size in da850evm.h and the offset for
> the environment in SPI flash no longer work.  They are modified to
> account for the larger image size.
> 
> Signed-off-by: Peter Howard <phoward@gme.net.au>
> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index e5f8afe..e5a612c 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -157,7 +157,7 @@ 
 #define CONFIG_SPL_SPI_FLASH_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x8000
-#define CONFIG_SYS_SPI_U_BOOT_SIZE     0x30000
+#define CONFIG_SYS_SPI_U_BOOT_SIZE     0x40000
 #endif
 
 /*
@@ -251,7 +251,7 @@ 
 #undef CONFIG_ENV_IS_IN_NAND
 #define CONFIG_ENV_IS_IN_SPI_FLASH
 #define CONFIG_ENV_SIZE                        (64 << 10)
-#define CONFIG_ENV_OFFSET              (256 << 10)
+#define CONFIG_ENV_OFFSET              (512 << 10)
 #define CONFIG_ENV_SECT_SIZE           (64 << 10)
 #define CONFIG_SYS_NO_FLASH
 #endif
@@ -259,6 +259,7 @@ 
 /*
  * U-Boot general configuration
  */
+#define CONFIG_SYS_GENERIC_BOARD
 #define CONFIG_MISC_INIT_R
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_BOOTFILE                "uImage" /* Boot file name */
@@ -275,6 +276,7 @@ 
 #define CONFIG_SYS_LONGHELP
 #define CONFIG_CRC32_VERIFY
 #define CONFIG_MX_CYCLIC
+#define CONFIG_OF_LIBFDT
 
 /*
  * Linux Information