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[] = {
    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,
    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,
void arm11_clock_init(void)
    unsigned *x = tbl;
    while(*x) {
        unsigned *ptr = (unsigned*) *x++;
        unsigned val = *x++;
        *ptr = val;



Other Threads

1. How to get last added TextView of a ListView after ArrayAdapter.add()

What you want to do is usually done in the adapter. It's especially
important to do it in the adapter's getView() method because there's
no guarantee in the order in which the views are created.

Romain Guy
Android framework engineer

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them


2. Get result from settings activity intent

Hey all,

I am currently trying to launch a GPS settings activity using
startActivityForResult....however it never seems to be calling my
onActivityResult function after it exits. I noticed the docs mentioned
that some Intent protocols are not defined to return a result, is this
one such example? are there any flags that I could set to either make
the settings activity call onActivityResult, or even better make my
activity block until the launched activity returns?

Btw this is the current code I used to launch the GPS settings menu
from my activity:

                ComponentName toLaunch;
                Intent intent;
                toLaunch = new ComponentName
                intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
                startActivityForResult(intent, 0);



3. Imageview / Event problem

4. " How to send the On Call Screen Back "

5. Android porting for non eee-pc hardware

6. Displaying a "now loading" image while applic is, well, loading

7. -http-proxy can't work in emulator with 1.5 sdk