[Bug 2044] New: LEON3: fix GRETH interrupt initialization bug
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Wed Mar 28 09:23:02 UTC 2012
https://www.rtems.org/bugzilla/show_bug.cgi?id=2044
Bug #: 2044
Summary: LEON3: fix GRETH interrupt initialization bug
Classification: Unclassified
Product: RTEMS
Version: 4.10
Platform: sparc
OS/Version: RTEMS
Status: NEW
Severity: normal
Priority: P3
Component: bsps
AssignedTo: joel.sherrill at oarcorp.com
ReportedBy: daniel at gaisler.com
Created attachment 1462
--> https://www.rtems.org/bugzilla/attachment.cgi?id=1462
LEON3_GRETH_irq_init_patch1
Fixed a bug where the vector number is used to clean and unmask
the IRQ at the IRQ controller, the irq number must be used.
Signed-off-by: Daniel Hellstrom <daniel at gaisler.com>
---
.../lib/libbsp/sparc/leon3/leon_greth/leon_greth.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/c/src/lib/libbsp/sparc/leon3/leon_greth/leon_greth.c
b/c/src/lib/libbsp/sparc/leon3/leon_greth/leon_greth.c
index 341bd27..dd301d7 100644
--- a/c/src/lib/libbsp/sparc/leon3/leon_greth/leon_greth.c
+++ b/c/src/lib/libbsp/sparc/leon3/leon_greth/leon_greth.c
@@ -41,19 +41,19 @@ int rtems_leon_greth_driver_attach(
if (device_found == 1)
{
base_addr = apbgreth.start;
- eth_irq = apbgreth.irq + 0x10;
+ eth_irq = apbgreth.irq;
/* clear control register and reset NIC */
*(volatile int *) base_addr = 0;
*(volatile int *) base_addr = GRETH_CTRL_RST;
*(volatile int *) base_addr = 0;
leon_greth_configuration.base_address = base_addr;
- leon_greth_configuration.vector = eth_irq;
+ leon_greth_configuration.vector = eth_irq + 0x10;
leon_greth_configuration.txd_count = TDA_COUNT;
leon_greth_configuration.rxd_count = RDA_COUNT;
if (rtems_greth_driver_attach( config, &leon_greth_configuration )) {
- LEON_Clear_interrupt(leon_greth_configuration.vector);
- LEON_Unmask_interrupt(leon_greth_configuration.vector);
+ LEON_Clear_interrupt(eth_irq);
+ LEON_Unmask_interrupt(eth_irq);
}
}
return 0;
--
--
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the bugs
mailing list