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: 1497801 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 52A4D3FC71 for ; Mon, 24 Sep 2012 13:59:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755566Ab2IXN7B (ORCPT ); Mon, 24 Sep 2012 09:59:01 -0400 Received: from na3sys009aog112.obsmtp.com ([74.125.149.207]:40766 "EHLO na3sys009aog112.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755503Ab2IXN67 (ORCPT ); Mon, 24 Sep 2012 09:58:59 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]) (using TLSv1) by na3sys009aob112.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 gj3so6750290lbb.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=Tf4udX2aXa88BoDkuzDOP5gFXRVwp6FyShN/AcA/kxYYtFZribBaCUjiVB8LTbRn4P /PDnwHiOURFXBPaBpqZ62LjyqQqh9hturAcEeudFYdolAG92jEFr6Y01+WFSnJ1Hll7A 9MsIJZgSu7+/u+UweXWqQo5fBtCQdYtwM/rnDa+A7J0CgxaO2/iv7lHdvacgPrtD6nD9 rmMBWiD0Ue/Jp8G3+r7XOHBfFD1Ok71wUdXWGOQN8Z3/gKCwCVbKbPe3tLSlFPkLYkYA +5Xhro8IkTiX9kITYDUjt8jJt/w2+QqF9X/GGTCxj4aQvCwLYXxVV6BNKALV8b1E4Cnz e3NA== 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: ALoCoQliJ6++gakWJiWAVTZm4qZRqcD/XywxFNpXnbBfA1zEih+ckjoHaE/NXLzpTIQzUXAOfTfr Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@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 */