From owner-svn-src-head@freebsd.org Thu Sep 10 14:58:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9967E3D9B1C; Thu, 10 Sep 2020 14:58:47 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BnMTg3VVbz46qp; Thu, 10 Sep 2020 14:58:47 +0000 (UTC) (envelope-from andrew@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 5B5E714562; Thu, 10 Sep 2020 14:58:47 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08AEwlpE031136; Thu, 10 Sep 2020 14:58:47 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08AEwlLT031134; Thu, 10 Sep 2020 14:58:47 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202009101458.08AEwlLT031134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 10 Sep 2020 14:58:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365579 - in head/sys: arm64/include dev/gpio X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: arm64/include dev/gpio X-SVN-Commit-Revision: 365579 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.33 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: Thu, 10 Sep 2020 14:58:47 -0000 Author: andrew Date: Thu Sep 10 14:58:46 2020 New Revision: 365579 URL: https://svnweb.freebsd.org/changeset/base/365579 Log: Move the pl061 acpi attachment earlier As the pl061 driver can be an interrupt controller attach it earlier in the boot so other drivers can use it. Use a new GPIO xref to not conflict with the existing root interrupt controller. Sponsored by: Innovate UK Modified: head/sys/arm64/include/intr.h head/sys/dev/gpio/pl061_acpi.c Modified: head/sys/arm64/include/intr.h ============================================================================== --- head/sys/arm64/include/intr.h Thu Sep 10 14:13:49 2020 (r365578) +++ head/sys/arm64/include/intr.h Thu Sep 10 14:58:46 2020 (r365579) @@ -51,6 +51,7 @@ void intr_ipi_dispatch(u_int, struct trapframe *); #ifdef DEV_ACPI #define ACPI_INTR_XREF 1 #define ACPI_MSI_XREF 2 +#define ACPI_GPIO_XREF 3 #endif #endif /* _MACHINE_INTR_H */ Modified: head/sys/dev/gpio/pl061_acpi.c ============================================================================== --- head/sys/dev/gpio/pl061_acpi.c Thu Sep 10 14:13:49 2020 (r365578) +++ head/sys/dev/gpio/pl061_acpi.c Thu Sep 10 14:58:46 2020 (r365579) @@ -76,7 +76,7 @@ pl061_acpi_attach(device_t dev) if (error != 0) return (error); - if (!intr_pic_register(dev, ACPI_INTR_XREF)) { + if (!intr_pic_register(dev, ACPI_GPIO_XREF)) { device_printf(dev, "couldn't register PIC\n"); pl061_detach(dev); error = ENXIO; @@ -98,6 +98,7 @@ DEFINE_CLASS_1(gpio, pl061_acpi_driver, pl061_acpi_met static devclass_t pl061_devclass; -DRIVER_MODULE(pl061, acpi, pl061_driver, pl061_devclass, NULL, NULL); +EARLY_DRIVER_MODULE(pl061, acpi, pl061_acpi_driver, pl061_devclass, NULL, NULL, + BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE); MODULE_DEPEND(pl061, acpi, 1, 1, 1); MODULE_DEPEND(pl061, gpiobus, 1, 1, 1);