summaryrefslogtreecommitdiff
path: root/src/flash
Commit message (Collapse)AuthorAgeFilesLines
* rename nand.h to flash//nand/core.hZachary T Welch2009-12-0419-27/+32
| | | | | | | | | Rename nand.h as flash/nand/core.h, chase consumers. The public APIs need to be sorted out with imp.h, but this allows other changes to begin improving the separation between policy and mechanism. Moves #include <target/target.h> and #include "driver.h" into the internal headers or source files, removing it from <flash/nand/core.h>.
* move remaining nand helper filesZachary T Welch2009-12-048-11/+9
| | | | Move remaining NAND implementation files into src/flash/nand/.
* split nand.c into nand/{core,fileio,tcl}.cZachary T Welch2009-12-047-872/+1005
| | | | | | | Moves commands into nand/tcl.c and core implementation to 'nand/core.c' and 'nand/fileio.c'. Eliminates 'flash/nand.c'. Adds 'nand/imp.h' to share routines between TCL commands and core.
* split NAND driver handling into nand/driver.[ch]Zachary T Welch2009-12-045-104/+205
| | | | | | | This work parallels the NOR directory, encapsulating the NAND drivers into a separate file. This takes an extra step by encapsulating the type of data structure used to manage the drivers, allowing it to be changed from an array to a dynamic list in the future.
* ARM: rename armv4_5_algorithm as arm_algorithmDavid Brownell2009-12-048-10/+10
| | | | Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM: ARMV4_5_COMMON_MAGIC --> ARM_COMMON_MAGICDavid Brownell2009-12-048-10/+10
| | | | Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM: rename ARMV4_5_MODE_* as ARM_MODE_*David Brownell2009-12-048-10/+10
| | | | Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM: rename ARMV4_5_STATE_* as ARM_STATE_*David Brownell2009-12-048-10/+10
| | | | Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* remove flash.h from treeZachary T Welch2009-12-0416-61/+2
| | | | | Remove the now vestigial <flash/flash.h> header from the tree, replacing a few references with <flash/nor/core.h>
* split flash.h into into flash/nor/*.hZachary T Welch2009-12-046-326/+358
| | | | | | | | | Move the bulk of the flash.h file into flash/nor/core.h, leaving an empty husk that will be removed in the next patch. The NOR driver structure is an implementation detail, so move it into its own private header file <flash/nor/driver.h> along with helper declaration for finding them by name.
* remove target.h from flash.hZachary T Welch2009-12-0420-20/+30
| | | | | The flash.h header does not require the target.h header file, but its implementation source files do. Move it to flash/nor/imp.h.
* split NOR and NAND flash headersZachary T Welch2009-12-043-12/+14
| | | | | Moves common flash errors to <flash/common.h> to decouple these two mostly unrelated trees of code.
* eliminate src/flash/flash.cZachary T Welch2009-12-043-221/+187
| | | | | Move remaining NOR flash implemenation into flash/nor/core.c Removes flash.c from the build, leaving only its header to split.
* add flash/nor/drivers.cZachary T Welch2009-12-044-55/+79
| | | | | Encapsulates access to the flash_drivers array, providing a base of operations for future dynamic driver module loading features.
* move more nor flash implementation detailsZachary T Welch2009-12-045-999/+1011
| | | | | | | | Splits the exec mode commands out of flash.c into the flash/nor/ files. The routines used by these high-level commands are moved into nor/core.c, with their internal declarations placed in nor/imp.h. Fixes distribution of <flash/nor/core.h> header.
* add flash/nor/core.[ch]Zachary T Welch2009-12-045-62/+149
| | | | | | | | | | | | | | | The newly moved flash TCL routines access the internals of the module too much. Fix the layering issues by adding new core NOR flash APIs: <flash/nor/core.h>: - flash_driver_find_by_name() - self-descriptive <flash/nor/imp.h>: - flash_bank_add() - encapsulates adding banks to bank list - flash_bank_list() - encapsulates retreiving bank list This allows the externs in flash/nor/imp.h to be removed, and these mechanisms may now be re-used by other flash module code.
* add flash/nor/{tcl.c,imp.h} from flash/flash.cZachary T Welch2009-12-044-175/+235
| | | | | | Moves the top-level 'flash' command handlers into flash/nor/tcl.c, with flash/nor/imp.h providing an internal implementation header to share non-public API components.
* Make ARM NAND I/O operations aware of last opDean Glazeski2009-12-031-4/+13
| | | | | | | | | Updates the ARM NAND I/O code to look at and update the op field of arm_nand_data to reflect the last operation performed. It uses this field to copy the correct code to the target in the case where the struct is used for reads and writes. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM NAND I/O interface updateDean Glazeski2009-12-033-7/+39
| | | | | | | | | | | Modify the arm_nand_data struct to better support both read and write operations while using the same struct. An additional field was added, and initialized, to record the last operation so that the correct code can be loaded to the working area. [dbrownell@users.sourceforge.net: merge init patch, tweak GPL note] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* NAND page command refactoring.Dean Glazeski2009-12-032-59/+35
| | | | | | | | | Created a new function that handles sending a command and the address information for pages to a NAND device. [dbrownell@users.sourceforge.net: tweaked line lengths, name 'oob_only'] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* remove tertiary include pathsZachary T Welch2009-12-033-16/+3
| | | | | With all #include directives converted, we only need to have the top-level src/ directory in the search path.
* change #include "../hello.h" to "hello.h"Zachary T Welch2009-12-032-1/+3
| | | | | | Before we can -I the top-level src/ directory alone, references to "hello.h" must be updated. This is an internal header, so it does not need angle brackets.
* change #include "s3c24xx_regs.h" to <flash/nand/s3c24xx_regs.h>Zachary T Welch2009-12-031-1/+1
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "s3c24xx_regs.h" the following form should be used. #include <flash/nand/s3c24xx_regs.h> The exception is from .c files in the same directory.
* change #include "ocl.h" to <flash/nor/ocl.h>Zachary T Welch2009-12-031-1/+1
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "ocl.h" the following form should be used. #include <flash/nor/ocl.h> The exception is from .c files in the same directory.
* change #include "nand.h" to <flash/nand.h>Zachary T Welch2009-12-035-5/+5
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "nand.h" the following form should be used. #include <flash/nand.h> The exception is from .c files in the same directory.
* change #include "flash.h" to <flash/flash.h>Zachary T Welch2009-12-0320-20/+20
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "flash.h" the following form should be used. #include <flash/flash.h> The exception is from .c files in the same directory.
* change #include "arm_nandio.h" to <flash/arm_nandio.h>Zachary T Welch2009-12-032-2/+2
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "arm_nandio.h" the following form should be used. #include <flash/arm_nandio.h> The exception is from .c files in the same directory.
* change #include "target.h" to <target/target.h>Zachary T Welch2009-12-032-2/+2
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "target.h" the following form should be used. #include <target/target.h> The exception is from .c files in the same directory.
* change #include "mips32.h" to <target/mips32.h>Zachary T Welch2009-12-031-1/+1
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "mips32.h" the following form should be used. #include <target/mips32.h> The exception is from .c files in the same directory.
* change #include "image.h" to <target/image.h>Zachary T Welch2009-12-034-4/+4
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "image.h" the following form should be used. #include <target/image.h> The exception is from .c files in the same directory.
* change #include "embeddedice.h" to <target/embeddedice.h>Zachary T Welch2009-12-032-2/+2
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "embeddedice.h" the following form should be used. #include <target/embeddedice.h> The exception is from .c files in the same directory.
* change #include "avrt.h" to <target/avrt.h>Zachary T Welch2009-12-031-1/+1
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "avrt.h" the following form should be used. #include <target/avrt.h> The exception is from .c files in the same directory.
* change #include "armv7m.h" to <target/armv7m.h>Zachary T Welch2009-12-033-3/+3
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "armv7m.h" the following form should be used. #include <target/armv7m.h> The exception is from .c files in the same directory.
* change #include "armv4_5.h" to <target/armv4_5.h>Zachary T Welch2009-12-036-6/+6
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "armv4_5.h" the following form should be used. #include <target/armv4_5.h> The exception is from .c files in the same directory.
* change #include "arm966e.h" to <target/arm966e.h>Zachary T Welch2009-12-031-1/+1
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "arm966e.h" the following form should be used. #include <target/arm966e.h> The exception is from .c files in the same directory.
* change #include "arm7_9_common.h" to <target/arm7_9_common.h>Zachary T Welch2009-12-031-1/+1
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "arm7_9_common.h" the following form should be used. #include <target/arm7_9_common.h> The exception is from .c files in the same directory.
* change #include "algorithm.h" to <target/algorithm.h>Zachary T Welch2009-12-0310-10/+10
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "algorithm.h" the following form should be used. #include <target/algorithm.h> The exception is from .c files in the same directory.
* change #include "jtag.h" to <jtag/jtag.h>Zachary T Welch2009-12-031-1/+1
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "jtag.h" the following form should be used. #include <jtag/jtag.h> The exception is from .c files in the same directory.
* change #include "types.h" to <helper/types.h>Zachary T Welch2009-12-033-3/+3
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "types.h" the following form should be used. #include <helper/types.h> The exception is from .c files in the same directory.
* change #include "time_support.h" to <helper/time_support.h>Zachary T Welch2009-12-035-5/+5
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "time_support.h" the following form should be used. #include <helper/time_support.h> The exception is from .c files in the same directory.
* change #include "membuf.h" to <helper/membuf.h>Zachary T Welch2009-12-031-1/+1
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "membuf.h" the following form should be used. #include <helper/membuf.h> The exception is from .c files in the same directory.
* change #include "log.h" to <helper/log.h>Zachary T Welch2009-12-033-3/+3
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "log.h" the following form should be used. #include <helper/log.h> The exception is from .c files in the same directory.
* change #include "fileio.h" to <helper/fileio.h>Zachary T Welch2009-12-032-2/+2
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "fileio.h" the following form should be used. #include <helper/fileio.h> The exception is from .c files in the same directory.
* change #include "binarybuffer.h" to <helper/binarybuffer.h>Zachary T Welch2009-12-0310-10/+10
| | | | | | | | | | | | Changes from the flat namespace to heirarchical one. Instead of writing: #include "binarybuffer.h" the following form should be used. #include <helper/binarybuffer.h> The exception is from .c files in the same directory.
* normalize headers to make changing easierZachary T Welch2009-12-031-1/+1
| | | | | These headers need minor tweaks to paves the way for wholesale scripted coversion of the header files.
* allow #include directives to use module nameZachary T Welch2009-12-033-0/+3
| | | | | | | | | | | | Includes the src directory in the search path, so header files may be migrated from: #include "foo.h" to #include <module/foo.h> which is more conducive for installation.
* move nor drivers to src/flash/norZachary T Welch2009-12-0236-50/+55
| | | | | | Moves NOR flash drivers to 'src/flash/nor/'. Adds 'src/flash/nor/Makefile.am'. Builds 'libocdflashnor.la'.
* move nand drivers to src/flash/nand/Zachary T Welch2009-12-0216-27/+42
| | | | | | Moves NAND drivers to src/flash/nand/. Adds src/flash/nand/Makefile.am. Builds libocdflashnand.la.
* flash: factor init to 'flash init'Zachary T Welch2009-12-021-0/+23
| | | | Split flash initialiation into 'flash init', called from 'init'.
* mflash: factor init to 'mflash init'Zachary T Welch2009-12-021-0/+23
| | | | Splits mflash initialiation to 'mflash init', called from 'init'.