summaryrefslogtreecommitdiff
path: root/src/flash/nand.h
Commit message (Collapse)AuthorAgeFilesLines
* NAND page command refactoring.Dean Glazeski2009-12-031-0/+3
| | | | | | | | | 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>
* change #include "flash.h" to <flash/flash.h>Zachary T Welch2009-12-031-1/+1
| | | | | | | | | | | | 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.
* NAND Flash documentation update.Dean Glazeski2009-11-261-1/+47
| | | | | | | Updated doxygen comments for different interface structures for the NAND interface. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* remove nand_controller->register_callbacksZachary T Welch2009-11-241-1/+1
| | | | | Replace flash_driver callback with pointer to command_registration. Eliminates all related routines and allows drivers to omit commands.
* add support for naming NAND banksZachary T Welch2009-11-191-0/+1
| | | | | Requires users to name their nand banks, allowing them to be used instead of bank numbers in script commands.
* rename flash and nand command helpersZachary T Welch2009-11-191-1/+1
| | | | | | | After adding support for referencing banks by name, renames the COMMAND_HELPERs appropriately: flash_command_get_bank_by_num -> flash_command_get_bank nand_command_get_device_by_num -> flash_command_get_device
* allow flash/nand banks commands to accept namesZachary T Welch2009-11-191-0/+9
| | | | | | | | | | | | | | | | Add get_flash_bank_by_name (and get_nand_device_by_name) helpers to retrieves struct flash_bank * (struct nand_device *) given a driver name and an (optional) driver-specific bank index. These are used to extend flash_command_get_bank_by_num (and nand_command_get_device_by_num) to allow all flash (nand) commands to reference defined banks by name, not just by number. To avoid some code duplication, add the flash/common.[ch] files to hold functionality common to both types driver. The first two methods are helpers for the above routines to find a bank specified by a "name" or "name.index" string. get_flash_name_index() finds the '.index' portion, while flash_driver_name_matches() performs the string portion matching.
* nand_command_get_device_by_num: make COMMAND_HELPERZachary T Welch2009-11-161-2/+2
| | | | | Use COMMAND_HELPER macro to define nand_command_get_device_by_num. Use CALL_COMMAND_HANDLER to invoke it.
* command_context_t -> struct command_contextZachary T Welch2009-11-131-4/+4
| | | | Remove misleading typedef and redundant suffix from struct command_context.
* nand_device_t -> struct nand_deviceZachary T Welch2009-11-131-24/+24
| | | | Remove misleading typedef and redundant suffix from struct nand_device.
* nand_block_t -> struct nand_blockZachary T Welch2009-11-131-3/+3
| | | | Remove misleading typedef and redundant suffix from struct nand_block.
* nand_info_t -> struct nand_infoZachary T Welch2009-11-131-3/+3
| | | | Remove misleading typedef and redundant suffix from struct nand_info.
* nand_manufacturer_t -> struct nand_manufacturerZachary T Welch2009-11-131-3/+3
| | | | Remove misleading typedef and redundant suffix from struct nand_manufacturer.
* nand_ecclayout_t -> struct nand_ecclayoutZachary T Welch2009-11-131-2/+2
| | | | Remove misleading typedef and redundant suffix from struct nand_ecclayout.
* nand_flash_controller_t -> struct nand_flash_controllerZachary T Welch2009-11-131-3/+3
| | | | Remove misleading typedef and redundant suffix from struct nand_flash_controller.
* nand: add NAND_DEVICE_COMMAND_HANDLER macroZachary T Welch2009-11-131-1/+6
| | | | | Abstracts the extended NAND command handling to allow the function signature to be controlled by __COMMAND_HANDLER.
* nand: rename device to nandZachary T Welch2009-11-121-19/+19
| | | | | | | To be more informative (and consistent with flash and pld trees), change 'device' parameter name to 'nand' in NAND source files. This change eliminates confusing 'device->device->' instance from the code, and it simplifies the forthcoming command handler patches.
* add const keyword to some APIsZachary T Welch2009-11-111-1/+1
| | | | | | Add 'const' keyword to 'char *' parameters to allow command handlers to pass constant string arguments. These changes allow the 'args' command handler to be changed to 'const' in a subsequent patch.
* src/flash: remove 'extern' and wrap headersZachary T Welch2009-11-091-10/+17
| | | | | | | Removes 'extern' keywords from function prototypes in the flash headers. Wraps long lines to fit into 80 columns. Adds multiple inclusion protection for s3c2xx_nand.h.
* Add Flash/NAND bank command argument helpers.Zachary T Welch2009-11-051-0/+5
| | | | | | | | This eliminates redundant code for parsing and retreiving the bank specified from a script command argument. This patch was written to replace existing functionality; however, the parsing logic can be updated later to allow flash commands to accept bank names as well as their numbers.
* David Brownelloharboe2009-09-031-0/+1
| | | | | | | | | | | | | | | | Abstract the orion_nand_fast_block_write() routine into a separate routine -- arm_nandwrite() -- so that other ARM cores can reuse it. Have davinci_nand do so. This faster than byte-at-a-time ops by a factor of three (!), even given the slowish interactions to support hardware ECC (1-bit flavor in that test) each 512 bytes; those could be read more efficiently by on-chip code. NOTE that until there's a generic "ARM algorithm" structure, this can't work on newer ARMv6 (like ARM1136) or ARMv7A (like Cortex-A8) cores, though the downloaded code itself would work just fine there. git-svn-id: svn://svn.berlios.de/openocd/trunk@2663 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Transform 'u32' to 'uint32_t' in src/flash.zwelch2009-06-181-6/+6
| | | | | | | - Replace '\([^_]\)u32' with '\1uint32_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2280 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Transform 'u16' to 'uint16_t'zwelch2009-06-181-1/+1
| | | | | | | | - Replace '\([^_]\)u16' with '\1uint16_t'. - Replace '^u16' with 'uint16_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2277 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Transform 'u8' to 'uint8_t' in src/flashzwelch2009-06-181-11/+11
| | | | | | | | - Replace '\([^_]\)u8' with '\1uint8_t'. - Replace '^u8' with 'uint8_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2275 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net> NAND: update ids, "nand list" bugfixoharboe2009-05-191-0/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1835 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Whitespace cleanup from David Brownell <david-b@pacbell.net>kc8apf2009-05-181-14/+14
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1802 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* 4-bit ECC support for Marvell Kirkwood SOCoharboe2009-05-121-0/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1768 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Nicolas Pitre nico at cam.org The ECC data is automatically computed and ↵oharboe2009-04-021-0/+12
| | | | | | | | | written to the OOB area when the oob_softecc option is passed to the "nand write" command. git-svn-id: svn://svn.berlios.de/openocd/trunk@1446 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Nicolas Pitre nico at cam.org software ECC computation for NAND flashoharboe2009-04-021-0/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1444 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Uwe Hermann: oharboe2008-02-291-6/+4
| | | | | | | Small cosmetic fixes in the license header to make them all look the same, fix some typos, update README. git-svn-id: svn://svn.berlios.de/openocd/trunk@396 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - add support for the majority of the Samsung ARM SoC family, S3C2410, ↵drath2008-02-191-0/+2
| | | | | | S3C2412, S3C2413, S3C2440 and S3C2443 (thanks to Ben Dooks for this patch) git-svn-id: svn://svn.berlios.de/openocd/trunk@311 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - fixed arm926 cp15 command bug (thanks to Vincent Palatin for this patch)drath2007-03-261-0/+4
| | | | | | | | - fixed compiler warnings throughout the code (thanks to Vincent Palatin for this patch) - added support for accessing ETB (embedded trace buffer) registers git-svn-id: svn://svn.berlios.de/openocd/trunk@134 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - reworked file i/o. every fileaccess (target, flash, nand, in future ↵drath2007-03-151-0/+207
configuration, too) should now go through the fileio subsystem - added support for reading IHEX files (through fileio) - load/dump_binary renamed to the more generic load/dump_image <file> <address> ['bin'|'ihex'] - added NAND framework (preliminary) - added support for the LPC3180 SLC and MLC NAND controllers (preliminary) - fix initialization for parport - gw16012 fixes/cleanups - added EmbeddedICE version 7 (preliminary, reported on two LPC23xx devices so far) - added 'arm7_9 etm <target#>' configuration command to enable access to the ETM registers git-svn-id: svn://svn.berlios.de/openocd/trunk@132 b42882b7-edfa-0310-969c-e2dbd0fdcd60