Re: [PATCH 3/3] watchdog: bcm7038_wdt: support BCM4908 SoC
From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2021-10-28 16:29:51
Also in:
linux-arm-kernel, linux-mips, linux-watchdog
From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2021-10-28 16:29:51
Also in:
linux-arm-kernel, linux-mips, linux-watchdog
On 10/28/21 2:30 AM, Rafał Miłecki wrote:
From: Rafał Miłecki <rafal@milecki.pl> Hardware supported by this driver goes back to the old bcm63xx days. It was then reused in BCM7038 and later also in BCM4908. Depending on SoC model registers layout differs a bit. This commit introduces support for per-chipset registers offsets & adds BCM4908 layout. Later on BCM63xx SoCs support should be added too (probably as platform devices due to missing DT). Eventually this driver should replace bcm63xx_wdt.c. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> ---
[snip]
+
+static const u16 bcm7038_wdt_regs_bcm4908[] = {
+ [BCM63XX_WDT_REG_DEFVAL] = 0x28,
+ [BCM63XX_WDT_REG_CTL] = 0x2c,
+ [BCM63XX_WDT_REG_SOFTRESET] = 0x34,I don't understand what you are doing here and why you are not offsetting the "reg" property appropriately when you create your bcm4908-wdt Device Tree node such that the base starts at 0, and the existing driver becomes usable as-is. This does not make any sense to me when it is obviously the simplest way to make the driver "accept" the resource being passed. I am going to send my patch series converting the bcm63xx_wdt.c driver over to bcm7038_wdt.c, feel free to use or discard it. -- Florian