arch/arm/mach-omap/omap3_generic.c File Reference


Detailed Description

FileName: arch/arm/mach-omap/omap3_generic.c

This file contains the generic implementations of various OMAP3 relevant functions For more info on OMAP34XX, see http://focus.ti.com/pdfs/wtbu/swpu114g.pdf

Important one is a_init which is architecture init code. The implemented functions are present in sys_info.h

Originally from http://linux.omap.com/pub/bootloader/3430sdp/u-boot-v1.tar.gz


Functions

void reset_cpu (ulong addr)
u32 get_cpu_type (void)
u32 get_cpu_rev (void)
u32 get_sdr_cs_size (u32 offset)
u32 get_sysboot_value (void)
u32 get_gpmc0_base (void)
u32 get_base (void)
u32 running_in_flash (void)
u32 running_in_sram (void)
u32 running_in_sdram (void)
u32 get_boot_type (void)
u32 get_device_type (void)
void a_init (void)
unsigned int omap_uart_read (unsigned long base, unsigned char reg_idx)
void omap_uart_write (unsigned int val, unsigned long base, unsigned char reg_idx)


Function Documentation

void a_init ( void   ) 

OMAP3 Architecture specific Initialization.

Does early system init of disabling the watchdog, enable memory and configuring the clocks.

prcm_init is called only if CONFIG_OMAP3_CLOCK_CONFIG is defined. We depend on link time clean up to remove a_init if no caller exists.

Warning:
Called path is with SRAM stack
Returns:
void

u32 get_base ( void   ) 

Get the upper address of current execution.

we can use this to figure out if we are running in SRAM / XIP Flash or in SDRAM

Returns:
base address

Referenced by running_in_flash(), running_in_sdram(), and running_in_sram().

u32 get_boot_type ( void   ) 

Is this an XIP type device or a stream one.

Sysboot bits 4-0 specify type. Bit 5, sys mem/perif

Returns:
Boot type

u32 get_cpu_rev ( void   ) 

Extract the OMAP ES rev.

Returns:
CPU_ES version

Referenced by prcm_init().

u32 get_cpu_type ( void   ) 

Low level CPU type.

These are implemented by the System specific code in omapX-generic.c.

Returns:
CPU_3430

u32 get_device_type ( void   ) 

What type of device are we?

are we on a GP/HS/EMU/TEST device?

Returns:
device type

Referenced by a_init().

u32 get_gpmc0_base ( void   ) 

Return the current CS0 base address.

Return current address hardware will be fetching from. The below effectively gives what is correct, its a bit mis-leading compared to the TRM. For the most general case the mask needs to be also taken into account this does work in practice.

Returns:
base address

u32 get_sdr_cs_size ( u32  offset  ) 

Get size of chip select 0/1.

Parameters:
[in] offset give the offset if we need CS1
Returns:
return the sdram size.

u32 get_sysboot_value ( void   )  [inline]

Get the initial SYSBOOT value.

SYSBOOT is useful to know which state OMAP booted from.

Returns:
- Return the value of SYSBOOT.

Referenced by get_boot_type().

unsigned int omap_uart_read ( unsigned long  base,
unsigned char  reg_idx 
)

Uart port register read function for OMAP3.

Parameters:
base base address of UART
reg_idx register index
Returns:
character read from register

void omap_uart_write ( unsigned int  val,
unsigned long  base,
unsigned char  reg_idx 
)

Uart port register write function for OMAP3.

All architectures need to implement these.

Parameters:
val value to write
base base address of UART
reg_idx register index
Returns:
void

void reset_cpu ( ulong  addr  ) 

Reset the CPU.

In case of crashes, reset the CPU

Parameters:
[in] addr -Cause of crash
Returns:
void

Referenced by bad_mode().

u32 running_in_flash ( void   ) 

Are we running in Flash XIP?

If the base is in GPMC address space, we probably are!

Returns:
1 if we are running in XIP mode, else return 0

Referenced by prcm_init().

u32 running_in_sdram ( void   ) 

Are we running in SDRAM?

if we are not in GPMC nor in SRAM address space, we are in SDRAM execution area

Returns:
1 if we are running from SDRAM, else return 0

Referenced by board_init().

u32 running_in_sram ( void   ) 

Are we running in OMAP internal SRAM?

If in SRAM address, then yes!

Returns:
1 if we are running in SRAM, else return 0

Referenced by prcm_init().


Generated on Fri Dec 25 14:13:15 2009 for barebox by  doxygen 1.5.6