mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
add 5.15 kernel
This commit is contained in:
parent
a762b23185
commit
75bd0d2698
146 changed files with 20097 additions and 574 deletions
|
@ -9,12 +9,12 @@ endif
|
|||
LINUX_VERSION-5.4 = .132
|
||||
LINUX_VERSION-5.10 = .64
|
||||
LINUX_VERSION-5.14 = .6
|
||||
LINUX_VERSION-5.15 = .4
|
||||
LINUX_VERSION-5.15 = .10
|
||||
|
||||
LINUX_KERNEL_HASH-5.4.132 = 8466adbfb3579e751ede683496df7bb20f258b5f882250f3dd82be63736d00ef
|
||||
LINUX_KERNEL_HASH-5.10.64 = 3eb84bd24a2de2b4749314e34597c02401c5d6831b055ed5224adb405c35e30a
|
||||
LINUX_KERNEL_HASH-5.14.6 = 54848c1268771ee3515e4c33e29abc3f1fa90d8144894cce6d0ebc3b158bccec
|
||||
LINUX_KERNEL_HASH-5.15.4 = 549d0fb75e65f6158e6f4becc648f249d386843da0e1211460bde8b1ea99cbca
|
||||
LINUX_KERNEL_HASH-5.15.10 = 484fcf5df8d00ddc570af443ef33382a110b338239b1f47048974baa22455b4b
|
||||
|
||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||
|
|
14
root/package/kernel/linux/modules/001-depends.mk
Executable file
14
root/package/kernel/linux/modules/001-depends.mk
Executable file
|
@ -0,0 +1,14 @@
|
|||
#
|
||||
# Copyright (C) 2010-2011 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
define AddDepends/nls
|
||||
DEPENDS+= +kmod-nls-base $(foreach cp,$(1),+kmod-nls-$(cp))
|
||||
endef
|
||||
|
||||
define AddDepends/rfkill
|
||||
DEPENDS+= +USE_RFKILL:kmod-rfkill $(1)
|
||||
endef
|
591
root/package/kernel/linux/modules/block.mk
Executable file
591
root/package/kernel/linux/modules/block.mk
Executable file
|
@ -0,0 +1,591 @@
|
|||
#
|
||||
# Copyright (C) 2006-2012 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
BLOCK_MENU:=Block Devices
|
||||
|
||||
define KernelPackage/aoe
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=ATA over Ethernet support
|
||||
KCONFIG:=CONFIG_ATA_OVER_ETH
|
||||
FILES:=$(LINUX_DIR)/drivers/block/aoe/aoe.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,aoe)
|
||||
endef
|
||||
|
||||
define KernelPackage/aoe/description
|
||||
Kernel support for ATA over Ethernet
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,aoe))
|
||||
|
||||
|
||||
define KernelPackage/ata-core
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=Serial and Parallel ATA support
|
||||
DEPENDS:=@PCI_SUPPORT||TARGET_sunxi +kmod-scsi-core
|
||||
KCONFIG:=CONFIG_ATA
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/libata.ko
|
||||
ifneq ($(wildcard $(LINUX_DIR)/drivers/ata/libahci.ko),)
|
||||
FILES+=$(LINUX_DIR)/drivers/ata/libahci.ko
|
||||
endif
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ata-core))
|
||||
|
||||
|
||||
define AddDepends/ata
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
DEPENDS+=+kmod-ata-core $(1)
|
||||
endef
|
||||
|
||||
|
||||
define KernelPackage/ata-ahci
|
||||
TITLE:=AHCI Serial ATA support
|
||||
KCONFIG:=CONFIG_SATA_AHCI
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/ata/ahci.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,libahci ahci,1)
|
||||
$(call AddDepends/ata)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-ahci/description
|
||||
Support for AHCI Serial ATA controllers
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ata-ahci))
|
||||
|
||||
|
||||
define KernelPackage/ata-ahci-platform
|
||||
TITLE:=AHCI Serial ATA Platform support
|
||||
KCONFIG:=CONFIG_SATA_AHCI_PLATFORM
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/ata/ahci_platform.ko \
|
||||
$(LINUX_DIR)/drivers/ata/libahci_platform.ko
|
||||
AUTOLOAD:=$(call AutoLoad,40,libahci libahci_platform ahci_platform,1)
|
||||
$(call AddDepends/ata,@TARGET_ipq806x||TARGET_layerscape||TARGET_sunxi)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-ahci-platform/description
|
||||
Platform support for AHCI Serial ATA controllers
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ata-ahci-platform))
|
||||
|
||||
|
||||
define KernelPackage/ata-artop
|
||||
TITLE:=ARTOP 6210/6260 PATA support
|
||||
KCONFIG:=CONFIG_PATA_ARTOP
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/pata_artop.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,pata_artop,1)
|
||||
$(call AddDepends/ata)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-artop/description
|
||||
PATA support for ARTOP 6210/6260 host controllers
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ata-artop))
|
||||
|
||||
|
||||
define KernelPackage/ata-marvell-sata
|
||||
TITLE:=Marvell Serial ATA support
|
||||
KCONFIG:=CONFIG_SATA_MV
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/sata_mv.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,sata_mv,1)
|
||||
$(call AddDepends/ata)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-marvell-sata/description
|
||||
SATA support for marvell chipsets
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ata-marvell-sata))
|
||||
|
||||
|
||||
define KernelPackage/ata-nvidia-sata
|
||||
TITLE:=Nvidia Serial ATA support
|
||||
KCONFIG:=CONFIG_SATA_NV
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/sata_nv.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,sata_nv,1)
|
||||
$(call AddDepends/ata)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ata-nvidia-sata))
|
||||
|
||||
|
||||
define KernelPackage/ata-pdc202xx-old
|
||||
TITLE:=Older Promise PATA controller support
|
||||
KCONFIG:= \
|
||||
CONFIG_ATA_SFF=y \
|
||||
CONFIG_PATA_PDC_OLD
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/pata_pdc202xx_old.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,pata_pdc202xx_old,1)
|
||||
$(call AddDepends/ata)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-pdc202xx-old/description
|
||||
This option enables support for the Promise 20246, 20262, 20263,
|
||||
20265 and 20267 adapters
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ata-pdc202xx-old))
|
||||
|
||||
|
||||
define KernelPackage/ata-piix
|
||||
TITLE:=Intel PIIX PATA/SATA support
|
||||
KCONFIG:=CONFIG_ATA_PIIX
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/ata_piix.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,ata_piix,1)
|
||||
$(call AddDepends/ata)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-piix/description
|
||||
SATA support for Intel ICH5/6/7/8 series host controllers and
|
||||
PATA support for Intel ESB/ICH/PIIX3/PIIX4 series host controllers
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ata-piix))
|
||||
|
||||
|
||||
define KernelPackage/ata-sil
|
||||
TITLE:=Silicon Image SATA support
|
||||
KCONFIG:=CONFIG_SATA_SIL
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/sata_sil.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,sata_sil,1)
|
||||
$(call AddDepends/ata)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-sil/description
|
||||
Support for Silicon Image Serial ATA controllers
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ata-sil))
|
||||
|
||||
|
||||
define KernelPackage/ata-sil24
|
||||
TITLE:=Silicon Image 3124/3132 SATA support
|
||||
KCONFIG:=CONFIG_SATA_SIL24
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/sata_sil24.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,sata_sil24,1)
|
||||
$(call AddDepends/ata)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-sil24/description
|
||||
Support for Silicon Image 3124/3132 Serial ATA controllers
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ata-sil24))
|
||||
|
||||
|
||||
define KernelPackage/ata-via-sata
|
||||
TITLE:=VIA SATA support
|
||||
KCONFIG:=CONFIG_SATA_VIA
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/sata_via.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,sata_via,1)
|
||||
$(call AddDepends/ata)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-via-sata/description
|
||||
This option enables support for VIA Serial ATA
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ata-via-sata))
|
||||
|
||||
|
||||
define KernelPackage/block2mtd
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=Block device MTD emulation
|
||||
KCONFIG:=CONFIG_MTD_BLOCK2MTD
|
||||
FILES:=$(LINUX_DIR)/drivers/mtd/devices/block2mtd.ko
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,block2mtd))
|
||||
|
||||
|
||||
define KernelPackage/dax
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=DAX: direct access to differentiated memory
|
||||
KCONFIG:=CONFIG_DAX
|
||||
FILES:=$(LINUX_DIR)/drivers/dax/dax.ko
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,dax))
|
||||
|
||||
|
||||
define KernelPackage/dm
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=Device Mapper
|
||||
DEPENDS:=+kmod-crypto-manager +kmod-dax +KERNEL_KEYS:kmod-keys-encrypted
|
||||
# All the "=n" are unnecessary, they're only there
|
||||
# to stop the config from asking the question.
|
||||
# MIRROR is M because I've needed it for pvmove.
|
||||
KCONFIG:= \
|
||||
CONFIG_BLK_DEV_MD=n \
|
||||
CONFIG_DM_DEBUG=n \
|
||||
CONFIG_DM_UEVENT=n \
|
||||
CONFIG_DM_DELAY=n \
|
||||
CONFIG_DM_LOG_WRITES=n \
|
||||
CONFIG_DM_MQ_DEFAULT=n \
|
||||
CONFIG_DM_MULTIPATH=n \
|
||||
CONFIG_DM_ZERO=n \
|
||||
CONFIG_DM_SNAPSHOT=n \
|
||||
CONFIG_DM_LOG_USERSPACE=n \
|
||||
CONFIG_MD=y \
|
||||
CONFIG_BLK_DEV_DM \
|
||||
CONFIG_DM_CRYPT \
|
||||
CONFIG_DM_MIRROR
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/md/dm-mod.ko \
|
||||
$(LINUX_DIR)/drivers/md/dm-crypt.ko \
|
||||
$(LINUX_DIR)/drivers/md/dm-log.ko \
|
||||
$(LINUX_DIR)/drivers/md/dm-mirror.ko \
|
||||
$(LINUX_DIR)/drivers/md/dm-region-hash.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,dm-mod dm-log dm-region-hash dm-mirror dm-crypt)
|
||||
endef
|
||||
|
||||
define KernelPackage/dm/description
|
||||
Kernel module necessary for LVM2 support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,dm))
|
||||
|
||||
define KernelPackage/dm-raid
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=LVM2 raid support
|
||||
DEPENDS:=+kmod-dm +kmod-md-mod \
|
||||
+kmod-md-raid0 +kmod-md-raid1 +kmod-md-raid10 +kmod-md-raid456
|
||||
KCONFIG:= \
|
||||
CONFIG_DM_RAID
|
||||
FILES:=$(LINUX_DIR)/drivers/md/dm-raid.ko
|
||||
AUTOLOAD:=$(call AutoLoad,31,dm-raid)
|
||||
endef
|
||||
|
||||
define KernelPackage/dm-raid/description
|
||||
Kernel module necessary for LVM2 raid support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,dm-raid))
|
||||
|
||||
|
||||
define KernelPackage/iscsi-initiator
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=iSCSI Initiator over TCP/IP
|
||||
DEPENDS:=+kmod-scsi-core +kmod-crypto-hash
|
||||
KCONFIG:= \
|
||||
CONFIG_INET \
|
||||
CONFIG_SCSI_LOWLEVEL=y \
|
||||
CONFIG_ISCSI_TCP \
|
||||
CONFIG_SCSI_ISCSI_ATTRS=y
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/scsi/iscsi_tcp.ko \
|
||||
$(LINUX_DIR)/drivers/scsi/libiscsi.ko \
|
||||
$(LINUX_DIR)/drivers/scsi/libiscsi_tcp.ko \
|
||||
$(LINUX_DIR)/drivers/scsi/scsi_transport_iscsi.ko
|
||||
AUTOLOAD:=$(call AutoProbe,libiscsi libiscsi_tcp scsi_transport_iscsi iscsi_tcp)
|
||||
endef
|
||||
|
||||
define KernelPackage/iscsi-initiator/description
|
||||
The iSCSI Driver provides a host with the ability to access storage through an
|
||||
IP network. The driver uses the iSCSI protocol to transport SCSI requests and
|
||||
responses over a TCP/IP network between the host (the "initiator") and "targets".
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iscsi-initiator))
|
||||
|
||||
|
||||
define KernelPackage/md-mod
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=MD RAID
|
||||
KCONFIG:= \
|
||||
CONFIG_MD=y \
|
||||
CONFIG_BLK_DEV_MD=m \
|
||||
CONFIG_MD_AUTODETECT=y \
|
||||
CONFIG_MD_FAULTY=n
|
||||
FILES:=$(LINUX_DIR)/drivers/md/md-mod.ko
|
||||
AUTOLOAD:=$(call AutoLoad,27,md-mod)
|
||||
endef
|
||||
|
||||
define KernelPackage/md-mod/description
|
||||
Kernel RAID md module (md-mod.ko).
|
||||
You will need to select at least one RAID level module below.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,md-mod))
|
||||
|
||||
|
||||
define KernelPackage/md/Depends
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
DEPENDS:=kmod-md-mod $(1)
|
||||
endef
|
||||
|
||||
|
||||
define KernelPackage/md-linear
|
||||
$(call KernelPackage/md/Depends,)
|
||||
TITLE:=RAID Linear Module
|
||||
KCONFIG:=CONFIG_MD_LINEAR
|
||||
FILES:=$(LINUX_DIR)/drivers/md/linear.ko
|
||||
AUTOLOAD:=$(call AutoLoad,28,linear)
|
||||
endef
|
||||
|
||||
define KernelPackage/md-linear/description
|
||||
RAID "Linear" or "Append" driver module (linear.ko)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,md-linear))
|
||||
|
||||
|
||||
define KernelPackage/md-raid0
|
||||
$(call KernelPackage/md/Depends,)
|
||||
TITLE:=RAID0 Module
|
||||
KCONFIG:=CONFIG_MD_RAID0
|
||||
FILES:=$(LINUX_DIR)/drivers/md/raid0.ko
|
||||
AUTOLOAD:=$(call AutoLoad,28,raid0)
|
||||
endef
|
||||
|
||||
define KernelPackage/md-raid0/description
|
||||
RAID Level 0 (Striping) driver module (raid0.ko)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,md-raid0))
|
||||
|
||||
|
||||
define KernelPackage/md-raid1
|
||||
$(call KernelPackage/md/Depends,)
|
||||
TITLE:=RAID1 Module
|
||||
KCONFIG:=CONFIG_MD_RAID1
|
||||
FILES:=$(LINUX_DIR)/drivers/md/raid1.ko
|
||||
AUTOLOAD:=$(call AutoLoad,28,raid1)
|
||||
endef
|
||||
|
||||
define KernelPackage/md-raid1/description
|
||||
RAID Level 1 (Mirroring) driver (raid1.ko)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,md-raid1))
|
||||
|
||||
|
||||
define KernelPackage/md-raid10
|
||||
$(call KernelPackage/md/Depends,)
|
||||
TITLE:=RAID10 Module
|
||||
KCONFIG:=CONFIG_MD_RAID10
|
||||
FILES:=$(LINUX_DIR)/drivers/md/raid10.ko
|
||||
AUTOLOAD:=$(call AutoLoad,28,raid10)
|
||||
endef
|
||||
|
||||
define KernelPackage/md-raid10/description
|
||||
RAID Level 10 (Mirroring+Striping) driver module (raid10.ko)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,md-raid10))
|
||||
|
||||
|
||||
define KernelPackage/md-raid456
|
||||
$(call KernelPackage/md/Depends,+kmod-lib-raid6 +kmod-lib-xor +kmod-lib-crc32c)
|
||||
TITLE:=RAID Level 456 Driver
|
||||
KCONFIG:= \
|
||||
CONFIG_ASYNC_CORE \
|
||||
CONFIG_ASYNC_MEMCPY \
|
||||
CONFIG_ASYNC_XOR \
|
||||
CONFIG_ASYNC_PQ \
|
||||
CONFIG_ASYNC_RAID6_RECOV \
|
||||
CONFIG_ASYNC_RAID6_TEST=n \
|
||||
CONFIG_MD_RAID456 \
|
||||
CONFIG_MULTICORE_RAID456=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/crypto/async_tx/async_tx.ko \
|
||||
$(LINUX_DIR)/crypto/async_tx/async_memcpy.ko \
|
||||
$(LINUX_DIR)/crypto/async_tx/async_xor.ko \
|
||||
$(LINUX_DIR)/crypto/async_tx/async_pq.ko \
|
||||
$(LINUX_DIR)/crypto/async_tx/async_raid6_recov.ko \
|
||||
$(LINUX_DIR)/drivers/md/raid456.ko
|
||||
AUTOLOAD:=$(call AutoLoad,28, async_tx async_memcpy async_xor async_pq async_raid6_recov raid456)
|
||||
endef
|
||||
|
||||
define KernelPackage/md-raid456/description
|
||||
RAID Level 4,5,6 kernel module (raid456.ko)
|
||||
|
||||
Includes the following modules required by
|
||||
raid456.ko:
|
||||
xor.ko
|
||||
async_tx.ko
|
||||
async_xor.ko
|
||||
async_memcpy.ko
|
||||
async_pq.ko
|
||||
async_raid5_recov.ko
|
||||
raid6_pq.ko
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,md-raid456))
|
||||
|
||||
|
||||
define KernelPackage/md-multipath
|
||||
$(call KernelPackage/md/Depends,)
|
||||
TITLE:=MD Multipath Module
|
||||
KCONFIG:=CONFIG_MD_MULTIPATH
|
||||
FILES:=$(LINUX_DIR)/drivers/md/multipath.ko
|
||||
AUTOLOAD:=$(call AutoLoad,29,multipath)
|
||||
endef
|
||||
|
||||
define KernelPackage/md-multipath/description
|
||||
Multipath driver module (multipath.ko)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,md-multipath))
|
||||
|
||||
|
||||
define KernelPackage/libsas
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
DEPENDS:=@TARGET_x86
|
||||
TITLE:=SAS Domain Transport Attributes
|
||||
KCONFIG:=CONFIG_SCSI_SAS_LIBSAS \
|
||||
CONFIG_SCSI_SAS_ATTRS \
|
||||
CONFIG_SCSI_SAS_ATA=y \
|
||||
CONFIG_SCSI_SAS_HOST_SMP=y \
|
||||
CONFIG_SCSI_SAS_LIBSAS_DEBUG=y
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/scsi/scsi_transport_sas.ko \
|
||||
$(LINUX_DIR)/drivers/scsi/libsas/libsas.ko
|
||||
AUTOLOAD:=$(call AutoLoad,29,scsi_transport_sas libsas,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/libsas/description
|
||||
SAS Domain Transport Attributes support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,libsas,1))
|
||||
|
||||
|
||||
define KernelPackage/loop
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=Loopback device support
|
||||
KCONFIG:= \
|
||||
CONFIG_BLK_DEV_LOOP \
|
||||
CONFIG_BLK_DEV_CRYPTOLOOP=n
|
||||
FILES:=$(LINUX_DIR)/drivers/block/loop.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,loop)
|
||||
endef
|
||||
|
||||
define KernelPackage/loop/description
|
||||
Kernel module for loopback device support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,loop))
|
||||
|
||||
|
||||
define KernelPackage/mvsas
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=Marvell 88SE6440 SAS/SATA driver
|
||||
DEPENDS:=@TARGET_x86 +kmod-libsas
|
||||
KCONFIG:= \
|
||||
CONFIG_SCSI_MVSAS \
|
||||
CONFIG_SCSI_MVSAS_TASKLET=n
|
||||
FILES:=$(LINUX_DIR)/drivers/scsi/mvsas/mvsas.ko
|
||||
AUTOLOAD:=$(call AutoLoad,40,mvsas,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/mvsas/description
|
||||
Kernel support for the Marvell SAS SCSI adapters
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,mvsas))
|
||||
|
||||
|
||||
define KernelPackage/nbd
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=Network block device support
|
||||
KCONFIG:=CONFIG_BLK_DEV_NBD
|
||||
FILES:=$(LINUX_DIR)/drivers/block/nbd.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,nbd)
|
||||
endef
|
||||
|
||||
define KernelPackage/nbd/description
|
||||
Kernel module for network block device support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nbd))
|
||||
|
||||
|
||||
define KernelPackage/scsi-core
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=SCSI device support
|
||||
KCONFIG:= \
|
||||
CONFIG_SCSI \
|
||||
CONFIG_SCSI_COMMON@ge5.15 \
|
||||
CONFIG_BLK_DEV_SD
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/scsi/scsi_mod.ko \
|
||||
$(LINUX_DIR)/drivers/scsi/scsi_common.ko@ge5.15 \
|
||||
$(LINUX_DIR)/drivers/scsi/sd_mod.ko
|
||||
AUTOLOAD:=$(call AutoLoad,40,scsi_mod scsi_common@ge5.15 sd_mod,1)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,scsi-core))
|
||||
|
||||
|
||||
define KernelPackage/scsi-generic
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=Kernel support for SCSI generic
|
||||
DEPENDS:=+kmod-scsi-core
|
||||
KCONFIG:= \
|
||||
CONFIG_CHR_DEV_SG
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/scsi/sg.ko
|
||||
AUTOLOAD:=$(call AutoLoad,65,sg)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,scsi-generic))
|
||||
|
||||
|
||||
define KernelPackage/cdrom
|
||||
TITLE:=Kernel library module for CD / DVD drives
|
||||
KCONFIG:=CONFIG_CDROM
|
||||
HIDDEN:=1
|
||||
FILES:=$(LINUX_DIR)/drivers/cdrom/cdrom.ko
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,cdrom))
|
||||
|
||||
|
||||
define KernelPackage/scsi-cdrom
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=Kernel support for CD / DVD drives
|
||||
DEPENDS:=+kmod-scsi-core +kmod-cdrom
|
||||
KCONFIG:= \
|
||||
CONFIG_BLK_DEV_SR \
|
||||
CONFIG_BLK_DEV_SR_VENDOR=n
|
||||
FILES:=$(LINUX_DIR)/drivers/scsi/sr_mod.ko
|
||||
AUTOLOAD:=$(call AutoLoad,45,sr_mod)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,scsi-cdrom))
|
||||
|
||||
|
||||
define KernelPackage/scsi-tape
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=Kernel support for scsi tape drives
|
||||
DEPENDS:=+kmod-scsi-core
|
||||
KCONFIG:= \
|
||||
CONFIG_CHR_DEV_ST
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/scsi/st.ko
|
||||
AUTOLOAD:=$(call AutoLoad,45,st)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,scsi-tape))
|
||||
|
||||
define KernelPackage/iosched-bfq
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
TITLE:=Kernel support for BFQ I/O scheduler
|
||||
KCONFIG:= \
|
||||
CONFIG_IOSCHED_BFQ \
|
||||
CONFIG_BFQ_GROUP_IOSCHED=y \
|
||||
CONFIG_BFQ_CGROUP_DEBUG=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/block/bfq.ko
|
||||
AUTOLOAD:=$(call AutoLoad,10,bfq)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iosched-bfq))
|
308
root/package/kernel/linux/modules/can.mk
Executable file
308
root/package/kernel/linux/modules/can.mk
Executable file
|
@ -0,0 +1,308 @@
|
|||
#
|
||||
# Copyright (C) 2013 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
CAN_MENU:=CAN Support
|
||||
|
||||
define KernelPackage/can
|
||||
SUBMENU:=$(CAN_MENU)
|
||||
TITLE:=CAN bus support
|
||||
KCONFIG:=\
|
||||
CONFIG_CAN=m \
|
||||
CONFIG_CAN_DEV \
|
||||
CONFIG_CAN_CALC_BITTIMING=y \
|
||||
CONFIG_CAN_LEDS=y \
|
||||
CONFIG_CAN_AT91=n \
|
||||
CONFIG_CAN_TI_HECC=n \
|
||||
CONFIG_CAN_MCP251X=n \
|
||||
CONFIG_CAN_BFIN=n \
|
||||
CONFIG_CAN_JANZ_ICAN3=n \
|
||||
CONFIG_PCH_CAN=n \
|
||||
CONFIG_CAN_GRCAN=n \
|
||||
CONFIG_CAN_CC770=n \
|
||||
CONFIG_CAN_MSCAN=n \
|
||||
CONFIG_CAN_SJA1000=n \
|
||||
CONFIG_CAN_SOFTING=n \
|
||||
CONFIG_NET_EMATCH_CANID=n \
|
||||
CONFIG_CAN_DEBUG_DEVICES=n
|
||||
FILES:=$(LINUX_DIR)/drivers/net/can/dev/can-dev.ko \
|
||||
$(LINUX_DIR)/net/can/can.ko
|
||||
AUTOLOAD:=$(call AutoProbe,can can-dev)
|
||||
endef
|
||||
|
||||
define KernelPackage/can/description
|
||||
Kernel module for CAN bus support.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,can))
|
||||
|
||||
|
||||
define AddDepends/can
|
||||
SUBMENU:=$(CAN_MENU)
|
||||
DEPENDS+=kmod-can $(1)
|
||||
endef
|
||||
|
||||
|
||||
define KernelPackage/can-bcm
|
||||
TITLE:=Broadcast Manager CAN Protcol
|
||||
KCONFIG:=CONFIG_CAN_BCM
|
||||
FILES:=$(LINUX_DIR)/net/can/can-bcm.ko
|
||||
AUTOLOAD:=$(call AutoProbe,can-bcm)
|
||||
$(call AddDepends/can)
|
||||
endef
|
||||
|
||||
define KernelPackage/can-bcm/description
|
||||
The Broadcast Manager offers content filtering, timeout monitoring,
|
||||
sending of RTR frames, and cyclic CAN messages without permanent user
|
||||
interaction.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,can-bcm))
|
||||
|
||||
|
||||
define KernelPackage/can-c-can
|
||||
TITLE:=BOSCH C_CAN/D_CAN drivers
|
||||
KCONFIG:=CONFIG_CAN_C_CAN
|
||||
FILES:=$(LINUX_DIR)/drivers/net/can/c_can/c_can.ko
|
||||
AUTOLOAD:=$(call AutoProbe,c_can)
|
||||
$(call AddDepends/can)
|
||||
endef
|
||||
|
||||
define KernelPackage/can-c-can/description
|
||||
This driver adds generic support for the C_CAN/D_CAN chips.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,can-c-can))
|
||||
|
||||
|
||||
define KernelPackage/can-c-can-pci
|
||||
TITLE:=PCI Bus based BOSCH C_CAN/D_CAN driver
|
||||
KCONFIG:=CONFIG_CAN_C_CAN_PCI
|
||||
DEPENDS:=kmod-can-c-can @PCI_SUPPORT
|
||||
FILES:=$(LINUX_DIR)/drivers/net/can/c_can/c_can_pci.ko
|
||||
AUTOLOAD:=$(call AutoProbe,c_can_pci)
|
||||
$(call AddDepends/can)
|
||||
endef
|
||||
|
||||
define KernelPackage/can-c-can-pci/description
|
||||
This driver adds support for the C_CAN/D_CAN chips connected
|
||||
to the PCI bus.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,can-c-can-pci))
|
||||
|
||||
|
||||
define KernelPackage/can-c-can-platform
|
||||
TITLE:=Platform Bus based BOSCH C_CAN/D_CAN driver
|
||||
KCONFIG:=CONFIG_CAN_C_CAN_PLATFORM
|
||||
DEPENDS:=kmod-can-c-can +kmod-regmap-core
|
||||
FILES:=$(LINUX_DIR)/drivers/net/can/c_can/c_can_platform.ko
|
||||
AUTOLOAD:=$(call AutoProbe,c_can_platform)
|
||||
$(call AddDepends/can)
|
||||
endef
|
||||
|
||||
define KernelPackage/can-c-can-platform/description
|
||||
This driver adds support for the C_CAN/D_CAN chips connected
|
||||
to the "platform bus" (Linux abstraction for directly to the
|
||||
processor attached devices) which can be found on various
|
||||
boards from ST Microelectronics (http://www.st.com) like the
|
||||
SPEAr1310 and SPEAr320 evaluation boards & TI (www.ti.com)
|
||||
boards like am335x, dm814x, dm813x and dm811x.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,can-c-can-platform))
|
||||
|
||||
|
||||
define KernelPackage/can-flexcan
|
||||
TITLE:=Support for Freescale FLEXCAN based chips
|
||||
KCONFIG:=CONFIG_CAN_FLEXCAN
|
||||
FILES:=$(LINUX_DIR)/drivers/net/can/flexcan.ko
|
||||
AUTOLOAD:=$(call AutoProbe,flexcan)
|
||||
$(call AddDepends/can,@TARGET_imx)
|
||||
endef
|
||||
|
||||
define KernelPackage/can-flexcan/description
|
||||
Freescale FLEXCAN CAN bus controller implementation.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,can-flexcan))
|
||||
|
||||
|
||||
define KernelPackage/can-gw
|
||||
TITLE:=CAN Gateway/Router
|
||||
KCONFIG:=CONFIG_CAN_GW
|
||||
FILES:=$(LINUX_DIR)/net/can/can-gw.ko
|
||||
AUTOLOAD:=$(call AutoProbe,can-gw)
|
||||
$(call AddDepends/can)
|
||||
endef
|
||||
|
||||
define KernelPackage/can-gw/description
|
||||
The CAN Gateway/Router is used to route (and modify) CAN frames.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,can-gw))
|
||||
|
||||
|
||||
define KernelPackage/can-mcp251x
|
||||
TITLE:=MCP251x SPI CAN controller
|
||||
KCONFIG:=\
|
||||
CONFIG_SPI=y \
|
||||
CONFIG_CAN_MCP251X
|
||||
FILES:=$(LINUX_DIR)/drivers/net/can/spi/mcp251x.ko
|
||||
AUTOLOAD:=$(call AutoProbe,can-mcp251x)
|
||||
$(call AddDepends/can)
|
||||
endef
|
||||
|
||||
define KernelPackage/can-mcp251x/description
|
||||
Microchip MCP251x SPI CAN controller
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,can-mcp251x))
|
||||
|
||||
|
||||
define KernelPackage/can-raw
|
||||
TITLE:=Raw CAN Protcol
|
||||
KCONFIG:=CONFIG_CAN_RAW
|
||||
FILES:=$(LINUX_DIR)/net/can/can-raw.ko
|
||||
AUTOLOAD:=$(call AutoProbe,can-raw)
|
||||
$(call AddDepends/can)
|
||||
endef
|
||||
|
||||
define KernelPackage/can-raw/description
|
||||
The raw CAN protocol option offers access to the CAN bus via
|
||||
the BSD socket API.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,can-raw))
|
||||
|
||||
|
||||
define KernelPackage/can-slcan
|
||||
TITLE:=Serial / USB serial CAN Adaptors (slcan)
|
||||
KCONFIG:=CONFIG_CAN_SLCAN
|
||||
FILES:=$(LINUX_DIR)/drivers/net/can/slcan.ko
|
||||
AUTOLOAD:=$(call AutoProbe,slcan)
|
||||
$(call AddDepends/can)
|
||||
endef
|
||||
|
||||
define KernelPackage/can-slcan/description
|
||||
CAN driver for several 'low cost' CAN interfaces that are attached
|
||||
via serial lines or via USB-to-serial adapters using the LAWICEL
|
||||
ASCII protocol.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,can-slcan))
|
||||
|
||||
|
||||
define KernelPackage/can-usb-8dev
|
||||
TITLE:=8 devices USB2CAN interface
|
||||
KCONFIG:=CONFIG_CAN_8DEV_USB
|
||||
FILES:=$(LINUX_DIR)/drivers/net/can/usb/usb_8dev.ko
|
||||
AUTOLOAD:=$(call AutoProbe,usb_8dev)
|
||||
$(call AddDepends/can,+kmod-usb-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/can-usb-8dev/description
|
||||
This driver supports the USB2CAN interface
|
||||
from 8 devices (http://www.8devices.com).
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,can-usb-8dev))
|
||||
|
||||
|
||||
define KernelPackage/can-usb-ems
|
||||
TITLE:=EMS CPC-USB/ARM7 CAN/USB interface
|
||||
KCONFIG:=CONFIG_CAN_EMS_USB
|
||||
FILES:=$(LINUX_DIR)/drivers/net/can/usb/ems_usb.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ems_usb)
|
||||
$(call AddDepends/can,+kmod-usb-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/can-usb-ems/description
|
||||
This driver is for the one channel CPC-USB/ARM7 CAN/USB interface
|
||||
from EMS Dr. Thomas Wuensche (http://www.ems-wuensche.de).
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,can-usb-ems))
|
||||
|
||||
|
||||
define KernelPackage/can-usb-esd
|
||||
TITLE:=ESD USB/2 CAN/USB interface
|
||||
KCONFIG:=CONFIG_CAN_ESD_USB2
|
||||
FILES:=$(LINUX_DIR)/drivers/net/can/usb/esd_usb2.ko
|
||||
AUTOLOAD:=$(call AutoProbe,esd_usb2)
|
||||
$(call AddDepends/can,+kmod-usb-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/can-usb-esd/description
|
||||
This driver supports the CAN-USB/2 interface
|
||||
from esd electronic system design gmbh (http://www.esd.eu).
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,can-usb-esd))
|
||||
|
||||
|
||||
define KernelPackage/can-usb-kvaser
|
||||
TITLE:=Kvaser CAN/USB interface
|
||||
KCONFIG:=CONFIG_CAN_KVASER_USB
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/net/can/usb/kvaser_usb/kvaser_usb.ko
|
||||
AUTOLOAD:=$(call AutoProbe,kvaser_usb)
|
||||
$(call AddDepends/can,+kmod-usb-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/can-usb-kvaser/description
|
||||
This driver adds support for Kvaser CAN/USB devices like Kvaser
|
||||
Leaf Light.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,can-usb-kvaser))
|
||||
|
||||
|
||||
define KernelPackage/can-usb-peak
|
||||
TITLE:=PEAK PCAN-USB/USB Pro interfaces
|
||||
KCONFIG:=CONFIG_CAN_PEAK_USB
|
||||
FILES:=$(LINUX_DIR)/drivers/net/can/usb/peak_usb/peak_usb.ko
|
||||
AUTOLOAD:=$(call AutoProbe,peak_usb)
|
||||
$(call AddDepends/can,+kmod-usb-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/can-usb-peak/description
|
||||
This driver supports the PCAN-USB and PCAN-USB Pro adapters
|
||||
from PEAK-System Technik (http://www.peak-system.com).
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,can-usb-peak))
|
||||
|
||||
|
||||
define KernelPackage/can-vcan
|
||||
TITLE:=Virtual Local CAN Interface (vcan)
|
||||
KCONFIG:=CONFIG_CAN_VCAN
|
||||
FILES:=$(LINUX_DIR)/drivers/net/can/vcan.ko
|
||||
AUTOLOAD:=$(call AutoProbe,vcan)
|
||||
$(call AddDepends/can)
|
||||
endef
|
||||
|
||||
define KernelPackage/can-vcan/description
|
||||
Similar to the network loopback devices, vcan offers a
|
||||
virtual local CAN interface.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,can-vcan))
|
||||
|
||||
define KernelPackage/can-xilinx-can
|
||||
TITLE:=Xilinx CAN IP
|
||||
KCONFIG:=CONFIG_CAN_XILINXCAN
|
||||
FILES:=$(LINUX_DIR)/drivers/net/can/xilinx_can.ko
|
||||
AUTOLOAD:=$(call AutoProbe,xilinx_can)
|
||||
$(call AddDepends/can,@TARGET_zynq)
|
||||
endef
|
||||
|
||||
define KernelPackage/can-xilinx-can/description
|
||||
Xilinx CAN driver. This driver supports both
|
||||
soft AXI CAN IP and Zynq CANPS IP.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,can-xilinx-can))
|
|
@ -287,7 +287,7 @@ define KernelPackage/crypto-ghash/arm-ce
|
|||
AUTOLOAD+=$(call AutoLoad,09,ghash-arm-ce)
|
||||
endef
|
||||
|
||||
KernelPackage/crypto-ghash/imx6=$(KernelPackage/crypto-ghash/arm-ce)
|
||||
KernelPackage/crypto-ghash/imx=$(KernelPackage/crypto-ghash/arm-ce)
|
||||
KernelPackage/crypto-ghash/ipq40xx=$(KernelPackage/crypto-ghash/arm-ce)
|
||||
KernelPackage/crypto-ghash/mvebu/cortexa9=$(KernelPackage/crypto-ghash/arm-ce)
|
||||
|
||||
|
@ -447,13 +447,23 @@ endef
|
|||
$(eval $(call KernelPackage,crypto-kpp))
|
||||
|
||||
|
||||
define KernelPackage/crypto-lib-blake2s-generic
|
||||
TITLE:=BLAKE2s hash function library generic
|
||||
DEPENDS:=@(!CONFIG_arm&&!TARGET_x86)
|
||||
KCONFIG:=CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC
|
||||
HIDDEN:=1
|
||||
FILES:= $(LINUX_DIR)/lib/crypto/libblake2s-generic.ko
|
||||
$(call AddDepends/crypto,+PACKAGE_kmod-crypto-hash:kmod-crypto-hash)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,crypto-lib-blake2s-generic))
|
||||
|
||||
define KernelPackage/crypto-lib-blake2s
|
||||
TITLE:=BLAKE2s hash function library
|
||||
DEPENDS:=+kmod-crypto-lib-blake2s-generic
|
||||
KCONFIG:=CONFIG_CRYPTO_LIB_BLAKE2S
|
||||
HIDDEN:=1
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/lib/crypto/libblake2s.ko@lt5.14 \
|
||||
$(LINUX_DIR)/lib/crypto/libblake2s-generic.ko@lt5.14
|
||||
FILES:= $(LINUX_DIR)/lib/crypto/libblake2s.ko
|
||||
$(call AddDepends/crypto,+PACKAGE_kmod-crypto-hash:kmod-crypto-hash)
|
||||
endef
|
||||
|
||||
|
@ -466,6 +476,16 @@ define KernelPackage/crypto-lib-blake2s/x86/64
|
|||
FILES+=$(LINUX_DIR)/arch/x86/crypto/blake2s-x86_64.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/crypto-lib-blake2s/arm
|
||||
KCONFIG+=CONFIG_CRYPTO_BLAKE2S_ARM
|
||||
FILES+=$(LINUX_DIR)/arch/arm/crypto/blake2s-arm.ko
|
||||
endef
|
||||
|
||||
ifdef KernelPackage/crypto-lib-blake2s/$(ARCH)
|
||||
KernelPackage/crypto-lib-blake2s/$(CRYPTO_TARGET)=\
|
||||
$(KernelPackage/crypto-lib-blake2s/$(ARCH))
|
||||
endif
|
||||
|
||||
$(eval $(call KernelPackage,crypto-lib-blake2s))
|
||||
|
||||
|
||||
|
@ -683,7 +703,7 @@ define KernelPackage/crypto-misc
|
|||
CONFIG_CRYPTO_KHAZAD \
|
||||
CONFIG_CRYPTO_SERPENT \
|
||||
CONFIG_CRYPTO_TEA \
|
||||
CONFIG_CRYPTO_TGR192 \
|
||||
CONFIG_CRYPTO_TGR192@lt5.12 \
|
||||
CONFIG_CRYPTO_TWOFISH \
|
||||
CONFIG_CRYPTO_TWOFISH_COMMON \
|
||||
CONFIG_CRYPTO_TWOFISH_586 \
|
||||
|
@ -696,7 +716,7 @@ define KernelPackage/crypto-misc
|
|||
$(LINUX_DIR)/crypto/cast6_generic.ko \
|
||||
$(LINUX_DIR)/crypto/khazad.ko \
|
||||
$(LINUX_DIR)/crypto/tea.ko \
|
||||
$(LINUX_DIR)/crypto/tgr192.ko@lt5.14 \
|
||||
$(LINUX_DIR)/crypto/tgr192.ko@lt5.12 \
|
||||
$(LINUX_DIR)/crypto/twofish_common.ko \
|
||||
$(LINUX_DIR)/crypto/wp512.ko \
|
||||
$(LINUX_DIR)/crypto/twofish_generic.ko \
|
||||
|
@ -704,7 +724,7 @@ define KernelPackage/crypto-misc
|
|||
$(LINUX_DIR)/crypto/blowfish_generic.ko \
|
||||
$(LINUX_DIR)/crypto/serpent_generic.ko
|
||||
AUTOLOAD:=$(call AutoLoad,10,anubis camellia_generic cast_common \
|
||||
cast5_generic cast6_generic khazad tea tgr192 twofish_common \
|
||||
cast5_generic cast6_generic khazad tea tgr192@lt5.12 twofish_common \
|
||||
wp512 blowfish_common serpent_generic)
|
||||
ifndef CONFIG_TARGET_x86
|
||||
AUTOLOAD+= $(call AutoLoad,10,twofish_generic blowfish_generic)
|
||||
|
@ -717,7 +737,7 @@ ifndef CONFIG_TARGET_x86_64
|
|||
FILES+= \
|
||||
$(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko \
|
||||
$(LINUX_DIR)/arch/x86/crypto/serpent-sse2-i586.ko \
|
||||
$(LINUX_DIR)/arch/x86/crypto/glue_helper.ko@lt5.14 \
|
||||
$(LINUX_DIR)/arch/x86/crypto/glue_helper.ko \
|
||||
$(LINUX_DIR)/crypto/cryptd.ko \
|
||||
$(LINUX_DIR)/crypto/crypto_simd.ko
|
||||
AUTOLOAD+= $(call AutoLoad,10,cryptd glue_helper \
|
||||
|
@ -857,7 +877,7 @@ define KernelPackage/crypto-sha1/arm-neon
|
|||
AUTOLOAD+=$(call AutoLoad,09,sha1-arm-neon)
|
||||
endef
|
||||
|
||||
KernelPackage/crypto-sha1/imx6=$(KernelPackage/crypto-sha1/arm-neon)
|
||||
KernelPackage/crypto-sha1/imx=$(KernelPackage/crypto-sha1/arm-neon)
|
||||
KernelPackage/crypto-sha1/ipq40xx=$(KernelPackage/crypto-sha1/arm-neon)
|
||||
KernelPackage/crypto-sha1/mvebu/cortexa9=$(KernelPackage/crypto-sha1/arm-neon)
|
||||
|
||||
|
@ -921,7 +941,7 @@ define KernelPackage/crypto-sha512/arm
|
|||
AUTOLOAD+=$(call AutoLoad,09,sha512-arm)
|
||||
endef
|
||||
|
||||
KernelPackage/crypto-sha512/imx6=$(KernelPackage/crypto-sha512/arm)
|
||||
KernelPackage/crypto-sha512/imx=$(KernelPackage/crypto-sha512/arm)
|
||||
KernelPackage/crypto-sha512/ipq40xx=$(KernelPackage/crypto-sha512/arm)
|
||||
KernelPackage/crypto-sha512/mvebu/cortexa9=$(KernelPackage/crypto-sha512/arm)
|
||||
|
||||
|
|
76
root/package/kernel/linux/modules/firewire.mk
Executable file
76
root/package/kernel/linux/modules/firewire.mk
Executable file
|
@ -0,0 +1,76 @@
|
|||
#
|
||||
# Copyright (C) 2008-2011 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
FIREWIRE_MENU:=FireWire support
|
||||
|
||||
define KernelPackage/firewire
|
||||
SUBMENU:=$(FIREWIRE_MENU)
|
||||
TITLE:=Support for FireWire (new stack)
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-lib-crc-itu-t
|
||||
KCONFIG:=CONFIG_FIREWIRE
|
||||
FILES:=$(LINUX_DIR)/drivers/firewire/firewire-core.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/firewire/description
|
||||
Kernel support for FireWire (new stack)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,firewire))
|
||||
|
||||
|
||||
define KernelPackage/firewire-net
|
||||
SUBMENU:=$(FIREWIRE_MENU)
|
||||
TITLE:=Support for IP networking over FireWire
|
||||
DEPENDS:=kmod-firewire
|
||||
KCONFIG:=CONFIG_FIREWIRE_NET
|
||||
FILES:=$(LINUX_DIR)/drivers/firewire/firewire-net.ko
|
||||
AUTOLOAD:=$(call AutoProbe,firewire-net)
|
||||
endef
|
||||
|
||||
define KernelPackage/firewire-net/description
|
||||
Kernel support for IPv4 over FireWire
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,firewire-net))
|
||||
|
||||
|
||||
define KernelPackage/firewire-ohci
|
||||
SUBMENU:=$(FIREWIRE_MENU)
|
||||
TITLE:=Support for OHCI-1394 controllers
|
||||
DEPENDS:=kmod-firewire
|
||||
KCONFIG:= \
|
||||
CONFIG_FIREWIRE_OHCI \
|
||||
CONFIG_FIREWIRE_OHCI_DEBUG=n \
|
||||
CONFIG_FIREWIRE_OHCI_REMOTE_DMA=n
|
||||
FILES:=$(LINUX_DIR)/drivers/firewire/firewire-ohci.ko
|
||||
AUTOLOAD:=$(call AutoProbe,firewire-ohci)
|
||||
endef
|
||||
|
||||
|
||||
define KernelPackage/firewire-ohci/description
|
||||
Kernel support for FireWire OHCI-1394 controllers
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,firewire-ohci))
|
||||
|
||||
|
||||
define KernelPackage/firewire-sbp2
|
||||
SUBMENU:=$(FIREWIRE_MENU)
|
||||
TITLE:=Support for SBP-2 devices over FireWire
|
||||
DEPENDS:=kmod-firewire +kmod-scsi-core
|
||||
KCONFIG:=CONFIG_FIREWIRE_SBP2
|
||||
FILES:=$(LINUX_DIR)/drivers/firewire/firewire-sbp2.ko
|
||||
AUTOLOAD:=$(call AutoProbe,firewire-sbp2)
|
||||
endef
|
||||
|
||||
define KernelPackage/firewire-sbp2/description
|
||||
Kernel support for SBP-2 devices over FireWire
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,firewire-sbp2))
|
||||
|
||||
|
|
@ -70,7 +70,6 @@ define KernelPackage/fs-btrfs
|
|||
DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor +kmod-lib-zstd
|
||||
KCONFIG:=\
|
||||
CONFIG_BTRFS_FS \
|
||||
CONFIG_BTRFS_FS_POSIX_ACL=n \
|
||||
CONFIG_BTRFS_FS_CHECK_INTEGRITY=n
|
||||
FILES:=\
|
||||
$(LINUX_DIR)/fs/btrfs/btrfs.ko
|
||||
|
@ -88,24 +87,30 @@ define KernelPackage/fs-cifs
|
|||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=CIFS support
|
||||
KCONFIG:= \
|
||||
CONFIG_SMBFS_COMMON@ge5.15 \
|
||||
CONFIG_CIFS \
|
||||
CONFIG_CIFS_DFS_UPCALL=n \
|
||||
CONFIG_CIFS_UPCALL=n
|
||||
FILES:=$(LINUX_DIR)/fs/cifs/cifs.ko
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/smbfs_common/cifs_arc4.ko@ge5.15 \
|
||||
$(LINUX_DIR)/fs/smbfs_common/cifs_md4.ko@ge5.15 \
|
||||
$(LINUX_DIR)/fs/cifs/cifs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,cifs)
|
||||
$(call AddDepends/nls)
|
||||
DEPENDS+= \
|
||||
+kmod-crypto-md4 \
|
||||
+(LINUX_5_4||LINUX_5_10):kmod-crypto-md4\
|
||||
+(LINUX_5_4||LINUX_5_10):kmod-crypto-arc4 \
|
||||
+kmod-crypto-md5 \
|
||||
+kmod-crypto-sha256 \
|
||||
+kmod-crypto-sha512 \
|
||||
+kmod-crypto-cmac \
|
||||
+kmod-crypto-hmac \
|
||||
+kmod-crypto-arc4 \
|
||||
+kmod-crypto-aead \
|
||||
+kmod-crypto-ccm \
|
||||
+kmod-crypto-ecb \
|
||||
+kmod-crypto-des
|
||||
+(LINUX_5_15):kmod-asn1-decoder \
|
||||
+(LINUX_5_15):kmod-oid-registry \
|
||||
+(LINUX_5_15):kmod-dnsresolver
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-cifs/description
|
||||
|
@ -240,10 +245,21 @@ endef
|
|||
$(eval $(call KernelPackage,fs-f2fs))
|
||||
|
||||
|
||||
define KernelPackage/fs-netfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Network Filesystems support
|
||||
DEPENDS:=@LINUX_5_15
|
||||
KCONFIG:= CONFIG_NETFS_SUPPORT
|
||||
FILES:=$(LINUX_DIR)/fs/netfs/netfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,28,netfs)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-netfs))
|
||||
|
||||
define KernelPackage/fs-fscache
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=General filesystem local cache manager
|
||||
DEPENDS:=
|
||||
DEPENDS:=+kmod-fs-netfs
|
||||
KCONFIG:=\
|
||||
CONFIG_FSCACHE=m \
|
||||
CONFIG_FSCACHE_STATS=y \
|
||||
|
@ -378,9 +394,20 @@ endef
|
|||
$(eval $(call KernelPackage,fs-nfs))
|
||||
|
||||
|
||||
define KernelPackage/fs-nfs-ssc
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Common NFS filesystem SSC Helper module
|
||||
KCONFIG:= CONFIG_NFS_V4_2@ge5.15
|
||||
FILES:= $(LINUX_DIR)/fs/nfs_common/nfs_ssc.ko@ge5.10
|
||||
AUTOLOAD:=$(call AutoLoad,30,nfs_ssc)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-nfs-ssc))
|
||||
|
||||
define KernelPackage/fs-nfs-common
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Common NFS filesystem modules
|
||||
DEPENDS:=+LINUX_5_10:kmod-fs-nfs-ssc
|
||||
KCONFIG:= \
|
||||
CONFIG_LOCKD \
|
||||
CONFIG_SUNRPC \
|
||||
|
@ -388,8 +415,7 @@ define KernelPackage/fs-nfs-common
|
|||
FILES:= \
|
||||
$(LINUX_DIR)/fs/lockd/lockd.ko \
|
||||
$(LINUX_DIR)/net/sunrpc/sunrpc.ko \
|
||||
$(LINUX_DIR)/fs/nfs_common/grace.ko \
|
||||
$(LINUX_DIR)/fs/nfs_common/nfs_ssc.ko@eq5.10
|
||||
$(LINUX_DIR)/fs/nfs_common/grace.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,grace sunrpc lockd)
|
||||
endef
|
||||
|
||||
|
@ -408,15 +434,15 @@ define KernelPackage/fs-nfs-common-rpcsec
|
|||
+kmod-crypto-sha1 \
|
||||
+kmod-crypto-hmac \
|
||||
+kmod-crypto-ecb \
|
||||
+kmod-crypto-arc4
|
||||
+kmod-crypto-arc4 \
|
||||
+kmod-oid-registry
|
||||
KCONFIG:= \
|
||||
CONFIG_SUNRPC_GSS \
|
||||
CONFIG_RPCSEC_GSS_KRB5
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/lib/oid_registry.ko \
|
||||
$(LINUX_DIR)/net/sunrpc/auth_gss/auth_rpcgss.ko \
|
||||
$(LINUX_DIR)/net/sunrpc/auth_gss/rpcsec_gss_krb5.ko
|
||||
AUTOLOAD:=$(call AutoLoad,31,oid_registry auth_rpcgss rpcsec_gss_krb5)
|
||||
AUTOLOAD:=$(call AutoLoad,31,auth_rpcgss rpcsec_gss_krb5)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-nfs-common-rpcsec/description
|
||||
|
@ -445,7 +471,7 @@ $(eval $(call KernelPackage,fs-nfs-v3))
|
|||
define KernelPackage/fs-nfs-v4
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=NFS4 filesystem client support
|
||||
DEPENDS:=+kmod-fs-nfs
|
||||
DEPENDS:=+kmod-fs-nfs +LINUX_5_15:kmod-fs-nfs-ssc
|
||||
KCONFIG:= \
|
||||
CONFIG_NFS_V4=y
|
||||
FILES:= \
|
||||
|
|
558
root/package/kernel/linux/modules/hwmon.mk
Executable file
558
root/package/kernel/linux/modules/hwmon.mk
Executable file
|
@ -0,0 +1,558 @@
|
|||
#
|
||||
# Copyright (C) 2006-2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
HWMON_MENU:=Hardware Monitoring Support
|
||||
|
||||
define KernelPackage/hwmon-core
|
||||
SUBMENU:=$(HWMON_MENU)
|
||||
TITLE:=Hardware monitoring support
|
||||
KCONFIG:= \
|
||||
CONFIG_HWMON \
|
||||
CONFIG_HWMON_DEBUG_CHIP=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/hwmon/hwmon.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-core/description
|
||||
Kernel modules for hardware monitoring
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-core))
|
||||
|
||||
|
||||
define AddDepends/hwmon
|
||||
SUBMENU:=$(HWMON_MENU)
|
||||
DEPENDS:=+kmod-hwmon-core $(1)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-ad7418
|
||||
TITLE:=AD741x monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_AD7418
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/ad7418.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,ad7418 ad7418)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-ad7418/description
|
||||
Kernel module for Analog Devices AD7416, AD7417 and AD7418 temperature monitor chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-ad7418))
|
||||
|
||||
define KernelPackage/hwmon-adt7410
|
||||
TITLE:=ADT7410 monitoring support
|
||||
KCONFIG:= \
|
||||
CONFIG_SENSORS_ADT7X10 \
|
||||
CONFIG_SENSORS_ADT7410
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/hwmon/adt7x10.ko \
|
||||
$(LINUX_DIR)/drivers/hwmon/adt7410.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,adt7x10 adt7410)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-adt7410/description
|
||||
Kernel module for ADT7410/7420 I2C thermal monitor chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-adt7410))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-adt7475
|
||||
TITLE:=ADT7473/7475/7476/7490 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_ADT7475
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/adt7475.ko
|
||||
AUTOLOAD:=$(call AutoProbe,adt7475)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core +kmod-hwmon-vid)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-adt7475/description
|
||||
Kernel module for ADT7473/7475/7476/7490 thermal monitor chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-adt7475))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-dme1737
|
||||
TITLE:=SMSC DME1737 and compatible monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_DME1737
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/hwmon/dme1737.ko
|
||||
AUTOLOAD:=$(call AutoProbe,dme1737)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core +kmod-hwmon-vid)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-dme1737/description
|
||||
SMSC DME1737, SCH3112, SCH3114, SCH3116, SCH5027 monitoring support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-dme1737))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-drivetemp
|
||||
TITLE:=Hard disk drives with temperature sensor
|
||||
KCONFIG:=CONFIG_SENSORS_DRIVETEMP
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/drivetemp.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,drivetemp)
|
||||
$(call AddDepends/hwmon,+kmod-ata-core +kmod-scsi-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-drivetemp/description
|
||||
Kernel module for Hard disk drives with temperature sensor
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-drivetemp))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-gpiofan
|
||||
TITLE:=Generic GPIO FAN support
|
||||
KCONFIG:=CONFIG_SENSORS_GPIO_FAN
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/gpio-fan.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,gpio-fan)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core +PACKAGE_kmod-thermal:kmod-thermal)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-gpiofan/description
|
||||
Kernel module for GPIO controlled FANs
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-gpiofan))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-f71882fg
|
||||
TITLE:=F71882FG compatible monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_F71882FG
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/f71882fg.ko
|
||||
AUTOLOAD:=$(call AutoProbe,f71882fg)
|
||||
$(call AddDepends/hwmon,@TARGET_x86)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-f71882fg/description
|
||||
Kernel module for hardware monitoring via many Fintek Super-IO chips.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-f71882fg))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-ina209
|
||||
TITLE:=INA209 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_INA209
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/ina209.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ina209)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-ina209/description
|
||||
Kernel module for ina209 dc power monitor chips
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-ina209))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-ina2xx
|
||||
TITLE:=INA2XX monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_INA2XX
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/ina2xx.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ina2xx)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core +kmod-regmap-i2c)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-ina2xx/description
|
||||
Kernel module for ina2xx dc current monitor chips
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-ina2xx))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-it87
|
||||
TITLE:=IT87 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_IT87
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/it87.ko
|
||||
AUTOLOAD:=$(call AutoProbe,it87)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core +kmod-hwmon-vid +PACKAGE_kmod-thermal:kmod-thermal)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-it87/description
|
||||
Kernel module for it87 thermal and voltage monitor chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-it87))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-lm63
|
||||
TITLE:=LM63/64 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_LM63
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/lm63.ko
|
||||
AUTOLOAD:=$(call AutoProbe,lm63)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core +kmod-regmap-i2c)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-lm63/description
|
||||
Kernel module for lm63 and lm64 thermal monitor chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-lm63))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-lm75
|
||||
TITLE:=LM75 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_LM75
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/lm75.ko
|
||||
AUTOLOAD:=$(call AutoProbe,lm75)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core +PACKAGE_kmod-thermal:kmod-thermal +kmod-regmap-i2c)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-lm75/description
|
||||
Kernel module for lm75 thermal monitor chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-lm75))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-lm77
|
||||
TITLE:=LM77 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_LM77
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/lm77.ko
|
||||
AUTOLOAD:=$(call AutoProbe,lm77)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-lm77/description
|
||||
Kernel module for LM77 thermal monitor chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-lm77))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-lm85
|
||||
TITLE:=LM85 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_LM85
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/lm85.ko
|
||||
AUTOLOAD:=$(call AutoProbe,lm85)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core +kmod-hwmon-vid)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-lm85/description
|
||||
Kernel module for LM85 thermal monitor chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-lm85))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-lm90
|
||||
TITLE:=LM90 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_LM90
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/lm90.ko
|
||||
AUTOLOAD:=$(call AutoProbe,lm90)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-lm90/description
|
||||
Kernel module for LM90 thermal monitor chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-lm90))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-lm92
|
||||
TITLE:=LM92 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_LM92
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/lm92.ko
|
||||
AUTOLOAD:=$(call AutoProbe,lm92)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-lm92/description
|
||||
Kernel module for LM92 thermal monitor chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-lm92))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-lm95241
|
||||
TITLE:=LM95241 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_LM95241
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/lm95241.ko
|
||||
AUTOLOAD:=$(call AutoProbe,lm95241)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-lm95241/description
|
||||
Kernel module for LM95241 thermal monitor chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-lm95241))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-ltc4151
|
||||
TITLE:=LTC4151 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_LTC4151
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/ltc4151.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ltc4151)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-ltc4151/description
|
||||
Kernel module for Linear Technology LTC4151 current and voltage monitor chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-ltc4151))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-mcp3021
|
||||
TITLE:=MCP3021/3221 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_MCP3021
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/mcp3021.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mcp3021)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-mcp3021/description
|
||||
Kernel module for Linear Technology MCP3021/3221 current and voltage monitor chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-mcp3021))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-nct6775
|
||||
TITLE:=NCT6106D/6775F/6776F/6779D/6791D/6792D/6793D and compatibles monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_NCT6775
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/nct6775.ko
|
||||
AUTOLOAD:=$(call AutoProbe,nct6775)
|
||||
$(call AddDepends/hwmon,@PCI_SUPPORT @TARGET_x86 +kmod-hwmon-vid)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-nct6775/description
|
||||
Kernel module for NCT6106D/6775F/6776F/6779D/6791D/6792D/6793D thermal monitor chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-nct6775))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-pc87360
|
||||
TITLE:=PC87360 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_PC87360
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/pc87360.ko
|
||||
AUTOLOAD:=$(call AutoProbe,pc87360)
|
||||
$(call AddDepends/hwmon,@TARGET_x86 +kmod-hwmon-vid)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-pc87360/description
|
||||
Kernel modules for PC87360 chips
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-pc87360))
|
||||
|
||||
|
||||
define KernelPackage/pmbus-core
|
||||
TITLE:=PMBus support
|
||||
KCONFIG:= CONFIG_PMBUS
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/pmbus/pmbus_core.ko
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/pmbus-core/description
|
||||
Kernel modules for Power Management Bus
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,pmbus-core))
|
||||
|
||||
|
||||
define KernelPackage/pmbus-zl6100
|
||||
TITLE:=Intersil / Zilker Labs ZL6100 hardware monitoring
|
||||
KCONFIG:=CONFIG_SENSORS_ZL6100
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/pmbus/zl6100.ko
|
||||
AUTOLOAD:=$(call AutoProbe,zl6100)
|
||||
$(call AddDepends/hwmon, +kmod-pmbus-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/pmbus-zl6100/description
|
||||
Kernel module for Intersil / Zilker Labs ZL6100 and
|
||||
compatible digital DC-DC controllers
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,pmbus-zl6100))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-pwmfan
|
||||
TITLE:=Generic PWM FAN support
|
||||
KCONFIG:=CONFIG_SENSORS_PWM_FAN
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/pwm-fan.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,pwm-fan)
|
||||
$(call AddDepends/hwmon, +PACKAGE_kmod-thermal:kmod-thermal)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-pwmfan/description
|
||||
Kernel module for PWM controlled FANs
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-pwmfan))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-sch5627
|
||||
TITLE:=SMSC SCH5627 monitoring support
|
||||
KCONFIG:= \
|
||||
CONFIG_SENSORS_SCH5627 \
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/hwmon/sch5627.ko \
|
||||
$(LINUX_DIR)/drivers/hwmon/sch56xx-common.ko
|
||||
AUTOLOAD:=$(call AutoProbe,sch5627)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-sch5627/description
|
||||
SMSC SCH5627 Super I/O chips include complete hardware monitoring
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-sch5627))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-sht21
|
||||
TITLE:=Sensiron SHT21 and compat. monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_SHT21
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/sht21.ko
|
||||
AUTOLOAD:=$(call AutoProbe,sht21)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-sht21/description
|
||||
Kernel module for Sensirion SHT21 and SHT25 temperature and humidity sensors chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-sht21))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-tmp102
|
||||
TITLE:=Texas Instruments TMP102 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_TMP102
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/tmp102.ko
|
||||
AUTOLOAD:=$(call AutoProbe,tmp102)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core +PACKAGE_kmod-thermal:kmod-thermal +kmod-regmap-i2c)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-tmp102/description
|
||||
Kernel module for Texas Instruments TMP102 temperature sensors chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-tmp102))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-tmp103
|
||||
TITLE:=Texas Instruments TMP103 monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_TMP103
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/tmp103.ko
|
||||
AUTOLOAD:=$(call AutoProbe,tmp103)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core +kmod-regmap-i2c)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-tmp103/description
|
||||
Kernel module for Texas Instruments TMP103 temperature sensors chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-tmp103))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-tmp421
|
||||
TITLE:=TI TMP421 and compatible monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_TMP421
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/tmp421.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,tmp421)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-tmp421/description
|
||||
Kernel module for the Texas Instruments TMP421 and compatible chips.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-tmp421))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-vid
|
||||
TITLE:=VID/VRM/VRD voltage conversion module.
|
||||
KCONFIG:=CONFIG_HWMON_VID
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/hwmon-vid.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,hwmon-vid)
|
||||
$(call AddDepends/hwmon,)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-vid/description
|
||||
VID/VRM/VRD voltage conversion module for hardware monitoring
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-vid))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-w83627ehf
|
||||
TITLE:=Winbond W83627EHF/EHG/DHG/UHG, W83667HG monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_W83627EHF
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/w83627ehf.ko
|
||||
AUTOLOAD:=$(call AutoProbe,w83627ehf)
|
||||
$(call AddDepends/hwmon,@TARGET_x86 +kmod-hwmon-vid)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-w83627ehf/description
|
||||
Kernel module for Winbond W83627EHF/EHG/DHG/UHG and W83667HG thermal monitor chip
|
||||
Support for NCT6775F and NCT6776F has been removed from this driver in favour of
|
||||
using the nct6775 driver to handle those chips.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-w83627ehf))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-w83627hf
|
||||
TITLE:=Winbond W83627HF monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_W83627HF
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/w83627hf.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,w83627hf)
|
||||
$(call AddDepends/hwmon,@TARGET_x86 +kmod-hwmon-vid)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-w83627hf/description
|
||||
Kernel module for the Winbond W83627HF chips.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-w83627hf))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-w83793
|
||||
TITLE:=Winbond W83793G/R monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_W83793
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/w83793.ko
|
||||
AUTOLOAD:=$(call AutoProbe,w83793)
|
||||
$(call AddDepends/hwmon,+kmod-i2c-core +kmod-hwmon-vid)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-w83793/description
|
||||
Kernel module for the Winbond W83793G and W83793R chips.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-w83793))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-adcxx
|
||||
TITLE:=ADCxx monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_ADCXX
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/adcxx.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,adcxx)
|
||||
$(call AddDepends/hwmon,)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-adcxx/description
|
||||
Kernel module for the National Semiconductor
|
||||
ADC<bb><c>S<sss> chip family, where
|
||||
* bb is the resolution in number of bits (8, 10, 12)
|
||||
* c is the number of channels (1, 2, 4, 8)
|
||||
* sss is the maximum conversion speed (021 for 200 kSPS, 051 for 500
|
||||
kSPS and 101 for 1 MSPS)
|
||||
|
||||
Examples : ADC081S101, ADC124S501, ...
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-adcxx))
|
||||
|
||||
|
290
root/package/kernel/linux/modules/i2c.mk
Executable file
290
root/package/kernel/linux/modules/i2c.mk
Executable file
|
@ -0,0 +1,290 @@
|
|||
#
|
||||
# Copyright (C) 2006-2009 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
I2C_MENU:=I2C support
|
||||
|
||||
ModuleConfVar=$(word 1,$(subst :,$(space),$(1)))
|
||||
ModuleFullPath=$(LINUX_DIR)/$(word 2,$(subst :,$(space),$(1))).ko
|
||||
ModuleKconfig=$(foreach mod,$(1),$(call ModuleConfVar,$(mod)))
|
||||
ModuleFiles=$(foreach mod,$(1),$(call ModuleFullPath,$(mod)))
|
||||
ModuleAuto=$(call AutoLoad,$(1),$(foreach mod,$(2),$(basename $(notdir $(call ModuleFullPath,$(mod))))),$(3))
|
||||
|
||||
define i2c_defaults
|
||||
SUBMENU:=$(I2C_MENU)
|
||||
KCONFIG:=$(call ModuleKconfig,$(1))
|
||||
FILES:=$(call ModuleFiles,$(1))
|
||||
AUTOLOAD:=$(call ModuleAuto,$(2),$(1),$(3))
|
||||
endef
|
||||
|
||||
I2C_CORE_MODULES:= \
|
||||
CONFIG_I2C:drivers/i2c/i2c-core \
|
||||
CONFIG_I2C_CHARDEV:drivers/i2c/i2c-dev
|
||||
|
||||
define KernelPackage/i2c-core
|
||||
$(call i2c_defaults,$(I2C_CORE_MODULES),51)
|
||||
TITLE:=I2C support
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-core/description
|
||||
Kernel modules for I2C support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-core))
|
||||
|
||||
|
||||
I2C_ALGOBIT_MODULES:= \
|
||||
CONFIG_I2C_ALGOBIT:drivers/i2c/algos/i2c-algo-bit
|
||||
|
||||
define KernelPackage/i2c-algo-bit
|
||||
$(call i2c_defaults,$(I2C_ALGOBIT_MODULES),55)
|
||||
TITLE:=I2C bit-banging interfaces
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-algo-bit/description
|
||||
Kernel modules for I2C bit-banging interfaces
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-algo-bit))
|
||||
|
||||
|
||||
I2C_ALGOPCA_MODULES:= \
|
||||
CONFIG_I2C_ALGOPCA:drivers/i2c/algos/i2c-algo-pca
|
||||
|
||||
define KernelPackage/i2c-algo-pca
|
||||
$(call i2c_defaults,$(I2C_ALGOPCA_MODULES),55)
|
||||
TITLE:=I2C PCA 9564 interfaces
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-algo-pca/description
|
||||
Kernel modules for I2C PCA 9564 interfaces
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-algo-pca))
|
||||
|
||||
|
||||
I2C_ALGOPCF_MODULES:= \
|
||||
CONFIG_I2C_ALGOPCF:drivers/i2c/algos/i2c-algo-pcf
|
||||
|
||||
define KernelPackage/i2c-algo-pcf
|
||||
$(call i2c_defaults,$(I2C_ALGOPCF_MODULES),55)
|
||||
TITLE:=I2C PCF 8584 interfaces
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-algo-pcf/description
|
||||
Kernel modules for I2C PCF 8584 interfaces
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-algo-pcf))
|
||||
|
||||
|
||||
I2C_DWCORE_MODULES:= \
|
||||
CONFIG_I2C_DESIGNWARE_CORE:drivers/i2c/busses/i2c-designware-core
|
||||
|
||||
define KernelPackage/i2c-designware-core
|
||||
$(call i2c_defaults,$(I2C_DWCORE_MODULES),58)
|
||||
TITLE:=Synopsys DesignWare I2C core
|
||||
DEPENDS:=+kmod-i2c-core +!LINUX_5_4:kmod-regmap-core
|
||||
HIDDEN:=y
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-designware-core))
|
||||
|
||||
|
||||
I2C_DWPCI_MODULES:= \
|
||||
CONFIG_I2C_DESIGNWARE_PCI:drivers/i2c/busses/i2c-designware-pci
|
||||
|
||||
define KernelPackage/i2c-designware-pci
|
||||
$(call i2c_defaults,$(I2C_DWPCI_MODULES),59)
|
||||
TITLE:=Synopsys DesignWare PCI
|
||||
DEPENDS:=+kmod-i2c-designware-core
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-designware-pci/description
|
||||
Support for Synopsys DesignWare I2C controller. Only master mode is supported.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-designware-pci))
|
||||
|
||||
|
||||
I2C_GPIO_MODULES:= \
|
||||
CONFIG_I2C_GPIO:drivers/i2c/busses/i2c-gpio
|
||||
|
||||
define KernelPackage/i2c-gpio
|
||||
$(call i2c_defaults,$(I2C_GPIO_MODULES),59)
|
||||
TITLE:=GPIO-based bitbanging I2C
|
||||
DEPENDS:=@GPIO_SUPPORT +kmod-i2c-algo-bit
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-gpio/description
|
||||
Kernel modules for a very simple bitbanging I2C driver utilizing the
|
||||
arch-neutral GPIO API to control the SCL and SDA lines.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-gpio))
|
||||
|
||||
|
||||
I2C_I801_MODULES:= \
|
||||
CONFIG_I2C_I801:drivers/i2c/busses/i2c-i801
|
||||
|
||||
define KernelPackage/i2c-i801
|
||||
$(call i2c_defaults,$(I2C_I801_MODULES),59)
|
||||
TITLE:=Intel I801 and compatible I2C interfaces
|
||||
DEPENDS:=@PCI_SUPPORT @TARGET_x86 +kmod-i2c-core +kmod-i2c-smbus
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-i801/description
|
||||
Support for the Intel I801 family of mainboard I2C interfaces,
|
||||
specifically 82801AA, 82801AB, 82801BA, 82801CA/CAM, 82801DB,
|
||||
82801EB/ER (ICH5/ICH5R), 6300ESB, ICH6, ICH7, ESB2, ICH8, ICH9,
|
||||
EP80579 (Tolapai), ICH10, 5/3400 Series (PCH), 6 Series (PCH),
|
||||
Patsburg (PCH), DH89xxCC (PCH), Panther Point (PCH),
|
||||
Lynx Point (PCH), Lynx Point-LP (PCH), Avoton (SOC),
|
||||
Wellsburg (PCH), Coleto Creek (PCH), Wildcat Point (PCH),
|
||||
Wildcat Point-LP (PCH), BayTrail (SOC), Sunrise Point-H (PCH),
|
||||
Sunrise Point-LP (PCH), DNV (SOC), Broxton (SOC),
|
||||
Lewisburg (PCH).
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-i801))
|
||||
|
||||
|
||||
I2C_MUX_MODULES:= \
|
||||
CONFIG_I2C_MUX:drivers/i2c/i2c-mux
|
||||
|
||||
define KernelPackage/i2c-mux
|
||||
$(call i2c_defaults,$(I2C_MUX_MODULES),51)
|
||||
TITLE:=I2C bus multiplexing support
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-mux/description
|
||||
Kernel modules for I2C bus multiplexing support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-mux))
|
||||
|
||||
I2C_MUX_GPIO_MODULES:= \
|
||||
CONFIG_I2C_MUX_GPIO:drivers/i2c/muxes/i2c-mux-gpio
|
||||
|
||||
define KernelPackage/i2c-mux-gpio
|
||||
$(call i2c_defaults,$(I2C_MUX_GPIO_MODULES),51)
|
||||
TITLE:=GPIO-based I2C mux/switches
|
||||
DEPENDS:=+kmod-i2c-mux
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-mux-gpio/description
|
||||
Kernel modules for GENERIC_GPIO I2C bus mux/switching devices
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-mux-gpio))
|
||||
|
||||
|
||||
I2C_MUX_PCA9541_MODULES:= \
|
||||
CONFIG_I2C_MUX_PCA9541:drivers/i2c/muxes/i2c-mux-pca9541
|
||||
|
||||
define KernelPackage/i2c-mux-pca9541
|
||||
$(call i2c_defaults,$(I2C_MUX_PCA9541_MODULES),51)
|
||||
TITLE:=Philips PCA9541 I2C mux/switches
|
||||
DEPENDS:=+kmod-i2c-mux
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-mux-pca9541/description
|
||||
Kernel modules for PCA9541 I2C bus mux/switching devices
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-mux-pca9541))
|
||||
|
||||
I2C_MUX_PCA954x_MODULES:= \
|
||||
CONFIG_I2C_MUX_PCA954x:drivers/i2c/muxes/i2c-mux-pca954x
|
||||
|
||||
define KernelPackage/i2c-mux-pca954x
|
||||
$(call i2c_defaults,$(I2C_MUX_PCA954x_MODULES),51)
|
||||
TITLE:=Philips PCA954x I2C mux/switches
|
||||
DEPENDS:=+kmod-i2c-mux
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-mux-pca954x/description
|
||||
Kernel modules for PCA954x I2C bus mux/switching devices
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-mux-pca954x))
|
||||
|
||||
|
||||
I2C_PIIX4_MODULES:= \
|
||||
CONFIG_I2C_PIIX4:drivers/i2c/busses/i2c-piix4
|
||||
|
||||
define KernelPackage/i2c-piix4
|
||||
$(call i2c_defaults,$(I2C_PIIX4_MODULES),59)
|
||||
TITLE:=Intel PIIX4 and compatible I2C interfaces
|
||||
DEPENDS:=@PCI_SUPPORT @TARGET_x86 +kmod-i2c-core
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-piix4/description
|
||||
Support for the Intel PIIX4 family of mainboard I2C interfaces,
|
||||
specifically Intel PIIX4, Intel 440MX, ATI IXP200, ATI IXP300,
|
||||
ATI IXP400, ATI SB600, ATI SB700/SP5100, ATI SB800, AMD Hudson-2,
|
||||
AMD ML, AMD CZ, Serverworks OSB4, Serverworks CSB5,
|
||||
Serverworks CSB6, Serverworks HT-1000, Serverworks HT-1100 and
|
||||
SMSC Victory66.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-piix4))
|
||||
|
||||
|
||||
I2C_PXA_MODULES:= \
|
||||
CONFIG_I2C_PXA:drivers/i2c/busses/i2c-pxa
|
||||
|
||||
define KernelPackage/i2c-pxa
|
||||
$(call i2c_defaults,$(I2C_PXA_MODULES),50)
|
||||
TITLE:=Intel PXA I2C bus driver
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-pxa/description
|
||||
Kernel module for Intel PXA2XX I2C adapter
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-pxa))
|
||||
|
||||
|
||||
I2C_SMBUS_MODULES:= \
|
||||
CONFIG_I2C_SMBUS:drivers/i2c/i2c-smbus
|
||||
|
||||
define KernelPackage/i2c-smbus
|
||||
$(call i2c_defaults,$(I2C_SMBUS_MODULES),58)
|
||||
TITLE:=SMBus-specific protocols helper
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-smbus/description
|
||||
Support for the SMBus extensions to the I2C specification.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-smbus))
|
||||
|
||||
|
||||
|
||||
I2C_TINY_USB_MODULES:= \
|
||||
CONFIG_I2C_TINY_USB:drivers/i2c/busses/i2c-tiny-usb
|
||||
|
||||
define KernelPackage/i2c-tiny-usb
|
||||
$(call i2c_defaults,$(I2C_TINY_USB_MODULES),59)
|
||||
TITLE:=I2C Tiny USB adaptor
|
||||
DEPENDS:=@USB_SUPPORT +kmod-i2c-core +kmod-usb-core
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-tiny-usb/description
|
||||
Kernel module for the I2C Tiny USB adaptor developed
|
||||
by Till Harbaum (http://www.harbaum.org/till/i2c_tiny_usb)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-tiny-usb))
|
||||
|
||||
|
561
root/package/kernel/linux/modules/iio.mk
Executable file
561
root/package/kernel/linux/modules/iio.mk
Executable file
|
@ -0,0 +1,561 @@
|
|||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
IIO_MENU:=Industrial I/O Modules
|
||||
|
||||
|
||||
define KernelPackage/iio-core
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=Industrial IO core
|
||||
KCONFIG:= \
|
||||
CONFIG_IIO \
|
||||
CONFIG_IIO_BUFFER=y \
|
||||
CONFIG_IIO_TRIGGER=y
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/industrialio.ko
|
||||
AUTOLOAD:=$(call AutoLoad,55,industrialio)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-core/description
|
||||
The industrial I/O subsystem provides a unified framework for
|
||||
drivers for many different types of embedded sensors using a
|
||||
number of different physical interfaces (i2c, spi, etc)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-core))
|
||||
|
||||
|
||||
define KernelPackage/iio-kfifo-buf
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=Industrial I/O buffering based on kfifo
|
||||
DEPENDS:=+kmod-iio-core
|
||||
KCONFIG:=CONFIG_IIO_KFIFO_BUF
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/buffer/kfifo_buf.ko
|
||||
AUTOLOAD:=$(call AutoLoad,55,kfifo_buf)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-kfifo-buf/description
|
||||
A simple fifo based on kfifo. Note that this currently provides no buffer
|
||||
events so it is up to userspace to work out how often to read from the buffer.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-kfifo-buf))
|
||||
|
||||
|
||||
define KernelPackage/industrialio-triggered-buffer
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=Provides helper functions for setting up triggered buffers.
|
||||
DEPENDS:=+kmod-iio-core +kmod-iio-kfifo-buf
|
||||
KCONFIG:=CONFIG_IIO_TRIGGERED_BUFFER
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/buffer/industrialio-triggered-buffer.ko
|
||||
AUTOLOAD:=$(call AutoLoad,55,industrialio-triggered-buffer)
|
||||
endef
|
||||
|
||||
define KernelPackage/industrialio-triggered-buffer/description
|
||||
Provides helper functions for setting up triggered buffers.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,industrialio-triggered-buffer))
|
||||
|
||||
|
||||
define KernelPackage/iio-ad799x
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-industrialio-triggered-buffer
|
||||
TITLE:=Analog Devices AD799x ADC driver
|
||||
KCONFIG:= \
|
||||
CONFIG_AD799X_RING_BUFFER=y \
|
||||
CONFIG_AD799X
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/adc/ad799x.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,ad799x)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-ad799x/description
|
||||
support for Analog Devices:
|
||||
ad7991, ad7995, ad7999, ad7992, ad7993, ad7994, ad7997, ad7998
|
||||
i2c analog to digital converters (ADC).
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-ad799x))
|
||||
|
||||
define KernelPackage/iio-ads1015
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-regmap-i2c +kmod-industrialio-triggered-buffer
|
||||
TITLE:=Texas Instruments ADS1015 ADC driver
|
||||
KCONFIG:= CONFIG_TI_ADS1015
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/adc/ti-ads1015.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,ti-ads1015)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-ads1015/description
|
||||
This driver adds support for Texas Instruments ADS1015 and ADS1115 ADCs.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-ads1015))
|
||||
|
||||
define KernelPackage/iio-hmc5843
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-regmap-i2c +kmod-industrialio-triggered-buffer
|
||||
TITLE:=Honeywell HMC58x3 Magnetometer
|
||||
KCONFIG:= CONFIG_SENSORS_HMC5843_I2C
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/iio/magnetometer/hmc5843_i2c.ko \
|
||||
$(LINUX_DIR)/drivers/iio/magnetometer/hmc5843_core.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,hmc5843)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-hmc5843/description
|
||||
Honeywell HMC5843/5883/5883L 3-Axis Magnetometer
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-hmc5843))
|
||||
|
||||
define KernelPackage/iio-bh1750
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
DEPENDS:=+kmod-i2c-core +kmod-iio-core
|
||||
TITLE:=ROHM BH1750 ambient light sensor
|
||||
KCONFIG:= CONFIG_BH1750
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/light/bh1750.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,bh1750)
|
||||
endef
|
||||
define KernelPackage/iio-bh1750/description
|
||||
ROHM BH1750 ambient light sensor (i2c bus)
|
||||
endef
|
||||
$(eval $(call KernelPackage,iio-bh1750))
|
||||
|
||||
define KernelPackage/iio-am2315
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-industrialio-triggered-buffer
|
||||
TITLE:=Asong AM2315 humidity/temperature sensor
|
||||
KCONFIG:= CONFIG_AM2315
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/humidity/am2315.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,am2315)
|
||||
endef
|
||||
define KernelPackage/iio-am2315/description
|
||||
Aosong AM2315 humidity/temperature sensor (I2C bus)
|
||||
endef
|
||||
$(eval $(call KernelPackage,iio-am2315))
|
||||
|
||||
define KernelPackage/iio-mxs-lradc
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
DEPENDS:=@TARGET_mxs +kmod-iio-core +kmod-industrialio-triggered-buffer
|
||||
TITLE:=Freescale i.MX23/i.MX28 LRADC ADC driver
|
||||
KCONFIG:= \
|
||||
CONFIG_MXS_LRADC_ADC
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/adc/mxs-lradc-adc.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,mxs-lradc-adc)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-mxs-lradc/description
|
||||
Support for Freescale's i.MX23/i.MX28 SoC internal Low-Resolution ADC
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-mxs-lradc))
|
||||
|
||||
define KernelPackage/iio-dht11
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
DEPENDS:=+kmod-iio-core @GPIO_SUPPORT @USES_DEVICETREE
|
||||
TITLE:=DHT11 (and compatible) humidity and temperature sensors
|
||||
KCONFIG:= \
|
||||
CONFIG_DHT11
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/humidity/dht11.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,dht11)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-dht11/description
|
||||
support for DHT11 and DHT22 digitial humidity and temperature sensors
|
||||
attached at GPIO lines. You will need a custom device tree file to
|
||||
specify the GPIO line to use.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-dht11))
|
||||
|
||||
|
||||
define KernelPackage/iio-bme680
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=BME680 gas/humidity/pressure/temperature sensor
|
||||
DEPENDS:=+kmod-iio-core +kmod-regmap-core
|
||||
KCONFIG:=CONFIG_BME680
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/chemical/bme680_core.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-bme680/description
|
||||
This driver adds support for Bosch Sensortec BME680 sensor with gas,
|
||||
humidity, pressure and temperatue sensing capability.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-bme680))
|
||||
|
||||
define KernelPackage/iio-bme680-i2c
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=BME680 gas/humidity/pressure/temperature sensor (I2C)
|
||||
DEPENDS:=+kmod-iio-bme680 +kmod-regmap-i2c
|
||||
KCONFIG:=CONFIG_BME680_I2C
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/chemical/bme680_i2c.ko
|
||||
AUTOLOAD:=$(call AutoProbe,bme680-i2c)
|
||||
endef
|
||||
define KernelPackage/iio-bme680-i2c/description
|
||||
This driver adds support for Bosch Sensortec's BME680 connected via I2C.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-bme680-i2c))
|
||||
|
||||
define KernelPackage/iio-bme680-spi
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=BME680 gas/humidity/pressure/temperature sensor (SPI)
|
||||
DEPENDS:=+kmod-iio-bme680 +kmod-regmap-spi
|
||||
KCONFIG:=CONFIG_BME680_SPI
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/chemical/bme680_spi.ko
|
||||
AUTOLOAD:=$(call AutoProbe,bme680-spi)
|
||||
endef
|
||||
define KernelPackage/iio-bme680-spi/description
|
||||
This driver adds support for Bosch Sensortec's BME680 connected via SPI.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-bme680-spi))
|
||||
|
||||
|
||||
define KernelPackage/iio-bmp280
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=BMP180/BMP280/BME280 pressure/temperatur sensor
|
||||
DEPENDS:=+kmod-iio-core +kmod-regmap-core
|
||||
KCONFIG:=CONFIG_BMP280
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/pressure/bmp280.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-bmp280/description
|
||||
This driver adds support for Bosch Sensortec BMP180 and BMP280 pressure and
|
||||
temperature sensors. Also supports the BME280 with an additional humidity
|
||||
sensor channel.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-bmp280))
|
||||
|
||||
|
||||
define KernelPackage/iio-bmp280-i2c
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=BMP180/BMP280/BME280 pressure/temperatur sensor (I2C)
|
||||
DEPENDS:=+kmod-iio-bmp280 +kmod-i2c-core +kmod-regmap-i2c
|
||||
KCONFIG:=CONFIG_BMP280_I2C
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/pressure/bmp280-i2c.ko
|
||||
AUTOLOAD:=$(call AutoProbe,bmp280-i2c)
|
||||
endef
|
||||
define KernelPackage/iio-bmp280-i2c/description
|
||||
This driver adds support for Bosch Sensortec's digital pressure and
|
||||
temperature sensor connected via I2C.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-bmp280-i2c))
|
||||
|
||||
|
||||
define KernelPackage/iio-bmp280-spi
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=BMP180/BMP280/BME280 pressure/temperatur sensor (SPI)
|
||||
DEPENDS:=+kmod-iio-bmp280 +kmod-spi-bitbang
|
||||
KCONFIG:=CONFIG_BMP280_SPI
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/pressure/bmp280-spi.ko
|
||||
AUTOLOAD:=$(call AutoProbe,bmp280-spi)
|
||||
endef
|
||||
define KernelPackage/iio-bmp280-spi/description
|
||||
This driver adds support for Bosch Sensortec's digital pressure and
|
||||
temperature sensor connected via SPI.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-bmp280-spi))
|
||||
|
||||
define KernelPackage/iio-htu21
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
DEPENDS:=+kmod-i2c-core +kmod-iio-core
|
||||
TITLE:=HTU21 humidity & temperature sensor
|
||||
KCONFIG:= \
|
||||
CONFIG_HTU21 \
|
||||
CONFIG_IIO_MS_SENSORS_I2C
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/iio/humidity/htu21.ko \
|
||||
$(LINUX_DIR)/drivers/iio/common/ms_sensors/ms_sensors_i2c.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,htu21)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-htu21/description
|
||||
support for the Measurement Specialties HTU21 humidity and
|
||||
temperature sensor.
|
||||
This driver is also used for MS8607 temperature, pressure & humidity
|
||||
sensor
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-htu21))
|
||||
|
||||
|
||||
define KernelPackage/iio-ccs811
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-industrialio-triggered-buffer
|
||||
TITLE:=AMS CCS811 VOC sensor
|
||||
KCONFIG:= \
|
||||
CONFIG_CCS811
|
||||
FILES:= $(LINUX_DIR)/drivers/iio/chemical/ccs811.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,ccs811)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-ccs811/description
|
||||
Support for the AMS CCS811 VOC (Volatile Organic Compounds) sensor
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-ccs811))
|
||||
|
||||
|
||||
define KernelPackage/iio-si7020
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
DEPENDS:=+kmod-i2c-core +kmod-iio-core
|
||||
TITLE:=Silicon Labs Si7020 sensor
|
||||
KCONFIG:= CONFIG_SI7020
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/humidity/si7020.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,si7020)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-si7020/description
|
||||
Support for Silicon Labs Si7020 family of relative humidity and
|
||||
temperature sensors connected via I2C. Following models are usable:
|
||||
Si7013, Si7020, Si7021, Hoperf TH06.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-si7020))
|
||||
|
||||
|
||||
define KernelPackage/iio-st_accel
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=STMicroelectronics accelerometer 3-Axis Driver
|
||||
DEPENDS:=+kmod-iio-core +kmod-regmap-core +kmod-industrialio-triggered-buffer
|
||||
KCONFIG:= \
|
||||
CONFIG_IIO_ST_ACCEL_3AXIS \
|
||||
CONFIG_IIO_ST_SENSORS_CORE
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/iio/accel/st_accel.ko \
|
||||
$(LINUX_DIR)/drivers/iio/common/st_sensors/st_sensors.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-st_accel/description
|
||||
This package adds support for STMicroelectronics accelerometers:
|
||||
LSM303DLH, LSM303DLHC, LIS3DH, LSM330D, LSM330DL, LSM330DLC,
|
||||
LIS331DLH, LSM303DL, LSM303DLM, LSM330, LIS2DH12, H3LIS331DL,
|
||||
LNG2DM, LIS3DE, LIS2DE12
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-st_accel))
|
||||
|
||||
|
||||
define KernelPackage/iio-st_accel-i2c
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=STMicroelectronics accelerometer 3-Axis Driver (I2C)
|
||||
DEPENDS:=+kmod-iio-st_accel +kmod-i2c-core +kmod-regmap-i2c
|
||||
KCONFIG:= CONFIG_IIO_ST_ACCEL_I2C_3AXIS
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/iio/accel/st_accel_i2c.ko \
|
||||
$(LINUX_DIR)/drivers/iio/common/st_sensors/st_sensors_i2c.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,st_accel_i2c)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-st_accel-i2c/description
|
||||
This package adds support for STMicroelectronics I2C based accelerometers
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-st_accel-i2c))
|
||||
|
||||
|
||||
define KernelPackage/iio-st_accel-spi
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=STMicroelectronics accelerometer 3-Axis Driver (SPI)
|
||||
DEPENDS:=+kmod-iio-st_accel +kmod-regmap-spi
|
||||
KCONFIG:= CONFIG_IIO_ST_ACCEL_SPI_3AXIS
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/iio/accel/st_accel_spi.ko \
|
||||
$(LINUX_DIR)/drivers/iio/common/st_sensors/st_sensors_spi.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,st_accel_spi)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-st_accel-spi/description
|
||||
This package adds support for STMicroelectronics SPI based accelerometers
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-st_accel-spi))
|
||||
|
||||
|
||||
define KernelPackage/iio-lsm6dsx
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
DEPENDS:=+kmod-iio-core +kmod-iio-kfifo-buf +kmod-regmap-core
|
||||
TITLE:=ST LSM6DSx driver for IMU MEMS sensors
|
||||
KCONFIG:=CONFIG_IIO_ST_LSM6DSX
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.ko
|
||||
AUTOLOAD:=$(call AutoProbe,st_lsm6dsx)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-lsm6dsx/description
|
||||
Support for the ST LSM6DSx and related IMU MEMS sensors.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-lsm6dsx))
|
||||
|
||||
|
||||
define KernelPackage/iio-lsm6dsx-i2c
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
DEPENDS:=+kmod-iio-lsm6dsx +kmod-i2c-core +kmod-regmap-i2c
|
||||
TITLE:=ST LSM6DSx driver for IMU MEMS sensors (I2C)
|
||||
KCONFIG:=CONFIG_IIO_ST_LSM6DSX
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.ko
|
||||
AUTOLOAD:=$(call AutoProbe,st_lsm6dsx-i2c)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-lsm6dsx-i2c/description
|
||||
Support for the ST LSM6DSx and related IMU MEMS I2C sensors.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-lsm6dsx-i2c))
|
||||
|
||||
|
||||
define KernelPackage/iio-lsm6dsx-spi
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
DEPENDS:=+kmod-iio-lsm6dsx +kmod-regmap-spi
|
||||
TITLE:=ST LSM6DSx driver for IMU MEMS sensors (SPI)
|
||||
KCONFIG:=CONFIG_IIO_ST_LSM6DSX
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.ko
|
||||
AUTOLOAD:=$(call AutoProbe,st_lsm6dsx-spi)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-lsm6dsx-spi/description
|
||||
Support for the ST LSM6DSx and related IMU MEMS SPI sensors.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-lsm6dsx-spi))
|
||||
|
||||
|
||||
define KernelPackage/iio-sps30
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-industrialio-triggered-buffer +kmod-lib-crc8
|
||||
TITLE:=Sensirion SPS30 particulate matter sensor
|
||||
KCONFIG:=CONFIG_SPS30
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/chemical/sps30.ko
|
||||
AUTOLOAD:=$(call AutoProbe,sps30)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-sps30/description
|
||||
Support for the Sensirion SPS30 particulate matter sensor.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-sps30))
|
||||
|
||||
|
||||
define KernelPackage/iio-tsl4531
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
DEPENDS:=+kmod-i2c-core +kmod-iio-core
|
||||
TITLE:=TAOS TSL4531 ambient light sensor
|
||||
KCONFIG:= CONFIG_TSL4531
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/light/tsl4531.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,tsl4531)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-tsl4531/description
|
||||
Support for TAOS TSL4531x family of ambient light sensors
|
||||
connected via I2C. Following models are usable:
|
||||
TSL45311, TSL45313, TSL45315, TSL45317.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-tsl4531))
|
||||
|
||||
|
||||
define KernelPackage/iio-fxas21002c
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=Freescale FXAS21002C 3-axis gyro driver
|
||||
DEPENDS:=+kmod-iio-core +kmod-regmap-core +kmod-industrialio-triggered-buffer
|
||||
KCONFIG:= CONFIG_FXAS21002C
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/gyro/fxas21002c_core.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,fxas21002c)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-fxas21002c/description
|
||||
Support for Freescale FXAS21002C 3-axis gyro.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-fxas21002c))
|
||||
|
||||
|
||||
define KernelPackage/iio-fxas21002c-i2c
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=Freescale FXAS21002C 3-axis gyro driver (I2C)
|
||||
DEPENDS:=+kmod-iio-fxas21002c +kmod-i2c-core +kmod-regmap-i2c
|
||||
KCONFIG:= CONFIG_FXAS21002C_I2C
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/gyro/fxas21002c_i2c.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,fxas21002c_i2c)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-fxas21002c-i2c/description
|
||||
Support for Freescale FXAS21002C 3-axis gyro
|
||||
connected via I2C.
|
||||
endef
|
||||
|
||||
|
||||
$(eval $(call KernelPackage,iio-fxas21002c-i2c))
|
||||
|
||||
define KernelPackage/iio-fxas21002c-spi
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
DEPENDS:=+kmod-iio-fxas21002c +kmod-regmap-spi
|
||||
TITLE:=Freescale FXAS21002C 3-axis gyro driver (SPI)
|
||||
KCONFIG:= CONFIG_FXAS21002C_SPI
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/gyro/fxas21002c_spi.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,fxas21002c_spi)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-fxas21002c-spi/description
|
||||
Support for Freescale FXAS21002C 3-axis gyro
|
||||
connected via SPI.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-fxas21002c-spi))
|
||||
|
||||
|
||||
define KernelPackage/iio-fxos8700
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=Freescale FXOS8700 3-axis accelerometer driver
|
||||
DEPENDS:=+kmod-iio-core +kmod-regmap-core
|
||||
KCONFIG:= CONFIG_FXOS8700
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/imu/fxos8700_core.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,fxos8700)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-fxos8700/description
|
||||
Support for Freescale FXOS8700 3-axis accelerometer.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-fxos8700))
|
||||
|
||||
|
||||
define KernelPackage/iio-fxos8700-i2c
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
TITLE:=Freescale FXOS8700 3-axis acceleromter driver (I2C)
|
||||
DEPENDS:=+kmod-iio-fxos8700 +kmod-i2c-core +kmod-regmap-i2c
|
||||
KCONFIG:= CONFIG_FXOS8700_I2C
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/imu/fxos8700_i2c.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,fxos8700_i2c)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-fxos8700-i2c/description
|
||||
Support for Freescale FXOS8700 3-axis accelerometer
|
||||
connected via I2C.
|
||||
endef
|
||||
|
||||
|
||||
$(eval $(call KernelPackage,iio-fxos8700-i2c))
|
||||
|
||||
define KernelPackage/iio-fxos8700-spi
|
||||
SUBMENU:=$(IIO_MENU)
|
||||
DEPENDS:=+kmod-iio-fxos8700 +kmod-regmap-spi
|
||||
TITLE:=Freescale FXOS8700 3-axis accelerometer driver (SPI)
|
||||
KCONFIG:= CONFIG_FXOS8700_SPI
|
||||
FILES:=$(LINUX_DIR)/drivers/iio/imu/fxos8700_spi.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,fxos8700_spi)
|
||||
endef
|
||||
|
||||
define KernelPackage/iio-fxos8700-spi/description
|
||||
Support for Freescale FXOS8700 3-axis accelerometer
|
||||
connected via SPI.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iio-fxos8700-spi))
|
|
@ -179,10 +179,10 @@ define KernelPackage/input-touchscreen-ads7846
|
|||
DEPENDS:=+kmod-hwmon-core +kmod-input-core +kmod-spi-bitbang
|
||||
KCONFIG:= \
|
||||
CONFIG_INPUT_TOUCHSCREEN=y \
|
||||
CONFIG_TOUCHSCREEN_PROPERTIES=y \
|
||||
CONFIG_TOUCHSCREEN_PROPERTIES=y@lt5.13 \
|
||||
CONFIG_TOUCHSCREEN_ADS7846
|
||||
FILES:=$(LINUX_DIR)/drivers/input/touchscreen/ads7846.ko \
|
||||
$(LINUX_DIR)/drivers/input/touchscreen/of_touchscreen.ko@lt5.14
|
||||
$(LINUX_DIR)/drivers/input/touchscreen/of_touchscreen.ko@lt5.13
|
||||
AUTOLOAD:=$(call AutoProbe,ads7846)
|
||||
endef
|
||||
|
||||
|
@ -196,7 +196,7 @@ $(eval $(call KernelPackage,input-touchscreen-ads7846))
|
|||
define KernelPackage/keyboard-imx
|
||||
SUBMENU:=$(INPUT_MODULES_MENU)
|
||||
TITLE:=IMX keypad support
|
||||
DEPENDS:=@(TARGET_mxs||TARGET_imx6) +kmod-input-matrixkmap
|
||||
DEPENDS:=@(TARGET_mxs||TARGET_imx) +kmod-input-matrixkmap
|
||||
KCONFIG:= \
|
||||
CONFIG_KEYBOARD_IMX \
|
||||
CONFIG_INPUT_KEYBOARD=y
|
||||
|
|
212
root/package/kernel/linux/modules/leds.mk
Executable file
212
root/package/kernel/linux/modules/leds.mk
Executable file
|
@ -0,0 +1,212 @@
|
|||
#
|
||||
# Copyright (C) 2006-2011 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
LEDS_MENU:=LED modules
|
||||
|
||||
define KernelPackage/leds-gpio
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=GPIO LED support
|
||||
DEPENDS:= @GPIO_SUPPORT
|
||||
KCONFIG:=CONFIG_LEDS_GPIO
|
||||
FILES:=$(LINUX_DIR)/drivers/leds/leds-gpio.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,leds-gpio,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/leds-gpio/description
|
||||
Kernel module for LEDs on GPIO lines
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,leds-gpio))
|
||||
|
||||
LED_TRIGGER_DIR=$(LINUX_DIR)/drivers/leds/trigger
|
||||
|
||||
define KernelPackage/ledtrig-activity
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=LED Activity Trigger
|
||||
KCONFIG:=CONFIG_LEDS_TRIGGER_ACTIVITY
|
||||
FILES:=$(LED_TRIGGER_DIR)/ledtrig-activity.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,ledtrig-activity)
|
||||
endef
|
||||
|
||||
define KernelPackage/ledtrig-activity/description
|
||||
Kernel module that allows LEDs to blink based on system load
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ledtrig-activity))
|
||||
|
||||
define KernelPackage/ledtrig-audio
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=LED Audio Mute Trigger
|
||||
KCONFIG:=CONFIG_LEDS_TRIGGER_AUDIO
|
||||
FILES:=$(LED_TRIGGER_DIR)/ledtrig-audio.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,ledtrig-audio)
|
||||
endef
|
||||
|
||||
define KernelPackage/ledtrig-audio/description
|
||||
Kernel module that allows LEDs to be controlled by audio drivers
|
||||
to follow audio mute and mic-mute changes.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ledtrig-audio))
|
||||
|
||||
define KernelPackage/ledtrig-gpio
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=LED GPIO Trigger
|
||||
KCONFIG:=CONFIG_LEDS_TRIGGER_GPIO
|
||||
FILES:=$(LED_TRIGGER_DIR)/ledtrig-gpio.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,ledtrig-gpio)
|
||||
endef
|
||||
|
||||
define KernelPackage/ledtrig-gpio/description
|
||||
Kernel module that allows LEDs to be controlled by gpio events
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ledtrig-gpio))
|
||||
|
||||
|
||||
define KernelPackage/ledtrig-transient
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=LED Transient Trigger
|
||||
KCONFIG:=CONFIG_LEDS_TRIGGER_TRANSIENT
|
||||
FILES:=$(LED_TRIGGER_DIR)/ledtrig-transient.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,ledtrig-transient,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/ledtrig-transient/description
|
||||
Kernel module that allows LEDs one time activation of a transient state.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ledtrig-transient))
|
||||
|
||||
|
||||
define KernelPackage/ledtrig-oneshot
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=LED One-Shot Trigger
|
||||
KCONFIG:=CONFIG_LEDS_TRIGGER_ONESHOT
|
||||
FILES:=$(LED_TRIGGER_DIR)/ledtrig-oneshot.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,ledtrig-oneshot)
|
||||
endef
|
||||
|
||||
define KernelPackage/ledtrig-oneshot/description
|
||||
Kernel module that allows LEDs to be triggered by sporadic events in
|
||||
one-shot pulses
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ledtrig-oneshot))
|
||||
|
||||
|
||||
define KernelPackage/ledtrig-pattern
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=LED Pattern Trigger
|
||||
KCONFIG:=CONFIG_LEDS_TRIGGER_PATTERN
|
||||
FILES:=$(LED_TRIGGER_DIR)/ledtrig-pattern.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,ledtrig-pattern)
|
||||
endef
|
||||
|
||||
define KernelPackage/ledtrig-pattern/description
|
||||
This allows LEDs to be controlled by a software or hardware pattern
|
||||
which is a series of tuples, of brightness and duration (ms).
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ledtrig-pattern))
|
||||
|
||||
|
||||
define KernelPackage/leds-apu
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=PC Engines APU1 LED support
|
||||
DEPENDS:= @GPIO_SUPPORT @TARGET_x86
|
||||
KCONFIG:=CONFIG_LEDS_APU
|
||||
FILES:=$(LINUX_DIR)/drivers/leds/leds-apu.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,leds-apu,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/leds-apu/description
|
||||
Driver for the PC Engines APU1 LEDs.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,leds-apu))
|
||||
|
||||
|
||||
define KernelPackage/leds-pca963x
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=PCA963x LED support
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_LEDS_PCA963X
|
||||
FILES:=$(LINUX_DIR)/drivers/leds/leds-pca963x.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,leds-pca963x,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/leds-pca963x/description
|
||||
Driver for the NXP PCA963x I2C LED controllers.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,leds-pca963x))
|
||||
|
||||
|
||||
define KernelPackage/leds-pwm
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=PWM driven LED Support
|
||||
KCONFIG:=CONFIG_LEDS_PWM
|
||||
DEPENDS:= @PWM_SUPPORT
|
||||
FILES:=$(LINUX_DIR)/drivers/leds/leds-pwm.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,leds-pwm,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/leds-pwm/description
|
||||
This option enables support for pwm driven LEDs
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,leds-pwm))
|
||||
|
||||
|
||||
define KernelPackage/leds-tlc591xx
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=LED driver for TLC59108 and TLC59116 controllers
|
||||
DEPENDS:=+kmod-i2c-core +kmod-regmap-i2c
|
||||
KCONFIG:=CONFIG_LEDS_TLC591XX
|
||||
FILES:=$(LINUX_DIR)/drivers/leds/leds-tlc591xx.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,leds-tlc591xx,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/leds-tlc591xx/description
|
||||
This option enables support for Texas Instruments TLC59108
|
||||
and TLC59116 LED controllers.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,leds-tlc591xx))
|
||||
|
||||
|
||||
define KernelPackage/leds-uleds
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=Userspace LEDs
|
||||
KCONFIG:=CONFIG_LEDS_USER
|
||||
FILES:=$(LINUX_DIR)/drivers/leds/uleds.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,uleds,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/leds-uleds/description
|
||||
This option enables support for userspace LEDs.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,leds-uleds))
|
||||
|
||||
|
||||
define KernelPackage/input-leds
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=Input device LED support
|
||||
DEPENDS:=+kmod-input-core
|
||||
KCONFIG:=CONFIG_INPUT_LEDS
|
||||
FILES:=$(LINUX_DIR)/drivers/input/input-leds.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,input-leds,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/input-leds/description
|
||||
Provides support for LEDs on input devices- for example,
|
||||
keyboard num/caps/scroll lock.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,input-leds))
|
294
root/package/kernel/linux/modules/lib.mk
Executable file
294
root/package/kernel/linux/modules/lib.mk
Executable file
|
@ -0,0 +1,294 @@
|
|||
#
|
||||
# Copyright (C) 2011 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
LIB_MENU:=Libraries
|
||||
|
||||
define KernelPackage/lib-crc-ccitt
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=CRC-CCITT support
|
||||
KCONFIG:=CONFIG_CRC_CCITT
|
||||
FILES:=$(LINUX_DIR)/lib/crc-ccitt.ko
|
||||
AUTOLOAD:=$(call AutoProbe,crc-ccitt)
|
||||
endef
|
||||
|
||||
define KernelPackage/lib-crc-ccitt/description
|
||||
Kernel module for CRC-CCITT support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,lib-crc-ccitt))
|
||||
|
||||
|
||||
define KernelPackage/lib-crc-itu-t
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=CRC ITU-T V.41 support
|
||||
KCONFIG:=CONFIG_CRC_ITU_T
|
||||
FILES:=$(LINUX_DIR)/lib/crc-itu-t.ko
|
||||
AUTOLOAD:=$(call AutoProbe,crc-itu-t)
|
||||
endef
|
||||
|
||||
define KernelPackage/lib-crc-itu-t/description
|
||||
Kernel module for CRC ITU-T V.41 support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,lib-crc-itu-t))
|
||||
|
||||
|
||||
define KernelPackage/lib-crc7
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=CRC7 support
|
||||
KCONFIG:=CONFIG_CRC7
|
||||
FILES:=$(LINUX_DIR)/lib/crc7.ko
|
||||
AUTOLOAD:=$(call AutoProbe,crc7)
|
||||
endef
|
||||
|
||||
define KernelPackage/lib-crc7/description
|
||||
Kernel module for CRC7 support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,lib-crc7))
|
||||
|
||||
|
||||
define KernelPackage/lib-crc8
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=CRC8 support
|
||||
KCONFIG:=CONFIG_CRC8
|
||||
FILES:=$(LINUX_DIR)/lib/crc8.ko
|
||||
AUTOLOAD:=$(call AutoProbe,crc8)
|
||||
endef
|
||||
|
||||
define KernelPackage/lib-crc8/description
|
||||
Kernel module for CRC8 support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,lib-crc8))
|
||||
|
||||
|
||||
define KernelPackage/lib-crc16
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=CRC16 support
|
||||
KCONFIG:=CONFIG_CRC16
|
||||
FILES:=$(LINUX_DIR)/lib/crc16.ko
|
||||
AUTOLOAD:=$(call AutoLoad,20,crc16,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/lib-crc16/description
|
||||
Kernel module for CRC16 support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,lib-crc16))
|
||||
|
||||
|
||||
define KernelPackage/lib-crc32c
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=CRC32 support
|
||||
KCONFIG:=CONFIG_LIBCRC32C
|
||||
DEPENDS:=+kmod-crypto-crc32c
|
||||
FILES:=$(LINUX_DIR)/lib/libcrc32c.ko
|
||||
AUTOLOAD:=$(call AutoProbe,libcrc32c)
|
||||
endef
|
||||
|
||||
define KernelPackage/lib-crc32c/description
|
||||
Kernel module for CRC32 support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,lib-crc32c))
|
||||
|
||||
|
||||
define KernelPackage/lib-lzo
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=LZO support
|
||||
DEPENDS:=+kmod-crypto-acompress
|
||||
KCONFIG:= \
|
||||
CONFIG_CRYPTO_LZO \
|
||||
CONFIG_LZO_COMPRESS \
|
||||
CONFIG_LZO_DECOMPRESS
|
||||
HIDDEN:=1
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/crypto/lzo.ko \
|
||||
$(LINUX_DIR)/lib/lzo/lzo_compress.ko \
|
||||
$(LINUX_DIR)/lib/lzo/lzo_decompress.ko
|
||||
AUTOLOAD:=$(call AutoProbe,lzo lzo_compress lzo_decompress)
|
||||
endef
|
||||
|
||||
define KernelPackage/lib-lzo/description
|
||||
Kernel module for LZO compression/decompression support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,lib-lzo))
|
||||
|
||||
|
||||
define KernelPackage/lib-zstd
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=ZSTD support
|
||||
DEPENDS:=+kmod-crypto-acompress
|
||||
KCONFIG:= \
|
||||
CONFIG_CRYPTO_ZSTD \
|
||||
CONFIG_ZSTD_COMPRESS \
|
||||
CONFIG_ZSTD_DECOMPRESS \
|
||||
CONFIG_XXHASH
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/crypto/zstd.ko \
|
||||
$(LINUX_DIR)/lib/xxhash.ko \
|
||||
$(LINUX_DIR)/lib/zstd/zstd_compress.ko \
|
||||
$(LINUX_DIR)/lib/zstd/zstd_decompress.ko
|
||||
AUTOLOAD:=$(call AutoProbe,xxhash zstd zstd_compress zstd_decompress)
|
||||
endef
|
||||
|
||||
define KernelPackage/lib-zstd/description
|
||||
Kernel module for ZSTD compression/decompression support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,lib-zstd))
|
||||
|
||||
|
||||
define KernelPackage/lib-lz4
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=LZ4 support
|
||||
DEPENDS:=+kmod-crypto-acompress
|
||||
KCONFIG:= \
|
||||
CONFIG_CRYPTO_LZ4 \
|
||||
CONFIG_LZ4_COMPRESS \
|
||||
CONFIG_LZ4_DECOMPRESS
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/crypto/lz4.ko \
|
||||
$(LINUX_DIR)/lib/lz4/lz4_compress.ko \
|
||||
$(LINUX_DIR)/lib/lz4/lz4_decompress.ko
|
||||
AUTOLOAD:=$(call AutoProbe,lz4 lz4_compress lz4_decompress)
|
||||
endef
|
||||
|
||||
define KernelPackage/lib-lz4/description
|
||||
Kernel module for LZ4 compression/decompression support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,lib-lz4))
|
||||
|
||||
|
||||
define KernelPackage/lib-raid6
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=RAID6 algorithm support
|
||||
HIDDEN:=1
|
||||
KCONFIG:=CONFIG_RAID6_PQ
|
||||
FILES:=$(LINUX_DIR)/lib/raid6/raid6_pq.ko
|
||||
AUTOLOAD:=$(call AutoProbe,raid6_pq)
|
||||
endef
|
||||
|
||||
define KernelPackage/lib-raid6/description
|
||||
Kernel module for RAID6 algorithms
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,lib-raid6))
|
||||
|
||||
|
||||
define KernelPackage/lib-xor
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=XOR blocks algorithm support
|
||||
HIDDEN:=1
|
||||
KCONFIG:=CONFIG_XOR_BLOCKS
|
||||
ifneq ($(wildcard $(LINUX_DIR)/arch/$(LINUX_KARCH)/lib/xor-neon.ko),)
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/crypto/xor.ko \
|
||||
$(LINUX_DIR)/arch/$(LINUX_KARCH)/lib/xor-neon.ko
|
||||
AUTOLOAD:=$(call AutoProbe,xor-neon xor)
|
||||
else
|
||||
FILES:=$(LINUX_DIR)/crypto/xor.ko
|
||||
AUTOLOAD:=$(call AutoProbe,xor)
|
||||
endif
|
||||
endef
|
||||
|
||||
define KernelPackage/lib-xor/description
|
||||
Kernel module for XOR blocks algorithms
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,lib-xor))
|
||||
|
||||
|
||||
define KernelPackage/lib-textsearch
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=Textsearch support
|
||||
KCONFIG:= \
|
||||
CONFIG_TEXTSEARCH=y \
|
||||
CONFIG_TEXTSEARCH_KMP \
|
||||
CONFIG_TEXTSEARCH_BM \
|
||||
CONFIG_TEXTSEARCH_FSM
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/lib/ts_kmp.ko \
|
||||
$(LINUX_DIR)/lib/ts_bm.ko \
|
||||
$(LINUX_DIR)/lib/ts_fsm.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ts_kmp ts_bm ts_fsm)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,lib-textsearch))
|
||||
|
||||
|
||||
define KernelPackage/lib-zlib-inflate
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=Zlib support
|
||||
HIDDEN:=1
|
||||
KCONFIG:=CONFIG_ZLIB_INFLATE
|
||||
FILES:=$(LINUX_DIR)/lib/zlib_inflate/zlib_inflate.ko
|
||||
AUTOLOAD:=$(call AutoProbe,zlib_inflate)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,lib-zlib-inflate))
|
||||
|
||||
|
||||
define KernelPackage/lib-zlib-deflate
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=Zlib support
|
||||
HIDDEN:=1
|
||||
KCONFIG:=CONFIG_ZLIB_DEFLATE
|
||||
FILES:=$(LINUX_DIR)/lib/zlib_deflate/zlib_deflate.ko
|
||||
AUTOLOAD:=$(call AutoProbe,zlib_deflate)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,lib-zlib-deflate))
|
||||
|
||||
|
||||
define KernelPackage/lib-cordic
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=Cordic function support
|
||||
KCONFIG:=CONFIG_CORDIC
|
||||
FILES:=$(LINUX_DIR)/lib/math/cordic.ko
|
||||
AUTOLOAD:=$(call AutoProbe,cordic)
|
||||
endef
|
||||
|
||||
define KernelPackage/lib-cordic/description
|
||||
Kernel module for Cordic function support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,lib-cordic))
|
||||
|
||||
|
||||
define KernelPackage/asn1-decoder
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=Simple ASN1 decoder
|
||||
KCONFIG:= CONFIG_ASN1
|
||||
HIDDEN:=1
|
||||
FILES:=$(LINUX_DIR)/lib/asn1_decoder.ko
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,asn1-decoder))
|
||||
|
||||
define KernelPackage/asn1-encoder
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=Simple ASN1 encoder
|
||||
KCONFIG:= CONFIG_ASN1_ENCODER@ge5.13
|
||||
HIDDEN:=1
|
||||
FILES:=$(LINUX_DIR)/lib/asn1_encoder.ko
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,asn1-encoder))
|
||||
|
||||
define KernelPackage/oid-registry
|
||||
SUBMENU:=$(LIB_MENU)
|
||||
TITLE:=OID Registry
|
||||
KCONFIG:= CONFIG_OID_REGISTRY
|
||||
HIDDEN:=1
|
||||
FILES:=$(LINUX_DIR)/lib/oid_registry.ko
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,oid-registry))
|
1287
root/package/kernel/linux/modules/netdevices.mk
Executable file
1287
root/package/kernel/linux/modules/netdevices.mk
Executable file
File diff suppressed because it is too large
Load diff
|
@ -150,11 +150,13 @@ define KernelPackage/nf-flow
|
|||
TITLE:=Netfilter flowtable support
|
||||
KCONFIG:= \
|
||||
CONFIG_NETFILTER_INGRESS=y \
|
||||
CONFIG_NF_FLOW_TABLE
|
||||
CONFIG_NF_FLOW_TABLE \
|
||||
CONFIG_NF_FLOW_TABLE_HW
|
||||
DEPENDS:=+kmod-nf-conntrack
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/net/netfilter/nf_flow_table.ko
|
||||
AUTOLOAD:=$(call AutoProbe,nf_flow_table)
|
||||
$(LINUX_DIR)/net/netfilter/nf_flow_table.ko \
|
||||
$(if $(CONFIG_LINUX_5_4),$(LINUX_DIR)/net/netfilter/nf_flow_table_hw.ko)
|
||||
AUTOLOAD:=$(call AutoProbe,nf_flow_table nf_flow_table_hw)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nf-flow))
|
||||
|
@ -1085,7 +1087,7 @@ define KernelPackage/nft-bridge
|
|||
FILES:=$(foreach mod,$(NFT_BRIDGE-m),$(LINUX_DIR)/net/$(mod).ko)
|
||||
AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_BRIDGE-m)))
|
||||
KCONFIG:= \
|
||||
CONFIG_NF_LOG_BRIDGE=n \
|
||||
CONFIG_NF_LOG_BRIDGE=n@lt5.13 \
|
||||
$(KCONFIG_NFT_BRIDGE)
|
||||
endef
|
||||
|
||||
|
|
1353
root/package/kernel/linux/modules/netsupport.mk
Executable file
1353
root/package/kernel/linux/modules/netsupport.mk
Executable file
File diff suppressed because it is too large
Load diff
339
root/package/kernel/linux/modules/nls.mk
Executable file
339
root/package/kernel/linux/modules/nls.mk
Executable file
|
@ -0,0 +1,339 @@
|
|||
#
|
||||
# Copyright (C) 2006-2011 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
define KernelPackage/nls-base
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=Native Language Support
|
||||
KCONFIG:=CONFIG_NLS
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_base.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-base/description
|
||||
Kernel module for NLS (Native Language Support)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-base))
|
||||
|
||||
|
||||
define KernelPackage/nls-cp437
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=Codepage 437 (United States, Canada)
|
||||
KCONFIG:=CONFIG_NLS_CODEPAGE_437
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_cp437.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_cp437)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-cp437/description
|
||||
Kernel module for NLS Codepage 437 (United States, Canada)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-cp437))
|
||||
|
||||
|
||||
define KernelPackage/nls-cp775
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=Codepage 775 (Baltic Rim)
|
||||
KCONFIG:=CONFIG_NLS_CODEPAGE_775
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_cp775.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_cp775)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-cp775/description
|
||||
Kernel module for NLS Codepage 775 (Baltic Rim)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-cp775))
|
||||
|
||||
|
||||
define KernelPackage/nls-cp850
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=Codepage 850 (Europe)
|
||||
KCONFIG:=CONFIG_NLS_CODEPAGE_850
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_cp850.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_cp850)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-cp850/description
|
||||
Kernel module for NLS Codepage 850 (Europe)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-cp850))
|
||||
|
||||
|
||||
define KernelPackage/nls-cp852
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=Codepage 852 (Europe)
|
||||
KCONFIG:=CONFIG_NLS_CODEPAGE_852
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_cp852.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_cp852)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-cp852/description
|
||||
Kernel module for NLS Codepage 852 (Europe)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-cp852))
|
||||
|
||||
|
||||
define KernelPackage/nls-cp862
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=Codepage 862 (Hebrew)
|
||||
KCONFIG:=CONFIG_NLS_CODEPAGE_862
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_cp862.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_cp862)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-cp862/description
|
||||
Kernel module for NLS Codepage 862 (Hebrew)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-cp862))
|
||||
|
||||
|
||||
define KernelPackage/nls-cp864
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=Codepage 864 (Arabic)
|
||||
KCONFIG:=CONFIG_NLS_CODEPAGE_864
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_cp864.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_cp864)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-cp864/description
|
||||
Kernel module for NLS Codepage 864 (Arabic)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-cp864))
|
||||
|
||||
|
||||
define KernelPackage/nls-cp866
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=Codepage 866 (Cyrillic)
|
||||
KCONFIG:=CONFIG_NLS_CODEPAGE_866
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_cp866.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_cp866)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-cp866/description
|
||||
Kernel module for NLS Codepage 866 (Cyrillic)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-cp866))
|
||||
|
||||
|
||||
define KernelPackage/nls-cp932
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=Codepage 932 (Japanese)
|
||||
KCONFIG:=CONFIG_NLS_CODEPAGE_932
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_cp932.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_cp932)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-cp932/description
|
||||
Kernel module for NLS Codepage 932 (Japanese)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-cp932))
|
||||
|
||||
|
||||
define KernelPackage/nls-cp936
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=Codepage 936 (Simplified Chinese)
|
||||
KCONFIG:=CONFIG_NLS_CODEPAGE_936
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_cp936.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_cp936)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-cp936/description
|
||||
Kernel module for NLS Codepage 936 (Simplified Chinese)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-cp936))
|
||||
|
||||
|
||||
define KernelPackage/nls-cp950
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=Codepage 950 (Traditional Chinese)
|
||||
KCONFIG:=CONFIG_NLS_CODEPAGE_950
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_cp950.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_cp950)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-cp950/description
|
||||
Kernel module for NLS Codepage 950 (Traditional Chinese)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-cp950))
|
||||
|
||||
|
||||
define KernelPackage/nls-cp1250
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=Codepage 1250 (Eastern Europe)
|
||||
KCONFIG:=CONFIG_NLS_CODEPAGE_1250
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_cp1250.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_cp1250)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-cp1250/description
|
||||
Kernel module for NLS Codepage 1250 (Eastern Europe)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-cp1250))
|
||||
|
||||
|
||||
define KernelPackage/nls-cp1251
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=Codepage 1251 (Russian)
|
||||
KCONFIG:=CONFIG_NLS_CODEPAGE_1251
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_cp1251.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_cp1251)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-cp1251/description
|
||||
Kernel module for NLS Codepage 1251 (Russian)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-cp1251))
|
||||
|
||||
|
||||
define KernelPackage/nls-iso8859-1
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=ISO 8859-1 (Latin 1; Western European Languages)
|
||||
KCONFIG:=CONFIG_NLS_ISO8859_1
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_iso8859-1.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_iso8859-1)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-iso8859-1/description
|
||||
Kernel module for NLS ISO 8859-1 (Latin 1)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-iso8859-1))
|
||||
|
||||
|
||||
define KernelPackage/nls-iso8859-2
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=ISO 8859-2 (Latin 2; Central European Languages)
|
||||
KCONFIG:=CONFIG_NLS_ISO8859_2
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_iso8859-2.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_iso8859-2)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-iso8859-2/description
|
||||
Kernel module for NLS ISO 8859-2 (Latin 2)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-iso8859-2))
|
||||
|
||||
|
||||
define KernelPackage/nls-iso8859-6
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=ISO 8859-6 (Arabic)
|
||||
KCONFIG:=CONFIG_NLS_ISO8859_6
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_iso8859-6.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_iso8859-6)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-iso8859-6/description
|
||||
Kernel module for NLS ISO 8859-6 (Arabic)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-iso8859-6))
|
||||
|
||||
|
||||
define KernelPackage/nls-iso8859-8
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=ISO 8859-8, CP1255 (Hebrew)
|
||||
KCONFIG:=CONFIG_NLS_ISO8859_8
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_cp1255.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_cp1255)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-iso8859-8/description
|
||||
Kernel module for Hebrew charsets (ISO-8859-8, CP1255)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-iso8859-8))
|
||||
|
||||
|
||||
define KernelPackage/nls-iso8859-13
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=ISO 8859-13 (Latin 7; Baltic)
|
||||
KCONFIG:=CONFIG_NLS_ISO8859_13
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_iso8859-13.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_iso8859-13)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-iso8859-13/description
|
||||
Kernel module for NLS ISO 8859-13 (Latin 7; Baltic)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-iso8859-13))
|
||||
|
||||
|
||||
define KernelPackage/nls-iso8859-15
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=ISO 8859-15 (Latin 9; Western, with Euro symbol)
|
||||
KCONFIG:=CONFIG_NLS_ISO8859_15
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_iso8859-15.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_iso8859-15)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-iso8859-15/description
|
||||
Kernel module for NLS ISO 8859-15 (Latin 9)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-iso8859-15))
|
||||
|
||||
|
||||
define KernelPackage/nls-koi8r
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=KOI8-R (Russian)
|
||||
KCONFIG:=CONFIG_NLS_KOI8_R
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_koi8-r.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_koi8-r)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-koi8r/description
|
||||
Kernel module for NLS KOI8-R (Russian)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-koi8r))
|
||||
|
||||
|
||||
define KernelPackage/nls-utf8
|
||||
SUBMENU:=Native Language Support
|
||||
TITLE:=UTF-8
|
||||
KCONFIG:=CONFIG_NLS_UTF8
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_utf8.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,nls_utf8)
|
||||
$(call AddDepends/nls)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-utf8/description
|
||||
Kernel module for NLS UTF-8
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nls-utf8))
|
|
@ -52,8 +52,10 @@ define KernelPackage/bluetooth
|
|||
$(LINUX_DIR)/net/bluetooth/rfcomm/rfcomm.ko \
|
||||
$(LINUX_DIR)/net/bluetooth/bnep/bnep.ko \
|
||||
$(LINUX_DIR)/net/bluetooth/hidp/hidp.ko \
|
||||
$(LINUX_DIR)/drivers/bluetooth/hci_uart.ko
|
||||
AUTOLOAD:=$(call AutoProbe,bluetooth rfcomm bnep hidp hci_uart)
|
||||
$(LINUX_DIR)/drivers/bluetooth/hci_uart.ko \
|
||||
$(LINUX_DIR)/drivers/bluetooth/btusb.ko \
|
||||
$(LINUX_DIR)/drivers/bluetooth/btintel.ko
|
||||
AUTOLOAD:=$(call AutoProbe,bluetooth rfcomm bnep hidp hci_uart btusb)
|
||||
endef
|
||||
|
||||
define KernelPackage/bluetooth/description
|
||||
|
@ -126,7 +128,7 @@ define KernelPackage/dma-buf
|
|||
KCONFIG:=CONFIG_DMA_SHARED_BUFFER
|
||||
ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
|
||||
ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
|
||||
FILES:=$(LINUX_DIR)/drivers/dma-buf/dma-shared-buffer.ko@lt5.14
|
||||
FILES:=$(LINUX_DIR)/drivers/dma-buf/dma-shared-buffer.ko
|
||||
endif
|
||||
endif
|
||||
AUTOLOAD:=$(call AutoLoad,20,dma-shared-buffer)
|
||||
|
@ -180,22 +182,6 @@ endef
|
|||
$(eval $(call KernelPackage,eeprom-at25))
|
||||
|
||||
|
||||
define KernelPackage/gpio-dev
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Generic GPIO char device support
|
||||
DEPENDS:=@GPIO_SUPPORT
|
||||
KCONFIG:=CONFIG_GPIO_DEVICE
|
||||
FILES:=$(LINUX_DIR)/drivers/char/gpio_dev.ko
|
||||
AUTOLOAD:=$(call AutoLoad,40,gpio_dev)
|
||||
endef
|
||||
|
||||
define KernelPackage/gpio-dev/description
|
||||
Kernel module to allows control of GPIO pins using a character device.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,gpio-dev))
|
||||
|
||||
|
||||
define KernelPackage/gpio-f7188x
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Fintek F718xx/F818xx GPIO Support
|
||||
|
@ -912,7 +898,6 @@ $(eval $(call KernelPackage,ikconfig))
|
|||
define KernelPackage/zram
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=ZRAM
|
||||
DEPENDS:=+kmod-lib-lzo
|
||||
KCONFIG:= \
|
||||
CONFIG_ZSMALLOC \
|
||||
CONFIG_ZRAM \
|
||||
|
@ -929,8 +914,31 @@ define KernelPackage/zram/description
|
|||
Compressed RAM block device support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,zram))
|
||||
define KernelPackage/zram/config
|
||||
choice
|
||||
prompt "ZRAM Default compressor"
|
||||
default ZRAM_DEF_COMP_LZORLE
|
||||
|
||||
config ZRAM_DEF_COMP_LZORLE
|
||||
bool "lzo-rle"
|
||||
select PACKAGE_kmod-lib-lzo
|
||||
|
||||
config ZRAM_DEF_COMP_LZO
|
||||
bool "lzo"
|
||||
select PACKAGE_kmod-lib-lzo
|
||||
|
||||
config ZRAM_DEF_COMP_LZ4
|
||||
bool "lz4"
|
||||
select PACKAGE_kmod-lib-lz4
|
||||
|
||||
config ZRAM_DEF_COMP_ZSTD
|
||||
bool "zstd"
|
||||
select PACKAGE_kmod-lib-zstd
|
||||
|
||||
endchoice
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,zram))
|
||||
|
||||
define KernelPackage/pps
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
|
@ -1006,7 +1014,7 @@ $(eval $(call KernelPackage,ptp))
|
|||
define KernelPackage/ptp-qoriq
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Freescale QorIQ PTP support
|
||||
DEPENDS:=@TARGET_mpc85xx +kmod-ptp
|
||||
DEPENDS:=@(TARGET_mpc85xx||TARGET_qoriq) +kmod-ptp
|
||||
KCONFIG:=CONFIG_PTP_1588_CLOCK_QORIQ
|
||||
FILES:=$(LINUX_DIR)/drivers/ptp/ptp-qoriq.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ptp-qoriq)
|
||||
|
@ -1143,7 +1151,8 @@ $(eval $(call KernelPackage,keys-trusted))
|
|||
define KernelPackage/tpm
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=TPM Hardware Support
|
||||
DEPENDS:= +kmod-random-core
|
||||
DEPENDS:= +kmod-random-core +(LINUX_5_15):kmod-asn1-decoder \
|
||||
+(LINUX_5_15):kmod-asn1-encoder +(LINUX_5_15):kmod-oid-registry
|
||||
KCONFIG:= CONFIG_TCG_TPM
|
||||
FILES:= $(LINUX_DIR)/drivers/char/tpm/tpm.ko
|
||||
AUTOLOAD:=$(call AutoLoad,10,tpm,1)
|
||||
|
@ -1270,3 +1279,36 @@ define KernelPackage/f71808e-wdt/description
|
|||
endef
|
||||
|
||||
$(eval $(call KernelPackage,f71808e-wdt))
|
||||
|
||||
|
||||
define KernelPackage/qcom-qmi-helpers
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Qualcomm QMI Helpers
|
||||
KCONFIG:=CONFIG_QCOM_QMI_HELPERS
|
||||
FILES:=$(LINUX_DIR)/drivers/soc/qcom/qmi_helpers.ko
|
||||
AUTOLOAD:=$(call AutoProbe,qmi_helpers)
|
||||
endef
|
||||
|
||||
define KernelPackage/qcom-qmi-helpers/description
|
||||
Qualcomm QMI Helpers
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,qcom-qmi-helpers))
|
||||
|
||||
define KernelPackage/mhi
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Modem Host Interface (MHI) bus
|
||||
DEPENDS:=@LINUX_5_15
|
||||
KCONFIG:=CONFIG_MHI_BUS \
|
||||
CONFIG_MHI_BUS_DEBUG=y \
|
||||
CONFIG_MHI_BUS_PCI_GENERIC=n \
|
||||
CONFIG_MHI_NET=n
|
||||
FILES:=$(LINUX_DIR)/drivers/bus/mhi/core/mhi.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mhi)
|
||||
endef
|
||||
|
||||
define KernelPackage/mhi/description
|
||||
Bus driver for MHI protocol.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,mhi))
|
||||
|
|
113
root/package/kernel/linux/modules/pcmcia.mk
Executable file
113
root/package/kernel/linux/modules/pcmcia.mk
Executable file
|
@ -0,0 +1,113 @@
|
|||
#
|
||||
# Copyright (C) 2006-2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
PCMCIA_MENU:=PCMCIA support
|
||||
|
||||
define KernelPackage/pcmcia-core
|
||||
SUBMENU:=$(PCMCIA_MENU)
|
||||
TITLE:=PCMCIA/CardBus support
|
||||
DEPENDS:=@PCMCIA_SUPPORT
|
||||
KCONFIG:= \
|
||||
CONFIG_PCMCIA \
|
||||
CONFIG_PCMCIA_LOAD_CIS=y \
|
||||
CONFIG_CARDBUS \
|
||||
CONFIG_PCCARD \
|
||||
PCMCIA_DEBUG=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/pcmcia/pcmcia_core.ko \
|
||||
$(LINUX_DIR)/drivers/pcmcia/pcmcia.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,pcmcia_core pcmcia)
|
||||
endef
|
||||
|
||||
define KernelPackage/pcmcia-core/description
|
||||
Kernel support for PCMCIA/CardBus controllers
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,pcmcia-core))
|
||||
|
||||
|
||||
define AddDepends/pcmcia
|
||||
SUBMENU:=$(PCMCIA_MENU)
|
||||
DEPENDS+=kmod-pcmcia-core $(1)
|
||||
endef
|
||||
|
||||
|
||||
define KernelPackage/pcmcia-rsrc
|
||||
TITLE:=PCMCIA resource support
|
||||
KCONFIG:=CONFIG_PCCARD_NONSTATIC=y
|
||||
FILES:=$(LINUX_DIR)/drivers/pcmcia/pcmcia_rsrc.ko
|
||||
AUTOLOAD:=$(call AutoLoad,26,pcmcia_rsrc)
|
||||
$(call AddDepends/pcmcia)
|
||||
endef
|
||||
|
||||
define KernelPackage/pcmcia-rsrc/description
|
||||
Kernel support for PCMCIA resource allocation
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,pcmcia-rsrc))
|
||||
|
||||
|
||||
define KernelPackage/pcmcia-yenta
|
||||
TITLE:=yenta socket driver
|
||||
KCONFIG:=CONFIG_YENTA
|
||||
FILES:=$(LINUX_DIR)/drivers/pcmcia/yenta_socket.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,yenta_socket)
|
||||
DEPENDS:=+kmod-pcmcia-rsrc
|
||||
$(call AddDepends/pcmcia)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,pcmcia-yenta))
|
||||
|
||||
|
||||
define KernelPackage/pcmcia-serial
|
||||
TITLE:=Serial devices support
|
||||
KCONFIG:= \
|
||||
CONFIG_PCMCIA_SERIAL_CS \
|
||||
CONFIG_SERIAL_8250_CS
|
||||
FILES:=$(LINUX_DIR)/drivers/tty/serial/8250/serial_cs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,45,serial_cs)
|
||||
DEPENDS:=+kmod-serial-8250
|
||||
$(call AddDepends/pcmcia)
|
||||
endef
|
||||
|
||||
define KernelPackage/pcmcia-serial/description
|
||||
Kernel support for PCMCIA/CardBus serial devices
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,pcmcia-serial))
|
||||
|
||||
|
||||
define KernelPackage/pcmcia-pd6729
|
||||
TITLE:=Cirrus PD6729 compatible bridge support
|
||||
KCONFIG:=CONFIG_PD6729
|
||||
FILES:=$(LINUX_DIR)/drivers/pcmcia/pd6729.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,pd6729)
|
||||
DEPENDS:=+kmod-pcmcia-rsrc
|
||||
$(call AddDepends/pcmcia)
|
||||
endef
|
||||
|
||||
define KernelPackage/pcmcia-pd6729/description
|
||||
Kernel support for the Cirrus PD6729 PCI-to-PCMCIA bridge
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,pcmcia-pd6729))
|
||||
|
||||
|
||||
define KernelPackage/pcmcia-nozomi
|
||||
TITLE:=Option Fusion+ card
|
||||
KCONFIG:=CONFIG_NOZOMI
|
||||
FILES:=$(LINUX_DIR)/drivers/tty/nozomi.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,nozomi)
|
||||
DEPENDS:=+kmod-pcmcia-rsrc
|
||||
$(call AddDepends/pcmcia)
|
||||
endef
|
||||
|
||||
define KernelPackage/pcmcia-nozomi/description
|
||||
Kernel support for Option Fusion+ card
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,pcmcia-nozomi))
|
|
@ -30,7 +30,7 @@ SOUNDCORE_FILES ?= \
|
|||
$(LINUX_DIR)/sound/core/snd-pcm.ko \
|
||||
$(LINUX_DIR)/sound/core/oss/snd-mixer-oss.ko \
|
||||
$(LINUX_DIR)/sound/core/oss/snd-pcm-oss.ko \
|
||||
$(LINUX_DIR)/sound/core/snd-compress.ko@lt5.14
|
||||
$(LINUX_DIR)/sound/core/snd-compress.ko
|
||||
|
||||
SOUNDCORE_LOAD += \
|
||||
$(if $(CONFIG_SND_DMAENGINE_PCM),snd-pcm-dmaengine)
|
||||
|
@ -225,12 +225,12 @@ define KernelPackage/sound-soc-imx
|
|||
$(LINUX_DIR)/sound/soc/fsl/snd-soc-fsl-ssi.ko \
|
||||
$(LINUX_DIR)/sound/soc/fsl/imx-pcm-dma.ko
|
||||
AUTOLOAD:=$(call AutoLoad,56,snd-soc-imx-audmux snd-soc-fsl-ssi snd-soc-imx-pcm)
|
||||
DEPENDS:=@TARGET_imx6 +kmod-sound-soc-core
|
||||
DEPENDS:=@TARGET_imx +kmod-sound-soc-core
|
||||
$(call AddDepends/sound)
|
||||
endef
|
||||
|
||||
define KernelPackage/sound-soc-imx/description
|
||||
Support for i.MX6 Platform sound (ssi/audmux/pcm)
|
||||
Support for i.MX Platform sound (ssi/audmux/pcm)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,sound-soc-imx))
|
||||
|
@ -243,12 +243,12 @@ define KernelPackage/sound-soc-imx-sgtl5000
|
|||
$(LINUX_DIR)/sound/soc/codecs/snd-soc-sgtl5000.ko \
|
||||
$(LINUX_DIR)/sound/soc/fsl/snd-soc-imx-sgtl5000.ko
|
||||
AUTOLOAD:=$(call AutoLoad,57,snd-soc-sgtl5000 snd-soc-imx-sgtl5000)
|
||||
DEPENDS:=@TARGET_imx6 +kmod-sound-soc-imx
|
||||
DEPENDS:=@TARGET_imx +kmod-sound-soc-imx +kmod-regmap-i2c
|
||||
$(call AddDepends/sound)
|
||||
endef
|
||||
|
||||
define KernelPackage/sound-soc-imx-sgtl5000/description
|
||||
Support for i.MX6 Platform sound SGTL5000 codec
|
||||
Support for i.MX Platform sound SGTL5000 codec
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,sound-soc-imx-sgtl5000))
|
||||
|
|
75
root/package/kernel/linux/modules/spi.mk
Executable file
75
root/package/kernel/linux/modules/spi.mk
Executable file
|
@ -0,0 +1,75 @@
|
|||
#
|
||||
# Copyright (C) 2006-2011 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
SPI_MENU:=SPI Support
|
||||
|
||||
define KernelPackage/mmc-spi
|
||||
SUBMENU:=$(SPI_MENU)
|
||||
TITLE:=MMC/SD over SPI Support
|
||||
DEPENDS:=+kmod-mmc +kmod-lib-crc-itu-t +kmod-lib-crc7
|
||||
KCONFIG:=CONFIG_MMC_SPI \
|
||||
CONFIG_SPI=y \
|
||||
CONFIG_SPI_MASTER=y
|
||||
FILES:=\
|
||||
$(if $(CONFIG_OF),$(LINUX_DIR)/drivers/mmc/host/of_mmc_spi.ko) \
|
||||
$(LINUX_DIR)/drivers/mmc/host/mmc_spi.ko
|
||||
AUTOLOAD:=$(call AutoProbe,$(if $(CONFIG_OF),of_mmc_spi) mmc_spi)
|
||||
endef
|
||||
|
||||
define KernelPackage/mmc-spi/description
|
||||
Kernel support for MMC/SD over SPI
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,mmc-spi))
|
||||
|
||||
|
||||
define KernelPackage/spi-bitbang
|
||||
SUBMENU:=$(SPI_MENU)
|
||||
TITLE:=Serial Peripheral Interface bitbanging library
|
||||
KCONFIG:=CONFIG_SPI_BITBANG \
|
||||
CONFIG_SPI=y \
|
||||
CONFIG_SPI_MASTER=y
|
||||
FILES:=$(LINUX_DIR)/drivers/spi/spi-bitbang.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/spi-bitbang/description
|
||||
This package contains the SPI bitbanging library
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,spi-bitbang))
|
||||
|
||||
|
||||
define KernelPackage/spi-gpio
|
||||
SUBMENU:=$(SPI_MENU)
|
||||
TITLE:=GPIO-based bitbanging SPI Master
|
||||
DEPENDS:=@GPIO_SUPPORT +kmod-spi-bitbang
|
||||
KCONFIG:=CONFIG_SPI_GPIO
|
||||
FILES:=$(LINUX_DIR)/drivers/spi/spi-gpio.ko
|
||||
AUTOLOAD:=$(call AutoProbe,spi-gpio)
|
||||
endef
|
||||
|
||||
define KernelPackage/spi-gpio/description
|
||||
This package contains the GPIO-based bitbanging SPI Master
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,spi-gpio))
|
||||
|
||||
define KernelPackage/spi-dev
|
||||
SUBMENU:=$(SPI_MENU)
|
||||
TITLE:=User mode SPI device driver
|
||||
KCONFIG:=CONFIG_SPI_SPIDEV \
|
||||
CONFIG_SPI=y \
|
||||
CONFIG_SPI_MASTER=y
|
||||
FILES:=$(LINUX_DIR)/drivers/spi/spidev.ko
|
||||
AUTOLOAD:=$(call AutoProbe,spidev)
|
||||
endef
|
||||
|
||||
define KernelPackage/spi-dev/description
|
||||
This package contains the user mode SPI device driver
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,spi-dev))
|
1816
root/package/kernel/linux/modules/usb.mk
Executable file
1816
root/package/kernel/linux/modules/usb.mk
Executable file
File diff suppressed because it is too large
Load diff
1046
root/package/kernel/linux/modules/video.mk
Executable file
1046
root/package/kernel/linux/modules/video.mk
Executable file
File diff suppressed because it is too large
Load diff
74
root/package/kernel/linux/modules/virt.mk
Executable file
74
root/package/kernel/linux/modules/virt.mk
Executable file
|
@ -0,0 +1,74 @@
|
|||
#
|
||||
# Copyright (C) 2016 Yousong Zhou <yszhou4tech@gmail.com>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
define KernelPackage/irqbypass
|
||||
SUBMENU:=Virtualization
|
||||
TITLE:=IRQ offload/bypass manager
|
||||
KCONFIG:=CONFIG_IRQ_BYPASS_MANAGER
|
||||
HIDDEN:=1
|
||||
FILES:= $(LINUX_DIR)/virt/lib/irqbypass.ko
|
||||
AUTOLOAD:=$(call AutoProbe,irqbypass.ko)
|
||||
endef
|
||||
$(eval $(call KernelPackage,irqbypass))
|
||||
|
||||
|
||||
define KernelPackage/kvm-x86
|
||||
SUBMENU:=Virtualization
|
||||
TITLE:=Kernel-based Virtual Machine (KVM) support
|
||||
DEPENDS:=@TARGET_x86_generic||TARGET_x86_64 +kmod-irqbypass
|
||||
KCONFIG:=\
|
||||
CONFIG_KVM \
|
||||
CONFIG_KVM_MMU_AUDIT=n \
|
||||
CONFIG_VIRTUALIZATION=y
|
||||
FILES:= $(LINUX_DIR)/arch/$(LINUX_KARCH)/kvm/kvm.ko
|
||||
AUTOLOAD:=$(call AutoProbe,kvm.ko)
|
||||
endef
|
||||
|
||||
define KernelPackage/kvm-x86/description
|
||||
Support hosting fully virtualized guest machines using hardware
|
||||
virtualization extensions. You will need a fairly recent
|
||||
processor equipped with virtualization extensions. You will also
|
||||
need to select one or more of the processor modules.
|
||||
|
||||
This module provides access to the hardware capabilities through
|
||||
a character device node named /dev/kvm.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,kvm-x86))
|
||||
|
||||
|
||||
define KernelPackage/kvm-intel
|
||||
SUBMENU:=Virtualization
|
||||
TITLE:=KVM for Intel processors support
|
||||
DEPENDS:=+kmod-kvm-x86
|
||||
KCONFIG:=CONFIG_KVM_INTEL
|
||||
FILES:= $(LINUX_DIR)/arch/$(LINUX_KARCH)/kvm/kvm-intel.ko
|
||||
AUTOLOAD:=$(call AutoProbe,kvm-intel.ko)
|
||||
endef
|
||||
|
||||
define KernelPackage/kvm-intel/description
|
||||
Provides support for KVM on Intel processors equipped with the VT
|
||||
extensions.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,kvm-intel))
|
||||
|
||||
|
||||
define KernelPackage/kvm-amd
|
||||
SUBMENU:=Virtualization
|
||||
TITLE:=KVM for AMD processors support
|
||||
DEPENDS:=+kmod-kvm-x86
|
||||
KCONFIG:=CONFIG_KVM_AMD
|
||||
FILES:= $(LINUX_DIR)/arch/$(LINUX_KARCH)/kvm/kvm-amd.ko
|
||||
AUTOLOAD:=$(call AutoProbe,kvm-amd.ko)
|
||||
endef
|
||||
|
||||
define KernelPackage/kvm-amd/description
|
||||
Provides support for KVM on AMD processors equipped with the AMD-V
|
||||
(SVM) extensions.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,kvm-amd))
|
193
root/package/kernel/linux/modules/w1.mk
Executable file
193
root/package/kernel/linux/modules/w1.mk
Executable file
|
@ -0,0 +1,193 @@
|
|||
#
|
||||
# Copyright (C) 2008-2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
W1_MENU:=W1 support
|
||||
W1_MASTERS_DIR:=$(LINUX_DIR)/drivers/w1/masters
|
||||
W1_SLAVES_DIR:=$(LINUX_DIR)/drivers/w1/slaves
|
||||
|
||||
define KernelPackage/w1
|
||||
SUBMENU:=$(W1_MENU)
|
||||
TITLE:=Dallas's 1-wire support
|
||||
KCONFIG:=CONFIG_W1
|
||||
FILES:=$(LINUX_DIR)/drivers/w1/wire.ko
|
||||
DEPENDS:=+kmod-hwmon-core
|
||||
endef
|
||||
|
||||
define KernelPackage/w1/description
|
||||
Kernel module for Dallas's 1-wire support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,w1))
|
||||
|
||||
|
||||
define AddDepends/w1
|
||||
SUBMENU:=$(W1_MENU)
|
||||
DEPENDS+=kmod-w1 $(1)
|
||||
endef
|
||||
|
||||
|
||||
#
|
||||
# 1-wire masters
|
||||
#
|
||||
define KernelPackage/w1-master-gpio
|
||||
TITLE:=GPIO 1-wire bus master driver
|
||||
DEPENDS:=@GPIO_SUPPORT
|
||||
KCONFIG:=CONFIG_W1_MASTER_GPIO
|
||||
FILES:=$(W1_MASTERS_DIR)/w1-gpio.ko
|
||||
AUTOLOAD:=$(call AutoProbe,w1-gpio)
|
||||
$(call AddDepends/w1)
|
||||
endef
|
||||
|
||||
define KernelPackage/w1-master-gpio/description
|
||||
Kernel module for the GPIO 1-wire bus master driver
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,w1-master-gpio))
|
||||
|
||||
define KernelPackage/w1-master-ds2482
|
||||
TITLE:=DS2482 1-wire i2c bus master driver
|
||||
KCONFIG:=CONFIG_W1_MASTER_DS2482
|
||||
FILES:=$(W1_MASTERS_DIR)/ds2482.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ds2482)
|
||||
$(call AddDepends/w1,+kmod-i2c-core)
|
||||
endef
|
||||
|
||||
define KernelPackage/w1-master-ds2482/description
|
||||
Kernel module for the DS2482 i2c 1-wire bus master driver
|
||||
NOTE: Init with: echo ds2482 0x18 > /sys/bus/i2c/devices/i2c-0/new_device
|
||||
or use owfs
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,w1-master-ds2482))
|
||||
|
||||
|
||||
define KernelPackage/w1-master-ds2490
|
||||
TITLE:=DS2490 1-wire usb bus master driver
|
||||
DEPENDS:=@USB_SUPPORT +kmod-usb-core
|
||||
KCONFIG:=CONFIG_W1_MASTER_DS2490
|
||||
FILES:=$(W1_MASTERS_DIR)/ds2490.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ds2490)
|
||||
$(call AddDepends/w1)
|
||||
endef
|
||||
|
||||
define KernelPackage/w1-master-ds2490/description
|
||||
Kernel module for the DS2490 usb 1-wire bus master driver
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,w1-master-ds2490))
|
||||
|
||||
|
||||
define KernelPackage/w1-master-mxc
|
||||
TITLE:=Freescale MXC 1-wire busmaster
|
||||
DEPENDS:=@TARGET_imx
|
||||
KCONFIG:=CONFIG_W1_MASTER_MXC
|
||||
FILES:=$(W1_MASTERS_DIR)/mxc_w1.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mxc_w1)
|
||||
$(call AddDepends/w1)
|
||||
endef
|
||||
|
||||
define KernelPackage/w1-master-mxc/description
|
||||
Kernel module for 1-wire Freescale MXC 1-wire busmaster
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,w1-master-mxc))
|
||||
|
||||
|
||||
#
|
||||
# 1-wire slaves
|
||||
#
|
||||
define KernelPackage/w1-slave-therm
|
||||
TITLE:=Thermal family implementation
|
||||
KCONFIG:=CONFIG_W1_SLAVE_THERM
|
||||
FILES:=$(W1_SLAVES_DIR)/w1_therm.ko
|
||||
AUTOLOAD:=$(call AutoProbe,w1_therm)
|
||||
$(call AddDepends/w1)
|
||||
endef
|
||||
|
||||
define KernelPackage/w1-slave-therm/description
|
||||
Kernel module for 1-wire thermal sensors
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,w1-slave-therm))
|
||||
|
||||
|
||||
define KernelPackage/w1-slave-smem
|
||||
TITLE:=Simple 64bit memory family implementation
|
||||
KCONFIG:=CONFIG_W1_SLAVE_SMEM
|
||||
FILES:=$(W1_SLAVES_DIR)/w1_smem.ko
|
||||
AUTOLOAD:=$(call AutoProbe,w1_smem)
|
||||
$(call AddDepends/w1)
|
||||
endef
|
||||
|
||||
define KernelPackage/w1-slave-smem/description
|
||||
Kernel module for 1-wire simple 64bit memory rom(ds2401/ds2411/ds1990*)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,w1-slave-smem))
|
||||
|
||||
define KernelPackage/w1-slave-ds2431
|
||||
TITLE:=DS2431 1kb EEPROM driver
|
||||
KCONFIG:= CONFIG_W1_SLAVE_DS2431
|
||||
FILES:=$(W1_SLAVES_DIR)/w1_ds2431.ko
|
||||
AUTOLOAD:=$(call AutoProbe,w1_ds2431)
|
||||
$(call AddDepends/w1)
|
||||
endef
|
||||
|
||||
define KernelPackage/w1-slave-ds2431/description
|
||||
Kernel module for 1-wire 1kb EEPROM (DS2431)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,w1-slave-ds2431))
|
||||
|
||||
define KernelPackage/w1-slave-ds2433
|
||||
TITLE:=DS2433 4kb EEPROM driver
|
||||
KCONFIG:= \
|
||||
CONFIG_W1_SLAVE_DS2433 \
|
||||
CONFIG_W1_SLAVE_DS2433_CRC=n
|
||||
FILES:=$(W1_SLAVES_DIR)/w1_ds2433.ko
|
||||
AUTOLOAD:=$(call AutoProbe,w1_ds2433)
|
||||
$(call AddDepends/w1)
|
||||
endef
|
||||
|
||||
define KernelPackage/w1-slave-ds2433/description
|
||||
Kernel module for 1-wire 4kb EEPROM (DS2433)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,w1-slave-ds2433))
|
||||
|
||||
|
||||
define KernelPackage/w1-slave-ds2760
|
||||
TITLE:=Dallas 2760 battery monitor chip (HP iPAQ & others)
|
||||
KCONFIG:= \
|
||||
CONFIG_W1_SLAVE_DS2760 \
|
||||
CONFIG_W1_SLAVE_DS2433_CRC=n
|
||||
FILES:=$(W1_SLAVES_DIR)/w1_ds2760.ko
|
||||
AUTOLOAD:=$(call AutoProbe,w1_ds2760)
|
||||
$(call AddDepends/w1)
|
||||
endef
|
||||
|
||||
define KernelPackage/w1-slave-ds2760/description
|
||||
Kernel module for 1-wire DS2760 battery monitor chip support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,w1-slave-ds2760))
|
||||
|
||||
|
||||
define KernelPackage/w1-slave-ds2413
|
||||
TITLE:=DS2413 2 Ch. Addressable Switch
|
||||
KCONFIG:= \
|
||||
CONFIG_W1_SLAVE_DS2413
|
||||
FILES:=$(W1_SLAVES_DIR)/w1_ds2413.ko
|
||||
AUTOLOAD:=$(call AutoProbe,w1_ds2413)
|
||||
$(call AddDepends/w1)
|
||||
endef
|
||||
|
||||
define KernelPackage/w1-slave-ds2413/description
|
||||
Kernel module for 1-wire DS2413 Dual Channel Addressable Switch support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,w1-slave-ds2413))
|
42
root/package/kernel/linux/modules/wireless.mk
Executable file
42
root/package/kernel/linux/modules/wireless.mk
Executable file
|
@ -0,0 +1,42 @@
|
|||
#
|
||||
# Copyright (C) 2006-2008 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
WIRELESS_MENU:=Wireless Drivers
|
||||
|
||||
define KernelPackage/net-prism54
|
||||
SUBMENU:=$(WIRELESS_MENU)
|
||||
TITLE:=Intersil Prism54 support
|
||||
DEPENDS:=@PCI_SUPPORT +@DRIVER_WEXT_SUPPORT +prism54-firmware
|
||||
KCONFIG:=CONFIG_PRISM54
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/net/wireless/intersil/prism54/prism54.ko
|
||||
AUTOLOAD:=$(call AutoProbe,prism54)
|
||||
endef
|
||||
|
||||
define KernelPackage/net-prism54/description
|
||||
Kernel modules for Intersil Prism54 support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,net-prism54))
|
||||
|
||||
|
||||
define KernelPackage/net-rtl8192su
|
||||
SUBMENU:=$(WIRELESS_MENU)
|
||||
TITLE:=RTL8192SU support (staging)
|
||||
DEPENDS:=@USB_SUPPORT +@DRIVER_WEXT_SUPPORT +kmod-usb-core +rtl8192su-firmware
|
||||
KCONFIG:=\
|
||||
CONFIG_STAGING=y \
|
||||
CONFIG_R8712U
|
||||
FILES:=$(LINUX_DIR)/drivers/staging/rtl8712/r8712u.ko
|
||||
AUTOLOAD:=$(call AutoProbe,r8712u)
|
||||
endef
|
||||
|
||||
define KernelPackage/net-rtl8192su/description
|
||||
Kernel modules for RealTek RTL8712 and RTL81XXSU fullmac support.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,net-rtl8192su))
|
152
root/package/kernel/linux/modules/wpan.mk
Executable file
152
root/package/kernel/linux/modules/wpan.mk
Executable file
|
@ -0,0 +1,152 @@
|
|||
#
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
|
||||
WPAN_MENU:=WPAN 802.15.4 Support
|
||||
|
||||
define KernelPackage/ieee802154
|
||||
SUBMENU:=$(WPAN_MENU)
|
||||
TITLE:=IEEE-802.15.4 support
|
||||
KCONFIG:= \
|
||||
CONFIG_IEEE802154 \
|
||||
CONFIG_IEEE802154_SOCKET=y \
|
||||
CONFIG_IEEE802154_NL802154_EXPERIMENTAL=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/net/ieee802154/ieee802154.ko \
|
||||
$(LINUX_DIR)/net/ieee802154/ieee802154_socket.ko
|
||||
AUTOLOAD:=$(call AutoLoad,90,ieee802154 ieee802154_socket)
|
||||
endef
|
||||
|
||||
define KernelPackage/ieee802154/description
|
||||
IEEE Std 802.15.4 defines a low data rate, low power and low
|
||||
complexity short range wireless personal area networks. It was
|
||||
designed to organise networks of sensors, switches, etc automation
|
||||
devices. Maximum allowed data rate is 250 kb/s and typical personal
|
||||
operating space around 10m.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ieee802154))
|
||||
|
||||
define KernelPackage/mac802154
|
||||
SUBMENU:=$(WPAN_MENU)
|
||||
TITLE:=MAC-802.15.4 support
|
||||
DEPENDS:=+kmod-ieee802154 +kmod-crypto-aead +kmod-lib-crc-ccitt
|
||||
KCONFIG:= \
|
||||
CONFIG_MAC802154 \
|
||||
CONFIG_IEEE802154_DRIVERS=y
|
||||
FILES:=$(LINUX_DIR)/net/mac802154/mac802154.ko
|
||||
AUTOLOAD:=$(call AutoLoad,91,mac802154)
|
||||
endef
|
||||
|
||||
define KernelPackage/mac802154/description
|
||||
This option enables the hardware independent IEEE 802.15.4
|
||||
networking stack for SoftMAC devices (the ones implementing
|
||||
only PHY level of IEEE 802.15.4 standard).
|
||||
|
||||
Note: this implementation is neither certified, nor feature
|
||||
complete! Compatibility with other implementations hasn't
|
||||
been tested yet!
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,mac802154))
|
||||
|
||||
define KernelPackage/fakelb
|
||||
SUBMENU:=$(WPAN_MENU)
|
||||
TITLE:=Fake LR-WPAN driver
|
||||
DEPENDS:=+kmod-mac802154
|
||||
KCONFIG:=CONFIG_IEEE802154_FAKELB
|
||||
FILES:=$(LINUX_DIR)/drivers/net/ieee802154/fakelb.ko
|
||||
AUTOLOAD:=$(call AutoLoad,92,fakelb)
|
||||
endef
|
||||
|
||||
define KernelPackage/fakelb/description
|
||||
Say Y here to enable the fake driver that can emulate a net
|
||||
of several interconnected radio devices.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fakelb))
|
||||
|
||||
define KernelPackage/atusb
|
||||
SUBMENU:=$(WPAN_MENU)
|
||||
TITLE:=ATUSB transceiver driver
|
||||
DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-mac802154
|
||||
KCONFIG:=CONFIG_IEEE802154_ATUSB
|
||||
FILES:=$(LINUX_DIR)/drivers/net/ieee802154/atusb.ko
|
||||
AUTOLOAD:=$(call AutoProbe,atusb)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,atusb))
|
||||
|
||||
define KernelPackage/at86rf230
|
||||
SUBMENU:=$(WPAN_MENU)
|
||||
TITLE:=AT86RF230 transceiver driver
|
||||
DEPENDS:=+kmod-mac802154 +kmod-regmap-spi
|
||||
KCONFIG:=CONFIG_IEEE802154_AT86RF230 \
|
||||
CONFIG_IEEE802154_AT86RF230_DEBUGFS=n \
|
||||
CONFIG_SPI=y \
|
||||
CONFIG_SPI_MASTER=y
|
||||
FILES:=$(LINUX_DIR)/drivers/net/ieee802154/at86rf230.ko
|
||||
AUTOLOAD:=$(call AutoProbe,at86rf230)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,at86rf230))
|
||||
|
||||
define KernelPackage/mrf24j40
|
||||
SUBMENU:=$(WPAN_MENU)
|
||||
TITLE:=MRF24J40 transceiver driver
|
||||
DEPENDS:=+kmod-mac802154 +kmod-regmap-spi
|
||||
KCONFIG:=CONFIG_IEEE802154_MRF24J40 \
|
||||
CONFIG_SPI=y \
|
||||
CONFIG_SPI_MASTER=y
|
||||
FILES:=$(LINUX_DIR)/drivers/net/ieee802154/mrf24j40.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mrf24j40)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,mrf24j40))
|
||||
|
||||
define KernelPackage/cc2520
|
||||
SUBMENU:=$(WPAN_MENU)
|
||||
TITLE:=CC2520 transceiver driver
|
||||
DEPENDS:=+kmod-mac802154
|
||||
KCONFIG:=CONFIG_IEEE802154_CC2520 \
|
||||
CONFIG_SPI=y \
|
||||
CONFIG_SPI_MASTER=y
|
||||
FILES:=$(LINUX_DIR)/drivers/net/ieee802154/cc2520.ko
|
||||
AUTOLOAD:=$(call AutoProbe,cc2520)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,cc2520))
|
||||
|
||||
|
||||
define KernelPackage/ca8210
|
||||
SUBMENU:=$(WPAN_MENU)
|
||||
TITLE:=CA8210 transceiver driver
|
||||
DEPENDS:=+kmod-mac802154
|
||||
KCONFIG:=CONFIG_IEEE802154_CA8210 \
|
||||
CONFIG_SPI=y \
|
||||
CONFIG_SPI_MASTER=y \
|
||||
CONFIG_IEEE802154_CA8210_DEBUGFS=n
|
||||
FILES:=$(LINUX_DIR)/drivers/net/ieee802154/ca8210.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ca8210)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ca8210))
|
||||
|
||||
|
||||
define KernelPackage/ieee802154-6lowpan
|
||||
SUBMENU:=$(WPAN_MENU)
|
||||
TITLE:= 6LoWPAN support over IEEE-802.15.4
|
||||
DEPENDS:=+kmod-6lowpan +kmod-ieee802154
|
||||
KCONFIG:=CONFIG_IEEE802154_6LOWPAN
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/net/ieee802154/6lowpan/ieee802154_6lowpan.ko
|
||||
AUTOLOAD:=$(call AutoLoad,91,ieee802154_6lowpan)
|
||||
endef
|
||||
|
||||
define KernelPackage/ieee802154-6lowpan/description
|
||||
IPv6 compression over IEEE 802.15.4
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ieee802154-6lowpan))
|
|
@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -524,7 +524,7 @@ KBUILD_LDFLAGS_MODULE :=
|
||||
@@ -523,7 +523,7 @@ KBUILD_LDFLAGS_MODULE :=
|
||||
KBUILD_LDFLAGS :=
|
||||
CLANG_FLAGS :=
|
||||
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
From: Johan Almbladh <johan.almbladh@anyfinetworks.com>
|
||||
Date: Tue, 5 Oct 2021 18:54:02 +0200
|
||||
Subject: [PATCH] MIPS: uasm: Enable muhu opcode for MIPS R6
|
||||
|
||||
Enable the 'muhu' instruction, complementing the existing 'mulu', needed
|
||||
to implement a MIPS32 BPF JIT.
|
||||
|
||||
Also fix a typo in the existing definition of 'dmulu'.
|
||||
|
||||
Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com>
|
||||
|
||||
This patch is a dependency for my 32-bit MIPS eBPF JIT.
|
||||
|
||||
Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
|
||||
---
|
||||
|
||||
--- a/arch/mips/include/asm/uasm.h
|
||||
+++ b/arch/mips/include/asm/uasm.h
|
||||
@@ -145,6 +145,7 @@ Ip_u1(_mtlo);
|
||||
Ip_u3u1u2(_mul);
|
||||
Ip_u1u2(_multu);
|
||||
Ip_u3u1u2(_mulu);
|
||||
+Ip_u3u1u2(_muhu);
|
||||
Ip_u3u1u2(_nor);
|
||||
Ip_u3u1u2(_or);
|
||||
Ip_u2u1u3(_ori);
|
||||
--- a/arch/mips/mm/uasm-mips.c
|
||||
+++ b/arch/mips/mm/uasm-mips.c
|
||||
@@ -90,7 +90,7 @@ static const struct insn insn_table[insn
|
||||
RS | RT | RD},
|
||||
[insn_dmtc0] = {M(cop0_op, dmtc_op, 0, 0, 0, 0), RT | RD | SET},
|
||||
[insn_dmultu] = {M(spec_op, 0, 0, 0, 0, dmultu_op), RS | RT},
|
||||
- [insn_dmulu] = {M(spec_op, 0, 0, 0, dmult_dmul_op, dmultu_op),
|
||||
+ [insn_dmulu] = {M(spec_op, 0, 0, 0, dmultu_dmulu_op, dmultu_op),
|
||||
RS | RT | RD},
|
||||
[insn_drotr] = {M(spec_op, 1, 0, 0, 0, dsrl_op), RT | RD | RE},
|
||||
[insn_drotr32] = {M(spec_op, 1, 0, 0, 0, dsrl32_op), RT | RD | RE},
|
||||
@@ -150,6 +150,8 @@ static const struct insn insn_table[insn
|
||||
[insn_mtlo] = {M(spec_op, 0, 0, 0, 0, mtlo_op), RS},
|
||||
[insn_mulu] = {M(spec_op, 0, 0, 0, multu_mulu_op, multu_op),
|
||||
RS | RT | RD},
|
||||
+ [insn_muhu] = {M(spec_op, 0, 0, 0, multu_muhu_op, multu_op),
|
||||
+ RS | RT | RD},
|
||||
#ifndef CONFIG_CPU_MIPSR6
|
||||
[insn_mul] = {M(spec2_op, 0, 0, 0, 0, mul_op), RS | RT | RD},
|
||||
#else
|
||||
--- a/arch/mips/mm/uasm.c
|
||||
+++ b/arch/mips/mm/uasm.c
|
||||
@@ -59,7 +59,7 @@ enum opcode {
|
||||
insn_lddir, insn_ldpte, insn_ldx, insn_lh, insn_lhu, insn_ll, insn_lld,
|
||||
insn_lui, insn_lw, insn_lwu, insn_lwx, insn_mfc0, insn_mfhc0, insn_mfhi,
|
||||
insn_mflo, insn_modu, insn_movn, insn_movz, insn_mtc0, insn_mthc0,
|
||||
- insn_mthi, insn_mtlo, insn_mul, insn_multu, insn_mulu, insn_nor,
|
||||
+ insn_mthi, insn_mtlo, insn_mul, insn_multu, insn_mulu, insn_muhu, insn_nor,
|
||||
insn_or, insn_ori, insn_pref, insn_rfe, insn_rotr, insn_sb, insn_sc,
|
||||
insn_scd, insn_seleqz, insn_selnez, insn_sd, insn_sh, insn_sll,
|
||||
insn_sllv, insn_slt, insn_slti, insn_sltiu, insn_sltu, insn_sra,
|
||||
@@ -344,6 +344,7 @@ I_u1(_mtlo)
|
||||
I_u3u1u2(_mul)
|
||||
I_u1u2(_multu)
|
||||
I_u3u1u2(_mulu)
|
||||
+I_u3u1u2(_muhu)
|
||||
I_u3u1u2(_nor)
|
||||
I_u3u1u2(_or)
|
||||
I_u2u1u3(_ori)
|
|
@ -0,0 +1,31 @@
|
|||
From: Johan Almbladh <johan.almbladh@anyfinetworks.com>
|
||||
Date: Tue, 5 Oct 2021 18:54:03 +0200
|
||||
Subject: [PATCH] mips: uasm: Add workaround for Loongson-2F nop CPU errata
|
||||
|
||||
This patch implements a workaround for the Loongson-2F nop in generated,
|
||||
code, if the existing option CONFIG_CPU_NOP_WORKAROUND is set. Before,
|
||||
the binutils option -mfix-loongson2f-nop was enabled, but no workaround
|
||||
was done when emitting MIPS code. Now, the nop pseudo instruction is
|
||||
emitted as "or ax,ax,zero" instead of the default "sll zero,zero,0". This
|
||||
is consistent with the workaround implemented by binutils.
|
||||
|
||||
Link: https://sourceware.org/legacy-ml/binutils/2009-11/msg00387.html
|
||||
|
||||
Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
|
||||
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
|
||||
---
|
||||
|
||||
--- a/arch/mips/include/asm/uasm.h
|
||||
+++ b/arch/mips/include/asm/uasm.h
|
||||
@@ -249,7 +249,11 @@ static inline void uasm_l##lb(struct uas
|
||||
#define uasm_i_bnezl(buf, rs, off) uasm_i_bnel(buf, rs, 0, off)
|
||||
#define uasm_i_ehb(buf) uasm_i_sll(buf, 0, 0, 3)
|
||||
#define uasm_i_move(buf, a, b) UASM_i_ADDU(buf, a, 0, b)
|
||||
+#ifdef CONFIG_CPU_NOP_WORKAROUNDS
|
||||
+#define uasm_i_nop(buf) uasm_i_or(buf, 1, 1, 0)
|
||||
+#else
|
||||
#define uasm_i_nop(buf) uasm_i_sll(buf, 0, 0, 0)
|
||||
+#endif
|
||||
#define uasm_i_ssnop(buf) uasm_i_sll(buf, 0, 0, 1)
|
||||
|
||||
static inline void uasm_i_drotr_safe(u32 **p, unsigned int a1,
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,120 @@
|
|||
From: Johan Almbladh <johan.almbladh@anyfinetworks.com>
|
||||
Date: Tue, 5 Oct 2021 18:54:06 +0200
|
||||
Subject: [PATCH] mips: bpf: Add JIT workarounds for CPU errata
|
||||
|
||||
This patch adds workarounds for the following CPU errata to the MIPS
|
||||
eBPF JIT, if enabled in the kernel configuration.
|
||||
|
||||
- R10000 ll/sc weak ordering
|
||||
- Loongson-3 ll/sc weak ordering
|
||||
- Loongson-2F jump hang
|
||||
|
||||
The Loongson-2F nop errata is implemented in uasm, which the JIT uses,
|
||||
so no additional mitigations are needed for that.
|
||||
|
||||
Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
|
||||
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
|
||||
---
|
||||
|
||||
--- a/arch/mips/net/bpf_jit_comp.c
|
||||
+++ b/arch/mips/net/bpf_jit_comp.c
|
||||
@@ -404,6 +404,7 @@ void emit_alu_r(struct jit_context *ctx,
|
||||
/* Atomic read-modify-write (32-bit) */
|
||||
void emit_atomic_r(struct jit_context *ctx, u8 dst, u8 src, s16 off, u8 code)
|
||||
{
|
||||
+ LLSC_sync(ctx);
|
||||
emit(ctx, ll, MIPS_R_T9, off, dst);
|
||||
switch (code) {
|
||||
case BPF_ADD:
|
||||
@@ -420,18 +421,19 @@ void emit_atomic_r(struct jit_context *c
|
||||
break;
|
||||
}
|
||||
emit(ctx, sc, MIPS_R_T8, off, dst);
|
||||
- emit(ctx, beqz, MIPS_R_T8, -16);
|
||||
+ emit(ctx, LLSC_beqz, MIPS_R_T8, -16 - LLSC_offset);
|
||||
emit(ctx, nop); /* Delay slot */
|
||||
}
|
||||
|
||||
/* Atomic compare-and-exchange (32-bit) */
|
||||
void emit_cmpxchg_r(struct jit_context *ctx, u8 dst, u8 src, u8 res, s16 off)
|
||||
{
|
||||
+ LLSC_sync(ctx);
|
||||
emit(ctx, ll, MIPS_R_T9, off, dst);
|
||||
emit(ctx, bne, MIPS_R_T9, res, 12);
|
||||
emit(ctx, move, MIPS_R_T8, src); /* Delay slot */
|
||||
emit(ctx, sc, MIPS_R_T8, off, dst);
|
||||
- emit(ctx, beqz, MIPS_R_T8, -20);
|
||||
+ emit(ctx, LLSC_beqz, MIPS_R_T8, -20 - LLSC_offset);
|
||||
emit(ctx, move, res, MIPS_R_T9); /* Delay slot */
|
||||
clobber_reg(ctx, res);
|
||||
}
|
||||
--- a/arch/mips/net/bpf_jit_comp.h
|
||||
+++ b/arch/mips/net/bpf_jit_comp.h
|
||||
@@ -87,7 +87,7 @@ struct jit_context {
|
||||
};
|
||||
|
||||
/* Emit the instruction if the JIT memory space has been allocated */
|
||||
-#define emit(ctx, func, ...) \
|
||||
+#define __emit(ctx, func, ...) \
|
||||
do { \
|
||||
if ((ctx)->target != NULL) { \
|
||||
u32 *p = &(ctx)->target[ctx->jit_index]; \
|
||||
@@ -95,6 +95,30 @@ do { \
|
||||
} \
|
||||
(ctx)->jit_index++; \
|
||||
} while (0)
|
||||
+#define emit(...) __emit(__VA_ARGS__)
|
||||
+
|
||||
+/* Workaround for R10000 ll/sc errata */
|
||||
+#ifdef CONFIG_WAR_R10000
|
||||
+#define LLSC_beqz beqzl
|
||||
+#else
|
||||
+#define LLSC_beqz beqz
|
||||
+#endif
|
||||
+
|
||||
+/* Workaround for Loongson-3 ll/sc errata */
|
||||
+#ifdef CONFIG_CPU_LOONGSON3_WORKAROUNDS
|
||||
+#define LLSC_sync(ctx) emit(ctx, sync, 0)
|
||||
+#define LLSC_offset 4
|
||||
+#else
|
||||
+#define LLSC_sync(ctx)
|
||||
+#define LLSC_offset 0
|
||||
+#endif
|
||||
+
|
||||
+/* Workaround for Loongson-2F jump errata */
|
||||
+#ifdef CONFIG_CPU_JUMP_WORKAROUNDS
|
||||
+#define JALR_MASK 0xffffffffcfffffffULL
|
||||
+#else
|
||||
+#define JALR_MASK (~0ULL)
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Mark a BPF register as accessed, it needs to be
|
||||
--- a/arch/mips/net/bpf_jit_comp64.c
|
||||
+++ b/arch/mips/net/bpf_jit_comp64.c
|
||||
@@ -375,6 +375,7 @@ static void emit_atomic_r64(struct jit_c
|
||||
u8 t1 = MIPS_R_T6;
|
||||
u8 t2 = MIPS_R_T7;
|
||||
|
||||
+ LLSC_sync(ctx);
|
||||
emit(ctx, lld, t1, off, dst);
|
||||
switch (code) {
|
||||
case BPF_ADD:
|
||||
@@ -391,7 +392,7 @@ static void emit_atomic_r64(struct jit_c
|
||||
break;
|
||||
}
|
||||
emit(ctx, scd, t2, off, dst);
|
||||
- emit(ctx, beqz, t2, -16);
|
||||
+ emit(ctx, LLSC_beqz, t2, -16 - LLSC_offset);
|
||||
emit(ctx, nop); /* Delay slot */
|
||||
}
|
||||
|
||||
@@ -414,7 +415,7 @@ static int emit_call(struct jit_context
|
||||
push_regs(ctx, ctx->clobbered & JIT_CALLER_REGS, 0, 0);
|
||||
|
||||
/* Emit function call */
|
||||
- emit_mov_i64(ctx, tmp, addr);
|
||||
+ emit_mov_i64(ctx, tmp, addr & JALR_MASK);
|
||||
emit(ctx, jalr, MIPS_R_RA, tmp);
|
||||
emit(ctx, nop); /* Delay slot */
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
From: Johan Almbladh <johan.almbladh@anyfinetworks.com>
|
||||
Date: Tue, 5 Oct 2021 18:54:07 +0200
|
||||
Subject: [PATCH] mips: bpf: Enable eBPF JITs
|
||||
|
||||
This patch enables the new eBPF JITs for 32-bit and 64-bit MIPS. It also
|
||||
disables the old cBPF JIT to so cBPF programs are converted to use the
|
||||
new JIT.
|
||||
|
||||
Workarounds for R4000 CPU errata are not implemented by the JIT, so the
|
||||
JIT is disabled if any of those workarounds are configured.
|
||||
|
||||
Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
|
||||
---
|
||||
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -3428,6 +3428,7 @@ S: Supported
|
||||
F: arch/arm64/net/
|
||||
|
||||
BPF JIT for MIPS (32-BIT AND 64-BIT)
|
||||
+M: Johan Almbladh <johan.almbladh@anyfinetworks.com>
|
||||
M: Paul Burton <paulburton@kernel.org>
|
||||
L: netdev@vger.kernel.org
|
||||
L: bpf@vger.kernel.org
|
||||
--- a/arch/mips/Kconfig
|
||||
+++ b/arch/mips/Kconfig
|
||||
@@ -57,7 +57,6 @@ config MIPS
|
||||
select HAVE_ARCH_TRACEHOOK
|
||||
select HAVE_ARCH_TRANSPARENT_HUGEPAGE if CPU_SUPPORTS_HUGEPAGES
|
||||
select HAVE_ASM_MODVERSIONS
|
||||
- select HAVE_CBPF_JIT if !64BIT && !CPU_MICROMIPS
|
||||
select HAVE_CONTEXT_TRACKING
|
||||
select HAVE_TIF_NOHZ
|
||||
select HAVE_C_RECORDMCOUNT
|
||||
@@ -65,7 +64,10 @@ config MIPS
|
||||
select HAVE_DEBUG_STACKOVERFLOW
|
||||
select HAVE_DMA_CONTIGUOUS
|
||||
select HAVE_DYNAMIC_FTRACE
|
||||
- select HAVE_EBPF_JIT if 64BIT && !CPU_MICROMIPS && TARGET_ISA_REV >= 2
|
||||
+ select HAVE_EBPF_JIT if !CPU_MICROMIPS && \
|
||||
+ !CPU_DADDI_WORKAROUNDS && \
|
||||
+ !CPU_R4000_WORKAROUNDS && \
|
||||
+ !CPU_R4400_WORKAROUNDS
|
||||
select HAVE_EXIT_THREAD
|
||||
select HAVE_FAST_GUP
|
||||
select HAVE_FTRACE_MCOUNT_RECORD
|
||||
--- a/arch/mips/net/Makefile
|
||||
+++ b/arch/mips/net/Makefile
|
||||
@@ -2,9 +2,10 @@
|
||||
# MIPS networking code
|
||||
|
||||
obj-$(CONFIG_MIPS_CBPF_JIT) += bpf_jit.o bpf_jit_asm.o
|
||||
+obj-$(CONFIG_MIPS_EBPF_JIT) += bpf_jit_comp.o
|
||||
|
||||
ifeq ($(CONFIG_32BIT),y)
|
||||
- obj-$(CONFIG_MIPS_EBPF_JIT) += bpf_jit_comp.o bpf_jit_comp32.o
|
||||
+ obj-$(CONFIG_MIPS_EBPF_JIT) += bpf_jit_comp32.o
|
||||
else
|
||||
- obj-$(CONFIG_MIPS_EBPF_JIT) += ebpf_jit.o
|
||||
+ obj-$(CONFIG_MIPS_EBPF_JIT) += bpf_jit_comp64.o
|
||||
endif
|
|
@ -0,0 +1,387 @@
|
|||
From: Johan Almbladh <johan.almbladh@anyfinetworks.com>
|
||||
Date: Tue, 5 Oct 2021 18:54:08 +0200
|
||||
Subject: [PATCH] mips: bpf: Remove old BPF JIT implementations
|
||||
|
||||
This patch removes the old 32-bit cBPF and 64-bit eBPF JIT implementations.
|
||||
They are replaced by a new eBPF implementation that supports both 32-bit
|
||||
and 64-bit MIPS CPUs.
|
||||
|
||||
Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
|
||||
---
|
||||
delete mode 100644 arch/mips/net/bpf_jit.c
|
||||
delete mode 100644 arch/mips/net/bpf_jit.h
|
||||
delete mode 100644 arch/mips/net/bpf_jit_asm.S
|
||||
delete mode 100644 arch/mips/net/ebpf_jit.c
|
||||
|
||||
--- a/arch/mips/net/bpf_jit.h
|
||||
+++ /dev/null
|
||||
@@ -1,81 +0,0 @@
|
||||
-/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
-/*
|
||||
- * Just-In-Time compiler for BPF filters on MIPS
|
||||
- *
|
||||
- * Copyright (c) 2014 Imagination Technologies Ltd.
|
||||
- * Author: Markos Chandras <markos.chandras@imgtec.com>
|
||||
- */
|
||||
-
|
||||
-#ifndef BPF_JIT_MIPS_OP_H
|
||||
-#define BPF_JIT_MIPS_OP_H
|
||||
-
|
||||
-/* Registers used by JIT */
|
||||
-#define MIPS_R_ZERO 0
|
||||
-#define MIPS_R_V0 2
|
||||
-#define MIPS_R_A0 4
|
||||
-#define MIPS_R_A1 5
|
||||
-#define MIPS_R_T4 12
|
||||
-#define MIPS_R_T5 13
|
||||
-#define MIPS_R_T6 14
|
||||
-#define MIPS_R_T7 15
|
||||
-#define MIPS_R_S0 16
|
||||
-#define MIPS_R_S1 17
|
||||
-#define MIPS_R_S2 18
|
||||
-#define MIPS_R_S3 19
|
||||
-#define MIPS_R_S4 20
|
||||
-#define MIPS_R_S5 21
|
||||
-#define MIPS_R_S6 22
|
||||
-#define MIPS_R_S7 23
|
||||
-#define MIPS_R_SP 29
|
||||
-#define MIPS_R_RA 31
|
||||
-
|
||||
-/* Conditional codes */
|
||||
-#define MIPS_COND_EQ 0x1
|
||||
-#define MIPS_COND_GE (0x1 << 1)
|
||||
-#define MIPS_COND_GT (0x1 << 2)
|
||||
-#define MIPS_COND_NE (0x1 << 3)
|
||||
-#define MIPS_COND_ALL (0x1 << 4)
|
||||
-/* Conditionals on X register or K immediate */
|
||||
-#define MIPS_COND_X (0x1 << 5)
|
||||
-#define MIPS_COND_K (0x1 << 6)
|
||||
-
|
||||
-#define r_ret MIPS_R_V0
|
||||
-
|
||||
-/*
|
||||
- * Use 2 scratch registers to avoid pipeline interlocks.
|
||||
- * There is no overhead during epilogue and prologue since
|
||||
- * any of the $s0-$s6 registers will only be preserved if
|
||||
- * they are going to actually be used.
|
||||
- */
|
||||
-#define r_skb_hl MIPS_R_S0 /* skb header length */
|
||||
-#define r_skb_data MIPS_R_S1 /* skb actual data */
|
||||
-#define r_off MIPS_R_S2
|
||||
-#define r_A MIPS_R_S3
|
||||
-#define r_X MIPS_R_S4
|
||||
-#define r_skb MIPS_R_S5
|
||||
-#define r_M MIPS_R_S6
|
||||
-#define r_skb_len MIPS_R_S7
|
||||
-#define r_s0 MIPS_R_T4 /* scratch reg 1 */
|
||||
-#define r_s1 MIPS_R_T5 /* scratch reg 2 */
|
||||
-#define r_tmp_imm MIPS_R_T6 /* No need to preserve this */
|
||||
-#define r_tmp MIPS_R_T7 /* No need to preserve this */
|
||||
-#define r_zero MIPS_R_ZERO
|
||||
-#define r_sp MIPS_R_SP
|
||||
-#define r_ra MIPS_R_RA
|
||||
-
|
||||
-#ifndef __ASSEMBLY__
|
||||
-
|
||||
-/* Declare ASM helpers */
|
||||
-
|
||||
-#define DECLARE_LOAD_FUNC(func) \
|
||||
- extern u8 func(unsigned long *skb, int offset); \
|
||||
- extern u8 func##_negative(unsigned long *skb, int offset); \
|
||||
- extern u8 func##_positive(unsigned long *skb, int offset)
|
||||
-
|
||||
-DECLARE_LOAD_FUNC(sk_load_word);
|
||||
-DECLARE_LOAD_FUNC(sk_load_half);
|
||||
-DECLARE_LOAD_FUNC(sk_load_byte);
|
||||
-
|
||||
-#endif
|
||||
-
|
||||
-#endif /* BPF_JIT_MIPS_OP_H */
|
||||
--- a/arch/mips/net/bpf_jit_asm.S
|
||||
+++ /dev/null
|
||||
@@ -1,285 +0,0 @@
|
||||
-/*
|
||||
- * bpf_jib_asm.S: Packet/header access helper functions for MIPS/MIPS64 BPF
|
||||
- * compiler.
|
||||
- *
|
||||
- * Copyright (C) 2015 Imagination Technologies Ltd.
|
||||
- * Author: Markos Chandras <markos.chandras@imgtec.com>
|
||||
- *
|
||||
- * 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; version 2 of the License.
|
||||
- */
|
||||
-
|
||||
-#include <asm/asm.h>
|
||||
-#include <asm/isa-rev.h>
|
||||
-#include <asm/regdef.h>
|
||||
-#include "bpf_jit.h"
|
||||
-
|
||||
-/* ABI
|
||||
- *
|
||||
- * r_skb_hl skb header length
|
||||
- * r_skb_data skb data
|
||||
- * r_off(a1) offset register
|
||||
- * r_A BPF register A
|
||||
- * r_X PF register X
|
||||
- * r_skb(a0) *skb
|
||||
- * r_M *scratch memory
|
||||
- * r_skb_le skb length
|
||||
- * r_s0 Scratch register 0
|
||||
- * r_s1 Scratch register 1
|
||||
- *
|
||||
- * On entry:
|
||||
- * a0: *skb
|
||||
- * a1: offset (imm or imm + X)
|
||||
- *
|
||||
- * All non-BPF-ABI registers are free for use. On return, we only
|
||||
- * care about r_ret. The BPF-ABI registers are assumed to remain
|
||||
- * unmodified during the entire filter operation.
|
||||
- */
|
||||
-
|
||||
-#define skb a0
|
||||
-#define offset a1
|
||||
-#define SKF_LL_OFF (-0x200000) /* Can't include linux/filter.h in assembly */
|
||||
-
|
||||
- /* We know better :) so prevent assembler reordering etc */
|
||||
- .set noreorder
|
||||
-
|
||||
-#define is_offset_negative(TYPE) \
|
||||
- /* If offset is negative we have more work to do */ \
|
||||
- slti t0, offset, 0; \
|
||||
- bgtz t0, bpf_slow_path_##TYPE##_neg; \
|
||||
- /* Be careful what follows in DS. */
|
||||
-
|
||||
-#define is_offset_in_header(SIZE, TYPE) \
|
||||
- /* Reading from header? */ \
|
||||
- addiu $r_s0, $r_skb_hl, -SIZE; \
|
||||
- slt t0, $r_s0, offset; \
|
||||
- bgtz t0, bpf_slow_path_##TYPE; \
|
||||
-
|
||||
-LEAF(sk_load_word)
|
||||
- is_offset_negative(word)
|
||||
-FEXPORT(sk_load_word_positive)
|
||||
- is_offset_in_header(4, word)
|
||||
- /* Offset within header boundaries */
|
||||
- PTR_ADDU t1, $r_skb_data, offset
|
||||
- .set reorder
|
||||
- lw $r_A, 0(t1)
|
||||
- .set noreorder
|
||||
-#ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
-# if MIPS_ISA_REV >= 2
|
||||
- wsbh t0, $r_A
|
||||
- rotr $r_A, t0, 16
|
||||
-# else
|
||||
- sll t0, $r_A, 24
|
||||
- srl t1, $r_A, 24
|
||||
- srl t2, $r_A, 8
|
||||
- or t0, t0, t1
|
||||
- andi t2, t2, 0xff00
|
||||
- andi t1, $r_A, 0xff00
|
||||
- or t0, t0, t2
|
||||
- sll t1, t1, 8
|
||||
- or $r_A, t0, t1
|
||||
-# endif
|
||||
-#endif
|
||||
- jr $r_ra
|
||||
- move $r_ret, zero
|
||||
- END(sk_load_word)
|
||||
-
|
||||
-LEAF(sk_load_half)
|
||||
- is_offset_negative(half)
|
||||
-FEXPORT(sk_load_half_positive)
|
||||
- is_offset_in_header(2, half)
|
||||
- /* Offset within header boundaries */
|
||||
- PTR_ADDU t1, $r_skb_data, offset
|
||||
- lhu $r_A, 0(t1)
|
||||
-#ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
-# if MIPS_ISA_REV >= 2
|
||||
- wsbh $r_A, $r_A
|
||||
-# else
|
||||
- sll t0, $r_A, 8
|
||||
- srl t1, $r_A, 8
|
||||
- andi t0, t0, 0xff00
|
||||
- or $r_A, t0, t1
|
||||
-# endif
|
||||
-#endif
|
||||
- jr $r_ra
|
||||
- move $r_ret, zero
|
||||
- END(sk_load_half)
|
||||
-
|
||||
-LEAF(sk_load_byte)
|
||||
- is_offset_negative(byte)
|
||||
-FEXPORT(sk_load_byte_positive)
|
||||
- is_offset_in_header(1, byte)
|
||||
- /* Offset within header boundaries */
|
||||
- PTR_ADDU t1, $r_skb_data, offset
|
||||
- lbu $r_A, 0(t1)
|
||||
- jr $r_ra
|
||||
- move $r_ret, zero
|
||||
- END(sk_load_byte)
|
||||
-
|
||||
-/*
|
||||
- * call skb_copy_bits:
|
||||
- * (prototype in linux/skbuff.h)
|
||||
- *
|
||||
- * int skb_copy_bits(sk_buff *skb, int offset, void *to, int len)
|
||||
- *
|
||||
- * o32 mandates we leave 4 spaces for argument registers in case
|
||||
- * the callee needs to use them. Even though we don't care about
|
||||
- * the argument registers ourselves, we need to allocate that space
|
||||
- * to remain ABI compliant since the callee may want to use that space.
|
||||
- * We also allocate 2 more spaces for $r_ra and our return register (*to).
|
||||
- *
|
||||
- * n64 is a bit different. The *caller* will allocate the space to preserve
|
||||
- * the arguments. So in 64-bit kernels, we allocate the 4-arg space for no
|
||||
- * good reason but it does not matter that much really.
|
||||
- *
|
||||
- * (void *to) is returned in r_s0
|
||||
- *
|
||||
- */
|
||||
-#ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
-#define DS_OFFSET(SIZE) (4 * SZREG)
|
||||
-#else
|
||||
-#define DS_OFFSET(SIZE) ((4 * SZREG) + (4 - SIZE))
|
||||
-#endif
|
||||
-#define bpf_slow_path_common(SIZE) \
|
||||
- /* Quick check. Are we within reasonable boundaries? */ \
|
||||
- LONG_ADDIU $r_s1, $r_skb_len, -SIZE; \
|
||||
- sltu $r_s0, offset, $r_s1; \
|
||||
- beqz $r_s0, fault; \
|
||||
- /* Load 4th argument in DS */ \
|
||||
- LONG_ADDIU a3, zero, SIZE; \
|
||||
- PTR_ADDIU $r_sp, $r_sp, -(6 * SZREG); \
|
||||
- PTR_LA t0, skb_copy_bits; \
|
||||
- PTR_S $r_ra, (5 * SZREG)($r_sp); \
|
||||
- /* Assign low slot to a2 */ \
|
||||
- PTR_ADDIU a2, $r_sp, DS_OFFSET(SIZE); \
|
||||
- jalr t0; \
|
||||
- /* Reset our destination slot (DS but it's ok) */ \
|
||||
- INT_S zero, (4 * SZREG)($r_sp); \
|
||||
- /* \
|
||||
- * skb_copy_bits returns 0 on success and -EFAULT \
|
||||
- * on error. Our data live in a2. Do not bother with \
|
||||
- * our data if an error has been returned. \
|
||||
- */ \
|
||||
- /* Restore our frame */ \
|
||||
- PTR_L $r_ra, (5 * SZREG)($r_sp); \
|
||||
- INT_L $r_s0, (4 * SZREG)($r_sp); \
|
||||
- bltz v0, fault; \
|
||||
- PTR_ADDIU $r_sp, $r_sp, 6 * SZREG; \
|
||||
- move $r_ret, zero; \
|
||||
-
|
||||
-NESTED(bpf_slow_path_word, (6 * SZREG), $r_sp)
|
||||
- bpf_slow_path_common(4)
|
||||
-#ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
-# if MIPS_ISA_REV >= 2
|
||||
- wsbh t0, $r_s0
|
||||
- jr $r_ra
|
||||
- rotr $r_A, t0, 16
|
||||
-# else
|
||||
- sll t0, $r_s0, 24
|
||||
- srl t1, $r_s0, 24
|
||||
- srl t2, $r_s0, 8
|
||||
- or t0, t0, t1
|
||||
- andi t2, t2, 0xff00
|
||||
- andi t1, $r_s0, 0xff00
|
||||
- or t0, t0, t2
|
||||
- sll t1, t1, 8
|
||||
- jr $r_ra
|
||||
- or $r_A, t0, t1
|
||||
-# endif
|
||||
-#else
|
||||
- jr $r_ra
|
||||
- move $r_A, $r_s0
|
||||
-#endif
|
||||
-
|
||||
- END(bpf_slow_path_word)
|
||||
-
|
||||
-NESTED(bpf_slow_path_half, (6 * SZREG), $r_sp)
|
||||
- bpf_slow_path_common(2)
|
||||
-#ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
-# if MIPS_ISA_REV >= 2
|
||||
- jr $r_ra
|
||||
- wsbh $r_A, $r_s0
|
||||
-# else
|
||||
- sll t0, $r_s0, 8
|
||||
- andi t1, $r_s0, 0xff00
|
||||
- andi t0, t0, 0xff00
|
||||
- srl t1, t1, 8
|
||||
- jr $r_ra
|
||||
- or $r_A, t0, t1
|
||||
-# endif
|
||||
-#else
|
||||
- jr $r_ra
|
||||
- move $r_A, $r_s0
|
||||
-#endif
|
||||
-
|
||||
- END(bpf_slow_path_half)
|
||||
-
|
||||
-NESTED(bpf_slow_path_byte, (6 * SZREG), $r_sp)
|
||||
- bpf_slow_path_common(1)
|
||||
- jr $r_ra
|
||||
- move $r_A, $r_s0
|
||||
-
|
||||
- END(bpf_slow_path_byte)
|
||||
-
|
||||
-/*
|
||||
- * Negative entry points
|
||||
- */
|
||||
- .macro bpf_is_end_of_data
|
||||
- li t0, SKF_LL_OFF
|
||||
- /* Reading link layer data? */
|
||||
- slt t1, offset, t0
|
||||
- bgtz t1, fault
|
||||
- /* Be careful what follows in DS. */
|
||||
- .endm
|
||||
-/*
|
||||
- * call skb_copy_bits:
|
||||
- * (prototype in linux/filter.h)
|
||||
- *
|
||||
- * void *bpf_internal_load_pointer_neg_helper(const struct sk_buff *skb,
|
||||
- * int k, unsigned int size)
|
||||
- *
|
||||
- * see above (bpf_slow_path_common) for ABI restrictions
|
||||
- */
|
||||
-#define bpf_negative_common(SIZE) \
|
||||
- PTR_ADDIU $r_sp, $r_sp, -(6 * SZREG); \
|
||||
- PTR_LA t0, bpf_internal_load_pointer_neg_helper; \
|
||||
- PTR_S $r_ra, (5 * SZREG)($r_sp); \
|
||||
- jalr t0; \
|
||||
- li a2, SIZE; \
|
||||
- PTR_L $r_ra, (5 * SZREG)($r_sp); \
|
||||
- /* Check return pointer */ \
|
||||
- beqz v0, fault; \
|
||||
- PTR_ADDIU $r_sp, $r_sp, 6 * SZREG; \
|
||||
- /* Preserve our pointer */ \
|
||||
- move $r_s0, v0; \
|
||||
- /* Set return value */ \
|
||||
- move $r_ret, zero; \
|
||||
-
|
||||
-bpf_slow_path_word_neg:
|
||||
- bpf_is_end_of_data
|
||||
-NESTED(sk_load_word_negative, (6 * SZREG), $r_sp)
|
||||
- bpf_negative_common(4)
|
||||
- jr $r_ra
|
||||
- lw $r_A, 0($r_s0)
|
||||
- END(sk_load_word_negative)
|
||||
-
|
||||
-bpf_slow_path_half_neg:
|
||||
- bpf_is_end_of_data
|
||||
-NESTED(sk_load_half_negative, (6 * SZREG), $r_sp)
|
||||
- bpf_negative_common(2)
|
||||
- jr $r_ra
|
||||
- lhu $r_A, 0($r_s0)
|
||||
- END(sk_load_half_negative)
|
||||
-
|
||||
-bpf_slow_path_byte_neg:
|
||||
- bpf_is_end_of_data
|
||||
-NESTED(sk_load_byte_negative, (6 * SZREG), $r_sp)
|
||||
- bpf_negative_common(1)
|
||||
- jr $r_ra
|
||||
- lbu $r_A, 0($r_s0)
|
||||
- END(sk_load_byte_negative)
|
||||
-
|
||||
-fault:
|
||||
- jr $r_ra
|
||||
- addiu $r_ret, zero, 1
|
|
@ -10,7 +10,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|||
|
||||
--- a/net/netfilter/nf_flow_table_core.c
|
||||
+++ b/net/netfilter/nf_flow_table_core.c
|
||||
@@ -656,13 +656,41 @@ void nf_flow_table_free(struct nf_flowta
|
||||
@@ -646,13 +646,41 @@ void nf_flow_table_free(struct nf_flowta
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nf_flow_table_free);
|
||||
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
From b5375509184dc23d2b7fa0c5ed8763899ccc9674 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Sat, 2 Oct 2021 19:58:11 +0200
|
||||
Subject: [PATCH] net: bgmac: improve handling PHY
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
1. Use info from DT if available
|
||||
|
||||
It allows describing for example a fixed link. It's more accurate than
|
||||
just guessing there may be one (depending on a chipset).
|
||||
|
||||
2. Verify PHY ID before trying to connect PHY
|
||||
|
||||
PHY addr 0x1e (30) is special in Broadcom routers and means a switch
|
||||
connected as MDIO devices instead of a real PHY. Don't try connecting to
|
||||
it.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/broadcom/bgmac-bcma.c | 33 ++++++++++++++--------
|
||||
1 file changed, 21 insertions(+), 12 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/broadcom/bgmac-bcma.c
|
||||
+++ b/drivers/net/ethernet/broadcom/bgmac-bcma.c
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <linux/bcma/bcma.h>
|
||||
#include <linux/brcmphy.h>
|
||||
#include <linux/etherdevice.h>
|
||||
+#include <linux/of_mdio.h>
|
||||
#include <linux/of_net.h>
|
||||
#include "bgmac.h"
|
||||
|
||||
@@ -86,17 +87,28 @@ static int bcma_phy_connect(struct bgmac
|
||||
struct phy_device *phy_dev;
|
||||
char bus_id[MII_BUS_ID_SIZE + 3];
|
||||
|
||||
+ /* DT info should be the most accurate */
|
||||
+ phy_dev = of_phy_get_and_connect(bgmac->net_dev, bgmac->dev->of_node,
|
||||
+ bgmac_adjust_link);
|
||||
+ if (phy_dev)
|
||||
+ return 0;
|
||||
+
|
||||
/* Connect to the PHY */
|
||||
- snprintf(bus_id, sizeof(bus_id), PHY_ID_FMT, bgmac->mii_bus->id,
|
||||
- bgmac->phyaddr);
|
||||
- phy_dev = phy_connect(bgmac->net_dev, bus_id, bgmac_adjust_link,
|
||||
- PHY_INTERFACE_MODE_MII);
|
||||
- if (IS_ERR(phy_dev)) {
|
||||
- dev_err(bgmac->dev, "PHY connection failed\n");
|
||||
- return PTR_ERR(phy_dev);
|
||||
+ if (bgmac->mii_bus && bgmac->phyaddr != BGMAC_PHY_NOREGS) {
|
||||
+ snprintf(bus_id, sizeof(bus_id), PHY_ID_FMT, bgmac->mii_bus->id,
|
||||
+ bgmac->phyaddr);
|
||||
+ phy_dev = phy_connect(bgmac->net_dev, bus_id, bgmac_adjust_link,
|
||||
+ PHY_INTERFACE_MODE_MII);
|
||||
+ if (IS_ERR(phy_dev)) {
|
||||
+ dev_err(bgmac->dev, "PHY connection failed\n");
|
||||
+ return PTR_ERR(phy_dev);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
- return 0;
|
||||
+ /* Assume a fixed link to the switch port */
|
||||
+ return bgmac_phy_connect_direct(bgmac);
|
||||
}
|
||||
|
||||
static const struct bcma_device_id bgmac_bcma_tbl[] = {
|
||||
@@ -297,10 +309,7 @@ static int bgmac_probe(struct bcma_devic
|
||||
bgmac->cco_ctl_maskset = bcma_bgmac_cco_ctl_maskset;
|
||||
bgmac->get_bus_clock = bcma_bgmac_get_bus_clock;
|
||||
bgmac->cmn_maskset32 = bcma_bgmac_cmn_maskset32;
|
||||
- if (bgmac->mii_bus)
|
||||
- bgmac->phy_connect = bcma_phy_connect;
|
||||
- else
|
||||
- bgmac->phy_connect = bgmac_phy_connect_direct;
|
||||
+ bgmac->phy_connect = bcma_phy_connect;
|
||||
|
||||
err = bgmac_enet_probe(bgmac);
|
||||
if (err)
|
|
@ -0,0 +1,54 @@
|
|||
From 45c9d966688e7fad7f24bfc450547d91e4304d0b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Sat, 2 Oct 2021 19:58:12 +0200
|
||||
Subject: [PATCH] net: bgmac: support MDIO described in DT
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Check ethernet controller DT node for "mdio" subnode and use it with
|
||||
of_mdiobus_register() when present. That allows specifying MDIO and its
|
||||
PHY devices in a standard DT based way.
|
||||
|
||||
This is required for BCM53573 SoC support. That family is sometimes
|
||||
called Northstar (by marketing?) but is quite different from it. It uses
|
||||
different CPU(s) and many different hw blocks.
|
||||
|
||||
One of shared blocks in BCM53573 is Ethernet controller. Switch however
|
||||
is not SRAB accessible (as it Northstar) but is MDIO attached.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/broadcom/bgmac-bcma-mdio.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/ethernet/broadcom/bgmac-bcma-mdio.c
|
||||
+++ b/drivers/net/ethernet/broadcom/bgmac-bcma-mdio.c
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include <linux/bcma/bcma.h>
|
||||
#include <linux/brcmphy.h>
|
||||
+#include <linux/of_mdio.h>
|
||||
#include "bgmac.h"
|
||||
|
||||
static bool bcma_mdio_wait_value(struct bcma_device *core, u16 reg, u32 mask,
|
||||
@@ -211,6 +212,7 @@ struct mii_bus *bcma_mdio_mii_register(s
|
||||
{
|
||||
struct bcma_device *core = bgmac->bcma.core;
|
||||
struct mii_bus *mii_bus;
|
||||
+ struct device_node *np;
|
||||
int err;
|
||||
|
||||
mii_bus = mdiobus_alloc();
|
||||
@@ -229,7 +231,9 @@ struct mii_bus *bcma_mdio_mii_register(s
|
||||
mii_bus->parent = &core->dev;
|
||||
mii_bus->phy_mask = ~(1 << bgmac->phyaddr);
|
||||
|
||||
- err = mdiobus_register(mii_bus);
|
||||
+ np = of_get_child_by_name(core->dev.of_node, "mdio");
|
||||
+
|
||||
+ err = of_mdiobus_register(mii_bus, np);
|
||||
if (err) {
|
||||
dev_err(&core->dev, "Registration of mii bus failed\n");
|
||||
goto err_free_bus;
|
|
@ -0,0 +1,48 @@
|
|||
From 0ccf8511182436183c031e8a2f740ae91a02c625 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Tue, 14 Sep 2021 14:33:45 +0200
|
||||
Subject: net: phy: at803x: add support for qca 8327 internal phy
|
||||
|
||||
Add support for qca8327 internal phy needed for correct init of the
|
||||
switch port. It does use the same qca8337 function and reg just with a
|
||||
different id.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Tested-by: Rosen Penev <rosenp@gmail.com>
|
||||
Tested-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -1420,6 +1420,19 @@ static struct phy_driver at803x_driver[]
|
||||
.get_sset_count = at803x_get_sset_count,
|
||||
.get_strings = at803x_get_strings,
|
||||
.get_stats = at803x_get_stats,
|
||||
+}, {
|
||||
+ /* QCA8327 */
|
||||
+ .phy_id = QCA8327_PHY_ID,
|
||||
+ .phy_id_mask = QCA8K_PHY_ID_MASK,
|
||||
+ .name = "QCA PHY 8327",
|
||||
+ /* PHY_GBIT_FEATURES */
|
||||
+ .probe = at803x_probe,
|
||||
+ .flags = PHY_IS_INTERNAL,
|
||||
+ .config_init = qca83xx_config_init,
|
||||
+ .soft_reset = genphy_soft_reset,
|
||||
+ .get_sset_count = at803x_get_sset_count,
|
||||
+ .get_strings = at803x_get_strings,
|
||||
+ .get_stats = at803x_get_stats,
|
||||
}, };
|
||||
|
||||
module_phy_driver(at803x_driver);
|
||||
@@ -1430,6 +1443,8 @@ static struct mdio_device_id __maybe_unu
|
||||
{ PHY_ID_MATCH_EXACT(ATH8032_PHY_ID) },
|
||||
{ PHY_ID_MATCH_EXACT(ATH8035_PHY_ID) },
|
||||
{ PHY_ID_MATCH_EXACT(ATH9331_PHY_ID) },
|
||||
+ { PHY_ID_MATCH_EXACT(QCA8337_PHY_ID) },
|
||||
+ { PHY_ID_MATCH_EXACT(QCA8327_PHY_ID) },
|
||||
{ }
|
||||
};
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
From 983d96a9116a328668601555d96736261d33170c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Thu, 16 Sep 2021 14:03:51 +0200
|
||||
Subject: [PATCH] net: dsa: b53: Include all ports in "enabled_ports"
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Make "enabled_ports" bitfield contain all available switch ports
|
||||
including a CPU port. This way there is no need for fixup during
|
||||
initialization.
|
||||
|
||||
For BCM53010, BCM53018 and BCM53019 include also other available ports.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 23 +++++++++++------------
|
||||
1 file changed, 11 insertions(+), 12 deletions(-)
|
||||
|
||||
--- a/drivers/net/dsa/b53/b53_common.c
|
||||
+++ b/drivers/net/dsa/b53/b53_common.c
|
||||
@@ -2302,7 +2302,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM5325_DEVICE_ID,
|
||||
.dev_name = "BCM5325",
|
||||
.vlans = 16,
|
||||
- .enabled_ports = 0x1f,
|
||||
+ .enabled_ports = 0x3f,
|
||||
.arl_bins = 2,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 5,
|
||||
@@ -2313,7 +2313,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM5365_DEVICE_ID,
|
||||
.dev_name = "BCM5365",
|
||||
.vlans = 256,
|
||||
- .enabled_ports = 0x1f,
|
||||
+ .enabled_ports = 0x3f,
|
||||
.arl_bins = 2,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 5,
|
||||
@@ -2324,7 +2324,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM5389_DEVICE_ID,
|
||||
.dev_name = "BCM5389",
|
||||
.vlans = 4096,
|
||||
- .enabled_ports = 0x1f,
|
||||
+ .enabled_ports = 0x11f,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@@ -2338,7 +2338,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM5395_DEVICE_ID,
|
||||
.dev_name = "BCM5395",
|
||||
.vlans = 4096,
|
||||
- .enabled_ports = 0x1f,
|
||||
+ .enabled_ports = 0x11f,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@@ -2352,7 +2352,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM5397_DEVICE_ID,
|
||||
.dev_name = "BCM5397",
|
||||
.vlans = 4096,
|
||||
- .enabled_ports = 0x1f,
|
||||
+ .enabled_ports = 0x11f,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@@ -2366,7 +2366,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM5398_DEVICE_ID,
|
||||
.dev_name = "BCM5398",
|
||||
.vlans = 4096,
|
||||
- .enabled_ports = 0x7f,
|
||||
+ .enabled_ports = 0x17f,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@@ -2380,7 +2380,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM53115_DEVICE_ID,
|
||||
.dev_name = "BCM53115",
|
||||
.vlans = 4096,
|
||||
- .enabled_ports = 0x1f,
|
||||
+ .enabled_ports = 0x11f,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
@@ -2394,7 +2394,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM53125_DEVICE_ID,
|
||||
.dev_name = "BCM53125",
|
||||
.vlans = 4096,
|
||||
- .enabled_ports = 0xff,
|
||||
+ .enabled_ports = 0x1ff,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@@ -2436,7 +2436,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM53010_DEVICE_ID,
|
||||
.dev_name = "BCM53010",
|
||||
.vlans = 4096,
|
||||
- .enabled_ports = 0x1f,
|
||||
+ .enabled_ports = 0x1bf,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@@ -2478,7 +2478,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM53018_DEVICE_ID,
|
||||
.dev_name = "BCM53018",
|
||||
.vlans = 4096,
|
||||
- .enabled_ports = 0x1f,
|
||||
+ .enabled_ports = 0x1bf,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@@ -2492,7 +2492,7 @@ static const struct b53_chip_data b53_sw
|
||||
.chip_id = BCM53019_DEVICE_ID,
|
||||
.dev_name = "BCM53019",
|
||||
.vlans = 4096,
|
||||
- .enabled_ports = 0x1f,
|
||||
+ .enabled_ports = 0x1bf,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
@@ -2634,7 +2634,6 @@ static int b53_switch_init(struct b53_de
|
||||
dev->cpu_port = 5;
|
||||
}
|
||||
|
||||
- dev->enabled_ports |= BIT(dev->cpu_port);
|
||||
dev->num_ports = fls(dev->enabled_ports);
|
||||
|
||||
dev->ds->num_ports = min_t(unsigned int, dev->num_ports, DSA_MAX_PORTS);
|
|
@ -0,0 +1,42 @@
|
|||
From b290c6384afabbca5ae6e2af72fb1b2bc37922be Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Thu, 16 Sep 2021 14:03:52 +0200
|
||||
Subject: [PATCH] net: dsa: b53: Drop BCM5301x workaround for a wrong CPU/IMP
|
||||
port
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
On BCM5301x port 8 requires a fixed link when used.
|
||||
|
||||
Years ago when b53 was an OpenWrt downstream driver (with configuration
|
||||
based on sometimes bugged NVRAM) there was a need for a fixup. In case
|
||||
of forcing fixed link for (incorrectly specified) port 5 the code had to
|
||||
actually setup port 8 link.
|
||||
|
||||
For upstream b53 driver with setup based on DT there is no need for that
|
||||
workaround. In DT we have and require correct ports setup.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
--- a/drivers/net/dsa/b53/b53_common.c
|
||||
+++ b/drivers/net/dsa/b53/b53_common.c
|
||||
@@ -1291,12 +1291,6 @@ static void b53_adjust_link(struct dsa_s
|
||||
return;
|
||||
}
|
||||
}
|
||||
- } else if (is5301x(dev)) {
|
||||
- if (port != dev->cpu_port) {
|
||||
- b53_force_port_config(dev, dev->cpu_port, 2000,
|
||||
- DUPLEX_FULL, true, true);
|
||||
- b53_force_link(dev, dev->cpu_port, 1);
|
||||
- }
|
||||
}
|
||||
|
||||
/* Re-negotiate EEE if it was enabled already */
|
|
@ -0,0 +1,32 @@
|
|||
From 3ff26b29230c54fea2353b63124c589b61953e14 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Thu, 16 Sep 2021 14:03:53 +0200
|
||||
Subject: [PATCH] net: dsa: b53: Improve flow control setup on BCM5301x
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
According to the Broadcom's reference driver flow control needs to be
|
||||
enabled for any CPU switch port (5, 7 or 8 - depending on which one is
|
||||
used). Current code makes it work only for the port 5. Use
|
||||
dsa_is_cpu_port() which solved that problem.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/dsa/b53/b53_common.c
|
||||
+++ b/drivers/net/dsa/b53/b53_common.c
|
||||
@@ -1222,7 +1222,7 @@ static void b53_adjust_link(struct dsa_s
|
||||
return;
|
||||
|
||||
/* Enable flow control on BCM5301x's CPU port */
|
||||
- if (is5301x(dev) && port == dev->cpu_port)
|
||||
+ if (is5301x(dev) && dsa_is_cpu_port(ds, port))
|
||||
tx_pause = rx_pause = true;
|
||||
|
||||
if (phydev->pause) {
|
|
@ -0,0 +1,205 @@
|
|||
From 7d5af56418d7d01e43247a33b6fe6492ea871923 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Thu, 16 Sep 2021 14:03:54 +0200
|
||||
Subject: [PATCH] net: dsa: b53: Drop unused "cpu_port" field
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
It's set but never used anymore.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 28 ----------------------------
|
||||
drivers/net/dsa/b53/b53_priv.h | 1 -
|
||||
2 files changed, 29 deletions(-)
|
||||
|
||||
--- a/drivers/net/dsa/b53/b53_common.c
|
||||
+++ b/drivers/net/dsa/b53/b53_common.c
|
||||
@@ -2300,7 +2300,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 2,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 5,
|
||||
- .cpu_port = B53_CPU_PORT_25,
|
||||
.duplex_reg = B53_DUPLEX_STAT_FE,
|
||||
},
|
||||
{
|
||||
@@ -2311,7 +2310,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 2,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 5,
|
||||
- .cpu_port = B53_CPU_PORT_25,
|
||||
.duplex_reg = B53_DUPLEX_STAT_FE,
|
||||
},
|
||||
{
|
||||
@@ -2322,7 +2320,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
- .cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2336,7 +2333,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
- .cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2350,7 +2346,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
- .cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS_9798,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2364,7 +2359,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
- .cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS_9798,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2379,7 +2373,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_buckets = 1024,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.imp_port = 8,
|
||||
- .cpu_port = B53_CPU_PORT,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
.jumbo_size_reg = B53_JUMBO_MAX_SIZE,
|
||||
@@ -2392,7 +2385,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
- .cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2406,7 +2398,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
- .cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2420,7 +2411,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
- .cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS_63XX,
|
||||
.duplex_reg = B53_DUPLEX_STAT_63XX,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK_63XX,
|
||||
@@ -2434,7 +2424,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
- .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2448,7 +2437,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
- .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2462,7 +2450,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
- .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2476,7 +2463,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
- .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2490,7 +2476,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
- .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2504,7 +2489,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
- .cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2518,7 +2502,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
- .cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2547,7 +2530,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 8,
|
||||
- .cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2561,7 +2543,6 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 256,
|
||||
.imp_port = 8,
|
||||
- .cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2587,7 +2568,6 @@ static int b53_switch_init(struct b53_de
|
||||
dev->vta_regs[2] = chip->vta_regs[2];
|
||||
dev->jumbo_pm_reg = chip->jumbo_pm_reg;
|
||||
dev->imp_port = chip->imp_port;
|
||||
- dev->cpu_port = chip->cpu_port;
|
||||
dev->num_vlans = chip->vlans;
|
||||
dev->num_arl_bins = chip->arl_bins;
|
||||
dev->num_arl_buckets = chip->arl_buckets;
|
||||
@@ -2619,13 +2599,6 @@ static int b53_switch_init(struct b53_de
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
- } else if (dev->chip_id == BCM53115_DEVICE_ID) {
|
||||
- u64 strap_value;
|
||||
-
|
||||
- b53_read48(dev, B53_STAT_PAGE, B53_STRAP_VALUE, &strap_value);
|
||||
- /* use second IMP port if GMII is enabled */
|
||||
- if (strap_value & SV_GMII_CTRL_115)
|
||||
- dev->cpu_port = 5;
|
||||
}
|
||||
|
||||
dev->num_ports = fls(dev->enabled_ports);
|
||||
--- a/drivers/net/dsa/b53/b53_priv.h
|
||||
+++ b/drivers/net/dsa/b53/b53_priv.h
|
||||
@@ -124,7 +124,6 @@ struct b53_device {
|
||||
/* used ports mask */
|
||||
u16 enabled_ports;
|
||||
unsigned int imp_port;
|
||||
- unsigned int cpu_port;
|
||||
|
||||
/* connect specific data */
|
||||
u8 current_page;
|
|
@ -0,0 +1,65 @@
|
|||
From b4df02b562f4aa14ff6811f30e1b4d2159585c59 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Sun, 19 Sep 2021 18:28:15 +0200
|
||||
Subject: net: phy: at803x: add support for qca 8327 A variant internal phy
|
||||
|
||||
For qca8327 internal phy there are 2 different switch variant with 2
|
||||
different phy id. Add this missing variant so the internal phy can be
|
||||
correctly identified and fixed.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 25 ++++++++++++++++++++-----
|
||||
1 file changed, 20 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -150,7 +150,8 @@
|
||||
#define ATH8035_PHY_ID 0x004dd072
|
||||
#define AT8030_PHY_ID_MASK 0xffffffef
|
||||
|
||||
-#define QCA8327_PHY_ID 0x004dd034
|
||||
+#define QCA8327_A_PHY_ID 0x004dd033
|
||||
+#define QCA8327_B_PHY_ID 0x004dd034
|
||||
#define QCA8337_PHY_ID 0x004dd036
|
||||
#define QCA8K_PHY_ID_MASK 0xffffffff
|
||||
|
||||
@@ -1421,10 +1422,23 @@ static struct phy_driver at803x_driver[]
|
||||
.get_strings = at803x_get_strings,
|
||||
.get_stats = at803x_get_stats,
|
||||
}, {
|
||||
- /* QCA8327 */
|
||||
- .phy_id = QCA8327_PHY_ID,
|
||||
+ /* QCA8327-A from switch QCA8327-AL1A */
|
||||
+ .phy_id = QCA8327_A_PHY_ID,
|
||||
.phy_id_mask = QCA8K_PHY_ID_MASK,
|
||||
- .name = "QCA PHY 8327",
|
||||
+ .name = "QCA PHY 8327-A",
|
||||
+ /* PHY_GBIT_FEATURES */
|
||||
+ .probe = at803x_probe,
|
||||
+ .flags = PHY_IS_INTERNAL,
|
||||
+ .config_init = qca83xx_config_init,
|
||||
+ .soft_reset = genphy_soft_reset,
|
||||
+ .get_sset_count = at803x_get_sset_count,
|
||||
+ .get_strings = at803x_get_strings,
|
||||
+ .get_stats = at803x_get_stats,
|
||||
+}, {
|
||||
+ /* QCA8327-B from switch QCA8327-BL1A */
|
||||
+ .phy_id = QCA8327_B_PHY_ID,
|
||||
+ .phy_id_mask = QCA8K_PHY_ID_MASK,
|
||||
+ .name = "QCA PHY 8327-B",
|
||||
/* PHY_GBIT_FEATURES */
|
||||
.probe = at803x_probe,
|
||||
.flags = PHY_IS_INTERNAL,
|
||||
@@ -1444,7 +1458,8 @@ static struct mdio_device_id __maybe_unu
|
||||
{ PHY_ID_MATCH_EXACT(ATH8035_PHY_ID) },
|
||||
{ PHY_ID_MATCH_EXACT(ATH9331_PHY_ID) },
|
||||
{ PHY_ID_MATCH_EXACT(QCA8337_PHY_ID) },
|
||||
- { PHY_ID_MATCH_EXACT(QCA8327_PHY_ID) },
|
||||
+ { PHY_ID_MATCH_EXACT(QCA8327_A_PHY_ID) },
|
||||
+ { PHY_ID_MATCH_EXACT(QCA8327_B_PHY_ID) },
|
||||
{ }
|
||||
};
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
From 15b9df4ece17d084f14eb0ca1cf05f2ad497e425 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Sun, 19 Sep 2021 18:28:16 +0200
|
||||
Subject: net: phy: at803x: add resume/suspend function to qca83xx phy
|
||||
|
||||
Add resume/suspend function to qca83xx internal phy.
|
||||
We can't use the at803x generic function as the documentation lacks of
|
||||
any support for WoL regs.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -1421,6 +1421,8 @@ static struct phy_driver at803x_driver[]
|
||||
.get_sset_count = at803x_get_sset_count,
|
||||
.get_strings = at803x_get_strings,
|
||||
.get_stats = at803x_get_stats,
|
||||
+ .suspend = genphy_suspend,
|
||||
+ .resume = genphy_resume,
|
||||
}, {
|
||||
/* QCA8327-A from switch QCA8327-AL1A */
|
||||
.phy_id = QCA8327_A_PHY_ID,
|
||||
@@ -1434,6 +1436,8 @@ static struct phy_driver at803x_driver[]
|
||||
.get_sset_count = at803x_get_sset_count,
|
||||
.get_strings = at803x_get_strings,
|
||||
.get_stats = at803x_get_stats,
|
||||
+ .suspend = genphy_suspend,
|
||||
+ .resume = genphy_resume,
|
||||
}, {
|
||||
/* QCA8327-B from switch QCA8327-BL1A */
|
||||
.phy_id = QCA8327_B_PHY_ID,
|
||||
@@ -1447,6 +1451,8 @@ static struct phy_driver at803x_driver[]
|
||||
.get_sset_count = at803x_get_sset_count,
|
||||
.get_strings = at803x_get_strings,
|
||||
.get_stats = at803x_get_stats,
|
||||
+ .suspend = genphy_suspend,
|
||||
+ .resume = genphy_resume,
|
||||
}, };
|
||||
|
||||
module_phy_driver(at803x_driver);
|
|
@ -0,0 +1,95 @@
|
|||
From d44fd8604a4ab92119adb35f05fd87612af722b5 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Sun, 19 Sep 2021 18:28:17 +0200
|
||||
Subject: net: phy: at803x: fix spacing and improve name for 83xx phy
|
||||
|
||||
Fix spacing and improve name for 83xx phy following other phy in the
|
||||
same driver.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 60 ++++++++++++++++++++++++------------------------
|
||||
1 file changed, 30 insertions(+), 30 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -1410,47 +1410,47 @@ static struct phy_driver at803x_driver[]
|
||||
.config_aneg = at803x_config_aneg,
|
||||
}, {
|
||||
/* QCA8337 */
|
||||
- .phy_id = QCA8337_PHY_ID,
|
||||
- .phy_id_mask = QCA8K_PHY_ID_MASK,
|
||||
- .name = "QCA PHY 8337",
|
||||
+ .phy_id = QCA8337_PHY_ID,
|
||||
+ .phy_id_mask = QCA8K_PHY_ID_MASK,
|
||||
+ .name = "Qualcomm Atheros 8337 internal PHY",
|
||||
/* PHY_GBIT_FEATURES */
|
||||
- .probe = at803x_probe,
|
||||
- .flags = PHY_IS_INTERNAL,
|
||||
- .config_init = qca83xx_config_init,
|
||||
- .soft_reset = genphy_soft_reset,
|
||||
- .get_sset_count = at803x_get_sset_count,
|
||||
- .get_strings = at803x_get_strings,
|
||||
- .get_stats = at803x_get_stats,
|
||||
+ .probe = at803x_probe,
|
||||
+ .flags = PHY_IS_INTERNAL,
|
||||
+ .config_init = qca83xx_config_init,
|
||||
+ .soft_reset = genphy_soft_reset,
|
||||
+ .get_sset_count = at803x_get_sset_count,
|
||||
+ .get_strings = at803x_get_strings,
|
||||
+ .get_stats = at803x_get_stats,
|
||||
.suspend = genphy_suspend,
|
||||
.resume = genphy_resume,
|
||||
}, {
|
||||
/* QCA8327-A from switch QCA8327-AL1A */
|
||||
- .phy_id = QCA8327_A_PHY_ID,
|
||||
- .phy_id_mask = QCA8K_PHY_ID_MASK,
|
||||
- .name = "QCA PHY 8327-A",
|
||||
+ .phy_id = QCA8327_A_PHY_ID,
|
||||
+ .phy_id_mask = QCA8K_PHY_ID_MASK,
|
||||
+ .name = "Qualcomm Atheros 8327-A internal PHY",
|
||||
/* PHY_GBIT_FEATURES */
|
||||
- .probe = at803x_probe,
|
||||
- .flags = PHY_IS_INTERNAL,
|
||||
- .config_init = qca83xx_config_init,
|
||||
- .soft_reset = genphy_soft_reset,
|
||||
- .get_sset_count = at803x_get_sset_count,
|
||||
- .get_strings = at803x_get_strings,
|
||||
- .get_stats = at803x_get_stats,
|
||||
+ .probe = at803x_probe,
|
||||
+ .flags = PHY_IS_INTERNAL,
|
||||
+ .config_init = qca83xx_config_init,
|
||||
+ .soft_reset = genphy_soft_reset,
|
||||
+ .get_sset_count = at803x_get_sset_count,
|
||||
+ .get_strings = at803x_get_strings,
|
||||
+ .get_stats = at803x_get_stats,
|
||||
.suspend = genphy_suspend,
|
||||
.resume = genphy_resume,
|
||||
}, {
|
||||
/* QCA8327-B from switch QCA8327-BL1A */
|
||||
- .phy_id = QCA8327_B_PHY_ID,
|
||||
- .phy_id_mask = QCA8K_PHY_ID_MASK,
|
||||
- .name = "QCA PHY 8327-B",
|
||||
+ .phy_id = QCA8327_B_PHY_ID,
|
||||
+ .phy_id_mask = QCA8K_PHY_ID_MASK,
|
||||
+ .name = "Qualcomm Atheros 8327-B internal PHY",
|
||||
/* PHY_GBIT_FEATURES */
|
||||
- .probe = at803x_probe,
|
||||
- .flags = PHY_IS_INTERNAL,
|
||||
- .config_init = qca83xx_config_init,
|
||||
- .soft_reset = genphy_soft_reset,
|
||||
- .get_sset_count = at803x_get_sset_count,
|
||||
- .get_strings = at803x_get_strings,
|
||||
- .get_stats = at803x_get_stats,
|
||||
+ .probe = at803x_probe,
|
||||
+ .flags = PHY_IS_INTERNAL,
|
||||
+ .config_init = qca83xx_config_init,
|
||||
+ .soft_reset = genphy_soft_reset,
|
||||
+ .get_sset_count = at803x_get_sset_count,
|
||||
+ .get_strings = at803x_get_strings,
|
||||
+ .get_stats = at803x_get_stats,
|
||||
.suspend = genphy_suspend,
|
||||
.resume = genphy_resume,
|
||||
}, };
|
|
@ -0,0 +1,131 @@
|
|||
From ba3c01ee02ed0d821c9f241f179bbc9457542b8f Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Sun, 10 Oct 2021 00:46:15 +0200
|
||||
Subject: net: phy: at803x: fix resume for QCA8327 phy
|
||||
|
||||
From Documentation phy resume triggers phy reset and restart
|
||||
auto-negotiation. Add a dedicated function to wait reset to finish as
|
||||
it was notice a regression where port sometime are not reliable after a
|
||||
suspend/resume session. The reset wait logic is copied from phy_poll_reset.
|
||||
Add dedicated suspend function to use genphy_suspend only with QCA8337
|
||||
phy and set only additional debug settings for QCA8327. With more test
|
||||
it was reported that QCA8327 doesn't proprely support this mode and
|
||||
using this cause the unreliability of the switch ports, especially the
|
||||
malfunction of the port0.
|
||||
|
||||
Fixes: 15b9df4ece17 ("net: phy: at803x: add resume/suspend function to qca83xx phy")
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 69 +++++++++++++++++++++++++++++++++++++++++++-----
|
||||
1 file changed, 63 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -92,9 +92,14 @@
|
||||
#define AT803X_DEBUG_REG_5 0x05
|
||||
#define AT803X_DEBUG_TX_CLK_DLY_EN BIT(8)
|
||||
|
||||
+#define AT803X_DEBUG_REG_HIB_CTRL 0x0b
|
||||
+#define AT803X_DEBUG_HIB_CTRL_SEL_RST_80U BIT(10)
|
||||
+#define AT803X_DEBUG_HIB_CTRL_EN_ANY_CHANGE BIT(13)
|
||||
+
|
||||
#define AT803X_DEBUG_REG_3C 0x3C
|
||||
|
||||
#define AT803X_DEBUG_REG_3D 0x3D
|
||||
+#define AT803X_DEBUG_GATE_CLK_IN1000 BIT(6)
|
||||
|
||||
#define AT803X_DEBUG_REG_1F 0x1F
|
||||
#define AT803X_DEBUG_PLL_ON BIT(2)
|
||||
@@ -1312,6 +1317,58 @@ static int qca83xx_config_init(struct ph
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int qca83xx_resume(struct phy_device *phydev)
|
||||
+{
|
||||
+ int ret, val;
|
||||
+
|
||||
+ /* Skip reset if not suspended */
|
||||
+ if (!phydev->suspended)
|
||||
+ return 0;
|
||||
+
|
||||
+ /* Reinit the port, reset values set by suspend */
|
||||
+ qca83xx_config_init(phydev);
|
||||
+
|
||||
+ /* Reset the port on port resume */
|
||||
+ phy_set_bits(phydev, MII_BMCR, BMCR_RESET | BMCR_ANENABLE);
|
||||
+
|
||||
+ /* On resume from suspend the switch execute a reset and
|
||||
+ * restart auto-negotiation. Wait for reset to complete.
|
||||
+ */
|
||||
+ ret = phy_read_poll_timeout(phydev, MII_BMCR, val, !(val & BMCR_RESET),
|
||||
+ 50000, 600000, true);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ msleep(1);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int qca83xx_suspend(struct phy_device *phydev)
|
||||
+{
|
||||
+ u16 mask = 0;
|
||||
+
|
||||
+ /* Only QCA8337 support actual suspend.
|
||||
+ * QCA8327 cause port unreliability when phy suspend
|
||||
+ * is set.
|
||||
+ */
|
||||
+ if (phydev->drv->phy_id == QCA8337_PHY_ID) {
|
||||
+ genphy_suspend(phydev);
|
||||
+ } else {
|
||||
+ mask |= ~(BMCR_SPEED1000 | BMCR_FULLDPLX);
|
||||
+ phy_modify(phydev, MII_BMCR, mask, 0);
|
||||
+ }
|
||||
+
|
||||
+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_3D,
|
||||
+ AT803X_DEBUG_GATE_CLK_IN1000, 0);
|
||||
+
|
||||
+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_HIB_CTRL,
|
||||
+ AT803X_DEBUG_HIB_CTRL_EN_ANY_CHANGE |
|
||||
+ AT803X_DEBUG_HIB_CTRL_SEL_RST_80U, 0);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static struct phy_driver at803x_driver[] = {
|
||||
{
|
||||
/* Qualcomm Atheros AR8035 */
|
||||
@@ -1421,8 +1478,8 @@ static struct phy_driver at803x_driver[]
|
||||
.get_sset_count = at803x_get_sset_count,
|
||||
.get_strings = at803x_get_strings,
|
||||
.get_stats = at803x_get_stats,
|
||||
- .suspend = genphy_suspend,
|
||||
- .resume = genphy_resume,
|
||||
+ .suspend = qca83xx_suspend,
|
||||
+ .resume = qca83xx_resume,
|
||||
}, {
|
||||
/* QCA8327-A from switch QCA8327-AL1A */
|
||||
.phy_id = QCA8327_A_PHY_ID,
|
||||
@@ -1436,8 +1493,8 @@ static struct phy_driver at803x_driver[]
|
||||
.get_sset_count = at803x_get_sset_count,
|
||||
.get_strings = at803x_get_strings,
|
||||
.get_stats = at803x_get_stats,
|
||||
- .suspend = genphy_suspend,
|
||||
- .resume = genphy_resume,
|
||||
+ .suspend = qca83xx_suspend,
|
||||
+ .resume = qca83xx_resume,
|
||||
}, {
|
||||
/* QCA8327-B from switch QCA8327-BL1A */
|
||||
.phy_id = QCA8327_B_PHY_ID,
|
||||
@@ -1451,8 +1508,8 @@ static struct phy_driver at803x_driver[]
|
||||
.get_sset_count = at803x_get_sset_count,
|
||||
.get_strings = at803x_get_strings,
|
||||
.get_stats = at803x_get_stats,
|
||||
- .suspend = genphy_suspend,
|
||||
- .resume = genphy_resume,
|
||||
+ .suspend = qca83xx_suspend,
|
||||
+ .resume = qca83xx_resume,
|
||||
}, };
|
||||
|
||||
module_phy_driver(at803x_driver);
|
|
@ -0,0 +1,91 @@
|
|||
From 1ca8311949aec5c9447645731ef1c6bc5bd71350 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Sun, 10 Oct 2021 00:46:16 +0200
|
||||
Subject: net: phy: at803x: add DAC amplitude fix for 8327 phy
|
||||
|
||||
QCA8327 internal phy require DAC amplitude adjustement set to +6% with
|
||||
100m speed. Also add additional define to report a change of the same
|
||||
reg in QCA8337. (different scope it does set 1000m voltage)
|
||||
Add link_change_notify function to set the proper amplitude adjustement
|
||||
on PHY_RUNNING state and disable on any other state.
|
||||
|
||||
Fixes: b4df02b562f4 ("net: phy: at803x: add support for qca 8327 A variant internal phy")
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 33 +++++++++++++++++++++++++++++++++
|
||||
1 file changed, 33 insertions(+)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -87,6 +87,8 @@
|
||||
#define AT803X_PSSR_MR_AN_COMPLETE 0x0200
|
||||
|
||||
#define AT803X_DEBUG_REG_0 0x00
|
||||
+#define QCA8327_DEBUG_MANU_CTRL_EN BIT(2)
|
||||
+#define QCA8337_DEBUG_MANU_CTRL_EN GENMASK(3, 2)
|
||||
#define AT803X_DEBUG_RX_CLK_DLY_EN BIT(15)
|
||||
|
||||
#define AT803X_DEBUG_REG_5 0x05
|
||||
@@ -1314,9 +1316,37 @@ static int qca83xx_config_init(struct ph
|
||||
break;
|
||||
}
|
||||
|
||||
+ /* QCA8327 require DAC amplitude adjustment for 100m set to +6%.
|
||||
+ * Disable on init and enable only with 100m speed following
|
||||
+ * qca original source code.
|
||||
+ */
|
||||
+ if (phydev->drv->phy_id == QCA8327_A_PHY_ID ||
|
||||
+ phydev->drv->phy_id == QCA8327_B_PHY_ID)
|
||||
+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0,
|
||||
+ QCA8327_DEBUG_MANU_CTRL_EN, 0);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static void qca83xx_link_change_notify(struct phy_device *phydev)
|
||||
+{
|
||||
+ /* QCA8337 doesn't require DAC Amplitude adjustement */
|
||||
+ if (phydev->drv->phy_id == QCA8337_PHY_ID)
|
||||
+ return;
|
||||
+
|
||||
+ /* Set DAC Amplitude adjustment to +6% for 100m on link running */
|
||||
+ if (phydev->state == PHY_RUNNING) {
|
||||
+ if (phydev->speed == SPEED_100)
|
||||
+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0,
|
||||
+ QCA8327_DEBUG_MANU_CTRL_EN,
|
||||
+ QCA8327_DEBUG_MANU_CTRL_EN);
|
||||
+ } else {
|
||||
+ /* Reset DAC Amplitude adjustment */
|
||||
+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0,
|
||||
+ QCA8327_DEBUG_MANU_CTRL_EN, 0);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static int qca83xx_resume(struct phy_device *phydev)
|
||||
{
|
||||
int ret, val;
|
||||
@@ -1471,6 +1501,7 @@ static struct phy_driver at803x_driver[]
|
||||
.phy_id_mask = QCA8K_PHY_ID_MASK,
|
||||
.name = "Qualcomm Atheros 8337 internal PHY",
|
||||
/* PHY_GBIT_FEATURES */
|
||||
+ .link_change_notify = qca83xx_link_change_notify,
|
||||
.probe = at803x_probe,
|
||||
.flags = PHY_IS_INTERNAL,
|
||||
.config_init = qca83xx_config_init,
|
||||
@@ -1486,6 +1517,7 @@ static struct phy_driver at803x_driver[]
|
||||
.phy_id_mask = QCA8K_PHY_ID_MASK,
|
||||
.name = "Qualcomm Atheros 8327-A internal PHY",
|
||||
/* PHY_GBIT_FEATURES */
|
||||
+ .link_change_notify = qca83xx_link_change_notify,
|
||||
.probe = at803x_probe,
|
||||
.flags = PHY_IS_INTERNAL,
|
||||
.config_init = qca83xx_config_init,
|
||||
@@ -1501,6 +1533,7 @@ static struct phy_driver at803x_driver[]
|
||||
.phy_id_mask = QCA8K_PHY_ID_MASK,
|
||||
.name = "Qualcomm Atheros 8327-B internal PHY",
|
||||
/* PHY_GBIT_FEATURES */
|
||||
+ .link_change_notify = qca83xx_link_change_notify,
|
||||
.probe = at803x_probe,
|
||||
.flags = PHY_IS_INTERNAL,
|
||||
.config_init = qca83xx_config_init,
|
|
@ -0,0 +1,27 @@
|
|||
From 9d1c29b4028557a496be9c5eb2b4b86063700636 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Sun, 10 Oct 2021 00:46:17 +0200
|
||||
Subject: net: phy: at803x: enable prefer master for 83xx internal phy
|
||||
|
||||
From original QCA source code the port was set to prefer master as port
|
||||
type in 1000BASE-T mode. Apply the same settings also here.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -1325,6 +1325,9 @@ static int qca83xx_config_init(struct ph
|
||||
at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0,
|
||||
QCA8327_DEBUG_MANU_CTRL_EN, 0);
|
||||
|
||||
+ /* Following original QCA sourcecode set port to prefer master */
|
||||
+ phy_set_bits(phydev, MII_CTRL1000, CTL1000_PREFER_MASTER);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
From 67999555ff42e91de7654488d9a7735bd9e84555 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Sun, 10 Oct 2021 00:46:18 +0200
|
||||
Subject: net: phy: at803x: better describe debug regs
|
||||
|
||||
Give a name to known debug regs from Documentation instead of using
|
||||
unknown hex values.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/phy/at803x.c | 30 +++++++++++++++---------------
|
||||
1 file changed, 15 insertions(+), 15 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/at803x.c
|
||||
+++ b/drivers/net/phy/at803x.c
|
||||
@@ -86,12 +86,12 @@
|
||||
#define AT803X_PSSR 0x11 /*PHY-Specific Status Register*/
|
||||
#define AT803X_PSSR_MR_AN_COMPLETE 0x0200
|
||||
|
||||
-#define AT803X_DEBUG_REG_0 0x00
|
||||
+#define AT803X_DEBUG_ANALOG_TEST_CTRL 0x00
|
||||
#define QCA8327_DEBUG_MANU_CTRL_EN BIT(2)
|
||||
#define QCA8337_DEBUG_MANU_CTRL_EN GENMASK(3, 2)
|
||||
#define AT803X_DEBUG_RX_CLK_DLY_EN BIT(15)
|
||||
|
||||
-#define AT803X_DEBUG_REG_5 0x05
|
||||
+#define AT803X_DEBUG_SYSTEM_CTRL_MODE 0x05
|
||||
#define AT803X_DEBUG_TX_CLK_DLY_EN BIT(8)
|
||||
|
||||
#define AT803X_DEBUG_REG_HIB_CTRL 0x0b
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
#define AT803X_DEBUG_REG_3C 0x3C
|
||||
|
||||
-#define AT803X_DEBUG_REG_3D 0x3D
|
||||
+#define AT803X_DEBUG_REG_GREEN 0x3D
|
||||
#define AT803X_DEBUG_GATE_CLK_IN1000 BIT(6)
|
||||
|
||||
#define AT803X_DEBUG_REG_1F 0x1F
|
||||
@@ -284,25 +284,25 @@ static int at803x_read_page(struct phy_d
|
||||
|
||||
static int at803x_enable_rx_delay(struct phy_device *phydev)
|
||||
{
|
||||
- return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, 0,
|
||||
+ return at803x_debug_reg_mask(phydev, AT803X_DEBUG_ANALOG_TEST_CTRL, 0,
|
||||
AT803X_DEBUG_RX_CLK_DLY_EN);
|
||||
}
|
||||
|
||||
static int at803x_enable_tx_delay(struct phy_device *phydev)
|
||||
{
|
||||
- return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_5, 0,
|
||||
+ return at803x_debug_reg_mask(phydev, AT803X_DEBUG_SYSTEM_CTRL_MODE, 0,
|
||||
AT803X_DEBUG_TX_CLK_DLY_EN);
|
||||
}
|
||||
|
||||
static int at803x_disable_rx_delay(struct phy_device *phydev)
|
||||
{
|
||||
- return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0,
|
||||
+ return at803x_debug_reg_mask(phydev, AT803X_DEBUG_ANALOG_TEST_CTRL,
|
||||
AT803X_DEBUG_RX_CLK_DLY_EN, 0);
|
||||
}
|
||||
|
||||
static int at803x_disable_tx_delay(struct phy_device *phydev)
|
||||
{
|
||||
- return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_5,
|
||||
+ return at803x_debug_reg_mask(phydev, AT803X_DEBUG_SYSTEM_CTRL_MODE,
|
||||
AT803X_DEBUG_TX_CLK_DLY_EN, 0);
|
||||
}
|
||||
|
||||
@@ -1300,9 +1300,9 @@ static int qca83xx_config_init(struct ph
|
||||
switch (switch_revision) {
|
||||
case 1:
|
||||
/* For 100M waveform */
|
||||
- at803x_debug_reg_write(phydev, AT803X_DEBUG_REG_0, 0x02ea);
|
||||
+ at803x_debug_reg_write(phydev, AT803X_DEBUG_ANALOG_TEST_CTRL, 0x02ea);
|
||||
/* Turn on Gigabit clock */
|
||||
- at803x_debug_reg_write(phydev, AT803X_DEBUG_REG_3D, 0x68a0);
|
||||
+ at803x_debug_reg_write(phydev, AT803X_DEBUG_REG_GREEN, 0x68a0);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
@@ -1310,8 +1310,8 @@ static int qca83xx_config_init(struct ph
|
||||
fallthrough;
|
||||
case 4:
|
||||
phy_write_mmd(phydev, MDIO_MMD_PCS, MDIO_AZ_DEBUG, 0x803f);
|
||||
- at803x_debug_reg_write(phydev, AT803X_DEBUG_REG_3D, 0x6860);
|
||||
- at803x_debug_reg_write(phydev, AT803X_DEBUG_REG_5, 0x2c46);
|
||||
+ at803x_debug_reg_write(phydev, AT803X_DEBUG_REG_GREEN, 0x6860);
|
||||
+ at803x_debug_reg_write(phydev, AT803X_DEBUG_SYSTEM_CTRL_MODE, 0x2c46);
|
||||
at803x_debug_reg_write(phydev, AT803X_DEBUG_REG_3C, 0x6000);
|
||||
break;
|
||||
}
|
||||
@@ -1322,7 +1322,7 @@ static int qca83xx_config_init(struct ph
|
||||
*/
|
||||
if (phydev->drv->phy_id == QCA8327_A_PHY_ID ||
|
||||
phydev->drv->phy_id == QCA8327_B_PHY_ID)
|
||||
- at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0,
|
||||
+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_ANALOG_TEST_CTRL,
|
||||
QCA8327_DEBUG_MANU_CTRL_EN, 0);
|
||||
|
||||
/* Following original QCA sourcecode set port to prefer master */
|
||||
@@ -1340,12 +1340,12 @@ static void qca83xx_link_change_notify(s
|
||||
/* Set DAC Amplitude adjustment to +6% for 100m on link running */
|
||||
if (phydev->state == PHY_RUNNING) {
|
||||
if (phydev->speed == SPEED_100)
|
||||
- at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0,
|
||||
+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_ANALOG_TEST_CTRL,
|
||||
QCA8327_DEBUG_MANU_CTRL_EN,
|
||||
QCA8327_DEBUG_MANU_CTRL_EN);
|
||||
} else {
|
||||
/* Reset DAC Amplitude adjustment */
|
||||
- at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0,
|
||||
+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_ANALOG_TEST_CTRL,
|
||||
QCA8327_DEBUG_MANU_CTRL_EN, 0);
|
||||
}
|
||||
}
|
||||
@@ -1392,7 +1392,7 @@ static int qca83xx_suspend(struct phy_de
|
||||
phy_modify(phydev, MII_BMCR, mask, 0);
|
||||
}
|
||||
|
||||
- at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_3D,
|
||||
+ at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_GREEN,
|
||||
AT803X_DEBUG_GATE_CLK_IN1000, 0);
|
||||
|
||||
at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_HIB_CTRL,
|
|
@ -0,0 +1,80 @@
|
|||
From d8b6f5bae6d3b648a67b6958cb98e4e97256d652 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 00:39:06 +0200
|
||||
Subject: dsa: qca8k: add mac_power_sel support
|
||||
|
||||
Add missing mac power sel support needed for ipq8064/5 SoC that require
|
||||
1.8v for the internal regulator port instead of the default 1.5v.
|
||||
If other device needs this, consider adding a dedicated binding to
|
||||
support this.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/dsa/qca8k.c | 31 +++++++++++++++++++++++++++++++
|
||||
drivers/net/dsa/qca8k.h | 5 +++++
|
||||
2 files changed, 36 insertions(+)
|
||||
|
||||
--- a/drivers/net/dsa/qca8k.c
|
||||
+++ b/drivers/net/dsa/qca8k.c
|
||||
@@ -951,6 +951,33 @@ qca8k_setup_of_rgmii_delay(struct qca8k_
|
||||
}
|
||||
|
||||
static int
|
||||
+qca8k_setup_mac_pwr_sel(struct qca8k_priv *priv)
|
||||
+{
|
||||
+ u32 mask = 0;
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ /* SoC specific settings for ipq8064.
|
||||
+ * If more device require this consider adding
|
||||
+ * a dedicated binding.
|
||||
+ */
|
||||
+ if (of_machine_is_compatible("qcom,ipq8064"))
|
||||
+ mask |= QCA8K_MAC_PWR_RGMII0_1_8V;
|
||||
+
|
||||
+ /* SoC specific settings for ipq8065 */
|
||||
+ if (of_machine_is_compatible("qcom,ipq8065"))
|
||||
+ mask |= QCA8K_MAC_PWR_RGMII1_1_8V;
|
||||
+
|
||||
+ if (mask) {
|
||||
+ ret = qca8k_rmw(priv, QCA8K_REG_MAC_PWR_SEL,
|
||||
+ QCA8K_MAC_PWR_RGMII0_1_8V |
|
||||
+ QCA8K_MAC_PWR_RGMII1_1_8V,
|
||||
+ mask);
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
qca8k_setup(struct dsa_switch *ds)
|
||||
{
|
||||
struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
|
||||
@@ -979,6 +1006,10 @@ qca8k_setup(struct dsa_switch *ds)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+ ret = qca8k_setup_mac_pwr_sel(priv);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
/* Enable CPU Port */
|
||||
ret = qca8k_reg_set(priv, QCA8K_REG_GLOBAL_FW_CTRL0,
|
||||
QCA8K_GLOBAL_FW_CTRL0_CPU_PORT_EN);
|
||||
--- a/drivers/net/dsa/qca8k.h
|
||||
+++ b/drivers/net/dsa/qca8k.h
|
||||
@@ -100,6 +100,11 @@
|
||||
#define QCA8K_SGMII_MODE_CTRL_PHY (1 << 22)
|
||||
#define QCA8K_SGMII_MODE_CTRL_MAC (2 << 22)
|
||||
|
||||
+/* MAC_PWR_SEL registers */
|
||||
+#define QCA8K_REG_MAC_PWR_SEL 0x0e4
|
||||
+#define QCA8K_MAC_PWR_RGMII1_1_8V BIT(18)
|
||||
+#define QCA8K_MAC_PWR_RGMII0_1_8V BIT(19)
|
||||
+
|
||||
/* EEE control registers */
|
||||
#define QCA8K_REG_EEE_CTRL 0x100
|
||||
#define QCA8K_REG_EEE_CTRL_LPI_EN(_i) ((_i + 1) * 2)
|
|
@ -0,0 +1,30 @@
|
|||
From fdbf35df9c091db9c46e57e9938e3f7a4f603a7c Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 00:39:07 +0200
|
||||
Subject: dt-bindings: net: dsa: qca8k: Add SGMII clock phase properties
|
||||
|
||||
Add names and descriptions of additional PORT0_PAD_CTRL properties.
|
||||
qca,sgmii-(rx|tx)clk-falling-edge are for setting the respective clock
|
||||
phase to failling edge.
|
||||
|
||||
Co-developed-by: Matthew Hagan <mnhagan88@gmail.com>
|
||||
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
Documentation/devicetree/bindings/net/dsa/qca8k.txt | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt
|
||||
+++ b/Documentation/devicetree/bindings/net/dsa/qca8k.txt
|
||||
@@ -37,6 +37,10 @@ A CPU port node has the following option
|
||||
managed entity. See
|
||||
Documentation/devicetree/bindings/net/fixed-link.txt
|
||||
for details.
|
||||
+- qca,sgmii-rxclk-falling-edge: Set the receive clock phase to falling edge.
|
||||
+ Mostly used in qca8327 with CPU port 0 set to
|
||||
+ sgmii.
|
||||
+- qca,sgmii-txclk-falling-edge: Set the transmit clock phase to falling edge.
|
||||
|
||||
For QCA8K the 'fixed-link' sub-node supports only the following properties:
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
From 6c43809bf1bee76c434e365a26546a92a5fbec14 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 00:39:08 +0200
|
||||
Subject: net: dsa: qca8k: add support for sgmii falling edge
|
||||
|
||||
Add support for this in the qca8k driver. Also add support for SGMII
|
||||
rx/tx clock falling edge. This is only present for pad0, pad5 and
|
||||
pad6 have these bit reserved from Documentation. Add a comment that this
|
||||
is hardcoded to PAD0 as qca8327/28/34/37 have an unique sgmii line and
|
||||
setting falling in port0 applies to both configuration with sgmii used
|
||||
for port0 or port6.
|
||||
|
||||
Co-developed-by: Matthew Hagan <mnhagan88@gmail.com>
|
||||
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/dsa/qca8k.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
drivers/net/dsa/qca8k.h | 4 ++++
|
||||
2 files changed, 67 insertions(+)
|
||||
|
||||
--- a/drivers/net/dsa/qca8k.c
|
||||
+++ b/drivers/net/dsa/qca8k.c
|
||||
@@ -978,6 +978,42 @@ qca8k_setup_mac_pwr_sel(struct qca8k_pri
|
||||
}
|
||||
|
||||
static int
|
||||
+qca8k_parse_port_config(struct qca8k_priv *priv)
|
||||
+{
|
||||
+ struct device_node *port_dn;
|
||||
+ phy_interface_t mode;
|
||||
+ struct dsa_port *dp;
|
||||
+ int port, ret;
|
||||
+
|
||||
+ /* We have 2 CPU port. Check them */
|
||||
+ for (port = 0; port < QCA8K_NUM_PORTS; port++) {
|
||||
+ /* Skip every other port */
|
||||
+ if (port != 0 && port != 6)
|
||||
+ continue;
|
||||
+
|
||||
+ dp = dsa_to_port(priv->ds, port);
|
||||
+ port_dn = dp->dn;
|
||||
+
|
||||
+ if (!of_device_is_available(port_dn))
|
||||
+ continue;
|
||||
+
|
||||
+ ret = of_get_phy_mode(port_dn, &mode);
|
||||
+ if (ret)
|
||||
+ continue;
|
||||
+
|
||||
+ if (mode == PHY_INTERFACE_MODE_SGMII) {
|
||||
+ if (of_property_read_bool(port_dn, "qca,sgmii-txclk-falling-edge"))
|
||||
+ priv->sgmii_tx_clk_falling_edge = true;
|
||||
+
|
||||
+ if (of_property_read_bool(port_dn, "qca,sgmii-rxclk-falling-edge"))
|
||||
+ priv->sgmii_rx_clk_falling_edge = true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
qca8k_setup(struct dsa_switch *ds)
|
||||
{
|
||||
struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
|
||||
@@ -990,6 +1026,11 @@ qca8k_setup(struct dsa_switch *ds)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+ /* Parse CPU port config to be later used in phy_link mac_config */
|
||||
+ ret = qca8k_parse_port_config(priv);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
mutex_init(&priv->reg_mutex);
|
||||
|
||||
/* Start by setting up the register mapping */
|
||||
@@ -1274,6 +1315,28 @@ qca8k_phylink_mac_config(struct dsa_swit
|
||||
}
|
||||
|
||||
qca8k_write(priv, QCA8K_REG_SGMII_CTRL, val);
|
||||
+
|
||||
+ /* For qca8327/qca8328/qca8334/qca8338 sgmii is unique and
|
||||
+ * falling edge is set writing in the PORT0 PAD reg
|
||||
+ */
|
||||
+ if (priv->switch_id == QCA8K_ID_QCA8327 ||
|
||||
+ priv->switch_id == QCA8K_ID_QCA8337)
|
||||
+ reg = QCA8K_REG_PORT0_PAD_CTRL;
|
||||
+
|
||||
+ val = 0;
|
||||
+
|
||||
+ /* SGMII Clock phase configuration */
|
||||
+ if (priv->sgmii_rx_clk_falling_edge)
|
||||
+ val |= QCA8K_PORT0_PAD_SGMII_RXCLK_FALLING_EDGE;
|
||||
+
|
||||
+ if (priv->sgmii_tx_clk_falling_edge)
|
||||
+ val |= QCA8K_PORT0_PAD_SGMII_TXCLK_FALLING_EDGE;
|
||||
+
|
||||
+ if (val)
|
||||
+ ret = qca8k_rmw(priv, reg,
|
||||
+ QCA8K_PORT0_PAD_SGMII_RXCLK_FALLING_EDGE |
|
||||
+ QCA8K_PORT0_PAD_SGMII_TXCLK_FALLING_EDGE,
|
||||
+ val);
|
||||
break;
|
||||
default:
|
||||
dev_err(ds->dev, "xMII mode %s not supported for port %d\n",
|
||||
--- a/drivers/net/dsa/qca8k.h
|
||||
+++ b/drivers/net/dsa/qca8k.h
|
||||
@@ -35,6 +35,8 @@
|
||||
#define QCA8K_MASK_CTRL_DEVICE_ID_MASK GENMASK(15, 8)
|
||||
#define QCA8K_MASK_CTRL_DEVICE_ID(x) ((x) >> 8)
|
||||
#define QCA8K_REG_PORT0_PAD_CTRL 0x004
|
||||
+#define QCA8K_PORT0_PAD_SGMII_RXCLK_FALLING_EDGE BIT(19)
|
||||
+#define QCA8K_PORT0_PAD_SGMII_TXCLK_FALLING_EDGE BIT(18)
|
||||
#define QCA8K_REG_PORT5_PAD_CTRL 0x008
|
||||
#define QCA8K_REG_PORT6_PAD_CTRL 0x00c
|
||||
#define QCA8K_PORT_PAD_RGMII_EN BIT(26)
|
||||
@@ -260,6 +262,8 @@ struct qca8k_priv {
|
||||
u8 switch_revision;
|
||||
u8 rgmii_tx_delay;
|
||||
u8 rgmii_rx_delay;
|
||||
+ bool sgmii_rx_clk_falling_edge;
|
||||
+ bool sgmii_tx_clk_falling_edge;
|
||||
bool legacy_phy_port_mapping;
|
||||
struct regmap *regmap;
|
||||
struct mii_bus *bus;
|
|
@ -0,0 +1,29 @@
|
|||
From 731d613338ec6de482053ffa3f71be2325b0f8eb Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 00:39:09 +0200
|
||||
Subject: dt-bindings: net: dsa: qca8k: Document support for CPU port 6
|
||||
|
||||
The switch now support CPU port to be set 6 instead of be hardcoded to
|
||||
0. Document support for it and describe logic selection.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
Documentation/devicetree/bindings/net/dsa/qca8k.txt | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt
|
||||
+++ b/Documentation/devicetree/bindings/net/dsa/qca8k.txt
|
||||
@@ -29,7 +29,11 @@ the mdio MASTER is used as communication
|
||||
Don't use mixed external and internal mdio-bus configurations, as this is
|
||||
not supported by the hardware.
|
||||
|
||||
-The CPU port of this switch is always port 0.
|
||||
+This switch support 2 CPU port. Normally and advised configuration is with
|
||||
+CPU port set to port 0. It is also possible to set the CPU port to port 6
|
||||
+if the device requires it. The driver will configure the switch to the defined
|
||||
+port. With both CPU port declared the first CPU port is selected as primary
|
||||
+and the secondary CPU ignored.
|
||||
|
||||
A CPU port node has the following optional node:
|
||||
|
|
@ -0,0 +1,153 @@
|
|||
From 3fcf734aa482487df83cf8f18608438fcf59127f Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 00:39:10 +0200
|
||||
Subject: net: dsa: qca8k: add support for cpu port 6
|
||||
|
||||
Currently CPU port is always hardcoded to port 0. This switch have 2 CPU
|
||||
ports. The original intention of this driver seems to be use the
|
||||
mac06_exchange bit to swap MAC0 with MAC6 in the strange configuration
|
||||
where device have connected only the CPU port 6. To skip the
|
||||
introduction of a new binding, rework the driver to address the
|
||||
secondary CPU port as primary and drop any reference of hardcoded port.
|
||||
With configuration of mac06 exchange, just skip the definition of port0
|
||||
and define the CPU port as a secondary. The driver will autoconfigure
|
||||
the switch to use that as the primary CPU port.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/dsa/qca8k.c | 51 ++++++++++++++++++++++++++++++++++---------------
|
||||
drivers/net/dsa/qca8k.h | 2 --
|
||||
2 files changed, 36 insertions(+), 17 deletions(-)
|
||||
|
||||
--- a/drivers/net/dsa/qca8k.c
|
||||
+++ b/drivers/net/dsa/qca8k.c
|
||||
@@ -977,6 +977,22 @@ qca8k_setup_mac_pwr_sel(struct qca8k_pri
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static int qca8k_find_cpu_port(struct dsa_switch *ds)
|
||||
+{
|
||||
+ struct qca8k_priv *priv = ds->priv;
|
||||
+
|
||||
+ /* Find the connected cpu port. Valid port are 0 or 6 */
|
||||
+ if (dsa_is_cpu_port(ds, 0))
|
||||
+ return 0;
|
||||
+
|
||||
+ dev_dbg(priv->dev, "port 0 is not the CPU port. Checking port 6");
|
||||
+
|
||||
+ if (dsa_is_cpu_port(ds, 6))
|
||||
+ return 6;
|
||||
+
|
||||
+ return -EINVAL;
|
||||
+}
|
||||
+
|
||||
static int
|
||||
qca8k_parse_port_config(struct qca8k_priv *priv)
|
||||
{
|
||||
@@ -1017,13 +1033,13 @@ static int
|
||||
qca8k_setup(struct dsa_switch *ds)
|
||||
{
|
||||
struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
|
||||
- int ret, i;
|
||||
+ int cpu_port, ret, i;
|
||||
u32 mask;
|
||||
|
||||
- /* Make sure that port 0 is the cpu port */
|
||||
- if (!dsa_is_cpu_port(ds, 0)) {
|
||||
- dev_err(priv->dev, "port 0 is not the CPU port");
|
||||
- return -EINVAL;
|
||||
+ cpu_port = qca8k_find_cpu_port(ds);
|
||||
+ if (cpu_port < 0) {
|
||||
+ dev_err(priv->dev, "No cpu port configured in both cpu port0 and port6");
|
||||
+ return cpu_port;
|
||||
}
|
||||
|
||||
/* Parse CPU port config to be later used in phy_link mac_config */
|
||||
@@ -1065,7 +1081,7 @@ qca8k_setup(struct dsa_switch *ds)
|
||||
dev_warn(priv->dev, "mib init failed");
|
||||
|
||||
/* Enable QCA header mode on the cpu port */
|
||||
- ret = qca8k_write(priv, QCA8K_REG_PORT_HDR_CTRL(QCA8K_CPU_PORT),
|
||||
+ ret = qca8k_write(priv, QCA8K_REG_PORT_HDR_CTRL(cpu_port),
|
||||
QCA8K_PORT_HDR_CTRL_ALL << QCA8K_PORT_HDR_CTRL_TX_S |
|
||||
QCA8K_PORT_HDR_CTRL_ALL << QCA8K_PORT_HDR_CTRL_RX_S);
|
||||
if (ret) {
|
||||
@@ -1087,10 +1103,10 @@ qca8k_setup(struct dsa_switch *ds)
|
||||
|
||||
/* Forward all unknown frames to CPU port for Linux processing */
|
||||
ret = qca8k_write(priv, QCA8K_REG_GLOBAL_FW_CTRL1,
|
||||
- BIT(0) << QCA8K_GLOBAL_FW_CTRL1_IGMP_DP_S |
|
||||
- BIT(0) << QCA8K_GLOBAL_FW_CTRL1_BC_DP_S |
|
||||
- BIT(0) << QCA8K_GLOBAL_FW_CTRL1_MC_DP_S |
|
||||
- BIT(0) << QCA8K_GLOBAL_FW_CTRL1_UC_DP_S);
|
||||
+ BIT(cpu_port) << QCA8K_GLOBAL_FW_CTRL1_IGMP_DP_S |
|
||||
+ BIT(cpu_port) << QCA8K_GLOBAL_FW_CTRL1_BC_DP_S |
|
||||
+ BIT(cpu_port) << QCA8K_GLOBAL_FW_CTRL1_MC_DP_S |
|
||||
+ BIT(cpu_port) << QCA8K_GLOBAL_FW_CTRL1_UC_DP_S);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -1098,7 +1114,7 @@ qca8k_setup(struct dsa_switch *ds)
|
||||
for (i = 0; i < QCA8K_NUM_PORTS; i++) {
|
||||
/* CPU port gets connected to all user ports of the switch */
|
||||
if (dsa_is_cpu_port(ds, i)) {
|
||||
- ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(QCA8K_CPU_PORT),
|
||||
+ ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(cpu_port),
|
||||
QCA8K_PORT_LOOKUP_MEMBER, dsa_user_ports(ds));
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -1110,7 +1126,7 @@ qca8k_setup(struct dsa_switch *ds)
|
||||
|
||||
ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(i),
|
||||
QCA8K_PORT_LOOKUP_MEMBER,
|
||||
- BIT(QCA8K_CPU_PORT));
|
||||
+ BIT(cpu_port));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -1616,9 +1632,12 @@ static int
|
||||
qca8k_port_bridge_join(struct dsa_switch *ds, int port, struct net_device *br)
|
||||
{
|
||||
struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
|
||||
- int port_mask = BIT(QCA8K_CPU_PORT);
|
||||
+ int port_mask, cpu_port;
|
||||
int i, ret;
|
||||
|
||||
+ cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
|
||||
+ port_mask = BIT(cpu_port);
|
||||
+
|
||||
for (i = 1; i < QCA8K_NUM_PORTS; i++) {
|
||||
if (dsa_to_port(ds, i)->bridge_dev != br)
|
||||
continue;
|
||||
@@ -1645,7 +1664,9 @@ static void
|
||||
qca8k_port_bridge_leave(struct dsa_switch *ds, int port, struct net_device *br)
|
||||
{
|
||||
struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
|
||||
- int i;
|
||||
+ int cpu_port, i;
|
||||
+
|
||||
+ cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
|
||||
|
||||
for (i = 1; i < QCA8K_NUM_PORTS; i++) {
|
||||
if (dsa_to_port(ds, i)->bridge_dev != br)
|
||||
@@ -1662,7 +1683,7 @@ qca8k_port_bridge_leave(struct dsa_switc
|
||||
* this port
|
||||
*/
|
||||
qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(port),
|
||||
- QCA8K_PORT_LOOKUP_MEMBER, BIT(QCA8K_CPU_PORT));
|
||||
+ QCA8K_PORT_LOOKUP_MEMBER, BIT(cpu_port));
|
||||
}
|
||||
|
||||
static int
|
||||
--- a/drivers/net/dsa/qca8k.h
|
||||
+++ b/drivers/net/dsa/qca8k.h
|
||||
@@ -24,8 +24,6 @@
|
||||
|
||||
#define QCA8K_NUM_FDB_RECORDS 2048
|
||||
|
||||
-#define QCA8K_CPU_PORT 0
|
||||
-
|
||||
#define QCA8K_PORT_VID_DEF 1
|
||||
|
||||
/* Global control registers */
|
|
@ -0,0 +1,295 @@
|
|||
From 5654ec78dd7e64b1e04777b24007344329e6a63b Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 00:39:11 +0200
|
||||
Subject: net: dsa: qca8k: rework rgmii delay logic and scan for cpu port 6
|
||||
|
||||
Future proof commit. This switch have 2 CPU ports and one valid
|
||||
configuration is first CPU port set to sgmii and second CPU port set to
|
||||
rgmii-id. The current implementation detects delay only for CPU port
|
||||
zero set to rgmii and doesn't count any delay set in a secondary CPU
|
||||
port. Drop the current delay scan function and move it to the sgmii
|
||||
parser function to generalize and implicitly add support for secondary
|
||||
CPU port set to rgmii-id. Introduce new logic where delay is enabled
|
||||
also with internal delay binding declared and rgmii set as PHY mode.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/dsa/qca8k.c | 165 ++++++++++++++++++++++++------------------------
|
||||
drivers/net/dsa/qca8k.h | 10 ++-
|
||||
2 files changed, 89 insertions(+), 86 deletions(-)
|
||||
|
||||
--- a/drivers/net/dsa/qca8k.c
|
||||
+++ b/drivers/net/dsa/qca8k.c
|
||||
@@ -889,68 +889,6 @@ qca8k_setup_mdio_bus(struct qca8k_priv *
|
||||
}
|
||||
|
||||
static int
|
||||
-qca8k_setup_of_rgmii_delay(struct qca8k_priv *priv)
|
||||
-{
|
||||
- struct device_node *port_dn;
|
||||
- phy_interface_t mode;
|
||||
- struct dsa_port *dp;
|
||||
- u32 val;
|
||||
-
|
||||
- /* CPU port is already checked */
|
||||
- dp = dsa_to_port(priv->ds, 0);
|
||||
-
|
||||
- port_dn = dp->dn;
|
||||
-
|
||||
- /* Check if port 0 is set to the correct type */
|
||||
- of_get_phy_mode(port_dn, &mode);
|
||||
- if (mode != PHY_INTERFACE_MODE_RGMII_ID &&
|
||||
- mode != PHY_INTERFACE_MODE_RGMII_RXID &&
|
||||
- mode != PHY_INTERFACE_MODE_RGMII_TXID) {
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- switch (mode) {
|
||||
- case PHY_INTERFACE_MODE_RGMII_ID:
|
||||
- case PHY_INTERFACE_MODE_RGMII_RXID:
|
||||
- if (of_property_read_u32(port_dn, "rx-internal-delay-ps", &val))
|
||||
- val = 2;
|
||||
- else
|
||||
- /* Switch regs accept value in ns, convert ps to ns */
|
||||
- val = val / 1000;
|
||||
-
|
||||
- if (val > QCA8K_MAX_DELAY) {
|
||||
- dev_err(priv->dev, "rgmii rx delay is limited to a max value of 3ns, setting to the max value");
|
||||
- val = 3;
|
||||
- }
|
||||
-
|
||||
- priv->rgmii_rx_delay = val;
|
||||
- /* Stop here if we need to check only for rx delay */
|
||||
- if (mode != PHY_INTERFACE_MODE_RGMII_ID)
|
||||
- break;
|
||||
-
|
||||
- fallthrough;
|
||||
- case PHY_INTERFACE_MODE_RGMII_TXID:
|
||||
- if (of_property_read_u32(port_dn, "tx-internal-delay-ps", &val))
|
||||
- val = 1;
|
||||
- else
|
||||
- /* Switch regs accept value in ns, convert ps to ns */
|
||||
- val = val / 1000;
|
||||
-
|
||||
- if (val > QCA8K_MAX_DELAY) {
|
||||
- dev_err(priv->dev, "rgmii tx delay is limited to a max value of 3ns, setting to the max value");
|
||||
- val = 3;
|
||||
- }
|
||||
-
|
||||
- priv->rgmii_tx_delay = val;
|
||||
- break;
|
||||
- default:
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static int
|
||||
qca8k_setup_mac_pwr_sel(struct qca8k_priv *priv)
|
||||
{
|
||||
u32 mask = 0;
|
||||
@@ -996,19 +934,21 @@ static int qca8k_find_cpu_port(struct ds
|
||||
static int
|
||||
qca8k_parse_port_config(struct qca8k_priv *priv)
|
||||
{
|
||||
+ int port, cpu_port_index = 0, ret;
|
||||
struct device_node *port_dn;
|
||||
phy_interface_t mode;
|
||||
struct dsa_port *dp;
|
||||
- int port, ret;
|
||||
+ u32 delay;
|
||||
|
||||
/* We have 2 CPU port. Check them */
|
||||
- for (port = 0; port < QCA8K_NUM_PORTS; port++) {
|
||||
+ for (port = 0; port < QCA8K_NUM_PORTS && cpu_port_index < QCA8K_NUM_CPU_PORTS; port++) {
|
||||
/* Skip every other port */
|
||||
if (port != 0 && port != 6)
|
||||
continue;
|
||||
|
||||
dp = dsa_to_port(priv->ds, port);
|
||||
port_dn = dp->dn;
|
||||
+ cpu_port_index++;
|
||||
|
||||
if (!of_device_is_available(port_dn))
|
||||
continue;
|
||||
@@ -1017,12 +957,54 @@ qca8k_parse_port_config(struct qca8k_pri
|
||||
if (ret)
|
||||
continue;
|
||||
|
||||
- if (mode == PHY_INTERFACE_MODE_SGMII) {
|
||||
+ switch (mode) {
|
||||
+ case PHY_INTERFACE_MODE_RGMII:
|
||||
+ case PHY_INTERFACE_MODE_RGMII_ID:
|
||||
+ case PHY_INTERFACE_MODE_RGMII_TXID:
|
||||
+ case PHY_INTERFACE_MODE_RGMII_RXID:
|
||||
+ delay = 0;
|
||||
+
|
||||
+ if (!of_property_read_u32(port_dn, "tx-internal-delay-ps", &delay))
|
||||
+ /* Switch regs accept value in ns, convert ps to ns */
|
||||
+ delay = delay / 1000;
|
||||
+ else if (mode == PHY_INTERFACE_MODE_RGMII_ID ||
|
||||
+ mode == PHY_INTERFACE_MODE_RGMII_TXID)
|
||||
+ delay = 1;
|
||||
+
|
||||
+ if (delay > QCA8K_MAX_DELAY) {
|
||||
+ dev_err(priv->dev, "rgmii tx delay is limited to a max value of 3ns, setting to the max value");
|
||||
+ delay = 3;
|
||||
+ }
|
||||
+
|
||||
+ priv->rgmii_tx_delay[cpu_port_index] = delay;
|
||||
+
|
||||
+ delay = 0;
|
||||
+
|
||||
+ if (!of_property_read_u32(port_dn, "rx-internal-delay-ps", &delay))
|
||||
+ /* Switch regs accept value in ns, convert ps to ns */
|
||||
+ delay = delay / 1000;
|
||||
+ else if (mode == PHY_INTERFACE_MODE_RGMII_ID ||
|
||||
+ mode == PHY_INTERFACE_MODE_RGMII_RXID)
|
||||
+ delay = 2;
|
||||
+
|
||||
+ if (delay > QCA8K_MAX_DELAY) {
|
||||
+ dev_err(priv->dev, "rgmii rx delay is limited to a max value of 3ns, setting to the max value");
|
||||
+ delay = 3;
|
||||
+ }
|
||||
+
|
||||
+ priv->rgmii_rx_delay[cpu_port_index] = delay;
|
||||
+
|
||||
+ break;
|
||||
+ case PHY_INTERFACE_MODE_SGMII:
|
||||
if (of_property_read_bool(port_dn, "qca,sgmii-txclk-falling-edge"))
|
||||
priv->sgmii_tx_clk_falling_edge = true;
|
||||
|
||||
if (of_property_read_bool(port_dn, "qca,sgmii-rxclk-falling-edge"))
|
||||
priv->sgmii_rx_clk_falling_edge = true;
|
||||
+
|
||||
+ break;
|
||||
+ default:
|
||||
+ continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1059,10 +1041,6 @@ qca8k_setup(struct dsa_switch *ds)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- ret = qca8k_setup_of_rgmii_delay(priv);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
-
|
||||
ret = qca8k_setup_mac_pwr_sel(priv);
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -1229,8 +1207,8 @@ qca8k_phylink_mac_config(struct dsa_swit
|
||||
const struct phylink_link_state *state)
|
||||
{
|
||||
struct qca8k_priv *priv = ds->priv;
|
||||
- u32 reg, val;
|
||||
- int ret;
|
||||
+ int cpu_port_index, ret;
|
||||
+ u32 reg, val, delay;
|
||||
|
||||
switch (port) {
|
||||
case 0: /* 1st CPU port */
|
||||
@@ -1242,6 +1220,7 @@ qca8k_phylink_mac_config(struct dsa_swit
|
||||
return;
|
||||
|
||||
reg = QCA8K_REG_PORT0_PAD_CTRL;
|
||||
+ cpu_port_index = QCA8K_CPU_PORT0;
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
@@ -1260,6 +1239,7 @@ qca8k_phylink_mac_config(struct dsa_swit
|
||||
return;
|
||||
|
||||
reg = QCA8K_REG_PORT6_PAD_CTRL;
|
||||
+ cpu_port_index = QCA8K_CPU_PORT6;
|
||||
break;
|
||||
default:
|
||||
dev_err(ds->dev, "%s: unsupported port: %i\n", __func__, port);
|
||||
@@ -1274,23 +1254,40 @@ qca8k_phylink_mac_config(struct dsa_swit
|
||||
|
||||
switch (state->interface) {
|
||||
case PHY_INTERFACE_MODE_RGMII:
|
||||
- /* RGMII mode means no delay so don't enable the delay */
|
||||
- qca8k_write(priv, reg, QCA8K_PORT_PAD_RGMII_EN);
|
||||
- break;
|
||||
case PHY_INTERFACE_MODE_RGMII_ID:
|
||||
case PHY_INTERFACE_MODE_RGMII_TXID:
|
||||
case PHY_INTERFACE_MODE_RGMII_RXID:
|
||||
- /* RGMII_ID needs internal delay. This is enabled through
|
||||
- * PORT5_PAD_CTRL for all ports, rather than individual port
|
||||
- * registers
|
||||
+ val = QCA8K_PORT_PAD_RGMII_EN;
|
||||
+
|
||||
+ /* Delay can be declared in 3 different way.
|
||||
+ * Mode to rgmii and internal-delay standard binding defined
|
||||
+ * rgmii-id or rgmii-tx/rx phy mode set.
|
||||
+ * The parse logic set a delay different than 0 only when one
|
||||
+ * of the 3 different way is used. In all other case delay is
|
||||
+ * not enabled. With ID or TX/RXID delay is enabled and set
|
||||
+ * to the default and recommended value.
|
||||
+ */
|
||||
+ if (priv->rgmii_tx_delay[cpu_port_index]) {
|
||||
+ delay = priv->rgmii_tx_delay[cpu_port_index];
|
||||
+
|
||||
+ val |= QCA8K_PORT_PAD_RGMII_TX_DELAY(delay) |
|
||||
+ QCA8K_PORT_PAD_RGMII_TX_DELAY_EN;
|
||||
+ }
|
||||
+
|
||||
+ if (priv->rgmii_rx_delay[cpu_port_index]) {
|
||||
+ delay = priv->rgmii_rx_delay[cpu_port_index];
|
||||
+
|
||||
+ val |= QCA8K_PORT_PAD_RGMII_RX_DELAY(delay) |
|
||||
+ QCA8K_PORT_PAD_RGMII_RX_DELAY_EN;
|
||||
+ }
|
||||
+
|
||||
+ /* Set RGMII delay based on the selected values */
|
||||
+ qca8k_write(priv, reg, val);
|
||||
+
|
||||
+ /* QCA8337 requires to set rgmii rx delay for all ports.
|
||||
+ * This is enabled through PORT5_PAD_CTRL for all ports,
|
||||
+ * rather than individual port registers.
|
||||
*/
|
||||
- qca8k_write(priv, reg,
|
||||
- QCA8K_PORT_PAD_RGMII_EN |
|
||||
- QCA8K_PORT_PAD_RGMII_TX_DELAY(priv->rgmii_tx_delay) |
|
||||
- QCA8K_PORT_PAD_RGMII_RX_DELAY(priv->rgmii_rx_delay) |
|
||||
- QCA8K_PORT_PAD_RGMII_TX_DELAY_EN |
|
||||
- QCA8K_PORT_PAD_RGMII_RX_DELAY_EN);
|
||||
- /* QCA8337 requires to set rgmii rx delay */
|
||||
if (priv->switch_id == QCA8K_ID_QCA8337)
|
||||
qca8k_write(priv, QCA8K_REG_PORT5_PAD_CTRL,
|
||||
QCA8K_PORT_PAD_RGMII_RX_DELAY_EN);
|
||||
--- a/drivers/net/dsa/qca8k.h
|
||||
+++ b/drivers/net/dsa/qca8k.h
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#define QCA8K_NUM_PORTS 7
|
||||
+#define QCA8K_NUM_CPU_PORTS 2
|
||||
#define QCA8K_MAX_MTU 9000
|
||||
|
||||
#define PHY_ID_QCA8327 0x004dd034
|
||||
@@ -255,13 +256,18 @@ struct qca8k_match_data {
|
||||
u8 id;
|
||||
};
|
||||
|
||||
+enum {
|
||||
+ QCA8K_CPU_PORT0,
|
||||
+ QCA8K_CPU_PORT6,
|
||||
+};
|
||||
+
|
||||
struct qca8k_priv {
|
||||
u8 switch_id;
|
||||
u8 switch_revision;
|
||||
- u8 rgmii_tx_delay;
|
||||
- u8 rgmii_rx_delay;
|
||||
bool sgmii_rx_clk_falling_edge;
|
||||
bool sgmii_tx_clk_falling_edge;
|
||||
+ u8 rgmii_rx_delay[QCA8K_NUM_CPU_PORTS]; /* 0: CPU port0, 1: CPU port6 */
|
||||
+ u8 rgmii_tx_delay[QCA8K_NUM_CPU_PORTS]; /* 0: CPU port0, 1: CPU port6 */
|
||||
bool legacy_phy_port_mapping;
|
||||
struct regmap *regmap;
|
||||
struct mii_bus *bus;
|
|
@ -0,0 +1,33 @@
|
|||
From 13ad5ccc093ff448b99ac7e138e91e78796adb48 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 00:39:12 +0200
|
||||
Subject: dt-bindings: net: dsa: qca8k: Document qca,sgmii-enable-pll
|
||||
|
||||
Document qca,sgmii-enable-pll binding used in the CPU nodes to
|
||||
enable SGMII PLL on MAC config.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
Documentation/devicetree/bindings/net/dsa/qca8k.txt | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt
|
||||
+++ b/Documentation/devicetree/bindings/net/dsa/qca8k.txt
|
||||
@@ -45,6 +45,16 @@ A CPU port node has the following option
|
||||
Mostly used in qca8327 with CPU port 0 set to
|
||||
sgmii.
|
||||
- qca,sgmii-txclk-falling-edge: Set the transmit clock phase to falling edge.
|
||||
+- qca,sgmii-enable-pll : For SGMII CPU port, explicitly enable PLL, TX and RX
|
||||
+ chain along with Signal Detection.
|
||||
+ This should NOT be enabled for qca8327. If enabled with
|
||||
+ qca8327 the sgmii port won't correctly init and an err
|
||||
+ is printed.
|
||||
+ This can be required for qca8337 switch with revision 2.
|
||||
+ A warning is displayed when used with revision greater
|
||||
+ 2.
|
||||
+ With CPU port set to sgmii and qca8337 it is advised
|
||||
+ to set this unless a communication problem is observed.
|
||||
|
||||
For QCA8K the 'fixed-link' sub-node supports only the following properties:
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
From bbc4799e8bb6c397e3b3fec13de68e179f5db9ff Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 00:39:13 +0200
|
||||
Subject: net: dsa: qca8k: add explicit SGMII PLL enable
|
||||
|
||||
Support enabling PLL on the SGMII CPU port. Some device require this
|
||||
special configuration or no traffic is transmitted and the switch
|
||||
doesn't work at all. A dedicated binding is added to the CPU node
|
||||
port to apply the correct reg on mac config.
|
||||
Fail to correctly configure sgmii with qca8327 switch and warn if pll is
|
||||
used on qca8337 with a revision greater than 1.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/dsa/qca8k.c | 19 +++++++++++++++++--
|
||||
drivers/net/dsa/qca8k.h | 1 +
|
||||
2 files changed, 18 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/dsa/qca8k.c
|
||||
+++ b/drivers/net/dsa/qca8k.c
|
||||
@@ -1002,6 +1002,18 @@ qca8k_parse_port_config(struct qca8k_pri
|
||||
if (of_property_read_bool(port_dn, "qca,sgmii-rxclk-falling-edge"))
|
||||
priv->sgmii_rx_clk_falling_edge = true;
|
||||
|
||||
+ if (of_property_read_bool(port_dn, "qca,sgmii-enable-pll")) {
|
||||
+ priv->sgmii_enable_pll = true;
|
||||
+
|
||||
+ if (priv->switch_id == QCA8K_ID_QCA8327) {
|
||||
+ dev_err(priv->dev, "SGMII PLL should NOT be enabled for qca8327. Aborting enabling");
|
||||
+ priv->sgmii_enable_pll = false;
|
||||
+ }
|
||||
+
|
||||
+ if (priv->switch_revision < 2)
|
||||
+ dev_warn(priv->dev, "SGMII PLL should NOT be enabled for qca8337 with revision 2 or more.");
|
||||
+ }
|
||||
+
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
@@ -1312,8 +1324,11 @@ qca8k_phylink_mac_config(struct dsa_swit
|
||||
if (ret)
|
||||
return;
|
||||
|
||||
- val |= QCA8K_SGMII_EN_PLL | QCA8K_SGMII_EN_RX |
|
||||
- QCA8K_SGMII_EN_TX | QCA8K_SGMII_EN_SD;
|
||||
+ val |= QCA8K_SGMII_EN_SD;
|
||||
+
|
||||
+ if (priv->sgmii_enable_pll)
|
||||
+ val |= QCA8K_SGMII_EN_PLL | QCA8K_SGMII_EN_RX |
|
||||
+ QCA8K_SGMII_EN_TX;
|
||||
|
||||
if (dsa_is_cpu_port(ds, port)) {
|
||||
/* CPU port, we're talking to the CPU MAC, be a PHY */
|
||||
--- a/drivers/net/dsa/qca8k.h
|
||||
+++ b/drivers/net/dsa/qca8k.h
|
||||
@@ -266,6 +266,7 @@ struct qca8k_priv {
|
||||
u8 switch_revision;
|
||||
bool sgmii_rx_clk_falling_edge;
|
||||
bool sgmii_tx_clk_falling_edge;
|
||||
+ bool sgmii_enable_pll;
|
||||
u8 rgmii_rx_delay[QCA8K_NUM_CPU_PORTS]; /* 0: CPU port0, 1: CPU port6 */
|
||||
u8 rgmii_tx_delay[QCA8K_NUM_CPU_PORTS]; /* 0: CPU port0, 1: CPU port6 */
|
||||
bool legacy_phy_port_mapping;
|
|
@ -0,0 +1,37 @@
|
|||
From 924087c5c3d41553700b0eb83ca2a53b91643dca Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 00:39:14 +0200
|
||||
Subject: dt-bindings: net: dsa: qca8k: Document qca,led-open-drain binding
|
||||
|
||||
Document new binding qca,ignore-power-on-sel used to ignore
|
||||
power on strapping and use sw regs instead.
|
||||
Document qca,led-open.drain to set led to open drain mode, the
|
||||
qca,ignore-power-on-sel is mandatory with this enabled or an error will
|
||||
be reported.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
Documentation/devicetree/bindings/net/dsa/qca8k.txt | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt
|
||||
+++ b/Documentation/devicetree/bindings/net/dsa/qca8k.txt
|
||||
@@ -13,6 +13,17 @@ Required properties:
|
||||
Optional properties:
|
||||
|
||||
- reset-gpios: GPIO to be used to reset the whole device
|
||||
+- qca,ignore-power-on-sel: Ignore power on pin strapping to configure led open
|
||||
+ drain or eeprom presence. This is needed for broken
|
||||
+ devices that have wrong configuration or when the oem
|
||||
+ decided to not use pin strapping and fallback to sw
|
||||
+ regs.
|
||||
+- qca,led-open-drain: Set leds to open-drain mode. This requires the
|
||||
+ qca,ignore-power-on-sel to be set or the driver will fail
|
||||
+ to probe. This is needed if the oem doesn't use pin
|
||||
+ strapping to set this mode and prefers to set it using sw
|
||||
+ regs. The pin strapping related to led open drain mode is
|
||||
+ the pin B68 for QCA832x and B49 for QCA833x
|
||||
|
||||
Subnodes:
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
From 362bb238d8bf1470424214a8a5968d9c6cce68fa Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 00:39:15 +0200
|
||||
Subject: net: dsa: qca8k: add support for pws config reg
|
||||
|
||||
Some qca8327 switch require to force the ignore of power on sel
|
||||
strapping. Some switch require to set the led open drain mode in regs
|
||||
instead of using strapping. While most of the device implements this
|
||||
using the correct way using pin strapping, there are still some broken
|
||||
device that require to be set using sw regs.
|
||||
Introduce a new binding and support these special configuration.
|
||||
As led open drain require to ignore pin strapping to work, the probe
|
||||
fails with EINVAL error with incorrect configuration.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/dsa/qca8k.c | 39 +++++++++++++++++++++++++++++++++++++++
|
||||
drivers/net/dsa/qca8k.h | 6 ++++++
|
||||
2 files changed, 45 insertions(+)
|
||||
|
||||
--- a/drivers/net/dsa/qca8k.c
|
||||
+++ b/drivers/net/dsa/qca8k.c
|
||||
@@ -932,6 +932,41 @@ static int qca8k_find_cpu_port(struct ds
|
||||
}
|
||||
|
||||
static int
|
||||
+qca8k_setup_of_pws_reg(struct qca8k_priv *priv)
|
||||
+{
|
||||
+ struct device_node *node = priv->dev->of_node;
|
||||
+ u32 val = 0;
|
||||
+ int ret;
|
||||
+
|
||||
+ /* QCA8327 require to set to the correct mode.
|
||||
+ * His bigger brother QCA8328 have the 172 pin layout.
|
||||
+ * Should be applied by default but we set this just to make sure.
|
||||
+ */
|
||||
+ if (priv->switch_id == QCA8K_ID_QCA8327) {
|
||||
+ ret = qca8k_rmw(priv, QCA8K_REG_PWS, QCA8327_PWS_PACKAGE148_EN,
|
||||
+ QCA8327_PWS_PACKAGE148_EN);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ if (of_property_read_bool(node, "qca,ignore-power-on-sel"))
|
||||
+ val |= QCA8K_PWS_POWER_ON_SEL;
|
||||
+
|
||||
+ if (of_property_read_bool(node, "qca,led-open-drain")) {
|
||||
+ if (!(val & QCA8K_PWS_POWER_ON_SEL)) {
|
||||
+ dev_err(priv->dev, "qca,led-open-drain require qca,ignore-power-on-sel to be set.");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ val |= QCA8K_PWS_LED_OPEN_EN_CSR;
|
||||
+ }
|
||||
+
|
||||
+ return qca8k_rmw(priv, QCA8K_REG_PWS,
|
||||
+ QCA8K_PWS_LED_OPEN_EN_CSR | QCA8K_PWS_POWER_ON_SEL,
|
||||
+ val);
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
qca8k_parse_port_config(struct qca8k_priv *priv)
|
||||
{
|
||||
int port, cpu_port_index = 0, ret;
|
||||
@@ -1053,6 +1088,10 @@ qca8k_setup(struct dsa_switch *ds)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+ ret = qca8k_setup_of_pws_reg(priv);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
ret = qca8k_setup_mac_pwr_sel(priv);
|
||||
if (ret)
|
||||
return ret;
|
||||
--- a/drivers/net/dsa/qca8k.h
|
||||
+++ b/drivers/net/dsa/qca8k.h
|
||||
@@ -46,6 +46,12 @@
|
||||
#define QCA8K_MAX_DELAY 3
|
||||
#define QCA8K_PORT_PAD_SGMII_EN BIT(7)
|
||||
#define QCA8K_REG_PWS 0x010
|
||||
+#define QCA8K_PWS_POWER_ON_SEL BIT(31)
|
||||
+/* This reg is only valid for QCA832x and toggle the package
|
||||
+ * type from 176 pin (by default) to 148 pin used on QCA8327
|
||||
+ */
|
||||
+#define QCA8327_PWS_PACKAGE148_EN BIT(30)
|
||||
+#define QCA8K_PWS_LED_OPEN_EN_CSR BIT(24)
|
||||
#define QCA8K_PWS_SERDES_AEN_DIS BIT(7)
|
||||
#define QCA8K_REG_MODULE_EN 0x030
|
||||
#define QCA8K_MODULE_EN_MIB BIT(0)
|
|
@ -0,0 +1,32 @@
|
|||
From ed7988d77fbfb79366b68f9e7fa60a6080da23d4 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 00:39:16 +0200
|
||||
Subject: dt-bindings: net: dsa: qca8k: document support for qca8328
|
||||
|
||||
QCA8328 is the bigger brother of qca8327. Document the new compatible
|
||||
binding and add some information to understand the various switch
|
||||
compatible.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
Documentation/devicetree/bindings/net/dsa/qca8k.txt | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt
|
||||
+++ b/Documentation/devicetree/bindings/net/dsa/qca8k.txt
|
||||
@@ -3,9 +3,10 @@
|
||||
Required properties:
|
||||
|
||||
- compatible: should be one of:
|
||||
- "qca,qca8327"
|
||||
- "qca,qca8334"
|
||||
- "qca,qca8337"
|
||||
+ "qca,qca8328": referenced as AR8328(N)-AK1(A/B) QFN 176 pin package
|
||||
+ "qca,qca8327": referenced as AR8327(N)-AL1A DR-QFN 148 pin package
|
||||
+ "qca,qca8334": referenced as QCA8334-AL3C QFN 88 pin package
|
||||
+ "qca,qca8337": referenced as QCA8337N-AL3(B/C) DR-QFN 148 pin package
|
||||
|
||||
- #size-cells: must be 0
|
||||
- #address-cells: must be 1
|
|
@ -0,0 +1,78 @@
|
|||
From f477d1c8bdbef4f400718238e350f16f521d2a3e Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 00:39:17 +0200
|
||||
Subject: net: dsa: qca8k: add support for QCA8328
|
||||
|
||||
QCA8328 switch is the bigger brother of the qca8327. Same regs different
|
||||
chip. Change the function to set the correct pin layout and introduce a
|
||||
new match_data to differentiate the 2 switch as they have the same ID
|
||||
and their internal PHY have the same ID.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/dsa/qca8k.c | 19 ++++++++++++++++---
|
||||
drivers/net/dsa/qca8k.h | 1 +
|
||||
2 files changed, 17 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/net/dsa/qca8k.c
|
||||
+++ b/drivers/net/dsa/qca8k.c
|
||||
@@ -935,6 +935,7 @@ static int
|
||||
qca8k_setup_of_pws_reg(struct qca8k_priv *priv)
|
||||
{
|
||||
struct device_node *node = priv->dev->of_node;
|
||||
+ const struct qca8k_match_data *data;
|
||||
u32 val = 0;
|
||||
int ret;
|
||||
|
||||
@@ -943,8 +944,14 @@ qca8k_setup_of_pws_reg(struct qca8k_priv
|
||||
* Should be applied by default but we set this just to make sure.
|
||||
*/
|
||||
if (priv->switch_id == QCA8K_ID_QCA8327) {
|
||||
+ data = of_device_get_match_data(priv->dev);
|
||||
+
|
||||
+ /* Set the correct package of 148 pin for QCA8327 */
|
||||
+ if (data->reduced_package)
|
||||
+ val |= QCA8327_PWS_PACKAGE148_EN;
|
||||
+
|
||||
ret = qca8k_rmw(priv, QCA8K_REG_PWS, QCA8327_PWS_PACKAGE148_EN,
|
||||
- QCA8327_PWS_PACKAGE148_EN);
|
||||
+ val);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
@@ -2105,7 +2112,12 @@ static int qca8k_resume(struct device *d
|
||||
static SIMPLE_DEV_PM_OPS(qca8k_pm_ops,
|
||||
qca8k_suspend, qca8k_resume);
|
||||
|
||||
-static const struct qca8k_match_data qca832x = {
|
||||
+static const struct qca8k_match_data qca8327 = {
|
||||
+ .id = QCA8K_ID_QCA8327,
|
||||
+ .reduced_package = true,
|
||||
+};
|
||||
+
|
||||
+static const struct qca8k_match_data qca8328 = {
|
||||
.id = QCA8K_ID_QCA8327,
|
||||
};
|
||||
|
||||
@@ -2114,7 +2126,8 @@ static const struct qca8k_match_data qca
|
||||
};
|
||||
|
||||
static const struct of_device_id qca8k_of_match[] = {
|
||||
- { .compatible = "qca,qca8327", .data = &qca832x },
|
||||
+ { .compatible = "qca,qca8327", .data = &qca8327 },
|
||||
+ { .compatible = "qca,qca8328", .data = &qca8328 },
|
||||
{ .compatible = "qca,qca8334", .data = &qca833x },
|
||||
{ .compatible = "qca,qca8337", .data = &qca833x },
|
||||
{ /* sentinel */ },
|
||||
--- a/drivers/net/dsa/qca8k.h
|
||||
+++ b/drivers/net/dsa/qca8k.h
|
||||
@@ -260,6 +260,7 @@ struct ar8xxx_port_status {
|
||||
|
||||
struct qca8k_match_data {
|
||||
u8 id;
|
||||
+ bool reduced_package;
|
||||
};
|
||||
|
||||
enum {
|
|
@ -0,0 +1,159 @@
|
|||
From cef08115846e581f80ff99abf7bf218da1840616 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 00:39:18 +0200
|
||||
Subject: net: dsa: qca8k: set internal delay also for sgmii
|
||||
|
||||
QCA original code report port instability and sa that SGMII also require
|
||||
to set internal delay. Generalize the rgmii delay function and apply the
|
||||
advised value if they are not defined in DT.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/dsa/qca8k.c | 88 +++++++++++++++++++++++++++++++++----------------
|
||||
drivers/net/dsa/qca8k.h | 2 ++
|
||||
2 files changed, 62 insertions(+), 28 deletions(-)
|
||||
|
||||
--- a/drivers/net/dsa/qca8k.c
|
||||
+++ b/drivers/net/dsa/qca8k.c
|
||||
@@ -1004,6 +1004,7 @@ qca8k_parse_port_config(struct qca8k_pri
|
||||
case PHY_INTERFACE_MODE_RGMII_ID:
|
||||
case PHY_INTERFACE_MODE_RGMII_TXID:
|
||||
case PHY_INTERFACE_MODE_RGMII_RXID:
|
||||
+ case PHY_INTERFACE_MODE_SGMII:
|
||||
delay = 0;
|
||||
|
||||
if (!of_property_read_u32(port_dn, "tx-internal-delay-ps", &delay))
|
||||
@@ -1036,8 +1037,13 @@ qca8k_parse_port_config(struct qca8k_pri
|
||||
|
||||
priv->rgmii_rx_delay[cpu_port_index] = delay;
|
||||
|
||||
- break;
|
||||
- case PHY_INTERFACE_MODE_SGMII:
|
||||
+ /* Skip sgmii parsing for rgmii* mode */
|
||||
+ if (mode == PHY_INTERFACE_MODE_RGMII ||
|
||||
+ mode == PHY_INTERFACE_MODE_RGMII_ID ||
|
||||
+ mode == PHY_INTERFACE_MODE_RGMII_TXID ||
|
||||
+ mode == PHY_INTERFACE_MODE_RGMII_RXID)
|
||||
+ break;
|
||||
+
|
||||
if (of_property_read_bool(port_dn, "qca,sgmii-txclk-falling-edge"))
|
||||
priv->sgmii_tx_clk_falling_edge = true;
|
||||
|
||||
@@ -1261,12 +1267,53 @@ qca8k_setup(struct dsa_switch *ds)
|
||||
}
|
||||
|
||||
static void
|
||||
+qca8k_mac_config_setup_internal_delay(struct qca8k_priv *priv, int cpu_port_index,
|
||||
+ u32 reg)
|
||||
+{
|
||||
+ u32 delay, val = 0;
|
||||
+ int ret;
|
||||
+
|
||||
+ /* Delay can be declared in 3 different way.
|
||||
+ * Mode to rgmii and internal-delay standard binding defined
|
||||
+ * rgmii-id or rgmii-tx/rx phy mode set.
|
||||
+ * The parse logic set a delay different than 0 only when one
|
||||
+ * of the 3 different way is used. In all other case delay is
|
||||
+ * not enabled. With ID or TX/RXID delay is enabled and set
|
||||
+ * to the default and recommended value.
|
||||
+ */
|
||||
+ if (priv->rgmii_tx_delay[cpu_port_index]) {
|
||||
+ delay = priv->rgmii_tx_delay[cpu_port_index];
|
||||
+
|
||||
+ val |= QCA8K_PORT_PAD_RGMII_TX_DELAY(delay) |
|
||||
+ QCA8K_PORT_PAD_RGMII_TX_DELAY_EN;
|
||||
+ }
|
||||
+
|
||||
+ if (priv->rgmii_rx_delay[cpu_port_index]) {
|
||||
+ delay = priv->rgmii_rx_delay[cpu_port_index];
|
||||
+
|
||||
+ val |= QCA8K_PORT_PAD_RGMII_RX_DELAY(delay) |
|
||||
+ QCA8K_PORT_PAD_RGMII_RX_DELAY_EN;
|
||||
+ }
|
||||
+
|
||||
+ /* Set RGMII delay based on the selected values */
|
||||
+ ret = qca8k_rmw(priv, reg,
|
||||
+ QCA8K_PORT_PAD_RGMII_TX_DELAY_MASK |
|
||||
+ QCA8K_PORT_PAD_RGMII_RX_DELAY_MASK |
|
||||
+ QCA8K_PORT_PAD_RGMII_TX_DELAY_EN |
|
||||
+ QCA8K_PORT_PAD_RGMII_RX_DELAY_EN,
|
||||
+ val);
|
||||
+ if (ret)
|
||||
+ dev_err(priv->dev, "Failed to set internal delay for CPU port%d",
|
||||
+ cpu_port_index == QCA8K_CPU_PORT0 ? 0 : 6);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
qca8k_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
|
||||
const struct phylink_link_state *state)
|
||||
{
|
||||
struct qca8k_priv *priv = ds->priv;
|
||||
int cpu_port_index, ret;
|
||||
- u32 reg, val, delay;
|
||||
+ u32 reg, val;
|
||||
|
||||
switch (port) {
|
||||
case 0: /* 1st CPU port */
|
||||
@@ -1315,32 +1362,10 @@ qca8k_phylink_mac_config(struct dsa_swit
|
||||
case PHY_INTERFACE_MODE_RGMII_ID:
|
||||
case PHY_INTERFACE_MODE_RGMII_TXID:
|
||||
case PHY_INTERFACE_MODE_RGMII_RXID:
|
||||
- val = QCA8K_PORT_PAD_RGMII_EN;
|
||||
-
|
||||
- /* Delay can be declared in 3 different way.
|
||||
- * Mode to rgmii and internal-delay standard binding defined
|
||||
- * rgmii-id or rgmii-tx/rx phy mode set.
|
||||
- * The parse logic set a delay different than 0 only when one
|
||||
- * of the 3 different way is used. In all other case delay is
|
||||
- * not enabled. With ID or TX/RXID delay is enabled and set
|
||||
- * to the default and recommended value.
|
||||
- */
|
||||
- if (priv->rgmii_tx_delay[cpu_port_index]) {
|
||||
- delay = priv->rgmii_tx_delay[cpu_port_index];
|
||||
-
|
||||
- val |= QCA8K_PORT_PAD_RGMII_TX_DELAY(delay) |
|
||||
- QCA8K_PORT_PAD_RGMII_TX_DELAY_EN;
|
||||
- }
|
||||
-
|
||||
- if (priv->rgmii_rx_delay[cpu_port_index]) {
|
||||
- delay = priv->rgmii_rx_delay[cpu_port_index];
|
||||
-
|
||||
- val |= QCA8K_PORT_PAD_RGMII_RX_DELAY(delay) |
|
||||
- QCA8K_PORT_PAD_RGMII_RX_DELAY_EN;
|
||||
- }
|
||||
+ qca8k_write(priv, reg, QCA8K_PORT_PAD_RGMII_EN);
|
||||
|
||||
- /* Set RGMII delay based on the selected values */
|
||||
- qca8k_write(priv, reg, val);
|
||||
+ /* Configure rgmii delay */
|
||||
+ qca8k_mac_config_setup_internal_delay(priv, cpu_port_index, reg);
|
||||
|
||||
/* QCA8337 requires to set rgmii rx delay for all ports.
|
||||
* This is enabled through PORT5_PAD_CTRL for all ports,
|
||||
@@ -1411,6 +1436,13 @@ qca8k_phylink_mac_config(struct dsa_swit
|
||||
QCA8K_PORT0_PAD_SGMII_RXCLK_FALLING_EDGE |
|
||||
QCA8K_PORT0_PAD_SGMII_TXCLK_FALLING_EDGE,
|
||||
val);
|
||||
+
|
||||
+ /* From original code is reported port instability as SGMII also
|
||||
+ * require delay set. Apply advised values here or take them from DT.
|
||||
+ */
|
||||
+ if (state->interface == PHY_INTERFACE_MODE_SGMII)
|
||||
+ qca8k_mac_config_setup_internal_delay(priv, cpu_port_index, reg);
|
||||
+
|
||||
break;
|
||||
default:
|
||||
dev_err(ds->dev, "xMII mode %s not supported for port %d\n",
|
||||
--- a/drivers/net/dsa/qca8k.h
|
||||
+++ b/drivers/net/dsa/qca8k.h
|
||||
@@ -39,7 +39,9 @@
|
||||
#define QCA8K_REG_PORT5_PAD_CTRL 0x008
|
||||
#define QCA8K_REG_PORT6_PAD_CTRL 0x00c
|
||||
#define QCA8K_PORT_PAD_RGMII_EN BIT(26)
|
||||
+#define QCA8K_PORT_PAD_RGMII_TX_DELAY_MASK GENMASK(23, 22)
|
||||
#define QCA8K_PORT_PAD_RGMII_TX_DELAY(x) ((x) << 22)
|
||||
+#define QCA8K_PORT_PAD_RGMII_RX_DELAY_MASK GENMASK(21, 20)
|
||||
#define QCA8K_PORT_PAD_RGMII_RX_DELAY(x) ((x) << 20)
|
||||
#define QCA8K_PORT_PAD_RGMII_TX_DELAY_EN BIT(25)
|
||||
#define QCA8K_PORT_PAD_RGMII_RX_DELAY_EN BIT(24)
|
|
@ -0,0 +1,124 @@
|
|||
From fd0bb28c547f7c8affb1691128cece38f5b626a1 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 00:39:19 +0200
|
||||
Subject: net: dsa: qca8k: move port config to dedicated struct
|
||||
|
||||
Move ports related config to dedicated struct to keep things organized.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/dsa/qca8k.c | 26 +++++++++++++-------------
|
||||
drivers/net/dsa/qca8k.h | 10 +++++++---
|
||||
2 files changed, 20 insertions(+), 16 deletions(-)
|
||||
|
||||
--- a/drivers/net/dsa/qca8k.c
|
||||
+++ b/drivers/net/dsa/qca8k.c
|
||||
@@ -1019,7 +1019,7 @@ qca8k_parse_port_config(struct qca8k_pri
|
||||
delay = 3;
|
||||
}
|
||||
|
||||
- priv->rgmii_tx_delay[cpu_port_index] = delay;
|
||||
+ priv->ports_config.rgmii_tx_delay[cpu_port_index] = delay;
|
||||
|
||||
delay = 0;
|
||||
|
||||
@@ -1035,7 +1035,7 @@ qca8k_parse_port_config(struct qca8k_pri
|
||||
delay = 3;
|
||||
}
|
||||
|
||||
- priv->rgmii_rx_delay[cpu_port_index] = delay;
|
||||
+ priv->ports_config.rgmii_rx_delay[cpu_port_index] = delay;
|
||||
|
||||
/* Skip sgmii parsing for rgmii* mode */
|
||||
if (mode == PHY_INTERFACE_MODE_RGMII ||
|
||||
@@ -1045,17 +1045,17 @@ qca8k_parse_port_config(struct qca8k_pri
|
||||
break;
|
||||
|
||||
if (of_property_read_bool(port_dn, "qca,sgmii-txclk-falling-edge"))
|
||||
- priv->sgmii_tx_clk_falling_edge = true;
|
||||
+ priv->ports_config.sgmii_tx_clk_falling_edge = true;
|
||||
|
||||
if (of_property_read_bool(port_dn, "qca,sgmii-rxclk-falling-edge"))
|
||||
- priv->sgmii_rx_clk_falling_edge = true;
|
||||
+ priv->ports_config.sgmii_rx_clk_falling_edge = true;
|
||||
|
||||
if (of_property_read_bool(port_dn, "qca,sgmii-enable-pll")) {
|
||||
- priv->sgmii_enable_pll = true;
|
||||
+ priv->ports_config.sgmii_enable_pll = true;
|
||||
|
||||
if (priv->switch_id == QCA8K_ID_QCA8327) {
|
||||
dev_err(priv->dev, "SGMII PLL should NOT be enabled for qca8327. Aborting enabling");
|
||||
- priv->sgmii_enable_pll = false;
|
||||
+ priv->ports_config.sgmii_enable_pll = false;
|
||||
}
|
||||
|
||||
if (priv->switch_revision < 2)
|
||||
@@ -1281,15 +1281,15 @@ qca8k_mac_config_setup_internal_delay(st
|
||||
* not enabled. With ID or TX/RXID delay is enabled and set
|
||||
* to the default and recommended value.
|
||||
*/
|
||||
- if (priv->rgmii_tx_delay[cpu_port_index]) {
|
||||
- delay = priv->rgmii_tx_delay[cpu_port_index];
|
||||
+ if (priv->ports_config.rgmii_tx_delay[cpu_port_index]) {
|
||||
+ delay = priv->ports_config.rgmii_tx_delay[cpu_port_index];
|
||||
|
||||
val |= QCA8K_PORT_PAD_RGMII_TX_DELAY(delay) |
|
||||
QCA8K_PORT_PAD_RGMII_TX_DELAY_EN;
|
||||
}
|
||||
|
||||
- if (priv->rgmii_rx_delay[cpu_port_index]) {
|
||||
- delay = priv->rgmii_rx_delay[cpu_port_index];
|
||||
+ if (priv->ports_config.rgmii_rx_delay[cpu_port_index]) {
|
||||
+ delay = priv->ports_config.rgmii_rx_delay[cpu_port_index];
|
||||
|
||||
val |= QCA8K_PORT_PAD_RGMII_RX_DELAY(delay) |
|
||||
QCA8K_PORT_PAD_RGMII_RX_DELAY_EN;
|
||||
@@ -1397,7 +1397,7 @@ qca8k_phylink_mac_config(struct dsa_swit
|
||||
|
||||
val |= QCA8K_SGMII_EN_SD;
|
||||
|
||||
- if (priv->sgmii_enable_pll)
|
||||
+ if (priv->ports_config.sgmii_enable_pll)
|
||||
val |= QCA8K_SGMII_EN_PLL | QCA8K_SGMII_EN_RX |
|
||||
QCA8K_SGMII_EN_TX;
|
||||
|
||||
@@ -1425,10 +1425,10 @@ qca8k_phylink_mac_config(struct dsa_swit
|
||||
val = 0;
|
||||
|
||||
/* SGMII Clock phase configuration */
|
||||
- if (priv->sgmii_rx_clk_falling_edge)
|
||||
+ if (priv->ports_config.sgmii_rx_clk_falling_edge)
|
||||
val |= QCA8K_PORT0_PAD_SGMII_RXCLK_FALLING_EDGE;
|
||||
|
||||
- if (priv->sgmii_tx_clk_falling_edge)
|
||||
+ if (priv->ports_config.sgmii_tx_clk_falling_edge)
|
||||
val |= QCA8K_PORT0_PAD_SGMII_TXCLK_FALLING_EDGE;
|
||||
|
||||
if (val)
|
||||
--- a/drivers/net/dsa/qca8k.h
|
||||
+++ b/drivers/net/dsa/qca8k.h
|
||||
@@ -270,15 +270,19 @@ enum {
|
||||
QCA8K_CPU_PORT6,
|
||||
};
|
||||
|
||||
-struct qca8k_priv {
|
||||
- u8 switch_id;
|
||||
- u8 switch_revision;
|
||||
+struct qca8k_ports_config {
|
||||
bool sgmii_rx_clk_falling_edge;
|
||||
bool sgmii_tx_clk_falling_edge;
|
||||
bool sgmii_enable_pll;
|
||||
u8 rgmii_rx_delay[QCA8K_NUM_CPU_PORTS]; /* 0: CPU port0, 1: CPU port6 */
|
||||
u8 rgmii_tx_delay[QCA8K_NUM_CPU_PORTS]; /* 0: CPU port0, 1: CPU port6 */
|
||||
+};
|
||||
+
|
||||
+struct qca8k_priv {
|
||||
+ u8 switch_id;
|
||||
+ u8 switch_revision;
|
||||
bool legacy_phy_port_mapping;
|
||||
+ struct qca8k_ports_config ports_config;
|
||||
struct regmap *regmap;
|
||||
struct mii_bus *bus;
|
||||
struct ar8xxx_port_status port_sts[QCA8K_NUM_PORTS];
|
|
@ -0,0 +1,26 @@
|
|||
From e52073a8e3086046a098b8a7cbeb282ff0cdb424 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 00:39:20 +0200
|
||||
Subject: dt-bindings: net: ipq8064-mdio: fix warning with new qca8k switch
|
||||
|
||||
Fix warning now that we have qca8k switch Documentation using yaml.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml
|
||||
+++ b/Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml
|
||||
@@ -51,6 +51,9 @@ examples:
|
||||
switch@10 {
|
||||
compatible = "qca,qca8337";
|
||||
reg = <0x10>;
|
||||
- /* ... */
|
||||
+
|
||||
+ ports {
|
||||
+ /* ... */
|
||||
+ };
|
||||
};
|
||||
};
|
|
@ -0,0 +1,631 @@
|
|||
From d291fbb8245d5ba04979fed85575860a5cea7196 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Hagan <mnhagan88@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 00:39:21 +0200
|
||||
Subject: dt-bindings: net: dsa: qca8k: convert to YAML schema
|
||||
|
||||
Convert the qca8k bindings to YAML format.
|
||||
|
||||
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
|
||||
Co-developed-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
.../devicetree/bindings/net/dsa/qca8k.txt | 245 --------------
|
||||
.../devicetree/bindings/net/dsa/qca8k.yaml | 362 +++++++++++++++++++++
|
||||
2 files changed, 362 insertions(+), 245 deletions(-)
|
||||
delete mode 100644 Documentation/devicetree/bindings/net/dsa/qca8k.txt
|
||||
create mode 100644 Documentation/devicetree/bindings/net/dsa/qca8k.yaml
|
||||
|
||||
--- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt
|
||||
+++ /dev/null
|
||||
@@ -1,245 +0,0 @@
|
||||
-* Qualcomm Atheros QCA8xxx switch family
|
||||
-
|
||||
-Required properties:
|
||||
-
|
||||
-- compatible: should be one of:
|
||||
- "qca,qca8328": referenced as AR8328(N)-AK1(A/B) QFN 176 pin package
|
||||
- "qca,qca8327": referenced as AR8327(N)-AL1A DR-QFN 148 pin package
|
||||
- "qca,qca8334": referenced as QCA8334-AL3C QFN 88 pin package
|
||||
- "qca,qca8337": referenced as QCA8337N-AL3(B/C) DR-QFN 148 pin package
|
||||
-
|
||||
-- #size-cells: must be 0
|
||||
-- #address-cells: must be 1
|
||||
-
|
||||
-Optional properties:
|
||||
-
|
||||
-- reset-gpios: GPIO to be used to reset the whole device
|
||||
-- qca,ignore-power-on-sel: Ignore power on pin strapping to configure led open
|
||||
- drain or eeprom presence. This is needed for broken
|
||||
- devices that have wrong configuration or when the oem
|
||||
- decided to not use pin strapping and fallback to sw
|
||||
- regs.
|
||||
-- qca,led-open-drain: Set leds to open-drain mode. This requires the
|
||||
- qca,ignore-power-on-sel to be set or the driver will fail
|
||||
- to probe. This is needed if the oem doesn't use pin
|
||||
- strapping to set this mode and prefers to set it using sw
|
||||
- regs. The pin strapping related to led open drain mode is
|
||||
- the pin B68 for QCA832x and B49 for QCA833x
|
||||
-
|
||||
-Subnodes:
|
||||
-
|
||||
-The integrated switch subnode should be specified according to the binding
|
||||
-described in dsa/dsa.txt. If the QCA8K switch is connect to a SoC's external
|
||||
-mdio-bus each subnode describing a port needs to have a valid phandle
|
||||
-referencing the internal PHY it is connected to. This is because there's no
|
||||
-N:N mapping of port and PHY id.
|
||||
-To declare the internal mdio-bus configuration, declare a mdio node in the
|
||||
-switch node and declare the phandle for the port referencing the internal
|
||||
-PHY is connected to. In this config a internal mdio-bus is registered and
|
||||
-the mdio MASTER is used as communication.
|
||||
-
|
||||
-Don't use mixed external and internal mdio-bus configurations, as this is
|
||||
-not supported by the hardware.
|
||||
-
|
||||
-This switch support 2 CPU port. Normally and advised configuration is with
|
||||
-CPU port set to port 0. It is also possible to set the CPU port to port 6
|
||||
-if the device requires it. The driver will configure the switch to the defined
|
||||
-port. With both CPU port declared the first CPU port is selected as primary
|
||||
-and the secondary CPU ignored.
|
||||
-
|
||||
-A CPU port node has the following optional node:
|
||||
-
|
||||
-- fixed-link : Fixed-link subnode describing a link to a non-MDIO
|
||||
- managed entity. See
|
||||
- Documentation/devicetree/bindings/net/fixed-link.txt
|
||||
- for details.
|
||||
-- qca,sgmii-rxclk-falling-edge: Set the receive clock phase to falling edge.
|
||||
- Mostly used in qca8327 with CPU port 0 set to
|
||||
- sgmii.
|
||||
-- qca,sgmii-txclk-falling-edge: Set the transmit clock phase to falling edge.
|
||||
-- qca,sgmii-enable-pll : For SGMII CPU port, explicitly enable PLL, TX and RX
|
||||
- chain along with Signal Detection.
|
||||
- This should NOT be enabled for qca8327. If enabled with
|
||||
- qca8327 the sgmii port won't correctly init and an err
|
||||
- is printed.
|
||||
- This can be required for qca8337 switch with revision 2.
|
||||
- A warning is displayed when used with revision greater
|
||||
- 2.
|
||||
- With CPU port set to sgmii and qca8337 it is advised
|
||||
- to set this unless a communication problem is observed.
|
||||
-
|
||||
-For QCA8K the 'fixed-link' sub-node supports only the following properties:
|
||||
-
|
||||
-- 'speed' (integer, mandatory), to indicate the link speed. Accepted
|
||||
- values are 10, 100 and 1000
|
||||
-- 'full-duplex' (boolean, optional), to indicate that full duplex is
|
||||
- used. When absent, half duplex is assumed.
|
||||
-
|
||||
-Examples:
|
||||
-
|
||||
-for the external mdio-bus configuration:
|
||||
-
|
||||
- &mdio0 {
|
||||
- phy_port1: phy@0 {
|
||||
- reg = <0>;
|
||||
- };
|
||||
-
|
||||
- phy_port2: phy@1 {
|
||||
- reg = <1>;
|
||||
- };
|
||||
-
|
||||
- phy_port3: phy@2 {
|
||||
- reg = <2>;
|
||||
- };
|
||||
-
|
||||
- phy_port4: phy@3 {
|
||||
- reg = <3>;
|
||||
- };
|
||||
-
|
||||
- phy_port5: phy@4 {
|
||||
- reg = <4>;
|
||||
- };
|
||||
-
|
||||
- switch@10 {
|
||||
- compatible = "qca,qca8337";
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
-
|
||||
- reset-gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
|
||||
- reg = <0x10>;
|
||||
-
|
||||
- ports {
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
- port@0 {
|
||||
- reg = <0>;
|
||||
- label = "cpu";
|
||||
- ethernet = <&gmac1>;
|
||||
- phy-mode = "rgmii";
|
||||
- fixed-link {
|
||||
- speed = 1000;
|
||||
- full-duplex;
|
||||
- };
|
||||
- };
|
||||
-
|
||||
- port@1 {
|
||||
- reg = <1>;
|
||||
- label = "lan1";
|
||||
- phy-handle = <&phy_port1>;
|
||||
- };
|
||||
-
|
||||
- port@2 {
|
||||
- reg = <2>;
|
||||
- label = "lan2";
|
||||
- phy-handle = <&phy_port2>;
|
||||
- };
|
||||
-
|
||||
- port@3 {
|
||||
- reg = <3>;
|
||||
- label = "lan3";
|
||||
- phy-handle = <&phy_port3>;
|
||||
- };
|
||||
-
|
||||
- port@4 {
|
||||
- reg = <4>;
|
||||
- label = "lan4";
|
||||
- phy-handle = <&phy_port4>;
|
||||
- };
|
||||
-
|
||||
- port@5 {
|
||||
- reg = <5>;
|
||||
- label = "wan";
|
||||
- phy-handle = <&phy_port5>;
|
||||
- };
|
||||
- };
|
||||
- };
|
||||
- };
|
||||
-
|
||||
-for the internal master mdio-bus configuration:
|
||||
-
|
||||
- &mdio0 {
|
||||
- switch@10 {
|
||||
- compatible = "qca,qca8337";
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
-
|
||||
- reset-gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
|
||||
- reg = <0x10>;
|
||||
-
|
||||
- ports {
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
-
|
||||
- port@0 {
|
||||
- reg = <0>;
|
||||
- label = "cpu";
|
||||
- ethernet = <&gmac1>;
|
||||
- phy-mode = "rgmii";
|
||||
- fixed-link {
|
||||
- speed = 1000;
|
||||
- full-duplex;
|
||||
- };
|
||||
- };
|
||||
-
|
||||
- port@1 {
|
||||
- reg = <1>;
|
||||
- label = "lan1";
|
||||
- phy-mode = "internal";
|
||||
- phy-handle = <&phy_port1>;
|
||||
- };
|
||||
-
|
||||
- port@2 {
|
||||
- reg = <2>;
|
||||
- label = "lan2";
|
||||
- phy-mode = "internal";
|
||||
- phy-handle = <&phy_port2>;
|
||||
- };
|
||||
-
|
||||
- port@3 {
|
||||
- reg = <3>;
|
||||
- label = "lan3";
|
||||
- phy-mode = "internal";
|
||||
- phy-handle = <&phy_port3>;
|
||||
- };
|
||||
-
|
||||
- port@4 {
|
||||
- reg = <4>;
|
||||
- label = "lan4";
|
||||
- phy-mode = "internal";
|
||||
- phy-handle = <&phy_port4>;
|
||||
- };
|
||||
-
|
||||
- port@5 {
|
||||
- reg = <5>;
|
||||
- label = "wan";
|
||||
- phy-mode = "internal";
|
||||
- phy-handle = <&phy_port5>;
|
||||
- };
|
||||
- };
|
||||
-
|
||||
- mdio {
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
-
|
||||
- phy_port1: phy@0 {
|
||||
- reg = <0>;
|
||||
- };
|
||||
-
|
||||
- phy_port2: phy@1 {
|
||||
- reg = <1>;
|
||||
- };
|
||||
-
|
||||
- phy_port3: phy@2 {
|
||||
- reg = <2>;
|
||||
- };
|
||||
-
|
||||
- phy_port4: phy@3 {
|
||||
- reg = <3>;
|
||||
- };
|
||||
-
|
||||
- phy_port5: phy@4 {
|
||||
- reg = <4>;
|
||||
- };
|
||||
- };
|
||||
- };
|
||||
- };
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
|
||||
@@ -0,0 +1,362 @@
|
||||
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
+%YAML 1.2
|
||||
+---
|
||||
+$id: http://devicetree.org/schemas/net/dsa/qca8k.yaml#
|
||||
+$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
+
|
||||
+title: Qualcomm Atheros QCA83xx switch family
|
||||
+
|
||||
+maintainers:
|
||||
+ - John Crispin <john@phrozen.org>
|
||||
+
|
||||
+description:
|
||||
+ If the QCA8K switch is connect to an SoC's external mdio-bus, each subnode
|
||||
+ describing a port needs to have a valid phandle referencing the internal PHY
|
||||
+ it is connected to. This is because there is no N:N mapping of port and PHY
|
||||
+ ID. To declare the internal mdio-bus configuration, declare an MDIO node in
|
||||
+ the switch node and declare the phandle for the port, referencing the internal
|
||||
+ PHY it is connected to. In this config, an internal mdio-bus is registered and
|
||||
+ the MDIO master is used for communication. Mixed external and internal
|
||||
+ mdio-bus configurations are not supported by the hardware.
|
||||
+
|
||||
+properties:
|
||||
+ compatible:
|
||||
+ oneOf:
|
||||
+ - enum:
|
||||
+ - qca,qca8327
|
||||
+ - qca,qca8328
|
||||
+ - qca,qca8334
|
||||
+ - qca,qca8337
|
||||
+ description: |
|
||||
+ qca,qca8328: referenced as AR8328(N)-AK1(A/B) QFN 176 pin package
|
||||
+ qca,qca8327: referenced as AR8327(N)-AL1A DR-QFN 148 pin package
|
||||
+ qca,qca8334: referenced as QCA8334-AL3C QFN 88 pin package
|
||||
+ qca,qca8337: referenced as QCA8337N-AL3(B/C) DR-QFN 148 pin package
|
||||
+
|
||||
+ reg:
|
||||
+ maxItems: 1
|
||||
+
|
||||
+ reset-gpios:
|
||||
+ description:
|
||||
+ GPIO to be used to reset the whole device
|
||||
+ maxItems: 1
|
||||
+
|
||||
+ qca,ignore-power-on-sel:
|
||||
+ $ref: /schemas/types.yaml#/definitions/flag
|
||||
+ description:
|
||||
+ Ignore power-on pin strapping to configure LED open-drain or EEPROM
|
||||
+ presence. This is needed for devices with incorrect configuration or when
|
||||
+ the OEM has decided not to use pin strapping and falls back to SW regs.
|
||||
+
|
||||
+ qca,led-open-drain:
|
||||
+ $ref: /schemas/types.yaml#/definitions/flag
|
||||
+ description:
|
||||
+ Set LEDs to open-drain mode. This requires the qca,ignore-power-on-sel to
|
||||
+ be set, otherwise the driver will fail at probe. This is required if the
|
||||
+ OEM does not use pin strapping to set this mode and prefers to set it
|
||||
+ using SW regs. The pin strappings related to LED open-drain mode are
|
||||
+ B68 on the QCA832x and B49 on the QCA833x.
|
||||
+
|
||||
+ mdio:
|
||||
+ type: object
|
||||
+ description: Qca8k switch have an internal mdio to access switch port.
|
||||
+ If this is not present, the legacy mapping is used and the
|
||||
+ internal mdio access is used.
|
||||
+ With the legacy mapping the reg corresponding to the internal
|
||||
+ mdio is the switch reg with an offset of -1.
|
||||
+
|
||||
+ properties:
|
||||
+ '#address-cells':
|
||||
+ const: 1
|
||||
+ '#size-cells':
|
||||
+ const: 0
|
||||
+
|
||||
+ patternProperties:
|
||||
+ "^(ethernet-)?phy@[0-4]$":
|
||||
+ type: object
|
||||
+
|
||||
+ allOf:
|
||||
+ - $ref: "http://devicetree.org/schemas/net/mdio.yaml#"
|
||||
+
|
||||
+ properties:
|
||||
+ reg:
|
||||
+ maxItems: 1
|
||||
+
|
||||
+ required:
|
||||
+ - reg
|
||||
+
|
||||
+patternProperties:
|
||||
+ "^(ethernet-)?ports$":
|
||||
+ type: object
|
||||
+ properties:
|
||||
+ '#address-cells':
|
||||
+ const: 1
|
||||
+ '#size-cells':
|
||||
+ const: 0
|
||||
+
|
||||
+ patternProperties:
|
||||
+ "^(ethernet-)?port@[0-6]$":
|
||||
+ type: object
|
||||
+ description: Ethernet switch ports
|
||||
+
|
||||
+ properties:
|
||||
+ reg:
|
||||
+ description: Port number
|
||||
+
|
||||
+ label:
|
||||
+ description:
|
||||
+ Describes the label associated with this port, which will become
|
||||
+ the netdev name
|
||||
+ $ref: /schemas/types.yaml#/definitions/string
|
||||
+
|
||||
+ link:
|
||||
+ description:
|
||||
+ Should be a list of phandles to other switch's DSA port. This
|
||||
+ port is used as the outgoing port towards the phandle ports. The
|
||||
+ full routing information must be given, not just the one hop
|
||||
+ routes to neighbouring switches
|
||||
+ $ref: /schemas/types.yaml#/definitions/phandle-array
|
||||
+
|
||||
+ ethernet:
|
||||
+ description:
|
||||
+ Should be a phandle to a valid Ethernet device node. This host
|
||||
+ device is what the switch port is connected to
|
||||
+ $ref: /schemas/types.yaml#/definitions/phandle
|
||||
+
|
||||
+ phy-handle: true
|
||||
+
|
||||
+ phy-mode: true
|
||||
+
|
||||
+ fixed-link: true
|
||||
+
|
||||
+ mac-address: true
|
||||
+
|
||||
+ sfp: true
|
||||
+
|
||||
+ qca,sgmii-rxclk-falling-edge:
|
||||
+ $ref: /schemas/types.yaml#/definitions/flag
|
||||
+ description:
|
||||
+ Set the receive clock phase to falling edge. Mostly commonly used on
|
||||
+ the QCA8327 with CPU port 0 set to SGMII.
|
||||
+
|
||||
+ qca,sgmii-txclk-falling-edge:
|
||||
+ $ref: /schemas/types.yaml#/definitions/flag
|
||||
+ description:
|
||||
+ Set the transmit clock phase to falling edge.
|
||||
+
|
||||
+ qca,sgmii-enable-pll:
|
||||
+ $ref: /schemas/types.yaml#/definitions/flag
|
||||
+ description:
|
||||
+ For SGMII CPU port, explicitly enable PLL, TX and RX chain along with
|
||||
+ Signal Detection. On the QCA8327 this should not be enabled, otherwise
|
||||
+ the SGMII port will not initialize. When used on the QCA8337, revision 3
|
||||
+ or greater, a warning will be displayed. When the CPU port is set to
|
||||
+ SGMII on the QCA8337, it is advised to set this unless a communication
|
||||
+ issue is observed.
|
||||
+
|
||||
+ required:
|
||||
+ - reg
|
||||
+
|
||||
+ additionalProperties: false
|
||||
+
|
||||
+oneOf:
|
||||
+ - required:
|
||||
+ - ports
|
||||
+ - required:
|
||||
+ - ethernet-ports
|
||||
+
|
||||
+required:
|
||||
+ - compatible
|
||||
+ - reg
|
||||
+
|
||||
+additionalProperties: true
|
||||
+
|
||||
+examples:
|
||||
+ - |
|
||||
+ #include <dt-bindings/gpio/gpio.h>
|
||||
+
|
||||
+ mdio {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ external_phy_port1: ethernet-phy@0 {
|
||||
+ reg = <0>;
|
||||
+ };
|
||||
+
|
||||
+ external_phy_port2: ethernet-phy@1 {
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+
|
||||
+ external_phy_port3: ethernet-phy@2 {
|
||||
+ reg = <2>;
|
||||
+ };
|
||||
+
|
||||
+ external_phy_port4: ethernet-phy@3 {
|
||||
+ reg = <3>;
|
||||
+ };
|
||||
+
|
||||
+ external_phy_port5: ethernet-phy@4 {
|
||||
+ reg = <4>;
|
||||
+ };
|
||||
+
|
||||
+ switch@10 {
|
||||
+ compatible = "qca,qca8337";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reset-gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
|
||||
+ reg = <0x10>;
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ port@0 {
|
||||
+ reg = <0>;
|
||||
+ label = "cpu";
|
||||
+ ethernet = <&gmac1>;
|
||||
+ phy-mode = "rgmii";
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+ label = "lan1";
|
||||
+ phy-handle = <&external_phy_port1>;
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ reg = <2>;
|
||||
+ label = "lan2";
|
||||
+ phy-handle = <&external_phy_port2>;
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ reg = <3>;
|
||||
+ label = "lan3";
|
||||
+ phy-handle = <&external_phy_port3>;
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ reg = <4>;
|
||||
+ label = "lan4";
|
||||
+ phy-handle = <&external_phy_port4>;
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ reg = <5>;
|
||||
+ label = "wan";
|
||||
+ phy-handle = <&external_phy_port5>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ - |
|
||||
+ #include <dt-bindings/gpio/gpio.h>
|
||||
+
|
||||
+ mdio {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ switch@10 {
|
||||
+ compatible = "qca,qca8337";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reset-gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
|
||||
+ reg = <0x10>;
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ port@0 {
|
||||
+ reg = <0>;
|
||||
+ label = "cpu";
|
||||
+ ethernet = <&gmac1>;
|
||||
+ phy-mode = "rgmii";
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+ label = "lan1";
|
||||
+ phy-mode = "internal";
|
||||
+ phy-handle = <&internal_phy_port1>;
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ reg = <2>;
|
||||
+ label = "lan2";
|
||||
+ phy-mode = "internal";
|
||||
+ phy-handle = <&internal_phy_port2>;
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ reg = <3>;
|
||||
+ label = "lan3";
|
||||
+ phy-mode = "internal";
|
||||
+ phy-handle = <&internal_phy_port3>;
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ reg = <4>;
|
||||
+ label = "lan4";
|
||||
+ phy-mode = "internal";
|
||||
+ phy-handle = <&internal_phy_port4>;
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ reg = <5>;
|
||||
+ label = "wan";
|
||||
+ phy-mode = "internal";
|
||||
+ phy-handle = <&internal_phy_port5>;
|
||||
+ };
|
||||
+
|
||||
+ port@6 {
|
||||
+ reg = <0>;
|
||||
+ label = "cpu";
|
||||
+ ethernet = <&gmac1>;
|
||||
+ phy-mode = "sgmii";
|
||||
+
|
||||
+ qca,sgmii-rxclk-falling-edge;
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ mdio {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ internal_phy_port1: ethernet-phy@0 {
|
||||
+ reg = <0>;
|
||||
+ };
|
||||
+
|
||||
+ internal_phy_port2: ethernet-phy@1 {
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+
|
||||
+ internal_phy_port3: ethernet-phy@2 {
|
||||
+ reg = <2>;
|
||||
+ };
|
||||
+
|
||||
+ internal_phy_port4: ethernet-phy@3 {
|
||||
+ reg = <3>;
|
||||
+ };
|
||||
+
|
||||
+ internal_phy_port5: ethernet-phy@4 {
|
||||
+ reg = <4>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
|
@ -0,0 +1,28 @@
|
|||
From 06dd34a628ae5b6a839b757e746de165d6789ca8 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Sun, 17 Oct 2021 16:56:46 +0200
|
||||
Subject: net: dsa: qca8k: fix delay applied to wrong cpu in parse_port_config
|
||||
|
||||
Fix delay settings applied to wrong cpu in parse_port_config. The delay
|
||||
values is set to the wrong index as the cpu_port_index is incremented
|
||||
too early. Start the cpu_port_index to -1 so the correct value is
|
||||
applied to address also the case with invalid phy mode and not available
|
||||
port.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/dsa/qca8k.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/dsa/qca8k.c
|
||||
+++ b/drivers/net/dsa/qca8k.c
|
||||
@@ -976,7 +976,7 @@ qca8k_setup_of_pws_reg(struct qca8k_priv
|
||||
static int
|
||||
qca8k_parse_port_config(struct qca8k_priv *priv)
|
||||
{
|
||||
- int port, cpu_port_index = 0, ret;
|
||||
+ int port, cpu_port_index = -1, ret;
|
||||
struct device_node *port_dn;
|
||||
phy_interface_t mode;
|
||||
struct dsa_port *dp;
|
|
@ -0,0 +1,151 @@
|
|||
From 040e926f5813a5f4cc18dbff7c942d1e52f368f2 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Tue, 19 Oct 2021 02:08:50 +0200
|
||||
Subject: net: dsa: qca8k: tidy for loop in setup and add cpu port check
|
||||
|
||||
Tidy and organize qca8k setup function from multiple for loop.
|
||||
Change for loop in bridge leave/join to scan all port and skip cpu port.
|
||||
No functional change intended.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/dsa/qca8k.c | 74 +++++++++++++++++++++++++++++--------------------
|
||||
1 file changed, 44 insertions(+), 30 deletions(-)
|
||||
|
||||
--- a/drivers/net/dsa/qca8k.c
|
||||
+++ b/drivers/net/dsa/qca8k.c
|
||||
@@ -1122,28 +1122,34 @@ qca8k_setup(struct dsa_switch *ds)
|
||||
if (ret)
|
||||
dev_warn(priv->dev, "mib init failed");
|
||||
|
||||
- /* Enable QCA header mode on the cpu port */
|
||||
- ret = qca8k_write(priv, QCA8K_REG_PORT_HDR_CTRL(cpu_port),
|
||||
- QCA8K_PORT_HDR_CTRL_ALL << QCA8K_PORT_HDR_CTRL_TX_S |
|
||||
- QCA8K_PORT_HDR_CTRL_ALL << QCA8K_PORT_HDR_CTRL_RX_S);
|
||||
- if (ret) {
|
||||
- dev_err(priv->dev, "failed enabling QCA header mode");
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- /* Disable forwarding by default on all ports */
|
||||
+ /* Initial setup of all ports */
|
||||
for (i = 0; i < QCA8K_NUM_PORTS; i++) {
|
||||
+ /* Disable forwarding by default on all ports */
|
||||
ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(i),
|
||||
QCA8K_PORT_LOOKUP_MEMBER, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
- }
|
||||
|
||||
- /* Disable MAC by default on all ports */
|
||||
- for (i = 1; i < QCA8K_NUM_PORTS; i++)
|
||||
- qca8k_port_set_status(priv, i, 0);
|
||||
+ /* Enable QCA header mode on all cpu ports */
|
||||
+ if (dsa_is_cpu_port(ds, i)) {
|
||||
+ ret = qca8k_write(priv, QCA8K_REG_PORT_HDR_CTRL(i),
|
||||
+ QCA8K_PORT_HDR_CTRL_ALL << QCA8K_PORT_HDR_CTRL_TX_S |
|
||||
+ QCA8K_PORT_HDR_CTRL_ALL << QCA8K_PORT_HDR_CTRL_RX_S);
|
||||
+ if (ret) {
|
||||
+ dev_err(priv->dev, "failed enabling QCA header mode");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Disable MAC by default on all user ports */
|
||||
+ if (dsa_is_user_port(ds, i))
|
||||
+ qca8k_port_set_status(priv, i, 0);
|
||||
+ }
|
||||
|
||||
- /* Forward all unknown frames to CPU port for Linux processing */
|
||||
+ /* Forward all unknown frames to CPU port for Linux processing
|
||||
+ * Notice that in multi-cpu config only one port should be set
|
||||
+ * for igmp, unknown, multicast and broadcast packet
|
||||
+ */
|
||||
ret = qca8k_write(priv, QCA8K_REG_GLOBAL_FW_CTRL1,
|
||||
BIT(cpu_port) << QCA8K_GLOBAL_FW_CTRL1_IGMP_DP_S |
|
||||
BIT(cpu_port) << QCA8K_GLOBAL_FW_CTRL1_BC_DP_S |
|
||||
@@ -1152,11 +1158,13 @@ qca8k_setup(struct dsa_switch *ds)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- /* Setup connection between CPU port & user ports */
|
||||
+ /* Setup connection between CPU port & user ports
|
||||
+ * Configure specific switch configuration for ports
|
||||
+ */
|
||||
for (i = 0; i < QCA8K_NUM_PORTS; i++) {
|
||||
/* CPU port gets connected to all user ports of the switch */
|
||||
if (dsa_is_cpu_port(ds, i)) {
|
||||
- ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(cpu_port),
|
||||
+ ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(i),
|
||||
QCA8K_PORT_LOOKUP_MEMBER, dsa_user_ports(ds));
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -1193,16 +1201,14 @@ qca8k_setup(struct dsa_switch *ds)
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
- }
|
||||
|
||||
- /* The port 5 of the qca8337 have some problem in flood condition. The
|
||||
- * original legacy driver had some specific buffer and priority settings
|
||||
- * for the different port suggested by the QCA switch team. Add this
|
||||
- * missing settings to improve switch stability under load condition.
|
||||
- * This problem is limited to qca8337 and other qca8k switch are not affected.
|
||||
- */
|
||||
- if (priv->switch_id == QCA8K_ID_QCA8337) {
|
||||
- for (i = 0; i < QCA8K_NUM_PORTS; i++) {
|
||||
+ /* The port 5 of the qca8337 have some problem in flood condition. The
|
||||
+ * original legacy driver had some specific buffer and priority settings
|
||||
+ * for the different port suggested by the QCA switch team. Add this
|
||||
+ * missing settings to improve switch stability under load condition.
|
||||
+ * This problem is limited to qca8337 and other qca8k switch are not affected.
|
||||
+ */
|
||||
+ if (priv->switch_id == QCA8K_ID_QCA8337) {
|
||||
switch (i) {
|
||||
/* The 2 CPU port and port 5 requires some different
|
||||
* priority than any other ports.
|
||||
@@ -1238,6 +1244,12 @@ qca8k_setup(struct dsa_switch *ds)
|
||||
QCA8K_PORT_HOL_CTRL1_WRED_EN,
|
||||
mask);
|
||||
}
|
||||
+
|
||||
+ /* Set initial MTU for every port.
|
||||
+ * We have only have a general MTU setting. So track
|
||||
+ * every port and set the max across all port.
|
||||
+ */
|
||||
+ priv->port_mtu[i] = ETH_FRAME_LEN + ETH_FCS_LEN;
|
||||
}
|
||||
|
||||
/* Special GLOBAL_FC_THRESH value are needed for ar8327 switch */
|
||||
@@ -1251,8 +1263,6 @@ qca8k_setup(struct dsa_switch *ds)
|
||||
}
|
||||
|
||||
/* Setup our port MTUs to match power on defaults */
|
||||
- for (i = 0; i < QCA8K_NUM_PORTS; i++)
|
||||
- priv->port_mtu[i] = ETH_FRAME_LEN + ETH_FCS_LEN;
|
||||
ret = qca8k_write(priv, QCA8K_MAX_FRAME_SIZE, ETH_FRAME_LEN + ETH_FCS_LEN);
|
||||
if (ret)
|
||||
dev_warn(priv->dev, "failed setting MTU settings");
|
||||
@@ -1728,7 +1738,9 @@ qca8k_port_bridge_join(struct dsa_switch
|
||||
cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
|
||||
port_mask = BIT(cpu_port);
|
||||
|
||||
- for (i = 1; i < QCA8K_NUM_PORTS; i++) {
|
||||
+ for (i = 0; i < QCA8K_NUM_PORTS; i++) {
|
||||
+ if (dsa_is_cpu_port(ds, i))
|
||||
+ continue;
|
||||
if (dsa_to_port(ds, i)->bridge_dev != br)
|
||||
continue;
|
||||
/* Add this port to the portvlan mask of the other ports
|
||||
@@ -1758,7 +1770,9 @@ qca8k_port_bridge_leave(struct dsa_switc
|
||||
|
||||
cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
|
||||
|
||||
- for (i = 1; i < QCA8K_NUM_PORTS; i++) {
|
||||
+ for (i = 0; i < QCA8K_NUM_PORTS; i++) {
|
||||
+ if (dsa_is_cpu_port(ds, i))
|
||||
+ continue;
|
||||
if (dsa_to_port(ds, i)->bridge_dev != br)
|
||||
continue;
|
||||
/* Remove this port to the portvlan mask of the other ports
|
|
@ -0,0 +1,47 @@
|
|||
From 5f15d392dcb4aa250a63d6f2c5adfc26c0aedc78 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Tue, 2 Nov 2021 19:30:41 +0100
|
||||
Subject: net: dsa: qca8k: make sure PAD0 MAC06 exchange is disabled
|
||||
|
||||
Some device set MAC06 exchange in the bootloader. This cause some
|
||||
problem as we don't support this strange mode and we just set the port6
|
||||
as the primary CPU port. With MAC06 exchange, PAD0 reg configure port6
|
||||
instead of port0. Add an extra check and explicitly disable MAC06 exchange
|
||||
to correctly configure the port PAD config.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Fixes: 3fcf734aa482 ("net: dsa: qca8k: add support for cpu port 6")
|
||||
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/dsa/qca8k.c | 8 ++++++++
|
||||
drivers/net/dsa/qca8k.h | 1 +
|
||||
2 files changed, 9 insertions(+)
|
||||
|
||||
--- a/drivers/net/dsa/qca8k.c
|
||||
+++ b/drivers/net/dsa/qca8k.c
|
||||
@@ -1109,6 +1109,14 @@ qca8k_setup(struct dsa_switch *ds)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+ /* Make sure MAC06 is disabled */
|
||||
+ ret = qca8k_reg_clear(priv, QCA8K_REG_PORT0_PAD_CTRL,
|
||||
+ QCA8K_PORT0_PAD_MAC06_EXCHANGE_EN);
|
||||
+ if (ret) {
|
||||
+ dev_err(priv->dev, "failed disabling MAC06 exchange");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
/* Enable CPU Port */
|
||||
ret = qca8k_reg_set(priv, QCA8K_REG_GLOBAL_FW_CTRL0,
|
||||
QCA8K_GLOBAL_FW_CTRL0_CPU_PORT_EN);
|
||||
--- a/drivers/net/dsa/qca8k.h
|
||||
+++ b/drivers/net/dsa/qca8k.h
|
||||
@@ -34,6 +34,7 @@
|
||||
#define QCA8K_MASK_CTRL_DEVICE_ID_MASK GENMASK(15, 8)
|
||||
#define QCA8K_MASK_CTRL_DEVICE_ID(x) ((x) >> 8)
|
||||
#define QCA8K_REG_PORT0_PAD_CTRL 0x004
|
||||
+#define QCA8K_PORT0_PAD_MAC06_EXCHANGE_EN BIT(31)
|
||||
#define QCA8K_PORT0_PAD_SGMII_RXCLK_FALLING_EDGE BIT(19)
|
||||
#define QCA8K_PORT0_PAD_SGMII_TXCLK_FALLING_EDGE BIT(18)
|
||||
#define QCA8K_REG_PORT5_PAD_CTRL 0x008
|
|
@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -2324,6 +2324,13 @@ config UNUSED_KSYMS_WHITELIST
|
||||
@@ -2347,6 +2347,13 @@ config UNUSED_KSYMS_WHITELIST
|
||||
one per line. The path can be absolute, or relative to the kernel
|
||||
source tree.
|
||||
|
||||
|
@ -104,7 +104,23 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
config MODULES_TREE_LOOKUP
|
||||
--- a/kernel/module.c
|
||||
+++ b/kernel/module.c
|
||||
@@ -3227,9 +3227,11 @@ static int setup_load_info(struct load_i
|
||||
@@ -1218,6 +1218,7 @@ static struct module_attribute *modinfo_
|
||||
|
||||
static const char vermagic[] = VERMAGIC_STRING;
|
||||
|
||||
+#if defined(CONFIG_MODVERSIONS) || !defined(CONFIG_MODULE_STRIPPED)
|
||||
static int try_to_force_load(struct module *mod, const char *reason)
|
||||
{
|
||||
#ifdef CONFIG_MODULE_FORCE_LOAD
|
||||
@@ -1229,6 +1230,7 @@ static int try_to_force_load(struct modu
|
||||
return -ENOEXEC;
|
||||
#endif
|
||||
}
|
||||
+#endif
|
||||
|
||||
#ifdef CONFIG_MODVERSIONS
|
||||
|
||||
@@ -3227,9 +3229,11 @@ static int setup_load_info(struct load_i
|
||||
|
||||
static int check_modinfo(struct module *mod, struct load_info *info, int flags)
|
||||
{
|
||||
|
@ -117,7 +133,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
if (flags & MODULE_INIT_IGNORE_VERMAGIC)
|
||||
modmagic = NULL;
|
||||
|
||||
@@ -3250,6 +3252,7 @@ static int check_modinfo(struct module *
|
||||
@@ -3250,6 +3254,7 @@ static int check_modinfo(struct module *
|
||||
mod->name);
|
||||
add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
|
||||
}
|
||||
|
@ -127,7 +143,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/scripts/mod/modpost.c
|
||||
+++ b/scripts/mod/modpost.c
|
||||
@@ -2024,7 +2024,9 @@ static void read_symbols(const char *mod
|
||||
@@ -2033,7 +2033,9 @@ static void read_symbols(const char *mod
|
||||
symname = remove_dot(info.strtab + sym->st_name);
|
||||
|
||||
handle_symbol(mod, &info, sym, symname);
|
||||
|
@ -137,7 +153,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
}
|
||||
|
||||
for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
|
||||
@@ -2203,8 +2205,10 @@ static void add_header(struct buffer *b,
|
||||
@@ -2212,8 +2214,10 @@ static void add_header(struct buffer *b,
|
||||
buf_printf(b, "BUILD_SALT;\n");
|
||||
buf_printf(b, "BUILD_LTO_INFO;\n");
|
||||
buf_printf(b, "\n");
|
||||
|
@ -148,7 +164,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
buf_printf(b, "\n");
|
||||
buf_printf(b, "__visible struct module __this_module\n");
|
||||
buf_printf(b, "__section(\".gnu.linkonce.this_module\") = {\n");
|
||||
@@ -2221,8 +2225,10 @@ static void add_header(struct buffer *b,
|
||||
@@ -2230,8 +2234,10 @@ static void add_header(struct buffer *b,
|
||||
|
||||
static void add_intree_flag(struct buffer *b, int is_intree)
|
||||
{
|
||||
|
@ -159,7 +175,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
}
|
||||
|
||||
/* Cannot check for assembler */
|
||||
@@ -2235,8 +2241,10 @@ static void add_retpoline(struct buffer
|
||||
@@ -2244,8 +2250,10 @@ static void add_retpoline(struct buffer
|
||||
|
||||
static void add_staging_flag(struct buffer *b, const char *name)
|
||||
{
|
||||
|
@ -170,7 +186,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
}
|
||||
|
||||
/**
|
||||
@@ -2316,11 +2324,13 @@ static void add_depends(struct buffer *b
|
||||
@@ -2325,11 +2333,13 @@ static void add_depends(struct buffer *b
|
||||
|
||||
static void add_srcversion(struct buffer *b, struct module *mod)
|
||||
{
|
||||
|
@ -184,7 +200,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
}
|
||||
|
||||
static void write_buf(struct buffer *b, const char *fname)
|
||||
@@ -2569,7 +2579,9 @@ int main(int argc, char **argv)
|
||||
@@ -2578,7 +2588,9 @@ int main(int argc, char **argv)
|
||||
add_staging_flag(&buf, mod->name);
|
||||
add_versions(&buf, mod);
|
||||
add_depends(&buf, mod);
|
||||
|
|
11
root/target/linux/generic/hack-5.15/205-kconfig-exit.patch
Executable file
11
root/target/linux/generic/hack-5.15/205-kconfig-exit.patch
Executable file
|
@ -0,0 +1,11 @@
|
|||
--- a/scripts/kconfig/conf.c
|
||||
+++ b/scripts/kconfig/conf.c
|
||||
@@ -435,6 +435,8 @@ static int conf_sym(struct menu *menu)
|
||||
break;
|
||||
continue;
|
||||
case 0:
|
||||
+ if (!sym_has_value(sym) && !tty_stdio && getenv("FAIL_ON_UNCONFIGURED"))
|
||||
+ exit(1);
|
||||
newval = oldval;
|
||||
break;
|
||||
case '?':
|
|
@ -3039,7 +3039,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
|||
main(int argc, char **argv)
|
||||
--- a/scripts/mod/modpost.h
|
||||
+++ b/scripts/mod/modpost.h
|
||||
@@ -9,7 +9,11 @@
|
||||
@@ -8,7 +8,11 @@
|
||||
#include <sys/mman.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -68,14 +68,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
+#endif
|
||||
--- a/tools/include/linux/types.h
|
||||
+++ b/tools/include/linux/types.h
|
||||
@@ -6,12 +6,13 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
-#ifndef __SANE_USERSPACE_TYPES__
|
||||
@@ -10,8 +10,12 @@
|
||||
#define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */
|
||||
-#endif
|
||||
-
|
||||
#endif
|
||||
|
||||
+#ifndef __linux__
|
||||
+#include <tools/linux_types.h>
|
||||
+#else
|
||||
|
|
122
root/target/linux/generic/hack-5.15/220-arm-gc_sections.patch
Executable file
122
root/target/linux/generic/hack-5.15/220-arm-gc_sections.patch
Executable file
|
@ -0,0 +1,122 @@
|
|||
From e3d8676f5722b7622685581e06e8f53e6138e3ab Mon Sep 17 00:00:00 2001
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sat, 15 Jul 2017 23:42:36 +0200
|
||||
Subject: use -ffunction-sections, -fdata-sections and --gc-sections
|
||||
|
||||
In combination with kernel symbol export stripping this significantly reduces
|
||||
the kernel image size. Used on both ARM and MIPS architectures.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
---
|
||||
--- a/arch/arm/Kconfig
|
||||
+++ b/arch/arm/Kconfig
|
||||
@@ -117,6 +117,7 @@ config ARM
|
||||
select HAVE_UID16
|
||||
select HAVE_VIRT_CPU_ACCOUNTING_GEN
|
||||
select IRQ_FORCED_THREADING
|
||||
+ select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
|
||||
select MODULES_USE_ELF_REL
|
||||
select NEED_DMA_MAP_STATE
|
||||
select OF_EARLY_FLATTREE if OF
|
||||
--- a/arch/arm/boot/compressed/Makefile
|
||||
+++ b/arch/arm/boot/compressed/Makefile
|
||||
@@ -92,6 +92,7 @@ endif
|
||||
ifeq ($(CONFIG_USE_OF),y)
|
||||
OBJS += $(libfdt_objs) fdt_check_mem_start.o
|
||||
endif
|
||||
+KBUILD_CFLAGS_KERNEL := $(patsubst -f%-sections,,$(KBUILD_CFLAGS_KERNEL))
|
||||
|
||||
# -fstack-protector-strong triggers protection checks in this code,
|
||||
# but it is being used too early to link to meaningful stack_chk logic.
|
||||
--- a/arch/arm/kernel/vmlinux.lds.S
|
||||
+++ b/arch/arm/kernel/vmlinux.lds.S
|
||||
@@ -75,7 +75,7 @@ SECTIONS
|
||||
. = ALIGN(4);
|
||||
__ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
|
||||
__start___ex_table = .;
|
||||
- ARM_MMU_KEEP(*(__ex_table))
|
||||
+ KEEP(*(__ex_table))
|
||||
__stop___ex_table = .;
|
||||
}
|
||||
|
||||
@@ -100,24 +100,24 @@ SECTIONS
|
||||
}
|
||||
.init.arch.info : {
|
||||
__arch_info_begin = .;
|
||||
- *(.arch.info.init)
|
||||
+ KEEP(*(.arch.info.init))
|
||||
__arch_info_end = .;
|
||||
}
|
||||
.init.tagtable : {
|
||||
__tagtable_begin = .;
|
||||
- *(.taglist.init)
|
||||
+ KEEP(*(.taglist.init))
|
||||
__tagtable_end = .;
|
||||
}
|
||||
#ifdef CONFIG_SMP_ON_UP
|
||||
.init.smpalt : {
|
||||
__smpalt_begin = .;
|
||||
- *(.alt.smp.init)
|
||||
+ KEEP(*(.alt.smp.init))
|
||||
__smpalt_end = .;
|
||||
}
|
||||
#endif
|
||||
.init.pv_table : {
|
||||
__pv_table_begin = .;
|
||||
- *(.pv_table)
|
||||
+ KEEP(*(.pv_table))
|
||||
__pv_table_end = .;
|
||||
}
|
||||
|
||||
--- a/arch/arm/include/asm/vmlinux.lds.h
|
||||
+++ b/arch/arm/include/asm/vmlinux.lds.h
|
||||
@@ -29,13 +29,13 @@
|
||||
#define PROC_INFO \
|
||||
. = ALIGN(4); \
|
||||
__proc_info_begin = .; \
|
||||
- *(.proc.info.init) \
|
||||
+ KEEP(*(.proc.info.init)) \
|
||||
__proc_info_end = .;
|
||||
|
||||
#define IDMAP_TEXT \
|
||||
ALIGN_FUNCTION(); \
|
||||
__idmap_text_start = .; \
|
||||
- *(.idmap.text) \
|
||||
+ KEEP(*(.idmap.text)) \
|
||||
__idmap_text_end = .; \
|
||||
|
||||
#define ARM_DISCARD \
|
||||
@@ -96,12 +96,12 @@
|
||||
. = ALIGN(8); \
|
||||
.ARM.unwind_idx : { \
|
||||
__start_unwind_idx = .; \
|
||||
- *(.ARM.exidx*) \
|
||||
+ KEEP(*(.ARM.exidx*)) \
|
||||
__stop_unwind_idx = .; \
|
||||
} \
|
||||
.ARM.unwind_tab : { \
|
||||
__start_unwind_tab = .; \
|
||||
- *(.ARM.extab*) \
|
||||
+ KEEP(*(.ARM.extab*)) \
|
||||
__stop_unwind_tab = .; \
|
||||
}
|
||||
|
||||
@@ -112,14 +112,14 @@
|
||||
#define ARM_VECTORS \
|
||||
__vectors_start = .; \
|
||||
.vectors 0xffff0000 : AT(__vectors_start) { \
|
||||
- *(.vectors) \
|
||||
+ KEEP(*(.vectors)) \
|
||||
} \
|
||||
. = __vectors_start + SIZEOF(.vectors); \
|
||||
__vectors_end = .; \
|
||||
\
|
||||
__stubs_start = .; \
|
||||
.stubs ADDR(.vectors) + 0x1000 : AT(__stubs_start) { \
|
||||
- *(.stubs) \
|
||||
+ KEEP(*(.stubs)) \
|
||||
} \
|
||||
. = __stubs_start + SIZEOF(.stubs); \
|
||||
__stubs_end = .; \
|
|
@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
/* Align . to a 8 byte boundary equals to maximum function alignment. */
|
||||
#define ALIGN_FUNCTION() . = ALIGN(8)
|
||||
|
||||
@@ -486,14 +496,14 @@
|
||||
@@ -484,14 +494,14 @@
|
||||
/* Kernel symbol table: Normal symbols */ \
|
||||
__ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
|
||||
__start___ksymtab = .; \
|
||||
|
@ -47,7 +47,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
__stop___ksymtab_gpl = .; \
|
||||
} \
|
||||
\
|
||||
@@ -513,7 +523,7 @@
|
||||
@@ -511,7 +521,7 @@
|
||||
\
|
||||
/* Kernel symbol table: strings */ \
|
||||
__ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \
|
||||
|
@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
} \
|
||||
\
|
||||
/* __*init sections */ \
|
||||
@@ -1009,6 +1019,8 @@
|
||||
@@ -1018,6 +1028,8 @@
|
||||
|
||||
#define COMMON_DISCARDS \
|
||||
SANITIZER_DISCARDS \
|
||||
|
@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
"__kstrtabns_" #sym ": \n" \
|
||||
--- a/scripts/Makefile.build
|
||||
+++ b/scripts/Makefile.build
|
||||
@@ -358,7 +358,7 @@ targets += $(real-dtb-y) $(lib-y) $(alwa
|
||||
@@ -385,7 +385,7 @@ targets += $(real-dtb-y) $(lib-y) $(alwa
|
||||
# Linker scripts preprocessor (.lds.S -> .lds)
|
||||
# ---------------------------------------------------------------------------
|
||||
quiet_cmd_cpp_lds_S = LDS $@
|
||||
|
|
|
@ -23,7 +23,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
|
|||
{ {0x02, 0x21}, "lz4", unlz4 },
|
||||
--- a/scripts/Makefile.lib
|
||||
+++ b/scripts/Makefile.lib
|
||||
@@ -408,7 +408,7 @@ quiet_cmd_bzip2 = BZIP2 $@
|
||||
@@ -413,7 +413,7 @@ quiet_cmd_bzip2 = BZIP2 $@
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
quiet_cmd_lzma = LZMA $@
|
||||
|
|
|
@ -92,7 +92,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
|||
bool
|
||||
--- a/lib/Kconfig
|
||||
+++ b/lib/Kconfig
|
||||
@@ -433,16 +433,16 @@ config BCH_CONST_T
|
||||
@@ -439,16 +439,16 @@ config BCH_CONST_T
|
||||
# Textsearch support is select'ed if needed
|
||||
#
|
||||
config TEXTSEARCH
|
||||
|
|
23
root/target/linux/generic/hack-5.15/252-SATA_PMP.patch
Executable file
23
root/target/linux/generic/hack-5.15/252-SATA_PMP.patch
Executable file
|
@ -0,0 +1,23 @@
|
|||
From 8c817e33be829c7249c2cfd59ff48ad5fac6a31d Mon Sep 17 00:00:00 2001
|
||||
From: Sungbo Eo <mans0n@gorani.run>
|
||||
Date: Fri, 7 Jul 2017 17:09:21 +0200
|
||||
Subject: [PATCH] kconfig: solidify SATA_PMP config
|
||||
|
||||
SATA_PMP option in kernel config file disappears for every kernel_oldconfig refresh.
|
||||
To prevent this, SATA_HOST is now selected automatically when SATA_PMP is enabled.
|
||||
This patch can be dropped if SATA_MV is ever re-added into the config.
|
||||
---
|
||||
drivers/ata/Kconfig | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/ata/Kconfig
|
||||
+++ b/drivers/ata/Kconfig
|
||||
@@ -112,7 +112,7 @@ config SATA_ZPODD
|
||||
|
||||
config SATA_PMP
|
||||
bool "SATA Port Multiplier support"
|
||||
- depends on SATA_HOST
|
||||
+ select SATA_HOST
|
||||
default y
|
||||
help
|
||||
This option adds support for SATA Port Multipliers
|
144
root/target/linux/generic/hack-5.15/259-regmap_dynamic.patch
Executable file
144
root/target/linux/generic/hack-5.15/259-regmap_dynamic.patch
Executable file
|
@ -0,0 +1,144 @@
|
|||
From 811d9e2268a62b830cfe93cd8bc929afcb8b198b Mon Sep 17 00:00:00 2001
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sat, 15 Jul 2017 21:12:38 +0200
|
||||
Subject: kernel: move regmap bloat out of the kernel image if it is only being used in modules
|
||||
|
||||
lede-commit: 96f39119815028073583e4fca3a9c5fe9141e998
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
drivers/base/regmap/Kconfig | 15 ++++++++++-----
|
||||
drivers/base/regmap/Makefile | 12 ++++++++----
|
||||
drivers/base/regmap/regmap.c | 3 +++
|
||||
include/linux/regmap.h | 2 +-
|
||||
4 files changed, 22 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/drivers/base/regmap/Kconfig
|
||||
+++ b/drivers/base/regmap/Kconfig
|
||||
@@ -4,10 +4,9 @@
|
||||
# subsystems should select the appropriate symbols.
|
||||
|
||||
config REGMAP
|
||||
- default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ || REGMAP_SOUNDWIRE || REGMAP_SOUNDWIRE_MBQ || REGMAP_SCCB || REGMAP_I3C || REGMAP_SPI_AVMM || REGMAP_MDIO)
|
||||
select IRQ_DOMAIN if REGMAP_IRQ
|
||||
select MDIO_BUS if REGMAP_MDIO
|
||||
- bool
|
||||
+ tristate
|
||||
|
||||
config REGCACHE_COMPRESSED
|
||||
select LZO_COMPRESS
|
||||
@@ -15,53 +14,67 @@ config REGCACHE_COMPRESSED
|
||||
bool
|
||||
|
||||
config REGMAP_AC97
|
||||
+ select REGMAP
|
||||
tristate
|
||||
|
||||
config REGMAP_I2C
|
||||
+ select REGMAP
|
||||
tristate
|
||||
depends on I2C
|
||||
|
||||
config REGMAP_SLIMBUS
|
||||
+ select REGMAP
|
||||
tristate
|
||||
depends on SLIMBUS
|
||||
|
||||
config REGMAP_SPI
|
||||
+ select REGMAP
|
||||
tristate
|
||||
depends on SPI
|
||||
|
||||
config REGMAP_SPMI
|
||||
+ select REGMAP
|
||||
tristate
|
||||
depends on SPMI
|
||||
|
||||
config REGMAP_W1
|
||||
+ select REGMAP
|
||||
tristate
|
||||
depends on W1
|
||||
|
||||
config REGMAP_MDIO
|
||||
+ select REGMAP
|
||||
tristate
|
||||
|
||||
config REGMAP_MMIO
|
||||
+ select REGMAP
|
||||
tristate
|
||||
|
||||
config REGMAP_IRQ
|
||||
+ select REGMAP
|
||||
bool
|
||||
|
||||
config REGMAP_SOUNDWIRE
|
||||
+ select REGMAP
|
||||
tristate
|
||||
depends on SOUNDWIRE
|
||||
|
||||
config REGMAP_SOUNDWIRE_MBQ
|
||||
+ select REGMAP
|
||||
tristate
|
||||
depends on SOUNDWIRE
|
||||
|
||||
config REGMAP_SCCB
|
||||
+ select REGMAP
|
||||
tristate
|
||||
depends on I2C
|
||||
|
||||
config REGMAP_I3C
|
||||
+ select REGMAP
|
||||
tristate
|
||||
depends on I3C
|
||||
|
||||
config REGMAP_SPI_AVMM
|
||||
+ select REGMAP
|
||||
tristate
|
||||
depends on SPI
|
||||
--- a/drivers/base/regmap/Makefile
|
||||
+++ b/drivers/base/regmap/Makefile
|
||||
@@ -2,10 +2,14 @@
|
||||
# For include/trace/define_trace.h to include trace.h
|
||||
CFLAGS_regmap.o := -I$(src)
|
||||
|
||||
-obj-$(CONFIG_REGMAP) += regmap.o regcache.o
|
||||
-obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-flat.o
|
||||
-obj-$(CONFIG_REGCACHE_COMPRESSED) += regcache-lzo.o
|
||||
-obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o
|
||||
+regmap-core-objs = regmap.o regcache.o regcache-rbtree.o regcache-flat.o
|
||||
+ifdef CONFIG_DEBUG_FS
|
||||
+regmap-core-objs += regmap-debugfs.o
|
||||
+endif
|
||||
+ifdef CONFIG_REGCACHE_COMPRESSED
|
||||
+regmap-core-objs += regcache-lzo.o
|
||||
+endif
|
||||
+obj-$(CONFIG_REGMAP) += regmap-core.o
|
||||
obj-$(CONFIG_REGMAP_AC97) += regmap-ac97.o
|
||||
obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o
|
||||
obj-$(CONFIG_REGMAP_SLIMBUS) += regmap-slimbus.o
|
||||
--- a/drivers/base/regmap/regmap.c
|
||||
+++ b/drivers/base/regmap/regmap.c
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <linux/device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/export.h>
|
||||
+#include <linux/module.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/property.h>
|
||||
@@ -3339,3 +3340,5 @@ static int __init regmap_initcall(void)
|
||||
return 0;
|
||||
}
|
||||
postcore_initcall(regmap_initcall);
|
||||
+
|
||||
+MODULE_LICENSE("GPL");
|
||||
--- a/include/linux/regmap.h
|
||||
+++ b/include/linux/regmap.h
|
||||
@@ -180,7 +180,7 @@ struct reg_sequence {
|
||||
__ret ?: __tmp; \
|
||||
})
|
||||
|
||||
-#ifdef CONFIG_REGMAP
|
||||
+#if IS_REACHABLE(CONFIG_REGMAP)
|
||||
|
||||
enum regmap_endian {
|
||||
/* Unspecified -> 0 -> Backwards compatible default */
|
|
@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
|||
|
||||
--- a/arch/mips/Kconfig
|
||||
+++ b/arch/mips/Kconfig
|
||||
@@ -1202,6 +1202,10 @@ config MIPS_MSC
|
||||
@@ -1180,6 +1180,10 @@ config MIPS_MSC
|
||||
config SYNC_R4K
|
||||
bool
|
||||
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
From f9760b158f610b1792a222cc924073724c061bfb Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
Date: Wed, 7 Apr 2021 22:37:57 +0100
|
||||
Subject: [PATCH 1/2] mtd: super: don't reply on mtdblock device minor
|
||||
To: linux-mtd@lists.infradead.org
|
||||
Cc: Vignesh Raghavendra <vigneshr@ti.com>,
|
||||
Richard Weinberger <richard@nod.at>,
|
||||
Miquel Raynal <miquel.raynal@bootlin.com>,
|
||||
David Woodhouse <dwmw2@infradead.org>
|
||||
|
||||
For blktrans devices with partitions (ie. part_bits != 0) the
|
||||
assumption that the minor number of the mtdblock device matches
|
||||
the mtdnum doesn't hold true.
|
||||
Properly resolve mtd device from blktrans layer instead.
|
||||
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
drivers/mtd/mtdsuper.c | 33 ++++++++++++++++++++++++++-------
|
||||
1 file changed, 26 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/mtdsuper.c
|
||||
+++ b/drivers/mtd/mtdsuper.c
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/mtd/super.h>
|
||||
+#include <linux/mtd/blktrans.h>
|
||||
#include <linux/namei.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/ctype.h>
|
||||
@@ -120,8 +121,9 @@ int get_tree_mtd(struct fs_context *fc,
|
||||
struct fs_context *fc))
|
||||
{
|
||||
#ifdef CONFIG_BLOCK
|
||||
- dev_t dev;
|
||||
- int ret;
|
||||
+ struct mtd_blktrans_dev *blktrans_dev;
|
||||
+ struct block_device *bdev;
|
||||
+ int ret, part_bits;
|
||||
#endif
|
||||
int mtdnr;
|
||||
|
||||
@@ -169,16 +171,36 @@ int get_tree_mtd(struct fs_context *fc,
|
||||
/* try the old way - the hack where we allowed users to mount
|
||||
* /dev/mtdblock$(n) but didn't actually _use_ the blockdev
|
||||
*/
|
||||
- ret = lookup_bdev(fc->source, &dev);
|
||||
- if (ret) {
|
||||
+ bdev = blkdev_get_by_path(fc->source, FMODE_READ, NULL);
|
||||
+ if (IS_ERR(bdev)) {
|
||||
+ ret = PTR_ERR(bdev);
|
||||
errorf(fc, "MTD: Couldn't look up '%s': %d", fc->source, ret);
|
||||
return ret;
|
||||
}
|
||||
- pr_debug("MTDSB: lookup_bdev() returned 0\n");
|
||||
+ pr_debug("MTDSB: blkdev_get_by_path() returned 0\n");
|
||||
|
||||
- if (MAJOR(dev) == MTD_BLOCK_MAJOR)
|
||||
- return mtd_get_sb_by_nr(fc, MINOR(dev), fill_super);
|
||||
+ if (MAJOR(bdev->bd_dev) == MTD_BLOCK_MAJOR) {
|
||||
+ if (!bdev->bd_disk) {
|
||||
+ blkdev_put(bdev, FMODE_READ);
|
||||
+ BUG();
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
|
||||
+ blktrans_dev = (struct mtd_blktrans_dev *)(bdev->bd_disk->private_data);
|
||||
+ if (!blktrans_dev || !blktrans_dev->tr) {
|
||||
+ blkdev_put(bdev, FMODE_READ);
|
||||
+ BUG();
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ mtdnr = blktrans_dev->devnum;
|
||||
+ part_bits = blktrans_dev->tr->part_bits;
|
||||
+ blkdev_put(bdev, FMODE_READ);
|
||||
+ if (MINOR(bdev->bd_dev) != (mtdnr << part_bits))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ return mtd_get_sb_by_nr(fc, mtdnr, fill_super);
|
||||
+ }
|
||||
+ blkdev_put(bdev, FMODE_READ);
|
||||
#endif /* CONFIG_BLOCK */
|
||||
|
||||
if (!(fc->sb_flags & SB_SILENT))
|
|
@ -0,0 +1,98 @@
|
|||
From 0bccc3722bdd88e8ae995e77ef9f7b77ee4cbdee Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
Date: Wed, 7 Apr 2021 22:45:54 +0100
|
||||
Subject: [PATCH 2/2] mtd: blktrans: call add disks after mtd device
|
||||
To: linux-mtd@lists.infradead.org
|
||||
Cc: Vignesh Raghavendra <vigneshr@ti.com>,
|
||||
Richard Weinberger <richard@nod.at>,
|
||||
Miquel Raynal <miquel.raynal@bootlin.com>,
|
||||
David Woodhouse <dwmw2@infradead.org>
|
||||
|
||||
Calling device_add_disk while holding mtd_table_mutex leads
|
||||
to deadlock in case part_bits!=0 as block partition parsers
|
||||
will try to open the newly created disks, trying to acquire
|
||||
mutex once again.
|
||||
Move device_add_disk to additional function called after
|
||||
add partitions of an MTD device have been added and locks
|
||||
have been released.
|
||||
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
drivers/mtd/mtd_blkdevs.c | 33 ++++++++++++++++++++++++++-------
|
||||
drivers/mtd/mtdcore.c | 3 +++
|
||||
include/linux/mtd/blktrans.h | 1 +
|
||||
3 files changed, 30 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/mtd_blkdevs.c
|
||||
+++ b/drivers/mtd/mtd_blkdevs.c
|
||||
@@ -384,13 +384,6 @@ int add_mtd_blktrans_dev(struct mtd_blkt
|
||||
if (new->readonly)
|
||||
set_disk_ro(gd, 1);
|
||||
|
||||
- device_add_disk(&new->mtd->dev, gd, NULL);
|
||||
-
|
||||
- if (new->disk_attributes) {
|
||||
- ret = sysfs_create_group(&disk_to_dev(gd)->kobj,
|
||||
- new->disk_attributes);
|
||||
- WARN_ON(ret);
|
||||
- }
|
||||
return 0;
|
||||
|
||||
out_free_tag_set:
|
||||
@@ -402,6 +395,27 @@ out_list_del:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+void register_mtd_blktrans_devs(void)
|
||||
+{
|
||||
+ struct mtd_blktrans_ops *tr;
|
||||
+ struct mtd_blktrans_dev *dev, *next;
|
||||
+ int ret;
|
||||
+
|
||||
+ list_for_each_entry(tr, &blktrans_majors, list) {
|
||||
+ list_for_each_entry_safe(dev, next, &tr->devs, list) {
|
||||
+ if (disk_live(dev->disk))
|
||||
+ continue;
|
||||
+
|
||||
+ device_add_disk(&dev->mtd->dev, dev->disk, NULL);
|
||||
+ if (dev->disk_attributes) {
|
||||
+ ret = sysfs_create_group(&disk_to_dev(dev->disk)->kobj,
|
||||
+ dev->disk_attributes);
|
||||
+ WARN_ON(ret);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
int del_mtd_blktrans_dev(struct mtd_blktrans_dev *old)
|
||||
{
|
||||
unsigned long flags;
|
||||
--- a/drivers/mtd/mtdcore.c
|
||||
+++ b/drivers/mtd/mtdcore.c
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
+#include <linux/mtd/blktrans.h>
|
||||
|
||||
#include "mtdcore.h"
|
||||
|
||||
@@ -1000,6 +1001,8 @@ int mtd_device_parse_register(struct mtd
|
||||
|
||||
ret = mtd_otp_nvmem_add(mtd);
|
||||
|
||||
+ register_mtd_blktrans_devs();
|
||||
+
|
||||
out:
|
||||
if (ret && device_is_registered(&mtd->dev))
|
||||
del_mtd_device(mtd);
|
||||
--- a/include/linux/mtd/blktrans.h
|
||||
+++ b/include/linux/mtd/blktrans.h
|
||||
@@ -76,6 +76,7 @@ extern int deregister_mtd_blktrans(struc
|
||||
extern int add_mtd_blktrans_dev(struct mtd_blktrans_dev *dev);
|
||||
extern int del_mtd_blktrans_dev(struct mtd_blktrans_dev *dev);
|
||||
extern int mtd_blktrans_cease_background(struct mtd_blktrans_dev *dev);
|
||||
+extern void register_mtd_blktrans_devs(void);
|
||||
|
||||
/**
|
||||
* module_mtd_blktrans() - Helper macro for registering a mtd blktrans driver
|
220
root/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch
Executable file
220
root/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch
Executable file
|
@ -0,0 +1,220 @@
|
|||
--- a/block/blk.h
|
||||
+++ b/block/blk.h
|
||||
@@ -354,6 +354,7 @@ void blk_free_ext_minor(unsigned int min
|
||||
#define ADDPART_FLAG_NONE 0
|
||||
#define ADDPART_FLAG_RAID 1
|
||||
#define ADDPART_FLAG_WHOLEDISK 2
|
||||
+#define ADDPART_FLAG_ROOTDEV 4
|
||||
int bdev_add_partition(struct gendisk *disk, int partno, sector_t start,
|
||||
sector_t length);
|
||||
int bdev_del_partition(struct gendisk *disk, int partno);
|
||||
--- a/block/partitions/Kconfig
|
||||
+++ b/block/partitions/Kconfig
|
||||
@@ -101,6 +101,13 @@ config ATARI_PARTITION
|
||||
Say Y here if you would like to use hard disks under Linux which
|
||||
were partitioned under the Atari OS.
|
||||
|
||||
+config FIT_PARTITION
|
||||
+ bool "Flattened-Image-Tree (FIT) partition support" if PARTITION_ADVANCED
|
||||
+ default n
|
||||
+ help
|
||||
+ Say Y here if your system needs to mount the filesystem part of
|
||||
+ a Flattened-Image-Tree (FIT) image commonly used with Das U-Boot.
|
||||
+
|
||||
config IBM_PARTITION
|
||||
bool "IBM disk label and partition support"
|
||||
depends on PARTITION_ADVANCED && S390
|
||||
--- a/block/partitions/Makefile
|
||||
+++ b/block/partitions/Makefile
|
||||
@@ -8,6 +8,7 @@ obj-$(CONFIG_ACORN_PARTITION) += acorn.o
|
||||
obj-$(CONFIG_AMIGA_PARTITION) += amiga.o
|
||||
obj-$(CONFIG_ATARI_PARTITION) += atari.o
|
||||
obj-$(CONFIG_AIX_PARTITION) += aix.o
|
||||
+obj-$(CONFIG_FIT_PARTITION) += fit.o
|
||||
obj-$(CONFIG_CMDLINE_PARTITION) += cmdline.o
|
||||
obj-$(CONFIG_MAC_PARTITION) += mac.o
|
||||
obj-$(CONFIG_LDM_PARTITION) += ldm.o
|
||||
--- a/block/partitions/check.h
|
||||
+++ b/block/partitions/check.h
|
||||
@@ -58,6 +58,7 @@ int amiga_partition(struct parsed_partit
|
||||
int atari_partition(struct parsed_partitions *state);
|
||||
int cmdline_partition(struct parsed_partitions *state);
|
||||
int efi_partition(struct parsed_partitions *state);
|
||||
+int fit_partition(struct parsed_partitions *state);
|
||||
int ibm_partition(struct parsed_partitions *);
|
||||
int karma_partition(struct parsed_partitions *state);
|
||||
int ldm_partition(struct parsed_partitions *state);
|
||||
@@ -68,3 +69,5 @@ int sgi_partition(struct parsed_partitio
|
||||
int sun_partition(struct parsed_partitions *state);
|
||||
int sysv68_partition(struct parsed_partitions *state);
|
||||
int ultrix_partition(struct parsed_partitions *state);
|
||||
+
|
||||
+int parse_fit_partitions(struct parsed_partitions *state, u64 start_sector, u64 nr_sectors, int *slot, int add_remain);
|
||||
--- a/block/partitions/core.c
|
||||
+++ b/block/partitions/core.c
|
||||
@@ -11,6 +11,10 @@
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/blktrace_api.h>
|
||||
#include <linux/raid/detect.h>
|
||||
+#ifdef CONFIG_FIT_PARTITION
|
||||
+#include <linux/root_dev.h>
|
||||
+#endif
|
||||
+
|
||||
#include "check.h"
|
||||
|
||||
static int (*check_part[])(struct parsed_partitions *) = {
|
||||
@@ -47,6 +51,9 @@ static int (*check_part[])(struct parsed
|
||||
#ifdef CONFIG_EFI_PARTITION
|
||||
efi_partition, /* this must come before msdos */
|
||||
#endif
|
||||
+#ifdef CONFIG_FIT_PARTITION
|
||||
+ fit_partition,
|
||||
+#endif
|
||||
#ifdef CONFIG_SGI_PARTITION
|
||||
sgi_partition,
|
||||
#endif
|
||||
@@ -597,6 +604,11 @@ static bool blk_add_partition(struct gen
|
||||
(state->parts[p].flags & ADDPART_FLAG_RAID))
|
||||
md_autodetect_dev(part->bd_dev);
|
||||
|
||||
+#ifdef CONFIG_FIT_PARTITION
|
||||
+ if ((state->parts[p].flags & ADDPART_FLAG_ROOTDEV) && ROOT_DEV == 0)
|
||||
+ ROOT_DEV = part_to_dev(part)->devt;
|
||||
+#endif
|
||||
+
|
||||
return true;
|
||||
}
|
||||
|
||||
--- a/drivers/mtd/ubi/block.c
|
||||
+++ b/drivers/mtd/ubi/block.c
|
||||
@@ -419,7 +419,11 @@ int ubiblock_create(struct ubi_volume_in
|
||||
|
||||
gd->fops = &ubiblock_ops;
|
||||
gd->major = ubiblock_major;
|
||||
+#ifdef CONFIG_FIT_PARTITION
|
||||
+ gd->minors = 0;
|
||||
+#else
|
||||
gd->minors = 1;
|
||||
+#endif
|
||||
gd->first_minor = idr_alloc(&ubiblock_minor_idr, dev, 0, 0, GFP_KERNEL);
|
||||
if (gd->first_minor < 0) {
|
||||
dev_err(disk_to_dev(gd),
|
||||
@@ -428,6 +432,9 @@ int ubiblock_create(struct ubi_volume_in
|
||||
goto out_cleanup_disk;
|
||||
}
|
||||
gd->private_data = dev;
|
||||
+#ifdef CONFIG_FIT_PARTITION
|
||||
+ gd->flags |= GENHD_FL_EXT_DEVT;
|
||||
+#endif
|
||||
sprintf(gd->disk_name, "ubiblock%d_%d", dev->ubi_num, dev->vol_id);
|
||||
set_capacity(gd, disk_capacity);
|
||||
dev->gd = gd;
|
||||
--- a/block/partitions/efi.c
|
||||
+++ b/block/partitions/efi.c
|
||||
@@ -716,6 +716,9 @@ int efi_partition(struct parsed_partitio
|
||||
gpt_entry *ptes = NULL;
|
||||
u32 i;
|
||||
unsigned ssz = queue_logical_block_size(state->disk->queue) / 512;
|
||||
+#ifdef CONFIG_FIT_PARTITION
|
||||
+ u32 extra_slot = 64;
|
||||
+#endif
|
||||
|
||||
if (!find_valid_gpt(state, &gpt, &ptes) || !gpt || !ptes) {
|
||||
kfree(gpt);
|
||||
@@ -749,6 +752,11 @@ int efi_partition(struct parsed_partitio
|
||||
ARRAY_SIZE(ptes[i].partition_name));
|
||||
utf16_le_to_7bit(ptes[i].partition_name, label_max, info->volname);
|
||||
state->parts[i + 1].has_info = true;
|
||||
+#ifdef CONFIG_FIT_PARTITION
|
||||
+ /* If this is a U-Boot FIT volume it may have subpartitions */
|
||||
+ if (!efi_guidcmp(ptes[i].partition_type_guid, PARTITION_LINUX_FIT_GUID))
|
||||
+ (void) parse_fit_partitions(state, start * ssz, size * ssz, &extra_slot, 1);
|
||||
+#endif
|
||||
}
|
||||
kfree(ptes);
|
||||
kfree(gpt);
|
||||
--- a/block/partitions/efi.h
|
||||
+++ b/block/partitions/efi.h
|
||||
@@ -52,6 +52,9 @@
|
||||
#define PARTITION_LINUX_LVM_GUID \
|
||||
EFI_GUID( 0xe6d6d379, 0xf507, 0x44c2, \
|
||||
0xa2, 0x3c, 0x23, 0x8f, 0x2a, 0x3d, 0xf9, 0x28)
|
||||
+#define PARTITION_LINUX_FIT_GUID \
|
||||
+ EFI_GUID( 0xcae9be83, 0xb15f, 0x49cc, \
|
||||
+ 0x86, 0x3f, 0x08, 0x1b, 0x74, 0x4a, 0x2d, 0x93)
|
||||
|
||||
typedef struct _gpt_header {
|
||||
__le64 signature;
|
||||
--- a/drivers/mtd/mtdblock.c
|
||||
+++ b/drivers/mtd/mtdblock.c
|
||||
@@ -338,7 +338,11 @@ static void mtdblock_remove_dev(struct m
|
||||
static struct mtd_blktrans_ops mtdblock_tr = {
|
||||
.name = "mtdblock",
|
||||
.major = MTD_BLOCK_MAJOR,
|
||||
+#ifdef CONFIG_FIT_PARTITION
|
||||
+ .part_bits = 1,
|
||||
+#else
|
||||
.part_bits = 0,
|
||||
+#endif
|
||||
.blksize = 512,
|
||||
.open = mtdblock_open,
|
||||
.flush = mtdblock_flush,
|
||||
--- a/drivers/mtd/mtd_blkdevs.c
|
||||
+++ b/drivers/mtd/mtd_blkdevs.c
|
||||
@@ -346,18 +346,8 @@ int add_mtd_blktrans_dev(struct mtd_blkt
|
||||
gd->minors = 1 << tr->part_bits;
|
||||
gd->fops = &mtd_block_ops;
|
||||
|
||||
- if (tr->part_bits)
|
||||
- if (new->devnum < 26)
|
||||
- snprintf(gd->disk_name, sizeof(gd->disk_name),
|
||||
- "%s%c", tr->name, 'a' + new->devnum);
|
||||
- else
|
||||
- snprintf(gd->disk_name, sizeof(gd->disk_name),
|
||||
- "%s%c%c", tr->name,
|
||||
- 'a' - 1 + new->devnum / 26,
|
||||
- 'a' + new->devnum % 26);
|
||||
- else
|
||||
- snprintf(gd->disk_name, sizeof(gd->disk_name),
|
||||
- "%s%d", tr->name, new->devnum);
|
||||
+ snprintf(gd->disk_name, sizeof(gd->disk_name),
|
||||
+ "%s%d", tr->name, new->devnum);
|
||||
|
||||
set_capacity(gd, ((u64)new->size * tr->blksize) >> 9);
|
||||
|
||||
--- a/block/partitions/msdos.c
|
||||
+++ b/block/partitions/msdos.c
|
||||
@@ -564,6 +564,15 @@ static void parse_minix(struct parsed_pa
|
||||
#endif /* CONFIG_MINIX_SUBPARTITION */
|
||||
}
|
||||
|
||||
+static void parse_fit_mbr(struct parsed_partitions *state,
|
||||
+ sector_t offset, sector_t size, int origin)
|
||||
+{
|
||||
+#ifdef CONFIG_FIT_PARTITION
|
||||
+ u32 extra_slot = 64;
|
||||
+ (void) parse_fit_partitions(state, offset, size, &extra_slot, 1);
|
||||
+#endif /* CONFIG_FIT_PARTITION */
|
||||
+}
|
||||
+
|
||||
static struct {
|
||||
unsigned char id;
|
||||
void (*parse)(struct parsed_partitions *, sector_t, sector_t, int);
|
||||
@@ -575,6 +584,7 @@ static struct {
|
||||
{UNIXWARE_PARTITION, parse_unixware},
|
||||
{SOLARIS_X86_PARTITION, parse_solaris_x86},
|
||||
{NEW_SOLARIS_X86_PARTITION, parse_solaris_x86},
|
||||
+ {FIT_PARTITION, parse_fit_mbr},
|
||||
{0, NULL},
|
||||
};
|
||||
|
||||
--- a/include/linux/msdos_partition.h
|
||||
+++ b/include/linux/msdos_partition.h
|
||||
@@ -31,6 +31,7 @@ enum msdos_sys_ind {
|
||||
LINUX_LVM_PARTITION = 0x8e,
|
||||
LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */
|
||||
|
||||
+ FIT_PARTITION = 0x2e, /* U-Boot uImage.FIT */
|
||||
SOLARIS_X86_PARTITION = 0x82, /* also Linux swap partitions */
|
||||
NEW_SOLARIS_X86_PARTITION = 0xbf,
|
||||
|
|
@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
|||
#include <linux/nvmem-provider.h>
|
||||
|
||||
#include <linux/mtd/mtd.h>
|
||||
@@ -694,6 +695,19 @@ int add_mtd_device(struct mtd_info *mtd)
|
||||
@@ -696,6 +697,19 @@ int add_mtd_device(struct mtd_info *mtd)
|
||||
of this try_ nonsense, and no bitching about it
|
||||
either. :) */
|
||||
__module_get(THIS_MODULE);
|
||||
|
|
|
@ -12,7 +12,7 @@ Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
|
|||
|
||||
--- a/net/bridge/br_input.c
|
||||
+++ b/net/bridge/br_input.c
|
||||
@@ -103,10 +103,14 @@ int br_handle_frame_finish(struct net *n
|
||||
@@ -108,10 +108,14 @@ int br_handle_frame_finish(struct net *n
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
|
|||
if (IS_ENABLED(CONFIG_INET) &&
|
||||
--- a/net/bridge/br_private.h
|
||||
+++ b/net/bridge/br_private.h
|
||||
@@ -402,6 +402,8 @@ struct net_bridge {
|
||||
@@ -468,6 +468,8 @@ struct net_bridge {
|
||||
u16 group_fwd_mask;
|
||||
u16 group_fwd_mask_required;
|
||||
|
||||
|
@ -39,3 +39,45 @@ Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
|
|||
/* STP */
|
||||
bridge_id designated_root;
|
||||
bridge_id bridge_id;
|
||||
--- a/net/bridge/br_sysfs_br.c
|
||||
+++ b/net/bridge/br_sysfs_br.c
|
||||
@@ -197,6 +197,31 @@ static ssize_t group_fwd_mask_store(stru
|
||||
}
|
||||
static DEVICE_ATTR_RW(group_fwd_mask);
|
||||
|
||||
+static ssize_t disable_eap_hack_show(struct device *d,
|
||||
+ struct device_attribute *attr,
|
||||
+ char *buf)
|
||||
+{
|
||||
+ struct net_bridge *br = to_bridge(d);
|
||||
+ return sprintf(buf, "%u\n", br->disable_eap_hack);
|
||||
+}
|
||||
+
|
||||
+static int set_disable_eap_hack(struct net_bridge *br, unsigned long val,
|
||||
+ struct netlink_ext_ack *extack)
|
||||
+{
|
||||
+ br->disable_eap_hack = !!val;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static ssize_t disable_eap_hack_store(struct device *d,
|
||||
+ struct device_attribute *attr,
|
||||
+ const char *buf,
|
||||
+ size_t len)
|
||||
+{
|
||||
+ return store_bridge_parm(d, buf, len, set_disable_eap_hack);
|
||||
+}
|
||||
+static DEVICE_ATTR_RW(disable_eap_hack);
|
||||
+
|
||||
static ssize_t priority_show(struct device *d, struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
@@ -937,6 +962,7 @@ static struct attribute *bridge_attrs[]
|
||||
&dev_attr_ageing_time.attr,
|
||||
&dev_attr_stp_state.attr,
|
||||
&dev_attr_group_fwd_mask.attr,
|
||||
+ &dev_attr_disable_eap_hack.attr,
|
||||
&dev_attr_priority.attr,
|
||||
&dev_attr_bridge_id.attr,
|
||||
&dev_attr_root_id.attr,
|
||||
|
|
|
@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o
|
||||
--- /dev/null
|
||||
+++ b/net/netfilter/xt_FLOWOFFLOAD.c
|
||||
@@ -0,0 +1,658 @@
|
||||
@@ -0,0 +1,656 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2018-2021 Felix Fietkau <nbd@nbd.name>
|
||||
+ *
|
||||
|
@ -278,8 +278,6 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
+ hook->used = true;
|
||||
+ }
|
||||
+ spin_unlock_bh(&hooks_lock);
|
||||
+
|
||||
+ cond_resched();
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
|
@ -767,7 +765,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
#include <net/netfilter/nf_flow_table.h>
|
||||
#include <net/netfilter/nf_conntrack.h>
|
||||
#include <net/netfilter/nf_conntrack_core.h>
|
||||
@@ -407,8 +406,7 @@ flow_offload_lookup(struct nf_flowtable
|
||||
@@ -397,8 +396,7 @@ flow_offload_lookup(struct nf_flowtable
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(flow_offload_lookup);
|
||||
|
||||
|
@ -777,7 +775,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
void (*iter)(struct flow_offload *flow, void *data),
|
||||
void *data)
|
||||
{
|
||||
@@ -440,6 +438,7 @@ nf_flow_table_iterate(struct nf_flowtabl
|
||||
@@ -430,6 +428,7 @@ nf_flow_table_iterate(struct nf_flowtabl
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
|
|||
|
||||
--- a/include/linux/netdevice.h
|
||||
+++ b/include/linux/netdevice.h
|
||||
@@ -144,8 +144,8 @@ static inline bool dev_xmit_complete(int
|
||||
@@ -145,8 +145,8 @@ static inline bool dev_xmit_complete(int
|
||||
|
||||
#if defined(CONFIG_HYPERV_NET)
|
||||
# define LL_MAX_HEADER 128
|
||||
|
|
|
@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/include/net/sch_generic.h
|
||||
+++ b/include/net/sch_generic.h
|
||||
@@ -624,12 +624,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
|
||||
@@ -626,12 +626,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
|
||||
extern struct Qdisc_ops pfifo_fast_ops;
|
||||
extern struct Qdisc_ops mq_qdisc_ops;
|
||||
extern struct Qdisc_ops noqueue_qdisc_ops;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
@@ -2225,6 +2225,7 @@ static int mv88e6xxx_port_fdb_add(struct
|
||||
@@ -2317,6 +2317,7 @@ static int mv88e6xxx_port_fdb_add(struct
|
||||
struct mv88e6xxx_chip *chip = ds->priv;
|
||||
int err;
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
|||
mv88e6xxx_reg_lock(chip);
|
||||
err = mv88e6xxx_port_db_load_purge(chip, port, addr, vid,
|
||||
MV88E6XXX_G1_ATU_DATA_STATE_UC_STATIC);
|
||||
@@ -2239,6 +2240,7 @@ static int mv88e6xxx_port_fdb_del(struct
|
||||
@@ -2331,6 +2332,7 @@ static int mv88e6xxx_port_fdb_del(struct
|
||||
struct mv88e6xxx_chip *chip = ds->priv;
|
||||
int err;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
@@ -2817,6 +2817,9 @@ static int mv88e6xxx_setup_port(struct m
|
||||
@@ -2979,6 +2979,9 @@ static int mv88e6xxx_setup_port(struct m
|
||||
else
|
||||
reg = 1 << port;
|
||||
|
||||
|
|
142
root/target/linux/generic/hack-5.15/720-net-phy-add-aqr-phys.patch
Executable file
142
root/target/linux/generic/hack-5.15/720-net-phy-add-aqr-phys.patch
Executable file
|
@ -0,0 +1,142 @@
|
|||
From: Birger Koblitz <git@birger-koblitz.de>
|
||||
Date: Sun, 5 Sep 2021 15:13:10 +0200
|
||||
Subject: [PATCH] kernel: Add AQR113C and AQR813 support
|
||||
|
||||
This hack adds support for the Aquantia 4th generation, 10GBit
|
||||
PHYs AQR113C and AQR813.
|
||||
|
||||
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
|
||||
|
||||
--- a/drivers/net/phy/aquantia_main.c
|
||||
+++ b/drivers/net/phy/aquantia_main.c
|
||||
@@ -20,8 +20,10 @@
|
||||
#define PHY_ID_AQR105 0x03a1b4a2
|
||||
#define PHY_ID_AQR106 0x03a1b4d0
|
||||
#define PHY_ID_AQR107 0x03a1b4e0
|
||||
+#define PHY_ID_AQR113C 0x31c31c12
|
||||
#define PHY_ID_AQCS109 0x03a1b5c2
|
||||
#define PHY_ID_AQR405 0x03a1b4b0
|
||||
+#define PHY_ID_AQR813 0x31c31cb2
|
||||
|
||||
#define MDIO_PHYXS_VEND_IF_STATUS 0xe812
|
||||
#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK GENMASK(7, 3)
|
||||
@@ -359,6 +361,49 @@ static int aqr107_read_rate(struct phy_d
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int aqr113c_read_status(struct phy_device *phydev)
|
||||
+{
|
||||
+ int val, ret;
|
||||
+
|
||||
+ ret = aqr_read_status(phydev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ if (!phydev->link || phydev->autoneg == AUTONEG_DISABLE)
|
||||
+ return 0;
|
||||
+
|
||||
+ // On AQR113C, the speed returned by aqr_read_status is wrong
|
||||
+ aqr107_read_rate(phydev);
|
||||
+
|
||||
+ val = phy_read_mmd(phydev, MDIO_MMD_PHYXS, MDIO_PHYXS_VEND_IF_STATUS);
|
||||
+ if (val < 0)
|
||||
+ return val;
|
||||
+
|
||||
+ switch (FIELD_GET(MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK, val)) {
|
||||
+ case MDIO_PHYXS_VEND_IF_STATUS_TYPE_KR:
|
||||
+ phydev->interface = PHY_INTERFACE_MODE_10GKR;
|
||||
+ break;
|
||||
+ case MDIO_PHYXS_VEND_IF_STATUS_TYPE_XFI:
|
||||
+ phydev->interface = PHY_INTERFACE_MODE_10GBASER;
|
||||
+ break;
|
||||
+ case MDIO_PHYXS_VEND_IF_STATUS_TYPE_USXGMII:
|
||||
+ phydev->interface = PHY_INTERFACE_MODE_USXGMII;
|
||||
+ break;
|
||||
+ case MDIO_PHYXS_VEND_IF_STATUS_TYPE_SGMII:
|
||||
+ phydev->interface = PHY_INTERFACE_MODE_SGMII;
|
||||
+ break;
|
||||
+ case MDIO_PHYXS_VEND_IF_STATUS_TYPE_OCSGMII:
|
||||
+ phydev->interface = PHY_INTERFACE_MODE_2500BASEX;
|
||||
+ break;
|
||||
+ default:
|
||||
+ phydev->interface = PHY_INTERFACE_MODE_NA;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /* Read downshifted rate from vendor register */
|
||||
+ return aqr107_read_rate(phydev);
|
||||
+}
|
||||
+
|
||||
static int aqr107_read_status(struct phy_device *phydev)
|
||||
{
|
||||
int val, ret;
|
||||
@@ -489,7 +534,7 @@ static void aqr107_chip_info(struct phy_
|
||||
build_id = FIELD_GET(VEND1_GLOBAL_RSVD_STAT1_FW_BUILD_ID, val);
|
||||
prov_id = FIELD_GET(VEND1_GLOBAL_RSVD_STAT1_PROV_ID, val);
|
||||
|
||||
- phydev_dbg(phydev, "FW %u.%u, Build %u, Provisioning %u\n",
|
||||
+ phydev_info(phydev, "FW %u.%u, Build %u, Provisioning %u\n",
|
||||
fw_major, fw_minor, build_id, prov_id);
|
||||
}
|
||||
|
||||
@@ -661,6 +706,24 @@ static struct phy_driver aqr_driver[] =
|
||||
.link_change_notify = aqr107_link_change_notify,
|
||||
},
|
||||
{
|
||||
+ PHY_ID_MATCH_MODEL(PHY_ID_AQR113C),
|
||||
+ .name = "Aquantia AQR113C",
|
||||
+ .probe = aqr107_probe,
|
||||
+ .config_init = aqr107_config_init,
|
||||
+ .config_aneg = aqr_config_aneg,
|
||||
+ .config_intr = aqr_config_intr,
|
||||
+ .ack_interrupt = aqr_ack_interrupt,
|
||||
+ .read_status = aqr113c_read_status,
|
||||
+ .get_tunable = aqr107_get_tunable,
|
||||
+ .set_tunable = aqr107_set_tunable,
|
||||
+ .suspend = aqr107_suspend,
|
||||
+ .resume = aqr107_resume,
|
||||
+ .get_sset_count = aqr107_get_sset_count,
|
||||
+ .get_strings = aqr107_get_strings,
|
||||
+ .get_stats = aqr107_get_stats,
|
||||
+ .link_change_notify = aqr107_link_change_notify,
|
||||
+},
|
||||
+{
|
||||
PHY_ID_MATCH_MODEL(PHY_ID_AQCS109),
|
||||
.name = "Aquantia AQCS109",
|
||||
.probe = aqr107_probe,
|
||||
@@ -686,6 +749,24 @@ static struct phy_driver aqr_driver[] =
|
||||
.handle_interrupt = aqr_handle_interrupt,
|
||||
.read_status = aqr_read_status,
|
||||
},
|
||||
+{
|
||||
+ PHY_ID_MATCH_MODEL(PHY_ID_AQR813),
|
||||
+ .name = "Aquantia AQR813",
|
||||
+ .probe = aqr107_probe,
|
||||
+ .config_init = aqr107_config_init,
|
||||
+ .config_aneg = aqr_config_aneg,
|
||||
+ .config_intr = aqr_config_intr,
|
||||
+ .ack_interrupt = aqr_ack_interrupt,
|
||||
+ .read_status = aqr113c_read_status,
|
||||
+ .get_tunable = aqr107_get_tunable,
|
||||
+ .set_tunable = aqr107_set_tunable,
|
||||
+ .suspend = aqr107_suspend,
|
||||
+ .resume = aqr107_resume,
|
||||
+ .get_sset_count = aqr107_get_sset_count,
|
||||
+ .get_strings = aqr107_get_strings,
|
||||
+ .get_stats = aqr107_get_stats,
|
||||
+ .link_change_notify = aqr107_link_change_notify,
|
||||
+},
|
||||
};
|
||||
|
||||
module_phy_driver(aqr_driver);
|
||||
@@ -696,8 +777,10 @@ static struct mdio_device_id __maybe_unu
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR105) },
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR106) },
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR107) },
|
||||
+ { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQCS109) },
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR405) },
|
||||
+ { PHY_ID_MATCH_MODEL(PHY_ID_AQR813) },
|
||||
{ }
|
||||
};
|
||||
|
178
root/target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch
Executable file
178
root/target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch
Executable file
|
@ -0,0 +1,178 @@
|
|||
From ffe387740bbe88dd88bbe04d6375902708003d6e Mon Sep 17 00:00:00 2001
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Fri, 7 Jul 2017 17:25:00 +0200
|
||||
Subject: net: add packet mangeling
|
||||
|
||||
ar8216 switches have a hardware bug, which renders normal 802.1q support
|
||||
unusable. Packet mangling is required to fix up the vlan for incoming
|
||||
packets.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
include/linux/netdevice.h | 11 +++++++++++
|
||||
include/linux/skbuff.h | 14 ++++----------
|
||||
net/Kconfig | 6 ++++++
|
||||
net/core/dev.c | 20 +++++++++++++++-----
|
||||
net/core/skbuff.c | 17 +++++++++++++++++
|
||||
net/ethernet/eth.c | 6 ++++++
|
||||
6 files changed, 59 insertions(+), 15 deletions(-)
|
||||
|
||||
--- a/include/linux/netdevice.h
|
||||
+++ b/include/linux/netdevice.h
|
||||
@@ -1648,6 +1648,10 @@ enum netdev_priv_flags {
|
||||
IFF_TX_SKB_NO_LINEAR = 1<<31,
|
||||
};
|
||||
|
||||
+enum netdev_extra_priv_flags {
|
||||
+ IFF_NO_IP_ALIGN = 1<<0,
|
||||
+};
|
||||
+
|
||||
#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
|
||||
#define IFF_EBRIDGE IFF_EBRIDGE
|
||||
#define IFF_BONDING IFF_BONDING
|
||||
@@ -1680,6 +1684,7 @@ enum netdev_priv_flags {
|
||||
#define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER
|
||||
#define IFF_LIVE_RENAME_OK IFF_LIVE_RENAME_OK
|
||||
#define IFF_TX_SKB_NO_LINEAR IFF_TX_SKB_NO_LINEAR
|
||||
+#define IFF_NO_IP_ALIGN IFF_NO_IP_ALIGN
|
||||
|
||||
/* Specifies the type of the struct net_device::ml_priv pointer */
|
||||
enum netdev_ml_priv_type {
|
||||
@@ -1981,6 +1986,7 @@ struct net_device {
|
||||
/* Read-mostly cache-line for fast-path access */
|
||||
unsigned int flags;
|
||||
unsigned int priv_flags;
|
||||
+ unsigned int extra_priv_flags;
|
||||
const struct net_device_ops *netdev_ops;
|
||||
int ifindex;
|
||||
unsigned short gflags;
|
||||
@@ -2041,6 +2047,11 @@ struct net_device {
|
||||
const struct tlsdev_ops *tlsdev_ops;
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_ETHERNET_PACKET_MANGLE
|
||||
+ void (*eth_mangle_rx)(struct net_device *dev, struct sk_buff *skb);
|
||||
+ struct sk_buff *(*eth_mangle_tx)(struct net_device *dev, struct sk_buff *skb);
|
||||
+#endif
|
||||
+
|
||||
const struct header_ops *header_ops;
|
||||
|
||||
unsigned char operstate;
|
||||
@@ -2115,6 +2126,10 @@ struct net_device {
|
||||
struct mctp_dev __rcu *mctp_ptr;
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_ETHERNET_PACKET_MANGLE
|
||||
+ void *phy_ptr; /* PHY device specific data */
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Cache lines mostly used on receive path (including eth_type_trans())
|
||||
*/
|
||||
--- a/include/linux/skbuff.h
|
||||
+++ b/include/linux/skbuff.h
|
||||
@@ -2758,6 +2758,10 @@ static inline int pskb_trim(struct sk_bu
|
||||
return (len < skb->len) ? __pskb_trim(skb, len) : 0;
|
||||
}
|
||||
|
||||
+extern struct sk_buff *__netdev_alloc_skb_ip_align(struct net_device *dev,
|
||||
+ unsigned int length, gfp_t gfp);
|
||||
+
|
||||
+
|
||||
/**
|
||||
* pskb_trim_unique - remove end from a paged unique (not cloned) buffer
|
||||
* @skb: buffer to alter
|
||||
@@ -2908,16 +2912,6 @@ static inline struct sk_buff *dev_alloc_
|
||||
}
|
||||
|
||||
|
||||
-static inline struct sk_buff *__netdev_alloc_skb_ip_align(struct net_device *dev,
|
||||
- unsigned int length, gfp_t gfp)
|
||||
-{
|
||||
- struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp);
|
||||
-
|
||||
- if (NET_IP_ALIGN && skb)
|
||||
- skb_reserve(skb, NET_IP_ALIGN);
|
||||
- return skb;
|
||||
-}
|
||||
-
|
||||
static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
|
||||
unsigned int length)
|
||||
{
|
||||
--- a/net/Kconfig
|
||||
+++ b/net/Kconfig
|
||||
@@ -26,6 +26,12 @@ menuconfig NET
|
||||
|
||||
if NET
|
||||
|
||||
+config ETHERNET_PACKET_MANGLE
|
||||
+ bool
|
||||
+ help
|
||||
+ This option can be selected by phy drivers that need to mangle
|
||||
+ packets going in or out of an ethernet device.
|
||||
+
|
||||
config WANT_COMPAT_NETLINK_MESSAGES
|
||||
bool
|
||||
help
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -3578,6 +3578,11 @@ static int xmit_one(struct sk_buff *skb,
|
||||
if (dev_nit_active(dev))
|
||||
dev_queue_xmit_nit(skb, dev);
|
||||
|
||||
+#ifdef CONFIG_ETHERNET_PACKET_MANGLE
|
||||
+ if (dev->eth_mangle_tx && !(skb = dev->eth_mangle_tx(dev, skb)))
|
||||
+ return NETDEV_TX_OK;
|
||||
+#endif
|
||||
+
|
||||
len = skb->len;
|
||||
PRANDOM_ADD_NOISE(skb, dev, txq, len + jiffies);
|
||||
trace_net_dev_start_xmit(skb, dev);
|
||||
--- a/net/core/skbuff.c
|
||||
+++ b/net/core/skbuff.c
|
||||
@@ -61,6 +61,7 @@
|
||||
#include <linux/if_vlan.h>
|
||||
#include <linux/mpls.h>
|
||||
#include <linux/kcov.h>
|
||||
+#include <linux/if.h>
|
||||
|
||||
#include <net/protocol.h>
|
||||
#include <net/dst.h>
|
||||
@@ -602,6 +603,22 @@ skb_fail:
|
||||
}
|
||||
EXPORT_SYMBOL(__napi_alloc_skb);
|
||||
|
||||
+struct sk_buff *__netdev_alloc_skb_ip_align(struct net_device *dev,
|
||||
+ unsigned int length, gfp_t gfp)
|
||||
+{
|
||||
+ struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp);
|
||||
+
|
||||
+#ifdef CONFIG_ETHERNET_PACKET_MANGLE
|
||||
+ if (dev && (dev->extra_priv_flags & IFF_NO_IP_ALIGN))
|
||||
+ return skb;
|
||||
+#endif
|
||||
+
|
||||
+ if (NET_IP_ALIGN && skb)
|
||||
+ skb_reserve(skb, NET_IP_ALIGN);
|
||||
+ return skb;
|
||||
+}
|
||||
+EXPORT_SYMBOL(__netdev_alloc_skb_ip_align);
|
||||
+
|
||||
void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off,
|
||||
int size, unsigned int truesize)
|
||||
{
|
||||
--- a/net/ethernet/eth.c
|
||||
+++ b/net/ethernet/eth.c
|
||||
@@ -170,6 +170,12 @@ __be16 eth_type_trans(struct sk_buff *sk
|
||||
const struct ethhdr *eth;
|
||||
|
||||
skb->dev = dev;
|
||||
+
|
||||
+#ifdef CONFIG_ETHERNET_PACKET_MANGLE
|
||||
+ if (dev->eth_mangle_rx)
|
||||
+ dev->eth_mangle_rx(dev, skb);
|
||||
+#endif
|
||||
+
|
||||
skb_reset_mac_header(skb);
|
||||
|
||||
eth = (struct ethhdr *)skb->data;
|
|
@ -0,0 +1,74 @@
|
|||
From 82985725e071f2a5735052f18e109a32aeac3a0b Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Sun, 26 Jul 2020 02:38:31 +0200
|
||||
Subject: [PATCH] net: usb: r8152: add LED configuration from OF
|
||||
|
||||
This adds the ability to configure the LED configuration register using
|
||||
OF. This way, the correct value for board specific LED configuration can
|
||||
be determined.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
drivers/net/usb/r8152.c | 23 +++++++++++++++++++++++
|
||||
1 file changed, 23 insertions(+)
|
||||
|
||||
--- a/drivers/net/usb/r8152.c
|
||||
+++ b/drivers/net/usb/r8152.c
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <linux/mii.h>
|
||||
#include <linux/ethtool.h>
|
||||
#include <linux/usb.h>
|
||||
+#include <linux/of.h>
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/if_vlan.h>
|
||||
#include <linux/uaccess.h>
|
||||
@@ -6822,6 +6823,22 @@ static void rtl_tally_reset(struct r8152
|
||||
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY, ocp_data);
|
||||
}
|
||||
|
||||
+static int r8152_led_configuration(struct r8152 *tp)
|
||||
+{
|
||||
+ u32 led_data;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = of_property_read_u32(tp->udev->dev.of_node, "realtek,led-data",
|
||||
+ &led_data);
|
||||
+
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ ocp_write_word(tp, MCU_TYPE_PLA, PLA_LEDSEL, led_data);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void r8152b_init(struct r8152 *tp)
|
||||
{
|
||||
u32 ocp_data;
|
||||
@@ -6863,6 +6880,8 @@ static void r8152b_init(struct r8152 *tp
|
||||
ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL);
|
||||
ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN);
|
||||
ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data);
|
||||
+
|
||||
+ r8152_led_configuration(tp);
|
||||
}
|
||||
|
||||
static void r8153_init(struct r8152 *tp)
|
||||
@@ -7003,6 +7022,8 @@ static void r8153_init(struct r8152 *tp)
|
||||
tp->coalesce = COALESCE_SLOW;
|
||||
break;
|
||||
}
|
||||
+
|
||||
+ r8152_led_configuration(tp);
|
||||
}
|
||||
|
||||
static void r8153b_init(struct r8152 *tp)
|
||||
@@ -7085,6 +7106,8 @@ static void r8153b_init(struct r8152 *tp
|
||||
rtl_tally_reset(tp);
|
||||
|
||||
tp->coalesce = 15000; /* 15 us */
|
||||
+
|
||||
+ r8152_led_configuration(tp);
|
||||
}
|
||||
|
||||
static void r8153c_init(struct r8152 *tp)
|
|
@ -0,0 +1,54 @@
|
|||
From 3ee05f4aa64fc86af3be5bc176ba5808de9260a7 Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Sun, 26 Jul 2020 15:30:33 +0200
|
||||
Subject: [PATCH] dt-bindings: net: add RTL8152 binding documentation
|
||||
|
||||
Add binding documentation for the Realtek RTL8152 / RTL8153 USB ethernet
|
||||
adapters.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
.../bindings/net/realtek,rtl8152.yaml | 36 +++++++++++++++++++
|
||||
1 file changed, 36 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/net/realtek,rtl8152.yaml
|
||||
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/net/realtek,rtl8152.yaml
|
||||
@@ -0,0 +1,36 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0
|
||||
+%YAML 1.2
|
||||
+---
|
||||
+$id: http://devicetree.org/schemas/net/realtek,rtl8152.yaml#
|
||||
+$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
+
|
||||
+title: Realtek RTL8152/RTL8153 series USB ethernet
|
||||
+
|
||||
+maintainers:
|
||||
+ - David Bauer <mail@david-bauer.net>
|
||||
+
|
||||
+properties:
|
||||
+ compatible:
|
||||
+ oneOf:
|
||||
+ - items:
|
||||
+ - enum:
|
||||
+ - realtek,rtl8152
|
||||
+ - realtek,rtl8153
|
||||
+
|
||||
+ reg:
|
||||
+ description: The device number on the USB bus
|
||||
+
|
||||
+ realtek,led-data:
|
||||
+ description: Value to be written to the LED configuration register.
|
||||
+
|
||||
+required:
|
||||
+ - compatible
|
||||
+ - reg
|
||||
+
|
||||
+examples:
|
||||
+ - |
|
||||
+ usb-eth@2 {
|
||||
+ compatible = "realtek,rtl8153";
|
||||
+ reg = <2>;
|
||||
+ realtek,led-data = <0x87>;
|
||||
+ };
|
||||
\ No newline at end of file
|
|
@ -14,7 +14,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|||
|
||||
--- a/drivers/net/ethernet/broadcom/bgmac-bcma.c
|
||||
+++ b/drivers/net/ethernet/broadcom/bgmac-bcma.c
|
||||
@@ -268,6 +268,7 @@ static int bgmac_probe(struct bcma_devic
|
||||
@@ -280,6 +280,7 @@ static int bgmac_probe(struct bcma_devic
|
||||
bgmac->feature_flags |= BGMAC_FEAT_CLKCTLST;
|
||||
bgmac->feature_flags |= BGMAC_FEAT_NO_RESET;
|
||||
bgmac->feature_flags |= BGMAC_FEAT_FORCE_SPEED_2500;
|
||||
|
@ -55,7 +55,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|||
net_dev->max_mtu = BGMAC_RX_MAX_FRAME_SIZE - ETH_FCS_LEN;
|
||||
|
||||
+ if ((bgmac->feature_flags & BGMAC_FEAT_SRAB) && !bgmac_b53_pdata.regs) {
|
||||
+ bgmac_b53_pdata.regs = ioremap_nocache(0x18007000, 0x1000);
|
||||
+ bgmac_b53_pdata.regs = ioremap(0x18007000, 0x1000);
|
||||
+
|
||||
+ err = platform_device_register(&bgmac_b53_dev);
|
||||
+ if (!err)
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
From dd109ded2b526636fff438d33433ab64ffd21583 Mon Sep 17 00:00:00 2001
|
||||
From: Georgi Valkov <gvalkov@abv.bg>
|
||||
Date: Fri, 16 Apr 2021 20:44:36 +0300
|
||||
Subject: [PATCH] ipheth: fix EOVERFLOW in ipheth_rcvbulk_callback
|
||||
|
||||
When rx_buf is allocated we need to account for IPHETH_IP_ALIGN,
|
||||
which reduces the usable size by 2 bytes. Otherwise we have 1512
|
||||
bytes usable instead of 1514, and if we receive more than 1512
|
||||
bytes, ipheth_rcvbulk_callback is called with status -EOVERFLOW,
|
||||
after which the driver malfunctiones and all communication stops.
|
||||
|
||||
Fixes: ipheth 2-1:4.2: ipheth_rcvbulk_callback: urb status: -75
|
||||
|
||||
Signed-off-by: Georgi Valkov <gvalkov@abv.bg>
|
||||
---
|
||||
drivers/net/usb/ipheth.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c
|
||||
index 207e59e74935..06d9f19ca142 100644
|
||||
--- a/drivers/net/usb/ipheth.c
|
||||
+++ b/drivers/net/usb/ipheth.c
|
||||
@@ -121,7 +121,7 @@ static int ipheth_alloc_urbs(struct ipheth_device *iphone)
|
||||
if (tx_buf == NULL)
|
||||
goto free_rx_urb;
|
||||
|
||||
- rx_buf = usb_alloc_coherent(iphone->udev, IPHETH_BUF_SIZE,
|
||||
+ rx_buf = usb_alloc_coherent(iphone->udev, IPHETH_BUF_SIZE + IPHETH_IP_ALIGN,
|
||||
GFP_KERNEL, &rx_urb->transfer_dma);
|
||||
if (rx_buf == NULL)
|
||||
goto free_tx_buf;
|
||||
@@ -146,7 +146,7 @@ static int ipheth_alloc_urbs(struct ipheth_device *iphone)
|
||||
|
||||
static void ipheth_free_urbs(struct ipheth_device *iphone)
|
||||
{
|
||||
- usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, iphone->rx_buf,
|
||||
+ usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE + IPHETH_IP_ALIGN, iphone->rx_buf,
|
||||
iphone->rx_urb->transfer_dma);
|
||||
usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, iphone->tx_buf,
|
||||
iphone->tx_urb->transfer_dma);
|
||||
@@ -317,7 +317,7 @@ static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags)
|
||||
|
||||
usb_fill_bulk_urb(dev->rx_urb, udev,
|
||||
usb_rcvbulkpipe(udev, dev->bulk_in),
|
||||
- dev->rx_buf, IPHETH_BUF_SIZE,
|
||||
+ dev->rx_buf, IPHETH_BUF_SIZE + IPHETH_IP_ALIGN,
|
||||
ipheth_rcvbulk_callback,
|
||||
dev);
|
||||
dev->rx_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
|
||||
--
|
||||
2.31.1
|
||||
|
|
@ -15,9 +15,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
|||
|
||||
#include "gpiolib.h"
|
||||
#include "gpiolib-of.h"
|
||||
@@ -1039,3 +1041,72 @@ void of_gpiochip_remove(struct gpio_chip
|
||||
{
|
||||
of_node_put(chip->of_node);
|
||||
@@ -1052,3 +1054,72 @@ void of_gpio_dev_init(struct gpio_chip *
|
||||
else
|
||||
gc->of_node = gdev->dev.of_node;
|
||||
}
|
||||
+
|
||||
+#ifdef CONFIG_GPIO_SYSFS
|
||||
|
@ -129,7 +129,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
|||
{
|
||||
--- a/drivers/gpio/gpiolib-sysfs.c
|
||||
+++ b/drivers/gpio/gpiolib-sysfs.c
|
||||
@@ -572,7 +572,7 @@ static struct class gpio_class = {
|
||||
@@ -564,7 +564,7 @@ static struct class gpio_class = {
|
||||
*
|
||||
* Returns zero on success, else an error.
|
||||
*/
|
||||
|
@ -138,7 +138,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
|||
{
|
||||
struct gpio_chip *chip;
|
||||
struct gpio_device *gdev;
|
||||
@@ -634,6 +634,8 @@ int gpiod_export(struct gpio_desc *desc,
|
||||
@@ -626,6 +626,8 @@ int gpiod_export(struct gpio_desc *desc,
|
||||
offset = gpio_chip_hwgpio(desc);
|
||||
if (chip->names && chip->names[offset])
|
||||
ioname = chip->names[offset];
|
||||
|
@ -147,7 +147,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
|||
|
||||
dev = device_create_with_groups(&gpio_class, &gdev->dev,
|
||||
MKDEV(0, 0), data, gpio_groups,
|
||||
@@ -655,6 +657,12 @@ err_unlock:
|
||||
@@ -647,6 +649,12 @@ err_unlock:
|
||||
gpiod_dbg(desc, "%s: status %d\n", __func__, status);
|
||||
return status;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/net/Kconfig
|
||||
+++ b/net/Kconfig
|
||||
@@ -98,6 +98,9 @@ source "net/mptcp/Kconfig"
|
||||
@@ -104,6 +104,9 @@ source "net/mptcp/Kconfig"
|
||||
|
||||
endif # if INET
|
||||
|
||||
|
@ -58,7 +58,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
static void sock_inuse_add(struct net *net, int val);
|
||||
|
||||
@@ -544,6 +546,18 @@ discard_and_relse:
|
||||
@@ -545,6 +547,18 @@ discard_and_relse:
|
||||
}
|
||||
EXPORT_SYMBOL(__sk_receive_skb);
|
||||
|
||||
|
@ -77,7 +77,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *,
|
||||
u32));
|
||||
INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *,
|
||||
@@ -1967,9 +1981,11 @@ static void __sk_free(struct sock *sk)
|
||||
@@ -1981,9 +1995,11 @@ static void __sk_free(struct sock *sk)
|
||||
if (likely(sk->sk_net_refcnt))
|
||||
sock_inuse_add(sock_net(sk), -1);
|
||||
|
||||
|
@ -152,7 +152,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
Support for PF_PACKET sockets monitoring interface used by the ss tool.
|
||||
--- a/net/unix/Kconfig
|
||||
+++ b/net/unix/Kconfig
|
||||
@@ -28,6 +28,7 @@ config UNIX_SCM
|
||||
@@ -33,6 +33,7 @@ config AF_UNIX_OOB
|
||||
config UNIX_DIAG
|
||||
tristate "UNIX: socket monitoring interface"
|
||||
depends on UNIX
|
||||
|
|
|
@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/fs/locks.c
|
||||
+++ b/fs/locks.c
|
||||
@@ -3044,6 +3044,8 @@ static const struct seq_operations locks
|
||||
@@ -2929,6 +2929,8 @@ static const struct seq_operations locks
|
||||
|
||||
static int __init proc_locks_init(void)
|
||||
{
|
||||
|
@ -158,7 +158,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
IPC_SEM_IDS, sysvipc_sem_proc_show);
|
||||
--- a/ipc/shm.c
|
||||
+++ b/ipc/shm.c
|
||||
@@ -144,6 +144,8 @@ pure_initcall(ipc_ns_init);
|
||||
@@ -154,6 +154,8 @@ pure_initcall(ipc_ns_init);
|
||||
|
||||
void __init shm_init(void)
|
||||
{
|
||||
|
@ -235,7 +235,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
if (!pe)
|
||||
--- a/mm/vmalloc.c
|
||||
+++ b/mm/vmalloc.c
|
||||
@@ -3899,6 +3899,8 @@ static const struct seq_operations vmall
|
||||
@@ -3961,6 +3961,8 @@ static const struct seq_operations vmall
|
||||
|
||||
static int __init proc_vmalloc_init(void)
|
||||
{
|
||||
|
@ -246,7 +246,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
&vmalloc_op,
|
||||
--- a/mm/vmstat.c
|
||||
+++ b/mm/vmstat.c
|
||||
@@ -2044,10 +2044,12 @@ void __init init_mm_internals(void)
|
||||
@@ -2083,10 +2083,12 @@ void __init init_mm_internals(void)
|
||||
start_shepherd_timer();
|
||||
#endif
|
||||
#ifdef CONFIG_PROC_FS
|
||||
|
@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
|
||||
--- a/net/core/sock.c
|
||||
+++ b/net/core/sock.c
|
||||
@@ -3839,6 +3839,8 @@ static __net_initdata struct pernet_oper
|
||||
@@ -3853,6 +3853,8 @@ static __net_initdata struct pernet_oper
|
||||
|
||||
static int __init proto_init(void)
|
||||
{
|
||||
|
@ -396,7 +396,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||
}
|
||||
--- a/net/ipv4/route.c
|
||||
+++ b/net/ipv4/route.c
|
||||
@@ -386,6 +386,9 @@ static struct pernet_operations ip_rt_pr
|
||||
@@ -387,6 +387,9 @@ static struct pernet_operations ip_rt_pr
|
||||
|
||||
static int __init ip_rt_proc_init(void)
|
||||
{
|
||||
|
|
92
root/target/linux/generic/hack-5.15/904-debloat_dma_buf.patch
Executable file
92
root/target/linux/generic/hack-5.15/904-debloat_dma_buf.patch
Executable file
|
@ -0,0 +1,92 @@
|
|||
From e3692cb2fcd5ba1244512a0f43b8118f65f1c375 Mon Sep 17 00:00:00 2001
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sat, 8 Jul 2017 08:20:43 +0200
|
||||
Subject: debloat: dmabuf
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
drivers/base/Kconfig | 2 +-
|
||||
drivers/dma-buf/Makefile | 10 +++++++---
|
||||
drivers/dma-buf/dma-buf.c | 4 +++-
|
||||
kernel/sched/core.c | 1 +
|
||||
4 files changed, 12 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/drivers/base/Kconfig
|
||||
+++ b/drivers/base/Kconfig
|
||||
@@ -187,7 +187,7 @@ config SOC_BUS
|
||||
source "drivers/base/regmap/Kconfig"
|
||||
|
||||
config DMA_SHARED_BUFFER
|
||||
- bool
|
||||
+ tristate
|
||||
default n
|
||||
select IRQ_WORK
|
||||
help
|
||||
--- a/drivers/dma-buf/heaps/Makefile
|
||||
+++ b/drivers/dma-buf/heaps/Makefile
|
||||
@@ -1,3 +1,3 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
-obj-$(CONFIG_DMABUF_HEAPS_SYSTEM) += system_heap.o
|
||||
-obj-$(CONFIG_DMABUF_HEAPS_CMA) += cma_heap.o
|
||||
+dma-buf-objs-$(CONFIG_DMABUF_HEAPS_SYSTEM) += system_heap.o
|
||||
+dma-buf-objs-$(CONFIG_DMABUF_HEAPS_CMA) += cma_heap.o
|
||||
--- a/drivers/dma-buf/Makefile
|
||||
+++ b/drivers/dma-buf/Makefile
|
||||
@@ -1,16 +1,20 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
-obj-y := dma-buf.o dma-fence.o dma-fence-array.o dma-fence-chain.o \
|
||||
+obj-$(CONFIG_DMA_SHARED_BUFFER) := dma-shared-buffer.o
|
||||
+
|
||||
+dma-buf-objs-y := dma-buf.o dma-fence.o dma-fence-array.o dma-fence-chain.o \
|
||||
dma-resv.o seqno-fence.o
|
||||
-obj-$(CONFIG_DMABUF_HEAPS) += dma-heap.o
|
||||
-obj-$(CONFIG_DMABUF_HEAPS) += heaps/
|
||||
-obj-$(CONFIG_SYNC_FILE) += sync_file.o
|
||||
-obj-$(CONFIG_SW_SYNC) += sw_sync.o sync_debug.o
|
||||
-obj-$(CONFIG_UDMABUF) += udmabuf.o
|
||||
-obj-$(CONFIG_DMABUF_SYSFS_STATS) += dma-buf-sysfs-stats.o
|
||||
+dma-buf-objs-$(CONFIG_DMABUF_HEAPS) += dma-heap.o
|
||||
+obj-$(CONFIG_DMABUF_HEAPS) += heaps/
|
||||
+dma-buf-objs-$(CONFIG_SYNC_FILE) += sync_file.o
|
||||
+dma-buf-objs-$(CONFIG_SW_SYNC) += sw_sync.o sync_debug.o
|
||||
+dma-buf-objs-$(CONFIG_UDMABUF) += udmabuf.o
|
||||
+dma-buf-objs-$(CONFIG_DMABUF_SYSFS_STATS) += udmabuf.o
|
||||
|
||||
dmabuf_selftests-y := \
|
||||
selftest.o \
|
||||
st-dma-fence.o \
|
||||
st-dma-fence-chain.o
|
||||
|
||||
-obj-$(CONFIG_DMABUF_SELFTESTS) += dmabuf_selftests.o
|
||||
+dma-buf-objs-$(CONFIG_DMABUF_SELFTESTS) += dmabuf_selftests.o
|
||||
+
|
||||
+dma-shared-buffer-objs := $(dma-buf-objs-y)
|
||||
--- a/drivers/dma-buf/dma-buf.c
|
||||
+++ b/drivers/dma-buf/dma-buf.c
|
||||
@@ -1498,4 +1498,5 @@ static void __exit dma_buf_deinit(void)
|
||||
kern_unmount(dma_buf_mnt);
|
||||
dma_buf_uninit_sysfs_statistics();
|
||||
}
|
||||
-__exitcall(dma_buf_deinit);
|
||||
+module_exit(dma_buf_deinit);
|
||||
+MODULE_LICENSE("GPL");
|
||||
--- a/kernel/sched/core.c
|
||||
+++ b/kernel/sched/core.c
|
||||
@@ -4174,6 +4174,7 @@ int wake_up_state(struct task_struct *p,
|
||||
{
|
||||
return try_to_wake_up(p, state, 0);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(wake_up_state);
|
||||
|
||||
/*
|
||||
* Perform scheduler related setup for a newly forked process p.
|
||||
--- a/fs/d_path.c
|
||||
+++ b/fs/d_path.c
|
||||
@@ -316,6 +316,7 @@ char *dynamic_dname(struct dentry *dentr
|
||||
buffer += buflen - sz;
|
||||
return memcpy(buffer, temp, sz);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(dynamic_dname);
|
||||
|
||||
char *simple_dname(struct dentry *dentry, char *buffer, int buflen)
|
||||
{
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue