Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751731AbbGaGUE (ORCPT ); Fri, 31 Jul 2015 02:20:04 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:14729 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751179AbbGaGUB (ORCPT ); Fri, 31 Jul 2015 02:20:01 -0400 Date: Fri, 31 Jul 2015 14:16:02 +0800 From: Jisheng Zhang To: Antoine Tenart CC: , , , , Subject: Re: [PATCH 2/3] ARM: berlin: register cpufreq-dt for the BG2Q Message-ID: <20150731141602.28b28f21@xhacker> In-Reply-To: <1438259752-16320-3-git-send-email-antoine.tenart@free-electrons.com> References: <1438259752-16320-1-git-send-email-antoine.tenart@free-electrons.com> <1438259752-16320-3-git-send-email-antoine.tenart@free-electrons.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2015-07-31_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=inbound_notspam policy=inbound score=0 kscore.is_bulkscore=0 kscore.compositescore=1 compositescore=0.9 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 rbsscore=0.9 spamscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1506180000 definitions=main-1507310118 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1874 Lines: 57 Hi Antoine, On Thu, 30 Jul 2015 14:35:51 +0200 Antoine Tenart wrote: > The BG2Q SoC uses cpufreq-dt for cpufreq. Register a platform device for > this. > > Signed-off-by: Antoine Tenart > --- > arch/arm/mach-berlin/berlin.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/arch/arm/mach-berlin/berlin.c b/arch/arm/mach-berlin/berlin.c > index ac181c6797ee..0de906374994 100644 > --- a/arch/arm/mach-berlin/berlin.c > +++ b/arch/arm/mach-berlin/berlin.c > @@ -15,9 +15,21 @@ > #include > #include > #include > +#include > #include > #include > > +static const struct of_device_id berlin2q_match[] = { > + { .compatible = "marvell,berlin2q" }, > + { }, > +}; > + > +static void __init berlin_init_late(void) > +{ > + if (of_find_matching_node(NULL, berlin2q_match)) > + platform_device_register_simple("cpufreq-dt", -1, NULL, 0); I'm not sure is it acceptable to always register cpufreq-dt platform device. In cpufreq-dt driver, the probe will exit if there's no cpuclk node. > +} > + > static const char * const berlin_dt_compat[] = { > "marvell,berlin", > NULL, > @@ -25,6 +37,7 @@ static const char * const berlin_dt_compat[] = { > > DT_MACHINE_START(BERLIN_DT, "Marvell Berlin") > .dt_compat = berlin_dt_compat, > + .init_late = berlin_init_late, > /* > * with DT probing for L2CCs, berlin_init_machine can be removed. > * Note: 88DE3005 (Armada 1500-mini) uses pl310 l2cc -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/