Received: by 10.223.176.5 with SMTP id f5csp674956wra; Wed, 7 Feb 2018 05:48:21 -0800 (PST) X-Google-Smtp-Source: AH8x227Gj/7/at4c5mSY569eNKv8znfQnoiv6hHfhds53a6DoR5/0G90k37cs4LAmSEmz0v1F/89 X-Received: by 2002:a17:902:3a3:: with SMTP id d32-v6mr5998996pld.193.1518011301722; Wed, 07 Feb 2018 05:48:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518011301; cv=none; d=google.com; s=arc-20160816; b=BW+A1OAXv6vWCBw+11OP5RQoJoJEZdREC5kvEl2vC0aiGPY9lHZCPljKL+HClmV5+L PApskeE98SpyDc/Vf+4wRfIPdm+FcjzgbfrSyTNMWTpNYIlE2PIrRq+cloO00tDEWOcY tCEccX++6r8Foi6fQjJIb7U9m6D97LY6AVOBF8DivN66g7wD7MlY3Hr8aOl1iA86KkGH OHbEzCdHvBddhbAVEF5plQBx8r7aN+5/OPAi6pgnjfxEnSX5Cogp89ym3z68tT57Yf9E BKM/ARxa8gUwdeDHKcU+u1ZT6uYafYOM4UZlBXd8qefL2/MLDtO/UwEjnupky9ilII6Y hoHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=7oBNhUOrEvSehYr0qphC42sAXhpMChP4xvhkiQGpvPo=; b=uRajy+vS4Mqq75Tlo6coS6NAqjAHc9luQMVsJaiz0VL9l0/9eLZNvkEtaRnH/1l3f/ eY/tfnHyiw8X9uGa1VLJBhtfXXBSXhp3xWh41/wl+BSKE2Ga4zjcxp2qp6Nb9FOorFZS 6DIEaGbU/dfyuuno+/EU9F0K+C865HaEhc7qIFKC+vCy16QGCkoffMI+GX3M7dJ/G6yR LXceKSUzjbWB682kMBawblj85ZOZTbLNZdDuY+TuEOoBqfDjnWB2A8sAAPDe1osTU/rb dkzusOmgQghaMPUO9Ysf1i0C4I2l9MKYGgXXzoG1qjDmONvNxrkpDqnvE/gWS+iG2i/Q alOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=gh1gt4//; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a2si1115090pfa.307.2018.02.07.05.48.07; Wed, 07 Feb 2018 05:48:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=gh1gt4//; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754220AbeBGNqN (ORCPT + 99 others); Wed, 7 Feb 2018 08:46:13 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:33014 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754165AbeBGNqK (ORCPT ); Wed, 7 Feb 2018 08:46:10 -0500 Received: by mail-wr0-f193.google.com with SMTP id s5so1106389wra.0 for ; Wed, 07 Feb 2018 05:46:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7oBNhUOrEvSehYr0qphC42sAXhpMChP4xvhkiQGpvPo=; b=gh1gt4//nYAyuoclyuFB5Abx13ljuNhloY8r8uCDxZoP/8T9zGYLLhAGy46UGb9C2f 2P1fW2b0eIPaY8n25++Txn/xzQ+LoqKbYNeu5i63ZlcB/G7t34ZXMyxkZWNxGeeRci+A 2orSKvyQNGAkYObWXnI52BgSvONUOml6KcqMyoXH0bqeO0mSC3NXDbR5lIGv4psDTOQ0 TaVi1DtwQHIun+Ab4zWjHPiCzjzJJQ+V2jOp/Z5hhxaKgkMW7JjtggHI4G5mxdwRoed/ hJmtvfmF6/hfdVjz2A0XfFiETcO7wq+bByjcqTG5Z2pzO5Udjpe8E9xQ1kpqV+OsBKM8 0H4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7oBNhUOrEvSehYr0qphC42sAXhpMChP4xvhkiQGpvPo=; b=LMqDqF6ijpTHFiX0EpRuEYYsgfHZJLAeq8SoW3FBMxbSeFfM8Fk4/tSktbJFrN7IZN rp+EjjhA7rvB6eS9q/SeM9YduqzFAP4xwKoiGQaUUWATWBntS3Ixc2XSGI9lIyzj07QT Vallb6OpqVAGcecox7m+WfhacNZ1ecmVZGFfDEKvNjO9y17GdX/dYBA2IFzExS+pfc1O an8efdDl3r8eJluLxUtaMxDA0fRBF9RhWTuW6+ABzvKAO8TYt+B7qUjviZ0HRHjgTev/ wexchO3X1XPlL4Wr3KtVtdgCHR+/+8C3KipJzUQ4CWr9dPruvXtApweZv5Sw4G4HBmyF bAnQ== X-Gm-Message-State: APf1xPCZNP105Fkghpja3efnXYaxrHEKus2b518VdIxHXlEkZfjXXgJe HnVZPt5w+CwJ/0N3xx8u/RZv0Q== X-Received: by 10.223.196.129 with SMTP id m1mr5444774wrf.256.1518011168910; Wed, 07 Feb 2018 05:46:08 -0800 (PST) Received: from brgl-bgdev.baylibre.local ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id 62sm1336371wrg.81.2018.02.07.05.46.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Feb 2018 05:46:08 -0800 (PST) From: Bartosz Golaszewski To: Rob Herring , Mark Rutland , Sekhar Nori , Kevin Hilman , Russell King , David Lechner Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH 3/7] ARM: davinci: don't setup pm_clk if we're using genpd Date: Wed, 7 Feb 2018 14:45:49 +0100 Message-Id: <20180207134553.13510-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180207134553.13510-1-brgl@bgdev.pl> References: <20180207134553.13510-1-brgl@bgdev.pl> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski As the first step in switching to using the genpd driver in DT mode, check if a relevant genpd node exists and don't setup the clock pm in this case. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/pm_domain.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-davinci/pm_domain.c b/arch/arm/mach-davinci/pm_domain.c index 78eac2c0c146..98a4f3fcba50 100644 --- a/arch/arm/mach-davinci/pm_domain.c +++ b/arch/arm/mach-davinci/pm_domain.c @@ -13,6 +13,7 @@ #include #include #include +#include static struct dev_pm_domain davinci_pm_domain = { .ops = { @@ -28,7 +29,13 @@ static struct pm_clk_notifier_block platform_bus_notifier = { static int __init davinci_pm_runtime_init(void) { - pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier); + struct device_node *np; + + /* Use pm_clk as fallback if we're not using genpd. */ + np = of_find_compatible_node(NULL, NULL, "ti,davinci-pm-domains"); + if (!np) + pm_clk_add_notifier(&platform_bus_type, + &platform_bus_notifier); return 0; } -- 2.16.1