Re: [PATCH 2/8] intel_mid_ssp_spi: Re-introduce quirks fields

From: Grant Likely
Date: Tue Feb 15 2011 - 00:21:39 EST


On Wed, Feb 09, 2011 at 10:07:30AM +0000, Alan Cox wrote:
> From: Alan Cox <alan@xxxxxxxxxxxxxxx>
>
> This adds the quirks field to the driver and the flags. We don't yet
> implement any of them so we don't confuse the driver.
>
> Signed-off-by: Alan Cox <alan@xxxxxxxxxxxxxxx>

Other than minor point, looks fine. Looks like it should be squashed
into patch #1.

g.

> ---
>
> drivers/spi/intel_mid_ssp_spi.c | 11 ++++++++++-
> 1 files changed, 10 insertions(+), 1 deletions(-)
>
>
> diff --git a/drivers/spi/intel_mid_ssp_spi.c b/drivers/spi/intel_mid_ssp_spi.c
> index 19c62bc..f201edd 100644
> --- a/drivers/spi/intel_mid_ssp_spi.c
> +++ b/drivers/spi/intel_mid_ssp_spi.c
> @@ -125,6 +125,15 @@ struct driver_data {
> /* SPI framework hookup */
> struct spi_master *master;
>
> + /* Chip specific quirks */
> + int quirks;
> +#define QUIRKS_PLATFORM_MRST 1
> +#define QUIRKS_SRAM_ADDITIONAL_CPY 2
> +#define QUIRKS_USE_PM_QOS 4
> +#define QUIRKS_BIT_BANGING 8
> +#define QUIRKS_SPI_SLAVE_CLOCK_MODE 16
> +#define QUIRKS_PLATFORM_MDFL 32
> +
> /* SSP register addresses */
> unsigned long paddr;
> void __iomem *ioaddr;
> @@ -137,7 +146,6 @@ struct driver_data {
> u32 clear_sr;
> u32 mask_sr;
>
> -

unrelated whitespace change.

> /* Current message transfer state info */
> struct tasklet_struct poll_transfer;
> struct spi_message *cur_msg;
> @@ -1163,6 +1171,7 @@ static int intel_mid_ssp_spi_probe(struct pci_dev *pdev,
> }
>
> drv_data = spi_master_get_devdata(master);
> + drv_data->quirks = ent->driver_data;
> drv_data->master = master;
> drv_data->pdev = pdev;
> drv_data->pwrstate = PWRSTATE_ON;
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/