summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* DTT: Issue one-shot command on AD7414 (LM75 code) to read tempStefan Roese2008-06-031-0/+13
| | | | | | | | | | | | | | On AD7414 the first value upon bootup is not read correctly. This is most likely because of the 800ms update time of the temp register in normal update mode. To get current values each time we issue the "dtt" command including upon powerup we switch into one-short mode. This patch fixes the problem on AD7414 equipped boards (Sequoia, Canyonlands etc), that temp value printed in the bootup log was incorrect. Signed-off-by: Stefan Roese <sr@denx.de>
* SPI Flash subsystemHaavard Skinnemoen2008-06-034-0/+616
| | | | | | | | | | This adds a new SPI flash subsystem. Currently, only AT45 DataFlash in non-power-of-two mode is supported, but some preliminary support for other flash types is in place as well. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
* atmel_spi: Driver for the Atmel SPI controllerHans-Christian Egtvedt2008-06-033-0/+306
| | | | | | | | | | | | | | | This adds a driver for the SPI controller found on most AT91 and AVR32 chips, implementing the new SPI API. Changed in v4: - Update to new API - Handle zero-length transfers appropriately. The user may send a zero-length SPI transfer with SPI_XFER_END set in order to deactivate the chip select after a series of transfers with chip select active. This is useful e.g. when polling the status register of DataFlash. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
* SPI API improvementsHaavard Skinnemoen2008-06-034-61/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch gets rid of the spi_chipsel table and adds a handful of new functions that makes the SPI layer cleaner and more flexible. Instead of the spi_chipsel table, each board that wants to use SPI gets to implement three hooks: * spi_cs_activate(): Activates the chipselect for a given slave * spi_cs_deactivate(): Deactivates the chipselect for a given slave * spi_cs_is_valid(): Determines if the given bus/chipselect combination can be activated. Not all drivers may need those extra functions however. If that's the case, the board code may just leave them out (assuming they know what the driver needs) or rely on the linker to strip them out (assuming --gc-sections is being used.) To set up communication parameters for a given slave, the driver needs to call spi_setup_slave(). This returns a pointer to an opaque spi_slave struct which must be passed as a parameter to subsequent SPI calls. This struct can be freed by calling spi_free_slave(), but most driver probably don't want to do this. Before starting one or more SPI transfers, the driver must call spi_claim_bus() to gain exclusive access to the SPI bus and initialize the hardware. When all transfers are done, the driver must call spi_release_bus() to make the bus available to others, and possibly shut down the SPI controller hardware. spi_xfer() behaves mostly the same as before, but it now takes a spi_slave parameter instead of a spi_chipsel function pointer. It also got a new parameter, flags, which is used to specify chip select behaviour. This may be extended with other flags in the future. This patch has been build-tested on all powerpc and arm boards involved. I have not tested NIOS since I don't have a toolchain for it installed, so I expect some breakage there even though I've tried fixing up everything I could find by visual inspection. I have run-time tested this on AVR32 ATNGW100 using the atmel_spi and DataFlash drivers posted as a follow-up. I'd like some help testing other boards that use the existing SPI API. But most of all, I'd like some comments on the new API. Is this stuff usable for everyone? If not, why? Changed in v4: - Build fixes for various boards, drivers and commands - Provide common struct spi_slave definition that can be extended by drivers - Pass a struct spi_slave * to spi_cs_activate and spi_cs_deactivate - Make default bus and mode build-time configurable - Override default SPI bus ID and mode on mx32ads and imx31_litekit. Changed in v3: - Add opaque struct spi_slave for controller-specific data associated with a slave. - Add spi_claim_bus() and spi_release_bus() - Add spi_free_slave() - spi_setup() is now called spi_setup_slave() and returns a struct spi_slave - soft_spi now supports four SPI modes (CPOL|CPHA) - Add bus parameter to spi_setup_slave() - Convert the new i.MX32 SPI driver - Convert the new MC13783 RTC driver Changed in v2: - Convert the mpc8xxx_spi driver and the mpc8349emds board to the new API. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Tested-by: Guennadi Liakhovetski <lg@denx.de>
* Fix warnings from gcc-4.3.0 build on a ppc hostKumar Gala2008-06-031-0/+2
| | | | | | | | | | | * The cfi_flash.c memset fix actual allows the board to boot so there is a bit more going on here than just resolving warnings associated with uninitialized variables. * include/asm/bitops.h:302: warning: '__swab32p' is static but used in inline function 'ext2_find_next_zero_bit' which is not static Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Merge remote branch 'u-boot-at91/for-1.3.4'Wolfgang Denk2008-06-034-2/+167
|\
| * Merging Stelian Pop AT91 patchesJean-Christophe PLAGNIOL-VILLARD2008-05-244-2/+167
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge branch 'testing-V2' Conflicts: board/atmel/at91cap9adk/Makefile Fixing copyright board/atmel/at91sam9260ek/Makefile Fixing copyright board/atmel/at91sam9260ek/u-boot.lds Delete no more needed ld script Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | * Add ATMEL LCD driverStelian Pop2008-05-102-0/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the ATMEL LCDC driver which is used on some AT91 and AVR platforms. Is has been tested with the AT91CAP9ADK, AT91SAM9261EK, AT91SAM9263EK and AT91SAM9RLEK boards. Adaptation for AVR32 should probably be easy. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | * AT91SAM9263EK supportStelian Pop2008-05-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the AT91SAM9263 chip and the AT91SAM9263EK board. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | * AT91SAM9261EK supportStelian Pop2008-05-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the AT91SAM9261 chip and the AT91SAM9261EK board. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| | * Fix @ -> <at> substitutionStelian Pop2008-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When applying the AT91CAP9 patches upstream, something transformed the '@' character into the ' <at> ' sequence. The patch below restores the original form in all the places where it has been modified (the AT91CAP9 files, the AT91SAM9260 files which were copied from AT91CAP9, and a couple of other files where the ' <at> ' sequence was present). Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | | nand: Correct NAND erase percentage outputDirk Behme2008-05-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For NAND erase sizes smaller than one NAND erase block, erase percentage output becomes grater than 100% e.g. -- cut -- > nand info Device 0: NAND 64MiB 1,8V 8-bit, sector size 16 KiB > nand erase 0x100000 0x2000 NAND erase: device 0 offset 0x100000, size 0x2000 Erasing at 0x100000 -- 200% complete. OK > -- cut -- Correct this and give user a warning that more is erased than specified: -- cut -- > nand erase 0x100000 0x2000 NAND erase: device 0 offset 0x100000, size 0x2000 Warning: Erase size 0x00002000 smaller than one erase block 0x00004000 Erasing 0x00004000 instead Erasing at 0x100000 -- 100% complete. OK > -- cut -- Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
* | | Fix endianess conversion in usb_ohci.cChristian Eggers2008-05-221-3/+3
| | | | | | | | | | | | | | | Signed-off-by: Christian Eggers <ceggers@gmx.de> Signed-off-by: Markus Klotzbuecher <mk@denx.de>
* | | USB: add support for multiple PCI OHCI controllersSergei Poselenov2008-05-221-1/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Add new configuration variable CONFIG_PCI_OHCI_DEVNO. In case of several PCI USB controllers on a board this variable specifys which controller to use. Also add USB support for sokrates board. See doc/README.generic_usb_ohci for details. Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com> Signed-off-by: Markus Klotzbuecher <mk@denx.de>
* | Big white-space cleanup.Wolfgang Denk2008-05-2186-1721/+1796
| | | | | | | | | | | | | | | | | | | | | | This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de>
* | drivers/pcmcia: add missing i82365Jean-Christophe PLAGNIOL-VILLARD2008-05-192-4/+1
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | Revert "pci: Add CONFIG_PCI_SKIP_HOST_BRIDGE config option"Wolfgang Denk2008-05-121-10/+3
| | | | | | | | | | This reverts commit 55774b512fdf63c0516d441cc5da7c54bbffb7f2 which broke many PowerPC boards.
* | Update pci code to use phys_addr_tBecky Bruce2008-05-101-4/+4
| | | | | | | | | | | | | | | | Physical addrs need to be represented by phys_addr_t, not unsigned long. Otherwise, systems that use CONFIG_PHYS_64BIT are going to fail mightily. Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
* | Fix @ -> <at> substitutionStelian Pop2008-05-101-1/+1
|/ | | | | | | | | | | | When applying the AT91CAP9 patches upstream, something transformed the '@' character into the ' <at> ' sequence. The patch below restores the original form in all the places where it has been modified (the AT91CAP9 files, the AT91SAM9260 files which were copied from AT91CAP9, and a couple of other files where the ' <at> ' sequence was present). Signed-off-by: Stelian Pop <stelian@popies.net>
* drivers/net/tsec.c: Fix typo.Wolfgang Denk2008-05-041-1/+1
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* TSEC: add config options for VSC8601 RGMII PHYAndre Schwarz2008-05-032-4/+13
| | | | | | | | | | | | | | | | | The Vitesse VSC8601 RGMII PHY has internal delay for both Rx and Tx clock lines. They are configured using 2 bits in extended register 0x17. Therefore CFG_VSC8601_SKEW_TX and CFG_VSC8601_SKEW_RX have been introduced with valid values 0-3 giving 0.0, 1.4,1.7 and 2.0ns delay. Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de> Acked-by: Andy Fleming <afleming@freescale.com> Acked-by: Ben Warren <biggerbadderben@gmail.com> -- drivers/net/tsec.c | 6 ++++++ drivers/net/tsec.h | 3 +++ 2 files changed, 9 insertions(+), 0 deletions(-)
* pxa: fix pcmcia operation on 'i' may be undefinedJean-Christophe PLAGNIOL-VILLARD2008-05-031-3/+5
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
* RTC: Fix month offset by one problem in M41T62 RTC driverStefan Roese2008-05-031-2/+2
| | | | | | | | | | This patch fixes a problem with the month being read and written incorrectly (offset by one). This only gets visible by also using the Linux driver (rtc-m41t80). Tested on AMCC Canyonlands. Signed-off-by: Stefan Roese <sr@denx.de>
* onenand: rename 16 bit memory copy into memcpy_16() to avoid conflictsWolfgang Denk2008-05-011-4/+4
| | | | | | | | Onenand needs a version of memcpy() which performs 16 bit accesses only; make sure the name does not conflict with the standard function. Signed-off-by: Wolfgang Denk <wd@denx.de>
* ColdFire: Fix ethernet hang issue for mcf547x_8xTsiChung Liew2008-04-301-1/+21
| | | | | | | | The ethernet hang is caused by receiving buffer in DRAM is not yet ready due to access cycles require longer time in DRAM. Relocate DMA buffer descriptors from DRAM to internal SRAM. Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
* NE2000: Fix regresssion introduced by e710185aae90 on non AX88796Jean-Christophe PLAGNIOL-VILLARD2008-04-286-227/+252
| | | | | | | | | Move non-inlied functions into specific drivers file Set get_prom as weak Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Vlad Lungu <vlad@comsys.ro> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* minor cs8900 driver clean upGuennadi Liakhovetski2008-04-282-9/+7
| | | | | | | | Remove a redundant register definition, clean up some coding style violations. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* rtl8169: fix compiler warningsGuennadi Liakhovetski2008-04-281-5/+5
| | | | | | Fix multiple compiler warnings related to argument type mismatch. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
* pcnet.c: fix a merge issueWolfgang Denk2008-04-281-54/+0
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* cfi-flash: Add CFG_FLASH_AUTOPROTECT_LISTMatthias Fuchs2008-04-251-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds a configurable flash auto protection list that can be used to make U-Boot protect flash regions in flash_init(). The idea has been discussed on the u-boot mailing list starting on Nov 18th, 2007. Even this patch brings a new feature it is used as a bugfix for 4xx platforms where flash_init() does not completely protect the monitor's flash range in all situations. U-Boot protects the flash range from CFG_MONITOR_BASE to (CFG_MONITOR_BASE + monitor_flash_len - 1) by default. This does not include the reset vector at 0xfffffffc. Example: #define CFG_FLASH_AUTOPROTECT_LIST {{0xfff80000, 0x80000}} This config option will auto protect the last 512k of flash that contains the bootloader on board like APC405 and PMC405. Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
* Merge branch 'master' of git://www.denx.de/git/u-boot-nand-flashWolfgang Denk2008-04-251-9/+8
|\
| * PATCH - Fix oob data copied into supplied bufferTroy Kisky2008-04-211-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch correctly sets the oobavail variable and fixes a bug where the oob data was not valid when there where multiple groups in oobfree. First segment fixes a typo Second segment fixes a bug where oob data may be copied incorrectly. Third segment adds an error message when exiting due to write protect. Forth segment fixes a bug where oobavail may be set incorrectly. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* | NE2000: coding style cleanupJean-Christophe PLAGNIOL-VILLARD2008-04-254-319/+348
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | Fixed pcnet io_baseVlad Lungu2008-04-241-0/+55
| | | | | | | | | | | | Bus and phys address are not always the same Signed-off-by: Vlad Lungu <vlad@comsys.ro>
* | drivers/net/pcnet.c: Coding Style cleanup.Wolfgang Denk2008-04-241-360/+370
| | | | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* | Added Am79C970A chip id to pcnetVlad Lungu2008-04-241-0/+3
| | | | | | | | Signed-off-by: Vlad Lungu <vlad@comsys.ro>
* | fsl_pci: Only modify registers if we have themKumar Gala2008-04-241-1/+2
| | | | | | | | | | | | pme_msg_det exists only on PCIe controllers only set it if we are a "bridge". Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | Merge branch 'master' of git://www.denx.de/git/u-boot-videoWolfgang Denk2008-04-241-0/+5
|\ \
| * | video: Add missing free for logo memoryMatthias Fuchs2008-04-211-0/+5
| |/ | | | | | | | | | | This patch adds two missing free()s. Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
* | USB: remove a cpu bug workaround for an unsupported architecture.Markus Klotzbücher2008-04-241-18/+4
| | | | | | | | Signed-off-by: Markus Klotzbuecher <mk@denx.de>
* | USB: fix those pesky aliasing warnings issued by gcc-4.2Markus Klotzbücher2008-04-241-4/+4
|/ | | | | Signed-off-by: Markus Klotzbuecher <mk@denx.de> Signed-off-by: Detlev Zundel <dzu@denx.de>
* RTC driver for MC13783Guennadi Liakhovetski2008-04-182-0/+83
| | | | | | | MC13783 is a multifunction IS with an SPI interface to the host. This driver handles the RTC controller in this chip. Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
* New i.MX31 SPI driverGuennadi Liakhovetski2008-04-182-0/+167
| | | | | | | | | This is an SPI driver for i.MX and MXC based SoCs from Freescale. So far only implemented and tested on i.MX31, can with a modified register layout and definitions be used for i.MX27, I think, MXC CPUs have similar SPI controllers too. Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
* Merge branch 'master' of git://www.denx.de/git/u-boot-netWolfgang Denk2008-04-182-0/+687
|\
| * Clean up smsc911x driverGuennadi Liakhovetski2008-04-151-349/+368
| | | | | | | | | | | | | | | | | | Replace direct register address derefencing with accessor functions. Restrict explicitly 32-bit bus-width, extend affected configurations respectively. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * This patch adds a driver for the following smsc network controllers:Sascha Hauer2008-04-152-0/+668
| | | | | | | | | | | | | | | | | | | | | | | | | | LAN9115 LAN9116 LAN9117 LAN9215 LAN9216 LAN9217 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Guennadi Liakhovetski<lg@denx.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* | Clean up dataflash partitioningUlf Samuelsson2008-04-181-42/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the board dependent parts from "drivers/mtd/dataflash.c". Each board relying on this, will have the appropriate code in a new file, "partition.c" in the board directory. board Makefiles updated to use the file. The dataflash partitions are aligned on sector/page boundaries. The CONFIG_NEW_DF_PARTITION was used to create named partitions This is now the default operation, and the CONFIG variable is removed. Signed-off-by: Ulf Samuelsson <ulf@atmel.com>
* | Remove conflicting NAND IDMike Frysinger2008-04-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | There are two NAND entries with ID 0xDC and this obviously causes problems. In the kernel, they punted the first entry, so we should do the same. See this upstream e-mail for more info: http://lists.infradead.org/pipermail/linux-mtd/2007-July/018795.html Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | ds174x: Fix warning on return in rtc_get and rtc_set functionsJean-Christophe PLAGNIOL-VILLARD2008-04-171-2/+1
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | Remove duplicate #undef SHOW_INFO in drivers/usb/usb_ohci.cGururaja Hebbar K R2008-04-171-1/+0
| | | | | | | | Signed-off-by: gururaja hebbar <gururajakr@sanyo.co.in>
OpenPOWER on IntegriCloud