blob: 54455c8340c9b7a400da9553cf1defc72a54a334 [file] [log] [blame]
From ltsi-dev-bounces@lists.linuxfoundation.org Wed Nov 5 10:39:48 2014
From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Date: Wed, 5 Nov 2014 09:39:10 +0800
Subject: [LTSI-dev] [PATCH 05/16] mfd: lpc_ich: Only configure watchdog or GPIO when present
To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Message-ID: <1415151561-16047-6-git-send-email-rebecca.swee.fun.chang@intel.com>
From: Peter Tyser <ptyser@xes-inc.com>
Some chipsets don't currently have GPIO support enabled. For these
chipsets don't go through the process of initializing the GPIO region.
Make the same change for the watchdog initialization for chipsets which
may not enable the WDT in the future.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit f0776b8ce03ceb638c51b62f324844c71c446600)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
---
drivers/mfd/lpc_ich.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
--- a/drivers/mfd/lpc_ich.c
+++ b/drivers/mfd/lpc_ich.c
@@ -967,13 +967,17 @@ static int lpc_ich_probe(struct pci_dev
pci_set_drvdata(dev, priv);
- ret = lpc_ich_init_wdt(dev);
- if (!ret)
- cell_added = true;
+ if (lpc_chipset_info[priv->chipset].iTCO_version) {
+ ret = lpc_ich_init_wdt(dev);
+ if (!ret)
+ cell_added = true;
+ }
- ret = lpc_ich_init_gpio(dev);
- if (!ret)
- cell_added = true;
+ if (lpc_chipset_info[priv->chipset].gpio_version) {
+ ret = lpc_ich_init_gpio(dev);
+ if (!ret)
+ cell_added = true;
+ }
/*
* We only care if at least one or none of the cells registered