Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
octeon.h File Reference
#include <asm/octeon/cvmx.h>

Go to the source code of this file.

Data Structures

struct  octeon_boot_descriptor
union  octeon_cvmemctl
struct  octeon_cf_data


#define OCTOEN_SERIAL_LEN   20
#define BOOT_FLAG_INIT_CORE   (1 << 0)
#define OCTEON_BL_FLAG_DEBUG   (1 << 1)
#define OCTEON_BL_FLAG_NO_MAGIC   (1 << 2)
#define OCTEON_BL_FLAG_CONSOLE_UART1   (1 << 3)
#define OCTEON_BL_FLAG_CONSOLE_PCI   (1 << 4)
#define OCTEON_BL_FLAG_BREAK   (1 << 5)


typedef void(* octeon_irq_ip4_handler_t )(void)


uint64_t octeon_bootmem_alloc_range_phys (uint64_t size, uint64_t alignment, uint64_t min_addr, uint64_t max_addr, int do_locking)
voidocteon_bootmem_alloc (uint64_t size, uint64_t alignment, int do_locking)
voidocteon_bootmem_alloc_range (uint64_t size, uint64_t alignment, uint64_t min_addr, uint64_t max_addr, int do_locking)
voidocteon_bootmem_alloc_named (uint64_t size, uint64_t alignment, char *name)
voidocteon_bootmem_alloc_named_range (uint64_t size, uint64_t min_addr, uint64_t max_addr, uint64_t align, char *name)
voidocteon_bootmem_alloc_named_address (uint64_t size, uint64_t address, char *name)
int octeon_bootmem_free_named (char *name)
void octeon_bootmem_lock (void)
void octeon_bootmem_unlock (void)
int octeon_is_simulation (void)
int octeon_is_pci_host (void)
int octeon_usb_is_ref_clk (void)
uint64_t octeon_get_clock_rate (void)
u64 octeon_get_io_clock_rate (void)
const charocteon_board_type_string (void)
const charocteon_get_pci_interrupts (void)
int octeon_get_southbridge_interrupt (void)
int octeon_get_boot_coremask (void)
int octeon_get_boot_num_arguments (void)
const charocteon_get_boot_argument (int arg)
void octeon_hal_setup_reserved32 (void)
void octeon_user_io_init (void)
unsigned long octeon_crypto_enable (struct octeon_cop2_state *state)
void octeon_crypto_disable (struct octeon_cop2_state *state, unsigned long flags)
asmlinkage void octeon_cop2_restore (struct octeon_cop2_state *task)
void octeon_init_cvmcount (void)
void octeon_setup_delays (void)
void octeon_io_clk_delay (unsigned long)
void octeon_write_lcd (const char *s)
void octeon_check_cpu_bist (void)
int octeon_get_boot_debug_flag (void)
int octeon_get_boot_uart (void)
unsigned int octeon_serial_in (struct uart_port *, int)
void octeon_serial_out (struct uart_port *, int, int)
void octeon_irq_set_ip4_handler (octeon_irq_ip4_handler_t)


struct cvmx_bootinfoocteon_bootinfo
uint64_t octeon_bootloader_entry_addr
void(* octeon_irq_setup_secondary )(void)

Macro Definition Documentation

#define BOOT_FLAG_INIT_CORE   (1 << 0)

Definition at line 78 of file octeon.h.


Definition at line 57 of file octeon.h.

#define OCTEON_BL_FLAG_BREAK   (1 << 5)

Definition at line 86 of file octeon.h.

#define OCTEON_BL_FLAG_CONSOLE_PCI   (1 << 4)

Definition at line 84 of file octeon.h.

#define OCTEON_BL_FLAG_CONSOLE_UART1   (1 << 3)

Definition at line 82 of file octeon.h.

#define OCTEON_BL_FLAG_DEBUG   (1 << 1)

Definition at line 79 of file octeon.h.

#define OCTEON_BL_FLAG_NO_MAGIC   (1 << 2)

Definition at line 80 of file octeon.h.

#define OCTOEN_SERIAL_LEN   20

Definition at line 58 of file octeon.h.

Typedef Documentation

typedef void(* octeon_irq_ip4_handler_t)(void)

Definition at line 258 of file octeon.h.

Function Documentation

const char* octeon_board_type_string ( void  )

Handle all the error condition interrupts that might occur. Return a string representing the system type


Definition at line 276 of file setup.c.

void* octeon_bootmem_alloc ( uint64_t  size,
uint64_t  alignment,
int  do_locking 
void* octeon_bootmem_alloc_named ( uint64_t  size,
uint64_t  alignment,
char name 
void* octeon_bootmem_alloc_named_address ( uint64_t  size,
uint64_t  address,
char name 
void* octeon_bootmem_alloc_named_range ( uint64_t  size,
uint64_t  min_addr,
uint64_t  max_addr,
uint64_t  align,
char name 
void* octeon_bootmem_alloc_range ( uint64_t  size,
uint64_t  alignment,
uint64_t  min_addr,
uint64_t  max_addr,
int  do_locking 
uint64_t octeon_bootmem_alloc_range_phys ( uint64_t  size,
uint64_t  alignment,
uint64_t  min_addr,
uint64_t  max_addr,
int  do_locking 
int octeon_bootmem_free_named ( char name)
void octeon_bootmem_lock ( void  )
void octeon_bootmem_unlock ( void  )
void octeon_check_cpu_bist ( void  )

Check the hardware BIST results for a CPU

Definition at line 171 of file setup.c.

asmlinkage void octeon_cop2_restore ( struct octeon_cop2_state *  task)
void octeon_crypto_disable ( struct octeon_cop2_state *  state,
unsigned long  flags 
unsigned long octeon_crypto_enable ( struct octeon_cop2_state *  state)
const char* octeon_get_boot_argument ( int  arg)
int octeon_get_boot_coremask ( void  )

Get the coremask Linux was booted on.

Returns Core mask

Definition at line 163 of file setup.c.

int octeon_get_boot_debug_flag ( void  )
int octeon_get_boot_num_arguments ( void  )
int octeon_get_boot_uart ( void  )

Return the console uart passed by the bootloader

Returns uart (0 or 1)

Definition at line 146 of file setup.c.

uint64_t octeon_get_clock_rate ( void  )

Get the clock rate of Octeon

Returns Clock rate in HZ

Definition at line 100 of file setup.c.

u64 octeon_get_io_clock_rate ( void  )

Definition at line 110 of file setup.c.

const char* octeon_get_pci_interrupts ( void  )

Return the mapping of PCI device number to IRQ line. Each character in the return string represents the interrupt line for the device at that position. Device 1 maps to the first character, etc. The characters A-D are used for PCI interrupts.

Returns PCI interrupt mapping

Definition at line 183 of file pci-octeon.c.

int octeon_get_southbridge_interrupt ( void  )
void octeon_hal_setup_reserved32 ( void  )
void octeon_init_cvmcount ( void  )

Definition at line 56 of file csrc-octeon.c.

void octeon_io_clk_delay ( unsigned long  count)

octeon_io_clk_delay - wait for a given number of io clock cycles to pass.

We scale the wait by the clock ratio, and then wait for the corresponding number of core clocks.

: The number of clocks to wait.

Definition at line 177 of file csrc-octeon.c.

void octeon_irq_set_ip4_handler ( octeon_irq_ip4_handler_t  )

Definition at line 1116 of file octeon-irq.c.

int octeon_is_pci_host ( void  )

Return true if Octeon is in PCI Host mode. This means Linux can control the PCI bus.

Returns Non zero if Octeon in host mode.

Definition at line 86 of file setup.c.

int octeon_is_simulation ( void  )

Return non zero if we are currently running in the Octeon simulator


Definition at line 74 of file setup.c.

unsigned int octeon_serial_in ( struct uart_port ,

Definition at line 24 of file serial.c.

void octeon_serial_out ( struct uart_port ,
int  ,

Definition at line 35 of file serial.c.

void octeon_setup_delays ( void  )

Definition at line 28 of file csrc-octeon.c.

int octeon_usb_is_ref_clk ( void  )
void octeon_user_io_init ( void  )
void octeon_write_lcd ( const char s)

Write to the LCD display connected to the bootbus. This display exists on most Cavium evaluation boards. If it doesn't exist, then this function doesn't do anything.

: String to write

Definition at line 124 of file setup.c.

Variable Documentation

struct cvmx_bootinfo* octeon_bootinfo

Definition at line 56 of file setup.c.

uint64_t octeon_bootloader_entry_addr
void(* octeon_irq_setup_secondary)(void)

Definition at line 1114 of file octeon-irq.c.