[PATCH 11/15] MIPS: ath79: pbl: add pbl_ar9331_mdio_gpio_enable macro

Antony Pavlov antonynpavlov at gmail.com
Mon Mar 7 05:30:22 PST 2016


Signed-off-by: Antony Pavlov <antonynpavlov at gmail.com>
---
 arch/mips/mach-ath79/include/mach/pbl_macros.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/mips/mach-ath79/include/mach/pbl_macros.h b/arch/mips/mach-ath79/include/mach/pbl_macros.h
index 24cfd60..8f4d09a 100644
--- a/arch/mips/mach-ath79/include/mach/pbl_macros.h
+++ b/arch/mips/mach-ath79/include/mach/pbl_macros.h
@@ -179,6 +179,14 @@
 			| AR933X_GPIO_FUNC_RSRV15, GPIO_FUNC
 .endm
 
+#define RESET_REG_BOOTSTRAP	((KSEG1 | AR71XX_RESET_BASE) \
+					| AR933X_RESET_REG_BOOTSTRAP)
+
+.macro	pbl_ar9331_mdio_gpio_enable
+	/* Bit 18 enables MDC and MDIO function on GPIO26 and GPIO28 */
+	pbl_reg_set (1 << 18), RESET_REG_BOOTSTRAP
+.endm
+
 .macro	hornet_mips24k_cp0_setup
 	.set push
 	.set noreorder
-- 
2.7.0




More information about the barebox mailing list