Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f818ca3e authored by Gabor Juhos's avatar Gabor Juhos Committed by John Crispin
Browse files

MIPS: ath79: add GPIO setup code for the QCA955X SoCs



The existing code can handle the GPIO controller of
the QCA955x SoCs. Add a minimal glue code to make it
working.

Cc: Rodriguez, Luis <rodrigue@qca.qualcomm.com>
Cc: Giori, Kathy <kgiori@qca.qualcomm.com>
Cc: QCA Linux Team <qca-linux-team@qca.qualcomm.com>
Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/4947/


Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>
parent 53330332
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -194,12 +194,14 @@ void __init ath79_gpio_init(void)
		ath79_gpio_count = AR933X_GPIO_COUNT;
		ath79_gpio_count = AR933X_GPIO_COUNT;
	else if (soc_is_ar934x())
	else if (soc_is_ar934x())
		ath79_gpio_count = AR934X_GPIO_COUNT;
		ath79_gpio_count = AR934X_GPIO_COUNT;
	else if (soc_is_qca955x())
		ath79_gpio_count = QCA955X_GPIO_COUNT;
	else
	else
		BUG();
		BUG();


	ath79_gpio_base = ioremap_nocache(AR71XX_GPIO_BASE, AR71XX_GPIO_SIZE);
	ath79_gpio_base = ioremap_nocache(AR71XX_GPIO_BASE, AR71XX_GPIO_SIZE);
	ath79_gpio_chip.ngpio = ath79_gpio_count;
	ath79_gpio_chip.ngpio = ath79_gpio_count;
	if (soc_is_ar934x()) {
	if (soc_is_ar934x() || soc_is_qca955x()) {
		ath79_gpio_chip.direction_input = ar934x_gpio_direction_input;
		ath79_gpio_chip.direction_input = ar934x_gpio_direction_input;
		ath79_gpio_chip.direction_output = ar934x_gpio_direction_output;
		ath79_gpio_chip.direction_output = ar934x_gpio_direction_output;
	}
	}
+1 −0
Original line number Original line Diff line number Diff line
@@ -510,6 +510,7 @@
#define AR913X_GPIO_COUNT		22
#define AR913X_GPIO_COUNT		22
#define AR933X_GPIO_COUNT		30
#define AR933X_GPIO_COUNT		30
#define AR934X_GPIO_COUNT		23
#define AR934X_GPIO_COUNT		23
#define QCA955X_GPIO_COUNT		24


/*
/*
 * SRIF block
 * SRIF block