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: 1518531 Return-Path: X-Original-To: patchwork-linux-fbdev@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 1017B3FE80 for ; Fri, 28 Sep 2012 10:36:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757109Ab2I1KgA (ORCPT ); Fri, 28 Sep 2012 06:36:00 -0400 Received: from na3sys009aog132.obsmtp.com ([74.125.149.250]:40364 "EHLO na3sys009aog132.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753736Ab2I1Kf6 (ORCPT ); Fri, 28 Sep 2012 06:35:58 -0400 Received: from mail-la0-f46.google.com ([209.85.215.46]) (using TLSv1) by na3sys009aob132.postini.com ([74.125.148.12]) with SMTP ID DSNKUGV9jTrMrB/9UxfyRstzoWlcvsSXsgyc@postini.com; Fri, 28 Sep 2012 03:35:58 PDT Received: by lagh6 with SMTP id h6so966776lag.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=JT5ERFID6hM+AU/IsQ6Izz62p7IFo6pC4bCPQ92jXa6NyxxGwmO+K6UsD8/jfSuajB 0KXAC5JjcSD0KPjnm1uC3PhqaykYv8ksm3zNhmLc2c5I5qweWze3U075Oszf8HkOqQrv KP1A4hwHjOg2gQNgDzz0PeBDDs1IR95Rjue1GmQvsKSfxUliMxp1fPgAaGAX2UK6u8ue fhT9zSW3fj/ed8iH+14uLoJFAGVH74ouuvLrP3otFYkNzQYde/aD0XBonrTyf/SUHtYK Lzr5xjBCN/MLjNDB9pDls0+QkZZvpSQB5twJXrOtDKiXBAScBT5CI50FafpUn7x8nVV9 QzRA== 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: ALoCoQmrjymsrETYHrkRxcHqdAW9Dm13u+VQUu0yaoIKcdTJsEJsHOBR0LU+4W09Lha8TLmyyJCL Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@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;