From patchwork Fri Jun 13 16:15:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 31883 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9E0B22054B for ; Fri, 13 Jun 2014 16:17:13 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id kq14sf10019915pab.0 for ; Fri, 13 Jun 2014 09:17:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=GIlfgcf6ziu2Bvs/2JgAEX+IQNip4KJtGVEduvX7HIw=; b=LviGslvW0xTjI0EHv0C9mAmLPRWn47Vj/LfvgeXENve3vgAawIW6qYXvAH3VuzKgri 92eegN5VkQ4wSfmkLqJH3gFWCULYWdMpBKrXFSi8d8OJTiSiPgyp+rSjTrOS4Hgb/ody ygQqlKwqVnRqUK1ScW5LOOuP3ZVIlHvLoWqDt1aPZt6fpmu6pk9gUVKM54CgoFKggnYP Mh3XkeMzKdkKZYmOcrx2gqg1MJOdv1sF4ovO7JRHdR6EGSXpToncAo4bHXzhXOjDTR+B JgCvZpnYiKL6o2MxpnAmIULz4LdNvldIpwZLamCcGCeYVSUBl8YxucgMzHjKiRCiWsLr PwJA== X-Gm-Message-State: ALoCoQk5OqeVk9dn91fAjEIrdzTwXZfl+iw7XFMNiHnOvRrq1oe4uJXwH6owY5aa12tSnSwsZXv7 X-Received: by 10.66.137.2 with SMTP id qe2mr1281872pab.43.1402676232847; Fri, 13 Jun 2014 09:17:12 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.41.8 with SMTP id y8ls3658902qgy.11.gmail; Fri, 13 Jun 2014 09:17:12 -0700 (PDT) X-Received: by 10.52.164.70 with SMTP id yo6mr440032vdb.67.1402676232684; Fri, 13 Jun 2014 09:17:12 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id 1si1561738ver.14.2014.06.13.09.17.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Jun 2014 09:17:12 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id db12so3562312veb.7 for ; Fri, 13 Jun 2014 09:17:12 -0700 (PDT) X-Received: by 10.58.216.163 with SMTP id or3mr21775vec.80.1402676232580; Fri, 13 Jun 2014 09:17:12 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp504394vcb; Fri, 13 Jun 2014 09:17:12 -0700 (PDT) X-Received: by 10.68.215.3 with SMTP id oe3mr4451983pbc.109.1402676231492; Fri, 13 Jun 2014 09:17:11 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yk1si2660525pbc.41.2014.06.13.09.17.10; Fri, 13 Jun 2014 09:17:10 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753570AbaFMQRH (ORCPT + 24 others); Fri, 13 Jun 2014 12:17:07 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:39579 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753023AbaFMQQh (ORCPT ); Fri, 13 Jun 2014 12:16:37 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s5DGG9oi031672; Fri, 13 Jun 2014 11:16:09 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5DGG9K4015811; Fri, 13 Jun 2014 11:16:09 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Fri, 13 Jun 2014 11:16:09 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5DGG8G2029603; Fri, 13 Jun 2014 11:16:08 -0500 From: Felipe Balbi To: Tony Lindgren CC: Benoit Cousson , Paul Walmsley , Linux OMAP Mailing List , Linux ARM Kernel Mailing List , Linux Kernel Mailing List , Sathya Prakash M R , Andrew Morton , Tomi Valkeinen , Felipe Balbi Subject: [RESEND PATCH 1/2] ARM: AM43xx: hwmod: add DSS hwmod data Date: Fri, 13 Jun 2014 11:15:46 -0500 Message-ID: <1402676147-3711-2-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.0.0.rc1 In-Reply-To: <1402676147-3711-1-git-send-email-balbi@ti.com> References: <1402676147-3711-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Sathya Prakash M R Add DSS hwmod data for AM43xx. Cc: Andrew Morton Acked-by: Rajendra Nayak Signed-off-by: Sathya Prakash M R Signed-off-by: Tomi Valkeinen Signed-off-by: Felipe Balbi Tested-by:s, and note the mainline commit that it was tested on, along --- Note that this patch was originally send on May 9th [1], changes were requested and a new version was sent on May 19th [2], then on May 27th [3] Tomi pinged maintainer again and go no response. Without this patch, we cannot get display working on any AM437x devices. [1] http://marc.info/?l=linux-arm-kernel&m=139963677925227&w=2 [2] http://marc.info/?l=linux-arm-kernel&m=140049799425512&w=2 [3] http://marc.info/?l=linux-arm-kernel&m=140117232826754&w=2 arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 98 ++++++++++++++++++++++++++++++ arch/arm/mach-omap2/prcm43xx.h | 1 + 2 files changed, 99 insertions(+) diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c index 5c2cc80..d2a7b6d 100644 --- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c @@ -19,6 +19,8 @@ #include "omap_hwmod.h" #include "omap_hwmod_33xx_43xx_common_data.h" #include "prcm43xx.h" +#include "omap_hwmod_common_data.h" + /* IP blocks */ static struct omap_hwmod am43xx_l4_hs_hwmod = { @@ -415,6 +417,70 @@ static struct omap_hwmod am43xx_qspi_hwmod = { }, }; +/* Display sub system - DSS */ + +struct omap_dss_dispc_dev_attr am43xx_dss_dispc_dev_attr = { + .manager_count = 1, + .has_framedonetv_irq = 0 +}; + + +static struct omap_hwmod_class_sysconfig am43xx_dispc_sysc = { + .rev_offs = 0x0000, + .sysc_offs = 0x0010, + .syss_offs = 0x0014, + .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE), + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class am43xx_dispc_hwmod_class = { + .name = "dispc", + .sysc = &am43xx_dispc_sysc, +}; + +static struct omap_hwmod am43xx_dss_core_hwmod = { + .name = "dss_core", + .class = &omap2_dss_hwmod_class, + .clkdm_name = "dss_clkdm", + .main_clk = "disp_clk", + .prcm = { + .omap4 = { + .clkctrl_offs = AM43XX_CM_PER_DSS_CLKCTRL_OFFSET, + .modulemode = MODULEMODE_SWCTRL, + }, + }, +}; + +/* display controller -dispc*/ + +static struct omap_hwmod am43xx_dss_dispc_hwmod = { + .name = "dss_dispc", + .class = &am43xx_dispc_hwmod_class, + .clkdm_name = "dss_clkdm", + .main_clk = "disp_clk", + .prcm = { + .omap4 = { + .clkctrl_offs = AM43XX_CM_PER_DSS_CLKCTRL_OFFSET, + }, + }, + .dev_attr = &am43xx_dss_dispc_dev_attr, +}; + +/*RFBI*/ + +static struct omap_hwmod am43xx_dss_rfbi_hwmod = { + .name = "dss_rfbi", + .class = &omap2_rfbi_hwmod_class, + .clkdm_name = "dss_clkdm", + .main_clk = "disp_clk", + .prcm = { + .omap4 = { + .clkctrl_offs = AM43XX_CM_PER_DSS_CLKCTRL_OFFSET, + }, + }, +}; + /* Interfaces */ static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = { .master = &am33xx_l3_main_hwmod, @@ -654,6 +720,34 @@ static struct omap_hwmod_ocp_if am43xx_l3_s__qspi = { .user = OCP_USER_MPU | OCP_USER_SDMA, }; +static struct omap_hwmod_ocp_if am43xx_dss__l3_main = { + .master = &am43xx_dss_core_hwmod, + .slave = &am33xx_l3_main_hwmod, + .clk = "l3_gclk", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + +static struct omap_hwmod_ocp_if am43xx_l4_ls__dss = { + .master = &am33xx_l4_ls_hwmod, + .slave = &am43xx_dss_core_hwmod, + .clk = "l4ls_gclk", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + +static struct omap_hwmod_ocp_if am43xx_l4_ls__dss_dispc = { + .master = &am33xx_l4_ls_hwmod, + .slave = &am43xx_dss_dispc_hwmod, + .clk = "l4ls_gclk", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + +static struct omap_hwmod_ocp_if am43xx_l4_ls__dss_rfbi = { + .master = &am33xx_l4_ls_hwmod, + .slave = &am43xx_dss_rfbi_hwmod, + .clk = "l4ls_gclk", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { &am33xx_l4_wkup__synctimer, &am43xx_l4_ls__timer8, @@ -748,6 +842,10 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { &am43xx_l4_ls__ocp2scp1, &am43xx_l3_s__usbotgss0, &am43xx_l3_s__usbotgss1, + &am43xx_dss__l3_main, + &am43xx_l4_ls__dss, + &am43xx_l4_ls__dss_dispc, + &am43xx_l4_ls__dss_rfbi, NULL, }; diff --git a/arch/arm/mach-omap2/prcm43xx.h b/arch/arm/mach-omap2/prcm43xx.h index 7785be9..ad7b3e9 100644 --- a/arch/arm/mach-omap2/prcm43xx.h +++ b/arch/arm/mach-omap2/prcm43xx.h @@ -142,5 +142,6 @@ #define AM43XX_CM_PER_USBPHYOCP2SCP0_CLKCTRL_OFFSET 0x05B8 #define AM43XX_CM_PER_USB_OTG_SS1_CLKCTRL_OFFSET 0x0268 #define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET 0x05C0 +#define AM43XX_CM_PER_DSS_CLKCTRL_OFFSET 0x0a20 #endif