summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPortisch <hugo.portisch@yahoo.de>2020-02-27 12:02:04 +0300
committerDongjin Kim <tobetter@gmail.com>2020-03-02 09:26:31 +0300
commit5abc8c4f06cc15ce53e4f7eba97c645f80acaf07 (patch)
tree8ec9e8f515c89b9fdb185a671812d7dfe9fc4111
parent3b8b5cbd956b22080925dd3beaaac463452c12f1 (diff)
downloadu-boot-5abc8c4f06cc15ce53e4f7eba97c645f80acaf07.tar.xz
Fixup: ODROID-N2: spdif: Fix high output after shutdown Revert gpio handling to Amlogic code style
Change-Id: I1f8e19d4309e49638702493ccee8602b61457831
-rw-r--r--arch/arm/cpu/armv8/g12b/firmware/scp_task/suspend.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/arch/arm/cpu/armv8/g12b/firmware/scp_task/suspend.c b/arch/arm/cpu/armv8/g12b/firmware/scp_task/suspend.c
index ce112a31d4..d70eb4c0b6 100644
--- a/arch/arm/cpu/armv8/g12b/firmware/scp_task/suspend.c
+++ b/arch/arm/cpu/armv8/g12b/firmware/scp_task/suspend.c
@@ -54,23 +54,18 @@ void suspend_get_wakeup_source(void *response, unsigned int suspend_from)
*/
void enter_suspend(unsigned int suspend_from)
{
- int i, exit_reason = UDEFINED_WAKEUP;
- unsigned int reg, bit, offset;
- struct meson_bank bank;
-
- for(i = 0; i < 2; ++i) {
- /* clear GPIOA_11/13 pin mux */
- reg = 0xe;
- offset = PK(0xe, (11 + 2 * i)) & 0xff;
- bit = (offset % 8) * 4;
- aml_update_bits((domain + (reg << 2)), (0xf << bit), 0);
-
- /* set as input port */
- bank = mesong12b_banks[0]; /* GPIOA_ */
- reg = bank.regs[REG_DIR].reg;
- bit = bank.regs[REG_DIR].bit + offset;
- aml_update_bits(reg, BIT(bit), BIT(bit));
- }
+ int exit_reason = UDEFINED_WAKEUP;
+
+ /* clear GPIOA_11 pin mux */
+ aml_update_bits(PERIPHS_PIN_MUX_E, 0xf << 12, 0);
+ /* clear GPIOA_13 pin mux */
+ aml_update_bits(PERIPHS_PIN_MUX_E, 0xf << 20, 0);
+
+ /* set GPIOA_11 as input port */
+ aml_update_bits(PREG_PAD_GPIO5_EN_N, 1 << 11, 1 << 11);
+ /* set GPIOA_13 as input port */
+ aml_update_bits(PREG_PAD_GPIO5_EN_N, 1 << 13, 1 << 13);
+
uart_puts("GPIOA_11/13 off\n");
#ifdef CONFIG_CEC_WAKEUP