lkml.org 
[lkml]   [2012]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 2/5] mmc: mxs-mmc: add dt probe support
On Wed, Mar 14, 2012 at 08:09:22AM +0100, Marek Vasut wrote:
> Dear Dong Aisheng,
>
> > On Wed, Mar 14, 2012 at 01:58:25PM +0800, Marek Vasut wrote:
> > > Dear Dong Aisheng,
> > >
> > > > Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
> >
> > ........
> >
> > > > +static const struct of_device_id mxs_mmc_dt_ids[] = {
> > > > + { .compatible = "fsl,imx23-mmc", .data = NULL, },
> > > > + { .compatible = "fsl,imx28-mmc", .data = NULL, },
> > >
> > > Do you really need two distinct ones here?
> >
> > Hmm, my original purpose is to put soc difference data in .data
> > to remove cpu_is_* function calls in the driver later.
> > Do you think if any issue?
> >
>
> Well, what's the difference between the interfaces on mx233 and mx28? Is it
> something that can't be encoded otherwise? I think they're not so different.
>
Not much difference except the one register offset and ip version.
See:
#define SSP_VERSION_LATEST 4
#define ssp_is_old() (host->version < SSP_VERSION_LATEST)
..
#define HW_SSP_VERSION (cpu_is_mx23() ? 0x110 : 0x130)
The ip version can be handled in driver, but for offset...
it depends on cpu_is_* macro.
Putting the HW_SSP_VERSION offset difference in .data can eliminate the need
of cpu_is_*.

Despite of that, since they're two devices,
i guess it's ok to put two compatible string there, right?
Or you thought just put one as below?
{ .compatible = "fsl,mxs-mmc", .data = NULL, },

Regards
Dong Aisheng



\
 
 \ /
  Last update: 2012-03-14 08:27    [W:0.556 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site