libpayload/nvme: Fix controller disablement in (de)init sequence
We wrote to the wrong register. The EN bit is in the CC (Controller Configuration) register at 0x14. Fixes re-initialization in QEMU and on siemens/chili during a second FILO run. Change-Id: I125de55d7f1a7c9f070437190c5a08a288b274f8 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/63935 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
88b041897f
commit
8ddecd8538
|
@ -147,7 +147,7 @@ static void nvme_detach_device(struct storage_dev *dev)
|
||||||
if (delete_admin_queues(nvme))
|
if (delete_admin_queues(nvme))
|
||||||
printf("NVME ERROR: Failed to delete admin queues\n");
|
printf("NVME ERROR: Failed to delete admin queues\n");
|
||||||
|
|
||||||
write32(nvme->config + 0x1c, 0);
|
write32(nvme->config + 0x14, 0);
|
||||||
|
|
||||||
int status, timeout = (read64(nvme->config) >> 24 & 0xff) * 500;
|
int status, timeout = (read64(nvme->config) >> 24 & 0xff) * 500;
|
||||||
do {
|
do {
|
||||||
|
@ -347,7 +347,7 @@ static void nvme_init(pcidev_t dev)
|
||||||
const uint32_t cc = NVME_CC_EN | NVME_CC_CSS | NVME_CC_MPS | NVME_CC_AMS | NVME_CC_SHN
|
const uint32_t cc = NVME_CC_EN | NVME_CC_CSS | NVME_CC_MPS | NVME_CC_AMS | NVME_CC_SHN
|
||||||
| NVME_CC_IOSQES | NVME_CC_IOCQES;
|
| NVME_CC_IOSQES | NVME_CC_IOCQES;
|
||||||
|
|
||||||
write32(nvme->config + 0x1c, 0);
|
write32(nvme->config + 0x14, 0);
|
||||||
|
|
||||||
int status, timeout = (read64(nvme->config) >> 24 & 0xff) * 500;
|
int status, timeout = (read64(nvme->config) >> 24 & 0xff) * 500;
|
||||||
do {
|
do {
|
||||||
|
|
Loading…
Reference in New Issue