summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
Commit message (Collapse)AuthorAgeFilesLines
* efi: payload: rename CONFIG_EFI_BOOTUP to CONFIG_EFI_PAYLOADAhmad Fatoum2024-03-051-1/+1
| | | | | | | | | | The symbol is internal, so we don't break anything by renaming it. CONFIG_EFI_PAYLOAD is clearer in intent, as BOOTUP doesn't clearly indificate whether barebox would act as EFI payload or as EFI loader. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240304190038.3486881-9-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: restart handler: hang when watchdog cannot restart the machineSascha Hauer2024-02-081-1/+3
| | | | | | | | | | | The __builtin_unreachable() in watchdog_restart_handle() is bogus, because when the watchdog doesn't work we will run into __builtin_unreachable() and behaviour is undefined. Drop the call to __builtin_unreachable(), print a big fat warning and hang() the machine which makes sure we don't return from watchdog_restart_handle(). Link: https://lore.barebox.org/20240205115226.2432028-1-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: imxulp: Fix prescaler setting on i.MX7ulpSascha Hauer2024-01-161-5/+12
| | | | | | | | | | | On i.MX7ulp the driver assumes a clock tick rate of 1kHz. This is only true though when the /256 prescaler is disabled. To fix this we disable the prescaler on i.MX7ulp while keeping it enabled on i.MX93. We derived this bug from U-Boot, the Kernel does this correctly and has the same code as we introduce here now. Link: https://lore.barebox.org/20240115155615.953954-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: imxulp: Fix timeout calculationSascha Hauer2024-01-161-1/+1
| | | | | | | | | On i.MX93 the 32k clock runs at 32768Hz. Together with the /256 prescaler the watchdog timer advances 32768/256 = 128 ticks per second, not 125. Link: https://lore.barebox.org/20240115155615.953954-1-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: Add ULP wdog supportSascha Hauer2023-11-173-0/+168
| | | | | Link: https://lore.barebox.org/20231110125800.1901232-11-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: switch regmap.h include to linux/regmap.hAhmad Fatoum2023-10-261-1/+1
| | | | | | | | | | | | | | | Now that there are no longer any users of regmap.h in headers, let's switch all users in the source files to linux/regmap.h. That way, the only users of regmap.h whether directly or indirectly will be out-of-tree code, which will fail with an error if they are dependent on the old semantics of regmap_bulk_read and regmap_bulk_write. After a transitory period, we can then drop regmap.h. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20231020071853.2826528-12-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: syscon: do not include regmap.h from mfd/syscon.hAhmad Fatoum2023-10-231-0/+1
| | | | | | | | | | mfd/syscon.h include regmap.h when a struct regmap forward declaration would've sufficed. Let's forward declare and fix users of the header to directly include linux/regmap.h where needed. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20231020071853.2826528-6-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: add Cadence watchdog support for Xilinx SoCsAhmad Fatoum2023-09-143-0/+285
| | | | | | | | | | | | | This adds support for the Cadence watchdog IP available in Zynq-7000 and ZynqMP SoCs. The driver has been ported from Linux v6.4 and tested on the ZynqMP. Keep in mind that changes to the XSA may be necessary for the watchdog to actually be able to reset the system. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230913120807.1869600-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gpio: have gpiod_ functions return and accept pointersAhmad Fatoum2023-06-231-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | The gpiod_ (GPIO descriptor) API used with Linux differs from barebox' normal GPIO API: - gpiod handles are opaque pointers and not an integer, which users have an expectation of stability for - gpiod API uses logic levels by default with separate raw API for physical level instead of physical level by default and separate API taking active level into account. The barebox gpiod_ API mimics the latter point, but still uses integers requiring ugly and arguably error prone conversions when porting kernel code. Let's improve upon that by just encoding the integer into a pointer variable for API compatibility. Later commits will switch barebox GPIO support to use actual GPIO descriptors without consulting the numeric indices, but we do this temporary switch here, so we can split up provider and consumer changes. Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230622072329.1339317-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: imx28: use correct constant for computing timeout_maxAhmad Fatoum2023-06-131-1/+1
| | | | | | | | | | | timeout_max is a 32-bit variable, so storing ULONG_MAX / WDOG_TICK_RATE into it causes a wrap around on 64-bit systems. As the SoC is a 32-bit one, it's likely the original intention was for it to be U32_MAX instead. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230612130239.1087599-18-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: add MODULE_DEVICE_TABLE markersAhmad Fatoum2023-06-1317-0/+17
| | | | | | | | | | | | | | | | Syncing device trees with Linux upstream can lead to breakage, when the device trees are switched to newer bindings, which are not yet supported in barebox. To make it easier to spot such issues, we want to start applying some heuristics to flag possibly problematic DT changes. One step towards being able to do that is to know what nodes barebox actually consumes. Most of the nodes have a compatible entry, which is matched by an array of of_device_id, so let's have MODULE_DEVICE_TABLE point at it for future extraction. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230612125908.1087340-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: Move mach header files to include/mach/at91Sascha Hauer2023-03-061-1/+1
| | | | | | | | | | Currently arch specific headers can be included with longer possible as there won't be a single mach anymore. Move all at91 specific header files to include/mach/at91/ to prepare for multi-arch support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename struct driver_d to driverSascha Hauer2023-01-1019-19/+19
| | | | | | | | | | | The '_d' suffix was originally meant to distinguish barebox struct names from Linux struct names. struct driver doesn't exist in Linux, so we can rename it and remove the meaningless suffix. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-4-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename struct device_d to deviceSascha Hauer2023-01-1021-28/+28
| | | | | | | | | | | | | The '_d' suffix was originally introduced in case we want to import Linux struct device as a separate struct into barebox. Over time it became clear that this won't happen, instead barebox struct device_d is basically the same as Linux struct device. Rename the struct name accordingly to make porting Linux code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename device_d::device_node to device_d::of_nodeSascha Hauer2023-01-104-8/+8
| | | | | | | | | | | | | | | | | | | | Linux struct device has the member of_node for the device_node pointer. Rename this in barebox accordingly to minimize the necessary changes when porting Linux code. This was done with the semantic patch: @@ struct device_d E; @@ - E.device_node + E.of_node @@ struct device_d *E; @@ - E->device_node + E->of_node Plus some manual adjustments. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: imxwd: set imxwd-warm as reboot mode default handlerAhmad Fatoum2022-10-271-0/+1
| | | | | | | | | | | | | Set RESTART_FLAG_WARM_BOOTROM for imxwd-warm, so reset -w directly selects this handler. i.MX6QDL/8MM Users now can just do gpr.reboot_mode.next=serial reset -w and it should behave as expected. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20221017071000.1458292-6-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: imxwd: don't register broken imxwd-warm for i.MX7Ahmad Fatoum2022-10-271-7/+23
| | | | | | | | | | | | Due to erratum e10574 "Watchdog: A watchdog timeout or software trigger will not reset the SOC", any use of the watchdog reset must trigger an external PMIC or reset circuit. Registering imxwd-warm thus serves no purpose, so don't register it for i.MX7. We'll need an alternative for reboot mode, which will follow in a later commit. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20221017071000.1458292-5-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: imxwd: Add error messages for some failure points in .probe()Uwe Kleine-König2022-06-301-3/+5
| | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220629085628.106086-2-u.kleine-koenig@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: imxwd: Convert error messages in .probe to dev_err_probe()Uwe Kleine-König2022-06-301-5/+5
| | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220629085628.106086-1-u.kleine-koenig@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: rpi: parse useful data from vc fdtDaniel Brát2022-06-271-22/+1
| | | | | | | | | | | | | | Videocore first-stage loader on rpi passes us many useful information inside the vc fdt, including the real value of PM_RSTS register, not easily available by other means and which we can use to determine the reset cause. Also make the relevant funtions just print error/warning and continue in case of some errors, since the fdt from vc is now optional for barebox's basic function. Signed-off-by: Daniel Brát <danek.brat@gmail.com> Link: https://lore.barebox.org/20220617215811.5687-1-danek.brat@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: wdat: fix mixed spaces/tabs in alignmentAhmad Fatoum2022-03-081-18/+18
| | | | | | | | | Many struct members have a space followed by tabs for alignments. Drop the space. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Link: https://lore.barebox.org/20220302200934.657994-1-ahmad@a3f.at Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/stm32'Sascha Hauer2022-02-181-1/+1
|\
| * ARM: stm32mp: allow driver reuse for STM32 MCUsAhmad Fatoum2022-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | Most peripheral driver are usable for both STM32 MPUs and MCUs, but so far we they were only used for STM32MP1. In preparation for adding MCU support, introduce a new ARCH_STM32 selected by ARCH_STM32MP and migrate common drivers to it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220131075725.1873026-12-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Add Ricoh RN5T568 PMIC based watchdogJuergen Borleis2022-01-203-0/+153
|/ | | | | Link: https://lore.barebox.org/20220118082122.73204-2-jbe@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2022-01-194-0/+511
|\
| * watchdog: imxwd: suspend watchdog timer in low power modeAndrej Picej2022-01-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Watchdog timer should be disabled in low power mode. The problem that was observed was that when the watchdog is started from barebox, kernel driver doesn't do its own setup again and in turn this bit is left unset. Moreover, this bit is write-once and has to be set before enabling the watchdog, leaving responsibility for proper setup to a party first using the watchdog timer (e.g. bootloader). Issue manifests itself later on, when device enters low power mode (e.g. suspend) for more amount of time than what is maximum watchdog timeout (128s). After that period of time, device will not recover ever as there is no service patting the watchdog (CPU is suspended). This means that the device can hang in suspend mode or it performs an unexpected reset. Thus to avoid suspend/resume problems when watchdog is started already in the bootloader, align bootloader driver settings with kernel settings. Kernel driver has been already setting this bit since 2014. Signed-off-by: Andrej Picej <andrej.picej@norik.com> Link: https://lore.barebox.org/20211216122653.2335949-1-andrej.picej@norik.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * watchdog: add support for wdat_wdtSteffen Trumtrar2022-01-103-0/+507
| | | | | | | | | | | | | | | | | | Add support for systems with the ACPI Watchdog Action Table (wdat). Based on Linux v5.15-rc1 drivers/watchdog/wdat_wdt.c Signed-off-by: Steffen Trumtrar <str@pengutronix.de> Link: https://lore.barebox.org/20220107134219.1031552-2-s.trumtrar@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | watchdog: kvx: do not disable watchdog on probeLouis Morhet2022-01-181-3/+1
|/ | | | | | | | | | | | | | | | | As the watchdog may be set by a lower stage in the boot chain, and for a good reason (precisely to ensure reliable update when something unexpected happens during the boot chain), it is a bad idea to always disable it during probe. We should either have a mechanism to refresh it on a regular basis in barebox itself and set it to something bigger for Linux, or handle it transparently and let the previous stage set the global watchdog up to Linux. This patch assumes for now the latter. Signed-off-by: Louis Morhet <lmorhet@kalray.eu> Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Link: https://lore.barebox.org/20220117221917.26970-8-jmaselbas@kalray.eu Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2021-12-158-8/+8
|\
| * drivers: migrate "GPL-2.0+" license identifiers to SPDX 2.0Roland Hieber2021-11-221-1/+1
| | | | | | | | | | | | | | | | | | "GPL-2.0-or-later" was introduced in SPDX 2.0, and the old identifier "GPL-2.0+" is now deprecated; see <https://spdx.org/licenses>. Signed-off-by: Roland Hieber <rhi@pengutronix.de> Link: https://lore.barebox.org/20211117113851.2022669-3-rhi@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * drivers: migrate "GPL-2.0" license identifiers to SPDX 2.0Roland Hieber2021-11-227-7/+7
| | | | | | | | | | | | | | | | | | | | "GPL-2.0-only" was introduced in SPDX 2.0, and the old identifier "GPL-2.0" is now considered deprecated; see <https://spdx.org/licenses>. Fixes: 28f4a6a4df76f0f1581d (2021-10-30, "drivers: add missing SPDX-License-Identifier") Signed-off-by: Roland Hieber <rhi@pengutronix.de> Link: https://lore.barebox.org/20211117113851.2022669-2-rhi@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | efi: rename <efi/efi.h> to <efi/efi-payload.h>Ahmad Fatoum2021-11-251-1/+1
|/ | | | | | | | | | | The split between <efi.h> and <efi/efi.h> is confusing: The former contains universal definitions, while the latter contains barebox utilities on top. To make the distinction clear, rename <efi/efi.h> to <efi/efi-payload.h> as it's used for EFI payloads. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20211122084732.2597109-14-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/spdx'Sascha Hauer2021-11-1512-75/+14
|\
| * drivers: add missing SPDX-License-IdentifierAhmad Fatoum2021-11-0112-75/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the suitable SPDX-License-Identifier to all files in drivers/ that previously lacked one. To aid manual inspection, following heuristics can be used: * No changes outside of comments/whitespace: git show -U0 HEAD | rg -v '^(@@|diff|index)|[-+]([-+]|//|#|[\s/]\*)' * -or-later come in pairs: git show --inter-hunk-context=19 HEAD | \ perl -0777 -F'/^@/gm' -ne 'for (@F) { @m = /later/g; print if @m & 1 }' Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20211030175632.2276077-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | include: add dedicated header for printf/printkAhmad Fatoum2021-11-011-1/+1
|/ | | | | | | | | | | | Including <stdio.h> for printf is a bit problematic, because it pulls in other headers for <console.h>, which includes quite a few more headers as well. To make it easier to share code between barebox and host tools make <printk.h> the new minimal header for printf and move the extra logging stuff into <linux/printk.h>. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20211030141739.2207431-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: imxwd: register explicit warm reset handlerAhmad Fatoum2021-08-091-0/+16
| | | | | | | | | | | | | | With fsl,ext-reset-output and WDOG_B muxed correctly, the i.MX watchdog will toggle an external signal to effect a PMIC reset. That's good for normal use, but when exchanging information with the BootROM over GPRs, a warm reset is required. This is needed e.g. to set the reboot mode. Support this by defining a second, lower priority, reset that will never toggle external lines. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210803165937.31608-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: add StarFive watchdog driverAhmad Fatoum2021-06-243-0/+114
| | | | | | Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210619045055.779-25-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: dw_wdt: fix resource reservation error checkAhmad Fatoum2021-06-211-2/+3
| | | | | | | | | dev_request_mem_resource returns a possible error pointer. If it succeeds mem->start will always be valid. Rectify the confusion. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210621064719.19246-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/wdt'Sascha Hauer2021-06-161-4/+11
|\
| * watchdog: dw_wdt: denote message to debug levelSascha Hauer2021-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | dw_wdt may be unstoppable once started when no reset line is available. This behaviour is quite common for different watchdogs, it is not worth issuing a warning. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.barebox.org/20210610130613.27983-4-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * watchdog: dw_wdt: set maximum timeoutSascha Hauer2021-06-111-4/+5
| | | | | | | | | | | | | | | | Communicate the maximum possible timeout to the watchdog core. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.barebox.org/20210610130613.27983-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * watchdog: dw_wdt: Detect if running initiallySascha Hauer2021-06-111-0/+3
| | | | | | | | | | | | | | | | Let the watchdog core know if the watchdog is currently running or not. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.barebox.org/20210610130613.27983-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * watchdog: dw_wdt: Write counter restart registerSascha Hauer2021-06-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | At least some variants of the dwc watchdog controllers need the value 0x76 written to the counter restart register to actually take the value written to the Timeout range register. Happened on Rockchip RK3568, without this the watchdog immediately resets the system. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.barebox.org/20210610130613.27983-1-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | watchdog: add option to provide fall-back restart handlerAhmad Fatoum2021-06-091-0/+26
|/ | | | | | | | | | | Some barebox ports may have a watchdog, but no restart handler, e.g. reset happens via PMIC, which has no driver yet, but watchdog controls reset line going to PMIC. Accommodate such setups by allowing registration of watchdog as fall back restart handler. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210531071319.32459-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/x86'Sascha Hauer2021-05-173-0/+364
|\
| * watchdog: add support for Intel TCO watchdog timerAhmad Fatoum2021-05-033-0/+364
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Variants of the iTCO are integrated into many Intel southbridges. They are most often accessed via PCI. Add a driver for the variant found in the q35 QEMU machine. It should be straight forward to extend the itco_chipset_info array to support more variants in future as the need arises. To test, use: qemu-system-x86_64 -M q35 -global ICH9-LPC.noreboot=false The last option corresponds to a pin strap option, which can't be influenced from within the VM. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Link: https://lore.barebox.org/20210416062436.332665-5-ahmad@a3f.at Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | watchdog: imxwd: get and enable clockSteffen Trumtrar2021-05-031-0/+11
|/ | | | | | | | | This it (at least) necessary for i.MX7s or otherwise barebox will hang when trying to access the registers of WDOG2/3/4. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Link: https://lore.barebox.org/20210419123747.2373-1-s.trumtrar@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* watchdog: add GPIO watchdog driverAhmad Fatoum2021-04-133-0/+150
| | | | | | | This is a straight port from Linux v5.11. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Link: https://lore.pengutronix.de/20210410103511.2073504-5-ahmad@a3f.at
* Merge branch 'for-next/misc'Sascha Hauer2021-02-221-0/+29
|\
| * watchdog: Print seconds to expireSascha Hauer2021-02-161-0/+29
| | | | | | | | | | | | | | | | | | | | This adds a parameter to the watchdog devices that shows what we think when the watchdog expires. The watchdog should reset the system once the counter hits zero. When the system resets earlier or the counter shows negative values then there might be problems with the watchdog. Useful for debugging watchdog related problems. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>