NanoPayload

Changeset

231:e8e79268fb14
2017-07-11 Paul Boddie raw files shortlog changelog graph Made the clock/timer test more specific.
stage2/cpm.c (file)
     1.1 --- a/stage2/cpm.c	Tue Jul 11 00:03:30 2017 +0200
     1.2 +++ b/stage2/cpm.c	Tue Jul 11 00:09:43 2017 +0200
     1.3 @@ -196,11 +196,10 @@
     1.4  
     1.5  int jz4740_cpm_have_clock(void *cpm_base)
     1.6  {
     1.7 -	// NOTE: To check.
     1.8  #ifdef CONFIG_CPU_JZ4730
     1.9 -	return cpm_ctrl_get(cpm_base, CPM_MSCR) != 0;
    1.10 +	return !(cpm_ctrl_get(cpm_base, CPM_MSCR) & CPM_MSCR_MSTP_OST);
    1.11  #else
    1.12 -	return cpm_ctrl_get(cpm_base, CPM_CLKGR) != 0;
    1.13 +	return !(cpm_ctrl_get(cpm_base, CPM_CLKGR) & CPM_CLKGR_TCU);
    1.14  #endif
    1.15  }
    1.16