central.c (167308) | central.c (182070) |
---|---|
1/*- 2 * Copyright (c) 2003 Jake Burkholder. 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 --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003 Jake Burkholder. 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 --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/sparc64/central/central.c 167308 2007-03-07 21:13:51Z marius $"); | 28__FBSDID("$FreeBSD: head/sys/sparc64/central/central.c 182070 2008-08-23 16:07:20Z marius $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/kernel.h> 34#include <sys/malloc.h> 35#include <sys/module.h> 36 --- 63 unchanged lines hidden (view full) --- 100 "central", 101 central_methods, 102 sizeof(struct central_softc), 103}; 104 105static devclass_t central_devclass; 106 107DRIVER_MODULE(central, nexus, central_driver, central_devclass, 0, 0); | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/kernel.h> 34#include <sys/malloc.h> 35#include <sys/module.h> 36 --- 63 unchanged lines hidden (view full) --- 100 "central", 101 central_methods, 102 sizeof(struct central_softc), 103}; 104 105static devclass_t central_devclass; 106 107DRIVER_MODULE(central, nexus, central_driver, central_devclass, 0, 0); |
108MODULE_VERSION(central, 1); |
|
108 109static int 110central_probe(device_t dev) 111{ 112 113 if (strcmp(ofw_bus_get_name(dev), "central") == 0) { 114 device_set_desc(dev, "central"); 115 return (0); --- 38 unchanged lines hidden (view full) --- 154 free(cdi, M_DEVBUF); 155 continue; 156 } 157 resource_list_init(&cdi->cdi_rl); 158 for (i = 0; i < nreg; i++) 159 resource_list_add(&cdi->cdi_rl, SYS_RES_MEMORY, i, 160 reg[i].sbr_offset, reg[i].sbr_offset + 161 reg[i].sbr_size, reg[i].sbr_size); | 109 110static int 111central_probe(device_t dev) 112{ 113 114 if (strcmp(ofw_bus_get_name(dev), "central") == 0) { 115 device_set_desc(dev, "central"); 116 return (0); --- 38 unchanged lines hidden (view full) --- 155 free(cdi, M_DEVBUF); 156 continue; 157 } 158 resource_list_init(&cdi->cdi_rl); 159 for (i = 0; i < nreg; i++) 160 resource_list_add(&cdi->cdi_rl, SYS_RES_MEMORY, i, 161 reg[i].sbr_offset, reg[i].sbr_offset + 162 reg[i].sbr_size, reg[i].sbr_size); |
162 free(reg, M_OFWPROP); | 163 free(reg, M_OFWPROP); |
163 cdev = device_add_child(dev, NULL, -1); 164 if (cdev == NULL) { 165 device_printf(dev, "<%s>: device_add_child failed\n", 166 cdi->cdi_obdinfo.obd_name); 167 resource_list_free(&cdi->cdi_rl); 168 ofw_bus_gen_destroy_devinfo(&cdi->cdi_obdinfo); 169 free(cdi, M_DEVBUF); 170 continue; --- 114 unchanged lines hidden --- | 164 cdev = device_add_child(dev, NULL, -1); 165 if (cdev == NULL) { 166 device_printf(dev, "<%s>: device_add_child failed\n", 167 cdi->cdi_obdinfo.obd_name); 168 resource_list_free(&cdi->cdi_rl); 169 ofw_bus_gen_destroy_devinfo(&cdi->cdi_obdinfo); 170 free(cdi, M_DEVBUF); 171 continue; --- 114 unchanged lines hidden --- |