~ubuntu-branches/ubuntu/precise/linux-linaro-u8500/precise

« back to all changes in this revision

Viewing changes to arch/arm/mach-omap2/display.c

  • Committer: Bazaar Package Importer
  • Author(s): John Rigby, Upstream Fixes, Andy Green, John Rigby
  • Date: 2011-04-14 12:16:06 UTC
  • Revision ID: james.westby@ubuntu.com-20110414121606-b77podkyqgr2oix7
Tags: 2.6.38-1002.3
[ Upstream Fixes ]

* MUSB: shutdown: Make sure block is awake before doing shutdown
  - LP: #745737
* Fixed gpio polarity of gpio USB-phy reset.
  - LP: #747639

[ Andy Green ]

* LINARO: SAUCE: disable CONFIG_OMAP_RESET_CLOCKS
  - LP: #752900

[ John Rigby ]

* Rebase to new upstreams:
  Linux v2.6.38.1
  linaro-linux-2.6.38-upstream-29Mar2011
  Ubuntu-2.6.38-7.35
* SAUCE: OMAP4: clock: wait for module to become accessible on
  a clk enable
  - LP: #745737
* Rebase to new upstreams:
  Linux v2.6.38.2
  linaro-linux-2.6.38-upstream-5Apr2011
  Ubuntu-2.6.38-8.41
  - LP: #732842
* Update configs for device tree, dvfs and lttng
* LINARO: add building of dtb's
* LINARO: SAUCE: Disable lowest operating freqs on omap34xx
  - LP: #732912

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include <plat/omap_device.h>
28
28
 
29
29
static struct platform_device omap_display_device = {
30
 
        .name          = "omap_display",
 
30
        .name          = "omapdss",
31
31
        .id            = -1,
32
32
        .dev            = {
33
33
                .platform_data = NULL,
42
42
        },
43
43
};
44
44
 
45
 
int __init omap_display_init(struct omap_dss_board_info
46
 
                                        *board_data)
 
45
/* oh_core is used for getting opt-clocks */
 
46
static struct omap_hwmod        *oh_core;
 
47
 
 
48
static bool opt_clock_available(const char *clk_role)
 
49
{
 
50
        int i;
 
51
 
 
52
        for (i = 0; i < oh_core->opt_clks_cnt; i++) {
 
53
                if (!strcmp(oh_core->opt_clks[i].role, clk_role))
 
54
                        return true;
 
55
        }
 
56
        return false;
 
57
}
 
58
 
 
59
int __init omap_display_init(struct omap_dss_board_info *board_data)
47
60
{
48
61
        int r = 0;
49
62
        struct omap_hwmod *oh;
57
70
         * omap3,4: dss_dsi1
58
71
         * omap4: dss_dsi2, dss_hdmi
59
72
         */
60
 
        char *oh_name[] = {"dss_core", "dss_dispc", "dss_rfbi", "dss_venc", "dss_dsi1",
61
 
                                "dss_dsi2", "dss_hdmi"};
62
 
        char *dev_name[] = {"omap_dss", "omap_dispc", "omap_rfbi", "omap_venc", "omap_dsi1",
63
 
                                "omap_dsi2", "omap_hdmi"};
 
73
        char *oh_name[] = { "dss_core", "dss_dispc", "dss_rfbi", "dss_venc",
 
74
                "dss_dsi1", "dss_dsi2", "dss_hdmi" };
 
75
        char *dev_name[] = { "omapdss_dss", "omapdss_dispc", "omapdss_rfbi",
 
76
                "omapdss_venc", "omapdss_dsi1", "omapdss_dsi2",
 
77
                "omapdss_hdmi" };
64
78
        int oh_count;
65
79
 
66
80
        memset(&pdata, 0, sizeof(pdata));
74
88
                oh_count = ARRAY_SIZE(oh_name) - 2;
75
89
                /* last 2 hwmod dev in oh_name are not available for omap3 */
76
90
 
 
91
        /* opt_clks are always associated with dss hwmod */
 
92
        oh_core = omap_hwmod_lookup("dss_core");
 
93
        if (!oh_core) {
 
94
                pr_err("Could not look up dss_core.\n");
 
95
                return -ENODEV;
 
96
        }
77
97
 
78
98
        pdata.board_data = board_data;
79
99
        pdata.board_data->get_last_off_on_transaction_id = NULL;
 
100
        pdata.opt_clock_available = opt_clock_available;
80
101
 
81
102
        for (i = 0; i < oh_count; i++) {
82
103
                oh = omap_hwmod_lookup(oh_name[i]);
84
105
                        pr_err("Could not look up %s\n", oh_name[i]);
85
106
                        return -ENODEV;
86
107
                }
 
108
 
87
109
                od = omap_device_build(dev_name[i], -1, oh, &pdata,
88
110
                                sizeof(struct omap_display_platform_data),
89
111
                                omap_dss_latency,