drivers/mtd : move mtd drivers to drivers/mtd
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
diff --git a/Makefile b/Makefile
index 00a4e2a..5f3f0b3 100644
--- a/Makefile
+++ b/Makefile
@@ -205,30 +205,30 @@
fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a
LIBS += net/libnet.a
LIBS += disk/libdisk.a
-LIBS += drivers/libdrivers.a
LIBS += drivers/bios_emulator/libatibiosemu.a
LIBS += drivers/block/libblock.a
LIBS += drivers/hwmon/libhwmon.a
LIBS += drivers/i2c/libi2c.a
LIBS += drivers/input/libinput.a
LIBS += drivers/misc/libmisc.a
-LIBS += drivers/nand/libnand.a
-LIBS += drivers/nand_legacy/libnand_legacy.a
+LIBS += drivers/mtd/libmtd.a
+LIBS += drivers/mtd/nand/libnand.a
+LIBS += drivers/mtd/nand_legacy/libnand_legacy.a
+LIBS += drivers/mtd/onenand/libonenand.a
LIBS += drivers/net/libnet.a
LIBS += drivers/net/sk98lin/libsk98lin.a
-LIBS += drivers/onenand/libonenand.a
LIBS += drivers/pci/libpci.a
LIBS += drivers/pcmcia/libpcmcia.a
-LIBS += drivers/rtc/librtc.a
-LIBS += drivers/serial/libserial.a
-LIBS += drivers/usb/libusb.a
-LIBS += drivers/video/libvideo.a
ifeq ($(CPU),mpc83xx)
LIBS += drivers/qe/qe.a
endif
ifeq ($(CPU),mpc85xx)
LIBS += drivers/qe/qe.a
endif
+LIBS += drivers/rtc/librtc.a
+LIBS += drivers/serial/libserial.a
+LIBS += drivers/usb/libusb.a
+LIBS += drivers/video/libvideo.a
LIBS += post/libpost.a post/drivers/libpostdrivers.a
LIBS += $(shell if [ -d post/lib_$(ARCH) ]; then echo \
"post/lib_$(ARCH)/libpost$(ARCH).a"; fi)
diff --git a/drivers/Makefile b/drivers/mtd/Makefile
old mode 100755
new mode 100644
similarity index 87%
rename from drivers/Makefile
rename to drivers/mtd/Makefile
index d596a4e..95c5e02
--- a/drivers/Makefile
+++ b/drivers/mtd/Makefile
@@ -23,25 +23,20 @@
include $(TOPDIR)/config.mk
-# CFLAGS += -DET_DEBUG -DDEBUG
+LIB := $(obj)libmtd.a
-LIB = $(obj)libdrivers.a
-
-#
-# Block and Flash Drivers
-#
COBJS-y += at45.o
COBJS-y += cfi_flash.o
COBJS-y += dataflash.o
COBJS-y += mw_eeprom.o
COBJS := $(COBJS-y)
-SRCS := $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
+SRCS := $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
all: $(LIB)
-$(LIB): $(obj).depend $(OBJS)
+$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
#########################################################################
diff --git a/drivers/at45.c b/drivers/mtd/at45.c
similarity index 100%
rename from drivers/at45.c
rename to drivers/mtd/at45.c
diff --git a/drivers/cfi_flash.c b/drivers/mtd/cfi_flash.c
similarity index 100%
rename from drivers/cfi_flash.c
rename to drivers/mtd/cfi_flash.c
diff --git a/drivers/dataflash.c b/drivers/mtd/dataflash.c
similarity index 100%
rename from drivers/dataflash.c
rename to drivers/mtd/dataflash.c
diff --git a/drivers/mw_eeprom.c b/drivers/mtd/mw_eeprom.c
similarity index 100%
rename from drivers/mw_eeprom.c
rename to drivers/mtd/mw_eeprom.c
diff --git a/drivers/nand/Makefile b/drivers/mtd/nand/Makefile
similarity index 100%
rename from drivers/nand/Makefile
rename to drivers/mtd/nand/Makefile
diff --git a/drivers/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c
similarity index 100%
rename from drivers/nand/diskonchip.c
rename to drivers/mtd/nand/diskonchip.c
diff --git a/drivers/nand/nand.c b/drivers/mtd/nand/nand.c
similarity index 100%
rename from drivers/nand/nand.c
rename to drivers/mtd/nand/nand.c
diff --git a/drivers/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
similarity index 100%
rename from drivers/nand/nand_base.c
rename to drivers/mtd/nand/nand_base.c
diff --git a/drivers/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
similarity index 100%
rename from drivers/nand/nand_bbt.c
rename to drivers/mtd/nand/nand_bbt.c
diff --git a/drivers/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c
similarity index 100%
rename from drivers/nand/nand_ecc.c
rename to drivers/mtd/nand/nand_ecc.c
diff --git a/drivers/nand/nand_ids.c b/drivers/mtd/nand/nand_ids.c
similarity index 100%
rename from drivers/nand/nand_ids.c
rename to drivers/mtd/nand/nand_ids.c
diff --git a/drivers/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
similarity index 100%
rename from drivers/nand/nand_util.c
rename to drivers/mtd/nand/nand_util.c
diff --git a/drivers/nand_legacy/Makefile b/drivers/mtd/nand_legacy/Makefile
similarity index 100%
rename from drivers/nand_legacy/Makefile
rename to drivers/mtd/nand_legacy/Makefile
diff --git a/drivers/nand_legacy/nand_legacy.c b/drivers/mtd/nand_legacy/nand_legacy.c
similarity index 100%
rename from drivers/nand_legacy/nand_legacy.c
rename to drivers/mtd/nand_legacy/nand_legacy.c
diff --git a/drivers/onenand/Makefile b/drivers/mtd/onenand/Makefile
similarity index 100%
rename from drivers/onenand/Makefile
rename to drivers/mtd/onenand/Makefile
diff --git a/drivers/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
similarity index 100%
rename from drivers/onenand/onenand_base.c
rename to drivers/mtd/onenand/onenand_base.c
diff --git a/drivers/onenand/onenand_bbt.c b/drivers/mtd/onenand/onenand_bbt.c
similarity index 100%
rename from drivers/onenand/onenand_bbt.c
rename to drivers/mtd/onenand/onenand_bbt.c
diff --git a/nand_spl/board/amcc/acadia/Makefile b/nand_spl/board/amcc/acadia/Makefile
index 926476f..2d4d601 100644
--- a/nand_spl/board/amcc/acadia/Makefile
+++ b/nand_spl/board/amcc/acadia/Makefile
@@ -96,7 +96,7 @@
# from drivers/nand directory
$(obj)nand_ecc.c:
@rm -f $(obj)nand_ecc.c
- ln -s $(SRCTREE)/drivers/nand/nand_ecc.c $(obj)nand_ecc.c
+ ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $(obj)nand_ecc.c
#########################################################################
diff --git a/nand_spl/board/amcc/bamboo/Makefile b/nand_spl/board/amcc/bamboo/Makefile
index 8b5461d..3a633fb 100644
--- a/nand_spl/board/amcc/bamboo/Makefile
+++ b/nand_spl/board/amcc/bamboo/Makefile
@@ -82,7 +82,7 @@
# from drivers/nand directory
$(obj)nand_ecc.c:
@rm -f $(obj)nand_ecc.c
- ln -s $(SRCTREE)/drivers/nand/nand_ecc.c $(obj)nand_ecc.c
+ ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $(obj)nand_ecc.c
ifneq ($(OBJTREE), $(SRCTREE))
$(obj)sdram.c:
diff --git a/nand_spl/board/amcc/sequoia/Makefile b/nand_spl/board/amcc/sequoia/Makefile
index ec1be5a..78bf071 100644
--- a/nand_spl/board/amcc/sequoia/Makefile
+++ b/nand_spl/board/amcc/sequoia/Makefile
@@ -88,7 +88,7 @@
# from drivers/nand directory
$(obj)nand_ecc.c:
@rm -f $(obj)nand_ecc.c
- ln -s $(SRCTREE)/drivers/nand/nand_ecc.c $(obj)nand_ecc.c
+ ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $(obj)nand_ecc.c
#########################################################################