carl9170 firmware: set AHB clock to 40MHz early on
authorChristian Lamparter <chunkeey@googlemail.com>
Sat, 14 Aug 2010 19:29:42 +0000 (21:29 +0200)
committerChristian Lamparter <chunkeey@googlemail.com>
Sat, 14 Aug 2010 19:29:42 +0000 (21:29 +0200)
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
carlfw/src/main.c

index a9a1306b4693b2fed2ced3c9e95e066b8ac5d484..9b2a09c5ec6ebb1c69ea111187e540f2f85dce20 100644 (file)
@@ -86,8 +86,6 @@ static void handle_fw(void)
 
 static void __attribute__((noreturn)) main_loop(void)
 {
-       clock_set(true, AHB_40MHZ_OSC);
-
        /* main loop */
        while (1) {
                handle_fw();
@@ -120,6 +118,8 @@ static void __attribute__((noreturn)) main_loop(void)
 
 void __attribute__((noreturn)) start(void)
 {
+       clock_set(true, AHB_40MHZ_OSC);
+
        /* initialize firmware context and DMA memory */
        memset(&fw, 0, sizeof(fw));