summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2013-10-07usb: Fix error handling in musb_hcd.cAndrew Murray
The wait_until_[rx|tx]ep_ready functions return a u8 to indicate success containing the value 0, 1 or -1. This patch changes the return type to an int to accommodate the negative return values. These functions are used in the file using calls such as if (!wait_until... Where a -1 is returned it is mishandled and treated as success instead of a CRC error. This patch addresses this. Cc: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@ti.com> Signed-off-by: Andrew Murray <amurray@embedded-bits.co.uk> Acked-by: Marek Vasut <marex@denx.de>
2013-10-02Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'Albert ARIBAUD
2013-09-20net, phy, cpsw: fix NULL pointer deferenceHeiko Schocher
if phy_connect() did not find a phy, phydev is NULL and following code in cpsw_phy_init() crashes. Fix this. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mugunthan V N <mugunthanvnm@ti.com> Cc: Tom Rini <trini@ti.com> Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
2013-09-20net: fec_mxc: Fix timeouts during tftp transferFabio Estevam
Performing tftp transfers on mx28 results in random timeouts. Hector Palacios and Robert Hodaszi analyzed the root cause being related to the wrong alignment of the 'buff' buffer inside fec_recv(). Benoît Thébaudeau provided an excellent analysis of the alignment bug that is present on older versions, such as GCC 4.5.4: http://marc.info/?l=u-boot&m=137942904906131&w=2 Use ALLOC_CACHE_ALIGN_BUFFER() to avoid alignment issues from older GCC versions. Reported-by: Hector Palacios <hector.palacios@digi.com> Tested-by: Oliver Metz <oliver@freetz.org> Tested-by: Hector Palacios <hector.palacios@digi.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Marek Vasut <marex@denx.de> Tested-by: Marek Vasut <marex@denx.de>
2013-09-20net: fec_mxc: Add support for mx6 solo-liteFabio Estevam
Similarly as mx25 and mx53, mx6solo-lite needs to setup the MII gasket for RMII mode. Add support for mx6solo-lite. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-09-20mmc: fsl_esdhc: Check the result from malloc()Fabio Estevam
malloc can fail, so we should better check its return value before using it. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-09-20drivers/power/pmic: Add tps65910 driverPhilip, Avinash
Add a driver for the TPS65910 PMIC that is found in the AM335x GP EVM, AM335x EVM SK and others. Signed-off-by: Philip, Avinash <avinashphilip@ti.com> [trini: Split and rework Avinash's changes into new drivers/power framework] Signed-off-by: Tom Rini <trini@ti.com>
2013-09-20drivers/power/pmic: Add tps65217 driverGreg Guyotte
Add a driver for the TPS65217 PMIC that is found in the Beaglebone family of boards. Signed-off-by: Greg Guyotte <gguyotte@ti.com> [trini: Split and rework Greg's changes into new drivers/power framework] Signed-off-by: Tom Rini <trini@ti.com>
2013-09-19drivers: s3c44b0_rtc: delete an unused driverMasahiro Yamada
Since commit 5dc5f36 removed B2 board support, there are no boards enabling s3c44b0_rtc. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Andrea Scian <andrea.scian@dave-tech.it>
2013-09-19drivers: serial_s3c44b0: delete an unused driverMasahiro Yamada
Since commit 5dc5f36 removed B2 board support, there are no boards enabling serial_s3c44b0. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Andrea Scian <andrea.scian@dave-tech.it>
2013-09-19drivers: s3c44b0_i2c: delete an unused driverMasahiro Yamada
Since commit 5dc5f36 removed B2 board support, there are no boards enabling s3c44b0_i2c. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Andrea Scian <andrea.scian@dave-tech.it> Acked-by: Heiko Schocher <hs@denx.de>
2013-09-13Merge branch 'master' of git://git.denx.de/u-boot-armStefano Babic
Conflicts: MAINTAINERS boards.cfg Signed-off-by: Stefano Babic <sbabic@denx.de>
2013-09-12Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini
2013-09-11Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'Albert ARIBAUD
Conflicts: tools/Makefile
2013-09-11mxs_nand: Fix ECC strength for NAND flash with OOB size of 224Elie De Brauwer
On a board with an i.mx28 and a Micron MT29F4G08ABAEAH4, Linux says: NAND device: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron MT29F4G08ABAEAH4), 512MiB, page size: 4096, OOB size: 224) the ECC strength is 16. root@(none):/sys/devices/virtual/mtd/mtd0# for i in ecc_strength oobsize subpagesize; do echo $i = `cat $i`; done ecc_strength = 16 oobsize = 224 subpagesize = 4096 The ECC strength was not properly discovered by U-Boot causing the data written by Linux to return an -74 (EBADMSG) when read from U-Boot. This patch fixes mxs_nand_get_ecc_strength() to function in case of a NAND flash with page_data_size = 4096 and page_oob_size= 224. Signed-off-by: Elie De Brauwer <eliedebrauwer@gmail.com> Acked-by: Scott Wood <scottwood@freescale.com>
2013-09-07Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini
2013-09-06ahci: convert to use libata functions and definitionsRob Herring
libata already has similar functions as implemented in the ahci code. Refactor the code to use the libata variants and remove the dependency on ata.h. Convert some defines to use the version from libata.h. Also, remove some unnecessary memset's of bss data. This is a step toward hopefully merging ahci.c and dw_ahsata.c which are essentially the same driver. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Reviewed-by: Tom Rini <trini@ti.com>
2013-09-06ahci: increase spin-up timeout to 20 secRob Herring
Based on Linux libata code, most drives are less than 10 sec, but some need up to 20 sec. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Reviewed-by: Tom Rini <trini@ti.com>
2013-09-06ahci: handle COMINIT received during spin-upRob Herring
Some Intel SSDs can send a COMINIT after the initial COMRESET. This causes the link to go down and we need to re-initialize the link. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-09-06ahci: move link bring-up handling to separate functionRob Herring
Move the link bring-up handling to a separate weak function in order to allow platforms to override it. This is needed on highbank platform which needs special phy handling. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-09-06ahci: add defines for PORT_SCR_STAT register bitsRob Herring
Replace hard-coded register values with proper defines for PORT_SCR_STAT register. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-09-06ahci: fix memory leak in ata_scsiop_inquiryRob Herring
This fixes a memory leak when scsi inquiry fails. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Reviewed-by: Tom Rini <trini@ti.com>
2013-09-06ahci: fix unaligned accessRob Herring
gcc 4.7 will generate unaligned accesses to local char arrays, so make them static to avoid that. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Reviewed-by: Tom Rini <trini@ti.com>
2013-09-06ahci: use ports implemented map instead of num_portsRichard Gibbs
The AHCI driver was incorrectly using the Capabilities register NP (number of ports) field to determine which ports to activate. This commit changes it to correctly use the PORTS_IMPL register as a port map. Signed-off-by: Richard Gibbs <richard.gibbs@calxeda.com> Reviewed-by: Tom Rini <trini@ti.com>
2013-09-05Merge branch 'u-boot-atmel/master' into 'u-boot-arm/master'Albert ARIBAUD
2013-09-05Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'Albert ARIBAUD
Conflicts: drivers/serial/serial.c The conflict above was a trivial case of adding one init function in each branch, and manually resolved in merge.
2013-09-04mtd: atmel_nand: pmecc: fix bug fail to correct bit error in 1024-bytes sectorWu, Josh
The PMECC use BCH algorithm to correct error. In BCH algorithm, the primitive polynomial value is GF(2^13) for 512-bytes sector size. And it is GF(2^14) for 1024-bytes sector size. This patch will choose correct degree of the remainders (13 or 14) for different sector size. Tested in AT91SAM9X5-EK with MLC nand flash. More detail can be refered to section 5.4.1 of: AT91SAM ARM-based Embedded MPU Application Note <http://www.atmel.com/Images/doc11127.pdf> Signed-off-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2013-09-04Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'Albert ARIBAUD
2013-09-04Merge branch 'u-boot-atmel/master' into 'u-boot-arm/master'Albert ARIBAUD
2013-08-30drivers:power:max77686: add function to set voltage and modePiotr Wilczek
This patch add new functions to pmic max77686 to set voltage and mode. Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Rajeshwari Shinde <rajeshwari.s@samsung.com> Acked-by: Tom Rini <trini@ti.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2013-08-28video: add formike lcd panel initHeiko Schocher
Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Anatolij Gustschin <agust@denx.de> Cc: Tom Rini <trini@ti.com> Acked-by: Anatolij Gustschin <agust@denx.de>
2013-08-28arm, am335x: add watchdog supportHeiko Schocher
Add TI OMAP 16xx & 24xx/34xx 32KHz (non-secure) watchdog support. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Tom Rini <trini@ti.com> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
2013-08-26usb: ehci-mx5: Use 'bool' instead of 'unsigned char'Fabio Estevam
The 'enable' argument can be better expressed as boolean. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>
2013-08-26usb: ehci-mx5: Remove unneeded write to cscmr1 registerFabio Estevam
Currently we have the following behavior in ehci_hcd_init() - Read csmr1 register, clear bit 26 and then set bit 26. However a little bit later we call set_usb_phy_clk() which clears bit 26, so let's get rid of the unnecessary code. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-08-26usb:dfu:g_dnl: Refactoring the string definition code for g_dnl driverLukasz Majewski
The manufacturer and product IDs are dynamically assigned when gadget is bind. Now the IDs aren't assigned at struct g_dnl_string_defs definition. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de> Cc: "Egli, Samuel" <samuel.egli@siemens.com>
2013-08-26usb:dfu:g_dnl: Change number of exported configurations at composite gadgetLukasz Majewski
USB composite gadget (g_dnl) supports only one configuration. Due to that the corresponding field - bConfigurationValue has been changed. Moreover more descriptive names were chosen for relevant fields. Windows XP setup: - Thesyscon USB Descriptor Dumper - zadig_xp program for WinUSB installation (which is required by dfu-util) - dfu-util for windows (version 0.6) - TRATS target connected via USB hub to test Win XP machine. Tested at: Trats - Exynos4210 Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de> Cc: "Egli, Samuel" <samuel.egli@siemens.com>
2013-08-26dfu, nand, ubi: add partubi alt settings for updating ubi partitionHeiko Schocher
updating an ubi partition needs a completely erased mtd partition, see: http://lists.infradead.org/pipermail/linux-mtd/2011-May/035416.html So, add partubi alt setting for the dfu_alt_info environment variable to mark this partition as an ubi partition. In case we update an ubi partition, we erase after flashing the image into the partition, the remaining sektors. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Pantelis Antoniou <panto@antoniou-consulting.com> Cc: Tom Rini <trini@ti.com> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Vasut <marex@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Scott Wood <scottwood@freescale.com>
2013-08-26ARM: OMAP: USB: Fix linker error when ULPI is not definedDan Murphy
Fix the linker error for missing ulpi_reset when ulpi is not defined in the board config. Signed-off-by: Dan Murphy <dmurphy@ti.com> Acked-by: Marek Vasut <marex@denx.de>
2013-08-26ARM: OMAP5: USB: Add OMAP5 common USB EHCI informationDan Murphy
* Enable the OMAP5 EHCI host clocks * Add OMAP5 EHCI register definitions * Add OMAP5 ES2 host revision Signed-off-by: Dan Murphy <dmurphy@ti.com>
2013-08-23mmc: mxsmmc: Enable MMC HC supportAmaury Pouly
Enable support for high-capacity eMMC and MMC cards. The MXS MMC driver has no problem with those. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Amaury Pouly <amaury.pouly@gmail.com> Cc: Andy Fleming <afleming@freescale.com> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Otavio Salvador <otavio@ossystems.com.br> Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>
2013-08-22nand_util: delete a useless variableMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-08-22gpio: atmel: add copyright and remove error header infoBo Shen
Signed-off-by: Bo Shen <voice.shen@atmel.com> Acked-by: Jens Scharsig <js_at_ng@scharsoft.de> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2013-08-22gpio: atmel: add gpio common API supportBo Shen
add gpio common API support for gpio command Signed-off-by: Bo Shen <voice.shen@atmel.com> [fix unnecessary cast] Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2013-08-22gpio: atmel: fix code to use pointer for pio portBo Shen
fix code to use pointer for pio port as the warning message suggested remove the warning message Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2013-08-22ARM: at91: atmel_nand: add code to check the ONFI parameter ECC requirementWu, Josh
1. if CONFIG_SYS_NAND_ONFI_DETECTION is defined, driver will check NAND flash's ecc minimum requirement in ONFI parameter. a) if CONFIG_PMECC_CAP, CONFIG_PMECC_SECTOR_SIZE are defined. then use it. Driver will display a WARNING if the values are different from ONFI parameters. b) if CONFIG_PMECC_CAP, CONFIG_PMECC_SECTOR_SIZE are not defined, then use the value from ONFI parameters. * If ONFI ECC parameters are in ONFI extended parameter page, since we are not support it, so assume the minimum ecc requirement is 2 bits in 512 bytes. * For non-ONFI support nand flash, also assume the minimum ecc requirement is 2 bits in 512 bytes. 2. if CONFIG_SYS_NAND_ONFI_DETECTION is not defined, just use CONFIG_PMECC_CAP and CONFIG_PMECC_SECTOR_SIZE. Signed-off-by: Josh Wu <josh.wu@atmel.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2013-08-22mtd: atmel_nand: alloc memory instead of use static array for pmecc dataWu, Josh
In this way, the pmecc corraction capbility can change in run time. Signed-off-by: Josh Wu <josh.wu@atmel.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2013-08-22linux/compat.h: move dev_err, dev_info and dev_dbg from usb driver to compat.hWu, Josh
Since kernel code current use many dev_xxx() instead of using printk. To compatible, move those dev_xxx from usb driver to linux/compat.h. Then all driver code can use dev_err, dev_info and dev_vdbg. This patch also removed duplicated macro definitions in usb driver. Signed-off-by: Josh Wu <josh.wu@atmel.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2013-08-22ARM: at91: atmel_nand: pmecc driver will select the galois table by sector sizeWu, Josh
Define the galois index table offset in chip head file. So user do not need to set by himself. Driver will set it correctly according to sector_size. Signed-off-by: Josh Wu <josh.wu@atmel.com> Acked-by: Scott Wood <scottwood@freescale.com> [rebased on master] Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2013-08-22net: macb: fix the following building warningBo Shen
fix the following building warning ---8>--- macb.c: In function 'macb_init': macb.c:400:14: warning: 'phydev' may be used uninitialized in this function macb.c:377:21: note: 'phydev' was declared here ---<8--- Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2013-08-21Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxTom Rini