10110080 POA Port Ability Offset | Bit | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | | Name | G1_LINK | G0_LINK | LINK | G1_TXC | | Type | RO | RO | RO | RO |
---------------------------------------------------------------------------------------------------- Bit(s) Name Description ---------------------------------------------------------------------------------------------------- 31 G1_LINK Port 6 Link Status 1: Link up 0: Link down 30 G0_LINK Port 5 Link Status 1: Link up 0: Link down 29:25 LINK Port 4 ~ Port 0 Link Status 1: Link up 0: Link down 24:23 G1_TXC Flow Control Status of Port 6 The flow control capability status bit after Auto-negotiation or force mode. 1xb: full duplex and tx flow control ON x1b: full duplex and rx flow control ON 00b: flow control off
可以看到,Port 0的Link Status在25位。
确定寄存器虚拟BASE地址
1 2
# printk打印,dmesg可看 reg s 2
修改寄存器虚拟BASE地址
1 2 3 4 5
# 根据linux源码/arch/mips/include/asm/mach-ralink/rt_mmap.h的 RALINK_SYSCTL_BASE 而来。 reg s 0xb0000000