]> Git Repo - J-u-boot.git/blobdiff - drivers/rtc/i2c_rtc_emul.c
Merge tag 'xilinx-for-v2023.04-rc1' of https://source.denx.de/u-boot/custodians/u...
[J-u-boot.git] / drivers / rtc / i2c_rtc_emul.c
index ba418c25daf6b99fa6b692ca9decdba7294010a3..c307d6036dd5b87ca4fc256a47d3938ccdbb980e 100644 (file)
@@ -203,6 +203,15 @@ static int sandbox_i2c_rtc_bind(struct udevice *dev)
        return 0;
 }
 
+static int sandbox_i2c_rtc_probe(struct udevice *dev)
+{
+       const u8 mac[] = { 0x02, 0x00, 0x11, 0x22, 0x33, 0x48 };
+       struct sandbox_i2c_rtc_plat_data *plat = dev_get_plat(dev);
+
+       memcpy(&plat->reg[0x40], mac, sizeof(mac));
+       return 0;
+}
+
 static const struct udevice_id sandbox_i2c_rtc_ids[] = {
        { .compatible = "sandbox,i2c-rtc-emul" },
        { }
@@ -213,6 +222,7 @@ U_BOOT_DRIVER(sandbox_i2c_rtc_emul) = {
        .id             = UCLASS_I2C_EMUL,
        .of_match       = sandbox_i2c_rtc_ids,
        .bind           = sandbox_i2c_rtc_bind,
+       .probe          = sandbox_i2c_rtc_probe,
        .priv_auto      = sizeof(struct sandbox_i2c_rtc),
        .plat_auto      = sizeof(struct sandbox_i2c_rtc_plat_data),
        .ops            = &sandbox_i2c_rtc_emul_ops,
This page took 0.021824 seconds and 4 git commands to generate.