All pastes #493805 Raw Edit

Stuff

public text v1 · immutable
·published 2007-05-17 23:01 UTC
rendered paste body
static void __init tnetd7300_init_clocks(void)
{
        prom_printf("tnetd7300_init_clocks() called  \n");
        u32 *bootcr = (u32 *)ioremap_nocache(AR7_REGS_DCL, 4);
        prom_printf("clocks struct tnetd7300_clocks about to be set  \n");
        struct tnetd7300_clocks *clocks = (struct tnetd7300_clocks *)ioremap_nocache(AR7_REGS_POWER + 0x20, sizeof(struct tnetd7300_clocks));
        prom_printf("clocks struct tnetd7300_clocks set  \n");

        ar7_bus_clock = tnetd7300_get_clock(BUS_PLL_SOURCE_SHIFT,
                                            &clocks->bus, bootcr,
                                            ar7_afe_clock);
        prom_printf("ar7_bus_clock set with tnetd7300_get_clock()  \n");
        if (*bootcr & BOOT_PLL_ASYNC_MODE) {
                ar7_cpu_clock = tnetd7300_get_clock(CPU_PLL_SOURCE_SHIFT,
                                                    &clocks->cpu,
                                                    bootcr, ar7_afe_clock);

                prom_printf("ar7_cpu_clock set with tnetd7300_get_clock()  \n");
        } else {
                ar7_cpu_clock = ar7_bus_clock;
                prom_printf("ar7_cpu_clock set to ar7_bus_clock \n");
        }

        tnetd7300_set_clock(USB_PLL_SOURCE_SHIFT, &clocks->usb,
                            bootcr, 48000000);

        prom_printf("Before tnetd7300_set_clock() \n");
        if (ar7_dsp_clock == 250000000)
                tnetd7300_set_clock(DSP_PLL_SOURCE_SHIFT, &clocks->dsp,
                                    bootcr, ar7_dsp_clock);

        prom_printf("After tnetd7300_set_clock() \n");
        iounmap(clocks);
        iounmap(bootcr);
}