summaryrefslogtreecommitdiff
path: root/board
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.denx.de/u-boot-marvellTom Rini2019-05-032-167/+185
|\ | | | | | | | | - Fix in kwbimage (return code checking) (Young Xiao) - Misc updates to Turris Omnia (Marek)
| * arm: mvebu: turris_omnia: add RESET button handlingMarek Behún2019-05-031-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a Factory RESET button on the back side of the Turris Omnia router. When user presses this button before powering the device up and keeps it pressed, the microcontroller prevents the main CPU from booting and counts how long the RESET button is being pressed (and indicates this by lighting up front LEDs). The idea behind this is that the user can boot the device into several Factory RESET modes. This patch adds support for U-Boot to read into which Factory RESET mode the user booted the device. The value is an integer stored into the omnia_reset environment variable. It is 0 if the button was not pressed at all during power up, otherwise it is the number identifying the Factory RESET mode. This patch also changes bootcmd to a special hardcoded value if Factory RESET button was pressed during device powerup. This special bootcmd value sets the colors of all the LEDs on the front panel to green and then tries to load the rescue image from the SPI flash memory and boot it. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
| * arm: mvebu: turris_omnia: fix regdomain env var settingMarek Behún2019-05-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | The regdomain environment variable is set according to value read from EEPROM. This has to be done in board_late_init, after the environment variables are read from SPI. Select CONFIG_BOARD_LATE_INIT in Kconfig for the Turris Omnia target. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
| * arm: mvebu: turris_*: remove watchdog includeMarek Behún2019-05-032-8/+0
| | | | | | | | | | | | | | | | | | Since board watchdog is now unified and not handled in board files, remove the unnecessary includes. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
| * arm: mvebu: turris_omnia: print board info as Turris MoxMarek Behún2019-05-031-3/+5
| | | | | | | | | | | | | | | | | | Unify the way how Omnia and Mox print board information (RAM size and serial number). Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
| * arm: mvebu: turris_omnia: refactor more codeMarek Behún2019-05-031-30/+28
| | | | | | | | | | | | | | | | Refactor RAM size reading from EEPROM in preparation for next patch. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
| * arm: mvebu: turris_omnia: move ATSHA204A from defconfig to KconfigMarek Behún2019-05-031-11/+0
| | | | | | | | | | | | | | | | | | This driver is required for Turris Omnia to read ethernet addresses. Move the dependency from turris_omnia_defconfig to Kconfig. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
| * arm: mvebu: turris_omnia: fix checkpatch warningsMarek Behún2019-05-031-8/+8
| | | | | | | | | | | | Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
| * arm: mvebu: turris_omnia: refactor I2C accessing codeMarek Behún2019-05-031-96/+109
| | | | | | | | | | | | | | | | Refactor code which accesses the microcontroller and EEPROM via I2C. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
| * arm: mvebu: turris_omnia: remove redundant codeMarek Behún2019-05-031-13/+0
| | | | | | | | | | | | | | | | | | The i2c slave disabling is done by mvtwsi driver and is not needed here. Signed-off-by: Marek Behún <marek.behun@nic.cz> Acked-by: Heiko Schocher <hs@denx.de> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
* | Merge branch '2019-05-03-master-imports'Tom Rini2019-05-033-32/+18
|\ \ | | | | | | | | | | | | | | | - Various btrfs fixes - Various TI platform fixes - Other fixes (cross build, taurus update, Kconfig help text)
| * | at91: cleanup taurus portHeiko Schocher2019-05-032-31/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | - at91sam9g20-taurus.dts: use labels - cleanup taurus port to compile clean with current mainline again. SPL has no serial output anymore, so it fits into SRAM. Signed-off-by: Heiko Schocher <hs@denx.de>
| * | board: am335x: Drop duplicate pinmux configurationPaul Barker2019-05-031-1/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | In commit ad6054f1fe128f797b6eb2964afca6674b584785 where support for the Sancloud BeagleBone Enhanced (BBE) was added, new conditional configuration of either MII pin muxing or RGMII pin muxing is done depending on the board type. However, the old call to set up MII pin muxing was not removed. This may result in misconfiguration of the pin muxing for the BBE or duplicate configuration for other boards and so we remove this obsolete call. Signed-off-by: Paul Barker <paul.barker@sancloud.co.uk>
* | Merge tag 'rockchip-for-2019.07' of git://git.denx.de/u-boot-rockchipTom Rini2019-05-0111-21/+28
|\ \ | |/ |/| | | | | | | | | | | | | | | Improvements and new features: - improved SPI driver for better read throughput - refactors initialisation of debug UART init - restructures header file paths - adds pinctrl improvements Adds Kever as a co-custodian.
| * rockchip: use 'arch-rockchip' as header file pathKever Yang2019-05-0110-21/+21
| | | | | | | | | | | | | | | | Rockchip use 'arch-rockchip' instead of arch-$(SOC) as common header file path, so that we can get the correct path directly. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * rockchip: rk3399: Add Orangepi RK3399 supportJagan Teki2019-05-011-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add initial support for Orangepi RK3399 board. Specification - Rockchip RK3399 - 2GB/4GB DDR3 - 16GB eMMC - SD card slot - RTL8211E 1Gbps - AP6356S WiFI/BT - HDMI In/Out, DP, MIPI DSI/CSI - Mini PCIe - Sensors, Keys etc - DC12V-2A and DC5V-2A Commit details about Linux DTS sync: "arm64: dts: rockchip: Add support for the Orange Pi RK3399" (sha1: d3e71487a790979057c0fdbf32f85033639c16e6) Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* | Merge tag 'u-boot-imx-20190426' of git://git.denx.de/u-boot-imxTom Rini2019-05-0124-380/+1047
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | Porting to DM and i.MX8 ------------------------ - warp7 to DM - kp_imx53 to DM - Warnings in DT - MX8QM support - colibri-imx6ull to DM - imx7d-pico to DM - ocotp for MX8
| * warp7: Switch to DM USBPierre-Jean Texier2019-04-251-6/+0
| | | | | | | | | | | | | | | | This commit switches to DM USB for warp7 and warp7_bl33 defconfigs. Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io> Signed-off-by: Joris Offouga <offougajoris@gmail.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
| * imx: Add variscite DART-6UL Evaluation KitParthiban Nallathambi2019-04-256-0/+508
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port for the DART-6UL Evaluation Kit SBC. Based on the variscite DART-6UL iMX6ULL SoM. CPU: Freescale i.MX6ULL rev1.1 900 MHz (running at 396 MHz) CPU: Commercial temperature grade (0C to 95C) at 43C Reset cause: POR Model: Variscite DART-6UL Evaluation Kit Board: Variscite DART-6UL Evaluation Kit DRAM: 512 MiB MMC: FSL_SDHC: 0, FSL_SDHC: 1 In: serial@02020000 Out: serial@02020000 Err: serial@02020000 Net: FEC0 Working: - Eth0 - i2c - MMC/SD - eMMC - USB host - UART 1 Note: LCDIF porting needs DM_VIDEO https://lists.denx.de/pipermail/u-boot/2019-April/365506.html Signed-off-by: Parthiban Nallathambi <parthitce@gmail.com>
| * ARM: imx6: DHCOM i.MX6 PDK: use Kconfig for inclusion of DDR calibrationLudwig Zenz2019-04-251-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | The four x16 DDR3 are wired in T-topology. From NXP AN4467: 'Although not required, T-Topologies may also benefit from performing Write Leveling as there are package delays on both the processor and DDR devices that can be de-skewed by performing Write Leveling. Therefore, Freescale recommends determining Write Leveling calibration parameters for all boards, regardless of topology used.' That is why write level calibration is also done. Signed-off-by: Ludwig Zenz <lzenz@dh-electronics.com>
| * ARM: imx6: update 1GB DDR3 calibration for DHCOM i.MX6qd PDKLudwig Zenz2019-04-251-12/+12
| | | | | | | | | | | | | | | | | | | | The existing calibration values were found to be incorrect in comparison to newly determined values. The new values were generated with the help of 5 boards. They have been determined with the NXP Utility 'DDR Stress Test (2.9.0)'. Signed-off-by: Ludwig Zenz <lzenz@dh-electronics.com>
| * imx8qxp_mek: drop warning due to unused variableStefano Babic2019-04-251-1/+0
| | | | | | | | Signed-off-by: Stefano Babic <sbabic@denx.de>
| * pico-imx7d: Convert DM MMCJoris Offouga2019-04-252-38/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enable convert DM MMC for imx7d-pico board and variant. Before the DM conversion only usdhc3 was enabled and therefore it appeared as MMC 0 to u-boot. After enabling MMC DM though usdhc3 defaults to MMC 2, which left unattended would drive changes to existing pico-pi bootscripts and environment variables that rely on mmc 0. Setup the alias of mmc0 and usdhc3 so that existing pico-imx7d boot code will work unmodified. When converting to DM_MMC it is necessary that SPL initializes eMMC by itself, so move the original eMMC initialization from U-Boot proper to SPL. Signed-off-by: Joris Offouga <offougajoris@gmail.com> Signed-off-by: Fabio Estevam <festevam@gmail.com>
| * board: toradex: tdx-cfg-block: add new skusMarcel Ziswiler2019-04-252-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add all the latest new SKUs: - Apalis iMX8 QuadXPlus 2GB Wi-Fi / BT IT - Apalis iMX8 QuadMax 4GB IT - Apalis iMX8 QuadPlus 2GB Wi-Fi / BT - Apalis iMX8 QuadPlus 2GB", - Colibri iMX8 QuadXPlus 2GB IT - Colibri iMX8 DualX 1GB Wi-Fi / Bluetooth - Colibri iMX8 DualX 1GB Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
| * pico-imx7d: defconfig Enable DM gpio pinctrl and pinctrl_imx7Joris Offouga2019-04-251-1/+3
| | | | | | | | | | | | | | | | | | This patch is necessary for convert this board to dm driver model DM GPIO requires gpio_request() to be called explicitly before doing any gpio operation Signed-off-by: Joris Offouga <offougajoris@gmail.com>
| * board: toradex: tdx-cfg-block: clean-up sku handlingMarcel Ziswiler2019-04-252-14/+20
| | | | | | | | | | | | | | Clean-up handling of several SKUs. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
| * colibri-imx6ull: migrate usb to using driver modelMarcel Ziswiler2019-04-251-48/+0
| | | | | | | | | | | | | | | | | | Migrate USB to using driver model. Add USBH_PEN GPIO regulator. While at it also add alias e.g. as required for UMS. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
| * colibri-imx6ull: migrate mmc to using driver modelMarcel Ziswiler2019-04-251-70/+0
| | | | | | | | | | | | | | | | | | | | Migrate MMC to using driver model. Migrate USDHC to using pinctrl. While at it also add GPIO1_IO03__OSC32K_32K_OUT pin muxing. While at it also update copyright period. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
| * colibri-imx6ull: migrate pinctrl and regulators to dtb/dmMarcel Ziswiler2019-04-251-76/+6
| | | | | | | | | | | | | | | | | | | | | | Migrate pinctrl and regulators to device tree resp. driver model: Ethernet, NAND and UART. Drop BOARD_EARLY_INIT_F as it is anyway no longer used. Enable CMD_DM, CMD_MTD, CMD_REGULATOR and DM_REGULATOR_FIXED. While at it also update copyright period. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
| * board: imx6ull: Add disable PMIC_STBY_REQPhilippe Schenker2019-04-251-0/+10
| | | | | | | | | | | | | | | | | | | | | | Disable output driver of PAD CCM_PMIC_STBY_REQ. This prevents the SOC to request for a lower voltage during sleep. This is necessary because the voltage is changing too slow for the SOC to wake up properly. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
| * colibri-imx6ull: fix ethernet phy power onMarcel Ziswiler2019-04-251-0/+3
| | | | | | | | | | | | | | | | Just give the new Ethernet PHY power save mode circuitry time to settle. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
| * colibri-imx6ull: set module variant depending on config blockStefan Agner2019-04-251-3/+9
| | | | | | | | | | | | | | | | | | | | | | Using CPU temperature grading as a discriminator if the Wi-Fi / Bluetooth chip is populated is no longer possible due to upcoming SKUs. Set variant to -wifi only if a valid config block is present and the product id mentions a SKU with Wi-Fi / Bluetooth. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
| * tdx-cfg-block: simplify i.MX 6 module detectionStefan Agner2019-04-251-34/+34
| | | | | | | | | | | | | | | | | | | | | | Use CONFIG_TARGET_... at compile time to differentiate between Apalis iMX6, Colibri iMX6 and Colibri iMX6ULL. Avoid code duplication by moving question about Wi-Fi / Bluetooth before IT/non-IT decision. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
| * tdx-cfg-block: add support for new colibri iMX6ull skusGerard Salvatella2019-04-252-15/+50
| | | | | | | | | | | | | | | | | | | | Add support for new Colibri iMX6ULL SKUs. While at it also checkpatch fix the whole files. Signed-off-by: Gerard Salvatella <gerard.salvatella@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
| * colibri_vf: fix tab vs. spacesMarcel Ziswiler2019-04-251-1/+1
| | | | | | | | | | | | | | Fix indentation using tab vs. spaces. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
| * imx: support i.MX8QM MEK boardPeng Fan2019-04-257-0/+336
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add i.MX8QM MEK board support. Included a basic dts, enabled SPL FIT Boot log as below: U-Boot SPL 2019.01-rc1-00029-gf002213219 (Dec 24 2018 - 10:28:30 +0800) Normal Boot Trying to boot from MMC2_2 U-Boot 2019.01-rc1-00029-gf002213219 (Dec 24 2018 - 10:28:30 +0800) CPU: NXP i.MX8QM RevB A53 at 142933 MHz Model: Freescale i.MX8QM MEK Board: iMX8QM MEK Build: SCFW 9330215b Boot: SD1 DRAM: 6 GiB MMC: FSL_SDHC: 0, FSL_SDHC: 1 Loading Environment from MMC... *** Warning - bad CRC, using default environment In: serial@5a060000 Out: serial@5a060000 Err: serial@5a060000 Net: Error: ethernet@5b040000 address not set. eth-1: ethernet@5b040000 Hit any key to stop autoboot: 0 Signed-off-by: Peng Fan <peng.fan@nxp.com>
| * boot.src: Provide dsa_core.blacklist bootarg when booting via NFSLukasz Majewski2019-04-251-0/+7
| | | | | | | | | | | | | | | | | | | | | | This setup is a bit special as Linux kernel (4.19) is not supporting in-kernel NFS rootfs mount and Distributed Switch Architecture (DSA) operation. For that reason it was necessary to provide a bootarg to allow userspace enable it afterwards if needed. Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * ARM: Remove EHCI specific code from HSC|DDC board fileLukasz Majewski2019-04-251-10/+0
| | | | | | | | | | | | | | As EHCI on i.MX5 has been converted to driver model, the board specific code, necessary for VBUS USB power supply setup is not needed anymore. Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * ARM: Remove non DM/DTS esdhc3 code from HSC|DDC board related filesLukasz Majewski2019-04-251-46/+0
| | | | | | | | | | | | | | After switching to DM/DTS support of esdhc3 - the code in this patch can be removed. Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * ARM: Remove HSC|DDC ETH PHY reset code after switching to DM/DTSLukasz Majewski2019-04-251-14/+0
| | | | | | | | | | | | | | After commit efd0b791069a ("eth: dm: fec: Add gpio phy reset binding") the in-board file definition of ETH PHY reset can be removed. Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * imx8qxp: mek: enable dm-spl for pmPeng Fan2019-04-251-15/+0
| | | | | | | | | | | | | | | | | | with u-boot,dm-spl added for imx8qx-pm node, and SPL_SIMPLE_BUS enabled, the bind and probe code in board file could be removed. Also we need to enlarge SYS_MALLOC_F_LEN to avoid calloc fail. Signed-off-by: Peng Fan <peng.fan@nxp.com>
* | board/BuR/brxre1: use common resetcontroller implementationHannes Schmelzer2019-04-262-142/+18
| | | | | | | | | | | | | | The handling of regarding bootmode and early setup has been moved to central location 'common/br_resetc.c', so use this on brxre1 board. Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
* | board/BuR/brxre1: cosmetic cleanupHannes Schmelzer2019-04-261-9/+8
| | | | | | | | | | | | | | - fixup coding style - drop unused 'PUSH_KEY' define Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
* | board/BuR/common: add br resetcontoller implementationHannes Schmelzer2019-04-262-0/+260
| | | | | | | | | | | | | | | | | | | | | | On many B&R boards we have a reset-controller, responsible for very early board-bringup (voltages, clocks, ...) and bootmode selection. To be ready for adding more B&R boards to source tree while avoiding duplicate code, we add the resetcontroller implementation to the common part of B&R boards. Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
* | board/BuR/common: add 'brdefaulip_setup' functionHannes Schmelzer2019-04-262-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many B&R boards are equipped with an I2C-EEPROM where various information can be stored. Today there is only a single byte for 'board_id' used. We write this 'board_id' into environment for later use during boot. If the value != 0xFF, meaning the byte is programmed, we modify the "brdefaultip" environment variable for setting an IP-Address based on board_id. Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
* | board/BuR/common: cosmetic: move 'overwrite_console' up to more related stuffHannes Schmelzer2019-04-261-4/+5
| | | | | | | | Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
* | board/BuR/common: prepare for compiling common into non AM33XX boardsHannes Schmelzer2019-04-261-16/+14
| | | | | | | | | | | | | | | | | | Today the BuR common stuff is only used on AM33XX boards. In future we plan to have many other platforms than AM33XX so we have to move arch- specific #include(s) to responsible #ifdef sections. By the way we drop unneeded #include(s). Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
* | Merge git://git.denx.de/u-boot-marvellTom Rini2019-04-2614-222/+189
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add DM based generic watchdog start and reset implementation and remove all ad-hoc implementations (Stefan) - Move mv_sdhci to DM (Pierre) - Misc turris_omnia updates (Pierre) - Change openrd targets to correctly build again (size changes and fixes to the dts targets) and bring it back into Travis builds (Stefan) - Add Kirkwood db-88f6281-bp board (Chris)
| * | arm: kirkwood: openrd: Mark openrd boards as maintained againStefan Roese2019-04-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the latest size increase of the openrd boards, they all compile clean again. Let's mark them as maintained again and add the Travis job. Please note that I can only compile-test these targets as I don't have access to one of those boards. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Albert ARIBAUD <albert-u-boot@aribaud.net> Cc: Vagrant Cascadian <vagrant@debian.org> Cc: Chris Packham <judge.packham@gmail.com> Cc: Tom Rini <trini@konsulko.com>
| * | watchdog: Implement generic watchdog_reset() versionStefan Roese2019-04-266-218/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)