aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/spi/spi-dw-mid.c
diff options
context:
space:
mode:
authorWan Ahmad Zainie <wan.ahmad.zainie.wan.mohamad@intel.com>2020-05-05 21:06:13 +0800
committerMark Brown <broonie@kernel.org>2020-05-05 15:07:58 +0100
commitc4eadee21fa9afd3dc9dd867c71b642177bf671f (patch)
treebb9743311cd8bcf59647325da1564497ca1df6c5 /drivers/spi/spi-dw-mid.c
parentspi: dw: Fix typo in few registers name (diff)
downloadwireguard-linux-c4eadee21fa9afd3dc9dd867c71b642177bf671f.tar.xz
wireguard-linux-c4eadee21fa9afd3dc9dd867c71b642177bf671f.zip
spi: dw: Add update_cr0() callback to update CTRLR0
This patch adds update_cr0() callback, in struct dw_spi. Existing code that configure register CTRLR0 is moved into a new function, dw_spi_update_cr0(), and this will be the default. Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Wan Ahmad Zainie <wan.ahmad.zainie.wan.mohamad@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200505130618.554-3-wan.ahmad.zainie.wan.mohamad@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-dw-mid.c')
-rw-r--r--drivers/spi/spi-dw-mid.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/spi/spi-dw-mid.c b/drivers/spi/spi-dw-mid.c
index 0d86c37e0aeb..9cc010e9737e 100644
--- a/drivers/spi/spi-dw-mid.c
+++ b/drivers/spi/spi-dw-mid.c
@@ -318,5 +318,9 @@ int dw_spi_mid_init(struct dw_spi *dws)
dws->dma_rx = &mid_dma_rx;
dws->dma_ops = &mid_dma_ops;
#endif
+
+ /* Register hook to configure CTRLR0 */
+ dws->update_cr0 = dw_spi_update_cr0;
+
return 0;
}