Skip to content

Commit

Permalink
Merge branch 'omap-fixes-urgent' of git://git.linaro.org/people/rmk/l…
Browse files Browse the repository at this point in the history
…inux-arm

This pull request covers the major oopsing issues with OMAP, caused by
the lack of the TWL driver.  Even when the TWL driver is not built in,
we shouldn't oops.

* 'omap-fixes-urgent' of git://git.linaro.org/people/rmk/linux-arm:
  ARM: omap: fix broken twl-core dependencies and ifdefs
  ARM: omap: fix oops in drivers/video/omap2/dss/dpi.c
  ARM: omap: fix oops in arch/arm/mach-omap2/vp.c when pmic is not found
  • Loading branch information
Linus Torvalds committed Feb 13, 2012
2 parents ed5016d + 6252547 commit a269c2f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
5 changes: 5 additions & 0 deletions arch/arm/mach-omap2/vp.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ void __init omap_vp_init(struct voltagedomain *voltdm)
u32 val, sys_clk_rate, timeout, waittime;
u32 vddmin, vddmax, vstepmin, vstepmax;

if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) {
pr_err("%s: No PMIC info for vdd_%s\n", __func__, voltdm->name);
return;
}

if (!voltdm->read || !voltdm->write) {
pr_err("%s: No read/write API for accessing vdd_%s regs\n",
__func__, voltdm->name);
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ config MENELAUS

config TWL4030_CORE
bool "Texas Instruments TWL4030/TWL5030/TWL6030/TPS659x0 Support"
depends on I2C=y && GENERIC_HARDIRQS && IRQ_DOMAIN
depends on I2C=y && GENERIC_HARDIRQS
help
Say yes here if you have TWL4030 / TWL6030 family chip on your board.
This core driver provides register access and IRQ handling
Expand Down
6 changes: 4 additions & 2 deletions drivers/mfd/twl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,9 @@ struct twl_client {

static struct twl_client twl_modules[TWL_NUM_SLAVES];

#ifdef CONFIG_IRQ_DOMAIN
static struct irq_domain domain;
#endif

/* mapping the module id to slave id and base address */
struct twl_mapping {
Expand Down Expand Up @@ -1226,13 +1228,13 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
pdata->irq_base = status;
pdata->irq_end = pdata->irq_base + nr_irqs;

#ifdef CONFIG_IRQ_DOMAIN
domain.irq_base = pdata->irq_base;
domain.nr_irq = nr_irqs;
#ifdef CONFIG_OF_IRQ
domain.of_node = of_node_get(node);
domain.ops = &irq_domain_simple_ops;
#endif
irq_domain_add(&domain);
#endif

if (i2c_check_functionality(client->adapter, I2C_FUNC_I2C) == 0) {
dev_dbg(&client->dev, "can't talk I2C?\n");
Expand Down
5 changes: 5 additions & 0 deletions drivers/video/omap2/dss/dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev)
{
int r;

if (cpu_is_omap34xx() && !dpi.vdds_dsi_reg) {
DSSERR("no VDSS_DSI regulator\n");
return -ENODEV;
}

if (dssdev->manager == NULL) {
DSSERR("failed to enable display: no manager\n");
return -ENODEV;
Expand Down

0 comments on commit a269c2f

Please sign in to comment.