Deleted Added
full compact
ofw_machdep.c (128712) ofw_machdep.c (129051)
1/*-
2 * Copyright (c) 2001 by Thomas Moestl <tmm@FreeBSD.org>.
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

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

17 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
18 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
23 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
1/*-
2 * Copyright (c) 2001 by Thomas Moestl <tmm@FreeBSD.org>.
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

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

17 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
18 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
23 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * $FreeBSD: head/sys/sparc64/sparc64/ofw_machdep.c 128712 2004-04-28 13:06:46Z tmm $
25 * $FreeBSD: head/sys/sparc64/sparc64/ofw_machdep.c 129051 2004-05-08 13:53:47Z marius $
26 */
27
28/*
29 * Some OpenFirmware helper functions that are likely machine dependent.
30 */
31
26 */
27
28/*
29 * Some OpenFirmware helper functions that are likely machine dependent.
30 */
31
32#include "opt_ofw_pci.h"
33
34#include <sys/param.h>
35#include <sys/systm.h>
36
37#include <net/ethernet.h>
38
39#include <dev/ofw/openfirm.h>
40
41#include <machine/bus.h>

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

60 bcopy(&idp.id_ether, addr, ETHER_ADDR_LEN);
61}
62
63int
64OF_getetheraddr2(device_t dev, u_char *addr)
65{
66 phandle_t node;
67
32#include <sys/param.h>
33#include <sys/systm.h>
34
35#include <net/ethernet.h>
36
37#include <dev/ofw/openfirm.h>
38
39#include <machine/bus.h>

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

58 bcopy(&idp.id_ether, addr, ETHER_ADDR_LEN);
59}
60
61int
62OF_getetheraddr2(device_t dev, u_char *addr)
63{
64 phandle_t node;
65
68#ifdef OFW_NEWPCI
69 node = ofw_pci_get_node(dev);
66 node = ofw_pci_get_node(dev);
70#else
71 node = ofw_pci_node(dev);
72#endif
73 if (node <= 0)
74 return (-1);
75 return (OF_getprop(node, "local-mac-address", addr, ETHER_ADDR_LEN));
76}
77
78int
79OF_decode_addr(phandle_t node, int *space, bus_addr_t *addr)
80{

--- 99 unchanged lines hidden ---
67 if (node <= 0)
68 return (-1);
69 return (OF_getprop(node, "local-mac-address", addr, ETHER_ADDR_LEN));
70}
71
72int
73OF_decode_addr(phandle_t node, int *space, bus_addr_t *addr)
74{

--- 99 unchanged lines hidden ---