summaryrefslogtreecommitdiff
path: root/board/xilinx/microblaze-generic
AgeCommit message (Collapse)Author
2019-04-26watchdog: Implement generic watchdog_reset() versionStefan Roese
This patch tries to implement a generic watchdog_reset() function that can be used by all boards that want to service the watchdog device in U-Boot. This watchdog servicing is enabled via CONFIG_WATCHDOG. Without this approach, new boards or platforms needed to implement a board specific version of this functionality, mostly copy'ing the same code over and over again into their board or platforms code base. With this new generic function, the scattered other functions are now removed to be replaced by the generic one. The new version also enables the configuration of the watchdog timeout via the DT "timeout-sec" property (if enabled via CONFIG_OF_CONTROL). This patch also adds a new flag to the GD flags, to flag that the watchdog is ready to use and adds the pointer to the watchdog device to the GD. This enables us to remove the global "watchdog_dev" variable, which was prone to cause problems because of its potentially very early use in watchdog_reset(), even before the BSS is cleared. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: "Marek Behún" <marek.behun@nic.cz> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Maxim Sloyko <maxims@google.com> Cc: Erik van Luijk <evanluijk@interact.nl> Cc: Ryder Lee <ryder.lee@mediatek.com> Cc: Weijie Gao <weijie.gao@mediatek.com> Cc: Simon Glass <sjg@chromium.org> Cc: "Álvaro Fernández Rojas" <noltari@gmail.com> Cc: Philippe Reynes <philippe.reynes@softathome.com> Cc: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Michal Simek <michal.simek@xilinx.com> Tested-by: Michal Simek <michal.simek@xilinx.com> (on zcu100)
2019-04-08watchdog: Move watchdog_dev to data section (BSS may not be cleared)Stefan Roese
This patch moves all instances of static "watchdog_dev" declarations to the "data" section. This may be needed, as the BSS may not be cleared in the early U-Boot phase, where watchdog_reset() is already beeing called. This may result in incorrect pointer access, as the check to "!watchdog_dev" in watchdog_reset() may not be true and the function may continue to run. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: "Marek Behún" <marek.behun@nic.cz> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Tested-by: Michal Simek <michal.simek@xilinx.com> (on zcu100) Reviewed-by: Michal Simek <michal.simek@xilinx.com>
2018-11-26microblaze: Use standard functions for memory decodingMichal Simek
The standard function is less error prone than custom one. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-06microblaze: Add missing quotes around XILINX_MICROBLAZE0_HW_VERMichal Simek
This issue is reported by kconfiglib: warning: style: quotes recommended around default value for string symbol XILINX_MICROBLAZE0_HW_VER (defined at board/xilinx/microblaze-generic/Kconfig:37) Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-07-19microblaze: Convert generic platform to DM gpioMichal Simek
Converting GPIO to DM requires to do changes in reset subsystem that's why support for Microblaze soft reset via sysreset and GPIO sysreset support was added. These two patches enables enabling GPIO DM. Microblaze soft reset is bind at last reset method. GPIO reset is handled via sysreset with adding this fragment to DT. gpio-restart { compatible = "gpio-restart"; gpios = <&reset_gpio 0 0 0>; /* 3rd cell ACTIVE_HIGH = 0, ACTIVE_LOW = 1 */ }; hard-reset-gpio property is not documented and also handled. Conversion is required. Unfortunately do_reset is required for SPL that's why use only soft microblaze reset for now. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-07-19microblaze: Support for watchdog_reset in initShreenidhi Shedi
We should support watchdog reset so that WATCHDOG_RESET will function properly. Signed-off-by: Shreenidhi Shedi <yesshedi@gmail.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-07-19microblaze: Delete Xilinx watchdog related macrosShreenidhi Shedi
These macros are not required anymore. These will be taken from configuration file. Signed-off-by: Shreenidhi Shedi <yesshedi@gmail.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-07-19microblaze: Cosmetic changes in Microblaze related filesShreenidhi Shedi
Signed-off-by: Shreenidhi Shedi <yesshedi@gmail.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-07-19microblaze: Remove unused XILINX_BOARD_NAME macroMichal Simek
This macro is not used anywhere that's why remove it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-07-19microblaze: Guard do_reset by CONFIG_SYSRESETMichal Simek
sysreset uclass have own do_reset function which should be used instead of board/platform specific. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-05board_f: Drop setup_dram_config() wrapperSimon Glass
By making dram_init_banksize() return an error code we can drop the wrapper. Adjust this and clean up all implementations. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2017-01-10microblaze: Make the board configuration name user definableSai Pavan Boddu
Add a prompt for editing in menuconfig Signed-off-by: Sai Pavan Boddu <saipava@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-06-06microblaze: Move MSR instruction selection to KconfigMichal Simek
Select MSR instructions via Kconfig instead of xparameters.h. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-06-06microblaze: Add option to pass cpu version numberMichal Simek
Toolchain can use some flags by default based on cpu version. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-06-06microblaze: Select compilation flags via KconfigMichal Simek
Remove autogenerated config.mk and select CPU options via Kconfig. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-04-04microblaze: Remove !OF_CONTROL code for timer and interruptMichal Simek
OF_CONTROL is enabled by default that's why this is dead code. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-01-27microblaze: Fix board_init calling sequenceMichal Simek
board_init() is in final elf file but it is not called at all. Use board_init_late() instead and call gpio_init() from it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-01-27microblaze: Read information about RAM from DTMichal Simek
Do not setup ram start/size in board file. Read it from DT instead. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-01-27microblaze: Remove systemace from board fileMichal Simek
Systemace is ancient IP which is not tested. Remove it from default configuration. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-01-27net: emaclite: Move emaclite to KconfigMichal Simek
Add PHYLIB and MII dependencies and enable it by default for Microblaze. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-01-27net: emaclite: Move driver to DMMichal Simek
Move driver to DM. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-01-27net: axi_emac: Move driver to DMMichal Simek
Move driver to DM. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-01-27microblaze: Remove unused I2C macrosMichal Simek
There is no i2c driver in the current u-boot. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-01-27serial: uartlite: Add uartlite to KconfigMichal Simek
- Move config option out of board file. - Remove uartlite address from config file Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
2016-01-20microblaze: move CONFIG_SYS_TEXT_BASE to defconfigMasahiro Yamada
This is how CONFIG options are defined by Kconfig. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Michal Simek <michal.simek@xilinx.com>
2015-12-18microblaze: Do not handle watchdog and gpio in SPLMichal Simek
watchdog and gpio are not validated for SPL that's why do not use them. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-12-18microblaze: Remove support for LL_TEMACMichal Simek
LL_TEMAC is available at big endian MB and it is not properly tested that's why the patch removes it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-08-18of: clean up OF_CONTROL ifdef conditionalsMasahiro Yamada
We have flipped CONFIG_SPL_DISABLE_OF_CONTROL. We have cleansing devices, $(SPL_) and CONFIG_IS_ENABLED(), so we are ready to clear away the ugly logic in include/fdtdec.h: #ifdef CONFIG_OF_CONTROL # if defined(CONFIG_SPL_BUILD) && !defined(SPL_OF_CONTROL) # define OF_CONTROL 0 # else # define OF_CONTROL 1 # endif #else # define OF_CONTROL 0 #endif Now CONFIG_IS_ENABLED(OF_CONTROL) is the substitute. It refers to CONFIG_OF_CONTROL for U-boot proper and CONFIG_SPL_OF_CONTROL for SPL. Also, we no longer have to cancel CONFIG_OF_CONTROL in include/config_uncmd_spl.h and scripts/Makefile.spl. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2015-04-29microblaze: Fix EMAC Lite initializationNathan Rossi
It is possible for CONFIG_XILINX_EMACLITE to be defined without XILINX_EMACLITE_BASEADDR being defined as the EMAC Lite driver support OF init. Check that the driver is enabled and the base address is available before initializing with a static base address. Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-02-09microblaze: Move architecture to use generic board initMichal Simek
Compile code with -fPIC to get GOT. Do not build SPL with fPIC because it increasing SPL size for nothing. Signed-off-by: Michal Simek <michal.simek@xilinx.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-07-30Add board MAINTAINERS filesMasahiro Yamada
We have switched to Kconfig and the boards.cfg file is going to be removed. We have to retrieve the board status and maintainers information from it. The MAINTAINERS format as in Linux Kernel would be nice because we can crib the scripts/get_maintainer.pl script. After some discussion, we chose to put a MAINTAINERS file under each board directory, not the top-level one because we want to collect relevant information for a board into a single place. TODO: Modify get_maintainer.pl to scan multiple MAINTAINERS files. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Suggested-by: Tom Rini <trini@ti.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-07-30kconfig: add board Kconfig and defconfig filesMasahiro Yamada
This commit adds: - arch/${ARCH}/Kconfig provide a menu to select target boards - board/${VENDOR}/${BOARD}/Kconfig or board/${BOARD}/Kconfig set CONFIG macros to the appropriate values for each board - configs/${TARGET_BOARD}_defconfig default setting of each board (This commit was automatically generated by a conversion script based on boards.cfg) In Linux Kernel, defconfig files are located under arch/${ARCH}/configs/ directory. It works in Linux Kernel since ARCH is always given from the command line for cross compile. But in U-Boot, ARCH is not given from the command line. Which means we cannot know ARCH until the board configuration is done. That is why all the "*_defconfig" files should be gathered into a single directory ./configs/. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
2013-10-31microblaze: convert makefiles to Kbuild styleMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Michal Simek <michal.simek@xilinx.com>
2013-10-14Coding Style cleanup: remove trailing white spaceWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2013-08-02xilinx: move microblaze-generic .dts to standard locationStephen Warren
Aside from microblaze, all other SoCs/boards/vendors store their DT files in board/$vendor/dts/$soc-$board.dts. Move microblaze-generic.dts to this location for consistency. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Michal Simek <monstr@monstr.eu>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2013-05-09gpio: Add support for microblaze xilinx GPIOMichal Simek
Microblaze uses gpio which is connected to the system reset. Currently gpio subsystem wasn't used for it. Add gpio driver and change Microblaze reset logic to be done via gpio subsystem. There are various configurations which Microblaze can have that's why gpio_alloc/gpio_alloc_dual(for dual channel) function has been introduced and gpio can be allocated dynamically. Adding several gpios IP is also possible and supported. For listing gpio configuration please use "gpio status" command This patch also remove one compilation warning: microblaze-generic.c: In function 'do_reset': microblaze-generic.c:38:47: warning: operation on '*1073741824u' may be undefined [-Wsequence-point] Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2013-04-30watchdog: Add support for Xilinx Microblaze watchdogMichal Simek
Watchdog can be used on Microblaze, PPC and Zynq hw designs. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@ti.com>
2013-04-30microblaze: Disable all cpu features before resetMichal Simek
Fix microblaze soft reset function and disable all cpu features. Especially disable caches because IRQs were off by disable_interrupts(). Reported-by: John Williams <john.williams@xilinx.com> Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2013-04-30microblaze: Fix reset functionMichal Simek
Remove CONFIG_SYS_RESET_ADDRESS macro. It was there from historical point of view when soft reset was just jump to u-boot text start (not used right now). Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2013-02-04microblaze: Remove FSL support from generic boardMichal Simek
This code was targetting one specific Microblaze platform configuration which is obsolete and fsl bus isn't used in this way. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2012-09-11microblaze: Clean microblaze initializationMichal Simek
Move board specific function to board_init function in board/ folder Remove externs from generic board.c Use board_init_f function in board.c file. Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephan Linz <linz@li-pro.net>
2012-07-10microblaze: Wire up dts configurationStephan Linz
- enable OF control and embedded OF - set default device tree file name to 'microblaze' - add CPP to dtc proxy: board/xilinx/dts/microblaze.dts - add an empty but processable dts for microblaze-generic Signed-off-by: Stephan Linz <linz@li-pro.net>
2012-07-09microblaze: Move individual board linker scripts to common script in cpu tree.Michal Simek
Unification for all microblaze boards. Signed-off-by: Michal Simek <monstr@monstr.eu>
2012-04-04microblaze: Wire up LL_TEMAC driver initializationStephan Linz
Initialize ll_temac driver. Reported-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Stephan Linz <linz@li-pro.net>
2012-04-04microblaze: Add faked LL_TEMAC driver configurationStephan Linz
Expand the specific configuration for the microblaze-generic board in xparameters.h with a faked setup to enable the LL_TEMAC driver. Note: From now the microblaze-generic board is no longer a valid board configuration for a real piece of hardware. Rather than, we use the file config.mk and xparameters.h as a faked board configuration to force the compilation of all potential driver code for Microblaze systems. Signed-off-by: Stephan Linz <linz@li-pro.net>
2011-10-24microblaze: Wire up axi_ethernet driver initializationMichal Simek
Initialize axi_ethernet driver. Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-10-23net: emaclite: Move RX/TX ping pong initialization toMichal Simek
Init RX/TX ping pong directly from board not in the driver. Signed-off-by: Michal Simek <monstr@monstr.eu>