sb_zbpci.c (212989) | sb_zbpci.c (218909) |
---|---|
1/*- 2 * Copyright (c) 2009 Neelkanth Natu 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 39 unchanged lines hidden (view full) --- 48#include <machine/resource.h> 49#include <machine/bus.h> 50 51#include "pcib_if.h" 52 53#include "sb_bus_space.h" 54#include "sb_scd.h" 55 | 1/*- 2 * Copyright (c) 2009 Neelkanth Natu 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 39 unchanged lines hidden (view full) --- 48#include <machine/resource.h> 49#include <machine/bus.h> 50 51#include "pcib_if.h" 52 53#include "sb_bus_space.h" 54#include "sb_scd.h" 55 |
56__FBSDID("$FreeBSD: head/sys/mips/sibyte/sb_zbpci.c 212989 2010-09-22 02:26:07Z neel $"); | 56__FBSDID("$FreeBSD: head/sys/mips/sibyte/sb_zbpci.c 218909 2011-02-21 09:01:34Z brucec $"); |
57 58static struct { 59 vm_offset_t vaddr; 60 vm_paddr_t paddr; 61} zbpci_config_space[MAXCPU]; 62 63static const vm_paddr_t CFG_PADDR_BASE = 0xFE000000; 64static const u_long PCI_IOSPACE_ADDR = 0xFC000000; --- 40 unchanged lines hidden (view full) --- 105 port_rman.rm_end = PCI_IOSPACE_SIZE - 1; 106 port_rman.rm_type = RMAN_ARRAY; 107 port_rman.rm_descr = "PCI I/O ports"; 108 if (rman_init(&port_rman) != 0 || 109 rman_manage_region(&port_rman, 0, PCI_IOSPACE_SIZE - 1) != 0) 110 panic("%s: port_rman", __func__); 111 112 /* | 57 58static struct { 59 vm_offset_t vaddr; 60 vm_paddr_t paddr; 61} zbpci_config_space[MAXCPU]; 62 63static const vm_paddr_t CFG_PADDR_BASE = 0xFE000000; 64static const u_long PCI_IOSPACE_ADDR = 0xFC000000; --- 40 unchanged lines hidden (view full) --- 105 port_rman.rm_end = PCI_IOSPACE_SIZE - 1; 106 port_rman.rm_type = RMAN_ARRAY; 107 port_rman.rm_descr = "PCI I/O ports"; 108 if (rman_init(&port_rman) != 0 || 109 rman_manage_region(&port_rman, 0, PCI_IOSPACE_SIZE - 1) != 0) 110 panic("%s: port_rman", __func__); 111 112 /* |
113 * Reserve the the physical memory that is used to read/write to the | 113 * Reserve the physical memory that is used to read/write to the |
114 * pci config space but don't activate it. We are using a page worth 115 * of KVA as a window over this region. 116 */ 117 rid = 1; 118 size = (PCI_BUSMAX + 1) * (PCI_SLOTMAX + 1) * (PCI_FUNCMAX + 1) * 256; 119 res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, CFG_PADDR_BASE, 120 CFG_PADDR_BASE + size - 1, size, 0); 121 if (res == NULL) --- 422 unchanged lines hidden --- | 114 * pci config space but don't activate it. We are using a page worth 115 * of KVA as a window over this region. 116 */ 117 rid = 1; 118 size = (PCI_BUSMAX + 1) * (PCI_SLOTMAX + 1) * (PCI_FUNCMAX + 1) * 256; 119 res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, CFG_PADDR_BASE, 120 CFG_PADDR_BASE + size - 1, size, 0); 121 if (res == NULL) --- 422 unchanged lines hidden --- |