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. changing size of alertDialog.builder

is there anyway to change the size of a alertDialog?

my snippet of code:
//start
LayoutInflater factory = LayoutInflater.from(cabBookingStart.this);
 final View textEntryView = factory.inflate(R.layout.driver_entry,
null);
new AlertDialog.Builder(cabBookingStart.this)
        .setTitle("Enter Infornation")
        .setView(textEntryView)
        .setPositiveButton("Submit",new DialogInterface.OnClickListener
(){
        public void onClick(DialogInterface dialog, int whichButton)
        {
                finish();
        }
})

.create()
.show();
//end

what i have in my view is 2 textView and 2 editText. when the dialog
is  shown, my last editText will get cut off.
Need to know if it is possible to change the size of the dialog. If
not, is there any possible work around?

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

2. Spinner with two adapters (adapter from Database and adapter from XML)

Hi,

I have a CursorAdapter curAdap and a ArrayAdapter<CharSequence>
arrayAdap.

I fill curAdap from database and arrayAdap from XML file.

I need fill a spinner with both content.

How can i do that?

Thanks in advance.

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

3. Android Dev Phone 1 DOA, or more correctly, DSAA

4. Video telephony support

5. Unmarshalling a custom Parcelable fails with a ClassNotFoundException

6. Eclipse plugin

7. to use play,stop, pause function in audio file