Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754333AbaKXT3n (ORCPT ); Mon, 24 Nov 2014 14:29:43 -0500 Received: from mail-vc0-f169.google.com ([209.85.220.169]:52709 "EHLO mail-vc0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752050AbaKXT3l (ORCPT ); Mon, 24 Nov 2014 14:29:41 -0500 MIME-Version: 1.0 In-Reply-To: <1416796846-28149-12-git-send-email-cernekee@gmail.com> References: <1416796846-28149-1-git-send-email-cernekee@gmail.com> <1416796846-28149-12-git-send-email-cernekee@gmail.com> Date: Mon, 24 Nov 2014 11:29:40 -0800 Message-ID: Subject: Re: [PATCH V3 11/11] MIPS: Add multiplatform BMIPS target From: Andrew Bresticker To: Kevin Cernekee Cc: Ralf Baechle , Florian Fainelli , jfraser@broadcom.com, Dmitry Torokhov , Thomas Gleixner , Jason Cooper , Jonas Gorski , Arnd Bergmann , computersforpeace@gmail.com, Linux-MIPS , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > diff --git a/arch/mips/bmips/setup.c b/arch/mips/bmips/setup.c > +void __init plat_time_init(void) > +{ > + struct device_node *np; > + u32 freq; > + > + np = of_find_node_by_name(NULL, "cpus"); > + if (!np) > + panic("missing 'cpus' DT node"); > + if (of_property_read_u32(np, "mips-hpt-frequency", &freq) < 0) > + panic("missing 'mips-hpt-frequency' property"); > + of_node_put(np); > + > + mips_hpt_frequency = freq; > +} Could you use common clock framework for this? Isn't the HPT just a fixed factor of the CPU clock? I'm planning on doing something very similar for ImgTec MIPS SoCs, so perhaps this could go in a common place, like the r4k clocksource driver? -- 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/