Deleted Added
full compact
cfi_reg.h (184251) cfi_reg.h (188156)
1/*-
2 * Copyright (c) 2007, Juniper Networks, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
24 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*-
2 * Copyright (c) 2007, Juniper Networks, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
24 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/dev/cfi/cfi_reg.h 184251 2008-10-25 06:18:12Z marcel $
29 * $FreeBSD: head/sys/dev/cfi/cfi_reg.h 188156 2009-02-05 18:12:07Z sam $
30 */
31
32#ifndef _DEV_CFI_REG_H_
33#define _DEV_CFI_REG_H_
34
35struct cfi_qry {
36 u_char reserved[16];
37 u_char ident[3]; /* "QRY" */

--- 61 unchanged lines hidden (view full) ---

99#define CFI_BCS_PROGRAM 0x40
100#define CFI_BCS_CLEAR_STATUS 0x50
101#define CFI_BCS_READ_STATUS 0x70
102#define CFI_BCS_ERASE_SUSPEND 0xb0
103#define CFI_BCS_ERASE_RESUME 0xd0 /* Equals CONFIRM */
104#define CFI_BCS_CONFIRM 0xd0
105#define CFI_BCS_READ_ARRAY 0xff
106
30 */
31
32#ifndef _DEV_CFI_REG_H_
33#define _DEV_CFI_REG_H_
34
35struct cfi_qry {
36 u_char reserved[16];
37 u_char ident[3]; /* "QRY" */

--- 61 unchanged lines hidden (view full) ---

99#define CFI_BCS_PROGRAM 0x40
100#define CFI_BCS_CLEAR_STATUS 0x50
101#define CFI_BCS_READ_STATUS 0x70
102#define CFI_BCS_ERASE_SUSPEND 0xb0
103#define CFI_BCS_ERASE_RESUME 0xd0 /* Equals CONFIRM */
104#define CFI_BCS_CONFIRM 0xd0
105#define CFI_BCS_READ_ARRAY 0xff
106
107/* Intel commands. */
108#define CFI_INTEL_READ_ID 0x90 /* Read Identifier */
109#define CFI_INTEL_PP_SETUP 0xc0 /* Protection Program Setup */
110
111/* NB: these are addresses for 16-bit accesses */
112#define CFI_INTEL_PLR 0x80 /* Protection Lock Register */
113#define CFI_INTEL_PR(n) (0x81+(n)) /* Protection Register */
114
115/* Status register definitions */
116#define CFI_INTEL_STATUS_WSMS 0x0080 /* Write Machine Status */
117#define CFI_INTEL_STATUS_ESS 0x0040 /* Erase Suspend Status */
118#define CFI_INTEL_STATUS_ECLBS 0x0020 /* Erase and Clear Lock-Bit Status */
119#define CFI_INTEL_STATUS_PSLBS 0x0010 /* Program and Set Lock-Bit Status */
120#define CFI_INTEL_STATUS_VPENS 0x0008 /* Programming Voltage Status */
121#define CFI_INTEL_STATUS_PSS 0x0004 /* Program Suspend Status */
122#define CFI_INTEL_STATUS_DPS 0x0002 /* Device Protect Status */
123#define CFI_INTEL_STATUS_RSVD 0x0001 /* reserved */
124
125/* eXtended Status register definitions */
126#define CFI_INTEL_XSTATUS_WBS 0x8000 /* Write Buffer Status */
127#define CFI_INTEL_XSTATUS_RSVD 0x7f00 /* reserved */
128
107/* AMD commands. */
108#define CFI_AMD_BLOCK_ERASE 0x30
109#define CFI_AMD_UNLOCK_ACK 0x55
110#define CFI_AMD_ERASE_SECTOR 0x80
111#define CFI_AMD_PROGRAM 0xa0
112#define CFI_AMD_UNLOCK 0xaa
113
114#define AMD_ADDR_START 0xaaa
115#define AMD_ADDR_ACK 0x555
116
117#endif /* _DEV_CFI_REG_H_ */
129/* AMD commands. */
130#define CFI_AMD_BLOCK_ERASE 0x30
131#define CFI_AMD_UNLOCK_ACK 0x55
132#define CFI_AMD_ERASE_SECTOR 0x80
133#define CFI_AMD_PROGRAM 0xa0
134#define CFI_AMD_UNLOCK 0xaa
135
136#define AMD_ADDR_START 0xaaa
137#define AMD_ADDR_ACK 0x555
138
139#endif /* _DEV_CFI_REG_H_ */