lkml.org 
[lkml]   [2014]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] SPI: Add driver for Cadence SPI controller
On Mon, Mar 17, 2014 at 07:47:24AM -0500, Rob Herring wrote:

Please delete irrelevant context from your replies, it makes it easier
to find the new content.

> On Mon, Mar 17, 2014 at 7:05 AM, Harini Katakam <harinik@xilinx.com> wrote:

> > +/* Macros for the SPI controller read/write */
> > +#define cdns_spi_read(addr) readl_relaxed(addr)
> > +#define cdns_spi_write(addr, val) writel_relaxed((val), (addr))

> Just use readl/writel directly.

Or make them static inline structures which take the driver data
structure and an offset within the register map for the device and do
the maths to resolve the actual address.

> > +static SIMPLE_DEV_PM_OPS(cdns_spi_dev_pm_ops, cdns_spi_suspend,
> > + cdns_spi_resume);

> > +/* Work with hotplug and coldplug */
> > +MODULE_ALIAS("platform:" CDNS_SPI_NAME);

> Not sure, but I don't think this should be needed.

It won't be used by DT systems but it is good practice, especially with
something like this that clearly is a generic IP which could be used on
non-DT systems too (it's not like it costs anything meaningful).
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-03-17 14:41    [W:0.104 / U:1.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site