This loads a mac address using a misc device using the nvmem interface.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
eth_5: eth@10003000 {
compatible = "sandbox,eth";
reg = <0x10003000 0x1000>;
- mac-address = [ 02 00 11 22 33 46 ];
+ nvmem-cells = <ð5_addr>;
+ nvmem-cell-names = "mac-address";
};
eth_3: sbe5 {
};
misc-test {
+ #address-cells = <1>;
+ #size-cells = <1>;
compatible = "sandbox,misc_sandbox";
+
+ eth5_addr: mac-address@10 {
+ reg = <0x10 6>;
+ };
};
mmc2 {
int misc_sandbox_probe(struct udevice *dev)
{
struct misc_sandbox_priv *priv = dev_get_priv(dev);
+ /* For eth5 */
+ const u8 mac[] = { 0x02, 0x00, 0x11, 0x22, 0x33, 0x46 };
priv->enabled = true;
+ memcpy(&priv->mem[16], mac, sizeof(mac));
return 0;
}