linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Register AC97 Controller Reference with the platform bus
@ 2007-11-07 16:14 Grant Likely
  2007-11-08 13:20 ` Josh Boyer
  0 siblings, 1 reply; 2+ messages in thread
From: Grant Likely @ 2007-11-07 16:14 UTC (permalink / raw)
  To: linuxppc-dev, JOFT, jwboyer

From: Joachim Foerster <mls.JOFT@gmx.de>

Add AC97 platform bus registration for Xilinx Virtex platforms.

Signed-off-by: Joachim Foerster <JOFT@gmx.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

Josh, can you please pick up this patch into your .24 queue.  I know it's
arch/ppc, but it is harmless and it is required to get the AC97 device
driver working on Virtex boards.  It's pretty much a bug fix in that regard.

Cheers,
g.

 arch/ppc/syslib/virtex_devices.c |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/arch/ppc/syslib/virtex_devices.c b/arch/ppc/syslib/virtex_devices.c
index 96188f8..95ee313 100644
--- a/arch/ppc/syslib/virtex_devices.c
+++ b/arch/ppc/syslib/virtex_devices.c
@@ -169,6 +169,29 @@
 	}, \
 }
 
+#define XPAR_AC97_CONTROLLER_REFERENCE(num) { \
+	.name = "ml403_ac97cr", \
+	.id = num, \
+	.num_resources = 3, \
+	.resource = (struct resource[]) { \
+		{ \
+			.start = XPAR_OPB_AC97_CONTROLLER_REF_##num##_BASEADDR, \
+			.end = XPAR_OPB_AC97_CONTROLLER_REF_##num##_HIGHADDR, \
+			.flags = IORESOURCE_MEM, \
+		}, \
+		{ \
+			.start = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_PLAYBACK_INTERRUPT_INTR, \
+			.end = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_PLAYBACK_INTERRUPT_INTR, \
+			.flags = IORESOURCE_IRQ, \
+		}, \
+		{ \
+			.start = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_RECORD_INTERRUPT_INTR, \
+			.end = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_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)
@@ -303,6 +326,14 @@ 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
+#if defined(XPAR_OPB_AC97_CONTROLLER_REF_1_BASEADDR)
+	XPAR_AC97_CONTROLLER_REFERENCE(1),
+#endif
 };
 
 /* Early serial support functions */

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

* Re: [PATCH] Register AC97 Controller Reference with the platform bus
  2007-11-07 16:14 [PATCH] Register AC97 Controller Reference with the platform bus Grant Likely
@ 2007-11-08 13:20 ` Josh Boyer
  0 siblings, 0 replies; 2+ messages in thread
From: Josh Boyer @ 2007-11-08 13:20 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, JOFT

On Wed, 07 Nov 2007 09:14:15 -0700
Grant Likely <grant.likely@secretlab.ca> wrote:

> From: Joachim Foerster <mls.JOFT@gmx.de>
> 
> Add AC97 platform bus registration for Xilinx Virtex platforms.
> 
> Signed-off-by: Joachim Foerster <JOFT@gmx.de>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> 
> Josh, can you please pick up this patch into your .24 queue.  I know it's
> arch/ppc, but it is harmless and it is required to get the AC97 device
> driver working on Virtex boards.  It's pretty much a bug fix in that regard.

Will do shortly.  I have a couple other bug fix patches I need to get
out as well.

josh

> 
> Cheers,
> g.
> 
>  arch/ppc/syslib/virtex_devices.c |   31 +++++++++++++++++++++++++++++++
>  1 files changed, 31 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/ppc/syslib/virtex_devices.c b/arch/ppc/syslib/virtex_devices.c
> index 96188f8..95ee313 100644
> --- a/arch/ppc/syslib/virtex_devices.c
> +++ b/arch/ppc/syslib/virtex_devices.c
> @@ -169,6 +169,29 @@
>  	}, \
>  }
> 
> +#define XPAR_AC97_CONTROLLER_REFERENCE(num) { \
> +	.name = "ml403_ac97cr", \
> +	.id = num, \
> +	.num_resources = 3, \
> +	.resource = (struct resource[]) { \
> +		{ \
> +			.start = XPAR_OPB_AC97_CONTROLLER_REF_##num##_BASEADDR, \
> +			.end = XPAR_OPB_AC97_CONTROLLER_REF_##num##_HIGHADDR, \
> +			.flags = IORESOURCE_MEM, \
> +		}, \
> +		{ \
> +			.start = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_PLAYBACK_INTERRUPT_INTR, \
> +			.end = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_PLAYBACK_INTERRUPT_INTR, \
> +			.flags = IORESOURCE_IRQ, \
> +		}, \
> +		{ \
> +			.start = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_RECORD_INTERRUPT_INTR, \
> +			.end = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_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)
> @@ -303,6 +326,14 @@ 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
> +#if defined(XPAR_OPB_AC97_CONTROLLER_REF_1_BASEADDR)
> +	XPAR_AC97_CONTROLLER_REFERENCE(1),
> +#endif
>  };
> 
>  /* Early serial support functions */
> 

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

end of thread, other threads:[~2007-11-08 13:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-07 16:14 [PATCH] Register AC97 Controller Reference with the platform bus Grant Likely
2007-11-08 13:20 ` Josh Boyer

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