9
0
Fork 0
Commit Graph

808 Commits

Author SHA1 Message Date
Sascha Hauer a51d06d679 of: remove unused libfdt
Now that we are completely independent of libfdt remove the unused
code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-06 11:41:29 +01:00
Sascha Hauer 9d8e08353c of: fixup unflattened devicetree
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-06 11:41:29 +01:00
Sascha Hauer b26b7ef0f0 of: Add root node argument to of_find_node_by_path
This makes of_find_node_by_path usable with multiple trees.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-06 11:41:28 +01:00
Sascha Hauer 8a185a4ff2 of: let of_unflatten_dtb return the unflattened tree
In order to be able to handle multiple devicetrees, do not assume
the tree to be unflattened is the barebox internal one. Instead,
just return a pointer to it and assign the barebox internal root_node
external to the unflatten function.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-06 11:41:27 +01:00
Sascha Hauer d46a8eebcd ARM: OMAP: beagle: Add missing MMC iomux setup
When the board is booted from NAND we have to setup the iomux to
make the SD card work. Unfortunately this still is not enough :(
The SD card still will only work when booting from it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-04 17:00:23 +01:00
Sascha Hauer b7451329b5 ARM: OMAP3: invalidate L2 cache using ROM API
Code taken from U-Boot. This makes the beagle board much more
reliable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-04 17:00:23 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2ecdea32dd switch more boards to lwl-y
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-04 09:23:45 +01:00
Sascha Hauer 13b4e37c1c Merge branch 'for-next/vexpress' 2013-03-04 09:21:54 +01:00
Sascha Hauer ea0f831cd0 Merge branch 'for-next/mxs' 2013-03-04 09:21:54 +01:00
Sascha Hauer 13408877f4 Merge branch 'for-next/misc' 2013-03-04 09:21:37 +01:00
Sascha Hauer 908bc8ce45 Merge branch 'for-next/imx' 2013-03-04 09:21:37 +01:00
Sascha Hauer 831d83e922 Merge branch 'for-next/highbank' 2013-03-04 09:21:37 +01:00
Sascha Hauer b7314e47a5 Merge branch 'for-next/clps711x' 2013-03-04 09:21:36 +01:00
Sascha Hauer 40d8780de5 Merge branch 'for-next/at91' 2013-03-04 09:21:36 +01:00
Maxime Ripard 3d61f0865b ARM: cfa10036: Remove the boot partition and boot from ext
Support for ext filesystems has been introduced recently. We can now
boot directly from our rootfs, loading the kernel and device tree
images from /boot.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 16:22:06 +01:00
Jean-Christophe PLAGNIOL-VILLARD 07ca814239 highbank: add of fixup
depending on the power domain register we need to disable sata or mmc
and update the cpu informations

take from Calxeda U-Boot git

Register the original dtb to /dev/firmware-dtb and the fixed dtb to /dev/dtb

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 14:08:44 +01:00
Maxime Ripard 2cc328ec2d cfa10036: Update the environment
Since we added a new partition in the board, the partitions number of
the boot and rootfs partition have changed as well.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-27 08:58:14 +01:00
Maxime Ripard c981b83356 cfa-10036: Use the second MMC partition to store the environment
Since the only storage medium on the cfa-10036 is the MMC card, we need
to have a registered environment partition on it if we want to be able
to modify at runtime.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-27 08:58:14 +01:00
Sascha Hauer a9f50d96e5 ARM i.MX pcm043: Use imx_bootsource() to detect bootsource
Also, print out where our environment comes from.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-27 08:57:08 +01:00
Sascha Hauer 74421f2f47 ARM i.MX pcm043: Switch to new environment
- switch to new environment
- make barebox partitions 512K big
- update defconfig for new env:
  - enable menu support
  - miitool support
  - clk commands
  - oftree support
  - let/dirname/readlink commands
  - enable external nand boot support

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-27 08:57:04 +01:00
Fabio Porcedda 4cb9d4fa0e ARM at91 telit-evk-pro3: move config-board out of /env/init
This is to complete the work of two recent commits:
- defenv2: move config-board out of /env/init
- defenv2: comment setting default values in /env/config

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 11:05:02 +01:00
Alexander Shiyan d2e68e2d65 ARM: pcm038: Using "get_ram_size" for determine SRAM size
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-25 08:57:40 +01:00
Alexander Shiyan cb8ee706af ARM: pcm970: Replace #ifdef with IS_ENABLED()
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-25 08:57:40 +01:00
Alexander Shiyan 97dfd44a57 ARM: pcm970: Fix bug with CompactFlash
Patch adds missing MX27_PCMCIA_CTL_BASE_ADDR offset for "readl" operator.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-25 08:57:40 +01:00
Alexander Shiyan d16adc0557 ARM: pcm038: Fix serial number IIM-address
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-25 08:57:40 +01:00
Alexander Shiyan 240194f0e5 ARM: pcm038: Remove duplicate imx27_barebox_entry() call
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-25 08:55:27 +01:00
Eric Bénard 2aa41b9a19 falconwing: switch to generic peristent env
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-21 14:45:43 +01:00
Eric Bénard 2ce56634a5 imx23-olinuxino: swith to generic peristent env
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-21 14:45:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD 0d8ce86780 switch boards to lwl-y
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-21 14:42:51 +01:00
Fabio Porcedda 19f8f1166d ARM: at91: use -EINVAL for invalid gpio on atmel_mci
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-19 20:06:56 +01:00
Fabio Porcedda d15b81b41a at91sam9260/9g20ek: refactor init_board script
Refactor to remove duplicated code without changing functionality.
Put "then" on the same line of "if", because:
 - is the most used style in barebox
 - is like c code style
 - is more compact

Reduce the number of lines from 50 to 40.

Tested on at91sam9260ek.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-19 08:56:20 +01:00
Alexander Shiyan bbc0b6bc15 mfd: Using MFD_xx prefix for symbols
This patch provides rename MFD-related symbols for using MFD-prefix.
Additionally, sorting mfd/Kconfig and mfd/Makefile records.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-18 09:21:08 +01:00
Sascha Hauer 31668da3a5 ARM OMAP phycard-a-l1: Add missing include
Fixes:

arch/arm/boards/phycard-a-l1/lowlevel.c: In function 'pcaal1_sdrc_init':
arch/arm/boards/phycard-a-l1/lowlevel.c:105:2: warning: implicit declaration of function 'get_ram_size' [-Wimplicit-function-declaration]
arch/arm/boards/phycard-a-l1/lowlevel.c:113:3: warning: implicit declaration of function 'hang' [-Wimplicit-function-declaration]

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-15 19:19:15 +01:00
Fabio Porcedda 61c5f054f7 at91sam9260/9g20ek: use IS_ENABLED instead of #if/#ifdef
Using IS_ENABLED instead of #if/#ifdef the compiler can check
all the code.
Using IS_ENABLED for configuring smc->mode is an optimization,
reduce init.o text from 905 to 877.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-15 18:25:51 +01:00
Jean-Christophe PLAGNIOL-VILLARD d8da8c23e9 highbank: use the provided dtb by the firmware to probe barebox device and mem size
the dtb is at 0x1000

if no dtb present use C code device

keep in C the timer/gpio/uart

have a nice tree

barebox 2013.02.0-00294-g6802ddf #124 Wed Feb 13 02:31:01 CST 2013

Board: Calxeda Highbank
memory: ram0: 0xff900000@0x0
highbank: dtb probed memory size
registered netconsole as cs1
malloc space: 0x03500000 -> 0x03efffff (size 10 MiB)
Open /dev/env0 No such file or directory
no valid environment found on /dev/env0. Using default environment
running /env/bin/init...
ahci ffe08000.sata: port 0: SATA link ok
ahci ffe08000.sata: port 0: Spinning up device...
ahci ffe08000.sata: port 0: ok.
ahci ffe08000.sata: registered /dev/ata0
eth0: got preset MAC address: 52:54:00:12:34:56
eth1: got preset MAC address: 52:54:00:12:34:57

Hit any key to stop autoboot:  3
[barebox@Calxeda Highbank]:/
 # devinfo
devices:
`---- platform
     `---- mem0
          `---- 0x00000000-0x3fffffff: /dev/ram0
          `---- 0x00001000-0x00010fff: /dev/dtb
     `---- mem1
          `---- 0x00000000-0x000051af: /dev/defaultenv
     `---- mem2
          `---- 0x00000000-0xfffffffe: /dev/mem
     `---- cs1
     `---- fff10600.timer
     `---- fff10620.watchdog
     `---- fff11000.interrupt-controller
     `---- l2-cache
     `---- ffe08000.sata
          `---- 0x00000000-0x3fffffff: /dev/ata0
          `---- 0x00100000-0x014fffff: /dev/ata0.0
          `---- 0x01500000-0x3fffffff: /dev/ata0.1
     `---- ffe0e000.sdhci
     `---- fff00000.memory-controller
     `---- mem3
     `---- fff3c000.sregs
     `---- fff3c200.sregs
     `---- fff50000.ethernet
          `---- eth0
     `---- fff51000.ethernet
          `---- eth1
`---- amba
     `---- sp804
     `---- uart-pl011
          `---- cs0
     `---- fff30000.gpio
     `---- fff31000.gpio
     `---- fff32000.gpio
     `---- fff33000.gpio
     `---- fff35000.rtc
`---- fs
     `---- ramfs0
     `---- devfs0
`---- net
`---- global

drivers:
uart-pl011
sp804
pl061_gpio
ramfs
devfs
tftp
hb-xgmac
ahci
mem
[barebox@Calxeda Highbank]:/
 #

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 13:09:10 +01:00
Jean-Christophe PLAGNIOL-VILLARD f6b23059c9 arm: add highbank support
currently only tested under qemu

qemu-system-arm -M highbank -nographic -m 4089 -kernel build/highbank/arch/arm/pbl/zbarebox -tftp "." -drive id=disk,if=ide,file=disk.img -device ide-drive,drive=disk,bus=ide.0

with:
 - timer (AMBA SP804)
 - uart (AMBA PL011)
 - gpio (AMBA PL061)
 - ahci
 - net (XGMAC)

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 13:09:09 +01:00
Sascha Hauer e55f9d10b4 defenv2: move config-board out of /env/init
Having the board config file in /env/init has the problem that
the settings in /env/config are overwritten in the init sequence.

This moves the config-board files to /env/ and sources them explicitly
from /env/bin/init before sourcing /env/config

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 08:50:43 +01:00
Alexander Shiyan 1009b307bd ARM: clep7212: Update default environment
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:34:26 +01:00
Alexander Shiyan 3539bb8017 ARM: clps711x: Move memory initialization in common CLPS711X location
One memory initialization will be used on any CLPS711X-target,
so move it in the common location.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:34:26 +01:00
Alexander Shiyan 7e982d545b ARM: clep7212: Fix NULL pointer exception if MMU is enabled
NOR-flash is placed at address 0x0, so if MMU is turned on, initialization
will fails. This patch fix this problem.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:34:26 +01:00
Alexander Shiyan 1795947ba1 ARM: clps711x: Adds config option for CPU PLL multiplier
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:34:25 +01:00
Alexander Shiyan 86fda721e3 ARM: clps711x: Move basic lowlevel initialization in common CLPS711X location
One lowlevel initialization will be used on any CLPS711X-target,
so move it in the common location.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:34:25 +01:00
Alexander Shiyan c1a4087f5d ARM: clps711x: Rework lowlevel initialization code
This is a rework of CLPS711X low level initialization code which includes:
- Prepare for changing CPU PLL multiplier from board lowlevel code.
- Decrease initial memory size to 8MB. It is minimal known size.
- Fix SDRAM initialization comment about size.
- Turn off all peripherals on startup.
- Skip PLL initialization if CPU is running from external 13 MHz clock.
- Use correct CPU speed for older CPUs without PLL.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:34:25 +01:00
Jean-Christophe PLAGNIOL-VILLARD 64b873ccba vexpress: detect the board periph mapping and detecting the sp804 mapping
at 0x10011000 for a9 legacy otherwise at 0x1c110000

as the new board also support Cortex-A9

so this is working

qemu/arm-softmmu/qemu-system-arm -M vexpress-a15 -m 1024 -smp 1 -kernel build/vexpress/barebox -pflash build/vexpress/flash -nographic -cpu cortex-a9

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 09:21:44 +01:00
Hubert Feurstein b0917935dd ARM i.MX6: Add support for SabreSD board
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-12 10:00:56 +01:00
Vicente Bergas c0ba0a64ae ArchosG9: solve regression in second stage lowlevel init
On ArchosG9 the second stage low-level init was the fallback default.
 Now that the low-level init is forcibly enabled it has to be skipped
 when already executed from first stage.

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-12 08:49:47 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2738f72352 arm: add vexpress board support
detect the cpu model to dynamise the periphs mapping

currently only tested on qemu but should work on real hardware

Cortex-A9

if you use 1GiB of ram you can run the same barebox on Cortex-A15 or Cortex-A9
otherwise use vexpress_ca9_defconfig where the TEXT_BASE is at 0x63f00000

when we will add the relocation support this defconfig will be drop

qemu/arm-softmmu/qemu-system-arm -M vexpress-a9 -m 1024 -smp 1 -kernel build/vexpress/barebox -pflash build/vexpress/flash0 -nographic

Cortex-A15

qemu/arm-softmmu/qemu-system-arm -M vexpress-a15 -m 1024 -smp 1 -kernel build/vexpress/barebox -pflash build/vexpress/flash0 -nographic

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-12 08:49:27 +01:00
Eric Bénard fbe9a322c0 mx23-evk: add USB gadget support
- enable the USB OTG device in gadget mode
- tested on i.MX23 EVH rev B1 with DFU

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:58:35 +01:00
Eric Bénard f850d96eb5 mx23-evk: fix MCI support
- this patch fix MCI support and enable using the SDCard to store
the environment.
- it is fully copied from imx23-olinuxino.c
- tested on i.MX23 EVK RevB1

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:58:35 +01:00
Michael Grzeschik 43e99fa007 mx28evk: add m25p80 flash via ssp2
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:58:34 +01:00