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>
This commit is contained in:
Jarkko Nikula 2015-06-04 16:55:12 +03:00 коммит произвёл Mark Brown
Родитель dccf736965
Коммит 82ba2c2ab3
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -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);
}
}
}