summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2012-02-15mmc: fix card busy pollingJan Kloetzke
A MMC/SD card may always go into the programming state (and hence be busy) after a block write. Therefore always check the card state, even after single block writes. On the other hand there is no need to check the card status after a read. Also make sure that errors during busy polling are propagated upwards. Signed-off-by: Jan Kloetzke <jan.kloetzke@dspg.com> Cc: Andy Fleming <afleming@gmail.com>
2012-02-15Tegra: mmc: Fixed handling of interrupts in timeouts.Tom Warren
We are seeing occasional timeouts in the Tegra mmc code when we are reading from external MMC cards. These don't seem to be detrimental if they are handled properly. This CL properly clears the "normal interrupt status register" (norintsts) in error conditions. If we don't do this, when we come back into mmc_send_cmd() the register will still contain status from the last transaction. Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-02-15omap_hsmmc: Wait for CMDI to be clearTom Rini
Before we can send a command we need both the DATI (command inhibit on mmc_dat line) bit and CMDI (command inhibit on mmc_cmd line) are clear. The previous behavior of only checking on DATI was insufficient on some cards and incorrect behavior in any case. This makes the code check for both bits being clear and makes the error print more clear as to what happened. DATI_CMDDIS is removed as it was unused elsewhere in the code and stood for 'DATI is set, cmds are disabled still'. Fix originally spotted by Peter Bigot. Tested-by: Peter A. Bigot <bigotp@acm.org> Tested-by: Robert Nelson <robertcnelson@gmail.com> Signed-off-by: Tom Rini <trini@ti.com> Tested-by: Andreas Müller <schnitzeltony@googlemail.com>
2012-02-14usb_ether: fix typoPeter Meerwald
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
2012-02-13Merge branch 'sf' of git://git.denx.de/u-boot-blackfinWolfgang Denk
* 'sf' of git://git.denx.de/u-boot-blackfin: README: Add description of SPI Flash (SF) command configuration sf command: allow default bus and chip selects sf: eeprom_m95xxx: set a sane default timeout sf: eeprom_m95xxx: fix up style
2012-02-13Merge branch 'master' of git://git.denx.de/u-boot-blackfinWolfgang Denk
* 'master' of git://git.denx.de/u-boot-blackfin: Blackfin: pata_bfin: fix printf warning Blackfin: bfin_nand: mark local func static linkage.h: move from blackfin to common includes Blackfin: br4: new board port Blackfin: add in/out le32 variants post: add blackfin to the post_time_ms list Blackfin: bf537-stamp: drop board reset workaround Blackfin: pr1: new board port
2012-02-12sf: eeprom_m95xxx: set a sane default timeoutMike Frysinger
Every board currently defines this to the same value, so just default to that to avoid having to make everyone do the same thing. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12sf: eeprom_m95xxx: fix up styleMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12Blackfin: pata_bfin: fix printf warningMike Frysinger
pata_bfin.c: In function 'bfin_ata_identify': pata_bfin.c:887:2: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'lbaint_t' Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12Blackfin: bfin_nand: mark local func staticMike Frysinger
This devready func is only used in this driver, so mark it static. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12ehci-omap: Clean up added ehci-omap.cGovindraj.R
Clean up added ehci-omap.c and make it generic for re-use across omap-soc having same ehci ip block. Also pass the modes to be configured from board file and configure the ports accordingly. All usb layers are not cache aligned, till then keep cache off for usb ops as ehci will use internally dma for all usb ops. * Add a generic common header ehci-omap.h having common ip block data and reg shifts. * Rename and modify ehci-omap3 to ehci.h retain only conflicting sysc reg shifts remove others and move to common header file. * pass the board data for beagle/panda accordinly to use ehci ports. Acked-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
2012-02-12ehci-omap: driver for EHCI host on OMAP3Ilya Yanok
Taken from Beagle code. Tested on mcx board (AM3517-based). Signed-off-by: Ilya Yanok <yanok@emcraft.com> Tested-by: Stefano Babic <sbabic@denx.de>
2012-02-12usb: ulpi: Add omap-ulpi-view port supportGovindraj.R
Based on discussion from this thread [1]. Adding omap-view port that helps us in using the generic ulpi framework for any ulpi phy ops using the INSNREG05_ULPI viewport reg available on omap platform. Currently ehci ports are available on omap3/4 platforms so enable the same for beagle and panda, patch is tested on the same boards. Thanks to Igor Grinberg <grinberg@compulab.co.il> for reviewing the omap-ehci patches and suggesting this approach. [1]: http://www.mail-archive.com/u-boot@lists.denx.de/msg76076.html Tested-by: Stefano Babic <sbabic@denx.de> Acked-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
2012-02-12usb: ulpi: Extend the existing ulpi framework.Govindraj.R
Extend the existing ulpi viewport framework to pass the port number information for any ulpi ops. Fix the usage of ulpi api's accordingly. Tested-by: Stefano Babic <sbabic@denx.de> Acked-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
2012-02-12orion5x: add USB host ehci-marvell supportAlbert ARIBAUD
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
2012-02-12Remove kirkwood-specifics from marvell EHCI driverAlbert ARIBAUD
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
2012-02-12Rename ehci-kirkwood as ehci-marvellAlbert ARIBAUD
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2012-02-12kirkwood_spi: correct access to irq_mask registerIan Campbell
Problem appears to have been present since day one but masked because alignment aborts were not enabled. ca4b55800ed7 "arm, arm926ejs: always do cpu critical inits" turned on alignment aborts and uncovered this latent problem. Signed-off-by: Ian Campbell <ijc@hellion.org.uk> Acked-By: Jason Cooper <u-boot@lakedaemon.net> Tested-By: Holger Brunck <holger.brunck@keymile.com> Cc: Prafulla Wadaskar <prafulla@marvell.com> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
2012-02-12mx28: fix i.MX28 spi driverMatthias Fuchs
The generic spi flash driver (drivers/mtd/spi/spi_flash.c) uses the spi low level driver's spi_xfer() function with len=0 to deassert the SPI flash' chip select. But the i.MX28 spi driver rejects this call due to len=0. This patch implements an exception for len=0 with the SPI_XFER_END flag set. This results in an extra read with the chip select being deasserted afterwards. There seems to be no way to deassert the signal by hand. Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu> Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
2012-02-12mmc: access mxcmmc from mx31 boardsHelmut Raiger
This patch modifies mxcmmc.c to be used not only by i.MX27 but also by i.MX31 boards. Both use the same SD controller, but have different clock set-ups. The i.MX27 imx_get_XXXclock functions are made static to generic.c and a public mxc_get_clock() function is provided. Pins, base address and prototypes for an i.MX31 specific board_init_mmc() are provided. Some of the i.MX27 clock getters are unused and marked as such to avoid warnings (./MAKEALL -s mx27), but the code was left in for future use. Signed-off-by: Helmut Raiger <helmut.raiger@hale.at> Acked-by: Stefano Babic <sbabic@denx.de>
2012-02-12tegra: mmc: Support operation with dcache enabledSimon Glass
When the data cache is enabled we must flush on write and invalidate on read. We also check that buffers are aligned to data cache lines boundaries. With recent work in U-Boot this should generally be the case but the warnings will catch problems. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-02-11Merge branch 'master' of git://git.denx.de/u-boot-cfi-flashWolfgang Denk
* 'master' of git://git.denx.de/u-boot-cfi-flash: add STM29F400BB to table of supported legacy flashs * Fix: watchdog timed out, if flash blank (0xFF) blocks
2012-02-11Merge branch 'master' of git://git.denx.de/u-boot-nand-flashWolfgang Denk
* 'master' of git://git.denx.de/u-boot-nand-flash: nand/fsl_elbc: Convert to self-init nand: Introduce CONFIG_SYS_NAND_SELF_INIT nand_spl: store ecc data on the stack mtd/nand: Add ONFI support for FSL NAND controller nand: make 1-bit software ECC configurable nand: Sanitize ONFI strings. nand: Merge changes to BBT from Linux nand driver nand: Merge changes from Linux nand driver nand: cleanup whitespace nand: Add more NAND types from Linux nand driver nand: Merge BCH code from Linux nand driver NAND: Remove additional (CONFIG_SYS)_NAND_MAX_CHIPS NAND: remove NAND_MAX_CHIPS definitions nand_spl_simple: store ecc data on the stack
2012-02-09add STM29F400BB to table of supported legacy flashsDavid Müller (ELSOFT AG)
Signed-off-by: David Mueller <d.mueller@elsoft.ch> Signed-off-by: Stefan Roese <sr@denx.de>
2012-02-09* Fix: watchdog timed out, if flash blank (0xFF) blocksJens Scharsig (BuS Elektronik)
The current implementation of cfi_flash uses udelay to reset watchdog. If several blocks are blank (0xff filled) the watchdog timed out. The reason is, udelay is never called, if flash device is ready to fast. e.g. mw.w $(copy_addr) FFFF 10000;cp.b $(copy_addr) 10880000 20000 -> watchdog timed out mw.w $(copy_addr) 0000 10000;cp.b $(copy_addr) 10880000 20000 -> watchdog not timed out This patch adds an extra watchdog reset in front of flash ready check. Signed-off-by: Jens Scharsig (BuS Elektronik) <esw@bus-elektronik.de> Signed-off-by: Stefan Roese <sr@denx.de>
2012-01-26nand/fsl_elbc: Convert to self-initScott Wood
This driver doesn't yet make use of the added flexibility (not that that should stop anyone from converting...), but it will with the in-progress hack to support 4k-page NAND. Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26nand: Introduce CONFIG_SYS_NAND_SELF_INITScott Wood
This allows a driver to run code between nand_scan_ident() and nand_scan_tail(), among other things. See the additions to doc/README.nand for details. To allow a gradual transition, Boards that don't set CONFIG_SYS_NAND_SELF_INIT will still be initialized the old way, but new drivers should not require this, and existing drivers should be converted when convenient. Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26mtd/nand: Add ONFI support for FSL NAND controllerShengzhou Liu
- fix NAND_CMD_READID command for ONFI detect. - add NAND_CMD_PARAM command to read the ONFI parameter page. Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26nand: make 1-bit software ECC configurableChristian Hitz
The software ECC algorithm is not necessary when hardware ECC is available and can be left out for a smaller image size. Enable with CONFIG_MTD_ECC_SOFT. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26nand: Sanitize ONFI strings.Christian Hitz
[backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] This is part of the synchronization with the nand driver to the Linux 3.0 state. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26nand: Merge changes to BBT from Linux nand driverChristian Hitz
[backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] This patch synchronizes the nand driver with the Linux 3.0 state. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26nand: Merge changes from Linux nand driverChristian Hitz
[backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] This patch synchronizes the nand driver with the Linux 3.0 state. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> [scottwood@freescale.com: minor fixes] Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26nand: cleanup whitespaceChristian Hitz
Bring up to date with corresponding file from linux. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26nand: Add more NAND types from Linux nand driverChristian Hitz
[backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] This patch merges the additional NAND flash types from the 3.0 Linux kernel. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26nand: Merge BCH code from Linux nand driverChristian Hitz
[backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] This patch merges the BCH ECC algorithm from the 3.0 Linux kernel. This enables U-Boot to support modern NAND flash chips that require more than 1-bit of ECC in software. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26nand_spl_simple: store ecc data on the stackStefano Babic
Currently nand_spl_simple puts it's temp data at 0x10000 offset in SDRAM which is likely to contain already loaded data. The patch saves the oob data and the ecc on the stack replacing the fixed address in RAM. Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Ilya Yanok <yanok@emcraft.com> CC: Scott Wood <scottwood@freescale.com> CC: Tom Rini <tom.rini@gmail.com> CC: Simon Schwarz <simonschwarzcor@googlemail.com> CC: Wolfgang Denk <wd@denx.de> Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-23ARM: AM33XX: Add AM33XX I2C driver supportPatil, Rachna
1. Compliant with Philips I2C specification version 2.1 2. Supports upto 100Kbps in standard mode Signed-off-by: Chandan Nath <chandan.nath@ti.com> Signed-off-by: Patil, Rachna <rachna@ti.com>
2012-01-23ARM: I2C: I2C Multi byte address supportPatil, Rachna
Existing OMAP I2C driver does not support address length greater than one. Hence this patch is to add support for 2 byte address read/write. Signed-off-by: Philip, Avinash <avinashphilip@ti.com> Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com> Signed-off-by: Patil, Rachna <rachna@ti.com>
2012-01-16drivers/i2c/omap24xx_i2c.c: move all local variables to SRAMAndreas Müller
At old overo boards TWL4030 RTC irq is connected to gpio112. Unfortunately this pin is also used for revision detection. Therefore we need to send shut-up to TWL4030 to avoid reading wrong revision. In SPL this must be done before SDRAM is set up because the type of SDRAM is revision dependent. By this patch it is ensured that all variables used by omap24xx_i2c.c are located in SRAM. Signed-off-by: Andreas Müller <schnitzeltony@gmx.de> Acked-by: Heiko Schocher <hs@denx.de> Signed-off-by: Tom Rini <trini@ti.com>
2012-01-16drivers/i2c/omap24xx_i2c.c: replace printf with one argument by putsAndreas Müller
Signed-off-by: Andreas Müller <schnitzeltony@gmx.de> Acked-by: Heiko Schocher <hs@denx.de>
2012-01-16net: imx: Add multi-FEC support for imx_get_mac_from_fuseFabio Estevam
Add multi-FEC support for imx_get_mac_from_fuse by passing dev_id as a parameter. This feature is important on mx28 SoC for example that has two FEC ports. Cc: Ben Warren <biggerbadderben@gmail.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de>
2012-01-16fec: add the i.mx6q enet driver supportJason Liu
Cc: Stefano Babic <sbabic@denx.de> Signed-off-by: Jason Liu <jason.hui@linaro.org> Acked-by: Stefano Babic <sbabic@denx.de>
2012-01-13Merge branch 'master' of git://git.denx.de/u-boot-mpc83xxWolfgang Denk
* 'master' of git://git.denx.de/u-boot-mpc83xx: mpc8313erdb: fix mtdparts address powerpc/83xx/km: add support for 8321 based tuge1 board powerpc/83xx/km: merge tuxa and tuda1 boards to tuxx1 powerpc/83xx/km: remove obsolete defines for tuda1 powerpc/83xx/km: update SDRAM parameters for km8321 boards mpc8313erdb: Enable GPIO support on the MPC8313E RDB mpc83xx: Add a GPIO driver for the MPC83XX family gpio: Replace ARM gpio.h with the common API in include/asm-generic gpio: Modify common gpio.h to more closely match Linux
2012-01-09mpc83xx: Add a GPIO driver for the MPC83XX familyJoe Hershberger
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2012-01-09gpio: Replace ARM gpio.h with the common API in include/asm-genericJoe Hershberger
ARM boards should use the generic GPIO API This means changing gpio to unsigned type Remove the unused gpio_toggle() function which is not part of the API Comment that free should not modify pin state Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com> fixed merge conflict in da8xx_gpio.c, tegra2_gpio.c, and extended to the new mxs_gpio.c. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
2012-01-08fsl_esdhc: fix PIO mode transfersIra Snyder
The pointer to the registers used to control the Freescale ESDHC MMC controller is not initialized correctly when using PIO mode. This is fixed by initializing the pointer in the same way as all other sites within the driver. Examining the commit history shows that this was broken at introduction due to a code change in upstream U-Boot to support the mx51 processor family. Reported-by: Jim Lentz <JLentz@zhone.com> Cc: Andy Fleming <afleming@freescale.com> Cc: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
2012-01-08mmc: tegra2: Implement card-detect hook.Thierry Reding
On Tegra2, card-detection is implemented by passing the card-detection GPIOs to the MMC driver at initialization time. Instead of implementing the board_mmc_getcd() function, use the card-detect hook and allow boards to override it by providing their own board_mmc_getcd() implementation. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
2012-01-08mmc: fsl_esdhc: Implement card-detect hook.Thierry Reding
This card-detect hook probably doesn't work. Perhaps somebody with more knowledge about the hardware can comment on this. I think that perhaps even the complete code from esdhc_init() could go into the getcd() function instead or mmc_getcd() needs to be called at some later time after mmc_init(), which, however, would require many other drivers to change. In addition to implementing the hook, this patch also removes the call to the board_mmc_getcd() function which is now called from the MMC framework and is no longer required here. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Jason Liu <jason.hui@linaro.org>
2012-01-08mmc: Implement card detection.Thierry Reding
Check for card detect each time an MMC/SD device is initialized. If card detection is not implemented, this code behaves as before and continues assuming a card is present. If no card is detected, has_init is reset for the MMC/SD device (to force initialization next time) and an error is returned. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Jason Liu <jason.hui@linaro.org>
2012-01-08mmc: Change board_mmc_getcd() function prototype.Thierry Reding
The new API no longer uses the extra cd parameter that was used to store the card presence state. Instead, this information is returned via the function's return value. board_mmc_getcd() returns -1 to indicate that no card-detection mechanism is implemented; 0 indicates that no card is present and 1 is returned if it was detected that a card is present. The rationale for this change can be found in the following email thread: http://lists.denx.de/pipermail/u-boot/2011-November/110180.html In summary, the old API was not consistent with the rest of the MMC API which always passes a struct mmc as the first parameter. Furthermore the cd parameter was used to mean "card absence" in some implementations and "card presence" in others. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Jason Liu <jason.hui@linaro.org>