From patchwork Mon Jan 23 17:00:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 92238 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1318349qgi; Mon, 23 Jan 2017 09:02:52 -0800 (PST) X-Received: by 10.237.63.7 with SMTP id p7mr23930160qtf.34.1485190972790; Mon, 23 Jan 2017 09:02:52 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id l198si5386767qke.24.2017.01.23.09.02.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jan 2017 09:02:52 -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 1cVi15-0002cq-50; Mon, 23 Jan 2017 17:02:51 +0000 Received: from mail-wj0-f177.google.com ([209.85.210.177]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cVi0c-0002Zx-9y for linux-arm-kernel@lists.infradead.org; Mon, 23 Jan 2017 17:02:27 +0000 Received: by mail-wj0-f177.google.com with SMTP id un2so715559wjb.0 for ; Mon, 23 Jan 2017 09:02:01 -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; bh=NR9SPjh4q4A8TrC6sYEvJ4obV31kVfQ1jW4HK+HUD8E=; b=0dATWc59M0tlLzQ2nSje4Nga1VdWphRZGOm7raflV4TSH0Tlgtjso83DCmjvdUGO1w /wL4kQI1QLu2kbYySg27N2vSZGjHn9xAJwoWa5A73ez/k8RD2uHSy6VEgWFCenGrGWEj 4ByUUi6G7r4qsyP56bEQHk2xzIK69O0fvJGrIh+iw6E0VkwR8ZXv7TDOhFiWINsjtda2 BdUk7sFXb8Xveem3lTDP4lKH7nVN0kPkODSCbWbilUYWlYDKpyv0PuqoXNwfItqWoURQ cxlkXEyw1P/e4j+vSTK1yZOcpMzoFl8YrDbPaOC3MlxeEtnTs2pPp4tQ77aLJVlT/45g 5rzg== 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; bh=NR9SPjh4q4A8TrC6sYEvJ4obV31kVfQ1jW4HK+HUD8E=; b=szXVNFxd1OvmBilB3yzv+y6QZVlHzoB5VaDfTenvmJP02xVvtzpQk70sQSNKCV6PQf YLJUiwybF/MLV4RREgFHncMpXxRPfPC80IBPq3uZZty3ePNxp93rrUZQzcfJ9qBOWoGu kuTVKO0XLV9mcev01LTrQExVCWM6C3OpwsEK0kQnPKSnAWK9ZeCv3dtGvHEhYD7UKegf f+914JPDTqKKUS+Bf3TFKPYaZQPi9fS73PxswhqKvFz38J0rCwflqga+/w0k0ELyWxNZ YgXoy3GUe0MY7WWfyRpFgcODqAyxVWZVvtci/UmVwW360V309DSa3AHzSW2ovBTOjcj6 wmUQ== X-Gm-Message-State: AIkVDXKxbUGyPHAxMKl+HAD9Kvl/Wm1eCFfYRM6FZhAJ1+qA5Hy/u/UMLuaaVRE0JqlvhROC X-Received: by 10.223.155.197 with SMTP id e5mr24167048wrc.133.1485190860403; Mon, 23 Jan 2017 09:01:00 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id l10sm12758910wrb.44.2017.01.23.09.00.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Jan 2017 09:00:59 -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 v6 00/14] ARM: da850-lcdk: add SATA support Date: Mon, 23 Jan 2017 18:00:42 +0100 Message-Id: <1485190856-4711-1-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170123_090223_434764_5EE8B30A X-CRM114-Status: GOOD ( 16.11 ) 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 [209.85.210.177 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.177 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 series contains all the changes necessary to make SATA work on the da850-lcdk board. The first patch adds DT bindings for the ahci-da850 driver. The second enables relevant modules in davinci_all_defconfig. Patches 03/14-06/14 modify the way the clocks are handled regarding SATA on the da850 platform. We modify the ahci driver to retrieve the clock via con_id and model the external SATA oscillator as a real clock. Patches 07/14-11/14 extend the ahci-da850 driver. Add DT support, implement workarounds necessary to make SATA work on the da850-lcdk board and un-hardcode the external clock multiplier. Patch 12/14 removes a no longer needed BUG_ON. Last two patches add device tree changes required to probe the driver. v1 -> v2: - dropped patch 04/10 - replaced with local changes in the ahci-da850 driver - added comments explaining the workaround in ahci softreset - s/0x218000/218000 in the sata DT node label - added patches chaning the way clocks are handled in the da850 SATA code both in arch/ and in the ahci driver - dropped the clock multiplier property in the DT bindings in favor of using struct clk to pass the refclk rate to the driver - minor tweaks in commit messages v2 -> v3: - dropped the clocks property from the ahci-da850 DT binding - dropped patch 12/14 (SATA pinmux settings) - dropped an outdated fragment from the commit message in patch 14/14 - s/get_clk()/clk_get()/ - s/connector id/connection id/ - stopped using __div64_32() after noticing that it sometimes produces invalid results - removed the default MPY value from ahci-da850 - registered SATA refclk for board file boot mode as well v3 -> v4: - added a patch removing the no longer needed BUG_ON() from da850_register_sata() - fixed indents v4 -> v5: - renamed the DT node for the SATA controller from 'ahci' to 'sata', while keeping the label as 'sata' - renamed the SATA node in the DT example as well - instead of calling the refclk clock 'dummy', called it 'fixed rate' v5 -> v6: - specified what the required register regions are in the device tree bindings Bartosz Golaszewski (14): devicetree: bindings: add bindings for ahci-da850 ARM: davinci_all_defconfig: enable SATA modules ARM: davinci: add a clock lookup entry for the SATA clock sata: ahci-da850: get the sata clock using a connection id ARM: davinci: da850: add con_id for the SATA clock ARM: davinci: da850: model the SATA refclk sata: ahci-da850: add device tree match table sata: ahci-da850: implement a workaround for the softreset quirk sata: ahci: export ahci_do_hardreset() locally sata: ahci-da850: add a workaround for controller instability sata: ahci-da850: un-hardcode the MPY bits ARM: davinci: remove BUG_ON() from da850_register_sata() ARM: dts: da850: add the SATA node ARM: dts: da850-lcdk: enable the SATA node .../devicetree/bindings/ata/ahci-da850.txt | 18 +++ arch/arm/boot/dts/da850-lcdk.dts | 4 + arch/arm/boot/dts/da850.dtsi | 6 + arch/arm/configs/davinci_all_defconfig | 2 + arch/arm/mach-davinci/da850.c | 2 +- arch/arm/mach-davinci/da8xx-dt.c | 9 ++ arch/arm/mach-davinci/devices-da8xx.c | 30 +++- arch/arm/mach-davinci/include/mach/da8xx.h | 1 + drivers/ata/ahci.h | 3 + drivers/ata/ahci_da850.c | 175 +++++++++++++++++++-- drivers/ata/libahci.c | 18 ++- 11 files changed, 243 insertions(+), 25 deletions(-) create mode 100644 Documentation/devicetree/bindings/ata/ahci-da850.txt -- 2.9.3 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel