diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/Kconfig | 14 | ||||
-rw-r--r-- | arch/powerpc/include/asm/bitops.h | 82 | ||||
-rw-r--r-- | arch/powerpc/include/asm/types.h | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/cpu_setup_fsl_booke.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/crash_dump.c | 17 | ||||
-rw-r--r-- | arch/powerpc/kernel/vdso.c | 6 | ||||
-rw-r--r-- | arch/powerpc/sysdev/Makefile | 2 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_rio.c | 96 | ||||
-rw-r--r-- | arch/powerpc/xmon/xmon.c | 2 |
9 files changed, 91 insertions, 132 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 71ba04721beb..3584e4d4a4ad 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -95,6 +95,10 @@ config GENERIC_FIND_NEXT_BIT | |||
95 | bool | 95 | bool |
96 | default y | 96 | default y |
97 | 97 | ||
98 | config GENERIC_FIND_BIT_LE | ||
99 | bool | ||
100 | default y | ||
101 | |||
98 | config GENERIC_GPIO | 102 | config GENERIC_GPIO |
99 | bool | 103 | bool |
100 | help | 104 | help |
@@ -768,11 +772,19 @@ config HAS_RAPIDIO | |||
768 | 772 | ||
769 | config RAPIDIO | 773 | config RAPIDIO |
770 | bool "RapidIO support" | 774 | bool "RapidIO support" |
771 | depends on HAS_RAPIDIO | 775 | depends on HAS_RAPIDIO || PCI |
772 | help | 776 | help |
773 | If you say Y here, the kernel will include drivers and | 777 | If you say Y here, the kernel will include drivers and |
774 | infrastructure code to support RapidIO interconnect devices. | 778 | infrastructure code to support RapidIO interconnect devices. |
775 | 779 | ||
780 | config FSL_RIO | ||
781 | bool "Freescale Embedded SRIO Controller support" | ||
782 | depends on RAPIDIO && HAS_RAPIDIO | ||
783 | default "n" | ||
784 | ---help--- | ||
785 | Include support for RapidIO controller on Freescale embedded | ||
786 | processors (MPC8548, MPC8641, etc). | ||
787 | |||
776 | source "drivers/rapidio/Kconfig" | 788 | source "drivers/rapidio/Kconfig" |
777 | 789 | ||
778 | endmenu | 790 | endmenu |
diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h index 8a7e9314c68a..2e561876fc89 100644 --- a/arch/powerpc/include/asm/bitops.h +++ b/arch/powerpc/include/asm/bitops.h | |||
@@ -281,68 +281,56 @@ unsigned long __arch_hweight64(__u64 w); | |||
281 | 281 | ||
282 | /* Little-endian versions */ | 282 | /* Little-endian versions */ |
283 | 283 | ||
284 | static __inline__ int test_le_bit(unsigned long nr, | 284 | static __inline__ int test_bit_le(unsigned long nr, |
285 | __const__ unsigned long *addr) | 285 | __const__ void *addr) |
286 | { | 286 | { |
287 | __const__ unsigned char *tmp = (__const__ unsigned char *) addr; | 287 | __const__ unsigned char *tmp = (__const__ unsigned char *) addr; |
288 | return (tmp[nr >> 3] >> (nr & 7)) & 1; | 288 | return (tmp[nr >> 3] >> (nr & 7)) & 1; |
289 | } | 289 | } |
290 | 290 | ||
291 | #define __set_le_bit(nr, addr) \ | 291 | static inline void __set_bit_le(int nr, void *addr) |
292 | __set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | 292 | { |
293 | #define __clear_le_bit(nr, addr) \ | 293 | __set_bit(nr ^ BITOP_LE_SWIZZLE, addr); |
294 | __clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | 294 | } |
295 | |||
296 | static inline void __clear_bit_le(int nr, void *addr) | ||
297 | { | ||
298 | __clear_bit(nr ^ BITOP_LE_SWIZZLE, addr); | ||
299 | } | ||
300 | |||
301 | static inline int test_and_set_bit_le(int nr, void *addr) | ||
302 | { | ||
303 | return test_and_set_bit(nr ^ BITOP_LE_SWIZZLE, addr); | ||
304 | } | ||
295 | 305 | ||
296 | #define test_and_set_le_bit(nr, addr) \ | 306 | static inline int test_and_clear_bit_le(int nr, void *addr) |
297 | test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | 307 | { |
298 | #define test_and_clear_le_bit(nr, addr) \ | 308 | return test_and_clear_bit(nr ^ BITOP_LE_SWIZZLE, addr); |
299 | test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | 309 | } |
310 | |||
311 | static inline int __test_and_set_bit_le(int nr, void *addr) | ||
312 | { | ||
313 | return __test_and_set_bit(nr ^ BITOP_LE_SWIZZLE, addr); | ||
314 | } | ||
300 | 315 | ||
301 | #define __test_and_set_le_bit(nr, addr) \ | 316 | static inline int __test_and_clear_bit_le(int nr, void *addr) |
302 | __test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | 317 | { |
303 | #define __test_and_clear_le_bit(nr, addr) \ | 318 | return __test_and_clear_bit(nr ^ BITOP_LE_SWIZZLE, addr); |
304 | __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | 319 | } |
305 | 320 | ||
306 | #define find_first_zero_le_bit(addr, size) generic_find_next_zero_le_bit((addr), (size), 0) | 321 | #define find_first_zero_bit_le(addr, size) \ |
307 | unsigned long generic_find_next_zero_le_bit(const unsigned long *addr, | 322 | find_next_zero_bit_le((addr), (size), 0) |
323 | unsigned long find_next_zero_bit_le(const void *addr, | ||
308 | unsigned long size, unsigned long offset); | 324 | unsigned long size, unsigned long offset); |
309 | 325 | ||
310 | unsigned long generic_find_next_le_bit(const unsigned long *addr, | 326 | unsigned long find_next_bit_le(const void *addr, |
311 | unsigned long size, unsigned long offset); | 327 | unsigned long size, unsigned long offset); |
312 | /* Bitmap functions for the ext2 filesystem */ | 328 | /* Bitmap functions for the ext2 filesystem */ |
313 | 329 | ||
314 | #define ext2_set_bit(nr,addr) \ | ||
315 | __test_and_set_le_bit((nr), (unsigned long*)addr) | ||
316 | #define ext2_clear_bit(nr, addr) \ | ||
317 | __test_and_clear_le_bit((nr), (unsigned long*)addr) | ||
318 | |||
319 | #define ext2_set_bit_atomic(lock, nr, addr) \ | 330 | #define ext2_set_bit_atomic(lock, nr, addr) \ |
320 | test_and_set_le_bit((nr), (unsigned long*)addr) | 331 | test_and_set_bit_le((nr), (unsigned long*)addr) |
321 | #define ext2_clear_bit_atomic(lock, nr, addr) \ | 332 | #define ext2_clear_bit_atomic(lock, nr, addr) \ |
322 | test_and_clear_le_bit((nr), (unsigned long*)addr) | 333 | test_and_clear_bit_le((nr), (unsigned long*)addr) |
323 | |||
324 | #define ext2_test_bit(nr, addr) test_le_bit((nr),(unsigned long*)addr) | ||
325 | |||
326 | #define ext2_find_first_zero_bit(addr, size) \ | ||
327 | find_first_zero_le_bit((unsigned long*)addr, size) | ||
328 | #define ext2_find_next_zero_bit(addr, size, off) \ | ||
329 | generic_find_next_zero_le_bit((unsigned long*)addr, size, off) | ||
330 | |||
331 | #define ext2_find_next_bit(addr, size, off) \ | ||
332 | generic_find_next_le_bit((unsigned long *)addr, size, off) | ||
333 | /* Bitmap functions for the minix filesystem. */ | ||
334 | |||
335 | #define minix_test_and_set_bit(nr,addr) \ | ||
336 | __test_and_set_le_bit(nr, (unsigned long *)addr) | ||
337 | #define minix_set_bit(nr,addr) \ | ||
338 | __set_le_bit(nr, (unsigned long *)addr) | ||
339 | #define minix_test_and_clear_bit(nr,addr) \ | ||
340 | __test_and_clear_le_bit(nr, (unsigned long *)addr) | ||
341 | #define minix_test_bit(nr,addr) \ | ||
342 | test_le_bit(nr, (unsigned long *)addr) | ||
343 | |||
344 | #define minix_find_first_zero_bit(addr,size) \ | ||
345 | find_first_zero_le_bit((unsigned long *)addr, size) | ||
346 | 334 | ||
347 | #include <asm-generic/bitops/sched.h> | 335 | #include <asm-generic/bitops/sched.h> |
348 | 336 | ||
diff --git a/arch/powerpc/include/asm/types.h b/arch/powerpc/include/asm/types.h index e16a6b2d96f1..8947b9827bc4 100644 --- a/arch/powerpc/include/asm/types.h +++ b/arch/powerpc/include/asm/types.h | |||
@@ -44,8 +44,6 @@ typedef struct { | |||
44 | 44 | ||
45 | typedef __vector128 vector128; | 45 | typedef __vector128 vector128; |
46 | 46 | ||
47 | typedef u64 dma64_addr_t; | ||
48 | |||
49 | typedef struct { | 47 | typedef struct { |
50 | unsigned long entry; | 48 | unsigned long entry; |
51 | unsigned long toc; | 49 | unsigned long toc; |
diff --git a/arch/powerpc/kernel/cpu_setup_fsl_booke.S b/arch/powerpc/kernel/cpu_setup_fsl_booke.S index 5c518ad3445c..913611105c1f 100644 --- a/arch/powerpc/kernel/cpu_setup_fsl_booke.S +++ b/arch/powerpc/kernel/cpu_setup_fsl_booke.S | |||
@@ -64,7 +64,7 @@ _GLOBAL(__setup_cpu_e500v2) | |||
64 | bl __e500_icache_setup | 64 | bl __e500_icache_setup |
65 | bl __e500_dcache_setup | 65 | bl __e500_dcache_setup |
66 | bl __setup_e500_ivors | 66 | bl __setup_e500_ivors |
67 | #ifdef CONFIG_RAPIDIO | 67 | #ifdef CONFIG_FSL_RIO |
68 | /* Ensure that RFXE is set */ | 68 | /* Ensure that RFXE is set */ |
69 | mfspr r3,SPRN_HID1 | 69 | mfspr r3,SPRN_HID1 |
70 | oris r3,r3,HID1_RFXE@h | 70 | oris r3,r3,HID1_RFXE@h |
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c index 0a2af50243cb..424afb6b8fba 100644 --- a/arch/powerpc/kernel/crash_dump.c +++ b/arch/powerpc/kernel/crash_dump.c | |||
@@ -28,9 +28,6 @@ | |||
28 | #define DBG(fmt...) | 28 | #define DBG(fmt...) |
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | /* Stores the physical address of elf header of crash image. */ | ||
32 | unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX; | ||
33 | |||
34 | #ifndef CONFIG_RELOCATABLE | 31 | #ifndef CONFIG_RELOCATABLE |
35 | void __init reserve_kdump_trampoline(void) | 32 | void __init reserve_kdump_trampoline(void) |
36 | { | 33 | { |
@@ -72,20 +69,6 @@ void __init setup_kdump_trampoline(void) | |||
72 | } | 69 | } |
73 | #endif /* CONFIG_RELOCATABLE */ | 70 | #endif /* CONFIG_RELOCATABLE */ |
74 | 71 | ||
75 | /* | ||
76 | * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by | ||
77 | * is_kdump_kernel() to determine if we are booting after a panic. Hence | ||
78 | * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE. | ||
79 | */ | ||
80 | static int __init parse_elfcorehdr(char *p) | ||
81 | { | ||
82 | if (p) | ||
83 | elfcorehdr_addr = memparse(p, &p); | ||
84 | |||
85 | return 1; | ||
86 | } | ||
87 | __setup("elfcorehdr=", parse_elfcorehdr); | ||
88 | |||
89 | static int __init parse_savemaxmem(char *p) | 72 | static int __init parse_savemaxmem(char *p) |
90 | { | 73 | { |
91 | if (p) | 74 | if (p) |
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index fd8728729abc..142ab1008c3b 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c | |||
@@ -820,17 +820,17 @@ static int __init vdso_init(void) | |||
820 | } | 820 | } |
821 | arch_initcall(vdso_init); | 821 | arch_initcall(vdso_init); |
822 | 822 | ||
823 | int in_gate_area_no_task(unsigned long addr) | 823 | int in_gate_area_no_mm(unsigned long addr) |
824 | { | 824 | { |
825 | return 0; | 825 | return 0; |
826 | } | 826 | } |
827 | 827 | ||
828 | int in_gate_area(struct task_struct *task, unsigned long addr) | 828 | int in_gate_area(struct mm_struct *mm, unsigned long addr) |
829 | { | 829 | { |
830 | return 0; | 830 | return 0; |
831 | } | 831 | } |
832 | 832 | ||
833 | struct vm_area_struct *get_gate_vma(struct task_struct *tsk) | 833 | struct vm_area_struct *get_gate_vma(struct mm_struct *mm) |
834 | { | 834 | { |
835 | return NULL; | 835 | return NULL; |
836 | } | 836 | } |
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile index 9c2973479142..1e0c933ef772 100644 --- a/arch/powerpc/sysdev/Makefile +++ b/arch/powerpc/sysdev/Makefile | |||
@@ -20,7 +20,7 @@ obj-$(CONFIG_FSL_GTM) += fsl_gtm.o | |||
20 | obj-$(CONFIG_MPC8xxx_GPIO) += mpc8xxx_gpio.o | 20 | obj-$(CONFIG_MPC8xxx_GPIO) += mpc8xxx_gpio.o |
21 | obj-$(CONFIG_FSL_85XX_CACHE_SRAM) += fsl_85xx_l2ctlr.o fsl_85xx_cache_sram.o | 21 | obj-$(CONFIG_FSL_85XX_CACHE_SRAM) += fsl_85xx_l2ctlr.o fsl_85xx_cache_sram.o |
22 | obj-$(CONFIG_SIMPLE_GPIO) += simple_gpio.o | 22 | obj-$(CONFIG_SIMPLE_GPIO) += simple_gpio.o |
23 | obj-$(CONFIG_RAPIDIO) += fsl_rio.o | 23 | obj-$(CONFIG_FSL_RIO) += fsl_rio.o |
24 | obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o | 24 | obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o |
25 | obj-$(CONFIG_QUICC_ENGINE) += qe_lib/ | 25 | obj-$(CONFIG_QUICC_ENGINE) += qe_lib/ |
26 | obj-$(CONFIG_PPC_BESTCOMM) += bestcomm/ | 26 | obj-$(CONFIG_PPC_BESTCOMM) += bestcomm/ |
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index 3eff2c3a9ad5..14232d57369c 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c | |||
@@ -482,7 +482,7 @@ fsl_rio_config_write(struct rio_mport *mport, int index, u16 destid, | |||
482 | } | 482 | } |
483 | 483 | ||
484 | /** | 484 | /** |
485 | * rio_hw_add_outb_message - Add message to the MPC85xx outbound message queue | 485 | * fsl_add_outb_message - Add message to the MPC85xx outbound message queue |
486 | * @mport: Master port with outbound message queue | 486 | * @mport: Master port with outbound message queue |
487 | * @rdev: Target of outbound message | 487 | * @rdev: Target of outbound message |
488 | * @mbox: Outbound mailbox | 488 | * @mbox: Outbound mailbox |
@@ -492,8 +492,8 @@ fsl_rio_config_write(struct rio_mport *mport, int index, u16 destid, | |||
492 | * Adds the @buffer message to the MPC85xx outbound message queue. Returns | 492 | * Adds the @buffer message to the MPC85xx outbound message queue. Returns |
493 | * %0 on success or %-EINVAL on failure. | 493 | * %0 on success or %-EINVAL on failure. |
494 | */ | 494 | */ |
495 | int | 495 | static int |
496 | rio_hw_add_outb_message(struct rio_mport *mport, struct rio_dev *rdev, int mbox, | 496 | fsl_add_outb_message(struct rio_mport *mport, struct rio_dev *rdev, int mbox, |
497 | void *buffer, size_t len) | 497 | void *buffer, size_t len) |
498 | { | 498 | { |
499 | struct rio_priv *priv = mport->priv; | 499 | struct rio_priv *priv = mport->priv; |
@@ -502,9 +502,8 @@ rio_hw_add_outb_message(struct rio_mport *mport, struct rio_dev *rdev, int mbox, | |||
502 | + priv->msg_tx_ring.tx_slot; | 502 | + priv->msg_tx_ring.tx_slot; |
503 | int ret = 0; | 503 | int ret = 0; |
504 | 504 | ||
505 | pr_debug | 505 | pr_debug("RIO: fsl_add_outb_message(): destid %4.4x mbox %d buffer " \ |
506 | ("RIO: rio_hw_add_outb_message(): destid %4.4x mbox %d buffer %8.8x len %8.8x\n", | 506 | "%8.8x len %8.8x\n", rdev->destid, mbox, (int)buffer, len); |
507 | rdev->destid, mbox, (int)buffer, len); | ||
508 | 507 | ||
509 | if ((len < 8) || (len > RIO_MAX_MSG_SIZE)) { | 508 | if ((len < 8) || (len > RIO_MAX_MSG_SIZE)) { |
510 | ret = -EINVAL; | 509 | ret = -EINVAL; |
@@ -554,8 +553,6 @@ rio_hw_add_outb_message(struct rio_mport *mport, struct rio_dev *rdev, int mbox, | |||
554 | return ret; | 553 | return ret; |
555 | } | 554 | } |
556 | 555 | ||
557 | EXPORT_SYMBOL_GPL(rio_hw_add_outb_message); | ||
558 | |||
559 | /** | 556 | /** |
560 | * fsl_rio_tx_handler - MPC85xx outbound message interrupt handler | 557 | * fsl_rio_tx_handler - MPC85xx outbound message interrupt handler |
561 | * @irq: Linux interrupt number | 558 | * @irq: Linux interrupt number |
@@ -600,7 +597,7 @@ fsl_rio_tx_handler(int irq, void *dev_instance) | |||
600 | } | 597 | } |
601 | 598 | ||
602 | /** | 599 | /** |
603 | * rio_open_outb_mbox - Initialize MPC85xx outbound mailbox | 600 | * fsl_open_outb_mbox - Initialize MPC85xx outbound mailbox |
604 | * @mport: Master port implementing the outbound message unit | 601 | * @mport: Master port implementing the outbound message unit |
605 | * @dev_id: Device specific pointer to pass on event | 602 | * @dev_id: Device specific pointer to pass on event |
606 | * @mbox: Mailbox to open | 603 | * @mbox: Mailbox to open |
@@ -610,7 +607,8 @@ fsl_rio_tx_handler(int irq, void *dev_instance) | |||
610 | * and enables the outbound message unit. Returns %0 on success and | 607 | * and enables the outbound message unit. Returns %0 on success and |
611 | * %-EINVAL or %-ENOMEM on failure. | 608 | * %-EINVAL or %-ENOMEM on failure. |
612 | */ | 609 | */ |
613 | int rio_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries) | 610 | static int |
611 | fsl_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries) | ||
614 | { | 612 | { |
615 | int i, j, rc = 0; | 613 | int i, j, rc = 0; |
616 | struct rio_priv *priv = mport->priv; | 614 | struct rio_priv *priv = mport->priv; |
@@ -706,14 +704,14 @@ int rio_open_outb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entr | |||
706 | } | 704 | } |
707 | 705 | ||
708 | /** | 706 | /** |
709 | * rio_close_outb_mbox - Shut down MPC85xx outbound mailbox | 707 | * fsl_close_outb_mbox - Shut down MPC85xx outbound mailbox |
710 | * @mport: Master port implementing the outbound message unit | 708 | * @mport: Master port implementing the outbound message unit |
711 | * @mbox: Mailbox to close | 709 | * @mbox: Mailbox to close |
712 | * | 710 | * |
713 | * Disables the outbound message unit, free all buffers, and | 711 | * Disables the outbound message unit, free all buffers, and |
714 | * frees the outbound message interrupt. | 712 | * frees the outbound message interrupt. |
715 | */ | 713 | */ |
716 | void rio_close_outb_mbox(struct rio_mport *mport, int mbox) | 714 | static void fsl_close_outb_mbox(struct rio_mport *mport, int mbox) |
717 | { | 715 | { |
718 | struct rio_priv *priv = mport->priv; | 716 | struct rio_priv *priv = mport->priv; |
719 | /* Disable inbound message unit */ | 717 | /* Disable inbound message unit */ |
@@ -770,7 +768,7 @@ fsl_rio_rx_handler(int irq, void *dev_instance) | |||
770 | } | 768 | } |
771 | 769 | ||
772 | /** | 770 | /** |
773 | * rio_open_inb_mbox - Initialize MPC85xx inbound mailbox | 771 | * fsl_open_inb_mbox - Initialize MPC85xx inbound mailbox |
774 | * @mport: Master port implementing the inbound message unit | 772 | * @mport: Master port implementing the inbound message unit |
775 | * @dev_id: Device specific pointer to pass on event | 773 | * @dev_id: Device specific pointer to pass on event |
776 | * @mbox: Mailbox to open | 774 | * @mbox: Mailbox to open |
@@ -780,7 +778,8 @@ fsl_rio_rx_handler(int irq, void *dev_instance) | |||
780 | * and enables the inbound message unit. Returns %0 on success | 778 | * and enables the inbound message unit. Returns %0 on success |
781 | * and %-EINVAL or %-ENOMEM on failure. | 779 | * and %-EINVAL or %-ENOMEM on failure. |
782 | */ | 780 | */ |
783 | int rio_open_inb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries) | 781 | static int |
782 | fsl_open_inb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entries) | ||
784 | { | 783 | { |
785 | int i, rc = 0; | 784 | int i, rc = 0; |
786 | struct rio_priv *priv = mport->priv; | 785 | struct rio_priv *priv = mport->priv; |
@@ -844,14 +843,14 @@ int rio_open_inb_mbox(struct rio_mport *mport, void *dev_id, int mbox, int entri | |||
844 | } | 843 | } |
845 | 844 | ||
846 | /** | 845 | /** |
847 | * rio_close_inb_mbox - Shut down MPC85xx inbound mailbox | 846 | * fsl_close_inb_mbox - Shut down MPC85xx inbound mailbox |
848 | * @mport: Master port implementing the inbound message unit | 847 | * @mport: Master port implementing the inbound message unit |
849 | * @mbox: Mailbox to close | 848 | * @mbox: Mailbox to close |
850 | * | 849 | * |
851 | * Disables the inbound message unit, free all buffers, and | 850 | * Disables the inbound message unit, free all buffers, and |
852 | * frees the inbound message interrupt. | 851 | * frees the inbound message interrupt. |
853 | */ | 852 | */ |
854 | void rio_close_inb_mbox(struct rio_mport *mport, int mbox) | 853 | static void fsl_close_inb_mbox(struct rio_mport *mport, int mbox) |
855 | { | 854 | { |
856 | struct rio_priv *priv = mport->priv; | 855 | struct rio_priv *priv = mport->priv; |
857 | /* Disable inbound message unit */ | 856 | /* Disable inbound message unit */ |
@@ -866,7 +865,7 @@ void rio_close_inb_mbox(struct rio_mport *mport, int mbox) | |||
866 | } | 865 | } |
867 | 866 | ||
868 | /** | 867 | /** |
869 | * rio_hw_add_inb_buffer - Add buffer to the MPC85xx inbound message queue | 868 | * fsl_add_inb_buffer - Add buffer to the MPC85xx inbound message queue |
870 | * @mport: Master port implementing the inbound message unit | 869 | * @mport: Master port implementing the inbound message unit |
871 | * @mbox: Inbound mailbox number | 870 | * @mbox: Inbound mailbox number |
872 | * @buf: Buffer to add to inbound queue | 871 | * @buf: Buffer to add to inbound queue |
@@ -874,12 +873,12 @@ void rio_close_inb_mbox(struct rio_mport *mport, int mbox) | |||
874 | * Adds the @buf buffer to the MPC85xx inbound message queue. Returns | 873 | * Adds the @buf buffer to the MPC85xx inbound message queue. Returns |
875 | * %0 on success or %-EINVAL on failure. | 874 | * %0 on success or %-EINVAL on failure. |
876 | */ | 875 | */ |
877 | int rio_hw_add_inb_buffer(struct rio_mport *mport, int mbox, void *buf) | 876 | static int fsl_add_inb_buffer(struct rio_mport *mport, int mbox, void *buf) |
878 | { | 877 | { |
879 | int rc = 0; | 878 | int rc = 0; |
880 | struct rio_priv *priv = mport->priv; | 879 | struct rio_priv *priv = mport->priv; |
881 | 880 | ||
882 | pr_debug("RIO: rio_hw_add_inb_buffer(), msg_rx_ring.rx_slot %d\n", | 881 | pr_debug("RIO: fsl_add_inb_buffer(), msg_rx_ring.rx_slot %d\n", |
883 | priv->msg_rx_ring.rx_slot); | 882 | priv->msg_rx_ring.rx_slot); |
884 | 883 | ||
885 | if (priv->msg_rx_ring.virt_buffer[priv->msg_rx_ring.rx_slot]) { | 884 | if (priv->msg_rx_ring.virt_buffer[priv->msg_rx_ring.rx_slot]) { |
@@ -898,17 +897,15 @@ int rio_hw_add_inb_buffer(struct rio_mport *mport, int mbox, void *buf) | |||
898 | return rc; | 897 | return rc; |
899 | } | 898 | } |
900 | 899 | ||
901 | EXPORT_SYMBOL_GPL(rio_hw_add_inb_buffer); | ||
902 | |||
903 | /** | 900 | /** |
904 | * rio_hw_get_inb_message - Fetch inbound message from the MPC85xx message unit | 901 | * fsl_get_inb_message - Fetch inbound message from the MPC85xx message unit |
905 | * @mport: Master port implementing the inbound message unit | 902 | * @mport: Master port implementing the inbound message unit |
906 | * @mbox: Inbound mailbox number | 903 | * @mbox: Inbound mailbox number |
907 | * | 904 | * |
908 | * Gets the next available inbound message from the inbound message queue. | 905 | * Gets the next available inbound message from the inbound message queue. |
909 | * A pointer to the message is returned on success or NULL on failure. | 906 | * A pointer to the message is returned on success or NULL on failure. |
910 | */ | 907 | */ |
911 | void *rio_hw_get_inb_message(struct rio_mport *mport, int mbox) | 908 | static void *fsl_get_inb_message(struct rio_mport *mport, int mbox) |
912 | { | 909 | { |
913 | struct rio_priv *priv = mport->priv; | 910 | struct rio_priv *priv = mport->priv; |
914 | u32 phys_buf, virt_buf; | 911 | u32 phys_buf, virt_buf; |
@@ -945,8 +942,6 @@ void *rio_hw_get_inb_message(struct rio_mport *mport, int mbox) | |||
945 | return buf; | 942 | return buf; |
946 | } | 943 | } |
947 | 944 | ||
948 | EXPORT_SYMBOL_GPL(rio_hw_get_inb_message); | ||
949 | |||
950 | /** | 945 | /** |
951 | * fsl_rio_dbell_handler - MPC85xx doorbell interrupt handler | 946 | * fsl_rio_dbell_handler - MPC85xx doorbell interrupt handler |
952 | * @irq: Linux interrupt number | 947 | * @irq: Linux interrupt number |
@@ -1293,28 +1288,6 @@ err_out: | |||
1293 | return rc; | 1288 | return rc; |
1294 | } | 1289 | } |
1295 | 1290 | ||
1296 | static char *cmdline = NULL; | ||
1297 | |||
1298 | static int fsl_rio_get_hdid(int index) | ||
1299 | { | ||
1300 | /* XXX Need to parse multiple entries in some format */ | ||
1301 | if (!cmdline) | ||
1302 | return -1; | ||
1303 | |||
1304 | return simple_strtol(cmdline, NULL, 0); | ||
1305 | } | ||
1306 | |||
1307 | static int fsl_rio_get_cmdline(char *s) | ||
1308 | { | ||
1309 | if (!s) | ||
1310 | return 0; | ||
1311 | |||
1312 | cmdline = s; | ||
1313 | return 1; | ||
1314 | } | ||
1315 | |||
1316 | __setup("riohdid=", fsl_rio_get_cmdline); | ||
1317 | |||
1318 | static inline void fsl_rio_info(struct device *dev, u32 ccsr) | 1291 | static inline void fsl_rio_info(struct device *dev, u32 ccsr) |
1319 | { | 1292 | { |
1320 | const char *str; | 1293 | const char *str; |
@@ -1431,13 +1404,19 @@ int fsl_rio_setup(struct platform_device *dev) | |||
1431 | ops->cwrite = fsl_rio_config_write; | 1404 | ops->cwrite = fsl_rio_config_write; |
1432 | ops->dsend = fsl_rio_doorbell_send; | 1405 | ops->dsend = fsl_rio_doorbell_send; |
1433 | ops->pwenable = fsl_rio_pw_enable; | 1406 | ops->pwenable = fsl_rio_pw_enable; |
1407 | ops->open_outb_mbox = fsl_open_outb_mbox; | ||
1408 | ops->open_inb_mbox = fsl_open_inb_mbox; | ||
1409 | ops->close_outb_mbox = fsl_close_outb_mbox; | ||
1410 | ops->close_inb_mbox = fsl_close_inb_mbox; | ||
1411 | ops->add_outb_message = fsl_add_outb_message; | ||
1412 | ops->add_inb_buffer = fsl_add_inb_buffer; | ||
1413 | ops->get_inb_message = fsl_get_inb_message; | ||
1434 | 1414 | ||
1435 | port = kzalloc(sizeof(struct rio_mport), GFP_KERNEL); | 1415 | port = kzalloc(sizeof(struct rio_mport), GFP_KERNEL); |
1436 | if (!port) { | 1416 | if (!port) { |
1437 | rc = -ENOMEM; | 1417 | rc = -ENOMEM; |
1438 | goto err_port; | 1418 | goto err_port; |
1439 | } | 1419 | } |
1440 | port->id = 0; | ||
1441 | port->index = 0; | 1420 | port->index = 0; |
1442 | 1421 | ||
1443 | priv = kzalloc(sizeof(struct rio_priv), GFP_KERNEL); | 1422 | priv = kzalloc(sizeof(struct rio_priv), GFP_KERNEL); |
@@ -1453,6 +1432,14 @@ int fsl_rio_setup(struct platform_device *dev) | |||
1453 | port->iores.flags = IORESOURCE_MEM; | 1432 | port->iores.flags = IORESOURCE_MEM; |
1454 | port->iores.name = "rio_io_win"; | 1433 | port->iores.name = "rio_io_win"; |
1455 | 1434 | ||
1435 | if (request_resource(&iomem_resource, &port->iores) < 0) { | ||
1436 | dev_err(&dev->dev, "RIO: Error requesting master port region" | ||
1437 | " 0x%016llx-0x%016llx\n", | ||
1438 | (u64)port->iores.start, (u64)port->iores.end); | ||
1439 | rc = -ENOMEM; | ||
1440 | goto err_res; | ||
1441 | } | ||
1442 | |||
1456 | priv->pwirq = irq_of_parse_and_map(dev->dev.of_node, 0); | 1443 | priv->pwirq = irq_of_parse_and_map(dev->dev.of_node, 0); |
1457 | priv->bellirq = irq_of_parse_and_map(dev->dev.of_node, 2); | 1444 | priv->bellirq = irq_of_parse_and_map(dev->dev.of_node, 2); |
1458 | priv->txirq = irq_of_parse_and_map(dev->dev.of_node, 3); | 1445 | priv->txirq = irq_of_parse_and_map(dev->dev.of_node, 3); |
@@ -1468,8 +1455,6 @@ int fsl_rio_setup(struct platform_device *dev) | |||
1468 | priv->dev = &dev->dev; | 1455 | priv->dev = &dev->dev; |
1469 | 1456 | ||
1470 | port->ops = ops; | 1457 | port->ops = ops; |
1471 | port->host_deviceid = fsl_rio_get_hdid(port->id); | ||
1472 | |||
1473 | port->priv = priv; | 1458 | port->priv = priv; |
1474 | port->phys_efptr = 0x100; | 1459 | port->phys_efptr = 0x100; |
1475 | rio_register_mport(port); | 1460 | rio_register_mport(port); |
@@ -1559,6 +1544,7 @@ int fsl_rio_setup(struct platform_device *dev) | |||
1559 | return 0; | 1544 | return 0; |
1560 | err: | 1545 | err: |
1561 | iounmap(priv->regs_win); | 1546 | iounmap(priv->regs_win); |
1547 | err_res: | ||
1562 | kfree(priv); | 1548 | kfree(priv); |
1563 | err_priv: | 1549 | err_priv: |
1564 | kfree(port); | 1550 | kfree(port); |
@@ -1572,18 +1558,10 @@ err_ops: | |||
1572 | */ | 1558 | */ |
1573 | static int __devinit fsl_of_rio_rpn_probe(struct platform_device *dev) | 1559 | static int __devinit fsl_of_rio_rpn_probe(struct platform_device *dev) |
1574 | { | 1560 | { |
1575 | int rc; | ||
1576 | printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n", | 1561 | printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n", |
1577 | dev->dev.of_node->full_name); | 1562 | dev->dev.of_node->full_name); |
1578 | 1563 | ||
1579 | rc = fsl_rio_setup(dev); | 1564 | return fsl_rio_setup(dev); |
1580 | if (rc) | ||
1581 | goto out; | ||
1582 | |||
1583 | /* Enumerate all registered ports */ | ||
1584 | rc = rio_init_mports(); | ||
1585 | out: | ||
1586 | return rc; | ||
1587 | }; | 1565 | }; |
1588 | 1566 | ||
1589 | static const struct of_device_id fsl_of_rio_rpn_ids[] = { | 1567 | static const struct of_device_id fsl_of_rio_rpn_ids[] = { |
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index d17d04cfb2cd..33794c1d92c3 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -821,7 +821,7 @@ cmds(struct pt_regs *excp) | |||
821 | memzcan(); | 821 | memzcan(); |
822 | break; | 822 | break; |
823 | case 'i': | 823 | case 'i': |
824 | show_mem(); | 824 | show_mem(0); |
825 | break; | 825 | break; |
826 | default: | 826 | default: |
827 | termch = cmd; | 827 | termch = cmd; |