Merge upstream source
This commit is contained in:
commit
79c0342e2d
@ -197,6 +197,10 @@ menu "Global build settings"
|
|||||||
config USE_UCLIBCXX
|
config USE_UCLIBCXX
|
||||||
bool "uClibc++"
|
bool "uClibc++"
|
||||||
|
|
||||||
|
config USE_LIBCXX
|
||||||
|
bool "libc++"
|
||||||
|
depends on !USE_UCLIBC
|
||||||
|
|
||||||
config USE_LIBSTDCXX
|
config USE_LIBSTDCXX
|
||||||
bool "libstdc++"
|
bool "libstdc++"
|
||||||
endchoice
|
endchoice
|
||||||
@ -212,11 +216,10 @@ menu "Global build settings"
|
|||||||
this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
|
this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
|
||||||
Makefile.
|
Makefile.
|
||||||
|
|
||||||
config PKG_ASLR_PIE
|
choice
|
||||||
bool
|
|
||||||
prompt "User space ASLR PIE compilation"
|
prompt "User space ASLR PIE compilation"
|
||||||
select BUSYBOX_DEFAULT_PIE
|
default PKG_ASLR_PIE_NONE if ((SMALL_FLASH || LOW_MEMORY_FOOTPRINT) && !SDK)
|
||||||
default n
|
default PKG_ASLR_PIE_REGULAR
|
||||||
help
|
help
|
||||||
Add -fPIC to CFLAGS and -specs=hardened-build-ld to LDFLAGS.
|
Add -fPIC to CFLAGS and -specs=hardened-build-ld to LDFLAGS.
|
||||||
This enables package build as Position Independent Executables (PIE)
|
This enables package build as Position Independent Executables (PIE)
|
||||||
@ -227,6 +230,21 @@ menu "Global build settings"
|
|||||||
to predict when an attacker is attempting a memory-corruption exploit.
|
to predict when an attacker is attempting a memory-corruption exploit.
|
||||||
You can disable this per package by adding PKG_ASLR_PIE:=0 in the package
|
You can disable this per package by adding PKG_ASLR_PIE:=0 in the package
|
||||||
Makefile.
|
Makefile.
|
||||||
|
Be ware that ASLR increases the binary size.
|
||||||
|
config PKG_ASLR_PIE_NONE
|
||||||
|
bool "None"
|
||||||
|
help
|
||||||
|
PIE is deactivated for all applications
|
||||||
|
config PKG_ASLR_PIE_REGULAR
|
||||||
|
bool "Regular"
|
||||||
|
help
|
||||||
|
PIE is activated for some binaries, mostly network exposed applications
|
||||||
|
config PKG_ASLR_PIE_ALL
|
||||||
|
bool "All"
|
||||||
|
select BUSYBOX_DEFAULT_PIE
|
||||||
|
help
|
||||||
|
PIE is activated for all applications
|
||||||
|
endchoice
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "User space Stack-Smashing Protection"
|
prompt "User space Stack-Smashing Protection"
|
||||||
|
|||||||
@ -103,6 +103,7 @@ define Host/Configure/Default
|
|||||||
-DCMAKE_INSTALL_PREFIX=$(HOST_BUILD_PREFIX) \
|
-DCMAKE_INSTALL_PREFIX=$(HOST_BUILD_PREFIX) \
|
||||||
-DCMAKE_PREFIX_PATH=$(HOST_BUILD_PREFIX) \
|
-DCMAKE_PREFIX_PATH=$(HOST_BUILD_PREFIX) \
|
||||||
-DCMAKE_SKIP_RPATH=TRUE \
|
-DCMAKE_SKIP_RPATH=TRUE \
|
||||||
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||||
$(CMAKE_HOST_OPTIONS) \
|
$(CMAKE_HOST_OPTIONS) \
|
||||||
$(HOST_CMAKE_SOURCE_DIR) \
|
$(HOST_CMAKE_SOURCE_DIR) \
|
||||||
)
|
)
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
PKG_CHECK_FORMAT_SECURITY ?= 1
|
PKG_CHECK_FORMAT_SECURITY ?= 1
|
||||||
PKG_ASLR_PIE ?= 1
|
PKG_ASLR_PIE ?= 1
|
||||||
|
PKG_ASLR_PIE_REGULAR ?= 0
|
||||||
PKG_SSP ?= 1
|
PKG_SSP ?= 1
|
||||||
PKG_FORTIFY_SOURCE ?= 1
|
PKG_FORTIFY_SOURCE ?= 1
|
||||||
PKG_RELRO ?= 1
|
PKG_RELRO ?= 1
|
||||||
@ -16,12 +17,18 @@ ifdef CONFIG_PKG_CHECK_FORMAT_SECURITY
|
|||||||
TARGET_CFLAGS += -Wformat -Werror=format-security
|
TARGET_CFLAGS += -Wformat -Werror=format-security
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifdef CONFIG_PKG_ASLR_PIE
|
ifdef CONFIG_PKG_ASLR_PIE_ALL
|
||||||
ifeq ($(strip $(PKG_ASLR_PIE)),1)
|
ifeq ($(strip $(PKG_ASLR_PIE)),1)
|
||||||
TARGET_CFLAGS += $(FPIC)
|
TARGET_CFLAGS += $(FPIC)
|
||||||
TARGET_LDFLAGS += $(FPIC) -specs=$(INCLUDE_DIR)/hardened-ld-pie.specs
|
TARGET_LDFLAGS += $(FPIC) -specs=$(INCLUDE_DIR)/hardened-ld-pie.specs
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
ifdef CONFIG_PKG_ASLR_PIE_REGULAR
|
||||||
|
ifeq ($(strip $(PKG_ASLR_PIE_REGULAR)),1)
|
||||||
|
TARGET_CFLAGS += $(FPIC)
|
||||||
|
TARGET_LDFLAGS += $(FPIC) -specs=$(INCLUDE_DIR)/hardened-ld-pie.specs
|
||||||
|
endif
|
||||||
|
endif
|
||||||
ifdef CONFIG_PKG_CC_STACKPROTECTOR_REGULAR
|
ifdef CONFIG_PKG_CC_STACKPROTECTOR_REGULAR
|
||||||
ifeq ($(strip $(PKG_SSP)),1)
|
ifeq ($(strip $(PKG_SSP)),1)
|
||||||
TARGET_CFLAGS += -fstack-protector
|
TARGET_CFLAGS += -fstack-protector
|
||||||
|
|||||||
@ -3,6 +3,10 @@
|
|||||||
IMAGE_KERNEL = $(word 1,$^)
|
IMAGE_KERNEL = $(word 1,$^)
|
||||||
IMAGE_ROOTFS = $(word 2,$^)
|
IMAGE_ROOTFS = $(word 2,$^)
|
||||||
|
|
||||||
|
define rootfs_align
|
||||||
|
$(patsubst %-256k,0x40000,$(patsubst %-128k,0x20000,$(patsubst %-64k,0x10000,$(patsubst squashfs%,0x4,$(patsubst root.%,%,$(1))))))
|
||||||
|
endef
|
||||||
|
|
||||||
define Build/uImage
|
define Build/uImage
|
||||||
mkimage -A $(LINUX_KARCH) \
|
mkimage -A $(LINUX_KARCH) \
|
||||||
-O linux -T kernel \
|
-O linux -T kernel \
|
||||||
@ -271,6 +275,13 @@ define Build/check-size
|
|||||||
}
|
}
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Build/check-kernel-size
|
||||||
|
@[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(1))))) -ge "$$(stat -c%s $(IMAGE_KERNEL))" ] || { \
|
||||||
|
echo "WARNING: Kernel for $@ is too big > $(1)" >&2; \
|
||||||
|
rm -f $@; \
|
||||||
|
}
|
||||||
|
endef
|
||||||
|
|
||||||
define Build/combined-image
|
define Build/combined-image
|
||||||
-sh $(TOPDIR)/scripts/combined-image.sh \
|
-sh $(TOPDIR)/scripts/combined-image.sh \
|
||||||
"$(IMAGE_KERNEL)" \
|
"$(IMAGE_KERNEL)" \
|
||||||
@ -335,6 +346,24 @@ define Build/tplink-v1-header
|
|||||||
@mv $@.new $@
|
@mv $@.new $@
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
# combine kernel and rootfs into one image
|
||||||
|
# mktplinkfw <type> <optional extra arguments to mktplinkfw binary>
|
||||||
|
# <type> is "sysupgrade" or "factory"
|
||||||
|
#
|
||||||
|
# -a align the rootfs start on an <align> bytes boundary
|
||||||
|
# -j add jffs2 end-of-filesystem markers
|
||||||
|
# -s strip padding from end of the image
|
||||||
|
# -X reserve <size> bytes in the firmware image (hexval prefixed with 0x)
|
||||||
|
define Build/tplink-v1-image
|
||||||
|
-$(STAGING_DIR_HOST)/bin/mktplinkfw \
|
||||||
|
-H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) \
|
||||||
|
-N "$(VERSION_DIST)" -V $(REVISION) -m $(TPLINK_HEADER_VERSION) \
|
||||||
|
-k $(IMAGE_KERNEL) -r $(IMAGE_ROOTFS) -o $@.new -j -X 0x40000 \
|
||||||
|
-a $(call rootfs_align,$(FILESYSTEM)) \
|
||||||
|
$(wordlist 2,$(words $(1)),$(1)) \
|
||||||
|
$(if $(findstring sysupgrade,$(word 1,$(1))),-s) && mv $@.new $@ || rm -f $@
|
||||||
|
endef
|
||||||
|
|
||||||
define Build/tplink-v2-header
|
define Build/tplink-v2-header
|
||||||
$(STAGING_DIR_HOST)/bin/mktplinkfw2 \
|
$(STAGING_DIR_HOST)/bin/mktplinkfw2 \
|
||||||
-c -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -L $(KERNEL_LOADADDR) \
|
-c -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -L $(KERNEL_LOADADDR) \
|
||||||
|
|||||||
@ -157,18 +157,13 @@ endif
|
|||||||
|
|
||||||
|
|
||||||
# Disable noisy checks by default as in upstream
|
# Disable noisy checks by default as in upstream
|
||||||
ifeq ($(strip $(call kernel_patchver_ge,4.7.0)),1)
|
DTC_FLAGS += \
|
||||||
DTC_FLAGS += -Wno-unit_address_vs_reg
|
-Wno-unit_address_vs_reg \
|
||||||
endif
|
-Wno-simple_bus_reg \
|
||||||
ifeq ($(strip $(call kernel_patchver_ge,4.12.0)),1)
|
-Wno-unit_address_format \
|
||||||
DTC_FLAGS += \
|
-Wno-pci_bridge \
|
||||||
-Wno-unit_address_vs_reg \
|
-Wno-pci_device_bus_num \
|
||||||
-Wno-simple_bus_reg \
|
-Wno-pci_device_reg
|
||||||
-Wno-unit_address_format \
|
|
||||||
-Wno-pci_bridge \
|
|
||||||
-Wno-pci_device_bus_num \
|
|
||||||
-Wno-pci_device_reg
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(call kernel_patchver_ge,4.17.0)),1)
|
ifeq ($(strip $(call kernel_patchver_ge,4.17.0)),1)
|
||||||
DTC_FLAGS += \
|
DTC_FLAGS += \
|
||||||
-Wno-avoid_unnecessary_addr_size \
|
-Wno-avoid_unnecessary_addr_size \
|
||||||
@ -420,6 +415,7 @@ define Device/Init
|
|||||||
DEVICE_DTS :=
|
DEVICE_DTS :=
|
||||||
DEVICE_DTS_CONFIG :=
|
DEVICE_DTS_CONFIG :=
|
||||||
DEVICE_DTS_DIR :=
|
DEVICE_DTS_DIR :=
|
||||||
|
SOC :=
|
||||||
|
|
||||||
BOARD_NAME :=
|
BOARD_NAME :=
|
||||||
UIMAGE_NAME :=
|
UIMAGE_NAME :=
|
||||||
@ -437,7 +433,7 @@ DEFAULT_DEVICE_VARS := \
|
|||||||
DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE KERNEL_SIZE \
|
DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE KERNEL_SIZE \
|
||||||
CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE \
|
CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE \
|
||||||
VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS \
|
VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS \
|
||||||
DEVICE_DTS_CONFIG DEVICE_DTS_DIR BOARD_NAME UIMAGE_NAME SUPPORTED_DEVICES \
|
DEVICE_DTS_CONFIG DEVICE_DTS_DIR SOC BOARD_NAME UIMAGE_NAME SUPPORTED_DEVICES \
|
||||||
IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR UBOOT_PATH DEVICE_VENDOR \
|
IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR UBOOT_PATH DEVICE_VENDOR \
|
||||||
DEVICE_MODEL DEVICE_VARIANT \
|
DEVICE_MODEL DEVICE_VARIANT \
|
||||||
DEVICE_ALT0_VENDOR DEVICE_ALT0_MODEL DEVICE_ALT0_VARIANT \
|
DEVICE_ALT0_VENDOR DEVICE_ALT0_MODEL DEVICE_ALT0_VARIANT \
|
||||||
|
|||||||
@ -6,13 +6,11 @@ ifdef CONFIG_TESTING_KERNEL
|
|||||||
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LINUX_VERSION-4.9 = .206
|
LINUX_VERSION-4.14 = .167
|
||||||
LINUX_VERSION-4.14 = .158
|
LINUX_VERSION-4.19 = .98
|
||||||
LINUX_VERSION-4.19 = .88
|
|
||||||
|
|
||||||
LINUX_KERNEL_HASH-4.9.206 = 1df27899a9bc4dd874f3830ab9e7b638f0026dffd67a2e230444e5d2805ccad6
|
LINUX_KERNEL_HASH-4.14.167 = 2bb78fc7a902faf4f5dad47fdbc2f4bf3df3cf9b41f408e7260f36656659fe43
|
||||||
LINUX_KERNEL_HASH-4.14.158 = 0d49ec72e273f6fc7462ad56849b2285f13fd5f4185e8f932a0074fc2eca1bb3
|
LINUX_KERNEL_HASH-4.19.98 = 91feb13bc22d60d69596ab1d01dfecbec13ef70f00c89a483e0733af94dd2937
|
||||||
LINUX_KERNEL_HASH-4.19.88 = c1923b6bd166e6dd07be860c15f59e8273aaa8692bc2a1fce1d31b826b9b3fbe
|
|
||||||
|
|
||||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||||
|
|||||||
@ -114,6 +114,7 @@ KERNEL_MAKE_FLAGS = \
|
|||||||
KBUILD_BUILD_TIMESTAMP="$(KBUILD_BUILD_TIMESTAMP)" \
|
KBUILD_BUILD_TIMESTAMP="$(KBUILD_BUILD_TIMESTAMP)" \
|
||||||
KBUILD_BUILD_VERSION="0" \
|
KBUILD_BUILD_VERSION="0" \
|
||||||
HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib" \
|
HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib" \
|
||||||
|
KBUILD_HOSTLDLIBS="-L$(STAGING_DIR_HOST)/lib" \
|
||||||
CONFIG_SHELL="$(BASH)" \
|
CONFIG_SHELL="$(BASH)" \
|
||||||
$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \
|
$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \
|
||||||
$(if $(PKG_BUILD_ID),LDFLAGS_MODULE=--build-id=0x$(PKG_BUILD_ID)) \
|
$(if $(PKG_BUILD_ID),LDFLAGS_MODULE=--build-id=0x$(PKG_BUILD_ID)) \
|
||||||
|
|||||||
@ -185,7 +185,7 @@ $(eval $(call nf_add,IPT_IPV6_EXTRA,CONFIG_IP6_NF_MATCH_RT, $(P_V6)ip6t_rt))
|
|||||||
|
|
||||||
# kernel only
|
# kernel only
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT, $(P_XT)nf_nat),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT, $(P_XT)nf_nat),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_REDIRECT, $(P_XT)nf_nat_redirect, ge 3.19.0),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_REDIRECT, $(P_XT)nf_nat_redirect),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_IPV4, $(P_V4)nf_nat_ipv4),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_IPV4, $(P_V4)nf_nat_ipv4),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_MASQUERADE_IPV4, $(P_V4)nf_nat_masquerade_ipv4, lt 4.18),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_MASQUERADE_IPV4, $(P_V4)nf_nat_masquerade_ipv4, lt 4.18),))
|
||||||
|
|
||||||
@ -261,8 +261,8 @@ $(eval $(call nf_add,IPT_DEBUG,CONFIG_NETFILTER_XT_TARGET_TRACE, $(P_XT)xt_TRACE
|
|||||||
# tproxy
|
# tproxy
|
||||||
|
|
||||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NETFILTER_XT_MATCH_SOCKET, $(P_XT)xt_socket))
|
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NETFILTER_XT_MATCH_SOCKET, $(P_XT)xt_socket))
|
||||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV4, $(P_V4)nf_socket_ipv4, ge 4.10))
|
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV4, $(P_V4)nf_socket_ipv4))
|
||||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV6, $(P_V6)nf_socket_ipv6, ge 4.10))
|
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV6, $(P_V6)nf_socket_ipv6))
|
||||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NETFILTER_XT_TARGET_TPROXY, $(P_XT)xt_TPROXY))
|
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NETFILTER_XT_TARGET_TPROXY, $(P_XT)xt_TPROXY))
|
||||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_TPROXY_IPV4, $(P_V4)nf_tproxy_ipv4, ge 4.18))
|
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_TPROXY_IPV4, $(P_V4)nf_tproxy_ipv4, ge 4.18))
|
||||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_TPROXY_IPV6, $(P_V6)nf_tproxy_ipv6, ge 4.18))
|
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_TPROXY_IPV6, $(P_V6)nf_tproxy_ipv6, ge 4.18))
|
||||||
@ -273,8 +273,8 @@ $(eval $(call nf_add,IPT_LED,CONFIG_NETFILTER_XT_TARGET_LED, $(P_XT)xt_LED))
|
|||||||
# tee
|
# tee
|
||||||
|
|
||||||
$(eval $(call nf_add,IPT_TEE,CONFIG_NETFILTER_XT_TARGET_TEE, $(P_XT)xt_TEE))
|
$(eval $(call nf_add,IPT_TEE,CONFIG_NETFILTER_XT_TARGET_TEE, $(P_XT)xt_TEE))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV4, $(P_V4)nf_dup_ipv4, ge 4.3),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV4, $(P_V4)nf_dup_ipv4),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV6, $(P_V6)nf_dup_ipv6, ge 4.3),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV6, $(P_V6)nf_dup_ipv6),))
|
||||||
|
|
||||||
# u32
|
# u32
|
||||||
|
|
||||||
@ -336,25 +336,26 @@ $(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_NFQUEUE, $(P_EBT)ebt_nf
|
|||||||
# nftables
|
# nftables
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES, $(P_XT)nf_tables),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES, $(P_XT)nf_tables),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_INET, $(P_XT)nf_tables_inet, lt 4.17),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_INET, $(P_XT)nf_tables_inet, lt 4.17),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_EXTHDR, $(P_XT)nft_exthdr),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_IPV4, $(P_V4)nf_tables_ipv4, lt 4.17),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_META, $(P_XT)nft_meta),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_IPV6, $(P_V6)nf_tables_ipv6, lt 4.17),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_NUMGEN, $(P_XT)nft_numgen, ge 4.9.0),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_SET, $(P_XT)nf_tables_set, ge 4.18),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CT, $(P_XT)nft_ct),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CHAIN_ROUTE_IPV4, $(P_V4)nft_chain_route_ipv4),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_SET_RBTREE, $(P_XT)nft_set_rbtree, ge 4.9.0),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CHAIN_ROUTE_IPV6, $(P_V6)nft_chain_route_ipv6),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_RBTREE, $(P_XT)nft_rbtree, lt 4.9.0),))
|
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_SET_HASH, $(P_XT)nft_set_hash, ge 4.9.0),))
|
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_HASH, $(P_XT)nft_hash, lt 4.9.0),))
|
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_COUNTER, $(P_XT)nft_counter),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_COUNTER, $(P_XT)nft_counter),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_LOG, $(P_XT)nft_log),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CT, $(P_XT)nft_ct),))
|
||||||
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_EXTHDR, $(P_XT)nft_exthdr),))
|
||||||
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_HASH, $(P_XT)nft_hash),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_LIMIT, $(P_XT)nft_limit),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_LIMIT, $(P_XT)nft_limit),))
|
||||||
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_LOG, $(P_XT)nft_log),))
|
||||||
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_META, $(P_XT)nft_meta),))
|
||||||
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_NUMGEN, $(P_XT)nft_numgen),))
|
||||||
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_OBJREF, $(P_XT)nft_objref),))
|
||||||
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_QUOTA, $(P_XT)nft_quota),))
|
||||||
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REDIR, $(P_XT)nft_redir),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REJECT, $(P_XT)nft_reject $(P_V4)nft_reject_ipv4 $(P_V6)nft_reject_ipv6),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REJECT, $(P_XT)nft_reject $(P_V4)nft_reject_ipv4 $(P_V6)nft_reject_ipv6),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REJECT_INET, $(P_XT)nft_reject_inet),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REJECT_INET, $(P_XT)nft_reject_inet),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_IPV4, $(P_V4)nf_tables_ipv4, lt 4.17),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_SET_HASH, $(P_XT)nft_set_hash, lt 4.18),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CHAIN_ROUTE_IPV4, $(P_V4)nft_chain_route_ipv4),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_SET_RBTREE, $(P_XT)nft_set_rbtree, lt 4.18),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_IPV6, $(P_V6)nf_tables_ipv6, lt 4.17),))
|
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CHAIN_ROUTE_IPV6, $(P_V6)nft_chain_route_ipv6),))
|
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REDIR, $(P_XT)nft_redir, ge 3.19.0),))
|
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_QUOTA, $(P_XT)nft_quota, ge 4.9.0),))
|
|
||||||
|
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_ARP,CONFIG_NF_TABLES_ARP, $(P_V4)nf_tables_arp, lt 4.17),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_ARP,CONFIG_NF_TABLES_ARP, $(P_V4)nf_tables_arp, lt 4.17),))
|
||||||
|
|
||||||
@ -364,11 +365,11 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NFT_BRIDGE,CONFIG_NFT_BRIDGE_REJECT, $(P_EB
|
|||||||
|
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_NAT, $(P_XT)nft_nat),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_NAT, $(P_XT)nft_nat),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_CHAIN_NAT_IPV4, $(P_V4)nft_chain_nat_ipv4),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_CHAIN_NAT_IPV4, $(P_V4)nft_chain_nat_ipv4),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_REDIR_IPV4, $(P_V4)nft_redir_ipv4, ge 3.19.0),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_REDIR_IPV4, $(P_V4)nft_redir_ipv4),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_MASQ, $(P_XT)nft_masq),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_MASQ, $(P_XT)nft_masq),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_MASQ_IPV4, $(P_V4)nft_masq_ipv4),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_MASQ_IPV4, $(P_V4)nft_masq_ipv4),))
|
||||||
|
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_REDIR_IPV6, $(P_V6)nft_redir_ipv6, ge 3.19.0),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_REDIR_IPV6, $(P_V6)nft_redir_ipv6),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_CHAIN_NAT_IPV6, $(P_V6)nft_chain_nat_ipv6),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_CHAIN_NAT_IPV6, $(P_V6)nft_chain_nat_ipv6),))
|
||||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_MASQ_IPV6, $(P_V6)nft_masq_ipv6),))
|
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_MASQ_IPV6, $(P_V6)nft_masq_ipv6),))
|
||||||
|
|
||||||
|
|||||||
@ -207,7 +207,7 @@ $(_endef)
|
|||||||
(cd $$(IDIR_$(1)); \
|
(cd $$(IDIR_$(1)); \
|
||||||
( \
|
( \
|
||||||
find . -type f \! -path ./CONTROL/\* -exec sha256sum \{\} \; 2> /dev/null | \
|
find . -type f \! -path ./CONTROL/\* -exec sha256sum \{\} \; 2> /dev/null | \
|
||||||
sed 's|\([[:blank:]]\)\./|\1/|' > $$(IDIR_$(1))/CONTROL/files-sha256 \
|
sed 's|\([[:blank:]]\)\./|\1/|' > $$(IDIR_$(1))/CONTROL/files-sha256sum \
|
||||||
) || true \
|
) || true \
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|||||||
@ -53,10 +53,6 @@ else
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(filter 4.9,$(KERNEL_PATCHVER)),)
|
|
||||||
DEFAULT_PACKAGES.router:=$(filter-out kmod-ipt-offload,$(DEFAULT_PACKAGES.router))
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Add device specific packages (here below to allow device type set from subtarget)
|
# Add device specific packages (here below to allow device type set from subtarget)
|
||||||
DEFAULT_PACKAGES += $(DEFAULT_PACKAGES.$(DEVICE_TYPE))
|
DEFAULT_PACKAGES += $(DEFAULT_PACKAGES.$(DEVICE_TYPE))
|
||||||
|
|
||||||
|
|||||||
@ -4,8 +4,8 @@ ifndef DUMP
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PKG_PREPARED_DEPENDS += CONFIG_USE_UCLIBCXX
|
PKG_PREPARED_DEPENDS += CONFIG_USE_UCLIBCXX CONFIG_USE_LIBCXX
|
||||||
CXX_DEPENDS = +USE_UCLIBCXX:uclibcxx +USE_LIBSTDCXX:libstdcpp
|
CXX_DEPENDS = +USE_UCLIBCXX:uclibcxx +USE_LIBCXX:libcxx +USE_LIBSTDCXX:libstdcpp
|
||||||
|
|
||||||
ifneq ($(CONFIG_USE_UCLIBCXX),)
|
ifneq ($(CONFIG_USE_UCLIBCXX),)
|
||||||
ifneq ($(CONFIG_CCACHE),)
|
ifneq ($(CONFIG_CCACHE),)
|
||||||
@ -14,3 +14,11 @@ ifneq ($(CONFIG_USE_UCLIBCXX),)
|
|||||||
TARGET_CXX=g++-uc
|
TARGET_CXX=g++-uc
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_USE_LIBCXX),)
|
||||||
|
ifneq ($(CONFIG_CCACHE),)
|
||||||
|
TARGET_CXX_NOCACHE=g++-libcxx
|
||||||
|
else
|
||||||
|
TARGET_CXX=g++-libcxx
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|||||||
@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
|
|||||||
include $(INCLUDE_DIR)/feeds.mk
|
include $(INCLUDE_DIR)/feeds.mk
|
||||||
|
|
||||||
PKG_NAME:=base-files
|
PKG_NAME:=base-files
|
||||||
PKG_RELEASE:=210
|
PKG_RELEASE:=213
|
||||||
PKG_FLAGS:=nonshared
|
PKG_FLAGS:=nonshared
|
||||||
|
|
||||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||||
@ -204,8 +204,8 @@ define Package/base-files/install
|
|||||||
mkdir -p $(1)/etc/opkg; \
|
mkdir -p $(1)/etc/opkg; \
|
||||||
$(call FeedSourcesAppend,$(1)/etc/opkg/distfeeds.conf); \
|
$(call FeedSourcesAppend,$(1)/etc/opkg/distfeeds.conf); \
|
||||||
$(VERSION_SED_SCRIPT) $(1)/etc/opkg/distfeeds.conf)
|
$(VERSION_SED_SCRIPT) $(1)/etc/opkg/distfeeds.conf)
|
||||||
$(if $(CONFIG_IPK_FILES_CHECKSUMS), \
|
$(if $(CONFIG_IPK_FILES_CHECKSUMS),, \
|
||||||
rm -f $(1)/sbin/pkg_check,)
|
rm -f $(1)/sbin/pkg_check)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
ifneq ($(DUMP),1)
|
ifneq ($(DUMP),1)
|
||||||
|
|||||||
@ -31,8 +31,9 @@ boot() {
|
|||||||
chmod 0700 /tmp/.uci
|
chmod 0700 /tmp/.uci
|
||||||
touch /var/log/wtmp
|
touch /var/log/wtmp
|
||||||
touch /var/log/lastlog
|
touch /var/log/lastlog
|
||||||
touch /tmp/resolv.conf.auto
|
mkdir -p /tmp/resolv.conf.d
|
||||||
ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
|
touch /tmp/resolv.conf.d/resolv.conf.auto
|
||||||
|
ln -sf /tmp/resolv.conf.d/resolv.conf.auto /tmp/resolv.conf
|
||||||
grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
|
grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
|
||||||
[ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
|
[ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
|
||||||
|
|
||||||
|
|||||||
@ -70,7 +70,7 @@ config () {
|
|||||||
local cfgtype="$1"
|
local cfgtype="$1"
|
||||||
local name="$2"
|
local name="$2"
|
||||||
|
|
||||||
export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=$(($CONFIG_NUM_SECTIONS + 1))
|
export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=$((CONFIG_NUM_SECTIONS + 1))
|
||||||
name="${name:-cfg$CONFIG_NUM_SECTIONS}"
|
name="${name:-cfg$CONFIG_NUM_SECTIONS}"
|
||||||
append CONFIG_SECTIONS "$name"
|
append CONFIG_SECTIONS "$name"
|
||||||
export ${NO_EXPORT:+-n} CONFIG_SECTION="$name"
|
export ${NO_EXPORT:+-n} CONFIG_SECTION="$name"
|
||||||
@ -93,7 +93,7 @@ list() {
|
|||||||
|
|
||||||
config_get len "$CONFIG_SECTION" "${varname}_LENGTH" 0
|
config_get len "$CONFIG_SECTION" "${varname}_LENGTH" 0
|
||||||
[ $len = 0 ] && append CONFIG_LIST_STATE "${CONFIG_SECTION}_${varname}"
|
[ $len = 0 ] && append CONFIG_LIST_STATE "${CONFIG_SECTION}_${varname}"
|
||||||
len=$(($len + 1))
|
len=$((len + 1))
|
||||||
config_set "$CONFIG_SECTION" "${varname}_ITEM$len" "$value"
|
config_set "$CONFIG_SECTION" "${varname}_ITEM$len" "$value"
|
||||||
config_set "$CONFIG_SECTION" "${varname}_LENGTH" "$len"
|
config_set "$CONFIG_SECTION" "${varname}_LENGTH" "$len"
|
||||||
append "CONFIG_${CONFIG_SECTION}_${varname}" "$value" "$LIST_SEP"
|
append "CONFIG_${CONFIG_SECTION}_${varname}" "$value" "$LIST_SEP"
|
||||||
@ -143,7 +143,7 @@ config_foreach() {
|
|||||||
[ -z "$CONFIG_SECTIONS" ] && return 0
|
[ -z "$CONFIG_SECTIONS" ] && return 0
|
||||||
for section in ${CONFIG_SECTIONS}; do
|
for section in ${CONFIG_SECTIONS}; do
|
||||||
config_get cfgtype "$section" TYPE
|
config_get cfgtype "$section" TYPE
|
||||||
[ -n "$___type" -a "x$cfgtype" != "x$___type" ] && continue
|
[ -n "$___type" ] && [ "x$cfgtype" != "x$___type" ] && continue
|
||||||
eval "$___function \"\$section\" \"\$@\""
|
eval "$___function \"\$section\" \"\$@\""
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@ -162,7 +162,7 @@ config_list_foreach() {
|
|||||||
while [ $c -le "$len" ]; do
|
while [ $c -le "$len" ]; do
|
||||||
config_get val "${section}" "${option}_ITEM$c"
|
config_get val "${section}" "${option}_ITEM$c"
|
||||||
eval "$function \"\$val\" \"\$@\""
|
eval "$function \"\$val\" \"\$@\""
|
||||||
c="$(($c + 1))"
|
c="$((c + 1))"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -324,9 +324,9 @@ group_add_next() {
|
|||||||
echo $gid
|
echo $gid
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
gids=$(cat ${IPKG_INSTROOT}/etc/group | cut -d: -f3)
|
gids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/group)
|
||||||
gid=65536
|
gid=65536
|
||||||
while [ -n "$(echo "$gids" | grep "^$gid$")" ] ; do
|
while echo "$gids" | grep -q "^$gid$"; do
|
||||||
gid=$((gid + 1))
|
gid=$((gid + 1))
|
||||||
done
|
done
|
||||||
group_add $1 $gid
|
group_add $1 $gid
|
||||||
@ -336,8 +336,8 @@ group_add_next() {
|
|||||||
group_add_user() {
|
group_add_user() {
|
||||||
local grp delim=","
|
local grp delim=","
|
||||||
grp=$(grep -s "^${1}:" ${IPKG_INSTROOT}/etc/group)
|
grp=$(grep -s "^${1}:" ${IPKG_INSTROOT}/etc/group)
|
||||||
[ -z "$(echo $grp | cut -d: -f4 | grep $2)" ] || return
|
echo "$grp" | cut -d: -f4 | grep -q $2 && return
|
||||||
[ -n "$(echo $grp | grep ":$")" ] && delim=""
|
echo "$grp" | grep -q ":$" && delim=""
|
||||||
[ -n "$IPKG_INSTROOT" ] || lock /var/lock/passwd
|
[ -n "$IPKG_INSTROOT" ] || lock /var/lock/passwd
|
||||||
sed -i "s/$grp/$grp$delim$2/g" ${IPKG_INSTROOT}/etc/group
|
sed -i "s/$grp/$grp$delim$2/g" ${IPKG_INSTROOT}/etc/group
|
||||||
[ -n "$IPKG_INSTROOT" ] || lock -u /var/lock/passwd
|
[ -n "$IPKG_INSTROOT" ] || lock -u /var/lock/passwd
|
||||||
@ -352,9 +352,9 @@ user_add() {
|
|||||||
local shell="${6:-/bin/false}"
|
local shell="${6:-/bin/false}"
|
||||||
local rc
|
local rc
|
||||||
[ -z "$uid" ] && {
|
[ -z "$uid" ] && {
|
||||||
uids=$(cat ${IPKG_INSTROOT}/etc/passwd | cut -d: -f3)
|
uids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/passwd)
|
||||||
uid=65536
|
uid=65536
|
||||||
while [ -n "$(echo "$uids" | grep "^$uid$")" ] ; do
|
while echo "$uids" | grep -q "^$uid$"; do
|
||||||
uid=$((uid + 1))
|
uid=$((uid + 1))
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@ -374,4 +374,4 @@ board_name() {
|
|||||||
[ -e /tmp/sysinfo/board_name ] && cat /tmp/sysinfo/board_name || echo "generic"
|
[ -e /tmp/sysinfo/board_name ] && cat /tmp/sysinfo/board_name || echo "generic"
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -z "$IPKG_INSTROOT" -a -f /lib/config/uci.sh ] && . /lib/config/uci.sh
|
[ -z "$IPKG_INSTROOT" ] && [ -f /lib/config/uci.sh ] && . /lib/config/uci.sh
|
||||||
|
|||||||
@ -69,7 +69,7 @@ caldata_valid() {
|
|||||||
local expected="$1"
|
local expected="$1"
|
||||||
|
|
||||||
magic=$(hexdump -v -n 2 -e '1/1 "%02x"' /lib/firmware/$FIRMWARE)
|
magic=$(hexdump -v -n 2 -e '1/1 "%02x"' /lib/firmware/$FIRMWARE)
|
||||||
[[ "$magic" == "$expected" ]]
|
[ "$magic" = "$expected" ]
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -140,7 +140,7 @@ macaddr_add() {
|
|||||||
local oui=${mac%:*:*:*}
|
local oui=${mac%:*:*:*}
|
||||||
local nic=${mac#*:*:*:}
|
local nic=${mac#*:*:*:}
|
||||||
|
|
||||||
nic=$(printf "%06x" $((0x${nic//:/} + $val & 0xffffff)) | sed 's/^\(.\{2\}\)\(.\{2\}\)\(.\{2\}\)/\1:\2:\3/')
|
nic=$(printf "%06x" $((0x${nic//:/} + val & 0xffffff)) | sed 's/^\(.\{2\}\)\(.\{2\}\)\(.\{2\}\)/\1:\2:\3/')
|
||||||
echo $oui:$nic
|
echo $oui:$nic
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,8 @@ fs_wait_for_key () {
|
|||||||
lock $keypress_wait
|
lock $keypress_wait
|
||||||
{
|
{
|
||||||
while [ $timer -gt 0 ]; do
|
while [ $timer -gt 0 ]; do
|
||||||
|
pi_failsafe_net_message=true \
|
||||||
|
preinit_net_echo "Please press button now to enter failsafe"
|
||||||
echo "$timer" >$keypress_sec
|
echo "$timer" >$keypress_sec
|
||||||
timer=$(($timer - 1))
|
timer=$(($timer - 1))
|
||||||
sleep 1
|
sleep 1
|
||||||
@ -88,9 +90,6 @@ failsafe_wait() {
|
|||||||
}
|
}
|
||||||
grep -q 'failsafe=' /proc/cmdline && FAILSAFE=true && export FAILSAFE
|
grep -q 'failsafe=' /proc/cmdline && FAILSAFE=true && export FAILSAFE
|
||||||
if [ "$FAILSAFE" != "true" ]; then
|
if [ "$FAILSAFE" != "true" ]; then
|
||||||
pi_failsafe_net_message=true
|
|
||||||
preinit_net_echo "Please press button now to enter failsafe"
|
|
||||||
pi_failsafe_net_message=false
|
|
||||||
fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true
|
fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true
|
||||||
[ -f "/tmp/failsafe_button" ] && FAILSAFE=true && echo "- failsafe button "`cat /tmp/failsafe_button`" was pressed -"
|
[ -f "/tmp/failsafe_button" ] && FAILSAFE=true && echo "- failsafe button "`cat /tmp/failsafe_button`" was pressed -"
|
||||||
[ "$FAILSAFE" = "true" ] && export FAILSAFE && touch /tmp/failsafe
|
[ "$FAILSAFE" = "true" ] && export FAILSAFE && touch /tmp/failsafe
|
||||||
|
|||||||
@ -2,11 +2,6 @@
|
|||||||
# Copyright (C) 2006-2015 OpenWrt.org
|
# Copyright (C) 2006-2015 OpenWrt.org
|
||||||
# Copyright (C) 2010 Vertical Communications
|
# Copyright (C) 2010 Vertical Communications
|
||||||
|
|
||||||
failsafe_netlogin () {
|
|
||||||
dropbearkey -t rsa -s 1024 -f /tmp/dropbear_failsafe_host_key
|
|
||||||
dropbear -r /tmp/dropbear_failsafe_host_key <> /dev/null 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
failsafe_shell() {
|
failsafe_shell() {
|
||||||
local console="$(sed -e 's/ /\n/g' /proc/cmdline | grep '^console=' | head -1 | sed -e 's/^console=//' -e 's/,.*//')"
|
local console="$(sed -e 's/ /\n/g' /proc/cmdline | grep '^console=' | head -1 | sed -e 's/^console=//' -e 's/,.*//')"
|
||||||
[ -n "$console" ] || console=console
|
[ -n "$console" ] || console=console
|
||||||
@ -17,5 +12,4 @@ failsafe_shell() {
|
|||||||
done &
|
done &
|
||||||
}
|
}
|
||||||
|
|
||||||
boot_hook_add failsafe failsafe_netlogin
|
|
||||||
boot_hook_add failsafe failsafe_shell
|
boot_hook_add failsafe failsafe_shell
|
||||||
|
|||||||
@ -294,7 +294,7 @@ type platform_check_image >/dev/null 2>/dev/null || {
|
|||||||
case "$IMAGE" in
|
case "$IMAGE" in
|
||||||
http://*|\
|
http://*|\
|
||||||
https://*)
|
https://*)
|
||||||
wget -O/tmp/sysupgrade.img "$IMAGE"
|
wget -O/tmp/sysupgrade.img "$IMAGE" || exit 1
|
||||||
IMAGE=/tmp/sysupgrade.img
|
IMAGE=/tmp/sysupgrade.img
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -360,18 +360,15 @@ if [ -n "$FAILSAFE" ]; then
|
|||||||
printf '%s\x00%s\x00%s' "$RAM_ROOT" "$IMAGE" "$COMMAND" >/tmp/sysupgrade
|
printf '%s\x00%s\x00%s' "$RAM_ROOT" "$IMAGE" "$COMMAND" >/tmp/sysupgrade
|
||||||
lock -u /tmp/.failsafe
|
lock -u /tmp/.failsafe
|
||||||
else
|
else
|
||||||
force_attr=""
|
json_init
|
||||||
[ $FORCE -eq 1 ] && force_attr="\"force\": true,"
|
json_add_string prefix "$RAM_ROOT"
|
||||||
backup_attr=""
|
json_add_string path "$IMAGE"
|
||||||
[ $SAVE_CONFIG -eq 1 ] && backup_attr="\"backup\": $(json_string $CONF_TAR),"
|
[ $FORCE -eq 1 ] && json_add_boolean force 1
|
||||||
ubus call system sysupgrade "{
|
[ $SAVE_CONFIG -eq 1 ] && json_add_string backup "$CONF_TAR"
|
||||||
\"prefix\": $(json_string "$RAM_ROOT"),
|
json_add_string command "$COMMAND"
|
||||||
\"path\": $(json_string "$IMAGE"),
|
json_add_object options
|
||||||
$force_attr
|
json_add_int save_partitions "$SAVE_PARTITIONS"
|
||||||
$backup_attr
|
json_close_object
|
||||||
\"command\": $(json_string "$COMMAND"),
|
|
||||||
\"options\": {
|
ubus call system sysupgrade "$(json_dump)"
|
||||||
\"save_partitions\": $SAVE_PARTITIONS
|
|
||||||
}
|
|
||||||
}"
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -1,62 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2006-2011 OpenWrt.org
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
|
||||||
|
|
||||||
PKG_NAME:=apex
|
|
||||||
PKG_VERSION:=1.6.9
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
||||||
PKG_SOURCE_URL:=https://downloads.openwrt.org/sources/
|
|
||||||
PKG_HASH:=1d2bc04c2c6bb3d2d6c1916b6dc559cda2b1ecb045d7801fd49af6af4234abeb
|
|
||||||
PKG_TARGETS:=bin
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
export GCC_HONOUR_COPTS=s
|
|
||||||
|
|
||||||
define Package/apex
|
|
||||||
SECTION:=boot
|
|
||||||
CATEGORY:=Boot Loaders
|
|
||||||
DEPENDS:=@TARGET_ixp4xx
|
|
||||||
DEFAULT:=y
|
|
||||||
TITLE:=Boot loader for NSLU2, FSG3, NAS100D and others
|
|
||||||
endef
|
|
||||||
|
|
||||||
define build_apex
|
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
||||||
ARCH=arm \
|
|
||||||
$(1)_config
|
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
||||||
$(TARGET_CONFIGURE_OPTS) \
|
|
||||||
KBUILD_HAVE_NLS=no \
|
|
||||||
ARCH=arm \
|
|
||||||
clean all
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/apex.bin $(PKG_BUILD_DIR)/out/apex-$(2).bin
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
$(INSTALL_DIR) $(PKG_BUILD_DIR)/out
|
|
||||||
$(call build_apex,slugos-nslu2-armeb,nslu2-armeb)
|
|
||||||
$(call build_apex,slugos-nslu2-16mb-armeb,nslu2-16mb-armeb)
|
|
||||||
$(call build_apex,slugos-fsg3-armeb,fsg3-armeb)
|
|
||||||
$(call build_apex,slugos-nas100d-armeb,nas100d-armeb)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/apex/install
|
|
||||||
$(INSTALL_DIR) $(STAGING_DIR)/apex
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/out/*.bin $(1)/
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/InstallDev
|
|
||||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/out/*.bin $(STAGING_DIR_IMAGE)/
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,apex))
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -444,7 +444,7 @@ ifeq ($(config-targets),1)
|
|
||||||
include $(srctree)/src/arch-$(SRCARCH)/Makefile
|
|
||||||
export KBUILD_DEFCONFIG
|
|
||||||
|
|
||||||
-config %config: scripts_basic outputmakefile FORCE
|
|
||||||
+%config: scripts_basic outputmakefile FORCE
|
|
||||||
$(Q)mkdir -p include/linux include/config
|
|
||||||
$(Q)$(MAKE) $(build)=scripts/kconfig $@
|
|
||||||
|
|
||||||
@@ -1585,7 +1585,7 @@ endif
|
|
||||||
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
|
|
||||||
|
|
||||||
# Modules
|
|
||||||
-/ %/: prepare scripts FORCE
|
|
||||||
+%/: prepare scripts FORCE
|
|
||||||
$(cmd_crmodverdir)
|
|
||||||
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
|
||||||
$(build)=$(build-dir)
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
--- a/src/mach-ixp42x/slugos-nslu2-armeb_config
|
|
||||||
+++ b/src/mach-ixp42x/slugos-nslu2-armeb_config
|
|
||||||
@@ -19,7 +19,7 @@ CONFIG_EXPERIMENTAL=y
|
|
||||||
#
|
|
||||||
# General Setup
|
|
||||||
#
|
|
||||||
-CONFIG_TARGET_DESCRIPTION="SlugOS NSLU2 (bigendian)"
|
|
||||||
+CONFIG_TARGET_DESCRIPTION="OpenWrt NSLU2 (8MiB Flash)"
|
|
||||||
CONFIG_CROSS_COMPILE=""
|
|
||||||
CONFIG_AEABI=y
|
|
||||||
# CONFIG_DRIVER_LONG_LONG_SIZE is not set
|
|
||||||
@@ -163,9 +163,9 @@ CONFIG_ENV_REGION_KERNEL_ALT="fis://kern
|
|
||||||
# Overrides
|
|
||||||
#
|
|
||||||
CONFIG_ENV_DEFAULT_CMDLINE_OVERRIDE=y
|
|
||||||
-CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock4 rootfstype=jffs2 console=ttyS0,115200 init=/linuxrc"
|
|
||||||
+CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock4 rootfstype=squashfs,jffs2 console=ttyS0,115200 init=/etc/preinit noinitrd"
|
|
||||||
CONFIG_ENV_DEFAULT_CMDLINE_ALT_P=y
|
|
||||||
-CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/mtdblock4 rootfstype=jffs2 console=ttyS0,115200 init=/linuxrc"
|
|
||||||
+CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/mtdblock4 rootfstype=squashfs,jffs2 console=ttyS0,115200 init=/etc/preinit noinitrd"
|
|
||||||
# CONFIG_ENV_DEFAULT_STARTUP_OVERRIDE is not set
|
|
||||||
# CONFIG_ENV_DEFAULT_STARTUP_ALT_P is not set
|
|
||||||
CONFIG_USES_NOR_BOOTFLASH=y
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
--- a/src/mach-ixp42x/slugos-nslu2-16mb-armeb_config
|
|
||||||
+++ b/src/mach-ixp42x/slugos-nslu2-16mb-armeb_config
|
|
||||||
@@ -19,7 +19,7 @@ CONFIG_EXPERIMENTAL=y
|
|
||||||
#
|
|
||||||
# General Setup
|
|
||||||
#
|
|
||||||
-CONFIG_TARGET_DESCRIPTION="SlugOS NSLU2/BE (16MiB Flash)"
|
|
||||||
+CONFIG_TARGET_DESCRIPTION="OpenWrt NSLU2 (16MiB Flash)"
|
|
||||||
CONFIG_CROSS_COMPILE=""
|
|
||||||
CONFIG_AEABI=y
|
|
||||||
# CONFIG_DRIVER_LONG_LONG_SIZE is not set
|
|
||||||
@@ -163,9 +163,9 @@ CONFIG_ENV_REGION_KERNEL_ALT="fis://kern
|
|
||||||
# Overrides
|
|
||||||
#
|
|
||||||
CONFIG_ENV_DEFAULT_CMDLINE_OVERRIDE=y
|
|
||||||
-CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock4 rootfstype=jffs2 console=ttyS0,115200 init=/linuxrc"
|
|
||||||
+CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock4 rootfstype=squashfs,jffs2 console=ttyS0,115200 init=/etc/preinit noinitrd"
|
|
||||||
CONFIG_ENV_DEFAULT_CMDLINE_ALT_P=y
|
|
||||||
-CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/mtdblock4 rootfstype=jffs2 console=ttyS0,115200 init=/linuxrc"
|
|
||||||
+CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/mtdblock4 rootfstype=squashfs,jffs2 console=ttyS0,115200 init=/etc/preinit noinitrd"
|
|
||||||
# CONFIG_ENV_DEFAULT_STARTUP_OVERRIDE is not set
|
|
||||||
# CONFIG_ENV_DEFAULT_STARTUP_ALT_P is not set
|
|
||||||
CONFIG_USES_NOR_BOOTFLASH=y
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
--- a/src/mach-ixp42x/slugos-fsg3-armeb_config
|
|
||||||
+++ b/src/mach-ixp42x/slugos-fsg3-armeb_config
|
|
||||||
@@ -17,7 +17,7 @@ CONFIG_EXPERIMENTAL=y
|
|
||||||
#
|
|
||||||
# General Setup
|
|
||||||
#
|
|
||||||
-CONFIG_TARGET_DESCRIPTION="SlugOS FSG3/BE"
|
|
||||||
+CONFIG_TARGET_DESCRIPTION="OpenWrt FSG3"
|
|
||||||
CONFIG_CROSS_COMPILE=""
|
|
||||||
CONFIG_AEABI=y
|
|
||||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
|
||||||
@@ -148,9 +148,9 @@ CONFIG_ENV_REGION_KERNEL_ALT="fis://kern
|
|
||||||
# Overrides
|
|
||||||
#
|
|
||||||
CONFIG_ENV_DEFAULT_CMDLINE_OVERRIDE=y
|
|
||||||
-CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/sda1 rootdelay=10 console=ttyS0,115200"
|
|
||||||
+CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/sda1 rootdelay=10 console=ttyS0,115200 init=/etc/preinit noinitrd"
|
|
||||||
CONFIG_ENV_DEFAULT_CMDLINE_ALT_P=y
|
|
||||||
-CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/sda2 rootdelay=10 console=ttyS0,115200"
|
|
||||||
+CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/mtdblock2 rootfstype=squashfs console=ttyS0,115200 init=/etc/preinit noinitrd"
|
|
||||||
# CONFIG_ENV_DEFAULT_STARTUP_OVERRIDE is not set
|
|
||||||
# CONFIG_ENV_DEFAULT_STARTUP_ALT_P is not set
|
|
||||||
CONFIG_USES_NOR_BOOTFLASH=y
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
--- a/src/mach-ixp42x/slugos-nslu2-armeb_config
|
|
||||||
+++ b/src/mach-ixp42x/slugos-nslu2-armeb_config
|
|
||||||
@@ -137,7 +137,7 @@ CONFIG_AUTOBOOT_DELAY=10
|
|
||||||
CONFIG_ENV_STARTUP_KERNEL_COPY=y
|
|
||||||
# CONFIG_ENV_REGION_KERNEL_SWAP is not set
|
|
||||||
CONFIG_ENV_STARTUP_PREFIX_P=y
|
|
||||||
-CONFIG_ENV_STARTUP_PREFIX="sdram-init; memscan -u 0+256m"
|
|
||||||
+CONFIG_ENV_STARTUP_PREFIX="sdram-init; memscan -u 0+64m"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Regions
|
|
||||||
--- a/src/mach-ixp42x/slugos-nslu2-16mb-armeb_config
|
|
||||||
+++ b/src/mach-ixp42x/slugos-nslu2-16mb-armeb_config
|
|
||||||
@@ -137,7 +137,7 @@ CONFIG_AUTOBOOT_DELAY=10
|
|
||||||
CONFIG_ENV_STARTUP_KERNEL_COPY=y
|
|
||||||
# CONFIG_ENV_REGION_KERNEL_SWAP is not set
|
|
||||||
CONFIG_ENV_STARTUP_PREFIX_P=y
|
|
||||||
-CONFIG_ENV_STARTUP_PREFIX="sdram-init; memscan -u 0+256m"
|
|
||||||
+CONFIG_ENV_STARTUP_PREFIX="sdram-init; memscan -u 0+64m"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Regions
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
--- a/src/mach-ixp42x/slugos-nas100d-armeb_config
|
|
||||||
+++ b/src/mach-ixp42x/slugos-nas100d-armeb_config
|
|
||||||
@@ -19,7 +19,7 @@ CONFIG_EXPERIMENTAL=y
|
|
||||||
#
|
|
||||||
# General Setup
|
|
||||||
#
|
|
||||||
-CONFIG_TARGET_DESCRIPTION="SlugOS NAS100D/BE"
|
|
||||||
+CONFIG_TARGET_DESCRIPTION="OpenWrt NAS100D"
|
|
||||||
CONFIG_CROSS_COMPILE=""
|
|
||||||
CONFIG_AEABI=y
|
|
||||||
# CONFIG_DRIVER_LONG_LONG_SIZE is not set
|
|
||||||
@@ -158,7 +158,7 @@ CONFIG_ENV_REGION_KERNEL="fis://kernel"
|
|
||||||
# Overrides
|
|
||||||
#
|
|
||||||
CONFIG_ENV_DEFAULT_CMDLINE_OVERRIDE=y
|
|
||||||
-CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 console=ttyS0,115200 init=/linuxrc"
|
|
||||||
+CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/mtdblock2 rootfstype=squashfs,jffs2 console=ttyS0,115200 init=/etc/preinit noinitrd"
|
|
||||||
# CONFIG_ENV_DEFAULT_STARTUP_OVERRIDE is not set
|
|
||||||
CONFIG_USES_NOR_BOOTFLASH=y
|
|
||||||
CONFIG_RELOCATE_SIMPLE=y
|
|
||||||
@ -25,7 +25,6 @@ define Package/kexec-tools/Default
|
|||||||
SECTION:=utils
|
SECTION:=utils
|
||||||
CATEGORY:=Utilities
|
CATEGORY:=Utilities
|
||||||
URL:=http://kernel.org/pub/linux/kernel/people/horms/kexec-tools/
|
URL:=http://kernel.org/pub/linux/kernel/people/horms/kexec-tools/
|
||||||
MAINTAINER:=Florian Fainelli <florian@openwrt.org>
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/kexec-tools
|
define Package/kexec-tools
|
||||||
|
|||||||
@ -21,7 +21,7 @@ define Package/rbcfg
|
|||||||
CATEGORY:=Utilities
|
CATEGORY:=Utilities
|
||||||
SUBMENU:=Boot Loaders
|
SUBMENU:=Boot Loaders
|
||||||
TITLE:=RouterBOOT configuration tool
|
TITLE:=RouterBOOT configuration tool
|
||||||
DEPENDS:=@TARGET_ar71xx
|
DEPENDS:=@(TARGET_ar71xx||TARGET_ath79)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/rbcfg/description
|
define Package/rbcfg/description
|
||||||
|
|||||||
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
PKG_NAME:=uboot-envtools
|
PKG_NAME:=uboot-envtools
|
||||||
PKG_DISTNAME:=u-boot
|
PKG_DISTNAME:=u-boot
|
||||||
PKG_VERSION:=2019.07
|
PKG_VERSION:=2019.07
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz
|
||||||
|
|||||||
@ -85,6 +85,11 @@ dr342|\
|
|||||||
dr531)
|
dr531)
|
||||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
|
||||||
;;
|
;;
|
||||||
|
gl-ar150|\
|
||||||
|
gl-domino|\
|
||||||
|
gl-mifi)
|
||||||
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
|
||||||
|
;;
|
||||||
rambutan)
|
rambutan)
|
||||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
|
||||||
ubootenv_add_uci_config "/dev/mtd1" "0x100000" "0x20000" "0x20000"
|
ubootenv_add_uci_config "/dev/mtd1" "0x100000" "0x20000" "0x20000"
|
||||||
|
|||||||
@ -16,6 +16,7 @@ case "$board" in
|
|||||||
alfa-network,ap121f|\
|
alfa-network,ap121f|\
|
||||||
buffalo,bhr-4grv2|\
|
buffalo,bhr-4grv2|\
|
||||||
engenius,ecb1750|\
|
engenius,ecb1750|\
|
||||||
|
etactica,eg200|\
|
||||||
glinet,gl-ar300m-lite|\
|
glinet,gl-ar300m-lite|\
|
||||||
glinet,gl-ar300m-nand|\
|
glinet,gl-ar300m-nand|\
|
||||||
glinet,gl-ar300m-nor|\
|
glinet,gl-ar300m-nor|\
|
||||||
@ -25,6 +26,8 @@ glinet,gl-ar750s-nor-nand|\
|
|||||||
librerouter,librerouter-v1|\
|
librerouter,librerouter-v1|\
|
||||||
netgear,ex6400|\
|
netgear,ex6400|\
|
||||||
netgear,ex7300|\
|
netgear,ex7300|\
|
||||||
|
netgear,wndr4300-v2|\
|
||||||
|
netgear,wndr4500-v3|\
|
||||||
netgear,wnr1000-v2|\
|
netgear,wnr1000-v2|\
|
||||||
netgear,wnr2000-v3|\
|
netgear,wnr2000-v3|\
|
||||||
netgear,wnr2200-8m|\
|
netgear,wnr2200-8m|\
|
||||||
@ -41,6 +44,9 @@ yuncore,xd4200)
|
|||||||
buffalo,wzr-hp-ag300h)
|
buffalo,wzr-hp-ag300h)
|
||||||
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
|
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
|
||||||
;;
|
;;
|
||||||
|
glinet,gl-ar150)
|
||||||
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
|
||||||
|
;;
|
||||||
netgear,wndr3700)
|
netgear,wndr3700)
|
||||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x10000"
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x10000"
|
||||||
;;
|
;;
|
||||||
|
|||||||
@ -31,6 +31,6 @@ ubootenv_add_app_config() {
|
|||||||
config_get envsize "$1" envsize
|
config_get envsize "$1" envsize
|
||||||
config_get secsize "$1" secsize
|
config_get secsize "$1" secsize
|
||||||
config_get numsec "$1" numsec
|
config_get numsec "$1" numsec
|
||||||
echo "$dev $offset $envsize $secsize $numsec" >>/etc/fw_env.config
|
grep -q "^[[:space:]]*${dev}[[:space:]]*${offset}" /etc/fw_env.config || echo "$dev $offset $envsize $secsize $numsec" >>/etc/fw_env.config
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -84,6 +84,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
if (status != file_length) {
|
if (status != file_length) {
|
||||||
printf("Failed to load image\n");
|
printf("Failed to load image\n");
|
||||||
|
free(executable);
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,6 +112,7 @@ int main(int argc, char **argv)
|
|||||||
status = lseek(in_file, 0, SEEK_SET);
|
status = lseek(in_file, 0, SEEK_SET);
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
printf("failed to rewind\n");
|
printf("failed to rewind\n");
|
||||||
|
free(executable);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
len = write(in_file, &img_header, sizeof(img_header));
|
len = write(in_file, &img_header, sizeof(img_header));
|
||||||
@ -118,6 +120,7 @@ int main(int argc, char **argv)
|
|||||||
len = write(in_file, executable, file_length);
|
len = write(in_file, executable, file_length);
|
||||||
assert(len == file_length);
|
assert(len == file_length);
|
||||||
close(in_file);
|
close(in_file);
|
||||||
|
free(executable);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
|
|
||||||
PKG_NAME:=perf
|
PKG_NAME:=perf
|
||||||
PKG_VERSION:=$(LINUX_VERSION)
|
PKG_VERSION:=$(LINUX_VERSION)
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_USE_MIPS16:=0
|
PKG_USE_MIPS16:=0
|
||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
@ -26,7 +26,7 @@ include $(INCLUDE_DIR)/package.mk
|
|||||||
define Package/perf
|
define Package/perf
|
||||||
SECTION:=devel
|
SECTION:=devel
|
||||||
CATEGORY:=Development
|
CATEGORY:=Development
|
||||||
DEPENDS:= +libelf +libdw +(mips||mipsel||powerpc||i386||x86_64||arm||aarch64):libunwind +libpthread +librt +objdump @!IN_SDK @!TARGET_arc770 @KERNEL_PERF_EVENTS
|
DEPENDS:= +libelf +libdw +PACKAGE_libunwind:libunwind +libpthread +librt +objdump @!IN_SDK @!TARGET_arc770 @KERNEL_PERF_EVENTS
|
||||||
TITLE:=Linux performance monitoring tool
|
TITLE:=Linux performance monitoring tool
|
||||||
VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE)
|
VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE)
|
||||||
URL:=http://www.kernel.org
|
URL:=http://www.kernel.org
|
||||||
|
|||||||
@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
|
|||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=strace
|
PKG_NAME:=strace
|
||||||
PKG_VERSION:=5.3
|
PKG_VERSION:=5.4
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION)
|
PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION)
|
||||||
PKG_HASH:=6c131198749656401fe3efd6b4b16a07ea867e8f530867ceae8930bbc937a047
|
PKG_HASH:=f7d00514d51290b6db78ad7a9de709baf93caa5981498924cbc9a744cfd2a741
|
||||||
|
|
||||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||||
PKG_LICENSE:=LGPL-2.1-or-later
|
PKG_LICENSE:=LGPL-2.1-or-later
|
||||||
|
|||||||
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=trace-cmd
|
PKG_NAME:=trace-cmd
|
||||||
PKG_VERSION:=v2.6.1
|
PKG_VERSION:=v2.6.1
|
||||||
PKG_RELEASE=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git/snapshot/
|
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git/snapshot/
|
||||||
|
|||||||
24
package/devel/trace-cmd/patches/120-limits.patch
Normal file
24
package/devel/trace-cmd/patches/120-limits.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
From 293ff6d5bc9d3b8bfbc3c57d20d3d2d00986c168 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexander Couzens <lynxis@fe80.eu>
|
||||||
|
Date: Sun, 26 Nov 2017 05:22:51 +0100
|
||||||
|
Subject: [PATCH] trace-cmd listen: Include limits.h to define PATH_MAX
|
||||||
|
|
||||||
|
PATH_MAX is defined by limits.h. On some system it's also
|
||||||
|
defined by dirent.h but not on musl.
|
||||||
|
|
||||||
|
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
|
||||||
|
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
||||||
|
---
|
||||||
|
trace-listen.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
--- a/trace-listen.c
|
||||||
|
+++ b/trace-listen.c
|
||||||
|
@@ -23,6 +23,7 @@
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <getopt.h>
|
||||||
|
+#include <limits.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=valgrind
|
PKG_NAME:=valgrind
|
||||||
PKG_VERSION:=3.15.0
|
PKG_VERSION:=3.15.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:=http://sourceware.org/pub/valgrind/
|
PKG_SOURCE_URL:=http://sourceware.org/pub/valgrind/
|
||||||
@ -25,6 +25,8 @@ PKG_BUILD_PARALLEL := 1
|
|||||||
PKG_USE_MIPS16:=0
|
PKG_USE_MIPS16:=0
|
||||||
PKG_SSP:=0
|
PKG_SSP:=0
|
||||||
|
|
||||||
|
STRIP:=:
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
@ -96,6 +98,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
CONFIGURE_ARGS += \
|
CONFIGURE_ARGS += \
|
||||||
|
--enable-lto \
|
||||||
--enable-tls \
|
--enable-tls \
|
||||||
--without-x \
|
--without-x \
|
||||||
--without-mpicc \
|
--without-mpicc \
|
||||||
@ -125,6 +128,10 @@ ifneq ($(ARCH),aarch64)
|
|||||||
$(PKG_INSTALL_DIR)/usr/lib/valgrind/$(CPU)-*.xml \
|
$(PKG_INSTALL_DIR)/usr/lib/valgrind/$(CPU)-*.xml \
|
||||||
$(1)/usr/lib/valgrind/
|
$(1)/usr/lib/valgrind/
|
||||||
endif
|
endif
|
||||||
|
$(patsubst STRIP=%,STRIP="$(TARGET_CROSS)strip",$(RSTRIP)) $(PKG_INSTALL_DIR)/usr/bin
|
||||||
|
$(patsubst STRIP=%,STRIP="$(TARGET_CROSS)strip -g",$(RSTRIP)) \
|
||||||
|
$(PKG_INSTALL_DIR)/usr/lib/valgrind/none-* \
|
||||||
|
$(PKG_INSTALL_DIR)/usr/lib/valgrind/memcheck-*
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/valgrind-cachegrind/install
|
define Package/valgrind-cachegrind/install
|
||||||
@ -134,6 +141,8 @@ define Package/valgrind-cachegrind/install
|
|||||||
$(CP) \
|
$(CP) \
|
||||||
$(PKG_INSTALL_DIR)/usr/lib/valgrind/cachegrind-* \
|
$(PKG_INSTALL_DIR)/usr/lib/valgrind/cachegrind-* \
|
||||||
$(1)/usr/lib/valgrind/
|
$(1)/usr/lib/valgrind/
|
||||||
|
$(patsubst STRIP=%,STRIP="$(TARGET_CROSS)strip",$(RSTRIP)) $(PKG_INSTALL_DIR)/usr/bin
|
||||||
|
$(patsubst STRIP=%,STRIP="$(TARGET_CROSS)strip -g",$(RSTRIP)) $(PKG_INSTALL_DIR)/usr/lib/valgrind/cachegrind-*
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/valgrind-callgrind/install
|
define Package/valgrind-callgrind/install
|
||||||
@ -143,6 +152,8 @@ define Package/valgrind-callgrind/install
|
|||||||
$(CP) \
|
$(CP) \
|
||||||
$(PKG_INSTALL_DIR)/usr/lib/valgrind/callgrind-* \
|
$(PKG_INSTALL_DIR)/usr/lib/valgrind/callgrind-* \
|
||||||
$(1)/usr/lib/valgrind/
|
$(1)/usr/lib/valgrind/
|
||||||
|
$(patsubst STRIP=%,STRIP="$(TARGET_CROSS)strip",$(RSTRIP)) $(PKG_INSTALL_DIR)/usr/bin
|
||||||
|
$(patsubst STRIP=%,STRIP="$(TARGET_CROSS)strip -g",$(RSTRIP)) $(PKG_INSTALL_DIR)/usr/lib/valgrind/callgrind-*
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/valgrind-drd/install
|
define Package/valgrind-drd/install
|
||||||
@ -151,6 +162,8 @@ define Package/valgrind-drd/install
|
|||||||
$(PKG_INSTALL_DIR)/usr/lib/valgrind/drd-* \
|
$(PKG_INSTALL_DIR)/usr/lib/valgrind/drd-* \
|
||||||
$(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_drd*.so \
|
$(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_drd*.so \
|
||||||
$(1)/usr/lib/valgrind/
|
$(1)/usr/lib/valgrind/
|
||||||
|
$(patsubst STRIP=%,STRIP="$(TARGET_CROSS)strip",$(RSTRIP)) $(PKG_INSTALL_DIR)/usr/bin
|
||||||
|
$(patsubst STRIP=%,STRIP="$(TARGET_CROSS)strip -g",$(RSTRIP)) $(PKG_INSTALL_DIR)/usr/lib/valgrind/drd-*
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/valgrind-massif/install
|
define Package/valgrind-massif/install
|
||||||
@ -161,6 +174,8 @@ define Package/valgrind-massif/install
|
|||||||
$(PKG_INSTALL_DIR)/usr/lib/valgrind/massif-* \
|
$(PKG_INSTALL_DIR)/usr/lib/valgrind/massif-* \
|
||||||
$(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_massif*.so \
|
$(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_massif*.so \
|
||||||
$(1)/usr/lib/valgrind/
|
$(1)/usr/lib/valgrind/
|
||||||
|
$(patsubst STRIP=%,STRIP="$(TARGET_CROSS)strip",$(RSTRIP)) $(PKG_INSTALL_DIR)/usr/bin
|
||||||
|
$(patsubst STRIP=%,STRIP="$(TARGET_CROSS)strip -g",$(RSTRIP)) $(PKG_INSTALL_DIR)/usr/lib/valgrind/massif-*
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/valgrind-helgrind/install
|
define Package/valgrind-helgrind/install
|
||||||
@ -169,11 +184,14 @@ define Package/valgrind-helgrind/install
|
|||||||
$(PKG_INSTALL_DIR)/usr/lib/valgrind/helgrind-* \
|
$(PKG_INSTALL_DIR)/usr/lib/valgrind/helgrind-* \
|
||||||
$(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_helgrind*.so \
|
$(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_helgrind*.so \
|
||||||
$(1)/usr/lib/valgrind/
|
$(1)/usr/lib/valgrind/
|
||||||
|
$(patsubst STRIP=%,STRIP="$(TARGET_CROSS)strip",$(RSTRIP)) $(PKG_INSTALL_DIR)/usr/bin
|
||||||
|
$(patsubst STRIP=%,STRIP="$(TARGET_CROSS)strip -g",$(RSTRIP)) $(PKG_INSTALL_DIR)/usr/lib/valgrind/helgrind-*
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/valgrind-vgdb/install
|
define Package/valgrind-vgdb/install
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vgdb $(1)/usr/bin/
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vgdb $(1)/usr/bin/
|
||||||
|
$(patsubst STRIP=%,STRIP="$(TARGET_CROSS)strip",$(RSTRIP)) $(PKG_INSTALL_DIR)/usr/bin
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,valgrind))
|
$(eval $(call BuildPackage,valgrind))
|
||||||
|
|||||||
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
PKG_NAME:=ath10k-firmware
|
PKG_NAME:=ath10k-firmware
|
||||||
PKG_SOURCE_DATE:=2019-10-03
|
PKG_SOURCE_DATE:=2019-10-03
|
||||||
PKG_SOURCE_VERSION:=d622d160e9f552ead68d9ae81b715422892dc2ef
|
PKG_SOURCE_VERSION:=d622d160e9f552ead68d9ae81b715422892dc2ef
|
||||||
PKG_MIRROR_HASH:=9d56a9942b7be7effdeed6d0688a9bdcfae76a2921a630714c3e2d8390ea8934
|
PKG_MIRROR_HASH:=2e504e071c3f896d629c4cfffe7ff4b5f1acdb4fecd3f01e8ff8c73e87a67cc7
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
@ -64,14 +64,14 @@ define Download/ct-firmware-htt
|
|||||||
URL_FILE:=$($(1)_FIRMWARE_FILE_CT_HTT)
|
URL_FILE:=$($(1)_FIRMWARE_FILE_CT_HTT)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-22.bin.lede.013
|
QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-22.bin.lede.014
|
||||||
define Download/ath10k-firmware-qca988x-ct
|
define Download/ath10k-firmware-qca988x-ct
|
||||||
$(call Download/ct-firmware,QCA988X,)
|
$(call Download/ct-firmware,QCA988X,)
|
||||||
HASH:=19db86003509dedb8ace339c183813ca637d65af24d00666411d1590efe33e13
|
HASH:=19db86003509dedb8ace339c183813ca637d65af24d00666411d1590efe33e13
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,ath10k-firmware-qca988x-ct))
|
$(eval $(call Download,ath10k-firmware-qca988x-ct))
|
||||||
|
|
||||||
QCA988X_FIRMWARE_FILE_CT_HTT:=firmware-2-ct-full-htt-mgt-community-22.bin.lede.013
|
QCA988X_FIRMWARE_FILE_CT_HTT:=firmware-2-ct-full-htt-mgt-community-22.bin.lede.014
|
||||||
define Download/ath10k-firmware-qca988x-ct-htt
|
define Download/ath10k-firmware-qca988x-ct-htt
|
||||||
$(call Download/ct-firmware-htt,QCA988X,)
|
$(call Download/ct-firmware-htt,QCA988X,)
|
||||||
HASH:=454e67dab545e720369a07be2fee16de008c76db4ab3119e7760bf9f7504c066
|
HASH:=454e67dab545e720369a07be2fee16de008c76db4ab3119e7760bf9f7504c066
|
||||||
@ -79,14 +79,14 @@ endef
|
|||||||
$(eval $(call Download,ath10k-firmware-qca988x-ct-htt))
|
$(eval $(call Download,ath10k-firmware-qca988x-ct-htt))
|
||||||
|
|
||||||
|
|
||||||
QCA9887_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-22.bin.lede.013
|
QCA9887_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-22.bin.lede.014
|
||||||
define Download/ath10k-firmware-qca9887-ct
|
define Download/ath10k-firmware-qca9887-ct
|
||||||
$(call Download/ct-firmware,QCA9887,ath10k-9887)
|
$(call Download/ct-firmware,QCA9887,ath10k-9887)
|
||||||
HASH:=b3c738328427e124701a5735d65cde0f60e4172ae5bc23b00e5b16df7995dbd4
|
HASH:=b3c738328427e124701a5735d65cde0f60e4172ae5bc23b00e5b16df7995dbd4
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,ath10k-firmware-qca9887-ct))
|
$(eval $(call Download,ath10k-firmware-qca9887-ct))
|
||||||
|
|
||||||
QCA9887_FIRMWARE_FILE_CT_HTT:=firmware-2-ct-full-htt-mgt-community-22.bin.lede.013
|
QCA9887_FIRMWARE_FILE_CT_HTT:=firmware-2-ct-full-htt-mgt-community-22.bin.lede.014
|
||||||
define Download/ath10k-firmware-qca9887-ct-htt
|
define Download/ath10k-firmware-qca9887-ct-htt
|
||||||
$(call Download/ct-firmware-htt,QCA9887,ath10k-9887)
|
$(call Download/ct-firmware-htt,QCA9887,ath10k-9887)
|
||||||
HASH:=4432ccee23133bbaa4a5552e50a1e7e889b257362603e05530e751b67c29b7b5
|
HASH:=4432ccee23133bbaa4a5552e50a1e7e889b257362603e05530e751b67c29b7b5
|
||||||
@ -94,62 +94,62 @@ endef
|
|||||||
$(eval $(call Download,ath10k-firmware-qca9887-ct-htt))
|
$(eval $(call Download,ath10k-firmware-qca9887-ct-htt))
|
||||||
|
|
||||||
|
|
||||||
QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.013
|
QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.014
|
||||||
define Download/ath10k-firmware-qca99x0-ct
|
define Download/ath10k-firmware-qca99x0-ct
|
||||||
$(call Download/ct-firmware,QCA99X0,ath10k-10-4b)
|
$(call Download/ct-firmware,QCA99X0,ath10k-10-4b)
|
||||||
HASH:=6fa74a3fc87cba97dbc4a7213b760f8d997cd9c5f11900d47d387b23764cf20a
|
HASH:=9a908f743604a468b651a5f73c49e6b0ba11a05c677b9726fbf041b849d88b25
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,ath10k-firmware-qca99x0-ct))
|
$(eval $(call Download,ath10k-firmware-qca99x0-ct))
|
||||||
|
|
||||||
QCA99X0_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.013
|
QCA99X0_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.014
|
||||||
define Download/ath10k-firmware-qca99x0-ct-htt
|
define Download/ath10k-firmware-qca99x0-ct-htt
|
||||||
$(call Download/ct-firmware-htt,QCA99X0,ath10k-10-4b)
|
$(call Download/ct-firmware-htt,QCA99X0,ath10k-10-4b)
|
||||||
HASH:=68e92820c51270eba4f68b24654c4a9408902b2600762b70204f4cb5419bb714
|
HASH:=800dd0816702aaca75f3eb5436c2ea724a6c24833838cd54399b9286b4d4fbe8
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,ath10k-firmware-qca99x0-ct-htt))
|
$(eval $(call Download,ath10k-firmware-qca99x0-ct-htt))
|
||||||
|
|
||||||
|
|
||||||
QCA9984_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.013
|
QCA9984_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.014
|
||||||
define Download/ath10k-firmware-qca9984-ct
|
define Download/ath10k-firmware-qca9984-ct
|
||||||
$(call Download/ct-firmware,QCA9984,ath10k-9984-10-4b)
|
$(call Download/ct-firmware,QCA9984,ath10k-9984-10-4b)
|
||||||
HASH:=08aeb883bd2d9258e8f1907cca8a0d2eda1c559a66e228dadffd6798f6877c7d
|
HASH:=a8b12dba478e8c9d4a215f82324382c7554a900e83c31775f8511af84e59fef7
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,ath10k-firmware-qca9984-ct))
|
$(eval $(call Download,ath10k-firmware-qca9984-ct))
|
||||||
|
|
||||||
QCA9984_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.013
|
QCA9984_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.014
|
||||||
define Download/ath10k-firmware-qca9984-ct-htt
|
define Download/ath10k-firmware-qca9984-ct-htt
|
||||||
$(call Download/ct-firmware-htt,QCA9984,ath10k-9984-10-4b)
|
$(call Download/ct-firmware-htt,QCA9984,ath10k-9984-10-4b)
|
||||||
HASH:=38ed59a2b3c66c10926706a21ae2d3aeaf83e589f19345a8f48d6520522e4fde
|
HASH:=d185651b5d3d1f0082720bc6c2bbe43b2a00cdb6333403fac9336a720b1d93ae
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,ath10k-firmware-qca9984-ct-htt))
|
$(eval $(call Download,ath10k-firmware-qca9984-ct-htt))
|
||||||
|
|
||||||
|
|
||||||
QCA4019_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.013
|
QCA4019_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.014
|
||||||
define Download/ath10k-firmware-qca4019-ct
|
define Download/ath10k-firmware-qca4019-ct
|
||||||
$(call Download/ct-firmware,QCA4019,ath10k-4019-10-4b)
|
$(call Download/ct-firmware,QCA4019,ath10k-4019-10-4b)
|
||||||
HASH:=feca75fe89af9a3e998047f85ff3428676f4d574b770d51773bb419d0dd98e5a
|
HASH:=4c2e48835219f420b18dc58e31d1387dae0da70d8170c3fc5e7bce39c06cf355
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,ath10k-firmware-qca4019-ct))
|
$(eval $(call Download,ath10k-firmware-qca4019-ct))
|
||||||
|
|
||||||
QCA4019_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.013
|
QCA4019_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.014
|
||||||
define Download/ath10k-firmware-qca4019-ct-htt
|
define Download/ath10k-firmware-qca4019-ct-htt
|
||||||
$(call Download/ct-firmware-htt,QCA4019,ath10k-4019-10-4b)
|
$(call Download/ct-firmware-htt,QCA4019,ath10k-4019-10-4b)
|
||||||
HASH:=6a4977689343f43edd934823512f031fd1a026e872004343b9952077f9607cb0
|
HASH:=743da4d537d094a7839bd8e1f792e4cb8b517101f66777c84fd84585f0b85e64
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,ath10k-firmware-qca4019-ct-htt))
|
$(eval $(call Download,ath10k-firmware-qca4019-ct-htt))
|
||||||
|
|
||||||
|
|
||||||
QCA9888_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.013
|
QCA9888_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.014
|
||||||
define Download/ath10k-firmware-qca9888-ct
|
define Download/ath10k-firmware-qca9888-ct
|
||||||
$(call Download/ct-firmware,QCA9888,ath10k-9888-10-4b)
|
$(call Download/ct-firmware,QCA9888,ath10k-9888-10-4b)
|
||||||
HASH:=d6a59c17bfbec1abc8498762d9f00b2449cab352feb8bef8b621771168376dbf
|
HASH:=5809c8a6b3bd81cbc829b5e90af3c0a3300488fe194524a90e260448158016b6
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,ath10k-firmware-qca9888-ct))
|
$(eval $(call Download,ath10k-firmware-qca9888-ct))
|
||||||
|
|
||||||
QCA9888_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.013
|
QCA9888_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.014
|
||||||
define Download/ath10k-firmware-qca9888-ct-htt
|
define Download/ath10k-firmware-qca9888-ct-htt
|
||||||
$(call Download/ct-firmware-htt,QCA9888,ath10k-9888-10-4b)
|
$(call Download/ct-firmware-htt,QCA9888,ath10k-9888-10-4b)
|
||||||
HASH:=fe242c0d56494975d7a1aeb6969d90cc21cb133fba99040d4da7a25fdb90d92c
|
HASH:=a284943c203ff66ec2e865f20ae2d2aa049b450801d7205b53c9163862228f15
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,ath10k-firmware-qca9888-ct-htt))
|
$(eval $(call Download,ath10k-firmware-qca9888-ct-htt))
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ $(Package/ath10k-firmware-default)
|
|||||||
SECTION:=firmware
|
SECTION:=firmware
|
||||||
CATEGORY:=Firmware
|
CATEGORY:=Firmware
|
||||||
PROVIDES:=ath10k-firmware-qca988x
|
PROVIDES:=ath10k-firmware-qca988x
|
||||||
DEPENDS:=+kmod-ath10k-ct
|
DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/ath10k-firmware-qca9887-ct
|
define Package/ath10k-firmware-qca9887-ct
|
||||||
@ -190,7 +190,7 @@ $(Package/ath10k-firmware-default)
|
|||||||
SECTION:=firmware
|
SECTION:=firmware
|
||||||
CATEGORY:=Firmware
|
CATEGORY:=Firmware
|
||||||
PROVIDES:=ath10k-firmware-qca9887
|
PROVIDES:=ath10k-firmware-qca9887
|
||||||
DEPENDS:=+kmod-ath10k-ct
|
DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/ath10k-firmware-qca988x-ct/description
|
define Package/ath10k-firmware-qca988x-ct/description
|
||||||
@ -308,7 +308,7 @@ $(Package/ath10k-firmware-default)
|
|||||||
SECTION:=firmware
|
SECTION:=firmware
|
||||||
CATEGORY:=Firmware
|
CATEGORY:=Firmware
|
||||||
PROVIDES:=ath10k-firmware-qca99x0
|
PROVIDES:=ath10k-firmware-qca99x0
|
||||||
DEPENDS:=+kmod-ath10k-ct
|
DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/ath10k-firmware-qca9984-ct
|
define Package/ath10k-firmware-qca9984-ct
|
||||||
@ -324,7 +324,7 @@ $(Package/ath10k-firmware-default)
|
|||||||
SECTION:=firmware
|
SECTION:=firmware
|
||||||
CATEGORY:=Firmware
|
CATEGORY:=Firmware
|
||||||
PROVIDES:=ath10k-firmware-qca9984
|
PROVIDES:=ath10k-firmware-qca9984
|
||||||
DEPENDS:=+kmod-ath10k-ct
|
DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/ath10k-firmware-qca4019-ct
|
define Package/ath10k-firmware-qca4019-ct
|
||||||
@ -340,7 +340,7 @@ $(Package/ath10k-firmware-default)
|
|||||||
SECTION:=firmware
|
SECTION:=firmware
|
||||||
CATEGORY:=Firmware
|
CATEGORY:=Firmware
|
||||||
PROVIDES:=ath10k-firmware-qca4019
|
PROVIDES:=ath10k-firmware-qca4019
|
||||||
DEPENDS:=+kmod-ath10k-ct
|
DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/ath10k-firmware-qca9888-ct
|
define Package/ath10k-firmware-qca9888-ct
|
||||||
@ -356,7 +356,7 @@ $(Package/ath10k-firmware-default)
|
|||||||
SECTION:=firmware
|
SECTION:=firmware
|
||||||
CATEGORY:=Firmware
|
CATEGORY:=Firmware
|
||||||
PROVIDES:=ath10k-firmware-qca9888
|
PROVIDES:=ath10k-firmware-qca9888
|
||||||
DEPENDS:=+kmod-ath10k-ct
|
DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,53 +0,0 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=brcmfmac-board-rpi
|
|
||||||
PKG_VERSION:=2018-03-12
|
|
||||||
PKG_RELEASE:=86e88fbf0345da49555d0ec34c80b4fbae7d0cd3
|
|
||||||
PKG_FLAGS:=nonshared
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
BRCMFMAC434XX_SDIO_URL:=@GITHUB/RPi-Distro/firmware-nonfree/$(PKG_RELEASE)/brcm/
|
|
||||||
BRCMFMAC43455_SDIO_FILE:=brcmfmac43455-sdio-$(PKG_RELEASE)
|
|
||||||
|
|
||||||
define Download/brcmfmac43455_sdio_clm_blob
|
|
||||||
FILE:=$(BRCMFMAC43455_SDIO_FILE).clm_blob
|
|
||||||
URL:=$(BRCMFMAC434XX_SDIO_URL)
|
|
||||||
URL_FILE:=brcmfmac43455-sdio.clm_blob
|
|
||||||
HASH:=8e2250518bc789e53109728c3c0a6124bc3801a75a1cb4966125753cf1f0252e
|
|
||||||
endef
|
|
||||||
$(eval $(call Download,brcmfmac43455_sdio_clm_blob))
|
|
||||||
|
|
||||||
define Package/brcmfmac-board-rpi/Default
|
|
||||||
SECTION:=firmware
|
|
||||||
CATEGORY:=Firmware
|
|
||||||
URL:=https://github.com/RPi-Distro/firmware-nonfree/
|
|
||||||
DEPENDS:=@TARGET_brcm2708
|
|
||||||
PKGARCH:=all
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/brcmfmac-firmware-43455-clm_blob
|
|
||||||
$(call Package/brcmfmac-board-rpi/Default)
|
|
||||||
TITLE:=BCM43455 RPi SDIO Localisation Blob
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/brcmfmac-firmware-43455-clm_blob/description
|
|
||||||
Localisation blob for the Broadcom BCM43455 on RPi boards.
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Prepare
|
|
||||||
rm -rf $(PKG_BUILD_DIR)
|
|
||||||
mkdir -p $(PKG_BUILD_DIR)
|
|
||||||
cp $(DL_DIR)/$(BRCMFMAC43455_SDIO_FILE).clm_blob $(PKG_BUILD_DIR)/brcmfmac43455-sdio.clm_blob
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
true
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/brcmfmac-firmware-43455-clm_blob/install
|
|
||||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm/
|
|
||||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/brcmfmac43455-sdio.clm_blob $(1)/lib/firmware/brcm/
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,brcmfmac-firmware-43455-clm_blob))
|
|
||||||
239
package/firmware/cypress-firmware/Makefile
Normal file
239
package/firmware/cypress-firmware/Makefile
Normal file
@ -0,0 +1,239 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2019 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
UNPACK_CMD=unzip -q -p $(DL_DIR)/$(PKG_SOURCE) $(PKG_SOURCE_UNZIP) | gzip -dc | $(HOST_TAR) -C $(1) $(TAR_OPTIONS)
|
||||||
|
|
||||||
|
PKG_NAME:=cypress-firmware
|
||||||
|
PKG_VERSION:=v4.14.77-2019_1031
|
||||||
|
|
||||||
|
PKG_SOURCE_UNZIP:=cypress-firmware-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE:=cypress-fmac-$(PKG_VERSION).zip
|
||||||
|
PKG_SOURCE_URL:=https://community.cypress.com/servlet/JiveServlet/download/17441-2-50210/
|
||||||
|
PKG_HASH:=bc2eec0d144a88e3105a06cac8039a7f13becde67dfe2a86793ba66f6a2510e0
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/cypress-firmware-default
|
||||||
|
SECTION:=firmware
|
||||||
|
CATEGORY:=Firmware
|
||||||
|
URL:=https://community.cypress.com/community/linux
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
true
|
||||||
|
endef
|
||||||
|
|
||||||
|
# Cypress 43340 SDIO Firmware
|
||||||
|
define Package/cypress-firmware-43340-sdio
|
||||||
|
$(Package/cypress-firmware-default)
|
||||||
|
TITLE:=CYW43340 FullMac SDIO firmware
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cypress-firmware-43340-sdio/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac43340-sdio.bin \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac43340-sdio.bin
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cypress-firmware-43340-sdio))
|
||||||
|
|
||||||
|
# Cypress 43362 SDIO Firmware
|
||||||
|
define Package/cypress-firmware-43362-sdio
|
||||||
|
$(Package/cypress-firmware-default)
|
||||||
|
TITLE:=CYW43362 FullMac SDIO firmware
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cypress-firmware-43362-sdio/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac43362-sdio.bin \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac43362-sdio.bin
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cypress-firmware-43362-sdio))
|
||||||
|
|
||||||
|
# Cypress 4339 SDIO Firmware
|
||||||
|
define Package/cypress-firmware-4339-sdio
|
||||||
|
$(Package/cypress-firmware-default)
|
||||||
|
TITLE:=CYW4339 FullMac SDIO firmware
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cypress-firmware-4339-sdio/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac4339-sdio.bin \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac4339-sdio.bin
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cypress-firmware-4339-sdio))
|
||||||
|
|
||||||
|
# Cypress 43430 SDIO Firmware
|
||||||
|
define Package/cypress-firmware-43430-sdio
|
||||||
|
$(Package/cypress-firmware-default)
|
||||||
|
TITLE:=CYW43430 FullMac SDIO firmware
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cypress-firmware-43430-sdio/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac43430-sdio.bin \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac43430-sdio.bin
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac43430-sdio.clm_blob \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac43430-sdio.clm_blob
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cypress-firmware-43430-sdio))
|
||||||
|
|
||||||
|
# Cypress 43455 SDIO Firmware
|
||||||
|
define Package/cypress-firmware-43455-sdio
|
||||||
|
$(Package/cypress-firmware-default)
|
||||||
|
TITLE:=CYW43455 FullMac SDIO firmware
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cypress-firmware-43455-sdio/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac43455-sdio.bin \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac43455-sdio.bin
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac43455-sdio.clm_blob \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cypress-firmware-43455-sdio))
|
||||||
|
|
||||||
|
# Cypress 4354 SDIO Firmware
|
||||||
|
define Package/cypress-firmware-4354-sdio
|
||||||
|
$(Package/cypress-firmware-default)
|
||||||
|
TITLE:=CYW4354 FullMac SDIO firmware
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cypress-firmware-4354-sdio/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac4354-sdio.bin \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac4354-sdio.bin
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac4354-sdio.clm_blob \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac4354-sdio.clm_blob
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cypress-firmware-4354-sdio))
|
||||||
|
|
||||||
|
# Cypress 4356 PCIe Firmware
|
||||||
|
define Package/cypress-firmware-4356-pcie
|
||||||
|
$(Package/cypress-firmware-default)
|
||||||
|
TITLE:=CYW4356 FullMac PCIe firmware
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cypress-firmware-4356-pcie/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac4356-pcie.bin \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac4356-pcie.bin
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac4356-pcie.clm_blob \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac4356-pcie.clm_blob
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cypress-firmware-4356-pcie))
|
||||||
|
|
||||||
|
# Cypress 4356 SDIO Firmware
|
||||||
|
define Package/cypress-firmware-4356-sdio
|
||||||
|
$(Package/cypress-firmware-default)
|
||||||
|
TITLE:=CYW4356 FullMac SDIO firmware
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cypress-firmware-4356-sdio/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac4356-sdio.bin \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac4356-sdio.bin
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac4356-sdio.clm_blob \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac4356-sdio.clm_blob
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cypress-firmware-4356-sdio))
|
||||||
|
|
||||||
|
# Cypress 4359 PCIe Firmware
|
||||||
|
define Package/cypress-firmware-4359-pcie
|
||||||
|
$(Package/cypress-firmware-default)
|
||||||
|
TITLE:=CYW4359 FullMac PCIe firmware
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cypress-firmware-4359-pcie/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac4359-pcie.bin \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac4359-pcie.bin
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac4359-pcie.clm_blob \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac4359-pcie.clm_blob
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cypress-firmware-4359-pcie))
|
||||||
|
|
||||||
|
# Cypress 4359 SDIO Firmware
|
||||||
|
define Package/cypress-firmware-4359-sdio
|
||||||
|
$(Package/cypress-firmware-default)
|
||||||
|
TITLE:=CYW4359 FullMac SDIO firmware
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cypress-firmware-4359-sdio/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac4359-sdio.bin \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac4359-sdio.bin
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac4359-sdio.clm_blob \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac4359-sdio.clm_blob
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cypress-firmware-4359-sdio))
|
||||||
|
|
||||||
|
# Cypress 4373 SDIO Firmware
|
||||||
|
define Package/cypress-firmware-4373-sdio
|
||||||
|
$(Package/cypress-firmware-default)
|
||||||
|
TITLE:=CYW4373 FullMac SDIO firmware
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cypress-firmware-4373-sdio/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac4373-sdio.bin \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac4373-sdio.bin
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac4373-sdio.clm_blob \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac4373-sdio.clm_blob
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cypress-firmware-4373-sdio))
|
||||||
|
|
||||||
|
# Cypress 4373 USB Firmware
|
||||||
|
define Package/cypress-firmware-4373-usb
|
||||||
|
$(Package/cypress-firmware-default)
|
||||||
|
TITLE:=CYW4373 FullMac USB firmware
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cypress-firmware-4373-usb/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac4373-usb.bin \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac4373-usb.bin
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/firmware/brcmfmac4373.clm_blob \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac4373.clm_blob
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cypress-firmware-4373-usb))
|
||||||
95
package/firmware/cypress-nvram/Makefile
Normal file
95
package/firmware/cypress-nvram/Makefile
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2019 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=cypress-nvram
|
||||||
|
PKG_SOURCE_DATE:=2019-09-03
|
||||||
|
PKG_SOURCE_VERSION:=e7b78df22f2a0c5f56abb7b5880661611de35e5f
|
||||||
|
PKG_MIRROR_HASH:=1cb20a749696852be0a512d51961365dd9c031362af0af1a2b9f5a3fb894885f
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_URL:=https://github.com/openwrt/cypress-nvram.git
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/cypress-nvram-default
|
||||||
|
SECTION:=firmware
|
||||||
|
CATEGORY:=Firmware
|
||||||
|
URL:=https://community.cypress.com/community/linux
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
true
|
||||||
|
endef
|
||||||
|
|
||||||
|
# Cypress 43430 SDIO Raspberry Pi 3B NVRAM
|
||||||
|
define Package/cypress-nvram-43430-sdio-rpi-3b
|
||||||
|
$(Package/cypress-nvram-default)
|
||||||
|
TITLE:=CYW43430 NVRAM for Raspberry Pi 3B
|
||||||
|
DEPENDS:=@TARGET_brcm2708
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cypress-nvram-43430-sdio-rpi-3b/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/brcmfmac43430-sdio.raspberrypi,3-model-b.txt \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cypress-nvram-43430-sdio-rpi-3b))
|
||||||
|
|
||||||
|
# Cypress 43430 SDIO Raspberry Pi Zero W NVRAM
|
||||||
|
define Package/cypress-nvram-43430-sdio-rpi-zero-w
|
||||||
|
$(Package/cypress-nvram-default)
|
||||||
|
TITLE:=CYW43430 NVRAM for Raspberry Pi Zero W
|
||||||
|
DEPENDS:=@TARGET_brcm2708
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cypress-nvram-43430-sdio-rpi-zero-w/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/brcmfmac43430-sdio.raspberrypi,model-zero-w.txt \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.txt
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cypress-nvram-43430-sdio-rpi-zero-w))
|
||||||
|
|
||||||
|
# Cypress 43455 SDIO Raspberry Pi 3B+ NVRAM
|
||||||
|
define Package/cypress-nvram-43455-sdio-rpi-3b-plus
|
||||||
|
$(Package/cypress-nvram-default)
|
||||||
|
TITLE:=CYW43455 NVRAM for Raspberry Pi 3B+
|
||||||
|
DEPENDS:=@TARGET_brcm2708
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cypress-nvram-43455-sdio-rpi-3b-plus/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cypress-nvram-43455-sdio-rpi-3b-plus))
|
||||||
|
|
||||||
|
# Cypress 43455 SDIO Raspberry Pi 4B NVRAM
|
||||||
|
define Package/cypress-nvram-43455-sdio-rpi-4b
|
||||||
|
$(Package/cypress-nvram-default)
|
||||||
|
TITLE:=CYW43455 NVRAM for Raspberry Pi 4B
|
||||||
|
DEPENDS:=@TARGET_brcm2708
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cypress-nvram-43455-sdio-rpi-4b/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/brcmfmac43455-sdio.raspberrypi,4-model-b.txt \
|
||||||
|
$(1)/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cypress-nvram-43455-sdio-rpi-4b))
|
||||||
@ -14,6 +14,8 @@ endef
|
|||||||
define Build/Compile
|
define Build/Compile
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
# Use ath10k-bdencoder from https://github.com/qca/qca-swiss-army-knife.git
|
||||||
|
# to generate the board-* files here.
|
||||||
#
|
#
|
||||||
# This is intended to be used on an interim basis until device-specific
|
# This is intended to be used on an interim basis until device-specific
|
||||||
# board data for new devices is available through the upstream compilation
|
# board data for new devices is available through the upstream compilation
|
||||||
@ -21,10 +23,13 @@ endef
|
|||||||
# Please send a mail with your device-specific board files upstream.
|
# Please send a mail with your device-specific board files upstream.
|
||||||
# You can find instructions and examples on the linux-wireless wiki:
|
# You can find instructions and examples on the linux-wireless wiki:
|
||||||
# <https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles>
|
# <https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles>
|
||||||
#
|
|
||||||
|
|
||||||
ALLWIFIBOARDS:= \
|
ALLWIFIBOARDS:= \
|
||||||
|
aruba_ap-303 \
|
||||||
avm_fritzrepeater-1200 \
|
avm_fritzrepeater-1200 \
|
||||||
|
dlink_dap2610 \
|
||||||
|
engenius_emd1 \
|
||||||
|
ezviz_cs-w3-wd1200g-eup \
|
||||||
linksys_ea8300 \
|
linksys_ea8300 \
|
||||||
qxwlan_e2600ac
|
qxwlan_e2600ac
|
||||||
|
|
||||||
@ -43,10 +48,8 @@ define ipq-wifi-install-one-to
|
|||||||
$(INSTALL_DATA) $(1) $(2)/lib/firmware/ath10k/$(3)/board-2.bin
|
$(INSTALL_DATA) $(1) $(2)/lib/firmware/ath10k/$(3)/board-2.bin
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Note: .bin deprecated; supports existing boards
|
|
||||||
|
|
||||||
define ipq-wifi-install-one
|
define ipq-wifi-install-one
|
||||||
$(if $(filter $(suffix $(1)),.QCA4019 .qca4019 .bin),\
|
$(if $(filter $(suffix $(1)),.QCA4019 .qca4019),\
|
||||||
$(call ipq-wifi-install-one-to,$(1),$(2),QCA4019/hw1.0),\
|
$(call ipq-wifi-install-one-to,$(1),$(2),QCA4019/hw1.0),\
|
||||||
$(if $(filter $(suffix $(1)),.QCA9888 .qca9888),\
|
$(if $(filter $(suffix $(1)),.QCA9888 .qca9888),\
|
||||||
$(call ipq-wifi-install-one-to,$(1),$(2),QCA9888/hw2.0),\
|
$(call ipq-wifi-install-one-to,$(1),$(2),QCA9888/hw2.0),\
|
||||||
@ -89,7 +92,11 @@ endef
|
|||||||
# Place files in this directory as board-<devicename>.<qca4019|qca9888|qca9984>
|
# Place files in this directory as board-<devicename>.<qca4019|qca9888|qca9984>
|
||||||
# Add $(eval $(call generate-ipq-wifi-package,<devicename>,<display name>))
|
# Add $(eval $(call generate-ipq-wifi-package,<devicename>,<display name>))
|
||||||
|
|
||||||
|
$(eval $(call generate-ipq-wifi-package,aruba_ap-303,Aruba AP-303))
|
||||||
$(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-1200,AVM FRITZRepeater 1200))
|
$(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-1200,AVM FRITZRepeater 1200))
|
||||||
|
$(eval $(call generate-ipq-wifi-package,dlink_dap2610,D-Link DAP-2610))
|
||||||
|
$(eval $(call generate-ipq-wifi-package,engenius_emd1,EnGenius EMD1))
|
||||||
|
$(eval $(call generate-ipq-wifi-package,ezviz_cs-w3-wd1200g-eup,EZVIZ CS-W3-WD1200G EUP))
|
||||||
$(eval $(call generate-ipq-wifi-package,linksys_ea8300,Linksys EA8300))
|
$(eval $(call generate-ipq-wifi-package,linksys_ea8300,Linksys EA8300))
|
||||||
$(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac,Qxwlan E2600AC))
|
$(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac,Qxwlan E2600AC))
|
||||||
|
|
||||||
|
|||||||
BIN
package/firmware/ipq-wifi/board-aruba_ap-303.qca4019
Normal file
BIN
package/firmware/ipq-wifi/board-aruba_ap-303.qca4019
Normal file
Binary file not shown.
BIN
package/firmware/ipq-wifi/board-dlink_dap2610.qca4019
Normal file
BIN
package/firmware/ipq-wifi/board-dlink_dap2610.qca4019
Normal file
Binary file not shown.
BIN
package/firmware/ipq-wifi/board-engenius_emd1.qca4019
Normal file
BIN
package/firmware/ipq-wifi/board-engenius_emd1.qca4019
Normal file
Binary file not shown.
BIN
package/firmware/ipq-wifi/board-ezviz_cs-w3-wd1200g-eup.qca4019
Normal file
BIN
package/firmware/ipq-wifi/board-ezviz_cs-w3-wd1200g-eup.qca4019
Normal file
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
board-qxwlan-e2600ac.bin
|
|
||||||
@ -1,59 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2007 OpenWrt.org
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=ixp4xx-microcode
|
|
||||||
PKG_VERSION:=2.4
|
|
||||||
PKG_RELEASE:=2
|
|
||||||
|
|
||||||
PKG_SOURCE:=IPL_ixp400NpeLibraryWithCrypto-2_4.zip
|
|
||||||
PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
|
|
||||||
PKG_HASH:=1b1170d0657847248589d946048c0aeaa9cd671966fc5bec5933283309485eaa
|
|
||||||
|
|
||||||
PKG_FLAGS:=nonshared
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
define Package/ixp4xx-microcode
|
|
||||||
SECTION:=net
|
|
||||||
CATEGORY:=Network
|
|
||||||
TITLE:=Microcode for the IXP4xx network engines
|
|
||||||
DEPENDS:=@TARGET_ixp4xx
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/ixp4xx-microcode/description
|
|
||||||
This package contains the microcode needed to use the network engines in IXP4xx CPUs
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Prepare
|
|
||||||
rm -rf $(PKG_BUILD_DIR)
|
|
||||||
mkdir -p $(PKG_BUILD_DIR)
|
|
||||||
unzip -d $(PKG_BUILD_DIR)/ $(DL_DIR)/$(PKG_SOURCE)
|
|
||||||
mv $(PKG_BUILD_DIR)/ixp400_xscale_sw/src/npeDl/IxNpeMicrocode.c $(PKG_BUILD_DIR)/
|
|
||||||
rm -rf $(PKG_BUILD_DIR)/ixp400_xscale_sw
|
|
||||||
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
(cd $(PKG_BUILD_DIR); \
|
|
||||||
$(HOSTCC) -Wall -I$(STAGING_DIR_HOST)/include IxNpeMicrocode.c -o IxNpeMicrocode; \
|
|
||||||
./IxNpeMicrocode -be \
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/ixp4xx-microcode/install
|
|
||||||
$(INSTALL_DIR) $(1)/lib/firmware
|
|
||||||
$(INSTALL_DIR) $(1)/usr/share/doc
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-A $(1)/lib/firmware/
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-A-HSS $(1)/lib/firmware/
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-B $(1)/lib/firmware/
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-C $(1)/lib/firmware/
|
|
||||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE.IPL $(1)/usr/share/doc/
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,ixp4xx-microcode))
|
|
||||||
@ -1,148 +0,0 @@
|
|||||||
/*
|
|
||||||
* IxNpeMicrocode.h - Headerfile for compiling the Intel microcode C file
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006 Christian Hohnstaedt <chohnstaedt@innominate.com>
|
|
||||||
*
|
|
||||||
* This file is released under the GPLv2
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* compile with
|
|
||||||
*
|
|
||||||
* gcc -Wall IxNpeMicrocode.c -o IxNpeMicrocode
|
|
||||||
*
|
|
||||||
* Executing the resulting binary on your build-host creates the
|
|
||||||
* "NPE-[ABC].xxxxxxxx" files containing the selected microcode
|
|
||||||
*
|
|
||||||
* fetch the IxNpeMicrocode.c from the Intel Access Library.
|
|
||||||
* It will include this header.
|
|
||||||
*
|
|
||||||
* select Images for every NPE from the following
|
|
||||||
* (used C++ comments for easy uncommenting ....)
|
|
||||||
*/
|
|
||||||
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_SPAN_MASK_FIREWALL_VLAN_QOS_HDR_CONV_EXTMIB
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_SPAN_VLAN_QOS_HDR_CONV_EXTMIB
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_MASK_FIREWALL_VLAN_QOS_EXTMIB
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEA_HSS_TSLOT_SWITCH
|
|
||||||
#define IX_NPEDL_NPEIMAGE_NPEA_ETH_SPAN_FIREWALL_VLAN_QOS_HDR_CONV
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_FIREWALL_VLAN_QOS
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_FIREWALL
|
|
||||||
#define IX_NPEDL_NPEIMAGE_NPEA_HSS_2_PORT
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEA_DMA
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEA_ATM_MPHY_12_PORT
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEA_HSS0_ATM_MPHY_1_PORT
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEA_HSS0_ATM_SPHY_1_PORT
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEA_HSS0
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEA_WEP
|
|
||||||
|
|
||||||
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEB_ETH_SPAN_MASK_FIREWALL_VLAN_QOS_HDR_CONV_EXTMIB
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEB_ETH_SPAN_VLAN_QOS_HDR_CONV_EXTMIB
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEB_ETH_LEARN_FILTER_SPAN_MASK_FIREWALL_VLAN_QOS_EXTMIB
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEB_DMA
|
|
||||||
#define IX_NPEDL_NPEIMAGE_NPEB_ETH_SPAN_FIREWALL_VLAN_QOS_HDR_CONV
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEB_ETH_LEARN_FILTER_SPAN_FIREWALL_VLAN_QOS
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEB_ETH_LEARN_FILTER_SPAN_FIREWALL
|
|
||||||
|
|
||||||
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEC_ETH_SPAN_MASK_FIREWALL_VLAN_QOS_HDR_CONV_EXTMIB
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEC_ETH_SPAN_VLAN_QOS_HDR_CONV_EXTMIB
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEC_ETH_LEARN_FILTER_SPAN_MASK_FIREWALL_VLAN_QOS_EXTMIB
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEC_DMA
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEC_CRYPTO_AES_ETH_LEARN_FILTER_SPAN
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEC_CRYPTO_AES_ETH_LEARN_FILTER_FIREWALL
|
|
||||||
#define IX_NPEDL_NPEIMAGE_NPEC_CRYPTO_AES_CCM_ETH
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEC_CRYPTO_AES_CCM_EXTSHA_ETH
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEC_CRYPTO_ETH_LEARN_FILTER_SPAN_FIREWALL
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEC_ETH_SPAN_FIREWALL_VLAN_QOS_HDR_CONV
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEC_ETH_LEARN_FILTER_SPAN_FIREWALL_VLAN_QOS
|
|
||||||
// #define IX_NPEDL_NPEIMAGE_NPEC_ETH_LEARN_FILTER_SPAN_FIREWALL
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <endian.h>
|
|
||||||
#include <byteswap.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
|
||||||
#define to_le32(x) (x)
|
|
||||||
#define to_be32(x) bswap_32(x)
|
|
||||||
#else
|
|
||||||
#define to_be32(x) (x)
|
|
||||||
#define to_le32(x) bswap_32(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct dl_image {
|
|
||||||
unsigned magic;
|
|
||||||
unsigned id;
|
|
||||||
unsigned size;
|
|
||||||
unsigned data[0];
|
|
||||||
};
|
|
||||||
|
|
||||||
const unsigned IxNpeMicrocode_array[];
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
struct dl_image *image = (struct dl_image *)IxNpeMicrocode_array;
|
|
||||||
int imgsiz, i, fd, cnt;
|
|
||||||
const unsigned *arrayptr = IxNpeMicrocode_array;
|
|
||||||
const char *names[] = { "IXP425", "IXP465", "unknown" };
|
|
||||||
int bigendian = 1;
|
|
||||||
|
|
||||||
if (argc > 1) {
|
|
||||||
if (!strcmp(argv[1], "-le"))
|
|
||||||
bigendian = 0;
|
|
||||||
else if (!strcmp(argv[1], "-be"))
|
|
||||||
bigendian = 1;
|
|
||||||
else {
|
|
||||||
printf("Usage: %s <-le|-be>\n", argv[0]);
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (image = (struct dl_image *)arrayptr, cnt=0;
|
|
||||||
(image->id != 0xfeedf00d) && (image->magic == 0xfeedf00d);
|
|
||||||
image = (struct dl_image *)(arrayptr), cnt++)
|
|
||||||
{
|
|
||||||
unsigned char field[4];
|
|
||||||
imgsiz = image->size + 3;
|
|
||||||
*(unsigned*)field = to_be32(image->id);
|
|
||||||
char filename[40], slnk[10];
|
|
||||||
|
|
||||||
sprintf(filename, "NPE-%c.%08x", (field[0] & 0xf) + 'A',
|
|
||||||
image->id);
|
|
||||||
if (image->id == 0x00090000)
|
|
||||||
sprintf(slnk, "NPE-%c-HSS", (field[0] & 0xf) + 'A');
|
|
||||||
else
|
|
||||||
sprintf(slnk, "NPE-%c", (field[0] & 0xf) + 'A');
|
|
||||||
|
|
||||||
printf("Writing image: %s.NPE_%c Func: %2x Rev: %02x.%02x "
|
|
||||||
"Size: %5d to: '%s'\n",
|
|
||||||
names[field[0] >> 4], (field[0] & 0xf) + 'A',
|
|
||||||
field[1], field[2], field[3], imgsiz*4, filename);
|
|
||||||
fd = open(filename, O_CREAT | O_RDWR | O_TRUNC, 0644);
|
|
||||||
if (fd >= 0) {
|
|
||||||
for (i=0; i<imgsiz; i++) {
|
|
||||||
*(unsigned*)field = bigendian ?
|
|
||||||
to_be32(arrayptr[i]) :
|
|
||||||
to_le32(arrayptr[i]);
|
|
||||||
write(fd, field, sizeof(field));
|
|
||||||
}
|
|
||||||
close(fd);
|
|
||||||
unlink(slnk);
|
|
||||||
symlink(filename, slnk);
|
|
||||||
} else {
|
|
||||||
perror(filename);
|
|
||||||
}
|
|
||||||
arrayptr += imgsiz;
|
|
||||||
}
|
|
||||||
close(fd);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
INTEL(R) SOFTWARE LICENSE AGREEMENT
|
|
||||||
|
|
||||||
Copyright (c) 2007, Intel Corporation.
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution. Redistribution and use in binary form, without modification, are permitted
|
|
||||||
provided that the following conditions are met:
|
|
||||||
o Redistributions must reproduce the above copyright notice and the following disclaimer in the
|
|
||||||
documentation and/or other materials provided with the distribution.
|
|
||||||
o Neither the name of Intel Corporation nor the names of its suppliers may be used to endorse
|
|
||||||
or promote products derived from this software without specific prior written permission.
|
|
||||||
o No reverse engineering, decompilation, or disassembly of this software is permitted.
|
|
||||||
|
|
||||||
Limited patent license. Intel Corporation grants a world-wide, royalty-free, non-exclusive
|
|
||||||
license under patents it now or hereafter owns or controls to make, have made, use, import,
|
|
||||||
offer to sell and sell (.Utilize.) this software, but solely to the extent that any such patent is
|
|
||||||
necessary to Utilize the software alone. The patent license shall not apply to any combinations
|
|
||||||
which include this software. No hardware per se is licensed hereunder.
|
|
||||||
DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
|
||||||
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
|
||||||
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
|
||||||
OF SUCH DAMAGE.
|
|
||||||
@ -8,12 +8,12 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=linux-firmware
|
PKG_NAME:=linux-firmware
|
||||||
PKG_VERSION:=20190815
|
PKG_VERSION:=20191215
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
|
PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_HASH:=15615d87ac9d93aa5c20939a6c65cca7f3bc656b5e8ffd998b8acb932c854327
|
PKG_HASH:=c2068ff4a797c0f2c3edbb9488f82a48bca8a995855ea21310a8346195c0ae56
|
||||||
|
|
||||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
|
|||||||
@ -47,9 +47,14 @@ define Package/libertas-sdio-firmware/install
|
|||||||
$(PKG_BUILD_DIR)/libertas/sd8385.bin \
|
$(PKG_BUILD_DIR)/libertas/sd8385.bin \
|
||||||
$(PKG_BUILD_DIR)/libertas/sd8686_v9_helper.bin \
|
$(PKG_BUILD_DIR)/libertas/sd8686_v9_helper.bin \
|
||||||
$(PKG_BUILD_DIR)/libertas/sd8686_v9.bin \
|
$(PKG_BUILD_DIR)/libertas/sd8686_v9.bin \
|
||||||
$(PKG_BUILD_DIR)/libertas/sd8688_helper.bin \
|
|
||||||
$(PKG_BUILD_DIR)/libertas/sd8688.bin \
|
|
||||||
$(1)/lib/firmware/libertas
|
$(1)/lib/firmware/libertas
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/mrvl
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/mrvl/sd8688_helper.bin \
|
||||||
|
$(PKG_BUILD_DIR)/mrvl/sd8688.bin \
|
||||||
|
$(1)/lib/firmware/mrvl
|
||||||
|
ln -s ../mrvl/sd8688_helper.bin $(1)/lib/firmware/libertas/sd8688_helper.bin
|
||||||
|
ln -s ../mrvl/sd8688.bin $(1)/lib/firmware/libertas/sd8688.bin
|
||||||
endef
|
endef
|
||||||
$(eval $(call BuildPackage,libertas-sdio-firmware))
|
$(eval $(call BuildPackage,libertas-sdio-firmware))
|
||||||
|
|
||||||
|
|||||||
@ -5,12 +5,13 @@ define Package/wl12xx-firmware/install
|
|||||||
$(PKG_BUILD_DIR)/ti-connectivity/wl127x-fw-5-mr.bin \
|
$(PKG_BUILD_DIR)/ti-connectivity/wl127x-fw-5-mr.bin \
|
||||||
$(PKG_BUILD_DIR)/ti-connectivity/wl127x-fw-5-plt.bin \
|
$(PKG_BUILD_DIR)/ti-connectivity/wl127x-fw-5-plt.bin \
|
||||||
$(PKG_BUILD_DIR)/ti-connectivity/wl127x-fw-5-sr.bin \
|
$(PKG_BUILD_DIR)/ti-connectivity/wl127x-fw-5-sr.bin \
|
||||||
$(PKG_BUILD_DIR)/ti-connectivity/wl1271-nvs.bin \
|
$(PKG_BUILD_DIR)/ti-connectivity/wl127x-nvs.bin \
|
||||||
$(PKG_BUILD_DIR)/ti-connectivity/wl128x-fw-5-mr.bin \
|
$(PKG_BUILD_DIR)/ti-connectivity/wl128x-fw-5-mr.bin \
|
||||||
$(PKG_BUILD_DIR)/ti-connectivity/wl128x-fw-5-plt.bin \
|
$(PKG_BUILD_DIR)/ti-connectivity/wl128x-fw-5-plt.bin \
|
||||||
$(PKG_BUILD_DIR)/ti-connectivity/wl128x-fw-5-sr.bin \
|
$(PKG_BUILD_DIR)/ti-connectivity/wl128x-fw-5-sr.bin \
|
||||||
$(PKG_BUILD_DIR)/ti-connectivity/wl128x-nvs.bin \
|
$(PKG_BUILD_DIR)/ti-connectivity/wl128x-nvs.bin \
|
||||||
$(1)/lib/firmware/ti-connectivity
|
$(1)/lib/firmware/ti-connectivity
|
||||||
|
ln -s wl127x-nvs.bin $(1)/lib/firmware/ti-connectivity/wl1271-nvs.bin
|
||||||
endef
|
endef
|
||||||
$(eval $(call BuildPackage,wl12xx-firmware))
|
$(eval $(call BuildPackage,wl12xx-firmware))
|
||||||
|
|
||||||
|
|||||||
@ -26,10 +26,9 @@ include $(INCLUDE_DIR)/package.mk
|
|||||||
define KernelPackage/acx-mac80211
|
define KernelPackage/acx-mac80211
|
||||||
SUBMENU:=Wireless Drivers
|
SUBMENU:=Wireless Drivers
|
||||||
TITLE:=ACX1xx mac80211 driver
|
TITLE:=ACX1xx mac80211 driver
|
||||||
DEPENDS:=@(PCI_SUPPORT||TARGET_ar7) @mipsel +kmod-mac80211
|
DEPENDS:=@PCI_SUPPORT @mipsel +kmod-mac80211
|
||||||
FILES:=$(PKG_BUILD_DIR)/acx-mac80211.ko
|
FILES:=$(PKG_BUILD_DIR)/acx-mac80211.ko
|
||||||
AUTOLOAD:=$(call AutoProbe,acx-mac80211)
|
AUTOLOAD:=$(call AutoProbe,acx-mac80211)
|
||||||
MAINTAINER:=Florian Fainelli <florian@openwrt.org>
|
|
||||||
MENU:=1
|
MENU:=1
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|||||||
@ -1,22 +0,0 @@
|
|||||||
menu "Configuration"
|
|
||||||
depends on (PACKAGE_kmod-sangam-atm-annex-a || PACKAGE_kmod-sangam-atm-annex-b)
|
|
||||||
|
|
||||||
choice
|
|
||||||
prompt "Firmware version"
|
|
||||||
default AR7_ATM_FW_VERSION_704
|
|
||||||
help
|
|
||||||
This option allows you to switch between firmware/driver versions which
|
|
||||||
might improve the DSL line speed.
|
|
||||||
|
|
||||||
config AR7_ATM_FW_VERSION_705
|
|
||||||
bool "D7.05.01.00"
|
|
||||||
|
|
||||||
config AR7_ATM_FW_VERSION_704
|
|
||||||
bool "D7.04.03.00"
|
|
||||||
|
|
||||||
config AR7_ATM_FW_VERSION_703
|
|
||||||
bool "D7.03.01.00"
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
endmenu
|
|
||||||
@ -1,101 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2006-2014 OpenWrt.org
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
|
||||||
|
|
||||||
PKG_NAME:=sangam_atm
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_AR7_ATM_FW_VERSION_705),y)
|
|
||||||
PKG_VERSION:=D7.05.01.00
|
|
||||||
PKG_HASH:=874b5baff92159e99cef0dfb839d6fdc124a46aef7374653064d29d9eee9a3c9
|
|
||||||
PKG_RELEASE:=R1
|
|
||||||
PATCH_DIR:=patches-$(PKG_VERSION)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_AR7_ATM_FW_VERSION_704),y)
|
|
||||||
PKG_VERSION:=D7.04.03.00
|
|
||||||
PKG_HASH:=af2e203e4c86f9a86cdd07d172897b07e66a25379376e8da4c1b14816f86b58f
|
|
||||||
PKG_RELEASE:=R1
|
|
||||||
PATCH_DIR:=patches-$(PKG_VERSION)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_AR7_ATM_FW_VERSION_703),y)
|
|
||||||
PKG_VERSION:=D7.03.01.00
|
|
||||||
PKG_HASH:=2d156164ef5abbe10ffb2400ada4cef2035df3ba2b3f866f00bdede489861c4d
|
|
||||||
PKG_RELEASE:=R2
|
|
||||||
PATCH_DIR:=patches-D7.04.03.00
|
|
||||||
endif
|
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.bz2
|
|
||||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
|
||||||
|
|
||||||
PKG_FLAGS:=nonshared
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
define KernelPackage/sangam-atm/Default
|
|
||||||
SUBMENU:=Network Devices
|
|
||||||
DEPENDS:=@TARGET_ar7_generic +kmod-atm
|
|
||||||
TITLE:=AR7 ADSL driver
|
|
||||||
FILES:=$(PKG_BUILD_DIR)/tiatm.ko
|
|
||||||
AUTOLOAD:=$(call AutoLoad,50,tiatm)
|
|
||||||
MAINTAINER:=Florian Fainelli <florian@openwrt.org>
|
|
||||||
MENU:=1
|
|
||||||
endef
|
|
||||||
|
|
||||||
define KernelPackage/sangam-atm/config
|
|
||||||
source "$(SOURCE)/Config.in"
|
|
||||||
endef
|
|
||||||
|
|
||||||
define KernelPackage/sangam-atm-annex-a
|
|
||||||
$(call KernelPackage/sangam-atm/Default)
|
|
||||||
TITLE+= (Annex A, ADSL over POTS)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define KernelPackage/sangam-atm-annex-a/description
|
|
||||||
The AR7 ADSL driver for Annex A (ADSL over POTS).
|
|
||||||
endef
|
|
||||||
|
|
||||||
define KernelPackage/sangam-atm-annex-a/config
|
|
||||||
$(call KernelPackage/sangam-atm/config)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define KernelPackage/sangam-atm-annex-b
|
|
||||||
$(call KernelPackage/sangam-atm/Default)
|
|
||||||
TITLE+= (Annex B, ADSL over ISDN)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define KernelPackage/sangam-atm-annex-b/description
|
|
||||||
The AR7 ADSL driver for Annex B (ADSL over ISDN).
|
|
||||||
endef
|
|
||||||
|
|
||||||
define KernelPackage/sangam-atm-annex-a/config
|
|
||||||
$(call KernelPackage/sangam-atm/config)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
$(MAKE) -C "$(LINUX_DIR)" \
|
|
||||||
$(KERNEL_MAKE_FLAGS) \
|
|
||||||
SUBDIRS="$(PKG_BUILD_DIR)" \
|
|
||||||
modules
|
|
||||||
endef
|
|
||||||
|
|
||||||
define KernelPackage/sangam-atm-annex-a/install
|
|
||||||
mkdir -p $(1)/lib/firmware
|
|
||||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/ar0700mp.bin $(1)/lib/firmware/
|
|
||||||
$(LN) ar0700mp.bin $(1)/lib/firmware/ar0700xx.bin
|
|
||||||
endef
|
|
||||||
|
|
||||||
define KernelPackage/sangam-atm-annex-b/install
|
|
||||||
mkdir -p $(1)/lib/firmware
|
|
||||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/ar0700db.bin $(1)/lib/firmware/
|
|
||||||
$(LN) ar0700db.bin $(1)/lib/firmware/ar0700xx.bin
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call KernelPackage,sangam-atm-annex-a))
|
|
||||||
$(eval $(call KernelPackage,sangam-atm-annex-b))
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
--- a/aal5sar.h
|
|
||||||
+++ b/aal5sar.h
|
|
||||||
@@ -19,7 +19,7 @@
|
|
||||||
/** \namespace AAL5_Version
|
|
||||||
This documents version 01.07.2c of the AAL5 CPHAL.
|
|
||||||
*/
|
|
||||||
-const char *pszVersion_CPAAL5="CPAAL5 01.07.2c "__DATE__" "__TIME__;
|
|
||||||
+const char *pszVersion_CPAAL5="CPAAL5 01.07.2c ";
|
|
||||||
|
|
||||||
#include "cpsar_cpaal5.h"
|
|
||||||
|
|
||||||
@ -1,768 +0,0 @@
|
|||||||
--- a/cppi_cpaal5.c
|
|
||||||
+++ b/cppi_cpaal5.c
|
|
||||||
@@ -352,7 +352,7 @@ static int halRxReturn(HAL_RECEIVEINFO *
|
|
||||||
{
|
|
||||||
/* malloc failed, add this RCB to Needs Buffer List */
|
|
||||||
TempRcb->FragCount = 1; /*MJH+030417*/
|
|
||||||
- (HAL_RCB *)TempRcb->Eop = TempRcb; /* GSG +030430 */
|
|
||||||
+ TempRcb->Eop = TempRcb; /* GSG +030430 */
|
|
||||||
|
|
||||||
if(HalDev->NeedsCount < MAX_NEEDS) /* +MJH 030410 */
|
|
||||||
{ /* +MJH 030410 */
|
|
||||||
--- a/dsl_hal_api.c
|
|
||||||
+++ b/dsl_hal_api.c
|
|
||||||
@@ -254,15 +254,15 @@
|
|
||||||
* of phyEnableDisableWord & phyControlWord to avoid changing API struct
|
|
||||||
* which may cause change required to application data structure.
|
|
||||||
******************************************************************************/
|
|
||||||
-#include <dev_host_interface.h>
|
|
||||||
-#include <dsl_hal_register.h>
|
|
||||||
-#include <dsl_hal_support.h>
|
|
||||||
+#include "dev_host_interface.h"
|
|
||||||
+#include "dsl_hal_register.h"
|
|
||||||
+#include "dsl_hal_support.h"
|
|
||||||
|
|
||||||
#ifndef NO_ADV_STATS
|
|
||||||
-#include <dsl_hal_logtable.h>
|
|
||||||
+#include "dsl_hal_logtable.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#include <dsl_hal_version.h>
|
|
||||||
+#include "dsl_hal_version.h"
|
|
||||||
|
|
||||||
// UR8_MERGE_START CQ11054 Jack Zhang
|
|
||||||
static unsigned int highprecision_selected = 0; //By default we use low precision for backward compt.
|
|
||||||
--- a/dsl_hal_support.c
|
|
||||||
+++ b/dsl_hal_support.c
|
|
||||||
@@ -140,9 +140,9 @@
|
|
||||||
* oamFeature are overriden
|
|
||||||
// UR8_MERGE_END CQ10774 Ram
|
|
||||||
*******************************************************************************/
|
|
||||||
-#include <dev_host_interface.h>
|
|
||||||
-#include <dsl_hal_register.h>
|
|
||||||
-#include <dsl_hal_support.h>
|
|
||||||
+#include "dev_host_interface.h"
|
|
||||||
+#include "dsl_hal_register.h"
|
|
||||||
+#include "dsl_hal_support.h"
|
|
||||||
|
|
||||||
#define NUM_READ_RETRIES 3
|
|
||||||
static unsigned int dslhal_support_adsl2ByteSwap32(unsigned int in32Bits);
|
|
||||||
--- a/dsl_hal_support.h
|
|
||||||
+++ b/dsl_hal_support.h
|
|
||||||
@@ -49,7 +49,7 @@
|
|
||||||
* 04Nov05 0.11.00 CPH Fixed T1413 mode got Zero DS/US rate when DSL_BIT_TMODE is set.
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
-#include <dsl_hal_api.h>
|
|
||||||
+#include "dsl_hal_api.h"
|
|
||||||
|
|
||||||
#define virtual2Physical(a) (((int)a)&~0xe0000000)
|
|
||||||
/* External Function Prototype Declarations */
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -1,18 +1,9 @@
|
|
||||||
-# File: drivers/atm/ti_evm3/Makefile
|
|
||||||
#
|
|
||||||
-# Makefile for the Texas Instruments EVM3 ADSL/ATM driver.
|
|
||||||
+# Makefile for the TIATM device driver.
|
|
||||||
#
|
|
||||||
-#
|
|
||||||
-# Copyright (c) 2000 Texas Instruments Incorporated.
|
|
||||||
-# Jeff Harrell (jharrell@telogy.com)
|
|
||||||
-# Viren Balar (vbalar@ti.com)
|
|
||||||
-# Victor Wells (vwells@telogy.com)
|
|
||||||
-#
|
|
||||||
-include $(TOPDIR)/Rules.make
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-
|
|
||||||
|
|
||||||
+CONFIG_SANGAM_ATM=m
|
|
||||||
+#EXTRA_CFLAGS += -DEL -I. -DPOST_SILICON -DCOMMON_NSP -DCONFIG_LED_MODULE -DDEREGISTER_LED -DNO_ACT
|
|
||||||
+EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -DNO_ACT -D__NO__VOICE_PATCH__ -DEL
|
|
||||||
+obj-$(CONFIG_SANGAM_ATM) := tiatm.o
|
|
||||||
+tiatm-objs += cpsar.o aal5sar.o tn7sar.o tn7atm.o tn7dsl.o dsl_hal_api.o dsl_hal_support.o
|
|
||||||
--- a/tn7atm.c
|
|
||||||
+++ b/tn7atm.c
|
|
||||||
@@ -61,7 +61,6 @@
|
|
||||||
* UR8_MERGE_END CQ11057*
|
|
||||||
*********************************************************************************************/
|
|
||||||
|
|
||||||
-#include <linux/config.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
@@ -69,11 +68,14 @@
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/spinlock.h>
|
|
||||||
#include <linux/smp_lock.h>
|
|
||||||
-#include <asm/io.h>
|
|
||||||
-#include <asm/mips-boards/prom.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/string.h>
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
+
|
|
||||||
+#include <asm/io.h>
|
|
||||||
+#include <asm/ar7/ar7.h>
|
|
||||||
+#include <asm/ar7/prom.h>
|
|
||||||
+
|
|
||||||
#include "dsl_hal_api.h"
|
|
||||||
#include "tn7atm.h"
|
|
||||||
#include "tn7api.h"
|
|
||||||
@@ -82,6 +84,7 @@
|
|
||||||
#include "dsl_hal_register.h"
|
|
||||||
|
|
||||||
#ifdef MODULE
|
|
||||||
+MODULE_LICENSE("GPL");
|
|
||||||
MODULE_DESCRIPTION ("Tnetd73xx ATM Device Driver");
|
|
||||||
MODULE_AUTHOR ("Zhicheng Tang");
|
|
||||||
#endif
|
|
||||||
@@ -100,9 +103,9 @@ MODULE_AUTHOR ("Zhicheng Tang");
|
|
||||||
|
|
||||||
/*end of externs */
|
|
||||||
|
|
||||||
-#ifndef TI_STATIC_ALLOCATIONS
|
|
||||||
-#define TI_STATIC_ALLOCATIONS
|
|
||||||
-#endif
|
|
||||||
+//#ifndef TI_STATIC_ALLOCATIONS
|
|
||||||
+//#define TI_STATIC_ALLOCATIONS
|
|
||||||
+//#endif
|
|
||||||
|
|
||||||
#define tn7atm_kfree_skb(x) dev_kfree_skb(x)
|
|
||||||
|
|
||||||
@@ -114,7 +117,7 @@ static int EnableQoS = FALSE;
|
|
||||||
/* prototypes */
|
|
||||||
static int tn7atm_set_can_support_adsl2 (int can);
|
|
||||||
|
|
||||||
-static int tn7atm_open (struct atm_vcc *vcc, short vpi, int vci);
|
|
||||||
+static int tn7atm_open (struct atm_vcc *vcc);
|
|
||||||
|
|
||||||
static void tn7atm_close (struct atm_vcc *vcc);
|
|
||||||
|
|
||||||
@@ -257,13 +260,12 @@ static const struct atmdev_ops tn7atm_op
|
|
||||||
getsockopt: NULL,
|
|
||||||
setsockopt: NULL,
|
|
||||||
send: tn7atm_send,
|
|
||||||
- sg_send: NULL,
|
|
||||||
phy_put: NULL,
|
|
||||||
phy_get: NULL,
|
|
||||||
change_qos: tn7atm_change_qos,
|
|
||||||
};
|
|
||||||
|
|
||||||
-const char drv_proc_root_folder[] = "avalanche/";
|
|
||||||
+const char drv_proc_root_folder[] = "avalanche";
|
|
||||||
static struct proc_dir_entry *root_proc_dir_entry = NULL;
|
|
||||||
#define DRV_PROC_MODE 0644
|
|
||||||
static int proc_root_already_exists = TRUE;
|
|
||||||
@@ -559,56 +561,6 @@ static int turbodsl_check_priority_type(
|
|
||||||
|
|
||||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
*
|
|
||||||
- * Function: int tn7atm_walk_vccs(struct atm_dev *dev, short *vcc, int *vci)
|
|
||||||
- *
|
|
||||||
- * Description: retrieve VPI/VCI for connection
|
|
||||||
- *
|
|
||||||
- *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
|
||||||
-static int tn7atm_walk_vccs (struct atm_vcc *vcc, short *vpi, int *vci)
|
|
||||||
-{
|
|
||||||
- struct atm_vcc *walk;
|
|
||||||
-
|
|
||||||
- /*
|
|
||||||
- * find a free VPI
|
|
||||||
- */
|
|
||||||
- if (*vpi == ATM_VPI_ANY)
|
|
||||||
- {
|
|
||||||
-
|
|
||||||
- for (*vpi = 0, walk = vcc->dev->vccs; walk; walk = walk->next)
|
|
||||||
- {
|
|
||||||
-
|
|
||||||
- if ((walk->vci == *vci) && (walk->vpi == *vpi))
|
|
||||||
- {
|
|
||||||
- (*vpi)++;
|
|
||||||
- walk = vcc->dev->vccs;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- /*
|
|
||||||
- * find a free VCI
|
|
||||||
- */
|
|
||||||
- if (*vci == ATM_VCI_ANY)
|
|
||||||
- {
|
|
||||||
-
|
|
||||||
- for (*vci = ATM_NOT_RSV_VCI, walk = vcc->dev->vccs; walk;
|
|
||||||
- walk = walk->next)
|
|
||||||
- {
|
|
||||||
-
|
|
||||||
- if ((walk->vpi = *vpi) && (walk->vci == *vci))
|
|
||||||
- {
|
|
||||||
- *vci = walk->vci + 1;
|
|
||||||
- walk = vcc->dev->vccs;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- return 0;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
- *
|
|
||||||
* Function: int tn7atm_sar_irq(void)
|
|
||||||
*
|
|
||||||
* Description: tnetd73xx SAR interrupt.
|
|
||||||
@@ -693,7 +645,7 @@ static int __init tn7atm_irq_request (st
|
|
||||||
* Register SAR interrupt
|
|
||||||
*/
|
|
||||||
priv->sar_irq = LNXINTNUM (ATM_SAR_INT); /* Interrupt line # */
|
|
||||||
- if (request_irq (priv->sar_irq, tn7atm_sar_irq, SA_INTERRUPT, "SAR ", dev))
|
|
||||||
+ if (request_irq (priv->sar_irq, tn7atm_sar_irq, IRQF_DISABLED, "SAR ", dev))
|
|
||||||
printk ("Could not register tn7atm_sar_irq\n");
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -704,14 +656,14 @@ static int __init tn7atm_irq_request (st
|
|
||||||
{
|
|
||||||
def_sar_inter_pace = os_atoi (ptr);
|
|
||||||
}
|
|
||||||
- avalanche_request_pacing (priv->sar_irq, ATM_SAR_INT_PACING_BLOCK_NUM,
|
|
||||||
- def_sar_inter_pace);
|
|
||||||
+/* avalanche_request_pacing (priv->sar_irq, ATM_SAR_INT_PACING_BLOCK_NUM,
|
|
||||||
+ def_sar_inter_pace);*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Reigster Receive interrupt A
|
|
||||||
*/
|
|
||||||
priv->dsl_irq = LNXINTNUM (ATM_DSL_INT); /* Interrupt line # */
|
|
||||||
- if (request_irq (priv->dsl_irq, tn7atm_dsl_irq, SA_INTERRUPT, "DSL ", dev))
|
|
||||||
+ if (request_irq (priv->dsl_irq, tn7atm_dsl_irq, IRQF_DISABLED, "DSL ", dev))
|
|
||||||
printk ("Could not register tn7atm_dsl_irq\n");
|
|
||||||
|
|
||||||
/***** VRB Tasklet Mode ****/
|
|
||||||
@@ -875,11 +827,15 @@ static int __init tn7atm_get_ESI (struct
|
|
||||||
#define ATM_VBR_RT 5
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-int tn7atm_open (struct atm_vcc *vcc, short vpi, int vci)
|
|
||||||
+int tn7atm_open (struct atm_vcc *vcc)
|
|
||||||
{
|
|
||||||
tn7atm_activate_vc_parm_t tn7atm_activate_vc_parm;
|
|
||||||
int rc;
|
|
||||||
//int flags;
|
|
||||||
+ tn7atm_activate_vc_parm.pcr = 0x20000;
|
|
||||||
+ tn7atm_activate_vc_parm.scr = 0x20000;
|
|
||||||
+ tn7atm_activate_vc_parm.mbs = 0x20000;
|
|
||||||
+ tn7atm_activate_vc_parm.cdvt = 10000;
|
|
||||||
|
|
||||||
dgprintf(1, "tn7atm_open()\n");
|
|
||||||
|
|
||||||
@@ -891,24 +847,18 @@ int tn7atm_open (struct atm_vcc *vcc, sh
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
- MOD_INC_USE_COUNT;
|
|
||||||
+// MOD_INC_USE_COUNT;
|
|
||||||
|
|
||||||
- /* find a free VPI/VCI */
|
|
||||||
- tn7atm_walk_vccs(vcc, &vpi, &vci);
|
|
||||||
-
|
|
||||||
- vcc->vpi = vpi;
|
|
||||||
- vcc->vci = vci;
|
|
||||||
-
|
|
||||||
- if ((vci == ATM_VCI_UNSPEC) || (vpi == ATM_VCI_UNSPEC))
|
|
||||||
+ if ((vcc->vci == ATM_VCI_UNSPEC) || (vcc->vpi == ATM_VCI_UNSPEC))
|
|
||||||
{
|
|
||||||
- MOD_DEC_USE_COUNT;
|
|
||||||
+// MOD_DEC_USE_COUNT;
|
|
||||||
return -EBUSY;
|
|
||||||
}
|
|
||||||
|
|
||||||
- tn7atm_activate_vc_parm.vpi = vpi;
|
|
||||||
- tn7atm_activate_vc_parm.vci = vci;
|
|
||||||
+ tn7atm_activate_vc_parm.vpi = vcc->vpi;
|
|
||||||
+ tn7atm_activate_vc_parm.vci = vcc->vci;
|
|
||||||
|
|
||||||
- if ((vpi == CLEAR_EOC_VPI) && (vci == CLEAR_EOC_VCI))
|
|
||||||
+ if ((vcc->vpi == CLEAR_EOC_VPI) && (vcc->vci == CLEAR_EOC_VCI))
|
|
||||||
{
|
|
||||||
/* always use (max_dma_chan+1) for clear eoc */
|
|
||||||
tn7atm_activate_vc_parm.chan = EOC_DMA_CHAN;
|
|
||||||
@@ -916,7 +866,7 @@ int tn7atm_open (struct atm_vcc *vcc, sh
|
|
||||||
/* check to see whether clear eoc is opened or not */
|
|
||||||
if (tn7atm_activate_vc_parm.priv->lut[tn7atm_activate_vc_parm.chan].inuse)
|
|
||||||
{
|
|
||||||
- MOD_DEC_USE_COUNT;
|
|
||||||
+// MOD_DEC_USE_COUNT;
|
|
||||||
printk("tn7atm_open: Clear EOC channel (dmachan=%d) already in use.\n", tn7atm_activate_vc_parm.chan);
|
|
||||||
return -EBUSY;
|
|
||||||
}
|
|
||||||
@@ -925,7 +875,7 @@ int tn7atm_open (struct atm_vcc *vcc, sh
|
|
||||||
if (rc)
|
|
||||||
{
|
|
||||||
printk("tn7atm_open: failed to setup clear_eoc\n");
|
|
||||||
- MOD_DEC_USE_COUNT;
|
|
||||||
+// MOD_DEC_USE_COUNT;
|
|
||||||
return -EBUSY;
|
|
||||||
}
|
|
||||||
tn7atm_set_lut(tn7atm_activate_vc_parm.priv,vcc, tn7atm_activate_vc_parm.chan);
|
|
||||||
@@ -934,17 +884,17 @@ int tn7atm_open (struct atm_vcc *vcc, sh
|
|
||||||
}
|
|
||||||
else /* PVC channel setup */
|
|
||||||
{
|
|
||||||
- if ((vpi==REMOTE_MGMT_VPI) && (vci==REMOTE_MGMT_VCI))
|
|
||||||
+ if ((vcc->vpi==REMOTE_MGMT_VPI) && (vcc->vci==REMOTE_MGMT_VCI))
|
|
||||||
{
|
|
||||||
tn7atm_activate_vc_parm.chan = 14; /* always use chan 14 for MII PVC-base romote mgmt */
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
- rc = tn7atm_lut_find(vpi, vci);
|
|
||||||
+ rc = tn7atm_lut_find(vcc->vpi, vcc->vci);
|
|
||||||
/* check to see whether PVC is opened or not */
|
|
||||||
if(ATM_NO_DMA_CHAN != rc)
|
|
||||||
{
|
|
||||||
- MOD_DEC_USE_COUNT;
|
|
||||||
+// MOD_DEC_USE_COUNT;
|
|
||||||
printk("PVC already opened. dmachan = %d\n", rc);
|
|
||||||
return -EBUSY;
|
|
||||||
}
|
|
||||||
@@ -976,6 +926,7 @@ int tn7atm_open (struct atm_vcc *vcc, sh
|
|
||||||
tn7atm_activate_vc_parm.priority = 2;
|
|
||||||
break;
|
|
||||||
|
|
||||||
+#if 0
|
|
||||||
case ATM_VBR: /* Variable Bit Rate-Non RealTime*/
|
|
||||||
tn7atm_activate_vc_parm.qos = 1;
|
|
||||||
tn7atm_activate_vc_parm.priority = 1;
|
|
||||||
@@ -997,6 +948,7 @@ int tn7atm_open (struct atm_vcc *vcc, sh
|
|
||||||
tn7atm_activate_vc_parm.mbs = vcc->qos.txtp.max_pcr;
|
|
||||||
tn7atm_activate_vc_parm.cdvt = vcc->qos.txtp.max_cdv;
|
|
||||||
break;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
default:
|
|
||||||
tn7atm_activate_vc_parm.qos = 2;
|
|
||||||
@@ -1024,7 +976,7 @@ int tn7atm_open (struct atm_vcc *vcc, sh
|
|
||||||
if (rc < 0)
|
|
||||||
{
|
|
||||||
printk("failed to activate hw channel\n");
|
|
||||||
- MOD_DEC_USE_COUNT;
|
|
||||||
+// MOD_DEC_USE_COUNT;
|
|
||||||
tn7atm_lut_clear(vcc, tn7atm_activate_vc_parm.chan);
|
|
||||||
//spin_unlock_irqrestore(&chan_init_lock, flags);
|
|
||||||
return -EBUSY;
|
|
||||||
@@ -1114,7 +1066,7 @@ void tn7atm_close (struct atm_vcc *vcc)
|
|
||||||
tn7atm_lut_clear (vcc, dmachan);
|
|
||||||
//spin_unlock_irqrestore (&closeLock, closeFlag);
|
|
||||||
|
|
||||||
- MOD_DEC_USE_COUNT;
|
|
||||||
+// MOD_DEC_USE_COUNT;
|
|
||||||
|
|
||||||
dgprintf (1, "Leave tn7atm_close\n");
|
|
||||||
}
|
|
||||||
@@ -1528,8 +1480,7 @@ int tn7atm_receive (void *os_dev, int ch
|
|
||||||
* firewall is on */
|
|
||||||
|
|
||||||
dgprintf (3, "pushing the skb...\n");
|
|
||||||
-
|
|
||||||
- skb->stamp = vcc->timestamp = xtime;
|
|
||||||
+ __net_timestamp(skb);
|
|
||||||
|
|
||||||
xdump ((unsigned char *) skb->data, skb->len, 5);
|
|
||||||
|
|
||||||
@@ -1725,8 +1676,7 @@ static void tn7atm_exit (void)
|
|
||||||
|
|
||||||
kfree (dev->dev_data);
|
|
||||||
|
|
||||||
- // atm_dev_deregister (dev);
|
|
||||||
- shutdown_atm_dev (dev);
|
|
||||||
+ atm_dev_deregister (dev);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* remove proc entries
|
|
||||||
@@ -1885,9 +1835,6 @@ static int __init tn7atm_detect (void)
|
|
||||||
/*
|
|
||||||
* Set up proc entry for atm stats
|
|
||||||
*/
|
|
||||||
- if (tn7atm_xlate_proc_name
|
|
||||||
- (drv_proc_root_folder, &root_proc_dir_entry, &residual))
|
|
||||||
- {
|
|
||||||
printk ("Creating new root folder %s in the proc for the driver stats \n",
|
|
||||||
drv_proc_root_folder);
|
|
||||||
root_proc_dir_entry = proc_mkdir (drv_proc_root_folder, NULL);
|
|
||||||
@@ -1897,7 +1844,6 @@ static int __init tn7atm_detect (void)
|
|
||||||
return -ENOMEM;
|
|
||||||
}
|
|
||||||
proc_root_already_exists = FALSE;
|
|
||||||
- }
|
|
||||||
|
|
||||||
/*
|
|
||||||
* AV: Clean-up. Moved all the definitions to the data structure.
|
|
||||||
@@ -2479,7 +2425,5 @@ static int tn7atm_proc_qos_write(struct
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
-#ifdef MODULE
|
|
||||||
module_init (tn7atm_detect);
|
|
||||||
module_exit (tn7atm_exit);
|
|
||||||
-#endif /* MODULE */
|
|
||||||
--- a/tn7atm.h
|
|
||||||
+++ b/tn7atm.h
|
|
||||||
@@ -19,7 +19,8 @@
|
|
||||||
//#include "mips_support.h"
|
|
||||||
#include <linux/list.h>
|
|
||||||
|
|
||||||
-#include <linux/config.h>
|
|
||||||
+#define MIPS_EXCEPTION_OFFSET 8
|
|
||||||
+#define LNXINTNUM(x)((x) + MIPS_EXCEPTION_OFFSET)
|
|
||||||
|
|
||||||
#ifdef CONFIG_MODVERSIONS
|
|
||||||
#include <linux/modversions.h>
|
|
||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -94,7 +94,6 @@
|
|
||||||
* 1/02/07 JZ CQ11054: Data Precision and Range Changes for TR-069 Conformance
|
|
||||||
* UR8_MERGE_END CQ11054*
|
|
||||||
*********************************************************************************************/
|
|
||||||
-#include <linux/config.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
@@ -102,8 +101,6 @@
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/spinlock.h>
|
|
||||||
#include <linux/smp_lock.h>
|
|
||||||
-#include <asm/io.h>
|
|
||||||
-#include <asm/mips-boards/prom.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/string.h>
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
@@ -111,6 +108,12 @@
|
|
||||||
#include <linux/timer.h>
|
|
||||||
#include <linux/vmalloc.h>
|
|
||||||
#include <linux/file.h>
|
|
||||||
+#include <linux/firmware.h>
|
|
||||||
+
|
|
||||||
+#include <asm/io.h>
|
|
||||||
+#include <asm/ar7/ar7.h>
|
|
||||||
+#include <asm/ar7/prom.h>
|
|
||||||
+
|
|
||||||
/* Modules specific header files */
|
|
||||||
#include "tn7atm.h"
|
|
||||||
#include "tn7api.h"
|
|
||||||
@@ -173,7 +176,7 @@ led_reg_t ledreg[2];
|
|
||||||
static struct led_funcs ledreg[2];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#define DEV_DSLMOD 1
|
|
||||||
+#define DEV_DSLMOD CTL_UNNUMBERED
|
|
||||||
#define MAX_STR_SIZE 256
|
|
||||||
#define DSL_MOD_SIZE 256
|
|
||||||
|
|
||||||
@@ -299,7 +302,7 @@ static PITIDSLHW_T pIhw;
|
|
||||||
static volatile int bshutdown;
|
|
||||||
static char info[MAX_STR_SIZE];
|
|
||||||
/* Used for DSL Polling enable */
|
|
||||||
-static DECLARE_MUTEX_LOCKED (adsl_sem_overlay);
|
|
||||||
+static struct semaphore adsl_sem_overlay;
|
|
||||||
|
|
||||||
//kthread_t overlay_thread;
|
|
||||||
/* end of module wide declars */
|
|
||||||
@@ -323,6 +326,14 @@ static int tn7dsl_proc_snr_print (char *
|
|
||||||
#define gDot1(a) ((a>0)?(a%10):((-a)%10))
|
|
||||||
// UR8_MERGE_END CQ11054*
|
|
||||||
|
|
||||||
+int avalanche_request_intr_pacing(int irq_nr, unsigned int blk_num,
|
|
||||||
+ unsigned int pace_value)
|
|
||||||
+{
|
|
||||||
+ printk("avalanche_request_pacing(%d, %u, %u); // not implemented\n", irq_nr, blk_num, pace_value);
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
int os_atoi(const char *pStr)
|
|
||||||
{
|
|
||||||
int MulNeg = (*pStr == '-' ? -1 : 1);
|
|
||||||
@@ -359,39 +370,6 @@ void dprintf (int uDbgLevel, char *szFmt
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
-int strcmp(const char *s1, const char *s2)
|
|
||||||
-{
|
|
||||||
-
|
|
||||||
- int size = strlen(s1);
|
|
||||||
-
|
|
||||||
- return(strncmp(s1, s2, size));
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-int strncmp(const char *s1, const char *s2, size_t size)
|
|
||||||
-{
|
|
||||||
- int i = 0;
|
|
||||||
- int max_size = (int)size;
|
|
||||||
-
|
|
||||||
- while((s1[i] != 0) && i < max_size)
|
|
||||||
- {
|
|
||||||
- if(s2[i] == 0)
|
|
||||||
- {
|
|
||||||
- return -1;
|
|
||||||
- }
|
|
||||||
- if(s1[i] != s2[i])
|
|
||||||
- {
|
|
||||||
- return 1;
|
|
||||||
- }
|
|
||||||
- i++;
|
|
||||||
- }
|
|
||||||
- if(s2[i] != 0)
|
|
||||||
- {
|
|
||||||
- return 1;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- return 0;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
// * UR8_MERGE_START CQ10640 Jack Zhang
|
|
||||||
int tn7dsl_dump_dsp_memory(char *input_str) //cph99
|
|
||||||
{
|
|
||||||
@@ -441,101 +419,74 @@ unsigned int shim_osGetCpuFrequency(void
|
|
||||||
return CpuFrequency;
|
|
||||||
}
|
|
||||||
|
|
||||||
-int shim_osLoadFWImage(unsigned char *ptr)
|
|
||||||
+static void avsar_release(struct device *dev)
|
|
||||||
{
|
|
||||||
- unsigned int bytesRead;
|
|
||||||
- mm_segment_t oldfs;
|
|
||||||
- static struct file *filp;
|
|
||||||
- unsigned int imageLength=0x5ffff;
|
|
||||||
-
|
|
||||||
-
|
|
||||||
- dgprintf(4, "tn7dsl_read_dsp()\n");
|
|
||||||
-
|
|
||||||
- dgprintf(4,"open file %s\n", DSP_FIRMWARE_PATH);
|
|
||||||
-
|
|
||||||
- filp=filp_open(DSP_FIRMWARE_PATH,00,O_RDONLY);
|
|
||||||
- if(filp ==NULL)
|
|
||||||
- {
|
|
||||||
- printk("Failed: Could not open DSP binary file\n");
|
|
||||||
- return -1;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if (filp->f_dentry != NULL)
|
|
||||||
- {
|
|
||||||
- if (filp->f_dentry->d_inode != NULL)
|
|
||||||
- {
|
|
||||||
- printk ("DSP binary filesize = %d bytes\n",
|
|
||||||
- (int) filp->f_dentry->d_inode->i_size);
|
|
||||||
- imageLength = (unsigned int)filp->f_dentry->d_inode->i_size + 0x200;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if (filp->f_op->read==NULL)
|
|
||||||
- return -1; /* File(system) doesn't allow reads */
|
|
||||||
-
|
|
||||||
- /*
|
|
||||||
- * Disable parameter checking
|
|
||||||
- */
|
|
||||||
- oldfs = get_fs();
|
|
||||||
- set_fs(KERNEL_DS);
|
|
||||||
-
|
|
||||||
- /*
|
|
||||||
- * Now read bytes from postion "StartPos"
|
|
||||||
- */
|
|
||||||
- filp->f_pos = 0;
|
|
||||||
-
|
|
||||||
- bytesRead = filp->f_op->read(filp,ptr,imageLength,&filp->f_pos);
|
|
||||||
-
|
|
||||||
- dgprintf(4,"file length = %d\n", bytesRead);
|
|
||||||
-
|
|
||||||
- set_fs(oldfs);
|
|
||||||
-
|
|
||||||
- /*
|
|
||||||
- * Close the file
|
|
||||||
- */
|
|
||||||
- fput(filp);
|
|
||||||
-
|
|
||||||
- return bytesRead;
|
|
||||||
+ printk(KERN_DEBUG "avsar firmware released\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
+static struct device avsar = {
|
|
||||||
+ .bus_id = "vlynq",
|
|
||||||
+ .release = avsar_release,
|
|
||||||
+};
|
|
||||||
|
|
||||||
-unsigned int shim_read_overlay_page (void *ptr, unsigned int secOffset,
|
|
||||||
- unsigned int secLength)
|
|
||||||
+int shim_osLoadFWImage(unsigned char *ptr)
|
|
||||||
{
|
|
||||||
- unsigned int bytesRead;
|
|
||||||
- mm_segment_t oldfs;
|
|
||||||
- struct file *filp;
|
|
||||||
-
|
|
||||||
- dgprintf(4,"shim_read_overlay_page\n");
|
|
||||||
- //dgprintf(4,"sec offset=%d, sec length =%d\n", secOffset, secLength);
|
|
||||||
+ const struct firmware *fw_entry;
|
|
||||||
+ size_t size;
|
|
||||||
|
|
||||||
- filp=filp_open(DSP_FIRMWARE_PATH,00,O_RDONLY);
|
|
||||||
- if(filp ==NULL)
|
|
||||||
- {
|
|
||||||
- printk("Failed: Could not open DSP binary file\n");
|
|
||||||
- return -1;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if (filp->f_op->read==NULL)
|
|
||||||
- return -1; /* File(system) doesn't allow reads */
|
|
||||||
-
|
|
||||||
- /*
|
|
||||||
- * Now read bytes from postion "StartPos"
|
|
||||||
- */
|
|
||||||
-
|
|
||||||
- if(filp->f_op->llseek)
|
|
||||||
- filp->f_op->llseek(filp,secOffset, 0);
|
|
||||||
- oldfs = get_fs();
|
|
||||||
- set_fs(KERNEL_DS);
|
|
||||||
- filp->f_pos = secOffset;
|
|
||||||
- bytesRead = filp->f_op->read(filp,ptr,secLength,&filp->f_pos);
|
|
||||||
-
|
|
||||||
- set_fs(oldfs);
|
|
||||||
- /*
|
|
||||||
- * Close the file
|
|
||||||
- */
|
|
||||||
- fput(filp);
|
|
||||||
- return bytesRead;
|
|
||||||
+ printk("requesting firmware image \"ar0700xx.bin\"\n");
|
|
||||||
+ if(device_register(&avsar) < 0) {
|
|
||||||
+ printk(KERN_ERR
|
|
||||||
+ "avsar: device_register fails\n");
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if(request_firmware(&fw_entry, "ar0700xx.bin", &avsar)) {
|
|
||||||
+ printk(KERN_ERR
|
|
||||||
+ "avsar: Firmware not available\n");
|
|
||||||
+ device_unregister(&avsar);
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ size = fw_entry->size;
|
|
||||||
+ device_unregister(&avsar);
|
|
||||||
+ if(size > 0x5ffff) {
|
|
||||||
+ printk(KERN_ERR
|
|
||||||
+ "avsar: Firmware too big (%d bytes)\n", size);
|
|
||||||
+ release_firmware(fw_entry);
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ memcpy(ptr, fw_entry->data, size);
|
|
||||||
+ release_firmware(fw_entry);
|
|
||||||
+ return size;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+unsigned int shim_read_overlay_page(void *ptr, unsigned int secOffset, unsigned int secLength)
|
|
||||||
+{
|
|
||||||
+ const struct firmware *fw_entry;
|
|
||||||
+
|
|
||||||
+ printk("requesting firmware image \"ar0700xx.bin\"\n");
|
|
||||||
+ if(device_register(&avsar) < 0) {
|
|
||||||
+ printk(KERN_ERR
|
|
||||||
+ "avsar: device_register fails\n");
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if(request_firmware(&fw_entry, "ar0700xx.bin", &avsar)) {
|
|
||||||
+ printk(KERN_ERR
|
|
||||||
+ "avsar: Firmware not available\n");
|
|
||||||
+ device_unregister(&avsar);
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ device_unregister(&avsar);
|
|
||||||
+ if(fw_entry->size > secLength) {
|
|
||||||
+ printk(KERN_ERR
|
|
||||||
+ "avsar: Firmware too big (%d bytes)\n", fw_entry->size);
|
|
||||||
+ release_firmware(fw_entry);
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ memcpy(ptr + secOffset, fw_entry->data, secLength);
|
|
||||||
+ release_firmware(fw_entry);
|
|
||||||
+ return secLength;
|
|
||||||
}
|
|
||||||
|
|
||||||
int shim_osLoadDebugFWImage(unsigned char *ptr)
|
|
||||||
@@ -3064,6 +3015,7 @@ int tn7dsl_init(void *priv)
|
|
||||||
int high_precision_selected = 0;
|
|
||||||
// UR8_MERGE_END CQ11054*
|
|
||||||
|
|
||||||
+ sema_init(&adsl_sem_overlay, 0);
|
|
||||||
/*
|
|
||||||
* start dsl
|
|
||||||
*/
|
|
||||||
@@ -3442,7 +3394,7 @@ static int dslmod_sysctl(ctl_table *ctl,
|
|
||||||
*/
|
|
||||||
if(write)
|
|
||||||
{
|
|
||||||
- ret = proc_dostring(ctl, write, filp, buffer, lenp);
|
|
||||||
+ ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
|
|
||||||
|
|
||||||
switch (ctl->ctl_name)
|
|
||||||
{
|
|
||||||
@@ -3528,14 +3480,14 @@ static int dslmod_sysctl(ctl_table *ctl,
|
|
||||||
else
|
|
||||||
{
|
|
||||||
len += sprintf(info+len, mod_req);
|
|
||||||
- ret = proc_dostring(ctl, write, filp, buffer, lenp);
|
|
||||||
+ ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ctl_table dslmod_table[] = {
|
|
||||||
- {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, &dslmod_sysctl}
|
|
||||||
+ {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, &sysctl_string}
|
|
||||||
,
|
|
||||||
{0}
|
|
||||||
};
|
|
||||||
@@ -3558,8 +3510,7 @@ void tn7dsl_dslmod_sysctl_register(void)
|
|
||||||
if (initialized == 1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
- dslmod_sysctl_header = register_sysctl_table(dslmod_root_table, 1);
|
|
||||||
- dslmod_root_table->child->de->owner = THIS_MODULE;
|
|
||||||
+ dslmod_sysctl_header = register_sysctl_table(dslmod_root_table);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* set the defaults
|
|
||||||
@@ -4821,4 +4772,4 @@ int tn7dsl_proc_PMDus(char* buf, char **
|
|
||||||
}
|
|
||||||
#endif //NO_ADV_STATS
|
|
||||||
#endif //TR69_PMD_IN
|
|
||||||
-// * UR8_MERGE_END CQ11057 *
|
|
||||||
\ No newline at end of file
|
|
||||||
+// * UR8_MERGE_END CQ11057 *
|
|
||||||
--- a/tn7sar.c
|
|
||||||
+++ b/tn7sar.c
|
|
||||||
@@ -42,7 +42,6 @@
|
|
||||||
* UR8_MERGE_END CQ10700
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
-#include <linux/config.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
@@ -50,12 +49,13 @@
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/spinlock.h>
|
|
||||||
#include <linux/smp_lock.h>
|
|
||||||
-#include <asm/io.h>
|
|
||||||
-#include <asm/mips-boards/prom.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/string.h>
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
|
|
||||||
+#include <asm/io.h>
|
|
||||||
+#include <asm/ar7/ar7.h>
|
|
||||||
+#include <asm/ar7/prom.h>
|
|
||||||
|
|
||||||
#define _CPHAL_AAL5
|
|
||||||
#define _CPHAL_SAR
|
|
||||||
@ -1,37 +0,0 @@
|
|||||||
--- a/tn7atm.c
|
|
||||||
+++ b/tn7atm.c
|
|
||||||
@@ -566,7 +566,7 @@ static int turbodsl_check_priority_type(
|
|
||||||
* Description: tnetd73xx SAR interrupt.
|
|
||||||
*
|
|
||||||
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
|
||||||
-static void tn7atm_sar_irq (int irq, void *voiddev, struct pt_regs *regs)
|
|
||||||
+static irqreturn_t tn7atm_sar_irq (int irq, void *voiddev)
|
|
||||||
{
|
|
||||||
struct atm_dev *atmdev;
|
|
||||||
Tn7AtmPrivate *priv;
|
|
||||||
@@ -593,6 +593,7 @@ static void tn7atm_sar_irq (int irq, voi
|
|
||||||
#ifdef TIATM_INST_SUPP
|
|
||||||
psp_trace_par (ATM_DRV_SAR_ISR_EXIT, retval);
|
|
||||||
#endif
|
|
||||||
+ return IRQ_HANDLED;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
@@ -602,7 +603,7 @@ static void tn7atm_sar_irq (int irq, voi
|
|
||||||
* Description: tnetd73xx DSL interrupt.
|
|
||||||
*
|
|
||||||
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
|
||||||
-static void tn7atm_dsl_irq (int irq, void *voiddev, struct pt_regs *regs)
|
|
||||||
+static irqreturn_t tn7atm_dsl_irq (int irq, void *voiddev)
|
|
||||||
{
|
|
||||||
struct atm_dev *atmdev;
|
|
||||||
Tn7AtmPrivate *priv;
|
|
||||||
@@ -624,6 +625,8 @@ static void tn7atm_dsl_irq (int irq, voi
|
|
||||||
#ifdef TIATM_INST_SUPP
|
|
||||||
psp_trace_par (ATM_DRV_DSL_ISR_EXIT, retval);
|
|
||||||
#endif
|
|
||||||
+
|
|
||||||
+ return IRQ_HANDLED;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
--- a/tn7api.h
|
|
||||||
+++ b/tn7api.h
|
|
||||||
@@ -107,7 +107,7 @@ int tn7dsl_proc_dbg_rmsgs4(char* buf, ch
|
|
||||||
|
|
||||||
int tn7dsl_proc_write_stats(struct file *fp, const char * buf, unsigned long count, void * data);
|
|
||||||
int tn7dsl_proc_modem(char* buf, char **start, off_t offset, int count,int *eof, void *data);
|
|
||||||
-inline int tn7dsl_handle_interrupt(void);
|
|
||||||
+int tn7dsl_handle_interrupt(void);
|
|
||||||
|
|
||||||
void tn7dsl_dslmod_sysctl_register(void);
|
|
||||||
void tn7dsl_dslmod_sysctl_unregister(void);
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
--- a/dsl_hal_advcfg.c
|
|
||||||
+++ b/dsl_hal_advcfg.c
|
|
||||||
@@ -36,9 +36,9 @@
|
|
||||||
* 05Jul05 0.00.09 CPH CQ9775: Change dslhal_advcfg_configDsTones input parameters & support for ADSL2+
|
|
||||||
* 24Jul05 0.00.10 CPH Fixed comments in dslhal_advcfg_configDsTones function header
|
|
||||||
*******************************************************************************/
|
|
||||||
-#include <dev_host_interface.h>
|
|
||||||
-#include <dsl_hal_register.h>
|
|
||||||
-#include <dsl_hal_support.h>
|
|
||||||
+#include "dev_host_interface.h"
|
|
||||||
+#include "dsl_hal_register.h"
|
|
||||||
+#include "dsl_hal_support.h"
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/* ACT API functions -- To be moved into their own independent module --RamP */
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -4,6 +4,7 @@
|
|
||||||
|
|
||||||
CONFIG_SANGAM_ATM=m
|
|
||||||
#EXTRA_CFLAGS += -DEL -I. -DPOST_SILICON -DCOMMON_NSP -DCONFIG_LED_MODULE -DDEREGISTER_LED -DNO_ACT
|
|
||||||
-EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -DNO_ACT -D__NO__VOICE_PATCH__ -DEL
|
|
||||||
+#EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -DNO_ACT -D__NO__VOICE_PATCH__ -DEL
|
|
||||||
+EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -D__NO__VOICE_PATCH__ -DEL
|
|
||||||
obj-$(CONFIG_SANGAM_ATM) := tiatm.o
|
|
||||||
-tiatm-objs += cpsar.o aal5sar.o tn7sar.o tn7atm.o tn7dsl.o dsl_hal_api.o dsl_hal_support.o
|
|
||||||
+tiatm-objs += cpsar.o aal5sar.o tn7sar.o tn7atm.o tn7dsl.o dsl_hal_api.o dsl_hal_support.o dsl_hal_advcfg.o
|
|
||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -2869,6 +2869,14 @@ static int tn7dsl_set_dsl(void)
|
|
||||||
dslhal_api_setRateAdaptFlag(pIhw, os_atoi(ptr));
|
|
||||||
}
|
|
||||||
|
|
||||||
+ // set powercutback
|
|
||||||
+ ptr = NULL;
|
|
||||||
+ ptr = prom_getenv("powercutback");
|
|
||||||
+ if(ptr)
|
|
||||||
+ {
|
|
||||||
+ dslhal_advcfg_onOffPcb(pIhw, os_atoi(ptr));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
// trellis
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("trellis");
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
--- a/tn7sar.c
|
|
||||||
+++ b/tn7sar.c
|
|
||||||
@@ -103,10 +103,10 @@ enum
|
|
||||||
|
|
||||||
#define RESERVED_OAM_CHANNEL 15
|
|
||||||
|
|
||||||
-#define AAL5_PARM "id=aal5, base = 0x03000000, offset = 0, int_line=15, ch0=[RxBufSize=1522; RxNumBuffers = 32; RxServiceMax = 50; TxServiceMax=50; TxNumBuffers=32; CpcsUU=0x5aa5; TxVc_CellRate=0x3000; TxVc_AtmHeader=0x00000640]"
|
|
||||||
-#define SAR_PARM "id=sar,base = 0x03000000, reset_bit = 9, offset = 0; UniNni = 0, PdspEnable = 1"
|
|
||||||
+#define CH0_PARM "RxBufSize=1522, RxNumBuffers=32, RxServiceMax=50, TxServiceMax=50, TxNumBuffers=32, CpcsUU=0x5aa5, TxVc_CellRate=0x3000, TxVc_AtmHeader=0x00000640"
|
|
||||||
+#define AAL5_PARM "id=aal5, base=0x03000000, offset=0, int_line=15, ch0=[" CH0_PARM "]"
|
|
||||||
+#define SAR_PARM "id=sar, base=0x03000000, reset_bit=9, offset=0; UniNni=0, PdspEnable=1, Debug=0xFFFFFFFF"
|
|
||||||
#define RESET_PARM "id=ResetControl, base=0xA8611600"
|
|
||||||
-#define CH0_PARM "RxBufSize=1522, RxNumBuffers = 32, RxServiceMax = 50, TxServiceMax=50, TxNumBuffers=32, CpcsUU=0x5aa5, TxVc_CellRate=0x3000, TxVc_AtmHeader=0x00000640"
|
|
||||||
|
|
||||||
#define MAX_PVC_TABLE_ENTRY 16
|
|
||||||
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -5,6 +5,7 @@
|
|
||||||
CONFIG_SANGAM_ATM=m
|
|
||||||
#EXTRA_CFLAGS += -DEL -I. -DPOST_SILICON -DCOMMON_NSP -DCONFIG_LED_MODULE -DDEREGISTER_LED -DNO_ACT
|
|
||||||
#EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -DNO_ACT -D__NO__VOICE_PATCH__ -DEL
|
|
||||||
-EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -D__NO__VOICE_PATCH__ -DEL
|
|
||||||
+#EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -D__NO__VOICE_PATCH__ -DEL
|
|
||||||
+EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -D__NO__VOICE_PATCH__ -DEL -DCPATM_TASKLET_MODE
|
|
||||||
obj-$(CONFIG_SANGAM_ATM) := tiatm.o
|
|
||||||
tiatm-objs += cpsar.o aal5sar.o tn7sar.o tn7atm.o tn7dsl.o dsl_hal_api.o dsl_hal_support.o dsl_hal_advcfg.o
|
|
||||||
@ -1,589 +0,0 @@
|
|||||||
--- a/tn7atm.c
|
|
||||||
+++ b/tn7atm.c
|
|
||||||
@@ -87,6 +87,146 @@
|
|
||||||
MODULE_LICENSE("GPL");
|
|
||||||
MODULE_DESCRIPTION ("Tnetd73xx ATM Device Driver");
|
|
||||||
MODULE_AUTHOR ("Zhicheng Tang");
|
|
||||||
+
|
|
||||||
+int mp_sar_ipacemax = -1;
|
|
||||||
+module_param_named(ipacemax, mp_sar_ipacemax, int, 0);
|
|
||||||
+MODULE_PARM_DESC(ipacemax, "Interrupt pacing");
|
|
||||||
+
|
|
||||||
+char *mp_macc = NULL;
|
|
||||||
+module_param_named(macc, mp_macc, charp, 0);
|
|
||||||
+MODULE_PARM_DESC(macc, "MAC address");
|
|
||||||
+
|
|
||||||
+int mp_dsp_noboost = -1;
|
|
||||||
+module_param_named(dsp_noboost, mp_dsp_noboost, int, 0);
|
|
||||||
+MODULE_PARM_DESC(dsp_noboost, "Suppress DSP frequency boost");
|
|
||||||
+
|
|
||||||
+int mp_dsp_freq = -1;
|
|
||||||
+module_param_named(dsp_freq, mp_dsp_freq, int, 0);
|
|
||||||
+MODULE_PARM_DESC(dsp_freq, "Frequency to boost the DSP to");
|
|
||||||
+
|
|
||||||
+char *mp_featctl0 = NULL;
|
|
||||||
+module_param_named(featctl0, mp_featctl0, charp, 0);
|
|
||||||
+MODULE_PARM_DESC(featctl0, "DSL feature control 0");
|
|
||||||
+
|
|
||||||
+char *mp_featctl1 = NULL;
|
|
||||||
+module_param_named(featctl1, mp_featctl1, charp, 0);
|
|
||||||
+MODULE_PARM_DESC(featctl1, "DSL feature control 1");
|
|
||||||
+
|
|
||||||
+char *mp_phyctl0 = NULL;
|
|
||||||
+module_param_named(phyctl0, mp_phyctl0, charp, 0);
|
|
||||||
+MODULE_PARM_DESC(phyctl0, "DSL PHY control 0");
|
|
||||||
+
|
|
||||||
+char *mp_phyctl1 = NULL;
|
|
||||||
+module_param_named(phyctl1, mp_phyctl1, charp, 0);
|
|
||||||
+MODULE_PARM_DESC(phyctl1, "DSL PHY control 1");
|
|
||||||
+
|
|
||||||
+int mp_turbodsl = -1;
|
|
||||||
+module_param_named(turbodsl, mp_turbodsl, int, 0);
|
|
||||||
+MODULE_PARM_DESC(turbodsl, "Enable TurboDSL");
|
|
||||||
+
|
|
||||||
+int mp_sar_rxbuf = -1;
|
|
||||||
+module_param_named(sar_rxbuf, mp_sar_rxbuf, int, 0);
|
|
||||||
+MODULE_PARM_DESC(sar_rxbuf, "SAR RxBuf size");
|
|
||||||
+
|
|
||||||
+int mp_sar_rxmax = -1;
|
|
||||||
+module_param_named(sar_rxmax, mp_sar_rxmax, int, 0);
|
|
||||||
+MODULE_PARM_DESC(sar_rxmax, "SAR RxMax size");
|
|
||||||
+
|
|
||||||
+int mp_sar_txbuf = -1;
|
|
||||||
+module_param_named(sar_txbuf, mp_sar_txbuf, int, 0);
|
|
||||||
+MODULE_PARM_DESC(sar_txbuf, "SAR TxBuf size");
|
|
||||||
+
|
|
||||||
+int mp_sar_txmax = -1;
|
|
||||||
+module_param_named(sar_txmax, mp_sar_txmax, int, 0);
|
|
||||||
+MODULE_PARM_DESC(sar_txmax, "SAR TxMax size");
|
|
||||||
+
|
|
||||||
+char *mp_modulation = NULL;
|
|
||||||
+module_param_named(modulation, mp_modulation, charp, 0);
|
|
||||||
+MODULE_PARM_DESC(modulation, "Modulation");
|
|
||||||
+
|
|
||||||
+int mp_fine_gain_control = -1;
|
|
||||||
+module_param_named(fine_gain_control, mp_fine_gain_control, int, 0);
|
|
||||||
+MODULE_PARM_DESC(fine_gain_control, "Fine gain control");
|
|
||||||
+
|
|
||||||
+int mp_fine_gain_value = -1;
|
|
||||||
+module_param_named(fine_gain_value, mp_fine_gain_value, int, 0);
|
|
||||||
+MODULE_PARM_DESC(fine_gain_value, "Fine gain value");
|
|
||||||
+
|
|
||||||
+int mp_enable_margin_retrain = -1;
|
|
||||||
+module_param_named(enable_margin_retrain, mp_enable_margin_retrain, int, 0);
|
|
||||||
+MODULE_PARM_DESC(enable_margin_retrain, "Enable margin retrain");
|
|
||||||
+
|
|
||||||
+int mp_margin_threshold = -1;
|
|
||||||
+module_param_named(margin_threshold, mp_margin_threshold, int, 0);
|
|
||||||
+MODULE_PARM_DESC(margin_threshold, "Margin retrain treshold");
|
|
||||||
+
|
|
||||||
+int mp_enable_rate_adapt = -1;
|
|
||||||
+module_param_named(enable_rate_adapt, mp_enable_rate_adapt, int, 0);
|
|
||||||
+MODULE_PARM_DESC(enable_rate_adapt, "Enable rate adaption");
|
|
||||||
+
|
|
||||||
+int mp_powercutback = -1;
|
|
||||||
+module_param_named(powercutback, mp_powercutback, int, 0);
|
|
||||||
+MODULE_PARM_DESC(powercutback, "Enable / disable powercutback");
|
|
||||||
+
|
|
||||||
+int mp_trellis = -1;
|
|
||||||
+module_param_named(trellis, mp_trellis, int, 0);
|
|
||||||
+MODULE_PARM_DESC(trellis, "Enable / disable trellis coding");
|
|
||||||
+
|
|
||||||
+int mp_bitswap = -1;
|
|
||||||
+module_param_named(bitswap, mp_bitswap, int, 0);
|
|
||||||
+MODULE_PARM_DESC(bitswap, "Enable / disable bitswap");
|
|
||||||
+
|
|
||||||
+int mp_maximum_bits_per_carrier = -1;
|
|
||||||
+module_param_named(maximum_bits_per_carrier, mp_maximum_bits_per_carrier, int, 0);
|
|
||||||
+MODULE_PARM_DESC(maximum_bits_per_carrier, "Maximum bits per carrier");
|
|
||||||
+
|
|
||||||
+int mp_maximum_interleave_depth = -1;
|
|
||||||
+module_param_named(maximum_interleave_depth, mp_maximum_interleave_depth, int, 0);
|
|
||||||
+MODULE_PARM_DESC(maximum_interleave_depth, "Maximum interleave depth");
|
|
||||||
+
|
|
||||||
+int mp_pair_selection = -1;
|
|
||||||
+module_param_named(pair_selection, mp_pair_selection, int, 0);
|
|
||||||
+MODULE_PARM_DESC(pair_selection, "Pair selection");
|
|
||||||
+
|
|
||||||
+int mp_dgas_polarity = -1;
|
|
||||||
+module_param_named(dgas_polarity, mp_dgas_polarity, int, 0);
|
|
||||||
+MODULE_PARM_DESC(dgas_polarity, "DGAS polarity");
|
|
||||||
+
|
|
||||||
+int mp_los_alarm = -1;
|
|
||||||
+module_param_named(los_alarm, mp_los_alarm, int, 0);
|
|
||||||
+MODULE_PARM_DESC(los_alarm, "LOS alarm");
|
|
||||||
+
|
|
||||||
+char *mp_eoc_vendor_id = NULL;
|
|
||||||
+module_param_named(eoc_vendor_id, mp_eoc_vendor_id, charp, 0);
|
|
||||||
+MODULE_PARM_DESC(eoc_vendor_id, "EOC vendor id");
|
|
||||||
+
|
|
||||||
+int mp_eoc_vendor_revision = -1;
|
|
||||||
+module_param_named(eoc_vendor_revision, mp_eoc_vendor_revision, int, 0);
|
|
||||||
+MODULE_PARM_DESC(eoc_vendor_revision, "EOC vendor revision");
|
|
||||||
+
|
|
||||||
+char *mp_eoc_vendor_serialnum = NULL;
|
|
||||||
+module_param_named(eoc_vendor_serialnum, mp_eoc_vendor_serialnum, charp, 0);
|
|
||||||
+MODULE_PARM_DESC(eoc_vendor_serialnum, "EOC vendor serial number");
|
|
||||||
+
|
|
||||||
+char *mp_invntry_vernum = NULL;
|
|
||||||
+module_param_named(invntry_vernum, mp_invntry_vernum, charp, 0);
|
|
||||||
+MODULE_PARM_DESC(invntry_vernum, "Inventory revision number");
|
|
||||||
+
|
|
||||||
+int mp_dsl_bit_tmode = -1;
|
|
||||||
+module_param_named(dsl_bit_tmode, mp_dsl_bit_tmode, int, 0);
|
|
||||||
+MODULE_PARM_DESC(dsl_bit_tmode, "DSL bit training mode");
|
|
||||||
+
|
|
||||||
+int mp_high_precision = -1;
|
|
||||||
+module_param_named(high_precision, mp_high_precision, int, 0);
|
|
||||||
+MODULE_PARM_DESC(high_precision, "High precision");
|
|
||||||
+
|
|
||||||
+int mp_autopvc_enable = -1;
|
|
||||||
+module_param_named(autopvc_enable, mp_autopvc_enable, int, 0);
|
|
||||||
+MODULE_PARM_DESC(autopvc_enable, "Enable / disable automatic PVC");
|
|
||||||
+
|
|
||||||
+int mp_oam_lb_timeout = -1;
|
|
||||||
+module_param_named(oam_lb_timeout, mp_oam_lb_timeout, int, 0);
|
|
||||||
+MODULE_PARM_DESC(oam_lb_timeout, "OAM LB timeout");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef TRUE
|
|
||||||
@@ -655,9 +795,9 @@ static int __init tn7atm_irq_request (st
|
|
||||||
* interrupt pacing
|
|
||||||
*/
|
|
||||||
ptr = prom_getenv ("sar_ipacemax");
|
|
||||||
- if (ptr)
|
|
||||||
+ if (ptr || mp_sar_ipacemax != -1)
|
|
||||||
{
|
|
||||||
- def_sar_inter_pace = os_atoi (ptr);
|
|
||||||
+ def_sar_inter_pace = mp_sar_ipacemax == -1 ? os_atoi (ptr) : mp_sar_ipacemax;
|
|
||||||
}
|
|
||||||
/* avalanche_request_pacing (priv->sar_irq, ATM_SAR_INT_PACING_BLOCK_NUM,
|
|
||||||
def_sar_inter_pace);*/
|
|
||||||
@@ -795,9 +935,18 @@ static int __init tn7atm_get_ESI (struct
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
char esi_addr[ESI_LEN] = { 0x00, 0x00, 0x11, 0x22, 0x33, 0x44 };
|
|
||||||
- char *esiaddr_str = NULL;
|
|
||||||
+ char *esiaddr_str = mp_macc;
|
|
||||||
|
|
||||||
- esiaddr_str = prom_getenv ("maca");
|
|
||||||
+ if (esiaddr_str == NULL)
|
|
||||||
+ esiaddr_str = prom_getenv ("macdsl");
|
|
||||||
+ if (esiaddr_str == NULL)
|
|
||||||
+ esiaddr_str = prom_getenv ("macc");
|
|
||||||
+ if (esiaddr_str == NULL)
|
|
||||||
+ esiaddr_str = prom_getenv ("HWA_1");
|
|
||||||
+ if (esiaddr_str == NULL)
|
|
||||||
+ esiaddr_str = prom_getenv ("macb");
|
|
||||||
+ if (esiaddr_str == NULL)
|
|
||||||
+ esiaddr_str = prom_getenv ("maca");
|
|
||||||
|
|
||||||
if (!esiaddr_str)
|
|
||||||
{
|
|
||||||
@@ -1930,15 +2079,15 @@ static int tn7atm_autoDetectDspBoost (vo
|
|
||||||
//UR8_MERGE_END CQ10450*
|
|
||||||
|
|
||||||
cp = prom_getenv ("dsp_noboost");
|
|
||||||
- if (cp)
|
|
||||||
+ if (cp || mp_dsp_noboost != -1)
|
|
||||||
{
|
|
||||||
- dsp_noboost = os_atoi (cp);
|
|
||||||
+ dsp_noboost = mp_dsp_noboost == -1 ? os_atoi (cp) : mp_dsp_noboost;
|
|
||||||
}
|
|
||||||
|
|
||||||
cp = (char *) prom_getenv ("dsp_freq");
|
|
||||||
- if (cp)
|
|
||||||
+ if (cp || mp_dsp_freq != -1)
|
|
||||||
{
|
|
||||||
- dspfreq = os_atoi (cp);
|
|
||||||
+ dspfreq = mp_dsp_freq == -1 ? os_atoi (cp) : mp_dsp_freq;
|
|
||||||
if (dspfreq == 250)
|
|
||||||
{
|
|
||||||
boostDsp = 1;
|
|
||||||
@@ -2187,8 +2336,9 @@ static int __init tn7atm_init (struct at
|
|
||||||
// Inter-Op DSL phy Control
|
|
||||||
// Note the setting of _dsl_Feature_0 and _dsl_Feature_1 must before
|
|
||||||
// dslhal_api_dslStartup (in tn7dsl_init()).
|
|
||||||
- if ((ptr = prom_getenv ("DSL_FEATURE_CNTL_0")) != NULL)
|
|
||||||
+ if ((ptr = prom_getenv ("DSL_FEATURE_CNTL_0")) != NULL || mp_featctl0 != NULL)
|
|
||||||
{
|
|
||||||
+ if (mp_featctl0 != NULL) ptr = mp_featctl0;
|
|
||||||
if ((ptr[0] == '0') && (ptr[1] == 'x')) // skip 0x before pass to
|
|
||||||
// os_atoh
|
|
||||||
ptr += 2;
|
|
||||||
@@ -2196,8 +2346,9 @@ static int __init tn7atm_init (struct at
|
|
||||||
_dsl_Feature_0_defined = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if ((ptr = prom_getenv ("DSL_FEATURE_CNTL_1")) != NULL)
|
|
||||||
+ if ((ptr = prom_getenv ("DSL_FEATURE_CNTL_1")) != NULL || mp_featctl1 != NULL)
|
|
||||||
{
|
|
||||||
+ if (mp_featctl1 != NULL) ptr = mp_featctl1;
|
|
||||||
if ((ptr[0] == '0') && (ptr[1] == 'x')) // skip 0x before pass to
|
|
||||||
// os_atoh
|
|
||||||
ptr += 2;
|
|
||||||
@@ -2209,8 +2360,9 @@ static int __init tn7atm_init (struct at
|
|
||||||
// DSL phy Feature Control
|
|
||||||
// Note the setting of _dsl_PhyControl_0 and _dsl_PhyControl_1 must before
|
|
||||||
// dslhal_api_dslStartup (in tn7dsl_init()).
|
|
||||||
- if ((ptr = prom_getenv ("DSL_PHY_CNTL_0")) != NULL)
|
|
||||||
+ if ((ptr = prom_getenv ("DSL_PHY_CNTL_0")) != NULL || mp_phyctl0 != NULL)
|
|
||||||
{
|
|
||||||
+ if (mp_phyctl0 != NULL) ptr = mp_phyctl0;
|
|
||||||
if ((ptr[0] == '0') && (ptr[1] == 'x')) // skip 0x before pass to
|
|
||||||
// os_atoh
|
|
||||||
ptr += 2;
|
|
||||||
@@ -2218,8 +2370,9 @@ static int __init tn7atm_init (struct at
|
|
||||||
_dsl_PhyControl_0_defined = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if ((ptr = prom_getenv ("DSL_PHY_CNTL_1")) != NULL)
|
|
||||||
+ if ((ptr = prom_getenv ("DSL_PHY_CNTL_1")) != NULL || mp_phyctl1 != NULL)
|
|
||||||
{
|
|
||||||
+ if (mp_phyctl1 != NULL) ptr = mp_phyctl1;
|
|
||||||
if ((ptr[0] == '0') && (ptr[1] == 'x')) // skip 0x before pass to
|
|
||||||
// os_atoh
|
|
||||||
ptr += 2;
|
|
||||||
@@ -2247,9 +2400,9 @@ static int __init tn7atm_init (struct at
|
|
||||||
priv->bTurboDsl = 1;
|
|
||||||
// read config for turbo dsl
|
|
||||||
ptr = prom_getenv ("TurboDSL");
|
|
||||||
- if (ptr)
|
|
||||||
+ if (ptr || mp_turbodsl != -1)
|
|
||||||
{
|
|
||||||
- priv->bTurboDsl = os_atoi (ptr);
|
|
||||||
+ priv->bTurboDsl = mp_turbodsl == -1 ? os_atoi (ptr) : mp_turbodsl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Added to make Rx buffer number & Service max configurable through
|
|
||||||
@@ -2257,30 +2410,30 @@ static int __init tn7atm_init (struct at
|
|
||||||
priv->sarRxBuf = RX_BUFFER_NUM;
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv ("SarRxBuf");
|
|
||||||
- if (ptr)
|
|
||||||
+ if (ptr || mp_sar_rxbuf != -1)
|
|
||||||
{
|
|
||||||
- priv->sarRxBuf = os_atoi (ptr);
|
|
||||||
+ priv->sarRxBuf = mp_sar_rxbuf == -1 ? os_atoi (ptr) : mp_sar_rxbuf;
|
|
||||||
}
|
|
||||||
priv->sarRxMax = RX_SERVICE_MAX;
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv ("SarRxMax");
|
|
||||||
- if (ptr)
|
|
||||||
+ if (ptr || mp_sar_rxmax != -1)
|
|
||||||
{
|
|
||||||
- priv->sarRxMax = os_atoi (ptr);
|
|
||||||
+ priv->sarRxMax = mp_sar_rxmax == -1 ? os_atoi (ptr) : mp_sar_rxmax;
|
|
||||||
}
|
|
||||||
priv->sarTxBuf = TX_BUFFER_NUM;
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv ("SarTxBuf");
|
|
||||||
- if (ptr)
|
|
||||||
+ if (ptr || mp_sar_txbuf != -1)
|
|
||||||
{
|
|
||||||
- priv->sarTxBuf = os_atoi (ptr);
|
|
||||||
+ priv->sarTxBuf = mp_sar_txbuf == -1 ? os_atoi (ptr) : mp_sar_txbuf;
|
|
||||||
}
|
|
||||||
priv->sarTxMax = TX_SERVICE_MAX;
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv ("SarTxMax");
|
|
||||||
- if (ptr)
|
|
||||||
+ if (ptr || mp_sar_txmax != -1)
|
|
||||||
{
|
|
||||||
- priv->sarTxMax = os_atoi (ptr);
|
|
||||||
+ priv->sarTxMax = mp_sar_txmax == -1 ? os_atoi (ptr) : mp_sar_txmax;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -136,6 +136,27 @@
|
|
||||||
#define NEW_TRAINING_VAL_T1413 128
|
|
||||||
#define NEW_TRAINING_VAL_MMODE 255
|
|
||||||
|
|
||||||
+extern char *mp_modulation;
|
|
||||||
+extern int mp_fine_gain_control;
|
|
||||||
+extern int mp_fine_gain_value;
|
|
||||||
+extern int mp_enable_margin_retrain;
|
|
||||||
+extern int mp_margin_threshold;
|
|
||||||
+extern int mp_enable_rate_adapt;
|
|
||||||
+extern int mp_powercutback;
|
|
||||||
+extern int mp_trellis;
|
|
||||||
+extern int mp_bitswap;
|
|
||||||
+extern int mp_maximum_bits_per_carrier;
|
|
||||||
+extern int mp_maximum_interleave_depth;
|
|
||||||
+extern int mp_pair_selection;
|
|
||||||
+extern int mp_dgas_polarity;
|
|
||||||
+extern int mp_los_alarm;
|
|
||||||
+extern char *mp_eoc_vendor_id;
|
|
||||||
+extern int mp_eoc_vendor_revision;
|
|
||||||
+extern char *mp_eoc_vendor_serialnum;
|
|
||||||
+extern char *mp_invntry_vernum;
|
|
||||||
+extern int mp_dsl_bit_tmode;
|
|
||||||
+extern int mp_high_precision;
|
|
||||||
+
|
|
||||||
int testflag1 = 0;
|
|
||||||
extern int __guDbgLevel;
|
|
||||||
extern sar_stat_t sarStat;
|
|
||||||
@@ -2818,84 +2839,80 @@ static int tn7dsl_set_dsl(void)
|
|
||||||
|
|
||||||
// modulation
|
|
||||||
ptr = prom_getenv("modulation");
|
|
||||||
- if (ptr)
|
|
||||||
+ if (ptr || mp_modulation != NULL)
|
|
||||||
{
|
|
||||||
- tn7dsl_set_modulation(ptr, FALSE);
|
|
||||||
+ tn7dsl_set_modulation(mp_modulation == NULL ? ptr : mp_modulation, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fine Gains
|
|
||||||
ptr = prom_getenv("fine_gain_control");
|
|
||||||
- if (ptr)
|
|
||||||
+ if (ptr || mp_fine_gain_control != -1)
|
|
||||||
{
|
|
||||||
- value = os_atoi(ptr);
|
|
||||||
+ value = mp_fine_gain_control == -1 ? os_atoi(ptr) : mp_fine_gain_control;
|
|
||||||
tn7dsl_ctrl_fineGain(value);
|
|
||||||
}
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("fine_gain_value");
|
|
||||||
- if(ptr)
|
|
||||||
- tn7dsl_set_fineGainValue(os_atoh(ptr));
|
|
||||||
+ if(ptr || mp_fine_gain_value != -1)
|
|
||||||
+ tn7dsl_set_fineGainValue(mp_fine_gain_value == -1 ? os_atoh(ptr) : mp_fine_gain_value);
|
|
||||||
|
|
||||||
// margin retrain
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("enable_margin_retrain");
|
|
||||||
- if(ptr)
|
|
||||||
+ value = mp_enable_margin_retrain == -1 ? (ptr ? os_atoi(ptr) : 0) : mp_enable_margin_retrain;
|
|
||||||
+
|
|
||||||
+ if (value == 1)
|
|
||||||
{
|
|
||||||
- value = os_atoi(ptr);
|
|
||||||
- if(value == 1)
|
|
||||||
+ dslhal_api_setMarginMonitorFlags(pIhw, 0, 1);
|
|
||||||
+ bMarginRetrainEnable = 1;
|
|
||||||
+ //printk("enable showtime margin monitor.\n");
|
|
||||||
+
|
|
||||||
+ ptr = NULL;
|
|
||||||
+ ptr = prom_getenv("margin_threshold");
|
|
||||||
+ value = mp_margin_threshold == -1 ? (ptr ? os_atoi(ptr) : 0) : mp_margin_threshold;
|
|
||||||
+
|
|
||||||
+ if(value >= 0)
|
|
||||||
{
|
|
||||||
- dslhal_api_setMarginMonitorFlags(pIhw, 0, 1);
|
|
||||||
- bMarginRetrainEnable = 1;
|
|
||||||
- //printk("enable showtime margin monitor.\n");
|
|
||||||
- ptr = NULL;
|
|
||||||
- ptr = prom_getenv("margin_threshold");
|
|
||||||
- if(ptr)
|
|
||||||
- {
|
|
||||||
- value = os_atoi(ptr);
|
|
||||||
- //printk("Set margin threshold to %d x 0.5 db\n",value);
|
|
||||||
- if(value >= 0)
|
|
||||||
- {
|
|
||||||
- dslhal_api_setMarginThreshold(pIhw, value);
|
|
||||||
- bMarginThConfig=1;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ dslhal_api_setMarginThreshold(pIhw, value);
|
|
||||||
+ bMarginThConfig=1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// rate adapt
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("enable_rate_adapt");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_enable_rate_adapt != -1)
|
|
||||||
{
|
|
||||||
- dslhal_api_setRateAdaptFlag(pIhw, os_atoi(ptr));
|
|
||||||
+ dslhal_api_setRateAdaptFlag(pIhw, mp_enable_rate_adapt == -1 ? os_atoi(ptr) : mp_enable_rate_adapt);
|
|
||||||
}
|
|
||||||
|
|
||||||
// set powercutback
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("powercutback");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_powercutback != -1)
|
|
||||||
{
|
|
||||||
- dslhal_advcfg_onOffPcb(pIhw, os_atoi(ptr));
|
|
||||||
+ dslhal_advcfg_onOffPcb(pIhw, mp_powercutback == -1 ? os_atoi(ptr) : mp_powercutback);
|
|
||||||
}
|
|
||||||
|
|
||||||
// trellis
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("trellis");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_trellis != -1)
|
|
||||||
{
|
|
||||||
- dslhal_api_setTrellisFlag(pIhw, os_atoi(ptr));
|
|
||||||
- trellis = os_atoi(ptr);
|
|
||||||
+ trellis = mp_trellis == -1 ? os_atoi(ptr) : mp_trellis;
|
|
||||||
+ dslhal_api_setTrellisFlag(pIhw, trellis);
|
|
||||||
//printk("trellis=%d\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
// bitswap
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("bitswap");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_bitswap != -1)
|
|
||||||
{
|
|
||||||
int offset[2] = {33, 0};
|
|
||||||
unsigned int bitswap;
|
|
||||||
|
|
||||||
- bitswap = os_atoi(ptr);
|
|
||||||
+ bitswap = mp_bitswap == -1 ? os_atoi(ptr) : mp_bitswap;
|
|
||||||
|
|
||||||
tn7dsl_generic_read(2, offset);
|
|
||||||
dslReg &= dslhal_support_byteSwap32(0xFFFFFF00);
|
|
||||||
@@ -2913,46 +2930,47 @@ static int tn7dsl_set_dsl(void)
|
|
||||||
// maximum bits per carrier
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("maximum_bits_per_carrier");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_maximum_bits_per_carrier != -1)
|
|
||||||
{
|
|
||||||
- dslhal_api_setMaxBitsPerCarrierUpstream(pIhw, os_atoi(ptr));
|
|
||||||
+ dslhal_api_setMaxBitsPerCarrierUpstream(pIhw, mp_maximum_bits_per_carrier == -1 ? os_atoi(ptr) : mp_maximum_bits_per_carrier);
|
|
||||||
}
|
|
||||||
|
|
||||||
// maximum interleave depth
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("maximum_interleave_depth");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_maximum_interleave_depth != -1)
|
|
||||||
{
|
|
||||||
- dslhal_api_setMaxInterleaverDepth(pIhw, os_atoi(ptr));
|
|
||||||
+ dslhal_api_setMaxInterleaverDepth(pIhw, mp_maximum_interleave_depth == -1 ? os_atoi(ptr) : mp_maximum_interleave_depth);
|
|
||||||
}
|
|
||||||
|
|
||||||
// inner and outer pairs
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("pair_selection");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_pair_selection != -1)
|
|
||||||
{
|
|
||||||
- dslhal_api_selectInnerOuterPair(pIhw, os_atoi(ptr));
|
|
||||||
+ dslhal_api_selectInnerOuterPair(pIhw, mp_pair_selection == -1 ? os_atoi(ptr) : mp_pair_selection);
|
|
||||||
}
|
|
||||||
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("dgas_polarity");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_dgas_polarity != -1)
|
|
||||||
{
|
|
||||||
dslhal_api_configureDgaspLpr(pIhw, 1, 1);
|
|
||||||
- dslhal_api_configureDgaspLpr(pIhw, 0, os_atoi(ptr));
|
|
||||||
+ dslhal_api_configureDgaspLpr(pIhw, 0, mp_dgas_polarity == -1 ? os_atoi(ptr) : mp_dgas_polarity);
|
|
||||||
}
|
|
||||||
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("los_alarm");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_los_alarm != -1)
|
|
||||||
{
|
|
||||||
- dslhal_api_disableLosAlarm(pIhw, os_atoi(ptr));
|
|
||||||
+ dslhal_api_disableLosAlarm(pIhw, mp_los_alarm == -1 ? os_atoi(ptr) : mp_los_alarm);
|
|
||||||
}
|
|
||||||
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("eoc_vendor_id");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_eoc_vendor_id != NULL)
|
|
||||||
{
|
|
||||||
+ ptr = mp_eoc_vendor_id == NULL ? ptr : mp_eoc_vendor_id;
|
|
||||||
for(i=0;i<8;i++)
|
|
||||||
{
|
|
||||||
tmp[0]=ptr[i*2];
|
|
||||||
@@ -2977,26 +2995,26 @@ static int tn7dsl_set_dsl(void)
|
|
||||||
}
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("eoc_vendor_revision");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_eoc_vendor_revision != -1)
|
|
||||||
{
|
|
||||||
- value = os_atoi(ptr);
|
|
||||||
+ value = mp_eoc_vendor_revision == -1 ? os_atoi(ptr) : mp_eoc_vendor_revision;
|
|
||||||
//printk("eoc rev=%d\n", os_atoi(ptr));
|
|
||||||
dslhal_api_setEocRevisionNumber(pIhw, (char *)&value);
|
|
||||||
|
|
||||||
}
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("eoc_vendor_serialnum");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_eoc_vendor_serialnum != NULL)
|
|
||||||
{
|
|
||||||
- dslhal_api_setEocSerialNumber(pIhw, ptr);
|
|
||||||
+ dslhal_api_setEocSerialNumber(pIhw, mp_eoc_vendor_serialnum == NULL ? ptr : mp_eoc_vendor_serialnum);
|
|
||||||
}
|
|
||||||
|
|
||||||
// CQ10037 Added invntry_vernum environment variable to be able to set version number in ADSL2, ADSL2+ modes.
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("invntry_vernum");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_invntry_vernum != NULL)
|
|
||||||
{
|
|
||||||
- dslhal_api_setEocRevisionNumber(pIhw, ptr);
|
|
||||||
+ dslhal_api_setEocRevisionNumber(pIhw, mp_invntry_vernum == NULL ? ptr : mp_invntry_vernum);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
@@ -3041,7 +3059,7 @@ int tn7dsl_init(void *priv)
|
|
||||||
* backward compatibility.
|
|
||||||
*/
|
|
||||||
cp = prom_getenv("DSL_BIT_TMODE");
|
|
||||||
- if (cp)
|
|
||||||
+ if (cp || mp_dsl_bit_tmode != -1)
|
|
||||||
{
|
|
||||||
printk("%s : env var DSL_BIT_TMODE is set\n", __FUNCTION__);
|
|
||||||
/*
|
|
||||||
@@ -3070,9 +3088,9 @@ int tn7dsl_init(void *priv)
|
|
||||||
|
|
||||||
// UR8_MERGE_START CQ11054 Jack Zhang
|
|
||||||
cp = prom_getenv("high_precision");
|
|
||||||
- if (cp)
|
|
||||||
+ if (cp || mp_high_precision != -1)
|
|
||||||
{
|
|
||||||
- high_precision_selected = os_atoi(cp);
|
|
||||||
+ high_precision_selected = mp_high_precision == -1 ? os_atoi(cp) : mp_high_precision;
|
|
||||||
}
|
|
||||||
if ( high_precision_selected)
|
|
||||||
{
|
|
||||||
--- a/tn7sar.c
|
|
||||||
+++ b/tn7sar.c
|
|
||||||
@@ -74,6 +74,8 @@ typedef void OS_SETUP;
|
|
||||||
/* PDSP Firmware files */
|
|
||||||
#include "tnetd7300_sar_firm.h"
|
|
||||||
|
|
||||||
+extern int mp_oam_lb_timeout;
|
|
||||||
+extern int mp_autopvc_enable;
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
@@ -817,9 +819,9 @@ int tn7sar_setup_oam_channel(Tn7AtmPriva
|
|
||||||
pHalDev = (HAL_DEVICE *)priv->pSarHalDev;
|
|
||||||
|
|
||||||
pauto_pvc = prom_getenv("autopvc_enable");
|
|
||||||
- if(pauto_pvc) //CQ10273
|
|
||||||
+ if(pauto_pvc || mp_autopvc_enable != -1) //CQ10273
|
|
||||||
{
|
|
||||||
- auto_pvc =tn7sar_strtoul(pauto_pvc, NULL, 10);
|
|
||||||
+ auto_pvc = mp_autopvc_enable == -1 ? tn7sar_strtoul(pauto_pvc, NULL, 10) : mp_autopvc_enable;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(&chInfo, 0xff, sizeof(chInfo));
|
|
||||||
@@ -985,9 +987,9 @@ int tn7sar_init(struct atm_dev *dev, Tn7
|
|
||||||
|
|
||||||
/* read in oam lb timeout value */
|
|
||||||
pLbTimeout = prom_getenv("oam_lb_timeout");
|
|
||||||
- if(pLbTimeout)
|
|
||||||
+ if(pLbTimeout || mp_oam_lb_timeout != -1)
|
|
||||||
{
|
|
||||||
- lbTimeout =tn7sar_strtoul(pLbTimeout, NULL, 10);
|
|
||||||
+ lbTimeout = mp_oam_lb_timeout == -1 ? tn7sar_strtoul(pLbTimeout, NULL, 10) : mp_oam_lb_timeout;
|
|
||||||
oamLbTimeout = lbTimeout;
|
|
||||||
pHalFunc->Control(pHalDev,"OamLbTimeout", "Set", &lbTimeout);
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -446,7 +446,6 @@ static void avsar_release(struct device
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct device avsar = {
|
|
||||||
- .bus_id = "vlynq",
|
|
||||||
.release = avsar_release,
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -455,6 +454,8 @@ int shim_osLoadFWImage(unsigned char *pt
|
|
||||||
const struct firmware *fw_entry;
|
|
||||||
size_t size;
|
|
||||||
|
|
||||||
+ dev_set_name(&avsar, "avsar");
|
|
||||||
+
|
|
||||||
printk("requesting firmware image \"ar0700xx.bin\"\n");
|
|
||||||
if(device_register(&avsar) < 0) {
|
|
||||||
printk(KERN_ERR
|
|
||||||
@ -1,39 +0,0 @@
|
|||||||
--- a/tn7atm.c
|
|
||||||
+++ b/tn7atm.c
|
|
||||||
@@ -73,8 +73,8 @@
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
|
|
||||||
#include <asm/io.h>
|
|
||||||
-#include <asm/ar7/ar7.h>
|
|
||||||
-#include <asm/ar7/prom.h>
|
|
||||||
+#include <asm/mach-ar7/ar7.h>
|
|
||||||
+#include <asm/mach-ar7/prom.h>
|
|
||||||
|
|
||||||
#include "dsl_hal_api.h"
|
|
||||||
#include "tn7atm.h"
|
|
||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -111,8 +111,8 @@
|
|
||||||
#include <linux/firmware.h>
|
|
||||||
|
|
||||||
#include <asm/io.h>
|
|
||||||
-#include <asm/ar7/ar7.h>
|
|
||||||
-#include <asm/ar7/prom.h>
|
|
||||||
+#include <asm/mach-ar7/ar7.h>
|
|
||||||
+#include <asm/mach-ar7/prom.h>
|
|
||||||
|
|
||||||
/* Modules specific header files */
|
|
||||||
#include "tn7atm.h"
|
|
||||||
--- a/tn7sar.c
|
|
||||||
+++ b/tn7sar.c
|
|
||||||
@@ -54,8 +54,8 @@
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
|
|
||||||
#include <asm/io.h>
|
|
||||||
-#include <asm/ar7/ar7.h>
|
|
||||||
-#include <asm/ar7/prom.h>
|
|
||||||
+#include <asm/mach-ar7/ar7.h>
|
|
||||||
+#include <asm/mach-ar7/prom.h>
|
|
||||||
|
|
||||||
#define _CPHAL_AAL5
|
|
||||||
#define _CPHAL_SAR
|
|
||||||
@ -1,92 +0,0 @@
|
|||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -197,7 +197,7 @@ led_reg_t ledreg[2];
|
|
||||||
static struct led_funcs ledreg[2];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#define DEV_DSLMOD CTL_UNNUMBERED
|
|
||||||
+#define DEV_DSLMOD 0
|
|
||||||
#define MAX_STR_SIZE 256
|
|
||||||
#define DSL_MOD_SIZE 256
|
|
||||||
|
|
||||||
@@ -333,8 +333,8 @@ static void tn7dsl_chng_modulation(void*
|
|
||||||
static unsigned int tn7dsl_set_modulation(void* data, int flag);
|
|
||||||
static void tn7dsl_ctrl_fineGain(int value);
|
|
||||||
static void tn7dsl_set_fineGainValue(int value);
|
|
||||||
-static int dslmod_sysctl (ctl_table * ctl, int write, struct file *filp,
|
|
||||||
- void *buffer, size_t * lenp);
|
|
||||||
+static int dslmod_sysctl (ctl_table * ctl, int write, void *buffer,
|
|
||||||
+ size_t * lenp, loff_t *ppos);
|
|
||||||
static void tn7dsl_register_dslss_led(void);
|
|
||||||
void tn7dsl_dslmod_sysctl_register(void);
|
|
||||||
void tn7dsl_dslmod_sysctl_unregister(void);
|
|
||||||
@@ -3398,8 +3398,8 @@ unsigned int tn7dsl_get_memory(unsigned
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-static int dslmod_sysctl(ctl_table *ctl, int write, struct file * filp,
|
|
||||||
- void *buffer, size_t *lenp)
|
|
||||||
+static int dslmod_sysctl(ctl_table *ctl, int write, void *buffer,
|
|
||||||
+ size_t *lenp, loff_t *ppos)
|
|
||||||
{
|
|
||||||
char *ptr;
|
|
||||||
int ret, len = 0;
|
|
||||||
@@ -3411,7 +3411,7 @@ static int dslmod_sysctl(ctl_table *ctl,
|
|
||||||
char mod_req[16] = { '\t' };
|
|
||||||
char fst_byt;
|
|
||||||
|
|
||||||
- if (!*lenp || (filp->f_pos && !write))
|
|
||||||
+ if (!*lenp || (*ppos && !write))
|
|
||||||
{
|
|
||||||
*lenp = 0;
|
|
||||||
return 0;
|
|
||||||
@@ -3421,9 +3421,9 @@ static int dslmod_sysctl(ctl_table *ctl,
|
|
||||||
*/
|
|
||||||
if(write)
|
|
||||||
{
|
|
||||||
- ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
|
|
||||||
+ ret = proc_dostring(ctl, write, buffer, lenp, ppos);
|
|
||||||
|
|
||||||
- switch (ctl->ctl_name)
|
|
||||||
+ switch ((long)ctl->extra2)
|
|
||||||
{
|
|
||||||
case DEV_DSLMOD:
|
|
||||||
ptr = strpbrk(info, " \t");
|
|
||||||
@@ -3507,14 +3507,21 @@ static int dslmod_sysctl(ctl_table *ctl,
|
|
||||||
else
|
|
||||||
{
|
|
||||||
len += sprintf(info+len, mod_req);
|
|
||||||
- ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
|
|
||||||
+ ret = proc_dostring(ctl, write, buffer, lenp, ppos);
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ctl_table dslmod_table[] = {
|
|
||||||
- {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, &sysctl_string}
|
|
||||||
+ {
|
|
||||||
+ .procname = "dslmod",
|
|
||||||
+ .data = info,
|
|
||||||
+ .maxlen = DSL_MOD_SIZE,
|
|
||||||
+ .mode = 0644,
|
|
||||||
+ .proc_handler = &dslmod_sysctl,
|
|
||||||
+ .extra2 = (void *)DEV_DSLMOD,
|
|
||||||
+ }
|
|
||||||
,
|
|
||||||
{0}
|
|
||||||
};
|
|
||||||
@@ -3522,7 +3529,12 @@ ctl_table dslmod_table[] = {
|
|
||||||
/* Make sure that /proc/sys/dev is there */
|
|
||||||
ctl_table dslmod_root_table[] = {
|
|
||||||
#ifdef CONFIG_PROC_FS
|
|
||||||
- {CTL_DEV, "dev", NULL, 0, 0555, dslmod_table}
|
|
||||||
+ {
|
|
||||||
+ .procname = "dev",
|
|
||||||
+ .maxlen = 0,
|
|
||||||
+ .mode = 0555,
|
|
||||||
+ .child = dslmod_table,
|
|
||||||
+ }
|
|
||||||
,
|
|
||||||
#endif /* CONFIG_PROC_FS */
|
|
||||||
{0}
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
--- a/tn7atm.c
|
|
||||||
+++ b/tn7atm.c
|
|
||||||
@@ -1870,7 +1870,7 @@ static int __init tn7atm_register (Tn7At
|
|
||||||
|
|
||||||
dgprintf (4, "device %s being registered\n", priv->name);
|
|
||||||
|
|
||||||
- mydev = atm_dev_register (priv->proc_name, &tn7atm_ops, -1, NULL);
|
|
||||||
+ mydev = atm_dev_register (priv->proc_name, NULL, &tn7atm_ops, -1, NULL);
|
|
||||||
|
|
||||||
if (mydev == NULL)
|
|
||||||
{
|
|
||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -453,13 +453,16 @@ int shim_osLoadFWImage(unsigned char *pt
|
|
||||||
{
|
|
||||||
const struct firmware *fw_entry;
|
|
||||||
size_t size;
|
|
||||||
+ int ret;
|
|
||||||
|
|
||||||
dev_set_name(&avsar, "avsar");
|
|
||||||
|
|
||||||
printk("requesting firmware image \"ar0700xx.bin\"\n");
|
|
||||||
- if(device_register(&avsar) < 0) {
|
|
||||||
+ dev_set_name(&avsar, "avsar");
|
|
||||||
+ ret = device_register(&avsar);
|
|
||||||
+ if (ret < 0) {
|
|
||||||
printk(KERN_ERR
|
|
||||||
- "avsar: device_register fails\n");
|
|
||||||
+ "avsar: device_register fails, error%i\n", ret);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
--- a/tn7atm.c
|
|
||||||
+++ b/tn7atm.c
|
|
||||||
@@ -67,7 +67,7 @@
|
|
||||||
#include <linux/atmdev.h>
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/spinlock.h>
|
|
||||||
-#include <linux/smp_lock.h>
|
|
||||||
+#include <linux/interrupt.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/string.h>
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
--- a/tn7sar.c
|
|
||||||
+++ b/tn7sar.c
|
|
||||||
@@ -48,7 +48,7 @@
|
|
||||||
#include <linux/atmdev.h>
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/spinlock.h>
|
|
||||||
-#include <linux/smp_lock.h>
|
|
||||||
+#include <linux/interrupt.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/string.h>
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -100,7 +100,7 @@
|
|
||||||
#include <linux/atmdev.h>
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/spinlock.h>
|
|
||||||
-#include <linux/smp_lock.h>
|
|
||||||
+#include <linux/interrupt.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/string.h>
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,44 +0,0 @@
|
|||||||
--- a/cp_sar_reg.h
|
|
||||||
+++ b/cp_sar_reg.h
|
|
||||||
@@ -214,4 +214,4 @@
|
|
||||||
|
|
||||||
/* END OF FILE */
|
|
||||||
|
|
||||||
-#endif _INC_SAR_REG
|
|
||||||
+#endif
|
|
||||||
--- a/tn7api.h
|
|
||||||
+++ b/tn7api.h
|
|
||||||
@@ -172,4 +172,4 @@ void tn7sar_get_sar_firmware_version(uns
|
|
||||||
extern struct file_operations tn7sar_proc_oam_ping_fops;
|
|
||||||
extern struct file_operations tn7sar_proc_pvc_table_fops;
|
|
||||||
int tn7sar_tx_flush(void *privContext, int chan, int queue, int skip);
|
|
||||||
-#endif __SGAPI_H
|
|
||||||
+#endif
|
|
||||||
--- a/tn7atm.h
|
|
||||||
+++ b/tn7atm.h
|
|
||||||
@@ -276,4 +276,4 @@ typedef struct
|
|
||||||
#define PHYS_TO_K1(X) (PHYS_ADDR(X)|K1BASE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#endif __TN7ATM_H
|
|
||||||
+#endif
|
|
||||||
--- a/dsl_hal_api.h
|
|
||||||
+++ b/dsl_hal_api.h
|
|
||||||
@@ -2448,7 +2448,7 @@ unsigned int dslhal_api_getHLINpsds(tids
|
|
||||||
*
|
|
||||||
********************************************************************************************/
|
|
||||||
|
|
||||||
-unsigned int dslhal_api_getHighPrecision();
|
|
||||||
+unsigned int dslhal_api_getHighPrecision(void);
|
|
||||||
|
|
||||||
/********************************************************************************************
|
|
||||||
* FUNCTION NAME: void dslhal_api_setHighPrecision
|
|
||||||
@@ -2459,7 +2459,7 @@ unsigned int dslhal_api_getHighPrecision
|
|
||||||
* Return: None
|
|
||||||
********************************************************************************************/
|
|
||||||
|
|
||||||
-void dslhal_api_setHighPrecision();
|
|
||||||
+void dslhal_api_setHighPrecision(void);
|
|
||||||
// UR8_MERGE_END CQ11054*
|
|
||||||
|
|
||||||
#ifdef INTERNAL_BUILD
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -333,7 +333,7 @@ static void tn7dsl_chng_modulation(void*
|
|
||||||
static unsigned int tn7dsl_set_modulation(void* data, int flag);
|
|
||||||
static void tn7dsl_ctrl_fineGain(int value);
|
|
||||||
static void tn7dsl_set_fineGainValue(int value);
|
|
||||||
-static int dslmod_sysctl (ctl_table * ctl, int write, void *buffer,
|
|
||||||
+static int dslmod_sysctl (struct ctl_table * ctl, int write, void *buffer,
|
|
||||||
size_t * lenp, loff_t *ppos);
|
|
||||||
static void tn7dsl_register_dslss_led(void);
|
|
||||||
void tn7dsl_dslmod_sysctl_register(void);
|
|
||||||
@@ -3308,7 +3308,7 @@ unsigned int tn7dsl_get_memory(unsigned
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-static int dslmod_sysctl(ctl_table *ctl, int write, void *buffer,
|
|
||||||
+static int dslmod_sysctl(struct ctl_table *ctl, int write, void *buffer,
|
|
||||||
size_t *lenp, loff_t *ppos)
|
|
||||||
{
|
|
||||||
char *ptr;
|
|
||||||
@@ -3423,7 +3423,7 @@ static int dslmod_sysctl(ctl_table *ctl,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
-ctl_table dslmod_table[] = {
|
|
||||||
+struct ctl_table dslmod_table[] = {
|
|
||||||
{
|
|
||||||
.procname = "dslmod",
|
|
||||||
.data = info,
|
|
||||||
@@ -3437,7 +3437,7 @@ ctl_table dslmod_table[] = {
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Make sure that /proc/sys/dev is there */
|
|
||||||
-ctl_table dslmod_root_table[] = {
|
|
||||||
+struct ctl_table dslmod_root_table[] = {
|
|
||||||
#ifdef CONFIG_PROC_FS
|
|
||||||
{
|
|
||||||
.procname = "dev",
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
--- a/tn7atm.c
|
|
||||||
+++ b/tn7atm.c
|
|
||||||
@@ -777,7 +777,7 @@ static int __init tn7atm_irq_request (st
|
|
||||||
* Register SAR interrupt
|
|
||||||
*/
|
|
||||||
priv->sar_irq = LNXINTNUM (ATM_SAR_INT); /* Interrupt line # */
|
|
||||||
- if (request_irq (priv->sar_irq, tn7atm_sar_irq, IRQF_DISABLED, "SAR ", dev))
|
|
||||||
+ if (request_irq (priv->sar_irq, tn7atm_sar_irq, 0, "SAR ", dev))
|
|
||||||
printk ("Could not register tn7atm_sar_irq\n");
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -795,7 +795,7 @@ static int __init tn7atm_irq_request (st
|
|
||||||
* Reigster Receive interrupt A
|
|
||||||
*/
|
|
||||||
priv->dsl_irq = LNXINTNUM (ATM_DSL_INT); /* Interrupt line # */
|
|
||||||
- if (request_irq (priv->dsl_irq, tn7atm_dsl_irq, IRQF_DISABLED, "DSL ", dev))
|
|
||||||
+ if (request_irq (priv->dsl_irq, tn7atm_dsl_irq, 0, "DSL ", dev))
|
|
||||||
printk ("Could not register tn7atm_dsl_irq\n");
|
|
||||||
|
|
||||||
/***** VRB Tasklet Mode ****/
|
|
||||||
@ -1,63 +0,0 @@
|
|||||||
--- a/cpswhal_cpsar.h
|
|
||||||
+++ b/cpswhal_cpsar.h
|
|
||||||
@@ -430,10 +430,10 @@ typedef struct
|
|
||||||
int (*DeviceFindInfo)(int Inst, const char *DeviceName, void *DeviceInfo);
|
|
||||||
int (*DeviceFindParmUint)(void *DeviceInfo, const char *Parm, bit32u *Value);
|
|
||||||
int (*DeviceFindParmValue)(void *DeviceInfo, const char *Parm, void *Value);
|
|
||||||
- void (*Free)(void *MemPtr);
|
|
||||||
+ void (*Free)(const void *MemPtr);
|
|
||||||
void (*FreeRxBuffer)(OS_RECEIVEINFO *OsReceiveInfo, void *MemPtr);
|
|
||||||
- void (*FreeDev)(void *MemPtr);
|
|
||||||
- void (*FreeDmaXfer)(void *MemPtr);
|
|
||||||
+ void (*FreeDev)(const void *MemPtr);
|
|
||||||
+ void (*FreeDmaXfer)(const void *MemPtr);
|
|
||||||
void (*IsrRegister)(OS_DEVICE *OsDev, int (*halISR)(HAL_DEVICE*, int*), int InterruptBit);
|
|
||||||
void (*IsrUnRegister)(OS_DEVICE *OsDev, int InterruptBit);
|
|
||||||
void* (*Malloc)(bit32u size);
|
|
||||||
--- a/cpswhal_cpaal5.h
|
|
||||||
+++ b/cpswhal_cpaal5.h
|
|
||||||
@@ -430,10 +430,10 @@ typedef struct
|
|
||||||
int (*DeviceFindInfo)(int Inst, const char *DeviceName, void *DeviceInfo);
|
|
||||||
int (*DeviceFindParmUint)(void *DeviceInfo, const char *Parm, bit32u *Value);
|
|
||||||
int (*DeviceFindParmValue)(void *DeviceInfo, const char *Parm, void *Value);
|
|
||||||
- void (*Free)(void *MemPtr);
|
|
||||||
+ void (*Free)(const void *MemPtr);
|
|
||||||
void (*FreeRxBuffer)(OS_RECEIVEINFO *OsReceiveInfo, void *MemPtr);
|
|
||||||
- void (*FreeDev)(void *MemPtr);
|
|
||||||
- void (*FreeDmaXfer)(void *MemPtr);
|
|
||||||
+ void (*FreeDev)(const void *MemPtr);
|
|
||||||
+ void (*FreeDmaXfer)(const void *MemPtr);
|
|
||||||
void (*IsrRegister)(OS_DEVICE *OsDev, int (*halISR)(HAL_DEVICE*, int*), int InterruptBit);
|
|
||||||
void (*IsrUnRegister)(OS_DEVICE *OsDev, int InterruptBit);
|
|
||||||
void* (*Malloc)(bit32u size);
|
|
||||||
--- a/tn7atm.c
|
|
||||||
+++ b/tn7atm.c
|
|
||||||
@@ -2481,7 +2481,7 @@ static int tn7atm_proc_qos_read(struct s
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
-static int tn7atm_proc_qos_write(struct file *fp, const char *buf, unsigned long count, void *data)
|
|
||||||
+static int tn7atm_proc_qos_write(struct file *fp, const char *buf, size_t count, loff_t *data)
|
|
||||||
{
|
|
||||||
char local_buf[32];
|
|
||||||
|
|
||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -1712,7 +1712,7 @@ static int tn7dsl_proc_stats_open(struct
|
|
||||||
return single_open(file, tn7dsl_proc_stats, PDE_DATA(inode));
|
|
||||||
}
|
|
||||||
|
|
||||||
-int tn7dsl_proc_write_stats (struct file *fp, const char *buf, unsigned long count, void *data);
|
|
||||||
+int tn7dsl_proc_write_stats (struct file *fp, const char *buf, size_t count, loff_t *data);
|
|
||||||
|
|
||||||
struct file_operations tn7dsl_proc_stats_fops = {
|
|
||||||
.owner = THIS_MODULE,
|
|
||||||
@@ -4256,7 +4256,7 @@ int tn7dsl_generic_write( int offsetnum,
|
|
||||||
}
|
|
||||||
|
|
||||||
int tn7dsl_proc_write_stats (struct file *fp, const char *buf,
|
|
||||||
- unsigned long count, void *data)
|
|
||||||
+ size_t count, loff_t *data)
|
|
||||||
{
|
|
||||||
char local_buf[31];
|
|
||||||
int ret_val = 0;
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
--- a/aal5sar.h
|
|
||||||
+++ b/aal5sar.h
|
|
||||||
@@ -19,7 +19,7 @@
|
|
||||||
/** \namespace AAL5_Version
|
|
||||||
This documents version 01.07.2c of the AAL5 CPHAL.
|
|
||||||
*/
|
|
||||||
-const char *pszVersion_CPAAL5="CPAAL5 01.07.2c "__DATE__" "__TIME__;
|
|
||||||
+const char *pszVersion_CPAAL5="CPAAL5 01.07.2c ";
|
|
||||||
|
|
||||||
#include "cpsar_cpaal5.h"
|
|
||||||
|
|
||||||
@ -1,808 +0,0 @@
|
|||||||
--- a/cppi_cpaal5.c
|
|
||||||
+++ b/cppi_cpaal5.c
|
|
||||||
@@ -360,7 +360,7 @@ static int halRxReturn(HAL_RECEIVEINFO *
|
|
||||||
{
|
|
||||||
/* malloc failed, add this RCB to Needs Buffer List */
|
|
||||||
TempRcb->FragCount = 1; /*MJH+030417*/
|
|
||||||
- (HAL_RCB *)TempRcb->Eop = TempRcb; /* GSG +030430 */
|
|
||||||
+ TempRcb->Eop = TempRcb; /* GSG +030430 */
|
|
||||||
|
|
||||||
if(HalDev->NeedsCount < MAX_NEEDS) /* +MJH 030410 */
|
|
||||||
{ /* +MJH 030410 */
|
|
||||||
--- a/dsl_hal_api.c
|
|
||||||
+++ b/dsl_hal_api.c
|
|
||||||
@@ -273,15 +273,15 @@
|
|
||||||
* 09/15/07 CPH CQ11466 Added EFM support
|
|
||||||
* 09/27/07 EYin CQ11929: Added NFEC/INP/Lp/Rp reporting for only ADSL2/2+ mode.
|
|
||||||
******************************************************************************/
|
|
||||||
-#include <dev_host_interface.h>
|
|
||||||
-#include <dsl_hal_register.h>
|
|
||||||
-#include <dsl_hal_support.h>
|
|
||||||
+#include "dev_host_interface.h"
|
|
||||||
+#include "dsl_hal_register.h"
|
|
||||||
+#include "dsl_hal_support.h"
|
|
||||||
|
|
||||||
#ifndef NO_ADV_STATS
|
|
||||||
-#include <dsl_hal_logtable.h>
|
|
||||||
+#include "dsl_hal_logtable.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#include <dsl_hal_version.h>
|
|
||||||
+#include "dsl_hal_version.h"
|
|
||||||
|
|
||||||
// UR8_MERGE_START CQ11054 Jack Zhang
|
|
||||||
static unsigned int highprecision_selected = 0; //By default we use low precision for backward compt.
|
|
||||||
--- a/dsl_hal_support.c
|
|
||||||
+++ b/dsl_hal_support.c
|
|
||||||
@@ -142,9 +142,9 @@
|
|
||||||
* UR8_MERGE_START_END CQ11922 Tim
|
|
||||||
* 04Sep07 0.14.00 Tim CQ11922: Added support for new scratchram for INP NDR tables
|
|
||||||
*******************************************************************************/
|
|
||||||
-#include <dev_host_interface.h>
|
|
||||||
-#include <dsl_hal_register.h>
|
|
||||||
-#include <dsl_hal_support.h>
|
|
||||||
+#include "dev_host_interface.h"
|
|
||||||
+#include "dsl_hal_register.h"
|
|
||||||
+#include "dsl_hal_support.h"
|
|
||||||
|
|
||||||
#define NUM_READ_RETRIES 3
|
|
||||||
static unsigned int dslhal_support_adsl2ByteSwap32(unsigned int in32Bits);
|
|
||||||
--- a/dsl_hal_support.h
|
|
||||||
+++ b/dsl_hal_support.h
|
|
||||||
@@ -49,7 +49,7 @@
|
|
||||||
* 04Nov05 0.11.00 CPH Fixed T1413 mode got Zero DS/US rate when DSL_BIT_TMODE is set.
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
-#include <dsl_hal_api.h>
|
|
||||||
+#include "dsl_hal_api.h"
|
|
||||||
|
|
||||||
#define virtual2Physical(a) (((int)a)&~0xe0000000)
|
|
||||||
/* External Function Prototype Declarations */
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -1,18 +1,9 @@
|
|
||||||
-# File: drivers/atm/ti_evm3/Makefile
|
|
||||||
#
|
|
||||||
-# Makefile for the Texas Instruments EVM3 ADSL/ATM driver.
|
|
||||||
+# Makefile for the TIATM device driver.
|
|
||||||
#
|
|
||||||
-#
|
|
||||||
-# Copyright (c) 2000 Texas Instruments Incorporated.
|
|
||||||
-# Jeff Harrell (jharrell@telogy.com)
|
|
||||||
-# Viren Balar (vbalar@ti.com)
|
|
||||||
-# Victor Wells (vwells@telogy.com)
|
|
||||||
-#
|
|
||||||
-include $(TOPDIR)/Rules.make
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-
|
|
||||||
|
|
||||||
+CONFIG_SANGAM_ATM=m
|
|
||||||
+#EXTRA_CFLAGS += -DEL -I. -DPOST_SILICON -DCOMMON_NSP -DCONFIG_LED_MODULE -DDEREGISTER_LED -DNO_ACT
|
|
||||||
+EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -DNO_ACT -D__NO__VOICE_PATCH__ -DEL
|
|
||||||
+obj-$(CONFIG_SANGAM_ATM) := tiatm.o
|
|
||||||
+tiatm-objs += cpsar.o aal5sar.o tn7sar.o tn7atm.o tn7dsl.o dsl_hal_api.o dsl_hal_support.o
|
|
||||||
--- a/tn7atm.c
|
|
||||||
+++ b/tn7atm.c
|
|
||||||
@@ -66,7 +66,6 @@
|
|
||||||
* 09/18/07 CPH CQ11466 Added EFM Support
|
|
||||||
*********************************************************************************************/
|
|
||||||
|
|
||||||
-#include <linux/config.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
@@ -74,11 +73,14 @@
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/spinlock.h>
|
|
||||||
#include <linux/smp_lock.h>
|
|
||||||
-#include <asm/io.h>
|
|
||||||
-#include <asm/mips-boards/prom.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/string.h>
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
+
|
|
||||||
+#include <asm/io.h>
|
|
||||||
+#include <asm/ar7/ar7.h>
|
|
||||||
+#include <asm/ar7/prom.h>
|
|
||||||
+
|
|
||||||
#include "dsl_hal_api.h"
|
|
||||||
#ifdef AR7_EFM
|
|
||||||
#include "tn7efm.h"
|
|
||||||
@@ -90,6 +92,7 @@
|
|
||||||
#include "dsl_hal_register.h"
|
|
||||||
|
|
||||||
#ifdef MODULE
|
|
||||||
+MODULE_LICENSE("GPL");
|
|
||||||
MODULE_DESCRIPTION ("Tnetd73xx ATM Device Driver");
|
|
||||||
MODULE_AUTHOR ("Zhicheng Tang");
|
|
||||||
#endif
|
|
||||||
@@ -108,9 +111,9 @@ MODULE_AUTHOR ("Zhicheng Tang");
|
|
||||||
|
|
||||||
/*end of externs */
|
|
||||||
|
|
||||||
-#ifndef TI_STATIC_ALLOCATIONS
|
|
||||||
-#define TI_STATIC_ALLOCATIONS
|
|
||||||
-#endif
|
|
||||||
+//#ifndef TI_STATIC_ALLOCATIONS
|
|
||||||
+//#define TI_STATIC_ALLOCATIONS
|
|
||||||
+//#endif
|
|
||||||
|
|
||||||
#define tn7atm_kfree_skb(x) dev_kfree_skb(x)
|
|
||||||
|
|
||||||
@@ -135,7 +138,7 @@ static int EnableQoS = FALSE;
|
|
||||||
/* prototypes */
|
|
||||||
static int tn7atm_set_can_support_adsl2 (int can);
|
|
||||||
|
|
||||||
-static int tn7atm_open (struct atm_vcc *vcc, short vpi, int vci);
|
|
||||||
+static int tn7atm_open (struct atm_vcc *vcc);
|
|
||||||
|
|
||||||
void tn7atm_close (struct atm_vcc *vcc);
|
|
||||||
|
|
||||||
@@ -298,13 +301,12 @@ static const struct atmdev_ops tn7atm_op
|
|
||||||
getsockopt: NULL,
|
|
||||||
setsockopt: NULL,
|
|
||||||
send: tn7atm_send,
|
|
||||||
- sg_send: NULL,
|
|
||||||
phy_put: NULL,
|
|
||||||
phy_get: NULL,
|
|
||||||
change_qos: tn7atm_change_qos,
|
|
||||||
};
|
|
||||||
|
|
||||||
-const char drv_proc_root_folder[] = "avalanche/";
|
|
||||||
+const char drv_proc_root_folder[] = "avalanche";
|
|
||||||
static struct proc_dir_entry *root_proc_dir_entry = NULL;
|
|
||||||
#define DRV_PROC_MODE 0644
|
|
||||||
static int proc_root_already_exists = TRUE;
|
|
||||||
@@ -626,56 +628,6 @@ static int turbodsl_check_priority_type(
|
|
||||||
|
|
||||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
*
|
|
||||||
- * Function: int tn7atm_walk_vccs(struct atm_dev *dev, short *vcc, int *vci)
|
|
||||||
- *
|
|
||||||
- * Description: retrieve VPI/VCI for connection
|
|
||||||
- *
|
|
||||||
- *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
|
||||||
-static int tn7atm_walk_vccs (struct atm_vcc *vcc, short *vpi, int *vci)
|
|
||||||
-{
|
|
||||||
- struct atm_vcc *walk;
|
|
||||||
-
|
|
||||||
- /*
|
|
||||||
- * find a free VPI
|
|
||||||
- */
|
|
||||||
- if (*vpi == ATM_VPI_ANY)
|
|
||||||
- {
|
|
||||||
-
|
|
||||||
- for (*vpi = 0, walk = vcc->dev->vccs; walk; walk = walk->next)
|
|
||||||
- {
|
|
||||||
-
|
|
||||||
- if ((walk->vci == *vci) && (walk->vpi == *vpi))
|
|
||||||
- {
|
|
||||||
- (*vpi)++;
|
|
||||||
- walk = vcc->dev->vccs;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- /*
|
|
||||||
- * find a free VCI
|
|
||||||
- */
|
|
||||||
- if (*vci == ATM_VCI_ANY)
|
|
||||||
- {
|
|
||||||
-
|
|
||||||
- for (*vci = ATM_NOT_RSV_VCI, walk = vcc->dev->vccs; walk;
|
|
||||||
- walk = walk->next)
|
|
||||||
- {
|
|
||||||
-
|
|
||||||
- if ((walk->vpi = *vpi) && (walk->vci == *vci))
|
|
||||||
- {
|
|
||||||
- *vci = walk->vci + 1;
|
|
||||||
- walk = vcc->dev->vccs;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- return 0;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
- *
|
|
||||||
* Function: int tn7atm_sar_irq(void)
|
|
||||||
*
|
|
||||||
* Description: tnetd73xx SAR interrupt.
|
|
||||||
@@ -766,7 +718,7 @@ static int __init tn7atm_irq_request (st
|
|
||||||
|
|
||||||
priv->sar_irq = LNXINTNUM (ATM_SAR_INT); /* Interrupt line # */
|
|
||||||
|
|
||||||
- if (request_irq (priv->sar_irq, tn7atm_sar_irq, SA_INTERRUPT, "SAR ", dev))
|
|
||||||
+ if (request_irq (priv->sar_irq, tn7atm_sar_irq, IRQF_DISABLED, "SAR ", dev))
|
|
||||||
printk ("Could not register tn7atm_sar_irq\n");
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -777,8 +729,8 @@ static int __init tn7atm_irq_request (st
|
|
||||||
{
|
|
||||||
def_sar_inter_pace = os_atoi (ptr);
|
|
||||||
}
|
|
||||||
- avalanche_request_pacing (priv->sar_irq, ATM_SAR_INT_PACING_BLOCK_NUM,
|
|
||||||
- def_sar_inter_pace);
|
|
||||||
+ /* avalanche_request_pacing (priv->sar_irq, ATM_SAR_INT_PACING_BLOCK_NUM,
|
|
||||||
+ def_sar_inter_pace); */
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef AR7_EFM
|
|
||||||
@@ -790,7 +742,7 @@ static int __init tn7atm_irq_request (st
|
|
||||||
* Reigster Receive interrupt A
|
|
||||||
*/
|
|
||||||
priv->dsl_irq = LNXINTNUM (ATM_DSL_INT); /* Interrupt line # */
|
|
||||||
- if (request_irq (priv->dsl_irq, tn7atm_dsl_irq, SA_INTERRUPT, "DSL ", dev))
|
|
||||||
+ if (request_irq (priv->dsl_irq, tn7atm_dsl_irq, IRQF_DISABLED, "DSL ", dev))
|
|
||||||
printk ("Could not register tn7atm_dsl_irq\n");
|
|
||||||
|
|
||||||
/***** VRB Tasklet Mode ****/
|
|
||||||
@@ -958,11 +910,15 @@ static int __init tn7atm_get_ESI (struct
|
|
||||||
#define ATM_VBR_RT 5
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-int tn7atm_open (struct atm_vcc *vcc, short vpi, int vci)
|
|
||||||
+int tn7atm_open (struct atm_vcc *vcc)
|
|
||||||
{
|
|
||||||
tn7atm_activate_vc_parm_t tn7atm_activate_vc_parm;
|
|
||||||
int rc;
|
|
||||||
//int flags;
|
|
||||||
+ tn7atm_activate_vc_parm.pcr = 0x20000;
|
|
||||||
+ tn7atm_activate_vc_parm.scr = 0x20000;
|
|
||||||
+ tn7atm_activate_vc_parm.mbs = 0x20000;
|
|
||||||
+ tn7atm_activate_vc_parm.cdvt = 10000;
|
|
||||||
|
|
||||||
dgprintf(1, "tn7atm_open()\n");
|
|
||||||
|
|
||||||
@@ -974,24 +930,18 @@ int tn7atm_open (struct atm_vcc *vcc, sh
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
- MOD_INC_USE_COUNT;
|
|
||||||
+// MOD_INC_USE_COUNT;
|
|
||||||
|
|
||||||
- /* find a free VPI/VCI */
|
|
||||||
- tn7atm_walk_vccs(vcc, &vpi, &vci);
|
|
||||||
-
|
|
||||||
- vcc->vpi = vpi;
|
|
||||||
- vcc->vci = vci;
|
|
||||||
-
|
|
||||||
- if ((vci == ATM_VCI_UNSPEC) || (vpi == ATM_VCI_UNSPEC))
|
|
||||||
+ if ((vcc->vci == ATM_VCI_UNSPEC) || (vcc->vpi == ATM_VCI_UNSPEC))
|
|
||||||
{
|
|
||||||
- MOD_DEC_USE_COUNT;
|
|
||||||
+// MOD_DEC_USE_COUNT;
|
|
||||||
return -EBUSY;
|
|
||||||
}
|
|
||||||
|
|
||||||
- tn7atm_activate_vc_parm.vpi = vpi;
|
|
||||||
- tn7atm_activate_vc_parm.vci = vci;
|
|
||||||
+ tn7atm_activate_vc_parm.vpi = vcc->vpi;
|
|
||||||
+ tn7atm_activate_vc_parm.vci = vcc->vci;
|
|
||||||
|
|
||||||
- if ((vpi == CLEAR_EOC_VPI) && (vci == CLEAR_EOC_VCI))
|
|
||||||
+ if ((vcc->vpi == CLEAR_EOC_VPI) && (vcc->vci == CLEAR_EOC_VCI))
|
|
||||||
{
|
|
||||||
/* always use (max_dma_chan+1) for clear eoc */
|
|
||||||
tn7atm_activate_vc_parm.chan = EOC_DMA_CHAN;
|
|
||||||
@@ -999,7 +949,7 @@ int tn7atm_open (struct atm_vcc *vcc, sh
|
|
||||||
/* check to see whether clear eoc is opened or not */
|
|
||||||
if (tn7atm_activate_vc_parm.priv->lut[tn7atm_activate_vc_parm.chan].inuse)
|
|
||||||
{
|
|
||||||
- MOD_DEC_USE_COUNT;
|
|
||||||
+// MOD_DEC_USE_COUNT;
|
|
||||||
printk("tn7atm_open: Clear EOC channel (dmachan=%d) already in use.\n", tn7atm_activate_vc_parm.chan);
|
|
||||||
return -EBUSY;
|
|
||||||
}
|
|
||||||
@@ -1008,7 +958,7 @@ int tn7atm_open (struct atm_vcc *vcc, sh
|
|
||||||
if (rc)
|
|
||||||
{
|
|
||||||
printk("tn7atm_open: failed to setup clear_eoc\n");
|
|
||||||
- MOD_DEC_USE_COUNT;
|
|
||||||
+// MOD_DEC_USE_COUNT;
|
|
||||||
return -EBUSY;
|
|
||||||
}
|
|
||||||
tn7atm_set_lut(tn7atm_activate_vc_parm.priv,vcc, tn7atm_activate_vc_parm.chan);
|
|
||||||
@@ -1017,17 +967,17 @@ int tn7atm_open (struct atm_vcc *vcc, sh
|
|
||||||
}
|
|
||||||
else /* PVC channel setup */
|
|
||||||
{
|
|
||||||
- if ((vpi==REMOTE_MGMT_VPI) && (vci==REMOTE_MGMT_VCI))
|
|
||||||
+ if ((vcc->vpi==REMOTE_MGMT_VPI) && (vcc->vci==REMOTE_MGMT_VCI))
|
|
||||||
{
|
|
||||||
tn7atm_activate_vc_parm.chan = 14; /* always use chan 14 for MII PVC-base romote mgmt */
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
- rc = tn7atm_lut_find(vpi, vci);
|
|
||||||
+ rc = tn7atm_lut_find(vcc->vpi, vcc->vci);
|
|
||||||
/* check to see whether PVC is opened or not */
|
|
||||||
if(ATM_NO_DMA_CHAN != rc)
|
|
||||||
{
|
|
||||||
- MOD_DEC_USE_COUNT;
|
|
||||||
+// MOD_DEC_USE_COUNT;
|
|
||||||
printk("PVC already opened. dmachan = %d\n", rc);
|
|
||||||
return -EBUSY;
|
|
||||||
}
|
|
||||||
@@ -1059,6 +1009,7 @@ int tn7atm_open (struct atm_vcc *vcc, sh
|
|
||||||
tn7atm_activate_vc_parm.priority = 2;
|
|
||||||
break;
|
|
||||||
|
|
||||||
+#if 0
|
|
||||||
case ATM_VBR: /* Variable Bit Rate-Non RealTime*/
|
|
||||||
tn7atm_activate_vc_parm.qos = 1;
|
|
||||||
tn7atm_activate_vc_parm.priority = 1;
|
|
||||||
@@ -1080,6 +1031,7 @@ int tn7atm_open (struct atm_vcc *vcc, sh
|
|
||||||
tn7atm_activate_vc_parm.mbs = vcc->qos.txtp.max_pcr;
|
|
||||||
tn7atm_activate_vc_parm.cdvt = vcc->qos.txtp.max_cdv;
|
|
||||||
break;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
default:
|
|
||||||
tn7atm_activate_vc_parm.qos = 2;
|
|
||||||
@@ -1107,7 +1059,7 @@ int tn7atm_open (struct atm_vcc *vcc, sh
|
|
||||||
if (rc < 0)
|
|
||||||
{
|
|
||||||
printk("failed to activate hw channel\n");
|
|
||||||
- MOD_DEC_USE_COUNT;
|
|
||||||
+// MOD_DEC_USE_COUNT;
|
|
||||||
tn7atm_lut_clear(vcc, tn7atm_activate_vc_parm.chan);
|
|
||||||
//spin_unlock_irqrestore(&chan_init_lock, flags);
|
|
||||||
return -EBUSY;
|
|
||||||
@@ -1197,7 +1149,7 @@ void tn7atm_close (struct atm_vcc *vcc)
|
|
||||||
tn7atm_lut_clear (vcc, dmachan);
|
|
||||||
//spin_unlock_irqrestore (&closeLock, closeFlag);
|
|
||||||
|
|
||||||
- MOD_DEC_USE_COUNT;
|
|
||||||
+// MOD_DEC_USE_COUNT;
|
|
||||||
|
|
||||||
dgprintf (1, "Leave tn7atm_close\n");
|
|
||||||
}
|
|
||||||
@@ -1630,8 +1582,7 @@ int tn7atm_receive (void *os_dev, int ch
|
|
||||||
* firewall is on */
|
|
||||||
|
|
||||||
dgprintf (3, "pushing the skb...\n");
|
|
||||||
-
|
|
||||||
- skb->stamp = vcc->timestamp = xtime;
|
|
||||||
+ __net_timestamp(skb);
|
|
||||||
|
|
||||||
xdump ((unsigned char *) skb->data, skb->len, 5);
|
|
||||||
|
|
||||||
@@ -1854,8 +1805,7 @@ printk("!!!free atm irq: tn7atm_exit\n")
|
|
||||||
|
|
||||||
kfree (dev->dev_data);
|
|
||||||
|
|
||||||
- // atm_dev_deregister (dev);
|
|
||||||
- shutdown_atm_dev (dev);
|
|
||||||
+ atm_dev_deregister (dev);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* remove proc entries
|
|
||||||
@@ -2086,9 +2036,6 @@ static int __init tn7atm_detect (void)
|
|
||||||
* Set up proc entry for atm stats
|
|
||||||
*/
|
|
||||||
|
|
||||||
- if (tn7atm_xlate_proc_name
|
|
||||||
- (drv_proc_root_folder, &root_proc_dir_entry, &residual))
|
|
||||||
- {
|
|
||||||
printk ("Creating new root folder %s in the proc for the driver stats \n",
|
|
||||||
drv_proc_root_folder);
|
|
||||||
root_proc_dir_entry = proc_mkdir (drv_proc_root_folder, NULL);
|
|
||||||
@@ -2098,7 +2045,6 @@ static int __init tn7atm_detect (void)
|
|
||||||
return -ENOMEM;
|
|
||||||
}
|
|
||||||
proc_root_already_exists = FALSE;
|
|
||||||
- }
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -2731,7 +2677,5 @@ int tn7atm_proc_turbodsl_write(struct fi
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
-#ifdef MODULE
|
|
||||||
module_init (tn7atm_detect);
|
|
||||||
module_exit (tn7atm_exit);
|
|
||||||
-#endif /* MODULE */
|
|
||||||
--- a/tn7atm.h
|
|
||||||
+++ b/tn7atm.h
|
|
||||||
@@ -20,7 +20,8 @@
|
|
||||||
//#include "mips_support.h"
|
|
||||||
#include <linux/list.h>
|
|
||||||
|
|
||||||
-#include <linux/config.h>
|
|
||||||
+#define MIPS_EXCEPTION_OFFSET 8
|
|
||||||
+#define LNXINTNUM(x)((x) + MIPS_EXCEPTION_OFFSET)
|
|
||||||
|
|
||||||
#ifdef CONFIG_MODVERSIONS
|
|
||||||
#include <linux/modversions.h>
|
|
||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -102,7 +102,6 @@
|
|
||||||
* UR8_MERGE_END CQ11813
|
|
||||||
* 09/18/07 CPH CQ11466: Added EFM support.
|
|
||||||
*********************************************************************************************/
|
|
||||||
-#include <linux/config.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
@@ -110,8 +109,6 @@
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/spinlock.h>
|
|
||||||
#include <linux/smp_lock.h>
|
|
||||||
-#include <asm/io.h>
|
|
||||||
-#include <asm/mips-boards/prom.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/string.h>
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
@@ -119,6 +116,12 @@
|
|
||||||
#include <linux/timer.h>
|
|
||||||
#include <linux/vmalloc.h>
|
|
||||||
#include <linux/file.h>
|
|
||||||
+#include <linux/firmware.h>
|
|
||||||
+
|
|
||||||
+#include <asm/io.h>
|
|
||||||
+#include <asm/ar7/ar7.h>
|
|
||||||
+#include <asm/ar7/prom.h>
|
|
||||||
+
|
|
||||||
/* Modules specific header files */
|
|
||||||
#ifdef AR7_EFM
|
|
||||||
#include "tn7efm.h"
|
|
||||||
@@ -185,7 +188,7 @@ led_reg_t ledreg[2];
|
|
||||||
static struct led_funcs ledreg[2];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#define DEV_DSLMOD 1
|
|
||||||
+#define DEV_DSLMOD CTL_UNNUMBERED
|
|
||||||
#define MAX_STR_SIZE 256
|
|
||||||
#define DSL_MOD_SIZE 256
|
|
||||||
|
|
||||||
@@ -316,7 +319,7 @@ static PITIDSLHW_T pIhw;
|
|
||||||
static volatile int bshutdown;
|
|
||||||
static char info[MAX_STR_SIZE];
|
|
||||||
/* Used for DSL Polling enable */
|
|
||||||
-static DECLARE_MUTEX_LOCKED (adsl_sem_overlay);
|
|
||||||
+static struct semaphore adsl_sem_overlay;
|
|
||||||
|
|
||||||
//kthread_t overlay_thread;
|
|
||||||
/* end of module wide declars */
|
|
||||||
@@ -369,6 +372,14 @@ int os_atoih (const char *pstr)
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
+int avalanche_request_intr_pacing(int irq_nr, unsigned int blk_num,
|
|
||||||
+ unsigned int pace_value)
|
|
||||||
+{
|
|
||||||
+ printk("avalanche_request_pacing(%d, %u, %u); // not implemented\n", irq_nr, blk_num, pace_value);
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
int os_atoi(const char *pStr)
|
|
||||||
{
|
|
||||||
int MulNeg = (*pStr == '-' ? -1 : 1);
|
|
||||||
@@ -405,39 +416,6 @@ void dprintf (int uDbgLevel, char *szFmt
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
-int strcmp(const char *s1, const char *s2)
|
|
||||||
-{
|
|
||||||
-
|
|
||||||
- int size = strlen(s1);
|
|
||||||
-
|
|
||||||
- return(strncmp(s1, s2, size));
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-int strncmp(const char *s1, const char *s2, size_t size)
|
|
||||||
-{
|
|
||||||
- int i = 0;
|
|
||||||
- int max_size = (int)size;
|
|
||||||
-
|
|
||||||
- while((s1[i] != 0) && i < max_size)
|
|
||||||
- {
|
|
||||||
- if(s2[i] == 0)
|
|
||||||
- {
|
|
||||||
- return -1;
|
|
||||||
- }
|
|
||||||
- if(s1[i] != s2[i])
|
|
||||||
- {
|
|
||||||
- return 1;
|
|
||||||
- }
|
|
||||||
- i++;
|
|
||||||
- }
|
|
||||||
- if(s2[i] != 0)
|
|
||||||
- {
|
|
||||||
- return 1;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- return 0;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
// * UR8_MERGE_START CQ10640 Jack Zhang
|
|
||||||
int tn7dsl_dump_dsp_memory(char *input_str) //cph99
|
|
||||||
{
|
|
||||||
@@ -487,144 +465,78 @@ unsigned int shim_osGetCpuFrequency(void
|
|
||||||
return CpuFrequency;
|
|
||||||
}
|
|
||||||
|
|
||||||
-int shim_osLoadFWImage(unsigned char *ptr)
|
|
||||||
+static void avsar_release(struct device *dev)
|
|
||||||
{
|
|
||||||
- unsigned int bytesRead;
|
|
||||||
- mm_segment_t oldfs;
|
|
||||||
- static struct file *filp;
|
|
||||||
- unsigned int imageLength=0x5ffff;
|
|
||||||
-
|
|
||||||
-#ifdef AR7_EFM
|
|
||||||
- int dp_alt=0;
|
|
||||||
- char *ptr1=NULL;
|
|
||||||
-#ifdef EFM_DEBUG
|
|
||||||
- char *ptr2=NULL;
|
|
||||||
- char *ptr3=NULL;
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
- if ((ptr1 = prom_getenv("DSL_DP_ALT")) != NULL)
|
|
||||||
- {
|
|
||||||
- dp_alt=os_atoi(ptr1);
|
|
||||||
- if (dp_alt==1)
|
|
||||||
- {
|
|
||||||
- filp = filp_open(DSP_DEBUG_FIRMWARE_PATH,00,O_RDONLY);
|
|
||||||
- if (!IS_ERR(filp))
|
|
||||||
- {
|
|
||||||
- strcpy (DSP_FIRMWARE_PATH, DSP_DEBUG_FIRMWARE_PATH);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-#ifdef EFM_DEBUG
|
|
||||||
- else if (dp_alt==2)
|
|
||||||
- {
|
|
||||||
- if ((ptr2 = prom_getenv("DSL_DP")) != NULL)
|
|
||||||
- {
|
|
||||||
- if (!strncmp(ptr2, "DSL_DP", 6))
|
|
||||||
- { // indirect naming
|
|
||||||
- if ((ptr3 = prom_getenv(ptr2)) != NULL)
|
|
||||||
- filp = filp_open(ptr3,00,O_RDONLY);
|
|
||||||
- ptr2 = ptr3; // redirect ptr2 to ptr3
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- filp = filp_open(ptr2,00,O_RDONLY);
|
|
||||||
- if (!IS_ERR(filp))
|
|
||||||
- {
|
|
||||||
- strcpy (DSP_FIRMWARE_PATH, ptr2);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- printk("dp_path=%s\n", DSP_FIRMWARE_PATH);
|
|
||||||
-#endif
|
|
||||||
- }
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
- dgprintf(4, "tn7dsl_read_dsp()\n");
|
|
||||||
-
|
|
||||||
- dgprintf(4,"open file %s\n", DSP_FIRMWARE_PATH);
|
|
||||||
-
|
|
||||||
- filp=filp_open(DSP_FIRMWARE_PATH,00,O_RDONLY);
|
|
||||||
- if(IS_ERR(filp))
|
|
||||||
- {
|
|
||||||
- printk("Failed: Could not open DSP binary file\n");
|
|
||||||
- return -1;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if (filp->f_dentry != NULL)
|
|
||||||
- {
|
|
||||||
- if (filp->f_dentry->d_inode != NULL)
|
|
||||||
- {
|
|
||||||
- printk ("DSP binary filesize = %d bytes\n",
|
|
||||||
- (int) filp->f_dentry->d_inode->i_size);
|
|
||||||
- imageLength = (unsigned int)filp->f_dentry->d_inode->i_size + 0x200;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if (filp->f_op->read==NULL)
|
|
||||||
- return -1; /* File(system) doesn't allow reads */
|
|
||||||
-
|
|
||||||
- /*
|
|
||||||
- * Disable parameter checking
|
|
||||||
- */
|
|
||||||
- oldfs = get_fs();
|
|
||||||
- set_fs(KERNEL_DS);
|
|
||||||
-
|
|
||||||
- /*
|
|
||||||
- * Now read bytes from postion "StartPos"
|
|
||||||
- */
|
|
||||||
- filp->f_pos = 0;
|
|
||||||
-
|
|
||||||
- bytesRead = filp->f_op->read(filp,ptr,imageLength,&filp->f_pos);
|
|
||||||
-
|
|
||||||
- dgprintf(4,"file length = %d\n", bytesRead);
|
|
||||||
-
|
|
||||||
- set_fs(oldfs);
|
|
||||||
-
|
|
||||||
- /*
|
|
||||||
- * Close the file
|
|
||||||
- */
|
|
||||||
- fput(filp);
|
|
||||||
-
|
|
||||||
- return bytesRead;
|
|
||||||
+ printk(KERN_DEBUG "avsar firmware released\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
+static struct device avsar = {
|
|
||||||
+ .bus_id = "vlynq",
|
|
||||||
+ .release = avsar_release,
|
|
||||||
+};
|
|
||||||
|
|
||||||
-unsigned int shim_read_overlay_page (void *ptr, unsigned int secOffset,
|
|
||||||
- unsigned int secLength)
|
|
||||||
+int shim_osLoadFWImage(unsigned char *ptr)
|
|
||||||
{
|
|
||||||
- unsigned int bytesRead;
|
|
||||||
- mm_segment_t oldfs;
|
|
||||||
- struct file *filp;
|
|
||||||
-
|
|
||||||
- dgprintf(4,"shim_read_overlay_page\n");
|
|
||||||
- //dgprintf(4,"sec offset=%d, sec length =%d\n", secOffset, secLength);
|
|
||||||
+ const struct firmware *fw_entry;
|
|
||||||
+ size_t size;
|
|
||||||
|
|
||||||
- filp=filp_open(DSP_FIRMWARE_PATH,00,O_RDONLY);
|
|
||||||
- if(filp ==NULL)
|
|
||||||
- {
|
|
||||||
- printk("Failed: Could not open DSP binary file\n");
|
|
||||||
- return -1;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if (filp->f_op->read==NULL)
|
|
||||||
- return -1; /* File(system) doesn't allow reads */
|
|
||||||
-
|
|
||||||
- /*
|
|
||||||
- * Now read bytes from postion "StartPos"
|
|
||||||
- */
|
|
||||||
+ printk("requesting firmware image \"ar0700xx.bin\"\n");
|
|
||||||
+ if(device_register(&avsar) < 0) {
|
|
||||||
+ printk(KERN_ERR
|
|
||||||
+ "avsar: device_register fails\n");
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (request_firmware(&fw_entry, "ar0700xx.bin", &avsar)) {
|
|
||||||
+ printk(KERN_ERR
|
|
||||||
+ "avsar: Firmware not available\n");
|
|
||||||
+ device_unregister(&avsar);
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ size = fw_entry->size;
|
|
||||||
+ device_unregister(&avsar);
|
|
||||||
+ if (size > 0x6ffff) {
|
|
||||||
+ printk(KERN_ERR
|
|
||||||
+ "avsar: Firmware too big (%d bytes)\n", size);
|
|
||||||
+ release_firmware(fw_entry);
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ memcpy(ptr, fw_entry->data, size);
|
|
||||||
+ release_firmware(fw_entry);
|
|
||||||
+ return size;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+unsigned int shim_read_overlay_page(void *ptr, unsigned int secOffset, unsigned int secLength)
|
|
||||||
+{
|
|
||||||
+ const struct firmware *fw_entry;
|
|
||||||
+
|
|
||||||
+ printk("requesting firmware image \"ar0700xx.bin\"\n");
|
|
||||||
+ if (device_register(&avsar) < 0) {
|
|
||||||
+ printk(KERN_ERR
|
|
||||||
+ "avsar: device_register fails\n");
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (request_firmware(&fw_entry, "ar0700xx.bin", &avsar)) {
|
|
||||||
+ printk(KERN_ERR
|
|
||||||
+ "avsar: Firmware not available\n");
|
|
||||||
+ device_unregister(&avsar);
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ device_unregister(&avsar);
|
|
||||||
+ if (fw_entry->size > secLength) {
|
|
||||||
+ printk(KERN_ERR
|
|
||||||
+ "avsar: Firmware too big (%d bytes)\n", fw_entry->size);
|
|
||||||
+ release_firmware(fw_entry);
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ memcpy(ptr + secOffset, fw_entry->data, secLength);
|
|
||||||
+ release_firmware(fw_entry);
|
|
||||||
+ return secLength;
|
|
||||||
+}
|
|
||||||
|
|
||||||
- if(filp->f_op->llseek)
|
|
||||||
- filp->f_op->llseek(filp,secOffset, 0);
|
|
||||||
- oldfs = get_fs();
|
|
||||||
- set_fs(KERNEL_DS);
|
|
||||||
- filp->f_pos = secOffset;
|
|
||||||
- bytesRead = filp->f_op->read(filp,ptr,secLength,&filp->f_pos);
|
|
||||||
|
|
||||||
- set_fs(oldfs);
|
|
||||||
- /*
|
|
||||||
- * Close the file
|
|
||||||
- */
|
|
||||||
- fput(filp);
|
|
||||||
- return bytesRead;
|
|
||||||
-}
|
|
||||||
|
|
||||||
int shim_osLoadDebugFWImage(unsigned char *ptr)
|
|
||||||
{
|
|
||||||
@@ -3287,6 +3199,7 @@ int tn7dsl_init(void *priv)
|
|
||||||
int high_precision_selected = 0;
|
|
||||||
// UR8_MERGE_END CQ11054*
|
|
||||||
|
|
||||||
+ sema_init(&adsl_sem_overlay, 0);
|
|
||||||
/*
|
|
||||||
* start dsl
|
|
||||||
*/
|
|
||||||
@@ -3665,7 +3578,7 @@ static int dslmod_sysctl(ctl_table *ctl,
|
|
||||||
*/
|
|
||||||
if(write)
|
|
||||||
{
|
|
||||||
- ret = proc_dostring(ctl, write, filp, buffer, lenp);
|
|
||||||
+ ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
|
|
||||||
|
|
||||||
switch (ctl->ctl_name)
|
|
||||||
{
|
|
||||||
@@ -3751,14 +3664,14 @@ static int dslmod_sysctl(ctl_table *ctl,
|
|
||||||
else
|
|
||||||
{
|
|
||||||
len += sprintf(info+len, mod_req);
|
|
||||||
- ret = proc_dostring(ctl, write, filp, buffer, lenp);
|
|
||||||
+ ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ctl_table dslmod_table[] = {
|
|
||||||
- {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, &dslmod_sysctl}
|
|
||||||
+ {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, &sysctl_string}
|
|
||||||
,
|
|
||||||
{0}
|
|
||||||
};
|
|
||||||
@@ -3781,8 +3694,7 @@ void tn7dsl_dslmod_sysctl_register(void)
|
|
||||||
if (initialized == 1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
- dslmod_sysctl_header = register_sysctl_table(dslmod_root_table, 1);
|
|
||||||
- dslmod_root_table->child->de->owner = THIS_MODULE;
|
|
||||||
+ dslmod_sysctl_header = register_sysctl_table(dslmod_root_table);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* set the defaults
|
|
||||||
--- a/tn7sar.c
|
|
||||||
+++ b/tn7sar.c
|
|
||||||
@@ -43,7 +43,6 @@
|
|
||||||
* 09/18/07 CPH CQ11466: Added EFM support.
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
-#include <linux/config.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
@@ -51,12 +50,13 @@
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/spinlock.h>
|
|
||||||
#include <linux/smp_lock.h>
|
|
||||||
-#include <asm/io.h>
|
|
||||||
-#include <asm/mips-boards/prom.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/string.h>
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
|
|
||||||
+#include <asm/io.h>
|
|
||||||
+#include <asm/ar7/ar7.h>
|
|
||||||
+#include <asm/ar7/prom.h>
|
|
||||||
|
|
||||||
#define _CPHAL_AAL5
|
|
||||||
#define _CPHAL_SAR
|
|
||||||
@ -1,37 +0,0 @@
|
|||||||
--- a/tn7atm.c
|
|
||||||
+++ b/tn7atm.c
|
|
||||||
@@ -633,7 +633,7 @@ static int turbodsl_check_priority_type(
|
|
||||||
* Description: tnetd73xx SAR interrupt.
|
|
||||||
*
|
|
||||||
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
|
||||||
-static void tn7atm_sar_irq (int irq, void *voiddev, struct pt_regs *regs)
|
|
||||||
+static irqreturn_t tn7atm_sar_irq (int irq, void *voiddev)
|
|
||||||
{
|
|
||||||
struct atm_dev *atmdev;
|
|
||||||
Tn7AtmPrivate *priv;
|
|
||||||
@@ -660,6 +660,7 @@ static void tn7atm_sar_irq (int irq, voi
|
|
||||||
#ifdef TIATM_INST_SUPP
|
|
||||||
psp_trace_par (ATM_DRV_SAR_ISR_EXIT, retval);
|
|
||||||
#endif
|
|
||||||
+ return IRQ_HANDLED;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
@@ -669,7 +670,7 @@ static void tn7atm_sar_irq (int irq, voi
|
|
||||||
* Description: tnetd73xx DSL interrupt.
|
|
||||||
*
|
|
||||||
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
|
||||||
-static void tn7atm_dsl_irq (int irq, void *voiddev, struct pt_regs *regs)
|
|
||||||
+static irqreturn_t tn7atm_dsl_irq (int irq, void *voiddev)
|
|
||||||
{
|
|
||||||
struct atm_dev *atmdev;
|
|
||||||
Tn7AtmPrivate *priv;
|
|
||||||
@@ -691,6 +692,8 @@ static void tn7atm_dsl_irq (int irq, voi
|
|
||||||
#ifdef TIATM_INST_SUPP
|
|
||||||
psp_trace_par (ATM_DRV_DSL_ISR_EXIT, retval);
|
|
||||||
#endif
|
|
||||||
+
|
|
||||||
+ return IRQ_HANDLED;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
--- a/tn7api.h
|
|
||||||
+++ b/tn7api.h
|
|
||||||
@@ -118,7 +118,7 @@ int tn7dsl_proc_dbgmsg_write(struct file
|
|
||||||
int tn7dsl_proc_dbgmsg_read(char* buf, char **start, off_t offset, int count,int *eof, void *data);
|
|
||||||
#endif
|
|
||||||
//UR8_MERGE_END CQ11813
|
|
||||||
-inline int tn7dsl_handle_interrupt(void);
|
|
||||||
+int tn7dsl_handle_interrupt(void);
|
|
||||||
|
|
||||||
void tn7dsl_dslmod_sysctl_register(void);
|
|
||||||
void tn7dsl_dslmod_sysctl_unregister(void);
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
--- a/dsl_hal_advcfg.c
|
|
||||||
+++ b/dsl_hal_advcfg.c
|
|
||||||
@@ -36,9 +36,9 @@
|
|
||||||
* 05Jul05 0.00.09 CPH CQ9775: Change dslhal_advcfg_configDsTones input parameters & support for ADSL2+
|
|
||||||
* 24Jul05 0.00.10 CPH Fixed comments in dslhal_advcfg_configDsTones function header
|
|
||||||
*******************************************************************************/
|
|
||||||
-#include <dev_host_interface.h>
|
|
||||||
-#include <dsl_hal_register.h>
|
|
||||||
-#include <dsl_hal_support.h>
|
|
||||||
+#include "dev_host_interface.h"
|
|
||||||
+#include "dsl_hal_register.h"
|
|
||||||
+#include "dsl_hal_support.h"
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/* ACT API functions -- To be moved into their own independent module --RamP */
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -4,6 +4,7 @@
|
|
||||||
|
|
||||||
CONFIG_SANGAM_ATM=m
|
|
||||||
#EXTRA_CFLAGS += -DEL -I. -DPOST_SILICON -DCOMMON_NSP -DCONFIG_LED_MODULE -DDEREGISTER_LED -DNO_ACT
|
|
||||||
-EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -DNO_ACT -D__NO__VOICE_PATCH__ -DEL
|
|
||||||
+#EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -DNO_ACT -D__NO__VOICE_PATCH__ -DEL
|
|
||||||
+EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -D__NO__VOICE_PATCH__ -DEL
|
|
||||||
obj-$(CONFIG_SANGAM_ATM) := tiatm.o
|
|
||||||
-tiatm-objs += cpsar.o aal5sar.o tn7sar.o tn7atm.o tn7dsl.o dsl_hal_api.o dsl_hal_support.o
|
|
||||||
+tiatm-objs += cpsar.o aal5sar.o tn7sar.o tn7atm.o tn7dsl.o dsl_hal_api.o dsl_hal_support.o dsl_hal_advcfg.o
|
|
||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -3053,6 +3053,14 @@ static int tn7dsl_set_dsl(void)
|
|
||||||
dslhal_api_setRateAdaptFlag(pIhw, os_atoi(ptr));
|
|
||||||
}
|
|
||||||
|
|
||||||
+ // set powercutback
|
|
||||||
+ ptr = NULL;
|
|
||||||
+ ptr = prom_getenv("powercutback");
|
|
||||||
+ if(ptr)
|
|
||||||
+ {
|
|
||||||
+ dslhal_advcfg_onOffPcb(pIhw, os_atoi(ptr));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
// trellis
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("trellis");
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
--- a/tn7sar.c
|
|
||||||
+++ b/tn7sar.c
|
|
||||||
@@ -125,10 +125,10 @@ enum
|
|
||||||
//09/05/07: cph, move to tn7atm.h
|
|
||||||
// #define RESERVED_OAM_CHANNEL 15
|
|
||||||
|
|
||||||
-#define AAL5_PARM "id=aal5, base = 0x03000000, offset = 0, int_line=15, ch0=[RxBufSize=1522; RxNumBuffers = 32; RxServiceMax = 50; TxServiceMax=50; TxNumBuffers=32; CpcsUU=0x5aa5; TxVc_CellRate=0x3000; TxVc_AtmHeader=0x00000640]"
|
|
||||||
-#define SAR_PARM "id=sar,base = 0x03000000, reset_bit = 9, offset = 0; UniNni = 0, PdspEnable = 1"
|
|
||||||
+#define CH0_PARM "RxBufSize=1522, RxNumBuffers=32, RxServiceMax=50, TxServiceMax=50, TxNumBuffers=32, CpcsUU=0x5aa5, TxVc_CellRate=0x3000, TxVc_AtmHeader=0x00000640"
|
|
||||||
+#define AAL5_PARM "id=aal5, base=0x03000000, offset=0, int_line=15, ch0=[" CH0_PARM "]"
|
|
||||||
+#define SAR_PARM "id=sar, base=0x03000000, reset_bit=9, offset=0; UniNni=0, PdspEnable=1, Debug=0xFFFFFFFF"
|
|
||||||
#define RESET_PARM "id=ResetControl, base=0xA8611600"
|
|
||||||
-#define CH0_PARM "RxBufSize=1522, RxNumBuffers = 32, RxServiceMax = 50, TxServiceMax=50, TxNumBuffers=32, CpcsUU=0x5aa5, TxVc_CellRate=0x3000, TxVc_AtmHeader=0x00000640"
|
|
||||||
|
|
||||||
#define MAX_PVC_TABLE_ENTRY 16
|
|
||||||
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -5,6 +5,7 @@
|
|
||||||
CONFIG_SANGAM_ATM=m
|
|
||||||
#EXTRA_CFLAGS += -DEL -I. -DPOST_SILICON -DCOMMON_NSP -DCONFIG_LED_MODULE -DDEREGISTER_LED -DNO_ACT
|
|
||||||
#EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -DNO_ACT -D__NO__VOICE_PATCH__ -DEL
|
|
||||||
-EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -D__NO__VOICE_PATCH__ -DEL
|
|
||||||
+#EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -D__NO__VOICE_PATCH__ -DEL
|
|
||||||
+EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -D__NO__VOICE_PATCH__ -DEL -DCPATM_TASKLET_MODE
|
|
||||||
obj-$(CONFIG_SANGAM_ATM) := tiatm.o
|
|
||||||
tiatm-objs += cpsar.o aal5sar.o tn7sar.o tn7atm.o tn7dsl.o dsl_hal_api.o dsl_hal_support.o dsl_hal_advcfg.o
|
|
||||||
@ -1,675 +0,0 @@
|
|||||||
--- a/tn7atm.c
|
|
||||||
+++ b/tn7atm.c
|
|
||||||
@@ -95,6 +95,146 @@
|
|
||||||
MODULE_LICENSE("GPL");
|
|
||||||
MODULE_DESCRIPTION ("Tnetd73xx ATM Device Driver");
|
|
||||||
MODULE_AUTHOR ("Zhicheng Tang");
|
|
||||||
+
|
|
||||||
+int mp_sar_ipacemax = -1;
|
|
||||||
+module_param_named(ipacemax, mp_sar_ipacemax, int, 0);
|
|
||||||
+MODULE_PARM_DESC(ipacemax, "Interrupt pacing");
|
|
||||||
+
|
|
||||||
+char *mp_macc = NULL;
|
|
||||||
+module_param_named(macc, mp_macc, charp, 0);
|
|
||||||
+MODULE_PARM_DESC(macc, "MAC address");
|
|
||||||
+
|
|
||||||
+int mp_dsp_noboost = -1;
|
|
||||||
+module_param_named(dsp_noboost, mp_dsp_noboost, int, 0);
|
|
||||||
+MODULE_PARM_DESC(dsp_noboost, "Suppress DSP frequency boost");
|
|
||||||
+
|
|
||||||
+int mp_dsp_freq = -1;
|
|
||||||
+module_param_named(dsp_freq, mp_dsp_freq, int, 0);
|
|
||||||
+MODULE_PARM_DESC(dsp_freq, "Frequency to boost the DSP to");
|
|
||||||
+
|
|
||||||
+char *mp_featctl0 = NULL;
|
|
||||||
+module_param_named(featctl0, mp_featctl0, charp, 0);
|
|
||||||
+MODULE_PARM_DESC(featctl0, "DSL feature control 0");
|
|
||||||
+
|
|
||||||
+char *mp_featctl1 = NULL;
|
|
||||||
+module_param_named(featctl1, mp_featctl1, charp, 0);
|
|
||||||
+MODULE_PARM_DESC(featctl1, "DSL feature control 1");
|
|
||||||
+
|
|
||||||
+char *mp_phyctl0 = NULL;
|
|
||||||
+module_param_named(phyctl0, mp_phyctl0, charp, 0);
|
|
||||||
+MODULE_PARM_DESC(phyctl0, "DSL PHY control 0");
|
|
||||||
+
|
|
||||||
+char *mp_phyctl1 = NULL;
|
|
||||||
+module_param_named(phyctl1, mp_phyctl1, charp, 0);
|
|
||||||
+MODULE_PARM_DESC(phyctl1, "DSL PHY control 1");
|
|
||||||
+
|
|
||||||
+int mp_turbodsl = -1;
|
|
||||||
+module_param_named(turbodsl, mp_turbodsl, int, 0);
|
|
||||||
+MODULE_PARM_DESC(turbodsl, "Enable TurboDSL");
|
|
||||||
+
|
|
||||||
+int mp_sar_rxbuf = -1;
|
|
||||||
+module_param_named(sar_rxbuf, mp_sar_rxbuf, int, 0);
|
|
||||||
+MODULE_PARM_DESC(sar_rxbuf, "SAR RxBuf size");
|
|
||||||
+
|
|
||||||
+int mp_sar_rxmax = -1;
|
|
||||||
+module_param_named(sar_rxmax, mp_sar_rxmax, int, 0);
|
|
||||||
+MODULE_PARM_DESC(sar_rxmax, "SAR RxMax size");
|
|
||||||
+
|
|
||||||
+int mp_sar_txbuf = -1;
|
|
||||||
+module_param_named(sar_txbuf, mp_sar_txbuf, int, 0);
|
|
||||||
+MODULE_PARM_DESC(sar_txbuf, "SAR TxBuf size");
|
|
||||||
+
|
|
||||||
+int mp_sar_txmax = -1;
|
|
||||||
+module_param_named(sar_txmax, mp_sar_txmax, int, 0);
|
|
||||||
+MODULE_PARM_DESC(sar_txmax, "SAR TxMax size");
|
|
||||||
+
|
|
||||||
+char *mp_modulation = NULL;
|
|
||||||
+module_param_named(modulation, mp_modulation, charp, 0);
|
|
||||||
+MODULE_PARM_DESC(modulation, "Modulation");
|
|
||||||
+
|
|
||||||
+int mp_fine_gain_control = -1;
|
|
||||||
+module_param_named(fine_gain_control, mp_fine_gain_control, int, 0);
|
|
||||||
+MODULE_PARM_DESC(fine_gain_control, "Fine gain control");
|
|
||||||
+
|
|
||||||
+int mp_fine_gain_value = -1;
|
|
||||||
+module_param_named(fine_gain_value, mp_fine_gain_value, int, 0);
|
|
||||||
+MODULE_PARM_DESC(fine_gain_value, "Fine gain value");
|
|
||||||
+
|
|
||||||
+int mp_enable_margin_retrain = -1;
|
|
||||||
+module_param_named(enable_margin_retrain, mp_enable_margin_retrain, int, 0);
|
|
||||||
+MODULE_PARM_DESC(enable_margin_retrain, "Enable margin retrain");
|
|
||||||
+
|
|
||||||
+int mp_margin_threshold = -1;
|
|
||||||
+module_param_named(margin_threshold, mp_margin_threshold, int, 0);
|
|
||||||
+MODULE_PARM_DESC(margin_threshold, "Margin retrain treshold");
|
|
||||||
+
|
|
||||||
+int mp_enable_rate_adapt = -1;
|
|
||||||
+module_param_named(enable_rate_adapt, mp_enable_rate_adapt, int, 0);
|
|
||||||
+MODULE_PARM_DESC(enable_rate_adapt, "Enable rate adaption");
|
|
||||||
+
|
|
||||||
+int mp_powercutback = -1;
|
|
||||||
+module_param_named(powercutback, mp_powercutback, int, 0);
|
|
||||||
+MODULE_PARM_DESC(powercutback, "Enable / disable powercutback");
|
|
||||||
+
|
|
||||||
+int mp_trellis = -1;
|
|
||||||
+module_param_named(trellis, mp_trellis, int, 0);
|
|
||||||
+MODULE_PARM_DESC(trellis, "Enable / disable trellis coding");
|
|
||||||
+
|
|
||||||
+int mp_bitswap = -1;
|
|
||||||
+module_param_named(bitswap, mp_bitswap, int, 0);
|
|
||||||
+MODULE_PARM_DESC(bitswap, "Enable / disable bitswap");
|
|
||||||
+
|
|
||||||
+int mp_maximum_bits_per_carrier = -1;
|
|
||||||
+module_param_named(maximum_bits_per_carrier, mp_maximum_bits_per_carrier, int, 0);
|
|
||||||
+MODULE_PARM_DESC(maximum_bits_per_carrier, "Maximum bits per carrier");
|
|
||||||
+
|
|
||||||
+int mp_maximum_interleave_depth = -1;
|
|
||||||
+module_param_named(maximum_interleave_depth, mp_maximum_interleave_depth, int, 0);
|
|
||||||
+MODULE_PARM_DESC(maximum_interleave_depth, "Maximum interleave depth");
|
|
||||||
+
|
|
||||||
+int mp_pair_selection = -1;
|
|
||||||
+module_param_named(pair_selection, mp_pair_selection, int, 0);
|
|
||||||
+MODULE_PARM_DESC(pair_selection, "Pair selection");
|
|
||||||
+
|
|
||||||
+int mp_dgas_polarity = -1;
|
|
||||||
+module_param_named(dgas_polarity, mp_dgas_polarity, int, 0);
|
|
||||||
+MODULE_PARM_DESC(dgas_polarity, "DGAS polarity");
|
|
||||||
+
|
|
||||||
+int mp_los_alarm = -1;
|
|
||||||
+module_param_named(los_alarm, mp_los_alarm, int, 0);
|
|
||||||
+MODULE_PARM_DESC(los_alarm, "LOS alarm");
|
|
||||||
+
|
|
||||||
+char *mp_eoc_vendor_id = NULL;
|
|
||||||
+module_param_named(eoc_vendor_id, mp_eoc_vendor_id, charp, 0);
|
|
||||||
+MODULE_PARM_DESC(eoc_vendor_id, "EOC vendor id");
|
|
||||||
+
|
|
||||||
+int mp_eoc_vendor_revision = -1;
|
|
||||||
+module_param_named(eoc_vendor_revision, mp_eoc_vendor_revision, int, 0);
|
|
||||||
+MODULE_PARM_DESC(eoc_vendor_revision, "EOC vendor revision");
|
|
||||||
+
|
|
||||||
+char *mp_eoc_vendor_serialnum = NULL;
|
|
||||||
+module_param_named(eoc_vendor_serialnum, mp_eoc_vendor_serialnum, charp, 0);
|
|
||||||
+MODULE_PARM_DESC(eoc_vendor_serialnum, "EOC vendor serial number");
|
|
||||||
+
|
|
||||||
+char *mp_invntry_vernum = NULL;
|
|
||||||
+module_param_named(invntry_vernum, mp_invntry_vernum, charp, 0);
|
|
||||||
+MODULE_PARM_DESC(invntry_vernum, "Inventory revision number");
|
|
||||||
+
|
|
||||||
+int mp_dsl_bit_tmode = -1;
|
|
||||||
+module_param_named(dsl_bit_tmode, mp_dsl_bit_tmode, int, 0);
|
|
||||||
+MODULE_PARM_DESC(dsl_bit_tmode, "DSL bit training mode");
|
|
||||||
+
|
|
||||||
+int mp_high_precision = -1;
|
|
||||||
+module_param_named(high_precision, mp_high_precision, int, 0);
|
|
||||||
+MODULE_PARM_DESC(high_precision, "High precision");
|
|
||||||
+
|
|
||||||
+int mp_autopvc_enable = -1;
|
|
||||||
+module_param_named(autopvc_enable, mp_autopvc_enable, int, 0);
|
|
||||||
+MODULE_PARM_DESC(autopvc_enable, "Enable / disable automatic PVC");
|
|
||||||
+
|
|
||||||
+int mp_oam_lb_timeout = -1;
|
|
||||||
+module_param_named(oam_lb_timeout, mp_oam_lb_timeout, int, 0);
|
|
||||||
+MODULE_PARM_DESC(oam_lb_timeout, "OAM LB timeout");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef TRUE
|
|
||||||
@@ -728,9 +868,9 @@ static int __init tn7atm_irq_request (st
|
|
||||||
* interrupt pacing
|
|
||||||
*/
|
|
||||||
ptr = prom_getenv ("sar_ipacemax");
|
|
||||||
- if (ptr)
|
|
||||||
+ if (ptr || mp_sar_ipacemax != -1)
|
|
||||||
{
|
|
||||||
- def_sar_inter_pace = os_atoi (ptr);
|
|
||||||
+ def_sar_inter_pace = mp_sar_ipacemax == -1 ? os_atoi (ptr) : mp_sar_ipacemax;
|
|
||||||
}
|
|
||||||
/* avalanche_request_pacing (priv->sar_irq, ATM_SAR_INT_PACING_BLOCK_NUM,
|
|
||||||
def_sar_inter_pace); */
|
|
||||||
@@ -878,9 +1018,18 @@ static int __init tn7atm_get_ESI (struct
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
char esi_addr[ESI_LEN] = { 0x00, 0x00, 0x11, 0x22, 0x33, 0x44 };
|
|
||||||
- char *esiaddr_str = NULL;
|
|
||||||
+ char *esiaddr_str = mp_macc;
|
|
||||||
|
|
||||||
- esiaddr_str = prom_getenv ("macc");
|
|
||||||
+ if (esiaddr_str == NULL)
|
|
||||||
+ esiaddr_str = prom_getenv ("macdsl");
|
|
||||||
+ if (esiaddr_str == NULL)
|
|
||||||
+ esiaddr_str = prom_getenv ("macc");
|
|
||||||
+ if (esiaddr_str == NULL)
|
|
||||||
+ esiaddr_str = prom_getenv ("HWA_1");
|
|
||||||
+ if (esiaddr_str == NULL)
|
|
||||||
+ esiaddr_str = prom_getenv ("macb");
|
|
||||||
+ if (esiaddr_str == NULL)
|
|
||||||
+ esiaddr_str = prom_getenv ("maca");
|
|
||||||
|
|
||||||
if (!esiaddr_str)
|
|
||||||
{
|
|
||||||
@@ -2139,15 +2288,15 @@ static int tn7atm_autoDetectDspBoost (vo
|
|
||||||
//UR8_MERGE_END CQ10450*
|
|
||||||
|
|
||||||
cp = prom_getenv ("dsp_noboost");
|
|
||||||
- if (cp)
|
|
||||||
+ if (cp || mp_dsp_noboost != -1)
|
|
||||||
{
|
|
||||||
- dsp_noboost = os_atoi (cp);
|
|
||||||
+ dsp_noboost = mp_dsp_noboost == -1 ? os_atoi (cp) : mp_dsp_noboost;
|
|
||||||
}
|
|
||||||
|
|
||||||
cp = (char *) prom_getenv ("dsp_freq");
|
|
||||||
- if (cp)
|
|
||||||
+ if (cp || mp_dsp_freq != -1)
|
|
||||||
{
|
|
||||||
- dspfreq = os_atoi (cp);
|
|
||||||
+ dspfreq = mp_dsp_freq == -1 ? os_atoi (cp) : mp_dsp_freq;
|
|
||||||
if (dspfreq == 250)
|
|
||||||
{
|
|
||||||
boostDsp = 1;
|
|
||||||
@@ -2396,15 +2545,17 @@ static int __init tn7atm_init (struct at
|
|
||||||
// Inter-Op DSL phy Control
|
|
||||||
// Note the setting of _dsl_Feature_0 and _dsl_Feature_1 must before
|
|
||||||
// dslhal_api_dslStartup (in tn7dsl_init()).
|
|
||||||
- if ((ptr = prom_getenv ("DSL_FEATURE_CNTL_0")) != NULL)
|
|
||||||
+ if ((ptr = prom_getenv ("DSL_FEATURE_CNTL_0")) != NULL || mp_featctl0 != NULL)
|
|
||||||
{
|
|
||||||
- _dsl_Feature_0 = os_atoih (ptr);
|
|
||||||
+ if (mp_featctl0 != NULL) ptr = mp_featctl0;
|
|
||||||
+ _dsl_Feature_0 = os_atoh (ptr);
|
|
||||||
_dsl_Feature_0_defined = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if ((ptr = prom_getenv ("DSL_FEATURE_CNTL_1")) != NULL)
|
|
||||||
+ if ((ptr = prom_getenv ("DSL_FEATURE_CNTL_1")) != NULL || mp_featctl1 != NULL)
|
|
||||||
{
|
|
||||||
- _dsl_Feature_1 = os_atoih (ptr);
|
|
||||||
+ if (mp_featctl1 != NULL) ptr = mp_featctl1;
|
|
||||||
+ _dsl_Feature_1 = os_atoh (ptr);
|
|
||||||
_dsl_Feature_1_defined = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -2412,15 +2563,17 @@ static int __init tn7atm_init (struct at
|
|
||||||
// DSL phy Feature Control
|
|
||||||
// Note the setting of _dsl_PhyControl_0 and _dsl_PhyControl_1 must before
|
|
||||||
// dslhal_api_dslStartup (in tn7dsl_init()).
|
|
||||||
- if ((ptr = prom_getenv ("DSL_PHY_CNTL_0")) != NULL)
|
|
||||||
+ if ((ptr = prom_getenv ("DSL_PHY_CNTL_0")) != NULL || mp_phyctl0 != NULL)
|
|
||||||
{
|
|
||||||
- _dsl_PhyControl_0 = os_atoih (ptr);
|
|
||||||
+ if (mp_phyctl0 != NULL) ptr = mp_phyctl0;
|
|
||||||
+ _dsl_PhyControl_0 = os_atoh (ptr);
|
|
||||||
_dsl_PhyControl_0_defined = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if ((ptr = prom_getenv ("DSL_PHY_CNTL_1")) != NULL)
|
|
||||||
+ if ((ptr = prom_getenv ("DSL_PHY_CNTL_1")) != NULL || mp_phyctl1 != NULL)
|
|
||||||
{
|
|
||||||
- _dsl_PhyControl_1 = os_atoih (ptr);
|
|
||||||
+ if (mp_phyctl1 != NULL) ptr = mp_phyctl1;
|
|
||||||
+ _dsl_PhyControl_1 = os_atoh (ptr);
|
|
||||||
_dsl_PhyControl_1_defined = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -2440,12 +2593,12 @@ static int __init tn7atm_init (struct at
|
|
||||||
// read config for turbo dsl
|
|
||||||
|
|
||||||
ptr = prom_getenv ("TurboDSL");
|
|
||||||
- if (ptr)
|
|
||||||
+ if (ptr || mp_turbodsl != -1)
|
|
||||||
{
|
|
||||||
#if 1 //[KT]
|
|
||||||
bTurboDsl = os_atoi (ptr);
|
|
||||||
#else
|
|
||||||
- priv->bTurboDsl = os_atoi (ptr);
|
|
||||||
+ priv->bTurboDsl = mp_turbodsl == -1 ? os_atoi (ptr) : mp_turbodsl;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else
|
|
||||||
@@ -2459,33 +2612,33 @@ static int __init tn7atm_init (struct at
|
|
||||||
priv->sarRxBuf = RX_BUFFER_NUM;
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv ("SarRxBuf");
|
|
||||||
- if (ptr)
|
|
||||||
+ if (ptr || mp_sar_rxbuf != -1)
|
|
||||||
{
|
|
||||||
- priv->sarRxBuf = os_atoi (ptr);
|
|
||||||
+ priv->sarRxBuf = mp_sar_rxbuf == -1 ? os_atoi (ptr) : mp_sar_rxbuf;
|
|
||||||
}
|
|
||||||
|
|
||||||
priv->sarRxMax = RX_SERVICE_MAX;
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv ("SarRxMax");
|
|
||||||
- if (ptr)
|
|
||||||
+ if (ptr || mp_sar_rxmax != -1)
|
|
||||||
{
|
|
||||||
- priv->sarRxMax = os_atoi (ptr);
|
|
||||||
+ priv->sarRxMax = mp_sar_rxmax == -1 ? os_atoi (ptr) : mp_sar_rxmax;
|
|
||||||
}
|
|
||||||
|
|
||||||
priv->sarTxBuf = TX_BUFFER_NUM;
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv ("SarTxBuf");
|
|
||||||
- if (ptr)
|
|
||||||
+ if (ptr || mp_sar_txbuf != -1)
|
|
||||||
{
|
|
||||||
- priv->sarTxBuf = os_atoi (ptr);
|
|
||||||
+ priv->sarTxBuf = mp_sar_txbuf == -1 ? os_atoi (ptr) : mp_sar_txbuf;
|
|
||||||
}
|
|
||||||
|
|
||||||
priv->sarTxMax = TX_SERVICE_MAX;
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv ("SarTxMax");
|
|
||||||
- if (ptr)
|
|
||||||
+ if (ptr || mp_sar_txmax != -1)
|
|
||||||
{
|
|
||||||
- priv->sarTxMax = os_atoi (ptr);
|
|
||||||
+ priv->sarTxMax = mp_sar_txmax == -1 ? os_atoi (ptr) : mp_sar_txmax;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef AR7_EFM
|
|
||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -148,6 +148,27 @@
|
|
||||||
#define NEW_TRAINING_VAL_T1413 128
|
|
||||||
#define NEW_TRAINING_VAL_MMODE 255
|
|
||||||
|
|
||||||
+extern char *mp_modulation;
|
|
||||||
+extern int mp_fine_gain_control;
|
|
||||||
+extern int mp_fine_gain_value;
|
|
||||||
+extern int mp_enable_margin_retrain;
|
|
||||||
+extern int mp_margin_threshold;
|
|
||||||
+extern int mp_enable_rate_adapt;
|
|
||||||
+extern int mp_powercutback;
|
|
||||||
+extern int mp_trellis;
|
|
||||||
+extern int mp_bitswap;
|
|
||||||
+extern int mp_maximum_bits_per_carrier;
|
|
||||||
+extern int mp_maximum_interleave_depth;
|
|
||||||
+extern int mp_pair_selection;
|
|
||||||
+extern int mp_dgas_polarity;
|
|
||||||
+extern int mp_los_alarm;
|
|
||||||
+extern char *mp_eoc_vendor_id;
|
|
||||||
+extern int mp_eoc_vendor_revision;
|
|
||||||
+extern char *mp_eoc_vendor_serialnum;
|
|
||||||
+extern char *mp_invntry_vernum;
|
|
||||||
+extern int mp_dsl_bit_tmode;
|
|
||||||
+extern int mp_high_precision;
|
|
||||||
+
|
|
||||||
int testflag1 = 0;
|
|
||||||
extern int __guDbgLevel;
|
|
||||||
extern sar_stat_t sarStat;
|
|
||||||
@@ -2933,24 +2954,24 @@ static int tn7dsl_set_dsl(void)
|
|
||||||
(unsigned char *) &oamFeature, 4);
|
|
||||||
|
|
||||||
ptr = prom_getenv("DSL_FEATURE_CNTL_0");
|
|
||||||
- if(!ptr)
|
|
||||||
- prom_setenv("DSL_FEATURE_CNTL_0", "0x00004000");
|
|
||||||
+ //if(!ptr)
|
|
||||||
+ //prom_setenv("DSL_FEATURE_CNTL_0", "0x00004000");
|
|
||||||
|
|
||||||
ptr = prom_getenv("DSL_FEATURE_CNTL_1");
|
|
||||||
- if(!ptr)
|
|
||||||
- prom_setenv("DSL_FEATURE_CNTL_1", "0x00000000");
|
|
||||||
+ //if(!ptr)
|
|
||||||
+ //prom_setenv("DSL_FEATURE_CNTL_1", "0x00000000");
|
|
||||||
|
|
||||||
ptr = prom_getenv("DSL_PHY_CNTL_0");
|
|
||||||
- if(!ptr)
|
|
||||||
- prom_setenv("DSL_PHY_CNTL_0", "0x00000400");
|
|
||||||
+ //if(!ptr)
|
|
||||||
+ //prom_setenv("DSL_PHY_CNTL_0", "0x00000400");
|
|
||||||
|
|
||||||
ptr = prom_getenv("enable_margin_retrain");
|
|
||||||
- if(!ptr)
|
|
||||||
- prom_setenv("enable_margin_retrain", "0");
|
|
||||||
+ //if(!ptr)
|
|
||||||
+ //prom_setenv("enable_margin_retrain", "0");
|
|
||||||
|
|
||||||
ptr = prom_getenv("modulation");
|
|
||||||
- if(!ptr)
|
|
||||||
- prom_setenv("modulation", "0xbf");
|
|
||||||
+ //if(!ptr)
|
|
||||||
+ //prom_setenv("modulation", "0xbf");
|
|
||||||
|
|
||||||
#define EOC_VENDOR_ID "4200534153000000"
|
|
||||||
#define EOC_VENDOR_REVISION "FW370090708b1_55"
|
|
||||||
@@ -2959,25 +2980,25 @@ static int tn7dsl_set_dsl(void)
|
|
||||||
ptr = prom_getenv("eoc_vendor_id");
|
|
||||||
if(!ptr || strcmp(ptr,EOC_VENDOR_ID) != 0 || strlen(ptr) != strlen(EOC_VENDOR_ID))
|
|
||||||
{
|
|
||||||
- if(ptr)
|
|
||||||
- prom_unsetenv("eoc_vendor_id");
|
|
||||||
- prom_setenv("eoc_vendor_id",EOC_VENDOR_ID);
|
|
||||||
+ //if(ptr)
|
|
||||||
+ //prom_unsetenv("eoc_vendor_id");
|
|
||||||
+ //prom_setenv("eoc_vendor_id",EOC_VENDOR_ID);
|
|
||||||
}
|
|
||||||
|
|
||||||
ptr = prom_getenv("eoc_vendor_revision");
|
|
||||||
if(!ptr || strcmp(ptr,EOC_VENDOR_REVISION) != 0 || strlen(ptr) != strlen(EOC_VENDOR_REVISION))
|
|
||||||
{
|
|
||||||
- if(ptr)
|
|
||||||
- prom_unsetenv("eoc_vendor_revision");
|
|
||||||
- prom_setenv("eoc_vendor_revision",EOC_VENDOR_REVISION);
|
|
||||||
+ //if(ptr)
|
|
||||||
+ //prom_unsetenv("eoc_vendor_revision");
|
|
||||||
+ //prom_setenv("eoc_vendor_revision",EOC_VENDOR_REVISION);
|
|
||||||
}
|
|
||||||
|
|
||||||
ptr = prom_getenv("eoc_vendor_serialnum");
|
|
||||||
if(!ptr || strcmp(ptr,EOC_VENDOR_SERIALNUM) != 0 || strlen(ptr) != strlen(EOC_VENDOR_SERIALNUM))
|
|
||||||
{
|
|
||||||
- if(ptr)
|
|
||||||
- prom_unsetenv("eoc_vendor_serialnum");
|
|
||||||
- prom_setenv("eoc_vendor_serialnum",EOC_VENDOR_SERIALNUM);
|
|
||||||
+ //if(ptr)
|
|
||||||
+ // prom_unsetenv("eoc_vendor_serialnum");
|
|
||||||
+ //prom_setenv("eoc_vendor_serialnum",EOC_VENDOR_SERIALNUM);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Do only if we are in the new Base PSP 7.4.*/
|
|
||||||
@@ -2994,92 +3015,88 @@ static int tn7dsl_set_dsl(void)
|
|
||||||
we clear the modulation environment variable, as this could potentially
|
|
||||||
not have the same meaning in the new mode.
|
|
||||||
*/
|
|
||||||
- prom_unsetenv("modulation");
|
|
||||||
- prom_setenv("DSL_UPG_DONE", "1");
|
|
||||||
+ //prom_unsetenv("modulation");
|
|
||||||
+ //prom_setenv("DSL_UPG_DONE", "1");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// modulation
|
|
||||||
ptr = prom_getenv("modulation");
|
|
||||||
- if (ptr)
|
|
||||||
+ if (ptr || mp_modulation != NULL)
|
|
||||||
{
|
|
||||||
- tn7dsl_set_modulation(ptr, FALSE);
|
|
||||||
+ tn7dsl_set_modulation(mp_modulation == NULL ? ptr : mp_modulation, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fine Gains
|
|
||||||
ptr = prom_getenv("fine_gain_control");
|
|
||||||
- if (ptr)
|
|
||||||
+ if (ptr || mp_fine_gain_control != -1)
|
|
||||||
{
|
|
||||||
- value = os_atoi(ptr);
|
|
||||||
+ value = mp_fine_gain_control == -1 ? os_atoi(ptr) : mp_fine_gain_control;
|
|
||||||
tn7dsl_ctrl_fineGain(value);
|
|
||||||
}
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("fine_gain_value");
|
|
||||||
- if(ptr)
|
|
||||||
- tn7dsl_set_fineGainValue(os_atoh(ptr));
|
|
||||||
+ if(ptr || mp_fine_gain_value != -1)
|
|
||||||
+ tn7dsl_set_fineGainValue(mp_fine_gain_value == -1 ? os_atoh(ptr) : mp_fine_gain_value);
|
|
||||||
|
|
||||||
// margin retrain
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("enable_margin_retrain");
|
|
||||||
- if(ptr)
|
|
||||||
+ value = mp_enable_margin_retrain == -1 ? (ptr ? os_atoi(ptr) : 0) : mp_enable_margin_retrain;
|
|
||||||
+
|
|
||||||
+ if (value == 1)
|
|
||||||
{
|
|
||||||
- value = os_atoi(ptr);
|
|
||||||
- if(value == 1)
|
|
||||||
+ dslhal_api_setMarginMonitorFlags(pIhw, 0, 1);
|
|
||||||
+ bMarginRetrainEnable = 1;
|
|
||||||
+ //printk("enable showtime margin monitor.\n");
|
|
||||||
+
|
|
||||||
+ ptr = NULL;
|
|
||||||
+ ptr = prom_getenv("margin_threshold");
|
|
||||||
+ value = mp_margin_threshold == -1 ? (ptr ? os_atoi(ptr) : 0) : mp_margin_threshold;
|
|
||||||
+
|
|
||||||
+ if(value >= 0)
|
|
||||||
{
|
|
||||||
- dslhal_api_setMarginMonitorFlags(pIhw, 0, 1);
|
|
||||||
- bMarginRetrainEnable = 1;
|
|
||||||
- //printk("enable showtime margin monitor.\n");
|
|
||||||
- ptr = NULL;
|
|
||||||
- ptr = prom_getenv("margin_threshold");
|
|
||||||
- if(ptr)
|
|
||||||
- {
|
|
||||||
- value = os_atoi(ptr);
|
|
||||||
- //printk("Set margin threshold to %d x 0.5 db\n",value);
|
|
||||||
- if(value >= 0)
|
|
||||||
- {
|
|
||||||
- dslhal_api_setMarginThreshold(pIhw, value);
|
|
||||||
- bMarginThConfig=1;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ dslhal_api_setMarginThreshold(pIhw, value);
|
|
||||||
+ bMarginThConfig=1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// rate adapt
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("enable_rate_adapt");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_enable_rate_adapt != -1)
|
|
||||||
{
|
|
||||||
- dslhal_api_setRateAdaptFlag(pIhw, os_atoi(ptr));
|
|
||||||
+ dslhal_api_setRateAdaptFlag(pIhw, mp_enable_rate_adapt == -1 ? os_atoi(ptr) : mp_enable_rate_adapt);
|
|
||||||
}
|
|
||||||
|
|
||||||
// set powercutback
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("powercutback");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_powercutback != -1)
|
|
||||||
{
|
|
||||||
- dslhal_advcfg_onOffPcb(pIhw, os_atoi(ptr));
|
|
||||||
+ dslhal_advcfg_onOffPcb(pIhw, mp_powercutback == -1 ? os_atoi(ptr) : mp_powercutback);
|
|
||||||
}
|
|
||||||
|
|
||||||
// trellis
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("trellis");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_trellis != -1)
|
|
||||||
{
|
|
||||||
- dslhal_api_setTrellisFlag(pIhw, os_atoi(ptr));
|
|
||||||
- trellis = os_atoi(ptr);
|
|
||||||
+ trellis = mp_trellis == -1 ? os_atoi(ptr) : mp_trellis;
|
|
||||||
+ dslhal_api_setTrellisFlag(pIhw, trellis);
|
|
||||||
//printk("trellis=%d\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
// bitswap
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("bitswap");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_bitswap != -1)
|
|
||||||
{
|
|
||||||
int offset[2] = {33, 0};
|
|
||||||
unsigned int bitswap;
|
|
||||||
|
|
||||||
- bitswap = os_atoi(ptr);
|
|
||||||
+ bitswap = mp_bitswap == -1 ? os_atoi(ptr) : mp_bitswap;
|
|
||||||
|
|
||||||
tn7dsl_generic_read(2, offset);
|
|
||||||
dslReg &= dslhal_support_byteSwap32(0xFFFFFF00);
|
|
||||||
@@ -3097,46 +3114,47 @@ static int tn7dsl_set_dsl(void)
|
|
||||||
// maximum bits per carrier
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("maximum_bits_per_carrier");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_maximum_bits_per_carrier != -1)
|
|
||||||
{
|
|
||||||
- dslhal_api_setMaxBitsPerCarrierUpstream(pIhw, os_atoi(ptr));
|
|
||||||
+ dslhal_api_setMaxBitsPerCarrierUpstream(pIhw, mp_maximum_bits_per_carrier == -1 ? os_atoi(ptr) : mp_maximum_bits_per_carrier);
|
|
||||||
}
|
|
||||||
|
|
||||||
// maximum interleave depth
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("maximum_interleave_depth");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_maximum_interleave_depth != -1)
|
|
||||||
{
|
|
||||||
- dslhal_api_setMaxInterleaverDepth(pIhw, os_atoi(ptr));
|
|
||||||
+ dslhal_api_setMaxInterleaverDepth(pIhw, mp_maximum_interleave_depth == -1 ? os_atoi(ptr) : mp_maximum_interleave_depth);
|
|
||||||
}
|
|
||||||
|
|
||||||
// inner and outer pairs
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("pair_selection");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_pair_selection != -1)
|
|
||||||
{
|
|
||||||
- dslhal_api_selectInnerOuterPair(pIhw, os_atoi(ptr));
|
|
||||||
+ dslhal_api_selectInnerOuterPair(pIhw, mp_pair_selection == -1 ? os_atoi(ptr) : mp_pair_selection);
|
|
||||||
}
|
|
||||||
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("dgas_polarity");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_dgas_polarity != -1)
|
|
||||||
{
|
|
||||||
dslhal_api_configureDgaspLpr(pIhw, 1, 1);
|
|
||||||
- dslhal_api_configureDgaspLpr(pIhw, 0, os_atoi(ptr));
|
|
||||||
+ dslhal_api_configureDgaspLpr(pIhw, 0, mp_dgas_polarity == -1 ? os_atoi(ptr) : mp_dgas_polarity);
|
|
||||||
}
|
|
||||||
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("los_alarm");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_los_alarm != -1)
|
|
||||||
{
|
|
||||||
- dslhal_api_disableLosAlarm(pIhw, os_atoi(ptr));
|
|
||||||
+ dslhal_api_disableLosAlarm(pIhw, mp_los_alarm == -1 ? os_atoi(ptr) : mp_los_alarm);
|
|
||||||
}
|
|
||||||
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("eoc_vendor_id");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_eoc_vendor_id != NULL)
|
|
||||||
{
|
|
||||||
+ ptr = mp_eoc_vendor_id == NULL ? ptr : mp_eoc_vendor_id;
|
|
||||||
for(i=0;i<8;i++)
|
|
||||||
{
|
|
||||||
tmp[0]=ptr[i*2];
|
|
||||||
@@ -3161,26 +3179,26 @@ static int tn7dsl_set_dsl(void)
|
|
||||||
}
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("eoc_vendor_revision");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_eoc_vendor_revision != -1)
|
|
||||||
{
|
|
||||||
- value = os_atoi(ptr);
|
|
||||||
+ value = mp_eoc_vendor_revision == -1 ? os_atoi(ptr) : mp_eoc_vendor_revision;
|
|
||||||
//printk("eoc rev=%d\n", os_atoi(ptr));
|
|
||||||
dslhal_api_setEocRevisionNumber(pIhw, (char *)&value);
|
|
||||||
|
|
||||||
}
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("eoc_vendor_serialnum");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_eoc_vendor_serialnum != NULL)
|
|
||||||
{
|
|
||||||
- dslhal_api_setEocSerialNumber(pIhw, ptr);
|
|
||||||
+ dslhal_api_setEocSerialNumber(pIhw, mp_eoc_vendor_serialnum == NULL ? ptr : mp_eoc_vendor_serialnum);
|
|
||||||
}
|
|
||||||
|
|
||||||
// CQ10037 Added invntry_vernum environment variable to be able to set version number in ADSL2, ADSL2+ modes.
|
|
||||||
ptr = NULL;
|
|
||||||
ptr = prom_getenv("invntry_vernum");
|
|
||||||
- if(ptr)
|
|
||||||
+ if(ptr || mp_invntry_vernum != NULL)
|
|
||||||
{
|
|
||||||
- dslhal_api_setEocRevisionNumber(pIhw, ptr);
|
|
||||||
+ dslhal_api_setEocRevisionNumber(pIhw, mp_invntry_vernum == NULL ? ptr : mp_invntry_vernum);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
@@ -3225,7 +3243,7 @@ int tn7dsl_init(void *priv)
|
|
||||||
* backward compatibility.
|
|
||||||
*/
|
|
||||||
cp = prom_getenv("DSL_BIT_TMODE");
|
|
||||||
- if (cp)
|
|
||||||
+ if (cp || mp_dsl_bit_tmode != -1)
|
|
||||||
{
|
|
||||||
printk("%s : env var DSL_BIT_TMODE is set\n", __FUNCTION__);
|
|
||||||
/*
|
|
||||||
@@ -3254,9 +3272,9 @@ int tn7dsl_init(void *priv)
|
|
||||||
|
|
||||||
// UR8_MERGE_START CQ11054 Jack Zhang
|
|
||||||
cp = prom_getenv("high_precision");
|
|
||||||
- if (cp)
|
|
||||||
+ if (cp || mp_high_precision != -1)
|
|
||||||
{
|
|
||||||
- high_precision_selected = os_atoi(cp);
|
|
||||||
+ high_precision_selected = mp_high_precision == -1 ? os_atoi(cp) : mp_high_precision;
|
|
||||||
}
|
|
||||||
if ( high_precision_selected)
|
|
||||||
{
|
|
||||||
--- a/tn7sar.c
|
|
||||||
+++ b/tn7sar.c
|
|
||||||
@@ -76,6 +76,8 @@ typedef void OS_SETUP;
|
|
||||||
#include "tn7atm.h"
|
|
||||||
#include "tn7api.h"
|
|
||||||
|
|
||||||
+extern int mp_oam_lb_timeout;
|
|
||||||
+extern int mp_autopvc_enable;
|
|
||||||
|
|
||||||
/* PDSP Firmware files */
|
|
||||||
#include "tnetd7300_sar_firm.h"
|
|
||||||
@@ -932,9 +934,9 @@ int tn7sar_setup_oam_channel(Tn7AtmPriva
|
|
||||||
pHalDev = (HAL_DEVICE *)priv->pSarHalDev;
|
|
||||||
|
|
||||||
pauto_pvc = prom_getenv("autopvc_enable");
|
|
||||||
- if(pauto_pvc) //CQ10273
|
|
||||||
+ if(pauto_pvc || mp_autopvc_enable != -1) //CQ10273
|
|
||||||
{
|
|
||||||
- auto_pvc =tn7sar_strtoul(pauto_pvc, NULL, 10);
|
|
||||||
+ auto_pvc = mp_autopvc_enable == -1 ? tn7sar_strtoul(pauto_pvc, NULL, 10) : mp_autopvc_enable;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(&chInfo, 0xff, sizeof(chInfo));
|
|
||||||
@@ -1133,9 +1135,9 @@ int tn7sar_init(struct atm_dev *dev, Tn7
|
|
||||||
|
|
||||||
/* read in oam lb timeout value */
|
|
||||||
pLbTimeout = prom_getenv("oam_lb_timeout");
|
|
||||||
- if(pLbTimeout)
|
|
||||||
+ if(pLbTimeout || mp_oam_lb_timeout != -1)
|
|
||||||
{
|
|
||||||
- lbTimeout =tn7sar_strtoul(pLbTimeout, NULL, 10);
|
|
||||||
+ lbTimeout = mp_oam_lb_timeout == -1 ? tn7sar_strtoul(pLbTimeout, NULL, 10) : mp_oam_lb_timeout;
|
|
||||||
oamLbTimeout = lbTimeout;
|
|
||||||
pHalFunc->Control(pHalDev,"OamLbTimeout", "Set", &lbTimeout);
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -492,7 +492,6 @@ static void avsar_release(struct device
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct device avsar = {
|
|
||||||
- .bus_id = "vlynq",
|
|
||||||
.release = avsar_release,
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -501,6 +500,8 @@ int shim_osLoadFWImage(unsigned char *pt
|
|
||||||
const struct firmware *fw_entry;
|
|
||||||
size_t size;
|
|
||||||
|
|
||||||
+ dev_set_name(&avsar, "avsar");
|
|
||||||
+
|
|
||||||
printk("requesting firmware image \"ar0700xx.bin\"\n");
|
|
||||||
if(device_register(&avsar) < 0) {
|
|
||||||
printk(KERN_ERR
|
|
||||||
@ -1,39 +0,0 @@
|
|||||||
--- a/tn7atm.c
|
|
||||||
+++ b/tn7atm.c
|
|
||||||
@@ -78,8 +78,8 @@
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
|
|
||||||
#include <asm/io.h>
|
|
||||||
-#include <asm/ar7/ar7.h>
|
|
||||||
-#include <asm/ar7/prom.h>
|
|
||||||
+#include <asm/mach-ar7/ar7.h>
|
|
||||||
+#include <asm/mach-ar7/prom.h>
|
|
||||||
|
|
||||||
#include "dsl_hal_api.h"
|
|
||||||
#ifdef AR7_EFM
|
|
||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -119,8 +119,8 @@
|
|
||||||
#include <linux/firmware.h>
|
|
||||||
|
|
||||||
#include <asm/io.h>
|
|
||||||
-#include <asm/ar7/ar7.h>
|
|
||||||
-#include <asm/ar7/prom.h>
|
|
||||||
+#include <asm/mach-ar7/ar7.h>
|
|
||||||
+#include <asm/mach-ar7/prom.h>
|
|
||||||
|
|
||||||
/* Modules specific header files */
|
|
||||||
#ifdef AR7_EFM
|
|
||||||
--- a/tn7sar.c
|
|
||||||
+++ b/tn7sar.c
|
|
||||||
@@ -55,8 +55,8 @@
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
|
|
||||||
#include <asm/io.h>
|
|
||||||
-#include <asm/ar7/ar7.h>
|
|
||||||
-#include <asm/ar7/prom.h>
|
|
||||||
+#include <asm/mach-ar7/ar7.h>
|
|
||||||
+#include <asm/mach-ar7/prom.h>
|
|
||||||
|
|
||||||
#define _CPHAL_AAL5
|
|
||||||
#define _CPHAL_SAR
|
|
||||||
@ -1,92 +0,0 @@
|
|||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -209,7 +209,7 @@ led_reg_t ledreg[2];
|
|
||||||
static struct led_funcs ledreg[2];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#define DEV_DSLMOD CTL_UNNUMBERED
|
|
||||||
+#define DEV_DSLMOD 0
|
|
||||||
#define MAX_STR_SIZE 256
|
|
||||||
#define DSL_MOD_SIZE 256
|
|
||||||
|
|
||||||
@@ -350,8 +350,8 @@ static void tn7dsl_chng_modulation(void*
|
|
||||||
static unsigned int tn7dsl_set_modulation(void* data, int flag);
|
|
||||||
static void tn7dsl_ctrl_fineGain(int value);
|
|
||||||
static void tn7dsl_set_fineGainValue(int value);
|
|
||||||
-static int dslmod_sysctl (ctl_table * ctl, int write, struct file *filp,
|
|
||||||
- void *buffer, size_t * lenp);
|
|
||||||
+static int dslmod_sysctl (ctl_table * ctl, int write, void *buffer,
|
|
||||||
+ size_t * lenp, loff_t *ppos);
|
|
||||||
static void tn7dsl_register_dslss_led(void);
|
|
||||||
void tn7dsl_dslmod_sysctl_register(void);
|
|
||||||
void tn7dsl_dslmod_sysctl_unregister(void);
|
|
||||||
@@ -3582,8 +3582,8 @@ unsigned int tn7dsl_get_memory(unsigned
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-static int dslmod_sysctl(ctl_table *ctl, int write, struct file * filp,
|
|
||||||
- void *buffer, size_t *lenp)
|
|
||||||
+static int dslmod_sysctl(ctl_table *ctl, int write, void *buffer,
|
|
||||||
+ size_t *lenp, loff_t *ppos)
|
|
||||||
{
|
|
||||||
char *ptr;
|
|
||||||
int ret, len = 0;
|
|
||||||
@@ -3595,7 +3595,7 @@ static int dslmod_sysctl(ctl_table *ctl,
|
|
||||||
char mod_req[16] = { '\t' };
|
|
||||||
char fst_byt;
|
|
||||||
|
|
||||||
- if (!*lenp || (filp->f_pos && !write))
|
|
||||||
+ if (!*lenp || (*ppos && !write))
|
|
||||||
{
|
|
||||||
*lenp = 0;
|
|
||||||
return 0;
|
|
||||||
@@ -3605,9 +3605,9 @@ static int dslmod_sysctl(ctl_table *ctl,
|
|
||||||
*/
|
|
||||||
if(write)
|
|
||||||
{
|
|
||||||
- ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
|
|
||||||
+ ret = proc_dostring(ctl, write, buffer, lenp, ppos);
|
|
||||||
|
|
||||||
- switch (ctl->ctl_name)
|
|
||||||
+ switch ((long)ctl->extra2)
|
|
||||||
{
|
|
||||||
case DEV_DSLMOD:
|
|
||||||
ptr = strpbrk(info, " \t");
|
|
||||||
@@ -3691,14 +3691,21 @@ static int dslmod_sysctl(ctl_table *ctl,
|
|
||||||
else
|
|
||||||
{
|
|
||||||
len += sprintf(info+len, mod_req);
|
|
||||||
- ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
|
|
||||||
+ ret = proc_dostring(ctl, write, buffer, lenp, ppos);
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ctl_table dslmod_table[] = {
|
|
||||||
- {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, &sysctl_string}
|
|
||||||
+ {
|
|
||||||
+ .procname = "dslmod",
|
|
||||||
+ .data = info,
|
|
||||||
+ .maxlen = DSL_MOD_SIZE,
|
|
||||||
+ .mode = 0644,
|
|
||||||
+ .proc_handler = &dslmod_sysctl,
|
|
||||||
+ .extra2 = (void *)DEV_DSLMOD,
|
|
||||||
+ }
|
|
||||||
,
|
|
||||||
{0}
|
|
||||||
};
|
|
||||||
@@ -3706,7 +3713,12 @@ ctl_table dslmod_table[] = {
|
|
||||||
/* Make sure that /proc/sys/dev is there */
|
|
||||||
ctl_table dslmod_root_table[] = {
|
|
||||||
#ifdef CONFIG_PROC_FS
|
|
||||||
- {CTL_DEV, "dev", NULL, 0, 0555, dslmod_table}
|
|
||||||
+ {
|
|
||||||
+ .procname = "dev",
|
|
||||||
+ .maxlen = 0,
|
|
||||||
+ .mode = 0555,
|
|
||||||
+ .child = dslmod_table,
|
|
||||||
+ }
|
|
||||||
,
|
|
||||||
#endif /* CONFIG_PROC_FS */
|
|
||||||
{0}
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
--- a/tn7atm.c
|
|
||||||
+++ b/tn7atm.c
|
|
||||||
@@ -2003,7 +2003,7 @@ static int __init tn7atm_register (Tn7At
|
|
||||||
|
|
||||||
dgprintf (4, "device %s being registered\n", priv->name);
|
|
||||||
|
|
||||||
- mydev = atm_dev_register (priv->proc_name, &tn7atm_ops, -1, NULL);
|
|
||||||
+ mydev = atm_dev_register (priv->proc_name, NULL, &tn7atm_ops, -1, NULL);
|
|
||||||
|
|
||||||
if (mydev == NULL)
|
|
||||||
{
|
|
||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -499,13 +499,16 @@ int shim_osLoadFWImage(unsigned char *pt
|
|
||||||
{
|
|
||||||
const struct firmware *fw_entry;
|
|
||||||
size_t size;
|
|
||||||
+ int ret;
|
|
||||||
|
|
||||||
dev_set_name(&avsar, "avsar");
|
|
||||||
|
|
||||||
printk("requesting firmware image \"ar0700xx.bin\"\n");
|
|
||||||
- if(device_register(&avsar) < 0) {
|
|
||||||
+ dev_set_name(&avsar, "avsar");
|
|
||||||
+ ret = device_register(&avsar);
|
|
||||||
+ if (ret < 0) {
|
|
||||||
printk(KERN_ERR
|
|
||||||
- "avsar: device_register fails\n");
|
|
||||||
+ "avsar: device_register fails, error%i\n", ret);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
--- a/tn7atm.c
|
|
||||||
+++ b/tn7atm.c
|
|
||||||
@@ -72,7 +72,7 @@
|
|
||||||
#include <linux/atmdev.h>
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/spinlock.h>
|
|
||||||
-#include <linux/smp_lock.h>
|
|
||||||
+#include <linux/interrupt.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/string.h>
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
--- a/tn7sar.c
|
|
||||||
+++ b/tn7sar.c
|
|
||||||
@@ -49,7 +49,7 @@
|
|
||||||
#include <linux/atmdev.h>
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/spinlock.h>
|
|
||||||
-#include <linux/smp_lock.h>
|
|
||||||
+#include <linux/interrupt.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/string.h>
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -108,7 +108,7 @@
|
|
||||||
#include <linux/atmdev.h>
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/spinlock.h>
|
|
||||||
-#include <linux/smp_lock.h>
|
|
||||||
+#include <linux/interrupt.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/string.h>
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,38 +0,0 @@
|
|||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -350,7 +350,7 @@ static void tn7dsl_chng_modulation(void*
|
|
||||||
static unsigned int tn7dsl_set_modulation(void* data, int flag);
|
|
||||||
static void tn7dsl_ctrl_fineGain(int value);
|
|
||||||
static void tn7dsl_set_fineGainValue(int value);
|
|
||||||
-static int dslmod_sysctl (ctl_table * ctl, int write, void *buffer,
|
|
||||||
+static int dslmod_sysctl (struct ctl_table * ctl, int write, void *buffer,
|
|
||||||
size_t * lenp, loff_t *ppos);
|
|
||||||
static void tn7dsl_register_dslss_led(void);
|
|
||||||
void tn7dsl_dslmod_sysctl_register(void);
|
|
||||||
@@ -3488,7 +3488,7 @@ unsigned int tn7dsl_get_memory(unsigned
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-static int dslmod_sysctl(ctl_table *ctl, int write, void *buffer,
|
|
||||||
+static int dslmod_sysctl(struct ctl_table *ctl, int write, void *buffer,
|
|
||||||
size_t *lenp, loff_t *ppos)
|
|
||||||
{
|
|
||||||
char *ptr;
|
|
||||||
@@ -3603,7 +3603,7 @@ static int dslmod_sysctl(ctl_table *ctl,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
-ctl_table dslmod_table[] = {
|
|
||||||
+struct ctl_table dslmod_table[] = {
|
|
||||||
{
|
|
||||||
.procname = "dslmod",
|
|
||||||
.data = info,
|
|
||||||
@@ -3617,7 +3617,7 @@ ctl_table dslmod_table[] = {
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Make sure that /proc/sys/dev is there */
|
|
||||||
-ctl_table dslmod_root_table[] = {
|
|
||||||
+struct ctl_table dslmod_root_table[] = {
|
|
||||||
#ifdef CONFIG_PROC_FS
|
|
||||||
{
|
|
||||||
.procname = "dev",
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
--- a/tn7atm.c
|
|
||||||
+++ b/tn7atm.c
|
|
||||||
@@ -845,7 +845,7 @@ static int __init tn7atm_irq_request (st
|
|
||||||
|
|
||||||
priv->sar_irq = LNXINTNUM (ATM_SAR_INT); /* Interrupt line # */
|
|
||||||
|
|
||||||
- if (request_irq (priv->sar_irq, tn7atm_sar_irq, IRQF_DISABLED, "SAR ", dev))
|
|
||||||
+ if (request_irq (priv->sar_irq, tn7atm_sar_irq, 0, "SAR ", dev))
|
|
||||||
printk ("Could not register tn7atm_sar_irq\n");
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -869,7 +869,7 @@ static int __init tn7atm_irq_request (st
|
|
||||||
* Reigster Receive interrupt A
|
|
||||||
*/
|
|
||||||
priv->dsl_irq = LNXINTNUM (ATM_DSL_INT); /* Interrupt line # */
|
|
||||||
- if (request_irq (priv->dsl_irq, tn7atm_dsl_irq, IRQF_DISABLED, "DSL ", dev))
|
|
||||||
+ if (request_irq (priv->dsl_irq, tn7atm_dsl_irq, 0, "DSL ", dev))
|
|
||||||
printk ("Could not register tn7atm_dsl_irq\n");
|
|
||||||
|
|
||||||
/***** VRB Tasklet Mode ****/
|
|
||||||
@ -1,63 +0,0 @@
|
|||||||
--- a/cpswhal_cpsar.h
|
|
||||||
+++ b/cpswhal_cpsar.h
|
|
||||||
@@ -437,10 +437,10 @@ typedef struct
|
|
||||||
int (*DeviceFindInfo)(int Inst, const char *DeviceName, void *DeviceInfo);
|
|
||||||
int (*DeviceFindParmUint)(void *DeviceInfo, const char *Parm, bit32u *Value);
|
|
||||||
int (*DeviceFindParmValue)(void *DeviceInfo, const char *Parm, void *Value);
|
|
||||||
- void (*Free)(void *MemPtr);
|
|
||||||
+ void (*Free)(const void *MemPtr);
|
|
||||||
void (*FreeRxBuffer)(OS_RECEIVEINFO *OsReceiveInfo, void *MemPtr);
|
|
||||||
- void (*FreeDev)(void *MemPtr);
|
|
||||||
- void (*FreeDmaXfer)(void *MemPtr);
|
|
||||||
+ void (*FreeDev)(const void *MemPtr);
|
|
||||||
+ void (*FreeDmaXfer)(const void *MemPtr);
|
|
||||||
void (*IsrRegister)(OS_DEVICE *OsDev, int (*halISR)(HAL_DEVICE*, int*), int InterruptBit);
|
|
||||||
void (*IsrUnRegister)(OS_DEVICE *OsDev, int InterruptBit);
|
|
||||||
void* (*Malloc)(bit32u size);
|
|
||||||
--- a/cpswhal_cpaal5.h
|
|
||||||
+++ b/cpswhal_cpaal5.h
|
|
||||||
@@ -436,10 +436,10 @@ typedef struct
|
|
||||||
int (*DeviceFindInfo)(int Inst, const char *DeviceName, void *DeviceInfo);
|
|
||||||
int (*DeviceFindParmUint)(void *DeviceInfo, const char *Parm, bit32u *Value);
|
|
||||||
int (*DeviceFindParmValue)(void *DeviceInfo, const char *Parm, void *Value);
|
|
||||||
- void (*Free)(void *MemPtr);
|
|
||||||
+ void (*Free)(const void *MemPtr);
|
|
||||||
void (*FreeRxBuffer)(OS_RECEIVEINFO *OsReceiveInfo, void *MemPtr);
|
|
||||||
- void (*FreeDev)(void *MemPtr);
|
|
||||||
- void (*FreeDmaXfer)(void *MemPtr);
|
|
||||||
+ void (*FreeDev)(const void *MemPtr);
|
|
||||||
+ void (*FreeDmaXfer)(const void *MemPtr);
|
|
||||||
void (*IsrRegister)(OS_DEVICE *OsDev, int (*halISR)(HAL_DEVICE*, int*), int InterruptBit);
|
|
||||||
void (*IsrUnRegister)(OS_DEVICE *OsDev, int InterruptBit);
|
|
||||||
void* (*Malloc)(bit32u size);
|
|
||||||
--- a/tn7atm.c
|
|
||||||
+++ b/tn7atm.c
|
|
||||||
@@ -2690,7 +2690,7 @@ static int tn7atm_proc_turbodsl_read(str
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int tn7atm_proc_qos_write(struct file *fp, const char *buf, unsigned long count, void *data)
|
|
||||||
+static int tn7atm_proc_qos_write(struct file *fp, const char *buf, size_t count, loff_t *data)
|
|
||||||
{
|
|
||||||
char local_buf[32];
|
|
||||||
|
|
||||||
--- a/tn7dsl.c
|
|
||||||
+++ b/tn7dsl.c
|
|
||||||
@@ -1770,7 +1770,7 @@ static int tn7dsl_proc_stats_open(struct
|
|
||||||
return single_open(file, tn7dsl_proc_stats, PDE_DATA(inode));
|
|
||||||
}
|
|
||||||
|
|
||||||
-int tn7dsl_proc_write_stats(struct file *fp, const char * buf, unsigned long count, void * data);
|
|
||||||
+int tn7dsl_proc_write_stats(struct file *fp, const char * buf, size_t count, loff_t * data);
|
|
||||||
|
|
||||||
struct file_operations tn7dsl_proc_stats_fops = {
|
|
||||||
.owner = THIS_MODULE,
|
|
||||||
@@ -4436,7 +4436,7 @@ int tn7dsl_generic_write( int offsetnum,
|
|
||||||
}
|
|
||||||
|
|
||||||
int tn7dsl_proc_write_stats (struct file *fp, const char *buf,
|
|
||||||
- unsigned long count, void *data)
|
|
||||||
+ size_t count, loff_t *data)
|
|
||||||
{
|
|
||||||
char local_buf[31];
|
|
||||||
int ret_val = 0;
|
|
||||||
@ -35,6 +35,7 @@ define KernelPackage/ath10k-ct
|
|||||||
$(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_core.ko
|
$(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_core.ko
|
||||||
AUTOLOAD:=$(call AutoProbe,ath10k_pci)
|
AUTOLOAD:=$(call AutoProbe,ath10k_pci)
|
||||||
PROVIDES:=kmod-ath10k
|
PROVIDES:=kmod-ath10k
|
||||||
|
VARIANT:=regular
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define KernelPackage/ath10k-ct/config
|
define KernelPackage/ath10k-ct/config
|
||||||
@ -42,7 +43,13 @@ define KernelPackage/ath10k-ct/config
|
|||||||
config ATH10K-CT_LEDS
|
config ATH10K-CT_LEDS
|
||||||
bool "Enable LED support"
|
bool "Enable LED support"
|
||||||
default y
|
default y
|
||||||
depends on PACKAGE_kmod-ath10k-ct
|
depends on PACKAGE_kmod-ath10k-ct || PACKAGE_kmod-ath10k-ct-smallbuffers
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/ath10k-ct-smallbuffers
|
||||||
|
$(call KernelPackage/ath10k-ct)
|
||||||
|
TITLE+= (small buffers for low-RAM devices)
|
||||||
|
VARIANT:=smallbuffers
|
||||||
endef
|
endef
|
||||||
|
|
||||||
NOSTDINC_FLAGS = \
|
NOSTDINC_FLAGS = \
|
||||||
@ -90,6 +97,10 @@ ifeq ($(CONFIG_ATH10K-CT_LEDS),y)
|
|||||||
NOSTDINC_FLAGS += -DCONFIG_ATH10K_LEDS
|
NOSTDINC_FLAGS += -DCONFIG_ATH10K_LEDS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(BUILD_VARIANT),smallbuffers)
|
||||||
|
NOSTDINC_FLAGS += -DCONFIG_ATH10K_SMALLBUFFERS
|
||||||
|
endif
|
||||||
|
|
||||||
define Build/Configure
|
define Build/Configure
|
||||||
cp $(STAGING_DIR)/usr/include/mac80211/ath/*.h $(PKG_BUILD_DIR)
|
cp $(STAGING_DIR)/usr/include/mac80211/ath/*.h $(PKG_BUILD_DIR)
|
||||||
endef
|
endef
|
||||||
@ -107,3 +118,4 @@ define Build/Compile
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call KernelPackage,ath10k-ct))
|
$(eval $(call KernelPackage,ath10k-ct))
|
||||||
|
$(eval $(call KernelPackage,ath10k-ct-smallbuffers))
|
||||||
|
|||||||
@ -0,0 +1,28 @@
|
|||||||
|
--- a/ath10k-4.19/htt.h
|
||||||
|
+++ b/ath10k-4.19/htt.h
|
||||||
|
@@ -237,7 +237,11 @@ enum htt_rx_ring_flags {
|
||||||
|
};
|
||||||
|
|
||||||
|
#define HTT_RX_RING_SIZE_MIN 128
|
||||||
|
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
||||||
|
#define HTT_RX_RING_SIZE_MAX 2048
|
||||||
|
+#else
|
||||||
|
+#define HTT_RX_RING_SIZE_MAX 512
|
||||||
|
+#endif
|
||||||
|
#define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
|
||||||
|
#define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
|
||||||
|
#define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
|
||||||
|
--- a/ath10k-5.2/htt.h
|
||||||
|
+++ b/ath10k-5.2/htt.h
|
||||||
|
@@ -225,7 +225,11 @@ enum htt_rx_ring_flags {
|
||||||
|
};
|
||||||
|
|
||||||
|
#define HTT_RX_RING_SIZE_MIN 128
|
||||||
|
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
||||||
|
#define HTT_RX_RING_SIZE_MAX 2048
|
||||||
|
+#else
|
||||||
|
+#define HTT_RX_RING_SIZE_MAX 512
|
||||||
|
+#endif
|
||||||
|
#define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
|
||||||
|
#define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
|
||||||
|
#define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
--- a/ath10k-4.19/pci.c
|
||||||
|
+++ b/ath10k-4.19/pci.c
|
||||||
|
@@ -142,7 +142,11 @@ static struct ce_attr host_ce_config_wla
|
||||||
|
.flags = CE_ATTR_FLAGS,
|
||||||
|
.src_nentries = 0,
|
||||||
|
.src_sz_max = 2048,
|
||||||
|
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
||||||
|
.dest_nentries = 512,
|
||||||
|
+#else
|
||||||
|
+ .dest_nentries = 128,
|
||||||
|
+#endif
|
||||||
|
.recv_cb = ath10k_pci_htt_htc_rx_cb,
|
||||||
|
},
|
||||||
|
|
||||||
|
@@ -151,7 +155,11 @@ static struct ce_attr host_ce_config_wla
|
||||||
|
.flags = CE_ATTR_FLAGS,
|
||||||
|
.src_nentries = 0,
|
||||||
|
.src_sz_max = 2048,
|
||||||
|
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
||||||
|
.dest_nentries = 128,
|
||||||
|
+#else
|
||||||
|
+ .dest_nentries = 64,
|
||||||
|
+#endif
|
||||||
|
.recv_cb = ath10k_pci_htc_rx_cb,
|
||||||
|
},
|
||||||
|
|
||||||
|
@@ -178,7 +186,11 @@ static struct ce_attr host_ce_config_wla
|
||||||
|
.flags = CE_ATTR_FLAGS,
|
||||||
|
.src_nentries = 0,
|
||||||
|
.src_sz_max = 512,
|
||||||
|
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
||||||
|
.dest_nentries = 512,
|
||||||
|
+#else
|
||||||
|
+ .dest_nentries = 128,
|
||||||
|
+#endif
|
||||||
|
.recv_cb = ath10k_pci_htt_rx_cb,
|
||||||
|
},
|
||||||
|
|
||||||
|
@@ -203,7 +215,11 @@ static struct ce_attr host_ce_config_wla
|
||||||
|
.flags = CE_ATTR_FLAGS,
|
||||||
|
.src_nentries = 0,
|
||||||
|
.src_sz_max = 2048,
|
||||||
|
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
||||||
|
.dest_nentries = 128,
|
||||||
|
+#else
|
||||||
|
+ .dest_nentries = 96,
|
||||||
|
+#endif
|
||||||
|
.recv_cb = ath10k_pci_pktlog_rx_cb,
|
||||||
|
},
|
||||||
|
|
||||||
|
--- a/ath10k-5.2/pci.c
|
||||||
|
+++ b/ath10k-5.2/pci.c
|
||||||
|
@@ -131,7 +131,11 @@ static struct ce_attr host_ce_config_wla
|
||||||
|
.flags = CE_ATTR_FLAGS,
|
||||||
|
.src_nentries = 0,
|
||||||
|
.src_sz_max = 2048,
|
||||||
|
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
||||||
|
.dest_nentries = 512,
|
||||||
|
+#else
|
||||||
|
+ .dest_nentries = 128,
|
||||||
|
+#endif
|
||||||
|
.recv_cb = ath10k_pci_htt_htc_rx_cb,
|
||||||
|
},
|
||||||
|
|
||||||
|
@@ -140,7 +144,11 @@ static struct ce_attr host_ce_config_wla
|
||||||
|
.flags = CE_ATTR_FLAGS,
|
||||||
|
.src_nentries = 0,
|
||||||
|
.src_sz_max = 2048,
|
||||||
|
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
||||||
|
.dest_nentries = 128,
|
||||||
|
+#else
|
||||||
|
+ .dest_nentries = 64,
|
||||||
|
+#endif
|
||||||
|
.recv_cb = ath10k_pci_htc_rx_cb,
|
||||||
|
},
|
||||||
|
|
||||||
|
@@ -167,7 +175,11 @@ static struct ce_attr host_ce_config_wla
|
||||||
|
.flags = CE_ATTR_FLAGS,
|
||||||
|
.src_nentries = 0,
|
||||||
|
.src_sz_max = 512,
|
||||||
|
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
||||||
|
.dest_nentries = 512,
|
||||||
|
+#else
|
||||||
|
+ .dest_nentries = 128,
|
||||||
|
+#endif
|
||||||
|
.recv_cb = ath10k_pci_htt_rx_cb,
|
||||||
|
},
|
||||||
|
|
||||||
|
@@ -192,7 +204,11 @@ static struct ce_attr host_ce_config_wla
|
||||||
|
.flags = CE_ATTR_FLAGS,
|
||||||
|
.src_nentries = 0,
|
||||||
|
.src_sz_max = 2048,
|
||||||
|
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
||||||
|
.dest_nentries = 128,
|
||||||
|
+#else
|
||||||
|
+ .dest_nentries = 96,
|
||||||
|
+#endif
|
||||||
|
.recv_cb = ath10k_pci_pktlog_rx_cb,
|
||||||
|
},
|
||||||
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2008 OpenWrt.org
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
|
||||||
|
|
||||||
PKG_NAME:=avila-wdt
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
define KernelPackage/avila-wdt
|
|
||||||
SUBMENU:=Other modules
|
|
||||||
TITLE:=GPIO hardware watchdog driver for modified Avila boards
|
|
||||||
DEPENDS:=@GPIO_SUPPORT @TARGET_ixp4xx
|
|
||||||
FILES:=$(PKG_BUILD_DIR)/avila-wdt.ko
|
|
||||||
AUTOLOAD:=$(call AutoLoad,10,avila-wdt)
|
|
||||||
endef
|
|
||||||
|
|
||||||
MAKE_OPTS:= \
|
|
||||||
$(KERNEL_MAKE_FLAGS) \
|
|
||||||
SUBDIRS="$(PKG_BUILD_DIR)"
|
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
$(MAKE) -C "$(LINUX_DIR)" \
|
|
||||||
$(MAKE_OPTS) \
|
|
||||||
modules
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call KernelPackage,avila-wdt))
|
|
||||||
@ -1 +0,0 @@
|
|||||||
obj-m := avila-wdt.o
|
|
||||||
@ -1,231 +0,0 @@
|
|||||||
/*
|
|
||||||
* avila-wdt.c
|
|
||||||
* Copyright (C) 2009 Felix Fietkau <nbd@nbd.name>
|
|
||||||
*
|
|
||||||
* based on:
|
|
||||||
* drivers/char/watchdog/ixp4xx_wdt.c
|
|
||||||
*
|
|
||||||
* Watchdog driver for Intel IXP4xx network processors
|
|
||||||
*
|
|
||||||
* Author: Deepak Saxena <dsaxena@plexity.net>
|
|
||||||
*
|
|
||||||
* Copyright 2004 (c) MontaVista, Software, Inc.
|
|
||||||
* Based on sa1100 driver, Copyright (C) 2000 Oleg Drokin <green@crimea.edu>
|
|
||||||
*
|
|
||||||
* This file is licensed under the terms of the GNU General Public
|
|
||||||
* License version 2. This program is licensed "as is" without any
|
|
||||||
* warranty of any kind, whether express or implied.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/moduleparam.h>
|
|
||||||
#include <linux/types.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/jiffies.h>
|
|
||||||
#include <linux/timer.h>
|
|
||||||
#include <linux/fs.h>
|
|
||||||
#include <linux/miscdevice.h>
|
|
||||||
#include <linux/watchdog.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/bitops.h>
|
|
||||||
#include <linux/uaccess.h>
|
|
||||||
#include <mach/hardware.h>
|
|
||||||
|
|
||||||
static int nowayout = WATCHDOG_NOWAYOUT;
|
|
||||||
static int heartbeat = 20; /* (secs) Default is 20 seconds */
|
|
||||||
static unsigned long wdt_status;
|
|
||||||
static atomic_t wdt_counter;
|
|
||||||
struct timer_list wdt_timer;
|
|
||||||
|
|
||||||
#define WDT_IN_USE 0
|
|
||||||
#define WDT_OK_TO_CLOSE 1
|
|
||||||
#define WDT_RUNNING 2
|
|
||||||
|
|
||||||
static void wdt_refresh(unsigned long data)
|
|
||||||
{
|
|
||||||
if (test_bit(WDT_RUNNING, &wdt_status)) {
|
|
||||||
if (atomic_dec_and_test(&wdt_counter)) {
|
|
||||||
printk(KERN_WARNING "Avila watchdog expired, expect a reboot soon!\n");
|
|
||||||
clear_bit(WDT_RUNNING, &wdt_status);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* strobe to the watchdog */
|
|
||||||
gpio_line_set(14, IXP4XX_GPIO_HIGH);
|
|
||||||
gpio_line_set(14, IXP4XX_GPIO_LOW);
|
|
||||||
|
|
||||||
mod_timer(&wdt_timer, jiffies + msecs_to_jiffies(500));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void wdt_enable(void)
|
|
||||||
{
|
|
||||||
atomic_set(&wdt_counter, heartbeat * 2);
|
|
||||||
|
|
||||||
/* Disable clock generator output on GPIO 14/15 */
|
|
||||||
*IXP4XX_GPIO_GPCLKR &= ~(1 << 8);
|
|
||||||
|
|
||||||
/* activate GPIO 14 out */
|
|
||||||
gpio_line_config(14, IXP4XX_GPIO_OUT);
|
|
||||||
gpio_line_set(14, IXP4XX_GPIO_LOW);
|
|
||||||
|
|
||||||
if (!test_bit(WDT_RUNNING, &wdt_status))
|
|
||||||
wdt_refresh(0);
|
|
||||||
set_bit(WDT_RUNNING, &wdt_status);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void wdt_disable(void)
|
|
||||||
{
|
|
||||||
/* Re-enable clock generator output on GPIO 14/15 */
|
|
||||||
*IXP4XX_GPIO_GPCLKR |= (1 << 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int avila_wdt_open(struct inode *inode, struct file *file)
|
|
||||||
{
|
|
||||||
if (test_and_set_bit(WDT_IN_USE, &wdt_status))
|
|
||||||
return -EBUSY;
|
|
||||||
|
|
||||||
clear_bit(WDT_OK_TO_CLOSE, &wdt_status);
|
|
||||||
wdt_enable();
|
|
||||||
return nonseekable_open(inode, file);
|
|
||||||
}
|
|
||||||
|
|
||||||
static ssize_t
|
|
||||||
avila_wdt_write(struct file *file, const char *data, size_t len, loff_t *ppos)
|
|
||||||
{
|
|
||||||
if (len) {
|
|
||||||
if (!nowayout) {
|
|
||||||
size_t i;
|
|
||||||
|
|
||||||
clear_bit(WDT_OK_TO_CLOSE, &wdt_status);
|
|
||||||
|
|
||||||
for (i = 0; i != len; i++) {
|
|
||||||
char c;
|
|
||||||
|
|
||||||
if (get_user(c, data + i))
|
|
||||||
return -EFAULT;
|
|
||||||
if (c == 'V')
|
|
||||||
set_bit(WDT_OK_TO_CLOSE, &wdt_status);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
wdt_enable();
|
|
||||||
}
|
|
||||||
return len;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct watchdog_info ident = {
|
|
||||||
.options = WDIOF_CARDRESET | WDIOF_MAGICCLOSE |
|
|
||||||
WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
|
|
||||||
.identity = "Avila Watchdog",
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static long avila_wdt_ioctl(struct file *file, unsigned int cmd,
|
|
||||||
unsigned long arg)
|
|
||||||
{
|
|
||||||
int ret = -ENOTTY;
|
|
||||||
int time;
|
|
||||||
|
|
||||||
switch (cmd) {
|
|
||||||
case WDIOC_GETSUPPORT:
|
|
||||||
ret = copy_to_user((struct watchdog_info *)arg, &ident,
|
|
||||||
sizeof(ident)) ? -EFAULT : 0;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WDIOC_GETSTATUS:
|
|
||||||
ret = put_user(0, (int *)arg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WDIOC_KEEPALIVE:
|
|
||||||
wdt_enable();
|
|
||||||
ret = 0;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WDIOC_SETTIMEOUT:
|
|
||||||
ret = get_user(time, (int *)arg);
|
|
||||||
if (ret)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (time <= 0 || time > 60) {
|
|
||||||
ret = -EINVAL;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
heartbeat = time;
|
|
||||||
wdt_enable();
|
|
||||||
/* Fall through */
|
|
||||||
|
|
||||||
case WDIOC_GETTIMEOUT:
|
|
||||||
ret = put_user(heartbeat, (int *)arg);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int avila_wdt_release(struct inode *inode, struct file *file)
|
|
||||||
{
|
|
||||||
if (test_bit(WDT_OK_TO_CLOSE, &wdt_status))
|
|
||||||
wdt_disable();
|
|
||||||
else
|
|
||||||
printk(KERN_CRIT "WATCHDOG: Device closed unexpectedly - "
|
|
||||||
"timer will not stop\n");
|
|
||||||
clear_bit(WDT_IN_USE, &wdt_status);
|
|
||||||
clear_bit(WDT_OK_TO_CLOSE, &wdt_status);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static const struct file_operations avila_wdt_fops = {
|
|
||||||
.owner = THIS_MODULE,
|
|
||||||
.llseek = no_llseek,
|
|
||||||
.write = avila_wdt_write,
|
|
||||||
.unlocked_ioctl = avila_wdt_ioctl,
|
|
||||||
.open = avila_wdt_open,
|
|
||||||
.release = avila_wdt_release,
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct miscdevice avila_wdt_miscdev = {
|
|
||||||
.minor = WATCHDOG_MINOR + 1,
|
|
||||||
.name = "avila_watchdog",
|
|
||||||
.fops = &avila_wdt_fops,
|
|
||||||
};
|
|
||||||
|
|
||||||
static int __init avila_wdt_init(void)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
init_timer(&wdt_timer);
|
|
||||||
wdt_timer.expires = 0;
|
|
||||||
wdt_timer.data = 0;
|
|
||||||
wdt_timer.function = wdt_refresh;
|
|
||||||
ret = misc_register(&avila_wdt_miscdev);
|
|
||||||
if (ret == 0)
|
|
||||||
printk(KERN_INFO "Avila Watchdog Timer: heartbeat %d sec\n",
|
|
||||||
heartbeat);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit avila_wdt_exit(void)
|
|
||||||
{
|
|
||||||
misc_deregister(&avila_wdt_miscdev);
|
|
||||||
del_timer(&wdt_timer);
|
|
||||||
wdt_disable();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
module_init(avila_wdt_init);
|
|
||||||
module_exit(avila_wdt_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Felix Fietkau <nbd@nbd.name>");
|
|
||||||
MODULE_DESCRIPTION("Gateworks Avila Hardware Watchdog");
|
|
||||||
|
|
||||||
module_param(heartbeat, int, 0);
|
|
||||||
MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds (default 20s)");
|
|
||||||
|
|
||||||
module_param(nowayout, int, 0);
|
|
||||||
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started");
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
|
||||||
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
|
|
||||||
|
|
||||||
@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk
|
|||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=brcm2708-gpu-fw
|
PKG_NAME:=brcm2708-gpu-fw
|
||||||
PKG_VERSION:=2019-09-17
|
PKG_VERSION:=2019-12-11
|
||||||
PKG_RELEASE:=f8e05108dbb3b5640f48b6b301296e979876836b
|
PKG_RELEASE:=0c01dbefba45a08c47f8538d5a071a0fba6b7e83
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_RELEASE)
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_RELEASE)
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ define Download/LICENCE_broadcom
|
|||||||
FILE:=$(RPI_FIRMWARE_FILE)-LICENCE.broadcom
|
FILE:=$(RPI_FIRMWARE_FILE)-LICENCE.broadcom
|
||||||
URL:=$(RPI_FIRMWARE_URL)
|
URL:=$(RPI_FIRMWARE_URL)
|
||||||
URL_FILE:=LICENCE.broadcom
|
URL_FILE:=LICENCE.broadcom
|
||||||
HASH:=ba76edfc10a248166d965b8eaf320771c44f4f432d4fce2fd31fd272e7038add
|
HASH:=c7283ff51f863d93a275c66e3b4cb08021a5dd4d8c1e7acc47d872fbe52d3d6b
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,LICENCE_broadcom))
|
$(eval $(call Download,LICENCE_broadcom))
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ define Download/bootcode_bin
|
|||||||
FILE:=$(RPI_FIRMWARE_FILE)-bootcode.bin
|
FILE:=$(RPI_FIRMWARE_FILE)-bootcode.bin
|
||||||
URL:=$(RPI_FIRMWARE_URL)
|
URL:=$(RPI_FIRMWARE_URL)
|
||||||
URL_FILE:=bootcode.bin
|
URL_FILE:=bootcode.bin
|
||||||
HASH:=2c7e8ee3f5b268e6d13dba11d970fa49f9e8a82e548d4471892e53e6628a98f1
|
HASH:=6505bbc8798698bd8f1dff30789b22289ebb865ccba7833b87705264525cbe46
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,bootcode_bin))
|
$(eval $(call Download,bootcode_bin))
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ define Download/fixup_dat
|
|||||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup.dat
|
FILE:=$(RPI_FIRMWARE_FILE)-fixup.dat
|
||||||
URL:=$(RPI_FIRMWARE_URL)
|
URL:=$(RPI_FIRMWARE_URL)
|
||||||
URL_FILE:=fixup.dat
|
URL_FILE:=fixup.dat
|
||||||
HASH:=ae76b623dea688033b39034284d463fe37ba489283634ec35f4426deb93810e2
|
HASH:=85a54bf460aa3ff0d04ee54bc606bf3af39a2c5194e519ab278cf74ecf75f7a8
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,fixup_dat))
|
$(eval $(call Download,fixup_dat))
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ define Download/fixup_cd_dat
|
|||||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup_cd.dat
|
FILE:=$(RPI_FIRMWARE_FILE)-fixup_cd.dat
|
||||||
URL:=$(RPI_FIRMWARE_URL)
|
URL:=$(RPI_FIRMWARE_URL)
|
||||||
URL_FILE:=fixup_cd.dat
|
URL_FILE:=fixup_cd.dat
|
||||||
HASH:=380549cf6c28280ebea7c6e54c2060dea2e4bd79ea8491263668c7895cbc107b
|
HASH:=4d9ffff3719fff6b14f142cbb4b3f62df175e59be4ad382b0f39830dab18d760
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,fixup_cd_dat))
|
$(eval $(call Download,fixup_cd_dat))
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ define Download/fixup_x_dat
|
|||||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup_x.dat
|
FILE:=$(RPI_FIRMWARE_FILE)-fixup_x.dat
|
||||||
URL:=$(RPI_FIRMWARE_URL)
|
URL:=$(RPI_FIRMWARE_URL)
|
||||||
URL_FILE:=fixup_x.dat
|
URL_FILE:=fixup_x.dat
|
||||||
HASH:=cda6d8719a3b044046ad7b10a40dd629bb3ba3e5fe4b5f7521ccf8ebc74488a6
|
HASH:=81aae9581c120fbbf5020fa6b84b355ed342ead7185db0916cbce7a7849307eb
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,fixup_x_dat))
|
$(eval $(call Download,fixup_x_dat))
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ define Download/fixup4_dat
|
|||||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup4.dat
|
FILE:=$(RPI_FIRMWARE_FILE)-fixup4.dat
|
||||||
URL:=$(RPI_FIRMWARE_URL)
|
URL:=$(RPI_FIRMWARE_URL)
|
||||||
URL_FILE:=fixup4.dat
|
URL_FILE:=fixup4.dat
|
||||||
HASH:=0c9e2b079a11def55083d8366fe243f145dbb8f09aab05e4e0f8e8225b8f28fb
|
HASH:=611ea1ec1384931c785687e78a50369aae3a0a29e37bed354862cf5fe6d23ade
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,fixup4_dat))
|
$(eval $(call Download,fixup4_dat))
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ define Download/fixup4cd_dat
|
|||||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup4cd.dat
|
FILE:=$(RPI_FIRMWARE_FILE)-fixup4cd.dat
|
||||||
URL:=$(RPI_FIRMWARE_URL)
|
URL:=$(RPI_FIRMWARE_URL)
|
||||||
URL_FILE:=fixup4cd.dat
|
URL_FILE:=fixup4cd.dat
|
||||||
HASH:=24ae560fa1630787409e4d1ba918636728ae6968ab75b1644e75738ed5ffa5ed
|
HASH:=f82da018c2d9fe1ec54fcfe76514dbc3b9f27f53712bb5f5b90f0d38124370eb
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,fixup4cd_dat))
|
$(eval $(call Download,fixup4cd_dat))
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ define Download/fixup4x_dat
|
|||||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup4x.dat
|
FILE:=$(RPI_FIRMWARE_FILE)-fixup4x.dat
|
||||||
URL:=$(RPI_FIRMWARE_URL)
|
URL:=$(RPI_FIRMWARE_URL)
|
||||||
URL_FILE:=fixup4x.dat
|
URL_FILE:=fixup4x.dat
|
||||||
HASH:=9858225026a3ce02018d2813f913634d11ebd34db2564bb5faaacdf25e2eb95b
|
HASH:=36c1cdb7b5ff8c39c1c0cd962ea1095f79c5c290fc11813869cbb662240386d7
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,fixup4x_dat))
|
$(eval $(call Download,fixup4x_dat))
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ define Download/start_elf
|
|||||||
FILE:=$(RPI_FIRMWARE_FILE)-start.elf
|
FILE:=$(RPI_FIRMWARE_FILE)-start.elf
|
||||||
URL:=$(RPI_FIRMWARE_URL)
|
URL:=$(RPI_FIRMWARE_URL)
|
||||||
URL_FILE:=start.elf
|
URL_FILE:=start.elf
|
||||||
HASH:=ca6225e593dc5c5fa8004405f85bfd3f2b3ba1ac5c6b215227fcab09a399c795
|
HASH:=442919907e4b7d8f007b79df1aa1e12f98e09ab393da65b48cd2b2af04301b7d
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,start_elf))
|
$(eval $(call Download,start_elf))
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ define Download/start_cd_elf
|
|||||||
FILE:=$(RPI_FIRMWARE_FILE)-start_cd.elf
|
FILE:=$(RPI_FIRMWARE_FILE)-start_cd.elf
|
||||||
URL:=$(RPI_FIRMWARE_URL)
|
URL:=$(RPI_FIRMWARE_URL)
|
||||||
URL_FILE:=start_cd.elf
|
URL_FILE:=start_cd.elf
|
||||||
HASH:=31ab1b1694d619096d25054f0f9d509edf58d781b5b323231791fbd4ad4cd5e8
|
HASH:=0942b6ab8eec7e6116a3fc366cb0d4a94b5869c429292da600f92a37e361ec8d
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,start_cd_elf))
|
$(eval $(call Download,start_cd_elf))
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ define Download/start_x_elf
|
|||||||
FILE:=$(RPI_FIRMWARE_FILE)-start_x.elf
|
FILE:=$(RPI_FIRMWARE_FILE)-start_x.elf
|
||||||
URL:=$(RPI_FIRMWARE_URL)
|
URL:=$(RPI_FIRMWARE_URL)
|
||||||
URL_FILE:=start_x.elf
|
URL_FILE:=start_x.elf
|
||||||
HASH:=b76e8f08643d30ac01402c457f369468a386240ea1022d3a6448cdbfd1257ee2
|
HASH:=e83dc1fbb5a9cb29e1db5f9ca0f9bd847f5b57a1e421cc79e39640a865456fe6
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,start_x_elf))
|
$(eval $(call Download,start_x_elf))
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ define Download/start4_elf
|
|||||||
FILE:=$(RPI_FIRMWARE_FILE)-start4.elf
|
FILE:=$(RPI_FIRMWARE_FILE)-start4.elf
|
||||||
URL:=$(RPI_FIRMWARE_URL)
|
URL:=$(RPI_FIRMWARE_URL)
|
||||||
URL_FILE:=start4.elf
|
URL_FILE:=start4.elf
|
||||||
HASH:=c19b943fe0fed7dbee5a4743f68ba4b9882c241cbcde1d9328718bcb300571a2
|
HASH:=550b55577075f4056a71b0faa2b1150290b2e8d61e5bc330a54452f28cc1b2d8
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,start4_elf))
|
$(eval $(call Download,start4_elf))
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ define Download/start4cd_elf
|
|||||||
FILE:=$(RPI_FIRMWARE_FILE)-start4cd.elf
|
FILE:=$(RPI_FIRMWARE_FILE)-start4cd.elf
|
||||||
URL:=$(RPI_FIRMWARE_URL)
|
URL:=$(RPI_FIRMWARE_URL)
|
||||||
URL_FILE:=start4cd.elf
|
URL_FILE:=start4cd.elf
|
||||||
HASH:=890cf686984924fa65a80766322a96f2520eb6736563f010d63dfa24d67c3c12
|
HASH:=1c8206a854fba486b7996aa3735aaca8aaeee7bf20fdbf190acdea4516794f1c
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,start4cd_elf))
|
$(eval $(call Download,start4cd_elf))
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ define Download/start4x_elf
|
|||||||
FILE:=$(RPI_FIRMWARE_FILE)-start4x.elf
|
FILE:=$(RPI_FIRMWARE_FILE)-start4x.elf
|
||||||
URL:=$(RPI_FIRMWARE_URL)
|
URL:=$(RPI_FIRMWARE_URL)
|
||||||
URL_FILE:=start4x.elf
|
URL_FILE:=start4x.elf
|
||||||
HASH:=2c61e4def4fb088e5f9a6c70478b0ea4cb11107f6af2e1c754e5c0ddd50e9d33
|
HASH:=3ca2e259861fd31b77a536ccb33637e5305ec44b9e0c62e898e7e1d97e776f22
|
||||||
endef
|
endef
|
||||||
$(eval $(call Download,start4x_elf))
|
$(eval $(call Download,start4x_elf))
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user