]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: dwc3-generic: Add the size of regs property to glue structure
authorKunihiko Hayashi <hayashi.kunihiko@socionext.com>
Mon, 20 Feb 2023 05:50:29 +0000 (14:50 +0900)
committerMarek Vasut <marex@denx.de>
Wed, 22 Feb 2023 18:40:11 +0000 (19:40 +0100)
Add the size of regs property to the glue structure to correctly
specify the register region to map.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Reviewed-by: Marek Vasut <marex@denx.de>
drivers/usb/dwc3/dwc3-generic.c
drivers/usb/dwc3/dwc3-generic.h

index 4576390ec7cde56b19b982c4f54e60d110d79493..acbf7acb1918d2d1d12b7902bf26d6f32d112022 100644 (file)
@@ -542,7 +542,7 @@ int dwc3_glue_probe(struct udevice *dev)
                phy.dev = NULL;
        }
 
-       glue->regs = dev_read_addr(dev);
+       glue->regs = dev_read_addr_size_index(dev, 0, &glue->size);
 
        ret = dwc3_glue_clk_init(dev, glue);
        if (ret)
index 824f678841a8f846da0504c0ed3115edb2e81935..40902c8923f57d05ebd9b0941c24b864eb87b276 100644 (file)
@@ -17,6 +17,7 @@ struct dwc3_glue_data {
        struct clk_bulk         clks;
        struct reset_ctl_bulk   resets;
        fdt_addr_t regs;
+       fdt_size_t size;
 };
 
 struct dwc3_glue_ops {