Atmel-supplied hardware headers for AT91RM9200 SoC processor
RFC 1/1 Atmel-supplied hardware headers for AT91RM9200 SoC processor
hi,
I am attempting to submit code for inclusion in the mainline kernel to support the Atmel AT91RM9200 SoC processor, and the various boards that use that processor. Since it's based on an ARM9 core, I submitted the patches to Russell King.
While he seems generally happy with most of the code, he has doubts about merging the Atmel-supplied headers and suggested I post this to the linux-kernel list for a wider review.
While I agree that their usage of structs/coding-style is not the cleanest/Linux way of doing things, re-using their headers is useful since:
1) they are supplied by the hardware manufacturer.
2) Atmel automatically generates them from their chip design database, so they should be correct.
3) they are used by most AT91RM9200 developers, not just those using Linux.
This gives the benefit that there is a larger 'installed base', and Atmel has to take the responsibility that it is correct. I don't believe that Atmel will change the format of their hardware headers specifically for Linux.
If the AT91RM9200+Linux community had to convert all the headers, bugs may be introduced in the conversion process and we would have to assume any maintenance responsibility. What we have now may be slightly ugly, but it is atleast known to be correct.
As suggested by Russell King, I even added a warning message that these headers should not be used as an example of how things should be done in new implementations.
I've appended two of their headers as an example - the System peripherals (timer, interrupt controller, etc) and Ethernet.
Comments?
For those who might be interested, the full AT91RM9200 patches are available from http://maxim.org.za/AT91RM9200/2.6/
Regards,
Andrew Victor
include/asm-arm/arch-at91rm9200/AT91RM9200_EMAC.h +169 -0
@@ -0,0 +1,169 @@ +// ---------------------------------------------------------------------------- +// ATMEL Microcontroller Software Support - ROUSSET - +// ---------------------------------------------------------------------------- +// Copyright (c) 2004, Atmel Corporation +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// - Redistributions of source code must retain the above copyright notice, +// this list of conditions and the disclaimer below. +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the disclaimer below in the documentation and/or +// other materials provided with the distribution. +// +// Atmel's name may not be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE +// DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// ---------------------------------------------------------------------------- +// File Name : AT91RM9200.h +// Object : AT91RM9200 / EMAC definitions +// Generated : AT91 SW Application Group 01/17/2003 (13:41:21) +// +// ---------------------------------------------------------------------------- + +/* +* NOTE: These headers are automatically generated from Atmel's chip design +* database. They are not in the Linux standard format, and SHOULD NOT be +* used as an example for new implementations. +*/ + +#ifndef AT91RM9200_EMAC_H +#define AT91RM9200_EMAC_H + +// ***************************************************************************** +// SOFTWARE API DEFINITION FOR Ethernet MAC +// ***************************************************************************** +#ifndef __ASSEMBLY__ + +typedef struct _AT91S_EMAC { +AT91_REG EMAC_CTL;// Network Control Register +AT91_REG EMAC_CFG;// Network Configuration Register +AT91_REG EMAC_SR;// Network Status Register +AT91_REG EMAC_TAR;// Transmit Address Register +AT91_REG EMAC_TCR;// Transmit Control Register +AT91_REG EMAC_TSR;// Transmit Status Register +AT91_REG EMAC_RBQP;// Receive Buffer Queue Pointer +AT91_REG Reserved0[1 ];// +AT91_REG EMAC_RSR;// Receive Status Register +AT91_REG EMAC_ISR;// Interrupt Status Register +AT91_REG EMAC_IER;// Interrupt Enable Register +AT91_REG EMAC_IDR;// Interrupt Disable Register +AT91_REG EMAC_IMR;// Interrupt Mask Register +AT91_REG EMAC_MAN;// PHY Maintenance Register +AT91_REG Reserved1[2 ];// +AT91_REG EMAC_FRA;// Frames Transmitted OK Register +AT91_REG EMAC_SCOL;// Single Collision Frame Register +AT91_REG EMAC_MCOL;// Multiple Collision Frame Register +AT91_REG EMAC_OK;// Frames Received OK Register +AT91_REG EMAC_SEQE;// Frame Check Sequence Error Register +AT91_REG EMAC_ALE;// Alignment Error Register +AT91_REG EMAC_DTE;// Deferred Transmission Frame Register +AT91_REG EMAC_LCOL;// Late Collision Register +AT91_REG EMAC_ECOL;// Excessive Collision Register +AT91_REG EMAC_CSE;// Carrier Sense Error Register +AT91_REG EMAC_TUE;// Transmit Underrun Error Register +AT91_REG EMAC_CDE;// Code Error Register +AT91_REG EMAC_ELR;// Excessive Length Error Register +AT91_REG EMAC_RJB;// Receive Jabber Register +AT91_REG EMAC_USF;// Undersize Frame Register +AT91_REG EMAC_SQEE;// SQE Test Error Register +AT91_REG EMAC_DRFC;// Discarded RX Frame Register +AT91_REG Reserved2[3 ];// +AT91_REG EMAC_HSH;// Hash Address High[63:32] +AT91_REG EMAC_HSL;// Hash Address Low[31:0] +AT91_REG EMAC_SA1L;// Specific Address 1 Low, First 4 bytes +AT91_REG EMAC_SA1H;// Specific Address 1 High, Last 2 bytes +AT91_REG EMAC_SA2L;// Specific Address 2 Low, First 4 bytes +AT91_REG EMAC_SA2H;// Specific Address 2 High, Last 2 bytes +AT91_REG EMAC_SA3L;// Specific Address 3 Low, First 4 bytes +AT91_REG EMAC_SA3H;// Specific Address 3 High, Last 2 bytes +AT91_REG EMAC_SA4L;// Specific Address 4 Low, First 4 bytes +AT91_REG EMAC_SA4H;// Specific Address 4 High, Last 2 bytesr +}AT91S_EMAC , *AT91PS_EMAC ; + +#endif + +// -------- EMAC_CTL : (EMAC Offset: 0x0) -------- +#define AT91C_EMAC_LB ( 0x1 << 0) // (EMAC) Loopback. Optional. When set, loopback signal is at high level. +#define AT91C_EMAC_LBL ( 0x1 << 1) // (EMAC) Loopback local. +#define AT91C_EMAC_RE ( 0x1 << 2) // (EMAC) Receive enable. +#define AT91C_EMAC_TE ( 0x1 << 3) // (EMAC) Transmit enable. +#define AT91C_EMAC_MPE ( 0x1 << 4) // (EMAC) Management port enable. +#define AT91C_EMAC_CSR ( 0x1 << 5) // (EMAC) Clear statistics registers. +#define AT91C_EMAC_ISR ( 0x1 << 6) // (EMAC) Increment statistics registers. +#define AT91C_EMAC_WES ( 0x1 << 7) // (EMAC) Write enable for statistics registers. +#define AT91C_EMAC_BP ( 0x1 << 8) // (EMAC) Back pressure. +// -------- EMAC_CFG : (EMAC Offset: 0x4) Network Configuration Register -------- +#define AT91C_EMAC_SPD ( 0x1 << 0) // (EMAC) Speed. +#define AT91C_EMAC_FD ( 0x1 << 1) // (EMAC) Full duplex. +#define AT91C_EMAC_BR ( 0x1 << 2) // (EMAC) Bit rate. +#define AT91C_EMAC_CAF ( 0x1 << 4) // (EMAC) Copy all frames. +#define AT91C_EMAC_NBC ( 0x1 << 5) // (EMAC) No broadcast. +#define AT91C_EMAC_MTI ( 0x1 << 6) // (EMAC) Multicast hash enable +#define AT91C_EMAC_UNI ( 0x1 << 7) // (EMAC) Unicast hash enable. +#define AT91C_EMAC_BIG ( 0x1 << 8) // (EMAC) Receive 1522 bytes. +#define AT91C_EMAC_EAE ( 0x1 << 9) // (EMAC) External address match enable. +#define AT91C_EMAC_CLK ( 0x3 << 10) // (EMAC) +#define AT91C_EMAC_CLK_HCLK_8 ( 0x0 << 10) // (EMAC) HCLK divided by 8 +#define AT91C_EMAC_CLK_HCLK_16 ( 0x1 << 10) // (EMAC) HCLK divided by 16 +#define AT91C_EMAC_CLK_HCLK_32 ( 0x2 << 10) // (EMAC) HCLK divided by 32 +#define AT91C_EMAC_CLK_HCLK_64 ( 0x3 << 10) // (EMAC) HCLK divided by 64 +#define AT91C_EMAC_RTY ( 0x1 << 12) // (EMAC) +#define AT91C_EMAC_RMII ( 0x1 << 13) // (EMAC) +// -------- EMAC_SR : (EMAC Offset: 0x8) Network Status Register -------- +#define AT91C_EMAC_MDIO ( 0x1 << 1) // (EMAC) +#define AT91C_EMAC_IDLE ( 0x1 << 2) // (EMAC) +// -------- EMAC_TCR : (EMAC Offset: 0x10) Transmit Control Register -------- +#define AT91C_EMAC_LEN ( 0x7FF << 0) // (EMAC) +#define AT91C_EMAC_NCRC ( 0x1 << 15) // (EMAC) +// -------- EMAC_TSR : (EMAC Offset: 0x14) Transmit Control Register -------- +#define AT91C_EMAC_OVR ( 0x1 << 0) // (EMAC) +#define AT91C_EMAC_COL ( 0x1 << 1) // (EMAC) +#define AT91C_EMAC_RLE ( 0x1 << 2) // (EMAC) +#define AT91C_EMAC_TXIDLE ( 0x1 << 3) // (EMAC) +#define AT91C_EMAC_BNQ ( 0x1 << 4) // (EMAC) +#define AT91C_EMAC_COMP ( 0x1 << 5) // (EMAC) +#define AT91C_EMAC_UND ( 0x1 << 6) // (EMAC) +// -------- EMAC_RSR : (EMAC Offset: 0x20) Receive Status Register -------- +#define AT91C_EMAC_BNA ( 0x1 << 0) // (EMAC) +#define AT91C_EMAC_REC ( 0x1 << 1) // (EMAC) +// -------- EMAC_ISR : (EMAC Offset: 0x24) Interrupt Status Register -------- +#define AT91C_EMAC_DONE ( 0x1 << 0) // (EMAC) +#define AT91C_EMAC_RCOM ( 0x1 << 1) // (EMAC) +#define AT91C_EMAC_RBNA ( 0x1 << 2) // (EMAC) +#define AT91C_EMAC_TOVR ( 0x1 << 3) // (EMAC) +#define AT91C_EMAC_TUND ( 0x1 << 4) // (EMAC) +#define AT91C_EMAC_RTRY ( 0x1 << 5) // (EMAC) +#define AT91C_EMAC_TBRE ( 0x1 << 6) // (EMAC) +#define AT91C_EMAC_TCOM ( 0x1 << 7) // (EMAC) +#define AT91C_EMAC_TIDLE ( 0x1 << 8) // (EMAC) +#define AT91C_EMAC_LINK ( 0x1 << 9) // (EMAC) +#define AT91C_EMAC_ROVR ( 0x1 << 10) // (EMAC) +#define AT91C_EMAC_HRESP ( 0x1 << 11) // (EMAC) +// -------- EMAC_IER : (EMAC Offset: 0x28) Interrupt Enable Register -------- +// -------- EMAC_IDR : (EMAC Offset: 0x2c) Interrupt Disable Register -------- +// -------- EMAC_IMR : (EMAC Offset: 0x30) Interrupt Mask Register -------- +// -------- EMAC_MAN : (EMAC Offset: 0x34) PHY Maintenance Register -------- +#define AT91C_EMAC_DATA ( 0xFFFF << 0) // (EMAC) +#define AT91C_EMAC_CODE ( 0x3 << 16) // (EMAC) +#define AT91C_EMAC_CODE_802_3 ( 0x2 << 16) // (EMAC) Write Operation +#define AT91C_EMAC_REGA ( 0x1F << 18) // (EMAC) +#define AT91C_EMAC_PHYA ( 0x1F << 23) // (EMAC) +#define AT91C_EMAC_RW ( 0x3 << 28) // (EMAC) +#define AT91C_EMAC_RW_R ( 0x2 << 28) // (EMAC) Read Operation +#define AT91C_EMAC_RW_W ( 0x1 << 28) // (EMAC) Write Operation +#define AT91C_EMAC_HIGH ( 0x1 << 30) // (EMAC) +#define AT91C_EMAC_LOW ( 0x1 << 31) // (EMAC) + +#endif
include/asm-arm/arch-at91rm9200/AT91RM9200_SYS.h +744 -0
744 lines not on this page · raw message
Quoted 4 lines · Andrew Victor
While he seems generally happy with most of the code, he has doubts about merging the Atmel-supplied headers and suggested I post this to the linux-kernel list for a wider review.
Quoted 8 lines
While I agree that their usage of structs/coding-style is not the cleanest/Linux way of doing things, re-using their headers is useful since:
1) they are supplied by the hardware manufacturer.
2) Atmel automatically generates them from their chip design database, so they should be correct.
3) they are used by most AT91RM9200 developers, not just those using Linux.
No reason to use the horror it is as-is. Beein hardware description they won't change ever except for additions, so just clean the mess up into somethign nice and submit them. You could have done so in the time you spent arguing on linux-arm-kernel already.
Quoted 4 lines
No reason to use the horror it is as-is. Beein hardware description they won't change ever except for additions, so just clean the mess up into somethign nice and submit them. You could have done so in the time you spent arguing on linux-arm-kernel already.
Or written a perl script to reprocess them into something saner for that matter. The licensing does look problematic - perhaps Atmel will be happy to dual license them (see the many BSD bits of code that are in kernel and say
things like "or at your option you may use the GNU Public License version 2 or
later" and similar.
hi,
Quoted 7 lines
Quoted 4 lines
No reason to use the horror it is as-is. Beein hardware description they won't change ever except for additions, so just clean the mess up into somethign nice and submit them. You could have done so in the time you spent arguing on linux-arm-kernel already.
Or written a perl script to reprocess them into something saner for that matter.
The issue that everybody seems to be forgetting (or ignoring) with changing the headers is that ALL the drivers then also need to be converted, and re-tested.
Quoted 4 lines
The licensing does look problematic - perhaps Atmel will be happy to dual license them (see the many BSD bits of code that are in kernel and say things like "or at your option you may use the GNU Public License version 2 or later" and similar.
I have asked Atmel if they're willing to dual-license the headers. The licensing issue is probably now with their legal department, but I don't see them having a problem with it.
Regards,
Andrew Victor
Quoted 3 lines · Andrew Victor
The issue that everybody seems to be forgetting (or ignoring) with changing the headers is that ALL the drivers then also need to be converted, and re-tested.
So its a few more lines of perl
Quoted 3 lines
I have asked Atmel if they're willing to dual-license the headers. The licensing issue is probably now with their legal department, but I don't see them having a problem with it.
Great
Quoted 6 lines · Andrew Victor
Quoted 2 lines
Or written a perl script to reprocess them into something saner for that matter.
The issue that everybody seems to be forgetting (or ignoring) with changing the headers is that ALL the drivers then also need to be converted, and re-tested.
Given your lack of taste they'll probably need a full rewrite anyway. And given their not in-tree yet we don't care at all either.
include/asm-arm/arch-at91rm9200/AT91RM9200_EMAC.h line 13
Quoted 3 lines · Andrew Victor
include/asm-arm/arch-at91rm9200/AT91RM9200_EMAC.h +3
-0+// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the disclaimer below in the documentation and/or +// other materials provided with the distribution.
Is that for real?
Signature · 1 line
dwmw2
hi David,
Quoted 5 lines
include/asm-arm/arch-at91rm9200/AT91RM9200_EMAC.h line 13
Quoted 3 lines
include/asm-arm/arch-at91rm9200/AT91RM9200_EMAC.h +3
-0+// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the disclaimer below in the documentation and/or +// other materials provided with the distribution. Is that for real?
The hardware headers can't be GPL since they're also used on other non-Linux systems. The best we can probably get is a BSD-style license.
Regarding the actual wording, try:
grep -r "Redistributions in binary form" * | grep -v minimum
I count 130 instances of the same requirement in 2.6.13-rc2, though some of the files are dual-licensed.
Regards,
Andrew Victor
Quoted 10 lines · Andrew Victor
The hardware headers can't be GPL since they're also used on other non-Linux systems. The best we can probably get is a BSD-style license.
Regarding the actual wording, try:
grep -r "Redistributions in binary form" * | grep -v minimumI count 130 instances of the same requirement in 2.6.13-rc2, though some of the files are dual-licensed.
They should _all_ be dual-licensed if they carry the advertising clause, unless they're actually derived from true UCB code (in which case the advertising clause is revoked).
Yours certainly should be under dual licence.
Signature · 1 line
dwmw2
Quoted 8 lines · Andrew Victor
If the AT91RM9200+Linux community had to convert all the headers, bugs may be introduced in the conversion process and we would have to assume any maintenance responsibility. What we have now may be slightly ugly, but it is atleast known to be correct.
I've appended two of their headers as an example - the System peripherals (timer, interrupt controller, etc) and Ethernet.Comments?
Care to get rid of cool *_UART_MAP macros?
For those who didn't bother to download the patch, the snippet is:
#define FOO_UART_MAP { 4, 1, -1, -1, -1 }
...
int serial[AT91C_NR_UART] = FOO_UART_MAP;
[yes, each one is used in exactly one place]Obviously, AT91C_NR_UART should be AT91C_NR_UARTS, because it is "the number of UART_s_". And "serial" can be renamed to uart_map or something.
You also constantly cast ioremap() return values to unsigned long and cast them back to "void __iomem *" back on iounmap()
Review
Quoted 3 lines
(quoted diff) +3
-0+static struct resource *_s1dfb_resource[] = { + /* order *IS* significant */ + { /* video mem */
Then rewrite it as
static struct ... = {
[0] = {
.name = ...
...
},
[1] = {
.name = ...
...
},
}And check for non-NULL data in at91_add_device_usbh() is useless:
at91_add_device_usbh(&carmeva_usbh_data); at91_add_device_usbh(&csb337_usbh_data); at91_add_device_usbh(&csb637_usbh_data); at91_add_device_usbh(&dk_usbh_data); at91_add_device_usbh(&ek_usbh_data);
Same for add_device_eth(), _udc(), _cf(). In at91_add_device_mmc() you got it right.
Review
Quoted 2 lines
(quoted diff) +2
-0+static struct file_operations spidev_fops = { + owner: THIS_MODULE,
Use C99 initializers. Everywhere.
Review
Quoted 3 lines
(quoted diff) +3
-0+static int __init at91_spidev_init(void) +{ +#ifdef CONFIG_DEVFS_FS
It will be removed soon.
at91_wdt_ioctl() isn't __user annotated. Let alone it is ioctl.
Review
Quoted 5 lines
(quoted diff) +5
-0+#define BYTE_SWAP4(x) \ + (((x & 0xFF000000) >> 24) | \ + ((x & 0x00FF0000) >> 8) | \ + ((x & 0x0000FF00) << 8) | \ + ((x & 0x000000FF) << 24))
It's already somewhere in include/linux/byteorder/
Quoted 1 line
unsigned* dmabuf =
host->buffer;
Space before star, please. Also everywhere.
Quoted 1 line
+ char* command =
kmalloc(2, GFP_KERNEL);
Anyone remembers 1 kmallocated byte?
include/asm-arm/arch-at91rm9200/AT91RM9200_EMAC.h line 93
Quoted 6 lines
include/asm-arm/arch-at91rm9200/AT91RM9200_EMAC.h +2
-0+typedef struct _AT91S_EMAC { +}AT91S_EMAC , *AT91PS_EMAC ;
Potentially even worse than "PAT91S_EMAC", "AT91S_EMACP" combined. Putting P _there_...
hi Alexey,
Thanks for the constructive comments.
Quoted 1 line
And check for non-NULL data in
at91_add_device_usbh()is useless:
There are many more custom AT91RM9200-based boards. That NULL check is really just there to help the developers when they write their own board-XX.c file.
Quoted 1 line
at91_wdt_ioctl()isn't__userannotated. Let alone it is ioctl.
All the other watchdog drivers use ioctl? That is how it's described in Documentation/watchdog/watchdog-api.txt.
Quoted 3 lines
Quoted 1 line
+ char* command =
kmalloc(2, GFP_KERNEL);Anyone remembers 1 kmallocated byte?
That command buffer is passed down to the SPI driver, which then DMA's directly from/to it. We can't DMA to an address on the stack (atleast not in 2.4 when that driver was written).
Regards,
Andrew Victor
Quoted 10 lines · Andrew Victor
hi,
I am attempting to submit code for inclusion in the mainline kernel to support the Atmel AT91RM9200 SoC processor, and the various boards that use that processor. Since it's based on an ARM9 core, I submitted the patches to Russell King.
While he seems generally happy with most of the code, he has doubts about merging the Atmel-supplied headers and suggested I post this to the linux-kernel list for a wider review.
I'm with rmk, I do not like this use of structs. There are IO access functions defined for a number of reasons.
Quoted 6 lines
While I agree that their usage of structs/coding-style is not the cleanest/Linux way of doing things, re-using their headers is useful since:
1) they are supplied by the hardware manufacturer.
2) Atmel automatically generates them from their chip design database, so they should be correct.
Yes, but how do you know GCC is actually correctly compiling this?
Quoted 2 lines
3) they are used by most AT91RM9200 developers, not just those using Linux.
I feel this argument is a dangerous, as it ends up with well, we did it that way in XXX, so why can't we do it in linux? This'll end up with bad quality code and implementations simply due to the fact they exist. (IE, it was good enough for Microsoft, Linux should do it the same way)
Quoted 4 lines
This gives the benefit that there is a larger 'installed base', and Atmel has to take the responsibility that it is correct. I don't believe that Atmel will change the format of their hardware headers specifically for Linux.
Yes, so converting them to a different format is a _once only_ issue.
Quoted 4 lines
If the AT91RM9200+Linux community had to convert all the headers, bugs may be introduced in the conversion process and we would have to assume any maintenance responsibility. What we have now may be slightly ugly, but it is atleast known to be correct.
And this is different from bugs in the way that structs are layed out by the compiler, or code re-ordering? It is know to be correct for at least the versions of GCC that you have tried it with.
The arguments that structs are compiler efficient are also dying with newer GCCs getting better at factoring constants into registers.
Quoted 20 lines
As suggested by Russell King, I even added a warning message that these headers should not be used as an example of how things should be done in new implementations.
I've appended two of their headers as an example - the System peripherals (timer, interrupt controller, etc) and Ethernet.
Comments?
For those who might be interested, the full AT91RM9200 patches are available from http://maxim.org.za/AT91RM9200/2.6/
Regards,
Andrew Victorinclude/asm-arm/arch-at91rm9200/AT91RM9200_EMAC.h +0
-0
[snip]
include/asm-arm/arch-at91rm9200/AT91RM9200_EMAC.h line 57
Quoted 9 lines
include/asm-arm/arch-at91rm9200/AT91RM9200_EMAC.h +9
-0+typedef struct _AT91S_EMAC { + AT91_REG EMAC_CTL; // Network Control Register + AT91_REG EMAC_CFG; // Network Configuration Register + AT91_REG EMAC_SR; // Network Status Register + AT91_REG EMAC_TAR; // Transmit Address Register + AT91_REG EMAC_TCR; // Transmit Control Register + AT91_REG EMAC_TSR; // Transmit Status Register + AT91_REG EMAC_RBQP; // Receive Buffer Queue Pointer + AT91_REG Reserved0[1]; //
pretty difficult to verify these are actually being assigned the correct address?
Signature · 3 lines
Ben ([email protected], http://www.fluff.org/) 'a smiley only costs 4 bytes'