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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 C5BC4C433E0 for ; Tue, 30 Mar 2021 02:29:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C3516198F for ; Tue, 30 Mar 2021 02:29:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230523AbhC3C2l (ORCPT ); Mon, 29 Mar 2021 22:28:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230446AbhC3C20 (ORCPT ); Mon, 29 Mar 2021 22:28:26 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8EBCC061762 for ; Mon, 29 Mar 2021 19:28:25 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id hq27so22412034ejc.9 for ; Mon, 29 Mar 2021 19:28:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=as6TC2k6xEEVIuVX9cZ9mNSha9Pgs1VOeqieHwq2ZAk=; b=0/Hcptk+lGf7RA7QeLI8de294bHY+a6+K92ctHUL8ogRG3PRJi/RvJGGeRNOVzBZ6Y Cug7wcbQjiIeazHgGQ4vY9/DrdQ7aLvEjhZq1YapIeA0UPEcsZfp9NbpBfl6HT/5g9o0 aqmC7ovktIlGdSVnLxllh5zgTglmUD5sCzQW1wRApjaK3i2NGFrZszCzgp/bD468XxID UECyTZMdRNYozflEzmeZkUXjklvH21iraJm7mCNoaRLpuQq/grxfpcjSo8ZnodelOoIP xc3Yh9CKjzz6wy2jtyPdtDuSibDTYKHT313SllBRLqt0iNYx47SubGDemTVLxHWd6dBV 8h0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=as6TC2k6xEEVIuVX9cZ9mNSha9Pgs1VOeqieHwq2ZAk=; b=q6+BMHAFtPCy8gWSI5Bh3qj+s9Yr9/QpNfthb9ydRyvOmUYs3xGvxxCHgDJMS5rtPa nGvzXroye24BWaE1s8dWsnIP1PkdOrRnjVzGlGTlTQ87mmv9fYys56WpK/t5tIzEbeNS 60hWaRpwDHe3yX6PO0qr0/3wzoMbj8vtfzvisCLPAWwDNZFDCySHYALDlg/+limK10Mu huR6MgvKBYmMeYy+tKyhD1dPha3EjaelFkLJCPfujiLOjl8BCUdxRKsXeO16Z+hdu/gE 5yfWFg2sQN3n3u7yH3rvFb42xnSbqyGQj//uuBnT/n/6euS9jBs1mxsMdV7IJx8vuKoP a6FA== X-Gm-Message-State: AOAM5313oH7Rvynw5hKS0z6uqhSFznT5egMVg7hWFERT+6ljgNpgsvEq 25MC6/i0ZriEBgoe+XtKhTHSWL1AcEbQv14zZeKPGg== X-Google-Smtp-Source: ABdhPJxrtj444vLfa7by3n/VVs+in8qeM1zAKOJDHyFcmwzb3ptLOzZ9Ug2uMihG+7mETsyFGgfEz+SqnKrX+SstUUA= X-Received: by 2002:a17:906:e0d6:: with SMTP id gl22mr30819105ejb.444.1617071304549; Mon, 29 Mar 2021 19:28:24 -0700 (PDT) MIME-Version: 1.0 References: <20210329015938.20316-1-brad@pensando.io> <20210329015938.20316-4-brad@pensando.io> <20210329155843.GD5166@sirena.org.uk> In-Reply-To: <20210329155843.GD5166@sirena.org.uk> From: Brad Larson Date: Mon, 29 Mar 2021 19:28:14 -0700 Message-ID: Subject: Re: [PATCH v2 03/13] spi: dw: Add support for Pensando Elba SoC SPI To: Mark Brown Cc: Linux ARM , Arnd Bergmann , Linus Walleij , Bartosz Golaszewski , Serge Semin , Adrian Hunter , Ulf Hansson , Olof Johansson , "open list:GPIO SUBSYSTEM" , linux-spi , linux-mmc , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Mon, Mar 29, 2021 at 8:58 AM Mark Brown wrote: > > On Sun, Mar 28, 2021 at 06:59:28PM -0700, Brad Larson wrote: > > > @@ -56,7 +56,7 @@ struct dw_spi_mscc { > > /* > > * The Designware SPI controller (referred to as master in the documentation) > > * automatically deasserts chip select when the tx fifo is empty. The chip > > - * selects then needs to be either driven as GPIOs or, for the first 4 using the > > + * selects then needs to be either driven as GPIOs or, for the first 4 using > > * the SPI boot controller registers. the final chip select is an OR gate > > * between the Designware SPI controller and the SPI boot controller. > > */ > > This is an unrelated fix, please send as a separate patch as covered in > submitting-patches.rst. I'll remove this. Belongs in a trivial patch set. > > @@ -237,6 +237,31 @@ static int dw_spi_canaan_k210_init(struct platform_device *pdev, > > return 0; > > } > > > > +static void dw_spi_elba_set_cs(struct spi_device *spi, bool enable) > > +{ > > + struct dw_spi *dws = spi_master_get_devdata(spi->master); > > + > > + if (!enable) { > > + /* > > + * Using a GPIO-based chip-select, the DW SPI > > + * controller still needs its own CS bit selected > > + * to start the serial engine. On Elba the specific > > + * CS doesn't matter to start the serial engine, > > + * so using CS0. > > + */ > > Why does this comment only apply to one branch of the conditional? It doesn't, I'll move it outside the conditional. 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=-9.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 021CAC433C1 for ; Tue, 30 Mar 2021 02:34:05 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 86DE961989 for ; Tue, 30 Mar 2021 02:34:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 86DE961989 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pensando.io Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=cqDOiCtnjFtp5/hxZW0zUi9KaU4nkiyDVQfKuAomeEQ=; b=JIBTj79SNmWOm5bIqNw98i7pa LRzpfUJqXdecqJzBo/1ZD2L0wcs30/FnW1p5WADfBScKE0Nr/eblkhmBd86VWjXF3ubczyRZo2JXN gd5TaT56nays/WdwPo9F5+DKfoZb1fYh0pQvfTnBeHtclXp3HODBWs72RF0pUnUnLuv5C33v1VH8D 2y6FdCIvFYd7lGoXfyCONIH5THam9rny4cZkQZJPeYpVxnxx706ZZ7cZhCgiTW2ElrJoLHVrGIoYR Lq6SxpcoFkucJ4A/bzoKCtwSgn53IE5Rg3hhttkTZ9YwmJbc+OwviIX1l8U2g+Wa8PVH8pcWIu0gk WHLp/oJFg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lR4Aa-002RrX-38; Tue, 30 Mar 2021 02:31:52 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lR47F-002RfR-95 for linux-arm-kernel@lists.infradead.org; Tue, 30 Mar 2021 02:28:42 +0000 Received: by mail-ej1-x62a.google.com with SMTP id b7so22445232ejv.1 for ; Mon, 29 Mar 2021 19:28:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=as6TC2k6xEEVIuVX9cZ9mNSha9Pgs1VOeqieHwq2ZAk=; b=0/Hcptk+lGf7RA7QeLI8de294bHY+a6+K92ctHUL8ogRG3PRJi/RvJGGeRNOVzBZ6Y Cug7wcbQjiIeazHgGQ4vY9/DrdQ7aLvEjhZq1YapIeA0UPEcsZfp9NbpBfl6HT/5g9o0 aqmC7ovktIlGdSVnLxllh5zgTglmUD5sCzQW1wRApjaK3i2NGFrZszCzgp/bD468XxID UECyTZMdRNYozflEzmeZkUXjklvH21iraJm7mCNoaRLpuQq/grxfpcjSo8ZnodelOoIP xc3Yh9CKjzz6wy2jtyPdtDuSibDTYKHT313SllBRLqt0iNYx47SubGDemTVLxHWd6dBV 8h0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=as6TC2k6xEEVIuVX9cZ9mNSha9Pgs1VOeqieHwq2ZAk=; b=nzAKMJo2/744lbKMJHiZ7iNOCIJQ2ra3s/P/h0qzWizcoNvOQtblLkCTcjufzbGysF kEEJ88zrDO9/bgUIIXS4eqoHpfUd9dcdJlzr/aF8pPnm+hV2ruwffgioC/OpioZ557xr O2bxJ0A6G33vM1Su7MCKZ5xg/97Df0kwa7qvdr1uwCprzHt9vgVr3DE8Y42mKrf8ofrY l52jw8UJ/wvVs5iIwOjDtTNPwlc7hikwffZZyuueRQ76ZV2o2Fo1CYgGVf2iY+Y0S/Wd XbZI+6G4Logv/RRrtK7klQ+S9qaUiTCjgaOKHgSG1K/MG3e19o1nO3yiy50/ZIIlewG4 6K3Q== X-Gm-Message-State: AOAM533CYbr/T32rjORSJfl2CNiJ2VvjkcNqA/7JiYitZ8I8IpU7hr1Z WXMNq1fp89TA6wZ8FmWA99yL32Gi9mU8Ld+063Vzgw== X-Google-Smtp-Source: ABdhPJxrtj444vLfa7by3n/VVs+in8qeM1zAKOJDHyFcmwzb3ptLOzZ9Ug2uMihG+7mETsyFGgfEz+SqnKrX+SstUUA= X-Received: by 2002:a17:906:e0d6:: with SMTP id gl22mr30819105ejb.444.1617071304549; Mon, 29 Mar 2021 19:28:24 -0700 (PDT) MIME-Version: 1.0 References: <20210329015938.20316-1-brad@pensando.io> <20210329015938.20316-4-brad@pensando.io> <20210329155843.GD5166@sirena.org.uk> In-Reply-To: <20210329155843.GD5166@sirena.org.uk> From: Brad Larson Date: Mon, 29 Mar 2021 19:28:14 -0700 Message-ID: Subject: Re: [PATCH v2 03/13] spi: dw: Add support for Pensando Elba SoC SPI To: Mark Brown Cc: Linux ARM , Arnd Bergmann , Linus Walleij , Bartosz Golaszewski , Serge Semin , Adrian Hunter , Ulf Hansson , Olof Johansson , "open list:GPIO SUBSYSTEM" , linux-spi , linux-mmc , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210330_032838_684392_DF49CFE1 X-CRM114-Status: GOOD ( 24.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Mar 29, 2021 at 8:58 AM Mark Brown wrote: > > On Sun, Mar 28, 2021 at 06:59:28PM -0700, Brad Larson wrote: > > > @@ -56,7 +56,7 @@ struct dw_spi_mscc { > > /* > > * The Designware SPI controller (referred to as master in the documentation) > > * automatically deasserts chip select when the tx fifo is empty. The chip > > - * selects then needs to be either driven as GPIOs or, for the first 4 using the > > + * selects then needs to be either driven as GPIOs or, for the first 4 using > > * the SPI boot controller registers. the final chip select is an OR gate > > * between the Designware SPI controller and the SPI boot controller. > > */ > > This is an unrelated fix, please send as a separate patch as covered in > submitting-patches.rst. I'll remove this. Belongs in a trivial patch set. > > @@ -237,6 +237,31 @@ static int dw_spi_canaan_k210_init(struct platform_device *pdev, > > return 0; > > } > > > > +static void dw_spi_elba_set_cs(struct spi_device *spi, bool enable) > > +{ > > + struct dw_spi *dws = spi_master_get_devdata(spi->master); > > + > > + if (!enable) { > > + /* > > + * Using a GPIO-based chip-select, the DW SPI > > + * controller still needs its own CS bit selected > > + * to start the serial engine. On Elba the specific > > + * CS doesn't matter to start the serial engine, > > + * so using CS0. > > + */ > > Why does this comment only apply to one branch of the conditional? It doesn't, I'll move it outside the conditional. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel