From owner-svn-src-head@freebsd.org Mon Mar 5 02:32:24 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 3546FF255DB; Mon, 5 Mar 2018 02:32:24 +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 DDD5D7DE80; Mon, 5 Mar 2018 02:32:23 +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 D8C131DEB4; Mon, 5 Mar 2018 02:32:23 +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 w252WNph041209; Mon, 5 Mar 2018 02:32:23 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w252WN72041208; Mon, 5 Mar 2018 02:32:23 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803050232.w252WN72041208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 5 Mar 2018 02:32:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330440 - head/sys/arm/freescale/imx X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/freescale/imx X-SVN-Commit-Revision: 330440 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: Mon, 05 Mar 2018 02:32:24 -0000 Author: ian Date: Mon Mar 5 02:32:23 2018 New Revision: 330440 URL: https://svnweb.freebsd.org/changeset/base/330440 Log: Switch imx_gpio to attach at BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE. Pretty much any other device might need to manipulate a gpio pin during its probe or attach routines, so these devices must be available as early as possible. The gpio device is an interrupt controller, but I didn't choose the INTERRUPT pass for that reason (it works fine as an interrupt controller as long as it attaches any time before interrupts are enabled). That just looked like the right place in the passes to ensure that it attaches before any type of device that might need gpio pin manipulations. Modified: head/sys/arm/freescale/imx/imx_gpio.c Modified: head/sys/arm/freescale/imx/imx_gpio.c ============================================================================== --- head/sys/arm/freescale/imx/imx_gpio.c Mon Mar 5 02:28:25 2018 (r330439) +++ head/sys/arm/freescale/imx/imx_gpio.c Mon Mar 5 02:32:23 2018 (r330440) @@ -868,5 +868,5 @@ static driver_t imx51_gpio_driver = { }; static devclass_t imx51_gpio_devclass; -DRIVER_MODULE(imx51_gpio, simplebus, imx51_gpio_driver, imx51_gpio_devclass, - 0, 0); +EARLY_DRIVER_MODULE(imx51_gpio, simplebus, imx51_gpio_driver, + imx51_gpio_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE);