> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of Geert Uytterhoeven
> Sent: Tuesday, March 18, 2014 4:56 PM
> To: Hou Zhiqiang-B48286
> Cc: Mark Brown; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; Wood Scott-B07421; Hu Mingkai-B21284
> Subject: Re: [PATCH 2/2] spi/fsl-lib: Get the SPI controller bus number
> from DTS
>
> On Tue, Mar 18, 2014 at 8:40 AM, [email protected]
> <[email protected]> wrote:
> >> > > The DT already has support for specifying flash layouts, can't
> >> > > those be used (for example via chosen if they're not fixed for the
> board)?
> >> > > Or if it's just picking the correct filesystem then UUIDs and
> >> > > labels are the standard way to do things.
> >>
> >> > The DT specifying flash layouts is ok. There is another way to make
> >> > the flash layouts using command line, but it is not safe because of
> >> > the dynamic bus_num. It is not the reason that the way of DT is
> >> > supported flash layouts, to live the other way unsafe, right?
> >>
> >> This sounds to me like we need a better way of talking about flash
> >> device names on the Linux command line rather than a way to fix the
> >> bus number - for example, being able to refer to them using a fixed
> >> property like the physical address. Being able to refer to devices
> >> via an alias assigned in the DT would also be useful (and more
> >> readable), I think there may already be a mechanism for doing that
> >> which would need to be plumbed in but I'm not 100% sure.
> >
> > The bus number is the variable designed to distinguish one spi
> > controller from others. Why spi controller's physical address must be
> > use instead of bus number?
>
> Because the bus number is dynamic, while the physical address doesn't
> change, so it can be used to uniqely identify the device before booting
> the kernel.
> Cfr. "spi1" vs. "e6e20000.spi".
>
The precondition of dynamic bus number is initial it with -1 in the controller
driver. But now I need a reasonable bus number, I don't want a dynamic one.
Why does use the controller's physical address to take the role of bus number
to distinguish controllers.
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-
> m68k.org
>
> In personal conversations with technical people, I call myself a hacker.
> But when I'm talking to journalists I just say "programmer" or something
> like that.
> -- Linus Torvalds
>
N�����r��y����b�X��ǧv�^�){.n�+���z��z��z)����w*jg��������ݢj/���z�ޖ��2�ޙ����&�)ߡ�a�����G���h��j:+v���w��٥