r348020 ian May 20, 2019, 10:32 p.m.
all-ones then carving out blocks of zeroes where specified values go, init
it to all-zeroes, put in ones where values need to be masked, then use it
as value &= ~sc_led_modes_mask.  In addition to being more idiomatic, this
means everything related to FDT data is initialized to zero along with the
rest of the softc, and that allows removing some #ifdef FDT sections and
wrapping the whole muge_set_leds() function in a single ifdef block.

This also deletes the early-out from muge_set_leds() when an eeprom exists.
Even if there is an eeprom with led config in it, the fdt data (if present)
should override that, because the user is in control of the fdt data.
r348019 ngie May 20, 2019, 10:32 p.m.
This allows someone to use `-v` to dump out standard output.
r348018 ian May 20, 2019, 10:21 p.m.
OTP registers (because the user is in control of the fdt data).  Remove the
early returns from the code that tries to find a good mac address, so that
the execution always flows through the routine to get an address from FDT
data last, when on FDT-enabled systems.
r348016 ian May 20, 2019, 10:04 p.m.
already.  Also, shorten a variable name for nicer line-wrapping.

No functional changes.
r348013 ian May 20, 2019, 9:45 p.m.
the device instance, and to get the MAC address for the device instance.
The ad-hoc code this replaces could find the wrong instance if multiple
devices were present.
r348011 markj May 20, 2019, 9:23 p.m.
Reported by:	pluknet
MFC with:	r348003
r348008 emaste May 20, 2019, 8:48 p.m.
The .init and .fini epilogues from crtn should be placed immediately
after any instructions in .init and .fini sections from the linked
objects.  Using 16-byte alignment for the epilogues on MIPS was a bug,
but it did not cause any issue with GNU ld as GNU ld (2.17.50) fills the
padding with NOPs.

Current versions of LLD fill any padding between different object files
with trap instructions.  Inserting trap padding prior to the .init/.fini
epilogue is undesriable as the resulting binary will crash at runtime.

The .init and .fini sections in object files linked between crti and
crtn must already be a multiple of the instruction size and so no
alignment directive is required in crtn.  Indeed, other architectures
(except sparc64) do not specify alignment in their crtn implementations.

Reported by:	arichardson
Reviewed by:	andrew
Event:		Waterloo Hackathon 2019
Differential Revision:	https://reviews.freebsd.org/D18291
r348006 emaste May 20, 2019, 7:31 p.m.
Also use LED mode settings from the FDT to set the PHY.
From v3 of the patch submitted in the PR.

I moved the sc_led_modes and sc_led_modes_mask default setting outside
of the #ifdef FDT case.

PR:		237325
Submitted by:	Ralf <iz-rpi03@hs-karlsruhe.de>
Reviewed by:	ian
MFC after:	2 weeks
MFC with:	r348001
Event:		Waterloo Hackathon 2019
Differential Revision:	https://reviews.freebsd.org/D20325
r348005 luporl May 20, 2019, 7:21 p.m.
This change fixes "stand" build issues when using clang 8
as compiler.

Submitted by:   alfredo.junior_eldorado.org.br
Reviewed by:    jhibbits
Differential Revision: https://reviews.freebsd.org/D20026
r348004 markj May 20, 2019, 7:14 p.m.
MFC after:	3 days
r348003 markj May 20, 2019, 7:12 p.m.
Reviewed by:	kib
Discussed with:	emaste
MFC after:	2 weeks
Event:		Waterloo Hackathon 2019
Differential Revision:	https://reviews.freebsd.org/D20310
r348002 markj May 20, 2019, 7:08 p.m.
MFC after:	3 days
r348001 emaste May 20, 2019, 6:41 p.m.
Also apply some style(9) and remove the message about EEPROM configuration
(if there's an EEPROM the hardware handles LED configuration itself).

PR:		237325
Reviewed by:	ian
MFC after:	2 weeks
Submitted by:	Ralf <iz-rpi03@hs-karlsruhe.de>
r348000 trasz May 20, 2019, 6:35 p.m.
MFC after:	2 weeks
Sponsored by:	Klara Inc.
r347999 lwhsu May 20, 2019, 6:07 p.m.

MFC after:	2 weeks (with r347989)
Sponsored by:	The FreeBSD Foundation