summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-17 07:20:07 +0300
committerSimon Glass <sjg@chromium.org>2020-12-19 06:32:21 +0300
commit8b85dfc675f12de8d04126c07f3c796965b990c2 (patch)
tree9b8d6df956b02734a1b910b0a4c072e1e80b672a /board
parent0b2fa98aa5e5dbdac4f5e2b2f67a34cc34dcc6b8 (diff)
downloadu-boot-8b85dfc675f12de8d04126c07f3c796965b990c2.tar.xz
dm: Avoid accessing seq directly
At present various drivers etc. access the device's 'seq' member directly. This makes it harder to change the meaning of that member. Change access to go through a function instead. The drivers/i2c/lpc32xx_i2c.c file is left unchanged for now. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/xilinx/versal/board.c12
-rw-r--r--board/xilinx/zynqmp/zynqmp.c12
2 files changed, 12 insertions, 12 deletions
diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
index 912c1143a8..2782a346f0 100644
--- a/board/xilinx/versal/board.c
+++ b/board/xilinx/versal/board.c
@@ -153,9 +153,9 @@ int board_late_init(void)
puts("Boot from EMMC but without SD1 enabled!\n");
return -1;
}
- debug("mmc1 device found at %p, seq %d\n", dev, dev->seq);
+ debug("mmc1 device found at %p, seq %d\n", dev, dev_seq(dev));
mode = "mmc";
- bootseq = dev->seq;
+ bootseq = dev_seq(dev);
break;
case SD_MODE:
puts("SD_MODE\n");
@@ -164,10 +164,10 @@ int board_late_init(void)
puts("Boot from SD0 but without SD0 enabled!\n");
return -1;
}
- debug("mmc0 device found at %p, seq %d\n", dev, dev->seq);
+ debug("mmc0 device found at %p, seq %d\n", dev, dev_seq(dev));
mode = "mmc";
- bootseq = dev->seq;
+ bootseq = dev_seq(dev);
break;
case SD1_LSHFT_MODE:
puts("LVL_SHFT_");
@@ -179,10 +179,10 @@ int board_late_init(void)
puts("Boot from SD1 but without SD1 enabled!\n");
return -1;
}
- debug("mmc1 device found at %p, seq %d\n", dev, dev->seq);
+ debug("mmc1 device found at %p, seq %d\n", dev, dev_seq(dev));
mode = "mmc";
- bootseq = dev->seq;
+ bootseq = dev_seq(dev);
break;
default:
mode = "";
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 731285a736..047b070485 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -596,10 +596,10 @@ int board_late_init(void)
puts("Boot from EMMC but without SD0 enabled!\n");
return -1;
}
- debug("mmc0 device found at %p, seq %d\n", dev, dev->seq);
+ debug("mmc0 device found at %p, seq %d\n", dev, dev_seq(dev));
mode = "mmc";
- bootseq = dev->seq;
+ bootseq = dev_seq(dev);
break;
case SD_MODE:
puts("SD_MODE\n");
@@ -610,10 +610,10 @@ int board_late_init(void)
puts("Boot from SD0 but without SD0 enabled!\n");
return -1;
}
- debug("mmc0 device found at %p, seq %d\n", dev, dev->seq);
+ debug("mmc0 device found at %p, seq %d\n", dev, dev_seq(dev));
mode = "mmc";
- bootseq = dev->seq;
+ bootseq = dev_seq(dev);
env_set("modeboot", "sdboot");
break;
case SD1_LSHFT_MODE:
@@ -628,10 +628,10 @@ int board_late_init(void)
puts("Boot from SD1 but without SD1 enabled!\n");
return -1;
}
- debug("mmc1 device found at %p, seq %d\n", dev, dev->seq);
+ debug("mmc1 device found at %p, seq %d\n", dev, dev_seq(dev));
mode = "mmc";
- bootseq = dev->seq;
+ bootseq = dev_seq(dev);
env_set("modeboot", "sdboot");
break;
case NAND_MODE: