Setting system clock speed

TonyG
Attachment: 20120907_s3c2440_boot.zip (3.87 KB)
Hello all,

I've been trying to learn the s3c2440 from the ground up. I've had good
luck (including with the attached code) when using another bootloader to
run my programs, but am having some trouble when booting directly into my
code.

The attached code compiles just fine and runs as expected when loaded from
another bootloader, presumably because it has already set the system clock
to ~400MHz. However, when I boot directly into it, the system clock speed
is significantly slower - somewhere close to my XTAL frequency of 12MHz
instead of the 405MHz I'm trying to set the PLL to. The UART still works
fine using my divider value and the program operates as designed - just too
slow. It's driving me nuts, as it seems to follow the same process and PLL
values as other codes out there. I've been troubleshooting for the last
several days to no avail.

Any ideas? I've attached my code, makefile, and linker script (the latter
two I'm also learning as I go...). I'm using YAGARTO.

Thank you for any input!

-Tony