-
-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: ethernet: motorcomm: Add yt6801 driver
- Loading branch information
1 parent
08eb04c
commit d601b05
Showing
22 changed files
with
19,349 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
config NET_VENDOR_MOTORCOMM | ||
bool "Motorcomm devices" | ||
default y | ||
help | ||
If you have a network (Ethernet) device belonging to this class, say Y. | ||
|
||
Note that the answer to this question doesn't directly affect the | ||
kernel: saying N will just cause the configurator to skip all | ||
the questions about motorcomm devices. If you say Y, you will be asked | ||
for your specific device in the following questions. | ||
|
||
if NET_VENDOR_MOTORCOMM | ||
|
||
config FUXI | ||
tristate "motorcomm fuxi Ethernet support" | ||
|
||
endif #NET_VENDOR_MOTORCOMM |
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,40 @@ | ||
# SUBARCH tells the usermode build what the underlying arch is. That is set | ||
# first, and if a usermode build is happening, the "ARCH=um" on the command | ||
# line overrides the setting of ARCH below. If a native build is happening, | ||
# then ARCH is assigned, getting whatever value it gets normally, and | ||
# SUBARCH is subsequently ignored. | ||
# eg: | ||
# x86(make modules or make) | ||
# arm(make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules) | ||
SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/s390x/s390/ -e s/parisc64/parisc/ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ -e s/riscv.*/riscv/) | ||
CURARCH ?= $(SUBARCH) | ||
ARCH ?= $(SUBARCH) | ||
CROSS_COMPILE ?= | ||
CONFIG_MODULE_SIG=n | ||
EXTRA_CFLAGS = -Wall -g -I$(CURDIR) -I$(subst fuxi-linux-release-package/module_fuxi/src,common,$(PWD)) -I$(PWD) | ||
EXTRA_CFLAGS += -DFXGMAC_DEBUG | ||
KSRC = /lib/modules/`uname -r`/build | ||
KDST = /lib/modules/`uname -r`/kernel/drivers/net/ethernet/motorcomm/ | ||
KFILE = yt6801.ko | ||
ifneq ($(filter arm arm64, $(ARCH)),) | ||
ifeq ($(CURARCH), x86) | ||
# if you want to compile driver with linux kernel source code,you should specify the source path(KSRC), such as: | ||
# KSRC = /home/mxl/ti-processor-sdk-linux-am57xx-evm-06.03.00.106/board-support/linux-4.19.94+gitAUTOINC+be5389fd85-gbe5389fd85 | ||
endif | ||
endif | ||
yt6801-objs := fuxi-gmac-common.o fuxi-gmac-desc.o fuxi-gmac-ethtool.o fuxi-gmac-hw.o fuxi-gmac-net.o fuxi-gmac-pci.o fuxi-gmac-phy.o fuxi-efuse.o fuxi-dbg.o fuxi-gmac-debugfs.o | ||
obj-m += yt6801.o | ||
modules: | ||
make -C $(KSRC) M=$(PWD) modules | ||
install: | ||
sudo install -d $(KDST) | ||
sudo install $(KFILE) $(KDST) | ||
sudo depmod -a | ||
@file $(KDST)$(KFILE) | ||
@echo install done. | ||
uninstall: | ||
sudo rm $(KDST)$(KFILE) | ||
sudo ls -l $(KDST) | ||
clean: | ||
make -C $(KSRC) M=$(PWD) clean | ||
.PHONY:modules install uninstall clean |
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,4 @@ | ||
obj-$(CONFIG_FUXI) += fuxi.o | ||
fuxi-objs := fuxi-gmac-common.o fuxi-gmac-desc.o fuxi-gmac-ethtool.o fuxi-gmac-hw.o \ | ||
fuxi-gmac-net.o fuxi-gmac-pci.o fuxi-gmac-phy.o fuxi-efuse.o fuxi-dbg.o \ | ||
fuxi-gmac-debugfs.o |
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,30 @@ | ||
============================================================================= | ||
|
||
This file contains certain notices of software components included with | ||
the software that Motorcomm, Inc. ("Motorcomm") is required to | ||
provide you. Except where prohibited by the open source license, the | ||
content of this file is provided solely to satisfy Motorcomm's attribution | ||
and notice requirement; your use of these software components | ||
together with the Motorcomm software ("Software") is subject to the terms | ||
of your license from Motorcomm. Compliance with all copyright laws and | ||
software license agreements included in the notice section of this | ||
file are the responsibility of the user. Except as may be granted by | ||
separate express written agreement, this file provides no license to | ||
any patents, trademarks, copyrights, or other intellectual property | ||
of Motorcomm or any of its subsidiaries. | ||
|
||
Software provided with this notice is NOT A CONTRIBUTION to any open | ||
source project. If alternative licensing is available for any of the | ||
components with licenses or attributions provided below, a license | ||
choice is made for receiving such code by Motorcomm. | ||
|
||
Copyright (c) 2021 Motorcomm, Inc. All rights reserved. | ||
|
||
Motorcomm is a trademark of Motorcomm Incorporated, registered in China | ||
and other countries. All Motorcomm Incorporated trademarks | ||
are used with permission. Other products and brand names may be | ||
trademarks or registered trademarks of their respective owners. | ||
|
||
============================================================================= | ||
|
||
|
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,7 @@ | ||
PACKAGE_NAME="yt6801" | ||
PACKAGE_VERSION="1.0.21" | ||
CLEAN="make clean" | ||
MAKE[0]="make" | ||
BUILT_MODULE_NAME[0]="yt6801" | ||
DEST_MODULE_LOCATION[0]="/kernel/drivers/motorcomm" | ||
AUTOINSTALL="yes" |
Oops, something went wrong.