9
0
Fork 0
Commit Graph

11717 Commits

Author SHA1 Message Date
Renaud Barbier 52aec0e1a3 ppc: Freescale P1010 SoC support
Add support for the Freescale P1010 including errata for this CPU,
SoC frequency calculation and GPIO settings.
The mpc85xx configuration options file is re-ordered to facilitate
board option selection.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-28 07:26:27 +02:00
Renaud Barbier 7e2d924723 ppc: Freescale P1010 headers
Add a minimal Integrated Flash Controller header file and new
definitions to support the P1010 SOC.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-28 07:26:27 +02:00
Renaud Barbier 7e1e8aac7b ppc: 85xx: CCSRBAR mapping moved to start-up code.
Move the configuration, control and status register base address
(CCSRBAR) relocation to the start-up processing. This addresses
TLB faults found during testing  on the Freescale P1010RDB and
also matches the current U-Boot functionality.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-28 07:26:27 +02:00
Sascha Hauer 772cc850ae fs: ext4: le32_to_cpu() used on a 16-bit field
From U-Boot commit:

| commit 8b415f703f88d1d3b0466830047affbbf7f24913
| Author: Rommel Custodio <sessyargc+uboot@gmail.com>
| Date:   Sun Jul 21 10:53:25 2013 +0200
|
|     ext4fs: le32_to_cpu() used on a 16-bit field
|
|     Fix reading ext4_extent_header struture on BE machines.  Some 16 bit
|     fields where converted to 32 bit fields, due to the byte swap on BE
|     machines the containing value was corrupted. Therefore reading ext4
|     filesystems on BE machines where broken before.
|
|     Signed-off-by: Rommel Custodio <sessyargc+uboot@gmail.com>
|     [sent via git-send-email; rework commit message]
|     Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
|     Reviewed-by: Simon Glass <sjg@chromium.org>
|     Tested-by: Simon Glass <sjg@chromium.org>
|     Tested-by: Lukasz Majewski <l.majewski@samsung.com>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-25 10:38:47 +02:00
Sascha Hauer 07f0462a45 fs: ext4: use EXT2_BLOCK_SIZE instead of fs->blksz
From U-Boot commit:

| commit 470173274d9ceb18a7140ef93e20be6c2236e7d9
| Author: Ionut Nicu <ioan.nicu.ext@nsn.com>
| Date:   Mon Jan 13 11:59:24 2014 +0100
|
|     ext4fs: use EXT2_BLOCK_SIZE instead of fs->blksz
|
|     Using fs->blksz in ext4fs_get_extent_block() is not
|     correct since fs->blksz is not initialized on the
|     read path. Use EXT2_BLOCK_SIZE() instead which will
|     produce the desired output.
|
|     Signed-off-by: Ionut Nicu <ioan.nicu.ext@nsn.com>
|     Signed-off-by: Mathias Rulf <mathias.rulf@nsn.com>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-25 10:38:39 +02:00
Sascha Hauer 400b4e2bb3 fs: ext4: fix "invalid extent block" error
From U-Boot commit:

| commit b5bbac1a9b07016602559ff483df265fef6c1f83
| Author: Ionut Nicu <ioan.nicu.ext@nsn.com>
| Date:   Mon Jan 13 12:00:08 2014 +0100
|
|     ext4fs: fix "invalid extent block" error
|
|     For files where we actually have extent indexes following
|     an extent header (ext_block->eh_depth != 0), the do/while
|     loop from ext4fs_get_extent_block() does not select the
|     proper extent index structure.
|
|     For example, if we have:
|
|     ext_block->eh_depth = 1
|     ext_block->eh_entries = 1
|     fileblock = 0
|     index[0].ei_block = 0
|
|     the do/while loop will exit with i set to 0 and the
|     ext4fs_get_extent_block() function will return 0, even if
|     there was a valid extent index structure following the
|     header.
|
|     Signed-off-by: Ionut Nicu <ioan.nicu.ext@nsn.com>
|     Signed-off-by: Mathias Rulf <mathias.rulf@nsn.com>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-25 10:38:27 +02:00
Raphaël Poggi 11db6dff49 i2c: add Atmel AT91 driver
Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-25 09:07:35 +02:00
Sebastian Hesselbarth 0992c07b49 ARM: mvebu: add fixup for directly attached memory
On Marvell MVEBU SoCs memory size is set up by BootROM and can be read
from SoC's RAM controller. With early DT fixups available, set corresponding
DT node to reflect accessible amount of directly attached RAM.

This patch also removes non-DT call to arm_add_mem_device to silence a
warning about request_region conflict due to adding a mem device twice.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-25 08:59:01 +02:00
Sebastian Hesselbarth c148e367a5 ARM: dts: mvebu: remove mbus ranges overwrite
With proper DT fixup in place, we can now remove the overwrite of
mbus ranges in Armada 370 Mirabox and Armada XP Openblocks AX3.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-25 08:59:01 +02:00
Sebastian Hesselbarth a9acc238e6 ARM: mvebu: add register remap for mbus ids
For each supported MVEBU SoC, add the corresponding remapped registers
to fix them up in provided DTBs.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-25 08:59:01 +02:00
Sebastian Hesselbarth 315e1a4138 ARM: mvebu: allow to fixup mbus ranges
On Marvell MVEBU SoCs internal registers are usually remapped from reset
default. While Dove and Kirkwood always had their registers remapped,
some Armada 370 and XP where shipped with bootloaders that did not remap
them.

On Barebox these registers are remapped early and on all MVEBU SoCs, so
provided DTs should always reflect that in their mbus ranges property.

This patch registers a fixup for DTBs and allows individual SoCs to add
specific remap ranges to the fixup list. The fixup is registered on
pure_initcall to even allow to fixup pbl or appended DTBs.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-25 08:59:00 +02:00
Sebastian Hesselbarth 5f1c610796 ARM: execute OF fixups early
Device trees can be passed by primary boot loader or appended to
barebox binary. Unfortunately, before probing devices from such
a device tree, no fixup can be applied.

Add a call to of_fix_tree() right before probing devices to catch
some very early fixups.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-25 08:59:00 +02:00
Wadim Egorov 6414f69910 barebox: common: Add missing filetype description
Added missing filetype description for UBIFS.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 11:34:51 +02:00
Sebastian Hesselbarth 7d643b416d USB: remove redundant defines from usb_defs.h
We imported a bunch of defines with ch9.h and ch11.h that are now
duplicated in usb_defs.h. Get rid of each duplicate in usb_defs.h
and prefer the ones from ch9.h and ch11.h.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:57:57 +02:00
Sebastian Hesselbarth 6931e9007c USB: Use descriptors from ch11.h
Use the descriptors from ch11.h instead of duplicating them
in usb.h. usb_hub_descriptor now contains a union .u to differentiate
HS hub descriptor from SS hub descriptor.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:57:57 +02:00
Sebastian Hesselbarth f261bce3a6 USB: EHCI: use descriptor length fields
Instead of hard-coding descriptor length, pick it from the
corresponding descriptor.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:57:57 +02:00
Sebastian Hesselbarth 756c95b764 USB: EHCI: make use of defines for descriptors
Now that we have a full set of defines for each descriptor field,
make use of it for the EHCI HCD descriptors.

This fixes endianess issues for .device.bcdUSB, .device.bcdDevice,
.config.wTotalLength, and .endpoint.wMaxPacketSize.

Also, .endpoint.bInterval was set to 0 instead of 255 due to a
copy-and-paste error while assigning u8[] to usb_endpoint_descriptor.

This also is a preparation for including ch11.h later, which has
a modified usb_hub_descriptor for USB 3.0.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:57:57 +02:00
Sebastian Hesselbarth 3c91719f14 USB: EHCI: reuse ch9.h config and interface descriptors
Now that usb_config_descriptor and usb_interface_descriptor are clean
of any additional fields, drop the duplication in EHCI code and use
the default ones.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:57:57 +02:00
Sebastian Hesselbarth 60ebedf1e7 USB: Move FooRequest defines and add class requests
{Device,Interface,Endpoint}Requests are currently defined in private
ehci.h but are also useful for other drivers than ehci-hcd. Move them
to usb/usb_defs.h and also add some more class requests.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:57:57 +02:00
Sebastian Hesselbarth 186f164af0 USB: fix PowerPowerCtrlMask assignment
usb_hub_configure() gets the hub descriptor and copies its values
over to a local descriptor.

While copying PortPowerCtrlMask it erroneously overwrites
DeviceRemovable due to a copy-and-paste error. Fix it up.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:57:57 +02:00
Sebastian Hesselbarth f4e7910195 USB: fixup usb_hub_descriptor length name
All other descriptors have their length field named bLength, except
imported usb_hub_descriptor from Linux uses bDescLength. Adjust the
name to match the others.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:57:57 +02:00
Sebastian Hesselbarth 73476de0e0 USB: reduce USB_MAXCHILDREN on imported ch11.h
Barebox supports up to 8 USB devices attached on a Hub, Linux does 31.
Reduce the USB_MAXCHILDREN define in ch11.h to the Barebox one and
put a comment above.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:57:57 +02:00
Sebastian Hesselbarth bfea72da82 USB: import ch11.h from Linux
Linux has an extra include for chapter 11 (Hub Specification) of USB 2.0
spec. We already have a ch9.h, so import the one from Linux.

Barebox specific changes will be patched up later.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:57:57 +02:00
Sascha Hauer d73ad85a93 ARM: i.MX5: internal NAND update: simplify code
Allocate space for the resulting image (FCB+DBBT+Firmware) in
imx_bbu_internal_v2_write_nand_dbbt() instead of its caller to make the
code simpler.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:45:30 +02:00
Sascha Hauer 55eb21d10a ARM: i.MX5: internal NAND update: Use variables for some constants
Instead oof using the same constants multiple times use a variable
to make the meaning of the constants clear.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:45:30 +02:00
Sascha Hauer 304ef1f1d7 ARM: i.MX5: internal NAND update: Fix firmware start page for internal nand boot
Documentation clearly states that the FCB at offset 0x68 has
to contain the start page of the firmware. In our case this
was set to 0x0. I don't know how this could ever work, but it
did, at least until:

15ee301 ARM: i.MX: bbu-internal: optionally use DCD data from image

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:45:22 +02:00
Sascha Hauer b49b0d47d9 ARM: i.MX5: internal NAND update: Use variable for pre_image_size
We have the hardcoded value 0x8000 for the space needed for FCB and
DBBT in several places. Use a variable instead and initialize it
correctly with 12 * meminfo.writesize (which is in fact 0x6000 for
2k pagesize).

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:40:20 +02:00
Sascha Hauer 46ff98b011 Documentation: Add documentation for Fastboot and Composite Multifunction Gadget
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:32:57 +02:00
Sascha Hauer 530731353d Documentation: Add documentation for USB serial console
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:32:57 +02:00
Sascha Hauer 43ab9db1b1 USB: gadget: fsl_udc: Be more tolerant in fsl_ep_dequeue
When an endpoint hasn't been enabled ep->desc is NULL and
fsl_ep_dequeue crashes with a NULL pointer dereference. Check
ep->desc before continuing.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:32:57 +02:00
Sascha Hauer bfb7aa1e19 USB: gadget: Add a multi function gadget
Similar to the Kernel multi function this gadget driver is used
for creating a USB device with multiple functions. This is
created and removed with the newly created 'usbgadget' command.
Based on the options it creates combinations of DFU, fastboot
and serial USB functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:32:56 +02:00
Sascha Hauer 3d5080aae9 USB: gadget: Add Android fastboot support
The Android fastboot protocol Can be used to update firmware and to
issue other lowlevel commands to the bootloader. This adds a
fastboot implementation based on the U-Boot fatboot code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 08:32:56 +02:00
Sascha Hauer 7d664f98d1 clk: clk-divider: divider calculation in clk_set_rate needs DIV_ROUND_UP
To make the resulting rate is always smaller than the desired rate, and
not bigger.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-23 09:57:08 +02:00
Renaud Barbier 752b9f4bf4 gianfar: descriptors access with I/O accessors
As in U-Boot git-9c9141f, make read/write access to the TX/RX
descriptors CPU agnostic.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-23 09:16:22 +02:00
Sebastian Hesselbarth d0e0a9799e pinctrl: mvebu: add pinctrl driver for Armada XP
This adds a pinctrl driver for pin muxing on Marvell Armada XP. The
driver is ported from Linux and modified to fit on Barebox's common
mvebu pinctrl driver.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-23 09:15:14 +02:00
Sebastian Hesselbarth fe0ed89b57 pinctrl: mvebu: add pinctrl driver for Armada 370
This adds a pinctrl driver for pin muxing on Marvell Armada 370. The
driver is ported from Linux and modified to fit on Barebox's common
mvebu pinctrl driver.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-23 09:15:13 +02:00
Lucas Stach 2419683206 mmu: flush ttb in map_io_sections
We need to flush out the ttb in order to make the
changes observable to the page walker.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 22:20:53 +02:00
Antony Pavlov 2671c30c25 scripts/checkpatch.pl: don't search for Doxyfile when checking top_of_kernel_tree()
Doxygen documentation is removed in the commit

  commit 98360be0fe
  Author: Sascha Hauer <s.hauer@pengutronix.de>
  Date:   Tue Jun 17 10:27:03 2014 +0200

      Documentation: remove doxygen documentation

But checkpatch.pl still trying to check 'Doxyfile' presence.
There is not such 'Doxyfile' and checkpatch.pl exits with
'Must be run from the top-level dir. of a kernel tree' message.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 22:07:29 +02:00
basti@linux-source.de 5b76ec27d1 arch/arm/lib/bootm: fix length check of kernel image
Signed-off-by: Sebastian Block <basti@linux-source.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 21:39:55 +02:00
Holger Schurig b3265685f7 sandbox: allow "make ARCH=sandbox allyesconfig"
Compiling the tree with allyesconfig is helpful because different
compilers (gcc, clang) or static checkers (e.g. clang's scan-build)
can then process and check more code.

This patch introduces two new configuration symbols that Kconfig files
can depend on. That way, code that is only working where a cache or DMA
implementation exists can be opted out.

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 21:29:57 +02:00
Holger Schurig 3549cc582c sandbox: disable bareboxcrc32 in sandbox mode
It won't compile currently anyway.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 21:29:57 +02:00
Holger Schurig 7ac222cbad Documentation: revamp dfu's help text
... so that it looks a bit nicer in the HTML generated docs.

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 21:16:06 +02:00
Holger Schurig 2f0f5522a8 Documentation: change generated help lines
Someone

   loadx (load binary file over serial line (X-Modem))

looked more silly than

   loadx - load binary file over serial line (X-Modem)

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 21:16:06 +02:00
Holger Schurig 46e8bf7487 Documentation: only write changed *.rst files
Documentation/gen_commands.py use to re-write all auto-generated *.rst
file, changed or not. That in turn didn't work well with the internal
cache of the Sphinx documentation generator.

By comparing the SHA1 hash of the newly generated *.rst with the
current sha1 file, the time to execute "make docs" can be reduced
from 6.2s to 2.4s on my humble laptop.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 21:16:06 +02:00
Holger Schurig f837350635 Documentation: lowercase help short texts
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 21:16:06 +02:00
Holger Schurig 43f4c1d3c9 Documentation: remove "all all" in help's help text.
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 21:16:06 +02:00
Sascha Hauer 0bd652f62a Add release string
Currently we only have version_string which contains information
about the date the binary was compiled and by whom it has been
compiled. This adds a release_string which only contains the
plain release version.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 08:11:58 +02:00
Sascha Hauer ad7f4c29b9 USB: gadget: DFU: drop app idle state
The app idle state hasn't been correctly implemented. It isn't useful
for barebox anyway since in barebox there is no app running we have
to stop first. We can just start in DFU mode.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 08:11:54 +02:00
Sascha Hauer ade522c6dd USB: gadget: DFU: register as USB function
Register DFU as usb_function_instance to make it work with composite
gadgets. Also use this internally for registering as DFU device (with
the 'dfu' command).

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 08:11:49 +02:00
Sascha Hauer 6f267eae9e USB: gadget: DFU: return -EINTR when interrupted
Instead of returning succesfully when ctrl-c is pressed return
with -EINTR.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 08:11:44 +02:00