From patchwork Sat Apr 16 07:37:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Macpaul Lin X-Patchwork-Id: 91477 X-Patchwork-Delegate: albert.aribaud@free.fr 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 33D9EB7012 for ; Sat, 16 Apr 2011 17:30:00 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 21C2C28182; Sat, 16 Apr 2011 09:29:46 +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 VyJophEzfyLB; Sat, 16 Apr 2011 09:29:45 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2383428168; Sat, 16 Apr 2011 09:29:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E3FFD28167 for ; Sat, 16 Apr 2011 09:29:34 +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 lw6J5Nu8w8GN for ; Sat, 16 Apr 2011 09:29:34 +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 clanlab.dyndns.org (unknown [140.119.175.157]) by theia.denx.de (Postfix) with ESMTPS id 075A328161 for ; Sat, 16 Apr 2011 09:29:31 +0200 (CEST) Received: by clanlab.dyndns.org (Postfix, from userid 1000) id 2CA4738B4327; Sat, 16 Apr 2011 15:37:12 +0800 (CST) From: Macpaul Lin To: albert.u.boot@aribaud.net, macpaul@gmail.com, u-boot@lists.denx.de, ratbert@faraday-tech.com Date: Sat, 16 Apr 2011 15:37:11 +0800 Message-Id: <1302939431-27337-4-git-send-email-macpaul@andestech.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1302939431-27337-1-git-send-email-macpaul@andestech.com> References: <1302939431-27337-1-git-send-email-macpaul@andestech.com> Cc: Macpaul Lin Subject: [U-Boot] [PATCH v3 4/4] ftsmc020: move ftsmc020 static mem controller to driver/mtd X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 Move the header file and definitions of ftsmc020 static memory control unit from a320 SoC folder to "drivers/mtd" folder. This change will let other SoC which also use ftsmc020 could share the same header file. Signed-off-by: Macpaul Lin --- Changes for v2: - Move the header file of ftsmc020.h to include/faraday. - Fix the include path of ftsmc020 for a320evb. - v1 of this patch /patch/71957/ in patchworks has been marked as superseded. Changes for V3: - format patch by using -M option. arch/arm/cpu/arm920t/a320/Makefile | 1 - board/faraday/a320evb/a320evb.c | 2 +- drivers/mtd/Makefile | 1 + .../cpu/arm920t/a320 => drivers/mtd}/ftsmc020.c | 2 +- include/configs/a320evb.h | 4 +++- .../asm/arch-a320 => include/faraday}/ftsmc020.h | 0 6 files changed, 6 insertions(+), 4 deletions(-) rename {arch/arm/cpu/arm920t/a320 => drivers/mtd}/ftsmc020.c (97%) rename {arch/arm/include/asm/arch-a320 => include/faraday}/ftsmc020.h (100%) diff --git a/arch/arm/include/asm/arch-a320/ftsmc020.h b/include/faraday/ftsmc020.h similarity index 100% rename from arch/arm/include/asm/arch-a320/ftsmc020.h rename to include/faraday/ftsmc020.h diff --git a/arch/arm/cpu/arm920t/a320/Makefile b/arch/arm/cpu/arm920t/a320/Makefile index 31da706..50eb265 100644 --- a/arch/arm/cpu/arm920t/a320/Makefile +++ b/arch/arm/cpu/arm920t/a320/Makefile @@ -27,7 +27,6 @@ LIB = $(obj)lib$(SOC).o SOBJS += reset.o COBJS += timer.o -COBJS += ftsmc020.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) diff --git a/board/faraday/a320evb/a320evb.c b/board/faraday/a320evb/a320evb.c index b9343e4..2578be4 100644 --- a/board/faraday/a320evb/a320evb.c +++ b/board/faraday/a320evb/a320evb.c @@ -21,7 +21,7 @@ #include #include -#include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile index 999431c..5a5ecdf 100644 --- a/drivers/mtd/Makefile +++ b/drivers/mtd/Makefile @@ -32,6 +32,7 @@ COBJS-$(CONFIG_HAS_DATAFLASH) += at45.o COBJS-$(CONFIG_FLASH_CFI_DRIVER) += cfi_flash.o COBJS-$(CONFIG_FLASH_CFI_MTD) += cfi_mtd.o COBJS-$(CONFIG_HAS_DATAFLASH) += dataflash.o +COBJS-$(CONFIG_FTSMC020) += ftsmc020.o COBJS-$(CONFIG_FLASH_CFI_LEGACY) += jedec_flash.o COBJS-$(CONFIG_MW_EEPROM) += mw_eeprom.o COBJS-$(CONFIG_SPEARSMI) += spr_smi.o diff --git a/arch/arm/cpu/arm920t/a320/ftsmc020.c b/drivers/mtd/ftsmc020.c similarity index 97% rename from arch/arm/cpu/arm920t/a320/ftsmc020.c rename to drivers/mtd/ftsmc020.c index 7646537..b027685 100644 --- a/arch/arm/cpu/arm920t/a320/ftsmc020.c +++ b/drivers/mtd/ftsmc020.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include struct ftsmc020_config { unsigned int config; diff --git a/include/configs/a320evb.h b/include/configs/a320evb.h index 5373bcb..4b297f0 100644 --- a/include/configs/a320evb.h +++ b/include/configs/a320evb.h @@ -163,7 +163,8 @@ * Static memory controller configuration */ -#include +#define CONFIG_FTSMC020 +#include #define FTSMC020_BANK0_CONFIG (FTSMC020_BANK_ENABLE | \ FTSMC020_BANK_BASE(PHYS_FLASH_1) | \ @@ -196,6 +197,7 @@ { FTSMC020_BANK0_CONFIG, FTSMC020_BANK0_TIMING, }, \ { FTSMC020_BANK1_CONFIG, FTSMC020_BANK1_TIMING, }, \ } +#endif /* CONFIG_FTSMC020 */ /*----------------------------------------------------------------------- * FLASH and environment organization