diff options
Diffstat (limited to 'drivers/misc/ibmasm')
| -rw-r--r-- | drivers/misc/ibmasm/command.c | 14 | ||||
| -rw-r--r-- | drivers/misc/ibmasm/dot_command.c | 10 | ||||
| -rw-r--r-- | drivers/misc/ibmasm/dot_command.h | 2 | ||||
| -rw-r--r-- | drivers/misc/ibmasm/event.c | 8 | ||||
| -rw-r--r-- | drivers/misc/ibmasm/heartbeat.c | 2 | ||||
| -rw-r--r-- | drivers/misc/ibmasm/i2o.h | 10 | ||||
| -rw-r--r-- | drivers/misc/ibmasm/ibmasm.h | 70 | ||||
| -rw-r--r-- | drivers/misc/ibmasm/ibmasmfs.c | 24 | ||||
| -rw-r--r-- | drivers/misc/ibmasm/lowlevel.c | 2 | ||||
| -rw-r--r-- | drivers/misc/ibmasm/lowlevel.h | 16 | ||||
| -rw-r--r-- | drivers/misc/ibmasm/module.c | 10 | ||||
| -rw-r--r-- | drivers/misc/ibmasm/r_heartbeat.c | 10 | ||||
| -rw-r--r-- | drivers/misc/ibmasm/remote.c | 37 | ||||
| -rw-r--r-- | drivers/misc/ibmasm/remote.h | 8 | ||||
| -rw-r--r-- | drivers/misc/ibmasm/uart.c | 2 |
15 files changed, 112 insertions, 113 deletions
diff --git a/drivers/misc/ibmasm/command.c b/drivers/misc/ibmasm/command.c index 07a085ccbd5b..b5df347c81b9 100644 --- a/drivers/misc/ibmasm/command.c +++ b/drivers/misc/ibmasm/command.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | * | 18 | * |
| 19 | * Copyright (C) IBM Corporation, 2004 | 19 | * Copyright (C) IBM Corporation, 2004 |
| 20 | * | 20 | * |
| 21 | * Author: Max Asböck <amax@us.ibm.com> | 21 | * Author: Max Asböck <amax@us.ibm.com> |
| 22 | * | 22 | * |
| 23 | */ | 23 | */ |
| 24 | 24 | ||
| @@ -72,7 +72,7 @@ struct command *ibmasm_new_command(struct service_processor *sp, size_t buffer_s | |||
| 72 | static void free_command(struct kobject *kobj) | 72 | static void free_command(struct kobject *kobj) |
| 73 | { | 73 | { |
| 74 | struct command *cmd = to_command(kobj); | 74 | struct command *cmd = to_command(kobj); |
| 75 | 75 | ||
| 76 | list_del(&cmd->queue_node); | 76 | list_del(&cmd->queue_node); |
| 77 | atomic_dec(&command_count); | 77 | atomic_dec(&command_count); |
| 78 | dbg("command count: %d\n", atomic_read(&command_count)); | 78 | dbg("command count: %d\n", atomic_read(&command_count)); |
| @@ -113,14 +113,14 @@ static inline void do_exec_command(struct service_processor *sp) | |||
| 113 | exec_next_command(sp); | 113 | exec_next_command(sp); |
| 114 | } | 114 | } |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | /** | 117 | /** |
| 118 | * exec_command | 118 | * exec_command |
| 119 | * send a command to a service processor | 119 | * send a command to a service processor |
| 120 | * Commands are executed sequentially. One command (sp->current_command) | 120 | * Commands are executed sequentially. One command (sp->current_command) |
| 121 | * is sent to the service processor. Once the interrupt handler gets a | 121 | * is sent to the service processor. Once the interrupt handler gets a |
| 122 | * message of type command_response, the message is copied into | 122 | * message of type command_response, the message is copied into |
| 123 | * the current commands buffer, | 123 | * the current commands buffer, |
| 124 | */ | 124 | */ |
| 125 | void ibmasm_exec_command(struct service_processor *sp, struct command *cmd) | 125 | void ibmasm_exec_command(struct service_processor *sp, struct command *cmd) |
| 126 | { | 126 | { |
| @@ -160,7 +160,7 @@ static void exec_next_command(struct service_processor *sp) | |||
| 160 | } | 160 | } |
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | /** | 163 | /** |
| 164 | * Sleep until a command has failed or a response has been received | 164 | * Sleep until a command has failed or a response has been received |
| 165 | * and the command status been updated by the interrupt handler. | 165 | * and the command status been updated by the interrupt handler. |
| 166 | * (see receive_response). | 166 | * (see receive_response). |
| @@ -182,8 +182,8 @@ void ibmasm_receive_command_response(struct service_processor *sp, void *respons | |||
| 182 | { | 182 | { |
| 183 | struct command *cmd = sp->current_command; | 183 | struct command *cmd = sp->current_command; |
| 184 | 184 | ||
| 185 | if (!sp->current_command) | 185 | if (!sp->current_command) |
| 186 | return; | 186 | return; |
| 187 | 187 | ||
| 188 | memcpy_fromio(cmd->buffer, response, min(size, cmd->buffer_size)); | 188 | memcpy_fromio(cmd->buffer, response, min(size, cmd->buffer_size)); |
| 189 | cmd->status = IBMASM_CMD_COMPLETE; | 189 | cmd->status = IBMASM_CMD_COMPLETE; |
diff --git a/drivers/misc/ibmasm/dot_command.c b/drivers/misc/ibmasm/dot_command.c index 13c52f866e2e..3dd2dfb8da17 100644 --- a/drivers/misc/ibmasm/dot_command.c +++ b/drivers/misc/ibmasm/dot_command.c | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | * | 17 | * |
| 18 | * Copyright (C) IBM Corporation, 2004 | 18 | * Copyright (C) IBM Corporation, 2004 |
| 19 | * | 19 | * |
| 20 | * Author: Max Asböck <amax@us.ibm.com> | 20 | * Author: Max Asböck <amax@us.ibm.com> |
| 21 | * | 21 | * |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
| @@ -44,11 +44,11 @@ void ibmasm_receive_message(struct service_processor *sp, void *message, int mes | |||
| 44 | size = message_size; | 44 | size = message_size; |
| 45 | 45 | ||
| 46 | switch (header->type) { | 46 | switch (header->type) { |
| 47 | case sp_event: | 47 | case sp_event: |
| 48 | ibmasm_receive_event(sp, message, size); | 48 | ibmasm_receive_event(sp, message, size); |
| 49 | break; | 49 | break; |
| 50 | case sp_command_response: | 50 | case sp_command_response: |
| 51 | ibmasm_receive_command_response(sp, message, size); | 51 | ibmasm_receive_command_response(sp, message, size); |
| 52 | break; | 52 | break; |
| 53 | case sp_heartbeat: | 53 | case sp_heartbeat: |
| 54 | ibmasm_receive_heartbeat(sp, message, size); | 54 | ibmasm_receive_heartbeat(sp, message, size); |
| @@ -95,7 +95,7 @@ int ibmasm_send_driver_vpd(struct service_processor *sp) | |||
| 95 | strcat(vpd_data, IBMASM_DRIVER_VPD); | 95 | strcat(vpd_data, IBMASM_DRIVER_VPD); |
| 96 | vpd_data[10] = 0; | 96 | vpd_data[10] = 0; |
| 97 | vpd_data[15] = 0; | 97 | vpd_data[15] = 0; |
| 98 | 98 | ||
| 99 | ibmasm_exec_command(sp, command); | 99 | ibmasm_exec_command(sp, command); |
| 100 | ibmasm_wait_for_response(command, IBMASM_CMD_TIMEOUT_NORMAL); | 100 | ibmasm_wait_for_response(command, IBMASM_CMD_TIMEOUT_NORMAL); |
| 101 | 101 | ||
| @@ -118,7 +118,7 @@ struct os_state_command { | |||
| 118 | * During driver init this function is called with os state "up". | 118 | * During driver init this function is called with os state "up". |
| 119 | * This causes the service processor to start sending heartbeats the | 119 | * This causes the service processor to start sending heartbeats the |
| 120 | * driver. | 120 | * driver. |
| 121 | * During driver exit the function is called with os state "down", | 121 | * During driver exit the function is called with os state "down", |
| 122 | * causing the service processor to stop the heartbeats. | 122 | * causing the service processor to stop the heartbeats. |
| 123 | */ | 123 | */ |
| 124 | int ibmasm_send_os_state(struct service_processor *sp, int os_state) | 124 | int ibmasm_send_os_state(struct service_processor *sp, int os_state) |
diff --git a/drivers/misc/ibmasm/dot_command.h b/drivers/misc/ibmasm/dot_command.h index 2d21c2741b6a..6cbba1afef35 100644 --- a/drivers/misc/ibmasm/dot_command.h +++ b/drivers/misc/ibmasm/dot_command.h | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | * | 17 | * |
| 18 | * Copyright (C) IBM Corporation, 2004 | 18 | * Copyright (C) IBM Corporation, 2004 |
| 19 | * | 19 | * |
| 20 | * Author: Max Asböck <amax@us.ibm.com> | 20 | * Author: Max Asböck <amax@us.ibm.com> |
| 21 | * | 21 | * |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
diff --git a/drivers/misc/ibmasm/event.c b/drivers/misc/ibmasm/event.c index fe1e819235a4..fda6a4d3bf23 100644 --- a/drivers/misc/ibmasm/event.c +++ b/drivers/misc/ibmasm/event.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | * | 18 | * |
| 19 | * Copyright (C) IBM Corporation, 2004 | 19 | * Copyright (C) IBM Corporation, 2004 |
| 20 | * | 20 | * |
| 21 | * Author: Max Asböck <amax@us.ibm.com> | 21 | * Author: Max Asböck <amax@us.ibm.com> |
| 22 | * | 22 | * |
| 23 | */ | 23 | */ |
| 24 | 24 | ||
| @@ -51,7 +51,7 @@ static void wake_up_event_readers(struct service_processor *sp) | |||
| 51 | * event readers. | 51 | * event readers. |
| 52 | * There is no reader marker in the buffer, therefore readers are | 52 | * There is no reader marker in the buffer, therefore readers are |
| 53 | * responsible for keeping up with the writer, or they will loose events. | 53 | * responsible for keeping up with the writer, or they will loose events. |
| 54 | */ | 54 | */ |
| 55 | void ibmasm_receive_event(struct service_processor *sp, void *data, unsigned int data_size) | 55 | void ibmasm_receive_event(struct service_processor *sp, void *data, unsigned int data_size) |
| 56 | { | 56 | { |
| 57 | struct event_buffer *buffer = sp->event_buffer; | 57 | struct event_buffer *buffer = sp->event_buffer; |
| @@ -77,13 +77,13 @@ void ibmasm_receive_event(struct service_processor *sp, void *data, unsigned int | |||
| 77 | 77 | ||
| 78 | static inline int event_available(struct event_buffer *b, struct event_reader *r) | 78 | static inline int event_available(struct event_buffer *b, struct event_reader *r) |
| 79 | { | 79 | { |
| 80 | return (r->next_serial_number < b->next_serial_number); | 80 | return (r->next_serial_number < b->next_serial_number); |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | /** | 83 | /** |
| 84 | * get_next_event | 84 | * get_next_event |
| 85 | * Called by event readers (initiated from user space through the file | 85 | * Called by event readers (initiated from user space through the file |
| 86 | * system). | 86 | * system). |
| 87 | * Sleeps until a new event is available. | 87 | * Sleeps until a new event is available. |
| 88 | */ | 88 | */ |
| 89 | int ibmasm_get_next_event(struct service_processor *sp, struct event_reader *reader) | 89 | int ibmasm_get_next_event(struct service_processor *sp, struct event_reader *reader) |
diff --git a/drivers/misc/ibmasm/heartbeat.c b/drivers/misc/ibmasm/heartbeat.c index 7fd7a43e38de..3036e785b3e4 100644 --- a/drivers/misc/ibmasm/heartbeat.c +++ b/drivers/misc/ibmasm/heartbeat.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | * | 18 | * |
| 19 | * Copyright (C) IBM Corporation, 2004 | 19 | * Copyright (C) IBM Corporation, 2004 |
| 20 | * | 20 | * |
| 21 | * Author: Max Asböck <amax@us.ibm.com> | 21 | * Author: Max Asböck <amax@us.ibm.com> |
| 22 | * | 22 | * |
| 23 | */ | 23 | */ |
| 24 | 24 | ||
diff --git a/drivers/misc/ibmasm/i2o.h b/drivers/misc/ibmasm/i2o.h index 958c957a5e75..bf2c738d2b72 100644 --- a/drivers/misc/ibmasm/i2o.h +++ b/drivers/misc/ibmasm/i2o.h | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | * | 17 | * |
| 18 | * Copyright (C) IBM Corporation, 2004 | 18 | * Copyright (C) IBM Corporation, 2004 |
| 19 | * | 19 | * |
| 20 | * Author: Max Asböck <amax@us.ibm.com> | 20 | * Author: Max Asböck <amax@us.ibm.com> |
| 21 | * | 21 | * |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
| @@ -26,9 +26,9 @@ struct i2o_header { | |||
| 26 | u8 version; | 26 | u8 version; |
| 27 | u8 message_flags; | 27 | u8 message_flags; |
| 28 | u16 message_size; | 28 | u16 message_size; |
| 29 | u8 target; | 29 | u8 target; |
| 30 | u8 initiator_and_target; | 30 | u8 initiator_and_target; |
| 31 | u8 initiator; | 31 | u8 initiator; |
| 32 | u8 function; | 32 | u8 function; |
| 33 | u32 initiator_context; | 33 | u32 initiator_context; |
| 34 | }; | 34 | }; |
| @@ -64,12 +64,12 @@ static inline unsigned short outgoing_message_size(unsigned int data_size) | |||
| 64 | size = sizeof(struct i2o_header) + data_size; | 64 | size = sizeof(struct i2o_header) + data_size; |
| 65 | 65 | ||
| 66 | i2o_size = size / sizeof(u32); | 66 | i2o_size = size / sizeof(u32); |
| 67 | 67 | ||
| 68 | if (size % sizeof(u32)) | 68 | if (size % sizeof(u32)) |
| 69 | i2o_size++; | 69 | i2o_size++; |
| 70 | 70 | ||
| 71 | return i2o_size; | 71 | return i2o_size; |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | static inline u32 incoming_data_size(struct i2o_message *i2o_message) | 74 | static inline u32 incoming_data_size(struct i2o_message *i2o_message) |
| 75 | { | 75 | { |
diff --git a/drivers/misc/ibmasm/ibmasm.h b/drivers/misc/ibmasm/ibmasm.h index 48d5abebfc30..de860bc6d3f5 100644 --- a/drivers/misc/ibmasm/ibmasm.h +++ b/drivers/misc/ibmasm/ibmasm.h | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | * | 18 | * |
| 19 | * Copyright (C) IBM Corporation, 2004 | 19 | * Copyright (C) IBM Corporation, 2004 |
| 20 | * | 20 | * |
| 21 | * Author: Max Asböck <amax@us.ibm.com> | 21 | * Author: Max Asböck <amax@us.ibm.com> |
| 22 | * | 22 | * |
| 23 | */ | 23 | */ |
| 24 | 24 | ||
| @@ -58,8 +58,8 @@ static inline char *get_timestamp(char *buf) | |||
| 58 | return buf; | 58 | return buf; |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | #define IBMASM_CMD_PENDING 0 | 61 | #define IBMASM_CMD_PENDING 0 |
| 62 | #define IBMASM_CMD_COMPLETE 1 | 62 | #define IBMASM_CMD_COMPLETE 1 |
| 63 | #define IBMASM_CMD_FAILED 2 | 63 | #define IBMASM_CMD_FAILED 2 |
| 64 | 64 | ||
| 65 | #define IBMASM_CMD_TIMEOUT_NORMAL 45 | 65 | #define IBMASM_CMD_TIMEOUT_NORMAL 45 |
| @@ -163,55 +163,55 @@ struct service_processor { | |||
| 163 | }; | 163 | }; |
| 164 | 164 | ||
| 165 | /* command processing */ | 165 | /* command processing */ |
| 166 | extern struct command *ibmasm_new_command(struct service_processor *sp, size_t buffer_size); | 166 | struct command *ibmasm_new_command(struct service_processor *sp, size_t buffer_size); |
| 167 | extern void ibmasm_exec_command(struct service_processor *sp, struct command *cmd); | 167 | void ibmasm_exec_command(struct service_processor *sp, struct command *cmd); |
| 168 | extern void ibmasm_wait_for_response(struct command *cmd, int timeout); | 168 | void ibmasm_wait_for_response(struct command *cmd, int timeout); |
| 169 | extern void ibmasm_receive_command_response(struct service_processor *sp, void *response, size_t size); | 169 | void ibmasm_receive_command_response(struct service_processor *sp, void *response, size_t size); |
| 170 | 170 | ||
| 171 | /* event processing */ | 171 | /* event processing */ |
| 172 | extern int ibmasm_event_buffer_init(struct service_processor *sp); | 172 | int ibmasm_event_buffer_init(struct service_processor *sp); |
| 173 | extern void ibmasm_event_buffer_exit(struct service_processor *sp); | 173 | void ibmasm_event_buffer_exit(struct service_processor *sp); |
| 174 | extern void ibmasm_receive_event(struct service_processor *sp, void *data, unsigned int data_size); | 174 | void ibmasm_receive_event(struct service_processor *sp, void *data, unsigned int data_size); |
| 175 | extern void ibmasm_event_reader_register(struct service_processor *sp, struct event_reader *reader); | 175 | void ibmasm_event_reader_register(struct service_processor *sp, struct event_reader *reader); |
| 176 | extern void ibmasm_event_reader_unregister(struct service_processor *sp, struct event_reader *reader); | 176 | void ibmasm_event_reader_unregister(struct service_processor *sp, struct event_reader *reader); |
| 177 | extern int ibmasm_get_next_event(struct service_processor *sp, struct event_reader *reader); | 177 | int ibmasm_get_next_event(struct service_processor *sp, struct event_reader *reader); |
| 178 | extern void ibmasm_cancel_next_event(struct event_reader *reader); | 178 | void ibmasm_cancel_next_event(struct event_reader *reader); |
| 179 | 179 | ||
| 180 | /* heartbeat - from SP to OS */ | 180 | /* heartbeat - from SP to OS */ |
| 181 | extern void ibmasm_register_panic_notifier(void); | 181 | void ibmasm_register_panic_notifier(void); |
| 182 | extern void ibmasm_unregister_panic_notifier(void); | 182 | void ibmasm_unregister_panic_notifier(void); |
| 183 | extern int ibmasm_heartbeat_init(struct service_processor *sp); | 183 | int ibmasm_heartbeat_init(struct service_processor *sp); |
| 184 | extern void ibmasm_heartbeat_exit(struct service_processor *sp); | 184 | void ibmasm_heartbeat_exit(struct service_processor *sp); |
| 185 | extern void ibmasm_receive_heartbeat(struct service_processor *sp, void *message, size_t size); | 185 | void ibmasm_receive_heartbeat(struct service_processor *sp, void *message, size_t size); |
| 186 | 186 | ||
| 187 | /* reverse heartbeat - from OS to SP */ | 187 | /* reverse heartbeat - from OS to SP */ |
| 188 | extern void ibmasm_init_reverse_heartbeat(struct service_processor *sp, struct reverse_heartbeat *rhb); | 188 | void ibmasm_init_reverse_heartbeat(struct service_processor *sp, struct reverse_heartbeat *rhb); |
| 189 | extern int ibmasm_start_reverse_heartbeat(struct service_processor *sp, struct reverse_heartbeat *rhb); | 189 | int ibmasm_start_reverse_heartbeat(struct service_processor *sp, struct reverse_heartbeat *rhb); |
| 190 | extern void ibmasm_stop_reverse_heartbeat(struct reverse_heartbeat *rhb); | 190 | void ibmasm_stop_reverse_heartbeat(struct reverse_heartbeat *rhb); |
| 191 | 191 | ||
| 192 | /* dot commands */ | 192 | /* dot commands */ |
| 193 | extern void ibmasm_receive_message(struct service_processor *sp, void *data, int data_size); | 193 | void ibmasm_receive_message(struct service_processor *sp, void *data, int data_size); |
| 194 | extern int ibmasm_send_driver_vpd(struct service_processor *sp); | 194 | int ibmasm_send_driver_vpd(struct service_processor *sp); |
| 195 | extern int ibmasm_send_os_state(struct service_processor *sp, int os_state); | 195 | int ibmasm_send_os_state(struct service_processor *sp, int os_state); |
| 196 | 196 | ||
| 197 | /* low level message processing */ | 197 | /* low level message processing */ |
| 198 | extern int ibmasm_send_i2o_message(struct service_processor *sp); | 198 | int ibmasm_send_i2o_message(struct service_processor *sp); |
| 199 | extern irqreturn_t ibmasm_interrupt_handler(int irq, void * dev_id); | 199 | irqreturn_t ibmasm_interrupt_handler(int irq, void * dev_id); |
| 200 | 200 | ||
| 201 | /* remote console */ | 201 | /* remote console */ |
| 202 | extern void ibmasm_handle_mouse_interrupt(struct service_processor *sp); | 202 | void ibmasm_handle_mouse_interrupt(struct service_processor *sp); |
| 203 | extern int ibmasm_init_remote_input_dev(struct service_processor *sp); | 203 | int ibmasm_init_remote_input_dev(struct service_processor *sp); |
| 204 | extern void ibmasm_free_remote_input_dev(struct service_processor *sp); | 204 | void ibmasm_free_remote_input_dev(struct service_processor *sp); |
| 205 | 205 | ||
| 206 | /* file system */ | 206 | /* file system */ |
| 207 | extern int ibmasmfs_register(void); | 207 | int ibmasmfs_register(void); |
| 208 | extern void ibmasmfs_unregister(void); | 208 | void ibmasmfs_unregister(void); |
| 209 | extern void ibmasmfs_add_sp(struct service_processor *sp); | 209 | void ibmasmfs_add_sp(struct service_processor *sp); |
| 210 | 210 | ||
| 211 | /* uart */ | 211 | /* uart */ |
| 212 | #ifdef CONFIG_SERIAL_8250 | 212 | #ifdef CONFIG_SERIAL_8250 |
| 213 | extern void ibmasm_register_uart(struct service_processor *sp); | 213 | void ibmasm_register_uart(struct service_processor *sp); |
| 214 | extern void ibmasm_unregister_uart(struct service_processor *sp); | 214 | void ibmasm_unregister_uart(struct service_processor *sp); |
| 215 | #else | 215 | #else |
| 216 | #define ibmasm_register_uart(sp) do { } while(0) | 216 | #define ibmasm_register_uart(sp) do { } while(0) |
| 217 | #define ibmasm_unregister_uart(sp) do { } while(0) | 217 | #define ibmasm_unregister_uart(sp) do { } while(0) |
diff --git a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c index c436d3de8b8b..eb7b073734b8 100644 --- a/drivers/misc/ibmasm/ibmasmfs.c +++ b/drivers/misc/ibmasm/ibmasmfs.c | |||
| @@ -17,12 +17,12 @@ | |||
| 17 | * | 17 | * |
| 18 | * Copyright (C) IBM Corporation, 2004 | 18 | * Copyright (C) IBM Corporation, 2004 |
| 19 | * | 19 | * |
| 20 | * Author: Max Asböck <amax@us.ibm.com> | 20 | * Author: Max Asböck <amax@us.ibm.com> |
| 21 | * | 21 | * |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
| 24 | /* | 24 | /* |
| 25 | * Parts of this code are based on an article by Jonathan Corbet | 25 | * Parts of this code are based on an article by Jonathan Corbet |
| 26 | * that appeared in Linux Weekly News. | 26 | * that appeared in Linux Weekly News. |
| 27 | */ | 27 | */ |
| 28 | 28 | ||
| @@ -55,22 +55,22 @@ | |||
| 55 | * For each service processor the following files are created: | 55 | * For each service processor the following files are created: |
| 56 | * | 56 | * |
| 57 | * command: execute dot commands | 57 | * command: execute dot commands |
| 58 | * write: execute a dot command on the service processor | 58 | * write: execute a dot command on the service processor |
| 59 | * read: return the result of a previously executed dot command | 59 | * read: return the result of a previously executed dot command |
| 60 | * | 60 | * |
| 61 | * events: listen for service processor events | 61 | * events: listen for service processor events |
| 62 | * read: sleep (interruptible) until an event occurs | 62 | * read: sleep (interruptible) until an event occurs |
| 63 | * write: wakeup sleeping event listener | 63 | * write: wakeup sleeping event listener |
| 64 | * | 64 | * |
| 65 | * reverse_heartbeat: send a heartbeat to the service processor | 65 | * reverse_heartbeat: send a heartbeat to the service processor |
| 66 | * read: sleep (interruptible) until the reverse heartbeat fails | 66 | * read: sleep (interruptible) until the reverse heartbeat fails |
| 67 | * write: wakeup sleeping heartbeat listener | 67 | * write: wakeup sleeping heartbeat listener |
| 68 | * | 68 | * |
| 69 | * remote_video/width | 69 | * remote_video/width |
| 70 | * remote_video/height | 70 | * remote_video/height |
| 71 | * remote_video/width: control remote display settings | 71 | * remote_video/width: control remote display settings |
| 72 | * write: set value | 72 | * write: set value |
| 73 | * read: read value | 73 | * read: read value |
| 74 | */ | 74 | */ |
| 75 | 75 | ||
| 76 | #include <linux/fs.h> | 76 | #include <linux/fs.h> |
| @@ -155,7 +155,7 @@ static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode) | |||
| 155 | 155 | ||
| 156 | static struct dentry *ibmasmfs_create_file (struct super_block *sb, | 156 | static struct dentry *ibmasmfs_create_file (struct super_block *sb, |
| 157 | struct dentry *parent, | 157 | struct dentry *parent, |
| 158 | const char *name, | 158 | const char *name, |
| 159 | const struct file_operations *fops, | 159 | const struct file_operations *fops, |
| 160 | void *data, | 160 | void *data, |
| 161 | int mode) | 161 | int mode) |
| @@ -261,7 +261,7 @@ static int command_file_close(struct inode *inode, struct file *file) | |||
| 261 | struct ibmasmfs_command_data *command_data = file->private_data; | 261 | struct ibmasmfs_command_data *command_data = file->private_data; |
| 262 | 262 | ||
| 263 | if (command_data->command) | 263 | if (command_data->command) |
| 264 | command_put(command_data->command); | 264 | command_put(command_data->command); |
| 265 | 265 | ||
| 266 | kfree(command_data); | 266 | kfree(command_data); |
| 267 | return 0; | 267 | return 0; |
| @@ -348,7 +348,7 @@ static ssize_t command_file_write(struct file *file, const char __user *ubuff, s | |||
| 348 | static int event_file_open(struct inode *inode, struct file *file) | 348 | static int event_file_open(struct inode *inode, struct file *file) |
| 349 | { | 349 | { |
| 350 | struct ibmasmfs_event_data *event_data; | 350 | struct ibmasmfs_event_data *event_data; |
| 351 | struct service_processor *sp; | 351 | struct service_processor *sp; |
| 352 | 352 | ||
| 353 | if (!inode->i_private) | 353 | if (!inode->i_private) |
| 354 | return -ENODEV; | 354 | return -ENODEV; |
| @@ -573,7 +573,7 @@ static ssize_t remote_settings_file_write(struct file *file, const char __user * | |||
| 573 | kfree(buff); | 573 | kfree(buff); |
| 574 | return -EFAULT; | 574 | return -EFAULT; |
| 575 | } | 575 | } |
| 576 | 576 | ||
| 577 | value = simple_strtoul(buff, NULL, 10); | 577 | value = simple_strtoul(buff, NULL, 10); |
| 578 | writel(value, address); | 578 | writel(value, address); |
| 579 | kfree(buff); | 579 | kfree(buff); |
diff --git a/drivers/misc/ibmasm/lowlevel.c b/drivers/misc/ibmasm/lowlevel.c index a3c589b7cbfa..4b2398e27fd5 100644 --- a/drivers/misc/ibmasm/lowlevel.c +++ b/drivers/misc/ibmasm/lowlevel.c | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | * | 17 | * |
| 18 | * Copyright (C) IBM Corporation, 2004 | 18 | * Copyright (C) IBM Corporation, 2004 |
| 19 | * | 19 | * |
| 20 | * Author: Max Asböck <amax@us.ibm.com> | 20 | * Author: Max Asböck <amax@us.ibm.com> |
| 21 | * | 21 | * |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
diff --git a/drivers/misc/ibmasm/lowlevel.h b/drivers/misc/ibmasm/lowlevel.h index e5ed59c589aa..766766523a60 100644 --- a/drivers/misc/ibmasm/lowlevel.h +++ b/drivers/misc/ibmasm/lowlevel.h | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | * | 17 | * |
| 18 | * Copyright (C) IBM Corporation, 2004 | 18 | * Copyright (C) IBM Corporation, 2004 |
| 19 | * | 19 | * |
| 20 | * Author: Max Asböck <amax@us.ibm.com> | 20 | * Author: Max Asböck <amax@us.ibm.com> |
| 21 | * | 21 | * |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
| @@ -48,9 +48,9 @@ | |||
| 48 | #define INTR_CONTROL_REGISTER 0x13A4 | 48 | #define INTR_CONTROL_REGISTER 0x13A4 |
| 49 | 49 | ||
| 50 | #define SCOUT_COM_A_BASE 0x0000 | 50 | #define SCOUT_COM_A_BASE 0x0000 |
| 51 | #define SCOUT_COM_B_BASE 0x0100 | 51 | #define SCOUT_COM_B_BASE 0x0100 |
| 52 | #define SCOUT_COM_C_BASE 0x0200 | 52 | #define SCOUT_COM_C_BASE 0x0200 |
| 53 | #define SCOUT_COM_D_BASE 0x0300 | 53 | #define SCOUT_COM_D_BASE 0x0300 |
| 54 | 54 | ||
| 55 | static inline int sp_interrupt_pending(void __iomem *base_address) | 55 | static inline int sp_interrupt_pending(void __iomem *base_address) |
| 56 | { | 56 | { |
| @@ -86,12 +86,12 @@ static inline void disable_sp_interrupts(void __iomem *base_address) | |||
| 86 | 86 | ||
| 87 | static inline void enable_uart_interrupts(void __iomem *base_address) | 87 | static inline void enable_uart_interrupts(void __iomem *base_address) |
| 88 | { | 88 | { |
| 89 | ibmasm_enable_interrupts(base_address, UART_INTR_MASK); | 89 | ibmasm_enable_interrupts(base_address, UART_INTR_MASK); |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | static inline void disable_uart_interrupts(void __iomem *base_address) | 92 | static inline void disable_uart_interrupts(void __iomem *base_address) |
| 93 | { | 93 | { |
| 94 | ibmasm_disable_interrupts(base_address, UART_INTR_MASK); | 94 | ibmasm_disable_interrupts(base_address, UART_INTR_MASK); |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | #define valid_mfa(mfa) ( (mfa) != NO_MFAS_AVAILABLE ) | 97 | #define valid_mfa(mfa) ( (mfa) != NO_MFAS_AVAILABLE ) |
| @@ -111,7 +111,7 @@ static inline u32 get_mfa_outbound(void __iomem *base_address) | |||
| 111 | 111 | ||
| 112 | static inline void set_mfa_outbound(void __iomem *base_address, u32 mfa) | 112 | static inline void set_mfa_outbound(void __iomem *base_address, u32 mfa) |
| 113 | { | 113 | { |
| 114 | writel(mfa, base_address + OUTBOUND_QUEUE_PORT); | 114 | writel(mfa, base_address + OUTBOUND_QUEUE_PORT); |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | static inline u32 get_mfa_inbound(void __iomem *base_address) | 117 | static inline u32 get_mfa_inbound(void __iomem *base_address) |
| @@ -126,7 +126,7 @@ static inline u32 get_mfa_inbound(void __iomem *base_address) | |||
| 126 | 126 | ||
| 127 | static inline void set_mfa_inbound(void __iomem *base_address, u32 mfa) | 127 | static inline void set_mfa_inbound(void __iomem *base_address, u32 mfa) |
| 128 | { | 128 | { |
| 129 | writel(mfa, base_address + INBOUND_QUEUE_PORT); | 129 | writel(mfa, base_address + INBOUND_QUEUE_PORT); |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | static inline struct i2o_message *get_i2o_message(void __iomem *base_address, u32 mfa) | 132 | static inline struct i2o_message *get_i2o_message(void __iomem *base_address, u32 mfa) |
diff --git a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c index 2f3bddfab937..fb03a853fac4 100644 --- a/drivers/misc/ibmasm/module.c +++ b/drivers/misc/ibmasm/module.c | |||
| @@ -18,9 +18,9 @@ | |||
| 18 | * | 18 | * |
| 19 | * Copyright (C) IBM Corporation, 2004 | 19 | * Copyright (C) IBM Corporation, 2004 |
| 20 | * | 20 | * |
| 21 | * Author: Max Asböck <amax@us.ibm.com> | 21 | * Author: Max Asböck <amax@us.ibm.com> |
| 22 | * | 22 | * |
| 23 | * This driver is based on code originally written by Pete Reynolds | 23 | * This driver is based on code originally written by Pete Reynolds |
| 24 | * and others. | 24 | * and others. |
| 25 | * | 25 | * |
| 26 | */ | 26 | */ |
| @@ -30,13 +30,13 @@ | |||
| 30 | * | 30 | * |
| 31 | * 1) When loaded it sends a message to the service processor, | 31 | * 1) When loaded it sends a message to the service processor, |
| 32 | * indicating that an OS is * running. This causes the service processor | 32 | * indicating that an OS is * running. This causes the service processor |
| 33 | * to send periodic heartbeats to the OS. | 33 | * to send periodic heartbeats to the OS. |
| 34 | * | 34 | * |
| 35 | * 2) Answers the periodic heartbeats sent by the service processor. | 35 | * 2) Answers the periodic heartbeats sent by the service processor. |
| 36 | * Failure to do so would result in system reboot. | 36 | * Failure to do so would result in system reboot. |
| 37 | * | 37 | * |
| 38 | * 3) Acts as a pass through for dot commands sent from user applications. | 38 | * 3) Acts as a pass through for dot commands sent from user applications. |
| 39 | * The interface for this is the ibmasmfs file system. | 39 | * The interface for this is the ibmasmfs file system. |
| 40 | * | 40 | * |
| 41 | * 4) Allows user applications to register for event notification. Events | 41 | * 4) Allows user applications to register for event notification. Events |
| 42 | * are sent to the driver through interrupts. They can be read from user | 42 | * are sent to the driver through interrupts. They can be read from user |
| @@ -105,7 +105,7 @@ static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_devi | |||
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | sp->irq = pdev->irq; | 107 | sp->irq = pdev->irq; |
| 108 | sp->base_address = ioremap(pci_resource_start(pdev, 0), | 108 | sp->base_address = ioremap(pci_resource_start(pdev, 0), |
| 109 | pci_resource_len(pdev, 0)); | 109 | pci_resource_len(pdev, 0)); |
| 110 | if (sp->base_address == 0) { | 110 | if (sp->base_address == 0) { |
| 111 | dev_err(sp->dev, "Failed to ioremap pci memory\n"); | 111 | dev_err(sp->dev, "Failed to ioremap pci memory\n"); |
diff --git a/drivers/misc/ibmasm/r_heartbeat.c b/drivers/misc/ibmasm/r_heartbeat.c index f8fdb2d5417e..bec9e2c44bef 100644 --- a/drivers/misc/ibmasm/r_heartbeat.c +++ b/drivers/misc/ibmasm/r_heartbeat.c | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | * | 16 | * |
| 17 | * Copyright (C) IBM Corporation, 2004 | 17 | * Copyright (C) IBM Corporation, 2004 |
| 18 | * | 18 | * |
| 19 | * Author: Max Asböck <amax@us.ibm.com> | 19 | * Author: Max Asböck <amax@us.ibm.com> |
| 20 | * | 20 | * |
| 21 | */ | 21 | */ |
| 22 | 22 | ||
| @@ -36,10 +36,10 @@ static struct { | |||
| 36 | unsigned char command[3]; | 36 | unsigned char command[3]; |
| 37 | } rhb_dot_cmd = { | 37 | } rhb_dot_cmd = { |
| 38 | .header = { | 38 | .header = { |
| 39 | .type = sp_read, | 39 | .type = sp_read, |
| 40 | .command_size = 3, | 40 | .command_size = 3, |
| 41 | .data_size = 0, | 41 | .data_size = 0, |
| 42 | .status = 0 | 42 | .status = 0 |
| 43 | }, | 43 | }, |
| 44 | .command = { 4, 3, 6 } | 44 | .command = { 4, 3, 6 } |
| 45 | }; | 45 | }; |
| @@ -76,9 +76,9 @@ int ibmasm_start_reverse_heartbeat(struct service_processor *sp, struct reverse_ | |||
| 76 | if (cmd->status != IBMASM_CMD_COMPLETE) | 76 | if (cmd->status != IBMASM_CMD_COMPLETE) |
| 77 | times_failed++; | 77 | times_failed++; |
| 78 | 78 | ||
| 79 | wait_event_interruptible_timeout(rhb->wait, | 79 | wait_event_interruptible_timeout(rhb->wait, |
| 80 | rhb->stopped, | 80 | rhb->stopped, |
| 81 | REVERSE_HEARTBEAT_TIMEOUT * HZ); | 81 | REVERSE_HEARTBEAT_TIMEOUT * HZ); |
| 82 | 82 | ||
| 83 | if (signal_pending(current) || rhb->stopped) { | 83 | if (signal_pending(current) || rhb->stopped) { |
| 84 | result = -EINTR; | 84 | result = -EINTR; |
diff --git a/drivers/misc/ibmasm/remote.c b/drivers/misc/ibmasm/remote.c index a40fda6c402c..0550ce075fc4 100644 --- a/drivers/misc/ibmasm/remote.c +++ b/drivers/misc/ibmasm/remote.c | |||
| @@ -28,11 +28,10 @@ | |||
| 28 | #include "ibmasm.h" | 28 | #include "ibmasm.h" |
| 29 | #include "remote.h" | 29 | #include "remote.h" |
| 30 | 30 | ||
| 31 | static int xmax = 1600; | 31 | #define MOUSE_X_MAX 1600 |
| 32 | static int ymax = 1200; | 32 | #define MOUSE_Y_MAX 1200 |
| 33 | 33 | ||
| 34 | 34 | static const unsigned short xlate_high[XLATE_SIZE] = { | |
| 35 | static unsigned short xlate_high[XLATE_SIZE] = { | ||
| 36 | [KEY_SYM_ENTER & 0xff] = KEY_ENTER, | 35 | [KEY_SYM_ENTER & 0xff] = KEY_ENTER, |
| 37 | [KEY_SYM_KPSLASH & 0xff] = KEY_KPSLASH, | 36 | [KEY_SYM_KPSLASH & 0xff] = KEY_KPSLASH, |
| 38 | [KEY_SYM_KPSTAR & 0xff] = KEY_KPASTERISK, | 37 | [KEY_SYM_KPSTAR & 0xff] = KEY_KPASTERISK, |
| @@ -81,7 +80,8 @@ static unsigned short xlate_high[XLATE_SIZE] = { | |||
| 81 | [KEY_SYM_NUM_LOCK & 0xff] = KEY_NUMLOCK, | 80 | [KEY_SYM_NUM_LOCK & 0xff] = KEY_NUMLOCK, |
| 82 | [KEY_SYM_SCR_LOCK & 0xff] = KEY_SCROLLLOCK, | 81 | [KEY_SYM_SCR_LOCK & 0xff] = KEY_SCROLLLOCK, |
| 83 | }; | 82 | }; |
| 84 | static unsigned short xlate[XLATE_SIZE] = { | 83 | |
| 84 | static const unsigned short xlate[XLATE_SIZE] = { | ||
| 85 | [NO_KEYCODE] = KEY_RESERVED, | 85 | [NO_KEYCODE] = KEY_RESERVED, |
| 86 | [KEY_SYM_SPACE] = KEY_SPACE, | 86 | [KEY_SYM_SPACE] = KEY_SPACE, |
| 87 | [KEY_SYM_TILDE] = KEY_GRAVE, [KEY_SYM_BKTIC] = KEY_GRAVE, | 87 | [KEY_SYM_TILDE] = KEY_GRAVE, [KEY_SYM_BKTIC] = KEY_GRAVE, |
| @@ -133,19 +133,16 @@ static unsigned short xlate[XLATE_SIZE] = { | |||
| 133 | [KEY_SYM_Z] = KEY_Z, [KEY_SYM_z] = KEY_Z, | 133 | [KEY_SYM_Z] = KEY_Z, [KEY_SYM_z] = KEY_Z, |
| 134 | }; | 134 | }; |
| 135 | 135 | ||
| 136 | static char remote_mouse_name[] = "ibmasm RSA I remote mouse"; | ||
| 137 | static char remote_keybd_name[] = "ibmasm RSA I remote keyboard"; | ||
| 138 | |||
| 139 | static void print_input(struct remote_input *input) | 136 | static void print_input(struct remote_input *input) |
| 140 | { | 137 | { |
| 141 | if (input->type == INPUT_TYPE_MOUSE) { | 138 | if (input->type == INPUT_TYPE_MOUSE) { |
| 142 | unsigned char buttons = input->mouse_buttons; | 139 | unsigned char buttons = input->mouse_buttons; |
| 143 | dbg("remote mouse movement: (x,y)=(%d,%d)%s%s%s%s\n", | 140 | dbg("remote mouse movement: (x,y)=(%d,%d)%s%s%s%s\n", |
| 144 | input->data.mouse.x, input->data.mouse.y, | 141 | input->data.mouse.x, input->data.mouse.y, |
| 145 | (buttons)?" -- buttons:":"", | 142 | (buttons) ? " -- buttons:" : "", |
| 146 | (buttons & REMOTE_BUTTON_LEFT)?"left ":"", | 143 | (buttons & REMOTE_BUTTON_LEFT) ? "left " : "", |
| 147 | (buttons & REMOTE_BUTTON_MIDDLE)?"middle ":"", | 144 | (buttons & REMOTE_BUTTON_MIDDLE) ? "middle " : "", |
| 148 | (buttons & REMOTE_BUTTON_RIGHT)?"right":"" | 145 | (buttons & REMOTE_BUTTON_RIGHT) ? "right" : "" |
| 149 | ); | 146 | ); |
| 150 | } else { | 147 | } else { |
| 151 | dbg("remote keypress (code, flag, down):" | 148 | dbg("remote keypress (code, flag, down):" |
| @@ -180,7 +177,7 @@ static void send_keyboard_event(struct input_dev *dev, | |||
| 180 | key = xlate_high[code & 0xff]; | 177 | key = xlate_high[code & 0xff]; |
| 181 | else | 178 | else |
| 182 | key = xlate[code]; | 179 | key = xlate[code]; |
| 183 | input_report_key(dev, key, (input->data.keyboard.key_down) ? 1 : 0); | 180 | input_report_key(dev, key, input->data.keyboard.key_down); |
| 184 | input_sync(dev); | 181 | input_sync(dev); |
| 185 | } | 182 | } |
| 186 | 183 | ||
| @@ -228,20 +225,22 @@ int ibmasm_init_remote_input_dev(struct service_processor *sp) | |||
| 228 | mouse_dev->id.vendor = pdev->vendor; | 225 | mouse_dev->id.vendor = pdev->vendor; |
| 229 | mouse_dev->id.product = pdev->device; | 226 | mouse_dev->id.product = pdev->device; |
| 230 | mouse_dev->id.version = 1; | 227 | mouse_dev->id.version = 1; |
| 228 | mouse_dev->dev.parent = sp->dev; | ||
| 231 | mouse_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 229 | mouse_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); |
| 232 | mouse_dev->keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | | 230 | mouse_dev->keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | |
| 233 | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE); | 231 | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE); |
| 234 | set_bit(BTN_TOUCH, mouse_dev->keybit); | 232 | set_bit(BTN_TOUCH, mouse_dev->keybit); |
| 235 | mouse_dev->name = remote_mouse_name; | 233 | mouse_dev->name = "ibmasm RSA I remote mouse"; |
| 236 | input_set_abs_params(mouse_dev, ABS_X, 0, xmax, 0, 0); | 234 | input_set_abs_params(mouse_dev, ABS_X, 0, MOUSE_X_MAX, 0, 0); |
| 237 | input_set_abs_params(mouse_dev, ABS_Y, 0, ymax, 0, 0); | 235 | input_set_abs_params(mouse_dev, ABS_Y, 0, MOUSE_Y_MAX, 0, 0); |
| 238 | 236 | ||
| 239 | mouse_dev->id.bustype = BUS_PCI; | 237 | keybd_dev->id.bustype = BUS_PCI; |
| 240 | keybd_dev->id.vendor = pdev->vendor; | 238 | keybd_dev->id.vendor = pdev->vendor; |
| 241 | keybd_dev->id.product = pdev->device; | 239 | keybd_dev->id.product = pdev->device; |
| 242 | mouse_dev->id.version = 2; | 240 | keybd_dev->id.version = 2; |
| 241 | keybd_dev->dev.parent = sp->dev; | ||
| 243 | keybd_dev->evbit[0] = BIT(EV_KEY); | 242 | keybd_dev->evbit[0] = BIT(EV_KEY); |
| 244 | keybd_dev->name = remote_keybd_name; | 243 | keybd_dev->name = "ibmasm RSA I remote keyboard"; |
| 245 | 244 | ||
| 246 | for (i = 0; i < XLATE_SIZE; i++) { | 245 | for (i = 0; i < XLATE_SIZE; i++) { |
| 247 | if (xlate_high[i]) | 246 | if (xlate_high[i]) |
diff --git a/drivers/misc/ibmasm/remote.h b/drivers/misc/ibmasm/remote.h index b7076a8442d2..72acf5af7a2a 100644 --- a/drivers/misc/ibmasm/remote.h +++ b/drivers/misc/ibmasm/remote.h | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | * | 18 | * |
| 19 | * Copyright (C) IBM Corporation, 2004 | 19 | * Copyright (C) IBM Corporation, 2004 |
| 20 | * | 20 | * |
| 21 | * Author: Max Asböck <amax@us.ibm.com> | 21 | * Author: Max Asböck <amax@us.ibm.com> |
| 22 | * | 22 | * |
| 23 | * Orignally written by Pete Reynolds | 23 | * Orignally written by Pete Reynolds |
| 24 | */ | 24 | */ |
| @@ -73,7 +73,7 @@ struct keyboard_input { | |||
| 73 | 73 | ||
| 74 | 74 | ||
| 75 | 75 | ||
| 76 | struct remote_input { | 76 | struct remote_input { |
| 77 | union { | 77 | union { |
| 78 | struct mouse_input mouse; | 78 | struct mouse_input mouse; |
| 79 | struct keyboard_input keyboard; | 79 | struct keyboard_input keyboard; |
| @@ -85,7 +85,7 @@ struct remote_input { | |||
| 85 | unsigned char pad3; | 85 | unsigned char pad3; |
| 86 | }; | 86 | }; |
| 87 | 87 | ||
| 88 | #define mouse_addr(sp) (sp->base_address + CONDOR_MOUSE_DATA) | 88 | #define mouse_addr(sp) (sp->base_address + CONDOR_MOUSE_DATA) |
| 89 | #define display_width(sp) (mouse_addr(sp) + CONDOR_INPUT_DISPLAY_RESX) | 89 | #define display_width(sp) (mouse_addr(sp) + CONDOR_INPUT_DISPLAY_RESX) |
| 90 | #define display_height(sp) (mouse_addr(sp) + CONDOR_INPUT_DISPLAY_RESY) | 90 | #define display_height(sp) (mouse_addr(sp) + CONDOR_INPUT_DISPLAY_RESY) |
| 91 | #define display_depth(sp) (mouse_addr(sp) + CONDOR_INPUT_DISPLAY_BITS) | 91 | #define display_depth(sp) (mouse_addr(sp) + CONDOR_INPUT_DISPLAY_BITS) |
| @@ -93,7 +93,7 @@ struct remote_input { | |||
| 93 | #define vnc_status(sp) (mouse_addr(sp) + CONDOR_OUTPUT_VNC_STATUS) | 93 | #define vnc_status(sp) (mouse_addr(sp) + CONDOR_OUTPUT_VNC_STATUS) |
| 94 | #define isr_control(sp) (mouse_addr(sp) + CONDOR_MOUSE_ISR_CONTROL) | 94 | #define isr_control(sp) (mouse_addr(sp) + CONDOR_MOUSE_ISR_CONTROL) |
| 95 | 95 | ||
| 96 | #define mouse_interrupt_pending(sp) readl(mouse_addr(sp) + CONDOR_MOUSE_ISR_STATUS) | 96 | #define mouse_interrupt_pending(sp) readl(mouse_addr(sp) + CONDOR_MOUSE_ISR_STATUS) |
| 97 | #define clear_mouse_interrupt(sp) writel(0, mouse_addr(sp) + CONDOR_MOUSE_ISR_STATUS) | 97 | #define clear_mouse_interrupt(sp) writel(0, mouse_addr(sp) + CONDOR_MOUSE_ISR_STATUS) |
| 98 | #define enable_mouse_interrupts(sp) writel(1, mouse_addr(sp) + CONDOR_MOUSE_ISR_CONTROL) | 98 | #define enable_mouse_interrupts(sp) writel(1, mouse_addr(sp) + CONDOR_MOUSE_ISR_CONTROL) |
| 99 | #define disable_mouse_interrupts(sp) writel(0, mouse_addr(sp) + CONDOR_MOUSE_ISR_CONTROL) | 99 | #define disable_mouse_interrupts(sp) writel(0, mouse_addr(sp) + CONDOR_MOUSE_ISR_CONTROL) |
diff --git a/drivers/misc/ibmasm/uart.c b/drivers/misc/ibmasm/uart.c index 9783caf49696..93baa350d698 100644 --- a/drivers/misc/ibmasm/uart.c +++ b/drivers/misc/ibmasm/uart.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | * | 18 | * |
| 19 | * Copyright (C) IBM Corporation, 2004 | 19 | * Copyright (C) IBM Corporation, 2004 |
| 20 | * | 20 | * |
| 21 | * Author: Max Asböck <amax@us.ibm.com> | 21 | * Author: Max Asböck <amax@us.ibm.com> |
| 22 | * | 22 | * |
| 23 | */ | 23 | */ |
| 24 | 24 | ||
