From patchwork Sat Jan 18 18:44:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 3508691 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 92BF6C02DC for ; Sat, 18 Jan 2014 19:53:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BE2B420122 for ; Sat, 18 Jan 2014 19:53:19 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (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 496C9200F2 for ; Sat, 18 Jan 2014 19:53:18 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W4bx2-0002uJ-85; Sat, 18 Jan 2014 19:53:04 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W4at9-0001Ks-Gy; Sat, 18 Jan 2014 18:44:59 +0000 Received: from pandora.arm.linux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W4at6-0001KY-9M for linux-arm-kernel@lists.infradead.org; Sat, 18 Jan 2014 18:44:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=pandora; h=Sender:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=WfDuIG+WBuEKOjV++ru8EhiS+kCRT1JTzMk4/hdLPLU=; b=JnR4XkdQ4Meab/FbVkkiHYEvSyCblbTs/0HiS+h9Ds71Bf8khDhQZMOrG4bJBSK98A3Bgr37Mc+oSir1CPf4g0hNv0yWQgXYoegGzgezsPONILBNCtn8GYuzmweeqGorW9WnJwf1mmDnQ04cgTf+o5vIUl8S1b1p6gj1aSjMJOc=; Received: from n2100.arm.linux.org.uk ([fd8f:7570:feb6:1:214:fdff:fe10:4f86]:44012) by pandora.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1W4asf-0005jy-FM; Sat, 18 Jan 2014 18:44:29 +0000 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1W4asd-00016i-Ri; Sat, 18 Jan 2014 18:44:27 +0000 Date: Sat, 18 Jan 2014 18:44:27 +0000 From: Russell King - ARM Linux To: Shawn Guo , Sascha Hauer , linux-arm-kernel@lists.infradead.org Subject: imx6 eSATA Message-ID: <20140118184427.GJ15937@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140118_134456_753937_3C8F7A96 X-CRM114-Status: GOOD ( 13.51 ) X-Spam-Score: -2.4 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable 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 So, I see we have AHCI support for SATA on the iMX6. Great... but it doesn't work on the cubox-i, because the phy settings are wrong. The Cubox-i requires GPR13 set to 0x0593A044 - I haven't decoded what this means yet, but it's different from the 0x0593E4A4 which is currently hard-coded into the driver (and I've independently tested that this is indeed required.) So, there's presently no DT properties for this - given that these parameters would be board specific, it surprises me that this has not been thought about, and properties already generated, because now it means that we need to _add_ new properties to this driver. Also, this PDDQ mode thing, which can't be recovered except by reset. This is another illustration why Linux is unfriendly - the thing can silently go into this power down mode which is irrecoverable without any messages being generated nor any hints how to avoid it - maybe this should also be a DT property, not just a command line option. More importantly, maybe we should print a message when we discover that there's nothing connected and we're going to enter this mode - maybe something like this: diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c index 3e23e9941dad..0a1ae7213992 100644 --- a/drivers/ata/ahci_imx.c +++ b/drivers/ata/ahci_imx.c @@ -77,6 +77,10 @@ static void ahci_imx_error_handler(struct ata_port *ap) !IMX6Q_GPR13_SATA_MPLL_CLK_EN); clk_disable_unprepare(imxpriv->sata_ref_clk); imxpriv->no_device = true; + + dev_info(ap->dev, "no device, link disabled until next reset.\n"); + dev_info(ap->dev, "pass " MODULE_PARAM_PREFIX + ".hotplug=1 to enable link hotplug support\n"); } static struct ata_port_operations ahci_imx_ops = {