Skip to contentSkip to conversation

GPIO: Add Loongson-3A/3B GPIO driver support

PATCH Superseded Huacai Chen 1 participant 1 message Nov 13, 2014

Subsystems (2)

v4 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 3/6 GPIO: Add Loongson-3A/3B GPIO driver support

Improve Loongson-2's GPIO driver to support Loongson-3A/3B, and update Loongson-3's default config file.

---
 arch/mips/Kconfig                     |    1 +
 arch/mips/configs/loongson3_defconfig |    1 +
 drivers/gpio/Kconfig                  |    6 ++--
 drivers/gpio/gpio-loongson.c          |   54 +++++++++++++++++++-------------
 4 files changed, 37 insertions(+), 25 deletions(-)
arch/mips/Kconfig +1 -0
index 07bb4d9..7089df9 100644
@@ -1220,6 +1220,7 @@ config CPU_LOONGSON3
 	select CPU_SUPPORTS_HUGEPAGES
 	select WEAK_ORDERING
 	select WEAK_REORDERING_BEYOND_LLSC
+	select ARCH_REQUIRE_GPIOLIB
 	help
 		The Loongson 3 processor implements the MIPS64R2 instruction
 		set with many extensions.
arch/mips/configs/loongson3_defconfig +1 -0
index 1c6191e..e7a9bb4 100644
@@ -243,6 +243,7 @@ CONFIG_HW_RANDOM=y
 CONFIG_RAW_DRIVER=m
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_PIIX4=y
+CONFIG_GPIO_LOONGSON=y
 CONFIG_SENSORS_LM75=m
 CONFIG_SENSORS_LM93=m
 CONFIG_SENSORS_W83627HF=m
drivers/gpio/Kconfig +3 -3
index bc5ffac..1ef82b2 100644
@@ -453,10 +453,10 @@ config GPIO_GRGPIO
 	  VHDL IP core library.
 
 config GPIO_LOONGSON
-	tristate "Loongson-2 GPIO support"
-	depends on CPU_LOONGSON2
+	tristate "Loongson-2/3 GPIO support"
+	depends on CPU_LOONGSON2 || CPU_LOONGSON3
 	help
-	  driver for GPIO functionality on Loongson-2F processors.
+	  driver for GPIO functionality on Loongson-2F/3A/3B processors.
 
 config GPIO_TB10X
 	bool
drivers/gpio/gpio-loongson.c +32 -22

125 lines not on this page · raw message

Signature · 1 line
1.7.7.3