diff options
author | Simon Glass | 2020-12-16 21:20:07 -0700 |
---|---|---|
committer | Simon Glass | 2020-12-18 20:32:21 -0700 |
commit | 8b85dfc675f12de8d04126c07f3c796965b990c2 (patch) | |
tree | 9b8d6df956b02734a1b910b0a4c072e1e80b672a /board/xilinx | |
parent | 0b2fa98aa5e5dbdac4f5e2b2f67a34cc34dcc6b8 (diff) |
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/xilinx')
-rw-r--r-- | board/xilinx/versal/board.c | 12 | ||||
-rw-r--r-- | board/xilinx/zynqmp/zynqmp.c | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c index 912c1143a8a..2782a346f07 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 731285a7367..047b0704859 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: |