]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
GRETH: removed unneccesary register write and one clean up.
authorDaniel Hellstrom <daniel@gaisler.com>
Wed, 27 Oct 2010 07:39:46 +0000 (09:39 +0200)
committerDaniel Hellstrom <daniel@gaisler.com>
Thu, 18 Nov 2010 07:33:24 +0000 (08:33 +0100)
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
drivers/net/greth.c

index 79bc4d9d26b10df0e8cf6f5448d520782ef4c318..4f1973cf5ca725fde2564fd751526cd9f184a826 100644 (file)
@@ -45,7 +45,7 @@
 /* ByPass Cache when reading regs */
 #define GRETH_REGLOAD(addr)            SPARC_NOCACHE_READ(addr)
 /* Write-through cache ==> no bypassing needed on writes */
-#define GRETH_REGSAVE(addr,data)       (*(unsigned int *)(addr) = (data))
+#define GRETH_REGSAVE(addr,data) (*(volatile unsigned int *)(addr) = (data))
 #define GRETH_REGORIN(addr,data) GRETH_REGSAVE(addr,GRETH_REGLOAD(addr)|data)
 #define GRETH_REGANDIN(addr,data) GRETH_REGSAVE(addr,GRETH_REGLOAD(addr)&data)
 
@@ -146,8 +146,6 @@ int greth_init(struct eth_device *dev, bd_t * bis)
        printf("greth_init\n");
 #endif
 
-       GRETH_REGSAVE(&regs->control, 0);
-
        if (!greth->rxbd_base) {
 
                /* allocate descriptors */