From patchwork Thu Oct 30 10:21:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 5195421 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 15FED9F349 for ; Thu, 30 Oct 2014 10:25:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 339C32022D for ; Thu, 30 Oct 2014 10:25:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 388A12024C for ; Thu, 30 Oct 2014 10:25:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xjmsi-0003bT-AN; Thu, 30 Oct 2014 10:23:04 +0000 Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xjmrj-0002yT-MY for linux-arm-kernel@lists.infradead.org; Thu, 30 Oct 2014 10:22:07 +0000 Received: by mail-wi0-f178.google.com with SMTP id q5so6914198wiv.17 for ; Thu, 30 Oct 2014 03:21:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :content-type:content-transfer-encoding; bh=ql22nQGVrvaUuAxtWl53vma43nrcx2ifobu9bGAqUOM=; b=bEqYK/3yFghdROdd8UwNRQvY6UFc8AxLRNyoxyJz+t+LPRX0IgIF5f19glQlh8N7yg um47RBPVYSxNLQ32wmOTff/wHkZr5LFkZYlmpL+ii9ZBmbwBzDfbWYWVFdBMElmblzBB MYuUKwAAZ53gVuAM2nQuwCK8IFnOXyPRg9xgew0OfAhDY6hBPIXdatlNrRFi23njajvH Hnl7xWZj+KMPc3A3DTlNJZgjEGvDAjTIuPaRq7/D18QjTYX6ztitxenerRI6xlpk+vKK TFJ/MeBPW0xhY1RPqsB3nJCCq1UFAfabmKGi/0efMzF75dikeQJt0nhOB0E7f8cYyl2O ocbw== X-Received: by 10.194.219.230 with SMTP id pr6mr18830504wjc.40.1414664500681; Thu, 30 Oct 2014 03:21:40 -0700 (PDT) Received: from topkick.lan (e179205054.adsl.alicedsl.de. [85.179.205.54]) by mx.google.com with ESMTPSA id k10sm8163541wjb.28.2014.10.30.03.21.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Oct 2014 03:21:39 -0700 (PDT) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Subject: [PATCH v3 2/5] phy: berlin-sata: Add support for BG2 SATA PHY Date: Thu, 30 Oct 2014 11:21:25 +0100 Message-Id: <1414664488-5911-3-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1414664488-5911-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1413882477-27922-1-git-send-email-sebastian.hesselbarth@gmail.com> <1414664488-5911-1-git-send-email-sebastian.hesselbarth@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141030_032203_911084_FBE62D21 X-CRM114-Status: GOOD ( 13.90 ) X-Spam-Score: -0.8 (/) Cc: devicetree@vger.kernel.org, =?UTF-8?q?Antoine=20T=C3=A9nart?= , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Kishon Vijay Abraham I X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Berlin BG2 also has a SATA PHY compatible with the current driver except different PHY_BASE. Add a new compatible to the driver reflecting the different PHY_BASE. Acked-by: Antoine Ténart Signed-off-by: Sebastian Hesselbarth --- Changelog: v1->v2: - none v2->v3: - Use of_device_is_compatible for different PHY_BASE (Suggested by Felipe Balbi) Cc: Kishon Vijay Abraham I Cc: "Antoine Ténart" Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- drivers/phy/phy-berlin-sata.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/phy/phy-berlin-sata.c b/drivers/phy/phy-berlin-sata.c index cdb46d1203a4..873e7a890fee 100644 --- a/drivers/phy/phy-berlin-sata.c +++ b/drivers/phy/phy-berlin-sata.c @@ -30,6 +30,7 @@ #define MBUS_WRITE_REQUEST_SIZE_128 (BIT(2) << 16) #define MBUS_READ_REQUEST_SIZE_128 (BIT(2) << 19) +#define BG2_PHY_BASE 0x080 #define BG2Q_PHY_BASE 0x200 /* register 0x01 */ @@ -222,7 +223,10 @@ static int phy_berlin_sata_probe(struct platform_device *pdev) if (!priv->phys) return -ENOMEM; - priv->phy_base = BG2Q_PHY_BASE; + if (of_device_is_compatible(dev->of_node, "marvell,berlin2-sata-phy")) + priv->phy_base = BG2_PHY_BASE; + else + priv->phy_base = BG2Q_PHY_BASE; dev_set_drvdata(dev, priv); spin_lock_init(&priv->lock); @@ -271,6 +275,7 @@ static int phy_berlin_sata_probe(struct platform_device *pdev) } static const struct of_device_id phy_berlin_sata_of_match[] = { + { .compatible = "marvell,berlin2-sata-phy" }, { .compatible = "marvell,berlin2q-sata-phy" }, { }, };