summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* NAND: Really ignore bad blocks when scrubbingMarek Vasut2011-10-032-22/+9
| | | | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Scott Wood <scottwood@freescale.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de> [scottwood@freescale.com: use chip instead of redundant priv_nand] Signed-off-by: Scott Wood <scottwood@freescale.com>
* mxc_nand: fix a problem writing more than 32MBHelmut Raiger2011-10-031-1/+12
| | | | | | | | | | | | | | When writing 0x4000 to the unlockend_blkaddr register, large writes to a 2k page NAND sometimes fail. The current kernel driver writes 0xFFFF to this register for V2 of the nand controller. However on an i.MX31 this also fixes writes larger than 32MB. The datasheet is very unspecific, but (0x4000=16384)*2000 roughly fits the limits we're encountering with NAND writes. This problem might be NAND chip specific. Signed-off-by: Helmut Raiger <helmut.raiger@hale.at> Signed-off-by: Scott Wood <scottwood@freescale.com>
* mxc_nand: fixed some typos (cosmetic)Helmut Raiger2011-10-031-10/+9
| | | | | Signed-off-by: Helmut Raiger <helmut.raiger@hale.at> Signed-off-by: Scott Wood <scottwood@freescale.com>
* nand: increase chip_delay in mv kirkwood nand driverStefan Bigler2011-10-031-1/+1
| | | | | | | | | | | | | The new SAMSUNG NAND Flash K9F1G08U0D require a bigger chip_delay. The Data Transfer from Cell to Register is >= 35us. Other Vendors and older chips normally use >= 25us. To have enough margin 40us is selected. Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com> Signed-off-by: Holger Brunck <holger.brunck@keymile.com> cc: Prafulla Wadaskar <prafulla@marvell.com> cc: Stefan Roese <sr@denx.de> Signed-off-by: Scott Wood <scottwood@freescale.com>
* GCC4.6: Squash warning in vmt.cMarek Vasut2011-10-012-4/+7
| | | | | | | | | vmt.c: In function ‘ubi_free_volume’: vmt.c:681:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
* GCC4.6: Squash warning in nand_bbt.cMarek Vasut2011-10-011-4/+1
| | | | | | | | | nand_bbt.c: In function ‘search_bbt’: nand_bbt.c:465:6: warning: variable ‘bits’ set but not used [-Wunused-but-set-variable] Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Scott Wood <scottwood@freescale.com>
* GCC4.6: Squash warnings in ipu_disp.cMarek Vasut2011-10-012-57/+48
| | | | | | | | | | | | ipu_disp.c: In function ‘ipu_disp_set_global_alpha’: ipu_disp.c:1237:11: warning: variable ‘flow’ set but not used [-Wunused-but-set-variable] ipu_disp.c: In function ‘ipu_disp_set_color_key’: ipu_disp.c:1302:16: warning: variable ‘flow’ set but not used [-Wunused-but-set-variable] Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Stefano Babic <sbabic@denx.de>
* console: Squelch pre-console output in console functionsGraeme Russ2011-10-012-5/+1
| | | | | | | | | | There are some locations in the code which anticipate printf() being called before the console is ready by squelching printf() on gd->have_console. Move this squelching into printf(), vprintf(), puts() and putc(). Also make tstc() and getc() return 0 if console is not yet initialised Signed-off-by: Graeme Russ <graeme.russ@gmail.com> Tested-by: Simon Glass <sjg@chromium.org>
* ns16550: change to allow 32 bit access to registersDave Aldridge2011-10-011-0/+6
| | | | | | | | | | If CONFIG_SYS_NS16550_MEM32 is defined then 32 bit memory mapped access will be used to read/write the uart registers. This is especially useful for SoC devices that implement 16550 compatible uarts but that have peripheral access width constraints. Signed-off-by: Dave Aldridge <fovsoft@gmail.com>
* Merge branch 'sf' of git://git.denx.de/u-boot-blackfinWolfgang Denk2011-10-011-0/+8
|\ | | | | | | | | | | * 'sf' of git://git.denx.de/u-boot-blackfin: sf: eon: add support for EN25Q32B parts cmd_sf: add "update" subcommand to do smart SPI flash update
| * sf: eon: add support for EN25Q32B partsShaohui Xie2011-09-291-0/+8
| | | | | | | | | | Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | ATA: Squash warnings in mxc_ata.Marek Vasut2011-09-301-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | mxc_ata.c: In function ‘set_ata_bus_timing’: mxc_ata.c:118: warning: dereferencing type-punned pointer will break strict-aliasing rules mxc_ata.c:125: warning: dereferencing type-punned pointer will break strict-aliasing rules mxc_ata.c:129: warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Stefano Babic <sbabic@denx.de>
* | I2C: mxc_i2c reworkMarek Vasut2011-09-301-133/+289
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite the mxc_i2c driver. * This version is much closer to Linux implementation. * Fixes IPG_PERCLK being incorrectly used as clock source * Fixes behaviour of the driver on iMX51 * Clean up coding style a bit ;-) Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Jason Hui <jason.hui@linaro.org> Acked-by: Jason Liu <jason.hui@linro.org> Acked-by: Heiko Schocher <hs@denx.de> Tested-by: Jason Liu <jason.hui@linro.org>
* | FEC: Move imx_get_mac_from_fuse() definition to fec_mxc.hMarek Vasut2011-09-301-0/+2
| | | | | | | | | | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* | FEC: Squish "got MAC from fuse" message, make it debug()Marek Vasut2011-09-301-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* | FEC: Add timeout for chip resetMarek Vasut2011-09-301-4/+21
| | | | | | | | | | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* | FEC: Allow registering MII postconfiguration callbackMarek Vasut2011-09-302-1/+14
| | | | | | | | | | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* | FEC: Allow multiple FECesMarek Vasut2011-09-302-30/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows user to register multiple FEC controllers. To preserve compatibility with older boards, the mxcfec_register() call is still in place. To use multiple controllers, new macro is in place, the mxcfec_register_multi(), which takes more arguments. The syntax is: mxcfec_register_multi(bd, FEC ID, FEC PHY ID on the MII bus, base address); To disable the fecmxc_register() compatibility stuff, define the macro CONFIG_FEC_MXC_MULTI. This will remove the requirement for defining IMX_FEC_BASE and CONFIG_FEC_MXC_PHYADDR. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* | FEC: Abstract access to fec->eth in MII operationsMarek Vasut2011-09-301-8/+10
| | | | | | | | | | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* | FEC: Allow selection of MII mode via CONFIG_FEC_XCV_TYPEMarek Vasut2011-09-301-1/+5
| | | | | | | | | | | | | | | | | | | | The default is MII100, which was hardcoded previously in the driver. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* | FEC: Add RMII mode supportMarek Vasut2011-09-302-1/+5
| | | | | | | | | | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* | FEC: Kill mode select FIXME'sMarek Vasut2011-09-301-12/+14
| | | | | | | | | | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* | FEC: Use defined constant instead of magic numberMarek Vasut2011-09-301-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* | FEC: Use proper accessor to read register in debug callMarek Vasut2011-09-301-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* | cosmetic: fsl_pmic: cosmetic for the help messageJason Liu2011-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This is cosmetic patch for the help message: Before: pmic dump [numregs] dump registers After: pmic dump [numregs] - dump registers Signed-off-by: Jason Liu <jason.hui@linaro.org> Acked-by: Stefano Babic <sbabic@denx.de>
* | rtc, davinci: add support for davinci internal RTCHeiko Schocher2011-09-302-0/+126
| | | | | | | | | | | | | | Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Paulraj Sandeep <s-paulraj@ti.com> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* | net, davinci_emac: let the EMAC detect the PHYsHeiko Schocher2011-09-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | Once the MDIO state machine has been initialized and enabled, it starts polling all 32 PHY addresses on the MDIO bus, looking for an active PHY. Add a 5 ms delay, so all PHYs are for sure detected. This problem was detected on the cmc board with a KSZ8864 switch. Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* | net, davinci_emac: make less verbose - turn printf() into debug()Heiko Schocher2011-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PHY driver was too verbose and corrupted the boot message display like this: ... Net: Ethernet PHY: KSZ8873 @ 0x02 DaVinci-EMAC ... Turn printf() into debug() so we get the expected output again: ... Net: DaVinci-EMAC ... Signed-off-by: Heiko Schocher <hs@denx.de> cc: Paulraj Sandeep <s-paulraj@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* | net, davinci_emac: add KSZ8864 switchHeiko Schocher2011-09-301-0/+7
| | | | | | | | | | | | | | | | Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Paulraj Sandeep <s-paulraj@ti.com> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* | i2c, davinci: add i2c set speedHeiko Schocher2011-09-301-0/+5
| | | | | | | | | | | | | | Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Paulraj Sandeep <s-paulraj@ti.com> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* | mmc: omap: config VMMC, MMC1_PBIASBalaji T K2011-09-302-3/+35
| | | | | | | | | | | | | | | | | | | | Config VMMC voltage to 3V for MMC/SD card slot and PBIAS settings needed for OMAP4 Fixes MMC/SD detection on boot from eMMC. Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Aneesh V <aneesh@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* | mmc: omap: enable high capacityBalaji T K2011-09-301-1/+2
| | | | | | | | | | | | | | | | | | | | Enable high capacity to host capability. Fixes eMMC detection on boot from MMC/SD card. Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Aneesh V <aneesh@ti.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* | spl: add NAND Library to new SPLSimon Schwarz2011-09-304-4/+282
| | | | | | | | | | | | | | | | Adds NAND library to SPL. Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* | net: Adds Fast Ethernet Controller driver for Armada100Ajay Bhargav2011-09-303-0/+969
| | | | | | | | | | | | | | | | This patch adds support for Fast Ethernet Controller driver for Armada100 series. Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com> Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
* | gpio: Add GPIO driver framework for Marvell SoCsAjay Bhargav2011-09-303-0/+190
|/ | | | | | | | | This patch adds generic GPIO driver framework support for Marvell SoCs. To enable GPIO driver define CONFIG_MARVELL_GPIO and for GPIO commands define CONFIG_CMD_GPIO in your board configuration file. Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
* Revert "phylib: remove a couple of redundant code lines"Wolfgang Denk2011-09-281-2/+5
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 041c542219af7f31c372d89b4c7c6f4c8064a8ce. The lines removed by this commit weren't redundant. The logic is (and probably should be better commented): Find the intersection of the advertised capabilities of both sides of the link (lpa). From that intersection, find the highest capability we can run at (that will be the negotiated link). Now imagine that the intersection (lpa) is (LPA_100HALF | LPA_10FULL). The code will now set phydev->speed to 100, and phydev->duplex to 1, but this link does not support 100FULL. Kudos to Andy Fleming <afleming@gmail.com> for binging this to attention and for the explanation. Signed-off-by: Wolfgang Denk <wd@denx.de>
* ASIX: Fix buffer access in asix_get_phy_addr()Marek Vasut2011-09-241-1/+1
| | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
* sf: fix debug format string warningVadim Bendebury2011-09-211-1/+1
| | | | | | | | On some systems, we get a warning when %lu is used with size_t's, so use the correct format string. Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* ARMV7: OMAP: I2C driver: cosmetic: make checkpatch-compatibleMichael Jones2011-09-121-52/+53
| | | | | | Signed-off-by: Michael Jones <michael.jones@matrix-vision.de> Acked-by: Heiko Schocher <hs@denx.de> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* ARMV7: OMAP: Write more than 1 byte at a time in i2c_writeMichael Jones2011-09-121-78/+58
| | | | | | | | | | This allows the EEPROM layer to send a single i2c write command per page, and wait CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS between i2c write commands. Signed-off-by: Michael Jones <michael.jones@matrix-vision.de> Acked-by: Heiko Schocher <hs@denx.de> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* Minor coding style cleanup.Wolfgang Denk2011-09-111-11/+0
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* KS8695: convert KS8695 eth driver to CONFIG_MULTI_ETHGreg Ungerer2011-09-101-14/+28
| | | | | | | Trivial conversion of the ks8695eth driver to a CONFIG_MULTI_ETH type driver. Signed-off-by: Greg Ungerer <greg.ungerer@opengear.com>
* phylib: remove a couple of redundant code linesVladimir Zapolskiy2011-09-101-5/+2
| | | | | | | | This change slightly improves readability of the phydev speed/duplex assignment logic. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Acked-by: Detlev Zundel <dzu@denx.de>
* phylib: reset mii bus only if reset handler is registeredVladimir Zapolskiy2011-09-101-1/+2
| | | | | | | | This change allows to cope with a mii bus device registered using miiphy_register(), which doesn't assign a default reset handler. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Acked-by: Detlev Zundel <dzu@denx.de>
* smc911x: Fix build warningsWolfgang Denk2011-09-091-2/+2
| | | | | | | | | | | | Commit 6af1d41 "smc911x MII made available" was missing a few "const" qualifiers. Fix the resulting in build warnings: smc911x.c: In function 'smc911x_initialize': smc911x.c:297: warning: passing argument 2 of 'miiphy_register' from incompatible pointer type smc911x.c:297: warning: passing argument 3 of 'miiphy_register' from incompatible pointer type Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Helmut Raiger <helmut.raiger@hale.at>
* smc911x MII made availableHelmut Raiger2011-09-071-6/+30
| | | | | | | The driver already had the MII functions, but they have not been registered using miiphy_register(). Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
* Merge branch 'master' of git://git.denx.de/u-boot-mmcWolfgang Denk2011-09-073-1/+670
|\ | | | | | | | | | | * 'master' of git://git.denx.de/u-boot-mmc: ftsdc010: add support of ftsdc010 mmc controller mmc: Fix mmc_send_status()
| * ftsdc010: add support of ftsdc010 mmc controllerMacpaul Lin2011-09-042-0/+668
| | | | | | | | | | | | Faraday FTSDC010 controller is a SD/MMC controller for SoC chip. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
| * mmc: Fix mmc_send_status()Marek Vasut2011-09-041-1/+2
| | | | | | | | | | | | | | | | The mmc_send_status() function sets cmd.arg = 0. That's incorrect, so fix it. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Andy Fleming <afleming@freescale.com> Tested-by: Lei Wen <adrian.wenl@gmail.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-videoWolfgang Denk2011-09-071-1/+0
|\ \ | | | | | | | | | | | | * 'master' of git://git.denx.de/u-boot-video: VIDEO: mb86r0xgdc.c: fix warning: unused variable 'i'
OpenPOWER on IntegriCloud