9
0
Fork 0
Commit Graph

13718 Commits

Author SHA1 Message Date
Sascha Hauer a12a70c063 fs: pass path directly to cdev_open
Now that cdev_open handles a path we no longer have to add /dev/ to
the name.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-15 08:56:29 +02:00
Sascha Hauer 77073ab24d filetype: Use cdev_open
a cdev has to be opened before usage. Use cdev_open instead of
cdev_by_name.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-15 08:56:23 +02:00
Sascha Hauer 867ada484f fs: devfs: Allow mount path in cdev_open
When opening a cdev also allow a path beginning with /dev/ as some
users of cdev_open already open coded this behaviour.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-15 08:56:21 +02:00
Sascha Hauer 7c868bd694 fs: devfs: Allow mounting only on /dev/
We have places in the code where we assume that devfs is mounted on
/dev/, so enforce this path to avoid surprises.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-15 08:56:21 +02:00
Andrey Smirnov 04d8c2541d common/parser.c: Do not treat zero return code as error
Run_command() would return zero to indicated success so treating it as
error case would completely break command repetition logic, so change
comparinson operator from "less or equal" to "less then"

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-15 08:56:21 +02:00
Andrey Smirnov 822ad01d5d common/parser.c: Do not conflate error reporting disciplines
Run_command() uses 0 to indicate success and negative values to
indicate errors, whereas execute_command() uses 0 for success and
positive integers to represent error codes. Conflating the two breaks
the code that calls run_command and then checks for error code sign to
detect problems, so avoid that by doing a very simple transformation
on the result of execute_command

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-15 08:56:21 +02:00
Andrey Smirnov 69f3f7b353 common/command.c: Replace magic number with appropriate constant
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-15 08:56:21 +02:00
Andrey Smirnov 4ef026c304 arm: Disable unaligned accesses
From reading ARM architecture related documentation if appears that
while unaligned memory access is supported by the processor in general
it is not supported if MMU is disabled.

The problem in question can be easily reproduced by building the code
without this patch, MMU disabled, and trying to run 'memtest'
command. Which would in turn call mem_test() which would eventually
call show_progress(). That last function, if build without
-mno-unaligned-access would result in unaligned memory access which
would result in Barebox hanging.

This patch instructs the compiler to not generate any unaligned
accesses to memory thus avoiding the problem.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-15 08:56:21 +02:00
Andrey Smirnov 93fc1f1a1a memtest.c: Print iterations count if -i is 0
Even if memtest is started in endless mode it is still useful to see
current iteration count. Add the code to print that.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-15 08:56:21 +02:00
Sascha Hauer e65090ecc6 usb: ehci-hcd: Use regular mdelay()
The USB core will make sure we do not re-enter the ehci driver, so
we can use regular mdelay instead of mdelay_non_interruptible().

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-14 15:39:26 +02:00
Sascha Hauer 8f92eb2666 Revert "usb: ehci-hcd: detect re-entrance"
Now that the USB core makes sure that we do not re-enter USB
drivers we no longer have to detect re-entrancy in the ehci driver.

This reverts commit 8426cc641d.
2015-10-14 15:38:00 +02:00
Sascha Hauer 180370774f Revert "usb: ehci-hcd: use mdelay_non_interruptible()"
Now that the USB core makes sure that we do not re-enter USB
drivers we no longer need mdelay_non_interruptible() but can use
regular mdelay() again.

This reverts commit 4cfd909412.
2015-10-14 15:35:55 +02:00
Peter Mamonov e1d67aa40f usb: core: return -EAGAIN on usb_* functions reentrance
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-14 15:35:30 +02:00
Peter Mamonov 6b0cbf2059 input: usb_kbd: skip poll on -EAGAIN error
Skip poll if either usb_submit_int_msg() or usb_get_report()
returned -EAGAIN.

Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-14 15:35:30 +02:00
Lucas Stach 16f7b35138 video: simple-panel: depend on OFDEVICE
Fixes:
In function `simple_panel_ioctl':
undefined reference to `of_get_display_timings'

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-14 15:33:07 +02:00
Lucas Stach a5afa2d86c mtd: nand_denali: don't include arch header
It causes build failures on other arches than socfpga and the driver
doesn't use anything provided by this header.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-14 15:33:07 +02:00
Lucas Stach 36ef69578c input: usb-kbd: depend on CONSOLE_FULL
Fixes:
In function `usb_kbd_probe':
(usb_kbd_probe): undefined reference to `console_set_active'

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-14 15:33:07 +02:00
Peter Mamonov a7bbbe0236 fs: Fix filesystem detection with full path
When mount is given a full path (including /dev/) to the cdev file
we can no longer automatically detect the filesystem. This is broken
since:

e89f1a1 detect_fs: use device instead of file

Fix it by dropping the /dev/ component of the path.

Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-13 16:06:31 +02:00
Lucas Stach 611e86d581 ARM: imx6: set shared attribute override bit in PL310
In order to make the system compliant to the ARMv7 ARM RevC clarifications
regarding conflicting memory aliases the shared override bit needs to be
set. This needs to be done in the bootloader, as the kernel will not apply
any modifications to the AUX_CTRL register by default, as it is a secure only
register.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-13 10:44:55 +02:00
Lucas Stach 95dfa1a847 ARM: imx6: use l2x0 header for register definitions
Instead of using a redundant definition. This makes things a bit cleaner
and also avoids to introduce another private define in the next patch.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-13 10:44:55 +02:00
Lucas Stach 37a81422fd ARM: l2x0: move outer cache flush on disable to user
There are systems like the Calxeda Highbank, which need to do SMC
calls in order to access the secure L2C registers, which means they
want to replace the outer cache disable function with their own.

As the cache flush before entering the boot target is still needed
and to avoid exposing L2C internals to the architectures move the
flush before disable into the only current user.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-13 10:44:55 +02:00
Lucas Stach b4e1bdbb50 ARM: l2x0: correct indentation
This is a trivial commit.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-13 10:44:55 +02:00
Andrey Smirnov 707ca96a1f freescale-mx6-sabresd: Add CONFIG_DEBUG_LL support
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-12 11:37:58 +02:00
Sebastian Hesselbarth bf16227fe8 net: mvneta: add Armada XP compatible
Marvell NETA Network Engine found in Armada 370 and XP SoCs
also has a different compatible for Armada XP. Add the compatible
to the of_device_id list.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-12 08:14:11 +02:00
Sebastian Hesselbarth 2880f0ca74 clk: mvebu: Add corediv clock driver for Armada 370/XP
Newer Marvell MVEBU SoC like Armada 370/XP have an additional core
clock divider for e.g. NAND clock. Add the corresponding driver based
on the Linux driver.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-12 08:14:11 +02:00
Sascha Hauer 54bf386650 Merge branch 'for-next/usb' 2015-10-07 08:23:51 +02:00
Sascha Hauer dd4da6d328 Merge branch 'for-next/omap' 2015-10-07 08:23:45 +02:00
Sascha Hauer 181bb315d0 Merge branch 'for-next/mtd' 2015-10-07 08:23:45 +02:00
Sascha Hauer c8fa7eed66 Merge branch 'for-next/misc' 2015-10-07 08:23:45 +02:00
Sascha Hauer 7bf2e891a4 Merge branch 'for-next/mips' 2015-10-07 01:01:06 +02:00
Sascha Hauer 8a83eca779 Merge branch 'for-next/mci' 2015-10-07 01:01:06 +02:00
Sascha Hauer ddd7031b97 Merge branch 'for-next/imx-ldb' 2015-10-07 01:01:06 +02:00
Sascha Hauer 160bd3b360 Merge branch 'for-next/imx' 2015-10-07 01:01:06 +02:00
Sascha Hauer fbf9f5f889 Merge branch 'for-next/arm' 2015-10-07 01:01:06 +02:00
Sascha Hauer 0b8212ae94 Release v2015.10.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-06 16:09:31 +02:00
Sascha Hauer 694c5b8794 Revert "spi: i.MX: optimize transfers for ECSPI v2.3"
This does not work on the Efika MX Smartbook which uses SPI
to connect the MC13892. Needs some rework.

This reverts commit 746a5530be.
2015-10-05 09:47:37 +02:00
Sascha Hauer 329db2f586 mci: core: Increase clock for SD highspeed mode
Putting a SD card into highspeed mode doesn't help much when we
still clock the card with 25MHz. Increase the clock speed to 50MHz
for high speed cards.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-02 14:34:26 +02:00
Antony Pavlov d0a5ea479e usb: core: drop unnecessary le16_to_cpu() conversion
In drivers/usb/core/usb.c we already have le16_to_cpus() conversion
just after usb_get_descriptor():

    390     /* correct le values */
    391     le16_to_cpus(&dev->descriptor->bcdUSB);
    392     le16_to_cpus(&dev->descriptor->idVendor);
    393     le16_to_cpus(&dev->descriptor->idProduct);
    394     le16_to_cpus(&dev->descriptor->bcdDevice);

so no additional idVendor/idProduct descriptor fields
le16_to_cpu() conversion is needed after that.

On the big-endian machines extra le16_to_cpu() conversion
leads to wrong idVendor/idProduct USB device parameters values
(e.g. see devinfo <usb-device> output), and to a much more
serious problem: idVendor/idProduct-based USB device detection
does not work.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-02 10:06:47 +02:00
Antony Pavlov 1c9e671462 commands: ls: use 14 digits for filesize
10 digits are not enough for modern SATA/USB storages. E.g.:

    barebox> ls -l /dev/
    cr-------- 500107862016 ata0
    cr--------   33554432 ata0.0
    cr-------- 500073258496 ata0.1
    cr-------- 32224837632 disk0
    cr--------   67108864 disk0.0
    cr-------- 32156680192 disk0.1

14 digits look much better. E.g.:

    barebox> ls -l /dev/
    cr--------   500107862016 ata0
    cr--------       33554432 ata0.0
    cr--------   500073258496 ata0.1
    cr--------    32224837632 disk0
    cr--------       67108864 disk0.0
    cr--------    32156680192 disk0.1

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-02 09:12:36 +02:00
Vicente Bergas f54c032120 xload: be more flexible when searching for second stage bootloader.
A first stage bootloader can read fat and ext4 filesystems, and
even both can be compiled-in at the same time.
But then xload has a hardcoded fat filesystem mount option which
renders ext4 unusable.
This patch tries to mount it as ext4 if the fat attempt fails.

Then, a typical use case of an ext4 formatted filesystem
is it to be a standard linux filesystem, which contains
boot-related files in /boot. So, when searching for the second stage
bootloader, try /boot/barebox.bin after not finding it in /barebox.bin

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-02 09:10:16 +02:00
Vicente Bergas e89f1a1f18 detect_fs: use device instead of file
detect_fs would usually mount a device on a directory,
so, use a device-specific type detection.

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-02 09:10:16 +02:00
Edoardo Scaglia 49a1eeb04b at91sam9x5: fix ROM base address (bugfix for nand ECC)i
The ROM base address in the 9x5 processors lives at 1M, not 4M,
where SMD is, as defined later in the same file.

The ROM includes some tables that are used to build error-correction data
for NAND memory.  By using the wrong address, we get wrong data and
the result is undetected bit flips (data at 0x408000 is all zeroes).

Thus, even though our kernel was fixing bit errors in NAND, barebox
was not fixing them. With UBI (our situation) we got I/O errors because
the checksum verification for data nodes failed.

Using the proper address corrects the problem: barebox reports a
"bitflip" message, consistent with the kernel message for the same
file, and the files are properly loaded and booted.

Note: the kernel has the same wrong define, but then the magic number
0x00108000 as spelled in arch/arm/boot/dts/at91sam9x5.dtsi is used
instead of the symbolic name.

Signed-off-by: Edoardo Scaglia <scaglia@amelchem.com>
Signed-off-by: Federico Braghiroli <braghiroli@amelchem.com>
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-02 09:03:43 +02:00
Peter Mamonov b0ae09acda input: port usb keyboard driver from the u-boot
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-02 07:50:51 +02:00
Peter Mamonov 4cfd909412 usb: ehci-hcd: use mdelay_non_interruptible()
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-02 07:50:51 +02:00
Peter Mamonov 8426cc641d usb: ehci-hcd: detect re-entrance
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-02 07:50:51 +02:00
Peter Mamonov 4350744bf5 usb: ehci-hcd: port periodic transactions implementation from the u-boot
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-02 07:50:51 +02:00
Peter Mamonov 8165f3131c common: clock: introduce mdelay_non_interruptible()
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-02 07:50:51 +02:00
Stefan Christ e69b95fec3 fs: syntax fix in ramfs.c
Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-01 08:38:36 +02:00
Sascha Hauer a55684a9a0 ARM: i.MX: GuF Santaro: Fix panel support
The backlight enable gpio is in both the ldb node and the panel node.
Remove it from the ldb node where is was unused and fix the polarity
in the panel node. Also make the panel compatible to simple-panel to
let the driver match it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-01 08:26:08 +02:00
Sascha Hauer 6d39ac3158 ARM: i.MX: GuF Santaro: enable PWM
The PWMs now have to be enabled to use them. Enable the backlight PWM.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-01 08:26:08 +02:00