diff options
author | Vincent Cuissard <cuissard@marvell.com> | 2015-11-03 13:19:32 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2015-11-04 18:32:25 -0500 |
commit | feacf0024bfea807d7302d4aff83b391ac6e4077 (patch) | |
tree | b03a22b836bb20150ff2f1d04eee3b1406480da6 | |
parent | 1dbac5c578ead0d0f20a06b036d19c109a5a4fb9 (diff) |
NFC: nfcmrvl: avoid UART break control during FW download
BootROM does not support any form of power management during
FW download. On UART, the driver shall not try to send breaks.
Signed-off-by: Vincent Cuissard <cuissard@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r-- | drivers/nfc/nfcmrvl/uart.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/nfc/nfcmrvl/uart.c b/drivers/nfc/nfcmrvl/uart.c index f3d041c4f249..b33249bec419 100644 --- a/drivers/nfc/nfcmrvl/uart.c +++ b/drivers/nfc/nfcmrvl/uart.c | |||
@@ -152,10 +152,6 @@ static int nfcmrvl_nci_uart_open(struct nci_uart *nu) | |||
152 | nu->drv_data = priv; | 152 | nu->drv_data = priv; |
153 | nu->ndev = priv->ndev; | 153 | nu->ndev = priv->ndev; |
154 | 154 | ||
155 | /* Set BREAK */ | ||
156 | if (priv->config.break_control && nu->tty->ops->break_ctl) | ||
157 | nu->tty->ops->break_ctl(nu->tty, -1); | ||
158 | |||
159 | return 0; | 155 | return 0; |
160 | } | 156 | } |
161 | 157 | ||
@@ -174,6 +170,9 @@ static void nfcmrvl_nci_uart_tx_start(struct nci_uart *nu) | |||
174 | { | 170 | { |
175 | struct nfcmrvl_private *priv = (struct nfcmrvl_private *)nu->drv_data; | 171 | struct nfcmrvl_private *priv = (struct nfcmrvl_private *)nu->drv_data; |
176 | 172 | ||
173 | if (priv->ndev->nfc_dev->fw_download_in_progress) | ||
174 | return; | ||
175 | |||
177 | /* Remove BREAK to wake up the NFCC */ | 176 | /* Remove BREAK to wake up the NFCC */ |
178 | if (priv->config.break_control && nu->tty->ops->break_ctl) { | 177 | if (priv->config.break_control && nu->tty->ops->break_ctl) { |
179 | nu->tty->ops->break_ctl(nu->tty, 0); | 178 | nu->tty->ops->break_ctl(nu->tty, 0); |
@@ -185,6 +184,9 @@ static void nfcmrvl_nci_uart_tx_done(struct nci_uart *nu) | |||
185 | { | 184 | { |
186 | struct nfcmrvl_private *priv = (struct nfcmrvl_private *)nu->drv_data; | 185 | struct nfcmrvl_private *priv = (struct nfcmrvl_private *)nu->drv_data; |
187 | 186 | ||
187 | if (priv->ndev->nfc_dev->fw_download_in_progress) | ||
188 | return; | ||
189 | |||
188 | /* | 190 | /* |
189 | ** To ensure that if the NFCC goes in DEEP SLEEP sate we can wake him | 191 | ** To ensure that if the NFCC goes in DEEP SLEEP sate we can wake him |
190 | ** up. we set BREAK. Once we will be ready to send again we will remove | 192 | ** up. we set BREAK. Once we will be ready to send again we will remove |