Make this actually compile by adding a wrapper function which calls

flash_io_submit.
This commit is contained in:
ahoka 2011-07-01 16:46:13 +00:00
parent 1c3eff98bf
commit f1e7eb4d21
2 changed files with 14 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: nand.c,v 1.13 2011/06/28 18:14:11 ahoka Exp $ */
/* $NetBSD: nand.c,v 1.14 2011/07/01 16:46:13 ahoka Exp $ */
/*-
* Copyright (c) 2010 Department of Software Engineering,
@ -34,7 +34,7 @@
/* Common driver for NAND chips implementing the ONFI 2.2 specification */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nand.c,v 1.13 2011/06/28 18:14:11 ahoka Exp $");
__KERNEL_RCSID(0, "$NetBSD: nand.c,v 1.14 2011/07/01 16:46:13 ahoka Exp $");
#include "locators.h"
@ -84,7 +84,7 @@ struct flash_interface nand_flash_if = {
.block_isbad = nand_flash_isbad,
.block_markbad = nand_flash_markbad,
.submit = nand_io_submit
.submit = nand_flash_submit
};
#ifdef NAND_VERBOSE
@ -228,7 +228,7 @@ nand_detach(device_t self, int flags)
return error;
}
nand_sync_thread_stop(self);
flash_sync_thread_destroy(&sc->sc_flash_io);
#ifdef NAND_BBT
nand_bbt_detach(self);
#endif
@ -1036,6 +1036,14 @@ nand_default_select(device_t self, bool enable)
/* implementation of the block device API */
int
nand_flash_submit(device_t self, struct buf *bp)
{
struct nand_softc *sc = device_private(self);
return flash_io_submit(&sc->sc_flash_io, bp);
}
/*
* handle (page) unaligned write to nand
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: nand.h,v 1.11 2011/06/28 18:14:11 ahoka Exp $ */
/* $NetBSD: nand.h,v 1.12 2011/07/01 16:46:13 ahoka Exp $ */
/*-
* Copyright (c) 2010 Department of Software Engineering,
@ -452,15 +452,11 @@ int nand_flash_markbad(device_t, flash_off_t);
int nand_flash_write(device_t, flash_off_t, size_t, size_t *, const u_char *);
int nand_flash_read(device_t, flash_off_t, size_t, size_t *, uint8_t *);
int nand_flash_erase(device_t, struct flash_erase_instruction *);
int nand_flash_submit(device_t, struct buf *);
/* nand specific functions */
int nand_erase_block(device_t, size_t);
int nand_io_submit(device_t, struct buf *);
void nand_sync_thread(void *);
int nand_sync_thread_start(device_t);
void nand_sync_thread_stop(device_t);
bool nand_isfactorybad(device_t, flash_off_t);
bool nand_iswornoutbad(device_t, flash_off_t);
bool nand_isbad(device_t, flash_off_t);