Commit graph

4829 commits

Author SHA1 Message Date
Lucas Stach
a3bb6eacbe ARM: socfpga: select OFTREE and OFDEVICE
SoCFPGA is completely multi-image enabled and probes the barebox
from a built-in DT, so there is no point in building a barebox
image that isn't able to probe from DT.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-26 12:52:49 +02:00
Sascha Hauer
8a6bd111d9 ARM: socfpga: Configure console from device tree
Add the missing stdout-path properties for the socfpga boards and
enable CONFIG_CONSOLE_ACTIVATE_NONE.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-26 11:04:45 +02:00
Steffen Trumtrar
8c2f1929c7 ARM: dts: remove most of socfpga barebox-specific dt code
Instead of using internal devicetree files, use the official ones from
/dts/src/arm.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-19 15:56:29 +02:00
Sascha Hauer
98b5672c4d Merge branch 'for-next/vpl' 2015-08-07 07:55:00 +02:00
Sascha Hauer
0c5c47b511 Merge branch 'for-next/vincell' 2015-08-07 07:54:46 +02:00
Sascha Hauer
19afbd285e Merge branch 'for-next/video' 2015-08-06 12:33:26 +02:00
Sascha Hauer
fd58dc84cb Merge branch 'for-next/spd' 2015-08-06 12:33:24 +02:00
Sascha Hauer
0dea9c7cf9 Merge branch 'for-next/ppc' 2015-08-06 12:33:16 +02:00
Sascha Hauer
4ee01d2b46 Merge branch 'for-next/misc' 2015-08-06 12:33:15 +02:00
Sascha Hauer
a8525f691d Merge branch 'for-next/imx' 2015-08-06 12:33:06 +02:00
Sascha Hauer
ebd6f26412 Merge branch 'for-next/exitcall' 2015-08-06 12:33:06 +02:00
Sascha Hauer
66f4cbdc89 Merge branch 'for-next/efi' 2015-08-06 12:33:05 +02:00
Sascha Hauer
563468c1ec Merge branch 'for-next/am335x' 2015-08-06 12:33:05 +02:00
Juergen Borleis
8e04a039a9 PPC/PCM030: provide EEPROM support to read factory settings
Above the 0x800 offset the manufacturer provides the board type, a serial
number and the MAC as three simple strings. Extract these strings, provide
their value as global variables and set the MAC into the ethernet unit.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-03 08:52:50 +02:00
Juergen Borleis
90c52fe07a PPC/MPC5200: re-use the IMX I2C master driver for MPC5200
This IP core is shared between many FSL SoCs. The MPC5200 provides this
core as well.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-03 08:52:43 +02:00
Juergen Borleis
d2e8305b34 PPC/MPC52xx: unify header file name for clock API
In preparation to re-use the i.MX I2C driver for the MPC5200 SoC use
clock.h instead of clocks.h for the clock API.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-03 08:52:43 +02:00
Juergen Borleis
c641d9d3ca PPC/PCM030: enable USB/OHCI pin support
This change in the port config register enables the USB/OHCI support and
makes USB work on the PCM030's regular development baseboard.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-03 08:52:43 +02:00
Juergen Borleis
e841fd10b0 PPC/PCM030: fix reference clock
In order to enable and use USB/OHCI on the MPC5200 the USB PLL register must be
set.

It's not easy to find a correct value for this register, it seems it depends on
the used external reference frequency and some other 'magic' things. There are
some values out in the wild for the 33,333333 MHz and 33,333000 MHz reference
frequency case, but they are not consistent over the boards.

The value used here in this change for the USB PLL register is from the first
days of support for this platform and works at least on the reference
baseboard.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-03 08:52:43 +02:00
Juergen Borleis
2afe1f23ce PPC/PCM030: remove nowhere used definitions
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-03 08:52:43 +02:00
Teresa Remmet
bc4ec43ede ARM: dts: beaglebone: Strip MLO device tree
Reduce size of beaglebone MLO image.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Tested-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-31 10:21:51 +02:00
Stefan Christ
60427aac46 ARM: [phyFLEX,phyCARD]-i.MX6: rename define in flash-headers
The files flash-header-*.imxfg contains two defines which are use in
include files flash-header-phytec-*.h. The first define is SETUP_MDCFG0.
In the second define name some RAM size value were used, e.g.
SETUP_S_DL_512MB_1GB or SETUP_1GIB_2GIB_4GIB.

It's better to name also the second define after the register names,
here MMDC1_MDCTL and MMDC1_MDASP, because these values changes for every
RAM configurations and it's consistent with the first define.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-31 08:49:44 +02:00
Philipp Zabel
f3f8e8fd87 ARM: imx6: rename SPI NOR device to /dev/spinor0
Barebox currently names the SPI NOR device "/dev/sst25vf016b",
but the barebox update handler still points to "/dev/m25p80",
causing barebox_update to fail.
Choose a descriptive name instead.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-31 08:49:43 +02:00
Sascha Hauer
459c7f3213 ARM: i.MX6 cm-fx6: Fix area for get_ram_size
for bank2_size get_ram_size must be called with the CS1 area. With the
recent fix to calculate CS1 start this now starts at 0x90000000 and no
longer at 0x80000000.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-31 08:49:43 +02:00
Sascha Hauer
44dfce99f5 ARM: i.MX6 cm-fx6: Fix Chip density for DDR_64BIT_2GB case
DDR_64BIT_2GB corresponds to two chip selects (ncs = 2) with 1GiB
each. In this case cs_density must be configured to 8Gb (1GiB).

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-31 08:49:43 +02:00
Sascha Hauer
a5003e4eff ARM: imx6-mmdc: Fix cs0_end calculation
The current calculation does not take the 0x10000000 offset where
SDRAM starts into account. For example with a 1GiB chip density
the current code calculates cs1 start to 0x40000000, but it
has to be 0x10000000 + 0x40000000 = 0x50000000. Add the missing
8 32MiB chunks.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-31 08:49:43 +02:00
Sascha Hauer
3c9b56e90b ARM: initial cm-fx6 support
The cm-fx6 board is a module from Compulab with different i.MX6 SoCs.
This module is also found in the Utilite Mini Computer this patch
also adds support for.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-31 08:49:43 +02:00
Sascha Hauer
8d48e07c4d ARM: i.MX: make early UART functions independent of DEBUG_LL
We have functions to setup the i.MX uart for early use, but these all
depend on DEBUG_LL. Move them to imx-uart.h to make them usable for
the regular PBL console.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-31 08:49:43 +02:00
Sascha Hauer
37b8e17135 ARM: i.MX: xload: implement esdhc xload for i.MX6
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-31 08:46:20 +02:00
Sascha Hauer
493d20a200 ARM: i.MX6: Add DDR setup code from U-Boot
Several i.MX6 boards like to do their SDRAM setup in code rather than
in DCD tables. Add the SDRAM setup code from U-Boot to make it easy
to adopt the SDRAM setup from the U-Boot port of these boards.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-29 09:16:20 +02:00
Sascha Hauer
2fd7d15426 ARM: i.MX: Add SPI xload code
Add PBL xload code to load an image from SPI NOR flash. Currently implemented
for i.MX6.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-29 09:16:19 +02:00
Lucas Stach
9624f66652 ARM: imx: guf-neso: only try to enable USB if USB_ULPI is configured
Avoids a build failure if the config does not include ULPI support.
This is similar to what has been done to the PCA100 board.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-29 08:01:15 +02:00
Juergen Borleis
04ac96fa2d Devicetree/PPC: fix devicetree's fixup
Currently Barebox fails to boot a kernel/devicetree pair on PowerPC.

With of_find_node_by_path() the framework uses a global variable to find
the root node and fails. With of_find_node_by_path_from() and forwarding
the 'root' parameter it works again as expected.

This fixes the following error message at run-time:

Loading U-Boot uImage '/tmp/tftpcmd/kernel'
Loading devicetree from '/tmp/tftpcmd/oftree'
bootm: No devicetree given.
handler failed with: Invalid argument

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-27 07:46:53 +02:00
Michael Grzeschik
f53a2c1bfa xload: fix use after free
The variable partname is used in the error path for debugging.
We have to free it after this use.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-27 07:38:10 +02:00
Michael Olbrich
89aef0fb85 efi: enable blspec in the defconfig
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-27 07:23:56 +02:00
Michael Olbrich
c95b1c2bf2 efi: use an EFI variable to save the environment
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-27 07:23:20 +02:00
Michael Olbrich
89c142f4ef efi: use xstrdup_* when appropriate
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-27 07:23:19 +02:00
Michael Olbrich
b04ec8bfb9 efi: use xasprintf() when appropriate
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-27 07:23:18 +02:00
Michael Olbrich
21a83053ab efi: write volatile EFI variables used by systemd
LoaderTimeInitUSec and LoaderTimeExecUSec are used e.g. in systemd-analyze
to calculate the time spent in the firmare and barebox.

LoaderDevicePartUUID is used to mount the EFI partition to /boot.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-27 07:23:18 +02:00
Michael Olbrich
ceb217682c efi: add helper functions to write EFI variables
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-27 07:23:18 +02:00
Lucas Stach
55c78fd8b9 ARM: don't allow Thumb2 on AT91
AT91 has a custom barebox head that doesn't support Thumb2.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-24 09:25:17 +02:00
Lucas Stach
dd77403260 ARM: rockchip: depend on OFTREE
The current supported Rockchip board is initialized from a
builtin DTB and I suppose all future boards will do the same.

Fixes various missing functions and prototypes in Rockchip clk
driver.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-24 09:25:17 +02:00
Lucas Stach
b560c2b45d ARM: pxa: move mainstone TEXTBASE to Kconfig
So we can drop it from the defconfig and stop bothering
the user with this choice by default.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-24 09:25:17 +02:00
Michael Grzeschik
a2d81f787a ARM: OMAP: AM33xx: add uart1 pinmux setup
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-24 09:22:06 +02:00
Michael Olbrich
55da0cf13e efi: add support for initrd loading
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-23 20:31:44 +02:00
Michael Olbrich
356aaef5a3 efi: improve malloc pool allocation
Use allocate_pages() instead of allocate_pool(). With allocate_pages() we
can specify the address. This way, any address passed to the kernel will
never exceed the lower 32 bit.
If possible, try to allocate a larger pool.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-23 16:46:14 +02:00
Stefan Christ
a385f657e9 ARM: i.MX6: clarify usage of /dev/imx-ocotp
Explain the relationship between the OCOTP addresses from the i.MX6
Reference Manual and the file offset in '/dev/imx-ocotp'.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-20 07:39:07 +02:00
Daniel Schultz
7dc53b3bb2 ARM: am335x: Changed timer
The 32KHz from dmtimer0 is derived from a SoC internal RC oscillator
which is quite inaccurate. Switch to dmtimer2 which is driven from
the high frequency oscillator clock.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-20 07:33:11 +02:00
Sascha Hauer
53b8fd5627 sandbox: Update defconfig
The sandbox defconfig hasn't been updated for a long time. This enables
tons of features since the binary size is not relevant at all for sandbox.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-20 07:29:23 +02:00
Teresa Remmet
b59822ecef ARM: dts: Add support for all phyFLEX-AM335x options
Add support for all possible combinations of phyFLEX-AM335x modules.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-20 07:13:50 +02:00
Teresa Remmet
c474615225 ARM: dts: Add support for all phyCORE-AM335x options
Add support for all possible combinations of phyCORE-AM335x
modules.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-07-20 07:13:50 +02:00