From patchwork Fri Oct 17 07:26:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alison Wang X-Patchwork-Id: 400427 X-Patchwork-Delegate: yorksun@freescale.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 424DD140081 for ; Fri, 17 Oct 2014 18:27:53 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 15431A73E5; Fri, 17 Oct 2014 09:27:40 +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 H3PZsQqmVHkv; Fri, 17 Oct 2014 09:27:39 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 94C97A73F6; Fri, 17 Oct 2014 09:27:33 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 892D34A027 for ; Fri, 17 Oct 2014 09:27:28 +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 BdBK+CzMUqtD for ; Fri, 17 Oct 2014 09:27:28 +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-bn1bon0143.outbound.protection.outlook.com [157.56.111.143]) by theia.denx.de (Postfix) with ESMTPS id D81244A01C for ; Fri, 17 Oct 2014 09:27:23 +0200 (CEST) Received: from DM2PR03MB349.namprd03.prod.outlook.com (10.141.54.11) by DM2PR03MB479.namprd03.prod.outlook.com (10.141.85.25) with Microsoft SMTP Server (TLS) id 15.0.1049.19; Fri, 17 Oct 2014 07:27:21 +0000 Received: from BY2PR03CA007.namprd03.prod.outlook.com (10.255.93.24) by DM2PR03MB349.namprd03.prod.outlook.com (10.141.54.11) with Microsoft SMTP Server (TLS) id 15.0.1054.10; Fri, 17 Oct 2014 07:27:19 +0000 Received: from BY2FFO11FD013.protection.gbl (10.255.93.4) by BY2PR03CA007.outlook.office365.com (10.255.93.24) with Microsoft SMTP Server (TLS) id 15.0.1054.13 via Frontend Transport; Fri, 17 Oct 2014 07:27:18 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD013.mail.protection.outlook.com (10.1.14.75) with Microsoft SMTP Server (TLS) id 15.0.1039.16 via Frontend Transport; Fri, 17 Oct 2014 07:27:18 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s9H7RA3R031818; Fri, 17 Oct 2014 00:27:15 -0700 From: Alison Wang To: , Date: Fri, 17 Oct 2014 15:26:34 +0800 Message-ID: <1413530796-12881-3-git-send-email-b18965@freescale.com> X-Mailer: git-send-email 2.1.0.27.g96db324 In-Reply-To: <1413530796-12881-1-git-send-email-b18965@freescale.com> References: <1413530796-12881-1-git-send-email-b18965@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:(10019020)(6009001)(199003)(189002)(54534003)(84676001)(102836001)(48376002)(104166001)(50986999)(99396003)(50466002)(87936001)(62966002)(21056001)(87286001)(88136002)(85852003)(19580405001)(19580395003)(89996001)(20776003)(47776003)(68736004)(44976005)(69596002)(6806004)(105606002)(229853001)(106466001)(81156004)(107046002)(77156001)(36756003)(104016003)(95666004)(85306004)(33646002)(120916001)(97736003)(76482002)(26826002)(4396001)(50226001)(92566001)(64706001)(76176999)(46102003)(80022003)(92726001)(31966008)(93916002)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR03MB349; H:az84smr01.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:;UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB349; X-Forefront-PRVS: 0367A50BB1 Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=alison.wang@freescale.com; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB479; X-OriginatorOrg: freescale.com Cc: Yuan Yao Subject: [U-Boot] [PATCH v2 3/5] ls102xa: ifc: nor: fix the write issue when bytes unaligned X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 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: Yuan Yao Add define CONFIG_SYS_WRITE_SWAPPED_DATA. For LS1021AQDS and LS1021QTWR nor flash write should swap the bytes when handle unaligned tail bytes. Because of the ending, if the date bus width is 16-bits and the number of bytes is odd, we should swap the byte when write the last one. Signed-off-by: Yuan Yao --- Change log: v2: Change the commits to match with the subject. include/configs/ls1021aqds.h | 1 + include/configs/ls1021atwr.h | 1 + 2 files changed, 2 insertions(+) diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h index bb47813..7e78e78 100644 --- a/include/configs/ls1021aqds.h +++ b/include/configs/ls1021aqds.h @@ -109,6 +109,7 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_FLASH_QUIET_TEST #define CONFIG_FLASH_SHOW_PROGRESS 45 #define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS +#define CONFIG_SYS_WRITE_SWAPPED_DATA #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */ #define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */ diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h index 45b2272..2427f2e 100644 --- a/include/configs/ls1021atwr.h +++ b/include/configs/ls1021atwr.h @@ -93,6 +93,7 @@ #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE_PHYS } #define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS +#define CONFIG_SYS_WRITE_SWAPPED_DATA /* CPLD */