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) |
| 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.
| 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
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
| u32 get_cpu_rev | ( | void | ) |
| u32 get_cpu_type | ( | void | ) |
Low level CPU type.
These are implemented by the System specific code in omapX-generic.c.
| u32 get_device_type | ( | void | ) |
What type of device are we?
are we on a GP/HS/EMU/TEST device?
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.
| u32 get_sdr_cs_size | ( | u32 | offset | ) |
Get size of chip select 0/1.
| [in] | offset | give the offset if we need CS1 |
| u32 get_sysboot_value | ( | void | ) | [inline] |
Get the initial SYSBOOT value.
SYSBOOT is useful to know which state OMAP booted from.
Referenced by get_boot_type().
| unsigned int omap_uart_read | ( | unsigned long | base, | |
| unsigned char | reg_idx | |||
| ) |
Uart port register read function for OMAP3.
| base | base address of UART | |
| reg_idx | register index |
| 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.
| val | value to write | |
| base | base address of UART | |
| reg_idx | register index |
| void reset_cpu | ( | ulong | addr | ) |
Reset the CPU.
In case of crashes, reset the CPU
| [in] | addr | -Cause of crash |
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!
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
Referenced by board_init().
| u32 running_in_sram | ( | void | ) |
Are we running in OMAP internal SRAM?
If in SRAM address, then yes!
Referenced by prcm_init().
1.5.6