All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Dave Jones <davej@redhat.com>,
	linuxppc-dev@lists.ozlabs.org, cpufreq@vger.kernel.org,
	Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH 2/2] Add cpufreq driver for Momentum Maple boards
Date: Wed, 29 Jun 2011 18:54:30 +1000	[thread overview]
Message-ID: <1309337670.14501.69.camel@pasglop> (raw)
In-Reply-To: <BANLkTimJD3U1kRkDKVomGVriykwqLBQasA@mail.gmail.com>

On Wed, 2011-06-29 at 12:40 +0400, Dmitry Eremin-Solenikov wrote:
> On 6/29/11, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> > Before I comment on this last one, a quick Q. for Dave: Do you want to
> > handle this or should I merge it via powerpc.git ? (It depends on
> > another change to the arch code to expose the SCOM functions that it
> > uses, and that patch is going to be in my -next branch).
> >
> > Now some remaining small nits:
> >
> > On Fri, 2011-06-17 at 17:10 +0400, Dmitry Eremin-Solenikov wrote:
> >> Add simple cpufreq driver for Maple-based boards (ppc970fx evaluation
> >> kit and others). Driver is based on a cpufreq driver for 64-bit powermac
> >> boxes with all pmac-dependant features removed and simple cleanup
> >> applied.
> >>
> >> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> >> ---
> >>  drivers/cpufreq/Kconfig         |    5 +
> >>  drivers/cpufreq/Kconfig.powerpc |    7 +
> >>  drivers/cpufreq/Makefile        |    5 +
> >>  drivers/cpufreq/maple-cpufreq.c |  314
> >> +++++++++++++++++++++++++++++++++++++++
> >
> > If we're going to have a Kconfig.powerpc, should we maybe just have a
> > powerpc subdirectory instead with the driver in it ?
> >
> > I'm happy at some later point to try moving some of my other ones there.
> 
> As Dave also isn't sure about subdirs, should I create cpufreq/powerpc
> directory,
> or not?

Don't bother, I can do it all at once if/when I chose to move the
powermac stuff there.

> > Do you get that property in your device-tree ? Or have you modified your
> > firmware ? If that requires a modified firmware, you should probably put
> > at least a link indicating where to get it somewhere and display a nicer
> > error code.
> 
> PIBS firmware (used on PPC970FX devkit/original Maple-D board) generates
> this property, if the board is started with dual CPUs (it can also be started
> with only one CPU selected). On the other hand SLOF firmware (used
> on JS2x blade servers) doesn't generate this property. It can be adapted
> however to generate it.

Ok.

> > Also this driver is specific to the Maple HW, you don't want it to kick
> > in and mess around on ... an Apple G5 for example. So stick somewhere a
> >
> > 	if (!machine_is(maple))
> > 		return 0;
> >
> >> +	printk(KERN_INFO "Registering G5 CPU frequency driver\n");
> >
> > s/G5/Maple
> 
> Hmmm. I'm actually thinking about doing it the other way: as this driver
> is mostly c&p of PowerMac G5 driver, as we are moving those from
> arch/powerpc to drivers/cpufreq, maybe I should merge two drivers (this
> one with cpufreq_64 from powermac)?

If you feel like it :-) The powermac one has quite a bit more plumbing
for voltage control etc... but it does make sense in the long run.

Maybe start with getting that maple driver in, and -then- merge ?

> >> +	printk(KERN_INFO "Frequency method: SCOM, Voltage method: none\n");
> >
> > This is useless.
> 
> Leftover from powermac thing.

Cheers,
Ben.



WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Dave Jones <davej@redhat.com>, Paul Mackerras <paulus@samba.org>,
	linuxppc-dev@lists.ozlabs.org, cpufreq@vger.kernel.org
Subject: Re: [PATCH 2/2] Add cpufreq driver for Momentum Maple boards
Date: Wed, 29 Jun 2011 18:54:30 +1000	[thread overview]
Message-ID: <1309337670.14501.69.camel@pasglop> (raw)
In-Reply-To: <BANLkTimJD3U1kRkDKVomGVriykwqLBQasA@mail.gmail.com>

On Wed, 2011-06-29 at 12:40 +0400, Dmitry Eremin-Solenikov wrote:
> On 6/29/11, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> > Before I comment on this last one, a quick Q. for Dave: Do you want to
> > handle this or should I merge it via powerpc.git ? (It depends on
> > another change to the arch code to expose the SCOM functions that it
> > uses, and that patch is going to be in my -next branch).
> >
> > Now some remaining small nits:
> >
> > On Fri, 2011-06-17 at 17:10 +0400, Dmitry Eremin-Solenikov wrote:
> >> Add simple cpufreq driver for Maple-based boards (ppc970fx evaluation
> >> kit and others). Driver is based on a cpufreq driver for 64-bit powermac
> >> boxes with all pmac-dependant features removed and simple cleanup
> >> applied.
> >>
> >> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> >> ---
> >>  drivers/cpufreq/Kconfig         |    5 +
> >>  drivers/cpufreq/Kconfig.powerpc |    7 +
> >>  drivers/cpufreq/Makefile        |    5 +
> >>  drivers/cpufreq/maple-cpufreq.c |  314
> >> +++++++++++++++++++++++++++++++++++++++
> >
> > If we're going to have a Kconfig.powerpc, should we maybe just have a
> > powerpc subdirectory instead with the driver in it ?
> >
> > I'm happy at some later point to try moving some of my other ones there.
> 
> As Dave also isn't sure about subdirs, should I create cpufreq/powerpc
> directory,
> or not?

Don't bother, I can do it all at once if/when I chose to move the
powermac stuff there.

> > Do you get that property in your device-tree ? Or have you modified your
> > firmware ? If that requires a modified firmware, you should probably put
> > at least a link indicating where to get it somewhere and display a nicer
> > error code.
> 
> PIBS firmware (used on PPC970FX devkit/original Maple-D board) generates
> this property, if the board is started with dual CPUs (it can also be started
> with only one CPU selected). On the other hand SLOF firmware (used
> on JS2x blade servers) doesn't generate this property. It can be adapted
> however to generate it.

Ok.

> > Also this driver is specific to the Maple HW, you don't want it to kick
> > in and mess around on ... an Apple G5 for example. So stick somewhere a
> >
> > 	if (!machine_is(maple))
> > 		return 0;
> >
> >> +	printk(KERN_INFO "Registering G5 CPU frequency driver\n");
> >
> > s/G5/Maple
> 
> Hmmm. I'm actually thinking about doing it the other way: as this driver
> is mostly c&p of PowerMac G5 driver, as we are moving those from
> arch/powerpc to drivers/cpufreq, maybe I should merge two drivers (this
> one with cpufreq_64 from powermac)?

If you feel like it :-) The powermac one has quite a bit more plumbing
for voltage control etc... but it does make sense in the long run.

Maybe start with getting that maple driver in, and -then- merge ?

> >> +	printk(KERN_INFO "Frequency method: SCOM, Voltage method: none\n");
> >
> > This is useless.
> 
> Leftover from powermac thing.

Cheers,
Ben.

  reply	other threads:[~2011-06-29  8:54 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-17 13:10 [PATCH 1/2] ppc: enable scom access functions on Maple Dmitry Eremin-Solenikov
2011-06-17 13:10 ` Dmitry Eremin-Solenikov
2011-06-17 13:10 ` [PATCH 2/2] Add cpufreq driver for Momentum Maple boards Dmitry Eremin-Solenikov
2011-06-17 13:10   ` Dmitry Eremin-Solenikov
2011-06-29  3:28   ` Benjamin Herrenschmidt
2011-06-29  3:28     ` Benjamin Herrenschmidt
2011-06-29  3:43     ` Dave Jones
2011-06-29  3:43       ` Dave Jones
2011-06-29  8:40     ` Dmitry Eremin-Solenikov
2011-06-29  8:40       ` Dmitry Eremin-Solenikov
2011-06-29  8:54       ` Benjamin Herrenschmidt [this message]
2011-06-29  8:54         ` Benjamin Herrenschmidt
2011-06-29 18:25         ` kevin diggs
2011-06-29 18:09     ` kevin diggs
2011-06-29 18:09       ` kevin diggs
2011-06-29 20:58       ` Dmitry Eremin-Solenikov
2011-06-29 20:58         ` Dmitry Eremin-Solenikov
2011-06-30 18:23         ` kevin diggs
2011-06-30 18:23           ` kevin diggs
2011-06-30 18:30           ` Dave Jones
2011-06-30 18:30             ` Dave Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1309337670.14501.69.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=cpufreq@vger.kernel.org \
    --cc=davej@redhat.com \
    --cc=dbaryshkov@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.