IRC logs for #openrisc Wednesday, 2012-01-18

BlokI was on my way to load a kernel when it struck me that I do not tell it what frequency the or1200 core is running on my platform. That kernel deduces the frequency from the timer (?), but what does the timer know. What is the right way of telling the timer/kernal what frequency the cpu is running?12:12
BlokHello btw :)12:12
joniboyou need specify the cpu frequency in the device tree description for your platform12:58
jonibousually you need to specify it in two places, because the uart wants to be told explicitly, too12:59
jonibosee the example at arch/openrisc/boot/dts/or1ksim.dts12:59
joniboyou can copy that file and modify it for your platform, then select your version by name in the kernel configuration13:00
BlokSorry about my ignorance. Just wondering. Will the bootloader supply the DT in the "general" case?13:01
joniboyes13:01
jonibothat's the idea... the bootloader should pass the device tree (binary) to the kernel13:01
jonibobut since you're probably running without a bootloader, then it's easiest to just build the device tree description into the kernel13:01
BlokI am using ORPmon, but I cannot see that it supplies a dt13:02
jonibono, it doesn't13:02
joniboi think only u-boot (or barebox) does13:02
jonibostekern might be able to provide more info here13:03
BlokI feel really stupid now becasue I missed the file..13:03
jonibono worries, this is all pretty poorly documented13:03
BlokThanks a lot btw!13:03
BlokStill a little confused. Will I get away with adding CONFIG_DEVICE_TREE? As I have no device tree now I am guessing it falls back to 25 MHz?13:09
joniboyeah, you should add the name of the .dts file that you want compiled into your kernel13:11
jonibofalls back to 25 Mhz?  not sure where that's coming from...13:11
joniboi think the kernel won't run at all without a device tree...13:11
BlokI belive I caught it when I looked where the cpu freq is read from13:12
jonibofor example, it won't know how much memory it has... that needs to go into the device tree, too13:12
Bloksure13:12
joniboi don't think falling back to 25Mhz makes sense... sounds like a bug if that's what it's doing13:12
Blok"of_property_read_u32 => Device tree missing CPU 'clock-frequency' parameter...Assuming frequency 25MHZ" in setup.c13:14
jonibohmmm...13:14
Bloknot "", just pasted together13:14
joniboi'd say that message is wrong... there's no 25Mhz assumption (at least, there isn't anymore, if there were was one)13:21
joniboin any case, if you don't have a device tree, the boot will fail before it gets to that point anyway13:21
joniboand the console output will be garbled so you'll never see that message :)13:22
BlokI just saw that the file or1ksim.dts is used so pretty much everything except the clock is "almost" correct :)13:23
BlokNow it looks good. Thanks a lot again!13:25

Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!