watchdog: iTCO_wdt: Export vendorsupport
In preparation for making ->smi_res optional the iTCO_wdt driver needs to know whether vendorsupport is being set to non-zero. For this reason export the variable. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
2c523b344d
commit
7ca6ee3890
|
@ -1,10 +1,12 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
/* iTCO Vendor Specific Support hooks */
|
/* iTCO Vendor Specific Support hooks */
|
||||||
#ifdef CONFIG_ITCO_VENDOR_SUPPORT
|
#ifdef CONFIG_ITCO_VENDOR_SUPPORT
|
||||||
|
extern int iTCO_vendorsupport;
|
||||||
extern void iTCO_vendor_pre_start(struct resource *, unsigned int);
|
extern void iTCO_vendor_pre_start(struct resource *, unsigned int);
|
||||||
extern void iTCO_vendor_pre_stop(struct resource *);
|
extern void iTCO_vendor_pre_stop(struct resource *);
|
||||||
extern int iTCO_vendor_check_noreboot_on(void);
|
extern int iTCO_vendor_check_noreboot_on(void);
|
||||||
#else
|
#else
|
||||||
|
#define iTCO_vendorsupport 0
|
||||||
#define iTCO_vendor_pre_start(acpibase, heartbeat) {}
|
#define iTCO_vendor_pre_start(acpibase, heartbeat) {}
|
||||||
#define iTCO_vendor_pre_stop(acpibase) {}
|
#define iTCO_vendor_pre_stop(acpibase) {}
|
||||||
#define iTCO_vendor_check_noreboot_on() 1
|
#define iTCO_vendor_check_noreboot_on() 1
|
||||||
|
|
|
@ -39,8 +39,10 @@
|
||||||
/* Broken BIOS */
|
/* Broken BIOS */
|
||||||
#define BROKEN_BIOS 911
|
#define BROKEN_BIOS 911
|
||||||
|
|
||||||
static int vendorsupport;
|
int iTCO_vendorsupport;
|
||||||
module_param(vendorsupport, int, 0);
|
EXPORT_SYMBOL(iTCO_vendorsupport);
|
||||||
|
|
||||||
|
module_param_named(vendorsupport, iTCO_vendorsupport, int, 0);
|
||||||
MODULE_PARM_DESC(vendorsupport, "iTCO vendor specific support mode, default="
|
MODULE_PARM_DESC(vendorsupport, "iTCO vendor specific support mode, default="
|
||||||
"0 (none), 1=SuperMicro Pent3, 911=Broken SMI BIOS");
|
"0 (none), 1=SuperMicro Pent3, 911=Broken SMI BIOS");
|
||||||
|
|
||||||
|
@ -152,7 +154,7 @@ static void broken_bios_stop(struct resource *smires)
|
||||||
void iTCO_vendor_pre_start(struct resource *smires,
|
void iTCO_vendor_pre_start(struct resource *smires,
|
||||||
unsigned int heartbeat)
|
unsigned int heartbeat)
|
||||||
{
|
{
|
||||||
switch (vendorsupport) {
|
switch (iTCO_vendorsupport) {
|
||||||
case SUPERMICRO_OLD_BOARD:
|
case SUPERMICRO_OLD_BOARD:
|
||||||
supermicro_old_pre_start(smires);
|
supermicro_old_pre_start(smires);
|
||||||
break;
|
break;
|
||||||
|
@ -165,7 +167,7 @@ EXPORT_SYMBOL(iTCO_vendor_pre_start);
|
||||||
|
|
||||||
void iTCO_vendor_pre_stop(struct resource *smires)
|
void iTCO_vendor_pre_stop(struct resource *smires)
|
||||||
{
|
{
|
||||||
switch (vendorsupport) {
|
switch (iTCO_vendorsupport) {
|
||||||
case SUPERMICRO_OLD_BOARD:
|
case SUPERMICRO_OLD_BOARD:
|
||||||
supermicro_old_pre_stop(smires);
|
supermicro_old_pre_stop(smires);
|
||||||
break;
|
break;
|
||||||
|
@ -178,7 +180,7 @@ EXPORT_SYMBOL(iTCO_vendor_pre_stop);
|
||||||
|
|
||||||
int iTCO_vendor_check_noreboot_on(void)
|
int iTCO_vendor_check_noreboot_on(void)
|
||||||
{
|
{
|
||||||
switch (vendorsupport) {
|
switch (iTCO_vendorsupport) {
|
||||||
case SUPERMICRO_OLD_BOARD:
|
case SUPERMICRO_OLD_BOARD:
|
||||||
return 0;
|
return 0;
|
||||||
default:
|
default:
|
||||||
|
@ -189,13 +191,13 @@ EXPORT_SYMBOL(iTCO_vendor_check_noreboot_on);
|
||||||
|
|
||||||
static int __init iTCO_vendor_init_module(void)
|
static int __init iTCO_vendor_init_module(void)
|
||||||
{
|
{
|
||||||
if (vendorsupport == SUPERMICRO_NEW_BOARD) {
|
if (iTCO_vendorsupport == SUPERMICRO_NEW_BOARD) {
|
||||||
pr_warn("Option vendorsupport=%d is no longer supported, "
|
pr_warn("Option vendorsupport=%d is no longer supported, "
|
||||||
"please use the w83627hf_wdt driver instead\n",
|
"please use the w83627hf_wdt driver instead\n",
|
||||||
SUPERMICRO_NEW_BOARD);
|
SUPERMICRO_NEW_BOARD);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
pr_info("vendor-support=%d\n", vendorsupport);
|
pr_info("vendor-support=%d\n", iTCO_vendorsupport);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue