From patchwork Tue May 1 19:55:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Nelson X-Patchwork-Id: 156201 X-Patchwork-Delegate: sbabic@denx.de 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 4E2B8B6FAB for ; Wed, 2 May 2012 05:55:24 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BF65928109; Tue, 1 May 2012 21:55:21 +0200 (CEST) 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 HyZTiMXnWTRF; Tue, 1 May 2012 21:55:21 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6C7202810B; Tue, 1 May 2012 21:55:20 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AE1732810B for ; Tue, 1 May 2012 21:55:18 +0200 (CEST) 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 H3T5MXdDY9Oh for ; Tue, 1 May 2012 21:55:17 +0200 (CEST) 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.integraonline.com (relay1.integra.net [204.130.255.180]) by theia.denx.de (Postfix) with SMTP id 3FCF628109 for ; Tue, 1 May 2012 21:55:16 +0200 (CEST) Received: (qmail 14951 invoked from network); 1 May 2012 19:55:15 -0000 Received: from unknown (HELO ericsony.example.org) (70.96.116.236) by relay1.integra.net with SMTP; 1 May 2012 19:55:15 -0000 From: Eric Nelson To: u-boot@lists.denx.de Date: Tue, 1 May 2012 12:55:11 -0700 Message-Id: <1335902111-10159-1-git-send-email-eric.nelson@boundarydevices.com> X-Mailer: git-send-email 1.7.9 In-Reply-To: References: Cc: marex@denx.de, rylv50@freescale.com Subject: [U-Boot] [PATCH V5] i.MX6: mx6q_sabrelite: add SATA bindings 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 Signed-off-by: Eric Nelson Acked-by: Marek Vasut Acked-by: stefano Babic --- V2 has been stripped of the board-independent changes and uses clrsetbits_le32() instead of twiddling bits by hand. V3 returns immediately from setup_sata() if enable_sata_clock() returns an error. V4 removes extra #include and addresses a style issue as discussed on the ML. V5 addresses another (hopefully last) style issue. board/freescale/mx6qsabrelite/mx6qsabrelite.c | 31 +++++++++++++++++++++++++ include/configs/mx6qsabrelite.h | 13 ++++++++++ 2 files changed, 44 insertions(+), 0 deletions(-) diff --git a/board/freescale/mx6qsabrelite/mx6qsabrelite.c b/board/freescale/mx6qsabrelite/mx6qsabrelite.c index 1d09a72..cdd2f15 100644 --- a/board/freescale/mx6qsabrelite/mx6qsabrelite.c +++ b/board/freescale/mx6qsabrelite/mx6qsabrelite.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -267,6 +268,32 @@ int board_eth_init(bd_t *bis) return 0; } +#ifdef CONFIG_CMD_SATA + +int setup_sata(void) +{ + struct iomuxc_base_regs *const iomuxc_regs + = (struct iomuxc_base_regs *) IOMUXC_BASE_ADDR; + int ret = enable_sata_clock(); + if (ret) + return ret; + + clrsetbits_le32(&iomuxc_regs->gpr[13], + IOMUXC_GPR13_SATA_MASK, + IOMUXC_GPR13_SATA_PHY_8_RXEQ_3P0DB + |IOMUXC_GPR13_SATA_PHY_7_SATA2M + |IOMUXC_GPR13_SATA_SPEED_3G + |(3<