summaryrefslogtreecommitdiff
path: root/board/keymile
AgeCommit message (Collapse)Author
2017-08-16env: Rename some other getenv()-related functionsSimon Glass
We are now using an env_ prefix for environment functions. Rename these other functions as well, for consistency: getenv_vlan() getenv_bootm_size() getenv_bootm_low() getenv_bootm_mapsize() env_get_default() Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16env: Rename getenv/_f() to env_get()Simon Glass
We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h. Quite a few places use getenv() in a condition context, provoking a warning from checkpatch. These are fixed up in this patch also. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16env: Rename setenv() to env_set()Simon Glass
We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-22km/ivm: allow to set locally administred MAC addressesHolger Brunck
It is possible to flag MAC addresses as locally administred. In this case they don't need to be unique. This is only allowed for interfaces which have no connection to the outside. For the TEGR1 board we use this feature. Cc: Heiko Schocher <hs@denx.de> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2017-07-22km/ivm: always set ethaddr after reading IVMHolger Brunck
If we rebrand the IVM and ethaddr was set previously we need to change ethaddr. Otherwise we end up with a wrong MAC adress for the ethernet interface. Cc: Heiko Schocher <hs@denx.de> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2017-07-10km/common: remove unused function declarationsHolger Brunck
Cc: Wolfgang Denk <wd@denx.de> Cc: Heiko Schocher <hs@denx.de> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2017-07-06km/common: remove unused codeHolger Brunck
The 82xx board mgcoge3ne was removed from the codebase, so this is dead code. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Cc: Heiko Schocher <hs@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
2017-06-12powerpc, 8260: remove support for mpc8260Heiko Schocher
There was for long time no activity in the 8260 area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in 8260, so remove it. Signed-off-by: Heiko Schocher <hs@denx.de>
2017-05-15i2c: keymile: Drop use of CONFIG_I2C_HARDSimon Glass
Drop use of this long-deprecated option. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-13board_f: Rename initdram() to dram_init()Simon Glass
This allows us to use the same DRAM init function on all archs. Add a dummy function for arc, which does not use DRAM init here. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Dummy function on nios2] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-05board_f: Drop return value from initdram()Simon Glass
At present we cannot use this function as an init sequence call without a wrapper, since it returns the RAM size. Adjust it to set the RAM size in global_data instead, and return 0 on success. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05board_f: Drop board_type parameter from initdram()Simon Glass
It looks like only cm5200 and tqm8xx use this feature, so we don't really need it in generic code. Drop it and have the users access gd->board_type directly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2016-09-27usb: fsl: Rename fdt_fixup_dr_usbSriram Dash
The function fdt_fixup_dr_usb is specific to fsl/nxp. So, make the function name explicit and rename fdt_fixup_dr_usb into fsl_fdt_fixup_dr_usb. Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
2016-09-23treewide: replace #include <asm/errno.h> with <linux/errno.h>Masahiro Yamada
Now, arch/${ARCH}/include/asm/errno.h and include/linux/errno.h have the same content. (both just wrap <asm-generic/errno.h>) Replace all include directives for <asm/errno.h> with <linux/errno.h>. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> [trini: Fixup include/clk.] Signed-off-by: Tom Rini <trini@konsulko.com>
2016-07-16Various, unrelated tree-wide typo fixes.Robert P. J. Day
Fix a number of typos, including: * "compatble" -> "compatible" * "eanbeld" -> "enabled" * "envrionment" -> "environment" * "FTD" -> "FDT" (for "flattened device tree") * "ommitted" -> "omitted" * "overriden" -> "overridden" * "partiton" -> "partition" * "propogate" -> "propagate" * "resourse" -> "resource" * "rest in piece" -> "rest in peace" * "suport" -> "support" * "varible" -> "variable" Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2016-05-17dm: fsl_i2c: Rename I2C register structuremario.six@gdsys.cc
Signed-off-by: Mario Six <mario.six@gdsys.cc>
2016-02-06Use correct spelling of "U-Boot"Bin Meng
Correct spelling of "U-Boot" shall be used in all written text (documentation, comments in source files etc.). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
2016-01-14Fix GCC format-security errors and convert sprintfs.Ben Whitten
With format-security errors turned on, GCC picks up the use of sprintf with a format parameter not being a string literal. Simple uses of sprintf are also converted to use strcpy. Signed-off-by: Ben Whitten <ben.whitten@gmail.com> Acked-by: Wolfgang Denk <wd@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2015-11-18km/powerpc: fix ft_board_setup prototype for km82xx & km83xxValentin Longchamp
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18powerpc/83xx: add support for kmtegr1 boardValentin Longchamp
This board uses the same CPU (8309) as VECT1. The memory however is different since it has NAND Flash, the NOR Flash partitioning is different and of course the FPGAs as well. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> Signed-off-by: Christoph Dietrich <christoph.dietrich@keymile.com>
2015-11-18board/keymile/km82xx: setting dip_switch 3 and 4 will run bootloaderBagavathiannan Palanisamy
Setting dip_switch 3 and 4 also will run bootloader in COGE3 and COGE6 It is required remove local mgmt IP address, when DIP Switch PIN3 is enabled. DIP Switch 4 also enabled to avoid u-boot update in future for DIP switch enhancements. Signed-off-by: Bagavathiannan Palanisamy <Bagavathiannan.Palanisamy@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18km/powerpc82xx: remove unused functionHolger Brunck
commit 0a4f88b98 removed the usage of our setports function, but the function itself were not removed. So toss it it's dead code. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18km/powerpc: remove unneeded definesHolger Brunck
We use CONFIG_OF_LIBFDT and CONFIG_OF_BOARD_SETUP on all our powerpc targets, so there is no need to check these defines within our C code. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18powerpc/82xx/km: add testpin detection for mgcoge3neHolger Brunck
On mgcoge3ne we also want to start the test application if the testpin is asserted. But we don't have a full POST test support yet. So simply add a function to read the testpin value. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18powerpc/82xx: make set/get_pin for km82xx more flexibleHolger Brunck
The get_pin and set_pin funciton was only used for pins on Port D and therefore the value was hard coded in the function. Enhance this with a parameter, that we are able to use this functions for other ports too. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18powerpc/83xx: add support for kmtepr2 boardChristoph Dietrich
This board is similar to TUXX1, but it has differend FPGAs. Signed-off-by: Christoph Dietrich <christoph.dietrich@keymile.com> Signed-off-by: Andreas Huber <andreas.huber@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18km/scripts: search for kernel/DTBs at serverip:/PRODUCTNAME via TFTP in ↵Tobias Müller
develop mode Search for the kernel and DTBs in a folder named PRODUCTNAME (found in the IVM) at the TFTP server instead of the u-boot boardname. Signed-off-by: Tobias Müller <Tobias.Mueller@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2015-11-18km/scripts: load fdt_bid_kwkey.dtb when working with tftpHolger Brunck
When loading the dtb file via tftp we should load the one which matches boardId and hwKey and not a common one for the boardname. We have boards were different hwKeys are used and then we may load an incorrect dtb file. If no fdt_bid_kwkey.dtb file is not a fallback to boardname.dtb is used. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Tobias Müller <Tobias.Mueller@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2015-11-18arm/km_kirkwood: fix the #ifdef for KM_COGE5UN dip switchValentin Longchamp
There was a small typo for KM_COGE5UN that resulted in the dip switch not to behave as expected. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18arm/mgcoge3un: check dip_switch at startupHolger Brunck
Similar to kmcoge5un we need to check the dip switch at startup connected to the kirkwood at MPP43. If it's set we need to set the actual_bank to zero to boot from SW bank zero. Additional to kmcoge5un we need to check also the pin in misc_init to decide wether we wait for the ne to start or not. If the dip_switch is set we don't wait and continue immediately. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18arm/km: Fix LED configuration for 88E1118R PHY (PIGGY3)Tobias Müller
Configure PHY LED register for Marvell 88E1118R PHY used on PIGGY3 to match with printed descriptions on PCB Signed-off-by: Tobias Müller <Tobias.Mueller@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> [trini: Fix typo, CRTL_PAGE -> CTRL_PAGE] Signed-off-by: Tom Rini <trini@konsulko.com>
2015-02-16KM/IVM: remove ivm_read_eeprom(void)Valentin Longchamp
This is not used anymore since the procedure was split into a simple read function and a later alaysis. The ivm_read_eeprom name is now used for the previous ivm_simple_read_eeprom function. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-02-1682xx/km82xx: read the IVM eeprom earlierValentin Longchamp
This allows to define the ethaddr env variable according to the the IVM content by reading the IVM in misc_init_r. Later, when HUSH is available the content read earlier is analyzed to populate some non env variables. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-02-1683xx/km83xx: read the IVM eeprom earlierValentin Longchamp
This allows to define the ethaddr env variable according to the the IVM content by reading the IVM in misc_init_r. Later, when HUSH is available the content read earlier is analyzed to populate some non env variables. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-02-1685xx/kmp204x: read the IVM eeprom earlierValentin Longchamp
This allows to define the ethaddr env variable according to the the IVM content by reading the IVM in misc_init_r. Later, when HUSH is available the content read earlier is analyzed to populate some non env variables. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-02-16kirkwood/km_arm: read the IVM eeprom earlierValentin Longchamp
This allows to define the ethaddr env variable according to the the IVM content by reading the IVM in misc_init_r. Later, when HUSH is available the content read earlier is analyzed to populate some non env variables. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-02-16KM/IVM: split the IVM reading and parsing in 2 partsValentin Longchamp
This allows to first read the IVM content (earlier in the boot sequence) and define the ethaddr env variable thanks to the ivm_read_eepromi(). Later, the IVM content can be parsed and used to define some hush variables, when the hush subsystem is available thanks to ivm_analyze_eeprom(). To avoid the HW read to happen twice, the buffer passed to ivm_read_eeprom() has to be reused by ivm_analyze_eeprom (and thus allocated before calling ivm_read_eeprom()). Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-12-05km/km82xx: remove CONFIG_SYS_RAMBOOTHolger Brunck
This define is never set in our setup, so we can remove it safely. The former code causes cppcheck to complain about: [board/keymile/km82xx/km82xx.c:311]: (error) Uninitialized variable: psize Signed-off-by: Holger Brunck <holger.brunck@keymile.com> cc: Valentin Longchamp <valentin.longchamp@keymile.com> cc: Wolfgang Denk <wd@denx.de> Reviewed-by: York Sun <yorksun@freescale.com>
2014-11-21fdt: Allow ft_board_setup() to report failureSimon Glass
This function can fail if the device tree runs out of space. Rather than silently booting with an incomplete device tree, allow the failure to be detected. Unfortunately this involves changing a lot of places in the code. I have not changed behvaiour to return an error where one is not currently returned, to avoid unexpected breakage. Eventually it would be nice to allow boards to register functions to be called to update the device tree. This would avoid all the many functions to do this. However it's not clear yet if this should be done using driver model or with a linker list. This work is left for later. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
2014-11-07cppcheck cleanup: fix nullPointer errorsWolfgang Denk
There are a number of places where U-Boot intentionally and legally accesses physical address 0x0000, for example when installing exception vectors on systems where these are located in low memory. Add "cppcheck-suppress nullPointer" comments to silence cppcheck where this is intentional and legal. Signed-off-by: Wolfgang Denk <wd@denx.de>
2014-10-23arm: kirkwood: Change naming of dram functions from km_foo() to mvebu_foo()Stefan Roese
Additionally the SDRAM address decoding register address is not hard coded in the C code any more. A define is introduced for this base address. This makes is possible to use those gpio functions from other MVEBU SoC's as well. Signed-off-by: Stefan Roese <sr@denx.de> Tested-by: Luka Perkov <luka@openwrt.org> Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
2014-10-23arm: marvell: Extract kirkwood gpio functions into new common file gpio.cStefan Roese
This makes is possible to use those gpio functions from other MVEBU SoC's as well. Signed-off-by: Stefan Roese <sr@denx.de> Tested-by: Luka Perkov <luka@openwrt.org> Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
2014-10-23arm: marvell: Move arch/kirkwood.h to arch/soc.hStefan Roese
This move makes is possible to use this header not only from kirkwood platforms but from all Marvell mvebu platforms. Signed-off-by: Stefan Roese <sr@denx.de> Tested-by: Luka Perkov <luka@openwrt.org> Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
2014-09-13kconfig: remove redundant "string" type in arch and board KconfigsMasahiro Yamada
Now the types of CONFIG_SYS_{ARCH, CPU, SOC, VENDOR, BOARD, CONFIG_NAME} are specified in arch/Kconfig. We can delete the ones in arch and board Kconfig files. This commit can be easily reproduced by the following command: find . -name Kconfig -a ! -path ./arch/Kconfig | xargs sed -i -e ' /config[[:space:]]SYS_\(ARCH\|CPU\|SOC\|\VENDOR\|BOARD\|CONFIG_NAME\)/ { N s/\n[[:space:]]*string// } ' Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-08-30kirkwood: kconfig: refactor Kconfig and defconfigMasahiro Yamada
Becuase the board select menu in arch/arm/Kconfig is too big, move the KirkWood board select menu to kirkwood/Kconfig. Consolidate also common settings (CONFIG_SYS_CPU="arm926ejs" and CONFIG_SYS_SOC="kirkwood"). Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Prafulla Wadasdkar <prafulla@marvell.com> Cc: Luka Perkov <luka@openwrt.org>
2014-08-20kmp204x: reset the Zarlink clocking chips at power up onlyValentin Longchamp
There is the requirement on the chassis's backplane that when the clocks have been enabled, they then should not disappear. Resetting the Zarlink clocking chips at unit reset violates this requirement because the backplane clocks are not supplied during the reset time. To avoid this side effect, both the Zarlink clocking chips are reset only at power up. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-08-06Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxTom Rini
2014-08-01kmp204x: prepare to use CPU watchdogBoschung, Rainer
This patch configures the qrio to trigger a core reset on a CPU reset request. Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> Reviewed-by: York Sun <yorksun@freescale.com>
2014-08-01kmp204x/qrio: support for setting the CPU reset request modeBoschung, Rainer
To acheive this, the qrio_uprstreq() function that sets the UPRSTREQN flag in the qrio RESCNF reg is added. Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> Reviewed-by: York Sun <yorksun@freescale.com>
2014-08-01kmp204x: set CPU watchdog reset reason flagBoschung, Rainer
Check the core timer status register (TSR) for watchdog reset, and and set the QRIO's reset reason flag REASON1[0] accordingly. This allows the appliction SW to identify the cpu watchdog as a reset reason, by setting the REASON1[0] flag in the QRIO. Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> Reviewed-by: York Sun <yorksun@freescale.com>