2006-09-01 17:49:50 +00:00
|
|
|
#
|
|
|
|
# (C) Copyright 2006
|
|
|
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
#
|
|
|
|
# See file CREDITS for list of people who contributed to this
|
|
|
|
# project.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License as
|
|
|
|
# published by the Free Software Foundation; either version 2 of
|
|
|
|
# the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
# MA 02111-1307 USA
|
|
|
|
#
|
|
|
|
|
2005-08-17 10:55:25 +00:00
|
|
|
include $(TOPDIR)/config.mk
|
|
|
|
|
2010-11-05 14:48:07 +00:00
|
|
|
LIB := $(obj)libnand.o
|
2006-09-01 17:49:50 +00:00
|
|
|
|
2008-08-12 23:40:43 +00:00
|
|
|
ifdef CONFIG_CMD_NAND
|
2012-09-21 00:09:07 +00:00
|
|
|
|
2011-09-14 19:30:16 +00:00
|
|
|
ifdef CONFIG_SPL_BUILD
|
2012-09-21 00:09:07 +00:00
|
|
|
|
|
|
|
ifdef CONFIG_SPL_NAND_DRIVERS
|
|
|
|
NORMAL_DRIVERS=y
|
2011-11-01 20:00:29 +00:00
|
|
|
endif
|
2012-09-21 00:09:07 +00:00
|
|
|
|
2012-11-06 13:06:34 +00:00
|
|
|
COBJS-$(CONFIG_SPL_NAND_AM33XX_BCH) += am335x_spl_bch.o
|
2013-04-12 18:59:18 +00:00
|
|
|
COBJS-$(CONFIG_SPL_NAND_DOCG4) += docg4_spl.o
|
2012-09-21 00:09:07 +00:00
|
|
|
COBJS-$(CONFIG_SPL_NAND_SIMPLE) += nand_spl_simple.o
|
|
|
|
COBJS-$(CONFIG_SPL_NAND_LOAD) += nand_spl_load.o
|
|
|
|
COBJS-$(CONFIG_SPL_NAND_ECC) += nand_ecc.o
|
|
|
|
COBJS-$(CONFIG_SPL_NAND_BASE) += nand_base.o
|
|
|
|
|
|
|
|
else # not spl
|
|
|
|
|
|
|
|
NORMAL_DRIVERS=y
|
|
|
|
|
2007-09-24 15:05:30 +00:00
|
|
|
COBJS-y += nand.o
|
|
|
|
COBJS-y += nand_bbt.o
|
2008-08-12 23:40:43 +00:00
|
|
|
COBJS-y += nand_ids.o
|
2007-09-24 15:05:30 +00:00
|
|
|
COBJS-y += nand_util.o
|
2012-02-13 21:46:27 +00:00
|
|
|
COBJS-y += nand_ecc.o
|
2011-09-14 19:30:16 +00:00
|
|
|
COBJS-y += nand_base.o
|
2012-09-21 00:09:07 +00:00
|
|
|
|
|
|
|
endif # not spl
|
|
|
|
|
|
|
|
ifdef NORMAL_DRIVERS
|
|
|
|
|
2011-10-12 07:31:59 +00:00
|
|
|
COBJS-$(CONFIG_NAND_ECC_BCH) += nand_bch.o
|
2007-09-24 15:05:30 +00:00
|
|
|
|
2009-03-22 09:22:34 +00:00
|
|
|
COBJS-$(CONFIG_NAND_ATMEL) += atmel_nand.o
|
2008-11-27 02:43:06 +00:00
|
|
|
COBJS-$(CONFIG_DRIVER_NAND_BFIN) += bfin_nand.o
|
2009-03-30 16:58:39 +00:00
|
|
|
COBJS-$(CONFIG_NAND_DAVINCI) += davinci_nand.o
|
2008-03-21 21:12:51 +00:00
|
|
|
COBJS-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o
|
2011-03-22 03:57:39 +00:00
|
|
|
COBJS-$(CONFIG_NAND_FSL_IFC) += fsl_ifc_nand.o
|
2008-08-12 23:40:43 +00:00
|
|
|
COBJS-$(CONFIG_NAND_FSL_UPM) += fsl_upm.o
|
2012-05-22 00:15:54 +00:00
|
|
|
COBJS-$(CONFIG_NAND_FSMC) += fsmc_nand.o
|
2011-10-12 04:24:06 +00:00
|
|
|
COBJS-$(CONFIG_NAND_JZ4740) += jz4740_nand.o
|
2009-07-16 19:19:29 +00:00
|
|
|
COBJS-$(CONFIG_NAND_KB9202) += kb9202_nand.o
|
2009-06-29 09:55:18 +00:00
|
|
|
COBJS-$(CONFIG_NAND_KIRKWOOD) += kirkwood_nand.o
|
2009-07-21 15:13:40 +00:00
|
|
|
COBJS-$(CONFIG_NAND_KMETER1) += kmeter1_nand.o
|
2009-06-09 14:57:03 +00:00
|
|
|
COBJS-$(CONFIG_NAND_MPC5121_NFC) += mpc5121_nfc.o
|
2009-08-10 22:32:54 +00:00
|
|
|
COBJS-$(CONFIG_NAND_MXC) += mxc_nand.o
|
2011-11-08 23:18:16 +00:00
|
|
|
COBJS-$(CONFIG_NAND_MXS) += mxs_nand.o
|
2009-07-16 13:12:48 +00:00
|
|
|
COBJS-$(CONFIG_NAND_NDFC) += ndfc.o
|
2009-02-09 14:53:31 +00:00
|
|
|
COBJS-$(CONFIG_NAND_NOMADIK) += nomadik.o
|
2009-06-18 17:41:03 +00:00
|
|
|
COBJS-$(CONFIG_NAND_S3C2410) += s3c2410_nand.o
|
2010-01-15 13:45:46 +00:00
|
|
|
COBJS-$(CONFIG_NAND_SPEAR) += spr_nand.o
|
2012-07-29 20:53:29 +00:00
|
|
|
COBJS-$(CONFIG_TEGRA_NAND) += tegra_nand.o
|
2008-12-14 08:47:16 +00:00
|
|
|
COBJS-$(CONFIG_NAND_OMAP_GPMC) += omap_gpmc.o
|
2009-05-26 02:42:28 +00:00
|
|
|
COBJS-$(CONFIG_NAND_PLAT) += nand_plat.o
|
2013-04-12 18:59:18 +00:00
|
|
|
COBJS-$(CONFIG_NAND_DOCG4) += docg4.o
|
2012-09-21 00:09:07 +00:00
|
|
|
|
2013-01-08 22:57:20 +00:00
|
|
|
else # minimal SPL drivers
|
|
|
|
|
|
|
|
COBJS-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_spl.o
|
2013-04-16 07:57:59 +00:00
|
|
|
COBJS-$(CONFIG_NAND_FSL_IFC) += fsl_ifc_spl.o
|
2013-04-11 09:35:51 +00:00
|
|
|
COBJS-$(CONFIG_NAND_MXC) += mxc_nand_spl.o
|
2013-01-08 22:57:20 +00:00
|
|
|
|
2012-09-21 00:09:07 +00:00
|
|
|
endif # drivers
|
|
|
|
endif # nand
|
2008-01-14 20:09:32 +00:00
|
|
|
|
2007-09-24 15:05:30 +00:00
|
|
|
COBJS := $(COBJS-y)
|
2008-05-20 14:00:29 +00:00
|
|
|
SRCS := $(COBJS:.o=.c)
|
|
|
|
OBJS := $(addprefix $(obj),$(COBJS))
|
2005-08-17 10:55:25 +00:00
|
|
|
|
|
|
|
all: $(LIB)
|
|
|
|
|
2006-09-01 17:49:50 +00:00
|
|
|
$(LIB): $(obj).depend $(OBJS)
|
2010-11-05 14:48:07 +00:00
|
|
|
$(call cmd_link_o_target, $(OBJS))
|
2005-08-17 10:55:25 +00:00
|
|
|
|
|
|
|
#########################################################################
|
|
|
|
|
2006-09-01 17:49:50 +00:00
|
|
|
# defines $(obj).depend target
|
|
|
|
include $(SRCTREE)/rules.mk
|
2005-08-17 10:55:25 +00:00
|
|
|
|
2006-09-01 17:49:50 +00:00
|
|
|
sinclude $(obj).depend
|
|
|
|
|
|
|
|
#########################################################################
|