summaryrefslogtreecommitdiff
path: root/drivers
Commit message (Collapse)AuthorAgeLines
* NAND: Fix misplaced return statement in nand_{read,write}_skip_bad().Scott Wood2008-11-25-6/+6
| | | | | | | | This caused the operation to be needlessly repeated if there were no bad blocks and no errors. Signed-off-by: Valeriy Glushkov <gvv@lstec.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* Merge branch 'master' of git://git.denx.de/u-boot-armWolfgang Denk2008-11-25-67/+64
|\
| * ARM: OMAP: Convert IO macrosDirk Behme2008-11-21-67/+64
| | | | | | | | | | | | Convert IO macros to readx/writex. Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-ubiWolfgang Denk2008-11-25-0/+12566
|\ \
| * | mtd: Remove a printf() from add_mtd_device().Piotr Ziecik2008-11-24-2/+0
| | | | | | | | | | | | | | | | | | | | | Remove a printf() from add_mtd_device(), which produces spurious output. Signed-off-by: Piotr Ziecik <kosmo@semihalf.com> Signed-off-by: Stefan Roese <sr@denx.de>
| * | UBI: Add basic UBI support to U-Boot (Part 5/8)Kyungmin Park2008-11-19-0/+3810
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds basic UBI (Unsorted Block Image) support to U-Boot. It's based on the Linux UBI version and basically has a "OS" translation wrapper that defines most Linux specific calls (spin_lock() etc.) into no-ops. Some source code parts have been uncommented by "#ifdef UBI_LINUX". This makes it easier to compare this version with the Linux version and simplifies future UBI ports/bug-fixes from the Linux version. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Stefan Roese <sr@denx.de>
| * | UBI: Add basic UBI support to U-Boot (Part 4/8)Kyungmin Park2008-11-19-0/+2538
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds basic UBI (Unsorted Block Image) support to U-Boot. It's based on the Linux UBI version and basically has a "OS" translation wrapper that defines most Linux specific calls (spin_lock() etc.) into no-ops. Some source code parts have been uncommented by "#ifdef UBI_LINUX". This makes it easier to compare this version with the Linux version and simplifies future UBI ports/bug-fixes from the Linux version. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Stefan Roese <sr@denx.de>
| * | UBI: Add basic UBI support to U-Boot (Part 3/8)Kyungmin Park2008-11-19-0/+2018
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds basic UBI (Unsorted Block Image) support to U-Boot. It's based on the Linux UBI version and basically has a "OS" translation wrapper that defines most Linux specific calls (spin_lock() etc.) into no-ops. Some source code parts have been uncommented by "#ifdef UBI_LINUX". This makes it easier to compare this version with the Linux version and simplifies future UBI ports/bug-fixes from the Linux version. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Stefan Roese <sr@denx.de>
| * | UBI: Add basic UBI support to U-Boot (Part 2/8)Kyungmin Park2008-11-19-0/+1768
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds basic UBI (Unsorted Block Image) support to U-Boot. It's based on the Linux UBI version and basically has a "OS" translation wrapper that defines most Linux specific calls (spin_lock() etc.) into no-ops. Some source code parts have been uncommented by "#ifdef UBI_LINUX". This makes it easier to compare this version with the Linux version and simplifies future UBI ports/bug-fixes from the Linux version. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Stefan Roese <sr@denx.de>
| * | UBI: Add basic UBI support to U-Boot (Part 1/8)Kyungmin Park2008-11-19-0/+1755
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds basic UBI (Unsorted Block Image) support to U-Boot. It's based on the Linux UBI version and basically has a "OS" translation wrapper that defines most Linux specific calls (spin_lock() etc.) into no-ops. Some source code parts have been uncommented by "#ifdef UBI_LINUX". This makes it easier to compare this version with the Linux version and simplifies future UBI ports/bug-fixes from the Linux version. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Stefan Roese <sr@denx.de>
| * | MTD: Add MTD paritioning infrastructureKyungmin Park2008-11-19-0/+679
| |/ | | | | | | | | | | | | | | This MTD part infrastructure will be used by the upcoming UBI support. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Stefan Roese <sr@denx.de>
* | cfi-mtd: Add cfi-mtd driver.Piotr Ziecik2008-11-24-0/+208
| | | | | | | | | | | | | | | | | | | | | | | | Add cfi-mtd driver, which exports CFI flash to MTD layer. This allows CFI flash devices to be used from MTD layer. Building of the new driver is controlled by CONFIG_FLASH_CFI_MTD option. Initialization is done by calling cfi_mtd_init() from flash_init(). Signed-off-by: Piotr Ziecik <kosmo@semihalf.com> Signed-off-by: Stefan Roese <sr@denx.de>
* | cfi_flash: Add interface for flash verbosity controlPiotr Ziecik2008-11-24-11/+22
| | | | | | | | | | | | | | | | | | | | | | Add interface for flash verbosity control. It allows to disable output from low-level flash API. It is useful when calling these low-level functions from context other than flash commands (for example the MTD/CFI interface implmentation). Signed-off-by: Piotr Ziecik <kosmo@semihalf.com> Signed-off-by: Stefan Roese <sr@denx.de>
* | cfi_flash: Export flash_sector_size() function.Piotr Ziecik2008-11-24-2/+0
| | | | | | | | | | | | | | | | Export flash_sector_size() function from drivers/mtd/cfi_flash.c, so that it can be used in the upcoming cfi-mtd driver. Signed-off-by: Piotr Ziecik <kosmo@semihalf.com> Signed-off-by: Stefan Roese <sr@denx.de>
* | cfi_flash: Make all flash access functions weakStefan Roese2008-11-24-7/+25
|/ | | | | | | | | | | | | | | | | This patch defines all flash access functions as weak so that they can be overridden by board specific versions. This will be used by the upcoming VCTH board support where the NOR FLASH unfortunately can't be accessed memory-mapped. Special accessor functions are needed here. To enable this weak functions you need to define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS in your board config header. Otherwise the "old" default functions will be used resulting in smaller code. Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
* drivers/qe/uec_phy.c: Added PHY-less (fixed PHY) driver.Richard Retanubun2008-11-09-0/+79
| | | | | | | | Copied over the fixed PHY driver as used in pp4xx/4xx_enet.c. This adds support for PHY-less MAC connections to the UEC. Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* ColdFire: Add mii driver in drivers/netTsiChung Liew2008-11-09-17/+326
| | | | | | | All CF platforms' mii.c are consolidated into one Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Moved PPC4xx EMAC driver to drivers/netBen Warren2008-11-09-0/+2127
| | | | | | | Also changed path in all linker scripts that reference this driver Signed-off-by: Ben Warren <biggerbadderben@gmail.com> Acked-by: Stefan Roese <sr@denx.de>
* xilinx_emaclite buffer overrunClive Stubbings2008-11-09-1/+1
| | | | | | | | | Patch to fix buffer allocation size and alignment. Buffer needs to be u32 aligned and PKTSIZE_ALIGN bytes long. Acked-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* NET: QE: UEC: Make uec_miiphy_read() and uec_miiphy_write() use the devname arg.richardretanubun2008-11-09-3/+43
| | | | | | | | | | The current uec_miiphy_read and uec_miiphy_write hardcode access devlist[0] This patch makes these function use the devname argument that is passed in to allow access to the phy registers of other devices in devlist[]. Signed-of-by: Richard Retanubun <RichardRetanubun@RugggedCom.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Adds two more ethernet interface to 83xxrichardretanubun2008-11-09-0/+8
| | | | | | Fixed compiler warning "declared but unused" eth5_uec_info and eth6_uec_info. Signed-off-by: Richard Retanubun <RichardRetanubun@RugggedCom.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Merge branch 'master' of git://git.denx.de/u-boot-cfi-flashWolfgang Denk2008-11-01-1/+2
|\
| * CFI Driver: Fix "flash not ready" problemWolfgang Denk2008-10-31-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a problem on systems where the NOR flash is attached to a 64 bit bus. The toggle bit detection in flash_toggle() is based on the assumption that the same flash address is read twice without any other interjacent flash accesses. However, on 32 bit systems the function flash_read64() [as currently implemented] does not perform an atomic 64 bit read - instead, this is broken down into two 32 bit read accesses on addresses "addr" and "addr + 4". So instead of reading a 64 bit value twice from "addr", we see a sequence of 4 32 bit reads from "addr", "addr + 4", "addr", and "addr + 4". The consequence is that flash_toggle() fails to work. This patch implements a simple, but somewhat ugly solution, as it avoids the use of flash_read64() in this critical place (by breaking it down manually into 32 bit read operations) instead of rewriting flash_read64() such to perform atomic 64 bit reads as one could expect. However, such a rewrite would require the use of floating point load operations, which becomes pretty complex: save MSR; set Floating Point Enable bit in MSR; use "lfd" instruction to perform atomic 64 bit read; use "stfd" to store value to temporary variable on stack; load u64 value from temporary variable; restore saved MSR; return u64 value; The benefit-cost ratio of such an implementation was considered too bad to actually attempt this, especially as we can expect that such an implementation would not only have a bigger memory footprint but also cause a performance degradation. Signed-off-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
* | Merge branch 'master' of git://git.denx.de/u-boot-blackfinWolfgang Denk2008-11-01-9/+10
|\ \ | |/ |/|
| * Blackfin: only initialize the RTC when actually usedMike Frysinger2008-10-23-9/+10
| | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | NAND: Properly create JFFS2 cleanmarkers.Scott Wood2008-10-29-19/+11
| | | | | | | | | | | | | | | | | | | | | | As reported by Ilko Iliev <iliev@ronetix.at>, the "nand erase clean" command is currently broken, and among other things causes all blocks to be marked bad. This implements it properly using MTD_OOB_AUTO, along with some indentation fixes. Signed-off-by: Scott Wood <scottwood@freescale.com>
* | NAND fsl elbc: Set FMR[ECCM] based on page size.Scott Wood2008-10-29-2/+14
| | | | | | | | | | | | | | Hardware expects ECCM 0 for small page and ECCM 1 for large page when booting from NAND, so use those defaults. Signed-off-by: Scott Wood <scottwood@freescale.com>
* | Make Freescale local bus registers available for both 83xx and 85xx.Haiying Wang2008-10-29-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | - Rename lbus83xx_t to fsl_lbus_t and move it to asm/fsl_lbc.h so that it can be shared by both 83xx and 85xx - Remove lbus83xx_t and replace it with fsl_lbus_t in all 83xx boards files which use lbus83xx_t. - Move FMR, FIR, FCR, FPAR, LTESR from mpc83xx.h to asm/fsl_lbc.h so that 85xx can share them. Signed-off-by: Jason Jin <Jason.Jin@freescale.com> Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | NAND: Reset chip on power-upKarl Beldan2008-10-29-0/+8
| | | | | | | | | | | | | | | | | | | | Some chips require a RESET after power-up (e.g. Micron MT29FxGxxxxx). The first command sent is NAND_CMD_READID. Issue a NAND_CMD_RESET in nand_scan_ident before reading the device id. Tested with an MT29F4G08AAC. Signed-off-by: Karl Beldan <karl.beldan@gmail.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | NAND: sync with 2.6.27Scott Wood2008-10-29-43/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | This brings the core NAND code up to date with the Linux kernel. Since there were several drivers in Linux as of the last update that are not in u-boot, I'm not bringing over new drivers that have been added since in the absence of an interested party. I did not update OneNAND since it was recently synced by Kyungmin Park, and I'm not sure exactly what the common ancestor is. Signed-off-by: Scott Wood <scottwood@freescale.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-videoWolfgang Denk2008-10-28-5/+1
|\ \
| * | atmel_lcdfb: Straighten out funky vl_sync logicHaavard Skinnemoen2008-10-25-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | If the board _didn't_ request INVLINE_INVERTED, we set INVLINE_INVERTED, otherwise we don't. WTF? Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * | atmel_lcdfb: Eliminate unneeded #include <asm/arch/hardware.h>Haavard Skinnemoen2008-10-25-1/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | atmel_lcdfb doesn't actually need anything from asm/arch/hardware.h. It includes a file that does, asm/arch/gpio.h, but this file doesn't include <asm/arch/hardware.h> like it's supposed to. Add the missing include to asm/arch/gpio.h and remove the workaround from the atmel_lcdfb driver. This makes the driver compile on avr32. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* | powerpc: fix pci window initialization to work with > 4GB DRAMBecky Bruce2008-10-27-3/+7
| | | | | | | | | | | | | | | | | | The existing code has a few errors that need to be fixed in order to support large RAM sizes. Fix those, and add a comment to make it clearer. Signed-off-by: Becky Bruce <becky.bruce@freescale.com> Acked-by: Kumar Gala <galak@kernel.crashing.org>
* | pci/fsl_pci_init: Removed a bunch pointless trailing backslashes.Kumar Gala2008-10-27-7/+7
| | | | | | | | Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | pci/fsl_pci_init: Added fdt helper for setting up bus-ranges & dma-rangesKumar Gala2008-10-24-0/+20
| | | | | | | | | | Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
* | pci/fsl_pci_init: Add a common PCI inbound setup functionKumar Gala2008-10-24-0/+81
| | | | | | | | | | | | | | | | Add a common setup function that determines the pci_region(s) based on how much memory we have in the system. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
* | pci/fsl_pci_init: Enable larger address and setting inbound windows properlyKumar Gala2008-10-24-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PCI Inbound window was setup incorrectly. The PCI address and system address were swapped. The PCI address should be setting piwar/piwbear and the system address should be setting pitar. * Removed masking of addresses to allow for system address to support system address & PCI address >32-bits * Set PIWBEAR & POTEAR to allow for full 64-bit PCI addresses * Respect the PCI_REGION_PREFETCH for inbound windows Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
* | pci: Allow for PCI addresses to be 64-bitKumar Gala2008-10-24-47/+78
|/ | | | | | | | | | PCI bus is inherently 64-bit. While not all system require access to the full 64-bit PCI address range some do. This allows those systems to enable the full PCI address width via CONFIG_SYS_PCI_64BIT. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com> Acked-by: Wolfgang Denk <wd@denx.de>
* Cleanup: fix "MHz" spellingWolfgang Denk2008-10-21-9/+9
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Merge git://git.denx.de/u-boot into x1Markus Klotzbuecher2008-10-21-1634/+3127
|\ | | | | | | | | | | Conflicts: drivers/usb/usb_ohci.c
| * Merge 'next' branchWolfgang Denk2008-10-18-860/+1131
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: board/freescale/mpc8536ds/mpc8536ds.c include/configs/mgcoge.h Signed-off-by: Wolfgang Denk <wd@denx.de>
| | * fsl_law clear enable before changing.Ed Swarthout2008-10-18-0/+1
| | | | | | | | | | | | | | | | | | | | | Debug sessions may have left enabled laws. Changing lawbar with an unkown enabled tgtid could cause problems. Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
| | * mgsuvd: fix compiler warning when using soft_i2c driverHeiko Schocher2008-10-18-0/+4
| | | | | | | | | | | | Signed-off-by: Heiko Schocher <hs@denx.de>
| | * rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-18-723/+723
| | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | * I2C: adding new "i2c bus" Command to the I2C Subsystem.Heiko Schocher2008-10-18-1/+14
| | | | | | | | | | | | | | | | | | | | | With this Command it is possible to add new I2C Busses, which are behind 1 .. n I2C Muxes. Details see README. Signed-off-by: Heiko Schocher <hs@denx.de>
| | * soft_i2c: Add CFG_I2C_INIT_BOARD optionHeiko Schocher2008-10-18-0/+11
| | | | | | | | | | | | | | | | | | | | | This patch adds the option for a boardspecific I2C deblocking mechanism for the soft i2c driver. Signed-off-by: Heiko Schocher <hs@denx.de>
| | * lm75: Make the LM75 MULTI_BUS compatible.Heiko Schocher2008-10-18-0/+6
| | | | | | | | | | | | Signed-off-by: Heiko Schocher <hs@denx.de>
| | * lm75: fix Codingstyle issues.Heiko Schocher2008-10-18-123/+99
| | | | | | | | | | | | Signed-off-by: Heiko Schocher <hs@denx.de>
| | * soft_i2c: prevent compiler warnings if driver does not use CPU Pins.Heiko Schocher2008-10-18-37/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following warnings, when using the soft_i2c driver using no CPU pins on MPC82xx or MPC8xx systems: soft_i2c.c: In function 'send_reset': soft_i2c.c:93: warning: unused variable 'immr' soft_i2c.c: In function 'send_start': soft_i2c.c:124: warning: unused variable 'immr' soft_i2c.c: In function 'send_stop': soft_i2c.c:146: warning: unused variable 'immr' soft_i2c.c: In function 'send_ack': soft_i2c.c:171: warning: unused variable 'immr' soft_i2c.c: In function 'write_byte': soft_i2c.c:196: warning: unused variable 'immr' soft_i2c.c: In function 'read_byte': soft_i2c.c:244: warning: unused variable 'immr' Signed-off-by: Heiko Schocher <hs@denx.de>