aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/include/asm/opal.h2
-rw-r--r--arch/powerpc/platforms/powernv/opal-wrappers.S1
-rw-r--r--arch/powerpc/platforms/powernv/opal.c3
3 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h
index 05f9455615d6..6bd3b183cd63 100644
--- a/arch/powerpc/include/asm/opal.h
+++ b/arch/powerpc/include/asm/opal.h
@@ -87,6 +87,7 @@ extern int opal_enter_rtas(struct rtas_args *args,
87#define OPAL_ASYNC_COMPLETION -15 87#define OPAL_ASYNC_COMPLETION -15
88 88
89/* API Tokens (in r0) */ 89/* API Tokens (in r0) */
90#define OPAL_INVALID_CALL -1
90#define OPAL_CONSOLE_WRITE 1 91#define OPAL_CONSOLE_WRITE 1
91#define OPAL_CONSOLE_READ 2 92#define OPAL_CONSOLE_READ 2
92#define OPAL_RTC_READ 3 93#define OPAL_RTC_READ 3
@@ -734,6 +735,7 @@ extern struct kobject *opal_kobj;
734extern struct device_node *opal_node; 735extern struct device_node *opal_node;
735 736
736/* API functions */ 737/* API functions */
738int64_t opal_invalid_call(void);
737int64_t opal_console_write(int64_t term_number, __be64 *length, 739int64_t opal_console_write(int64_t term_number, __be64 *length,
738 const uint8_t *buffer); 740 const uint8_t *buffer);
739int64_t opal_console_read(int64_t term_number, __be64 *length, 741int64_t opal_console_read(int64_t term_number, __be64 *length,
diff --git a/arch/powerpc/platforms/powernv/opal-wrappers.S b/arch/powerpc/platforms/powernv/opal-wrappers.S
index bb90f9a4e027..f531ffe35b3e 100644
--- a/arch/powerpc/platforms/powernv/opal-wrappers.S
+++ b/arch/powerpc/platforms/powernv/opal-wrappers.S
@@ -61,6 +61,7 @@ _STATIC(opal_return)
61 mtcr r4; 61 mtcr r4;
62 rfid 62 rfid
63 63
64OPAL_CALL(opal_invalid_call, OPAL_INVALID_CALL);
64OPAL_CALL(opal_console_write, OPAL_CONSOLE_WRITE); 65OPAL_CALL(opal_console_write, OPAL_CONSOLE_WRITE);
65OPAL_CALL(opal_console_read, OPAL_CONSOLE_READ); 66OPAL_CALL(opal_console_read, OPAL_CONSOLE_READ);
66OPAL_CALL(opal_console_write_buffer_space, OPAL_CONSOLE_WRITE_BUFFER_SPACE); 67OPAL_CALL(opal_console_write_buffer_space, OPAL_CONSOLE_WRITE_BUFFER_SPACE);
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index 99e9c2887e21..49d2f00019e5 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -635,3 +635,6 @@ void opal_shutdown(void)
635 mdelay(10); 635 mdelay(10);
636 } 636 }
637} 637}
638
639/* Export this so that test modules can use it */
640EXPORT_SYMBOL_GPL(opal_invalid_call);