From patchwork Mon Jan 30 10:01: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: 92799 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1357833qgi; Mon, 30 Jan 2017 02:02:46 -0800 (PST) X-Received: by 10.84.217.221 with SMTP id d29mr30815495plj.47.1485770565994; Mon, 30 Jan 2017 02:02:45 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y17si8122727pgi.179.2017.01.30.02.02.45; Mon, 30 Jan 2017 02:02:45 -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 S1751774AbdA3KCj (ORCPT + 25 others); Mon, 30 Jan 2017 05:02:39 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:36097 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751845AbdA3KCS (ORCPT ); Mon, 30 Jan 2017 05:02:18 -0500 Received: by mail-wm0-f48.google.com with SMTP id c85so206931852wmi.1 for ; Mon, 30 Jan 2017 02:02: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=Ut7mchJH9g19CVDOpNs4ACpgQhgK1o0ezwBzvhEHo2Q=; b=zihfhxfaUZ7R/ifMbAhC0FGik5yXfHUmh+HJEYu9aGUF4v3k5K9ACSUTU3fApZDX6x XTrdOUMbR0m4iODXZa3smOoibu5JIimN44s0e25fvIHRpVRo9kdrDSo6L68Z77Mdc/L4 fMxV6DHPEoteIjYrtCMPpQb95q0y5WM1Mx/SUsSwr33kStJin7HulylMvGrqtDdLQRhi 4p6KykYanNs7ztRUf2g8rCzog3a0ip9ZkUBM2H3RfBXbjSuyKduIcL/2Zw1R65Ky9HgO Nx/16KKfgh0PeBvzGMf/ZXWecr85dKwSPYeLQK16Foj7zvNOKEqn54fIvuTUPtOZQc5m SPdA== 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=Ut7mchJH9g19CVDOpNs4ACpgQhgK1o0ezwBzvhEHo2Q=; b=GXcxf/Q3TW8aM30Ud4UPAWGO01AFtJRQcN7TLyUMXbvoNtxmRsX5ydCn0w92A89yLK BEsua1mvSPIuGyLOG05wfjQx3Fw8pS5TOLMFWIuqROTtaHNUgoquQ8+rtVF44gxDQ51V jwysYs51taUTN5BNq0AI+YgKXdeQe3kw2DYezCROv+dfTD+uGo+IfLGN8Nre/fIrm31A X7bZp0w5y+GP6TARp2ICkUsXq4hkOPfv15CkpcSIhtwyi5DyBUBWVQLn5o0VjZGd8JHl tNRWC/4UHBRJFFSU4xknA/Nrp/DTf9oRVGcnk/SlXmtVUYJ2j6+/fQY+0AtVRWB1jGst 9o+Q== X-Gm-Message-State: AIkVDXJqxcPT6t/41CNpB74iNx5tmdoPH289iLQO8tsctNDSwRrBNLCFpFxAexIFIOBjivlX X-Received: by 10.223.172.136 with SMTP id o8mr17595444wrc.76.1485770535894; Mon, 30 Jan 2017 02:02:15 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id j18sm21939536wrb.33.2017.01.30.02.02.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Jan 2017 02:02: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 v7 01/14] devicetree: bindings: add bindings for ahci-da850 Date: Mon, 30 Jan 2017 11:01:58 +0100 Message-Id: <1485770531-6772-2-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> References: <1485770531-6772-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 Acked-by: Rob Herring --- Documentation/devicetree/bindings/ata/ahci-da850.txt | 18 ++++++++++++++++++ 1 file changed, 18 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..5f81934 --- /dev/null +++ b/Documentation/devicetree/bindings/ata/ahci-da850.txt @@ -0,0 +1,18 @@ +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 two register regions + used by the controller: the register map as defined by the + AHCI 1.1 standard and the Power Down Control Register (PWRDN) + for enabling/disabling the SATA clock receiver + - 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 Mon Jan 30 10:01: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: 92797 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1357822qgi; Mon, 30 Jan 2017 02:02:44 -0800 (PST) X-Received: by 10.84.233.206 with SMTP id m14mr30819834pln.104.1485770564628; Mon, 30 Jan 2017 02:02:44 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y17si8122727pgi.179.2017.01.30.02.02.44; Mon, 30 Jan 2017 02:02:44 -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 S1752072AbdA3KCW (ORCPT + 7 others); Mon, 30 Jan 2017 05:02:22 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:37682 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751494AbdA3KCS (ORCPT ); Mon, 30 Jan 2017 05:02:18 -0500 Received: by mail-wm0-f44.google.com with SMTP id v77so39989683wmv.0 for ; Mon, 30 Jan 2017 02:02: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=SuLhxCo93043rn2eTnXL5rUa/MT6PfsUvS81uBerQyc=; b=rgowStDkdFAvfTQw3ZpgYgQ987fujrIuBVxD1QtqajzIgpm0qTZIvswVuP+SpXDmID /qbnuKsa55GGhLHBceITuuR4eYaPJG6WY9qJKw2/k1ISaIUFZPAnNYDv4WyAscad3RWU dmvb9YxNUSIzFrFrj6sxF7SE/Rb1VFNfkdfOJnsHsywlto7AKNj3US3VMJ9flJ3kR9g6 X0vWfSw52/NYYdNkyx2jMR/kDxd0noeIfC+j2kIz8KtJ80y5OniJW+PquRBJlI1Ex2ML ZlZcuCszEbGKlm5fHbY9Y7le16yqSkmmPe9H1KytY1nLQcHNWdMEcRlXPuYk+MDkF2gU QwPg== 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=rJNG7kBy6iJ7XIZqrEhoGEOAcgniYaSSRvcYTapuC9UVn6tlLvpyJpkwsSbe1WknJp oxUZEzWM+tAtLDbtoob2vTDipw7hqlx50GJ4ZxInUdIPO/8Bt+Uz0A8jUuXcYSqr5SGs ciK9xAjks8nE19YCWmRcvZiyR5u84GiGFEEKguiWbWmsf7N0MPewhOILgxj+J3wiF/xQ dZAGXpe+TspJpO45F52GQnVjuMZxF3O72UgAGCvNJ+3CtQBdXFXSoltU646o2xeRRBKF 1G1N1QPyyGmRADMsAQY8bS5RZMuudDiwhL5E87hMY6+fH+OlmcqAa+KIB9RDWRYdvRNU 7KDA== X-Gm-Message-State: AIkVDXI6tUJJIODQ6hDLNCPLfDcj2zI5EDgRPY2xPZQCN++/xceN4fqhFwNsElXDiJERVG1D X-Received: by 10.28.66.221 with SMTP id k90mr5141917wmi.90.1485770537017; Mon, 30 Jan 2017 02:02:17 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id j18sm21939536wrb.33.2017.01.30.02.02.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Jan 2017 02:02: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 v7 02/14] ARM: davinci_all_defconfig: enable SATA modules Date: Mon, 30 Jan 2017 11:01:59 +0100 Message-Id: <1485770531-6772-3-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> References: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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 -- 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/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 Mon Jan 30 10:02: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: 92800 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1357933qgi; Mon, 30 Jan 2017 02:03:00 -0800 (PST) X-Received: by 10.84.229.72 with SMTP id d8mr30537203pln.21.1485770580528; Mon, 30 Jan 2017 02:03:00 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 89si12103617plc.324.2017.01.30.02.03.00; Mon, 30 Jan 2017 02:03:00 -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 S1752405AbdA3KCs (ORCPT + 25 others); Mon, 30 Jan 2017 05:02:48 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:38764 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752058AbdA3KCT (ORCPT ); Mon, 30 Jan 2017 05:02:19 -0500 Received: by mail-wm0-f42.google.com with SMTP id r141so25575376wmg.1 for ; Mon, 30 Jan 2017 02:02:19 -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=TaZ3Tr7P3ABKbvbuYYZXbY6tjiAzxO7oKB7a0c+MLrVSnXczEHvarNHbjaNfx0l5i2 Rvi2VVaFGDHY4tOb1U7IEmpiglCuowaE4N3mjHXb/VzSIWx5t2ql1qUVcQ+whx43wKds 1TdVynaOVVY2UariFxI1bAnPnTKY6dKY6JXRyN9gD0bZ72BEOlYcztXLZm13GNbEDB4v cRoKw4ZXq+KJW6pQd9KLAI0UWqhszm/jhGruw4nMGPT4HJ7vRiz/KT34+OAPaptuSZzj EsSEaX+KNL6pMPQwyJxDuPspbpJU23c+KQsBM3Y5MBUjHsz2mv1/vp6I+8nWhwRfiJts 8B8A== 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=pngioCQBra6/5Jh03NrhQAcyT+BIjE4TntqRCShEnb6NK+meDmJ0YPFRtMctJ0Ufuk NHazAKT4dp1mhUFux/d0lkNWyXhGpdIA8HUum+dblGg+R0xJxgPmWYGleOjmjdS5j5g0 TNyN7h1BzlWga18ncIc0xYSL2JyLcB0lm6Ooz2MwBWhd78uqRNEBOf+uXbp/c3ebmvKI ddOD1OqXdb7B7cny5jrFH/s2Ytbt5SeCbpyQsrZihUryu0jlE7gMwv2hzwEDoF1pWPK9 PjeuPa0oi9VB6xKrSkX+bmb3Gd+Gzm7eWUevHNdhumoHg7E5VAx/dW90/9C0U/nkdowB J7hg== X-Gm-Message-State: AIkVDXJDriCaon/YK7fqNZ0htgAU1N8Tk9aMc5tgG4pOePLXyziwTUhfMljSv6B6+mVPtj+7 X-Received: by 10.28.55.199 with SMTP id e190mr10671608wma.92.1485770538184; Mon, 30 Jan 2017 02:02:18 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id j18sm21939536wrb.33.2017.01.30.02.02.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Jan 2017 02:02: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 v7 03/14] ARM: davinci: add a clock lookup entry for the SATA clock Date: Mon, 30 Jan 2017 11:02:00 +0100 Message-Id: <1485770531-6772-4-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> References: <1485770531-6772-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 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 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 Mon Jan 30 10:02: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: 92806 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1358184qgi; Mon, 30 Jan 2017 02:03:38 -0800 (PST) X-Received: by 10.84.149.102 with SMTP id b35mr30561076plh.3.1485770618513; Mon, 30 Jan 2017 02:03:38 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z30si12143943plh.61.2017.01.30.02.03.38; Mon, 30 Jan 2017 02:03:38 -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 S1752472AbdA3KDX (ORCPT + 7 others); Mon, 30 Jan 2017 05:03:23 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:37718 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752124AbdA3KC0 (ORCPT ); Mon, 30 Jan 2017 05:02:26 -0500 Received: by mail-wm0-f52.google.com with SMTP id v77so39991215wmv.0 for ; Mon, 30 Jan 2017 02:02: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=cAjprMZL7lixJ6O8hEdPl09m5ssLDsBG08nAWPWVXuo=; b=OsdcLViv3M/huSfurjAph6mf17d7NCuX8CR3xB6vd7ORk9pGXMydY5GzNnOb/ssZzT bENHz6a76Ws/JcLj0D3O1EBhM8HfwCOyh0isB2rUHFeKxBnW+4POE01ccXefbqF7qaBC 8pMCi7HlbolZaKsnNycr3zzjo5kgJBNJ/cr4A3RhjHiuRdxs/K2gKSnbmm7bjyt/1GH0 uwZlzV3h/tAFyp6boEIZiQw4TK/VxJZILJ5AL9pA/ngLyv9BpCCMxxY98syodYqZKoq5 9pHgDeyA/ZW89ZjB2vQLojCMYAtGR1vJGmem7B/rmMYGxg0AGiRL1lCVeULYnpsi7nPv WG9w== 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=cAjprMZL7lixJ6O8hEdPl09m5ssLDsBG08nAWPWVXuo=; b=EZaF+eKugqNXw2UGHLHYw+OMdqAv8UbK5AInA7CXwnnvyJwdWiLqEh8oNrl7rTutpr QDaDtarDdymczxgBx6kuwlyRASuOlqSWtYb0rdMe+95rEVis3A8RS08gVf7vVVZOQmzz bEYibxtAOQJi2HAcV3RjUTVqQwAbDmVqUcqBw6UbibJrB1bGbwdro+yVO9A2zH3GZPtW K0Fhm+5jutw2v9fQagmLyEdXZAJ/tolMINZd5prlrahgo06CVMRnhl3vOYWhREv1QzKf SvfbutnC/y1IBcIBcPMIADvtyTgSc/kLcwq33rpJMvei/Ac+FW9xj0sqRxXMsDTWLgS6 An7g== X-Gm-Message-State: AIkVDXKtUdZw1s5atnz6tlv9qfcNTDMrDsdulU07WoNA/7Yiig/jhg+zZMf6KTfP5OX8pco9 X-Received: by 10.28.209.202 with SMTP id i193mr14756946wmg.20.1485770539370; Mon, 30 Jan 2017 02:02:19 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id j18sm21939536wrb.33.2017.01.30.02.02.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Jan 2017 02:02: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 v7 04/14] sata: ahci-da850: get the sata clock using a connection id Date: Mon, 30 Jan 2017 11:02:01 +0100 Message-Id: <1485770531-6772-5-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> References: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org In preparation for using two clocks in the driver (the sysclk2-based clock and the external REFCLK), check if we got the functional clock after calling ahci_platform_get_resources(). If not, retry calling clk_get() with con_id specified. Signed-off-by: Bartosz Golaszewski Acked-by: Tejun Heo --- drivers/ata/ahci_da850.c | 16 ++++++++++++++++ 1 file changed, 16 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 267a3d3..e397bab 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 functional clock. This SATA controller + * uses two clocks for which we specify two connection ids. If we don't + * have the functional clock at this point - call clk_get() again with + * con_id = "fck". + */ + if (!hpriv->clks[0]) { + clk = clk_get(dev, "fck"); + if (IS_ERR(clk)) + return PTR_ERR(clk); + + hpriv->clks[0] = clk; + } + rc = ahci_platform_enable_resources(hpriv); if (rc) return rc; From patchwork Mon Jan 30 10:02: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: 92802 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1357988qgi; Mon, 30 Jan 2017 02:03:08 -0800 (PST) X-Received: by 10.84.233.193 with SMTP id m1mr30690626pln.126.1485770588123; Mon, 30 Jan 2017 02:03:08 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 89si12103617plc.324.2017.01.30.02.03.07; Mon, 30 Jan 2017 02:03: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 S1752520AbdA3KDF (ORCPT + 7 others); Mon, 30 Jan 2017 05:03:05 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:36154 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752213AbdA3KCc (ORCPT ); Mon, 30 Jan 2017 05:02:32 -0500 Received: by mail-wm0-f50.google.com with SMTP id c85so206934124wmi.1 for ; Mon, 30 Jan 2017 02:02:26 -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=/qmQfd8B/ptHSS0ztoDPqL6tnj7n/ZZhvnqC+BCaC5M=; b=S8gbXoNCK8qXo7dIKyZKY43OxASglijZ+l9umUMOmxi/rhKKR21JGkQHR3/zYGULYm AjTfZnBJtX+G9UPub7kdMRAgBGD/DMKlPyVIljyq0h3rgc09ruZU6t+gmM32YEk5aHKP ymt3run/LxAoT1srrY7v1FIVQeu3z0dVF9gwsPp9efUUFcitozpSlPICUqn65pJNe/SY 1oIkvpMMAJoXiVs9cpGjT6JVOb/xkbBN1Fxon2WlifBE2rpB2Vd7uL4KqCltbth7sh1x b7bN8Z5+oHUB8kJ/BIq7LP7cE2ZkaxHUA6PpynUOeOIx2jbFOTpoWTlVcmrySGvMbBl4 n5/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; bh=/qmQfd8B/ptHSS0ztoDPqL6tnj7n/ZZhvnqC+BCaC5M=; b=ewvYjWXLXmR+T8vTgPG3RGiOdueEkYvnX2DvPuO9ZzLhvBmxo14JCyVcutdSzpndos kiT8u+qENR11eVp8EV9Y6cMLwSqeOXzoNlnbcU4lE1BJDGeTtwvWatBoSirI8nAkAWYq oKY+POf75tQqC2qkR+7hJM2h2KbEG3Ncw/KJwvkI8KVr5U+fQAzLFYfdN7zN+8jQ0eLa PDRMFs+oMswLFh4v7C8fNPmCDqEO+2rc+j24/B3354A6ZbLAzVoda5WhQnCtMb86izGp kFXo6cCX095ir9YIUUjTRzbBuRXl0bHa2iyuvVLVerdrwbgZoxZ5H14elRCdGZzzcGbT Yblg== X-Gm-Message-State: AIkVDXJtV7+K8EkyJZxgmgNLmZhKgnhbViPpSMFxx6Xphe/cmRMI6ht3sSRGP1N15OyD77Rp X-Received: by 10.28.0.73 with SMTP id 70mr12452324wma.109.1485770540511; Mon, 30 Jan 2017 02:02:20 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id j18sm21939536wrb.33.2017.01.30.02.02.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Jan 2017 02:02: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 v7 05/14] ARM: davinci: da850: add con_id for the SATA clock Date: Mon, 30 Jan 2017 11:02:02 +0100 Message-Id: <1485770531-6772-6-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> References: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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 -- 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/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 1d873d1..b2fdace 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", "fck", &sata_clk), CLK("davinci-rproc.0", NULL, &dsp_clk), CLK(NULL, NULL, &ehrpwm_clk), CLK("ehrpwm.0", "fck", &ehrpwm0_clk), From patchwork Mon Jan 30 10:02: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: 92807 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1358427qgi; Mon, 30 Jan 2017 02:04:13 -0800 (PST) X-Received: by 10.98.155.155 with SMTP id e27mr21950873pfk.140.1485770653362; Mon, 30 Jan 2017 02:04:13 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m63si12174158pfc.123.2017.01.30.02.04.13; Mon, 30 Jan 2017 02:04:13 -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 S1752595AbdA3KDw (ORCPT + 25 others); Mon, 30 Jan 2017 05:03:52 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:38818 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752159AbdA3KC2 (ORCPT ); Mon, 30 Jan 2017 05:02:28 -0500 Received: by mail-wm0-f53.google.com with SMTP id r141so25577748wmg.1 for ; Mon, 30 Jan 2017 02:02:22 -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=I4ru+giXdRxLJ13b6YJe54Mf/HaobxiwLsTtBZfYC/8iBtCzA18mhn7AamLTLKeQWl AOsAlWzxy/KTfaePEOA9V6UGBYn17OFft+kJBpaSzsi6tRmsc8ZCzaUjXYBqQyd6uoxn LRNkDyE+9cE2VC9vM/83PJYY0mY/Tnkxua6Kjw7WtpdQ3oyKSly40bjL1FEcaqiNVFV2 DCp07LNuQBy2oqikdN9pnQZchA3Icj3S0c9eIMfdu2IuxllqUax+5Tdfl04WSPq0x58/ /WBxlmUbt0ilkN0VP5z0PvRjSLsBMltVvcPcKeRY5g3cCB1B5iOuW4Ca15/O0hsFtR9X 6dpg== 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=i4UHXx6b+XngH0QOltRzsMHZwsmu1MrAWJT7FARes1wT4eZjSwE2wlE9ZVwmkMj8k+ XkSSsNJG1GTVAo7sKzl1Yvgq/RC2hA2KlSSF9GUxE2w6h6IYXzSdIaCNuydhLJOYL81I ss1QwRnbdllPBl6KCYHypVr9keQ20gZjZ1f34LK9p2xJIIqsKnNqMcdiM0mFUH91ON3D dd12VawIkkVEUDlUUp2VxL8ndR3WseRGGWak2DjwmmlXZT3Ryw/OFdzKy+0l2FTs57S3 dliKnWjf9QL4GCzP6rsJTrmvfuCIc0dCM4YiMnPAHGEfz5I4MYBH0RPm/WOFPOwhSGiV dj6w== X-Gm-Message-State: AIkVDXIQfcpB43O2ksOTvKaIcboTtOf5IZW/+kClO/DjBw/2IzDkp/kLCUI4EZ0CPYu8fnP+ X-Received: by 10.223.130.118 with SMTP id 109mr21243205wrb.10.1485770541613; Mon, 30 Jan 2017 02:02:21 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id j18sm21939536wrb.33.2017.01.30.02.02.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Jan 2017 02:02:21 -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 v7 06/14] ARM: davinci: da850: model the SATA refclk Date: Mon, 30 Jan 2017 11:02:03 +0100 Message-Id: <1485770531-6772-7-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> References: <1485770531-6772-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 Mon Jan 30 10:02: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: 92811 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1358955qgi; Mon, 30 Jan 2017 02:05:37 -0800 (PST) X-Received: by 10.84.231.203 with SMTP id g11mr30594582pln.165.1485770737304; Mon, 30 Jan 2017 02:05:37 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si12136532plo.146.2017.01.30.02.05.36; Mon, 30 Jan 2017 02:05:37 -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 S1752163AbdA3KFT (ORCPT + 25 others); Mon, 30 Jan 2017 05:05:19 -0500 Received: from mail-wj0-f179.google.com ([209.85.210.179]:35095 "EHLO mail-wj0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751422AbdA3KCY (ORCPT ); Mon, 30 Jan 2017 05:02:24 -0500 Received: by mail-wj0-f179.google.com with SMTP id b20so3759250wjs.2 for ; Mon, 30 Jan 2017 02:02:24 -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=Ul+g/DZbdUoIgrUHIBw9FKjQ+5WmoMZFlBqd8yilaew=; b=qtv55WPS7wzUR9AASSW6klAzndiDTMgCrmo2xfvAqAHIl879s3XXDht/iekZS6Jbjt pjqwcbX/PwtL+gSf1+D1MGFmmIRWSx3xUxyI92hq4dx4iQuemf02Hfj6ieorVzJwqLtd 3s7S9gi6uME8olPboXS8ToRDX/Dn8iAiJ1GyCMwJLr+Sj6aocLOjxlUo1jypc33I076V RNOhLqNR8qqeImTQGRUwf2YCkhg1ChT0d6s7mIoXoSyIB9O9gRUezAW6i7RfyqtCeLAE lRI1VCb4m9py6ihx1S6pzHatTE33qbDme8IuHVgZc8riqaSiGAO62F2NlqH6M5592l81 qBiQ== 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=Ul+g/DZbdUoIgrUHIBw9FKjQ+5WmoMZFlBqd8yilaew=; b=gfKAI4HZQ6h6a6x/a2zDh+lIgUva5OeiEeETkn88rp9Qis5Umbgjihd+76T2RQEpE9 jIbIN2FrhjKGdeVaRPSuRf31K+foqC+oNER4rEjy/6X3otBp5V29lAI9q0xkb3shtkki 7Zr9kBaGgI0Zx2JbnEf46n6Ow7yflRag6P0Aw8KHoXkwK0+GXr0OBjeRUQFaDHHTu2/j ZHuPRp5ycqy3o3PEe3r7wzntL1IUbLlRTrKuuQThGJ9CXFKy6/epMsGHxn0r3bcyuNBg yzItmid4PM8zPLzTEpHC667dJfcgDRVTko2AscGOGSL6NnfLShPFkzLVnxi/Y/juBhmF KiHw== X-Gm-Message-State: AIkVDXJPixUdedVcD4/dFfcc/+X8Jg9X4m1rTwN0fj04Qn+n9OglPLrpCiL2S60wtiODRmXq X-Received: by 10.223.164.207 with SMTP id h15mr17209516wrb.142.1485770542671; Mon, 30 Jan 2017 02:02:22 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id j18sm21939536wrb.33.2017.01.30.02.02.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Jan 2017 02:02: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 v7 07/14] sata: ahci-da850: add device tree match table Date: Mon, 30 Jan 2017 11:02:04 +0100 Message-Id: <1485770531-6772-8-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> References: <1485770531-6772-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're using device tree for da850-lcdk. Add the match table to allow to probe the driver. Signed-off-by: Bartosz Golaszewski Acked-by: Tejun Heo --- drivers/ata/ahci_da850.c | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.9.3 diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c index e397bab..72126a0 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 Mon Jan 30 10:02: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: 92810 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1358650qgi; Mon, 30 Jan 2017 02:04:45 -0800 (PST) X-Received: by 10.84.136.34 with SMTP id 31mr30465991plk.52.1485770685753; Mon, 30 Jan 2017 02:04:45 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t25si8111401pgo.353.2017.01.30.02.04.45; Mon, 30 Jan 2017 02:04:45 -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 S1751283AbdA3KEk (ORCPT + 7 others); Mon, 30 Jan 2017 05:04:40 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:38855 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752108AbdA3KCZ (ORCPT ); Mon, 30 Jan 2017 05:02:25 -0500 Received: by mail-wm0-f50.google.com with SMTP id r141so25579351wmg.1 for ; Mon, 30 Jan 2017 02:02:24 -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=I95IOP7tcXFVHnlw7gTmFwx+7Cy0Oe2Di4eUdxW5Jjo=; b=fBv5jzTT71fDD8ShvJVOdKMmTi0zqoZZoj8bt0aj65QFyANH0+kTNqQvTJjLGSatpF UJW9TnlXLBXO1xJHtHKAMzytnlvq8a2GlKIAHgnIDD6Xw/yTRXHExiXWnslTZQUny2+O i1kp1XhkHeeK5jvGD7Zhzei2hyhd4cFmxoKrXFxlOloM4NGsOrtBb2iIW4Fy82Y0v9k9 khLbYRfR94FN7+ew/UyTSGOfIIo7JUbz/lqnomp67l4rCIe3K9fhVt850RjIiZ/TGsa1 wY7d5NvaodOatLf0pAUt2uLcq2L+thnSbcohTFswfhEfXAk4VlLk1kC57H9wNt17oeRS jnnw== 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=I95IOP7tcXFVHnlw7gTmFwx+7Cy0Oe2Di4eUdxW5Jjo=; b=F3m7UKOnCzr5znq8aZUqX64BZeaJX5sKDNuS0/tvjT5Yg5WTKoS02H2I8RdHkFUXWv xWBOZ23CWbK5+PtdEMsq9MUbLu5p7woGCE30H2xeaFf58oTOZnKRTNtCXnRLNRN7bl6i fopG0Yldau4+0/d/8rim93XOCSc3250LpWGEwc3aXpyLBFmZ6VHrJclo/7gy+AehdF7A HWrI+Hp+vevz0DOu/JMa5Yw1CCc5C/dOXkaUd8QhbUveuUT4mwS6fgl94vOHtHxksqvE BqGFK9WkSIRQUS7637ZbVAuXOHX6ZyKuqyoevLdb7n1du3OV3sTh130LBUj1c640/Svi mdIw== X-Gm-Message-State: AIkVDXJdG6ckL2p/XxyUQQi1tmaDbP0G0rFy8heaI4PRATx1OxDGSNNMVN/o+dxBRyvJQjLA X-Received: by 10.28.185.77 with SMTP id j74mr13934425wmf.76.1485770543735; Mon, 30 Jan 2017 02:02:23 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id j18sm21939536wrb.33.2017.01.30.02.02.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Jan 2017 02:02: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 v7 08/14] sata: ahci-da850: implement a workaround for the softreset quirk Date: Mon, 30 Jan 2017 11:02:05 +0100 Message-Id: <1485770531-6772-9-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> References: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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 Acked-by: Tejun Heo --- drivers/ata/ahci_da850.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) -- 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 72126a0..84c7805 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 Mon Jan 30 10:02:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92803 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1358076qgi; Mon, 30 Jan 2017 02:03:21 -0800 (PST) X-Received: by 10.84.231.205 with SMTP id g13mr30754044pln.118.1485770601557; Mon, 30 Jan 2017 02:03:21 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w72si12181049pfa.220.2017.01.30.02.03.21; Mon, 30 Jan 2017 02:03:21 -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 S1751429AbdA3KDJ (ORCPT + 7 others); Mon, 30 Jan 2017 05:03:09 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:38873 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751637AbdA3KCb (ORCPT ); Mon, 30 Jan 2017 05:02:31 -0500 Received: by mail-wm0-f45.google.com with SMTP id r141so25580144wmg.1 for ; Mon, 30 Jan 2017 02:02: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=bgb7yRqFaON2/iF5n/N2FPgGiMoQcpejrt+SCmnNAx0=; b=hflWpBpd0/hNkglhfQexSClwYanNcMWuPwnplEdEhqWphbL9xlSxj+6UydK6oJQ9lE FUm4l+64rPPbIGxpIRmlvREEyNq/AM1QJLOxXtr1HbINhyfRIu2gldizybYbzgBQ/Z4J B2WGWvN40z5eXNyg1jnrAY8Nn2DHA/8mJjdeYoqx5P4V0jmlxTldq/g+YPQ06WKQ8FOu q6N1L3pTGpsl/av3rM2Oddzkq5OfUHRS4PHXhgweljH1uGdWwB27dBfD4mp/at+8pimH NKRCqrQoKB7S/TuMAZfw8jSJ92CGBdJj4um2p38UsKhVk7eonGwDIFS02b+br5R6Y+WU JcIA== 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=bgb7yRqFaON2/iF5n/N2FPgGiMoQcpejrt+SCmnNAx0=; b=d/olSPzlSDg7WB9KM8XJztIbxEX4gQT37jqCMWDCVDyyirSidHZCA1Wmh7NoThUh/p 1cvvgUcAB6ox6E4do1U/s9L3vYG5JLdjkEOxUpB/D1hK+ymgF3wd2k4xLNl4K2/jqln9 jhUIEhR1X7u9mIWF8iSffdFZs88iddeaeP1dkTUx8cNVyMsM1ptc91XodOyFYIULFvkf 1CV5Cz8kySDC3GjE/dafUz68KnkjrzyFCTL+eCazuD3mEEuxhjgeOqI0u8J/bdIJTKHY h4V0yTv1IJnnsTHBPMI4CYblss8+IZSFZipEXWm2L0Z+3WUcEo3KUYXQedGHK6JtZv3/ 0oPw== X-Gm-Message-State: AIkVDXJyAyX1HBHMAiKdz0M/4iRHgfqN9NOloBxU/y5EBGXMxU7pmqNe2AK0y3oWHTLY8VWy X-Received: by 10.28.61.136 with SMTP id k130mr12407958wma.128.1485770544937; Mon, 30 Jan 2017 02:02:24 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id j18sm21939536wrb.33.2017.01.30.02.02.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Jan 2017 02:02: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 v7 09/14] sata: ahci: export ahci_do_hardreset() locally Date: Mon, 30 Jan 2017 11:02:06 +0100 Message-Id: <1485770531-6772-10-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> References: <1485770531-6772-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 Acked-by: Tejun Heo --- 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 Mon Jan 30 10:02:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92805 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1358182qgi; Mon, 30 Jan 2017 02:03:38 -0800 (PST) X-Received: by 10.84.215.149 with SMTP id l21mr30659449pli.16.1485770618254; Mon, 30 Jan 2017 02:03:38 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z30si12143943plh.61.2017.01.30.02.03.38; Mon, 30 Jan 2017 02:03:38 -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 S1752272AbdA3KDV (ORCPT + 7 others); Mon, 30 Jan 2017 05:03:21 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:35781 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752156AbdA3KC1 (ORCPT ); Mon, 30 Jan 2017 05:02:27 -0500 Received: by mail-wm0-f42.google.com with SMTP id b65so25106204wmf.0 for ; Mon, 30 Jan 2017 02:02: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=UuFqiL7UFZBOptYwa564ZJUFui00u+cvOWp5bQVJzCc=; b=a3g5iQdw6qca6x3ji1zxWQnRW7GmgCUQ4slFmC9wj8s7OwSHrGJLNU82IjgwRSocpX UKLygRXEkAa3AqhAHGqNd121v+oDKZdgfSXkv0EEZycYCz60yolMHYwe+p74mhlZP5eP OGgchtTPy7uj6mpNjdh2ndjS3gLd2DsX5Wsy3eRSl/CCMka/r8vc3NlDDlwxhqkna+OF b9i4RB7T/qFpmAPhVMEG2GQWiB0S2aQQsTjDGH65D0DAKW4WEfukNtpNw2eg8oBkJaSH F6U0Mb1QwhLgP/rGfKTF8b+yA+XZrLsMMud8HHPwiPX8X3Xempz0xke1aKxKXRywj/kh KBMQ== 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=UuFqiL7UFZBOptYwa564ZJUFui00u+cvOWp5bQVJzCc=; b=tezYbxDPHFPbRtc7sWVcyDT+AZmchexD1eggeOdadA2NHkOww108T2EtR7tTPucKxN LD50TBZjhZf2Tsjti3cZxQGUcdbIr0ZIOlwAa/1p6vCE7mygOtYAKLsgj2j1FmIbLln5 vaUEEbidjn3x9c2JP3w6o13O6RnpTRyad50FIzI375kWH35SUhOm4lqHE0FlPixlhdA0 CHzZtZ+HvjDPpm3Ei4qxUwzUHpCcfWWHWNoxY+aIfhWFi4LEE0j4kEHM0reXDRY0K8aI LBwmqLjbi7wZtMWhwujLMfj6cIda5OflnYwMPrpdHK612/RooFEJB3uQKY/wHvsCyABl LXfQ== X-Gm-Message-State: AIkVDXLwKQ+jBwCJCOcsa/4KGnH5Wnw6Iy/t7fuop0orU2CdwvPyD08VVpDdwf7mLZ1aJT2y X-Received: by 10.28.62.144 with SMTP id l138mr12477911wma.50.1485770546091; Mon, 30 Jan 2017 02:02:26 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id j18sm21939536wrb.33.2017.01.30.02.02.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Jan 2017 02:02:25 -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 v7 10/14] sata: ahci-da850: add a workaround for controller instability Date: Mon, 30 Jan 2017 11:02:07 +0100 Message-Id: <1485770531-6772-11-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> References: <1485770531-6772-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 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 Acked-by: Tejun Heo --- drivers/ata/ahci_da850.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) -- 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 84c7805..d65088a 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 Mon Jan 30 10:02:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92801 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1357969qgi; Mon, 30 Jan 2017 02:03:05 -0800 (PST) X-Received: by 10.84.229.13 with SMTP id b13mr30702331plk.175.1485770585862; Mon, 30 Jan 2017 02:03:05 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 89si12103617plc.324.2017.01.30.02.03.05; Mon, 30 Jan 2017 02:03:05 -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 S1752493AbdA3KDC (ORCPT + 7 others); Mon, 30 Jan 2017 05:03:02 -0500 Received: from mail-wj0-f181.google.com ([209.85.210.181]:33305 "EHLO mail-wj0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751750AbdA3KCd (ORCPT ); Mon, 30 Jan 2017 05:02:33 -0500 Received: by mail-wj0-f181.google.com with SMTP id un2so3735134wjb.0 for ; Mon, 30 Jan 2017 02:02:33 -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=6lDvDDznS2Nk/kgCz+B7lKGksqha8DTLTepcz0wgWw4=; b=qC/Y14YSa6x18AKI0ugzJAytxC5QbrypR83HszGs5irocoRqOyeharvhDczTrWk9Ro WSzlCkmoh4wQ/ghUcqnlAT2ibi9u9Dv3cihZ2szV6nWMDdru36DRpk1AXG3XDW3Fvw/7 BXqtFRILYbNdtcPNgN5y5YY9y97RwaM3CtYSvgESOz0UarCuEp9aUeCEOARgWBAJnmLs YsSucgzKnffRjJsKTkZLd9aPaGL2xte5M9aKO8pnRr4Tig1+ERypzwmEdrePuQRGVejF t1UQtvfOXnuh0J8ePdIIBfpu59CUSTgDN9nVIpzsl0cOQxWJ0eK+7flCN9DtqjGqMscQ Nx2Q== 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=6lDvDDznS2Nk/kgCz+B7lKGksqha8DTLTepcz0wgWw4=; b=jQwxUwvMf6y5pJda5jDj8wIH5Hc+lfRjFeVDeLXlrXC/u325jO5GWQSUArwolueM/Q 8SE8s3Ns94haN5qEviMa9nG9d0YbKyCHQHKmHq+1ePX9K51Zr0bXf3VCxsbhzNBBQy73 1kRvySr0L/zacuGOqJMJW0TYLjZ+bNxra8PE4LMISGmrHMRrE3Eg6nRMffq23h/AOhg/ aTAHvBJKv9G15wTjYuQ8eUQJMR5uw163Ii6I5G0Ba1HVKSvC3ud9iBk+dCrIRcuh6dWC cHISi/ObSXRvZQJRH6T5gZmZARq3zx1IfBC6LMsKe2fl3Ywk/3aizHMcApadCMHWk4RM L5VQ== X-Gm-Message-State: AIkVDXI17p2970R+2xlqFLia2LUvUm+Ncj/j+6Ce3+s8nsiE6gmq1rvkh07fvBXtkRkH+wN+ X-Received: by 10.223.171.149 with SMTP id s21mr17477593wrc.64.1485770547278; Mon, 30 Jan 2017 02:02:27 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id j18sm21939536wrb.33.2017.01.30.02.02.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Jan 2017 02:02:26 -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 v7 11/14] sata: ahci-da850: un-hardcode the MPY bits Date: Mon, 30 Jan 2017 11:02:08 +0100 Message-Id: <1485770531-6772-12-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> References: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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 Acked-by: Tejun Heo --- drivers/ata/ahci_da850.c | 91 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 76 insertions(+), 15 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_da850.c b/drivers/ata/ahci_da850.c index d65088a..44bb795 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 Mon Jan 30 10:02:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92808 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1358489qgi; Mon, 30 Jan 2017 02:04:21 -0800 (PST) X-Received: by 10.84.168.131 with SMTP id f3mr30776644plb.163.1485770661313; Mon, 30 Jan 2017 02:04:21 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m63si12174158pfc.123.2017.01.30.02.04.21; Mon, 30 Jan 2017 02:04:21 -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 S1752213AbdA3KDH (ORCPT + 25 others); Mon, 30 Jan 2017 05:03:07 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:37840 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752232AbdA3KCf (ORCPT ); Mon, 30 Jan 2017 05:02:35 -0500 Received: by mail-wm0-f51.google.com with SMTP id v77so39996460wmv.0 for ; Mon, 30 Jan 2017 02:02:29 -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=S//2mdyvc8OLFgzVGSQllssVRu0DPbhMfBlzJWoBOAxf0MVPapV84enhZQNxPgyOJw PlrbdjgG/HZ5j7qzU+7FMx9QAWmUmhMXwb2zMRfR6mA3pGhK1AJmhPlJHR3jCQRhUO2e cayddemiQbENgtutGLLOnYKH2vS/pu2GAAMagFtyJxSDZ725sVz+MYNiwcLBfR1msb4V xbPuEtZMY2+zyLUIkc+sErDLZgZnq491t8up/6m+wZxC9R6e7lDgtnOMWrQ8mvBtVG1O h4ixi3KX68DJLx77HJAd2Uwcep6zvALmPZHDsKMtTc+2J5/TJnJXDwRWC08ireNHrEGH l/hA== 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=K7RMSUQsm/a16Kt8JqNgDv9zPRRM7HzEusL6NGisjcgooDcSRTJyORGC0gCUS8vwMe XsdXZ9zeKdwnZQycJeGHkFdpFgX3GYvFyuVxXOvzPG0CBzpVzhIZUPD5v0gTqoVOoNCN 25RH5MoPAdfOsheEXdGjQqbjmJOfQCQ2S6Oi7oNrz3cO5qK+OJvjwcn80SKDlSGC1wag VzRTi5tIJOCB5B/M73EMdSA2iNjWAXQRixO9tJGu+fhevh4wSPT0Zighml6Jbs6WiBLn LLozVy9j4w9P1eVL1eRF6WHOjTAMzR+sfyhTzYFlu8eXc3iDIo65vOyBMXvSwHfIrOWI IxLA== X-Gm-Message-State: AIkVDXK8dAPTSmk1hyMVCB+Z6ZDlIPDgII/WmOl9WDxjPYqO9kKlfWgfYxrSRqWpfajpj8eY X-Received: by 10.28.189.135 with SMTP id n129mr12213127wmf.92.1485770548363; Mon, 30 Jan 2017 02:02:28 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id j18sm21939536wrb.33.2017.01.30.02.02.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Jan 2017 02:02:27 -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 v7 12/14] ARM: davinci: remove BUG_ON() from da850_register_sata() Date: Mon, 30 Jan 2017 11:02:09 +0100 Message-Id: <1485770531-6772-13-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> References: <1485770531-6772-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 Mon Jan 30 10:02:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92804 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1358080qgi; Mon, 30 Jan 2017 02:03:21 -0800 (PST) X-Received: by 10.98.25.21 with SMTP id 21mr22467282pfz.46.1485770601826; Mon, 30 Jan 2017 02:03:21 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w72si12181049pfa.220.2017.01.30.02.03.21; Mon, 30 Jan 2017 02:03:21 -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 S1752021AbdA3KDO (ORCPT + 7 others); Mon, 30 Jan 2017 05:03:14 -0500 Received: from mail-wj0-f178.google.com ([209.85.210.178]:35115 "EHLO mail-wj0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752207AbdA3KCa (ORCPT ); Mon, 30 Jan 2017 05:02:30 -0500 Received: by mail-wj0-f178.google.com with SMTP id b20so3760052wjs.2 for ; Mon, 30 Jan 2017 02:02: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=TrAFn/NYwHWcvt44q42M65nnIphZ9dHEVXzk6R5FxqOBnaHZO/Mh5VEd/iFNkOxX1m nH2yH1OgLceBKJ8ML46pVN4GwDUSebm2CSXc5ikCUX6aLCQyMUpZ9fyQkS58AFF3qUV8 JZnwqveKNex8Mdkj9UIzRl2g6ehSt7/lQW70qJ3VhPBtauXsgPw8aFhPshycBgZK9f2C ZWNU1Rp86ul/y5uGtV6KUkFIu/oECBg84Q8zv6azrx398RaRA05PJVxmtSNmJ4BtJN7E dg3RXyV8jy/ZwZ3yfu8luR9Na65AOtF0J+DCA5paJHLkFieIHJtSHw7mIQ9SznQQ+q4K 6H2w== 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=UjtP07R76IKdIqwitsoEnEzKbAIGVCwxn777rkyYSuXk1AWF24ITqmTkvumuyFgf4X /Cpu18KWgK6tRO6eYwcmq1myEBxZRaoevzeBrqvqKzKYi1N0X/XjCpAhvDkmZQlZjvb+ Fck9GuPiQ9wDdo3UC3QvSZ6BqD8iElvUXZykuTAGw0V0idjabCYk9leR/7R8EOcbxHH/ S71f2yRp4fgZHETBEZ9gi8XPGZZKCMydLuUaZsojfzVPx6PamqSJ/Z8AXZIgGkeJknM5 Sg++JNvLSFpe4Pm4Px51co3/IC1T8rJDkcWujivrWUar71W5RII22uJD0Nh39B4cBENu +jow== X-Gm-Message-State: AIkVDXJv0DkOkjodHFde8bdFcnCvgSCob+eYxrsv0YJU+4Vwx/0cqtBYHr0uF0VwjeOH7Ror X-Received: by 10.223.169.140 with SMTP id b12mr17678182wrd.138.1485770549538; Mon, 30 Jan 2017 02:02:29 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id j18sm21939536wrb.33.2017.01.30.02.02.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Jan 2017 02:02:28 -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 v7 13/14] ARM: dts: da850: add the SATA node Date: Mon, 30 Jan 2017 11:02:10 +0100 Message-Id: <1485770531-6772-14-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> References: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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 -- 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.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 Mon Jan 30 10:02:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92809 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1358646qgi; Mon, 30 Jan 2017 02:04:45 -0800 (PST) X-Received: by 10.99.94.71 with SMTP id s68mr22577662pgb.181.1485770685132; Mon, 30 Jan 2017 02:04:45 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t25si8111401pgo.353.2017.01.30.02.04.44; Mon, 30 Jan 2017 02:04:45 -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 S1752038AbdA3KEg (ORCPT + 7 others); Mon, 30 Jan 2017 05:04:36 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:34829 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752277AbdA3KCh (ORCPT ); Mon, 30 Jan 2017 05:02:37 -0500 Received: by mail-wm0-f44.google.com with SMTP id b65so25109304wmf.0 for ; Mon, 30 Jan 2017 02:02:36 -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=YM9km7LAXonCxpdLBacmHtOzO+fuOUktg9gXsqwgDDrKro9LkNTuAOclefF+3y06IF UjcF8kzZ2TM4P3YYnIURypZUTb9DJk0oMtGfe0GKBy5GuN7OIUiIFyb+ogUOXrAL2VF/ b/P+1AAkmXd0S+tS1UB2EHP8knljskAxdGk2D+TqvI6r3tWi+nwAWD//NSOj7rb9Q4Mv KB5ScV8ZOmzXf9B6bKWSsDfgVh84iqXl9c37oCrizbfKbOdtAE+aHKeY6zMjfdTYQbYd wRMpQMocGAOzaXlt7HPtvB1sCH+yOeYC2HTMSjsrPom+Pfs1QvOUG8rnzeSrhenLTTWq dkSw== 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=qoqnnR22o4Vej2qLL4kaathniKVPXPWmP1anTgKqhlil67oSU6Aijc+HSK8b+OLtwk 5Y/1Uqtx+dgAhckuzfLFAEeItoiL7ttrffjsQUfSaJg39kMeg6p3u0LTJZNSxIyTpbGs 2hS3qvndNfsQmpGOMOkExNoXy7lAr2SgwMA3RNYSXl9oceuhERyY4vDSNwBmVehghDJ7 KVuvHvlN8nZ6bSCRcUId+LJXGEvCisWfBRuoW9Uw/m2zcp6jkRxwM9B9mJ7NzLzYWu2r gx3AoU0aNNCXgpfnbRYPUFt5vLKz9dOF4dOW1a/UjTKSg5uYgSnjSdmX+dCFxHQ+88zw Bd2Q== X-Gm-Message-State: AIkVDXLoS4PiaTeQ/jC+SeRUwNAsnQLBwDk2bUK8PunkOrjVUfq2LLXHOcOWYpzVRiM8dh/C X-Received: by 10.223.130.118 with SMTP id 109mr21244044wrb.10.1485770550995; Mon, 30 Jan 2017 02:02:30 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id j18sm21939536wrb.33.2017.01.30.02.02.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Jan 2017 02:02:30 -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 v7 14/14] ARM: dts: da850-lcdk: enable the SATA node Date: Mon, 30 Jan 2017 11:02:11 +0100 Message-Id: <1485770531-6772-15-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> References: <1485770531-6772-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>;