9
0
Fork 0
Commit Graph

120 Commits

Author SHA1 Message Date
Antony Pavlov 8e89bc594a treewide: remove address of the Free Software Foundation
The FSF address has changed; The FSF site says that
address is

  Free Software Foundation
  51 Franklin Street, Fifth Floor
  Boston, MA 02110-1301
  USA

(see http://www.fsf.org/about/contact/)

Instead of updating it each time the address changes,
just drop it completely treewide.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-11 08:35:25 +02:00
Sascha Hauer 7ccfe4d3a0 Merge branch 'for-next/omap'
Conflicts:
	arch/arm/configs/am335x_beaglebone_defconfig
	arch/arm/configs/am335x_defconfig
2014-06-04 21:04:04 +02:00
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
Jan Luebbe b396e118dd spi: omap: support swapping D0/D1
The OMAP SPI core allows swapping MISO/MOSI and some boards are
wired up that way, so add a property to swap the lines.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
2014-05-15 13:57:49 +02:00
Sascha Hauer bf1d71d5e1 Merge branch 'for-next/misc' 2014-05-05 13:32:37 +02:00
Sascha Hauer 8fb1d4e075 Merge branch 'for-next/mips'
Conflicts:
	arch/mips/boards/loongson-ls1b/serial.c
2014-05-05 11:06:17 +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
Antony Pavlov e21962062e spi: altera_spi: fix altera_spi_setup() return error codes
Reported-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-23 13:59:16 +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
Antony Pavlov 20d70daf48 spi: add controller driver for Atheros AR7XXX/AR9XXX SoCs
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-07 11:22:32 +02:00
Antony Pavlov 33e0b3f973 spi: import bitbang txrx utility functions from linux
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-07 11:22:32 +02:00
Wjatscheslaw Stoljarski d39e527df3 imx-spi: enable v0.7 spi driver for imx53-cspi
Signed-off-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-05 18:28:27 +02:00
Sascha Hauer 3d551bce2b Merge branch 'for-next/spi' 2014-03-07 09:25:56 +01:00
Sascha Hauer 98615784a6 Merge branch 'for-next/modalias' 2014-03-07 09:25:12 +01:00
Alexander Shiyan 56b3558f1d spi: altera_spi: Remove redundant assignment
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-17 08:06:11 +01: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 394edf6377 i2c/spi: match of_modaliases
i2c/spi devices in the devicetree often come with a "vendor,device"
comaptible string. These do not match in barebox, so add a
device_match_of_modalias function which does exactly that.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-07 09:28:02 +01:00
Sascha Hauer ed039cd72b Merge branch 'for-next/omap-drivers' 2013-12-06 08:23:27 +01:00
Sascha Hauer 5525385c78 spi: omap: Add devicetree probe support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 15:35:12 +01:00
Sascha Hauer 1869803405 spi: omap: encode register offset into device_id
The omap3 and omap4/am33xx spi cores differ in the offset of the
registers in the address space. Instead of encoding this into the
resources use the platform_device_id mechanism. This is done in
preparation for devicetree probe support where the address space
is in the devicetree and can't be adjusted.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 15:35:12 +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 2fa5f06958 spi: Get bus_num from devicetree
Get the bus_num from devicetree if a "spi" alias exists.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-31 12:53:08 +01:00
Sascha Hauer fb40dd5157 spi: support dynamic bus ids
When probing spi bus masters from devicetree they got a bus_num
of -1. This works with a single bus master only since all bus masters
had the same bus_num. Detect this and dynamically assign a valid
bus_num.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-31 12:53:08 +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
Eric Bénard 3b3ec898cd mxs_spi: unbreak driver
since the switch to common clock, SPI driver reports :
MXS: Timeout resetting block via register 0x80014000
mxs_spi mxs_spi2: MXS SPI: Timeout waiting for start

The reason is that the clock is not enabled anywhere in
the driver.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-10 21:03:59 +02:00
Eric Bénard 524d2c81a0 mxs_spi: fix compile error
this fix :
drivers/spi/mxs_spi.c:29:22: fatal error: mach/mxs.h: No such file or directory
and
drivers/spi/mxs_spi.c: In function 'mxs_spi_setup':
drivers/spi/mxs_spi.c:102:2: error: too few arguments to function 'stmp_reset_block'
include/stmp-device.h:21:12: note: declared here

only compile tested ATM

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-10 08:19:35 +02:00
Sascha Hauer 8c349b5526 ARM: AT91: move iomux definitions to iomux.h
mach/gpio.h is for the gpio API, so move unrelated stuff
away.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-16 15:58:33 +02:00
Sascha Hauer feefc3ef3b Merge branch 'for-next/mtd' 2013-08-05 12:49:58 +02:00
Sascha Hauer 07afe7d0e0 Merge branch 'for-next/marvell'
Conflicts:
	arch/arm/boards/Makefile
	arch/arm/dts/Makefile
2013-08-05 12:49:55 +02:00
Sascha Hauer ca13a84ac2 ARM: MXS: introduce stmp device support
MXS specific devices have some common infrastructure in the kernel
known as STMP devices. We have the same in barebox, but with a
mxs_ prefix instead of a stmp_ prefix. As some STMP devices are
also found on i.MX6 move the common infrastructure out of MXS
specific files and use the stmp_ prefix.

This is done in preparation for i.MX6 NAND support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 16:25:13 +02:00
Alexander Shiyan 4802ed1489 spi: Reuse "driver_match" for SPI bus
This will allow to use device_ids and make code a bit smaller.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-15 10:08:11 +02:00
Sebastian Hesselbarth 5db1a578d6 spi: add Marvell MVEBU SoC SPI driver
This adds support for the SPI controller found on Marvell MVEBU SoCs
(Dove, Kirkwood, Discovery Innovation, and Armada 370/XP). Current driver
is DT only. Compatible strings are provided for Orion (common denominator),
Armada 370/XP and Dove SoCs.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-08 09:42:49 +02: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 8afe2cb4d4 Merge branch 'for-next-manual/oftree-linux-sync' 2013-07-02 07:08:46 +02:00
Sascha Hauer da05cbd69a Merge branch 'for-next/omap' 2013-07-01 10:14:40 +02:00
Teresa Gámez 1806c82ce8 omap3_spi: Set the correct CS number for AM33xx
Changed the number of CS for AM33xx boards to 2.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-21 08:05:54 +02:00
Teresa Gámez e3de0065c4 omap3_spi: Remove CS check in driver
Board file or DT has to take care that the correct
chip select and bus values are used.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-21 08:05:49 +02:00
Sebastian Hesselbarth 2e2265bfd4 OF: base: convert and remove device_node_for_nach_child
Remove device_node_for_nach_child and convert users to corresponding
imported OF API functions.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-20 21:22:19 +02:00
Sebastian Hesselbarth 905f3ee7fb OF: base: sync of_find_property with linux OF API
To start synchronizing OF API of barebox with linux OF API, this adds
a length pointer to of_find_property. Also all current users of that
function are updated to reflect the API change.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 17:18:01 +02:00
Sascha Hauer 13a2b14650 spi: mxs: Use clk support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-20 08:49:56 +02:00
Jan Luebbe 3b16061615 arm: omap: am33xx: set up SPI devices
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-18 21:33:58 +02:00
Sascha Hauer 56dd3c6c2a spi: improve devicetree support
- zero spi_board_info structure to not accidently pass
  unitilialized fields
- parse spi-max-frequency property from devicetree
- parse mode flags from devicetree

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-21 09:35:19 +02:00
Alexander Shiyan aeaeb40ccf Add more drivers to using device_platform_driver()
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-14 07:15:44 +01:00
Sascha Hauer ea0f831cd0 Merge branch 'for-next/mxs' 2013-03-04 09:21:54 +01:00
Sascha Hauer 13408877f4 Merge branch 'for-next/misc' 2013-03-04 09:21:37 +01:00