9
0
Fork 0
Commit Graph

40 Commits

Author SHA1 Message Date
Sascha Hauer b90e1f70c8 spi: i.MX: Move to coredevice_initcall
SPI is often used by other devices, so make sure it's initialized
early.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-19 08:36:37 +02:00
Sascha Hauer bf1d71d5e1 Merge branch 'for-next/misc' 2014-05-05 13:32:37 +02:00
Sascha Hauer b568687bc3 Merge branch 'for-next/imx' 2014-05-05 11:05:51 +02:00
Alexander Shiyan ece46dd3fc SPI: i.MX: Remove redundant assignment
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-29 08:11:46 +02:00
Alexander Shiyan 8a343b9b00 spi: i.MX: Optimise driver private structure
No need to store init() function in the driver private structure
since it called only once during startup.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-23 12:32:35 +02:00
Alexander Shiyan 6a40096a6c spi: i.MX: Simplify cspi_0_0_init()
Use SPI module software reset to simplify cspi_0_0_init().

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-23 12:32:35 +02:00
Alexander Shiyan 0530a2ea8f spi: i.MX: Fix direction for CS GPIOs
Direction for CS GPIOs (for some targets) is undefined.
This patch fixes this issue.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-08 08:20:27 +02:00
Sascha Hauer 0ad1e8d8df spi: imx: Use device ids
To let the driver work on all SoCs without the use of cpu_is_*()

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 08:41:25 +01:00
Sascha Hauer c68acd82f6 spi: imx: Use IS_ENABLED to drop ifdefs
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-09 10:06:21 +01:00
Sascha Hauer 8559a7a85f spi: imx: drop use of enum
enum imx_spi_devtype is used as index into an array of controller types.
This makes the controller type handling unnecessarily complicated. Just
drop the enum and instead of an array use different statically initialized
structs and referene them by name.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-09 10:05:41 +01:00
Sascha Hauer b67b2671c2 treewide: Add missing includes
A lot of files rely on include/driver.h including include/of.h (and
this including include/errno.h. include the files explicitly so we can
eventually get rid of including of.h from driver.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-08 15:42:04 +01:00
Sascha Hauer fd5b82e640 spi: Call spi_of_register_slaves from core
Makes individual handling of OF spi slaves unnecessary in the bus drivers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-31 12:53:05 +01:00
Sebastian Hesselbarth 61bb8bfc7c OF: gpio: convert DT based gpio handling to new OF API
This creates a Linux OF API compatible counterpart of of_get_named_gpio_flags.
Existing of_get_named_gpio is converted to a static inline function, which is
in the corresponding of_gpio.h include. While at it, drivers/of/gpio.c is
also renamed to drivers/of/of_gpio.c to follow the of_ prefix naming scheme.
The new include is also added to existing users of of_get_named_gpio.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-05 08:26:57 +02:00
Sascha Hauer 13408877f4 Merge branch 'for-next/misc' 2013-03-04 09:21:37 +01:00
Hubert Feurstein 7ba9f45f6a imx_spi: fix bus-num setup
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-21 15:05:47 +01:00
Alexander Shiyan 6a256321b8 Use new device_platform_driver() macro for drivers
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 09:23:28 +01:00
Sascha Hauer 94de405d8f Merge branch 'for-next/imx-clk' 2012-10-04 15:24:57 +02:00
Sascha Hauer d4edd480b2 ARM i.MX: Remove old clock support
The old clock support is now unused. Remove it. The former i.MX clko
command is superseeded by generic clock manipulation commands.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:57 +02:00
Sascha Hauer 2155161eca spi i.MX: Switch to clk support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:56 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3c5327e660 switch all platform_bus device/driver registering to platform_driver/device_register
now register_driver and register_device are for bus only usage.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-04 15:19:12 +02:00
Sascha Hauer d1e65d2a7b Merge branch 'for-next/remove-fsf-address'
Conflicts:
	drivers/net/miidev.c
	include/miidev.h
2012-10-03 21:12:48 +02:00
Sascha Hauer 86dcc1754e spi imx: dt support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 21:15:12 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:57:41 +02:00
Eric Bénard ae22e4f2f9 i.MX35: add cspi1 support
tested with a m25p128 flash both in nand boot & spi boot.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-29 09:00:22 +02:00
Sascha Hauer 5f78112920 SPI i.MX: Add support for i.MX6
The i.MX5 does not have a valid function to get the spi clock. This
patch introduces a function for i.MX6, and moves the bogus spi clock
speed to the speed-imx5*.c. Not nice, but preserves the current status
quo for i.MX5

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-31 19:59:50 +02:00
Alexander Shiyan 385c54648b i.MX SPI: Setup SPI chipselect to inactive state while initializing device
To avoid unnecessary preset initial state chipselect lines for SPI, set it to
inactive state when adding devices to the system.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-16 19:20:33 +02:00
Sascha Hauer 3ee7877a48 introduce io.h
To allow for some generic io accessors introduce io.h and use
this instead of asm/io.h throughout the tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-22 19:03:05 +02:00
Paul Fertser 8c1f388d88 imx25: imx_spi: support CSPI v0.7 as found on i.MX25
Based on the Linux driver. Tested with m25p80 with CS in GPIO mode.

Clock setting support is ad-hoc as the corresponding mach is not using
the generic clock infrastructure.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-21 09:43:44 +02:00
Paul Fertser 19284441cc imx_spi: rework transfer according to the API, fix compatibility with spi_write_then_read()
This code was tested barely with m25p80 driver, reading jedec id and some data
from the chip worked fine.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-12 12:19:40 +02:00
Marc Kleine-Budde 9eaaf1b1ca ARM: add support for the i.MX53
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-29 12:10:38 +02:00
Sascha Hauer 294894c975 spi i.MX: convert to struct resource
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-19 00:12:52 +08:00
Juergen Beisert f9a11ecfef Make DIV_ROUND_UP macro globally available
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-12-14 15:15:06 +01:00
Sascha Hauer 8f14d065e1 spi i.MX: Add i.MX51 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:22:13 +02:00
Sascha Hauer a104d0eaa3 spi i.MX: redirect functions to version specific functions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:22:13 +02:00
Sascha Hauer 3e2efa148e spi i.MX: add spi version namespace to register defines
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:22:12 +02:00
Jean-Christophe PLAGNIOL-VILLARD f6a579da9c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-10-22 14:21:25 +02:00
Sascha Hauer 5931e20907 imx spi: Use gpio as chip selects
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-02 15:34:25 +02:00
Sascha Hauer 1ecc871b3a imx_spi: make locally used function static
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-05-13 15:59:29 +02:00
Sascha Hauer a14a5c02f0 first (partly) running spi support 2008-03-14 12:59:55 +01:00
Sascha Hauer 906eea397a beginning of SPI support 2008-03-11 22:13:06 +01:00