]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: i2c: Fix cast of address to 32-bit value
authorSimon Glass <sjg@chromium.org>
Mon, 26 Sep 2016 03:33:30 +0000 (21:33 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 11 Oct 2016 03:55:33 +0000 (11:55 +0800)
This gives a build warning on 64-bit x86. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/i2c/intel_i2c.c

index a0182dc1cc1c3e1a08825bed81b3683442c05744..550a728cdcbce45230dbb71cd4c3009f96b26ca5 100644 (file)
@@ -248,11 +248,11 @@ static int intel_i2c_set_bus_speed(struct udevice *bus, unsigned int speed)
 static int intel_i2c_probe(struct udevice *dev)
 {
        struct intel_i2c *priv = dev_get_priv(dev);
-       u32 base;
+       ulong base;
 
        /* Save base address from PCI BAR */
-       priv->base = (u32)dm_pci_map_bar(dev, PCI_BASE_ADDRESS_4,
-                                        PCI_REGION_IO);
+       priv->base = (ulong)dm_pci_map_bar(dev, PCI_BASE_ADDRESS_4,
+                                          PCI_REGION_IO);
        base = priv->base;
 
        /* Set SMBus enable. */