summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* FPGA: fix support for non-Lattice devicesWolfgang Denk2010-10-181-0/+12
| | | | | | | | | | | | | | | | | | | | | Commit 3b8ac464 "FPGA: add support for downloading Lattice bitstream" added support for Lattice devices, but failed to add #ifdef's that are needed when building for non-Lattice devices, which results in build failures like these: Configuring for GEN860T board... drivers/fpga/libfpga.a(fpga.o): In function `fpga_dev_info': /home/wd/git/u-boot/work/drivers/fpga/fpga.c:145: undefined reference to `lattice_info' drivers/fpga/libfpga.a(fpga.o): In function `fpga_dump': /home/wd/git/u-boot/work/drivers/fpga/fpga.c:269: undefined reference to `lattice_dump' drivers/fpga/libfpga.a(fpga.o): In function `fpga_load': /home/wd/git/u-boot/work/drivers/fpga/fpga.c:233: undefined reference to `lattice_load' make: *** [u-boot] Error 1 Add the missing code. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Stefano Babic <sbabic@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-armWolfgang Denk2010-10-1711-32/+4138
|\
| * davinci_nand, trivial : use symbolic ECC start commandBen Gardiner2010-10-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | The ECC calculations were started by writing 1 << 13 to the nand FCR register; that value is also defined as DAVINCI_NANDFCR_4BIT_CALC_START in emif_defs.h. This patch substitutes the macro DAVINCI_NANDFCR_4BIT_CALC_START for the magic number '1 << 13'. Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
| * ARMV7: OMAP: Add new mmc driver compatible with CONFIG_GENERIC_MMCSukumar Ghorai2010-10-172-0/+416
| | | | | | | | | | | | | | | | | | | | | | | | | | OMAP boards currently use a legacy mmc driver. This patch adds a new mmc driver which will work with the generic mmc driver in u-boot. This new driver will work with both OMAP3 and OMAP4 boards. This patch does not remove the old driver. It should remain in the tree until all boards that use it switch to the new driver. Signed-off-by: Sukumar Ghorai <s-ghorai@ti.com> Tested-by: Steve Sakoman <steve@sakoman.com>
| * MMC: Fix for capacity calculation on eMMCSukumar Ghorai2010-10-171-0/+11
| | | | | | | | | | | | | | | | | | | | The current mmc driver returns erroneous capacity information for eMMC. The capacity of eMMC devices is available only in the ext-CSD register. This patch add code to read the ext-CDSD register and correctly calculate eMMC capacity. Signed-off-by: Sukumar Ghorai <s-ghorai@ti.com> Acked-by: Steve Sakoman <steve@sakoman.com>
| * Merge branch 'master' of git://git.denx.de/u-boot-imxWolfgang Denk2010-10-177-31/+3709
| |\
| | * MX31: Add support for MXC EHCI controllerStefano Babic2010-10-132-0/+131
| | | | | | | | | | | | | | | | | | The patch adds the EHCI controller for the i.MX31 Soc. Signed-off-by: Stefano Babic <sbabic@denx.de>
| | * MX31: add support for setting pin padsStefano Babic2010-10-131-31/+0
| | | | | | | | | | | | | | | | | | | | | The patch adds a utility function and defines to set the pad as it is done in linux. Signed-off-by: Stefano Babic <sbabic@denx.de>
| | * FPGA: add support for downloading Lattice bitstreamStefano Babic2010-10-134-0/+3578
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch adds support to load a Lattice's bitstream image (called VME file) into a Lattice FPGA. The code containing the state machine delivered as part of Lattice's ispVMtools is integrated. The FPGA is programmed using the JTAG interface. The board maintainer must provide accessors to drive the JTAG signals TCK, TMS, TDI and to get the value of the input signal TDO. Signed-off-by: Stefano Babic <sbabic@denx.de>
* | | ns16550: Add WATCHDOG_RESET to putc for short watchdog timeout boardsStefan Roese2010-10-131-0/+9
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call watchdog_reset() upon newline. This is done here in putc since the environment code uses a single puts() to print the complete envrironment upon "printenv". So we can't put this watchdog call in puts(). This is needed for boards with a very short watchdog timeout, like the lwmon5 with a 100ms timeout. Without this patch this board resets in the commands with long outputs, like "printenv" or "fdt print". Note that the image size is not increased with this patch when CONFIG_HW_WATCHDOG or CONFIG_WATCHDOG are not defined since the compiler optimizes this additional code away. Signed-off-by: Stefan Roese <sr@denx.de> Fix typo in comment. Signed-off-by: Wolfgang Denk <wd@denx.de>
* | Merge branch 'master' of git://git.denx.de/u-boot-armWolfgang Denk2010-10-1310-185/+298
|\ \
| * | ARMV7: Fixed baudrate setting in pl01x driverMatt Waddel2010-10-131-55/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | The pl01x serial driver was lacking the code to switch baudrates from the command line. Fixed by simply saving the new baudrate and calling serial_init() again. Also fixed CamelCase variables, I/O accessors and comment style. Signed-off-by: Matt Waddel <matt.waddel@linaro.org>
| * | mvsata_ide: adjust port init sequenceAlbert Aribaud2010-10-131-9/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mvsata_ide_initialize_port(): adjust init sequence (SStatus should be checked only after all writes to SControl) and return success/failure to ide_preinit(). Also, as some tests showed init durations in the hundreds of us, raise the time-out to 01 ms to be on the safe side. Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
| * | Merge branch 'at91' of git://git.denx.de/u-boot-atmelWolfgang Denk2010-10-113-53/+61
| |\ \
| | * | atmel_usart: change register access to C structureAndreas Bießmann2010-10-052-46/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces C structure definition for register footprint of atmel's usart. Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
| | * | at91_emac.c: poll for IDLE when writing PHYAndreas Bießmann2010-10-051-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | at91_emac.c: fix 'Warning: eth device name has a space!'Andreas Bießmann2010-10-051-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | Merge branch 'master' of git://git.denx.de/u-boot-imxWolfgang Denk2010-10-115-68/+166
| |\ \ \ | | | |/ | | |/|
| | * | MXC: Fix byte-ordering in SPI driver for i.MX31/i.MX51Stefano Babic2010-09-302-41/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | MXC: Correct SPI_CPOL setting in SPI driverStefano Babic2010-09-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | MXC: Add watchdog support to serial driverStefano Babic2010-09-291-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Calls WATCHDOG_RESET() inside serial driver for boards enabling watchdog. Signed-off-by: Stefano Babic <sbabic@denx.de>
| | * | Use common function to set GPIOs for MX3 and MX5Stefano Babic2010-09-293-23/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge branch 'sf' of git://git.denx.de/u-boot-blackfinWolfgang Denk2010-10-131-44/+82
|\ \ \ \
| * | | | sf: turn probe switch into a lookup tableReinhard Meyer2010-10-121-44/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows for arbitrarily long manufacturer ids following the JEDEC standard of 0x7f continuation bytes. It also makes adding new entries easier as it's just one element in an array. The downside is that it increases code size a bit, but we're talking ~50 bytes. Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | | | | usb: musb: only write CLRDATATOG when appropriateBryan Wu2010-10-131-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a change similar to what is already in the Linux driver. We should only program the CLRDATATOG bit when the current mode indicates that it is needed. Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | | | | USB-CDC: Prevent rx_req being enqueued twiceVitaly Kuzmichev2010-10-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After gadget reinitializaton (after tftp has been done once) packet_received may become equal to 1 due to nuking OUT_EP while disabling it in eth_reset_config. rx_submit called from usb_eth_init queues rx_req first time. But the first call of usb_eth_recv from NetLoop queues rx_req again due to packet_received = 1. The following flow shows the path of functions calls when this happens: net/net.c:NetLoop | +-net/eth.c:eth_init | ether.c:usb_eth_init | | | +-udc_driver:usb_gadget_handle_interrupts | | udc_driver:... | | ether.c:eth_setup | | ether.c:eth_set_config | | ether.c:eth_reset_config | | udc_driver:usb_ep_disable | | udc_driver:nuke | | ether.c:rx_complete | | ether.c: packet_received = 1; | | | +-ether.c:rx_submit | udc_driver:usb_ep_queue --- The first time when rx_req is queued | +-net/eth.c:eth_rx ether.c:usb_eth_recv | +-udc_driver:usb_gadget_handle_interrupts | udc_driver:... --- no interrupts, returning +-ether.c: if (packet_received) { ... ether.c:rx_submit udc_driver:usb_ep_queue --- The second time! Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
* | | | | USB-CDC: Fix tx/rx_req memory leaksVitaly Kuzmichev2010-10-131-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove and fix needless and destructive operations with tx/rx_req. 1) 'req' in rx_complete is always not NULL and always equals to rx_req 2) Free allocated tx_req if rx_req allocation has failed 3) Do not zero out tx/rx_req in usb_eth_init, leave this for eth_reset_config which will be called at the next use of usb0 4) Additional check in usb_eth_recv is not required Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
* | | | | USB: Make non-bulk delay longer in OHCIMarek Vasut2010-10-131-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | This fixes TIMEOUT with my Kingston 32GB USB3.0 flashdrive, which I experienced on my PXA270 (USB 1.1) Vpac270 board. Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
* | | | led_display: split led display support into generic and hw-dependent partsIlya Yanok2010-10-122-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split the display command into generic interface and hardware-specific realization for PDSP188x LED display found on hmi1001 and manroland boards. Simple interface for LED displays is defined in include/led-display.h and described in doc/README.LED_display. Driver-specific implementation was moved into drivers/misc/pdsp188x.c file (enabled with CONFIG_PDSP188x set). Signed-off-by: Ilya Yanok <yanok@emcraft.com>
* | | | Merge branch 'master' of git://git.denx.de/u-boot-cfi-flashWolfgang Denk2010-10-121-1/+1
|\ \ \ \
| * | | | cfi_flash: Fix "Unknown FLASH" error messageJohn Schmoller2010-10-121-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge branch 'master' of git://git.denx.de/u-boot-netWolfgang Denk2010-10-1211-892/+2156
|\ \ \ \
| * | | | smc91111: add write_hwaddrThomas Chou2010-10-111-16/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | davinci_emac: davinci_eth_set_mac_addr to ->write_hwaddrBen Gardiner2010-10-111-41/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | net: Move Emaclite to NET_MULTIMichal Simek2010-10-111-37/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | net: Fix emaclite driver to support little-endian microblazeMichal Simek2010-10-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support New emaclite AXI IP. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | | | mpc5xxx_fec: add call to reset_phy() after PHY initializationIlya Yanok2010-10-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | drivers/net/at91_emac.c: change return valuesAndreas Bießmann2010-10-111-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | drivers/net/at91_emac.c: increase timeout for autonegotiationAndreas Bießmann2010-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | NET: add ENC28J60 driver using SPI frameworkReinhard Meyer2010-10-113-0/+1230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | UEC PHY: Speed up initial PHY neg.Joakim Tjernlund2010-10-111-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | UEC PHY: Remove strange 0.5 sec delayJoakim Tjernlund2010-10-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | UEC: Don't udelay needlesslyJoakim Tjernlund2010-10-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | NET: move legacy enc28j60.c to sidetrack as enc28j60_lpc2292.cReinhard Meyer (-VC)2010-10-112-1/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | mtd: OneNAND: add support for OneNAND manufactured by NumonyxEnric Balletbo i Serra2010-10-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Followup fixes on the mtdparts spread patchsetScott Wood2010-10-111-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | mtd: add an mtd method for get_len_incl_bad()Ben Gardiner2010-10-111-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | nand: remove dead code and suspend/resumeScott Wood2010-10-115-324/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | nand erase: .spread, .part, .chip subcommandsScott Wood2010-10-111-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | nand util: read/write: accept unaligned lengthScott Wood2010-10-112-37/+63
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
OpenPOWER on IntegriCloud