Let rman_init() initialize the default rman range.

If rm_start and rm_end are both 0 on input to rman_init(), rman_init()
pre-initializes them to the default range.  No need to set it before.
This commit is contained in:
Justin Hibbits 2016-03-03 01:12:13 +00:00
parent 1adf06a308
commit 11fd20b526
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=296331
3 changed files with 0 additions and 14 deletions

View File

@ -114,32 +114,24 @@ xlp_simplebus_init_resources(void)
|| rman_manage_region(&irq_rman, 0, 255))
panic("xlp_simplebus_init_resources irq_rman");
port_rman.rm_start = 0;
port_rman.rm_end = ~0ul;
port_rman.rm_type = RMAN_ARRAY;
port_rman.rm_descr = "I/O ports";
if (rman_init(&port_rman)
|| rman_manage_region(&port_rman, PCIE_IO_BASE, PCIE_IO_LIMIT))
panic("xlp_simplebus_init_resources port_rman");
mem_rman.rm_start = 0;
mem_rman.rm_end = ~0ul;
mem_rman.rm_type = RMAN_ARRAY;
mem_rman.rm_descr = "I/O memory";
if (rman_init(&mem_rman)
|| rman_manage_region(&mem_rman, PCIE_MEM_BASE, PCIE_MEM_LIMIT))
panic("xlp_simplebus_init_resources mem_rman");
pci_ecfg_rman.rm_start = 0;
pci_ecfg_rman.rm_end = ~0ul;
pci_ecfg_rman.rm_type = RMAN_ARRAY;
pci_ecfg_rman.rm_descr = "PCI ECFG IO";
if (rman_init(&pci_ecfg_rman) || rman_manage_region(&pci_ecfg_rman,
PCI_ECFG_BASE, PCI_ECFG_LIMIT))
panic("xlp_simplebus_init_resources pci_ecfg_rman");
gbu_rman.rm_start = 0;
gbu_rman.rm_end = ~0ul;
gbu_rman.rm_type = RMAN_ARRAY;
gbu_rman.rm_descr = "Flash region";
if (rman_init(&gbu_rman)

View File

@ -125,16 +125,12 @@ xlr_pci_init_resources(void)
|| rman_manage_region(&irq_rman, 0, 255))
panic("pci_init_resources irq_rman");
port_rman.rm_start = 0;
port_rman.rm_end = ~0ul;
port_rman.rm_type = RMAN_ARRAY;
port_rman.rm_descr = "I/O ports";
if (rman_init(&port_rman)
|| rman_manage_region(&port_rman, 0x10000000, 0x1fffffff))
panic("pci_init_resources port_rman");
mem_rman.rm_start = 0;
mem_rman.rm_end = ~0ul;
mem_rman.rm_type = RMAN_ARRAY;
mem_rman.rm_descr = "I/O memory";
if (rman_init(&mem_rman)

View File

@ -511,8 +511,6 @@ lbc_attach(device_t dev)
rm = &sc->sc_rman;
rm->rm_type = RMAN_ARRAY;
rm->rm_descr = "Local Bus Space";
rm->rm_start = 0UL;
rm->rm_end = ~0UL;
error = rman_init(rm);
if (error)
goto fail;