Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jan 2025 23:28:08 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 2f51074c90ad - main - riscv nexus: Remove support for I/O port resources
Message-ID:  <202501232328.50NNS8XA099251@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=2f51074c90ad28a9cc7715f5f9c4e9323609ab1b

commit 2f51074c90ad28a9cc7715f5f9c4e9323609ab1b
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2025-01-23 23:27:57 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2025-01-23 23:27:57 +0000

    riscv nexus: Remove support for I/O port resources
    
    RISC-V doesn't natively support I/O port resources.  PCI I/O port BARs
    are remapped to memory resources by PCI bridge drivers before the
    request is passed up to the nexus layer.
    
    Reviewed by:    jrtc27, imp
    Differential Revision:  https://reviews.freebsd.org/D48582
---
 sys/riscv/riscv/nexus.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/sys/riscv/riscv/nexus.c b/sys/riscv/riscv/nexus.c
index 6eb194f86390..836e1648edeb 100644
--- a/sys/riscv/riscv/nexus.c
+++ b/sys/riscv/riscv/nexus.c
@@ -214,7 +214,6 @@ nexus_get_rman(device_t bus, int type, u_int flags)
 	case SYS_RES_IRQ:
 		return (&irq_rman);
 	case SYS_RES_MEMORY:
-	case SYS_RES_IOPORT:
 		return (&mem_rman);
 	default:
 		return (NULL);
@@ -308,7 +307,6 @@ nexus_activate_resource(device_t bus, device_t child, struct resource *r)
 	int error;
 
 	switch (rman_get_type(r)) {
-	case SYS_RES_IOPORT:
 	case SYS_RES_MEMORY:
 		error = bus_generic_rman_activate_resource(bus, child, r);
 		break;
@@ -343,7 +341,6 @@ nexus_deactivate_resource(device_t bus, device_t child, struct resource *r)
 	int error;
 
 	switch (rman_get_type(r)) {
-	case SYS_RES_IOPORT:
 	case SYS_RES_MEMORY:
 		error = bus_generic_rman_deactivate_resource(bus, child, r);
 		break;
@@ -372,9 +369,8 @@ nexus_map_resource(device_t bus, device_t child, struct resource *r,
 	if ((rman_get_flags(r) & RF_ACTIVE) == 0)
 		return (ENXIO);
 
-	/* Mappings are only supported on I/O and memory resources. */
+	/* Mappings are only supported on memory resources. */
 	switch (rman_get_type(r)) {
-	case SYS_RES_IOPORT:
 	case SYS_RES_MEMORY:
 		break;
 	default:
@@ -403,7 +399,6 @@ nexus_unmap_resource(device_t bus, device_t child, struct resource *r,
 {
 	switch (rman_get_type(r)) {
 	case SYS_RES_MEMORY:
-	case SYS_RES_IOPORT:
 		pmap_unmapdev(map->r_vaddr, map->r_size);
 		return (0);
 	default:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501232328.50NNS8XA099251>