From patchwork Tue Jul 1 09:18:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Fu X-Patchwork-Id: 366001 X-Patchwork-Delegate: jagannadh.teki@gmail.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 E1E821400AF for ; Tue, 1 Jul 2014 20:03:46 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 012FD4B754; Tue, 1 Jul 2014 12:03:38 +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 jl6Ppwg5TAGP; Tue, 1 Jul 2014 12:03:37 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D131A4B76B; Tue, 1 Jul 2014 12:03:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A89C04B741 for ; Tue, 1 Jul 2014 12:03:30 +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 nVkdNVKlD6ad for ; Tue, 1 Jul 2014 12:03:27 +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 na01-bn1-obe.outbound.protection.outlook.com (mail-bn1lp0145.outbound.protection.outlook.com [207.46.163.145]) by theia.denx.de (Postfix) with ESMTPS id 3FADD4B73E for ; Tue, 1 Jul 2014 12:03:17 +0200 (CEST) Received: from BY2PR03CA055.namprd03.prod.outlook.com (10.141.249.28) by BN1PR03MB169.namprd03.prod.outlook.com (10.255.200.142) with Microsoft SMTP Server (TLS) id 15.0.974.11; Tue, 1 Jul 2014 10:03:08 +0000 Received: from BY2FFO11FD001.protection.gbl (2a01:111:f400:7c0c::129) by BY2PR03CA055.outlook.office365.com (2a01:111:e400:2c5d::28) with Microsoft SMTP Server (TLS) id 15.0.974.11 via Frontend Transport; Tue, 1 Jul 2014 10:03:07 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD001.mail.protection.outlook.com (10.1.14.123) with Microsoft SMTP Server (TLS) id 15.0.969.12 via Frontend Transport; Tue, 1 Jul 2014 10:03:07 +0000 Received: from rock.ap.freescale.net (rock.ap.freescale.net [10.193.20.106]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s61A2vBN024825; Tue, 1 Jul 2014 03:03:05 -0700 From: Chao Fu To: , , , Date: Tue, 1 Jul 2014 17:18:07 +0800 Message-ID: <1404206287-9629-3-git-send-email-b44548@freescale.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1404206287-9629-1-git-send-email-b44548@freescale.com> References: <1404206287-9629-1-git-send-email-b44548@freescale.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(199002)(189002)(85306003)(76482001)(83072002)(33646001)(79102001)(83322001)(50226001)(89996001)(99396002)(76176999)(77982001)(4396001)(21056001)(88136002)(48376002)(69596002)(68736004)(85852003)(97736001)(50986999)(95666004)(46102001)(62966002)(77156001)(50466002)(105606002)(26826002)(81342001)(104166001)(2201001)(92726001)(31966008)(74662001)(92566001)(86362001)(93916002)(102836001)(36756003)(81156004)(80022001)(87936001)(19580405001)(44976005)(74502001)(19580395003)(87286001)(6806004)(81542001)(107046002)(229853001)(84676001)(20776003)(64706001)(106466001)(47776003)(104016002)(2101003)(217873001); DIR:OUT; SFP:; SCL:1; SRVR:BN1PR03MB169; H:az84smr01.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID: X-Forefront-PRVS: 02596AB7DA Received-SPF: Fail (: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=B44548@freescale.com; X-OriginatorOrg: freescale.com Cc: u-boot@lists.denx.de, B18965@freescale.com Subject: [U-Boot] [PATCH RFC 3/3] arm:vf610-twr:Add fsl-spi-interface config and board info 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Chao Fu Add spi device info for vf610-twr board. Enable fsl-spi-interface for compatibility of fsl-dspi and fsl-qspi. Signed-off-by: Chao Fu --- board/freescale/vf610twr/vf610twr.c | 24 ++++++++++++++++++++++++ include/configs/vf610twr.h | 2 ++ 2 files changed, 26 insertions(+) diff --git a/board/freescale/vf610twr/vf610twr.c b/board/freescale/vf610twr/vf610twr.c index 54a9f2c..356fcdc 100644 --- a/board/freescale/vf610twr/vf610twr.c +++ b/board/freescale/vf610twr/vf610twr.c @@ -402,6 +402,30 @@ int board_phy_config(struct phy_device *phydev) return 0; } +int board_spi_find_bus(unsigned int bus, unsigned int cs) +{ + switch(bus) { + case SPI_BUS_FSL_QSPI0: + break; + default: + return -1; + } + + switch(bus) { + case SPI_BUS_FSL_QSPI0: + if(cs == 0) + return 0; + default: + return -1; + } +} + +void board_print_spi_device(void) +{ + printf("VF610-TWR spi flash info:\n"); + printf("S25FL128S is on spi bus 0 cs 0\n"); +} + int board_early_init_f(void) { clock_init(); diff --git a/include/configs/vf610twr.h b/include/configs/vf610twr.h index 0342550..05e2dcc 100644 --- a/include/configs/vf610twr.h +++ b/include/configs/vf610twr.h @@ -68,6 +68,8 @@ #define CONFIG_PHYLIB #define CONFIG_PHY_MICREL +#define CONFIG_FSL_SPI_INTERFACE + /* QSPI Configs*/ #define CONFIG_FSL_QSPI