[U-Boot] [PATCH v2 13/17] SPEAr : smi driver moved completely into drivers/mtd

Vipin KUMAR vipin.kumar at st.com
Mon Apr 26 04:56:46 CEST 2010


The smi IP used by spear platform is a ST serial memory interface controller
The earlier driver adds the driver of this controller as if it is specific to
spear platform.
The driver files are now moved into drivers/mtd folder for reusability by other
platforms

Signed-off-by: Vipin Kumar <vipin.kumar at st.com>
---
 drivers/mtd/Makefile                               |    2 +-
 drivers/mtd/{spr_smi.c => st_smi.c}                |    2 +-
 .../arch-spear/spr_smi.h => drivers/mtd/st_smi.h   |    4 ++--
 include/configs/spear-common.h                     |    6 +++---
 4 files changed, 7 insertions(+), 7 deletions(-)
 rename drivers/mtd/{spr_smi.c => st_smi.c} (99%)
 rename arch/arm/include/asm/arch-spear/spr_smi.h => drivers/mtd/st_smi.h (99%)

diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
index cbf6f15..d868d27 100644
--- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile
@@ -34,7 +34,7 @@ COBJS-$(CONFIG_FLASH_CFI_MTD) += cfi_mtd.o
 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_ST_SMI) += st_smi.o
 
 COBJS	:= $(COBJS-y)
 SRCS	:= $(COBJS:.o=.c)
diff --git a/drivers/mtd/spr_smi.c b/drivers/mtd/st_smi.c
similarity index 99%
rename from drivers/mtd/spr_smi.c
rename to drivers/mtd/st_smi.c
index 189ee6d..80d9fee 100644
--- a/drivers/mtd/spr_smi.c
+++ b/drivers/mtd/st_smi.c
@@ -27,7 +27,7 @@
 
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
-#include <asm/arch/spr_smi.h>
+#include "st_smi.h"
 
 #if !defined(CONFIG_SYS_NO_FLASH)
 
diff --git a/arch/arm/include/asm/arch-spear/spr_smi.h b/drivers/mtd/st_smi.h
similarity index 99%
rename from arch/arm/include/asm/arch-spear/spr_smi.h
rename to drivers/mtd/st_smi.h
index e2e5e8f..37ed503 100644
--- a/arch/arm/include/asm/arch-spear/spr_smi.h
+++ b/drivers/mtd/st_smi.h
@@ -21,8 +21,8 @@
  * MA 02111-1307 USA
  */
 
-#ifndef SPR_SMI_H
-#define SPR_SMI_H
+#ifndef ST_SMI_H
+#define ST_SMI_H
 
 /* 0xF800.0000 . 0xFBFF.FFFF	64MB	SMI (Serial Flash Mem) */
 /* 0xFC00.0000 . 0xFC1F.FFFF	2MB	SMI (Serial Flash Reg.) */
diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h
index e49f267..99923de 100644
--- a/include/configs/spear-common.h
+++ b/include/configs/spear-common.h
@@ -57,10 +57,10 @@
 #if defined(CONFIG_FLASH_PNOR)
 #define CONFIG_SPEAR_EMI			1
 #else
-#define CONFIG_SPEARSMI				1
+#define CONFIG_ST_SMI				1
 #endif
 
-#if defined(CONFIG_SPEARSMI)
+#if defined(CONFIG_ST_SMI)
 
 #define CONFIG_SYS_MAX_FLASH_BANKS		2
 #define CONFIG_SYS_FLASH_BASE			(0xF8000000)
@@ -125,7 +125,7 @@
  * U-Boot Environment placing definitions.
  */
 #if defined(CONFIG_ENV_IS_IN_FLASH)
-#ifdef CONFIG_SPEARSMI
+#ifdef CONFIG_ST_SMI
 /*
  * Environment is in serial NOR flash
  */
-- 
1.6.0.2



More information about the U-Boot mailing list