From patchwork Mon Sep 24 13:58:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 1497771 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 230AFDF280 for ; Mon, 24 Sep 2012 13:59:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755559Ab2IXN7A (ORCPT ); Mon, 24 Sep 2012 09:59:00 -0400 Received: from na3sys009aog111.obsmtp.com ([74.125.149.205]:47972 "EHLO na3sys009aog111.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755541Ab2IXN67 (ORCPT ); Mon, 24 Sep 2012 09:58:59 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]) (using TLSv1) by na3sys009aob111.postini.com ([74.125.148.12]) with SMTP ID DSNKUGBnIWGWMtdVYZei618DyNUkbUEFz/7i@postini.com; Mon, 24 Sep 2012 06:58:58 PDT Received: by lbbgj3 with SMTP id gj3so6750289lbb.19 for ; Mon, 24 Sep 2012 06:58: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=6V0RqX1QvDT+Y73eqyhwXXpLrTh90IZayOAlAMe8+zM=; b=bd3OK7WKZwjMUassgGtATX/bfSoGBLKckDTPNjYjxP6kYQO/9/D8NHyvRQCmEPALbj hKbrFW59YriZJWEN25ahev8Vzk8wK2XrcwVOf+o8DmALiGUjtoZGX2kP6BxOUzZjOyw2 XjejppuwIZjiNwx72CIMg+7jfXnjUv8B65YnFQZ3uIjYJXSegByJahl2i6FLCuIy2MBT tuZ2LxOaS1OI2HUzQvshLFkOVeEGRKLLZxQAStmi9S1i446nDp6B0883IdW6ezw5ucyz Psry19AG6ceG/Z2JuJlvLjBXrpoRdE/99PFG8XO/48dU6U1rpU6PctuE2OGu97IqClxi 25XQ== Received: by 10.152.135.41 with SMTP id pp9mr1285211lab.7.1348495136380; Mon, 24 Sep 2012 06:58:56 -0700 (PDT) Received: from deskari.tieu.ti.com (a91-156-160-115.elisa-laajakaista.fi. [91.156.160.115]) by mx.google.com with ESMTPS id ly17sm4364922lab.2.2012.09.24.06.58.54 (version=SSLv3 cipher=OTHER); Mon, 24 Sep 2012 06:58:55 -0700 (PDT) From: Tomi Valkeinen To: archit@ti.com, linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Tomi Valkeinen Subject: [PATCH 6/9] OMAPDSS: DSI: Add FEAT_DSI_PLL_REFSEL Date: Mon, 24 Sep 2012 16:58:36 +0300 Message-Id: <1348495119-8262-7-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1348495119-8262-1-git-send-email-tomi.valkeinen@ti.com> References: <1348495119-8262-1-git-send-email-tomi.valkeinen@ti.com> X-Gm-Message-State: ALoCoQnCJjNz8fYiDMdA6zf+V4R+TX7vws4zQVtZDDq6xjehvxyueAN5paiMaQGSXZhWOyduQE8o Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Add FEAT_DSI_PLL_REFSEL. OMAP5's DSI PLL needs configuration to select the reference clock to be used. We always use SYSCLK. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/dsi.c | 2 ++ drivers/video/omap2/dss/dss_features.c | 1 + drivers/video/omap2/dss/dss_features.h | 1 + 3 files changed, 4 insertions(+) diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 0c3afc2..a16c8b2 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -1690,6 +1690,8 @@ int dsi_pll_set_clock_div(struct platform_device *dsidev, l = FLD_MOD(l, 1, 13, 13); /* DSI_PLL_REFEN */ l = FLD_MOD(l, 0, 14, 14); /* DSIPHY_CLKINEN */ l = FLD_MOD(l, 1, 20, 20); /* DSI_HSDIVBYPASS */ + if (dss_has_feature(FEAT_DSI_PLL_REFSEL)) + l = FLD_MOD(l, 3, 22, 21); /* REF_SYSCLK = sysclk */ dsi_write_reg(dsidev, DSI_PLL_CONFIGURATION2, l); REG_FLD_MOD(dsidev, DSI_PLL_GO, 1, 0, 0); /* DSI_PLL_GO */ diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index 177f6e8..4685531 100644 --- a/drivers/video/omap2/dss/dss_features.c +++ b/drivers/video/omap2/dss/dss_features.c @@ -520,6 +520,7 @@ static const enum dss_feat_id omap5_dss_feat_list[] = { FEAT_FIFO_MERGE, FEAT_BURST_2D, FEAT_DSI_PLL_SELFREQDCO, + FEAT_DSI_PLL_REFSEL, }; /* OMAP2 DSS Features */ diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h index f9b9d28..0020bf6 100644 --- a/drivers/video/omap2/dss/dss_features.h +++ b/drivers/video/omap2/dss/dss_features.h @@ -66,6 +66,7 @@ enum dss_feat_id { FEAT_OMAP3_DSI_FIFO_BUG, FEAT_BURST_2D, FEAT_DSI_PLL_SELFREQDCO, + FEAT_DSI_PLL_REFSEL, }; /* DSS register field id */