From patchwork Wed Mar 20 20:50:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Gross X-Patchwork-Id: 2309661 Return-Path: X-Original-To: patchwork-linux-omap@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 074053FC54 for ; Wed, 20 Mar 2013 20:50:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751845Ab3CTUuz (ORCPT ); Wed, 20 Mar 2013 16:50:55 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:36043 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751422Ab3CTUuy (ORCPT ); Wed, 20 Mar 2013 16:50:54 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r2KKopvD015132; Wed, 20 Mar 2013 15:50:51 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r2KKop4Z018258; Wed, 20 Mar 2013 15:50:51 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Wed, 20 Mar 2013 15:50:51 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id r2KKopuM028096; Wed, 20 Mar 2013 15:50:51 -0500 Received: from localhost (lta0273185-ubuntu1-128247075044.am.dhcp.ti.com [128.247.75.44]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id r2KKopV05863; Wed, 20 Mar 2013 15:50:51 -0500 (CDT) From: Andy Gross To: CC: Benoit Cousson , Santosh Shilimkar , Nishanth Menon , , Andy Gross Subject: [PATCH v2 2/2] ARM: OMAP2+: Don't create DMM if DT present Date: Wed, 20 Mar 2013 15:50:42 -0500 Message-ID: <1363812642-2921-3-git-send-email-andy.gross@ti.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1363812642-2921-1-git-send-email-andy.gross@ti.com> References: <1363812642-2921-1-git-send-email-andy.gross@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Added code to conditionally skip over creating a DMM device from the hwmod information if there is a DMM node present in the DT. Signed-off-by: Andy Gross --- arch/arm/mach-omap2/drm.c | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/drm.c b/arch/arm/mach-omap2/drm.c index 59a4af7..01a0c6a 100644 --- a/arch/arm/mach-omap2/drm.c +++ b/arch/arm/mach-omap2/drm.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "soc.h" #include "omap_device.h" @@ -47,13 +48,18 @@ static int __init omap_init_drm(void) struct omap_hwmod *oh = NULL; struct platform_device *pdev; - /* lookup and populate the DMM information, if present - OMAP4+ */ - oh = omap_hwmod_lookup("dmm"); + if (!of_have_populated_dt() || + !of_find_compatible_node(NULL, NULL, "ti,dmm")) { - if (oh) { - pdev = omap_device_build(oh->name, -1, oh, NULL, 0); - WARN(IS_ERR(pdev), "Could not build omap_device for %s\n", - oh->name); + /* resort to hwmod lookup - LEGACY */ + /* lookup and populate the DMM information, OMAP4+ only */ + oh = omap_hwmod_lookup("dmm"); + + if (oh) { + pdev = omap_device_build(oh->name, -1, oh, NULL, 0); + WARN(IS_ERR(pdev), "Could not build device for %s\n", + oh->name); + } } platform_data.omaprev = GET_OMAP_TYPE;