Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133184988
D10177.id28090.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D10177.id28090.diff
View Options
Index: head/sys/dev/cfi/cfi_core.c
===================================================================
--- head/sys/dev/cfi/cfi_core.c
+++ head/sys/dev/cfi/cfi_core.c
@@ -145,6 +145,17 @@
}
}
+/*
+ * This is same workaound as NetBSD sys/dev/nor/cfi.c cfi_reset_default()
+ */
+static void
+cfi_reset_default(struct cfi_softc *sc)
+{
+
+ cfi_write(sc, 0, CFI_BCS_READ_ARRAY2);
+ cfi_write(sc, 0, CFI_BCS_READ_ARRAY);
+}
+
uint8_t
cfi_read_qry(struct cfi_softc *sc, u_int ofs)
{
@@ -152,7 +163,7 @@
cfi_write(sc, CFI_QRY_CMD_ADDR * sc->sc_width, CFI_QRY_CMD_DATA);
val = cfi_read(sc, ofs * sc->sc_width);
- cfi_write(sc, 0, CFI_BCS_READ_ARRAY);
+ cfi_reset_default(sc);
return (val);
}
@@ -745,7 +756,7 @@
/* error is 0. */
out:
- cfi_write(sc, 0, CFI_BCS_READ_ARRAY);
+ cfi_reset_default(sc);
/* Relock Intel flash */
switch (sc->sc_cmdset) {
Index: head/sys/dev/cfi/cfi_reg.h
===================================================================
--- head/sys/dev/cfi/cfi_reg.h
+++ head/sys/dev/cfi/cfi_reg.h
@@ -113,6 +113,7 @@
#define CFI_BCS_CONFIRM 0xd0
#define CFI_BCS_BUF_PROG_SETUP 0xe8
#define CFI_BCS_READ_ARRAY 0xff
+#define CFI_BCS_READ_ARRAY2 0xf0
/* Intel commands. */
#define CFI_INTEL_LB 0x01 /* Lock Block */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 24, 6:44 PM (8 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24128641
Default Alt Text
D10177.id28090.diff (1 KB)
Attached To
Mode
D10177: cfi mx flash patch
Attached
Detach File
Event Timeline
Log In to Comment