Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Aug 2018 18:50:56 +0000 (UTC)
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r338111 - head/sys/dev/ichiic
Message-ID:  <201808201850.w7KIoueE054946@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gonzo
Date: Mon Aug 20 18:50:56 2018
New Revision: 338111
URL: https://svnweb.freebsd.org/changeset/base/338111

Log:
  [ig4] add ACPI Device HID for AMD platforms
  
  Added ACPI Device HID AMDI0010 for the designware I2C controllers in
  future AMD platforms. Also, when verifying component version check for
  minimal value instead of exact match.
  
  PR:		230641
  Submitted by:	Rajesh <rajfbsd@gmail.com>
  Reviewed by:	cem, gonzo
  MFC after:	2 weeks
  Differential Revision:	https://reviews.freebsd.org/D16670

Modified:
  head/sys/dev/ichiic/ig4_acpi.c
  head/sys/dev/ichiic/ig4_iic.c
  head/sys/dev/ichiic/ig4_reg.h

Modified: head/sys/dev/ichiic/ig4_acpi.c
==============================================================================
--- head/sys/dev/ichiic/ig4_acpi.c	Mon Aug 20 18:17:50 2018	(r338110)
+++ head/sys/dev/ichiic/ig4_acpi.c	Mon Aug 20 18:50:56 2018	(r338111)
@@ -60,6 +60,7 @@ static char *ig4iic_ids[] = {
 	"80860F41",
 	"808622C1",
 	"AMDI0510",
+	"AMDI0010",
 	"APMC0D0F",
 	NULL
 };

Modified: head/sys/dev/ichiic/ig4_iic.c
==============================================================================
--- head/sys/dev/ichiic/ig4_iic.c	Mon Aug 20 18:17:50 2018	(r338110)
+++ head/sys/dev/ichiic/ig4_iic.c	Mon Aug 20 18:50:56 2018	(r338111)
@@ -563,7 +563,7 @@ ig4iic_attach(ig4iic_softc_t *sc)
 
 	if (sc->version == IG4_HASWELL || sc->version == IG4_ATOM) {
 		v = reg_read(sc, IG4_REG_COMP_VER);
-		if (v != IG4_COMP_VER) {
+		if (v < IG4_COMP_MIN_VER) {
 			error = ENXIO;
 			goto done;
 		}

Modified: head/sys/dev/ichiic/ig4_reg.h
==============================================================================
--- head/sys/dev/ichiic/ig4_reg.h	Mon Aug 20 18:17:50 2018	(r338110)
+++ head/sys/dev/ichiic/ig4_reg.h	Mon Aug 20 18:50:56 2018	(r338111)
@@ -73,7 +73,6 @@
  *	SDA_HOLD	0x00000001
  *	SDA_SETUP	0x00000064
  *	COMP_PARAM1	0x00FFFF6E
- *	COMP_VER	0x3131352A
  */
 
 #define IG4_REG_CTL		0x0000	/* RW	Control Register */
@@ -552,11 +551,10 @@
 
 /*
  * COMP_VER - (RO) Component Version Register			22.2.36
- *		   Default Value 0x3131352A
  *
  *	Contains the chip version number.  All 32 bits.
  */
-#define IG4_COMP_VER		0x3131352A
+#define IG4_COMP_MIN_VER		0x3131352A
 
 /*
  * COMP_TYPE - (RO) (linux) Endian and bus width probe



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808201850.w7KIoueE054946>