Date: Mon, 27 Apr 2009 18:46:57 +0000 (UTC) From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r191583 - projects/mips/sys/mips/mips Message-ID: <200904271846.n3RIkvhI023304@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gonzo Date: Mon Apr 27 18:46:57 2009 New Revision: 191583 URL: http://svn.freebsd.org/changeset/base/191583 Log: - Use new spacebus - Be a bit more verbose on failures - style(9) fixes - Use default rid value of 0 instead of MIPS_MEM_RID (0x20) Modified: projects/mips/sys/mips/mips/nexus.c Modified: projects/mips/sys/mips/mips/nexus.c ============================================================================== --- projects/mips/sys/mips/mips/nexus.c Mon Apr 27 18:46:19 2009 (r191582) +++ projects/mips/sys/mips/mips/nexus.c Mon Apr 27 18:46:57 2009 (r191583) @@ -255,13 +255,14 @@ nexus_hinted_child(device_t bus, const c if ((mem_hints_count > 0) && (mem_hints_count < 2)) { printf("Either maddr or msize hint is missing for %s%d\n", dname, dunit); - } else if (mem_hints_count) { + } + else if (mem_hints_count) { dprintf("%s: discovered hinted child %s at maddr %p(%d)\n", __func__, device_get_nameunit(child), (void *)(intptr_t)maddr, msize); - result = bus_set_resource(child, SYS_RES_MEMORY, MIPS_MEM_RID, - maddr, msize); + result = bus_set_resource(child, SYS_RES_MEMORY, 0, maddr, + msize); if (result != 0) { device_printf(bus, "warning: bus_set_resource() failed\n"); @@ -351,7 +352,8 @@ nexus_alloc_resource(device_t bus, devic rv = rman_reserve_resource(rm, start, end, count, flags, child); if (rv == 0) { - printf("%s: could not reserve resource\n", __func__); + printf("%s: could not reserve resource for %s\n", __func__, + device_get_nameunit(child)); return (0); } @@ -391,7 +393,7 @@ nexus_activate_resource(device_t bus, de vaddr = (caddr_t) pmap_mapdev(paddr-poffs, psize+poffs) + poffs; rman_set_virtual(r, vaddr); - rman_set_bustag(r, MIPS_BUS_SPACE_MEM); + rman_set_bustag(r, mips_bus_space_generic); #ifdef TARGET_OCTEON temp = 0x0000000000000000; temp |= (uint32_t)vaddr;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904271846.n3RIkvhI023304>