diff options
author | Paul Mackerras <paulus@samba.org> | 2006-06-01 05:05:23 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-06-01 05:05:23 -0400 |
commit | c029cc66cb3d83f70c02e0c182f0eed1419f8020 (patch) | |
tree | b9ed887a0e6434fedebcbf90b3d2ba1aeff68a01 /arch/powerpc | |
parent | 0a9cb46a73abd6c45e7c986bec984eed60c417b6 (diff) | |
parent | ba8f5baba79da8eb502f8534c3a8ecb64aceb790 (diff) |
Merge branch 'merge'
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 48 | ||||
-rw-r--r-- | arch/powerpc/kernel/systbl.S | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spu_callbacks.c | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/low_i2c.c | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/setup.c | 12 |
5 files changed, 76 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 12fbdbb2d54a..5908690d0868 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -1975,10 +1975,45 @@ static void __init flatten_device_tree(void) | |||
1975 | 1975 | ||
1976 | } | 1976 | } |
1977 | 1977 | ||
1978 | 1978 | #ifdef CONFIG_PPC_MAPLE | |
1979 | static void __init fixup_device_tree(void) | 1979 | /* PIBS Version 1.05.0000 04/26/2005 has an incorrect /ht/isa/ranges property. |
1980 | * The values are bad, and it doesn't even have the right number of cells. */ | ||
1981 | static void __init fixup_device_tree_maple(void) | ||
1980 | { | 1982 | { |
1983 | phandle isa; | ||
1984 | u32 isa_ranges[6]; | ||
1985 | |||
1986 | isa = call_prom("finddevice", 1, 1, ADDR("/ht@0/isa@4")); | ||
1987 | if (!PHANDLE_VALID(isa)) | ||
1988 | return; | ||
1989 | |||
1990 | if (prom_getprop(isa, "ranges", isa_ranges, sizeof(isa_ranges)) | ||
1991 | == PROM_ERROR) | ||
1992 | return; | ||
1993 | |||
1994 | if (isa_ranges[0] != 0x1 || | ||
1995 | isa_ranges[1] != 0xf4000000 || | ||
1996 | isa_ranges[2] != 0x00010000) | ||
1997 | return; | ||
1998 | |||
1999 | prom_printf("fixing up bogus ISA range on Maple...\n"); | ||
2000 | |||
2001 | isa_ranges[0] = 0x1; | ||
2002 | isa_ranges[1] = 0x0; | ||
2003 | isa_ranges[2] = 0x01002000; /* IO space; PCI device = 4 */ | ||
2004 | isa_ranges[3] = 0x0; | ||
2005 | isa_ranges[4] = 0x0; | ||
2006 | isa_ranges[5] = 0x00010000; | ||
2007 | prom_setprop(isa, "/ht@0/isa@4", "ranges", | ||
2008 | isa_ranges, sizeof(isa_ranges)); | ||
2009 | } | ||
2010 | #else | ||
2011 | #define fixup_device_tree_maple() | ||
2012 | #endif | ||
2013 | |||
1981 | #if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC) | 2014 | #if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC) |
2015 | static void __init fixup_device_tree_pmac(void) | ||
2016 | { | ||
1982 | phandle u3, i2c, mpic; | 2017 | phandle u3, i2c, mpic; |
1983 | u32 u3_rev; | 2018 | u32 u3_rev; |
1984 | u32 interrupts[2]; | 2019 | u32 interrupts[2]; |
@@ -2015,9 +2050,16 @@ static void __init fixup_device_tree(void) | |||
2015 | parent = (u32)mpic; | 2050 | parent = (u32)mpic; |
2016 | prom_setprop(i2c, "/u3@0,f8000000/i2c@f8001000", "interrupt-parent", | 2051 | prom_setprop(i2c, "/u3@0,f8000000/i2c@f8001000", "interrupt-parent", |
2017 | &parent, sizeof(parent)); | 2052 | &parent, sizeof(parent)); |
2018 | #endif | ||
2019 | } | 2053 | } |
2054 | #else | ||
2055 | #define fixup_device_tree_pmac() | ||
2056 | #endif | ||
2020 | 2057 | ||
2058 | static void __init fixup_device_tree(void) | ||
2059 | { | ||
2060 | fixup_device_tree_maple(); | ||
2061 | fixup_device_tree_pmac(); | ||
2062 | } | ||
2021 | 2063 | ||
2022 | static void __init prom_find_boot_cpu(void) | 2064 | static void __init prom_find_boot_cpu(void) |
2023 | { | 2065 | { |
diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S index cf56a1d499ff..26ed1f5ef16e 100644 --- a/arch/powerpc/kernel/systbl.S +++ b/arch/powerpc/kernel/systbl.S | |||
@@ -338,6 +338,8 @@ SYSCALL(symlinkat) | |||
338 | SYSCALL(readlinkat) | 338 | SYSCALL(readlinkat) |
339 | SYSCALL(fchmodat) | 339 | SYSCALL(fchmodat) |
340 | SYSCALL(faccessat) | 340 | SYSCALL(faccessat) |
341 | COMPAT_SYS(get_robust_list) | ||
342 | COMPAT_SYS(set_robust_list) | ||
341 | 343 | ||
342 | /* | 344 | /* |
343 | * please add new calls to arch/powerpc/platforms/cell/spu_callbacks.c | 345 | * please add new calls to arch/powerpc/platforms/cell/spu_callbacks.c |
diff --git a/arch/powerpc/platforms/cell/spu_callbacks.c b/arch/powerpc/platforms/cell/spu_callbacks.c index 95b36430aa0f..b47fcc5ddb78 100644 --- a/arch/powerpc/platforms/cell/spu_callbacks.c +++ b/arch/powerpc/platforms/cell/spu_callbacks.c | |||
@@ -258,6 +258,7 @@ void *spu_syscall_table[] = { | |||
258 | [__NR_futex] sys_futex, | 258 | [__NR_futex] sys_futex, |
259 | [__NR_sched_setaffinity] sys_sched_setaffinity, | 259 | [__NR_sched_setaffinity] sys_sched_setaffinity, |
260 | [__NR_sched_getaffinity] sys_sched_getaffinity, | 260 | [__NR_sched_getaffinity] sys_sched_getaffinity, |
261 | [224] sys_ni_syscall, | ||
261 | [__NR_tuxcall] sys_ni_syscall, | 262 | [__NR_tuxcall] sys_ni_syscall, |
262 | [226] sys_ni_syscall, | 263 | [226] sys_ni_syscall, |
263 | [__NR_io_setup] sys_io_setup, | 264 | [__NR_io_setup] sys_io_setup, |
@@ -332,19 +333,21 @@ void *spu_syscall_table[] = { | |||
332 | [__NR_readlinkat] sys_readlinkat, | 333 | [__NR_readlinkat] sys_readlinkat, |
333 | [__NR_fchmodat] sys_fchmodat, | 334 | [__NR_fchmodat] sys_fchmodat, |
334 | [__NR_faccessat] sys_faccessat, | 335 | [__NR_faccessat] sys_faccessat, |
336 | [__NR_get_robust_list] sys_get_robust_list, | ||
337 | [__NR_set_robust_list] sys_set_robust_list, | ||
335 | }; | 338 | }; |
336 | 339 | ||
337 | long spu_sys_callback(struct spu_syscall_block *s) | 340 | long spu_sys_callback(struct spu_syscall_block *s) |
338 | { | 341 | { |
339 | long (*syscall)(u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6); | 342 | long (*syscall)(u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6); |
340 | 343 | ||
341 | syscall = spu_syscall_table[s->nr_ret]; | ||
342 | |||
343 | if (s->nr_ret >= ARRAY_SIZE(spu_syscall_table)) { | 344 | if (s->nr_ret >= ARRAY_SIZE(spu_syscall_table)) { |
344 | pr_debug("%s: invalid syscall #%ld", __FUNCTION__, s->nr_ret); | 345 | pr_debug("%s: invalid syscall #%ld", __FUNCTION__, s->nr_ret); |
345 | return -ENOSYS; | 346 | return -ENOSYS; |
346 | } | 347 | } |
347 | 348 | ||
349 | syscall = spu_syscall_table[s->nr_ret]; | ||
350 | |||
348 | #ifdef DEBUG | 351 | #ifdef DEBUG |
349 | print_symbol(KERN_DEBUG "SPU-syscall %s:", (unsigned long)syscall); | 352 | print_symbol(KERN_DEBUG "SPU-syscall %s:", (unsigned long)syscall); |
350 | printk("syscall%ld(%lx, %lx, %lx, %lx, %lx, %lx)\n", | 353 | printk("syscall%ld(%lx, %lx, %lx, %lx, %lx, %lx)\n", |
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index df2343e1956b..c896ce83d412 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c | |||
@@ -1157,6 +1157,7 @@ EXPORT_SYMBOL_GPL(pmac_i2c_xfer); | |||
1157 | /* some quirks for platform function decoding */ | 1157 | /* some quirks for platform function decoding */ |
1158 | enum { | 1158 | enum { |
1159 | pmac_i2c_quirk_invmask = 0x00000001u, | 1159 | pmac_i2c_quirk_invmask = 0x00000001u, |
1160 | pmac_i2c_quirk_skip = 0x00000002u, | ||
1160 | }; | 1161 | }; |
1161 | 1162 | ||
1162 | static void pmac_i2c_devscan(void (*callback)(struct device_node *dev, | 1163 | static void pmac_i2c_devscan(void (*callback)(struct device_node *dev, |
@@ -1172,6 +1173,15 @@ static void pmac_i2c_devscan(void (*callback)(struct device_node *dev, | |||
1172 | /* XXX Study device-tree's & apple drivers are get the quirks | 1173 | /* XXX Study device-tree's & apple drivers are get the quirks |
1173 | * right ! | 1174 | * right ! |
1174 | */ | 1175 | */ |
1176 | /* Workaround: It seems that running the clockspreading | ||
1177 | * properties on the eMac will cause lockups during boot. | ||
1178 | * The machine seems to work fine without that. So for now, | ||
1179 | * let's make sure i2c-hwclock doesn't match about "imic" | ||
1180 | * clocks and we'll figure out if we really need to do | ||
1181 | * something special about those later. | ||
1182 | */ | ||
1183 | { "i2c-hwclock", "imic5002", pmac_i2c_quirk_skip }, | ||
1184 | { "i2c-hwclock", "imic5003", pmac_i2c_quirk_skip }, | ||
1175 | { "i2c-hwclock", NULL, pmac_i2c_quirk_invmask }, | 1185 | { "i2c-hwclock", NULL, pmac_i2c_quirk_invmask }, |
1176 | { "i2c-cpu-voltage", NULL, 0}, | 1186 | { "i2c-cpu-voltage", NULL, 0}, |
1177 | { "temp-monitor", NULL, 0 }, | 1187 | { "temp-monitor", NULL, 0 }, |
@@ -1198,6 +1208,8 @@ static void pmac_i2c_devscan(void (*callback)(struct device_node *dev, | |||
1198 | if (p->compatible && | 1208 | if (p->compatible && |
1199 | !device_is_compatible(np, p->compatible)) | 1209 | !device_is_compatible(np, p->compatible)) |
1200 | continue; | 1210 | continue; |
1211 | if (p->quirks & pmac_i2c_quirk_skip) | ||
1212 | break; | ||
1201 | callback(np, p->quirks); | 1213 | callback(np, p->quirks); |
1202 | break; | 1214 | break; |
1203 | } | 1215 | } |
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 4d15e396655c..b9200fb07815 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -463,11 +463,23 @@ static int pmac_pm_finish(suspend_state_t state) | |||
463 | return 0; | 463 | return 0; |
464 | } | 464 | } |
465 | 465 | ||
466 | static int pmac_pm_valid(suspend_state_t state) | ||
467 | { | ||
468 | switch (state) { | ||
469 | case PM_SUSPEND_DISK: | ||
470 | return 1; | ||
471 | /* can't do any other states via generic mechanism yet */ | ||
472 | default: | ||
473 | return 0; | ||
474 | } | ||
475 | } | ||
476 | |||
466 | static struct pm_ops pmac_pm_ops = { | 477 | static struct pm_ops pmac_pm_ops = { |
467 | .pm_disk_mode = PM_DISK_SHUTDOWN, | 478 | .pm_disk_mode = PM_DISK_SHUTDOWN, |
468 | .prepare = pmac_pm_prepare, | 479 | .prepare = pmac_pm_prepare, |
469 | .enter = pmac_pm_enter, | 480 | .enter = pmac_pm_enter, |
470 | .finish = pmac_pm_finish, | 481 | .finish = pmac_pm_finish, |
482 | .valid = pmac_pm_valid, | ||
471 | }; | 483 | }; |
472 | 484 | ||
473 | #endif /* CONFIG_SOFTWARE_SUSPEND */ | 485 | #endif /* CONFIG_SOFTWARE_SUSPEND */ |