From patchwork Thu Aug 30 19:01:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 145578 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp252875ljw; Thu, 30 Aug 2018 12:02:12 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYSOnR81WaZ0+YkM3GlKVDLFD+75udW+fDTRkq/OCE3C/Gw8IgksefeG5r7y2uytBCuS7u5 X-Received: by 2002:a63:5fc8:: with SMTP id t191-v6mr10962765pgb.183.1535655732567; Thu, 30 Aug 2018 12:02:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535655732; cv=none; d=google.com; s=arc-20160816; b=HOFnrrxJ8cpg2emLDnuDn5xO0MI5khy3fTfxYOpY1W+ryp/dnSNGzULDKgSU3ViQCu Mp55IXgkNm81FYC5AhE0qVsE9PYWxeNBh8UJ8y5Ftp8P+wE3YfOtr6DLjJoPKentGgdh pNLd4BATHnjLSQ3vsL45wN63NW+FhU+9+r2e/rBspI8m0SSG50JafmnOR/+kumDt3sNE pkI5lydUwXKVRf40XcH8hA39FITISSqmIxMCJDfZ8ryBhuwuS9SzM5PxaE0y3Vl4ArWQ mAR+7MRgv8htjOQU4m5HVfUGXSlovCK9LiHo8/7J+ZWXzAkGl+vcC0czeAyxwKO4luIz OapA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=uNj/VFnQ8ClUwahEmW/nsQHB3Tb5wCIwIO0nNsAKcxw=; b=EPhILZPbpukbuUqfRrJYLWe/ab6w5Dn/a3fR9qSFSRwcxvFzhHXbbYtTXcRWIqPuHQ UHirc6ic+ViCmc+c1InyBhZbOhwU5FvZWdbUYxmdxpZ74fEIuqcFS1pa1s8tj8t8jcD/ AnFP5qejwPv/rw2XgYbyJFKGpA/aFBkT2xBGHUxndbSY3nmnY2MQF9enZF7k0f3Rp0Lm kOZ23dOwMlsabBYbl70SawQviYdNRPJUBOOuNYETHhu1TeuTDx5vAXwY/pwr15t15u+u jZbfFMRUSNPlDCqFWZ1eY114X1WHyueX+EwOQxniOlKljEJ65oGRbjkWVBkzO0jFrUBY OLyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FEZwUB3M; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d41-v6si7063967pla.172.2018.08.30.12.02.12; Thu, 30 Aug 2018 12:02:12 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=FEZwUB3M; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728162AbeH3XFU (ORCPT + 32 others); Thu, 30 Aug 2018 19:05:20 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:42210 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727597AbeH3XFU (ORCPT ); Thu, 30 Aug 2018 19:05:20 -0400 Received: by mail-wr1-f68.google.com with SMTP id v17-v6so9022741wrr.9; Thu, 30 Aug 2018 12:01:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uNj/VFnQ8ClUwahEmW/nsQHB3Tb5wCIwIO0nNsAKcxw=; b=FEZwUB3Mxqu3I2HveWXbgjeeLpkCRzAfpH7tKqoRBFDxUFALUdOmJ4mWYpohlzglL1 NtEPtxVQfhGjdM/CgpeFwYO8ZSDEvUsU9Z1hJhzfnruafzx8KtC55j1PbodUkPaxxyio //Erxs96nnV61D7JlMgLX601RDgoZ8V0wxuQKdPpX4/C9EUoXS5ByDyyLDnBZwH/Z8pR w16fSJ2+B4KZnXxPHHlKVSbF/D62UlGX12D9upR2ERu+VDYV5hkMxM329J8KOujbGLN/ maPOvYaQRyk0huvmRJe2crxeM4aCoNkW3CRCJWN/FhdC6x+/eUakkoRCY1N/mABWU9h0 8oUQ== 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=uNj/VFnQ8ClUwahEmW/nsQHB3Tb5wCIwIO0nNsAKcxw=; b=uK3SAXtm17QfWR9hJ6x/qSRHdbGmmYIbPutp8MWyLtWjwKJd0oOF9gyi4fXjoP1wdn YI/dI69xF6o9ehzxLgWeUbW/pvdZ9CUhx8MFyISmGhvgFRgHPOZzlacujlAyN+4khWvS LPCULDXigdz8TSVtdRDlMDHB/bcD9EquH4nscoSIaGqAx5ZrvWFFgjPaBx6LhrCAxYU6 SZOCyQfcLDkpKT/FP3RfIENyAiRICvNokUlfiC3mPhZjiaTA0P2mRMkhJgTNOeocsDf4 n9TtQnLg4pnFUMge3qw2l4nJEgSiY2nf2y7ah4ETNDHfM3lR0sXY5b5TtfpvX9gaKFD/ aieg== X-Gm-Message-State: APzg51BrxhrYGR2O0hi4mC3/UmZ+yOGlxyTEI/PQSs0SF6XGlI04+DRz Q4YH8C/A6V2TXqfHD1FBFsg= X-Received: by 2002:adf:a602:: with SMTP id k2-v6mr7952700wrc.181.1535655701025; Thu, 30 Aug 2018 12:01:41 -0700 (PDT) Received: from Red.localdomain ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id w17-v6sm2937095wmc.43.2018.08.30.12.01.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 12:01:40 -0700 (PDT) From: Corentin Labbe To: axboe@kernel.dk, hdegoede@redhat.com, kishon@ti.com, mark.rutland@arm.com, maxime.ripard@bootlin.com, robh+dt@kernel.org, wens@csie.org, clabbe.montjoie@gmail.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH v4 08/13] ata: ahci_sunxi: add support for r40 Date: Thu, 30 Aug 2018 21:01:15 +0200 Message-Id: <20180830190120.722-9-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180830190120.722-1-clabbe.montjoie@gmail.com> References: <20180830190120.722-1-clabbe.montjoie@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch add the r40 compatible to the ahci_sunxi's supported list of compatible. Since R40 need ahci_platform to handle the reset controller, we also add the new AHCI_PLATFORM_GET_RESETS flag for ahci_platform_get_resources(). This has no consequence for older platform (a10, a20) since the reset is optional. Signed-off-by: Corentin Labbe --- drivers/ata/ahci_sunxi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.16.4 diff --git a/drivers/ata/ahci_sunxi.c b/drivers/ata/ahci_sunxi.c index a09d189c6dda..b8cf3a1be80b 100644 --- a/drivers/ata/ahci_sunxi.c +++ b/drivers/ata/ahci_sunxi.c @@ -190,7 +190,7 @@ static int ahci_sunxi_probe(struct platform_device *pdev) struct ahci_host_priv *hpriv; int rc; - hpriv = ahci_platform_get_resources(pdev, 0); + hpriv = ahci_platform_get_resources(pdev, AHCI_PLATFORM_GET_RESETS); if (IS_ERR(hpriv)) return PTR_ERR(hpriv); @@ -259,6 +259,7 @@ static SIMPLE_DEV_PM_OPS(ahci_sunxi_pm_ops, ahci_platform_suspend, static const struct of_device_id ahci_sunxi_of_match[] = { { .compatible = "allwinner,sun4i-a10-ahci", }, + { .compatible = "allwinner,sun8i-r40-ahci", }, { }, }; MODULE_DEVICE_TABLE(of, ahci_sunxi_of_match);