From: Jarkko Nikula Date: Thu, 4 Jun 2015 13:55:12 +0000 (+0300) Subject: spi: pxa2xx: Make LPSS SPI general register optional X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=82ba2c2ab3e9b9c62327f9441594668b20a1dba2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Mark Brown --- 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); + } } }