/[dynamips]/upstream/dynamips-0.2.5/dev_dec21x50.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /upstream/dynamips-0.2.5/dev_dec21x50.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations)
Sat Oct 6 16:01:44 2007 UTC (12 years, 1 month ago) by dpavlin
File MIME type: text/plain
File size: 2133 byte(s)
import 0.2.5 from upstream

1 /*
2 * Cisco 7200 (Predator) simulation platform.
3 * Copyright (c) 2005,2006 Christophe Fillot (cf@utc.fr)
4 *
5 * Cisco C7200 (Predator) DEC21050/DEC21150 PCI bridges.
6 * This is just a fake device.
7 */
8
9 #include <stdio.h>
10 #include <stdlib.h>
11 #include <string.h>
12
13 #include "mips64.h"
14 #include "dynamips.h"
15 #include "memory.h"
16 #include "device.h"
17 #include "pci_dev.h"
18
19 #define PCI_VENDOR_DEC 0x1011
20 #define PCI_PRODUCT_DEC_21050 0x0001
21 #define PCI_PRODUCT_DEC_21052 0x0021
22 #define PCI_PRODUCT_DEC_21150 0x0023
23 #define PCI_PRODUCT_DEC_21152 0x0024
24
25 /*
26 * dev_dec21050_init()
27 */
28 int dev_dec21050_init(struct pci_bus *pci_bus,int pci_device,
29 struct pci_bus *sec_bus)
30 {
31 struct pci_device *dev;
32
33 dev = pci_bridge_create_dev(pci_bus,"dec21050",
34 PCI_VENDOR_DEC,PCI_PRODUCT_DEC_21050,
35 pci_device,0,sec_bus,NULL,NULL);
36 return((dev != NULL) ? 0 : -1);
37 }
38
39 /*
40 * dev_dec21052_init()
41 */
42 int dev_dec21052_init(struct pci_bus *pci_bus,int pci_device,
43 struct pci_bus *sec_bus)
44 {
45 struct pci_device *dev;
46
47 dev = pci_bridge_create_dev(pci_bus,"dec21052",
48 PCI_VENDOR_DEC,PCI_PRODUCT_DEC_21052,
49 pci_device,0,sec_bus,NULL,NULL);
50 return((dev != NULL) ? 0 : -1);
51 }
52
53 /*
54 * dev_dec21150_init()
55 */
56 int dev_dec21150_init(struct pci_bus *pci_bus,int pci_device,
57 struct pci_bus *sec_bus)
58 {
59 struct pci_device *dev;
60
61 dev = pci_bridge_create_dev(pci_bus,"dec21150",
62 PCI_VENDOR_DEC,PCI_PRODUCT_DEC_21150,
63 pci_device,0,sec_bus,NULL,NULL);
64 return((dev != NULL) ? 0 : -1);
65 }
66
67 /*
68 * dev_dec21152_init()
69 */
70 int dev_dec21152_init(struct pci_bus *pci_bus,int pci_device,
71 struct pci_bus *sec_bus)
72 {
73 struct pci_device *dev;
74
75 dev = pci_bridge_create_dev(pci_bus,"dec21152",
76 PCI_VENDOR_DEC,PCI_PRODUCT_DEC_21152,
77 pci_device,0,sec_bus,NULL,NULL);
78 return((dev != NULL) ? 0 : -1);
79 }

  ViewVC Help
Powered by ViewVC 1.1.26