From patchwork Mon Oct 29 15:23:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 195047 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 81EBE2C008B for ; Tue, 30 Oct 2012 02:31:33 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5A81B4A286; Mon, 29 Oct 2012 16:28:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K3yX5z-W0bip; Mon, 29 Oct 2012 16:28:31 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AE8784A0B5; Mon, 29 Oct 2012 16:25:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0B2FF4A047 for ; Mon, 29 Oct 2012 16:25:05 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c4gmqyYBi9Di for ; Mon, 29 Oct 2012 16:25:04 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ee0-f74.google.com (mail-ee0-f74.google.com [74.125.83.74]) by theia.denx.de (Postfix) with ESMTPS id 4FF774A025 for ; Mon, 29 Oct 2012 16:24:25 +0100 (CET) Received: by mail-ee0-f74.google.com with SMTP id b57so328375eek.3 for ; Mon, 29 Oct 2012 08:24:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=/Xv6Mc3Jyhf3z7dg5NifkktFVgnsvR28ywyoT0JR+/0=; b=Rvn3n9hRyEEXj0C8hFLnDgrm7f5LBVZJ0TT4WZ+ZwzmwJZY+mAUAOAOGGGMcOgmOFu pF1/yu2yVyyMT+xhUwwbibaQ4LJk7Xa5460SnhNtj6cXA7kP6ul1oOQqPrstZ7SeBTZ0 yqrx8ubTgoSTVaOoyTMZO+dXP+06aeFBJtxBDbX8xfBA/C1QHYuVZ2Cv4fll9VKQb0Ef TVE0jF+GZ1WCtv47cJrFOx2mvv0m1+LPYXgu0WRgkV4C0VeHzPQP4SipejAqgDCScyUP TT+q7kooPpbg2xUPgwcvnvcXL0vY88RBHVQMoDh6yBQvpOhTfN8GUCKJR3tbEfUALA9V yLJA== Received: by 10.181.13.75 with SMTP id ew11mr2080093wid.0.1351524260889; Mon, 29 Oct 2012 08:24:20 -0700 (PDT) Received: from hpza9.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id z47si2263514eel.0.2012.10.29.08.24.20 (version=TLSv1/SSLv3 cipher=AES128-SHA); Mon, 29 Oct 2012 08:24:20 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by hpza9.eem.corp.google.com (Postfix) with ESMTP id 83F775C0063; Mon, 29 Oct 2012 08:24:20 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id E6D23160C5F; Mon, 29 Oct 2012 08:24:19 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 29 Oct 2012 08:23:50 -0700 Message-Id: <1351524245-19584-8-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1351524245-19584-1-git-send-email-sjg@chromium.org> References: <1351524245-19584-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQkxlt1fOekPF06iYbT9MBrh1N0LYI3LjjcdC3eVoBtQY7wTkl074pdZ7X/wwrC5NuJBoGJXD7pR4oji3WU0xv75v/t/Iw1zuYPFo/kATSgpcnxfuHJbIsNfOToFddpXzeEDiiqHPohokF0TZavtTCV5tdpG9hgPr2B8VhYzegya4W3LFiSnjkhZO+CE1eBMJpgz2M0G Cc: Tom Rini , Stefan Reinauer , Rob Herring Subject: [U-Boot] [PATCH v3 07/22] ahci: Improve AHCI debugging X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Stefan Reinauer - remove unused ssleep macro - add some useful debugging information Signed-off-by: Stefan Reinauer Signed-off-by: Simon Glass --- drivers/block/ahci.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c index ad397dc..af31c97 100644 --- a/drivers/block/ahci.c +++ b/drivers/block/ahci.c @@ -68,7 +68,6 @@ static void ahci_setup_port(struct ahci_ioports *port, unsigned long base, #define msleep(a) udelay(a * 1000) -#define ssleep(a) msleep(a * 1000) static int waiting_for_cmd_completed(volatile u8 *offset, int timeout_msec, @@ -153,6 +152,7 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent) tmp = readl(port_mmio + PORT_CMD); if (tmp & (PORT_CMD_LIST_ON | PORT_CMD_FIS_ON | PORT_CMD_FIS_RX | PORT_CMD_START)) { + debug("Port %d is active. Deactivating.\n", i); tmp &= ~(PORT_CMD_LIST_ON | PORT_CMD_FIS_ON | PORT_CMD_FIS_RX | PORT_CMD_START); writel_with_flush(tmp, port_mmio + PORT_CMD); @@ -163,6 +163,7 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent) msleep(500); } + debug("Spinning up port %d... ", i); writel(PORT_CMD_SPIN_UP, port_mmio + PORT_CMD); j = 0;