mvs_soc.c (207536) | mvs_soc.c (208410) |
---|---|
1/*- 2 * Copyright (c) 2010 Alexander Motin <mav@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 --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2010 Alexander Motin <mav@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 --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/dev/mvs/mvs_soc.c 207536 2010-05-02 19:28:30Z mav $"); | 28__FBSDID("$FreeBSD: head/sys/dev/mvs/mvs_soc.c 208410 2010-05-22 07:32:47Z mav $"); |
29 30#include <sys/param.h> 31#include <sys/module.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/bus.h> 35#include <sys/endian.h> 36#include <sys/malloc.h> --- 371 unchanged lines hidden (view full) --- 408 retval = bus_print_child_header(dev, child); 409 retval += printf(" at channel %d", 410 (int)(intptr_t)device_get_ivars(child)); 411 retval += bus_print_child_footer(dev, child); 412 413 return (retval); 414} 415 | 29 30#include <sys/param.h> 31#include <sys/module.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/bus.h> 35#include <sys/endian.h> 36#include <sys/malloc.h> --- 371 unchanged lines hidden (view full) --- 408 retval = bus_print_child_header(dev, child); 409 retval += printf(" at channel %d", 410 (int)(intptr_t)device_get_ivars(child)); 411 retval += bus_print_child_footer(dev, child); 412 413 return (retval); 414} 415 |
416static int 417mvs_child_location_str(device_t dev, device_t child, char *buf, 418 size_t buflen) 419{ 420 421 snprintf(buf, buflen, "channel=%d", 422 (int)(intptr_t)device_get_ivars(child)); 423 return (0); 424} 425 |
|
416static device_method_t mvs_methods[] = { 417 DEVMETHOD(device_probe, mvs_probe), 418 DEVMETHOD(device_attach, mvs_attach), 419 DEVMETHOD(device_detach, mvs_detach), 420 DEVMETHOD(device_suspend, mvs_suspend), 421 DEVMETHOD(device_resume, mvs_resume), 422 DEVMETHOD(bus_print_child, mvs_print_child), 423 DEVMETHOD(bus_alloc_resource, mvs_alloc_resource), 424 DEVMETHOD(bus_release_resource, mvs_release_resource), 425 DEVMETHOD(bus_setup_intr, mvs_setup_intr), 426 DEVMETHOD(bus_teardown_intr,mvs_teardown_intr), 427 DEVMETHOD(mvs_edma, mvs_edma), | 426static device_method_t mvs_methods[] = { 427 DEVMETHOD(device_probe, mvs_probe), 428 DEVMETHOD(device_attach, mvs_attach), 429 DEVMETHOD(device_detach, mvs_detach), 430 DEVMETHOD(device_suspend, mvs_suspend), 431 DEVMETHOD(device_resume, mvs_resume), 432 DEVMETHOD(bus_print_child, mvs_print_child), 433 DEVMETHOD(bus_alloc_resource, mvs_alloc_resource), 434 DEVMETHOD(bus_release_resource, mvs_release_resource), 435 DEVMETHOD(bus_setup_intr, mvs_setup_intr), 436 DEVMETHOD(bus_teardown_intr,mvs_teardown_intr), 437 DEVMETHOD(mvs_edma, mvs_edma), |
438 DEVMETHOD(bus_child_location_str, mvs_child_location_str), |
|
428 { 0, 0 } 429}; 430static driver_t mvs_driver = { 431 "sata", 432 mvs_methods, 433 sizeof(struct mvs_controller) 434}; 435DRIVER_MODULE(sata, mbus, mvs_driver, mvs_devclass, 0, 0); 436MODULE_VERSION(sata, 1); 437 | 439 { 0, 0 } 440}; 441static driver_t mvs_driver = { 442 "sata", 443 mvs_methods, 444 sizeof(struct mvs_controller) 445}; 446DRIVER_MODULE(sata, mbus, mvs_driver, mvs_devclass, 0, 0); 447MODULE_VERSION(sata, 1); 448 |