Enable 32-bit I/O addressing. This gets rid of the io address conflict
authorkettenis <kettenis@openbsd.org>
Fri, 18 Jun 2021 12:12:22 +0000 (12:12 +0000)
committerkettenis <kettenis@openbsd.org>
Fri, 18 Jun 2021 12:12:22 +0000 (12:12 +0000)
messages on the HiFive Unmatched.

ok patrick@

sys/dev/fdt/dwpcie.c

index 75daa98..55647d2 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: dwpcie.c,v 1.31 2021/06/14 20:54:04 kettenis Exp $    */
+/*     $OpenBSD: dwpcie.c,v 1.32 2021/06/18 12:12:22 kettenis Exp $    */
 /*
  * Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org>
  *
@@ -478,6 +478,10 @@ dwpcie_attach_deferred(struct device *self)
        HWRITE4(sc, PCI_MAPREG_START, PCI_MAPREG_MEM_TYPE_64BIT);
        HWRITE4(sc, PCI_MAPREG_START + 4, 0);
 
+       /* Enable 32-bit I/O addressing. */
+       HSET4(sc, PPB_REG_IOSTATUS,
+           PPB_IO_32BIT | (PPB_IO_32BIT << PPB_IOLIMIT_SHIFT));
+
        /* Make sure read-only bits are write-protected. */
        HCLR4(sc, MISC_CONTROL_1, MISC_CONTROL_1_DBI_RO_WR_EN);