From: Henning Schild <henning.schild@siemens.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Mark Gross <markgross@kernel.org>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Guenter Roeck <linux@roeck-us.net>,
<linux-kernel@vger.kernel.org>, <linux-leds@vger.kernel.org>,
<platform-driver-x86@vger.kernel.org>,
<linux-watchdog@vger.kernel.org>, Enrico Weigelt <lkml@metux.net>,
Gerd Haeussler <gerd.haeussler.ext@siemens.com>,
Henning Schild <henning.schild@siemens.com>
Subject: [PATCH v3 3/4] platform/x86: simatic-ipc: drop custom P2SB bar code
Date: Fri, 13 May 2022 10:36:51 +0200 [thread overview]
Message-ID: <20220513083652.974-4-henning.schild@siemens.com> (raw)
In-Reply-To: <20220513083652.974-1-henning.schild@siemens.com>
The two drivers that used to use this have been switched over to the
common P2SB accessor, so this code is not needed any longer.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
drivers/platform/x86/simatic-ipc.c | 38 -------------------
.../platform_data/x86/simatic-ipc-base.h | 2 -
2 files changed, 40 deletions(-)
diff --git a/drivers/platform/x86/simatic-ipc.c b/drivers/platform/x86/simatic-ipc.c
index b599cda5ba3c..26c35e1660cb 100644
--- a/drivers/platform/x86/simatic-ipc.c
+++ b/drivers/platform/x86/simatic-ipc.c
@@ -101,44 +101,6 @@ static int register_platform_devices(u32 station_id)
return 0;
}
-/* FIXME: this should eventually be done with generic P2SB discovery code
- * the individual drivers for watchdogs and LEDs access memory that implements
- * GPIO, but pinctrl will not come up because of missing ACPI entries
- *
- * While there is no conflict a cleaner solution would be to somehow bring up
- * pinctrl even with these ACPI entries missing, and base the drivers on pinctrl.
- * After which the following function could be dropped, together with the code
- * poking the memory.
- */
-/*
- * Get membase address from PCI, used in leds and wdt module. Here we read
- * the bar0. The final address calculation is done in the appropriate modules
- */
-u32 simatic_ipc_get_membase0(unsigned int p2sb)
-{
- struct pci_bus *bus;
- u32 bar0 = 0;
- /*
- * The GPIO memory is in bar0 of the hidden P2SB device.
- * Unhide the device to have a quick look at it, before we hide it
- * again.
- * Also grab the pci rescan lock so that device does not get discovered
- * and remapped while it is visible.
- * This code is inspired by drivers/mfd/lpc_ich.c
- */
- bus = pci_find_bus(0, 0);
- pci_lock_rescan_remove();
- pci_bus_write_config_byte(bus, p2sb, 0xE1, 0x0);
- pci_bus_read_config_dword(bus, p2sb, PCI_BASE_ADDRESS_0, &bar0);
-
- bar0 &= ~0xf;
- pci_bus_write_config_byte(bus, p2sb, 0xE1, 0x1);
- pci_unlock_rescan_remove();
-
- return bar0;
-}
-EXPORT_SYMBOL(simatic_ipc_get_membase0);
-
static int __init simatic_ipc_init_module(void)
{
const struct dmi_system_id *match;
diff --git a/include/linux/platform_data/x86/simatic-ipc-base.h b/include/linux/platform_data/x86/simatic-ipc-base.h
index 62d2bc774067..39fefd48cf4d 100644
--- a/include/linux/platform_data/x86/simatic-ipc-base.h
+++ b/include/linux/platform_data/x86/simatic-ipc-base.h
@@ -24,6 +24,4 @@ struct simatic_ipc_platform {
u8 devmode;
};
-u32 simatic_ipc_get_membase0(unsigned int p2sb);
-
#endif /* __PLATFORM_DATA_X86_SIMATIC_IPC_BASE_H */
--
2.35.1
next prev parent reply other threads:[~2022-05-13 8:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-13 8:36 [PATCH v3 0/4] simatic-ipc additions to p2sb apl lake gpio Henning Schild
2022-05-13 8:36 ` [PATCH v3 1/4] leds: simatic-ipc-leds: convert to use P2SB accessor Henning Schild
2022-05-13 8:36 ` [PATCH v3 2/4] watchdog: simatic-ipc-wdt: " Henning Schild
2022-05-13 13:01 ` Guenter Roeck
2022-05-13 8:36 ` Henning Schild [this message]
2022-05-23 16:22 ` [PATCH v3 3/4] platform/x86: simatic-ipc: drop custom P2SB bar code Andy Shevchenko
2022-05-13 8:36 ` [PATCH v3 4/4] leds: simatic-ipc-leds-gpio: add GPIO version of Siemens driver Henning Schild
2022-05-23 16:24 ` [PATCH v3 0/4] simatic-ipc additions to p2sb apl lake gpio Andy Shevchenko
2022-06-07 15:18 ` Andy Shevchenko
2022-06-07 16:15 ` Henning Schild
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220513083652.974-4-henning.schild@siemens.com \
--to=henning.schild@siemens.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gerd.haeussler.ext@siemens.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lkml@metux.net \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=wim@linux-watchdog.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).