From owner-freebsd-arm@freebsd.org Mon Jul 25 16:32:26 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DDA2BA440C for ; Mon, 25 Jul 2016 16:32:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 05CBA12AA for ; Mon, 25 Jul 2016 16:32:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22f.google.com with SMTP id f6so109809245ith.0 for ; Mon, 25 Jul 2016 09:32:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=QKCY80C8L+zXbQcVDxmPxDiW9bDkRFRvzcNBD1pN9Q4=; b=gWAo/Ot49q7I8eBMHdPZQIyK/1jCV2QHM2YnJ7Umiz1HMfuDhFCoXxnon39/4kJ6M5 +qG3cRl/vkO6jf6VC78lkh+qeGtExPLv/AR3sU/Dq7klYsF7UDNPh1mTQWbnJjl4CImA G1ZQ9SwatXhW1G1qlNXUVXqMZjOS5eqauJ4fmtjCOVLdy8gA8pHz0TXytK73WTy7QO7E gyJlwCRWXbNo8me8PVdN5mXUwCHyXskxp9RFTNUq+uFXlH9Olu2g1n2FwChZ/Z4RZyaq nol4rxcVmeAPt4rMHh+guel1nAG4tRAhxVJZDs2YjhmckWRHF3uvgvhhiV9w6aC3HR33 qAfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=QKCY80C8L+zXbQcVDxmPxDiW9bDkRFRvzcNBD1pN9Q4=; b=muOyF4RxCe0fQTN7lnt02T2KwWbtwT2Iz3832VNum0PH1NWgctLRFaHRDGNmacwXiV BrO8VHByMJyuosV2D3o/02osV9y1RXNv7L3aYa08HBlSiHPBCNWfpYDrv6Kced7J0EqK RbjXyXvSvY+QtNsOqhdjxwCRCTq4vksVbzF24/kNpjk3b0ie7Wjyjmd+z0LOLO+yNzcZ 5QvVAK+Jfjr0/Pe8uU8On4IC5t052ynYauv1KO6EaDzs2o6KQZMCsh9tEVBo2JwGtH40 L3tMJ2HnKx8Fny6Nf8BfBCvLzhtK0m0yuCv02kCQGZ2KDhG1Ft84LnXiwgkfrFverLbT Bw1Q== X-Gm-Message-State: ALyK8tKzd05mYTrRZsmmluLdvT24ERnTw82ySTAqNPRG1JNu1Zgb77tDQwSbhZVsYmJbSUVQpNt4mm7X/rgs5g== X-Received: by 10.36.66.2 with SMTP id i2mr40710179itb.53.1469464345219; Mon, 25 Jul 2016 09:32:25 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.137.131 with HTTP; Mon, 25 Jul 2016 09:32:24 -0700 (PDT) X-Originating-IP: [50.205.115.50] In-Reply-To: References: <201606051620.u55GKD5S066398@repo.freebsd.org> <578E0B5D.3070105@FreeBSD.org> <578F6075.7010500@FreeBSD.org> <05a80ac6-4285-ec9d-36e9-2f92c609f746@freebsd.org> <57907B0F.9070204@FreeBSD.org> <9d2a224c-b787-2875-5984-a7a2354e8695@freebsd.org> <57934ABD.6010807@FreeBSD.org> <4e7a3e8f-cc21-f5f2-e3e0-4dbd554a4cd0@freebsd.org> <5794720F.4050303@FreeBSD.org> <8bfd8668-bc49-e109-e610-b5cd470be3ec@freebsd.org> <57950005.6070403@FreeBSD.org> <57961549.4020105@FreeBSD.org> From: Warner Losh Date: Mon, 25 Jul 2016 10:32:24 -0600 X-Google-Sender-Auth: puGqSw5KkQDAcsGN8wUg4sd6mPw Message-ID: Subject: Re: INTRNG (Was: svn commit: r301453....) To: Nathan Whitehorn Cc: Michal Meloun , Svatopluk Kraus , "freebsd-arch@freebsd.org" , "freebsd-arm@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 16:32:26 -0000 On Mon, Jul 25, 2016 at 8:05 AM, Nathan Whitehorn wrote: > That wasn't my question. Are these particular device drivers allocating > interrupts both on the GPIOs in their "interrupts" property (which are > entirely GPIOs in this example) *and* on the GPIOs listed as resources but > not listed as interrupts? If they are, then you need a switching mechanism, > but that seems pretty unlikely given the names of the non-interrupt GPIOs > (they look like outputs). It would also be a somewhat deranged way to set up > a device tree -- not that that rules it out or anything. On Atmel, there's a situation that this covers, I think. The MCI device has an interrupt in the core: mmc0: mmc@fffa8000 { compatible = "atmel,hsmci"; reg = <0xfffa8000 0x600>; interrupts = <9 IRQ_TYPE_LEVEL_HIGH 0>; #address-cells = <1>; #size-cells = <0>; pinctrl-names = "default"; clocks = <&mci0_clk>; clock-names = "mci_clk"; status = "disabled"; }; and in other places wires in GPIO interrupts for things like card eject / insertion. mmc0: mmc@f0008000 { pinctrl-0 = < &pinctrl_board_mmc0 &pinctrl_mmc0_slot0_clk_cmd_dat0 &pinctrl_mmc0_slot0_dat1_3>; status = "okay"; slot@0 { reg = <0>; bus-width = <4>; cd-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>; }; }; an interrupt is registered on the cd-gpios pin for when the card changes. At least in linux, FreeBSD doesn't (yet) implement this, but will someday if I get back to the armv6 atmel work I started (see at91-cosino.dts for example, there's others). I think this is an example of what you are asking about, or did I get lost in the twisty maze of conversation zigs and zags... Warner