aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi
AgeCommit message (Collapse)Author
2011-06-21ATMEL spi_dataflash driver - fix to build againReinhard Meyer
The rework effort for ATMEL (AT91/AVR32) accidentially broke build of this driver. Fix this to make it build again. However this driver should be reworked as soon as possible! Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2011-06-21mxc_spi.c: typo fixedHelmut Raiger
Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
2011-05-18ATMEL: fix dataflash (dirty) this file should be converted to struct SoC accessReinhard Meyer
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2011-05-18ATMEL: fix related common atmel driver filesReinhard Meyer
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2011-04-30Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxWolfgang Denk
2011-04-30spi: add new driver for OpenCores tiny_spiThomas Chou
This patch adds support for OpenCores tiny_spi. http://opencores.org/project,tiny_spi Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
2011-04-29powerpc: eSPI and eSPI controller supportMingkai Hu
Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com> Singed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com> Signed-off-by: Shaohui Xie <b21989@freescale.com> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-04-27Merge branch 'master' of git://git.denx.de/u-boot-armWolfgang Denk
2011-04-27IMX: MX31: Cleanup include files and drop nasty #ifdef in driversStefano Babic
As exception among the i.MX processors, the i.MX31 has headers without general names (mx31-regs.h, mx31.h instead of imx-regs.h and clock.h). This requires several nasty #ifdef in the drivers to include the correct header. The patch cleans up the driver and renames the header files as for the other i.MX processors. Signed-off-by: Stefano Babic <sbabic@denx.de>
2011-04-25bfin_spi: add spi_set_speedThomas Chou
The new speed will be applied by spi_claim_bus. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-13add CONFIG_SPI_IDLE_VAL for cf_spi.c to allow use of spi_mmcWolfgang Wegner
This patch adds CONFIG_SPI_IDLE_VAL to cf_spi.c The default setting is 0x0 to behave same as current version, in case CONFIG_SPI_MMC is set, the value is set to 0xFFFF (all ones). In either case, the value can be overwritten by board configuration. Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de> Signed-off-by: Andy Fleming <afleming@freescale.com>
2011-04-08Blackfin: BF50x: new processor portMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-03-27Coding Style cleanup: remove trailing empty linesWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-02-08altera_spi: add spi_set_speedThomas Chou
Added this for mmc_spi driver. Though altera spi core does not support programmable speed. It is fixed when configured in sopc-builder. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Scott McNutt <smcnutt@psyent.com>
2011-02-04Merge branch 'master' of git://git.denx.de/u-boot-shWolfgang Denk
2011-02-02spi: add support SuperH SPI moduleYoshihiro Shimoda
SH7757 has SPI module. This patch supports it. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2011-02-02SPI: mxc_spi: replace fixed offsets with structuresStefano Babic
This patch cleans driver code replacing all accesses to registers with fixed offsets with a corresponding structure. Signed-off-by: Stefano Babic <sbabic@denx.de>
2011-02-02SPI: mxc_spi: add SPI clock calculation and setup to the driverAnatolij Gustschin
The MXC SPI driver didn't calculate the SPI clock up to now and just used highest possible divider 512 for DATA RATE in the control register. This results in very low transfer rates. The patch adds code to calculate and setup the SPI clock frequency for transfers. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Stefano Babic <sbabic@denx.de>
2011-02-02SPI: mxc_spi: fix swapping bug and add missing swapping in unaligned rx caseAnatolij Gustschin
We need to shift only one time in each cycle in the swapping loop for unaligned tx case. Currently two byte shift operations are performed in each loop cycle causing zero gaps in the transmited data, so not all data scheduled for transmition is actually transmited. The proper swapping in unaligned rx case is missing, so add it as we need to put the received data into the rx buffer in the correct byte order. Signed-off-by: Anatolij Gustschin <agust@denx.de> Tested-by: Stefano Babic <sbabic@denx.de>
2011-02-02SPI: mxc_spi: add support for i.MX35 processorStefano Babic
Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-12-11OMAP3: SPI driverDirk Behme
CC: Ruslan N. Araslanov <byaaka@yandex.ru> Signed-off-by: Ruslan Araslanov <ruslan.araslanov@vitecmm.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-17Switch from archive libraries to partial linkingSebastien Carlier
Before this commit, weak symbols were not overridden by non-weak symbols found in archive libraries when linking with recent versions of binutils. As stated in the System V ABI, "the link editor does not extract archive members to resolve undefined weak symbols". This commit changes all Makefiles to use partial linking (ld -r) instead of creating library archives, which forces all symbols to participate in linking, allowing non-weak symbols to override weak symbols as intended. This approach is also used by Linux, from which the gmake function cmd_link_o_target (defined in config.mk and used in all Makefiles) is inspired. The name of each former library archive is preserved except for extensions which change from ".a" to ".o". This commit updates references accordingly where needed, in particular in some linker scripts. This commit reveals board configurations that exclude some features but include source files that depend these disabled features in the build, resulting in undefined symbols. Known such cases include: - disabling CMD_NET but not CMD_NFS; - enabling CONFIG_OF_LIBFDT but not CONFIG_QE. Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
2010-10-11Merge branch 'master' of git://git.denx.de/u-boot-imxWolfgang Denk
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-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-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>
2010-09-03AT91/AVR32: atmel_spi.c: flush RDR before next SPI transactionReinhard Meyer
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2010-07-15Merge branch 'master' of ../masterWolfgang Denk
2010-07-13Blackfin: bfin_spi: support gpios as chip selectsMike Frysinger
Rather than only support the pins dedicated as chip selects, utilize the gpio framework to support any gpio pin. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-07-13Blackfin: bfin_spi: convert to portmux frameworkMike Frysinger
Rather than bang MMRs directly, use the new portmux framework to handle the details. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-07-05Davinci: SPI: add the missing v2 patch changesNick Thompson
Two Indentation fixes. Catch requests for full-duplex transfers when driver configured for half-duplex operation only. Signed-off-by: Nick Thompson <nick.thompson@ge.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-06-22Davinci: SPI performance enhancementsNick Thompson
The following restructuring and optimisations increase the SPI read performance from 1.3MiB/s (on da850) to 2.87MiB/s (on da830): Remove continual revaluation of driver state from the core of the copy loop. State can not change during the copy loop, so it is possible to move these evaluations to before the copy loop. Cost is more code space as loop variants are required for each set of possible configurations. The loops are simpler however, so the extra is only 128bytes on da830 with CONFIG_SPI_HALF_DUPLEX defined. Unrolling the first copy loop iteration allows the TX buffer to be pre-loaded reducing SPI clock starvation. Unrolling the last copy loop iteration removes testing for the final loop iteration every time round the loop. Using the RX buffer empty flag as a transfer throttle allows the assumption that it is always safe to write to the TX buffer, so polling of TX buffer full flag can be removed. Signed-off-by: Nick Thompson <nick.thompson@ge.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-06-17Merge branch 'master' of git://git.denx.de/u-boot-armWolfgang Denk
2010-06-08DaVinci: Improve DaVinci SPI speed.Delio Brignoli
I have updated this patch based on the comments [1] by Wolfgang Denk and removed unused variables. [1][http://lists.denx.de/pipermail/u-boot/2010-May/071728.html] Reduce the number of reads per byte transferred on the BUF register from 2 to 1 and take advantage of the TX buffer in the SPI module. On LogicPD OMAP-L138 EVM, SPI read throughput goes up from ~0.8Mbyte/s to ~1.3Mbyte/s. Tested with a 2Mbyte image file. Remove unused variables in the spi_xfer() function. Signed-off-by: Delio Brignoli <dbrignoli@audioscience.com> Tested-by: Ben Gardiner <bengardiner@nanometrics.ca> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-05-28spi: add altera spi controller supportThomas Chou
This patch adds the driver of altera spi controller, which is used as epcs/spi flash controller. It also works with mmc_spi driver. This driver support more than one spi bus, with base list declared #define CONFIG_SYS_ALTERA_SPI_LIST { BASE_0,BASE_1,... } Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Tested-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Scott McNutt <smcnutt@psyent.com>
2010-05-05SPI: added support for MX51 to mxc_spiStefano Babic
This patch add SPI support for the MX51 processor. Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-04-21Move arch/ppc to arch/powerpcStefan Roese
As discussed on the list, move "arch/ppc" to "arch/powerpc" to better match the Linux directory structure. Please note that this patch also changes the "ppc" target in MAKEALL to "powerpc" to match this new infrastructure. But "ppc" is kept as an alias for now, to not break compatibility with scripts using this name. Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Acked-by: Detlev Zundel <dzu@denx.de> Acked-by: Kim Phillips <kim.phillips@freescale.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Anatolij Gustschin <agust@denx.de>
2010-04-13ppc: Move cpu/$CPU to arch/ppc/cpu/$CPUPeter Tyser
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-03-12Prepare v2010.03-rc1Wolfgang Denk
Coding style cleanup, update CHANGELOG. Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-02-12convert common files to new SoC accessJens Scharsig
* add's a warning to all files, which need update to new SoC access * convert common files in cpu/../at91 and a lot of drivers to use c stucture SoC access Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
2010-02-12SPI: Fix 32 bit transfers in mxc_spi.cMagnus Lilja
Commit f9b6a1575d9f1ca192e4cb60e547aa66f08baa3f, "i.MX31: fix SPI driver for shorter than 32 bit" broke 32 bit transfers. This patch makes single 32 bit transfer work again. Transfer lengths that are known not to work will abort and print an error message. Tested on i.MX31 Litekit and i.MX31 PDK using 32 bit transfers to the MC13783/ATLAS chip (using the 'date' command). Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
2010-02-12TI DaVinci: Driver for the davinci SPI controllerSekhar Nori
This adds a driver for the SPI controller found on davinci based SoCs from Texas Instruments. Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-01-17Blackfin: bfin_spi: round up clock dividerCliff Cai
If the requested clock cannot be exactly obtained, round it up so that we err on the side of slightly slower rather than slightly faster. Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-17Blackfin: bfin_spi: let boards control idle valueCliff Cai
Some SPI devices like to see high idle values rather than low. Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-11-23Add support for CS2 dataflash for Atmel-SPI.Remy Bohmer
The only missing chipselect line support is CS2, and I need it on CS2... Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-07-14Coldfire: Consolidate DSPI driverTsiChung Liew
Unify both MCF5227x and MCF5445x DSPI driver in CPU to driver/spi folder for common use. Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
2009-07-07Merge branch 'master' of git://git.denx.de/u-boot-armWolfgang Denk
Conflicts: drivers/spi/Makefile Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-06-26spi: Add Marvell Kirkwood SPI driverPrafulla Wadaskar
This patch adds a SPI driver for the Marvell Kirkwood SoC's. Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>