From patchwork Thu Jul 1 22:23:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ohad Ben Cohen X-Patchwork-Id: 109761 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o61MOHlk030248 for ; Thu, 1 Jul 2010 22:24:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932518Ab0GAWXf (ORCPT ); Thu, 1 Jul 2010 18:23:35 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:39213 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932451Ab0GAWXd (ORCPT ); Thu, 1 Jul 2010 18:23:33 -0400 Received: by mail-bw0-f46.google.com with SMTP id 1so1212641bwz.19 for ; Thu, 01 Jul 2010 15:23:32 -0700 (PDT) Received: by 10.204.15.148 with SMTP id k20mr109239bka.74.1278023012003; Thu, 01 Jul 2010 15:23:32 -0700 (PDT) Received: from localhost.localdomain (93-173-171-226.bb.netvision.net.il [93.173.171.226]) by mx.google.com with ESMTPS id s34sm141464bkk.13.2010.07.01.15.23.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 01 Jul 2010 15:23:31 -0700 (PDT) From: Ohad Ben-Cohen To: Cc: Kanigeri Hari , Ohad Ben-Cohen Subject: [RFC 1/6] omap: add iva2 hwmod support to omap3 Date: Fri, 2 Jul 2010 01:23:09 +0300 Message-Id: <1278022994-28476-2-git-send-email-ohad@wizery.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1278022994-28476-1-git-send-email-ohad@wizery.com> References: <1278022994-28476-1-git-send-email-ohad@wizery.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 01 Jul 2010 22:24:18 +0000 (UTC) diff --git a/arch/arm/mach-omap2/omap_hwmod_34xx.h b/arch/arm/mach-omap2/omap_hwmod_34xx.h index b6076b9..d363a95 100644 --- a/arch/arm/mach-omap2/omap_hwmod_34xx.h +++ b/arch/arm/mach-omap2/omap_hwmod_34xx.h @@ -22,6 +22,7 @@ #include "prm-regbits-34xx.h" static struct omap_hwmod omap34xx_mpu_hwmod; +static struct omap_hwmod omap34xx_iva2_hwmod; static struct omap_hwmod omap34xx_l3_hwmod; static struct omap_hwmod omap34xx_l4_core_hwmod; static struct omap_hwmod omap34xx_l4_per_hwmod; @@ -47,9 +48,17 @@ static struct omap_hwmod_ocp_if omap34xx_mpu__l3 = { .user = OCP_USER_MPU, }; +/* IVA2 -> L3 interface */ +static struct omap_hwmod_ocp_if omap34xx_iva2__l3 = { + .master = &omap34xx_iva2_hwmod, + .slave = &omap34xx_l3_hwmod, + .user = OCP_USER_IVA2, +}; + /* Slave interfaces on the L3 interconnect */ static struct omap_hwmod_ocp_if *omap34xx_l3_slaves[] = { &omap34xx_mpu__l3, + &omap34xx_iva2__l3, }; /* Master interfaces on the L3 interconnect */ @@ -150,12 +159,26 @@ static struct omap_hwmod omap34xx_mpu_hwmod = { .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), }; +/* Master interfaces on the IVA2 device */ +static struct omap_hwmod_ocp_if *omap34xx_iva2_masters[] = { + &omap34xx_iva2__l3, +}; + +/* IVA2 */ +static struct omap_hwmod omap34xx_iva2_hwmod = { + .name = "iva2_hwmod", + .masters = omap34xx_iva2_masters, + .masters_cnt = ARRAY_SIZE(omap34xx_iva2_masters), + .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), +}; + static __initdata struct omap_hwmod *omap34xx_hwmods[] = { &omap34xx_l3_hwmod, &omap34xx_l4_core_hwmod, &omap34xx_l4_per_hwmod, &omap34xx_l4_wkup_hwmod, &omap34xx_mpu_hwmod, + &omap34xx_iva2_hwmod, NULL, }; diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 3393325..5e64992 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h @@ -160,6 +160,7 @@ struct omap_hwmod_addr_space { */ #define OCP_USER_MPU (1 << 0) #define OCP_USER_SDMA (1 << 1) +#define OCP_USER_IVA2 (1 << 2) /* omap_hwmod_ocp_if.flags bits */ #define OCPIF_HAS_IDLEST (1 << 0)