Skip to contentSkip to conversation

pointers for writing BSP

DISCUSSION Ashlesha Shintre 2 participants 2 messages Aug 3, 2006 – Aug 4, 2006 2 messages not in the archive MIPS

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

I have a query about the following:

u32 pin_func;

        pin_func = 0;
        /* not valid for 1550 */
#ifdef CONFIG_AU1X00_USB_DEVICE
        // 2nd USB port is USB device
        pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000); 
        au_writel(pin_func, SYS_PINFUNC);

Now SYS_PINFUNC is defined as 0xB190002C
the (u32)(~0x8000) means 0xB190002C & 0xFFFF1FFF right?

Then the original value of SYS_PINFUNC remains unchanged..so what is the purpose of the above code?

Thanks
Ashlesha.

Quoted 42 lines · Mayuresh Chitale

Hi Ashlesha,

The kernel starts from head.S. This present for each architechture. E.g for mips there is arch/mips/kernel/head.S. There it does some very low level init and jumps to start_kernel which is defined in init/main.c. You can browse the code in start_kernel to understand how system init is done.

You could compare your new bsp with some existing bsp in the source and see the code flow for that starting with start_kernel. Tracing the same path for your bsp should work.

Thanks,
Mayuresh.

Quoted 26 lines · Ashlesha Shintre

Hi Mayuresh,

I was wondering if you could point me in the right direction with respect to writing the board support software for the Ampro EncoreM3 board.

So far, I looked at the websites you suggested and got as far as configuring the kernel. I am still stuck with respect to the order of system initialisation in the 2.6 kernel. By my understanding in the 2.4 kernel, following is the order:

1) Setting up interrupt tables
2) Activating the Timer Interrupt
3) Initialising the console and memory data structures etc.

I have available the 2.4 bsp code available, but do not understand, where the kernel starts-- is it the init.c file from the encm3 directory or is it the generic linux/init/init.c file? Neither have the main() function defined in them!

I really appreciate your help,
Thank you,

Ashlesha.

#3 lore raw
Quoted 12 lines · Ashlesha Shintre

I have a query about the following:

u32 pin_func;

        pin_func = 0;
        /* not valid for 1550 */
#ifdef CONFIG_AU1X00_USB_DEVICE
        // 2nd USB port is USB device
        pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000); 
        au_writel(pin_func, SYS_PINFUNC);
Quoted 2 lines

Now SYS_PINFUNC is defined as 0xB190002C
the (u32)(~0x8000) means 0xB190002C & 0xFFFF1FFF right?

Not really.
It means value-from-address-0xB190002C & 0xFFFF7FFF And the result is then wrote back to that address.

(bit 15 of SYS_PINFUNC register is cleared)

Domen

Quoted 52 lines

Then the original value of SYS_PINFUNC remains unchanged..so what is the purpose of the above code?

Thanks
Ashlesha.

Quoted 42 lines · Mayuresh Chitale

Hi Ashlesha,

The kernel starts from head.S. This present for each architechture. E.g for mips there is arch/mips/kernel/head.S. There it does some very low level init and jumps to start_kernel which is defined in init/main.c. You can browse the code in start_kernel to understand how system init is done.

You could compare your new bsp with some existing bsp in the source and see the code flow for that starting with start_kernel. Tracing the same path for your bsp should work.

Thanks,
Mayuresh.

Quoted 26 lines · Ashlesha Shintre

Hi Mayuresh,

I was wondering if you could point me in the right direction with respect to writing the board support software for the Ampro EncoreM3 board.

So far, I looked at the websites you suggested and got as far as configuring the kernel. I am still stuck with respect to the order of system initialisation in the 2.6 kernel. By my understanding in the 2.4 kernel, following is the order:

1) Setting up interrupt tables
2) Activating the Timer Interrupt
3) Initialising the console and memory data structures etc.

I have available the 2.4 bsp code available, but do not understand, where the kernel starts-- is it the init.c file from the encm3 directory or is it the generic linux/init/init.c file? Neither have the main() function defined in them!

I really appreciate your help,
Thank you,

Ashlesha.