From patchwork Fri Sep 28 10:35:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 1518521 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0D9833FE80 for ; Fri, 28 Sep 2012 10:36:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754680Ab2I1KgA (ORCPT ); Fri, 28 Sep 2012 06:36:00 -0400 Received: from na3sys009aog108.obsmtp.com ([74.125.149.199]:34984 "EHLO na3sys009aog108.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753250Ab2I1Kf6 (ORCPT ); Fri, 28 Sep 2012 06:35:58 -0400 Received: from mail-bk0-f46.google.com ([209.85.214.46]) (using TLSv1) by na3sys009aob108.postini.com ([74.125.148.12]) with SMTP ID DSNKUGV9jTrMrB/9UxfyRstzoWlcvsSXsgyc@postini.com; Fri, 28 Sep 2012 03:35:58 PDT Received: by bkcjk13 with SMTP id jk13so3146838bkc.19 for ; Fri, 28 Sep 2012 03:35:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=QxfgEBI1H7ijsC6RdKRX6zVrrSF8r00zjYMc43vbSPw=; b=fTNmod66N2jTxYPRHgNjUhRdWZI4ghrgpQY80B4E2wI08k4z7B9CMQztGbtz3sExho 5Q4WeDI3VOY0ZYUH2ADpUsE9gD0LM+9Qicd76fHnKjmpyIV4QGMuOKomHvZV6H0LAqUj Z/UtY5uST5MN5vglAo2XcihOJQtsevpBvvKMjM7j6Mj+UulgWjJZFxOWaGk5rAUyX4J7 1VrY7KbW35xixg2N841Un1vXo78/6kED8pVsxx3cajz6Aki6xRKQrZzahKOIhBJO1pU4 OWn6fgjn3naOURLxjX+2Upca1/k0C5RjEL6eQqepFSdRTTrHG7+Fm8yxZWpoTNT2pvl9 C+tw== Received: by 10.152.103.243 with SMTP id fz19mr5563068lab.27.1348828556258; Fri, 28 Sep 2012 03:35:56 -0700 (PDT) Received: from localhost.localdomain (a91-156-160-115.elisa-laajakaista.fi. [91.156.160.115]) by mx.google.com with ESMTPS id pi16sm2394521lab.7.2012.09.28.03.35.54 (version=SSLv3 cipher=OTHER); Fri, 28 Sep 2012 03:35:55 -0700 (PDT) From: Tomi Valkeinen To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Archit Taneja , Chandrabhanu Mahapatra , =?UTF-8?q?Rapha=C3=ABl=20Ass=C3=A9nat?= , Tony Lindgren , Tomi Valkeinen Subject: [PATCH 5/6] OMAPDSS: HDMI: use omapdss_version Date: Fri, 28 Sep 2012 13:35:26 +0300 Message-Id: <1348828527-13309-6-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1348828527-13309-1-git-send-email-tomi.valkeinen@ti.com> References: <1348828527-13309-1-git-send-email-tomi.valkeinen@ti.com> X-Gm-Message-State: ALoCoQmnlgzkrlDwvZj+Ae7x+NCKbcLUp0Ao/A5k+TPK+EKKJ9arSRznzL/6PnLRIjeQv9nGvKTN Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Use omapdss_version in hdmi.c to select the proper hdmi features. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/dss_features.c | 14 ++++++++++++-- drivers/video/omap2/dss/dss_features.h | 3 ++- drivers/video/omap2/dss/hdmi.c | 3 ++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index 5936ba7..e2c2e2b 100644 --- a/drivers/video/omap2/dss/dss_features.c +++ b/drivers/video/omap2/dss/dss_features.c @@ -825,10 +825,20 @@ static const struct ti_hdmi_ip_ops omap4_hdmi_functions = { }; -void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data) +void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data, + enum omapdss_version version) { - if (cpu_is_omap44xx()) + switch (version) { + case OMAPDSS_VER_OMAP4430_ES1: + case OMAPDSS_VER_OMAP4430_ES2: + case OMAPDSS_VER_OMAP4: ip_data->ops = &omap4_hdmi_functions; + break; + default: + ip_data->ops = NULL; + } + + WARN_ON(ip_data->ops == NULL); } #endif diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h index 14a412e..fc492ef 100644 --- a/drivers/video/omap2/dss/dss_features.h +++ b/drivers/video/omap2/dss/dss_features.h @@ -125,6 +125,7 @@ bool dss_has_feature(enum dss_feat_id id); void dss_feat_get_reg_field(enum dss_feat_reg_field id, u8 *start, u8 *end); void dss_features_init(enum omapdss_version version); #if defined(CONFIG_OMAP4_DSS_HDMI) -void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data); +void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data, + enum omapdss_version version); #endif #endif diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index a48a7dd..adcc906 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -323,6 +323,7 @@ static void hdmi_runtime_put(void) static int __init hdmi_init_display(struct omap_dss_device *dssdev) { + struct omap_dss_board_info *pdata = hdmi.pdev->dev.platform_data; int r; struct gpio gpios[] = { @@ -333,7 +334,7 @@ static int __init hdmi_init_display(struct omap_dss_device *dssdev) DSSDBG("init_display\n"); - dss_init_hdmi_ip_ops(&hdmi.ip_data); + dss_init_hdmi_ip_ops(&hdmi.ip_data, pdata->version); if (hdmi.vdda_hdmi_dac_reg == NULL) { struct regulator *reg;