![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | am335x_gpio_regs |
Enumerations | |
enum | { AM335X_GPIO_BITS_PER_BANK = 32 } |
Functions | |
void | am335x_disable_gpio_irqs (void) |
int | gpio_direction_input (unsigned int gpio) |
Make a GPIO an input. More... | |
int | gpio_direction_output (unsigned int gpio, int value) |
Make a GPIO an output, and set its value. More... | |
int | gpio_get_value (unsigned int gpio) |
Get a GPIO's value. More... | |
int | gpio_set_value (unsigned int gpio, int value) |
Set an output GPIO's value. More... | |
Variables | |
struct am335x_gpio_regs | __packed |
static struct am335x_gpio_regs *const | am335x_gpio_banks [] |
Definition at line 21 of file gpio.c.
References am335x_gpio_banks, ARRAY_SIZE, am335x_gpio_regs::irqstatus_clr_0, and write32().
Referenced by bootblock_mainboard_early_init().
int gpio_direction_input | ( | unsigned int | gpio | ) |
Make a GPIO an input.
gpio | GPIO number |
Definition at line 144 of file gpio.c.
References gpio_cfg_pin(), GPIO_INPUT, gpio_regs_and_bit(), and setbits32.
Referenced by gpio_init(), gpio_read_mvl3(), and setup_gpio().
int gpio_direction_output | ( | unsigned int | gpio, |
int | value | ||
) |
Make a GPIO an output, and set its value.
gpio | GPIO number |
value | GPIO value (0 for low or 1 for high) |
Definition at line 151 of file gpio.c.
References clrbits32, gpio_bank::dat, DAT_MASK, DAT_SET, GPIO_BIT, gpio_cfg_pin(), gpio_get_bank(), GPIO_OUTPUT, gpio_regs_and_bit(), read32(), val, value, and write32().
Referenced by backlight_en(), backlight_pwm(), beaglebone_leds_init(), disable_usb30_pll(), gpio_init(), setup_storage(), and setup_usb_host_phy().
int gpio_get_value | ( | unsigned int | gpio | ) |
Get a GPIO's value.
This will work whether the GPIO is an input or an output.
gpio | GPIO number |
Definition at line 167 of file gpio.c.
References gpio_bank::dat, DAT_MASK, GPIO_BIT, gpio_get_bank(), gpio_regs_and_bit(), read32(), and value.
Referenced by exynos_dp_hotplug(), fill_lb_gpios(), get_ec_is_trusted(), get_recovery_mode_switch(), get_write_protect_state(), gpio_info(), gpio_read_mvl3(), parade_dp_bridge_setup(), and wakeup_need_reset().
int gpio_set_value | ( | unsigned int | gpio, |
int | value | ||
) |
Set an output GPIO's value.
The GPIO must already be an output or this function may have no effect.
gpio | GPIO number |
value | GPIO value (0 for low or 1 for high) |
Definition at line 176 of file gpio.c.
References gpio_bank::dat, DAT_MASK, DAT_SET, GPIO_BIT, gpio_get_bank(), gpio_regs_and_bit(), read32(), val, value, and write32().
Referenced by beaglebone_leds_set(), exynos_dp_bridge_init(), exynos_dp_bridge_setup(), exynos_dp_reset(), exynos_pinmux_backlight(), exynos_pinmux_lcd(), exynos_pinmux_sdmmc0(), and parade_dp_bridge_setup().
struct am335x_gpio_regs __packed |
|
static |
Definition at line 46 of file gpio.h.
Referenced by am335x_disable_gpio_irqs(), and gpio_regs_and_bit().