30 Nov, 2011
2 commits
-
DMA support for MCSPI transfer enabled and removed unwanted flag
dma_not_enabled as DMA feature is enabled in omap2_mcspi.Signed-off-by: Philip, Avinash
-
Support for DMA transmission on MCSPI added.
1. MCSPI TX and RX registers are not 256-bit aligned address, as
required for Constant address mode in DAM and SAM in EDMA, causing EDMA
error generation condition. With this commit SAM and DAM are set to
Increment address mode.
2. SPI uses EDMA AB synchronized mode for transmission and EDMA A
synchronized mode for reception, which can be used to handle large chunk
of data above 64KB with single EDMA completion interrupt.Signed-off-by: Philip, Avinash
04 Nov, 2011
3 commits
-
Currently McSPI driver doesnt follow correct failure fallback steps
incase of probe & in case of remove() procedure.This patch corrects label names to give meaningful labels & also
corrects fallback & removal procedureSigned-off-by: Hebbar, Gururaja
-
omap mcspi probe() doesnt call pm_runtime put & disable functions
in case of failure. remove() doesnt call pm_runtime disable. This could
lead to warnings as below on subsequent insmod.root@arago-armv7:~# insmod /lib/modules/3.1.0-rc8/spi-omap2-mcspi.ko
[ 255.383671] omap2_mcspi omap2_mcspi.1: Unbalanced pm_runtime_enable!
...This patch adds the pm_runtime put() & disable() at aprropriate stages.
Signed-off-by: Hebbar, Gururaja
-
Current McSPI driver 1st requests memory regions & later adds register
offset. This causes warning when during module removal as below.root@arago-armv7:~# rmmod -v /lib/modules/3.1.0-rc8/spi-omap2-mcspi.ko
rmmod spi_omap2_mcspi, wait=no
[ 42.472810] Trying to free nonexistent resource[ 42.519178] Trying to free nonexistent resource
This patch moves the register offset addition before request_mem_region
Signed-off-by: Hebbar, Gururaja
27 Oct, 2011
2 commits
-
Signed-off-by: Vaibhav Bedia
-
Few platform (like am33xx) doesnt support (yet) DMA operations.
This patch add code to bypass dma operation even if requested from above
layers.Signed-off-by: Hebbar, Gururaja
05 Oct, 2011
5 commits
-
We found that adding load, Rx data sometimes drops.(with DMA transfer mode)
The cause is that before starting Rx-DMA processing, Tx-DMA processing starts.
This causes FIFO overrun occurs.This patch fixes the issue by modifying FIFO tx-threshold and DMA descriptor
size like below.Current this patch
Rx-descriptor 4Byte+12Byte*341 --> 12Byte*340-4Byte-12Byte
Rx-threshold (Not modified)
Tx-descriptor 4Byte+12Byte*341 --> 16Byte-12Byte*340
Rx-threshold 12Byte --> 2ByteSigned-off-by: Tomoya MORINAGA
Signed-off-by: Grant Likely -
Add recovery processing in case FIFO overrun error occurs with DMA transfer mode.
Signed-off-by: Tomoya MORINAGA
Signed-off-by: Grant Likely -
We found Rx data sometimes drops.(with non-DMA transfer mode)
The cause is read complete condition is not true.This patch fixes the issue.
Signed-off-by: Tomoya MORINAGA
Signed-off-by: Grant Likely -
During processing 1 command/data series,
SSN should keep LOW.
However, currently, SSN becomes HIGH.
This patch fixes the issue.Signed-off-by: Tomoya MORINAGA
Signed-off-by: Grant Likely -
Currently, in case of reading date from SPI flash,
command is sent twice.
The cause is that tx-memory clear processing is missing .
This patch adds the tx-momory clear processing.Signed-off-by: Tomoya MORINAGA
Signed-off-by: Grant Likely
24 Sep, 2011
1 commit
-
If CPM mode is not used, the fsl_dummy_rx variable is never allocated. When
the cleanup attempts to free it, the reference count is zero and a WARN is
generated. The same CPM mode check used in the initialize is applied to the
free as well.Tested on 2.6.33 with the previous spi_mpc8xxx driver. The renamed
spi-fsl-spi driver looks to have the same problem.Signed-off-by: Jeff Harris
Signed-off-by: Grant Likely
16 Sep, 2011
1 commit
-
commit 22a85e4cd51 (spi/imx: add device tree probe support) broke spi-imx usage
when the SPI chipselect is the one internal to the controller.On a mx31pdk board the following error is seen:
Registering mxc_nand as whole device
------------[ cut here ]------------
WARNING: at drivers/gpio/gpiolib.c:101 gpio_ensure_requested+0x4c/0xf4()
autorequest GPIO-0
Modules linked in:
[] (unwind_backtrace+0x0/0xf4) from [] (warn_slowpath_common+0x4c/0x64)
[] (warn_slowpath_common+0x4c/0x64) from [] (warn_slowpath_fmt+0x30/0x40)
[] (warn_slowpath_fmt+0x30/0x40) from [] (gpio_ensure_requested+0x4c/0xf4)
[] (gpio_ensure_requested+0x4c/0xf4) from [] (gpio_direction_output+0xa0/0x138)
[] (gpio_direction_output+0xa0/0x138) from [] (spi_imx_setup+0x38/0x4c)
[] (spi_imx_setup+0x38/0x4c) from [] (spi_setup+0x38/0x50)
[] (spi_setup+0x38/0x50) from [] (spi_add_device+0x94/0x124)
[] (spi_add_device+0x94/0x124) from [] (spi_new_device+0x74/0xac)
[] (spi_new_device+0x74/0xac) from [] (spi_match_master_to_boardinfo+0x20/0x40)
[] (spi_match_master_to_boardinfo+0x20/0x40) from [] (spi_register_master+0xb0/0x104)
[] (spi_register_master+0xb0/0x104) from [] (spi_bitbang_start+0x104/0x17c)
[] (spi_bitbang_start+0x104/0x17c) from [] (spi_imx_probe+0x2fc/0x404)
[] (spi_imx_probe+0x2fc/0x404) from [] (platform_drv_probe+0x18/0x1c)
[] (platform_drv_probe+0x18/0x1c) from [] (driver_probe_device+0x78/0x174)
[] (driver_probe_device+0x78/0x174) from [] (__driver_attach+0x8c/0x90)
[] (__driver_attach+0x8c/0x90) from [] (bus_for_each_dev+0x60/0x8c)
[] (bus_for_each_dev+0x60/0x8c) from [] (bus_add_driver+0xa0/0x288)
[] (bus_add_driver+0xa0/0x288) from [] (driver_register+0x78/0x18c)
[] (driver_register+0x78/0x18c) from [] (do_one_initcall+0x34/0x178)
[] (do_one_initcall+0x34/0x178) from [] (kernel_init+0x74/0x118)
[] (kernel_init+0x74/0x118) from [] (kernel_thread_exit+0x0/0x8)
---[ end trace 759f924b30fd5a44 ]---Fix this issue by using the original chip select logic and make spi-imx to work again.
Tested on a mx31pdk that uses the hardware SPI chipselect pins and also
on a mx27pdk that uses GPIO as SPI chipselect.Signed-off-by: Fabio Estevam
Signed-off-by: Grant Likely
02 Aug, 2011
1 commit
-
The remove function in the PL022 driver cannot abort the remove
function any way, so restructure the code so as not to make that
assumption. Remove will now proceed no matter whether it can
stop the transfer queue or not.Reported-by: Russell King
Signed-off-by: Linus Walleij
Signed-off-by: Grant Likely
23 Jul, 2011
1 commit
-
* 'spi/next' of git://git.secretlab.ca/git/linux-2.6: (34 commits)
spi/imx: add device tree probe support
spi/imx: copy gpio number passed by platform data into driver private data
spi/imx: use soc name in spi device type naming scheme
spi/imx: merge type SPI_IMX_VER_0_7 into SPI_IMX_VER_0_4
spi/imx: do not use spi_imx2_3 to name SPI_IMX_VER_2_3 function and macro
spi/imx: use mx21 to name SPI_IMX_VER_0_0 function and macro
spi/imx: do not make copy of spi_imx_devtype_data
spi/dw: Add spi number into spi irq desc
spi/tegra: Use engineering names in DT compatible property
spi/fsl_spi: fix CPM spi driver
mach-s3c2410: remove unused spi-gpio.h file
spi: remove obsolete spi-s3c24xx-gpio driver
mach-gta2: remove unused spi-gpio.h include
mach-qt2410: convert to spi_gpio
mach-jive: convert to spi_gpio
spi/pxa2xx: Remove unavailable ssp_type from documentation
spi/bfin_spi: uninline fat queue funcs
spi/bfin_spi: constify pin array
spi/bfin_spi: use structs for accessing hardware regs
spi/topcliff-pch: Support new device ML7223 IOH
...Fix up trivial conflict in arch/arm/mach-ep93xx/Makefile
15 Jul, 2011
7 commits
-
It adds device tree probe support for spi-imx driver.
Signed-off-by: Shawn Guo
Cc: Grant Likely
Signed-off-by: Grant Likely -
It copies gpio number passed via platform data embedded pointer into
driver private data, so that we do not need to refer to this embedded
pointer passed by platform data after probe function exits.Signed-off-by: Shawn Guo
Cc: Uwe Kleine-König
Cc: Sascha Hauer
Cc: Grant Likely
Signed-off-by: Grant Likely -
Software defined version number is not stable enough to be used
in device type naming scheme. The patch changes it to use implicit
soc name for spi device type definition. In this way, we can easily
align the naming scheme with device tree binding, which comes later.It removes fifosize from spi_imx_data and adds devtype there, so that
fifosize can be set in an inline function according to devtype.
Also, cpu_is_mx can be replaced by inline functions checking devtype.Signed-off-by: Shawn Guo
Cc: Uwe Kleine-König
Cc: Sascha Hauer
Cc: Grant Likely
Signed-off-by: Grant Likely -
The only difference between SPI_IMX_VER_0_7 and SPI_IMX_VER_0_4 is
.config function. The patch uses cpu_is_mx35 (to be removed) as the
temporary solution to consolidate functions spi_imx0_4_config and
spi_imx0_7_config into mx31_config. As a result, type SPI_IMX_VER_0_7
can be merged into SPI_IMX_VER_0_4.It also renames function spi_imx0_4_reset to mx31_reset to keep
consistency with other function naming.A couple of redundant macros, MX3_CSPISTAT and MX3_CSPISTAT_RR,
together with the useless type SPI_IMX_VER_0_5 also get cleaned up.Signed-off-by: Shawn Guo
Cc: Uwe Kleine-König
Cc: Sascha Hauer
Cc: Grant Likely
Signed-off-by: Grant Likely -
It's confusing to use spi_imx2_3 to name SPI_IMX_VER_2_3 function
and macro, as it easily make people think of imx2 and imx3. It's
better to use specific soc name just like what other SPI_IMX_VER
do. For SPI_IMX_VER_2_3 case, it will be mx51. To distinguish it
from CSPI on mx51, mx51_ecspi might be a good choice.Signed-off-by: Shawn Guo
Cc: Uwe Kleine-König
Cc: Sascha Hauer
Cc: Grant Likely
Signed-off-by: Grant Likely -
SPI_IMX_VER_0_0 covers i.mx21 and i.mx27. It makes more sense to
use mx21 rather than mx27 to name SPI_IMX_VER_0_0 function and
macro, since i.mx21 comes out ealier than i.mx27.Signed-off-by: Shawn Guo
Cc: Uwe Kleine-König
Cc: Sascha Hauer
Cc: Grant Likely
Signed-off-by: Grant Likely -
spi_imx_devtype_data has already been driver private data. There is
really no need to make a copy in spi_imx_data. Instead, a reference
pointer works perfectly fine.Signed-off-by: Shawn Guo
Signed-off-by: Grant Likely
09 Jul, 2011
1 commit
-
Signed-off-by: ShuoX Liu
Signed-off-by: Grant Likely
06 Jul, 2011
3 commits
-
The existing macro fails for following scenarios.
1) S5P64X0 channel 1
2) S5PV210 channel 1The FIFO data level supported in the above SoCs either 64 or
256 bytes depending on the channel. Because of this the TX_DONE
is the 25 bit in the status register.The existing macro works for the following scenarios
1) S3C6410 all channels
2) S5PC100 all channelsThe FIFO data level supported in the above SoCs 64 bytes
on all the channels. Because of this the TX_DONE is the 21 bit
in the status register.So when we use the existing macro for the non-working SoCs
it is not anding with the TX_DONE bit for transmission status check.Signed-off-by: Padmavathi Venna
Acked-by: Jassi Brar
Acked-by: Grant Likely
Signed-off-by: Kukjin Kim -
Engineering names are more stable than marketing names. Hence, use them
for Device Tree compatible properties instead.Signed-off-by: Stephen Warren
Signed-off-by: Grant Likely -
This patch fixes the freescale spi driver for CPM. Without this
patch SPI on CPM failed because cpm_muram_alloc_fixed tries to
allocate muram in an preserved area. The error reported was:mpc8xxx_spi f0011a80.spi: can't allocate spi parameter ram
mpc8xxx_spi: probe of f0011a80.spi failed with error -12Now the driver uses of_iomap to get access to this area
similar to i2c driver driver in the i2c-cpm.c which has a
similar device tree node. This is tested on a MPC8247 with CPM2.Signed-off-by: Holger Brunck
Signed-off-by: Grant Likely
05 Jul, 2011
1 commit
-
It was equivalent to spi-gpio, and there's no longer any in-tree users
of it, so get rid of it.Signed-off-by: Peter Korsgaard
Acked-by: Ben Dooks
Signed-off-by: Grant Likely
17 Jun, 2011
6 commits
-
There's no need for these queue funcs to be inlined, so drop the
markings. This shaves off a few hundred duplicated bytes.Signed-off-by: Mike Frysinger
Signed-off-by: Grant Likely -
This array isn't written anywhere, so constify it.
Signed-off-by: Mike Frysinger
Signed-off-by: Grant Likely -
Rather than hardcoding the register sizes/offsets in this file, use the
existing struct in the spi header for reading/writing the hardware.Signed-off-by: Mike Frysinger
Signed-off-by: Grant Likely -
The default bits per word setting should be 8 bits, but since most of our
devices have been explicitly setting this up, we didn't notice when the
default stopped working.At the moment, any default transfers without an explicit bit size setting
error out with:
bfin-spi bfin-spi.0: transfer: unsupported bits_per_wordSo in the transfer logic, have a bits_per_word setting of 0 fall into the
8 bit transfer logic.Signed-off-by: Mike Frysinger
Signed-off-by: Grant Likely -
Support new device OKI SEMICONDUCTOR ML7223 IOH(Input/Output Hub).
The ML7223 IOH is for MP(Media Phone) use.
The ML7223 is companion chip for Intel Atom E6xx series.
The ML7223 is completely compatible for Intel EG20T PCH.Signed-off-by: Tomoya MORINAGA
Signed-off-by: Grant Likely
16 Jun, 2011
4 commits
-
The platform configuration can select custom FIFO watermarks, but
these may conflict the actual FIFO size of the PL022 variant if
set too high. So strengthen the sanity checks to deny any
conflicting settings.Signed-off-by: Linus Walleij
Signed-off-by: Grant Likely -
Insert notifiers for the runtime PM API. With this the runtime
PM layer kicks in to action where used.Signed-off-by: Rabin Vincent
Reviewed-by: Virupax Sadashivpetimath
Reviewed-by: Jonas Aberg
Reviewed-by: Srinidhi Kasagar
[Rebased to Linux 3.0-rc3, edit description]
Signed-off-by: Linus Walleij
Signed-off-by: Grant Likely -
Configure the DMA burstsize from the FIFO trigger level supplied
with the controller configuration data. This is based on a patch
from Virupax, but I rewrote it differently.Reported-by: Virupax Sadashivpetimath
Signed-off-by: Linus Walleij
Signed-off-by: Grant Likely -
As part of the gpio driver consolidation, this patch moves the Tegra driver
into drivers/gpioSigned-off-by: Grant Likely
13 Jun, 2011
1 commit
-
Return error on out of range cpsdvsr value.
Acked-by: Linus Walleij
Signed-off-by: Virupax Sadashivpetimath
Signed-off-by: Grant Likely
11 Jun, 2011
1 commit
-
Done via coccinelle scripts like:
@@
struct resource *ptr;
@@- ptr->end - ptr->start + 1
+ resource_size(ptr)and some grep and typing.
Mostly uncompiled, no cross-compilers.
Signed-off-by: Joe Perches
Signed-off-by: Grant Likely