[PATCH v3 1/3] arm: mvebu: mvebu_armada-37xx: Implement the mac command (Marvell hw_info)
Luka Kovacic
luka.kovacic at sartura.hr
Fri Aug 13 12:43:47 CEST 2021
On Fri, Aug 13, 2021 at 12:29 PM Pali Rohár <pali at kernel.org> wrote:
>
> On Friday 13 August 2021 01:39:36 Luka Kovacic wrote:
> > diff --git a/board/Marvell/mvebu_armada-37xx/Kconfig b/board/Marvell/mvebu_armada-37xx/Kconfig
> > new file mode 100644
> > index 0000000000..b84dd20023
> > --- /dev/null
> > +++ b/board/Marvell/mvebu_armada-37xx/Kconfig
> > @@ -0,0 +1,29 @@
> > +menu "Marvell Armada 37xx configuration"
> > +depends on TARGET_MVEBU_ARMADA_37XX
> > +
> > +config MVEBU_MAC_HW_INFO
> > + bool "Marvell hw_info (mac) support"
> > + depends on SPI_FLASH && ENV_IS_IN_SPI_FLASH && ARCH_MVEBU
> > + default n
> > + help
> > + Enable loading of the Marvell hw_info parameters from the
> > + SPI flash hw_info area. Parameters (usually the board serial
> > + number and MAC addresses) are then imported into the
> > + existing U-Boot environment.
> > + Implementation of this command is compatible with the
> > + original Marvell U-Boot command. Reading and writing is
> > + supported.
> > + EEPROM config pattern and checksum aren't supported.
> > + After enabled, these parameters are managed from the common
> > + U-Boot mac command.
> > +
> > +config MVEBU_MAC_HW_INFO_OFFSET
> > + hex "Marvell hw_info (mac) SPI flash offset"
> > + depends on MVEBU_MAC_HW_INFO
> > + default 0x3E0000
> > + help
> > + This option defines the SPI flash offset of the Marvell
> > + hw_info area. This defaults to 0x3E0000 on most Armada
> > + A3720 platforms.
>
> Just a question, cannot we load this offset from DTS? In DTS are already
> specified SPI partitions, so this could eliminate need for defining this
> offset at two places. But I really do not know at which time is this
> code called, if DTB is available at this time or not.
The code is called right after cpu_secondary_init_r.
I'm not sure, there also some other values, which are hard-coded and
so far I didn't really see any other possible offset.
Are you aware of any other relevant board with the Marvell hw_info
parameters?
>
> > +endmenu
Kind regards,
Luka
More information about the U-Boot
mailing list