- 09 Feb, 2017 1 commit
-
-
Ricardo Ribalda authored
Since '701dc207 ("i2c: piix4: Avoid race conditions with IMC")' we are using the SMBSLVCNT register at offset 0x8. We need to request it. Fixes: 701dc207 ("i2c: piix4: Avoid race conditions with IMC") Signed-off-by:
Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by:
Jean Delvare <jdelvare@suse.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 12 Jan, 2017 1 commit
-
-
Ricardo Ribalda authored
On AMD's SB800 and upwards, the SMBus is shared with the Integrated Micro Controller (IMC). The platform provides a hardware semaphore to avoid race conditions among them. (Check page 288 of the SB800-Series Southbridges Register Reference Guide http://support.amd.com/TechDocs/45482.pdf ) Without this patch, many access to the SMBus end with an invalid transaction or even with the bus stalled. Reported-by:
Alexandre Desnoyers <alex@qtec.com> Signed-off-by:
Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>: Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 22 Aug, 2016 1 commit
-
-
Wolfram Sang authored
The core will do this for us now. Signed-off-by:
Wolfram Sang <wsa-dev@sang-engineering.com> Reviewed-by:
Grygorii Strashko <grygorii.strashko@ti.com> Acked-by:
Peter Korsgaard <peter@korsgaard.com> Acked-by:
Heiko Stuebner <heiko@sntech.de> Acked-by:
Neil Horman <nhorman@tuxdriver.com> Acked-by:
Thierry Reding <treding@nvidia.com> Acked-by:
Ray Jui <ray.jui@broadcom.com> Acked-by:
Vladimir Zapolskiy <vz@mleia.com> Acked-by:
Ludovic Desroches <ludovic.desroches@atmel.com> Acked-by:
Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by:
Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 24 Feb, 2016 3 commits
-
-
Jean Delvare authored
Shift the port number at initialization time, so that it is ready to use at run time. That way we don't have to do it again for every SMBus transaction. Signed-off-by:
Jean Delvare <jdelvare@suse.de> Reviewed-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Jean Delvare authored
Sometimes u8 is used to store the port number, sometimes unsigned short is used. Consistently stick to a single type, for consistency and to avoid implicit casts. Signed-off-by:
Jean Delvare <jdelvare@suse.de> Reviewed-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Jean Delvare authored
The SB800 register reference guide says that the SMBus port selection bits may not always be in register Smbus0En (0x2c) but could alternatively be found in register Smbus0Sel (0x2e) depending on the settings in register Smbus0SelEn (0x2f.) Add support for this configuration. The "alternative" register is the only one working for the Bolton (aka Hudson-2) chipset anyway. I do not have any documentation for the "kerncz" chipset so we treat it the same as the Bolton for now. Signed-off-by:
Jean Delvare <jdelvare@suse.de> Tested-by:
Christian Fetzer <fetzer.ch@gmail.com> Reviewed-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 29 Jan, 2016 1 commit
-
-
Jean Delvare authored
The I2C bus names are supposed to be stable as they can be used by userspace to uniquely identify a specific I2C bus. So restore the original names for all legacy (pre-SB800) devices. For SB800 devices and later, improve the names. "SDA" refers to the serial data pin of each SMBus port, it's an implementation detail the user doesn't need to know. Use "port" instead, which is easier to understand. Signed-off-by:
Jean Delvare <jdelvare@suse.de> Reviewed-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Tested-by:
Christian Fetzer <fetzer.ch@gmail.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 26 Jan, 2016 2 commits
-
-
Jean Delvare authored
This closes a race window where I2C device drivers attempt to access I2C buses which aren't fully initialized yet. Signed-off-by:
Jean Delvare <jdelvare@suse.de> Tested-by:
Christian Fetzer <fetzer.ch@gmail.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Jean Delvare authored
We need a single mutex for all 4 shared SMBus ports on the SB800. A per-port mutex doesn't protect us from concurrent access. In theory the mutex should be per PCI device, however in practice we know that there's only ever a single instance of the device in a given system so we can use a global. Also take the mutex during initialization, as first port may be already in use when second port is initialized. Signed-off-by:
Jean Delvare <jdelvare@suse.de> Tested-by:
Christian Fetzer <fetzer.ch@gmail.com> Reviewed-by:
Mika Westerberg <mika.westerberg@linux.intel.com> [wsa: made mutex static] Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 03 Dec, 2015 1 commit
-
-
Wolfram Sang authored
smatch rightfully says: drivers/i2c/busses/i2c-piix4.c:504 piix4_access warn: unused return: i = inb_p() drivers/i2c/busses/i2c-piix4.c:537 piix4_access warn: unused return: i = inb_p() Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Tested-by:
Christian Fetzer <fetzer.ch@gmail.com>
-
- 30 Nov, 2015 3 commits
-
-
Christian Fetzer authored
This patch adds support for port names for the SB800 chipset. Since the chipset supports a multiplexed main SMBus controller, adding the channel name to the adapter name is necessary to differentiate the ports better (for example in sensors output). Signed-off-by:
Christian Fetzer <fetzer.ch@gmail.com> Reviewed-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Christian Fetzer authored
The SB800 chipset supports a multiplexed main SMBus controller with four ports. The multiplexed ports share the same SMBus address and register set. The port is selected by bits 2:1 of the smb_en register (0x2C). Only one port can be active at any point in time therefore a mutex is needed in order to synchronize access. Additionally, the commit avoids requesting and releasing the SMBus base address index region on every multiplexed transfer by moving the request_region call into piix4_probe. Tested on HP ProLiant MicroServer G7 N54L (where this patch adds support to access sensor data from the w83795adg). Cc: Thomas Brandon <tbrandonau@gmail.com> Cc: Eddi De Pieri <eddi@depieri.net> Signed-off-by:
Christian Fetzer <fetzer.ch@gmail.com> Reviewed-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Christian Fetzer authored
The SB800 chipset supports a multiplexed main SMBus controller with four ports. Therefore the static variable piix4_main_adapter is converted into a piix4_main_adapters array that can hold one i2c_adapter for each multiplexed port. The auxiliary adapter remains unchanged since it represents the second (not multiplexed) SMBus controller on the SB800 chipset. Signed-off-by:
Christian Fetzer <fetzer.ch@gmail.com> Reviewed-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 16 Jun, 2015 1 commit
-
-
Vincent Wan authored
Change AMD CZ SMBUS device ID from 0x790b to use Macro definition Signed-off-by:
Wan ZongShun <Vincent.Wan@amd.com> Acked-by:
Wolfram Sang <wsa@the-dreams.de> Acked-by:
Jean Delvare <jdelvare@suse.de> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
- 07 Nov, 2014 1 commit
-
-
Wolfram Sang authored
We have a central copy of the GPL for that. Some addresses were already outdated. Signed-off-by:
Wolfram Sang <wsa+renesas@sang-engineering.com>
-
- 13 Mar, 2014 1 commit
-
-
Jingoo Han authored
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred. Signed-off-by:
Jingoo Han <jg1.han@samsung.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 24 Jan, 2014 4 commits
-
-
Paul Gortmaker authored
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by:
Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by:
Jean Delvare <khali@linux-fr.org> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Jean Delvare authored
Use exactly the same log messages in the legacy setup function and the SB800+ setup function. This way strings can be reused, which saves some bytes in the generated binary. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Shane Huang authored
Same messages for AMD main and auxiliary SMBus controllers lead to confusion, this patch is to remove confusion and keep consistent with non-AMD products. Signed-off-by:
Shane Huang <shane.huang@amd.com> Reviewed-by:
Jean Delvare <khali@linux-fr.org> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Shane Huang authored
The locations of SMBus register base address and enablement bit are changed from AMD ML, which need this patch to be supported. Signed-off-by:
Shane Huang <shane.huang@amd.com> Reviewed-by:
Jean Delvare <khali@linux-fr.org> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Cc: stable@vger.kernel.org
-
- 15 Aug, 2013 1 commit
-
-
Rudolf Marek authored
Add support for the secondary SMBus controller on the AMD SB800 and AMD FCH chipsets. Signed-off-by:
Rudolf Marek <r.marek@assembler.cz> Tested-by:
Paul Menzel <paulepanter@users.sourceforge.net> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 03 Jun, 2013 1 commit
-
-
Shane Huang authored
To add AMD CZ SMBus controller device ID. [bhelgaas: drop pci_ids.h update] Signed-off-by:
Shane Huang <shane.huang@amd.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Reviewed-by:
Tejun Heo <tj@kernel.org> Reviewed-by:
Jean Delvare <khali@linux-fr.org> Cc: stable@vger.kernel.org
-
- 22 Dec, 2012 1 commit
-
-
Bill Pemberton authored
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by:
Bill Pemberton <wfp5p@virginia.edu> Acked-by: Peter Korsgaard <peter.korsgaard@barco.com> (for ocores and mux-gpio) Acked-by: Havard Skinnemoen <hskinnemoen@gmail.com> (for i2c-gpio) Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> (for puf3) Acked-by: Barry Song <baohua.song@csr.com> (for sirf) Reviewed-by:
Jean Delvare <khali@linux-fr.org> [wsa: Fixed "foo* bar" flaws while we are here] Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de>
-
- 16 Dec, 2012 1 commit
-
-
Joe Perches authored
dev_<level> calls take less code than dev_printk(KERN_<LEVEL> and reducing object size is good. Coalesce formats for easier grep. Signed-off-by:
Joe Perches <joe@perches.com> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
- 05 Oct, 2012 1 commit
-
-
Daniel J Blueman authored
Fix build failure in Intel PIIX4 I2C driver. Signed-off-by:
Daniel J Blueman <daniel@quora.org> Signed-off-by:
Jean Delvare <khali@linux-fr.org> Cc: stable@vger.kernel.org [v3.6]
-
- 24 Jul, 2012 4 commits
-
-
Andrew Armenia authored
Some AMD chipsets, such as the SP5100, have an auxiliary SMBus controller with a second set of registers. This patch adds support for this auxiliary controller. Tested on ASUS KCMA-D8 motherboard. Signed-off-by:
Andrew Armenia <andrew@asquaredlabs.com> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
Andrew Armenia authored
Some chipsets have multiple sets of SMBus registers each controlling a separate SMBus. Supporting these chipsets properly will require registering multiple I2C adapters for one piix4. The code to initialize and register the i2c_adapter structure has been separated from piix4_probe and allows registration of a piix4 adapter given its base address. Note that the i2c_adapter and i2c_piix4_adapdata structures are now dynamically allocated. Signed-off-by:
Andrew Armenia <andrew@asquaredlabs.com> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
Andrew Armenia authored
Some chipsets have multiple sets of piix4-compatible SMBus registers. Eliminating the global variable will allow these chipsets to be fully supported. Return value from piix4_setup and piix4_sb800_setup now returns the smba value detected. This is stored in a struct i2c_piix4_adapdata. Thus the global variable is eliminated. Signed-off-by:
Andrew Armenia <andrew@asquaredlabs.com> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
Axel Lin authored
Convert the drivers in drivers/i2c/busses/* to usemodule_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Wolfram Sang <w.sang@pengutronix.de> Signed-off-by:
Jean Delvare <khali@linux-fr.org> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Olof Johansson <olof@lixom.net> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Tomoya MORINAGA <tomoya.rohm@gmail.com>
-
- 12 Jan, 2012 1 commit
-
-
Axel Lin authored
Convert static struct pci_device_id *[] to static DEFINE_PCI_DEVICE_TABLE tables. Use DEFINE_PCI_DEVICE_TABLE ensures we make the pci_device_id table const and marked as __devinitconst. This also fixes some warnings from checkpatch: e.g. WARNING: Use DEFINE_PCI_DEVICE_TABLE for struct pci_device_id #1096: FILE: i2c/busses/i2c-intel-mid.c:1096: +static struct pci_device_id intel_mid_i2c_ids[] = { Signed-off-by:
Axel Lin <axel.lin@gmail.com> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Ben Dooks <ben-linux@fluff.org> Acked-by:
Olof Johansson <olof@lixom.net> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Acked-by:
Dirk Brandewie <dirk.brandewie@gmail.com> Cc: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Acked-by:
Wolfram Sang <w.sang@pengutronix.de> Cc: Feng Tang <feng.tang@intel.com> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
- 21 May, 2010 1 commit
-
-
H Hartley Sweeten authored
As warned by checkpatch.pl, <linux/io.h> should be used instead of <asm/io.h>. Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
- 02 Mar, 2010 1 commit
-
-
Márton Németh authored
The id_table field of the struct pci_driver is constant in <linux/pci.h> so it is worth to make initialization data also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/ ) // <smpl> @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl> Signed-off-by:
Márton Németh <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
- 16 Jan, 2010 1 commit
-
-
Roel Kluin authored
With `while (timeout++ < MAX_TIMEOUT)' timeout reaches MAX_TIMEOUT + 1 after the loop. This is probably unlikely to produce a problem. Signed-off-by:
Roel Kluin <roel.kluin@gmail.com> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
- 07 Nov, 2009 1 commit
-
-
Crane Cai authored
Change SB900 to its formal code name Hudson-2. Signed-off-by:
Crane Cai <crane.cai@amd.com> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
- 04 Oct, 2009 1 commit
-
-
Jean Delvare authored
When an ACPI resource conflict is detected, error messages are already printed by ACPI. There's no point in causing the driver core to print more error messages, so return one of the error codes for which no message is printed. This fixes bug #14293: http://bugzilla.kernel.org/show_bug.cgi?id=14293 Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
- 18 Sep, 2009 1 commit
-
-
Crane Cai authored
Add new SMBus device ID for AMD SB900. Signed-off-by:
Crane Cai <crane.cai@amd.com> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
- 28 Mar, 2009 2 commits
-
-
Flavio Leitner authored
Add support for the Broadcom HT1100 LD chipset (SMBus function.) Signed-off-by:
Flavio Leitner <fbl@redhat.com> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
Shane Huang authored
Add support for the AMD SB800 Family series of products. Major changes include the changes to addressing the SMBus registers at different location from the locations in the previous compatible parts from AMD such as SB400/SB600/SB700. For SB800, the main features and register definitions of SMBus and other interfaces are still compatible with the previous products with the only change being in how to access the internal registers for these blocks. Signed-off-by:
Shane Huang <shane.huang@amd.com> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
- 26 Jan, 2009 1 commit
-
-
Jean Delvare authored
Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
- 14 Jul, 2008 1 commit
-
-
Jean Delvare authored
Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-