coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
Go to the source code of this file.
Macros | |
#define | I2C_EH_RSL_MASK(name) (EH_MASK << name##_EH | RSEL_MASK << name##_RSEL) |
#define | I2C_EH_RSL_VAL(name) (EH_VAL << name##_EH | RSEL_VAL << name##_RSEL) |
Enumerations | |
enum | { EN_OFFSET = 0x60 , SEL_OFFSET = 0x80 , EH_RSEL_OFFSET = 0xF0 , GPIO_DRV0_OFFSET = 0xA0 , GPIO_DRV1_OFFSET = 0xB0 } |
enum | { EH_VAL = 0x0 , RSEL_VAL = 0x3 , EH_MASK = 0x7 , RSEL_MASK = 0x3 , SCL0_EH = 19 , SCL0_RSEL = 15 , SDA0_EH = 9 , SDA0_RSEL = 5 , SCL1_EH = 22 , SCL1_RSEL = 17 , SDA1_EH = 12 , SDA1_RSEL = 7 , SCL2_EH = 24 , SCL2_RSEL = 20 , SDA2_EH = 14 , SDA2_RSEL = 10 , SCL3_EH = 12 , SCL3_RSEL = 10 , SDA3_EH = 7 , SDA3_RSEL = 5 , SCL4_EH = 27 , SCL4_RSEL = 22 , SDA4_EH = 17 , SDA4_RSEL = 12 , SCL5_EH = 20 , SCL5_RSEL = 18 , SDA5_EH = 15 , SDA5_RSEL = 13 } |
Functions | |
static void | gpio_set_pull_pupd (gpio_t gpio, enum pull_enable enable, enum pull_select select) |
static void | gpio_set_pull_en_sel (gpio_t gpio, enum pull_enable enable, enum pull_select select) |
void | gpio_set_pull (gpio_t gpio, enum pull_enable enable, enum pull_select select) |
void | gpio_set_i2c_eh_rsel (void) |
void | gpio_set_spi_driving (unsigned int bus, enum spi_pad_mask pad_select, unsigned int milliamps) |
anonymous enum |
anonymous enum |
Definition at line 100 of file gpio.c.
References clrsetbits32, EH_RSEL_OFFSET, I2C_EH_RSL_MASK, I2C_EH_RSL_VAL, IOCFG_BL_BASE, IOCFG_LB_BASE, IOCFG_RB_BASE, and IOCFG_RM_BASE.
Referenced by mt8183_early_init().
void gpio_set_pull | ( | gpio_t | gpio, |
enum pull_enable | enable, | ||
enum pull_select | select | ||
) |
Definition at line 54 of file gpio.c.
References gpio_set_pull_en_sel(), and gpio_set_pull_pupd().
|
static |
Definition at line 35 of file gpio.c.
References clrbits32, EN_OFFSET, GPIO_PULL_DOWN, GPIO_PULL_ENABLE, GPIO_TO_IOCFG_BASE, SEL_OFFSET, and setbits32.
Referenced by gpio_set_pull().
|
static |
Definition at line 16 of file gpio.c.
References clrbits32, clrsetbits32, GPIO_PULL_DOWN, GPIO_PULL_ENABLE, GPIO_TO_IOCFG_BASE, and setbits32.
Referenced by gpio_set_pull().
void gpio_set_spi_driving | ( | unsigned int | bus, |
enum spi_pad_mask | pad_select, | ||
unsigned int | milliamps | ||
) |
Definition at line 123 of file gpio.c.
References assert, clrsetbits32, GPIO_DRV0_OFFSET, GPIO_DRV1_OFFSET, IOCFG_LM_BASE, IOCFG_RB_BASE, IOCFG_RM_BASE, NULL, offset, SPI_BUS_NUMBER, SPI_PAD0_MASK, and SPI_PAD1_MASK.
Referenced by bootblock_mainboard_init().