diff options
author | Jarkko Nikula <jarkko.nikula@linux.intel.com> | 2015-06-04 16:55:12 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-06-05 11:40:45 +0100 |
commit | 82ba2c2ab3e9b9c62327f9441594668b20a1dba2 (patch) | |
tree | 1956c45484dbdac9271496d954390d6fad6de5f5 /drivers/spi/spi-pxa2xx.c | |
parent | dccf7369652f3934456345aab6a92fa905177886 (diff) | |
download | linux-82ba2c2ab3e9b9c62327f9441594668b20a1dba2.tar.gz linux-82ba2c2ab3e9b9c62327f9441594668b20a1dba2.tar.xz |
spi: pxa2xx: Make LPSS SPI general register optional
General register located in LPSS SPI private register space is not found in
upcoming Intel LPSS platforms. Access it conditionally depending is it
defined in configuration.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-pxa2xx.c')
-rw-r--r-- | drivers/spi/spi-pxa2xx.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 3fec31dbf972..f97cd42fbc22 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -245,9 +245,13 @@ static void lpss_ssp_setup(struct driver_data *drv_data) if (drv_data->master_info->enable_dma) { __lpss_ssp_write_priv(drv_data, config->reg_ssp, 1); - value = __lpss_ssp_read_priv(drv_data, config->reg_general); - value |= GENERAL_REG_RXTO_HOLDOFF_DISABLE; - __lpss_ssp_write_priv(drv_data, config->reg_general, value); + if (config->reg_general >= 0) { + value = __lpss_ssp_read_priv(drv_data, + config->reg_general); + value |= GENERAL_REG_RXTO_HOLDOFF_DISABLE; + __lpss_ssp_write_priv(drv_data, + config->reg_general, value); + } } } |