Merge remote branch 'u-boot-nand-flash/master'

This commit is contained in:
Wolfgang Denk 2008-06-03 00:16:48 +02:00
commit 7feb4d38ff
9 changed files with 20 additions and 20 deletions

View file

@ -37,8 +37,6 @@ int find_dev_and_part(const char *id, struct mtd_device **dev,
u8 *part_num, struct part_info **part);
#endif
extern nand_info_t nand_info[]; /* info for NAND chips */
static int nand_dump_oob(nand_info_t *nand, ulong off)
{
return 0;

View file

@ -57,9 +57,6 @@ int nand_legacy_rw (struct nand_chip* nand, int cmd,
size_t start, size_t len,
size_t * retlen, u_char * buf);
/* info for NAND chips, defined in drivers/mtd/nand/nand.c */
extern nand_info_t nand_info[];
/* references to names in env_common.c */
extern uchar default_environment[];
extern int default_environment_size;

View file

@ -153,6 +153,13 @@ int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts)
priv_nand->bbt = NULL;
}
if (erase_length < meminfo->erasesize) {
printf("Warning: Erase size 0x%08x smaller than one " \
"erase block 0x%08x\n",erase_length, meminfo->erasesize);
printf(" Erasing 0x%08x instead\n", meminfo->erasesize);
erase_length = meminfo->erasesize;
}
for (;
erase.addr < opts->offset + erase_length;
erase.addr += meminfo->erasesize) {

View file

@ -164,9 +164,6 @@ static struct part_info *current_part;
/* this one defined in nand_legacy.c */
int read_jffs2_nand(size_t start, size_t len,
size_t * retlen, u_char * buf, int nanddev);
#else
/* info for NAND chips, defined in drivers/mtd/nand/nand.c */
extern nand_info_t nand_info[];
#endif
#define NAND_PAGE_SIZE 512

View file

@ -385,6 +385,10 @@ struct nand_manufacturers {
extern struct nand_flash_dev nand_flash_ids[];
extern struct nand_manufacturers nand_manuf_ids[];
#ifndef NAND_MAX_CHIPS
#define NAND_MAX_CHIPS 8
#endif
/**
* struct nand_bbt_descr - bad block table descriptor
* @options: options for this descriptor

View file

@ -14,6 +14,8 @@
#ifndef __UBOOT_ONENAND_H
#define __UBOOT_ONENAND_H
#include <linux/types.h>
struct kvec {
void *iov_base;
size_t iov_len;
@ -22,6 +24,9 @@ struct kvec {
typedef int spinlock_t;
typedef int wait_queue_head_t;
struct mtd_info;
struct erase_info;
/* Functions */
extern void onenand_init(void);
extern int onenand_read(struct mtd_info *mtd, loff_t from, size_t len,

View file

@ -45,6 +45,8 @@
#include <version.h>
#include <net.h>
#include <serial.h>
#include <nand.h>
#include <onenand_uboot.h>
#ifdef CONFIG_DRIVER_SMC91111
#include "../drivers/net/smc91111.h"
@ -55,14 +57,6 @@
DECLARE_GLOBAL_DATA_PTR;
#if defined(CONFIG_CMD_NAND)
void nand_init (void);
#endif
#if defined(CONFIG_CMD_ONENAND)
void onenand_init(void);
#endif
ulong monitor_flash_len;
#ifdef CONFIG_HAS_DATAFLASH

View file

@ -93,9 +93,7 @@ void doc_init (void);
#if defined(CONFIG_HARD_SPI)
#include <spi.h>
#endif
#if defined(CONFIG_CMD_NAND)
void nand_init (void);
#endif
#include <nand.h>
static char *failed = "*** failed ***\n";

View file

@ -76,7 +76,7 @@ static int sh_flash_init(void)
}
#if defined(CONFIG_CMD_NAND)
void nand_init (void);
#include <nand.h>
static int sh_nand_init(void)
{
printf("NAND: ");