This is the mail archive of the mailing list for the eCos project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: HAL RTC parameters fix

Gary Thomas <> writes:

> I found some over-zealous changes:
> Index: hal/arm/arm9/innovator/current/cdl/hal_arm_arm9_innovator.cdl
> ===================================================================
> RCS file: /cvs/ecos/ecos/packages/hal/arm/arm9/innovator/current/cdl/hal_arm_arm9_innovator.cdl,v
> retrieving revision 1.2
> diff -u -5 -r1.2 hal_arm_arm9_innovator.cdl
> --- hal/arm/arm9/innovator/current/cdl/hal_arm_arm9_innovator.cdl       13 Feb 2003 01:01:09 -0000  
>         1.2
> +++ hal/arm/arm9/innovator/current/cdl/hal_arm_arm9_innovator.cdl       18 Jul 2003 17:35:15 -0000
> @@ -186,11 +186,11 @@
>  #    }
>  #
>          display      "Number of communication channels on the board"
>          flavor       data
> -        calculated   1
> +        default_value 1
>      }
>          display          "Debug serial port"

Good catch.

Hmm, not sure what's going on there. I don't see how my awk script
could have triggered on that, and not on any of the other instances of
the same option. Weird. 

Oh, I see now. All the clock stuff is commented out in that file. So
it just grabbed the first "calculated" after the comments. Not
something my script was written to cope with :-(

> Also, there are a lot of these values that just don't work if you want
> to change the actual period.  Many of them are just numbers that have
> been hand-calculated.  To make this truly flexible, they would have to
> be adjusted to depend on the new period values.  For example, in the
> PowerPC CSB281, it should probably be:
>          cdl_option CYGNUM_HAL_RTC_PERIOD {
>              display       "Real-time clock period"
>              flavor        data
> -            calculated    { (((CYGHWR_HAL_POWERPC_MEM_SPEED*1000000)/4)/100) }
> +            default_value { (((CYGHWR_HAL_POWERPC_MEM_SPEED*1000000)/4)/CYGNUM_HAL_RTC_DENOMINATOR) }
>          }
> We should take care not to imply that the period is changeable (via
> CYGNUM_HAL_RTC_DENOMINATOR mostly) if the calculations don't support
> it.  n.b. I think that for the PowerPC targets, this change is correct,
> i.e. the PERIOD values all have .../100 which should be replaced by

I'm also preparing some text for the reference manual which will have
the necessary cavats about changing these things willy-nilly. It will
be explicit about having to change the period and denominator in

But I'll also go through the HALs and fix any obviously fixable
definitions. Actually, it looks like only that set of powerpc targets
are easily fixable. Without docs on some of these devices, it is hard
to work out what some of the magic numbers really mean. Rather than
guess I'll just leave them be.

> Other than these items, it looks straight forward to apply.

Great. I'll probably submit a second RFC patch including the
documentation changes this evening, then commit it tomorrow.

Nick Garnett                    eCos Kernel Architect      The eCos and RedBoot experts

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]