Date: Tue, 21 Feb 2006 19:04:30 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 92137 for review Message-ID: <200602211904.k1LJ4Uga059326@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=92137 Change 92137 by imp@imp_Speedy on 2006/02/21 19:03:49 Initialize more of the clocks. We now hang when reading the ohci version number. More to follow. Affected files ... .. //depot/projects/arm/src/sys/arm/at91/at91_pmc.c#8 edit Differences ... ==== //depot/projects/arm/src/sys/arm/at91/at91_pmc.c#8 (text+ko) ==== @@ -250,7 +250,9 @@ int freq; sc->main_clock_hz = main_clock; - + main_ck.hz = main_clock; + plla.hz = at91_pmc_pll_rate(main_clock, RD4(sc, CKGR_PLLAR), 0); + /* * Initialize the usb clock. This sets up pllb, but disables the * actual clock. @@ -267,20 +269,21 @@ * this relationship. */ mckr = RD4(sc, PMC_MCKR); + printf("mckr is %x\n", mckr); mck.parent = clock_list[mckr & 0x3]; mck.parent->refcnt++; freq = mck.parent->hz; freq /= 1 << ((mckr >> 2) & 3); mck.hz = freq / (1 + ((mckr >> 8) & 3)); - printf("Main clock is %x\n", RD4(sc, PMC_MCKR)); - - device_printf(sc->dev, "main clock = %d Hz PLLA = %d Hz CPU %d Hz main %d Hz\n", + device_printf(sc->dev, + "main clock: %d Hz PLLA: %d MHz CPU: %d MHz main %d MHz\n", sc->main_clock_hz, - at91_pmc_pll_rate(main_clock, RD4(sc, CKGR_PLLAR), 0), - freq, mck.hz); + at91_pmc_pll_rate(main_clock, RD4(sc, CKGR_PLLAR), 0) / 1000000, + freq / 1000000, mck.hz / 1000000); WR4(sc, PMC_SCDR, PMC_SCER_PCK0 | PMC_SCER_PCK1 | PMC_SCER_PCK2 | PMC_SCER_PCK3); + WR4(sc, PMC_PCER, 0xffffffff); } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602211904.k1LJ4Uga059326>