diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-15 12:51:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-15 12:51:09 -0400 |
commit | 723e9db7a46e328527cc3da2b478b831184fe828 (patch) | |
tree | cdeda255633057dcb4c84097bed27b2bbf76970f /drivers | |
parent | ada3fa15057205b7d3f727bba5cd26b5912e350f (diff) | |
parent | d331d8305cba713605854aab63a000fb892353a7 (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (134 commits)
powerpc/nvram: Enable use Generic NVRAM driver for different size chips
powerpc/iseries: Fix oops reading from /proc/iSeries/mf/*/cmdline
powerpc/ps3: Workaround for flash memory I/O error
powerpc/booke: Don't set DABR on 64-bit BookE, use DAC1 instead
powerpc/perf_counters: Reduce stack usage of power_check_constraints
powerpc: Fix bug where perf_counters breaks oprofile
powerpc/85xx: Fix SMP compile error and allow NULL for smp_ops
powerpc/irq: Improve nanodoc
powerpc: Fix some late PowerMac G5 with PCIe ATI graphics
powerpc/fsl-booke: Use HW PTE format if CONFIG_PTE_64BIT
powerpc/book3e: Add missing page sizes
powerpc/pseries: Fix to handle slb resize across migration
powerpc/powermac: Thermal control turns system off too eagerly
powerpc/pci: Merge ppc32 and ppc64 versions of phb_scan()
powerpc/405ex: support cuImage via included dtb
powerpc/405ex: provide necessary fixup function to support cuImage
powerpc/40x: Add support for the ESTeem 195E (PPC405EP) SBC
powerpc/44x: Add Eiger AMCC (AppliedMicro) PPC460SX evaluation board support.
powerpc/44x: Update Arches defconfig
powerpc/44x: Update Arches dts
...
Fix up conflicts in drivers/char/agp/uninorth-agp.c
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/ps3vram.c | 2 | ||||
-rw-r--r-- | drivers/char/agp/uninorth-agp.c | 49 | ||||
-rw-r--r-- | drivers/char/generic_nvram.c | 27 | ||||
-rw-r--r-- | drivers/char/hvc_console.c | 2 | ||||
-rw-r--r-- | drivers/char/hvc_vio.c | 4 | ||||
-rw-r--r-- | drivers/char/hvsi.c | 3 | ||||
-rw-r--r-- | drivers/macintosh/macio_asic.c | 6 | ||||
-rw-r--r-- | drivers/macintosh/therm_windtunnel.c | 4 | ||||
-rw-r--r-- | drivers/ps3/ps3stor_lib.c | 65 | ||||
-rw-r--r-- | drivers/video/ps3fb.c | 2 |
10 files changed, 127 insertions, 37 deletions
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c index 095f97e60665..c8753a9ed290 100644 --- a/drivers/block/ps3vram.c +++ b/drivers/block/ps3vram.c | |||
@@ -13,8 +13,8 @@ | |||
13 | #include <linux/proc_fs.h> | 13 | #include <linux/proc_fs.h> |
14 | #include <linux/seq_file.h> | 14 | #include <linux/seq_file.h> |
15 | 15 | ||
16 | #include <asm/cell-regs.h> | ||
16 | #include <asm/firmware.h> | 17 | #include <asm/firmware.h> |
17 | #include <asm/iommu.h> | ||
18 | #include <asm/lv1call.h> | 18 | #include <asm/lv1call.h> |
19 | #include <asm/ps3.h> | 19 | #include <asm/ps3.h> |
20 | #include <asm/ps3gpu.h> | 20 | #include <asm/ps3gpu.h> |
diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c index 4317a5588daf..20ef1bf5e726 100644 --- a/drivers/char/agp/uninorth-agp.c +++ b/drivers/char/agp/uninorth-agp.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/pagemap.h> | 7 | #include <linux/pagemap.h> |
8 | #include <linux/agp_backend.h> | 8 | #include <linux/agp_backend.h> |
9 | #include <linux/delay.h> | 9 | #include <linux/delay.h> |
10 | #include <linux/vmalloc.h> | ||
10 | #include <asm/uninorth.h> | 11 | #include <asm/uninorth.h> |
11 | #include <asm/pci-bridge.h> | 12 | #include <asm/pci-bridge.h> |
12 | #include <asm/prom.h> | 13 | #include <asm/prom.h> |
@@ -27,6 +28,8 @@ | |||
27 | static int uninorth_rev; | 28 | static int uninorth_rev; |
28 | static int is_u3; | 29 | static int is_u3; |
29 | 30 | ||
31 | #define DEFAULT_APERTURE_SIZE 256 | ||
32 | #define DEFAULT_APERTURE_STRING "256" | ||
30 | static char *aperture = NULL; | 33 | static char *aperture = NULL; |
31 | 34 | ||
32 | static int uninorth_fetch_size(void) | 35 | static int uninorth_fetch_size(void) |
@@ -55,7 +58,7 @@ static int uninorth_fetch_size(void) | |||
55 | 58 | ||
56 | if (!size) { | 59 | if (!size) { |
57 | for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++) | 60 | for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++) |
58 | if (values[i].size == 32) | 61 | if (values[i].size == DEFAULT_APERTURE_SIZE) |
59 | break; | 62 | break; |
60 | } | 63 | } |
61 | 64 | ||
@@ -179,8 +182,6 @@ static int uninorth_insert_memory(struct agp_memory *mem, off_t pg_start, | |||
179 | } | 182 | } |
180 | (void)in_le32((volatile u32*)&agp_bridge->gatt_table[pg_start]); | 183 | (void)in_le32((volatile u32*)&agp_bridge->gatt_table[pg_start]); |
181 | mb(); | 184 | mb(); |
182 | flush_dcache_range((unsigned long)&agp_bridge->gatt_table[pg_start], | ||
183 | (unsigned long)&agp_bridge->gatt_table[pg_start + mem->page_count]); | ||
184 | 185 | ||
185 | uninorth_tlbflush(mem); | 186 | uninorth_tlbflush(mem); |
186 | return 0; | 187 | return 0; |
@@ -224,7 +225,6 @@ static int u3_insert_memory(struct agp_memory *mem, off_t pg_start, int type) | |||
224 | (unsigned long)__va(page_to_phys(mem->pages[i]))+0x1000); | 225 | (unsigned long)__va(page_to_phys(mem->pages[i]))+0x1000); |
225 | } | 226 | } |
226 | mb(); | 227 | mb(); |
227 | flush_dcache_range((unsigned long)gp, (unsigned long) &gp[i]); | ||
228 | uninorth_tlbflush(mem); | 228 | uninorth_tlbflush(mem); |
229 | 229 | ||
230 | return 0; | 230 | return 0; |
@@ -243,7 +243,6 @@ int u3_remove_memory(struct agp_memory *mem, off_t pg_start, int type) | |||
243 | for (i = 0; i < mem->page_count; ++i) | 243 | for (i = 0; i < mem->page_count; ++i) |
244 | gp[i] = 0; | 244 | gp[i] = 0; |
245 | mb(); | 245 | mb(); |
246 | flush_dcache_range((unsigned long)gp, (unsigned long) &gp[i]); | ||
247 | uninorth_tlbflush(mem); | 246 | uninorth_tlbflush(mem); |
248 | 247 | ||
249 | return 0; | 248 | return 0; |
@@ -396,6 +395,7 @@ static int uninorth_create_gatt_table(struct agp_bridge_data *bridge) | |||
396 | int i; | 395 | int i; |
397 | void *temp; | 396 | void *temp; |
398 | struct page *page; | 397 | struct page *page; |
398 | struct page **pages; | ||
399 | 399 | ||
400 | /* We can't handle 2 level gatt's */ | 400 | /* We can't handle 2 level gatt's */ |
401 | if (bridge->driver->size_type == LVL2_APER_SIZE) | 401 | if (bridge->driver->size_type == LVL2_APER_SIZE) |
@@ -424,21 +424,39 @@ static int uninorth_create_gatt_table(struct agp_bridge_data *bridge) | |||
424 | if (table == NULL) | 424 | if (table == NULL) |
425 | return -ENOMEM; | 425 | return -ENOMEM; |
426 | 426 | ||
427 | pages = kmalloc((1 << page_order) * sizeof(struct page*), GFP_KERNEL); | ||
428 | if (pages == NULL) | ||
429 | goto enomem; | ||
430 | |||
427 | table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1); | 431 | table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1); |
428 | 432 | ||
429 | for (page = virt_to_page(table); page <= virt_to_page(table_end); page++) | 433 | for (page = virt_to_page(table), i = 0; page <= virt_to_page(table_end); |
434 | page++, i++) { | ||
430 | SetPageReserved(page); | 435 | SetPageReserved(page); |
436 | pages[i] = page; | ||
437 | } | ||
431 | 438 | ||
432 | bridge->gatt_table_real = (u32 *) table; | 439 | bridge->gatt_table_real = (u32 *) table; |
433 | bridge->gatt_table = (u32 *)table; | 440 | /* Need to clear out any dirty data still sitting in caches */ |
441 | flush_dcache_range((unsigned long)table, | ||
442 | (unsigned long)(table_end + PAGE_SIZE)); | ||
443 | bridge->gatt_table = vmap(pages, (1 << page_order), 0, PAGE_KERNEL_NCG); | ||
444 | |||
445 | if (bridge->gatt_table == NULL) | ||
446 | goto enomem; | ||
447 | |||
434 | bridge->gatt_bus_addr = virt_to_phys(table); | 448 | bridge->gatt_bus_addr = virt_to_phys(table); |
435 | 449 | ||
436 | for (i = 0; i < num_entries; i++) | 450 | for (i = 0; i < num_entries; i++) |
437 | bridge->gatt_table[i] = 0; | 451 | bridge->gatt_table[i] = 0; |
438 | 452 | ||
439 | flush_dcache_range((unsigned long)table, (unsigned long)table_end); | ||
440 | |||
441 | return 0; | 453 | return 0; |
454 | |||
455 | enomem: | ||
456 | kfree(pages); | ||
457 | if (table) | ||
458 | free_pages((unsigned long)table, page_order); | ||
459 | return -ENOMEM; | ||
442 | } | 460 | } |
443 | 461 | ||
444 | static int uninorth_free_gatt_table(struct agp_bridge_data *bridge) | 462 | static int uninorth_free_gatt_table(struct agp_bridge_data *bridge) |
@@ -456,6 +474,7 @@ static int uninorth_free_gatt_table(struct agp_bridge_data *bridge) | |||
456 | * from the table. | 474 | * from the table. |
457 | */ | 475 | */ |
458 | 476 | ||
477 | vunmap(bridge->gatt_table); | ||
459 | table = (char *) bridge->gatt_table_real; | 478 | table = (char *) bridge->gatt_table_real; |
460 | table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1); | 479 | table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1); |
461 | 480 | ||
@@ -474,13 +493,11 @@ void null_cache_flush(void) | |||
474 | 493 | ||
475 | /* Setup function */ | 494 | /* Setup function */ |
476 | 495 | ||
477 | static const struct aper_size_info_32 uninorth_sizes[7] = | 496 | static const struct aper_size_info_32 uninorth_sizes[] = |
478 | { | 497 | { |
479 | #if 0 /* Not sure uninorth supports that high aperture sizes */ | ||
480 | {256, 65536, 6, 64}, | 498 | {256, 65536, 6, 64}, |
481 | {128, 32768, 5, 32}, | 499 | {128, 32768, 5, 32}, |
482 | {64, 16384, 4, 16}, | 500 | {64, 16384, 4, 16}, |
483 | #endif | ||
484 | {32, 8192, 3, 8}, | 501 | {32, 8192, 3, 8}, |
485 | {16, 4096, 2, 4}, | 502 | {16, 4096, 2, 4}, |
486 | {8, 2048, 1, 2}, | 503 | {8, 2048, 1, 2}, |
@@ -491,7 +508,7 @@ static const struct aper_size_info_32 uninorth_sizes[7] = | |||
491 | * Not sure that u3 supports that high aperture sizes but it | 508 | * Not sure that u3 supports that high aperture sizes but it |
492 | * would strange if it did not :) | 509 | * would strange if it did not :) |
493 | */ | 510 | */ |
494 | static const struct aper_size_info_32 u3_sizes[8] = | 511 | static const struct aper_size_info_32 u3_sizes[] = |
495 | { | 512 | { |
496 | {512, 131072, 7, 128}, | 513 | {512, 131072, 7, 128}, |
497 | {256, 65536, 6, 64}, | 514 | {256, 65536, 6, 64}, |
@@ -507,7 +524,7 @@ const struct agp_bridge_driver uninorth_agp_driver = { | |||
507 | .owner = THIS_MODULE, | 524 | .owner = THIS_MODULE, |
508 | .aperture_sizes = (void *)uninorth_sizes, | 525 | .aperture_sizes = (void *)uninorth_sizes, |
509 | .size_type = U32_APER_SIZE, | 526 | .size_type = U32_APER_SIZE, |
510 | .num_aperture_sizes = 4, | 527 | .num_aperture_sizes = ARRAY_SIZE(uninorth_sizes), |
511 | .configure = uninorth_configure, | 528 | .configure = uninorth_configure, |
512 | .fetch_size = uninorth_fetch_size, | 529 | .fetch_size = uninorth_fetch_size, |
513 | .cleanup = uninorth_cleanup, | 530 | .cleanup = uninorth_cleanup, |
@@ -534,7 +551,7 @@ const struct agp_bridge_driver u3_agp_driver = { | |||
534 | .owner = THIS_MODULE, | 551 | .owner = THIS_MODULE, |
535 | .aperture_sizes = (void *)u3_sizes, | 552 | .aperture_sizes = (void *)u3_sizes, |
536 | .size_type = U32_APER_SIZE, | 553 | .size_type = U32_APER_SIZE, |
537 | .num_aperture_sizes = 8, | 554 | .num_aperture_sizes = ARRAY_SIZE(u3_sizes), |
538 | .configure = uninorth_configure, | 555 | .configure = uninorth_configure, |
539 | .fetch_size = uninorth_fetch_size, | 556 | .fetch_size = uninorth_fetch_size, |
540 | .cleanup = uninorth_cleanup, | 557 | .cleanup = uninorth_cleanup, |
@@ -717,7 +734,7 @@ module_param(aperture, charp, 0); | |||
717 | MODULE_PARM_DESC(aperture, | 734 | MODULE_PARM_DESC(aperture, |
718 | "Aperture size, must be power of two between 4MB and an\n" | 735 | "Aperture size, must be power of two between 4MB and an\n" |
719 | "\t\tupper limit specific to the UniNorth revision.\n" | 736 | "\t\tupper limit specific to the UniNorth revision.\n" |
720 | "\t\tDefault: 32M"); | 737 | "\t\tDefault: " DEFAULT_APERTURE_STRING "M"); |
721 | 738 | ||
722 | MODULE_AUTHOR("Ben Herrenschmidt & Paul Mackerras"); | 739 | MODULE_AUTHOR("Ben Herrenschmidt & Paul Mackerras"); |
723 | MODULE_LICENSE("GPL"); | 740 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/char/generic_nvram.c b/drivers/char/generic_nvram.c index a00869c650d5..ef31738c2cbe 100644 --- a/drivers/char/generic_nvram.c +++ b/drivers/char/generic_nvram.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * Generic /dev/nvram driver for architectures providing some | 2 | * Generic /dev/nvram driver for architectures providing some |
3 | * "generic" hooks, that is : | 3 | * "generic" hooks, that is : |
4 | * | 4 | * |
5 | * nvram_read_byte, nvram_write_byte, nvram_sync | 5 | * nvram_read_byte, nvram_write_byte, nvram_sync, nvram_get_size |
6 | * | 6 | * |
7 | * Note that an additional hook is supported for PowerMac only | 7 | * Note that an additional hook is supported for PowerMac only |
8 | * for getting the nvram "partition" informations | 8 | * for getting the nvram "partition" informations |
@@ -28,6 +28,8 @@ | |||
28 | 28 | ||
29 | #define NVRAM_SIZE 8192 | 29 | #define NVRAM_SIZE 8192 |
30 | 30 | ||
31 | static ssize_t nvram_len; | ||
32 | |||
31 | static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) | 33 | static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) |
32 | { | 34 | { |
33 | lock_kernel(); | 35 | lock_kernel(); |
@@ -36,7 +38,7 @@ static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) | |||
36 | offset += file->f_pos; | 38 | offset += file->f_pos; |
37 | break; | 39 | break; |
38 | case 2: | 40 | case 2: |
39 | offset += NVRAM_SIZE; | 41 | offset += nvram_len; |
40 | break; | 42 | break; |
41 | } | 43 | } |
42 | if (offset < 0) { | 44 | if (offset < 0) { |
@@ -56,9 +58,9 @@ static ssize_t read_nvram(struct file *file, char __user *buf, | |||
56 | 58 | ||
57 | if (!access_ok(VERIFY_WRITE, buf, count)) | 59 | if (!access_ok(VERIFY_WRITE, buf, count)) |
58 | return -EFAULT; | 60 | return -EFAULT; |
59 | if (*ppos >= NVRAM_SIZE) | 61 | if (*ppos >= nvram_len) |
60 | return 0; | 62 | return 0; |
61 | for (i = *ppos; count > 0 && i < NVRAM_SIZE; ++i, ++p, --count) | 63 | for (i = *ppos; count > 0 && i < nvram_len; ++i, ++p, --count) |
62 | if (__put_user(nvram_read_byte(i), p)) | 64 | if (__put_user(nvram_read_byte(i), p)) |
63 | return -EFAULT; | 65 | return -EFAULT; |
64 | *ppos = i; | 66 | *ppos = i; |
@@ -74,9 +76,9 @@ static ssize_t write_nvram(struct file *file, const char __user *buf, | |||
74 | 76 | ||
75 | if (!access_ok(VERIFY_READ, buf, count)) | 77 | if (!access_ok(VERIFY_READ, buf, count)) |
76 | return -EFAULT; | 78 | return -EFAULT; |
77 | if (*ppos >= NVRAM_SIZE) | 79 | if (*ppos >= nvram_len) |
78 | return 0; | 80 | return 0; |
79 | for (i = *ppos; count > 0 && i < NVRAM_SIZE; ++i, ++p, --count) { | 81 | for (i = *ppos; count > 0 && i < nvram_len; ++i, ++p, --count) { |
80 | if (__get_user(c, p)) | 82 | if (__get_user(c, p)) |
81 | return -EFAULT; | 83 | return -EFAULT; |
82 | nvram_write_byte(c, i); | 84 | nvram_write_byte(c, i); |
@@ -133,9 +135,20 @@ static struct miscdevice nvram_dev = { | |||
133 | 135 | ||
134 | int __init nvram_init(void) | 136 | int __init nvram_init(void) |
135 | { | 137 | { |
138 | int ret = 0; | ||
139 | |||
136 | printk(KERN_INFO "Generic non-volatile memory driver v%s\n", | 140 | printk(KERN_INFO "Generic non-volatile memory driver v%s\n", |
137 | NVRAM_VERSION); | 141 | NVRAM_VERSION); |
138 | return misc_register(&nvram_dev); | 142 | ret = misc_register(&nvram_dev); |
143 | if (ret != 0) | ||
144 | goto out; | ||
145 | |||
146 | nvram_len = nvram_get_size(); | ||
147 | if (nvram_len < 0) | ||
148 | nvram_len = NVRAM_SIZE; | ||
149 | |||
150 | out: | ||
151 | return ret; | ||
139 | } | 152 | } |
140 | 153 | ||
141 | void __exit nvram_cleanup(void) | 154 | void __exit nvram_cleanup(void) |
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index d97779ef72cb..25ce15bb1c08 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c | |||
@@ -516,8 +516,6 @@ static void hvc_set_winsz(struct work_struct *work) | |||
516 | struct winsize ws; | 516 | struct winsize ws; |
517 | 517 | ||
518 | hp = container_of(work, struct hvc_struct, tty_resize); | 518 | hp = container_of(work, struct hvc_struct, tty_resize); |
519 | if (!hp) | ||
520 | return; | ||
521 | 519 | ||
522 | spin_lock_irqsave(&hp->lock, hvc_flags); | 520 | spin_lock_irqsave(&hp->lock, hvc_flags); |
523 | if (!hp->tty) { | 521 | if (!hp->tty) { |
diff --git a/drivers/char/hvc_vio.c b/drivers/char/hvc_vio.c index c72b994652ac..10be343d6ae7 100644 --- a/drivers/char/hvc_vio.c +++ b/drivers/char/hvc_vio.c | |||
@@ -120,7 +120,7 @@ static struct vio_driver hvc_vio_driver = { | |||
120 | } | 120 | } |
121 | }; | 121 | }; |
122 | 122 | ||
123 | static int hvc_vio_init(void) | 123 | static int __init hvc_vio_init(void) |
124 | { | 124 | { |
125 | int rc; | 125 | int rc; |
126 | 126 | ||
@@ -134,7 +134,7 @@ static int hvc_vio_init(void) | |||
134 | } | 134 | } |
135 | module_init(hvc_vio_init); /* after drivers/char/hvc_console.c */ | 135 | module_init(hvc_vio_init); /* after drivers/char/hvc_console.c */ |
136 | 136 | ||
137 | static void hvc_vio_exit(void) | 137 | static void __exit hvc_vio_exit(void) |
138 | { | 138 | { |
139 | vio_unregister_driver(&hvc_vio_driver); | 139 | vio_unregister_driver(&hvc_vio_driver); |
140 | } | 140 | } |
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c index 2989056a9e39..793b236c9266 100644 --- a/drivers/char/hvsi.c +++ b/drivers/char/hvsi.c | |||
@@ -1230,11 +1230,12 @@ static struct tty_driver *hvsi_console_device(struct console *console, | |||
1230 | 1230 | ||
1231 | static int __init hvsi_console_setup(struct console *console, char *options) | 1231 | static int __init hvsi_console_setup(struct console *console, char *options) |
1232 | { | 1232 | { |
1233 | struct hvsi_struct *hp = &hvsi_ports[console->index]; | 1233 | struct hvsi_struct *hp; |
1234 | int ret; | 1234 | int ret; |
1235 | 1235 | ||
1236 | if (console->index < 0 || console->index >= hvsi_count) | 1236 | if (console->index < 0 || console->index >= hvsi_count) |
1237 | return -1; | 1237 | return -1; |
1238 | hp = &hvsi_ports[console->index]; | ||
1238 | 1239 | ||
1239 | /* give the FSP a chance to change the baud rate when we re-open */ | 1240 | /* give the FSP a chance to change the baud rate when we re-open */ |
1240 | hvsi_close_protocol(hp); | 1241 | hvsi_close_protocol(hp); |
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index a0f68386c12f..588a5b0bc4b5 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c | |||
@@ -294,10 +294,11 @@ static void macio_setup_interrupts(struct macio_dev *dev) | |||
294 | int i = 0, j = 0; | 294 | int i = 0, j = 0; |
295 | 295 | ||
296 | for (;;) { | 296 | for (;;) { |
297 | struct resource *res = &dev->interrupt[j]; | 297 | struct resource *res; |
298 | 298 | ||
299 | if (j >= MACIO_DEV_COUNT_IRQS) | 299 | if (j >= MACIO_DEV_COUNT_IRQS) |
300 | break; | 300 | break; |
301 | res = &dev->interrupt[j]; | ||
301 | irq = irq_of_parse_and_map(np, i++); | 302 | irq = irq_of_parse_and_map(np, i++); |
302 | if (irq == NO_IRQ) | 303 | if (irq == NO_IRQ) |
303 | break; | 304 | break; |
@@ -321,9 +322,10 @@ static void macio_setup_resources(struct macio_dev *dev, | |||
321 | int index; | 322 | int index; |
322 | 323 | ||
323 | for (index = 0; of_address_to_resource(np, index, &r) == 0; index++) { | 324 | for (index = 0; of_address_to_resource(np, index, &r) == 0; index++) { |
324 | struct resource *res = &dev->resource[index]; | 325 | struct resource *res; |
325 | if (index >= MACIO_DEV_COUNT_RESOURCES) | 326 | if (index >= MACIO_DEV_COUNT_RESOURCES) |
326 | break; | 327 | break; |
328 | res = &dev->resource[index]; | ||
327 | *res = r; | 329 | *res = r; |
328 | res->name = dev_name(&dev->ofdev.dev); | 330 | res->name = dev_name(&dev->ofdev.dev); |
329 | 331 | ||
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c index 40023313a760..8b9364434aa0 100644 --- a/drivers/macintosh/therm_windtunnel.c +++ b/drivers/macintosh/therm_windtunnel.c | |||
@@ -239,8 +239,8 @@ setup_hardware( void ) | |||
239 | * to be on the safe side (OSX doesn't)... | 239 | * to be on the safe side (OSX doesn't)... |
240 | */ | 240 | */ |
241 | if( x.overheat_temp == (80 << 8) ) { | 241 | if( x.overheat_temp == (80 << 8) ) { |
242 | x.overheat_temp = 65 << 8; | 242 | x.overheat_temp = 75 << 8; |
243 | x.overheat_hyst = 60 << 8; | 243 | x.overheat_hyst = 70 << 8; |
244 | write_reg( x.thermostat, 2, x.overheat_hyst, 2 ); | 244 | write_reg( x.thermostat, 2, x.overheat_hyst, 2 ); |
245 | write_reg( x.thermostat, 3, x.overheat_temp, 2 ); | 245 | write_reg( x.thermostat, 3, x.overheat_temp, 2 ); |
246 | 246 | ||
diff --git a/drivers/ps3/ps3stor_lib.c b/drivers/ps3/ps3stor_lib.c index 18066d555397..af0afa1db4a8 100644 --- a/drivers/ps3/ps3stor_lib.c +++ b/drivers/ps3/ps3stor_lib.c | |||
@@ -23,6 +23,65 @@ | |||
23 | #include <asm/lv1call.h> | 23 | #include <asm/lv1call.h> |
24 | #include <asm/ps3stor.h> | 24 | #include <asm/ps3stor.h> |
25 | 25 | ||
26 | /* | ||
27 | * A workaround for flash memory I/O errors when the internal hard disk | ||
28 | * has not been formatted for OtherOS use. Delay disk close until flash | ||
29 | * memory is closed. | ||
30 | */ | ||
31 | |||
32 | static struct ps3_flash_workaround { | ||
33 | int flash_open; | ||
34 | int disk_open; | ||
35 | struct ps3_system_bus_device *disk_sbd; | ||
36 | } ps3_flash_workaround; | ||
37 | |||
38 | static int ps3stor_open_hv_device(struct ps3_system_bus_device *sbd) | ||
39 | { | ||
40 | int error = ps3_open_hv_device(sbd); | ||
41 | |||
42 | if (error) | ||
43 | return error; | ||
44 | |||
45 | if (sbd->match_id == PS3_MATCH_ID_STOR_FLASH) | ||
46 | ps3_flash_workaround.flash_open = 1; | ||
47 | |||
48 | if (sbd->match_id == PS3_MATCH_ID_STOR_DISK) | ||
49 | ps3_flash_workaround.disk_open = 1; | ||
50 | |||
51 | return 0; | ||
52 | } | ||
53 | |||
54 | static int ps3stor_close_hv_device(struct ps3_system_bus_device *sbd) | ||
55 | { | ||
56 | int error; | ||
57 | |||
58 | if (sbd->match_id == PS3_MATCH_ID_STOR_DISK | ||
59 | && ps3_flash_workaround.disk_open | ||
60 | && ps3_flash_workaround.flash_open) { | ||
61 | ps3_flash_workaround.disk_sbd = sbd; | ||
62 | return 0; | ||
63 | } | ||
64 | |||
65 | error = ps3_close_hv_device(sbd); | ||
66 | |||
67 | if (error) | ||
68 | return error; | ||
69 | |||
70 | if (sbd->match_id == PS3_MATCH_ID_STOR_DISK) | ||
71 | ps3_flash_workaround.disk_open = 0; | ||
72 | |||
73 | if (sbd->match_id == PS3_MATCH_ID_STOR_FLASH) { | ||
74 | ps3_flash_workaround.flash_open = 0; | ||
75 | |||
76 | if (ps3_flash_workaround.disk_sbd) { | ||
77 | ps3_close_hv_device(ps3_flash_workaround.disk_sbd); | ||
78 | ps3_flash_workaround.disk_open = 0; | ||
79 | ps3_flash_workaround.disk_sbd = NULL; | ||
80 | } | ||
81 | } | ||
82 | |||
83 | return 0; | ||
84 | } | ||
26 | 85 | ||
27 | static int ps3stor_probe_access(struct ps3_storage_device *dev) | 86 | static int ps3stor_probe_access(struct ps3_storage_device *dev) |
28 | { | 87 | { |
@@ -90,7 +149,7 @@ int ps3stor_setup(struct ps3_storage_device *dev, irq_handler_t handler) | |||
90 | int error, res, alignment; | 149 | int error, res, alignment; |
91 | enum ps3_dma_page_size page_size; | 150 | enum ps3_dma_page_size page_size; |
92 | 151 | ||
93 | error = ps3_open_hv_device(&dev->sbd); | 152 | error = ps3stor_open_hv_device(&dev->sbd); |
94 | if (error) { | 153 | if (error) { |
95 | dev_err(&dev->sbd.core, | 154 | dev_err(&dev->sbd.core, |
96 | "%s:%u: ps3_open_hv_device failed %d\n", __func__, | 155 | "%s:%u: ps3_open_hv_device failed %d\n", __func__, |
@@ -166,7 +225,7 @@ fail_free_irq: | |||
166 | fail_sb_event_receive_port_destroy: | 225 | fail_sb_event_receive_port_destroy: |
167 | ps3_sb_event_receive_port_destroy(&dev->sbd, dev->irq); | 226 | ps3_sb_event_receive_port_destroy(&dev->sbd, dev->irq); |
168 | fail_close_device: | 227 | fail_close_device: |
169 | ps3_close_hv_device(&dev->sbd); | 228 | ps3stor_close_hv_device(&dev->sbd); |
170 | fail: | 229 | fail: |
171 | return error; | 230 | return error; |
172 | } | 231 | } |
@@ -193,7 +252,7 @@ void ps3stor_teardown(struct ps3_storage_device *dev) | |||
193 | "%s:%u: destroy event receive port failed %d\n", | 252 | "%s:%u: destroy event receive port failed %d\n", |
194 | __func__, __LINE__, error); | 253 | __func__, __LINE__, error); |
195 | 254 | ||
196 | error = ps3_close_hv_device(&dev->sbd); | 255 | error = ps3stor_close_hv_device(&dev->sbd); |
197 | if (error) | 256 | if (error) |
198 | dev_err(&dev->sbd.core, | 257 | dev_err(&dev->sbd.core, |
199 | "%s:%u: ps3_close_hv_device failed %d\n", __func__, | 258 | "%s:%u: ps3_close_hv_device failed %d\n", __func__, |
diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c index c0af638fe702..9c0144ee7ae5 100644 --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | 33 | ||
34 | #include <asm/abs_addr.h> | 34 | #include <asm/abs_addr.h> |
35 | #include <asm/iommu.h> | 35 | #include <asm/cell-regs.h> |
36 | #include <asm/lv1call.h> | 36 | #include <asm/lv1call.h> |
37 | #include <asm/ps3av.h> | 37 | #include <asm/ps3av.h> |
38 | #include <asm/ps3fb.h> | 38 | #include <asm/ps3fb.h> |