summaryrefslogtreecommitdiff
path: root/drivers/spi
AgeCommit message (Collapse)Author
2012-09-07Add quad SPI support for VybridJingchang Lu
Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
2012-02-27mxc_spi: move machine specifics into CPU headersEric Nelson
Move (E)CSPI register declarations into the imx-regs.h files for each supported CPU Introduce two new macros to control conditional setup MXC_CSPI - Used for processors with the Configurable Serial Peripheral Interface (MX3x) MXC_ECSPI - For processors with Enhanced Configurable... (MX5x, MX6x) Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com> Acked-by: Dirk Behme <dirk.behme@de.bosch.com> Acked-by: Stefano Babic <sbabic@denx.de> Acked-by: Jason Liu <jason.hui@linaro.org> Tested-by: Jason Liu <jason.hui@linaro.org>
2012-02-12kirkwood_spi: correct access to irq_mask registerIan Campbell
Problem appears to have been present since day one but masked because alignment aborts were not enabled. ca4b55800ed7 "arm, arm926ejs: always do cpu critical inits" turned on alignment aborts and uncovered this latent problem. Signed-off-by: Ian Campbell <ijc@hellion.org.uk> Acked-By: Jason Cooper <u-boot@lakedaemon.net> Tested-By: Holger Brunck <holger.brunck@keymile.com> Cc: Prafulla Wadaskar <prafulla@marvell.com> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
2012-02-12mx28: fix i.MX28 spi driverMatthias Fuchs
The generic spi flash driver (drivers/mtd/spi/spi_flash.c) uses the spi low level driver's spi_xfer() function with len=0 to deassert the SPI flash' chip select. But the i.MX28 spi driver rejects this call due to len=0. This patch implements an exception for len=0 with the SPI_XFER_END flag set. This results in an extra read with the chip select being deasserted afterwards. There seems to be no way to deassert the signal by hand. Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu> Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-12-24tegra2: spi: Support SPI / UART switchSimon Glass
Add the SPI / UART switch logic into the Tegra2 SPI driver so that it can co-exist with the NS16550 UART. We need the ns16550.h header for NS16550_t for now. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
2011-12-24tegra2: spi: Add SPI driver for Tegra2 SOCTom Warren
This driver supports SPI on Tegra2, running at 48MHz. Signed-off-by: Tom Warren <twarren@nvidia.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-11-16drivers/spi/atmel_spi.c: Fix GCC 4.6 warningAnatolij Gustschin
Fix: atmel_spi.c: In function 'spi_xfer': atmel_spi.c:139:7: warning: variable 'ret' set but not used [-Wunused-but-set-variable] Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-11-11iMX28: Add SPI driverMarek Vasut
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
2011-10-28Merge branch 'master' of git://git.denx.de/u-boot-armWolfgang Denk
* 'master' of git://git.denx.de/u-boot-arm: ARM: Add Calxeda Highbank platform dkb: make mmc command as default enabled Marvell: dkb: add mmc support ARM: pantheon: add mmc definition davinci: remove config.mk file from the sources ARM:AM33XX: Add support for TI AM335X EVM ARM:AM33XX: Added timer support ARM:AM33XX: Add emif/ddr support ARM:AM33XX: Add clock definitions ARM:AM33XX: Added support for AM33xx omap3/emif4: fix registers definition davinci: remove obsolete macro CONFIG_EMAC_MDIO_PHY_NUM davinci: emac: add support for more than 1 PHYs davinci: emac: add new features to autonegotiate for EMAC da850evm: Move LPSC configuration to board_early_init_f() omap4_panda: Build in cmd_gpio support on panda omap: Don't use gpio_free to change direction to input mmc: omap: Allow OMAP_HSMMC[23]_BASE to be unset OMAP3: overo : Add environment variable optargs to bootargs OMAP3: overo: Move ethernet CS4 configuration to execute based on board id OMAP3: overo : Use ttyO2 instead of ttyS2. da830: add support for NAND boot mode dm36x: revert cache disable patch dm644X: revert cache disable patch devkit8000: Add malloc space omap: spl: fix build break due to changes in FAT OMAP3 SPL: Provide weak omap_rev_string omap: beagle: Use ubifs instead of jffs2 for nand boot omap: overo: Disable pull-ups on camera PCLK, HS and VS signals omap: overo: Configure mux for gpio10 SPL: Add DMA library omap3: Add interface for omap3 DMA omap3: Add DMA register accessors omap3: Add Base register for DMA arm, davinci: add missing LSPC define for MMC/SD1 U-Boot/SPL: omap4: Make ddr pre-calculated timings as default. DaVinci: correct MDSTAT.STATE mask omap4: splitting padconfs into common, 4430 and 4460 omap4: adding revision detection for 4460 ES1.1 omap4: replacing OMAP4_CONTROL with OMAP4430_CONTROL gplug: fixed build error as a result of code cleanup patch kirkwood_spi: add dummy spi_init() gpio: mvmfp: reduce include platform file ARM: orion5x: reduce dependence of including platform file serial: reduce include platform file for marvell chip ARM: kirkwood: reduce dependence of including platform file ARM: armada100: reduce dependence of including platform file ARM: pantheon: reduce dependence of including platform file Armada100: Add env storage support for Marvell gplugD Armada100: Add SPI flash support for Marvell gplugD Armada100: Add SPI support for Marvell gplugD SPI: Add SPI driver support for Marvell Armada100 dreamplug: initial board support. imx: fix coding style misc: pmic: drop old Freescale's pmic driver MX31: mx31pdk: use new pmic driver MX31: mx31ads: use new pmic driver MX31: mx31_litekit: use new pmic driver MX5: mx53evk: use new pmic driver MX5: mx51evk: use new pmic driver MX35: mx35pdk: use new pmic driver misc: pmic: addI2C support to pmic_fsl driver misc: pmic: use I2C_SET_BUS in pmic I2C MX5: efikamx/efikasb: use new pmic driver MX3: qong: use new pmic driver RTC: Switch mc13783 to generic pmic code MX5: vision2: use new pmic driver misc: pmic: Freescale PMIC switches to generic PMIC driver misc:pmic:samsung Enable PMIC driver at GONI target misc:pmic:max8998 MAX8998 support at a new PMIC driver. misc:pmic:core New generic PMIC driver mx31pdk: Remove unneeded config mx31: provide readable WEIM CS accessor MX51: vision2: Set global macros I2C: Add i2c_get/set_speed() to mxc_i2c.c ARM: Update mach-types devkit8000: Add config to enable SPL MMC boot devkit8000: protect board_mmc_init arm, post: add missing post_time_ms for arm cosmetic, post: Codingstyle cleanup arm, logbuffer: make it compileclean tegra2: Enable MMC for Seaboard tegra2: Add more pinmux functions tegra2: Rename PIN_ to PINGRP_ tegra2: Add more clock functions tegra2: Clean up board code a little tegra2: Rename CLOCK_PLL_ID to CLOCK_ID
2011-10-27GCC4.6: Squash warnings in kirkwood_spi.cMarek Vasut
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>
2011-10-27GCC4.6: Squash warnings in fsl_espi.cMarek Vasut
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>
2011-10-27kirkwood_spi: add dummy spi_init()Michael Walle
The spi_init() function is missing. Add it. Signed-off-by: Michael Walle <michael@walle.cc>
2011-10-27ARM: kirkwood: reduce dependence of including platform fileLei Wen
For files like the drivers/serial/serial.c, it must include the platform file, as the CONFIG_SYS_NS16550_COM1 must reference to the definition in the platform definition files. Include the platform definition file in the config file, so that it would decouple the dependence for the driver files. Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-10-27SPI: Add SPI driver support for Marvell Armada100Ajay Bhargav
This patch provides support for SPI emulated over SSP for Marvell Armada100 SOC. Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
2011-10-16Blackfin: bfin_spi: fix build error when DEBUG is definedMike Frysinger
The new debug() changes pointed out debug code that rotted a little. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-09-04IMX: uniform GPIO interface using GPIO frameworkStefano Babic
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>
2011-08-03AT91/SPI: fix atmel_dataflash_spi.c to allow building without warningsReinhard Meyer
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2011-07-25andes_spi: add andes_spi interfaceMacpaul Lin
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>
2011-07-18MX31: Cleanup clock functionStefano Babic
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>
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>