forked from msm8974-mainline/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
watchdog: db8500_wdt: Rename symbols
For conistency and clarity, rename all symbols and strings from ux500 to db8500 in the driver. Cc: Lee Jones <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Acked-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
- Loading branch information
Showing
2 changed files
with
39 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,68 +35,68 @@ MODULE_PARM_DESC(nowayout, | |
"Watchdog cannot be stopped once started (default=" | ||
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | ||
|
||
static int ux500_wdt_start(struct watchdog_device *wdd) | ||
static int db8500_wdt_start(struct watchdog_device *wdd) | ||
{ | ||
return prcmu_enable_a9wdog(PRCMU_WDOG_ALL); | ||
} | ||
|
||
static int ux500_wdt_stop(struct watchdog_device *wdd) | ||
static int db8500_wdt_stop(struct watchdog_device *wdd) | ||
{ | ||
return prcmu_disable_a9wdog(PRCMU_WDOG_ALL); | ||
} | ||
|
||
static int ux500_wdt_keepalive(struct watchdog_device *wdd) | ||
static int db8500_wdt_keepalive(struct watchdog_device *wdd) | ||
{ | ||
return prcmu_kick_a9wdog(PRCMU_WDOG_ALL); | ||
} | ||
|
||
static int ux500_wdt_set_timeout(struct watchdog_device *wdd, | ||
static int db8500_wdt_set_timeout(struct watchdog_device *wdd, | ||
unsigned int timeout) | ||
{ | ||
ux500_wdt_stop(wdd); | ||
db8500_wdt_stop(wdd); | ||
prcmu_load_a9wdog(PRCMU_WDOG_ALL, timeout * 1000); | ||
ux500_wdt_start(wdd); | ||
db8500_wdt_start(wdd); | ||
|
||
return 0; | ||
} | ||
|
||
static const struct watchdog_info ux500_wdt_info = { | ||
static const struct watchdog_info db8500_wdt_info = { | ||
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE, | ||
.identity = "Ux500 WDT", | ||
.identity = "DB8500 WDT", | ||
.firmware_version = 1, | ||
}; | ||
|
||
static const struct watchdog_ops ux500_wdt_ops = { | ||
static const struct watchdog_ops db8500_wdt_ops = { | ||
.owner = THIS_MODULE, | ||
.start = ux500_wdt_start, | ||
.stop = ux500_wdt_stop, | ||
.ping = ux500_wdt_keepalive, | ||
.set_timeout = ux500_wdt_set_timeout, | ||
.start = db8500_wdt_start, | ||
.stop = db8500_wdt_stop, | ||
.ping = db8500_wdt_keepalive, | ||
.set_timeout = db8500_wdt_set_timeout, | ||
}; | ||
|
||
static struct watchdog_device ux500_wdt = { | ||
.info = &ux500_wdt_info, | ||
.ops = &ux500_wdt_ops, | ||
static struct watchdog_device db8500_wdt = { | ||
.info = &db8500_wdt_info, | ||
.ops = &db8500_wdt_ops, | ||
.min_timeout = WATCHDOG_MIN, | ||
.max_timeout = WATCHDOG_MAX28, | ||
}; | ||
|
||
static int ux500_wdt_probe(struct platform_device *pdev) | ||
static int db8500_wdt_probe(struct platform_device *pdev) | ||
{ | ||
struct device *dev = &pdev->dev; | ||
int ret; | ||
|
||
timeout = 600; /* Default to 10 minutes */ | ||
ux500_wdt.parent = dev; | ||
watchdog_set_nowayout(&ux500_wdt, nowayout); | ||
db8500_wdt.parent = dev; | ||
watchdog_set_nowayout(&db8500_wdt, nowayout); | ||
|
||
/* disable auto off on sleep */ | ||
prcmu_config_a9wdog(PRCMU_WDOG_CPU1, false); | ||
|
||
/* set HW initial value */ | ||
prcmu_load_a9wdog(PRCMU_WDOG_ALL, timeout * 1000); | ||
|
||
ret = devm_watchdog_register_device(dev, &ux500_wdt); | ||
ret = devm_watchdog_register_device(dev, &db8500_wdt); | ||
if (ret) | ||
return ret; | ||
|
||
|
@@ -106,47 +106,47 @@ static int ux500_wdt_probe(struct platform_device *pdev) | |
} | ||
|
||
#ifdef CONFIG_PM | ||
static int ux500_wdt_suspend(struct platform_device *pdev, | ||
static int db8500_wdt_suspend(struct platform_device *pdev, | ||
pm_message_t state) | ||
{ | ||
if (watchdog_active(&ux500_wdt)) { | ||
ux500_wdt_stop(&ux500_wdt); | ||
if (watchdog_active(&db8500_wdt)) { | ||
db8500_wdt_stop(&db8500_wdt); | ||
prcmu_config_a9wdog(PRCMU_WDOG_CPU1, true); | ||
|
||
prcmu_load_a9wdog(PRCMU_WDOG_ALL, timeout * 1000); | ||
ux500_wdt_start(&ux500_wdt); | ||
db8500_wdt_start(&db8500_wdt); | ||
} | ||
return 0; | ||
} | ||
|
||
static int ux500_wdt_resume(struct platform_device *pdev) | ||
static int db8500_wdt_resume(struct platform_device *pdev) | ||
{ | ||
if (watchdog_active(&ux500_wdt)) { | ||
ux500_wdt_stop(&ux500_wdt); | ||
if (watchdog_active(&db8500_wdt)) { | ||
db8500_wdt_stop(&db8500_wdt); | ||
prcmu_config_a9wdog(PRCMU_WDOG_CPU1, false); | ||
|
||
prcmu_load_a9wdog(PRCMU_WDOG_ALL, timeout * 1000); | ||
ux500_wdt_start(&ux500_wdt); | ||
db8500_wdt_start(&db8500_wdt); | ||
} | ||
return 0; | ||
} | ||
#else | ||
#define ux500_wdt_suspend NULL | ||
#define ux500_wdt_resume NULL | ||
#define db8500_wdt_suspend NULL | ||
#define db8500_wdt_resume NULL | ||
#endif | ||
|
||
static struct platform_driver ux500_wdt_driver = { | ||
.probe = ux500_wdt_probe, | ||
.suspend = ux500_wdt_suspend, | ||
.resume = ux500_wdt_resume, | ||
static struct platform_driver db8500_wdt_driver = { | ||
.probe = db8500_wdt_probe, | ||
.suspend = db8500_wdt_suspend, | ||
.resume = db8500_wdt_resume, | ||
.driver = { | ||
.name = "ux500_wdt", | ||
.name = "db8500_wdt", | ||
}, | ||
}; | ||
|
||
module_platform_driver(ux500_wdt_driver); | ||
module_platform_driver(db8500_wdt_driver); | ||
|
||
MODULE_AUTHOR("Jonas Aaberg <[email protected]>"); | ||
MODULE_DESCRIPTION("Ux500 Watchdog Driver"); | ||
MODULE_DESCRIPTION("DB8500 Watchdog Driver"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_ALIAS("platform:ux500_wdt"); | ||
MODULE_ALIAS("platform:db8500_wdt"); |