aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-kirkwood/sheevaplug-setup.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2009-03-02 23:44:41 -0500
committerNicolas Pitre <nico@cam.org>2009-03-15 22:08:33 -0400
commit3ec0d47427be9ff5b82ba5c5e853c691a942ed65 (patch)
tree09fce5511a54a6233f57cf7efe724c31323b9a2e /arch/arm/mach-kirkwood/sheevaplug-setup.c
parent4640fa606bf996d275a6e208e3654e9e943afe60 (diff)
[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/sheevaplug-setup.c')
-rw-r--r--arch/arm/mach-kirkwood/sheevaplug-setup.c13
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 d48989dfe4d1..c1cb9f4d346c 100644
--- a/arch/arm/mach-kirkwood/sheevaplug-setup.c
+++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c
@@ -14,12 +14,14 @@
14#include <linux/mtd/nand.h> 14#include <linux/mtd/nand.h>
15#include <linux/mtd/partitions.h> 15#include <linux/mtd/partitions.h>
16#include <linux/mv643xx_eth.h> 16#include <linux/mv643xx_eth.h>
17#include <linux/gpio.h>
17#include <asm/mach-types.h> 18#include <asm/mach-types.h>
18#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
19#include <mach/kirkwood.h> 20#include <mach/kirkwood.h>
20#include <plat/mvsdio.h> 21#include <plat/mvsdio.h>
21#include <plat/orion_nand.h> 22#include <plat/orion_nand.h>
22#include "common.h" 23#include "common.h"
24#include "mpp.h"
23 25
24static struct mtd_partition sheevaplug_nand_parts[] = { 26static struct mtd_partition sheevaplug_nand_parts[] = {
25 { 27 {
@@ -71,15 +73,26 @@ static struct mvsdio_platform_data sheevaplug_mvsdio_data = {
71 // unfortunately the CD signal has not been connected */ 73 // unfortunately the CD signal has not been connected */
72}; 74};
73 75
76static unsigned int sheevaplug_mpp_config[] __initdata = {
77 MPP29_GPIO, /* USB Power Enable */
78 0
79};
80
74static void __init sheevaplug_init(void) 81static void __init sheevaplug_init(void)
75{ 82{
76 /* 83 /*
77 * Basic setup. Needs to be called early. 84 * Basic setup. Needs to be called early.
78 */ 85 */
79 kirkwood_init(); 86 kirkwood_init();
87 kirkwood_mpp_conf(sheevaplug_mpp_config);
80 88
81 kirkwood_uart0_init(); 89 kirkwood_uart0_init();
90
91 if (gpio_request(29, "USB Power Enable") != 0 ||
92 gpio_direction_output(29, 1) != 0)
93 printk(KERN_ERR "can't set up GPIO 29 (USB Power Enable)\n");
82 kirkwood_ehci_init(); 94 kirkwood_ehci_init();
95
83 kirkwood_ge00_init(&sheevaplug_ge00_data); 96 kirkwood_ge00_init(&sheevaplug_ge00_data);
84 kirkwood_sdio_init(&sheevaplug_mvsdio_data); 97 kirkwood_sdio_init(&sheevaplug_mvsdio_data);
85 98