#include <linux/moduleparam.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/crc32.h>
#include "liquidio_common.h"
#include "octeon_droq.h"
#include "octeon_iq.h"
#include "response_manager.h"
#include "octeon_device.h"
#include "liquidio_image.h"
#include "octeon_mem_ops.h"
static void octeon_remote_lock(void);
static void octeon_remote_unlock(void);
static u64 cvmx_bootmem_phy_named_block_find(struct octeon_device *oct,
const char *name,
u32 flags);
static int octeon_console_read(struct octeon_device *oct, u32 console_num,
char *buffer, u32 buf_size);
#define BOOTLOADER_PCI_READ_BUFFER_DATA_ADDR …
#define BOOTLOADER_PCI_READ_BUFFER_LEN_ADDR …
#define BOOTLOADER_PCI_READ_BUFFER_OWNER_ADDR …
#define BOOTLOADER_PCI_READ_DESC_ADDR …
#define BOOTLOADER_PCI_WRITE_BUFFER_STR_LEN …
#define OCTEON_PCI_IO_BUF_OWNER_OCTEON …
#define OCTEON_PCI_IO_BUF_OWNER_HOST …
#define CVMX_BOOTMEM_NUM_NAMED_BLOCKS …
#define CVMX_BOOTMEM_ALIGNMENT_SIZE …
#define CVMX_BOOTMEM_DESC_MAJ_VER …
#define CVMX_BOOTMEM_DESC_MIN_VER …
#define OCTEON_PCI_CONSOLE_MAJOR_VERSION …
#define OCTEON_PCI_CONSOLE_MINOR_VERSION …
#define OCTEON_PCI_CONSOLE_BLOCK_NAME …
#define OCTEON_CONSOLE_POLL_INTERVAL_MS …
struct cvmx_bootmem_desc { … };
struct octeon_pci_console { … };
struct octeon_pci_console_desc { … };
static inline u64 __cvmx_bootmem_desc_get(struct octeon_device *oct,
u64 base,
u32 offset,
u32 size)
{ … }
static void CVMX_BOOTMEM_NAMED_GET_NAME(struct octeon_device *oct,
u64 addr,
char *str,
u32 len)
{ … }
static int __cvmx_bootmem_check_version(struct octeon_device *oct,
u32 exact_match)
{ … }
static const struct cvmx_bootmem_named_block_desc
*__cvmx_bootmem_find_named_block_flags(struct octeon_device *oct,
const char *name, u32 flags)
{ … }
static u64 cvmx_bootmem_phy_named_block_find(struct octeon_device *oct,
const char *name,
u32 flags)
{ … }
static int octeon_named_block_find(struct octeon_device *oct, const char *name,
u64 *base_addr, u64 *size)
{ … }
static void octeon_remote_lock(void)
{ … }
static void octeon_remote_unlock(void)
{ … }
int octeon_console_send_cmd(struct octeon_device *oct, char *cmd_str,
u32 wait_hundredths)
{ … }
int octeon_wait_for_bootloader(struct octeon_device *oct,
u32 wait_time_hundredths)
{ … }
static void octeon_console_handle_result(struct octeon_device *oct,
size_t console_num)
{ … }
static char console_buffer[OCTEON_CONSOLE_MAX_READ_BYTES];
static void output_console_line(struct octeon_device *oct,
struct octeon_console *console,
size_t console_num,
char *console_buffer,
s32 bytes_read)
{ … }
static void check_console(struct work_struct *work)
{ … }
int octeon_init_consoles(struct octeon_device *oct)
{ … }
static void octeon_get_uboot_version(struct octeon_device *oct)
{ … }
int octeon_add_console(struct octeon_device *oct, u32 console_num,
char *dbg_enb)
{ … }
void octeon_remove_consoles(struct octeon_device *oct)
{ … }
static inline int octeon_console_free_bytes(u32 buffer_size,
u32 wr_idx,
u32 rd_idx)
{ … }
static inline int octeon_console_avail_bytes(u32 buffer_size,
u32 wr_idx,
u32 rd_idx)
{ … }
static int octeon_console_read(struct octeon_device *oct, u32 console_num,
char *buffer, u32 buf_size)
{ … }
#define FBUF_SIZE …
#define MAX_BOOTTIME_SIZE …
int octeon_download_firmware(struct octeon_device *oct, const u8 *data,
size_t size)
{ … }