Deleted Added
full compact
ofw_cpu.c (193156) ofw_cpu.c (227843)
1/*-
2 * Copyright (C) 2009 Nathan Whitehorn
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

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

16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
23 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1/*-
2 * Copyright (C) 2009 Nathan Whitehorn
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

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

16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
23 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * $FreeBSD: head/sys/powerpc/ofw/ofw_cpu.c 193156 2009-05-31 09:01:23Z nwhitehorn $
26 */
27
24 */
25
26#include <sys/cdefs.h>
27__FBSDID("$FreeBSD: head/sys/powerpc/ofw/ofw_cpu.c 227843 2011-11-22 21:28:20Z marius $");
28
28#include <sys/param.h>
29#include <sys/systm.h>
30#include <sys/kernel.h>
31#include <sys/module.h>
32#include <sys/malloc.h>
33#include <sys/bus.h>
34#include <sys/cpu.h>
35#include <machine/bus.h>

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

46static MALLOC_DEFINE(M_OFWCPU, "ofwcpu", "OFW CPU device information");
47
48static device_method_t ofw_cpulist_methods[] = {
49 /* Device interface */
50 DEVMETHOD(device_probe, ofw_cpulist_probe),
51 DEVMETHOD(device_attach, ofw_cpulist_attach),
52
53 /* Bus interface */
29#include <sys/param.h>
30#include <sys/systm.h>
31#include <sys/kernel.h>
32#include <sys/module.h>
33#include <sys/malloc.h>
34#include <sys/bus.h>
35#include <sys/cpu.h>
36#include <machine/bus.h>

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

47static MALLOC_DEFINE(M_OFWCPU, "ofwcpu", "OFW CPU device information");
48
49static device_method_t ofw_cpulist_methods[] = {
50 /* Device interface */
51 DEVMETHOD(device_probe, ofw_cpulist_probe),
52 DEVMETHOD(device_attach, ofw_cpulist_attach),
53
54 /* Bus interface */
54 DEVMETHOD(bus_driver_added, bus_generic_driver_added),
55 DEVMETHOD(bus_add_child, bus_generic_add_child),
55 DEVMETHOD(bus_add_child, bus_generic_add_child),
56 DEVMETHOD(bus_print_child, bus_generic_print_child),
57 DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str),
58
59 /* ofw_bus interface */
60 DEVMETHOD(ofw_bus_get_devinfo, ofw_cpulist_get_devinfo),
61 DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat),
62 DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model),
63 DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name),
64 DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node),
65 DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type),
66
56 DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str),
57
58 /* ofw_bus interface */
59 DEVMETHOD(ofw_bus_get_devinfo, ofw_cpulist_get_devinfo),
60 DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat),
61 DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model),
62 DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name),
63 DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node),
64 DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type),
65
67 { 0, 0 }
66 DEVMETHOD_END
68};
69
70static driver_t ofw_cpulist_driver = {
71 "cpulist",
72 ofw_cpulist_methods,
73 0
74};
75

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

135 uintptr_t *result);
136
137static device_method_t ofw_cpu_methods[] = {
138 /* Device interface */
139 DEVMETHOD(device_probe, ofw_cpu_probe),
140 DEVMETHOD(device_attach, ofw_cpu_attach),
141
142 /* Bus interface */
67};
68
69static driver_t ofw_cpulist_driver = {
70 "cpulist",
71 ofw_cpulist_methods,
72 0
73};
74

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

134 uintptr_t *result);
135
136static device_method_t ofw_cpu_methods[] = {
137 /* Device interface */
138 DEVMETHOD(device_probe, ofw_cpu_probe),
139 DEVMETHOD(device_attach, ofw_cpu_attach),
140
141 /* Bus interface */
143 DEVMETHOD(bus_driver_added, bus_generic_driver_added),
144 DEVMETHOD(bus_add_child, bus_generic_add_child),
142 DEVMETHOD(bus_add_child, bus_generic_add_child),
145 DEVMETHOD(bus_print_child, bus_generic_print_child),
146 DEVMETHOD(bus_read_ivar, ofw_cpu_read_ivar),
147 DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
148 DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
149 DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource),
150 DEVMETHOD(bus_release_resource, bus_generic_release_resource),
151 DEVMETHOD(bus_activate_resource,bus_generic_activate_resource),
152
143 DEVMETHOD(bus_read_ivar, ofw_cpu_read_ivar),
144 DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
145 DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
146 DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource),
147 DEVMETHOD(bus_release_resource, bus_generic_release_resource),
148 DEVMETHOD(bus_activate_resource,bus_generic_activate_resource),
149
153 { 0, 0 }
150 DEVMETHOD_END
154};
155
156static driver_t ofw_cpu_driver = {
157 "cpu",
158 ofw_cpu_methods,
159 0
160};
161

--- 45 unchanged lines hidden ---
151};
152
153static driver_t ofw_cpu_driver = {
154 "cpu",
155 ofw_cpu_methods,
156 0
157};
158

--- 45 unchanged lines hidden ---