davinci: Support JTAG ID register at any address
commitb9ab12797e74d93a3656ea0bf5591f8b3e094fd5
authorMark A. Greer <mgreer@mvista.com>
Wed, 15 Apr 2009 19:39:09 +0000 (15 12:39 -0700)
committerKevin Hilman <khilman@deeprootsystems.com>
Tue, 26 May 2009 15:14:56 +0000 (26 08:14 -0700)
tree5900f0c6a70d9de793ab282dacd820e967f84272
parent79c3c0b729647a6246c120408f36e6804dab244e
davinci: Support JTAG ID register at any address

The Davinci cpu_is_davinci_*() macros use the SoC part number
and variant retrieved from the JTAG ID register to determine the
type of cpu that the kernel is running on.  Currently, the code to
read the JTAG ID register assumes that the register is always at
the same base address.  This isn't true on some newer SoCs.

To solve this, have the SoC-specific code set the JTAG ID register
base address in soc_info structure and add a 'cpu_id' member to it.
'cpu_id' will be used by the cpu_is_davinci_*() macros to match
the cpu id.  Also move the info used to identify the cpu type into
the SoC-specific code to keep all SoC-specific code together.

The common code will read the JTAG ID register, search through
an array of davinci_id structures to identify the cpu type.
Once identified, it will set the 'cpu_id' member of the soc_info
structure to the proper value and the cpu_is_davinci_*() macros
will now work.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
arch/arm/mach-davinci/Makefile
arch/arm/mach-davinci/common.c
arch/arm/mach-davinci/dm355.c
arch/arm/mach-davinci/dm644x.c
arch/arm/mach-davinci/dm646x.c
arch/arm/mach-davinci/id.c [deleted file]
arch/arm/mach-davinci/include/mach/common.h
arch/arm/mach-davinci/include/mach/cputype.h