Deleted Added
full compact
pnp.c (90234) pnp.c (104142)
1/*
2 * Copyright (c) 1996, Sujal M. Patel
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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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 *
1/*
2 * Copyright (c) 1996, Sujal M. Patel
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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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 * $FreeBSD: head/sys/isa/pnp.c 90234 2002-02-05 06:52:56Z tanimura $
26 * $FreeBSD: head/sys/isa/pnp.c 104142 2002-09-29 13:31:26Z nyan $
27 * from: pnp.c,v 1.11 1999/05/06 22:11:19 peter Exp
28 */
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/kernel.h>
33#include <sys/module.h>
34#include <sys/bus.h>

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

86 { 0xc5008c0e /* SB64(CTL00c5) */, 0x22008c0e,
87 PNP_QUIRK_EXTRA_IO, 0x400, 0x800 },
88 { 0xe4008c0e /* SB64(CTL00e4) */, 0x22008c0e,
89 PNP_QUIRK_EXTRA_IO, 0x400, 0x800 },
90
91 { 0 }
92};
93
27 * from: pnp.c,v 1.11 1999/05/06 22:11:19 peter Exp
28 */
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/kernel.h>
33#include <sys/module.h>
34#include <sys/bus.h>

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

86 { 0xc5008c0e /* SB64(CTL00c5) */, 0x22008c0e,
87 PNP_QUIRK_EXTRA_IO, 0x400, 0x800 },
88 { 0xe4008c0e /* SB64(CTL00e4) */, 0x22008c0e,
89 PNP_QUIRK_EXTRA_IO, 0x400, 0x800 },
90
91 { 0 }
92};
93
94#ifdef PC98
95/* Some NEC PnP cards have 9 bytes serial code. */
96static pnp_id necids[] = {
97 {0x4180a3b8, 0xffffffff, 0x00}, /* PC-9801CB-B04 (NEC8041) */
98 {0x5181a3b8, 0xffffffff, 0x46}, /* PC-9821CB2-B04(NEC8151) */
99 {0x5182a3b8, 0xffffffff, 0xb8}, /* PC-9801-XX (NEC8251) */
100 {0x9181a3b8, 0xffffffff, 0x00}, /* PC-9801-120 (NEC8191) */
101 {0, 0, 0}
102};
103#endif
104
94#if 0
95/*
96 * these entries are initialized using the autoconfig menu
97 * The struct is invalid (and must be initialized) if the first
98 * CSN is zero. The init code fills invalid entries with CSN 255
99 * which is not a supported value.
100 */
101

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

737pnp_isolation_protocol(device_t parent)
738{
739 int csn;
740 pnp_id id;
741 int found = 0, len;
742 u_char *resources = 0;
743 int space = 0;
744 int error;
105#if 0
106/*
107 * these entries are initialized using the autoconfig menu
108 * The struct is invalid (and must be initialized) if the first
109 * CSN is zero. The init code fills invalid entries with CSN 255
110 * which is not a supported value.
111 */
112

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

748pnp_isolation_protocol(device_t parent)
749{
750 int csn;
751 pnp_id id;
752 int found = 0, len;
753 u_char *resources = 0;
754 int space = 0;
755 int error;
756#ifdef PC98
757 int n, necpnp;
758 u_char buffer[10];
759#endif
745
746 /*
747 * Put all cards into the Sleep state so that we can clear
748 * their CSNs.
749 */
750 pnp_send_initiation_key();
751
752 /*

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

778 * isolation protocol will be in Isolation
779 * mode and all others will be in Sleep.
780 * Program the CSN of the isolated card
781 * (taking it to Config state) and read its
782 * resources, creating devices as we find
783 * logical devices on the card.
784 */
785 pnp_write(PNP_SET_CSN, csn);
760
761 /*
762 * Put all cards into the Sleep state so that we can clear
763 * their CSNs.
764 */
765 pnp_send_initiation_key();
766
767 /*

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

793 * isolation protocol will be in Isolation
794 * mode and all others will be in Sleep.
795 * Program the CSN of the isolated card
796 * (taking it to Config state) and read its
797 * resources, creating devices as we find
798 * logical devices on the card.
799 */
800 pnp_write(PNP_SET_CSN, csn);
801#ifdef PC98
802 if (bootverbose)
803 printf("PnP Vendor ID = %x\n", id.vendor_id);
804 /* Check for NEC PnP (9 bytes serial). */
805 for (n = necpnp = 0; necids[n].vendor_id; n++) {
806 if (id.vendor_id == necids[n].vendor_id) {
807 necpnp = 1;
808 break;
809 }
810 }
811 if (necpnp) {
812 if (bootverbose)
813 printf("It seems to NEC-PnP card (%s).\n",
814 pnp_eisaformat(id.vendor_id));
815 /* Read dummy 9 bytes serial area. */
816 pnp_get_resource_info(buffer, 9);
817 } else {
818 if (bootverbose)
819 printf("It seems to Normal-ISA-PnP card (%s).\n",
820 pnp_eisaformat(id.vendor_id));
821 }
822 if (bootverbose)
823 printf("Reading PnP configuration for %s.\n",
824 pnp_eisaformat(id.vendor_id));
825#endif
786 error = pnp_read_resources(&resources,
787 &space,
788 &len);
789 if (error)
790 break;
791 pnp_create_devices(parent, &id, csn,
792 resources, len);
793 found++;

--- 79 unchanged lines hidden ---
826 error = pnp_read_resources(&resources,
827 &space,
828 &len);
829 if (error)
830 break;
831 pnp_create_devices(parent, &id, csn,
832 resources, len);
833 found++;

--- 79 unchanged lines hidden ---