diff options
Diffstat (limited to 'drivers/misc')
-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 | 6 | ||||
-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.h | 8 | ||||
-rw-r--r-- | drivers/misc/ibmasm/uart.c | 2 |
14 files changed, 62 insertions, 62 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..ec2d4dbc093b 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 |
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.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 | ||