Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 43741 Details for
Bug 68970
livecd freeze on a new Imac G5
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch against 2.6.10-rc1 kernel to get Linux boot the Imac G5
linux-2.6.10-rc1.diff (text/plain), 11.71 KB, created by
Jocelyn Mayer
on 2004-11-11 14:04:51 UTC
(
hide
)
Description:
Patch against 2.6.10-rc1 kernel to get Linux boot the Imac G5
Filename:
MIME Type:
Creator:
Jocelyn Mayer
Created:
2004-11-11 14:04:51 UTC
Size:
11.71 KB
patch
obsolete
>diff -urpBbN --exclude='*.orig' --exclude='*.diff' --exclude='*.rej' --exclude='*~' /usr/src/linux-2.6.10-rc1/arch/ppc64/kernel/pmac_feature.c linux-2.6.10-rc1/arch/ppc64/kernel/pmac_feature.c >--- /usr/src/linux-2.6.10-rc1/arch/ppc64/kernel/pmac_feature.c 2004-11-09 06:38:44.000000000 +0100 >+++ linux-2.6.10-rc1/arch/ppc64/kernel/pmac_feature.c 2004-11-11 12:50:58.000000000 +0100 >@@ -347,6 +347,10 @@ static struct pmac_mb_def pmac_mb_defs[] > PMAC_TYPE_POWERMAC_G5, g5_features, > 0, > }, >+ { "PowerMac8,1", "IMac G5", >+ PMAC_TYPE_POWERMAC_G5, g5_features, >+ 0, >+ }, > { "RackMac3,1", "XServe G5", > PMAC_TYPE_POWERMAC_G5, g5_features, > 0, >diff -urpBbN --exclude='*.orig' --exclude='*.diff' --exclude='*.rej' --exclude='*~' /usr/src/linux-2.6.10-rc1/drivers/ide/ppc/pmac.c linux-2.6.10-rc1/drivers/ide/ppc/pmac.c >--- /usr/src/linux-2.6.10-rc1/drivers/ide/ppc/pmac.c 2004-11-09 06:38:44.000000000 +0100 >+++ linux-2.6.10-rc1/drivers/ide/ppc/pmac.c 2004-11-11 12:50:58.000000000 +0100 >@@ -1532,6 +1532,7 @@ static struct pci_device_id pmac_ide_pci > { PCI_VENDOR_ID_APPLE, PCI_DEVIEC_ID_APPLE_UNI_N_ATA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, > { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_IPID_ATA100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, > { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_K2_ATA100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, >+ { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_SH_ATA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, > }; > > static struct pci_driver pmac_ide_pci_driver = { >diff -urpBbN --exclude='*.orig' --exclude='*.diff' --exclude='*.rej' --exclude='*~' /usr/src/linux-2.6.10-rc1/drivers/net/sungem.c linux-2.6.10-rc1/drivers/net/sungem.c >--- /usr/src/linux-2.6.10-rc1/drivers/net/sungem.c 2004-11-09 06:38:44.000000000 +0100 >+++ linux-2.6.10-rc1/drivers/net/sungem.c 2004-11-11 18:25:37.753987080 +0100 >@@ -109,6 +109,8 @@ static struct pci_device_id gem_pci_tbl[ > PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, > { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_K2_GMAC, > PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, >+ { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_SH_SUNGEM, >+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, > {0, } > }; > >diff -urpBbN --exclude='*.orig' --exclude='*.diff' --exclude='*.rej' --exclude='*~' /usr/src/linux-2.6.10-rc1/drivers/pci/pci.ids linux-2.6.10-rc1/drivers/pci/pci.ids >--- /usr/src/linux-2.6.10-rc1/drivers/pci/pci.ids 2004-11-09 06:38:44.000000000 +0100 >+++ linux-2.6.10-rc1/drivers/pci/pci.ids 2004-11-11 12:50:58.000000000 +0100 >@@ -2189,6 +2189,14 @@ > 0049 K2 HT-PCI Bridge > 004b U3 AGP > 004c K2 GMAC (Sun GEM) >+ 004f Shasta Mac I/O >+ 0050 Shasta IDE >+ 0051 Shasta (Sun GEM) >+ 0052 Shasta FireWire >+ 0053 Shasta PCI Bridge >+ 0054 Shasta PCI Bridge >+ 0055 Shasta PCI Bridge >+ 0058 U3L AGP Bridge > 1645 Tigon3 Gigabit Ethernet NIC (BCM5701) > 106c Hyundai Electronics America > 8801 Dual Pentium ISA/PCI Motherboard >diff -urpBbN --exclude='*.orig' --exclude='*.diff' --exclude='*.rej' --exclude='*~' /usr/src/linux-2.6.10-rc1/drivers/scsi/libata-core.c linux-2.6.10-rc1/drivers/scsi/libata-core.c >--- /usr/src/linux-2.6.10-rc1/drivers/scsi/libata-core.c 2004-11-09 06:38:44.000000000 +0100 >+++ linux-2.6.10-rc1/drivers/scsi/libata-core.c 2004-11-11 18:17:41.000000000 +0100 >@@ -3250,6 +3249,9 @@ int ata_device_add(struct ata_probe_ent > host_set->mmio_base = ent->mmio_base; > host_set->private_data = ent->private_data; > host_set->ops = ent->port_ops; >+ if (host_set->ops->host_start) >+ host_set->ops->host_start(host_set); >+ > > /* register each port bound to this device */ > for (i = 0; i < ent->n_ports; i++) { >diff -urpBbN --exclude='*.orig' --exclude='*.diff' --exclude='*.rej' --exclude='*~' /usr/src/linux-2.6.10-rc1/drivers/scsi/sata_svw.c linux-2.6.10-rc1/drivers/scsi/sata_svw.c >--- /usr/src/linux-2.6.10-rc1/drivers/scsi/sata_svw.c 2004-11-09 06:38:44.000000000 +0100 >+++ linux-2.6.10-rc1/drivers/scsi/sata_svw.c 2004-11-11 18:18:28.000000000 +0100 >@@ -49,7 +49,7 @@ > #endif /* CONFIG_PPC_OF */ > > #define DRV_NAME "sata_svw" >-#define DRV_VERSION "1.04" >+#define DRV_VERSION "1.05" > > /* Taskfile registers offsets */ > #define K2_SATA_TF_CMD_OFFSET 0x00 >@@ -75,10 +75,19 @@ > #define K2_SATA_SICR1_OFFSET 0x80 > #define K2_SATA_SICR2_OFFSET 0x84 > #define K2_SATA_SIM_OFFSET 0x88 >+#define K2_SATA_MDIO_ACCESS 0x8c > > /* Port stride */ > #define K2_SATA_PORT_OFFSET 0x100 > >+/* Private structure */ >+struct k2_sata_priv >+{ >+#ifdef CONFIG_PPC_OF >+ struct device_node *of_node; >+#endif >+ int need_mdio_phy_reset; >+}; > > static u32 k2_sata_scr_read (struct ata_port *ap, unsigned int sc_reg) > { >@@ -96,6 +105,41 @@ static void k2_sata_scr_write (struct at > writel(val, (void *) ap->ioaddr.scr_addr + (sc_reg * 4)); > } > >+static u16 k2_sata_mdio_read(struct ata_host_set *host_set, int reg) >+{ >+ u16 val; >+ int timeout; >+ >+ writel((reg & 0x1f) | 0x4000, >+ host_set->mmio_base + K2_SATA_MDIO_ACCESS); >+ for(timeout = 10000; timeout > 0; timeout++) { >+ val = readl(host_set->mmio_base + K2_SATA_MDIO_ACCESS); >+ if (val & 0x8000) >+ break; >+ udelay(100); >+ } >+ if (timeout <= 0) { >+ printk(KERN_WARNING "sata_svw: timeout reading MDIO reg %d\n", reg); >+ return 0xffff; >+ } >+ return val >> 16; >+} >+ >+static void k2_sata_mdio_write(struct ata_host_set *host_set, int reg, u16 val) >+{ >+ int timeout; >+ >+ writel((reg & 0x1f) | (((u32)val) << 16) | 0x2000, >+ host_set->mmio_base + K2_SATA_MDIO_ACCESS); >+ for(timeout = 10000; timeout > 0; timeout++) { >+ val = readl(host_set->mmio_base + K2_SATA_MDIO_ACCESS); >+ if (val & 0x8000) >+ break; >+ udelay(100); >+ } >+ if (timeout <= 0) >+ printk(KERN_WARNING "sata_svw: timeout writing MDIO reg %d\n", reg); >+} > > static void k2_sata_tf_load(struct ata_port *ap, struct ata_taskfile *tf) > { >@@ -220,6 +264,31 @@ static u8 k2_stat_check_status(struct at > return readl((void *) ap->ioaddr.status_addr); > } > >+static void k2_sata_mdio_phy_reset(struct ata_host_set *host_set) >+{ >+ u16 reg; >+ >+ reg = k2_sata_mdio_read(host_set, 4); >+ k2_sata_mdio_write(host_set, 4, reg | 0x0008); >+ udelay(200); >+ k2_sata_mdio_write(host_set, 4, reg); >+ udelay(250); >+} >+ >+static void k2_sata_host_start(struct ata_host_set *host_set) >+{ >+ struct k2_sata_priv *pp; >+ >+ pp = host_set->private_data; >+ >+ /* Some cell revs need a HW reset of the PHY layer at this point, and >+ * on wakeup from power management >+ */ >+ if (pp->need_mdio_phy_reset) >+ k2_sata_mdio_phy_reset(host_set); >+} >+ >+ > #ifdef CONFIG_PPC_OF > /* > * k2_sata_proc_info >@@ -237,6 +306,7 @@ static int k2_sata_proc_info(struct Scsi > { > struct ata_port *ap; > struct device_node *np; >+ struct k2_sata_priv *pp; > int len, index; > > /* Find the ata_port */ >@@ -245,7 +315,8 @@ static int k2_sata_proc_info(struct Scsi > return 0; > > /* Find the OF node for the PCI device proper */ >- np = pci_device_to_OF_node(ap->host_set->pdev); >+ pp = ap->host_set->private_data; >+ np = pp->of_node; > if (np == NULL) > return 0; > >@@ -310,6 +381,7 @@ static struct ata_port_operations k2_sat > .scr_write = k2_sata_scr_write, > .port_start = ata_port_start, > .port_stop = ata_port_stop, >+ .host_start = k2_sata_host_start, > }; > > static void k2_sata_setup_port(struct ata_ioports *port, unsigned long base) >@@ -338,6 +410,7 @@ static int k2_sata_init_one (struct pci_ > struct ata_probe_ent *probe_ent = NULL; > unsigned long base; > void *mmio_base; >+ struct k2_sata_priv *pp = NULL; > int rc; > > if (!printed_version++) >@@ -376,9 +449,31 @@ static int k2_sata_init_one (struct pci_ > } > > memset(probe_ent, 0, sizeof(*probe_ent)); >+ >+ pp = (struct k2_sata_priv *)kmalloc(sizeof(struct k2_sata_priv), GFP_KERNEL); >+ if (pp == NULL) { >+ rc = -ENOMEM; >+ goto err_out_free_ent; >+ } >+ memset(pp, 0, sizeof(struct k2_sata_priv)); >+ > probe_ent->pdev = pdev; > INIT_LIST_HEAD(&probe_ent->node); > >+ probe_ent->private_data = pdev; >+ >+#ifdef CONFIG_PPC_OF >+ /* Find the OF node for the PCI device proper */ >+ pp->of_node = pci_device_to_OF_node(pdev); >+ >+ /* Check for revision 1 */ >+ if (pp->of_node) { >+ u32 *rev; >+ rev = (u32 *)get_property(pp->of_node, "cell-revision", NULL); >+ if (rev && (*rev) > 0) >+ pp->need_mdio_phy_reset = 1; >+ } >+#endif /* CONFIG_PPC_OF */ > mmio_base = ioremap(pci_resource_start(pdev, 5), > pci_resource_len(pdev, 5)); > if (mmio_base == NULL) { >@@ -404,6 +499,9 @@ static int k2_sata_init_one (struct pci_ > probe_ent->port_ops = &k2_sata_ops; > probe_ent->n_ports = 4; > probe_ent->irq = pdev->irq; >+ /* JMA: hack to fix IRQ on Imac G5 */ >+ if (probe_ent->irq == 0) >+ probe_ent->irq = 0xA; > probe_ent->irq_flags = SA_SHIRQ; > probe_ent->mmio_base = mmio_base; > >@@ -429,6 +527,9 @@ static int k2_sata_init_one (struct pci_ > return 0; > > err_out_free_ent: >+ if (pp) >+ kfree(pp); >+ if (probe_ent) > kfree(probe_ent); > err_out_regions: > pci_release_regions(pdev); >diff -urpBbN --exclude='*.orig' --exclude='*.diff' --exclude='*.rej' --exclude='*~' /usr/src/linux-2.6.10-rc1/drivers/video/modedb.c linux-2.6.10-rc1/drivers/video/modedb.c >diff -urpBbN --exclude='*.orig' --exclude='*.diff' --exclude='*.rej' --exclude='*~' /usr/src/linux-2.6.10-rc1/drivers/video/riva/fbdev.c linux-2.6.10-rc1/drivers/video/riva/fbdev.c >--- /usr/src/linux-2.6.10-rc1/drivers/video/riva/fbdev.c 2004-11-09 06:38:44.000000000 +0100 >+++ linux-2.6.10-rc1/drivers/video/riva/fbdev.c 2004-11-11 15:03:10.000000000 +0100 >@@ -192,6 +192,8 @@ static struct pci_device_id rivafb_pci_t > PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, > { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL, > PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, >+ { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_FX_GO5200, >+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, > { 0, } /* terminate list */ > }; > MODULE_DEVICE_TABLE(pci, rivafb_pci_tbl); >diff -urpBbN --exclude='*.orig' --exclude='*.diff' --exclude='*.rej' --exclude='*~' /usr/src/linux-2.6.10-rc1/include/linux/libata.h linux-2.6.10-rc1/include/linux/libata.h >--- /usr/src/linux-2.6.10-rc1/include/linux/libata.h 2004-11-09 06:38:44.000000000 +0100 >+++ linux-2.6.10-rc1/include/linux/libata.h 2004-11-11 12:50:59.000000000 +0100 >@@ -349,6 +349,7 @@ struct ata_port_operations { > int (*port_start) (struct ata_port *ap); > void (*port_stop) (struct ata_port *ap); > >+ void (*host_start) (struct ata_host_set *host_set); > void (*host_stop) (struct ata_host_set *host_set); > }; > >diff -urpBbN --exclude='*.orig' --exclude='*.diff' --exclude='*.rej' --exclude='*~' /usr/src/linux-2.6.10-rc1/include/linux/pci_ids.h linux-2.6.10-rc1/include/linux/pci_ids.h >--- /usr/src/linux-2.6.10-rc1/include/linux/pci_ids.h 2004-11-09 06:38:44.000000000 +0100 >+++ linux-2.6.10-rc1/include/linux/pci_ids.h 2004-11-11 15:01:30.000000000 +0100 >@@ -844,6 +844,9 @@ > #define PCI_DEVICE_ID_APPLE_KEYLARGO_I 0x003e > #define PCI_DEVICE_ID_APPLE_K2_ATA100 0x0043 > #define PCI_DEVICE_ID_APPLE_K2_GMAC 0x004c >+#define PCI_DEVICE_ID_APPLE_SH_ATA 0x0050 >+#define PCI_DEVICE_ID_APPLE_SH_SUNGEM 0x0051 >+#define PCI_DEVICE_ID_APPLE_SH_FW 0x0052 > #define PCI_DEVICE_ID_APPLE_TIGON3 0x1645 > > #define PCI_VENDOR_ID_YAMAHA 0x1073 >@@ -1139,6 +1142,7 @@ > #define PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL 0x0258 > #define PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL 0x0259 > #define PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL 0x025B >+#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_FX_GO5200 0x0329 > > #define PCI_VENDOR_ID_IMS 0x10e0 > #define PCI_DEVICE_ID_IMS_8849 0x8849
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 68970
:
43330
|
43741
|
43743
|
43928
|
43929
|
43930
|
44628
|
44629