diff options
author | Gary Lin <glin@suse.com> | 2020-07-17 14:11:26 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-07-17 20:51:55 +0000 |
commit | 8d6193902f2da15c8bad9941bfe493cca903a3ca (patch) | |
tree | 8c4a78a7a6fb75d314fbb13a5e810b91fd731f65 /OvmfPkg/Include | |
parent | 12d99b8f2367c2fd1ca9b3165acd52a0c9dcc99e (diff) | |
download | edk2-8d6193902f2da15c8bad9941bfe493cca903a3ca.tar.gz edk2-8d6193902f2da15c8bad9941bfe493cca903a3ca.tar.bz2 edk2-8d6193902f2da15c8bad9941bfe493cca903a3ca.zip |
OvmfPkg/LsiScsiDxe: Open PciIo protocol and initialize the device
Open PciIo protocol and use it to initialize the device. The
initialization of LSI 53C895A is simple: just set the SRST bit in
Interrupt Status Zero register to reset the device.
v2:
- Use the BITx macros for the bit constants
- Add the closing of PciIo protocol in LsiScsiControllerStop()
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Signed-off-by: Gary Lin <glin@suse.com>
Message-Id: <20200717061130.8881-8-glin@suse.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'OvmfPkg/Include')
-rw-r--r-- | OvmfPkg/Include/IndustryStandard/LsiScsi.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/OvmfPkg/Include/IndustryStandard/LsiScsi.h b/OvmfPkg/Include/IndustryStandard/LsiScsi.h index c09e864a1f..185e553c8e 100644 --- a/OvmfPkg/Include/IndustryStandard/LsiScsi.h +++ b/OvmfPkg/Include/IndustryStandard/LsiScsi.h @@ -17,4 +17,25 @@ #define LSI_LOGIC_PCI_VENDOR_ID 0x1000
#define LSI_53C895A_PCI_DEVICE_ID 0x0012
+//
+// LSI 53C895A Registers
+//
+#define LSI_REG_DSTAT 0x0C
+#define LSI_REG_ISTAT0 0x14
+#define LSI_REG_DSP 0x2C
+#define LSI_REG_SIST0 0x42
+#define LSI_REG_SIST1 0x43
+
+//
+// The status bits for Interrupt Status Zero (ISTAT0)
+//
+#define LSI_ISTAT0_DIP BIT0
+#define LSI_ISTAT0_SIP BIT1
+#define LSI_ISTAT0_INTF BIT2
+#define LSI_ISTAT0_CON BIT3
+#define LSI_ISTAT0_SEM BIT4
+#define LSI_ISTAT0_SIGP BIT5
+#define LSI_ISTAT0_SRST BIT6
+#define LSI_ISTAT0_ABRT BIT7
+
#endif // _LSI_SCSI_H_
|