diff options
author | Vincent Cuissard <cuissard@marvell.com> | 2015-10-26 12:27:39 +0300 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2015-10-27 06:18:44 +0300 |
commit | 3194c6870158e305dac2af52f83681e9cb67280f (patch) | |
tree | b4fc6cbfbd419132051f3a06d67c5d827a5d6e5a /drivers/nfc/nfcmrvl/uart.c | |
parent | e5629d29470134af1954d2bbe45c4f2b73f68ee9 (diff) | |
download | linux-3194c6870158e305dac2af52f83681e9cb67280f.tar.xz |
NFC: nfcmrvl: add firmware download support
Implement firmware download protocol for Marvell NFC controllers.
This protocol is based on NCI frames that's why parts of its
implementation use some NCI generic functions.
Signed-off-by: Vincent Cuissard <cuissard@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc/nfcmrvl/uart.c')
-rw-r--r-- | drivers/nfc/nfcmrvl/uart.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/nfc/nfcmrvl/uart.c b/drivers/nfc/nfcmrvl/uart.c index 61442d6528a6..835582435560 100644 --- a/drivers/nfc/nfcmrvl/uart.c +++ b/drivers/nfc/nfcmrvl/uart.c @@ -50,10 +50,21 @@ static int nfcmrvl_uart_nci_send(struct nfcmrvl_private *priv, return nu->ops.send(nu, skb); } +static void nfcmrvl_uart_nci_update_config(struct nfcmrvl_private *priv, + const void *param) +{ + struct nci_uart *nu = priv->drv_data; + const struct nfcmrvl_fw_uart_config *config = param; + + nci_uart_set_config(nu, le32_to_cpu(config->baudrate), + config->flow_control); +} + static struct nfcmrvl_if_ops uart_ops = { .nci_open = nfcmrvl_uart_nci_open, .nci_close = nfcmrvl_uart_nci_close, .nci_send = nfcmrvl_uart_nci_send, + .nci_update_config = nfcmrvl_uart_nci_update_config }; #ifdef CONFIG_OF @@ -132,6 +143,7 @@ static int nfcmrvl_nci_uart_open(struct nci_uart *nu) return PTR_ERR(priv); priv->phy = NFCMRVL_PHY_UART; + priv->support_fw_dnld = true; nu->drv_data = priv; nu->ndev = priv->ndev; |