How does arm11_clock_init() works

by Oceanedge » Tue, 17 Feb 2009 09:05:46 GMT


Sponsored Links
 I am analyzing the bootloader code of Android. My understanding is
that the int _main(void) function of nandwrite.c is the bootloader
running in flash mode. Is that right?

And I see the following arm11_clock_init() function which is called at
the beginning at the _main() function is very interesting. It looks
like it writes some magic numbers to some memory addresses from the
tbl. What is the function really do? Does it related with the ARM cpu?
Is there any docs about these magic number and memory addresses?
Please help. Thanks!

#define A11S_CLK_CNTL 0xC0100100
#define A11S_CLK_SEL  0xC0100104
#define C A11S_CLK_CNTL
#define S A11S_CLK_SEL
static unsigned tbl[] = {
#if EXPLORE
    C, 0x640000, S, 2,
    C, 0x640001, S, 3,
    C, 0x640201, S, 2,
    C, 0x640203, S, 3,
    C, 0x640403, S, 2,
    C, 0x640405, S, 3,
    C, 0x640605, S, 2,
    C, 0x640607, S, 3,
    C, 0x640807, S, 2,
    C, 0x640809, S, 3,
    C, 0x640A09, S, 2,
    C, 0x640A0B, S, 3,
    C, 0x640C0B, S, 2,
    C, 0x640C0D, S, 3,
    C, 0x640E0D, S, 2,
    C, 0x640E0F, S, 3,
#endif
    C, 0x640000, S, 2,
    C, 0x64001F, S, 3,
    C, 0x64171F, S, 2,
    C, 0x641715, S, 5,
    C, 0x641315, S, 6,
    C, 0x641312, S, 7,
    C, 0x641112, S, 6,
    0
};
void arm11_clock_init(void)
{
    unsigned *x = tbl;
    while(*x) {
        unsigned *ptr = (unsigned*) *x++;
        unsigned val = *x++;
        *ptr = val;
    }
}


--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Other Threads

1. GPS icon stuck. Is GPS in use or not?

Hi,

I am developing application with GPS, but I come into this problem:
when I try to turn off GPS using
LocationManager.removeUpdates(locationListener) and
locationManager.removeProximityAlert(PendingIntent)

I found the GPS icon stuck on the status bar, with three wave lines
frozen.

Is GPS still in use? If GPS is still in use, how can I completely turn
if off?

In my code, I found the following line is problematic:

locationManager.addProximityAlert(latitude, longitude, radius,
expiration, pendingIntent);


Thanks a lot!

-- savio

-- 

2. [WTI] twitter for android version 2.0 sudah tiba

barusan ngecek market ternyata updatean twitter versi 2.0 udaha available,
detailnya liat di market aja yah :)

-- 
===============

3. What does Android do when you click on a widget whose application is not running?

4. Android Kuasai 25% Penjualan Smartphone di Eropa

5. [WTA} Ganti tombol untuk wake up di DHD

6. Marking spam in online market works!

7. Delete Emails programatically