9
0
Fork 0
Commit Graph

5220 Commits

Author SHA1 Message Date
Antony Pavlov 7b702216db MIPS: tplink-mr3020: pbl: use more lowlevel init code from U-Boot_mod
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-26 07:51:03 +01:00
Antony Pavlov 41e4334fcc MIPS: ath79: pbl: import hornet_1_1_war routine from U-Boot_mod
U-Boot_mod is a popular bootloader for Atheros AR93xx chips,
please see https://github.com/pepe2k/u-boot_mod for details.

It's reasonable to import some lowlevel AR9331 initialization
code from U-Boot_mod.

AR9331 (Hornet) 1.1 currently needs an additional
reset at 1st boot. This patch imports necessary code
from u-boot_mod/u-boot/cpu/mips/start_bootstrap.S.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-26 07:50:57 +01:00
Antony Pavlov 8dc07d4792 MIPS: ath79: pbl: import AR9331 CP0 init routine from U-Boot_mod
U-Boot_mod is a popular bootloader for Atheros AR93xx chips,
please see https://github.com/pepe2k/u-boot_mod for details.

It's reasonable to import some lowlevel AR9331 initialization
code from U-Boot_mod.

This patch imports AR9331 MIPS24K coprocessor0 initialization
code from u-boot_mod/u-boot/cpu/mips/start_bootstrap.S.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-26 07:50:42 +01:00
Antony Pavlov f36700bc6c MIPS: dts: ar9331.dtsi: fix whitespace
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-25 09:50:48 +01:00
Alexander Kurz c8db6508d8 Kconfig: avoid tabs in help text
Tabs in kconfig help text will create unwanted indention artefacs when
the help text is scrolled horizontally. Replacing tabs with spaces.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-25 09:45:05 +01:00
Alexander Kurz f4594878f5 edb9302 eth: provide proper phy config
The evaluation boards EDB9302 and  Olimex-CS-E9302 both use a
KS8721BL transceiver in default strapping which is phy_addr=1

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-25 09:42:48 +01:00
Sascha Hauer 68a5d9c0eb ARM: socfpga: terasic sockit: Make locally used sys_mgr_init_table static
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-18 16:40:40 +01:00
Teresa Remmet 48921a46eb ARM: AM335x: Make use of ARM_USE_COMPRESSED_DTB
Use ARM_USE_COMPRESSED_DTB for all AM335x based board,
to reduce the image size even more.

Saves about 9kB in MLO image and 20kB in barebox image.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:20:59 +01:00
Teresa Remmet 49376db41d ARM: dts: beaglebone: Strip clocks in MLO device tree
Reduce even more size of beaglebone MLO device tree with stripping
the clocks.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:20:59 +01:00
Teresa Remmet b522f515f8 ARM: boards: phytec-som-am335x: New RAM Timings for phyCORE-AM335x-R2
Add RAM timings for phyCORE-AM335x-R2 256MB RAM.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:20:59 +01:00
Arnd Beuscher b8755c1362 ARM: board: phytec-som-am335x: RAM timings for phyCORE-AM335x-R2
Add RAM Timings for new phyCORE-AM335x-R2 SoM with
512MB (MT41K256M16TW107IT).

Signed-off-by: Arnd Beuscher <a.beuscher@phytec.de>
Sigend-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:20:59 +01:00
Jan Remmet 9d8c6bbc7d ARM: dts: am335x-phytec: eeprom name
use eeprom as name like in the kernel. This is needed if you use the
state framework.
phycard: also fix index, it has address 0x54

Signed-off-by: Jan Remmet <j.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:20:59 +01:00
Teresa Remmet 1061650b26 ARM: am335x_defconfig: Enable watchdog support
Enable wdt driver and command.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:20:59 +01:00
Wadim Egorov b93b636c83 ARM: am335x_defconfig: Enable NANDTEST command
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:20:59 +01:00
Stefan Christ 233a2fbd9f ARM: imx6: physom: fix phyflex workaround on Dual and Solo
Since commit 764ae1647c ("ARM: i.MX: Add correct SoC type detection
for i.MX6") the definition of the function cpu_is_mx6q and cpu_is_mx6dl
has changed.  Before that change they match the SoM family Quad/Dual and
DualLite/Solo. After that change they are SoM specific. They match only
Quad and DualLite. There are extra functions cpu_is_mx6d and cpu_is_mx6s
for SoM Dual and Solo.

We have not seen any real world consequences of this problem yet.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:06:53 +01:00
Stefan Christ 41305f025e ARM: imx: clocksource: add new DT compatible
Since commit 0ff58575c9 ("dts: update to v4.5-rc1") the compatible
"fsl,imx6q-gpt" was removed from imx6dl.dtsi. Now there is only the
Solo/DualLite specific compatible "fsl,imx6dl-gpt".  Adapt the driver
for that change.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:06:53 +01:00
Stefan Christ 113e230d68 ARM: i.MX6: add function cpu_is_mx6s()
The cpu_is_mx6* function for the i.MX6 Solo was missing. All other
functions are already defined.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-17 08:06:53 +01:00
Steffen Trumtrar 1bfe0f66d7 ARM: imx6: add caam clks
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-12 15:55:55 +01:00
Sascha Hauer 7482ab4de1 Merge branch 'for-next/regmap' 2016-02-08 08:27:03 +01:00
Sascha Hauer 79606b51ed Merge branch 'for-next/linux-headers' 2016-02-08 08:26:36 +01:00
Sascha Hauer 05261801e9 Merge branch 'for-next/input' 2016-02-08 08:26:35 +01:00
Sascha Hauer 6435fb09d8 Merge branch 'for-next/hab' 2016-02-08 08:26:35 +01:00
Sascha Hauer 129fb7d893 Merge branch 'for-next/fit' 2016-02-08 08:26:35 +01:00
Sascha Hauer e229ce086c Merge branch 'for-next/dts' 2016-02-08 08:26:32 +01:00
Sascha Hauer 6f04ca2d07 Merge branch 'for-next/arm' 2016-02-08 08:26:31 +01:00
Sascha Hauer 2ee6bb3504 ARM: i.MX: ocotp: Switch to regmap support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-05 15:13:29 +01:00
Sascha Hauer 09db5f43f9 ARM: i.MX: ocotp: Fix error bit handling
Instead of returning an error when a locked region is read, fill
the result with 0xbadabada to indicate a locked region is read.
This way a md -s /dev/imx-ocotp does not abort when it encounters
locked regions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-05 15:13:28 +01:00
Sascha Hauer 01cf83ba9c ARM: i.MX: ocotp: make priv the first argument of functions
Throughout our codebase the private context pointer is the first
argument to a function. Do this for the ocotp driver aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-05 15:13:28 +01:00
Sascha Hauer 07d45903e3 ARM: i.MX: ocotp: Explicitly access control register
Even when the control register has offset 0x0 it's still nice
to use a register define for it. Accessing priv->base directly
just looks wrong.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-05 15:13:28 +01:00
Sascha Hauer a17adf3369 ARM: i.MX: ocotp: Fix fusebox size
All i.MX6 SoCs except the i.MX6SL have 4kbit fuses. The i.MX6SL has
2kbit fuses. Fix the device size accordingly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-05 15:13:28 +01:00
Sascha Hauer 9064a935cd ARM: i.MX: iim: Switch to regmap support
To provide consumers easier access to the IIM.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-05 15:13:28 +01:00
Sascha Hauer 796694c0b2 Make: i.MX: Allow to pass config file to cmd_imx_image
Pass the config file to cmd_imx_image as arguments to make it more
flexible. Also add the possibility for another arg containing additional
options.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-04 14:38:29 +01:00
Steffen Trumtrar c07b5e5964 ARM: i.MX25: fixup broken DryIce GPR
Fixup the DryIce Non-Non-Volatile-Memory GPR register.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-04 08:45:16 +01:00
Sascha Hauer 73b35531b7 ARM: i.MX53: CCXMX53: Move device tree out of dts/
The dts files accidently have been added to dts/. Move them to a proper
place.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-04 08:39:47 +01:00
Sascha Hauer 3fc80b8d3d scripts: imx: Generate signed images with imx-image
The imx-image tool can now generate signed images itself, so we can
switch to this mechanism:

- Move the CSF templates to header files which can be included by the
  flash config files
- remove images/Makefile.imxhabv4 which is no longer necessary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-04 08:29:17 +01:00
Sascha Hauer 0b57bfb12f scripts: imx-image: Support adding a Super Root Key to the image
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-04 08:29:16 +01:00
Sascha Hauer 2ff23512d9 imx: hab: rename driver dir to hab/
There's not only HABv4 but also HABv3. No need to put the corresponding
code in separate directories, so rename the habv4 directory to hab.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-02 15:41:04 +01:00
Sascha Hauer 341d550c50 ARM: i.MX: Add HABv3 Kconfig variables
For signing i.MX images with HABv3 we need several certificates. Add
their pathes to Kconfig variables to make them available to the build
system.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-02 15:41:04 +01:00
Sascha Hauer 3c0e5afc5a x86: Add missing typedef for umode_t
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-01 09:16:12 +01:00
Sascha Hauer 607496b38c nios2: Add missing typedef for umode_t
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-01 09:14:28 +01:00
Jan Luebbe ac55adb321 bootm: add initial FIT support
This implementation is inspired by U-Boot's FIT support. Instead of
using libfdt (which does not exist in barebox), configuration signatures
are verified by using a simplified DT parser based on barebox's own
code.

Currently, only signed configurations with hashed images are supported,
as the other variants are less useful for verified boot. Compatible FIT
images can be created using U-Boot's mkimage tool.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-26 22:45:42 +01:00
Sascha Hauer fedba5aaef crypto: add digest_alloc_by_algo()
In barebox the function digest_alloc() allocates a digest based on a string.
When a subsystem already uses an integer value to identify a digest it makes no
sense to create a string and pass it to digest_alloc(), where it is parsed
again. This patch adds the possibility to get a digest by an enum.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-26 22:45:41 +01:00
Sascha Hauer aded35ece4 bootm: move initrd code together
The initrd code is distributed in several places in the bootm code.
Move it all together in bootm_load_initrd().

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-26 22:45:40 +01:00
Sascha Hauer 3f0835e074 bootm: Push dryrun to handlers
We can make the dryrun option more useful by calling into the handlers.
With this we can detect more cases that can go wrong during boot.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-26 22:45:36 +01:00
Enrico Jorns ba24403f24 arm: imx53-guf-vincell-lt: dts: do not specfiy fixed memory information
Setting a fixed memory size prevents from using the different board
variants with different memories equipped.

barebox is able to read RAM size informations from the imx53 RAM
controller and thus does not require this information passed via dts.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-26 08:05:27 +01:00
Daniel Schultz 64a8df2f6d arm: am33xx: Master Osc clock speed handling
Setup the plls with Master Osc. clock speed from the SYSBOOT
Configuration Pin.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-26 08:01:06 +01:00
Daniel Schultz a4a28df47d arm: am33xx: Move function to read from Master OSC
Move the function to read the Master OSC speed from
the SYSBOOT Configuration Pin for reuse.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-26 08:01:06 +01:00
Uwe Kleine-König a03a3915d9 Add initial support for Netgear ReadyNAS 104
Currently only second stage booting from the vendor U-Boot is tested. I
don't want to flash barebox into NAND yet because UART-booting for
recovery doesn't work for me.

Working so far are:

 - UART
 - networking
 - nand flash

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-22 08:43:19 +01:00
Philipp Zabel 3fb0605542 ARM: cm-fx6: set proper hostname
Set the hostname to "utilite" or "cm-fx6".

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-22 08:40:44 +01:00
Sascha Hauer 80f6d5db30 ARM: bootm: Use kernel handler to start barebox image
barebox can be called with the kernel calling convention, so
we can reuse the handler instead of creating a barebox specific
handler.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-22 08:15:15 +01:00
Sascha Hauer 0bb6e4c533 bootm: introduce bootm_get_os_size
ARM do_bootm_linux is not only called with uImages but also with
raw images, so we can't use uimage_get_size() here. Introduce
bootm_get_os_size() which handles the different image types.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-22 08:15:15 +01:00
Sascha Hauer 777060edcb ARM: zImage: add missing free() in appended device tree code
oftree must be freed when the tree is successfully unflattened.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-22 08:15:14 +01:00
Lucas Stach 62c9a8c000 ARM: PXA: move HAVE_CLK select
Claiming that all of PXA has CLK implemented, while only PXA3XX
selects the relevant clock implementations causes lots of build
failures for the other PXA architectures.

Fix it by moving the HAVE_CLK select to the one PXA arch, that
actually has it.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-19 17:23:00 +01:00
Lucas Stach 20ce1814bf ARM: tegra: clean up lowlevel entry
The lowlevel startup function jumps directly to the main
cluster if we are already running there. This allows for a
significant cleanup of the board startup code by directly
using the FDT address available there.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-18 08:22:23 +01:00
Sascha Hauer 30b7c5ead3 input: gpio-keys: Use KEY_* keycodes
The gpio-keys driver takes ascii key codes from platform_data and Linux
keycodes from device tree. Convert the ascii keys over to Linux
keycodes to get rid of the special cases in the driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-13 16:28:08 +01:00
Sascha Hauer 6639c98acc input: move matrix_keypad_build_keymap() to C file
Future additions will make the function too big to live as a static
inline function. Move to a C file and while at it, move matrix_keypad.h
to include/input/ where it belongs to.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-13 16:28:06 +01:00
Fabio Estevam 53a573c014 imx233-olinuxino: Fix mx23_power_init() arguments
Commit 4d70da6 ("ARM: MXS: power-init: Add parameters to
mx28_power_init()") causes imx233-olinuxino to not boot anymore.

imx233-olinuxino is commonly powered from external input supply,
so adjust the mx23_power_init() arguments to reflect that.

Reported-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-12 09:41:37 +01:00
Sascha Hauer 96b115be94 Merge branch 'for-next/socfpga' 2016-01-11 13:11:08 +01:00
Sascha Hauer 70ef1cef5c Merge branch 'for-next/pstore' 2016-01-11 13:11:07 +01:00
Sascha Hauer b9a2512aaa Merge branch 'for-next/misc' 2016-01-11 13:11:06 +01:00
Sascha Hauer b1ebbe76eb Merge branch 'for-next/imx' 2016-01-11 13:11:06 +01:00
Sascha Hauer a7964180e1 Merge branch 'for-next/gcc5' 2016-01-11 13:11:06 +01:00
Sascha Hauer ae33625512 Merge branch 'for-next/dts' 2016-01-11 13:11:05 +01:00
Andrey Smirnov dba6b4919e ARM: Fix exception table setup in MMU-less mode
Add code necessary for correct initialization of exception vector
table when MMU is disabled.

Note: Only ARMv7 support is implemented

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-11 11:48:40 +01:00
Andrey Smirnov 5e246885da ARM: mmu: Add VBAR setup
Add code to make sure that normal vector exception table, when it is
used due to unavailability of the high vector table, was not re-mapped
from 0x0 via VBAR by someone else before us.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-11 11:43:07 +01:00
Andrey Smirnov 78bca28702 ARM: asm: Add convenience fucntions to access VBAR
Add two functions to get/set VBAR register.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-11 11:43:07 +01:00
Trent Piepho 85464314b1 OF: Fix fixups to fix Linux DT instead of Barebox DT
OF fixups cm_cogent_fixup() and hb_fixup() are supposed to modify the
Linux device tree.  And they did originally, but commit
e520a8cc46 changed them to use
for_each_compatible_node(), which iterates through the Barebox DT.
Use new for_each_compatible_node_from() to specify the Linux DT root
as the start point.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-08 08:30:56 +01:00
Trent Piepho 76b059f311 socfpga: Find partition with environment via device tree
socfpga would load the environment from a file named "barebox.env"
located on the device "/dev/mmc0.1".  Both those names are hard-coded
in the socfpga code and can't be changed.

Barebox supports selecting the location of the environment using a
"barebox,environment" node in device tree's "chosen" node.  And
recently supports specifying that the env should come from a file on
this device.

Change socfpga to use this mechanism by adding the appropriate device
node.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-08 08:30:56 +01:00
Trent Piepho 94a4dc04d4 cdev: When creating a new cdev, initialize device_node
If a new cdev doesn't have a device_node defined when passed to
devfs_create(), set it to the device_node of the parent device, if one
exists.

For non-partitions, like ocotp or eeprom devices, this is the correct
thing to do.  Partitions need to use, and do use, a different node.

The code from commit 274e0b8dc4 to set
device_node in ocotp can be removed.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-08 08:30:55 +01:00
Alexander Aring 3a0f397e9c arm: bcm283x: add rpi2 support
This patch adds Raspberry Pi 2 support in barebox. The features should
be the same like the current RPi status in barebox.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-07 12:35:25 +01:00
Alexander Aring 8430b90330 rpi: sync revision detection with u-boot
This patch adds parts from u-boot code for doing RPi revision detection
and take care about the "warranty bit". I got this bit on my RPi2.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-04 09:38:12 +01:00
Alexander Aring 801a8d40c1 bcm283x: mbox: align to cachesize
This patch change the align of mbox stack resource to 32. The reason is
that I had some experience with bcm2836 and the mbox implementation,
after setting the align to 64(on bcm2836) the issues was gone.

I found these values inside the u-boot implementation, they use 32
(bcm2835) and 64 (bcm2836).

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-04 09:38:12 +01:00
Alexander Aring 295d6763bf bcm2835: introduce mach-bcm283x
This patch changes the most part of mach-bcm2835 to mach-bcm283x. This
prepares to add RPi2 support which is a bcm2836. This patch changes the
Kconfig entry namens to BCM283X for drivers only. These drivers should
working the same in bcm2836.

While updating defconfig I added LED support/trigger option.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-04 09:38:12 +01:00
Alexander Aring 9bdfe1ff7f arm: bcm2835: fix indentation
This patch fix indentation in core.h of mach-bcm2835.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-04 09:38:12 +01:00
Trent Piepho c44e12f0bd socfpga: Allow setting partition xloader boots from for mmc
The xloader boots the 2nd stage barebox from socfpga_barebox_part when
using NOR.  But when using MMC it boots from a hardcoded "disk0.1".
Add the mmc device name to the partition description and use it for
mmc booting.

Add an extern declaration of socfpga_barebox_part to the socfpga
header so that a board can change it to use a different partition.

Initialize socfpga_barebox_part to the default value instead of NULL to
avoid the NULL check later.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-14 11:32:30 +01:00
Trent Piepho 1d31baf145 bootstrap: Boot barebox with kernel calling convention
In commit 8e3ddc13eb the bootm code was
changed to boot barebox using the same calling convention as the
kernel.  Which on ARM is to pass three arguments which are zero, an
architecture code, and a params pointer.

A 2nd stage barebox can be booted using lib/bootstrap, which is
different code from bootm.  This code just leaves garbage in the first
three parameters and so doesn't follow the convention.

Change it to be compatible with the ARM kernel booting convention.
This just sends a zero for the architecture, since the code for
architectures depends on boot[zmu] and something using bootstrap
wouldn't have those too.  And it just passes NULL for the params since
we don't have a way to pass a device tree from the preloader.

All users of bootstrap are ARM based, but the code is in lib so a
non-ARM board might someday make use of it.  If the current code would
work for them, then the change here will be ok too.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-14 11:13:32 +01:00
Andrey Panov 0c348c3f44 ARM: i.MX6Q: Embedsky E9: Convert environment paths in DTS to a new bindings
Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-11 08:06:17 +01:00
Sascha Hauer a9e7e68279 ARM: dts: Add *.dtb.lzo to clean files
*.dtb.lzo are generated during compilatiion, delete them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-11 08:02:04 +01:00
Sascha Hauer 5e11907b7b ARM: Omap3: Remove useless inline
Silences gcc5 warning:

In file included from arch/arm/mach-omap/gpmc.c:31:0:
arch/arm/mach-omap/include/mach/sys_info.h:93:83:
warning: inline function 'get_sysboot_value' declared but never defined

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-10 11:05:49 +01:00
Lucas Stach 21854348c8 ARM: ccxmx53: properly guard initcall for multiimage
Make sure to not run this board specific initcall on any
other board.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-10 08:50:56 +01:00
Markus Pargmann 6c42710ae0 arm: Add RAMOOPS memory area
RAMOOPS is a driver that uses a reserved static memory region to store
the data from the last panic or boot. This helps to debug crashes at the
next boot while preserving the boot messages.

To guarantee a memory area that is not altered by barebox or the kernel,
this area is located at the end of the RAM right after barebox and
before the STACK. This ensures that changing barebox sizes do not
interfere with RAMOOPS.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-10 08:49:52 +01:00
Markus Pargmann 9280600522 arm: start: Add visible sdram region for barebox board data
This helps to understand and find problems with the memory layout of
barebox. It adds another entry for the board data that barebox
allocated.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-10 08:49:52 +01:00
Markus Pargmann 65071bd091 arm: Clarify memory layout calculation
The memory calculations used are all hardcoded into three different
files, start-pbl.c, uncompress.c and start.c. To make this more readable
and reliable, this patch gathers these information in barebox-arm.h with
static inline functions for the calculation of the memory offsets.

This patch also adds proper handling of different barebox/board data
sizes. Currently only 1MB+Alignment of RAM is reserved for Barebox and
board data. This could be too small for bigger devicetrees and barebox.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-10 08:49:52 +01:00
Markus Pargmann 2ab52a7b67 arm: boards: karo-tx6x remove definition of DIV_ROUND_UP
DIV_ROUND_UP is defined in include/linux/kernel.h. Use that instead.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-10 08:49:52 +01:00
Sascha Hauer a05d5c206c dts: update to v4.3-rc1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-12-10 08:48:39 +01:00
Sascha Hauer fab8198323 Merge branch 'for-next/socfpga' 2015-12-08 08:28:58 +01:00
Sascha Hauer 9fdf56c8d4 Merge branch 'for-next/omap' 2015-12-08 08:28:41 +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 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 fe68ba4526 Merge branch 'for-next/arm' 2015-12-08 08:27:08 +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
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
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
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
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
Sebastian Hesselbarth e67b4b1d02 arm: pxa: Remove pxa_get_nandclk()
With a common clock provided for NAND controller, get rid of the
mach/clock.h way of getting the NAND clock.

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:00:09 +01:00
Sebastian Hesselbarth ad46a08f82 arm: pxa: Add clock for Zylonite NFC
Add a clock with clk_add_physbase for the NAND flash controller on
Zylonite board.

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 968701de69 arm: pxa: Prepare for NAND clkdev lookup on PXA3xx
To allow PXA3xx nand driver to be reused on Marvell Armada 370/XP,
prepare to provide a common clock for the NAND driver on PXA3xx.

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:00:09 +01:00
Trent Piepho 5537d653d2 mci: dw_mmc: socfpga: Supply bus-width in platform_data
Since there is no OF support in the xloader on socfpga it uses the
platform_data system.  There needs to be a way to supply the
equivalent of the DT property bus-width this way to support devices
that need to use a smaller bus.

So that we don't need to put every flag that might get added to the
MMC_CAP list into platform_data, just put the bus width ones into
platform_data.

The socfpga dts sources specify a bus-width of 4 so use that in the
platform_data for socfpga.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-19 08:52:10 +01:00
Marek Vasut edc1bfa1fe imx6-mmdc: Fix MAPSR usage
The commit ea1fb2f75d by Eric Nelson
imx6-mmdc: fix automatic power down enable in write level calibration

fixed the incorrect usage of the MAPSR register, but there is one more
place where the MAPSR is misused in the exact same way, so fix that as
well.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-13 10:34:54 +01:00
Sascha Hauer 63b8d87744 ARM: Fix bug in remap_range
remap_range takes generic MAP_CACHED/MAP_UNCACHED flags which are then
translated into the corresponding ARM specific bits. We call remap_range
internally from dma_alloc_* aswell, but instead of passing the generic
flags we pass the ARM specific bits.
Fix this by creating an internal __remap_range function which takes the
ARM specific bits and use it where appropriate.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-13 08:52:40 +01:00
Lucas Stach 8331fc5c1e ARM: ventana: remove unneeded clock init in DCD
The clock driver will overwrite those values anyway, so no
point in setting them in the DCD.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-13 08:06:25 +01:00
Antony Pavlov 6991f6ed5f MIPS: tplink-mr3020: skip pbl lowlevel init if running from RAM
TP-Link MR3020 has 4 MiB flash boot ROM.
Usually boot ROM is mapped to 0xbfc00000.
However, as AR9331 allows to remap boot ROM to 0xbf000000
it's better to assume that boot ROM starts at 0xbf000000.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-13 07:52:44 +01:00
Antony Pavlov 1059d00841 MIPS: black-swift: skip pbl lowlevel init if running from RAM
Black Swift has 16 MiB flash boot ROM. The standard board's
bootloader (U-Boot_mod) remaps boot ROM to 0xbf000000.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Tested-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-13 07:52:44 +01:00
Oleksij Rempel 8891fcc9db MIPS: pbl: add pbl_blt macro
Barebox' PBL is able to initialize SoC's memory controller,
but it can be used only if PBL runs from ROM or on-chip SRAM.
MIPS architecture standard boot vector is 0xbfc00000
so on most MIPS SoCs all addresses higher than 0xbfc00000
belong to boot ROM or on-chip SRAM. Thus there's a
simple criterion to check if PBL runs from ROM: just
check if current PC is higher than 0xbfc00000.
Some MIPS boards have ROM start address lower than 0xbfc00000
so it's reasonable to make ROM start address checking board-dependant.

The pbl_blt macro checks if current pc is lower than
the first argument (ROM start address). If so then
next instruction executed is defined by the second argument
of the macro.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Tested-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-13 07:52:44 +01:00
Sascha Hauer d925f1ed32 ARM: calculate compressed dtb len correctly
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-11 15:41:32 +01:00
Trent Piepho 3c8f016d9b socfpga: Initialize emac physels to RGMII correctly
A comment in the socfpga init said that it was "Clearing emac0 PHY
interface select to 0", but this was doubly incorrect.  It was setting
physel for emac1, not emac0, and it was setting physel to 1 (RGMII)
not 0 (GMII).  All supported socfpga boards use RGMII, and use emac1,
so fix the comment to reflect the code.  But then extend the code to
set the physel for both emac0 and emac1, so it can work on boards that
use either or both emacs (which are called gmac0/1 in the dts).

The Cyclone V datasheet, page 17-60 "EMAC HPS Interface
Initialization", says to set physel while the EMAC is in reset.  So
place the EMAC in reset while changing physel.  The emacs are not in
reset as code earlier in the boot has already taken most of the
modules out of reset.  So put them back in reset while the physel is
changed.  The Linux kernel does it this way too.

If barebox has no network support, there is not much point in
configuring the emac physel lines.  This would be the case for the
xloader pre-bootloader config, which configures physel, doesn't use
the network, loads the main barebox, which then reconfigures physel
again.  Make this code depend on CONFIG_NET so it's just done in the
main barebox.  The Linux kernel does not need barebox to do this
initialization to use networking.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-11 09:06:26 +01:00
Christian Hemp e4c00a8b11 ARM: imx6dl: Add support for Phytec phyCORE-i.MX6 SOM
Add Phytec phyCORE-i.MX6 SOM.
     - imx6dl-phytec-phycore-som-nand
        - 256GB RAM on 1 Bank with 32Bit
        - 10/100MBit Ethernet
        - NAND
        - SD
        - UART

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-11 08:39:41 +01:00
Antony Pavlov a919cac585 MIPS: allow user to pass incorrect address to md command
This commit makes it possible to handle exception on
incorrect data access so 'md' command just show 'xxxxxxxx'
instead of crashing the system.

    barebox:/ md -l 0xa0000003+4
    a0000003: xxxxxxxx                                           ....

Without this commit we will get this

    barebox:/ md -l 0xa0000003+4
    a0000003:
    Ooops, address error on load or ifetch!

    ...

    ### ERROR ### Please RESET the board ###

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-11 08:38:24 +01:00
Antony Pavlov f1db81f838 MIPS: import exception registers restoring macros from linux kernel
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-11 08:38:24 +01:00
Antony Pavlov 643c5d87dd MIPS: avoid excessive exception
This commit clears ERL (ERror Level) flag on start.
If this flag is set then we get 'TLB miss on load or ifetch'
just after return from exception.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-11 08:38:24 +01:00
Antony Pavlov b6e9c2ae14 MIPS: traps.c: separate registers print stuff to show_regs()
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-11 08:38:24 +01:00
Sascha Hauer 99c9da2817 ARM: omap: Use correct device to mount on /boot
The current code tests if a partition (i.e. disk0.0) exists and instead
of mounting boot from this partition it uses the whole device (disk0).
This only works because the the FAT code accepts a MBR as input and
automatically skips it.

Let the code use the partition to mount /boot instead as it was
intended. We don't have to stat() the partition device, since this
error will be caught by mount() anyway, so remove the unnecessary
stat().

Reported-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-10 09:03:06 +01:00
Uwe Kleine-König acc017737f ARM: don't let the unwinder depend on exception handling
To be able to use dump_stack() without support exception handling the
definition of dump_stack has to move to a file that is actually compiled
without ARM_EXCEPTIONS.

Fixes: d332597c7c ("ARM: make exception handling optional")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:50:07 +01:00
Christian Hemp 813d5e00bf ARM: imx6q: Add support for Phytec phyCORE-i.MX6 SOM
Add Phytec phyCORE-i.MX6 SOM.
    Support:
     - imx6q-phytec-phycore-som-nand:
        - 1GB RAM on 1 Bank with 64Bit
        - 1GBit Ethernet
        - SPI NOR
        - NAND
        - SD
        - UART

     - imx6q-phytec-phycore-som-emmc
        - 1GB RAM on 1 Bank with 64Bit
        - 1GBit Ethernet
        - SPI NOR
        - eMMC
        - SD
        - UART

Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:38:53 +01:00
Stefan Christ d2bd828451 ARM: imx6q: pfla02: add phyFLEX-i.MX6 DualLite 1GiB on one bank
Add support for phyFLEX-i.MX6 DualLite 1GiB on one bank with NOR.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:38:53 +01:00
Stefan Christ ec8b0e4afd ARM: imx6dl: pfla02: Add support for 128MB and 256MB RAM
Add support for phyFLEX-i.MX6 Solo with 128MB and 256MB RAM on one
memory bank.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:38:53 +01:00
Stefan Christ fecd788e56 ARM: imx6q: pfla02: Add support for 512MiB RAM on one bank
Add support for phyFLEX-i.MX6 Quad 512MiB RAM on one bank.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:38:53 +01:00
Stefan Christ 4efef862d8 ARM: pfla02: append suffix 1bank
In the current naming schema the phyFLEX-i.MX6 variants which only use
one bank for memory have the suffix "1bank". The variants which use two
banks of memory have no suffix.

The patch fixes the name of the phyFLEX-i.MX6 Solo variant with 512MiB
on one bank. So the name of the image file changes from
    barebox-phytec-pbab01s-512mb.img
    barebox-phytec-phyboard-subra-512mb.img
to
    barebox-phytec-pbab01s-512mb-1bank.img
    barebox-phytec-phyboard-subra-512mb-1bank.img

This patch touches the phyFLEX-i.MX6 Kit variant and the
phyBOARD-SUBRA-i.MX6 which shares the same phyFLEX-i.MX6 module.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:38:53 +01:00
Christian Hemp d44ee9e242 ARM: phytec-som-imx6: update environment
Rename sd-ext3 to mmc, remove filesystem type from bootargs and remove
bootargs-ip. Add init script 'bootsource' to set boot source priority
and bootscript 'spi' for SPI NOR.

Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:38:53 +01:00
Stefan Christ 40150d43c7 ARM: phytec-som-imx6: set loadaddr to start of DDR memory.
The loadaddr in the flash-headers for the phyFLEX/phyCARD-i.MX6 was set
to 0x20000000 (512MiB). The start of the DDR memory in CPU's memory map
is 0x10000000 (256MiB). So the ROM loader loads the barebox image at the
memory position 256MiB and higher in the DDR memory.

This is a problem when the module doesn't have more than 256MiB of
memory. Therefore the loadaddr is set to the start of the DDR memory.

The patch was tested on a phyFLEX-i.MX6 Quad with 1GiB RAM on one bank
and on a phyCARD-i.MX6 Quad 1GiB RAM on two banks.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:38:53 +01:00
Stefan Christ a540c30359 boards: Add phytec-som-imx6
The main idea behind this patch is to avoid redundant code.  Because of
the module similarities of all i.MX6 based phytec boards, we can merge
its code.

The phytec-som-imx6 merges the code of all i.MX6 based phytec SOMs.  So
we will have only one "board" in the barebox for phyCARD-i.MX6 and
phyFLEX-i.MX6.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:38:53 +01:00
Stefan Christ 54f9f8564f ARM: imx6: phycard: use numeric suffix in device tree
Use numeric suffix for 'environment-sd3' in device tree.  This patch
prepares phytec-phycard-imx6 for the SOM unification.

Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:38:53 +01:00
Lucas Stach 713bff852e ARM: microsom: get MAC address from fuses
The production models have the MAC fuses blown, so we can use a
real MAC address instead of a random one.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:32:27 +01:00
Lucas Stach b4b3706960 ARM: microsom: make ETH work on production modules
The pre-production modules had an external crystal to generate the PHY
reference clock. Production modules rely on the i.MX6 to output the
correct clock.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:32:27 +01:00
Lucas Stach 4641ece146 ARM: microsom: add full set of module variants on Hummingboard
Now that we have a full set of DRAM configuration entries we can
build images for the full set of modules on Hummingboard.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:32:27 +01:00
Lucas Stach c28e522b0d ARM: microsom: import DCD from SolidRun U-Boot
This is a complete set of DRAM configuration values for all of the
MicroSOM variants extracted from SolidRun U-Boot.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:31:31 +01:00
Lucas Stach 1071a1d78a ARM: microsom: change barebox image name for Hummingboard
To reflect that the current image is in fact for a combination of a
MicroSOM i1 with a Hummingboard baseboard.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:31:31 +01:00
Lucas Stach 2fb71a0ce7 ARM: microsom: delete cargo-cult from Makefile
No need to carry this cruft around. It's not needed anymore.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:31:08 +01:00
Lucas Stach 95e8fa01d9 ARM: imx6: add MMDC arbitration control register define
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:31:08 +01:00
Sascha Hauer b5c7b09c8a Merge branch 'for-next/mvebu' 2015-11-06 16:10:44 +01:00
Sascha Hauer 1d9295b344 Merge branch 'for-next/misc' 2015-11-06 16:10:42 +01:00
Sascha Hauer 736a74ba7a Merge branch 'for-next/mips' 2015-11-06 16:10:37 +01:00
Sascha Hauer 3cdd30342b Merge branch 'for-next/memtest' 2015-11-06 16:10:37 +01:00
Sascha Hauer 5b476ef5e5 Merge branch 'for-next/imx' 2015-11-06 16:10:35 +01:00
Sascha Hauer 812a0fd6b8 Merge branch 'for-next/arm' 2015-11-06 16:10:29 +01:00
Anton Bondarenko 080a713d31 embedsky-e9: enable barebox_update command for booter update
Simplify booter update with barebox_update command using special
IMX6 MMC BBU handler.

Signed-off-by: Anton Bondarenko <anton.bondarenko.sama@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 09:05:07 +01:00
Trent Piepho a341b4d813 omap socfpga: Switch in flash env loading to use different config
On these systems, the base arch has code to load the in flash
environment from a file located in a FAT filesystem.  This was
controlled by the config option DEFAULT_ENVIRONMENT.  However, that
option turns on compiling the env into the barebox binary itself, as a
backup if the in flash env can't be loaded.

Most other boards have in flash env support unconditionally.  But omap
and socfpga also have xloader configurations, which aren't supposed to
have environment support, either in flash or compiled in.  If the in
flash env code were unconditional, then the xloaders would gain it.

So the code depends on ENV_HANDLING, which is only set on those boards
that are supposed to have an in flash env and not set on all the
boards that aren't supposed to have it.

If someone wanted to create a board that did have a saved env, but
used an alternate to this generic omap/socfpga file in FAT method,
then they'd probably want to create a new config option to control
this code and have it not be enabled for their board.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 09:03:17 +01:00
Teresa Remmet e6b5597ac6 ARM: am335x_defconfig: Enable SMSC phy driver
The phyCORE-AM335x has a SMSC phy mounted. Enabled the driver for it.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 08:59:43 +01:00
Teresa Remmet b3ff4794e3 dts: phyFLEX-AM335x: Disable second ethernet interface
There are phyFLEX modules with only the first eth phy mounted.
As barebox only supports the first interface anyway, disable
the second interface for now.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 08:59:43 +01:00
Antony Pavlov e856be5361 MIPS: tplink-mr3020_defconfig: enable pbl; make image shorter
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 0649af6f64 MIPS: tplink-mr3020: add pbl low level init
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 36b8e0d37c MIPS: ath79: add pbl_ar9331_ddr1_config macro
See also u-boot_mod/u-boot/cpu/mips/ar7240/hornet_ddr_init.S

See also this openocd commit:

    commit f59d2d9ecfee8899df531b87b7acaa468725f238
    Author: Oleksij Rempel <linux@rempel-privat.de>
    Date:   Fri Jan 30 13:05:31 2015 +0100

        tcl/target|board: add config Atheros ar9331

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 11cea6cf71 MIPS: ath79: add black-swift_defconfig
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 770f98d3bf MIPS: ath79: add black-swift board support
Black Swift is a tiny coin-sized embedded computer based on AR9331 SoC.
See http://www.black-swift.com/ for details.

See also Black Swift kickstarter page:
  https://www.kickstarter.com/projects/1133560316/black-swift-tiny-wireless-computer

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 82bd8277f2 MIPS: ath79: add debug_ll_ar9331_init macro
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 61163945cf MIPS: ath79: add pbl_ar9331_uart_enable macro
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 50725503b3 MIPS: ath79: add pbl_ar9331_ddr2_config macro
See also u-boot_mod/u-boot/cpu/mips/ar7240/hornet_ddr_init.S

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Oleksij Rempel 0f8ddb4d53 MIPS: ath79: add pbl_ar9331_pll macro
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Peter Mamonov 23492d36be mips: cpuinfo: report secondary cache configuration
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Peter Mamonov 9c12b4ae1c mips: c-r4k: detect secondary cache
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Sascha Hauer b792124a7d rework remap_range
remap_range is for remapping regions with different cache attributes.
It is implemented for ARM and PowerPC only, the other architectures only
provide stubs.
Currently the new cache attributes are passed in an architecture specific
way and the attributes have to be retrieved by calls to
mmu_get_pte_cached_flags() and mmu_get_pte_uncached_flags().
Make this simpler by providing architecture independent flags which can
be directly passed to remap_range()
Also provide a MAP_ARCH_DEFAULT flag and a arch_can_remap() function.
The MAP_ARCH_DEFAULT defaults to whatever caching type the architecture
has as default. the arch_can_remap() function returns true if the
architecture can change the cache attributes, false otherwise. This
allows the memtest code to better find out what it has to do.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 07:27:44 +01:00
Anton Bondarenko 79b813851f embedsky-e9: cleanup and reorder DTS nodes
Removed duplicate ldb node. Removed disabled nodes

Signed-off-by: Anton Bondarenko <anton.bondarenko.sama@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-02 09:22:45 +01:00
Andrey Smirnov 33d482fdd3 arm/cpu: Avoid multiple definitions of barebox_arm_entry
All versions of barebox_arm_entry (in uncompress.c, start.c and
start-pbl.c) appear to be doing exacty the same thing. So move the
definition into a separate file and use IS_ENABLED macro to avoid
re-definition.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-02 08:39:22 +01:00
Andrey Smirnov 2c68f4e53c arm/cpu/start.c: Distil some common code in __start().
Both barebox_boarddata and barebox_boot_dtb perform essentially the
same function -- hold a pointer to a chunk of private data. Since only
one variable is ever used at any given time we may as well merge those
two variable into one. This also allows us to share more code between
two boot paths (board data vs. device tree)

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-02 08:31:58 +01:00
Andrey Smirnov 48d6151029 ARM: Add support for semihosting
Add semihosting API implementation and implement a filesystem driver
to access debugging host filesystem using it.

Tested on Freescale SabreSD board (i.MX6Q) using OpenOCD

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-30 08:06:03 +01:00
Lucas Stach 33d3286460 ARM: imx6: add OF fixup to delete nonexistent CPU cores
Make sure that the DT passed to Linux reflects the actual number of CPU
cores present in the system by reading the SCU configuration. As both
the Q and DL variants of the MX6 have versions with cores fused away,
but the DTs have the maximum number of cores specified, this just deletes
any nonexistent CPU core nodes.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-27 17:08:02 +01:00
Michael Grzeschik 97d5514a02 ARM: i.MX6: add Technexion Wandboard support
This adds support support for the i.MX6 Technexion Wandboard. The
board comes in different SoC variants and different amounts of RAM.
The baord type is autodetected based on the SoC type, so all boards
can be supported by the same binary image.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-27 11:13:08 +01:00
Sascha Hauer cfcb530075 ARM: i.MX6dl: dts: include arm/imx6dl.dtsi from board files
Otherwise boards cannot include board files from the kernel dts
without getting the file ordering wrong.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-27 10:52:29 +01:00
Sascha Hauer 58eae8361c ARM: Allow compressed dtb binaries
In the current multi image build process the DTBs end up uncompressed
in the PBL. This can be annoying because the PBL is often very size
constrained.
This patch allows to put the DTBs in as lzo compressed binary into
the PBL. Since lzo offers quite good compression ratios for DTBs no
other compression algorithm has been implemented for now.
Boards which want to use the compressed DTBs only have to change
the __dtb_ prefix in the DTB name to __dtb_z_. Also they should select
ARM_USE_COMPRESSED_DTB to make sure barebox supports uncompressing
the DTB.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-27 10:02:28 +01:00
Sascha Hauer fcc6020164 ARM: Eltec-hypercam: Add missing dcdofd in flash header
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-27 08:34:40 +01:00
Lucas Stach 1678dcf7ca ARM: imx: clocksource: add new DT compatible
The i.MX6 DL/S DT has been changed to use more specific compatibles as
GPTv2 has a different programming model for modes used in Linux. This
difference doesn't matter for Barebox, but the old mx31 compatible has
been dropped from the DT, so we need to match on the one still present.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-26 15:06:58 +01:00
Eric Nelson 52cadd7ec3 imx6-mmdc: restore RALAT/WALAT in MMDC0, not MMDC1
Signed-off-by: Eric Nelson <eric@nelint.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-26 07:54:41 +01:00
Eric Nelson ea1fb2f75d imx6-mmdc: fix automatic power down enable in write level calibration
Bit 0 of the MAPSR register controls auto power down.

Explicitly clear this bit instead of reserved bit when
exiting from mmdc_do_write_level_calibration().

Signed-off-by: Eric Nelson <eric@nelint.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-26 07:51:43 +01:00
Sascha Hauer fe89df4ed9 scripts/kwbimage: Make BINARY files relative to config file
The BINARY files given in the config files are expected to be relative
to the place kwbimage is called from. This is bad since it breaks where
kwbimage is called from the build directory and not the source
directory.
It makes more sense to make the paths in the config files relative
to the config files which works with out of tree builds and is also
more what a user normally expects.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-10-19 08:39:25 +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
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
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 7bf2e891a4 Merge branch 'for-next/mips' 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
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
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
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
Wadim Egorov bdb26b1727 ARM: am33xx: Enable ethernet node on NET boot
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 09:35:13 +02:00
Wadim Egorov 7f89b686e0 ARM: dts: am335x-phytec-phycore-som: Disable mac node.
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 09:35:12 +02:00
Eric Bénard 46c14545cf eukrea-cpuimx25: update defconfig
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 08:47:27 +02:00
Eric Bénard d7f19aad72 eukrea-cpuimx25: enable dfu sequence conditionaly
this can be useful on the evaluation board but we don't want
the sequence to launch on custom board when there is not the
switch button on gpio 82

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 08:47:27 +02:00
Florian Vallee a266d5940c eukrea-cpuimx25: 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-09-29 08:47:26 +02:00
Eric Bénard 4f04790758 imx25: register usb-misc by default
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 08:47:26 +02:00
Florian Vallee 6b3bf88b7c eukrea-cpuimx25: fix boot
we need to disable second SD chip select properly else the SDRAM size
detection will detect it but there is no memory connected so the boot
will fail

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Florian Vallee <fvallee@eukrea.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 08:47:25 +02:00
Vicente Bergas 08f991ab21 archosg9: add display
Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 08:34:57 +02:00
Vicente Bergas 0b7bfa5253 archosg9: Use defaultenv-2-menu
Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 08:34:57 +02:00
Vicente Bergas 1fe4abeaf5 archosg9: re-generate defconfigs with "make savedefconfig"
Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 08:34:56 +02:00
Antony Pavlov 43399aa5db MIPS: tplink-mr3020_defconfig: enable gpio & leds
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-23 10:28:03 +02:00
Antony Pavlov f25a09ded6 MIPS: dts: tplink-mr3020.dts: enable gpio & leds
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-23 10:28:03 +02:00