summaryrefslogtreecommitdiffstats
path: root/drivers/spi
Commit message (Collapse)AuthorAgeFilesLines
...
| * SPI: Add SPI driver support for Marvell Armada100Ajay Bhargav2011-10-272-0/+229
| | | | | | | | | | | | | | This patch provides support for SPI emulated over SSP for Marvell Armada100 SOC. Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
* | GCC4.6: Squash warnings in kirkwood_spi.cMarek Vasut2011-10-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | kirkwood_spi.c:125:2: warning: format '%08X' expects type 'unsigned int', but argument 4 has type 'const void *' kirkwood_spi.c:125:2: warning: format '%08X' expects type 'unsigned int', but argument 5 has type 'void *' kirkwood_spi.c:160:5: warning: format '%08x' expects type 'unsigned int', but argument 2 has type 'void *' Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Mike Frysinger <vapier@gentoo.org>
* | GCC4.6: Squash warnings in fsl_espi.cMarek Vasut2011-10-271-3/+3
|/ | | | | | | | | | | | | | | | fsl_espi.c: In function 'spi_setup_slave': fsl_espi.c:100: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int' fsl_espi.c: In function 'spi_xfer': fsl_espi.c:237: warning: format '%08x' expects type 'unsigned int', but argument 5 has type 'const void *' fsl_espi.c:237: warning: format '%08x' expects type 'unsigned int', but argument 7 has type 'void *' Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Mike Frysinger <vapier@gentoo.org>
* Blackfin: bfin_spi: fix build error when DEBUG is definedMike Frysinger2011-10-161-1/+1
| | | | | | The new debug() changes pointed out debug code that rotted a little. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* IMX: uniform GPIO interface using GPIO frameworkStefano Babic2011-09-041-4/+4
| | | | | | | | | IMX processors has a slightly different interface to access GPIOs and do not make use of the provided GPIO framework. The patch substitutes mxc_ specific functions and make use of the API in asm/gpio.h Signed-off-by: Stefano Babic <sbabic@denx.de>
* AT91/SPI: fix atmel_dataflash_spi.c to allow building without warningsReinhard Meyer2011-08-031-3/+13
| | | | Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
* andes_spi: add andes_spi interfaceMacpaul Lin2011-07-253-0/+431
| | | | | | | | | andes_spi is an spi interface developed by Andes Tech. Signed-off-by: Macpaul Lin <macpaul@andestech.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Mike Frysinger <vapier@gentoo.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
* MX31: Cleanup clock functionStefano Babic2011-07-181-2/+0
| | | | | | | The patch provide the same API used with other i.MX processors and get rid of mx31_ functions. Signed-off-by: Stefano Babic <sbabic@denx.de>
* ATMEL spi_dataflash driver - fix to build againReinhard Meyer2011-06-211-2/+1
| | | | | | | | 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>
* mxc_spi.c: typo fixedHelmut Raiger2011-06-211-1/+1
| | | | Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
* ATMEL: fix dataflash (dirty) this file should be converted to struct SoC accessReinhard Meyer2011-05-181-37/+57
| | | | Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
* ATMEL: fix related common atmel driver filesReinhard Meyer2011-05-181-8/+8
| | | | Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
* Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxWolfgang Denk2011-04-302-0/+335
|\
| * powerpc: eSPI and eSPI controller supportMingkai Hu2011-04-292-0/+335
| | | | | | | | | | | | | | | | 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>
* | spi: add new driver for OpenCores tiny_spiThomas Chou2011-04-302-0/+249
|/ | | | | | | | This patch adds support for OpenCores tiny_spi. http://opencores.org/project,tiny_spi Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* Merge branch 'master' of git://git.denx.de/u-boot-armWolfgang Denk2011-04-271-7/+2
|\
| * IMX: MX31: Cleanup include files and drop nasty #ifdef in driversStefano Babic2011-04-271-7/+2
| | | | | | | | | | | | | | | | | | | | 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>
* | bfin_spi: add spi_set_speedThomas Chou2011-04-251-13/+19
|/ | | | | | | 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>
* add CONFIG_SPI_IDLE_VAL for cf_spi.c to allow use of spi_mmcWolfgang Wegner2011-04-131-3/+11
| | | | | | | | | | 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>
* Blackfin: BF50x: new processor portMike Frysinger2011-04-081-0/+2
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Coding Style cleanup: remove trailing empty linesWolfgang Denk2011-03-272-2/+0
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* altera_spi: add spi_set_speedThomas Chou2011-02-081-0/+5
| | | | | | | | | 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>
* Merge branch 'master' of git://git.denx.de/u-boot-shWolfgang Denk2011-02-043-0/+341
|\
| * spi: add support SuperH SPI moduleYoshihiro Shimoda2011-02-023-0/+341
| | | | | | | | | | | | | | 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>
* | SPI: mxc_spi: replace fixed offsets with structuresStefano Babic2011-02-021-66/+28
| | | | | | | | | | | | | | | | 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>
* | SPI: mxc_spi: add SPI clock calculation and setup to the driverAnatolij Gustschin2011-02-021-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | SPI: mxc_spi: fix swapping bug and add missing swapping in unaligned rx caseAnatolij Gustschin2011-02-021-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | SPI: mxc_spi: add support for i.MX35 processorStefano Babic2011-02-021-24/+72
|/ | | | Signed-off-by: Stefano Babic <sbabic@denx.de>
* OMAP3: SPI driverDirk Behme2010-12-113-0/+470
| | | | | | 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>
* Switch from archive libraries to partial linkingSebastien Carlier2010-11-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge branch 'master' of git://git.denx.de/u-boot-imxWolfgang Denk2010-10-111-48/+120
|\
| * MXC: Fix byte-ordering in SPI driver for i.MX31/i.MX51Stefano Babic2010-09-301-38/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Use common function to set GPIOs for MX3 and MX5Stefano Babic2010-09-291-8/+7
| | | | | | | | | | | | | | | | | | 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>
* | Blackfin: bfin_spi: add optional DMA supportMike Frysinger2010-10-021-27/+128
|/ | | | | | | | 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>
* Blackfin: bfin_spi: use same gpio cs define as LinuxMike Frysinger2010-09-211-2/+0
| | | | | | | | 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>
* AT91/AVR32: atmel_spi.c: flush RDR before next SPI transactionReinhard Meyer2010-09-031-2/+11
| | | | Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
* Merge branch 'master' of ../masterWolfgang Denk2010-07-151-186/+106
|\
| * Blackfin: bfin_spi: support gpios as chip selectsMike Frysinger2010-07-131-28/+57
| | | | | | | | | | | | | | 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>
| * Blackfin: bfin_spi: convert to portmux frameworkMike Frysinger2010-07-131-159/+50
| | | | | | | | | | | | | | Rather than bang MMRs directly, use the new portmux framework to handle the details. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | Davinci: SPI: add the missing v2 patch changesNick Thompson2010-07-051-2/+6
|/ | | | | | | | | | 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>
* Davinci: SPI performance enhancementsNick Thompson2010-06-221-67/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge branch 'master' of git://git.denx.de/u-boot-armWolfgang Denk2010-06-171-34/+43
|\
| * DaVinci: Improve DaVinci SPI speed.Delio Brignoli2010-06-081-34/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | spi: add altera spi controller supportThomas Chou2010-05-282-0/+166
|/ | | | | | | | | | | | | 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>
* SPI: added support for MX51 to mxc_spiStefano Babic2010-05-051-20/+211
| | | | | | This patch add SPI support for the MX51 processor. Signed-off-by: Stefano Babic <sbabic@denx.de>
* Move arch/ppc to arch/powerpcStefan Roese2010-04-211-1/+1
| | | | | | | | | | | | | | | | | 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>
* ppc: Move cpu/$CPU to arch/ppc/cpu/$CPUPeter Tyser2010-04-131-1/+1
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Prepare v2010.03-rc1Wolfgang Denk2010-03-121-1/+0
| | | | | | Coding style cleanup, update CHANGELOG. Signed-off-by: Wolfgang Denk <wd@denx.de>
* convert common files to new SoC accessJens Scharsig2010-02-121-0/+4
| | | | | | | | * 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>
OpenPOWER on IntegriCloud