From patchwork Mon Jun 15 08:03:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 214424 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.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT 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 4EE41C433E0 for ; Mon, 15 Jun 2020 08:03:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2A7892067B for ; Mon, 15 Jun 2020 08:03:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="up1WuBMw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728518AbgFOIDO (ORCPT ); Mon, 15 Jun 2020 04:03:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728386AbgFOIDN (ORCPT ); Mon, 15 Jun 2020 04:03:13 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 719A5C05BD43; Mon, 15 Jun 2020 01:03:13 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id e1so16060163wrt.5; Mon, 15 Jun 2020 01:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NNdjIWpqOIzd0m8ttGrmgbfjsjDdO4jG01Ng0RZ57Yk=; b=up1WuBMwGRcvmOXYMRqouxeXOkJd2O/E8BLE+kbVXTkkODXYZWAPVAt1O3quhdfszR 74kQKXRnYRikyNh6kE63AUijJ2vj/RSe05UTC6WIvc9OZJPEXFqP+RuYg0n1IVHPcLz8 okU0do5NxuhAVm3YVIUur12LMzc4S24BbpD/oPgbaa0X6trDyrXfxf6MA5+nh8KzZem/ 72FTMablLMbz2NirPdcOyOLbc1czKcW+tI5iUGmL6A0RUg1Sr10l/YIghBvdWFSwqcKN +0gSmjenHZvX6dPeOSWJ0mtA6m0AdG928bMW09S4rsOpMCsoLSkxshtZpbE+FvIlmJCR vt5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NNdjIWpqOIzd0m8ttGrmgbfjsjDdO4jG01Ng0RZ57Yk=; b=B62W4JhqQsOzHy/X2APmC/yO8cFDDHEiFRn8xaKMqszR7jAOA4ma8HEwfD6TaKpGYV TZ0Vu0zES4j9746HWRfafRRn5PIFo7gkbB1fqwhPBUJdWVWCdzQLo3yuPXitPyIZsN1v w5TRsT1ugArsiPtgGsInWGi2Xk4xslBCwUwkG09+B31uqEEoRFRtHT7R/MC94X3ei+vP +oM4J84snWQZVXN0MVh4OpSZhuxx7xlUNdt53UBB1KIwGHEQS+KfmL+QzWJSbO2WN4qx XNIUiM0/Sx4RZGZV+a5fkHT7RDXt5I/3tOdwgghwmYktYWMOYMWTg+vim4Hwgoxod0GR CRlQ== X-Gm-Message-State: AOAM532oX6eWE2TfqcfQa3lSXkztnWaQ9q/Prlm6bzU7EFBxSRtq2Vrc H89RIO5ehfjB2yr+cSecdqPBrynASEQ= X-Google-Smtp-Source: ABdhPJzete+uWJ/dRfkMk2DZxKBP3AjJL4ZDB4Hd3SecqASFs6WOH7JWnG/Kwn/bpOzCryfomdgelQ== X-Received: by 2002:a5d:6b81:: with SMTP id n1mr27100208wrx.411.1592208192034; Mon, 15 Jun 2020 01:03:12 -0700 (PDT) Received: from skynet.lan (168.red-88-20-188.staticip.rima-tde.net. [88.20.188.168]) by smtp.gmail.com with ESMTPSA id d9sm23107054wre.28.2020.06.15.01.03.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 01:03:11 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: broonie@kernel.org, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, p.zabel@pengutronix.de, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Subject: [PATCH 1/4] spi: bcm63xx-spi: add reset support Date: Mon, 15 Jun 2020 10:03:06 +0200 Message-Id: <20200615080309.2897694-2-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200615080309.2897694-1-noltari@gmail.com> References: <20200615080309.2897694-1-noltari@gmail.com> MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org bcm63xx arch resets the SPI controller at early boot. However, bmips arch needs to perform a reset when probing the driver. Signed-off-by: Álvaro Fernández Rojas --- drivers/spi/spi-bcm63xx.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c index 0f1b10a4ef0c..8ab04affaf7b 100644 --- a/drivers/spi/spi-bcm63xx.c +++ b/drivers/spi/spi-bcm63xx.c @@ -18,6 +18,7 @@ #include #include #include +#include /* BCM 6338/6348 SPI core */ #define SPI_6348_RSET_SIZE 64 @@ -493,6 +494,7 @@ static int bcm63xx_spi_probe(struct platform_device *pdev) struct bcm63xx_spi *bs; int ret; u32 num_cs = BCM63XX_SPI_MAX_CS; + struct reset_control *reset; if (dev->of_node) { const struct of_device_id *match; @@ -529,6 +531,15 @@ static int bcm63xx_spi_probe(struct platform_device *pdev) return PTR_ERR(clk); } + reset = devm_reset_control_get(dev, NULL); + if (IS_ERR(reset)) { + ret = PTR_ERR(reset); + if (ret != -EPROBE_DEFER) + dev_err(dev, + "failed to get reset controller: %d\n", ret); + return ret; + } + master = spi_alloc_master(dev, sizeof(*bs)); if (!master) { dev_err(dev, "out of memory\n"); @@ -579,6 +590,12 @@ static int bcm63xx_spi_probe(struct platform_device *pdev) if (ret) goto out_err; + ret = reset_control_reset(reset); + if (ret) { + dev_err(dev, "unable to reset device: %d\n", ret); + goto out_clk_disable; + } + bcm_spi_writeb(bs, SPI_INTR_CLEAR_ALL, SPI_INT_STATUS); /* register and we are done */ From patchwork Mon Jun 15 09:09:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 214418 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.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 1F62FC433E0 for ; Mon, 15 Jun 2020 09:10:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F285A2068E for ; Mon, 15 Jun 2020 09:10:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cSmicChq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729464AbgFOJJ7 (ORCPT ); Mon, 15 Jun 2020 05:09:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729364AbgFOJJt (ORCPT ); Mon, 15 Jun 2020 05:09:49 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4F9CC05BD1E; Mon, 15 Jun 2020 02:09:48 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id p5so16241359wrw.9; Mon, 15 Jun 2020 02:09:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1afpgiZSkCxScwIQYbqgkLwgpZTvEZ/sJp0E5CNcZ5k=; b=cSmicChqdnE/e5/HZWkV5Ec8+/awIFZcgGpkuyXPE8uc+KtRLP0YySLje0t5aSUxVZ XW/9637BuD4zITAyTfIPHOIE20qGjB0fNrTBimoAJz28OMhRq94sfJwbr4CSARuVQio7 VLVv6HjVjYLAreZ8NOXbHp44wxRq68NNLMWlYLnk2krkN4exeCL6mOkR3cDQOVT+4LIh A/Rfr0fERe4PiFozP9SE/bjOcMDmX8moj8HP0p3qklDEa9T565a1gu/avyBec7fCaNzp vhAI+FfWDJ50ESVxF/wMAYraTG5be3VsH20+8me+VWu7d5SxwrF8HlL8bBLA+UYklj2W 6NGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1afpgiZSkCxScwIQYbqgkLwgpZTvEZ/sJp0E5CNcZ5k=; b=NzmMWZcPdQdTzuFCMc83SfzzCaqeFPXq1+TAa6ANfGB6EueN8K+0jlHM/hwpx4DEYB Wb3bTVAc8kfVEm0z413T3skmMDaLOqeel6XoMYdqVtAfR/JEoRBVnYMSWaBNe+evprAE PJnYxofl+B+p2kDKNN/kwabyXqlehd5OiCrIU2MKAkyDbigjl4Z89jVVxB6gVgpwdKkO 9EJY7FgIu2G0uLsIHZFfJBpyOmeaUMBoViqTTp8viBu1dmwwjiCla7Ol7MF3qDoVFHuD ibEE81p4D2eJQSqMFNPBy+PN0kMbA6n4fAWGNMJvZv9heQIAfOxgZJSalrJtJ9H5FVjD +7XA== X-Gm-Message-State: AOAM533UA9bgqHNWRJm85M4TK+wqaeHc6/E3BkM0tBslFEjPWXlbechS wtkiI6+CxfNTTI0fe43V9wE= X-Google-Smtp-Source: ABdhPJyp/2xEDiDre/+ebYIfeT5x+ZslI9jh9sWzEs31ZYpZ305FIggGes5hxs4301Map+pqWXX70g== X-Received: by 2002:a5d:67c8:: with SMTP id n8mr27924127wrw.343.1592212187536; Mon, 15 Jun 2020 02:09:47 -0700 (PDT) Received: from skynet.lan (168.red-88-20-188.staticip.rima-tde.net. [88.20.188.168]) by smtp.gmail.com with ESMTPSA id z7sm23109370wrt.6.2020.06.15.02.09.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 02:09:47 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: broonie@kernel.org, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, p.zabel@pengutronix.de, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Subject: [PATCH v2 2/4] spi: bcm63xx-spi: allow building for BMIPS Date: Mon, 15 Jun 2020 11:09:41 +0200 Message-Id: <20200615090943.2936839-3-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200615090943.2936839-1-noltari@gmail.com> References: <20200615080309.2897694-1-noltari@gmail.com> <20200615090943.2936839-1-noltari@gmail.com> MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org bcm63xx-spi controller is present on several BMIPS SoCs (BCM6358, BCM6362, BCM6368 and BCM63268). Signed-off-by: Álvaro Fernández Rojas --- v2: no changes drivers/spi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 8f1f8fca79e3..a9896e388355 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -149,7 +149,7 @@ config SPI_BCM2835AUX config SPI_BCM63XX tristate "Broadcom BCM63xx SPI controller" - depends on BCM63XX || COMPILE_TEST + depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST help Enable support for the SPI controller on the Broadcom BCM63xx SoCs. From patchwork Mon Jun 15 08:03:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 214423 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.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT 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 3AD66C433E0 for ; Mon, 15 Jun 2020 08:03:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 117E82067B for ; Mon, 15 Jun 2020 08:03:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aHrtiM4I" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728626AbgFOID3 (ORCPT ); Mon, 15 Jun 2020 04:03:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728526AbgFOIDP (ORCPT ); Mon, 15 Jun 2020 04:03:15 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21045C05BD43; Mon, 15 Jun 2020 01:03:15 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id q11so16058951wrp.3; Mon, 15 Jun 2020 01:03:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yyxGbzg5FRRWYSJHpphoCM/7g3fdi4Cub/m4VF29fJ8=; b=aHrtiM4IgI231hsx5aGRUbfgOB/VAF55Jfu3aNyk3m+Wflrr1n9/1n5Bxze4ib0Twt HXF3rWSwGj5ULWJDTUHCAifQ3RwzcrJ6DTzQR2riuPsWiOcsxfs/qWIZEisZelML3wmJ LvcFKmx3ZM/vHUGPswD/og9g0aZ7yHhixoUXEoJzHooAho+sRfZ3sC+EbjUKkPb0BsQX lYuhVWc847T9ljikOITJBhvEXmeKNJihRFAt35HbiOr+9EPWBklwiODBwdZkQS+ML3GN 9d5n4KeIwqySxKHYo8eYWLD3J2gqohgk54AfltJV3ymIV+T8tMGYBr2w4foLAa9pE57K ZvTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yyxGbzg5FRRWYSJHpphoCM/7g3fdi4Cub/m4VF29fJ8=; b=Ku2rPUz292qweLXYpcMw9V1Tgm7+OwGqsHxihcGuoj/+IB4j+UvWj0LFz6BKKaxh9W AOLnk9VQBa+INSE3HaiAvuRUxRajruFzR9akED3yEmMxzLl611NU1cZ9+DDxIM6eVk3f s/jEUwLDHcUgNDePM5Hrn+hEpNJr8ChPC4Pu6rpFn0YZ++KeTEdu6s9JNc6gkbb3jSNw CkH4iCzy60oSWhK2uPd81xgkbBnUdMo2SRi0nF7MamQfxh1WSL6OqQaNioBTrDVxtyvd 7q08wKq+/gly+VkQ7HwYnDPAGvs8S1dnXfAx0VaaQ/3bz7aRdUA/DV821BdQhqShcTMN hZ1g== X-Gm-Message-State: AOAM53262FZkrxFGT5As9aXjIK+2Ls86yDrFm+SMFhJ03AMfTvA0VqPb 4VZIY/NTKoyXpNaFXfshydo= X-Google-Smtp-Source: ABdhPJyVfOfRWwPytyd/13wO0uW8sOuZZgWpictu6cZsZyACR5rnquhjY++l8vHSdSL1yyxVcvj/pg== X-Received: by 2002:adf:fd49:: with SMTP id h9mr28169413wrs.67.1592208193774; Mon, 15 Jun 2020 01:03:13 -0700 (PDT) Received: from skynet.lan (168.red-88-20-188.staticip.rima-tde.net. [88.20.188.168]) by smtp.gmail.com with ESMTPSA id d9sm23107054wre.28.2020.06.15.01.03.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 01:03:13 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: broonie@kernel.org, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, p.zabel@pengutronix.de, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Subject: [PATCH 3/4] spi: bcm63xx-hsspi: add reset support Date: Mon, 15 Jun 2020 10:03:08 +0200 Message-Id: <20200615080309.2897694-4-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200615080309.2897694-1-noltari@gmail.com> References: <20200615080309.2897694-1-noltari@gmail.com> MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org bcm63xx arch resets the HSSPI controller at early boot. However, bmips arch needs to perform a reset when probing the driver. Signed-off-by: Álvaro Fernández Rojas --- drivers/spi/spi-bcm63xx-hsspi.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c index 6c235306c0e4..a20a0b88c23a 100644 --- a/drivers/spi/spi-bcm63xx-hsspi.c +++ b/drivers/spi/spi-bcm63xx-hsspi.c @@ -20,6 +20,7 @@ #include #include #include +#include #define HSSPI_GLOBAL_CTRL_REG 0x0 #define GLOBAL_CTRL_CS_POLARITY_SHIFT 0 @@ -334,6 +335,7 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev) struct clk *clk, *pll_clk = NULL; int irq, ret; u32 reg, rate, num_cs = HSSPI_SPI_MAX_CS; + struct reset_control *reset; irq = platform_get_irq(pdev, 0); if (irq < 0) @@ -348,10 +350,25 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev) if (IS_ERR(clk)) return PTR_ERR(clk); + reset = devm_reset_control_get(dev, NULL); + if (IS_ERR(reset)) { + ret = PTR_ERR(reset); + if (ret != -EPROBE_DEFER) + dev_err(dev, + "failed to get reset controller: %d\n", ret); + return ret; + } + ret = clk_prepare_enable(clk); if (ret) return ret; + ret = reset_control_reset(reset); + if (ret) { + dev_err(dev, "unable to reset device: %d\n", ret); + goto out_disable_clk; + } + rate = clk_get_rate(clk); if (!rate) { pll_clk = devm_clk_get(dev, "pll"); From patchwork Mon Jun 15 09:09:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 214419 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.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 2E526C433DF for ; Mon, 15 Jun 2020 09:09:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0F2C62068E for ; Mon, 15 Jun 2020 09:09:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Eh8ZUSh5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729436AbgFOJJz (ORCPT ); Mon, 15 Jun 2020 05:09:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729362AbgFOJJv (ORCPT ); Mon, 15 Jun 2020 05:09:51 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B752CC061A0E; Mon, 15 Jun 2020 02:09:50 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id y20so14006325wmi.2; Mon, 15 Jun 2020 02:09:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KnGbf5grf0IkRGVHz6T6Je/lqrthZMXPB4yMEA/nohU=; b=Eh8ZUSh5wrn9ZW4a7Ao9x1tY3fRR/5c0ilkslt79XE8NFFHpQm8QvWeU5rFr2aYp1E tEej/CjmTV83cI49kr5d7hr7EJwG36KsyEOmftDFG0dpSZvO5oOsMv1V2Am6ZeoqB7V6 eCDXv9BIroOC6si3ck1daFL8VW3igDakwwbQcmVXT/HqHDmnwm9DpurEjBg/y4kBsBO+ GSnypJEESzOJvEnezdhlKZ3Uh7EQgRMKILVv2xGSmWO7+9LvRvpVViVTPgmZu396fXPk TJAjAdTqdzpllqpuLyhP0E3a/0EPvmXjY5cC4wslASEZIvhmB3wRWvdVhWpvPeez7id2 5vcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KnGbf5grf0IkRGVHz6T6Je/lqrthZMXPB4yMEA/nohU=; b=R9WlpTbClRsuQTxEkuMaZanOXVwtWHEpIQBL8yuhzhm2+V7U8iLk5omO4OikInL2Tg 8SqoZKZ/rudPM8tzwVfQ4+sBRBB03ARTg6B8EN2aw3G5ynbZj5tqy1w5f66c4YakqQuR 5lbPU+Tv+txe4Ef3jkXtWTtyhH6wjUVFcjOstY3dDW96K0BkGsQ+37syENvNr3EQJGx6 4vC5y6vo4hMrz+cI8ykACd5GuW7jEeI6fu2mCLnjlvfpAF0jGzXHNQlsj14Td2CtDMY7 CwdqjATXWcZES7F+SeYnqZ7RtrAoYKXczEmxn7KoBFFYhtCTP7WAj7MJYwsH1+aP6Ckw v2Eg== X-Gm-Message-State: AOAM530JC+SHQJs6lAczdnxio8LJLmf+RuFNvalWIHwW9ABkgk6Dn9Jr f1ovn79ctGePxziPC17iI3Y= X-Google-Smtp-Source: ABdhPJzfERI69ORfwOl4kiXFJAzXSSL2kMnLwByHcC0R8ycGyZA/K2B7Xgr6QOiZjOxn4jcAjIoU8w== X-Received: by 2002:a7b:c393:: with SMTP id s19mr12026304wmj.92.1592212189426; Mon, 15 Jun 2020 02:09:49 -0700 (PDT) Received: from skynet.lan (168.red-88-20-188.staticip.rima-tde.net. [88.20.188.168]) by smtp.gmail.com with ESMTPSA id z7sm23109370wrt.6.2020.06.15.02.09.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 02:09:48 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: broonie@kernel.org, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, p.zabel@pengutronix.de, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Subject: [PATCH v2 4/4] spi: bcm63xx-hsspi: allow building for BMIPS Date: Mon, 15 Jun 2020 11:09:43 +0200 Message-Id: <20200615090943.2936839-5-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200615090943.2936839-1-noltari@gmail.com> References: <20200615080309.2897694-1-noltari@gmail.com> <20200615090943.2936839-1-noltari@gmail.com> MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org bcm63xx-hsspi controller is present on several BMIPS SoCs (BCM6318, BCM6328, BCM6362 and BCM63268). Signed-off-by: Álvaro Fernández Rojas --- v2: no changes drivers/spi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index a9896e388355..500774fe1351 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -155,7 +155,7 @@ config SPI_BCM63XX config SPI_BCM63XX_HSSPI tristate "Broadcom BCM63XX HS SPI controller driver" - depends on BCM63XX || ARCH_BCM_63XX || COMPILE_TEST + depends on BCM63XX || BMIPS_GENERIC || ARCH_BCM_63XX || COMPILE_TEST help This enables support for the High Speed SPI controller present on newer Broadcom BCM63XX SoCs.