Skip to content

Commit

Permalink
gpio: added support for the SiFive Freedom E310 GPIO driver
Browse files Browse the repository at this point in the history
Change-Id: If299b6a5b0cd9e6c181d552d78989840d5a2fbe9
Signed-off-by: Jean-Paul Etienne <[email protected]>
  • Loading branch information
fractalclone authored and Anas Nashif committed Apr 2, 2017
1 parent a916cf7 commit bb164f2
Show file tree
Hide file tree
Showing 4 changed files with 689 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@ source "drivers/gpio/Kconfig.cc32xx"

source "drivers/gpio/Kconfig.pulpino"

source "drivers/gpio/Kconfig.fe310"

endif # GPIO
151 changes: 151 additions & 0 deletions drivers/gpio/Kconfig.fe310
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# Kconfig.fe310 - SiFive Freedom E310 GPIO configuration option
#
# Copyright (c) 2017 Jean-Paul Etienne <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0
#

menuconfig GPIO_FE310
bool "SiFive Freedom E310 Processor GPIO driver"
depends on GPIO && SOC_RISCV32_FE310
default n
help
Enable driver for the SiFive Freedom E310 GPIO controller.

Says n if not sure.

if GPIO_FE310

config GPIO_FE310_GPIO_NAME
string "GPIO driver name"
default "gpio0"

config GPIO_FE310_0_PRIORITY
int "GPIO 0 interrupt priority"
default 1

config GPIO_FE310_1_PRIORITY
int "GPIO 1 interrupt priority"
default 1

config GPIO_FE310_2_PRIORITY
int "GPIO 2 interrupt priority"
default 1

config GPIO_FE310_3_PRIORITY
int "GPIO 3 interrupt priority"
default 1

config GPIO_FE310_4_PRIORITY
int "GPIO 4 interrupt priority"
default 1

config GPIO_FE310_5_PRIORITY
int "GPIO 5 interrupt priority"
default 1

config GPIO_FE310_6_PRIORITY
int "GPIO 6 interrupt priority"
default 1

config GPIO_FE310_7_PRIORITY
int "GPIO 7 interrupt priority"
default 1

config GPIO_FE310_8_PRIORITY
int "GPIO 8 interrupt priority"
default 1

config GPIO_FE310_9_PRIORITY
int "GPIO 9 interrupt priority"
default 1

config GPIO_FE310_10_PRIORITY
int "GPIO 10 interrupt priority"
default 1

config GPIO_FE310_11_PRIORITY
int "GPIO 11 interrupt priority"
default 1

config GPIO_FE310_12_PRIORITY
int "GPIO 12 interrupt priority"
default 1

config GPIO_FE310_13_PRIORITY
int "GPIO 13 interrupt priority"
default 1

config GPIO_FE310_14_PRIORITY
int "GPIO 14 interrupt priority"
default 1

config GPIO_FE310_15_PRIORITY
int "GPIO 15 interrupt priority"
default 1

config GPIO_FE310_16_PRIORITY
int "GPIO 16 interrupt priority"
default 1

config GPIO_FE310_17_PRIORITY
int "GPIO 17 interrupt priority"
default 1

config GPIO_FE310_18_PRIORITY
int "GPIO 18 interrupt priority"
default 1

config GPIO_FE310_19_PRIORITY
int "GPIO 19 interrupt priority"
default 1

config GPIO_FE310_20_PRIORITY
int "GPIO 20 interrupt priority"
default 1

config GPIO_FE310_21_PRIORITY
int "GPIO 21 interrupt priority"
default 1

config GPIO_FE310_22_PRIORITY
int "GPIO 22 interrupt priority"
default 1

config GPIO_FE310_23_PRIORITY
int "GPIO 23 interrupt priority"
default 1

config GPIO_FE310_24_PRIORITY
int "GPIO 24 interrupt priority"
default 1

config GPIO_FE310_25_PRIORITY
int "GPIO 25 interrupt priority"
default 1

config GPIO_FE310_26_PRIORITY
int "GPIO 26 interrupt priority"
default 1

config GPIO_FE310_27_PRIORITY
int "GPIO 27 interrupt priority"
default 1

config GPIO_FE310_28_PRIORITY
int "GPIO 28 interrupt priority"
default 1

config GPIO_FE310_29_PRIORITY
int "GPIO 29 interrupt priority"
default 1

config GPIO_FE310_30_PRIORITY
int "GPIO 30 interrupt priority"
default 1

config GPIO_FE310_31_PRIORITY
int "GPIO 31 interrupt priority"
default 1

endif # GPIO_FE310
1 change: 1 addition & 0 deletions drivers/gpio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ obj-$(CONFIG_GPIO_NRF5) += gpio_nrf5.o
obj-$(CONFIG_GPIO_CMSDK_AHB) += gpio_cmsdk_ahb.o
obj-$(CONFIG_GPIO_CC32XX) += gpio_cc32xx.o
obj-$(CONFIG_GPIO_PULPINO) += gpio_pulpino.o
obj-$(CONFIG_GPIO_FE310) += gpio_fe310.o
Loading

0 comments on commit bb164f2

Please sign in to comment.