From 246966636e4181e7564245d5fe71f431f2893c7b Mon Sep 17 00:00:00 2001 From: Marcel Telka Date: Wed, 14 May 2003 21:39:37 +0000 Subject: [PATCH] 2003-05-14 Marcel Telka * include/Makefile.am (noinst_HEADERS): Added cfi.h. * include/cfi.h: New file. * src/jtag.h (detect_cfi): Removed function declaration. * src/flash.c: Replaced jtag.h include with cfi.h. * src/readmem.c: Ditto. * src/flash/Makefile.am (libflash_a_SOURCES): Added cfi.c. * src/Makefie.am (jtag_SOURCES): Removed cfi.c. * src/cfi.c: Moved this file ... * src/flash/cfi.c: ... here and replaced jtag.h include with cfi.h one. git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@427 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 13 +++++++++++++ jtag/include/Makefile.am | 1 + jtag/include/cfi.h | 34 ++++++++++++++++++++++++++++++++++ jtag/src/Makefile.am | 1 - jtag/src/flash.c | 3 +-- jtag/src/flash/Makefile.am | 1 + jtag/src/{ => flash}/cfi.c | 2 +- jtag/src/jtag.h | 2 -- jtag/src/readmem.c | 3 +-- 9 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 jtag/include/cfi.h rename jtag/src/{ => flash}/cfi.c (99%) diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 610272e3..6ad11c69 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,16 @@ +2003-05-14 Marcel Telka + + * include/Makefile.am (noinst_HEADERS): Added cfi.h. + * include/cfi.h: New file. + * src/jtag.h (detect_cfi): Removed function declaration. + * src/flash.c: Replaced jtag.h include with cfi.h. + * src/readmem.c: Ditto. + + * src/flash/Makefile.am (libflash_a_SOURCES): Added cfi.c. + * src/Makefie.am (jtag_SOURCES): Removed cfi.c. + * src/cfi.c: Moved this file ... + * src/flash/cfi.c: ... here and replaced jtag.h include with cfi.h one. + 2003-05-14 Marcel Telka * include/part.h (part_t, parts_t): Macros removed. diff --git a/jtag/include/Makefile.am b/jtag/include/Makefile.am index 599265df..496e4da0 100644 --- a/jtag/include/Makefile.am +++ b/jtag/include/Makefile.am @@ -25,6 +25,7 @@ noinst_HEADERS = \ bsbit.h \ bus.h \ cable.h \ + cfi.h \ chain.h \ data_register.h \ flash.h \ diff --git a/jtag/include/cfi.h b/jtag/include/cfi.h new file mode 100644 index 00000000..893d6774 --- /dev/null +++ b/jtag/include/cfi.h @@ -0,0 +1,34 @@ +/* + * $Id$ + * + * Copyright (C) 2003 ETC s.r.o. + * + * 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. + * + * Written by Marcel Telka , 2003. + * + */ + +#ifndef CFI_H +#define CFI_H + +#include + +#include "bus.h" + +cfi_query_structure_t *detect_cfi( bus_t *bus ); + +#endif /* CFI_H */ diff --git a/jtag/src/Makefile.am b/jtag/src/Makefile.am index dc2b2a61..1bb1f6ef 100644 --- a/jtag/src/Makefile.am +++ b/jtag/src/Makefile.am @@ -38,7 +38,6 @@ jtag_SOURCES = \ detect.c \ discovery.c \ readmem.c \ - cfi.c \ flash.c \ help.c diff --git a/jtag/src/flash.c b/jtag/src/flash.c index dc8145bb..e2445c9c 100644 --- a/jtag/src/flash.c +++ b/jtag/src/flash.c @@ -43,8 +43,7 @@ #include "bus.h" #include "flash.h" - -#include "jtag.h" +#include "cfi.h" extern flash_driver_t amd_32_flash_driver; extern flash_driver_t intel_32_flash_driver; diff --git a/jtag/src/flash/Makefile.am b/jtag/src/flash/Makefile.am index 827fb317..1bcbfd37 100644 --- a/jtag/src/flash/Makefile.am +++ b/jtag/src/flash/Makefile.am @@ -24,5 +24,6 @@ noinst_LIBRARIES = libflash.a libflash_a_SOURCES = \ + cfi.c \ amd.c \ intel.c diff --git a/jtag/src/cfi.c b/jtag/src/flash/cfi.c similarity index 99% rename from jtag/src/cfi.c rename to jtag/src/flash/cfi.c index 42edb1c3..e532a176 100644 --- a/jtag/src/cfi.c +++ b/jtag/src/flash/cfi.c @@ -32,7 +32,7 @@ #include #include -#include "jtag.h" +#include "cfi.h" #include "bus.h" /* function to cover 2x16 and 1x16 modes */ diff --git a/jtag/src/jtag.h b/jtag/src/jtag.h index d7628202..9d4aa7da 100644 --- a/jtag/src/jtag.h +++ b/jtag/src/jtag.h @@ -44,6 +44,4 @@ void help( const char *cmd ); void discovery( chain_t *chain, const char *filename ); -cfi_query_structure_t *detect_cfi( bus_t *bus ); - #endif /* JTAG_H */ diff --git a/jtag/src/readmem.c b/jtag/src/readmem.c index a02665bd..81d417f7 100644 --- a/jtag/src/readmem.c +++ b/jtag/src/readmem.c @@ -38,11 +38,10 @@ #include #include -#include "jtag.h" - #include /* for ntohs */ +#include "cfi.h" #include "bus.h" #include "flash.h"