From patchwork Mon Jul 29 18:08:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagannadha Sutradharudu Teki X-Patchwork-Id: 262929 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 65E912C00BE for ; Tue, 30 Jul 2013 04:09:28 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0785E4A027; Mon, 29 Jul 2013 20:09:23 +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 hsR9YAHMTK+u; Mon, 29 Jul 2013 20:09:22 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5810E4A028; Mon, 29 Jul 2013 20:09:10 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4F1CB4A019 for ; Mon, 29 Jul 2013 20:09:08 +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 32EHVZH90BNx for ; Mon, 29 Jul 2013 20:09:02 +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 ch1outboundpool.messaging.microsoft.com (ch1ehsobe002.messaging.microsoft.com [216.32.181.182]) by theia.denx.de (Postfix) with ESMTPS id 130624A01C for ; Mon, 29 Jul 2013 20:08:57 +0200 (CEST) Received: from mail107-ch1-R.bigfish.com (10.43.68.226) by CH1EHSOBE009.bigfish.com (10.43.70.59) with Microsoft SMTP Server id 14.1.225.22; Mon, 29 Jul 2013 18:08:54 +0000 Received: from mail107-ch1 (localhost [127.0.0.1]) by mail107-ch1-R.bigfish.com (Postfix) with ESMTP id E3F58340114; Mon, 29 Jul 2013 18:08:54 +0000 (UTC) X-Forefront-Antispam-Report: CIP:149.199.60.83; KIP:(null); UIP:(null); IPV:NLI; H:xsj-gw1; RD:unknown-60-83.xilinx.com; EFVD:NLI X-SpamScore: 1 X-BigFish: VPS1(zzzz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6hzz1de098h8275bh1de097hz2fh95h668h839hd24hf0ah119dh1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h14ddh1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1b0ah1d0ch1d2eh1d3fh1dfeh1dffh1e1dh1e23h906i1155h192ch) Received-SPF: pass (mail107-ch1: domain of xilinx.com designates 149.199.60.83 as permitted sender) client-ip=149.199.60.83; envelope-from=jagannadha.sutradharudu-teki@xilinx.com; helo=xsj-gw1 ; helo=xsj-gw1 ; Received: from mail107-ch1 (localhost.localdomain [127.0.0.1]) by mail107-ch1 (MessageSwitch) id 1375121332821142_17268; Mon, 29 Jul 2013 18:08:52 +0000 (UTC) Received: from CH1EHSMHS008.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.253]) by mail107-ch1.bigfish.com (Postfix) with ESMTP id C319C2C004A; Mon, 29 Jul 2013 18:08:52 +0000 (UTC) Received: from xsj-gw1 (149.199.60.83) by CH1EHSMHS008.bigfish.com (10.43.70.8) with Microsoft SMTP Server id 14.16.227.3; Mon, 29 Jul 2013 18:08:52 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-smtp1.xilinx.com) by xsj-gw1 with esmtp (Exim 4.63) (envelope-from ) id 1V3rsK-0004vr-7Y; Mon, 29 Jul 2013 11:08:52 -0700 From: Jagannadha Sutradharudu Teki To: Date: Mon, 29 Jul 2013 23:38:35 +0530 X-Mailer: git-send-email 1.8.3 In-Reply-To: <1375121317-17262-1-git-send-email-jaganna@xilinx.com> References: <1375121317-17262-1-git-send-email-jaganna@xilinx.com> X-RCIS-Action: ALLOW MIME-Version: 1.0 Message-ID: <44ee45c2-e5af-47ce-a27b-63a4134eac53@CH1EHSMHS008.ehs.local> X-OriginatorOrg: xilinx.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Cc: Jagannadha@theia.denx.de, Sutradharudu Teki , Tom Rini Subject: [U-Boot] [PATCH 2/4] sf: Add bank addr access support macronix flash's 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 This patch adds bank addr access support for macronix flash's so-that the macronix flashes which has > 16Mbyte sizes can be accessible in 3-byte addressing mode. Signed-off-by: Jagannadha Sutradharudu Teki --- drivers/mtd/spi/spi_flash.c | 1 + drivers/mtd/spi/spi_flash_internal.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index 9814395..2528ebc 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -371,6 +371,7 @@ int spi_flash_bank_config(struct spi_flash *flash, u8 idcode0) break; case SPI_FLASH_STMICRO_IDCODE0: case SPI_FLASH_WINBOND_IDCODE0: + case SPI_FLASH_MACRONIX_IDCODE0: flash->bank_read_cmd = CMD_EXTNADDR_RDEAR; flash->bank_write_cmd = CMD_EXTNADDR_WREAR; break; diff --git a/drivers/mtd/spi/spi_flash_internal.h b/drivers/mtd/spi/spi_flash_internal.h index 20eed7c..30b2749 100644 --- a/drivers/mtd/spi/spi_flash_internal.h +++ b/drivers/mtd/spi/spi_flash_internal.h @@ -36,6 +36,7 @@ # define SPI_FLASH_SPANSION_IDCODE0 0x01 # define SPI_FLASH_STMICRO_IDCODE0 0x20 # define SPI_FLASH_WINBOND_IDCODE0 0xef +# define SPI_FLASH_MACRONIX_IDCODE0 0xc2 /* Bank addr access commands */ # define CMD_BANKADDR_BRWR 0x17