Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7566bcc7 authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Mark Brown
Browse files

spi: pxa2xx: Move is_lpss_ssp() tests to caller



Move is_lpss_ssp() tests from functions to caller. Although this aims to
improve readability it also saves a few code bytes on x86.

Signed-off-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2db73d44
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
@@ -251,9 +251,6 @@ static void lpss_ssp_setup(struct driver_data *drv_data)
	unsigned offset = 0x400;
	u32 value, orig;

	if (!is_lpss_ssp(drv_data))
		return;

	/*
	 * Perform auto-detection of the LPSS SSP private registers. They
	 * can be either at 1k or 2k offset from the base address.
@@ -302,9 +299,6 @@ static void lpss_ssp_cs_control(struct driver_data *drv_data, bool enable)
{
	u32 value;

	if (!is_lpss_ssp(drv_data))
		return;

	value = __lpss_ssp_read_priv(drv_data, SPI_CS_CONTROL);
	if (enable)
		value &= ~SPI_CS_CONTROL_CS_HIGH;
@@ -332,6 +326,7 @@ static void cs_assert(struct driver_data *drv_data)
		return;
	}

	if (is_lpss_ssp(drv_data))
		lpss_ssp_cs_control(drv_data, true);
}

@@ -352,6 +347,7 @@ static void cs_deassert(struct driver_data *drv_data)
		return;
	}

	if (is_lpss_ssp(drv_data))
		lpss_ssp_cs_control(drv_data, false);
}

@@ -1415,6 +1411,7 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)
	if (!is_quark_x1000_ssp(drv_data))
		write_SSPSP(0, drv_data->ioaddr);

	if (is_lpss_ssp(drv_data))
		lpss_ssp_setup(drv_data);

	tasklet_init(&drv_data->pump_transfers, pump_transfers,