summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/highbank/init.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/defenv'Sascha Hauer2016-10-101-0/+4
|\
| * defaultenv: add defaultenv-1 in boards via defaultenv_append_directory()Sascha Hauer2016-10-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently it's hardcoded for each board which defaultenv version is used. This is unfortunate since some people like the other defaultenv version better and may want to select it. This patch removes the board specific environment path CONFIG_DEFAULT_ENVIRONMENT_PATH and instead adds it via: if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) defaultenv_append_directory(defaultenv_<board>); This way we can make sure that the defaultenv-1 board specific bits are only compiled in when defaultenv-1 is actually in use. The next step is to make the defaultenv version selection a user visible choice. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | of_unflatten_dtb(): Check return value with IS_ERRAndrey Smirnov2016-09-051-1/+1
|/ | | | | | | | Of_unflatten_dtb returns a ERR_PTR value so checking it against NULL is incorrect. Fix it in all of the places where this was happening. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* OF: Fix fixups to fix Linux DT instead of Barebox DTTrent Piepho2016-01-081-2/+2
| | | | | | | | | | | | OF fixups cm_cogent_fixup() and hb_fixup() are supposed to modify the Linux device tree. And they did originally, but commit e520a8cc463760d21890b35218e4dac817e7c7e7 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>
* sizes.h: move include/sizes.h to include/linux/sizes.hMasahiro Yamada2015-01-081-1/+1
| | | | | | | | | | | | | | This file originates in Linux. Linux has it under include/linux/ directory since commit dccd2304cc90. Let's move it to the same place as well in barebox. This commit was generated by the following commands: find -name '*.[chS]' | xargs sed -i -e 's:<sizes.h>:<linux/sizes.h>:' git mv include/sizes.h include/linux/ Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: Drop devicetree merge supportSascha Hauer2014-05-221-1/+1
| | | | | | | | | | | | I assume I am the only person knowing that barebox is able to merge devicetrees. This feature seems broken for a while now since trying to merge devicetress results in: unflatten: too many end nodes Remove this feature to save the complexity. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: remove armlinux_set_bootparams() calls from boardsSascha Hauer2014-01-061-2/+0
| | | | | | | As the place for the atags now is determined automatically the call from the boards can be removed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: Add a context pointer to fixup functionsSascha Hauer2013-11-061-2/+2
| | | | | | | If drivers want to fixup their specific instance they need some context to know which instance they have to fixup. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Set model and hostname at boardlevelSascha Hauer2013-08-161-0/+3
| | | | | | | | | | | | With multiboard support the compiletime generated BOARDINFO string gets more and more meaningless. This removes it from Kconfig and replaces it with a variable that can be set at boardlevel. Also many boards have a standard setting for the hostname in the environment. This patch also moves the standard to C code by calling barebox_set_hostname(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* OF: base: remove of_tree_for_each_node from public APISebastian Hesselbarth2013-06-201-10/+6
| | | | | | | | This patch converts users of of_tree_for_each_node to recently added for_eacg_compatible_node helper. Also of_tree_for_each_node is removed from public OF API. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
* OF: base: sync of_find_node_by_path with linux OF APISebastian Hesselbarth2013-06-201-2/+2
| | | | | | | | | | | | | Barebox of_find_node_by_path requires a node to be passed as start node to start searching. Linux OF API does not pass this node and no current user of it in barebox is passing anything else than the root node. Therefore, we rename current function to of_find_node_by_path_from and introduce a Linux OF API compatible of_find_node_by_path that always passes the current root_node. Also, all current users of that function are updated to reflect the API change. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: remove unused libfdtSascha Hauer2013-03-061-2/+1
| | | | | | | Now that we are completely independent of libfdt remove the unused code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: fixup unflattened devicetreeSascha Hauer2013-03-061-11/+22
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: Add root node argument to of_find_node_by_pathSascha Hauer2013-03-061-1/+1
| | | | | | This makes of_find_node_by_path usable with multiple trees. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: let of_unflatten_dtb return the unflattened treeSascha Hauer2013-03-061-4/+7
| | | | | | | | | 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>
* highbank: add of fixupJean-Christophe PLAGNIOL-VILLARD2013-03-031-1/+47
| | | | | | | | | | | | | 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>
* highbank: use the provided dtb by the firmware to probe barebox device and ↵Jean-Christophe PLAGNIOL-VILLARD2013-02-141-8/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* arm: add highbank supportJean-Christophe PLAGNIOL-VILLARD2013-02-141-0/+50
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>