Add Simba device ID
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6465 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
		
							parent
							
								
									378e2aea1b
								
							
						
					
					
						commit
						480b9f24d7
					
				@ -266,9 +266,11 @@ PCIBus *pci_apb_init(target_phys_addr_t special_base,
 | 
				
			|||||||
    d->config[0x0E] = 0x00; // header_type
 | 
					    d->config[0x0E] = 0x00; // header_type
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* APB secondary busses */
 | 
					    /* APB secondary busses */
 | 
				
			||||||
    *bus2 = pci_bridge_init(s->bus, 8, 0x108e5000, pci_apb_map_irq,
 | 
					    *bus2 = pci_bridge_init(s->bus, 8, PCI_VENDOR_ID_SUN,
 | 
				
			||||||
 | 
					                            PCI_DEVICE_ID_SUN_SIMBA, pci_apb_map_irq,
 | 
				
			||||||
                            "Advanced PCI Bus secondary bridge 1");
 | 
					                            "Advanced PCI Bus secondary bridge 1");
 | 
				
			||||||
    *bus3 = pci_bridge_init(s->bus, 9, 0x108e5000, pci_apb_map_irq,
 | 
					    *bus3 = pci_bridge_init(s->bus, 9, PCI_VENDOR_ID_SUN,
 | 
				
			||||||
 | 
					                            PCI_DEVICE_ID_SUN_SIMBA, pci_apb_map_irq,
 | 
				
			||||||
                            "Advanced PCI Bus secondary bridge 2");
 | 
					                            "Advanced PCI Bus secondary bridge 2");
 | 
				
			||||||
    return s->bus;
 | 
					    return s->bus;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										10
									
								
								hw/pci.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								hw/pci.c
									
									
									
									
									
								
							@ -713,16 +713,16 @@ static void pci_bridge_write_config(PCIDevice *d,
 | 
				
			|||||||
    pci_default_write_config(d, address, val, len);
 | 
					    pci_default_write_config(d, address, val, len);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PCIBus *pci_bridge_init(PCIBus *bus, int devfn, uint32_t id,
 | 
					PCIBus *pci_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t did,
 | 
				
			||||||
                        pci_map_irq_fn map_irq, const char *name)
 | 
					                        pci_map_irq_fn map_irq, const char *name)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    PCIBridge *s;
 | 
					    PCIBridge *s;
 | 
				
			||||||
    s = (PCIBridge *)pci_register_device(bus, name, sizeof(PCIBridge),
 | 
					    s = (PCIBridge *)pci_register_device(bus, name, sizeof(PCIBridge),
 | 
				
			||||||
                                         devfn, NULL, pci_bridge_write_config);
 | 
					                                         devfn, NULL, pci_bridge_write_config);
 | 
				
			||||||
    s->dev.config[0x00] = id >> 16;
 | 
					
 | 
				
			||||||
    s->dev.config[0x01] = id >> 24;
 | 
					    pci_config_set_vendor_id(s->dev.config, vid);
 | 
				
			||||||
    s->dev.config[0x02] = id; // device_id
 | 
					    pci_config_set_device_id(s->dev.config, did);
 | 
				
			||||||
    s->dev.config[0x03] = id >> 8;
 | 
					
 | 
				
			||||||
    s->dev.config[0x04] = 0x06; // command = bus master, pci mem
 | 
					    s->dev.config[0x04] = 0x06; // command = bus master, pci mem
 | 
				
			||||||
    s->dev.config[0x05] = 0x00;
 | 
					    s->dev.config[0x05] = 0x00;
 | 
				
			||||||
    s->dev.config[0x06] = 0xa0; // status = fast back-to-back, 66MHz, no error
 | 
					    s->dev.config[0x06] = 0xa0; // status = fast back-to-back, 66MHz, no error
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										3
									
								
								hw/pci.h
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								hw/pci.h
									
									
									
									
									
								
							@ -31,6 +31,7 @@ extern target_phys_addr_t pci_mem_base;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#define PCI_VENDOR_ID_SUN                0x108e
 | 
					#define PCI_VENDOR_ID_SUN                0x108e
 | 
				
			||||||
#define PCI_DEVICE_ID_SUN_EBUS           0x1000
 | 
					#define PCI_DEVICE_ID_SUN_EBUS           0x1000
 | 
				
			||||||
 | 
					#define PCI_DEVICE_ID_SUN_SIMBA          0x5000
 | 
				
			||||||
#define PCI_DEVICE_ID_SUN_SABRE          0xa000
 | 
					#define PCI_DEVICE_ID_SUN_SABRE          0xa000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define PCI_VENDOR_ID_CMD                0x1095
 | 
					#define PCI_VENDOR_ID_CMD                0x1095
 | 
				
			||||||
@ -183,7 +184,7 @@ int pci_bus_num(PCIBus *s);
 | 
				
			|||||||
void pci_for_each_device(int bus_num, void (*fn)(PCIDevice *d));
 | 
					void pci_for_each_device(int bus_num, void (*fn)(PCIDevice *d));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void pci_info(void);
 | 
					void pci_info(void);
 | 
				
			||||||
PCIBus *pci_bridge_init(PCIBus *bus, int devfn, uint32_t id,
 | 
					PCIBus *pci_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t did,
 | 
				
			||||||
                        pci_map_irq_fn map_irq, const char *name);
 | 
					                        pci_map_irq_fn map_irq, const char *name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline void
 | 
					static inline void
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user