From patchwork Thu Feb 13 02:59:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaedon Shin X-Patchwork-Id: 207305 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 C763EC352A4 for ; Thu, 13 Feb 2020 02:59:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F1132168B for ; Thu, 13 Feb 2020 02:59:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="daxpuG2m" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729545AbgBMC7s (ORCPT ); Wed, 12 Feb 2020 21:59:48 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:42431 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729538AbgBMC7s (ORCPT ); Wed, 12 Feb 2020 21:59:48 -0500 Received: by mail-pg1-f196.google.com with SMTP id w21so2258543pgl.9; Wed, 12 Feb 2020 18:59:47 -0800 (PST) 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=w1ACxcpxWUpfzA7rugNOMv+lfet19/IxHVNmDiRm8Aw=; b=daxpuG2mhvKGy6M+bSiOIwXjqRUVAN/lbjca+U36wYkrCCZX2EKevydXjk2r45oCpf vpkx5vstvROVHer+RuxLdwhIpYKjcvbwuwzTGzvg1xGRkPmItTiKij9A0UZHMCBvQCHq Xf4+FdrE9h2r9bx9Eu6Vxie/UfNPcQrcoNxBi8m2vNUZHZG1/hmsdm5mAhqhhgbpbYzr JPkmknGHuTRViDawI41aenAiSQpSweWVwounqIVc4+06YXSoMkYUQ8veXkCkxn3gMT19 OgVtOBuju6iHCFv6Y3XQmrWnrzN5OWVFobvYJEy720vHiib4d/1r+mE9d9DAFjag+9ib O3/w== 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=w1ACxcpxWUpfzA7rugNOMv+lfet19/IxHVNmDiRm8Aw=; b=ewIgtv939Z2FR+7JsI96H02XVmTDEOpgvf8jVJEudnDqExefpQ+RW5ZHGFh0tG2c5k /5a5Z+HLgZP+gnKrM+Z5BHFc57LBLxEmcADkOfoy4E08sJBJPmOcpcWNYoognTe8JxEj aCB7bebHPmabeJPY6xT7JXLdkv9DLm+BzW6nQmIa0I+M+01NNx7c0Q87q6wv1Pnzw7mp mRHDehD1Hi97o168IPJkiTdf7KSxzVknFU9jkRgfylmrMPlBVYfbL3/OxJNp9pRr/7T6 gddB23rAovUpoiCa0qItjseyZB1tBEewK2DPZhGz9JUwaKWoUaeuzFRw/myNpJZhN/Nh EmEw== X-Gm-Message-State: APjAAAW9gD/EuD1qowreJudVDCdQSAcoRaSAJ4ZTmCiBogbkKNuWWLWv Uuheun1rMeItMfFqrbgFHYY= X-Google-Smtp-Source: APXvYqxWHZU6f5pO82paK++ztXzf5iJMlD9SeitS31R2oQJvZ/P1yqFU3xfce65klYAvkb3EDr0Huw== X-Received: by 2002:a05:6a00:2b7:: with SMTP id q23mr11460797pfs.43.1581562787459; Wed, 12 Feb 2020 18:59:47 -0800 (PST) Received: from localhost.localdomain ([125.130.116.2]) by smtp.gmail.com with ESMTPSA id 64sm602643pfd.48.2020.02.12.18.59.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Feb 2020 18:59:47 -0800 (PST) From: Jaedon Shin To: Nicolas Saenz Julienne , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com Cc: Bjorn Helgaas , Rob Herring , Mark Rutland , Lorenzo Pieralisi , Andrew Murray , Gregory Fong , Linus Walleij , Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Jaedon Shin Subject: [PATCH 1/3] PCI: brcmstb: Enable ARCH_BRCMSTB Date: Thu, 13 Feb 2020 11:59:28 +0900 Message-Id: <20200213025930.27943-2-jaedon.shin@gmail.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122) In-Reply-To: <20200213025930.27943-1-jaedon.shin@gmail.com> References: <20200213025930.27943-1-jaedon.shin@gmail.com> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Add PCIe support for ARM-based Broadcom STB SoCs. Signed-off-by: Jaedon Shin --- Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml | 8 +++++++- drivers/pci/controller/Kconfig | 2 +- drivers/pci/controller/pcie-brcmstb.c | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml index 77d3e81a437b..fb1a78606f78 100644 --- a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml +++ b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml @@ -14,7 +14,13 @@ allOf: properties: compatible: - const: brcm,bcm2711-pcie # The Raspberry Pi 4 + oneOf: + - description: + BCM2711 based Boards + const: brcm,bcm2711-pcie + - description: + ARM-based BCM7XXX Broadcom STB Boards + const: brcm,bcm7445-pcie reg: maxItems: 1 diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig index 20bf00f587bd..c60a27cff81a 100644 --- a/drivers/pci/controller/Kconfig +++ b/drivers/pci/controller/Kconfig @@ -254,7 +254,7 @@ config VMD config PCIE_BRCMSTB tristate "Broadcom Brcmstb PCIe host controller" - depends on ARCH_BCM2835 || COMPILE_TEST + depends on ARCH_BCM2835 || ARCH_BRCMSTB || COMPILE_TEST depends on OF depends on PCI_MSI_IRQ_DOMAIN help diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index d20aabc26273..34581a6a7313 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -996,6 +996,7 @@ static int brcm_pcie_probe(struct platform_device *pdev) static const struct of_device_id brcm_pcie_match[] = { { .compatible = "brcm,bcm2711-pcie" }, + { .compatible = "brcm,bcm7445-pcie" }, {}, }; MODULE_DEVICE_TABLE(of, brcm_pcie_match); From patchwork Thu Feb 13 02:59:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaedon Shin X-Patchwork-Id: 207304 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 B666EC352A4 for ; Thu, 13 Feb 2020 02:59:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E05B2168B for ; Thu, 13 Feb 2020 02:59:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IIL6NVQF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729546AbgBMC74 (ORCPT ); Wed, 12 Feb 2020 21:59:56 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:38733 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729378AbgBMC74 (ORCPT ); Wed, 12 Feb 2020 21:59:56 -0500 Received: by mail-pg1-f194.google.com with SMTP id d6so2270080pgn.5; Wed, 12 Feb 2020 18:59:55 -0800 (PST) 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=FWL9gVxhHfG18kJOeUk3fD6tEj/BEQbVcbiFy71a6G8=; b=IIL6NVQFhgBPqd3xzyM73Ymzd0NxREmAFRHpKjqtuIsN+B3xEFuWU29pDGvgdkkn2P ZQ9nCD+p+ESw1phZlEumdMSDlfvOhTQmmDk+cX0eCgOMaNBrD6seyJgOXIZNZ3VNPGfn 0cBJCkQL2IQVJaNNXFoOVjtPWmnn3/jqhZaWDLU6ty5TuvZTI9DGaSV/k6UdMtbYMtjL kw1AEQDUhCqmzw2uMz15tqbjhKceYNZPp++NIShvseX4oogtd8wsa+FAkG4C1t0XYL+O JbeL96iAUTbkrt+Y10SBG1bnq5uEVWpW49E5qgwrPDhmNYAGYCFiMFO6I1UUuzYoqZXb lkYQ== 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=FWL9gVxhHfG18kJOeUk3fD6tEj/BEQbVcbiFy71a6G8=; b=NA8ISeOTXsAJ2TiYKuJpzaMGftHaIqLs7O54Rt2t27J5/u1QOvYTyQFcKYJznpQX+G DYdy1RcPrUdGHzAgHrXQ+IfU8J27WUZu4TGVXut+jYyo1WIYY8Rr2ME2MbirVRcfnoCA wA9RGir2OOxcm3NtuCfWTCGTqX2OQqlNh0gGDWjtXKDTaF77Yeh//VMeDSnaVppfYLES BuKTZlJOvfCz4HX8Nl4XdIJ5LdGgrdsT8W3V2L9a+12FM+PIVcFoGshcW5JTlAjTgOS6 gWBisx+qk4b5tYhKgn4rBtKSOhOIHq6om8+kXWvjGKxnO5rHoZ5ylvWXj4TsZyXrYNZc gqtQ== X-Gm-Message-State: APjAAAXaBoqjMg4CkeAEloQDeJYAdZzipa/QbVu1Ocy2ALu4wRy2Qav6 py0aLCAytwmLElCMRx07rno= X-Google-Smtp-Source: APXvYqwbqDHzihlVsSPDvVdo8SS90JnUF1N9IWw5udOtAYmfqHcjP5jqpmnQj6HQ7G3RHvmnhJ39kA== X-Received: by 2002:aa7:9e0b:: with SMTP id y11mr12203202pfq.182.1581562795547; Wed, 12 Feb 2020 18:59:55 -0800 (PST) Received: from localhost.localdomain ([125.130.116.2]) by smtp.gmail.com with ESMTPSA id 64sm602643pfd.48.2020.02.12.18.59.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Feb 2020 18:59:55 -0800 (PST) From: Jaedon Shin To: Nicolas Saenz Julienne , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com Cc: Bjorn Helgaas , Rob Herring , Mark Rutland , Lorenzo Pieralisi , Andrew Murray , Gregory Fong , Linus Walleij , Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Jaedon Shin Subject: [PATCH 3/3] PCI: brcmstb: Drop clk_put when probe fails and remove Date: Thu, 13 Feb 2020 11:59:30 +0900 Message-Id: <20200213025930.27943-4-jaedon.shin@gmail.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122) In-Reply-To: <20200213025930.27943-1-jaedon.shin@gmail.com> References: <20200213025930.27943-1-jaedon.shin@gmail.com> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org devm_clk_get* APIs are device managed and get freed automatically when the device detaches. so there is no reason to explicitly call clk_put() in probe or remove functions. Signed-off-by: Jaedon Shin --- drivers/pci/controller/pcie-brcmstb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index 0e0ca39a680b..3e48d9e238bb 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -972,7 +972,6 @@ static void __brcm_pcie_remove(struct brcm_pcie *pcie) brcm_pcie_turn_off(pcie); brcm_pcie_regulator_disable(pcie); clk_disable_unprepare(pcie->clk); - clk_put(pcie->clk); } static int brcm_pcie_remove(struct platform_device *pdev)