diff options
author | Geoff Levand <geoffrey.levand@am.sony.com> | 2007-06-15 17:52:02 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-06-28 05:16:38 -0400 |
commit | 6bb5cf1025414fe00b20f3bef56135849e4ed3b8 (patch) | |
tree | d8cc37288ce123dc790af37f99b7bcc7c9e1872d /arch/powerpc/platforms/ps3/interrupt.c | |
parent | 9263e85aa9e9d341ef238fffc040f586674d1709 (diff) |
[POWERPC] PS3: System-bus rework
Rework the PS3 system bus to unify device support.
- DMA region sizes must be a power of two
- storage bus DMA updates:
- Small fixes for the PS3 DMA core:
o fix alignment bug
o kill superfluous test
o indentation
o spelling
o export ps3_dma_region_{create,free}()
- ps3_dma_region_init():
o Add `addr' and `len' parameters, so you can create a DMA region that
does not cover all memory (use `NULL' and `0' to cover all memory).
This is needed because there are not sufficient IOMMU resources to have
all DMA regions cover all memory.
o Uninline
- Added remove and shutdown routines to all drivers.
- Added loadable module support to all drivers.
- Added HV calls for iopte management (needed by sound driver).
Signed-off-by: MOKUNO Masakazu <mokuno@sm.sony.co.jp>
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/ps3/interrupt.c')
-rw-r--r-- | arch/powerpc/platforms/ps3/interrupt.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c index 462eacc55c97..51141dc06f91 100644 --- a/arch/powerpc/platforms/ps3/interrupt.c +++ b/arch/powerpc/platforms/ps3/interrupt.c | |||
@@ -400,17 +400,15 @@ int ps3_send_event_locally(unsigned int virq) | |||
400 | * ps3_sb_event_receive_port_setup - Setup a system bus event receive port. | 400 | * ps3_sb_event_receive_port_setup - Setup a system bus event receive port. |
401 | * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be | 401 | * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be |
402 | * serviced on. | 402 | * serviced on. |
403 | * @did: The HV device identifier read from the system repository. | 403 | * @dev: The system bus device instance. |
404 | * @interrupt_id: The device interrupt id read from the system repository. | ||
405 | * @virq: The assigned Linux virq. | 404 | * @virq: The assigned Linux virq. |
406 | * | 405 | * |
407 | * An event irq represents a virtual device interrupt. The interrupt_id | 406 | * An event irq represents a virtual device interrupt. The interrupt_id |
408 | * coresponds to the software interrupt number. | 407 | * coresponds to the software interrupt number. |
409 | */ | 408 | */ |
410 | 409 | ||
411 | int ps3_sb_event_receive_port_setup(enum ps3_cpu_binding cpu, | 410 | int ps3_sb_event_receive_port_setup(struct ps3_system_bus_device *dev, |
412 | const struct ps3_device_id *did, unsigned int interrupt_id, | 411 | enum ps3_cpu_binding cpu, unsigned int *virq) |
413 | unsigned int *virq) | ||
414 | { | 412 | { |
415 | /* this should go in system-bus.c */ | 413 | /* this should go in system-bus.c */ |
416 | 414 | ||
@@ -421,8 +419,8 @@ int ps3_sb_event_receive_port_setup(enum ps3_cpu_binding cpu, | |||
421 | if (result) | 419 | if (result) |
422 | return result; | 420 | return result; |
423 | 421 | ||
424 | result = lv1_connect_interrupt_event_receive_port(did->bus_id, | 422 | result = lv1_connect_interrupt_event_receive_port(dev->bus_id, |
425 | did->dev_id, virq_to_hw(*virq), interrupt_id); | 423 | dev->dev_id, virq_to_hw(*virq), dev->interrupt_id); |
426 | 424 | ||
427 | if (result) { | 425 | if (result) { |
428 | pr_debug("%s:%d: lv1_connect_interrupt_event_receive_port" | 426 | pr_debug("%s:%d: lv1_connect_interrupt_event_receive_port" |
@@ -434,24 +432,24 @@ int ps3_sb_event_receive_port_setup(enum ps3_cpu_binding cpu, | |||
434 | } | 432 | } |
435 | 433 | ||
436 | pr_debug("%s:%d: interrupt_id %u, virq %u\n", __func__, __LINE__, | 434 | pr_debug("%s:%d: interrupt_id %u, virq %u\n", __func__, __LINE__, |
437 | interrupt_id, *virq); | 435 | dev->interrupt_id, *virq); |
438 | 436 | ||
439 | return 0; | 437 | return 0; |
440 | } | 438 | } |
441 | EXPORT_SYMBOL(ps3_sb_event_receive_port_setup); | 439 | EXPORT_SYMBOL(ps3_sb_event_receive_port_setup); |
442 | 440 | ||
443 | int ps3_sb_event_receive_port_destroy(const struct ps3_device_id *did, | 441 | int ps3_sb_event_receive_port_destroy(struct ps3_system_bus_device *dev, |
444 | unsigned int interrupt_id, unsigned int virq) | 442 | unsigned int virq) |
445 | { | 443 | { |
446 | /* this should go in system-bus.c */ | 444 | /* this should go in system-bus.c */ |
447 | 445 | ||
448 | int result; | 446 | int result; |
449 | 447 | ||
450 | pr_debug(" -> %s:%d: interrupt_id %u, virq %u\n", __func__, __LINE__, | 448 | pr_debug(" -> %s:%d: interrupt_id %u, virq %u\n", __func__, __LINE__, |
451 | interrupt_id, virq); | 449 | dev->interrupt_id, virq); |
452 | 450 | ||
453 | result = lv1_disconnect_interrupt_event_receive_port(did->bus_id, | 451 | result = lv1_disconnect_interrupt_event_receive_port(dev->bus_id, |
454 | did->dev_id, virq_to_hw(virq), interrupt_id); | 452 | dev->dev_id, virq_to_hw(virq), dev->interrupt_id); |
455 | 453 | ||
456 | if (result) | 454 | if (result) |
457 | pr_debug("%s:%d: lv1_disconnect_interrupt_event_receive_port" | 455 | pr_debug("%s:%d: lv1_disconnect_interrupt_event_receive_port" |