Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217000
b: refs/heads/master
c: 6515e48
h: refs/heads/master
v: v3
  • Loading branch information
Paul Walmsley committed Oct 8, 2010
1 parent be9b910 commit 3294191
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 69 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4415beb6fb519c4e98491666838494a8c46cc3ee
refs/heads/master: 6515e48932c8bf04227f9dd638c8ac634f89ba24
6 changes: 3 additions & 3 deletions trunk/arch/arm/mach-omap2/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,20 @@ config MACH_OMAP2_TUSB6010

config MACH_OMAP_H4
bool "OMAP 2420 H4 board"
depends on ARCH_OMAP2
depends on ARCH_OMAP2420
default y
select OMAP_PACKAGE_ZAF
select OMAP_DEBUG_DEVICES

config MACH_OMAP_APOLLON
bool "OMAP 2420 Apollon board"
depends on ARCH_OMAP2
depends on ARCH_OMAP2420
default y
select OMAP_PACKAGE_ZAC

config MACH_OMAP_2430SDP
bool "OMAP 2430 SDP board"
depends on ARCH_OMAP2
depends on ARCH_OMAP2430
default y
select OMAP_PACKAGE_ZAC

Expand Down
16 changes: 14 additions & 2 deletions trunk/arch/arm/mach-omap2/board-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,22 @@ static void __init omap_generic_init(void)

static void __init omap_generic_map_io(void)
{
omap2_set_globals_242x(); /* should be 242x, 243x, or 343x */
omap242x_map_common_io();
if (cpu_is_omap242x()) {
omap2_set_globals_242x();
omap242x_map_common_io();
} else if (cpu_is_omap243x()) {
omap2_set_globals_243x();
omap243x_map_common_io();
} else if (cpu_is_omap34xx()) {
omap2_set_globals_3xxx();
omap34xx_map_common_io();
} else if (cpu_is_omap44xx()) {
omap2_set_globals_443x();
omap44xx_map_common_io();
}
}

/* XXX This machine entry name should be updated */
MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
/* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
.phys_io = 0x48000000,
Expand Down
69 changes: 6 additions & 63 deletions trunk/arch/arm/mach-omap2/board-omap4panda.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@
#include "timer-gp.h"


#define GPIO_HUB_POWER 1
#define GPIO_HUB_NRESET 62

static struct gpio_led gpio_leds[] = {
{
.name = "pandaboard::status1",
Expand Down Expand Up @@ -81,56 +78,6 @@ static void __init omap4_panda_init_irq(void)
omap_gpio_init();
}

static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
.port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
.phy_reset = false,
.reset_gpio_port[0] = -EINVAL,
.reset_gpio_port[1] = -EINVAL,
.reset_gpio_port[2] = -EINVAL
};

static void __init omap4_ehci_init(void)
{
int ret;


/* disable the power to the usb hub prior to init */
ret = gpio_request(GPIO_HUB_POWER, "hub_power");
if (ret) {
pr_err("Cannot request GPIO %d\n", GPIO_HUB_POWER);
goto error1;
}
gpio_export(GPIO_HUB_POWER, 0);
gpio_direction_output(GPIO_HUB_POWER, 0);
gpio_set_value(GPIO_HUB_POWER, 0);

/* reset phy+hub */
ret = gpio_request(GPIO_HUB_NRESET, "hub_nreset");
if (ret) {
pr_err("Cannot request GPIO %d\n", GPIO_HUB_NRESET);
goto error2;
}
gpio_export(GPIO_HUB_NRESET, 0);
gpio_direction_output(GPIO_HUB_NRESET, 0);
gpio_set_value(GPIO_HUB_NRESET, 0);
gpio_set_value(GPIO_HUB_NRESET, 1);

usb_ehci_init(&ehci_pdata);

/* enable power to hub */
gpio_set_value(GPIO_HUB_POWER, 1);
return;

error2:
gpio_free(GPIO_HUB_POWER);
error1:
pr_err("Unable to initialize EHCI power/reset\n");
return;

}

static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_UTMI,
.mode = MUSB_PERIPHERAL,
Expand All @@ -151,6 +98,10 @@ static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = {
.supply = "vmmc",
.dev_name = "mmci-omap-hs.0",
},
{
.supply = "vmmc",
.dev_name = "mmci-omap-hs.1",
},
};

static int omap4_twl6030_hsmmc_late_init(struct device *dev)
Expand All @@ -169,14 +120,7 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)

static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
{
struct omap_mmc_platform_data *pdata;

/* dev can be null if CONFIG_MMC_OMAP_HS is not set */
if (!dev) {
pr_err("Failed omap4_twl6030_hsmmc_set_late_init\n");
return;
}
pdata = dev->platform_data;
struct omap_mmc_platform_data *pdata = dev->platform_data;

pdata->init = omap4_twl6030_hsmmc_late_init;
}
Expand Down Expand Up @@ -243,7 +187,7 @@ static struct regulator_init_data omap4_panda_vmmc = {
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.num_consumer_supplies = 2,
.consumer_supplies = omap4_panda_vmmc_supply,
};

Expand Down Expand Up @@ -367,7 +311,6 @@ static void __init omap4_panda_init(void)
omap4_twl6030_hsmmc_init(mmc);
/* OMAP4 Panda uses internal transceiver so register nop transceiver */
usb_nop_xceiv_register();
omap4_ehci_init();
/* FIXME: allow multi-omap to boot until musb is updated for omap4 */
if (!cpu_is_omap44xx())
usb_musb_init(&musb_board_data);
Expand Down

0 comments on commit 3294191

Please sign in to comment.