diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2015-04-22 16:28:20 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-04-22 20:46:45 +0100 |
commit | 575bec53181526ed01c0936ec008e1b70f8f5f31 (patch) | |
tree | 4d3f871549e505cb598dd73154e356b2ef1c8d93 /drivers/usb/musb/musb_dsps.c | |
parent | c517d838eb7d07bbe9507871fab3931deccff539 (diff) | |
download | lwn-575bec53181526ed01c0936ec008e1b70f8f5f31.tar.gz lwn-575bec53181526ed01c0936ec008e1b70f8f5f31.zip |
spi: fsl-spi: use devm_ioremap_resource() to map parameter ram on CPM1
On CPM2, the SPI parameter RAM is dynamically allocated in the
dualport RAM whereas in CPM1, it is statically allocated to a default
address with capability to relocate it somewhere else via the use of
CPM micropatch. The address of the parameter RAM is given by the boot
loader and expected to be mapped via devm_ioremap_resource()
In the current implementation, in function fsl_spi_cpm_get_pram()
there is a confusion between the SPI_BASE register and the base of the
SPI parameter RAM. Fortunatly, it is working properly with MPC866 and
MPC885 because they do set SPI_BASE, but on MPC860 and other old
MPC8xx that doesn't set SPI_BASE, pram_ofs is not properly set.
Also, the parameter RAM is not properly mapped with
devm_ioremap_resource() as it should but still gets accessible by
chance through the full RAM which is mapped from somewhere else.
This patch applies to the SPI driver the same principle as for the
CPM UART: when the CPM is of type CPM1, we simply do an
devm_ioremap_resource() of the area provided via the device tree.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/usb/musb/musb_dsps.c')
0 files changed, 0 insertions, 0 deletions