]> git.baikalelectronics.ru Git - kernel.git/commit
Watchdog: sp5100_tco: Refactor MMIO base address initialization
authorTerry Bowman <terry.bowman@amd.com>
Wed, 2 Feb 2022 15:35:23 +0000 (09:35 -0600)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sun, 27 Mar 2022 15:04:32 +0000 (17:04 +0200)
commita93c1670049ad66e095e59eb63f55b1b58f8746c
treea259bd0506d419869dd0d64477099c2353339da6
parent4f3bbe8facd3e6d001043b19f85c6a98a38113e0
Watchdog: sp5100_tco: Refactor MMIO base address initialization

Combine MMIO base address and alternate base address detection. Combine
based on layout type. This will simplify the function by eliminating
a switch case.

Move existing request/release code into functions. This currently only
supports port I/O request/release. The move into a separate function
will make it ready for adding MMIO region support.

Co-developed-by: Robert Richter <rrichter@amd.com>
Signed-off-by: Robert Richter <rrichter@amd.com>
Signed-off-by: Terry Bowman <terry.bowman@amd.com>
Tested-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220202153525.1693378-3-terry.bowman@amd.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/sp5100_tco.c
drivers/watchdog/sp5100_tco.h