ftsmc020: move ftsmc020 static mem controller to driver/mtd
authorMacpaul Lin <macpaul@andestech.com>
Fri, 15 Apr 2011 21:37:11 +0000 (21:37 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Wed, 27 Apr 2011 17:38:10 +0000 (19:38 +0200)
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 <macpaul@andestech.com>
arch/arm/cpu/arm920t/a320/Makefile
board/faraday/a320evb/a320evb.c
drivers/mtd/Makefile
drivers/mtd/ftsmc020.c [moved from arch/arm/cpu/arm920t/a320/ftsmc020.c with 97% similarity]
include/configs/a320evb.h
include/faraday/ftsmc020.h [moved from arch/arm/include/asm/arch-a320/ftsmc020.h with 100% similarity]

index 31da706..50eb265 100644 (file)
@@ -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))
index b9343e4..2578be4 100644 (file)
@@ -21,7 +21,7 @@
 #include <netdev.h>
 #include <asm/io.h>
 
-#include <asm/arch/ftsmc020.h>
+#include <faraday/ftsmc020.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 999431c..5a5ecdf 100644 (file)
@@ -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
similarity index 97%
rename from arch/arm/cpu/arm920t/a320/ftsmc020.c
rename to drivers/mtd/ftsmc020.c
index 7646537..b027685 100644 (file)
@@ -20,7 +20,7 @@
 #include <config.h>
 #include <common.h>
 #include <asm/io.h>
-#include <asm/arch/ftsmc020.h>
+#include <faraday/ftsmc020.h>
 
 struct ftsmc020_config {
        unsigned int    config;
index 5373bcb..4b297f0 100644 (file)
  * Static memory controller configuration
  */
 
-#include <asm/arch/ftsmc020.h>
+#define CONFIG_FTSMC020
+#include <faraday/ftsmc020.h>
 
 #define FTSMC020_BANK0_CONFIG  (FTSMC020_BANK_ENABLE             |     \
                                 FTSMC020_BANK_BASE(PHYS_FLASH_1) |     \
        { FTSMC020_BANK0_CONFIG, FTSMC020_BANK0_TIMING, },      \
        { FTSMC020_BANK1_CONFIG, FTSMC020_BANK1_TIMING, },      \
 }
+#endif /* CONFIG_FTSMC020 */
 
 /*-----------------------------------------------------------------------
  * FLASH and environment organization