j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: blueswirl Date: 2010-01-10 19:26:34 +0100 (Sun, 10 Jan 2010) New Revision: 664
Modified: trunk/openbios-devel/drivers/pci.c trunk/openbios-devel/drivers/pci_database.c trunk/openbios-devel/drivers/pci_database.h Log: Sparc64: fix Sabre properties
Signed-off-by: Blue Swirl blauwirbel@gmail.com
Modified: trunk/openbios-devel/drivers/pci.c =================================================================== --- trunk/openbios-devel/drivers/pci.c 2010-01-09 21:28:28 UTC (rev 663) +++ trunk/openbios-devel/drivers/pci.c 2010-01-10 18:26:34 UTC (rev 664) @@ -348,6 +348,63 @@ return 0; }
+int sabre_config_cb(const pci_config_t *config) +{ + phandle_t dev = get_cur_dev(); + uint32_t props[28]; + + props[0] = 0x00000000; + props[1] = 0x00000003; + set_property(dev, "bus-range", (char *)props, 2 * sizeof(props[0])); + props[0] = 0x000001fe; + props[1] = 0x00000000; + props[2] = 0x00000000; + props[3] = 0x00010000; + props[4] = 0x000001fe; + props[5] = 0x01000000; + props[6] = 0x00000000; + props[7] = 0x00000100; + set_property(dev, "reg", (char *)props, 8 * sizeof(props[0])); + props[0] = 0x00000000; + props[1] = 0x00000000; + props[2] = 0x00000000; + props[3] = 0x000001fe; + props[4] = 0x01000000; + props[5] = 0x00000000; + props[6] = 0x01000000; + props[7] = 0x01000000; + props[8] = 0x00000000; + props[9] = 0x00000000; + props[10] = 0x000001fe; + props[11] = 0x02000000; + props[12] = 0x00000000; + props[13] = 0x01000000; + props[14] = 0x02000000; + props[15] = 0x00000000; + props[16] = 0x00000000; + props[17] = 0x000001ff; + props[18] = 0x00000000; + props[19] = 0x00000001; + props[20] = 0x00000000; + props[21] = 0x03000000; + props[22] = 0x00000000; + props[23] = 0x00000000; + props[24] = 0x000001ff; + props[25] = 0x00000000; + props[26] = 0x00000001; + props[27] = 0x00000000; + set_property(dev, "ranges", (char *)props, 28 * sizeof(props[0])); + props[0] = 0xc0000000; + props[1] = 0x20000000; + set_property(dev, "virtual-dma", (char *)props, 2 * sizeof(props[0])); + props[0] = 1; + set_property(dev, "#virtual-dma-size-cells", (char *)props, + sizeof(props[0])); + set_property(dev, "#virtual-dma-addr-cells", (char *)props, + sizeof(props[0])); + return 0; +} + int bridge_config_cb(const pci_config_t *config) { phandle_t aliases;
Modified: trunk/openbios-devel/drivers/pci_database.c =================================================================== --- trunk/openbios-devel/drivers/pci_database.c 2010-01-09 21:28:28 UTC (rev 663) +++ trunk/openbios-devel/drivers/pci_database.c 2010-01-10 18:26:34 UTC (rev 664) @@ -313,7 +313,7 @@ PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_SABRE, NULL, "pci", "SUNW,sabre", "pci108e,a000\0pciclass,0\0", 3, 2, 1, - host_config_cb, NULL, + sabre_config_cb, NULL, }, { 0xFFFF, 0xFFFF,
Modified: trunk/openbios-devel/drivers/pci_database.h =================================================================== --- trunk/openbios-devel/drivers/pci_database.h 2010-01-09 21:28:28 UTC (rev 663) +++ trunk/openbios-devel/drivers/pci_database.h 2010-01-10 18:26:34 UTC (rev 664) @@ -31,6 +31,7 @@ extern int macio_keylargo_config_cb(const pci_config_t *config); extern int vga_config_cb(const pci_config_t *config); extern int host_config_cb(const pci_config_t *config); +extern int sabre_config_cb(const pci_config_t *config); extern int bridge_config_cb(const pci_config_t *config); extern int ebus_config_cb(const pci_config_t *config);