|
From: <pi...@li...> - 2000-05-10 16:43:22
|
Hello Niibe-San NIIBE Yutaka wrote: --8<--8<--SNIP-SNIP--8<--8<-- > There's many ways (mode) to set clock for SuperH. I'm not fully > understand about CPG, and I'm not sure, which is the one we can find > on runtime, which is the one we should provide as config option. > > I think that we should provide better support of CPG to get the > information of module clock, and place it in arch/sh/kernel/time.c. > And use the value in the driver. > > Thought? I agree. The only things I do with the CPG are set the watchdog, then set the internal clock frequency to 4x (CPG_FRQCR <- 0x111) which is why my board with a 7MHz crystal has a bus clock of 30MHz. However, the code that does this is part of the bootloader I've developped for the board I'm working on and which is covered by NDA. The bootloader does a wealth of other things like set the memory controller and the wait-states for the DRAM, set and flush the cache, initialize the debug board ...etc... The reason for this is because the bootloader sits in flash memory and downloads any kernel we want to try on the board, so that we don't have to write a kernel in flash (and wear out the flash) each time we want to test it. Eventually though, my plan is to migrate some (or all) the hardware initialization code in the kernel so that the kernel can be standalone. Hence, later on in the boot process, the kernel wouldn't have to guess the value of the clock multiplier. It would be easy to have the clock multiplier as a config option, or as a value in arch/sh/kernel/head.S that one can set with an rdev-like utility. Let me know if you think that'd be a good thing. I could do this very soon (next week) because I'll have an opening in my development schedule. Take care, -- Pierre-Philippe Coupard <pi...@li...> Software Engineer, Lineo, Inc. 801-426-5001 x 208 -- |