[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170621035349.4125-4-zboszor@pr.hu>
Date: Wed, 21 Jun 2017 05:53:47 +0200
From: Zoltán Böszörményi
<zboszor@...hu>
To: linux-kernel@...r.kernel.org
Cc: linux-usb@...r.kernel.org, linux-watchdog@...r.kernel.org,
linux-i2c@...r.kernel.org,
Paul Menzel <paulepanter@...rs.sourceforge.net>,
Christian Fetzer <fetzer.ch@...il.com>,
Jean Delvare <jdelvare@...e.com>,
Nehal Shah <nehal-bakulchandra.shah@....com>,
Tim Small <tim@...ss.co.uk>,
Guenter Roeck <linux@...ck-us.net>, kernel@...ss.net,
wim@...ana.be, jlayton@...chiereds.net, marc.2377@...il.com,
cshorler@...glemail.com, wsa@...-dreams.de,
regressions@...mhuis.info,
Zoltán Böszörményi
<zboszor@...hu>
Subject: [PATCH 3/5] usb: pci-quirks: Protect the I/O port pair of SB800
This patch uses the previously introduced macro called
request_declared_muxed_region() to synchronize access to
the I/O port pair 0xcd6 / 0xcd7 on SB800.
These I/O ports are also used by i2c-piix4 and sp5100_tco,
the next two patches port these drivers to use the new macro.
Signed-off-by: Zoltán Böszörményi <zboszor@...hu>
---
drivers/usb/host/pci-quirks.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index a9a1e4c..703eb65 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -314,11 +314,14 @@ static void usb_amd_quirk_pll(int disable)
if (amd_chipset.sb_type.gen == AMD_CHIPSET_SB800 ||
amd_chipset.sb_type.gen == AMD_CHIPSET_HUDSON2 ||
amd_chipset.sb_type.gen == AMD_CHIPSET_BOLTON) {
+ struct resource res = DEFINE_RES_IO_NAMED(0xcd6, 2, "USB host SB800/HUDSON2/BOLTON");
+ request_declared_muxed_region(&res);
outb_p(AB_REG_BAR_LOW, 0xcd6);
addr_low = inb_p(0xcd7);
outb_p(AB_REG_BAR_HIGH, 0xcd6);
addr_high = inb_p(0xcd7);
addr = addr_high << 8 | addr_low;
+ release_region(0xcd6, 2);
outl_p(0x30, AB_INDX(addr));
outl_p(0x40, AB_DATA(addr));
--
2.9.4
Powered by blists - more mailing lists