Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 68970 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/src/linux-2.6.10-rc1/arch/ppc64/kernel/pmac_feature.c (+4 lines)
Lines 347-352 static struct pmac_mb_def pmac_mb_defs[] Link Here
347
		PMAC_TYPE_POWERMAC_G5,		g5_features,
347
		PMAC_TYPE_POWERMAC_G5,		g5_features,
348
		0,
348
		0,
349
	},
349
	},
350
	{	"PowerMac8,1",			"IMac G5",
351
		PMAC_TYPE_POWERMAC_G5,		g5_features,
352
		0,
353
	},
350
	{       "RackMac3,1",                   "XServe G5",
354
	{       "RackMac3,1",                   "XServe G5",
351
		PMAC_TYPE_POWERMAC_G5,          g5_features,
355
		PMAC_TYPE_POWERMAC_G5,          g5_features,
352
		0,
356
		0,
(-)/usr/src/linux-2.6.10-rc1/arch/ppc64/kernel/pmac_pci.c (-2 / +25 lines)
Lines 40-46 Link Here
40
#endif
40
#endif
41
41
42
extern int pci_probe_only;
42
extern int pci_probe_only;
43
extern int pci_read_irq_line(struct pci_dev *pci_dev);
43
extern int pmac_pci_read_irq_line(struct pci_dev *pci_dev);
44
44
45
/* XXX Could be per-controller, but I don't think we risk anything by
45
/* XXX Could be per-controller, but I don't think we risk anything by
46
 * assuming we won't have both UniNorth and Bandit */
46
 * assuming we won't have both UniNorth and Bandit */
Lines 670-676 void __init pmac_pcibios_fixup(void) Link Here
670
	struct pci_dev *dev = NULL;
670
	struct pci_dev *dev = NULL;
671
671
672
	while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
672
	while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
673
		pci_read_irq_line(dev);
673
		pmac_pci_read_irq_line(dev);
674
674
675
	pci_fix_bus_sysdata();
675
	pci_fix_bus_sysdata();
676
676
Lines 789-791 void fixup_k2_sata(struct pci_dev* dev) Link Here
789
	}
789
	}
790
}
790
}
791
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS, 0x0240, fixup_k2_sata);
791
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS, 0x0240, fixup_k2_sata);
792
793
int pmac_pci_read_irq_line(struct pci_dev *pci_dev)
794
{
795
	u8 intpin;
796
	struct device_node *node;
797
798
	node = pci_device_to_OF_node(pci_dev);
799
	if (node == NULL)
800
		return -1;	
801
	if (node->n_intrs == 0)
802
		return -1;	
803
	pci_dev->irq = node->intrs[0].line;
804
805
	/* Update PCI configuration space only for devices which have the 
806
	 * interrupt pin defined
807
	 */
808
    	pci_read_config_byte(pci_dev, PCI_INTERRUPT_PIN, &intpin);
809
	if (intpin != 0)
810
	      pci_write_config_byte(pci_dev, PCI_INTERRUPT_LINE, pci_dev->irq);
811
812
	return 0;
813
}
814
EXPORT_SYMBOL(pmac_pci_read_irq_line);
(-)/usr/src/linux-2.6.10-rc1/drivers/ide/ppc/pmac.c (-13 / +31 lines)
Lines 91-97 enum { Link Here
91
	controller_kl_ata3,	/* KeyLargo ATA-3 */
91
	controller_kl_ata3,	/* KeyLargo ATA-3 */
92
	controller_kl_ata4,	/* KeyLargo ATA-4 */
92
	controller_kl_ata4,	/* KeyLargo ATA-4 */
93
	controller_un_ata6,	/* UniNorth2 ATA-6 */
93
	controller_un_ata6,	/* UniNorth2 ATA-6 */
94
	controller_k2_ata6	/* K2 ATA-6 */
94
	controller_k2_ata6,	/* K2 ATA-6 */
95
	controller_sh_ata6,	/* Shasta ATA-6 */
95
};
96
};
96
97
97
static const char* model_name[] = {
98
static const char* model_name[] = {
Lines 101-106 static const char* model_name[] = { Link Here
101
	"KeyLargo ATA-4",	/* KeyLargo ATA-4 (UDMA/66) */
102
	"KeyLargo ATA-4",	/* KeyLargo ATA-4 (UDMA/66) */
102
	"UniNorth ATA-6",	/* UniNorth2 ATA-6 (UDMA/100) */
103
	"UniNorth ATA-6",	/* UniNorth2 ATA-6 (UDMA/100) */
103
	"K2 ATA-6",		/* K2 ATA-6 (UDMA/100) */
104
	"K2 ATA-6",		/* K2 ATA-6 (UDMA/100) */
105
	"Shasta ATA-6",		/* Shasta ATA-6 (UDMA/133) */
104
};
106
};
105
107
106
/*
108
/*
Lines 549-555 pmac_ide_do_update_timings(ide_drive_t * Link Here
549
	if (pmif == NULL)
551
	if (pmif == NULL)
550
		return;
552
		return;
551
553
552
	if (pmif->kind == controller_un_ata6 || pmif->kind == controller_k2_ata6)
554
	if (pmif->kind == controller_sh_ata6 || pmif->kind == controller_un_ata6 || pmif->kind == controller_k2_ata6)
553
		pmac_ide_kauai_selectproc(drive);
555
		pmac_ide_kauai_selectproc(drive);
554
	else
556
	else
555
		pmac_ide_selectproc(drive);
557
		pmac_ide_selectproc(drive);
Lines 667-672 pmac_ide_tuneproc(ide_drive_t *drive, u8 Link Here
667
	pio = ide_get_best_pio_mode(drive, pio, 4, &d);
669
	pio = ide_get_best_pio_mode(drive, pio, 4, &d);
668
670
669
	switch (pmif->kind) {
671
	switch (pmif->kind) {
672
	case controller_sh_ata6:
673
	        /* XXX: 133Mhz cell may use other timings ? */ 
670
	case controller_un_ata6:
674
	case controller_un_ata6:
671
	case controller_k2_ata6: {
675
	case controller_k2_ata6: {
672
		/* 100Mhz cell */
676
		/* 100Mhz cell */
Lines 805-810 set_timings_mdma(ide_drive_t *drive, int Link Here
805
		cycleTime = 150;
809
		cycleTime = 150;
806
	/* Get the proper timing array for this controller */
810
	/* Get the proper timing array for this controller */
807
	switch(intf_type) {
811
	switch(intf_type) {
812
	        case controller_sh_ata6:
808
		case controller_un_ata6:
813
		case controller_un_ata6:
809
		case controller_k2_ata6:
814
		case controller_k2_ata6:
810
			break;
815
			break;
Lines 838-843 set_timings_mdma(ide_drive_t *drive, int Link Here
838
#endif
843
#endif
839
	}
844
	}
840
	switch(intf_type) {
845
	switch(intf_type) {
846
	case controller_sh_ata6:
841
	case controller_un_ata6:
847
	case controller_un_ata6:
842
	case controller_k2_ata6: {
848
	case controller_k2_ata6: {
843
		/* 100Mhz cell */
849
		/* 100Mhz cell */
Lines 934-940 pmac_ide_tune_chipset (ide_drive_t *driv Link Here
934
#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
940
#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
935
		case XFER_UDMA_5:
941
		case XFER_UDMA_5:
936
			if (pmif->kind != controller_un_ata6 &&
942
			if (pmif->kind != controller_un_ata6 &&
937
			    pmif->kind != controller_k2_ata6)
943
			    pmif->kind != controller_k2_ata6 &&
944
			    pmif->kind != controller_sh_ata6)
938
				return 1;
945
				return 1;
939
		case XFER_UDMA_4:
946
		case XFER_UDMA_4:
940
		case XFER_UDMA_3:
947
		case XFER_UDMA_3:
Lines 946-952 pmac_ide_tune_chipset (ide_drive_t *driv Link Here
946
			if (pmif->kind == controller_kl_ata4)
953
			if (pmif->kind == controller_kl_ata4)
947
				ret = set_timings_udma_ata4(timings, speed);
954
				ret = set_timings_udma_ata4(timings, speed);
948
			else if (pmif->kind == controller_un_ata6
955
			else if (pmif->kind == controller_un_ata6
949
				 || pmif->kind == controller_k2_ata6)
956
				 || pmif->kind == controller_k2_ata6
957
				 || pmif->kind == controller_sh_ata6)
950
				ret = set_timings_udma_ata6(timings, timings2, speed);
958
				ret = set_timings_udma_ata6(timings, timings2, speed);
951
			else
959
			else
952
				ret = 1;		
960
				ret = 1;		
Lines 996-1001 sanitize_timings(pmac_ide_hwif_t *pmif) Link Here
996
	switch(pmif->kind) {
1004
	switch(pmif->kind) {
997
		case controller_un_ata6:
1005
		case controller_un_ata6:
998
		case controller_k2_ata6:
1006
		case controller_k2_ata6:
1007
		case controller_sh_ata6:
999
			value = 0x08618a92;
1008
			value = 0x08618a92;
1000
			value2 = 0x00002921;
1009
			value2 = 0x00002921;
1001
			break;
1010
			break;
Lines 1144-1149 pmac_ide_setup_device(pmac_ide_hwif_t *p Link Here
1144
1153
1145
	pmif->cable_80 = 0;
1154
	pmif->cable_80 = 0;
1146
	pmif->broken_dma = pmif->broken_dma_warn = 0;
1155
	pmif->broken_dma = pmif->broken_dma_warn = 0;
1156
	if (device_is_compatible(np, "shasta-ata"))
1157
		pmif->kind = controller_sh_ata6;
1147
	if (device_is_compatible(np, "kauai-ata"))
1158
	if (device_is_compatible(np, "kauai-ata"))
1148
		pmif->kind = controller_un_ata6;
1159
		pmif->kind = controller_un_ata6;
1149
	else if (device_is_compatible(np, "K2-UATA"))
1160
	else if (device_is_compatible(np, "K2-UATA"))
Lines 1165-1171 pmac_ide_setup_device(pmac_ide_hwif_t *p Link Here
1165
1176
1166
	/* Get cable type from device-tree */
1177
	/* Get cable type from device-tree */
1167
	if (pmif->kind == controller_kl_ata4 || pmif->kind == controller_un_ata6
1178
	if (pmif->kind == controller_kl_ata4 || pmif->kind == controller_un_ata6
1168
	    || pmif->kind == controller_k2_ata6) {
1179
	    || pmif->kind == controller_k2_ata6
1180
	    || pmif->kind == controller_sh_ata6) {
1169
		char* cable = get_property(np, "cable-type", NULL);
1181
		char* cable = get_property(np, "cable-type", NULL);
1170
		if (cable && !strncmp(cable, "80-", 3))
1182
		if (cable && !strncmp(cable, "80-", 3))
1171
			pmif->cable_80 = 1;
1183
			pmif->cable_80 = 1;
Lines 1219-1225 pmac_ide_setup_device(pmac_ide_hwif_t *p Link Here
1219
	hwif->drives[0].unmask = 1;
1231
	hwif->drives[0].unmask = 1;
1220
	hwif->drives[1].unmask = 1;
1232
	hwif->drives[1].unmask = 1;
1221
	hwif->tuneproc = pmac_ide_tuneproc;
1233
	hwif->tuneproc = pmac_ide_tuneproc;
1222
	if (pmif->kind == controller_un_ata6 || pmif->kind == controller_k2_ata6)
1234
	if (pmif->kind == controller_un_ata6
1235
	    || pmif->kind == controller_k2_ata6
1236
	    || pmif->kind == controller_sh_ata6)
1223
		hwif->selectproc = pmac_ide_kauai_selectproc;
1237
		hwif->selectproc = pmac_ide_kauai_selectproc;
1224
	else
1238
	else
1225
		hwif->selectproc = pmac_ide_selectproc;
1239
		hwif->selectproc = pmac_ide_selectproc;
Lines 1444-1454 pmac_ide_pci_attach(struct pci_dev *pdev Link Here
1444
	pmif->dma_regs = base + 0x1000;
1458
	pmif->dma_regs = base + 0x1000;
1445
#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */	
1459
#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */	
1446
1460
1447
	/* We use the OF node irq mapping */
1448
	if (np->n_intrs == 0)
1449
		pmif->irq = pdev->irq;
1461
		pmif->irq = pdev->irq;
1450
	else
1451
		pmif->irq = np->intrs[0].line;
1452
1462
1453
	pci_set_drvdata(pdev, hwif);
1463
	pci_set_drvdata(pdev, hwif);
1454
1464
Lines 1532-1537 static struct pci_device_id pmac_ide_pci Link Here
1532
	{ PCI_VENDOR_ID_APPLE, PCI_DEVIEC_ID_APPLE_UNI_N_ATA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
1542
	{ PCI_VENDOR_ID_APPLE, PCI_DEVIEC_ID_APPLE_UNI_N_ATA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
1533
	{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_IPID_ATA100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
1543
	{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_IPID_ATA100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
1534
	{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_K2_ATA100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
1544
	{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_K2_ATA100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
1545
	{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_SH_ATA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
1535
};
1546
};
1536
1547
1537
static struct pci_driver pmac_ide_pci_driver = {
1548
static struct pci_driver pmac_ide_pci_driver = {
Lines 1792-1798 pmac_ide_udma_enable(ide_drive_t *drive, Link Here
1792
	timing_local[1] = *timings2;
1803
	timing_local[1] = *timings2;
1793
	
1804
	
1794
	/* Calculate timings for interface */
1805
	/* Calculate timings for interface */
1795
	if (pmif->kind == controller_un_ata6 || pmif->kind == controller_k2_ata6)
1806
	if (pmif->kind == controller_un_ata6
1807
	    || pmif->kind == controller_k2_ata6
1808
	    || pmif->kind == controller_sh_ata6)
1796
		ret = set_timings_udma_ata6(	&timing_local[0],
1809
		ret = set_timings_udma_ata6(	&timing_local[0],
1797
						&timing_local[1],
1810
						&timing_local[1],
1798
						mode);
1811
						mode);
Lines 1847-1859 pmac_ide_dma_check(ide_drive_t *drive) Link Here
1847
		
1860
		
1848
		map = XFER_MWDMA;
1861
		map = XFER_MWDMA;
1849
		if (pmif->kind == controller_kl_ata4 || pmif->kind == controller_un_ata6
1862
		if (pmif->kind == controller_kl_ata4 || pmif->kind == controller_un_ata6
1850
		    || pmif->kind == controller_k2_ata6) {
1863
		    || pmif->kind == controller_k2_ata6
1864
		    || pmif->kind == controller_sh_ata6) {
1851
			map |= XFER_UDMA;
1865
			map |= XFER_UDMA;
1852
			if (pmif->cable_80) {
1866
			if (pmif->cable_80) {
1853
				map |= XFER_UDMA_66;
1867
				map |= XFER_UDMA_66;
1854
				if (pmif->kind == controller_un_ata6 ||
1868
				if (pmif->kind == controller_un_ata6 ||
1855
				    pmif->kind == controller_k2_ata6)
1869
				    pmif->kind == controller_k2_ata6 ||
1870
				    pmif->kind == controller_sh_ata6)
1856
					map |= XFER_UDMA_100;
1871
					map |= XFER_UDMA_100;
1872
				if (pmif->kind == controller_sh_ata6)
1873
					map |= XFER_UDMA_133;
1857
			}
1874
			}
1858
		}
1875
		}
1859
		mode = ide_find_best_mode(drive, map);
1876
		mode = ide_find_best_mode(drive, map);
Lines 2093-2098 pmac_ide_setup_dma(pmac_ide_hwif_t *pmif Link Here
2093
	switch(pmif->kind) {
2110
	switch(pmif->kind) {
2094
		case controller_un_ata6:
2111
		case controller_un_ata6:
2095
		case controller_k2_ata6:
2112
		case controller_k2_ata6:
2113
		case controller_sh_ata6:
2096
			hwif->ultra_mask = pmif->cable_80 ? 0x3f : 0x07;
2114
			hwif->ultra_mask = pmif->cable_80 ? 0x3f : 0x07;
2097
			hwif->mwdma_mask = 0x07;
2115
			hwif->mwdma_mask = 0x07;
2098
			hwif->swdma_mask = 0x00;
2116
			hwif->swdma_mask = 0x00;
(-)/usr/src/linux-2.6.10-rc1/drivers/net/sungem.c (+2 lines)
Lines 109-114 static struct pci_device_id gem_pci_tbl[ Link Here
109
	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
109
	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
110
	{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_K2_GMAC,
110
	{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_K2_GMAC,
111
	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
111
	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
112
       { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_SH_SUNGEM,
113
          PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
112
	{0, }
114
	{0, }
113
};
115
};
114
116
(-)/usr/src/linux-2.6.10-rc1/drivers/pci/pci.ids (+8 lines)
Lines 2189-2194 Link Here
2189
	0049  K2 HT-PCI Bridge
2189
	0049  K2 HT-PCI Bridge
2190
	004b  U3 AGP
2190
	004b  U3 AGP
2191
	004c  K2 GMAC (Sun GEM)
2191
	004c  K2 GMAC (Sun GEM)
2192
	004f  Shasta Mac I/O
2193
	0050  Shasta IDE
2194
	0051  Shasta (Sun GEM)
2195
	0052  Shasta FireWire
2196
	0053  Shasta PCI Bridge
2197
	0054  Shasta PCI Bridge
2198
	0055  Shasta PCI Bridge
2199
	0058  U3L AGP Bridge
2192
	1645  Tigon3 Gigabit Ethernet NIC (BCM5701)
2200
	1645  Tigon3 Gigabit Ethernet NIC (BCM5701)
2193
106c  Hyundai Electronics America
2201
106c  Hyundai Electronics America
2194
	8801  Dual Pentium ISA/PCI Motherboard
2202
	8801  Dual Pentium ISA/PCI Motherboard
(-)/usr/src/linux-2.6.10-rc1/drivers/scsi/libata-core.c (+3 lines)
Lines 3250-3255 int ata_device_add(struct ata_probe_ent Link Here
3250
	host_set->mmio_base = ent->mmio_base;
3249
	host_set->mmio_base = ent->mmio_base;
3251
	host_set->private_data = ent->private_data;
3250
	host_set->private_data = ent->private_data;
3252
	host_set->ops = ent->port_ops;
3251
	host_set->ops = ent->port_ops;
3252
        if (host_set->ops->host_start)
3253
                host_set->ops->host_start(host_set);
3254
 
3253
3255
3254
	/* register each port bound to this device */
3256
	/* register each port bound to this device */
3255
	for (i = 0; i < ent->n_ports; i++) {
3257
	for (i = 0; i < ent->n_ports; i++) {
(-)/usr/src/linux-2.6.10-rc1/drivers/scsi/sata_svw.c (-2 / +100 lines)
Lines 49-55 Link Here
49
#endif /* CONFIG_PPC_OF */
49
#endif /* CONFIG_PPC_OF */
50
50
51
#define DRV_NAME	"sata_svw"
51
#define DRV_NAME	"sata_svw"
52
#define DRV_VERSION	"1.04"
52
#define DRV_VERSION	"1.05"
53
53
54
/* Taskfile registers offsets */
54
/* Taskfile registers offsets */
55
#define K2_SATA_TF_CMD_OFFSET		0x00
55
#define K2_SATA_TF_CMD_OFFSET		0x00
Lines 75-84 Link Here
75
#define K2_SATA_SICR1_OFFSET		0x80
75
#define K2_SATA_SICR1_OFFSET		0x80
76
#define K2_SATA_SICR2_OFFSET		0x84
76
#define K2_SATA_SICR2_OFFSET		0x84
77
#define K2_SATA_SIM_OFFSET		0x88
77
#define K2_SATA_SIM_OFFSET		0x88
78
#define K2_SATA_MDIO_ACCESS             0x8c
78
79
79
/* Port stride */
80
/* Port stride */
80
#define K2_SATA_PORT_OFFSET		0x100
81
#define K2_SATA_PORT_OFFSET		0x100
81
82
83
/* Private structure */
84
struct k2_sata_priv
85
{
86
#ifdef CONFIG_PPC_OF
87
       struct device_node *of_node;
88
#endif
89
       int need_mdio_phy_reset;
90
};
82
91
83
static u32 k2_sata_scr_read (struct ata_port *ap, unsigned int sc_reg)
92
static u32 k2_sata_scr_read (struct ata_port *ap, unsigned int sc_reg)
84
{
93
{
Lines 96-101 static void k2_sata_scr_write (struct at Link Here
96
	writel(val, (void *) ap->ioaddr.scr_addr + (sc_reg * 4));
105
	writel(val, (void *) ap->ioaddr.scr_addr + (sc_reg * 4));
97
}
106
}
98
107
108
static u16 k2_sata_mdio_read(struct ata_host_set *host_set, int reg)
109
{
110
       u16 val;
111
       int timeout;
112
113
       writel((reg & 0x1f) | 0x4000,
114
              host_set->mmio_base + K2_SATA_MDIO_ACCESS);
115
       for(timeout = 10000; timeout > 0; timeout++) {
116
               val = readl(host_set->mmio_base + K2_SATA_MDIO_ACCESS);
117
               if (val & 0x8000)
118
                       break;
119
               udelay(100);
120
       }
121
       if (timeout <= 0) {
122
               printk(KERN_WARNING "sata_svw: timeout reading MDIO reg %d\n", reg);
123
               return 0xffff;
124
       }
125
       return val >> 16;
126
}
127
128
static void k2_sata_mdio_write(struct ata_host_set *host_set, int reg, u16 val)
129
{
130
       int timeout;
131
132
       writel((reg & 0x1f) | (((u32)val) << 16) | 0x2000,
133
              host_set->mmio_base + K2_SATA_MDIO_ACCESS);
134
       for(timeout = 10000; timeout > 0; timeout++) {
135
               val = readl(host_set->mmio_base + K2_SATA_MDIO_ACCESS);
136
               if (val & 0x8000)
137
                       break;
138
               udelay(100);
139
       }
140
       if (timeout <= 0)
141
               printk(KERN_WARNING "sata_svw: timeout writing MDIO reg %d\n", reg);
142
}
99
143
100
static void k2_sata_tf_load(struct ata_port *ap, struct ata_taskfile *tf)
144
static void k2_sata_tf_load(struct ata_port *ap, struct ata_taskfile *tf)
101
{
145
{
Lines 220-225 static u8 k2_stat_check_status(struct at Link Here
220
       	return readl((void *) ap->ioaddr.status_addr);
264
       	return readl((void *) ap->ioaddr.status_addr);
221
}
265
}
222
266
267
static void k2_sata_mdio_phy_reset(struct ata_host_set *host_set)
268
{
269
       u16 reg;
270
271
       reg = k2_sata_mdio_read(host_set, 4);
272
       k2_sata_mdio_write(host_set, 4, reg | 0x0008);
273
       udelay(200);
274
       k2_sata_mdio_write(host_set, 4, reg);
275
       udelay(250);
276
}
277
278
static void k2_sata_host_start(struct ata_host_set *host_set)
279
{
280
       struct k2_sata_priv *pp;
281
282
       pp = host_set->private_data;
283
284
       /* Some cell revs need a HW reset of the PHY layer at this point, and
285
        * on wakeup from power management
286
        */
287
       if (pp->need_mdio_phy_reset)
288
               k2_sata_mdio_phy_reset(host_set);
289
}
290
291
223
#ifdef CONFIG_PPC_OF
292
#ifdef CONFIG_PPC_OF
224
/*
293
/*
225
 * k2_sata_proc_info
294
 * k2_sata_proc_info
Lines 237-242 static int k2_sata_proc_info(struct Scsi Link Here
237
{
306
{
238
	struct ata_port *ap;
307
	struct ata_port *ap;
239
	struct device_node *np;
308
	struct device_node *np;
309
        struct k2_sata_priv *pp;
240
	int len, index;
310
	int len, index;
241
311
242
	/* Find  the ata_port */
312
	/* Find  the ata_port */
Lines 245-251 static int k2_sata_proc_info(struct Scsi Link Here
245
		return 0;
315
		return 0;
246
316
247
	/* Find the OF node for the PCI device proper */
317
	/* Find the OF node for the PCI device proper */
248
	np = pci_device_to_OF_node(ap->host_set->pdev);
318
        pp = ap->host_set->private_data;
319
        np = pp->of_node;
249
	if (np == NULL)
320
	if (np == NULL)
250
		return 0;
321
		return 0;
251
322
Lines 310-315 static struct ata_port_operations k2_sat Link Here
310
	.scr_write		= k2_sata_scr_write,
381
	.scr_write		= k2_sata_scr_write,
311
	.port_start		= ata_port_start,
382
	.port_start		= ata_port_start,
312
	.port_stop		= ata_port_stop,
383
	.port_stop		= ata_port_stop,
384
        .host_start             = k2_sata_host_start,
313
};
385
};
314
386
315
static void k2_sata_setup_port(struct ata_ioports *port, unsigned long base)
387
static void k2_sata_setup_port(struct ata_ioports *port, unsigned long base)
Lines 338-343 static int k2_sata_init_one (struct pci_ Link Here
338
	struct ata_probe_ent *probe_ent = NULL;
410
	struct ata_probe_ent *probe_ent = NULL;
339
	unsigned long base;
411
	unsigned long base;
340
	void *mmio_base;
412
	void *mmio_base;
413
        struct k2_sata_priv *pp = NULL;
341
	int rc;
414
	int rc;
342
415
343
	if (!printed_version++)
416
	if (!printed_version++)
Lines 376-384 static int k2_sata_init_one (struct pci_ Link Here
376
	}
449
	}
377
450
378
	memset(probe_ent, 0, sizeof(*probe_ent));
451
	memset(probe_ent, 0, sizeof(*probe_ent));
452
453
	pp = (struct k2_sata_priv *)kmalloc(sizeof(struct k2_sata_priv), GFP_KERNEL);
454
        if (pp == NULL) {
455
                rc = -ENOMEM;
456
                goto err_out_free_ent;
457
        }
458
        memset(pp, 0, sizeof(struct k2_sata_priv));
459
 
379
	probe_ent->pdev = pdev;
460
	probe_ent->pdev = pdev;
380
	INIT_LIST_HEAD(&probe_ent->node);
461
	INIT_LIST_HEAD(&probe_ent->node);
381
462
463
        probe_ent->private_data = pdev;
464
 
465
#ifdef CONFIG_PPC_OF
466
        /* Find the OF node for the PCI device proper */
467
        pp->of_node = pci_device_to_OF_node(pdev);
468
 
469
        /* Check for revision 1 */
470
        if (pp->of_node) {
471
                u32 *rev;
472
                rev = (u32 *)get_property(pp->of_node, "cell-revision", NULL);
473
                if (rev && (*rev) > 0)
474
                        pp->need_mdio_phy_reset = 1;
475
        }
476
#endif /* CONFIG_PPC_OF */
382
	mmio_base = ioremap(pci_resource_start(pdev, 5),
477
	mmio_base = ioremap(pci_resource_start(pdev, 5),
383
		            pci_resource_len(pdev, 5));
478
		            pci_resource_len(pdev, 5));
384
	if (mmio_base == NULL) {
479
	if (mmio_base == NULL) {
Lines 429-434 static int k2_sata_init_one (struct pci_ Link Here
429
	return 0;
530
	return 0;
430
531
431
err_out_free_ent:
532
err_out_free_ent:
533
        if (pp)
534
                kfree(pp);
535
        if (probe_ent)
432
	kfree(probe_ent);
536
	kfree(probe_ent);
433
err_out_regions:
537
err_out_regions:
434
	pci_release_regions(pdev);
538
	pci_release_regions(pdev);
(-)/usr/src/linux-2.6.10-rc1/drivers/video/modedb.c (+4 lines)
Lines 248-253 static const __init struct fb_videomode Link Here
248
	/* 480x300 @ 72 Hz, 48.0 kHz hsync */
248
	/* 480x300 @ 72 Hz, 48.0 kHz hsync */
249
	NULL, 72, 480, 300, 33386, 40, 24, 11, 19, 80, 3,
249
	NULL, 72, 480, 300, 33386, 40, 24, 11, 19, 80, 3,
250
	0, FB_VMODE_DOUBLE
250
	0, FB_VMODE_DOUBLE
251
    }, {
252
	/* 1440x900 @ 72 Hz, 67.6 kHz hsync */
253
	NULL, 72, 1440, 900, 10000, 16, 16, 16, 16, 80, 8,
254
	0, FB_VMODE_NONINTERLACED
251
    },
255
    },
252
};
256
};
253
257
(-)/usr/src/linux-2.6.10-rc1/drivers/video/riva/fbdev.c (+2 lines)
Lines 192-197 static struct pci_device_id rivafb_pci_t Link Here
192
	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
192
	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
193
	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL,
193
	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL,
194
	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
194
	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
195
	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_FX_GO5200,
196
	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
195
	{ 0, } /* terminate list */
197
	{ 0, } /* terminate list */
196
};
198
};
197
MODULE_DEVICE_TABLE(pci, rivafb_pci_tbl);
199
MODULE_DEVICE_TABLE(pci, rivafb_pci_tbl);
(-)/usr/src/linux-2.6.10-rc1/include/linux/libata.h (+1 lines)
Lines 349-354 struct ata_port_operations { Link Here
349
	int (*port_start) (struct ata_port *ap);
349
	int (*port_start) (struct ata_port *ap);
350
	void (*port_stop) (struct ata_port *ap);
350
	void (*port_stop) (struct ata_port *ap);
351
351
352
        void (*host_start) (struct ata_host_set *host_set);
352
	void (*host_stop) (struct ata_host_set *host_set);
353
	void (*host_stop) (struct ata_host_set *host_set);
353
};
354
};
354
355
(-)/usr/src/linux-2.6.10-rc1/include/linux/pci_ids.h (+4 lines)
Lines 844-849 Link Here
844
#define PCI_DEVICE_ID_APPLE_KEYLARGO_I	0x003e
844
#define PCI_DEVICE_ID_APPLE_KEYLARGO_I	0x003e
845
#define PCI_DEVICE_ID_APPLE_K2_ATA100	0x0043
845
#define PCI_DEVICE_ID_APPLE_K2_ATA100	0x0043
846
#define PCI_DEVICE_ID_APPLE_K2_GMAC	0x004c
846
#define PCI_DEVICE_ID_APPLE_K2_GMAC	0x004c
847
#define PCI_DEVICE_ID_APPLE_SH_ATA      0x0050
848
#define PCI_DEVICE_ID_APPLE_SH_SUNGEM   0x0051
849
#define PCI_DEVICE_ID_APPLE_SH_FW       0x0052
847
#define PCI_DEVICE_ID_APPLE_TIGON3	0x1645
850
#define PCI_DEVICE_ID_APPLE_TIGON3	0x1645
848
851
849
#define PCI_VENDOR_ID_YAMAHA		0x1073
852
#define PCI_VENDOR_ID_YAMAHA		0x1073
Lines 1139-1144 Link Here
1139
#define PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL	0x0258
1142
#define PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL	0x0258
1140
#define PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL	0x0259
1143
#define PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL	0x0259
1141
#define PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL	0x025B
1144
#define PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL	0x025B
1145
#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_FX_GO5200 0x0329
1142
1146
1143
#define PCI_VENDOR_ID_IMS		0x10e0
1147
#define PCI_VENDOR_ID_IMS		0x10e0
1144
#define PCI_DEVICE_ID_IMS_8849		0x8849
1148
#define PCI_DEVICE_ID_IMS_8849		0x8849

Return to bug 68970