Deleted Added
full compact
psycho.c (190109) psycho.c (197164)
1/*-
2 * Copyright (c) 1999, 2000 Matthew R. Green
3 * Copyright (c) 2001 - 2003 by Thomas Moestl <tmm@FreeBSD.org>
4 * Copyright (c) 2005 - 2006 Marius Strobl <marius@FreeBSD.org>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 17 unchanged lines hidden (view full) ---

26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 *
30 * from: NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp
31 */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1999, 2000 Matthew R. Green
3 * Copyright (c) 2001 - 2003 by Thomas Moestl <tmm@FreeBSD.org>
4 * Copyright (c) 2005 - 2006 Marius Strobl <marius@FreeBSD.org>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 17 unchanged lines hidden (view full) ---

26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 *
30 * from: NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/sparc64/pci/psycho.c 190109 2009-03-19 20:52:46Z marius $");
34__FBSDID("$FreeBSD: head/sys/sparc64/pci/psycho.c 197164 2009-09-13 14:47:31Z marius $");
35
36/*
37 * Support for `Hummingbird' (UltraSPARC IIe), `Psycho' and `Psycho+'
38 * (UltraSPARC II) and `Sabre' (UltraSPARC IIi) UPA to PCI bridges.
39 */
40
41#include "opt_ofw_pci.h"
42#include "opt_psycho.h"

--- 176 unchanged lines hidden (view full) ---

219 * On UltraIIi machines, "Sabre" itself usually takes pci0, with "Simba" often
220 * as pci1 and pci2, although they have been implemented with other PCI bus
221 * numbers on some machines.
222 *
223 * On UltraII machines, there can be any number of "Psycho+" ICs, each
224 * providing two PCI buses.
225 */
226
35
36/*
37 * Support for `Hummingbird' (UltraSPARC IIe), `Psycho' and `Psycho+'
38 * (UltraSPARC II) and `Sabre' (UltraSPARC IIi) UPA to PCI bridges.
39 */
40
41#include "opt_ofw_pci.h"
42#include "opt_psycho.h"

--- 176 unchanged lines hidden (view full) ---

219 * On UltraIIi machines, "Sabre" itself usually takes pci0, with "Simba" often
220 * as pci1 and pci2, although they have been implemented with other PCI bus
221 * numbers on some machines.
222 *
223 * On UltraII machines, there can be any number of "Psycho+" ICs, each
224 * providing two PCI buses.
225 */
226
227#define OFW_PCI_TYPE "pci"
228
229struct psycho_desc {
230 const char *pd_string;
231 int pd_mode;
232 const char *pd_name;
233};
234
235static const struct psycho_desc const psycho_compats[] = {
236 { "pci108e,8000", PSYCHO_MODE_PSYCHO, "Psycho compatible" },

--- 33 unchanged lines hidden (view full) ---

270}
271
272static int
273psycho_probe(device_t dev)
274{
275 const char *dtype;
276
277 dtype = ofw_bus_get_type(dev);
227struct psycho_desc {
228 const char *pd_string;
229 int pd_mode;
230 const char *pd_name;
231};
232
233static const struct psycho_desc const psycho_compats[] = {
234 { "pci108e,8000", PSYCHO_MODE_PSYCHO, "Psycho compatible" },

--- 33 unchanged lines hidden (view full) ---

268}
269
270static int
271psycho_probe(device_t dev)
272{
273 const char *dtype;
274
275 dtype = ofw_bus_get_type(dev);
278 if (dtype != NULL && strcmp(dtype, OFW_PCI_TYPE) == 0 &&
276 if (dtype != NULL && strcmp(dtype, OFW_TYPE_PCI) == 0 &&
279 psycho_get_desc(dev) != NULL) {
280 device_set_desc(dev, "U2P UPA-PCI bridge");
281 return (0);
282 }
283 return (ENXIO);
284}
285
286static int

--- 1114 unchanged lines hidden ---
277 psycho_get_desc(dev) != NULL) {
278 device_set_desc(dev, "U2P UPA-PCI bridge");
279 return (0);
280 }
281 return (ENXIO);
282}
283
284static int

--- 1114 unchanged lines hidden ---