[PATCH 05/14] at91: use structure to store the current soc
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Tue Apr 26 23:18:08 EDT 2011
On 13:47 Wed 27 Apr , Ryan Mallon wrote:
> On 04/27/2011 01:27 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> >>>>
> >>>> This way the cpu detection code is much clearer and easier to read and
> >>>> only one set of __cpu_is macros are needed. The values for
> >>>> ARCH_ID_AT91RM9200, etc can be moved into soc.c since they are not
> >>>> needed elsewhere.
> >>> This will never work you do not listen
> >>>
> >>> the DBUG is at DIFFERENT base address on the AT91
> >>> you need to check them one by one
> >>>
> >>> I keep the structure to keep more imformation inside and do not want to be
> >>> limited by a 32bit and complex encoding to maintain
> >>>
> >>> Best Regards,
> >>> J.
> >> You can only be running one machine at a time. Are you implying that
> >> this change breaks at91_sys_read in such a way that it reads the wrong
> >> registers? If so, then its definitely a NAK.
> > Certernly not ALL of the current work is too allow in a UNIQUE kernel to have
> > all the atmel inside and other vendors and boards in the same kernel
>
> Agreed. At the moment we still have a situation where we can only
> compile one at91 SoC variant into the kernel. So, at the moment, we do
> not need to deal with the fact that the DBGU exists at different
> locations, we can just read it for the board that we are booting on.
This patch series goal is to allow to have a UNIQUE kernel so all the drivers
and new code are write with this requirement
so no the double implementation is needed
no new code will accepted if it's does have this in considaration
>
> What I am objecting to is adding two entire sets of cpu_is macros which
> is just needless extra code with no benefit. We should determine the
> cpu/SoC type _once_ inside a single function (at91_initialize) and the
> the cpu_is macros should just read the shadow value. There is no reason
> to have two sets of macros.
Those two macro set does not have the same constrains
cpu_is is to be soc agnostic
__cpu_is is to be soc specific
so yes they are needed
and I'll update the __cpu_is soon so they will not use at91_sys_read anymore
Best Regards,
J.
More information about the linux-arm-kernel
mailing list