summaryrefslogtreecommitdiff
path: root/cpu/arm920t/wmt/gmacif.h
diff options
context:
space:
mode:
authorKevin2014-11-15 11:48:36 +0800
committerKevin2014-11-15 11:48:36 +0800
commitd04075478d378d9e15f3e1abfd14b0bd124077d4 (patch)
tree733dd964582f388b9e3e367c249946cd32a2851f /cpu/arm920t/wmt/gmacif.h
downloadFOSSEE-netbook-uboot-source-d04075478d378d9e15f3e1abfd14b0bd124077d4.tar.gz
FOSSEE-netbook-uboot-source-d04075478d378d9e15f3e1abfd14b0bd124077d4.tar.bz2
FOSSEE-netbook-uboot-source-d04075478d378d9e15f3e1abfd14b0bd124077d4.zip
init commit via android 4.4 uboot
Diffstat (limited to 'cpu/arm920t/wmt/gmacif.h')
-rwxr-xr-xcpu/arm920t/wmt/gmacif.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/cpu/arm920t/wmt/gmacif.h b/cpu/arm920t/wmt/gmacif.h
new file mode 100755
index 0000000..db1c94e
--- /dev/null
+++ b/cpu/arm920t/wmt/gmacif.h
@@ -0,0 +1,64 @@
+/*++
+Copyright (c) 2010 WonderMedia Technologies, Inc.
+
+This program is free software: you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details. You
+should have received a copy of the GNU General Public License along with this
+program. If not, see http://www.gnu.org/licenses/>.
+
+WonderMedia Technologies, Inc.
+10F, 529, Chung-Cheng Road, Hsin-Tien, Taipei 231, R.O.C.
+--*/
+
+
+#ifndef _GMACIF_H_
+#define _GMACIF_H_
+
+
+/*--------------------- Export Definitions -------------------------*/
+#define BA_MAC0 0xd8004000 /* MAC0 Base Address */
+#define BA_MAC1 0xd8005000 /* MAC1 Base Address */
+#define GMEMORY_BUFFER_START 0x03C00000 /* Start address of allocated memory buffer */
+#define MAX_NET_DEVICE 4 /* max. # of the devices */
+#define W_MAX_TIMEOUT 0x0FFFU
+#define MACDBG 0 /* Switch to control debug message (0/1 = Disable/Enable) */
+
+#define PCI_Configuration_Space_Offset 0x100
+#define VEE 0x5c
+#define VMSTS 0x7c
+#define MaxTimeOut 1000
+
+#define __MMIO__
+/*--------------------- Export Types ------------------------------*/
+
+/*--------------------- Export Macros ------------------------------*/
+
+/*--------------------- Export Classes ----------------------------*/
+
+/*--------------------- Export Variables --------------------------*/
+
+/*--------------------- Export Functions --------------------------*/
+#ifdef __cplusplus
+extern "C" { /* Assume C declarations for C++ */
+#endif /* __cplusplus */
+
+#include <asm/u-boot.h>
+
+int gmac_startio(bd_t *bd);
+int gmac_send(volatile void *packet, int length);
+int gmac_receive(void);
+void gmac_halt(void);
+void mii_read(char *devname, unsigned char addr, unsigned char reg, unsigned short *value);
+void mii_write(char *devname, unsigned char addr, unsigned char reg, unsigned short value) ;
+
+#ifdef __cplusplus
+} /* End of extern "C" { */
+#endif /* __cplusplus */
+
+#endif /* _GMACIF_H_ */