diff options
author | Nicolas Pitre <nico@cam.org> | 2009-03-02 23:44:41 -0500 |
---|---|---|
committer | Nicolas Pitre <nico@cam.org> | 2009-03-15 22:08:33 -0400 |
commit | 3ec0d47427be9ff5b82ba5c5e853c691a942ed65 (patch) | |
tree | 09fce5511a54a6233f57cf7efe724c31323b9a2e /arch/arm/mach-kirkwood | |
parent | 4640fa606bf996d275a6e208e3654e9e943afe60 (diff) | |
download | kernel_samsung_crespo-3ec0d47427be9ff5b82ba5c5e853c691a942ed65.zip kernel_samsung_crespo-3ec0d47427be9ff5b82ba5c5e853c691a942ed65.tar.gz kernel_samsung_crespo-3ec0d47427be9ff5b82ba5c5e853c691a942ed65.tar.bz2 |
[ARM] Kirkwood: SheevaPlug USB Power Enable setup
Ideally, the default should be set to 0 and let the EHCI driver turn
it on as needed. This makes USB usable in the mean time.
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r-- | arch/arm/mach-kirkwood/sheevaplug-setup.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c index d48989d..c1cb9f4 100644 --- a/arch/arm/mach-kirkwood/sheevaplug-setup.c +++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c @@ -14,12 +14,14 @@ #include <linux/mtd/nand.h> #include <linux/mtd/partitions.h> #include <linux/mv643xx_eth.h> +#include <linux/gpio.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <mach/kirkwood.h> #include <plat/mvsdio.h> #include <plat/orion_nand.h> #include "common.h" +#include "mpp.h" static struct mtd_partition sheevaplug_nand_parts[] = { { @@ -71,15 +73,26 @@ static struct mvsdio_platform_data sheevaplug_mvsdio_data = { // unfortunately the CD signal has not been connected */ }; +static unsigned int sheevaplug_mpp_config[] __initdata = { + MPP29_GPIO, /* USB Power Enable */ + 0 +}; + static void __init sheevaplug_init(void) { /* * Basic setup. Needs to be called early. */ kirkwood_init(); + kirkwood_mpp_conf(sheevaplug_mpp_config); kirkwood_uart0_init(); + + if (gpio_request(29, "USB Power Enable") != 0 || + gpio_direction_output(29, 1) != 0) + printk(KERN_ERR "can't set up GPIO 29 (USB Power Enable)\n"); kirkwood_ehci_init(); + kirkwood_ge00_init(&sheevaplug_ge00_data); kirkwood_sdio_init(&sheevaplug_mvsdio_data); |