Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Mar 2018 06:19:45 +0000 (UTC)
From:      Wojciech Macek <wma@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330971 - in head/sys: conf powerpc/powernv
Message-ID:  <201803150619.w2F6JjEP063620@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: wma
Date: Thu Mar 15 06:19:45 2018
New Revision: 330971
URL: https://svnweb.freebsd.org/changeset/base/330971

Log:
  Reverting r330925 for now

Modified:
  head/sys/conf/files.powerpc
  head/sys/powerpc/powernv/opal_i2c.c
  head/sys/powerpc/powernv/opal_i2cm.c
  head/sys/powerpc/powernv/powernv_centaur.c
  head/sys/powerpc/powernv/powernv_xscom.c

Modified: head/sys/conf/files.powerpc
==============================================================================
--- head/sys/conf/files.powerpc	Thu Mar 15 05:58:35 2018	(r330970)
+++ head/sys/conf/files.powerpc	Thu Mar 15 06:19:45 2018	(r330971)
@@ -186,8 +186,8 @@ powerpc/powermac/vcoregpio.c	optional	powermac 
 powerpc/powernv/opal.c		optional	powernv
 powerpc/powernv/opal_console.c	optional	powernv
 powerpc/powernv/opal_dev.c	optional	powernv
-powerpc/powernv/opal_i2c.c	optional	iicbus powernv
-powerpc/powernv/opal_i2cm.c	optional	iicbus powernv
+powerpc/powernv/opal_i2c.c	optional	iicbus fdt powernv
+powerpc/powernv/opal_i2cm.c	optional	iicbus fdt powernv
 powerpc/powernv/opal_pci.c	optional	powernv pci
 powerpc/powernv/opalcall.S	optional	powernv
 powerpc/powernv/platform_powernv.c optional	powernv

Modified: head/sys/powerpc/powernv/opal_i2c.c
==============================================================================
--- head/sys/powerpc/powernv/opal_i2c.c	Thu Mar 15 05:58:35 2018	(r330970)
+++ head/sys/powerpc/powernv/opal_i2c.c	Thu Mar 15 06:19:45 2018	(r330971)
@@ -120,9 +120,7 @@ static int
 opal_i2c_probe(device_t dev)
 {
 
-#ifdef FDT
 	if (!(ofw_bus_is_compatible(dev, "ibm,opal-i2c")))
-#endif
 		return (ENXIO);
 
 	device_set_desc(dev, "opal-i2c");
@@ -133,7 +131,6 @@ opal_i2c_probe(device_t dev)
 static int
 opal_i2c_attach(device_t dev)
 {
-#ifdef FDT
 	struct opal_i2c_softc *sc;
 	int len;
 
@@ -153,9 +150,6 @@ opal_i2c_attach(device_t dev)
 	I2C_LOCK_INIT(sc);
 
 	return (bus_generic_attach(dev));
-#else
-	return (ENXIO);
-#endif
 }
 
 static int

Modified: head/sys/powerpc/powernv/opal_i2cm.c
==============================================================================
--- head/sys/powerpc/powernv/opal_i2cm.c	Thu Mar 15 05:58:35 2018	(r330970)
+++ head/sys/powerpc/powernv/opal_i2cm.c	Thu Mar 15 06:19:45 2018	(r330971)
@@ -57,17 +57,14 @@ struct opal_i2cm_softc
 
 static int opal_i2cm_attach(device_t);
 static int opal_i2cm_probe(device_t);
-#ifdef FDT
 static const struct ofw_bus_devinfo *
     opal_i2cm_get_devinfo(device_t, device_t);
-#endif
 
 static device_method_t opal_i2cm_methods[] = {
 	/* Device interface */
 	DEVMETHOD(device_probe,		opal_i2cm_probe),
 	DEVMETHOD(device_attach,	opal_i2cm_attach),
 
-#ifdef FDT
 	/* ofw_bus interface */
 	DEVMETHOD(ofw_bus_get_devinfo,	opal_i2cm_get_devinfo),
 	DEVMETHOD(ofw_bus_get_compat,	ofw_bus_gen_get_compat),
@@ -75,7 +72,6 @@ static device_method_t opal_i2cm_methods[] = {
 	DEVMETHOD(ofw_bus_get_name,	ofw_bus_gen_get_name),
 	DEVMETHOD(ofw_bus_get_node,	ofw_bus_gen_get_node),
 	DEVMETHOD(ofw_bus_get_type,	ofw_bus_gen_get_type),
-#endif
 
 	DEVMETHOD_END
 };
@@ -86,10 +82,8 @@ static int
 opal_i2cm_probe(device_t dev)
 {
 
-#ifdef FDT
 	if (!(ofw_bus_is_compatible(dev, "ibm,centaur-i2cm") ||
 	    ofw_bus_is_compatible(dev, "ibm,power8-i2cm")))
-#endif
 		return (ENXIO);
 
 	device_set_desc(dev, "centaur-i2cm");
@@ -99,7 +93,6 @@ opal_i2cm_probe(device_t dev)
 static int
 opal_i2cm_attach(device_t dev)
 {
-#ifdef FDT
 	phandle_t child;
 	device_t cdev;
 	struct ofw_bus_devinfo *dinfo;
@@ -123,18 +116,13 @@ opal_i2cm_attach(device_t dev)
 	}
 
 	return (bus_generic_attach(dev));
-#else
-	return (ENXIO);
-#endif
 }
 
-#ifdef FDT
 static const struct ofw_bus_devinfo *
 opal_i2cm_get_devinfo(device_t dev, device_t child)
 {
         return (device_get_ivars(child));
 }
-#endif
 
 DEFINE_CLASS_0(opal_i2cm, opal_i2cm_driver, opal_i2cm_methods,
     sizeof(struct opal_i2cm_softc));

Modified: head/sys/powerpc/powernv/powernv_centaur.c
==============================================================================
--- head/sys/powerpc/powernv/powernv_centaur.c	Thu Mar 15 05:58:35 2018	(r330970)
+++ head/sys/powerpc/powernv/powernv_centaur.c	Thu Mar 15 06:19:45 2018	(r330971)
@@ -57,17 +57,14 @@ struct powernv_centaur_softc
 
 static int powernv_centaur_attach(device_t);
 static int powernv_centaur_probe(device_t);
-#ifdef FDT
 static const struct ofw_bus_devinfo *
     powernv_centaur_get_devinfo(device_t, device_t);
-#endif
 
 static device_method_t powernv_centaur_methods[] = {
 	/* Device interface */
 	DEVMETHOD(device_probe,		powernv_centaur_probe),
 	DEVMETHOD(device_attach,	powernv_centaur_attach),
 
-#ifdef FDT
 	/* ofw_bus interface */
 	DEVMETHOD(ofw_bus_get_devinfo,	powernv_centaur_get_devinfo),
 	DEVMETHOD(ofw_bus_get_compat,	ofw_bus_gen_get_compat),
@@ -75,7 +72,7 @@ static device_method_t powernv_centaur_methods[] = {
 	DEVMETHOD(ofw_bus_get_name,	ofw_bus_gen_get_name),
 	DEVMETHOD(ofw_bus_get_node,	ofw_bus_gen_get_node),
 	DEVMETHOD(ofw_bus_get_type,	ofw_bus_gen_get_type),
-#endif
+
 	DEVMETHOD_END
 };
 
@@ -85,9 +82,7 @@ static int
 powernv_centaur_probe(device_t dev)
 {
 
-#ifdef FDT
 	if (!(ofw_bus_is_compatible(dev, "ibm,centaur")))
-#endif
 		return (ENXIO);
 
 	device_set_desc(dev, "centaur");
@@ -97,7 +92,6 @@ powernv_centaur_probe(device_t dev)
 static int
 powernv_centaur_attach(device_t dev)
 {
-#ifdef FDT
 	phandle_t child;
 	device_t cdev;
 	struct ofw_bus_devinfo *dinfo;
@@ -121,18 +115,13 @@ powernv_centaur_attach(device_t dev)
 	}
 
 	return (bus_generic_attach(dev));
-#else
-	return (ENXIO);
-#endif
 }
 
-#ifdef FDT
 static const struct ofw_bus_devinfo *
 powernv_centaur_get_devinfo(device_t dev, device_t child)
 {
         return (device_get_ivars(child));
 }
-#endif
 
 DEFINE_CLASS_0(powernv_centaur, powernv_centaur_driver, powernv_centaur_methods,
     sizeof(struct powernv_centaur_softc));

Modified: head/sys/powerpc/powernv/powernv_xscom.c
==============================================================================
--- head/sys/powerpc/powernv/powernv_xscom.c	Thu Mar 15 05:58:35 2018	(r330970)
+++ head/sys/powerpc/powernv/powernv_xscom.c	Thu Mar 15 06:19:45 2018	(r330971)
@@ -57,17 +57,14 @@ struct powernv_xscom_softc
 
 static int powernv_xscom_attach(device_t);
 static int powernv_xscom_probe(device_t);
-#ifdef FDT
 static const struct ofw_bus_devinfo *
     powernv_xscom_get_devinfo(device_t, device_t);
-#endif
 
 static device_method_t powernv_xscom_methods[] = {
 	/* Device interface */
 	DEVMETHOD(device_probe,		powernv_xscom_probe),
 	DEVMETHOD(device_attach,	powernv_xscom_attach),
 
-#ifdef FDT
 	/* ofw_bus interface */
 	DEVMETHOD(ofw_bus_get_devinfo,	powernv_xscom_get_devinfo),
 	DEVMETHOD(ofw_bus_get_compat,	ofw_bus_gen_get_compat),
@@ -75,7 +72,6 @@ static device_method_t powernv_xscom_methods[] = {
 	DEVMETHOD(ofw_bus_get_name,	ofw_bus_gen_get_name),
 	DEVMETHOD(ofw_bus_get_node,	ofw_bus_gen_get_node),
 	DEVMETHOD(ofw_bus_get_type,	ofw_bus_gen_get_type),
-#endif
 
 	DEVMETHOD_END
 };
@@ -86,9 +82,7 @@ static int
 powernv_xscom_probe(device_t dev)
 {
 
-#ifdef FDT
 	if (!(ofw_bus_is_compatible(dev, "ibm,xscom")))
-#endif
 		return (ENXIO);
 
 	device_set_desc(dev, "xscom");
@@ -98,7 +92,6 @@ powernv_xscom_probe(device_t dev)
 static int
 powernv_xscom_attach(device_t dev)
 {
-#ifdef FDT
 	phandle_t child;
 	device_t cdev;
 	struct ofw_bus_devinfo *dinfo;
@@ -122,18 +115,13 @@ powernv_xscom_attach(device_t dev)
 	}
 
 	return (bus_generic_attach(dev));
-#else
-	return (ENXIO);
-#endif
 }
 
-#ifdef FDT
 static const struct ofw_bus_devinfo *
 powernv_xscom_get_devinfo(device_t dev, device_t child)
 {
         return (device_get_ivars(child));
 }
-#endif
 
 DEFINE_CLASS_0(powernv_xscom, powernv_xscom_driver, powernv_xscom_methods,
     sizeof(struct powernv_xscom_softc));



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