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>.
20 files changed:
noinst_HEADERS = \
common.h \
noinst_HEADERS = \
common.h \
noinst_HEADERS = \
arm_io.h \
noinst_HEADERS = \
arm_io.h \
lpc3180.h \
driver.h \
mx3.h \
lpc3180.h \
driver.h \
mx3.h \
#include "config.h"
#endif
#include "config.h"
#endif
+#include <helper/binarybuffer.h>
#include <target/armv4_5.h>
#include <target/algorithm.h>
#include <target/armv4_5.h>
#include <target/algorithm.h>
/**
* Copies code to a working area. This will allocate room for the code plus the
* additional amount requested if the working area pointer is null.
/**
* Copies code to a working area. This will allocate room for the code plus the
* additional amount requested if the working area pointer is null.
#ifndef __ARM_NANDIO_H
#define __ARM_NANDIO_H
#ifndef __ARM_NANDIO_H
#define __ARM_NANDIO_H
-#include <flash/nand.h>
-#include <helper/binarybuffer.h>
-
/**
* Available operational states the arm_nand_data struct can be in.
*/
/**
* Available operational states the arm_nand_data struct can be in.
*/
#include "config.h"
#endif
#include "config.h"
#endif
-#include <flash/nand.h>
-#include <flash/common.h>
#include "imp.h"
/* configured NAND devices and NAND Flash command handler */
#include "imp.h"
/* configured NAND devices and NAND Flash command handler */
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2007 by Dominic Rath *
- * Dominic.Rath@gmx.de *
+ * Copyright (C) 2007 by Dominic Rath <Dominic.Rath@gmx.de> *
+ * Copyright (C) 2009 Zachary T Welch <zw@superlucidity.net> *
* *
* Partially based on linux/include/linux/mtd/nand.h *
* Copyright (C) 2000 David Woodhouse <dwmw2@mvhi.com> *
* *
* Partially based on linux/include/linux/mtd/nand.h *
* Copyright (C) 2000 David Woodhouse <dwmw2@mvhi.com> *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#ifndef NAND_H
-#define NAND_H
+#ifndef FLASH_NAND_CORE_H
+#define FLASH_NAND_CORE_H
#include <flash/common.h>
#include <flash/common.h>
-// to be removed later
-#include <target/target.h>
-// to be removed later
-#include <flash/nand/driver.h>
/**
* Representation of a single NAND block in a NAND device.
/**
* Representation of a single NAND block in a NAND device.
#define ERROR_NAND_ERROR_CORRECTION_FAILED (-1105)
#define ERROR_NAND_NO_BUFFER (-1106)
#define ERROR_NAND_ERROR_CORRECTION_FAILED (-1105)
#define ERROR_NAND_NO_BUFFER (-1106)
+#endif // FLASH_NAND_CORE_H
+
#include "config.h"
#endif
#include "config.h"
#endif
+#include <target/target.h>
enum ecc {
HWECC1, /* all controllers support 1-bit ECC */
enum ecc {
HWECC1, /* all controllers support 1-bit ECC */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "driver.h"
/* NAND flash controller
#include "driver.h"
/* NAND flash controller
#include "config.h"
#endif
#include "config.h"
#endif
/*
* Pre-calculated 256-way 1 byte column parity
/*
* Pre-calculated 256-way 1 byte column parity
#include "config.h"
#endif
#include "config.h"
#endif
/*****************************************************************************
* Arithmetic in GF(2^10) ("F") modulo x^10 + x^3 + 1.
/*****************************************************************************
* Arithmetic in GF(2^10) ("F") modulo x^10 + x^3 + 1.
#include "config.h"
#endif
#include "config.h"
#endif
#include "fileio.h"
static struct nand_ecclayout nand_oob_16 = {
#include "fileio.h"
static struct nand_ecclayout nand_oob_16 = {
#ifndef FLASH_NAND_IMP_H
#define FLASH_NAND_IMP_H
#ifndef FLASH_NAND_IMP_H
#define FLASH_NAND_IMP_H
+#include "core.h"
+#include "driver.h"
+
int nand_write_page(struct nand_device *nand,
uint32_t page, uint8_t *data, uint32_t data_size,
uint8_t *oob, uint32_t oob_size);
int nand_write_page(struct nand_device *nand,
uint32_t page, uint8_t *data, uint32_t data_size,
uint8_t *oob, uint32_t oob_size);
#include "config.h"
#endif
#include "config.h"
#endif
+#include <target/target.h>
+
static int lpc3180_reset(struct nand_device *nand);
static int lpc3180_controller_ready(struct nand_device *nand, int timeout);
static int lpc3180_reset(struct nand_device *nand);
static int lpc3180_controller_ready(struct nand_device *nand, int timeout);
#include "config.h"
#endif
#include "config.h"
#endif
+#include <target/target.h>
static const char target_not_halted_err_msg[] =
"target must be halted to use mx3 NAND flash controller";
static const char target_not_halted_err_msg[] =
"target must be halted to use mx3 NAND flash controller";
*
* Many thanks to Ben Dooks for writing s3c24xx driver.
*/
*
* Many thanks to Ben Dooks for writing s3c24xx driver.
*/
#define MX3_NF_BASE_ADDR 0xb8000000
#define MX3_NF_BUFSIZ (MX3_NF_BASE_ADDR + 0xe00)
#define MX3_NF_BASE_ADDR 0xb8000000
#define MX3_NF_BUFSIZ (MX3_NF_BASE_ADDR + 0xe00)
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "config.h"
#endif
#include "config.h"
#endif
#include "arm_io.h"
#include <target/armv4_5.h>
#include "arm_io.h"
#include <target/armv4_5.h>
* Many thanks to Simtec Electronics for sponsoring this work.
*/
* Many thanks to Simtec Electronics for sponsoring this work.
*/
-#include <flash/nand.h>
-#include <flash/nand/s3c24xx_regs.h>
+#include "imp.h"
+#include "s3c24xx_regs.h"
+#include <target/target.h>
struct s3c24xx_nand_controller
{
struct s3c24xx_nand_controller
{
#include "config.h"
#endif
#include "config.h"
#endif
#include "imp.h"
#include "fileio.h"
#include "imp.h"
#include "fileio.h"
#include <xsvf/xsvf.h>
#include <svf/svf.h>
#include <flash/nor/core.h>
#include <xsvf/xsvf.h>
#include <svf/svf.h>
#include <flash/nor/core.h>
+#include <flash/nand/core.h>
#include <pld/pld.h>
#include <flash/mflash.h>
#include <pld/pld.h>
#include <flash/mflash.h>
Linking to existing account procedure
If you already have an account and want to add another login method
you
MUST first sign in with your existing account and
then change URL to read
https://review.openocd.org/login/?link
to get to this page again but this time it'll work for linking. Thank you.
SSH host keys fingerprints
1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=.. |
|+o.. . |
|*.o . . |
|+B . . . |
|Bo. = o S |
|Oo.+ + = |
|oB=.* = . o |
| =+=.+ + E |
|. .=o . o |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)