Lines Matching refs:b_res

740 	struct resource *b_res;  in pci_bridge_check_ranges()  local
742 b_res = &bridge->resource[PCI_BRIDGE_MEM_WINDOW]; in pci_bridge_check_ranges()
743 b_res->flags |= IORESOURCE_MEM; in pci_bridge_check_ranges()
746 b_res = &bridge->resource[PCI_BRIDGE_IO_WINDOW]; in pci_bridge_check_ranges()
747 b_res->flags |= IORESOURCE_IO; in pci_bridge_check_ranges()
751 b_res = &bridge->resource[PCI_BRIDGE_PREF_MEM_WINDOW]; in pci_bridge_check_ranges()
752 b_res->flags |= IORESOURCE_MEM | IORESOURCE_PREFETCH; in pci_bridge_check_ranges()
754 b_res->flags |= IORESOURCE_MEM_64 | in pci_bridge_check_ranges()
883 struct resource *b_res = find_bus_resource_of_type(bus, IORESOURCE_IO, in pbus_size_io() local
889 if (!b_res) in pbus_size_io()
893 if (b_res->parent) in pbus_size_io()
924 resource_size(b_res), min_align); in pbus_size_io()
927 resource_size(b_res), min_align); in pbus_size_io()
929 if (bus->self && (b_res->start || b_res->end)) in pbus_size_io()
931 b_res, &bus->busn_res); in pbus_size_io()
932 b_res->flags = 0; in pbus_size_io()
936 b_res->start = min_align; in pbus_size_io()
937 b_res->end = b_res->start + size0 - 1; in pbus_size_io()
938 b_res->flags |= IORESOURCE_STARTALIGN; in pbus_size_io()
940 add_to_list(realloc_head, bus->self, b_res, size1-size0, in pbus_size_io()
943 b_res, &bus->busn_res, in pbus_size_io()
999 struct resource *b_res = find_bus_resource_of_type(bus, in pbus_size_mem() local
1005 if (!b_res) in pbus_size_mem()
1009 if (b_res->parent) in pbus_size_mem()
1075 min_align = max(min_align, window_alignment(bus, b_res->flags)); in pbus_size_mem()
1076 size0 = calculate_memsize(size, min_size, 0, 0, resource_size(b_res), min_align); in pbus_size_mem()
1080 resource_size(b_res), add_align); in pbus_size_mem()
1082 if (bus->self && (b_res->start || b_res->end)) in pbus_size_mem()
1084 b_res, &bus->busn_res); in pbus_size_mem()
1085 b_res->flags = 0; in pbus_size_mem()
1088 b_res->start = min_align; in pbus_size_mem()
1089 b_res->end = size0 + min_align - 1; in pbus_size_mem()
1090 b_res->flags |= IORESOURCE_STARTALIGN; in pbus_size_mem()
1092 add_to_list(realloc_head, bus->self, b_res, size1-size0, add_align); in pbus_size_mem()
1094 b_res, &bus->busn_res, in pbus_size_mem()
1114 struct resource *b_res; in pci_bus_size_cardbus() local
1118 b_res = &bridge->resource[PCI_CB_BRIDGE_IO_0_WINDOW]; in pci_bus_size_cardbus()
1119 if (b_res->parent) in pci_bus_size_cardbus()
1125 b_res->start = pci_cardbus_io_size; in pci_bus_size_cardbus()
1126 b_res->end = b_res->start + pci_cardbus_io_size - 1; in pci_bus_size_cardbus()
1127 b_res->flags |= IORESOURCE_IO | IORESOURCE_STARTALIGN; in pci_bus_size_cardbus()
1129 b_res->end -= pci_cardbus_io_size; in pci_bus_size_cardbus()
1130 add_to_list(realloc_head, bridge, b_res, pci_cardbus_io_size, in pci_bus_size_cardbus()
1135 b_res = &bridge->resource[PCI_CB_BRIDGE_IO_1_WINDOW]; in pci_bus_size_cardbus()
1136 if (b_res->parent) in pci_bus_size_cardbus()
1138 b_res->start = pci_cardbus_io_size; in pci_bus_size_cardbus()
1139 b_res->end = b_res->start + pci_cardbus_io_size - 1; in pci_bus_size_cardbus()
1140 b_res->flags |= IORESOURCE_IO | IORESOURCE_STARTALIGN; in pci_bus_size_cardbus()
1142 b_res->end -= pci_cardbus_io_size; in pci_bus_size_cardbus()
1143 add_to_list(realloc_head, bridge, b_res, pci_cardbus_io_size, in pci_bus_size_cardbus()
1164 b_res = &bridge->resource[PCI_CB_BRIDGE_MEM_0_WINDOW]; in pci_bus_size_cardbus()
1165 if (b_res->parent) in pci_bus_size_cardbus()
1172 b_res->start = pci_cardbus_mem_size; in pci_bus_size_cardbus()
1173 b_res->end = b_res->start + pci_cardbus_mem_size - 1; in pci_bus_size_cardbus()
1174 b_res->flags |= IORESOURCE_MEM | IORESOURCE_PREFETCH | in pci_bus_size_cardbus()
1177 b_res->end -= pci_cardbus_mem_size; in pci_bus_size_cardbus()
1178 add_to_list(realloc_head, bridge, b_res, in pci_bus_size_cardbus()
1187 b_res = &bridge->resource[PCI_CB_BRIDGE_MEM_1_WINDOW]; in pci_bus_size_cardbus()
1188 if (b_res->parent) in pci_bus_size_cardbus()
1190 b_res->start = pci_cardbus_mem_size; in pci_bus_size_cardbus()
1191 b_res->end = b_res->start + b_res_3_size - 1; in pci_bus_size_cardbus()
1192 b_res->flags |= IORESOURCE_MEM | IORESOURCE_STARTALIGN; in pci_bus_size_cardbus()
1194 b_res->end -= b_res_3_size; in pci_bus_size_cardbus()
1195 add_to_list(realloc_head, bridge, b_res, b_res_3_size, in pci_bus_size_cardbus()
1529 struct resource *b_res; in pci_bridge_release_resources() local
1532 b_res = &dev->resource[PCI_BRIDGE_RESOURCES]; in pci_bridge_release_resources()
1549 (b_res[2].flags & IORESOURCE_MEM_64)) in pci_bridge_release_resources()
1551 else if (!(b_res[2].flags & IORESOURCE_MEM_64) && in pci_bridge_release_resources()
1552 (b_res[2].flags & IORESOURCE_PREFETCH)) in pci_bridge_release_resources()
1557 r = &b_res[idx]; in pci_bridge_release_resources()