Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276105
b: refs/heads/master
c: 13662dc
h: refs/heads/master
i:
  276103: 4791267
v: v3
  • Loading branch information
Tomi Valkeinen authored and Paul Walmsley committed Nov 8, 2011
1 parent d234a9a commit 8a23310
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 12 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: 3ce32676bb355420ceeda57b73dd84df0ff5ad6f
refs/heads/master: 13662dc5b177d68885695ef513dd4ae0e4d2a099
5 changes: 1 addition & 4 deletions trunk/arch/arm/mach-omap2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Common support
obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \
common.o gpio.o dma.o wd_timer.o
common.o gpio.o dma.o wd_timer.o display.o

omap-2-3-common = irq.o sdrc.o
hwmod-common = omap_hwmod.o \
Expand Down Expand Up @@ -264,7 +264,4 @@ smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o
obj-y += $(smsc911x-m) $(smsc911x-y)
obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o

disp-$(CONFIG_OMAP2_DSS) := display.o
obj-y += $(disp-m) $(disp-y)

obj-y += common-board-devices.o twl-common.o
35 changes: 35 additions & 0 deletions trunk/arch/arm/mach-omap2/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <plat/omap_hwmod.h>
#include <plat/omap_device.h>
#include <plat/omap-pm.h>
#include <plat/common.h>

#include "control.h"

Expand Down Expand Up @@ -172,3 +173,37 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)

return r;
}

#define MAX_MODULE_SOFTRESET_WAIT 10000
int omap_dss_reset(struct omap_hwmod *oh)
{
struct omap_hwmod_opt_clk *oc;
int c = 0;
int i, r;

if (!(oh->class->sysc->sysc_flags & SYSS_HAS_RESET_STATUS)) {
pr_err("dss_core: hwmod data doesn't contain reset data\n");
return -EINVAL;
}

for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
if (oc->_clk)
clk_enable(oc->_clk);

omap_test_timeout((omap_hwmod_read(oh, oh->class->sysc->syss_offs)
& SYSS_RESETDONE_MASK),
MAX_MODULE_SOFTRESET_WAIT, c);

if (c == MAX_MODULE_SOFTRESET_WAIT)
pr_warning("dss_core: waiting for reset to finish failed\n");
else
pr_debug("dss_core: softreset done\n");

for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
if (oc->_clk)
clk_disable(oc->_clk);

r = (c == MAX_MODULE_SOFTRESET_WAIT) ? -ETIMEDOUT : 0;

return r;
}
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <plat/omap_hwmod.h>
#include <plat/serial.h>
#include <plat/dma.h>
#include <plat/common.h>

#include <mach/irqs.h>

Expand Down Expand Up @@ -51,6 +52,7 @@ static struct omap_hwmod_class_sysconfig omap2_dss_sysc = {
struct omap_hwmod_class omap2_dss_hwmod_class = {
.name = "dss",
.sysc = &omap2_dss_sysc,
.reset = omap_dss_reset,
};

/*
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <plat/mmc.h>
#include <plat/i2c.h>
#include <plat/dmtimer.h>
#include <plat/common.h>

#include "omap_hwmod_common_data.h"

Expand Down Expand Up @@ -1187,6 +1188,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_dss_sysc = {
static struct omap_hwmod_class omap44xx_dss_hwmod_class = {
.name = "dss",
.sysc = &omap44xx_dss_sysc,
.reset = omap_dss_reset,
};

/* dss */
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/arm/plat-omap/include/plat/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <linux/delay.h>

#include <plat/i2c.h>
#include <plat/omap_hwmod.h>

struct sys_timer;

Expand All @@ -55,6 +56,8 @@ void am35xx_init_early(void);
void ti816x_init_early(void);
void omap4430_init_early(void);

extern int omap_dss_reset(struct omap_hwmod *);

void omap_sram_init(void);

/*
Expand Down
7 changes: 0 additions & 7 deletions trunk/include/video/omapdss.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,8 @@ struct omap_dss_board_info {
void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask);
};

#if defined(CONFIG_OMAP2_DSS_MODULE) || defined(CONFIG_OMAP2_DSS)
/* Init with the board info */
extern int omap_display_init(struct omap_dss_board_info *board_data);
#else
static inline int omap_display_init(struct omap_dss_board_info *board_data)
{
return 0;
}
#endif

struct omap_display_platform_data {
struct omap_dss_board_info *board_data;
Expand Down

0 comments on commit 8a23310

Please sign in to comment.