Register AC97 Controller Reference with the platform bus
PATCH 2/2 Register AC97 Controller Reference with the platform bus
From: Joachim Foerster <[email protected]>
(Patch for Linus' master branch, date 2007/08/08)
Signed-off-by Joachim Foerster <[email protected]>
--- arch/ppc/syslib/virtex_devices.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-)
arch/ppc/syslib/virtex_devices.c +28 -0
@@ -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 */
Signature · 1 line
1.5.2.4
Quoted 15 lines · Joachim Förster
From: Joachim Foerster <[email protected]>
(Patch for Linus' master branch, date 2007/08/08)
Signed-off-by Joachim Foerster <[email protected]>--- arch/ppc/syslib/virtex_devices.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-)arch/ppc/syslib/virtex_devices.c +0
-0@@ -121,6 +121,29 @@ }, \
arch/ppc/syslib/virtex_devices.c line 131
Quoted 10 lines
arch/ppc/syslib/virtex_devices.c +8
-0} +#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, \
This will make each instance try to use the same device! Replace '_0_' with '_##num##_'
arch/ppc/syslib/virtex_devices.c line 136
Quoted 5 lines
arch/ppc/syslib/virtex_devices.c +5
-0+ .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, \
ditto; in this case you need to change the second _0_. _INTC_0_ is already the correct form.
arch/ppc/syslib/virtex_devices.c line 141
Quoted 5 lines
arch/ppc/syslib/virtex_devices.c +5
-0+ .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, \
ditto
Quoted 26 lines
arch/ppc/syslib/virtex_devices.c +10
-1+ .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
Signature · 4 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. [email protected] (403) 399-0195