From patchwork Wed Jan 18 13:19:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 91767 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1010249qgi; Wed, 18 Jan 2017 05:20:35 -0800 (PST) X-Received: by 10.98.157.83 with SMTP id i80mr3701672pfd.177.1484745635169; Wed, 18 Jan 2017 05:20:35 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t25si204672pge.272.2017.01.18.05.20.34; Wed, 18 Jan 2017 05:20:35 -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 S1751407AbdARNUS (ORCPT + 7 others); Wed, 18 Jan 2017 08:20:18 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:36994 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751891AbdARNUQ (ORCPT ); Wed, 18 Jan 2017 08:20:16 -0500 Received: by mail-wm0-f45.google.com with SMTP id c206so24753854wme.0 for ; Wed, 18 Jan 2017 05:20: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; bh=+NpYxzBzz5mwTSKqfwZ6ytICIe3oXGank31pSA/3MOo=; b=YNYB5WqP8jHgHfDHLDoZR46ESTHHtoZ6YExnpX/h633VnPkjDVrSytHnvsWrGv8Kgi Ib6dQIGI7+UNwEdDTeryuJBLx2j/s7UBMgvEhd6udeMZFdBONTet4F0fE1dk7ArPd9HV 2vZYd3B2LU1F956oqq01PO48Y32gritaTlViWagC+OLBELS5pnWCvEZYDW22he2Cb8VO p0RuN2gYDpYeYXlFw/TcP8L2Ahwq/ITOc9BCphMo+7vvJGAajmXptNnB7LyLM4tKCi6l NL9t/SlKFbGEL/QRetRkehBkTylSn2PCye0sIxrAp4XpFQbAp38uPo7qhW8oIzwJrtSM ZVyg== 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=+NpYxzBzz5mwTSKqfwZ6ytICIe3oXGank31pSA/3MOo=; b=MJIhC4axbBbNajpDS+4rKG9/Hw9uSKwiP5O/eVmUnrS9SV3oRUOJTmZsCXbQhraRGY r66aKUsLb64Z/gFyAYlT3fxILP7M0QL5K25KtCS2Y17q0NKdcFWO4DwhFqvbTTUTJ7WQ /re/SfFwsAU7EmjCyDN5yqRsobaopL1Zf4I61YHOWw3T1PI5nES70wBfULePYwrwnbN0 xQAfGQZ+XxOy7Vb6nwOFmQtxsLZOooj4v2E7xPU6/CNkqf+azxvOO5G9DArMqFE5xoCE VN6uLEirdz4vFdDQuMH6boUR5iCw7+hBN/Tg1AFY4s4yGxyfQhOUOiT/uivwO4jPE1mB dE6g== X-Gm-Message-State: AIkVDXKDizJ0M9BV9BHZLp0+4ZSzt2trdyJL9Tf8MnDphcYe17zekx7tnepuh6adOUpLXIkP X-Received: by 10.223.134.253 with SMTP id 58mr3428739wry.46.1484745614385; Wed, 18 Jan 2017 05:20:14 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id w79sm4899569wmw.0.2017.01.18.05.20.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Jan 2017 05:20: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 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 v3 00/13] ARM: da850-lcdk: add SATA support Date: Wed, 18 Jan 2017 14:19:48 +0100 Message-Id: <1484745601-4769-1-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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. 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 Bartosz Golaszewski (13): 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: dts: da850: add the SATA node ARM: dts: da850-lcdk: enable the SATA node .../devicetree/bindings/ata/ahci-da850.txt | 15 ++ 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 | 29 ++++ 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, 241 insertions(+), 23 deletions(-) create mode 100644 Documentation/devicetree/bindings/ata/ahci-da850.txt -- 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