From owner-svn-src-head@freebsd.org Sun Feb 25 18:26:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9266F091F9; Sun, 25 Feb 2018 18:26:51 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F0856A701; Sun, 25 Feb 2018 18:26:51 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5565F1082F; Sun, 25 Feb 2018 18:26:51 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1PIQp8U056096; Sun, 25 Feb 2018 18:26:51 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1PIQpGg056094; Sun, 25 Feb 2018 18:26:51 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201802251826.w1PIQpGg056094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 25 Feb 2018 18:26:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329988 - in head/sys/modules/i2c: . iicbus ofw_iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys/modules/i2c: . iicbus ofw_iicbus X-SVN-Commit-Revision: 329988 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Feb 2018 18:26:51 -0000 Author: ian Date: Sun Feb 25 18:26:50 2018 New Revision: 329988 URL: https://svnweb.freebsd.org/changeset/base/329988 Log: Instead of building ofw_iicbus as a separate module, just compile it in to the iicbus module for FDT-based systems. The primary motivation for this is that host controller drivers which declare DRIVER_MODULE(ofw_iicbus, thisdriver, etc, etc) now only need a single MODULE_DEPEND(thisdriver, ofw_iicbus) for runtime linking to resolve all the symbols. With ofw_iicbus and iicbus in separate modules, drivers would need to declare a MODULE_DEPEND() on both, because symbol lookup is non-recursive through the dependency chain. Requiring a driver to have MODULE_DEPENDS() on both amounts to requiring the drivers to understand the kobj inheritence details of how ofw_iicbus is implemented, which seems like something they shouldn't have to know (and could even change some day). Also, this is somewhat analogous to how the drivers get built when compiled into the kernel. You don't have to ask for ofw_iicbus separately, it just gets built in along with iicbus when option FDT is in effect. Deleted: head/sys/modules/i2c/ofw_iicbus/ Modified: head/sys/modules/i2c/Makefile head/sys/modules/i2c/iicbus/Makefile Modified: head/sys/modules/i2c/Makefile ============================================================================== --- head/sys/modules/i2c/Makefile Sun Feb 25 17:02:50 2018 (r329987) +++ head/sys/modules/i2c/Makefile Sun Feb 25 18:26:50 2018 (r329988) @@ -21,8 +21,4 @@ SUBDIR = \ smb \ smbus \ -.if !empty(OPT_FDT) -SUBDIR += ofw_iicbus -.endif - .include Modified: head/sys/modules/i2c/iicbus/Makefile ============================================================================== --- head/sys/modules/i2c/iicbus/Makefile Sun Feb 25 17:02:50 2018 (r329987) +++ head/sys/modules/i2c/iicbus/Makefile Sun Feb 25 18:26:50 2018 (r329988) @@ -14,4 +14,8 @@ SRCS= \ iiconf.c \ iiconf.h \ +.if !empty(OPT_FDT) +SRCS+= ofw_iicbus.c ofw_bus_if.h +.endif + .include