aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/smu.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-12-13 21:10:10 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-08 23:03:17 -0500
commit1beb6a7d6cbed3ac03500ce9b5b9bb632c512039 (patch)
tree727aa76da5a82fca449dadf3cebbadc414ad6555 /drivers/macintosh/smu.c
parentcd0c7f06803be06a5cf4564aa5a900f4b6aea603 (diff)
[PATCH] powerpc: Experimental support for new G5 Macs (#2)
This adds some very basic support for the new machines, including the Quad G5 (tested), and other new dual core based machines and iMac G5 iSight (untested). This is still experimental ! There is no thermal control yet, there is no proper handing of MSIs, etc.. but it boots, I have all 4 cores up on my machine. Compared to the previous version of this patch, this one adds DART IOMMU support for the U4 chipset and thus should work fine on setups with more than 2Gb of RAM. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/macintosh/smu.c')
-rw-r--r--drivers/macintosh/smu.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index e8378274d710..96226116a646 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -53,7 +53,7 @@
53#undef DEBUG_SMU 53#undef DEBUG_SMU
54 54
55#ifdef DEBUG_SMU 55#ifdef DEBUG_SMU
56#define DPRINTK(fmt, args...) do { udbg_printf(KERN_DEBUG fmt , ##args); } while (0) 56#define DPRINTK(fmt, args...) do { printk(KERN_DEBUG fmt , ##args); } while (0)
57#else 57#else
58#define DPRINTK(fmt, args...) do { } while (0) 58#define DPRINTK(fmt, args...) do { } while (0)
59#endif 59#endif
@@ -909,10 +909,13 @@ static struct smu_sdbp_header *smu_create_sdb_partition(int id)
909 struct property *prop; 909 struct property *prop;
910 910
911 /* First query the partition info */ 911 /* First query the partition info */
912 DPRINTK("SMU: Query partition infos ... (irq=%d)\n", smu->db_irq);
912 smu_queue_simple(&cmd, SMU_CMD_PARTITION_COMMAND, 2, 913 smu_queue_simple(&cmd, SMU_CMD_PARTITION_COMMAND, 2,
913 smu_done_complete, &comp, 914 smu_done_complete, &comp,
914 SMU_CMD_PARTITION_LATEST, id); 915 SMU_CMD_PARTITION_LATEST, id);
915 wait_for_completion(&comp); 916 wait_for_completion(&comp);
917 DPRINTK("SMU: done, status: %d, reply_len: %d\n",
918 cmd.cmd.status, cmd.cmd.reply_len);
916 919
917 /* Partition doesn't exist (or other error) */ 920 /* Partition doesn't exist (or other error) */
918 if (cmd.cmd.status != 0 || cmd.cmd.reply_len != 6) 921 if (cmd.cmd.status != 0 || cmd.cmd.reply_len != 6)
@@ -975,6 +978,8 @@ struct smu_sdbp_header *__smu_get_sdb_partition(int id, unsigned int *size,
975 978
976 sprintf(pname, "sdb-partition-%02x", id); 979 sprintf(pname, "sdb-partition-%02x", id);
977 980
981 DPRINTK("smu_get_sdb_partition(%02x)\n", id);
982
978 if (interruptible) { 983 if (interruptible) {
979 int rc; 984 int rc;
980 rc = down_interruptible(&smu_part_access); 985 rc = down_interruptible(&smu_part_access);
@@ -986,6 +991,7 @@ struct smu_sdbp_header *__smu_get_sdb_partition(int id, unsigned int *size,
986 part = (struct smu_sdbp_header *)get_property(smu->of_node, 991 part = (struct smu_sdbp_header *)get_property(smu->of_node,
987 pname, size); 992 pname, size);
988 if (part == NULL) { 993 if (part == NULL) {
994 DPRINTK("trying to extract from SMU ...\n");
989 part = smu_create_sdb_partition(id); 995 part = smu_create_sdb_partition(id);
990 if (part != NULL && size) 996 if (part != NULL && size)
991 *size = part->len << 2; 997 *size = part->len << 2;