From 17d70d6df0c4ea7a203b444001572a91ad9c2bef Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 16 Nov 2010 12:11:15 -0800 Subject: sparc: Remove prom_pathtoinode() Unused. Signed-off-by: David S. Miller --- arch/sparc/include/asm/oplib_32.h | 1 - arch/sparc/include/asm/oplib_64.h | 1 - 2 files changed, 2 deletions(-) (limited to 'arch/sparc/include') diff --git a/arch/sparc/include/asm/oplib_32.h b/arch/sparc/include/asm/oplib_32.h index 51296a6f5005..b0f79beffc3b 100644 --- a/arch/sparc/include/asm/oplib_32.h +++ b/arch/sparc/include/asm/oplib_32.h @@ -238,7 +238,6 @@ extern int prom_node_has_property(phandle node, char *property); extern int prom_setprop(phandle node, const char *prop_name, char *prop_value, int value_size); -extern phandle prom_pathtoinode(char *path); extern phandle prom_inst2pkg(int); /* Dorking with Bus ranges... */ diff --git a/arch/sparc/include/asm/oplib_64.h b/arch/sparc/include/asm/oplib_64.h index c9cc078e3e31..9b01a4b8ae18 100644 --- a/arch/sparc/include/asm/oplib_64.h +++ b/arch/sparc/include/asm/oplib_64.h @@ -279,7 +279,6 @@ extern phandle prom_finddevice(const char *name); extern int prom_setprop(phandle node, const char *prop_name, char *prop_value, int value_size); -extern phandle prom_pathtoinode(const char *path); extern phandle prom_inst2pkg(int); extern int prom_service_exists(const char *service_name); extern void prom_sun4v_guest_soft_state(void); -- cgit v1.2.1 From b148246912bea92bde2a0cba125ca94f1f776b12 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 16 Nov 2010 12:23:20 -0800 Subject: sparc: Kill prom devops_{32,64}.c Completely unused. Signed-off-by: David S. Miller --- arch/sparc/include/asm/oplib_32.h | 19 ------------------- arch/sparc/include/asm/oplib_64.h | 21 --------------------- 2 files changed, 40 deletions(-) (limited to 'arch/sparc/include') diff --git a/arch/sparc/include/asm/oplib_32.h b/arch/sparc/include/asm/oplib_32.h index b0f79beffc3b..1d893fa6374c 100644 --- a/arch/sparc/include/asm/oplib_32.h +++ b/arch/sparc/include/asm/oplib_32.h @@ -60,25 +60,6 @@ extern char *prom_getbootargs(void); extern char *prom_mapio(char *virt_hint, int io_space, unsigned int phys_addr, unsigned int num_bytes); extern void prom_unmapio(char *virt_addr, unsigned int num_bytes); -/* Device operations. */ - -/* Open the device described by the passed string. Note, that the format - * of the string is different on V0 vs. V2->higher proms. The caller must - * know what he/she is doing! Returns the device descriptor, an int. - */ -extern int prom_devopen(char *device_string); - -/* Close a previously opened device described by the passed integer - * descriptor. - */ -extern int prom_devclose(int device_handle); - -/* Do a seek operation on the device described by the passed integer - * descriptor. - */ -extern void prom_seek(int device_handle, unsigned int seek_hival, - unsigned int seek_lowval); - /* Miscellaneous routines, don't really fit in any category per se. */ /* Reboot the machine with the command line passed. */ diff --git a/arch/sparc/include/asm/oplib_64.h b/arch/sparc/include/asm/oplib_64.h index 9b01a4b8ae18..8441d1aa31c8 100644 --- a/arch/sparc/include/asm/oplib_64.h +++ b/arch/sparc/include/asm/oplib_64.h @@ -67,27 +67,6 @@ extern void prom_init(void *cif_handler, void *cif_stack); /* Boot argument acquisition, returns the boot command line string. */ extern char *prom_getbootargs(void); -/* Device utilities. */ - -/* Device operations. */ - -/* Open the device described by the passed string. Note, that the format - * of the string is different on V0 vs. V2->higher proms. The caller must - * know what he/she is doing! Returns the device descriptor, an int. - */ -extern int prom_devopen(const char *device_string); - -/* Close a previously opened device described by the passed integer - * descriptor. - */ -extern int prom_devclose(int device_handle); - -/* Do a seek operation on the device described by the passed integer - * descriptor. - */ -extern void prom_seek(int device_handle, unsigned int seek_hival, - unsigned int seek_lowval); - /* Miscellaneous routines, don't really fit in any category per se. */ /* Reboot the machine with the command line passed. */ -- cgit v1.2.1 From f7b5f55ac1623dfde24ef5319ad77c1746645f3f Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 16 Nov 2010 12:24:16 -0800 Subject: sparc64: Unexport prom_service_exists(). Only used by functions in misc_64.c so make it private to that file. Signed-off-by: David S. Miller --- arch/sparc/include/asm/oplib_64.h | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/sparc/include') diff --git a/arch/sparc/include/asm/oplib_64.h b/arch/sparc/include/asm/oplib_64.h index 8441d1aa31c8..daf02d314279 100644 --- a/arch/sparc/include/asm/oplib_64.h +++ b/arch/sparc/include/asm/oplib_64.h @@ -259,7 +259,6 @@ extern int prom_setprop(phandle node, const char *prop_name, char *prop_value, int value_size); extern phandle prom_inst2pkg(int); -extern int prom_service_exists(const char *service_name); extern void prom_sun4v_guest_soft_state(void); extern int prom_ihandle2path(int handle, char *buffer, int bufsize); -- cgit v1.2.1 From c540ee70e49b573535c7ddfd0e9a0fc9d549c8b7 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 16 Nov 2010 12:50:19 -0800 Subject: sparc64: Delete prom_setcallback(). Unused. Signed-off-by: David S. Miller --- arch/sparc/include/asm/oplib_64.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'arch/sparc/include') diff --git a/arch/sparc/include/asm/oplib_64.h b/arch/sparc/include/asm/oplib_64.h index daf02d314279..56985e300471 100644 --- a/arch/sparc/include/asm/oplib_64.h +++ b/arch/sparc/include/asm/oplib_64.h @@ -88,14 +88,6 @@ extern void prom_halt(void) __attribute__ ((noreturn)); /* Halt and power-off the machine. */ extern void prom_halt_power_off(void) __attribute__ ((noreturn)); -/* Set the PROM 'sync' callback function to the passed function pointer. - * When the user gives the 'sync' command at the prom prompt while the - * kernel is still active, the prom will call this routine. - * - */ -typedef int (*callback_func_t)(long *cmd); -extern void prom_setcallback(callback_func_t func_ptr); - /* Acquire the IDPROM of the root node in the prom device tree. This * gets passed a buffer where you would like it stuffed. The return value * is the format type of this idprom or 0xff on error. -- cgit v1.2.1 From 91921fef7c658b12de53376b312d071d757f7770 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Wed, 17 Nov 2010 10:22:56 -0800 Subject: sparc: Do not export prom_nb{get,put}char(). Never used outside of console_{32,64}.c Signed-off-by: David S. Miller --- arch/sparc/include/asm/oplib_32.h | 6 ------ arch/sparc/include/asm/oplib_64.h | 6 ------ 2 files changed, 12 deletions(-) (limited to 'arch/sparc/include') diff --git a/arch/sparc/include/asm/oplib_32.h b/arch/sparc/include/asm/oplib_32.h index 1d893fa6374c..49fe4266f86a 100644 --- a/arch/sparc/include/asm/oplib_32.h +++ b/arch/sparc/include/asm/oplib_32.h @@ -104,12 +104,6 @@ extern int prom_getprev(void); /* Character operations to/from the console.... */ -/* Non-blocking get character from console. */ -extern int prom_nbgetchar(void); - -/* Non-blocking put character to console. */ -extern int prom_nbputchar(char character); - /* Blocking get character from console. */ extern char prom_getchar(void); diff --git a/arch/sparc/include/asm/oplib_64.h b/arch/sparc/include/asm/oplib_64.h index 56985e300471..d541de4b6844 100644 --- a/arch/sparc/include/asm/oplib_64.h +++ b/arch/sparc/include/asm/oplib_64.h @@ -96,12 +96,6 @@ extern unsigned char prom_get_idprom(char *idp_buffer, int idpbuf_size); /* Character operations to/from the console.... */ -/* Non-blocking get character from console. */ -extern int prom_nbgetchar(void); - -/* Non-blocking put character to console. */ -extern int prom_nbputchar(char character); - /* Blocking get character from console. */ extern char prom_getchar(void); -- cgit v1.2.1 From e62cac1fd035b4cde707285008499dbe71955a86 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 30 Nov 2010 14:33:29 -0800 Subject: sparc: Pass buffer pointer all the way down to prom_{get,put}char(). This gets us closer to being able to eliminate the use of dynamic and stack based buffers, so that we can adhere to the "no buffer addresses above 4GB" rule for PROM calls. Signed-off-by: David S. Miller --- arch/sparc/include/asm/openprom.h | 2 +- arch/sparc/include/asm/oplib_32.h | 4 ++-- arch/sparc/include/asm/oplib_64.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'arch/sparc/include') diff --git a/arch/sparc/include/asm/openprom.h b/arch/sparc/include/asm/openprom.h index 81cd43432dc0..47eaafad15ce 100644 --- a/arch/sparc/include/asm/openprom.h +++ b/arch/sparc/include/asm/openprom.h @@ -39,7 +39,7 @@ struct linux_dev_v2_funcs { int (*v2_dev_open)(char *devpath); void (*v2_dev_close)(int d); int (*v2_dev_read)(int d, char *buf, int nbytes); - int (*v2_dev_write)(int d, char *buf, int nbytes); + int (*v2_dev_write)(int d, const char *buf, int nbytes); int (*v2_dev_seek)(int d, int hi, int lo); /* Never issued (multistage load support) */ diff --git a/arch/sparc/include/asm/oplib_32.h b/arch/sparc/include/asm/oplib_32.h index 49fe4266f86a..4c2539243e46 100644 --- a/arch/sparc/include/asm/oplib_32.h +++ b/arch/sparc/include/asm/oplib_32.h @@ -105,10 +105,10 @@ extern int prom_getprev(void); /* Character operations to/from the console.... */ /* Blocking get character from console. */ -extern char prom_getchar(void); +extern void prom_getchar(char *buf); /* Blocking put character to console. */ -extern void prom_putchar(char character); +extern void prom_putchar(const char *buf); /* Prom's internal routines, don't use in kernel/boot code. */ extern void prom_printf(const char *fmt, ...); diff --git a/arch/sparc/include/asm/oplib_64.h b/arch/sparc/include/asm/oplib_64.h index d541de4b6844..384e558a6a3c 100644 --- a/arch/sparc/include/asm/oplib_64.h +++ b/arch/sparc/include/asm/oplib_64.h @@ -97,10 +97,10 @@ extern unsigned char prom_get_idprom(char *idp_buffer, int idpbuf_size); /* Character operations to/from the console.... */ /* Blocking get character from console. */ -extern char prom_getchar(void); +extern void prom_getchar(char *buf); /* Blocking put character to console. */ -extern void prom_putchar(char character); +extern void prom_putchar(const char *buf); /* Prom's internal routines, don't use in kernel/boot code. */ extern void prom_printf(const char *fmt, ...); -- cgit v1.2.1 From 12c7a35ee6a1c605e740733f2cbd5b5079f09f0f Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 30 Nov 2010 14:53:05 -0800 Subject: sparc: Delete prom_*getchar(). Completely unused. Signed-off-by: David S. Miller --- arch/sparc/include/asm/oplib_32.h | 5 ----- arch/sparc/include/asm/oplib_64.h | 5 ----- 2 files changed, 10 deletions(-) (limited to 'arch/sparc/include') diff --git a/arch/sparc/include/asm/oplib_32.h b/arch/sparc/include/asm/oplib_32.h index 4c2539243e46..40bc9efb1ac4 100644 --- a/arch/sparc/include/asm/oplib_32.h +++ b/arch/sparc/include/asm/oplib_32.h @@ -102,11 +102,6 @@ extern int prom_getrev(void); /* Get the prom firmware revision. */ extern int prom_getprev(void); -/* Character operations to/from the console.... */ - -/* Blocking get character from console. */ -extern void prom_getchar(char *buf); - /* Blocking put character to console. */ extern void prom_putchar(const char *buf); diff --git a/arch/sparc/include/asm/oplib_64.h b/arch/sparc/include/asm/oplib_64.h index 384e558a6a3c..d4613738c537 100644 --- a/arch/sparc/include/asm/oplib_64.h +++ b/arch/sparc/include/asm/oplib_64.h @@ -94,11 +94,6 @@ extern void prom_halt_power_off(void) __attribute__ ((noreturn)); */ extern unsigned char prom_get_idprom(char *idp_buffer, int idpbuf_size); -/* Character operations to/from the console.... */ - -/* Blocking get character from console. */ -extern void prom_getchar(char *buf); - /* Blocking put character to console. */ extern void prom_putchar(const char *buf); -- cgit v1.2.1 From 595a251c0740785fd3c0d2156d78578c7479811e Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 30 Nov 2010 20:15:58 -0800 Subject: sparc: Write to prom console using indirect buffer. sparc64 systems have a restriction in that passing in buffer addressses above 4GB to prom calls is not reliable. We end up violating this when we do prom console writes, because we use an on-stack buffer to translate '\n' into '\r\n'. So instead, do this translation into an intermediate buffer, which is in the kernel image and thus below 4GB, then pass that to the PROM console write calls. On the 32-bit side we don't have to deal with any of these issues, so the new prom_console_write_buf() uses the existing prom_nbputchar() implementation. However we can now mark those routines static. Since the 64-bit side completely uses new code we can delete the putchar bits as they are now completely unused. Signed-off-by: David S. Miller --- arch/sparc/include/asm/oplib_32.h | 4 ++-- arch/sparc/include/asm/oplib_64.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/sparc/include') diff --git a/arch/sparc/include/asm/oplib_32.h b/arch/sparc/include/asm/oplib_32.h index 40bc9efb1ac4..9e5c64084b86 100644 --- a/arch/sparc/include/asm/oplib_32.h +++ b/arch/sparc/include/asm/oplib_32.h @@ -102,8 +102,8 @@ extern int prom_getrev(void); /* Get the prom firmware revision. */ extern int prom_getprev(void); -/* Blocking put character to console. */ -extern void prom_putchar(const char *buf); +/* Write a buffer of characters to the console. */ +extern void prom_console_write_buf(const char *buf, int len); /* Prom's internal routines, don't use in kernel/boot code. */ extern void prom_printf(const char *fmt, ...); diff --git a/arch/sparc/include/asm/oplib_64.h b/arch/sparc/include/asm/oplib_64.h index d4613738c537..8cd0df34e82b 100644 --- a/arch/sparc/include/asm/oplib_64.h +++ b/arch/sparc/include/asm/oplib_64.h @@ -94,8 +94,8 @@ extern void prom_halt_power_off(void) __attribute__ ((noreturn)); */ extern unsigned char prom_get_idprom(char *idp_buffer, int idpbuf_size); -/* Blocking put character to console. */ -extern void prom_putchar(const char *buf); +/* Write a buffer of characters to the console. */ +extern void prom_console_write_buf(const char *buf, int len); /* Prom's internal routines, don't use in kernel/boot code. */ extern void prom_printf(const char *fmt, ...); -- cgit v1.2.1