forked from torvalds/linux
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The commit itself comes from https://github.com/cubieboard/linux-sunxi/tree/cubie/sunxi-3.4/ IRC user jemk found out the IP itself comes from DesignWare. It turns out it is supported already in both the mainline (stmmac) and the U-Boot (designware). These existing drivers should be made to work with Allwinner chips. This driver is solely for the purpose of the reference and will not be improved. Signed-off-by: arokux <arokux@gmail.com>
- Loading branch information
Showing
16 changed files
with
4,399 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
config SUNXI_GMAC | ||
tristate "Sunxi platform 10/100/1000Mbps Ethernet driver" | ||
depends on HAS_IOMEM | ||
select NET_CORE | ||
select MII | ||
select PHYLIB | ||
select CRC32 | ||
---help--- | ||
This is the driver for the Sunxi Ethernet. | ||
|
||
if SUNXI_GMAC | ||
|
||
config GMAC_SCRIPT_SYS | ||
bool "Use sunxi platform script" | ||
depends on SUNXI_GMAC | ||
default y | ||
---help--- | ||
The GMAC gpio request and control by the script of sunxi platform. | ||
Select it, by script. If not, ioremap by drivers itself. | ||
|
||
config GMAC_CLK_SYS | ||
bool "Clock use system interface" | ||
depends on SUNXI_GMAC | ||
default y | ||
---help--- | ||
It select the clock controler is system or the driver itself. | ||
If you want to use the system interface, select it. If not, the | ||
driver will control the clock by ioremap. | ||
|
||
choice | ||
prompt "Select the DMA TX/RX descriptor operating modes" | ||
depends on SUNXI_GMAC | ||
---help--- | ||
This driver supports DMA descriptor to operate both in dual buffer | ||
(RING) and linked-list(CHAINED) mode. In RING mode each descriptor | ||
points to two data buffer pointers whereas in CHAINED mode they | ||
points to only one data buffer pointer. | ||
|
||
config GMAC_RING | ||
bool "Enable Descriptor Ring Mode" | ||
|
||
config GMAC_CHAINED | ||
bool "Enable Descriptor Chained Mode" | ||
|
||
endchoice | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
obj-$(CONFIG_SUNXI_GMAC) += sunxi_gmac.o | ||
gmac-$(CONFIG_GMAC_TEST) += gmac_test.o | ||
|
||
sunxi_gmac-y := gmac_core.o gmac_mdio.o \ | ||
gmac_plat.o gmac_base.o \ | ||
gmac_desc.o gmac_ethtool.o |
Oops, something went wrong.