From patchwork Tue Jul 15 17:56:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 33693 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C3E9620CAD for ; Tue, 15 Jul 2014 17:57:56 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id vb8sf23500692obc.4 for ; Tue, 15 Jul 2014 10:57:56 -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=Ui9l12/MXcOlYwjgkawWz+/h9GqMSOL8HPam6goAHXI=; b=SlQBZ/QOpl1n8cTprBAbXhH/cyTO4A61cG4OqdOOoXRAoZV5gUm2VsEaLLRFB+Rqfl 5YUtyjSqfXErExZFwVygu/NYxX+OAwz/a3WF1HlyW9TtL0wN7a0ZIVv9Fm4kWZgpCIc+ WyoK51rpb6WBzJgJee9MN5EJxe01PfeoI2nhGVB4A2xmIsV6y4d/FsD9FjpV3DRTlV2g DT6A4VTCkGv9zfKQOFS+ZSK+9lxYQJxCaTDIUayZyH0LrMOJgkaDFZB19MZ6BmTSPMMv u92X4RGhiLDYepEKb6yxN/Ntphj9yXjdIQY05u9zWhnkiOMAP+mjtXLcnqYUSLM839he DhFA== X-Gm-Message-State: ALoCoQnxxQ1mbE4s9nFsqTJ2vKWe8inSdc6hJj9npHErK39m3jNNbHlXXoAvpcNGX4mLrC9rJZ6/ X-Received: by 10.50.61.238 with SMTP id t14mr3097322igr.3.1405447076400; Tue, 15 Jul 2014 10:57:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.30.36 with SMTP id c33ls197659qgc.72.gmail; Tue, 15 Jul 2014 10:57:56 -0700 (PDT) X-Received: by 10.220.174.137 with SMTP id t9mr24130691vcz.12.1405447076317; Tue, 15 Jul 2014 10:57:56 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id gv1si7124507vdb.27.2014.07.15.10.57.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Jul 2014 10:57:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so7336155vcb.1 for ; Tue, 15 Jul 2014 10:57:56 -0700 (PDT) X-Received: by 10.58.114.113 with SMTP id jf17mr19647186veb.20.1405447076242; Tue, 15 Jul 2014 10:57:56 -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.37.5 with SMTP id tc5csp234147vcb; Tue, 15 Jul 2014 10:57:55 -0700 (PDT) X-Received: by 10.66.230.202 with SMTP id ta10mr2120640pac.153.1405447075414; Tue, 15 Jul 2014 10:57:55 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qa2si12256426pbc.237.2014.07.15.10.57.54; Tue, 15 Jul 2014 10:57:54 -0700 (PDT) Received-SPF: none (google.com: linux-omap-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 S1757341AbaGOR5x (ORCPT + 6 others); Tue, 15 Jul 2014 13:57:53 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:54252 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756814AbaGOR5r (ORCPT ); Tue, 15 Jul 2014 13:57:47 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s6FHv2rW004136; Tue, 15 Jul 2014 12:57:02 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s6FHv2J9007450; Tue, 15 Jul 2014 12:57:02 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Tue, 15 Jul 2014 12:57:01 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s6FHv1g7018370; Tue, 15 Jul 2014 12:57:01 -0500 From: Felipe Balbi To: , Tony Lindgren , Benoit Cousson , CC: , Linux OMAP Mailing List , Linux ARM Kernel Mailing List , , , , , , , Benoit Parrot , Felipe Balbi Subject: [RFC/PATCH 2/5] arm: omap: hwmod: add hwmod entries for AM437x VPFE Date: Tue, 15 Jul 2014 12:56:49 -0500 Message-ID: <1405447012-5340-3-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.0.0.390.gcb682f8 In-Reply-To: <1405447012-5340-1-git-send-email-balbi@ti.com> References: <1405447012-5340-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@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.220.170 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: Benoit Parrot HWMOD entries support for TI Dual Video Processing Front End (VPFE) (aka Dual cam) of AM43xx platform. Signed-off-by: Benoit Parrot Signed-off-by: Darren Etheridge Signed-off-by: Felipe Balbi --- arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 56 ++++++++++++++++++++++++++++++ arch/arm/mach-omap2/prcm43xx.h | 3 +- 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c index fea01aa..bd9067e 100644 --- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c @@ -483,6 +483,44 @@ static struct omap_hwmod am43xx_dss_rfbi_hwmod = { }, }; +static struct omap_hwmod_class_sysconfig am43xx_vpfe_sysc = { + .rev_offs = 0x0, + .sysc_offs = 0x104, + .sysc_flags = SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE, + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | + MSTANDBY_FORCE | MSTANDBY_SMART | MSTANDBY_NO), + .sysc_fields = &omap_hwmod_sysc_type2, +}; + +static struct omap_hwmod_class am43xx_vpfe_hwmod_class = { + .name = "vpfe", + .sysc = &am43xx_vpfe_sysc, +}; + +static struct omap_hwmod am43xx_vpfe0_hwmod = { + .name = "vpfe0", + .class = &am43xx_vpfe_hwmod_class, + .clkdm_name = "l3s_clkdm", + .prcm = { + .omap4 = { + .modulemode = MODULEMODE_SWCTRL, + .clkctrl_offs = AM43XX_CM_PER_VPFE0_CLKCTRL_OFFSET, + }, + }, +}; + +static struct omap_hwmod am43xx_vpfe1_hwmod = { + .name = "vpfe1", + .class = &am43xx_vpfe_hwmod_class, + .clkdm_name = "l3s_clkdm", + .prcm = { + .omap4 = { + .modulemode = MODULEMODE_SWCTRL, + .clkctrl_offs = AM43XX_CM_PER_VPFE1_CLKCTRL_OFFSET, + }, + }, +}; + /* Interfaces */ static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = { .master = &am33xx_l3_main_hwmod, @@ -750,6 +788,22 @@ static struct omap_hwmod_ocp_if am43xx_l4_ls__dss_rfbi = { .user = OCP_USER_MPU | OCP_USER_SDMA, }; +static struct omap_hwmod_ocp_if am43xx_l3__vpfe0 = { + .master = &am33xx_l3_main_hwmod, + .slave = &am43xx_vpfe0_hwmod, + .clk = "l3_gclk", + .flags = OCPIF_SWSUP_IDLE, + .user = OCP_USER_MPU, +}; + +static struct omap_hwmod_ocp_if am43xx_l3__vpfe1 = { + .master = &am33xx_l3_main_hwmod, + .slave = &am43xx_vpfe1_hwmod, + .clk = "l3_gclk", + .flags = OCPIF_SWSUP_IDLE, + .user = OCP_USER_MPU, +}; + static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { &am33xx_l4_wkup__synctimer, &am43xx_l4_ls__timer8, @@ -848,6 +902,8 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { &am43xx_l4_ls__dss, &am43xx_l4_ls__dss_dispc, &am43xx_l4_ls__dss_rfbi, + &am43xx_l3__vpfe0, + &am43xx_l3__vpfe1, NULL, }; diff --git a/arch/arm/mach-omap2/prcm43xx.h b/arch/arm/mach-omap2/prcm43xx.h index ad7b3e9..8aa4c2c 100644 --- a/arch/arm/mach-omap2/prcm43xx.h +++ b/arch/arm/mach-omap2/prcm43xx.h @@ -143,5 +143,6 @@ #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 - +#define AM43XX_CM_PER_VPFE0_CLKCTRL_OFFSET 0x0068 +#define AM43XX_CM_PER_VPFE1_CLKCTRL_OFFSET 0x0070 #endif