aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/dm644x.c
diff options
context:
space:
mode:
authorMark A. Greer <mgreer@mvista.com>2009-04-15 15:39:09 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2009-05-26 11:14:56 -0400
commitb9ab12797e74d93a3656ea0bf5591f8b3e094fd5 (patch)
tree5900f0c6a70d9de793ab282dacd820e967f84272 /arch/arm/mach-davinci/dm644x.c
parent79c3c0b729647a6246c120408f36e6804dab244e (diff)
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>
Diffstat (limited to 'arch/arm/mach-davinci/dm644x.c')
-rw-r--r--arch/arm/mach-davinci/dm644x.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index 79f113698b0..9bcd98c6820 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -388,7 +388,6 @@ MUX_CFG(DM644X, LOEEN, 0, 24, 1, 1, true)
388MUX_CFG(DM644X, LFLDEN, 0, 25, 1, 1, false) 388MUX_CFG(DM644X, LFLDEN, 0, 25, 1, 1, false)
389}; 389};
390 390
391
392/*----------------------------------------------------------------------*/ 391/*----------------------------------------------------------------------*/
393 392
394static const s8 dma_chan_dm644x_no_event[] = { 393static const s8 dma_chan_dm644x_no_event[] = {
@@ -475,9 +474,23 @@ static struct map_desc dm644x_io_desc[] = {
475 }, 474 },
476}; 475};
477 476
477/* Contents of JTAG ID register used to identify exact cpu type */
478static struct davinci_id dm644x_ids[] = {
479 {
480 .variant = 0x0,
481 .part_no = 0xb700,
482 .manufacturer = 0x017,
483 .cpu_id = DAVINCI_CPU_ID_DM6446,
484 .name = "dm6446",
485 },
486};
487
478static struct davinci_soc_info davinci_soc_info_dm644x = { 488static struct davinci_soc_info davinci_soc_info_dm644x = {
479 .io_desc = dm644x_io_desc, 489 .io_desc = dm644x_io_desc,
480 .io_desc_num = ARRAY_SIZE(dm644x_io_desc), 490 .io_desc_num = ARRAY_SIZE(dm644x_io_desc),
491 .jtag_id_base = IO_ADDRESS(0x01c40028),
492 .ids = dm644x_ids,
493 .ids_num = ARRAY_SIZE(dm644x_ids),
481}; 494};
482 495
483void __init dm644x_init(void) 496void __init dm644x_init(void)