diff options
author | Manuel Lauss <manuel.lauss@googlemail.com> | 2009-06-06 14:09:58 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-06-17 11:06:29 +0100 |
commit | ce65cc8fe22a572ea9ec88e203388558b6b863af (patch) | |
tree | 26cafa2f81be0f44fac4142e40bb1596c58040cd /arch/mips/alchemy/devboards/db1x00/board_setup.c | |
parent | b6c9f10517e99d806bebd04555801c787b9a3a23 (diff) | |
download | kernel_samsung_smdk4412-ce65cc8fe22a572ea9ec88e203388558b6b863af.zip kernel_samsung_smdk4412-ce65cc8fe22a572ea9ec88e203388558b6b863af.tar.gz kernel_samsung_smdk4412-ce65cc8fe22a572ea9ec88e203388558b6b863af.tar.bz2 |
MIPS: Alchemy: devboards: Convert to gpio calls.
Replace a few open-coded GPIO register accesses with gpio calls.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/alchemy/devboards/db1x00/board_setup.c')
-rw-r--r-- | arch/mips/alchemy/devboards/db1x00/board_setup.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/mips/alchemy/devboards/db1x00/board_setup.c b/arch/mips/alchemy/devboards/db1x00/board_setup.c index a75ffbf..de30d8e 100644 --- a/arch/mips/alchemy/devboards/db1x00/board_setup.c +++ b/arch/mips/alchemy/devboards/db1x00/board_setup.c @@ -27,6 +27,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <linux/gpio.h> #include <linux/init.h> #include <asm/mach-au1x00/au1000.h> @@ -94,12 +95,12 @@ void __init board_setup(void) #endif bcsr->pcmcia = 0x0000; /* turn off PCMCIA power */ -#ifdef CONFIG_MIPS_MIRAGE /* Enable GPIO[31:0] inputs */ - au_writel(0, SYS_PININPUTEN); + alchemy_gpio1_input_enable(); - /* GPIO[20] is output, tristate the other input primary GPIOs */ - au_writel(~(1 << 20), SYS_TRIOUTCLR); +#ifdef CONFIG_MIPS_MIRAGE + /* GPIO[20] is output */ + alchemy_gpio_direction_output(20, 0); /* Set GPIO[210:208] instead of SSI_0 */ pin_func = au_readl(SYS_PINFUNC) | SYS_PF_S0; @@ -118,8 +119,7 @@ void __init board_setup(void) * Enable speaker amplifier. This should * be part of the audio driver. */ - au_writel(au_readl(GPIO2_DIR) | 0x200, GPIO2_DIR); - au_writel(0x02000200, GPIO2_OUTPUT); + alchemy_gpio_direction_output(209, 1); #endif au_sync(); |