diff options
author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-07-30 10:07:08 +0200 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-07-30 10:07:08 +0200 |
commit | b2b15ebb66f0e7958dff8916077da0aceb2982a8 (patch) | |
tree | 33ad7fe298698b4b59d53751b6b050e7e86dea34 /drivers | |
parent | b8ec9fb736abd99bff071bdf809951ea1b8a5dff (diff) | |
parent | 5c374c9ee16fee2bf68533cc4010b3c0df21f783 (diff) | |
download | u-boot-imx-b2b15ebb66f0e7958dff8916077da0aceb2982a8.zip u-boot-imx-b2b15ebb66f0e7958dff8916077da0aceb2982a8.tar.gz u-boot-imx-b2b15ebb66f0e7958dff8916077da0aceb2982a8.tar.bz2 |
Merge branch 'hammerhead' of git://git.denx.de/u-boot-avr32
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/fsl_i2c.c | 9 | ||||
-rw-r--r-- | drivers/usb/usbdcore.c | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c index 9f2c1ec..9d5df8a 100644 --- a/drivers/i2c/fsl_i2c.c +++ b/drivers/i2c/fsl_i2c.c @@ -143,12 +143,15 @@ void i2c_init(int speed, int slaveadd) { struct fsl_i2c *dev; + unsigned int temp; dev = (struct fsl_i2c *) (CFG_IMMR + CFG_I2C_OFFSET); writeb(0, &dev->cr); /* stop I2C controller */ udelay(5); /* let it shutdown in peace */ - i2c_bus_speed[0] = set_i2c_bus_speed(dev, gd->i2c1_clk, speed); + temp = set_i2c_bus_speed(dev, gd->i2c1_clk, speed); + if (gd->flags & GD_FLG_RELOC) + i2c_bus_speed[0] = temp; writeb(slaveadd << 1, &dev->adr); /* write slave address */ writeb(0x0, &dev->sr); /* clear status register */ writeb(I2C_CR_MEN, &dev->cr); /* start I2C controller */ @@ -158,7 +161,9 @@ i2c_init(int speed, int slaveadd) writeb(0, &dev->cr); /* stop I2C controller */ udelay(5); /* let it shutdown in peace */ - i2c_bus_speed[1] = set_i2c_bus_speed(dev, gd->i2c2_clk, speed); + temp = set_i2c_bus_speed(dev, gd->i2c2_clk, speed); + if (gd->flags & GD_FLG_RELOC) + i2c_bus_speed[1] = temp; writeb(slaveadd << 1, &dev->adr); /* write slave address */ writeb(0x0, &dev->sr); /* clear status register */ writeb(I2C_CR_MEN, &dev->cr); /* start I2C controller */ diff --git a/drivers/usb/usbdcore.c b/drivers/usb/usbdcore.c index 808da9f..53ed669 100644 --- a/drivers/usb/usbdcore.c +++ b/drivers/usb/usbdcore.c @@ -552,7 +552,7 @@ struct urb *usbd_alloc_urb (struct usb_device_instance *device, struct urb *urb; if (!(urb = (struct urb *) malloc (sizeof (struct urb)))) { - usberr (" F A T A L: malloc(%u) FAILED!!!!", + usberr (" F A T A L: malloc(%zu) FAILED!!!!", sizeof (struct urb)); return NULL; } |