Skip to content

Commit

Permalink
arm/aspeed: Set GPION pins to GPIO mode
Browse files Browse the repository at this point in the history
GPION must be set to GPIO mode (SCU88[0:7] = 0) on Barreleye so they can
be used to read the PCIe inventory status.

Signed-off-by: Joel Stanley <joel@jms.id.au>
  • Loading branch information
shenki committed Mar 29, 2016
1 parent d72df69 commit 3e1f620
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arch/arm/mach-aspeed/aspeed.c
Expand Up @@ -118,7 +118,6 @@ static void __init do_common_setup(void)
/* SCU setup */
writel(0x01C000FF, AST_IO(AST_BASE_SCU | 0x88));
writel(0xC1C000FF, AST_IO(AST_BASE_SCU | 0x8c));
writel(0x01C0007F, AST_IO(AST_BASE_SCU | 0x88));
writel(0x003FA008, AST_IO(AST_BASE_SCU | 0x90));

/* Setup scratch registers */
Expand All @@ -140,6 +139,9 @@ static void __init do_barreleye_setup(void)
writel(0x9E82FCE7, AST_IO(AST_BASE_GPIO | 0x00));
writel(0x0370E677, AST_IO(AST_BASE_GPIO | 0x04));

/* SCU setup */
writel(0x01C00000, AST_IO(AST_BASE_SCU | 0x88));

/*
* Do read/modify/write on power gpio to prevent resetting power on
* reboot
Expand All @@ -164,6 +166,9 @@ static void __init do_palmetto_setup(void)
writel(0x0370E677, AST_IO(AST_BASE_GPIO | 0x04));
writel(0xDF48F7FF, AST_IO(AST_BASE_GPIO | 0x20));
writel(0xC738F202, AST_IO(AST_BASE_GPIO | 0x24));

/* SCU setup */
writel(0x01C0007F, AST_IO(AST_BASE_SCU | 0x88));
}

#define SCU_PASSWORD 0x1688A8A8
Expand Down

0 comments on commit 3e1f620

Please sign in to comment.