Commit Graph

19 Commits

Author SHA1 Message Date
Peng Hao
06e777ea40 ARM: pxa: ssp: unneeded to free devm_ allocated data
[ Upstream commit ba16adeb34 ]

devm_ allocated data will be automatically freed. The free
of devm_ allocated data is invalid.

Fixes: 1c459de1e6 ("ARM: pxa: ssp: use devm_ functions")
Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
[title's prefix changed]
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-13 14:04:59 -07:00
Arnd Bergmann
8bf42cc888 ARM: mmp: make plat-pxa build standalone
The ssp.c driver in plat-pxa is the only remaining file including a
mach/*.h header from mmp. It actually doesn't need mach/hardware.h at
all, so we can remove the #include.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2015-12-01 21:44:28 +01:00
Jarkko Nikula
b692cb83b1 ARM: pxa: ssp: Fix build error by removing originally incorrect DT binding
Commit 03fbf488ce ("spi: pxa2xx: Differentiate Intel LPSS types") caused
build error here because it removed the type LPSS_SSP and I didn't notice
the type was used here too.

I believe commit a6e56c28a1 ("ARM: pxa: ssp: add DT bindings") added it
accidentally by copying all enum pxa_ssp_type types from
include/linux/pxa2xx_ssp.h even LPSS_SSP was for Intel LPSS SPI devices.

Fix the build error by removing this incorrect binding.

Fixes: 03fbf488ce ("spi: pxa2xx: Differentiate Intel LPSS types")
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reported-by: Axel Lin <axel.lin@ingics.com>
Cc: <stable@vger.kernel.org> # 4.2
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
2015-09-13 12:55:27 +02:00
Wolfram Sang
848ceb1b85 ARM: plat-pxa: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:20:07 +02:00
Daniel Mack
6f0243a1ec ARM: pxa: ssp: provide platform_device_id for PXA3xx
Provide an explicit match string for PXA3xx SSP ports.

Without this match string, SSP0/SSP1/SSP2 in PXA3xxx will be consided as
PXA27x SSP Port.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2014-09-19 01:56:02 +08:00
Olof Johansson
d5ece9373c ARM: pxa: ssp: Check return values from phandle lookups
Commit a6e56c28a1 (ARM: pxa: ssp: add DT bindings) causes warnings
when built:

arch/arm/plat-pxa/ssp.c: In function 'pxa_ssp_probe':
arch/arm/plat-pxa/ssp.c:145:17: warning: 'dma_spec.args[0]' may be used
	uninitialized in this function [-Wmaybe-uninitialized]

Resolve by checking return values and aborting when lookups fail.

Cc: Daniel Mack <zonque@gmail.com>
Cc: Mark Brown <broonie@linaro.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-09-09 17:14:09 -07:00
Daniel Mack
6446221c14 ARM: pxa: ssp: add pxa_ssp_request_of()
Add a function to lookup ssp devices from device tree. This way, users
can reference the ssp devices in order to register to them.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-14 19:54:30 +01:00
Daniel Mack
1c459de1e6 ARM: pxa: ssp: use devm_ functions
Use devm_ functions to allocate memory, ioremap, clk_get etc to clean up
the error unwind path.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-14 19:54:27 +01:00
Daniel Mack
a6e56c28a1 ARM: pxa: ssp: add DT bindings
This patch contains an ugly hack for looking up the the DMA request
number. The problem here is that the implementation as it stands will
allocate the DMA channel from the user of the ssp port, and hence we
cannot allocate a real channel here.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-14 19:54:23 +01:00
Daniel Mack
970d8a7152 ARM: pxa: ssp: add shortcut for &pdev->dev
No functional change, just a cosmetic cleanup.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-14 19:54:20 +01:00
Daniel Mack
64be28146f ARM: pxa: ssp: remove unnecessary warning on kzalloc() failure
The memory subsystem will already complain loudly enough in such cases.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-14 19:54:12 +01:00
Greg Kroah-Hartman
351a102dbf ARM: drivers: remove __dev* attributes.
CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
markings need to be removed.

This change removes the use of __devinit, __devexit_p, __devinitdata,
and __devexit from these drivers.

Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-03 15:57:04 -08:00
Qiao Zhou
601722157b ARM: MMP: add pxa910-ssp into ssp_id_table
add pxa910-ssp into ssp_id_table, and fix pxa-ssp compiling issue
under mach-mmp architect.

Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-11 12:25:50 +08:00
Sebastian Andrzej Siewior
8348c259dd arm/pxa2xx: reorgazine SSP and SPI header files
The PXA-SPI driver relies on some files / defines which are arm specific
and are within the ARM tree. The CE4100 SoC which is x86 has also the
SPI core.
This patch moves the ssp and spi files from arm/mach-pxa and plat-pxa to
include/linux where the CE4100 can access them.

This move got verified by building the following defconfigs:
   cm_x2xx_defconfig corgi_defconfig em_x270_defconfig ezx_defconfig
   imote2_defconfig pxa3xx_defconfig spitz_defconfig zeus_defconfig
   raumfeld_defconfig magician_defconfig

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
2010-12-01 12:18:33 +01:00
Haojian Zhuang
baffe1699c [ARM] pxa: add namespace on ssp
In order to prevent code ambiguous, add namespace on functions in ssp driver.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:06 +02:00
Julia Lawall
c8ee5c6951 [ARM] pxa: use resource_size() in ssp.c
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:59 +02:00
Julia Lawall
077de1ad5a [ARM] pxa: avoid NULL dereferencing in error handling of ssp.c
The assignments of res to the results of the two calls to
platform_get_resource make it impossible to use res in the error handling
code in the arguments to release_mem_region.

The semantic match that finds the former problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
expression E, E1;
identifier f;
statement S1,S3;
iterator iter;
@@

if ((E == NULL && ...) || ...)
{
 ... when != false ((E == NULL && ...) || ...)
     when != true  ((E != NULL && ...) || ...)
     when != iter(E,...) S1
     when != E = E1
(
 sizeof(E->f)
|
* E->f
)
 ... when any
 return ...;
}
else S3
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:59 +02:00
Haojian Zhuang
7e4992288e [ARM] mmp: support ssp in pxa168
Support ssp devices in PXA168. PXA168 could reuse the code of PXA SSP.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:59 +02:00
Haojian Zhuang
54c39b420f [ARM] pxa: move ssp into common plat-pxa
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:58 +02:00