9
0
Fork 0

MIPS: ath79: add pbl_ar9331_uart_enable macro

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Antony Pavlov 2015-11-03 08:23:50 +03:00 committed by Sascha Hauer
parent 50725503b3
commit 61163945cf
3 changed files with 21 additions and 0 deletions

View File

@ -37,6 +37,17 @@
.set pop
.endm
.macro pbl_reg_set val addr
.set push
.set noreorder
li t9, \addr
li t8, \val
lw t7, 0(t9)
or t7, t8
sw t7, 0(t9)
.set pop
.endm
.macro pbl_reg_clr clr addr
.set push
.set noreorder

View File

@ -67,6 +67,9 @@
#define AR71XX_GPIO_REG_INT_PENDING 0x20
#define AR71XX_GPIO_REG_INT_ENABLE 0x24
#define AR71XX_GPIO_REG_FUNC 0x28
/* Warning! GPIO_FUNC[15] must be written with 1 */
#define AR933X_GPIO_FUNC_RSRV15 BIT(15)
#define AR933X_GPIO_FUNC_UART_EN BIT(1)
/*
* PLL block

View File

@ -129,4 +129,11 @@
.set pop
.endm
#define GPIO_FUNC ((KSEG1 | AR71XX_GPIO_BASE) | AR71XX_GPIO_REG_FUNC)
.macro pbl_ar9331_uart_enable
pbl_reg_set AR933X_GPIO_FUNC_UART_EN \
| AR933X_GPIO_FUNC_RSRV15, GPIO_FUNC
.endm
#endif /* __ASM_MACH_ATH79_PBL_MACROS_H */