9
0
Fork 0
Commit Graph

13718 Commits

Author SHA1 Message Date
Sascha Hauer 31860b4831 Merge branch 'for-next/net' 2015-12-08 08:28:35 +01:00
Sascha Hauer d10a05b410 Merge branch 'for-next/mtd' 2015-12-08 08:28:27 +01:00
Sascha Hauer 4b1430b653 Merge branch 'for-next/mmc' 2015-12-08 08:28:20 +01:00
Sascha Hauer 24f1c994cc Merge branch 'for-next/misc' 2015-12-08 08:28:07 +01:00
Sascha Hauer 3cdcff4979 Merge branch 'for-next/mips' 2015-12-08 08:27:59 +01:00
Sascha Hauer 29ac6ac467 Merge branch 'for-next/imx' 2015-12-08 08:27:47 +01:00
Sascha Hauer a2b318fe21 Merge branch 'for-next/i2c' 2015-12-08 08:27:37 +01:00
Sascha Hauer a59ae014e1 Merge branch 'for-next/fb' 2015-12-08 08:27:29 +01:00
Sascha Hauer 5e79364a66 Merge branch 'for-next/console' 2015-12-08 08:27:20 +01:00
Sascha Hauer fe68ba4526 Merge branch 'for-next/arm' 2015-12-08 08:27:08 +01:00
Sascha Hauer e6b83bd498 Release v2015.12.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-08 07:23:04 +01:00
Andrey Smirnov cf694d44da drivers: bus: Match against id_table first
Matching against driver's name before looking throught its id_table
can lead to a somewhat strange and unintuitive behaviour where a
device whose driver's name matches one of the lines in id_table (which
is not unheard of in Linux kernel) will be probed against said driver
with 'id_table' field set to NULL which in turn will result in
dev_get_drvdata erroring out with -ENODEV.

This patch changes the behaviour such that device_match() only tries
to match against driver's name only if id_table of that driver is not
present.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-07 10:59:42 +01:00
Andrey Smirnov b734bb97a2 drivers: bus: Match against id_table first
Matching against driver's name before looking throught its id_table
can lead to a somewhat strange and unintuitive behaviour where a
device whose driver's name matches one of the lines in id_table (which
is not unheard of in Linux kernel) will be probed against said driver
with 'id_table' field set to NULL which in turn will result in
dev_get_drvdata erroring out with -ENODEV.

This patch changes the behaviour such that device_match() only tries
to match against driver's name only if id_table of that driver is not
present.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-07 10:59:30 +01:00
Andrey Smirnov 274e0b8dc4 imx: ocotp: Add code to initialize 'cdev->device_node'
In order for cdev_by_device_node() to be able to return approprate
character device for <&ocotp> phandle cdev->device_node needs to be
initialized with dev->device_node. This patche takes care of that

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-07 10:59:13 +01:00
Robert Jarzmik a964acd625 ARM: pxa: pxa2xx use PSPR for resume address
Both lubbock and mainstone suspend to RAM were broken by the same
typo. The linux kernel saves the resume address to PSPR, ie. the scratch
pad register, while it was PSSR which was checked in barebox.

Fixing this typo was tested on mainstone where resume from S3 works.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-07 10:48:11 +01:00
Robert Jarzmik aa62e926f5 net: smc1111: fix ethernet mac setting
Even if the setting of the MAC address does work correctly, the function
return an error.

In the former barebox version, this didn't seem to be a problem. In
v2015.11.0 version, the "ifup eth0" command fails because of this, and
as a consequence the network interface doesn't work.

The fix is straightforward.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-07 10:47:15 +01:00
Trent Piepho a2b3a25417 ARM: Remove do_execute and thumb2_execute
In commit 104a6a7ccf support was added
for Thumb2.  It added do_execute() as a way to provide arch dependent
calling veneers for use in "go" and thumb2_execute() as the thumb2 to
arm veneer.

But thumb2_execute() isn't necessary as gcc generates a proper calling
sequence from a standard function pointer call.  Thumb2 barebox is
compiled with the AAPCS ABI which requires this.

It also had a bug and didn't pass the arguments properly, but code
execute via "go" rarely uses arguments so this wasn't very noticeable.

Since thumb2 was always the only user of do_execute(), go ahead and
delete that too.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-07 10:44:45 +01:00
Trent Piepho de7a09bb43 ARM: Remove kernel booting call for thumb2 mode
The asm code to do the actual call into the kernel (or another
barebox) when compiled in thumb2 mode isn't necessary.  gcc generates
a perfectly good calling sequence from a normal function pointer call.
If it didn't, the code in bootstrap_boot() that uses a function
pointer to jump to the 2nd stage barebox from an xloader wouldn't
work.

It appears to be allowed that the call to kernel() could return, as
neither start_linux() nor kernel() are marked noreturn, and there is
code after calls to start_linux().

The asm code has a bug in this case, as it uses bx and not blx, and
thus doesn't set the link register.  Since it's a tail call, this
would be okay, but only if the LR value from the start of
start_linux() (and the callee-saved registers) are restored
beforehand, which isn't done.  The gcc generated call sequence will do
this.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-04 08:15:23 +01:00
Antony Pavlov 40d3331a3b net: tap: fix whitespaces
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-04 08:13:44 +01:00
Antony Pavlov c2fed64666 net: tap: make locally used functions static
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-04 08:13:44 +01:00
Sascha Hauer c85ef6a776 Revert "memtest: move error handling to end of function"
While this simplifies the code as is I got the request to continue on
errors in memtest, which can be better implemented when the messages are
printed inline and not at the end of the function.

This reverts commit 4ff9e28abc.
2015-12-04 08:01:59 +01:00
Florian Vallee 839aebc4fe eukrea-cpuimx35: update defconfig
enable chipidea usb driver

Signed-off-by: Florian Vallee <fvallee@eukrea.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-02 07:55:26 +01:00
Florian Vallee b4368c7437 eukrea-cpuimx35: setup usb through chipidea-imx driver
OTG and HOST port are tested with a mass storage device.

Signed-off-by: Florian Vallee <fvallee@eukrea.fr>
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-02 07:55:26 +01:00
Florian Vallee 3958e366fe imx35: register usb-misc by default
Signed-off-by: Florian Vallee <fvallee@eukrea.fr>
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-02 07:55:26 +01:00
Antony Pavlov cf0dd1196b environment: support env on at24 eeprom
unprotect(), erase() and protect() return EOPNOTSUPP errno code
for at24 I2C eeproms, so envfs_save() doesn't store data
to these eeproms without this patch.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-01 09:59:05 +01:00
Markus Pargmann 2803b258e6 defaultenv: boot/net: Boot initramfs from tftp if present
Use an 'initramfs' file if it exists instead of nfsroot. This offers the
possibility to quickly boot complete filesystems as initramfs without
the need to flash an SD-card or similar. If the initramfs does not
exist, it uses the default nfsroot mechanism.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-01 09:27:08 +01:00
Yegor Yefremov 5db57dace1 driver: make all dev_request_mem_region_* routines MIPS compatible
Use IOMEM() macro in all dev_request_mem_region_* routines to allow
the proper mapping on all platforms.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-01 09:25:14 +01:00
Sascha Hauer 412a0e1750 spi: i.MX: optimize transfers for ECSPI v2.3
Instead of writing one word to the txfifo and then wait until
one is received in the rxfifo we can write while the txfifos
are not full and read as long the rxfifos contain data. This
makes transfers for the m25p80 driver around 7 times faster
here.

Unlike the last version this time we only optimize the common
case with 8 bits per word and SPI_LSB_FIRST cleared. The other
cases would require more bit shuffling of the data.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-30 08:22:31 +01:00
Sascha Hauer 7da99e58bd video: i.MX IPUv3: Set ldb clocks correctly
The clocks for the LVDS display bridge have a fixed /3.5 and a
configurable /1,/2 divider in their path. The configurable divider has
to be explicitly configured for single/dual channel support, so we can't
rely on clock rate parent propagation here. Clear the
CLK_SET_RATE_PARENT flag for the configurable divider and configure the
clock explicitly in the ldb driver.
Tested on a custom i.MX6 board, currently untested on i.MX53.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-30 08:22:31 +01:00
Lucas Stach e7a8519963 ARM: mx6sx-sabresdb: set proper hostname
Also move the initcall to the level matching the name of the
function.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-30 08:22:30 +01:00
Lucas Stach c5478e10de ARM: mx6sx-sabresdb: drop unneeded makefile rules
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-30 08:22:30 +01:00
Stefan Christ fbcf721db1 wdog: imx-wd: watchdog cannot be disabled again
The i.MX21/i.MX6 watchdog cannot be disabled after it was activated.
Bit 2 (WDE) cannot be set to 0 again. Notify the user about that by
returning -ENOSYS.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-30 08:22:30 +01:00
Aleksey Kuleshov 114409c73e MIPS: import optimized string functions from Linux
10x performance gain according to simple test on QEMU malta:
barebox:/ time memcpy 0xa0000000 0xa0001000 0x100000

Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru>
Acked-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-26 09:36:34 +01:00
Trent Piepho 87dde1730d eeprom: Support pagesize OF device tree property
Allows specifying the page size when the eeproms are in the device
tree.  Same as the Linux kernel device-tree bindings for at24.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-26 09:07:39 +01:00
Trent Piepho f9c9550b8d eeprom: Add support for 24c1025 EEPROM
This is the Microchip version of the Atmel 24c1024, which is already
supported.  The key difference between them is that the I2C address
bit used to select between the two banks is bit 2 for the 1025 and not
bit 0 as in the 1024.

Add a flag to describe this difference.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-26 09:05:59 +01:00
Sascha Hauer 770c1ef83c mtd: core: initialize *retlen in mtd_write()
Some mtd drivers like the spi-nor driver do not assign a value
to the retlen pointer but instead only add the bytes written
to *retlen. Users of mtd_write expect the variable to be initialized
by the mtd core though, so we have to do it in mtd_write(). The
same is done in mtd_read already.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 10:36:13 +01:00
Sascha Hauer 42c797b091 video: pwm-backlight: Honour discrete brightness levels from dt
If probed from device tree we have an array of pwm duty cycle levels
in the brightness-levels property. Although the driver parsed the property,
the values have been ignored. Make use of these flags so that the driver
can work for example with inverted PWMs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 09:46:27 +01:00
Antony Pavlov 28ab89ec81 net: usb: asix: fix 'no previous prototype' warning
Here is the warning message:

    drivers/net/usb/asix.c:427:5: warning: no previous prototype for 'asix_rx_fixup_internal' [-Wmissing-prototypes]
     int asix_rx_fixup_internal(struct usbnet *dev, void *buf, int len,
         ^

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 08:36:50 +01:00
Antony Pavlov 7454e176bb net: usb: asix: make rx_fixup ax_skb buffer aligned
ax_skb receive buffer unalignment leads to consequent
unalignment data access in network stack routines,
especially in net_checksum().

By-turn unalignment data accesses lead to performance penalty.
Moreover on classic MIPS CPUs without hardware unalignment access
support this leads to undesirable exceptions.

At the moment barebox on MIPS can't parry these unalignment access
exceptions, so the Asix USB Ethernet chips, that need receive
fixup workaround, are completely unusable on MIPS without this patch.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 08:36:50 +01:00
Du Huanpeng ea682776db font: fbconsole: add custom font supports
Signed-off-by: Du Huanpeng <u74147@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 08:21:08 +01:00
Sebastian Hesselbarth f01b562cb8 mtd: nand_mrvl_nfc: Add optimized timings for Samsung K9K8G08U
This adds optimized timings for Samsung K9K8G08U 1Gb NAND flash.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 08:17:25 +01:00
Sebastian Hesselbarth 131d5b5aef mtd: nand_mrvl_nfc: Add support for Marvell Armada 370/XP
Marvell PXA3xx and Armada 370/XP share the same NAND controller IP
with some minor differences. With support for controller IP v2, now
allow to build the driver on Armada 370/XP.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 08:17:25 +01:00
Sebastian Hesselbarth 7c6e711ef8 mtd: nand_mrvl_nfc: Add support for NDCB3 register
Newer versions of PXA3xx NAND controller support a 4th Command Buffer
register. Add the required HWFLAGS and additional write to NDCB0.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 08:17:25 +01:00
Sebastian Hesselbarth 87bddaf82e mtd: nand_mrvl_nfc: Add support for HW BCH ECC
Add support for HW BCH ECC for those HW versions that support it.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 08:17:25 +01:00
Sebastian Hesselbarth f7d39e122e mtd: nand_mrvl_nfc: Add support for 8bit BCH HW ECC
Add support for 8bit HW ECC modes supported by later IP versions.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 08:17:24 +01:00
Sebastian Hesselbarth 624bea7b14 mtd: nand_mrvl_nfc: Add support for 4bit BCH HW ECC
Add support for 4bit HW ECC modes supported by later IP versions.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 08:17:24 +01:00
Sebastian Hesselbarth 4647cb15e9 mtd: nand_mrvl_nfc: Add hwflags to distinguish different HW versions
Marvell PXA3xx NAND flash controller IP has been reused in later SoCs
with additional HW features. Add HW BCH ECC as the first known HW
difference.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 08:17:24 +01:00
Sebastian Hesselbarth fa8ece6674 mtd: nand_mrvl_nfc: Prepare for different HW ECC strengths
Newer versions of Marvell PXA3xx NFC also support BCH and therefore
higher ECC strengths than 1. Prepare for different ECC strength by
factoring out ECC init into separate functions by strength. Also,
add a new host variable that indicates BCH ECC.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 08:17:21 +01:00
Sebastian Hesselbarth 75783fa8d0 mtd: nand_mrvl_nfc: Get ecc parameters from DT
With DT helpers for ECC step size and strength, now use them on
Marvell NAND driver.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 08:00:09 +01:00
Sebastian Hesselbarth 0ba6906309 mtd: nand_mrvl_nfc: Fix num-cs property parsing
The "num-cs" property does not encode flashes CS line but number
of available CS signals. Fix wrong property parsing to ->cs by
adding proper ->num_cs variable to host struct.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 08:00:09 +01:00