Skip to content

Commit

Permalink
Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/kernel/git/tmlind/linux-omap-2.6

* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (27 commits)
  omap4: Fix ULPI PHY init for ES1.0 SDP
  omap3: beaglexm: fix power on of DVI
  omap3: igep3: Add omap_reserve functionality
  omap3: beaglexm: fix DVI reset GPIO
  omap3: beaglexm: fix EHCI power up GPIO dir
  omap3: igep2: Add keypad support
  omap3: igep3: Fix IGEP module second MMC channel power supply
  omap3: igep3: Add USB EHCI support for IGEP module
  omap3: clocks: Fix build error 'CK_3430ES2' undeclared here
  arm: omap4: pandaboard: turn on PHY reference clock at init
  omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg'
  omap2plus: voltage: Trivial linking fix for 'EINVAL' undeclared
  omap2plus: voltage: Trivial linking fix 'undefined reference'
  omap2plus: voltage: Trivial warning fix 'no return statement'
  omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask
  arm: omap: gpio: don't access irq_desc array directly
  omap2+: pm_bus: make functions used as pointers as static
  OMAP: GPIO: fix _set_gpio_triggering() for OMAP2+
  OMAP2+: TWL: include pm header for init protos
  OMAP2+: TWL: make conversion routines static
  ...

Fix up conflicts in arch/arm/mach-omap2/board-omap3beagle.c ("DVI reset
GPIO" vs "use generic DPI panel driver")
  • Loading branch information
torvalds committed Jan 14, 2011
2 parents 9cefa17 + 7d4ca85 commit ec08bdb
Show file tree
Hide file tree
Showing 20 changed files with 280 additions and 51 deletions.
10 changes: 6 additions & 4 deletions arch/arm/mach-omap2/board-4430sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ static void __init omap_sfh7741prox_init(void)

#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#else
Expand All @@ -576,11 +577,12 @@ static void __init omap_4430sdp_init(void)
omap4_twl6030_hsmmc_init(mmc);

/* Power on the ULPI PHY */
if (gpio_is_valid(OMAP4SDP_MDM_PWR_EN_GPIO)) {
/* FIXME: Assumes pad is already muxed for GPIO mode */
gpio_request(OMAP4SDP_MDM_PWR_EN_GPIO, "USBB1 PHY VMDM_3V3");
status = gpio_request(OMAP4SDP_MDM_PWR_EN_GPIO, "USBB1 PHY VMDM_3V3");
if (status)
pr_err("%s: Could not get USBB1 PHY GPIO\n", __func__);
else
gpio_direction_output(OMAP4SDP_MDM_PWR_EN_GPIO, 1);
}

usb_ehci_init(&ehci_pdata);
usb_musb_init(&musb_board_data);

Expand Down
33 changes: 33 additions & 0 deletions arch/arm/mach-omap2/board-igep0020.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/io.h>
#include <linux/gpio.h>
#include <linux/interrupt.h>
#include <linux/input.h>

#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
Expand Down Expand Up @@ -541,6 +542,37 @@ static struct twl4030_codec_data igep2_codec_data = {
.audio = &igep2_audio_data,
};

static int igep2_keymap[] = {
KEY(0, 0, KEY_LEFT),
KEY(0, 1, KEY_RIGHT),
KEY(0, 2, KEY_A),
KEY(0, 3, KEY_B),
KEY(1, 0, KEY_DOWN),
KEY(1, 1, KEY_UP),
KEY(1, 2, KEY_E),
KEY(1, 3, KEY_F),
KEY(2, 0, KEY_ENTER),
KEY(2, 1, KEY_I),
KEY(2, 2, KEY_J),
KEY(2, 3, KEY_K),
KEY(3, 0, KEY_M),
KEY(3, 1, KEY_N),
KEY(3, 2, KEY_O),
KEY(3, 3, KEY_P)
};

static struct matrix_keymap_data igep2_keymap_data = {
.keymap = igep2_keymap,
.keymap_size = ARRAY_SIZE(igep2_keymap),
};

static struct twl4030_keypad_data igep2_keypad_pdata = {
.keymap_data = &igep2_keymap_data,
.rows = 4,
.cols = 4,
.rep = 1,
};

static struct twl4030_platform_data igep2_twldata = {
.irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END,
Expand All @@ -549,6 +581,7 @@ static struct twl4030_platform_data igep2_twldata = {
.usb = &igep2_usb_data,
.codec = &igep2_codec_data,
.gpio = &igep2_twl4030_gpio_pdata,
.keypad = &igep2_keypad_pdata,
.vmmc1 = &igep2_vmmc1,
.vpll2 = &igep2_vpll2,
.vio = &igep2_vio,
Expand Down
85 changes: 72 additions & 13 deletions arch/arm/mach-omap2/board-igep0030.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/interrupt.h>

#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
#include <linux/i2c/twl.h>
#include <linux/mmc/host.h>

Expand All @@ -43,7 +44,7 @@
#define IGEP3_GPIO_WIFI_NRESET 139
#define IGEP3_GPIO_BT_NRESET 137

#define IGEP3_GPIO_USBH_NRESET 115
#define IGEP3_GPIO_USBH_NRESET 183


#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
Expand Down Expand Up @@ -103,7 +104,7 @@ static struct platform_device igep3_onenand_device = {
},
};

void __init igep3_flash_init(void)
static void __init igep3_flash_init(void)
{
u8 cs = 0;
u8 onenandcs = GPMC_CS_NUM + 1;
Expand Down Expand Up @@ -137,12 +138,11 @@ void __init igep3_flash_init(void)
}

#else
void __init igep3_flash_init(void) {}
static void __init igep3_flash_init(void) {}
#endif

static struct regulator_consumer_supply igep3_vmmc1_supply = {
.supply = "vmmc",
};
static struct regulator_consumer_supply igep3_vmmc1_supply =
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");

/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
static struct regulator_init_data igep3_vmmc1 = {
Expand All @@ -159,6 +159,52 @@ static struct regulator_init_data igep3_vmmc1 = {
.consumer_supplies = &igep3_vmmc1_supply,
};

static struct regulator_consumer_supply igep3_vio_supply =
REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1");

static struct regulator_init_data igep3_vio = {
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.apply_uV = 1,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = &igep3_vio_supply,
};

static struct regulator_consumer_supply igep3_vmmc2_supply =
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");

static struct regulator_init_data igep3_vmmc2 = {
.constraints = {
.valid_modes_mask = REGULATOR_MODE_NORMAL,
.always_on = 1,
},
.num_consumer_supplies = 1,
.consumer_supplies = &igep3_vmmc2_supply,
};

static struct fixed_voltage_config igep3_vwlan = {
.supply_name = "vwlan",
.microvolts = 3300000,
.gpio = -EINVAL,
.enabled_at_boot = 1,
.init_data = &igep3_vmmc2,
};

static struct platform_device igep3_vwlan_device = {
.name = "reg-fixed-voltage",
.id = 0,
.dev = {
.platform_data = &igep3_vwlan,
},
};

static struct omap2_hsmmc_info mmc[] = {
[0] = {
.mmc = 1,
Expand Down Expand Up @@ -254,12 +300,6 @@ static int igep3_twl4030_gpio_setup(struct device *dev,
mmc[0].gpio_cd = gpio + 0;
omap2_hsmmc_init(mmc);

/*
* link regulators to MMC adapters ... we "know" the
* regulators will be set up only *after* we return.
*/
igep3_vmmc1_supply.dev = mmc[0].dev;

/* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
#if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE)
if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, "gpio-led:green:d1") == 0)
Expand Down Expand Up @@ -287,6 +327,10 @@ static struct twl4030_usb_data igep3_twl4030_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
};

static struct platform_device *igep3_devices[] __initdata = {
&igep3_vwlan_device,
};

static void __init igep3_init_irq(void)
{
omap2_init_common_infrastructure();
Expand All @@ -303,6 +347,7 @@ static struct twl4030_platform_data igep3_twl4030_pdata = {
.usb = &igep3_twl4030_usb_data,
.gpio = &igep3_twl4030_gpio_pdata,
.vmmc1 = &igep3_vmmc1,
.vio = &igep3_vio,
};

static struct i2c_board_info __initdata igep3_i2c_boardinfo[] = {
Expand Down Expand Up @@ -363,8 +408,20 @@ static void __init igep3_wifi_bt_init(void)
void __init igep3_wifi_bt_init(void) {}
#endif

static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
.port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN,
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,

.phy_reset = true,
.reset_gpio_port[0] = -EINVAL,
.reset_gpio_port[1] = IGEP3_GPIO_USBH_NRESET,
.reset_gpio_port[2] = -EINVAL,
};

#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
OMAP3_MUX(I2C2_SDA, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#endif
Expand All @@ -375,9 +432,10 @@ static void __init igep3_init(void)

/* Register I2C busses and drivers */
igep3_i2c_init();

platform_add_devices(igep3_devices, ARRAY_SIZE(igep3_devices));
omap_serial_init();
usb_musb_init(&musb_board_data);
usb_ehci_init(&ehci_pdata);

igep3_flash_init();
igep3_leds_init();
Expand All @@ -392,6 +450,7 @@ static void __init igep3_init(void)

MACHINE_START(IGEP0030, "IGEP OMAP3 module")
.boot_params = 0x80000100,
.reserve = omap_reserve,
.map_io = omap3_map_io,
.init_irq = igep3_init_irq,
.init_machine = igep3_init,
Expand Down
60 changes: 54 additions & 6 deletions arch/arm/mach-omap2/board-omap3beagle.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static struct omap_dss_device beagle_dvi_device = {
.driver_name = "generic_dpi_panel",
.data = &dvi_panel,
.phy.dpi.data_lines = 24,
.reset_gpio = 170,
.reset_gpio = -EINVAL,
};

static struct omap_dss_device beagle_tv_device = {
Expand Down Expand Up @@ -279,6 +279,8 @@ static struct gpio_led gpio_leds[];
static int beagle_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio)
{
int r;

if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
mmc[0].gpio_wp = -EINVAL;
} else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) ||
Expand All @@ -299,17 +301,63 @@ static int beagle_twl_gpio_setup(struct device *dev,
/* REVISIT: need ehci-omap hooks for external VBUS
* power switch and overcurrent detect
*/
if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) {
r = gpio_request(gpio + 1, "EHCI_nOC");
if (!r) {
r = gpio_direction_input(gpio + 1);
if (r)
gpio_free(gpio + 1);
}
if (r)
pr_err("%s: unable to configure EHCI_nOC\n", __func__);
}

gpio_request(gpio + 1, "EHCI_nOC");
gpio_direction_input(gpio + 1);

/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
/*
* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
* high / others active low)
*/
gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
else
gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);

/* DVI reset GPIO is different between beagle revisions */
if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
beagle_dvi_device.reset_gpio = 129;
else
beagle_dvi_device.reset_gpio = 170;

/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;

/*
* gpio + 1 on Xm controls the TFP410's enable line (active low)
* gpio + 2 control varies depending on the board rev as follows:
* P7/P8 revisions(prototype): Camera EN
* A2+ revisions (production): LDO (supplies DVI, serial, led blocks)
*/
if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
r = gpio_request(gpio + 1, "nDVI_PWR_EN");
if (!r) {
r = gpio_direction_output(gpio + 1, 0);
if (r)
gpio_free(gpio + 1);
}
if (r)
pr_err("%s: unable to configure nDVI_PWR_EN\n",
__func__);
r = gpio_request(gpio + 2, "DVI_LDO_EN");
if (!r) {
r = gpio_direction_output(gpio + 2, 1);
if (r)
gpio_free(gpio + 2);
}
if (r)
pr_err("%s: unable to configure DVI_LDO_EN\n",
__func__);
}

return 0;
}

Expand Down
10 changes: 10 additions & 0 deletions arch/arm/mach-omap2/board-omap4panda.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/leds.h>
#include <linux/gpio.h>
Expand Down Expand Up @@ -95,7 +96,16 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
static void __init omap4_ehci_init(void)
{
int ret;
struct clk *phy_ref_clk;

/* FREF_CLK3 provides the 19.2 MHz reference clock to the PHY */
phy_ref_clk = clk_get(NULL, "auxclk3_ck");
if (IS_ERR(phy_ref_clk)) {
pr_err("Cannot request auxclk3\n");
goto error1;
}
clk_set_rate(phy_ref_clk, 19200000);
clk_enable(phy_ref_clk);

/* disable the power to the usb hub prior to init */
ret = gpio_request(GPIO_HUB_POWER, "hub_power");
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-omap2/board-zoom-peripherals.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static struct platform_device omap_vwlan_device = {
},
};

struct wl12xx_platform_data omap_zoom_wlan_data __initdata = {
static struct wl12xx_platform_data omap_zoom_wlan_data __initdata = {
.irq = OMAP_GPIO_IRQ(OMAP_ZOOM_WLAN_IRQ_GPIO),
/* ZOOM ref clock is 26 MHz */
.board_ref_clock = 1,
Expand Down Expand Up @@ -286,7 +286,7 @@ static int zoom_twl_gpio_setup(struct device *dev,
}

/* EXTMUTE callback function */
void zoom2_set_hs_extmute(int mute)
static void zoom2_set_hs_extmute(int mute)
{
gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute);
}
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/clock3xxx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -3286,7 +3286,7 @@ static struct omap_clk omap3xxx_clks[] = {
CLK(NULL, "cpefuse_fck", &cpefuse_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK("ehci-omap.0", "usbtll_fck", &usbtll_fck, CK_3430ES2 | CK_AM35XX),
CLK("ehci-omap.0", "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK("omap-mcbsp.1", "prcm_fck", &core_96m_fck, CK_3XXX),
CLK("omap-mcbsp.5", "prcm_fck", &core_96m_fck, CK_3XXX),
CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX),
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/mach-omap2/clockdomain.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ struct clockdomain {
const char *name;
struct powerdomain *ptr;
} pwrdm;
#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
const u16 clktrctrl_mask;
#endif
const u8 flags;
const u8 dep_bit;
const u8 prcm_partition;
Expand Down
Loading

0 comments on commit ec08bdb

Please sign in to comment.