Skip to content

Commit

Permalink
Merge branch 'ctrl-wip/mux-omap4-v4' of git://gitorious.org/omap-pm/l…
Browse files Browse the repository at this point in the history
…inux into omap-for-linus
  • Loading branch information
Tony Lindgren committed Nov 30, 2010
2 parents 55a4e78 + 032a642 commit 52aa8c5
Show file tree
Hide file tree
Showing 12 changed files with 2,310 additions and 147 deletions.
10 changes: 10 additions & 0 deletions arch/arm/mach-omap2/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ config OMAP_PACKAGE_CUS
config OMAP_PACKAGE_CBP
bool

config OMAP_PACKAGE_CBL
bool

config OMAP_PACKAGE_CBS
bool

comment "OMAP Board Type"
depends on ARCH_OMAP2PLUS

Expand Down Expand Up @@ -282,11 +288,15 @@ config MACH_OMAP_4430SDP
bool "OMAP 4430 SDP board"
default y
depends on ARCH_OMAP4
select OMAP_PACKAGE_CBL
select OMAP_PACKAGE_CBS

config MACH_OMAP4_PANDA
bool "OMAP4 Panda Board"
default y
depends on ARCH_OMAP4
select OMAP_PACKAGE_CBL
select OMAP_PACKAGE_CBS

config OMAP3_EMU
bool "OMAP3 debugging peripherals"
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-omap2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ AFLAGS_sram34xx.o :=-Wa,-march=armv7-a
obj-$(CONFIG_ARCH_OMAP2420) += mux2420.o
obj-$(CONFIG_ARCH_OMAP2430) += mux2430.o
obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o
obj-$(CONFIG_ARCH_OMAP4) += mux44xx.o

# SMS/SDRC
obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o
Expand Down
14 changes: 14 additions & 0 deletions arch/arm/mach-omap2/board-4430sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <plat/usb.h>
#include <plat/mmc.h>

#include "mux.h"
#include "hsmmc.h"
#include "timer-gp.h"
#include "control.h"
Expand Down Expand Up @@ -505,9 +506,22 @@ static void __init omap_sfh7741prox_init(void)
}
}

#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#else
#define board_mux NULL
#endif

static void __init omap_4430sdp_init(void)
{
int status;
int package = OMAP_PACKAGE_CBS;

if (omap_rev() == OMAP4430_REV_ES1_0)
package = OMAP_PACKAGE_CBL;
omap4_mux_init(board_mux, package);

omap4_i2c_init();
omap_sfh7741prox_init();
Expand Down
16 changes: 16 additions & 0 deletions arch/arm/mach-omap2/board-omap4panda.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

#include "hsmmc.h"
#include "control.h"
#include "mux.h"

#define GPIO_HUB_POWER 1
#define GPIO_HUB_NRESET 62
Expand Down Expand Up @@ -368,8 +369,23 @@ static int __init omap4_panda_i2c_init(void)
omap_register_i2c_bus(4, 400, NULL, 0);
return 0;
}

#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#else
#define board_mux NULL
#endif

static void __init omap4_panda_init(void)
{
int package = OMAP_PACKAGE_CBS;

if (omap_rev() == OMAP4430_REV_ES1_0)
package = OMAP_PACKAGE_CBL;
omap4_mux_init(board_mux, package);

omap4_panda_i2c_init();
platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
omap_serial_init();
Expand Down
12 changes: 9 additions & 3 deletions arch/arm/mach-omap2/board-rx51-peripherals.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,16 +293,18 @@ static struct omap_board_mux rx51_mmc2_off_mux[] = {
{ .reg_offset = OMAP_MUX_TERMINATOR },
};

static struct omap_mux_partition *partition;

/*
* Current flows to eMMC when eMMC is off and the data lines are pulled up,
* so pull them down. N.B. we pull 8 lines because we are using 8 lines.
*/
static void rx51_mmc2_remux(struct device *dev, int slot, int power_on)
{
if (power_on)
omap_mux_write_array(rx51_mmc2_on_mux);
omap_mux_write_array(partition, rx51_mmc2_on_mux);
else
omap_mux_write_array(rx51_mmc2_off_mux);
omap_mux_write_array(partition, rx51_mmc2_off_mux);
}

static struct omap2_hsmmc_info mmc[] __initdata = {
Expand Down Expand Up @@ -922,7 +924,11 @@ void __init rx51_peripherals_init(void)
rx51_init_wl1251();
spi_register_board_info(rx51_peripherals_spi_board_info,
ARRAY_SIZE(rx51_peripherals_spi_board_info));
omap2_hsmmc_init(mmc);

partition = omap_mux_get("core");
if (partition)
omap2_hsmmc_init(mmc);

platform_device_register(&rx51_charger_device);
}

Loading

0 comments on commit 52aa8c5

Please sign in to comment.