diff options
Diffstat (limited to 'drivers/ps3/ps3-vuart.c')
-rw-r--r-- | drivers/ps3/ps3-vuart.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/drivers/ps3/ps3-vuart.c b/drivers/ps3/ps3-vuart.c index 90c097a7a47a..e4ad5ba5d0a3 100644 --- a/drivers/ps3/ps3-vuart.c +++ b/drivers/ps3/ps3-vuart.c | |||
@@ -114,7 +114,7 @@ struct ports_bmp { | |||
114 | static void __maybe_unused _dump_ports_bmp( | 114 | static void __maybe_unused _dump_ports_bmp( |
115 | const struct ports_bmp *bmp, const char *func, int line) | 115 | const struct ports_bmp *bmp, const char *func, int line) |
116 | { | 116 | { |
117 | pr_debug("%s:%d: ports_bmp: %016lxh\n", func, line, bmp->status); | 117 | pr_debug("%s:%d: ports_bmp: %016llxh\n", func, line, bmp->status); |
118 | } | 118 | } |
119 | 119 | ||
120 | #define dump_port_params(_b) _dump_port_params(_b, __func__, __LINE__) | 120 | #define dump_port_params(_b) _dump_port_params(_b, __func__, __LINE__) |
@@ -159,11 +159,13 @@ int ps3_vuart_get_triggers(struct ps3_system_bus_device *dev, | |||
159 | struct vuart_triggers *trig) | 159 | struct vuart_triggers *trig) |
160 | { | 160 | { |
161 | int result; | 161 | int result; |
162 | unsigned long size; | 162 | u64 size; |
163 | unsigned long val; | 163 | u64 val; |
164 | u64 tx; | ||
164 | 165 | ||
165 | result = lv1_get_virtual_uart_param(dev->port_number, | 166 | result = lv1_get_virtual_uart_param(dev->port_number, |
166 | PARAM_TX_TRIGGER, &trig->tx); | 167 | PARAM_TX_TRIGGER, &tx); |
168 | trig->tx = tx; | ||
167 | 169 | ||
168 | if (result) { | 170 | if (result) { |
169 | dev_dbg(&dev->core, "%s:%d: tx_trigger failed: %s\n", | 171 | dev_dbg(&dev->core, "%s:%d: tx_trigger failed: %s\n", |
@@ -201,7 +203,7 @@ int ps3_vuart_set_triggers(struct ps3_system_bus_device *dev, unsigned int tx, | |||
201 | unsigned int rx) | 203 | unsigned int rx) |
202 | { | 204 | { |
203 | int result; | 205 | int result; |
204 | unsigned long size; | 206 | u64 size; |
205 | 207 | ||
206 | result = lv1_set_virtual_uart_param(dev->port_number, | 208 | result = lv1_set_virtual_uart_param(dev->port_number, |
207 | PARAM_TX_TRIGGER, tx); | 209 | PARAM_TX_TRIGGER, tx); |
@@ -248,7 +250,7 @@ static int ps3_vuart_get_rx_bytes_waiting(struct ps3_system_bus_device *dev, | |||
248 | dev_dbg(&dev->core, "%s:%d: rx_bytes failed: %s\n", | 250 | dev_dbg(&dev->core, "%s:%d: rx_bytes failed: %s\n", |
249 | __func__, __LINE__, ps3_result(result)); | 251 | __func__, __LINE__, ps3_result(result)); |
250 | 252 | ||
251 | dev_dbg(&dev->core, "%s:%d: %lxh\n", __func__, __LINE__, | 253 | dev_dbg(&dev->core, "%s:%d: %llxh\n", __func__, __LINE__, |
252 | *bytes_waiting); | 254 | *bytes_waiting); |
253 | return result; | 255 | return result; |
254 | } | 256 | } |
@@ -295,7 +297,7 @@ static int ps3_vuart_get_interrupt_status(struct ps3_system_bus_device *dev, | |||
295 | 297 | ||
296 | *status = tmp & priv->interrupt_mask; | 298 | *status = tmp & priv->interrupt_mask; |
297 | 299 | ||
298 | dev_dbg(&dev->core, "%s:%d: m %lxh, s %lxh, m&s %lxh\n", | 300 | dev_dbg(&dev->core, "%s:%d: m %llxh, s %llxh, m&s %lxh\n", |
299 | __func__, __LINE__, priv->interrupt_mask, tmp, *status); | 301 | __func__, __LINE__, priv->interrupt_mask, tmp, *status); |
300 | 302 | ||
301 | return result; | 303 | return result; |
@@ -363,7 +365,7 @@ int ps3_vuart_disable_interrupt_disconnect(struct ps3_system_bus_device *dev) | |||
363 | */ | 365 | */ |
364 | 366 | ||
365 | static int ps3_vuart_raw_write(struct ps3_system_bus_device *dev, | 367 | static int ps3_vuart_raw_write(struct ps3_system_bus_device *dev, |
366 | const void *buf, unsigned int bytes, unsigned long *bytes_written) | 368 | const void *buf, unsigned int bytes, u64 *bytes_written) |
367 | { | 369 | { |
368 | int result; | 370 | int result; |
369 | struct ps3_vuart_port_priv *priv = to_port_priv(dev); | 371 | struct ps3_vuart_port_priv *priv = to_port_priv(dev); |
@@ -379,7 +381,7 @@ static int ps3_vuart_raw_write(struct ps3_system_bus_device *dev, | |||
379 | 381 | ||
380 | priv->stats.bytes_written += *bytes_written; | 382 | priv->stats.bytes_written += *bytes_written; |
381 | 383 | ||
382 | dev_dbg(&dev->core, "%s:%d: wrote %lxh/%xh=>%lxh\n", __func__, __LINE__, | 384 | dev_dbg(&dev->core, "%s:%d: wrote %llxh/%xh=>%lxh\n", __func__, __LINE__, |
383 | *bytes_written, bytes, priv->stats.bytes_written); | 385 | *bytes_written, bytes, priv->stats.bytes_written); |
384 | 386 | ||
385 | return result; | 387 | return result; |
@@ -393,7 +395,7 @@ static int ps3_vuart_raw_write(struct ps3_system_bus_device *dev, | |||
393 | */ | 395 | */ |
394 | 396 | ||
395 | static int ps3_vuart_raw_read(struct ps3_system_bus_device *dev, void *buf, | 397 | static int ps3_vuart_raw_read(struct ps3_system_bus_device *dev, void *buf, |
396 | unsigned int bytes, unsigned long *bytes_read) | 398 | unsigned int bytes, u64 *bytes_read) |
397 | { | 399 | { |
398 | int result; | 400 | int result; |
399 | struct ps3_vuart_port_priv *priv = to_port_priv(dev); | 401 | struct ps3_vuart_port_priv *priv = to_port_priv(dev); |
@@ -411,7 +413,7 @@ static int ps3_vuart_raw_read(struct ps3_system_bus_device *dev, void *buf, | |||
411 | 413 | ||
412 | priv->stats.bytes_read += *bytes_read; | 414 | priv->stats.bytes_read += *bytes_read; |
413 | 415 | ||
414 | dev_dbg(&dev->core, "%s:%d: read %lxh/%xh=>%lxh\n", __func__, __LINE__, | 416 | dev_dbg(&dev->core, "%s:%d: read %llxh/%xh=>%lxh\n", __func__, __LINE__, |
415 | *bytes_read, bytes, priv->stats.bytes_read); | 417 | *bytes_read, bytes, priv->stats.bytes_read); |
416 | 418 | ||
417 | return result; | 419 | return result; |
@@ -500,7 +502,7 @@ int ps3_vuart_write(struct ps3_system_bus_device *dev, const void *buf, | |||
500 | spin_lock_irqsave(&priv->tx_list.lock, flags); | 502 | spin_lock_irqsave(&priv->tx_list.lock, flags); |
501 | 503 | ||
502 | if (list_empty(&priv->tx_list.head)) { | 504 | if (list_empty(&priv->tx_list.head)) { |
503 | unsigned long bytes_written; | 505 | u64 bytes_written; |
504 | 506 | ||
505 | result = ps3_vuart_raw_write(dev, buf, bytes, &bytes_written); | 507 | result = ps3_vuart_raw_write(dev, buf, bytes, &bytes_written); |
506 | 508 | ||
@@ -592,7 +594,7 @@ static int ps3_vuart_queue_rx_bytes(struct ps3_system_bus_device *dev, | |||
592 | list_add_tail(&lb->link, &priv->rx_list.head); | 594 | list_add_tail(&lb->link, &priv->rx_list.head); |
593 | priv->rx_list.bytes_held += bytes; | 595 | priv->rx_list.bytes_held += bytes; |
594 | 596 | ||
595 | dev_dbg(&dev->core, "%s:%d: buf_%lu: queued %lxh bytes\n", | 597 | dev_dbg(&dev->core, "%s:%d: buf_%lu: queued %llxh bytes\n", |
596 | __func__, __LINE__, lb->dbg_number, bytes); | 598 | __func__, __LINE__, lb->dbg_number, bytes); |
597 | 599 | ||
598 | *bytes_queued = bytes; | 600 | *bytes_queued = bytes; |
@@ -745,7 +747,7 @@ static int ps3_vuart_handle_interrupt_tx(struct ps3_system_bus_device *dev) | |||
745 | 747 | ||
746 | list_for_each_entry_safe(lb, n, &priv->tx_list.head, link) { | 748 | list_for_each_entry_safe(lb, n, &priv->tx_list.head, link) { |
747 | 749 | ||
748 | unsigned long bytes_written; | 750 | u64 bytes_written; |
749 | 751 | ||
750 | result = ps3_vuart_raw_write(dev, lb->head, lb->tail - lb->head, | 752 | result = ps3_vuart_raw_write(dev, lb->head, lb->tail - lb->head, |
751 | &bytes_written); | 753 | &bytes_written); |
@@ -762,7 +764,7 @@ static int ps3_vuart_handle_interrupt_tx(struct ps3_system_bus_device *dev) | |||
762 | if (bytes_written < lb->tail - lb->head) { | 764 | if (bytes_written < lb->tail - lb->head) { |
763 | lb->head += bytes_written; | 765 | lb->head += bytes_written; |
764 | dev_dbg(&dev->core, | 766 | dev_dbg(&dev->core, |
765 | "%s:%d cleared buf_%lu, %lxh bytes\n", | 767 | "%s:%d cleared buf_%lu, %llxh bytes\n", |
766 | __func__, __LINE__, lb->dbg_number, | 768 | __func__, __LINE__, lb->dbg_number, |
767 | bytes_written); | 769 | bytes_written); |
768 | goto port_full; | 770 | goto port_full; |