Re: [PATCH] Watchdog: sp5100_tco: Replace watchdog cd6h/cd7h port I/O accesses with MMIO accesses
From: Robert Richter
Date: Mon Sep 06 2021 - 08:06:03 EST
On 13.08.21 15:37:30, Guenter Roeck wrote:
> I am sorry, I don't understand why the new code can not use devm functions,
devm was not chosen here as the iomem is only used during
initialization. The resource is released at the end of it. Using devm
would keep it open and carry it around including its data until the
device is released which we wanted to avoid. This would also add
unnecessary data to struct sp5100_tco and/or the device's data.
> why the new data structure is necessary in the first place,
Instead we used struct efch_cfg to carry all that temporary data
required during initialization. This is destroyed at the end of
> and why it is
> not possible to improve alignment with the existing code.
The driver serves 3 to 4 platforms now. To refactor it a core driver
is needed plus sub-drivers for each platform. We decided not to change
existing code here for older platforms and keep it as it is for them.
Moreover, the efch driver only needs changes to its initialization
code (using mmio instead of ioports), everything else remains the
> This will require
> a substantial amount of time to review to ensure that the changes are not
> excessive (at first glance it for sure looks like that to me).
This patch implements mostly helper functions and adds alternative
code paths for the mmio case. For an easier review we could split the
patch in about 3-4 patches, would that help?