On Mon, Jan 13, 2014 at 02:29:28PM +0100, Geert Uytterhoeven wrote: > On Mon, Jan 13, 2014 at 1:29 PM, Mark Brown <[email protected]> wrote:
> > This looks very strange - if no platform data is specified the value set > > for spdcr is one that can't be arrived at via platform data. What's > > going on here? It'd seem more idiomatic to treat missing platform data > > and a zero data_width identically too. > The else branch is also taken when platform data is specified, but > data_width is zero. So you can indicate legacy 16-bit data width through > platform data. > It's unfortunate that the bits inside spdcr to configure the data width are > different for RSPI on SH and RSPI on ARM. So what you want here is either a separate bit of platform data for the architecture or just some ifdefs. Deciding what architecture the driver is running on based on platform data isn't at all clear, someone is likely to come along and fix this as a cleanup at some point especially given the lack of comments to indicate that this is intentional.
signature.asc
Description: Digital signature
