From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751998AbcBKQKU (ORCPT ); Thu, 11 Feb 2016 11:10:20 -0500 Received: from host.buserror.net ([209.198.135.123]:42246 "EHLO host.buserror.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750926AbcBKQKR (ORCPT ); Thu, 11 Feb 2016 11:10:17 -0500 Message-ID: <1455207007.2463.23.camel@buserror.net> From: Scott Wood To: Denis Kirjanov , Alessio Igor Bogani Cc: Kumar Gala , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Date: Thu, 11 Feb 2016 10:10:07 -0600 In-Reply-To: References: <1455177651-6686-1-git-send-email-alessio.bogani@elettra.eu> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5-1ubuntu3.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 75.72.173.242 X-SA-Exim-Mail-From: oss@buserror.net X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -15 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Subject: Re: [PATCH v2 1/1] powerpc/86xx: Consolidate common platform code X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:57:07 +0000) X-SA-Exim-Scanned: Yes (on host.buserror.net) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2016-02-11 at 12:21 +0300, Denis Kirjanov wrote: > On 2/11/16, Alessio Igor Bogani wrote: > > Signed-off-by: Alessio Igor Bogani > > --- > > v1 -> v2 > > Use appropriate [PATCH] prefix > > > > arch/powerpc/platforms/86xx/Makefile | 2 +- > > arch/powerpc/platforms/86xx/common.c | 42 > > ++++++++++++++++++++++++++++++ > > arch/powerpc/platforms/86xx/gef_ppc9a.c | 32 +---------------------- > > arch/powerpc/platforms/86xx/gef_sbc310.c | 32 +---------------------- > > arch/powerpc/platforms/86xx/gef_sbc610.c | 32 +---------------------- > > arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 20 ++------------ > > arch/powerpc/platforms/86xx/mpc86xx.h | 2 ++ > > arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 21 +-------------- > > arch/powerpc/platforms/86xx/sbc8641d.c | 32 +---------------------- > > 9 files changed, 52 insertions(+), 163 deletions(-) > > create mode 100644 arch/powerpc/platforms/86xx/common.c > > > > diff --git a/arch/powerpc/platforms/86xx/Makefile > > b/arch/powerpc/platforms/86xx/Makefile > > index ede815d..2d889ad 100644 > > --- a/arch/powerpc/platforms/86xx/Makefile > > +++ b/arch/powerpc/platforms/86xx/Makefile > > @@ -2,7 +2,7 @@ > > # Makefile for the PowerPC 86xx linux kernel. > > # > > > > -obj-y := pic.o > > +obj-y := pic.o common.o > > obj-$(CONFIG_SMP) += mpc86xx_smp.o > > obj-$(CONFIG_MPC8641_HPCN) += mpc86xx_hpcn.o > > obj-$(CONFIG_SBC8641D) += sbc8641d.o > > diff --git a/arch/powerpc/platforms/86xx/common.c > > b/arch/powerpc/platforms/86xx/common.c > > new file mode 100644 > > index 0000000..bee3177 > > --- /dev/null > > +++ b/arch/powerpc/platforms/86xx/common.c > > @@ -0,0 +1,42 @@ > > +/* > > + * Routines common to most mpc86xx-based boards. > > + * > > + * This is free software; you can redistribute it and/or modify > > + * it under the terms of the GNU General Public License version 2 as > > + * published by the Free Software Foundation. > > + */ > > + > > +#include > > + > > +#include "mpc86xx.h" > > + > > +static const struct of_device_id mpc86xx_common_ids[] __initconst = { > > + { .type = "soc", }, > > + { .compatible = "soc", }, > > + { .compatible = "simple-bus", }, > > + { .name = "localbus", }, > > + { .compatible = "gianfar", }, > > + { .compatible = "fsl,mpc8641-pcie", }, > > + {}, > > +}; > > + > > +int __init mpc86xx_common_publish_devices(void) > > +{ > > + return of_platform_bus_probe(NULL, mpc86xx_common_ids, NULL); > > +} > > + > > +long __init mpc86xx_time_init(void) > > +{ > > + unsigned int temp; > > + > > + /* Set the time base to zero */ > > + mtspr(SPRN_TBWL, 0); > > + mtspr(SPRN_TBWU, 0); > > + > > + temp = mfspr(SPRN_HID0); > > + temp |= HID0_TBEN; > > + mtspr(SPRN_HID0, temp); > > + asm volatile("isync"); > While we're here you could just use isync() > Could you please trim the part of the mail you're not replying to? It takes a while to scan to find where the reply actually is. -Scott