pccard.c (65917) | pccard.c (66058) |
---|---|
1/* $NetBSD: pcmcia.c,v 1.13 1998/12/24 04:51:59 marc Exp $ */ | 1/* $NetBSD: pcmcia.c,v 1.13 1998/12/24 04:51:59 marc Exp $ */ |
2/* $FreeBSD: head/sys/dev/pccard/pccard.c 65917 2000-09-16 06:52:20Z imp $ */ | 2/* $FreeBSD: head/sys/dev/pccard/pccard.c 66058 2000-09-19 04:39:20Z imp $ */ |
3 4/* 5 * Copyright (c) 1997 Marc Horowitz. 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 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright --- 489 unchanged lines hidden (view full) --- 500{ 501 502 pccard_chip_io_unmap(pf->sc->pct, pf->sc->pch, window); 503 504 /* XXX Anything for multi-function cards? */ 505} 506#endif 507 | 3 4/* 5 * Copyright (c) 1997 Marc Horowitz. 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 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright --- 489 unchanged lines hidden (view full) --- 500{ 501 502 pccard_chip_io_unmap(pf->sc->pct, pf->sc->pch, window); 503 504 /* XXX Anything for multi-function cards? */ 505} 506#endif 507 |
508/* 509 * simulate the old "probe" routine. In the new world order, the driver 510 * needs to grab devices while in the old they were assigned to the device by 511 * the pccardd process. These symbols are exported to the upper layers. 512 */ 513int 514pccard_compat_probe(device_t dev) 515{ 516 return (CARD_COMPAT_MATCH(dev)); 517} 518 519int 520pccard_compat_attach(device_t dev) 521{ 522 int err; 523 524 err = CARD_COMPAT_PROBE(dev); 525 if (err == 0) 526 err = CARD_COMPAT_ATTACH(dev); 527 return (err); 528} 529 |
|
508#define PCCARD_NPORT 2 509#define PCCARD_NMEM 5 510#define PCCARD_NIRQ 1 511#define PCCARD_NDRQ 0 512 513static int 514pccard_add_children(device_t dev, int busno) 515{ --- 140 unchanged lines hidden (view full) --- 656static int 657pccard_set_memory_offset(device_t dev, device_t child, int rid, 658 u_int32_t offset) 659{ 660 return CARD_SET_MEMORY_OFFSET(device_get_parent(dev), child, rid, 661 offset); 662} 663 | 530#define PCCARD_NPORT 2 531#define PCCARD_NMEM 5 532#define PCCARD_NIRQ 1 533#define PCCARD_NDRQ 0 534 535static int 536pccard_add_children(device_t dev, int busno) 537{ --- 140 unchanged lines hidden (view full) --- 678static int 679pccard_set_memory_offset(device_t dev, device_t child, int rid, 680 u_int32_t offset) 681{ 682 return CARD_SET_MEMORY_OFFSET(device_get_parent(dev), child, rid, 683 offset); 684} 685 |
686static int 687pccard_read_ivar(device_t bus, device_t child, int which, u_char *result) 688{ 689 /* PCCARD_IVAR_ETHADDR unhandled from oldcard */ 690 return ENOENT; 691} 692 693 |
|
664static device_method_t pccard_methods[] = { 665 /* Device interface */ 666 DEVMETHOD(device_probe, pccard_probe), 667 DEVMETHOD(device_attach, pccard_attach), 668 DEVMETHOD(device_detach, bus_generic_detach), 669 DEVMETHOD(device_shutdown, bus_generic_shutdown), 670 DEVMETHOD(device_suspend, bus_generic_suspend), 671 DEVMETHOD(device_resume, bus_generic_resume), --- 5 unchanged lines hidden (view full) --- 677 DEVMETHOD(bus_release_resource, bus_generic_release_resource), 678 DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), 679 DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), 680 DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), 681 DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), 682 DEVMETHOD(bus_set_resource, pccard_set_resource), 683 DEVMETHOD(bus_get_resource, pccard_get_resource), 684 DEVMETHOD(bus_delete_resource, pccard_delete_resource), | 694static device_method_t pccard_methods[] = { 695 /* Device interface */ 696 DEVMETHOD(device_probe, pccard_probe), 697 DEVMETHOD(device_attach, pccard_attach), 698 DEVMETHOD(device_detach, bus_generic_detach), 699 DEVMETHOD(device_shutdown, bus_generic_shutdown), 700 DEVMETHOD(device_suspend, bus_generic_suspend), 701 DEVMETHOD(device_resume, bus_generic_resume), --- 5 unchanged lines hidden (view full) --- 707 DEVMETHOD(bus_release_resource, bus_generic_release_resource), 708 DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), 709 DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), 710 DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), 711 DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), 712 DEVMETHOD(bus_set_resource, pccard_set_resource), 713 DEVMETHOD(bus_get_resource, pccard_get_resource), 714 DEVMETHOD(bus_delete_resource, pccard_delete_resource), |
715 DEVMETHOD(bus_read_ivar, pccard_read_ivar), |
|
685 686 /* Card Interface */ 687 DEVMETHOD(card_set_res_flags, pccard_set_res_flags), 688 DEVMETHOD(card_set_memory_offset, pccard_set_memory_offset), 689 DEVMETHOD(card_get_type, pccard_card_gettype), 690 DEVMETHOD(card_attach_card, pccard_attach_card), 691 DEVMETHOD(card_detach_card, pccard_detach_card), 692 --- 17 unchanged lines hidden --- | 716 717 /* Card Interface */ 718 DEVMETHOD(card_set_res_flags, pccard_set_res_flags), 719 DEVMETHOD(card_set_memory_offset, pccard_set_memory_offset), 720 DEVMETHOD(card_get_type, pccard_card_gettype), 721 DEVMETHOD(card_attach_card, pccard_attach_card), 722 DEVMETHOD(card_detach_card, pccard_detach_card), 723 --- 17 unchanged lines hidden --- |