linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* pcspkr device, pnpPNP,100
@ 2007-11-11 23:35 Jon Smirl
  2007-11-12  0:03 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 10+ messages in thread
From: Jon Smirl @ 2007-11-11 23:35 UTC (permalink / raw)
  To: PowerPC dev list

Which platform does pcspkr device, pnpPNP,100 belong to, amiga? I'd
like to IFDEF add_pcspkr(void) in setup-common.c for the right
platform.

-- 
Jon Smirl
jonsmirl@gmail.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: pcspkr device, pnpPNP,100
  2007-11-11 23:35 pcspkr device, pnpPNP,100 Jon Smirl
@ 2007-11-12  0:03 ` Benjamin Herrenschmidt
  2007-11-12  0:07   ` Jon Smirl
  0 siblings, 1 reply; 10+ messages in thread
From: Benjamin Herrenschmidt @ 2007-11-12  0:03 UTC (permalink / raw)
  To: Jon Smirl; +Cc: PowerPC dev list


On Sun, 2007-11-11 at 18:35 -0500, Jon Smirl wrote:
> Which platform does pcspkr device, pnpPNP,100 belong to, amiga? I'd
> like to IFDEF add_pcspkr(void) in setup-common.c for the right
> platform.

#ifdef is evil. What about multiplatform kernels ? Just test for the
presence of the device in the device-tree (use a platform driver maybe)

Ben.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: pcspkr device, pnpPNP,100
  2007-11-12  0:03 ` Benjamin Herrenschmidt
@ 2007-11-12  0:07   ` Jon Smirl
  2007-11-12  0:09     ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 10+ messages in thread
From: Jon Smirl @ 2007-11-12  0:07 UTC (permalink / raw)
  To: benh; +Cc: PowerPC dev list

On 11/11/07, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> On Sun, 2007-11-11 at 18:35 -0500, Jon Smirl wrote:
> > Which platform does pcspkr device, pnpPNP,100 belong to, amiga? I'd
> > like to IFDEF add_pcspkr(void) in setup-common.c for the right
> > platform.
>
> #ifdef is evil. What about multiplatform kernels ? Just test for the
> presence of the device in the device-tree (use a platform driver maybe)

This code should be in a device driver so that it can be selected with
Kconfig. Can we #ifdef it now as a hint? I could make it a device
driver but I don't have any hardware to test it on.

I'm trying to get the mpc5200 kernel to build with platform bus turned
off (only of_platform bus). I'm almost there, just a couple more odd
places to patch up.


>
> Ben.
>
>
>


-- 
Jon Smirl
jonsmirl@gmail.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: pcspkr device, pnpPNP,100
  2007-11-12  0:07   ` Jon Smirl
@ 2007-11-12  0:09     ` Benjamin Herrenschmidt
  2007-11-12  0:18       ` Jon Smirl
  0 siblings, 1 reply; 10+ messages in thread
From: Benjamin Herrenschmidt @ 2007-11-12  0:09 UTC (permalink / raw)
  To: Jon Smirl; +Cc: PowerPC dev list


On Sun, 2007-11-11 at 19:07 -0500, Jon Smirl wrote:
> 
> This code should be in a device driver so that it can be selected with
> Kconfig. Can we #ifdef it now as a hint? I could make it a device
> driver but I don't have any hardware to test it on.
> 
> I'm trying to get the mpc5200 kernel to build with platform bus turned
> off (only of_platform bus). I'm almost there, just a couple more odd
> places to patch up.

Just don't do platform ifdef's, ever.

What you can do however is Kconfig options that get selected by
platforms that need a given service, and then use that as an ifdef for
that service.

A bit like how we select what interrupt controller drivers to built-in
for example.

Ben.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: pcspkr device, pnpPNP,100
  2007-11-12  0:09     ` Benjamin Herrenschmidt
@ 2007-11-12  0:18       ` Jon Smirl
  2007-11-12  1:07         ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 10+ messages in thread
From: Jon Smirl @ 2007-11-12  0:18 UTC (permalink / raw)
  To: benh; +Cc: PowerPC dev list

On 11/11/07, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> On Sun, 2007-11-11 at 19:07 -0500, Jon Smirl wrote:
> >
> > This code should be in a device driver so that it can be selected with
> > Kconfig. Can we #ifdef it now as a hint? I could make it a device
> > driver but I don't have any hardware to test it on.
> >
> > I'm trying to get the mpc5200 kernel to build with platform bus turned
> > off (only of_platform bus). I'm almost there, just a couple more odd
> > places to patch up.
>
> Just don't do platform ifdef's, ever.
>
> What you can do however is Kconfig options that get selected by
> platforms that need a given service, and then use that as an ifdef for
> that service.
>
> A bit like how we select what interrupt controller drivers to built-in
> for example.

Using this scheme, which platforms should select the pcspkr hardware?

-- 
Jon Smirl
jonsmirl@gmail.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: pcspkr device, pnpPNP,100
  2007-11-12  0:18       ` Jon Smirl
@ 2007-11-12  1:07         ` Benjamin Herrenschmidt
  2007-11-12 10:48           ` Geert Uytterhoeven
  0 siblings, 1 reply; 10+ messages in thread
From: Benjamin Herrenschmidt @ 2007-11-12  1:07 UTC (permalink / raw)
  To: Jon Smirl; +Cc: PowerPC dev list


On Sun, 2007-11-11 at 19:18 -0500, Jon Smirl wrote:

> Using this scheme, which platforms should select the pcspkr hardware?

Run a poll :-) I suppose at least chrp/prep/pegasos

Ben.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: pcspkr device, pnpPNP,100
  2007-11-12  1:07         ` Benjamin Herrenschmidt
@ 2007-11-12 10:48           ` Geert Uytterhoeven
  2007-11-12 13:51             ` Jon Smirl
  0 siblings, 1 reply; 10+ messages in thread
From: Geert Uytterhoeven @ 2007-11-12 10:48 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: PowerPC dev list

[-- Attachment #1: Type: TEXT/PLAIN, Size: 876 bytes --]

On Mon, 12 Nov 2007, Benjamin Herrenschmidt wrote:
> On Sun, 2007-11-11 at 19:18 -0500, Jon Smirl wrote:
> 
> > Using this scheme, which platforms should select the pcspkr hardware?
> 
> Run a poll :-) I suppose at least chrp/prep/pegasos

And definitely not Amiga/APUS ;-)

With kind regards,
 
Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
 
Phone:    +32 (0)2 700 8453	
Fax:      +32 (0)2 700 8622	
E-mail:   Geert.Uytterhoeven@sonycom.com	
Internet: http://www.sony-europe.com/
 	
Sony Network and Software Technology Center Europe	
A division of Sony Service Centre (Europe) N.V.	
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium	
VAT BE 0413.825.160 · RPR Brussels	
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: pcspkr device, pnpPNP,100
  2007-11-12 10:48           ` Geert Uytterhoeven
@ 2007-11-12 13:51             ` Jon Smirl
  2007-11-12 13:57               ` Geert Uytterhoeven
  0 siblings, 1 reply; 10+ messages in thread
From: Jon Smirl @ 2007-11-12 13:51 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: PowerPC dev list

On 11/12/07, Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:
> On Mon, 12 Nov 2007, Benjamin Herrenschmidt wrote:
> > On Sun, 2007-11-11 at 19:18 -0500, Jon Smirl wrote:
> >
> > > Using this scheme, which platforms should select the pcspkr hardware?
> >
> > Run a poll :-) I suppose at least chrp/prep/pegasos
>
> And definitely not Amiga/APUS ;-)

I found this device tree that has the pnpPNP,100 device for an Amiga.
http://www.nabble.com/Re:-Problem-with-OF-interrupt-parsing-code-p12988017.=
html

>
> With kind regards,
>
> Geert Uytterhoeven
> Software Architect
>
> Sony Network and Software Technology Center Europe
> The Corporate Village =B7 Da Vincilaan 7-D1 =B7 B-1935 Zaventem =B7 Belgi=
um
>
> Phone:    +32 (0)2 700 8453
> Fax:      +32 (0)2 700 8622
> E-mail:   Geert.Uytterhoeven@sonycom.com
> Internet: http://www.sony-europe.com/
>
> Sony Network and Software Technology Center Europe
> A division of Sony Service Centre (Europe) N.V.
> Registered office: Technologielaan 7 =B7 B-1840 Londerzeel =B7 Belgium
> VAT BE 0413.825.160 =B7 RPR Brussels
> Fortis Bank Zaventem =B7 Swift GEBABEBB08A =B7 IBAN BE39001382358619


--=20
Jon Smirl
jonsmirl@gmail.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: pcspkr device, pnpPNP,100
  2007-11-12 13:51             ` Jon Smirl
@ 2007-11-12 13:57               ` Geert Uytterhoeven
  2007-11-12 14:50                 ` Gerhard Pircher
  0 siblings, 1 reply; 10+ messages in thread
From: Geert Uytterhoeven @ 2007-11-12 13:57 UTC (permalink / raw)
  To: Jon Smirl; +Cc: PowerPC dev list

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1270 bytes --]

On Mon, 12 Nov 2007, Jon Smirl wrote:
> On 11/12/07, Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:
> > On Mon, 12 Nov 2007, Benjamin Herrenschmidt wrote:
> > > On Sun, 2007-11-11 at 19:18 -0500, Jon Smirl wrote:
> > >
> > > > Using this scheme, which platforms should select the pcspkr hardware?
> > >
> > > Run a poll :-) I suppose at least chrp/prep/pegasos
> >
> > And definitely not Amiga/APUS ;-)
> 
> I found this device tree that has the pnpPNP,100 device for an Amiga.
> http://www.nabble.com/Re:-Problem-with-OF-interrupt-parsing-code-p12988017.html

Ah yes, the AmigaOne. That's more a rebranded CHRP box...
Has nothing to do with CONFIG_AMIGA.

With kind regards,
 
Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
 
Phone:    +32 (0)2 700 8453	
Fax:      +32 (0)2 700 8622	
E-mail:   Geert.Uytterhoeven@sonycom.com	
Internet: http://www.sony-europe.com/
 	
Sony Network and Software Technology Center Europe	
A division of Sony Service Centre (Europe) N.V.	
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium	
VAT BE 0413.825.160 · RPR Brussels	
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: pcspkr device, pnpPNP,100
  2007-11-12 13:57               ` Geert Uytterhoeven
@ 2007-11-12 14:50                 ` Gerhard Pircher
  0 siblings, 0 replies; 10+ messages in thread
From: Gerhard Pircher @ 2007-11-12 14:50 UTC (permalink / raw)
  To: Geert Uytterhoeven, jonsmirl; +Cc: Linuxppc-dev


-------- Original-Nachricht --------
> Datum: Mon, 12 Nov 2007 14:57:13 +0100 (CET)
> Von: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> An: Jon Smirl <jonsmirl@gmail.com>
> CC: PowerPC dev list <Linuxppc-dev@ozlabs.org>
> Betreff: Re: pcspkr device, pnpPNP,100

> On Mon, 12 Nov 2007, Jon Smirl wrote:
> > On 11/12/07, Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:
> > > On Mon, 12 Nov 2007, Benjamin Herrenschmidt wrote:
> > > > On Sun, 2007-11-11 at 19:18 -0500, Jon Smirl wrote:
> > > >
> > > > Run a poll :-) I suppose at least chrp/prep/pegasos
> > >
> > > And definitely not Amiga/APUS ;-)
> > 
> > I found this device tree that has the pnpPNP,100 device for an Amiga.
> >
> http://www.nabble.com/Re:-Problem-with-OF-interrupt-parsing-code-p12988017.html
> 
> Ah yes, the AmigaOne. That's more a rebranded CHRP box...
> Has nothing to do with CONFIG_AMIGA.
Right. And it's not even officially supported in the kernel yet
(unfortunately).

regards,

Gerhard

-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-11-12 14:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-11 23:35 pcspkr device, pnpPNP,100 Jon Smirl
2007-11-12  0:03 ` Benjamin Herrenschmidt
2007-11-12  0:07   ` Jon Smirl
2007-11-12  0:09     ` Benjamin Herrenschmidt
2007-11-12  0:18       ` Jon Smirl
2007-11-12  1:07         ` Benjamin Herrenschmidt
2007-11-12 10:48           ` Geert Uytterhoeven
2007-11-12 13:51             ` Jon Smirl
2007-11-12 13:57               ` Geert Uytterhoeven
2007-11-12 14:50                 ` Gerhard Pircher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).