From 59829cc189378c142c13d2aa8d9a897d8bef3961 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 24 Nov 2007 21:26:56 +0100 Subject: [PATCH] drivers/mtd : move mtd drivers to drivers/mtd Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- Makefile | 16 ++++++++-------- drivers/{ => mtd}/Makefile | 13 ++++--------- drivers/{ => mtd}/at45.c | 0 drivers/{ => mtd}/cfi_flash.c | 0 drivers/{ => mtd}/dataflash.c | 0 drivers/{ => mtd}/mw_eeprom.c | 0 drivers/{ => mtd}/nand/Makefile | 0 drivers/{ => mtd}/nand/diskonchip.c | 0 drivers/{ => mtd}/nand/nand.c | 0 drivers/{ => mtd}/nand/nand_base.c | 0 drivers/{ => mtd}/nand/nand_bbt.c | 0 drivers/{ => mtd}/nand/nand_ecc.c | 0 drivers/{ => mtd}/nand/nand_ids.c | 0 drivers/{ => mtd}/nand/nand_util.c | 0 drivers/{ => mtd}/nand_legacy/Makefile | 0 drivers/{ => mtd}/nand_legacy/nand_legacy.c | 0 drivers/{ => mtd}/onenand/Makefile | 0 drivers/{ => mtd}/onenand/onenand_base.c | 0 drivers/{ => mtd}/onenand/onenand_bbt.c | 0 nand_spl/board/amcc/acadia/Makefile | 2 +- nand_spl/board/amcc/bamboo/Makefile | 2 +- nand_spl/board/amcc/sequoia/Makefile | 2 +- 22 files changed, 15 insertions(+), 20 deletions(-) rename drivers/{ => mtd}/Makefile (87%) mode change 100755 => 100644 rename drivers/{ => mtd}/at45.c (100%) rename drivers/{ => mtd}/cfi_flash.c (100%) rename drivers/{ => mtd}/dataflash.c (100%) rename drivers/{ => mtd}/mw_eeprom.c (100%) rename drivers/{ => mtd}/nand/Makefile (100%) rename drivers/{ => mtd}/nand/diskonchip.c (100%) rename drivers/{ => mtd}/nand/nand.c (100%) rename drivers/{ => mtd}/nand/nand_base.c (100%) rename drivers/{ => mtd}/nand/nand_bbt.c (100%) rename drivers/{ => mtd}/nand/nand_ecc.c (100%) rename drivers/{ => mtd}/nand/nand_ids.c (100%) rename drivers/{ => mtd}/nand/nand_util.c (100%) rename drivers/{ => mtd}/nand_legacy/Makefile (100%) rename drivers/{ => mtd}/nand_legacy/nand_legacy.c (100%) rename drivers/{ => mtd}/onenand/Makefile (100%) rename drivers/{ => mtd}/onenand/onenand_base.c (100%) rename drivers/{ => mtd}/onenand/onenand_bbt.c (100%) diff --git a/Makefile b/Makefile index 00a4e2a2a4..5f3f0b303d 100644 --- a/Makefile +++ b/Makefile @@ -205,30 +205,30 @@ LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs 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 d596a4ee3b..95c5e02af9 --- 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 926476f91b..2d4d6016eb 100644 --- a/nand_spl/board/amcc/acadia/Makefile +++ b/nand_spl/board/amcc/acadia/Makefile @@ -96,7 +96,7 @@ $(obj)nand_boot.c: # 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 8b5461dcf4..3a633fb887 100644 --- a/nand_spl/board/amcc/bamboo/Makefile +++ b/nand_spl/board/amcc/bamboo/Makefile @@ -82,7 +82,7 @@ $(obj)nand_boot.c: # 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 ec1be5a768..78bf071f59 100644 --- a/nand_spl/board/amcc/sequoia/Makefile +++ b/nand_spl/board/amcc/sequoia/Makefile @@ -88,7 +88,7 @@ $(obj)nand_boot.c: # 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 ######################################################################### -- 2.25.1