Skip to contentSkip to conversation

ftsmc020: move ftsmc020 static mem controller to driver/mtd folder

PATCH New Macpaul Lin 1 participant 1 message Oct 29, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ftsmc020: move ftsmc020 static mem controller to driver/mtd folder

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.

---
 arch/arm/cpu/arm920t/a320/Makefile        |    1 -
 arch/arm/cpu/arm920t/a320/ftsmc020.c      |   51 ------------------
 arch/arm/include/asm/arch-a320/ftsmc020.h |   79 -----------------------------
 board/faraday/a320evb/a320evb.c           |    4 +-
 drivers/mtd/Makefile                      |    1 +
 drivers/mtd/ftsmc020.c                    |   51 ++++++++++++++++++
 drivers/mtd/ftsmc020.h                    |   79 +++++++++++++++++++++++++++++
 include/configs/a320evb.h                 |    7 ++-
 8 files changed, 139 insertions(+), 134 deletions(-)
 delete mode 100644 arch/arm/cpu/arm920t/a320/ftsmc020.c
 delete mode 100644 arch/arm/include/asm/arch-a320/ftsmc020.h
 create mode 100644 drivers/mtd/ftsmc020.c
 create mode 100644 drivers/mtd/ftsmc020.h
arch/arm/cpu/arm920t/a320/Makefile +0 -1
index f030c53..978b99e 100644
@@ -27,7 +27,6 @@ LIB	= $(obj)lib$(SOC).a
 
 SOBJS	+= reset.o
 COBJS	+= timer.o
-COBJS	+= ftsmc020.o
 
 SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
arch/arm/cpu/arm920t/a320/ftsmc020.c deleted +0 -51

51 lines not on this page · raw message

arch/arm/include/asm/arch-a320/ftsmc020.h deleted +0 -79

79 lines not on this page · raw message

board/faraday/a320evb/a320evb.c +3 -1
index 85b11b9..8f95272 100644
@@ -21,7 +21,9 @@
 #include <netdev.h>
 #include <asm/io.h>
 
-#include <asm/arch/ftsmc020.h>
+#ifdef CONFIG_FTSMC020
+#include "../../../drivers/mtd/ftsmc020.h"
+#endif
 
 DECLARE_GLOBAL_DATA_PTR;
 
drivers/mtd/Makefile +1 -0
index cbf6f15..d445191 100644
@@ -35,6 +35,7 @@ COBJS-$(CONFIG_HAS_DATAFLASH) += dataflash.o
 COBJS-$(CONFIG_FLASH_CFI_LEGACY) += jedec_flash.o
 COBJS-$(CONFIG_MW_EEPROM) += mw_eeprom.o
 COBJS-$(CONFIG_SPEARSMI) += spr_smi.o
+COBJS-$(CONFIG_FTSMC020) += ftsmc020.o
 
 COBJS	:= $(COBJS-y)
 SRCS	:= $(COBJS:.o=.c)
drivers/mtd/ftsmc020.c new file +51 -0

51 lines not on this page · raw message

drivers/mtd/ftsmc020.h new file +79 -0

79 lines not on this page · raw message

include/configs/a320evb.h +5 -2
index fcc5563..8746fbb 100644
@@ -153,7 +153,10 @@
  * Static memory controller configuration
  */
 
-#include <asm/arch/ftsmc020.h>
+#define CONFIG_FTSMC020
+
+#ifdef CONFIG_FTSMC020
+#include "../../drivers/mtd/ftsmc020.h"
 
 #define FTSMC020_BANK0_CONFIG	(FTSMC020_BANK_ENABLE             |	\
 				 FTSMC020_BANK_BASE(PHYS_FLASH_1) |	\
@@ -186,7 +189,7 @@
 	{ FTSMC020_BANK0_CONFIG, FTSMC020_BANK0_TIMING, },	\
 	{ FTSMC020_BANK1_CONFIG, FTSMC020_BANK1_TIMING, },	\
 }
-
+#endif /* CONFIG_FTSMC020 */
 /*-----------------------------------------------------------------------
  * FLASH and environment organization
  */
Signature · 1 line
1.7.3.2