OpenBIC
OpenSource Bridge-IC
plat_spi.c File Reference
#include "hal_gpio.h"
#include "hal_i2c.h"
#include "plat_gpio.h"
#include "plat_i2c.h"
#include "plat_class.h"
#include "plat_spi.h"
#include "util_spi.h"
#include <logging/log.h>
Include dependency graph for plat_spi.c:

Macros

#define CPLD_REG_SPI_MUX   0x0B
 
#define BIOS_READ_WRITE_FLASH_REG_MUX   0x10
 
#define BIOS_SPI_DRIVER   "spi1_cs0"
 
#define SPI_FREQ_50M   50000000
 

Functions

 LOG_MODULE_REGISTER (plat_spi)
 
int pal_get_bios_flash_position ()
 
bool pal_switch_bios_spi_mux (int gpio_status)
 
void switch_spi_freq ()
 
int switch_bios_read_write_flash_mux (int switch_mux)
 

Macro Definition Documentation

◆ BIOS_READ_WRITE_FLASH_REG_MUX

#define BIOS_READ_WRITE_FLASH_REG_MUX   0x10

◆ BIOS_SPI_DRIVER

#define BIOS_SPI_DRIVER   "spi1_cs0"

◆ CPLD_REG_SPI_MUX

#define CPLD_REG_SPI_MUX   0x0B

◆ SPI_FREQ_50M

#define SPI_FREQ_50M   50000000

Function Documentation

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_spi  )

◆ pal_get_bios_flash_position()

int pal_get_bios_flash_position ( )

◆ pal_switch_bios_spi_mux()

bool pal_switch_bios_spi_mux ( int  gpio_status)
Here is the call graph for this function:

◆ switch_bios_read_write_flash_mux()

int switch_bios_read_write_flash_mux ( int  switch_mux)
Here is the call graph for this function:

◆ switch_spi_freq()

void switch_spi_freq ( )
Here is the call graph for this function: