From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77707C32792 for ; Tue, 1 Oct 2019 02:54:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4AB6C20842 for ; Tue, 1 Oct 2019 02:54:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WvJzPJQ4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731539AbfJACy3 (ORCPT ); Mon, 30 Sep 2019 22:54:29 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:45774 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727669AbfJACy3 (ORCPT ); Mon, 30 Sep 2019 22:54:29 -0400 Received: by mail-pg1-f195.google.com with SMTP id q7so8562351pgi.12; Mon, 30 Sep 2019 19:54:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=sxdXfiuNl2yFvJ36iDY38onydEuHSgA4zj8cf4BOews=; b=WvJzPJQ4MYk59SYfnZ7pFb5nQLIKzWCZoHIr570P6ZkrSfBi7YIQrtO7bVjG7iOzK9 BBbTlJV9h1dsHl2dsEOZ5l8jcawQ2ktzMNogtNU14kUrJzxKKo1LwA/GIdcTJTVuZH3Z W1IGGYIzyyvMOXGW96LgoUgv6hP24vuuiOOKAn6+j+vR1vD5ydjA2/wa3pbRoTwrQp2S 1YlEodj+7RI5QCpw1uaOyLAqkTlKggU21qOrC0oIJuGOvgmupfh7tMG1Qr1adBaUHCp7 Cd0cpGr98ddYeeFpPl5nWq2/y4JPiYdMXoGR/7hfinHVKJ4wPcJQx1kuhQ8srAqHKIyj WZow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sxdXfiuNl2yFvJ36iDY38onydEuHSgA4zj8cf4BOews=; b=O0y2O372+yDIKqm/70WTqa8r+B50Zzhpkrf7QJrD38jYvvuCxbyURkW7YWUyYKrTUm b/Uz1HBrCwuvPOcyl+6ZlNVSr7FONkkxLG9ueNo2X82gwLAUrpqNDMvaiWIeuOV8nqVL kWuArZiwNyPyRUOYzO2+aq2ALM2kyzPZ9UTFTNKWRkDa/MqnqsUmSrybPInEIS2Dem1E WCzp4iXXajfq/iYxd91e3SYX24Cj5j5xlIFNpiSyzjMjsWAGl3wyhp3gvnx2eiWa0lC4 BrxN6mQYmAi1gah0i6xqdnDUoSiTmzvNHlIObCdO2T+Smg15XfGox219CZkrjdYrB33b TiKA== X-Gm-Message-State: APjAAAWbqIGltwcdLbMFcRWK5Hi+9JmeEXwvhNCTpBEjrgTIc9k5FrZj hBA1AW1qu0HzlskPJVfFIa9tQMTg X-Google-Smtp-Source: APXvYqziA8ujixxzDMRL/C5XU0l8zVQ8tUDosVuZXzauorvclA9c5mKPQjTamNyOJXRQJ+YAD+lh/Q== X-Received: by 2002:a62:4dc5:: with SMTP id a188mr234181pfb.250.1569898468601; Mon, 30 Sep 2019 19:54:28 -0700 (PDT) Received: from [192.168.1.3] (ip68-111-84-250.oc.oc.cox.net. [68.111.84.250]) by smtp.gmail.com with ESMTPSA id d76sm18347397pga.80.2019.09.30.19.54.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Sep 2019 19:54:28 -0700 (PDT) Subject: Re: Problem sharing interrupts between gpioa and uart0 on Broadcom Hurricane 2 (iProc) To: Chris Packham , "linus.walleij@linaro.org" , "rayagonda.kokatanur@broadcom.com" , "bcm-kernel-feedback-list@broadcom.com" , "li.jin@broadcom.com" , "sbranden@broadcom.com" , "rjui@broadcom.com" Cc: "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" References: <32c3d1dfe61a656e3250438d887e5ba91bd880d0.camel@alliedtelesis.co.nz> From: Florian Fainelli Message-ID: Date: Mon, 30 Sep 2019 19:54:28 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <32c3d1dfe61a656e3250438d887e5ba91bd880d0.camel@alliedtelesis.co.nz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On 9/30/2019 7:33 PM, Chris Packham wrote: > Hi, > > We have a platform using the BCM53344 integrated switch/CPU. This is > part of the Hurricane 2 (technically Wolfhound) family of devices. > > Currently we're using pieces of Broadcom's "iProc" SDK based on an out > of date kernel and we'd very much like to be running as close to > upstream as possible. The fact that the Ubiquiti UniFi Switch 8 is > upstream gives me some hope. FYI, I could not get enough information from the iProc SDK to port (or not) the clock driver, so if nothing else, that is an area that may require immediate work (though sometimes fixed-clocks would do just fine). > > My current problem is the fact that the uart0 interrupt is shared with > the Chip Common A gpio block. When I have and interrupt node on the > gpio in the device tree I get an init exit at startup. If I remove the > interrupt node the system will boot (except I don't get cascaded > interrupts from the GPIOs). > > Looking at the pinctrl-nsp-gpio.c it looks as though I might be able to > make this work if I can convince the gpio code to return IRQ_HANDLED or > IRQ_NONE but I'm struggling against the fact that the pinctrl-iproc- > gpio.c defers it's interrupt handing to the gpio core. Not sure I follow you here, what part is being handed to gpiolib? The top interrupt handler under nsp_gpio_irq_handler() will try to do exactly as you described. In fact, there are other iProc designs where "gpio-a" and another interrupt, arch/arm/boot/dts/bcm-nsp.dtsi is one such example and I never had problems with that part of NSP. > > Is there any way I can get the gpio core to deal with the shared > interrupt? -- Florian From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40BA3C32792 for ; Tue, 1 Oct 2019 02:54:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 116792168B for ; Tue, 1 Oct 2019 02:54:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Xoy4B2Hg"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WvJzPJQ4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 116792168B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6w9ZLnqA8EZZ+Y7YlKYU4PzmuoXNlpteB8Hgis7QfMU=; b=Xoy4B2HgpCmo/t ugXS/4soBbWKOFUEv/FdUEv0p3lS9AN+VX4qnMb9GH+CfoExM3Cppar0a/WijD+JJKIp6QDI6yF++ 6J63v+ciHxcdYQhFjaoSfeaU07gDK22kX6OehGF9iQviGsFl5RVxB9jmxjHPF+JbVfrojmxlVPoty fJyrqM9TKeQoMH3aZJnWsjZOY+LQpIX+o7amaJS4CSOvWzwyJpwX1QqKlTeWb9EhEtSicv3jrEGkf GL5++b8xC+PNNm3M7CcB25Yo6BLyxxgsmhaPyk46EKP7hTwnMmm49AsFQVmphmuLrt5+Q9I7/XtOe +KK2w37W+iuD7XLOFTLA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iF8J6-0001yV-6a; Tue, 01 Oct 2019 02:54:32 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iF8J3-0001y8-FJ for linux-arm-kernel@lists.infradead.org; Tue, 01 Oct 2019 02:54:30 +0000 Received: by mail-pf1-x443.google.com with SMTP id q21so6838106pfn.11 for ; Mon, 30 Sep 2019 19:54:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=sxdXfiuNl2yFvJ36iDY38onydEuHSgA4zj8cf4BOews=; b=WvJzPJQ4MYk59SYfnZ7pFb5nQLIKzWCZoHIr570P6ZkrSfBi7YIQrtO7bVjG7iOzK9 BBbTlJV9h1dsHl2dsEOZ5l8jcawQ2ktzMNogtNU14kUrJzxKKo1LwA/GIdcTJTVuZH3Z W1IGGYIzyyvMOXGW96LgoUgv6hP24vuuiOOKAn6+j+vR1vD5ydjA2/wa3pbRoTwrQp2S 1YlEodj+7RI5QCpw1uaOyLAqkTlKggU21qOrC0oIJuGOvgmupfh7tMG1Qr1adBaUHCp7 Cd0cpGr98ddYeeFpPl5nWq2/y4JPiYdMXoGR/7hfinHVKJ4wPcJQx1kuhQ8srAqHKIyj WZow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sxdXfiuNl2yFvJ36iDY38onydEuHSgA4zj8cf4BOews=; b=QprLTWAJF3Zq6+Ll4up7O6BRTEEws7FYpiFQ4/eshiGtpPV4Yt4RPoHIELGx+WR/R5 rmxFXgdoNjL8PcV0hqZDH+BzrLixyvGXd1OoAoP8uaCpeb60N3xLAMHlc2NEEkNRt3Xq XBDxmMTGByqo3nryQ+gTkUElOmUr6NE2MsAzVFyIbtFc6kmz3eNKTGc3jW8pwUJmP89i vFhlpA//O2al2ntwTamUxHO84wAnliqGXSndkSLO5jd3+XVZSCAhx6Fq/rMZWXz3nbGZ Vi796GixkXvTzlcPe7v50Tx5Qnnl2EQgIVfvIEYYqflrAQ4XJTtAs41bTE0aKje00rO2 ZCrg== X-Gm-Message-State: APjAAAXYhrcaM0qKF0YTrhRqnwn9K/sjO/JswQ5I22YyWCFwusX0/Ea7 4oXZxBTzU2pI4xLw34PBtPk= X-Google-Smtp-Source: APXvYqziA8ujixxzDMRL/C5XU0l8zVQ8tUDosVuZXzauorvclA9c5mKPQjTamNyOJXRQJ+YAD+lh/Q== X-Received: by 2002:a62:4dc5:: with SMTP id a188mr234181pfb.250.1569898468601; Mon, 30 Sep 2019 19:54:28 -0700 (PDT) Received: from [192.168.1.3] (ip68-111-84-250.oc.oc.cox.net. [68.111.84.250]) by smtp.gmail.com with ESMTPSA id d76sm18347397pga.80.2019.09.30.19.54.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Sep 2019 19:54:28 -0700 (PDT) Subject: Re: Problem sharing interrupts between gpioa and uart0 on Broadcom Hurricane 2 (iProc) To: Chris Packham , "linus.walleij@linaro.org" , "rayagonda.kokatanur@broadcom.com" , "bcm-kernel-feedback-list@broadcom.com" , "li.jin@broadcom.com" , "sbranden@broadcom.com" , "rjui@broadcom.com" References: <32c3d1dfe61a656e3250438d887e5ba91bd880d0.camel@alliedtelesis.co.nz> From: Florian Fainelli Message-ID: Date: Mon, 30 Sep 2019 19:54:28 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <32c3d1dfe61a656e3250438d887e5ba91bd880d0.camel@alliedtelesis.co.nz> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190930_195429_516480_B663836D X-CRM114-Status: GOOD ( 21.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 9/30/2019 7:33 PM, Chris Packham wrote: > Hi, > > We have a platform using the BCM53344 integrated switch/CPU. This is > part of the Hurricane 2 (technically Wolfhound) family of devices. > > Currently we're using pieces of Broadcom's "iProc" SDK based on an out > of date kernel and we'd very much like to be running as close to > upstream as possible. The fact that the Ubiquiti UniFi Switch 8 is > upstream gives me some hope. FYI, I could not get enough information from the iProc SDK to port (or not) the clock driver, so if nothing else, that is an area that may require immediate work (though sometimes fixed-clocks would do just fine). > > My current problem is the fact that the uart0 interrupt is shared with > the Chip Common A gpio block. When I have and interrupt node on the > gpio in the device tree I get an init exit at startup. If I remove the > interrupt node the system will boot (except I don't get cascaded > interrupts from the GPIOs). > > Looking at the pinctrl-nsp-gpio.c it looks as though I might be able to > make this work if I can convince the gpio code to return IRQ_HANDLED or > IRQ_NONE but I'm struggling against the fact that the pinctrl-iproc- > gpio.c defers it's interrupt handing to the gpio core. Not sure I follow you here, what part is being handed to gpiolib? The top interrupt handler under nsp_gpio_irq_handler() will try to do exactly as you described. In fact, there are other iProc designs where "gpio-a" and another interrupt, arch/arm/boot/dts/bcm-nsp.dtsi is one such example and I never had problems with that part of NSP. > > Is there any way I can get the gpio core to deal with the shared > interrupt? -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel