lib: utils/gpio: Add minimal SiFive GPIO driver

We add a minimal SiFive GPIO driver so that we can do GPIO based
system power-off and reset.

Signed-off-by: Green Wan <green.wan@sifive.com>
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
Green Wan
2021-07-13 11:23:44 +08:00
committed by Anup Patel
parent c14f1fe0df
commit 4c3df2ab96
3 changed files with 109 additions and 0 deletions

View File

@@ -12,7 +12,10 @@
#include <sbi_utils/fdt/fdt_helper.h>
#include <sbi_utils/gpio/fdt_gpio.h>
extern struct fdt_gpio fdt_gpio_sifive;
static struct fdt_gpio *gpio_drivers[] = {
&fdt_gpio_sifive
};
static struct fdt_gpio *fdt_gpio_driver(struct gpio_chip *chip)