[U-Boot] [PATCH V2 1/2] ARM: rpi_b: query internal MAC address from firmware
Marek Vasut
marex at denx.de
Tue Sep 30 14:49:32 CEST 2014
On Tuesday, September 30, 2014 at 06:21:46 AM, Stephen Warren wrote:
> On 09/27/2014 01:43 PM, Marek Vasut wrote:
> > On Saturday, September 27, 2014 at 04:51:39 AM, Stephen Warren wrote:
> >> The built-in SMSC 95xx chip doesn't know its own MAC address. Instead,
> >> we must query it from the VC firmware; it's probably encoded in fuses
> >> on the BCM2835.
> >>
> >> Signed-off-by: Stephen Warren <swarren at wwwdotorg.org>
> >> ---
> >> v2: Don't set usbethaddr if it's already set
> >> ---
> >>
> >> arch/arm/include/asm/arch-bcm2835/mbox.h | 14 ++++++++++++++
> >> board/raspberrypi/rpi_b/rpi_b.c | 29
> >>
> >> +++++++++++++++++++++++++++++ include/configs/rpi_b.h |
> >> 1 +
> >>
> >> 3 files changed, 44 insertions(+)
> >>
> >> diff --git a/arch/arm/include/asm/arch-bcm2835/mbox.h
> >> b/arch/arm/include/asm/arch-bcm2835/mbox.h index dded857..61f427d 100644
> >> --- a/arch/arm/include/asm/arch-bcm2835/mbox.h
> >> +++ b/arch/arm/include/asm/arch-bcm2835/mbox.h
> >> @@ -119,6 +119,20 @@ struct bcm2835_mbox_tag_hdr {
> >>
> >> * };
> >> */
> >>
> >> +#define BCM2835_MBOX_TAG_GET_MAC_ADDRESS 0x00010003
> >> +
> >> +struct bcm2835_mbox_tag_get_mac_address {
> >> + struct bcm2835_mbox_tag_hdr tag_hdr;
> >> + union {
> >> + struct {
> >> + } req;
> >> + struct {
> >> + u8 mac[6];
> >> + u8 pad[2];
> >> + } resp;
> >
> > Well, can't this be a simple u32 here ?
>
> If you ignore the fact the message format really is 6 individual bytes,
> sure:-P.
Aw, u64 then. Anyway, it's not critical, it's just that the code looks a bit
iffy, that's all.
> > [...]
> >
> > Who will pick this series , shall I pick it ?
>
> That sounds reasonable to me; they depend on your patches. I suppose
> Albert might want to ack that.
OK, I placed it into u-boot-usb/topic/dwc2-20140930 for now.
Best regards,
Marek Vasut
More information about the U-Boot
mailing list