Changeset 664

Show
Ignore:
Timestamp:
01/10/10 19:26:34 (2 months ago)
Author:
blueswirl
Message:

Sparc64: fix Sabre properties

Signed-off-by: Blue Swirl <blauwirbel@…>

Location:
trunk/openbios-devel/drivers
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/openbios-devel/drivers/pci.c

    r648 r664  
    347347 
    348348        return 0; 
     349} 
     350 
     351int sabre_config_cb(const pci_config_t *config) 
     352{ 
     353        phandle_t dev = get_cur_dev(); 
     354        uint32_t props[28]; 
     355 
     356        props[0] = 0x00000000; 
     357        props[1] = 0x00000003; 
     358        set_property(dev, "bus-range", (char *)props, 2 * sizeof(props[0])); 
     359        props[0] = 0x000001fe; 
     360        props[1] = 0x00000000; 
     361        props[2] = 0x00000000; 
     362        props[3] = 0x00010000; 
     363        props[4] = 0x000001fe; 
     364        props[5] = 0x01000000; 
     365        props[6] = 0x00000000; 
     366        props[7] = 0x00000100; 
     367        set_property(dev, "reg", (char *)props, 8 * sizeof(props[0])); 
     368        props[0] = 0x00000000; 
     369        props[1] = 0x00000000; 
     370        props[2] = 0x00000000; 
     371        props[3] = 0x000001fe; 
     372        props[4] = 0x01000000; 
     373        props[5] = 0x00000000; 
     374        props[6] = 0x01000000; 
     375        props[7] = 0x01000000; 
     376        props[8] = 0x00000000; 
     377        props[9] = 0x00000000; 
     378        props[10] = 0x000001fe; 
     379        props[11] = 0x02000000; 
     380        props[12] = 0x00000000; 
     381        props[13] = 0x01000000; 
     382        props[14] = 0x02000000; 
     383        props[15] = 0x00000000; 
     384        props[16] = 0x00000000; 
     385        props[17] = 0x000001ff; 
     386        props[18] = 0x00000000; 
     387        props[19] = 0x00000001; 
     388        props[20] = 0x00000000; 
     389        props[21] = 0x03000000; 
     390        props[22] = 0x00000000; 
     391        props[23] = 0x00000000; 
     392        props[24] = 0x000001ff; 
     393        props[25] = 0x00000000; 
     394        props[26] = 0x00000001; 
     395        props[27] = 0x00000000; 
     396        set_property(dev, "ranges", (char *)props, 28 * sizeof(props[0])); 
     397        props[0] = 0xc0000000; 
     398        props[1] = 0x20000000; 
     399        set_property(dev, "virtual-dma", (char *)props, 2 * sizeof(props[0])); 
     400        props[0] = 1; 
     401        set_property(dev, "#virtual-dma-size-cells", (char *)props, 
     402                     sizeof(props[0])); 
     403        set_property(dev, "#virtual-dma-addr-cells", (char *)props, 
     404                     sizeof(props[0])); 
     405        return 0; 
    349406} 
    350407 
  • trunk/openbios-devel/drivers/pci_database.c

    r449 r664  
    314314        "pci", "SUNW,sabre", "pci108e,a000\0pciclass,0\0", 
    315315        3, 2, 1, 
    316         host_config_cb, NULL, 
     316        sabre_config_cb, NULL, 
    317317    }, 
    318318    { 
  • trunk/openbios-devel/drivers/pci_database.h

    r449 r664  
    3232extern int vga_config_cb(const pci_config_t *config); 
    3333extern int host_config_cb(const pci_config_t *config); 
     34extern int sabre_config_cb(const pci_config_t *config); 
    3435extern int bridge_config_cb(const pci_config_t *config); 
    3536extern int ebus_config_cb(const pci_config_t *config);