"Mark A. Greer" <[email protected]> writes: > From: Mark A. Greer <[email protected]> > > On the da830, the jtag id register used to determine > the cpu type is in the config register space. The > registers in that space can be protected from I/O. > To unlock that space, two "kick registers" need to > be written to with certain values and in the correct > order. > > This can only be done in davinci_common_init() > between the mapping of the I/O registers and > the reading the jtag id register. To get inside > that window, add an 'early_init()' hook to > davinci_soc_init and call it from the proper > point inside davinci_common_init(). The code > to do the actual unlock is already provided > by da830_unlock_cfg_regs() in da830.c. > > Signed-off-by: Mark A. Greer <[email protected]> > --- > arch/arm/mach-davinci/board-da830-evm.c | 1 + > arch/arm/mach-davinci/common.c | 3 +++ > arch/arm/mach-davinci/include/mach/common.h | 1 + > 3 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/mach-davinci/board-da830-evm.c > b/arch/arm/mach-davinci/board-da830-evm.c > index a9fcc1a..e0dd12d 100644 > --- a/arch/arm/mach-davinci/board-da830-evm.c > +++ b/arch/arm/mach-davinci/board-da830-evm.c > @@ -115,6 +115,7 @@ static void __init da830_evm_map_io(void) > struct davinci_soc_info *soc_info; > > soc_info = da830_get_soc_info(); > + soc_info->early_init = da830_unlock_cfg_regs; > davinci_common_init(soc_info); > } > > diff --git a/arch/arm/mach-davinci/common.c b/arch/arm/mach-davinci/common.c > index 902d677..df57273 100644 > --- a/arch/arm/mach-davinci/common.c > +++ b/arch/arm/mach-davinci/common.c > @@ -64,6 +64,9 @@ int __init davinci_common_init(struct davinci_soc_info > *soc_info) > local_flush_tlb_all(); > flush_cache_all(); >
A comment here with a summary of description above would be a helpful reminder so we don't blindly move this to a different "early" spot later on. > + if (soc_info->early_init) > + soc_info->early_init(); > + [...] Kevin _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
