From patchwork Fri Jan 20 11:21:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92053 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp730651qgi; Fri, 20 Jan 2017 03:22:41 -0800 (PST) X-Received: by 10.84.217.18 with SMTP id o18mr20888487pli.51.1484911360944; Fri, 20 Jan 2017 03:22:40 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d74si6552000pfd.278.2017.01.20.03.22.40; Fri, 20 Jan 2017 03:22:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751681AbdATLWR (ORCPT + 25 others); Fri, 20 Jan 2017 06:22:17 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:33262 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751759AbdATLWL (ORCPT ); Fri, 20 Jan 2017 06:22:11 -0500 Received: by mail-wm0-f48.google.com with SMTP id d140so13252970wmd.0 for ; Fri, 20 Jan 2017 03:22:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Np8J31QMVKo0TWrN8tae6i857vDV9HxI8QIeDQsqpgE=; b=pz84fhrlVwNWISHrhmYCZ+z021oEcbueca/BfufjafPe19jUPf/l3IMkuOSpMW8vbX siGjcgrIkLXLf/iQvnc/0hnuhDgNLrKrVMUe5WM8OgOrobKwGU0mJUhBRuwrEOm5Y3iF dNTtPNu0zqGCyz/i7G8ubIG0Pj5Wts2l9PdJh/Bx2i/3ANminsQ4JrhFKtlRobv3xWlZ h1BNbsXi3xgMV0yc5QCUGXtVIBINev0xOAfzqc7ZlBgJIrzq8i22A4BSe4xZ2sBlyccG 9PB7wPK33I7M+NZgsrYtQj4LZ+vkqM7M06/rrC2KhlQtOrP0qwNwG6/mDzMtsYg+H79o /YQA== 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; bh=Np8J31QMVKo0TWrN8tae6i857vDV9HxI8QIeDQsqpgE=; b=imAZCs6V4hK2Y2v4g19xRZ6eAPatyTZmeX94s5ON8DWnJ0in5zyiaxlwardVuDfB+u I39dy/slpt0i1rea3JxCC2JUhEUiIzGU/+PSeODxsXccFDLwqN37mSRo3IsswF+wDpfM KrOi2bjrg2JHU0IclM+SKDHSzgifPhiXS1DyYsOkJUr5DR9CcmOd/TpO00QGvFfTI73r 3fMfOeWol+bVBOILHNE2+ivuJMn6b3wn0OiKN7PUOBRIa+rGKWaMa2NcXl/aXaSa58YM SgisDXJPVqfX3tfpoQs3JD86dunPCwtOa/Wop1fcf6M/KDFqH3yiKWgX1GNyUIhn2YjB 0VhQ== X-Gm-Message-State: AIkVDXIV06O949BXVK/uvo9rNc0PdLDGAiU1jOAgfcBah4AWZ4qXABW9QiZkOWTyipxtygvt X-Received: by 10.223.178.146 with SMTP id g18mr11587650wrd.124.1484911329940; Fri, 20 Jan 2017 03:22:09 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id l74sm5482402wmg.2.2017.01.20.03.22.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Jan 2017 03:22:09 -0800 (PST) From: Bartosz Golaszewski To: Kevin Hilman , Sekhar Nori , Patrick Titiano , Michael Turquette , Tejun Heo , Rob Herring , Mark Rutland , Russell King , David Lechner Cc: linux-ide@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH v5 01/14] devicetree: bindings: add bindings for ahci-da850 Date: Fri, 20 Jan 2017 12:21:52 +0100 Message-Id: <1484911325-23425-2-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> References: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add DT bindings for the TI DA850 AHCI SATA controller. Signed-off-by: Bartosz Golaszewski --- Documentation/devicetree/bindings/ata/ahci-da850.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Documentation/devicetree/bindings/ata/ahci-da850.txt -- 2.9.3 diff --git a/Documentation/devicetree/bindings/ata/ahci-da850.txt b/Documentation/devicetree/bindings/ata/ahci-da850.txt new file mode 100644 index 0000000..268fe87 --- /dev/null +++ b/Documentation/devicetree/bindings/ata/ahci-da850.txt @@ -0,0 +1,15 @@ +Device tree binding for the TI DA850 AHCI SATA Controller +--------------------------------------------------------- + +Required properties: + - compatible: must be "ti,da850-ahci" + - reg: physical base addresses and sizes of the controller's register areas + - interrupts: interrupt specifier (refer to the interrupt binding) + +Example: + + sata: sata@218000 { + compatible = "ti,da850-ahci"; + reg = <0x218000 0x2000>, <0x22c018 0x4>; + interrupts = <67>; + }; From patchwork Fri Jan 20 11:21:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92063 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp731179qgi; Fri, 20 Jan 2017 03:24:11 -0800 (PST) X-Received: by 10.55.53.77 with SMTP id c74mr11919538qka.7.1484911451489; Fri, 20 Jan 2017 03:24:11 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id l66si762095qkd.4.2017.01.20.03.24.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jan 2017 03:24:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cUXIf-00073u-IJ; Fri, 20 Jan 2017 11:24:09 +0000 Received: from mail-wm0-f45.google.com ([74.125.82.45]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cUXI4-00064S-Pl for linux-arm-kernel@lists.infradead.org; Fri, 20 Jan 2017 11:23:34 +0000 Received: by mail-wm0-f45.google.com with SMTP id c206so38669667wme.0 for ; Fri, 20 Jan 2017 03:23:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SuLhxCo93043rn2eTnXL5rUa/MT6PfsUvS81uBerQyc=; b=Qo7kpnm+iSygzYYZgUi9zyABPSvchY+M97oPQPdcT7FInNP+OC9hng3eZNgtAqxNDT 5hMOMUUAdunAqSBJCiM0TVwEFZ5P1xipzmCcNxij6sf5fsznkdgH9NgPId4afb3L+slg s+Qb0WW5ofNHIdcezvb0nLajoSuHBvAZsOgtQHwQhVaHCUnCZD+I0UDqSUQHjI6L+HyZ INDNRn47t7YTZKt8YNoaPlmf9PjIqcdbdt8A798TZ0lDLX9mK7b8OtU8Xvcxsn3DAUU8 o2FMP2U09OI50IuXfPbFLcu0zKklu6IIpgkwddC82Y3rkVTDjCiO7VXwh7J1sUSKsYyt RJpw== 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; bh=SuLhxCo93043rn2eTnXL5rUa/MT6PfsUvS81uBerQyc=; b=HGbAnQUUGNW3kuncDpT9ORVhf5b9VXr1JKxKvCQcSYHXYDVLIMCI/5QSlOresLSROF G+6kS7IvccrHvze0E3V/h9S54AODPxVdNUP57w6RHIhZpK1k08o7GffC7WjaL7KdcHti Bj6t9MZb18x1JBk0PQD83/thQowMIbUVkqGJl4+wrd4dhMeAZTy+MUGvH2VHs16tqGtu Fz9iZcfVQnLsp2pVDjcAgX7PkxLejug+n695+tB4GiuagKgmfiOLjbYRh0+hr/aS4y1x 7xRe9KsiQOO6iDTLbeMEOgklKQwRCOxlYqeXZrUOZ2wBOcVPj4tuQ8L7ACRumPnEAGrd q5Wg== X-Gm-Message-State: AIkVDXLVyj0HnahykQ5U6RvXHfXNZHmTX+Jbt14BP6dHpJ/YMhZvxdNpnNpKMmVkPul5GqTJ X-Received: by 10.223.135.146 with SMTP id b18mr11081132wrb.189.1484911331146; Fri, 20 Jan 2017 03:22:11 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id l74sm5482402wmg.2.2017.01.20.03.22.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Jan 2017 03:22:10 -0800 (PST) From: Bartosz Golaszewski To: Kevin Hilman , Sekhar Nori , Patrick Titiano , Michael Turquette , Tejun Heo , Rob Herring , Mark Rutland , Russell King , David Lechner Subject: [PATCH v5 02/14] ARM: davinci_all_defconfig: enable SATA modules Date: Fri, 20 Jan 2017 12:21:53 +0100 Message-Id: <1484911325-23425-3-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> References: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170120_032332_990012_51F41CDD X-CRM114-Status: UNSURE ( 9.12 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [74.125.82.45 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.82.45 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.45 listed in wl.mailspike.net] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-ide@vger.kernel.org, Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Add the da850-ahci driver to davinci defconfig. Signed-off-by: Bartosz Golaszewski --- arch/arm/configs/davinci_all_defconfig | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.3 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig index 8806754..a1b9c58 100644 --- a/arch/arm/configs/davinci_all_defconfig +++ b/arch/arm/configs/davinci_all_defconfig @@ -78,6 +78,8 @@ CONFIG_IDE=m CONFIG_BLK_DEV_PALMCHIP_BK3710=m CONFIG_SCSI=m CONFIG_BLK_DEV_SD=m +CONFIG_ATA=m +CONFIG_AHCI_DA850=m CONFIG_NETDEVICES=y CONFIG_NETCONSOLE=y CONFIG_TUN=m From patchwork Fri Jan 20 11:21:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92064 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp731267qgi; Fri, 20 Jan 2017 03:24:24 -0800 (PST) X-Received: by 10.237.33.209 with SMTP id m17mr11821292qtc.59.1484911464826; Fri, 20 Jan 2017 03:24:24 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id w33si4683386qtw.158.2017.01.20.03.24.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jan 2017 03:24:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cUXIs-0007TM-SZ; Fri, 20 Jan 2017 11:24:22 +0000 Received: from mail-wm0-f51.google.com ([74.125.82.51]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cUXI5-00064b-Un for linux-arm-kernel@lists.infradead.org; Fri, 20 Jan 2017 11:23:35 +0000 Received: by mail-wm0-f51.google.com with SMTP id c206so38670320wme.0 for ; Fri, 20 Jan 2017 03:23:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pEMVlKeHnZyLbrskLNP5Hg/U2D2r0K/Mtr19y5+6CCg=; b=CHqmrHXgOQX/sD3GzbT0oF75xBjeK9cGmn4/MM3lMnGBACQPSpFDcFCaznAcd6w5Fo Bq3FYpIRaMjNo5RcYFmWxGroZiY245ITRHpa68bNi4ouCiRAkO96ygY6Rz9NrwU9+sJ0 YpNcCXRAkmomSGmsNFGts2q8PeFIavpAMWEpnfSdYmqg6fyE/fVT4iqQjonL3SpQv2lO 3iAj+aDcekD+8SH1Y16FvA5YNa5FkzI4Vg1TSRjNd3dyFgXEuapZIrUBjW8nWXEtCIz4 aexpaKlfTdW+u8oV/b38LZNsbqr+/p4hO6F3sUvac0+beShNEykumUC+30+JnBW51b9L 9Lvw== 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; bh=pEMVlKeHnZyLbrskLNP5Hg/U2D2r0K/Mtr19y5+6CCg=; b=oFpiy3tEZuzooNti8KsX3XeJHiNz8BxhV6/LLqsNwgQ3kqHzJb1NSin3xC9HayNbA0 EUXy6Squud9P2z+eGcdQXP6u4tqQvztkfY2SLbJslDn/J7PYnfvBThDZyuhL4RaGXIO/ itCJbzSkCuJfx7PYBtUbnyJ/1kIU4VlH6QxKKcXR/w5NX9iqdYvtQ+ovlL67SDvCwy8C velPseumXF6ukSwYxblZ1BN7I8Im2EM/gIpIF89jDJZQsPkCvNJ+aONqNg+SNkMW/cHX 6gHqf+I285aow0hhQDi3PtTNjLWDSJMKU1eYSlOdvggfGXHSWdn15h7yxo7KNcpXGqZ9 K8EA== X-Gm-Message-State: AIkVDXJdaKf0WVvsxYraCRIepKUTZ1rmtshJifZQx55c2UdeOSH7EXnqrw21t06MvA2apHeT X-Received: by 10.28.91.16 with SMTP id p16mr2835656wmb.111.1484911332244; Fri, 20 Jan 2017 03:22:12 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id l74sm5482402wmg.2.2017.01.20.03.22.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Jan 2017 03:22:11 -0800 (PST) From: Bartosz Golaszewski To: Kevin Hilman , Sekhar Nori , Patrick Titiano , Michael Turquette , Tejun Heo , Rob Herring , Mark Rutland , Russell King , David Lechner Subject: [PATCH v5 03/14] ARM: davinci: add a clock lookup entry for the SATA clock Date: Fri, 20 Jan 2017 12:21:54 +0100 Message-Id: <1484911325-23425-4-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> References: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170120_032334_145960_04433206 X-CRM114-Status: GOOD ( 10.89 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [74.125.82.51 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.82.51 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.51 listed in wl.mailspike.net] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-ide@vger.kernel.org, Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org This entry is needed for the ahci driver to get a functional clock. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/da8xx-dt.c | 1 + 1 file changed, 1 insertion(+) -- 2.9.3 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index 9ee44da..b83e5d1 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c @@ -42,6 +42,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("ti,da830-ohci", 0x01e25000, "ohci-da8xx", NULL), OF_DEV_AUXDATA("ti,da830-musb", 0x01e00000, "musb-da8xx", NULL), OF_DEV_AUXDATA("ti,da830-usb-phy", 0x01c1417c, "da8xx-usb-phy", NULL), + OF_DEV_AUXDATA("ti,da850-ahci", 0x01e18000, "ahci_da850", NULL), {} }; From patchwork Fri Jan 20 11:21:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92065 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp731365qgi; Fri, 20 Jan 2017 03:24:40 -0800 (PST) X-Received: by 10.237.62.68 with SMTP id m4mr11355634qtf.171.1484911480546; Fri, 20 Jan 2017 03:24:40 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id p14si4677853qke.164.2017.01.20.03.24.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jan 2017 03:24:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cUXJ8-0007si-3y; Fri, 20 Jan 2017 11:24:38 +0000 Received: from mail-wm0-f43.google.com ([74.125.82.43]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cUXI6-00065P-RE for linux-arm-kernel@lists.infradead.org; Fri, 20 Jan 2017 11:23:36 +0000 Received: by mail-wm0-f43.google.com with SMTP id c85so32866216wmi.1 for ; Fri, 20 Jan 2017 03:23:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dd3oaffUvdNALpCuH4cA+p+i9l+V6/HOJQHNkF+ruQc=; b=0rdwPwXHHZe99K8EAJWCiAIxD1IzP0ig2IX0a4A44Tca5edTw5BfTD3lgxQ7Z45RAk ki4kUOaPazTXTf+48COY/m0nLHKRHeqb67QlgKv1VTLoa7RseENBguQe9yKVlNqgLwNZ FePf908Fsm2t+H7Ol1ybLWRI9SyP2Lh2YNbZCuLSRoE9B9ML/21quJbCNmI81wa2yhZB Exfl8JztkXfwfuCkm5VvAl87XBgw8L4nC1CtpQLsuz9rDq/9golTekzcbC9GA4BxHZXO R0PGadvwNvlVAjtlgMisACHLWr/x6fV95wvUvYvGRJZFkhk69N9rFeydpMagt3yt/HAA tQEw== 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; bh=dd3oaffUvdNALpCuH4cA+p+i9l+V6/HOJQHNkF+ruQc=; b=DRGmjNKcGvh0bkg3Oj/lDa7Tsh9rXDCffliFy0oyLdIA0/XwNNseUaGz0pCz63OUgt 0VkKbIRAft6Rjui5c7Q6/o8g7MtwlW7ZCKzvcsw9sucuLrSaq+VTpXW/MJZui4BoPOZ1 qydxc/B3x27wgwROKNR0yyQZCZLFU8dqZkIao1oZrkOGyqHwJ6igl8LXF6yfkjxX4uf1 7I4oVNwNz3SRhcwl3pLuWR+beONjVFvgVUwvmGZIdc/eitdu1oUgixblbQNpAqTwZk1C /C7KSI1TQHF21ihwK8DFN85hrXztG+pUewjTseZTaTHqDxd9A9givS+Nsgc1Dmm37rop oPog== X-Gm-Message-State: AIkVDXKnaikkxcYq2yTgXlyGH4jtmRGQNY4Ccc6rk/XIDLFwLXkJqFGie9e7VPDboKDvnkT/ X-Received: by 10.28.210.139 with SMTP id j133mr2808200wmg.67.1484911333372; Fri, 20 Jan 2017 03:22:13 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id l74sm5482402wmg.2.2017.01.20.03.22.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Jan 2017 03:22:12 -0800 (PST) From: Bartosz Golaszewski To: Kevin Hilman , Sekhar Nori , Patrick Titiano , Michael Turquette , Tejun Heo , Rob Herring , Mark Rutland , Russell King , David Lechner Subject: [PATCH v5 04/14] sata: ahci-da850: get the sata clock using a connection id Date: Fri, 20 Jan 2017 12:21:55 +0100 Message-Id: <1484911325-23425-5-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> References: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170120_032335_104623_BA3AE5D0 X-CRM114-Status: GOOD ( 13.79 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [74.125.82.43 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.82.43 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.43 listed in wl.mailspike.net] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-ide@vger.kernel.org, Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org In preparation for using two clocks in the driver (the sysclk2-based clock and the external REFCLK), check if we got a functional clock after calling ahci_platform_get_resources(). If not, retry calling clk_get() with con_id specified. Signed-off-by: Bartosz Golaszewski --- drivers/ata/ahci_da850.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 2.9.3 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c index 267a3d3..8cfdc86 100644 --- a/drivers/ata/ahci_da850.c +++ b/drivers/ata/ahci_da850.c @@ -71,12 +71,28 @@ static int ahci_da850_probe(struct platform_device *pdev) struct ahci_host_priv *hpriv; struct resource *res; void __iomem *pwrdn_reg; + struct clk *clk; int rc; hpriv = ahci_platform_get_resources(pdev); if (IS_ERR(hpriv)) return PTR_ERR(hpriv); + /* + * Internally ahci_platform_get_resources() calls clk_get(dev, NULL) + * when trying to obtain the first clock. This SATA controller uses + * two clocks for which we specify two connection ids. If we don't + * have a clock at this point - call clk_get() again with + * con_id = "sata". + */ + if (!hpriv->clks[0]) { + clk = clk_get(dev, "sata"); + if (IS_ERR(clk)) + return PTR_ERR(clk); + + hpriv->clks[0] = clk; + } + rc = ahci_platform_enable_resources(hpriv); if (rc) return rc; From patchwork Fri Jan 20 11:21:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92066 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp731584qgi; Fri, 20 Jan 2017 03:25:12 -0800 (PST) X-Received: by 10.55.108.193 with SMTP id h184mr11777280qkc.155.1484911511993; Fri, 20 Jan 2017 03:25:11 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id z145si3487156qka.13.2017.01.20.03.25.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jan 2017 03:25:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cUXJd-00019Q-1F; Fri, 20 Jan 2017 11:25:09 +0000 Received: from mail-wm0-f53.google.com ([74.125.82.53]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cUXI8-00065Z-9s for linux-arm-kernel@lists.infradead.org; Fri, 20 Jan 2017 11:23:39 +0000 Received: by mail-wm0-f53.google.com with SMTP id r126so33001353wmr.0 for ; Fri, 20 Jan 2017 03:23:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PdMi32VU7SUB8yLeEonUI7oP0Mw7IRX/ft+q/dhFlfY=; b=IsETEqjOy1cdG8r3deFPazj5fVqzDoD5DubBk/UNdT09S/4M7HVQrVRWYBugJqIpln WFuZxQevA1nkqe//EgMd7X/eHJbXxrsLCv64Oc37Xy4DpINxjYWpL1/EGIkuVGPyHMkB GkdcYgFgd2x0ok83PN2bfIE8IptsAb0QJlAFNwZkzG28YD7ai11ycGSeZPtd2V6J+W6K bNLS4d7hbZOKvCeP4SUhoUUa4zyGTizS9ZFtVo+MPcXGp2jrEaHR4fYpHocZLEOUmHAm wKy975iOYaE1Qqv89cllS++SMDExNuIZ+SpJO0B5vZb8dlF3GGaxiB6olbjVsvfwvebE hJwQ== 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; bh=PdMi32VU7SUB8yLeEonUI7oP0Mw7IRX/ft+q/dhFlfY=; b=Tkg3hpW08RcUe05Ima3Ke10W1AvHSe7ooPQWtpb+SBpsTPr7VCkXLmSJov9KWqy84Y FqeEkc+iXdUxE+9A4HOY1vnoJK6OvGcppUN7dnCUTVv8QHxP0RIeuFTb46SwGPjLngtr 1VT1yYpVVB8NJxAUdIQnm4zbCTZLj+603+q3fj81Mhq9v20yQIncCaG1Tv/a8PujR6+j uz6h0G9fqWztuMRzmWfvwDkciEZCftTAJqlvAOZsWnUbqSIhHk3wqbpIkBXZM3KzyqEF erOpB4DhEcUBZo9mbwv5lRwOQIIqqjx+JGZbUNeArTev2ruy4RQD2givGzgFRFwxmKqm Bamg== X-Gm-Message-State: AIkVDXLJzw8q/raTVUR3tWZcZ3KSKO94ZJVc1HrVl7mSquAQTRsluRoVJjD1mouAEuo0RheW X-Received: by 10.223.164.151 with SMTP id g23mr11577718wrb.86.1484911334553; Fri, 20 Jan 2017 03:22:14 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id l74sm5482402wmg.2.2017.01.20.03.22.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Jan 2017 03:22:13 -0800 (PST) From: Bartosz Golaszewski To: Kevin Hilman , Sekhar Nori , Patrick Titiano , Michael Turquette , Tejun Heo , Rob Herring , Mark Rutland , Russell King , David Lechner Subject: [PATCH v5 05/14] ARM: davinci: da850: add con_id for the SATA clock Date: Fri, 20 Jan 2017 12:21:56 +0100 Message-Id: <1484911325-23425-6-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> References: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170120_032336_688369_8117B27C X-CRM114-Status: GOOD ( 10.94 ) X-Spam-Score: -1.3 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.82.53 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.53 listed in wl.mailspike.net] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-ide@vger.kernel.org, Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The ahci-da850 SATA driver is now capable of retrieving clocks by con_id. Add the connection id for the sysclk2-derived SATA clock. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/da850.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.3 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 1d873d1..dbf1daa 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -571,7 +571,7 @@ static struct clk_lookup da850_clks[] = { CLK("spi_davinci.0", NULL, &spi0_clk), CLK("spi_davinci.1", NULL, &spi1_clk), CLK("vpif", NULL, &vpif_clk), - CLK("ahci_da850", NULL, &sata_clk), + CLK("ahci_da850", "sata", &sata_clk), CLK("davinci-rproc.0", NULL, &dsp_clk), CLK(NULL, NULL, &ehrpwm_clk), CLK("ehrpwm.0", "fck", &ehrpwm0_clk), From patchwork Fri Jan 20 11:21:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92054 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp730654qgi; Fri, 20 Jan 2017 03:22:41 -0800 (PST) X-Received: by 10.98.194.153 with SMTP id w25mr15876684pfk.181.1484911361284; Fri, 20 Jan 2017 03:22:41 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d74si6552000pfd.278.2017.01.20.03.22.41; Fri, 20 Jan 2017 03:22:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752056AbdATLWW (ORCPT + 25 others); Fri, 20 Jan 2017 06:22:22 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:36430 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751981AbdATLWR (ORCPT ); Fri, 20 Jan 2017 06:22:17 -0500 Received: by mail-wm0-f48.google.com with SMTP id c85so32867498wmi.1 for ; Fri, 20 Jan 2017 03:22:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MVOVlMW/ybWoes+XT/Wiqvk9IQhXHTWV3d2Yn+3B0NM=; b=T6gzl9HyGK55GI2aibVlSUvEKMzsJ/QOqM7JLj+mwEUUU4Mac60LvzwBlAOZ1PMq2b 3pKbOXU+vPTeXJlhPqI1mALkk/g+7FAybssHRqjOoBYSUXKxhhEG6/CBH8i1GjTus0lC WXGwm0DmGk8bMB402HxWVQBU02hn7AYtqZpMuEcX0ZoAEsGRmzOywuDeyl5U4BGLKidL VQvBK9J0G1vXYWzf/sLJfd3BGHKW2qSIBLscqIYzeB6e/DECWyw+RPlxSk1lWRnJSwcC 2hnA+zajChplMVwAk11ugZzqUgEz6MwK3DUSzY7DydwksfxuY6u+HfmewH1M09+0dxaX X3qQ== 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; bh=MVOVlMW/ybWoes+XT/Wiqvk9IQhXHTWV3d2Yn+3B0NM=; b=iaeiGCPRBDH1QJHs2PBXLTMSLf5lzpScB/8LiCTiYQyhcqhkcbBbuuiN7Mx3MprstE emQWj4X27enVT8GaceDzChysVgB87IQW4ItrkCmW4HLTQJN8hvSe2UsWgSTG6mK9/8OE agCpzOwRq+T9ChKsMxGBVwf4rtQ/uEs4WXOlOW1cqHgH+GseFiBAgFXlSYqmA60hi5ot DzRyhXFQ1Pky6x+oxurwOVzBiZAGxYaoCORFQh1Kj8NI0YByt9QNl8Z4oBXNW2Ufv52n GQ3SNkAVJ0JwvB8oW4xO6WV9VAGoAXUim+7H3nMB6yBZuZGtxsfBJIFSl24+OHiDdMwT kzRg== X-Gm-Message-State: AIkVDXKaJjYPzY/xqblkuvS+BCW71PmidHHZnoETKfy29fHQSyzCYr3Ui8H33WGBo6ErWIZq X-Received: by 10.223.136.155 with SMTP id f27mr10937319wrf.98.1484911335712; Fri, 20 Jan 2017 03:22:15 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id l74sm5482402wmg.2.2017.01.20.03.22.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Jan 2017 03:22:15 -0800 (PST) From: Bartosz Golaszewski To: Kevin Hilman , Sekhar Nori , Patrick Titiano , Michael Turquette , Tejun Heo , Rob Herring , Mark Rutland , Russell King , David Lechner Cc: linux-ide@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH v5 06/14] ARM: davinci: da850: model the SATA refclk Date: Fri, 20 Jan 2017 12:21:57 +0100 Message-Id: <1484911325-23425-7-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> References: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Register a fixed rate clock modelling the external SATA oscillator for da850 (both DT and board file mode). Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/da8xx-dt.c | 8 ++++++++ arch/arm/mach-davinci/devices-da8xx.c | 29 +++++++++++++++++++++++++++++ arch/arm/mach-davinci/include/mach/da8xx.h | 1 + 3 files changed, 38 insertions(+) -- 2.9.3 diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index b83e5d1..55342ca 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c @@ -50,6 +50,9 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { static void __init da850_init_machine(void) { + /* All existing boards use 100MHz SATA refclkpn */ + static const unsigned long sata_refclkpn = 100 * 1000 * 1000; + int ret; ret = da8xx_register_usb20_phy_clk(false); @@ -61,6 +64,11 @@ static void __init da850_init_machine(void) pr_warn("%s: registering USB 1.1 PHY clock failed: %d", __func__, ret); + ret = da850_register_sata_refclk(sata_refclkpn); + if (ret) + pr_warn("%s: registering SATA REFCLK failed: %d", + __func__, ret); + of_platform_default_populate(NULL, da850_auxdata_lookup, NULL); davinci_pm_init(); } diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index c2457b3..cfceb32 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "cpuidle.h" #include "sram.h" @@ -1023,6 +1024,28 @@ int __init da8xx_register_spi_bus(int instance, unsigned num_chipselect) } #ifdef CONFIG_ARCH_DAVINCI_DA850 +static struct clk sata_refclk = { + .name = "sata_refclk", + .set_rate = davinci_simple_set_rate, +}; + +static struct clk_lookup sata_refclk_lookup = + CLK("ahci_da850", "refclk", &sata_refclk); + +int __init da850_register_sata_refclk(int rate) +{ + int ret; + + sata_refclk.rate = rate; + ret = clk_register(&sata_refclk); + if (ret) + return ret; + + clkdev_add(&sata_refclk_lookup); + + return 0; +} + static struct resource da850_sata_resources[] = { { .start = DA850_SATA_BASE, @@ -1055,9 +1078,15 @@ static struct platform_device da850_sata_device = { int __init da850_register_sata(unsigned long refclkpn) { + int ret; + /* please see comment in drivers/ata/ahci_da850.c */ BUG_ON(refclkpn != 100 * 1000 * 1000); + ret = da850_register_sata_refclk(refclkpn); + if (ret) + return ret; + return platform_device_register(&da850_sata_device); } #endif diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index 85ff218..7e46422 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h @@ -95,6 +95,7 @@ int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata); int da8xx_register_usb_refclkin(int rate); int da8xx_register_usb20_phy_clk(bool use_usb_refclkin); int da8xx_register_usb11_phy_clk(bool use_usb_refclkin); +int da850_register_sata_refclk(int rate); int da8xx_register_emac(void); int da8xx_register_uio_pruss(void); int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata); From patchwork Fri Jan 20 11:21:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92061 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp731163qgi; Fri, 20 Jan 2017 03:24:09 -0800 (PST) X-Received: by 10.99.44.3 with SMTP id s3mr16136713pgs.148.1484911448991; Fri, 20 Jan 2017 03:24:08 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2si6566145plh.215.2017.01.20.03.24.08; Fri, 20 Jan 2017 03:24:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752041AbdATLWW (ORCPT + 7 others); Fri, 20 Jan 2017 06:22:22 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:36446 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752008AbdATLWS (ORCPT ); Fri, 20 Jan 2017 06:22:18 -0500 Received: by mail-wm0-f53.google.com with SMTP id c85so32868158wmi.1 for ; Fri, 20 Jan 2017 03:22:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yhegOp4MQVN2SP9QpaRf4QiKgNfYzu31hhraFPcIoMM=; b=aKJXNHyaYsrITN1BWUoE7EsHaF5kaYH8CHBfMVg/Tpxze/He9/m8SXd2zLXYlkjevl FcSTbOfTePfM1r1SNncH4BObtV9707cAjmCoYyfrEVGCY8X4Xp3mZ2IO92khYm607b9K 4fuOJwHquYCLS5EbIZLjEenqb3oXNIHwT3zskN+zEBaW0UUM3eLjMibNXoLBTpY6tNtj KlDk8LcIXvyXJ5ZPMU7gyw19wQsh20/5Qzqcjinz8Gvwip/p2TUjtFFFBwf1AaYH4oLb qVlAukETzO934bt3h2kfHwos4NwUDqnAmgnxX/aH2xeGjCoqu/+cf702yxcyYqOHxTth jxUg== 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; bh=yhegOp4MQVN2SP9QpaRf4QiKgNfYzu31hhraFPcIoMM=; b=MSHsJIdLMxIkOIs9AYDhjkKGrT3w+blpJtTOx33s90Dj+X6Ky291ZaC5VovTlyTLdz W5lcr1v14ILORtkVHafFXo4qE2OI82IlTJI5EwtX1Js/1+gQO4KnsJ5couhYlFoQl7su SZO0xXuSDaYTZrYVkNuwuLMN057kwKxj51tgHYvfaMLNaIGUcBahmMVx2EAIRXNpQzRs GsKARCK2HJ5lzMvFIEPG08CFY0CzlJE7yuhtkDkNyfs1dTBxFZRi7Og3JgzFc7wu56TV rWhLT+pd25AlvPNxN2sr0HtwhbIYsSDtJSbUTt2QTn5KELqPui/qXaDQFbOtsv3CwAcU Ncow== X-Gm-Message-State: AIkVDXLYKg8V3TsKyWLwXAvnOImJKYMZcYgf6wFOe7CtDgdq9DGM9xeCb8CYENo/qpKCTzkK X-Received: by 10.223.139.29 with SMTP id n29mr11053136wra.67.1484911336824; Fri, 20 Jan 2017 03:22:16 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id l74sm5482402wmg.2.2017.01.20.03.22.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Jan 2017 03:22:16 -0800 (PST) From: Bartosz Golaszewski To: Kevin Hilman , Sekhar Nori , Patrick Titiano , Michael Turquette , Tejun Heo , Rob Herring , Mark Rutland , Russell King , David Lechner Cc: linux-ide@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH v5 07/14] sata: ahci-da850: add device tree match table Date: Fri, 20 Jan 2017 12:21:58 +0100 Message-Id: <1484911325-23425-8-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> References: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org We're using device tree for da850-lcdk. Add the match table to allow to probe the driver. Signed-off-by: Bartosz Golaszewski --- drivers/ata/ahci_da850.c | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c index 8cfdc86..7f5328f 100644 --- a/drivers/ata/ahci_da850.c +++ b/drivers/ata/ahci_da850.c @@ -121,11 +121,18 @@ static int ahci_da850_probe(struct platform_device *pdev) static SIMPLE_DEV_PM_OPS(ahci_da850_pm_ops, ahci_platform_suspend, ahci_platform_resume); +static const struct of_device_id ahci_da850_of_match[] = { + { .compatible = "ti,da850-ahci", }, + { }, +}; +MODULE_DEVICE_TABLE(of, ahci_da850_of_match); + static struct platform_driver ahci_da850_driver = { .probe = ahci_da850_probe, .remove = ata_platform_remove_one, .driver = { .name = DRV_NAME, + .of_match_table = ahci_da850_of_match, .pm = &ahci_da850_pm_ops, }, }; From patchwork Fri Jan 20 11:21:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92057 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp730664qgi; Fri, 20 Jan 2017 03:22:42 -0800 (PST) X-Received: by 10.98.37.132 with SMTP id l126mr10072402pfl.45.1484911362539; Fri, 20 Jan 2017 03:22:42 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d74si6552000pfd.278.2017.01.20.03.22.42; Fri, 20 Jan 2017 03:22:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752141AbdATLWf (ORCPT + 25 others); Fri, 20 Jan 2017 06:22:35 -0500 Received: from mail-wm0-f43.google.com ([74.125.82.43]:35638 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752093AbdATLW3 (ORCPT ); Fri, 20 Jan 2017 06:22:29 -0500 Received: by mail-wm0-f43.google.com with SMTP id r126so33003389wmr.0 for ; Fri, 20 Jan 2017 03:22:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hFmDM2GBJ/vTixiXlDl8X9Ccc8JDAS1MatMHD9xw8Bw=; b=AFQX1rhblBfnvu3A1TWJdY4VhRJOu0bJcNLRU57ZCURW/zSP1z2pWPoVcYCg+eSONT c/EYuMpmoedRJKsTGtfnI2pQ/HcUDa4YkhV8WHlQ8fwZ5mQ4YhMRi+CY+Y3q104Q60+/ hH8mSvW0I01jdCpTWilGSVLmikBb401Wuwl/OqQ3b7+7lyn6vJDsqXccmB88hNbV/WkQ 2RSorWmNDW2ptrXLXjrTiY8lksE+A97h4wiMvxrOV5HJjP6rPAwsAN2ENviIqLrBLi87 akQZU9GnGFBiAQo84mcjeYcWGaEExi4rN9ajXjIcNO0ZOinLfJHE94NpghnYyruT+eGW 1OOA== 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; bh=hFmDM2GBJ/vTixiXlDl8X9Ccc8JDAS1MatMHD9xw8Bw=; b=rWFuA7+iivEkneDQ7Rez5hnLtbA8n/evMHruvVJ473dcXnlFZG1JdfnzgThkHcWYLF QXs+zEktQeyyHo9ZJKxjMKHHz49m9OzDOoFVBfIgxLlwYxaN14pX5WzhybRhWVevI8uj 0GEbI9DT72zoivijgfboKpqFc2fqBi3Kp4iLaCe7x3QJKaiQ2qDvBmIYnqO7Zigr6mH6 2jwwka9th+4QG525ND9WQK2dcxdtKXOQn5Q906r1Wn2uhAeMPQM6wjDV3rXJQIOM4vR3 xxgt5rbDIZbQGENzAo5FCg5zm03idk7C+HrSVrk5fgcrpRL2DP96f32v43L2bIHlSTlL NGiA== X-Gm-Message-State: AIkVDXIun54DiniOes+JayB1QBm1pWJnG8633wtL4HG1on85pPfDX0l9pqWQUFOx7ASBuBkg X-Received: by 10.28.166.216 with SMTP id p207mr2779112wme.27.1484911337962; Fri, 20 Jan 2017 03:22:17 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id l74sm5482402wmg.2.2017.01.20.03.22.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Jan 2017 03:22:17 -0800 (PST) From: Bartosz Golaszewski To: Kevin Hilman , Sekhar Nori , Patrick Titiano , Michael Turquette , Tejun Heo , Rob Herring , Mark Rutland , Russell King , David Lechner Cc: linux-ide@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH v5 08/14] sata: ahci-da850: implement a workaround for the softreset quirk Date: Fri, 20 Jan 2017 12:21:59 +0100 Message-Id: <1484911325-23425-9-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> References: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There's an issue with the da850 SATA controller: if port multiplier support is compiled in, but we're connecting the drive directly to the SATA port on the board, the drive can't be detected. To make SATA work on the da850-lcdk board: first try to softreset with pmp - if the operation fails with -EBUSY, retry without pmp. Signed-off-by: Bartosz Golaszewski --- drivers/ata/ahci_da850.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) -- 2.9.3 diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c index 7f5328f..11dd87e 100644 --- a/drivers/ata/ahci_da850.c +++ b/drivers/ata/ahci_da850.c @@ -54,11 +54,42 @@ static void da850_sata_init(struct device *dev, void __iomem *pwrdn_reg, writel(val, ahci_base + SATA_P0PHYCR_REG); } +static int ahci_da850_softreset(struct ata_link *link, + unsigned int *class, unsigned long deadline) +{ + int pmp, ret; + + pmp = sata_srst_pmp(link); + + /* + * There's an issue with the SATA controller on da850 SoCs: if we + * enable Port Multiplier support, but the drive is connected directly + * to the board, it can't be detected. As a workaround: if PMP is + * enabled, we first call ahci_do_softreset() and pass it the result of + * sata_srst_pmp(). If this call fails, we retry with pmp = 0. + */ + ret = ahci_do_softreset(link, class, pmp, deadline, ahci_check_ready); + if (pmp && ret == -EBUSY) + return ahci_do_softreset(link, class, 0, + deadline, ahci_check_ready); + + return ret; +} + +static struct ata_port_operations ahci_da850_port_ops = { + .inherits = &ahci_platform_ops, + .softreset = ahci_da850_softreset, + /* + * No need to override .pmp_softreset - it's only used for actual + * PMP-enabled ports. + */ +}; + static const struct ata_port_info ahci_da850_port_info = { .flags = AHCI_FLAG_COMMON, .pio_mask = ATA_PIO4, .udma_mask = ATA_UDMA6, - .port_ops = &ahci_platform_ops, + .port_ops = &ahci_da850_port_ops, }; static struct scsi_host_template ahci_platform_sht = { From patchwork Fri Jan 20 11:22:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92059 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp730712qgi; Fri, 20 Jan 2017 03:22:49 -0800 (PST) X-Received: by 10.84.224.133 with SMTP id s5mr21107623plj.130.1484911369182; Fri, 20 Jan 2017 03:22:49 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v87si6554506pfa.189.2017.01.20.03.22.48; Fri, 20 Jan 2017 03:22:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752167AbdATLWl (ORCPT + 7 others); Fri, 20 Jan 2017 06:22:41 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:38895 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752143AbdATLWj (ORCPT ); Fri, 20 Jan 2017 06:22:39 -0500 Received: by mail-wm0-f47.google.com with SMTP id r144so38518722wme.1 for ; Fri, 20 Jan 2017 03:22:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=M2Mt1IUY+9KqnX3iZFJkMS6FZ88o8pZIMUf0LimNJkU=; b=PHjBl+KF4h4892QtnZkwT1JDpFtyJMDX1SrzLyYmY0KioKEUEWq6A4gX6Sd0TqQsHH wPYkmf+/S1pfkUMLZ52nTvuUcPUjiIidTTizOEVEnLV+7BEP7Au9wV14HfLiGi4dTCO/ ANdZvWpZ/LyEWZ3QxJQWSO6vB1+ZYk4TXF9sUthMzWu+kRDDnAMl0I3jDkY1Pyd3Dvhv 4eNr82JI0GggFgCd2YY3RAAbH8bgrZOA/1ilyautd44kw+RR2GcCVCxp4oQjVEjCQq54 WhaquZXNj8sl6HTkoeEc0USOkZ5rmh8NufZyzAAEujeNKaeViFoQj/GRkPv8Y0PO4WxE 44hQ== 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; bh=M2Mt1IUY+9KqnX3iZFJkMS6FZ88o8pZIMUf0LimNJkU=; b=hmCHms+dnVZq6+NxH+VFOnub1XieAvWDyYK2DmzX8E0e0RIMDHiT3ij9isu2TskvAG +JrkU48l/9ukQ1jPFbdry3MmdHeNQv4C1v0F+tB7GeHgEPXkVP90DxLhsHIApBd88aOH 07zlHhxAaBCWMSKOSTF71JhmZu47BWqDbBnufdjP0RUJ6wu8Av2EU5FV8eZ+QVGK4E7W DfjzML2jM6Y4rYMK9LRsfjOt6hxbjD/FYOpVIW41nUi6RIUp9aUdFcoJ9nEfHmYZMgBO M/IaK+G0o2Ek9N8uGx488EPxyk26nWoujDklJErBugf5NexEp8u8V8rcOAQ2y9YEgLeW 6iyg== X-Gm-Message-State: AIkVDXKyZkgpoN4hyjWWezcQwRy0C3RU4iO9cg7kFCHuVcVEtrhRl4m89lJw+k3jbVMlVP6A X-Received: by 10.223.163.81 with SMTP id d17mr11305209wrb.93.1484911339145; Fri, 20 Jan 2017 03:22:19 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id l74sm5482402wmg.2.2017.01.20.03.22.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Jan 2017 03:22:18 -0800 (PST) From: Bartosz Golaszewski To: Kevin Hilman , Sekhar Nori , Patrick Titiano , Michael Turquette , Tejun Heo , Rob Herring , Mark Rutland , Russell King , David Lechner Cc: linux-ide@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH v5 09/14] sata: ahci: export ahci_do_hardreset() locally Date: Fri, 20 Jan 2017 12:22:00 +0100 Message-Id: <1484911325-23425-10-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> References: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org We need a way to retrieve the information about the online state of the link in the ahci-da850 driver. Create a new function: ahci_do_hardreset() which is called from ahci_hardreset() for backwards compatibility, but has an additional argument: 'online' - which can be used to check if the link is online after this function returns. The new routine will be used in the ahci-da850 driver to avoid code duplication when implementing a workaround for tha da850 SATA controller quirk/instability. Signed-off-by: Bartosz Golaszewski --- drivers/ata/ahci.h | 3 +++ drivers/ata/libahci.c | 18 +++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index 0cc08f8..5db6ab2 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h @@ -398,6 +398,9 @@ int ahci_do_softreset(struct ata_link *link, unsigned int *class, int pmp, unsigned long deadline, int (*check_ready)(struct ata_link *link)); +int ahci_do_hardreset(struct ata_link *link, unsigned int *class, + unsigned long deadline, bool *online); + unsigned int ahci_qc_issue(struct ata_queued_cmd *qc); int ahci_stop_engine(struct ata_port *ap); void ahci_start_fis_rx(struct ata_port *ap); diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index ee7db31..3159f9e 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -1519,8 +1519,8 @@ static int ahci_pmp_retry_softreset(struct ata_link *link, unsigned int *class, return rc; } -static int ahci_hardreset(struct ata_link *link, unsigned int *class, - unsigned long deadline) +int ahci_do_hardreset(struct ata_link *link, unsigned int *class, + unsigned long deadline, bool *online) { const unsigned long *timing = sata_ehc_deb_timing(&link->eh_context); struct ata_port *ap = link->ap; @@ -1528,7 +1528,6 @@ static int ahci_hardreset(struct ata_link *link, unsigned int *class, struct ahci_host_priv *hpriv = ap->host->private_data; u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG; struct ata_taskfile tf; - bool online; int rc; DPRINTK("ENTER\n"); @@ -1540,17 +1539,26 @@ static int ahci_hardreset(struct ata_link *link, unsigned int *class, tf.command = ATA_BUSY; ata_tf_to_fis(&tf, 0, 0, d2h_fis); - rc = sata_link_hardreset(link, timing, deadline, &online, + rc = sata_link_hardreset(link, timing, deadline, online, ahci_check_ready); hpriv->start_engine(ap); - if (online) + if (*online) *class = ahci_dev_classify(ap); DPRINTK("EXIT, rc=%d, class=%u\n", rc, *class); return rc; } +EXPORT_SYMBOL_GPL(ahci_do_hardreset); + +static int ahci_hardreset(struct ata_link *link, unsigned int *class, + unsigned long deadline) +{ + bool online; + + return ahci_do_hardreset(link, class, deadline, &online); +} static void ahci_postreset(struct ata_link *link, unsigned int *class) { From patchwork Fri Jan 20 11:22:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92062 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp731166qgi; Fri, 20 Jan 2017 03:24:09 -0800 (PST) X-Received: by 10.98.81.199 with SMTP id f190mr15738926pfb.180.1484911449346; Fri, 20 Jan 2017 03:24:09 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2si6566145plh.215.2017.01.20.03.24.09; Fri, 20 Jan 2017 03:24:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752232AbdATLX4 (ORCPT + 25 others); Fri, 20 Jan 2017 06:23:56 -0500 Received: from mail-wm0-f43.google.com ([74.125.82.43]:34539 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752030AbdATLWV (ORCPT ); Fri, 20 Jan 2017 06:22:21 -0500 Received: by mail-wm0-f43.google.com with SMTP id f73so13218466wmf.1 for ; Fri, 20 Jan 2017 03:22:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gjYAUx7cCSy+KrACbqFxG1BPaNYntYNoHa+KVUCPqgQ=; b=lQjvzmcuNFxVfWzGb9Un9cJlVCz+EI2dQS1pEVoTf4scYXk2xvailt3o/tqdZHPWHS RA267ZDILv9uOkLXIBDFkvJxi5bBFXo8EM/40lWETkulb7ysanKaMzWyB4K7icO6g48W eBFPdcvRhG8ozlJhmUR2bSoQ9xRwrbFqCiPMVMCn5Gtk/43ZM8eNADL+Z6hvi6utZEvv 7yQFxL1cz1/hAg+Vt0ZeietaSnmDLC1ES5f4NNGJ3l1MdbuScQ5dUP0lo2x2xcCJ2d0F BHyK2s6CzX6yUDagCyHRz0Pf65O7pZzPOO4YYKpvw4TJpIretJac1UQwv4csPrHIr0SL vMRw== 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; bh=gjYAUx7cCSy+KrACbqFxG1BPaNYntYNoHa+KVUCPqgQ=; b=ukG8BdnZGf7FzH40LFMKOcIDpsyLxProtoLkV3K+bYiaHcVTv9STcMoSdEasE67vgp 8ePtS1cVGej6AEfioRswPDctpUXZ2oaOjXHcluYK/0LCAvpwUYvAKYuEgSB7f9kbd0Ja 1jTIN1/J1SiS/gpuKrGPBTbGhNhKyamDgTM5rLopx665B9NBOAoSm8fyXEy613EDQBJY JcJGj54/nxPuomUhFj9K7DzBrCzqGSbmdJh7Dgf8vqErdIMYSU6FcCSohDpDFTdyJvYS gLeY5VTBJprzF6iltuMnEJYZyVskMaGyBnkhPOPGeWvEZnaMSz4h2my0e5P3ucTsvd0A f8wQ== X-Gm-Message-State: AIkVDXIJA0i3O4qc7CHXV/s7O64UZPjFG5zCUkaTKwfJ+CM/nRvlAz3LnfInWpX18IaTov2G X-Received: by 10.223.168.111 with SMTP id l102mr11121189wrc.150.1484911340308; Fri, 20 Jan 2017 03:22:20 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id l74sm5482402wmg.2.2017.01.20.03.22.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Jan 2017 03:22:19 -0800 (PST) From: Bartosz Golaszewski To: Kevin Hilman , Sekhar Nori , Patrick Titiano , Michael Turquette , Tejun Heo , Rob Herring , Mark Rutland , Russell King , David Lechner Cc: linux-ide@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH v5 10/14] sata: ahci-da850: add a workaround for controller instability Date: Fri, 20 Jan 2017 12:22:01 +0100 Message-Id: <1484911325-23425-11-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> References: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We have a use case with the da850 SATA controller where at PLL0 frequency of 456MHz (needed to properly service the LCD controller) the chip becomes unstable and the hardreset operation is ignored the first time 50% of times. The sata core driver already retries to resume the link because some controllers ignore writes to the SControl register, but just retrying the resume operation doesn't work - we need to issue he phy/wake reset again to make it work. Reimplement ahci_hardreset() in the driver and poke the controller a couple times before really giving up. Signed-off-by: Bartosz Golaszewski --- drivers/ata/ahci_da850.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) -- 2.9.3 diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c index 11dd87e..0b2b1a4 100644 --- a/drivers/ata/ahci_da850.c +++ b/drivers/ata/ahci_da850.c @@ -16,7 +16,8 @@ #include #include "ahci.h" -#define DRV_NAME "ahci_da850" +#define DRV_NAME "ahci_da850" +#define HARDRESET_RETRIES 5 /* SATA PHY Control Register offset from AHCI base */ #define SATA_P0PHYCR_REG 0x178 @@ -76,6 +77,29 @@ static int ahci_da850_softreset(struct ata_link *link, return ret; } +static int ahci_da850_hardreset(struct ata_link *link, + unsigned int *class, unsigned long deadline) +{ + int ret, retry = HARDRESET_RETRIES; + bool online; + + /* + * In order to correctly service the LCD controller of the da850 SoC, + * we increased the PLL0 frequency to 456MHz from the default 300MHz. + * + * This made the SATA controller unstable and the hardreset operation + * does not always succeed the first time. Before really giving up to + * bring up the link, retry the reset a couple times. + */ + do { + ret = ahci_do_hardreset(link, class, deadline, &online); + if (online) + return ret; + } while (retry--); + + return ret; +} + static struct ata_port_operations ahci_da850_port_ops = { .inherits = &ahci_platform_ops, .softreset = ahci_da850_softreset, @@ -83,6 +107,8 @@ static struct ata_port_operations ahci_da850_port_ops = { * No need to override .pmp_softreset - it's only used for actual * PMP-enabled ports. */ + .hardreset = ahci_da850_hardreset, + .pmp_hardreset = ahci_da850_hardreset, }; static const struct ata_port_info ahci_da850_port_info = { From patchwork Fri Jan 20 11:22:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92056 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp730658qgi; Fri, 20 Jan 2017 03:22:42 -0800 (PST) X-Received: by 10.84.213.9 with SMTP id f9mr20905181pli.138.1484911362129; Fri, 20 Jan 2017 03:22:42 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d74si6552000pfd.278.2017.01.20.03.22.41; Fri, 20 Jan 2017 03:22:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752116AbdATLWc (ORCPT + 25 others); Fri, 20 Jan 2017 06:22:32 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:37316 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752059AbdATLW2 (ORCPT ); Fri, 20 Jan 2017 06:22:28 -0500 Received: by mail-wm0-f51.google.com with SMTP id c206so38676361wme.0 for ; Fri, 20 Jan 2017 03:22:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=R5PNJOuUNZ0TgS4mS+ALb4UY8CbowzkiyfRTK/S7H2U=; b=xmBOqpB6s/O1Z0JiUezENaSfWzA7rSozCz192I6ix7pxDyW+d8xwzgYKSZ6pFaVROC LaE2LiVvYs+1z0081Hi0iJNkB61lb9WZvsLhCPi5rqX02djBIduK2U3RMwQDd40oAuda Vg5j+OdgWNU1vU3VLmw04rvJZbX5pZtCeFiW7MhLNbXzoj0ye7krRSI9iS2n3uiuRWj/ Q55NLXSTBPyAeYmQ8YG1KC2+CC0fV+Ay/bOvggGWqug661QAo88i7FoF/99//3tREfOQ KTauZ2aLexjU97WHD+mWJdTNoZtRiVdqD1Vj7jYVS40WOLF9tt8ZHbxVjLLEnecglFWZ EItw== 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; bh=R5PNJOuUNZ0TgS4mS+ALb4UY8CbowzkiyfRTK/S7H2U=; b=M/wmcaSPGDImTEMs7M04cYiE16IuIxCqu/KW7ZuDLZ+97LZvtXizpd3oft9HZeXywE DQpsczJ1YDhDbq5gStT3T0NbhlgAq0qDZz4TmdehMujRGZEIqyycoZeMATvgtEwRYFuJ NF/L7+1/PZPNyu6+pmnm92d5v0bOSLZKfZK+i02JlKLL7/QYQeQkIt2+nFybSF1gtc5X X2R+uCQsM8phUP2J5r3F+tgzSh3WPiXOhBX60e51FAX9Owably5NOZJxIuWxNabquohd abB/L+NucUJtJwuRdKgeEHeByVpDQxocWm8nAN2zIEsxlpsRSBzwh/3equIb2A/f0vbw HWuw== X-Gm-Message-State: AIkVDXKZdyLbshILmgUwU7ydLFwwG1YQscV2Ca+9+N4OjlzSHdbXQkUn/XGWSWD5ErIcVgb7 X-Received: by 10.28.153.10 with SMTP id b10mr2767777wme.103.1484911341672; Fri, 20 Jan 2017 03:22:21 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id l74sm5482402wmg.2.2017.01.20.03.22.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Jan 2017 03:22:20 -0800 (PST) From: Bartosz Golaszewski To: Kevin Hilman , Sekhar Nori , Patrick Titiano , Michael Turquette , Tejun Heo , Rob Herring , Mark Rutland , Russell King , David Lechner Cc: linux-ide@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH v5 11/14] sata: ahci-da850: un-hardcode the MPY bits Date: Fri, 20 Jan 2017 12:22:02 +0100 Message-Id: <1484911325-23425-12-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> References: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All platforms using this driver now register the SATA refclk. Remove the hardcoded default value from the driver and instead read the rate of the external clock and calculate the required MPY value from it. Signed-off-by: Bartosz Golaszewski --- drivers/ata/ahci_da850.c | 91 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 76 insertions(+), 15 deletions(-) -- 2.9.3 diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c index 0b2b1a4..9ed404d 100644 --- a/drivers/ata/ahci_da850.c +++ b/drivers/ata/ahci_da850.c @@ -29,17 +29,8 @@ #define SATA_PHY_TXSWING(x) ((x) << 19) #define SATA_PHY_ENPLL(x) ((x) << 31) -/* - * The multiplier needed for 1.5GHz PLL output. - * - * NOTE: This is currently hardcoded to be suitable for 100MHz crystal - * frequency (which is used by DA850 EVM board) and may need to be changed - * if you would like to use this driver on some other board. - */ -#define DA850_SATA_CLK_MULTIPLIER 7 - static void da850_sata_init(struct device *dev, void __iomem *pwrdn_reg, - void __iomem *ahci_base) + void __iomem *ahci_base, u32 mpy) { unsigned int val; @@ -48,13 +39,61 @@ static void da850_sata_init(struct device *dev, void __iomem *pwrdn_reg, val &= ~BIT(0); writel(val, pwrdn_reg); - val = SATA_PHY_MPY(DA850_SATA_CLK_MULTIPLIER + 1) | SATA_PHY_LOS(1) | - SATA_PHY_RXCDR(4) | SATA_PHY_RXEQ(1) | SATA_PHY_TXSWING(3) | - SATA_PHY_ENPLL(1); + val = SATA_PHY_MPY(mpy) | SATA_PHY_LOS(1) | SATA_PHY_RXCDR(4) | + SATA_PHY_RXEQ(1) | SATA_PHY_TXSWING(3) | SATA_PHY_ENPLL(1); writel(val, ahci_base + SATA_P0PHYCR_REG); } +static u32 ahci_da850_calculate_mpy(unsigned long refclk_rate) +{ + u32 pll_output = 1500000000, needed; + + /* + * We need to determine the value of the multiplier (MPY) bits. + * In order to include the 12.5 multiplier we need to first divide + * the refclk rate by ten. + * + * __div64_32() turned out to be unreliable, sometimes returning + * false results. + */ + WARN((refclk_rate % 10) != 0, "refclk must be divisible by 10"); + needed = pll_output / (refclk_rate / 10); + + /* + * What we have now is (multiplier * 10). + * + * Let's determine the actual register value we need to write. + */ + + switch (needed) { + case 50: + return 0x1; + case 60: + return 0x2; + case 80: + return 0x4; + case 100: + return 0x5; + case 120: + return 0x6; + case 125: + return 0x7; + case 150: + return 0x8; + case 200: + return 0x9; + case 250: + return 0xa; + default: + /* + * We should have divided evenly - if not, return an invalid + * value. + */ + return 0; + } +} + static int ahci_da850_softreset(struct ata_link *link, unsigned int *class, unsigned long deadline) { @@ -126,9 +165,10 @@ static int ahci_da850_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct ahci_host_priv *hpriv; - struct resource *res; void __iomem *pwrdn_reg; + struct resource *res; struct clk *clk; + u32 mpy; int rc; hpriv = ahci_platform_get_resources(pdev); @@ -150,6 +190,27 @@ static int ahci_da850_probe(struct platform_device *pdev) hpriv->clks[0] = clk; } + /* + * The second clock used by ahci-da850 is the external REFCLK. If we + * didn't get it from ahci_platform_get_resources(), let's try to + * specify the con_id in clk_get(). + */ + if (!hpriv->clks[1]) { + clk = clk_get(dev, "refclk"); + if (IS_ERR(clk)) { + dev_err(dev, "unable to obtain the reference clock"); + return -ENODEV; + } else { + hpriv->clks[1] = clk; + } + } + + mpy = ahci_da850_calculate_mpy(clk_get_rate(hpriv->clks[1])); + if (mpy == 0) { + dev_err(dev, "invalid REFCLK multiplier value: 0x%x", mpy); + return -EINVAL; + } + rc = ahci_platform_enable_resources(hpriv); if (rc) return rc; @@ -162,7 +223,7 @@ static int ahci_da850_probe(struct platform_device *pdev) if (!pwrdn_reg) goto disable_resources; - da850_sata_init(dev, pwrdn_reg, hpriv->mmio); + da850_sata_init(dev, pwrdn_reg, hpriv->mmio, mpy); rc = ahci_platform_init_host(pdev, hpriv, &ahci_da850_port_info, &ahci_platform_sht); From patchwork Fri Jan 20 11:22:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92055 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp730656qgi; Fri, 20 Jan 2017 03:22:41 -0800 (PST) X-Received: by 10.98.198.199 with SMTP id x68mr15803934pfk.87.1484911361774; Fri, 20 Jan 2017 03:22:41 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d74si6552000pfd.278.2017.01.20.03.22.41; Fri, 20 Jan 2017 03:22:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752090AbdATLW1 (ORCPT + 25 others); Fri, 20 Jan 2017 06:22:27 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:36520 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752059AbdATLWY (ORCPT ); Fri, 20 Jan 2017 06:22:24 -0500 Received: by mail-wm0-f46.google.com with SMTP id c85so32871326wmi.1 for ; Fri, 20 Jan 2017 03:22:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jHUc7lorYnwm3C+7tykmHcO2J+YAheBg1BhK8anPfmA=; b=lZnF5ePwRdG99TedSp+jUs/7jfTkH1xtrJeED/BO7uFH6gxA0HM8ljyTyH2dSJZUQw 3VzMDTgQ7p/9wpGfVtiX96d2cr+4mAc7nRvJTgWdB0pVmpfH3NgBGJ7hn5Em18v3lnlt sGuK/VxPAlcp178Vf4HlXOpFt4I5Ev/MQE93e+DnIha9OeMfallu+XDDPUCPTl31PVBF 87ZbPpxi0mqOUYTrY8bibBDbIFzr9Mxh037t+Or80QD11WRpayq/oAtrBFNHruBeunoe yRtmSlklpDXijGWcM9YZ2fX3pf4cojXs++I0K/Q5AAMB+AJ1LCb+aRZhiIIa9VJwjK1V izzA== 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; bh=jHUc7lorYnwm3C+7tykmHcO2J+YAheBg1BhK8anPfmA=; b=qlKoH3fQ8mm0djFPL3nAWaYaxyY0Jsq5K7couARHsP0TMEFocTHuBZ8u0aIpMRC70r nxcrbtfb9RIQzTIiJ6ZukjC2bAMimIxmzAE/rVvUzv0jssa6jYlvfphAdcsdwy2CF45j eMk80I88iyMRYhttDDh1uN4iu0Q5f5motPLF9BSVu+VOJgDoh7Doe78uSTiA8QF6lRJy 2JxSnMti3uFBCyVDyxDgKWnJSpoJM/alXYwLgKoNy2/Rsct7CdJNwDH4Sb3byziNUhbs 2wO20IEnuuYaYWAU3d14bY64aTHBFuxRAQ4iojHInMPfHRUHLwTBPa2y9IQd15wlDKla LpPw== X-Gm-Message-State: AIkVDXKy8HKlKtIUgq897RgjYRtB6Vwve1euJ2Cux0RbD41gK3RQ0eqnOElR3yhhViVuRJ39 X-Received: by 10.223.155.221 with SMTP id e29mr11559458wrc.107.1484911342742; Fri, 20 Jan 2017 03:22:22 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id l74sm5482402wmg.2.2017.01.20.03.22.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Jan 2017 03:22:22 -0800 (PST) From: Bartosz Golaszewski To: Kevin Hilman , Sekhar Nori , Patrick Titiano , Michael Turquette , Tejun Heo , Rob Herring , Mark Rutland , Russell King , David Lechner Cc: linux-ide@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH v5 12/14] ARM: davinci: remove BUG_ON() from da850_register_sata() Date: Fri, 20 Jan 2017 12:22:03 +0100 Message-Id: <1484911325-23425-13-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> References: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ahci driver now supports other refclk clock rates. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/devices-da8xx.c | 3 --- 1 file changed, 3 deletions(-) -- 2.9.3 diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index cfceb32..7cf529f 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c @@ -1080,9 +1080,6 @@ int __init da850_register_sata(unsigned long refclkpn) { int ret; - /* please see comment in drivers/ata/ahci_da850.c */ - BUG_ON(refclkpn != 100 * 1000 * 1000); - ret = da850_register_sata_refclk(refclkpn); if (ret) return ret; From patchwork Fri Jan 20 11:22:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92058 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp730667qgi; Fri, 20 Jan 2017 03:22:42 -0800 (PST) X-Received: by 10.99.37.199 with SMTP id l190mr16219031pgl.86.1484911362880; Fri, 20 Jan 2017 03:22:42 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d74si6552000pfd.278.2017.01.20.03.22.42; Fri, 20 Jan 2017 03:22:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751966AbdATLWi (ORCPT + 25 others); Fri, 20 Jan 2017 06:22:38 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:36538 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752143AbdATLWf (ORCPT ); Fri, 20 Jan 2017 06:22:35 -0500 Received: by mail-wm0-f42.google.com with SMTP id c85so32872073wmi.1 for ; Fri, 20 Jan 2017 03:22:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xVZWfHmVcNwCWayzPPHUszFHvbTrQu/yCvoERLMfLHc=; b=TI82r3+/9QzSYhC2NxdKigNx0kC7nEWa/Sze3cXd8PMNq0UJoHIJD9inIisVYRMzqR IvYcpCwFGvn1Bb5anb9+nTbxLlwN2DidBog+fNOMb5cNm9pYi0qJl8acJRnf14rfKsLJ tzJgfE6htKtDxBu93FECoUJ7va58nuAtKzmYmBYGUNPOVvNw9ZoSexmQB5aTrliwGwHz 4PZRtFgW5C+gwjI80lMsIDueK3dcE88ByqhSiCii/dUXfgDFuAfdoFupzf21bmSObuaZ ECFU6AWfUONRAqgA1WdC8gvtxChC6omWcSTmkynZXo5m71pELLL/s5pe4DxpSMFeoyI1 54yg== 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; bh=xVZWfHmVcNwCWayzPPHUszFHvbTrQu/yCvoERLMfLHc=; b=bp833UFrMCeYSdm7uFcx15jdhsOJZrESCr6eMCzQJNLx0jNuKIMLQwTGMaf1sVQiDP WtnidIyow8psIR6ICKOFL/YYml5pC8LY4kJoJ4git5XeN0jWTTJlHhj3g7xkjjDfXlUS TPKUW6UuA0FdU/TNSFP1f1lgP1WMwyzp24s+Umts3gs8U8t0DBhpTklY4EuJvmUqK+gZ KEKOha43UIwODzJMidnLrZAGVtd3HbcFrF5wyehWwslVXtXQPJadOrXWujfJ1f4e9Exk P3g5+cpjdm6POnR06XFVy9AuTPxZG2NSK7xg19Cj93DWPC5tfbkvadi3lIM+In15FvX0 4ahQ== X-Gm-Message-State: AIkVDXIhFE3Ibds2uSesPbzutAPvLxyF/NgbJXrnQh6dUpnLndJib9YzCmfpdizeuh+Fphpl X-Received: by 10.28.18.134 with SMTP id 128mr2758153wms.53.1484911344152; Fri, 20 Jan 2017 03:22:24 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id l74sm5482402wmg.2.2017.01.20.03.22.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Jan 2017 03:22:23 -0800 (PST) From: Bartosz Golaszewski To: Kevin Hilman , Sekhar Nori , Patrick Titiano , Michael Turquette , Tejun Heo , Rob Herring , Mark Rutland , Russell King , David Lechner Cc: linux-ide@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH v5 13/14] ARM: dts: da850: add the SATA node Date: Fri, 20 Jan 2017 12:22:04 +0100 Message-Id: <1484911325-23425-14-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> References: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the SATA node to the da850 device tree. Signed-off-by: Bartosz Golaszewski --- arch/arm/boot/dts/da850.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.9.3 diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi index 104155d..3b5fd41e 100644 --- a/arch/arm/boot/dts/da850.dtsi +++ b/arch/arm/boot/dts/da850.dtsi @@ -403,6 +403,12 @@ phy-names = "usb-phy"; status = "disabled"; }; + sata: sata@218000 { + compatible = "ti,da850-ahci"; + reg = <0x218000 0x2000>, <0x22c018 0x4>; + interrupts = <67>; + status = "disabled"; + }; mdio: mdio@224000 { compatible = "ti,davinci_mdio"; #address-cells = <1>; From patchwork Fri Jan 20 11:22:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92060 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp730806qgi; Fri, 20 Jan 2017 03:23:06 -0800 (PST) X-Received: by 10.99.117.8 with SMTP id q8mr16438447pgc.9.1484911386886; Fri, 20 Jan 2017 03:23:06 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v87si6554506pfa.189.2017.01.20.03.23.06; Fri, 20 Jan 2017 03:23:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751993AbdATLXF (ORCPT + 7 others); Fri, 20 Jan 2017 06:23:05 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:37368 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752102AbdATLWb (ORCPT ); Fri, 20 Jan 2017 06:22:31 -0500 Received: by mail-wm0-f45.google.com with SMTP id c206so38678690wme.0 for ; Fri, 20 Jan 2017 03:22:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BiHya2gKEVYZlEosm49YxL1F2Oa2bcZ7MyC4gENgh40=; b=N3+N/KzgeSO3xOe47IBWsEVpog5qi17XwYGRyVu5JD/DyiwvgM8NCILrGScUDeXVMH dAyA9AOyNbatfNLDaZ+LBwnV/GAiIBd1hoxw8IvA4sTuQ8GRF4DjmMJUx6ObyDQqM1zN WvxAO5Nau83MESIpBMVghVyPfuXGCXvXqzMvlIuAiUiqi3tp3FcsQFuZWxUgVzitd7MC OPrU6P35X6o/89oB0fQKCEbc7oJ79991XBOASssHDV3beIMD76yDi58Cl28zuVWQfgFx 3yoTHMrFc2su8ew02SfZQbPEpDT4RrBy2rSS6ju4PcfSKK+qoME5A3TLf4lu4bL5EVJ2 ev/g== 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; bh=BiHya2gKEVYZlEosm49YxL1F2Oa2bcZ7MyC4gENgh40=; b=M6KDjWFIeMcTrh+Lz1JNQMNZSR6kOdCCRB1ASuNdezCTHPD3CdLoC596n/hFPTCo1o /7MRvdE6X/lR3lH02U30N/FYW1pyMwgzFn7HacIgjfpVfd+WHYM9MIz8fhpSGMl0xPsz 7s+d5MStQmUL5mnleJO1QoPgaF9LAbi1558gK0EMA4Rqaqn+XZnOWQ5ZcrTP7V+4DqUe /HBTsuskW1UoeOIvRdcIObtWflmGhBFwj6S5EyICfpQh0SADWqOsR24zCcbjgEW5gps3 TQAQ7GtJUrUJtaLpDH1qZmu05BMwlM06YL4JJm0S0Oh1EDgbkSnYSm27887/MSlCk2B4 Rddw== X-Gm-Message-State: AIkVDXKpz5oZZFN0jmpnMiFfBdyJCNYvUmlMEbsk0eMWEHSXCnAtON0udlZX/gTW8SeW4ipy X-Received: by 10.28.168.73 with SMTP id r70mr2798892wme.57.1484911345512; Fri, 20 Jan 2017 03:22:25 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id l74sm5482402wmg.2.2017.01.20.03.22.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Jan 2017 03:22:24 -0800 (PST) From: Bartosz Golaszewski To: Kevin Hilman , Sekhar Nori , Patrick Titiano , Michael Turquette , Tejun Heo , Rob Herring , Mark Rutland , Russell King , David Lechner Cc: linux-ide@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH v5 14/14] ARM: dts: da850-lcdk: enable the SATA node Date: Fri, 20 Jan 2017 12:22:05 +0100 Message-Id: <1484911325-23425-15-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> References: <1484911325-23425-1-git-send-email-bgolaszewski@baylibre.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Enable the SATA node for da850-lcdk. We omit the pinctrl property on purpose - the muxed SATA pins are not hooked up to anything SATA-related on the lcdk. Signed-off-by: Bartosz Golaszewski --- arch/arm/boot/dts/da850-lcdk.dts | 4 ++++ 1 file changed, 4 insertions(+) -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/boot/dts/da850-lcdk.dts b/arch/arm/boot/dts/da850-lcdk.dts index afcb482..fbeee3c 100644 --- a/arch/arm/boot/dts/da850-lcdk.dts +++ b/arch/arm/boot/dts/da850-lcdk.dts @@ -105,6 +105,10 @@ status = "okay"; }; +&sata { + status = "okay"; +}; + &mdio { pinctrl-names = "default"; pinctrl-0 = <&mdio_pins>;