From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Andreas_Bie=DFmann?= Date: Thu, 05 Jul 2012 11:48:27 +0200 Subject: [U-Boot] [PATCH 3/3] cm4008: use common cfi_flash support In-Reply-To: <4ff54e86.1369980a.7b50.0f13@mx.google.com> References: <4ff54e86.1369980a.7b50.0f13@mx.google.com> Message-ID: <4FF562EB.40102@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Yann Vernier, On 05.07.2012 10:05, Yann Vernier wrote: > This change allows use of other flash chips than the two supported by > the cm4008 flash.c. Tested with Micrel KSZ8695X demo board. > > Signed-off-by: Yann Vernier > --- > board/cm4008/Makefile | 2 +- > include/configs/cm4008.h | 4 ++++ > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/board/cm4008/Makefile b/board/cm4008/Makefile > index 5b98824..22fd74e 100644 > --- a/board/cm4008/Makefile > +++ b/board/cm4008/Makefile > @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk > > LIB = $(obj)lib$(BOARD).o > > -COBJS := cm4008.o flash.o > +COBJS := cm4008.o # flash.o please do not comment but remove that entry. Also remove that flash.c cause it is not longer necessary if you can use cfi flash implementation. > > SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) > OBJS := $(addprefix $(obj),$(COBJS)) > diff --git a/include/configs/cm4008.h b/include/configs/cm4008.h > index 7c2e113..6d1a1ae 100644 > --- a/include/configs/cm4008.h > +++ b/include/configs/cm4008.h > @@ -125,6 +125,10 @@ > #define PHYS_FLASH_SECT_SIZE 0x00020000 /* 128 KB sectors (x1) */ > #define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1 > > +#define CONFIG_SYS_FLASH_CFI > +#define CONFIG_FLASH_CFI_DRIVER 1 > +#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_8BIT > + > /*----------------------------------------------------------------------- > * FLASH and environment organization > */ > Best regards Andreas Bie?mann