From patchwork Tue Jul 19 15:48:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siva Durga Prasad Paladugu X-Patchwork-Id: 650106 X-Patchwork-Delegate: monstr@monstr.eu 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 3rtwzl6TCTz9sBR for ; Tue, 19 Jul 2016 20:20:51 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 74996A75F9; Tue, 19 Jul 2016 12:20:17 +0200 (CEST) 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 vBAS1EF5ZyIS; Tue, 19 Jul 2016 12:20:17 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9E6C1A75FF; Tue, 19 Jul 2016 12:19:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9012AA75A9 for ; Tue, 19 Jul 2016 12:19:51 +0200 (CEST) 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 c3PSTm1bwlZ9 for ; Tue, 19 Jul 2016 12:19:51 +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 NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0085.outbound.protection.outlook.com [104.47.38.85]) by theia.denx.de (Postfix) with ESMTPS id 09887A751C for ; Tue, 19 Jul 2016 12:19:39 +0200 (CEST) Received: from BL2NAM02FT060.eop-nam02.prod.protection.outlook.com (10.152.76.57) by BL2NAM02HT088.eop-nam02.prod.protection.outlook.com (10.152.77.64) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.539.16; Tue, 19 Jul 2016 10:19:38 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by BL2NAM02FT060.mail.protection.outlook.com (10.152.76.124) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.539.16 via Frontend Transport; Tue, 19 Jul 2016 10:19:37 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:46107 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1bPS7g-0004Ze-0I; Tue, 19 Jul 2016 03:19:32 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1bPS7j-0007CF-RV; Tue, 19 Jul 2016 03:19:35 -0700 Received: from xsj-pvapsmtp01 (maildrop.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id u6JAJSjt021342; Tue, 19 Jul 2016 03:19:28 -0700 Received: from [172.23.37.99] (helo=xhdsivadur40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1bPS7c-0006zk-1z; Tue, 19 Jul 2016 03:19:28 -0700 From: Siva Durga Prasad Paladugu To: Date: Tue, 19 Jul 2016 21:18:34 +0530 Message-ID: <1468943314-18468-10-git-send-email-sivadur@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1468943314-18468-1-git-send-email-sivadur@xilinx.com> References: <1468943314-18468-1-git-send-email-sivadur@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22460.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(199003)(189002)(107886002)(5003940100001)(8936002)(87936001)(47776003)(48376002)(110136002)(189998001)(36756003)(586003)(4001430100002)(81166006)(36386004)(106466001)(33646002)(356003)(92566002)(50466002)(77096005)(86362001)(11100500001)(2351001)(81156014)(76176999)(50986999)(50226002)(2906002)(19580405001)(5003600100003)(19580395003)(7846002)(305945005)(4326007)(7696003)(9786002)(8676002)(2950100001)(229853001)(63266004)(107986001)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2NAM02HT088; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: e322aad6-cd42-4538-fc09-08d3afbe3072 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:BL2NAM02HT088; X-Microsoft-Antispam-PRVS: <9329b9abf02b4482aff5f57e4f5d5eb7@BL2NAM02HT088.eop-nam02.prod.protection.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13023025)(5005006)(8121501046)(13018025)(13024025)(13017025)(13015025)(3002001)(10201501046)(6055026); SRVR:BL2NAM02HT088; BCL:0; PCL:0; RULEID:; SRVR:BL2NAM02HT088; X-Forefront-PRVS: 000800954F X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2016 10:19:37.2266 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2NAM02HT088 Cc: michals@xilinx.com, Siva Durga Prasad Paladugu Subject: [U-Boot] [PATCH v2 9/9] spi: spi_flash: Set Quad enable bit of upper flash X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Set quad enable for upper flash incase of Dual stacked mode. Signed-off-by: Siva Durga Prasad Paladugu --- drivers/mtd/spi/spi_flash.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index 293b47b..5a152db 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -1237,6 +1237,17 @@ int spi_flash_scan(struct spi_flash *flash) debug("SF: Fail to set QEB for %02x\n", idcode[0]); return -EINVAL; } +#ifdef CONFIG_SF_DUAL_FLASH + if (flash->dual_flash & SF_DUAL_STACKED_FLASH) { + flash->spi->flags |= SPI_XFER_U_PAGE; + if (set_quad_mode(flash, idcode[0])) { + debug("SF: Fail to set QEB Upper Flash %02x\n", + idcode[0]); + return 0; + } + flash->spi->flags &= ~SPI_XFER_U_PAGE; + } +#endif } /* Read dummy_byte: dummy byte is determined based on the