RE: [PATCH 4/7] serial: ifx6x60: set SPI max_speed_hz based onplatform type
From: Gorby, Russ
Date: Thu Jan 06 2011 - 16:30:40 EST
>-----Original Message-----
>From: Alan Cox [mailto:alan@xxxxxxxxxxxxxxx]
>Sent: Wednesday, January 05, 2011 4:27 PM
>To: Gorby, Russ
>Cc: gregkh@xxxxxxx; segoon@xxxxxxxxxxxx; Gorby, Russ; linux-
>kernel@xxxxxxxxxxxxxxx; Ahmed, Suhail
>Subject: Re: [PATCH 4/7] serial: ifx6x60: set SPI max_speed_hz based on
>platform type
>
>> + if (ifx_dev->is_6160)
>> + spi->max_speed_hz = 12500000;
>> + else
>> + spi->max_speed_hz = 25000000;
>
>This should be coming directly from the platform data, ditto I suspect
>wiring the DMA to is_6160 should probably be a platform "use_dma"
>field ?
[Gorby, Russ]
OK I agree for the max clock rate, but I'm not so sure about the "use_dma" case.
Use_dma is used so the protocol driver matches the expectations (capabilities) of the controller driver it attaches to. In the general case I would think it could support several different controller drivers that might have differing capabilities. Currently the driver does assume the value of use_dma is constant for a platform so putting this indication in the platform data would suffice (for now) but to me, this is not really a platform attribute.
Is there a better way to handle this is?
--
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/