Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/nand Wait STATUS_RDY after ONFI_RESET.
details: https://anonhg.NetBSD.org/src/rev/a23d29d1be75
branches: trunk
changeset: 348095:a23d29d1be75
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Tue Oct 04 14:43:55 2016 +0000
description:
Wait STATUS_RDY after ONFI_RESET.
diffstat:
sys/dev/nand/nand.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 400dc345aae5 -r a23d29d1be75 sys/dev/nand/nand.c
--- a/sys/dev/nand/nand.c Tue Oct 04 14:36:46 2016 +0000
+++ b/sys/dev/nand/nand.c Tue Oct 04 14:43:55 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nand.c,v 1.23 2013/10/20 17:13:18 christos Exp $ */
+/* $NetBSD: nand.c,v 1.24 2016/10/04 14:43:55 kiyohara 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.23 2013/10/20 17:13:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nand.c,v 1.24 2016/10/04 14:43:55 kiyohara Exp $");
#include "locators.h"
@@ -63,6 +63,7 @@
static int nand_search(device_t, cfdata_t, const int *, void *);
static void nand_address_row(device_t, size_t);
+static inline uint8_t nand_get_status(device_t);
static void nand_address_column(device_t, size_t, size_t);
static int nand_fill_chip_structure(device_t, struct nand_chip *);
static int nand_scan_media(device_t, struct nand_chip *);
@@ -354,6 +355,7 @@
nand_select(self, true);
nand_command(self, ONFI_RESET);
+ KASSERT(nand_get_status(self) & ONFI_STATUS_RDY);
nand_select(self, false);
/* check if the device implements the ONFI standard */
Home |
Main Index |
Thread Index |
Old Index