]> git.sur5r.net Git - openocd/commitdiff
Nicolas Pitre nico at cam.org software ECC computation for NAND flash
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 2 Apr 2009 21:23:05 +0000 (21:23 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 2 Apr 2009 21:23:05 +0000 (21:23 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1444 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/flash/Makefile.am
src/flash/nand.h

index 9d7746cd0643dbee7392a18ae161f46d0c23415b..7e57386b71d0362bcf95a24204c541098cc58574 100644 (file)
@@ -2,11 +2,15 @@ INCLUDES = -I$(top_srcdir)/src/helper -I$(top_srcdir)/src/jtag -I$(top_srcdir)/s
 AM_CPPFLAGS = -DPKGLIBDIR=\"$(pkglibdir)\" @CPPFLAGS@
 METASOURCES = AUTO
 noinst_LIBRARIES = libflash.a
-libflash_a_SOURCES = flash.c lpc2000.c cfi.c non_cfi.c at91sam7.c at91sam7_old.c str7x.c str9x.c aduc702x.c nand.c lpc3180_nand_controller.c \
-                    stellaris.c str9xpec.c stm32x.c tms470.c ecos.c orion_nand.c \
-                    s3c24xx_nand.c s3c2410_nand.c s3c2412_nand.c s3c2440_nand.c s3c2443_nand.c lpc288x.c ocl.c mflash.c pic32mx.c
-noinst_HEADERS = flash.h lpc2000.h cfi.h non_cfi.h at91sam7.h at91sam7_old.h str7x.h str9x.h nand.h lpc3180_nand_controller.h \
-                                stellaris.h str9xpec.h stm32x.h tms470.h s3c24xx_nand.h s3c24xx_regs_nand.h lpc288x.h mflash.h \
-                                ocl.h pic32mx.h
-
+libflash_a_SOURCES = \
+       flash.c lpc2000.c cfi.c non_cfi.c at91sam7.c at91sam7_old.c \
+       str7x.c str9x.c aduc702x.c nand.c nand_ecc.c \
+       lpc3180_nand_controller.c stellaris.c str9xpec.c stm32x.c tms470.c \
+       ecos.c orion_nand.c s3c24xx_nand.c s3c2410_nand.c s3c2412_nand.c \
+       s3c2440_nand.c s3c2443_nand.c lpc288x.c ocl.c mflash.c pic32mx.c
+noinst_HEADERS = \
+       flash.h lpc2000.h cfi.h non_cfi.h at91sam7.h at91sam7_old.h str7x.h \
+       str9x.h nand.h lpc3180_nand_controller.h stellaris.h str9xpec.h \
+       stm32x.h tms470.h s3c24xx_nand.h s3c24xx_regs_nand.h lpc288x.h \
+       mflash.h ocl.h pic32mx.h
 MAINTAINERCLEANFILES = Makefile.in
index d0dd7579847b20e68aff80733ad72fa2cfb8b1eb..5535221acb3d69941778ec472947578325ad6e4a 100644 (file)
@@ -197,6 +197,7 @@ extern nand_device_t *get_nand_device_by_num(int num);
 extern int nand_read_page_raw(struct nand_device_s *device, u32 page, u8 *data, u32 data_size, u8 *oob, u32 oob_size);
 extern int nand_write_page_raw(struct nand_device_s *device, u32 page, u8 *data, u32 data_size, u8 *oob, u32 oob_size);
 extern int nand_read_status(struct nand_device_s *device, u8 *status);
+extern int nand_calculate_ecc(struct nand_device_s *device, const u8 *dat, u8 *ecc_code);
 
 extern int nand_register_commands(struct command_context_s *cmd_ctx);
 extern int nand_init(struct command_context_s *cmd_ctx);