summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2010-10-12Merge branch 'master' of git://git.denx.de/u-boot-cfi-flashWolfgang Denk
2010-10-12Merge branch 'master' of git://git.denx.de/u-boot-netWolfgang Denk
2010-10-12cfi_flash: Fix "Unknown FLASH" error messageJohn Schmoller
When a CFI flash chip could not be detected an error message similar to the following would be printed on bootup: FLASH: ## Unknown FLASH on Bank 1 - Size = 0x01000000 = 0 MB The printf incorrectly converted the flash size into megabytes. This patch fixes the printing of the flash size in megabytes: FLASH: ## Unknown FLASH on Bank 1 - Size = 0x01000000 = 16 MB Signed-off-by: John Schmoller <jschmoller@xes-inc.com> Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Stefan Roese <sr@denx.de>
2010-10-12smc91111: add write_hwaddrThomas Chou
Add smc_write_hwaddr() to set mac address. Clear dev before use. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-12davinci_emac: davinci_eth_set_mac_addr to ->write_hwaddrBen Gardiner
This patch proposes to migrate the davinci_emac driver to using the eth_device->write_hwaddr function pointer as suggested by Ben Warren. All the davinci boards had the behaviour, prior to this patch, of sync'ing the environment variable enetaddr with the MAC address read from non-volatile storage on boot -- when the two locations disagreed, the environment variable value took precendence. This patch keeps the same behaviour but lets eth_initialize take care of it. This patch refactors davinci_emac setup in the boards so that the MAC address is read from non-volatile storage into the environment variable and then the environment variable value is use in eth_intialize. The only exception is the direct call to davinci_eth_set_mac_addr made by the da830evm board init which was changed into an assignment of the enetaddr field. Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Tested-by: Nick Thompson <nick.thompson@ge.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-12net: Move Emaclite to NET_MULTIMichal Simek
Emaclite was using old net api that's why this patch move emaclite to NET_MULTI api. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-12net: Fix emaclite driver to support little-endian microblazeMichal Simek
Support New emaclite AXI IP. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-12mpc5xxx_fec: add call to reset_phy() after PHY initializationIlya Yanok
Some boards need their board-specific PHY quirks to be called to PHY to work normally. As mpc5xxx_fec driver uses on demand PHY initialization and can even reinit PHY during normal operation we can't count on reset_phy() call from arch/<arch>/lib/board.c (it is most likely called _before_ we init the PHY from the driver) so we need to add call to reset_phy() directly in the driver. Signed-off-by: Ilya Yanok <yanok@emcraft.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-12drivers/net/at91_emac.c: change return valuesAndreas Bießmann
Some return values pretended correct pass. This patch changes them according to README.drivers.net. This patch changes e.g. command 'dhcp' to stop after errorneous autonegotiation. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-12drivers/net/at91_emac.c: increase timeout for autonegotiationAndreas Bießmann
This patch increases timeout for autonegotiation from 1 second to 3 seconds. Some boards (e.g. at91rm9200ek) did not negotiate within 1 second. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-12NET: add ENC28J60 driver using SPI frameworkReinhard Meyer
V3: further refinements: - use priv member instead of container method - allow setting of MAC address by write_hwaddr method - avoid shutting down link between commands Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-12UEC PHY: Speed up initial PHY neg.Joakim Tjernlund
Instead of always performing an autoneg, check if the PHY already has a link and if it matches one of the requested modes. Initially only 100MbFD is optimized this way. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-12UEC PHY: Remove strange 0.5 sec delayJoakim Tjernlund
This udelay looks bogus and doesn't help my board. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-12UEC: Don't udelay needlesslyJoakim Tjernlund
uec_init() adds an udelay(100000) even though the PHY status read went well, don't do that. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-12NET: move legacy enc28j60.c to sidetrack as enc28j60_lpc2292.cReinhard Meyer (-VC)
This patch is required before the upcoming new enc28j60 driver using SPI framework patch can be applied: - Move legacy enc28j60.c to enc28j60_lpc2292.c. - Change Makefile and the two affected boards' definition files. Tested with ./MAKEALL ARM7 that both boards still compile. Signed-off-by: Reinhard Meyer<info@emk-elektronik.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11mtd: OneNAND: add support for OneNAND manufactured by NumonyxEnric Balletbo i Serra
This patch adds the Numonyx manufacturer code (0x20) to onenand manufacturers. Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Steve Sakoman <steve.sakoman@linaro.org> Tested-by: Steve Sakoman <steve.sakoman@linaro.org>
2010-10-11Followup fixes on the mtdparts spread patchsetScott Wood
Consolidate some code in mtd_get_len_incl_bad(), and fix a condition where a valid partition could be reported as truncated if it has a good block at the end of the device (unlikely, since the BBT is usually there). Fix mid-block declarations in net_part_size(). Signed-off-by: Scott Wood <scottwood@freescale.com> Reviewed-by: Ben Gardiner <bengardiner@nanometrics.ca>
2010-10-11mtd: add an mtd method for get_len_incl_bad()Ben Gardiner
The logic to 'spread' mtd partitions needs to calculate the length in the mtd device, including bad blocks. This patch introduces a new function, mtd_get_len_incl_bad that can return both the length including bad blocks and whether that length was truncated on the device. This new function will be used by the mtdparts spread command later in this series. The definition of the function is #ifdef'd out in configurations that do not use the new 'mtdparts spread' command. Signed-off-by: Ben Gardiner<bengardiner@nanometrics.ca> CC: Scott Wood <scottwood@freescale.com>
2010-10-11nand: remove dead code and suspend/resumeScott Wood
Get rid of the several "#if 0" sections that were keeping around Linux code that isn't relevant to U-Boot. Besides cluttering the code, these sections make tracking upstream changes harder, rather than easier. It's easy to discard obviously irrelevant diff hunks that patch rejects, but it's not as easy to notice hunks that apply cleanly to the #if 0 section, but *are* relevant to U-Boot and require modification elsewhere. Also remove suspend/resume, as this is not applicable to U-Boot. Removal saves 232 bytes on powerpc. Signed-off-by: Scott Wood <scottwood@freescale.com> Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
2010-10-11nand erase: .spread, .part, .chip subcommandsScott Wood
A while back, in http://lists.denx.de/pipermail/u-boot/2009-June/054428.html, Michele De Candia posted a patch to not count bad blocks toward the requested size to be erased. This is desireable when you're passing in something like $filesize, but not when you're trying to erase a partition. Thus, a .spread subcommand (named for consistency with http://lists.denx.de/pipermail/u-boot/2010-August/075163.html) is introduced to make explicit the user's desire to erase for a given amount of data, rather than to erase a specific region of the chip. While passing $filesize to "nand erase" is useful, accidentally passing something like $fliesize currently produces quite unpleasant results, as the variable evaluates to nothing and U-Boot assumes that you want to erase the entire rest of the chip/partition. To improve the safety of the erase command, require the user to make explicit their intentions by using a .part or .chip subcommand. This is an incompatible user interface change, but keeping compatibility would eliminate the safety gain, and IMHO it's worth it. While touching nand_erase_opts(), make it accept 64-bit offsets and sizes, fix the percentage display when erase length is rounded up, eliminate an inconsistent warning about rounding up the erase length which only happened when the length was less than one block (rounding up for $filesize is normal operation), and add a diagnostic if there's an attempt to erase beginning at a non-block boundary. Signed-off-by: Scott Wood <scottwood@freescale.com> Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
2010-10-11nand util: read/write: accept unaligned lengthScott Wood
The underlying code in nand_base.c already supports non-page-aligned reads and writes, but the block-skipping wrapper code did not. With block skipping, an unaligned start address is not useful since you really want to be starting at the beginning of a partition -- or at least that's where you want to start checking for blocks to skip, but we don't (yet) support that. So we still require the start address to be aligned. An unaligned length, though, is useful for passing $filesize to the read/write command, and handling it does not complicate block skipping. Signed-off-by: Scott Wood <scottwood@freescale.com> Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
2010-10-11Merge branch 'at91' of git://git.denx.de/u-boot-atmelWolfgang Denk
2010-10-11Merge branch 'master' of git://git.denx.de/u-boot-imxWolfgang Denk
2010-10-11Merge branch 'sf' of git://git.denx.de/u-boot-blackfinWolfgang Denk
2010-10-07sf: spansion: add support for S25FL032P partsDavid Jander
This patch introduces an extra mask-field in spansion_spi_flash_params to support flash chips with 1-byte extended ID (like the S25FL032P). Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-07sf: spansion: fixing erasing when sector size >64KiBMarc-André Hébert
The spansion_erase currently only works when the sector size is 64KB. cmd[1] should contain the higher 8 bit of the 24 bit address of the sector to be erased. Currently it is holding the sector index to be erased which happens to be the same thing when the sector size is 64KB. Signed-off-by: Marc-Andre Hebert <marc-andre.hebert@humanware.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-06ds1621: Fix negative temperature readingsJeff Dischler
Fix bug where signed data was processed as unsigned. The bug previously resulted in negative temperature readings wrapping around, eg -10 became 245. Signed-off-by: Jeff Dischler <jdischler@xes-inc.com> Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-10-06ds1621: Clean up coding stylePeter Tyser
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-10-06ds1621: Poll for register write completionPeter Tyser
Poll the ds1621 NV Memory Busy bit instead of waiting a static amount of time for register writes. Also add config retister bit defines. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-10-06sf: winbond: add support W25Q64 partsGraeme Smecher
Adds support for Winbond's W25Q64 SPI flash. These devices are used on (among others) Xilinx' SP601 and SP605 Spartan-6 evaluation boards. Tested with "sf" commands. Signed-off-by: Graeme Smecher <graeme.smecher@mail.mcgill.ca> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-05atmel_usart: change register access to C structureAndreas Bießmann
This patch introduces C structure definition for register footprint of atmel's usart. Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
2010-10-05at91_emac.c: poll for IDLE when writing PHYAndreas Bießmann
This patch replaces the unnecessary waiting in at91emac_read() and at91emac_write() by checking the IDLE flag. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2010-10-05at91_emac.c: fix 'Warning: eth device name has a space!'Andreas Bießmann
This patch also removes conditional nameing of at91_emac driver whether it's connection to PHY is RMII or MII. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2010-10-05Merge branch 'master' of git://git.denx.de/u-boot-blackfinWolfgang Denk
2010-10-05Merge branch 'next' of git://git.denx.de/u-boot-videoWolfgang Denk
2010-10-02Blackfin: bfin_mac: convert from old style MMR macrosMike Frysinger
The old MMR defines are being scrubbed, so convert the driver to use the new standard helper macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02Blackfin: bfin_sdh: clean up send_cmdMike Frysinger
Simplify the command setup and status checking steps, and add a proper timeout to the status polling code to avoid possible infinite hangs. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02Blackfin: bfin_spi: add optional DMA supportMike Frysinger
This moves the last piece from the old spi_flash driver to the new SPI framework -- optional DMA RX support. This typically cuts speeds by ~40% at the cost of additional ~300 bytes. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-30MXC: Fix byte-ordering in SPI driver for i.MX31/i.MX51Stefano Babic
The actual SPI driver for i.MX31 and i.MX51 controller use a wrong byte ordering, because it is supposed to work only with Freescale's devices, as the Power Controllers (PMIC). The driver is not suitable for general purposes, because the buffers passed to spi_xfer must be 32-bit aligned, as it is used mainly to send integer to PMIC devices. The patch drops any kind of limitation and makes the driver useful with devices controlled sending commands composed by single bytes (or by a odd number of bytes), such as spi flash, sensor, etc. Because the byte ordering is changed, any current driver using this controller must be adapted, too. Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-09-30MXC: Correct SPI_CPOL setting in SPI driverStefano Babic
The handling of the SPI_CPOL bit inside the SPI driver was wrong. As reported by the manual, the meaning of the SSPOL inside the configuration register is the same as reported by SPI specification (0 if low in idle, 1 is high on idle). The driver inverts this logic. Because this patch sets the logic as specified, it is required to clear the CPOL bit in the configuration file to adapt to the correct logic. Signed-off-by: Stefano Babic <sbabic@denx.de> Signed-off-by: David Jander <david.jander@protonic.nl>
2010-09-29MXC: Add watchdog support to serial driverStefano Babic
Calls WATCHDOG_RESET() inside serial driver for boards enabling watchdog. Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-09-29Use common function to set GPIOs for MX3 and MX5Stefano Babic
The patch adds support for setting gpios to the MX51 processor and change name to the corresponding functions for MX31. In this way, it is possible to get rid of nasty #ifdef switches related to the processor type. Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-09-28Merge branch 'next' of /home/wd/git/u-boot/nextWolfgang Denk
Conflicts: include/ppc4xx.h Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-27Fix "ubi part" cmd re-entrancyKarl Beldan
Commit 2ee951ba (UBI: Enable re-initializing of the "ubi part" command) reset mtd_devs in ubi_exit() but missed ubi_init()'s failure path. Signed-off-by: Karl Beldan <karl.beldan@gmail.com> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-25atmel_lcd: Allow contrast polarity to be either positive or negativeAlexander Stein
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
2010-09-23ppc4xx: Remove now unused CONFIG_UART1_CONSOLEStefan Roese
CONFIG_UART1_CONSOLE was a PPC4xx specific implementation and is now removed since the move from the 4xx UART driver to the common NS16550 UART driver. Let's remove all references to this define now. Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-23ppc4xx: Big header cleanup, mostly PPC440 relatedStefan Roese
This patch starts a bit PPC4xx header cleanup. First patch mostly touches PPC440 files. A later patch will touch the PPC405 files as well. This cleanup is done by creating header files for all SoC versions and moving the SoC specific defines into these special headers. This way the common header ppc405.h and ppc440.h can be cleaned up finally. Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-23ppc4xx: Move ppc4xx headers to powerpc include directoryStefan Roese
This patch moves some ppc4xx related headers from the common include directory (include/) to the powerpc specific one (arch/powerpc/include/asm/). This way to common include directory is not so cluttered with files. Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-22Merge branch 'master' of git://git.denx.de/u-boot-blackfinWolfgang Denk
2010-09-21Blackfin: bfin_spi: use same gpio cs define as LinuxMike Frysinger
Linux uses an offset of 8 to switch from hardware cs to a gpio cs, so have u-boot use the same value. Also make sure it is public for boards to access. Signed-off-by: Mike Frysinger <vapier@gentoo.org>