[RFC][PATCH] fsl_soc: add support for fsl_spi

Kumar Gala galak at kernel.crashing.org
Fri Jul 27 17:52:23 EST 2007


On Jul 26, 2007, at 12:05 PM, Vitaly Bordug wrote:

> On Thu, 26 Jul 2007 11:45:08 -0500
> Scott Wood <scottwood at freescale.com> wrote:
>
>> On Thu, Jul 26, 2007 at 05:56:55PM +0400, Anton Vorontsov wrote:
>>> +void (*fsl_spi_activate_cs)(u8 cs, u8 polarity) = NULL;
>>> +EXPORT_SYMBOL(fsl_spi_activate_cs);
>>> +void (*fsl_spi_deactivate_cs)(u8 cs, u8 polarity) = NULL;
>>> +EXPORT_SYMBOL(fsl_spi_deactivate_cs);
>>
>> What are these for?  It looks like you're using them to set pins,
>> but that should be done in the firmware (and if the firmware  
>> sucks, then
>> do it in the platform code at bootup).
>>
> That is not exactly the point.
> I won't respond for Anton, but we already had such hooks justified  
> in SPI case iirc.

No they are used for runtime chip select handling.  The SPI  
controller is able to handle multiple devices, however the chipselect  
is not specified by SPI and thus it left to board code.

>>> +static int __init fsl_spi_of_init(void)
>>> +{
>>> +	struct device_node *np;
>>> +	unsigned int i;
>>> +
>>> +	for (np = NULL, i = 1;
>>> +	     (np = of_find_compatible_node(np, "spi", "fsl_spi")) != NULL;
>>> +	     i++) {
>>
>> s/fsl_spi/fsl,mpc8323-spi/, please.
>>
>> Why not make the fsl spi driver an of_platform device?
>>
> Because this particular thing is not ppc-only from what I recall.

The device node name already existed before this patch.

- k



More information about the Linuxppc-dev mailing list