summaryrefslogtreecommitdiff
path: root/drivers
Commit message (Collapse)AuthorAgeLines
* 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>
| | * i2c: add CONFIG_I2C_MULTI_BUS for soft_i2c and mpc8260 i2c driver.Heiko Schocher2008-10-18-0/+36
| | | | | | | | | | | | Signed-off-by: Heiko Schocher <hs@denx.de>
| | * hwmon: Add LM63 supportDirk Eibach2008-10-18-0/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the National LM63 temperature sensor with integrated fan control. It's used on the GDSys Neo board (405EP) which will be submitted later. Signed-off-by: Dirk Eibach <eibach@gdsys.de> Acked-by: Stefan Roese <sr@denx.de>
| | * Adds two more ethernet interface to 83xxrichardretanubun2008-10-18-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added as a convenience for other platforms that uses MPC8360 (has 8 UCC). Six eth interface is chosen because the platform I am using combines UCC1&2 and UCC3&4 as 1000 Eth and the other four UCCs as 10/100 Eth. Signed-off-by: Richard Retanubun <RichardRetanubun@RugggedCom.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| | * Change UEC PHY interface to RGMII on MPC8568MDSHaiying Wang2008-10-18-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change UEC phy interface from GMII to RGMII on MPC8568MDS board Because on MPC8568MDS, GMII interface is only recommended for 1000Mbps speed, but RGMII interface can work at 10/100/1000Mbps, and RGMII interface works more stable. Now both UEC1 and UEC2 can work properly under u-boot. It is also in consistent with the kernel setting for 8568 UEC phy interface. Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | Merge branch 'master' of /home/wd/git/u-boot/master/Wolfgang Denk2008-10-17-1/+1
| |\ \
| | * | Coding Style cleanup, update CHANGELOG, prepare 2008.10-rc3v2008.10-rc3Wolfgang Denk2008-10-15-1/+1
| | |/ | | | | | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
| * | Fix the function conflict in x86emu when DEBUG is onJason Jin2008-10-17-3/+3
| |/ | | | | | | | | | | | | | | | | The function parse_line() in common/main.c was exposed globally by commit 6636b62a6efc7f14e6e788788631ae7a7fca4537, Result in conflict with the same name funciton in drivers/bios_emulator/x86emu/debug.c when define the DEBUG. This patch fix this by renaming the function in the debug.c file. Signed-off-by: Jason Jin <Jason.jin@freescale.com>
| * Remove CFG_EEPROM_PAGE* dependencies for temperature sensorsPeter Tyser2008-10-14-17/+0
| | | | | | | | | | | | | | | | The checks for CFG_EEPROM_PAGE_WRITE_ENABLE and CFG_EEPROM_PAGE_WRITE_BITS in various temperature sensor drivers are not necessary Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
| * Fix the NAND size overflow issue.Jason Jin2008-10-14-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | When the total size of all NAND devices exceeds 4 GiB, the size will overflow. This patch tries to fix this. Note that we still have a problem when a single NAND device is bigger than 4 GiB: then the overflow would actually happen earlier, i. e. when storing the size in nand_info[].size, as nand_info[].size is an "u_int32_t". Signed-off-by: Jason Jin <Jason.jin@freescale.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
| * Merge branch 'master' of git://git.denx.de/u-boot-netWolfgang Denk2008-10-14-723/+1939
| |\
| | * AX88180: new gigabit network driverLouis Su2008-10-13-0/+1140
| | | | | | | | | | | | | | | Signed-off-by: Louis Su <louis@asix.com.tw> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| | * enable 10/100M at VSC8601 at tsec driverAndre Schwarz2008-10-13-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently VSC8601 doesn't link with 10/100M partners if the EEPROM/Strapping is not set up. Setting the auto-neg register fixes this. Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| | * net: ne2000: Divided a function of NE2000 driverNobuhiro Iwamatsu2008-10-13-723/+797
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_prom function was used __attriute__ , but it is not enable. ax88796.o does not do link besides ne2000.o. When ld is carried out, get_prom function of ax88796.c is ignored. This problem is a thing by specifications of ld. I checked and test this patch on SuperH and MIPS. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | fsl_pci_init do not scan bus when configured as an end-pointEd Swarthout2008-10-13-2/+15
| |/ | | | | | | | | Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com>
| * CFI: cfi_flash write fix for AMD legacyEd Swarthout2008-10-13-3/+5
| | | | | | | | | | | | | | | | The flash_unlock_seq requires a sector for AMD_LEGACY. Fix a retcode check typeo. Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com> Signed-off-by: Stefan Roese <sr@denx.de>
| * cfi_flash: do not reset flash when probe failsMike Frysinger2008-10-02-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CFI flash driver starts at flash_init() which calls down into flash_get_size(). This starts by calling flash_detect_cfi(). If said function fails, flash_get_size() finishes by attempting to reset the flash. Unfortunately, it does this with an info->portwidth set to 0x10 which filters down into flash_make_cmd() and that happily smashes the stack by sticking info->portwidth bytes into a cfiword_t variable that lives on the stack. On a 64bit system you probably won't notice, but killing the last 8 bytes on a 32bit system usually leads to a corrupt return address. Which is what happens on a Blackfin system. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Stefan Roese <sr@denx.de>
| * Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxWolfgang Denk2008-09-21-3/+5
| |\
| | * Support for multiple SGMII/TBI interfaces for TSEC ethernetPeter Tyser2008-09-16-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix TBI PHY accesses to use the proper offset in CPU register space. The previous code would incorrectly access the TBI PHY by reading/writing to CPU register space at the same location as would be used to access external PHYs. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Andy Fleming <afleming@freescale.com>
| * | sh: Fix compile warningNobuhiro Iwamatsu2008-09-19-17/+22
| | | | | | | | | | | | Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | sh: Fix typo in SH serial driverNobuhiro Iwamatsu2008-09-19-1/+1
| |/ | | | | | | | | Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
* | The PIPE_INTERRUPT flag is used wrongRemy Bohmer2008-10-14-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | At a lot of places in the code the PIPE_INTERRUPT flags and friends are used wrong. The wrong bits are compared to this flag resulting in wrong conditions. Also there are macros that should be used for PIPE_* flags. This patch tries to fix them all, however, I was not able to test the changes, because I do not have any of these boards. Review required! Signed-off-by: Remy Bohmer <linux@bohmer.net> Signed-off-by: Markus Klotzbuecher <mk@denx.de>