Age | Commit message (Collapse) | Author |
|
On T1042D4RDB, system can't resume and warm reset to uboot prompt sometimes.
Disable eSPI controller hardware before enter deep sleep, and enable it
after resume.
Signed-off-by: Hou Zhiqiang <B48286@freescale.com>
Change-Id: I0f091890ef3e3219697ff7f5bbf4a02809e6e45b
Reviewed-on: http://git.am.freescale.net:8181/37469
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
|
|
|
|
Signed-off-by: Scott Wood <scottwood@freescale.com>
Conflicts:
arch/arm/kvm/mmu.c
arch/arm/mm/proc-v7-3level.S
arch/powerpc/kernel/vdso32/getcpu.S
drivers/crypto/caam/error.c
drivers/crypto/caam/sg_sw_sec4.h
drivers/usb/host/ehci-fsl.c
|
|
|
|
Spi chip select signal need to keep asserted between several
spi_transfer in the same spi_message.
But the driver will de-assert CS signal between serval spi_transfer
in the same spi_message under some condiations.This patch fix the bug.
Here is an example:
Assume you have two variables like the following,
struct spi_transfer a;
struct spi_transfer b;
if you send a spi_message only includes 'a' first,
and then you send a spi_message includes 'a' and 'b'
but without reseting 'a'.
Problem will occur in the second spi_message.
Signed-off-by: Haikun Wang <b53464@freescale.com>
Change-Id: I4203a79f3fa5ae83946e40a580009e1b6db8e642
Reviewed-on: http://git.am.freescale.net:8181/28867
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Huan Wang <alison.wang@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Get the address width information from the spi_message to correct the
address to operate.
when the one-time transfer length exceed the max limited length of eSPI
controller 0xFFFF, for the subsequent transfer, the address to operate
need to be corrected.
Signed-off-by: Hou Zhiqiang <B48286@freescale.com>
Change-Id: I54cf8e76c29c660603b864ff1ef2096a2f817dba
Reviewed-on: http://git.am.freescale.net:8181/24586
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
|
|
ac279ed96fd1262aa99c57246174(spi: fsl-dspi: Fix memory leak)
converted the SPI device controller state to use devm_kzalloc().
Unfortunately, this is used against an unbound struct device, which
results in the following when the device is eventually bound to
its driver:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 1 at drivers/base/dd.c:272 driver_probe_device+0x58/0x1d8()
Modules linked in:
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.12.19-rt30+ #358
Backtrace:
[<80010a08>] (dump_backtrace+0x0/0x100) from [<80010cb8>] (show_stack+0x18/0x1c)
r6:804cef6e r5:00000009 r4:00000000 r3:00200140
[<80010ca0>] (show_stack+0x0/0x1c) from [<803e5c24>] (dump_stack+0x78/0x94)
[<803e5bac>] (dump_stack+0x0/0x94) from [<8001c554>] (warn_slowpath_common+0x6c/0x90)
r4:00000000 r3:60000113
[<8001c4e8>] (warn_slowpath_common+0x0/0x90) from [<8001c61c>] (warn_slowpath_null+0x24/0x2c)
r8:e6ffc314 r7:805652e4 r6:8059498c r5:e6ffc200 r4:e6ffc200
[<8001c5f8>] (warn_slowpath_null+0x0/0x2c) from [<80231590>] (driver_probe_device+0x58/0x1d8)
[<80231538>] (driver_probe_device+0x0/0x1d8) from [<80231740>] (__device_attach+0x30/0x4c)
r7:00000000 r6:80231710 r5:e6ffc200 r4:805652e4
[<80231710>] (__device_attach+0x0/0x4c) from [<8022fc18>] (bus_for_each_drv+0x80/0x94)
r5:e6ffc200 r4:00000000
[<8022fb98>] (bus_for_each_drv+0x0/0x94) from [<802314f8>] (device_attach+0x70/0x88)
r6:e6ffc200 r5:e6ffc234 r4:e6ffc200
[<80231488>] (device_attach+0x0/0x88) from [<80230aa4>] (bus_probe_device+0x30/0xa0)
r6:e6ffc200 r5:80565e3c r4:e6ffc200 r3:00000001
[<80230a74>] (bus_probe_device+0x0/0xa0) from [<8022ef0c>] (device_add+0x4f0/0x5c8)
r6:e6ffc208 r5:00000000 r4:e6ffc200 r3:00000001
[<8022ea1c>] (device_add+0x0/0x5c8) from [<8026fb20>] (spi_add_device+0xe8/0x138)
[<8026fa38>] (spi_add_device+0x0/0x138) from [<80270a78>] (spi_register_master+0x5e4/0x6c8)
r7:00000000 r6:815b9ec8 r5:e6ffc200 r4:e6ff8000
[<80270494>] (spi_register_master+0x0/0x6c8) from [<8027196c>] (dspi_probe+0x268/0x314)
[<80271704>] (dspi_probe+0x0/0x314) from [<80232668>] (platform_drv_probe+0x1c/0x20)
[<8023264c>] (platform_drv_probe+0x0/0x20) from [<802315dc>] (driver_probe_device+0xa4/0x1d8)
[<80231538>] (driver_probe_device+0x0/0x1d8) from [<802317cc>] (__driver_attach+0x70/0x94)
r7:00000000 r6:80565f88 r5:e6d07e44 r4:e6d07e10
[<8023175c>] (__driver_attach+0x0/0x94) from [<8022fb60>] (bus_for_each_dev+0x7c/0x90)
r6:8023175c r5:80565f88 r4:00000000 r3:8023175c
[<8022fae4>] (bus_for_each_dev+0x0/0x90) from [<80231148>] (driver_attach+0x20/0x28)
r6:e6fd6e00 r5:80563ab8 r4:80565f88
[<80231128>] (driver_attach+0x0/0x28) from [<80230cec>] (bus_add_driver+0xe4/0x248)
[<80230c08>] (bus_add_driver+0x0/0x248) from [<80231c1c>] (driver_register+0xa4/0xe8)
r7:80572440 r6:8052d464 r5:8053a1cc r4:80565f88
[<80231b78>] (driver_register+0x0/0xe8) from [<80232b80>] (__platform_driver_register+0x50/0x64)
r5:8053a1cc r4:00000006
[<80232b30>] (__platform_driver_register+0x0/0x64) from [<8052d47c>] (fsl_dspi_driver_init+0x18/0x20)
[<8052d464>] (fsl_dspi_driver_init+0x0/0x20) from [<800087fc>] (do_one_initcall+0x98/0x134)
[<80008764>] (do_one_initcall+0x0/0x134) from [<80515c68>] (kernel_init_freeable+0x110/0x1d8)
r9:0000009f r8:80572440 r7:80572440 r6:80541324 r5:8053a1cc
r4:00000006
[<80515b58>] (kernel_init_freeable+0x0/0x1d8) from [<803e0838>] (kernel_init+0x14/0xec)
r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:803e0824
r4:80572440
[<803e0824>] (kernel_init+0x0/0xec) from [<8000dd58>] (ret_from_fork+0x14/0x3c)
r4:00000000 r3:00000000
---[ end trace ef66b8df97ff1e33 ]---
Fix this by partially reverting the original commit.
Signed-off-by: Chao Fu <B44548@freescale.com>
Change-Id: I234e49f6cda0f5125d1b6d6990112b4ff3fe33a4
Reviewed-on: http://git.am.freescale.net:8181/21975
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
DSPI also is a module in LS1021.
Add the dependence SOC_LS1021 for DSPI.
Signed-off-by: Chao Fu <B44548@freescale.com>
Change-Id: Id48cc01c7756f9b3a977f4f5478fa018897952f8
Reviewed-on: http://git.am.freescale.net:8181/21907
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Li Xiubo <Li.Xiubo@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
ls1 has qe ip block too, so move qe code from platform directory
to public directory.
Signed-off-by: Zhao Qiang <B45475@freescale.com>
---
patch on upstream can be found with this link:
http://patchwork.ozlabs.org/patch/385724/,
it is under discussion
Change-Id: I39aed531a4792990e3bb8ecc6f4e57f8d9b41bae
Reviewed-on: http://git.am.freescale.net:8181/15818
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Xiaobo Xie <X.Xie@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
TCFQ is interrupt of Transfer Complete Flag in DSPI module.
EOQ is interrupt of End of Queue Flag in DSPI module.
For adopting of different platform, either of them is a way of DSPI
transfer data. This patch add TCF support for DSPI module in other platform.
The software will be changed in two transfer methods as followwing:
EOQ TCFQ
transfer data: dspi_eoq_write dspi_tcfq_write
receive data: dspi_eoq_read dspi_tcfq_read
Using which method will decided by paltform soc dtsi file.
Remove bitbang:
Add tcf funtions, DSPI module need get cs change information in a spi transfer.
According cs change, DSPI will give last data the right flag. Bitbang provide
cs change behind the last data in a transfer. So DSPI can not deal the last data in
every transfer properly, so remove the bitbang in the driver.
Merge duplicate code:
dspi_data_from_popr
dspi_data_to_pushr
Remove clk reference in regmap I/O:
Set the clk parament is NULL in devm_regmap_init_mmio_clk, it will avoid clk handle
in every register read/write, and advance tranferring efficiency.
Signed-off-by: Chao Fu <b44548@freescale.com>
The upstream status of this patch can be found at: https://patchwork.kernel.org/patch/4974181
Change-Id: I0ed6c1598c111e74b5e53c248e00dec2398fa900
Reviewed-on: http://git.am.freescale.net:8181/20096
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Li Xiubo <Li.Xiubo@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Acked-by: Chao Fu <b44548@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit c99428d035908b9c0b8be452f9b091bc5e090256)
Change-Id: I4afafcd1d5fd244ea287f899bca03baa95c61531
Reviewed-on: http://git.am.freescale.net:8181/20091
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Make of_device_id array const, because all OF functions
handle it as const.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 790d190257b339bba9ff821d7d49f4567146f4ad)
Change-Id: I27ecbe600bf91f328e2762cb65dfe76261060489
Reviewed-on: http://git.am.freescale.net:8181/20090
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
The memory allocated for chip is not freed anywhere.
Convert to use devm_kzalloc to fix the memory leak.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 0e0cd9ea8961b82947a40471080e7968b634820e)
Change-Id: Ia54f0ab47d9e36a375f66ea4c285b2f4ecc09ed4
Reviewed-on: http://git.am.freescale.net:8181/20089
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit ba811addff3d29d1ea9861dbfc06e8ef80714f94)
Change-Id: Ic2086e577d7d11df710c03c85202864b76151882
Reviewed-on: http://git.am.freescale.net:8181/20088
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Remove some coding sytle not in standard in former code.
Signed-off-by: Chao Fu <b44548@freescale.com>
Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 88386e858bbb21eb05c15c040dbb3e6ad1cb3568)
Change-Id: Ia4d6096ca86bf5e939748017120ddf33dafdb12e
Reviewed-on: http://git.am.freescale.net:8181/20087
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Li Xiubo <Li.Xiubo@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Freescale DSPI module will have two endianess in different platform,
but ARM is little endian. So when DSPI in big endian, core in little endian,
readl and writel can not adjust R/W register in this condition.
This patch will remove general readl/writel, and import regmap mechanism.
Data endian will be transfered in regmap APIs.
Documents: dspi add bool "big-endian" in dts node if DSPI module
work in big endian.
Signed-off-by: Chao Fu <b44548@freescale.com>
Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 1acbdeb92c87fc18eade0815dedc257fe45b88b7)
Change-Id: I60e630bb18a2101af3154633bbe5824a52ac45f2
Reviewed-on: http://git.am.freescale.net:8181/20086
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Tested-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
The implementation in spi_setup() already set spi->bits_per_word = 8 when
spi->bits_per_word is 0 before calling spi->master->setup.
So we don't need to do it again in setup() callback.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Barry Song <Baohua.Song@csr.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 23061f1eb844edd349c3a0f5f40e244c9d2abfde)
Change-Id: I842867bbb99dd71bfcf30ac90300c6ca23c384b9
Reviewed-on: http://git.am.freescale.net:8181/20085
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit e07725be735e1791cf74e9db06a8bde62e1f517d)
Change-Id: Id0205a7e671df191a232d328091f1dc8a963b9f1
Reviewed-on: http://git.am.freescale.net:8181/20084
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
clock source is prepared and enabled by clk_prepare_enable()
in probe function, but no disable or unprepare in remove.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 05209f457069e595ce0262a9032cbade05398571)
Change-Id: Ib45ea4b0fb7f211e5e31352268c4aff4afd4b3e3
Reviewed-on: http://git.am.freescale.net:8181/20083
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Many drivers that use bitbang library have a leak on probe error paths.
This is because once a spi_master_get() call succeeds, we need an additional
spi_master_put() call to free the memory.
Fix this issue by moving the code taking a reference to master to
spi_bitbang_start(), so spi_bitbang_start() will take a reference to master on
success. With this change, the caller is responsible for calling
spi_bitbang_stop() to decrement the reference and spi_master_put() as
counterpart of spi_alloc_master() to prevent a memory leak.
So now we have below patten for drivers using bitbang library:
probe:
spi_alloc_master -> Init reference count to 1
spi_bitbang_start -> Increment reference count
remove:
spi_bitbang_stop -> Decrement reference count
spi_master_put -> Decrement reference count (reference count reaches 0)
Fixup all users accordingly.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Suggested-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
Acked-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 94c69f765f1b4a658d96905ec59928e3e3e07e6a)
Change-Id: Ifce35be3f5b3a64cfbf8f42dcafa35134f039899
Reviewed-on: http://git.am.freescale.net:8181/20082
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
- improve dependencies using COMPILE_TEST
- fix a typo
- drop platform_set_drvdata(pdev, NULL) in error path of probe
- make MODULE_LICENSE match the header
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit b444d1dfe296433a93d6b814d924e0ab99ad7e7b)
Change-Id: Id41bb981d35f216297d5cc49c071a64c99912c5b
Reviewed-on: http://git.am.freescale.net:8181/20081
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Tested-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Added missing __iomem annotation in order to fix the following
sparse warnings:
drivers/spi/spi-fsl-dspi.c:140:16: warning: incorrect type in argument 1 (different address spaces)
drivers/spi/spi-fsl-dspi.c:140:16: expected void const volatile [noderef] <asn:2>*addr
drivers/spi/spi-fsl-dspi.c:140:16: got void *
drivers/spi/spi-fsl-dspi.c:143:9: warning: incorrect type in argument 2 (different address spaces)
drivers/spi/spi-fsl-dspi.c:143:9: expected void volatile [noderef] <asn:2>*addr
drivers/spi/spi-fsl-dspi.c:143:9: got void *
drivers/spi/spi-fsl-dspi.c:132:18: warning: incorrect type in argument 1 (different address spaces)
drivers/spi/spi-fsl-dspi.c:132:18: expected void const volatile [noderef] <asn:2>*addr
drivers/spi/spi-fsl-dspi.c:132:18: got void *
drivers/spi/spi-fsl-dspi.c:241:17: warning: incorrect type in argument 2 (different address spaces)
drivers/spi/spi-fsl-dspi.c:241:17: expected void volatile [noderef] <asn:2>*addr
drivers/spi/spi-fsl-dspi.c:241:17: got void *
drivers/spi/spi-fsl-dspi.c:132:18: warning: incorrect type in argument 1 (different address spaces)
drivers/spi/spi-fsl-dspi.c:132:18: expected void const volatile [noderef] <asn:2>*addr
drivers/spi/spi-fsl-dspi.c:132:18: got void *
drivers/spi/spi-fsl-dspi.c:259:29: warning: incorrect type in argument 1 (different address spaces)
drivers/spi/spi-fsl-dspi.c:259:29: expected void const volatile [noderef] <asn:2>*addr
drivers/spi/spi-fsl-dspi.c:259:29: got void *
drivers/spi/spi-fsl-dspi.c:266:29: warning: incorrect type in argument 1 (different address spaces)
drivers/spi/spi-fsl-dspi.c:266:29: expected void const volatile [noderef] <asn:2>*addr
drivers/spi/spi-fsl-dspi.c:266:29: got void *
drivers/spi/spi-fsl-dspi.c:298:9: warning: incorrect type in argument 2 (different address spaces)
drivers/spi/spi-fsl-dspi.c:298:9: expected void volatile [noderef] <asn:2>*addr
drivers/spi/spi-fsl-dspi.c:298:9: got void *
drivers/spi/spi-fsl-dspi.c:299:9: warning: incorrect type in argument 2 (different address spaces)
drivers/spi/spi-fsl-dspi.c:299:9: expected void volatile [noderef] <asn:2>*addr
drivers/spi/spi-fsl-dspi.c:299:9: got void *
drivers/spi/spi-fsl-dspi.c:300:9: warning: incorrect type in argument 2 (different address spaces)
drivers/spi/spi-fsl-dspi.c:300:9: expected void volatile [noderef] <asn:2>*addr
drivers/spi/spi-fsl-dspi.c:300:9: got void *
drivers/spi/spi-fsl-dspi.c:303:17: warning: incorrect type in argument 2 (different address spaces)
drivers/spi/spi-fsl-dspi.c:303:17: expected void volatile [noderef] <asn:2>*addr
drivers/spi/spi-fsl-dspi.c:303:17: got void *
drivers/spi/spi-fsl-dspi.c:318:21: warning: incorrect type in argument 1 (different address spaces)
drivers/spi/spi-fsl-dspi.c:318:21: expected void const volatile [noderef] <asn:2>*addr
drivers/spi/spi-fsl-dspi.c:318:21: got void *
drivers/spi/spi-fsl-dspi.c:327:9: warning: incorrect type in argument 2 (different address spaces)
drivers/spi/spi-fsl-dspi.c:327:9: expected void volatile [noderef] <asn:2>*addr
drivers/spi/spi-fsl-dspi.c:327:9: got void *
drivers/spi/spi-fsl-dspi.c:386:9: warning: incorrect type in argument 2 (different address spaces)
drivers/spi/spi-fsl-dspi.c:386:9: expected void volatile [noderef] <asn:2>*addr
drivers/spi/spi-fsl-dspi.c:386:9: got void *
drivers/spi/spi-fsl-dspi.c:485:20: warning: incorrect type in assignment (different address spaces)
drivers/spi/spi-fsl-dspi.c:485:20: expected void *base
drivers/spi/spi-fsl-dspi.c:485:20: got void [noderef] <asn:2>*
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 2ef3599d8181afcbd347226faba75991f9e008fc)
Change-Id: I51696586aa10ad6f848614146baed2f64dd5ff9a
Reviewed-on: http://git.am.freescale.net:8181/20080
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Signed-off-by: Scott Wood <scottwood@freescale.com>
Conflicts:
drivers/mmc/card/block.c
|
|
This reverts v3.13-rc3+ (78fd82238d0e5716) to v3.12, except for
commits which I noticed which appear relevant to the SDK.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Conflicts:
arch/powerpc/include/asm/kvm_host.h
arch/powerpc/kvm/book3s_hv_rmhandlers.S
arch/powerpc/kvm/book3s_interrupts.S
arch/powerpc/kvm/e500.c
arch/powerpc/kvm/e500mc.c
arch/powerpc/sysdev/fsl_soc.h
drivers/Kconfig
drivers/cpufreq/ppc-corenet-cpufreq.c
drivers/dma/fsldma.c
drivers/dma/s3c24xx-dma.c
drivers/misc/Makefile
drivers/mmc/host/sdhci-of-esdhc.c
drivers/mtd/devices/m25p80.c
drivers/net/ethernet/freescale/gianfar.h
drivers/platform/Kconfig
drivers/platform/Makefile
drivers/spi/spi-fsl-espi.c
include/crypto/algapi.h
include/linux/netdev_features.h
include/linux/skbuff.h
include/net/ip.h
net/core/ethtool.c
|
|
|
|
commit 61d1cf163c8653934cc8cd5d0b2a562d0990c265 upstream.
The 'ath79_spi_setup_cs' function initializes the chip
select line of a given SPI device in order to make sure
that the device is inactive.
If the SPI_CS_HIGH bit is set for a given device, it
means that the CS line of that device is active HIGH
so it must be set to LOW initially. In case of GPIO
CS lines, the 'ath79_spi_setup_cs' function does the
opposite of that due to the wrong GPIO flags.
Fix the code to use the correct GPIO flags.
Reported-by: Ronald Wahl <ronald.wahl@raritan.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
|
|
commit fd40dccb1a170ba689664481a3de83617b7194d2 upstream.
Currently, at module removal, one gets the following warnings:
------------[ cut here ]------------
WARNING: at drivers/clk/clk.c:780 clk_disable+0x18/0x24()
Modules linked in: spi_imx(-) [last unloaded: ev76c560]
CPU: 1 PID: 16337 Comm: rmmod Tainted: G W 3.10.17-80548-g90191eb-dirty #33
[<80013b4c>] (unwind_backtrace+0x0/0xf8) from [<800115dc>] (show_stack+0x10/0x14)
[<800115dc>] (show_stack+0x10/0x14) from [<800257b8>] (warn_slowpath_common+0x4c/0x68)
[<800257b8>] (warn_slowpath_common+0x4c/0x68) from [<800257f0>] (warn_slowpath_null+0x1c/0x24)
[<800257f0>] (warn_slowpath_null+0x1c/0x24) from [<803f60ec>] (clk_disable+0x18/0x24)
[<803f60ec>] (clk_disable+0x18/0x24) from [<7f02c9cc>] (spi_imx_remove+0x54/0x9c [spi_imx])
[<7f02c9cc>] (spi_imx_remove+0x54/0x9c [spi_imx]) from [<8025868c>] (platform_drv_remove+0x18/0x1c)
[<8025868c>] (platform_drv_remove+0x18/0x1c) from [<80256f60>] (__device_release_driver+0x70/0xcc)
[<80256f60>] (__device_release_driver+0x70/0xcc) from [<80257770>] (driver_detach+0xcc/0xd0)
[<80257770>] (driver_detach+0xcc/0xd0) from [<80256d90>] (bus_remove_driver+0x7c/0xc0)
[<80256d90>] (bus_remove_driver+0x7c/0xc0) from [<80068668>] (SyS_delete_module+0x144/0x1f8)
[<80068668>] (SyS_delete_module+0x144/0x1f8) from [<8000e080>] (ret_fast_syscall+0x0/0x30)
---[ end trace 1f5df9ad54996300 ]---
------------[ cut here ]------------
WARNING: at drivers/clk/clk.c:780 clk_disable+0x18/0x24()
Modules linked in: spi_imx(-) [last unloaded: ev76c560]
CPU: 1 PID: 16337 Comm: rmmod Tainted: G W 3.10.17-80548-g90191eb-dirty #33
[<80013b4c>] (unwind_backtrace+0x0/0xf8) from [<800115dc>] (show_stack+0x10/0x14)
[<800115dc>] (show_stack+0x10/0x14) from [<800257b8>] (warn_slowpath_common+0x4c/0x68)
[<800257b8>] (warn_slowpath_common+0x4c/0x68) from [<800257f0>] (warn_slowpath_null+0x1c/0x24)
[<800257f0>] (warn_slowpath_null+0x1c/0x24) from [<803f60ec>] (clk_disable+0x18/0x24)
[<803f60ec>] (clk_disable+0x18/0x24) from [<7f02c9e8>] (spi_imx_remove+0x70/0x9c [spi_imx])
[<7f02c9e8>] (spi_imx_remove+0x70/0x9c [spi_imx]) from [<8025868c>] (platform_drv_remove+0x18/0x1c)
[<8025868c>] (platform_drv_remove+0x18/0x1c) from [<80256f60>] (__device_release_driver+0x70/0xcc)
[<80256f60>] (__device_release_driver+0x70/0xcc) from [<80257770>] (driver_detach+0xcc/0xd0)
[<80257770>] (driver_detach+0xcc/0xd0) from [<80256d90>] (bus_remove_driver+0x7c/0xc0)
[<80256d90>] (bus_remove_driver+0x7c/0xc0) from [<80068668>] (SyS_delete_module+0x144/0x1f8)
[<80068668>] (SyS_delete_module+0x144/0x1f8) from [<8000e080>] (ret_fast_syscall+0x0/0x30)
---[ end trace 1f5df9ad54996301 ]---
Since commit 9e556dcc55774c9a1032f32baa0e5cfafede8b70, "spi: spi-imx: only
enable the clocks when we start to transfer a message", clocks are always
disabled except when transmitting messages. There is thus no need to
disable them at module removal.
Fixes: 9e556dcc55774 (spi: spi-imx: only enable the clocks when we start to transfer a message)
Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
|
|
commit 017145fef567430789e40f6a22a90ce2a766370b upstream.
Current code set platform drvdata to dspi. However, the code in dspi_suspend()
and dspi_resume() assumes the drvdata is the address of master.
Fix it by setting platform drvdata to master.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
|
|
commit ee73b4c6e3fc0755a91752ab8eebc8e070038b53 upstream.
dev_get_drvdata() returns the address of master rather than mcfqspi.
Fixes: af361079 (spi/coldfire-qspi: Drop extra calls to spi_master_get in suspend/resume functions)
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
|
|
Signed-off-by: Hou Zhiqiang <b48286@freescale.com>
Change-Id: Ieb821f465dd8dd6b63264208c9eaf7d41ffb5cc8
Reviewed-on: http://git.am.freescale.net:8181/9580
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
|
|
Add PM support for eSPI controller using callback function suspend
and resume in .driver.pm of platform_driver.
Signed-off-by: Hou Zhiqiang <b48286@freescale.com>
Change-Id: Ibc1dbdbe830f136ffc26a3610f6a4a1581e0e8cb
Reviewed-on: http://git.am.freescale.net:8181/9579
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
|
|
commit f7db1588d6028c97c098bb6445eaabc56a25fed8 upstream.
Otherwise, spi_setup() fails with unsupported mode bits message.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
commit 1f802f8249a0da536877842c43c7204064c4de8b upstream.
This reverts commit e120cc0dcf2880a4c5c0a6cb27b655600a1cfa1d.
It causes a NULL pointer dereference with drivers using the generic
spi_transfer_one_message(), which always calls
spi_finalize_current_message(), which zeroes master->cur_msg.
Drivers implementing transfer_one_message() theirselves must always call
spi_finalize_current_message(), even if the transfer failed:
* @transfer_one_message: the subsystem calls the driver to transfer a single
* message while queuing transfers that arrive in the meantime. When the
* driver is finished with this message, it must call
* spi_finalize_current_message() so the subsystem can issue the next
* transfer
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
commit 483c319188c74e82b29a0ed7a7fa7065570f2193 upstream.
Commit cddb339badb0 (spi/pxa2xx: convert to dma_request_slave_channel_compat())
converted the driver to use ACPI provided DMA helpers but it forgot to
initialize the platform data for the channels to -1. Failing to do so will
result inadvertent match in the filter function because 0 is a valid
channel number.
Prevent this from happening by initializing both platform data channels
correctly to -1.
Fixes: cddb339badb0 (spi/pxa2xx: convert to dma_request_slave_channel_compat())
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
commit e120cc0dcf2880a4c5c0a6cb27b655600a1cfa1d upstream.
This corrects a problem in spi_pump_messages() that leads to an spi
message hanging forever when a call to transfer_one_message() fails.
This failure occurs in my MCP2210 driver when the cs_change bit is set
on the last transfer in a message, an operation which the hardware does
not support.
Rationale
Since the transfer_one_message() returns an int, we must presume that it
may fail. If transfer_one_message() should never fail, it should return
void. Thus, calls to transfer_one_message() should properly manage a
failure.
Fixes: ffbbdd21329f3 (spi: create a message queueing infrastructure)
Signed-off-by: Daniel Santos <daniel.santos@pobox.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
commit 86b3bde003e6bf60ccb9c09b4115b8a2f533974c upstream.
The spi command must include the full message length including any
prepended writes, else transfers larger than 256 bytes will be
incomplete.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
commit 54acbd9688e6324470671525c7916011f1ff8081 upstream.
Newer Intel PCHs with LPSS have the same SPI controllers than Haswell but
ACPI IDs are different. Add these IDs to the driver list.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
'spi/fix/mpc512x-psc', 'spi/fix/mxs', 'spi/fix/pxa2xx', 'spi/fix/qspi', 'spi/fix/rspi' and 'spi/fix/txx9' into spi-linus
|
|
|
|
The Intel LPSS SPI private register bits have to be restored
when system resume from S3 suspend.
Signed-off-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
|
There is a bug in qspi removal path, as a result of which
qspi cannot be removed when used as a module. The patch
solves the bug and qspi can be removed cleanly.
The bugs fixed are:
-pm_runtime used around register access.
- pm_runtime_disable need to be done before removal.
- spi_unregister_master need to be called to unregister
the spi device.
Tested on DRA7 board.
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
|
clean up pm_runtime error check in accordance with rest of the check in
the driver.
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
|
The ti_qspi_remove() use the platform drvdata as a type of
struct ti_qspi, we should pass correct platform drvdata to
platform_set_drvdata() in ti_qspi_probe().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
|
Newer Intel PCHs with LPSS have the same SPI controllers than Haswell but
ACPI IDs are different. Add these IDs to the driver list.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
|
|
devres_add() should be called when the action to be undone succeeded,
not when it failed. Fix the inverted test in devm_spi_register_master()
which was doing the opposite.
The user-visible issue without this fix is:
insmod spi-tegra114.ko
Assume there's an MTD device on that SPI bus, which creates /dev/mtd0.
rmmod spi-tegra114
Doesn't remove devices on the SPI bus.
insmod spi-tegra114.ko
Creates a duplicate SPI device which creates /dev/mtd1.
hexdump -C /dev/mtd0
That's the old device, which uses an SPI bus hosted by a non-existent
module, which causes the oops below.
Unable to handle kernel paging request at virtual address bf0017c0
pgd = c0004000
[bf0017c0] *pgd=ad51b811, *pte=00000000, *ppte=00000000
Internal error: Oops: 80000007 [#1] PREEMPT SMP ARM
...
PC is at 0xbf0017c0
LR is at spi_pump_messages+0x15c/0x204
pc : [<bf0017c0>] lr : [<c02f0af8>] psr: 60000113
...
Fixes: 666d5b4c742b ("spi: core: Add devm_spi_register_master()")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull more ACPI and power management updates from Rafael Wysocki:
- ACPI-based device hotplug fixes for issues introduced recently and a
fix for an older error code path bug in the ACPI PCI host bridge
driver
- Fix for recently broken OMAP cpufreq build from Viresh Kumar
- Fix for a recent hibernation regression related to s2disk
- Fix for a locking-related regression in the ACPI EC driver from
Puneet Kumar
- System suspend error code path fix related to runtime PM and runtime
PM documentation update from Ulf Hansson
- cpufreq's conservative governor fix from Xiaoguang Chen
- New processor IDs for intel_idle and turbostat and removal of an
obsolete Kconfig option from Len Brown
- New device IDs for the ACPI LPSS (Low-Power Subsystem) driver and
ACPI-based PCI hotplug (ACPIPHP) cleanup from Mika Westerberg
- Removal of several ACPI video DMI blacklist entries that are not
necessary any more from Aaron Lu
- Rework of the ACPI companion representation in struct device and code
cleanup related to that change from Rafael J Wysocki, Lan Tianyu and
Jarkko Nikula
- Fixes for assigning names to ACPI-enumerated I2C and SPI devices from
Jarkko Nikula
* tag 'pm+acpi-2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (24 commits)
PCI / hotplug / ACPI: Drop unused acpiphp_debug declaration
ACPI / scan: Set flags.match_driver in acpi_bus_scan_fixed()
ACPI / PCI root: Clear driver_data before failing enumeration
ACPI / hotplug: Fix PCI host bridge hot removal
ACPI / hotplug: Fix acpi_bus_get_device() return value check
cpufreq: governor: Remove fossil comment in the cpufreq_governor_dbs()
ACPI / video: clean up DMI table for initial black screen problem
ACPI / EC: Ensure lock is acquired before accessing ec struct members
PM / Hibernate: Do not crash kernel in free_basic_memory_bitmaps()
ACPI / AC: Remove struct acpi_device pointer from struct acpi_ac
spi: Use stable dev_name for ACPI enumerated SPI slaves
i2c: Use stable dev_name for ACPI enumerated I2C slaves
ACPI: Provide acpi_dev_name accessor for struct acpi_device device name
ACPI / bind: Use (put|get)_device() on ACPI device objects too
ACPI: Eliminate the DEVICE_ACPI_HANDLE() macro
ACPI / driver core: Store an ACPI device pointer in struct acpi_dev_node
cpufreq: OMAP: Fix compilation error 'r & ret undeclared'
PM / Runtime: Fix error path for prepare
PM / Runtime: Update documentation around probe|remove|suspend
cpufreq: conservative: set requested_freq to policy max when it is over policy max
...
|
|
Pull slave-dmaengine changes from Vinod Koul:
"This brings for slave dmaengine:
- Change dma notification flag to DMA_COMPLETE from DMA_SUCCESS as
dmaengine can only transfer and not verify validaty of dma
transfers
- Bunch of fixes across drivers:
- cppi41 driver fixes from Daniel
- 8 channel freescale dma engine support and updated bindings from
Hongbo
- msx-dma fixes and cleanup by Markus
- DMAengine updates from Dan:
- Bartlomiej and Dan finalized a rework of the dma address unmap
implementation.
- In the course of testing 1/ a collection of enhancements to
dmatest fell out. Notably basic performance statistics, and
fixed / enhanced test control through new module parameters
'run', 'wait', 'noverify', and 'verbose'. Thanks to Andriy and
Linus [Walleij] for their review.
- Testing the raid related corner cases of 1/ triggered bugs in
the recently added 16-source operation support in the ioatdma
driver.
- Some minor fixes / cleanups to mv_xor and ioatdma"
* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (99 commits)
dma: mv_xor: Fix mis-usage of mmio 'base' and 'high_base' registers
dma: mv_xor: Remove unneeded NULL address check
ioat: fix ioat3_irq_reinit
ioat: kill msix_single_vector support
raid6test: add new corner case for ioatdma driver
ioatdma: clean up sed pool kmem_cache
ioatdma: fix selection of 16 vs 8 source path
ioatdma: fix sed pool selection
ioatdma: Fix bug in selftest after removal of DMA_MEMSET.
dmatest: verbose mode
dmatest: convert to dmaengine_unmap_data
dmatest: add a 'wait' parameter
dmatest: add basic performance metrics
dmatest: add support for skipping verification and random data setup
dmatest: use pseudo random numbers
dmatest: support xor-only, or pq-only channels in tests
dmatest: restore ability to start test at module load and init
dmatest: cleanup redundant "dmatest: " prefixes
dmatest: replace stored results mechanism, with uniform messages
Revert "dmatest: append verify result to results"
...
|
|
Once a spi_master_get() call succeeds, we need an additional
spi_master_put() call to free the memory, otherwise we will
leak a reference to master. Fix by removing the unnecessary
spi_master_get() call.
Fixes: 33e195acf268 ('spi: mxs: use devm_spi_register_master()')
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
|
Once a spi_master_get() call succeeds, we need an additional
spi_master_put() call to free the memory, otherwise we will
leak a reference to master. Fix by removing the unnecessary
spi_master_get() call.
Fixes: 247263dba208 ('spi: bcm63xx: use devm_spi_register_master()')
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
|
Once a spi_master_get() call succeeds, we need an additional
spi_master_put() call to free the memory, otherwise we will
leak a reference to master. Fix by removing the unnecessary
spi_master_get() call.
Fixes: 2fe7e4add3e5 ('spi: txx9: use devm_spi_register_master()')
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
|