linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] [VIRTEX] Register AC97 Controller Reference with the platform bus
@ 2007-08-09 10:37 Joachim Förster
  2007-08-09 18:04 ` Grant Likely
  0 siblings, 1 reply; 2+ messages in thread
From: Joachim Förster @ 2007-08-09 10:37 UTC (permalink / raw)
  To: linuxppc-embedded@ozlabs.org; +Cc: alsa-devel, Lorenz Kolb

From: Joachim Foerster <JOFT@gmx.de>

(Patch for Linus' master branch, date 2007/08/08)

Signed-off-by: Joachim Foerster <JOFT@gmx.de>
---
 arch/ppc/syslib/virtex_devices.c |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/arch/ppc/syslib/virtex_devices.c b/arch/ppc/syslib/virtex_devices.c
index 62a9495..0d6f0ac 100644
--- a/arch/ppc/syslib/virtex_devices.c
+++ b/arch/ppc/syslib/virtex_devices.c
@@ -121,6 +121,29 @@
 	}, \
 }
 
+#define XPAR_AC97_CONTROLLER_REFERENCE(num) { \
+	.name = "ml403_ac97cr",	      \
+	.id = num, \
+	.num_resources = 3, \
+	.resource = (struct resource[]) { \
+	        { \
+		        .start = XPAR_OPB_AC97_CONTROLLER_REF_0_BASEADDR, \
+			.end = XPAR_OPB_AC97_CONTROLLER_REF_0_HIGHADDR, \
+			.flags = IORESOURCE_MEM, \
+		}, \
+		{ \
+			.start = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_0_PLAYBACK_INTERRUPT_INTR, \
+			.end = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_0_PLAYBACK_INTERRUPT_INTR, \
+			.flags = IORESOURCE_IRQ, \
+		}, \
+		{ \
+			.start = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_0_RECORD_INTERRUPT_INTR, \
+			.end = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_0_RECORD_INTERRUPT_INTR, \
+                        .flags = IORESOURCE_IRQ, \
+               }, \
+        }, \
+}
+
 /* UART 8250 driver platform data table */
 struct plat_serial8250_port virtex_serial_platform_data[] = {
 #if defined(XPAR_UARTNS550_0_BASEADDR)
@@ -221,6 +244,11 @@ struct platform_device virtex_platform_devices[] = {
 #if defined(XPAR_TFT_3_BASEADDR)
 	XPAR_TFT(3),
 #endif
+
+	/* AC97 Controller Reference instances */
+#if defined(XPAR_OPB_AC97_CONTROLLER_REF_0_BASEADDR)
+	XPAR_AC97_CONTROLLER_REFERENCE(0),
+#endif
 };
 
 /* Early serial support functions */
-- 
1.5.2.4

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

* Re: [PATCH 2/2] [VIRTEX] Register AC97 Controller Reference with the platform bus
  2007-08-09 10:37 [PATCH 2/2] [VIRTEX] Register AC97 Controller Reference with the platform bus Joachim Förster
@ 2007-08-09 18:04 ` Grant Likely
  0 siblings, 0 replies; 2+ messages in thread
From: Grant Likely @ 2007-08-09 18:04 UTC (permalink / raw)
  To: Joachim Förster
  Cc: alsa-devel, Lorenz Kolb, linuxppc-embedded@ozlabs.org

On 8/9/07, Joachim F=F6rster <mls.JOFT@gmx.de> wrote:
> From: Joachim Foerster <JOFT@gmx.de>
>
> (Patch for Linus' master branch, date 2007/08/08)
>
> Signed-off-by: Joachim Foerster <JOFT@gmx.de>
> ---
>  arch/ppc/syslib/virtex_devices.c |   28 ++++++++++++++++++++++++++++
>  1 files changed, 28 insertions(+), 0 deletions(-)
>
> diff --git a/arch/ppc/syslib/virtex_devices.c b/arch/ppc/syslib/virtex_de=
vices.c
> index 62a9495..0d6f0ac 100644
> --- a/arch/ppc/syslib/virtex_devices.c
> +++ b/arch/ppc/syslib/virtex_devices.c
> @@ -121,6 +121,29 @@
>         }, \
>  }
>
> +#define XPAR_AC97_CONTROLLER_REFERENCE(num) { \
> +       .name =3D "ml403_ac97cr",       \
> +       .id =3D num, \
> +       .num_resources =3D 3, \
> +       .resource =3D (struct resource[]) { \
> +               { \
> +                       .start =3D XPAR_OPB_AC97_CONTROLLER_REF_0_BASEADD=
R, \
> +                       .end =3D XPAR_OPB_AC97_CONTROLLER_REF_0_HIGHADDR,=
 \

This will make each instance try to use the same device!  Replace
'_0_' with '_##num##_'

> +                       .flags =3D IORESOURCE_MEM, \
> +               }, \
> +               { \
> +                       .start =3D XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_RE=
F_0_PLAYBACK_INTERRUPT_INTR, \
> +                       .end =3D XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_=
0_PLAYBACK_INTERRUPT_INTR, \

ditto; in this case you need to change the second _0_.  _INTC_0_ is
already the correct form.

> +                       .flags =3D IORESOURCE_IRQ, \
> +               }, \
> +               { \
> +                       .start =3D XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_RE=
F_0_RECORD_INTERRUPT_INTR, \
> +                       .end =3D XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_=
0_RECORD_INTERRUPT_INTR, \

ditto

> +                        .flags =3D IORESOURCE_IRQ, \
> +               }, \
> +        }, \
> +}
> +
>  /* UART 8250 driver platform data table */
>  struct plat_serial8250_port virtex_serial_platform_data[] =3D {
>  #if defined(XPAR_UARTNS550_0_BASEADDR)
> @@ -221,6 +244,11 @@ struct platform_device virtex_platform_devices[] =3D=
 {
>  #if defined(XPAR_TFT_3_BASEADDR)
>         XPAR_TFT(3),
>  #endif
> +
> +       /* AC97 Controller Reference instances */
> +#if defined(XPAR_OPB_AC97_CONTROLLER_REF_0_BASEADDR)
> +       XPAR_AC97_CONTROLLER_REFERENCE(0),
> +#endif
>  };
>
>  /* Early serial support functions */
> --
> 1.5.2.4
>
>
>
>


--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

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

end of thread, other threads:[~2007-08-09 18:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-09 10:37 [PATCH 2/2] [VIRTEX] Register AC97 Controller Reference with the platform bus Joachim Förster
2007-08-09 18:04 ` Grant Likely

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).