Re: [PATCH 4/7] serial: ifx6x60: set SPI max_speed_hz based onplatform type

From: Alan Cox
Date: Mon Jan 10 2011 - 09:30:23 EST


> 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?

The driver should know nothing about the plumbing itself. So the
platform data should deal with this and pass it in generic terms.

In the Intel MID case arch/x86/platform/mrst/ should know about whether
DMA can be used and what mode the SFI controller should be in. The bits
that are in ifx6x60.c should be as architecture neutral as possible.

Alan
--
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/