9
0
Fork 0
Commit Graph

2868 Commits

Author SHA1 Message Date
Antony Pavlov e203955994 serial: ns16550: add compatible entry for "ns16450"
"ns16450" uses the same code as "ns16550a" but with FIFO disabled.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-26 09:02:41 +01:00
Antony Pavlov 6683b892ea serial: ns16550: make FCR setup value part of struct ns16550_priv
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-26 09:02:41 +01:00
Antony Pavlov 494ca69454 serial: ns16550: fix whitespaces
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-26 09:02:41 +01:00
Philipp Zabel 4449fac898 mtd: ubi: avoid NULL pointer dereference in ubi_get_device
If the ubidetach command is given a number that passes the range check
in ubi_detach_mtd_dev, but at which index the ubi_devices array contains
a NULL pointer, ubi_get_device tries to dereference this NULL pointer
to increment the ubi device reference count.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-23 09:46:47 +01:00
Antony Pavlov e6bbe60a53 clocksource: add dummy software-only clocksource
This driver is very handy for initial barebox porting.
It was used for running barebox on DiGiC2-based camera
and initial porting barebox to Loongson-1 and ar9331.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Alexander Aring <alex.aring@gmail.com>
Reported-by: Alexander Shiyan <shc_work@mail.ru>
2014-03-19 21:43:43 +01:00
Sascha Hauer 64d2daa19d usb: gadget: propagate error code from usb_composite_register
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-19 16:29:14 +01:00
Sascha Hauer d465cb7a72 usb: gadget: set composite to NULL when usb_gadget_register_driver fails
So that it can be tried later again.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-19 16:29:08 +01:00
Antony Pavlov ca7340ebaf gpio: add driver for TI DaVinci SoCs
This driver is dts-only version of driver from Linux v3.14-rc5.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-18 17:28:11 +01:00
Alexander Shiyan 0017d4d2d6 mci: core: Typo fix in printk specifier
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-17 08:20:48 +01:00
Dmitry Lavnikevich 3676454f5c nand: mxs: Fix for calculating ecc strength on some types of NAND flash
Was tested on NAND with {writesize=4096, oobsize=224} and
{writesize=2048, oobsize=64}.

This patch will not break any NAND that was working
before. Implemented calculation way may be used for other NAND chips
with writesize == 2048 but oobsize != 64.

Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
Signed-off-by: Grigory Milev <g.milev@sam-solutions.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-12 21:26:37 +01:00
Dmitry Lavnikevich c15680099e nand: mxs: Check for up to 4 NAND chips
Since i.MX6 has only one R/B actual pin, if there are several R/B
signals (from different NAND chips) they must be connected to this
pin.

Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
Signed-off-by: Grigory Milev <g.milev@sam-solutions.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-12 21:26:37 +01:00
Dmitry Lavnikevich 95147b1d95 ubi: Fix for creating ubi volumes with 64bit size
Since MTD is already supports >= 4GB device sizes it is better to
allow ubi valumes also be created of larger sizes.

Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
Signed-off-by: Grigory Milev <g.milev@sam-solutions.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-12 21:26:37 +01:00
Dmitry Lavnikevich 76a88c0227 mtd: Support for 4GB partitions
This patch implements correct way of creating partitions on mtd
devices with size >= 4GB.

Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
Signed-off-by: Grigory Milev <g.milev@sam-solutions.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-12 21:26:37 +01:00
Dmitry Lavnikevich 1ee640765a mtd: Update internal API to support 64-bit device size
MTD internal API presently uses 32-bit values to represent device
size. This patch updates them to 64-bits but leaves the external API
unchanged.

In general, changing from 32-bit to 64-bit values cause little
or no changes to the majority of the code with the following
exceptions:
  - printk message formats;
  - division and modulus of 64-bit values (mtd_div_by_wb,
    mtd_div_by_eb may be used in some of such cases).

Was tested on phyFLEX i.MX6.

Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
Signed-off-by: Grigory Milev <g.milev@sam-solutions.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-12 21:26:37 +01:00
Sascha Hauer cf1b29a850 Merge branch 'for-next/ubi'
Conflicts:
	drivers/mtd/ubi/cdev.c
2014-03-07 09:26:35 +01:00
Sascha Hauer 3d551bce2b Merge branch 'for-next/spi' 2014-03-07 09:25:56 +01:00
Sascha Hauer 23a8d93c52 Merge branch 'for-next/pwm' 2014-03-07 09:25:56 +01:00
Sascha Hauer 74213ed9a7 Merge branch 'for-next/partitionhelper'
Conflicts:
	fs/devfs-core.c
2014-03-07 09:25:53 +01:00
Sascha Hauer e358922a74 Merge branch 'for-next/mtd'
Conflicts:
	drivers/mtd/core.c
	net/eth.c
2014-03-07 09:25:18 +01:00
Sascha Hauer 98615784a6 Merge branch 'for-next/modalias' 2014-03-07 09:25:12 +01:00
Sascha Hauer a8a08f88cc Merge branch 'for-next/misc'
Conflicts:
	common/environment.c
2014-03-07 09:25:09 +01:00
Sascha Hauer 2331b1d8e8 Merge branch 'for-next/marvell'
Conflicts:
	arch/arm/dts/Makefile
2014-03-07 09:25:02 +01:00
Sascha Hauer 048b03641e Merge branch 'for-next/imx' 2014-03-07 09:24:40 +01:00
Sascha Hauer 92ab6b5ea5 Merge branch 'for-next/gpio-keys' 2014-03-07 09:24:40 +01:00
Sascha Hauer 4df69d0b6e Merge branch 'for-next/env' 2014-03-07 09:24:40 +01:00
Sascha Hauer fbf087808b Merge branch 'for-next/dfu' 2014-03-07 09:24:40 +01:00
Herve Codina ad22ad38ea mtd: nand: atmel pmecc: disable subpage writes
I am using an sam5d35 and its pmecc nand ecc controller.

In barebox, using similar atmel_nand.c the system crashes.

The problem was a call to chip->ecc.hwctl from nand_write_subpage_hwecc
(nand_base.c) when we write a sub page.

chip->ecc.hwctl function is not set when we are using PMECC controller.

As a workaround, i set NAND_NO_SUBPAGE_WRITE for PMECC controller in
order to disable sub page access in nand_write_page.

I think we can have the same problem in Linux. I do not performed
subpage nand writes from Linux but i made the following patch according
to my Barebox defect.

Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-03 08:56:28 +01:00
Sascha Hauer 767c6b4a81 led: Add default-on trigger
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-03 08:06:04 +01:00
Sascha Hauer 70e2d85096 led: Add pwm-led driver
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-03 08:05:19 +01:00
Sascha Hauer e390a8e2b4 led: move led_of_parse_trigger to core
So that other LED drivers can use it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-03 08:05:15 +01:00
Sascha Hauer ea0ed15786 PWM: Implement devicetree support
This implements of_pwm_request() for PWM client drivers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-28 15:05:46 +01:00
Sascha Hauer 37acfdf97d PWM: Add functions for getting/setting period/duty cycle
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-28 15:05:41 +01:00
Sascha Hauer f957d0a09c mtd: ubi: rework logging
By default UBI is very verbose. Decrease the verbosity, turn
printf messages into ubi_ messages and add device parameters
for the values which are not printed anymore.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-28 11:23:56 +01:00
Philippe Rétornaz fb7836ebf6 cfi_flash: fix NULL pointer dereference
We need to setup the info->dev pointer before flash_get_size() since it
might use it for dev_dbg().
This fix a crash on boot when debug output is enabled.

Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-28 09:03:04 +01:00
Uwe Kleine-König 14d0355d7c mtd/nand: constify filename parameter
The string pointed to isn't modified, so declare it as const.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-28 08:20:26 +01:00
Sascha Hauer 991a12da04 usb: dfu: Add create flag
With the create flag DFU can upload to regular, previously non existing
files.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-28 08:14:14 +01:00
Sascha Hauer 9b731118f9 usb: dfu: Fix spelling of flag name
DFU_FLAG_SAVE should really be named DFU_FLAG_SAFE.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-28 08:14:14 +01:00
Sascha Hauer d5e38fc913 mtd: mtdoob: Do not create for partitions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-26 08:33:19 +01:00
Sascha Hauer 05e4864f6b mtd: mtdraw: Do not create for partitions and devices without oob
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-26 08:33:18 +01:00
Sascha Hauer 9c66af7b0e ubi: register ubi devices and volumes as devices
struct ubi_device and struct ubi_volume have devices attached
to them. Register them to make them part of the barebox device
hierarchy.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-26 08:33:18 +01:00
Sascha Hauer 0c76b7e377 mtd: register mtd partitions as real mtd devices
So far mtd partitions were mtd devices, but these were not registered.
This patch changes this. mtd partitions are now registered like real
mtd devices. This makes them part of the device hierarchy.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-26 08:33:18 +01:00
Sascha Hauer 08f007c897 mtd: partition: make the mtd device the parent of the partition
Parent of a partition should be the parent mtd device, not its
parent.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-26 08:33:18 +01:00
Sascha Hauer e25cabf6a3 mtd: partition: only copy selected fields to partition
struct mtd_info contains members which should not be copied
to the new partition, like for example the class_dev, so
only copy selected members of struct mtd_info to the partition.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-26 08:33:18 +01:00
Sascha Hauer 6f0a7d82a1 mtd: Only call of_parse_partitions when the mtd has a parent
mtd->parent is optional so we can't derefence mtd->parent->device_node
without checking mtd->parent.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-26 08:33:18 +01:00
Sascha Hauer bfc58c2d8e mtd: erase_info may be modified in mtd_erase
erase_info may be modified by the mtd partition code, so
set the address each time we call mtd_erase.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-26 08:33:11 +01:00
Sascha Hauer 6613e2d8fb ARM: i.MX: Make mxc_iomux_v3_setup_multiple_pads argument const
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-20 14:50:10 +01:00
Sascha Hauer 7a037a952d input: gpio-keys: Add devicetree probe support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-17 08:23:41 +01:00
Sascha Hauer 2c194e5822 input: Add keycode to barebox key translation table
Devicetrees specify the keyboard codes for the gpio-keys
driver, so add a table to translate them into something
barebox can use.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-17 08:23:41 +01:00
Sascha Hauer 59d6a0b7f1 input: gpio-keys: separate internal data from platform_data
Do not abuse platform data for internal driver data, instead
use a separate struct for that.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-17 08:23:41 +01:00
Sascha Hauer 7e66707c76 input: Add BB_ prefix to KEY_ defines
Our KEY_ defines conflict with the standard Linux KEY_ defines, so
add a BB_ prefix to them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-17 08:23:37 +01:00
Alexander Shiyan 409df4db89 drivers/of/base.c: Fix sparse warnings
drivers/of/base.c:70:20: warning: symbol 'root_node' was not declared. Should it be static?
drivers/of/base.c:72:20: warning: symbol 'of_aliases' was not declared. Should it be static?
drivers/of/base.c:1724:20: warning: symbol 'of_chosen' was not declared. Should it be static?
drivers/of/base.c:1725:12: warning: symbol 'of_model' was not declared. Should it be static?

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-17 08:21:23 +01:00
Alexander Shiyan 132b10bc4a drivers/i2c/i2c.c: Fix sparse warnings
drivers/i2c/i2c.c:246:19: warning: symbol 'i2c_new_device' was not declared. Should it be static?
drivers/i2c/i2c.c:274:6: warning: symbol 'of_i2c_register_devices' was not declared. Should it be static?

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-17 08:21:23 +01:00
Alexander Shiyan b6cec342d9 drivers/clk/clk-divider-table.c: Fix sparse warning
drivers/clk/clk-divider-table.c:81:16: warning: symbol 'clk_divider_table_ops' was not declared. Should it be static?

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-17 08:21:23 +01:00
Alexander Shiyan d654d73537 drivers/clk/clk-gate.c: Fix sparse warning
drivers/clk/clk-gate.c:79:16: warning: symbol 'clk_gate_ops' was not declared. Should it be static?

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-17 08:21:23 +01:00
Alexander Shiyan 525bc8fc66 drivers/clk/clk-mux.c: Fix sparse warning
drivers/clk/clk-mux.c:53:16: warning: symbol 'clk_mux_ops' was not declared. Should it be static?

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-17 08:21:23 +01:00
Alexander Shiyan db6f20a1e5 drivers/clk/clk-fixed-factor.c: Fix sparse warning
drivers/clk/clk-fixed-factor.c:38:16: warning: symbol 'clk_fixed_factor_ops' was not declared. Should it be static?

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-17 08:21:23 +01:00
Alexander Shiyan 9404bfce88 drivers/clk/clk-fixed.c: Fix sparse warning
drivers/clk/clk-fixed.c:35:16: warning: symbol 'clk_fixed_ops' was not declared. Should it be static?

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-17 08:21:22 +01:00
Alexander Shiyan 07a6c818ef USB gadget: 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
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
Alexander Shiyan 2126c89004 mtd: nand_imx: 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 acd028a3cb PWM: Add i.MX PWM driver
The Kernel driver from Linux-3.13 with some adjustments for
barebox.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-14 16:34:12 +01:00
Sascha Hauer 9bdef9e7f2 mci: Fix version handling
Currently the version defines reflect the digits in the version
number. MMC_VERSION_4_41 is defined as 0x441 and MMC_VERSION_4_5
is defined as 0x405. This results in MMC_VERSION_4_5 < MMC_VERSION_4_41
becoming true which was surely not intended. Fix this by
redefining the versions as 0x<major><minor><micro>. This makes the
string generation more complicated but makes versions comparable
again.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-14 16:30:13 +01:00
Sascha Hauer 72141fa925 PWM: pxa: use pwmx as devname
As this changes the name of the pwm we also have to adjust it in
pwm_request.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-14 07:17:23 +01:00
Sascha Hauer d23af7a0a0 device: remove parameters when unregistering a device
Otherwise we loose memory on each device_unregister. The ethernet
code used to do this before calling unregister_device. This can
now be removed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-13 19:39:11 +01:00
Sascha Hauer f0bd826abe device: init bus list
bus_list is only initialized when the device has a bus, but it
needs to be initialized in unregister_device, so initialize the
list unconditionally.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-13 19:39:11 +01:00
Sascha Hauer 29ea8bcd94 mtd: Simplify partitions
Embed the partition information in struct mtd_info. This makes the
mtd partition code simpler.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-13 19:39:08 +01:00
Sascha Hauer 5da563f1e6 PWM: Use a separate device for PWMs
Instead of directly using the hardware devicet for PWMs register
a logical PWM device so that the user operates on pwmx devices rather
than pxa-pwmx.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-13 10:57:40 +01:00
Sascha Hauer 1e6db288d9 USB gadget: dfu: propagate error from usb_gadget_poll
So that the dfu command can bail out with an error when usb_gadget_poll
fails.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-13 10:40:28 +01:00
Sascha Hauer 771109df46 USB gadget: fsl: Bail out if no udc exists
When there is no udc registered bail out in usb_gadget_poll
instead of crashing the system.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-13 10:40:22 +01:00
Sascha Hauer 1a3315ad7d USB gadget: at91: return error when no udc is registered
When no udc is registered it is clearly an error when usb_gadget_poll
is called. Let the upper layers know that.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-13 10:38:56 +01:00
Sascha Hauer 0d70fb43e0 video: imx: Add a name to perclk
perclk should be named 'per' to make sure we get the correct clock.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 17:06:52 +01:00
Eric Bénard 4395095ab5 sata-imx: i.MX53, use the internal 120MHz clock by default
this allows SATA to work on i.MX53 QSB-R :
barebox@Freescale i.MX53 Quick Start-R Board:/ ata0.probe=1
imx-sata 10000000.sata: port 0: SATA link ok
imx-sata 10000000.sata: port 0: Spinning up device...
imx-sata 10000000.sata: port 0: ok.
ata0: registered /dev/ata0

before this fix the log was :
barebox@Freescale i.MX53 Quick Start-R Board:/ ata0.probe=1
imx-sata 10000000.sata: port 0: SATA link timeout
set parameter: Connection timed out

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 09:13:31 +01:00
Sebastian Hesselbarth 1cae0ff619 net: orion: add ethernet driver
This adds a driver for the Ethernet ip found on Marvell Orion SoCs,
which is derived from Marvell Discovery System Controllers (MV643xx).
It is partially based on the corresponding u-boot driver.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 09:09:03 +01:00
Sebastian Hesselbarth 0066844fb1 net: phy: add mvebu mdio bus driver
This adds a driver for the mdio bus found on Marvell Orion SoCs as
part of the GBE device and Marvell Armada 370/XP as part of Neta
eth device. Both drivers can share this code, so make it available
independently.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 09:09:03 +01:00
Sebastian Hesselbarth 695060fb1a bus: mvebu: add mbus driver
This imports the Marvell mbus driver from Linux. The mbus is the
main downstream bus found on all Marvell Orion SoCs. The driver
deals with re-configurable address windows which are currently
parsed from DT. Also enable the driver as default on all MVEBU
SoCs. While at it, also reorder drivers/bus/{Kconfig,Makefile}
alphabetically.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 09:08:51 +01:00
Sebastian Hesselbarth 29af281cb1 net: phy: add of_phy_device_connect
This implements a of_phy_device_connect to allow DT enabled drivers
to connect to a PHY device by using the PHY's DT node only. It
currently assumes that each PHY node is a child of the corresponding
mdio bus.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 09:08:51 +01:00
Sebastian Hesselbarth 7ccd47fd5c net: reorder Kconfig and Makefile alphabetically
This reorders Kconfig and Makefile for drivers/net alphabetically.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 09:08:51 +01:00
Lucas Stach b0723e39ec clk: avoid possible NULL ptr deref
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 08:49:55 +01:00
Lucas Stach 40fa265fab mtd: core: avoid possible NULL ptr deref
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 08:49:55 +01:00
Lucas Stach 8850df8cee net: usb: asix: properly propagate error code
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 08:49:55 +01:00
Lucas Stach 4a5f389d1d net: usb: smsc95xx: fix wrong phy reset condition
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 08:49:55 +01:00
Lucas Stach 259b65b5ac usb: dfu: fix error path to avoid NULL ptr deref
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 08:49:55 +01:00
Lucas Stach c26a451721 usb: ulpi: fix logic-op
Checking register bits is a bitwise operation.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 08:49:55 +01:00
Lucas Stach aa6694b542 remove redundant NULL check on free
free() already checks the pointer to be non
NULL. No need to do it again.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 08:49:55 +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 ee2b49d718 mtd: m25p80: set driver id_table
This sets the id_table in the driver correctly so that the driver
can match to the various types of flashes, not only "m25p80".

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2014-02-09 09:46:26 +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
Cristiano De Alti 4f2f9150b7 cfi_flash.c: correct calculation of region erasesize and offset for multiple (size_ratio > 1) chips in parallel
Signed-off-by: Cristiano De Alti <cristiano_dealti@hotmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-04 08:21:51 +01:00
Sascha Hauer adbf51abde Merge branch 'for-next/pxa' 2014-02-03 09:55:55 +01:00
Sascha Hauer d08d73ba95 Merge branch 'for-next/net' 2014-02-03 09:55:55 +01:00
Sascha Hauer 601bf0fcc6 Merge branch 'for-next/misc' 2014-02-03 09:55:54 +01:00
Sascha Hauer d3c96d6522 Merge branch 'for-next/mci'
Conflicts:
	arch/arm/boards/tqma53/board.c
2014-02-03 09:55:52 +01:00
Sascha Hauer c224cd3161 Merge branch 'for-next/imx'
Conflicts:
	arch/arm/boards/dmo-mx6-realq7/lowlevel.c
2014-02-03 09:55:13 +01:00
Sascha Hauer 3cbd92bf6e Merge branch 'for-next/gpio' 2014-02-03 09:52:34 +01:00
Sascha Hauer f4cece7db5 Merge branch 'for-next/clps711x' 2014-02-03 09:52:34 +01:00
Sascha Hauer 8e174d41f0 mci: imx-esdhc: Add i.MX25 compatible entry
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-31 18:51:53 +01:00
Alexander Shiyan 303c3d1e24 gadget: at91: Fix uninitialized variable
Variable udc is used unitialized for DBG(xxx).

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-29 21:38:10 +01:00
Sascha Hauer 0099a887c0 reset_source: rename set_reset_source to reset_source_set
To get all reset source related functions into the same function
namespace.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-29 12:12:17 +01:00
Sascha Hauer 078a29da28 mci: imx: Add devicetree probe support
Only simple probing, no properties supported yet.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-29 11:31:31 +01:00
Sascha Hauer d25cba0090 pinctrl: Add pinctrl driver for i.MX1/21/27
This turns the legacy iomux-v1 support into a full pinctrl
driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-29 11:31:31 +01:00
Sascha Hauer ae39ba29c6 misc: Add devicetree SRAM driver
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-29 10:29:47 +01:00
Sascha Hauer 27da1665d3 misc Kconfig: always ask for misc devices
The "Misc devices" menu does not enable anything by itself, so make it a
regular menu rather than a menuconfig.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-29 10:29:43 +01:00
Philipp Zabel 7a150c5fb1 net usb asix: add AX88772B USB ID
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-29 10:14:37 +01:00
Philipp Zabel 4eabf125fb net usb asix: read MAC from EEPROM on AX88772B
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-29 10:14:37 +01:00
Sascha Hauer 25cee7ec17 environment: Use accessor functions for default environment path
default_environment_path only exists when CONFIG_ENV_HANDLING is enabled.
Boards would have to #ifdef this if they wanted to use
default_environment_path. Use accessor functions instead which can
be ifdeffed on a single place.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-27 09:27:02 +01:00
Alexander Shiyan 32d6d2ae76 serial: clps711x: Update driver
This patch updates the CLPS711X UART driver.
The update adds support for use with devicetree and
makes driver comatible with current driver from kernel.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-24 23:10:04 +01:00
Alexander Shiyan 6c3e620e57 gpio: clps711x: Update driver
This patch updates the CLPS711X GPIO driver.
The update adds support for use with devicetree and
optimizes "probe" a bit.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-24 23:10:04 +01:00
Alexander Shiyan 624454160b ARM: clps711x: Remove the special name for the syscon driver
No reason to make SYSCON driver name unique to that processor.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-24 23:10:04 +01:00
Alexander Shiyan c2c5f48b91 mfd: syscon: Introduce syscon_base_lookup_by_phandle() function
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-24 23:10:04 +01:00
Marek Vasut f5fa816cff net usb asix: Use only 11 bits of header for data size
The AX88772B uses only 11 bits of the header for the actual size. The other bits
are used for something else. This causes dmesg full of messages:

	asix_rx_fixup() Bad Header Length

This patch trims the check to only 11 bits. I believe on older chips, the
remaining 5 top bits are unused.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-23 08:10:06 +01:00
Marek Vasut c827eb8ff3 net usb asix: Simplify condition in rx_fixup()
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-23 08:10:06 +01:00
Sascha Hauer dac65f99e8 console: Set Linux console parameter automatically
Linux specifies the linux,stdout-path property in the /chosen node
in the devicetree. Unfortunately this is ignored in most cases.
For cases in which barebox uses this property for its own use we
translate this into a Linux boot arg with:

- the console name provided by the serial driver
- the the instance from the 'serial' alias
- the baudrate from the actual baudrate.

So with this it's for devicetee enabled boards no longer necessary
to manually assign a console= parameter. Should a user not want
to use the automatically assigned parameter it should do:

global.linux.bootargs.console=

in the environment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-22 07:53:21 +01:00
Antony Pavlov cec6fd5d85 net/phy: add driver for National Semiconductor DP83865 PHY
Based on Linux kernel 3.12 driver.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-20 10:54:24 +01:00
Sascha Hauer d9a08d8bc5 net: phy: Fix crash when no phy is found
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-20 10:54:17 +01:00
Markus Niebel fa5bdb30ee mci: imx-esdhc: add DSR support
having DSR support in mci-core we need a way to
forward the DSR value to the driver. Add it to
platform data for imx-esdhc

TODO: implement the same for other host controller
drivers

Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-15 15:22:56 +01:00
Markus Niebel f11668fee7 mci: add device tree support for DSR
add optional DSR support. This should go into the kernel, too

Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-15 15:22:43 +01:00
Markus Niebel 78b9e4e041 mci: add DSR support
The eMMC and the SD-Card specifications describe the optional SET_DSR command.
During measurements at our lab we found that some cards implementing this feature
having really strong driver strengts per default. This can lead to voltage peaks
above the specification of the host on signal edges for data sent from a card to
the host.

Since availability of a given card type may be shorter than the time a certain
hardware will be produced it is useful to have support for this command (Alternative
would be changing termination resistors and adapting the driver strength of the
host to the used card.)

Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-15 15:22:43 +01:00
Markus Niebel 96da216991 mci: production year for eMMC 4.41 and later
Year is coded in 4 bits of CID. eMMC 4.41
adds a new interpretation rule: production
year for 4.41 cards and newer is between 2010
and 2025 with 0 corresponding to 2013.

This fix was inspired by currect kernel code.

Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-10 14:56:58 +01:00
Markus Niebel 98d5fd3915 mci: Support the correct version for eMMC
eMMC is available up to version 4.5 but the
correct version is not decoded. Change version
definitions to support more minor verions, add
missing versions and parse the minor versions from
ext_csd.

After this, card detection code and devinfo reports
correct versions.

Handling is inspired by u-boot code.

Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-10 14:56:58 +01:00
Jan Weitzel 1ebf5ff0c1 of: find also nodes by mixture of alias and path
Let of_find_node_by_path_or_alias also find a node starting with an alias
followed by a path like "i2c0/tps@24"

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-10 10:39:57 +01:00
Antony Pavlov d1e54c4bc2 gpiolib: gpiolib command: show label only for requested pins
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-10 10:09:31 +01:00
Antony Pavlov 4fcad5129e gpiolib: gpio_free: clear gpio's "label" field too
If an error occured during gpio_request_array() then we can
get not requested gpio with nonempty garbage "label" field
value. Afterward the "gpiolib" command can try to use this
nonempty garbage value.

This patch prevents this error situation.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-10 10:09:31 +01:00
Antony Pavlov f8cdb92751 gpiolib: gpio_request(): print message on error
Just copy gpiod_request() function logic from linux-v3.13-rc7.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-10 10:09:31 +01:00
Alexander Shiyan d95f27aaa8 of: platform: Fix possible crash
"dev" may uninitialized or points to incorrect device. While at
it make the message more informative.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-10 08:38:36 +01:00
Sascha Hauer 29b6d429f6 Merge branch 'for-next/video' 2014-01-07 11:57:52 +01:00
Sascha Hauer dd28a45d9d Merge branch 'for-next/usb-chipidea' 2014-01-07 11:57:52 +01:00
Sascha Hauer 07e5ba98e5 Merge branch 'for-next/ubi' 2014-01-07 11:57:52 +01:00
Sascha Hauer 968cb4bb84 Merge branch 'for-next/openrisc' 2014-01-07 11:57:51 +01:00
Sascha Hauer c56fdbbc37 Merge branch 'for-next/miiphy' 2014-01-07 11:57:51 +01:00
Sascha Hauer 682d47d6ce usb: chipidea i.MX: add some delay after ulpi_setup
On the pcm038 the ULPI phy is found correctly, but after
a power cycle the attached devices are not found. Adding
some delay fixes this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-07 11:13:59 +01:00
Sascha Hauer d35fa7f26d usb: chipidea i.MX: always print an error message when ULPI fails
The ULPI code does not print a message when the operation times
out. Add one to the caller so that he gets an idea that something
is going wrong.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-07 11:13:58 +01:00
Sascha Hauer db48428216 usb: chipidea i.MX: limit port init to HSIC mode
imx_chipidea_port_init() will be called during startup from
the ehci driver. Calling it before setting up the PORTSC register
is only necessary in HSIC mode.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-07 11:13:58 +01:00
Sascha Hauer 873b6b6892 usb: chipidea i.MX: remove unused pdata->init hook
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-07 11:13:58 +01:00
Richard Weinberger 73618394bf UBI: Add some asserts to ubi_attach_fastmap()
Add more paranioa asserts to make it easier to detect
implementation errors.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-07 11:03:24 +01:00
Richard Weinberger 71791bd2cb UBI: Fix memory leak in ubi_attach_fastmap() error path
On error we have to free all three temporary lists.

Reported-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-07 11:03:24 +01:00
Richard Genoud dee73c54b0 UBI: simplify image sequence test
The test:
if (!a && b)
  a = b;
can be symplified in:
if (!a)
  a = b;

And there's no need to test if ubi->image_seq is not null, because if it is,
it is set to image_seq.
So, we just test if image_seq is not null.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-07 11:03:24 +01:00
Richard Genoud 2bae366563 UBI: fastmap: fix backward compatibility with image_seq
Some old UBI implementations (e.g. U-Boot) have not implemented the image
sequence feature.
So, when erase blocks are written, the image sequence in the ec header
is lost (set to zero).
UBI scan_all() takes this case into account (commits
32bc4820287a1a03982979515949e8ea56eac641 and
2eadaad67b2b6bd132eda105128d2d466298b8e3)

But fastmap scan functions (ubi_scan_fastmap() and scan_pool()) didn't.

This patch fixes the issue.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-07 11:03:24 +01:00
Richard Weinberger 8000a53dda UBI: Call scan_all() with correct offset in error case
If we find an invalid fastmap we have to scan from the very beginning.
Otherwise we leak the first 64 PEBs.

Reported-and-tested-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-07 11:03:24 +01:00
Richard Weinberger 4a290f970d UBI: Fix error path in scan_pool()
We have to set "ret", not "err" in case of an error.

Reported-and-tested-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-07 11:03:24 +01:00
Richard Weinberger f0986b6f70 UBI: fix refill_wl_user_pool()
If no free PEBs are available refill_wl_user_pool() must not
return with -ENOSPC immediately.
It has to block till produce_free_peb() produced a free PEB.

Reported-and-Tested-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-07 11:03:24 +01:00
Richard Weinberger 54930d9f92 UBI: Fix invalidate_fastmap()
Onging tests uncovered that invalidate_fastmap() is broken.
It must not call ubi_wl_put_fm_peb() because all PEBs used
by the old fastmap have already been put back.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-01-07 11:03:24 +01:00
Richard Weinberger 92924e7ae1 UBI: Fix PEB leak in wear_leveling_worker()
get_peb_for_wl() removes the PEB from the free list.
If the WL subsystem detects that no wear leveling is needed
it cancels the operation and drops the gained PEB.
In this case we have to put the PEB back into the free list.

This issue was introduced with commit ed4b7021c
(UBI: remove PEB from free tree in get_peb_for_wl()).

Cc: <stable@vger.kernel.org> # 3.7.x
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-01-07 11:03:24 +01:00
Antony Pavlov 9bc8980590 net/phy/phy.c: fix whitespace
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-06 09:42:30 +01:00
Antony Pavlov ce4e4eff35 net/phy: add driver for LXT PHYs
Based on Linux kernel 3.12 driver.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-06 09:42:30 +01:00
Antony Pavlov 8ffd4f8c74 miitool: change behaviour closer to linux' mii-tool
miitool without arguments will try to show status for all phys.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-06 09:42:29 +01:00
Sascha Hauer d7fe5e2263 mtd: Add subpagesize to mtd_info_user
ubiformat needs the subpagesize to work correctly. The kernel uses
sysfs to pass the subpagesize, but in barebox we have the possibility
to extend struct mtd_info_user. Add a corresponding field and use it
in ubiformat.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-20 15:04:30 +01:00
Sascha Hauer 080a4e9c9b mtd: fix mtd_read return value
mtd->read returns the number of bitflips as positive numbers.
Instead of returning these numbers Return -EUCLEAN when the bitflip
threshold has been reached, 0 otherwise.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-20 15:04:30 +01:00
Sascha Hauer a8fd9bfd12 mtd: fix wrong return values in cdev read
mtd->read returns the number of bitflips as positive numbers.
Instead of returning these numbers Return -EUCLEAN when the bitflip
threshold has been reached, 0 otherwise.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-20 15:04:29 +01:00
Sascha Hauer 8a01dea639 video: ipufb: Use uncached memory for framebuffer
Otherwise funny caching artifacts can occur on the screen.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-20 11:32:08 +01:00
Sascha Hauer 96ec430eeb video: simplefb: Add a8r8g8b8 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-20 11:32:08 +01:00
Sascha Hauer ff1542fc5e video: simplefb: Add of reserve entry for framebuffer memory
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-20 11:32:07 +01:00
Sascha Hauer a76f3d9535 video: imx-ipu-fb: Allow to specify framebuffer memory size via platform_data
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-20 11:32:07 +01:00
Sascha Hauer 8bec1f2f16 video: Add screen_size field
barebox does not need the screen size directly, but we pass the
framebuffer to Linux via simnplefb it is desirable to pass the
full size of the framebuffer. Default to calculated values from
the screen resolution.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-20 09:35:38 +01:00
Sascha Hauer 484cc65fdb video: imx-ipu-fb: Do not modify pwm register
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-20 09:35:38 +01:00
Sascha Hauer 4e64bcac45 video: ipufb: Allow to disable fractional pixelclock divider
The IPU has a fractional pixelclock divider. When used, this produces
clock jitter which especially LVDS transceivers can't handle. Allow
to disable it via platform_data.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-20 09:35:38 +01:00
Sascha Hauer 53bbcf85aa video: ipufb: Fix divider debug print
The fractional part is 4 bit, not 3

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-20 09:35:38 +01:00
Sascha Hauer ec3ba30258 video: ipufb: Fix 24bit format and implement 32bit format
When requested 32bit formats the IPU generated a 24bit format instead.
Implement real 32bit format (xxrrggbb) and let the IPU generate a 24bit format
when requested.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-20 09:35:38 +01:00
Sascha Hauer 5b58f68d5a video: ipufb: calculate channel param fields from fb_bitfields
No need to hardcode the channel parameters for the rgb offsets,
we can calculate them from the fb_bitfields. ipu_ch_param_write_field()
is the same as is the mainline IPUv3 driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-20 09:35:36 +01:00
Sascha Hauer 497436eb58 video: ipufb: do not use bitfields
bitfields are not portable and one should make assumptions of the
layout of bitfields. Replace them with the ipu_ch_param_write_field()
which is already used in the mainline IPUv3 driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-20 09:35:14 +01:00
Sascha Hauer 26f2c815d1 mtd: nand_imx: remove trailing whitespaces
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-19 17:39:35 +01:00
Eric Bénard 7ef217bbb6 nand_imx: fix read ONFI param on NFC v21
tested on an i.MX25 where we now get :
nand: ONFI param page 0 valid
nand: ONFI flash detected
nand: NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08ABAEAWP), 256MiB, page size: 2048, OOB size: 64

Signed-off-by: Eric Bénard <eric@eukrea.com>
Tested-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-19 16:58:25 +01:00
Sascha Hauer 3b04e00d7e net: dm9k: bail out when resources can't be claimed
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-18 16:52:19 +01:00
Sascha Hauer 1c9668a3cc net: dm9k: Fix resource sizes in add_dm9000_device
The dm9000 needs a resource for an index register and one for
the data register. Both should have a size of the access width,
and not two times the access width. The current code is probably
a leftover when the dm9000 had only one resource.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-18 16:52:14 +01:00
Sascha Hauer 68a6fedcd4 video: ipufb: make disp_data_fmt configurable
With the IPU the way the display is connected is completely independent
of the framebuffer pixel format. So instead of specifying a pixel width
in platform_data we have to specify how the display is connected.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-18 16:38:05 +01:00
Jan Weitzel 87bae6ead5 pinctrl: single: select CONFIG_PINCTRL
pinctrl_register is used.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-17 08:25:45 +01:00
Beniamino Galvani 497c01ff1f net: add driver for OpenCores 10/100 Mbps ethernet MAC
This patch introduces a driver for the OpenCores 10/100 Mbps ethernet
MAC core, ported from Linux kernel with small changes.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-17 08:20:48 +01:00
Eric Bénard 50b02080c9 atmel_nand: check gpio validity before using it
else we get : "invalid GPIO -22"
(as enable_pin is EINVAL)

tested on SAMA5D35

Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-12 09:45:26 +01:00
Antony Pavlov a4dfb8d910 of: gpio: Fix Kconfig variables to depend on
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-12 09:13:20 +01:00
Jan Weitzel 09783b9c45 net: cpsw: Fix gmii_sel config
Prober slave_num is needed by cpsw_gmii_sel_am335x to calc reg value.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-12 09:07:20 +01:00
Sascha Hauer 6cb2b2f29f net: phy: implement detect callback for miibus devices
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-11 12:33:05 +01:00
Sascha Hauer bfc9a6985c net: phy: Track mii buses on a list
To be able to iterate over registered mii buses

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-11 12:32:20 +01:00
Sascha Hauer 5200678e86 net: phy: move phy_init_hw to phy_device_connect
This is needed when a phy gets registered outsize of phy_device_connect
but has to be attached to an ethernet device later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-11 12:14:55 +01:00
Sascha Hauer 33790253da net: phy: track registered state of a phy device
With this phy_device_connect only registers a phy device if it wasn't
registered already. This allows us to register phy devices outside
of ethernet drivers. phy_device_connect will now pick up an already
registered phy given that it's not attached to another ethernet device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-11 10:58:02 +01:00
Sascha Hauer d023d690fc net: phy: check if a phy already has an ethernet device
If during a phy_device_connect a phy already has an ehternet device
this can only mean it's already attached to another device. return -EBUSY
in this case.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-11 10:56:31 +01:00
Sascha Hauer 664694d9f7 net: phy: move duplicated code out of if/else
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-11 10:53:22 +01:00
Sascha Hauer 58f9167a04 net: phy: bail out early in phy_device_connect
If an ethernet device already has a phy in phy_device_connect all we
have to do is to start autonegotiation. Do this early and bail out
so that for the rest of the code it's clear that we have to search for
a phy device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-11 10:46:50 +01:00
Sascha Hauer 5f0a71708e net: phy: cleanup attached device handling
phy_register_device() currently requires an attached ethernet device.
This is not needed, a phy device can equally well be registered as
a standalone device without an ethernet device. Remove the need
for an attached ethernet device in phy_register_device. Also, make
the edev <-> phy connection on a registered device which simplifies
the code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-11 10:45:00 +01:00
Sascha Hauer 6d8a85d6c3 Merge branch 'for-next/tegra' 2013-12-06 08:23:27 +01:00
Sascha Hauer ed039cd72b Merge branch 'for-next/omap-drivers' 2013-12-06 08:23:27 +01:00
Sascha Hauer 6d7fae1e97 Merge branch 'for-next/omap-devicetree-prepare' 2013-12-06 08:23:27 +01:00
Sascha Hauer e9ea6eeaab Merge branch 'for-next/misc'
Conflicts:
	scripts/Makefile
2013-12-06 08:23:24 +01:00
Sascha Hauer 0cb6f2c19e Merge branch 'for-next/imx' 2013-12-06 08:22:48 +01:00
Sascha Hauer 2789ccd18f Merge branch 'for-next/gpio' 2013-12-06 08:22:48 +01:00
Sascha Hauer cac8f8deb4 Merge branch 'for-next/clk' 2013-12-06 08:22:48 +01:00
Lucas Stach 5f9dea93a1 tegra: add SDMMC controller driver
Confirmed working on Tegra 2, may need some small adjustments for
Tegra 3.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-04 16:57:35 +01:00
Lucas Stach 3504f23ed8 clk: tegra: add SDMMC clocks
Provide peripheral clocks for the SD controller.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-04 14:59:39 +01:00
Lucas Stach 1f52d71587 gpio: tegra: remove leftover debug code
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-04 14:59:39 +01:00
Lucas Stach 7b6c063f57 tegra: speed up system bus
We run the system bus from the OSC clock during init, to avoid crashing
the system while reconfiguring the PLLs.
Switch to a more reasonable clock when we are done with this.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-04 14:59:39 +01:00
Lucas Stach 87b651ed89 gpio: reduce noise when parsing DT
Some GPIOs are optional, so it might not be an error if we can not find
a DT property. Do the same thing as the Linux kernel and only print a
debug message not an error.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-04 14:59:39 +01:00
Lucas Stach c5ff2805a1 net/phy: add driver for atheros PHYs
Based on Linux kernel 3.12 driver.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-03 11:31:34 +01:00
Sascha Hauer 6e66ab7a53 mtd: mtdraw: drop ioctl callback for mtdraw device
Do not call mtd_ioctl for mtdraw devices. mtd_ioctl will derefence
the priv pointer to a struct mtd_info whereas with mtdraw devices it will be
a struct mtdraw pointer. We do not need ioctls for mtdraw devices, so drop
it instead of fixing it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-02 16:22:31 +01:00
Sascha Hauer 3febd4d4ce ata: pata-imx: Add missing NULL entry in dt ids
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-02 13:04:15 +01:00
Alexander Aring 35d64bb375 mmci: add missing depends on ARM_AMBA
The mmci implementation uses some specific arm amba functions, so add a
depends on ARM_AMBA.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-02 08:42:26 +01:00
Sascha Hauer 03d601d58f mmc: omap: Add devicetree support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:54 +01:00
Sascha Hauer 599e61ebd9 bus: Add omap gpmc driver
This adds a devicetree-only driver for to configure the gpmc and its
child devices from dt. Currently only NAND is supported.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:54 +01:00
Sascha Hauer f92f309c54 device: Add functions to add resources
We currently have functions to add a device based on function parameters.
This adds the corresponding functions to add resources to a device without
registering the device itself. This is useful to manipulate devices before
registering them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:54 +01:00
Sascha Hauer b0cd10ff12 mtd: omap gpmc: Use dev_add_param_enum
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:53 +01:00
Sascha Hauer 15d60e5230 gpio: omap: Add devicetree probe support
This adds devicetree probe support for the OMAP gpio ports and
also makes sure the corresponding platform_devices don't get
registered when they are already present from devicetree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:53 +01:00
Sascha Hauer 7603f7442b gpio: omap: move to drivers/gpio/
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:53 +01:00
Sascha Hauer 7cc4a2ad95 net: cpsw: straighten error path
This mainly has the effect of checking the return value of eth_register.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:53 +01:00
Sascha Hauer 046157602e net: cpsw: attach slave to edev->priv
An ethernet device belongs to a slave, so set edev->priv to the slave
and not to the cpsw.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:53 +01:00
Sascha Hauer 82bc71b820 net: cpsw: drop for_each_slave
We currently only use one slave, so drop for_each_slave and hardcode
slave[0] until we pass the proper context to the functions that makes
this hack unnecessary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:53 +01:00
Sascha Hauer a722418645 net: cpsw: move eth_device into slave
An ethernet device is per slave, not per cpsw.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:53 +01:00
Sascha Hauer 9321538ee2 cpsw: Add devicetree probe support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:53 +01:00
Sascha Hauer 6d2f0d57be pinctrl: Add functions to select pinctrl from device_node
Instead of requiring a device pointer, add a functions to select
the pinctrl state based on a device node.
The AM33xx cpsw devicetree description has several subdevices with
pinctrl information attached to them. In barebox we do not handle
the subdevices as distinct devices, so the pinctrl is never configured
correctly and the mdio bus subdevice stops working. This patch makes
it possible to configure the pinctrl without having a device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:53 +01:00
Sascha Hauer 8cf612878e mmc: omap: name mmc device after devicetree alias
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-25 09:19:21 +01:00
Sascha Hauer 7614ee1640 net: phy: Fix get_phy_device return value
A function should either return an ERR_PTR or NULL on failure, but not both.
Let get_phy_device() return an ERR_PTR and fix the return checks in mdiobus_scan
and phy_device_connect.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-25 09:01:49 +01:00
Rostislav Lisovy 5c1846b625 ARM: i.mx53: Parse Reset GPIO pin in FEC driver from Devicetree
Signed-off-by: Rostislav Lisovy <lisovy@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-25 09:01:33 +01:00
Sascha Hauer bb7929aaaa of: gpio: Add Kconfig variable to depend on
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-25 09:01:33 +01:00
Sascha Hauer e586a64d3e net: cpsw: inline slave_data
Devicetree probed cpsw devices won't have platform_data, so inline
the fields from slave_data instead of keeping a pointer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 15:35:12 +01:00
Sascha Hauer 7f5b61ab14 i2c: omap: Add devicetree support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 15:35:12 +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 26c725874b pinctrl: Add pinctrl-single driver
Based on the kernel pinctrl-single driver. This one is just enough
to make OMAP/AM33xx work.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 15:35:12 +01:00
Antony Pavlov bcf0877266 gpiolib: import gpio_request_array() from linux 3.7
Also import related functions gpio_request_one() and
gpio_free_array().

This commit imports code from linux 3.7 as
the more recent linux kernel versions use gpiolib descriptors,
see this commit for details:

  commit 372e722ea4dd4ca11c3d04845e11cbc15f32144c
  Author: Alexandre Courbot <acourbot@nvidia.com>
  Date:   Sun Feb 3 01:29:29 2013 +0900

      gpiolib: use descriptors internally

      Make sure gpiolib works internally with descriptors and (chip, offset)
      pairs instead of using the global integer namespace. This prepares the
      ground for the removal of the global gpio_desc[] array and the
      introduction of the descriptor-based GPIO API.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 10:59:04 +01:00
Antony Pavlov 6339a419e9 gpio: unify gpio direction macros names with Linux kernel
See linux.git/include/linux/gpio.h and
linux.git/Documentation/gpio.txt for details.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 10:59:00 +01:00
Sascha Hauer 9ed42fa866 serial: ns16550: Add device ids for omap
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 10:56:49 +01:00
Alexander Aring 32a5775125 barebox: remove double semicolons
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-18 10:13:35 +01:00
Alexander Aring fbe83cfe50 mmci: remove include of mmci.h header
We need #include "mmci.h" only and not #include <mmci.h>
which don't exists.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-18 10:12:39 +01:00
Uwe Kleine-König 3bd7f80d8f mci: mxs: support overwriting the device name via platform data
The current implementation of the bootloader specification depends on the
hardware name and the name of the device in /dev to match. As the default
hardware name is mciX and the device name is diskY the bootloader spec
cannot be used as is.

This patch implements a way to overwrite the device name similar to what is
possible for the imx-esdhc driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-11 11:16:22 +01:00
Sebastian Hesselbarth 56dec39e68 clk: fixed: add DT init function
This adds a DT init function to clk-fixed and corresponding CLK_OF_DECLARE
to put it into the DT clock provider table.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-11 09:26:59 +01:00
Sebastian Hesselbarth a7d8384d12 OF: parse OF clock providers after populate
This adds a call to of_clk_init right after platform devices have been
populated.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-11 09:26:59 +01:00
Sebastian Hesselbarth feb1e38b43 clk: add of_clk_init and CLK_OF_DECLARE macro
This add barebox versions of of_clk_init for parsing and registering
clock providers from DT. Also, a macro CLK_OF_DECLARE is added, that
allows to put init callbacks into its own section that can be linked
in the binary.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-11 09:26:59 +01:00
Sebastian Hesselbarth d7fc449a2e gpio: dw: add get_direction callback
This adds a callback function to read the current state of a GPIOs
in/out direction.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-11 09:05:35 +01:00
Sebastian Hesselbarth fcc25285a2 gpiolib: make gpiolib command more verbose
This adds some more printf information to gpiolib command, like the
gpiochip handling a specific gpio. Also, current direction and value
of the gpio are printed, if the gpiochip provides the corresponding
callbacks.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-11 09:05:35 +01:00
Sebastian Hesselbarth 4faf305507 led: trigger: disable LEDs with trigger before installing it
This disables LEDs that have a trigger function assigned right before
the trigger is installed. As the trigger was parsed before the LED has
been registered, also swap LED registration and trigger parsing.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-11 09:02:07 +01:00
Alexander Shiyan 7e6406e59e net: netx: Fix signed/unsigned arguments for printf
"%d" in format string requires a signed integer.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-11 08:52:05 +01:00
Alexander Shiyan ba7556e29a net/Kconfig: Remove non-existent ARCH_DAVINCI
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-11 08:52:05 +01:00
Sascha Hauer 7c1091bd58 of: fdt: reorder fdt_header initialization
No functional change, just reorder the initialization of
the different offset/size members of fdt_header in increasing
order to make it easier to read.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-08 15:42:55 +01:00
Sascha Hauer c9a86c5c02 of: fdt: Fix fdt size_dt_struct
size_dt_struct was calculated too big, we have to substract ofs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-08 15:42:50 +01:00
Sascha Hauer b0fd9462d6 eeprom: at24: Enable OF partition parsing
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-08 15:42:08 +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 480782a265 Merge branch 'for-next/usb' 2013-11-07 08:31:47 +01:00
Sascha Hauer c803c74cb8 Merge branch 'for-next/spi' 2013-11-07 08:31:47 +01:00
Sascha Hauer ded25480d8 Merge branch 'for-next/rpi' 2013-11-07 08:31:47 +01:00
Sascha Hauer b8d20bf3fa Merge branch 'for-next/of' 2013-11-07 08:31:47 +01:00
Sascha Hauer 8be53ce2ab Merge branch 'for-next/net' 2013-11-07 08:31:47 +01:00
Sascha Hauer 398cdf212d Merge branch 'for-next/mtd' 2013-11-07 08:31:47 +01:00
Sascha Hauer 4c8221be2c Merge branch 'for-next/mci' 2013-11-07 08:31:47 +01:00
Sascha Hauer 2d022b5097 Merge branch 'for-next/imx' 2013-11-07 08:31:47 +01:00
Andre Heider 97607e85cd video: set up the kernel's simple framebuffer driver
Add support to configure the active framebuffer for the kernel through
device tree.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-06 10:37:24 +01:00
Andre Heider 91b3761ec8 video: add a BCM2835 framebuffer driver
Use the mailbox driver to set up a framebuffer based on the firmware
configuration.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-06 09:59:05 +01:00
Andre Heider 485544f0fb fb: add a line_length value to struct fb_info
Add support for framebuffers with noncontiguous horizontal lines.

Video drivers can set this value if the hardware requires it.
In case a driver does not set it, the current value of
xres * (bpp / 8) is used instead.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-06 09:59:04 +01:00
Alexander Shiyan 572f03cfb0 USB: i.MX5x: Remove usage of MXC_EHCI_INTERNAL_PHY for OTG port
i.MX5x OTG port is hardwired to the internal UTMI PHY, so having
this configurable makes no sense and helps using this port with DT.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-04 15:06:14 +01:00
张忠山 183e6d8b74 mtd: nand: don't scan bbt if CONFIG_NAND_BBT not set
Signed-off-by: 张忠山 <zzs0213@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-04 09:27:23 +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