diff --git a/packages/base/all/vendor-config-onl/src/lib/platform-config-defaults-x86-64.yml b/packages/base/all/vendor-config-onl/src/lib/platform-config-defaults-x86-64.yml
index 114ca762..eb446a9c 100644
--- a/packages/base/all/vendor-config-onl/src/lib/platform-config-defaults-x86-64.yml
+++ b/packages/base/all/vendor-config-onl/src/lib/platform-config-defaults-x86-64.yml
@@ -19,25 +19,13 @@ default:
# this is mostly to *reject* invalid disk labels,
# since we will never create our own
- kernel-3.2: &kernel-3-2
- =: kernel-3.2-deb7-x86_64-all
- package: onl-kernel-3.2-deb7-x86-64-all:amd64
-
- kernel-3.9.6: &kernel-3-9-6
- =: kernel-3.9.6-x86-64-all
- package: onl-kernel-3.9.6-x86-64-all:amd64
-
- kernel-3.18: &kernel-3-18
- =: kernel-3.18-x86_64-all
- package: onl-kernel-3.18-x86-64-all:amd64
-
kernel-3.16: &kernel-3-16
=: kernel-3.16-lts-x86_64-all
package: onl-kernel-3.16-lts-x86-64-all:amd64
# pick one of the above kernels
kernel:
- <<: *kernel-3-2
+ <<: *kernel-3-16
# GRUB command line arguments for 'serial' declaration
# this is equivalent to, but not in the same format as,
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/.gitignore b/packages/base/any/kernels/3.2.65-1+deb7u2/.gitignore
deleted file mode 100644
index 88a4b311..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-linux-3.2.65-1+deb7u2
-linux-3.2.65-1+deb7u2-mbuild
-linux-3.2.65-1+deb7u2-dtbs
-
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/configs/powerpc-e500v-all/.gitignore b/packages/base/any/kernels/3.2.65-1+deb7u2/configs/powerpc-e500v-all/.gitignore
deleted file mode 100644
index 921a8fc4..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/configs/powerpc-e500v-all/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-kernel-3.2-deb7-powerpc-e500-all*
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/configs/powerpc-e500v-all/Makefile b/packages/base/any/kernels/3.2.65-1+deb7u2/configs/powerpc-e500v-all/Makefile
deleted file mode 100644
index 9d66ae1e..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/configs/powerpc-e500v-all/Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-############################################################
-#
-#
-# Copyright 2015 Big Switch Networks, Inc.
-#
-# Licensed under the Eclipse Public License, Version 1.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
-# either express or implied. See the License for the specific
-# language governing permissions and limitations under the
-# License.
-#
-#
-############################################################
-#
-# Default 3.2.65-1+deb7u2 configuration for PowerPC e500v platforms.
-#
-############################################################
-THIS_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
-include $(ONL)/make/config.mk
-
-ifndef K_TARGET_DIR
-K_TARGET_DIR := $(THIS_DIR)
-endif
-
-include ../../kconfig.mk
-K_CONFIG := powerpc-e500v-all.config
-K_BUILD_TARGET := uImage
-K_COPY_SRC := vmlinux.bin.gz
-ifndef K_COPY_DST
-K_COPY_DST := kernel-3.2-deb7-powerpc-e500-all.bin.gz
-endif
-
-export ARCH=powerpc
-DTS_LIST := powerpc-quanta-lb9-r0 powerpc-quanta-ly2-r0 powerpc-accton-as4600-54t-r0 powerpc-accton-as5610-52x-r0 powerpc-dni-7448-r0 powerpc-dell-s4810-p2020-r0
-
-include $(ONL)/make/kbuild.mk
-
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/configs/powerpc-e500v-all/powerpc-e500v-all.config b/packages/base/any/kernels/3.2.65-1+deb7u2/configs/powerpc-e500v-all/powerpc-e500v-all.config
deleted file mode 100644
index 80590231..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/configs/powerpc-e500v-all/powerpc-e500v-all.config
+++ /dev/null
@@ -1,2365 +0,0 @@
-#
-# Automatically generated file; DO NOT EDIT.
-# Linux/powerpc 3.2.65 Kernel Configuration
-#
-# CONFIG_PPC64 is not set
-
-#
-# Processor support
-#
-# CONFIG_PPC_BOOK3S_32 is not set
-CONFIG_PPC_85xx=y
-# CONFIG_PPC_8xx is not set
-# CONFIG_40x is not set
-# CONFIG_44x is not set
-# CONFIG_E200 is not set
-CONFIG_E500=y
-# CONFIG_PPC_E500MC is not set
-CONFIG_FSL_EMB_PERFMON=y
-CONFIG_FSL_EMB_PERF_EVENT=y
-CONFIG_FSL_EMB_PERF_EVENT_E500=y
-CONFIG_BOOKE=y
-CONFIG_FSL_BOOKE=y
-CONFIG_PPC_FSL_BOOK3E=y
-# CONFIG_PHYS_64BIT is not set
-CONFIG_SPE=y
-CONFIG_PPC_MMU_NOHASH=y
-CONFIG_PPC_BOOK3E_MMU=y
-# CONFIG_PPC_MM_SLICES is not set
-CONFIG_SMP=y
-CONFIG_NR_CPUS=8
-CONFIG_PPC32=y
-CONFIG_32BIT=y
-CONFIG_WORD_SIZE=32
-# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
-# CONFIG_ARCH_DMA_ADDR_T_64BIT is not set
-CONFIG_MMU=y
-CONFIG_GENERIC_CMOS_UPDATE=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
-# CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK is not set
-CONFIG_NR_IRQS=512
-CONFIG_STACKTRACE_SUPPORT=y
-CONFIG_HAVE_LATENCYTOP_SUPPORT=y
-CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-CONFIG_LOCKDEP_SUPPORT=y
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_ARCH_HAS_ILOG2_U32=y
-CONFIG_GENERIC_HWEIGHT=y
-CONFIG_GENERIC_GPIO=y
-# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
-CONFIG_PPC=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_GENERIC_NVRAM=y
-CONFIG_SCHED_OMIT_FRAME_POINTER=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_PPC_OF=y
-CONFIG_PPC_UDBG_16550=y
-CONFIG_GENERIC_TBSYNC=y
-CONFIG_AUDIT_ARCH=y
-CONFIG_GENERIC_BUG=y
-# CONFIG_EPAPR_BOOT is not set
-CONFIG_DEFAULT_UIMAGE=y
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-# CONFIG_PPC_DCR_NATIVE is not set
-# CONFIG_PPC_DCR_MMIO is not set
-CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
-CONFIG_PPC_ADV_DEBUG_REGS=y
-CONFIG_PPC_ADV_DEBUG_IACS=2
-CONFIG_PPC_ADV_DEBUG_DACS=2
-CONFIG_PPC_ADV_DEBUG_DVCS=0
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-CONFIG_HAVE_IRQ_WORK=y
-CONFIG_IRQ_WORK=y
-
-#
-# General setup
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-CONFIG_CROSS_COMPILE="powerpc-linux-gnu-"
-CONFIG_LOCALVERSION="-1+deb7u2-OpenNetworkLinux"
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_DEFAULT_HOSTNAME="(none)"
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_SYSVIPC_SYSCTL=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_POSIX_MQUEUE_SYSCTL=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-# CONFIG_FHANDLE is not set
-# CONFIG_TASKSTATS is not set
-CONFIG_AUDIT=y
-# CONFIG_AUDITSYSCALL is not set
-CONFIG_HAVE_GENERIC_HARDIRQS=y
-
-#
-# IRQ subsystem
-#
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_HAVE_SPARSE_IRQ=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
-CONFIG_SPARSE_IRQ=y
-
-#
-# RCU Subsystem
-#
-CONFIG_TREE_RCU=y
-# CONFIG_PREEMPT_RCU is not set
-# CONFIG_RCU_TRACE is not set
-CONFIG_RCU_FANOUT=32
-# CONFIG_RCU_FANOUT_EXACT is not set
-# CONFIG_RCU_FAST_NO_HZ is not set
-# CONFIG_TREE_RCU_TRACE is not set
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-CONFIG_LOG_BUF_SHIFT=17
-# CONFIG_CGROUPS is not set
-# CONFIG_NAMESPACES is not set
-# CONFIG_SCHED_AUTOGROUP is not set
-# CONFIG_SYSFS_DEPRECATED is not set
-# CONFIG_RELAY is not set
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_RD_GZIP=y
-# CONFIG_RD_BZIP2 is not set
-# CONFIG_RD_LZMA is not set
-# CONFIG_RD_XZ is not set
-# CONFIG_RD_LZO is not set
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-CONFIG_SYSCTL=y
-CONFIG_ANON_INODES=y
-CONFIG_EXPERT=y
-CONFIG_SYSCTL_SYSCALL=y
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SIGNALFD=y
-CONFIG_TIMERFD=y
-CONFIG_EVENTFD=y
-CONFIG_SHMEM=y
-CONFIG_AIO=y
-CONFIG_EMBEDDED=y
-CONFIG_HAVE_PERF_EVENTS=y
-
-#
-# Kernel Performance Events And Counters
-#
-CONFIG_PERF_EVENTS=y
-# CONFIG_PERF_COUNTERS is not set
-# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_PCI_QUIRKS=y
-CONFIG_SLUB_DEBUG=y
-CONFIG_COMPAT_BRK=y
-# CONFIG_SLAB is not set
-CONFIG_SLUB=y
-# CONFIG_SLOB is not set
-# CONFIG_PROFILING is not set
-CONFIG_HAVE_OPROFILE=y
-# CONFIG_KPROBES is not set
-# CONFIG_JUMP_LABEL is not set
-CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
-CONFIG_HAVE_IOREMAP_PROT=y
-CONFIG_HAVE_KPROBES=y
-CONFIG_HAVE_KRETPROBES=y
-CONFIG_HAVE_ARCH_TRACEHOOK=y
-CONFIG_HAVE_DMA_ATTRS=y
-CONFIG_USE_GENERIC_SMP_HELPERS=y
-CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
-CONFIG_HAVE_CLK=y
-CONFIG_HAVE_DMA_API_DEBUG=y
-CONFIG_HAVE_ARCH_JUMP_LABEL=y
-CONFIG_HAVE_RCU_TABLE_FREE=y
-CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y
-
-#
-# GCOV-based kernel profiling
-#
-# CONFIG_GCOV_KERNEL is not set
-# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
-CONFIG_SLABINFO=y
-CONFIG_RT_MUTEXES=y
-CONFIG_BASE_SMALL=0
-CONFIG_MODULES=y
-# CONFIG_MODULE_FORCE_LOAD is not set
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-# CONFIG_MODVERSIONS is not set
-# CONFIG_MODULE_SRCVERSION_ALL is not set
-CONFIG_STOP_MACHINE=y
-CONFIG_BLOCK=y
-CONFIG_LBDAF=y
-# CONFIG_BLK_DEV_BSG is not set
-# CONFIG_BLK_DEV_BSGLIB is not set
-# CONFIG_BLK_DEV_INTEGRITY is not set
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_DEADLINE is not set
-CONFIG_DEFAULT_CFQ=y
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="cfq"
-# CONFIG_INLINE_SPIN_TRYLOCK is not set
-# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
-# CONFIG_INLINE_SPIN_LOCK is not set
-# CONFIG_INLINE_SPIN_LOCK_BH is not set
-# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
-# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
-CONFIG_INLINE_SPIN_UNLOCK=y
-# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
-CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
-# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
-# CONFIG_INLINE_READ_TRYLOCK is not set
-# CONFIG_INLINE_READ_LOCK is not set
-# CONFIG_INLINE_READ_LOCK_BH is not set
-# CONFIG_INLINE_READ_LOCK_IRQ is not set
-# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
-CONFIG_INLINE_READ_UNLOCK=y
-# CONFIG_INLINE_READ_UNLOCK_BH is not set
-CONFIG_INLINE_READ_UNLOCK_IRQ=y
-# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
-# CONFIG_INLINE_WRITE_TRYLOCK is not set
-# CONFIG_INLINE_WRITE_LOCK is not set
-# CONFIG_INLINE_WRITE_LOCK_BH is not set
-# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
-# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
-CONFIG_INLINE_WRITE_UNLOCK=y
-# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
-CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
-# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
-CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
-CONFIG_MUTEX_SPIN_ON_OWNER=y
-# CONFIG_FREEZER is not set
-CONFIG_PPC_MSI_BITMAP=y
-# CONFIG_PPC_XICS is not set
-# CONFIG_PPC_ICP_NATIVE is not set
-# CONFIG_PPC_ICP_HV is not set
-# CONFIG_PPC_ICS_RTAS is not set
-
-#
-# Platform support
-#
-# CONFIG_PPC_CELL is not set
-# CONFIG_PPC_CELL_NATIVE is not set
-# CONFIG_PQ2ADS is not set
-CONFIG_FSL_SOC_BOOKE=y
-# CONFIG_MPC8540_ADS is not set
-# CONFIG_MPC8560_ADS is not set
-# CONFIG_MPC85xx_CDS is not set
-# CONFIG_MPC85xx_MDS is not set
-# CONFIG_MPC8536_DS is not set
-# CONFIG_MPC85xx_DS is not set
-CONFIG_MPC85xx_RDB=y
-# CONFIG_P1010_RDB is not set
-# CONFIG_P1022_DS is not set
-# CONFIG_P1023_RDS is not set
-# CONFIG_SOCRATES is not set
-# CONFIG_KSI8560 is not set
-# CONFIG_XES_MPC85xx is not set
-# CONFIG_STX_GP3 is not set
-# CONFIG_TQM8540 is not set
-# CONFIG_TQM8541 is not set
-# CONFIG_TQM8548 is not set
-# CONFIG_TQM8555 is not set
-# CONFIG_TQM8560 is not set
-# CONFIG_SBC8548 is not set
-# CONFIG_SBC8560 is not set
-# CONFIG_P2041_RDB is not set
-# CONFIG_P3041_DS is not set
-# CONFIG_P3060_QDS is not set
-# CONFIG_P4080_DS is not set
-# CONFIG_ACCTON_AS4600_54T is not set
-# CONFIG_ACCTON_AS5610_52X is not set
-# CONFIG_ACCTON_AS6701_32X is not set
-# CONFIG_ACCTON_5652 is not set
-# CONFIG_BCM98548XMC is not set
-# CONFIG_CEL_P2020 is not set
-# CONFIG_CEL_REDSTONE is not set
-# CONFIG_CEL_KENNISIS is not set
-# CONFIG_CEL_SMALLSTONE is not set
-# CONFIG_CUMULUS_P2020 is not set
-# CONFIG_DNI_6448 is not set
-CONFIG_DNI_7448=y
-# CONFIG_DNI_C7448N is not set
-# CONFIG_QUANTA_LB8 is not set
-CONFIG_QUANTA_LB9=y
-# CONFIG_QUANTA_LY2_LY2R is not set
-# CONFIG_QUANTA_LY2 is not set
-# CONFIG_QUANTA_LY2R is not set
-# CONFIG_QUANTA_LY6_P2020 is not set
-# CONFIG_P5020_DS is not set
-# CONFIG_PPC_WSP is not set
-# CONFIG_KVM_GUEST is not set
-CONFIG_PPC_SMP_MUXED_IPI=y
-# CONFIG_IPIC is not set
-CONFIG_MPIC=y
-# CONFIG_PPC_EPAPR_HV_PIC is not set
-# CONFIG_MPIC_WEIRD is not set
-CONFIG_PPC_I8259=y
-# CONFIG_PPC_RTAS is not set
-# CONFIG_MMIO_NVRAM is not set
-# CONFIG_MPIC_U3_HT_IRQS is not set
-# CONFIG_PPC_MPC106 is not set
-# CONFIG_PPC_970_NAP is not set
-# CONFIG_PPC_P7_NAP is not set
-
-#
-# CPU Frequency scaling
-#
-# CONFIG_CPU_FREQ is not set
-# CONFIG_QUICC_ENGINE is not set
-CONFIG_CPM2=y
-CONFIG_FSL_ULI1575=y
-CONFIG_CPM=y
-# CONFIG_SIMPLE_GPIO is not set
-
-#
-# Kernel options
-#
-CONFIG_HIGHMEM=y
-CONFIG_TICK_ONESHOT=y
-CONFIG_NO_HZ=y
-CONFIG_HIGH_RES_TIMERS=y
-CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_300 is not set
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-CONFIG_SCHED_HRTICK=y
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-CONFIG_BINFMT_ELF=y
-CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
-# CONFIG_HAVE_AOUT is not set
-CONFIG_BINFMT_MISC=m
-CONFIG_MATH_EMULATION=y
-CONFIG_IOMMU_HELPER=y
-CONFIG_SWIOTLB=y
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-CONFIG_ARCH_HAS_WALK_MEMORY=y
-CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
-CONFIG_KEXEC=y
-CONFIG_CRASH_DUMP=y
-CONFIG_IRQ_ALL_CPUS=y
-CONFIG_MAX_ACTIVE_REGIONS=32
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_ARCH_POPULATES_NODE_MAP=y
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-CONFIG_HAVE_MEMBLOCK=y
-CONFIG_PAGEFLAGS_EXTENDED=y
-CONFIG_SPLIT_PTLOCK_CPUS=4
-# CONFIG_COMPACTION is not set
-CONFIG_MIGRATION=y
-# CONFIG_PHYS_ADDR_T_64BIT is not set
-CONFIG_ZONE_DMA_FLAG=1
-CONFIG_BOUNCE=y
-CONFIG_VIRT_TO_BUS=y
-# CONFIG_KSM is not set
-CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
-# CONFIG_CLEANCACHE is not set
-CONFIG_PPC_4K_PAGES=y
-CONFIG_FORCE_MAX_ZONEORDER=11
-# CONFIG_CMDLINE_BOOL is not set
-CONFIG_EXTRA_TARGETS=""
-# CONFIG_HIBERNATION is not set
-# CONFIG_PM_RUNTIME is not set
-CONFIG_SECCOMP=y
-CONFIG_ISA_DMA_API=y
-
-#
-# Bus options
-#
-CONFIG_ZONE_DMA=y
-# CONFIG_NEED_DMA_MAP_STATE is not set
-CONFIG_NEED_SG_DMA_LENGTH=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_PPC_INDIRECT_PCI=y
-CONFIG_FSL_SOC=y
-CONFIG_FSL_PCI=y
-CONFIG_FSL_LBC=y
-# CONFIG_HAS_FSL_PAMU is not set
-# CONFIG_HAS_FSL_QBMAN is not set
-CONFIG_PPC_PCI_CHOICE=y
-CONFIG_PCI=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_PCI_SYSCALL=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_PCIEAER=y
-# CONFIG_PCIE_ECRC is not set
-# CONFIG_PCIEAER_INJECT is not set
-CONFIG_PCIEASPM=y
-# CONFIG_PCIEASPM_DEBUG is not set
-CONFIG_ARCH_SUPPORTS_MSI=y
-CONFIG_PCI_MSI=y
-# CONFIG_PCI_DEBUG is not set
-# CONFIG_PCI_STUB is not set
-# CONFIG_PCI_IOV is not set
-# CONFIG_PCI_PRI is not set
-# CONFIG_PCI_PASID is not set
-# CONFIG_PCCARD is not set
-# CONFIG_HOTPLUG_PCI is not set
-# CONFIG_HAS_RAPIDIO is not set
-# CONFIG_RAPIDIO is not set
-
-#
-# Advanced setup
-#
-CONFIG_ADVANCED_OPTIONS=y
-# CONFIG_LOWMEM_SIZE_BOOL is not set
-CONFIG_LOWMEM_SIZE=0x30000000
-# CONFIG_LOWMEM_CAM_NUM_BOOL is not set
-CONFIG_LOWMEM_CAM_NUM=3
-CONFIG_RELOCATABLE=y
-# CONFIG_PAGE_OFFSET_BOOL is not set
-CONFIG_PAGE_OFFSET=0xc0000000
-# CONFIG_KERNEL_START_BOOL is not set
-CONFIG_KERNEL_START=0xc0000000
-# CONFIG_PHYSICAL_START_BOOL is not set
-CONFIG_PHYSICAL_START=0x00000000
-CONFIG_PHYSICAL_ALIGN=0x04000000
-# CONFIG_TASK_SIZE_BOOL is not set
-CONFIG_TASK_SIZE=0xc0000000
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-# CONFIG_XFRM_USER is not set
-# CONFIG_XFRM_SUB_POLICY is not set
-# CONFIG_XFRM_MIGRATE is not set
-# CONFIG_XFRM_STATISTICS is not set
-CONFIG_NET_KEY=y
-# CONFIG_NET_KEY_MIGRATE is not set
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-# CONFIG_IP_FIB_TRIE_STATS is not set
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE_DEMUX is not set
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_XFRM_TUNNEL is not set
-# CONFIG_INET_TUNNEL is not set
-# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
-# CONFIG_INET_XFRM_MODE_TUNNEL is not set
-# CONFIG_INET_XFRM_MODE_BEET is not set
-# CONFIG_INET_LRO is not set
-CONFIG_INET_DIAG=y
-CONFIG_INET_TCP_DIAG=y
-# CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_CUBIC=y
-CONFIG_DEFAULT_TCP_CONG="cubic"
-# CONFIG_TCP_MD5SIG is not set
-CONFIG_IPV6=y
-# CONFIG_IPV6_PRIVACY is not set
-# CONFIG_IPV6_ROUTER_PREF is not set
-# CONFIG_IPV6_OPTIMISTIC_DAD is not set
-# CONFIG_INET6_AH is not set
-# CONFIG_INET6_ESP is not set
-# CONFIG_INET6_IPCOMP is not set
-# CONFIG_IPV6_MIP6 is not set
-# CONFIG_INET6_XFRM_TUNNEL is not set
-# CONFIG_INET6_TUNNEL is not set
-# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
-# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
-# CONFIG_INET6_XFRM_MODE_BEET is not set
-# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
-# CONFIG_IPV6_SIT is not set
-# CONFIG_IPV6_TUNNEL is not set
-# CONFIG_IPV6_MULTIPLE_TABLES is not set
-# CONFIG_IPV6_MROUTE is not set
-# CONFIG_NETWORK_SECMARK is not set
-# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_NETFILTER_ADVANCED=y
-
-#
-# Core Netfilter Configuration
-#
-# CONFIG_NETFILTER_NETLINK_QUEUE is not set
-# CONFIG_NETFILTER_NETLINK_LOG is not set
-# CONFIG_NF_CONNTRACK is not set
-CONFIG_NETFILTER_XTABLES=y
-
-#
-# Xtables combined modules
-#
-# CONFIG_NETFILTER_XT_MARK is not set
-
-#
-# Xtables targets
-#
-# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set
-# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
-# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set
-# CONFIG_NETFILTER_XT_TARGET_LED is not set
-# CONFIG_NETFILTER_XT_TARGET_MARK is not set
-# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
-# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
-# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set
-# CONFIG_NETFILTER_XT_TARGET_TEE is not set
-# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
-# CONFIG_NETFILTER_XT_TARGET_ERSPAN is not set
-# CONFIG_NETFILTER_XT_TARGET_SPAN is not set
-# CONFIG_NETFILTER_XT_TARGET_POLICE is not set
-# CONFIG_NETFILTER_XT_TARGET_TRICOLORPOLICE is not set
-# CONFIG_NETFILTER_XT_TARGET_SETCLASS is not set
-# CONFIG_NETFILTER_XT_TARGET_SETQOS is not set
-
-#
-# Xtables matches
-#
-# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set
-# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
-# CONFIG_NETFILTER_XT_MATCH_CPU is not set
-# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
-# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set
-# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
-# CONFIG_NETFILTER_XT_MATCH_ESP is not set
-# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
-CONFIG_NETFILTER_XT_MATCH_HL=y
-# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set
-# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
-# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
-# CONFIG_NETFILTER_XT_MATCH_MAC is not set
-# CONFIG_NETFILTER_XT_MATCH_MARK is not set
-# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
-# CONFIG_NETFILTER_XT_MATCH_OWNER is not set
-# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
-# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
-# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
-# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
-# CONFIG_NETFILTER_XT_MATCH_REALM is not set
-# CONFIG_NETFILTER_XT_MATCH_RECENT is not set
-CONFIG_NETFILTER_XT_MATCH_SCTP=y
-# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
-# CONFIG_NETFILTER_XT_MATCH_STRING is not set
-# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
-# CONFIG_NETFILTER_XT_MATCH_TIME is not set
-# CONFIG_NETFILTER_XT_MATCH_U32 is not set
-# CONFIG_IP_VS is not set
-
-#
-# IP: Netfilter Configuration
-#
-# CONFIG_NF_DEFRAG_IPV4 is not set
-# CONFIG_IP_NF_QUEUE is not set
-CONFIG_IP_NF_IPTABLES=y
-CONFIG_IP_NF_MATCH_AH=y
-CONFIG_IP_NF_MATCH_ECN=y
-CONFIG_IP_NF_MATCH_TTL=y
-CONFIG_IP_NF_FILTER=y
-CONFIG_IP_NF_TARGET_REJECT=y
-# CONFIG_IP_NF_TARGET_LOG is not set
-# CONFIG_IP_NF_TARGET_ULOG is not set
-# CONFIG_IP_NF_MANGLE is not set
-# CONFIG_IP_NF_RAW is not set
-CONFIG_IP_NF_ARPTABLES=y
-CONFIG_IP_NF_ARPFILTER=y
-# CONFIG_IP_NF_ARP_MANGLE is not set
-
-#
-# IPv6: Netfilter Configuration
-#
-# CONFIG_NF_DEFRAG_IPV6 is not set
-# CONFIG_IP6_NF_QUEUE is not set
-CONFIG_IP6_NF_IPTABLES=y
-CONFIG_IP6_NF_MATCH_AH=y
-CONFIG_IP6_NF_MATCH_EUI64=y
-CONFIG_IP6_NF_MATCH_FRAG=y
-CONFIG_IP6_NF_MATCH_OPTS=y
-CONFIG_IP6_NF_MATCH_HL=y
-CONFIG_IP6_NF_MATCH_IPV6HEADER=y
-CONFIG_IP6_NF_MATCH_MH=y
-CONFIG_IP6_NF_MATCH_RT=y
-# CONFIG_IP6_NF_TARGET_LOG is not set
-CONFIG_IP6_NF_FILTER=y
-CONFIG_IP6_NF_TARGET_REJECT=y
-# CONFIG_IP6_NF_MANGLE is not set
-# CONFIG_IP6_NF_RAW is not set
-# CONFIG_IP_DCCP is not set
-CONFIG_IP_SCTP=y
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-# CONFIG_RDS is not set
-# CONFIG_TIPC is not set
-# CONFIG_ATM is not set
-# CONFIG_L2TP is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_NET_DSA is not set
-CONFIG_VLAN_8021Q=y
-# CONFIG_VLAN_8021Q_GVRP is not set
-# CONFIG_VLAN_8021Q_MVRP is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_PHONET is not set
-# CONFIG_IEEE802154 is not set
-# CONFIG_NET_SCHED is not set
-# CONFIG_DCB is not set
-# CONFIG_BATMAN_ADV is not set
-CONFIG_RPS=y
-CONFIG_RFS_ACCEL=y
-CONFIG_XPS=y
-CONFIG_BQL=y
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_CAN is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
-# CONFIG_AF_RXRPC is not set
-CONFIG_FIB_RULES=y
-# CONFIG_WIRELESS is not set
-# CONFIG_WIMAX is not set
-# CONFIG_RFKILL is not set
-# CONFIG_NET_9P is not set
-# CONFIG_CAIF is not set
-# CONFIG_CEPH_LIB is not set
-# CONFIG_NFC is not set
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-CONFIG_DEVTMPFS=y
-CONFIG_DEVTMPFS_MOUNT=y
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-CONFIG_FIRMWARE_IN_KERNEL=y
-CONFIG_EXTRA_FIRMWARE=""
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
-# CONFIG_SYS_HYPERVISOR is not set
-# CONFIG_GENERIC_CPU_DEVICES is not set
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-CONFIG_MTD=y
-# CONFIG_MTD_TESTS is not set
-# CONFIG_MTD_REDBOOT_PARTS is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_OF_PARTS=y
-# CONFIG_MTD_AR7_PARTS is not set
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=y
-CONFIG_MTD_BLKDEVS=y
-CONFIG_MTD_BLOCK=y
-# CONFIG_FTL is not set
-# CONFIG_NFTL is not set
-# CONFIG_INFTL is not set
-# CONFIG_RFD_FTL is not set
-# CONFIG_SSFDC is not set
-# CONFIG_SM_FTL is not set
-# CONFIG_MTD_OOPS is not set
-# CONFIG_MTD_SWAP is not set
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=y
-CONFIG_MTD_JEDECPROBE=y
-CONFIG_MTD_GEN_PROBE=y
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-# CONFIG_MTD_CFI_NOSWAP is not set
-# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
-CONFIG_MTD_CFI_OF_BYTE_SWAP=y
-# CONFIG_MTD_CFI_GEOMETRY is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-# CONFIG_MTD_OTP is not set
-CONFIG_MTD_CFI_INTELEXT=y
-CONFIG_MTD_CFI_AMDSTD=y
-CONFIG_MTD_CFI_STAA=y
-CONFIG_MTD_CFI_UTIL=y
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_ROM is not set
-# CONFIG_MTD_ABSENT is not set
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-CONFIG_MTD_PHYSMAP=y
-# CONFIG_MTD_PHYSMAP_COMPAT is not set
-CONFIG_MTD_PHYSMAP_OF=y
-# CONFIG_MTD_INTEL_VR_NOR is not set
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_DATAFLASH is not set
-CONFIG_MTD_M25P80=y
-CONFIG_M25PXX_USE_FAST_READ=y
-# CONFIG_MTD_SST25L is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-# CONFIG_MTD_MTDRAM is not set
-# CONFIG_MTD_BLOCK2MTD is not set
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-# CONFIG_MTD_DOCG3 is not set
-CONFIG_MTD_NAND_ECC=y
-# CONFIG_MTD_NAND_ECC_SMC is not set
-CONFIG_MTD_NAND=y
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-# CONFIG_MTD_NAND_ECC_BCH is not set
-# CONFIG_MTD_SM_COMMON is not set
-# CONFIG_MTD_NAND_MUSEUM_IDS is not set
-# CONFIG_MTD_NAND_DENALI is not set
-CONFIG_MTD_NAND_IDS=y
-# CONFIG_MTD_NAND_RICOH is not set
-# CONFIG_MTD_NAND_DISKONCHIP is not set
-# CONFIG_MTD_NAND_CAFE is not set
-# CONFIG_MTD_NAND_NANDSIM is not set
-CONFIG_MTD_NAND_PLATFORM=y
-# CONFIG_MTD_ALAUDA is not set
-CONFIG_MTD_NAND_FSL_ELBC=y
-CONFIG_MTD_NAND_FSL_UPM=y
-# CONFIG_MTD_ONENAND is not set
-
-#
-# LPDDR flash memory drivers
-#
-# CONFIG_MTD_LPDDR is not set
-CONFIG_MTD_UBI=y
-CONFIG_MTD_UBI_WL_THRESHOLD=4096
-CONFIG_MTD_UBI_BEB_RESERVE=1
-# CONFIG_MTD_UBI_GLUEBI is not set
-# CONFIG_MTD_UBI_DEBUG is not set
-CONFIG_DTC=y
-CONFIG_OF=y
-
-#
-# Device Tree and Open Firmware support
-#
-CONFIG_PROC_DEVICETREE=y
-CONFIG_OF_FLATTREE=y
-CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_DYNAMIC=y
-CONFIG_OF_ADDRESS=y
-CONFIG_OF_IRQ=y
-CONFIG_OF_DEVICE=y
-CONFIG_OF_GPIO=y
-CONFIG_OF_I2C=y
-CONFIG_OF_NET=y
-CONFIG_OF_SPI=y
-CONFIG_OF_MDIO=y
-CONFIG_OF_PCI=y
-CONFIG_OF_PCI_IRQ=y
-# CONFIG_PARPORT is not set
-CONFIG_BLK_DEV=y
-# CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
-# CONFIG_BLK_DEV_CRYPTOLOOP is not set
-# CONFIG_BLK_DEV_DRBD is not set
-CONFIG_BLK_DEV_NBD=y
-# CONFIG_BLK_DEV_SX8 is not set
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=131072
-# CONFIG_BLK_DEV_XIP is not set
-# CONFIG_CDROM_PKTCDVD is not set
-# CONFIG_ATA_OVER_ETH is not set
-# CONFIG_BLK_DEV_HD is not set
-# CONFIG_BLK_DEV_RBD is not set
-CONFIG_MISC_DEVICES=y
-# CONFIG_AD525X_DPOT is not set
-# CONFIG_ATMEL_PWM is not set
-# CONFIG_PHANTOM is not set
-# CONFIG_INTEL_MID_PTI is not set
-# CONFIG_SGI_IOC4 is not set
-# CONFIG_TIFM_CORE is not set
-# CONFIG_ICS932S401 is not set
-# CONFIG_ENCLOSURE_SERVICES is not set
-# CONFIG_HP_ILO is not set
-# CONFIG_APDS9802ALS is not set
-# CONFIG_ISL29003 is not set
-# CONFIG_ISL29020 is not set
-# CONFIG_SENSORS_TSL2550 is not set
-# CONFIG_SENSORS_BH1780 is not set
-# CONFIG_SENSORS_BH1770 is not set
-# CONFIG_SENSORS_APDS990X is not set
-# CONFIG_HMC6352 is not set
-# CONFIG_DS1682 is not set
-# CONFIG_TI_DAC7512 is not set
-# CONFIG_BMP085 is not set
-# CONFIG_PCH_PHUB is not set
-# CONFIG_USB_SWITCH_FSA9480 is not set
-# CONFIG_EARLY_DMA_ALLOC is not set
-CONFIG_RETIMER_CLASS=y
-# CONFIG_DS100DF410 is not set
-# CONFIG_C2PORT is not set
-
-#
-# EEPROM support
-#
-CONFIG_EEPROM_CLASS=y
-CONFIG_EEPROM_AT24=y
-# CONFIG_EEPROM_AT25 is not set
-# CONFIG_EEPROM_LEGACY is not set
-# CONFIG_EEPROM_MAX6875 is not set
-# CONFIG_EEPROM_93CX6 is not set
-# CONFIG_EEPROM_93XX46 is not set
-# CONFIG_EEPROM_SFF_8436 is not set
-# CONFIG_CB710_CORE is not set
-# CONFIG_IWMC3200TOP is not set
-
-#
-# Texas Instruments shared transport line discipline
-#
-# CONFIG_TI_ST is not set
-
-#
-# Altera FPGA firmware download module
-#
-# CONFIG_ALTERA_STAPL is not set
-CONFIG_HAVE_IDE=y
-# CONFIG_IDE is not set
-
-#
-# SCSI device support
-#
-CONFIG_SCSI_MOD=y
-# CONFIG_RAID_ATTRS is not set
-CONFIG_SCSI=y
-CONFIG_SCSI_DMA=y
-# CONFIG_SCSI_TGT is not set
-# CONFIG_SCSI_NETLINK is not set
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=y
-# CONFIG_CHR_DEV_ST is not set
-# CONFIG_CHR_DEV_OSST is not set
-CONFIG_BLK_DEV_SR=y
-# CONFIG_BLK_DEV_SR_VENDOR is not set
-CONFIG_CHR_DEV_SG=y
-# CONFIG_CHR_DEV_SCH is not set
-CONFIG_SCSI_MULTI_LUN=y
-# CONFIG_SCSI_CONSTANTS is not set
-CONFIG_SCSI_LOGGING=y
-# CONFIG_SCSI_SCAN_ASYNC is not set
-CONFIG_SCSI_WAIT_SCAN=m
-
-#
-# SCSI Transports
-#
-# CONFIG_SCSI_SPI_ATTRS is not set
-# CONFIG_SCSI_FC_ATTRS is not set
-# CONFIG_SCSI_ISCSI_ATTRS is not set
-# CONFIG_SCSI_SAS_ATTRS is not set
-# CONFIG_SCSI_SAS_LIBSAS is not set
-# CONFIG_SCSI_SRP_ATTRS is not set
-CONFIG_SCSI_LOWLEVEL=y
-# CONFIG_ISCSI_TCP is not set
-# CONFIG_ISCSI_BOOT_SYSFS is not set
-# CONFIG_SCSI_CXGB3_ISCSI is not set
-# CONFIG_SCSI_CXGB4_ISCSI is not set
-# CONFIG_SCSI_BNX2_ISCSI is not set
-# CONFIG_SCSI_BNX2X_FCOE is not set
-# CONFIG_BE2ISCSI is not set
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_HPSA is not set
-# CONFIG_SCSI_3W_9XXX is not set
-# CONFIG_SCSI_3W_SAS is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_AIC94XX is not set
-# CONFIG_SCSI_MVSAS is not set
-# CONFIG_SCSI_MVUMI is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_SCSI_ADVANSYS is not set
-# CONFIG_SCSI_ARCMSR is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
-# CONFIG_MEGARAID_SAS is not set
-# CONFIG_SCSI_MPT2SAS is not set
-# CONFIG_SCSI_HPTIOP is not set
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_LIBFC is not set
-# CONFIG_LIBFCOE is not set
-# CONFIG_FCOE is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_GDTH is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_STEX is not set
-# CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_QLA_FC is not set
-# CONFIG_SCSI_QLA_ISCSI is not set
-# CONFIG_SCSI_LPFC is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_NSP32 is not set
-# CONFIG_SCSI_DEBUG is not set
-# CONFIG_SCSI_PMCRAID is not set
-# CONFIG_SCSI_PM8001 is not set
-# CONFIG_SCSI_SRP is not set
-# CONFIG_SCSI_BFA_FC is not set
-# CONFIG_SCSI_DH is not set
-# CONFIG_SCSI_OSD_INITIATOR is not set
-CONFIG_ATA=y
-# CONFIG_ATA_NONSTANDARD is not set
-CONFIG_ATA_VERBOSE_ERROR=y
-# CONFIG_SATA_PMP is not set
-
-#
-# Controllers with non-SFF native interface
-#
-# CONFIG_SATA_AHCI is not set
-# CONFIG_SATA_AHCI_PLATFORM is not set
-# CONFIG_SATA_FSL is not set
-# CONFIG_SATA_INIC162X is not set
-# CONFIG_SATA_ACARD_AHCI is not set
-# CONFIG_SATA_SIL24 is not set
-CONFIG_ATA_SFF=y
-
-#
-# SFF controllers with custom DMA interface
-#
-# CONFIG_PDC_ADMA is not set
-# CONFIG_SATA_QSTOR is not set
-# CONFIG_SATA_SX4 is not set
-# CONFIG_ATA_BMDMA is not set
-
-#
-# PIO-only SFF controllers
-#
-# CONFIG_PATA_CMD640_PCI is not set
-# CONFIG_PATA_MPIIX is not set
-# CONFIG_PATA_NS87410 is not set
-# CONFIG_PATA_OPTI is not set
-CONFIG_PATA_PLATFORM=y
-CONFIG_PATA_OF_PLATFORM=y
-# CONFIG_PATA_RZ1000 is not set
-CONFIG_PATA_QUANTA_LB=y
-
-#
-# Generic fallback / legacy drivers
-#
-# CONFIG_PATA_LEGACY is not set
-CONFIG_MD=y
-# CONFIG_BLK_DEV_MD is not set
-CONFIG_BLK_DEV_DM_BUILTIN=y
-CONFIG_BLK_DEV_DM=y
-# CONFIG_DM_DEBUG is not set
-CONFIG_DM_CRYPT=y
-# CONFIG_DM_SNAPSHOT is not set
-# CONFIG_DM_THIN_PROVISIONING is not set
-# CONFIG_DM_MIRROR is not set
-# CONFIG_DM_RAID is not set
-# CONFIG_DM_ZERO is not set
-# CONFIG_DM_MULTIPATH is not set
-# CONFIG_DM_DELAY is not set
-# CONFIG_DM_UEVENT is not set
-# CONFIG_DM_FLAKEY is not set
-# CONFIG_TARGET_CORE is not set
-# CONFIG_FUSION is not set
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_FIREWIRE is not set
-# CONFIG_FIREWIRE_NOSY is not set
-# CONFIG_I2O is not set
-# CONFIG_MACINTOSH_DRIVERS is not set
-CONFIG_NETDEVICES=y
-CONFIG_NET_CORE=y
-# CONFIG_BONDING is not set
-# CONFIG_DUMMY is not set
-# CONFIG_EQUALIZER is not set
-# CONFIG_NET_FC is not set
-CONFIG_MII=y
-# CONFIG_MACVLAN is not set
-# CONFIG_VXLAN is not set
-# CONFIG_NETCONSOLE is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-CONFIG_TUN=y
-CONFIG_VETH=y
-# CONFIG_ARCNET is not set
-
-#
-# CAIF transport drivers
-#
-CONFIG_ETHERNET=y
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_NET_VENDOR_ADAPTEC is not set
-# CONFIG_NET_VENDOR_ALTEON is not set
-# CONFIG_NET_VENDOR_AMD is not set
-# CONFIG_NET_VENDOR_ATHEROS is not set
-# CONFIG_NET_VENDOR_BROADCOM is not set
-# CONFIG_NET_VENDOR_BROCADE is not set
-# CONFIG_NET_VENDOR_CHELSIO is not set
-# CONFIG_NET_VENDOR_CISCO is not set
-# CONFIG_DNET is not set
-# CONFIG_NET_VENDOR_DEC is not set
-# CONFIG_NET_VENDOR_DLINK is not set
-# CONFIG_NET_VENDOR_EMULEX is not set
-# CONFIG_NET_VENDOR_EXAR is not set
-CONFIG_NET_VENDOR_FREESCALE=y
-# CONFIG_FS_ENET is not set
-CONFIG_FSL_PQ_MDIO=y
-CONFIG_GIANFAR=y
-# CONFIG_NET_VENDOR_HP is not set
-# CONFIG_NET_VENDOR_INTEL is not set
-# CONFIG_IP1000 is not set
-# CONFIG_JME is not set
-# CONFIG_NET_VENDOR_MARVELL is not set
-# CONFIG_NET_VENDOR_MELLANOX is not set
-# CONFIG_NET_VENDOR_MICREL is not set
-# CONFIG_NET_VENDOR_MICROCHIP is not set
-# CONFIG_NET_VENDOR_MYRI is not set
-# CONFIG_FEALNX is not set
-# CONFIG_NET_VENDOR_NATSEMI is not set
-# CONFIG_NET_VENDOR_NVIDIA is not set
-# CONFIG_NET_VENDOR_OKI is not set
-# CONFIG_ETHOC is not set
-# CONFIG_NET_PACKET_ENGINE is not set
-# CONFIG_NET_VENDOR_QLOGIC is not set
-# CONFIG_NET_VENDOR_REALTEK is not set
-# CONFIG_NET_VENDOR_RDC is not set
-# CONFIG_NET_VENDOR_SEEQ is not set
-# CONFIG_NET_VENDOR_SILAN is not set
-# CONFIG_NET_VENDOR_SIS is not set
-# CONFIG_SFC is not set
-# CONFIG_NET_VENDOR_SMSC is not set
-# CONFIG_NET_VENDOR_STMICRO is not set
-# CONFIG_NET_VENDOR_SUN is not set
-# CONFIG_NET_VENDOR_TEHUTI is not set
-# CONFIG_NET_VENDOR_TI is not set
-# CONFIG_NET_VENDOR_VIA is not set
-# CONFIG_NET_VENDOR_XILINX is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-CONFIG_PHYLIB=y
-
-#
-# MII PHY device drivers
-#
-# CONFIG_MARVELL_PHY is not set
-# CONFIG_DAVICOM_PHY is not set
-# CONFIG_QSEMI_PHY is not set
-# CONFIG_LXT_PHY is not set
-# CONFIG_CICADA_PHY is not set
-# CONFIG_VITESSE_PHY is not set
-# CONFIG_SMSC_PHY is not set
-CONFIG_BROADCOM_PHY=y
-# CONFIG_ICPLUS_PHY is not set
-# CONFIG_REALTEK_PHY is not set
-# CONFIG_NATIONAL_PHY is not set
-# CONFIG_STE10XP is not set
-# CONFIG_LSI_ET1011C_PHY is not set
-# CONFIG_MICREL_PHY is not set
-# CONFIG_FIXED_PHY is not set
-# CONFIG_MDIO_BITBANG is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-# CONFIG_TR is not set
-
-#
-# USB Network Adapters
-#
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_RTL8150 is not set
-# CONFIG_USB_USBNET is not set
-# CONFIG_USB_IPHETH is not set
-# CONFIG_WLAN is not set
-
-#
-# Enable WiMAX (Networking options) to see the WiMAX drivers
-#
-# CONFIG_WAN is not set
-# CONFIG_VMXNET3 is not set
-# CONFIG_DPAA_ETH_USE_NDO_SELECT_QUEUE is not set
-# CONFIG_ISDN is not set
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-# CONFIG_INPUT is not set
-
-#
-# Hardware I/O ports
-#
-# CONFIG_SERIO is not set
-# CONFIG_GAMEPORT is not set
-
-#
-# Character devices
-#
-# CONFIG_VT is not set
-CONFIG_UNIX98_PTYS=y
-# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-# CONFIG_SERIAL_NONSTANDARD is not set
-# CONFIG_NOZOMI is not set
-# CONFIG_N_GSM is not set
-# CONFIG_TRACE_SINK is not set
-# CONFIG_PPC_EPAPR_HV_BYTECHAN is not set
-CONFIG_DEVKMEM=y
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_NR_UARTS=2
-CONFIG_SERIAL_8250_RUNTIME_UARTS=2
-CONFIG_SERIAL_8250_EXTENDED=y
-# CONFIG_SERIAL_8250_MANY_PORTS is not set
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-# CONFIG_SERIAL_8250_DETECT_IRQ is not set
-# CONFIG_SERIAL_8250_RSA is not set
-# CONFIG_SERIAL_8250_DW is not set
-
-#
-# Non-8250 serial port support
-#
-# CONFIG_SERIAL_MAX3100 is not set
-# CONFIG_SERIAL_MAX3107 is not set
-# CONFIG_SERIAL_MFD_HSU is not set
-# CONFIG_SERIAL_UARTLITE is not set
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_CPM is not set
-# CONFIG_SERIAL_JSM is not set
-# CONFIG_SERIAL_OF_PLATFORM is not set
-# CONFIG_SERIAL_TIMBERDALE is not set
-# CONFIG_SERIAL_ALTERA_JTAGUART is not set
-# CONFIG_SERIAL_ALTERA_UART is not set
-# CONFIG_SERIAL_IFX6X60 is not set
-# CONFIG_SERIAL_PCH_UART is not set
-# CONFIG_SERIAL_XILINX_PS_UART is not set
-# CONFIG_TTY_PRINTK is not set
-# CONFIG_HVC_UDBG is not set
-# CONFIG_IPMI_HANDLER is not set
-CONFIG_HW_RANDOM=y
-# CONFIG_HW_RANDOM_TIMERIOMEM is not set
-CONFIG_NVRAM=y
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-# CONFIG_RAW_DRIVER is not set
-# CONFIG_TCG_TPM is not set
-CONFIG_DEVPORT=y
-# CONFIG_RAMOOPS is not set
-CONFIG_I2C=y
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_COMPAT=y
-CONFIG_I2C_CHARDEV=y
-CONFIG_I2C_MUX=y
-
-#
-# Multiplexer I2C Chip support
-#
-# CONFIG_I2C_MUX_ACCTON_AS5712_54x_CPLD is not set
-# CONFIG_I2C_MUX_ACCTON_AS6712_32x_CPLD is not set
-# CONFIG_I2C_MUX_ACCTON_AS5812_54x_CPLD is not set
-# CONFIG_I2C_MUX_ACCTON_AS6812_32x_CPLD is not set
-# CONFIG_I2C_MUX_GPIO is not set
-# CONFIG_I2C_MUX_PCA9541 is not set
-CONFIG_I2C_MUX_PCA954x=y
-# CONFIG_I2C_MUX_PCA954X_DESELECT_ON_EXIT is not set
-# CONFIG_I2C_MUX_DNI_6448 is not set
-# CONFIG_I2C_MUX_QUANTA is not set
-CONFIG_I2C_MUX_QUANTA_LY2=y
-CONFIG_I2C_HELPER_AUTO=y
-
-#
-# I2C Hardware Bus support
-#
-
-#
-# PC SMBus host controller drivers
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-# CONFIG_I2C_AMD756 is not set
-# CONFIG_I2C_AMD8111 is not set
-# CONFIG_I2C_I801 is not set
-# CONFIG_I2C_ISCH is not set
-# CONFIG_I2C_PIIX4 is not set
-# CONFIG_I2C_NFORCE2 is not set
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-# CONFIG_I2C_SIS96X is not set
-# CONFIG_I2C_VIA is not set
-# CONFIG_I2C_VIAPRO is not set
-
-#
-# I2C system bus drivers (mostly embedded / system-on-chip)
-#
-CONFIG_I2C_CPM=y
-# CONFIG_I2C_DESIGNWARE_PLATFORM is not set
-# CONFIG_I2C_DESIGNWARE_PCI is not set
-# CONFIG_I2C_GPIO is not set
-# CONFIG_I2C_INTEL_MID is not set
-CONFIG_I2C_MPC=y
-# CONFIG_I2C_OCORES is not set
-# CONFIG_I2C_PCA_PLATFORM is not set
-# CONFIG_I2C_PXA_PCI is not set
-# CONFIG_I2C_SIMTEC is not set
-# CONFIG_I2C_XILINX is not set
-# CONFIG_I2C_EG20T is not set
-
-#
-# External I2C/SMBus adapter drivers
-#
-# CONFIG_I2C_DIOLAN_U2C is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_TAOS_EVM is not set
-# CONFIG_I2C_TINY_USB is not set
-
-#
-# Other I2C/SMBus bus drivers
-#
-# CONFIG_I2C_STUB is not set
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-CONFIG_SPI=y
-# CONFIG_SPI_DEBUG is not set
-CONFIG_SPI_MASTER=y
-
-#
-# SPI Master Controller Drivers
-#
-# CONFIG_SPI_ALTERA is not set
-# CONFIG_SPI_BITBANG is not set
-# CONFIG_SPI_GPIO is not set
-CONFIG_SPI_FSL_LIB=y
-CONFIG_SPI_FSL_SPI=y
-CONFIG_SPI_FSL_ESPI=y
-# CONFIG_SPI_OC_TINY is not set
-# CONFIG_SPI_PXA2XX_PCI is not set
-# CONFIG_SPI_TOPCLIFF_PCH is not set
-# CONFIG_SPI_XILINX is not set
-# CONFIG_SPI_DESIGNWARE is not set
-
-#
-# SPI Protocol Masters
-#
-# CONFIG_SPI_SPIDEV is not set
-# CONFIG_SPI_TLE62X0 is not set
-
-#
-# PPS support
-#
-# CONFIG_PPS is not set
-
-#
-# PPS generators support
-#
-
-#
-# PTP clock support
-#
-
-#
-# Enable Device Drivers -> PPS to see the PTP clock options.
-#
-CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
-CONFIG_ARCH_REQUIRE_GPIOLIB=y
-CONFIG_GPIOLIB=y
-# CONFIG_DEBUG_GPIO is not set
-CONFIG_GPIO_SYSFS=y
-
-#
-# Memory mapped GPIO drivers:
-#
-# CONFIG_GPIO_GENERIC_PLATFORM is not set
-# CONFIG_GPIO_IT8761E is not set
-CONFIG_GPIO_MPC8XXX=y
-# CONFIG_GPIO_XILINX is not set
-# CONFIG_GPIO_VX855 is not set
-
-#
-# I2C GPIO expanders:
-#
-# CONFIG_GPIO_MAX7300 is not set
-# CONFIG_GPIO_MAX732X is not set
-CONFIG_GPIO_PCA953X=y
-# CONFIG_GPIO_PCA953X_IRQ is not set
-# CONFIG_GPIO_PCF857X is not set
-# CONFIG_GPIO_SX150X is not set
-# CONFIG_GPIO_ADP5588 is not set
-
-#
-# PCI GPIO expanders:
-#
-# CONFIG_GPIO_BT8XX is not set
-# CONFIG_GPIO_ML_IOH is not set
-# CONFIG_GPIO_RDC321X is not set
-
-#
-# SPI GPIO expanders:
-#
-# CONFIG_GPIO_MAX7301 is not set
-# CONFIG_GPIO_MCP23S08 is not set
-# CONFIG_GPIO_MC33880 is not set
-# CONFIG_GPIO_74X164 is not set
-
-#
-# AC97 GPIO expanders:
-#
-
-#
-# MODULbus GPIO expanders:
-#
-# CONFIG_W1 is not set
-# CONFIG_POWER_SUPPLY is not set
-CONFIG_HWMON=y
-# CONFIG_HWMON_VID is not set
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Native drivers
-#
-# CONFIG_SENSORS_AD7314 is not set
-# CONFIG_SENSORS_AD7414 is not set
-# CONFIG_SENSORS_AD7418 is not set
-# CONFIG_SENSORS_ADCXX is not set
-# CONFIG_SENSORS_ADM1021 is not set
-# CONFIG_SENSORS_ADM1025 is not set
-# CONFIG_SENSORS_ADM1026 is not set
-# CONFIG_SENSORS_ADM1029 is not set
-# CONFIG_SENSORS_ADM1031 is not set
-# CONFIG_SENSORS_ADM9240 is not set
-# CONFIG_SENSORS_ADT7411 is not set
-# CONFIG_SENSORS_ADT7462 is not set
-CONFIG_SENSORS_ADT7470=y
-# CONFIG_SENSORS_ADT7475 is not set
-# CONFIG_SENSORS_ASC7621 is not set
-# CONFIG_SENSORS_ATXP1 is not set
-# CONFIG_SENSORS_CY8CXX is not set
-# CONFIG_SENSORS_CY8C3245R1 is not set
-# CONFIG_SENSORS_DS620 is not set
-# CONFIG_SENSORS_DS1621 is not set
-# CONFIG_SENSORS_I5K_AMB is not set
-# CONFIG_SENSORS_F75375S is not set
-# CONFIG_SENSORS_G760A is not set
-# CONFIG_SENSORS_GL518SM is not set
-# CONFIG_SENSORS_GL520SM is not set
-# CONFIG_SENSORS_GPIO_FAN is not set
-# CONFIG_SENSORS_JC42 is not set
-# CONFIG_SENSORS_LINEAGE is not set
-# CONFIG_SENSORS_LM63 is not set
-# CONFIG_SENSORS_LM70 is not set
-# CONFIG_SENSORS_LM73 is not set
-CONFIG_SENSORS_LM75=y
-# CONFIG_SENSORS_LM77 is not set
-# CONFIG_SENSORS_LM78 is not set
-# CONFIG_SENSORS_LM80 is not set
-# CONFIG_SENSORS_LM83 is not set
-# CONFIG_SENSORS_LM85 is not set
-# CONFIG_SENSORS_LM87 is not set
-# CONFIG_SENSORS_LM90 is not set
-# CONFIG_SENSORS_LM92 is not set
-# CONFIG_SENSORS_LM93 is not set
-# CONFIG_SENSORS_LTC4151 is not set
-CONFIG_SENSORS_LTC4215=y
-# CONFIG_SENSORS_LTC4245 is not set
-# CONFIG_SENSORS_LTC4261 is not set
-# CONFIG_SENSORS_LM95241 is not set
-# CONFIG_SENSORS_LM95245 is not set
-# CONFIG_SENSORS_MAX1111 is not set
-# CONFIG_SENSORS_MAX16065 is not set
-# CONFIG_SENSORS_MAX1619 is not set
-# CONFIG_SENSORS_MAX1668 is not set
-# CONFIG_SENSORS_MAX6639 is not set
-# CONFIG_SENSORS_MAX6642 is not set
-CONFIG_SENSORS_MAX6650=y
-# CONFIG_SENSORS_MAX6620 is not set
-# CONFIG_SENSORS_MAX6697 is not set
-# CONFIG_SENSORS_NTC_THERMISTOR is not set
-# CONFIG_SENSORS_PCF8591 is not set
-CONFIG_PMBUS=y
-CONFIG_SENSORS_PMBUS=y
-# CONFIG_SENSORS_ADM1275 is not set
-# CONFIG_SENSORS_LM25066 is not set
-# CONFIG_SENSORS_LTC2978 is not set
-# CONFIG_SENSORS_MAX16064 is not set
-# CONFIG_SENSORS_MAX34440 is not set
-# CONFIG_SENSORS_DNI_DPS460 is not set
-# CONFIG_SENSORS_MAX8688 is not set
-# CONFIG_SENSORS_UCD9000 is not set
-# CONFIG_SENSORS_UCD9200 is not set
-# CONFIG_SENSORS_ZL6100 is not set
-# CONFIG_SENSORS_SHT15 is not set
-# CONFIG_SENSORS_SHT21 is not set
-# CONFIG_SENSORS_SIS5595 is not set
-# CONFIG_SENSORS_SMM665 is not set
-# CONFIG_SENSORS_EMC1403 is not set
-# CONFIG_SENSORS_EMC2103 is not set
-CONFIG_SENSORS_EMC2305=y
-# CONFIG_SENSORS_EMC6W201 is not set
-# CONFIG_SENSORS_SMSC47M192 is not set
-# CONFIG_SENSORS_SCH56XX_COMMON is not set
-# CONFIG_SENSORS_ADS1015 is not set
-# CONFIG_SENSORS_ADS7828 is not set
-# CONFIG_SENSORS_ADS7871 is not set
-# CONFIG_SENSORS_AMC6821 is not set
-# CONFIG_SENSORS_THMC50 is not set
-# CONFIG_SENSORS_TMP102 is not set
-# CONFIG_SENSORS_TMP401 is not set
-# CONFIG_SENSORS_TMP421 is not set
-# CONFIG_SENSORS_VIA686A is not set
-# CONFIG_SENSORS_VT8231 is not set
-# CONFIG_SENSORS_W83781D is not set
-# CONFIG_SENSORS_W83791D is not set
-# CONFIG_SENSORS_W83792D is not set
-# CONFIG_SENSORS_W83793 is not set
-# CONFIG_SENSORS_W83795 is not set
-# CONFIG_SENSORS_W83L785TS is not set
-# CONFIG_SENSORS_W83L786NG is not set
-CONFIG_SENSORS_QUANTA_LY_HWMON=y
-# CONFIG_SENSORS_CPR_4011_4MXX is not set
-# CONFIG_SENSORS_ACCTON_I2C_CPLD is not set
-# CONFIG_SENSORS_YM2651Y is not set
-# CONFIG_THERMAL is not set
-CONFIG_WATCHDOG=y
-CONFIG_WATCHDOG_CORE=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-# CONFIG_SOFT_WATCHDOG is not set
-# CONFIG_ALIM7101_WDT is not set
-CONFIG_BOOKE_WDT=y
-CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT=38
-
-#
-# PCI-based Watchdog Cards
-#
-# CONFIG_PCIPCWATCHDOG is not set
-# CONFIG_WDTPCI is not set
-
-#
-# USB-based Watchdog Cards
-#
-# CONFIG_USBPCWATCHDOG is not set
-CONFIG_SSB_POSSIBLE=y
-
-#
-# Sonics Silicon Backplane
-#
-# CONFIG_SSB is not set
-CONFIG_BCMA_POSSIBLE=y
-
-#
-# Broadcom specific AMBA
-#
-# CONFIG_BCMA is not set
-
-#
-# Multifunction device drivers
-#
-# CONFIG_MFD_CORE is not set
-# CONFIG_MFD_88PM860X is not set
-# CONFIG_MFD_SM501 is not set
-# CONFIG_HTC_PASIC3 is not set
-# CONFIG_HTC_I2CPLD is not set
-# CONFIG_TPS6105X is not set
-# CONFIG_TPS65010 is not set
-# CONFIG_TPS6507X is not set
-# CONFIG_MFD_TPS6586X is not set
-# CONFIG_MFD_TPS65910 is not set
-# CONFIG_MFD_TPS65912_I2C is not set
-# CONFIG_MFD_TPS65912_SPI is not set
-# CONFIG_TWL4030_CORE is not set
-# CONFIG_MFD_STMPE is not set
-# CONFIG_MFD_TC3589X is not set
-# CONFIG_MFD_TMIO is not set
-# CONFIG_PMIC_DA903X is not set
-# CONFIG_PMIC_ADP5520 is not set
-# CONFIG_MFD_MAX8925 is not set
-# CONFIG_MFD_MAX8997 is not set
-# CONFIG_MFD_MAX8998 is not set
-# CONFIG_MFD_WM8400 is not set
-# CONFIG_MFD_WM831X_I2C is not set
-# CONFIG_MFD_WM831X_SPI is not set
-# CONFIG_MFD_WM8350_I2C is not set
-# CONFIG_MFD_WM8994 is not set
-# CONFIG_MFD_PCF50633 is not set
-# CONFIG_MFD_MC13XXX is not set
-# CONFIG_ABX500_CORE is not set
-# CONFIG_EZX_PCAP is not set
-# CONFIG_MFD_TIMBERDALE is not set
-# CONFIG_LPC_SCH is not set
-# CONFIG_MFD_RDC321X is not set
-# CONFIG_MFD_JANZ_CMODIO is not set
-# CONFIG_MFD_VX855 is not set
-# CONFIG_MFD_WL1273_CORE is not set
-# CONFIG_MFD_AAT2870_CORE is not set
-# CONFIG_REGULATOR is not set
-# CONFIG_MEDIA_SUPPORT is not set
-
-#
-# Graphics support
-#
-# CONFIG_AGP is not set
-# CONFIG_VGA_ARB is not set
-# CONFIG_DRM is not set
-# CONFIG_STUB_POULSBO is not set
-# CONFIG_VGASTATE is not set
-# CONFIG_VIDEO_OUTPUT_CONTROL is not set
-# CONFIG_FB is not set
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-#
-# Display device support
-#
-# CONFIG_DISPLAY_SUPPORT is not set
-# CONFIG_SOUND is not set
-CONFIG_USB_SUPPORT=y
-CONFIG_USB_COMMON=y
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB_ARCH_HAS_XHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
-
-#
-# Miscellaneous USB options
-#
-# CONFIG_USB_DEVICEFS is not set
-# CONFIG_USB_DEVICE_CLASS is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_OTG_WHITELIST is not set
-# CONFIG_USB_OTG_BLACKLIST_HUB is not set
-# CONFIG_USB_DWC3 is not set
-# CONFIG_USB_MON is not set
-# CONFIG_USB_WUSB is not set
-# CONFIG_USB_WUSB_CBAF is not set
-
-#
-# USB Host Controller Drivers
-#
-# CONFIG_USB_C67X00_HCD is not set
-# CONFIG_USB_XHCI_HCD is not set
-CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-# CONFIG_XPS_USB_HCD_XILINX is not set
-CONFIG_USB_FSL_MPH_DR_OF=y
-CONFIG_USB_EHCI_FSL=y
-CONFIG_USB_EHCI_HCD_PPC_OF=y
-# CONFIG_USB_OXU210HP_HCD is not set
-# CONFIG_USB_ISP116X_HCD is not set
-# CONFIG_USB_ISP1760_HCD is not set
-# CONFIG_USB_ISP1362_HCD is not set
-# CONFIG_USB_OHCI_HCD is not set
-# CONFIG_USB_UHCI_HCD is not set
-# CONFIG_USB_SL811_HCD is not set
-# CONFIG_USB_R8A66597_HCD is not set
-# CONFIG_USB_WHCI_HCD is not set
-# CONFIG_USB_HWA_HCD is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-# CONFIG_USB_WDM is not set
-# CONFIG_USB_TMC is not set
-
-#
-# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
-#
-
-#
-# also be needed; see USB_STORAGE Help for more info
-#
-CONFIG_USB_STORAGE=y
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_REALTEK is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_USBAT is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_SDDR55 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_STORAGE_ALAUDA is not set
-# CONFIG_USB_STORAGE_KARMA is not set
-# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
-# CONFIG_USB_STORAGE_ENE_UB6250 is not set
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_MICROTEK is not set
-
-#
-# USB port drivers
-#
-# CONFIG_USB_SERIAL is not set
-
-#
-# USB Miscellaneous drivers
-#
-# CONFIG_USB_EMI62 is not set
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_ADUTUX is not set
-# CONFIG_USB_SEVSEG is not set
-# CONFIG_USB_RIO500 is not set
-# CONFIG_USB_LEGOTOWER is not set
-# CONFIG_USB_LCD is not set
-# CONFIG_USB_LED is not set
-# CONFIG_USB_CYPRESS_CY7C63 is not set
-# CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_IDMOUSE is not set
-# CONFIG_USB_FTDI_ELAN is not set
-# CONFIG_USB_APPLEDISPLAY is not set
-# CONFIG_USB_SISUSBVGA is not set
-# CONFIG_USB_LD is not set
-# CONFIG_USB_TRANCEVIBRATOR is not set
-# CONFIG_USB_IOWARRIOR is not set
-# CONFIG_USB_TEST is not set
-# CONFIG_USB_ISIGHTFW is not set
-# CONFIG_USB_YUREX is not set
-# CONFIG_USB_GADGET is not set
-
-#
-# OTG and related infrastructure
-#
-# CONFIG_USB_GPIO_VBUS is not set
-# CONFIG_NOP_USB_XCEIV is not set
-# CONFIG_UWB is not set
-CONFIG_MMC=y
-# CONFIG_MMC_DEBUG is not set
-# CONFIG_MMC_UNSAFE_RESUME is not set
-# CONFIG_MMC_CLKGATE is not set
-
-#
-# MMC/SD/SDIO Card Drivers
-#
-CONFIG_MMC_BLOCK=y
-CONFIG_MMC_BLOCK_MINORS=8
-CONFIG_MMC_BLOCK_BOUNCE=y
-# CONFIG_SDIO_UART is not set
-# CONFIG_MMC_TEST is not set
-
-#
-# MMC/SD/SDIO Host Controller Drivers
-#
-CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_IO_ACCESSORS=y
-CONFIG_MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER=y
-# CONFIG_MMC_SDHCI_PCI is not set
-CONFIG_MMC_SDHCI_PLTFM=y
-CONFIG_MMC_SDHCI_OF_ESDHC=y
-# CONFIG_MMC_SDHCI_OF_HLWD is not set
-# CONFIG_MMC_WBSD is not set
-# CONFIG_MMC_TIFM_SD is not set
-# CONFIG_MMC_CB710 is not set
-# CONFIG_MMC_VIA_SDMMC is not set
-# CONFIG_MMC_VUB300 is not set
-# CONFIG_MMC_USHC is not set
-# CONFIG_MEMSTICK is not set
-CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
-
-#
-# LED drivers
-#
-# CONFIG_LEDS_LM3530 is not set
-CONFIG_LEDS_GPIO=y
-# CONFIG_LEDS_LP3944 is not set
-# CONFIG_LEDS_LP5521 is not set
-# CONFIG_LEDS_LP5523 is not set
-CONFIG_LEDS_PCA955X=y
-# CONFIG_LEDS_DAC124S085 is not set
-# CONFIG_LEDS_BD2802 is not set
-# CONFIG_LEDS_LT3593 is not set
-# CONFIG_LEDS_RENESAS_TPU is not set
-CONFIG_LEDS_TRIGGERS=y
-
-#
-# LED Triggers
-#
-CONFIG_LEDS_TRIGGER_TIMER=y
-CONFIG_LEDS_TRIGGER_HEARTBEAT=y
-# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
-# CONFIG_LEDS_TRIGGER_GPIO is not set
-CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
-
-#
-# iptables trigger is under Netfilter config (LED target)
-#
-# CONFIG_ACCESSIBILITY is not set
-# CONFIG_INFINIBAND is not set
-# CONFIG_EDAC is not set
-CONFIG_RTC_LIB=y
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_HCTOSYS=y
-CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
-# CONFIG_RTC_DEBUG is not set
-
-#
-# RTC interfaces
-#
-CONFIG_RTC_INTF_SYSFS=y
-CONFIG_RTC_INTF_PROC=y
-CONFIG_RTC_INTF_DEV=y
-# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-# CONFIG_RTC_DRV_TEST is not set
-
-#
-# I2C RTC drivers
-#
-CONFIG_RTC_DRV_DS1307=y
-CONFIG_RTC_DRV_DS1374=y
-CONFIG_RTC_DRV_DS1672=y
-CONFIG_RTC_DRV_DS3232=y
-CONFIG_RTC_DRV_MAX6900=y
-CONFIG_RTC_DRV_RS5C372=y
-CONFIG_RTC_DRV_ISL1208=y
-CONFIG_RTC_DRV_ISL12022=y
-CONFIG_RTC_DRV_X1205=y
-CONFIG_RTC_DRV_PCF8563=y
-CONFIG_RTC_DRV_PCF8583=y
-CONFIG_RTC_DRV_M41T80=y
-CONFIG_RTC_DRV_M41T80_WDT=y
-CONFIG_RTC_DRV_BQ32K=y
-CONFIG_RTC_DRV_S35390A=y
-CONFIG_RTC_DRV_FM3130=y
-CONFIG_RTC_DRV_RX8581=y
-CONFIG_RTC_DRV_RX8025=y
-CONFIG_RTC_DRV_EM3027=y
-CONFIG_RTC_DRV_RV3029C2=y
-
-#
-# SPI RTC drivers
-#
-# CONFIG_RTC_DRV_M41T93 is not set
-# CONFIG_RTC_DRV_M41T94 is not set
-# CONFIG_RTC_DRV_DS1305 is not set
-# CONFIG_RTC_DRV_DS1390 is not set
-# CONFIG_RTC_DRV_MAX6902 is not set
-# CONFIG_RTC_DRV_R9701 is not set
-# CONFIG_RTC_DRV_RS5C348 is not set
-# CONFIG_RTC_DRV_DS3234 is not set
-# CONFIG_RTC_DRV_PCF2123 is not set
-
-#
-# Platform RTC drivers
-#
-CONFIG_RTC_DRV_CMOS=y
-# CONFIG_RTC_DRV_DS1286 is not set
-# CONFIG_RTC_DRV_DS1511 is not set
-# CONFIG_RTC_DRV_DS1553 is not set
-# CONFIG_RTC_DRV_DS1742 is not set
-# CONFIG_RTC_DRV_STK17TA8 is not set
-# CONFIG_RTC_DRV_M48T86 is not set
-# CONFIG_RTC_DRV_M48T35 is not set
-# CONFIG_RTC_DRV_M48T59 is not set
-# CONFIG_RTC_DRV_MSM6242 is not set
-# CONFIG_RTC_DRV_BQ4802 is not set
-# CONFIG_RTC_DRV_RP5C01 is not set
-# CONFIG_RTC_DRV_V3020 is not set
-
-#
-# on-CPU RTC drivers
-#
-# CONFIG_RTC_DRV_GENERIC is not set
-CONFIG_DMADEVICES=y
-# CONFIG_DMADEVICES_DEBUG is not set
-
-#
-# DMA Devices
-#
-CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=y
-# CONFIG_DW_DMAC is not set
-CONFIG_FSL_DMA=y
-# CONFIG_TIMB_DMA is not set
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA_DUMMY=y
-# CONFIG_ASYNC_TX_DMA is not set
-# CONFIG_DMATEST is not set
-# CONFIG_AUXDISPLAY is not set
-# CONFIG_UIO is not set
-
-#
-# Virtio drivers
-#
-# CONFIG_VIRTIO_PCI is not set
-# CONFIG_VIRTIO_BALLOON is not set
-# CONFIG_VIRTIO_MMIO is not set
-# CONFIG_STAGING is not set
-
-#
-# Hardware Spinlock drivers
-#
-# CONFIG_IOMMU_SUPPORT is not set
-# CONFIG_VIRT_DRIVERS is not set
-
-#
-# Microsoft Hyper-V guest support
-#
-# CONFIG_PM_DEVFREQ is not set
-
-#
-# Frame Manager support
-#
-CONFIG_FSL_FMAN=y
-# CONFIG_FSL_FMAN_TEST is not set
-
-#
-# FMAN Processor support
-#
-CONFIG_FMAN_P3040_P4080_P5020=y
-# CONFIG_FMAN_P1023 is not set
-# CONFIG_FMAN_T4240 is not set
-# CONFIG_FMAN_RESOURCE_ALLOCATION_ALGORITHM is not set
-# CONFIG_FMAN_MIB_CNT_OVF_IRQ_EN is not set
-CONFIG_FSL_FM_MAX_FRAME_SIZE=1522
-CONFIG_FSL_FM_RX_EXTRA_HEADROOM=64
-
-#
-# File systems
-#
-# CONFIG_EXT2_FS is not set
-# CONFIG_EXT3_FS is not set
-CONFIG_EXT4_FS=y
-CONFIG_EXT4_USE_FOR_EXT23=y
-# CONFIG_EXT4_FS_XATTR is not set
-# CONFIG_EXT4_DEBUG is not set
-CONFIG_JBD2=y
-# CONFIG_JBD2_DEBUG is not set
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-# CONFIG_XFS_FS is not set
-# CONFIG_GFS2_FS is not set
-# CONFIG_BTRFS_FS is not set
-# CONFIG_NILFS2_FS is not set
-# CONFIG_FS_POSIX_ACL is not set
-CONFIG_FILE_LOCKING=y
-CONFIG_FSNOTIFY=y
-CONFIG_DNOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_INOTIFY_STACKFS=y
-CONFIG_FANOTIFY=y
-# CONFIG_QUOTA is not set
-# CONFIG_QUOTACTL is not set
-# CONFIG_AUTOFS4_FS is not set
-# CONFIG_FUSE_FS is not set
-CONFIG_OVERLAYFS_FS=y
-
-#
-# Caches
-#
-# CONFIG_FSCACHE is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-# CONFIG_ZISOFS is not set
-# CONFIG_UDF_FS is not set
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=y
-CONFIG_MSDOS_FS=y
-CONFIG_VFAT_FS=y
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_PROC_VMCORE=y
-CONFIG_PROC_SYSCTL=y
-CONFIG_PROC_PAGE_MONITOR=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-# CONFIG_TMPFS_POSIX_ACL is not set
-CONFIG_TMPFS_XATTR=y
-# CONFIG_HUGETLB_PAGE is not set
-# CONFIG_CONFIGFS_FS is not set
-CONFIG_MISC_FILESYSTEMS=y
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_HFSPLUS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-CONFIG_JFFS2_FS=y
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
-# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
-CONFIG_JFFS2_SUMMARY=y
-# CONFIG_JFFS2_FS_XATTR is not set
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-# CONFIG_JFFS2_LZO is not set
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-CONFIG_UBIFS_FS=y
-# CONFIG_UBIFS_FS_XATTR is not set
-# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
-CONFIG_UBIFS_FS_LZO=y
-CONFIG_UBIFS_FS_ZLIB=y
-# CONFIG_UBIFS_FS_DEBUG is not set
-# CONFIG_LOGFS is not set
-# CONFIG_CRAMFS is not set
-CONFIG_SQUASHFS=y
-# CONFIG_SQUASHFS_XATTR is not set
-CONFIG_SQUASHFS_ZLIB=y
-CONFIG_SQUASHFS_LZO=y
-CONFIG_SQUASHFS_XZ=y
-# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set
-# CONFIG_SQUASHFS_EMBEDDED is not set
-CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
-# CONFIG_VXFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_OMFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_ROMFS_FS is not set
-# CONFIG_PSTORE is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-# CONFIG_AUFS_FS is not set
-CONFIG_NETWORK_FILESYSTEMS=y
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-# CONFIG_NFS_V3_ACL is not set
-# CONFIG_NFS_V4 is not set
-# CONFIG_NFSD is not set
-CONFIG_LOCKD=y
-CONFIG_LOCKD_V4=y
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=y
-# CONFIG_CEPH_FS is not set
-# CONFIG_CIFS is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-# CONFIG_OSF_PARTITION is not set
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-# CONFIG_MAC_PARTITION is not set
-CONFIG_MSDOS_PARTITION=y
-# CONFIG_BSD_DISKLABEL is not set
-# CONFIG_MINIX_SUBPARTITION is not set
-# CONFIG_SOLARIS_X86_PARTITION is not set
-# CONFIG_UNIXWARE_DISKLABEL is not set
-# CONFIG_LDM_PARTITION is not set
-# CONFIG_SGI_PARTITION is not set
-# CONFIG_ULTRIX_PARTITION is not set
-# CONFIG_SUN_PARTITION is not set
-# CONFIG_KARMA_PARTITION is not set
-CONFIG_EFI_PARTITION=y
-# CONFIG_SYSV68_PARTITION is not set
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="iso8859-1"
-CONFIG_NLS_CODEPAGE_437=y
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ASCII is not set
-CONFIG_NLS_ISO8859_1=y
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-CONFIG_NLS_UTF8=y
-# CONFIG_BINARY_PRINTF is not set
-
-#
-# Library routines
-#
-CONFIG_BITREVERSE=y
-# CONFIG_CRC_CCITT is not set
-CONFIG_CRC16=y
-# CONFIG_CRC_T10DIF is not set
-CONFIG_CRC_ITU_T=y
-CONFIG_CRC32=y
-# CONFIG_CRC7 is not set
-CONFIG_LIBCRC32C=y
-# CONFIG_CRC8 is not set
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=y
-CONFIG_LZO_COMPRESS=y
-CONFIG_LZO_DECOMPRESS=y
-CONFIG_XZ_DEC=y
-# CONFIG_XZ_DEC_X86 is not set
-CONFIG_XZ_DEC_POWERPC=y
-# CONFIG_XZ_DEC_IA64 is not set
-# CONFIG_XZ_DEC_ARM is not set
-# CONFIG_XZ_DEC_ARMTHUMB is not set
-# CONFIG_XZ_DEC_SPARC is not set
-CONFIG_XZ_DEC_BCJ=y
-# CONFIG_XZ_DEC_TEST is not set
-CONFIG_DECOMPRESS_GZIP=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
-CONFIG_CPU_RMAP=y
-CONFIG_DQL=y
-CONFIG_NLATTR=y
-CONFIG_GENERIC_ATOMIC64=y
-# CONFIG_AVERAGE is not set
-# CONFIG_CORDIC is not set
-
-#
-# Kernel hacking
-#
-# CONFIG_PRINTK_TIME is not set
-CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4
-CONFIG_ENABLE_WARN_DEPRECATED=y
-CONFIG_ENABLE_MUST_CHECK=y
-CONFIG_FRAME_WARN=1024
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_MAGIC_SYSRQ_DEFAULT_MASK=0x1
-# CONFIG_STRIP_ASM_SYMS is not set
-# CONFIG_UNUSED_SYMBOLS is not set
-CONFIG_DEBUG_FS=y
-# CONFIG_HEADERS_CHECK is not set
-# CONFIG_DEBUG_SECTION_MISMATCH is not set
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_DEBUG_SHIRQ is not set
-# CONFIG_LOCKUP_DETECTOR is not set
-# CONFIG_HARDLOCKUP_DETECTOR is not set
-CONFIG_DETECT_HUNG_TASK=y
-CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
-# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
-CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
-CONFIG_PANIC_TIMEOUT=0
-# CONFIG_SCHED_DEBUG is not set
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_TIMER_STATS is not set
-# CONFIG_DEBUG_OBJECTS is not set
-# CONFIG_SLUB_DEBUG_ON is not set
-# CONFIG_SLUB_STATS is not set
-# CONFIG_DEBUG_KMEMLEAK is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_RT_MUTEX_TESTER is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_LOCK_ALLOC is not set
-# CONFIG_PROVE_LOCKING is not set
-# CONFIG_SPARSE_RCU_POINTER is not set
-# CONFIG_LOCK_STAT is not set
-# CONFIG_DEBUG_ATOMIC_SLEEP is not set
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_STACK_USAGE is not set
-# CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_HIGHMEM is not set
-CONFIG_DEBUG_BUGVERBOSE=y
-CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_INFO_REDUCED is not set
-# CONFIG_DEBUG_VM is not set
-# CONFIG_DEBUG_WRITECOUNT is not set
-# CONFIG_DEBUG_MEMORY_INIT is not set
-# CONFIG_DEBUG_LIST is not set
-# CONFIG_TEST_LIST_SORT is not set
-# CONFIG_DEBUG_SG is not set
-# CONFIG_DEBUG_NOTIFIERS is not set
-# CONFIG_DEBUG_CREDENTIALS is not set
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_RCU_CPU_STALL_TIMEOUT=60
-# CONFIG_BACKTRACE_SELF_TEST is not set
-# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
-# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
-# CONFIG_DEBUG_PER_CPU_MAPS is not set
-# CONFIG_LKDTM is not set
-# CONFIG_FAULT_INJECTION is not set
-# CONFIG_LATENCYTOP is not set
-CONFIG_SYSCTL_SYSCALL_CHECK=y
-# CONFIG_DEBUG_PAGEALLOC is not set
-CONFIG_HAVE_FUNCTION_TRACER=y
-CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
-CONFIG_HAVE_DYNAMIC_FTRACE=y
-CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
-CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
-CONFIG_TRACING_SUPPORT=y
-CONFIG_FTRACE=y
-# CONFIG_FUNCTION_TRACER is not set
-# CONFIG_IRQSOFF_TRACER is not set
-# CONFIG_SCHED_TRACER is not set
-# CONFIG_ENABLE_DEFAULT_TRACERS is not set
-# CONFIG_FTRACE_SYSCALLS is not set
-CONFIG_BRANCH_PROFILE_NONE=y
-# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
-# CONFIG_PROFILE_ALL_BRANCHES is not set
-# CONFIG_STACK_TRACER is not set
-# CONFIG_BLK_DEV_IO_TRACE is not set
-CONFIG_DYNAMIC_DEBUG=y
-# CONFIG_DMA_API_DEBUG is not set
-# CONFIG_ATOMIC64_SELFTEST is not set
-# CONFIG_SAMPLES is not set
-CONFIG_HAVE_ARCH_KGDB=y
-# CONFIG_KGDB is not set
-# CONFIG_TEST_KSTRTOX is not set
-# CONFIG_PPC_DISABLE_WERROR is not set
-CONFIG_PPC_WERROR=y
-CONFIG_PRINT_STACK_DEPTH=64
-# CONFIG_DEBUG_STACKOVERFLOW is not set
-# CONFIG_PPC_EMULATED_STATS is not set
-# CONFIG_CODE_PATCHING_SELFTEST is not set
-# CONFIG_FTR_FIXUP_SELFTEST is not set
-# CONFIG_MSI_BITMAP_SELFTEST is not set
-# CONFIG_XMON is not set
-CONFIG_VIRQ_DEBUG=y
-# CONFIG_BDI_SWITCH is not set
-# CONFIG_JTAG_DEBUGGER is not set
-# CONFIG_PPC_EARLY_DEBUG is not set
-
-#
-# Security options
-#
-# CONFIG_KEYS is not set
-# CONFIG_SECURITY_DMESG_RESTRICT is not set
-# CONFIG_SECURITY is not set
-# CONFIG_SECURITYFS is not set
-CONFIG_DEFAULT_SECURITY_DAC=y
-CONFIG_DEFAULT_SECURITY=""
-CONFIG_CRYPTO=y
-
-#
-# Crypto core or helper
-#
-CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_ALGAPI2=y
-CONFIG_CRYPTO_AEAD=y
-CONFIG_CRYPTO_AEAD2=y
-CONFIG_CRYPTO_BLKCIPHER=y
-CONFIG_CRYPTO_BLKCIPHER2=y
-CONFIG_CRYPTO_HASH=y
-CONFIG_CRYPTO_HASH2=y
-CONFIG_CRYPTO_RNG2=y
-CONFIG_CRYPTO_PCOMP2=y
-CONFIG_CRYPTO_MANAGER=y
-CONFIG_CRYPTO_MANAGER2=y
-# CONFIG_CRYPTO_USER is not set
-CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
-# CONFIG_CRYPTO_GF128MUL is not set
-# CONFIG_CRYPTO_NULL is not set
-# CONFIG_CRYPTO_PCRYPT is not set
-CONFIG_CRYPTO_WORKQUEUE=y
-# CONFIG_CRYPTO_CRYPTD is not set
-CONFIG_CRYPTO_AUTHENC=y
-# CONFIG_CRYPTO_TEST is not set
-
-#
-# Authenticated Encryption with Associated Data
-#
-# CONFIG_CRYPTO_CCM is not set
-# CONFIG_CRYPTO_GCM is not set
-# CONFIG_CRYPTO_SEQIV is not set
-
-#
-# Block modes
-#
-CONFIG_CRYPTO_CBC=y
-# CONFIG_CRYPTO_CTR is not set
-# CONFIG_CRYPTO_CTS is not set
-# CONFIG_CRYPTO_ECB is not set
-# CONFIG_CRYPTO_LRW is not set
-# CONFIG_CRYPTO_PCBC is not set
-# CONFIG_CRYPTO_XTS is not set
-
-#
-# Hash modes
-#
-CONFIG_CRYPTO_HMAC=y
-# CONFIG_CRYPTO_XCBC is not set
-# CONFIG_CRYPTO_VMAC is not set
-
-#
-# Digest
-#
-CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_GHASH is not set
-# CONFIG_CRYPTO_MD4 is not set
-CONFIG_CRYPTO_MD5=y
-# CONFIG_CRYPTO_MICHAEL_MIC is not set
-# CONFIG_CRYPTO_RMD128 is not set
-# CONFIG_CRYPTO_RMD160 is not set
-# CONFIG_CRYPTO_RMD256 is not set
-# CONFIG_CRYPTO_RMD320 is not set
-CONFIG_CRYPTO_SHA1=y
-# CONFIG_CRYPTO_SHA256 is not set
-# CONFIG_CRYPTO_SHA512 is not set
-# CONFIG_CRYPTO_TGR192 is not set
-# CONFIG_CRYPTO_WP512 is not set
-
-#
-# Ciphers
-#
-CONFIG_CRYPTO_AES=y
-# CONFIG_CRYPTO_ANUBIS is not set
-# CONFIG_CRYPTO_ARC4 is not set
-# CONFIG_CRYPTO_BLOWFISH is not set
-# CONFIG_CRYPTO_CAMELLIA is not set
-# CONFIG_CRYPTO_CAST5 is not set
-# CONFIG_CRYPTO_CAST6 is not set
-CONFIG_CRYPTO_DES=y
-# CONFIG_CRYPTO_FCRYPT is not set
-# CONFIG_CRYPTO_KHAZAD is not set
-# CONFIG_CRYPTO_SALSA20 is not set
-# CONFIG_CRYPTO_SEED is not set
-# CONFIG_CRYPTO_SERPENT is not set
-# CONFIG_CRYPTO_TEA is not set
-# CONFIG_CRYPTO_TWOFISH is not set
-
-#
-# Compression
-#
-CONFIG_CRYPTO_DEFLATE=y
-# CONFIG_CRYPTO_ZLIB is not set
-CONFIG_CRYPTO_LZO=y
-
-#
-# Random Number Generation
-#
-# CONFIG_CRYPTO_ANSI_CPRNG is not set
-# CONFIG_CRYPTO_USER_API_HASH is not set
-# CONFIG_CRYPTO_USER_API_SKCIPHER is not set
-CONFIG_CRYPTO_HW=y
-# CONFIG_CRYPTO_DEV_HIFN_795X is not set
-# CONFIG_CRYPTO_DEV_FSL_CAAM is not set
-CONFIG_CRYPTO_DEV_TALITOS=y
-CONFIG_PPC_CLOCK=y
-CONFIG_PPC_LIB_RHEAP=y
-# CONFIG_VIRTUALIZATION is not set
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/configs/x86_64-all/.gitignore b/packages/base/any/kernels/3.2.65-1+deb7u2/configs/x86_64-all/.gitignore
deleted file mode 100644
index b220e48d..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/configs/x86_64-all/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-kernel-3.2-deb7-x86_64-all
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/configs/x86_64-all/Makefile b/packages/base/any/kernels/3.2.65-1+deb7u2/configs/x86_64-all/Makefile
deleted file mode 100644
index 0d857115..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/configs/x86_64-all/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-############################################################
-#
-#
-# Copyright 2015 Big Switch Networks, Inc.
-#
-# Licensed under the Eclipse Public License, Version 1.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
-# either express or implied. See the License for the specific
-# language governing permissions and limitations under the
-# License.
-#
-#
-############################################################
-#
-# Default 3.2.65-1+deb7u2 configuration for x86_64 platforms.
-#
-############################################################
-THIS_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
-include $(ONL)/make/config.mk
-
-export ARCH := x86_64
-ifndef K_TARGET_DIR
-K_TARGET_DIR := $(THIS_DIR)
-endif
-
-include ../../kconfig.mk
-K_CONFIG := x86_64-all.config
-K_BUILD_TARGET := bzImage
-K_COPY_SRC := arch/x86/boot/bzImage
-ifndef K_COPY_DST
-K_COPY_DST := kernel-3.2-deb7-x86_64-all
-endif
-
-include $(ONL)/make/kbuild.mk
-
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/configs/x86_64-all/x86_64-all.config b/packages/base/any/kernels/3.2.65-1+deb7u2/configs/x86_64-all/x86_64-all.config
deleted file mode 100644
index 42e2b67b..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/configs/x86_64-all/x86_64-all.config
+++ /dev/null
@@ -1,3071 +0,0 @@
-#
-# Automatically generated file; DO NOT EDIT.
-# Linux/x86_64 3.2.65 Kernel Configuration
-#
-CONFIG_64BIT=y
-# CONFIG_X86_32 is not set
-CONFIG_X86_64=y
-CONFIG_X86=y
-CONFIG_INSTRUCTION_DECODER=y
-CONFIG_OUTPUT_FORMAT="elf64-x86-64"
-CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
-CONFIG_GENERIC_CMOS_UPDATE=y
-CONFIG_CLOCKSOURCE_WATCHDOG=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_ARCH_CLOCKSOURCE_DATA=y
-CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
-CONFIG_LOCKDEP_SUPPORT=y
-CONFIG_STACKTRACE_SUPPORT=y
-CONFIG_HAVE_LATENCYTOP_SUPPORT=y
-CONFIG_MMU=y
-CONFIG_ZONE_DMA=y
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEED_SG_DMA_LENGTH=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_GENERIC_BUG=y
-CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
-CONFIG_GENERIC_HWEIGHT=y
-CONFIG_GENERIC_GPIO=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
-CONFIG_ARCH_HAS_CPU_RELAX=y
-CONFIG_ARCH_HAS_DEFAULT_IDLE=y
-CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
-CONFIG_ARCH_HAS_CPU_AUTOPROBE=y
-CONFIG_HAVE_SETUP_PER_CPU_AREA=y
-CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
-CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ZONE_DMA32=y
-CONFIG_ARCH_POPULATES_NODE_MAP=y
-CONFIG_AUDIT_ARCH=y
-CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
-CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
-CONFIG_X86_64_SMP=y
-CONFIG_X86_HT=y
-CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11"
-# CONFIG_KTIME_SCALAR is not set
-CONFIG_ARCH_CPU_PROBE_RELEASE=y
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-CONFIG_HAVE_IRQ_WORK=y
-CONFIG_IRQ_WORK=y
-
-#
-# General setup
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-CONFIG_CROSS_COMPILE=""
-CONFIG_LOCALVERSION="-1+deb7u2-OpenNetworkLinux"
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_HAVE_KERNEL_GZIP=y
-CONFIG_HAVE_KERNEL_BZIP2=y
-CONFIG_HAVE_KERNEL_LZMA=y
-CONFIG_HAVE_KERNEL_XZ=y
-CONFIG_HAVE_KERNEL_LZO=y
-# CONFIG_KERNEL_GZIP is not set
-CONFIG_KERNEL_BZIP2=y
-# CONFIG_KERNEL_LZMA is not set
-# CONFIG_KERNEL_XZ is not set
-# CONFIG_KERNEL_LZO is not set
-CONFIG_DEFAULT_HOSTNAME="(none)"
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_SYSVIPC_SYSCTL=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_POSIX_MQUEUE_SYSCTL=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_BSD_PROCESS_ACCT_V3=y
-CONFIG_FHANDLE=y
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-CONFIG_TASK_XACCT=y
-CONFIG_TASK_IO_ACCOUNTING=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-CONFIG_AUDIT_WATCH=y
-CONFIG_AUDIT_TREE=y
-CONFIG_HAVE_GENERIC_HARDIRQS=y
-
-#
-# IRQ subsystem
-#
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_HAVE_SPARSE_IRQ=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_PENDING_IRQ=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_SPARSE_IRQ=y
-
-#
-# RCU Subsystem
-#
-CONFIG_TREE_RCU=y
-# CONFIG_PREEMPT_RCU is not set
-# CONFIG_RCU_TRACE is not set
-CONFIG_RCU_FANOUT=64
-# CONFIG_RCU_FANOUT_EXACT is not set
-CONFIG_RCU_FAST_NO_HZ=y
-# CONFIG_TREE_RCU_TRACE is not set
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
-CONFIG_CGROUPS=y
-# CONFIG_CGROUP_DEBUG is not set
-CONFIG_CGROUP_FREEZER=y
-CONFIG_CGROUP_DEVICE=y
-CONFIG_CPUSETS=y
-CONFIG_PROC_PID_CPUSET=y
-CONFIG_CGROUP_CPUACCT=y
-CONFIG_RESOURCE_COUNTERS=y
-CONFIG_CGROUP_MEM_RES_CTLR=y
-CONFIG_CGROUP_MEM_RES_CTLR_DISABLED=y
-CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y
-# CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED is not set
-CONFIG_CGROUP_PERF=y
-CONFIG_CGROUP_SCHED=y
-CONFIG_FAIR_GROUP_SCHED=y
-# CONFIG_CFS_BANDWIDTH is not set
-# CONFIG_RT_GROUP_SCHED is not set
-CONFIG_BLK_CGROUP=y
-# CONFIG_DEBUG_BLK_CGROUP is not set
-CONFIG_NAMESPACES=y
-CONFIG_UTS_NS=y
-CONFIG_IPC_NS=y
-CONFIG_USER_NS=y
-CONFIG_PID_NS=y
-CONFIG_NET_NS=y
-CONFIG_SCHED_AUTOGROUP=y
-CONFIG_MM_OWNER=y
-# CONFIG_SYSFS_DEPRECATED is not set
-CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_RD_GZIP=y
-CONFIG_RD_BZIP2=y
-CONFIG_RD_LZMA=y
-CONFIG_RD_XZ=y
-CONFIG_RD_LZO=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_SYSCTL=y
-CONFIG_ANON_INODES=y
-CONFIG_EXPERT=y
-CONFIG_UID16=y
-# CONFIG_SYSCTL_SYSCALL is not set
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_PCSPKR_PLATFORM=y
-CONFIG_HAVE_PCSPKR_PLATFORM=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SIGNALFD=y
-CONFIG_TIMERFD=y
-CONFIG_EVENTFD=y
-CONFIG_SHMEM=y
-CONFIG_AIO=y
-CONFIG_EMBEDDED=y
-CONFIG_HAVE_PERF_EVENTS=y
-
-#
-# Kernel Performance Events And Counters
-#
-CONFIG_PERF_EVENTS=y
-# CONFIG_PERF_COUNTERS is not set
-# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_PCI_QUIRKS=y
-# CONFIG_COMPAT_BRK is not set
-CONFIG_SLAB=y
-# CONFIG_SLUB is not set
-# CONFIG_SLOB is not set
-# CONFIG_PROFILING is not set
-CONFIG_TRACEPOINTS=y
-CONFIG_HAVE_OPROFILE=y
-# CONFIG_KPROBES is not set
-# CONFIG_JUMP_LABEL is not set
-CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
-CONFIG_HAVE_IOREMAP_PROT=y
-CONFIG_HAVE_KPROBES=y
-CONFIG_HAVE_KRETPROBES=y
-CONFIG_HAVE_OPTPROBES=y
-CONFIG_HAVE_ARCH_TRACEHOOK=y
-CONFIG_HAVE_DMA_ATTRS=y
-CONFIG_USE_GENERIC_SMP_HELPERS=y
-CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
-CONFIG_HAVE_DMA_API_DEBUG=y
-CONFIG_HAVE_HW_BREAKPOINT=y
-CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y
-CONFIG_HAVE_USER_RETURN_NOTIFIER=y
-CONFIG_HAVE_PERF_EVENTS_NMI=y
-CONFIG_HAVE_ARCH_JUMP_LABEL=y
-CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y
-
-#
-# GCOV-based kernel profiling
-#
-# CONFIG_GCOV_KERNEL is not set
-# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
-CONFIG_SLABINFO=y
-CONFIG_RT_MUTEXES=y
-CONFIG_BASE_SMALL=0
-CONFIG_MODULES=y
-# CONFIG_MODULE_FORCE_LOAD is not set
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-# CONFIG_MODVERSIONS is not set
-# CONFIG_MODULE_SRCVERSION_ALL is not set
-CONFIG_STOP_MACHINE=y
-CONFIG_BLOCK=y
-CONFIG_BLK_DEV_BSG=y
-CONFIG_BLK_DEV_BSGLIB=y
-CONFIG_BLK_DEV_INTEGRITY=y
-# CONFIG_BLK_DEV_THROTTLING is not set
-CONFIG_BLOCK_COMPAT=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_CFQ_GROUP_IOSCHED=y
-# CONFIG_DEFAULT_DEADLINE is not set
-CONFIG_DEFAULT_CFQ=y
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="cfq"
-# CONFIG_INLINE_SPIN_TRYLOCK is not set
-# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
-# CONFIG_INLINE_SPIN_LOCK is not set
-# CONFIG_INLINE_SPIN_LOCK_BH is not set
-# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
-# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
-CONFIG_INLINE_SPIN_UNLOCK=y
-# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
-CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
-# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
-# CONFIG_INLINE_READ_TRYLOCK is not set
-# CONFIG_INLINE_READ_LOCK is not set
-# CONFIG_INLINE_READ_LOCK_BH is not set
-# CONFIG_INLINE_READ_LOCK_IRQ is not set
-# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
-CONFIG_INLINE_READ_UNLOCK=y
-# CONFIG_INLINE_READ_UNLOCK_BH is not set
-CONFIG_INLINE_READ_UNLOCK_IRQ=y
-# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
-# CONFIG_INLINE_WRITE_TRYLOCK is not set
-# CONFIG_INLINE_WRITE_LOCK is not set
-# CONFIG_INLINE_WRITE_LOCK_BH is not set
-# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
-# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
-CONFIG_INLINE_WRITE_UNLOCK=y
-# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
-CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
-# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
-CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
-CONFIG_MUTEX_SPIN_ON_OWNER=y
-CONFIG_FREEZER=y
-
-#
-# Processor type and features
-#
-CONFIG_TICK_ONESHOT=y
-CONFIG_NO_HZ=y
-CONFIG_HIGH_RES_TIMERS=y
-CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
-CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
-CONFIG_SMP=y
-CONFIG_X86_MPPARSE=y
-# CONFIG_X86_EXTENDED_PLATFORM is not set
-CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y
-CONFIG_SCHED_OMIT_FRAME_POINTER=y
-CONFIG_PARAVIRT_GUEST=y
-# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set
-CONFIG_XEN=y
-CONFIG_XEN_DOM0=y
-CONFIG_XEN_PRIVILEGED_GUEST=y
-CONFIG_XEN_PVHVM=y
-CONFIG_XEN_MAX_DOMAIN_MEMORY=128
-CONFIG_XEN_SAVE_RESTORE=y
-# CONFIG_XEN_DEBUG_FS is not set
-CONFIG_KVM_CLOCK=y
-CONFIG_KVM_GUEST=y
-CONFIG_PARAVIRT=y
-# CONFIG_PARAVIRT_SPINLOCKS is not set
-CONFIG_PARAVIRT_CLOCK=y
-# CONFIG_PARAVIRT_DEBUG is not set
-CONFIG_NO_BOOTMEM=y
-CONFIG_MEMTEST=y
-# CONFIG_MK8 is not set
-# CONFIG_MPSC is not set
-# CONFIG_MCORE2 is not set
-# CONFIG_MATOM is not set
-CONFIG_GENERIC_CPU=y
-CONFIG_X86_INTERNODE_CACHE_SHIFT=6
-CONFIG_X86_CMPXCHG=y
-CONFIG_CMPXCHG_LOCAL=y
-CONFIG_CMPXCHG_DOUBLE=y
-CONFIG_X86_L1_CACHE_SHIFT=6
-CONFIG_X86_XADD=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_TSC=y
-CONFIG_X86_CMPXCHG64=y
-CONFIG_X86_CMOV=y
-CONFIG_X86_MINIMUM_CPU_FAMILY=64
-CONFIG_X86_DEBUGCTLMSR=y
-# CONFIG_PROCESSOR_SELECT is not set
-CONFIG_CPU_SUP_INTEL=y
-CONFIG_CPU_SUP_AMD=y
-CONFIG_CPU_SUP_CENTAUR=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_DMI=y
-CONFIG_GART_IOMMU=y
-CONFIG_CALGARY_IOMMU=y
-CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y
-CONFIG_SWIOTLB=y
-CONFIG_IOMMU_HELPER=y
-# CONFIG_MAXSMP is not set
-CONFIG_NR_CPUS=512
-CONFIG_SCHED_SMT=y
-CONFIG_SCHED_MC=y
-# CONFIG_IRQ_TIME_ACCOUNTING is not set
-# CONFIG_PREEMPT_NONE is not set
-CONFIG_PREEMPT_VOLUNTARY=y
-# CONFIG_PREEMPT is not set
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
-CONFIG_X86_MCE=y
-CONFIG_X86_MCE_INTEL=y
-CONFIG_X86_MCE_AMD=y
-CONFIG_X86_MCE_THRESHOLD=y
-# CONFIG_X86_MCE_INJECT is not set
-CONFIG_X86_THERMAL_VECTOR=y
-# CONFIG_X86_16BIT is not set
-# CONFIG_I8K is not set
-# CONFIG_MICROCODE is not set
-CONFIG_X86_MSR=y
-CONFIG_X86_CPUID=y
-CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
-CONFIG_ARCH_DMA_ADDR_T_64BIT=y
-CONFIG_DIRECT_GBPAGES=y
-# CONFIG_NUMA is not set
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_SPARSEMEM_DEFAULT=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_ARCH_MEMORY_PROBE=y
-CONFIG_ARCH_PROC_KCORE_TEXT=y
-CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_SPARSEMEM_MANUAL=y
-CONFIG_SPARSEMEM=y
-CONFIG_HAVE_MEMORY_PRESENT=y
-CONFIG_SPARSEMEM_EXTREME=y
-CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
-CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER=y
-CONFIG_SPARSEMEM_VMEMMAP=y
-CONFIG_HAVE_MEMBLOCK=y
-CONFIG_MEMORY_HOTPLUG=y
-CONFIG_MEMORY_HOTPLUG_SPARSE=y
-CONFIG_MEMORY_HOTREMOVE=y
-CONFIG_PAGEFLAGS_EXTENDED=y
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_COMPACTION=y
-CONFIG_MIGRATION=y
-CONFIG_PHYS_ADDR_T_64BIT=y
-CONFIG_ZONE_DMA_FLAG=1
-CONFIG_BOUNCE=y
-CONFIG_VIRT_TO_BUS=y
-CONFIG_MMU_NOTIFIER=y
-CONFIG_KSM=y
-CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
-CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y
-CONFIG_MEMORY_FAILURE=y
-CONFIG_HWPOISON_INJECT=y
-CONFIG_TRANSPARENT_HUGEPAGE=y
-# CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS is not set
-CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y
-# CONFIG_CLEANCACHE is not set
-# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set
-CONFIG_X86_RESERVE_LOW=64
-CONFIG_MTRR=y
-CONFIG_MTRR_SANITIZER=y
-CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0
-CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
-CONFIG_X86_PAT=y
-CONFIG_ARCH_USES_PG_UNCACHED=y
-CONFIG_ARCH_RANDOM=y
-# CONFIG_EFI is not set
-CONFIG_SECCOMP=y
-CONFIG_CC_STACKPROTECTOR=y
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_300 is not set
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-CONFIG_SCHED_HRTICK=y
-CONFIG_KEXEC=y
-CONFIG_CRASH_DUMP=y
-CONFIG_PHYSICAL_START=0x1000000
-CONFIG_RELOCATABLE=y
-CONFIG_PHYSICAL_ALIGN=0x1000000
-CONFIG_HOTPLUG_CPU=y
-# CONFIG_COMPAT_VDSO is not set
-# CONFIG_CMDLINE_BOOL is not set
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
-
-#
-# Power management and ACPI options
-#
-# CONFIG_SUSPEND is not set
-CONFIG_HIBERNATE_CALLBACKS=y
-# CONFIG_HIBERNATION is not set
-CONFIG_PM_SLEEP=y
-CONFIG_PM_SLEEP_SMP=y
-# CONFIG_PM_RUNTIME is not set
-CONFIG_PM=y
-# CONFIG_PM_DEBUG is not set
-CONFIG_ACPI=y
-# CONFIG_ACPI_PROCFS is not set
-# CONFIG_ACPI_PROCFS_POWER is not set
-# CONFIG_ACPI_EC_DEBUGFS is not set
-CONFIG_ACPI_PROC_EVENT=y
-CONFIG_ACPI_AC=y
-CONFIG_ACPI_BATTERY=y
-CONFIG_ACPI_BUTTON=y
-CONFIG_ACPI_FAN=y
-# CONFIG_ACPI_DOCK is not set
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_HOTPLUG_CPU=y
-# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
-CONFIG_ACPI_THERMAL=y
-# CONFIG_ACPI_CUSTOM_DSDT is not set
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-# CONFIG_ACPI_PCI_SLOT is not set
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_CONTAINER=y
-# CONFIG_ACPI_HOTPLUG_MEMORY is not set
-# CONFIG_ACPI_SBS is not set
-# CONFIG_ACPI_HED is not set
-CONFIG_ACPI_CUSTOM_METHOD=y
-# CONFIG_ACPI_APEI is not set
-# CONFIG_SFI is not set
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=y
-CONFIG_CPU_FREQ_STAT=y
-# CONFIG_CPU_FREQ_STAT_DETAILS is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=y
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=y
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
-
-#
-# x86 CPU frequency scaling drivers
-#
-# CONFIG_X86_PCC_CPUFREQ is not set
-# CONFIG_X86_ACPI_CPUFREQ is not set
-# CONFIG_X86_POWERNOW_K8 is not set
-# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
-CONFIG_X86_P4_CLOCKMOD=y
-
-#
-# shared options
-#
-CONFIG_X86_SPEEDSTEP_LIB=y
-CONFIG_CPU_IDLE=y
-CONFIG_CPU_IDLE_GOV_LADDER=y
-CONFIG_CPU_IDLE_GOV_MENU=y
-CONFIG_INTEL_IDLE=y
-
-#
-# Memory power savings
-#
-CONFIG_I7300_IDLE_IOAT_CHANNEL=y
-CONFIG_I7300_IDLE=y
-
-#
-# Bus options (PCI etc.)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCI_XEN=y
-CONFIG_PCI_DOMAINS=y
-# CONFIG_PCI_CNB20LE_QUIRK is not set
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=y
-CONFIG_PCIEAER=y
-# CONFIG_PCIE_ECRC is not set
-CONFIG_PCIEAER_INJECT=y
-CONFIG_PCIEASPM=y
-# CONFIG_PCIEASPM_DEBUG is not set
-CONFIG_ARCH_SUPPORTS_MSI=y
-CONFIG_PCI_MSI=y
-# CONFIG_PCI_DEBUG is not set
-# CONFIG_PCI_STUB is not set
-# CONFIG_XEN_PCIDEV_FRONTEND is not set
-CONFIG_HT_IRQ=y
-CONFIG_PCI_ATS=y
-CONFIG_PCI_IOV=y
-# CONFIG_PCI_PRI is not set
-# CONFIG_PCI_PASID is not set
-CONFIG_PCI_IOAPIC=y
-CONFIG_PCI_LABEL=y
-CONFIG_ISA_DMA_API=y
-CONFIG_AMD_NB=y
-CONFIG_PCCARD=y
-CONFIG_PCMCIA=y
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-# CONFIG_YENTA is not set
-CONFIG_PD6729=y
-CONFIG_I82092=y
-CONFIG_PCCARD_NONSTATIC=y
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_FAKE=y
-# CONFIG_HOTPLUG_PCI_ACPI is not set
-CONFIG_HOTPLUG_PCI_CPCI=y
-CONFIG_HOTPLUG_PCI_CPCI_ZT5550=y
-CONFIG_HOTPLUG_PCI_CPCI_GENERIC=y
-CONFIG_HOTPLUG_PCI_SHPC=y
-# CONFIG_RAPIDIO is not set
-
-#
-# Executable file formats / Emulations
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_COMPAT_BINFMT_ELF=y
-CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
-# CONFIG_HAVE_AOUT is not set
-CONFIG_BINFMT_MISC=y
-CONFIG_IA32_EMULATION=y
-CONFIG_IA32_AOUT=y
-CONFIG_COMPAT=y
-CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
-CONFIG_SYSVIPC_COMPAT=y
-CONFIG_KEYS_COMPAT=y
-CONFIG_HAVE_TEXT_POKE_SMP=y
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-CONFIG_XFRM_SUB_POLICY=y
-CONFIG_XFRM_MIGRATE=y
-# CONFIG_XFRM_STATISTICS is not set
-CONFIG_XFRM_IPCOMP=y
-CONFIG_NET_KEY=y
-CONFIG_NET_KEY_MIGRATE=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_FIB_TRIE_STATS=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_VERBOSE=y
-CONFIG_IP_ROUTE_CLASSID=y
-# CONFIG_IP_PNP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE_DEMUX is not set
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_XFRM_TUNNEL is not set
-CONFIG_INET_TUNNEL=y
-# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
-# CONFIG_INET_XFRM_MODE_TUNNEL is not set
-# CONFIG_INET_XFRM_MODE_BEET is not set
-CONFIG_INET_LRO=y
-CONFIG_INET_DIAG=y
-CONFIG_INET_TCP_DIAG=y
-CONFIG_TCP_CONG_ADVANCED=y
-CONFIG_TCP_CONG_BIC=y
-CONFIG_TCP_CONG_CUBIC=y
-CONFIG_TCP_CONG_WESTWOOD=y
-CONFIG_TCP_CONG_HTCP=y
-CONFIG_TCP_CONG_HSTCP=y
-CONFIG_TCP_CONG_HYBLA=y
-CONFIG_TCP_CONG_VEGAS=y
-CONFIG_TCP_CONG_SCALABLE=y
-CONFIG_TCP_CONG_LP=y
-CONFIG_TCP_CONG_VENO=y
-CONFIG_TCP_CONG_YEAH=y
-CONFIG_TCP_CONG_ILLINOIS=y
-# CONFIG_DEFAULT_BIC is not set
-CONFIG_DEFAULT_CUBIC=y
-# CONFIG_DEFAULT_HTCP is not set
-# CONFIG_DEFAULT_HYBLA is not set
-# CONFIG_DEFAULT_VEGAS is not set
-# CONFIG_DEFAULT_VENO is not set
-# CONFIG_DEFAULT_WESTWOOD is not set
-# CONFIG_DEFAULT_RENO is not set
-CONFIG_DEFAULT_TCP_CONG="cubic"
-CONFIG_TCP_MD5SIG=y
-CONFIG_IPV6=y
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-CONFIG_IPV6_OPTIMISTIC_DAD=y
-CONFIG_INET6_AH=y
-CONFIG_INET6_ESP=y
-CONFIG_INET6_IPCOMP=y
-CONFIG_IPV6_MIP6=y
-CONFIG_INET6_XFRM_TUNNEL=y
-CONFIG_INET6_TUNNEL=y
-CONFIG_INET6_XFRM_MODE_TRANSPORT=y
-CONFIG_INET6_XFRM_MODE_TUNNEL=y
-CONFIG_INET6_XFRM_MODE_BEET=y
-CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y
-CONFIG_IPV6_SIT=y
-CONFIG_IPV6_SIT_6RD=y
-CONFIG_IPV6_NDISC_NODETYPE=y
-CONFIG_IPV6_TUNNEL=y
-CONFIG_IPV6_MULTIPLE_TABLES=y
-CONFIG_IPV6_SUBTREES=y
-CONFIG_IPV6_MROUTE=y
-CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y
-CONFIG_IPV6_PIMSM_V2=y
-CONFIG_NETWORK_SECMARK=y
-# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_NETFILTER_ADVANCED=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=y
-CONFIG_NETFILTER_NETLINK_QUEUE=y
-CONFIG_NETFILTER_NETLINK_LOG=y
-CONFIG_NF_CONNTRACK=y
-CONFIG_NF_CONNTRACK_MARK=y
-CONFIG_NF_CONNTRACK_SECMARK=y
-CONFIG_NF_CONNTRACK_ZONES=y
-CONFIG_NF_CONNTRACK_EVENTS=y
-CONFIG_NF_CONNTRACK_TIMESTAMP=y
-CONFIG_NF_CT_PROTO_DCCP=y
-CONFIG_NF_CT_PROTO_GRE=y
-CONFIG_NF_CT_PROTO_SCTP=y
-CONFIG_NF_CT_PROTO_UDPLITE=y
-CONFIG_NF_CONNTRACK_AMANDA=y
-CONFIG_NF_CONNTRACK_FTP=y
-CONFIG_NF_CONNTRACK_H323=y
-CONFIG_NF_CONNTRACK_IRC=y
-CONFIG_NF_CONNTRACK_BROADCAST=y
-CONFIG_NF_CONNTRACK_NETBIOS_NS=y
-CONFIG_NF_CONNTRACK_SNMP=y
-CONFIG_NF_CONNTRACK_PPTP=y
-CONFIG_NF_CONNTRACK_SANE=y
-CONFIG_NF_CONNTRACK_SIP=y
-CONFIG_NF_CONNTRACK_TFTP=y
-CONFIG_NF_CT_NETLINK=y
-CONFIG_NETFILTER_TPROXY=y
-CONFIG_NETFILTER_XTABLES=y
-
-#
-# Xtables combined modules
-#
-CONFIG_NETFILTER_XT_MARK=y
-CONFIG_NETFILTER_XT_CONNMARK=y
-CONFIG_NETFILTER_XT_SET=y
-
-#
-# Xtables targets
-#
-CONFIG_NETFILTER_XT_TARGET_AUDIT=y
-CONFIG_NETFILTER_XT_TARGET_CHECKSUM=y
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=y
-CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y
-CONFIG_NETFILTER_XT_TARGET_CT=y
-CONFIG_NETFILTER_XT_TARGET_DSCP=y
-CONFIG_NETFILTER_XT_TARGET_HL=y
-CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y
-CONFIG_NETFILTER_XT_TARGET_MARK=y
-CONFIG_NETFILTER_XT_TARGET_NFLOG=y
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=y
-CONFIG_NETFILTER_XT_TARGET_RATEEST=y
-CONFIG_NETFILTER_XT_TARGET_TEE=y
-CONFIG_NETFILTER_XT_TARGET_TPROXY=y
-CONFIG_NETFILTER_XT_TARGET_TRACE=y
-CONFIG_NETFILTER_XT_TARGET_SECMARK=y
-CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
-CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=y
-# CONFIG_NETFILTER_XT_TARGET_ERSPAN is not set
-# CONFIG_NETFILTER_XT_TARGET_SPAN is not set
-# CONFIG_NETFILTER_XT_TARGET_POLICE is not set
-# CONFIG_NETFILTER_XT_TARGET_TRICOLORPOLICE is not set
-# CONFIG_NETFILTER_XT_TARGET_SETCLASS is not set
-# CONFIG_NETFILTER_XT_TARGET_SETQOS is not set
-
-#
-# Xtables matches
-#
-CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=y
-CONFIG_NETFILTER_XT_MATCH_CLUSTER=y
-CONFIG_NETFILTER_XT_MATCH_COMMENT=y
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y
-CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=y
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
-CONFIG_NETFILTER_XT_MATCH_CPU=y
-CONFIG_NETFILTER_XT_MATCH_DCCP=y
-CONFIG_NETFILTER_XT_MATCH_DEVGROUP=y
-CONFIG_NETFILTER_XT_MATCH_DSCP=y
-CONFIG_NETFILTER_XT_MATCH_ESP=y
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y
-CONFIG_NETFILTER_XT_MATCH_HELPER=y
-CONFIG_NETFILTER_XT_MATCH_HL=y
-CONFIG_NETFILTER_XT_MATCH_IPRANGE=y
-CONFIG_NETFILTER_XT_MATCH_IPVS=y
-CONFIG_NETFILTER_XT_MATCH_LENGTH=y
-CONFIG_NETFILTER_XT_MATCH_LIMIT=y
-CONFIG_NETFILTER_XT_MATCH_MAC=y
-CONFIG_NETFILTER_XT_MATCH_MARK=y
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y
-CONFIG_NETFILTER_XT_MATCH_OSF=y
-CONFIG_NETFILTER_XT_MATCH_OWNER=y
-CONFIG_NETFILTER_XT_MATCH_POLICY=y
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
-CONFIG_NETFILTER_XT_MATCH_QUOTA=y
-CONFIG_NETFILTER_XT_MATCH_RATEEST=y
-CONFIG_NETFILTER_XT_MATCH_REALM=y
-CONFIG_NETFILTER_XT_MATCH_RECENT=y
-CONFIG_NETFILTER_XT_MATCH_SCTP=y
-CONFIG_NETFILTER_XT_MATCH_SOCKET=y
-CONFIG_NETFILTER_XT_MATCH_STATE=y
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=y
-CONFIG_NETFILTER_XT_MATCH_STRING=y
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=y
-CONFIG_NETFILTER_XT_MATCH_TIME=y
-CONFIG_NETFILTER_XT_MATCH_U32=y
-CONFIG_IP_SET=y
-CONFIG_IP_SET_MAX=256
-CONFIG_IP_SET_BITMAP_IP=y
-CONFIG_IP_SET_BITMAP_IPMAC=y
-CONFIG_IP_SET_BITMAP_PORT=y
-CONFIG_IP_SET_HASH_IP=y
-CONFIG_IP_SET_HASH_IPPORT=y
-CONFIG_IP_SET_HASH_IPPORTIP=y
-CONFIG_IP_SET_HASH_IPPORTNET=y
-CONFIG_IP_SET_HASH_NET=y
-CONFIG_IP_SET_HASH_NETPORT=y
-CONFIG_IP_SET_HASH_NETIFACE=y
-CONFIG_IP_SET_LIST_SET=y
-CONFIG_IP_VS=y
-CONFIG_IP_VS_IPV6=y
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_AH_ESP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-CONFIG_IP_VS_PROTO_SCTP=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=y
-CONFIG_IP_VS_WRR=y
-CONFIG_IP_VS_LC=y
-CONFIG_IP_VS_WLC=y
-CONFIG_IP_VS_LBLC=y
-CONFIG_IP_VS_LBLCR=y
-CONFIG_IP_VS_DH=y
-CONFIG_IP_VS_SH=y
-CONFIG_IP_VS_SED=y
-CONFIG_IP_VS_NQ=y
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=y
-CONFIG_IP_VS_NFCT=y
-CONFIG_IP_VS_PE_SIP=y
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_NF_DEFRAG_IPV4=y
-CONFIG_NF_CONNTRACK_IPV4=y
-CONFIG_NF_CONNTRACK_PROC_COMPAT=y
-CONFIG_IP_NF_QUEUE=y
-CONFIG_IP_NF_IPTABLES=y
-CONFIG_IP_NF_MATCH_AH=y
-CONFIG_IP_NF_MATCH_ECN=y
-CONFIG_IP_NF_MATCH_TTL=y
-CONFIG_IP_NF_FILTER=y
-CONFIG_IP_NF_TARGET_REJECT=y
-CONFIG_IP_NF_TARGET_LOG=y
-CONFIG_IP_NF_TARGET_ULOG=y
-CONFIG_NF_NAT=y
-CONFIG_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=y
-CONFIG_IP_NF_TARGET_NETMAP=y
-CONFIG_IP_NF_TARGET_REDIRECT=y
-CONFIG_NF_NAT_SNMP_BASIC=y
-CONFIG_NF_NAT_PROTO_DCCP=y
-CONFIG_NF_NAT_PROTO_GRE=y
-CONFIG_NF_NAT_PROTO_UDPLITE=y
-CONFIG_NF_NAT_PROTO_SCTP=y
-CONFIG_NF_NAT_FTP=y
-CONFIG_NF_NAT_IRC=y
-CONFIG_NF_NAT_TFTP=y
-CONFIG_NF_NAT_AMANDA=y
-CONFIG_NF_NAT_PPTP=y
-CONFIG_NF_NAT_H323=y
-CONFIG_NF_NAT_SIP=y
-CONFIG_IP_NF_MANGLE=y
-CONFIG_IP_NF_TARGET_CLUSTERIP=y
-CONFIG_IP_NF_TARGET_ECN=y
-CONFIG_IP_NF_TARGET_TTL=y
-CONFIG_IP_NF_RAW=y
-CONFIG_IP_NF_ARPTABLES=y
-CONFIG_IP_NF_ARPFILTER=y
-CONFIG_IP_NF_ARP_MANGLE=y
-
-#
-# IPv6: Netfilter Configuration
-#
-CONFIG_NF_DEFRAG_IPV6=y
-CONFIG_NF_CONNTRACK_IPV6=y
-CONFIG_IP6_NF_QUEUE=y
-CONFIG_IP6_NF_IPTABLES=y
-CONFIG_IP6_NF_MATCH_AH=y
-CONFIG_IP6_NF_MATCH_EUI64=y
-CONFIG_IP6_NF_MATCH_FRAG=y
-CONFIG_IP6_NF_MATCH_OPTS=y
-CONFIG_IP6_NF_MATCH_HL=y
-CONFIG_IP6_NF_MATCH_IPV6HEADER=y
-CONFIG_IP6_NF_MATCH_MH=y
-CONFIG_IP6_NF_MATCH_RT=y
-CONFIG_IP6_NF_TARGET_HL=y
-CONFIG_IP6_NF_TARGET_LOG=y
-CONFIG_IP6_NF_FILTER=y
-CONFIG_IP6_NF_TARGET_REJECT=y
-CONFIG_IP6_NF_MANGLE=y
-CONFIG_IP6_NF_RAW=y
-# CONFIG_IP_DCCP is not set
-CONFIG_IP_SCTP=y
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-# CONFIG_RDS is not set
-# CONFIG_TIPC is not set
-# CONFIG_ATM is not set
-# CONFIG_L2TP is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_NET_DSA is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_PHONET is not set
-# CONFIG_IEEE802154 is not set
-# CONFIG_NET_SCHED is not set
-# CONFIG_DCB is not set
-CONFIG_DNS_RESOLVER=y
-# CONFIG_BATMAN_ADV is not set
-CONFIG_RPS=y
-CONFIG_RFS_ACCEL=y
-CONFIG_XPS=y
-CONFIG_BQL=y
-# CONFIG_BPF_JIT is not set
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=y
-CONFIG_NET_DROP_MONITOR=y
-# CONFIG_HAMRADIO is not set
-# CONFIG_CAN is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
-CONFIG_AF_RXRPC=y
-# CONFIG_AF_RXRPC_DEBUG is not set
-# CONFIG_RXKAD is not set
-CONFIG_FIB_RULES=y
-CONFIG_WIRELESS=y
-# CONFIG_CFG80211 is not set
-CONFIG_LIB80211=y
-# CONFIG_LIB80211_DEBUG is not set
-
-#
-# CFG80211 needs to be enabled for MAC80211
-#
-# CONFIG_WIMAX is not set
-# CONFIG_RFKILL is not set
-# CONFIG_NET_9P is not set
-# CONFIG_CAIF is not set
-CONFIG_CEPH_LIB=y
-# CONFIG_CEPH_LIB_PRETTYDEBUG is not set
-# CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set
-# CONFIG_NFC is not set
-CONFIG_HAVE_BPF_JIT=y
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_UEVENT_HELPER_PATH=""
-CONFIG_DEVTMPFS=y
-# CONFIG_DEVTMPFS_MOUNT is not set
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_FIRMWARE_IN_KERNEL is not set
-CONFIG_EXTRA_FIRMWARE=""
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
-CONFIG_SYS_HYPERVISOR=y
-# CONFIG_GENERIC_CPU_DEVICES is not set
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-# CONFIG_MTD is not set
-# CONFIG_PARPORT is not set
-CONFIG_PNP=y
-CONFIG_PNP_DEBUG_MESSAGES=y
-
-#
-# Protocols
-#
-CONFIG_PNPACPI=y
-CONFIG_BLK_DEV=y
-# CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
-# CONFIG_BLK_DEV_CRYPTOLOOP is not set
-# CONFIG_BLK_DEV_DRBD is not set
-CONFIG_BLK_DEV_NBD=y
-# CONFIG_BLK_DEV_OSD is not set
-CONFIG_BLK_DEV_SX8=y
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=65536
-# CONFIG_BLK_DEV_XIP is not set
-# CONFIG_CDROM_PKTCDVD is not set
-# CONFIG_ATA_OVER_ETH is not set
-# CONFIG_XEN_BLKDEV_FRONTEND is not set
-# CONFIG_XEN_BLKDEV_BACKEND is not set
-# CONFIG_BLK_DEV_HD is not set
-# CONFIG_BLK_DEV_RBD is not set
-# CONFIG_SENSORS_LIS3LV02D is not set
-CONFIG_MISC_DEVICES=y
-# CONFIG_AD525X_DPOT is not set
-# CONFIG_IBM_ASM is not set
-# CONFIG_PHANTOM is not set
-# CONFIG_INTEL_MID_PTI is not set
-# CONFIG_SGI_IOC4 is not set
-# CONFIG_TIFM_CORE is not set
-# CONFIG_ICS932S401 is not set
-# CONFIG_ENCLOSURE_SERVICES is not set
-# CONFIG_HP_ILO is not set
-# CONFIG_APDS9802ALS is not set
-# CONFIG_ISL29003 is not set
-# CONFIG_ISL29020 is not set
-# CONFIG_SENSORS_TSL2550 is not set
-# CONFIG_SENSORS_BH1780 is not set
-# CONFIG_SENSORS_BH1770 is not set
-# CONFIG_SENSORS_APDS990X is not set
-# CONFIG_HMC6352 is not set
-# CONFIG_DS1682 is not set
-CONFIG_TI_DAC7512=y
-# CONFIG_VMWARE_BALLOON is not set
-# CONFIG_BMP085 is not set
-# CONFIG_PCH_PHUB is not set
-# CONFIG_USB_SWITCH_FSA9480 is not set
-CONFIG_EARLY_DMA_ALLOC=y
-CONFIG_EDA_DEF_SIZE=0x04000000
-CONFIG_EDA_DEF_ALIGN=0x00100000
-# CONFIG_RETIMER_CLASS is not set
-# CONFIG_DS100DF410 is not set
-# CONFIG_C2PORT is not set
-
-#
-# EEPROM support
-#
-CONFIG_EEPROM_CLASS=y
-CONFIG_EEPROM_AT24=y
-CONFIG_EEPROM_AT25=y
-# CONFIG_EEPROM_LEGACY is not set
-# CONFIG_EEPROM_MAX6875 is not set
-CONFIG_EEPROM_ACCTON_AS5712_54x_SFP=y
-CONFIG_EEPROM_ACCTON_AS6712_32x_SFP=y
-CONFIG_EEPROM_ACCTON_AS7512_32x_SFP=y
-CONFIG_EEPROM_ACCTON_AS7712_32x_SFP=y
-CONFIG_EEPROM_ACCTON_AS5812_54x_SFP=y
-CONFIG_EEPROM_ACCTON_AS6812_32x_SFP=y
-CONFIG_EEPROM_ACCTON_AS5812_54t_SFP=y
-CONFIG_EEPROM_ACCTON_AS5512_54X_SFP=y
-CONFIG_EEPROM_ACCTON_AS7716_32x_SFP=y
-CONFIG_EEPROM_93CX6=y
-# CONFIG_EEPROM_93XX46 is not set
-CONFIG_EEPROM_SFF_8436=y
-CONFIG_CB710_CORE=y
-# CONFIG_CB710_DEBUG is not set
-CONFIG_CB710_DEBUG_ASSUMPTIONS=y
-# CONFIG_IWMC3200TOP is not set
-
-#
-# Texas Instruments shared transport line discipline
-#
-# CONFIG_TI_ST is not set
-# CONFIG_SENSORS_LIS3_I2C is not set
-
-#
-# Altera FPGA firmware download module
-#
-# CONFIG_ALTERA_STAPL is not set
-CONFIG_HAVE_IDE=y
-# CONFIG_IDE is not set
-
-#
-# SCSI device support
-#
-CONFIG_SCSI_MOD=y
-CONFIG_RAID_ATTRS=y
-CONFIG_SCSI=y
-CONFIG_SCSI_DMA=y
-CONFIG_SCSI_TGT=y
-CONFIG_SCSI_NETLINK=y
-# CONFIG_SCSI_PROC_FS is not set
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=y
-# CONFIG_CHR_DEV_ST is not set
-# CONFIG_CHR_DEV_OSST is not set
-# CONFIG_BLK_DEV_SR is not set
-CONFIG_CHR_DEV_SG=y
-# CONFIG_CHR_DEV_SCH is not set
-CONFIG_SCSI_MULTI_LUN=y
-# CONFIG_SCSI_CONSTANTS is not set
-# CONFIG_SCSI_LOGGING is not set
-# CONFIG_SCSI_SCAN_ASYNC is not set
-CONFIG_SCSI_WAIT_SCAN=m
-
-#
-# SCSI Transports
-#
-CONFIG_SCSI_SPI_ATTRS=y
-CONFIG_SCSI_FC_ATTRS=y
-CONFIG_SCSI_FC_TGT_ATTRS=y
-CONFIG_SCSI_ISCSI_ATTRS=y
-CONFIG_SCSI_SAS_ATTRS=y
-CONFIG_SCSI_SAS_LIBSAS=y
-CONFIG_SCSI_SAS_ATA=y
-CONFIG_SCSI_SAS_HOST_SMP=y
-CONFIG_SCSI_SRP_ATTRS=y
-CONFIG_SCSI_SRP_TGT_ATTRS=y
-CONFIG_SCSI_LOWLEVEL=y
-CONFIG_ISCSI_TCP=y
-CONFIG_ISCSI_BOOT_SYSFS=y
-CONFIG_SCSI_CXGB3_ISCSI=y
-CONFIG_SCSI_CXGB4_ISCSI=y
-CONFIG_SCSI_BNX2_ISCSI=y
-CONFIG_SCSI_BNX2X_FCOE=y
-CONFIG_BE2ISCSI=y
-CONFIG_BLK_DEV_3W_XXXX_RAID=y
-CONFIG_SCSI_HPSA=y
-CONFIG_SCSI_3W_9XXX=y
-CONFIG_SCSI_3W_SAS=y
-CONFIG_SCSI_ACARD=y
-CONFIG_SCSI_AACRAID=y
-CONFIG_SCSI_AIC7XXX=y
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=8
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-CONFIG_AIC7XXX_DEBUG_ENABLE=y
-CONFIG_AIC7XXX_DEBUG_MASK=0
-CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_AIC7XXX_OLD=y
-CONFIG_SCSI_AIC79XX=y
-CONFIG_AIC79XX_CMDS_PER_DEVICE=32
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-CONFIG_AIC79XX_DEBUG_ENABLE=y
-CONFIG_AIC79XX_DEBUG_MASK=0
-CONFIG_AIC79XX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_AIC94XX=y
-# CONFIG_AIC94XX_DEBUG is not set
-CONFIG_SCSI_MVSAS=y
-# CONFIG_SCSI_MVSAS_DEBUG is not set
-# CONFIG_SCSI_MVSAS_TASKLET is not set
-CONFIG_SCSI_MVUMI=y
-CONFIG_SCSI_DPT_I2O=y
-CONFIG_SCSI_ADVANSYS=y
-CONFIG_SCSI_ARCMSR=y
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=y
-CONFIG_MEGARAID_MAILBOX=y
-CONFIG_MEGARAID_LEGACY=y
-CONFIG_MEGARAID_SAS=y
-CONFIG_SCSI_MPT2SAS=y
-CONFIG_SCSI_MPT2SAS_MAX_SGE=128
-# CONFIG_SCSI_MPT2SAS_LOGGING is not set
-CONFIG_SCSI_HPTIOP=y
-CONFIG_SCSI_BUSLOGIC=y
-CONFIG_VMWARE_PVSCSI=y
-CONFIG_LIBFC=y
-CONFIG_LIBFCOE=y
-CONFIG_FCOE=y
-CONFIG_FCOE_FNIC=y
-CONFIG_SCSI_DMX3191D=y
-CONFIG_SCSI_EATA=y
-CONFIG_SCSI_EATA_TAGGED_QUEUE=y
-CONFIG_SCSI_EATA_LINKED_COMMANDS=y
-CONFIG_SCSI_EATA_MAX_TAGS=16
-CONFIG_SCSI_FUTURE_DOMAIN=y
-CONFIG_SCSI_GDTH=y
-CONFIG_SCSI_ISCI=y
-CONFIG_SCSI_IPS=y
-CONFIG_SCSI_INITIO=y
-CONFIG_SCSI_INIA100=y
-CONFIG_SCSI_STEX=y
-CONFIG_SCSI_SYM53C8XX_2=y
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-CONFIG_SCSI_IPR=y
-# CONFIG_SCSI_IPR_TRACE is not set
-# CONFIG_SCSI_IPR_DUMP is not set
-CONFIG_SCSI_QLOGIC_1280=y
-CONFIG_SCSI_QLA_FC=y
-CONFIG_SCSI_QLA_ISCSI=y
-CONFIG_SCSI_LPFC=y
-# CONFIG_SCSI_LPFC_DEBUG_FS is not set
-CONFIG_SCSI_DC395x=y
-CONFIG_SCSI_DC390T=y
-CONFIG_SCSI_DEBUG=y
-CONFIG_SCSI_PMCRAID=y
-CONFIG_SCSI_PM8001=y
-CONFIG_SCSI_SRP=y
-CONFIG_SCSI_BFA_FC=y
-CONFIG_SCSI_LOWLEVEL_PCMCIA=y
-# CONFIG_PCMCIA_AHA152X is not set
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-CONFIG_SCSI_DH=y
-CONFIG_SCSI_DH_RDAC=y
-CONFIG_SCSI_DH_HP_SW=y
-CONFIG_SCSI_DH_EMC=y
-CONFIG_SCSI_DH_ALUA=y
-CONFIG_SCSI_OSD_INITIATOR=y
-CONFIG_SCSI_OSD_ULD=y
-CONFIG_SCSI_OSD_DPRINT_SENSE=1
-# CONFIG_SCSI_OSD_DEBUG is not set
-CONFIG_ATA=y
-# CONFIG_ATA_NONSTANDARD is not set
-CONFIG_ATA_VERBOSE_ERROR=y
-CONFIG_ATA_ACPI=y
-CONFIG_SATA_PMP=y
-
-#
-# Controllers with non-SFF native interface
-#
-CONFIG_SATA_AHCI=y
-CONFIG_SATA_AHCI_PLATFORM=y
-# CONFIG_SATA_INIC162X is not set
-CONFIG_SATA_ACARD_AHCI=y
-CONFIG_SATA_SIL24=y
-CONFIG_ATA_SFF=y
-
-#
-# SFF controllers with custom DMA interface
-#
-CONFIG_PDC_ADMA=y
-CONFIG_SATA_QSTOR=y
-CONFIG_SATA_SX4=y
-CONFIG_ATA_BMDMA=y
-
-#
-# SATA SFF controllers with BMDMA
-#
-CONFIG_ATA_PIIX=y
-CONFIG_SATA_MV=y
-CONFIG_SATA_NV=y
-CONFIG_SATA_PROMISE=y
-CONFIG_SATA_SIL=y
-CONFIG_SATA_SIS=y
-CONFIG_SATA_SVW=y
-CONFIG_SATA_ULI=y
-CONFIG_SATA_VIA=y
-CONFIG_SATA_VITESSE=y
-
-#
-# PATA SFF controllers with BMDMA
-#
-CONFIG_PATA_ALI=y
-CONFIG_PATA_AMD=y
-CONFIG_PATA_ARTOP=y
-CONFIG_PATA_ATIIXP=y
-CONFIG_PATA_ATP867X=y
-CONFIG_PATA_CMD64X=y
-CONFIG_PATA_CS5520=y
-CONFIG_PATA_CS5530=y
-# CONFIG_PATA_CS5536 is not set
-# CONFIG_PATA_CYPRESS is not set
-CONFIG_PATA_EFAR=y
-CONFIG_PATA_HPT366=y
-CONFIG_PATA_HPT37X=y
-# CONFIG_PATA_HPT3X2N is not set
-# CONFIG_PATA_HPT3X3 is not set
-CONFIG_PATA_IT8213=y
-CONFIG_PATA_IT821X=y
-CONFIG_PATA_JMICRON=y
-CONFIG_PATA_MARVELL=y
-CONFIG_PATA_NETCELL=y
-CONFIG_PATA_NINJA32=y
-CONFIG_PATA_NS87415=y
-CONFIG_PATA_OLDPIIX=y
-# CONFIG_PATA_OPTIDMA is not set
-CONFIG_PATA_PDC2027X=y
-CONFIG_PATA_PDC_OLD=y
-# CONFIG_PATA_RADISYS is not set
-CONFIG_PATA_RDC=y
-CONFIG_PATA_SC1200=y
-CONFIG_PATA_SCH=y
-CONFIG_PATA_SERVERWORKS=y
-CONFIG_PATA_SIL680=y
-CONFIG_PATA_SIS=y
-CONFIG_PATA_TOSHIBA=y
-CONFIG_PATA_TRIFLEX=y
-CONFIG_PATA_VIA=y
-# CONFIG_PATA_WINBOND is not set
-
-#
-# PIO-only SFF controllers
-#
-# CONFIG_PATA_CMD640_PCI is not set
-CONFIG_PATA_MPIIX=y
-CONFIG_PATA_NS87410=y
-# CONFIG_PATA_OPTI is not set
-CONFIG_PATA_PCMCIA=y
-CONFIG_PATA_PLATFORM=y
-CONFIG_PATA_RZ1000=y
-
-#
-# Generic fallback / legacy drivers
-#
-# CONFIG_PATA_ACPI is not set
-CONFIG_ATA_GENERIC=y
-# CONFIG_PATA_LEGACY is not set
-CONFIG_MD=y
-# CONFIG_BLK_DEV_MD is not set
-CONFIG_BLK_DEV_DM_BUILTIN=y
-CONFIG_BLK_DEV_DM=y
-# CONFIG_DM_DEBUG is not set
-CONFIG_DM_CRYPT=y
-# CONFIG_DM_SNAPSHOT is not set
-# CONFIG_DM_THIN_PROVISIONING is not set
-# CONFIG_DM_MIRROR is not set
-# CONFIG_DM_RAID is not set
-# CONFIG_DM_ZERO is not set
-# CONFIG_DM_MULTIPATH is not set
-# CONFIG_DM_DELAY is not set
-# CONFIG_DM_UEVENT is not set
-# CONFIG_DM_FLAKEY is not set
-# CONFIG_TARGET_CORE is not set
-# CONFIG_FUSION is not set
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_FIREWIRE=y
-CONFIG_FIREWIRE_OHCI=y
-CONFIG_FIREWIRE_OHCI_DEBUG=y
-CONFIG_FIREWIRE_SBP2=y
-CONFIG_FIREWIRE_NET=y
-CONFIG_FIREWIRE_NOSY=y
-# CONFIG_I2O is not set
-# CONFIG_MACINTOSH_DRIVERS is not set
-CONFIG_NETDEVICES=y
-CONFIG_NET_CORE=y
-# CONFIG_BONDING is not set
-# CONFIG_DUMMY is not set
-# CONFIG_EQUALIZER is not set
-# CONFIG_NET_FC is not set
-CONFIG_MII=y
-# CONFIG_MACVLAN is not set
-# CONFIG_VXLAN is not set
-# CONFIG_NETCONSOLE is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-CONFIG_TUN=y
-CONFIG_VETH=y
-# CONFIG_ARCNET is not set
-
-#
-# CAIF transport drivers
-#
-CONFIG_ETHERNET=y
-CONFIG_MDIO=y
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_NET_VENDOR_ADAPTEC is not set
-# CONFIG_NET_VENDOR_ALTEON is not set
-# CONFIG_NET_VENDOR_AMD is not set
-# CONFIG_NET_VENDOR_ATHEROS is not set
-CONFIG_NET_VENDOR_BROADCOM=y
-CONFIG_B44=y
-CONFIG_B44_PCI_AUTOSELECT=y
-CONFIG_B44_PCICORE_AUTOSELECT=y
-CONFIG_B44_PCI=y
-CONFIG_BNX2=y
-CONFIG_CNIC=y
-CONFIG_TIGON3=y
-CONFIG_BNX2X=y
-# CONFIG_NET_VENDOR_BROCADE is not set
-CONFIG_NET_VENDOR_CHELSIO=y
-# CONFIG_CHELSIO_T1 is not set
-CONFIG_CHELSIO_T3=y
-CONFIG_CHELSIO_T4=y
-CONFIG_CHELSIO_T4VF=y
-# CONFIG_NET_VENDOR_CISCO is not set
-# CONFIG_DNET is not set
-# CONFIG_NET_VENDOR_DEC is not set
-# CONFIG_NET_VENDOR_DLINK is not set
-# CONFIG_NET_VENDOR_EMULEX is not set
-# CONFIG_NET_VENDOR_EXAR is not set
-# CONFIG_NET_VENDOR_FUJITSU is not set
-# CONFIG_NET_VENDOR_HP is not set
-CONFIG_NET_VENDOR_INTEL=y
-# CONFIG_E100 is not set
-CONFIG_E1000=y
-CONFIG_E1000E=y
-# CONFIG_E1000E_PTP is not set
-CONFIG_IGB=y
-CONFIG_IGB_HWMON=y
-# CONFIG_IGB_PTP is not set
-CONFIG_IGBVF=y
-CONFIG_IXGB=y
-CONFIG_IXGBE=y
-CONFIG_IXGBEVF=y
-CONFIG_NET_VENDOR_I825XX=y
-# CONFIG_ZNET is not set
-# CONFIG_IP1000 is not set
-# CONFIG_JME is not set
-# CONFIG_NET_VENDOR_MARVELL is not set
-CONFIG_NET_VENDOR_MELLANOX=y
-# CONFIG_MLX4_EN is not set
-# CONFIG_MLX4_CORE is not set
-# CONFIG_NET_VENDOR_MICREL is not set
-CONFIG_NET_VENDOR_MICROCHIP=y
-CONFIG_ENC28J60=y
-CONFIG_ENC28J60_WRITEVERIFY=y
-# CONFIG_NET_VENDOR_MYRI is not set
-# CONFIG_FEALNX is not set
-# CONFIG_NET_VENDOR_NATSEMI is not set
-# CONFIG_NET_VENDOR_NVIDIA is not set
-# CONFIG_NET_VENDOR_OKI is not set
-# CONFIG_ETHOC is not set
-# CONFIG_NET_PACKET_ENGINE is not set
-# CONFIG_NET_VENDOR_QLOGIC is not set
-CONFIG_NET_VENDOR_REALTEK=y
-CONFIG_ATP=y
-CONFIG_8139CP=y
-# CONFIG_8139TOO is not set
-# CONFIG_8139TOO_PIO is not set
-CONFIG_8139TOO_TUNE_TWISTER=y
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_R8169=y
-# CONFIG_NET_VENDOR_RDC is not set
-# CONFIG_NET_VENDOR_SEEQ is not set
-# CONFIG_NET_VENDOR_SILAN is not set
-# CONFIG_NET_VENDOR_SIS is not set
-# CONFIG_SFC is not set
-# CONFIG_NET_VENDOR_SMSC is not set
-# CONFIG_NET_VENDOR_STMICRO is not set
-# CONFIG_NET_VENDOR_SUN is not set
-# CONFIG_NET_VENDOR_TEHUTI is not set
-# CONFIG_NET_VENDOR_TI is not set
-# CONFIG_NET_VENDOR_VIA is not set
-# CONFIG_NET_VENDOR_XIRCOM is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_NET_SB1000 is not set
-CONFIG_PHYLIB=y
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=y
-CONFIG_DAVICOM_PHY=y
-CONFIG_QSEMI_PHY=y
-CONFIG_LXT_PHY=y
-CONFIG_CICADA_PHY=y
-CONFIG_VITESSE_PHY=y
-CONFIG_SMSC_PHY=y
-CONFIG_BROADCOM_PHY=y
-# CONFIG_ICPLUS_PHY is not set
-CONFIG_REALTEK_PHY=y
-CONFIG_NATIONAL_PHY=y
-CONFIG_STE10XP=y
-CONFIG_LSI_ET1011C_PHY=y
-CONFIG_MICREL_PHY=y
-CONFIG_FIXED_PHY=y
-CONFIG_MDIO_BITBANG=y
-# CONFIG_MDIO_GPIO is not set
-CONFIG_PPP=y
-# CONFIG_PPP_BSDCOMP is not set
-# CONFIG_PPP_DEFLATE is not set
-# CONFIG_PPP_FILTER is not set
-# CONFIG_PPP_MPPE is not set
-# CONFIG_PPP_MULTILINK is not set
-# CONFIG_PPPOE is not set
-# CONFIG_PPP_ASYNC is not set
-# CONFIG_PPP_SYNC_TTY is not set
-# CONFIG_SLIP is not set
-CONFIG_SLHC=y
-# CONFIG_TR is not set
-
-#
-# USB Network Adapters
-#
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_RTL8150 is not set
-# CONFIG_USB_USBNET is not set
-# CONFIG_USB_IPHETH is not set
-# CONFIG_WLAN is not set
-
-#
-# Enable WiMAX (Networking options) to see the WiMAX drivers
-#
-# CONFIG_WAN is not set
-# CONFIG_XEN_NETDEV_FRONTEND is not set
-# CONFIG_XEN_NETDEV_BACKEND is not set
-# CONFIG_VMXNET3 is not set
-# CONFIG_DPAA_ETH_USE_NDO_SELECT_QUEUE is not set
-# CONFIG_ISDN is not set
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-CONFIG_INPUT_FF_MEMLESS=y
-CONFIG_INPUT_POLLDEV=y
-CONFIG_INPUT_SPARSEKMAP=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=y
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-# CONFIG_INPUT_KEYBOARD is not set
-# CONFIG_INPUT_MOUSE is not set
-# CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_INPUT_TABLET is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
-# CONFIG_INPUT_MISC is not set
-
-#
-# Hardware I/O ports
-#
-# CONFIG_SERIO is not set
-# CONFIG_GAMEPORT is not set
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_CONSOLE_TRANSLATIONS=y
-CONFIG_VT_CONSOLE=y
-CONFIG_VT_CONSOLE_SLEEP=y
-CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_UNIX98_PTYS=y
-CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_ROCKETPORT is not set
-# CONFIG_CYCLADES is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_SYNCLINK is not set
-# CONFIG_SYNCLINKMP is not set
-# CONFIG_SYNCLINK_GT is not set
-# CONFIG_NOZOMI is not set
-# CONFIG_ISI is not set
-# CONFIG_N_HDLC is not set
-# CONFIG_N_GSM is not set
-# CONFIG_TRACE_SINK is not set
-# CONFIG_DEVKMEM is not set
-# CONFIG_STALDRV is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_FIX_EARLYCON_MEM=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_8250_CS=y
-CONFIG_SERIAL_8250_NR_UARTS=32
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-# CONFIG_SERIAL_8250_DETECT_IRQ is not set
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-# CONFIG_SERIAL_MAX3100 is not set
-# CONFIG_SERIAL_MAX3107 is not set
-CONFIG_SERIAL_MFD_HSU=y
-# CONFIG_SERIAL_MFD_HSU_CONSOLE is not set
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_JSM=y
-# CONFIG_SERIAL_TIMBERDALE is not set
-# CONFIG_SERIAL_ALTERA_JTAGUART is not set
-# CONFIG_SERIAL_ALTERA_UART is not set
-# CONFIG_SERIAL_IFX6X60 is not set
-CONFIG_SERIAL_PCH_UART=y
-# CONFIG_SERIAL_XILINX_PS_UART is not set
-# CONFIG_TTY_PRINTK is not set
-# CONFIG_HVC_XEN is not set
-# CONFIG_IPMI_HANDLER is not set
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_TIMERIOMEM=y
-CONFIG_HW_RANDOM_INTEL=y
-CONFIG_HW_RANDOM_AMD=y
-CONFIG_HW_RANDOM_VIA=y
-CONFIG_NVRAM=y
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# PCMCIA character devices
-#
-CONFIG_SYNCLINK_CS=y
-CONFIG_CARDMAN_4000=y
-CONFIG_CARDMAN_4040=y
-CONFIG_IPWIRELESS=y
-# CONFIG_MWAVE is not set
-# CONFIG_RAW_DRIVER is not set
-# CONFIG_HPET is not set
-# CONFIG_HANGCHECK_TIMER is not set
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-CONFIG_DEVPORT=y
-# CONFIG_RAMOOPS is not set
-CONFIG_I2C=y
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_COMPAT=y
-CONFIG_I2C_CHARDEV=y
-CONFIG_I2C_MUX=y
-
-#
-# Multiplexer I2C Chip support
-#
-CONFIG_I2C_MUX_ACCTON_AS5712_54x_CPLD=y
-CONFIG_I2C_MUX_ACCTON_AS6712_32x_CPLD=y
-CONFIG_I2C_MUX_ACCTON_AS5812_54x_CPLD=y
-CONFIG_I2C_MUX_ACCTON_AS6812_32x_CPLD=y
-CONFIG_I2C_MUX_GPIO=y
-CONFIG_I2C_MUX_PCA9541=y
-CONFIG_I2C_MUX_PCA954x=y
-CONFIG_I2C_MUX_PCA954X_DESELECT_ON_EXIT=y
-# CONFIG_I2C_MUX_DNI_6448 is not set
-# CONFIG_I2C_MUX_QUANTA is not set
-# CONFIG_I2C_MUX_QUANTA_LY2 is not set
-CONFIG_I2C_HELPER_AUTO=y
-CONFIG_I2C_ALGOBIT=y
-CONFIG_I2C_ALGOPCA=y
-
-#
-# I2C Hardware Bus support
-#
-
-#
-# PC SMBus host controller drivers
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-# CONFIG_I2C_AMD756 is not set
-# CONFIG_I2C_AMD8111 is not set
-CONFIG_I2C_I801=y
-CONFIG_I2C_ISCH=y
-CONFIG_I2C_ISMT=y
-# CONFIG_I2C_PIIX4 is not set
-# CONFIG_I2C_NFORCE2 is not set
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-# CONFIG_I2C_SIS96X is not set
-# CONFIG_I2C_VIA is not set
-# CONFIG_I2C_VIAPRO is not set
-
-#
-# ACPI drivers
-#
-# CONFIG_I2C_SCMI is not set
-
-#
-# I2C system bus drivers (mostly embedded / system-on-chip)
-#
-# CONFIG_I2C_DESIGNWARE_PCI is not set
-# CONFIG_I2C_GPIO is not set
-# CONFIG_I2C_INTEL_MID is not set
-# CONFIG_I2C_OCORES is not set
-CONFIG_I2C_PCA_PLATFORM=y
-# CONFIG_I2C_PXA_PCI is not set
-# CONFIG_I2C_SIMTEC is not set
-# CONFIG_I2C_XILINX is not set
-# CONFIG_I2C_EG20T is not set
-
-#
-# External I2C/SMBus adapter drivers
-#
-# CONFIG_I2C_DIOLAN_U2C is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_TAOS_EVM is not set
-# CONFIG_I2C_TINY_USB is not set
-
-#
-# Other I2C/SMBus bus drivers
-#
-# CONFIG_I2C_STUB is not set
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-CONFIG_SPI=y
-# CONFIG_SPI_DEBUG is not set
-CONFIG_SPI_MASTER=y
-
-#
-# SPI Master Controller Drivers
-#
-# CONFIG_SPI_ALTERA is not set
-# CONFIG_SPI_BITBANG is not set
-# CONFIG_SPI_GPIO is not set
-# CONFIG_SPI_OC_TINY is not set
-# CONFIG_SPI_PXA2XX_PCI is not set
-# CONFIG_SPI_TOPCLIFF_PCH is not set
-# CONFIG_SPI_XILINX is not set
-# CONFIG_SPI_DESIGNWARE is not set
-
-#
-# SPI Protocol Masters
-#
-# CONFIG_SPI_SPIDEV is not set
-# CONFIG_SPI_TLE62X0 is not set
-
-#
-# PPS support
-#
-CONFIG_PPS=y
-# CONFIG_PPS_DEBUG is not set
-
-#
-# PPS clients support
-#
-# CONFIG_PPS_CLIENT_KTIMER is not set
-# CONFIG_PPS_CLIENT_LDISC is not set
-# CONFIG_PPS_CLIENT_GPIO is not set
-
-#
-# PPS generators support
-#
-
-#
-# PTP clock support
-#
-# CONFIG_PTP_1588_CLOCK is not set
-CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
-CONFIG_GPIOLIB=y
-# CONFIG_DEBUG_GPIO is not set
-CONFIG_GPIO_SYSFS=y
-CONFIG_GPIO_GENERIC=y
-CONFIG_GPIO_MAX730X=y
-
-#
-# Memory mapped GPIO drivers:
-#
-CONFIG_GPIO_GENERIC_PLATFORM=y
-# CONFIG_GPIO_IT8761E is not set
-CONFIG_GPIO_SCH=y
-# CONFIG_GPIO_VX855 is not set
-
-#
-# I2C GPIO expanders:
-#
-# CONFIG_GPIO_MAX7300 is not set
-# CONFIG_GPIO_MAX732X is not set
-CONFIG_GPIO_PCA953X=y
-# CONFIG_GPIO_PCA953X_IRQ is not set
-CONFIG_GPIO_PCF857X=y
-# CONFIG_GPIO_SX150X is not set
-# CONFIG_GPIO_ADP5588 is not set
-
-#
-# PCI GPIO expanders:
-#
-# CONFIG_GPIO_BT8XX is not set
-# CONFIG_GPIO_LANGWELL is not set
-# CONFIG_GPIO_PCH is not set
-# CONFIG_GPIO_ML_IOH is not set
-# CONFIG_GPIO_RDC321X is not set
-
-#
-# SPI GPIO expanders:
-#
-CONFIG_GPIO_MAX7301=y
-# CONFIG_GPIO_MCP23S08 is not set
-CONFIG_GPIO_MC33880=y
-CONFIG_GPIO_74X164=y
-
-#
-# AC97 GPIO expanders:
-#
-
-#
-# MODULbus GPIO expanders:
-#
-# CONFIG_W1 is not set
-CONFIG_POWER_SUPPLY=y
-# CONFIG_POWER_SUPPLY_DEBUG is not set
-# CONFIG_PDA_POWER is not set
-# CONFIG_TEST_POWER is not set
-# CONFIG_BATTERY_DS2780 is not set
-# CONFIG_BATTERY_DS2782 is not set
-# CONFIG_BATTERY_BQ20Z75 is not set
-# CONFIG_BATTERY_BQ27x00 is not set
-# CONFIG_BATTERY_MAX17040 is not set
-# CONFIG_BATTERY_MAX17042 is not set
-# CONFIG_CHARGER_MAX8903 is not set
-# CONFIG_CHARGER_GPIO is not set
-CONFIG_HWMON=y
-CONFIG_HWMON_VID=y
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Native drivers
-#
-# CONFIG_SENSORS_ABITUGURU is not set
-# CONFIG_SENSORS_ABITUGURU3 is not set
-# CONFIG_SENSORS_AD7314 is not set
-# CONFIG_SENSORS_AD7414 is not set
-# CONFIG_SENSORS_AD7418 is not set
-# CONFIG_SENSORS_ADCXX is not set
-CONFIG_SENSORS_ADM1021=y
-# CONFIG_SENSORS_ADM1025 is not set
-# CONFIG_SENSORS_ADM1026 is not set
-# CONFIG_SENSORS_ADM1029 is not set
-# CONFIG_SENSORS_ADM1031 is not set
-# CONFIG_SENSORS_ADM9240 is not set
-# CONFIG_SENSORS_ADT7411 is not set
-# CONFIG_SENSORS_ADT7462 is not set
-CONFIG_SENSORS_ADT7470=y
-# CONFIG_SENSORS_ADT7475 is not set
-# CONFIG_SENSORS_ASC7621 is not set
-# CONFIG_SENSORS_K8TEMP is not set
-# CONFIG_SENSORS_K10TEMP is not set
-# CONFIG_SENSORS_FAM15H_POWER is not set
-# CONFIG_SENSORS_ASB100 is not set
-# CONFIG_SENSORS_ATXP1 is not set
-# CONFIG_SENSORS_CY8CXX is not set
-# CONFIG_SENSORS_CY8C3245R1 is not set
-# CONFIG_SENSORS_DS620 is not set
-# CONFIG_SENSORS_DS1621 is not set
-# CONFIG_SENSORS_I5K_AMB is not set
-# CONFIG_SENSORS_F71805F is not set
-# CONFIG_SENSORS_F71882FG is not set
-# CONFIG_SENSORS_F75375S is not set
-# CONFIG_SENSORS_FSCHMD is not set
-# CONFIG_SENSORS_G760A is not set
-# CONFIG_SENSORS_GL518SM is not set
-# CONFIG_SENSORS_GL520SM is not set
-CONFIG_SENSORS_GPIO_FAN=y
-CONFIG_SENSORS_CORETEMP=y
-# CONFIG_SENSORS_IT87 is not set
-# CONFIG_SENSORS_JC42 is not set
-# CONFIG_SENSORS_LINEAGE is not set
-# CONFIG_SENSORS_LM63 is not set
-# CONFIG_SENSORS_LM70 is not set
-# CONFIG_SENSORS_LM73 is not set
-CONFIG_SENSORS_LM75=y
-# CONFIG_SENSORS_LM77 is not set
-# CONFIG_SENSORS_LM78 is not set
-# CONFIG_SENSORS_LM80 is not set
-# CONFIG_SENSORS_LM83 is not set
-CONFIG_SENSORS_LM85=y
-# CONFIG_SENSORS_LM87 is not set
-CONFIG_SENSORS_LM90=y
-# CONFIG_SENSORS_LM92 is not set
-# CONFIG_SENSORS_LM93 is not set
-CONFIG_SENSORS_LTC4151=y
-CONFIG_SENSORS_LTC4215=y
-CONFIG_SENSORS_LTC4245=y
-CONFIG_SENSORS_LTC4261=y
-# CONFIG_SENSORS_LM95241 is not set
-# CONFIG_SENSORS_LM95245 is not set
-# CONFIG_SENSORS_MAX1111 is not set
-# CONFIG_SENSORS_MAX16065 is not set
-# CONFIG_SENSORS_MAX1619 is not set
-# CONFIG_SENSORS_MAX1668 is not set
-# CONFIG_SENSORS_MAX6639 is not set
-# CONFIG_SENSORS_MAX6642 is not set
-CONFIG_SENSORS_MAX6650=y
-CONFIG_SENSORS_MAX6620=y
-# CONFIG_SENSORS_MAX6697 is not set
-# CONFIG_SENSORS_NTC_THERMISTOR is not set
-# CONFIG_SENSORS_PC87360 is not set
-# CONFIG_SENSORS_PC87427 is not set
-# CONFIG_SENSORS_PCF8591 is not set
-CONFIG_PMBUS=y
-CONFIG_SENSORS_PMBUS=y
-# CONFIG_SENSORS_ADM1275 is not set
-# CONFIG_SENSORS_LM25066 is not set
-# CONFIG_SENSORS_LTC2978 is not set
-# CONFIG_SENSORS_MAX16064 is not set
-# CONFIG_SENSORS_MAX34440 is not set
-# CONFIG_SENSORS_DNI_DPS460 is not set
-# CONFIG_SENSORS_MAX8688 is not set
-# CONFIG_SENSORS_UCD9000 is not set
-# CONFIG_SENSORS_UCD9200 is not set
-# CONFIG_SENSORS_ZL6100 is not set
-# CONFIG_SENSORS_SHT15 is not set
-# CONFIG_SENSORS_SHT21 is not set
-# CONFIG_SENSORS_SIS5595 is not set
-# CONFIG_SENSORS_SMM665 is not set
-# CONFIG_SENSORS_DME1737 is not set
-# CONFIG_SENSORS_EMC1403 is not set
-# CONFIG_SENSORS_EMC2103 is not set
-# CONFIG_SENSORS_EMC2305 is not set
-# CONFIG_SENSORS_EMC6W201 is not set
-# CONFIG_SENSORS_SMSC47M1 is not set
-# CONFIG_SENSORS_SMSC47M192 is not set
-# CONFIG_SENSORS_SMSC47B397 is not set
-# CONFIG_SENSORS_SCH56XX_COMMON is not set
-# CONFIG_SENSORS_SCH5627 is not set
-# CONFIG_SENSORS_SCH5636 is not set
-# CONFIG_SENSORS_ADS1015 is not set
-# CONFIG_SENSORS_ADS7828 is not set
-# CONFIG_SENSORS_ADS7871 is not set
-# CONFIG_SENSORS_AMC6821 is not set
-# CONFIG_SENSORS_THMC50 is not set
-# CONFIG_SENSORS_TMP102 is not set
-# CONFIG_SENSORS_TMP401 is not set
-# CONFIG_SENSORS_TMP421 is not set
-# CONFIG_SENSORS_VIA_CPUTEMP is not set
-# CONFIG_SENSORS_VIA686A is not set
-# CONFIG_SENSORS_VT1211 is not set
-# CONFIG_SENSORS_VT8231 is not set
-CONFIG_SENSORS_W83781D=y
-# CONFIG_SENSORS_W83791D is not set
-# CONFIG_SENSORS_W83792D is not set
-# CONFIG_SENSORS_W83793 is not set
-# CONFIG_SENSORS_W83795 is not set
-# CONFIG_SENSORS_W83L785TS is not set
-# CONFIG_SENSORS_W83L786NG is not set
-# CONFIG_SENSORS_W83627HF is not set
-# CONFIG_SENSORS_W83627EHF is not set
-# CONFIG_SENSORS_APPLESMC is not set
-# CONFIG_SENSORS_QUANTA_LY_HWMON is not set
-CONFIG_SENSORS_CPR_4011_4MXX=y
-CONFIG_SENSORS_ACCTON_AS5712_54x_FAN=y
-CONFIG_SENSORS_ACCTON_AS5712_54x_PSU=y
-CONFIG_SENSORS_ACCTON_AS6712_32x_FAN=y
-CONFIG_SENSORS_ACCTON_AS6712_32x_PSU=y
-CONFIG_SENSORS_ACCTON_I2C_CPLD=y
-CONFIG_SENSORS_ACCTON_AS7512_32x_FAN=y
-CONFIG_SENSORS_ACCTON_AS7512_32x_PSU=y
-CONFIG_SENSORS_YM2651Y=y
-CONFIG_SENSORS_ACCTON_AS7712_32x_FAN=y
-CONFIG_SENSORS_ACCTON_AS7712_32x_PSU=y
-CONFIG_SENSORS_ACCTON_AS5812_54x_FAN=y
-CONFIG_SENSORS_ACCTON_AS5812_54x_PSU=y
-CONFIG_SENSORS_ACCTON_AS6812_32x_FAN=y
-CONFIG_SENSORS_ACCTON_AS6812_32x_PSU=y
-CONFIG_SENSORS_ACCTON_AS5812_54t_FAN=y
-CONFIG_SENSORS_ACCTON_AS5812_54t_PSU=y
-CONFIG_SENSORS_ACCTON_AS5512_54X_PSU=y
-CONFIG_SENSORS_ACCTON_AS5512_54X_FAN=y
-CONFIG_SENSORS_ACCTON_AS7716_32x_FAN=y
-CONFIG_SENSORS_ACCTON_AS7716_32x_PSU=y
-
-#
-# ACPI drivers
-#
-# CONFIG_SENSORS_ACPI_POWER is not set
-# CONFIG_SENSORS_ATK0110 is not set
-CONFIG_THERMAL=y
-CONFIG_THERMAL_HWMON=y
-CONFIG_WATCHDOG=y
-CONFIG_WATCHDOG_CORE=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-# CONFIG_SOFT_WATCHDOG is not set
-# CONFIG_ACQUIRE_WDT is not set
-# CONFIG_ADVANTECH_WDT is not set
-# CONFIG_ALIM1535_WDT is not set
-# CONFIG_ALIM7101_WDT is not set
-# CONFIG_F71808E_WDT is not set
-# CONFIG_SP5100_TCO is not set
-# CONFIG_SC520_WDT is not set
-# CONFIG_SBC_FITPC2_WATCHDOG is not set
-# CONFIG_EUROTECH_WDT is not set
-# CONFIG_IB700_WDT is not set
-# CONFIG_IBMASR is not set
-# CONFIG_WAFER_WDT is not set
-# CONFIG_I6300ESB_WDT is not set
-CONFIG_ITCO_WDT=y
-# CONFIG_ITCO_VENDOR_SUPPORT is not set
-# CONFIG_IT8712F_WDT is not set
-# CONFIG_IT87_WDT is not set
-# CONFIG_HP_WATCHDOG is not set
-# CONFIG_SC1200_WDT is not set
-# CONFIG_PC87413_WDT is not set
-# CONFIG_NV_TCO is not set
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-# CONFIG_CPU5_WDT is not set
-# CONFIG_SMSC_SCH311X_WDT is not set
-# CONFIG_SMSC37B787_WDT is not set
-# CONFIG_W83627HF_WDT is not set
-# CONFIG_W83697HF_WDT is not set
-# CONFIG_W83697UG_WDT is not set
-# CONFIG_W83877F_WDT is not set
-# CONFIG_W83977F_WDT is not set
-# CONFIG_MACHZ_WDT is not set
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-# CONFIG_XEN_WDT is not set
-
-#
-# PCI-based Watchdog Cards
-#
-# CONFIG_PCIPCWATCHDOG is not set
-# CONFIG_WDTPCI is not set
-
-#
-# USB-based Watchdog Cards
-#
-# CONFIG_USBPCWATCHDOG is not set
-CONFIG_SSB_POSSIBLE=y
-
-#
-# Sonics Silicon Backplane
-#
-CONFIG_SSB=y
-CONFIG_SSB_SPROM=y
-CONFIG_SSB_PCIHOST_POSSIBLE=y
-CONFIG_SSB_PCIHOST=y
-# CONFIG_SSB_B43_PCI_BRIDGE is not set
-CONFIG_SSB_PCMCIAHOST_POSSIBLE=y
-CONFIG_SSB_PCMCIAHOST=y
-CONFIG_SSB_SDIOHOST_POSSIBLE=y
-CONFIG_SSB_SDIOHOST=y
-# CONFIG_SSB_SILENT is not set
-# CONFIG_SSB_DEBUG is not set
-CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
-CONFIG_SSB_DRIVER_PCICORE=y
-CONFIG_BCMA_POSSIBLE=y
-
-#
-# Broadcom specific AMBA
-#
-CONFIG_BCMA=y
-CONFIG_BCMA_HOST_PCI_POSSIBLE=y
-CONFIG_BCMA_HOST_PCI=y
-# CONFIG_BCMA_DEBUG is not set
-
-#
-# Multifunction device drivers
-#
-CONFIG_MFD_CORE=y
-# CONFIG_MFD_88PM860X is not set
-# CONFIG_MFD_SM501 is not set
-# CONFIG_HTC_PASIC3 is not set
-# CONFIG_HTC_I2CPLD is not set
-# CONFIG_TPS6105X is not set
-# CONFIG_TPS65010 is not set
-# CONFIG_TPS6507X is not set
-# CONFIG_MFD_TPS6586X is not set
-# CONFIG_MFD_TPS65910 is not set
-# CONFIG_MFD_TPS65912_I2C is not set
-# CONFIG_MFD_TPS65912_SPI is not set
-# CONFIG_TWL4030_CORE is not set
-# CONFIG_MFD_STMPE is not set
-# CONFIG_MFD_TC3589X is not set
-# CONFIG_MFD_TMIO is not set
-# CONFIG_PMIC_DA903X is not set
-# CONFIG_PMIC_ADP5520 is not set
-# CONFIG_MFD_MAX8925 is not set
-# CONFIG_MFD_MAX8997 is not set
-# CONFIG_MFD_MAX8998 is not set
-# CONFIG_MFD_WM8400 is not set
-# CONFIG_MFD_WM831X_I2C is not set
-# CONFIG_MFD_WM831X_SPI is not set
-# CONFIG_MFD_WM8350_I2C is not set
-# CONFIG_MFD_WM8994 is not set
-# CONFIG_MFD_PCF50633 is not set
-# CONFIG_MFD_MC13XXX is not set
-# CONFIG_ABX500_CORE is not set
-# CONFIG_EZX_PCAP is not set
-# CONFIG_MFD_CS5535 is not set
-# CONFIG_MFD_TIMBERDALE is not set
-CONFIG_LPC_ICH=y
-CONFIG_LPC_SCH=y
-# CONFIG_MFD_RDC321X is not set
-# CONFIG_MFD_JANZ_CMODIO is not set
-# CONFIG_MFD_VX855 is not set
-CONFIG_MFD_WL1273_CORE=y
-# CONFIG_MFD_AAT2870_CORE is not set
-# CONFIG_REGULATOR is not set
-# CONFIG_MEDIA_SUPPORT is not set
-
-#
-# Graphics support
-#
-# CONFIG_AGP is not set
-# CONFIG_VGA_ARB is not set
-# CONFIG_VGA_SWITCHEROO is not set
-# CONFIG_DRM is not set
-# CONFIG_STUB_POULSBO is not set
-# CONFIG_VGASTATE is not set
-# CONFIG_VIDEO_OUTPUT_CONTROL is not set
-# CONFIG_FB is not set
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-#
-# Display device support
-#
-CONFIG_DISPLAY_SUPPORT=y
-
-#
-# Display hardware drivers
-#
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-# CONFIG_VGACON_SOFT_SCROLLBACK is not set
-CONFIG_DUMMY_CONSOLE=y
-# CONFIG_SOUND is not set
-# CONFIG_HID_SUPPORT is not set
-CONFIG_USB_SUPPORT=y
-CONFIG_USB_COMMON=y
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB_ARCH_HAS_XHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
-
-#
-# Miscellaneous USB options
-#
-# CONFIG_USB_DEVICEFS is not set
-CONFIG_USB_DEVICE_CLASS=y
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_OTG_WHITELIST is not set
-# CONFIG_USB_OTG_BLACKLIST_HUB is not set
-# CONFIG_USB_DWC3 is not set
-# CONFIG_USB_MON is not set
-# CONFIG_USB_WUSB is not set
-# CONFIG_USB_WUSB_CBAF is not set
-
-#
-# USB Host Controller Drivers
-#
-# CONFIG_USB_C67X00_HCD is not set
-CONFIG_USB_XHCI_HCD=y
-# CONFIG_USB_XHCI_HCD_DEBUGGING is not set
-CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-# CONFIG_USB_OXU210HP_HCD is not set
-# CONFIG_USB_ISP116X_HCD is not set
-# CONFIG_USB_ISP1760_HCD is not set
-# CONFIG_USB_ISP1362_HCD is not set
-CONFIG_USB_OHCI_HCD=y
-# CONFIG_USB_OHCI_HCD_SSB is not set
-# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
-# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=y
-# CONFIG_USB_SL811_HCD is not set
-# CONFIG_USB_R8A66597_HCD is not set
-# CONFIG_USB_WHCI_HCD is not set
-# CONFIG_USB_HWA_HCD is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-# CONFIG_USB_WDM is not set
-# CONFIG_USB_TMC is not set
-
-#
-# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
-#
-
-#
-# also be needed; see USB_STORAGE Help for more info
-#
-CONFIG_USB_STORAGE=y
-# CONFIG_USB_STORAGE_DEBUG is not set
-# CONFIG_USB_STORAGE_REALTEK is not set
-# CONFIG_USB_STORAGE_DATAFAB is not set
-# CONFIG_USB_STORAGE_FREECOM is not set
-# CONFIG_USB_STORAGE_ISD200 is not set
-# CONFIG_USB_STORAGE_USBAT is not set
-# CONFIG_USB_STORAGE_SDDR09 is not set
-# CONFIG_USB_STORAGE_SDDR55 is not set
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
-# CONFIG_USB_STORAGE_ALAUDA is not set
-# CONFIG_USB_STORAGE_ONETOUCH is not set
-# CONFIG_USB_STORAGE_KARMA is not set
-# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
-# CONFIG_USB_STORAGE_ENE_UB6250 is not set
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_MICROTEK is not set
-
-#
-# USB port drivers
-#
-CONFIG_USB_SERIAL=y
-CONFIG_USB_SERIAL_CONSOLE=y
-# CONFIG_USB_EZUSB is not set
-# CONFIG_USB_SERIAL_GENERIC is not set
-# CONFIG_USB_SERIAL_AIRCABLE is not set
-# CONFIG_USB_SERIAL_ARK3116 is not set
-# CONFIG_USB_SERIAL_BELKIN is not set
-# CONFIG_USB_SERIAL_CH341 is not set
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_CP210X is not set
-# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
-# CONFIG_USB_SERIAL_EMPEG is not set
-# CONFIG_USB_SERIAL_FTDI_SIO is not set
-# CONFIG_USB_SERIAL_FUNSOFT is not set
-# CONFIG_USB_SERIAL_VISOR is not set
-# CONFIG_USB_SERIAL_IPAQ is not set
-# CONFIG_USB_SERIAL_IR is not set
-# CONFIG_USB_SERIAL_EDGEPORT is not set
-# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
-# CONFIG_USB_SERIAL_GARMIN is not set
-# CONFIG_USB_SERIAL_IPW is not set
-# CONFIG_USB_SERIAL_IUU is not set
-# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
-# CONFIG_USB_SERIAL_KEYSPAN is not set
-# CONFIG_USB_SERIAL_KLSI is not set
-# CONFIG_USB_SERIAL_KOBIL_SCT is not set
-# CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_MOS7720 is not set
-# CONFIG_USB_SERIAL_MOS7840 is not set
-# CONFIG_USB_SERIAL_MOTOROLA is not set
-# CONFIG_USB_SERIAL_NAVMAN is not set
-# CONFIG_USB_SERIAL_PL2303 is not set
-# CONFIG_USB_SERIAL_OTI6858 is not set
-# CONFIG_USB_SERIAL_QCAUX is not set
-# CONFIG_USB_SERIAL_QUALCOMM is not set
-# CONFIG_USB_SERIAL_SPCP8X5 is not set
-# CONFIG_USB_SERIAL_HP4X is not set
-# CONFIG_USB_SERIAL_SAFE is not set
-# CONFIG_USB_SERIAL_SIEMENS_MPI is not set
-# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
-# CONFIG_USB_SERIAL_SYMBOL is not set
-# CONFIG_USB_SERIAL_TI is not set
-# CONFIG_USB_SERIAL_CYBERJACK is not set
-# CONFIG_USB_SERIAL_XIRCOM is not set
-# CONFIG_USB_SERIAL_OPTION is not set
-# CONFIG_USB_SERIAL_OMNINET is not set
-# CONFIG_USB_SERIAL_OPTICON is not set
-# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set
-# CONFIG_USB_SERIAL_ZIO is not set
-# CONFIG_USB_SERIAL_SSU100 is not set
-# CONFIG_USB_SERIAL_DEBUG is not set
-
-#
-# USB Miscellaneous drivers
-#
-# CONFIG_USB_EMI62 is not set
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_ADUTUX is not set
-# CONFIG_USB_SEVSEG is not set
-# CONFIG_USB_RIO500 is not set
-# CONFIG_USB_LEGOTOWER is not set
-# CONFIG_USB_LCD is not set
-# CONFIG_USB_LED is not set
-# CONFIG_USB_CYPRESS_CY7C63 is not set
-# CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_IDMOUSE is not set
-# CONFIG_USB_FTDI_ELAN is not set
-# CONFIG_USB_APPLEDISPLAY is not set
-# CONFIG_USB_SISUSBVGA is not set
-# CONFIG_USB_LD is not set
-# CONFIG_USB_TRANCEVIBRATOR is not set
-# CONFIG_USB_IOWARRIOR is not set
-# CONFIG_USB_TEST is not set
-# CONFIG_USB_ISIGHTFW is not set
-# CONFIG_USB_YUREX is not set
-# CONFIG_USB_GADGET is not set
-
-#
-# OTG and related infrastructure
-#
-# CONFIG_USB_GPIO_VBUS is not set
-# CONFIG_NOP_USB_XCEIV is not set
-# CONFIG_UWB is not set
-CONFIG_MMC=y
-# CONFIG_MMC_DEBUG is not set
-# CONFIG_MMC_UNSAFE_RESUME is not set
-# CONFIG_MMC_CLKGATE is not set
-
-#
-# MMC/SD/SDIO Card Drivers
-#
-CONFIG_MMC_BLOCK=y
-CONFIG_MMC_BLOCK_MINORS=8
-CONFIG_MMC_BLOCK_BOUNCE=y
-# CONFIG_SDIO_UART is not set
-# CONFIG_MMC_TEST is not set
-
-#
-# MMC/SD/SDIO Host Controller Drivers
-#
-CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_PCI=y
-# CONFIG_MMC_RICOH_MMC is not set
-CONFIG_MMC_SDHCI_PLTFM=y
-# CONFIG_MMC_WBSD is not set
-# CONFIG_MMC_TIFM_SD is not set
-CONFIG_MMC_SPI=y
-# CONFIG_MMC_SDRICOH_CS is not set
-# CONFIG_MMC_CB710 is not set
-# CONFIG_MMC_VIA_SDMMC is not set
-# CONFIG_MMC_VUB300 is not set
-# CONFIG_MMC_USHC is not set
-# CONFIG_MEMSTICK is not set
-CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
-
-#
-# LED drivers
-#
-CONFIG_LEDS_ACCTON_AS5712_54x=y
-CONFIG_LEDS_ACCTON_AS6712_32x=y
-CONFIG_LEDS_ACCTON_AS7512_32x=y
-CONFIG_LEDS_ACCTON_AS7712_32x=y
-CONFIG_LEDS_ACCTON_AS5812_54x=y
-CONFIG_LEDS_ACCTON_AS6812_32x=y
-CONFIG_LEDS_ACCTON_AS5812_54t=y
-CONFIG_LEDS_ACCTON_AS5512_54X=y
-CONFIG_LEDS_ACCTON_AS7716_32x=y
-# CONFIG_LEDS_LM3530 is not set
-# CONFIG_LEDS_PCA9532 is not set
-# CONFIG_LEDS_GPIO is not set
-# CONFIG_LEDS_LP3944 is not set
-# CONFIG_LEDS_LP5521 is not set
-# CONFIG_LEDS_LP5523 is not set
-# CONFIG_LEDS_PCA955X is not set
-# CONFIG_LEDS_DAC124S085 is not set
-# CONFIG_LEDS_BD2802 is not set
-# CONFIG_LEDS_INTEL_SS4200 is not set
-# CONFIG_LEDS_LT3593 is not set
-# CONFIG_LEDS_TRIGGERS is not set
-
-#
-# LED Triggers
-#
-# CONFIG_ACCESSIBILITY is not set
-# CONFIG_INFINIBAND is not set
-# CONFIG_EDAC is not set
-CONFIG_RTC_LIB=y
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_HCTOSYS=y
-CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
-# CONFIG_RTC_DEBUG is not set
-
-#
-# RTC interfaces
-#
-CONFIG_RTC_INTF_SYSFS=y
-CONFIG_RTC_INTF_PROC=y
-CONFIG_RTC_INTF_DEV=y
-# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-# CONFIG_RTC_DRV_TEST is not set
-
-#
-# I2C RTC drivers
-#
-CONFIG_RTC_DRV_DS1307=y
-CONFIG_RTC_DRV_DS1374=y
-CONFIG_RTC_DRV_DS1672=y
-CONFIG_RTC_DRV_DS3232=y
-CONFIG_RTC_DRV_MAX6900=y
-CONFIG_RTC_DRV_RS5C372=y
-CONFIG_RTC_DRV_ISL1208=y
-CONFIG_RTC_DRV_ISL12022=y
-CONFIG_RTC_DRV_X1205=y
-CONFIG_RTC_DRV_PCF8563=y
-CONFIG_RTC_DRV_PCF8583=y
-CONFIG_RTC_DRV_M41T80=y
-# CONFIG_RTC_DRV_M41T80_WDT is not set
-CONFIG_RTC_DRV_BQ32K=y
-CONFIG_RTC_DRV_S35390A=y
-CONFIG_RTC_DRV_FM3130=y
-CONFIG_RTC_DRV_RX8581=y
-CONFIG_RTC_DRV_RX8025=y
-# CONFIG_RTC_DRV_EM3027 is not set
-# CONFIG_RTC_DRV_RV3029C2 is not set
-
-#
-# SPI RTC drivers
-#
-# CONFIG_RTC_DRV_M41T93 is not set
-# CONFIG_RTC_DRV_M41T94 is not set
-# CONFIG_RTC_DRV_DS1305 is not set
-# CONFIG_RTC_DRV_DS1390 is not set
-# CONFIG_RTC_DRV_MAX6902 is not set
-# CONFIG_RTC_DRV_R9701 is not set
-# CONFIG_RTC_DRV_RS5C348 is not set
-# CONFIG_RTC_DRV_DS3234 is not set
-# CONFIG_RTC_DRV_PCF2123 is not set
-
-#
-# Platform RTC drivers
-#
-CONFIG_RTC_DRV_CMOS=y
-CONFIG_RTC_DRV_DS1286=y
-CONFIG_RTC_DRV_DS1511=y
-CONFIG_RTC_DRV_DS1553=y
-CONFIG_RTC_DRV_DS1742=y
-CONFIG_RTC_DRV_STK17TA8=y
-CONFIG_RTC_DRV_M48T86=y
-CONFIG_RTC_DRV_M48T35=y
-CONFIG_RTC_DRV_M48T59=y
-CONFIG_RTC_DRV_MSM6242=y
-CONFIG_RTC_DRV_BQ4802=y
-CONFIG_RTC_DRV_RP5C01=y
-CONFIG_RTC_DRV_V3020=y
-
-#
-# on-CPU RTC drivers
-#
-# CONFIG_DMADEVICES is not set
-# CONFIG_AUXDISPLAY is not set
-CONFIG_UIO=y
-# CONFIG_UIO_CIF is not set
-# CONFIG_UIO_PDRV is not set
-# CONFIG_UIO_PDRV_GENIRQ is not set
-# CONFIG_UIO_AEC is not set
-# CONFIG_UIO_SERCOS3 is not set
-# CONFIG_UIO_PCI_GENERIC is not set
-# CONFIG_UIO_NETX is not set
-
-#
-# Virtio drivers
-#
-# CONFIG_VIRTIO_PCI is not set
-# CONFIG_VIRTIO_BALLOON is not set
-# CONFIG_VIRTIO_MMIO is not set
-
-#
-# Xen driver support
-#
-CONFIG_XEN_BALLOON=y
-# CONFIG_XEN_BALLOON_MEMORY_HOTPLUG is not set
-CONFIG_XEN_SCRUB_PAGES=y
-CONFIG_XEN_DEV_EVTCHN=y
-CONFIG_XEN_BACKEND=y
-CONFIG_XENFS=y
-CONFIG_XEN_COMPAT_XENFS=y
-CONFIG_XEN_SYS_HYPERVISOR=y
-CONFIG_XEN_GNTDEV=y
-CONFIG_XEN_GRANT_DEV_ALLOC=y
-CONFIG_SWIOTLB_XEN=y
-CONFIG_XEN_PCIDEV_BACKEND=m
-# CONFIG_STAGING is not set
-CONFIG_X86_PLATFORM_DEVICES=y
-# CONFIG_ACERHDF is not set
-# CONFIG_ASUS_LAPTOP is not set
-# CONFIG_HP_ACCEL is not set
-# CONFIG_THINKPAD_ACPI is not set
-# CONFIG_SENSORS_HDAPS is not set
-# CONFIG_INTEL_MENLOW is not set
-# CONFIG_EEEPC_LAPTOP is not set
-# CONFIG_ACPI_WMI is not set
-# CONFIG_ACPI_ASUS is not set
-# CONFIG_TOPSTAR_LAPTOP is not set
-# CONFIG_TOSHIBA_BT_RFKILL is not set
-# CONFIG_ACPI_CMPC is not set
-# CONFIG_INTEL_IPS is not set
-# CONFIG_IBM_RTL is not set
-# CONFIG_XO15_EBOOK is not set
-# CONFIG_SAMSUNG_Q10 is not set
-CONFIG_X86_64_DELL_S6000_S1220_R0=y
-
-#
-# Hardware Spinlock drivers
-#
-CONFIG_CLKEVT_I8253=y
-CONFIG_I8253_LOCK=y
-CONFIG_CLKBLD_I8253=y
-CONFIG_IOMMU_SUPPORT=y
-# CONFIG_AMD_IOMMU is not set
-# CONFIG_INTEL_IOMMU is not set
-# CONFIG_IRQ_REMAP is not set
-# CONFIG_VIRT_DRIVERS is not set
-
-#
-# Microsoft Hyper-V guest support
-#
-# CONFIG_HYPERV is not set
-# CONFIG_PM_DEVFREQ is not set
-
-#
-# Frame Manager support
-#
-# CONFIG_FSL_FMAN is not set
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=y
-# CONFIG_EDD_OFF is not set
-CONFIG_FIRMWARE_MEMMAP=y
-CONFIG_DELL_RBU=y
-CONFIG_DCDBAS=y
-CONFIG_DMIID=y
-CONFIG_DMI_SYSFS=y
-CONFIG_ISCSI_IBFT_FIND=y
-CONFIG_ISCSI_IBFT=y
-# CONFIG_SIGMA is not set
-# CONFIG_GOOGLE_FIRMWARE is not set
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-# CONFIG_EXT2_FS_XIP is not set
-CONFIG_EXT3_FS=y
-CONFIG_EXT3_DEFAULTS_TO_ORDERED=y
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_EXT4_FS=y
-CONFIG_EXT4_FS_XATTR=y
-CONFIG_EXT4_FS_POSIX_ACL=y
-CONFIG_EXT4_FS_SECURITY=y
-# CONFIG_EXT4_DEBUG is not set
-CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
-CONFIG_JBD2=y
-# CONFIG_JBD2_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-# CONFIG_XFS_FS is not set
-# CONFIG_GFS2_FS is not set
-# CONFIG_OCFS2_FS is not set
-# CONFIG_BTRFS_FS is not set
-# CONFIG_NILFS2_FS is not set
-CONFIG_FS_POSIX_ACL=y
-CONFIG_EXPORTFS=y
-CONFIG_FILE_LOCKING=y
-CONFIG_FSNOTIFY=y
-CONFIG_DNOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_INOTIFY_STACKFS=y
-CONFIG_FANOTIFY=y
-# CONFIG_QUOTA is not set
-# CONFIG_QUOTACTL is not set
-# CONFIG_AUTOFS4_FS is not set
-# CONFIG_FUSE_FS is not set
-CONFIG_OVERLAYFS_FS=y
-CONFIG_GENERIC_ACL=y
-
-#
-# Caches
-#
-CONFIG_FSCACHE=y
-CONFIG_FSCACHE_STATS=y
-# CONFIG_FSCACHE_HISTOGRAM is not set
-# CONFIG_FSCACHE_DEBUG is not set
-# CONFIG_FSCACHE_OBJECT_LIST is not set
-CONFIG_CACHEFILES=y
-# CONFIG_CACHEFILES_DEBUG is not set
-# CONFIG_CACHEFILES_HISTOGRAM is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_UDF_FS=y
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=y
-CONFIG_MSDOS_FS=y
-CONFIG_VFAT_FS=y
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_PROC_VMCORE=y
-CONFIG_PROC_SYSCTL=y
-CONFIG_PROC_PAGE_MONITOR=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_TMPFS_POSIX_ACL=y
-CONFIG_TMPFS_XATTR=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_CONFIGFS_FS=y
-CONFIG_MISC_FILESYSTEMS=y
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_ECRYPT_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_HFSPLUS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_LOGFS is not set
-# CONFIG_CRAMFS is not set
-CONFIG_SQUASHFS=y
-CONFIG_SQUASHFS_XATTR=y
-CONFIG_SQUASHFS_ZLIB=y
-CONFIG_SQUASHFS_LZO=y
-CONFIG_SQUASHFS_XZ=y
-# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set
-# CONFIG_SQUASHFS_EMBEDDED is not set
-CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
-# CONFIG_VXFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_OMFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_ROMFS_FS is not set
-# CONFIG_PSTORE is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-# CONFIG_EXOFS_FS is not set
-# CONFIG_AUFS_FS is not set
-CONFIG_ORE=m
-CONFIG_NETWORK_FILESYSTEMS=y
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_V4_1=y
-CONFIG_PNFS_FILE_LAYOUT=y
-CONFIG_PNFS_BLOCK=m
-CONFIG_PNFS_OBJLAYOUT=m
-# CONFIG_NFS_FSCACHE is not set
-# CONFIG_NFS_USE_LEGACY_DNS is not set
-CONFIG_NFS_USE_KERNEL_DNS=y
-# CONFIG_NFS_USE_NEW_IDMAPPER is not set
-CONFIG_NFSD=y
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_LOCKD=y
-CONFIG_LOCKD_V4=y
-CONFIG_NFS_ACL_SUPPORT=y
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=y
-CONFIG_SUNRPC_GSS=y
-CONFIG_SUNRPC_BACKCHANNEL=y
-# CONFIG_RPCSEC_GSS_KRB5 is not set
-# CONFIG_CEPH_FS is not set
-# CONFIG_CIFS is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-CONFIG_ACORN_PARTITION=y
-CONFIG_ACORN_PARTITION_CUMANA=y
-CONFIG_ACORN_PARTITION_EESOX=y
-CONFIG_ACORN_PARTITION_ICS=y
-CONFIG_ACORN_PARTITION_ADFS=y
-CONFIG_ACORN_PARTITION_POWERTEC=y
-CONFIG_ACORN_PARTITION_RISCIX=y
-CONFIG_OSF_PARTITION=y
-CONFIG_AMIGA_PARTITION=y
-CONFIG_ATARI_PARTITION=y
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-CONFIG_LDM_PARTITION=y
-# CONFIG_LDM_DEBUG is not set
-CONFIG_SGI_PARTITION=y
-CONFIG_ULTRIX_PARTITION=y
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-# CONFIG_SYSV68_PARTITION is not set
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=y
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-CONFIG_NLS_UTF8=y
-# CONFIG_DLM is not set
-
-#
-# Kernel hacking
-#
-CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-# CONFIG_PRINTK_TIME is not set
-CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4
-CONFIG_ENABLE_WARN_DEPRECATED=y
-CONFIG_ENABLE_MUST_CHECK=y
-CONFIG_FRAME_WARN=2048
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_MAGIC_SYSRQ_DEFAULT_MASK=0x01b6
-CONFIG_STRIP_ASM_SYMS=y
-CONFIG_UNUSED_SYMBOLS=y
-CONFIG_DEBUG_FS=y
-# CONFIG_HEADERS_CHECK is not set
-# CONFIG_DEBUG_SECTION_MISMATCH is not set
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_DEBUG_SHIRQ is not set
-CONFIG_LOCKUP_DETECTOR=y
-CONFIG_HARDLOCKUP_DETECTOR=y
-# CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set
-CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0
-# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
-CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
-CONFIG_DETECT_HUNG_TASK=y
-CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
-# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
-CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
-CONFIG_PANIC_TIMEOUT=0
-CONFIG_SCHED_DEBUG=y
-# CONFIG_SCHEDSTATS is not set
-CONFIG_TIMER_STATS=y
-# CONFIG_DEBUG_OBJECTS is not set
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_RT_MUTEX_TESTER is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_LOCK_ALLOC is not set
-# CONFIG_PROVE_LOCKING is not set
-# CONFIG_SPARSE_RCU_POINTER is not set
-# CONFIG_LOCK_STAT is not set
-# CONFIG_DEBUG_ATOMIC_SLEEP is not set
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-CONFIG_STACKTRACE=y
-# CONFIG_DEBUG_STACK_USAGE is not set
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_BUGVERBOSE=y
-CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_INFO_REDUCED is not set
-# CONFIG_DEBUG_VM is not set
-# CONFIG_DEBUG_VIRTUAL is not set
-# CONFIG_DEBUG_WRITECOUNT is not set
-CONFIG_DEBUG_MEMORY_INIT=y
-# CONFIG_DEBUG_LIST is not set
-# CONFIG_TEST_LIST_SORT is not set
-# CONFIG_DEBUG_SG is not set
-# CONFIG_DEBUG_NOTIFIERS is not set
-# CONFIG_DEBUG_CREDENTIALS is not set
-CONFIG_ARCH_WANT_FRAME_POINTERS=y
-# CONFIG_FRAME_POINTER is not set
-CONFIG_BOOT_PRINTK_DELAY=y
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_RCU_CPU_STALL_TIMEOUT=60
-# CONFIG_BACKTRACE_SELF_TEST is not set
-# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
-# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
-# CONFIG_DEBUG_PER_CPU_MAPS is not set
-# CONFIG_LKDTM is not set
-# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set
-# CONFIG_FAULT_INJECTION is not set
-# CONFIG_LATENCYTOP is not set
-CONFIG_SYSCTL_SYSCALL_CHECK=y
-# CONFIG_DEBUG_PAGEALLOC is not set
-CONFIG_USER_STACKTRACE_SUPPORT=y
-CONFIG_NOP_TRACER=y
-CONFIG_HAVE_FUNCTION_TRACER=y
-CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
-CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y
-CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
-CONFIG_HAVE_DYNAMIC_FTRACE=y
-CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
-CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
-CONFIG_HAVE_C_RECORDMCOUNT=y
-CONFIG_RING_BUFFER=y
-CONFIG_EVENT_TRACING=y
-CONFIG_EVENT_POWER_TRACING_DEPRECATED=y
-CONFIG_CONTEXT_SWITCH_TRACER=y
-CONFIG_TRACING=y
-CONFIG_GENERIC_TRACER=y
-CONFIG_TRACING_SUPPORT=y
-CONFIG_FTRACE=y
-# CONFIG_FUNCTION_TRACER is not set
-# CONFIG_IRQSOFF_TRACER is not set
-# CONFIG_SCHED_TRACER is not set
-# CONFIG_FTRACE_SYSCALLS is not set
-CONFIG_BRANCH_PROFILE_NONE=y
-# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
-# CONFIG_PROFILE_ALL_BRANCHES is not set
-# CONFIG_STACK_TRACER is not set
-CONFIG_BLK_DEV_IO_TRACE=y
-# CONFIG_FTRACE_STARTUP_TEST is not set
-# CONFIG_MMIOTRACE is not set
-# CONFIG_RING_BUFFER_BENCHMARK is not set
-# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
-# CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set
-# CONFIG_DYNAMIC_DEBUG is not set
-# CONFIG_DMA_API_DEBUG is not set
-# CONFIG_ATOMIC64_SELFTEST is not set
-# CONFIG_SAMPLES is not set
-CONFIG_HAVE_ARCH_KGDB=y
-# CONFIG_KGDB is not set
-CONFIG_HAVE_ARCH_KMEMCHECK=y
-# CONFIG_TEST_KSTRTOX is not set
-CONFIG_STRICT_DEVMEM=y
-CONFIG_X86_VERBOSE_BOOTUP=y
-CONFIG_EARLY_PRINTK=y
-# CONFIG_EARLY_PRINTK_DBGP is not set
-# CONFIG_DEBUG_STACKOVERFLOW is not set
-# CONFIG_X86_PTDUMP is not set
-CONFIG_DEBUG_RODATA=y
-# CONFIG_DEBUG_RODATA_TEST is not set
-# CONFIG_DEBUG_SET_MODULE_RONX is not set
-# CONFIG_DEBUG_NX_TEST is not set
-# CONFIG_IOMMU_DEBUG is not set
-# CONFIG_IOMMU_STRESS is not set
-CONFIG_HAVE_MMIOTRACE_SUPPORT=y
-CONFIG_IO_DELAY_TYPE_0X80=0
-CONFIG_IO_DELAY_TYPE_0XED=1
-CONFIG_IO_DELAY_TYPE_UDELAY=2
-CONFIG_IO_DELAY_TYPE_NONE=3
-CONFIG_IO_DELAY_0X80=y
-# CONFIG_IO_DELAY_0XED is not set
-# CONFIG_IO_DELAY_UDELAY is not set
-# CONFIG_IO_DELAY_NONE is not set
-CONFIG_DEFAULT_IO_DELAY_TYPE=0
-# CONFIG_DEBUG_BOOT_PARAMS is not set
-# CONFIG_CPA_DEBUG is not set
-CONFIG_OPTIMIZE_INLINING=y
-# CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-# CONFIG_ENCRYPTED_KEYS is not set
-# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
-# CONFIG_SECURITY_DMESG_RESTRICT is not set
-# CONFIG_SECURITY is not set
-# CONFIG_SECURITYFS is not set
-CONFIG_DEFAULT_SECURITY_DAC=y
-CONFIG_DEFAULT_SECURITY=""
-CONFIG_XOR_BLOCKS=m
-CONFIG_ASYNC_CORE=m
-CONFIG_ASYNC_XOR=m
-CONFIG_CRYPTO=y
-
-#
-# Crypto core or helper
-#
-CONFIG_CRYPTO_FIPS=y
-CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_ALGAPI2=y
-CONFIG_CRYPTO_AEAD=y
-CONFIG_CRYPTO_AEAD2=y
-CONFIG_CRYPTO_BLKCIPHER=y
-CONFIG_CRYPTO_BLKCIPHER2=y
-CONFIG_CRYPTO_HASH=y
-CONFIG_CRYPTO_HASH2=y
-CONFIG_CRYPTO_RNG=y
-CONFIG_CRYPTO_RNG2=y
-CONFIG_CRYPTO_PCOMP=y
-CONFIG_CRYPTO_PCOMP2=y
-CONFIG_CRYPTO_MANAGER=y
-CONFIG_CRYPTO_MANAGER2=y
-# CONFIG_CRYPTO_USER is not set
-# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
-CONFIG_CRYPTO_GF128MUL=y
-CONFIG_CRYPTO_NULL=y
-# CONFIG_CRYPTO_PCRYPT is not set
-CONFIG_CRYPTO_WORKQUEUE=y
-CONFIG_CRYPTO_CRYPTD=y
-CONFIG_CRYPTO_AUTHENC=y
-# CONFIG_CRYPTO_TEST is not set
-
-#
-# Authenticated Encryption with Associated Data
-#
-CONFIG_CRYPTO_CCM=y
-CONFIG_CRYPTO_GCM=y
-CONFIG_CRYPTO_SEQIV=y
-
-#
-# Block modes
-#
-CONFIG_CRYPTO_CBC=y
-CONFIG_CRYPTO_CTR=y
-CONFIG_CRYPTO_CTS=y
-CONFIG_CRYPTO_ECB=y
-CONFIG_CRYPTO_LRW=y
-CONFIG_CRYPTO_PCBC=y
-CONFIG_CRYPTO_XTS=y
-
-#
-# Hash modes
-#
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_XCBC=y
-CONFIG_CRYPTO_VMAC=y
-
-#
-# Digest
-#
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_CRC32C_INTEL=y
-CONFIG_CRYPTO_GHASH=y
-CONFIG_CRYPTO_MD4=y
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_MICHAEL_MIC=y
-CONFIG_CRYPTO_RMD128=y
-CONFIG_CRYPTO_RMD160=y
-CONFIG_CRYPTO_RMD256=y
-CONFIG_CRYPTO_RMD320=y
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA1_SSSE3=y
-CONFIG_CRYPTO_SHA256=y
-CONFIG_CRYPTO_SHA512=y
-CONFIG_CRYPTO_TGR192=y
-CONFIG_CRYPTO_WP512=y
-CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=y
-
-#
-# Ciphers
-#
-CONFIG_CRYPTO_AES=y
-CONFIG_CRYPTO_AES_X86_64=y
-CONFIG_CRYPTO_AES_NI_INTEL=y
-CONFIG_CRYPTO_ANUBIS=y
-CONFIG_CRYPTO_ARC4=y
-CONFIG_CRYPTO_BLOWFISH=y
-CONFIG_CRYPTO_BLOWFISH_COMMON=y
-CONFIG_CRYPTO_BLOWFISH_X86_64=y
-CONFIG_CRYPTO_CAMELLIA=y
-CONFIG_CRYPTO_CAST5=y
-CONFIG_CRYPTO_CAST6=y
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_FCRYPT=y
-CONFIG_CRYPTO_KHAZAD=y
-CONFIG_CRYPTO_SALSA20=y
-CONFIG_CRYPTO_SALSA20_X86_64=y
-CONFIG_CRYPTO_SEED=y
-CONFIG_CRYPTO_SERPENT=y
-CONFIG_CRYPTO_TEA=y
-CONFIG_CRYPTO_TWOFISH=y
-CONFIG_CRYPTO_TWOFISH_COMMON=y
-CONFIG_CRYPTO_TWOFISH_X86_64=y
-CONFIG_CRYPTO_TWOFISH_X86_64_3WAY=y
-
-#
-# Compression
-#
-CONFIG_CRYPTO_DEFLATE=y
-CONFIG_CRYPTO_ZLIB=y
-CONFIG_CRYPTO_LZO=y
-
-#
-# Random Number Generation
-#
-CONFIG_CRYPTO_ANSI_CPRNG=y
-CONFIG_CRYPTO_USER_API=y
-CONFIG_CRYPTO_USER_API_HASH=y
-CONFIG_CRYPTO_USER_API_SKCIPHER=y
-CONFIG_CRYPTO_HW=y
-CONFIG_CRYPTO_DEV_PADLOCK=y
-CONFIG_CRYPTO_DEV_PADLOCK_AES=y
-CONFIG_CRYPTO_DEV_PADLOCK_SHA=y
-CONFIG_HAVE_KVM=y
-# CONFIG_VIRTUALIZATION is not set
-CONFIG_BINARY_PRINTF=y
-
-#
-# Library routines
-#
-CONFIG_BITREVERSE=y
-CONFIG_GENERIC_FIND_FIRST_BIT=y
-CONFIG_CRC_CCITT=y
-CONFIG_CRC16=y
-CONFIG_CRC_T10DIF=y
-CONFIG_CRC_ITU_T=y
-CONFIG_CRC32=y
-CONFIG_CRC7=y
-CONFIG_LIBCRC32C=y
-CONFIG_CRC8=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=y
-CONFIG_LZO_COMPRESS=y
-CONFIG_LZO_DECOMPRESS=y
-CONFIG_XZ_DEC=y
-CONFIG_XZ_DEC_X86=y
-CONFIG_XZ_DEC_POWERPC=y
-CONFIG_XZ_DEC_IA64=y
-CONFIG_XZ_DEC_ARM=y
-CONFIG_XZ_DEC_ARMTHUMB=y
-CONFIG_XZ_DEC_SPARC=y
-CONFIG_XZ_DEC_BCJ=y
-# CONFIG_XZ_DEC_TEST is not set
-CONFIG_DECOMPRESS_GZIP=y
-CONFIG_DECOMPRESS_BZIP2=y
-CONFIG_DECOMPRESS_LZMA=y
-CONFIG_DECOMPRESS_XZ=y
-CONFIG_DECOMPRESS_LZO=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=y
-CONFIG_TEXTSEARCH_BM=y
-CONFIG_TEXTSEARCH_FSM=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
-CONFIG_CHECK_SIGNATURE=y
-CONFIG_CPU_RMAP=y
-CONFIG_DQL=y
-CONFIG_NLATTR=y
-CONFIG_AVERAGE=y
-CONFIG_CORDIC=y
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/kconfig.mk b/packages/base/any/kernels/3.2.65-1+deb7u2/kconfig.mk
deleted file mode 100644
index 164623a9..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/kconfig.mk
+++ /dev/null
@@ -1,31 +0,0 @@
-############################################################
-#
-#
-# Copyright 2015 Big Switch Networks, Inc.
-#
-# Licensed under the Eclipse Public License, Version 1.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
-# either express or implied. See the License for the specific
-# language governing permissions and limitations under the
-# License.
-#
-#
-############################################################
-#
-# 3.2.65-1+deb7u2 Kernel Builds
-#
-############################################################
-THIS_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
-K_MAJOR_VERSION := 3
-K_PATCH_LEVEL := 2
-K_SUB_LEVEL := 65
-K_SUFFIX := -1+deb7u2
-K_PATCH_DIR := $(THIS_DIR)/patches
-K_ARCHIVE_URL := http://opennetlinux.org/tarballs/linux-3.2.65-1+deb7u2.tar.xz
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/CVE-2016-5195.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/CVE-2016-5195.patch
deleted file mode 100644
index 199eb2ce..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/CVE-2016-5195.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-diff -urpN a/include/linux/mm.h b/include/linux/mm.h
---- a/include/linux/mm.h 2016-11-02 14:46:33.278862661 -0700
-+++ b/include/linux/mm.h 2016-11-02 14:47:01.338863270 -0700
-@@ -1526,6 +1526,7 @@ struct page *follow_page(struct vm_area_
- #define FOLL_MLOCK 0x40 /* mark page as mlocked */
- #define FOLL_SPLIT 0x80 /* don't return transhuge pages, split them */
- #define FOLL_HWPOISON 0x100 /* check page is hwpoisoned */
-+#define FOLL_COW 0x4000 /* internal GUP flag */
-
- typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr,
- void *data);
-diff -urpN a/mm/memory.c b/mm/memory.c
---- a/mm/memory.c 2016-11-02 14:46:33.938862676 -0700
-+++ b/mm/memory.c 2016-11-02 14:50:52.086868277 -0700
-@@ -1427,6 +1427,23 @@ int zap_vma_ptes(struct vm_area_struct *
- }
- EXPORT_SYMBOL_GPL(zap_vma_ptes);
-
-+static inline bool can_follow_write_pte(pte_t pte, struct page *page,
-+ unsigned int flags)
-+{
-+ if (pte_write(pte))
-+ return true;
-+
-+ /*
-+ * Make sure that we are really following CoWed page. We do not really
-+ * have to care about exclusiveness of the page because we only want
-+ * to ensure that once COWed page hasn't disappeared in the meantime
-+ * or it hasn't been merged to a KSM page.
-+ */
-+ if ((flags & FOLL_FORCE) && (flags & FOLL_COW))
-+ return page && PageAnon(page) && !PageKsm(page);
-+
-+ return false;
-+}
- /**
- * follow_page - look up a page descriptor from a user-virtual address
- * @vma: vm_area_struct mapping @address
-@@ -1509,10 +1526,12 @@ split_fallthrough:
- pte = *ptep;
- if (!pte_present(pte))
- goto no_page;
-- if ((flags & FOLL_WRITE) && !pte_write(pte))
-- goto unlock;
-
- page = vm_normal_page(vma, address, pte);
-+ if ((flags & FOLL_WRITE) && !can_follow_write_pte(pte, page, flags)) {
-+ pte_unmap_unlock(ptep, ptl);
-+ return NULL;
-+ }
- if (unlikely(!page)) {
- if ((flags & FOLL_DUMP) ||
- !is_zero_pfn(pte_pfn(pte)))
-@@ -1789,17 +1808,13 @@ int __get_user_pages(struct task_struct
- * The VM_FAULT_WRITE bit tells us that
- * do_wp_page has broken COW when necessary,
- * even if maybe_mkwrite decided not to set
-- * pte_write. We can thus safely do subsequent
-- * page lookups as if they were reads. But only
-- * do so when looping for pte_write is futile:
-- * in some cases userspace may also be wanting
-- * to write to the gotten user page, which a
-- * read fault here might prevent (a readonly
-- * page might get reCOWed by userspace write).
-+ * pte_write. We cannot simply drop FOLL_WRITE
-+ * here because the COWed page might be gone by
-+ * the time we do the subsequent page lookups.
- */
- if ((ret & VM_FAULT_WRITE) &&
- !(vma->vm_flags & VM_WRITE))
-- foll_flags &= ~FOLL_WRITE;
-+ foll_flags |= FOLL_COW;
-
- cond_resched();
- }
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/README b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/README
deleted file mode 100644
index e9fd4c70..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/README
+++ /dev/null
@@ -1,17 +0,0 @@
-############################################################
-#
-# Debian 3.2 Kernel Patches
-#
-############################################################
-#
-# The majority of these patches were imported from
-# the Cumulus OSS Repository, version 2.5.1, for the Debian 3.2 kernel
-# distributed with Wheezy.
-#
-# http://oss.cumulusnetworks.com/CumulusLinux-2.5.1
-#
-# See the kernel patch directory:
-#
-# http://oss.cumulusnetworks.com/CumulusLinux-2.5.1/patches/kernel
-#
-############################################################
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/README.cumulus b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/README.cumulus
deleted file mode 100644
index f759061a..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/README.cumulus
+++ /dev/null
@@ -1,36 +0,0 @@
-Kernel stgit notes
-==================
-
-See also: https://wiki.cumulusnetworks.com/display/DE/Linux+Kernel+stgit+patches
-
-The Linux kernel stg patches are broken up into categories. The patch
-name is prefixed with the category.
-
-When creating a new patch please put it into an existing category. If
-you really need a new category open a discussion.
-
-Categories:
-
-Prefix Meaning
-=============+===========
-git- Specific to git, e.g. the standard gitignore.patch.
-arch-powerpc- PowerPC CPU patches. Not tied to a specific platform.
-arch-intel- Intel CPU patches. Not tied to a specific platform.
-kernel- Kernel features, like file systems, back ported items.
-driver- Device drivers. Not tied to a specific platform.
-platform- Switching hardware platforms, like DNI-7448.
-network- Networking, routing, bridging, tun, ipv4, ipv6, etc.
-
-
-platform- Category Specific Notes
-=================================
-
-Within this category the platforms are stored alphabetically.
-
-One patch, platform-powerpc-85xx-Makefile.patch, is used by all the
-powerpc platforms. This patch contains changes to
-arch/powerpc/platforms/85xx/Makefile and
-arch/powerpc/platforms/85xx/Kconfig.
-
-By keeping these changes in a separate patch allows the platform
-specific patchsets to sink/float without conflicts in these two files.
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-intel-centerton-pci-id.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-intel-centerton-pci-id.patch
deleted file mode 100644
index daf6556c..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-intel-centerton-pci-id.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-arch-intel-centerton-pci-id.patch
-
-Add the PCI device ID for the Intel Centerton Integrated Legacy Block
-(ILB).
-
-This device ID is used by a number of drivers, including GPIO and
-Multifunction Devices.
-
-diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
-index d93f417..d35b1f4 100644
---- a/include/linux/pci_ids.h
-+++ b/include/linux/pci_ids.h
-@@ -2484,6 +2484,7 @@
- #define PCI_DEVICE_ID_INTEL_MRST_SD2 0x084F
- #define PCI_DEVICE_ID_INTEL_I960 0x0960
- #define PCI_DEVICE_ID_INTEL_I960RM 0x0962
-+#define PCI_DEVICE_ID_INTEL_CENTERTON_ILB 0x0c60
- #define PCI_DEVICE_ID_INTEL_8257X_SOL 0x1062
- #define PCI_DEVICE_ID_INTEL_82573E_SOL 0x1085
- #define PCI_DEVICE_ID_INTEL_82573L_SOL 0x108F
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-intel-centerton-reboot-cf9.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-intel-centerton-reboot-cf9.patch
deleted file mode 100644
index 7b9bca62..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-intel-centerton-reboot-cf9.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-Patch to reboot x86_64 machines using boot code CF9
-
-diff --git a/arch/x86/include/asm/emergency-restart.h b/arch/x86/include/asm/emergency-restart.h
-index cc70c1c..441a910 100644
---- a/arch/x86/include/asm/emergency-restart.h
-+++ b/arch/x86/include/asm/emergency-restart.h
-@@ -11,6 +11,7 @@ enum reboot_type {
- BOOT_EFI = 'e',
- BOOT_CF9 = 'p',
- BOOT_CF9_COND = 'q',
-+ BOOT_CF9_COLD = 'd',
- };
-
- extern enum reboot_type reboot_type;
-diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
-index f411aca..a10547c 100644
---- a/arch/x86/kernel/reboot.c
-+++ b/arch/x86/kernel/reboot.c
-@@ -93,6 +93,7 @@ static int __init reboot_setup(char *str)
- case 'b':
- #endif
- case 'a':
-+ case 'd':
- case 'k':
- case 't':
- case 'e':
-@@ -395,6 +396,16 @@ static int __init set_pci_reboot(const struct dmi_system_id *d)
- return 0;
- }
-
-+static int __init set_cold_cf9_reboot(const struct dmi_system_id *d)
-+{
-+ if (reboot_type != BOOT_CF9_COLD) {
-+ reboot_type = BOOT_CF9_COLD;
-+ printk(KERN_INFO "%s series board detected. "
-+ "Selecting CF9 Cold Reset method for reboots.\n", d->ident);
-+ }
-+ return 0;
-+}
-+
- static struct dmi_system_id __initdata pci_reboot_dmi_table[] = {
- { /* Handle problems with rebooting on Apple MacBook5 */
- .callback = set_pci_reboot,
-@@ -468,6 +479,23 @@ static struct dmi_system_id __initdata pci_reboot_dmi_table[] = {
- DMI_MATCH(DMI_PRODUCT_NAME, "Precision M6600"),
- },
- },
-+ { /* Perform cold reset on Dell S6000 */
-+ .callback = set_cold_cf9_reboot,
-+ .ident = "Dell S6000",
-+ .matches = {
-+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
-+ DMI_MATCH(DMI_PRODUCT_NAME, "S6000"),
-+ },
-+ },
-+ { /* Dell S6000 could have either manufacturer names: Dell Inc or
-+ Dell Force10 Networks. Accomodating for both */
-+ .callback = set_cold_cf9_reboot,
-+ .ident = "Dell S6000",
-+ .matches = {
-+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Force10 Networks"),
-+ DMI_MATCH(DMI_PRODUCT_NAME, "S6000"),
-+ },
-+ },
- { /* Handle problems with rebooting on the Dell PowerEdge C6100. */
- .callback = set_pci_reboot,
- .ident = "Dell PowerEdge C6100",
-@@ -569,6 +597,7 @@ static void native_machine_emergency_restart(void)
- int i;
- int attempt = 0;
- int orig_reboot_type = reboot_type;
-+ u8 cf9_cold = 0;
-
- if (reboot_emergency)
- emergency_vmx_disable_all();
-@@ -641,6 +670,15 @@ static void native_machine_emergency_restart(void)
- }
- reboot_type = BOOT_KBD;
- break;
-+
-+ case BOOT_CF9_COLD:
-+ cf9_cold = inb(0xcf9) & ~6;
-+ outb(cf9_cold|8, 0xcf9); /* Request cold reset */
-+ udelay(50);
-+ outb(cf9_cold|12, 0xcf9); /* Actually do the reset */
-+ udelay(50);
-+ reboot_type = BOOT_KBD;
-+ break;
- }
- }
- }
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-intel-os-driven-pci-maxpayload-readreq-setup.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-intel-os-driven-pci-maxpayload-readreq-setup.patch
deleted file mode 100644
index f1bc2e0d..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-intel-os-driven-pci-maxpayload-readreq-setup.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-#Copyright 2014 Cumulus Networks, Inc. All rights reserved.
-Have the OS set up all PCI device maxpayload and maxreadrequest on the PCIe bus
-Notes:
-1. This is similar to the payload size fixup done for powerpc.
-Ref: arch-powerpc-os-driven-pci-maxpayload-readreq-setup.patch
-2. pci=pcie_bus_safe is supposed to fix up the entire tree below a root complex
-with the smallest common denominator MPS. However it is only setting the
-devices associated with the children (child buses) of the root. And that leaves
-some of the devices on the root with a different (and in some cases lower MPS
-based on the bios setting).
-2. This patch works by walking the bus underneath each PCIe controller,
-querying PCI_EXP_DEVCAP_PAYLOAD, and finding the minimum value underneath each
-controller. Then it walks though the same set of devices setting
-PCI_EXP_DEVCTL_PAYLOAD and PCI_EXP_DEVCTL_READRQ to this value. The payloads
-are powers of 2 starting at 128...
-
-0 -> 128
-1 -> 256
-...
-7 -> 16,384:1
-
-diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
-index 0ed97d8..f1a970f 100644
---- a/arch/x86/pci/acpi.c
-+++ b/arch/x86/pci/acpi.c
-@@ -329,6 +329,66 @@ res_alloc_fail:
- return;
- }
-
-+/*
-+ * scan and set the PCIe bus payload and read request sizes.
-+ */
-+static int __devinit __fixup_pcie_scan_payload(struct pci_dev *pdev,
-+ void *data)
-+{
-+ int *payload_size = data;
-+ int rval, cap, payload_cap;
-+ uint32_t devcap;
-+
-+ if (!pci_is_pcie(pdev))
-+ return 0;
-+
-+ cap = pci_find_capability(pdev, PCI_CAP_ID_EXP);
-+ if (cap == 0)
-+ return -ENODEV;
-+
-+ rval = pci_read_config_dword(pdev, cap + PCI_EXP_DEVCAP, &devcap);
-+ if (rval)
-+ return rval;
-+
-+ payload_cap = devcap & PCI_EXP_DEVCAP_PAYLOAD;
-+ if (payload_cap < *payload_size)
-+ *payload_size = payload_cap;
-+
-+ return 0;
-+}
-+
-+static int __devinit __fixup_pcie_set_payload(struct pci_dev *pdev,
-+ void *data)
-+{
-+ int *payload_size = data;
-+ int rval, cap;
-+ uint16_t devctl;
-+
-+ if (!pci_is_pcie(pdev))
-+ return 0;
-+
-+ cap = pci_find_capability(pdev, PCI_CAP_ID_EXP);
-+ if (cap == 0)
-+ return -ENODEV;
-+
-+ rval = pci_read_config_word(pdev, cap + PCI_EXP_DEVCTL, &devctl);
-+ if (rval)
-+ return rval;
-+
-+ devctl &= ~PCI_EXP_DEVCTL_PAYLOAD;
-+ devctl |= *payload_size << 5;
-+
-+ devctl &= ~PCI_EXP_DEVCTL_READRQ;
-+ devctl |= *payload_size << 12;
-+
-+ rval = pci_write_config_word(pdev, cap + PCI_EXP_DEVCTL, devctl);
-+ if (rval)
-+ return rval;
-+
-+ return 0;
-+}
-+
-+
- struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_pci_root *root)
- {
- struct acpi_device *device = root->device;
-@@ -395,6 +455,28 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_pci_root *root)
- }
- }
-
-+/* Set the payload size for all devices on the bus */
-+ if (bus) {
-+ int payload_size;
-+ payload_size = PCI_EXP_DEVCAP_PAYLOAD;
-+ pci_walk_bus(bus, __fixup_pcie_scan_payload, &payload_size);
-+ if (payload_size < PCI_EXP_DEVCAP_PAYLOAD) {
-+ pci_walk_bus(bus, __fixup_pcie_set_payload,
-+ &payload_size);
-+ dev_info(&bus->dev,
-+ "Set PCIe payload and read request to %d\n",
-+ (payload_size == 0) ? 128 :
-+ (payload_size == 1) ? 256 :
-+ (payload_size == 2) ? 512 :
-+ (payload_size == 3) ? 1024 :
-+ (payload_size == 4) ? 2048 :
-+ (payload_size == 5) ? 4096 :
-+ (payload_size == 6) ? 8192 :
-+ 16384
-+ );
-+ }
-+ }
-+
- /* After the PCI-E bus has been walked and all devices discovered,
- * configure any settings of the fabric that might be necessary.
- */
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-intel-reboot-cf9-cold.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-intel-reboot-cf9-cold.patch
deleted file mode 100644
index 8794ad73..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-intel-reboot-cf9-cold.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/arch/x86/kernel/reboot.c 2016-06-01 13:19:53.102025910 -0700
-+++ b/arch/x86/kernel/reboot.c 2016-06-01 13:21:04.250027454 -0700
-@@ -672,13 +672,13 @@ static void native_machine_emergency_res
- break;
-
- case BOOT_CF9_COLD:
-- cf9_cold = inb(0xcf9) & ~6;
-- outb(cf9_cold|8, 0xcf9); /* Request cold reset */
-- udelay(50);
-- outb(cf9_cold|12, 0xcf9); /* Actually do the reset */
-- udelay(50);
-- reboot_type = BOOT_KBD;
-- break;
-+ cf9_cold = inb(0xcf9) & ~0xE;
-+ outb(cf9_cold|2, 0xcf9); /* Request cold reset */
-+ udelay(50);
-+ outb(cf9_cold|0xE, 0xcf9); /* Actually do the reset */
-+ udelay(50);
-+ reboot_type = BOOT_KBD;
-+ break;
- }
- }
- }
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-nr-gpio.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-nr-gpio.patch
deleted file mode 100644
index 50aaf232..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-nr-gpio.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-diff --git a/arch/x86/include/asm/gpio.h b/arch/x86/include/asm/gpio.h
-index 91d915a..31ce3f7 100644
---- a/arch/x86/include/asm/gpio.h
-+++ b/arch/x86/include/asm/gpio.h
-@@ -16,6 +16,8 @@
- #ifndef _ASM_X86_GPIO_H
- #define _ASM_X86_GPIO_H
-
-+#define ARCH_NR_GPIOS 512
-+
- #include
-
- #ifdef CONFIG_GPIOLIB
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-cacheinfo.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-cacheinfo.patch
deleted file mode 100644
index 61d04d92..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-cacheinfo.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-Fix missing L2 cache in /sys/devices/system/cpu/cpu0/cache/index2/size
-This appears to have been introduced in 2.6.29 by
-93197a36a9c16a85fb24cf5a8639f7bf9af838a3.
-
-This caused lscpu to error out on e500v2 devices, and probably others
- error: cannot open /sys/devices/system/cpu/cpu0/cache/index2/size: No such file or directory
-
-Some embedded powerpc sysystems use cache-size in DTS for the unified L2 cache
-size, not d-cache-size, so we need to allow for both DTS names. Added a
-second CACHE_TYPE_UNIFIED_D cache_type_info structure to handle this.
-
-This is a redo after trying to push the previous version upstream, and finding out
-that the previous patch broke OpenFirmware PowerPC systems like the Mac. This also
-now includes all descriptive entries in the index2 directory; the previous still had
-some missing.
-
-diff --git a/arch/powerpc/kernel/cacheinfo.c b/arch/powerpc/kernel/cacheinfo.c
-index b4437e8..592b096 100644
---- a/arch/powerpc/kernel/cacheinfo.c
-+++ b/arch/powerpc/kernel/cacheinfo.c
-@@ -62,12 +62,22 @@ struct cache_type_info {
- };
-
- /* These are used to index the cache_type_info array. */
--#define CACHE_TYPE_UNIFIED 0
--#define CACHE_TYPE_INSTRUCTION 1
--#define CACHE_TYPE_DATA 2
-+#define CACHE_TYPE_UNIFIED 0 /* cache-size, cache-block-size, etc. */
-+#define CACHE_TYPE_UNIFIED_D 1 /* d-cache-size, d-cache-block-size, etc */
-+#define CACHE_TYPE_INSTRUCTION 2
-+#define CACHE_TYPE_DATA 3
-
- static const struct cache_type_info cache_type_info[] = {
- {
-+ /* Embedded systems that use cache-size, cache-block-size,
-+ * etc. for the Unified (typically L2) cache. */
-+ .name = "Unified",
-+ .size_prop = "cache-size",
-+ .line_size_props = { "cache-line-size",
-+ "cache-block-size", },
-+ .nr_sets_prop = "cache-sets",
-+ },
-+ {
- /* PowerPC Processor binding says the [di]-cache-*
- * must be equal on unified caches, so just use
- * d-cache properties. */
-@@ -293,7 +303,8 @@ static struct cache *cache_find_first_sibling(struct cache *cache)
- {
- struct cache *iter;
-
-- if (cache->type == CACHE_TYPE_UNIFIED)
-+ if (cache->type == CACHE_TYPE_UNIFIED ||
-+ cache->type == CACHE_TYPE_UNIFIED_D)
- return cache;
-
- list_for_each_entry(iter, &cache_list, list)
-@@ -324,13 +335,31 @@ static bool cache_node_is_unified(const struct device_node *np)
- return of_get_property(np, "cache-unified", NULL);
- }
-
-+/*
-+ * Handle unified caches that have two different types of tags. Most embedded
-+ * use cache-size, etc. for the unified cache size, but open firmware systems
-+ * use d-cache-size, etc. Since they all appear to be consistent, check on
-+ * initialization for which type we are, and use the appropriate structure.
-+ */
- static struct cache *__cpuinit cache_do_one_devnode_unified(struct device_node *node, int level)
- {
- struct cache *cache;
-+ int ucache;
-
- pr_debug("creating L%d ucache for %s\n", level, node->full_name);
-
-- cache = new_cache(CACHE_TYPE_UNIFIED, level, node);
-+ if (of_get_property(node,
-+ cache_type_info[CACHE_TYPE_UNIFIED_D].size_prop, NULL)) {
-+ ucache = CACHE_TYPE_UNIFIED_D;
-+ } else {
-+ ucache = CACHE_TYPE_UNIFIED; /* assume embedded */
-+ if (of_get_property(node,
-+ cache_type_info[CACHE_TYPE_UNIFIED].size_prop, NULL) ==
-+ NULL)
-+ printk(KERN_WARNING "Unified cache property missing\n");
-+ }
-+
-+ cache = new_cache(ucache, level, node);
-
- return cache;
- }
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-emulated-lwsync.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-emulated-lwsync.patch
deleted file mode 100644
index 4cd3a1b6..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-emulated-lwsync.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-#Copyright 2012 Cumulus Networks, Inc. All rights reserved.
-
-Emulate the 603 lwsync instruction
-
-Issue a memory barrier (mbar) instead of lwsync on e500 processors. This, along with SW emuluation of the FPU allow us to run PPC603 code from the Debian repositories directly on the e500 cores.
-
-diff --git a/arch/powerpc/include/asm/emulated_ops.h b/arch/powerpc/include/asm/emulated_ops.h
-index 63f2a22..093359a 100644
---- a/arch/powerpc/include/asm/emulated_ops.h
-+++ b/arch/powerpc/include/asm/emulated_ops.h
-@@ -44,6 +44,7 @@ extern struct ppc_emulated {
- struct ppc_emulated_entry spe;
- struct ppc_emulated_entry string;
- struct ppc_emulated_entry unaligned;
-+ struct ppc_emulated_entry lwsync;
- #ifdef CONFIG_MATH_EMULATION
- struct ppc_emulated_entry math;
- #elif defined(CONFIG_8XX_MINIMAL_FPEMU)
-diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
-index 9844662..a689b66 100644
---- a/arch/powerpc/kernel/traps.c
-+++ b/arch/powerpc/kernel/traps.c
-@@ -928,6 +928,14 @@ static int emulate_instruction(struct pt_regs *regs)
- return emulate_isel(regs, instword);
- }
-
-+ /* Emulate lwsync (Lightweight Sync) instruction */
-+ if (instword == PPC_INST_LWSYNC) {
-+ PPC_WARN_EMULATED(lwsync, regs);
-+ /* This is probably more pessimistic than required */
-+ mb();
-+ return 0;
-+ }
-+
- #ifdef CONFIG_PPC64
- /* Emulate the mfspr rD, DSCR. */
- if (((instword & PPC_INST_MFSPR_DSCR_MASK) == PPC_INST_MFSPR_DSCR) &&
-@@ -1542,6 +1550,7 @@ struct ppc_emulated ppc_emulated = {
- WARN_EMULATED_SETUP(spe),
- WARN_EMULATED_SETUP(string),
- WARN_EMULATED_SETUP(unaligned),
-+ WARN_EMULATED_SETUP(lwsync),
- #ifdef CONFIG_MATH_EMULATION
- WARN_EMULATED_SETUP(math),
- #elif defined(CONFIG_8XX_MINIMAL_FPEMU)
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-jtag.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-jtag.patch
deleted file mode 100644
index 64503dd7..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-jtag.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-#Copyright 2012 Cumulus Networks, Inc. All rights reserved.
-
-Tweak the kernel to support a JTAG hardware debugger
-
-- disable the software watchdog
-- enable Debug Interrupt in the PPC Machine State Register
-
-diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
-index 1b8a9c9..aba8704 100644
---- a/arch/powerpc/Kconfig.debug
-+++ b/arch/powerpc/Kconfig.debug
-@@ -132,6 +132,15 @@ config BDI_SWITCH
- Unless you are intending to debug the kernel with one of these
- machines, say N here.
-
-+config JTAG_DEBUGGER
-+ bool "Kernel modifications for JTAG debuggers"
-+ depends on DEBUG_KERNEL && PPC32
-+ help
-+ Modify kernel to allow JTAG debuggers to work. So far, this includes
-+ setting the "DE" bit in booke ppc MSR_KERNEL and set the kernel's
-+ softlockup threshold to be negative, effectively disabling software based
-+ watchdogs.
-+
- config BOOTX_TEXT
- bool "Support for early boot text console (BootX or OpenFirmware only)"
- depends on PPC_OF && PPC_BOOK3S
-diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h
-index 03c48e8..cd7b5af 100644
---- a/arch/powerpc/include/asm/reg_booke.h
-+++ b/arch/powerpc/include/asm/reg_booke.h
-@@ -37,7 +37,11 @@
- #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_IR|MSR_DR|MSR_CE)
- #define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE)
- #else
-+#if defined(CONFIG_JTAG_DEBUGGER)
-+#define MSR_KERNEL (MSR_ME|MSR_RI|MSR_CE|MSR_DE)
-+#else
- #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_CE)
-+#endif
- #define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE)
- #endif
-
-diff --git a/kernel/watchdog.c b/kernel/watchdog.c
-index a8bc4d9..08beea7 100644
---- a/kernel/watchdog.c
-+++ b/kernel/watchdog.c
-@@ -28,7 +28,11 @@
- #include
-
- int watchdog_enabled = 1;
-+#if defined(CONFIG_JTAG_DEBUGGER)
-+int __read_mostly watchdog_thresh = -10;
-+#else
- int __read_mostly watchdog_thresh = 10;
-+#endif
-
- static DEFINE_PER_CPU(unsigned long, watchdog_touch_ts);
- static DEFINE_PER_CPU(struct task_struct *, softlockup_watchdog);
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-os-driven-pci-maxpayload-readreq-setup.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-os-driven-pci-maxpayload-readreq-setup.patch
deleted file mode 100644
index c4597215..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-os-driven-pci-maxpayload-readreq-setup.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-#Copyright 2012 Cumulus Networks, Inc. All rights reserved.
-
-Have the OS set up all PCI device maxpayload and maxreadrequest on the PCIe bus
-
-This version of the linux kernel doesn't do anything regarding the PCIe max
-payload size or read request size, but rather rely on BIOS to take care of
-things. Upcoming versions of the kernel patch core PCI code in cool and useful
-ways, but there is a lot of flux, every version I've looked at has a different
-take on this.
-
-Rather than patching PCI core code, I've chosen to patch this in an arch
-dependent manner (powerpc only) that will not conflict with any work at the PCI
-core (redundant, but no functional or merge conflicts). We can remove this
-patch once the PCI core code settles down.
-
-The patch works by walking the bus underneath each PCIe controller, querying
-PCI_EXP_DEVCAP_PAYLOAD, and finding the minimum value underneath each
-controller. Then we walk though the same set of devices setting
-PCI_EXP_DEVCTL_PAYLOAD and PCI_EXP_DEVCTL_READRQ to this value. The payloads
-are powers of 2 starting at 128...
-
-0 -> 128
-1 -> 256
-...
-7 -> 16,384
-
-diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
-index 9508bec..abb9e95 100644
---- a/arch/powerpc/kernel/pci-common.c
-+++ b/arch/powerpc/kernel/pci-common.c
-@@ -1697,6 +1697,62 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus)
- return of_node_get(hose->dn);
- }
-
-+/*
-+ * scan and set the PCIe bus payload and read request sizes.
-+ */
-+static int __devinit __fixup_pcie_scan_payload(struct pci_dev * pdev,
-+ void * data)
-+{
-+ int * payload_size = data;
-+ int rval, cap, payload_cap;
-+ uint32_t devcap;
-+
-+ cap = pci_find_capability(pdev, PCI_CAP_ID_EXP);
-+ if (cap == 0) {
-+ return -ENODEV;
-+ }
-+
-+ rval = pci_read_config_dword(pdev, cap + PCI_EXP_DEVCAP, &devcap);
-+ if (rval) {
-+ return rval;
-+ }
-+ payload_cap = devcap & PCI_EXP_DEVCAP_PAYLOAD;
-+ if (payload_cap < *payload_size) {
-+ *payload_size = payload_cap;
-+ }
-+ return 0;
-+}
-+
-+static int __devinit __fixup_pcie_set_payload(struct pci_dev * pdev,
-+ void * data)
-+{
-+ int * payload_size = data;
-+ int rval, cap;
-+ uint16_t devctl;
-+
-+ cap = pci_find_capability(pdev, PCI_CAP_ID_EXP);
-+ if (cap == 0) {
-+ return -ENODEV;
-+ }
-+
-+ rval = pci_read_config_word(pdev, cap + PCI_EXP_DEVCTL, &devctl);
-+ if (rval) {
-+ return rval;
-+ }
-+
-+ devctl &= ~PCI_EXP_DEVCTL_PAYLOAD;
-+ devctl |= *payload_size << 5;
-+
-+ devctl &= ~PCI_EXP_DEVCTL_READRQ;
-+ devctl |= *payload_size << 12;
-+
-+ rval = pci_write_config_word(pdev, cap + PCI_EXP_DEVCTL, devctl);
-+ if (rval) {
-+ return rval;
-+ }
-+ return 0;
-+}
-+
- /**
- * pci_scan_phb - Given a pci_controller, setup and scan the PCI bus
- * @hose: Pointer to the PCI host controller instance structure
-@@ -1706,6 +1762,7 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose)
- struct pci_bus *bus;
- struct device_node *node = hose->dn;
- int mode;
-+ int payload_size;
-
- pr_debug("PCI: Scanning PHB %s\n",
- node ? node->full_name : "");
-@@ -1739,6 +1796,24 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose)
- if (mode == PCI_PROBE_NORMAL)
- hose->last_busno = bus->subordinate = pci_scan_child_bus(bus);
-
-+ /* Set the payload size for all devices on the bus */
-+ payload_size = PCI_EXP_DEVCAP_PAYLOAD;
-+ pci_walk_bus(hose->bus, __fixup_pcie_scan_payload, &payload_size);
-+ if (payload_size < PCI_EXP_DEVCAP_PAYLOAD) {
-+ pci_walk_bus(hose->bus, __fixup_pcie_set_payload, &payload_size);
-+ dev_info(&hose->bus->dev,
-+ "Set PCIe payload and read request to %d\n",
-+ (payload_size == 0) ? 128 :
-+ (payload_size == 1) ? 256 :
-+ (payload_size == 2) ? 512 :
-+ (payload_size == 3) ? 1024 :
-+ (payload_size == 4) ? 2048 :
-+ (payload_size == 5) ? 4096 :
-+ (payload_size == 6) ? 8192 :
-+ 16384
-+ );
-+ }
-+
- /* Configure PCI Express settings */
- if (bus && !pci_has_flag(PCI_PROBE_ONLY)) {
- struct pci_bus *child;
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-remove-arch-specific-overrides-of-panic_timeout.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-remove-arch-specific-overrides-of-panic_timeout.patch
deleted file mode 100644
index d90efa32..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-remove-arch-specific-overrides-of-panic_timeout.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From e5ae2bb5c7cf0389f0333e5d36be193e7738f4e9 Mon Sep 17 00:00:00 2001
-Subject: [PATCH 2/2] powerpc: remove arch specific overrides of panic_timeout
-
-Signed-off-by: Jonathan Toppins
-
-diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
-index ac76108..287d120 100644
---- a/arch/powerpc/kernel/setup_32.c
-+++ b/arch/powerpc/kernel/setup_32.c
-@@ -317,9 +317,6 @@ void __init setup_arch(char **cmdline_p)
- if (cpu_has_feature(CPU_FTR_UNIFIED_ID_CACHE))
- ucache_bsize = icache_bsize = dcache_bsize;
-
-- /* reboot on panic */
-- panic_timeout = 180;
--
- if (ppc_md.panic)
- setup_panic();
-
-diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
-index 2c8890a..38533f2 100644
---- a/arch/powerpc/kernel/setup_64.c
-+++ b/arch/powerpc/kernel/setup_64.c
-@@ -554,9 +554,6 @@ void __init setup_arch(char **cmdline_p)
- dcache_bsize = ppc64_caches.dline_size;
- icache_bsize = ppc64_caches.iline_size;
-
-- /* reboot on panic */
-- panic_timeout = 180;
--
- if (ppc_md.panic)
- setup_panic();
-
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-topology-info.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-topology-info.patch
deleted file mode 100644
index b19b2568..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-topology-info.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-Fix PPC toology macros
-
-diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h
-index c971858..eefc7df 100644
---- a/arch/powerpc/include/asm/topology.h
-+++ b/arch/powerpc/include/asm/topology.h
-@@ -124,13 +124,15 @@ static inline int stop_topology_update(void)
- #include
- #define smt_capable() (cpu_has_feature(CPU_FTR_SMT))
-
--#ifdef CONFIG_PPC64
- #include
-
--#define topology_thread_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu))
--#define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu))
--#define topology_core_id(cpu) (cpu_to_core_id(cpu))
-+#ifdef CONFIG_PPC64
-+#define topology_thread_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu))
-+#define topology_physical_package_id(cpu) (get_hard_smp_processor_id(cpu))
- #endif
-+#define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu))
-+#define topology_core_id(cpu) (cpu_to_core_id(cpu))
-+#define topology_physical_package_id(cpu) (0)
- #endif
-
- #endif /* __KERNEL__ */
-diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
-index 77bb77d..efd43dd 100644
---- a/arch/powerpc/kernel/setup-common.c
-+++ b/arch/powerpc/kernel/setup-common.c
-@@ -199,6 +199,23 @@ static void show_cpuinfo_summary(struct seq_file *m)
- #endif
- }
-
-+/*
-+ * Get CPU information for use by the procfs.
-+ */
-+static void show_cpuinfo_core(struct seq_file *m, unsigned int cpu)
-+{
-+
-+
-+#ifdef CONFIG_SMP
-+#ifdef CONFIG_PPC64
-+ seq_printf(m, "physical id\t: %d\n", get_hard_smp_processor_id(cpu));
-+#else /* Assume 32 bit archs are single package */
-+ seq_printf(m, "physical id\t: %d\n", (0));
-+#endif /* CONFIG_PPC64 */
-+ seq_printf(m, "core id\t\t: %d\n", (cpu_to_core_id(cpu)));
-+#endif
-+}
-+
- static int show_cpuinfo(struct seq_file *m, void *v)
- {
- unsigned long cpu_id = (unsigned long)v - 1;
-@@ -302,6 +319,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
- seq_printf(m, "revision\t: %hd.%hd (pvr %04x %04x)\n",
- maj, min, PVR_VER(pvr), PVR_REV(pvr));
-
-+ show_cpuinfo_core(m, cpu_id);
-+
- #ifdef CONFIG_PPC32
- seq_printf(m, "bogomips\t: %lu.%02lu\n",
- loops_per_jiffy / (500000/HZ),
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-warn-unmapped-irq.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-warn-unmapped-irq.patch
deleted file mode 100644
index 578fe4b1..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/arch-powerpc-warn-unmapped-irq.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-#Copyright 2012 Cumulus Networks, Inc. All rights reserved.
-
-diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
-index 458ed3b..9508bec 100644
---- a/arch/powerpc/kernel/pci-common.c
-+++ b/arch/powerpc/kernel/pci-common.c
-@@ -1112,6 +1112,13 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
- ppc_md.pci_dma_dev_setup(dev);
-
- /* Read default IRQs and fixup if necessary */
-+ if (pci_read_irq_line(dev) && (dev->devfn != 0)) {
-+ printk(KERN_WARNING
-+ "WARNING: Unable to map IRQ in device tree for pci device "
-+ "%04x:%02x:%02x.%d\n",
-+ pci_domain_nr(dev->bus), dev->bus->number, PCI_SLOT(dev->devfn),
-+ PCI_FUNC(dev->devfn));
-+ }
- pci_read_irq_line(dev);
- if (ppc_md.pci_irq_fixup)
- ppc_md.pci_irq_fixup(dev);
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/debian-build.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/debian-build.patch
deleted file mode 100644
index 7714a316..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/debian-build.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Add control and postinstall
-
-diff --git a/debiancl/control.bcm-modules b/debiancl/control.bcm-modules
-new file mode 100644
-index 0000000..98dd20b
---- /dev/null
-+++ b/debiancl/control.bcm-modules
-@@ -0,0 +1,5 @@
-+Package: bcm-modules
-+Version: =V
-+Architecture: =A
-+Maintainer: support@cumulusnetworks.com
-+Description: Modules for BCM SDK
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/debian-cumulus-config-abi-ref.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/debian-cumulus-config-abi-ref.patch
deleted file mode 100644
index 32e87bca..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/debian-cumulus-config-abi-ref.patch
+++ /dev/null
@@ -1,4920 +0,0 @@
-Abi ref generated with cumulus config file
-
-diff --git a/debian/abi/3.2.0-4/powerpc_none_powerpc-smp-cumulus b/debian/abi/3.2.0-4/powerpc_none_powerpc-smp-cumulus
-new file mode 100644
-index 0000000..f461280
---- /dev/null
-+++ b/debian/abi/3.2.0-4/powerpc_none_powerpc-smp-cumulus
-@@ -0,0 +1,4912 @@
-+0x897b7f0f usb_serial_generic_submit_read_urb vmlinux EXPORT_SYMBOL_GPL
-+0x7de5bdf0 generic_file_splice_write vmlinux EXPORT_SYMBOL
-+0x801e2bc9 set_anon_super vmlinux EXPORT_SYMBOL
-+0x6fce9192 kmem_cache_alloc vmlinux EXPORT_SYMBOL
-+0x96f799f3 replace_page_cache_page vmlinux EXPORT_SYMBOL_GPL
-+0x70523a7a __cond_resched_softirq vmlinux EXPORT_SYMBOL
-+0x9147a486 of_get_property vmlinux EXPORT_SYMBOL
-+0x009a3fb6 i2c_put_adapter vmlinux EXPORT_SYMBOL
-+0x495ed07e rtc_class_open vmlinux EXPORT_SYMBOL_GPL
-+0x96cd2b04 scsi_sense_key_string vmlinux EXPORT_SYMBOL
-+0x0a2487e0 unblock_all_signals vmlinux EXPORT_SYMBOL
-+0x3dcfd253 dev_uc_sync vmlinux EXPORT_SYMBOL
-+0x8bdf1749 dev_mc_sync vmlinux EXPORT_SYMBOL
-+0xccd91589 hwmon_device_unregister vmlinux EXPORT_SYMBOL_GPL
-+0xdf27877b register_timer_hook vmlinux EXPORT_SYMBOL_GPL
-+0xfbaaf01e console_lock vmlinux EXPORT_SYMBOL
-+0xe113bbbc csum_partial vmlinux EXPORT_SYMBOL
-+0xa39d9220 unregister_timer_hook vmlinux EXPORT_SYMBOL_GPL
-+0xc068440e __kfifo_alloc vmlinux EXPORT_SYMBOL
-+0xddf5478d nf_log_register vmlinux EXPORT_SYMBOL
-+0x69aa9637 scsi_execute vmlinux EXPORT_SYMBOL
-+0x1b17e06c kstrtoll vmlinux EXPORT_SYMBOL
-+0xc161fa2b proc_net_remove vmlinux EXPORT_SYMBOL_GPL
-+0xcb8c9724 raw_seq_open vmlinux EXPORT_SYMBOL_GPL
-+0x8f6f24c7 device_del vmlinux EXPORT_SYMBOL_GPL
-+0x0058381b device_add vmlinux EXPORT_SYMBOL_GPL
-+0x416460c6 crypto_hash_walk_done vmlinux EXPORT_SYMBOL_GPL
-+0xaf063510 _raw_spin_lock_bh vmlinux EXPORT_SYMBOL
-+0x3c942368 profile_event_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x89ff43f6 init_uts_ns vmlinux EXPORT_SYMBOL_GPL
-+0xca8f2cf7 __inet6_hash vmlinux EXPORT_SYMBOL
-+0x69181415 dst_release vmlinux EXPORT_SYMBOL
-+0x33213a5f sock_no_mmap vmlinux EXPORT_SYMBOL
-+0xba0cf4bd disk_map_sector_rcu vmlinux EXPORT_SYMBOL_GPL
-+0x206e3996 sysfs_update_group vmlinux EXPORT_SYMBOL_GPL
-+0xa38602cd drain_workqueue vmlinux EXPORT_SYMBOL_GPL
-+0xfdb9b629 ioread32be vmlinux EXPORT_SYMBOL
-+0x436708b0 tcp_initialize_rcv_mss vmlinux EXPORT_SYMBOL
-+0x54e6fcdd net_enable_timestamp vmlinux EXPORT_SYMBOL
-+0xea2c390d sockfd_lookup vmlinux EXPORT_SYMBOL
-+0xc4f9f419 usb_serial_generic_write_bulk_callback vmlinux EXPORT_SYMBOL_GPL
-+0xea9855ae blk_limits_max_hw_sectors vmlinux EXPORT_SYMBOL
-+0x3dcb51c4 directly_mappable_cdev_bdi vmlinux EXPORT_SYMBOL
-+0x6bc3fbc0 __unregister_chrdev vmlinux EXPORT_SYMBOL
-+0xa72f6b4b srcu_notifier_chain_register vmlinux EXPORT_SYMBOL_GPL
-+0xb5dea7ef g_token_size vmlinux EXPORT_SYMBOL_GPL
-+0x122d10bc dev_graft_qdisc vmlinux EXPORT_SYMBOL
-+0x829e76cd scsi_get_command vmlinux EXPORT_SYMBOL
-+0x7ff10ccf raw_notifier_call_chain vmlinux EXPORT_SYMBOL_GPL
-+0xca18d700 flush_tlb_range vmlinux EXPORT_SYMBOL
-+0xd54291e6 scsi_target_quiesce vmlinux EXPORT_SYMBOL
-+0x2f225631 transport_class_register vmlinux EXPORT_SYMBOL_GPL
-+0x30cada8f radix_tree_next_hole vmlinux EXPORT_SYMBOL
-+0x66d0ee54 vfsmount_lock_global_unlock vmlinux EXPORT_SYMBOL
-+0xdad1a719 input_handler_for_each_handle vmlinux EXPORT_SYMBOL
-+0xe3e619b2 transport_class_unregister vmlinux EXPORT_SYMBOL_GPL
-+0xffd5a395 default_wake_function vmlinux EXPORT_SYMBOL
-+0x434c3c59 pci_bus_read_config_byte vmlinux EXPORT_SYMBOL
-+0x1a58b8f5 mount_subtree vmlinux EXPORT_SYMBOL
-+0x7eaa917d iget_locked vmlinux EXPORT_SYMBOL
-+0x9a696827 sock_get_timestampns vmlinux EXPORT_SYMBOL
-+0x0f4ca848 class_interface_register vmlinux EXPORT_SYMBOL_GPL
-+0xb711d84e key_type_keyring vmlinux EXPORT_SYMBOL
-+0xa4b94fea iowrite8_rep vmlinux EXPORT_SYMBOL
-+0x8c7a3757 of_get_named_gpio_flags vmlinux EXPORT_SYMBOL
-+0x0f05e347 spi_get_device_id vmlinux EXPORT_SYMBOL_GPL
-+0xfa010184 class_interface_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x73a903c4 vfsmount_lock_local_lock vmlinux EXPORT_SYMBOL
-+0xa9c530b8 unregister_oom_notifier vmlinux EXPORT_SYMBOL_GPL
-+0x2eec63c9 xdr_encode_netobj vmlinux EXPORT_SYMBOL_GPL
-+0xd5cd5612 xdr_decode_word vmlinux EXPORT_SYMBOL_GPL
-+0x9d92332a tty_register_device vmlinux EXPORT_SYMBOL
-+0x44366cfc simple_write_to_buffer vmlinux EXPORT_SYMBOL
-+0xa28d5490 __srcu_read_unlock vmlinux EXPORT_SYMBOL_GPL
-+0xc2e587d1 reset_devices vmlinux EXPORT_SYMBOL
-+0x9cdd28bc of_find_all_nodes vmlinux EXPORT_SYMBOL
-+0xac1b6c1d mmc_app_cmd vmlinux EXPORT_SYMBOL_GPL
-+0x3df5e4b2 usb_bus_list_lock vmlinux EXPORT_SYMBOL_GPL
-+0xa5a633b9 sg_last vmlinux EXPORT_SYMBOL
-+0xe601908d __blk_run_queue vmlinux EXPORT_SYMBOL
-+0x643eaec8 param_get_string vmlinux EXPORT_SYMBOL
-+0x99bb8806 memmove vmlinux EXPORT_SYMBOL
-+0xf0904255 __block_page_mkwrite vmlinux EXPORT_SYMBOL
-+0x76d3cd60 laptop_mode vmlinux EXPORT_SYMBOL
-+0xa10b7029 generic_file_direct_write vmlinux EXPORT_SYMBOL
-+0xb7032a2f end_page_writeback vmlinux EXPORT_SYMBOL
-+0x50f5e532 call_rcu_sched vmlinux EXPORT_SYMBOL_GPL
-+0x46e0a7f2 skb_recv_datagram vmlinux EXPORT_SYMBOL
-+0xe230598d d_alloc_pseudo vmlinux EXPORT_SYMBOL
-+0x871c0a7e fiemap_check_flags vmlinux EXPORT_SYMBOL
-+0x51221294 generic_file_readonly_mmap vmlinux EXPORT_SYMBOL
-+0x5d730e7b raw_notifier_chain_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x0d542439 __ipv6_addr_type vmlinux EXPORT_SYMBOL
-+0x8c5e419b unregister_qdisc vmlinux EXPORT_SYMBOL
-+0xe3ebc041 phy_device_register vmlinux EXPORT_SYMBOL
-+0x7fd37e2b pci_map_rom vmlinux EXPORT_SYMBOL
-+0xdfef1b84 crypto_shash_finup vmlinux EXPORT_SYMBOL_GPL
-+0xb58965de crypto_shash_final vmlinux EXPORT_SYMBOL_GPL
-+0xea9ea6f1 crypto_ahash_finup vmlinux EXPORT_SYMBOL_GPL
-+0x34e42b95 crypto_ahash_final vmlinux EXPORT_SYMBOL_GPL
-+0x8da17b42 scatterwalk_copychunks vmlinux EXPORT_SYMBOL_GPL
-+0xf9d1164c rpc_free vmlinux EXPORT_SYMBOL_GPL
-+0xc78a46ea vm_insert_page vmlinux EXPORT_SYMBOL
-+0xad9cdfab register_console vmlinux EXPORT_SYMBOL
-+0x243c6e2f nf_conntrack_l4proto_tcp4 net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x227491cf sock_no_socketpair vmlinux EXPORT_SYMBOL
-+0x1a0cac4b input_ff_event vmlinux EXPORT_SYMBOL_GPL
-+0xb7e566f8 arpt_do_table net/ipv4/netfilter/arp_tables EXPORT_SYMBOL
-+0xdfcd2d6f dev_addr_del vmlinux EXPORT_SYMBOL
-+0x8631f469 gnet_stats_start_copy vmlinux EXPORT_SYMBOL
-+0x87a8ad19 nfs_retry_commit vmlinux EXPORT_SYMBOL_GPL
-+0x7aa1a681 tcp_tso_segment vmlinux EXPORT_SYMBOL
-+0x9620e18a i2c_lock_adapter vmlinux EXPORT_SYMBOL_GPL
-+0xd7ea90c8 platform_device_del vmlinux EXPORT_SYMBOL_GPL
-+0x1511ba61 platform_device_put vmlinux EXPORT_SYMBOL_GPL
-+0x3e96ee6c __fat_fs_error vmlinux EXPORT_SYMBOL_GPL
-+0xb741990c bio_copy_kern vmlinux EXPORT_SYMBOL
-+0xe0878bfe __krealloc vmlinux EXPORT_SYMBOL
-+0xd8605470 devm_free_irq vmlinux EXPORT_SYMBOL
-+0x995d1071 prof_on vmlinux EXPORT_SYMBOL_GPL
-+0xa652c4ef __kfifo_dma_in_prepare_r vmlinux EXPORT_SYMBOL
-+0xa662b253 task_nice vmlinux EXPORT_SYMBOL
-+0x4e9dffb5 ip_fast_csum vmlinux EXPORT_SYMBOL
-+0xb9524c5c rpc_exit vmlinux EXPORT_SYMBOL_GPL
-+0x5195426a kernel_accept vmlinux EXPORT_SYMBOL
-+0x1a26398f pcim_iounmap vmlinux EXPORT_SYMBOL
-+0x420ffdd5 kset_create_and_add vmlinux EXPORT_SYMBOL_GPL
-+0xc47933f9 mm_kobj vmlinux EXPORT_SYMBOL_GPL
-+0xd6d48dbb set_bdi_congested vmlinux EXPORT_SYMBOL
-+0x5d9c4677 xt_proto_fini vmlinux EXPORT_SYMBOL_GPL
-+0x481bf5f1 driver_find vmlinux EXPORT_SYMBOL_GPL
-+0xd461ba2e sg_miter_start vmlinux EXPORT_SYMBOL
-+0x4aef7e80 blk_queue_unprep_rq vmlinux EXPORT_SYMBOL
-+0x54b411de lock_may_read vmlinux EXPORT_SYMBOL
-+0xdbe4131c tty_mode_ioctl vmlinux EXPORT_SYMBOL_GPL
-+0x0dc5ceb6 load_nls vmlinux EXPORT_SYMBOL
-+0x4563a37d qe_setbrg vmlinux EXPORT_SYMBOL
-+0x4859b8bb rtc_year_days vmlinux EXPORT_SYMBOL
-+0x4d172ccb ehci_cf_port_reset_rwsem vmlinux EXPORT_SYMBOL_GPL
-+0x0c65e73c scsi_normalize_sense vmlinux EXPORT_SYMBOL
-+0xb65bd3fc add_timer_on vmlinux EXPORT_SYMBOL_GPL
-+0x7e17ba7b klist_iter_exit vmlinux EXPORT_SYMBOL_GPL
-+0xcbf1d339 ip6_local_out vmlinux EXPORT_SYMBOL_GPL
-+0x8818a3de pci_slots_kset vmlinux EXPORT_SYMBOL_GPL
-+0x215ebd78 bitrev16 vmlinux EXPORT_SYMBOL
-+0x390def22 kstrtou16_from_user vmlinux EXPORT_SYMBOL
-+0x9a74417e kstrtoull_from_user vmlinux EXPORT_SYMBOL
-+0x72b243d4 free_dma vmlinux EXPORT_SYMBOL
-+0x6e13f758 xdr_init_decode vmlinux EXPORT_SYMBOL_GPL
-+0xd072d7d2 device_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x30e54d7e crypto_aead_type vmlinux EXPORT_SYMBOL_GPL
-+0xafda2ff8 xfrm_state_add vmlinux EXPORT_SYMBOL
-+0xcbf4e023 mmc_cleanup_queue vmlinux EXPORT_SYMBOL
-+0xed23b4df nf_ct_l3proto_put net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x5b57fe3e scsicam_bios_param vmlinux EXPORT_SYMBOL
-+0x853adf25 single_release_net vmlinux EXPORT_SYMBOL_GPL
-+0xcd24efa3 I_BDEV vmlinux EXPORT_SYMBOL
-+0x74abdafa task_handoff_register vmlinux EXPORT_SYMBOL_GPL
-+0x68887e62 tty_port_tty_set vmlinux EXPORT_SYMBOL
-+0x5791030d tty_port_tty_get vmlinux EXPORT_SYMBOL
-+0x3441c3d6 gpio_set_value_cansleep vmlinux EXPORT_SYMBOL_GPL
-+0x6852cd21 seq_release_net vmlinux EXPORT_SYMBOL_GPL
-+0x3c0fca43 inet_csk_route_child_sock vmlinux EXPORT_SYMBOL_GPL
-+0x28c3aed9 phy_stop_interrupts vmlinux EXPORT_SYMBOL
-+0xea5974e8 vfs_path_lookup vmlinux EXPORT_SYMBOL
-+0x4790c5b9 find_or_create_page vmlinux EXPORT_SYMBOL
-+0x5b0d97e2 schedule_hrtimeout_range vmlinux EXPORT_SYMBOL_GPL
-+0xd8849ae7 usb_sg_init vmlinux EXPORT_SYMBOL_GPL
-+0x4af7e190 usb_sg_wait vmlinux EXPORT_SYMBOL_GPL
-+0xfaf32193 scsi_reset_provider vmlinux EXPORT_SYMBOL
-+0x115de368 crypto_register_pcomp vmlinux EXPORT_SYMBOL_GPL
-+0x3a47e130 invalidate_bdev vmlinux EXPORT_SYMBOL
-+0x9aeacb87 ring_buffer_iter_empty vmlinux EXPORT_SYMBOL_GPL
-+0x1f8cee61 tcp_twsk_unique vmlinux EXPORT_SYMBOL_GPL
-+0xd3984b47 netdev_info vmlinux EXPORT_SYMBOL
-+0x0ba0a26c mmc_try_claim_host vmlinux EXPORT_SYMBOL
-+0x11267875 scsi_extd_sense_format vmlinux EXPORT_SYMBOL
-+0xeefae453 xdr_buf_from_iov vmlinux EXPORT_SYMBOL_GPL
-+0x65b252e9 of_n_addr_cells vmlinux EXPORT_SYMBOL
-+0x0e3ead77 pci_bus_write_config_dword vmlinux EXPORT_SYMBOL
-+0xf18f172c __dev_printk vmlinux EXPORT_SYMBOL
-+0x9445ac6b tty_hung_up_p vmlinux EXPORT_SYMBOL
-+0x02e24269 blk_cleanup_queue vmlinux EXPORT_SYMBOL
-+0x24995a6b generic_setlease vmlinux EXPORT_SYMBOL
-+0x00372404 ipv6_getsockopt vmlinux EXPORT_SYMBOL
-+0xdc047fc4 scsi_dev_info_list_add_keyed vmlinux EXPORT_SYMBOL
-+0x06094818 pcim_enable_device vmlinux EXPORT_SYMBOL
-+0xf9091ce7 timerqueue_del vmlinux EXPORT_SYMBOL_GPL
-+0xc742c7f7 usb_driver_release_interface vmlinux EXPORT_SYMBOL_GPL
-+0xdaa3f256 swiotlb_unmap_sg vmlinux EXPORT_SYMBOL
-+0xbbfeb33c mpage_writepages vmlinux EXPORT_SYMBOL
-+0xe1b2b01a write_one_page vmlinux EXPORT_SYMBOL
-+0xd944d8f9 ktime_get_boottime vmlinux EXPORT_SYMBOL_GPL
-+0x15892417 async_synchronize_cookie vmlinux EXPORT_SYMBOL_GPL
-+0x04f58c37 inet_add_protocol vmlinux EXPORT_SYMBOL
-+0xd48581cf n_tty_ioctl_helper vmlinux EXPORT_SYMBOL
-+0x763793e1 nlmsvc_ops vmlinux EXPORT_SYMBOL_GPL
-+0xe01bf95f sync_blockdev vmlinux EXPORT_SYMBOL
-+0x4cae72a5 nobh_write_end vmlinux EXPORT_SYMBOL
-+0xb753bcc8 __ashrdi3 vmlinux EXPORT_SYMBOL
-+0xbd9e5d49 __lshrdi3 vmlinux EXPORT_SYMBOL
-+0x6e720ff2 rtnl_unlock vmlinux EXPORT_SYMBOL
-+0xfad6aff2 sock_rfree vmlinux EXPORT_SYMBOL
-+0x4c4d5c41 kernel_recvmsg vmlinux EXPORT_SYMBOL
-+0x9336642f sdhci_alloc_host vmlinux EXPORT_SYMBOL_GPL
-+0x809ed043 __root_device_register vmlinux EXPORT_SYMBOL_GPL
-+0xc0a3d105 find_next_bit vmlinux EXPORT_SYMBOL
-+0x7c43ef3e disk_part_iter_init vmlinux EXPORT_SYMBOL_GPL
-+0x2e3f5691 freeze_bdev vmlinux EXPORT_SYMBOL
-+0x5bff2a2d srcu_batches_completed vmlinux EXPORT_SYMBOL_GPL
-+0x515e24a7 flush_instruction_cache vmlinux EXPORT_SYMBOL
-+0x6e44d7eb ip_xfrm_me_harder vmlinux EXPORT_SYMBOL
-+0xd7f36357 __netdev_printk vmlinux EXPORT_SYMBOL
-+0xc1085178 skb_kill_datagram vmlinux EXPORT_SYMBOL
-+0x6d139e79 kfree_skb vmlinux EXPORT_SYMBOL
-+0x0d385349 kernel_kobj vmlinux EXPORT_SYMBOL_GPL
-+0x0d5b063c atomic_notifier_chain_register vmlinux EXPORT_SYMBOL_GPL
-+0x7ce0ae7c param_get_long vmlinux EXPORT_SYMBOL
-+0x96cbb2f4 inet_twsk_schedule vmlinux EXPORT_SYMBOL_GPL
-+0x79387c50 pci_msi_off vmlinux EXPORT_SYMBOL_GPL
-+0x31634792 nfnetlink_parse_nat_setup_hook net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xcc645e42 svc_set_num_threads vmlinux EXPORT_SYMBOL_GPL
-+0x11ba3f13 skb_copy_datagram_iovec vmlinux EXPORT_SYMBOL
-+0xf674ecb9 __kfree_skb vmlinux EXPORT_SYMBOL
-+0x476b6a01 get_mtd_device_nm vmlinux EXPORT_SYMBOL_GPL
-+0x55ceb682 pci_find_parent_resource vmlinux EXPORT_SYMBOL
-+0x6d69fa17 ip_defrag vmlinux EXPORT_SYMBOL
-+0x65b9b8a1 register_qdisc vmlinux EXPORT_SYMBOL
-+0x6eab6815 mmc_interrupt_hpi vmlinux EXPORT_SYMBOL
-+0x82feec40 mmc_can_discard vmlinux EXPORT_SYMBOL
-+0x0d9a9ca3 scsi_flush_work vmlinux EXPORT_SYMBOL_GPL
-+0x5b323547 sysdev_show_int vmlinux EXPORT_SYMBOL_GPL
-+0x11cf27a9 idr_destroy vmlinux EXPORT_SYMBOL
-+0xb857da73 ida_destroy vmlinux EXPORT_SYMBOL
-+0x58bd4122 generic_file_aio_read vmlinux EXPORT_SYMBOL
-+0x4596db6a sys_sigreturn vmlinux EXPORT_SYMBOL
-+0xa9571d6d DMA_MODE_WRITE vmlinux EXPORT_SYMBOL
-+0x80c07906 arpt_alloc_initial_table net/ipv4/netfilter/arp_tables EXPORT_SYMBOL_GPL
-+0x5013cc99 xprt_wait_for_buffer_space vmlinux EXPORT_SYMBOL_GPL
-+0x4379a238 free_netdev vmlinux EXPORT_SYMBOL
-+0xc9ec4e21 free_percpu vmlinux EXPORT_SYMBOL_GPL
-+0x966ae342 qe_issue_cmd vmlinux EXPORT_SYMBOL
-+0x191af13e gss_mech_get_by_pseudoflavor vmlinux EXPORT_SYMBOL_GPL
-+0x2764067e sk_setup_caps vmlinux EXPORT_SYMBOL_GPL
-+0x6696da6c spi_sync_locked vmlinux EXPORT_SYMBOL_GPL
-+0x2e89318f scsi_host_get vmlinux EXPORT_SYMBOL
-+0x668da8d5 zlib_inflateIncomp vmlinux EXPORT_SYMBOL
-+0xbcffe639 idr_pre_get vmlinux EXPORT_SYMBOL
-+0x4430c75c ida_pre_get vmlinux EXPORT_SYMBOL
-+0x28d664ff __raw_notifier_call_chain vmlinux EXPORT_SYMBOL_GPL
-+0x4d3c153f sigprocmask vmlinux EXPORT_SYMBOL
-+0xbafed486 sk_stream_wait_connect vmlinux EXPORT_SYMBOL
-+0x2d3dc22e mtd_concat_destroy vmlinux EXPORT_SYMBOL
-+0x4a3551ae do_mmap_pgoff vmlinux EXPORT_SYMBOL
-+0x8d551bef sysctl_tcp_rmem vmlinux EXPORT_SYMBOL
-+0x28053699 sock_no_sendmsg vmlinux EXPORT_SYMBOL
-+0x11dee08f i2c_master_recv vmlinux EXPORT_SYMBOL
-+0x8239ab90 vfs_unlink vmlinux EXPORT_SYMBOL
-+0x7d83ac1c key_revoke vmlinux EXPORT_SYMBOL
-+0x4e560ec4 pipe_unlock vmlinux EXPORT_SYMBOL
-+0x9f0020c3 xprt_reserve_xprt_cong vmlinux EXPORT_SYMBOL_GPL
-+0x777919af genlmsg_multicast_allns vmlinux EXPORT_SYMBOL
-+0xd0a074bc bus_rescan_devices vmlinux EXPORT_SYMBOL_GPL
-+0x1676e2aa put_tty_driver vmlinux EXPORT_SYMBOL
-+0x1655bb05 queue_work_on vmlinux EXPORT_SYMBOL_GPL
-+0x59d8223a ioport_resource vmlinux EXPORT_SYMBOL
-+0xc7a4fbed rtnl_lock vmlinux EXPORT_SYMBOL
-+0x73dc60ee debugfs_create_bool vmlinux EXPORT_SYMBOL_GPL
-+0x490c6774 generic_file_splice_read vmlinux EXPORT_SYMBOL
-+0xdd2efc0f ring_buffer_reset_cpu vmlinux EXPORT_SYMBOL_GPL
-+0x1e10f34d prepare_kernel_cred vmlinux EXPORT_SYMBOL
-+0x897473df mktime vmlinux EXPORT_SYMBOL
-+0x582a4747 cacheable_memcpy vmlinux EXPORT_SYMBOL
-+0x2288378f system_state vmlinux EXPORT_SYMBOL
-+0xbe28b63a xfrm6_tunnel_alloc_spi net/ipv6/xfrm6_tunnel EXPORT_SYMBOL
-+0x55e7d3c6 llc_add_pack vmlinux EXPORT_SYMBOL
-+0x725c25a5 hidinput_connect vmlinux EXPORT_SYMBOL_GPL
-+0x906e4ad5 splice_from_pipe_next vmlinux EXPORT_SYMBOL
-+0xc3fe87c8 param_ops_uint vmlinux EXPORT_SYMBOL
-+0x6f0036d9 del_timer_sync vmlinux EXPORT_SYMBOL
-+0xd3187da4 pcibios_align_resource vmlinux EXPORT_SYMBOL
-+0x00e8097b csum_partial_copy_fromiovecend vmlinux EXPORT_SYMBOL
-+0xda7c407f pci_device_from_OF_node vmlinux EXPORT_SYMBOL
-+0xb7ac4d23 __qdisc_calculate_pkt_len vmlinux EXPORT_SYMBOL
-+0x0aef6a87 dev_get_by_index vmlinux EXPORT_SYMBOL
-+0x8136020d mtd_do_chip_probe vmlinux EXPORT_SYMBOL
-+0x75d1b1a3 pci_enable_ido vmlinux EXPORT_SYMBOL
-+0x462a2e75 match_strlcpy vmlinux EXPORT_SYMBOL
-+0x9eaa0939 ioctl_by_bdev vmlinux EXPORT_SYMBOL
-+0x680b7306 init_net vmlinux EXPORT_SYMBOL
-+0x43db0e97 mmc_power_restore_host vmlinux EXPORT_SYMBOL
-+0x56dbc713 textsearch_find_continuous vmlinux EXPORT_SYMBOL
-+0xf0c9ee0d __next_cpu vmlinux EXPORT_SYMBOL
-+0x8741e2bf crypto_larval_lookup vmlinux EXPORT_SYMBOL_GPL
-+0x6b0bc2b4 __crypto_alloc_tfm vmlinux EXPORT_SYMBOL_GPL
-+0xf520946d key_unlink vmlinux EXPORT_SYMBOL
-+0xc746051c keyring_search vmlinux EXPORT_SYMBOL
-+0xd820c283 eventfd_ctx_remove_wait_queue vmlinux EXPORT_SYMBOL_GPL
-+0x4d89bb43 generic_delete_inode vmlinux EXPORT_SYMBOL
-+0xb5f17edf perf_register_guest_info_callbacks vmlinux EXPORT_SYMBOL_GPL
-+0xb99f2613 nf_nat_pptp_hook_expectfn net/netfilter/nf_conntrack_pptp EXPORT_SYMBOL_GPL
-+0x51fa9bbe mmc_wait_for_req vmlinux EXPORT_SYMBOL
-+0xd5b037e1 kref_put vmlinux EXPORT_SYMBOL
-+0xcf8bcc49 blk_run_queue vmlinux EXPORT_SYMBOL
-+0xf1814894 __secpath_destroy vmlinux EXPORT_SYMBOL
-+0x5ab518a3 i2c_smbus_write_i2c_block_data vmlinux EXPORT_SYMBOL
-+0xaf64ad0d zlib_deflate vmlinux EXPORT_SYMBOL
-+0x24fdac79 wake_bit_function vmlinux EXPORT_SYMBOL
-+0xe55658d4 inet_csk_route_req vmlinux EXPORT_SYMBOL_GPL
-+0xb6a61a86 qdisc_get_rtab vmlinux EXPORT_SYMBOL
-+0x87b6bcc7 hid_set_field vmlinux EXPORT_SYMBOL_GPL
-+0xb8d10b39 bus_remove_file vmlinux EXPORT_SYMBOL_GPL
-+0x91b9e2f2 locks_release_private vmlinux EXPORT_SYMBOL_GPL
-+0x06bbb24a mempool_resize vmlinux EXPORT_SYMBOL
-+0x739f99ed xfrm_unregister_km vmlinux EXPORT_SYMBOL
-+0xee4d52d7 in_dev_finish_destroy vmlinux EXPORT_SYMBOL
-+0xadd26e5f of_find_node_by_phandle vmlinux EXPORT_SYMBOL
-+0xe01c7326 hid_destroy_device vmlinux EXPORT_SYMBOL_GPL
-+0xe094ef39 sg_next vmlinux EXPORT_SYMBOL
-+0xe16a87dd bio_map_user vmlinux EXPORT_SYMBOL
-+0x0b07abe2 unshare_fs_struct vmlinux EXPORT_SYMBOL_GPL
-+0x3a746f01 smp_call_function_any vmlinux EXPORT_SYMBOL_GPL
-+0x3534e2a3 system_nrt_wq vmlinux EXPORT_SYMBOL_GPL
-+0xd0fb7cd4 __tasklet_hi_schedule_first vmlinux EXPORT_SYMBOL
-+0x3913cd81 __nf_conntrack_confirm net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xce24147c mdiobus_scan vmlinux EXPORT_SYMBOL
-+0xe4633d09 dmam_alloc_coherent vmlinux EXPORT_SYMBOL
-+0xab3a9f77 tty_port_carrier_raised vmlinux EXPORT_SYMBOL
-+0x58811a0b __brelse vmlinux EXPORT_SYMBOL
-+0xe68e5b43 pipe_lock vmlinux EXPORT_SYMBOL
-+0x7de53067 rpc_init_rtt vmlinux EXPORT_SYMBOL_GPL
-+0xe05b0141 scsi_device_set_state vmlinux EXPORT_SYMBOL
-+0x347fd4b3 eventfd_ctx_get vmlinux EXPORT_SYMBOL_GPL
-+0x941f2aaa eventfd_ctx_put vmlinux EXPORT_SYMBOL_GPL
-+0xd0d75837 mark_buffer_async_write vmlinux EXPORT_SYMBOL
-+0x46d12956 wait_for_completion_interruptible_timeout vmlinux EXPORT_SYMBOL
-+0x28e23139 xfrm_probe_algs vmlinux EXPORT_SYMBOL_GPL
-+0xf16deeae ip_route_me_harder vmlinux EXPORT_SYMBOL
-+0xb0463cdc inet_sock_destruct vmlinux EXPORT_SYMBOL
-+0xab462791 nf_reinject vmlinux EXPORT_SYMBOL
-+0x27ccd3d0 mmc_add_host vmlinux EXPORT_SYMBOL
-+0xd4664535 tty_chars_in_buffer vmlinux EXPORT_SYMBOL
-+0x3a9b6fb9 blk_unregister_region vmlinux EXPORT_SYMBOL
-+0xb72e0ba9 unregister_nls vmlinux EXPORT_SYMBOL
-+0x5358fc36 ring_buffer_discard_commit vmlinux EXPORT_SYMBOL_GPL
-+0x2b607170 ktime_sub_ns vmlinux EXPORT_SYMBOL_GPL
-+0xc17515d7 usb_hcds_loaded vmlinux EXPORT_SYMBOL_GPL
-+0x97e692df skb_pull_rcsum vmlinux EXPORT_SYMBOL_GPL
-+0x93055e19 __scsi_device_lookup_by_target vmlinux EXPORT_SYMBOL
-+0x01902adf netpoll_trap vmlinux EXPORT_SYMBOL
-+0x1a53c006 ethtool_invalid_flags vmlinux EXPORT_SYMBOL
-+0xebdbe48c radix_tree_gang_lookup vmlinux EXPORT_SYMBOL
-+0x07191aeb register_nls vmlinux EXPORT_SYMBOL
-+0x9445cf38 locks_alloc_lock vmlinux EXPORT_SYMBOL_GPL
-+0x6585e310 alloc_pages_exact_nid vmlinux EXPORT_SYMBOL
-+0x1627ed72 register_dcbevent_notifier vmlinux EXPORT_SYMBOL
-+0x62bc31e3 svc_prepare_thread vmlinux EXPORT_SYMBOL_GPL
-+0x3dee3f15 xfrm_state_lookup vmlinux EXPORT_SYMBOL
-+0x6c1c469c tcp_parse_options vmlinux EXPORT_SYMBOL
-+0xd5e04f9e rps_may_expire_flow vmlinux EXPORT_SYMBOL
-+0x2c1aaab6 of_gpio_simple_xlate vmlinux EXPORT_SYMBOL
-+0xf52be163 i2c_smbus_write_block_data vmlinux EXPORT_SYMBOL
-+0x71b46d5a svc_gss_principal vmlinux EXPORT_SYMBOL_GPL
-+0x6013246a rpc_unlink vmlinux EXPORT_SYMBOL_GPL
-+0x6f959b35 locks_in_grace vmlinux EXPORT_SYMBOL_GPL
-+0x2749fd92 module_refcount vmlinux EXPORT_SYMBOL
-+0xb1ac2e02 inet_ctl_sock_create vmlinux EXPORT_SYMBOL_GPL
-+0xdee5a777 dev_addr_add_multiple vmlinux EXPORT_SYMBOL
-+0x2f2c9199 firmware_kobj vmlinux EXPORT_SYMBOL_GPL
-+0x91696a6a pci_store_saved_state vmlinux EXPORT_SYMBOL_GPL
-+0x009653bb usb_lock_device_for_reset vmlinux EXPORT_SYMBOL_GPL
-+0xb95e4ac4 mdiobus_alloc vmlinux EXPORT_SYMBOL
-+0x31da061a get_qe_base vmlinux EXPORT_SYMBOL
-+0xa3e75545 flush_tlb_kernel_range vmlinux EXPORT_SYMBOL
-+0x371d2130 check_legacy_ioport vmlinux EXPORT_SYMBOL
-+0xbc8b4faf genl_register_mc_group vmlinux EXPORT_SYMBOL
-+0xb7ac5dda ___pskb_trim vmlinux EXPORT_SYMBOL
-+0xbaa1069f tty_driver_flush_buffer vmlinux EXPORT_SYMBOL
-+0x328b8594 pci_setup_cardbus vmlinux EXPORT_SYMBOL
-+0x85df9b6c strsep vmlinux EXPORT_SYMBOL
-+0x788fe103 iomem_resource vmlinux EXPORT_SYMBOL
-+0xe2d5255a strcmp vmlinux EXPORT_SYMBOL
-+0xea07d51b usb_serial_register vmlinux EXPORT_SYMBOL_GPL
-+0x355bc233 devm_kfree vmlinux EXPORT_SYMBOL_GPL
-+0x051fbdb5 mnt_unpin vmlinux EXPORT_SYMBOL
-+0x94da4dd0 end_writeback vmlinux EXPORT_SYMBOL
-+0x0e08028c vfs_create vmlinux EXPORT_SYMBOL
-+0x2e5fb132 mtd_erase_callback vmlinux EXPORT_SYMBOL_GPL
-+0x4b72a3d8 __ablkcipher_walk_complete vmlinux EXPORT_SYMBOL_GPL
-+0x750794d1 sb_min_blocksize vmlinux EXPORT_SYMBOL
-+0x59d696b6 register_module_notifier vmlinux EXPORT_SYMBOL
-+0xf3d30d7b setup_deferrable_timer_on_stack_key vmlinux EXPORT_SYMBOL_GPL
-+0xc7208c3a serial8250_resume_port vmlinux EXPORT_SYMBOL
-+0xc490d869 hid_input_report vmlinux EXPORT_SYMBOL_GPL
-+0xced3e4fb pcix_set_mmrbc vmlinux EXPORT_SYMBOL
-+0xaf91d89f __kernel_param_lock vmlinux EXPORT_SYMBOL
-+0xadd63611 unregister_sysctl_table vmlinux EXPORT_SYMBOL
-+0xd9e09e0c of_find_property vmlinux EXPORT_SYMBOL
-+0xb7bd1f4f del_gendisk vmlinux EXPORT_SYMBOL
-+0x54d4dba9 block_write_full_page vmlinux EXPORT_SYMBOL
-+0x70e009d6 machine_id vmlinux EXPORT_SYMBOL
-+0x2af8b550 nf_ct_invert_tuple net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xcc75ede8 xfrm_register_type vmlinux EXPORT_SYMBOL
-+0xf6933c48 lockd_up vmlinux EXPORT_SYMBOL_GPL
-+0x58652a56 fat_sync_inode vmlinux EXPORT_SYMBOL_GPL
-+0xe36816d8 put_mnt_ns vmlinux EXPORT_SYMBOL
-+0xe16e2b9f clear_bdi_congested vmlinux EXPORT_SYMBOL
-+0x1239f785 ____pagevec_lru_add vmlinux EXPORT_SYMBOL
-+0x8df5da63 memstart_addr vmlinux EXPORT_SYMBOL
-+0xd1cd3585 sock_no_setsockopt vmlinux EXPORT_SYMBOL
-+0x13435bdb sock_no_getsockopt vmlinux EXPORT_SYMBOL
-+0x6f0843c1 __blockdev_direct_IO vmlinux EXPORT_SYMBOL
-+0x1336c951 splice_from_pipe_end vmlinux EXPORT_SYMBOL
-+0x2261d711 migrate_page vmlinux EXPORT_SYMBOL
-+0x2e45e488 rcu_note_context_switch vmlinux EXPORT_SYMBOL_GPL
-+0x4ae11ab9 ip6_route_me_harder vmlinux EXPORT_SYMBOL
-+0x05bfdc15 thermal_zone_device_update vmlinux EXPORT_SYMBOL
-+0xe165d0ce nfs_commit_release_pages vmlinux EXPORT_SYMBOL_GPL
-+0x10d4e73e nf_nat_proto_range_to_nlattr net/ipv4/netfilter/nf_nat EXPORT_SYMBOL_GPL
-+0xee7d731d km_new_mapping vmlinux EXPORT_SYMBOL
-+0x408bf35b napi_complete vmlinux EXPORT_SYMBOL
-+0xa155dccc of_property_count_strings vmlinux EXPORT_SYMBOL_GPL
-+0x96d1f2a7 mmc_assume_removable vmlinux EXPORT_SYMBOL
-+0x47229b5c gpio_request vmlinux EXPORT_SYMBOL_GPL
-+0x3d0b6923 swiotlb_sync_single_for_cpu vmlinux EXPORT_SYMBOL
-+0x7f968718 generic_block_bmap vmlinux EXPORT_SYMBOL
-+0x868784cb __symbol_get vmlinux EXPORT_SYMBOL_GPL
-+0x36dc730d __ip_dev_find vmlinux EXPORT_SYMBOL
-+0xbe0e5118 nla_memcmp vmlinux EXPORT_SYMBOL
-+0xf1db1704 nla_memcpy vmlinux EXPORT_SYMBOL
-+0x8348bb59 nfs_put_client vmlinux EXPORT_SYMBOL_GPL
-+0xbca1e919 d_materialise_unique vmlinux EXPORT_SYMBOL_GPL
-+0xf229af8b kmem_cache_free vmlinux EXPORT_SYMBOL
-+0x617a2e8b file_remove_suid vmlinux EXPORT_SYMBOL
-+0x13b77367 get_cpu_device vmlinux EXPORT_SYMBOL_GPL
-+0x4ebf144b swiotlb_bounce vmlinux EXPORT_SYMBOL_GPL
-+0x5edd0762 bin2bcd vmlinux EXPORT_SYMBOL
-+0x2e9c1dbc lookup_hash vmlinux EXPORT_SYMBOL_GPL
-+0xaf2d872c prepare_to_wait vmlinux EXPORT_SYMBOL
-+0xadf42bd5 __request_region vmlinux EXPORT_SYMBOL
-+0xf71521ba atomic64_add_return vmlinux EXPORT_SYMBOL
-+0x5027f8ae bdev_read_only vmlinux EXPORT_SYMBOL
-+0xf0009fee put_pages_list vmlinux EXPORT_SYMBOL
-+0x3d043ff4 sock_wfree vmlinux EXPORT_SYMBOL
-+0x2b318955 test_set_page_writeback vmlinux EXPORT_SYMBOL
-+0xa3abc422 abort_exclusive_wait vmlinux EXPORT_SYMBOL
-+0x091eb9b4 round_jiffies vmlinux EXPORT_SYMBOL_GPL
-+0x86e66c33 gss_mech_get_by_OID vmlinux EXPORT_SYMBOL_GPL
-+0xc705dfbd qdisc_destroy vmlinux EXPORT_SYMBOL
-+0x5594be03 bitmap_remap vmlinux EXPORT_SYMBOL
-+0x23ef48a6 truncate_inode_pages vmlinux EXPORT_SYMBOL
-+0x0422fe4a inet_csk_timer_bug_msg vmlinux EXPORT_SYMBOL
-+0x58fea811 input_flush_device vmlinux EXPORT_SYMBOL
-+0x3b2b6b53 sysfs_notify vmlinux EXPORT_SYMBOL_GPL
-+0x0948cde9 num_physpages vmlinux EXPORT_SYMBOL
-+0x06295425 inet_hash vmlinux EXPORT_SYMBOL_GPL
-+0x9a1dfd65 strpbrk vmlinux EXPORT_SYMBOL
-+0x8734a5cd sysfs_create_file vmlinux EXPORT_SYMBOL_GPL
-+0xf6a14396 seq_lseek vmlinux EXPORT_SYMBOL
-+0xfb596d67 ip6_frag_match vmlinux EXPORT_SYMBOL
-+0xa9647a71 sdhci_add_host vmlinux EXPORT_SYMBOL_GPL
-+0xb53620d1 pci_vpd_find_info_keyword vmlinux EXPORT_SYMBOL_GPL
-+0x1551dc51 bitmap_find_free_region vmlinux EXPORT_SYMBOL
-+0x71fa908a cache_flush vmlinux EXPORT_SYMBOL_GPL
-+0xd582227a leds_list_lock vmlinux EXPORT_SYMBOL_GPL
-+0xe32cbdf9 set_disk_ro vmlinux EXPORT_SYMBOL
-+0xfc765c13 journal_invalidatepage vmlinux EXPORT_SYMBOL
-+0x4a541e7f bus_find_device vmlinux EXPORT_SYMBOL_GPL
-+0xfb814465 blk_rq_unprep_clone vmlinux EXPORT_SYMBOL_GPL
-+0xbb7929e0 relay_switch_subbuf vmlinux EXPORT_SYMBOL_GPL
-+0xa7a37016 rpc_create vmlinux EXPORT_SYMBOL_GPL
-+0x32d5e7fc xfrm_aalg_get_byid vmlinux EXPORT_SYMBOL_GPL
-+0x50661a88 tcp_create_openreq_child vmlinux EXPORT_SYMBOL
-+0xbe39e738 sk_common_release vmlinux EXPORT_SYMBOL
-+0x096bfc06 skb_queue_head vmlinux EXPORT_SYMBOL
-+0x03cfa4a0 skb_prepare_seq_read vmlinux EXPORT_SYMBOL
-+0x0ecca40e sk_reset_timer vmlinux EXPORT_SYMBOL
-+0x90c7fdae irq_get_irq_data vmlinux EXPORT_SYMBOL_GPL
-+0x4dfed71c flex_array_get_ptr vmlinux EXPORT_SYMBOL
-+0x98ed958c bio_alloc_bioset vmlinux EXPORT_SYMBOL
-+0x281bf2dd usb_driver_set_configuration vmlinux EXPORT_SYMBOL_GPL
-+0xb5c52e5f mii_ethtool_sset vmlinux EXPORT_SYMBOL
-+0x267fd50e mii_ethtool_gset vmlinux EXPORT_SYMBOL
-+0x3171d976 class_compat_create_link vmlinux EXPORT_SYMBOL_GPL
-+0xfee5e630 vfs_cancel_lock vmlinux EXPORT_SYMBOL_GPL
-+0xb602c57e nf_ct_l3proto_module_put net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x3f68a347 release_sock vmlinux EXPORT_SYMBOL
-+0xd2d51180 of_gpio_count vmlinux EXPORT_SYMBOL
-+0x50e7193a __i2c_first_dynamic_bus_num vmlinux EXPORT_SYMBOL_GPL
-+0xcf062b87 class_remove_file vmlinux EXPORT_SYMBOL_GPL
-+0xefdcf0e8 textsearch_destroy vmlinux EXPORT_SYMBOL
-+0x4610c824 of_phy_connect_fixed_link vmlinux EXPORT_SYMBOL
-+0xd71d1167 unmap_underlying_metadata vmlinux EXPORT_SYMBOL
-+0x7cd5feb0 sync_inode vmlinux EXPORT_SYMBOL
-+0xb859f38b krealloc vmlinux EXPORT_SYMBOL
-+0x46ece9e7 input_register_device vmlinux EXPORT_SYMBOL
-+0x50e787f3 __invalidate_device vmlinux EXPORT_SYMBOL
-+0x2ba707a8 sysctl_tcp_low_latency vmlinux EXPORT_SYMBOL
-+0x1163f0a7 blk_max_low_pfn vmlinux EXPORT_SYMBOL
-+0x06fd5926 blk_queue_free_tags vmlinux EXPORT_SYMBOL
-+0x3cca63a0 elv_unregister_queue vmlinux EXPORT_SYMBOL
-+0x67b78eb3 seq_hlist_next_rcu vmlinux EXPORT_SYMBOL
-+0x5a9effe0 register_sysctl_table vmlinux EXPORT_SYMBOL
-+0x7c9291d1 csum_partial_copy_generic vmlinux EXPORT_SYMBOL
-+0xb9a1c8b8 tty_flip_buffer_push vmlinux EXPORT_SYMBOL
-+0x929d7ef0 uart_get_divisor vmlinux EXPORT_SYMBOL
-+0x425c1c0b ktime_add_safe vmlinux EXPORT_SYMBOL_GPL
-+0xf9a482f9 msleep vmlinux EXPORT_SYMBOL
-+0x2786a8a5 unregister_netdev vmlinux EXPORT_SYMBOL
-+0xdaecbaf2 proc_net_mkdir vmlinux EXPORT_SYMBOL_GPL
-+0x832ad813 __bforget vmlinux EXPORT_SYMBOL
-+0xcd1dafbc __audit_inode_child vmlinux EXPORT_SYMBOL_GPL
-+0xaeffe8a2 xdr_reserve_space vmlinux EXPORT_SYMBOL_GPL
-+0xee4de802 inet6_add_protocol vmlinux EXPORT_SYMBOL
-+0xb0240e99 raw_unhash_sk vmlinux EXPORT_SYMBOL_GPL
-+0xb5be6114 xt_register_table vmlinux EXPORT_SYMBOL_GPL
-+0x9e43ccf6 sock_no_listen vmlinux EXPORT_SYMBOL
-+0x19990104 input_mt_destroy_slots vmlinux EXPORT_SYMBOL
-+0x882fd7db usb_serial_generic_unthrottle vmlinux EXPORT_SYMBOL_GPL
-+0x39d7bb0a usb_unpoison_anchored_urbs vmlinux EXPORT_SYMBOL_GPL
-+0x3ab69e8f scsi_device_lookup_by_target vmlinux EXPORT_SYMBOL
-+0x79aa04a2 get_random_bytes vmlinux EXPORT_SYMBOL
-+0xf0efa6e0 rpcauth_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x67e38cdf sdhci_get_of_property vmlinux EXPORT_SYMBOL_GPL
-+0x3c9390db pci_vpd_find_tag vmlinux EXPORT_SYMBOL_GPL
-+0xd38480a0 rb_augment_erase_end vmlinux EXPORT_SYMBOL
-+0xa474d088 blk_peek_request vmlinux EXPORT_SYMBOL
-+0x5cba6ab9 sock_no_poll vmlinux EXPORT_SYMBOL
-+0x2c36d879 sdio_unregister_driver vmlinux EXPORT_SYMBOL_GPL
-+0x055c8258 usb_serial_generic_close vmlinux EXPORT_SYMBOL_GPL
-+0x8896e0d3 blk_rq_prep_clone vmlinux EXPORT_SYMBOL_GPL
-+0xc55a9a33 crypto_alloc_shash vmlinux EXPORT_SYMBOL_GPL
-+0xc79bf957 crypto_alloc_ahash vmlinux EXPORT_SYMBOL_GPL
-+0x89cafb57 vlan_ioctl_set vmlinux EXPORT_SYMBOL
-+0xb75534fa of_alias_get_id vmlinux EXPORT_SYMBOL_GPL
-+0xc11d8093 iov_shorten vmlinux EXPORT_SYMBOL
-+0x6a037cf1 mempool_kfree vmlinux EXPORT_SYMBOL
-+0xcf29542b scsi_scan_target vmlinux EXPORT_SYMBOL
-+0xfda88943 subsys_dev_iter_init vmlinux EXPORT_SYMBOL_GPL
-+0x27715359 subsys_dev_iter_exit vmlinux EXPORT_SYMBOL_GPL
-+0xf0ef15b4 list_sort vmlinux EXPORT_SYMBOL
-+0x71d0143a remove_arg_zero vmlinux EXPORT_SYMBOL
-+0x328c1012 remap_pfn_range vmlinux EXPORT_SYMBOL
-+0x52760ca9 getnstimeofday vmlinux EXPORT_SYMBOL
-+0xd1cc986f phy_register_fixup vmlinux EXPORT_SYMBOL
-+0xf55a56b6 device_bind_driver vmlinux EXPORT_SYMBOL_GPL
-+0x0b137c47 device_store_ulong vmlinux EXPORT_SYMBOL_GPL
-+0xe5c97713 pci_vpd_truncate vmlinux EXPORT_SYMBOL
-+0x294da23e skcipher_geniv_exit vmlinux EXPORT_SYMBOL_GPL
-+0x11eaefc3 file_update_time vmlinux EXPORT_SYMBOL
-+0x529c370a bdi_unregister vmlinux EXPORT_SYMBOL
-+0xae946285 inet6_csk_search_req vmlinux EXPORT_SYMBOL_GPL
-+0x04dfc4d6 dev_mc_init vmlinux EXPORT_SYMBOL
-+0x88c994d7 dev_uc_init vmlinux EXPORT_SYMBOL
-+0x865029ac __hw_addr_sync vmlinux EXPORT_SYMBOL
-+0x5f46d244 of_irq_map_raw vmlinux EXPORT_SYMBOL_GPL
-+0x0e516b0a scsi_setup_blk_pc_cmnd vmlinux EXPORT_SYMBOL
-+0x11a13e31 _kstrtol vmlinux EXPORT_SYMBOL
-+0xc72d33bf mb_cache_entry_alloc vmlinux EXPORT_SYMBOL
-+0x0d8d877a relay_file_operations vmlinux EXPORT_SYMBOL_GPL
-+0x132a7a5b init_timer_key vmlinux EXPORT_SYMBOL
-+0xa473aea0 rpc_wake_up_status vmlinux EXPORT_SYMBOL_GPL
-+0xf39bf4d9 put_cmsg vmlinux EXPORT_SYMBOL
-+0xe5dd0af1 skb_free_datagram vmlinux EXPORT_SYMBOL
-+0x14d5945d of_fdt_unflatten_tree vmlinux EXPORT_SYMBOL_GPL
-+0xe8790d79 pci_wake_from_d3 vmlinux EXPORT_SYMBOL
-+0x0e23fb6a filp_close vmlinux EXPORT_SYMBOL
-+0xb9b1637c truncate_setsize vmlinux EXPORT_SYMBOL
-+0x44bcfa6d system_nrt_freezable_wq vmlinux EXPORT_SYMBOL_GPL
-+0x39cdf63c wait_for_completion_interruptible vmlinux EXPORT_SYMBOL
-+0x86333584 svcauth_gss_flavor vmlinux EXPORT_SYMBOL_GPL
-+0x8d1a827e svcauth_gss_register_pseudoflavor vmlinux EXPORT_SYMBOL_GPL
-+0x38fb9933 tty_std_termios vmlinux EXPORT_SYMBOL
-+0x38320348 generic_readlink vmlinux EXPORT_SYMBOL
-+0xe2e0c7c6 __flush_icache_range vmlinux EXPORT_SYMBOL
-+0x33b2d26d ether_setup vmlinux EXPORT_SYMBOL
-+0xd200c6d4 usb_deregister_device_driver vmlinux EXPORT_SYMBOL_GPL
-+0x889b7ccd device_create_file vmlinux EXPORT_SYMBOL_GPL
-+0x610d2493 __break_lease vmlinux EXPORT_SYMBOL
-+0x5330e4ea get_task_comm vmlinux EXPORT_SYMBOL_GPL
-+0xba464a1d __get_vm_area vmlinux EXPORT_SYMBOL_GPL
-+0x7a1390f7 param_set_bool vmlinux EXPORT_SYMBOL
-+0x034f9e73 param_ops_byte vmlinux EXPORT_SYMBOL
-+0xc88f3891 xprt_free vmlinux EXPORT_SYMBOL_GPL
-+0x8ab4079e atomic64_add vmlinux EXPORT_SYMBOL
-+0xc5f46566 rb_augment_insert vmlinux EXPORT_SYMBOL
-+0xb0520bf3 would_dump vmlinux EXPORT_SYMBOL
-+0x4a20d82f truncate_inode_pages_range vmlinux EXPORT_SYMBOL
-+0x0f62d3b5 force_sig vmlinux EXPORT_SYMBOL
-+0xd0417995 pci_set_dma_max_seg_size vmlinux EXPORT_SYMBOL
-+0x05240ee7 percpu_counter_batch vmlinux EXPORT_SYMBOL
-+0xe3646dbc d_path vmlinux EXPORT_SYMBOL
-+0x116ccd8c vfs_fstatat vmlinux EXPORT_SYMBOL
-+0x2228a27e sdev_evt_send vmlinux EXPORT_SYMBOL_GPL
-+0x175adc1b igrab vmlinux EXPORT_SYMBOL
-+0x9d95a606 rtnl_notify vmlinux EXPORT_SYMBOL
-+0xc0e1c9dd __rtnl_link_register vmlinux EXPORT_SYMBOL_GPL
-+0xf1c8f28f sock_recvmsg vmlinux EXPORT_SYMBOL
-+0xcb649c67 mmc_can_secure_erase_trim vmlinux EXPORT_SYMBOL
-+0x83ba622a usb_hcd_unmap_urb_for_dma vmlinux EXPORT_SYMBOL_GPL
-+0x5bf0f5f6 pci_back_from_sleep vmlinux EXPORT_SYMBOL
-+0x0c62cfe7 blk_end_request_err vmlinux EXPORT_SYMBOL_GPL
-+0x59d1c938 blk_end_request_all vmlinux EXPORT_SYMBOL
-+0x9dba46f5 blk_queue_bio vmlinux EXPORT_SYMBOL_GPL
-+0xd16712f3 crypto_check_attr_type vmlinux EXPORT_SYMBOL_GPL
-+0x6a80a3f5 cpm_muram_free vmlinux EXPORT_SYMBOL
-+0x8c0279d5 nf_ct_l3protos net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x8b63beee linkwatch_fire_event vmlinux EXPORT_SYMBOL
-+0xd3505d0c ndisc_build_skb vmlinux EXPORT_SYMBOL
-+0x1598dc9d unregister_netevent_notifier vmlinux EXPORT_SYMBOL_GPL
-+0xb2dc7101 input_mt_report_slot_state vmlinux EXPORT_SYMBOL
-+0xcf0c65bc scsi_init_io vmlinux EXPORT_SYMBOL
-+0x8307be63 rpc_queue_upcall vmlinux EXPORT_SYMBOL_GPL
-+0xdb484b6d sdhci_remove_host vmlinux EXPORT_SYMBOL_GPL
-+0x25b7fdec fib_default_rule_pref vmlinux EXPORT_SYMBOL
-+0x12b20fd2 swiotlb_sync_single_for_device vmlinux EXPORT_SYMBOL
-+0x6531a053 debugfs_create_x8 vmlinux EXPORT_SYMBOL_GPL
-+0x03070efa of_scan_pci_bridge vmlinux EXPORT_SYMBOL
-+0x6796dc42 uart_write_wakeup vmlinux EXPORT_SYMBOL
-+0xc1e35bf5 pci_bus_read_config_word vmlinux EXPORT_SYMBOL
-+0x0c081027 skb_append vmlinux EXPORT_SYMBOL
-+0x1aec4408 read_cache_page_gfp vmlinux EXPORT_SYMBOL
-+0x9fc89fd1 schedule_delayed_work_on vmlinux EXPORT_SYMBOL
-+0xe3319fe9 sk_stream_error vmlinux EXPORT_SYMBOL
-+0xeef4a738 usb_stor_CB_reset vmlinux EXPORT_SYMBOL_GPL
-+0x6332cc1a audit_log_start vmlinux EXPORT_SYMBOL
-+0x1330b831 netdev_crit vmlinux EXPORT_SYMBOL
-+0x5651005a sysfs_create_files vmlinux EXPORT_SYMBOL_GPL
-+0x27f4a872 sget vmlinux EXPORT_SYMBOL
-+0x5f754e5a memset vmlinux EXPORT_SYMBOL
-+0x5ca89b3d mtd_kmalloc_up_to vmlinux EXPORT_SYMBOL_GPL
-+0xdc3fcbc9 __sw_hweight8 vmlinux EXPORT_SYMBOL
-+0x02ee26c1 free_pages_exact vmlinux EXPORT_SYMBOL
-+0x95edd27e tasklet_hrtimer_init vmlinux EXPORT_SYMBOL_GPL
-+0x064db9a5 mark_mounts_for_expiry vmlinux EXPORT_SYMBOL_GPL
-+0xacfd81f6 work_cpu vmlinux EXPORT_SYMBOL_GPL
-+0xbc316de4 tty_termios_input_baud_rate vmlinux EXPORT_SYMBOL
-+0x0537dc03 d_set_d_op vmlinux EXPORT_SYMBOL
-+0x2e47f677 xfrm_aalg_get_byidx vmlinux EXPORT_SYMBOL_GPL
-+0x5577ef9e udp_table vmlinux EXPORT_SYMBOL
-+0x70bcb245 mmc_erase_group_aligned vmlinux EXPORT_SYMBOL
-+0xb24c2db9 idr_get_new_above vmlinux EXPORT_SYMBOL
-+0x9704e93a ida_get_new_above vmlinux EXPORT_SYMBOL
-+0x2e2f1740 ring_buffer_record_disable_cpu vmlinux EXPORT_SYMBOL_GPL
-+0xa1a8f438 transport_configure_device vmlinux EXPORT_SYMBOL_GPL
-+0xbd903883 nla_put vmlinux EXPORT_SYMBOL
-+0x429bdb0b revalidate_disk vmlinux EXPORT_SYMBOL
-+0x72e50086 vm_stat vmlinux EXPORT_SYMBOL
-+0xd5b1376d register_shrinker vmlinux EXPORT_SYMBOL
-+0xf23fcb99 __kfifo_in vmlinux EXPORT_SYMBOL
-+0x38abcc37 get_immrbase vmlinux EXPORT_SYMBOL
-+0x624a6406 hwrng_register vmlinux EXPORT_SYMBOL_GPL
-+0xfa21edf6 misc_register vmlinux EXPORT_SYMBOL
-+0x5d558bfa block_invalidatepage vmlinux EXPORT_SYMBOL
-+0x2c793286 may_umount_tree vmlinux EXPORT_SYMBOL
-+0x206687ad cpm_muram_alloc_fixed vmlinux EXPORT_SYMBOL
-+0x9cedf6bd dma_direct_ops vmlinux EXPORT_SYMBOL
-+0x636b12c8 nf_nat_need_gre net/ipv4/netfilter/nf_nat_proto_gre EXPORT_SYMBOL_GPL
-+0x0150a066 udp_lib_get_port vmlinux EXPORT_SYMBOL
-+0x7b590ac8 skb_defer_rx_timestamp vmlinux EXPORT_SYMBOL_GPL
-+0x594b398f tty_ldisc_ref vmlinux EXPORT_SYMBOL_GPL
-+0x68d241c1 devm_ioport_map vmlinux EXPORT_SYMBOL
-+0x17ce645d locks_end_grace vmlinux EXPORT_SYMBOL_GPL
-+0xc3b2d983 rtnl_af_unregister vmlinux EXPORT_SYMBOL_GPL
-+0xbfee3ad5 loop_unregister_transfer vmlinux EXPORT_SYMBOL
-+0x43d497ca class_dev_iter_exit vmlinux EXPORT_SYMBOL_GPL
-+0x7064d556 iget_failed vmlinux EXPORT_SYMBOL
-+0xc3880471 xdr_decode_netobj vmlinux EXPORT_SYMBOL_GPL
-+0x25c677c4 mac_pton vmlinux EXPORT_SYMBOL
-+0x99caf7d2 ethtool_op_set_tso vmlinux EXPORT_SYMBOL
-+0xc94c34d0 mmc_cache_ctrl vmlinux EXPORT_SYMBOL
-+0x22258364 pci_restore_state vmlinux EXPORT_SYMBOL
-+0x1d16856b filemap_fdatawait_range vmlinux EXPORT_SYMBOL
-+0xc9833005 skb_complete_tx_timestamp vmlinux EXPORT_SYMBOL_GPL
-+0x65b82e1f usb_enable_xhci_ports vmlinux EXPORT_SYMBOL_GPL
-+0xa7ddce90 inode_sub_bytes vmlinux EXPORT_SYMBOL
-+0x0395d6d3 inode_set_bytes vmlinux EXPORT_SYMBOL
-+0x2bd8303c svc_unreg_xprt_class vmlinux EXPORT_SYMBOL_GPL
-+0xc59f0fc7 arp_xmit vmlinux EXPORT_SYMBOL
-+0x9cb92c72 __dev_getfirstbyhwtype vmlinux EXPORT_SYMBOL
-+0xccc53d95 __dev_get_by_index vmlinux EXPORT_SYMBOL
-+0xa41a68b5 usb_serial_generic_write vmlinux EXPORT_SYMBOL_GPL
-+0xabe0867d mdiobus_register vmlinux EXPORT_SYMBOL
-+0xaa5fb7af pci_release_selected_regions vmlinux EXPORT_SYMBOL
-+0x6c665691 flex_array_shrink vmlinux EXPORT_SYMBOL
-+0xcc17504d _raw_read_unlock_irqrestore vmlinux EXPORT_SYMBOL
-+0xedcf6be4 qword_add vmlinux EXPORT_SYMBOL_GPL
-+0x9fc77642 __inet6_lookup_established vmlinux EXPORT_SYMBOL
-+0x001b7570 skb_recycle vmlinux EXPORT_SYMBOL
-+0x4b54f71e sdio_claim_host vmlinux EXPORT_SYMBOL_GPL
-+0x7ca60166 __nla_put_nohdr vmlinux EXPORT_SYMBOL
-+0x34d8298e bdi_init vmlinux EXPORT_SYMBOL
-+0x889c066f flush_tlb_page vmlinux EXPORT_SYMBOL
-+0x40973662 sysctl_udp_mem vmlinux EXPORT_SYMBOL
-+0x17df17bc sysctl_tcp_ecn vmlinux EXPORT_SYMBOL
-+0xa0ebd14c sysctl_tcp_mem vmlinux EXPORT_SYMBOL
-+0xc94834cd ethtool_op_set_tx_csum vmlinux EXPORT_SYMBOL
-+0x669a989a inet_csk_accept vmlinux EXPORT_SYMBOL
-+0xc0574cac inet_hash_connect vmlinux EXPORT_SYMBOL_GPL
-+0x74d6ceef generic_mii_ioctl vmlinux EXPORT_SYMBOL
-+0x0334da4e scsi_command_size_tbl vmlinux EXPORT_SYMBOL
-+0xb58dcfa2 synchronize_sched_expedited vmlinux EXPORT_SYMBOL_GPL
-+0xa18106f8 xprt_wake_pending_tasks vmlinux EXPORT_SYMBOL_GPL
-+0x35e5a105 usb_bulk_msg vmlinux EXPORT_SYMBOL_GPL
-+0x1bb9d4e9 xfrm_state_delete_tunnel vmlinux EXPORT_SYMBOL
-+0x03198068 platform_device_add_resources vmlinux EXPORT_SYMBOL_GPL
-+0x0a5cfbc7 in6_dev_finish_destroy vmlinux EXPORT_SYMBOL
-+0x909a1b12 tcp_gro_receive vmlinux EXPORT_SYMBOL
-+0xa9f90244 eth_header vmlinux EXPORT_SYMBOL
-+0xdacdd5df scsi_rescan_device vmlinux EXPORT_SYMBOL
-+0x8f48679a rb_prev vmlinux EXPORT_SYMBOL
-+0x56653400 user_match vmlinux EXPORT_SYMBOL_GPL
-+0x21c5a2e1 request_key_async_with_auxdata vmlinux EXPORT_SYMBOL
-+0x2a20e3db bd_unlink_disk_holder vmlinux EXPORT_SYMBOL_GPL
-+0xea065e01 task_handoff_unregister vmlinux EXPORT_SYMBOL_GPL
-+0xfbcac494 down_killable vmlinux EXPORT_SYMBOL
-+0x83f383cb napi_gro_receive vmlinux EXPORT_SYMBOL
-+0x2750609c pci_reset_function vmlinux EXPORT_SYMBOL_GPL
-+0x05eb2ed0 nf_unregister_queue_handler vmlinux EXPORT_SYMBOL
-+0x24eb7e32 leds_list vmlinux EXPORT_SYMBOL_GPL
-+0x7b6a7955 tcp_v4_tw_get_peer vmlinux EXPORT_SYMBOL
-+0x34a52594 dev_get_by_flags_rcu vmlinux EXPORT_SYMBOL
-+0x7647726c handle_sysrq vmlinux EXPORT_SYMBOL
-+0xea3f9431 pcie_port_bus_type vmlinux EXPORT_SYMBOL_GPL
-+0x996bdb64 _kstrtoul vmlinux EXPORT_SYMBOL
-+0x7f859c50 __block_write_begin vmlinux EXPORT_SYMBOL
-+0x1cc6719a register_reboot_notifier vmlinux EXPORT_SYMBOL
-+0xf5c9012e timespec_trunc vmlinux EXPORT_SYMBOL
-+0x2b5c303b smp_send_reschedule vmlinux EXPORT_SYMBOL_GPL
-+0x5e15425b tcp_sockets_allocated vmlinux EXPORT_SYMBOL
-+0xcc167694 inode_owner_or_capable vmlinux EXPORT_SYMBOL
-+0x079a369f generic_pipe_buf_confirm vmlinux EXPORT_SYMBOL
-+0xc1eecd72 scsi_device_quiesce vmlinux EXPORT_SYMBOL
-+0x9748927f _outsw_ns vmlinux EXPORT_SYMBOL
-+0xfbfddf0b pci_select_bars vmlinux EXPORT_SYMBOL
-+0xf184d189 kernel_power_off vmlinux EXPORT_SYMBOL_GPL
-+0x84d095a1 ip6t_unregister_table net/ipv6/netfilter/ip6_tables EXPORT_SYMBOL
-+0xdc3ed1f8 svc_create_pooled vmlinux EXPORT_SYMBOL_GPL
-+0xcb1fe4f5 genl_register_ops vmlinux EXPORT_SYMBOL
-+0x544b760f tty_ldisc_ref_wait vmlinux EXPORT_SYMBOL_GPL
-+0x310a0a1b debugfs_create_u64 vmlinux EXPORT_SYMBOL_GPL
-+0x9f915995 block_commit_write vmlinux EXPORT_SYMBOL
-+0x87e86028 __netdev_alloc_skb vmlinux EXPORT_SYMBOL
-+0xfec3c2f2 bcd2bin vmlinux EXPORT_SYMBOL
-+0x5d631b05 journal_get_undo_access vmlinux EXPORT_SYMBOL
-+0x1fc9cb5b perf_event_create_kernel_counter vmlinux EXPORT_SYMBOL_GPL
-+0x90ff6c9f nf_ct_invert_tuplepr net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xe1a5b39b tty_kref_put vmlinux EXPORT_SYMBOL
-+0x60d768c8 locks_delete_block vmlinux EXPORT_SYMBOL
-+0x8eec5353 dput vmlinux EXPORT_SYMBOL
-+0x1314f71a is_container_init vmlinux EXPORT_SYMBOL
-+0x5bd26000 rpc_proc_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x66df8787 rpc_delay vmlinux EXPORT_SYMBOL_GPL
-+0xbefd162c fill_inquiry_response vmlinux EXPORT_SYMBOL_GPL
-+0xc4536e19 usb_match_one_id vmlinux EXPORT_SYMBOL_GPL
-+0xd1e93218 srcu_notifier_call_chain vmlinux EXPORT_SYMBOL_GPL
-+0xe46682b1 sk_free vmlinux EXPORT_SYMBOL
-+0xcacd6472 scsi_is_sdev_device vmlinux EXPORT_SYMBOL
-+0x50f5d9f6 pci_bus_max_busnr vmlinux EXPORT_SYMBOL_GPL
-+0xaaa286ec kobject_init vmlinux EXPORT_SYMBOL
-+0x42160169 flush_workqueue vmlinux EXPORT_SYMBOL_GPL
-+0x4b7ed27b sleep_on vmlinux EXPORT_SYMBOL
-+0x331ac747 key_type_user vmlinux EXPORT_SYMBOL_GPL
-+0x80bd6f7b bio_flush_dcache_pages vmlinux EXPORT_SYMBOL
-+0xaf4e1072 simple_lookup vmlinux EXPORT_SYMBOL
-+0xec4769ef qe_clock_source vmlinux EXPORT_SYMBOL
-+0xf78d04ab netlink_register_notifier vmlinux EXPORT_SYMBOL
-+0xf8a70670 usb_match_id vmlinux EXPORT_SYMBOL_GPL
-+0x9be8ead9 xfrm_policy_insert vmlinux EXPORT_SYMBOL
-+0xf360c71e __netpoll_cleanup vmlinux EXPORT_SYMBOL_GPL
-+0x1bdf3140 skb_segment vmlinux EXPORT_SYMBOL_GPL
-+0x184b82fb mmc_vddrange_to_ocrmask vmlinux EXPORT_SYMBOL
-+0x9d02a2b9 usb_add_hcd vmlinux EXPORT_SYMBOL_GPL
-+0x88355cbb blk_queue_max_segments vmlinux EXPORT_SYMBOL
-+0x3d8aa9cd unlock_rename vmlinux EXPORT_SYMBOL
-+0x1983094e fsl_lbc_ctrl_dev vmlinux EXPORT_SYMBOL
-+0x2406dae3 pci_address_to_pio vmlinux EXPORT_SYMBOL_GPL
-+0xe771423f tcp_init_congestion_ops vmlinux EXPORT_SYMBOL_GPL
-+0xa7c0801f dev_gro_receive vmlinux EXPORT_SYMBOL
-+0x5732e368 skb_push vmlinux EXPORT_SYMBOL
-+0xbeb96094 sdio_f0_writeb vmlinux EXPORT_SYMBOL_GPL
-+0x70033701 device_create vmlinux EXPORT_SYMBOL_GPL
-+0x6848d183 blk_run_queue_async vmlinux EXPORT_SYMBOL
-+0x09949de0 simple_rmdir vmlinux EXPORT_SYMBOL
-+0xd28b05ff alloc_file vmlinux EXPORT_SYMBOL
-+0xfefb0432 free_task vmlinux EXPORT_SYMBOL
-+0x4a9eefcb i2c_del_adapter vmlinux EXPORT_SYMBOL
-+0x5838f6c9 rtc_valid_tm vmlinux EXPORT_SYMBOL
-+0xdcb944af usb_register_driver vmlinux EXPORT_SYMBOL_GPL
-+0xbcda8829 scsi_block_requests vmlinux EXPORT_SYMBOL
-+0xaa8a0279 sysfs_get vmlinux EXPORT_SYMBOL_GPL
-+0x543ef284 seq_hlist_start vmlinux EXPORT_SYMBOL
-+0x96573b80 __kfifo_dma_in_finish_r vmlinux EXPORT_SYMBOL
-+0xe2f01afd mmc_release_host vmlinux EXPORT_SYMBOL
-+0x3a374dcf fat_dir_empty vmlinux EXPORT_SYMBOL_GPL
-+0x74cbb34b __getblk vmlinux EXPORT_SYMBOL
-+0xd2f64b53 cdev_alloc vmlinux EXPORT_SYMBOL
-+0xfb853c2c rpc_put_task_async vmlinux EXPORT_SYMBOL_GPL
-+0x42d56457 usb_hcd_unlink_urb_from_ep vmlinux EXPORT_SYMBOL_GPL
-+0xc48ee272 dev_warn vmlinux EXPORT_SYMBOL
-+0xab3d1f95 nf_ct_untracked_status_or net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x9cedcd62 get_phy_device vmlinux EXPORT_SYMBOL
-+0x74c134b9 __sw_hweight32 vmlinux EXPORT_SYMBOL
-+0x57674fd7 __sw_hweight16 vmlinux EXPORT_SYMBOL
-+0x9f46ced8 __sw_hweight64 vmlinux EXPORT_SYMBOL
-+0xad0a6e0a flex_array_prealloc vmlinux EXPORT_SYMBOL
-+0x93215e1d __kfifo_skip_r vmlinux EXPORT_SYMBOL
-+0xa5377e1f svc_exit_thread vmlinux EXPORT_SYMBOL_GPL
-+0x137b3ec2 pagevec_lookup_tag vmlinux EXPORT_SYMBOL
-+0x67053080 current_kernel_time vmlinux EXPORT_SYMBOL
-+0x3e187f83 print_tuple net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x4ef191e6 tcp_reno_cong_avoid vmlinux EXPORT_SYMBOL_GPL
-+0x5a744b86 netlink_set_nonroot vmlinux EXPORT_SYMBOL
-+0x82942563 usb_reset_device vmlinux EXPORT_SYMBOL_GPL
-+0x7505bdef memchr_inv vmlinux EXPORT_SYMBOL
-+0x1223591c locks_copy_lock vmlinux EXPORT_SYMBOL
-+0xaa413a43 gnet_stats_start_copy_compat vmlinux EXPORT_SYMBOL
-+0x1029fa00 rtc_alarm_irq_enable vmlinux EXPORT_SYMBOL_GPL
-+0x785f307d pcim_iounmap_regions vmlinux EXPORT_SYMBOL
-+0x7522f3ba irq_modify_status vmlinux EXPORT_SYMBOL_GPL
-+0x52ccfd70 dcbnl_ieee_notify vmlinux EXPORT_SYMBOL
-+0xbfd69829 inet6_del_protocol vmlinux EXPORT_SYMBOL
-+0x753e1c04 xfrm_input_resume vmlinux EXPORT_SYMBOL
-+0xde22dda4 udplite_prot vmlinux EXPORT_SYMBOL
-+0xf19b1812 sock_create_kern vmlinux EXPORT_SYMBOL
-+0x76b656be scsi_eh_restore_cmnd vmlinux EXPORT_SYMBOL
-+0x00b8174b transport_remove_device vmlinux EXPORT_SYMBOL_GPL
-+0x8260686f bitmap_find_next_zero_area vmlinux EXPORT_SYMBOL
-+0x4a487484 i2c_del_mux_adapter vmlinux EXPORT_SYMBOL_GPL
-+0x74cda2a1 sk_detach_filter vmlinux EXPORT_SYMBOL_GPL
-+0xf1734ac9 sk_attach_filter vmlinux EXPORT_SYMBOL_GPL
-+0x77bebd69 pci_unregister_driver vmlinux EXPORT_SYMBOL
-+0xf741c793 zlib_deflateEnd vmlinux EXPORT_SYMBOL
-+0x7469fcfe radix_tree_tagged vmlinux EXPORT_SYMBOL
-+0x59659594 unload_nls vmlinux EXPORT_SYMBOL
-+0x25673182 seq_open_private vmlinux EXPORT_SYMBOL
-+0xe9d6801d sunrpc_cache_update vmlinux EXPORT_SYMBOL_GPL
-+0xec56166e skb_gso_segment vmlinux EXPORT_SYMBOL
-+0x4e128338 kernel_listen vmlinux EXPORT_SYMBOL
-+0x76bf656d __bitmap_shift_left vmlinux EXPORT_SYMBOL
-+0x291fef69 gss_mech_get vmlinux EXPORT_SYMBOL_GPL
-+0x6713b9ea napi_skb_finish vmlinux EXPORT_SYMBOL
-+0xdb9433e3 __scsi_device_lookup vmlinux EXPORT_SYMBOL
-+0xe23ae481 blk_iopoll_complete vmlinux EXPORT_SYMBOL
-+0xb11b4eca crypto_chain vmlinux EXPORT_SYMBOL_GPL
-+0x9d669763 memcpy vmlinux EXPORT_SYMBOL
-+0x03a5674f ip6t_do_table net/ipv6/netfilter/ip6_tables EXPORT_SYMBOL
-+0x86ed218d rpc_run_task vmlinux EXPORT_SYMBOL_GPL
-+0x43a0458b blk_start_plug vmlinux EXPORT_SYMBOL
-+0xa67752f3 bdevname vmlinux EXPORT_SYMBOL
-+0x3d4d9f3c cdev_init vmlinux EXPORT_SYMBOL
-+0xbe63ee40 request_resource vmlinux EXPORT_SYMBOL
-+0x697cbbb4 threads_per_core vmlinux EXPORT_SYMBOL_GPL
-+0xc24dd028 nf_ct_expect_init net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x98ed718a inet_getname vmlinux EXPORT_SYMBOL
-+0xe7609b0d generate_netlink_event vmlinux EXPORT_SYMBOL
-+0x85e7deb2 iov_iter_fault_in_readable vmlinux EXPORT_SYMBOL
-+0x15e9ff97 module_mutex vmlinux EXPORT_SYMBOL_GPL
-+0xf5a62ecc _memset_io vmlinux EXPORT_SYMBOL
-+0x7c1ac45d put_mtd_device vmlinux EXPORT_SYMBOL_GPL
-+0xbf9bcc8d __cap_empty_set vmlinux EXPORT_SYMBOL
-+0xe2504d65 xprt_register_transport vmlinux EXPORT_SYMBOL_GPL
-+0xe0ead969 i2c_smbus_process_call vmlinux EXPORT_SYMBOL
-+0x313f13aa platform_get_resource vmlinux EXPORT_SYMBOL_GPL
-+0x42b7e450 pci_disable_pcie_error_reporting vmlinux EXPORT_SYMBOL_GPL
-+0xfed042ab crypto_shoot_alg vmlinux EXPORT_SYMBOL_GPL
-+0xf37d86d3 iput vmlinux EXPORT_SYMBOL
-+0x245a5a94 sleep_on_timeout vmlinux EXPORT_SYMBOL
-+0x30a3ce2d xprt_complete_rqst vmlinux EXPORT_SYMBOL_GPL
-+0x28a82da4 snmp_mib_init vmlinux EXPORT_SYMBOL_GPL
-+0xd91b9062 input_ff_upload vmlinux EXPORT_SYMBOL_GPL
-+0x072e69d7 create_proc_entry vmlinux EXPORT_SYMBOL
-+0x03fd2571 vm_unmap_ram vmlinux EXPORT_SYMBOL
-+0xd39230da proc_doulongvec_ms_jiffies_minmax vmlinux EXPORT_SYMBOL
-+0x2d2f8405 xfrm_output vmlinux EXPORT_SYMBOL_GPL
-+0x62dd148f of_phy_connect vmlinux EXPORT_SYMBOL
-+0x796ef373 pci_enable_device_mem vmlinux EXPORT_SYMBOL
-+0xeea9dbaf bitmap_bitremap vmlinux EXPORT_SYMBOL
-+0x71a50dbc register_blkdev vmlinux EXPORT_SYMBOL
-+0xe1ead0f9 nf_conntrack_alter_reply net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x596ca373 neigh_event_ns vmlinux EXPORT_SYMBOL
-+0x88aa1b8c sdhci_free_host vmlinux EXPORT_SYMBOL_GPL
-+0xe58fb452 aer_irq vmlinux EXPORT_SYMBOL_GPL
-+0x76e3aed7 elevator_change vmlinux EXPORT_SYMBOL
-+0x14dc18d8 iterate_supers_type vmlinux EXPORT_SYMBOL
-+0x2285200f usb_kill_anchored_urbs vmlinux EXPORT_SYMBOL_GPL
-+0x09775cdc kref_get vmlinux EXPORT_SYMBOL
-+0x1f46d410 netdev_change_features vmlinux EXPORT_SYMBOL
-+0xaa27750a init_dummy_netdev vmlinux EXPORT_SYMBOL_GPL
-+0x9e4f1cfb ring_buffer_resize vmlinux EXPORT_SYMBOL_GPL
-+0xcb0c622b dst_destroy vmlinux EXPORT_SYMBOL
-+0xc4b45e74 pci_disable_rom vmlinux EXPORT_SYMBOL_GPL
-+0x443ddc6e pci_disable_ido vmlinux EXPORT_SYMBOL
-+0x21962aa1 pci_disable_ltr vmlinux EXPORT_SYMBOL
-+0x2c8d9ecf journal_errno vmlinux EXPORT_SYMBOL
-+0x78e988ed svc_wake_up vmlinux EXPORT_SYMBOL_GPL
-+0x3e4a8504 xprt_write_space vmlinux EXPORT_SYMBOL_GPL
-+0x61a39807 ndisc_send_skb vmlinux EXPORT_SYMBOL
-+0x2ab23b9b nf_unregister_queue_handlers vmlinux EXPORT_SYMBOL_GPL
-+0x3f2f77c8 mtd_blktrans_cease_background vmlinux EXPORT_SYMBOL_GPL
-+0x70a7409f scsi_mode_sense vmlinux EXPORT_SYMBOL
-+0x2d89342a scsi_show_sense_hdr vmlinux EXPORT_SYMBOL
-+0xe87b346a pci_enable_ltr vmlinux EXPORT_SYMBOL
-+0x2e5a7064 journal_check_available_features vmlinux EXPORT_SYMBOL
-+0x78ed3e5c __init_waitqueue_head vmlinux EXPORT_SYMBOL
-+0x836afd32 nf_ct_get_tuple net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x989fa19e xfrm6_tunnel_register net/ipv6/tunnel6 EXPORT_SYMBOL
-+0x3d961c15 xfrm4_tunnel_register net/ipv4/tunnel4 EXPORT_SYMBOL
-+0x405d6987 of_property_read_u64 vmlinux EXPORT_SYMBOL_GPL
-+0x20edb24a blk_insert_cloned_request vmlinux EXPORT_SYMBOL_GPL
-+0x6f4b609a init_timer_deferrable_key vmlinux EXPORT_SYMBOL
-+0x2dc5379b skb_copy_datagram_from_iovec vmlinux EXPORT_SYMBOL
-+0x5f8a2728 isa_io_base vmlinux EXPORT_SYMBOL
-+0x907fa9b5 dst_alloc vmlinux EXPORT_SYMBOL
-+0xe93e49c3 devres_free vmlinux EXPORT_SYMBOL_GPL
-+0x84ecb7cb timerqueue_iterate_next vmlinux EXPORT_SYMBOL_GPL
-+0x1fad8e64 blk_put_queue vmlinux EXPORT_SYMBOL
-+0xa5df3b80 single_release vmlinux EXPORT_SYMBOL
-+0x23663ac5 get_user_pages vmlinux EXPORT_SYMBOL
-+0xa108eb4d sysctl_optmem_max vmlinux EXPORT_SYMBOL
-+0x14b1b51c enable_kernel_spe vmlinux EXPORT_SYMBOL
-+0xe57878a1 in6_pton vmlinux EXPORT_SYMBOL
-+0xaccabc6a in4_pton vmlinux EXPORT_SYMBOL
-+0xd55d1a4c of_get_mac_address vmlinux EXPORT_SYMBOL
-+0x30d70fa9 of_get_pci_address vmlinux EXPORT_SYMBOL
-+0x02b1d92b scsi_mode_select vmlinux EXPORT_SYMBOL_GPL
-+0xd0181f4f __bitmap_xor vmlinux EXPORT_SYMBOL
-+0xed746f71 mnt_want_write vmlinux EXPORT_SYMBOL_GPL
-+0xf3341268 __clear_user vmlinux EXPORT_SYMBOL
-+0x9d14983a ppc_enable_pmcs vmlinux EXPORT_SYMBOL
-+0x519e4247 xprt_lock_and_alloc_slot vmlinux EXPORT_SYMBOL_GPL
-+0x62bdb353 __dev_remove_pack vmlinux EXPORT_SYMBOL
-+0x1aa8db0c __starget_for_each_device vmlinux EXPORT_SYMBOL
-+0x90a1004a crypto_has_alg vmlinux EXPORT_SYMBOL_GPL
-+0xd6321e2a iget5_locked vmlinux EXPORT_SYMBOL
-+0x3dcb88a0 irq_set_handler_data vmlinux EXPORT_SYMBOL
-+0xa5a4e6a7 yield_to vmlinux EXPORT_SYMBOL_GPL
-+0x8056c327 mii_check_media vmlinux EXPORT_SYMBOL
-+0xc47af61f user_revoke vmlinux EXPORT_SYMBOL
-+0x0b263573 debugfs_create_dir vmlinux EXPORT_SYMBOL_GPL
-+0xb23b2262 dcache_dir_lseek vmlinux EXPORT_SYMBOL
-+0x0c2cdbf1 synchronize_sched vmlinux EXPORT_SYMBOL_GPL
-+0x6fff393f time_to_tm vmlinux EXPORT_SYMBOL
-+0x651a4139 test_taint vmlinux EXPORT_SYMBOL
-+0x6b7d903c netdev_printk vmlinux EXPORT_SYMBOL
-+0x8dad55e8 of_address_to_resource vmlinux EXPORT_SYMBOL_GPL
-+0x90b3ac7f thermal_zone_device_register vmlinux EXPORT_SYMBOL
-+0x73cd0f30 pci_scan_bus_parented vmlinux EXPORT_SYMBOL
-+0xf5a691cd invalidate_bh_lrus vmlinux EXPORT_SYMBOL_GPL
-+0x518889d8 ipcomp_init_state net/xfrm/xfrm_ipcomp EXPORT_SYMBOL_GPL
-+0x90599000 xt_check_match vmlinux EXPORT_SYMBOL_GPL
-+0x41cb6ae6 cfi_qry_mode_on vmlinux EXPORT_SYMBOL_GPL
-+0x32c3cb4e class_compat_register vmlinux EXPORT_SYMBOL_GPL
-+0x24aac4d9 crypto_aes_expand_key vmlinux EXPORT_SYMBOL_GPL
-+0x1eb914cc d_splice_alias vmlinux EXPORT_SYMBOL
-+0x038de4b7 do_sync_read vmlinux EXPORT_SYMBOL
-+0x5be5cfd3 mem_map vmlinux EXPORT_SYMBOL
-+0xfedd35fc console_suspend_enabled vmlinux EXPORT_SYMBOL
-+0x78f9b710 nf_ct_l3proto_try_module_get net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x199f8f28 svc_reg_xprt_class vmlinux EXPORT_SYMBOL_GPL
-+0x40b1319f sdio_release_irq vmlinux EXPORT_SYMBOL_GPL
-+0x6986e70b mmc_wait_for_cmd vmlinux EXPORT_SYMBOL
-+0x59c20bea kobject_rename vmlinux EXPORT_SYMBOL_GPL
-+0x72aa82c6 param_ops_charp vmlinux EXPORT_SYMBOL
-+0x8a0e5ca2 rpc_mkpipe vmlinux EXPORT_SYMBOL_GPL
-+0x9854bf90 cad_pid vmlinux EXPORT_SYMBOL
-+0x5a5a94a6 kstrtou8 vmlinux EXPORT_SYMBOL
-+0xb0477a75 get_task_pid vmlinux EXPORT_SYMBOL_GPL
-+0x85478a0b inet6_hash_frag vmlinux EXPORT_SYMBOL_GPL
-+0x6849a15f flex_array_clear vmlinux EXPORT_SYMBOL
-+0x5a7bfe41 crypto_probing_notify vmlinux EXPORT_SYMBOL_GPL
-+0xf0a118b4 ip6t_alloc_initial_table net/ipv6/netfilter/ip6_tables EXPORT_SYMBOL_GPL
-+0x9ef5eb8e netif_receive_skb vmlinux EXPORT_SYMBOL
-+0x196d40cb spi_new_device vmlinux EXPORT_SYMBOL_GPL
-+0xc906a49f journal_update_format vmlinux EXPORT_SYMBOL
-+0xfb6af58d recalc_sigpending vmlinux EXPORT_SYMBOL
-+0x5fc7e979 nf_nat_proto_unique_tuple net/ipv4/netfilter/nf_nat EXPORT_SYMBOL_GPL
-+0xdcb45617 nf_nat_mangle_udp_packet net/ipv4/netfilter/nf_nat EXPORT_SYMBOL
-+0xaeb5ccdc anon_transport_class_register vmlinux EXPORT_SYMBOL_GPL
-+0xf39ae0fb disk_part_iter_exit vmlinux EXPORT_SYMBOL_GPL
-+0x6c85445f follow_down_one vmlinux EXPORT_SYMBOL
-+0x7944e0fc tracing_off vmlinux EXPORT_SYMBOL_GPL
-+0x9fa181ba rpcauth_init_credcache vmlinux EXPORT_SYMBOL_GPL
-+0x81c6ed08 raw_seq_next vmlinux EXPORT_SYMBOL_GPL
-+0x05f187fd ip_setsockopt vmlinux EXPORT_SYMBOL
-+0x1c72d333 ip_getsockopt vmlinux EXPORT_SYMBOL
-+0x38074cf6 qdisc_watchdog_schedule vmlinux EXPORT_SYMBOL
-+0xed709aff tty_encode_baud_rate vmlinux EXPORT_SYMBOL_GPL
-+0x80dd3e42 blk_unprep_request vmlinux EXPORT_SYMBOL_GPL
-+0x6e50c56b xdr_shift_buf vmlinux EXPORT_SYMBOL_GPL
-+0xf106c813 ip_options_rcv_srr vmlinux EXPORT_SYMBOL
-+0x9a5a79fd device_register vmlinux EXPORT_SYMBOL_GPL
-+0x3ca8a6b3 pcim_iomap_regions_request_all vmlinux EXPORT_SYMBOL
-+0xc159495b dentry_open vmlinux EXPORT_SYMBOL
-+0xbb2b98fa skb_checksum_help vmlinux EXPORT_SYMBOL
-+0x60ee6103 unregister_netdevice_queue vmlinux EXPORT_SYMBOL
-+0x40a27c37 scsi_dev_info_remove_list vmlinux EXPORT_SYMBOL
-+0x9545af6d tasklet_init vmlinux EXPORT_SYMBOL
-+0x68a29b9a nf_nat_setup_info net/ipv4/netfilter/nf_nat EXPORT_SYMBOL
-+0xdf56dcb2 stop_machine vmlinux EXPORT_SYMBOL_GPL
-+0x53986488 register_die_notifier vmlinux EXPORT_SYMBOL_GPL
-+0x580dfef9 nf_ct_unlink_expect_report net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x3257c865 sock_no_recvmsg vmlinux EXPORT_SYMBOL
-+0x6a2126c6 hrtimer_cancel vmlinux EXPORT_SYMBOL_GPL
-+0x0a22b996 xt_unregister_matches vmlinux EXPORT_SYMBOL
-+0xfdfc0b3b fiemap_fill_next_extent vmlinux EXPORT_SYMBOL
-+0x4087f0c0 qdisc_watchdog_cancel vmlinux EXPORT_SYMBOL
-+0x4ce6c680 crypto_shash_digest vmlinux EXPORT_SYMBOL_GPL
-+0xe8d8b9c7 crypto_ahash_digest vmlinux EXPORT_SYMBOL_GPL
-+0x3de9cae1 crypto_remove_final vmlinux EXPORT_SYMBOL_GPL
-+0x296b5561 svc_authenticate vmlinux EXPORT_SYMBOL_GPL
-+0xd0108d65 rtnl_set_sk_err vmlinux EXPORT_SYMBOL
-+0x4865167d usb_hcd_pci_remove vmlinux EXPORT_SYMBOL_GPL
-+0xec9ca601 driver_add_kobj vmlinux EXPORT_SYMBOL_GPL
-+0x89797060 _raw_read_lock vmlinux EXPORT_SYMBOL
-+0x897f061d downgrade_write vmlinux EXPORT_SYMBOL
-+0x5568c553 complete vmlinux EXPORT_SYMBOL
-+0x6fd12bcc ip_check_defrag vmlinux EXPORT_SYMBOL
-+0xdb864d65 iov_iter_single_seg_count vmlinux EXPORT_SYMBOL
-+0x9c44f35a scsi_test_unit_ready vmlinux EXPORT_SYMBOL
-+0xad37975e dentry_update_name_case vmlinux EXPORT_SYMBOL
-+0x8a7d1c31 high_memory vmlinux EXPORT_SYMBOL
-+0xd7b213fa smp_call_function_many vmlinux EXPORT_SYMBOL
-+0xbdb6ee0c usb_serial_deregister vmlinux EXPORT_SYMBOL_GPL
-+0x4d9edeae simple_link vmlinux EXPORT_SYMBOL
-+0xbdd2f42a rcu_bh_force_quiescent_state vmlinux EXPORT_SYMBOL_GPL
-+0xc458c88f hidinput_find_field vmlinux EXPORT_SYMBOL_GPL
-+0x4a6c3f1a usb_serial_suspend vmlinux EXPORT_SYMBOL
-+0x14193672 scsi_remove_target vmlinux EXPORT_SYMBOL
-+0xb6c5a973 scsi_show_result vmlinux EXPORT_SYMBOL
-+0x03e32c1d sysdev_remove_file vmlinux EXPORT_SYMBOL_GPL
-+0x99faa353 journal_blocks_per_page vmlinux EXPORT_SYMBOL
-+0x63b8f6ef page_cache_async_readahead vmlinux EXPORT_SYMBOL_GPL
-+0x8de0b5ac mempool_create vmlinux EXPORT_SYMBOL
-+0xe3a98a71 kblockd_schedule_work vmlinux EXPORT_SYMBOL
-+0x79d654ef send_sig_info vmlinux EXPORT_SYMBOL
-+0x20030ecd ioremap vmlinux EXPORT_SYMBOL
-+0xedc03953 iounmap vmlinux EXPORT_SYMBOL
-+0xc865db6b xprt_release_xprt vmlinux EXPORT_SYMBOL_GPL
-+0xc628e72a __neigh_event_send vmlinux EXPORT_SYMBOL
-+0x0c61e098 sk_stream_wait_close vmlinux EXPORT_SYMBOL
-+0x3c396f87 show_class_attr_string vmlinux EXPORT_SYMBOL_GPL
-+0x441257b7 sysdev_store_int vmlinux EXPORT_SYMBOL_GPL
-+0xf3970f1b read_cache_page_async vmlinux EXPORT_SYMBOL
-+0xd0ee38b8 schedule_timeout_uninterruptible vmlinux EXPORT_SYMBOL
-+0xd79b5a02 allow_signal vmlinux EXPORT_SYMBOL
-+0xd3081dfa qe_upload_firmware vmlinux EXPORT_SYMBOL
-+0xf4d880ae platform_get_irq vmlinux EXPORT_SYMBOL_GPL
-+0x0781bf45 kill_anon_super vmlinux EXPORT_SYMBOL
-+0x6676c50d nf_ct_delete_from_lists net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x730d37a5 xfrm6_rcv vmlinux EXPORT_SYMBOL
-+0x119a95b0 xfrm4_rcv vmlinux EXPORT_SYMBOL
-+0x309ea25a pci_enable_pcie_error_reporting vmlinux EXPORT_SYMBOL_GPL
-+0x88ddfe5e xdr_buf_subsegment vmlinux EXPORT_SYMBOL_GPL
-+0xed08815e inet_dgram_connect vmlinux EXPORT_SYMBOL
-+0x715fb53b usb_find_alt_setting vmlinux EXPORT_SYMBOL_GPL
-+0x0f6fbd82 phy_connect vmlinux EXPORT_SYMBOL
-+0x34ab3ee2 driver_unregister vmlinux EXPORT_SYMBOL_GPL
-+0xc87f94e8 generic_pipe_buf_unmap vmlinux EXPORT_SYMBOL
-+0xddd4147d generic_pipe_buf_steal vmlinux EXPORT_SYMBOL
-+0xa2c56c31 param_ops_ulong vmlinux EXPORT_SYMBOL
-+0x01ca7533 inet_frags_exit_net vmlinux EXPORT_SYMBOL
-+0x8e4b1069 kobject_get vmlinux EXPORT_SYMBOL
-+0x3fb18605 kobject_put vmlinux EXPORT_SYMBOL
-+0x9d033f64 nfs4_reset_write vmlinux EXPORT_SYMBOL_GPL
-+0x46214106 files_lglock_local_unlock_cpu vmlinux EXPORT_SYMBOL
-+0x58688735 relay_open vmlinux EXPORT_SYMBOL_GPL
-+0x4029d238 param_set_copystring vmlinux EXPORT_SYMBOL
-+0x59e70f93 __send_remote_softirq vmlinux EXPORT_SYMBOL
-+0x2afbe2a5 usb_scuttle_anchored_urbs vmlinux EXPORT_SYMBOL_GPL
-+0x51cc13a8 cfi_read_pri vmlinux EXPORT_SYMBOL
-+0xf1deabf2 div64_u64 vmlinux EXPORT_SYMBOL
-+0x52b34107 relay_close vmlinux EXPORT_SYMBOL_GPL
-+0xfc39e32f ioport_unmap vmlinux EXPORT_SYMBOL
-+0xbe3ce140 usb_reset_configuration vmlinux EXPORT_SYMBOL_GPL
-+0x03dd0aff sysfs_merge_group vmlinux EXPORT_SYMBOL_GPL
-+0xc84a0a7e seq_hlist_start_rcu vmlinux EXPORT_SYMBOL
-+0xcdada4b3 d_validate vmlinux EXPORT_SYMBOL
-+0xb2ebe0b7 __get_user_pages_fast vmlinux EXPORT_SYMBOL_GPL
-+0x7bcc3ec6 down_trylock vmlinux EXPORT_SYMBOL
-+0x16b67679 genl_register_family vmlinux EXPORT_SYMBOL
-+0xc256e762 __bitmap_equal vmlinux EXPORT_SYMBOL
-+0x019e7765 __init_rwsem vmlinux EXPORT_SYMBOL
-+0x5342878d page_zero_new_buffers vmlinux EXPORT_SYMBOL
-+0x7a6737e5 mntget vmlinux EXPORT_SYMBOL
-+0x61406732 mntput vmlinux EXPORT_SYMBOL
-+0x4f62563b fasync_helper vmlinux EXPORT_SYMBOL
-+0x64203ccb mount_mtd vmlinux EXPORT_SYMBOL_GPL
-+0x2f4113a2 dcookie_register vmlinux EXPORT_SYMBOL_GPL
-+0xeee9690b locks_mandatory_area vmlinux EXPORT_SYMBOL
-+0x99060d85 inet_twsk_deschedule vmlinux EXPORT_SYMBOL
-+0x140d6513 xt_table_unlock vmlinux EXPORT_SYMBOL_GPL
-+0x88b210e6 ethtool_op_set_ufo vmlinux EXPORT_SYMBOL
-+0xb887455c sock_alloc_send_pskb vmlinux EXPORT_SYMBOL
-+0x0acb1a3c __bitmap_shift_right vmlinux EXPORT_SYMBOL
-+0x402b8281 __request_module vmlinux EXPORT_SYMBOL
-+0xba215bc2 inet_register_protosw vmlinux EXPORT_SYMBOL
-+0x9e041871 __inet_inherit_port vmlinux EXPORT_SYMBOL_GPL
-+0x2b4f08e0 dev_deactivate vmlinux EXPORT_SYMBOL
-+0x8eed09dc phy_find_first vmlinux EXPORT_SYMBOL
-+0xb89af9bf srandom32 vmlinux EXPORT_SYMBOL
-+0x23fd3028 vmalloc_node vmlinux EXPORT_SYMBOL
-+0x891fbb10 mempool_destroy vmlinux EXPORT_SYMBOL
-+0x054e550b kernel_halt vmlinux EXPORT_SYMBOL_GPL
-+0xe0b0b13d xfrm6_tunnel_spi_lookup net/ipv6/xfrm6_tunnel EXPORT_SYMBOL
-+0xe7a8d75d netpoll_cleanup vmlinux EXPORT_SYMBOL
-+0x62005346 scsi_ioctl vmlinux EXPORT_SYMBOL
-+0xe7bd56ce set_binfmt vmlinux EXPORT_SYMBOL
-+0x9933f8fa km_policy_expired vmlinux EXPORT_SYMBOL
-+0xdff2d6cd spi_unregister_master vmlinux EXPORT_SYMBOL_GPL
-+0xae973946 __first_cpu vmlinux EXPORT_SYMBOL
-+0xe2a6904b elv_rb_find vmlinux EXPORT_SYMBOL
-+0xbee90f2f __kfifo_out_peek_r vmlinux EXPORT_SYMBOL
-+0xa04a01bd qdisc_class_hash_insert vmlinux EXPORT_SYMBOL
-+0xe5867808 dlci_ioctl_set vmlinux EXPORT_SYMBOL
-+0x13e1e53c crypto_alg_lookup vmlinux EXPORT_SYMBOL_GPL
-+0x8b4ac748 __rpc_wait_for_completion_task vmlinux EXPORT_SYMBOL_GPL
-+0x742ec05d ethtool_op_set_tx_ipv6_csum vmlinux EXPORT_SYMBOL
-+0x6195e83d scsi_report_device_reset vmlinux EXPORT_SYMBOL
-+0x21e29754 scsi_print_sense vmlinux EXPORT_SYMBOL
-+0xa34a1e0b locks_free_lock vmlinux EXPORT_SYMBOL
-+0xe71c31f7 simple_attr_release vmlinux EXPORT_SYMBOL_GPL
-+0xed120683 usb_submit_urb vmlinux EXPORT_SYMBOL_GPL
-+0x928dc8b5 rename_lock vmlinux EXPORT_SYMBOL
-+0xdebe699e page_symlink_inode_operations vmlinux EXPORT_SYMBOL
-+0x99afe916 _raw_write_unlock_bh vmlinux EXPORT_SYMBOL
-+0x060ea2d6 kstrtoull vmlinux EXPORT_SYMBOL
-+0x5ac15bae kstrtou16 vmlinux EXPORT_SYMBOL
-+0x94961283 vunmap vmlinux EXPORT_SYMBOL
-+0xc97eeec5 write_cache_pages vmlinux EXPORT_SYMBOL
-+0x160a0cad nf_conntrack_l4proto_tcp6 net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x3b21e0c3 xfrm_policy_alloc vmlinux EXPORT_SYMBOL
-+0x81b8ae05 __nf_ct_ext_add net/netfilter/nf_conntrack EXPORT_SYMBOL
-+0x117093be qdisc_class_hash_init vmlinux EXPORT_SYMBOL
-+0xd4fb8ce7 sk_prot_clear_portaddr_nulls vmlinux EXPORT_SYMBOL
-+0x787ae952 mtd_del_partition vmlinux EXPORT_SYMBOL_GPL
-+0x25f3bd2e atomic64_xchg vmlinux EXPORT_SYMBOL
-+0xfcc95cae task_current_syscall vmlinux EXPORT_SYMBOL_GPL
-+0x574ed83f single_open_net vmlinux EXPORT_SYMBOL_GPL
-+0xcc4c11c3 set_page_dirty_lock vmlinux EXPORT_SYMBOL
-+0x8bc74143 tcp_v4_conn_request vmlinux EXPORT_SYMBOL
-+0xeace373d usb_get_descriptor vmlinux EXPORT_SYMBOL_GPL
-+0xf7064a0d spi_async_locked vmlinux EXPORT_SYMBOL_GPL
-+0xca62af4c get_mtd_device vmlinux EXPORT_SYMBOL_GPL
-+0x4897a00b blk_rq_init vmlinux EXPORT_SYMBOL
-+0x26e76fb8 sysctl_udp_wmem_min vmlinux EXPORT_SYMBOL
-+0x60b3b58a tcp_v4_syn_recv_sock vmlinux EXPORT_SYMBOL
-+0x906c274e usb_put_dev vmlinux EXPORT_SYMBOL_GPL
-+0xa7b0d968 swiotlb_tbl_sync_single vmlinux EXPORT_SYMBOL_GPL
-+0x6d464175 __sg_free_table vmlinux EXPORT_SYMBOL
-+0x4d6c0e8d kmem_cache_shrink vmlinux EXPORT_SYMBOL
-+0x10d9d048 icmp_err_convert vmlinux EXPORT_SYMBOL
-+0xf67a2d46 mii_check_link vmlinux EXPORT_SYMBOL
-+0xd334a2bd tcp_hashinfo vmlinux EXPORT_SYMBOL
-+0x2d140a58 genl_unlock vmlinux EXPORT_SYMBOL
-+0x4256c8a3 of_n_size_cells vmlinux EXPORT_SYMBOL
-+0xf040786d hid_report_raw_event vmlinux EXPORT_SYMBOL_GPL
-+0x8c70d5ae scsi_unregister vmlinux EXPORT_SYMBOL
-+0x0087d496 crypto_aead_setauthsize vmlinux EXPORT_SYMBOL_GPL
-+0x5676c702 nlmclnt_init vmlinux EXPORT_SYMBOL_GPL
-+0xcb09bf1a fd_install vmlinux EXPORT_SYMBOL
-+0x4c11435a _raw_read_lock_bh vmlinux EXPORT_SYMBOL
-+0x7681e3ba nf_nat_used_tuple net/ipv4/netfilter/nf_nat EXPORT_SYMBOL
-+0xc927923a nf_nat_packet net/ipv4/netfilter/nf_nat EXPORT_SYMBOL_GPL
-+0x9b8f7dca scsi_internal_device_unblock vmlinux EXPORT_SYMBOL_GPL
-+0xbee5153c blk_init_tags vmlinux EXPORT_SYMBOL
-+0x0d7d89ce vfs_fsync_range vmlinux EXPORT_SYMBOL
-+0x3ce4ca6f disable_irq vmlinux EXPORT_SYMBOL
-+0x87754115 raw_notifier_chain_register vmlinux EXPORT_SYMBOL_GPL
-+0x20f357ca scsi_host_alloc vmlinux EXPORT_SYMBOL
-+0xee146e0a bus_get_device_klist vmlinux EXPORT_SYMBOL_GPL
-+0xd25133ac sysfs_remove_file vmlinux EXPORT_SYMBOL_GPL
-+0x889d27ce path_put vmlinux EXPORT_SYMBOL
-+0x5a9f996e apply_to_page_range vmlinux EXPORT_SYMBOL_GPL
-+0xa0ceef51 out_of_line_wait_on_bit vmlinux EXPORT_SYMBOL
-+0x70aca666 dst_discard vmlinux EXPORT_SYMBOL
-+0xaa2a72bf __iowrite64_copy vmlinux EXPORT_SYMBOL_GPL
-+0xf1bcf383 invalidate_partition vmlinux EXPORT_SYMBOL
-+0xc26b1d80 kick_process vmlinux EXPORT_SYMBOL_GPL
-+0xea41576c sk_release_kernel vmlinux EXPORT_SYMBOL
-+0x13701441 sg_miter_stop vmlinux EXPORT_SYMBOL
-+0x6f5febee key_reject_and_link vmlinux EXPORT_SYMBOL
-+0xe4fe8ca1 _raw_spin_unlock_bh vmlinux EXPORT_SYMBOL
-+0xc4aa788d xt_proto_init vmlinux EXPORT_SYMBOL_GPL
-+0xdd1c65f6 blk_finish_plug vmlinux EXPORT_SYMBOL
-+0x0b1beb31 vmalloc_32_user vmlinux EXPORT_SYMBOL
-+0x756f9875 pci_get_subsys vmlinux EXPORT_SYMBOL
-+0x9eecde16 do_brk vmlinux EXPORT_SYMBOL
-+0x878ab3ce sysctl_tcp_adv_win_scale vmlinux EXPORT_SYMBOL
-+0x7d32f0ad ip_local_out vmlinux EXPORT_SYMBOL_GPL
-+0xe163a0d1 usb_hcd_check_unlink_urb vmlinux EXPORT_SYMBOL_GPL
-+0xb1a9725f phy_device_free vmlinux EXPORT_SYMBOL
-+0xb0104373 generic_permission vmlinux EXPORT_SYMBOL
-+0xd59668e6 unlock_flocks vmlinux EXPORT_SYMBOL_GPL
-+0xd7b7c7e4 uart_get_baud_rate vmlinux EXPORT_SYMBOL
-+0xd6d2bfe8 pci_find_next_bus vmlinux EXPORT_SYMBOL
-+0x9d3aa376 blk_iopoll_init vmlinux EXPORT_SYMBOL
-+0xcbc2c8dd atomic_notifier_chain_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x8ba65b48 secpath_dup vmlinux EXPORT_SYMBOL
-+0xe1b3830a set_user_nice vmlinux EXPORT_SYMBOL
-+0x35c4c2bc gss_pseudoflavor_to_service vmlinux EXPORT_SYMBOL_GPL
-+0xe7d71ad5 splice_direct_to_actor vmlinux EXPORT_SYMBOL
-+0xf34806ec hrtimer_get_res vmlinux EXPORT_SYMBOL_GPL
-+0x7d1541f1 nf_nat_pptp_hook_inbound net/netfilter/nf_conntrack_pptp EXPORT_SYMBOL_GPL
-+0x1fdf5145 nf_conntrack_l3proto_unregister net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x895b81a5 nf_conntrack_l4proto_unregister net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x2b9da7a4 genl_lock vmlinux EXPORT_SYMBOL
-+0x2d187f6f qdisc_class_hash_grow vmlinux EXPORT_SYMBOL
-+0x7528c327 sock_setsockopt vmlinux EXPORT_SYMBOL
-+0x7587dd64 tty_port_close_start vmlinux EXPORT_SYMBOL
-+0x074989f8 ida_simple_remove vmlinux EXPORT_SYMBOL
-+0xdfc46245 unlock_buffer vmlinux EXPORT_SYMBOL
-+0x3429114e simple_transaction_release vmlinux EXPORT_SYMBOL
-+0x5e4d4180 nfulnl_log_packet net/netfilter/nfnetlink_log EXPORT_SYMBOL_GPL
-+0x01010c6d klist_add_before vmlinux EXPORT_SYMBOL_GPL
-+0x9cb96e92 qdisc_put_rtab vmlinux EXPORT_SYMBOL
-+0x91fd73a4 subsys_find_device_by_id vmlinux EXPORT_SYMBOL_GPL
-+0x093e125a crypto_attr_alg2 vmlinux EXPORT_SYMBOL_GPL
-+0xfc01e0ca nfs_commit_free vmlinux EXPORT_SYMBOL_GPL
-+0x1176e07f __per_cpu_offset vmlinux EXPORT_SYMBOL
-+0xbbcd407c proto_register vmlinux EXPORT_SYMBOL
-+0x175b8a58 rtc_irq_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x9c7a72be tty_wakeup vmlinux EXPORT_SYMBOL_GPL
-+0xb1f5c533 check_disk_size_change vmlinux EXPORT_SYMBOL
-+0x33839ed8 d_clear_need_lookup vmlinux EXPORT_SYMBOL
-+0xbc3f6afa down_read vmlinux EXPORT_SYMBOL
-+0x5850f4cd km_report vmlinux EXPORT_SYMBOL
-+0x1694ba86 __napi_complete vmlinux EXPORT_SYMBOL
-+0xc3bc62fb skb_copy_expand vmlinux EXPORT_SYMBOL
-+0xabd0c91c rtc_time_to_tm vmlinux EXPORT_SYMBOL
-+0x274f1f9b dmam_free_coherent vmlinux EXPORT_SYMBOL
-+0x98c6103a transport_setup_device vmlinux EXPORT_SYMBOL_GPL
-+0x3da3a6f5 blk_queue_softirq_done vmlinux EXPORT_SYMBOL
-+0x190c3ccc d_lookup vmlinux EXPORT_SYMBOL
-+0xabdd83b5 genl_unregister_mc_group vmlinux EXPORT_SYMBOL
-+0xf811e69d scsi_eh_flush_done_q vmlinux EXPORT_SYMBOL
-+0x99f66401 path_is_under vmlinux EXPORT_SYMBOL
-+0xfa590506 pci_iomap vmlinux EXPORT_SYMBOL
-+0xa8119c49 xt_hook_unlink vmlinux EXPORT_SYMBOL_GPL
-+0xc6435be3 skb_morph vmlinux EXPORT_SYMBOL_GPL
-+0xdb0c48bb mmc_erase vmlinux EXPORT_SYMBOL
-+0x8baf3116 percpu_counter_set vmlinux EXPORT_SYMBOL
-+0x61a90c54 klist_add_head vmlinux EXPORT_SYMBOL_GPL
-+0x5269ab27 ethtool_op_set_flags vmlinux EXPORT_SYMBOL
-+0x7701acae scsi_remove_host vmlinux EXPORT_SYMBOL
-+0x2c88b964 pci_request_selected_regions_exclusive vmlinux EXPORT_SYMBOL
-+0xb6822a33 radix_tree_gang_lookup_tag vmlinux EXPORT_SYMBOL
-+0xe8e99f5c flush_dcache_page vmlinux EXPORT_SYMBOL
-+0xf4449388 timer_interrupt vmlinux EXPORT_SYMBOL
-+0x12aab7d1 scsi_is_host_device vmlinux EXPORT_SYMBOL
-+0x36ca51ab devm_ioremap_nocache vmlinux EXPORT_SYMBOL
-+0xf370333d sync_dirty_buffer vmlinux EXPORT_SYMBOL
-+0x6c81fae0 tcp_reno_ssthresh vmlinux EXPORT_SYMBOL_GPL
-+0xca461664 netlink_has_listeners vmlinux EXPORT_SYMBOL_GPL
-+0xc761c4bf pci_remove_bus_device vmlinux EXPORT_SYMBOL
-+0xe075d6eb iter_div_u64_rem vmlinux EXPORT_SYMBOL
-+0xd6c9eb4a nf_nat_seq_adjust_hook net/ipv4/netfilter/nf_conntrack_ipv4 EXPORT_SYMBOL_GPL
-+0x53bce6b9 usb_alloc_urb vmlinux EXPORT_SYMBOL_GPL
-+0x876e5b30 spi_setup vmlinux EXPORT_SYMBOL_GPL
-+0x205125b9 __pci_enable_wake vmlinux EXPORT_SYMBOL
-+0x1f0ffbff inode_init_once vmlinux EXPORT_SYMBOL
-+0x73d69364 ring_buffer_change_overwrite vmlinux EXPORT_SYMBOL_GPL
-+0x7fc827a5 __srcu_notifier_call_chain vmlinux EXPORT_SYMBOL_GPL
-+0x5bc2e5a1 nf_ip6_checksum vmlinux EXPORT_SYMBOL
-+0xeec2364d netpoll_send_skb_on_dev vmlinux EXPORT_SYMBOL
-+0x7879bfc8 device_move vmlinux EXPORT_SYMBOL_GPL
-+0xc19d6d2b scsi_cmd_ioctl vmlinux EXPORT_SYMBOL
-+0x4a22c7b5 neigh_seq_stop vmlinux EXPORT_SYMBOL
-+0xfad37936 usb_stor_clear_halt vmlinux EXPORT_SYMBOL_GPL
-+0x77fa5d1f ns_to_timespec vmlinux EXPORT_SYMBOL
-+0x95c6c48a qe_pin_set_gpio vmlinux EXPORT_SYMBOL
-+0xed93f29e __kunmap_atomic vmlinux EXPORT_SYMBOL
-+0x8ff80bf7 dev_mc_del_global vmlinux EXPORT_SYMBOL
-+0x14880357 dev_mc_add_global vmlinux EXPORT_SYMBOL
-+0x99525e3a vfsmount_lock_local_unlock vmlinux EXPORT_SYMBOL
-+0xdb7cbcf1 blocking_notifier_chain_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x5651fb34 fifo_create_dflt vmlinux EXPORT_SYMBOL
-+0x82a1419b neigh_table_init vmlinux EXPORT_SYMBOL
-+0x89c4cbce mmc_register_driver vmlinux EXPORT_SYMBOL
-+0x38a9c2c7 input_ff_effect_from_user vmlinux EXPORT_SYMBOL_GPL
-+0x737e3d28 attribute_container_register vmlinux EXPORT_SYMBOL_GPL
-+0x71da73ee blk_queue_segment_boundary vmlinux EXPORT_SYMBOL
-+0x76c6ee5c blk_stop_queue vmlinux EXPORT_SYMBOL
-+0x40979bcc blk_insert_request vmlinux EXPORT_SYMBOL
-+0xea3210a9 blkcipher_walk_virt_block vmlinux EXPORT_SYMBOL_GPL
-+0xa2bc62ac sysfs_create_link vmlinux EXPORT_SYMBOL_GPL
-+0x3be9e6e8 task_active_pid_ns vmlinux EXPORT_SYMBOL_GPL
-+0x94a08134 nf_nat_proto_nlattr_to_range net/ipv4/netfilter/nf_nat EXPORT_SYMBOL_GPL
-+0x44dded3f svc_set_client vmlinux EXPORT_SYMBOL_GPL
-+0x411b3b69 pci_add_dynid vmlinux EXPORT_SYMBOL_GPL
-+0x6d294e43 clock_t_to_jiffies vmlinux EXPORT_SYMBOL
-+0xe97f4ce5 qword_get vmlinux EXPORT_SYMBOL_GPL
-+0x1f986505 ethtool_op_set_sg vmlinux EXPORT_SYMBOL
-+0x4ccb8b94 pcim_iomap_table vmlinux EXPORT_SYMBOL
-+0x669f27de crypto_larval_alloc vmlinux EXPORT_SYMBOL_GPL
-+0xc7fdc711 journal_revoke vmlinux EXPORT_SYMBOL
-+0x72aea9ce seq_release vmlinux EXPORT_SYMBOL
-+0x3c5d0faa insert_inode_locked vmlinux EXPORT_SYMBOL
-+0x4c3866c0 ring_buffer_size vmlinux EXPORT_SYMBOL_GPL
-+0x838b13e7 ring_buffer_free vmlinux EXPORT_SYMBOL_GPL
-+0x18852bcc module_layout vmlinux EXPORT_SYMBOL
-+0x33945b7d xfrm_audit_state_notfound vmlinux EXPORT_SYMBOL_GPL
-+0x37a8f9c9 hidinput_disconnect vmlinux EXPORT_SYMBOL_GPL
-+0xcae03562 tun_get_socket drivers/net/tun EXPORT_SYMBOL_GPL
-+0x0014c4da __blk_put_request vmlinux EXPORT_SYMBOL_GPL
-+0x875ef85c elv_rb_latter_request vmlinux EXPORT_SYMBOL
-+0x0ce1b711 sysfs_create_bin_file vmlinux EXPORT_SYMBOL_GPL
-+0x66b2a859 nr_free_buffer_pages vmlinux EXPORT_SYMBOL_GPL
-+0xeb8ae736 klist_init vmlinux EXPORT_SYMBOL_GPL
-+0x0aabe623 xfrm_state_unregister_afinfo vmlinux EXPORT_SYMBOL
-+0x60f4c230 of_find_node_by_name vmlinux EXPORT_SYMBOL
-+0x83f9a3c9 serial8250_do_pm vmlinux EXPORT_SYMBOL
-+0x05aa4eb1 pci_ltr_supported vmlinux EXPORT_SYMBOL
-+0x6cdc5c6b nla_strlcpy vmlinux EXPORT_SYMBOL
-+0xa46f2f1b kstrtouint vmlinux EXPORT_SYMBOL
-+0x4121db0b blk_init_queue_node vmlinux EXPORT_SYMBOL
-+0xe4a895fa up_write vmlinux EXPORT_SYMBOL
-+0x7665e61c cpu_all_bits vmlinux EXPORT_SYMBOL
-+0xb66350c3 auth_domain_put vmlinux EXPORT_SYMBOL_GPL
-+0x4d8219f4 scsi_target_block vmlinux EXPORT_SYMBOL_GPL
-+0x00d4f811 scsi_prep_state_check vmlinux EXPORT_SYMBOL
-+0x8176ea3f free_buffer_head vmlinux EXPORT_SYMBOL
-+0x6e4b5afd fget vmlinux EXPORT_SYMBOL
-+0xfa1eb910 unregister_syscore_ops vmlinux EXPORT_SYMBOL_GPL
-+0x44e9a829 match_token vmlinux EXPORT_SYMBOL
-+0x2332418c vmtruncate vmlinux EXPORT_SYMBOL
-+0xdbb24fc2 down_write vmlinux EXPORT_SYMBOL
-+0xcaf2fc3d ip_route_output_flow vmlinux EXPORT_SYMBOL_GPL
-+0x1b9e0ff1 scsilun_to_int vmlinux EXPORT_SYMBOL
-+0x3b4572b8 posix_test_lock vmlinux EXPORT_SYMBOL
-+0xd127c42a kill_block_super vmlinux EXPORT_SYMBOL
-+0x14b68061 flush_signals vmlinux EXPORT_SYMBOL
-+0x8c724794 nf_ct_remove_expectations net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x843a658f neigh_lookup_nodev vmlinux EXPORT_SYMBOL
-+0x1b52b0d2 kernel_setsockopt vmlinux EXPORT_SYMBOL
-+0xfab0ef6e kernel_getsockopt vmlinux EXPORT_SYMBOL
-+0x9e4bdfff kernel_sock_ioctl vmlinux EXPORT_SYMBOL
-+0x7c9208ff usb_stor_disconnect vmlinux EXPORT_SYMBOL_GPL
-+0xcf39c94b mb_cache_entry_insert vmlinux EXPORT_SYMBOL
-+0x5242d3b7 kallsyms_on_each_symbol vmlinux EXPORT_SYMBOL_GPL
-+0xd2a8caf0 work_on_cpu vmlinux EXPORT_SYMBOL_GPL
-+0x59de3119 nfnetlink_unicast net/netfilter/nfnetlink EXPORT_SYMBOL_GPL
-+0xab694444 bsearch vmlinux EXPORT_SYMBOL
-+0xf3dff1a3 blk_put_request vmlinux EXPORT_SYMBOL
-+0x9f40a6d6 async_synchronize_full_domain vmlinux EXPORT_SYMBOL_GPL
-+0x6974ef19 usb_serial_generic_throttle vmlinux EXPORT_SYMBOL_GPL
-+0xf5fce407 crypto_create_tfm vmlinux EXPORT_SYMBOL_GPL
-+0xa3a2d9af walk_system_ram_range vmlinux EXPORT_SYMBOL_GPL
-+0xa2dc5981 of_get_cpu_node vmlinux EXPORT_SYMBOL
-+0x363380e6 nf_conntrack_in net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xb77ba3a1 sock_queue_rcv_skb vmlinux EXPORT_SYMBOL
-+0xfcd35070 blk_limits_io_min vmlinux EXPORT_SYMBOL
-+0x05871953 sysfs_remove_files vmlinux EXPORT_SYMBOL_GPL
-+0xa3f9df4e mapping_tagged vmlinux EXPORT_SYMBOL
-+0x02d848d4 rpc_setbufsize vmlinux EXPORT_SYMBOL_GPL
-+0x115258a5 put_disk vmlinux EXPORT_SYMBOL
-+0xd9605d4c add_timer vmlinux EXPORT_SYMBOL
-+0xabfbc63f irq_find_host vmlinux EXPORT_SYMBOL_GPL
-+0x86d76ed4 hid_allocate_device vmlinux EXPORT_SYMBOL_GPL
-+0xaaa509d1 spi_sync vmlinux EXPORT_SYMBOL_GPL
-+0x732b7833 irq_cpu_rmap_add vmlinux EXPORT_SYMBOL
-+0x9ba7089d argv_split vmlinux EXPORT_SYMBOL
-+0xf6882e97 blk_queue_max_hw_sectors vmlinux EXPORT_SYMBOL
-+0x31a89d59 rpc_debug vmlinux EXPORT_SYMBOL_GPL
-+0x223326b1 svc_xprt_enqueue vmlinux EXPORT_SYMBOL_GPL
-+0x162a441b bus_create_file vmlinux EXPORT_SYMBOL_GPL
-+0x4872ee63 crypto_aes_set_key vmlinux EXPORT_SYMBOL_GPL
-+0x5086ac3a alg_test vmlinux EXPORT_SYMBOL_GPL
-+0xbef43296 console_conditional_schedule vmlinux EXPORT_SYMBOL
-+0x774f22b3 svc_destroy vmlinux EXPORT_SYMBOL_GPL
-+0xabb8322f pci_target_state vmlinux EXPORT_SYMBOL
-+0xf2ec5b45 blkdev_issue_discard vmlinux EXPORT_SYMBOL
-+0x38871428 crypto_unregister_pcomp vmlinux EXPORT_SYMBOL_GPL
-+0xdf62a75b debugfs_create_symlink vmlinux EXPORT_SYMBOL_GPL
-+0xece345ed fat_detach vmlinux EXPORT_SYMBOL_GPL
-+0x698a899f ring_buffer_peek vmlinux EXPORT_SYMBOL_GPL
-+0x96937cf7 xt_request_find_match vmlinux EXPORT_SYMBOL_GPL
-+0x278d3cc1 writeback_inodes_sb_nr_if_idle vmlinux EXPORT_SYMBOL
-+0x8b1b0eea xattr_getsecurity vmlinux EXPORT_SYMBOL_GPL
-+0x6228c21f smp_call_function_single vmlinux EXPORT_SYMBOL
-+0xc0580937 rb_erase vmlinux EXPORT_SYMBOL
-+0x46a23e08 fsnotify_alloc_group vmlinux EXPORT_SYMBOL_GPL
-+0xaafdc258 strcasecmp vmlinux EXPORT_SYMBOL
-+0x962a13e8 save_mount_options vmlinux EXPORT_SYMBOL
-+0xf69dd1ab clockevents_register_device vmlinux EXPORT_SYMBOL_GPL
-+0x5672add2 nf_conntrack_set_hashsize net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xe5cf9c6b cache_check vmlinux EXPORT_SYMBOL_GPL
-+0x4bc96635 ifla_policy vmlinux EXPORT_SYMBOL
-+0x35cb4429 tty_unthrottle vmlinux EXPORT_SYMBOL
-+0xdd9d1ca1 set_blocksize vmlinux EXPORT_SYMBOL
-+0x8e13511f block_page_mkwrite vmlinux EXPORT_SYMBOL
-+0x85b9e216 set_timer_slack vmlinux EXPORT_SYMBOL_GPL
-+0x0569dca2 class_compat_remove_link vmlinux EXPORT_SYMBOL_GPL
-+0x7d5c1ae6 uart_unregister_driver vmlinux EXPORT_SYMBOL
-+0x6fd7b2a5 crypto_spawn_tfm vmlinux EXPORT_SYMBOL_GPL
-+0x2e77637b generic_error_remove_page vmlinux EXPORT_SYMBOL
-+0xcc344f76 nf_ct_nat_offset net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x4fb169f5 ipv6_chk_prefix vmlinux EXPORT_SYMBOL
-+0xed1bfd69 ip6_dst_lookup_flow vmlinux EXPORT_SYMBOL_GPL
-+0x39d847fa inet_csk_search_req vmlinux EXPORT_SYMBOL_GPL
-+0x6ddfd8bc inet_unhash vmlinux EXPORT_SYMBOL_GPL
-+0x6aed133e mdio_bus_type vmlinux EXPORT_SYMBOL
-+0xf8ccb652 blk_execute_rq vmlinux EXPORT_SYMBOL
-+0x993019f7 rpc_call_sync vmlinux EXPORT_SYMBOL_GPL
-+0xef6a7e95 ip6_xmit vmlinux EXPORT_SYMBOL
-+0xb5044271 vsscanf vmlinux EXPORT_SYMBOL
-+0xa583f8ce seq_open_net vmlinux EXPORT_SYMBOL_GPL
-+0x82d79b51 sysctl_vfs_cache_pressure vmlinux EXPORT_SYMBOL_GPL
-+0x04486e88 rcu_batches_completed vmlinux EXPORT_SYMBOL_GPL
-+0x0e52592a panic vmlinux EXPORT_SYMBOL
-+0x96dbcca2 ioremap_prot vmlinux EXPORT_SYMBOL
-+0x97f6197b pci_set_dma_seg_boundary vmlinux EXPORT_SYMBOL
-+0x5c265cba sg_init_one vmlinux EXPORT_SYMBOL
-+0x12da5bb2 __kmalloc vmlinux EXPORT_SYMBOL
-+0x26477c07 __vmalloc vmlinux EXPORT_SYMBOL
-+0xc19db54a kobject_init_and_add vmlinux EXPORT_SYMBOL_GPL
-+0x0aa2fcd3 rpc_wake_up_next vmlinux EXPORT_SYMBOL_GPL
-+0x7da4ef46 __ip_select_ident vmlinux EXPORT_SYMBOL
-+0x81fb8fe5 skb_gro_receive vmlinux EXPORT_SYMBOL_GPL
-+0xbe7e6656 pci_find_ht_capability vmlinux EXPORT_SYMBOL_GPL
-+0x066cab2a pci_find_next_ht_capability vmlinux EXPORT_SYMBOL_GPL
-+0x18765207 journal_load vmlinux EXPORT_SYMBOL
-+0xd9bdbb86 flock_lock_file_wait vmlinux EXPORT_SYMBOL
-+0x81f1044c xt_find_match vmlinux EXPORT_SYMBOL
-+0x21de11a8 __skb_warn_lro_forwarding vmlinux EXPORT_SYMBOL
-+0xbe6f064d idr_for_each vmlinux EXPORT_SYMBOL
-+0xf3013d91 shash_ahash_digest vmlinux EXPORT_SYMBOL_GPL
-+0x5fcadf66 locks_init_lock vmlinux EXPORT_SYMBOL
-+0xfede227a bio_add_pc_page vmlinux EXPORT_SYMBOL
-+0x71c90087 memcmp vmlinux EXPORT_SYMBOL
-+0x77ec2fe2 netif_stacked_transfer_operstate vmlinux EXPORT_SYMBOL
-+0xf5fc2242 d_alloc_name vmlinux EXPORT_SYMBOL
-+0xaa6e4df5 _raw_write_lock_irqsave vmlinux EXPORT_SYMBOL
-+0xc0a0f334 napi_frags_finish vmlinux EXPORT_SYMBOL
-+0xce7ce037 of_translate_address vmlinux EXPORT_SYMBOL
-+0xaba0a17d devm_ioport_unmap vmlinux EXPORT_SYMBOL
-+0xe809a0f7 cont_write_begin vmlinux EXPORT_SYMBOL
-+0x9a48be6f vfs_readdir vmlinux EXPORT_SYMBOL
-+0x881039d0 zlib_inflate vmlinux EXPORT_SYMBOL
-+0xa43b1297 vscnprintf vmlinux EXPORT_SYMBOL
-+0xee4fe3e4 blk_recount_segments vmlinux EXPORT_SYMBOL
-+0x94a1af32 simple_statfs vmlinux EXPORT_SYMBOL
-+0x3e0e9023 param_set_long vmlinux EXPORT_SYMBOL
-+0xd8326202 xfrm6_tunnel_deregister net/ipv6/tunnel6 EXPORT_SYMBOL
-+0x3b5a4e82 xfrm4_tunnel_deregister net/ipv4/tunnel4 EXPORT_SYMBOL
-+0x5b14ec1a rpc_put_mount vmlinux EXPORT_SYMBOL_GPL
-+0x602cf2ee km_policy_notify vmlinux EXPORT_SYMBOL
-+0xa47d64bf ip_mc_join_group vmlinux EXPORT_SYMBOL
-+0xc099fc6f usb_is_intel_switchable_xhci vmlinux EXPORT_SYMBOL_GPL
-+0x3244fd7d usb_string vmlinux EXPORT_SYMBOL_GPL
-+0xdb760f52 __kfifo_free vmlinux EXPORT_SYMBOL
-+0x0b8fef76 nf_ct_unexpect_related net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x328d3c91 inet_csk_reqsk_queue_hash_add vmlinux EXPORT_SYMBOL_GPL
-+0xe6e1c5fe uuid_be_gen vmlinux EXPORT_SYMBOL_GPL
-+0xa6fb4d71 debugfs_remove vmlinux EXPORT_SYMBOL_GPL
-+0x2f4ac4ea lease_modify vmlinux EXPORT_SYMBOL
-+0xf441ac43 ioread8_rep vmlinux EXPORT_SYMBOL
-+0x979eddb8 xfrm_dst_ifdown vmlinux EXPORT_SYMBOL
-+0x64f428d3 neigh_seq_start vmlinux EXPORT_SYMBOL
-+0x59825b9a pci_assign_unassigned_bridge_resources vmlinux EXPORT_SYMBOL_GPL
-+0x3f0546a8 ioread32_rep vmlinux EXPORT_SYMBOL
-+0xfe7887e9 rpc_put_task vmlinux EXPORT_SYMBOL_GPL
-+0xf9f40caa eth_header_cache_update vmlinux EXPORT_SYMBOL
-+0xb31526ee sg_copy_from_buffer vmlinux EXPORT_SYMBOL
-+0x73e20c1c strlcpy vmlinux EXPORT_SYMBOL
-+0x8abacc47 get_max_files vmlinux EXPORT_SYMBOL_GPL
-+0x328a05f1 strncpy vmlinux EXPORT_SYMBOL
-+0x548a40b6 scsi_release_buffers vmlinux EXPORT_SYMBOL
-+0x13574bbf nf_net_netfilter_sysctl_path vmlinux EXPORT_SYMBOL_GPL
-+0x738196bf driver_create_file vmlinux EXPORT_SYMBOL_GPL
-+0x7193680a kern_mount_data vmlinux EXPORT_SYMBOL_GPL
-+0x8ef33ff8 __init_kthread_worker vmlinux EXPORT_SYMBOL_GPL
-+0xa10f05a8 par_io_of_config vmlinux EXPORT_SYMBOL
-+0xf6367114 blk_requeue_request vmlinux EXPORT_SYMBOL
-+0x84fc4fe5 insert_inode_locked4 vmlinux EXPORT_SYMBOL
-+0x41482d8b strndup_user vmlinux EXPORT_SYMBOL
-+0xddd58dc0 ring_buffer_reset vmlinux EXPORT_SYMBOL_GPL
-+0xfae9f8ef crypto_init_spawn vmlinux EXPORT_SYMBOL_GPL
-+0x9c78b4da mount_nodev vmlinux EXPORT_SYMBOL
-+0xf40fbfa7 pagevec_lookup vmlinux EXPORT_SYMBOL
-+0x376591a1 xfrm_find_acq vmlinux EXPORT_SYMBOL
-+0xaf7abced eth_mac_addr vmlinux EXPORT_SYMBOL
-+0xe7a0dd2c scsi_scan_host vmlinux EXPORT_SYMBOL
-+0xa22fa240 scsi_setup_fs_cmnd vmlinux EXPORT_SYMBOL
-+0xebf65040 svc_xprt_received vmlinux EXPORT_SYMBOL_GPL
-+0x12c92332 tcp_sendpage vmlinux EXPORT_SYMBOL
-+0xb98a0185 rtc_tm_to_time vmlinux EXPORT_SYMBOL
-+0xe5883bd9 class_compat_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x47b3f862 radix_tree_lookup_slot vmlinux EXPORT_SYMBOL
-+0x91621d6a allocate_resource vmlinux EXPORT_SYMBOL
-+0xc08647ff ring_buffer_bytes_cpu vmlinux EXPORT_SYMBOL_GPL
-+0x02d81845 audit_log_task_context vmlinux EXPORT_SYMBOL
-+0x6b13f214 task_ns_capable vmlinux EXPORT_SYMBOL
-+0x49a08acf spi_write_then_read vmlinux EXPORT_SYMBOL_GPL
-+0x264aab93 mtd_device_parse_register vmlinux EXPORT_SYMBOL_GPL
-+0x40946686 splice_from_pipe_feed vmlinux EXPORT_SYMBOL
-+0xf9a054b5 __round_jiffies vmlinux EXPORT_SYMBOL_GPL
-+0xfe822d55 get_brgfreq vmlinux EXPORT_SYMBOL
-+0x03c06156 bitmap_fold vmlinux EXPORT_SYMBOL
-+0x734b6620 vfs_rmdir vmlinux EXPORT_SYMBOL
-+0x92eb404f generic_shutdown_super vmlinux EXPORT_SYMBOL
-+0x37e74642 get_jiffies_64 vmlinux EXPORT_SYMBOL
-+0x3f3d5755 scsi_track_queue_full vmlinux EXPORT_SYMBOL
-+0x45d4a34f init_buffer vmlinux EXPORT_SYMBOL
-+0xfa2e134e __sock_recv_ts_and_drops vmlinux EXPORT_SYMBOL_GPL
-+0xbf7fd2f5 schedule_timeout_killable vmlinux EXPORT_SYMBOL
-+0xc14de4a4 rpcauth_create vmlinux EXPORT_SYMBOL_GPL
-+0x286a504e sock_no_getname vmlinux EXPORT_SYMBOL
-+0xb2abf6e7 vfs_link vmlinux EXPORT_SYMBOL
-+0x85050965 __irq_alloc_descs vmlinux EXPORT_SYMBOL_GPL
-+0x6e0778f8 call_usermodehelper_setup vmlinux EXPORT_SYMBOL
-+0x46de0081 netlink_rcv_skb vmlinux EXPORT_SYMBOL
-+0x7e7aea36 phy_driver_unregister vmlinux EXPORT_SYMBOL
-+0xf82abc1d isa_dma_bridge_buggy vmlinux EXPORT_SYMBOL
-+0x5aa2ba6e crypto_alloc_pcomp vmlinux EXPORT_SYMBOL_GPL
-+0x0254aae8 journal_flush vmlinux EXPORT_SYMBOL
-+0xedc2994d ktime_get_real vmlinux EXPORT_SYMBOL_GPL
-+0x6258ff7a panic_notifier_list vmlinux EXPORT_SYMBOL
-+0x493615f0 __xfrm_state_delete vmlinux EXPORT_SYMBOL
-+0x91781620 unregister_mtd_chip_driver vmlinux EXPORT_SYMBOL
-+0x82f776b7 gpio_export vmlinux EXPORT_SYMBOL_GPL
-+0x8aee4b8e do_splice_from vmlinux EXPORT_SYMBOL_GPL
-+0x5edbbeed d_delete vmlinux EXPORT_SYMBOL
-+0x35829944 find_get_pages_tag vmlinux EXPORT_SYMBOL
-+0xc8fd727e mod_timer vmlinux EXPORT_SYMBOL
-+0x68e0e289 idr_remove vmlinux EXPORT_SYMBOL
-+0xc61be59c ida_remove vmlinux EXPORT_SYMBOL
-+0x76053cac mnt_set_expiry vmlinux EXPORT_SYMBOL
-+0xd0ec1a6b use_mm vmlinux EXPORT_SYMBOL_GPL
-+0x1d3865da param_get_invbool vmlinux EXPORT_SYMBOL
-+0xcc964b37 flush_delayed_work_sync vmlinux EXPORT_SYMBOL
-+0xbf9d1b96 nfsd_debug vmlinux EXPORT_SYMBOL_GPL
-+0xb84fe6ac devres_destroy vmlinux EXPORT_SYMBOL_GPL
-+0xbe3f06f3 tty_hangup vmlinux EXPORT_SYMBOL
-+0x67d548bf pci_disable_device vmlinux EXPORT_SYMBOL
-+0x873f76af add_page_wait_queue vmlinux EXPORT_SYMBOL_GPL
-+0x1a2bc07b flush_tlb_mm vmlinux EXPORT_SYMBOL
-+0x17643c44 mdiobus_read vmlinux EXPORT_SYMBOL
-+0xd9bac924 tty_termios_copy_hw vmlinux EXPORT_SYMBOL
-+0x2f8ebbe0 rpc_ntop vmlinux EXPORT_SYMBOL_GPL
-+0x44ed046c rpc_pton vmlinux EXPORT_SYMBOL_GPL
-+0xcfd9a2c0 des_ekey vmlinux EXPORT_SYMBOL_GPL
-+0x1407c6e7 kmap_prot vmlinux EXPORT_SYMBOL
-+0xf120872a dql_completed vmlinux EXPORT_SYMBOL
-+0x43a939cc key_link vmlinux EXPORT_SYMBOL
-+0x34a8b7a1 read_cache_page vmlinux EXPORT_SYMBOL
-+0x1cfc799e dev_change_flags vmlinux EXPORT_SYMBOL
-+0x801f5a3f __strncpy_from_user vmlinux EXPORT_SYMBOL
-+0x41f9eb17 xfrm_state_walk vmlinux EXPORT_SYMBOL
-+0x1165ba63 phy_scan_fixups vmlinux EXPORT_SYMBOL
-+0x65420d1e nla_put_nohdr vmlinux EXPORT_SYMBOL
-+0x98691115 napi_gro_flush vmlinux EXPORT_SYMBOL
-+0xa51f1bdd scsi_set_medium_removal vmlinux EXPORT_SYMBOL
-+0x77dab830 keyring_clear vmlinux EXPORT_SYMBOL
-+0xff8862d7 rh_get_stats vmlinux EXPORT_SYMBOL_GPL
-+0x8fbf37e0 profile_pc vmlinux EXPORT_SYMBOL
-+0x6532831c gss_service_to_auth_domain_name vmlinux EXPORT_SYMBOL_GPL
-+0x7e1183c9 async_schedule vmlinux EXPORT_SYMBOL_GPL
-+0x9e1cfc90 ioremap_wc vmlinux EXPORT_SYMBOL
-+0xa47434fb __nla_put vmlinux EXPORT_SYMBOL
-+0x4c2ae700 strnstr vmlinux EXPORT_SYMBOL
-+0xcbe78671 svc_sock_names vmlinux EXPORT_SYMBOL_GPL
-+0x6415b696 inet_diag_register vmlinux EXPORT_SYMBOL_GPL
-+0x41a855a9 sdhci_pltfm_unregister vmlinux EXPORT_SYMBOL_GPL
-+0xf5222143 _raw_spin_lock_irqsave vmlinux EXPORT_SYMBOL
-+0xe17482f0 tcp_done vmlinux EXPORT_SYMBOL_GPL
-+0x7fdf3256 sysdev_show_ulong vmlinux EXPORT_SYMBOL_GPL
-+0x2fb6de5d add_device_randomness vmlinux EXPORT_SYMBOL
-+0xde417b81 async_schedule_domain vmlinux EXPORT_SYMBOL_GPL
-+0x6ff5969a usb_init_urb vmlinux EXPORT_SYMBOL_GPL
-+0xd4e0fb01 get_phy_id vmlinux EXPORT_SYMBOL
-+0x35cca30f blk_free_tags vmlinux EXPORT_SYMBOL
-+0xc0b2494c vfsmount_lock_lock_init vmlinux EXPORT_SYMBOL
-+0xefdd5a63 ktime_get_ts vmlinux EXPORT_SYMBOL_GPL
-+0xe7ce7439 _memcpy_fromio vmlinux EXPORT_SYMBOL
-+0xe4ab69a4 usb_hcd_unmap_urb_setup_for_dma vmlinux EXPORT_SYMBOL_GPL
-+0xadf804eb scsi_device_get vmlinux EXPORT_SYMBOL
-+0xe2ab0f51 scsi_device_put vmlinux EXPORT_SYMBOL
-+0x51ce5ad3 files_lglock_local_lock_cpu vmlinux EXPORT_SYMBOL
-+0x37eab51b map_vm_area vmlinux EXPORT_SYMBOL_GPL
-+0x0084e86d unregister_shrinker vmlinux EXPORT_SYMBOL
-+0x05c1da0d isa_bridge_pcidev vmlinux EXPORT_SYMBOL_GPL
-+0xcb1c9e78 ipv6_dev_get_saddr vmlinux EXPORT_SYMBOL
-+0xcbbd7b2f xfrm_policy_flush vmlinux EXPORT_SYMBOL
-+0xab5e43fc mmc_set_blocklen vmlinux EXPORT_SYMBOL
-+0xb8aa2342 __check_region vmlinux EXPORT_SYMBOL
-+0x328aa64c par_io_data_set vmlinux EXPORT_SYMBOL
-+0x90dd262f nf_nat_protocol_register net/ipv4/netfilter/nf_nat EXPORT_SYMBOL
-+0xf6388c56 sysctl_ip_default_ttl vmlinux EXPORT_SYMBOL
-+0xba7ff9a8 napi_gro_frags vmlinux EXPORT_SYMBOL
-+0x59923e50 pci_load_saved_state vmlinux EXPORT_SYMBOL_GPL
-+0x15864b03 flex_array_get vmlinux EXPORT_SYMBOL
-+0x0cf9a646 key_task_permission vmlinux EXPORT_SYMBOL
-+0x9cbb7f29 nf_nat_protocol_unregister net/ipv4/netfilter/nf_nat EXPORT_SYMBOL
-+0xfc464847 inet_diag_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x70a6efa3 sock_sendmsg vmlinux EXPORT_SYMBOL
-+0x61308070 disk_get_part vmlinux EXPORT_SYMBOL_GPL
-+0x2333005e netlink_kernel_release vmlinux EXPORT_SYMBOL
-+0x0ffc7c8b __sock_create vmlinux EXPORT_SYMBOL
-+0x190f4530 rtc_set_mmss vmlinux EXPORT_SYMBOL_GPL
-+0x8384d453 pci_bus_resource_n vmlinux EXPORT_SYMBOL_GPL
-+0x4289f7df down_interruptible vmlinux EXPORT_SYMBOL
-+0x3064cd91 netif_carrier_off vmlinux EXPORT_SYMBOL
-+0x26b9af4e mmc_request_done vmlinux EXPORT_SYMBOL
-+0x46074c17 sdev_evt_alloc vmlinux EXPORT_SYMBOL_GPL
-+0xa43e2c08 lease_get_mtime vmlinux EXPORT_SYMBOL
-+0x17d3b09a sb_set_blocksize vmlinux EXPORT_SYMBOL
-+0x850ac629 sdio_writew vmlinux EXPORT_SYMBOL_GPL
-+0x3744cf36 vmalloc_to_pfn vmlinux EXPORT_SYMBOL
-+0x4c18ad3a get_task_mm vmlinux EXPORT_SYMBOL_GPL
-+0xe8b2187c nf_ct_expect_put net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xb9b9df41 usb_amd_dev_put vmlinux EXPORT_SYMBOL_GPL
-+0x5a642ff0 crypto_unregister_alg vmlinux EXPORT_SYMBOL_GPL
-+0x4484a83b dump_write vmlinux EXPORT_SYMBOL
-+0x0fae7d45 lock_super vmlinux EXPORT_SYMBOL
-+0xb8f92e75 __class_create vmlinux EXPORT_SYMBOL_GPL
-+0x86e44713 filp_open vmlinux EXPORT_SYMBOL
-+0xad91149b generic_file_aio_write vmlinux EXPORT_SYMBOL
-+0x43af7a67 xfrm6_prepare_output vmlinux EXPORT_SYMBOL
-+0x4d4fd5f1 xfrm_calg_get_byname vmlinux EXPORT_SYMBOL_GPL
-+0xc6c1239b xfrm4_prepare_output vmlinux EXPORT_SYMBOL
-+0x14665bed pci_read_vpd vmlinux EXPORT_SYMBOL
-+0x51014234 get_disk vmlinux EXPORT_SYMBOL
-+0xb2c3e937 __free_pages vmlinux EXPORT_SYMBOL
-+0x4ff0cd36 inet_bind vmlinux EXPORT_SYMBOL
-+0x034e17a5 qdisc_watchdog_init vmlinux EXPORT_SYMBOL
-+0xe861f9ad class_find_device vmlinux EXPORT_SYMBOL_GPL
-+0xfe3c4e28 __register_binfmt vmlinux EXPORT_SYMBOL
-+0x058e4b7d xfrm_init_state vmlinux EXPORT_SYMBOL
-+0x37ac26b3 pci_assign_resource vmlinux EXPORT_SYMBOL
-+0x89ca47bf kstrtos8_from_user vmlinux EXPORT_SYMBOL
-+0xff18ef68 crypto_init_spawn2 vmlinux EXPORT_SYMBOL_GPL
-+0x358365c5 xfrm_user_policy vmlinux EXPORT_SYMBOL
-+0x6117420a netif_notify_peers vmlinux EXPORT_SYMBOL
-+0xf94b112b netif_napi_add vmlinux EXPORT_SYMBOL
-+0x562ccd0e skb_split vmlinux EXPORT_SYMBOL
-+0xf5b3060b input_grab_device vmlinux EXPORT_SYMBOL
-+0xa177bc19 default_mtd_writev vmlinux EXPORT_SYMBOL_GPL
-+0x2376e92b tty_port_block_til_ready vmlinux EXPORT_SYMBOL
-+0x81b22cf9 journal_try_to_free_buffers vmlinux EXPORT_SYMBOL
-+0xf10de535 ioread8 vmlinux EXPORT_SYMBOL
-+0x686c703f xfrm_count_auth_supported vmlinux EXPORT_SYMBOL_GPL
-+0x8c10c6f6 netlink_broadcast vmlinux EXPORT_SYMBOL
-+0x66645e38 of_property_read_string_index vmlinux EXPORT_SYMBOL_GPL
-+0x0343bdf1 __i2c_board_list vmlinux EXPORT_SYMBOL_GPL
-+0xa07bb953 block_write_full_page_endio vmlinux EXPORT_SYMBOL
-+0x317a1174 shmem_file_setup vmlinux EXPORT_SYMBOL_GPL
-+0xc3cf1128 in_group_p vmlinux EXPORT_SYMBOL
-+0xc631580a console_unlock vmlinux EXPORT_SYMBOL
-+0x9524b0ae _outsb vmlinux EXPORT_SYMBOL
-+0xcfea9e86 udp_sendmsg vmlinux EXPORT_SYMBOL
-+0x318394d8 mmc_start_req vmlinux EXPORT_SYMBOL
-+0xbdfcce9d elv_rb_former_request vmlinux EXPORT_SYMBOL
-+0x35fbd6a1 __kfifo_dma_out_prepare_r vmlinux EXPORT_SYMBOL
-+0xf34bd1d5 dcb_ieee_setapp vmlinux EXPORT_SYMBOL
-+0xcbb30a2b dcb_ieee_delapp vmlinux EXPORT_SYMBOL
-+0xf53d4c26 qdisc_class_hash_destroy vmlinux EXPORT_SYMBOL
-+0xcc26e5cf sdio_register_driver vmlinux EXPORT_SYMBOL_GPL
-+0x50deef5c usb_kill_urb vmlinux EXPORT_SYMBOL_GPL
-+0xa87e68e1 usb_get_intf vmlinux EXPORT_SYMBOL_GPL
-+0x9e607910 audit_log vmlinux EXPORT_SYMBOL
-+0x767b18fb set_security_override_from_ctx vmlinux EXPORT_SYMBOL
-+0x5ab3b29b xdr_process_buf vmlinux EXPORT_SYMBOL_GPL
-+0x065f3688 sk_wait_data vmlinux EXPORT_SYMBOL
-+0xc724970d pci_enable_obff vmlinux EXPORT_SYMBOL
-+0x762ea593 crypto_remove_spawns vmlinux EXPORT_SYMBOL_GPL
-+0x4fd4e89d ring_buffer_empty_cpu vmlinux EXPORT_SYMBOL_GPL
-+0x0f28cb91 nvram_read_byte vmlinux EXPORT_SYMBOL
-+0xc390630a xt_replace_table vmlinux EXPORT_SYMBOL_GPL
-+0xf9943f1b __netpoll_setup vmlinux EXPORT_SYMBOL_GPL
-+0x08cc84e7 __percpu_counter_init vmlinux EXPORT_SYMBOL
-+0x6d6c930c irq_set_affinity_notifier vmlinux EXPORT_SYMBOL_GPL
-+0x698fe0cc inet_hashinfo_init vmlinux EXPORT_SYMBOL_GPL
-+0x262e9a73 input_mt_report_pointer_emulation vmlinux EXPORT_SYMBOL
-+0x333bf31b usb_stor_bulk_transfer_sg vmlinux EXPORT_SYMBOL_GPL
-+0x56cd1a50 pci_ioremap_bar vmlinux EXPORT_SYMBOL_GPL
-+0xadd2969f end_buffer_read_sync vmlinux EXPORT_SYMBOL
-+0x227badd6 mod_timer_pinned vmlinux EXPORT_SYMBOL
-+0x8276963f set_cpus_allowed_ptr vmlinux EXPORT_SYMBOL_GPL
-+0xfd168974 neigh_for_each vmlinux EXPORT_SYMBOL
-+0x7e8699a8 rtc_initialize_alarm vmlinux EXPORT_SYMBOL_GPL
-+0x6971447a rtc_month_days vmlinux EXPORT_SYMBOL
-+0x7e64181d usb_calc_bus_time vmlinux EXPORT_SYMBOL_GPL
-+0xabc7e656 sg_miter_next vmlinux EXPORT_SYMBOL
-+0xdd8e46ba crypto_init_shash_spawn vmlinux EXPORT_SYMBOL_GPL
-+0xe9b01876 crypto_init_ahash_spawn vmlinux EXPORT_SYMBOL_GPL
-+0x6e50cff7 posix_timers_register_clock vmlinux EXPORT_SYMBOL_GPL
-+0x8ff66782 param_get_ushort vmlinux EXPORT_SYMBOL
-+0xe6dd236d clear_pages vmlinux EXPORT_SYMBOL
-+0x67ef2a40 svc_sock_update_bufs vmlinux EXPORT_SYMBOL_GPL
-+0x5c27b6d6 skb_pull vmlinux EXPORT_SYMBOL
-+0x2aa1292b usb_find_interface vmlinux EXPORT_SYMBOL_GPL
-+0x8574ca6c gpio_request_array vmlinux EXPORT_SYMBOL_GPL
-+0xd988b61f swiotlb_unmap_page vmlinux EXPORT_SYMBOL_GPL
-+0x6da928f4 _insw_ns vmlinux EXPORT_SYMBOL
-+0x05a514a1 _insl_ns vmlinux EXPORT_SYMBOL
-+0x93d2422d snmp_mib_free vmlinux EXPORT_SYMBOL_GPL
-+0x1e41fddb neigh_app_ns vmlinux EXPORT_SYMBOL
-+0xc9501ade phy_start_interrupts vmlinux EXPORT_SYMBOL
-+0x09d998e1 scsi_get_vpd_page vmlinux EXPORT_SYMBOL_GPL
-+0x9dfdf722 gpio_free_array vmlinux EXPORT_SYMBOL_GPL
-+0x5d51bcf7 scatterwalk_start vmlinux EXPORT_SYMBOL_GPL
-+0x53472771 sysfs_put vmlinux EXPORT_SYMBOL_GPL
-+0x526c437a xfrm_state_check_expire vmlinux EXPORT_SYMBOL
-+0x393c4c4e netdev_boot_setup_check vmlinux EXPORT_SYMBOL
-+0x1ef1100f sock_i_uid vmlinux EXPORT_SYMBOL
-+0xf4009166 sock_i_ino vmlinux EXPORT_SYMBOL
-+0xc046033e seq_bitmap vmlinux EXPORT_SYMBOL
-+0x3942b0c9 ip_build_and_send_pkt vmlinux EXPORT_SYMBOL_GPL
-+0xb93c76a8 register_gifconf vmlinux EXPORT_SYMBOL
-+0xcd07f6b1 gpiochip_find vmlinux EXPORT_SYMBOL_GPL
-+0x292be0eb crypto_rng_type vmlinux EXPORT_SYMBOL_GPL
-+0x457594fa crypto_alg_list vmlinux EXPORT_SYMBOL_GPL
-+0xc04e7aa9 sync_inode_metadata vmlinux EXPORT_SYMBOL
-+0xafff3d1d mempool_alloc vmlinux EXPORT_SYMBOL
-+0x86f6b99d synchronize_rcu_expedited vmlinux EXPORT_SYMBOL_GPL
-+0xaa6901ac __kfifo_out_r vmlinux EXPORT_SYMBOL
-+0x52f1bf6b __srcu_read_lock vmlinux EXPORT_SYMBOL_GPL
-+0xd03c7700 secure_ipv4_port_ephemeral vmlinux EXPORT_SYMBOL_GPL
-+0x79578100 proc_dointvec_minmax vmlinux EXPORT_SYMBOL
-+0x8581db4c i2c_bus_type vmlinux EXPORT_SYMBOL_GPL
-+0xcd898fd4 do_truncate vmlinux EXPORT_SYMBOL_GPL
-+0x7cd81e29 kmalloc_caches vmlinux EXPORT_SYMBOL
-+0xdc43a9c8 daemonize vmlinux EXPORT_SYMBOL
-+0x390dd42a rpc_malloc vmlinux EXPORT_SYMBOL_GPL
-+0xb2390b29 icmpv6_send vmlinux EXPORT_SYMBOL
-+0x19ade8fc put_driver vmlinux EXPORT_SYMBOL_GPL
-+0xc00f7d59 blk_queue_make_request vmlinux EXPORT_SYMBOL
-+0x9cb013cc put_page vmlinux EXPORT_SYMBOL
-+0x74954462 timecounter_read vmlinux EXPORT_SYMBOL_GPL
-+0x6fff8279 nf_conntrack_lock net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xab930e2e rpc_lookup_cred vmlinux EXPORT_SYMBOL_GPL
-+0x801c8645 rtc_device_register vmlinux EXPORT_SYMBOL_GPL
-+0x445fc790 input_reset_device vmlinux EXPORT_SYMBOL
-+0xbc8a443b tty_ldisc_deref vmlinux EXPORT_SYMBOL_GPL
-+0x7b645a57 vfs_getattr vmlinux EXPORT_SYMBOL
-+0x31f79892 pci_domain_nr vmlinux EXPORT_SYMBOL
-+0x5b582800 inet_del_protocol vmlinux EXPORT_SYMBOL
-+0x03b7b2e4 neigh_update vmlinux EXPORT_SYMBOL
-+0xe03951df phy_stop vmlinux EXPORT_SYMBOL
-+0xcce40c42 put_io_context vmlinux EXPORT_SYMBOL
-+0x5baf344d blk_queue_io_min vmlinux EXPORT_SYMBOL
-+0xf9fbdc25 nobh_truncate_page vmlinux EXPORT_SYMBOL
-+0xc9b8c308 __kfifo_dma_out_prepare vmlinux EXPORT_SYMBOL
-+0x045072cd nf_ct_port_nla_policy net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xdfaecb3e ethtool_op_set_tx_hw_csum vmlinux EXPORT_SYMBOL
-+0x5412c7c7 up vmlinux EXPORT_SYMBOL
-+0x23f5e02a rpc_call_start vmlinux EXPORT_SYMBOL_GPL
-+0x8eed1f0d icmp_send vmlinux EXPORT_SYMBOL
-+0x1ed928f6 nfs4_set_ds_client vmlinux EXPORT_SYMBOL_GPL
-+0x98d5de4f path_get vmlinux EXPORT_SYMBOL
-+0x07077c7d iov_iter_copy_from_user_atomic vmlinux EXPORT_SYMBOL
-+0x93a2cb47 reserve_pmc_hardware vmlinux EXPORT_SYMBOL_GPL
-+0xa726ec8b xfrm_state_update vmlinux EXPORT_SYMBOL
-+0x8a74500b usb_deregister_dev vmlinux EXPORT_SYMBOL_GPL
-+0x3e2e9995 usb_hcd_is_primary_hcd vmlinux EXPORT_SYMBOL_GPL
-+0x9f7d9edf crypto_grab_aead vmlinux EXPORT_SYMBOL_GPL
-+0x9c57851d hrtimer_start vmlinux EXPORT_SYMBOL_GPL
-+0x0a43ebfc get_pid_task vmlinux EXPORT_SYMBOL_GPL
-+0x6c702af7 sysctl_udp_rmem_min vmlinux EXPORT_SYMBOL
-+0x6f4d5b8b dev_open vmlinux EXPORT_SYMBOL
-+0x25ae2be1 lock_sock_fast vmlinux EXPORT_SYMBOL
-+0x65a76805 ilookup vmlinux EXPORT_SYMBOL
-+0x4302d0eb free_pages vmlinux EXPORT_SYMBOL
-+0xbfc177bc iowrite32_rep vmlinux EXPORT_SYMBOL
-+0x8cc79cab iowrite16_rep vmlinux EXPORT_SYMBOL
-+0x4e7df11b irq_create_of_mapping vmlinux EXPORT_SYMBOL_GPL
-+0x4b48ebf0 of_irq_map_pci vmlinux EXPORT_SYMBOL_GPL
-+0x6e999abc mdiobus_free vmlinux EXPORT_SYMBOL
-+0x8d610fe8 generic_file_fsync vmlinux EXPORT_SYMBOL
-+0x96b22cab unlock_new_inode vmlinux EXPORT_SYMBOL
-+0x3f3633b3 __f_setown vmlinux EXPORT_SYMBOL
-+0xf82f16b3 execute_in_process_context vmlinux EXPORT_SYMBOL_GPL
-+0x11f3795f xt_find_table_lock vmlinux EXPORT_SYMBOL_GPL
-+0x62737e1d sock_unregister vmlinux EXPORT_SYMBOL
-+0x760a3bf8 kset_register vmlinux EXPORT_SYMBOL
-+0xf2e55f98 fput vmlinux EXPORT_SYMBOL
-+0x6cf0d67d qe_get_num_of_snums vmlinux EXPORT_SYMBOL
-+0x6b3ec69d platform_device_alloc vmlinux EXPORT_SYMBOL_GPL
-+0x60da3cf0 posix_timer_event vmlinux EXPORT_SYMBOL_GPL
-+0x52e15131 ip6_frag_init vmlinux EXPORT_SYMBOL
-+0x234bde50 journal_set_features vmlinux EXPORT_SYMBOL
-+0x4cd38ab6 __fsnotify_parent vmlinux EXPORT_SYMBOL_GPL
-+0xb78c61e8 param_ops_bool vmlinux EXPORT_SYMBOL
-+0xa4274b10 usb_ep0_reinit vmlinux EXPORT_SYMBOL_GPL
-+0x8b92c65b add_disk vmlinux EXPORT_SYMBOL
-+0x3e1dd4ab xt_rateest_put net/netfilter/xt_RATEEST EXPORT_SYMBOL_GPL
-+0xe23deb2d inet_shutdown vmlinux EXPORT_SYMBOL
-+0x33ee9189 posix_lock_file_wait vmlinux EXPORT_SYMBOL
-+0xc079de49 inet_csk_clone vmlinux EXPORT_SYMBOL_GPL
-+0x5dc54a6c xt_unregister_table vmlinux EXPORT_SYMBOL_GPL
-+0x2c5b1d98 uart_remove_one_port vmlinux EXPORT_SYMBOL
-+0x4e830a3e strnicmp vmlinux EXPORT_SYMBOL
-+0x4ef107d9 vmalloc_to_page vmlinux EXPORT_SYMBOL
-+0x00a15cc7 usb_get_hcd vmlinux EXPORT_SYMBOL_GPL
-+0x9b5913f9 blk_update_request vmlinux EXPORT_SYMBOL_GPL
-+0x45c43667 journal_start_commit vmlinux EXPORT_SYMBOL
-+0x235e90f3 __wake_up_bit vmlinux EXPORT_SYMBOL
-+0x71504b18 xdr_encode_array2 vmlinux EXPORT_SYMBOL_GPL
-+0x661a2f0b sock_release vmlinux EXPORT_SYMBOL
-+0x56039b1c usb_hcd_giveback_urb vmlinux EXPORT_SYMBOL_GPL
-+0x59423726 user_instantiate vmlinux EXPORT_SYMBOL_GPL
-+0x75994700 add_wait_queue_exclusive vmlinux EXPORT_SYMBOL
-+0xdc9b0085 nf_nat_icmp_reply_translation net/ipv4/netfilter/nf_nat EXPORT_SYMBOL_GPL
-+0x34908c14 print_hex_dump_bytes vmlinux EXPORT_SYMBOL
-+0x4a37f460 nlmclnt_proc vmlinux EXPORT_SYMBOL_GPL
-+0x62118f48 d_add_ci vmlinux EXPORT_SYMBOL
-+0xb5020657 phys_mem_access_prot vmlinux EXPORT_SYMBOL
-+0x5e6947f7 unregister_dcbevent_notifier vmlinux EXPORT_SYMBOL
-+0x017543f0 net_ipv6_ctl_path vmlinux EXPORT_SYMBOL_GPL
-+0xa9f3f261 net_ipv4_ctl_path vmlinux EXPORT_SYMBOL_GPL
-+0x5243725c netdev_set_master vmlinux EXPORT_SYMBOL
-+0x82939f08 __skb_checksum_complete_head vmlinux EXPORT_SYMBOL
-+0xe053341e swiotlb_map_sg vmlinux EXPORT_SYMBOL
-+0x7c9ac32e __percpu_counter_sum vmlinux EXPORT_SYMBOL
-+0xb770be3e __percpu_counter_add vmlinux EXPORT_SYMBOL
-+0x9d9c9597 idr_init vmlinux EXPORT_SYMBOL
-+0xeaf16558 ida_init vmlinux EXPORT_SYMBOL
-+0x9a19604d mpage_readpage vmlinux EXPORT_SYMBOL
-+0x70bc17d7 inode_wait vmlinux EXPORT_SYMBOL
-+0xd6ee688f vmalloc vmlinux EXPORT_SYMBOL
-+0xf31b3fd1 workqueue_set_max_active vmlinux EXPORT_SYMBOL_GPL
-+0xe10c1552 tty_port_raise_dtr_rts vmlinux EXPORT_SYMBOL
-+0xb32bff81 pci_request_region vmlinux EXPORT_SYMBOL
-+0xfa83da2c blk_queue_io_opt vmlinux EXPORT_SYMBOL
-+0xd4c14632 system_unbound_wq vmlinux EXPORT_SYMBOL_GPL
-+0x576da704 cpm_muram_dma vmlinux EXPORT_SYMBOL
-+0xe7420df4 scsi_adjust_queue_depth vmlinux EXPORT_SYMBOL
-+0xeae958fa mb_cache_entry_find_first vmlinux EXPORT_SYMBOL
-+0x10e22972 gss_mech_get_by_name vmlinux EXPORT_SYMBOL_GPL
-+0xc8910e47 tcp_unregister_congestion_control vmlinux EXPORT_SYMBOL_GPL
-+0x28811101 bio_split vmlinux EXPORT_SYMBOL
-+0x02456663 lock_rename vmlinux EXPORT_SYMBOL
-+0x1ab0d653 class_destroy vmlinux EXPORT_SYMBOL_GPL
-+0x584637d7 pci_pme_active vmlinux EXPORT_SYMBOL
-+0x864fd4d7 gpiochip_remove vmlinux EXPORT_SYMBOL_GPL
-+0xae93b4d8 __locks_copy_lock vmlinux EXPORT_SYMBOL
-+0x83df0d38 mutex_lock_killable vmlinux EXPORT_SYMBOL
-+0xa17874dd nf_ct_remove_userspace_expectations net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xcc9846dc xdr_inline_decode vmlinux EXPORT_SYMBOL_GPL
-+0x070f6230 tcp_check_req vmlinux EXPORT_SYMBOL
-+0x4fc41dd7 netlink_unicast vmlinux EXPORT_SYMBOL
-+0x6c03f58c neigh_sysctl_register vmlinux EXPORT_SYMBOL
-+0x534f54dd usb_serial_generic_read_bulk_callback vmlinux EXPORT_SYMBOL_GPL
-+0xdcb0349b sys_close vmlinux EXPORT_SYMBOL
-+0x3f2c31ce kill_pgrp vmlinux EXPORT_SYMBOL
-+0x512c741a ppc_md vmlinux EXPORT_SYMBOL
-+0x09959de7 fat_build_inode vmlinux EXPORT_SYMBOL_GPL
-+0xd34ed65a seq_read vmlinux EXPORT_SYMBOL
-+0x7d19ed18 is_bad_inode vmlinux EXPORT_SYMBOL
-+0xf612809a param_get_int vmlinux EXPORT_SYMBOL
-+0x915e1208 tb_ticks_per_usec vmlinux EXPORT_SYMBOL
-+0xeb903aa6 start_tty vmlinux EXPORT_SYMBOL
-+0x7ffc8718 gpio_set_debounce vmlinux EXPORT_SYMBOL_GPL
-+0x2b296823 shash_ahash_finup vmlinux EXPORT_SYMBOL_GPL
-+0x6544cafe user_update vmlinux EXPORT_SYMBOL_GPL
-+0xb454572a irqd_to_hwirq vmlinux EXPORT_SYMBOL_GPL
-+0x4ea0d14b nf_ct_get_tuplepr net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x095a5e59 skb_free_datagram_locked vmlinux EXPORT_SYMBOL
-+0x76fc0f60 kernel_sock_shutdown vmlinux EXPORT_SYMBOL
-+0xa5b5f374 notify_change vmlinux EXPORT_SYMBOL
-+0xae5c1715 follow_up vmlinux EXPORT_SYMBOL
-+0x0b7086d9 param_get_short vmlinux EXPORT_SYMBOL
-+0x944b9776 nf_log_bind_pf vmlinux EXPORT_SYMBOL
-+0xe2b8b326 skb_copy_and_csum_datagram_iovec vmlinux EXPORT_SYMBOL
-+0x304d21f5 sock_no_ioctl vmlinux EXPORT_SYMBOL
-+0x2c738b3f get_user_pages_fast vmlinux EXPORT_SYMBOL_GPL
-+0x644e6c65 nf_conntrack_find_get net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x2a873ac0 scsi_remove_device vmlinux EXPORT_SYMBOL
-+0x738da129 simple_empty vmlinux EXPORT_SYMBOL
-+0xe6e2bc75 shmem_read_mapping_page_gfp vmlinux EXPORT_SYMBOL_GPL
-+0x8c3682d4 xfrm_cfg_mutex vmlinux EXPORT_SYMBOL
-+0x096e161a __sk_mem_schedule vmlinux EXPORT_SYMBOL
-+0xab9efe2e __hid_register_driver vmlinux EXPORT_SYMBOL_GPL
-+0xc94631af hid_disconnect vmlinux EXPORT_SYMBOL_GPL
-+0x70cf032f usb_hcd_irq vmlinux EXPORT_SYMBOL_GPL
-+0x16edea5d __pci_register_driver vmlinux EXPORT_SYMBOL
-+0xcde172ac radix_tree_gang_lookup_tag_slot vmlinux EXPORT_SYMBOL
-+0xedb6385a blk_queue_merge_bvec vmlinux EXPORT_SYMBOL
-+0x920fe930 journal_lock_updates vmlinux EXPORT_SYMBOL
-+0x10b39a9d mnt_want_write_file vmlinux EXPORT_SYMBOL_GPL
-+0xec1efa4e ip_ct_attach vmlinux EXPORT_SYMBOL
-+0xabe640fc dev_set_mtu vmlinux EXPORT_SYMBOL
-+0x82ae4fe5 crypto_unregister_template vmlinux EXPORT_SYMBOL_GPL
-+0xcddd85e0 bd_link_disk_holder vmlinux EXPORT_SYMBOL_GPL
-+0x2919b156 xdr_decode_string_inplace vmlinux EXPORT_SYMBOL_GPL
-+0x565b6892 uuid_le_gen vmlinux EXPORT_SYMBOL_GPL
-+0xca988dd7 svc_seq_show vmlinux EXPORT_SYMBOL_GPL
-+0x52078d48 scsi_free_host_dev vmlinux EXPORT_SYMBOL
-+0xd1010d6c driver_register vmlinux EXPORT_SYMBOL_GPL
-+0x346c4ded rwsem_down_write_failed vmlinux EXPORT_SYMBOL
-+0xc630666e should_remove_suid vmlinux EXPORT_SYMBOL
-+0xe9e4c8f7 input_ff_create vmlinux EXPORT_SYMBOL_GPL
-+0x103497cf device_destroy vmlinux EXPORT_SYMBOL_GPL
-+0x8fae9b4b find_lock_page vmlinux EXPORT_SYMBOL
-+0x022d3702 srcu_notifier_chain_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x917e424e local_flush_tlb_mm vmlinux EXPORT_SYMBOL
-+0x1219dd23 unregister_pernet_device vmlinux EXPORT_SYMBOL_GPL
-+0x5fd09748 input_ff_destroy vmlinux EXPORT_SYMBOL_GPL
-+0x1b46e897 platform_get_irq_byname vmlinux EXPORT_SYMBOL_GPL
-+0x48404b9a remove_wait_queue vmlinux EXPORT_SYMBOL
-+0x0f59f197 param_array_ops vmlinux EXPORT_SYMBOL
-+0xfe88da83 napi_get_frags vmlinux EXPORT_SYMBOL
-+0x21daf6a9 sk_stream_write_space vmlinux EXPORT_SYMBOL
-+0x52af66d4 scsi_verify_blk_ioctl vmlinux EXPORT_SYMBOL
-+0x446ffab6 sysfs_notify_dirent vmlinux EXPORT_SYMBOL_GPL
-+0x13bf0f2d ipv6_dup_options vmlinux EXPORT_SYMBOL_GPL
-+0x341c8ed1 phy_register_fixup_for_id vmlinux EXPORT_SYMBOL
-+0x59021bf3 add_mtd_blktrans_dev vmlinux EXPORT_SYMBOL_GPL
-+0x40344dfc mmc_do_release_host vmlinux EXPORT_SYMBOL
-+0x52c1fde9 zap_vma_ptes vmlinux EXPORT_SYMBOL_GPL
-+0xa22bc9de rpc_init_priority_wait_queue vmlinux EXPORT_SYMBOL_GPL
-+0x0e889016 xfrm_policy_bysel_ctx vmlinux EXPORT_SYMBOL
-+0x35d4ae0a tcp_sendmsg vmlinux EXPORT_SYMBOL
-+0xfd5866dc i2c_smbus_write_word_data vmlinux EXPORT_SYMBOL
-+0x7e275ea8 scsi_complete_async_scans vmlinux EXPORT_SYMBOL_GPL
-+0x3bc40f39 elv_rb_del vmlinux EXPORT_SYMBOL
-+0x20223395 elv_rb_add vmlinux EXPORT_SYMBOL
-+0x2115a784 init_user_ns vmlinux EXPORT_SYMBOL_GPL
-+0xa5b00659 ppc_proc_freq vmlinux EXPORT_SYMBOL_GPL
-+0x4a4a77e3 netif_skb_features vmlinux EXPORT_SYMBOL
-+0xde0a03d6 sock_map_fd vmlinux EXPORT_SYMBOL
-+0x00632780 work_busy vmlinux EXPORT_SYMBOL_GPL
-+0xc368849f nvram_sync vmlinux EXPORT_SYMBOL
-+0x06c5142a __sk_mem_reclaim vmlinux EXPORT_SYMBOL
-+0x4be38e61 pcim_pin_device vmlinux EXPORT_SYMBOL
-+0xc45755de find_next_zero_bit_le vmlinux EXPORT_SYMBOL
-+0x04acf587 d_prune_aliases vmlinux EXPORT_SYMBOL
-+0x12a38747 usleep_range vmlinux EXPORT_SYMBOL
-+0x11e746e0 flush_icache_user_range vmlinux EXPORT_SYMBOL
-+0x2691412e boot_cpuid_phys vmlinux EXPORT_SYMBOL_GPL
-+0xa43b9539 memcpy_fromiovecend vmlinux EXPORT_SYMBOL
-+0x86e2446c blk_make_request vmlinux EXPORT_SYMBOL
-+0xd75c1a07 __pagevec_release vmlinux EXPORT_SYMBOL
-+0x51b65a26 rtc_lock vmlinux EXPORT_SYMBOL_GPL
-+0xdebf6baa hid_unregister_driver vmlinux EXPORT_SYMBOL_GPL
-+0x62062d4b pcie_set_readrq vmlinux EXPORT_SYMBOL
-+0xa73e3fb4 pcie_bus_configure_settings vmlinux EXPORT_SYMBOL_GPL
-+0x0bf2c9fd nla_reserve_nohdr vmlinux EXPORT_SYMBOL
-+0x6d16edba ilookup5 vmlinux EXPORT_SYMBOL
-+0x1650bf27 rcutorture_record_progress vmlinux EXPORT_SYMBOL_GPL
-+0xcd0529c7 _raw_spin_lock_irq vmlinux EXPORT_SYMBOL
-+0x38f962da prepare_creds vmlinux EXPORT_SYMBOL
-+0x44399123 mutex_unlock vmlinux EXPORT_SYMBOL
-+0xdf8a2c89 genl_register_family_with_ops vmlinux EXPORT_SYMBOL
-+0x27ad46ae dev_addr_flush vmlinux EXPORT_SYMBOL
-+0x8acf07d0 pci_block_user_cfg_access vmlinux EXPORT_SYMBOL_GPL
-+0x83a476ce bitmap_scnlistprintf vmlinux EXPORT_SYMBOL
-+0xaee9c392 journal_release_buffer vmlinux EXPORT_SYMBOL
-+0xce86792d sunrpc_cache_pipe_upcall vmlinux EXPORT_SYMBOL_GPL
-+0x08cf1a7f blkdev_get_by_dev vmlinux EXPORT_SYMBOL
-+0xd89da37f movable_zone vmlinux EXPORT_SYMBOL
-+0xd87601cc ring_buffer_unlock_commit vmlinux EXPORT_SYMBOL_GPL
-+0xd69b30e0 atomic64_add_unless vmlinux EXPORT_SYMBOL
-+0xb792aa40 simple_fill_super vmlinux EXPORT_SYMBOL
-+0xd7780596 have_submounts vmlinux EXPORT_SYMBOL
-+0x07cc4a5d printk_timed_ratelimit vmlinux EXPORT_SYMBOL
-+0x0a51ae5b virq_to_hw vmlinux EXPORT_SYMBOL_GPL
-+0xeb62ec54 sock_queue_err_skb vmlinux EXPORT_SYMBOL
-+0xe6ebc016 key_create_or_update vmlinux EXPORT_SYMBOL
-+0x1f8db7f9 ring_buffer_overrun_cpu vmlinux EXPORT_SYMBOL_GPL
-+0x0faef0ed __tasklet_schedule vmlinux EXPORT_SYMBOL
-+0xfded48ed enable_kernel_fp vmlinux EXPORT_SYMBOL
-+0x7b890c7b xprt_adjust_cwnd vmlinux EXPORT_SYMBOL_GPL
-+0xf4f14de6 rtnl_trylock vmlinux EXPORT_SYMBOL
-+0x1b852c21 dev_load vmlinux EXPORT_SYMBOL
-+0xac0ba8c1 blk_iopoll_disable vmlinux EXPORT_SYMBOL
-+0x5424df82 debugfs_create_u16 vmlinux EXPORT_SYMBOL_GPL
-+0x4bbd1ffa bio_add_page vmlinux EXPORT_SYMBOL
-+0x74193242 init_pid_ns vmlinux EXPORT_SYMBOL_GPL
-+0x7ca341af kernel_thread vmlinux EXPORT_SYMBOL
-+0x70aabf3e ipt_unregister_table net/ipv4/netfilter/ip_tables EXPORT_SYMBOL
-+0x159abb63 usb_unlink_anchored_urbs vmlinux EXPORT_SYMBOL_GPL
-+0x77ecac9f zlib_inflateEnd vmlinux EXPORT_SYMBOL
-+0xa336c35b contig_page_data vmlinux EXPORT_SYMBOL
-+0xcaaaccd0 inet_frag_evictor vmlinux EXPORT_SYMBOL
-+0x68e0937e xt_unregister_target vmlinux EXPORT_SYMBOL
-+0xb4fac2f9 pci_bus_add_device vmlinux EXPORT_SYMBOL_GPL
-+0x23679939 __iowrite32_copy vmlinux EXPORT_SYMBOL_GPL
-+0x11c5a183 nf_conntrack_unregister_notifier net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x324d7c16 xdr_enter_page vmlinux EXPORT_SYMBOL_GPL
-+0x2fff2281 fib_rules_register vmlinux EXPORT_SYMBOL_GPL
-+0x612390ad netpoll_set_trap vmlinux EXPORT_SYMBOL
-+0xfaf98462 bitrev32 vmlinux EXPORT_SYMBOL
-+0xb20a3754 simple_transaction_read vmlinux EXPORT_SYMBOL
-+0x8a99a016 mempool_free_slab vmlinux EXPORT_SYMBOL
-+0xe384a102 usb_speed_string vmlinux EXPORT_SYMBOL_GPL
-+0x27ee902c generic_setxattr vmlinux EXPORT_SYMBOL
-+0x00c37822 generic_getxattr vmlinux EXPORT_SYMBOL
-+0x6e46a481 dma_mmap_coherent vmlinux EXPORT_SYMBOL_GPL
-+0x3d7855c9 gss_mech_register vmlinux EXPORT_SYMBOL_GPL
-+0x44a12e1b mpage_readpages vmlinux EXPORT_SYMBOL
-+0x01a4494d i2c_unlock_adapter vmlinux EXPORT_SYMBOL_GPL
-+0x0960ffb8 pci_request_regions vmlinux EXPORT_SYMBOL
-+0x6b807a5f gpio_sysfs_set_active_low vmlinux EXPORT_SYMBOL_GPL
-+0x4df119fa __bitmap_parse vmlinux EXPORT_SYMBOL
-+0x6bd74d1a __wait_on_buffer vmlinux EXPORT_SYMBOL
-+0xe1d61c3a cancel_delayed_work_sync vmlinux EXPORT_SYMBOL
-+0xf870a8ab sock_create vmlinux EXPORT_SYMBOL
-+0x4315bd81 usb_serial_handle_sysrq_char vmlinux EXPORT_SYMBOL_GPL
-+0xadbc1c68 class_dev_iter_next vmlinux EXPORT_SYMBOL_GPL
-+0x9dd28e76 debugfs_create_x32 vmlinux EXPORT_SYMBOL_GPL
-+0xae6f72ac bprm_change_interp vmlinux EXPORT_SYMBOL
-+0x673b3584 kill_litter_super vmlinux EXPORT_SYMBOL
-+0x5133c2b5 inet_proto_csum_replace4 vmlinux EXPORT_SYMBOL
-+0xadf3fc4c neigh_direct_output vmlinux EXPORT_SYMBOL
-+0x0c8395fa usb_free_urb vmlinux EXPORT_SYMBOL_GPL
-+0x7aee148f tty_prepare_flip_string_flags vmlinux EXPORT_SYMBOL_GPL
-+0x119c901d tty_prepare_flip_string vmlinux EXPORT_SYMBOL_GPL
-+0xf1216c75 prandom32 vmlinux EXPORT_SYMBOL
-+0x55ba3776 blk_rq_check_limits vmlinux EXPORT_SYMBOL_GPL
-+0x75bda77a seq_hlist_next vmlinux EXPORT_SYMBOL
-+0x9fd078d4 account_page_dirtied vmlinux EXPORT_SYMBOL
-+0x27d7e97e __lock_page_killable vmlinux EXPORT_SYMBOL_GPL
-+0x622ef684 fib_rules_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x371d2b7d skb_copy_bits vmlinux EXPORT_SYMBOL
-+0x189868d7 get_random_bytes_arch vmlinux EXPORT_SYMBOL
-+0x6e1d6881 pcim_iomap vmlinux EXPORT_SYMBOL
-+0x9b339c60 __blk_end_request_all vmlinux EXPORT_SYMBOL
-+0xca601c92 crypto_register_ahash vmlinux EXPORT_SYMBOL_GPL
-+0x8453215f sysfs_remove_link vmlinux EXPORT_SYMBOL_GPL
-+0x8924eb1e rcu_force_quiescent_state vmlinux EXPORT_SYMBOL_GPL
-+0x2827efe8 tcp_make_synack vmlinux EXPORT_SYMBOL
-+0xf4979615 mii_check_gmii_support vmlinux EXPORT_SYMBOL
-+0xa0d1a668 sysdev_class_create_file vmlinux EXPORT_SYMBOL_GPL
-+0xc4fe793b find_get_page vmlinux EXPORT_SYMBOL
-+0xae1a6d66 hrtimer_forward vmlinux EXPORT_SYMBOL_GPL
-+0xf322a206 bit_waitqueue vmlinux EXPORT_SYMBOL
-+0xefc93e71 threads_core_mask vmlinux EXPORT_SYMBOL_GPL
-+0xae652611 sock_common_recvmsg vmlinux EXPORT_SYMBOL
-+0x6a555f7c drop_file_write_access vmlinux EXPORT_SYMBOL_GPL
-+0x966dd23b inet_csk_addr2sockaddr vmlinux EXPORT_SYMBOL_GPL
-+0xeda0d76e gen_estimator_active vmlinux EXPORT_SYMBOL
-+0x794ed58e get_driver vmlinux EXPORT_SYMBOL_GPL
-+0x8251bcc3 bitmap_release_region vmlinux EXPORT_SYMBOL
-+0x7054a3e4 request_dma vmlinux EXPORT_SYMBOL
-+0x84f47571 ip_mc_inc_group vmlinux EXPORT_SYMBOL
-+0x71621fe0 tcp_orphan_count vmlinux EXPORT_SYMBOL_GPL
-+0x5f86d84e request_key_with_auxdata vmlinux EXPORT_SYMBOL
-+0xaf2518eb fat_attach vmlinux EXPORT_SYMBOL_GPL
-+0x22d8e440 sysfs_remove_bin_file vmlinux EXPORT_SYMBOL_GPL
-+0xa53e8fbc kick_iocb vmlinux EXPORT_SYMBOL
-+0xbc070ddd hid_dump_device vmlinux EXPORT_SYMBOL_GPL
-+0xb81960ca snprintf vmlinux EXPORT_SYMBOL
-+0x6b5064c6 get_io_context vmlinux EXPORT_SYMBOL
-+0x80b3e715 proc_mkdir_mode vmlinux EXPORT_SYMBOL
-+0xf57b6671 tag_pages_for_writeback vmlinux EXPORT_SYMBOL
-+0x092d50a4 rpcauth_destroy_credcache vmlinux EXPORT_SYMBOL_GPL
-+0x22586218 devm_kzalloc vmlinux EXPORT_SYMBOL_GPL
-+0x97a8cbdc swiotlb_dma_supported vmlinux EXPORT_SYMBOL
-+0x2296c00d crypto_attr_u32 vmlinux EXPORT_SYMBOL_GPL
-+0x77dcb28d __bread vmlinux EXPORT_SYMBOL
-+0xbba159e0 files_lglock_local_unlock vmlinux EXPORT_SYMBOL
-+0xd640e8b8 follow_pfn vmlinux EXPORT_SYMBOL
-+0xaa764215 hrtimer_init vmlinux EXPORT_SYMBOL_GPL
-+0x954488a4 syncookie_secret vmlinux EXPORT_SYMBOL
-+0x9ceb163c memcpy_toiovec vmlinux EXPORT_SYMBOL
-+0x74b5d898 usb_disable_xhci_ports vmlinux EXPORT_SYMBOL_GPL
-+0x1b6314fd in_aton vmlinux EXPORT_SYMBOL
-+0x8bf80102 neigh_resolve_output vmlinux EXPORT_SYMBOL
-+0xd6677342 journal_init_dev vmlinux EXPORT_SYMBOL
-+0x176b3f91 posix_unblock_lock vmlinux EXPORT_SYMBOL
-+0x9acd079c __mnt_is_readonly vmlinux EXPORT_SYMBOL_GPL
-+0x500dda7f nf_nat_ftp_hook net/netfilter/nf_conntrack_ftp EXPORT_SYMBOL_GPL
-+0x6b52164d tcp_close vmlinux EXPORT_SYMBOL
-+0x190b6c5c __scm_send vmlinux EXPORT_SYMBOL
-+0x227822d5 usb_register_dev vmlinux EXPORT_SYMBOL_GPL
-+0x8fb45bb1 scsi_dma_map vmlinux EXPORT_SYMBOL
-+0xa07ed110 xz_dec_init vmlinux EXPORT_SYMBOL
-+0x3f906124 try_to_free_buffers vmlinux EXPORT_SYMBOL
-+0xef120637 wait_iff_congested vmlinux EXPORT_SYMBOL
-+0xe7b1acbe __put_cred vmlinux EXPORT_SYMBOL
-+0xb15bd8fa tb_ticks_per_sec vmlinux EXPORT_SYMBOL
-+0x3cd06035 add_input_randomness vmlinux EXPORT_SYMBOL_GPL
-+0x9ed685ee iov_iter_advance vmlinux EXPORT_SYMBOL
-+0x757f088f cpm_muram_offset vmlinux EXPORT_SYMBOL
-+0x90501868 transfer_to_handler vmlinux EXPORT_SYMBOL
-+0xacf5a07d xdr_set_scratch_buffer vmlinux EXPORT_SYMBOL_GPL
-+0x0ac28878 scsi_unblock_requests vmlinux EXPORT_SYMBOL
-+0xf6d1a555 device_remove_bin_file vmlinux EXPORT_SYMBOL_GPL
-+0x980fd9e0 tty_port_free_xmit_buf vmlinux EXPORT_SYMBOL
-+0x8c28d738 nf_ct_deliver_cached_events net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xaf5bf6ef nfs_debug vmlinux EXPORT_SYMBOL_GPL
-+0x7267db00 hwrng_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x94202ff1 crypto_nivaead_type vmlinux EXPORT_SYMBOL_GPL
-+0x4f0d0c17 bdi_writeout_inc vmlinux EXPORT_SYMBOL_GPL
-+0xdc7776cc xfrm6_rcv_spi vmlinux EXPORT_SYMBOL
-+0x27c1e63f usb_amd_find_chipset_info vmlinux EXPORT_SYMBOL_GPL
-+0xcf307410 disk_stack_limits vmlinux EXPORT_SYMBOL
-+0x75e8f3c3 crypto_register_notifier vmlinux EXPORT_SYMBOL_GPL
-+0x57b57ebe jiffies_to_timespec vmlinux EXPORT_SYMBOL
-+0x5f4e77a9 pskb_put vmlinux EXPORT_SYMBOL_GPL
-+0xfa6583df i2c_master_send vmlinux EXPORT_SYMBOL
-+0xcaae18ce device_reprobe vmlinux EXPORT_SYMBOL_GPL
-+0x479c3c86 find_next_zero_bit vmlinux EXPORT_SYMBOL
-+0x8ee69235 timeval_to_jiffies vmlinux EXPORT_SYMBOL
-+0x0840985a dev_kfree_skb_any vmlinux EXPORT_SYMBOL
-+0x384455fa journal_abort vmlinux EXPORT_SYMBOL
-+0x2d550ef5 seq_open vmlinux EXPORT_SYMBOL
-+0x88c8ae9d mnt_drop_write vmlinux EXPORT_SYMBOL_GPL
-+0x297d6b80 rpc_uaddr2sockaddr vmlinux EXPORT_SYMBOL_GPL
-+0x7e394c4e sysctl_local_reserved_ports vmlinux EXPORT_SYMBOL
-+0x1cc4c90f pci_bus_type vmlinux EXPORT_SYMBOL
-+0xeaf46b33 pci_enable_bridges vmlinux EXPORT_SYMBOL
-+0x8cf4e71e simple_readpage vmlinux EXPORT_SYMBOL
-+0x83f092b9 __lock_page vmlinux EXPORT_SYMBOL
-+0xb140d14c ring_buffer_read vmlinux EXPORT_SYMBOL_GPL
-+0xf499fdb2 rcu_barrier_bh vmlinux EXPORT_SYMBOL_GPL
-+0x46b6baff synchronize_srcu_expedited vmlinux EXPORT_SYMBOL_GPL
-+0xe98d2676 cpu_remove_dev_attr vmlinux EXPORT_SYMBOL_GPL
-+0xfeb79024 tcp_cong_avoid_ai vmlinux EXPORT_SYMBOL_GPL
-+0xab6bde28 sysctl_max_syn_backlog vmlinux EXPORT_SYMBOL
-+0xca059c46 usb_altnum_to_altsetting vmlinux EXPORT_SYMBOL_GPL
-+0x6f497d79 pci_create_slot vmlinux EXPORT_SYMBOL_GPL
-+0xa43762aa blk_delay_queue vmlinux EXPORT_SYMBOL
-+0xe6a1e7fb follow_down vmlinux EXPORT_SYMBOL
-+0xc06502c4 __generic_file_aio_write vmlinux EXPORT_SYMBOL
-+0x5aed6e64 filemap_write_and_wait_range vmlinux EXPORT_SYMBOL
-+0xf229625e devm_ioremap_prot vmlinux EXPORT_SYMBOL
-+0xd85028c2 genphy_read_status vmlinux EXPORT_SYMBOL
-+0x97d977b5 tty_unregister_driver vmlinux EXPORT_SYMBOL
-+0xc404cbb3 pci_reenable_device vmlinux EXPORT_SYMBOL
-+0xc6a0b57b get_write_access vmlinux EXPORT_SYMBOL
-+0x7c22ff1f invalidate_mapping_pages vmlinux EXPORT_SYMBOL
-+0xc0c17332 pci_enable_rom vmlinux EXPORT_SYMBOL_GPL
-+0xf3bf0bce __bitmap_complement vmlinux EXPORT_SYMBOL
-+0xe2e8065e memdup_user vmlinux EXPORT_SYMBOL
-+0x221623f5 thermal_cooling_device_unregister vmlinux EXPORT_SYMBOL
-+0xcca27eeb del_timer vmlinux EXPORT_SYMBOL
-+0xeb9aea7d dma_get_required_mask vmlinux EXPORT_SYMBOL_GPL
-+0x4dc45be9 nf_log_unbind_pf vmlinux EXPORT_SYMBOL
-+0xeaae7eca usb_get_current_frame_number vmlinux EXPORT_SYMBOL_GPL
-+0x80fdefab map_destroy vmlinux EXPORT_SYMBOL
-+0x3e3944d8 pcie_update_link_speed vmlinux EXPORT_SYMBOL_GPL
-+0x5bb906a7 wait_rcu_gp vmlinux EXPORT_SYMBOL_GPL
-+0x74046876 nf_ct_expect_find_get net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xf397c836 tcp_v4_send_check vmlinux EXPORT_SYMBOL
-+0xbba15e0b dev_close vmlinux EXPORT_SYMBOL
-+0x6e22c276 __mark_inode_dirty vmlinux EXPORT_SYMBOL
-+0x97c92d4b noop_qdisc vmlinux EXPORT_SYMBOL
-+0x1ce622fb sock_alloc_send_skb vmlinux EXPORT_SYMBOL
-+0xd9ce8f0c strnlen vmlinux EXPORT_SYMBOL
-+0x4953f064 unregister_filesystem vmlinux EXPORT_SYMBOL
-+0xd418e1c0 adjust_resource vmlinux EXPORT_SYMBOL
-+0xdd91ae2a xfrm_state_insert vmlinux EXPORT_SYMBOL
-+0x030d11a8 kmsg_dump_register vmlinux EXPORT_SYMBOL_GPL
-+0x4e05fd2a rpc_peeraddr2str vmlinux EXPORT_SYMBOL_GPL
-+0x40728a63 xt_find_revision vmlinux EXPORT_SYMBOL_GPL
-+0x82e3b54d of_node_get vmlinux EXPORT_SYMBOL
-+0x08ad10e2 of_node_put vmlinux EXPORT_SYMBOL
-+0x8d18a199 __destroy_inode vmlinux EXPORT_SYMBOL
-+0xb18b572e nf_conntrack_l3proto_generic net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x9a1c768a tcp_is_cwnd_limited vmlinux EXPORT_SYMBOL_GPL
-+0xdcc97380 pci_bus_add_devices vmlinux EXPORT_SYMBOL
-+0xce9b668c blk_rq_unmap_user vmlinux EXPORT_SYMBOL
-+0x768f9bc5 crypto_mod_get vmlinux EXPORT_SYMBOL_GPL
-+0x0bc477a2 irq_set_irq_type vmlinux EXPORT_SYMBOL
-+0xce2840e7 irq_set_irq_wake vmlinux EXPORT_SYMBOL
-+0x36efd128 __remove_inode_hash vmlinux EXPORT_SYMBOL
-+0xae52c20e __lru_cache_add vmlinux EXPORT_SYMBOL
-+0x6128b5fc __printk_ratelimit vmlinux EXPORT_SYMBOL
-+0x7db8133c switch_mmu_context vmlinux EXPORT_SYMBOL
-+0xb6938e50 xdr_read_pages vmlinux EXPORT_SYMBOL_GPL
-+0xad06c17e xdr_encode_pages vmlinux EXPORT_SYMBOL_GPL
-+0xcc1f1c3d inet_twdr_hangman vmlinux EXPORT_SYMBOL_GPL
-+0xcacd272d atomic64_sub_return vmlinux EXPORT_SYMBOL
-+0x5b256543 __blk_end_request_cur vmlinux EXPORT_SYMBOL
-+0x5b40de9d __blk_end_request_err vmlinux EXPORT_SYMBOL_GPL
-+0xb2682405 utf8_to_utf32 vmlinux EXPORT_SYMBOL
-+0x9621849f ring_buffer_event_data vmlinux EXPORT_SYMBOL_GPL
-+0xd2423d66 scsi_prep_return vmlinux EXPORT_SYMBOL
-+0x2cf5fa92 __bus_register vmlinux EXPORT_SYMBOL_GPL
-+0x4fe99583 atomic64_dec_if_positive vmlinux EXPORT_SYMBOL
-+0x2c3b9273 crypto_sha1_update vmlinux EXPORT_SYMBOL
-+0x2d727890 override_creds vmlinux EXPORT_SYMBOL
-+0x131db64a system_long_wq vmlinux EXPORT_SYMBOL_GPL
-+0x3ca16d23 kmsg_dump_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x606d0b09 secure_tcpv6_sequence_number vmlinux EXPORT_SYMBOL
-+0x78381b79 input_register_handle vmlinux EXPORT_SYMBOL
-+0x6ca1d1a4 atomic64_read vmlinux EXPORT_SYMBOL
-+0x979a2d28 blkdev_issue_zeroout vmlinux EXPORT_SYMBOL
-+0x461818bb journal_get_create_access vmlinux EXPORT_SYMBOL
-+0xe15b92eb handle_level_irq vmlinux EXPORT_SYMBOL_GPL
-+0xd31ccb06 of_machine_is_compatible vmlinux EXPORT_SYMBOL
-+0xf971d6e2 sdio_writesb vmlinux EXPORT_SYMBOL_GPL
-+0x42b364ef scatterwalk_done vmlinux EXPORT_SYMBOL_GPL
-+0x58ffec8b request_key vmlinux EXPORT_SYMBOL
-+0x3923bd3b kern_unmount vmlinux EXPORT_SYMBOL
-+0xfa9dd504 timecompare_transform vmlinux EXPORT_SYMBOL_GPL
-+0xae616697 usb_control_msg vmlinux EXPORT_SYMBOL_GPL
-+0x9846a085 mtd_table_mutex vmlinux EXPORT_SYMBOL_GPL
-+0x0c8aadeb nla_append vmlinux EXPORT_SYMBOL
-+0x351f3c81 pcim_iomap_regions vmlinux EXPORT_SYMBOL
-+0xb86e4ab9 random32 vmlinux EXPORT_SYMBOL
-+0x51ad88ca skcipher_geniv_free vmlinux EXPORT_SYMBOL_GPL
-+0x2c204319 vfs_llseek vmlinux EXPORT_SYMBOL
-+0x81d70b6e __irq_set_handler vmlinux EXPORT_SYMBOL_GPL
-+0xa8bdd720 dev_set_drvdata vmlinux EXPORT_SYMBOL
-+0xdca20876 dev_get_drvdata vmlinux EXPORT_SYMBOL
-+0x7ceaf0d5 generic_handle_irq vmlinux EXPORT_SYMBOL_GPL
-+0x9ea865cf blocking_notifier_chain_cond_register vmlinux EXPORT_SYMBOL_GPL
-+0xb75cd36b __xfrm_state_destroy vmlinux EXPORT_SYMBOL
-+0x400bf80a bfifo_qdisc_ops vmlinux EXPORT_SYMBOL
-+0x01c4ff56 usb_unpoison_urb vmlinux EXPORT_SYMBOL_GPL
-+0x4242db6e tty_port_init vmlinux EXPORT_SYMBOL
-+0x74bae351 complete_request_key vmlinux EXPORT_SYMBOL
-+0x1f8544b8 panic_timeout vmlinux EXPORT_SYMBOL_GPL
-+0xa20ce1b8 net_msg_warn vmlinux EXPORT_SYMBOL
-+0x7e7052eb __sock_recv_timestamp vmlinux EXPORT_SYMBOL_GPL
-+0x6225637e md5_transform vmlinux EXPORT_SYMBOL
-+0xc0d579ef noop_fsync vmlinux EXPORT_SYMBOL
-+0x357d2c4a scsi_add_host_with_dma vmlinux EXPORT_SYMBOL
-+0x1d119736 devres_remove_group vmlinux EXPORT_SYMBOL_GPL
-+0x4f2a0c62 crypto_hash_walk_first vmlinux EXPORT_SYMBOL_GPL
-+0x118f01ea putname vmlinux EXPORT_SYMBOL
-+0xb74b1b5c inet_sendpage vmlinux EXPORT_SYMBOL
-+0x5fa17c73 sk_filter_release_rcu vmlinux EXPORT_SYMBOL
-+0x52aa3821 dev_get_by_index_rcu vmlinux EXPORT_SYMBOL
-+0x161edd60 dev_set_allmulti vmlinux EXPORT_SYMBOL
-+0x556b4614 mmc_can_erase vmlinux EXPORT_SYMBOL
-+0x6fdc65c4 i2c_add_adapter vmlinux EXPORT_SYMBOL
-+0x8c140a5a input_mt_report_finger_count vmlinux EXPORT_SYMBOL
-+0xea10655a __bitmap_intersects vmlinux EXPORT_SYMBOL
-+0xf313da4e sha_transform vmlinux EXPORT_SYMBOL
-+0x9b6eb137 ksize vmlinux EXPORT_SYMBOL
-+0xf747dd44 kstat vmlinux EXPORT_SYMBOL
-+0x68748335 pci_stop_bus_device vmlinux EXPORT_SYMBOL_GPL
-+0xf2334557 kobject_set_name vmlinux EXPORT_SYMBOL
-+0xcf586f6d shmem_truncate_range vmlinux EXPORT_SYMBOL_GPL
-+0xa3e7c113 ring_buffer_iter_peek vmlinux EXPORT_SYMBOL_GPL
-+0xa5efbf4c async_synchronize_full vmlinux EXPORT_SYMBOL_GPL
-+0xc141de33 set_device_ro vmlinux EXPORT_SYMBOL
-+0xbb038ce4 perf_unregister_guest_info_callbacks vmlinux EXPORT_SYMBOL_GPL
-+0x6c9e8a40 usb_anchor_urb vmlinux EXPORT_SYMBOL_GPL
-+0xa553f1ed pci_clear_mwi vmlinux EXPORT_SYMBOL
-+0x0b0c5bc2 shash_attr_alg vmlinux EXPORT_SYMBOL_GPL
-+0x63eb9355 panic_blink vmlinux EXPORT_SYMBOL
-+0x9b349bdd __sync_dirty_buffer vmlinux EXPORT_SYMBOL
-+0xcfbb9503 kmap_high vmlinux EXPORT_SYMBOL
-+0x6f86e89e cancel_dirty_page vmlinux EXPORT_SYMBOL
-+0xf4fc2d6c __ring_buffer_alloc vmlinux EXPORT_SYMBOL_GPL
-+0x82072614 tasklet_kill vmlinux EXPORT_SYMBOL
-+0xa8de6a48 i2c_use_client vmlinux EXPORT_SYMBOL
-+0xdd66b703 scsi_print_command vmlinux EXPORT_SYMBOL
-+0xbb1da1d5 pci_try_set_mwi vmlinux EXPORT_SYMBOL
-+0xcda0bf50 bio_endio vmlinux EXPORT_SYMBOL
-+0x85c7f674 ring_buffer_normalize_time_stamp vmlinux EXPORT_SYMBOL_GPL
-+0x438b62ec nf_ct_expect_unregister_notifier net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xc6f3dff4 sk_stop_timer vmlinux EXPORT_SYMBOL
-+0x530e0f8a of_platform_bus_probe vmlinux EXPORT_SYMBOL
-+0xffdb82bc sg_free_table vmlinux EXPORT_SYMBOL
-+0xbac7a6de locks_remove_posix vmlinux EXPORT_SYMBOL
-+0xb0b85f47 ring_buffer_iter_reset vmlinux EXPORT_SYMBOL_GPL
-+0xbc68ed8a pcie_port_service_unregister vmlinux EXPORT_SYMBOL
-+0x5d5b5a16 radix_tree_delete vmlinux EXPORT_SYMBOL
-+0x76831f67 tcp_slow_start vmlinux EXPORT_SYMBOL_GPL
-+0xdb9628fb proc_net_netfilter vmlinux EXPORT_SYMBOL
-+0x503a9a19 dev_activate vmlinux EXPORT_SYMBOL
-+0xa6abec58 __pneigh_lookup vmlinux EXPORT_SYMBOL_GPL
-+0xac20b868 i2c_add_mux_adapter vmlinux EXPORT_SYMBOL_GPL
-+0xe8cfb9b7 devm_ioremap vmlinux EXPORT_SYMBOL
-+0x050dd9e3 devm_iounmap vmlinux EXPORT_SYMBOL
-+0x5541ea93 on_each_cpu vmlinux EXPORT_SYMBOL
-+0x53775014 dma_set_mask vmlinux EXPORT_SYMBOL
-+0x12c21380 nla_reserve vmlinux EXPORT_SYMBOL
-+0x179f2b81 bioset_create vmlinux EXPORT_SYMBOL
-+0x5717b1d8 rtnl_put_cacheinfo vmlinux EXPORT_SYMBOL_GPL
-+0xea124bd1 gcd vmlinux EXPORT_SYMBOL_GPL
-+0xb954f080 ihold vmlinux EXPORT_SYMBOL
-+0x8a6d1314 names_cachep vmlinux EXPORT_SYMBOL
-+0x8aaa5d67 invalidate_inode_pages2_range vmlinux EXPORT_SYMBOL_GPL
-+0xc8e96dea qword_addhex vmlinux EXPORT_SYMBOL_GPL
-+0x78328e4d xfrm_policy_register_afinfo vmlinux EXPORT_SYMBOL
-+0x5d63436b pci_unmap_rom vmlinux EXPORT_SYMBOL
-+0x118e0f3d key_instantiate_and_link vmlinux EXPORT_SYMBOL
-+0xb1aaff79 dentry_path_raw vmlinux EXPORT_SYMBOL
-+0x6a28defe xfrm_sad_getinfo vmlinux EXPORT_SYMBOL
-+0x0ac2bf08 netif_napi_del vmlinux EXPORT_SYMBOL
-+0x8014b6af input_event_from_user vmlinux EXPORT_SYMBOL_GPL
-+0x4484a5a4 wait_for_device_probe vmlinux EXPORT_SYMBOL_GPL
-+0xd6244170 tty_port_put vmlinux EXPORT_SYMBOL
-+0xf8fa9744 crypto_register_alg vmlinux EXPORT_SYMBOL_GPL
-+0xf79a16f8 debugfs_rename vmlinux EXPORT_SYMBOL_GPL
-+0xe4653d19 single_open vmlinux EXPORT_SYMBOL
-+0xc794266c page_follow_link_light vmlinux EXPORT_SYMBOL
-+0x4146fc0f xfrm6_find_1stfragopt vmlinux EXPORT_SYMBOL
-+0xfef96e23 __scsi_print_command vmlinux EXPORT_SYMBOL
-+0xc40d19d3 kthread_stop vmlinux EXPORT_SYMBOL
-+0xa7b91a7b lockd_down vmlinux EXPORT_SYMBOL_GPL
-+0xd3481bf6 journal_trans_will_send_data_barrier vmlinux EXPORT_SYMBOL
-+0x750b2814 xprt_reserve_xprt vmlinux EXPORT_SYMBOL_GPL
-+0x090ed695 hid_register_report vmlinux EXPORT_SYMBOL_GPL
-+0x1963b26f rtc_set_alarm vmlinux EXPORT_SYMBOL_GPL
-+0x3fe72f15 __scsi_get_command vmlinux EXPORT_SYMBOL_GPL
-+0x1b97d8ce __scsi_put_command vmlinux EXPORT_SYMBOL
-+0xaa4a7797 hex2bin vmlinux EXPORT_SYMBOL
-+0x91d266c7 crypto_default_rng vmlinux EXPORT_SYMBOL_GPL
-+0x2c103133 inet_csk_listen_start vmlinux EXPORT_SYMBOL_GPL
-+0xb91453c1 of_register_spi_devices vmlinux EXPORT_SYMBOL
-+0xfcc2a43c utf32_to_utf8 vmlinux EXPORT_SYMBOL
-+0x800df1d7 groups_free vmlinux EXPORT_SYMBOL
-+0xf611bda0 cleanup_srcu_struct vmlinux EXPORT_SYMBOL_GPL
-+0x3980aac1 unregister_reboot_notifier vmlinux EXPORT_SYMBOL
-+0x3aa91a68 tcf_destroy_chain vmlinux EXPORT_SYMBOL
-+0x255f3a7f sk_clone vmlinux EXPORT_SYMBOL_GPL
-+0x3bd2becc tty_perform_flush vmlinux EXPORT_SYMBOL_GPL
-+0x447e96b6 pci_request_region_exclusive vmlinux EXPORT_SYMBOL
-+0x9cdf0ec5 vfsmount_lock_global_lock_online vmlinux EXPORT_SYMBOL
-+0x495c501c debugfs_remove_recursive vmlinux EXPORT_SYMBOL_GPL
-+0xfdb6cedc _raw_read_unlock_bh vmlinux EXPORT_SYMBOL
-+0x117b494d neigh_parms_alloc vmlinux EXPORT_SYMBOL
-+0x19a304ba usb_disabled vmlinux EXPORT_SYMBOL_GPL
-+0xf52321e0 atomic64_sub vmlinux EXPORT_SYMBOL
-+0x0bb7c01f mount_single vmlinux EXPORT_SYMBOL
-+0xef109449 interruptible_sleep_on vmlinux EXPORT_SYMBOL
-+0x111d29eb __ip_route_output_key vmlinux EXPORT_SYMBOL_GPL
-+0xb9c425de register_syscore_ops vmlinux EXPORT_SYMBOL_GPL
-+0x91a5865c blk_queue_invalidate_tags vmlinux EXPORT_SYMBOL
-+0xab5d4b6c remove_irq vmlinux EXPORT_SYMBOL_GPL
-+0x93a6e0b2 io_schedule vmlinux EXPORT_SYMBOL
-+0x61ce005d disk_part_iter_next vmlinux EXPORT_SYMBOL_GPL
-+0xb08b4f8a block_write_end vmlinux EXPORT_SYMBOL
-+0xaa8e4c8a pid_vnr vmlinux EXPORT_SYMBOL_GPL
-+0x56fa71f2 __xfrm_decode_session vmlinux EXPORT_SYMBOL
-+0xad5f1b39 nf_net_ipv4_netfilter_sysctl_path vmlinux EXPORT_SYMBOL_GPL
-+0x576dc245 tty_port_lower_dtr_rts vmlinux EXPORT_SYMBOL
-+0xf803fe39 bitmap_set vmlinux EXPORT_SYMBOL
-+0x230e0698 __clocksource_updatefreq_scale vmlinux EXPORT_SYMBOL_GPL
-+0x1528ad8f netlink_set_err vmlinux EXPORT_SYMBOL
-+0x8e488ec3 alloc_netdev_mqs vmlinux EXPORT_SYMBOL
-+0xc71e5323 bus_register_notifier vmlinux EXPORT_SYMBOL_GPL
-+0x1d021d32 gpiochip_add vmlinux EXPORT_SYMBOL_GPL
-+0x336154ca rcutorture_record_test_transition vmlinux EXPORT_SYMBOL_GPL
-+0xf77020ef inet_listen vmlinux EXPORT_SYMBOL
-+0x32e49bab register_snap_client vmlinux EXPORT_SYMBOL
-+0x9287ab43 __dst_destroy_metrics_generic vmlinux EXPORT_SYMBOL
-+0x3281d137 skb_queue_purge vmlinux EXPORT_SYMBOL
-+0xcd0b9f77 get_unmapped_area vmlinux EXPORT_SYMBOL
-+0xa196356e add_to_page_cache_lru vmlinux EXPORT_SYMBOL_GPL
-+0x07b52e38 rtnl_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x816a4a8f platform_bus_type vmlinux EXPORT_SYMBOL_GPL
-+0x8eb489cc blk_rq_map_user vmlinux EXPORT_SYMBOL
-+0x95666f79 generic_pipe_buf_release vmlinux EXPORT_SYMBOL
-+0x9b49a62b nf_ct_gre_keymap_add net/netfilter/nf_conntrack_proto_gre EXPORT_SYMBOL_GPL
-+0x76486f91 d_find_alias vmlinux EXPORT_SYMBOL
-+0x760a0f4f yield vmlinux EXPORT_SYMBOL
-+0xdfce92d0 xt_check_target vmlinux EXPORT_SYMBOL_GPL
-+0x693bf8ad sdio_claim_irq vmlinux EXPORT_SYMBOL_GPL
-+0x6bd2a517 fsstack_copy_attr_all vmlinux EXPORT_SYMBOL_GPL
-+0x7d2d68ef __nf_ct_try_assign_helper net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xf3bfc4a0 udp6_lib_lookup vmlinux EXPORT_SYMBOL_GPL
-+0xa9ff0067 xfrm_init_replay vmlinux EXPORT_SYMBOL
-+0x4cd13364 udp4_lib_lookup vmlinux EXPORT_SYMBOL_GPL
-+0xaee50a42 genl_unregister_ops vmlinux EXPORT_SYMBOL
-+0x9e2000a7 memcpy_toiovecend vmlinux EXPORT_SYMBOL
-+0xcc3ad809 scsi_command_normalize_sense vmlinux EXPORT_SYMBOL
-+0x2f19f806 inode_sb_list_add vmlinux EXPORT_SYMBOL_GPL
-+0xc0072342 inode_init_always vmlinux EXPORT_SYMBOL
-+0x37443f52 d_invalidate vmlinux EXPORT_SYMBOL
-+0xa0b04675 vmalloc_32 vmlinux EXPORT_SYMBOL
-+0x8a13f155 pid_task vmlinux EXPORT_SYMBOL
-+0x33b84f74 copy_page vmlinux EXPORT_SYMBOL
-+0x115dd19b seq_print_acct net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x447aabed stp_proto_register vmlinux EXPORT_SYMBOL_GPL
-+0x40b9610d input_register_handler vmlinux EXPORT_SYMBOL
-+0xc0572d04 textsearch_unregister vmlinux EXPORT_SYMBOL
-+0xf54c51a2 dma_pool_free vmlinux EXPORT_SYMBOL
-+0xdb274e52 monotonic_to_bootbased vmlinux EXPORT_SYMBOL_GPL
-+0x86b4b68f inet6_csk_bind_conflict vmlinux EXPORT_SYMBOL_GPL
-+0xa35de80f ipv4_config vmlinux EXPORT_SYMBOL
-+0x94ecde24 netif_carrier_on vmlinux EXPORT_SYMBOL
-+0x74b8aeab fib_rules_lookup vmlinux EXPORT_SYMBOL_GPL
-+0xb0b847ac __bitmap_full vmlinux EXPORT_SYMBOL
-+0x4059792f print_hex_dump vmlinux EXPORT_SYMBOL
-+0x22f5f5bd ip6_route_output vmlinux EXPORT_SYMBOL
-+0x98c1c63d __rta_fill vmlinux EXPORT_SYMBOL
-+0x87b20911 __dst_free vmlinux EXPORT_SYMBOL
-+0xfe1c56c4 inode_newsize_ok vmlinux EXPORT_SYMBOL
-+0x89b3107b isa_mem_base vmlinux EXPORT_SYMBOL
-+0xcbb1b165 inet_csk_destroy_sock vmlinux EXPORT_SYMBOL
-+0x290bcd04 pci_disable_obff vmlinux EXPORT_SYMBOL
-+0x78df6bd7 no_pci_devices vmlinux EXPORT_SYMBOL
-+0xc2e00f4e nfs_pageio_reset_read_mds vmlinux EXPORT_SYMBOL_GPL
-+0x1e26be3b get_anon_bdev vmlinux EXPORT_SYMBOL
-+0x6b29a1fa ring_buffer_event_length vmlinux EXPORT_SYMBOL_GPL
-+0x84b183ae strncmp vmlinux EXPORT_SYMBOL
-+0x5ee2150e sock_kfree_s vmlinux EXPORT_SYMBOL
-+0xaf67115a usb_stor_access_xfer_buf vmlinux EXPORT_SYMBOL_GPL
-+0xa34f1ef5 crc32_le vmlinux EXPORT_SYMBOL
-+0xf54bd49b lcm vmlinux EXPORT_SYMBOL_GPL
-+0x13354608 scatterwalk_map_and_copy vmlinux EXPORT_SYMBOL_GPL
-+0xf7dcfb23 empty_aops vmlinux EXPORT_SYMBOL
-+0x43b911a1 __task_pid_nr_ns vmlinux EXPORT_SYMBOL
-+0xe368f912 ethtool_op_get_link vmlinux EXPORT_SYMBOL
-+0xa40a8590 input_event_to_user vmlinux EXPORT_SYMBOL_GPL
-+0x657aa70a input_unregister_device vmlinux EXPORT_SYMBOL
-+0xbfbebdf2 read_cache_pages vmlinux EXPORT_SYMBOL
-+0x4aadeb9a ring_buffer_alloc_read_page vmlinux EXPORT_SYMBOL_GPL
-+0x53445f68 nlm_debug vmlinux EXPORT_SYMBOL_GPL
-+0x8ac6cdbe ip_generic_getfrag vmlinux EXPORT_SYMBOL
-+0x825f0e72 stp_proto_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x42671630 call_netdevice_notifiers vmlinux EXPORT_SYMBOL
-+0xdc825d6c usb_amd_quirk_pll_disable vmlinux EXPORT_SYMBOL_GPL
-+0xc50de15c mii_nway_restart vmlinux EXPORT_SYMBOL
-+0x208c9e61 crypto_dequeue_request vmlinux EXPORT_SYMBOL_GPL
-+0x33ee71a8 crypto_enqueue_request vmlinux EXPORT_SYMBOL_GPL
-+0x3a45b778 fat_add_entries vmlinux EXPORT_SYMBOL_GPL
-+0x63709e0c thaw_bdev vmlinux EXPORT_SYMBOL
-+0xec38d5b9 irq_create_mapping vmlinux EXPORT_SYMBOL_GPL
-+0x64f9ca11 sk_run_filter vmlinux EXPORT_SYMBOL
-+0xa1ec4dcb netdev_rx_csum_fault vmlinux EXPORT_SYMBOL
-+0x55e74041 of_pci_address_to_resource vmlinux EXPORT_SYMBOL_GPL
-+0xa7355e76 devres_release_group vmlinux EXPORT_SYMBOL_GPL
-+0xa2d161c9 ipt_register_table net/ipv4/netfilter/ip_tables EXPORT_SYMBOL
-+0x33274026 xdr_decode_array2 vmlinux EXPORT_SYMBOL_GPL
-+0x7b594a76 ipv6_push_nfrag_opts vmlinux EXPORT_SYMBOL
-+0x7a73b3d5 neigh_sysctl_unregister vmlinux EXPORT_SYMBOL
-+0x7d1d23b5 blk_abort_request vmlinux EXPORT_SYMBOL_GPL
-+0x7cefa3c8 __scm_destroy vmlinux EXPORT_SYMBOL
-+0x88ebb649 sdio_writeb_readb vmlinux EXPORT_SYMBOL_GPL
-+0x8b82c4cf d_move vmlinux EXPORT_SYMBOL
-+0x5091b823 ring_buffer_read_start vmlinux EXPORT_SYMBOL_GPL
-+0x77b851c4 cacheable_memzero vmlinux EXPORT_SYMBOL
-+0x8d80529b virq_is_host vmlinux EXPORT_SYMBOL_GPL
-+0x450872a4 ipcomp_destroy net/xfrm/xfrm_ipcomp EXPORT_SYMBOL_GPL
-+0xd0035e43 dev_addr_del_multiple vmlinux EXPORT_SYMBOL
-+0x5f0c41ea request_key_async vmlinux EXPORT_SYMBOL
-+0x639ad9ba touch_atime vmlinux EXPORT_SYMBOL
-+0x733b2383 next_tlbcam_idx vmlinux EXPORT_SYMBOL
-+0x61c243fc mod_timer_pending vmlinux EXPORT_SYMBOL
-+0x1f6cf216 rtnl_configure_link vmlinux EXPORT_SYMBOL
-+0x5f26443b sock_wmalloc vmlinux EXPORT_SYMBOL
-+0x1e6d26a8 strstr vmlinux EXPORT_SYMBOL
-+0x349cba85 strchr vmlinux EXPORT_SYMBOL
-+0xafba9111 qe_immr vmlinux EXPORT_SYMBOL
-+0xadabd59e inet_csk_listen_stop vmlinux EXPORT_SYMBOL_GPL
-+0x7ba60ec5 usb_serial_generic_resume vmlinux EXPORT_SYMBOL_GPL
-+0x0cf5646d usb_wait_anchor_empty_timeout vmlinux EXPORT_SYMBOL_GPL
-+0x71f78ce2 cfi_qry_mode_off vmlinux EXPORT_SYMBOL_GPL
-+0xf2fca922 uart_parse_options vmlinux EXPORT_SYMBOL_GPL
-+0xcfa90d57 kobject_create_and_add vmlinux EXPORT_SYMBOL_GPL
-+0x589483d5 setup_new_exec vmlinux EXPORT_SYMBOL
-+0xa65972b8 _memcpy_toio vmlinux EXPORT_SYMBOL
-+0x109bccfc xfrm_state_lookup_byaddr vmlinux EXPORT_SYMBOL
-+0xac888215 pskb_expand_head vmlinux EXPORT_SYMBOL
-+0xeabea9a3 of_i2c_register_devices vmlinux EXPORT_SYMBOL
-+0x6f9f1dde i2c_release_client vmlinux EXPORT_SYMBOL
-+0xdf2478f7 giveup_fpu vmlinux EXPORT_SYMBOL
-+0xbff12409 giveup_spe vmlinux EXPORT_SYMBOL
-+0xa19aa2a4 rtnl_link_register vmlinux EXPORT_SYMBOL_GPL
-+0xc53bb9d1 lock_may_write vmlinux EXPORT_SYMBOL
-+0x7a461bdf bh_submit_read vmlinux EXPORT_SYMBOL
-+0x1bb795cc of_create_pci_dev vmlinux EXPORT_SYMBOL
-+0x91f08ce3 xdr_buf_read_netobj vmlinux EXPORT_SYMBOL_GPL
-+0xad37c04e eth_change_mtu vmlinux EXPORT_SYMBOL
-+0x78bb1ee1 eth_header_parse vmlinux EXPORT_SYMBOL
-+0x42977ad4 __hw_addr_del_multiple vmlinux EXPORT_SYMBOL
-+0x6e586165 bdev_stack_limits vmlinux EXPORT_SYMBOL
-+0x1114011d threads_shift vmlinux EXPORT_SYMBOL_GPL
-+0x3c9e7dc8 nf_nat_pptp_hook_exp_gre net/netfilter/nf_conntrack_pptp EXPORT_SYMBOL_GPL
-+0x3c514b70 nf_conntrack_hash_insert net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xad01e7b9 sock_wake_async vmlinux EXPORT_SYMBOL
-+0x506746b6 getrawmonotonic vmlinux EXPORT_SYMBOL
-+0xb6599b9a machine_check_exception vmlinux EXPORT_SYMBOL
-+0xfd4b9fec of_platform_device_create vmlinux EXPORT_SYMBOL
-+0x0e2b0fec fat_free_clusters vmlinux EXPORT_SYMBOL_GPL
-+0x7e006219 __set_page_dirty_buffers vmlinux EXPORT_SYMBOL
-+0x978f24b1 __wake_up_locked vmlinux EXPORT_SYMBOL_GPL
-+0x5994a0d7 sock_prot_inuse_add vmlinux EXPORT_SYMBOL_GPL
-+0xbd05294b usb_hcd_platform_shutdown vmlinux EXPORT_SYMBOL_GPL
-+0xf9e73082 scnprintf vmlinux EXPORT_SYMBOL
-+0x1fb2a93c aead_geniv_exit vmlinux EXPORT_SYMBOL_GPL
-+0x0c917640 mod_zone_page_state vmlinux EXPORT_SYMBOL
-+0xf4a37928 perf_event_refresh vmlinux EXPORT_SYMBOL_GPL
-+0x40f1ad10 tb_ticks_per_jiffy vmlinux EXPORT_SYMBOL
-+0xae40342e blk_add_request_payload vmlinux EXPORT_SYMBOL_GPL
-+0xf1a62b6f of_i8042_kbd_irq vmlinux EXPORT_SYMBOL_GPL
-+0xcd5fcf06 rtnl_link_unregister vmlinux EXPORT_SYMBOL_GPL
-+0xe1ad275d copy_strings_kernel vmlinux EXPORT_SYMBOL
-+0x751c2917 __wait_on_bit vmlinux EXPORT_SYMBOL
-+0x55467ede fsl_upm_find vmlinux EXPORT_SYMBOL
-+0x002de09c vfsmount_lock_global_unlock_online vmlinux EXPORT_SYMBOL
-+0xc7156d34 hrtimer_get_remaining vmlinux EXPORT_SYMBOL_GPL
-+0x3b42483e tcp_enter_memory_pressure vmlinux EXPORT_SYMBOL
-+0x1df3dda5 skb_add_rx_frag vmlinux EXPORT_SYMBOL
-+0xe9587909 usb_unregister_notify vmlinux EXPORT_SYMBOL_GPL
-+0x4982a57f probe_kernel_write vmlinux EXPORT_SYMBOL_GPL
-+0x972d7aee arp_create vmlinux EXPORT_SYMBOL
-+0xf1e706a7 of_modalias_node vmlinux EXPORT_SYMBOL_GPL
-+0xae30905c tty_port_alloc_xmit_buf vmlinux EXPORT_SYMBOL
-+0x46d4fb35 no_llseek vmlinux EXPORT_SYMBOL
-+0x7da3ce6f rt_mutex_timed_lock vmlinux EXPORT_SYMBOL_GPL
-+0xeded8d0e rtc_irq_set_freq vmlinux EXPORT_SYMBOL_GPL
-+0xf0fd4e8f rwsem_down_read_failed vmlinux EXPORT_SYMBOL
-+0xc606cd3c boot_cpuid vmlinux EXPORT_SYMBOL_GPL
-+0xfab35004 generic_show_options vmlinux EXPORT_SYMBOL
-+0xbf79c72e pagecache_write_begin vmlinux EXPORT_SYMBOL
-+0xe6e1982f register_sysctl_paths vmlinux EXPORT_SYMBOL
-+0xc6cbbc89 capable vmlinux EXPORT_SYMBOL
-+0x39688afa nf_afinfo vmlinux EXPORT_SYMBOL
-+0xa4f7e7fb hid_debug_event vmlinux EXPORT_SYMBOL_GPL
-+0x0a0a8628 mmc_can_trim vmlinux EXPORT_SYMBOL
-+0x620ed98f input_set_capability vmlinux EXPORT_SYMBOL
-+0x4ef5bcf4 perf_swevent_get_recursion_context vmlinux EXPORT_SYMBOL_GPL
-+0xc8b57c27 autoremove_wake_function vmlinux EXPORT_SYMBOL
-+0x13e5ea13 __wake_up_sync vmlinux EXPORT_SYMBOL_GPL
-+0x2e8e2944 irq_find_mapping vmlinux EXPORT_SYMBOL_GPL
-+0xb9c06bda nf_ct_port_tuple_to_nlattr net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x7c60d66e getname vmlinux EXPORT_SYMBOL
-+0xe7ffe877 pcpu_base_addr vmlinux EXPORT_SYMBOL_GPL
-+0xa78649d2 nf_conntrack_helper_register net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x9a11a0fc crypto_attr_alg_name vmlinux EXPORT_SYMBOL_GPL
-+0x0d86c5c3 par_io_config_pin vmlinux EXPORT_SYMBOL
-+0x1c852e7c xfrm_calg_get_byid vmlinux EXPORT_SYMBOL_GPL
-+0x8b26f12b uhci_check_and_reset_hc vmlinux EXPORT_SYMBOL_GPL
-+0x05520f5f usb_hc_died vmlinux EXPORT_SYMBOL_GPL
-+0xe61a6d2f gpio_unexport vmlinux EXPORT_SYMBOL_GPL
-+0xf20dabd8 free_irq vmlinux EXPORT_SYMBOL
-+0xa861ab6e __ioremap vmlinux EXPORT_SYMBOL
-+0x7976a3fa usb_serial_probe vmlinux EXPORT_SYMBOL_GPL
-+0x2b2f2776 deactivate_locked_super vmlinux EXPORT_SYMBOL
-+0x432b5ac1 filemap_fdatawait vmlinux EXPORT_SYMBOL
-+0x432a0255 rpcauth_register vmlinux EXPORT_SYMBOL_GPL
-+0x36ac1b69 xfrm_audit_policy_delete vmlinux EXPORT_SYMBOL_GPL
-+0xfb788409 netdev_class_create_file vmlinux EXPORT_SYMBOL
-+0x09d44df9 in_lock_functions vmlinux EXPORT_SYMBOL
-+0x27e4a550 rpc_wake_up vmlinux EXPORT_SYMBOL_GPL
-+0xe67b9f1c netpoll_parse_options vmlinux EXPORT_SYMBOL
-+0xe4c4673a netdev_rx_handler_unregister vmlinux EXPORT_SYMBOL_GPL
-+0xf3c9e5de skb_copy_datagram_const_iovec vmlinux EXPORT_SYMBOL
-+0x1b0d73b7 kernel_getpeername vmlinux EXPORT_SYMBOL
-+0xcca50e42 platform_driver_probe vmlinux EXPORT_SYMBOL_GPL
-+0x2bb7074d serial8250_do_set_termios vmlinux EXPORT_SYMBOL
-+0x436cab8f sysfs_chmod_file vmlinux EXPORT_SYMBOL_GPL
-+0x1e69be37 find_module vmlinux EXPORT_SYMBOL_GPL
-+0x09b54a84 rt_mutex_lock vmlinux EXPORT_SYMBOL_GPL
-+0x28a9171c input_event vmlinux EXPORT_SYMBOL
-+0x11f7ed4c hex_to_bin vmlinux EXPORT_SYMBOL
-+0xa4338205 simple_pin_fs vmlinux EXPORT_SYMBOL
-+0x5635a60a vmalloc_user vmlinux EXPORT_SYMBOL
-+0x95fcd41e posix_clock_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x31bd442e schedule_delayed_work vmlinux EXPORT_SYMBOL
-+0x4d45d89e udp_memory_allocated vmlinux EXPORT_SYMBOL
-+0x99dbcc23 tc_classify vmlinux EXPORT_SYMBOL
-+0x6b8e3569 sock_no_sendpage vmlinux EXPORT_SYMBOL
-+0x6a61f874 to_tm vmlinux EXPORT_SYMBOL
-+0x4b4a6de0 get_current_tty vmlinux EXPORT_SYMBOL_GPL
-+0x4c1182cb bitmap_scnprintf vmlinux EXPORT_SYMBOL
-+0xde6daef6 proc_create_data vmlinux EXPORT_SYMBOL
-+0x810b3618 param_ops_string vmlinux EXPORT_SYMBOL
-+0xcafc76d2 sunrpc_cache_register_pipefs vmlinux EXPORT_SYMBOL_GPL
-+0x4d15f777 kernel_getsockname vmlinux EXPORT_SYMBOL
-+0xa5ea73be kernel_sendmsg vmlinux EXPORT_SYMBOL
-+0x5f965ae1 uart_register_driver vmlinux EXPORT_SYMBOL
-+0xd77a5aa5 __bitmap_and vmlinux EXPORT_SYMBOL
-+0xf3012f6c rh_free vmlinux EXPORT_SYMBOL_GPL
-+0x38df0067 xfrm_alloc_spi vmlinux EXPORT_SYMBOL
-+0xce2e6bf5 netdev_set_bond_master vmlinux EXPORT_SYMBOL
-+0xdab749af blk_rq_err_bytes vmlinux EXPORT_SYMBOL_GPL
-+0x5390ec7d crypto_blkcipher_type vmlinux EXPORT_SYMBOL_GPL
-+0xd5ce0859 crypto_givcipher_type vmlinux EXPORT_SYMBOL_GPL
-+0x001425a3 nf_log_packet vmlinux EXPORT_SYMBOL
-+0xc9a72270 qdisc_tree_decrease_qlen vmlinux EXPORT_SYMBOL
-+0xdd671a8d dev_remove_pack vmlinux EXPORT_SYMBOL
-+0x2c256e1f input_scancode_to_scalar vmlinux EXPORT_SYMBOL
-+0x647e76d5 rq_flush_dcache_pages vmlinux EXPORT_SYMBOL_GPL
-+0xb6a0b482 blkcipher_walk_virt vmlinux EXPORT_SYMBOL_GPL
-+0x9607f187 posix_lock_file vmlinux EXPORT_SYMBOL
-+0x71a672ef dmam_pool_destroy vmlinux EXPORT_SYMBOL
-+0xeb6bb956 set_page_dirty vmlinux EXPORT_SYMBOL
-+0xde9360ba totalram_pages vmlinux EXPORT_SYMBOL
-+0x6a0a2dcc nf_conntrack_l4proto_udp4 net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x31afdcc9 udp_disconnect vmlinux EXPORT_SYMBOL
-+0xc9ef093b dev_uc_unsync vmlinux EXPORT_SYMBOL
-+0x92cc73cf dev_mc_unsync vmlinux EXPORT_SYMBOL
-+0xde68b34d usb_free_streams vmlinux EXPORT_SYMBOL_GPL
-+0x106c8a3c dump_seek vmlinux EXPORT_SYMBOL
-+0x67d84b74 mtd_add_partition vmlinux EXPORT_SYMBOL_GPL
-+0xd0c663ae bus_get_kset vmlinux EXPORT_SYMBOL_GPL
-+0x0874bd6b journal_get_write_access vmlinux EXPORT_SYMBOL
-+0x2e4d6a64 __register_chrdev vmlinux EXPORT_SYMBOL
-+0xe5919cb1 xdr_encode_opaque vmlinux EXPORT_SYMBOL_GPL
-+0x100e6158 rtc_class_close vmlinux EXPORT_SYMBOL_GPL
-+0x61c2dac6 kstrtoll_from_user vmlinux EXPORT_SYMBOL
-+0x8e010d2c svc_max_payload vmlinux EXPORT_SYMBOL_GPL
-+0x4be46578 devres_alloc vmlinux EXPORT_SYMBOL_GPL
-+0x2ecee7fb sysdev_unregister vmlinux EXPORT_SYMBOL_GPL
-+0xdc14eda7 pci_pci_problems vmlinux EXPORT_SYMBOL
-+0x956a91ba gpio_get_value_cansleep vmlinux EXPORT_SYMBOL_GPL
-+0x18bff16e blk_queue_stack_limits vmlinux EXPORT_SYMBOL
-+0x01e56d33 free_vm_area vmlinux EXPORT_SYMBOL_GPL
-+0x748022c5 nf_conntrack_free net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x9317d258 udp_lib_setsockopt vmlinux EXPORT_SYMBOL
-+0xfad5b90d udp_lib_getsockopt vmlinux EXPORT_SYMBOL
-+0x96898769 sysfs_format_mac vmlinux EXPORT_SYMBOL
-+0xddbc1ffe sk_send_sigurg vmlinux EXPORT_SYMBOL
-+0x246f019e spi_bus_lock vmlinux EXPORT_SYMBOL_GPL
-+0xaa89d28e dev_crit vmlinux EXPORT_SYMBOL
-+0x8e45aa4a drop_super vmlinux EXPORT_SYMBOL
-+0x27e1a049 printk vmlinux EXPORT_SYMBOL
-+0x2f97857d sk_alloc vmlinux EXPORT_SYMBOL
-+0xa49390ab bus_unregister_notifier vmlinux EXPORT_SYMBOL_GPL
-+0xc48f3373 try_to_release_page vmlinux EXPORT_SYMBOL
-+0x7e448a8f synchronize_srcu vmlinux EXPORT_SYMBOL_GPL
-+0x9aad6540 klist_iter_init vmlinux EXPORT_SYMBOL_GPL
-+0xc3512c1e rpcauth_lookup_credcache vmlinux EXPORT_SYMBOL_GPL
-+0x03bab655 platform_driver_register vmlinux EXPORT_SYMBOL_GPL
-+0xe381eae4 kobject_add vmlinux EXPORT_SYMBOL
-+0xf5a87370 nfs_commitdata_release vmlinux EXPORT_SYMBOL_GPL
-+0x10138352 tracing_on vmlinux EXPORT_SYMBOL_GPL
-+0x9025d41c xfrm_audit_policy_add vmlinux EXPORT_SYMBOL_GPL
-+0x4cedc318 platform_driver_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x61634f05 lock_flocks vmlinux EXPORT_SYMBOL_GPL
-+0xd19a96e6 queue_kthread_work vmlinux EXPORT_SYMBOL_GPL
-+0x756dd160 start_thread vmlinux EXPORT_SYMBOL
-+0x219de8a0 br_should_route_hook vmlinux EXPORT_SYMBOL
-+0xf6190b08 gnet_stats_copy_queue vmlinux EXPORT_SYMBOL
-+0x94ae4c23 of_match_device vmlinux EXPORT_SYMBOL
-+0x2bb7992e usb_get_urb vmlinux EXPORT_SYMBOL_GPL
-+0x4c715546 pci_scan_single_device vmlinux EXPORT_SYMBOL
-+0x12e85778 kstrtol_from_user vmlinux EXPORT_SYMBOL
-+0x3aad440e simple_dir_operations vmlinux EXPORT_SYMBOL
-+0x6403e338 tcp_memory_pressure vmlinux EXPORT_SYMBOL
-+0xb233762c atomic64_set vmlinux EXPORT_SYMBOL
-+0xab0e7894 setattr_copy vmlinux EXPORT_SYMBOL
-+0xc26c0f33 inet_frags_fini vmlinux EXPORT_SYMBOL
-+0xe4cf504e scsi_queue_work vmlinux EXPORT_SYMBOL_GPL
-+0x90ef84ba elv_dispatch_sort vmlinux EXPORT_SYMBOL
-+0x891a622e elv_add_request vmlinux EXPORT_SYMBOL
-+0xf346231f seq_list_start_head vmlinux EXPORT_SYMBOL
-+0xa32629f6 dns_query vmlinux EXPORT_SYMBOL
-+0x73e659e1 netif_device_attach vmlinux EXPORT_SYMBOL
-+0x17de79c5 netif_device_detach vmlinux EXPORT_SYMBOL
-+0xe94d82f3 sdhci_pltfm_init vmlinux EXPORT_SYMBOL_GPL
-+0x9c247860 device_rename vmlinux EXPORT_SYMBOL_GPL
-+0xc88c586d simple_attr_read vmlinux EXPORT_SYMBOL_GPL
-+0x7e620c98 relay_flush vmlinux EXPORT_SYMBOL_GPL
-+0xc12435e3 rpc_calc_rto vmlinux EXPORT_SYMBOL_GPL
-+0x0ffe2bd3 kernel_bind vmlinux EXPORT_SYMBOL
-+0xf511e930 dev_notice vmlinux EXPORT_SYMBOL
-+0xcc248d26 serial8250_suspend_port vmlinux EXPORT_SYMBOL
-+0xcd279169 nla_find vmlinux EXPORT_SYMBOL
-+0x3a4dd68a kernel_read vmlinux EXPORT_SYMBOL
-+0x8c7b3af2 vfs_read vmlinux EXPORT_SYMBOL
-+0xc8add232 ring_buffer_record_disable vmlinux EXPORT_SYMBOL_GPL
-+0xf68fe563 __devm_release_region vmlinux EXPORT_SYMBOL
-+0xca559706 __inet_hash_nolisten vmlinux EXPORT_SYMBOL_GPL
-+0x9fb3dd30 memcpy_fromiovec vmlinux EXPORT_SYMBOL
-+0x7e40b8e4 pci_bus_find_capability vmlinux EXPORT_SYMBOL
-+0x8a6d8c12 blk_queue_prep_rq vmlinux EXPORT_SYMBOL
-+0x262f20a8 local_clock vmlinux EXPORT_SYMBOL_GPL
-+0x5b7f8452 vlan_dev_vlan_id vmlinux EXPORT_SYMBOL
-+0xce3148ed of_find_matching_node vmlinux EXPORT_SYMBOL
-+0xe2457ef0 sysdev_class_register vmlinux EXPORT_SYMBOL_GPL
-+0xd6f88a0e journal_unlock_updates vmlinux EXPORT_SYMBOL
-+0x457de0d3 sunrpc_cache_unregister_pipefs vmlinux EXPORT_SYMBOL_GPL
-+0x7e72637f __class_register vmlinux EXPORT_SYMBOL_GPL
-+0xd5e8444a __div64_32 vmlinux EXPORT_SYMBOL
-+0xf04ae1ba idr_remove_all vmlinux EXPORT_SYMBOL
-+0x3446615d bio_alloc vmlinux EXPORT_SYMBOL
-+0x93fca811 __get_free_pages vmlinux EXPORT_SYMBOL
-+0xbb189cad disallow_signal vmlinux EXPORT_SYMBOL
-+0xd3d2de27 rawv6_mh_filter_register vmlinux EXPORT_SYMBOL
-+0xdbcd416e sysctl_ip_nonlocal_bind vmlinux EXPORT_SYMBOL
-+0x8fd02ebd usb_free_coherent vmlinux EXPORT_SYMBOL_GPL
-+0xa675804c utf8s_to_utf16s vmlinux EXPORT_SYMBOL
-+0x31212876 proc_net_fops_create vmlinux EXPORT_SYMBOL_GPL
-+0x39e569fd ns_capable vmlinux EXPORT_SYMBOL
-+0x979a54c8 rawv6_mh_filter_unregister vmlinux EXPORT_SYMBOL
-+0x7fd28838 mmc_fixup_device vmlinux EXPORT_SYMBOL
-+0x0ea29024 blk_queue_resize_tags vmlinux EXPORT_SYMBOL
-+0x4301f246 nf_ct_l3proto_find_get net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xb391c0ae ipv4_specific vmlinux EXPORT_SYMBOL
-+0x3aa08439 proto_unregister vmlinux EXPORT_SYMBOL
-+0x70e3ab78 i2c_new_dummy vmlinux EXPORT_SYMBOL_GPL
-+0x14f9849f register_mtd_chip_driver vmlinux EXPORT_SYMBOL
-+0x9334e2ee __fsnotify_inode_delete vmlinux EXPORT_SYMBOL_GPL
-+0xfedbb984 deregister_mtd_parser vmlinux EXPORT_SYMBOL_GPL
-+0x6e09073c __any_online_cpu vmlinux EXPORT_SYMBOL
-+0xb0d651f5 lookup_instantiate_filp vmlinux EXPORT_SYMBOL_GPL
-+0xadf0811d get_baudrate vmlinux EXPORT_SYMBOL
-+0x6f7b3dee rtnl_af_register vmlinux EXPORT_SYMBOL_GPL
-+0xc6c208cb kunmap_high vmlinux EXPORT_SYMBOL
-+0xea8a6c75 param_ops_long vmlinux EXPORT_SYMBOL
-+0xacf4d843 match_strdup vmlinux EXPORT_SYMBOL
-+0x870bf928 radix_tree_lookup vmlinux EXPORT_SYMBOL
-+0x4672e88b __crypto_dequeue_request vmlinux EXPORT_SYMBOL_GPL
-+0x7b0f1ab3 ring_buffer_free_read_page vmlinux EXPORT_SYMBOL_GPL
-+0xff00f5a4 rt_mutex_unlock vmlinux EXPORT_SYMBOL_GPL
-+0xe9d6425d neigh_seq_next vmlinux EXPORT_SYMBOL
-+0xb587371d vfs_rename vmlinux EXPORT_SYMBOL
-+0x8c2d546c generic_ro_fops vmlinux EXPORT_SYMBOL
-+0xabc5855f nf_nat_get_offset net/ipv4/netfilter/nf_nat EXPORT_SYMBOL_GPL
-+0xc7037e1e user_path_create vmlinux EXPORT_SYMBOL
-+0x78c76bdd kthread_bind vmlinux EXPORT_SYMBOL
-+0xc92969b1 xprt_disconnect_done vmlinux EXPORT_SYMBOL_GPL
-+0xefd8281a ipv6_setsockopt vmlinux EXPORT_SYMBOL
-+0x17c3edfd usb_serial_port_softint vmlinux EXPORT_SYMBOL_GPL
-+0x486bfa52 del_mtd_blktrans_dev vmlinux EXPORT_SYMBOL_GPL
-+0xdd19ee65 cache_register vmlinux EXPORT_SYMBOL_GPL
-+0xc92254c9 inet_frag_find vmlinux EXPORT_SYMBOL
-+0x2b281f0e inetdev_by_index vmlinux EXPORT_SYMBOL
-+0x7c6b8d30 usb_poison_anchored_urbs vmlinux EXPORT_SYMBOL_GPL
-+0x75b20f59 eventfd_signal vmlinux EXPORT_SYMBOL_GPL
-+0x21f678b9 clocksource_unregister vmlinux EXPORT_SYMBOL
-+0x461ebfa0 __copy_tofrom_user vmlinux EXPORT_SYMBOL
-+0xc9ed05e3 fifo_set_limit vmlinux EXPORT_SYMBOL
-+0x195d71f7 writeback_in_progress vmlinux EXPORT_SYMBOL
-+0x76b28f53 filemap_fdatawrite vmlinux EXPORT_SYMBOL
-+0x807d2b2c xt_recseq vmlinux EXPORT_SYMBOL_GPL
-+0xc6ff126b __ethtool_get_settings vmlinux EXPORT_SYMBOL
-+0x17648396 dev_base_lock vmlinux EXPORT_SYMBOL
-+0xbfb8b0b7 _raw_read_lock_irqsave vmlinux EXPORT_SYMBOL
-+0x219da672 xt_request_find_target vmlinux EXPORT_SYMBOL_GPL
-+0x5ec1f3aa sg_scsi_ioctl vmlinux EXPORT_SYMBOL_GPL
-+0xc22a3091 vm_unmap_aliases vmlinux EXPORT_SYMBOL_GPL
-+0x0cc6165c cpu_remove_dev_attr_group vmlinux EXPORT_SYMBOL_GPL
-+0x418fdef0 gnet_stats_finish_copy vmlinux EXPORT_SYMBOL
-+0x5e3c3f48 scsi_get_device_flags_keyed vmlinux EXPORT_SYMBOL
-+0x7282cf02 device_show_int vmlinux EXPORT_SYMBOL_GPL
-+0x94552a4e swiotlb_tbl_unmap_single vmlinux EXPORT_SYMBOL_GPL
-+0x5a6143d7 blk_fetch_request vmlinux EXPORT_SYMBOL
-+0xcee07d7c free_inode_nonrcu vmlinux EXPORT_SYMBOL
-+0xb7cb7543 dma_pool_create vmlinux EXPORT_SYMBOL
-+0x4b34fbf5 block_all_signals vmlinux EXPORT_SYMBOL
-+0x1e7af842 sdio_writeb vmlinux EXPORT_SYMBOL_GPL
-+0x2e5f37cd usb_hcd_pci_probe vmlinux EXPORT_SYMBOL_GPL
-+0x955a8e9a tty_name vmlinux EXPORT_SYMBOL
-+0xb5aa7165 dma_pool_destroy vmlinux EXPORT_SYMBOL
-+0x9045913c of_dev_put vmlinux EXPORT_SYMBOL
-+0x78ab4762 of_dev_get vmlinux EXPORT_SYMBOL
-+0xc22d32e4 sysfs_get_dirent vmlinux EXPORT_SYMBOL_GPL
-+0x35f7dc5f perf_event_release_kernel vmlinux EXPORT_SYMBOL_GPL
-+0x8c03d20c destroy_workqueue vmlinux EXPORT_SYMBOL_GPL
-+0xd5901a2e inet6_csk_reqsk_queue_hash_add vmlinux EXPORT_SYMBOL_GPL
-+0x7aff474c inet_twsk_put vmlinux EXPORT_SYMBOL_GPL
-+0x6409d9b1 fib_default_rule_add vmlinux EXPORT_SYMBOL
-+0xc1402a83 do_SAK vmlinux EXPORT_SYMBOL
-+0xb5c93022 pci_load_and_free_saved_state vmlinux EXPORT_SYMBOL_GPL
-+0x4ed00fb3 pci_save_state vmlinux EXPORT_SYMBOL
-+0x5581df9d fat_get_dotdot_entry vmlinux EXPORT_SYMBOL_GPL
-+0xcc19c3b6 check_disk_change vmlinux EXPORT_SYMBOL
-+0xbcce8393 default_file_splice_read vmlinux EXPORT_SYMBOL
-+0x32b2fbcf writeback_inodes_sb vmlinux EXPORT_SYMBOL
-+0x8e555738 param_get_uint vmlinux EXPORT_SYMBOL
-+0x5d650a5f elv_register vmlinux EXPORT_SYMBOL_GPL
-+0x4523b9b7 page_put_link vmlinux EXPORT_SYMBOL
-+0xcd70c7f7 release_pages vmlinux EXPORT_SYMBOL
-+0xb4cab2ed rpc_sleep_on vmlinux EXPORT_SYMBOL_GPL
-+0xc1a33294 km_state_expired vmlinux EXPORT_SYMBOL
-+0xfef1d118 qdisc_list_del vmlinux EXPORT_SYMBOL
-+0xb0e10781 get_option vmlinux EXPORT_SYMBOL
-+0xb323ab9f nf_ct_gre_keymap_destroy net/netfilter/nf_conntrack_proto_gre EXPORT_SYMBOL_GPL
-+0xce19bac5 register_inet6addr_notifier vmlinux EXPORT_SYMBOL
-+0xcb117d64 inet_accept vmlinux EXPORT_SYMBOL
-+0x49b07aec tcp_select_initial_window vmlinux EXPORT_SYMBOL
-+0x762ff2b9 register_pernet_device vmlinux EXPORT_SYMBOL_GPL
-+0x33b91f1c class_for_each_device vmlinux EXPORT_SYMBOL_GPL
-+0xe697d108 __blk_iopoll_complete vmlinux EXPORT_SYMBOL
-+0x13e38f5c up_read vmlinux EXPORT_SYMBOL
-+0xa1c76e0a _cond_resched vmlinux EXPORT_SYMBOL
-+0x595d0946 empty_zero_page vmlinux EXPORT_SYMBOL
-+0x76e2075c nfnetlink_subsys_register net/netfilter/nfnetlink EXPORT_SYMBOL_GPL
-+0xe5205ca9 __pskb_pull_tail vmlinux EXPORT_SYMBOL
-+0x123a8ed7 mtd_is_partition vmlinux EXPORT_SYMBOL_GPL
-+0x25c7b476 dev_alert vmlinux EXPORT_SYMBOL
-+0xa8e85346 tty_wait_until_sent vmlinux EXPORT_SYMBOL
-+0x74d1c3d7 bioset_free vmlinux EXPORT_SYMBOL
-+0x7362dd1e vfs_fstat vmlinux EXPORT_SYMBOL
-+0x127f1cf8 vfs_lstat vmlinux EXPORT_SYMBOL
-+0x5b9828c5 dma_spin_lock vmlinux EXPORT_SYMBOL
-+0x20bc3470 orderly_poweroff vmlinux EXPORT_SYMBOL_GPL
-+0x0be13004 usb_storage_usb_ids vmlinux EXPORT_SYMBOL_GPL
-+0x1556756b usermodehelper_is_disabled vmlinux EXPORT_SYMBOL_GPL
-+0x82e704cc __netif_schedule vmlinux EXPORT_SYMBOL
-+0x63f7a522 gpio_export_link vmlinux EXPORT_SYMBOL_GPL
-+0x75bb9ca1 generic_fh_to_parent vmlinux EXPORT_SYMBOL_GPL
-+0xc123374d generic_fillattr vmlinux EXPORT_SYMBOL
-+0x183fa88b mempool_alloc_slab vmlinux EXPORT_SYMBOL
-+0x379f5837 param_set_invbool vmlinux EXPORT_SYMBOL
-+0xc5534d64 ioread16 vmlinux EXPORT_SYMBOL
-+0x9f185a94 i2c_register_driver vmlinux EXPORT_SYMBOL
-+0x343b3ac1 pci_bus_alloc_resource vmlinux EXPORT_SYMBOL
-+0x6579d2f7 d_instantiate_unique vmlinux EXPORT_SYMBOL
-+0xd6b8e852 request_threaded_irq vmlinux EXPORT_SYMBOL
-+0x9d7ce8dd _raw_spin_trylock vmlinux EXPORT_SYMBOL
-+0xc496da96 svc_drop vmlinux EXPORT_SYMBOL_GPL
-+0x3a24b303 mutex_lock_interruptible vmlinux EXPORT_SYMBOL
-+0xf47788cf skb_clone vmlinux EXPORT_SYMBOL
-+0xad167cd8 input_get_keycode vmlinux EXPORT_SYMBOL
-+0x6afa9ce8 crypto_find_alg vmlinux EXPORT_SYMBOL_GPL
-+0xc6aac677 set_task_ioprio vmlinux EXPORT_SYMBOL_GPL
-+0xbe5e9490 setup_arg_pages vmlinux EXPORT_SYMBOL
-+0x5dc8d493 usb_serial_generic_process_read_urb vmlinux EXPORT_SYMBOL_GPL
-+0x055c3bb2 inode_dio_wait vmlinux EXPORT_SYMBOL_GPL
-+0xc34efe27 snmp_fold_field vmlinux EXPORT_SYMBOL_GPL
-+0x9d5a6e79 tcp_init_xmit_timers vmlinux EXPORT_SYMBOL
-+0x93f1e027 phy_ethtool_gset vmlinux EXPORT_SYMBOL
-+0xc200ab97 phy_ethtool_sset vmlinux EXPORT_SYMBOL
-+0xd67364f7 eventfd_ctx_fdget vmlinux EXPORT_SYMBOL_GPL
-+0x446b3e02 thermal_zone_device_unregister vmlinux EXPORT_SYMBOL
-+0x4980c504 vfs_lock_file vmlinux EXPORT_SYMBOL_GPL
-+0xa00f2ea1 bio_uncopy_user vmlinux EXPORT_SYMBOL
-+0x07f3051f make_bad_inode vmlinux EXPORT_SYMBOL
-+0x04cb56f3 __d_drop vmlinux EXPORT_SYMBOL
-+0xadb98035 __mmdrop vmlinux EXPORT_SYMBOL_GPL
-+0x3065f579 gss_mech_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x33dbfd93 tcp_memory_allocated vmlinux EXPORT_SYMBOL
-+0xea7be216 hid_check_keys_pressed vmlinux EXPORT_SYMBOL_GPL
-+0x0a2e681f scsi_bus_type vmlinux EXPORT_SYMBOL_GPL
-+0xa8232c78 strtobool vmlinux EXPORT_SYMBOL
-+0xa807009b seq_release_private vmlinux EXPORT_SYMBOL
-+0xb9ea2b35 clear_user_page vmlinux EXPORT_SYMBOL
-+0x94d397ff uart_console_write vmlinux EXPORT_SYMBOL_GPL
-+0x7b59e193 writeback_inodes_sb_nr vmlinux EXPORT_SYMBOL
-+0x4f005ac7 vfs_removexattr vmlinux EXPORT_SYMBOL_GPL
-+0x3bc25df9 find_symbol vmlinux EXPORT_SYMBOL_GPL
-+0x55139b31 __mutex_init vmlinux EXPORT_SYMBOL
-+0x807fb25f sdio_readsb vmlinux EXPORT_SYMBOL_GPL
-+0x73883f28 mmc_host_enable vmlinux EXPORT_SYMBOL
-+0xa4536a78 rtc_set_time vmlinux EXPORT_SYMBOL_GPL
-+0x131e5c6e pcix_get_mmrbc vmlinux EXPORT_SYMBOL
-+0x6f7d4b21 auth_domain_lookup vmlinux EXPORT_SYMBOL_GPL
-+0x0b0d888b icmpv6_err_convert vmlinux EXPORT_SYMBOL
-+0x6a010ac4 xfrm_audit_state_delete vmlinux EXPORT_SYMBOL_GPL
-+0x7f00decc serial8250_register_port vmlinux EXPORT_SYMBOL
-+0xd40d44fb vfs_readv vmlinux EXPORT_SYMBOL
-+0xe10285f5 do_sync_write vmlinux EXPORT_SYMBOL
-+0x3a63d1e5 mmc_detect_change vmlinux EXPORT_SYMBOL
-+0xfe29a782 crypto_shash_setkey vmlinux EXPORT_SYMBOL_GPL
-+0x1ad011b8 crypto_ahash_setkey vmlinux EXPORT_SYMBOL_GPL
-+0x6b569c7b search_binary_handler vmlinux EXPORT_SYMBOL
-+0xaa5dc44d rt_mutex_trylock vmlinux EXPORT_SYMBOL_GPL
-+0xa0cc8b48 rtnl_link_get_net vmlinux EXPORT_SYMBOL
-+0x4d88ec39 sdio_readw vmlinux EXPORT_SYMBOL_GPL
-+0x7a1cde57 sdio_readl vmlinux EXPORT_SYMBOL_GPL
-+0x1b2bbad1 sdio_readb vmlinux EXPORT_SYMBOL_GPL
-+0xdc8e7a1f usb_remove_hcd vmlinux EXPORT_SYMBOL_GPL
-+0x861c1a61 ahash_attr_alg vmlinux EXPORT_SYMBOL_GPL
-+0xcfb5871c irq_work_queue vmlinux EXPORT_SYMBOL_GPL
-+0x6bac7336 tcp_disconnect vmlinux EXPORT_SYMBOL
-+0x0d030f2e put_device vmlinux EXPORT_SYMBOL_GPL
-+0xb675788e nfs_initiate_write vmlinux EXPORT_SYMBOL_GPL
-+0xef990a5a bio_pair_release vmlinux EXPORT_SYMBOL
-+0xd44a50f2 spi_alloc_device vmlinux EXPORT_SYMBOL_GPL
-+0xece65659 journal_start vmlinux EXPORT_SYMBOL
-+0x77a203d6 register_filesystem vmlinux EXPORT_SYMBOL
-+0xba497f13 loops_per_jiffy vmlinux EXPORT_SYMBOL
-+0xd850fe94 eth_validate_addr vmlinux EXPORT_SYMBOL
-+0xc5718627 sg_copy_to_buffer vmlinux EXPORT_SYMBOL
-+0xc316b98c jiffies_to_clock_t vmlinux EXPORT_SYMBOL
-+0x0c875058 usb_debug_root vmlinux EXPORT_SYMBOL_GPL
-+0x69ef82cd generic_make_request vmlinux EXPORT_SYMBOL
-+0x308c701c generic_file_llseek_size vmlinux EXPORT_SYMBOL
-+0x38bd731f queue_delayed_work vmlinux EXPORT_SYMBOL_GPL
-+0x1c87a811 __round_jiffies_up vmlinux EXPORT_SYMBOL_GPL
-+0x98fe7882 DMA_MODE_READ vmlinux EXPORT_SYMBOL
-+0x1c80de9c ip_send_check vmlinux EXPORT_SYMBOL
-+0xdc8e4d19 __rtnl_register vmlinux EXPORT_SYMBOL_GPL
-+0xa6c839d3 usb_serial_generic_disconnect vmlinux EXPORT_SYMBOL_GPL
-+0x57db7242 mangle_path vmlinux EXPORT_SYMBOL
-+0x81612cb7 pci_get_domain_bus_and_slot vmlinux EXPORT_SYMBOL
-+0x4cd416fe anon_inode_getfd vmlinux EXPORT_SYMBOL_GPL
-+0xef22332a filemap_flush vmlinux EXPORT_SYMBOL
-+0xa4a94d26 find_next_bit_le vmlinux EXPORT_SYMBOL
-+0xc1d7d179 blk_stack_limits vmlinux EXPORT_SYMBOL
-+0x28ea0728 of_scan_bus vmlinux EXPORT_SYMBOL_GPL
-+0x774b6448 unix_domain_find vmlinux EXPORT_SYMBOL_GPL
-+0xcc8ebe78 tcp_set_state vmlinux EXPORT_SYMBOL_GPL
-+0x00239c1b i2c_smbus_read_i2c_block_data vmlinux EXPORT_SYMBOL
-+0x9bd59d1d tty_mutex vmlinux EXPORT_SYMBOL
-+0xb28f5ef1 xt_free_table_info vmlinux EXPORT_SYMBOL
-+0x0e1fa4e9 mnt_pin vmlinux EXPORT_SYMBOL
-+0x616456a1 set_create_files_as vmlinux EXPORT_SYMBOL
-+0xb609d16c dev_get_by_name vmlinux EXPORT_SYMBOL
-+0x8848b690 __page_symlink vmlinux EXPORT_SYMBOL
-+0xd2044f1c install_exec_creds vmlinux EXPORT_SYMBOL
-+0xaf488b30 sched_setscheduler vmlinux EXPORT_SYMBOL_GPL
-+0x6923ce63 irq_work_sync vmlinux EXPORT_SYMBOL_GPL
-+0x30a80826 __kfifo_from_user vmlinux EXPORT_SYMBOL
-+0x595c70ed ipcomp_input net/xfrm/xfrm_ipcomp EXPORT_SYMBOL_GPL
-+0xead1e53c xdr_skb_read_bits vmlinux EXPORT_SYMBOL_GPL
-+0xf20020d8 udp_prot vmlinux EXPORT_SYMBOL
-+0x552567c0 inet_putpeer vmlinux EXPORT_SYMBOL_GPL
-+0x6a1a16cb mmc_card_sleep vmlinux EXPORT_SYMBOL
-+0x0c167229 i2c_adapter_type vmlinux EXPORT_SYMBOL_GPL
-+0xebd52fa9 inet6_sk_rebuild_header vmlinux EXPORT_SYMBOL_GPL
-+0xe506bc98 mb_cache_shrink vmlinux EXPORT_SYMBOL
-+0x2d3385d3 system_wq vmlinux EXPORT_SYMBOL_GPL
-+0xf1e98c74 avenrun vmlinux EXPORT_SYMBOL
-+0x366e962c nf_ct_extend_register net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x634b5ff0 mmc_calc_max_discard vmlinux EXPORT_SYMBOL
-+0xb1356813 register_mtd_parser vmlinux EXPORT_SYMBOL_GPL
-+0x3281f449 mark_page_accessed vmlinux EXPORT_SYMBOL
-+0x9cb8037b xfrm_count_enc_supported vmlinux EXPORT_SYMBOL_GPL
-+0x02a18c74 nf_conntrack_destroy vmlinux EXPORT_SYMBOL
-+0x7cac5792 scsi_report_bus_reset vmlinux EXPORT_SYMBOL
-+0x5c8a36aa ip6_sk_dst_lookup_flow vmlinux EXPORT_SYMBOL_GPL
-+0x460f95b8 hid_output_report vmlinux EXPORT_SYMBOL_GPL
-+0xaa072d41 cdev_add vmlinux EXPORT_SYMBOL
-+0xfcd7bc0b ring_buffer_empty vmlinux EXPORT_SYMBOL_GPL
-+0x69447467 ring_buffer_write vmlinux EXPORT_SYMBOL_GPL
-+0x82939ebd rcu_batches_completed_sched vmlinux EXPORT_SYMBOL_GPL
-+0xeeacab69 rpc_update_rtt vmlinux EXPORT_SYMBOL_GPL
-+0x6ee56ac5 xfrm_input vmlinux EXPORT_SYMBOL
-+0x7fccf2c7 dev_mc_del vmlinux EXPORT_SYMBOL
-+0xd44258b7 dev_uc_add vmlinux EXPORT_SYMBOL
-+0x54a36ee2 dev_mc_add vmlinux EXPORT_SYMBOL
-+0xff2dc492 dev_uc_del vmlinux EXPORT_SYMBOL
-+0xe17df33d register_pernet_subsys vmlinux EXPORT_SYMBOL_GPL
-+0xef850ef5 rtc_update_irq vmlinux EXPORT_SYMBOL_GPL
-+0xebdef3fd blk_queue_update_dma_pad vmlinux EXPORT_SYMBOL
-+0x30d8f8a2 blkdev_get_by_path vmlinux EXPORT_SYMBOL
-+0x8745258d open_exec vmlinux EXPORT_SYMBOL
-+0x5fc3a25a cpu_subsys vmlinux EXPORT_SYMBOL_GPL
-+0x00f7937a mb_cache_entry_find_next vmlinux EXPORT_SYMBOL
-+0xef3c9907 inode_init_owner vmlinux EXPORT_SYMBOL
-+0x0b48677a __kfifo_init vmlinux EXPORT_SYMBOL
-+0xd7d19d8c pci_find_next_capability vmlinux EXPORT_SYMBOL_GPL
-+0xa166674c journal_forget vmlinux EXPORT_SYMBOL
-+0xe6506d9b rt_mutex_destroy vmlinux EXPORT_SYMBOL_GPL
-+0xa8b1f0bd queue_delayed_work_on vmlinux EXPORT_SYMBOL_GPL
-+0xd4034828 system_freezable_wq vmlinux EXPORT_SYMBOL_GPL
-+0x615be263 devres_open_group vmlinux EXPORT_SYMBOL_GPL
-+0x5b19634d div_s64_rem vmlinux EXPORT_SYMBOL
-+0x4a2e3575 __set_page_dirty_nobuffers vmlinux EXPORT_SYMBOL
-+0x4b08f423 __nf_ct_kill_acct net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x0561fdb5 svc_xprt_copy_addrs vmlinux EXPORT_SYMBOL_GPL
-+0x48000553 mempool_create_node vmlinux EXPORT_SYMBOL
-+0xd853827a find_get_pid vmlinux EXPORT_SYMBOL_GPL
-+0x1826f0a0 dev_set_promiscuity vmlinux EXPORT_SYMBOL
-+0x42ee873c usb_stor_transparent_scsi_command vmlinux EXPORT_SYMBOL_GPL
-+0x0eaa69cc scsi_bios_ptable vmlinux EXPORT_SYMBOL
-+0x9f4e5960 pci_write_vpd vmlinux EXPORT_SYMBOL
-+0x169d875d neigh_connected_output vmlinux EXPORT_SYMBOL
-+0xe9f7149c zlib_deflate_workspacesize vmlinux EXPORT_SYMBOL
-+0x11633870 param_set_ushort vmlinux EXPORT_SYMBOL
-+0x7ae5d317 qe_get_snum vmlinux EXPORT_SYMBOL
-+0x910e2911 qe_put_snum vmlinux EXPORT_SYMBOL
-+0x4fba15b0 svc_recv vmlinux EXPORT_SYMBOL_GPL
-+0x5dcfccd8 udp_flush_pending_frames vmlinux EXPORT_SYMBOL
-+0xd445ec0d netlink_kernel_create vmlinux EXPORT_SYMBOL
-+0xe5da4ca8 dev_get_stats vmlinux EXPORT_SYMBOL
-+0x86fb9b05 bitmap_parse_user vmlinux EXPORT_SYMBOL
-+0x01000e51 schedule vmlinux EXPORT_SYMBOL
-+0x4f040a49 nlmsg_notify vmlinux EXPORT_SYMBOL
-+0x9ac0cf66 mmput vmlinux EXPORT_SYMBOL_GPL
-+0x9d438cba init_task vmlinux EXPORT_SYMBOL
-+0x0a52a70f rpc_task_reset_client vmlinux EXPORT_SYMBOL_GPL
-+0x871477d5 sysdev_class_remove_file vmlinux EXPORT_SYMBOL_GPL
-+0x17e28473 fsl_upm_run_pattern vmlinux EXPORT_SYMBOL
-+0x262e8cd3 pcibios_resource_to_bus vmlinux EXPORT_SYMBOL
-+0x89d66811 build_ehash_secret vmlinux EXPORT_SYMBOL
-+0x38e36730 __inet_twsk_hashdance vmlinux EXPORT_SYMBOL_GPL
-+0xdfd88ae5 neigh_table_init_no_netlink vmlinux EXPORT_SYMBOL
-+0x3c17abfe gnet_stats_copy_app vmlinux EXPORT_SYMBOL
-+0x9567b24a i2c_verify_client vmlinux EXPORT_SYMBOL
-+0xa2557f57 input_allocate_device vmlinux EXPORT_SYMBOL
-+0x1cd4aca8 dev_printk vmlinux EXPORT_SYMBOL
-+0x655a6117 pci_set_pcie_reset_state vmlinux EXPORT_SYMBOL_GPL
-+0x1b015d25 bitmap_parselist vmlinux EXPORT_SYMBOL
-+0x66e042c6 __insert_inode_hash vmlinux EXPORT_SYMBOL
-+0x0619ca8a getboottime vmlinux EXPORT_SYMBOL_GPL
-+0x80b9cedd revert_creds vmlinux EXPORT_SYMBOL
-+0xdf929370 fs_overflowgid vmlinux EXPORT_SYMBOL
-+0x9c5f81da cpu_rmap_add vmlinux EXPORT_SYMBOL
-+0x0b157e07 swiotlb_unmap_sg_attrs vmlinux EXPORT_SYMBOL
-+0x6b252ff6 bio_clone vmlinux EXPORT_SYMBOL
-+0xedb52e09 xfrm_policy_walk vmlinux EXPORT_SYMBOL
-+0x32f08411 blocking_notifier_call_chain vmlinux EXPORT_SYMBOL_GPL
-+0xf6428305 nfs_init_commit vmlinux EXPORT_SYMBOL_GPL
-+0x594bf15b ioport_map vmlinux EXPORT_SYMBOL
-+0x8cff16ad xfrm_audit_state_add vmlinux EXPORT_SYMBOL_GPL
-+0x83b50e64 __skb_checksum_complete vmlinux EXPORT_SYMBOL
-+0xed302f0f tty_lock vmlinux EXPORT_SYMBOL
-+0xb5a459dc unregister_blkdev vmlinux EXPORT_SYMBOL
-+0x3ebc5a82 key_alloc vmlinux EXPORT_SYMBOL
-+0xa4b0ca7b write_inode_now vmlinux EXPORT_SYMBOL
-+0x5da7c835 sysdev_store_ulong vmlinux EXPORT_SYMBOL_GPL
-+0x1bc4ff03 tty_termios_hw_change vmlinux EXPORT_SYMBOL
-+0xf2d69a5d fat_search_long vmlinux EXPORT_SYMBOL_GPL
-+0x5e181c16 seq_path vmlinux EXPORT_SYMBOL
-+0xcc5005fe msleep_interruptible vmlinux EXPORT_SYMBOL
-+0xf8b2ff6e g_verify_token_header vmlinux EXPORT_SYMBOL_GPL
-+0x7345829d dev_addr_add vmlinux EXPORT_SYMBOL
-+0x99544b2e netdev_err vmlinux EXPORT_SYMBOL
-+0x65414e67 dev_valid_name vmlinux EXPORT_SYMBOL
-+0x3be89d3c usb_register_notify vmlinux EXPORT_SYMBOL_GPL
-+0xd2a941d4 sg_init_table vmlinux EXPORT_SYMBOL
-+0x5642793a radix_tree_tag_clear vmlinux EXPORT_SYMBOL
-+0x17115d7c fsnotify vmlinux EXPORT_SYMBOL_GPL
-+0x04d7d50a generic_file_open vmlinux EXPORT_SYMBOL
-+0xa357d56e ktime_get vmlinux EXPORT_SYMBOL_GPL
-+0x5e4ed6a0 genphy_update_link vmlinux EXPORT_SYMBOL
-+0xa0df5c38 generic_cont_expand_simple vmlinux EXPORT_SYMBOL
-+0x9000a23c d_instantiate vmlinux EXPORT_SYMBOL
-+0x1b6b594c blk_queue_rq_timed_out vmlinux EXPORT_SYMBOL_GPL
-+0x08c473b7 xt_alloc_table_info vmlinux EXPORT_SYMBOL
-+0xb2f5f9e1 sysdev_create_file vmlinux EXPORT_SYMBOL_GPL
-+0xb7b61546 crc32_be vmlinux EXPORT_SYMBOL
-+0xe52fec95 rpc_restart_call vmlinux EXPORT_SYMBOL_GPL
-+0x660920a6 xfrm_output_resume vmlinux EXPORT_SYMBOL_GPL
-+0xc84ba62e skb_find_text vmlinux EXPORT_SYMBOL
-+0x500e2d6e i2c_unregister_device vmlinux EXPORT_SYMBOL_GPL
-+0xb088b8f4 pci_clear_master vmlinux EXPORT_SYMBOL
-+0x1b848d78 current_fs_time vmlinux EXPORT_SYMBOL
-+0xc009c0f0 skb_queue_tail vmlinux EXPORT_SYMBOL
-+0x953db383 free_irq_cpu_rmap vmlinux EXPORT_SYMBOL
-+0x530dca11 crypto_lookup_template vmlinux EXPORT_SYMBOL_GPL
-+0x1608951e vfs_test_lock vmlinux EXPORT_SYMBOL_GPL
-+0x952664c5 do_exit vmlinux EXPORT_SYMBOL_GPL
-+0x7dbeb00f mmc_host_lazy_disable vmlinux EXPORT_SYMBOL
-+0xc46197ca mark_buffer_dirty_inode vmlinux EXPORT_SYMBOL
-+0x3109b751 cpu_clock vmlinux EXPORT_SYMBOL_GPL
-+0x07121133 __put_mtd_device vmlinux EXPORT_SYMBOL_GPL
-+0xefbe88ae __get_mtd_device vmlinux EXPORT_SYMBOL_GPL
-+0x56011f32 scsi_execute_req vmlinux EXPORT_SYMBOL
-+0x33543801 queue_work vmlinux EXPORT_SYMBOL_GPL
-+0xb1c3a01a oops_in_progress vmlinux EXPORT_SYMBOL
-+0xf1ec57f6 tty_insert_flip_string_fixed_flag vmlinux EXPORT_SYMBOL
-+0x19a433b2 tty_register_ldisc vmlinux EXPORT_SYMBOL
-+0x1dad9e54 tty_throttle vmlinux EXPORT_SYMBOL
-+0xb72b50d8 tty_check_change vmlinux EXPORT_SYMBOL
-+0x57f7d2b8 blk_get_backing_dev_info vmlinux EXPORT_SYMBOL
-+0xf1abb528 elevator_init vmlinux EXPORT_SYMBOL
-+0xe0423822 kill_fasync vmlinux EXPORT_SYMBOL
-+0x736c79dc param_get_byte vmlinux EXPORT_SYMBOL
-+0x69708997 dev_disable_lro vmlinux EXPORT_SYMBOL
-+0x446c0616 attribute_container_classdev_to_container vmlinux EXPORT_SYMBOL_GPL
-+0x7d2b62e9 kblockd_schedule_delayed_work vmlinux EXPORT_SYMBOL
-+0x6f2fe28d debugfs_create_u8 vmlinux EXPORT_SYMBOL_GPL
-+0x6c8d5ae8 __gpio_get_value vmlinux EXPORT_SYMBOL_GPL
-+0x432fd7f6 __gpio_set_value vmlinux EXPORT_SYMBOL_GPL
-+0xd62c833f schedule_timeout vmlinux EXPORT_SYMBOL
-+0x2cadb791 netlink_dump_start vmlinux EXPORT_SYMBOL
-+0x65ccb6f0 call_netevent_notifiers vmlinux EXPORT_SYMBOL_GPL
-+0xd1cc0681 percpu_counter_compare vmlinux EXPORT_SYMBOL
-+0xc365ca35 crypto_alloc_base vmlinux EXPORT_SYMBOL_GPL
-+0x7e92c53a aio_put_req vmlinux EXPORT_SYMBOL
-+0xb8bddf33 ip6t_ext_hdr net/ipv6/netfilter/ip6_tables EXPORT_SYMBOL
-+0x8e0b7743 ipv6_ext_hdr vmlinux EXPORT_SYMBOL
-+0x5c311da9 neigh_destroy vmlinux EXPORT_SYMBOL
-+0x914859fb netdev_warn vmlinux EXPORT_SYMBOL
-+0x32445441 mmc_wait_for_app_cmd vmlinux EXPORT_SYMBOL
-+0xcefcd99a serial8250_unregister_port vmlinux EXPORT_SYMBOL
-+0x0c077439 blk_end_request_cur vmlinux EXPORT_SYMBOL
-+0x5aed1672 replace_mount_options vmlinux EXPORT_SYMBOL
-+0x37ea921e vfsmount_lock_local_lock_cpu vmlinux EXPORT_SYMBOL
-+0x7303f848 __xfrm_policy_check vmlinux EXPORT_SYMBOL
-+0xe9f5462d blk_lld_busy vmlinux EXPORT_SYMBOL_GPL
-+0x70f16495 blk_sync_queue vmlinux EXPORT_SYMBOL
-+0xf15a9bc6 skb_clone_tx_timestamp vmlinux EXPORT_SYMBOL_GPL
-+0xdbba9970 pskb_copy vmlinux EXPORT_SYMBOL
-+0x9da1d86b scsi_schedule_eh vmlinux EXPORT_SYMBOL_GPL
-+0xa0b474d5 class_unregister vmlinux EXPORT_SYMBOL_GPL
-+0xa185f0cd fat_alloc_new_dir vmlinux EXPORT_SYMBOL_GPL
-+0x17368f42 simple_write_end vmlinux EXPORT_SYMBOL
-+0x37d2c2c5 rh_dump_blk vmlinux EXPORT_SYMBOL_GPL
-+0xd07885a5 ip_mc_rejoin_groups vmlinux EXPORT_SYMBOL
-+0xa6f04ef7 netdev_update_features vmlinux EXPORT_SYMBOL
-+0x45f9ef6a spi_async vmlinux EXPORT_SYMBOL_GPL
-+0xd75c79df smp_call_function vmlinux EXPORT_SYMBOL
-+0xef6c3f70 round_jiffies_up_relative vmlinux EXPORT_SYMBOL_GPL
-+0xd5c1febc of_rescan_bus vmlinux EXPORT_SYMBOL_GPL
-+0xd5b2e52a single_step_exception vmlinux EXPORT_SYMBOL
-+0xe3f587bb eth_header_cache vmlinux EXPORT_SYMBOL
-+0xfd3a2bf8 i2c_smbus_read_byte_data vmlinux EXPORT_SYMBOL
-+0xca5dbc50 scsi_print_sense_hdr vmlinux EXPORT_SYMBOL
-+0x6bedb1fb scsi_host_lookup vmlinux EXPORT_SYMBOL
-+0x83ed980f uart_set_options vmlinux EXPORT_SYMBOL_GPL
-+0xf385cf08 pci_find_capability vmlinux EXPORT_SYMBOL
-+0x0675c7eb atomic64_cmpxchg vmlinux EXPORT_SYMBOL
-+0xb9d025c9 llist_del_first vmlinux EXPORT_SYMBOL_GPL
-+0xb678366f int_sqrt vmlinux EXPORT_SYMBOL
-+0xfdbe54c4 dec_zone_page_state vmlinux EXPORT_SYMBOL
-+0x0799aca4 local_bh_enable vmlinux EXPORT_SYMBOL
-+0xf38bcdf3 nf_conntrack_max net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x60763401 tcp_syn_flood_action vmlinux EXPORT_SYMBOL
-+0xb9099fb2 llc_mac_hdr_init vmlinux EXPORT_SYMBOL
-+0xee8d918e journal_dirty_metadata vmlinux EXPORT_SYMBOL
-+0x1eb9516e round_jiffies_relative vmlinux EXPORT_SYMBOL_GPL
-+0x17aa156a __ucmpdi2 vmlinux EXPORT_SYMBOL
-+0xfab60503 klist_iter_init_node vmlinux EXPORT_SYMBOL_GPL
-+0x0634100a bitmap_parselist_user vmlinux EXPORT_SYMBOL
-+0xf45c1434 ida_simple_get vmlinux EXPORT_SYMBOL
-+0xe87ffb37 blk_queue_update_dma_alignment vmlinux EXPORT_SYMBOL
-+0x18d30e30 blk_start_request vmlinux EXPORT_SYMBOL
-+0x7c003aef _raw_read_lock_irq vmlinux EXPORT_SYMBOL
-+0xf243a51d hrtimer_try_to_cancel vmlinux EXPORT_SYMBOL_GPL
-+0xbb543a9f nf_register_hook vmlinux EXPORT_SYMBOL
-+0xae870b28 __dev_get_by_name vmlinux EXPORT_SYMBOL
-+0x4cfd46aa skb_copy_and_csum_dev vmlinux EXPORT_SYMBOL
-+0xb02612a3 input_unregister_handle vmlinux EXPORT_SYMBOL
-+0x7e6c28a6 usb_hcd_map_urb_for_dma vmlinux EXPORT_SYMBOL_GPL
-+0x8e63350d idr_replace vmlinux EXPORT_SYMBOL
-+0x82acfb70 blk_iopoll_sched vmlinux EXPORT_SYMBOL
-+0xaa17a2e2 rh_alloc_align vmlinux EXPORT_SYMBOL_GPL
-+0x2c7db649 irq_dispose_mapping vmlinux EXPORT_SYMBOL_GPL
-+0x2971c44c register_netdev vmlinux EXPORT_SYMBOL
-+0xa8223905 blk_limits_io_opt vmlinux EXPORT_SYMBOL
-+0x612e9fe1 inet_twsk_purge vmlinux EXPORT_SYMBOL_GPL
-+0x9e9f1714 __bitmap_andnot vmlinux EXPORT_SYMBOL
-+0x737de5e9 radix_tree_tag_get vmlinux EXPORT_SYMBOL
-+0x9941925e get_pci_dma_ops vmlinux EXPORT_SYMBOL
-+0xc7041cc2 skb_seq_read vmlinux EXPORT_SYMBOL
-+0x712be89f i2c_transfer vmlinux EXPORT_SYMBOL
-+0x67eb757c scsi_device_lookup vmlinux EXPORT_SYMBOL
-+0xe0fc24aa param_set_int vmlinux EXPORT_SYMBOL
-+0x3ec32668 xdr_inline_pages vmlinux EXPORT_SYMBOL_GPL
-+0x17d5b36f crypto_drop_spawn vmlinux EXPORT_SYMBOL_GPL
-+0x834658ac cmxgcr_lock vmlinux EXPORT_SYMBOL
-+0x9ce3f83f nvram_write_byte vmlinux EXPORT_SYMBOL
-+0x13ec80f3 param_set_short vmlinux EXPORT_SYMBOL
-+0xf4e2a909 nf_nat_tftp_hook net/netfilter/nf_conntrack_tftp EXPORT_SYMBOL_GPL
-+0x1d39c751 nf_nat_snmp_hook net/netfilter/nf_conntrack_snmp EXPORT_SYMBOL_GPL
-+0xeb810de9 skb_pad vmlinux EXPORT_SYMBOL
-+0x77bc13a0 strim vmlinux EXPORT_SYMBOL
-+0xc4191169 shash_register_instance vmlinux EXPORT_SYMBOL_GPL
-+0xbf84d6ad seq_write vmlinux EXPORT_SYMBOL
-+0x3ed6ecb7 generic_file_llseek vmlinux EXPORT_SYMBOL
-+0x95922601 rtc_update_irq_enable vmlinux EXPORT_SYMBOL_GPL
-+0x999e8297 vfree vmlinux EXPORT_SYMBOL
-+0x6906c2dc wait_on_page_bit vmlinux EXPORT_SYMBOL
-+0xcbdab685 mutex_lock vmlinux EXPORT_SYMBOL
-+0x097d06aa scsi_get_host_dev vmlinux EXPORT_SYMBOL
-+0x240bd3e5 swiotlb_sync_sg_for_device vmlinux EXPORT_SYMBOL
-+0x6c03da58 elv_rq_merge_ok vmlinux EXPORT_SYMBOL
-+0xee3496c3 dma_pool_alloc vmlinux EXPORT_SYMBOL
-+0xee766000 tcp_v4_do_rcv vmlinux EXPORT_SYMBOL
-+0x0ec55ed1 get_device vmlinux EXPORT_SYMBOL_GPL
-+0xbee1171d blk_dump_rq_flags vmlinux EXPORT_SYMBOL
-+0x3cfa0f3d sysfs_create_group vmlinux EXPORT_SYMBOL_GPL
-+0xf065f629 ioread16be vmlinux EXPORT_SYMBOL
-+0x00c52ef5 g_make_token_header vmlinux EXPORT_SYMBOL_GPL
-+0xcd2f69d1 xprt_release_rqst_cong vmlinux EXPORT_SYMBOL_GPL
-+0x05e73ebe xfrm_unregister_mode vmlinux EXPORT_SYMBOL
-+0xa84245d3 consume_skb vmlinux EXPORT_SYMBOL
-+0xdd978be5 scsi_add_device vmlinux EXPORT_SYMBOL
-+0x2d832e72 pci_match_id vmlinux EXPORT_SYMBOL
-+0x01674bbb pci_dev_run_wake vmlinux EXPORT_SYMBOL_GPL
-+0x64e716c4 rpc_alloc_iostats vmlinux EXPORT_SYMBOL_GPL
-+0xa2a8b984 ethtool_op_get_tso vmlinux EXPORT_SYMBOL
-+0xdfc02652 i2c_add_numbered_adapter vmlinux EXPORT_SYMBOL_GPL
-+0x12fa94c6 usb_unanchor_urb vmlinux EXPORT_SYMBOL_GPL
-+0x8071ec90 bio_kmalloc vmlinux EXPORT_SYMBOL
-+0xa62884a3 poll_schedule_timeout vmlinux EXPORT_SYMBOL
-+0x30ddb019 tcp_prot vmlinux EXPORT_SYMBOL
-+0xbc912b04 root_device_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x5ff1e29f textsearch_prepare vmlinux EXPORT_SYMBOL
-+0x50ab4c6d files_lglock_global_lock vmlinux EXPORT_SYMBOL
-+0x7914c68c proc_dointvec_ms_jiffies vmlinux EXPORT_SYMBOL
-+0x63f22305 inet_frag_kill vmlinux EXPORT_SYMBOL
-+0x4f90f253 simple_setattr vmlinux EXPORT_SYMBOL
-+0xcfea7e86 simple_getattr vmlinux EXPORT_SYMBOL
-+0x23f2243d mempool_free vmlinux EXPORT_SYMBOL
-+0xc0b11f65 pci_iounmap vmlinux EXPORT_SYMBOL
-+0x9edf6333 llc_sap_open vmlinux EXPORT_SYMBOL
-+0x88164429 cred_to_ucred vmlinux EXPORT_SYMBOL_GPL
-+0x3d418f49 sock_tx_timestamp vmlinux EXPORT_SYMBOL
-+0x8d4097dd usb_stor_Bulk_reset vmlinux EXPORT_SYMBOL_GPL
-+0x9eb18e34 attribute_container_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x277034d4 driver_for_each_device vmlinux EXPORT_SYMBOL_GPL
-+0x5c443f95 bdget_disk vmlinux EXPORT_SYMBOL
-+0x717ed11e journal_init_inode vmlinux EXPORT_SYMBOL
-+0xb41c85dd tcp_v4_get_peer vmlinux EXPORT_SYMBOL
-+0xa99ef722 tcp_rcv_state_process vmlinux EXPORT_SYMBOL
-+0xf83a1c06 ethtool_op_get_tx_csum vmlinux EXPORT_SYMBOL
-+0xf368fcf8 skb_to_sgvec vmlinux EXPORT_SYMBOL_GPL
-+0x42224298 sscanf vmlinux EXPORT_SYMBOL
-+0x77e35ccc nlmsvc_unlock_all_by_ip vmlinux EXPORT_SYMBOL_GPL
-+0x1a24588e nlmsvc_unlock_all_by_sb vmlinux EXPORT_SYMBOL_GPL
-+0xdaf873fe __breadahead vmlinux EXPORT_SYMBOL
-+0x9531cde3 rpc_bind_new_program vmlinux EXPORT_SYMBOL_GPL
-+0x291d6625 pfifo_fast_ops vmlinux EXPORT_SYMBOL
-+0x3301ac32 platform_device_register_full vmlinux EXPORT_SYMBOL_GPL
-+0x0111955c journal_stop vmlinux EXPORT_SYMBOL
-+0x44eb192e wait_for_completion vmlinux EXPORT_SYMBOL
-+0x72c09e5c csum_partial_copy_to_xdr vmlinux EXPORT_SYMBOL_GPL
-+0xcdbc9355 dev_get_by_name_rcu vmlinux EXPORT_SYMBOL
-+0x7f72cd44 i2c_smbus_write_byte_data vmlinux EXPORT_SYMBOL
-+0x96786360 usb_unlink_urb vmlinux EXPORT_SYMBOL_GPL
-+0xea968c96 ___ratelimit vmlinux EXPORT_SYMBOL
-+0x4806976c __nf_nat_mangle_tcp_packet net/ipv4/netfilter/nf_nat EXPORT_SYMBOL
-+0x9e672ff6 scsi_kmap_atomic_sg vmlinux EXPORT_SYMBOL
-+0xe4c58b28 platform_device_add_data vmlinux EXPORT_SYMBOL_GPL
-+0x3a26ed11 sched_clock vmlinux EXPORT_SYMBOL_GPL
-+0xefde1bbe flush_dcache_range vmlinux EXPORT_SYMBOL
-+0xe1286b24 put_rpccred vmlinux EXPORT_SYMBOL_GPL
-+0x4bf99462 rpcauth_init_cred vmlinux EXPORT_SYMBOL_GPL
-+0x3cce336f xfrm_audit_state_replay_overflow vmlinux EXPORT_SYMBOL_GPL
-+0x1fcece42 inet_twdr_twcal_tick vmlinux EXPORT_SYMBOL_GPL
-+0x533977ad sock_create_lite vmlinux EXPORT_SYMBOL
-+0x97dba41d mmc_hw_reset_check vmlinux EXPORT_SYMBOL
-+0xf1be02c3 swiotlb_dma_mapping_error vmlinux EXPORT_SYMBOL
-+0xb1c3fd5a d_obtain_alias vmlinux EXPORT_SYMBOL
-+0x493e60ab file_sb_list_del vmlinux EXPORT_SYMBOL_GPL
-+0x656e8057 nf_conntrack_helper_try_module_get net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xe160bbbe ip4_datagram_connect vmlinux EXPORT_SYMBOL
-+0x6ba0b373 tcp_timewait_state_process vmlinux EXPORT_SYMBOL
-+0x75bdea12 iommu_area_alloc vmlinux EXPORT_SYMBOL
-+0xc46d877e schedule_hrtimeout vmlinux EXPORT_SYMBOL_GPL
-+0x587b892e qe_get_num_of_risc vmlinux EXPORT_SYMBOL
-+0x9f8fb40b starget_for_each_device vmlinux EXPORT_SYMBOL
-+0x585be6d1 subsys_interface_register vmlinux EXPORT_SYMBOL_GPL
-+0x6fdbcab8 nobh_writepage vmlinux EXPORT_SYMBOL
-+0xb34ab28b clear_page_dirty_for_io vmlinux EXPORT_SYMBOL
-+0xe0573294 srcu_init_notifier_head vmlinux EXPORT_SYMBOL_GPL
-+0xcfb9006e jiffies_to_timeval vmlinux EXPORT_SYMBOL
-+0x60421247 tcp_reno_min_cwnd vmlinux EXPORT_SYMBOL_GPL
-+0x21b65a0b tty_schedule_flip vmlinux EXPORT_SYMBOL
-+0x62d55839 tty_get_baud_rate vmlinux EXPORT_SYMBOL
-+0x96877ac4 locks_start_grace vmlinux EXPORT_SYMBOL_GPL
-+0x2d2aefd5 vfs_follow_link vmlinux EXPORT_SYMBOL
-+0xc9d29672 svc_create_xprt vmlinux EXPORT_SYMBOL_GPL
-+0xc74a0c83 sysdev_class_unregister vmlinux EXPORT_SYMBOL_GPL
-+0xcf038dc7 tty_shutdown vmlinux EXPORT_SYMBOL
-+0xfc885e13 tty_devnum vmlinux EXPORT_SYMBOL
-+0xbed06f95 sysfs_rename_link vmlinux EXPORT_SYMBOL_GPL
-+0x4f391d0e nla_parse vmlinux EXPORT_SYMBOL
-+0xc1868f6a write_dirty_buffer vmlinux EXPORT_SYMBOL
-+0xe633499a noop_llseek vmlinux EXPORT_SYMBOL
-+0xc65d3eed ring_buffer_entries_cpu vmlinux EXPORT_SYMBOL_GPL
-+0xf1e28f9a llc_sap_find vmlinux EXPORT_SYMBOL
-+0x30fbaf1e input_free_device vmlinux EXPORT_SYMBOL
-+0x69f56098 xprt_set_retrans_timeout_rtt vmlinux EXPORT_SYMBOL_GPL
-+0x3e9110fa __hw_addr_unsync vmlinux EXPORT_SYMBOL
-+0x7d11c268 jiffies vmlinux EXPORT_SYMBOL
-+0x3e7bb605 dev_queue_xmit vmlinux EXPORT_SYMBOL
-+0x5fa8e9f9 of_device_alloc vmlinux EXPORT_SYMBOL
-+0xac57677c do_map_probe vmlinux EXPORT_SYMBOL
-+0x5a324753 proc_mkdir vmlinux EXPORT_SYMBOL
-+0x13d0adf7 __kfifo_out vmlinux EXPORT_SYMBOL
-+0x8379c763 dmam_free_noncoherent vmlinux EXPORT_SYMBOL
-+0x0964a2f2 blk_rq_map_sg vmlinux EXPORT_SYMBOL
-+0x9b68e095 proc_dointvec_jiffies vmlinux EXPORT_SYMBOL
-+0xb53a4336 kmap_pte vmlinux EXPORT_SYMBOL
-+0x9105b5ec __napi_schedule vmlinux EXPORT_SYMBOL
-+0x48c6fdb8 sk_stream_wait_memory vmlinux EXPORT_SYMBOL
-+0xaf78c424 usb_set_interface vmlinux EXPORT_SYMBOL_GPL
-+0x8384a2c5 tty_unlock vmlinux EXPORT_SYMBOL
-+0x0d3cb182 kstrtos16_from_user vmlinux EXPORT_SYMBOL
-+0x9f2bdaac __bitmap_or vmlinux EXPORT_SYMBOL
-+0x4b29940c get_dcookie vmlinux EXPORT_SYMBOL_GPL
-+0x87480e3f netlink_broadcast_filtered vmlinux EXPORT_SYMBOL
-+0x5dd67618 register_netevent_notifier vmlinux EXPORT_SYMBOL_GPL
-+0xc7ec6c27 strspn vmlinux EXPORT_SYMBOL
-+0x0727c4f3 iowrite8 vmlinux EXPORT_SYMBOL
-+0x97255bdf strlen vmlinux EXPORT_SYMBOL
-+0x3f44c83f scsi_allocate_command vmlinux EXPORT_SYMBOL
-+0xedbaee5e nla_strcmp vmlinux EXPORT_SYMBOL
-+0x55786827 crypto_ahash_type vmlinux EXPORT_SYMBOL_GPL
-+0x26bb950b __kfifo_from_user_r vmlinux EXPORT_SYMBOL
-+0xadd1e971 alignment_exception vmlinux EXPORT_SYMBOL
-+0xf6cb376c skb_trim vmlinux EXPORT_SYMBOL
-+0x403f9529 gpio_request_one vmlinux EXPORT_SYMBOL_GPL
-+0xce3e3387 svc_proc_register vmlinux EXPORT_SYMBOL_GPL
-+0x6f35aea7 xfrm_policy_delete vmlinux EXPORT_SYMBOL
-+0x40cb7613 inet_frags_init vmlinux EXPORT_SYMBOL
-+0x60d5f317 rtc_irq_register vmlinux EXPORT_SYMBOL_GPL
-+0x4e3567f7 match_int vmlinux EXPORT_SYMBOL
-+0x054434d6 radix_tree_tag_set vmlinux EXPORT_SYMBOL
-+0x7c763d45 blk_queue_lld_busy vmlinux EXPORT_SYMBOL_GPL
-+0xcfd8a363 shash_free_instance vmlinux EXPORT_SYMBOL_GPL
-+0xb663c828 debugfs_create_x64 vmlinux EXPORT_SYMBOL_GPL
-+0x7e003b33 bdi_setup_and_register vmlinux EXPORT_SYMBOL
-+0x510e2136 rpcauth_generic_bind_cred vmlinux EXPORT_SYMBOL_GPL
-+0x5da31da0 skb_cow_data vmlinux EXPORT_SYMBOL_GPL
-+0xdc6b4513 pci_fixup_cardbus vmlinux EXPORT_SYMBOL
-+0x91acac9a i2c_get_adapter vmlinux EXPORT_SYMBOL
-+0x868acba5 get_options vmlinux EXPORT_SYMBOL
-+0xe2d57cb8 setup_irq vmlinux EXPORT_SYMBOL_GPL
-+0x7e64ffb7 xdr_partial_copy_from_skb vmlinux EXPORT_SYMBOL_GPL
-+0xac01fe4e input_unregister_handler vmlinux EXPORT_SYMBOL
-+0x467b133c bh_uptodate_or_lock vmlinux EXPORT_SYMBOL
-+0x2ec524ad __kfifo_in_r vmlinux EXPORT_SYMBOL
-+0x51dce73b xfrm_state_walk_init vmlinux EXPORT_SYMBOL
-+0xabeb086a rtc_read_alarm vmlinux EXPORT_SYMBOL_GPL
-+0x8841dda6 pci_remove_behind_bridge vmlinux EXPORT_SYMBOL
-+0x3c9d1211 string_get_size vmlinux EXPORT_SYMBOL
-+0x14a5ead6 fat_fill_super vmlinux EXPORT_SYMBOL_GPL
-+0x7b03848a verify_mem_not_deleted vmlinux EXPORT_SYMBOL
-+0xee1a5125 register_exec_domain vmlinux EXPORT_SYMBOL
-+0x4227283f fl6_sock_lookup vmlinux EXPORT_SYMBOL_GPL
-+0x4c40ef7a pci_bus_write_config_word vmlinux EXPORT_SYMBOL
-+0x9330cb9f sg_alloc_table vmlinux EXPORT_SYMBOL
-+0x9c8d5b93 handle_simple_irq vmlinux EXPORT_SYMBOL_GPL
-+0xda1be8e1 async_synchronize_cookie_domain vmlinux EXPORT_SYMBOL_GPL
-+0xabd30091 call_usermodehelper_exec vmlinux EXPORT_SYMBOL
-+0xa39b4cf2 udelay vmlinux EXPORT_SYMBOL
-+0xe7a664c4 nf_hooks vmlinux EXPORT_SYMBOL
-+0x339f4657 pci_release_region vmlinux EXPORT_SYMBOL
-+0xff1e9dd8 seq_list_start vmlinux EXPORT_SYMBOL
-+0x3f5b1415 nf_ct_port_nlattr_to_tuple net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xaeea3073 xfrm_aead_get_byname vmlinux EXPORT_SYMBOL_GPL
-+0x02889771 km_state_notify vmlinux EXPORT_SYMBOL
-+0xac26b820 _raw_write_lock vmlinux EXPORT_SYMBOL
-+0x59b3378a completion_done vmlinux EXPORT_SYMBOL
-+0x357c90d2 qdisc_put_stab vmlinux EXPORT_SYMBOL
-+0x96a6cb6a seq_printf vmlinux EXPORT_SYMBOL
-+0x8669d18f call_usermodehelper_setfns vmlinux EXPORT_SYMBOL
-+0x4b98827c rh_init vmlinux EXPORT_SYMBOL_GPL
-+0xa35b2101 mmc_free_host vmlinux EXPORT_SYMBOL
-+0xe0b0dd36 pci_dev_driver vmlinux EXPORT_SYMBOL
-+0x0b742fd7 simple_strtol vmlinux EXPORT_SYMBOL
-+0x4da7c931 rwsem_downgrade_wake vmlinux EXPORT_SYMBOL
-+0xfd9e2a19 ilookup5_nowait vmlinux EXPORT_SYMBOL
-+0xac6855b0 gen_kill_estimator vmlinux EXPORT_SYMBOL
-+0xdacc5bd6 pci_set_power_state vmlinux EXPORT_SYMBOL
-+0x0a0db355 blk_queue_alignment_offset vmlinux EXPORT_SYMBOL
-+0x5f4c2d4c unlock_super vmlinux EXPORT_SYMBOL
-+0xdb3aca5d qe_pin_request vmlinux EXPORT_SYMBOL
-+0x796fc5ce scsi_get_sense_info_fld vmlinux EXPORT_SYMBOL
-+0x16db989b pci_bus_size_bridges vmlinux EXPORT_SYMBOL
-+0x7e17c66d __bio_clone vmlinux EXPORT_SYMBOL
-+0x4d025d04 vfs_stat vmlinux EXPORT_SYMBOL
-+0xa0fbac79 wake_up_bit vmlinux EXPORT_SYMBOL
-+0xe1e5b5a7 flush_fp_to_thread vmlinux EXPORT_SYMBOL_GPL
-+0x3c93c386 nf_conntrack_flush_report net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x48a488a0 sysctl_tcp_cookie_size vmlinux EXPORT_SYMBOL_GPL
-+0xe3a73fdb sysdev_driver_register vmlinux EXPORT_SYMBOL_GPL
-+0x48034724 zlib_deflateReset vmlinux EXPORT_SYMBOL
-+0x013b835b cap_netlink_recv vmlinux EXPORT_SYMBOL
-+0xcdca3691 nr_irqs vmlinux EXPORT_SYMBOL_GPL
-+0x8ec04552 _raw_spin_trylock_bh vmlinux EXPORT_SYMBOL
-+0x56c8799d scsi_kunmap_atomic_sg vmlinux EXPORT_SYMBOL
-+0x1b54f3f0 scsi_block_when_processing_errors vmlinux EXPORT_SYMBOL
-+0x2d6604af wait_for_key_construction vmlinux EXPORT_SYMBOL
-+0xa85da1dd f_setown vmlinux EXPORT_SYMBOL
-+0x05e807a9 xdr_encode_string vmlinux EXPORT_SYMBOL_GPL
-+0x3a434310 ip6_dst_hoplimit vmlinux EXPORT_SYMBOL
-+0x03e7b88a arp_invalidate vmlinux EXPORT_SYMBOL
-+0x81bf1cbf mmc_can_sanitize vmlinux EXPORT_SYMBOL
-+0xfb1ebb24 usb_clear_halt vmlinux EXPORT_SYMBOL_GPL
-+0xb640c303 swiotlb_map_sg_attrs vmlinux EXPORT_SYMBOL
-+0x6d27ef64 __bitmap_empty vmlinux EXPORT_SYMBOL
-+0x7c5f611a elv_unregister vmlinux EXPORT_SYMBOL_GPL
-+0xf85746f7 submit_bh vmlinux EXPORT_SYMBOL
-+0x7babd7ea mnt_clone_write vmlinux EXPORT_SYMBOL_GPL
-+0x4e94f614 page_mkclean vmlinux EXPORT_SYMBOL_GPL
-+0x405c1144 get_seconds vmlinux EXPORT_SYMBOL
-+0x0d706d2e rh_set_owner vmlinux EXPORT_SYMBOL_GPL
-+0xcf56c41f unregister_8022_client vmlinux EXPORT_SYMBOL
-+0x2ddee4bb usb_anchor_empty vmlinux EXPORT_SYMBOL_GPL
-+0xf0f1246c kvasprintf vmlinux EXPORT_SYMBOL
-+0xa6dcc773 rb_insert_color vmlinux EXPORT_SYMBOL
-+0x09c27acb svcauth_unix_set_client vmlinux EXPORT_SYMBOL_GPL
-+0x9cd435ec __xfrm_init_state vmlinux EXPORT_SYMBOL
-+0x1b17f158 hid_dump_field vmlinux EXPORT_SYMBOL_GPL
-+0xdb80a388 __module_text_address vmlinux EXPORT_SYMBOL_GPL
-+0x66d87d38 symbol_put_addr vmlinux EXPORT_SYMBOL_GPL
-+0x2a639aaf hrtimer_start_range_ns vmlinux EXPORT_SYMBOL_GPL
-+0x7c62d042 cpu_possible_mask vmlinux EXPORT_SYMBOL
-+0x65319f3d llc_set_station_handler vmlinux EXPORT_SYMBOL
-+0x12500d33 i2c_smbus_read_word_data vmlinux EXPORT_SYMBOL
-+0xc2ac0cfe tty_buffer_request_room vmlinux EXPORT_SYMBOL_GPL
-+0x00b37551 d_alloc vmlinux EXPORT_SYMBOL
-+0xf7b796cc unuse_mm vmlinux EXPORT_SYMBOL_GPL
-+0x0b73663b __alloc_pages_nodemask vmlinux EXPORT_SYMBOL
-+0x2b0a269a elv_abort_queue vmlinux EXPORT_SYMBOL
-+0xe189aa6f journal_extend vmlinux EXPORT_SYMBOL
-+0x918ad429 ring_buffer_lock_reserve vmlinux EXPORT_SYMBOL_GPL
-+0xe2755929 irq_set_affinity_hint vmlinux EXPORT_SYMBOL_GPL
-+0x3abc78ce dev_err vmlinux EXPORT_SYMBOL
-+0xfcfa8b04 blk_execute_rq_nowait vmlinux EXPORT_SYMBOL_GPL
-+0x6d02eb17 udp_proc_register vmlinux EXPORT_SYMBOL
-+0x7bf1cc3b kernel_sendpage vmlinux EXPORT_SYMBOL
-+0x9d7e0cfa pci_choose_state vmlinux EXPORT_SYMBOL
-+0x0a6c9682 delete_from_page_cache vmlinux EXPORT_SYMBOL
-+0x3b615a21 wait_for_completion_killable vmlinux EXPORT_SYMBOL
-+0x50c89f23 __alloc_percpu vmlinux EXPORT_SYMBOL_GPL
-+0xe7cd06a1 scsi_cmd_get_serial vmlinux EXPORT_SYMBOL
-+0xbd8ed748 svc_close_xprt vmlinux EXPORT_SYMBOL_GPL
-+0x2fb84137 neigh_parms_release vmlinux EXPORT_SYMBOL
-+0xbfd18198 mmc_card_awake vmlinux EXPORT_SYMBOL
-+0xba386aa9 usb_hcd_link_urb_to_ep vmlinux EXPORT_SYMBOL_GPL
-+0x50c6ae87 device_release_driver vmlinux EXPORT_SYMBOL_GPL
-+0xa01f4485 swiotlb_alloc_coherent vmlinux EXPORT_SYMBOL
-+0x572e85d4 blk_lookup_devt vmlinux EXPORT_SYMBOL
-+0xe415316a crypto_grab_skcipher vmlinux EXPORT_SYMBOL_GPL
-+0xe953b21f get_next_ino vmlinux EXPORT_SYMBOL
-+0x546c5565 ppc_tb_freq vmlinux EXPORT_SYMBOL_GPL
-+0x0bf06d6d usb_serial_handle_dcd_change vmlinux EXPORT_SYMBOL_GPL
-+0xcd1bbf43 usb_stor_bulk_srb vmlinux EXPORT_SYMBOL_GPL
-+0x326ee682 usb_alloc_streams vmlinux EXPORT_SYMBOL_GPL
-+0x984ca836 scsi_register_interface vmlinux EXPORT_SYMBOL
-+0xeb72182a vfs_setlease vmlinux EXPORT_SYMBOL_GPL
-+0x40d04664 console_trylock vmlinux EXPORT_SYMBOL
-+0x2ee496e6 i2c_smbus_read_block_data vmlinux EXPORT_SYMBOL
-+0x71d6687e usb_put_intf vmlinux EXPORT_SYMBOL_GPL
-+0x5040a36f blk_queue_dma_pad vmlinux EXPORT_SYMBOL
-+0x0521b2ee set_current_groups vmlinux EXPORT_SYMBOL
-+0xb1c6e787 wait_for_completion_timeout vmlinux EXPORT_SYMBOL
-+0x107aa06a dcb_ieee_getapp_mask vmlinux EXPORT_SYMBOL
-+0x60ac991d xfrm6_input_addr vmlinux EXPORT_SYMBOL
-+0x3aa32d81 usb_stor_probe2 vmlinux EXPORT_SYMBOL_GPL
-+0x12cd39ae usb_stor_probe1 vmlinux EXPORT_SYMBOL_GPL
-+0x81db6ebb xz_dec_reset vmlinux EXPORT_SYMBOL
-+0x661601de sprint_symbol vmlinux EXPORT_SYMBOL_GPL
-+0x6e8698ee scm_fp_dup vmlinux EXPORT_SYMBOL
-+0x9c2b3860 mmc_card_can_sleep vmlinux EXPORT_SYMBOL
-+0x6a7e90da devres_remove vmlinux EXPORT_SYMBOL_GPL
-+0x30e28a09 tty_vhangup vmlinux EXPORT_SYMBOL
-+0xd3434c3f kref_sub vmlinux EXPORT_SYMBOL
-+0x2ce98559 kcrypto_wq vmlinux EXPORT_SYMBOL_GPL
-+0x8f860b23 shrink_dcache_parent vmlinux EXPORT_SYMBOL
-+0x75c8a11c inet_twdr_twkill_work vmlinux EXPORT_SYMBOL_GPL
-+0x609f1c7e synchronize_net vmlinux EXPORT_SYMBOL
-+0xa638cf54 bus_for_each_dev vmlinux EXPORT_SYMBOL_GPL
-+0x8dcf576a bus_for_each_drv vmlinux EXPORT_SYMBOL_GPL
-+0x42825ce2 rcu_scheduler_active vmlinux EXPORT_SYMBOL_GPL
-+0xe523ad75 synchronize_irq vmlinux EXPORT_SYMBOL
-+0xfa393103 pneigh_lookup vmlinux EXPORT_SYMBOL
-+0x0ba2668c kern_path_create vmlinux EXPORT_SYMBOL
-+0xc47cdf9c _raw_write_lock_bh vmlinux EXPORT_SYMBOL
-+0x72dc286d xdr_terminate_string vmlinux EXPORT_SYMBOL_GPL
-+0x28531ce3 blk_queue_find_tag vmlinux EXPORT_SYMBOL
-+0x4bc62a81 audit_enabled vmlinux EXPORT_SYMBOL_GPL
-+0xd8a2ab95 in_egroup_p vmlinux EXPORT_SYMBOL
-+0x919d1163 tty_termios_baud_rate vmlinux EXPORT_SYMBOL
-+0x184e6c85 radix_tree_gang_lookup_slot vmlinux EXPORT_SYMBOL
-+0xcdb01877 ktime_add_ns vmlinux EXPORT_SYMBOL_GPL
-+0x8b96c05a nf_conntrack_broadcast_help net/netfilter/nf_conntrack_broadcast EXPORT_SYMBOL_GPL
-+0xcb6e6aa8 skb_append_datato_frags vmlinux EXPORT_SYMBOL
-+0x9e0c711d vzalloc_node vmlinux EXPORT_SYMBOL
-+0x7f24de73 jiffies_to_usecs vmlinux EXPORT_SYMBOL
-+0x37befc70 jiffies_to_msecs vmlinux EXPORT_SYMBOL
-+0x436c2179 iowrite32 vmlinux EXPORT_SYMBOL
-+0x8c183cbe iowrite16 vmlinux EXPORT_SYMBOL
-+0x17774e80 tcp_child_process vmlinux EXPORT_SYMBOL
-+0xb6896671 crc_t10dif vmlinux EXPORT_SYMBOL
-+0x9ab8808c param_get_charp vmlinux EXPORT_SYMBOL
-+0x8025065c mdiobus_write vmlinux EXPORT_SYMBOL
-+0x1f852c0d prepare_binprm vmlinux EXPORT_SYMBOL
-+0x4db9ec4c tcp_v4_destroy_sock vmlinux EXPORT_SYMBOL
-+0x6d6cbadc rb_last vmlinux EXPORT_SYMBOL
-+0x7ab3ca18 eventfd_ctx_read vmlinux EXPORT_SYMBOL_GPL
-+0x86eb50bf mount_bdev vmlinux EXPORT_SYMBOL
-+0xe6fbe430 can_do_mlock vmlinux EXPORT_SYMBOL
-+0x60a13e90 rcu_barrier vmlinux EXPORT_SYMBOL_GPL
-+0xdf60cc27 __print_symbol vmlinux EXPORT_SYMBOL
-+0x96c287fe ndisc_mc_map vmlinux EXPORT_SYMBOL
-+0x55da0153 sysdev_register vmlinux EXPORT_SYMBOL_GPL
-+0x91715312 sprintf vmlinux EXPORT_SYMBOL
-+0x0d05dd4f simple_unlink vmlinux EXPORT_SYMBOL
-+0xaa563302 simple_attr_write vmlinux EXPORT_SYMBOL_GPL
-+0x099b48fd generic_listxattr vmlinux EXPORT_SYMBOL
-+0xf6ebc03b net_ratelimit vmlinux EXPORT_SYMBOL
-+0xf9c8fc44 dev_addr_init vmlinux EXPORT_SYMBOL
-+0x09ae2253 mmc_host_disable vmlinux EXPORT_SYMBOL
-+0x6559ae6c pci_set_ltr vmlinux EXPORT_SYMBOL
-+0x1ebf6c2a pci_power_names vmlinux EXPORT_SYMBOL_GPL
-+0x57e7529b shash_ahash_update vmlinux EXPORT_SYMBOL_GPL
-+0x05c6b149 invalidate_inode_buffers vmlinux EXPORT_SYMBOL
-+0x48bea168 scsi_register vmlinux EXPORT_SYMBOL
-+0x764c2f05 crypto_shash_update vmlinux EXPORT_SYMBOL_GPL
-+0x2eef0ac9 journal_dirty_data vmlinux EXPORT_SYMBOL
-+0xb5e31b10 find_vma vmlinux EXPORT_SYMBOL
-+0x0d0f4d51 nf_ct_extend_unregister net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x5c936853 svc_print_addr vmlinux EXPORT_SYMBOL_GPL
-+0x12505fc7 kernel_connect vmlinux EXPORT_SYMBOL
-+0xb8546237 inet_stream_connect vmlinux EXPORT_SYMBOL
-+0xa05c03df mempool_kmalloc vmlinux EXPORT_SYMBOL
-+0x8dc76dc4 qdisc_warn_nonwc vmlinux EXPORT_SYMBOL
-+0x9a7a6123 pci_release_regions vmlinux EXPORT_SYMBOL
-+0xc9eec5c2 splice_from_pipe_begin vmlinux EXPORT_SYMBOL
-+0xfd6293c2 boot_tvec_bases vmlinux EXPORT_SYMBOL
-+0x126cabd2 netdev_class_remove_file vmlinux EXPORT_SYMBOL
-+0xbccdc2f6 flex_array_put vmlinux EXPORT_SYMBOL
-+0x8164e310 blk_queue_physical_block_size vmlinux EXPORT_SYMBOL
-+0x9b724801 nlmclnt_done vmlinux EXPORT_SYMBOL_GPL
-+0xf9e2e40e dio_end_io vmlinux EXPORT_SYMBOL_GPL
-+0x53735d40 relay_subbufs_consumed vmlinux EXPORT_SYMBOL_GPL
-+0xc0bf6ead timecounter_cyc2time vmlinux EXPORT_SYMBOL_GPL
-+0x37f6fee5 fsl_lbc_find vmlinux EXPORT_SYMBOL
-+0x4f881b16 rtc_tm_to_ktime vmlinux EXPORT_SYMBOL_GPL
-+0x325ffbe2 journal_ack_err vmlinux EXPORT_SYMBOL
-+0x307c2fd0 generic_check_addressable vmlinux EXPORT_SYMBOL
-+0xee2d8f00 perf_event_read_value vmlinux EXPORT_SYMBOL_GPL
-+0xc065a455 cpu_core_index_of_thread vmlinux EXPORT_SYMBOL_GPL
-+0x33dc9781 inet6_csk_addr2sockaddr vmlinux EXPORT_SYMBOL_GPL
-+0x4c50029a netdev_refcnt_read vmlinux EXPORT_SYMBOL
-+0xd1b2bc7a input_mt_init_slots vmlinux EXPORT_SYMBOL
-+0xa16d230d devres_close_group vmlinux EXPORT_SYMBOL_GPL
-+0xa92b183a __blk_end_request vmlinux EXPORT_SYMBOL
-+0x7f7bc710 klist_next vmlinux EXPORT_SYMBOL_GPL
-+0x0140c06a tcp_rcv_established vmlinux EXPORT_SYMBOL
-+0x80c1ac2b ip_queue_rcv_skb vmlinux EXPORT_SYMBOL
-+0x4865f9b3 inet_getpeer vmlinux EXPORT_SYMBOL_GPL
-+0x3d0688cd xt_unregister_targets vmlinux EXPORT_SYMBOL
-+0x4e592d6c spi_alloc_master vmlinux EXPORT_SYMBOL_GPL
-+0xce53932d scsi_prep_fn vmlinux EXPORT_SYMBOL
-+0xd7e56a4e simple_strtoll vmlinux EXPORT_SYMBOL
-+0x20000329 simple_strtoul vmlinux EXPORT_SYMBOL
-+0xa3c8685d nfs_initiate_commit vmlinux EXPORT_SYMBOL_GPL
-+0xbedc5a25 fsnotify_destroy_mark vmlinux EXPORT_SYMBOL_GPL
-+0x65400222 __irq_offset_value vmlinux EXPORT_SYMBOL
-+0x540fbf55 nf_register_afinfo vmlinux EXPORT_SYMBOL_GPL
-+0x783c65c7 net_ns_type_operations vmlinux EXPORT_SYMBOL_GPL
-+0x0d733a10 proc_symlink vmlinux EXPORT_SYMBOL
-+0x983c7494 rh_detach_region vmlinux EXPORT_SYMBOL_GPL
-+0x6428da4f rh_attach_region vmlinux EXPORT_SYMBOL_GPL
-+0xe0f45eeb __rtnl_link_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x5497669a blk_queue_dma_alignment vmlinux EXPORT_SYMBOL
-+0xc51e0e79 remap_vmalloc_range vmlinux EXPORT_SYMBOL
-+0xda869994 noop_backing_dev_info vmlinux EXPORT_SYMBOL_GPL
-+0xd985dc99 mempool_free_pages vmlinux EXPORT_SYMBOL
-+0xfcec0987 enable_irq vmlinux EXPORT_SYMBOL
-+0x1e7bbcb3 kernel_restart vmlinux EXPORT_SYMBOL_GPL
-+0x0cc3cab1 dev_alloc_skb vmlinux EXPORT_SYMBOL
-+0xdd27fa87 memchr vmlinux EXPORT_SYMBOL
-+0xc18ac88d nf_ct_expect_hsize net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x7a00ec15 inet6_release vmlinux EXPORT_SYMBOL
-+0xbeff3d59 of_get_parent vmlinux EXPORT_SYMBOL
-+0x15a94e65 pci_destroy_slot vmlinux EXPORT_SYMBOL_GPL
-+0x2cfc679e vfs_kern_mount vmlinux EXPORT_SYMBOL_GPL
-+0xd5bd7dac ring_buffer_record_enable_cpu vmlinux EXPORT_SYMBOL_GPL
-+0x1a3c4cdf local_flush_tlb_page vmlinux EXPORT_SYMBOL
-+0x36bc9a29 gss_mech_list_pseudoflavors vmlinux EXPORT_SYMBOL_GPL
-+0x977832e8 spi_bus_type vmlinux EXPORT_SYMBOL_GPL
-+0x840efb10 anon_transport_class_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x315c65fd zlib_deflateInit2 vmlinux EXPORT_SYMBOL
-+0x6bed2572 submit_bio vmlinux EXPORT_SYMBOL
-+0x1aacd048 alloc_page_buffers vmlinux EXPORT_SYMBOL_GPL
-+0xfbf9be5d register_oom_notifier vmlinux EXPORT_SYMBOL_GPL
-+0xcfc68341 synchronize_rcu_bh vmlinux EXPORT_SYMBOL_GPL
-+0x549525ef handle_nested_irq vmlinux EXPORT_SYMBOL_GPL
-+0x25a81cc5 qe_get_firmware_info vmlinux EXPORT_SYMBOL
-+0xd8525ea7 fl6_update_dst vmlinux EXPORT_SYMBOL_GPL
-+0xa4e81ac2 tcp_valid_rtt_meas vmlinux EXPORT_SYMBOL
-+0xe0a7f614 neigh_lookup vmlinux EXPORT_SYMBOL
-+0x0680ca81 mmc_remove_host vmlinux EXPORT_SYMBOL
-+0x7bd25d47 usb_put_hcd vmlinux EXPORT_SYMBOL_GPL
-+0x2ef63ad6 scsi_dev_info_list_del_keyed vmlinux EXPORT_SYMBOL
-+0x091c824a machine_power_off vmlinux EXPORT_SYMBOL_GPL
-+0x3996b31d tcp_mtup_init vmlinux EXPORT_SYMBOL
-+0x0ea07ec7 kstrtou8_from_user vmlinux EXPORT_SYMBOL
-+0x973d0f9e kstrtoul_from_user vmlinux EXPORT_SYMBOL
-+0x45cfa828 cache_purge vmlinux EXPORT_SYMBOL_GPL
-+0x222e7ce2 sysfs_streq vmlinux EXPORT_SYMBOL
-+0x71dd6c34 alloc_buffer_head vmlinux EXPORT_SYMBOL
-+0x49dcec10 xdr_write_pages vmlinux EXPORT_SYMBOL_GPL
-+0xbb73bb5c swiotlb_tbl_map_single vmlinux EXPORT_SYMBOL_GPL
-+0x1ac51c1e device_remove_file vmlinux EXPORT_SYMBOL_GPL
-+0x60506751 unmap_kernel_range_noflush vmlinux EXPORT_SYMBOL_GPL
-+0x289c3714 nf_ct_alloc_hashtable net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x49ffc48e ipv6_skip_exthdr vmlinux EXPORT_SYMBOL
-+0x5b723c46 ip_options_compile vmlinux EXPORT_SYMBOL
-+0x45a37cf4 aio_complete vmlinux EXPORT_SYMBOL
-+0x44402b6f param_get_ulong vmlinux EXPORT_SYMBOL
-+0x0b19ea8e kill_pid vmlinux EXPORT_SYMBOL
-+0x69642f88 pcibios_bus_to_resource vmlinux EXPORT_SYMBOL
-+0xea710ef9 rt6_lookup vmlinux EXPORT_SYMBOL
-+0x12f99022 inet_frags_init_net vmlinux EXPORT_SYMBOL
-+0x796b252b device_store_int vmlinux EXPORT_SYMBOL_GPL
-+0x64999478 congestion_wait vmlinux EXPORT_SYMBOL
-+0x59eae699 ring_buffer_read_prepare vmlinux EXPORT_SYMBOL_GPL
-+0xe4a65c70 i2c_del_driver vmlinux EXPORT_SYMBOL
-+0x419b695a blk_queue_dma_drain vmlinux EXPORT_SYMBOL_GPL
-+0x9d8331c0 ring_buffer_read_page vmlinux EXPORT_SYMBOL_GPL
-+0xae545f06 _raw_write_unlock_irqrestore vmlinux EXPORT_SYMBOL
-+0xbad26090 __atomic_notifier_call_chain vmlinux EXPORT_SYMBOL_GPL
-+0x057ce975 hex_dump_to_buffer vmlinux EXPORT_SYMBOL
-+0x119db340 file_ra_state_init vmlinux EXPORT_SYMBOL_GPL
-+0xcd212027 usb_alloc_coherent vmlinux EXPORT_SYMBOL_GPL
-+0x74b35a2e crypto_larval_kill vmlinux EXPORT_SYMBOL_GPL
-+0xfaa1f7a6 xfrm_register_mode vmlinux EXPORT_SYMBOL
-+0xb0559860 inet_csk_get_port vmlinux EXPORT_SYMBOL_GPL
-+0x20e9c644 mmc_flush_cache vmlinux EXPORT_SYMBOL
-+0xd5f63191 i2c_clients_command vmlinux EXPORT_SYMBOL
-+0xd77c0bc8 klist_remove vmlinux EXPORT_SYMBOL_GPL
-+0xff121d12 ethtool_op_get_ufo vmlinux EXPORT_SYMBOL
-+0x3755e17d dev_get_flags vmlinux EXPORT_SYMBOL
-+0x5296e7f4 usb_get_status vmlinux EXPORT_SYMBOL_GPL
-+0x790df6ca __wait_on_bit_lock vmlinux EXPORT_SYMBOL
-+0x5a4eec67 svc_auth_register vmlinux EXPORT_SYMBOL_GPL
-+0xe5122890 flow_cache_genid vmlinux EXPORT_SYMBOL
-+0x2c919c63 gen_new_estimator vmlinux EXPORT_SYMBOL
-+0x0c812da4 input_class vmlinux EXPORT_SYMBOL_GPL
-+0x4e00ab3c pci_set_master vmlinux EXPORT_SYMBOL
-+0xfcc8f571 crypto_alg_mod_lookup vmlinux EXPORT_SYMBOL_GPL
-+0x31c5af62 freeze_super vmlinux EXPORT_SYMBOL
-+0x00c0514b __devm_request_region vmlinux EXPORT_SYMBOL
-+0xfb905a24 hid_connect vmlinux EXPORT_SYMBOL_GPL
-+0x4b824206 mmc_set_data_timeout vmlinux EXPORT_SYMBOL
-+0x1040ca42 usb_set_device_state vmlinux EXPORT_SYMBOL_GPL
-+0x12c83422 scsi_eh_finish_cmd vmlinux EXPORT_SYMBOL
-+0x87177c3d mmc_can_reset vmlinux EXPORT_SYMBOL
-+0x5bc4f32c cpu_rmap_update vmlinux EXPORT_SYMBOL
-+0xdd0a2ba2 strlcat vmlinux EXPORT_SYMBOL
-+0xd627480b strncat vmlinux EXPORT_SYMBOL
-+0xcfeb0be9 rb_augment_erase_begin vmlinux EXPORT_SYMBOL
-+0xd6c357db blk_queue_max_discard_sectors vmlinux EXPORT_SYMBOL
-+0xd2965f6f kthread_should_stop vmlinux EXPORT_SYMBOL
-+0xd0ad960f nfnetlink_set_err net/netfilter/nfnetlink EXPORT_SYMBOL_GPL
-+0x1c460693 netdev_notice vmlinux EXPORT_SYMBOL
-+0x7f185424 blk_rq_map_kern vmlinux EXPORT_SYMBOL
-+0x551de792 sync_mapping_buffers vmlinux EXPORT_SYMBOL
-+0x4ac7a222 usb_serial_handle_break vmlinux EXPORT_SYMBOL_GPL
-+0x204d23f2 __scsi_add_device vmlinux EXPORT_SYMBOL
-+0xaaec89e2 fat_scan vmlinux EXPORT_SYMBOL_GPL
-+0x4ca16694 inode_change_ok vmlinux EXPORT_SYMBOL
-+0xf1a0626d datagram_poll vmlinux EXPORT_SYMBOL
-+0x69d38ed9 __scsi_print_sense vmlinux EXPORT_SYMBOL
-+0xf0c18cc1 blk_queue_end_tag vmlinux EXPORT_SYMBOL
-+0x1e9edfb7 seq_hlist_start_head_rcu vmlinux EXPORT_SYMBOL
-+0x87604ac8 dev_mc_flush vmlinux EXPORT_SYMBOL
-+0xf0eb6c0e dev_uc_flush vmlinux EXPORT_SYMBOL
-+0xd9fb3de3 usb_stor_Bulk_transport vmlinux EXPORT_SYMBOL_GPL
-+0x0bc753c7 flush_old_exec vmlinux EXPORT_SYMBOL
-+0x00c4dc87 timecounter_init vmlinux EXPORT_SYMBOL_GPL
-+0x0c9b6089 nvram_get_size vmlinux EXPORT_SYMBOL
-+0xad9e43be inet_addr_type vmlinux EXPORT_SYMBOL
-+0xf22414e2 inet_recvmsg vmlinux EXPORT_SYMBOL
-+0xd454b29f llc_sap_close vmlinux EXPORT_SYMBOL
-+0x80132d25 mdiobus_unregister vmlinux EXPORT_SYMBOL
-+0x65291cff timekeeping_inject_offset vmlinux EXPORT_SYMBOL
-+0x7be4827c pci_dram_offset vmlinux EXPORT_SYMBOL
-+0xb09c5030 phy_detach vmlinux EXPORT_SYMBOL
-+0x01b08eb0 mii_link_ok vmlinux EXPORT_SYMBOL
-+0xc741f047 nfs_commitdata_alloc vmlinux EXPORT_SYMBOL_GPL
-+0x5892f832 release_pmc_hardware vmlinux EXPORT_SYMBOL_GPL
-+0x583c4f4e nf_conntrack_l4proto_udp6 net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xb0a8c94f tcp_proc_register vmlinux EXPORT_SYMBOL
-+0x2a939f0e stop_tty vmlinux EXPORT_SYMBOL
-+0xb7a99781 __irq_regs vmlinux EXPORT_SYMBOL
-+0x774406ff generic_write_sync vmlinux EXPORT_SYMBOL
-+0xf5b52822 sdio_writel vmlinux EXPORT_SYMBOL_GPL
-+0xa0088161 nfs_pageio_reset_write_mds vmlinux EXPORT_SYMBOL_GPL
-+0x92a84998 xfrm_policy_destroy vmlinux EXPORT_SYMBOL
-+0x0538c307 sdhci_pltfm_register vmlinux EXPORT_SYMBOL_GPL
-+0x43ed8622 sdio_memcpy_toio vmlinux EXPORT_SYMBOL_GPL
-+0xb0a6f554 neigh_ifdown vmlinux EXPORT_SYMBOL
-+0x00d43c47 cfi_fixup vmlinux EXPORT_SYMBOL
-+0x6c1ce5ce strcspn vmlinux EXPORT_SYMBOL
-+0x6cc25857 thermal_zone_unbind_cooling_device vmlinux EXPORT_SYMBOL
-+0xcea93771 do_kern_mount vmlinux EXPORT_SYMBOL_GPL
-+0xa32cec39 nf_conntrack_l3proto_register net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xdfb4377e nf_conntrack_l4proto_register net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xd4b929a5 hid_parse_report vmlinux EXPORT_SYMBOL_GPL
-+0xc9b13a79 usb_serial_resume vmlinux EXPORT_SYMBOL
-+0xad85acb1 blkdev_aio_write vmlinux EXPORT_SYMBOL_GPL
-+0xfc21ea7b seq_bitmap_list vmlinux EXPORT_SYMBOL
-+0xaec655c7 alloc_pages_exact vmlinux EXPORT_SYMBOL
-+0x283780f9 gss_svc_to_pseudoflavor vmlinux EXPORT_SYMBOL_GPL
-+0xeb5f1beb svc_find_xprt vmlinux EXPORT_SYMBOL_GPL
-+0xb27c96eb svc_process vmlinux EXPORT_SYMBOL_GPL
-+0xf40325f9 rpc_force_rebind vmlinux EXPORT_SYMBOL_GPL
-+0x031337c7 __nla_reserve vmlinux EXPORT_SYMBOL
-+0x29537c9e alloc_chrdev_region vmlinux EXPORT_SYMBOL
-+0xa794e5af inc_zone_page_state vmlinux EXPORT_SYMBOL
-+0xbe2ae37c nf_ct_iterate_cleanup net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x159caf84 rpc_killall_tasks vmlinux EXPORT_SYMBOL_GPL
-+0x7faee9ca arp_find vmlinux EXPORT_SYMBOL
-+0xc9e3b1e4 skb_checksum vmlinux EXPORT_SYMBOL
-+0x2ccabce7 deregister_mtd_blktrans vmlinux EXPORT_SYMBOL_GPL
-+0x8d8718ca pci_pme_capable vmlinux EXPORT_SYMBOL
-+0xbdf5c25c rb_next vmlinux EXPORT_SYMBOL
-+0xca4c7f40 inode_permission vmlinux EXPORT_SYMBOL
-+0xcc3e77da buffer_migrate_page vmlinux EXPORT_SYMBOL
-+0x519b0da3 finish_wait vmlinux EXPORT_SYMBOL
-+0x4a290d4d cur_cpu_spec vmlinux EXPORT_SYMBOL
-+0x564f1dca klist_add_after vmlinux EXPORT_SYMBOL_GPL
-+0xd329f4b2 svc_xprt_init vmlinux EXPORT_SYMBOL_GPL
-+0x52d7b2fd llc_sap_list vmlinux EXPORT_SYMBOL
-+0x91fe4a85 phy_start_aneg vmlinux EXPORT_SYMBOL
-+0x8695c5de scsi_print_result vmlinux EXPORT_SYMBOL
-+0x4cbbd171 __bitmap_weight vmlinux EXPORT_SYMBOL
-+0x61b7b126 simple_strtoull vmlinux EXPORT_SYMBOL
-+0x528c709d simple_read_from_buffer vmlinux EXPORT_SYMBOL
-+0x349e53f1 clockevent_delta2ns vmlinux EXPORT_SYMBOL_GPL
-+0x6eb85693 nf_defrag_ipv6_enable net/ipv6/netfilter/nf_defrag_ipv6 EXPORT_SYMBOL_GPL
-+0x6b6c3d10 nf_defrag_ipv4_enable net/ipv4/netfilter/nf_defrag_ipv4 EXPORT_SYMBOL_GPL
-+0xa681fe88 generate_random_uuid vmlinux EXPORT_SYMBOL
-+0xad1bb027 nf_ct_free_hashtable net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xc181af4a get_net_ns_by_pid vmlinux EXPORT_SYMBOL_GPL
-+0xa1c47d5e mmc_power_save_host vmlinux EXPORT_SYMBOL
-+0x86a1aabc vfs_statfs vmlinux EXPORT_SYMBOL
-+0x8a50868d iterate_mounts vmlinux EXPORT_SYMBOL_GPL
-+0x45838122 udp_ioctl vmlinux EXPORT_SYMBOL
-+0xa02f471b i2c_new_probed_device vmlinux EXPORT_SYMBOL_GPL
-+0x2e258c1f cfi_cmdset_0003 vmlinux EXPORT_SYMBOL_GPL
-+0xe5ccb818 cfi_cmdset_0001 vmlinux EXPORT_SYMBOL_GPL
-+0x037508a0 cfi_cmdset_0200 vmlinux EXPORT_SYMBOL_GPL
-+0xeacafb73 cfi_cmdset_0006 vmlinux EXPORT_SYMBOL_GPL
-+0xa669953c cfi_cmdset_0002 vmlinux EXPORT_SYMBOL_GPL
-+0x8c101558 cfi_cmdset_0701 vmlinux EXPORT_SYMBOL_GPL
-+0xf32fddac cfi_cmdset_0020 vmlinux EXPORT_SYMBOL_GPL
-+0x58d4f625 __pci_complete_power_transition vmlinux EXPORT_SYMBOL_GPL
-+0x0223b9bf __nla_reserve_nohdr vmlinux EXPORT_SYMBOL
-+0x11fac1b6 __get_page_tail vmlinux EXPORT_SYMBOL
-+0x5f5fc264 rtnetlink_put_metrics vmlinux EXPORT_SYMBOL
-+0xea10212a int_to_scsilun vmlinux EXPORT_SYMBOL
-+0x96fae2c1 may_umount vmlinux EXPORT_SYMBOL
-+0xf6f92407 pcix_get_max_mmrbc vmlinux EXPORT_SYMBOL
-+0x0b508415 block_read_full_page vmlinux EXPORT_SYMBOL
-+0xf7535902 console_drivers vmlinux EXPORT_SYMBOL_GPL
-+0x8de519db mmc_hw_reset vmlinux EXPORT_SYMBOL
-+0x015ffc4f __scsi_alloc_queue vmlinux EXPORT_SYMBOL
-+0x277ba2d9 bus_sort_breadthfirst vmlinux EXPORT_SYMBOL_GPL
-+0xe11c50a5 ipt_alloc_initial_table net/ipv4/netfilter/ip_tables EXPORT_SYMBOL_GPL
-+0x86c14d2e tcp_v4_connect vmlinux EXPORT_SYMBOL
-+0x2c2f763c tcp_sync_mss vmlinux EXPORT_SYMBOL
-+0xd0c05159 emergency_restart vmlinux EXPORT_SYMBOL_GPL
-+0x3ff62317 local_bh_disable vmlinux EXPORT_SYMBOL
-+0x3c5a83ec tcp_death_row vmlinux EXPORT_SYMBOL_GPL
-+0xe187693c kstrtouint_from_user vmlinux EXPORT_SYMBOL
-+0x1f3e84a0 bio_get_nr_vecs vmlinux EXPORT_SYMBOL
-+0xf92a5458 xfrm_policy_byid vmlinux EXPORT_SYMBOL
-+0xc871c13b pci_prepare_to_sleep vmlinux EXPORT_SYMBOL
-+0x0f6690cf ahash_register_instance vmlinux EXPORT_SYMBOL_GPL
-+0x686145ef load_nls_default vmlinux EXPORT_SYMBOL
-+0xf209fa23 nonseekable_open vmlinux EXPORT_SYMBOL
-+0x3d9e1db6 kmem_cache_create vmlinux EXPORT_SYMBOL
-+0x475100c2 inet_get_local_port_range vmlinux EXPORT_SYMBOL
-+0xd5683a1b __seq_open_private vmlinux EXPORT_SYMBOL
-+0x13bdfe24 seq_escape vmlinux EXPORT_SYMBOL
-+0x3108ea46 xfrm_ealg_get_byname vmlinux EXPORT_SYMBOL_GPL
-+0x48c5e0f4 of_mdiobus_register vmlinux EXPORT_SYMBOL
-+0x22692356 d_alloc_root vmlinux EXPORT_SYMBOL
-+0xa0243187 page_address vmlinux EXPORT_SYMBOL
-+0x89c72573 xfrm_lookup vmlinux EXPORT_SYMBOL
-+0xc4a5fb77 skb_store_bits vmlinux EXPORT_SYMBOL
-+0x9565a5a2 page_cache_sync_readahead vmlinux EXPORT_SYMBOL_GPL
-+0x79c480da rh_dump vmlinux EXPORT_SYMBOL_GPL
-+0xfba770b8 pcibios_fixup_bus vmlinux EXPORT_SYMBOL
-+0xa93da361 inet_unregister_protosw vmlinux EXPORT_SYMBOL
-+0x7cef3f58 i2c_probe_func_quick_read vmlinux EXPORT_SYMBOL_GPL
-+0x65c8d17e i2c_smbus_read_byte vmlinux EXPORT_SYMBOL
-+0x294d91c5 platform_create_bundle vmlinux EXPORT_SYMBOL_GPL
-+0x99dc6ab8 _dev_info vmlinux EXPORT_SYMBOL
-+0x1e4a32eb mb_cache_entry_free vmlinux EXPORT_SYMBOL
-+0xeeac816f svc_xprt_put vmlinux EXPORT_SYMBOL_GPL
-+0x1345ef47 ethtool_op_get_flags vmlinux EXPORT_SYMBOL
-+0xa31feac5 blkcipher_walk_phys vmlinux EXPORT_SYMBOL_GPL
-+0x3dfc897c seq_hlist_start_head vmlinux EXPORT_SYMBOL
-+0xc34ff0bb clocksource_change_rating vmlinux EXPORT_SYMBOL
-+0x9272763d sdio_set_block_size vmlinux EXPORT_SYMBOL_GPL
-+0x439751b0 usb_stor_post_reset vmlinux EXPORT_SYMBOL_GPL
-+0x9924c496 __usb_get_extra_descriptor vmlinux EXPORT_SYMBOL_GPL
-+0xb0b3b849 pci_bus_assign_resources vmlinux EXPORT_SYMBOL
-+0x9159b9d6 profile_event_register vmlinux EXPORT_SYMBOL_GPL
-+0x6ca4d6ee __nf_conntrack_helper_find net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xd251093f nfs_generic_pg_test vmlinux EXPORT_SYMBOL_GPL
-+0x5460c8d8 fsnotify_get_cookie vmlinux EXPORT_SYMBOL_GPL
-+0xbeeb9715 dcb_getapp vmlinux EXPORT_SYMBOL
-+0xb9a9fe46 dcb_setapp vmlinux EXPORT_SYMBOL
-+0xb84d7d46 register_netdevice vmlinux EXPORT_SYMBOL
-+0x0c38172a usb_serial_generic_open vmlinux EXPORT_SYMBOL_GPL
-+0xfc532eb4 scsi_finish_command vmlinux EXPORT_SYMBOL
-+0x11f447ce __gpio_to_irq vmlinux EXPORT_SYMBOL_GPL
-+0xeba6034f user_describe vmlinux EXPORT_SYMBOL_GPL
-+0x1fb3a608 blkdev_put vmlinux EXPORT_SYMBOL
-+0xae6c3303 blkdev_get vmlinux EXPORT_SYMBOL
-+0xc7c3a66d tcp_get_info vmlinux EXPORT_SYMBOL_GPL
-+0x7a39ec0d __alloc_skb vmlinux EXPORT_SYMBOL
-+0x8226642f __gpio_cansleep vmlinux EXPORT_SYMBOL_GPL
-+0x98c5718a mutex_trylock vmlinux EXPORT_SYMBOL
-+0xe24d3a97 jiffies_64 vmlinux EXPORT_SYMBOL
-+0x61eef2c9 _insb vmlinux EXPORT_SYMBOL
-+0x89863b3d svc_create vmlinux EXPORT_SYMBOL_GPL
-+0xe387568c rpc_lookup_machine_cred vmlinux EXPORT_SYMBOL_GPL
-+0x272caed2 pci_cleanup_aer_uncorrect_error_status vmlinux EXPORT_SYMBOL_GPL
-+0x6def2db2 half_md4_transform vmlinux EXPORT_SYMBOL
-+0xb835b3e4 radix_tree_prev_hole vmlinux EXPORT_SYMBOL
-+0xd23a5bcb dcache_readdir vmlinux EXPORT_SYMBOL
-+0x0b5cb616 inode_add_bytes vmlinux EXPORT_SYMBOL
-+0xdb03e514 thaw_super vmlinux EXPORT_SYMBOL
-+0x992edcea generic_file_mmap vmlinux EXPORT_SYMBOL
-+0x3bf0c89b abort_creds vmlinux EXPORT_SYMBOL
-+0x38b92846 llc_remove_pack vmlinux EXPORT_SYMBOL
-+0x4188d439 neigh_rand_reach_time vmlinux EXPORT_SYMBOL
-+0x5009e8d3 dev_forward_skb vmlinux EXPORT_SYMBOL_GPL
-+0x88a779be sock_common_getsockopt vmlinux EXPORT_SYMBOL
-+0xf532f540 sock_common_setsockopt vmlinux EXPORT_SYMBOL
-+0xfb09342d n_tty_inherit_ops vmlinux EXPORT_SYMBOL_GPL
-+0x65d6d0f0 gpio_direction_input vmlinux EXPORT_SYMBOL_GPL
-+0x65408378 zlib_inflate_blob vmlinux EXPORT_SYMBOL
-+0x14e837a0 idr_find vmlinux EXPORT_SYMBOL
-+0xf1da72e2 vfs_mknod vmlinux EXPORT_SYMBOL
-+0xca0bb1d5 ethtool_op_get_sg vmlinux EXPORT_SYMBOL
-+0x1c7611b9 skb_dequeue vmlinux EXPORT_SYMBOL
-+0x977653c9 filemap_write_and_wait vmlinux EXPORT_SYMBOL
-+0x27bbf221 disable_irq_nosync vmlinux EXPORT_SYMBOL
-+0x24a79d66 call_usermodehelper_freeinfo vmlinux EXPORT_SYMBOL
-+0x00000000 softirq_work_list vmlinux EXPORT_SYMBOL
-+0x14e7ca7c alloc_cpu_rmap vmlinux EXPORT_SYMBOL
-+0xbc3d7933 netdev_features_change vmlinux EXPORT_SYMBOL
-+0x50d5aae6 platform_get_resource_byname vmlinux EXPORT_SYMBOL_GPL
-+0x7272c3c8 cpu_online_mask vmlinux EXPORT_SYMBOL
-+0x62813e5c nf_ct_port_nlattr_tuple_size net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xe39bc3c9 of_find_node_by_type vmlinux EXPORT_SYMBOL
-+0x5fee0ee3 of_find_node_by_path vmlinux EXPORT_SYMBOL
-+0x8de66ff6 phy_start vmlinux EXPORT_SYMBOL
-+0x2e919a67 devres_find vmlinux EXPORT_SYMBOL_GPL
-+0x5df73517 proc_dostring vmlinux EXPORT_SYMBOL
-+0xb54533f7 usecs_to_jiffies vmlinux EXPORT_SYMBOL
-+0x0037d54d xt_hook_link vmlinux EXPORT_SYMBOL_GPL
-+0xb93e2e16 pci_bus_write_config_byte vmlinux EXPORT_SYMBOL
-+0x090d7ed0 sysfs_schedule_callback vmlinux EXPORT_SYMBOL_GPL
-+0xabcaa577 free_anon_bdev vmlinux EXPORT_SYMBOL
-+0xfb7d26f4 files_lglock_lock_init vmlinux EXPORT_SYMBOL
-+0xa601a566 raw_hash_sk vmlinux EXPORT_SYMBOL_GPL
-+0xa2ef34d7 rps_sock_flow_table vmlinux EXPORT_SYMBOL
-+0x9b08b01c skb_insert vmlinux EXPORT_SYMBOL
-+0x87ae2dae usb_stor_control_msg vmlinux EXPORT_SYMBOL_GPL
-+0x18f9dd97 dev_emerg vmlinux EXPORT_SYMBOL
-+0xb012f582 journal_force_commit_nested vmlinux EXPORT_SYMBOL
-+0x1c132024 request_any_context_irq vmlinux EXPORT_SYMBOL_GPL
-+0xedc410d0 udplite_table vmlinux EXPORT_SYMBOL
-+0xbdc36d56 tc_classify_compat vmlinux EXPORT_SYMBOL
-+0xcf469f8a blk_queue_max_segment_size vmlinux EXPORT_SYMBOL
-+0xf158f170 klist_add_tail vmlinux EXPORT_SYMBOL_GPL
-+0x2499acdc dev_kfree_skb_irq vmlinux EXPORT_SYMBOL
-+0x8e0fe91b kill_mtd_super vmlinux EXPORT_SYMBOL_GPL
-+0x1a2cbf5f pci_find_ext_capability vmlinux EXPORT_SYMBOL_GPL
-+0xb9592633 log_wait_commit vmlinux EXPORT_SYMBOL
-+0x6e9dd606 __symbol_put vmlinux EXPORT_SYMBOL
-+0x884f0c0b netpoll_send_udp vmlinux EXPORT_SYMBOL
-+0x89085598 genphy_restart_aneg vmlinux EXPORT_SYMBOL
-+0x651b6806 pci_claim_resource vmlinux EXPORT_SYMBOL
-+0x9b388444 get_zeroed_page vmlinux EXPORT_SYMBOL
-+0xe7bf317d fsl_lbc_addr vmlinux EXPORT_SYMBOL
-+0xa1c4b6d2 of_translate_dma_address vmlinux EXPORT_SYMBOL
-+0x36d57a24 of_device_is_available vmlinux EXPORT_SYMBOL
-+0x6b90f49a input_close_device vmlinux EXPORT_SYMBOL
-+0x6bd60be5 key_validate vmlinux EXPORT_SYMBOL
-+0xcaea3297 rtnl_create_link vmlinux EXPORT_SYMBOL
-+0x92e047fd phy_connect_direct vmlinux EXPORT_SYMBOL
-+0xba6f5ed2 tty_insert_flip_string_flags vmlinux EXPORT_SYMBOL
-+0xb7188ca3 address_space_init_once vmlinux EXPORT_SYMBOL
-+0x8f85f835 prepare_to_wait_exclusive vmlinux EXPORT_SYMBOL
-+0x1105338b xfrm_audit_state_replay vmlinux EXPORT_SYMBOL_GPL
-+0x0b0fcce8 inet_dev_addr_type vmlinux EXPORT_SYMBOL
-+0xe792f22e platform_device_add vmlinux EXPORT_SYMBOL_GPL
-+0x035223fb debugfs_create_size_t vmlinux EXPORT_SYMBOL_GPL
-+0xdc9c0fca remove_proc_entry vmlinux EXPORT_SYMBOL
-+0xd547ec64 fsnotify_add_mark vmlinux EXPORT_SYMBOL_GPL
-+0xa502eb8f arpt_register_table net/ipv4/netfilter/arp_tables EXPORT_SYMBOL
-+0xbe27f880 ipv6_opt_accepted vmlinux EXPORT_SYMBOL_GPL
-+0x46b75886 xfrm_spd_getinfo vmlinux EXPORT_SYMBOL
-+0xcd13ff57 pci_walk_bus vmlinux EXPORT_SYMBOL_GPL
-+0xf729527b block_is_partially_uptodate vmlinux EXPORT_SYMBOL
-+0xd9ecb670 ring_buffer_overruns vmlinux EXPORT_SYMBOL_GPL
-+0xcee467f3 xprt_load_transport vmlinux EXPORT_SYMBOL_GPL
-+0x9a13af3e alloc_etherdev_mqs vmlinux EXPORT_SYMBOL
-+0x2179d22c uart_resume_port vmlinux EXPORT_SYMBOL
-+0x83d9de3d ahash_free_instance vmlinux EXPORT_SYMBOL_GPL
-+0xe965217d bdi_register_dev vmlinux EXPORT_SYMBOL
-+0x9a303feb xt_rateest_lookup net/netfilter/xt_RATEEST EXPORT_SYMBOL_GPL
-+0x076eb1e3 nfs_commit_clear_lock vmlinux EXPORT_SYMBOL_GPL
-+0x2b76aaca pagecache_write_end vmlinux EXPORT_SYMBOL
-+0xc4708199 cpm_muram_addr vmlinux EXPORT_SYMBOL
-+0xf5629e6e rpc_clone_client vmlinux EXPORT_SYMBOL_GPL
-+0x45704bee xfrm_audit_state_icvfail vmlinux EXPORT_SYMBOL_GPL
-+0xb9da2997 snmp_fold_field64 vmlinux EXPORT_SYMBOL_GPL
-+0x42621f9f of_get_next_child vmlinux EXPORT_SYMBOL
-+0x2618e30b hid_resolv_usage vmlinux EXPORT_SYMBOL_GPL
-+0x3e44ea18 sdio_f0_readb vmlinux EXPORT_SYMBOL_GPL
-+0x6b645db0 spi_register_master vmlinux EXPORT_SYMBOL_GPL
-+0xcc36f32e fb_unregister_client vmlinux EXPORT_SYMBOL
-+0x87925ca6 kstrtoint_from_user vmlinux EXPORT_SYMBOL
-+0xfde0b92c crypto_larval_error vmlinux EXPORT_SYMBOL_GPL
-+0xc8d428d1 __nf_ct_l4proto_find net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x9e9e305b xfrm_inner_extract_output vmlinux EXPORT_SYMBOL_GPL
-+0x564436dc inet_csk_init_xmit_timers vmlinux EXPORT_SYMBOL
-+0x1b52db1c probe_kernel_read vmlinux EXPORT_SYMBOL_GPL
-+0x8111c5eb kmap_atomic_prot vmlinux EXPORT_SYMBOL
-+0x900d37fb transport_add_device vmlinux EXPORT_SYMBOL_GPL
-+0xbee5ca31 vfs_readlink vmlinux EXPORT_SYMBOL
-+0xd00652f3 timecompare_offset vmlinux EXPORT_SYMBOL_GPL
-+0x68609857 complete_and_exit vmlinux EXPORT_SYMBOL
-+0x6cfe0225 inet6_lookup vmlinux EXPORT_SYMBOL_GPL
-+0xae4c9e70 sysfs_remove_group vmlinux EXPORT_SYMBOL_GPL
-+0xf583db29 sysfs_remove_file_from_group vmlinux EXPORT_SYMBOL_GPL
-+0x83ce82eb get_monotonic_boottime vmlinux EXPORT_SYMBOL_GPL
-+0xc91ff664 down_read_trylock vmlinux EXPORT_SYMBOL
-+0x4235ac11 dcbnl_cee_notify vmlinux EXPORT_SYMBOL
-+0x93200b86 serial8250_handle_irq vmlinux EXPORT_SYMBOL_GPL
-+0x4dcec118 nf_nat_set_seq_adjust net/ipv4/netfilter/nf_nat EXPORT_SYMBOL_GPL
-+0xc6721caa nf_setsockopt vmlinux EXPORT_SYMBOL
-+0x66297ceb nf_getsockopt vmlinux EXPORT_SYMBOL
-+0x579e0bf5 rtnl_unregister_all vmlinux EXPORT_SYMBOL_GPL
-+0x28d06a1f netif_rx_ni vmlinux EXPORT_SYMBOL
-+0x160c8e49 i2c_smbus_xfer vmlinux EXPORT_SYMBOL
-+0x1d1183eb device_attach vmlinux EXPORT_SYMBOL_GPL
-+0x7b3d0f33 tty_port_open vmlinux EXPORT_SYMBOL
-+0xe6faea36 alloc_disk vmlinux EXPORT_SYMBOL
-+0xfa0ff0b4 blk_rq_map_user_iov vmlinux EXPORT_SYMBOL
-+0x3ec13a0e seq_puts vmlinux EXPORT_SYMBOL
-+0x3c620520 seq_putc vmlinux EXPORT_SYMBOL
-+0xd7112524 usb_create_shared_hcd vmlinux EXPORT_SYMBOL_GPL
-+0xca91df2e uart_update_timeout vmlinux EXPORT_SYMBOL
-+0xeea70e8b part_round_stats vmlinux EXPORT_SYMBOL_GPL
-+0x5374fd5a d_genocide vmlinux EXPORT_SYMBOL
-+0x23af09db __module_put_and_exit vmlinux EXPORT_SYMBOL
-+0x0088a193 __alloc_workqueue_key vmlinux EXPORT_SYMBOL_GPL
-+0xaee6643e elv_dispatch_add_tail vmlinux EXPORT_SYMBOL
-+0xaa966bf7 end_buffer_write_sync vmlinux EXPORT_SYMBOL
-+0xa8835c2b d_drop vmlinux EXPORT_SYMBOL
-+0xf165adc2 d_rehash vmlinux EXPORT_SYMBOL
-+0xdea3251f file_open_root vmlinux EXPORT_SYMBOL
-+0xc154f8f2 flush_kthread_work vmlinux EXPORT_SYMBOL_GPL
-+0xa89464b7 __ashldi3 vmlinux EXPORT_SYMBOL
-+0xb292666e __mmc_claim_host vmlinux EXPORT_SYMBOL
-+0xed6010a9 usb_poison_urb vmlinux EXPORT_SYMBOL_GPL
-+0xbf7c5874 pci_get_class vmlinux EXPORT_SYMBOL
-+0x6b1b67d3 __bdevname vmlinux EXPORT_SYMBOL
-+0xad4ba1e4 vfs_write vmlinux EXPORT_SYMBOL
-+0xbea16979 netif_rx vmlinux EXPORT_SYMBOL
-+0x1fbf241d swiotlb_sync_sg_for_cpu vmlinux EXPORT_SYMBOL
-+0x955b0e2e kthread_worker_fn vmlinux EXPORT_SYMBOL_GPL
-+0x9d0abaf6 xfrm_stateonly_find vmlinux EXPORT_SYMBOL
-+0x34733550 usb_create_hcd vmlinux EXPORT_SYMBOL_GPL
-+0x72ea7b2d scsi_device_type vmlinux EXPORT_SYMBOL
-+0xadf2bd53 unregister_binfmt vmlinux EXPORT_SYMBOL
-+0x2d9402fe alloc_vm_area vmlinux EXPORT_SYMBOL_GPL
-+0x65bb58a2 _raw_read_trylock vmlinux EXPORT_SYMBOL
-+0x844404cf ISA_DMA_THRESHOLD vmlinux EXPORT_SYMBOL
-+0x908169b4 xdr_init_encode vmlinux EXPORT_SYMBOL_GPL
-+0xb4bd61df netdev_bonding_change vmlinux EXPORT_SYMBOL
-+0xe15c2179 sk_reset_txq vmlinux EXPORT_SYMBOL
-+0xb2af542a sock_no_accept vmlinux EXPORT_SYMBOL
-+0x2fa50e36 set_groups vmlinux EXPORT_SYMBOL
-+0xec25f967 klist_del vmlinux EXPORT_SYMBOL_GPL
-+0x3c9d911f skb_dst_set_noref vmlinux EXPORT_SYMBOL
-+0x839c2a1f mmc_unregister_driver vmlinux EXPORT_SYMBOL
-+0x21f0b642 elevator_exit vmlinux EXPORT_SYMBOL
-+0xc4fa4b8f __lock_buffer vmlinux EXPORT_SYMBOL
-+0xbb0ab47b debug_locks vmlinux EXPORT_SYMBOL_GPL
-+0x6d953c4b ablkcipher_walk_done vmlinux EXPORT_SYMBOL_GPL
-+0xed2498e7 ablkcipher_walk_phys vmlinux EXPORT_SYMBOL_GPL
-+0x3999991e aead_geniv_alloc vmlinux EXPORT_SYMBOL_GPL
-+0x20a789ac irq_set_chip_data vmlinux EXPORT_SYMBOL
-+0x5971a2d5 inet6_csk_xmit vmlinux EXPORT_SYMBOL_GPL
-+0x4d648b71 tcp_ioctl vmlinux EXPORT_SYMBOL
-+0x5d9b4dd5 vfs_symlink vmlinux EXPORT_SYMBOL
-+0x3ae34d58 find_vpid vmlinux EXPORT_SYMBOL_GPL
-+0xd273b1b1 __round_jiffies_up_relative vmlinux EXPORT_SYMBOL_GPL
-+0x17fe13bd unmap_mapping_range vmlinux EXPORT_SYMBOL
-+0xeecb92f0 inet_select_addr vmlinux EXPORT_SYMBOL
-+0x51855d05 dev_getbyhwaddr_rcu vmlinux EXPORT_SYMBOL
-+0xadfbdc10 skb_flow_dissect vmlinux EXPORT_SYMBOL
-+0xcd336604 pci_enable_device vmlinux EXPORT_SYMBOL
-+0xc86a546a cpu_present_mask vmlinux EXPORT_SYMBOL
-+0x6373d84b xprt_release_xprt_cong vmlinux EXPORT_SYMBOL_GPL
-+0xbbca5c26 dcache_dir_close vmlinux EXPORT_SYMBOL
-+0x82e5a238 vm_get_page_prot vmlinux EXPORT_SYMBOL
-+0x6450bfd7 rpc_wake_up_queued_task vmlinux EXPORT_SYMBOL_GPL
-+0xa9ade535 unregister_snap_client vmlinux EXPORT_SYMBOL
-+0xee6e2a28 rtc_irq_set_state vmlinux EXPORT_SYMBOL_GPL
-+0xbd040986 phy_driver_register vmlinux EXPORT_SYMBOL
-+0x3b555ebf scsi_dma_unmap vmlinux EXPORT_SYMBOL
-+0xb4232cab relay_reset vmlinux EXPORT_SYMBOL_GPL
-+0x6971a684 nf_conntrack_register_notifier net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x0dcff8e4 inet_put_port vmlinux EXPORT_SYMBOL
-+0xcee525f4 sock_no_connect vmlinux EXPORT_SYMBOL
-+0x036f74a7 phy_print_status vmlinux EXPORT_SYMBOL
-+0x070473ec pci_remove_bus vmlinux EXPORT_SYMBOL
-+0xb3305d52 send_remote_softirq vmlinux EXPORT_SYMBOL
-+0xa1f8fe75 wait_for_completion_killable_timeout vmlinux EXPORT_SYMBOL
-+0x10ecc52c usb_amd_quirk_pll_enable vmlinux EXPORT_SYMBOL_GPL
-+0x279ef3e3 skcipher_geniv_alloc vmlinux EXPORT_SYMBOL_GPL
-+0x6e224a7a need_conntrack net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x4a358252 __bitmap_subset vmlinux EXPORT_SYMBOL
-+0x1c1af916 set_normalized_timespec vmlinux EXPORT_SYMBOL
-+0xbeccc586 eth_type_trans vmlinux EXPORT_SYMBOL
-+0xbfdff814 of_get_address vmlinux EXPORT_SYMBOL
-+0xaed8bc14 debugfs_create_blob vmlinux EXPORT_SYMBOL_GPL
-+0x928f76ce mb_cache_entry_get vmlinux EXPORT_SYMBOL
-+0x6655f24b vm_insert_mixed vmlinux EXPORT_SYMBOL
-+0x7b08c0c5 send_sig vmlinux EXPORT_SYMBOL
-+0xd8d36fcd tcp_shutdown vmlinux EXPORT_SYMBOL
-+0x581f6a59 usb_stor_set_xfer_buf vmlinux EXPORT_SYMBOL_GPL
-+0xab303c2a scsi_nonblockable_ioctl vmlinux EXPORT_SYMBOL
-+0xbe77aebe down_write_trylock vmlinux EXPORT_SYMBOL
-+0x730ff363 param_set_uint vmlinux EXPORT_SYMBOL
-+0x776637d2 rpc_init_wait_queue vmlinux EXPORT_SYMBOL_GPL
-+0xf389fe60 __hw_addr_init vmlinux EXPORT_SYMBOL
-+0x199ed0cd net_disable_timestamp vmlinux EXPORT_SYMBOL
-+0x96f5cd3e sdio_set_host_pm_flags vmlinux EXPORT_SYMBOL_GPL
-+0xe251fc75 usb_stor_ctrl_transfer vmlinux EXPORT_SYMBOL_GPL
-+0x4afe9a77 scsi_partsize vmlinux EXPORT_SYMBOL
-+0x9ac8f3af of_find_device_by_node vmlinux EXPORT_SYMBOL
-+0x4aaab2b1 groups_alloc vmlinux EXPORT_SYMBOL
-+0xf338d4c3 netlink_unregister_notifier vmlinux EXPORT_SYMBOL
-+0xc4c41664 simple_release_fs vmlinux EXPORT_SYMBOL
-+0xdc9498dd down vmlinux EXPORT_SYMBOL
-+0x5ab67931 do_IRQ vmlinux EXPORT_SYMBOL
-+0x8e2ea861 blk_end_request vmlinux EXPORT_SYMBOL
-+0xf3a0e01f skb_put vmlinux EXPORT_SYMBOL
-+0xdc5da161 mtd_concat_create vmlinux EXPORT_SYMBOL
-+0x22ef965d scsi_host_put vmlinux EXPORT_SYMBOL
-+0x3895cd7a nfnl_unlock net/netfilter/nfnetlink EXPORT_SYMBOL_GPL
-+0x07ae60b6 nf_nat_proto_in_range net/ipv4/netfilter/nf_nat EXPORT_SYMBOL_GPL
-+0xe464582e generic_block_fiemap vmlinux EXPORT_SYMBOL
-+0x735d8503 add_wait_queue vmlinux EXPORT_SYMBOL
-+0xd276f795 param_ops_invbool vmlinux EXPORT_SYMBOL
-+0x65dabd9c dev_add_pack vmlinux EXPORT_SYMBOL
-+0xbde3c08a usb_hub_clear_tt_buffer vmlinux EXPORT_SYMBOL_GPL
-+0x0a3131f6 strnchr vmlinux EXPORT_SYMBOL
-+0x9f984513 strrchr vmlinux EXPORT_SYMBOL
-+0xd20bf6ba dcookie_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x557e3153 balance_dirty_pages_ratelimited_nr vmlinux EXPORT_SYMBOL
-+0x7afa89fc vsnprintf vmlinux EXPORT_SYMBOL
-+0x44b911c3 rb_replace_node vmlinux EXPORT_SYMBOL
-+0x6ff607b6 crypto_get_default_rng vmlinux EXPORT_SYMBOL_GPL
-+0x668402aa crypto_put_default_rng vmlinux EXPORT_SYMBOL_GPL
-+0x07c13af6 crypto_mod_put vmlinux EXPORT_SYMBOL_GPL
-+0x94a69fd0 journal_clear_err vmlinux EXPORT_SYMBOL
-+0x09531a7b mount_pseudo vmlinux EXPORT_SYMBOL
-+0x0530dede _raw_write_trylock vmlinux EXPORT_SYMBOL
-+0x4205ad24 cancel_work_sync vmlinux EXPORT_SYMBOL_GPL
-+0x37382ea4 nf_ct_gre_keymap_flush net/netfilter/nf_conntrack_proto_gre EXPORT_SYMBOL
-+0x99cdc86b sysctl_tcp_reordering vmlinux EXPORT_SYMBOL
-+0xa3431157 input_set_keycode vmlinux EXPORT_SYMBOL
-+0x6b44d1af alloc_pci_dev vmlinux EXPORT_SYMBOL
-+0x9754ec10 radix_tree_preload vmlinux EXPORT_SYMBOL
-+0x9d1341ef blkdev_ioctl vmlinux EXPORT_SYMBOL_GPL
-+0xd11c0dc1 __kernel_param_unlock vmlinux EXPORT_SYMBOL
-+0x88279f25 cpm_muram_alloc vmlinux EXPORT_SYMBOL
-+0x56a10763 csum_tcpudp_magic vmlinux EXPORT_SYMBOL
-+0x9fedb268 __i2c_board_lock vmlinux EXPORT_SYMBOL_GPL
-+0x65dba254 tty_ldisc_flush vmlinux EXPORT_SYMBOL_GPL
-+0x29028646 crypto_register_instance vmlinux EXPORT_SYMBOL_GPL
-+0x2251978a crypto_alloc_tfm vmlinux EXPORT_SYMBOL_GPL
-+0x760afcf0 bdi_destroy vmlinux EXPORT_SYMBOL
-+0xe88cba4b skb_tstamp_tx vmlinux EXPORT_SYMBOL_GPL
-+0x28830c73 tty_set_operations vmlinux EXPORT_SYMBOL
-+0x616b825d dql_init vmlinux EXPORT_SYMBOL
-+0x69e27c7a bitmap_copy_le vmlinux EXPORT_SYMBOL
-+0x4dec6038 memscan vmlinux EXPORT_SYMBOL
-+0x239b6d58 mark_buffer_dirty vmlinux EXPORT_SYMBOL
-+0x150beb03 get_super vmlinux EXPORT_SYMBOL
-+0x00801678 flush_scheduled_work vmlinux EXPORT_SYMBOL
-+0xffb6efb2 write_bytes_to_xdr_buf vmlinux EXPORT_SYMBOL_GPL
-+0xafdc3bb7 skb_copy_and_csum_bits vmlinux EXPORT_SYMBOL
-+0xe03114f3 ll_rw_block vmlinux EXPORT_SYMBOL
-+0xd59e518f block_write_begin vmlinux EXPORT_SYMBOL
-+0xbe2e3b75 kstrtos8 vmlinux EXPORT_SYMBOL
-+0x124f2056 crypto_get_attr_type vmlinux EXPORT_SYMBOL_GPL
-+0x1cbc0b01 nfnetlink_send net/netfilter/nfnetlink EXPORT_SYMBOL_GPL
-+0x12e280e3 svc_proc_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x26c90ea4 scsi_eh_get_sense vmlinux EXPORT_SYMBOL_GPL
-+0x5d83dda1 device_create_bin_file vmlinux EXPORT_SYMBOL_GPL
-+0xdef35215 pci_intx vmlinux EXPORT_SYMBOL_GPL
-+0x83800bfa kref_init vmlinux EXPORT_SYMBOL
-+0x2d5cc8db crypto_alloc_aead vmlinux EXPORT_SYMBOL_GPL
-+0xba5ad651 crypto_spawn_tfm2 vmlinux EXPORT_SYMBOL_GPL
-+0x50fad434 round_jiffies_up vmlinux EXPORT_SYMBOL_GPL
-+0x46c1ef6e dev_set_mac_address vmlinux EXPORT_SYMBOL
-+0x05c9593c sk_receive_skb vmlinux EXPORT_SYMBOL
-+0xf5c05914 generic_segment_checks vmlinux EXPORT_SYMBOL
-+0xd0f36f0d audit_log_format vmlinux EXPORT_SYMBOL
-+0xec15f00a tcp_cookie_generator vmlinux EXPORT_SYMBOL
-+0x6d2fc5a6 net_namespace_list vmlinux EXPORT_SYMBOL_GPL
-+0x37287a4f sock_register vmlinux EXPORT_SYMBOL
-+0xbcbaf605 loop_register_transfer vmlinux EXPORT_SYMBOL
-+0x2c7e8020 pci_find_bus vmlinux EXPORT_SYMBOL
-+0x1f58e71b nfnl_lock net/netfilter/nfnetlink EXPORT_SYMBOL_GPL
-+0x16bd8d7a inet6_register_protosw vmlinux EXPORT_SYMBOL
-+0x3f1c88ef netif_set_real_num_tx_queues vmlinux EXPORT_SYMBOL
-+0xb0819781 netif_set_real_num_rx_queues vmlinux EXPORT_SYMBOL
-+0x5ad98fe1 dev_set_group vmlinux EXPORT_SYMBOL
-+0x8ac0ffc6 phy_register_fixup_for_uid vmlinux EXPORT_SYMBOL
-+0xfdbc60ef register_mtd_blktrans vmlinux EXPORT_SYMBOL_GPL
-+0xb4709322 scsi_dev_info_add_list vmlinux EXPORT_SYMBOL
-+0xf50c9445 end_buffer_async_write vmlinux EXPORT_SYMBOL
-+0x111fa7c9 qe_pin_set_dedicated vmlinux EXPORT_SYMBOL
-+0x2f045815 ip_nat_decode_session vmlinux EXPORT_SYMBOL
-+0xbb9cfeb4 sdio_get_host_pm_caps vmlinux EXPORT_SYMBOL_GPL
-+0x75de8c53 vfs_writev vmlinux EXPORT_SYMBOL
-+0xb258347c svc_rpcb_cleanup vmlinux EXPORT_SYMBOL_GPL
-+0x9062c322 ring_buffer_consume vmlinux EXPORT_SYMBOL_GPL
-+0x1c5b1f28 irq_free_descs vmlinux EXPORT_SYMBOL_GPL
-+0x4fc9418d proc_dointvec vmlinux EXPORT_SYMBOL
-+0xa2a5fd77 inet_ehash_secret vmlinux EXPORT_SYMBOL
-+0x7f6680dd __inet_lookup_established vmlinux EXPORT_SYMBOL_GPL
-+0x2ab95de3 netdev_alert vmlinux EXPORT_SYMBOL
-+0x0a540769 rpc_print_iostats vmlinux EXPORT_SYMBOL_GPL
-+0x4bb15c8c udp_lib_rehash vmlinux EXPORT_SYMBOL
-+0xb8f4d294 udp_lib_unhash vmlinux EXPORT_SYMBOL
-+0x1d9496fc of_pci_find_child_device vmlinux EXPORT_SYMBOL_GPL
-+0x05495392 hid_debug vmlinux EXPORT_SYMBOL_GPL
-+0x112dcb5f device_show_ulong vmlinux EXPORT_SYMBOL_GPL
-+0x79df9c12 cpumask_next_and vmlinux EXPORT_SYMBOL
-+0x3969cdfb nf_hook_slow vmlinux EXPORT_SYMBOL
-+0xce5ac24f zlib_inflate_workspacesize vmlinux EXPORT_SYMBOL
-+0x6103edc6 tcp_recvmsg vmlinux EXPORT_SYMBOL
-+0xace5c0fc usb_bus_list vmlinux EXPORT_SYMBOL_GPL
-+0x80f2bf56 xfrm_audit_state_notfound_simple vmlinux EXPORT_SYMBOL_GPL
-+0xe8b63ace radix_tree_range_tag_if_tagged vmlinux EXPORT_SYMBOL
-+0xc2882ea4 proc_dointvec_userhz_jiffies vmlinux EXPORT_SYMBOL
-+0xd48f3111 console_start vmlinux EXPORT_SYMBOL
-+0x21398e9d tcp_simple_retransmit vmlinux EXPORT_SYMBOL
-+0xad58729e inet_csk_bind_conflict vmlinux EXPORT_SYMBOL_GPL
-+0x8d93899a xt_register_match vmlinux EXPORT_SYMBOL
-+0x68f40f80 of_find_node_with_property vmlinux EXPORT_SYMBOL
-+0x17eb9b10 anon_inode_getfile vmlinux EXPORT_SYMBOL_GPL
-+0x8ec1678f simple_dir_inode_operations vmlinux EXPORT_SYMBOL
-+0x065f1d39 fsl_pq_mdio_bus_name vmlinux EXPORT_SYMBOL_GPL
-+0x75a4001c dmam_pool_create vmlinux EXPORT_SYMBOL
-+0x8fc5a78b genphy_suspend vmlinux EXPORT_SYMBOL
-+0x0878c365 subsys_system_register vmlinux EXPORT_SYMBOL_GPL
-+0x55c887e2 __find_get_block vmlinux EXPORT_SYMBOL
-+0xcc276874 dcache_dir_open vmlinux EXPORT_SYMBOL
-+0x3f4547a7 put_unused_fd vmlinux EXPORT_SYMBOL
-+0xd2555f19 jiffies_64_to_clock_t vmlinux EXPORT_SYMBOL
-+0x9d51befe inet6_lookup_listener vmlinux EXPORT_SYMBOL_GPL
-+0xfbe27a1c rb_first vmlinux EXPORT_SYMBOL
-+0x7c904ded unregister_module_notifier vmlinux EXPORT_SYMBOL
-+0xddc16c88 flush_delayed_work vmlinux EXPORT_SYMBOL
-+0xe5ab60b2 mmc_switch vmlinux EXPORT_SYMBOL_GPL
-+0xfb65ffac scsi_cmd_print_sense_hdr vmlinux EXPORT_SYMBOL
-+0x616e9785 zero_fill_bio vmlinux EXPORT_SYMBOL
-+0xb628f715 files_lglock_local_lock vmlinux EXPORT_SYMBOL
-+0x082c3213 pci_root_buses vmlinux EXPORT_SYMBOL
-+0x72d4c23c fsl_get_sys_freq vmlinux EXPORT_SYMBOL
-+0xfc4d7b87 tcp_syn_ack_timeout vmlinux EXPORT_SYMBOL
-+0x0397f6b0 nf_log_unregister vmlinux EXPORT_SYMBOL
-+0x72975f42 mmc_alloc_host vmlinux EXPORT_SYMBOL
-+0x110020ff scsi_eh_ready_devs vmlinux EXPORT_SYMBOL_GPL
-+0x18f4e85e generic_file_buffered_write vmlinux EXPORT_SYMBOL
-+0xc1c2dd09 __hw_addr_flush vmlinux EXPORT_SYMBOL
-+0x548a8689 of_property_read_string vmlinux EXPORT_SYMBOL_GPL
-+0x05b82c15 thermal_cooling_device_register vmlinux EXPORT_SYMBOL
-+0xb0e70ae3 input_open_device vmlinux EXPORT_SYMBOL
-+0xfe990052 gpio_free vmlinux EXPORT_SYMBOL_GPL
-+0xea054b22 nla_policy_len vmlinux EXPORT_SYMBOL
-+0xd92afabe bitmap_clear vmlinux EXPORT_SYMBOL
-+0xa6e1a05f fsync_bdev vmlinux EXPORT_SYMBOL
-+0x710fed59 cache_unregister vmlinux EXPORT_SYMBOL_GPL
-+0xa3bbc0ac xprt_set_retrans_timeout_def vmlinux EXPORT_SYMBOL_GPL
-+0x0d4d2a18 ip6_dst_lookup vmlinux EXPORT_SYMBOL_GPL
-+0xedd0ed46 i2c_new_device vmlinux EXPORT_SYMBOL_GPL
-+0xdc39e99d device_for_each_child vmlinux EXPORT_SYMBOL_GPL
-+0x40a9b349 vzalloc vmlinux EXPORT_SYMBOL
-+0xbaaab8ae timespec_to_jiffies vmlinux EXPORT_SYMBOL
-+0x51c251f8 unregister_key_type vmlinux EXPORT_SYMBOL
-+0xa38e691a ioremap_bot vmlinux EXPORT_SYMBOL
-+0x8530e62e rpc_shutdown_client vmlinux EXPORT_SYMBOL_GPL
-+0x11089ac7 _ctype vmlinux EXPORT_SYMBOL
-+0x649ddc16 blk_get_queue vmlinux EXPORT_SYMBOL
-+0x5eb6f94d bd_set_size vmlinux EXPORT_SYMBOL
-+0xa28aaf29 rh_create vmlinux EXPORT_SYMBOL_GPL
-+0x0e74417a udp_proc_unregister vmlinux EXPORT_SYMBOL
-+0x0deebb29 mtd_device_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x37f614b7 __kfifo_len_r vmlinux EXPORT_SYMBOL
-+0x6f868b48 svc_xprt_names vmlinux EXPORT_SYMBOL_GPL
-+0x92cff065 inet_sk_rebuild_header vmlinux EXPORT_SYMBOL
-+0x0ea878cd skb_copy vmlinux EXPORT_SYMBOL
-+0x829b3b9d input_inject_event vmlinux EXPORT_SYMBOL
-+0x17ec8f5b pci_bus_read_config_dword vmlinux EXPORT_SYMBOL
-+0x7593d385 div64_s64 vmlinux EXPORT_SYMBOL
-+0x27864d57 memparse vmlinux EXPORT_SYMBOL
-+0x3ead9a33 block_truncate_page vmlinux EXPORT_SYMBOL
-+0x9d130651 generic_write_checks vmlinux EXPORT_SYMBOL
-+0x1d2e87c6 do_gettimeofday vmlinux EXPORT_SYMBOL
-+0xcf015f7b do_settimeofday vmlinux EXPORT_SYMBOL
-+0xd172cb8d netdev_increment_features vmlinux EXPORT_SYMBOL
-+0x264b5eda uart_match_port vmlinux EXPORT_SYMBOL
-+0x9e04279a cap_file_mmap vmlinux EXPORT_SYMBOL_GPL
-+0xc5a37aa8 flow_cache_lookup vmlinux EXPORT_SYMBOL
-+0x55da6c07 alloc_tty_driver vmlinux EXPORT_SYMBOL
-+0xfda98690 pcie_port_service_register vmlinux EXPORT_SYMBOL
-+0x722852be pci_request_selected_regions vmlinux EXPORT_SYMBOL
-+0x45666d9b __splice_from_pipe vmlinux EXPORT_SYMBOL
-+0x9c3dd03a __nf_ct_ext_destroy net/netfilter/nf_conntrack EXPORT_SYMBOL
-+0x3c65c88c unregister_net_sysctl_table vmlinux EXPORT_SYMBOL_GPL
-+0x24e6d442 sdio_align_size vmlinux EXPORT_SYMBOL_GPL
-+0x2114d287 tty_write_room vmlinux EXPORT_SYMBOL
-+0x586527c3 sysfs_add_file_to_group vmlinux EXPORT_SYMBOL_GPL
-+0x8436f8e3 param_ops_ushort vmlinux EXPORT_SYMBOL
-+0x546027e3 dev_trans_start vmlinux EXPORT_SYMBOL
-+0x94cbd061 dql_reset vmlinux EXPORT_SYMBOL
-+0x6a33ea8b blk_register_region vmlinux EXPORT_SYMBOL
-+0x93dd83ef bio_put vmlinux EXPORT_SYMBOL
-+0x65f9016f task_tgid_nr_ns vmlinux EXPORT_SYMBOL
-+0x1b767055 of_find_compatible_node vmlinux EXPORT_SYMBOL
-+0xabc50916 input_alloc_absinfo vmlinux EXPORT_SYMBOL
-+0x13fe75bb scsi_is_target_device vmlinux EXPORT_SYMBOL
-+0x7da357d0 journal_force_commit vmlinux EXPORT_SYMBOL
-+0xef91072e each_symbol_section vmlinux EXPORT_SYMBOL_GPL
-+0xe697313d sk_dst_check vmlinux EXPORT_SYMBOL
-+0x6a76f3ac blk_iopoll_enable vmlinux EXPORT_SYMBOL
-+0xb906fe4a inode_needs_sync vmlinux EXPORT_SYMBOL
-+0x7d38f2e3 grab_cache_page_nowait vmlinux EXPORT_SYMBOL
-+0x8b70e8ea __wake_up_sync_key vmlinux EXPORT_SYMBOL_GPL
-+0x042333d2 dev_getfirstbyhwtype vmlinux EXPORT_SYMBOL
-+0x9ea7341b scsi_internal_device_block vmlinux EXPORT_SYMBOL_GPL
-+0x25820c64 fs_overflowuid vmlinux EXPORT_SYMBOL
-+0x4ebd6a47 wake_up_process vmlinux EXPORT_SYMBOL
-+0x53ebab1b _outsl_ns vmlinux EXPORT_SYMBOL
-+0x9e2ae014 __nf_ct_refresh_acct net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x556a7629 skb_dequeue_tail vmlinux EXPORT_SYMBOL
-+0x311f6ed3 input_ff_erase vmlinux EXPORT_SYMBOL_GPL
-+0x8472112c scsi_target_resume vmlinux EXPORT_SYMBOL
-+0x4cc325f1 nfs_initiate_read vmlinux EXPORT_SYMBOL_GPL
-+0x58392cb3 __get_user_pages vmlinux EXPORT_SYMBOL
-+0x0c485af1 __module_address vmlinux EXPORT_SYMBOL_GPL
-+0x5b076b1b inet_stream_ops vmlinux EXPORT_SYMBOL
-+0xe791c07d qdisc_reset vmlinux EXPORT_SYMBOL
-+0x63ecad53 register_netdevice_notifier vmlinux EXPORT_SYMBOL
-+0xb573cf83 pci_get_device vmlinux EXPORT_SYMBOL
-+0x5b237650 blk_complete_request vmlinux EXPORT_SYMBOL
-+0x808ec1a3 crypto_alg_tested vmlinux EXPORT_SYMBOL_GPL
-+0x583c0845 bio_unmap_user vmlinux EXPORT_SYMBOL
-+0xe4a5911c udp_seq_open vmlinux EXPORT_SYMBOL
-+0x133b4ee4 idr_get_next vmlinux EXPORT_SYMBOL
-+0xc4571a56 fail_migrate_page vmlinux EXPORT_SYMBOL
-+0xdf4c8767 ns_to_timeval vmlinux EXPORT_SYMBOL
-+0xcacba0a5 nf_ct_expect_register_notifier net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x721b1851 skip_spaces vmlinux EXPORT_SYMBOL
-+0x0c0c015e ring_buffer_swap_cpu vmlinux EXPORT_SYMBOL_GPL
-+0xdc2adb35 add_taint vmlinux EXPORT_SYMBOL
-+0x60a32ea9 pm_power_off vmlinux EXPORT_SYMBOL_GPL
-+0x466c14a7 __delay vmlinux EXPORT_SYMBOL
-+0x3e09fbde __neigh_for_each_release vmlinux EXPORT_SYMBOL
-+0x1ee9814e irq_of_parse_and_map vmlinux EXPORT_SYMBOL_GPL
-+0xe0e37b4c spi_busnum_to_master vmlinux EXPORT_SYMBOL_GPL
-+0xb73e0c9c device_initialize vmlinux EXPORT_SYMBOL_GPL
-+0x0d558de0 blk_queue_init_tags vmlinux EXPORT_SYMBOL
-+0x690a7b30 user_destroy vmlinux EXPORT_SYMBOL_GPL
-+0x4f69f21d bdget vmlinux EXPORT_SYMBOL
-+0x1c326670 bdput vmlinux EXPORT_SYMBOL
-+0x42cdd5c5 fsstack_copy_inode_size vmlinux EXPORT_SYMBOL_GPL
-+0xd5248f66 nf_conntrack_untracked net/netfilter/nf_conntrack EXPORT_SYMBOL
-+0x0e93bb22 usb_usual_ignore_device vmlinux EXPORT_SYMBOL_GPL
-+0xed9f8e6d kstrtos16 vmlinux EXPORT_SYMBOL
-+0xfb32b30f ring_buffer_read_prepare_sync vmlinux EXPORT_SYMBOL_GPL
-+0xadcac4a3 vfsmount_lock_local_unlock_cpu vmlinux EXPORT_SYMBOL
-+0xaef2c83c fs_kobj vmlinux EXPORT_SYMBOL_GPL
-+0x956657df crypto_alloc_ablkcipher vmlinux EXPORT_SYMBOL_GPL
-+0xfb3b51e1 bio_init vmlinux EXPORT_SYMBOL
-+0x7278d328 all_vm_events vmlinux EXPORT_SYMBOL_GPL
-+0xfe3c4307 gss_mech_put vmlinux EXPORT_SYMBOL_GPL
-+0x2ca3edba rpc_max_payload vmlinux EXPORT_SYMBOL_GPL
-+0x288092c9 inet6_hash_connect vmlinux EXPORT_SYMBOL_GPL
-+0x6dbad0b5 gnet_stats_copy_rate_est vmlinux EXPORT_SYMBOL
-+0x115b689d skb_partial_csum_set vmlinux EXPORT_SYMBOL_GPL
-+0x0f2bd6b9 sdio_enable_func vmlinux EXPORT_SYMBOL_GPL
-+0x4e505436 subsys_dev_iter_next vmlinux EXPORT_SYMBOL_GPL
-+0x334a0cd1 create_empty_buffers vmlinux EXPORT_SYMBOL
-+0x2f1cd7a8 init_special_inode vmlinux EXPORT_SYMBOL
-+0x0e4a8c58 inet_frag_destroy vmlinux EXPORT_SYMBOL
-+0x48dd2a9a skb_make_writable vmlinux EXPORT_SYMBOL
-+0x2eeceb42 sk_chk_filter vmlinux EXPORT_SYMBOL
-+0xf8a88294 cfi_qry_present vmlinux EXPORT_SYMBOL_GPL
-+0x6bb87ddb pipe_to_file vmlinux EXPORT_SYMBOL
-+0x114604eb __dec_zone_page_state vmlinux EXPORT_SYMBOL
-+0x4b6cb580 __inc_zone_page_state vmlinux EXPORT_SYMBOL
-+0xd9c6efac __mod_zone_page_state vmlinux EXPORT_SYMBOL
-+0x0b55a26a flush_kthread_worker vmlinux EXPORT_SYMBOL_GPL
-+0xa5cef8ad release_resource vmlinux EXPORT_SYMBOL
-+0x9ef6b7ea powerpc_debugfs_root vmlinux EXPORT_SYMBOL
-+0x5e906550 brioctl_set vmlinux EXPORT_SYMBOL
-+0x6a496bc1 input_set_abs_params vmlinux EXPORT_SYMBOL
-+0x378abc81 spi_bus_unlock vmlinux EXPORT_SYMBOL_GPL
-+0xc60fe5e9 device_schedule_callback_owner vmlinux EXPORT_SYMBOL_GPL
-+0x8b498a59 vm_insert_pfn vmlinux EXPORT_SYMBOL
-+0xfcaa04a0 out_of_line_wait_on_bit_lock vmlinux EXPORT_SYMBOL
-+0xf0bfe668 register_net_sysctl_table vmlinux EXPORT_SYMBOL_GPL
-+0x2370b4df xfrm_state_alloc vmlinux EXPORT_SYMBOL
-+0x85670f1d rtnl_is_locked vmlinux EXPORT_SYMBOL
-+0xedd06a1b of_parse_phandles_with_args vmlinux EXPORT_SYMBOL
-+0xecc376f4 fat_remove_entries vmlinux EXPORT_SYMBOL_GPL
-+0x8a2b65f0 page_symlink vmlinux EXPORT_SYMBOL
-+0xbc6f931b workqueue_congested vmlinux EXPORT_SYMBOL_GPL
-+0x3d6d8275 __xfrm_route_forward vmlinux EXPORT_SYMBOL
-+0xe2ae4be3 gen_replace_estimator vmlinux EXPORT_SYMBOL
-+0xe2353e10 scsi_target_unblock vmlinux EXPORT_SYMBOL_GPL
-+0x751b2247 param_get_bool vmlinux EXPORT_SYMBOL
-+0xb0146c3a param_set_byte vmlinux EXPORT_SYMBOL
-+0xf5e3f6f8 rpc_call_null vmlinux EXPORT_SYMBOL_GPL
-+0x9fdecc31 unregister_netdevice_many vmlinux EXPORT_SYMBOL
-+0x31c11871 rtc_device_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x5a21f0f4 blk_abort_queue vmlinux EXPORT_SYMBOL_GPL
-+0x3e6e75c0 blk_queue_logical_block_size vmlinux EXPORT_SYMBOL
-+0x63f608e4 init_srcu_struct vmlinux EXPORT_SYMBOL_GPL
-+0x594b47d6 sunrpc_cache_lookup vmlinux EXPORT_SYMBOL_GPL
-+0xdda28e49 arp_tbl vmlinux EXPORT_SYMBOL
-+0xfea540c6 __skb_recv_datagram vmlinux EXPORT_SYMBOL
-+0x376e7e39 phy_attach vmlinux EXPORT_SYMBOL
-+0xfe7c4287 nr_cpu_ids vmlinux EXPORT_SYMBOL
-+0xf5e7f053 rh_destroy vmlinux EXPORT_SYMBOL_GPL
-+0x065994f1 xdr_encode_opaque_fixed vmlinux EXPORT_SYMBOL_GPL
-+0xa516a4a3 tcp_splice_read vmlinux EXPORT_SYMBOL
-+0x7c478694 xt_unregister_match vmlinux EXPORT_SYMBOL
-+0x36e360e3 __hw_addr_add_multiple vmlinux EXPORT_SYMBOL
-+0x0d0c109d of_irq_to_resource vmlinux EXPORT_SYMBOL_GPL
-+0xcbc9557f unregister_sysrq_key vmlinux EXPORT_SYMBOL
-+0x74ad740d simple_transaction_set vmlinux EXPORT_SYMBOL
-+0xed7d1156 simple_transaction_get vmlinux EXPORT_SYMBOL
-+0x5f629129 find_pid_ns vmlinux EXPORT_SYMBOL_GPL
-+0x17913f3c __nf_conntrack_find net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x56e75d47 klist_node_attached vmlinux EXPORT_SYMBOL_GPL
-+0x8b0896a8 lock_sock_nested vmlinux EXPORT_SYMBOL
-+0xc0ad921a hid_add_device vmlinux EXPORT_SYMBOL_GPL
-+0x1605388f sdio_disable_func vmlinux EXPORT_SYMBOL_GPL
-+0x45582f48 scsi_free_command vmlinux EXPORT_SYMBOL
-+0xd45c92cb platform_add_devices vmlinux EXPORT_SYMBOL_GPL
-+0x92b57248 flush_work vmlinux EXPORT_SYMBOL_GPL
-+0x9dd6edf6 usb_deregister vmlinux EXPORT_SYMBOL_GPL
-+0x3b261e90 of_device_is_compatible vmlinux EXPORT_SYMBOL
-+0x851187ae crypto_alloc_instance vmlinux EXPORT_SYMBOL_GPL
-+0xe18b50f9 mpage_writepage vmlinux EXPORT_SYMBOL
-+0x18ef997d set_security_override vmlinux EXPORT_SYMBOL
-+0x6b2dc060 dump_stack vmlinux EXPORT_SYMBOL
-+0x40797035 nfnetlink_subsys_unregister net/netfilter/nfnetlink EXPORT_SYMBOL_GPL
-+0xfb9b2d0e raw_seq_start vmlinux EXPORT_SYMBOL_GPL
-+0x17f28d7c dst_cow_metrics_generic vmlinux EXPORT_SYMBOL
-+0xfa3657fe rtc_read_time vmlinux EXPORT_SYMBOL_GPL
-+0x7eacf564 swiotlb_map_page vmlinux EXPORT_SYMBOL_GPL
-+0xe8850089 mount_ns vmlinux EXPORT_SYMBOL
-+0xf0c82f30 cpu_add_dev_attr vmlinux EXPORT_SYMBOL_GPL
-+0x11886e11 kobject_del vmlinux EXPORT_SYMBOL
-+0x1343402c crypto_unregister_shash vmlinux EXPORT_SYMBOL_GPL
-+0xfbacc823 crypto_unregister_ahash vmlinux EXPORT_SYMBOL_GPL
-+0x5eb8e514 usb_reset_endpoint vmlinux EXPORT_SYMBOL_GPL
-+0xb6a68816 find_last_bit vmlinux EXPORT_SYMBOL
-+0x712dc4d8 inode_dio_done vmlinux EXPORT_SYMBOL_GPL
-+0x9a030dc8 poll_initwait vmlinux EXPORT_SYMBOL
-+0x5e19264c unregister_console vmlinux EXPORT_SYMBOL
-+0xff6dea25 smp_hw_index vmlinux EXPORT_SYMBOL
-+0xbe85ec13 nf_ct_helper_ext_add net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x293d41a8 phy_disconnect vmlinux EXPORT_SYMBOL
-+0xa8cb5076 aead_geniv_free vmlinux EXPORT_SYMBOL_GPL
-+0xd8e484f0 register_chrdev_region vmlinux EXPORT_SYMBOL
-+0xf52f4bc3 inet_csk_reqsk_queue_prune vmlinux EXPORT_SYMBOL_GPL
-+0xed5f822a netdev_state_change vmlinux EXPORT_SYMBOL
-+0x310917fe sort vmlinux EXPORT_SYMBOL
-+0x3d19d9ca nfs4_reset_read vmlinux EXPORT_SYMBOL_GPL
-+0x541bd60a irq_work_run vmlinux EXPORT_SYMBOL_GPL
-+0x6c49c4f2 clockevents_notify vmlinux EXPORT_SYMBOL_GPL
-+0x6c1b16e2 usb_sg_cancel vmlinux EXPORT_SYMBOL_GPL
-+0xbe3f901e kern_path vmlinux EXPORT_SYMBOL
-+0x33817a73 nf_register_queue_handler vmlinux EXPORT_SYMBOL
-+0xea91aa6f netpoll_print_options vmlinux EXPORT_SYMBOL
-+0x29b1c366 __sg_alloc_table vmlinux EXPORT_SYMBOL
-+0x79f9a580 shrink_dcache_sb vmlinux EXPORT_SYMBOL
-+0x3ec8886f param_ops_int vmlinux EXPORT_SYMBOL
-+0x1b87a6f0 blkdev_issue_flush vmlinux EXPORT_SYMBOL
-+0x499043d3 crypto_init_queue vmlinux EXPORT_SYMBOL_GPL
-+0xb11b1747 default_backing_dev_info vmlinux EXPORT_SYMBOL_GPL
-+0xbdbe7378 cookie_check_timestamp vmlinux EXPORT_SYMBOL
-+0x59020915 fsnotify_put_mark vmlinux EXPORT_SYMBOL_GPL
-+0x6b4435a7 generic_drop_inode vmlinux EXPORT_SYMBOL_GPL
-+0xf57db0bd find_inode_number vmlinux EXPORT_SYMBOL
-+0xf5cf326a param_ops_short vmlinux EXPORT_SYMBOL
-+0x1f925c00 rpcb_getport_async vmlinux EXPORT_SYMBOL_GPL
-+0x8c354480 ip_route_input_common vmlinux EXPORT_SYMBOL
-+0xa6970398 __kfifo_to_user_r vmlinux EXPORT_SYMBOL
-+0x1de33a9e softnet_data vmlinux EXPORT_SYMBOL
-+0x00f42699 files_lglock_global_unlock vmlinux EXPORT_SYMBOL
-+0x24e1307e flush_work_sync vmlinux EXPORT_SYMBOL_GPL
-+0xfe5d4bb2 sys_tz vmlinux EXPORT_SYMBOL
-+0x1ae6ffc8 __skb_tx_hash vmlinux EXPORT_SYMBOL
-+0x241f0763 blk_init_queue vmlinux EXPORT_SYMBOL
-+0xce67b38d unlock_page vmlinux EXPORT_SYMBOL
-+0xcbf10c5b sdio_memcpy_fromio vmlinux EXPORT_SYMBOL_GPL
-+0x5785384a flex_array_free_parts vmlinux EXPORT_SYMBOL
-+0x0f668ba9 svc_auth_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x45456905 xfrm_unregister_type vmlinux EXPORT_SYMBOL
-+0x4e781803 nf_ip_checksum vmlinux EXPORT_SYMBOL
-+0xe1982309 pci_request_regions_exclusive vmlinux EXPORT_SYMBOL
-+0x773a9c94 blk_iopoll_enabled vmlinux EXPORT_SYMBOL
-+0xd4d24bb4 hrtimer_init_sleeper vmlinux EXPORT_SYMBOL_GPL
-+0x5e1c7425 eth_rebuild_header vmlinux EXPORT_SYMBOL
-+0x533031ec neigh_compat_output vmlinux EXPORT_SYMBOL
-+0xc6f2dadd user_path_at vmlinux EXPORT_SYMBOL
-+0xfd46510b module_put vmlinux EXPORT_SYMBOL
-+0x2459bbcc console_set_on_cmdline vmlinux EXPORT_SYMBOL
-+0xe9379468 usb_get_from_anchor vmlinux EXPORT_SYMBOL_GPL
-+0x2d938d67 genphy_resume vmlinux EXPORT_SYMBOL
-+0xee4db89d inode_get_bytes vmlinux EXPORT_SYMBOL
-+0x5e3a8a9c __wake_up vmlinux EXPORT_SYMBOL
-+0x9fd9cdb0 nf_conntrack_helper_unregister net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xa8a585c0 i2c_for_each_dev vmlinux EXPORT_SYMBOL_GPL
-+0x599adf11 dev_driver_string vmlinux EXPORT_SYMBOL
-+0x5e52b566 pcie_get_readrq vmlinux EXPORT_SYMBOL
-+0xc7a1840e llist_add_batch vmlinux EXPORT_SYMBOL_GPL
-+0x0010abad vfs_mkdir vmlinux EXPORT_SYMBOL
-+0x79272d01 of_match_node vmlinux EXPORT_SYMBOL
-+0x2edfd91a usb_driver_claim_interface vmlinux EXPORT_SYMBOL_GPL
-+0x9cfd56c5 scsi_print_status vmlinux EXPORT_SYMBOL
-+0x4bf98954 eventfd_ctx_fileget vmlinux EXPORT_SYMBOL_GPL
-+0x01139ffc max_mapnr vmlinux EXPORT_SYMBOL
-+0xc1ef47df rpc_pipe_generic_upcall vmlinux EXPORT_SYMBOL_GPL
-+0x98a76b33 xprt_unregister_transport vmlinux EXPORT_SYMBOL_GPL
-+0x93b9629e of_find_i2c_device_by_node vmlinux EXPORT_SYMBOL
-+0x7cee66f5 eventfd_fget vmlinux EXPORT_SYMBOL_GPL
-+0xc58850d7 dget_parent vmlinux EXPORT_SYMBOL
-+0xb36388b7 hid_dump_input vmlinux EXPORT_SYMBOL_GPL
-+0x8541878a usb_get_dev vmlinux EXPORT_SYMBOL_GPL
-+0x6ecdaa65 mb_cache_create vmlinux EXPORT_SYMBOL
-+0x769ec6bc iunique vmlinux EXPORT_SYMBOL
-+0x01a4ea6d unregister_die_notifier vmlinux EXPORT_SYMBOL_GPL
-+0x5614b010 xfrm_policy_walk_done vmlinux EXPORT_SYMBOL
-+0xe0e2d273 inet_dgram_ops vmlinux EXPORT_SYMBOL
-+0x8a20e1aa input_release_device vmlinux EXPORT_SYMBOL
-+0x9c1c727f scsi_put_command vmlinux EXPORT_SYMBOL
-+0xa2134525 blk_alloc_queue vmlinux EXPORT_SYMBOL
-+0xdcadc348 mb_cache_destroy vmlinux EXPORT_SYMBOL
-+0x0903c239 vid_from_reg drivers/hwmon/hwmon-vid EXPORT_SYMBOL
-+0x89253799 get_gendisk vmlinux EXPORT_SYMBOL
-+0x99bfbe39 get_unused_fd vmlinux EXPORT_SYMBOL
-+0x7a50a315 files_lglock_global_unlock_online vmlinux EXPORT_SYMBOL
-+0xbfad4db7 proc_doulongvec_minmax vmlinux EXPORT_SYMBOL
-+0x2d36c57b rh_alloc vmlinux EXPORT_SYMBOL_GPL
-+0xdd56dbe7 tcp_proc_unregister vmlinux EXPORT_SYMBOL
-+0x851d3cba hwmon_device_register vmlinux EXPORT_SYMBOL_GPL
-+0xbf4c8a06 sdev_evt_send_simple vmlinux EXPORT_SYMBOL_GPL
-+0x6746ae74 pci_renumber_slot vmlinux EXPORT_SYMBOL_GPL
-+0xef17cdaf simple_attr_open vmlinux EXPORT_SYMBOL_GPL
-+0x9a49d937 __wake_up_locked_key vmlinux EXPORT_SYMBOL_GPL
-+0x85c10896 rcu_batches_completed_bh vmlinux EXPORT_SYMBOL_GPL
-+0x4578f528 __kfifo_to_user vmlinux EXPORT_SYMBOL
-+0xcc7fa952 local_bh_enable_ip vmlinux EXPORT_SYMBOL
-+0x27f7e224 xfrm4_rcv_encap vmlinux EXPORT_SYMBOL
-+0xc7654bfd udp_poll vmlinux EXPORT_SYMBOL
-+0x51ef33b8 kstrndup vmlinux EXPORT_SYMBOL
-+0x0583b1a3 irq_set_chip vmlinux EXPORT_SYMBOL
-+0x4f513a91 console_stop vmlinux EXPORT_SYMBOL
-+0x419cc91e nf_conntrack_tuple_taken net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xd1a9044f inet6_getname vmlinux EXPORT_SYMBOL
-+0x8a2cf4b8 xdr_encode_word vmlinux EXPORT_SYMBOL_GPL
-+0xf6f682ab auth_domain_find vmlinux EXPORT_SYMBOL_GPL
-+0xb95bbaa0 register_mtd_user vmlinux EXPORT_SYMBOL_GPL
-+0xbe91f299 debugfs_create_file vmlinux EXPORT_SYMBOL_GPL
-+0xc15de2b9 new_inode vmlinux EXPORT_SYMBOL
-+0xe16ce22c rpc_restart_call_prepare vmlinux EXPORT_SYMBOL_GPL
-+0xa8657869 of_get_phy_mode vmlinux EXPORT_SYMBOL_GPL
-+0x28a2ed02 scsi_build_sense_buffer vmlinux EXPORT_SYMBOL
-+0xd11042c0 tty_port_close vmlinux EXPORT_SYMBOL
-+0x65dccf13 xz_dec_end vmlinux EXPORT_SYMBOL
-+0xf9348cbc xz_dec_run vmlinux EXPORT_SYMBOL
-+0x76e07962 idr_get_new vmlinux EXPORT_SYMBOL
-+0x92a2c46d ida_get_new vmlinux EXPORT_SYMBOL
-+0xe0b13336 argv_free vmlinux EXPORT_SYMBOL
-+0x3240c65b files_lglock_global_lock_online vmlinux EXPORT_SYMBOL
-+0xb7a383e5 genl_unregister_family vmlinux EXPORT_SYMBOL
-+0xfe769456 unregister_netdevice_notifier vmlinux EXPORT_SYMBOL
-+0x3e01160a tty_register_driver vmlinux EXPORT_SYMBOL
-+0xefadeaf0 sdio_release_host vmlinux EXPORT_SYMBOL_GPL
-+0xc27db015 driver_remove_file vmlinux EXPORT_SYMBOL_GPL
-+0x87f98b5b swiotlb_free_coherent vmlinux EXPORT_SYMBOL
-+0x39cb510c kset_unregister vmlinux EXPORT_SYMBOL
-+0x1abb4c45 debugfs_create_u32 vmlinux EXPORT_SYMBOL_GPL
-+0x98b9e82b register_net_sysctl_rotable vmlinux EXPORT_SYMBOL_GPL
-+0x76495a16 llc_build_and_send_ui_pkt vmlinux EXPORT_SYMBOL
-+0x87c85967 netdev_rx_handler_register vmlinux EXPORT_SYMBOL_GPL
-+0xf0ad1471 inet_csk_reset_keepalive_timer vmlinux EXPORT_SYMBOL
-+0xc27d3a6d user_read vmlinux EXPORT_SYMBOL_GPL
-+0x53326531 mempool_alloc_pages vmlinux EXPORT_SYMBOL
-+0x47939e0d __tasklet_hi_schedule vmlinux EXPORT_SYMBOL
-+0x4e4fee60 read_bytes_from_xdr_buf vmlinux EXPORT_SYMBOL_GPL
-+0x84d64671 arp_send vmlinux EXPORT_SYMBOL
-+0x7b9dea01 xt_register_matches vmlinux EXPORT_SYMBOL
-+0x3ed63055 zlib_inflateReset vmlinux EXPORT_SYMBOL
-+0xb19760c3 bitmap_onto vmlinux EXPORT_SYMBOL
-+0x26faebf0 cdev_del vmlinux EXPORT_SYMBOL
-+0x281823c5 __kfifo_out_peek vmlinux EXPORT_SYMBOL
-+0x341c41c5 tcp_seq_open vmlinux EXPORT_SYMBOL
-+0x456144b4 pneigh_enqueue vmlinux EXPORT_SYMBOL
-+0xcc3f71f3 dev_alloc_name vmlinux EXPORT_SYMBOL
-+0x6086fae9 rwsem_wake vmlinux EXPORT_SYMBOL
-+0x51ee205d fsnotify_init_mark vmlinux EXPORT_SYMBOL_GPL
-+0x6c91b04d iov_iter_copy_from_user vmlinux EXPORT_SYMBOL
-+0xd5dde498 generic_fh_to_dentry vmlinux EXPORT_SYMBOL_GPL
-+0xa3225eb1 try_to_del_timer_sync vmlinux EXPORT_SYMBOL
-+0x70469604 ipcomp_output net/xfrm/xfrm_ipcomp EXPORT_SYMBOL_GPL
-+0x77d48f27 nf_ct_expect_related_report net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x4afdeb11 svc_addsock vmlinux EXPORT_SYMBOL_GPL
-+0xe266f2c3 usb_stor_bulk_transfer_buf vmlinux EXPORT_SYMBOL_GPL
-+0x824b05c2 tty_init_termios vmlinux EXPORT_SYMBOL_GPL
-+0x20257b88 pci_enable_device_io vmlinux EXPORT_SYMBOL
-+0x5d6bdce1 flex_array_alloc vmlinux EXPORT_SYMBOL
-+0x61471532 blk_queue_bounce vmlinux EXPORT_SYMBOL
-+0x97b13dad __clocksource_register_scale vmlinux EXPORT_SYMBOL_GPL
-+0x3145216f pci_dev_present vmlinux EXPORT_SYMBOL
-+0x4ff7c43d pci_dev_get vmlinux EXPORT_SYMBOL
-+0xe23d3f77 pci_dev_put vmlinux EXPORT_SYMBOL
-+0x45d0d7e1 scsi_cmd_blk_ioctl vmlinux EXPORT_SYMBOL
-+0x51f53371 crypto_alloc_instance2 vmlinux EXPORT_SYMBOL_GPL
-+0x62916e11 read_dev_sector vmlinux EXPORT_SYMBOL
-+0x31389d75 usb_ifnum_to_if vmlinux EXPORT_SYMBOL_GPL
-+0xd34d1db1 debugfs_create_x16 vmlinux EXPORT_SYMBOL_GPL
-+0x14ae9650 journal_create vmlinux EXPORT_SYMBOL
-+0x8f6ab23e fsnotify_put_group vmlinux EXPORT_SYMBOL_GPL
-+0xd81de62c ring_buffer_record_enable vmlinux EXPORT_SYMBOL_GPL
-+0x7400f11e inet6_destroy_sock vmlinux EXPORT_SYMBOL_GPL
-+0xc15f809f mb_cache_entry_release vmlinux EXPORT_SYMBOL
-+0x5c37f319 _raw_spin_unlock_irqrestore vmlinux EXPORT_SYMBOL
-+0x061651be strcat vmlinux EXPORT_SYMBOL
-+0xec7e08c7 crypto_register_shash vmlinux EXPORT_SYMBOL_GPL
-+0x37c68932 inet6_unregister_protosw vmlinux EXPORT_SYMBOL
-+0xa869fd87 nf_register_hooks vmlinux EXPORT_SYMBOL
-+0x218ce3f7 pfifo_qdisc_ops vmlinux EXPORT_SYMBOL
-+0xf202c5cb radix_tree_insert vmlinux EXPORT_SYMBOL
-+0xc59cbc6c vfs_listxattr vmlinux EXPORT_SYMBOL_GPL
-+0x1f01c966 find_get_pages_contig vmlinux EXPORT_SYMBOL
-+0x388f9128 xfrm_state_walk_done vmlinux EXPORT_SYMBOL
-+0xf09c4ca9 qdisc_create_dflt vmlinux EXPORT_SYMBOL
-+0x3dbda9ad uart_add_one_port vmlinux EXPORT_SYMBOL
-+0xee449310 key_put vmlinux EXPORT_SYMBOL
-+0x354798cd bmap vmlinux EXPORT_SYMBOL
-+0xe2fae716 kmemdup vmlinux EXPORT_SYMBOL
-+0x3f629ad2 __blocking_notifier_call_chain vmlinux EXPORT_SYMBOL_GPL
-+0xc6314004 _copy_from_pages vmlinux EXPORT_SYMBOL_GPL
-+0xcf901697 __strnlen_user vmlinux EXPORT_SYMBOL
-+0x50ff1361 nf_conntrack_alloc net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x1445f5e0 tcp_register_congestion_control vmlinux EXPORT_SYMBOL_GPL
-+0xbe130622 tcp_gro_complete vmlinux EXPORT_SYMBOL
-+0x4d974b9c register_sysrq_key vmlinux EXPORT_SYMBOL
-+0x77747da3 timerqueue_add vmlinux EXPORT_SYMBOL_GPL
-+0x481b8361 sync_filesystem vmlinux EXPORT_SYMBOL_GPL
-+0x15c3f98b tcp_connect vmlinux EXPORT_SYMBOL
-+0xdce0a469 neigh_table_clear vmlinux EXPORT_SYMBOL
-+0xb185dff3 of_phy_find_device vmlinux EXPORT_SYMBOL
-+0x89f238f8 thermal_zone_bind_cooling_device vmlinux EXPORT_SYMBOL
-+0x7c3b0956 do_munmap vmlinux EXPORT_SYMBOL
-+0xd05dc2a3 xfrm_aalg_get_byname vmlinux EXPORT_SYMBOL_GPL
-+0x2ebf2b40 xfrm_state_flush vmlinux EXPORT_SYMBOL
-+0x5fd6befa mmc_align_data_size vmlinux EXPORT_SYMBOL
-+0xd2fd47b5 pci_fixup_device vmlinux EXPORT_SYMBOL
-+0xd6e34b40 fat_flush_inodes vmlinux EXPORT_SYMBOL_GPL
-+0xbdf53fa0 xfrm_find_acq_byseq vmlinux EXPORT_SYMBOL
-+0xee328371 xfrm_policy_unregister_afinfo vmlinux EXPORT_SYMBOL
-+0x06aee4ce __rtnl_af_register vmlinux EXPORT_SYMBOL_GPL
-+0x09c55cec schedule_timeout_interruptible vmlinux EXPORT_SYMBOL
-+0x1ace138d bitmap_allocate_region vmlinux EXPORT_SYMBOL
-+0x250113b4 memory_read_from_buffer vmlinux EXPORT_SYMBOL
-+0xbb5d343d xfrm_get_acqseq vmlinux EXPORT_SYMBOL
-+0x33deca5d __scsi_iterate_devices vmlinux EXPORT_SYMBOL
-+0xa94aefc1 svc_reserve vmlinux EXPORT_SYMBOL_GPL
-+0x6709e159 spi_register_driver vmlinux EXPORT_SYMBOL_GPL
-+0xb03b00cd platform_bus vmlinux EXPORT_SYMBOL_GPL
-+0xe92bef79 blk_queue_bounce_limit vmlinux EXPORT_SYMBOL
-+0x7c543650 netpoll_setup vmlinux EXPORT_SYMBOL
-+0xc6ef7368 skb_abort_seq_read vmlinux EXPORT_SYMBOL
-+0x2b0ba2b0 scsi_sense_desc_find vmlinux EXPORT_SYMBOL
-+0xe197c70b journal_destroy vmlinux EXPORT_SYMBOL
-+0xef33727a journal_restart vmlinux EXPORT_SYMBOL
-+0x5857b225 ioread16_rep vmlinux EXPORT_SYMBOL
-+0x251c3936 inet6_ioctl vmlinux EXPORT_SYMBOL
-+0x91fbfe0b tcp_getsockopt vmlinux EXPORT_SYMBOL
-+0x1a4fb9e4 tcp_setsockopt vmlinux EXPORT_SYMBOL
-+0x6d346876 rtnl_unicast vmlinux EXPORT_SYMBOL
-+0x03564dce alloc_disk_node vmlinux EXPORT_SYMBOL
-+0x8949858b schedule_work vmlinux EXPORT_SYMBOL
-+0x503b8f3e dequeue_signal vmlinux EXPORT_SYMBOL_GPL
-+0x91279f07 __rtnl_af_unregister vmlinux EXPORT_SYMBOL_GPL
-+0xc8d078df skb_gro_reset_offset vmlinux EXPORT_SYMBOL
-+0xb93672bb sysdev_driver_unregister vmlinux EXPORT_SYMBOL_GPL
-+0xc553e282 crypto_ablkcipher_type vmlinux EXPORT_SYMBOL_GPL
-+0x405b9539 ip6t_register_table net/ipv6/netfilter/ip6_tables EXPORT_SYMBOL
-+0x5228f707 crypto_tfm_in_queue vmlinux EXPORT_SYMBOL_GPL
-+0x8133f7e5 fget_raw vmlinux EXPORT_SYMBOL
-+0x30301151 atomic_notifier_call_chain vmlinux EXPORT_SYMBOL_GPL
-+0xcb3c7b08 spi_add_device vmlinux EXPORT_SYMBOL_GPL
-+0xfc02b7ad sysctl_tcp_wmem vmlinux EXPORT_SYMBOL
-+0xb075d9fd nf_unregister_hook vmlinux EXPORT_SYMBOL
-+0x9c723b65 napi_frags_skb vmlinux EXPORT_SYMBOL
-+0xe5f91be5 dev_change_net_namespace vmlinux EXPORT_SYMBOL_GPL
-+0xd0243795 unregister_mtd_user vmlinux EXPORT_SYMBOL_GPL
-+0xc63a5ea9 blk_queue_flush_queueable vmlinux EXPORT_SYMBOL_GPL
-+0xa6c79ad9 blk_queue_rq_timeout vmlinux EXPORT_SYMBOL_GPL
-+0x04f27610 xdr_init_decode_pages vmlinux EXPORT_SYMBOL_GPL
-+0x39a0825d tcp_twsk_destructor vmlinux EXPORT_SYMBOL_GPL
-+0xc363ac9f scm_detach_fds vmlinux EXPORT_SYMBOL
-+0x1bab249b rtc_ktime_to_tm vmlinux EXPORT_SYMBOL_GPL
-+0x7d7fd860 usb_stor_pre_reset vmlinux EXPORT_SYMBOL_GPL
-+0x50c8b1e3 put_pid vmlinux EXPORT_SYMBOL_GPL
-+0xa77ad493 driver_find_device vmlinux EXPORT_SYMBOL_GPL
-+0x58918a30 posix_clock_register vmlinux EXPORT_SYMBOL_GPL
-+0xcc4bd58a __par_io_config_pin vmlinux EXPORT_SYMBOL
-+0xc35e28f7 llc_sap_list_lock vmlinux EXPORT_SYMBOL
-+0xa03ef198 blk_get_request vmlinux EXPORT_SYMBOL
-+0x6a3e01d7 pci_read_irq_line vmlinux EXPORT_SYMBOL
-+0x6e7474fc xfrm_ealg_get_byid vmlinux EXPORT_SYMBOL_GPL
-+0x71dc9998 crypto_il_tab vmlinux EXPORT_SYMBOL_GPL
-+0x0cc1e40f crypto_it_tab vmlinux EXPORT_SYMBOL_GPL
-+0x3dc916b6 crypto_fl_tab vmlinux EXPORT_SYMBOL_GPL
-+0x40d46b21 crypto_ft_tab vmlinux EXPORT_SYMBOL_GPL
-+0x4678aa19 down_timeout vmlinux EXPORT_SYMBOL
-+0xd2d0e6b4 nfnetlink_has_listeners net/netfilter/nfnetlink EXPORT_SYMBOL_GPL
-+0x3bd1b1f6 msecs_to_jiffies vmlinux EXPORT_SYMBOL
-+0xce06503d misc_deregister vmlinux EXPORT_SYMBOL
-+0xd03a6957 blkdev_fsync vmlinux EXPORT_SYMBOL
-+0x5f945856 lookup_one_len vmlinux EXPORT_SYMBOL
-+0x7e50cea1 relay_buf_full vmlinux EXPORT_SYMBOL_GPL
-+0x6437bd2e inet6_bind vmlinux EXPORT_SYMBOL
-+0x3e45e9ff register_inetaddr_notifier vmlinux EXPORT_SYMBOL
-+0xa1f0bf08 atomic_dec_and_mutex_lock vmlinux EXPORT_SYMBOL
-+0x0de06988 cpu_first_thread_of_core vmlinux EXPORT_SYMBOL_GPL
-+0xc5338f4a devres_add vmlinux EXPORT_SYMBOL_GPL
-+0xcacda582 devres_get vmlinux EXPORT_SYMBOL_GPL
-+0x43e83ea6 journal_wipe vmlinux EXPORT_SYMBOL
-+0x8fc5394e pci_set_mwi vmlinux EXPORT_SYMBOL
-+0xdce39544 sync_inodes_sb vmlinux EXPORT_SYMBOL
-+0x7485e15e unregister_chrdev_region vmlinux EXPORT_SYMBOL
-+0x7e25ca93 generic_writepages vmlinux EXPORT_SYMBOL
-+0x9d13ddee register_8022_client vmlinux EXPORT_SYMBOL
-+0x3847c175 gpiochip_is_requested vmlinux EXPORT_SYMBOL_GPL
-+0xf1cf3036 blk_set_default_limits vmlinux EXPORT_SYMBOL
-+0x861bbc41 blk_init_allocated_queue vmlinux EXPORT_SYMBOL
-+0xe7c5e070 rtnl_register vmlinux EXPORT_SYMBOL_GPL
-+0x58f81e73 lookup_bdev vmlinux EXPORT_SYMBOL
-+0x0ef20db1 kernstart_addr vmlinux EXPORT_SYMBOL
-+0xe484e35f ioread32 vmlinux EXPORT_SYMBOL
-+0xdc732024 irq_stat vmlinux EXPORT_SYMBOL
-+0x88632b55 raw_seq_stop vmlinux EXPORT_SYMBOL_GPL
-+0x1087ecc8 gnet_stats_copy_basic vmlinux EXPORT_SYMBOL
-+0xfe35aa4a percpu_counter_destroy vmlinux EXPORT_SYMBOL
-+0xa974f717 create_mnt_ns vmlinux EXPORT_SYMBOL
-+0xaf8e5276 vm_map_ram vmlinux EXPORT_SYMBOL
-+0x7b82dc37 filemap_fdatawrite_range vmlinux EXPORT_SYMBOL
-+0xa6cf1ffb inet_sendmsg vmlinux EXPORT_SYMBOL
-+0xa60ddb99 ip_cmsg_recv vmlinux EXPORT_SYMBOL
-+0xb77bbb6e hidinput_report_event vmlinux EXPORT_SYMBOL_GPL
-+0x397ef9ad crypto_alg_sem vmlinux EXPORT_SYMBOL_GPL
-+0x3e2af9cd bio_sector_offset vmlinux EXPORT_SYMBOL
-+0x2bc61da1 program_check_exception vmlinux EXPORT_SYMBOL
-+0xa4beec26 rpc_call_async vmlinux EXPORT_SYMBOL_GPL
-+0xed312eb2 pci_unblock_user_cfg_access vmlinux EXPORT_SYMBOL_GPL
-+0x79ac1dd3 cpu_sibling_map vmlinux EXPORT_SYMBOL
-+0x760b437a unregister_inetaddr_notifier vmlinux EXPORT_SYMBOL
-+0x6f707520 unregister_exec_domain vmlinux EXPORT_SYMBOL
-+0x262e837a nobh_write_begin vmlinux EXPORT_SYMBOL
-+0xd2cd5568 interruptible_sleep_on_timeout vmlinux EXPORT_SYMBOL
-+0xbcdd82e7 netlink_ack vmlinux EXPORT_SYMBOL
-+0x4b24bd8a sock_no_bind vmlinux EXPORT_SYMBOL
-+0x29080e5d sock_get_timestamp vmlinux EXPORT_SYMBOL
-+0x4211c3c1 zlib_inflateInit2 vmlinux EXPORT_SYMBOL
-+0x8fc7f839 param_set_charp vmlinux EXPORT_SYMBOL
-+0xb60b5707 of_i8042_aux_irq vmlinux EXPORT_SYMBOL_GPL
-+0x9dbbba05 bio_free vmlinux EXPORT_SYMBOL
-+0xef1c781c vid_which_vrm drivers/hwmon/hwmon-vid EXPORT_SYMBOL
-+0x6bdcfd99 qdisc_class_hash_remove vmlinux EXPORT_SYMBOL
-+0x5e59780b dmam_alloc_noncoherent vmlinux EXPORT_SYMBOL
-+0x495b01eb transport_destroy_device vmlinux EXPORT_SYMBOL_GPL
-+0x37179733 tty_unregister_device vmlinux EXPORT_SYMBOL
-+0xbf8ba54a vprintk vmlinux EXPORT_SYMBOL
-+0x2e2ce9e0 sysctl_tcp_syncookies vmlinux EXPORT_SYMBOL
-+0xcb40eb53 tcp_poll vmlinux EXPORT_SYMBOL
-+0x2482e688 vsprintf vmlinux EXPORT_SYMBOL
-+0x3d055d0f generic_splice_sendpage vmlinux EXPORT_SYMBOL
-+0xdda593ad attribute_container_find_class_device vmlinux EXPORT_SYMBOL_GPL
-+0x0b92397e register_key_type vmlinux EXPORT_SYMBOL
-+0xeaea2b74 grab_cache_page_write_begin vmlinux EXPORT_SYMBOL
-+0xc2f8a90a rt_mutex_lock_interruptible vmlinux EXPORT_SYMBOL_GPL
-+0x598ee3d1 cpu_add_dev_attr_group vmlinux EXPORT_SYMBOL_GPL
-+0x10e1bae1 __mtd_next_device vmlinux EXPORT_SYMBOL_GPL
-+0xc62f6317 class_create_file vmlinux EXPORT_SYMBOL_GPL
-+0x0cae232b utf16s_to_utf8s vmlinux EXPORT_SYMBOL
-+0x2f15682e __put_task_struct vmlinux EXPORT_SYMBOL_GPL
-+0xcd86c87f __cond_resched_lock vmlinux EXPORT_SYMBOL
-+0x1a6a10dd rpc_get_mount vmlinux EXPORT_SYMBOL_GPL
-+0x854bdca7 unregister_pernet_subsys vmlinux EXPORT_SYMBOL_GPL
-+0x13bbe2f0 wait_on_sync_kiocb vmlinux EXPORT_SYMBOL
-+0x7c39cb83 simple_write_begin vmlinux EXPORT_SYMBOL
-+0x219087eb bdi_set_max_ratio vmlinux EXPORT_SYMBOL
-+0x53bc4229 redirty_page_for_writepage vmlinux EXPORT_SYMBOL
-+0x8ffe7e89 nf_conntrack_htable_size net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x44427913 netdev_emerg vmlinux EXPORT_SYMBOL
-+0x610b8968 sk_stream_kill_queues vmlinux EXPORT_SYMBOL
-+0xe151f34a dev_set_name vmlinux EXPORT_SYMBOL_GPL
-+0xeb37101c audit_log_end vmlinux EXPORT_SYMBOL
-+0x6d40a921 need_ipv4_conntrack net/ipv4/netfilter/nf_conntrack_ipv4 EXPORT_SYMBOL_GPL
-+0xf8bb5353 __sk_dst_check vmlinux EXPORT_SYMBOL
-+0x65dbe5b6 usb_queue_reset_device vmlinux EXPORT_SYMBOL_GPL
-+0xd7592f72 cfi_varsize_frob vmlinux EXPORT_SYMBOL
-+0xbfff4b41 elv_register_queue vmlinux EXPORT_SYMBOL
-+0x716265c7 debugfs_initialized vmlinux EXPORT_SYMBOL_GPL
-+0x73564277 __timecompare_update vmlinux EXPORT_SYMBOL_GPL
-+0x003ed69a __kfifo_dma_in_prepare vmlinux EXPORT_SYMBOL
-+0x6db428e3 cpu_core_map vmlinux EXPORT_SYMBOL
-+0x9bf6538b usb_interrupt_msg vmlinux EXPORT_SYMBOL_GPL
-+0xe30d26f6 bus_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x4c759827 byte_rev_table vmlinux EXPORT_SYMBOL_GPL
-+0x964d2406 __elv_add_request vmlinux EXPORT_SYMBOL
-+0x37305e47 skcipher_geniv_init vmlinux EXPORT_SYMBOL_GPL
-+0x5e3c72b7 set_bh_page vmlinux EXPORT_SYMBOL
-+0x01a5485d crypto_destroy_tfm vmlinux EXPORT_SYMBOL_GPL
-+0x73331311 filemap_fault vmlinux EXPORT_SYMBOL
-+0xe914e41e strcpy vmlinux EXPORT_SYMBOL
-+0x1bc3edc2 usb_stor_sense_invalidCDB vmlinux EXPORT_SYMBOL_GPL
-+0xa1076c97 tty_pair_get_tty vmlinux EXPORT_SYMBOL
-+0xa7d098e3 tty_pair_get_pty vmlinux EXPORT_SYMBOL
-+0xa0ada1ea key_payload_reserve vmlinux EXPORT_SYMBOL
-+0x9da8160b blocking_notifier_chain_register vmlinux EXPORT_SYMBOL_GPL
-+0x462da1bf nf_ct_insert_dying_list net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x2e4f42a4 skb_unlink vmlinux EXPORT_SYMBOL
-+0x4a9e6b51 crypto_register_template vmlinux EXPORT_SYMBOL_GPL
-+0xaab9f7e7 node_states vmlinux EXPORT_SYMBOL
-+0x6a5fb566 rcu_sched_force_quiescent_state vmlinux EXPORT_SYMBOL_GPL
-+0x6cc37c70 of_property_read_u32_array vmlinux EXPORT_SYMBOL_GPL
-+0xbf1cc04b tty_termios_encode_baud_rate vmlinux EXPORT_SYMBOL_GPL
-+0x0199224f inet_csk_delete_keepalive_timer vmlinux EXPORT_SYMBOL
-+0x47776c55 of_parse_phandle vmlinux EXPORT_SYMBOL
-+0x10daa86c usb_hcd_pci_shutdown vmlinux EXPORT_SYMBOL_GPL
-+0x6b25bb62 pci_bus_set_ops vmlinux EXPORT_SYMBOL
-+0x24518ffa xfrm_state_register_afinfo vmlinux EXPORT_SYMBOL
-+0xd2e16256 usb_register_device_driver vmlinux EXPORT_SYMBOL_GPL
-+0x8df7d3c5 subsys_interface_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x9ed6b52d kmem_cache_size vmlinux EXPORT_SYMBOL
-+0x8be716ab inet_ioctl vmlinux EXPORT_SYMBOL
-+0x8a1f2ce8 of_device_register vmlinux EXPORT_SYMBOL
-+0x0c8c9e99 scsi_show_extd_sense vmlinux EXPORT_SYMBOL
-+0x503084b0 __pci_reset_function vmlinux EXPORT_SYMBOL_GPL
-+0x5c4260ae kobject_get_path vmlinux EXPORT_SYMBOL_GPL
-+0xc55c2a9d inode_sb_list_lock vmlinux EXPORT_SYMBOL_GPL
-+0xd8ce7e67 clocksource_register vmlinux EXPORT_SYMBOL
-+0x66dc52b5 xt_register_target vmlinux EXPORT_SYMBOL
-+0x0a882a67 ping_prot vmlinux EXPORT_SYMBOL
-+0x814e7730 nf_ct_destroy vmlinux EXPORT_SYMBOL
-+0xbceeac4f nf_unregister_hooks vmlinux EXPORT_SYMBOL
-+0x1db99742 device_create_vargs vmlinux EXPORT_SYMBOL_GPL
-+0x3668dd26 tty_port_hangup vmlinux EXPORT_SYMBOL
-+0x8810ad5e crypto_xor vmlinux EXPORT_SYMBOL_GPL
-+0x45bf1ff3 crypto_inc vmlinux EXPORT_SYMBOL_GPL
-+0x8f784e32 cpu_bit_bitmap vmlinux EXPORT_SYMBOL_GPL
-+0x35448c65 rpc_free_iostats vmlinux EXPORT_SYMBOL_GPL
-+0xede6b327 rpc_destroy_wait_queue vmlinux EXPORT_SYMBOL_GPL
-+0x6eea229d svcauth_unix_purge vmlinux EXPORT_SYMBOL_GPL
-+0xb286adee usb_hcd_poll_rh_status vmlinux EXPORT_SYMBOL_GPL
-+0xfa4b3895 device_find_child vmlinux EXPORT_SYMBOL_GPL
-+0xe5404b68 fat_getattr vmlinux EXPORT_SYMBOL_GPL
-+0xda5c059a fat_setattr vmlinux EXPORT_SYMBOL_GPL
-+0x7a43615e generic_read_dir vmlinux EXPORT_SYMBOL
-+0x88afffc0 dentry_unhash vmlinux EXPORT_SYMBOL
-+0xe007de41 kallsyms_lookup_name vmlinux EXPORT_SYMBOL_GPL
-+0xe99d91ed validate_sp vmlinux EXPORT_SYMBOL
-+0xf0933596 xprt_lookup_rqst vmlinux EXPORT_SYMBOL_GPL
-+0xfade055f do_splice_to vmlinux EXPORT_SYMBOL_GPL
-+0xda28eb83 writeback_inodes_sb_if_idle vmlinux EXPORT_SYMBOL
-+0xdf86ee64 truncate_pagecache vmlinux EXPORT_SYMBOL
-+0x26b71fb4 ring_buffer_time_stamp vmlinux EXPORT_SYMBOL_GPL
-+0x5fcdec5d xfrm_ealg_get_byidx vmlinux EXPORT_SYMBOL_GPL
-+0xdf7531cb sock_no_shutdown vmlinux EXPORT_SYMBOL
-+0x2764e8b7 of_device_unregister vmlinux EXPORT_SYMBOL
-+0xf5f63ca5 __generic_block_fiemap vmlinux EXPORT_SYMBOL
-+0xb1acbcce rcu_barrier_sched vmlinux EXPORT_SYMBOL_GPL
-+0xdc2519e0 param_set_ulong vmlinux EXPORT_SYMBOL
-+0xee2d0fc7 _local_bh_enable vmlinux EXPORT_SYMBOL
-+0x36b0e732 try_wait_for_completion vmlinux EXPORT_SYMBOL
-+0x80dfc988 nf_ct_expect_alloc net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0xc4bf0a92 sysfs_unmerge_group vmlinux EXPORT_SYMBOL_GPL
-+0xcbf0b653 cpu_active_mask vmlinux EXPORT_SYMBOL
-+0x4498d5aa bus_find_device_by_name vmlinux EXPORT_SYMBOL_GPL
-+0x29b96a8a inet_peer_xrlim_allow vmlinux EXPORT_SYMBOL
-+0x2a23b66d nf_ct_attach vmlinux EXPORT_SYMBOL
-+0xe5ed5467 xfrm_policy_walk_init vmlinux EXPORT_SYMBOL
-+0xb0f3f389 driver_attach vmlinux EXPORT_SYMBOL_GPL
-+0x0dbd5a25 textsearch_register vmlinux EXPORT_SYMBOL
-+0x74baf17a tracing_is_on vmlinux EXPORT_SYMBOL_GPL
-+0x381a798a setup_max_cpus vmlinux EXPORT_SYMBOL
-+0x5bfbe895 commit_creds vmlinux EXPORT_SYMBOL
-+0xd772ed24 __nf_ct_expect_find net/netfilter/nf_conntrack EXPORT_SYMBOL_GPL
-+0x5db93a7c platform_device_register vmlinux EXPORT_SYMBOL_GPL
-+0x5934392b fb_register_client vmlinux EXPORT_SYMBOL
-+0xad0413d4 match_hex vmlinux EXPORT_SYMBOL
-+0x0ffce14a __inet_lookup_listener vmlinux EXPORT_SYMBOL_GPL
-+0x79eb7536 nf_unregister_sockopt vmlinux EXPORT_SYMBOL
-+0x63f2715f __skb_get_rxhash vmlinux EXPORT_SYMBOL
-+0x6029f865 skb_realloc_headroom vmlinux EXPORT_SYMBOL
-+0x183abba7 platform_device_unregister vmlinux EXPORT_SYMBOL_GPL
-+0x4373b84f serial8250_set_isa_configurator vmlinux EXPORT_SYMBOL
-+0x9e38fbad generic_pipe_buf_map vmlinux EXPORT_SYMBOL
-+0xba1338f3 generic_pipe_buf_get vmlinux EXPORT_SYMBOL
-+0xb4b61245 ipv6_find_hdr net/ipv6/netfilter/ip6_tables EXPORT_SYMBOL
-+0x2a14e5c1 uhci_reset_hc vmlinux EXPORT_SYMBOL_GPL
-+0xfd1f0623 tty_port_close_end vmlinux EXPORT_SYMBOL
-+0x77df0847 __set_personality vmlinux EXPORT_SYMBOL
-+0x0e3bcc66 blkcipher_walk_done vmlinux EXPORT_SYMBOL_GPL
-+0x731705d7 page_readlink vmlinux EXPORT_SYMBOL
-+0xaa181411 account_page_writeback vmlinux EXPORT_SYMBOL
-+0x6976522d nf_unregister_afinfo vmlinux EXPORT_SYMBOL_GPL
-+0xf5eb86ea blk_verify_command vmlinux EXPORT_SYMBOL
-+0xc499ae1e kstrdup vmlinux EXPORT_SYMBOL
-+0x0e8f30f6 _raw_write_lock_irq vmlinux EXPORT_SYMBOL
-+0x89da4432 of_iomap vmlinux EXPORT_SYMBOL
-+0x81a07f4e _atomic_dec_and_lock vmlinux EXPORT_SYMBOL
-+0xea7987f1 key_update vmlinux EXPORT_SYMBOL
-+0xe18ba8e7 xfrm_register_km vmlinux EXPORT_SYMBOL
-+0x31a77643 ip_mc_dec_group vmlinux EXPORT_SYMBOL
-+0x733c3b54 kasprintf vmlinux EXPORT_SYMBOL
-+0x2a24f9c2 simple_rename vmlinux EXPORT_SYMBOL
-+0xb2729dbd vfs_setxattr vmlinux EXPORT_SYMBOL_GPL
-+0x7d012ee7 vfs_getxattr vmlinux EXPORT_SYMBOL_GPL
-+0xa3dd3ddd sock_init_data vmlinux EXPORT_SYMBOL
-+0xb2d2b9ab tty_set_termios vmlinux EXPORT_SYMBOL_GPL
-+0xe02eb6d0 ring_buffer_commit_overrun_cpu vmlinux EXPORT_SYMBOL_GPL
-+0x3a536bd7 ring_buffer_read_finish vmlinux EXPORT_SYMBOL_GPL
-+0xde48e9ca _raw_spin_lock vmlinux EXPORT_SYMBOL
-+0xba707a78 qe_get_brg_clk vmlinux EXPORT_SYMBOL
-+0xc37dddf0 ip_queue_xmit vmlinux EXPORT_SYMBOL
-+0x715949d4 class_dev_iter_init vmlinux EXPORT_SYMBOL_GPL
-+0x2b2f7e10 pci_get_slot vmlinux EXPORT_SYMBOL
-+0x2eb91dfe scatterwalk_map vmlinux EXPORT_SYMBOL_GPL
-+0x69a0ca7d iowrite16be vmlinux EXPORT_SYMBOL
-+0x6acb973d iowrite32be vmlinux EXPORT_SYMBOL
-+0xf4a2585b km_query vmlinux EXPORT_SYMBOL
-+0xf9ea6336 inet_release vmlinux EXPORT_SYMBOL
-+0x85da4665 blk_queue_start_tag vmlinux EXPORT_SYMBOL
-+0x5549ab6e xprt_alloc vmlinux EXPORT_SYMBOL_GPL
-+0xe9492d51 neigh_create vmlinux EXPORT_SYMBOL
-+0xd3af87a4 usb_stor_CB_transport vmlinux EXPORT_SYMBOL_GPL
-+0x9fce80db fb_notifier_call_chain vmlinux EXPORT_SYMBOL_GPL
-+0x373db350 kstrtoint vmlinux EXPORT_SYMBOL
-+0xdd4a0569 log_start_commit vmlinux EXPORT_SYMBOL
-+0x8f6cee77 __round_jiffies_relative vmlinux EXPORT_SYMBOL_GPL
-+0x002c769b svc_pool_stats_open vmlinux EXPORT_SYMBOL
-+0x536fa1b6 inet_twsk_alloc vmlinux EXPORT_SYMBOL_GPL
-+0x978bfc35 tty_put_char vmlinux EXPORT_SYMBOL_GPL
-+0x037a0cba kfree vmlinux EXPORT_SYMBOL
-+0x5868f579 __rt_mutex_init vmlinux EXPORT_SYMBOL_GPL
-+0x6e545da1 kill_pid_info_as_cred vmlinux EXPORT_SYMBOL_GPL
-+0x17b07df4 vlan_dev_real_dev vmlinux EXPORT_SYMBOL
-+0x3562e58c xfrm_state_delete vmlinux EXPORT_SYMBOL
-+0xe492a8e1 nf_register_sockopt vmlinux EXPORT_SYMBOL
-+0xbc979fa3 sock_kmalloc vmlinux EXPORT_SYMBOL
-+0xb894926d schedule_work_on vmlinux EXPORT_SYMBOL
-+0xb2c6eb9f pci_lost_interrupt vmlinux EXPORT_SYMBOL
-+0xe7d4daac seq_list_next vmlinux EXPORT_SYMBOL
-+0x538383c0 unregister_inet6addr_notifier vmlinux EXPORT_SYMBOL
-+0x0d3cc82c of_irq_map_one vmlinux EXPORT_SYMBOL_GPL
-+0xa06df9e1 __kfifo_dma_out_finish_r vmlinux EXPORT_SYMBOL
-+0xeb7e4ace ipv6_chk_addr vmlinux EXPORT_SYMBOL
-+0xdf967a1b uart_suspend_port vmlinux EXPORT_SYMBOL
-+0xfb8ca5ae __blkdev_driver_ioctl vmlinux EXPORT_SYMBOL_GPL
-+0x1f020c91 blk_alloc_queue_node vmlinux EXPORT_SYMBOL
-+0xa3fb4a58 scsi_device_resume vmlinux EXPORT_SYMBOL
-+0xafd68c33 flex_array_free vmlinux EXPORT_SYMBOL
-+0xc3fb5b3d blk_queue_flush vmlinux EXPORT_SYMBOL_GPL
-+0x98b9afaa bio_phys_segments vmlinux EXPORT_SYMBOL
-+0xdaa57ec3 totalhigh_pages vmlinux EXPORT_SYMBOL
-+0x540c4404 ipv6_find_tlv vmlinux EXPORT_SYMBOL_GPL
-+0xfb3ac86b neigh_changeaddr vmlinux EXPORT_SYMBOL
-+0xd59bf139 skb_recycle_check vmlinux EXPORT_SYMBOL
-+0xa120d33c tty_unregister_ldisc vmlinux EXPORT_SYMBOL
-+0x7dc5d0b6 crypto_unregister_notifier vmlinux EXPORT_SYMBOL_GPL
-+0x9c09632d invalidate_inode_pages2 vmlinux EXPORT_SYMBOL_GPL
-+0x317ce92f ipt_do_table net/ipv4/netfilter/ip_tables EXPORT_SYMBOL
-+0xd726d95c scsi_calculate_bounce_limit vmlinux EXPORT_SYMBOL
-+0x798959ae kmem_cache_destroy vmlinux EXPORT_SYMBOL
-+0x3778ec77 add_to_page_cache_locked vmlinux EXPORT_SYMBOL
-+0x4e109192 ring_buffer_entries vmlinux EXPORT_SYMBOL_GPL
-+0x6d054375 xfrm_prepare_input vmlinux EXPORT_SYMBOL
-+0x4333cc58 xt_find_target vmlinux EXPORT_SYMBOL
-+0xb1faff50 usb_serial_disconnect vmlinux EXPORT_SYMBOL_GPL
-+0xa1ba2fdb vfsmount_lock_global_lock vmlinux EXPORT_SYMBOL
-+0x16947341 rpc_proc_register vmlinux EXPORT_SYMBOL_GPL
-+0x6c7c7b9a rpc_queue_empty vmlinux EXPORT_SYMBOL_GPL
-+0x6c394758 phy_mii_ioctl vmlinux EXPORT_SYMBOL
-+0x905bba18 vm_event_states vmlinux EXPORT_SYMBOL
-+0x9bce482f __release_region vmlinux EXPORT_SYMBOL
-+0x43a01f90 complete_all vmlinux EXPORT_SYMBOL
-+0xf020d96e tty_free_termios vmlinux EXPORT_SYMBOL
-+0x347013de nla_validate vmlinux EXPORT_SYMBOL
-+0x27adac45 bdi_register vmlinux EXPORT_SYMBOL
-+0xc5322a9c xprt_alloc_slot vmlinux EXPORT_SYMBOL_GPL
-+0x9eb0209a inet_csk_clear_xmit_timers vmlinux EXPORT_SYMBOL
-+0x7129e5f8 hex_asc vmlinux EXPORT_SYMBOL
-+0x7dc2f75e fat_time_unix2fat vmlinux EXPORT_SYMBOL_GPL
-+0x09dfe73d nf_nat_follow_master net/ipv4/netfilter/nf_nat EXPORT_SYMBOL
-+0x8ef99ed3 tty_get_pgrp vmlinux EXPORT_SYMBOL_GPL
-+0x2aa0e4fc strncasecmp vmlinux EXPORT_SYMBOL
-+0x53301e75 default_llseek vmlinux EXPORT_SYMBOL
-+0x5e0120a8 ring_buffer_oldest_event_ts vmlinux EXPORT_SYMBOL_GPL
-+0xcb3334bb tcp_read_sock vmlinux EXPORT_SYMBOL
-+0xfa741e99 sdhci_pltfm_free vmlinux EXPORT_SYMBOL_GPL
-+0x28535cb6 rpc_peeraddr vmlinux EXPORT_SYMBOL_GPL
-+0x57958d5a ip_fragment vmlinux EXPORT_SYMBOL
-+0x9aa9a810 scsi_eh_prep_cmnd vmlinux EXPORT_SYMBOL
-+0x4997d11c pci_set_cacheline_size vmlinux EXPORT_SYMBOL_GPL
-+0x815b5dd4 match_octal vmlinux EXPORT_SYMBOL
-+0x99baa259 bio_map_kern vmlinux EXPORT_SYMBOL
-+0x43969dbe rh_alloc_fixed vmlinux EXPORT_SYMBOL_GPL
-+0x531c3179 xt_register_targets vmlinux EXPORT_SYMBOL
-+0xf88eee18 i2c_smbus_write_byte vmlinux EXPORT_SYMBOL
-+0xf77ff57d scsi_register_driver vmlinux EXPORT_SYMBOL
-+0x82e96562 vfs_fsync vmlinux EXPORT_SYMBOL
-+0x86acb6ae poll_freewait vmlinux EXPORT_SYMBOL
-+0xb3a307c6 si_meminfo vmlinux EXPORT_SYMBOL
-+0x7835cfc7 kthread_create_on_node vmlinux EXPORT_SYMBOL
-+0x5e95b1cd current_umask vmlinux EXPORT_SYMBOL
-+0xbd40cacd get_fs_type vmlinux EXPORT_SYMBOL
-+0x377a3400 ref_module vmlinux EXPORT_SYMBOL_GPL
-+0xb44478a6 qe_pin_free vmlinux EXPORT_SYMBOL
-+0x8f56dfc6 nf_nat_pptp_hook_outbound net/netfilter/nf_conntrack_pptp EXPORT_SYMBOL_GPL
-+0x36e46f38 tty_driver_kref_put vmlinux EXPORT_SYMBOL
-+0x8e26fda2 sock_prot_inuse_get vmlinux EXPORT_SYMBOL_GPL
-+0x932e22fc scsi_host_set_state vmlinux EXPORT_SYMBOL
-+0x70b879e3 aead_geniv_init vmlinux EXPORT_SYMBOL_GPL
-+0xf9d89d7c generic_write_end vmlinux EXPORT_SYMBOL
-+0x362e23ec call_rcu_bh vmlinux EXPORT_SYMBOL_GPL
-+0xbf9be642 devm_request_threaded_irq vmlinux EXPORT_SYMBOL
-+0x67955ce6 profile_hits vmlinux EXPORT_SYMBOL_GPL
-+0xcf764d46 __vlan_find_dev_deep vmlinux EXPORT_SYMBOL
-+0x7d62fe80 of_mm_gpiochip_add vmlinux EXPORT_SYMBOL
-+0x1c30dd9c genphy_config_aneg vmlinux EXPORT_SYMBOL
-+0x95ad803f blk_start_queue vmlinux EXPORT_SYMBOL
-+0x9c9c6a5a journal_check_used_features vmlinux EXPORT_SYMBOL
-+0xe0dd2be0 bio_copy_user vmlinux EXPORT_SYMBOL
-+0x7a4497db kzfree vmlinux EXPORT_SYMBOL
-+0xc197d453 arpt_unregister_table net/ipv4/netfilter/arp_tables EXPORT_SYMBOL
-+0x2bbf27ee sk_filter vmlinux EXPORT_SYMBOL
-+0xa8f59416 gpio_direction_output vmlinux EXPORT_SYMBOL_GPL
-+0x92e682eb generic_removexattr vmlinux EXPORT_SYMBOL
-+0x83b88ae3 deactivate_super vmlinux EXPORT_SYMBOL
-+0xa924a7ed vmap vmlinux EXPORT_SYMBOL
-+0x31f0bb78 __kmap_atomic_idx vmlinux EXPORT_SYMBOL
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/debian-cumulus-controlfiles.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/debian-cumulus-controlfiles.patch
deleted file mode 100644
index 1d7fee1f..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/debian-cumulus-controlfiles.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-Patch for debian post install script
-
-diff --git a/cumulus/control.linux-headers b/cumulus/control.linux-headers
-new file mode 100644
-index 0000000..6d999dd
---- /dev/null
-+++ b/cumulus/control.linux-headers
-@@ -0,0 +1,5 @@
-+Package: linux-headers
-+Version: =V
-+Maintainer: support@cumulusnetworks.com
-+Architecture: =A
-+Description: Cumulus Linux kernel headers
-diff --git a/cumulus/control.linux-image b/cumulus/control.linux-image
-new file mode 100644
-index 0000000..03fccc4
---- /dev/null
-+++ b/cumulus/control.linux-image
-@@ -0,0 +1,5 @@
-+Package: linux-image
-+Version: =V
-+Maintainer: support@cumulusnetworks.com
-+Architecture: =A
-+Description: Cumulus Linux kernel
-diff --git a/cumulus/control.linux-libc-dev b/cumulus/control.linux-libc-dev
-new file mode 100644
-index 0000000..4ae15ce
---- /dev/null
-+++ b/cumulus/control.linux-libc-dev
-@@ -0,0 +1,12 @@
-+Package: linux-libc-dev
-+Source: linux-upstream
-+Version: =V
-+Architecture: =A
-+Maintainer: cumulus
-+Provides: linux-kernel-headers
-+Section: devel
-+Priority: optional
-+Homepage: http://www.kernel.org/
-+Description: Linux support headers for userspace development
-+ This package provides userspaces headers from the Linux kernel. These headers
-+ are used by the installed headers for GNU glibc and other system libraries.
-diff --git a/cumulus/etc/kernel/postinst.d/update-cumulus b/cumulus/etc/kernel/postinst.d/update-cumulus
-new file mode 100755
-index 0000000..0333980
---- /dev/null
-+++ b/cumulus/etc/kernel/postinst.d/update-cumulus
-@@ -0,0 +1,52 @@
-+#!/bin/sh -e
-+
-+version="$1"
-+
-+# exit if we dont need to update the kernel and initrd
-+if [ "$UPDATE_CUMULUS" = 'No' ]; then
-+ exit 0
-+fi
-+
-+. /usr/share/cumulus/img/functions
-+
-+# passing the kernel version is required
-+if [ -z "${version}" ]; then
-+ echo >&2 "W: cumulus-kernel: ${DPKG_MAINTSCRIPT_PACKAGE:-kernel package} did not pass a version number"
-+ exit 2
-+fi
-+
-+bootdir="/boot"
-+kernel_newimg_src="${bootdir}/vmlinuz-${version}"
-+initrd_newimg_src="${bootdir}/initrd.img-${version}"
-+
-+if [ ! -e "$kernel_newimg_src" ]; then
-+ echo >&2 "W: cumulus-kernel: ${DPKG_MAINTSCRIPT_PACKAGE:-kernel package} cannot find kernel image"
-+ exit 2
-+fi
-+
-+if [ ! -e "$initrd_newimg_src" ]; then
-+ echo >&2 "W: cumulus-kernel: ${DPKG_MAINTSCRIPT_PACKAGE:-kernel package} cannot find initrd image"
-+ exit 2
-+fi
-+
-+cl_check_env root-priv
-+
-+currslot=${slot_prefix}${active}
-+kernel_oldimg=${bootdir}/${kernel_prefix}vmlinuz-*-${currslot}
-+initrd_oldimg=${bootdir}/${kernel_prefix}initrd.img-*-${currslot}
-+
-+kernel_newimg_dst=${bootdir}/${kernel_prefix}vmlinuz-${version}-${currslot}
-+initrd_newimg_dst=${bootdir}/${kernel_prefix}initrd.img-${version}-${currslot}
-+
-+#remove existing currslot images
-+rm -f ${kernel_oldimg}
-+rm -f ${initrd_oldimg}
-+
-+# Move kernel/initrd files to the kernel initrd dst files
-+cmd="mv -f $kernel_newimg_src $kernel_newimg_dst"
-+echo "$cmd"
-+$cmd
-+
-+cmd="mv -f $initrd_newimg_src $initrd_newimg_dst"
-+echo "$cmd"
-+$cmd
-diff --git a/cumulus/postinst.linux-image.powerpc b/cumulus/postinst.linux-image.powerpc
-new file mode 100755
-index 0000000..2aabfea
---- /dev/null
-+++ b/cumulus/postinst.linux-image.powerpc
-@@ -0,0 +1,57 @@
-+#!/bin/sh
-+# postinst script for switchd
-+#
-+# see: dh_installdeb(1)
-+
-+set -e
-+
-+# summary of how this script can be called:
-+# * `configure'
-+# * `abort-upgrade'
-+# * `abort-remove' `in-favour'
-+#
-+# * `abort-remove'
-+# * `abort-deconfigure' `in-favour'
-+# `removing'
-+#
-+# for details, see http://www.debian.org/doc/debian-policy/ or
-+# the debian-policy package
-+
-+
-+case "$1" in
-+ configure)
-+ ;;
-+
-+ abort-upgrade|abort-remove|abort-deconfigue)
-+ exit 1
-+ ;;
-+ *)
-+ echo "postinst called with unknown argument \`$1'" >&2
-+ exit 1
-+ ;;
-+esac
-+
-+. /usr/share/cumulus/img/functions
-+
-+install_file=/usr/share/cumulus/.installer/kernel_install.sh
-+kimage_linkname="uImage.itb"
-+kimage_name="uImage-=V-=A.itb"
-+kimage_path="/boot/"$kimage_name
-+
-+if [ -e "/.buildroot" ]; then
-+ cd /boot && ln -sf $kimage_name $kimage_linkname
-+ exit 0
-+fi
-+
-+cl_check_env root-priv
-+slot=$active
-+
-+sh $install_file $kimage_path $slot || {
-+ log_failure_msg "Kernel installtion failed."
-+ log_failure_msg "Problems installing image file."
-+ exit 1
-+}
-+
-+cd /boot && ln -sf $kimage_name $kimage_linkname
-+
-+exit 0
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/debian-cumulus-post-inst.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/debian-cumulus-post-inst.patch
deleted file mode 100644
index b0e357c0..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/debian-cumulus-post-inst.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-Patch for debian post install script
-
-diff --git a/cumulus/postinst b/cumulus/postinst
-new file mode 100755
-index 0000000..6b9ca39
---- /dev/null
-+++ b/cumulus/postinst
-@@ -0,0 +1,52 @@
-+#!/bin/sh
-+# postinst script for switchd
-+#
-+# see: dh_installdeb(1)
-+
-+set -e
-+
-+# summary of how this script can be called:
-+# * `configure'
-+# * `abort-upgrade'
-+# * `abort-remove' `in-favour'
-+#
-+# * `abort-remove'
-+# * `abort-deconfigure' `in-favour'
-+# `removing'
-+#
-+# for details, see http://www.debian.org/doc/debian-policy/ or
-+# the debian-policy package
-+
-+
-+case "$1" in
-+ configure)
-+ ;;
-+
-+ abort-upgrade|abort-remove|abort-deconfigue)
-+ exit 1
-+ ;;
-+ *)
-+ echo "postinst called with unknown argument \`$1'" >&2
-+ exit 1
-+ ;;
-+esac
-+
-+. /usr/share/cumulus/img/functions
-+cl_check_env root-priv
-+
-+install_file=/usr/share/cumulus/.installer/kernel_install.sh
-+slot=$active
-+kimage="/boot/uImage-${arch}.itb"
-+
-+sh $install_file $kimage $slot || {
-+ log_failure_msg "Kernel installtion failed."
-+ log_failure_msg "Problems installing image file."
-+ clean_up 1
-+}
-+
-+# dh_installdeb will replace this with shell code automatically
-+# generated by other debhelper scripts.
-+
-+#DEBHELPER#
-+
-+exit 0
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/debian-postinstall-call-depmod.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/debian-postinstall-call-depmod.patch
deleted file mode 100644
index dae87459..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/debian-postinstall-call-depmod.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Post install hooks need to call depmod to properly load kernel modules after
-reboot.
-
-diff --git a/cumulus/etc/kernel/postinst.d/update-cumulus b/cumulus/etc/kernel/postinst.d/update-cumulus
-index 0333980..cd8d311 100755
---- a/cumulus/etc/kernel/postinst.d/update-cumulus
-+++ b/cumulus/etc/kernel/postinst.d/update-cumulus
-@@ -50,3 +50,5 @@ $cmd
- cmd="mv -f $initrd_newimg_src $initrd_newimg_dst"
- echo "$cmd"
- $cmd
-+
-+depmod -a $version
-diff --git a/cumulus/postinst.linux-image.powerpc b/cumulus/postinst.linux-image.powerpc
-index 2aabfea..fb775d4 100755
---- a/cumulus/postinst.linux-image.powerpc
-+++ b/cumulus/postinst.linux-image.powerpc
-@@ -1,5 +1,5 @@
- #!/bin/sh
--# postinst script for switchd
-+# postinst script for kernel
- #
- # see: dh_installdeb(1)
-
-@@ -54,4 +54,7 @@ sh $install_file $kimage_path $slot || {
-
- cd /boot && ln -sf $kimage_name $kimage_linkname
-
-+echo "depmod -a =V"
-+depmod -a =V
-+
- exit 0
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-adt7470-knob-to-disable-smbus-timeout.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-adt7470-knob-to-disable-smbus-timeout.patch
deleted file mode 100644
index 9efc5fa5..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-adt7470-knob-to-disable-smbus-timeout.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-driver adt7470 add knob to disable smbus timeout feature
-
-The ADT7470 has a configurable feature called "disable SMBUS timeout".
-
-Quoting their data sheet:
-
- The ADT7470 includes an SMBus timeout feature. If there is no SMBus
- activity for more than 31 ms, the ADT7470 assumes that the bus is
- locked and releases the bus. This prevents the device from locking
- or holding the SMBus expecting data. Some SMBus controllers cannot
- handle the SMBus timeout feature, so it can be disabled.
-
-It appears the FSL I2C controller cannot handle this feature. With
-the timeout enabled we see intermittent failures waiting for the bus
-to become ready or for transaction to complete.
-
-This patch adds a configurable option to the device tree. If the
-property "disable-smbus-timeout" exists in the node then the ADT7470
-driver will disable the SMBUS timeout feature.
-
-This way platforms that need to can disable this feature.
-
-diff --git a/drivers/hwmon/adt7470.c b/drivers/hwmon/adt7470.c
-index a9726c1..6ca8aae 100644
---- a/drivers/hwmon/adt7470.c
-+++ b/drivers/hwmon/adt7470.c
-@@ -32,6 +32,7 @@
- #include
- #include
- #include
-+#include
-
- /* Addresses to scan */
- static const unsigned short normal_i2c[] = { 0x2C, 0x2E, 0x2F, I2C_CLIENT_END };
-@@ -48,6 +49,7 @@ static const unsigned short normal_i2c[] = { 0x2C, 0x2E, 0x2F, I2C_CLIENT_END };
- #define ADT7470_REG_PWM_MAX_MAX_ADDR 0x3B
- #define ADT7470_REG_CFG 0x40
- #define ADT7470_FSPD_MASK 0x04
-+#define ADT7470_TODIS_MASK 0x08
- #define ADT7470_REG_ALARM1 0x41
- #define ADT7470_R1T_ALARM 0x01
- #define ADT7470_R2T_ALARM 0x02
-@@ -225,6 +227,14 @@ static void adt7470_init_client(struct i2c_client *client)
- if (reg < 0) {
- dev_err(&client->dev, "cannot read configuration register\n");
- } else {
-+ struct property *pp;
-+ pp = of_find_property(client->dev.of_node,
-+ "disable-smbus-timeout", NULL);
-+ if (pp)
-+ reg |= ADT7470_TODIS_MASK;
-+ else
-+ reg &= ~ADT7470_TODIS_MASK;
-+
- /* start monitoring (and do a self-test) */
- i2c_smbus_write_byte_data(client, ADT7470_REG_CFG, reg | 3);
- }
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-at24-add-i2cblock-disable-flag.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-at24-add-i2cblock-disable-flag.patch
deleted file mode 100644
index 5e709dcb..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-at24-add-i2cblock-disable-flag.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Adds a flag that lets you disable FEATURE_I2C_BLOCK_READ on a device basis.
-
-diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
-index 841631c..67f4e6f 100644
---- a/drivers/misc/eeprom/at24.c
-+++ b/drivers/misc/eeprom/at24.c
-@@ -582,8 +582,9 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id)
- if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
- if (chip.flags & AT24_FLAG_ADDR16) {
- use_smbus = I2C_SMBUS_BYTE_DATA;
-- } else if (i2c_check_functionality(client->adapter,
-- I2C_FUNC_SMBUS_READ_I2C_BLOCK)) {
-+ } else if (!(chip.flags & AT24_FLAG_DISABLE_I2CBLOCK) &&
-+ (i2c_check_functionality(client->adapter,
-+ I2C_FUNC_SMBUS_READ_I2C_BLOCK))) {
- use_smbus = I2C_SMBUS_I2C_BLOCK_DATA;
- } else if (i2c_check_functionality(client->adapter,
- I2C_FUNC_SMBUS_READ_WORD_DATA)) {
-@@ -630,8 +631,9 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id)
- writable = !(chip.flags & AT24_FLAG_READONLY);
- if (writable) {
- if (!use_smbus ||
-+ (!(chip.flags & AT24_FLAG_DISABLE_I2CBLOCK) &&
- i2c_check_functionality(client->adapter,
-- I2C_FUNC_SMBUS_WRITE_I2C_BLOCK) ||
-+ I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)) ||
- i2c_check_functionality(client->adapter,
- I2C_FUNC_SMBUS_WRITE_WORD_DATA) ||
- i2c_check_functionality(client->adapter,
-diff --git a/include/linux/i2c/at24.h b/include/linux/i2c/at24.h
-index a881e5e..3bdb466 100644
---- a/include/linux/i2c/at24.h
-+++ b/include/linux/i2c/at24.h
-@@ -25,6 +25,7 @@ struct at24_platform_data {
- #define AT24_FLAG_READONLY 0x40 /* sysfs-entry will be read-only */
- #define AT24_FLAG_IRUGO 0x20 /* sysfs-entry will be world-readable */
- #define AT24_FLAG_TAKE8ADDR 0x10 /* take always 8 addresses (24c00) */
-+#define AT24_FLAG_DISABLE_I2CBLOCK 0x08 /*disable smbus i2c block access */
-
- void (*setup)(struct memory_accessor *, void *context);
- void *context;
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-at24-byte-word-write-access.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-at24-byte-word-write-access.patch
deleted file mode 100644
index 2ab2c2b2..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-at24-byte-word-write-access.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-Adds byte and word write access to the at24 driver
-
-diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
-index c98c736..2ec05ce 100644
---- a/drivers/misc/eeprom/at24.c
-+++ b/drivers/misc/eeprom/at24.c
-@@ -332,6 +332,7 @@ static ssize_t at24_eeprom_write(struct at24_data *at24, const char *buf,
- ssize_t status;
- unsigned long timeout, write_time;
- unsigned next_page;
-+ int i = 0;
-
- /* Get corresponding I2C address and adjust offset */
- client = at24_translate_offset(at24, &offset);
-@@ -345,10 +346,22 @@ static ssize_t at24_eeprom_write(struct at24_data *at24, const char *buf,
- if (offset + count > next_page)
- count = next_page - offset;
-
-- /* If we'll use I2C calls for I/O, set up the message */
-- if (!at24->use_smbus) {
-- int i = 0;
-
-+ switch (at24->use_smbus) {
-+ case I2C_SMBUS_I2C_BLOCK_DATA:
-+ /* Smaller eeproms can work given some SMBus extension calls */
-+ if (count > I2C_SMBUS_BLOCK_MAX)
-+ count = I2C_SMBUS_BLOCK_MAX;
-+ break;
-+ case I2C_SMBUS_WORD_DATA:
-+ /* Check for odd length transaction */
-+ count = (count == 1) ? 1 : 2;
-+ break;
-+ case I2C_SMBUS_BYTE_DATA:
-+ count = 1;
-+ break;
-+ default:
-+ /* If we'll use I2C calls for I/O, set up the message */
- msg.addr = client->addr;
- msg.flags = 0;
-
-@@ -360,6 +373,7 @@ static ssize_t at24_eeprom_write(struct at24_data *at24, const char *buf,
- msg.buf[i++] = offset;
- memcpy(&msg.buf[i], buf, count);
- msg.len = i + count;
-+ break;
- }
-
- /*
-@@ -370,15 +384,37 @@ static ssize_t at24_eeprom_write(struct at24_data *at24, const char *buf,
- timeout = jiffies + msecs_to_jiffies(write_timeout);
- do {
- write_time = jiffies;
-- if (at24->use_smbus) {
-+ switch (at24->use_smbus) {
-+ case I2C_SMBUS_I2C_BLOCK_DATA:
- status = i2c_smbus_write_i2c_block_data(client,
- offset, count, buf);
- if (status == 0)
- status = count;
-- } else {
-+ break;
-+ case I2C_SMBUS_WORD_DATA:
-+ if (count == 2) {
-+ status = i2c_smbus_write_word_data(
-+ client,offset,(u16)((buf[0]) |
-+ (buf[1] << 8)));
-+ } else {
-+ /* count = 1 */
-+ status = i2c_smbus_write_byte_data(
-+ client, offset, buf[0]);
-+ }
-+ if (status == 0)
-+ status = count;
-+ break;
-+ case I2C_SMBUS_BYTE_DATA:
-+ status = i2c_smbus_write_byte_data(client, offset,
-+ buf[0]);
-+ if (status == 0)
-+ status = count;
-+ break;
-+ default:
- status = i2c_transfer(client->adapter, &msg, 1);
- if (status == 1)
- status = count;
-+ break;
- }
- dev_dbg(&client->dev, "write %zu@%d --> %zd (%ld)\n",
- count, offset, status, jiffies);
-@@ -585,9 +621,13 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id)
-
- writable = !(chip.flags & AT24_FLAG_READONLY);
- if (writable) {
-- if (!use_smbus || i2c_check_functionality(client->adapter,
-- I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)) {
--
-+ if (!use_smbus ||
-+ i2c_check_functionality(client->adapter,
-+ I2C_FUNC_SMBUS_WRITE_I2C_BLOCK) ||
-+ i2c_check_functionality(client->adapter,
-+ I2C_FUNC_SMBUS_WRITE_WORD_DATA) ||
-+ i2c_check_functionality(client->adapter,
-+ I2C_FUNC_SMBUS_WRITE_BYTE_DATA)) {
- unsigned write_max = chip.page_size;
-
- at24->macc.write = at24_macc_write;
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-at24-eeprom-class.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-at24-eeprom-class.patch
deleted file mode 100644
index 784eadf7..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-at24-eeprom-class.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-Add at24 based EEPROMs to the eeprom_dev hardware class
-
-During device instantiation have the at24 driver add the new device to
-the eeprom_dev hardware class. The functionality is enabled by
-CONFIG_EEPROM_CLASS.
-
-diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
-index 47bcd10..c98c736 100644
---- a/drivers/misc/eeprom/at24.c
-+++ b/drivers/misc/eeprom/at24.c
-@@ -23,6 +23,7 @@
- #include
- #include
- #include
-+#include
-
- /*
- * I2C EEPROMs from most vendors are inexpensive and mostly interchangeable.
-@@ -68,6 +69,8 @@ struct at24_data {
- unsigned write_max;
- unsigned num_addresses;
-
-+ struct eeprom_device *eeprom_dev;
-+
- /*
- * Some chips tie up multiple I2C addresses; dummy devices reserve
- * them for us, and we'll use them with SMBus calls.
-@@ -514,6 +517,7 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id)
-
- chip.setup = NULL;
- chip.context = NULL;
-+ chip.eeprom_data = NULL;
- }
-
- if (!is_power_of_2(chip.byte_len))
-@@ -627,6 +631,13 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id)
- if (err)
- goto err_clients;
-
-+ at24->eeprom_dev = eeprom_device_register(&client->dev, chip.eeprom_data);
-+ if (IS_ERR(at24->eeprom_dev)) {
-+ dev_err(&client->dev, "error registering eeprom device.\n");
-+ err = PTR_ERR(at24->eeprom_dev);
-+ goto err_clients;
-+ }
-+
- i2c_set_clientdata(client, at24);
-
- dev_info(&client->dev, "%zu byte %s EEPROM, %s, %u bytes/write\n",
-@@ -669,6 +680,8 @@ static int __devexit at24_remove(struct i2c_client *client)
- for (i = 1; i < at24->num_addresses; i++)
- i2c_unregister_device(at24->client[i]);
-
-+ eeprom_device_unregister(at24->eeprom_dev);
-+
- kfree(at24->writebuf);
- kfree(at24);
- return 0;
-diff --git a/include/linux/i2c/at24.h b/include/linux/i2c/at24.h
-index 8ace930..a881e5e 100644
---- a/include/linux/i2c/at24.h
-+++ b/include/linux/i2c/at24.h
-@@ -3,6 +3,7 @@
-
- #include
- #include
-+#include
-
- /*
- * As seen through Linux I2C, differences between the most common types of I2C
-@@ -27,6 +28,7 @@ struct at24_platform_data {
-
- void (*setup)(struct memory_accessor *, void *context);
- void *context;
-+ struct eeprom_platform_data *eeprom_data; /* extra data for the eeprom_class */
- };
-
- #endif /* _LINUX_AT24_H */
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-at24-fix-odd-length-two-byte-access.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-at24-fix-odd-length-two-byte-access.patch
deleted file mode 100644
index 0bdd69b7..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-at24-fix-odd-length-two-byte-access.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-driver at24 fix odd length two byte access
-
-For I2C_SMBUS_WORD_DATA read accesses check if the access length is
-one or two bytes. For transactions that have an odd length eventualy
-we read 1 byte at the end to complete the request.
-
-The previous code always used a count of 2, which works fine if the
-requested total length is even. If the requested length was odd,
-however, the code would cause a kernel OOPS.
-
-The while (count) loop would go forever as count went from 1 to -1,
-never becoming zero. Also the return buffer would overrun.
-
-This patch allows for reading an odd number of bytes in
-I2C_SMBUS_WORD_DATA mode.
-
-diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
-index ab1ad41..47bcd10 100644
---- a/drivers/misc/eeprom/at24.c
-+++ b/drivers/misc/eeprom/at24.c
-@@ -192,7 +192,8 @@ static ssize_t at24_eeprom_read(struct at24_data *at24, char *buf,
- count = I2C_SMBUS_BLOCK_MAX;
- break;
- case I2C_SMBUS_WORD_DATA:
-- count = 2;
-+ /* Check for odd length transaction */
-+ count = (count == 1) ? 1 : 2;
- break;
- case I2C_SMBUS_BYTE_DATA:
- count = 1;
-@@ -237,7 +238,8 @@ static ssize_t at24_eeprom_read(struct at24_data *at24, char *buf,
- status = i2c_smbus_read_word_data(client, offset);
- if (status >= 0) {
- buf[0] = status & 0xff;
-- buf[1] = status >> 8;
-+ if (count == 2)
-+ buf[1] = status >> 8;
- status = count;
- }
- break;
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-at24-smbus-addr16.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-at24-smbus-addr16.patch
deleted file mode 100644
index 53e7ddaf..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-at24-smbus-addr16.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-patch for celestica Redstone XP
-
-diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
-index 2ec05ce..841631c 100644
---- a/drivers/misc/eeprom/at24.c
-+++ b/drivers/misc/eeprom/at24.c
-@@ -247,7 +247,14 @@ static ssize_t at24_eeprom_read(struct at24_data *at24, char *buf,
- }
- break;
- case I2C_SMBUS_BYTE_DATA:
-- status = i2c_smbus_read_byte_data(client, offset);
-+ if (at24->chip.flags & AT24_FLAG_ADDR16) {
-+ status = i2c_smbus_write_byte_data(client, (offset >> 8) & 0xff, offset & 0xff);
-+ if (status >= 0) {
-+ status = i2c_smbus_read_byte(client);
-+ }
-+ } else {
-+ status = i2c_smbus_read_byte_data(client, offset);
-+ }
- if (status >= 0) {
- buf[0] = status;
- status = count;
-@@ -405,8 +412,11 @@ static ssize_t at24_eeprom_write(struct at24_data *at24, const char *buf,
- status = count;
- break;
- case I2C_SMBUS_BYTE_DATA:
-- status = i2c_smbus_write_byte_data(client, offset,
-- buf[0]);
-+ if (at24->chip.flags & AT24_FLAG_ADDR16) {
-+ status = i2c_smbus_write_word_data(client, (offset >> 8) & 0xff, buf[0] << 8 | (offset & 0xff));
-+ } else {
-+ status = i2c_smbus_write_byte_data(client, offset, buf[0]);
-+ }
- if (status == 0)
- status = count;
- break;
-@@ -571,10 +581,8 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id)
- /* Use I2C operations unless we're stuck with SMBus extensions. */
- if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
- if (chip.flags & AT24_FLAG_ADDR16) {
-- err = -EPFNOSUPPORT;
-- goto err_out;
-- }
-- if (i2c_check_functionality(client->adapter,
-+ use_smbus = I2C_SMBUS_BYTE_DATA;
-+ } else if (i2c_check_functionality(client->adapter,
- I2C_FUNC_SMBUS_READ_I2C_BLOCK)) {
- use_smbus = I2C_SMBUS_I2C_BLOCK_DATA;
- } else if (i2c_check_functionality(client->adapter,
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-broadcom-tigon3.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-broadcom-tigon3.patch
deleted file mode 100644
index ffff1d30..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-broadcom-tigon3.patch
+++ /dev/null
@@ -1,27389 +0,0 @@
-support Broadcom Tigon3 Ethernet driver
-
-diff --git a/drivers/net/ethernet/broadcom/Makefile b/drivers/net/ethernet/broadcom/Makefile
-index b789605..486c71c 100644
---- a/drivers/net/ethernet/broadcom/Makefile
-+++ b/drivers/net/ethernet/broadcom/Makefile
-@@ -8,4 +8,4 @@ obj-$(CONFIG_BNX2) += bnx2.o
- obj-$(CONFIG_CNIC) += cnic.o
- obj-$(CONFIG_BNX2X) += bnx2x/
- obj-$(CONFIG_SB1250_MAC) += sb1250-mac.o
--obj-$(CONFIG_TIGON3) += tg3.o
-+obj-$(CONFIG_TIGON3) += tg3/
-diff --git a/drivers/net/ethernet/broadcom/tg3/Makefile b/drivers/net/ethernet/broadcom/tg3/Makefile
-new file mode 100644
-index 0000000..22b6141
---- /dev/null
-+++ b/drivers/net/ethernet/broadcom/tg3/Makefile
-@@ -0,0 +1,5 @@
-+#
-+# Makefile for Broadcom Tigon3 ethernet driver
-+#
-+
-+obj-$(CONFIG_TIGON3) += tg3.o
-diff --git a/drivers/net/ethernet/broadcom/tg3/tg3.c b/drivers/net/ethernet/broadcom/tg3/tg3.c
-new file mode 100644
-index 0000000..4894a11
---- /dev/null
-+++ b/drivers/net/ethernet/broadcom/tg3/tg3.c
-@@ -0,0 +1,19937 @@
-+/*
-+ * tg3.c: Broadcom Tigon3 ethernet driver.
-+ *
-+ * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com)
-+ * Copyright (C) 2001, 2002, 2003 Jeff Garzik (jgarzik@pobox.com)
-+ * Copyright (C) 2004 Sun Microsystems Inc.
-+ * Copyright (C) 2005-2015 Broadcom Corporation.
-+ * Portions Copyright (C) VMware, Inc. 2007-2010. All Rights Reserved.
-+ *
-+ * Firmware is:
-+ * Derived from proprietary unpublished source code,
-+ * Copyright (C) 2000-2003 Broadcom Corporation.
-+ *
-+ * Permission is hereby granted for the distribution of this firmware
-+ * data in hexadecimal or equivalent format, provided this copyright
-+ * notice is accompanying it.
-+ */
-+
-+#include "tg3_flags.h"
-+
-+#include
-+
-+#if (LINUX_VERSION_CODE < 0x020612)
-+#include
-+#endif
-+
-+#if (LINUX_VERSION_CODE < 0x020500)
-+#if defined(CONFIG_MODVERSIONS) && defined(MODULE) && ! defined(MODVERSIONS)
-+#define MODVERSIONS
-+#include
-+#endif
-+#endif
-+#include
-+#if (LINUX_VERSION_CODE >= 0x20600)
-+#include
-+#endif
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#ifdef BCM_HAS_MDIO_H
-+#include
-+#endif
-+#include
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+#include
-+#include
-+#include
-+#endif
-+#include
-+#include
-+#include
-+#if (LINUX_VERSION_CODE >= 0x20600)
-+#include
-+#endif
-+#include
-+#if (LINUX_VERSION_CODE >= 0x020600)
-+#include
-+#endif
-+#ifdef BCM_HAS_REQUEST_FIRMWARE
-+#include
-+#else
-+#include "tg3_firmware.h"
-+#endif
-+#include
-+
-+#ifndef IS_ENABLED
-+#define __ARG_PLACEHOLDER_1 0,
-+#define config_enabled(cfg) _config_enabled(cfg)
-+#define _config_enabled(value) __config_enabled(__ARG_PLACEHOLDER_##value)
-+#define __config_enabled(arg1_or_junk) ___config_enabled(arg1_or_junk 1, 0)
-+#define ___config_enabled(__ignored, val, ...) val
-+
-+#define IS_ENABLED(option) \
-+ (config_enabled(option) || config_enabled(option##_MODULE))
-+#endif
-+
-+#if IS_ENABLED(CONFIG_HWMON) && !defined(__VMKLNX__)
-+#include
-+#include
-+#endif
-+
-+#include
-+#include
-+
-+#include
-+#include
-+#include
-+
-+#ifdef BCM_HAS_IEEE1588_SUPPORT
-+#include
-+#if IS_ENABLED(CONFIG_PTP_1588_CLOCK)
-+#include
-+#else /* IS_ENABLED(CONFIG_PTP_1588_CLOCK) */
-+#include
-+#include
-+#endif /* IS_ENABLED(CONFIG_PTP_1588_CLOCK) */
-+#endif
-+
-+#ifdef CONFIG_SPARC
-+#include
-+#include
-+#endif
-+
-+#define BAR_0 0
-+#define BAR_2 2
-+
-+#include "tg3.h"
-+
-+/* Functions & macros to verify TG3_FLAGS types */
-+
-+static inline int _tg3_flag(enum TG3_FLAGS flag, unsigned long *bits)
-+{
-+ return test_bit(flag, bits);
-+}
-+
-+static inline void _tg3_flag_set(enum TG3_FLAGS flag, unsigned long *bits)
-+{
-+ set_bit(flag, bits);
-+}
-+
-+static inline void _tg3_flag_clear(enum TG3_FLAGS flag, unsigned long *bits)
-+{
-+ clear_bit(flag, bits);
-+}
-+
-+#define tg3_flag(tp, flag) \
-+ _tg3_flag(TG3_FLAG_##flag, (tp)->tg3_flags)
-+#define tg3_flag_set(tp, flag) \
-+ _tg3_flag_set(TG3_FLAG_##flag, (tp)->tg3_flags)
-+#define tg3_flag_clear(tp, flag) \
-+ _tg3_flag_clear(TG3_FLAG_##flag, (tp)->tg3_flags)
-+
-+#define DRV_MODULE_NAME "tg3"
-+#define TG3_MAJ_NUM 3
-+#define TG3_MIN_NUM 137
-+#define TG3_REVISION "k"
-+#define DRV_MODULE_VERSION \
-+ __stringify(TG3_MAJ_NUM) "." __stringify(TG3_MIN_NUM)\
-+ TG3_REVISION
-+#define DRV_MODULE_RELDATE "April 1, 2015"
-+#define RESET_KIND_SHUTDOWN 0
-+#define RESET_KIND_INIT 1
-+#define RESET_KIND_SUSPEND 2
-+
-+#define TG3_DEF_RX_MODE 0
-+#define TG3_DEF_TX_MODE 0
-+#define TG3_DEF_MSG_ENABLE \
-+ (NETIF_MSG_DRV | \
-+ NETIF_MSG_PROBE | \
-+ NETIF_MSG_LINK | \
-+ NETIF_MSG_TIMER | \
-+ NETIF_MSG_IFDOWN | \
-+ NETIF_MSG_IFUP | \
-+ NETIF_MSG_RX_ERR | \
-+ NETIF_MSG_TX_ERR)
-+
-+#define TG3_GRC_LCLCTL_PWRSW_DELAY 100
-+
-+/* length of time before we decide the hardware is borked,
-+ * and dev->tx_timeout() should be called to fix the problem
-+ */
-+#if defined(__VMKLNX__)
-+/* On VMware ESX there is a possibility that that netdev watchdog thread
-+ * runs before the reset task if the machine is loaded. If this occurs
-+ * too many times, these premature watchdog triggers will cause a PSOD
-+ * on a VMware ESX beta build */
-+#define TG3_TX_TIMEOUT (20 * HZ)
-+#else
-+#define TG3_TX_TIMEOUT (5 * HZ)
-+#endif /* defined(__VMKLNX__) */
-+
-+/* hardware minimum and maximum for a single frame's data payload */
-+#define TG3_MIN_MTU 60
-+#define TG3_MAX_MTU(tp) \
-+ (tg3_flag(tp, JUMBO_CAPABLE) ? 9000 : 1500)
-+
-+/* These numbers seem to be hard coded in the NIC firmware somehow.
-+ * You can't change the ring sizes, but you can change where you place
-+ * them in the NIC onboard memory.
-+ */
-+#define TG3_RX_STD_RING_SIZE(tp) \
-+ (tg3_flag(tp, LRG_PROD_RING_CAP) ? \
-+ TG3_RX_STD_MAX_SIZE_5717 : TG3_RX_STD_MAX_SIZE_5700)
-+#define TG3_RX_JMB_RING_SIZE(tp) \
-+ (tg3_flag(tp, LRG_PROD_RING_CAP) ? \
-+ TG3_RX_JMB_MAX_SIZE_5717 : TG3_RX_JMB_MAX_SIZE_5700)
-+
-+#if defined(__VMKLNX__)
-+#define TG3_DEF_RX_RING_PENDING 255
-+#define TG3_DEF_RX_JUMBO_RING_PENDING 200
-+#else
-+#define TG3_DEF_RX_RING_PENDING 200
-+#define TG3_DEF_RX_JUMBO_RING_PENDING 100
-+#endif
-+
-+/* Do not place this n-ring entries value into the tp struct itself,
-+ * we really want to expose these constants to GCC so that modulo et
-+ * al. operations are done with shifts and masks instead of with
-+ * hw multiply/modulo instructions. Another solution would be to
-+ * replace things like '% foo' with '& (foo - 1)'.
-+ */
-+
-+#define TG3_TX_RING_SIZE 512
-+#define TG3_DEF_TX_RING_PENDING (TG3_TX_RING_SIZE - 1)
-+
-+#define TG3_RX_STD_RING_BYTES(tp) \
-+ (sizeof(struct tg3_rx_buffer_desc) * TG3_RX_STD_RING_SIZE(tp))
-+#define TG3_RX_JMB_RING_BYTES(tp) \
-+ (sizeof(struct tg3_ext_rx_buffer_desc) * TG3_RX_JMB_RING_SIZE(tp))
-+#define TG3_RX_RCB_RING_BYTES(tp) \
-+ (sizeof(struct tg3_rx_buffer_desc) * (tp->rx_ret_ring_mask + 1))
-+#define TG3_TX_RING_BYTES (sizeof(struct tg3_tx_buffer_desc) * \
-+ TG3_TX_RING_SIZE)
-+#define NEXT_TX(N) (((N) + 1) & (TG3_TX_RING_SIZE - 1))
-+
-+#define TG3_DMA_BYTE_ENAB 64
-+
-+#define TG3_RX_STD_DMA_SZ 1536
-+#define TG3_RX_JMB_DMA_SZ 9046
-+
-+#define TG3_RX_DMA_TO_MAP_SZ(x) ((x) + TG3_DMA_BYTE_ENAB)
-+
-+#define TG3_RX_STD_MAP_SZ TG3_RX_DMA_TO_MAP_SZ(TG3_RX_STD_DMA_SZ)
-+#define TG3_RX_JMB_MAP_SZ TG3_RX_DMA_TO_MAP_SZ(TG3_RX_JMB_DMA_SZ)
-+
-+#define TG3_RX_STD_BUFF_RING_SIZE(tp) \
-+ (sizeof(struct ring_info) * TG3_RX_STD_RING_SIZE(tp))
-+
-+#define TG3_RX_JMB_BUFF_RING_SIZE(tp) \
-+ (sizeof(struct ring_info) * TG3_RX_JMB_RING_SIZE(tp))
-+
-+/* Due to a hardware bug, the 5701 can only DMA to memory addresses
-+ * that are at least dword aligned when used in PCIX mode. The driver
-+ * works around this bug by double copying the packet. This workaround
-+ * is built into the normal double copy length check for efficiency.
-+ *
-+ * However, the double copy is only necessary on those architectures
-+ * where unaligned memory accesses are inefficient. For those architectures
-+ * where unaligned memory accesses incur little penalty, we can reintegrate
-+ * the 5701 in the normal rx path. Doing so saves a device structure
-+ * dereference by hardcoding the double copy threshold in place.
-+ */
-+#define TG3_RX_COPY_THRESHOLD 256
-+#if NET_IP_ALIGN == 0 || defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS)
-+ #define TG3_RX_COPY_THRESH(tp) TG3_RX_COPY_THRESHOLD
-+#else
-+ #define TG3_RX_COPY_THRESH(tp) ((tp)->rx_copy_thresh)
-+#endif
-+
-+#if (NET_IP_ALIGN != 0)
-+#define TG3_RX_OFFSET(tp) ((tp)->rx_offset)
-+#else
-+#ifdef BCM_HAS_BUILD_SKB
-+#define TG3_RX_OFFSET(tp) (NET_SKB_PAD)
-+#else
-+#define TG3_RX_OFFSET(tp) 0
-+#endif
-+#endif
-+
-+/* minimum number of free TX descriptors required to wake up TX process */
-+#define TG3_TX_WAKEUP_THRESH(tnapi) ((tnapi)->tx_pending / 4)
-+#define TG3_TX_BD_DMA_MAX_2K 2048
-+#define TG3_TX_BD_DMA_MAX_4K 4096
-+#define TG3_TX_BD_DMA_MAX_32K 32768
-+
-+#define TG3_RAW_IP_ALIGN 2
-+
-+#define TG3_MAX_UCAST_ADDR(tp) (tg3_flag((tp), ENABLE_ASF) ? 2 : 3)
-+#define TG3_UCAST_ADDR_IDX(tp) (tg3_flag((tp), ENABLE_ASF) ? 2 : 1)
-+
-+#include "tg3_compat2.h"
-+
-+#if defined(__VMKLNX__)
-+/* see pr141646, 626764*/
-+#define TG3_FW_UPDATE_TIMEOUT_SEC 30
-+#else
-+#define TG3_FW_UPDATE_TIMEOUT_SEC 5
-+#endif
-+#define TG3_FW_UPDATE_FREQ_SEC (TG3_FW_UPDATE_TIMEOUT_SEC / 2)
-+
-+#define FIRMWARE_TG3 "tigon/tg3.bin"
-+#define FIRMWARE_TG357766 "tigon/tg357766.bin"
-+#define FIRMWARE_TG3TSO "tigon/tg3_tso.bin"
-+#define FIRMWARE_TG3TSO5 "tigon/tg3_tso5.bin"
-+
-+static char version[] __devinitdata =
-+ DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
-+
-+MODULE_AUTHOR("David S. Miller (davem@redhat.com) and Jeff Garzik (jgarzik@pobox.com)");
-+MODULE_DESCRIPTION("Broadcom Tigon3 ethernet driver");
-+MODULE_LICENSE("GPL");
-+MODULE_VERSION(DRV_MODULE_VERSION);
-+MODULE_FIRMWARE(FIRMWARE_TG3);
-+MODULE_FIRMWARE(FIRMWARE_TG3TSO);
-+MODULE_FIRMWARE(FIRMWARE_TG3TSO5);
-+
-+static int tg3_debug = -1; /* -1 == use TG3_DEF_MSG_ENABLE as value */
-+#if (LINUX_VERSION_CODE >= 0x20600)
-+module_param(tg3_debug, int, 0);
-+MODULE_PARM_DESC(tg3_debug, "Tigon3 bitmapped debugging message enable value");
-+#endif
-+#if defined(__VMKLNX__) && (VMWARE_ESX_DDK_VERSION >= 55000)
-+static int disable_fw_dmp;
-+module_param(disable_fw_dmp, int, 0);
-+MODULE_PARM_DESC(disable_fw_dmp, "For debugging purposes, disable firmware "
-+ "dump feature when set to value of 1");
-+#endif
-+
-+static int tg3_disable_eee = -1;
-+#if (LINUX_VERSION_CODE >= 0x20600)
-+module_param(tg3_disable_eee, int, 0);
-+MODULE_PARM_DESC(tg3_disable_eee, "Disable Energy Efficient Ethernet (EEE) support");
-+#endif
-+
-+#define TG3_DRV_DATA_FLAG_10_100_ONLY 0x0001
-+#define TG3_DRV_DATA_FLAG_5705_10_100 0x0002
-+
-+static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = {
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5700)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5701)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5702)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5703)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5704)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5702FE)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705_2)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705M)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705M_2)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5702X)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5703X)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5704S)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5702A3)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5703A3)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5782)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5788)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5789)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5901),
-+ .driver_data = TG3_DRV_DATA_FLAG_10_100_ONLY |
-+ TG3_DRV_DATA_FLAG_5705_10_100},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5901_2),
-+ .driver_data = TG3_DRV_DATA_FLAG_10_100_ONLY |
-+ TG3_DRV_DATA_FLAG_5705_10_100},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5704S_2)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705F),
-+ .driver_data = TG3_DRV_DATA_FLAG_10_100_ONLY |
-+ TG3_DRV_DATA_FLAG_5705_10_100},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5721)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5722)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5750)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5751)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5751M)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5751F),
-+ .driver_data = TG3_DRV_DATA_FLAG_10_100_ONLY},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5752)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5752M)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5753)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5753M)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5753F),
-+ .driver_data = TG3_DRV_DATA_FLAG_10_100_ONLY},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5754)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5754M)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5755)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5755M)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5756)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5786)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5787)},
-+ {PCI_DEVICE_SUB(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5787M,
-+ PCI_VENDOR_ID_LENOVO,
-+ TG3PCI_SUBDEVICE_ID_LENOVO_5787M),
-+ .driver_data = TG3_DRV_DATA_FLAG_10_100_ONLY},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5787M)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5787F),
-+ .driver_data = TG3_DRV_DATA_FLAG_10_100_ONLY},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5714)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5714S)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5715)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5715S)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5780)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5780S)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5781)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5906)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5906M)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5784)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5764)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5723)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5761)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5761E)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5761S)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5761SE)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5785_G)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5785_F)},
-+ {PCI_DEVICE_SUB(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57780,
-+ PCI_VENDOR_ID_AI, TG3PCI_SUBDEVICE_ID_ACER_57780_A),
-+ .driver_data = TG3_DRV_DATA_FLAG_10_100_ONLY},
-+ {PCI_DEVICE_SUB(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57780,
-+ PCI_VENDOR_ID_AI, TG3PCI_SUBDEVICE_ID_ACER_57780_B),
-+ .driver_data = TG3_DRV_DATA_FLAG_10_100_ONLY},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57780)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57760)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57790),
-+ .driver_data = TG3_DRV_DATA_FLAG_10_100_ONLY},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57788)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5717)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5717_C)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5718)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57781)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57785)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57761)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57765)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57791),
-+ .driver_data = TG3_DRV_DATA_FLAG_10_100_ONLY},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57795),
-+ .driver_data = TG3_DRV_DATA_FLAG_10_100_ONLY},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5719)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5720)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57762)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57766)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5762)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5725)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5727)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57764)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57767)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57787)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57782)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57786)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1001)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1003)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC9100)},
-+ {PCI_DEVICE(PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_TIGON3)},
-+ {}
-+};
-+
-+MODULE_DEVICE_TABLE(pci, tg3_pci_tbl);
-+
-+static const struct {
-+ const char string[ETH_GSTRING_LEN];
-+} ethtool_stats_keys[] = {
-+ { "rx_octets" },
-+ { "rx_fragments" },
-+ { "rx_ucast_packets" },
-+ { "rx_mcast_packets" },
-+ { "rx_bcast_packets" },
-+ { "rx_fcs_errors" },
-+ { "rx_align_errors" },
-+ { "rx_xon_pause_rcvd" },
-+ { "rx_xoff_pause_rcvd" },
-+ { "rx_mac_ctrl_rcvd" },
-+ { "rx_xoff_entered" },
-+ { "rx_frame_too_long_errors" },
-+ { "rx_jabbers" },
-+ { "rx_undersize_packets" },
-+ { "rx_in_length_errors" },
-+ { "rx_out_length_errors" },
-+ { "rx_64_or_less_octet_packets" },
-+ { "rx_65_to_127_octet_packets" },
-+ { "rx_128_to_255_octet_packets" },
-+ { "rx_256_to_511_octet_packets" },
-+ { "rx_512_to_1023_octet_packets" },
-+ { "rx_1024_to_1522_octet_packets" },
-+ { "rx_1523_to_2047_octet_packets" },
-+ { "rx_2048_to_4095_octet_packets" },
-+ { "rx_4096_to_8191_octet_packets" },
-+ { "rx_8192_to_9022_octet_packets" },
-+
-+ { "tx_octets" },
-+ { "tx_collisions" },
-+
-+ { "tx_xon_sent" },
-+ { "tx_xoff_sent" },
-+ { "tx_flow_control" },
-+ { "tx_mac_errors" },
-+ { "tx_single_collisions" },
-+ { "tx_mult_collisions" },
-+ { "tx_deferred" },
-+ { "tx_excessive_collisions" },
-+ { "tx_late_collisions" },
-+ { "tx_collide_2times" },
-+ { "tx_collide_3times" },
-+ { "tx_collide_4times" },
-+ { "tx_collide_5times" },
-+ { "tx_collide_6times" },
-+ { "tx_collide_7times" },
-+ { "tx_collide_8times" },
-+ { "tx_collide_9times" },
-+ { "tx_collide_10times" },
-+ { "tx_collide_11times" },
-+ { "tx_collide_12times" },
-+ { "tx_collide_13times" },
-+ { "tx_collide_14times" },
-+ { "tx_collide_15times" },
-+ { "tx_ucast_packets" },
-+ { "tx_mcast_packets" },
-+ { "tx_bcast_packets" },
-+ { "tx_carrier_sense_errors" },
-+ { "tx_discards" },
-+ { "tx_errors" },
-+
-+ { "dma_writeq_full" },
-+ { "dma_write_prioq_full" },
-+ { "rxbds_empty" },
-+ { "rx_discards" },
-+ { "rx_errors" },
-+ { "rx_threshold_hit" },
-+
-+ { "dma_readq_full" },
-+ { "dma_read_prioq_full" },
-+ { "tx_comp_queue_full" },
-+
-+ { "ring_set_send_prod_index" },
-+ { "ring_status_update" },
-+ { "nic_irqs" },
-+ { "nic_avoided_irqs" },
-+ { "nic_tx_threshold_hit" },
-+
-+ { "mbuf_lwm_thresh_hit" },
-+ { "dma_4g_cross" },
-+#if !defined(__VMKLNX__)
-+ { "recoverable_err" },
-+ { "unrecoverable_err" },
-+#endif
-+};
-+
-+#define TG3_NUM_STATS ARRAY_SIZE(ethtool_stats_keys)
-+#define TG3_NVRAM_TEST 0
-+#define TG3_LINK_TEST 1
-+#define TG3_REGISTER_TEST 2
-+#define TG3_MEMORY_TEST 3
-+#define TG3_MAC_LOOPB_TEST 4
-+#define TG3_PHY_LOOPB_TEST 5
-+#define TG3_EXT_LOOPB_TEST 6
-+#define TG3_INTERRUPT_TEST 7
-+
-+
-+static const struct {
-+ const char string[ETH_GSTRING_LEN];
-+} ethtool_test_keys[] = {
-+ [TG3_NVRAM_TEST] = { "nvram test (online) " },
-+ [TG3_LINK_TEST] = { "link test (online) " },
-+ [TG3_REGISTER_TEST] = { "register test (offline)" },
-+ [TG3_MEMORY_TEST] = { "memory test (offline)" },
-+ [TG3_MAC_LOOPB_TEST] = { "mac loopback test (offline)" },
-+ [TG3_PHY_LOOPB_TEST] = { "phy loopback test (offline)" },
-+ [TG3_EXT_LOOPB_TEST] = { "ext loopback test (offline)" },
-+ [TG3_INTERRUPT_TEST] = { "interrupt test (offline)" },
-+};
-+
-+#define TG3_NUM_TEST ARRAY_SIZE(ethtool_test_keys)
-+
-+
-+static void tg3_write32(struct tg3 *tp, u32 off, u32 val)
-+{
-+ writel(val, tp->regs + off);
-+}
-+
-+static u32 tg3_read32(struct tg3 *tp, u32 off)
-+{
-+ return readl(tp->regs + off);
-+}
-+
-+static void tg3_ape_write32(struct tg3 *tp, u32 off, u32 val)
-+{
-+ writel(val, tp->aperegs + off);
-+}
-+
-+static u32 tg3_ape_read32(struct tg3 *tp, u32 off)
-+{
-+ return readl(tp->aperegs + off);
-+}
-+
-+static void tg3_write_indirect_reg32(struct tg3 *tp, u32 off, u32 val)
-+{
-+ unsigned long flags;
-+
-+ spin_lock_irqsave(&tp->indirect_lock, flags);
-+ pci_write_config_dword(tp->pdev, TG3PCI_REG_BASE_ADDR, off);
-+ pci_write_config_dword(tp->pdev, TG3PCI_REG_DATA, val);
-+ spin_unlock_irqrestore(&tp->indirect_lock, flags);
-+}
-+
-+static void tg3_write_flush_reg32(struct tg3 *tp, u32 off, u32 val)
-+{
-+ writel(val, tp->regs + off);
-+ readl(tp->regs + off);
-+}
-+
-+static u32 tg3_read_indirect_reg32(struct tg3 *tp, u32 off)
-+{
-+ unsigned long flags;
-+ u32 val;
-+
-+ spin_lock_irqsave(&tp->indirect_lock, flags);
-+ pci_write_config_dword(tp->pdev, TG3PCI_REG_BASE_ADDR, off);
-+ pci_read_config_dword(tp->pdev, TG3PCI_REG_DATA, &val);
-+ spin_unlock_irqrestore(&tp->indirect_lock, flags);
-+ return val;
-+}
-+
-+static void tg3_write_indirect_mbox(struct tg3 *tp, u32 off, u32 val)
-+{
-+ unsigned long flags;
-+
-+ if (off == (MAILBOX_RCVRET_CON_IDX_0 + TG3_64BIT_REG_LOW)) {
-+ pci_write_config_dword(tp->pdev, TG3PCI_RCV_RET_RING_CON_IDX +
-+ TG3_64BIT_REG_LOW, val);
-+ return;
-+ }
-+ if (off == TG3_RX_STD_PROD_IDX_REG) {
-+ pci_write_config_dword(tp->pdev, TG3PCI_STD_RING_PROD_IDX +
-+ TG3_64BIT_REG_LOW, val);
-+ return;
-+ }
-+
-+ spin_lock_irqsave(&tp->indirect_lock, flags);
-+ pci_write_config_dword(tp->pdev, TG3PCI_REG_BASE_ADDR, off + 0x5600);
-+ pci_write_config_dword(tp->pdev, TG3PCI_REG_DATA, val);
-+ spin_unlock_irqrestore(&tp->indirect_lock, flags);
-+
-+ /* In indirect mode when disabling interrupts, we also need
-+ * to clear the interrupt bit in the GRC local ctrl register.
-+ */
-+ if ((off == (MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW)) &&
-+ (val == 0x1)) {
-+ pci_write_config_dword(tp->pdev, TG3PCI_MISC_LOCAL_CTRL,
-+ tp->grc_local_ctrl|GRC_LCLCTRL_CLEARINT);
-+ }
-+}
-+
-+static u32 tg3_read_indirect_mbox(struct tg3 *tp, u32 off)
-+{
-+ unsigned long flags;
-+ u32 val;
-+
-+ spin_lock_irqsave(&tp->indirect_lock, flags);
-+ pci_write_config_dword(tp->pdev, TG3PCI_REG_BASE_ADDR, off + 0x5600);
-+ pci_read_config_dword(tp->pdev, TG3PCI_REG_DATA, &val);
-+ spin_unlock_irqrestore(&tp->indirect_lock, flags);
-+ return val;
-+}
-+
-+/* usec_wait specifies the wait time in usec when writing to certain registers
-+ * where it is unsafe to read back the register without some delay.
-+ * GRC_LOCAL_CTRL is one example if the GPIOs are toggled to switch power.
-+ * TG3PCI_CLOCK_CTRL is another example if the clock frequencies are changed.
-+ */
-+static void _tw32_flush(struct tg3 *tp, u32 off, u32 val, u32 usec_wait)
-+{
-+ if (tg3_flag(tp, PCIX_TARGET_HWBUG) || tg3_flag(tp, ICH_WORKAROUND))
-+ /* Non-posted methods */
-+ tp->write32(tp, off, val);
-+ else {
-+ /* Posted method */
-+ tg3_write32(tp, off, val);
-+ if (usec_wait)
-+ udelay(usec_wait);
-+ tp->read32(tp, off);
-+ }
-+ /* Wait again after the read for the posted method to guarantee that
-+ * the wait time is met.
-+ */
-+ if (usec_wait)
-+ udelay(usec_wait);
-+}
-+
-+static inline void tw32_mailbox_flush(struct tg3 *tp, u32 off, u32 val)
-+{
-+ tp->write32_mbox(tp, off, val);
-+ if (tg3_flag(tp, FLUSH_POSTED_WRITES) ||
-+ (!tg3_flag(tp, MBOX_WRITE_REORDER) &&
-+ !tg3_flag(tp, ICH_WORKAROUND)))
-+ tp->read32_mbox(tp, off);
-+}
-+
-+static void tg3_write32_tx_mbox(struct tg3 *tp, u32 off, u32 val)
-+{
-+ void __iomem *mbox = tp->regs + off;
-+ writel(val, mbox);
-+ if (tg3_flag(tp, TXD_MBOX_HWBUG))
-+ writel(val, mbox);
-+ if (tg3_flag(tp, MBOX_WRITE_REORDER) ||
-+ tg3_flag(tp, FLUSH_POSTED_WRITES))
-+ readl(mbox);
-+}
-+
-+static u32 tg3_read32_mbox_5906(struct tg3 *tp, u32 off)
-+{
-+ return readl(tp->regs + off + GRCMBOX_BASE);
-+}
-+
-+static void tg3_write32_mbox_5906(struct tg3 *tp, u32 off, u32 val)
-+{
-+ writel(val, tp->regs + off + GRCMBOX_BASE);
-+}
-+
-+#define tw32_mailbox(reg, val) tp->write32_mbox(tp, reg, val)
-+#define tw32_mailbox_f(reg, val) tw32_mailbox_flush(tp, (reg), (val))
-+#define tw32_rx_mbox(reg, val) tp->write32_rx_mbox(tp, reg, val)
-+#define tw32_tx_mbox(reg, val) tp->write32_tx_mbox(tp, reg, val)
-+#define tr32_mailbox(reg) tp->read32_mbox(tp, reg)
-+
-+#define tw32(reg, val) tp->write32(tp, reg, val)
-+#define tw32_f(reg, val) _tw32_flush(tp, (reg), (val), 0)
-+#define tw32_wait_f(reg, val, us) _tw32_flush(tp, (reg), (val), (us))
-+#define tr32(reg) tp->read32(tp, reg)
-+
-+static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val)
-+{
-+ unsigned long flags;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5906 &&
-+ (off >= NIC_SRAM_STATS_BLK) && (off < NIC_SRAM_TX_BUFFER_DESC))
-+ return;
-+
-+ spin_lock_irqsave(&tp->indirect_lock, flags);
-+ if (tg3_flag(tp, SRAM_USE_CONFIG)) {
-+ pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, off);
-+ pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_DATA, val);
-+
-+ /* Always leave this as zero. */
-+ pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0);
-+ } else {
-+ tw32_f(TG3PCI_MEM_WIN_BASE_ADDR, off);
-+ tw32_f(TG3PCI_MEM_WIN_DATA, val);
-+
-+ /* Always leave this as zero. */
-+ tw32_f(TG3PCI_MEM_WIN_BASE_ADDR, 0);
-+ }
-+ spin_unlock_irqrestore(&tp->indirect_lock, flags);
-+}
-+
-+static void tg3_read_mem(struct tg3 *tp, u32 off, u32 *val)
-+{
-+ unsigned long flags;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5906 &&
-+ (off >= NIC_SRAM_STATS_BLK) && (off < NIC_SRAM_TX_BUFFER_DESC)) {
-+ *val = 0;
-+ return;
-+ }
-+
-+ spin_lock_irqsave(&tp->indirect_lock, flags);
-+ if (tg3_flag(tp, SRAM_USE_CONFIG)) {
-+ pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, off);
-+ pci_read_config_dword(tp->pdev, TG3PCI_MEM_WIN_DATA, val);
-+
-+ /* Always leave this as zero. */
-+ pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0);
-+ } else {
-+ tw32_f(TG3PCI_MEM_WIN_BASE_ADDR, off);
-+ *val = tr32(TG3PCI_MEM_WIN_DATA);
-+
-+ /* Always leave this as zero. */
-+ tw32_f(TG3PCI_MEM_WIN_BASE_ADDR, 0);
-+ }
-+ spin_unlock_irqrestore(&tp->indirect_lock, flags);
-+}
-+
-+static void tg3_ape_lock_init(struct tg3 *tp)
-+{
-+ int i;
-+ u32 regbase, bit;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5761)
-+ regbase = TG3_APE_LOCK_GRANT;
-+ else
-+ regbase = TG3_APE_PER_LOCK_GRANT;
-+
-+ /* Make sure the driver hasn't any stale locks. */
-+ for (i = TG3_APE_LOCK_PHY0; i <= TG3_APE_LOCK_GPIO; i++) {
-+ switch (i) {
-+ case TG3_APE_LOCK_PHY0:
-+ case TG3_APE_LOCK_PHY1:
-+ case TG3_APE_LOCK_PHY2:
-+ case TG3_APE_LOCK_PHY3:
-+ bit = APE_LOCK_GRANT_DRIVER;
-+ break;
-+ default:
-+ if (!tp->pci_fn)
-+ bit = APE_LOCK_GRANT_DRIVER;
-+ else
-+ bit = 1 << tp->pci_fn;
-+ }
-+ tg3_ape_write32(tp, regbase + 4 * i, bit);
-+ }
-+
-+}
-+
-+static int tg3_ape_lock(struct tg3 *tp, int locknum)
-+{
-+ int i, off;
-+ int ret = 0;
-+ u32 status, req, gnt, bit;
-+
-+ if (!tg3_flag(tp, ENABLE_APE))
-+ return 0;
-+
-+ switch (locknum) {
-+ case TG3_APE_LOCK_GPIO:
-+ if (tg3_asic_rev(tp) == ASIC_REV_5761)
-+ return 0;
-+ case TG3_APE_LOCK_GRC:
-+ case TG3_APE_LOCK_MEM:
-+ if (!tp->pci_fn)
-+ bit = APE_LOCK_REQ_DRIVER;
-+ else
-+ bit = 1 << tp->pci_fn;
-+ break;
-+ case TG3_APE_LOCK_PHY0:
-+ case TG3_APE_LOCK_PHY1:
-+ case TG3_APE_LOCK_PHY2:
-+ case TG3_APE_LOCK_PHY3:
-+ bit = APE_LOCK_REQ_DRIVER;
-+ break;
-+ default:
-+ return -EINVAL;
-+ }
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5761) {
-+ req = TG3_APE_LOCK_REQ;
-+ gnt = TG3_APE_LOCK_GRANT;
-+ } else {
-+ req = TG3_APE_PER_LOCK_REQ;
-+ gnt = TG3_APE_PER_LOCK_GRANT;
-+ }
-+
-+ off = 4 * locknum;
-+
-+ tg3_ape_write32(tp, req + off, bit);
-+
-+ /* Wait for up to 1 millisecond to acquire lock. */
-+ for (i = 0; i < 100; i++) {
-+ status = tg3_ape_read32(tp, gnt + off);
-+ if (status == bit)
-+ break;
-+ if (pci_channel_offline(tp->pdev))
-+ break;
-+
-+ udelay(10);
-+ }
-+
-+ if (status != bit) {
-+ /* Revoke the lock request. */
-+ tg3_ape_write32(tp, gnt + off, bit);
-+ ret = -EBUSY;
-+ }
-+
-+ return ret;
-+}
-+
-+static void tg3_ape_unlock(struct tg3 *tp, int locknum)
-+{
-+ u32 gnt, bit;
-+
-+ if (!tg3_flag(tp, ENABLE_APE))
-+ return;
-+
-+ switch (locknum) {
-+ case TG3_APE_LOCK_GPIO:
-+ if (tg3_asic_rev(tp) == ASIC_REV_5761)
-+ return;
-+ case TG3_APE_LOCK_GRC:
-+ case TG3_APE_LOCK_MEM:
-+ if (!tp->pci_fn)
-+ bit = APE_LOCK_GRANT_DRIVER;
-+ else
-+ bit = 1 << tp->pci_fn;
-+ break;
-+ case TG3_APE_LOCK_PHY0:
-+ case TG3_APE_LOCK_PHY1:
-+ case TG3_APE_LOCK_PHY2:
-+ case TG3_APE_LOCK_PHY3:
-+ bit = APE_LOCK_GRANT_DRIVER;
-+ break;
-+ default:
-+ return;
-+ }
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5761)
-+ gnt = TG3_APE_LOCK_GRANT;
-+ else
-+ gnt = TG3_APE_PER_LOCK_GRANT;
-+
-+ tg3_ape_write32(tp, gnt + 4 * locknum, bit);
-+}
-+
-+static int tg3_ape_event_lock(struct tg3 *tp, u32 timeout_us)
-+{
-+ u32 apedata;
-+
-+ while (timeout_us) {
-+ if (tg3_ape_lock(tp, TG3_APE_LOCK_MEM))
-+ return -EBUSY;
-+
-+ apedata = tg3_ape_read32(tp, TG3_APE_EVENT_STATUS);
-+ if (!(apedata & APE_EVENT_STATUS_EVENT_PENDING))
-+ break;
-+
-+ tg3_ape_unlock(tp, TG3_APE_LOCK_MEM);
-+
-+#if defined(__VMKLNX__) || (LINUX_VERSION_CODE < 0x020627) /* 2.6.39 */
-+ udelay(10);
-+#else
-+ usleep_range(10, 20);
-+#endif
-+ timeout_us -= (timeout_us > 10) ? 10 : timeout_us;
-+ }
-+
-+ return timeout_us ? 0 : -EBUSY;
-+}
-+
-+/* ESX needs tg3_ape_scratchpad_read for FW dump for ESX 5.5 and after */
-+#if (IS_ENABLED(CONFIG_HWMON) && !defined(__VMKLNX__)) || \
-+ (defined(__VMKLNX__) && VMWARE_ESX_DDK_VERSION >= 55000)
-+static int tg3_ape_wait_for_event(struct tg3 *tp, u32 timeout_us)
-+{
-+ u32 i, apedata;
-+
-+ for (i = 0; i < timeout_us / 10; i++) {
-+ apedata = tg3_ape_read32(tp, TG3_APE_EVENT_STATUS);
-+
-+ if (!(apedata & APE_EVENT_STATUS_EVENT_PENDING))
-+ break;
-+
-+ udelay(10);
-+ }
-+
-+ return i == timeout_us / 10;
-+}
-+
-+static int tg3_ape_scratchpad_read(struct tg3 *tp, u32 *data, u32 base_off,
-+ u32 len)
-+{
-+ int err;
-+ u32 i, bufoff, msgoff, maxlen, apedata;
-+
-+ if (!tg3_flag(tp, APE_HAS_NCSI))
-+ return 0;
-+
-+ apedata = tg3_ape_read32(tp, TG3_APE_SEG_SIG);
-+ if (apedata != APE_SEG_SIG_MAGIC)
-+ return -ENODEV;
-+
-+ apedata = tg3_ape_read32(tp, TG3_APE_FW_STATUS);
-+ if (!(apedata & APE_FW_STATUS_READY))
-+ return -EAGAIN;
-+
-+ bufoff = tg3_ape_read32(tp, TG3_APE_SEG_MSG_BUF_OFF) +
-+ TG3_APE_SHMEM_BASE;
-+ msgoff = bufoff + 2 * sizeof(u32);
-+ maxlen = tg3_ape_read32(tp, TG3_APE_SEG_MSG_BUF_LEN);
-+
-+ while (len) {
-+ u32 length;
-+
-+ /* Cap xfer sizes to scratchpad limits. */
-+ length = (len > maxlen) ? maxlen : len;
-+ len -= length;
-+
-+ apedata = tg3_ape_read32(tp, TG3_APE_FW_STATUS);
-+ if (!(apedata & APE_FW_STATUS_READY))
-+ return -EAGAIN;
-+
-+ /* Wait for up to 1 msec for APE to service previous event. */
-+ err = tg3_ape_event_lock(tp, 1000);
-+ if (err)
-+ return err;
-+
-+ apedata = APE_EVENT_STATUS_DRIVER_EVNT |
-+ APE_EVENT_STATUS_SCRTCHPD_READ |
-+ APE_EVENT_STATUS_EVENT_PENDING;
-+ tg3_ape_write32(tp, TG3_APE_EVENT_STATUS, apedata);
-+
-+ tg3_ape_write32(tp, bufoff, base_off);
-+ tg3_ape_write32(tp, bufoff + sizeof(u32), length);
-+
-+ tg3_ape_unlock(tp, TG3_APE_LOCK_MEM);
-+ tg3_ape_write32(tp, TG3_APE_EVENT, APE_EVENT_1);
-+
-+ base_off += length;
-+
-+ if (tg3_ape_wait_for_event(tp, 30000))
-+ return -EAGAIN;
-+
-+ for (i = 0; length; i += 4, length -= 4) {
-+ u32 val = tg3_ape_read32(tp, msgoff + i);
-+ memcpy(data, &val, sizeof(u32));
-+ data++;
-+ }
-+ }
-+
-+ return 0;
-+}
-+#endif
-+
-+static int tg3_ape_send_event(struct tg3 *tp, u32 event)
-+{
-+ int err;
-+ u32 apedata;
-+
-+ apedata = tg3_ape_read32(tp, TG3_APE_SEG_SIG);
-+ if (apedata != APE_SEG_SIG_MAGIC)
-+ return -EAGAIN;
-+
-+ apedata = tg3_ape_read32(tp, TG3_APE_FW_STATUS);
-+ if (!(apedata & APE_FW_STATUS_READY))
-+ return -EAGAIN;
-+
-+ /* Wait for up to 20 millisecond for APE to service previous event. */
-+ err = tg3_ape_event_lock(tp, 20000);
-+ if (err)
-+ return err;
-+
-+ tg3_ape_write32(tp, TG3_APE_EVENT_STATUS,
-+ event | APE_EVENT_STATUS_EVENT_PENDING);
-+
-+ tg3_ape_unlock(tp, TG3_APE_LOCK_MEM);
-+ tg3_ape_write32(tp, TG3_APE_EVENT, APE_EVENT_1);
-+
-+ return 0;
-+}
-+
-+static void tg3_ape_driver_state_change(struct tg3 *tp, int kind)
-+{
-+ u32 event;
-+ u32 apedata;
-+
-+ if (!tg3_flag(tp, ENABLE_APE))
-+ return;
-+
-+ switch (kind) {
-+ case RESET_KIND_INIT:
-+ tg3_ape_write32(tp, TG3_APE_HOST_HEARTBEAT_COUNT, tp->ape_hb++);
-+ tg3_ape_write32(tp, TG3_APE_HOST_SEG_SIG,
-+ APE_HOST_SEG_SIG_MAGIC);
-+ tg3_ape_write32(tp, TG3_APE_HOST_SEG_LEN,
-+ APE_HOST_SEG_LEN_MAGIC);
-+ apedata = tg3_ape_read32(tp, TG3_APE_HOST_INIT_COUNT);
-+ tg3_ape_write32(tp, TG3_APE_HOST_INIT_COUNT, ++apedata);
-+ tg3_ape_write32(tp, TG3_APE_HOST_DRIVER_ID,
-+ APE_HOST_DRIVER_ID_MAGIC(TG3_MAJ_NUM,
-+ TG3_MIN_NUM,
-+ TG3_REVISION[0]));
-+ tg3_ape_write32(tp, TG3_APE_HOST_BEHAVIOR,
-+ APE_HOST_BEHAV_NO_PHYLOCK);
-+ tg3_ape_write32(tp, TG3_APE_HOST_DRVR_STATE,
-+ TG3_APE_HOST_DRVR_STATE_START);
-+
-+ event = APE_EVENT_STATUS_STATE_START;
-+ break;
-+ case RESET_KIND_SHUTDOWN:
-+ if (device_may_wakeup(&tp->pdev->dev) &&
-+ tg3_flag(tp, WOL_ENABLE)) {
-+ tg3_ape_write32(tp, TG3_APE_HOST_WOL_SPEED,
-+ TG3_APE_HOST_WOL_SPEED_AUTO);
-+ apedata = TG3_APE_HOST_DRVR_STATE_WOL;
-+ } else
-+ apedata = TG3_APE_HOST_DRVR_STATE_UNLOAD;
-+
-+ tg3_ape_write32(tp, TG3_APE_HOST_DRVR_STATE, apedata);
-+
-+ event = APE_EVENT_STATUS_STATE_UNLOAD;
-+ break;
-+ default:
-+ return;
-+ }
-+
-+ event |= APE_EVENT_STATUS_DRIVER_EVNT | APE_EVENT_STATUS_STATE_CHNGE;
-+
-+ tg3_ape_send_event(tp, event);
-+}
-+
-+static void tg3_disable_ints(struct tg3 *tp)
-+{
-+ int i;
-+
-+ tw32(TG3PCI_MISC_HOST_CTRL,
-+ (tp->misc_host_ctrl | MISC_HOST_CTRL_MASK_PCI_INT));
-+ for (i = 0; i < tp->irq_max; i++)
-+ tw32_mailbox_f(tp->napi[i].int_mbox, 0x00000001);
-+}
-+
-+static void tg3_enable_ints(struct tg3 *tp)
-+{
-+ int i;
-+
-+ tp->irq_sync = 0;
-+ wmb();
-+
-+ tw32(TG3PCI_MISC_HOST_CTRL,
-+ (tp->misc_host_ctrl & ~MISC_HOST_CTRL_MASK_PCI_INT));
-+
-+ tp->coal_now = tp->coalesce_mode | HOSTCC_MODE_ENABLE;
-+ for (i = 0; i < tp->irq_cnt; i++) {
-+ struct tg3_napi *tnapi = &tp->napi[i];
-+
-+ tw32_mailbox_f(tnapi->int_mbox, tnapi->last_tag << 24);
-+ if (tg3_flag(tp, 1SHOT_MSI))
-+ tw32_mailbox_f(tnapi->int_mbox, tnapi->last_tag << 24);
-+
-+ tp->coal_now |= tnapi->coal_now;
-+ }
-+
-+ /* Force an initial interrupt */
-+ if (!tg3_flag(tp, TAGGED_STATUS) &&
-+#if defined(__VMKLNX__)
-+ tp->napi[0].hw_status &&
-+#endif
-+ (tp->napi[0].hw_status->status & SD_STATUS_UPDATED))
-+ tw32(GRC_LOCAL_CTRL, tp->grc_local_ctrl | GRC_LCLCTRL_SETINT);
-+ else
-+ tw32(HOSTCC_MODE, tp->coal_now);
-+
-+#ifndef TG3_INBOX
-+ if (tp->irq_cnt > 1)
-+ tp->coal_now &= ~(tp->napi[0].coal_now | tp->napi[1].coal_now);
-+ else
-+ tp->coal_now &= ~(tp->napi[0].coal_now);
-+#else
-+ tp->coal_now &= ~(tp->napi[0].coal_now);
-+#endif
-+}
-+
-+static inline unsigned int tg3_has_work(struct tg3_napi *tnapi)
-+{
-+ struct tg3 *tp = tnapi->tp;
-+ struct tg3_hw_status *sblk = tnapi->hw_status;
-+ unsigned int work_exists = 0;
-+
-+ /* check for phy events */
-+ if (!(tg3_flag(tp, USE_LINKCHG_REG) || tg3_flag(tp, POLL_SERDES))) {
-+ if (sblk->status & SD_STATUS_LINK_CHG)
-+ work_exists = 1;
-+ }
-+
-+ /* check for TX work to do */
-+ if (sblk->idx[0].tx_consumer != tnapi->tx_cons)
-+ work_exists = 1;
-+
-+ /* check for RX work to do */
-+ if (tnapi->rx_rcb_prod_idx &&
-+ *(tnapi->rx_rcb_prod_idx) != tnapi->rx_rcb_ptr)
-+ work_exists = 1;
-+
-+ return work_exists;
-+}
-+
-+/* tg3_int_reenable
-+ * similar to tg3_enable_ints, but it accurately determines whether there
-+ * is new work pending and can return without flushing the PIO write
-+ * which reenables interrupts
-+ */
-+static void tg3_int_reenable(struct tg3_napi *tnapi)
-+{
-+ struct tg3 *tp = tnapi->tp;
-+
-+ tw32_mailbox(tnapi->int_mbox, tnapi->last_tag << 24);
-+ mmiowb();
-+
-+ /* When doing tagged status, this work check is unnecessary.
-+ * The last_tag we write above tells the chip which piece of
-+ * work we've completed.
-+ */
-+ if (!tg3_flag(tp, TAGGED_STATUS) && tg3_has_work(tnapi))
-+ tw32(HOSTCC_MODE, tp->coalesce_mode |
-+ HOSTCC_MODE_ENABLE | tnapi->coal_now);
-+}
-+
-+static void tg3_switch_clocks(struct tg3 *tp)
-+{
-+ u32 clock_ctrl;
-+ u32 orig_clock_ctrl;
-+
-+ if (tg3_flag(tp, CPMU_PRESENT) || tg3_flag(tp, 5780_CLASS))
-+ return;
-+
-+ clock_ctrl = tr32(TG3PCI_CLOCK_CTRL);
-+
-+ orig_clock_ctrl = clock_ctrl;
-+ clock_ctrl &= (CLOCK_CTRL_FORCE_CLKRUN |
-+ CLOCK_CTRL_CLKRUN_OENABLE |
-+ 0x1f);
-+ tp->pci_clock_ctrl = clock_ctrl;
-+
-+ if (tg3_flag(tp, 5705_PLUS)) {
-+ if (orig_clock_ctrl & CLOCK_CTRL_625_CORE) {
-+ tw32_wait_f(TG3PCI_CLOCK_CTRL,
-+ clock_ctrl | CLOCK_CTRL_625_CORE, 40);
-+ }
-+ } else if ((orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE) != 0) {
-+ tw32_wait_f(TG3PCI_CLOCK_CTRL,
-+ clock_ctrl |
-+ (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK),
-+ 40);
-+ tw32_wait_f(TG3PCI_CLOCK_CTRL,
-+ clock_ctrl | (CLOCK_CTRL_ALTCLK),
-+ 40);
-+ }
-+ tw32_wait_f(TG3PCI_CLOCK_CTRL, clock_ctrl, 40);
-+}
-+
-+#define PHY_BUSY_LOOPS 5000
-+
-+static int __tg3_readphy(struct tg3 *tp, unsigned int phy_addr, int reg,
-+ u32 *val)
-+{
-+ u32 frame_val;
-+ unsigned int loops;
-+ int ret;
-+
-+ if ((tp->mi_mode & MAC_MI_MODE_AUTO_POLL) != 0) {
-+ tw32_f(MAC_MI_MODE,
-+ (tp->mi_mode & ~MAC_MI_MODE_AUTO_POLL));
-+ udelay(80);
-+ }
-+
-+ tg3_ape_lock(tp, tp->phy_ape_lock);
-+
-+ *val = 0x0;
-+
-+ frame_val = ((phy_addr << MI_COM_PHY_ADDR_SHIFT) &
-+ MI_COM_PHY_ADDR_MASK);
-+ frame_val |= ((reg << MI_COM_REG_ADDR_SHIFT) &
-+ MI_COM_REG_ADDR_MASK);
-+ frame_val |= (MI_COM_CMD_READ | MI_COM_START);
-+
-+ tw32_f(MAC_MI_COM, frame_val);
-+
-+ loops = PHY_BUSY_LOOPS;
-+ while (loops != 0) {
-+ udelay(10);
-+ frame_val = tr32(MAC_MI_COM);
-+
-+ if ((frame_val & MI_COM_BUSY) == 0) {
-+ udelay(5);
-+ frame_val = tr32(MAC_MI_COM);
-+ break;
-+ }
-+ loops -= 1;
-+ }
-+
-+ ret = -EBUSY;
-+ if (loops != 0) {
-+ *val = frame_val & MI_COM_DATA_MASK;
-+ ret = 0;
-+ }
-+
-+ if ((tp->mi_mode & MAC_MI_MODE_AUTO_POLL) != 0) {
-+ tw32_f(MAC_MI_MODE, tp->mi_mode);
-+ udelay(80);
-+ }
-+
-+ tg3_ape_unlock(tp, tp->phy_ape_lock);
-+
-+ return ret;
-+}
-+
-+static int tg3_readphy(struct tg3 *tp, int reg, u32 *val)
-+{
-+ return __tg3_readphy(tp, tp->phy_addr, reg, val);
-+}
-+
-+static int __tg3_writephy(struct tg3 *tp, unsigned int phy_addr, int reg,
-+ u32 val)
-+{
-+ u32 frame_val;
-+ unsigned int loops;
-+ int ret;
-+
-+ if ((tp->phy_flags & TG3_PHYFLG_IS_FET) &&
-+ (reg == MII_CTRL1000 || reg == MII_TG3_AUX_CTRL))
-+ return 0;
-+
-+ if ((tp->mi_mode & MAC_MI_MODE_AUTO_POLL) != 0) {
-+ tw32_f(MAC_MI_MODE,
-+ (tp->mi_mode & ~MAC_MI_MODE_AUTO_POLL));
-+ udelay(80);
-+ }
-+
-+ tg3_ape_lock(tp, tp->phy_ape_lock);
-+
-+ frame_val = ((phy_addr << MI_COM_PHY_ADDR_SHIFT) &
-+ MI_COM_PHY_ADDR_MASK);
-+ frame_val |= ((reg << MI_COM_REG_ADDR_SHIFT) &
-+ MI_COM_REG_ADDR_MASK);
-+ frame_val |= (val & MI_COM_DATA_MASK);
-+ frame_val |= (MI_COM_CMD_WRITE | MI_COM_START);
-+
-+ tw32_f(MAC_MI_COM, frame_val);
-+
-+ loops = PHY_BUSY_LOOPS;
-+ while (loops != 0) {
-+ udelay(10);
-+ frame_val = tr32(MAC_MI_COM);
-+ if ((frame_val & MI_COM_BUSY) == 0) {
-+ udelay(5);
-+ frame_val = tr32(MAC_MI_COM);
-+ break;
-+ }
-+ loops -= 1;
-+ }
-+
-+ ret = -EBUSY;
-+ if (loops != 0)
-+ ret = 0;
-+
-+ if ((tp->mi_mode & MAC_MI_MODE_AUTO_POLL) != 0) {
-+ tw32_f(MAC_MI_MODE, tp->mi_mode);
-+ udelay(80);
-+ }
-+
-+ tg3_ape_unlock(tp, tp->phy_ape_lock);
-+
-+ return ret;
-+}
-+
-+static int tg3_writephy(struct tg3 *tp, int reg, u32 val)
-+{
-+ return __tg3_writephy(tp, tp->phy_addr, reg, val);
-+}
-+
-+static int tg3_phy_cl45_write(struct tg3 *tp, u32 devad, u32 addr, u32 val)
-+{
-+ int err;
-+
-+ err = tg3_writephy(tp, MII_TG3_MMD_CTRL, devad);
-+ if (err)
-+ goto done;
-+
-+ err = tg3_writephy(tp, MII_TG3_MMD_ADDRESS, addr);
-+ if (err)
-+ goto done;
-+
-+ err = tg3_writephy(tp, MII_TG3_MMD_CTRL,
-+ MII_TG3_MMD_CTRL_DATA_NOINC | devad);
-+ if (err)
-+ goto done;
-+
-+ err = tg3_writephy(tp, MII_TG3_MMD_ADDRESS, val);
-+
-+done:
-+ return err;
-+}
-+
-+static int tg3_phy_cl45_read(struct tg3 *tp, u32 devad, u32 addr, u32 *val)
-+{
-+ int err;
-+
-+ err = tg3_writephy(tp, MII_TG3_MMD_CTRL, devad);
-+ if (err)
-+ goto done;
-+
-+ err = tg3_writephy(tp, MII_TG3_MMD_ADDRESS, addr);
-+ if (err)
-+ goto done;
-+
-+ err = tg3_writephy(tp, MII_TG3_MMD_CTRL,
-+ MII_TG3_MMD_CTRL_DATA_NOINC | devad);
-+ if (err)
-+ goto done;
-+
-+ err = tg3_readphy(tp, MII_TG3_MMD_ADDRESS, val);
-+
-+done:
-+ return err;
-+}
-+
-+static int tg3_phydsp_read(struct tg3 *tp, u32 reg, u32 *val)
-+{
-+ int err;
-+
-+ err = tg3_writephy(tp, MII_TG3_DSP_ADDRESS, reg);
-+ if (!err)
-+ err = tg3_readphy(tp, MII_TG3_DSP_RW_PORT, val);
-+
-+ return err;
-+}
-+
-+static int tg3_phydsp_write(struct tg3 *tp, u32 reg, u32 val)
-+{
-+ int err;
-+
-+ err = tg3_writephy(tp, MII_TG3_DSP_ADDRESS, reg);
-+ if (!err)
-+ err = tg3_writephy(tp, MII_TG3_DSP_RW_PORT, val);
-+
-+ return err;
-+}
-+
-+static int tg3_phy_auxctl_read(struct tg3 *tp, int reg, u32 *val)
-+{
-+ int err;
-+
-+ err = tg3_writephy(tp, MII_TG3_AUX_CTRL,
-+ (reg << MII_TG3_AUXCTL_MISC_RDSEL_SHIFT) |
-+ MII_TG3_AUXCTL_SHDWSEL_MISC);
-+ if (!err)
-+ err = tg3_readphy(tp, MII_TG3_AUX_CTRL, val);
-+
-+ return err;
-+}
-+
-+static int tg3_phy_auxctl_write(struct tg3 *tp, int reg, u32 set)
-+{
-+ if (reg == MII_TG3_AUXCTL_SHDWSEL_MISC)
-+ set |= MII_TG3_AUXCTL_MISC_WREN;
-+
-+ return tg3_writephy(tp, MII_TG3_AUX_CTRL, set | reg);
-+}
-+
-+static int tg3_phy_toggle_auxctl_smdsp(struct tg3 *tp, bool enable)
-+{
-+ u32 val;
-+ int err;
-+
-+ err = tg3_phy_auxctl_read(tp, MII_TG3_AUXCTL_SHDWSEL_AUXCTL, &val);
-+
-+ if (err)
-+ return err;
-+
-+ if (enable)
-+ val |= MII_TG3_AUXCTL_ACTL_SMDSP_ENA;
-+ else
-+ val &= ~MII_TG3_AUXCTL_ACTL_SMDSP_ENA;
-+
-+ err = tg3_phy_auxctl_write((tp), MII_TG3_AUXCTL_SHDWSEL_AUXCTL,
-+ val | MII_TG3_AUXCTL_ACTL_TX_6DB);
-+
-+ return err;
-+}
-+
-+static int tg3_phy_shdw_read(struct tg3 *tp, int reg, u32 *val)
-+{
-+ int err;
-+
-+ err = tg3_writephy(tp, MII_TG3_MISC_SHDW, reg);
-+ if (!err)
-+ err = tg3_readphy(tp, MII_TG3_MISC_SHDW, val);
-+
-+ return err;
-+}
-+
-+static int tg3_phy_shdw_write(struct tg3 *tp, int reg, u32 val)
-+{
-+ return tg3_writephy(tp, MII_TG3_MISC_SHDW,
-+ reg | val | MII_TG3_MISC_SHDW_WREN);
-+}
-+
-+static int tg3_bmcr_reset(struct tg3 *tp)
-+{
-+ u32 phy_control;
-+ int limit, err;
-+
-+ /* OK, reset it, and poll the BMCR_RESET bit until it
-+ * clears or we time out.
-+ */
-+ phy_control = BMCR_RESET;
-+ err = tg3_writephy(tp, MII_BMCR, phy_control);
-+ if (err != 0)
-+ return -EBUSY;
-+
-+ limit = 5000;
-+ while (limit--) {
-+ err = tg3_readphy(tp, MII_BMCR, &phy_control);
-+ if (err != 0)
-+ return -EBUSY;
-+
-+ if ((phy_control & BMCR_RESET) == 0) {
-+ udelay(40);
-+ break;
-+ }
-+ udelay(10);
-+ }
-+ if (limit < 0)
-+ return -EBUSY;
-+
-+ return 0;
-+}
-+
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+static int tg3_mdio_read(struct mii_bus *bp, int mii_id, int reg)
-+{
-+ struct tg3 *tp = bp->priv;
-+ u32 val;
-+
-+ spin_lock_bh(&tp->lock);
-+
-+ if (__tg3_readphy(tp, mii_id, reg, &val))
-+ val = -EIO;
-+
-+ spin_unlock_bh(&tp->lock);
-+
-+ return val;
-+}
-+
-+static int tg3_mdio_write(struct mii_bus *bp, int mii_id, int reg, u16 val)
-+{
-+ struct tg3 *tp = bp->priv;
-+ u32 ret = 0;
-+
-+ spin_lock_bh(&tp->lock);
-+
-+ if (__tg3_writephy(tp, mii_id, reg, val))
-+ ret = -EIO;
-+
-+ spin_unlock_bh(&tp->lock);
-+
-+ return ret;
-+}
-+
-+static int tg3_mdio_reset(struct mii_bus *bp)
-+{
-+ return 0;
-+}
-+#endif /* BCM_INCLUDE_PHYLIB_SUPPORT */
-+
-+static void tg3_mdio_config_5785(struct tg3 *tp)
-+{
-+ u32 val;
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+ struct phy_device *phydev;
-+
-+ phydev = tp->mdio_bus->phy_map[tp->phy_addr];
-+ switch (phydev->drv->phy_id & phydev->drv->phy_id_mask) {
-+ case PHY_ID_BCM50610:
-+ case PHY_ID_BCM50610M:
-+ case PHY_ID_BCM50612E:
-+ val = MAC_PHYCFG2_50610_LED_MODES;
-+ break;
-+ case PHY_ID_BCMAC131:
-+ val = MAC_PHYCFG2_AC131_LED_MODES;
-+ break;
-+ case PHY_ID_RTL8211C:
-+ val = MAC_PHYCFG2_RTL8211C_LED_MODES;
-+ break;
-+ case PHY_ID_RTL8201E:
-+ val = MAC_PHYCFG2_RTL8201E_LED_MODES;
-+ break;
-+ default:
-+ return;
-+ }
-+
-+ if (phydev->interface != PHY_INTERFACE_MODE_RGMII) {
-+ tw32(MAC_PHYCFG2, val);
-+
-+ val = tr32(MAC_PHYCFG1);
-+ val &= ~(MAC_PHYCFG1_RGMII_INT |
-+ MAC_PHYCFG1_RXCLK_TO_MASK | MAC_PHYCFG1_TXCLK_TO_MASK);
-+ val |= MAC_PHYCFG1_RXCLK_TIMEOUT | MAC_PHYCFG1_TXCLK_TIMEOUT;
-+ tw32(MAC_PHYCFG1, val);
-+
-+ return;
-+ }
-+#else
-+ if ((tp->phy_id & TG3_PHY_ID_MASK) == TG3_PHY_ID_BCMAC131) {
-+ tw32(MAC_PHYCFG2, MAC_PHYCFG2_AC131_LED_MODES);
-+
-+ val = tr32(MAC_PHYCFG1);
-+ val &= ~(MAC_PHYCFG1_RGMII_INT |
-+ MAC_PHYCFG1_RXCLK_TO_MASK | MAC_PHYCFG1_TXCLK_TO_MASK);
-+ val |= MAC_PHYCFG1_RXCLK_TIMEOUT | MAC_PHYCFG1_TXCLK_TIMEOUT;
-+ tw32(MAC_PHYCFG1, val);
-+
-+ return;
-+ }
-+
-+ val = MAC_PHYCFG2_50610_LED_MODES;
-+#endif /* BCM_INCLUDE_PHYLIB_SUPPORT */
-+
-+ if (!tg3_flag(tp, RGMII_INBAND_DISABLE))
-+ val |= MAC_PHYCFG2_EMODE_MASK_MASK |
-+ MAC_PHYCFG2_FMODE_MASK_MASK |
-+ MAC_PHYCFG2_GMODE_MASK_MASK |
-+ MAC_PHYCFG2_ACT_MASK_MASK |
-+ MAC_PHYCFG2_QUAL_MASK_MASK |
-+ MAC_PHYCFG2_INBAND_ENABLE;
-+
-+ tw32(MAC_PHYCFG2, val);
-+
-+ val = tr32(MAC_PHYCFG1);
-+ val &= ~(MAC_PHYCFG1_RXCLK_TO_MASK | MAC_PHYCFG1_TXCLK_TO_MASK |
-+ MAC_PHYCFG1_RGMII_EXT_RX_DEC | MAC_PHYCFG1_RGMII_SND_STAT_EN);
-+ if (!tg3_flag(tp, RGMII_INBAND_DISABLE)) {
-+ if (tg3_flag(tp, RGMII_EXT_IBND_RX_EN))
-+ val |= MAC_PHYCFG1_RGMII_EXT_RX_DEC;
-+ if (tg3_flag(tp, RGMII_EXT_IBND_TX_EN))
-+ val |= MAC_PHYCFG1_RGMII_SND_STAT_EN;
-+ }
-+ val |= MAC_PHYCFG1_RXCLK_TIMEOUT | MAC_PHYCFG1_TXCLK_TIMEOUT |
-+ MAC_PHYCFG1_RGMII_INT | MAC_PHYCFG1_TXC_DRV;
-+ tw32(MAC_PHYCFG1, val);
-+
-+ val = tr32(MAC_EXT_RGMII_MODE);
-+ val &= ~(MAC_RGMII_MODE_RX_INT_B |
-+ MAC_RGMII_MODE_RX_QUALITY |
-+ MAC_RGMII_MODE_RX_ACTIVITY |
-+ MAC_RGMII_MODE_RX_ENG_DET |
-+ MAC_RGMII_MODE_TX_ENABLE |
-+ MAC_RGMII_MODE_TX_LOWPWR |
-+ MAC_RGMII_MODE_TX_RESET);
-+ if (!tg3_flag(tp, RGMII_INBAND_DISABLE)) {
-+ if (tg3_flag(tp, RGMII_EXT_IBND_RX_EN))
-+ val |= MAC_RGMII_MODE_RX_INT_B |
-+ MAC_RGMII_MODE_RX_QUALITY |
-+ MAC_RGMII_MODE_RX_ACTIVITY |
-+ MAC_RGMII_MODE_RX_ENG_DET;
-+ if (tg3_flag(tp, RGMII_EXT_IBND_TX_EN))
-+ val |= MAC_RGMII_MODE_TX_ENABLE |
-+ MAC_RGMII_MODE_TX_LOWPWR |
-+ MAC_RGMII_MODE_TX_RESET;
-+ }
-+ tw32(MAC_EXT_RGMII_MODE, val);
-+}
-+
-+static void tg3_mdio_start(struct tg3 *tp)
-+{
-+ tp->mi_mode &= ~MAC_MI_MODE_AUTO_POLL;
-+ tw32_f(MAC_MI_MODE, tp->mi_mode);
-+ udelay(80);
-+
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if (tg3_flag(tp, MDIOBUS_INITED) &&
-+ tg3_asic_rev(tp) == ASIC_REV_5785)
-+ tg3_mdio_config_5785(tp);
-+#else
-+ if (tg3_asic_rev(tp) != ASIC_REV_5785)
-+ return;
-+
-+ tg3_mdio_config_5785(tp);
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_IS_FET)) {
-+ u32 val;
-+
-+ /* FIXME -- This shouldn't be required, but without
-+ * it, the device will not pass traffic until
-+ * the phy is reset via a link up event or
-+ * through a change in speed settings.
-+ */
-+ tg3_phy_auxctl_read(tp, MII_TG3_AUXCTL_SHDWSEL_MISC, &val);
-+ if (tg3_flag(tp, RGMII_INBAND_DISABLE))
-+ val |= MII_TG3_AUXCTL_MISC_RGMII_OOBSC;
-+ else
-+ val &= ~MII_TG3_AUXCTL_MISC_RGMII_OOBSC;
-+ tg3_phy_auxctl_write(tp, MII_TG3_AUXCTL_SHDWSEL_MISC, val);
-+ }
-+#endif /* BCM_INCLUDE_PHYLIB_SUPPORT */
-+}
-+
-+static int tg3_mdio_init(struct tg3 *tp)
-+{
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+ int i;
-+ u32 reg;
-+ struct phy_device *phydev;
-+#endif
-+
-+ if (tg3_flag(tp, 5717_PLUS)) {
-+ u32 is_serdes;
-+
-+ tp->phy_addr = tp->pci_fn + 1;
-+
-+ if (tg3_chip_rev_id(tp) != CHIPREV_ID_5717_A0)
-+ is_serdes = tr32(SG_DIG_STATUS) & SG_DIG_IS_SERDES;
-+ else
-+ is_serdes = tr32(TG3_CPMU_PHY_STRAP) &
-+ TG3_CPMU_PHY_STRAP_IS_SERDES;
-+ if (is_serdes)
-+ tp->phy_addr += 7;
-+ } else if (tg3_flag(tp, IS_SSB_CORE) && tg3_flag(tp, ROBOSWITCH)) {
-+ int addr;
-+
-+ addr = ssb_gige_get_phyaddr(tp->pdev);
-+ if (addr < 0)
-+ return addr;
-+ tp->phy_addr = addr;
-+ } else
-+ tp->phy_addr = TG3_PHY_MII_ADDR;
-+
-+ tg3_mdio_start(tp);
-+
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if (!tg3_flag(tp, USE_PHYLIB) || tg3_flag(tp, MDIOBUS_INITED))
-+ return 0;
-+
-+ tp->mdio_bus = mdiobus_alloc();
-+ if (tp->mdio_bus == NULL)
-+ return -ENOMEM;
-+
-+ tp->mdio_bus->name = "tg3 mdio bus";
-+#ifdef MII_BUS_ID_SIZE
-+ snprintf(tp->mdio_bus->id, MII_BUS_ID_SIZE, "%x",
-+ (tp->pdev->bus->number << 8) | tp->pdev->devfn);
-+#else
-+ tp->mdio_bus->id = tp->pdev->devfn;
-+#endif
-+ tp->mdio_bus->priv = tp;
-+#ifdef BCM_MDIOBUS_HAS_PARENT
-+ tp->mdio_bus->parent = &tp->pdev->dev;
-+#endif
-+ tp->mdio_bus->read = &tg3_mdio_read;
-+ tp->mdio_bus->write = &tg3_mdio_write;
-+ tp->mdio_bus->reset = &tg3_mdio_reset;
-+ tp->mdio_bus->phy_mask = ~(1 << tp->phy_addr);
-+ tp->mdio_bus->irq = &tp->mdio_irq[0];
-+
-+ for (i = 0; i < PHY_MAX_ADDR; i++)
-+ tp->mdio_bus->irq[i] = PHY_POLL;
-+
-+ /* The bus registration will look for all the PHYs on the mdio bus.
-+ * Unfortunately, it does not ensure the PHY is powered up before
-+ * accessing the PHY ID registers. A chip reset is the
-+ * quickest way to bring the device back to an operational state..
-+ */
-+ if (tg3_readphy(tp, MII_BMCR, ®) || (reg & BMCR_PDOWN))
-+ tg3_bmcr_reset(tp);
-+
-+ i = mdiobus_register(tp->mdio_bus);
-+ if (i) {
-+ dev_warn(&tp->pdev->dev, "mdiobus_reg failed (0x%x)\n", i);
-+ mdiobus_free(tp->mdio_bus);
-+ return i;
-+ }
-+
-+ phydev = tp->mdio_bus->phy_map[tp->phy_addr];
-+
-+ if (!phydev || !phydev->drv) {
-+ dev_warn(&tp->pdev->dev, "No PHY devices\n");
-+ mdiobus_unregister(tp->mdio_bus);
-+ mdiobus_free(tp->mdio_bus);
-+ return -ENODEV;
-+ }
-+
-+ switch (phydev->drv->phy_id & phydev->drv->phy_id_mask) {
-+ case PHY_ID_BCM57780:
-+ phydev->interface = PHY_INTERFACE_MODE_GMII;
-+ phydev->dev_flags |= PHY_BRCM_AUTO_PWRDWN_ENABLE;
-+ break;
-+ case PHY_ID_BCM50610:
-+ case PHY_ID_BCM50610M:
-+ case PHY_ID_BCM50612E:
-+ phydev->dev_flags |= PHY_BRCM_CLEAR_RGMII_MODE |
-+ PHY_BRCM_RX_REFCLK_UNUSED |
-+ PHY_BRCM_DIS_TXCRXC_NOENRGY |
-+ PHY_BRCM_AUTO_PWRDWN_ENABLE;
-+ if (tg3_flag(tp, RGMII_INBAND_DISABLE))
-+ phydev->dev_flags |= PHY_BRCM_STD_IBND_DISABLE;
-+ if (tg3_flag(tp, RGMII_EXT_IBND_RX_EN))
-+ phydev->dev_flags |= PHY_BRCM_EXT_IBND_RX_ENABLE;
-+ if (tg3_flag(tp, RGMII_EXT_IBND_TX_EN))
-+ phydev->dev_flags |= PHY_BRCM_EXT_IBND_TX_ENABLE;
-+ /* fallthru */
-+ case PHY_ID_RTL8211C:
-+ phydev->interface = PHY_INTERFACE_MODE_RGMII;
-+ break;
-+ case PHY_ID_RTL8201E:
-+ case PHY_ID_BCMAC131:
-+ phydev->interface = PHY_INTERFACE_MODE_MII;
-+ phydev->dev_flags |= PHY_BRCM_AUTO_PWRDWN_ENABLE;
-+ tp->phy_flags |= TG3_PHYFLG_IS_FET;
-+ break;
-+ }
-+
-+ tg3_flag_set(tp, MDIOBUS_INITED);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5785)
-+ tg3_mdio_config_5785(tp);
-+#endif /* BCM_INCLUDE_PHYLIB_SUPPORT */
-+
-+ return 0;
-+}
-+
-+static void tg3_mdio_fini(struct tg3 *tp)
-+{
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if (tg3_flag(tp, MDIOBUS_INITED)) {
-+ tg3_flag_clear(tp, MDIOBUS_INITED);
-+ mdiobus_unregister(tp->mdio_bus);
-+ mdiobus_free(tp->mdio_bus);
-+ }
-+#endif /* BCM_INCLUDE_PHYLIB_SUPPORT */
-+}
-+
-+/* tp->lock is held. */
-+static inline void tg3_generate_fw_event(struct tg3 *tp)
-+{
-+ u32 val;
-+
-+ val = tr32(GRC_RX_CPU_EVENT);
-+ val |= GRC_RX_CPU_DRIVER_EVENT;
-+ tw32_f(GRC_RX_CPU_EVENT, val);
-+
-+ tp->last_event_jiffies = jiffies;
-+}
-+
-+#define TG3_FW_EVENT_TIMEOUT_USEC 2500
-+
-+/* tp->lock is held. */
-+static void tg3_wait_for_event_ack(struct tg3 *tp)
-+{
-+ int i;
-+ unsigned int delay_cnt;
-+ long time_remain;
-+
-+ /* If enough time has passed, no wait is necessary. */
-+ time_remain = (long)(tp->last_event_jiffies + 1 +
-+ usecs_to_jiffies(TG3_FW_EVENT_TIMEOUT_USEC)) -
-+ (long)jiffies;
-+ if (time_remain < 0)
-+ return;
-+
-+ /* Check if we can shorten the wait time. */
-+ delay_cnt = jiffies_to_usecs(time_remain);
-+ if (delay_cnt > TG3_FW_EVENT_TIMEOUT_USEC)
-+ delay_cnt = TG3_FW_EVENT_TIMEOUT_USEC;
-+ delay_cnt = (delay_cnt >> 3) + 1;
-+
-+ for (i = 0; i < delay_cnt; i++) {
-+ if (!(tr32(GRC_RX_CPU_EVENT) & GRC_RX_CPU_DRIVER_EVENT))
-+ break;
-+ if (pci_channel_offline(tp->pdev))
-+ break;
-+
-+ udelay(8);
-+ }
-+}
-+
-+/* tp->lock is held. */
-+static void tg3_phy_gather_ump_data(struct tg3 *tp, u32 *data)
-+{
-+ u32 reg, val;
-+
-+ val = 0;
-+ if (!tg3_readphy(tp, MII_BMCR, ®))
-+ val = reg << 16;
-+ if (!tg3_readphy(tp, MII_BMSR, ®))
-+ val |= (reg & 0xffff);
-+ *data++ = val;
-+
-+ val = 0;
-+ if (!tg3_readphy(tp, MII_ADVERTISE, ®))
-+ val = reg << 16;
-+ if (!tg3_readphy(tp, MII_LPA, ®))
-+ val |= (reg & 0xffff);
-+ *data++ = val;
-+
-+ val = 0;
-+ if (!(tp->phy_flags & TG3_PHYFLG_MII_SERDES)) {
-+ if (!tg3_readphy(tp, MII_CTRL1000, ®))
-+ val = reg << 16;
-+ if (!tg3_readphy(tp, MII_STAT1000, ®))
-+ val |= (reg & 0xffff);
-+ }
-+ *data++ = val;
-+
-+ if (!tg3_readphy(tp, MII_PHYADDR, ®))
-+ val = reg << 16;
-+ else
-+ val = 0;
-+ *data++ = val;
-+}
-+
-+/* tp->lock is held. */
-+static void tg3_ump_link_report(struct tg3 *tp)
-+{
-+ u32 data[4];
-+
-+ if (!tg3_flag(tp, 5780_CLASS) || !tg3_flag(tp, ENABLE_ASF))
-+ return;
-+
-+ tg3_phy_gather_ump_data(tp, data);
-+
-+ tg3_wait_for_event_ack(tp);
-+
-+ tg3_write_mem(tp, NIC_SRAM_FW_CMD_MBOX, FWCMD_NICDRV_LINK_UPDATE);
-+ tg3_write_mem(tp, NIC_SRAM_FW_CMD_LEN_MBOX, 14);
-+ tg3_write_mem(tp, NIC_SRAM_FW_CMD_DATA_MBOX + 0x0, data[0]);
-+ tg3_write_mem(tp, NIC_SRAM_FW_CMD_DATA_MBOX + 0x4, data[1]);
-+ tg3_write_mem(tp, NIC_SRAM_FW_CMD_DATA_MBOX + 0x8, data[2]);
-+ tg3_write_mem(tp, NIC_SRAM_FW_CMD_DATA_MBOX + 0xc, data[3]);
-+
-+ tg3_generate_fw_event(tp);
-+}
-+
-+/* tp->lock is held. */
-+static void tg3_stop_fw(struct tg3 *tp)
-+{
-+ if (tg3_flag(tp, ENABLE_ASF) && !tg3_flag(tp, ENABLE_APE)) {
-+ /* Wait for RX cpu to ACK the previous event. */
-+ tg3_wait_for_event_ack(tp);
-+
-+ tg3_write_mem(tp, NIC_SRAM_FW_CMD_MBOX, FWCMD_NICDRV_PAUSE_FW);
-+
-+ tg3_generate_fw_event(tp);
-+
-+ /* Wait for RX cpu to ACK this event. */
-+ tg3_wait_for_event_ack(tp);
-+ }
-+}
-+
-+/* tp->lock is held. */
-+static void tg3_write_sig_pre_reset(struct tg3 *tp, int kind)
-+{
-+ tg3_write_mem(tp, NIC_SRAM_FIRMWARE_MBOX,
-+ NIC_SRAM_FIRMWARE_MBOX_MAGIC1);
-+
-+ if (tg3_flag(tp, ASF_NEW_HANDSHAKE)) {
-+ switch (kind) {
-+ case RESET_KIND_INIT:
-+ tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX,
-+ DRV_STATE_START);
-+ break;
-+
-+ case RESET_KIND_SHUTDOWN:
-+ tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX,
-+ DRV_STATE_UNLOAD);
-+ break;
-+
-+ case RESET_KIND_SUSPEND:
-+ tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX,
-+ DRV_STATE_SUSPEND);
-+ break;
-+
-+ default:
-+ break;
-+ }
-+ }
-+}
-+
-+/* tp->lock is held. */
-+static void tg3_write_sig_post_reset(struct tg3 *tp, int kind)
-+{
-+ if (tg3_flag(tp, ASF_NEW_HANDSHAKE)) {
-+ switch (kind) {
-+ case RESET_KIND_INIT:
-+ tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX,
-+ DRV_STATE_START_DONE);
-+ break;
-+
-+ case RESET_KIND_SHUTDOWN:
-+ tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX,
-+ DRV_STATE_UNLOAD_DONE);
-+ break;
-+
-+ default:
-+ break;
-+ }
-+ }
-+}
-+
-+/* tp->lock is held. */
-+static void tg3_write_sig_legacy(struct tg3 *tp, int kind)
-+{
-+ if (tg3_flag(tp, ENABLE_ASF)) {
-+ switch (kind) {
-+ case RESET_KIND_INIT:
-+ tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX,
-+ DRV_STATE_START);
-+ break;
-+
-+ case RESET_KIND_SHUTDOWN:
-+ tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX,
-+ DRV_STATE_UNLOAD);
-+ break;
-+
-+ case RESET_KIND_SUSPEND:
-+ tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX,
-+ DRV_STATE_SUSPEND);
-+ break;
-+
-+ default:
-+ break;
-+ }
-+ }
-+}
-+
-+static int tg3_poll_fw(struct tg3 *tp)
-+{
-+ int i;
-+ u32 val;
-+ int fw_timeout = 350000;
-+
-+ if (tg3_flag(tp, NO_FWARE_REPORTED))
-+ return 0;
-+
-+ if (tg3_flag(tp, IS_SSB_CORE)) {
-+ /* We don't use firmware. */
-+ return 0;
-+ }
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5906) {
-+ /* Wait up to 20ms for init done. */
-+ for (i = 0; i < 200; i++) {
-+ if (tr32(VCPU_STATUS) & VCPU_STATUS_INIT_DONE)
-+ return 0;
-+ if (pci_channel_offline(tp->pdev))
-+ return -ENODEV;
-+
-+ udelay(100);
-+ }
-+ return -ENODEV;
-+ }
-+
-+ /* Wait for firmware initialization to complete. */
-+ for (i = 0; i < fw_timeout; i++) {
-+ tg3_read_mem(tp, NIC_SRAM_FIRMWARE_MBOX, &val);
-+ if (val == ~NIC_SRAM_FIRMWARE_MBOX_MAGIC1)
-+ break;
-+ if (pci_channel_offline(tp->pdev)) {
-+ if (!tg3_flag(tp, NO_FWARE_REPORTED)) {
-+ tg3_flag_set(tp, NO_FWARE_REPORTED);
-+ netdev_info(tp->dev, "No firmware running\n");
-+ }
-+
-+ break;
-+ }
-+
-+ udelay(10);
-+ }
-+
-+ /* Chip might not be fitted with firmware. Some Sun onboard
-+ * parts are configured like that. So don't signal the timeout
-+ * of the above loop as an error, but do report the lack of
-+ * running firmware once.
-+ */
-+ if (i >= fw_timeout && !tg3_flag(tp, NO_FWARE_REPORTED)) {
-+ tg3_flag_set(tp, NO_FWARE_REPORTED);
-+
-+ netdev_info(tp->dev, "No firmware running\n");
-+ }
-+
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_57765_A0) {
-+ /* The 57765 A0 needs a little more
-+ * time to do some important work.
-+ */
-+ mdelay(10);
-+ }
-+
-+ return 0;
-+}
-+
-+static void tg3_link_report(struct tg3 *tp)
-+{
-+ if (!netif_carrier_ok(tp->dev)) {
-+ netif_info(tp, link, tp->dev, "Link is down\n");
-+ tg3_ump_link_report(tp);
-+ } else if (netif_msg_link(tp)) {
-+ netdev_info(tp->dev, "Link is up at %d Mbps, %s duplex\n",
-+ (tp->link_config.active_speed == SPEED_1000 ?
-+ 1000 :
-+ (tp->link_config.active_speed == SPEED_100 ?
-+ 100 : 10)),
-+ (tp->link_config.active_duplex == DUPLEX_FULL ?
-+ "full" : "half"));
-+
-+ netdev_info(tp->dev, "Flow control is %s for TX and %s for RX\n",
-+ (tp->link_config.active_flowctrl & FLOW_CTRL_TX) ?
-+ "on" : "off",
-+ (tp->link_config.active_flowctrl & FLOW_CTRL_RX) ?
-+ "on" : "off");
-+
-+ if (tp->phy_flags & TG3_PHYFLG_EEE_CAP)
-+ netdev_info(tp->dev, "EEE is %s\n",
-+ tp->setlpicnt ? "enabled" : "disabled");
-+
-+ tg3_ump_link_report(tp);
-+ }
-+
-+ tp->link_up = netif_carrier_ok(tp->dev);
-+}
-+
-+static u32 tg3_decode_flowctrl_1000T(u32 adv)
-+{
-+ u32 flowctrl = 0;
-+
-+ if (adv & ADVERTISE_PAUSE_CAP) {
-+ flowctrl |= FLOW_CTRL_RX;
-+ if (!(adv & ADVERTISE_PAUSE_ASYM))
-+ flowctrl |= FLOW_CTRL_TX;
-+ } else if (adv & ADVERTISE_PAUSE_ASYM)
-+ flowctrl |= FLOW_CTRL_TX;
-+
-+ return flowctrl;
-+}
-+
-+static u16 tg3_advert_flowctrl_1000X(u8 flow_ctrl)
-+{
-+ u16 miireg;
-+
-+ if ((flow_ctrl & FLOW_CTRL_TX) && (flow_ctrl & FLOW_CTRL_RX))
-+ miireg = ADVERTISE_1000XPAUSE;
-+ else if (flow_ctrl & FLOW_CTRL_TX)
-+ miireg = ADVERTISE_1000XPSE_ASYM;
-+ else if (flow_ctrl & FLOW_CTRL_RX)
-+ miireg = ADVERTISE_1000XPAUSE | ADVERTISE_1000XPSE_ASYM;
-+ else
-+ miireg = 0;
-+
-+ return miireg;
-+}
-+
-+static u32 tg3_decode_flowctrl_1000X(u32 adv)
-+{
-+ u32 flowctrl = 0;
-+
-+ if (adv & ADVERTISE_1000XPAUSE) {
-+ flowctrl |= FLOW_CTRL_RX;
-+ if (!(adv & ADVERTISE_1000XPSE_ASYM))
-+ flowctrl |= FLOW_CTRL_TX;
-+ } else if (adv & ADVERTISE_1000XPSE_ASYM)
-+ flowctrl |= FLOW_CTRL_TX;
-+
-+ return flowctrl;
-+}
-+
-+static u8 tg3_resolve_flowctrl_1000X(u16 lcladv, u16 rmtadv)
-+{
-+ u8 cap = 0;
-+
-+ if (lcladv & rmtadv & ADVERTISE_1000XPAUSE) {
-+ cap = FLOW_CTRL_TX | FLOW_CTRL_RX;
-+ } else if (lcladv & rmtadv & ADVERTISE_1000XPSE_ASYM) {
-+ if (lcladv & ADVERTISE_1000XPAUSE)
-+ cap = FLOW_CTRL_RX;
-+ if (rmtadv & ADVERTISE_1000XPAUSE)
-+ cap = FLOW_CTRL_TX;
-+ }
-+
-+ return cap;
-+}
-+
-+static void tg3_setup_flow_control(struct tg3 *tp, u32 lcladv, u32 rmtadv)
-+{
-+ u8 autoneg;
-+ u8 flowctrl = 0;
-+ u32 old_rx_mode = tp->rx_mode;
-+ u32 old_tx_mode = tp->tx_mode;
-+
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if (tg3_flag(tp, USE_PHYLIB))
-+ autoneg = tp->mdio_bus->phy_map[tp->phy_addr]->autoneg;
-+ else
-+#endif /* BCM_INCLUDE_PHYLIB_SUPPORT */
-+ autoneg = tp->link_config.autoneg;
-+
-+ if (autoneg == AUTONEG_ENABLE && tg3_flag(tp, PAUSE_AUTONEG)) {
-+ if (tp->phy_flags & TG3_PHYFLG_ANY_SERDES)
-+ flowctrl = tg3_resolve_flowctrl_1000X(lcladv, rmtadv);
-+ else
-+ flowctrl = mii_resolve_flowctrl_fdx(lcladv, rmtadv);
-+ } else
-+ flowctrl = tp->link_config.flowctrl;
-+
-+ tp->link_config.active_flowctrl = flowctrl;
-+
-+ if (flowctrl & FLOW_CTRL_RX)
-+ tp->rx_mode |= RX_MODE_FLOW_CTRL_ENABLE;
-+ else
-+ tp->rx_mode &= ~RX_MODE_FLOW_CTRL_ENABLE;
-+
-+ if (old_rx_mode != tp->rx_mode)
-+ tw32_f(MAC_RX_MODE, tp->rx_mode);
-+
-+ if (flowctrl & FLOW_CTRL_TX)
-+ tp->tx_mode |= TX_MODE_FLOW_CTRL_ENABLE;
-+ else
-+ tp->tx_mode &= ~TX_MODE_FLOW_CTRL_ENABLE;
-+
-+ if (old_tx_mode != tp->tx_mode)
-+ tw32_f(MAC_TX_MODE, tp->tx_mode);
-+}
-+
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+static void tg3_adjust_link(struct net_device *dev)
-+{
-+ u8 oldflowctrl, linkmesg = 0;
-+ u32 mac_mode, lcl_adv, rmt_adv;
-+ struct tg3 *tp = netdev_priv(dev);
-+ struct phy_device *phydev = tp->mdio_bus->phy_map[tp->phy_addr];
-+
-+ spin_lock_bh(&tp->lock);
-+
-+ mac_mode = tp->mac_mode & ~(MAC_MODE_PORT_MODE_MASK |
-+ MAC_MODE_HALF_DUPLEX);
-+
-+ oldflowctrl = tp->link_config.active_flowctrl;
-+
-+ if (phydev->link) {
-+ lcl_adv = 0;
-+ rmt_adv = 0;
-+
-+ if (phydev->speed == SPEED_100 || phydev->speed == SPEED_10)
-+ mac_mode |= MAC_MODE_PORT_MODE_MII;
-+ else if (phydev->speed == SPEED_1000 ||
-+ tg3_asic_rev(tp) != ASIC_REV_5785)
-+ mac_mode |= MAC_MODE_PORT_MODE_GMII;
-+ else
-+ mac_mode |= MAC_MODE_PORT_MODE_MII;
-+
-+ if (phydev->duplex == DUPLEX_HALF)
-+ mac_mode |= MAC_MODE_HALF_DUPLEX;
-+ else {
-+ lcl_adv = mii_advertise_flowctrl(
-+ tp->link_config.flowctrl);
-+
-+ if (phydev->pause)
-+ rmt_adv = LPA_PAUSE_CAP;
-+ if (phydev->asym_pause)
-+ rmt_adv |= LPA_PAUSE_ASYM;
-+ }
-+
-+ tg3_setup_flow_control(tp, lcl_adv, rmt_adv);
-+ } else
-+ mac_mode |= MAC_MODE_PORT_MODE_GMII;
-+
-+ if (mac_mode != tp->mac_mode) {
-+ tp->mac_mode = mac_mode;
-+ tw32_f(MAC_MODE, tp->mac_mode);
-+ udelay(40);
-+ }
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5785) {
-+ if (phydev->speed == SPEED_10)
-+ tw32(MAC_MI_STAT,
-+ MAC_MI_STAT_10MBPS_MODE |
-+ MAC_MI_STAT_LNKSTAT_ATTN_ENAB);
-+ else
-+ tw32(MAC_MI_STAT, MAC_MI_STAT_LNKSTAT_ATTN_ENAB);
-+ }
-+
-+ if (phydev->speed == SPEED_1000 && phydev->duplex == DUPLEX_HALF)
-+ tw32(MAC_TX_LENGTHS,
-+ ((2 << TX_LENGTHS_IPG_CRS_SHIFT) |
-+ (6 << TX_LENGTHS_IPG_SHIFT) |
-+ (0xff << TX_LENGTHS_SLOT_TIME_SHIFT)));
-+ else
-+ tw32(MAC_TX_LENGTHS,
-+ ((2 << TX_LENGTHS_IPG_CRS_SHIFT) |
-+ (6 << TX_LENGTHS_IPG_SHIFT) |
-+ (32 << TX_LENGTHS_SLOT_TIME_SHIFT)));
-+
-+ if (phydev->link != tp->old_link ||
-+ phydev->speed != tp->link_config.active_speed ||
-+ phydev->duplex != tp->link_config.active_duplex ||
-+ oldflowctrl != tp->link_config.active_flowctrl)
-+ linkmesg = 1;
-+
-+ tp->old_link = phydev->link;
-+ tp->link_config.active_speed = phydev->speed;
-+ tp->link_config.active_duplex = phydev->duplex;
-+
-+ spin_unlock_bh(&tp->lock);
-+
-+ if (linkmesg)
-+ tg3_link_report(tp);
-+}
-+
-+static int tg3_phy_init(struct tg3 *tp)
-+{
-+ struct phy_device *phydev;
-+
-+ if (tp->phy_flags & TG3_PHYFLG_IS_CONNECTED)
-+ return 0;
-+
-+ /* Bring the PHY back to a known state. */
-+ tg3_bmcr_reset(tp);
-+
-+ phydev = tp->mdio_bus->phy_map[tp->phy_addr];
-+
-+ /* Attach the MAC to the PHY. */
-+ phydev = phy_connect(tp->dev, dev_name(&phydev->dev),
-+ tg3_adjust_link, phydev->interface);
-+ if (IS_ERR(phydev)) {
-+ dev_err(&tp->pdev->dev, "Could not attach to PHY\n");
-+ return PTR_ERR(phydev);
-+ }
-+
-+ /* Mask with MAC supported features. */
-+ switch (phydev->interface) {
-+ case PHY_INTERFACE_MODE_GMII:
-+ case PHY_INTERFACE_MODE_RGMII:
-+ if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) {
-+ phydev->supported &= (PHY_GBIT_FEATURES |
-+ SUPPORTED_Pause |
-+ SUPPORTED_Asym_Pause);
-+ break;
-+ }
-+ /* fallthru */
-+ case PHY_INTERFACE_MODE_MII:
-+ phydev->supported &= (PHY_BASIC_FEATURES |
-+ SUPPORTED_Pause |
-+ SUPPORTED_Asym_Pause);
-+ break;
-+ default:
-+ phy_disconnect(tp->mdio_bus->phy_map[tp->phy_addr]);
-+ return -EINVAL;
-+ }
-+
-+ tp->phy_flags |= TG3_PHYFLG_IS_CONNECTED;
-+
-+ phydev->advertising = phydev->supported;
-+
-+ return 0;
-+}
-+
-+static void tg3_phy_start(struct tg3 *tp)
-+{
-+ struct phy_device *phydev;
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_IS_CONNECTED))
-+ return;
-+
-+ phydev = tp->mdio_bus->phy_map[tp->phy_addr];
-+
-+ if (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER) {
-+ tp->phy_flags &= ~TG3_PHYFLG_IS_LOW_POWER;
-+ phydev->speed = tp->link_config.speed;
-+ phydev->duplex = tp->link_config.duplex;
-+ phydev->autoneg = tp->link_config.autoneg;
-+ phydev->advertising = tp->link_config.advertising;
-+ }
-+
-+ phy_start(phydev);
-+
-+ phy_start_aneg(phydev);
-+}
-+
-+static void tg3_phy_stop(struct tg3 *tp)
-+{
-+ if (!(tp->phy_flags & TG3_PHYFLG_IS_CONNECTED))
-+ return;
-+
-+ phy_stop(tp->mdio_bus->phy_map[tp->phy_addr]);
-+}
-+
-+static void tg3_phy_fini(struct tg3 *tp)
-+{
-+ if (tp->phy_flags & TG3_PHYFLG_IS_CONNECTED) {
-+ phy_disconnect(tp->mdio_bus->phy_map[tp->phy_addr]);
-+ tp->phy_flags &= ~TG3_PHYFLG_IS_CONNECTED;
-+ }
-+}
-+#else
-+#define tg3_phy_init(tp) 0
-+#define tg3_phy_start(tp)
-+#define tg3_phy_stop(tp)
-+#define tg3_phy_fini(tp)
-+#endif /* BCM_INCLUDE_PHYLIB_SUPPORT */
-+
-+static int tg3_phy_set_extloopbk(struct tg3 *tp)
-+{
-+ int err;
-+ u32 val;
-+
-+ if (tp->phy_flags & TG3_PHYFLG_IS_FET)
-+ return 0;
-+
-+ if ((tp->phy_id & TG3_PHY_ID_MASK) == TG3_PHY_ID_BCM5401) {
-+ /* Cannot do read-modify-write on 5401 */
-+ err = tg3_phy_auxctl_write(tp,
-+ MII_TG3_AUXCTL_SHDWSEL_AUXCTL,
-+ MII_TG3_AUXCTL_ACTL_EXTLOOPBK |
-+ 0x4c20);
-+ goto done;
-+ }
-+
-+ err = tg3_phy_auxctl_read(tp,
-+ MII_TG3_AUXCTL_SHDWSEL_AUXCTL, &val);
-+ if (err)
-+ return err;
-+
-+ val |= MII_TG3_AUXCTL_ACTL_EXTLOOPBK;
-+ err = tg3_phy_auxctl_write(tp,
-+ MII_TG3_AUXCTL_SHDWSEL_AUXCTL, val);
-+
-+done:
-+ return err;
-+}
-+
-+static void tg3_phy_fet_toggle_apd(struct tg3 *tp, bool enable)
-+{
-+ u32 phytest;
-+
-+ if (!tg3_readphy(tp, MII_TG3_FET_TEST, &phytest)) {
-+ u32 phy;
-+
-+ tg3_writephy(tp, MII_TG3_FET_TEST,
-+ phytest | MII_TG3_FET_SHADOW_EN);
-+ if (!tg3_readphy(tp, MII_TG3_FET_SHDW_AUXSTAT2, &phy)) {
-+ if (enable)
-+ phy |= MII_TG3_FET_SHDW_AUXSTAT2_APD;
-+ else
-+ phy &= ~MII_TG3_FET_SHDW_AUXSTAT2_APD;
-+ tg3_writephy(tp, MII_TG3_FET_SHDW_AUXSTAT2, phy);
-+ }
-+ tg3_writephy(tp, MII_TG3_FET_TEST, phytest);
-+ }
-+}
-+
-+static void tg3_phy_toggle_apd(struct tg3 *tp, bool enable)
-+{
-+ u32 reg;
-+
-+ if (!tg3_flag(tp, 5705_PLUS) ||
-+ (tg3_flag(tp, 5717_PLUS) &&
-+ (tp->phy_flags & TG3_PHYFLG_MII_SERDES)))
-+ return;
-+
-+ if (tp->phy_flags & TG3_PHYFLG_IS_FET) {
-+ tg3_phy_fet_toggle_apd(tp, enable);
-+ return;
-+ }
-+
-+#ifndef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if (tg3_asic_rev(tp) == ASIC_REV_5785) {
-+ reg = MII_TG3_MISC_SHDW_SCR5_TRDDAPD |
-+ MII_TG3_MISC_SHDW_SCR5_LPED |
-+ MII_TG3_MISC_SHDW_SCR5_DLPTLM |
-+ MII_TG3_MISC_SHDW_SCR5_SDTL;
-+ if ((tp->phy_id & ~TG3_PHY_ID_MASK) < 0x3) {
-+ reg |= MII_TG3_MISC_SHDW_SCR5_C125OE;
-+ if (!enable)
-+ reg |= MII_TG3_MISC_SHDW_SCR5_DLLAPD;
-+ }
-+ } else {
-+#endif
-+ reg = MII_TG3_MISC_SHDW_SCR5_LPED |
-+ MII_TG3_MISC_SHDW_SCR5_DLPTLM |
-+ MII_TG3_MISC_SHDW_SCR5_SDTL |
-+ MII_TG3_MISC_SHDW_SCR5_C125OE;
-+ if (tg3_asic_rev(tp) != ASIC_REV_5784 || !enable)
-+ reg |= MII_TG3_MISC_SHDW_SCR5_DLLAPD;
-+#ifndef BCM_INCLUDE_PHYLIB_SUPPORT
-+ }
-+#endif
-+
-+ tg3_phy_shdw_write(tp, MII_TG3_MISC_SHDW_SCR5_SEL, reg);
-+
-+
-+ reg = MII_TG3_MISC_SHDW_APD_WKTM_84MS;
-+ if (enable)
-+ reg |= MII_TG3_MISC_SHDW_APD_ENABLE;
-+
-+ tg3_phy_shdw_write(tp, MII_TG3_MISC_SHDW_APD_SEL, reg);
-+}
-+
-+static void tg3_phy_toggle_automdix(struct tg3 *tp, bool enable)
-+{
-+ u32 phy;
-+
-+ if (!tg3_flag(tp, 5705_PLUS) ||
-+ (tp->phy_flags & TG3_PHYFLG_ANY_SERDES))
-+ return;
-+
-+ if (tp->phy_flags & TG3_PHYFLG_IS_FET) {
-+ u32 ephy;
-+
-+ if (!tg3_readphy(tp, MII_TG3_FET_TEST, &ephy)) {
-+ u32 reg = MII_TG3_FET_SHDW_MISCCTRL;
-+
-+ tg3_writephy(tp, MII_TG3_FET_TEST,
-+ ephy | MII_TG3_FET_SHADOW_EN);
-+ if (!tg3_readphy(tp, reg, &phy)) {
-+ if (enable)
-+ phy |= MII_TG3_FET_SHDW_MISCCTRL_MDIX;
-+ else
-+ phy &= ~MII_TG3_FET_SHDW_MISCCTRL_MDIX;
-+ tg3_writephy(tp, reg, phy);
-+ }
-+ tg3_writephy(tp, MII_TG3_FET_TEST, ephy);
-+ }
-+ } else {
-+ int ret;
-+
-+ ret = tg3_phy_auxctl_read(tp,
-+ MII_TG3_AUXCTL_SHDWSEL_MISC, &phy);
-+ if (!ret) {
-+ if (enable)
-+ phy |= MII_TG3_AUXCTL_MISC_FORCE_AMDIX;
-+ else
-+ phy &= ~MII_TG3_AUXCTL_MISC_FORCE_AMDIX;
-+ tg3_phy_auxctl_write(tp,
-+ MII_TG3_AUXCTL_SHDWSEL_MISC, phy);
-+ }
-+ }
-+}
-+
-+static void tg3_phy_set_wirespeed(struct tg3 *tp)
-+{
-+ int ret;
-+ u32 val;
-+
-+ if (tp->phy_flags & TG3_PHYFLG_NO_ETH_WIRE_SPEED)
-+ return;
-+
-+ ret = tg3_phy_auxctl_read(tp, MII_TG3_AUXCTL_SHDWSEL_MISC, &val);
-+ if (!ret)
-+ tg3_phy_auxctl_write(tp, MII_TG3_AUXCTL_SHDWSEL_MISC,
-+ val | MII_TG3_AUXCTL_MISC_WIRESPD_EN);
-+}
-+
-+static void tg3_phy_apply_otp(struct tg3 *tp)
-+{
-+ u32 otp, phy;
-+
-+ if (!tp->phy_otp)
-+ return;
-+
-+ otp = tp->phy_otp;
-+
-+ if (tg3_phy_toggle_auxctl_smdsp(tp, true))
-+ return;
-+
-+ phy = ((otp & TG3_OTP_AGCTGT_MASK) >> TG3_OTP_AGCTGT_SHIFT);
-+ phy |= MII_TG3_DSP_TAP1_AGCTGT_DFLT;
-+ tg3_phydsp_write(tp, MII_TG3_DSP_TAP1, phy);
-+
-+ phy = ((otp & TG3_OTP_HPFFLTR_MASK) >> TG3_OTP_HPFFLTR_SHIFT) |
-+ ((otp & TG3_OTP_HPFOVER_MASK) >> TG3_OTP_HPFOVER_SHIFT);
-+ tg3_phydsp_write(tp, MII_TG3_DSP_AADJ1CH0, phy);
-+
-+ phy = ((otp & TG3_OTP_LPFDIS_MASK) >> TG3_OTP_LPFDIS_SHIFT);
-+ phy |= MII_TG3_DSP_AADJ1CH3_ADCCKADJ;
-+ tg3_phydsp_write(tp, MII_TG3_DSP_AADJ1CH3, phy);
-+
-+ phy = ((otp & TG3_OTP_VDAC_MASK) >> TG3_OTP_VDAC_SHIFT);
-+ tg3_phydsp_write(tp, MII_TG3_DSP_EXP75, phy);
-+
-+ phy = ((otp & TG3_OTP_10BTAMP_MASK) >> TG3_OTP_10BTAMP_SHIFT);
-+ tg3_phydsp_write(tp, MII_TG3_DSP_EXP96, phy);
-+
-+ phy = ((otp & TG3_OTP_ROFF_MASK) >> TG3_OTP_ROFF_SHIFT) |
-+ ((otp & TG3_OTP_RCOFF_MASK) >> TG3_OTP_RCOFF_SHIFT);
-+ tg3_phydsp_write(tp, MII_TG3_DSP_EXP97, phy);
-+
-+ tg3_phy_toggle_auxctl_smdsp(tp, false);
-+}
-+
-+static void tg3_eee_pull_config(struct tg3 *tp, struct ethtool_eee *eee)
-+{
-+ u32 val;
-+ struct ethtool_eee *dest = &tp->eee;
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP))
-+ return;
-+
-+ if (eee)
-+ dest = eee;
-+
-+ if (tg3_phy_cl45_read(tp, MDIO_MMD_AN, TG3_CL45_D7_EEERES_STAT, &val))
-+ return;
-+
-+ /* Pull eee_active */
-+ if (val == TG3_CL45_D7_EEERES_STAT_LP_1000T ||
-+ val == TG3_CL45_D7_EEERES_STAT_LP_100TX) {
-+ dest->eee_active = 1;
-+ } else
-+ dest->eee_active = 0;
-+
-+ /* Pull lp advertised settings */
-+ if (tg3_phy_cl45_read(tp, MDIO_MMD_AN, MDIO_AN_EEE_LPABLE, &val))
-+ return;
-+ dest->lp_advertised = mmd_eee_adv_to_ethtool_adv_t(val);
-+
-+ /* Pull advertised and eee_enabled settings */
-+ if (tg3_phy_cl45_read(tp, MDIO_MMD_AN, MDIO_AN_EEE_ADV, &val))
-+ return;
-+ dest->eee_enabled = !!val;
-+ dest->advertised = mmd_eee_adv_to_ethtool_adv_t(val);
-+
-+ /* Pull tx_lpi_enabled */
-+ val = tr32(TG3_CPMU_EEE_MODE);
-+ dest->tx_lpi_enabled = !!(val & TG3_CPMU_EEEMD_LPI_IN_TX);
-+
-+ /* Pull lpi timer value */
-+ dest->tx_lpi_timer = tr32(TG3_CPMU_EEE_DBTMR1) & 0xffff;
-+}
-+
-+static void tg3_phy_eee_adjust(struct tg3 *tp, bool current_link_up)
-+{
-+ u32 val;
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP))
-+ return;
-+
-+#ifndef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if ((tp->phy_id & TG3_PHY_ID_MASK) == TG3_PHY_ID_BCM50612E)
-+ return;
-+#endif
-+
-+ tp->setlpicnt = 0;
-+
-+ if (tp->link_config.autoneg == AUTONEG_ENABLE &&
-+ current_link_up &&
-+ tp->link_config.active_duplex == DUPLEX_FULL &&
-+ (tp->link_config.active_speed == SPEED_100 ||
-+ tp->link_config.active_speed == SPEED_1000)) {
-+ u32 eeectl;
-+
-+ if (tp->link_config.active_speed == SPEED_1000)
-+ eeectl = TG3_CPMU_EEE_CTRL_EXIT_16_5_US;
-+ else
-+ eeectl = TG3_CPMU_EEE_CTRL_EXIT_36_US;
-+
-+ tw32(TG3_CPMU_EEE_CTRL, eeectl);
-+
-+ tg3_eee_pull_config(tp, NULL);
-+ if (tp->eee.eee_active)
-+ tp->setlpicnt = 2;
-+ }
-+
-+ if (!tp->setlpicnt) {
-+ if (current_link_up &&
-+ !tg3_phy_toggle_auxctl_smdsp(tp, true)) {
-+ tg3_phydsp_write(tp, MII_TG3_DSP_TAP26, 0x0000);
-+ tg3_phy_toggle_auxctl_smdsp(tp, false);
-+ }
-+
-+ val = tr32(TG3_CPMU_EEE_MODE);
-+ tw32(TG3_CPMU_EEE_MODE, val & ~TG3_CPMU_EEEMD_LPI_ENABLE);
-+ }
-+}
-+
-+static void tg3_phy_eee_enable(struct tg3 *tp)
-+{
-+ u32 val;
-+
-+ if (tp->link_config.active_speed == SPEED_1000 &&
-+ (tg3_asic_rev(tp) == ASIC_REV_5717 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5719 ||
-+ tg3_flag(tp, 57765_CLASS)) &&
-+ !tg3_phy_toggle_auxctl_smdsp(tp, true)) {
-+ val = MII_TG3_DSP_TAP26_ALNOKO |
-+ MII_TG3_DSP_TAP26_RMRXSTO;
-+ tg3_phydsp_write(tp, MII_TG3_DSP_TAP26, val);
-+ tg3_phy_toggle_auxctl_smdsp(tp, false);
-+ }
-+
-+ val = tr32(TG3_CPMU_EEE_MODE);
-+ tw32(TG3_CPMU_EEE_MODE, val | TG3_CPMU_EEEMD_LPI_ENABLE);
-+}
-+
-+static int tg3_wait_macro_done(struct tg3 *tp)
-+{
-+ int limit = 100;
-+
-+ while (limit--) {
-+ u32 tmp32;
-+
-+ if (!tg3_readphy(tp, MII_TG3_DSP_CONTROL, &tmp32)) {
-+ if ((tmp32 & 0x1000) == 0)
-+ break;
-+ }
-+ }
-+ if (limit < 0)
-+ return -EBUSY;
-+
-+ return 0;
-+}
-+
-+static int tg3_phy_write_and_check_testpat(struct tg3 *tp, int *resetp)
-+{
-+ static const u32 test_pat[4][6] = {
-+ { 0x00005555, 0x00000005, 0x00002aaa, 0x0000000a, 0x00003456, 0x00000003 },
-+ { 0x00002aaa, 0x0000000a, 0x00003333, 0x00000003, 0x0000789a, 0x00000005 },
-+ { 0x00005a5a, 0x00000005, 0x00002a6a, 0x0000000a, 0x00001bcd, 0x00000003 },
-+ { 0x00002a5a, 0x0000000a, 0x000033c3, 0x00000003, 0x00002ef1, 0x00000005 }
-+ };
-+ int chan;
-+
-+ for (chan = 0; chan < 4; chan++) {
-+ int i;
-+
-+ tg3_writephy(tp, MII_TG3_DSP_ADDRESS,
-+ (chan * 0x2000) | 0x0200);
-+ tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0002);
-+
-+ for (i = 0; i < 6; i++)
-+ tg3_writephy(tp, MII_TG3_DSP_RW_PORT,
-+ test_pat[chan][i]);
-+
-+ tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0202);
-+ if (tg3_wait_macro_done(tp)) {
-+ *resetp = 1;
-+ return -EBUSY;
-+ }
-+
-+ tg3_writephy(tp, MII_TG3_DSP_ADDRESS,
-+ (chan * 0x2000) | 0x0200);
-+ tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0082);
-+ if (tg3_wait_macro_done(tp)) {
-+ *resetp = 1;
-+ return -EBUSY;
-+ }
-+
-+ tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0802);
-+ if (tg3_wait_macro_done(tp)) {
-+ *resetp = 1;
-+ return -EBUSY;
-+ }
-+
-+ for (i = 0; i < 6; i += 2) {
-+ u32 low, high;
-+
-+ if (tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &low) ||
-+ tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &high) ||
-+ tg3_wait_macro_done(tp)) {
-+ *resetp = 1;
-+ return -EBUSY;
-+ }
-+ low &= 0x7fff;
-+ high &= 0x000f;
-+ if (low != test_pat[chan][i] ||
-+ high != test_pat[chan][i+1]) {
-+ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x000b);
-+ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x4001);
-+ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x4005);
-+
-+ return -EBUSY;
-+ }
-+ }
-+ }
-+
-+ return 0;
-+}
-+
-+static int tg3_phy_reset_chanpat(struct tg3 *tp)
-+{
-+ int chan;
-+
-+ for (chan = 0; chan < 4; chan++) {
-+ int i;
-+
-+ tg3_writephy(tp, MII_TG3_DSP_ADDRESS,
-+ (chan * 0x2000) | 0x0200);
-+ tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0002);
-+ for (i = 0; i < 6; i++)
-+ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x000);
-+ tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0202);
-+ if (tg3_wait_macro_done(tp))
-+ return -EBUSY;
-+ }
-+
-+ return 0;
-+}
-+
-+static int tg3_phy_reset_5703_4_5(struct tg3 *tp)
-+{
-+ u32 reg32, phy9_orig;
-+ int retries, do_phy_reset, err;
-+
-+ retries = 10;
-+ do_phy_reset = 1;
-+ do {
-+ if (do_phy_reset) {
-+ err = tg3_bmcr_reset(tp);
-+ if (err)
-+ return err;
-+ do_phy_reset = 0;
-+ }
-+
-+ /* Disable transmitter and interrupt. */
-+ if (tg3_readphy(tp, MII_TG3_EXT_CTRL, ®32))
-+ continue;
-+
-+ reg32 |= 0x3000;
-+ tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32);
-+
-+ /* Set full-duplex, 1000 mbps. */
-+ tg3_writephy(tp, MII_BMCR,
-+ BMCR_FULLDPLX | BMCR_SPEED1000);
-+
-+ /* Set to master mode. */
-+ if (tg3_readphy(tp, MII_CTRL1000, &phy9_orig))
-+ continue;
-+
-+ tg3_writephy(tp, MII_CTRL1000,
-+ CTL1000_AS_MASTER | CTL1000_ENABLE_MASTER);
-+
-+ err = tg3_phy_toggle_auxctl_smdsp(tp, true);
-+ if (err)
-+ return err;
-+
-+ /* Block the PHY control access. */
-+ tg3_phydsp_write(tp, 0x8005, 0x0800);
-+
-+ err = tg3_phy_write_and_check_testpat(tp, &do_phy_reset);
-+ if (!err)
-+ break;
-+ } while (--retries);
-+
-+ err = tg3_phy_reset_chanpat(tp);
-+ if (err)
-+ return err;
-+
-+ tg3_phydsp_write(tp, 0x8005, 0x0000);
-+
-+ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8200);
-+ tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0000);
-+
-+ tg3_phy_toggle_auxctl_smdsp(tp, false);
-+
-+ tg3_writephy(tp, MII_CTRL1000, phy9_orig);
-+
-+ if (!tg3_readphy(tp, MII_TG3_EXT_CTRL, ®32)) {
-+ reg32 &= ~0x3000;
-+ tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32);
-+ } else if (!err)
-+ err = -EBUSY;
-+
-+ return err;
-+}
-+
-+static void tg3_carrier_off(struct tg3 *tp)
-+{
-+ netif_carrier_off(tp->dev);
-+ tp->link_up = false;
-+}
-+
-+static void tg3_warn_mgmt_link_flap(struct tg3 *tp)
-+{
-+ if (tg3_flag(tp, ENABLE_ASF))
-+ netdev_warn(tp->dev,
-+ "Management side-band traffic will be interrupted during phy settings change\n");
-+}
-+
-+/* This will reset the tigon3 PHY if there is no valid
-+ * link unless the FORCE argument is non-zero.
-+ */
-+static int tg3_phy_reset(struct tg3 *tp)
-+{
-+ u32 val, cpmuctrl;
-+ int err;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5906) {
-+ val = tr32(GRC_MISC_CFG);
-+ tw32_f(GRC_MISC_CFG, val & ~GRC_MISC_CFG_EPHY_IDDQ);
-+ udelay(40);
-+ }
-+ err = tg3_readphy(tp, MII_BMSR, &val);
-+ err |= tg3_readphy(tp, MII_BMSR, &val);
-+ if (err != 0)
-+ return -EBUSY;
-+
-+ if (netif_running(tp->dev) && tp->link_up) {
-+ netif_carrier_off(tp->dev);
-+ tg3_link_report(tp);
-+ }
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5703 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5704 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5705) {
-+ err = tg3_phy_reset_5703_4_5(tp);
-+ if (err)
-+ return err;
-+ goto out;
-+ }
-+
-+ cpmuctrl = 0;
-+ if (tg3_asic_rev(tp) == ASIC_REV_5784 &&
-+ tg3_chip_rev(tp) != CHIPREV_5784_AX) {
-+ cpmuctrl = tr32(TG3_CPMU_CTRL);
-+ if (cpmuctrl & CPMU_CTRL_GPHY_10MB_RXONLY)
-+ tw32(TG3_CPMU_CTRL,
-+ cpmuctrl & ~CPMU_CTRL_GPHY_10MB_RXONLY);
-+ }
-+
-+ err = tg3_bmcr_reset(tp);
-+ if (err)
-+ return err;
-+
-+ if (cpmuctrl & CPMU_CTRL_GPHY_10MB_RXONLY) {
-+ val = MII_TG3_DSP_EXP8_AEDW | MII_TG3_DSP_EXP8_REJ2MHz;
-+ tg3_phydsp_write(tp, MII_TG3_DSP_EXP8, val);
-+
-+ tw32(TG3_CPMU_CTRL, cpmuctrl);
-+ }
-+
-+ if (tg3_chip_rev(tp) == CHIPREV_5784_AX ||
-+ tg3_chip_rev(tp) == CHIPREV_5761_AX) {
-+ val = tr32(TG3_CPMU_LSPD_1000MB_CLK);
-+ if ((val & CPMU_LSPD_1000MB_MACCLK_MASK) ==
-+ CPMU_LSPD_1000MB_MACCLK_12_5) {
-+ val &= ~CPMU_LSPD_1000MB_MACCLK_MASK;
-+ udelay(40);
-+ tw32_f(TG3_CPMU_LSPD_1000MB_CLK, val);
-+ }
-+ }
-+
-+ if (tg3_flag(tp, 5717_PLUS) &&
-+ (tp->phy_flags & TG3_PHYFLG_MII_SERDES))
-+ return 0;
-+
-+ tg3_phy_apply_otp(tp);
-+
-+ if (tp->phy_flags & TG3_PHYFLG_ENABLE_APD)
-+ tg3_phy_toggle_apd(tp, true);
-+ else
-+ tg3_phy_toggle_apd(tp, false);
-+
-+out:
-+#ifndef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if (tg3_asic_rev(tp) == ASIC_REV_5785 &&
-+ (tp->phy_id & TG3_PHY_ID_MASK) != TG3_PHY_ID_BCMAC131) {
-+ /* A0 */
-+ if (tp->phy_id == TG3_PHY_ID_BCM50612E &&
-+ !tg3_phy_toggle_auxctl_smdsp(tp, true)) {
-+ tg3_phydsp_write(tp, 0x0fff, 0x4000);
-+ tg3_phydsp_write(tp, 0x0021, 0x4600);
-+ tg3_phy_toggle_auxctl_smdsp(tp, false);
-+ }
-+
-+ if (((tp->phy_id & TG3_PHY_ID_MASK) == TG3_PHY_ID_BCM50610 ||
-+ (tp->phy_id & TG3_PHY_ID_MASK) == TG3_PHY_ID_BCM50610M) &&
-+ !tg3_phy_toggle_auxctl_smdsp(tp, true)) {
-+ val = MII_TG3_DSP_EXP8_REJ2MHz;
-+ tg3_phydsp_write(tp, MII_TG3_DSP_EXP8, val);
-+
-+ /* Apply workaround to A0 revision parts only. */
-+ if (tp->phy_id == TG3_PHY_ID_BCM50610 ||
-+ tp->phy_id == TG3_PHY_ID_BCM50610M) {
-+ tg3_phydsp_write(tp, 0x001F, 0x0300);
-+ tg3_phydsp_write(tp, 0x601F, 0x0002);
-+ tg3_phydsp_write(tp, 0x0F75, 0x003C);
-+ tg3_phydsp_write(tp, 0x0F96, 0x0010);
-+ tg3_phydsp_write(tp, 0x0F97, 0x0C0C);
-+ }
-+
-+ tg3_phy_toggle_auxctl_smdsp(tp, false);
-+ }
-+
-+ tg3_phy_auxctl_read(tp, MII_TG3_AUXCTL_SHDWSEL_MISC, &val);
-+ if (tg3_flag(tp, RGMII_INBAND_DISABLE))
-+ val |= MII_TG3_AUXCTL_MISC_RGMII_OOBSC;
-+ else
-+ val &= ~MII_TG3_AUXCTL_MISC_RGMII_OOBSC;
-+ tg3_phy_auxctl_write(tp, MII_TG3_AUXCTL_SHDWSEL_MISC, val);
-+
-+ /* Clear all mode configuration bits. */
-+ if (!tg3_phy_shdw_read(tp, MII_TG3_MISC_SHDW_RGMII_SEL, &val)) {
-+ val &= ~(MII_TG3_MISC_SHDW_RGMII_MODESEL0 |
-+ MII_TG3_MISC_SHDW_RGMII_MODESEL1);
-+ tg3_phy_shdw_write(tp,
-+ MII_TG3_MISC_SHDW_RGMII_SEL, val);
-+ }
-+ }
-+
-+ if ((tp->phy_id & TG3_PHY_ID_MASK) == TG3_PHY_ID_BCM57780 &&
-+ !tg3_phy_toggle_auxctl_smdsp(tp, true)) {
-+ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, MII_TG3_DSP_EXP75);
-+ tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &val);
-+ val |= MII_TG3_DSP_EXP75_SUP_CM_OSC;
-+ tg3_phydsp_write(tp, MII_TG3_DSP_EXP75, val);
-+
-+ tg3_phy_toggle_auxctl_smdsp(tp, false);
-+ }
-+#endif
-+ if ((tp->phy_flags & TG3_PHYFLG_ADC_BUG) &&
-+ !tg3_phy_toggle_auxctl_smdsp(tp, true)) {
-+ tg3_phydsp_write(tp, 0x201f, 0x2aaa);
-+ tg3_phydsp_write(tp, 0x000a, 0x0323);
-+ tg3_phy_toggle_auxctl_smdsp(tp, false);
-+ }
-+
-+ if (tp->phy_flags & TG3_PHYFLG_5704_A0_BUG) {
-+ tg3_writephy(tp, MII_TG3_MISC_SHDW, 0x8d68);
-+ tg3_writephy(tp, MII_TG3_MISC_SHDW, 0x8d68);
-+ }
-+
-+ if (tp->phy_flags & TG3_PHYFLG_BER_BUG) {
-+ if (!tg3_phy_toggle_auxctl_smdsp(tp, true)) {
-+ tg3_phydsp_write(tp, 0x000a, 0x310b);
-+ tg3_phydsp_write(tp, 0x201f, 0x9506);
-+ tg3_phydsp_write(tp, 0x401f, 0x14e2);
-+ tg3_phy_toggle_auxctl_smdsp(tp, false);
-+ }
-+ } else if (tp->phy_flags & TG3_PHYFLG_JITTER_BUG) {
-+ if (!tg3_phy_toggle_auxctl_smdsp(tp, true)) {
-+ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x000a);
-+ if (tp->phy_flags & TG3_PHYFLG_ADJUST_TRIM) {
-+ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x110b);
-+ tg3_writephy(tp, MII_TG3_TEST1,
-+ MII_TG3_TEST1_TRIM_EN | 0x4);
-+ } else
-+ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x010b);
-+
-+ tg3_phy_toggle_auxctl_smdsp(tp, false);
-+ }
-+ }
-+
-+ /* Set Extended packet length bit (bit 14) on all chips that */
-+ /* support jumbo frames */
-+ if ((tp->phy_id & TG3_PHY_ID_MASK) == TG3_PHY_ID_BCM5401) {
-+ /* Cannot do read-modify-write on 5401 */
-+ tg3_phy_auxctl_write(tp, MII_TG3_AUXCTL_SHDWSEL_AUXCTL, 0x4c20);
-+ } else if (tg3_flag(tp, JUMBO_CAPABLE)) {
-+ /* Set bit 14 with read-modify-write to preserve other bits */
-+ err = tg3_phy_auxctl_read(tp,
-+ MII_TG3_AUXCTL_SHDWSEL_AUXCTL, &val);
-+ if (!err)
-+ tg3_phy_auxctl_write(tp, MII_TG3_AUXCTL_SHDWSEL_AUXCTL,
-+ val | MII_TG3_AUXCTL_ACTL_EXTPKTLEN);
-+ }
-+
-+ /* Set phy register 0x10 bit 0 to high fifo elasticity to support
-+ * jumbo frames transmission.
-+ */
-+ if (tg3_flag(tp, JUMBO_CAPABLE)) {
-+ if (!tg3_readphy(tp, MII_TG3_EXT_CTRL, &val))
-+ tg3_writephy(tp, MII_TG3_EXT_CTRL,
-+ val | MII_TG3_EXT_CTRL_FIFO_ELASTIC);
-+ }
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5906) {
-+ /* adjust output voltage */
-+ tg3_writephy(tp, MII_TG3_FET_PTEST, 0x12);
-+ }
-+#ifndef BCM_INCLUDE_PHYLIB_SUPPORT
-+ else if (tp->phy_flags & TG3_PHYFLG_IS_FET) {
-+ u32 brcmtest;
-+ if (!tg3_readphy(tp, MII_TG3_FET_TEST, &brcmtest) &&
-+ !tg3_writephy(tp, MII_TG3_FET_TEST,
-+ brcmtest | MII_TG3_FET_SHADOW_EN)) {
-+ u32 reg = MII_TG3_FET_SHDW_AUXMODE4;
-+
-+ if (!tg3_readphy(tp, reg, &val)) {
-+ val &= ~MII_TG3_FET_SHDW_AM4_LED_MASK;
-+ val |= MII_TG3_FET_SHDW_AM4_LED_MODE1;
-+ tg3_writephy(tp, reg, val);
-+ }
-+
-+ tg3_writephy(tp, MII_TG3_FET_TEST, brcmtest);
-+ }
-+ }
-+#endif
-+
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5762_A0)
-+ tg3_phydsp_write(tp, 0xffb, 0x4000);
-+
-+ tg3_phy_toggle_automdix(tp, true);
-+ tg3_phy_set_wirespeed(tp);
-+ return 0;
-+}
-+
-+#define TG3_GPIO_MSG_DRVR_PRES 0x00000001
-+#define TG3_GPIO_MSG_NEED_VAUX 0x00000002
-+#define TG3_GPIO_MSG_MASK (TG3_GPIO_MSG_DRVR_PRES | \
-+ TG3_GPIO_MSG_NEED_VAUX)
-+#define TG3_GPIO_MSG_ALL_DRVR_PRES_MASK \
-+ ((TG3_GPIO_MSG_DRVR_PRES << 0) | \
-+ (TG3_GPIO_MSG_DRVR_PRES << 4) | \
-+ (TG3_GPIO_MSG_DRVR_PRES << 8) | \
-+ (TG3_GPIO_MSG_DRVR_PRES << 12))
-+
-+#define TG3_GPIO_MSG_ALL_NEED_VAUX_MASK \
-+ ((TG3_GPIO_MSG_NEED_VAUX << 0) | \
-+ (TG3_GPIO_MSG_NEED_VAUX << 4) | \
-+ (TG3_GPIO_MSG_NEED_VAUX << 8) | \
-+ (TG3_GPIO_MSG_NEED_VAUX << 12))
-+
-+static inline u32 tg3_set_function_status(struct tg3 *tp, u32 newstat)
-+{
-+ u32 status, shift;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5717 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5719)
-+ status = tg3_ape_read32(tp, TG3_APE_GPIO_MSG);
-+ else
-+ status = tr32(TG3_CPMU_DRV_STATUS);
-+
-+ shift = TG3_APE_GPIO_MSG_SHIFT + 4 * tp->pci_fn;
-+ status &= ~(TG3_GPIO_MSG_MASK << shift);
-+ status |= (newstat << shift);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5717 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5719)
-+ tg3_ape_write32(tp, TG3_APE_GPIO_MSG, status);
-+ else
-+ tw32(TG3_CPMU_DRV_STATUS, status);
-+
-+ return status >> TG3_APE_GPIO_MSG_SHIFT;
-+}
-+
-+static inline int tg3_pwrsrc_switch_to_vmain(struct tg3 *tp)
-+{
-+ if (!tg3_flag(tp, IS_NIC))
-+ return 0;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5717 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5719 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5720) {
-+ if (tg3_ape_lock(tp, TG3_APE_LOCK_GPIO))
-+ return -EIO;
-+
-+ tg3_set_function_status(tp, TG3_GPIO_MSG_DRVR_PRES);
-+
-+ tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl,
-+ TG3_GRC_LCLCTL_PWRSW_DELAY);
-+
-+ tg3_ape_unlock(tp, TG3_APE_LOCK_GPIO);
-+ } else {
-+ tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl,
-+ TG3_GRC_LCLCTL_PWRSW_DELAY);
-+ }
-+
-+ return 0;
-+}
-+
-+static void tg3_pwrsrc_die_with_vmain(struct tg3 *tp)
-+{
-+ u32 grc_local_ctrl;
-+
-+ if (!tg3_flag(tp, IS_NIC) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5700 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5701)
-+ return;
-+
-+ grc_local_ctrl = tp->grc_local_ctrl | GRC_LCLCTRL_GPIO_OE1;
-+
-+ tw32_wait_f(GRC_LOCAL_CTRL,
-+ grc_local_ctrl | GRC_LCLCTRL_GPIO_OUTPUT1,
-+ TG3_GRC_LCLCTL_PWRSW_DELAY);
-+
-+ tw32_wait_f(GRC_LOCAL_CTRL,
-+ grc_local_ctrl,
-+ TG3_GRC_LCLCTL_PWRSW_DELAY);
-+
-+ tw32_wait_f(GRC_LOCAL_CTRL,
-+ grc_local_ctrl | GRC_LCLCTRL_GPIO_OUTPUT1,
-+ TG3_GRC_LCLCTL_PWRSW_DELAY);
-+}
-+
-+static void tg3_pwrsrc_switch_to_vaux(struct tg3 *tp)
-+{
-+ if (!tg3_flag(tp, IS_NIC))
-+ return;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5700 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5701) {
-+ tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl |
-+ (GRC_LCLCTRL_GPIO_OE0 |
-+ GRC_LCLCTRL_GPIO_OE1 |
-+ GRC_LCLCTRL_GPIO_OE2 |
-+ GRC_LCLCTRL_GPIO_OUTPUT0 |
-+ GRC_LCLCTRL_GPIO_OUTPUT1),
-+ TG3_GRC_LCLCTL_PWRSW_DELAY);
-+ } else if (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5761 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5761S) {
-+ /* The 5761 non-e device swaps GPIO 0 and GPIO 2. */
-+ u32 grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 |
-+ GRC_LCLCTRL_GPIO_OE1 |
-+ GRC_LCLCTRL_GPIO_OE2 |
-+ GRC_LCLCTRL_GPIO_OUTPUT0 |
-+ GRC_LCLCTRL_GPIO_OUTPUT1 |
-+ tp->grc_local_ctrl;
-+ tw32_wait_f(GRC_LOCAL_CTRL, grc_local_ctrl,
-+ TG3_GRC_LCLCTL_PWRSW_DELAY);
-+
-+ grc_local_ctrl |= GRC_LCLCTRL_GPIO_OUTPUT2;
-+ tw32_wait_f(GRC_LOCAL_CTRL, grc_local_ctrl,
-+ TG3_GRC_LCLCTL_PWRSW_DELAY);
-+
-+ grc_local_ctrl &= ~GRC_LCLCTRL_GPIO_OUTPUT0;
-+ tw32_wait_f(GRC_LOCAL_CTRL, grc_local_ctrl,
-+ TG3_GRC_LCLCTL_PWRSW_DELAY);
-+ } else {
-+ u32 no_gpio2;
-+ u32 grc_local_ctrl = 0;
-+
-+ /* Workaround to prevent overdrawing Amps. */
-+ if (tg3_asic_rev(tp) == ASIC_REV_5714) {
-+ grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE3;
-+ tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl |
-+ grc_local_ctrl,
-+ TG3_GRC_LCLCTL_PWRSW_DELAY);
-+ }
-+
-+ /* On 5753 and variants, GPIO2 cannot be used. */
-+ no_gpio2 = tp->nic_sram_data_cfg &
-+ NIC_SRAM_DATA_CFG_NO_GPIO2;
-+
-+ grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE0 |
-+ GRC_LCLCTRL_GPIO_OE1 |
-+ GRC_LCLCTRL_GPIO_OE2 |
-+ GRC_LCLCTRL_GPIO_OUTPUT1 |
-+ GRC_LCLCTRL_GPIO_OUTPUT2;
-+ if (no_gpio2) {
-+ grc_local_ctrl &= ~(GRC_LCLCTRL_GPIO_OE2 |
-+ GRC_LCLCTRL_GPIO_OUTPUT2);
-+ }
-+ tw32_wait_f(GRC_LOCAL_CTRL,
-+ tp->grc_local_ctrl | grc_local_ctrl,
-+ TG3_GRC_LCLCTL_PWRSW_DELAY);
-+
-+ grc_local_ctrl |= GRC_LCLCTRL_GPIO_OUTPUT0;
-+
-+ tw32_wait_f(GRC_LOCAL_CTRL,
-+ tp->grc_local_ctrl | grc_local_ctrl,
-+ TG3_GRC_LCLCTL_PWRSW_DELAY);
-+
-+ if (!no_gpio2) {
-+ grc_local_ctrl &= ~GRC_LCLCTRL_GPIO_OUTPUT2;
-+ tw32_wait_f(GRC_LOCAL_CTRL,
-+ tp->grc_local_ctrl | grc_local_ctrl,
-+ TG3_GRC_LCLCTL_PWRSW_DELAY);
-+ }
-+ }
-+}
-+
-+static void tg3_frob_aux_power_5717(struct tg3 *tp, bool wol_enable)
-+{
-+ u32 msg = 0;
-+
-+ /* Serialize power state transitions */
-+ if (tg3_ape_lock(tp, TG3_APE_LOCK_GPIO))
-+ return;
-+
-+ if (tg3_flag(tp, ENABLE_ASF) || tg3_flag(tp, ENABLE_APE) || wol_enable)
-+ msg = TG3_GPIO_MSG_NEED_VAUX;
-+
-+ msg = tg3_set_function_status(tp, msg);
-+
-+ if (msg & TG3_GPIO_MSG_ALL_DRVR_PRES_MASK)
-+ goto done;
-+
-+ if (msg & TG3_GPIO_MSG_ALL_NEED_VAUX_MASK)
-+ tg3_pwrsrc_switch_to_vaux(tp);
-+ else
-+ tg3_pwrsrc_die_with_vmain(tp);
-+
-+done:
-+ tg3_ape_unlock(tp, TG3_APE_LOCK_GPIO);
-+}
-+
-+static void tg3_frob_aux_power(struct tg3 *tp, bool include_wol)
-+{
-+ bool need_vaux = false;
-+
-+ /* The GPIOs do something completely different on 57765. */
-+ if (!tg3_flag(tp, IS_NIC) || tg3_flag(tp, 57765_CLASS))
-+ return;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5717 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5719 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5720) {
-+ tg3_frob_aux_power_5717(tp, include_wol ?
-+ tg3_flag(tp, WOL_ENABLE) != 0 : 0);
-+ return;
-+ }
-+
-+ if (tp->pdev_peer && tp->pdev_peer != tp->pdev) {
-+ struct net_device *dev_peer;
-+
-+ dev_peer = pci_get_drvdata(tp->pdev_peer);
-+
-+ /* remove_one() may have been run on the peer. */
-+ if (dev_peer) {
-+ struct tg3 *tp_peer = netdev_priv(dev_peer);
-+
-+ if (tg3_flag(tp_peer, INIT_COMPLETE))
-+ return;
-+
-+ if ((include_wol && tg3_flag(tp_peer, WOL_ENABLE)) ||
-+ tg3_flag(tp_peer, ENABLE_ASF))
-+ need_vaux = true;
-+ }
-+ }
-+
-+ if ((include_wol && tg3_flag(tp, WOL_ENABLE)) ||
-+ tg3_flag(tp, ENABLE_ASF))
-+ need_vaux = true;
-+
-+ if (need_vaux)
-+ tg3_pwrsrc_switch_to_vaux(tp);
-+ else
-+ tg3_pwrsrc_die_with_vmain(tp);
-+}
-+
-+static int tg3_5700_link_polarity(struct tg3 *tp, u32 speed)
-+{
-+ if (tp->led_ctrl == LED_CTRL_MODE_PHY_2)
-+ return 1;
-+ else if ((tp->phy_id & TG3_PHY_ID_MASK) == TG3_PHY_ID_BCM5411) {
-+ if (speed != SPEED_10)
-+ return 1;
-+ } else if (speed == SPEED_10)
-+ return 1;
-+
-+ return 0;
-+}
-+
-+static bool tg3_phy_power_bug(struct tg3 *tp)
-+{
-+ switch (tg3_asic_rev(tp)) {
-+ case ASIC_REV_5700:
-+ case ASIC_REV_5704:
-+ return true;
-+ case ASIC_REV_5780:
-+ if (tp->phy_flags & TG3_PHYFLG_MII_SERDES)
-+ return true;
-+ return false;
-+ case ASIC_REV_5717:
-+ if (!tp->pci_fn)
-+ return true;
-+ return false;
-+ case ASIC_REV_5719:
-+ case ASIC_REV_5720:
-+ if ((tp->phy_flags & TG3_PHYFLG_MII_SERDES) &&
-+ !tp->pci_fn)
-+ return true;
-+ return false;
-+ }
-+
-+ return false;
-+}
-+
-+static bool tg3_phy_led_bug(struct tg3 *tp)
-+{
-+ switch (tg3_asic_rev(tp)) {
-+ case ASIC_REV_5719:
-+ case ASIC_REV_5720:
-+ if ((tp->phy_flags & TG3_PHYFLG_MII_SERDES) &&
-+ !tp->pci_fn)
-+ return true;
-+ return false;
-+ }
-+
-+ return false;
-+}
-+
-+static void tg3_power_down_phy(struct tg3 *tp, bool do_low_power)
-+{
-+ u32 val;
-+
-+ if (tp->phy_flags & TG3_PHYFLG_KEEP_LINK_ON_PWRDN)
-+ return;
-+
-+ if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) {
-+ if (tg3_asic_rev(tp) == ASIC_REV_5704) {
-+ u32 sg_dig_ctrl = tr32(SG_DIG_CTRL);
-+ u32 serdes_cfg = tr32(MAC_SERDES_CFG);
-+
-+ sg_dig_ctrl |=
-+ SG_DIG_USING_HW_AUTONEG | SG_DIG_SOFT_RESET;
-+ tw32(SG_DIG_CTRL, sg_dig_ctrl);
-+ tw32(MAC_SERDES_CFG, serdes_cfg | (1 << 15));
-+ }
-+ return;
-+ }
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5906) {
-+ tg3_bmcr_reset(tp);
-+ val = tr32(GRC_MISC_CFG);
-+ tw32_f(GRC_MISC_CFG, val | GRC_MISC_CFG_EPHY_IDDQ);
-+ udelay(40);
-+ return;
-+ } else if (tp->phy_flags & TG3_PHYFLG_IS_FET) {
-+ u32 phytest;
-+ if (!tg3_readphy(tp, MII_TG3_FET_TEST, &phytest)) {
-+ u32 phy;
-+
-+ tg3_writephy(tp, MII_ADVERTISE, 0);
-+ tg3_writephy(tp, MII_BMCR,
-+ BMCR_ANENABLE | BMCR_ANRESTART);
-+
-+ tg3_writephy(tp, MII_TG3_FET_TEST,
-+ phytest | MII_TG3_FET_SHADOW_EN);
-+ if (!tg3_readphy(tp, MII_TG3_FET_SHDW_AUXMODE4, &phy)) {
-+ phy |= MII_TG3_FET_SHDW_AUXMODE4_SBPD;
-+ tg3_writephy(tp,
-+ MII_TG3_FET_SHDW_AUXMODE4,
-+ phy);
-+ }
-+ tg3_writephy(tp, MII_TG3_FET_TEST, phytest);
-+ }
-+ return;
-+ } else if (do_low_power) {
-+ if (!tg3_phy_led_bug(tp))
-+ tg3_writephy(tp, MII_TG3_EXT_CTRL,
-+ MII_TG3_EXT_CTRL_FORCE_LED_OFF);
-+
-+ val = MII_TG3_AUXCTL_PCTL_100TX_LPWR |
-+ MII_TG3_AUXCTL_PCTL_SPR_ISOLATE |
-+ MII_TG3_AUXCTL_PCTL_VREG_11V;
-+ tg3_phy_auxctl_write(tp, MII_TG3_AUXCTL_SHDWSEL_PWRCTL, val);
-+ }
-+
-+ /* The PHY should not be powered down on some chips because
-+ * of bugs.
-+ */
-+ if (tg3_phy_power_bug(tp))
-+ return;
-+
-+ if (tg3_chip_rev(tp) == CHIPREV_5784_AX ||
-+ tg3_chip_rev(tp) == CHIPREV_5761_AX) {
-+ val = tr32(TG3_CPMU_LSPD_1000MB_CLK);
-+ val &= ~CPMU_LSPD_1000MB_MACCLK_MASK;
-+ val |= CPMU_LSPD_1000MB_MACCLK_12_5;
-+ tw32_f(TG3_CPMU_LSPD_1000MB_CLK, val);
-+ }
-+
-+ tg3_writephy(tp, MII_BMCR, BMCR_PDOWN);
-+}
-+
-+/* tp->lock is held. */
-+static int tg3_nvram_lock(struct tg3 *tp)
-+{
-+ if (tg3_flag(tp, NVRAM)) {
-+ int i;
-+
-+ if (tp->nvram_lock_cnt == 0) {
-+ tw32(NVRAM_SWARB, SWARB_REQ_SET1);
-+ for (i = 0; i < 8000; i++) {
-+ if (tr32(NVRAM_SWARB) & SWARB_GNT1)
-+ break;
-+ udelay(20);
-+ }
-+ if (i == 8000) {
-+ tw32(NVRAM_SWARB, SWARB_REQ_CLR1);
-+ return -ENODEV;
-+ }
-+ }
-+ tp->nvram_lock_cnt++;
-+ }
-+ return 0;
-+}
-+
-+/* tp->lock is held. */
-+static void tg3_nvram_unlock(struct tg3 *tp)
-+{
-+ if (tg3_flag(tp, NVRAM)) {
-+ if (tp->nvram_lock_cnt > 0)
-+ tp->nvram_lock_cnt--;
-+ if (tp->nvram_lock_cnt == 0)
-+ tw32_f(NVRAM_SWARB, SWARB_REQ_CLR1);
-+ }
-+}
-+
-+/* tp->lock is held. */
-+static void tg3_enable_nvram_access(struct tg3 *tp)
-+{
-+ if (tg3_flag(tp, 5750_PLUS) && !tg3_flag(tp, PROTECTED_NVRAM)) {
-+ u32 nvaccess = tr32(NVRAM_ACCESS);
-+
-+ tw32(NVRAM_ACCESS, nvaccess | ACCESS_ENABLE);
-+ }
-+}
-+
-+/* tp->lock is held. */
-+static void tg3_disable_nvram_access(struct tg3 *tp)
-+{
-+ if (tg3_flag(tp, 5750_PLUS) && !tg3_flag(tp, PROTECTED_NVRAM)) {
-+ u32 nvaccess = tr32(NVRAM_ACCESS);
-+
-+ tw32(NVRAM_ACCESS, nvaccess & ~ACCESS_ENABLE);
-+ }
-+}
-+
-+static int tg3_nvram_read_using_eeprom(struct tg3 *tp,
-+ u32 offset, u32 *val)
-+{
-+ u32 tmp;
-+ int i;
-+
-+ if (offset > EEPROM_ADDR_ADDR_MASK || (offset % 4) != 0)
-+ return -EINVAL;
-+
-+ tmp = tr32(GRC_EEPROM_ADDR) & ~(EEPROM_ADDR_ADDR_MASK |
-+ EEPROM_ADDR_DEVID_MASK |
-+ EEPROM_ADDR_READ);
-+ tw32(GRC_EEPROM_ADDR,
-+ tmp |
-+ (0 << EEPROM_ADDR_DEVID_SHIFT) |
-+ ((offset << EEPROM_ADDR_ADDR_SHIFT) &
-+ EEPROM_ADDR_ADDR_MASK) |
-+ EEPROM_ADDR_READ | EEPROM_ADDR_START);
-+
-+ for (i = 0; i < 1000; i++) {
-+ tmp = tr32(GRC_EEPROM_ADDR);
-+
-+ if (tmp & EEPROM_ADDR_COMPLETE)
-+ break;
-+ msleep(1);
-+ }
-+ if (!(tmp & EEPROM_ADDR_COMPLETE))
-+ return -EBUSY;
-+
-+ tmp = tr32(GRC_EEPROM_DATA);
-+
-+ /*
-+ * The data will always be opposite the native endian
-+ * format. Perform a blind byteswap to compensate.
-+ */
-+ *val = swab32(tmp);
-+
-+ return 0;
-+}
-+
-+#define NVRAM_CMD_TIMEOUT 10000
-+
-+static int tg3_nvram_exec_cmd(struct tg3 *tp, u32 nvram_cmd)
-+{
-+ int i;
-+
-+ tw32(NVRAM_CMD, nvram_cmd);
-+ for (i = 0; i < NVRAM_CMD_TIMEOUT; i++) {
-+#if defined(__VMKLNX__) || (LINUX_VERSION_CODE < 0x020627) /* 2.6.39 */
-+ udelay(10);
-+#else
-+ usleep_range(10, 40);
-+#endif
-+ if (tr32(NVRAM_CMD) & NVRAM_CMD_DONE) {
-+ udelay(10);
-+ break;
-+ }
-+ }
-+
-+ if (i == NVRAM_CMD_TIMEOUT)
-+ return -EBUSY;
-+
-+ return 0;
-+}
-+
-+static u32 tg3_nvram_phys_addr(struct tg3 *tp, u32 addr)
-+{
-+ if (tg3_flag(tp, NVRAM) &&
-+ tg3_flag(tp, NVRAM_BUFFERED) &&
-+ tg3_flag(tp, FLASH) &&
-+ !tg3_flag(tp, NO_NVRAM_ADDR_TRANS) &&
-+ (tp->nvram_jedecnum == JEDEC_ATMEL))
-+
-+ addr = ((addr / tp->nvram_pagesize) <<
-+ ATMEL_AT45DB0X1B_PAGE_POS) +
-+ (addr % tp->nvram_pagesize);
-+
-+ return addr;
-+}
-+
-+static u32 tg3_nvram_logical_addr(struct tg3 *tp, u32 addr)
-+{
-+ if (tg3_flag(tp, NVRAM) &&
-+ tg3_flag(tp, NVRAM_BUFFERED) &&
-+ tg3_flag(tp, FLASH) &&
-+ !tg3_flag(tp, NO_NVRAM_ADDR_TRANS) &&
-+ (tp->nvram_jedecnum == JEDEC_ATMEL))
-+
-+ addr = ((addr >> ATMEL_AT45DB0X1B_PAGE_POS) *
-+ tp->nvram_pagesize) +
-+ (addr & ((1 << ATMEL_AT45DB0X1B_PAGE_POS) - 1));
-+
-+ return addr;
-+}
-+
-+/* NOTE: Data read in from NVRAM is byteswapped according to
-+ * the byteswapping settings for all other register accesses.
-+ * tg3 devices are BE devices, so on a BE machine, the data
-+ * returned will be exactly as it is seen in NVRAM. On a LE
-+ * machine, the 32-bit value will be byteswapped.
-+ */
-+static int tg3_nvram_read(struct tg3 *tp, u32 offset, u32 *val)
-+{
-+ int ret;
-+
-+ if (!tg3_flag(tp, NVRAM))
-+ return tg3_nvram_read_using_eeprom(tp, offset, val);
-+
-+ offset = tg3_nvram_phys_addr(tp, offset);
-+
-+ if (offset > NVRAM_ADDR_MSK)
-+ return -EINVAL;
-+
-+ ret = tg3_nvram_lock(tp);
-+ if (ret)
-+ return ret;
-+
-+ tg3_enable_nvram_access(tp);
-+
-+ tw32(NVRAM_ADDR, offset);
-+ ret = tg3_nvram_exec_cmd(tp, NVRAM_CMD_RD | NVRAM_CMD_GO |
-+ NVRAM_CMD_FIRST | NVRAM_CMD_LAST | NVRAM_CMD_DONE);
-+
-+ if (ret == 0)
-+ *val = tr32(NVRAM_RDDATA);
-+
-+ tg3_disable_nvram_access(tp);
-+
-+ tg3_nvram_unlock(tp);
-+
-+ return ret;
-+}
-+
-+/* Ensures NVRAM data is in bytestream format. */
-+static int tg3_nvram_read_be32(struct tg3 *tp, u32 offset, __be32 *val)
-+{
-+ u32 v;
-+ int res = tg3_nvram_read(tp, offset, &v);
-+ if (!res)
-+ *val = cpu_to_be32(v);
-+ return res;
-+}
-+
-+static int tg3_nvram_write_block_using_eeprom(struct tg3 *tp,
-+ u32 offset, u32 len, u8 *buf)
-+{
-+ int i, j, rc = 0;
-+ u32 val;
-+
-+ for (i = 0; i < len; i += 4) {
-+ u32 addr;
-+ __be32 data;
-+
-+ addr = offset + i;
-+
-+ memcpy(&data, buf + i, 4);
-+
-+ /*
-+ * The SEEPROM interface expects the data to always be opposite
-+ * the native endian format. We accomplish this by reversing
-+ * all the operations that would have been performed on the
-+ * data from a call to tg3_nvram_read_be32().
-+ */
-+ tw32(GRC_EEPROM_DATA, swab32(be32_to_cpu(data)));
-+
-+ val = tr32(GRC_EEPROM_ADDR);
-+ tw32(GRC_EEPROM_ADDR, val | EEPROM_ADDR_COMPLETE);
-+
-+ val &= ~(EEPROM_ADDR_ADDR_MASK | EEPROM_ADDR_DEVID_MASK |
-+ EEPROM_ADDR_READ);
-+ tw32(GRC_EEPROM_ADDR, val |
-+ (0 << EEPROM_ADDR_DEVID_SHIFT) |
-+ (addr & EEPROM_ADDR_ADDR_MASK) |
-+ EEPROM_ADDR_START |
-+ EEPROM_ADDR_WRITE);
-+
-+ for (j = 0; j < 1000; j++) {
-+ val = tr32(GRC_EEPROM_ADDR);
-+
-+ if (val & EEPROM_ADDR_COMPLETE)
-+ break;
-+ msleep(1);
-+ }
-+ if (!(val & EEPROM_ADDR_COMPLETE)) {
-+ rc = -EBUSY;
-+ break;
-+ }
-+ }
-+
-+ return rc;
-+}
-+
-+/* offset and length are dword aligned */
-+static int tg3_nvram_write_block_unbuffered(struct tg3 *tp, u32 offset, u32 len,
-+ u8 *buf)
-+{
-+ int ret = 0;
-+ u32 pagesize = tp->nvram_pagesize;
-+ u32 pagemask = pagesize - 1;
-+ u32 nvram_cmd;
-+ u8 *tmp;
-+
-+ tmp = kmalloc(pagesize, GFP_KERNEL);
-+ if (tmp == NULL)
-+ return -ENOMEM;
-+
-+ while (len) {
-+ int j;
-+ u32 phy_addr, page_off, size;
-+
-+ phy_addr = offset & ~pagemask;
-+
-+ for (j = 0; j < pagesize; j += 4) {
-+ ret = tg3_nvram_read_be32(tp, phy_addr + j,
-+ (__be32 *) (tmp + j));
-+ if (ret)
-+ break;
-+ }
-+ if (ret)
-+ break;
-+
-+ page_off = offset & pagemask;
-+ size = pagesize;
-+ if (len < size)
-+ size = len;
-+
-+ len -= size;
-+
-+ memcpy(tmp + page_off, buf, size);
-+
-+ offset = offset + (pagesize - page_off);
-+
-+ tg3_enable_nvram_access(tp);
-+
-+ /*
-+ * Before we can erase the flash page, we need
-+ * to issue a special "write enable" command.
-+ */
-+ nvram_cmd = NVRAM_CMD_WREN | NVRAM_CMD_GO | NVRAM_CMD_DONE;
-+
-+ if (tg3_nvram_exec_cmd(tp, nvram_cmd))
-+ break;
-+
-+ /* Erase the target page */
-+ tw32(NVRAM_ADDR, phy_addr);
-+
-+ nvram_cmd = NVRAM_CMD_GO | NVRAM_CMD_DONE | NVRAM_CMD_WR |
-+ NVRAM_CMD_FIRST | NVRAM_CMD_LAST | NVRAM_CMD_ERASE;
-+
-+ if (tg3_nvram_exec_cmd(tp, nvram_cmd))
-+ break;
-+
-+ /* Issue another write enable to start the write. */
-+ nvram_cmd = NVRAM_CMD_WREN | NVRAM_CMD_GO | NVRAM_CMD_DONE;
-+
-+ if (tg3_nvram_exec_cmd(tp, nvram_cmd))
-+ break;
-+
-+ for (j = 0; j < pagesize; j += 4) {
-+ __be32 data;
-+
-+ data = *((__be32 *) (tmp + j));
-+
-+ tw32(NVRAM_WRDATA, be32_to_cpu(data));
-+
-+ tw32(NVRAM_ADDR, phy_addr + j);
-+
-+ nvram_cmd = NVRAM_CMD_GO | NVRAM_CMD_DONE |
-+ NVRAM_CMD_WR;
-+
-+ if (j == 0)
-+ nvram_cmd |= NVRAM_CMD_FIRST;
-+ else if (j == (pagesize - 4))
-+ nvram_cmd |= NVRAM_CMD_LAST;
-+
-+ ret = tg3_nvram_exec_cmd(tp, nvram_cmd);
-+ if (ret)
-+ break;
-+ }
-+ if (ret)
-+ break;
-+ }
-+
-+ nvram_cmd = NVRAM_CMD_WRDI | NVRAM_CMD_GO | NVRAM_CMD_DONE;
-+ tg3_nvram_exec_cmd(tp, nvram_cmd);
-+
-+ kfree(tmp);
-+
-+ return ret;
-+}
-+
-+/* offset and length are dword aligned */
-+static int tg3_nvram_write_block_buffered(struct tg3 *tp, u32 offset, u32 len,
-+ u8 *buf)
-+{
-+ int i, ret = 0;
-+
-+ for (i = 0; i < len; i += 4, offset += 4) {
-+ u32 page_off, phy_addr, nvram_cmd;
-+ __be32 data;
-+
-+ memcpy(&data, buf + i, 4);
-+ tw32(NVRAM_WRDATA, be32_to_cpu(data));
-+
-+ page_off = offset % tp->nvram_pagesize;
-+
-+ phy_addr = tg3_nvram_phys_addr(tp, offset);
-+
-+ nvram_cmd = NVRAM_CMD_GO | NVRAM_CMD_DONE | NVRAM_CMD_WR;
-+
-+ if (page_off == 0 || i == 0)
-+ nvram_cmd |= NVRAM_CMD_FIRST;
-+ if (page_off == (tp->nvram_pagesize - 4))
-+ nvram_cmd |= NVRAM_CMD_LAST;
-+
-+ if (i == (len - 4))
-+ nvram_cmd |= NVRAM_CMD_LAST;
-+
-+ if ((nvram_cmd & NVRAM_CMD_FIRST) ||
-+ !tg3_flag(tp, FLASH) ||
-+ !tg3_flag(tp, 57765_PLUS))
-+ tw32(NVRAM_ADDR, phy_addr);
-+
-+ if (tg3_asic_rev(tp) != ASIC_REV_5752 &&
-+ !tg3_flag(tp, 5755_PLUS) &&
-+ (tp->nvram_jedecnum == JEDEC_ST) &&
-+ (nvram_cmd & NVRAM_CMD_FIRST)) {
-+ u32 cmd;
-+
-+ cmd = NVRAM_CMD_WREN | NVRAM_CMD_GO | NVRAM_CMD_DONE;
-+ ret = tg3_nvram_exec_cmd(tp, cmd);
-+ if (ret)
-+ break;
-+ }
-+ if (!tg3_flag(tp, FLASH)) {
-+ /* We always do complete word writes to eeprom. */
-+ nvram_cmd |= (NVRAM_CMD_FIRST | NVRAM_CMD_LAST);
-+ }
-+
-+ ret = tg3_nvram_exec_cmd(tp, nvram_cmd);
-+ if (ret)
-+ break;
-+ }
-+ return ret;
-+}
-+
-+/* offset and length are dword aligned */
-+static int tg3_nvram_write_block(struct tg3 *tp, u32 offset, u32 len, u8 *buf)
-+{
-+ int ret;
-+
-+ if (tg3_flag(tp, EEPROM_WRITE_PROT)) {
-+ tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl &
-+ ~GRC_LCLCTRL_GPIO_OUTPUT1);
-+ udelay(40);
-+ }
-+
-+ if (!tg3_flag(tp, NVRAM)) {
-+ ret = tg3_nvram_write_block_using_eeprom(tp, offset, len, buf);
-+ } else {
-+ u32 grc_mode;
-+
-+ ret = tg3_nvram_lock(tp);
-+ if (ret)
-+ return ret;
-+
-+ tg3_enable_nvram_access(tp);
-+ if (tg3_flag(tp, 5750_PLUS) && !tg3_flag(tp, PROTECTED_NVRAM))
-+ tw32(NVRAM_WRITE1, 0x406);
-+
-+ grc_mode = tr32(GRC_MODE);
-+ tw32(GRC_MODE, grc_mode | GRC_MODE_NVRAM_WR_ENABLE);
-+
-+ if (tg3_flag(tp, NVRAM_BUFFERED) || !tg3_flag(tp, FLASH)) {
-+ ret = tg3_nvram_write_block_buffered(tp, offset, len,
-+ buf);
-+ } else {
-+ ret = tg3_nvram_write_block_unbuffered(tp, offset, len,
-+ buf);
-+ }
-+
-+ grc_mode = tr32(GRC_MODE);
-+ tw32(GRC_MODE, grc_mode & ~GRC_MODE_NVRAM_WR_ENABLE);
-+
-+ tg3_disable_nvram_access(tp);
-+ tg3_nvram_unlock(tp);
-+ }
-+
-+ if (tg3_flag(tp, EEPROM_WRITE_PROT)) {
-+ tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl);
-+ udelay(40);
-+ }
-+
-+ return ret;
-+}
-+
-+#define RX_CPU_SCRATCH_BASE 0x30000
-+#define RX_CPU_SCRATCH_SIZE 0x04000
-+#define TX_CPU_SCRATCH_BASE 0x34000
-+#define TX_CPU_SCRATCH_SIZE 0x04000
-+
-+/* tp->lock is held. */
-+static int tg3_pause_cpu(struct tg3 *tp, u32 cpu_base)
-+{
-+ int i;
-+ const int iters = 10000;
-+
-+ for (i = 0; i < iters; i++) {
-+ tw32(cpu_base + CPU_STATE, 0xffffffff);
-+ tw32(cpu_base + CPU_MODE, CPU_MODE_HALT);
-+ if (tr32(cpu_base + CPU_MODE) & CPU_MODE_HALT)
-+ break;
-+ if (pci_channel_offline(tp->pdev))
-+ return -EBUSY;
-+ }
-+
-+ return (i == iters) ? -EBUSY : 0;
-+}
-+
-+/* tp->lock is held. */
-+static int tg3_rxcpu_pause(struct tg3 *tp)
-+{
-+ int rc = tg3_pause_cpu(tp, RX_CPU_BASE);
-+
-+ tw32(RX_CPU_BASE + CPU_STATE, 0xffffffff);
-+ tw32_f(RX_CPU_BASE + CPU_MODE, CPU_MODE_HALT);
-+ udelay(10);
-+
-+ return rc;
-+}
-+
-+/* tp->lock is held. */
-+static int tg3_txcpu_pause(struct tg3 *tp)
-+{
-+ return tg3_pause_cpu(tp, TX_CPU_BASE);
-+}
-+
-+/* tp->lock is held. */
-+static void tg3_resume_cpu(struct tg3 *tp, u32 cpu_base)
-+{
-+ tw32(cpu_base + CPU_STATE, 0xffffffff);
-+ tw32_f(cpu_base + CPU_MODE, 0x00000000);
-+}
-+
-+/* tp->lock is held. */
-+static void tg3_rxcpu_resume(struct tg3 *tp)
-+{
-+ tg3_resume_cpu(tp, RX_CPU_BASE);
-+}
-+
-+/* tp->lock is held. */
-+static int tg3_halt_cpu(struct tg3 *tp, u32 cpu_base)
-+{
-+ int rc;
-+
-+ BUG_ON(cpu_base == TX_CPU_BASE && tg3_flag(tp, 5705_PLUS));
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5906) {
-+ u32 val = tr32(GRC_VCPU_EXT_CTRL);
-+
-+ tw32(GRC_VCPU_EXT_CTRL, val | GRC_VCPU_EXT_CTRL_HALT_CPU);
-+ return 0;
-+ }
-+ if (cpu_base == RX_CPU_BASE) {
-+ rc = tg3_rxcpu_pause(tp);
-+ } else {
-+ /*
-+ * There is only an Rx CPU for the 5750 derivative in the
-+ * BCM4785.
-+ */
-+ if (tg3_flag(tp, IS_SSB_CORE))
-+ return 0;
-+
-+ rc = tg3_txcpu_pause(tp);
-+ }
-+
-+ if (rc) {
-+ netdev_err(tp->dev, "%s timed out, %s CPU\n",
-+ __func__, cpu_base == RX_CPU_BASE ? "RX" : "TX");
-+ return -ENODEV;
-+ }
-+
-+ /* Clear firmware's nvram arbitration. */
-+ if (tg3_flag(tp, NVRAM))
-+ tw32(NVRAM_SWARB, SWARB_REQ_CLR0);
-+ return 0;
-+}
-+
-+static int tg3_fw_data_len(const struct tg3_firmware_hdr *fw_hdr)
-+{
-+ return (fw_hdr->len - TG3_FW_HDR_LEN) / sizeof(u32);
-+}
-+
-+/* tp->lock is held. */
-+static int tg3_load_firmware_cpu(struct tg3 *tp, u32 cpu_base,
-+ u32 cpu_scratch_base, int cpu_scratch_size,
-+ const struct tg3_firmware_hdr *fw_hdr)
-+{
-+ int err, i;
-+ void (*write_op)(struct tg3 *, u32, u32);
-+ int total_len = tp->fw->size;
-+
-+ if (cpu_base == TX_CPU_BASE && tg3_flag(tp, 5705_PLUS)) {
-+ netdev_err(tp->dev,
-+ "%s: Trying to load TX cpu firmware which is 5705\n",
-+ __func__);
-+ return -EINVAL;
-+ }
-+
-+ if (tg3_flag(tp, 5705_PLUS) && tg3_asic_rev(tp) != ASIC_REV_57766)
-+ write_op = tg3_write_mem;
-+ else
-+ write_op = tg3_write_indirect_reg32;
-+
-+ if (tg3_asic_rev(tp) != ASIC_REV_57766) {
-+ /* It is possible that bootcode is still loading at this point.
-+ * Get the nvram lock first before halting the cpu.
-+ */
-+ int lock_err = tg3_nvram_lock(tp);
-+ err = tg3_halt_cpu(tp, cpu_base);
-+ if (!lock_err)
-+ tg3_nvram_unlock(tp);
-+ if (err)
-+ goto out;
-+
-+ for (i = 0; i < cpu_scratch_size; i += sizeof(u32))
-+ write_op(tp, cpu_scratch_base + i, 0);
-+ tw32(cpu_base + CPU_STATE, 0xffffffff);
-+ tw32(cpu_base + CPU_MODE,
-+ tr32(cpu_base + CPU_MODE) | CPU_MODE_HALT);
-+ } else {
-+ /* Subtract additional main header for fragmented firmware and
-+ * advance to the first fragment
-+ */
-+ total_len -= TG3_FW_HDR_LEN;
-+ fw_hdr++;
-+ }
-+
-+ do {
-+ u32 *fw_data = (u32 *)(fw_hdr + 1);
-+ for (i = 0; i < tg3_fw_data_len(fw_hdr); i++)
-+ write_op(tp, cpu_scratch_base +
-+ (fw_hdr->base_addr & 0xffff) +
-+ (i * sizeof(u32)),
-+ fw_data[i]);
-+
-+ total_len -= fw_hdr->len;
-+
-+ /* Advance to next fragment */
-+ fw_hdr = (struct tg3_firmware_hdr *)
-+ ((void *)fw_hdr + fw_hdr->len);
-+ } while (total_len > 0);
-+
-+ err = 0;
-+
-+out:
-+ return err;
-+}
-+
-+/* tp->lock is held. */
-+static int tg3_pause_cpu_and_set_pc(struct tg3 *tp, u32 cpu_base, u32 pc)
-+{
-+ int i;
-+ const int iters = 5;
-+
-+ tw32(cpu_base + CPU_STATE, 0xffffffff);
-+ tw32_f(cpu_base + CPU_PC, pc);
-+
-+ for (i = 0; i < iters; i++) {
-+ if (tr32(cpu_base + CPU_PC) == pc)
-+ break;
-+ tw32(cpu_base + CPU_STATE, 0xffffffff);
-+ tw32(cpu_base + CPU_MODE, CPU_MODE_HALT);
-+ tw32_f(cpu_base + CPU_PC, pc);
-+ udelay(1000);
-+ }
-+
-+ return (i == iters) ? -EBUSY : 0;
-+}
-+
-+/* tp->lock is held. */
-+static int tg3_load_5701_a0_firmware_fix(struct tg3 *tp)
-+{
-+ const struct tg3_firmware_hdr *fw_hdr;
-+ int err;
-+
-+ fw_hdr = (struct tg3_firmware_hdr *)tp->fw->data;
-+
-+ /* Firmware blob starts with version numbers, followed by
-+ start address and length. We are setting complete length.
-+ length = end_address_of_bss - start_address_of_text.
-+ Remainder is the blob to be loaded contiguously
-+ from start address. */
-+
-+ err = tg3_load_firmware_cpu(tp, RX_CPU_BASE,
-+ RX_CPU_SCRATCH_BASE, RX_CPU_SCRATCH_SIZE,
-+ fw_hdr);
-+ if (err)
-+ return err;
-+
-+ err = tg3_load_firmware_cpu(tp, TX_CPU_BASE,
-+ TX_CPU_SCRATCH_BASE, TX_CPU_SCRATCH_SIZE,
-+ fw_hdr);
-+ if (err)
-+ return err;
-+
-+ /* Now startup only the RX cpu. */
-+ err = tg3_pause_cpu_and_set_pc(tp, RX_CPU_BASE,
-+ fw_hdr->base_addr);
-+ if (err) {
-+ netdev_err(tp->dev, "%s fails to set RX CPU PC, is %08x "
-+ "should be %08x\n", __func__,
-+ tr32(RX_CPU_BASE + CPU_PC),
-+ fw_hdr->base_addr);
-+ return -ENODEV;
-+ }
-+
-+ tg3_rxcpu_resume(tp);
-+
-+ return 0;
-+}
-+
-+static int tg3_validate_rxcpu_state(struct tg3 *tp)
-+{
-+ const int iters = 1000;
-+ int i;
-+ u32 val;
-+
-+ /* Wait for boot code to complete initialization and enter service
-+ * loop. It is then safe to download service patches
-+ */
-+ for (i = 0; i < iters; i++) {
-+ if (tr32(RX_CPU_HWBKPT) == TG3_SBROM_IN_SERVICE_LOOP)
-+ break;
-+
-+ udelay(10);
-+ }
-+
-+ if (i == iters) {
-+ netdev_err(tp->dev, "Boot code not ready for service patches\n");
-+ return -EBUSY;
-+ }
-+
-+ val = tg3_read_indirect_reg32(tp, TG3_57766_FW_HANDSHAKE);
-+ if (val & 0xff) {
-+ netdev_warn(tp->dev,
-+ "Other patches exist. Not downloading EEE patch\n");
-+ return -EEXIST;
-+ }
-+
-+ return 0;
-+}
-+
-+/* tp->lock is held. */
-+static void tg3_load_57766_firmware(struct tg3 *tp)
-+{
-+ struct tg3_firmware_hdr *fw_hdr;
-+
-+ if (!tg3_flag(tp, NO_NVRAM))
-+ return;
-+
-+ if (tg3_validate_rxcpu_state(tp))
-+ return;
-+
-+ if (!tp->fw)
-+ return;
-+
-+ /* This firmware blob has a different format than older firmware
-+ * releases as given below. The main difference is we have fragmented
-+ * data to be written to non-contiguous locations.
-+ *
-+ * In the beginning we have a firmware header identical to other
-+ * firmware which consists of version, base addr and length. The length
-+ * here is unused and set to 0xffffffff.
-+ *
-+ * This is followed by a series of firmware fragments which are
-+ * individually identical to previous firmware. i.e. they have the
-+ * firmware header and followed by data for that fragment. The version
-+ * field of the individual fragment header is unused.
-+ */
-+
-+ fw_hdr = (struct tg3_firmware_hdr *)tp->fw->data;
-+ if (fw_hdr->base_addr != TG3_57766_FW_BASE_ADDR)
-+ return;
-+
-+ if (tg3_rxcpu_pause(tp))
-+ return;
-+
-+ /* tg3_load_firmware_cpu() will always succeed for the 57766 */
-+ tg3_load_firmware_cpu(tp, 0, TG3_57766_FW_BASE_ADDR, 0, fw_hdr);
-+
-+ tg3_rxcpu_resume(tp);
-+}
-+
-+#if TG3_TSO_SUPPORT != 0
-+
-+/* tp->lock is held. */
-+static int tg3_load_tso_firmware(struct tg3 *tp)
-+{
-+ const struct tg3_firmware_hdr *fw_hdr;
-+ unsigned long cpu_base, cpu_scratch_base, cpu_scratch_size;
-+ int err;
-+
-+ if (!tg3_flag(tp, FW_TSO))
-+ return 0;
-+
-+ fw_hdr = (struct tg3_firmware_hdr *)tp->fw->data;
-+
-+ /* Firmware blob starts with version numbers, followed by
-+ start address and length. We are setting complete length.
-+ length = end_address_of_bss - start_address_of_text.
-+ Remainder is the blob to be loaded contiguously
-+ from start address. */
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5705) {
-+ cpu_base = RX_CPU_BASE;
-+ cpu_scratch_base = NIC_SRAM_MBUF_POOL_BASE5705;
-+ cpu_scratch_size = (tp->fw->size - TG3_FW_HDR_LEN +
-+ TG3_TSO5_FW_SBSS_LEN +
-+ TG3_TSO5_FW_BSS_LEN);
-+ } else {
-+ cpu_base = TX_CPU_BASE;
-+ cpu_scratch_base = TX_CPU_SCRATCH_BASE;
-+ cpu_scratch_size = TX_CPU_SCRATCH_SIZE;
-+ }
-+
-+ err = tg3_load_firmware_cpu(tp, cpu_base,
-+ cpu_scratch_base, cpu_scratch_size,
-+ fw_hdr);
-+ if (err)
-+ return err;
-+
-+ /* Now startup the cpu. */
-+ err = tg3_pause_cpu_and_set_pc(tp, cpu_base,
-+ fw_hdr->base_addr);
-+ if (err) {
-+ netdev_err(tp->dev,
-+ "%s fails to set CPU PC, is %08x should be %08x\n",
-+ __func__, tr32(cpu_base + CPU_PC),
-+ fw_hdr->base_addr);
-+ return -ENODEV;
-+ }
-+
-+ tg3_resume_cpu(tp, cpu_base);
-+ return 0;
-+}
-+
-+#endif /* TG3_TSO_SUPPORT != 0 */
-+
-+/* tp->lock is held. */
-+static void __tg3_set_one_mac_addr(struct tg3 *tp, u8 *mac_addr, int index)
-+{
-+ u32 addr_high, addr_low;
-+
-+ addr_high = ((mac_addr[0] << 8) | mac_addr[1]);
-+ addr_low = ((mac_addr[2] << 24) | (mac_addr[3] << 16) |
-+ (mac_addr[4] << 8) | mac_addr[5]);
-+
-+ if (index < 4) {
-+ tw32(MAC_ADDR_0_HIGH + (index * 8), addr_high);
-+ tw32(MAC_ADDR_0_LOW + (index * 8), addr_low);
-+ } else {
-+ index -= 4;
-+ tw32(MAC_EXTADDR_0_HIGH + (index * 8), addr_high);
-+ tw32(MAC_EXTADDR_0_LOW + (index * 8), addr_low);
-+ }
-+}
-+
-+/* tp->lock is held. */
-+static void __tg3_set_mac_addr(struct tg3 *tp, bool skip_mac_1)
-+{
-+ u32 addr_high;
-+ int i;
-+
-+ for (i = 0; i < 4; i++) {
-+ if (i == 1 && skip_mac_1)
-+ continue;
-+ __tg3_set_one_mac_addr(tp, tp->dev->dev_addr, i);
-+ }
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5703 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5704) {
-+ for (i = 4; i < 16; i++)
-+ __tg3_set_one_mac_addr(tp, tp->dev->dev_addr, i);
-+ }
-+
-+ addr_high = (tp->dev->dev_addr[0] +
-+ tp->dev->dev_addr[1] +
-+ tp->dev->dev_addr[2] +
-+ tp->dev->dev_addr[3] +
-+ tp->dev->dev_addr[4] +
-+ tp->dev->dev_addr[5]) &
-+ TX_BACKOFF_SEED_MASK;
-+ tw32(MAC_TX_BACKOFF_SEED, addr_high);
-+}
-+
-+static void tg3_enable_register_access(struct tg3 *tp)
-+{
-+ /*
-+ * Make sure register accesses (indirect or otherwise) will function
-+ * correctly.
-+ */
-+ pci_write_config_dword(tp->pdev,
-+ TG3PCI_MISC_HOST_CTRL, tp->misc_host_ctrl);
-+}
-+
-+static int tg3_power_up(struct tg3 *tp)
-+{
-+ int err;
-+
-+ tg3_enable_register_access(tp);
-+
-+ /* Kernels less than around 2.6.37 still need this */
-+ pci_enable_wake(tp->pdev, PCI_D0, false);
-+
-+ err = pci_set_power_state(tp->pdev, PCI_D0);
-+ if (!err) {
-+ /* Switch out of Vaux if it is a NIC */
-+ tg3_pwrsrc_switch_to_vmain(tp);
-+ } else {
-+ netdev_err(tp->dev, "Transition to D0 failed\n");
-+ }
-+
-+ return err;
-+}
-+
-+static void tg3_power_down(struct tg3 *tp)
-+{
-+ pci_wake_from_d3(tp->pdev, tg3_flag(tp, WOL_ENABLE));
-+ pci_set_power_state(tp->pdev, PCI_D3hot);
-+}
-+
-+static int tg3_setup_phy(struct tg3 *, bool);
-+
-+static int tg3_power_down_prepare(struct tg3 *tp)
-+{
-+ u32 misc_host_ctrl;
-+ bool device_should_wake, do_low_power;
-+
-+ tg3_enable_register_access(tp);
-+
-+ /* Restore the CLKREQ setting. */
-+ if (tg3_flag(tp, CLKREQ_BUG))
-+ pcie_capability_set_word(tp->pdev, PCI_EXP_LNKCTL,
-+ PCI_EXP_LNKCTL_CLKREQ_EN);
-+
-+ misc_host_ctrl = tr32(TG3PCI_MISC_HOST_CTRL);
-+ tw32(TG3PCI_MISC_HOST_CTRL,
-+ misc_host_ctrl | MISC_HOST_CTRL_MASK_PCI_INT);
-+
-+ device_should_wake = device_may_wakeup(&tp->pdev->dev) &&
-+ tg3_flag(tp, WOL_ENABLE);
-+
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if (tg3_flag(tp, USE_PHYLIB)) {
-+ do_low_power = false;
-+ if ((tp->phy_flags & TG3_PHYFLG_IS_CONNECTED) &&
-+ !(tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER)) {
-+ struct phy_device *phydev;
-+ u32 phyid, advertising;
-+
-+ phydev = tp->mdio_bus->phy_map[tp->phy_addr];
-+
-+ tp->phy_flags |= TG3_PHYFLG_IS_LOW_POWER;
-+
-+ tp->link_config.speed = phydev->speed;
-+ tp->link_config.duplex = phydev->duplex;
-+ tp->link_config.autoneg = phydev->autoneg;
-+ tp->link_config.advertising = phydev->advertising;
-+
-+ advertising = ADVERTISED_TP |
-+ ADVERTISED_Pause |
-+ ADVERTISED_Autoneg |
-+ ADVERTISED_10baseT_Half;
-+
-+ if (tg3_flag(tp, ENABLE_ASF) || device_should_wake) {
-+ if (tg3_flag(tp, WOL_SPEED_100MB))
-+ advertising |=
-+ ADVERTISED_100baseT_Half |
-+ ADVERTISED_100baseT_Full |
-+ ADVERTISED_10baseT_Full;
-+ else
-+ advertising |= ADVERTISED_10baseT_Full;
-+ }
-+
-+ phydev->advertising = advertising;
-+
-+ phy_start_aneg(phydev);
-+
-+ phyid = phydev->drv->phy_id & phydev->drv->phy_id_mask;
-+ if (phyid != PHY_ID_BCMAC131) {
-+ phyid &= PHY_BCM_OUI_MASK;
-+ if (phyid == PHY_BCM_OUI_1 ||
-+ phyid == PHY_BCM_OUI_2 ||
-+ phyid == PHY_BCM_OUI_3)
-+ do_low_power = true;
-+ }
-+ }
-+ } else
-+#endif /* BCM_INCLUDE_PHYLIB_SUPPORT */
-+ {
-+ do_low_power = true;
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER))
-+ tp->phy_flags |= TG3_PHYFLG_IS_LOW_POWER;
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES))
-+ tg3_setup_phy(tp, false);
-+ }
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5906) {
-+ u32 val;
-+
-+ val = tr32(GRC_VCPU_EXT_CTRL);
-+ tw32(GRC_VCPU_EXT_CTRL, val | GRC_VCPU_EXT_CTRL_DISABLE_WOL);
-+ } else if (!tg3_flag(tp, ENABLE_ASF)) {
-+ int i;
-+ u32 val;
-+
-+ for (i = 0; i < 200; i++) {
-+ tg3_read_mem(tp, NIC_SRAM_FW_ASF_STATUS_MBOX, &val);
-+ if (val == ~NIC_SRAM_FIRMWARE_MBOX_MAGIC1)
-+ break;
-+ msleep(1);
-+ }
-+ }
-+ if (tg3_flag(tp, WOL_CAP))
-+ tg3_write_mem(tp, NIC_SRAM_WOL_MBOX, WOL_SIGNATURE |
-+ WOL_DRV_STATE_SHUTDOWN |
-+ WOL_DRV_WOL |
-+ WOL_SET_MAGIC_PKT);
-+
-+ if (device_should_wake) {
-+ u32 mac_mode;
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_PHY_SERDES)) {
-+ if (do_low_power &&
-+ !(tp->phy_flags & TG3_PHYFLG_IS_FET)) {
-+ tg3_phy_auxctl_write(tp,
-+ MII_TG3_AUXCTL_SHDWSEL_PWRCTL,
-+ MII_TG3_AUXCTL_PCTL_WOL_EN |
-+ MII_TG3_AUXCTL_PCTL_100TX_LPWR |
-+ MII_TG3_AUXCTL_PCTL_CL_AB_TXDAC);
-+ udelay(40);
-+ }
-+
-+ if (tp->phy_flags & TG3_PHYFLG_MII_SERDES)
-+ mac_mode = MAC_MODE_PORT_MODE_GMII;
-+ else if (tp->phy_flags &
-+ TG3_PHYFLG_KEEP_LINK_ON_PWRDN) {
-+ if (tp->link_config.active_speed == SPEED_1000)
-+ mac_mode = MAC_MODE_PORT_MODE_GMII;
-+ else
-+ mac_mode = MAC_MODE_PORT_MODE_MII;
-+ } else
-+ mac_mode = MAC_MODE_PORT_MODE_MII;
-+
-+ mac_mode |= tp->mac_mode & MAC_MODE_LINK_POLARITY;
-+ if (tg3_asic_rev(tp) == ASIC_REV_5700) {
-+ u32 speed = tg3_flag(tp, WOL_SPEED_100MB) ?
-+ SPEED_100 : SPEED_10;
-+ if (tg3_5700_link_polarity(tp, speed))
-+ mac_mode |= MAC_MODE_LINK_POLARITY;
-+ else
-+ mac_mode &= ~MAC_MODE_LINK_POLARITY;
-+ }
-+ } else {
-+ mac_mode = MAC_MODE_PORT_MODE_TBI;
-+ }
-+
-+ if (!tg3_flag(tp, 5750_PLUS))
-+ tw32(MAC_LED_CTRL, tp->led_ctrl);
-+
-+ mac_mode |= MAC_MODE_MAGIC_PKT_ENABLE;
-+ if ((tg3_flag(tp, 5705_PLUS) && !tg3_flag(tp, 5780_CLASS)) &&
-+ (tg3_flag(tp, ENABLE_ASF) || tg3_flag(tp, ENABLE_APE)))
-+ mac_mode |= MAC_MODE_KEEP_FRAME_IN_WOL;
-+
-+ if (tg3_flag(tp, ENABLE_APE))
-+ mac_mode |= MAC_MODE_APE_TX_EN |
-+ MAC_MODE_APE_RX_EN |
-+ MAC_MODE_TDE_ENABLE;
-+
-+ tw32_f(MAC_MODE, mac_mode);
-+ udelay(100);
-+
-+ tw32_f(MAC_RX_MODE, RX_MODE_ENABLE);
-+ udelay(10);
-+ }
-+
-+ if (!tg3_flag(tp, WOL_SPEED_100MB) &&
-+ (tg3_asic_rev(tp) == ASIC_REV_5700 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5701)) {
-+ u32 base_val;
-+
-+ base_val = tp->pci_clock_ctrl;
-+ base_val |= (CLOCK_CTRL_RXCLK_DISABLE |
-+ CLOCK_CTRL_TXCLK_DISABLE);
-+
-+ tw32_wait_f(TG3PCI_CLOCK_CTRL, base_val | CLOCK_CTRL_ALTCLK |
-+ CLOCK_CTRL_PWRDOWN_PLL133, 40);
-+ } else if (tg3_flag(tp, 5780_CLASS) ||
-+ tg3_flag(tp, CPMU_PRESENT) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5906) {
-+ /* do nothing */
-+ } else if (!(tg3_flag(tp, 5750_PLUS) && tg3_flag(tp, ENABLE_ASF))) {
-+ u32 newbits1, newbits2;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5700 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5701) {
-+ newbits1 = (CLOCK_CTRL_RXCLK_DISABLE |
-+ CLOCK_CTRL_TXCLK_DISABLE |
-+ CLOCK_CTRL_ALTCLK);
-+ newbits2 = newbits1 | CLOCK_CTRL_44MHZ_CORE;
-+ } else if (tg3_flag(tp, 5705_PLUS)) {
-+ newbits1 = CLOCK_CTRL_625_CORE;
-+ newbits2 = newbits1 | CLOCK_CTRL_ALTCLK;
-+ } else {
-+ newbits1 = CLOCK_CTRL_ALTCLK;
-+ newbits2 = newbits1 | CLOCK_CTRL_44MHZ_CORE;
-+ }
-+
-+ tw32_wait_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits1,
-+ 40);
-+
-+ tw32_wait_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2,
-+ 40);
-+
-+ if (!tg3_flag(tp, 5705_PLUS)) {
-+ u32 newbits3;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5700 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5701) {
-+ newbits3 = (CLOCK_CTRL_RXCLK_DISABLE |
-+ CLOCK_CTRL_TXCLK_DISABLE |
-+ CLOCK_CTRL_44MHZ_CORE);
-+ } else {
-+ newbits3 = CLOCK_CTRL_44MHZ_CORE;
-+ }
-+
-+ tw32_wait_f(TG3PCI_CLOCK_CTRL,
-+ tp->pci_clock_ctrl | newbits3, 40);
-+ }
-+ }
-+
-+ if (!(device_should_wake) && !tg3_flag(tp, ENABLE_ASF))
-+ tg3_power_down_phy(tp, do_low_power);
-+
-+ tg3_frob_aux_power(tp, true);
-+
-+ /* Workaround for unstable PLL clock */
-+ if ((!tg3_flag(tp, IS_SSB_CORE)) &&
-+ ((tg3_chip_rev(tp) == CHIPREV_5750_AX) ||
-+ (tg3_chip_rev(tp) == CHIPREV_5750_BX))) {
-+ u32 val = tr32(0x7d00);
-+
-+ val &= ~((1 << 16) | (1 << 4) | (1 << 2) | (1 << 1) | 1);
-+ tw32(0x7d00, val);
-+ if (!tg3_flag(tp, ENABLE_ASF)) {
-+ int err;
-+
-+ err = tg3_nvram_lock(tp);
-+ tg3_halt_cpu(tp, RX_CPU_BASE);
-+ if (!err)
-+ tg3_nvram_unlock(tp);
-+ }
-+ }
-+
-+ tg3_write_sig_post_reset(tp, RESET_KIND_SHUTDOWN);
-+
-+ tg3_ape_driver_state_change(tp, RESET_KIND_SHUTDOWN);
-+
-+ return 0;
-+}
-+
-+static void tg3_aux_stat_to_speed_duplex(struct tg3 *tp, u32 val, u16 *speed, u8 *duplex)
-+{
-+ switch (val & MII_TG3_AUX_STAT_SPDMASK) {
-+ case MII_TG3_AUX_STAT_10HALF:
-+ *speed = SPEED_10;
-+ *duplex = DUPLEX_HALF;
-+ break;
-+
-+ case MII_TG3_AUX_STAT_10FULL:
-+ *speed = SPEED_10;
-+ *duplex = DUPLEX_FULL;
-+ break;
-+
-+ case MII_TG3_AUX_STAT_100HALF:
-+ *speed = SPEED_100;
-+ *duplex = DUPLEX_HALF;
-+ break;
-+
-+ case MII_TG3_AUX_STAT_100FULL:
-+ *speed = SPEED_100;
-+ *duplex = DUPLEX_FULL;
-+ break;
-+
-+ case MII_TG3_AUX_STAT_1000HALF:
-+ *speed = SPEED_1000;
-+ *duplex = DUPLEX_HALF;
-+ break;
-+
-+ case MII_TG3_AUX_STAT_1000FULL:
-+ *speed = SPEED_1000;
-+ *duplex = DUPLEX_FULL;
-+ break;
-+
-+ default:
-+ if (tp->phy_flags & TG3_PHYFLG_IS_FET) {
-+ *speed = (val & MII_TG3_AUX_STAT_100) ? SPEED_100 :
-+ SPEED_10;
-+ *duplex = (val & MII_TG3_AUX_STAT_FULL) ? DUPLEX_FULL :
-+ DUPLEX_HALF;
-+ break;
-+ }
-+ *speed = SPEED_UNKNOWN;
-+ *duplex = DUPLEX_UNKNOWN;
-+ break;
-+ }
-+}
-+
-+static int tg3_phy_autoneg_cfg(struct tg3 *tp, u32 advertise, u32 flowctrl)
-+{
-+ int err = 0;
-+ u32 val, new_adv;
-+
-+ new_adv = ADVERTISE_CSMA;
-+ new_adv |= ethtool_adv_to_mii_adv_t(advertise) & ADVERTISE_ALL;
-+ new_adv |= mii_advertise_flowctrl(flowctrl);
-+
-+ err = tg3_writephy(tp, MII_ADVERTISE, new_adv);
-+ if (err)
-+ goto done;
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) {
-+ new_adv = ethtool_adv_to_mii_ctrl1000_t(advertise);
-+
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5701_A0 ||
-+ tg3_chip_rev_id(tp) == CHIPREV_ID_5701_B0)
-+ new_adv |= CTL1000_AS_MASTER | CTL1000_ENABLE_MASTER;
-+
-+ err = tg3_writephy(tp, MII_CTRL1000, new_adv);
-+ if (err)
-+ goto done;
-+ }
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP))
-+ goto done;
-+
-+#ifndef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if ((tp->phy_id & TG3_PHY_ID_MASK) != TG3_PHY_ID_BCM50612E)
-+#endif
-+ tw32(TG3_CPMU_EEE_MODE,
-+ tr32(TG3_CPMU_EEE_MODE) & ~TG3_CPMU_EEEMD_LPI_ENABLE);
-+
-+ err = tg3_phy_toggle_auxctl_smdsp(tp, true);
-+ if (!err) {
-+ u32 err2;
-+
-+ val = 0;
-+ /* Advertise 100-BaseTX EEE ability */
-+ if (advertise & ADVERTISED_100baseT_Full)
-+ val |= MDIO_AN_EEE_ADV_100TX;
-+ /* Advertise 1000-BaseT EEE ability */
-+ if (advertise & ADVERTISED_1000baseT_Full)
-+ val |= MDIO_AN_EEE_ADV_1000T;
-+
-+ if (!tp->eee.eee_enabled) {
-+ val = 0;
-+ tp->eee.advertised = 0;
-+ } else {
-+ tp->eee.advertised = advertise &
-+ (ADVERTISED_100baseT_Full |
-+ ADVERTISED_1000baseT_Full);
-+ }
-+
-+ err = tg3_phy_cl45_write(tp, MDIO_MMD_AN, MDIO_AN_EEE_ADV, val);
-+ if (err)
-+ goto err_out;
-+
-+ switch (tg3_asic_rev(tp)) {
-+ case ASIC_REV_5717:
-+ case ASIC_REV_57765:
-+ case ASIC_REV_57766:
-+ case ASIC_REV_5719:
-+ /* If we advertised any eee advertisements above... */
-+ if (val)
-+ val = MII_TG3_DSP_TAP26_ALNOKO |
-+ MII_TG3_DSP_TAP26_RMRXSTO |
-+ MII_TG3_DSP_TAP26_OPCSINPT;
-+ tg3_phydsp_write(tp, MII_TG3_DSP_TAP26, val);
-+ /* Fall through */
-+ case ASIC_REV_5720:
-+ case ASIC_REV_5762:
-+ if (!tg3_phydsp_read(tp, MII_TG3_DSP_CH34TP2, &val))
-+ tg3_phydsp_write(tp, MII_TG3_DSP_CH34TP2, val |
-+ MII_TG3_DSP_CH34TP2_HIBW01);
-+ }
-+
-+#ifndef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if ((tp->phy_id & TG3_PHY_ID_MASK) == TG3_PHY_ID_BCM50612E) {
-+ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, MII_TG3_DSP_TLER);
-+ tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &val);
-+ if (tp->link_config.autoneg == AUTONEG_ENABLE)
-+ val |= MII_TG3_DSP_TLER_AUTOGREEEN_EN;
-+ else
-+ val &= ~MII_TG3_DSP_TLER_AUTOGREEEN_EN;
-+ tg3_phydsp_write(tp, MII_TG3_DSP_TLER, val);
-+ }
-+#endif /* BCM_INCLUDE_PHYLIB_SUPPORT */
-+
-+err_out:
-+ err2 = tg3_phy_toggle_auxctl_smdsp(tp, false);
-+ if (!err)
-+ err = err2;
-+ }
-+
-+done:
-+ return err;
-+}
-+
-+static void tg3_phy_copper_begin(struct tg3 *tp)
-+{
-+ if (tp->link_config.autoneg == AUTONEG_ENABLE ||
-+ (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER)) {
-+ u32 adv, fc;
-+
-+ if ((tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER) &&
-+ !(tp->phy_flags & TG3_PHYFLG_KEEP_LINK_ON_PWRDN)) {
-+ adv = ADVERTISED_10baseT_Half |
-+ ADVERTISED_10baseT_Full;
-+ if (tg3_flag(tp, WOL_SPEED_100MB))
-+ adv |= ADVERTISED_100baseT_Half |
-+ ADVERTISED_100baseT_Full;
-+ if (tp->phy_flags & TG3_PHYFLG_1G_ON_VAUX_OK) {
-+ if (!(tp->phy_flags &
-+ TG3_PHYFLG_DISABLE_1G_HD_ADV))
-+ adv |= ADVERTISED_1000baseT_Half;
-+ adv |= ADVERTISED_1000baseT_Full;
-+ }
-+
-+ fc = FLOW_CTRL_TX | FLOW_CTRL_RX;
-+ } else {
-+ adv = tp->link_config.advertising;
-+ if (tp->phy_flags & TG3_PHYFLG_10_100_ONLY)
-+ adv &= ~(ADVERTISED_1000baseT_Half |
-+ ADVERTISED_1000baseT_Full);
-+
-+ fc = tp->link_config.flowctrl;
-+ }
-+
-+ tg3_phy_autoneg_cfg(tp, adv, fc);
-+
-+ if ((tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER) &&
-+ (tp->phy_flags & TG3_PHYFLG_KEEP_LINK_ON_PWRDN)) {
-+ /* Normally during power down we want to autonegotiate
-+ * the lowest possible speed for WOL. However, to avoid
-+ * link flap, we leave it untouched.
-+ */
-+ return;
-+ }
-+
-+ tg3_writephy(tp, MII_BMCR,
-+ BMCR_ANENABLE | BMCR_ANRESTART);
-+ } else {
-+ int i;
-+ u32 bmcr, orig_bmcr;
-+
-+ tp->link_config.active_speed = tp->link_config.speed;
-+ tp->link_config.active_duplex = tp->link_config.duplex;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5714) {
-+ /* With autoneg disabled, 5715 only links up when the
-+ * advertisement register has the configured speed
-+ * enabled.
-+ */
-+ tg3_writephy(tp, MII_ADVERTISE, ADVERTISE_ALL);
-+ }
-+
-+ bmcr = 0;
-+ switch (tp->link_config.speed) {
-+ default:
-+ case SPEED_10:
-+ break;
-+
-+ case SPEED_100:
-+ bmcr |= BMCR_SPEED100;
-+ break;
-+
-+ case SPEED_1000:
-+ bmcr |= BMCR_SPEED1000;
-+ break;
-+ }
-+
-+ if (tp->link_config.duplex == DUPLEX_FULL)
-+ bmcr |= BMCR_FULLDPLX;
-+
-+ if (!tg3_readphy(tp, MII_BMCR, &orig_bmcr) &&
-+ (bmcr != orig_bmcr)) {
-+ tg3_writephy(tp, MII_BMCR, BMCR_LOOPBACK);
-+ for (i = 0; i < 1500; i++) {
-+ u32 tmp;
-+
-+ udelay(10);
-+ if (tg3_readphy(tp, MII_BMSR, &tmp) ||
-+ tg3_readphy(tp, MII_BMSR, &tmp))
-+ continue;
-+ if (!(tmp & BMSR_LSTATUS)) {
-+ udelay(40);
-+ break;
-+ }
-+ }
-+ tg3_writephy(tp, MII_BMCR, bmcr);
-+ udelay(40);
-+ }
-+ }
-+}
-+
-+static int tg3_phy_pull_config(struct tg3 *tp)
-+{
-+ int err;
-+ u32 val;
-+
-+ err = tg3_readphy(tp, MII_BMCR, &val);
-+ if (err)
-+ goto done;
-+
-+ if (!(val & BMCR_ANENABLE)) {
-+ tp->link_config.autoneg = AUTONEG_DISABLE;
-+ tp->link_config.advertising = 0;
-+ tg3_flag_clear(tp, PAUSE_AUTONEG);
-+
-+ err = -EIO;
-+
-+ switch (val & (BMCR_SPEED1000 | BMCR_SPEED100)) {
-+ case 0:
-+ if (tp->phy_flags & TG3_PHYFLG_ANY_SERDES)
-+ goto done;
-+
-+ tp->link_config.speed = SPEED_10;
-+ break;
-+ case BMCR_SPEED100:
-+ if (tp->phy_flags & TG3_PHYFLG_ANY_SERDES)
-+ goto done;
-+
-+ tp->link_config.speed = SPEED_100;
-+ break;
-+ case BMCR_SPEED1000:
-+ if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) {
-+ tp->link_config.speed = SPEED_1000;
-+ break;
-+ }
-+ /* Fall through */
-+ default:
-+ goto done;
-+ }
-+
-+ if (val & BMCR_FULLDPLX)
-+ tp->link_config.duplex = DUPLEX_FULL;
-+ else
-+ tp->link_config.duplex = DUPLEX_HALF;
-+
-+ tp->link_config.flowctrl = FLOW_CTRL_RX | FLOW_CTRL_TX;
-+
-+ err = 0;
-+ goto done;
-+ }
-+
-+ tp->link_config.autoneg = AUTONEG_ENABLE;
-+ tp->link_config.advertising = ADVERTISED_Autoneg;
-+ tg3_flag_set(tp, PAUSE_AUTONEG);
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES)) {
-+ u32 adv;
-+
-+ err = tg3_readphy(tp, MII_ADVERTISE, &val);
-+ if (err)
-+ goto done;
-+
-+ adv = mii_adv_to_ethtool_adv_t(val & ADVERTISE_ALL);
-+ tp->link_config.advertising |= adv | ADVERTISED_TP;
-+
-+ tp->link_config.flowctrl = tg3_decode_flowctrl_1000T(val);
-+ } else {
-+ tp->link_config.advertising |= ADVERTISED_FIBRE;
-+ }
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) {
-+ u32 adv;
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES)) {
-+ err = tg3_readphy(tp, MII_CTRL1000, &val);
-+ if (err)
-+ goto done;
-+
-+ adv = mii_ctrl1000_to_ethtool_adv_t(val);
-+ } else {
-+ err = tg3_readphy(tp, MII_ADVERTISE, &val);
-+ if (err)
-+ goto done;
-+
-+ adv = tg3_decode_flowctrl_1000X(val);
-+ tp->link_config.flowctrl = adv;
-+
-+ val &= (ADVERTISE_1000XHALF | ADVERTISE_1000XFULL);
-+ adv = mii_adv_to_ethtool_adv_x(val);
-+ }
-+
-+ tp->link_config.advertising |= adv;
-+ }
-+
-+done:
-+ return err;
-+}
-+
-+static int tg3_init_5401phy_dsp(struct tg3 *tp)
-+{
-+ int err;
-+
-+ /* Turn off tap power management. */
-+ /* Set Extended packet length bit */
-+ err = tg3_phy_auxctl_write(tp, MII_TG3_AUXCTL_SHDWSEL_AUXCTL, 0x4c20);
-+
-+ err |= tg3_phydsp_write(tp, 0x0012, 0x1804);
-+ err |= tg3_phydsp_write(tp, 0x0013, 0x1204);
-+ err |= tg3_phydsp_write(tp, 0x8006, 0x0132);
-+ err |= tg3_phydsp_write(tp, 0x8006, 0x0232);
-+ err |= tg3_phydsp_write(tp, 0x201f, 0x0a20);
-+
-+ udelay(40);
-+
-+ return err;
-+}
-+
-+static bool tg3_phy_eee_config_ok(struct tg3 *tp)
-+{
-+ struct ethtool_eee eee;
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP))
-+ return true;
-+
-+ tg3_eee_pull_config(tp, &eee);
-+
-+ if (tp->eee.eee_enabled) {
-+ if (tp->eee.advertised != eee.advertised ||
-+ tp->eee.tx_lpi_timer != eee.tx_lpi_timer ||
-+ tp->eee.tx_lpi_enabled != eee.tx_lpi_enabled)
-+ return false;
-+ } else {
-+ /* EEE is disabled but we're advertising */
-+ if (eee.advertised)
-+ return false;
-+ }
-+
-+ return true;
-+}
-+
-+static bool tg3_phy_copper_an_config_ok(struct tg3 *tp, u32 *lcladv)
-+{
-+ u32 advmsk, tgtadv, advertising;
-+
-+ advertising = tp->link_config.advertising;
-+ tgtadv = ethtool_adv_to_mii_adv_t(advertising) & ADVERTISE_ALL;
-+
-+ advmsk = ADVERTISE_ALL;
-+ if (tp->link_config.active_duplex == DUPLEX_FULL) {
-+ tgtadv |= mii_advertise_flowctrl(tp->link_config.flowctrl);
-+ advmsk |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
-+ }
-+
-+ if (tg3_readphy(tp, MII_ADVERTISE, lcladv))
-+ return false;
-+
-+ if ((*lcladv & advmsk) != tgtadv)
-+ return false;
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) {
-+ u32 tg3_ctrl;
-+
-+ tgtadv = ethtool_adv_to_mii_ctrl1000_t(advertising);
-+
-+ if (tg3_readphy(tp, MII_CTRL1000, &tg3_ctrl))
-+ return false;
-+
-+ if (tgtadv &&
-+ (tg3_chip_rev_id(tp) == CHIPREV_ID_5701_A0 ||
-+ tg3_chip_rev_id(tp) == CHIPREV_ID_5701_B0)) {
-+ tgtadv |= CTL1000_AS_MASTER | CTL1000_ENABLE_MASTER;
-+ tg3_ctrl &= (ADVERTISE_1000HALF | ADVERTISE_1000FULL |
-+ CTL1000_AS_MASTER | CTL1000_ENABLE_MASTER);
-+ } else {
-+ tg3_ctrl &= (ADVERTISE_1000HALF | ADVERTISE_1000FULL);
-+ }
-+
-+ if (tg3_ctrl != tgtadv)
-+ return false;
-+ }
-+
-+ return true;
-+}
-+
-+static bool tg3_phy_copper_fetch_rmtadv(struct tg3 *tp, u32 *rmtadv)
-+{
-+ u32 lpeth = 0;
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) {
-+ u32 val;
-+
-+ if (tg3_readphy(tp, MII_STAT1000, &val))
-+ return false;
-+
-+ lpeth = mii_stat1000_to_ethtool_lpa_t(val);
-+ }
-+
-+ if (tg3_readphy(tp, MII_LPA, rmtadv))
-+ return false;
-+
-+ lpeth |= mii_lpa_to_ethtool_lpa_t(*rmtadv);
-+ tp->link_config.rmt_adv = lpeth;
-+
-+ return true;
-+}
-+
-+static bool tg3_test_and_report_link_chg(struct tg3 *tp, bool curr_link_up)
-+{
-+ if (curr_link_up != tp->link_up) {
-+ if (curr_link_up) {
-+ netif_carrier_on(tp->dev);
-+ } else {
-+ netif_carrier_off(tp->dev);
-+ if (tp->phy_flags & TG3_PHYFLG_MII_SERDES)
-+ tp->phy_flags &= ~TG3_PHYFLG_PARALLEL_DETECT;
-+ }
-+
-+ tg3_link_report(tp);
-+ return true;
-+ }
-+
-+ return false;
-+}
-+
-+static void tg3_clear_mac_status(struct tg3 *tp)
-+{
-+ tw32(MAC_EVENT, 0);
-+
-+ tw32_f(MAC_STATUS,
-+ MAC_STATUS_SYNC_CHANGED |
-+ MAC_STATUS_CFG_CHANGED |
-+ MAC_STATUS_MI_COMPLETION |
-+ MAC_STATUS_LNKSTATE_CHANGED);
-+ udelay(40);
-+}
-+
-+static void tg3_setup_eee(struct tg3 *tp)
-+{
-+ u32 val;
-+
-+ val = TG3_CPMU_EEE_LNKIDL_PCIE_NL0 |
-+ TG3_CPMU_EEE_LNKIDL_UART_IDL;
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_57765_A0)
-+ val |= TG3_CPMU_EEE_LNKIDL_APE_TX_MT;
-+
-+ tw32_f(TG3_CPMU_EEE_LNKIDL_CTRL, val);
-+
-+ tw32_f(TG3_CPMU_EEE_CTRL,
-+ TG3_CPMU_EEE_CTRL_EXIT_20_1_US);
-+
-+ val = TG3_CPMU_EEEMD_ERLY_L1_XIT_DET |
-+ (tp->eee.tx_lpi_enabled ? TG3_CPMU_EEEMD_LPI_IN_TX : 0) |
-+ TG3_CPMU_EEEMD_LPI_IN_RX |
-+ TG3_CPMU_EEEMD_EEE_ENABLE;
-+
-+ if (tg3_asic_rev(tp) != ASIC_REV_5717)
-+ val |= TG3_CPMU_EEEMD_SND_IDX_DET_EN;
-+
-+ if (tg3_flag(tp, ENABLE_APE))
-+ val |= TG3_CPMU_EEEMD_APE_TX_DET_EN;
-+
-+ tw32_f(TG3_CPMU_EEE_MODE, tp->eee.eee_enabled ? val : 0);
-+
-+ tw32_f(TG3_CPMU_EEE_DBTMR1,
-+ TG3_CPMU_DBTMR1_PCIEXIT_2047US |
-+ (tp->eee.tx_lpi_timer & 0xffff));
-+
-+ tw32_f(TG3_CPMU_EEE_DBTMR2,
-+ TG3_CPMU_DBTMR2_APE_TX_2047US |
-+ TG3_CPMU_DBTMR2_TXIDXEQ_2047US);
-+}
-+
-+static int tg3_setup_copper_phy(struct tg3 *tp, bool force_reset)
-+{
-+ bool current_link_up;
-+ u32 bmsr, val;
-+ u32 lcl_adv, rmt_adv;
-+ u16 current_speed;
-+ u8 current_duplex;
-+ int i, err;
-+
-+ tg3_clear_mac_status(tp);
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_IS_FET))
-+ tg3_phy_auxctl_write(tp, MII_TG3_AUXCTL_SHDWSEL_PWRCTL, 0);
-+
-+ /* Some third-party PHYs need to be reset on link going
-+ * down.
-+ */
-+ if ((tg3_asic_rev(tp) == ASIC_REV_5703 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5704 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5705) &&
-+ tp->link_up) {
-+ tg3_readphy(tp, MII_BMSR, &bmsr);
-+ if (!tg3_readphy(tp, MII_BMSR, &bmsr) &&
-+ !(bmsr & BMSR_LSTATUS))
-+ force_reset = true;
-+ }
-+ if (force_reset)
-+ tg3_phy_reset(tp);
-+
-+ if ((tp->phy_id & TG3_PHY_ID_MASK) == TG3_PHY_ID_BCM5401) {
-+ tg3_readphy(tp, MII_BMSR, &bmsr);
-+ if (tg3_readphy(tp, MII_BMSR, &bmsr) ||
-+ !tg3_flag(tp, INIT_COMPLETE))
-+ bmsr = 0;
-+
-+ if (!(bmsr & BMSR_LSTATUS)) {
-+ err = tg3_init_5401phy_dsp(tp);
-+ if (err)
-+ return err;
-+
-+ tg3_readphy(tp, MII_BMSR, &bmsr);
-+ for (i = 0; i < 1000; i++) {
-+ udelay(10);
-+ if (!tg3_readphy(tp, MII_BMSR, &bmsr) &&
-+ (bmsr & BMSR_LSTATUS)) {
-+ udelay(40);
-+ break;
-+ }
-+ }
-+
-+ if ((tp->phy_id & TG3_PHY_ID_REV_MASK) ==
-+ TG3_PHY_REV_BCM5401_B0 &&
-+ !(bmsr & BMSR_LSTATUS) &&
-+ tp->link_config.active_speed == SPEED_1000) {
-+ err = tg3_phy_reset(tp);
-+ if (!err)
-+ err = tg3_init_5401phy_dsp(tp);
-+ if (err)
-+ return err;
-+ }
-+ }
-+ } else if (tg3_chip_rev_id(tp) == CHIPREV_ID_5701_A0 ||
-+ tg3_chip_rev_id(tp) == CHIPREV_ID_5701_B0) {
-+ /* 5701 {A0,B0} CRC bug workaround */
-+ tg3_writephy(tp, 0x15, 0x0a75);
-+ tg3_writephy(tp, MII_TG3_MISC_SHDW, 0x8c68);
-+ tg3_writephy(tp, MII_TG3_MISC_SHDW, 0x8d68);
-+ tg3_writephy(tp, MII_TG3_MISC_SHDW, 0x8c68);
-+ }
-+
-+ /* Clear pending interrupts... */
-+ tg3_readphy(tp, MII_TG3_ISTAT, &val);
-+ tg3_readphy(tp, MII_TG3_ISTAT, &val);
-+
-+ if (tp->phy_flags & TG3_PHYFLG_USE_MI_INTERRUPT)
-+ tg3_writephy(tp, MII_TG3_IMASK, ~MII_TG3_INT_LINKCHG);
-+ else if (!(tp->phy_flags & TG3_PHYFLG_IS_FET))
-+ tg3_writephy(tp, MII_TG3_IMASK, ~0);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5700 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5701) {
-+ if (tp->led_ctrl == LED_CTRL_MODE_PHY_1)
-+ tg3_writephy(tp, MII_TG3_EXT_CTRL,
-+ MII_TG3_EXT_CTRL_LNK3_LED_MODE);
-+ else
-+ tg3_writephy(tp, MII_TG3_EXT_CTRL, 0);
-+ }
-+
-+ current_link_up = false;
-+ current_speed = SPEED_UNKNOWN;
-+ current_duplex = DUPLEX_UNKNOWN;
-+ tp->phy_flags &= ~TG3_PHYFLG_MDIX_STATE;
-+ tp->link_config.rmt_adv = 0;
-+
-+ if (tp->phy_flags & TG3_PHYFLG_CAPACITIVE_COUPLING) {
-+ err = tg3_phy_auxctl_read(tp,
-+ MII_TG3_AUXCTL_SHDWSEL_MISCTEST,
-+ &val);
-+ if (!err && !(val & (1 << 10))) {
-+ tg3_phy_auxctl_write(tp,
-+ MII_TG3_AUXCTL_SHDWSEL_MISCTEST,
-+ val | (1 << 10));
-+ goto relink;
-+ }
-+ }
-+
-+ bmsr = 0;
-+ for (i = 0; i < 100; i++) {
-+ tg3_readphy(tp, MII_BMSR, &bmsr);
-+ if (!tg3_readphy(tp, MII_BMSR, &bmsr) &&
-+ (bmsr & BMSR_LSTATUS))
-+ break;
-+ udelay(40);
-+ }
-+
-+ if (bmsr & BMSR_LSTATUS) {
-+ u32 aux_stat, bmcr;
-+
-+ tg3_readphy(tp, MII_TG3_AUX_STAT, &aux_stat);
-+ for (i = 0; i < 2000; i++) {
-+ udelay(10);
-+ if (!tg3_readphy(tp, MII_TG3_AUX_STAT, &aux_stat) &&
-+ aux_stat)
-+ break;
-+ }
-+
-+ tg3_aux_stat_to_speed_duplex(tp, aux_stat,
-+ ¤t_speed,
-+ ¤t_duplex);
-+
-+ bmcr = 0;
-+ for (i = 0; i < 200; i++) {
-+ tg3_readphy(tp, MII_BMCR, &bmcr);
-+ if (tg3_readphy(tp, MII_BMCR, &bmcr))
-+ continue;
-+ if (bmcr && bmcr != 0x7fff)
-+ break;
-+ udelay(10);
-+ }
-+
-+ lcl_adv = 0;
-+ rmt_adv = 0;
-+
-+ tp->link_config.active_speed = current_speed;
-+ tp->link_config.active_duplex = current_duplex;
-+
-+ if (tp->link_config.autoneg == AUTONEG_ENABLE) {
-+ bool eee_config_ok = tg3_phy_eee_config_ok(tp);
-+
-+ if ((bmcr & BMCR_ANENABLE) &&
-+ eee_config_ok &&
-+ tg3_phy_copper_an_config_ok(tp, &lcl_adv) &&
-+ tg3_phy_copper_fetch_rmtadv(tp, &rmt_adv))
-+ current_link_up = true;
-+
-+ /* EEE settings changes take effect only after a phy
-+ * reset. If we have skipped a reset due to Link Flap
-+ * Avoidance being enabled, do it now.
-+ */
-+ if (!eee_config_ok &&
-+ (tp->phy_flags & TG3_PHYFLG_KEEP_LINK_ON_PWRDN) &&
-+ !force_reset) {
-+ tg3_setup_eee(tp);
-+ tg3_phy_reset(tp);
-+ }
-+ } else {
-+ if (!(bmcr & BMCR_ANENABLE) &&
-+ tp->link_config.speed == current_speed &&
-+ tp->link_config.duplex == current_duplex) {
-+ current_link_up = true;
-+ }
-+ }
-+
-+ if (current_link_up &&
-+ tp->link_config.active_duplex == DUPLEX_FULL) {
-+ u32 reg, bit;
-+
-+ if (tp->phy_flags & TG3_PHYFLG_IS_FET) {
-+ reg = MII_TG3_FET_GEN_STAT;
-+ bit = MII_TG3_FET_GEN_STAT_MDIXSTAT;
-+ } else {
-+ reg = MII_TG3_EXT_STAT;
-+ bit = MII_TG3_EXT_STAT_MDIX;
-+ }
-+
-+ if (!tg3_readphy(tp, reg, &val) && (val & bit))
-+ tp->phy_flags |= TG3_PHYFLG_MDIX_STATE;
-+
-+ tg3_setup_flow_control(tp, lcl_adv, rmt_adv);
-+ }
-+ }
-+
-+relink:
-+ if (!current_link_up || (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER)) {
-+ tg3_phy_copper_begin(tp);
-+
-+ if (tg3_flag(tp, ROBOSWITCH)) {
-+ current_link_up = true;
-+ /* FIXME: when BCM5325 switch is used use 100 MBit/s */
-+ current_speed = SPEED_1000;
-+ current_duplex = DUPLEX_FULL;
-+ tp->link_config.active_speed = current_speed;
-+ tp->link_config.active_duplex = current_duplex;
-+ }
-+
-+ tg3_readphy(tp, MII_BMSR, &bmsr);
-+ if ((!tg3_readphy(tp, MII_BMSR, &bmsr) && (bmsr & BMSR_LSTATUS)) ||
-+ (tp->mac_mode & MAC_MODE_PORT_INT_LPBACK))
-+ current_link_up = true;
-+ }
-+
-+ tp->mac_mode &= ~MAC_MODE_PORT_MODE_MASK;
-+ if (current_link_up) {
-+ if (tp->link_config.active_speed == SPEED_100 ||
-+ tp->link_config.active_speed == SPEED_10)
-+ tp->mac_mode |= MAC_MODE_PORT_MODE_MII;
-+ else
-+ tp->mac_mode |= MAC_MODE_PORT_MODE_GMII;
-+ } else if ((tp->phy_flags & TG3_PHYFLG_IS_FET) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5785)
-+ tp->mac_mode |= MAC_MODE_PORT_MODE_MII;
-+ else
-+ tp->mac_mode |= MAC_MODE_PORT_MODE_GMII;
-+
-+ /* In order for the 5750 core in BCM4785 chip to work properly
-+ * in RGMII mode, the Led Control Register must be set up.
-+ */
-+ if (tg3_flag(tp, RGMII_MODE)) {
-+ u32 led_ctrl = tr32(MAC_LED_CTRL);
-+ led_ctrl &= ~(LED_CTRL_1000MBPS_ON | LED_CTRL_100MBPS_ON);
-+
-+ if (tp->link_config.active_speed == SPEED_10)
-+ led_ctrl |= LED_CTRL_LNKLED_OVERRIDE;
-+ else if (tp->link_config.active_speed == SPEED_100)
-+ led_ctrl |= (LED_CTRL_LNKLED_OVERRIDE |
-+ LED_CTRL_100MBPS_ON);
-+ else if (tp->link_config.active_speed == SPEED_1000)
-+ led_ctrl |= (LED_CTRL_LNKLED_OVERRIDE |
-+ LED_CTRL_1000MBPS_ON);
-+
-+ tw32(MAC_LED_CTRL, led_ctrl);
-+ udelay(40);
-+ }
-+
-+ tp->mac_mode &= ~MAC_MODE_HALF_DUPLEX;
-+ if (tp->link_config.active_duplex == DUPLEX_HALF)
-+ tp->mac_mode |= MAC_MODE_HALF_DUPLEX;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5700) {
-+ if (current_link_up &&
-+ tg3_5700_link_polarity(tp, tp->link_config.active_speed))
-+ tp->mac_mode |= MAC_MODE_LINK_POLARITY;
-+ else
-+ tp->mac_mode &= ~MAC_MODE_LINK_POLARITY;
-+ }
-+
-+ /* ??? Without this setting Netgear GA302T PHY does not
-+ * ??? send/receive packets...
-+ */
-+ if ((tp->phy_id & TG3_PHY_ID_MASK) == TG3_PHY_ID_BCM5411 &&
-+ tg3_chip_rev_id(tp) == CHIPREV_ID_5700_ALTIMA) {
-+ tp->mi_mode |= MAC_MI_MODE_AUTO_POLL;
-+ tw32_f(MAC_MI_MODE, tp->mi_mode);
-+ udelay(80);
-+ }
-+
-+ tw32_f(MAC_MODE, tp->mac_mode);
-+ udelay(40);
-+
-+ tg3_phy_eee_adjust(tp, current_link_up);
-+
-+#ifndef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if (tg3_asic_rev(tp) == ASIC_REV_5785) {
-+ /* A0 */
-+ if (tp->phy_id == TG3_PHY_ID_BCM50612E &&
-+ !tg3_phy_toggle_auxctl_smdsp(tp, true)) {
-+ if (tp->link_config.active_speed == SPEED_10)
-+ tg3_phydsp_write(tp, 0x0ff0, 0x2000);
-+ else
-+ tg3_phydsp_write(tp, 0x0ff0, 0x0000);
-+
-+ tg3_phy_toggle_auxctl_smdsp(tp, false);
-+ }
-+
-+ if (tp->link_config.active_speed == SPEED_10)
-+ tw32(MAC_MI_STAT,
-+ MAC_MI_STAT_10MBPS_MODE |
-+ MAC_MI_STAT_LNKSTAT_ATTN_ENAB);
-+ else
-+ tw32(MAC_MI_STAT, MAC_MI_STAT_LNKSTAT_ATTN_ENAB);
-+ }
-+#endif
-+
-+ if (tg3_flag(tp, USE_LINKCHG_REG)) {
-+ /* Polled via timer. */
-+ tw32_f(MAC_EVENT, 0);
-+ } else {
-+ tw32_f(MAC_EVENT, MAC_EVENT_LNKSTATE_CHANGED);
-+ }
-+ udelay(40);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5700 &&
-+ current_link_up &&
-+ tp->link_config.active_speed == SPEED_1000 &&
-+ (tg3_flag(tp, PCIX_MODE) || tg3_flag(tp, PCI_HIGH_SPEED))) {
-+ udelay(120);
-+ tw32_f(MAC_STATUS,
-+ (MAC_STATUS_SYNC_CHANGED |
-+ MAC_STATUS_CFG_CHANGED));
-+ udelay(40);
-+ tg3_write_mem(tp,
-+ NIC_SRAM_FIRMWARE_MBOX,
-+ NIC_SRAM_FIRMWARE_MBOX_MAGIC2);
-+ }
-+
-+ /* Prevent send BD corruption. */
-+ if (tg3_flag(tp, CLKREQ_BUG)) {
-+ if (tp->link_config.active_speed == SPEED_100 ||
-+ tp->link_config.active_speed == SPEED_10)
-+ pcie_capability_clear_word(tp->pdev, PCI_EXP_LNKCTL,
-+ PCI_EXP_LNKCTL_CLKREQ_EN);
-+ else
-+ pcie_capability_set_word(tp->pdev, PCI_EXP_LNKCTL,
-+ PCI_EXP_LNKCTL_CLKREQ_EN);
-+ }
-+
-+ tg3_test_and_report_link_chg(tp, current_link_up);
-+
-+ return 0;
-+}
-+
-+struct tg3_fiber_aneginfo {
-+ int state;
-+#define ANEG_STATE_UNKNOWN 0
-+#define ANEG_STATE_AN_ENABLE 1
-+#define ANEG_STATE_RESTART_INIT 2
-+#define ANEG_STATE_RESTART 3
-+#define ANEG_STATE_DISABLE_LINK_OK 4
-+#define ANEG_STATE_ABILITY_DETECT_INIT 5
-+#define ANEG_STATE_ABILITY_DETECT 6
-+#define ANEG_STATE_ACK_DETECT_INIT 7
-+#define ANEG_STATE_ACK_DETECT 8
-+#define ANEG_STATE_COMPLETE_ACK_INIT 9
-+#define ANEG_STATE_COMPLETE_ACK 10
-+#define ANEG_STATE_IDLE_DETECT_INIT 11
-+#define ANEG_STATE_IDLE_DETECT 12
-+#define ANEG_STATE_LINK_OK 13
-+#define ANEG_STATE_NEXT_PAGE_WAIT_INIT 14
-+#define ANEG_STATE_NEXT_PAGE_WAIT 15
-+
-+ u32 flags;
-+#define MR_AN_ENABLE 0x00000001
-+#define MR_RESTART_AN 0x00000002
-+#define MR_AN_COMPLETE 0x00000004
-+#define MR_PAGE_RX 0x00000008
-+#define MR_NP_LOADED 0x00000010
-+#define MR_TOGGLE_TX 0x00000020
-+#define MR_LP_ADV_FULL_DUPLEX 0x00000040
-+#define MR_LP_ADV_HALF_DUPLEX 0x00000080
-+#define MR_LP_ADV_SYM_PAUSE 0x00000100
-+#define MR_LP_ADV_ASYM_PAUSE 0x00000200
-+#define MR_LP_ADV_REMOTE_FAULT1 0x00000400
-+#define MR_LP_ADV_REMOTE_FAULT2 0x00000800
-+#define MR_LP_ADV_NEXT_PAGE 0x00001000
-+#define MR_TOGGLE_RX 0x00002000
-+#define MR_NP_RX 0x00004000
-+
-+#define MR_LINK_OK 0x80000000
-+
-+ unsigned long link_time, cur_time;
-+
-+ u32 ability_match_cfg;
-+ int ability_match_count;
-+
-+ char ability_match, idle_match, ack_match;
-+
-+ u32 txconfig, rxconfig;
-+#define ANEG_CFG_NP 0x00000080
-+#define ANEG_CFG_ACK 0x00000040
-+#define ANEG_CFG_RF2 0x00000020
-+#define ANEG_CFG_RF1 0x00000010
-+#define ANEG_CFG_PS2 0x00000001
-+#define ANEG_CFG_PS1 0x00008000
-+#define ANEG_CFG_HD 0x00004000
-+#define ANEG_CFG_FD 0x00002000
-+#define ANEG_CFG_INVAL 0x00001f06
-+
-+};
-+#define ANEG_OK 0
-+#define ANEG_DONE 1
-+#define ANEG_TIMER_ENAB 2
-+#define ANEG_FAILED -1
-+
-+#define ANEG_STATE_SETTLE_TIME 10000
-+
-+static int tg3_fiber_aneg_smachine(struct tg3 *tp,
-+ struct tg3_fiber_aneginfo *ap)
-+{
-+ u16 flowctrl;
-+ unsigned long delta;
-+ u32 rx_cfg_reg;
-+ int ret;
-+
-+ if (ap->state == ANEG_STATE_UNKNOWN) {
-+ ap->rxconfig = 0;
-+ ap->link_time = 0;
-+ ap->cur_time = 0;
-+ ap->ability_match_cfg = 0;
-+ ap->ability_match_count = 0;
-+ ap->ability_match = 0;
-+ ap->idle_match = 0;
-+ ap->ack_match = 0;
-+ }
-+ ap->cur_time++;
-+
-+ if (tr32(MAC_STATUS) & MAC_STATUS_RCVD_CFG) {
-+ rx_cfg_reg = tr32(MAC_RX_AUTO_NEG);
-+
-+ if (rx_cfg_reg != ap->ability_match_cfg) {
-+ ap->ability_match_cfg = rx_cfg_reg;
-+ ap->ability_match = 0;
-+ ap->ability_match_count = 0;
-+ } else {
-+ if (++ap->ability_match_count > 1) {
-+ ap->ability_match = 1;
-+ ap->ability_match_cfg = rx_cfg_reg;
-+ }
-+ }
-+ if (rx_cfg_reg & ANEG_CFG_ACK)
-+ ap->ack_match = 1;
-+ else
-+ ap->ack_match = 0;
-+
-+ ap->idle_match = 0;
-+ } else {
-+ ap->idle_match = 1;
-+ ap->ability_match_cfg = 0;
-+ ap->ability_match_count = 0;
-+ ap->ability_match = 0;
-+ ap->ack_match = 0;
-+
-+ rx_cfg_reg = 0;
-+ }
-+
-+ ap->rxconfig = rx_cfg_reg;
-+ ret = ANEG_OK;
-+
-+ switch (ap->state) {
-+ case ANEG_STATE_UNKNOWN:
-+ if (ap->flags & (MR_AN_ENABLE | MR_RESTART_AN))
-+ ap->state = ANEG_STATE_AN_ENABLE;
-+
-+ /* fallthru */
-+ case ANEG_STATE_AN_ENABLE:
-+ ap->flags &= ~(MR_AN_COMPLETE | MR_PAGE_RX);
-+ if (ap->flags & MR_AN_ENABLE) {
-+ ap->link_time = 0;
-+ ap->cur_time = 0;
-+ ap->ability_match_cfg = 0;
-+ ap->ability_match_count = 0;
-+ ap->ability_match = 0;
-+ ap->idle_match = 0;
-+ ap->ack_match = 0;
-+
-+ ap->state = ANEG_STATE_RESTART_INIT;
-+ } else {
-+ ap->state = ANEG_STATE_DISABLE_LINK_OK;
-+ }
-+ break;
-+
-+ case ANEG_STATE_RESTART_INIT:
-+ ap->link_time = ap->cur_time;
-+ ap->flags &= ~(MR_NP_LOADED);
-+ ap->txconfig = 0;
-+ tw32(MAC_TX_AUTO_NEG, 0);
-+ tp->mac_mode |= MAC_MODE_SEND_CONFIGS;
-+ tw32_f(MAC_MODE, tp->mac_mode);
-+ udelay(40);
-+
-+ ret = ANEG_TIMER_ENAB;
-+ ap->state = ANEG_STATE_RESTART;
-+
-+ /* fallthru */
-+ case ANEG_STATE_RESTART:
-+ delta = ap->cur_time - ap->link_time;
-+ if (delta > ANEG_STATE_SETTLE_TIME)
-+ ap->state = ANEG_STATE_ABILITY_DETECT_INIT;
-+ else
-+ ret = ANEG_TIMER_ENAB;
-+ break;
-+
-+ case ANEG_STATE_DISABLE_LINK_OK:
-+ ret = ANEG_DONE;
-+ break;
-+
-+ case ANEG_STATE_ABILITY_DETECT_INIT:
-+ ap->flags &= ~(MR_TOGGLE_TX);
-+ ap->txconfig = ANEG_CFG_FD;
-+ flowctrl = tg3_advert_flowctrl_1000X(tp->link_config.flowctrl);
-+ if (flowctrl & ADVERTISE_1000XPAUSE)
-+ ap->txconfig |= ANEG_CFG_PS1;
-+ if (flowctrl & ADVERTISE_1000XPSE_ASYM)
-+ ap->txconfig |= ANEG_CFG_PS2;
-+ tw32(MAC_TX_AUTO_NEG, ap->txconfig);
-+ tp->mac_mode |= MAC_MODE_SEND_CONFIGS;
-+ tw32_f(MAC_MODE, tp->mac_mode);
-+ udelay(40);
-+
-+ ap->state = ANEG_STATE_ABILITY_DETECT;
-+ break;
-+
-+ case ANEG_STATE_ABILITY_DETECT:
-+ if (ap->ability_match != 0 && ap->rxconfig != 0)
-+ ap->state = ANEG_STATE_ACK_DETECT_INIT;
-+ break;
-+
-+ case ANEG_STATE_ACK_DETECT_INIT:
-+ ap->txconfig |= ANEG_CFG_ACK;
-+ tw32(MAC_TX_AUTO_NEG, ap->txconfig);
-+ tp->mac_mode |= MAC_MODE_SEND_CONFIGS;
-+ tw32_f(MAC_MODE, tp->mac_mode);
-+ udelay(40);
-+
-+ ap->state = ANEG_STATE_ACK_DETECT;
-+
-+ /* fallthru */
-+ case ANEG_STATE_ACK_DETECT:
-+ if (ap->ack_match != 0) {
-+ if ((ap->rxconfig & ~ANEG_CFG_ACK) ==
-+ (ap->ability_match_cfg & ~ANEG_CFG_ACK)) {
-+ ap->state = ANEG_STATE_COMPLETE_ACK_INIT;
-+ } else {
-+ ap->state = ANEG_STATE_AN_ENABLE;
-+ }
-+ } else if (ap->ability_match != 0 &&
-+ ap->rxconfig == 0) {
-+ ap->state = ANEG_STATE_AN_ENABLE;
-+ }
-+ break;
-+
-+ case ANEG_STATE_COMPLETE_ACK_INIT:
-+ if (ap->rxconfig & ANEG_CFG_INVAL) {
-+ ret = ANEG_FAILED;
-+ break;
-+ }
-+ ap->flags &= ~(MR_LP_ADV_FULL_DUPLEX |
-+ MR_LP_ADV_HALF_DUPLEX |
-+ MR_LP_ADV_SYM_PAUSE |
-+ MR_LP_ADV_ASYM_PAUSE |
-+ MR_LP_ADV_REMOTE_FAULT1 |
-+ MR_LP_ADV_REMOTE_FAULT2 |
-+ MR_LP_ADV_NEXT_PAGE |
-+ MR_TOGGLE_RX |
-+ MR_NP_RX);
-+ if (ap->rxconfig & ANEG_CFG_FD)
-+ ap->flags |= MR_LP_ADV_FULL_DUPLEX;
-+ if (ap->rxconfig & ANEG_CFG_HD)
-+ ap->flags |= MR_LP_ADV_HALF_DUPLEX;
-+ if (ap->rxconfig & ANEG_CFG_PS1)
-+ ap->flags |= MR_LP_ADV_SYM_PAUSE;
-+ if (ap->rxconfig & ANEG_CFG_PS2)
-+ ap->flags |= MR_LP_ADV_ASYM_PAUSE;
-+ if (ap->rxconfig & ANEG_CFG_RF1)
-+ ap->flags |= MR_LP_ADV_REMOTE_FAULT1;
-+ if (ap->rxconfig & ANEG_CFG_RF2)
-+ ap->flags |= MR_LP_ADV_REMOTE_FAULT2;
-+ if (ap->rxconfig & ANEG_CFG_NP)
-+ ap->flags |= MR_LP_ADV_NEXT_PAGE;
-+
-+ ap->link_time = ap->cur_time;
-+
-+ ap->flags ^= (MR_TOGGLE_TX);
-+ if (ap->rxconfig & 0x0008)
-+ ap->flags |= MR_TOGGLE_RX;
-+ if (ap->rxconfig & ANEG_CFG_NP)
-+ ap->flags |= MR_NP_RX;
-+ ap->flags |= MR_PAGE_RX;
-+
-+ ap->state = ANEG_STATE_COMPLETE_ACK;
-+ ret = ANEG_TIMER_ENAB;
-+ break;
-+
-+ case ANEG_STATE_COMPLETE_ACK:
-+ if (ap->ability_match != 0 &&
-+ ap->rxconfig == 0) {
-+ ap->state = ANEG_STATE_AN_ENABLE;
-+ break;
-+ }
-+ delta = ap->cur_time - ap->link_time;
-+ if (delta > ANEG_STATE_SETTLE_TIME) {
-+ if (!(ap->flags & (MR_LP_ADV_NEXT_PAGE))) {
-+ ap->state = ANEG_STATE_IDLE_DETECT_INIT;
-+ } else {
-+ if ((ap->txconfig & ANEG_CFG_NP) == 0 &&
-+ !(ap->flags & MR_NP_RX)) {
-+ ap->state = ANEG_STATE_IDLE_DETECT_INIT;
-+ } else {
-+ ret = ANEG_FAILED;
-+ }
-+ }
-+ }
-+ break;
-+
-+ case ANEG_STATE_IDLE_DETECT_INIT:
-+ ap->link_time = ap->cur_time;
-+ tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS;
-+ tw32_f(MAC_MODE, tp->mac_mode);
-+ udelay(40);
-+
-+ ap->state = ANEG_STATE_IDLE_DETECT;
-+ ret = ANEG_TIMER_ENAB;
-+ break;
-+
-+ case ANEG_STATE_IDLE_DETECT:
-+ if (ap->ability_match != 0 &&
-+ ap->rxconfig == 0) {
-+ ap->state = ANEG_STATE_AN_ENABLE;
-+ break;
-+ }
-+ delta = ap->cur_time - ap->link_time;
-+ if (delta > ANEG_STATE_SETTLE_TIME) {
-+ /* XXX another gem from the Broadcom driver :( */
-+ ap->state = ANEG_STATE_LINK_OK;
-+ }
-+ break;
-+
-+ case ANEG_STATE_LINK_OK:
-+ ap->flags |= (MR_AN_COMPLETE | MR_LINK_OK);
-+ ret = ANEG_DONE;
-+ break;
-+
-+ case ANEG_STATE_NEXT_PAGE_WAIT_INIT:
-+ /* ??? unimplemented */
-+ break;
-+
-+ case ANEG_STATE_NEXT_PAGE_WAIT:
-+ /* ??? unimplemented */
-+ break;
-+
-+ default:
-+ ret = ANEG_FAILED;
-+ break;
-+ }
-+
-+ return ret;
-+}
-+
-+static int fiber_autoneg(struct tg3 *tp, u32 *txflags, u32 *rxflags)
-+{
-+ int res = 0;
-+ struct tg3_fiber_aneginfo aninfo;
-+ int status = ANEG_FAILED;
-+ unsigned int tick;
-+ u32 tmp;
-+
-+ tw32_f(MAC_TX_AUTO_NEG, 0);
-+
-+ tmp = tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK;
-+ tw32_f(MAC_MODE, tmp | MAC_MODE_PORT_MODE_GMII);
-+ udelay(40);
-+
-+ tw32_f(MAC_MODE, tp->mac_mode | MAC_MODE_SEND_CONFIGS);
-+ udelay(40);
-+
-+ memset(&aninfo, 0, sizeof(aninfo));
-+ aninfo.flags |= MR_AN_ENABLE;
-+ aninfo.state = ANEG_STATE_UNKNOWN;
-+ aninfo.cur_time = 0;
-+ tick = 0;
-+ while (++tick < 195000) {
-+ status = tg3_fiber_aneg_smachine(tp, &aninfo);
-+ if (status == ANEG_DONE || status == ANEG_FAILED)
-+ break;
-+
-+ udelay(1);
-+ }
-+
-+ tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS;
-+ tw32_f(MAC_MODE, tp->mac_mode);
-+ udelay(40);
-+
-+ *txflags = aninfo.txconfig;
-+ *rxflags = aninfo.flags;
-+
-+ if (status == ANEG_DONE &&
-+ (aninfo.flags & (MR_AN_COMPLETE | MR_LINK_OK |
-+ MR_LP_ADV_FULL_DUPLEX)))
-+ res = 1;
-+
-+ return res;
-+}
-+
-+static void tg3_init_bcm8002(struct tg3 *tp)
-+{
-+ u32 mac_status = tr32(MAC_STATUS);
-+ int i;
-+
-+ /* Reset when initting first time or we have a link. */
-+ if (tg3_flag(tp, INIT_COMPLETE) &&
-+ !(mac_status & MAC_STATUS_PCS_SYNCED))
-+ return;
-+
-+ /* Set PLL lock range. */
-+ tg3_writephy(tp, 0x16, 0x8007);
-+
-+ /* SW reset */
-+ tg3_writephy(tp, MII_BMCR, BMCR_RESET);
-+
-+ /* Wait for reset to complete. */
-+ /* XXX schedule_timeout() ... */
-+ for (i = 0; i < 500; i++)
-+ udelay(10);
-+
-+ /* Config mode; select PMA/Ch 1 regs. */
-+ tg3_writephy(tp, 0x10, 0x8411);
-+
-+ /* Enable auto-lock and comdet, select txclk for tx. */
-+ tg3_writephy(tp, 0x11, 0x0a10);
-+
-+ tg3_writephy(tp, 0x18, 0x00a0);
-+ tg3_writephy(tp, 0x16, 0x41ff);
-+
-+ /* Assert and deassert POR. */
-+ tg3_writephy(tp, 0x13, 0x0400);
-+ udelay(40);
-+ tg3_writephy(tp, 0x13, 0x0000);
-+
-+ tg3_writephy(tp, 0x11, 0x0a50);
-+ udelay(40);
-+ tg3_writephy(tp, 0x11, 0x0a10);
-+
-+ /* Wait for signal to stabilize */
-+ /* XXX schedule_timeout() ... */
-+ for (i = 0; i < 15000; i++)
-+ udelay(10);
-+
-+ /* Deselect the channel register so we can read the PHYID
-+ * later.
-+ */
-+ tg3_writephy(tp, 0x10, 0x8011);
-+}
-+
-+static bool tg3_setup_fiber_hw_autoneg(struct tg3 *tp, u32 mac_status)
-+{
-+ u16 flowctrl;
-+ bool current_link_up;
-+ u32 sg_dig_ctrl, sg_dig_status;
-+ u32 serdes_cfg, expected_sg_dig_ctrl;
-+ int workaround, port_a;
-+
-+ serdes_cfg = 0;
-+ expected_sg_dig_ctrl = 0;
-+ workaround = 0;
-+ port_a = 1;
-+ current_link_up = false;
-+
-+ if (tg3_chip_rev_id(tp) != CHIPREV_ID_5704_A0 &&
-+ tg3_chip_rev_id(tp) != CHIPREV_ID_5704_A1) {
-+ workaround = 1;
-+ if (tr32(TG3PCI_DUAL_MAC_CTRL) & DUAL_MAC_CTRL_ID)
-+ port_a = 0;
-+
-+ /* preserve bits 0-11,13,14 for signal pre-emphasis */
-+ /* preserve bits 20-23 for voltage regulator */
-+ serdes_cfg = tr32(MAC_SERDES_CFG) & 0x00f06fff;
-+ }
-+
-+ sg_dig_ctrl = tr32(SG_DIG_CTRL);
-+
-+ if (tp->link_config.autoneg != AUTONEG_ENABLE) {
-+ if (sg_dig_ctrl & SG_DIG_USING_HW_AUTONEG) {
-+ if (workaround) {
-+ u32 val = serdes_cfg;
-+
-+ if (port_a)
-+ val |= 0xc010000;
-+ else
-+ val |= 0x4010000;
-+ tw32_f(MAC_SERDES_CFG, val);
-+ }
-+
-+ tw32_f(SG_DIG_CTRL, SG_DIG_COMMON_SETUP);
-+ }
-+ if (mac_status & MAC_STATUS_PCS_SYNCED) {
-+ tg3_setup_flow_control(tp, 0, 0);
-+ current_link_up = true;
-+ }
-+ goto out;
-+ }
-+
-+ /* Want auto-negotiation. */
-+ expected_sg_dig_ctrl = SG_DIG_USING_HW_AUTONEG | SG_DIG_COMMON_SETUP;
-+
-+ flowctrl = tg3_advert_flowctrl_1000X(tp->link_config.flowctrl);
-+ if (flowctrl & ADVERTISE_1000XPAUSE)
-+ expected_sg_dig_ctrl |= SG_DIG_PAUSE_CAP;
-+ if (flowctrl & ADVERTISE_1000XPSE_ASYM)
-+ expected_sg_dig_ctrl |= SG_DIG_ASYM_PAUSE;
-+
-+ if (sg_dig_ctrl != expected_sg_dig_ctrl) {
-+ if ((tp->phy_flags & TG3_PHYFLG_PARALLEL_DETECT) &&
-+ tp->serdes_counter &&
-+ ((mac_status & (MAC_STATUS_PCS_SYNCED |
-+ MAC_STATUS_RCVD_CFG)) ==
-+ MAC_STATUS_PCS_SYNCED)) {
-+ tp->serdes_counter--;
-+ current_link_up = true;
-+ goto out;
-+ }
-+restart_autoneg:
-+ if (workaround)
-+ tw32_f(MAC_SERDES_CFG, serdes_cfg | 0xc011000);
-+ tw32_f(SG_DIG_CTRL, expected_sg_dig_ctrl | SG_DIG_SOFT_RESET);
-+ udelay(5);
-+ tw32_f(SG_DIG_CTRL, expected_sg_dig_ctrl);
-+
-+ tp->serdes_counter = SERDES_AN_TIMEOUT_5704S;
-+ tp->phy_flags &= ~TG3_PHYFLG_PARALLEL_DETECT;
-+ } else if (mac_status & (MAC_STATUS_PCS_SYNCED |
-+ MAC_STATUS_SIGNAL_DET)) {
-+ sg_dig_status = tr32(SG_DIG_STATUS);
-+ mac_status = tr32(MAC_STATUS);
-+
-+ if ((sg_dig_status & SG_DIG_AUTONEG_COMPLETE) &&
-+ (mac_status & MAC_STATUS_PCS_SYNCED)) {
-+ u32 local_adv = 0, remote_adv = 0;
-+
-+ if (sg_dig_ctrl & SG_DIG_PAUSE_CAP)
-+ local_adv |= ADVERTISE_1000XPAUSE;
-+ if (sg_dig_ctrl & SG_DIG_ASYM_PAUSE)
-+ local_adv |= ADVERTISE_1000XPSE_ASYM;
-+
-+ if (sg_dig_status & SG_DIG_PARTNER_PAUSE_CAPABLE)
-+ remote_adv |= LPA_1000XPAUSE;
-+ if (sg_dig_status & SG_DIG_PARTNER_ASYM_PAUSE)
-+ remote_adv |= LPA_1000XPAUSE_ASYM;
-+
-+ tp->link_config.rmt_adv =
-+ mii_adv_to_ethtool_adv_x(remote_adv);
-+
-+ tg3_setup_flow_control(tp, local_adv, remote_adv);
-+ current_link_up = true;
-+ tp->serdes_counter = 0;
-+ tp->phy_flags &= ~TG3_PHYFLG_PARALLEL_DETECT;
-+ } else if (!(sg_dig_status & SG_DIG_AUTONEG_COMPLETE)) {
-+ if (tp->serdes_counter)
-+ tp->serdes_counter--;
-+ else {
-+ if (workaround) {
-+ u32 val = serdes_cfg;
-+
-+ if (port_a)
-+ val |= 0xc010000;
-+ else
-+ val |= 0x4010000;
-+
-+ tw32_f(MAC_SERDES_CFG, val);
-+ }
-+
-+ tw32_f(SG_DIG_CTRL, SG_DIG_COMMON_SETUP);
-+ udelay(40);
-+
-+ /* Link parallel detection - link is up */
-+ /* only if we have PCS_SYNC and not */
-+ /* receiving config code words */
-+ mac_status = tr32(MAC_STATUS);
-+ if ((mac_status & MAC_STATUS_PCS_SYNCED) &&
-+ !(mac_status & MAC_STATUS_RCVD_CFG)) {
-+ tg3_setup_flow_control(tp, 0, 0);
-+ current_link_up = true;
-+ tp->phy_flags |=
-+ TG3_PHYFLG_PARALLEL_DETECT;
-+ tp->serdes_counter =
-+ SERDES_PARALLEL_DET_TIMEOUT;
-+ } else
-+ goto restart_autoneg;
-+ }
-+ }
-+ } else {
-+ tp->serdes_counter = SERDES_AN_TIMEOUT_5704S;
-+ tp->phy_flags &= ~TG3_PHYFLG_PARALLEL_DETECT;
-+ }
-+
-+out:
-+ return current_link_up;
-+}
-+
-+static bool tg3_setup_fiber_by_hand(struct tg3 *tp, u32 mac_status)
-+{
-+ bool current_link_up = false;
-+
-+ if (!(mac_status & MAC_STATUS_PCS_SYNCED))
-+ goto out;
-+
-+ if (tp->link_config.autoneg == AUTONEG_ENABLE) {
-+ u32 txflags, rxflags;
-+ int i;
-+
-+ if (fiber_autoneg(tp, &txflags, &rxflags)) {
-+ u32 local_adv = 0, remote_adv = 0;
-+
-+ if (txflags & ANEG_CFG_PS1)
-+ local_adv |= ADVERTISE_1000XPAUSE;
-+ if (txflags & ANEG_CFG_PS2)
-+ local_adv |= ADVERTISE_1000XPSE_ASYM;
-+
-+ if (rxflags & MR_LP_ADV_SYM_PAUSE)
-+ remote_adv |= LPA_1000XPAUSE;
-+ if (rxflags & MR_LP_ADV_ASYM_PAUSE)
-+ remote_adv |= LPA_1000XPAUSE_ASYM;
-+
-+ tp->link_config.rmt_adv =
-+ mii_adv_to_ethtool_adv_x(remote_adv);
-+
-+ tg3_setup_flow_control(tp, local_adv, remote_adv);
-+
-+ current_link_up = true;
-+ }
-+ for (i = 0; i < 30; i++) {
-+ udelay(20);
-+ tw32_f(MAC_STATUS,
-+ (MAC_STATUS_SYNC_CHANGED |
-+ MAC_STATUS_CFG_CHANGED));
-+ udelay(40);
-+ if ((tr32(MAC_STATUS) &
-+ (MAC_STATUS_SYNC_CHANGED |
-+ MAC_STATUS_CFG_CHANGED)) == 0)
-+ break;
-+ }
-+
-+ mac_status = tr32(MAC_STATUS);
-+ if (!current_link_up &&
-+ (mac_status & MAC_STATUS_PCS_SYNCED) &&
-+ !(mac_status & MAC_STATUS_RCVD_CFG))
-+ current_link_up = true;
-+ } else {
-+ tg3_setup_flow_control(tp, 0, 0);
-+
-+ /* Forcing 1000FD link up. */
-+ current_link_up = true;
-+
-+ tw32_f(MAC_MODE, (tp->mac_mode | MAC_MODE_SEND_CONFIGS));
-+ udelay(40);
-+
-+ tw32_f(MAC_MODE, tp->mac_mode);
-+ udelay(40);
-+ }
-+
-+out:
-+ return current_link_up;
-+}
-+
-+static int tg3_setup_fiber_phy(struct tg3 *tp, bool force_reset)
-+{
-+ u32 orig_pause_cfg;
-+ u16 orig_active_speed;
-+ u8 orig_active_duplex;
-+ u32 mac_status;
-+ bool current_link_up;
-+ int i;
-+
-+ orig_pause_cfg = tp->link_config.active_flowctrl;
-+ orig_active_speed = tp->link_config.active_speed;
-+ orig_active_duplex = tp->link_config.active_duplex;
-+
-+ if (!tg3_flag(tp, HW_AUTONEG) &&
-+ tp->link_up &&
-+ tg3_flag(tp, INIT_COMPLETE)) {
-+ mac_status = tr32(MAC_STATUS);
-+ mac_status &= (MAC_STATUS_PCS_SYNCED |
-+ MAC_STATUS_SIGNAL_DET |
-+ MAC_STATUS_CFG_CHANGED |
-+ MAC_STATUS_RCVD_CFG);
-+ if (mac_status == (MAC_STATUS_PCS_SYNCED |
-+ MAC_STATUS_SIGNAL_DET)) {
-+ tw32_f(MAC_STATUS, (MAC_STATUS_SYNC_CHANGED |
-+ MAC_STATUS_CFG_CHANGED));
-+ return 0;
-+ }
-+ }
-+
-+ tw32_f(MAC_TX_AUTO_NEG, 0);
-+
-+ tp->mac_mode &= ~(MAC_MODE_PORT_MODE_MASK | MAC_MODE_HALF_DUPLEX);
-+ tp->mac_mode |= MAC_MODE_PORT_MODE_TBI;
-+ tw32_f(MAC_MODE, tp->mac_mode);
-+ udelay(40);
-+
-+ if (tp->phy_id == TG3_PHY_ID_BCM8002)
-+ tg3_init_bcm8002(tp);
-+
-+ /* Enable link change event even when serdes polling. */
-+ tw32_f(MAC_EVENT, MAC_EVENT_LNKSTATE_CHANGED);
-+ udelay(40);
-+
-+ current_link_up = false;
-+ tp->link_config.rmt_adv = 0;
-+ mac_status = tr32(MAC_STATUS);
-+
-+ if (tg3_flag(tp, HW_AUTONEG))
-+ current_link_up = tg3_setup_fiber_hw_autoneg(tp, mac_status);
-+ else
-+ current_link_up = tg3_setup_fiber_by_hand(tp, mac_status);
-+
-+ tp->napi[0].hw_status->status =
-+ (SD_STATUS_UPDATED |
-+ (tp->napi[0].hw_status->status & ~SD_STATUS_LINK_CHG));
-+
-+ for (i = 0; i < 100; i++) {
-+ tw32_f(MAC_STATUS, (MAC_STATUS_SYNC_CHANGED |
-+ MAC_STATUS_CFG_CHANGED));
-+ udelay(5);
-+ if ((tr32(MAC_STATUS) & (MAC_STATUS_SYNC_CHANGED |
-+ MAC_STATUS_CFG_CHANGED |
-+ MAC_STATUS_LNKSTATE_CHANGED)) == 0)
-+ break;
-+ }
-+
-+ mac_status = tr32(MAC_STATUS);
-+ if ((mac_status & MAC_STATUS_PCS_SYNCED) == 0) {
-+ current_link_up = false;
-+ if (tp->link_config.autoneg == AUTONEG_ENABLE &&
-+ tp->serdes_counter == 0) {
-+ tw32_f(MAC_MODE, (tp->mac_mode |
-+ MAC_MODE_SEND_CONFIGS));
-+ udelay(1);
-+ tw32_f(MAC_MODE, tp->mac_mode);
-+ }
-+ }
-+
-+ if (current_link_up) {
-+ tp->link_config.active_speed = SPEED_1000;
-+ tp->link_config.active_duplex = DUPLEX_FULL;
-+ tw32(MAC_LED_CTRL, (tp->led_ctrl |
-+ LED_CTRL_LNKLED_OVERRIDE |
-+ LED_CTRL_1000MBPS_ON));
-+ } else {
-+ tp->link_config.active_speed = SPEED_UNKNOWN;
-+ tp->link_config.active_duplex = DUPLEX_UNKNOWN;
-+ tw32(MAC_LED_CTRL, (tp->led_ctrl |
-+ LED_CTRL_LNKLED_OVERRIDE |
-+ LED_CTRL_TRAFFIC_OVERRIDE));
-+ }
-+
-+ if (!tg3_test_and_report_link_chg(tp, current_link_up)) {
-+ u32 now_pause_cfg = tp->link_config.active_flowctrl;
-+ if (orig_pause_cfg != now_pause_cfg ||
-+ orig_active_speed != tp->link_config.active_speed ||
-+ orig_active_duplex != tp->link_config.active_duplex)
-+ tg3_link_report(tp);
-+ }
-+
-+ return 0;
-+}
-+
-+static int tg3_setup_fiber_mii_phy(struct tg3 *tp, bool force_reset)
-+{
-+ int err = 0;
-+ u32 bmsr, bmcr;
-+ u16 current_speed = SPEED_UNKNOWN;
-+ u8 current_duplex = DUPLEX_UNKNOWN;
-+ bool current_link_up = false;
-+ u32 local_adv, remote_adv, sgsr;
-+
-+ if ((tg3_asic_rev(tp) == ASIC_REV_5719 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5720) &&
-+ !tg3_readphy(tp, SERDES_TG3_1000X_STATUS, &sgsr) &&
-+ (sgsr & SERDES_TG3_SGMII_MODE)) {
-+
-+ if (force_reset)
-+ tg3_phy_reset(tp);
-+
-+ tp->mac_mode &= ~MAC_MODE_PORT_MODE_MASK;
-+
-+ if (!(sgsr & SERDES_TG3_LINK_UP)) {
-+ tp->mac_mode |= MAC_MODE_PORT_MODE_GMII;
-+ } else {
-+ current_link_up = true;
-+ if (sgsr & SERDES_TG3_SPEED_1000) {
-+ current_speed = SPEED_1000;
-+ tp->mac_mode |= MAC_MODE_PORT_MODE_GMII;
-+ } else if (sgsr & SERDES_TG3_SPEED_100) {
-+ current_speed = SPEED_100;
-+ tp->mac_mode |= MAC_MODE_PORT_MODE_MII;
-+ } else {
-+ current_speed = SPEED_10;
-+ tp->mac_mode |= MAC_MODE_PORT_MODE_MII;
-+ }
-+
-+ if (sgsr & SERDES_TG3_FULL_DUPLEX)
-+ current_duplex = DUPLEX_FULL;
-+ else
-+ current_duplex = DUPLEX_HALF;
-+ }
-+
-+ tw32_f(MAC_MODE, tp->mac_mode);
-+ udelay(40);
-+
-+ tg3_clear_mac_status(tp);
-+
-+ goto fiber_setup_done;
-+ }
-+
-+ tp->mac_mode |= MAC_MODE_PORT_MODE_GMII;
-+ tw32_f(MAC_MODE, tp->mac_mode);
-+ udelay(40);
-+
-+ tg3_clear_mac_status(tp);
-+
-+ if (force_reset)
-+ tg3_phy_reset(tp);
-+
-+ tp->link_config.rmt_adv = 0;
-+
-+ err |= tg3_readphy(tp, MII_BMSR, &bmsr);
-+ err |= tg3_readphy(tp, MII_BMSR, &bmsr);
-+ if (tg3_asic_rev(tp) == ASIC_REV_5714) {
-+ if (tr32(MAC_TX_STATUS) & TX_STATUS_LINK_UP)
-+ bmsr |= BMSR_LSTATUS;
-+ else
-+ bmsr &= ~BMSR_LSTATUS;
-+ }
-+
-+ err |= tg3_readphy(tp, MII_BMCR, &bmcr);
-+
-+ if ((tp->link_config.autoneg == AUTONEG_ENABLE) && !force_reset &&
-+ (tp->phy_flags & TG3_PHYFLG_PARALLEL_DETECT)) {
-+ /* do nothing, just check for link up at the end */
-+ } else if (tp->link_config.autoneg == AUTONEG_ENABLE) {
-+ u32 adv, newadv;
-+
-+ err |= tg3_readphy(tp, MII_ADVERTISE, &adv);
-+ newadv = adv & ~(ADVERTISE_1000XFULL | ADVERTISE_1000XHALF |
-+ ADVERTISE_1000XPAUSE |
-+ ADVERTISE_1000XPSE_ASYM |
-+ ADVERTISE_SLCT);
-+
-+ newadv |= tg3_advert_flowctrl_1000X(tp->link_config.flowctrl);
-+ newadv |= ethtool_adv_to_mii_adv_x(tp->link_config.advertising);
-+
-+ if ((newadv != adv) || !(bmcr & BMCR_ANENABLE)) {
-+ tg3_writephy(tp, MII_ADVERTISE, newadv);
-+ bmcr |= BMCR_ANENABLE | BMCR_ANRESTART;
-+ tg3_writephy(tp, MII_BMCR, bmcr);
-+
-+ tw32_f(MAC_EVENT, MAC_EVENT_LNKSTATE_CHANGED);
-+ tp->serdes_counter = SERDES_AN_TIMEOUT_5714S;
-+ tp->phy_flags &= ~TG3_PHYFLG_PARALLEL_DETECT;
-+
-+ return err;
-+ }
-+ } else {
-+ u32 new_bmcr;
-+
-+ bmcr &= ~BMCR_SPEED1000;
-+ new_bmcr = bmcr & ~(BMCR_ANENABLE | BMCR_FULLDPLX);
-+
-+ if (tp->link_config.duplex == DUPLEX_FULL)
-+ new_bmcr |= BMCR_FULLDPLX;
-+
-+ if (new_bmcr != bmcr) {
-+ /* BMCR_SPEED1000 is a reserved bit that needs
-+ * to be set on write.
-+ */
-+ new_bmcr |= BMCR_SPEED1000;
-+
-+ /* Force a linkdown */
-+ if (tp->link_up) {
-+ u32 adv;
-+
-+ err |= tg3_readphy(tp, MII_ADVERTISE, &adv);
-+ adv &= ~(ADVERTISE_1000XFULL |
-+ ADVERTISE_1000XHALF |
-+ ADVERTISE_SLCT);
-+ tg3_writephy(tp, MII_ADVERTISE, adv);
-+ tg3_writephy(tp, MII_BMCR, bmcr |
-+ BMCR_ANRESTART |
-+ BMCR_ANENABLE);
-+ udelay(10);
-+ tg3_carrier_off(tp);
-+ }
-+ tg3_writephy(tp, MII_BMCR, new_bmcr);
-+ bmcr = new_bmcr;
-+ err |= tg3_readphy(tp, MII_BMSR, &bmsr);
-+ err |= tg3_readphy(tp, MII_BMSR, &bmsr);
-+ if (tg3_asic_rev(tp) == ASIC_REV_5714) {
-+ if (tr32(MAC_TX_STATUS) & TX_STATUS_LINK_UP)
-+ bmsr |= BMSR_LSTATUS;
-+ else
-+ bmsr &= ~BMSR_LSTATUS;
-+ }
-+ tp->phy_flags &= ~TG3_PHYFLG_PARALLEL_DETECT;
-+ }
-+ }
-+
-+ if (bmsr & BMSR_LSTATUS) {
-+ current_speed = SPEED_1000;
-+ current_link_up = true;
-+ if (bmcr & BMCR_FULLDPLX)
-+ current_duplex = DUPLEX_FULL;
-+ else
-+ current_duplex = DUPLEX_HALF;
-+
-+ local_adv = 0;
-+ remote_adv = 0;
-+
-+ if (bmcr & BMCR_ANENABLE) {
-+ u32 common;
-+
-+ err |= tg3_readphy(tp, MII_ADVERTISE, &local_adv);
-+ err |= tg3_readphy(tp, MII_LPA, &remote_adv);
-+ common = local_adv & remote_adv;
-+ if (common & (ADVERTISE_1000XHALF |
-+ ADVERTISE_1000XFULL)) {
-+ if (common & ADVERTISE_1000XFULL)
-+ current_duplex = DUPLEX_FULL;
-+ else
-+ current_duplex = DUPLEX_HALF;
-+
-+ tp->link_config.rmt_adv =
-+ mii_adv_to_ethtool_adv_x(remote_adv);
-+ } else if (!tg3_flag(tp, 5780_CLASS)) {
-+ /* Link is up via parallel detect */
-+ } else {
-+ current_link_up = false;
-+ }
-+ }
-+ }
-+
-+fiber_setup_done:
-+ if (current_link_up && current_duplex == DUPLEX_FULL)
-+ tg3_setup_flow_control(tp, local_adv, remote_adv);
-+
-+ tp->mac_mode &= ~MAC_MODE_HALF_DUPLEX;
-+ if (tp->link_config.active_duplex == DUPLEX_HALF)
-+ tp->mac_mode |= MAC_MODE_HALF_DUPLEX;
-+
-+ tw32_f(MAC_MODE, tp->mac_mode);
-+ udelay(40);
-+
-+ tw32_f(MAC_EVENT, MAC_EVENT_LNKSTATE_CHANGED);
-+
-+ tp->link_config.active_speed = current_speed;
-+ tp->link_config.active_duplex = current_duplex;
-+
-+ tg3_test_and_report_link_chg(tp, current_link_up);
-+ return err;
-+}
-+
-+static void tg3_serdes_parallel_detect(struct tg3 *tp)
-+{
-+ if (tp->serdes_counter) {
-+ /* Give autoneg time to complete. */
-+ tp->serdes_counter--;
-+ return;
-+ }
-+
-+ if (!tp->link_up &&
-+ (tp->link_config.autoneg == AUTONEG_ENABLE)) {
-+ u32 bmcr;
-+
-+ tg3_readphy(tp, MII_BMCR, &bmcr);
-+ if (bmcr & BMCR_ANENABLE) {
-+ u32 phy1, phy2;
-+
-+ /* Select shadow register 0x1f */
-+ tg3_writephy(tp, MII_TG3_MISC_SHDW, 0x7c00);
-+ tg3_readphy(tp, MII_TG3_MISC_SHDW, &phy1);
-+
-+ /* Select expansion interrupt status register */
-+ tg3_writephy(tp, MII_TG3_DSP_ADDRESS,
-+ MII_TG3_DSP_EXP1_INT_STAT);
-+ tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &phy2);
-+ tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &phy2);
-+
-+ if ((phy1 & 0x10) && !(phy2 & 0x20)) {
-+ /* We have signal detect and not receiving
-+ * config code words, link is up by parallel
-+ * detection.
-+ */
-+
-+ bmcr &= ~BMCR_ANENABLE;
-+ bmcr |= BMCR_SPEED1000 | BMCR_FULLDPLX;
-+ tg3_writephy(tp, MII_BMCR, bmcr);
-+ tp->phy_flags |= TG3_PHYFLG_PARALLEL_DETECT;
-+ }
-+ }
-+ } else if (tp->link_up &&
-+ (tp->link_config.autoneg == AUTONEG_ENABLE) &&
-+ (tp->phy_flags & TG3_PHYFLG_PARALLEL_DETECT)) {
-+ u32 phy2;
-+
-+ /* Select expansion interrupt status register */
-+ tg3_writephy(tp, MII_TG3_DSP_ADDRESS,
-+ MII_TG3_DSP_EXP1_INT_STAT);
-+ tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &phy2);
-+ if (phy2 & 0x20) {
-+ u32 bmcr;
-+
-+ /* Config code words received, turn on autoneg. */
-+ tg3_readphy(tp, MII_BMCR, &bmcr);
-+ tg3_writephy(tp, MII_BMCR, bmcr | BMCR_ANENABLE);
-+
-+ tp->phy_flags &= ~TG3_PHYFLG_PARALLEL_DETECT;
-+
-+ }
-+ }
-+}
-+
-+static int tg3_setup_phy(struct tg3 *tp, bool force_reset)
-+{
-+ u32 val;
-+ int err;
-+
-+ if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES)
-+ err = tg3_setup_fiber_phy(tp, force_reset);
-+ else if (tp->phy_flags & TG3_PHYFLG_MII_SERDES)
-+ err = tg3_setup_fiber_mii_phy(tp, force_reset);
-+ else
-+ err = tg3_setup_copper_phy(tp, force_reset);
-+
-+ if (tg3_chip_rev(tp) == CHIPREV_5784_AX) {
-+ u32 scale;
-+
-+ val = tr32(TG3_CPMU_CLCK_STAT) & CPMU_CLCK_STAT_MAC_CLCK_MASK;
-+ if (val == CPMU_CLCK_STAT_MAC_CLCK_62_5)
-+ scale = 65;
-+ else if (val == CPMU_CLCK_STAT_MAC_CLCK_6_25)
-+ scale = 6;
-+ else
-+ scale = 12;
-+
-+ val = tr32(GRC_MISC_CFG) & ~GRC_MISC_CFG_PRESCALAR_MASK;
-+ val |= (scale << GRC_MISC_CFG_PRESCALAR_SHIFT);
-+ tw32(GRC_MISC_CFG, val);
-+ }
-+
-+ val = (2 << TX_LENGTHS_IPG_CRS_SHIFT) |
-+ (6 << TX_LENGTHS_IPG_SHIFT);
-+ if (tg3_asic_rev(tp) == ASIC_REV_5720 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762)
-+ val |= tr32(MAC_TX_LENGTHS) &
-+ (TX_LENGTHS_JMB_FRM_LEN_MSK |
-+ TX_LENGTHS_CNT_DWN_VAL_MSK);
-+
-+ if (tp->link_config.active_speed == SPEED_1000 &&
-+ tp->link_config.active_duplex == DUPLEX_HALF)
-+ tw32(MAC_TX_LENGTHS, val |
-+ (0xff << TX_LENGTHS_SLOT_TIME_SHIFT));
-+ else
-+ tw32(MAC_TX_LENGTHS, val |
-+ (32 << TX_LENGTHS_SLOT_TIME_SHIFT));
-+
-+ if (!tg3_flag(tp, 5705_PLUS)) {
-+ if (tp->link_up) {
-+ tw32(HOSTCC_STAT_COAL_TICKS,
-+ tp->coal.stats_block_coalesce_usecs);
-+ } else {
-+ tw32(HOSTCC_STAT_COAL_TICKS, 0);
-+ }
-+ }
-+
-+ if (tg3_flag(tp, ASPM_WORKAROUND)) {
-+ val = tr32(PCIE_PWR_MGMT_THRESH);
-+ if (!tp->link_up)
-+ val = (val & ~PCIE_PWR_MGMT_L1_THRESH_MSK) |
-+ tp->pwrmgmt_thresh;
-+ else
-+ val |= PCIE_PWR_MGMT_L1_THRESH_MSK;
-+ tw32(PCIE_PWR_MGMT_THRESH, val);
-+ }
-+
-+ return err;
-+}
-+
-+#ifdef BCM_HAS_IEEE1588_SUPPORT
-+/* tp->lock must be held */
-+static u64 tg3_refclk_read(struct tg3 *tp)
-+{
-+ u64 stamp = tr32(TG3_EAV_REF_CLCK_LSB);
-+ return stamp | (u64)tr32(TG3_EAV_REF_CLCK_MSB) << 32;
-+}
-+
-+/* tp->lock must be held */
-+static void tg3_refclk_write(struct tg3 *tp, u64 newval)
-+{
-+ u32 clock_ctl = tr32(TG3_EAV_REF_CLCK_CTL);
-+
-+ tw32(TG3_EAV_REF_CLCK_CTL, clock_ctl | TG3_EAV_REF_CLCK_CTL_STOP);
-+ tw32(TG3_EAV_REF_CLCK_LSB, newval & 0xffffffff);
-+ tw32(TG3_EAV_REF_CLCK_MSB, newval >> 32);
-+ tw32_f(TG3_EAV_REF_CLCK_CTL, clock_ctl | TG3_EAV_REF_CLCK_CTL_RESUME);
-+}
-+
-+static inline void tg3_full_lock(struct tg3 *tp, int irq_sync);
-+static inline void tg3_full_unlock(struct tg3 *tp);
-+#if IS_ENABLED(CONFIG_PTP_1588_CLOCK)
-+#ifdef ETHTOOL_GET_TS_INFO
-+static int tg3_get_ts_info(struct net_device *dev, struct ethtool_ts_info *info)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-+ SOF_TIMESTAMPING_RX_SOFTWARE |
-+ SOF_TIMESTAMPING_SOFTWARE;
-+
-+ if (tg3_flag(tp, PTP_CAPABLE)) {
-+ info->so_timestamping |= SOF_TIMESTAMPING_TX_HARDWARE |
-+ SOF_TIMESTAMPING_RX_HARDWARE |
-+ SOF_TIMESTAMPING_RAW_HARDWARE;
-+ }
-+
-+ if (tp->ptp_clock)
-+ info->phc_index = ptp_clock_index(tp->ptp_clock);
-+ else
-+ info->phc_index = -1;
-+
-+ info->tx_types = (1 << HWTSTAMP_TX_OFF) | (1 << HWTSTAMP_TX_ON);
-+
-+ info->rx_filters = (1 << HWTSTAMP_FILTER_NONE) |
-+ (1 << HWTSTAMP_FILTER_PTP_V1_L4_EVENT) |
-+ (1 << HWTSTAMP_FILTER_PTP_V2_L2_EVENT) |
-+ (1 << HWTSTAMP_FILTER_PTP_V2_L4_EVENT);
-+ return 0;
-+}
-+#endif
-+
-+static int tg3_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb)
-+{
-+ struct tg3 *tp = container_of(ptp, struct tg3, ptp_info);
-+ bool neg_adj = false;
-+ u32 correction = 0;
-+
-+ if (ppb < 0) {
-+ neg_adj = true;
-+ ppb = -ppb;
-+ }
-+
-+ /* Frequency adjustment is performed using hardware with a 24 bit
-+ * accumulator and a programmable correction value. On each clk, the
-+ * correction value gets added to the accumulator and when it
-+ * overflows, the time counter is incremented/decremented.
-+ *
-+ * So conversion from ppb to correction value is
-+ * ppb * (1 << 24) / 1000000000
-+ */
-+ correction = div_u64((u64)ppb * (1 << 24), 1000000000ULL) &
-+ TG3_EAV_REF_CLK_CORRECT_MASK;
-+
-+ tg3_full_lock(tp, 0);
-+
-+ if (correction)
-+ tw32(TG3_EAV_REF_CLK_CORRECT_CTL,
-+ TG3_EAV_REF_CLK_CORRECT_EN |
-+ (neg_adj ? TG3_EAV_REF_CLK_CORRECT_NEG : 0) | correction);
-+ else
-+ tw32(TG3_EAV_REF_CLK_CORRECT_CTL, 0);
-+
-+ tg3_full_unlock(tp);
-+
-+ return 0;
-+}
-+
-+static int tg3_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
-+{
-+ struct tg3 *tp = container_of(ptp, struct tg3, ptp_info);
-+
-+ tg3_full_lock(tp, 0);
-+ tp->ptp_adjust += delta;
-+ tg3_full_unlock(tp);
-+
-+ return 0;
-+}
-+
-+static int tg3_ptp_gettime(struct ptp_clock_info *ptp, struct timespec *ts)
-+{
-+ u64 ns;
-+ u32 remainder;
-+ struct tg3 *tp = container_of(ptp, struct tg3, ptp_info);
-+
-+ tg3_full_lock(tp, 0);
-+ ns = tg3_refclk_read(tp);
-+ ns += tp->ptp_adjust;
-+ tg3_full_unlock(tp);
-+
-+ ts->tv_sec = div_u64_rem(ns, 1000000000, &remainder);
-+ ts->tv_nsec = remainder;
-+
-+ return 0;
-+}
-+
-+static int tg3_ptp_settime(struct ptp_clock_info *ptp,
-+ const struct timespec *ts)
-+{
-+ u64 ns;
-+ struct tg3 *tp = container_of(ptp, struct tg3, ptp_info);
-+
-+ ns = timespec_to_ns(ts);
-+
-+ tg3_full_lock(tp, 0);
-+ tg3_refclk_write(tp, ns);
-+ tp->ptp_adjust = 0;
-+ tg3_full_unlock(tp);
-+
-+ return 0;
-+}
-+
-+static int tg3_ptp_enable(struct ptp_clock_info *ptp,
-+ struct ptp_clock_request *rq, int on)
-+{
-+ struct tg3 *tp = container_of(ptp, struct tg3, ptp_info);
-+ u32 clock_ctl;
-+ int rval = 0;
-+
-+ switch (rq->type) {
-+ case PTP_CLK_REQ_PEROUT:
-+ if (rq->perout.index != 0)
-+ return -EINVAL;
-+
-+ tg3_full_lock(tp, 0);
-+ clock_ctl = tr32(TG3_EAV_REF_CLCK_CTL);
-+ clock_ctl &= ~TG3_EAV_CTL_TSYNC_GPIO_MASK;
-+
-+ if (on) {
-+ u64 nsec;
-+
-+ nsec = rq->perout.start.sec * 1000000000ULL +
-+ rq->perout.start.nsec;
-+
-+ if (rq->perout.period.sec || rq->perout.period.nsec) {
-+ netdev_warn(tp->dev,
-+ "Device supports only a one-shot timesync output, period must be 0\n");
-+ rval = -EINVAL;
-+ goto err_out;
-+ }
-+
-+ if (nsec & (1ULL << 63)) {
-+ netdev_warn(tp->dev,
-+ "Start value (nsec) is over limit. Maximum size of start is only 63 bits\n");
-+ rval = -EINVAL;
-+ goto err_out;
-+ }
-+
-+ tw32(TG3_EAV_WATCHDOG0_LSB, (nsec & 0xffffffff));
-+ tw32(TG3_EAV_WATCHDOG0_MSB,
-+ TG3_EAV_WATCHDOG0_EN |
-+ ((nsec >> 32) & TG3_EAV_WATCHDOG_MSB_MASK));
-+
-+ tw32(TG3_EAV_REF_CLCK_CTL,
-+ clock_ctl | TG3_EAV_CTL_TSYNC_WDOG0);
-+ } else {
-+ tw32(TG3_EAV_WATCHDOG0_MSB, 0);
-+ tw32(TG3_EAV_REF_CLCK_CTL, clock_ctl);
-+ }
-+
-+err_out:
-+ tg3_full_unlock(tp);
-+ return rval;
-+
-+ default:
-+ break;
-+ }
-+
-+ return -EOPNOTSUPP;
-+}
-+
-+static const struct ptp_clock_info tg3_ptp_caps = {
-+ .owner = THIS_MODULE,
-+ .name = "tg3 clock",
-+ .max_adj = 250000000,
-+ .n_alarm = 0,
-+ .n_ext_ts = 0,
-+ .n_per_out = 1,
-+ .pps = 0,
-+ .adjfreq = tg3_ptp_adjfreq,
-+ .adjtime = tg3_ptp_adjtime,
-+ .gettime = tg3_ptp_gettime,
-+ .settime = tg3_ptp_settime,
-+ .enable = tg3_ptp_enable,
-+};
-+
-+static void tg3_hwclock_to_timestamp(struct tg3 *tp, u64 hwclock,
-+ struct skb_shared_hwtstamps *timestamp)
-+{
-+ memset(timestamp, 0, sizeof(struct skb_shared_hwtstamps));
-+ timestamp->hwtstamp = ns_to_ktime((hwclock & TG3_TSTAMP_MASK) +
-+ tp->ptp_adjust);
-+}
-+
-+/* tp->lock must be held */
-+static void tg3_ptp_init(struct tg3 *tp)
-+{
-+ if (!tg3_flag(tp, PTP_CAPABLE))
-+ return;
-+
-+ /* Initialize the hardware clock to the system time. */
-+ tg3_refclk_write(tp, ktime_to_ns(ktime_get_real()));
-+ tp->ptp_adjust = 0;
-+ tp->ptp_info = tg3_ptp_caps;
-+}
-+
-+/* tp->lock must be held */
-+static void tg3_ptp_resume(struct tg3 *tp)
-+{
-+ if (!tg3_flag(tp, PTP_CAPABLE))
-+ return;
-+
-+ tg3_refclk_write(tp, ktime_to_ns(ktime_get_real()) + tp->ptp_adjust);
-+ tp->ptp_adjust = 0;
-+}
-+
-+static void tg3_ptp_fini(struct tg3 *tp)
-+{
-+ if (!tg3_flag(tp, PTP_CAPABLE) || !tp->ptp_clock)
-+ return;
-+
-+ ptp_clock_unregister(tp->ptp_clock);
-+ tp->ptp_clock = NULL;
-+ tp->ptp_adjust = 0;
-+}
-+
-+#else /* IS_ENABLED(CONFIG_PTP_1588_CLOCK) */
-+
-+static cycle_t tg3_timecntr_read_clock(const struct cyclecounter *tc)
-+{
-+ struct tg3 *tp = container_of(tc, struct tg3, cycles);
-+ return tg3_refclk_read(tp);
-+}
-+
-+static void tg3_ptp_calibrate(struct tg3 *tp)
-+{
-+ struct timespec now;
-+
-+ getnstimeofday(&now);
-+ tg3_refclk_write(tp, timespec_to_ns(&now));
-+
-+ /* Synchronize our NIC clock against system wall clock. */
-+ memset(&tp->cycles, 0, sizeof(tp->cycles));
-+ tp->cycles.read = tg3_timecntr_read_clock;
-+ tp->cycles.mask = CLOCKSOURCE_MASK(64);
-+ tp->cycles.mult = 1;
-+
-+ timecounter_init(&tp->clock,
-+ &tp->cycles,
-+ ktime_to_ns(ktime_get_real()));
-+
-+ memset(&tp->compare, 0, sizeof(tp->compare));
-+ tp->compare.source = &tp->clock;
-+ tp->compare.target = ktime_get_real;
-+ tp->compare.num_samples = 10;
-+ timecompare_update(&tp->compare, 0);
-+}
-+
-+static void tg3_hwclock_to_timestamp(struct tg3 *tp, u64 hwclock,
-+ struct skb_shared_hwtstamps *timestamp)
-+{
-+ u64 ns = timecounter_cyc2time(&tp->clock, hwclock & TG3_TSTAMP_MASK);
-+ timecompare_update(&tp->compare, ns);
-+
-+ memset(timestamp, 0, sizeof(struct skb_shared_hwtstamps));
-+ timestamp->hwtstamp = ns_to_ktime(ns);
-+ timestamp->syststamp = timecompare_transform(&tp->compare, ns);
-+}
-+
-+static void tg3_ptp_init(struct tg3 *tp)
-+{
-+ if (!tg3_flag(tp, PTP_CAPABLE))
-+ return;
-+
-+ tg3_ptp_calibrate(tp);
-+}
-+
-+static void tg3_ptp_resume(struct tg3 *tp)
-+{
-+ if (!tg3_flag(tp, PTP_CAPABLE))
-+ return;
-+
-+ tg3_ptp_calibrate(tp);
-+}
-+
-+static void tg3_ptp_fini(struct tg3 *tp)
-+{
-+}
-+#endif /* IS_ENABLED(CONFIG_PTP_1588_CLOCK) */
-+
-+#else /* BCM_HAS_IEEE1588_SUPPORT */
-+#define tg3_ptp_init(tp)
-+#define tg3_ptp_resume(tp)
-+#define tg3_ptp_fini(tp)
-+#endif /* BCM_HAS_IEEE1588_SUPPORT */
-+
-+static inline int tg3_irq_sync(struct tg3 *tp)
-+{
-+ return tp->irq_sync;
-+}
-+
-+static inline void tg3_rd32_loop(struct tg3 *tp, u32 *dst, u32 off, u32 len)
-+{
-+ int i;
-+
-+ dst = (u32 *)((u8 *)dst + off);
-+ for (i = 0; i < len; i += sizeof(u32))
-+ *dst++ = tr32(off + i);
-+}
-+
-+static void tg3_dump_legacy_regs(struct tg3 *tp, u32 *regs)
-+{
-+ tg3_rd32_loop(tp, regs, TG3PCI_VENDOR, 0xb0);
-+ tg3_rd32_loop(tp, regs, MAILBOX_INTERRUPT_0, 0x200);
-+ tg3_rd32_loop(tp, regs, MAC_MODE, 0x4f0);
-+ tg3_rd32_loop(tp, regs, SNDDATAI_MODE, 0xe0);
-+ tg3_rd32_loop(tp, regs, SNDDATAC_MODE, 0x04);
-+ tg3_rd32_loop(tp, regs, SNDBDS_MODE, 0x80);
-+ tg3_rd32_loop(tp, regs, SNDBDI_MODE, 0x48);
-+ tg3_rd32_loop(tp, regs, SNDBDC_MODE, 0x04);
-+ tg3_rd32_loop(tp, regs, RCVLPC_MODE, 0x20);
-+ tg3_rd32_loop(tp, regs, RCVLPC_SELLST_BASE, 0x15c);
-+ tg3_rd32_loop(tp, regs, RCVDBDI_MODE, 0x0c);
-+ tg3_rd32_loop(tp, regs, RCVDBDI_JUMBO_BD, 0x3c);
-+ tg3_rd32_loop(tp, regs, RCVDBDI_BD_PROD_IDX_0, 0x44);
-+ tg3_rd32_loop(tp, regs, RCVDCC_MODE, 0x04);
-+ tg3_rd32_loop(tp, regs, RCVBDI_MODE, 0x20);
-+ tg3_rd32_loop(tp, regs, RCVCC_MODE, 0x14);
-+ tg3_rd32_loop(tp, regs, RCVLSC_MODE, 0x08);
-+ tg3_rd32_loop(tp, regs, MBFREE_MODE, 0x08);
-+ tg3_rd32_loop(tp, regs, HOSTCC_MODE, 0x100);
-+
-+ if (tg3_flag(tp, SUPPORT_MSIX))
-+ tg3_rd32_loop(tp, regs, HOSTCC_RXCOL_TICKS_VEC1, 0x180);
-+
-+ tg3_rd32_loop(tp, regs, MEMARB_MODE, 0x10);
-+ tg3_rd32_loop(tp, regs, BUFMGR_MODE, 0x58);
-+ tg3_rd32_loop(tp, regs, RDMAC_MODE, 0x08);
-+ tg3_rd32_loop(tp, regs, WDMAC_MODE, 0x08);
-+ tg3_rd32_loop(tp, regs, RX_CPU_MODE, 0x04);
-+ tg3_rd32_loop(tp, regs, RX_CPU_STATE, 0x04);
-+ tg3_rd32_loop(tp, regs, RX_CPU_PGMCTR, 0x04);
-+ tg3_rd32_loop(tp, regs, RX_CPU_HWBKPT, 0x04);
-+
-+ if (!tg3_flag(tp, 5705_PLUS)) {
-+ tg3_rd32_loop(tp, regs, TX_CPU_MODE, 0x04);
-+ tg3_rd32_loop(tp, regs, TX_CPU_STATE, 0x04);
-+ tg3_rd32_loop(tp, regs, TX_CPU_PGMCTR, 0x04);
-+ }
-+
-+ tg3_rd32_loop(tp, regs, GRCMBOX_INTERRUPT_0, 0x110);
-+ tg3_rd32_loop(tp, regs, FTQ_RESET, 0x120);
-+ tg3_rd32_loop(tp, regs, MSGINT_MODE, 0x0c);
-+ tg3_rd32_loop(tp, regs, DMAC_MODE, 0x04);
-+ tg3_rd32_loop(tp, regs, GRC_MODE, 0x4c);
-+
-+ if (tg3_flag(tp, NVRAM))
-+ tg3_rd32_loop(tp, regs, NVRAM_CMD, 0x24);
-+}
-+
-+static void tg3_dump_state(struct tg3 *tp)
-+{
-+ int i;
-+ u32 *regs;
-+
-+ regs = kzalloc(TG3_REG_BLK_SIZE, GFP_ATOMIC);
-+ if (!regs) {
-+ netdev_err(tp->dev, "Failed allocating register dump buffer\n");
-+ return;
-+ }
-+
-+ if (tg3_flag(tp, PCI_EXPRESS)) {
-+ /* Read up to but not including private PCI registers */
-+ for (i = 0; i < TG3_PCIE_TLDLPL_PORT; i += sizeof(u32))
-+ regs[i / sizeof(u32)] = tr32(i);
-+ } else
-+ tg3_dump_legacy_regs(tp, regs);
-+
-+ for (i = 0; i < TG3_REG_BLK_SIZE / sizeof(u32); i += 4) {
-+ if (!regs[i + 0] && !regs[i + 1] &&
-+ !regs[i + 2] && !regs[i + 3])
-+ continue;
-+
-+ netdev_err(tp->dev, "0x%08x: 0x%08x, 0x%08x, 0x%08x, 0x%08x\n",
-+ i * 4,
-+ regs[i + 0], regs[i + 1], regs[i + 2], regs[i + 3]);
-+ }
-+
-+ kfree(regs);
-+
-+ for (i = 0; i < tp->irq_cnt; i++) {
-+ struct tg3_napi *tnapi = &tp->napi[i];
-+
-+ /* SW status block */
-+ netdev_err(tp->dev,
-+ "%d: Host status block [%08x:%08x:(%04x:%04x:%04x):(%04x:%04x)]\n",
-+ i,
-+ tnapi->hw_status->status,
-+ tnapi->hw_status->status_tag,
-+ tnapi->hw_status->rx_jumbo_consumer,
-+ tnapi->hw_status->rx_consumer,
-+ tnapi->hw_status->rx_mini_consumer,
-+ tnapi->hw_status->idx[0].rx_producer,
-+ tnapi->hw_status->idx[0].tx_consumer);
-+
-+ netdev_err(tp->dev,
-+ "%d: NAPI info [%08x:%08x:(%04x:%04x:%04x):%04x:(%04x:%04x:%04x:%04x)]\n",
-+ i,
-+ tnapi->last_tag, tnapi->last_irq_tag,
-+ tnapi->tx_prod, tnapi->tx_cons, tnapi->tx_pending,
-+ tnapi->rx_rcb_ptr,
-+ tnapi->prodring.rx_std_prod_idx,
-+ tnapi->prodring.rx_std_cons_idx,
-+ tnapi->prodring.rx_jmb_prod_idx,
-+ tnapi->prodring.rx_jmb_cons_idx);
-+ }
-+}
-+
-+/* This is called whenever we suspect that the system chipset is re-
-+ * ordering the sequence of MMIO to the tx send mailbox. The symptom
-+ * is bogus tx completions. We try to recover by setting the
-+ * TG3_FLAG_MBOX_WRITE_REORDER flag and resetting the chip later
-+ * in the workqueue.
-+ */
-+static void tg3_tx_recover(struct tg3 *tp)
-+{
-+ BUG_ON(tg3_flag(tp, MBOX_WRITE_REORDER) ||
-+ tp->write32_tx_mbox == tg3_write_indirect_mbox);
-+
-+ netdev_warn(tp->dev,
-+ "The system may be re-ordering memory-mapped I/O "
-+ "cycles to the network device, attempting to recover. "
-+ "Please report the problem to the driver maintainer "
-+ "and include system chipset information.\n");
-+
-+ tg3_flag_set(tp, TX_RECOVERY_PENDING);
-+}
-+
-+static inline u32 tg3_tx_avail(struct tg3_napi *tnapi)
-+{
-+ /* Tell compiler to fetch tx indices from memory. */
-+ barrier();
-+ return tnapi->tx_pending -
-+ ((tnapi->tx_prod - tnapi->tx_cons) & (TG3_TX_RING_SIZE - 1));
-+}
-+
-+/* Tigon3 never reports partial packet sends. So we do not
-+ * need special logic to handle SKBs that have not had all
-+ * of their frags sent yet, like SunGEM does.
-+ */
-+static void tg3_tx(struct tg3_napi *tnapi)
-+{
-+ struct tg3 *tp = tnapi->tp;
-+ u32 hw_idx = tnapi->hw_status->idx[0].tx_consumer;
-+ u32 sw_idx = tnapi->tx_cons;
-+ struct netdev_queue *txq;
-+ int index = tnapi - tp->napi;
-+ unsigned int pkts_compl = 0, bytes_compl = 0;
-+
-+ if (tg3_flag(tp, ENABLE_TSS))
-+ index--;
-+
-+ txq = netdev_get_tx_queue(tp->dev, index);
-+
-+ while (sw_idx != hw_idx) {
-+ struct tg3_tx_ring_info *ri = &tnapi->tx_buffers[sw_idx];
-+ struct sk_buff *skb = ri->skb;
-+ int i, tx_bug = 0;
-+
-+ if (unlikely(skb == NULL)) {
-+ tg3_tx_recover(tp);
-+ return;
-+ }
-+
-+#ifdef BCM_HAS_IEEE1588_SUPPORT
-+ if (tnapi->tx_ring[sw_idx].len_flags & TXD_FLAG_HWTSTAMP) {
-+ struct skb_shared_hwtstamps timestamp;
-+ u64 hwclock = tr32(TG3_TX_TSTAMP_LSB);
-+ hwclock |= (u64)tr32(TG3_TX_TSTAMP_MSB) << 32;
-+
-+ tg3_hwclock_to_timestamp(tp, hwclock, ×tamp);
-+
-+ skb_tstamp_tx(skb, ×tamp);
-+ }
-+#endif /* BCM_HAS_IEEE1588_SUPPORT */
-+
-+ pci_unmap_single(tp->pdev,
-+ dma_unmap_addr(ri, mapping),
-+ skb_headlen(skb),
-+ PCI_DMA_TODEVICE);
-+
-+ ri->skb = NULL;
-+
-+ while (ri->fragmented) {
-+ ri->fragmented = false;
-+ sw_idx = NEXT_TX(sw_idx);
-+ ri = &tnapi->tx_buffers[sw_idx];
-+ }
-+
-+ sw_idx = NEXT_TX(sw_idx);
-+
-+ for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
-+ ri = &tnapi->tx_buffers[sw_idx];
-+ if (unlikely(ri->skb != NULL || sw_idx == hw_idx))
-+ tx_bug = 1;
-+
-+ pci_unmap_page(tp->pdev,
-+ dma_unmap_addr(ri, mapping),
-+ skb_frag_size(&skb_shinfo(skb)->frags[i]),
-+ PCI_DMA_TODEVICE);
-+
-+ while (ri->fragmented) {
-+ ri->fragmented = false;
-+ sw_idx = NEXT_TX(sw_idx);
-+ ri = &tnapi->tx_buffers[sw_idx];
-+ }
-+
-+ sw_idx = NEXT_TX(sw_idx);
-+ }
-+
-+ pkts_compl++;
-+ bytes_compl += skb->len;
-+
-+ dev_kfree_skb(skb);
-+
-+ if (unlikely(tx_bug)) {
-+ tg3_tx_recover(tp);
-+ return;
-+ }
-+ }
-+
-+ netdev_tx_completed_queue(txq, pkts_compl, bytes_compl);
-+
-+ tnapi->tx_cons = sw_idx;
-+
-+ /* Need to make the tx_cons update visible to tg3_start_xmit()
-+ * before checking for netif_queue_stopped(). Without the
-+ * memory barrier, there is a small possibility that tg3_start_xmit()
-+ * will miss it and cause the queue to be stopped forever.
-+ */
-+ smp_mb();
-+
-+ if (unlikely(netif_tx_queue_stopped(txq) &&
-+ (tg3_tx_avail(tnapi) > TG3_TX_WAKEUP_THRESH(tnapi)))) {
-+ __netif_tx_lock(txq, smp_processor_id());
-+ if (netif_tx_queue_stopped(txq) &&
-+ (tg3_tx_avail(tnapi) > TG3_TX_WAKEUP_THRESH(tnapi)))
-+ netif_tx_wake_queue(txq);
-+ __netif_tx_unlock(txq);
-+ }
-+}
-+
-+static void tg3_frag_free(bool is_frag, void *data)
-+{
-+#ifdef BCM_HAS_BUILD_SKB
-+ if (is_frag)
-+ put_page(virt_to_head_page(data));
-+ else
-+ kfree(data);
-+#else
-+ dev_kfree_skb_any(data);
-+#endif
-+}
-+
-+static void tg3_rx_data_free(struct tg3 *tp, struct ring_info *ri, u32 map_sz)
-+{
-+ unsigned int skb_size = SKB_DATA_ALIGN(map_sz + TG3_RX_OFFSET(tp)) +
-+ SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
-+
-+ if (!ri->data)
-+ return;
-+
-+ pci_unmap_single(tp->pdev, dma_unmap_addr(ri, mapping),
-+ map_sz, PCI_DMA_FROMDEVICE);
-+ tg3_frag_free(skb_size <= PAGE_SIZE, ri->data);
-+ ri->data = NULL;
-+}
-+
-+/* Returns size of skb allocated or < 0 on error.
-+ *
-+ * We only need to fill in the address because the other members
-+ * of the RX descriptor are invariant, see tg3_init_rings.
-+ *
-+ * Note the purposeful assymetry of cpu vs. chip accesses. For
-+ * posting buffers we only dirty the first cache line of the RX
-+ * descriptor (containing the address). Whereas for the RX status
-+ * buffers the cpu only reads the last cacheline of the RX descriptor
-+ * (to fetch the error flags, vlan tag, checksum, and opaque cookie).
-+ */
-+static int tg3_alloc_rx_data(struct tg3 *tp, struct tg3_rx_prodring_set *tpr,
-+ u32 opaque_key, u32 dest_idx_unmasked,
-+ unsigned int *frag_size)
-+{
-+ struct tg3_rx_buffer_desc *desc;
-+ struct ring_info *map;
-+ u8 *data;
-+ dma_addr_t mapping;
-+#ifdef BCM_HAS_BUILD_SKB
-+ int skb_size;
-+#else
-+ struct sk_buff *skb;
-+#endif
-+ int data_size, dest_idx;
-+
-+ switch (opaque_key) {
-+ case RXD_OPAQUE_RING_STD:
-+ dest_idx = dest_idx_unmasked & tp->rx_std_ring_mask;
-+ desc = &tpr->rx_std[dest_idx];
-+ map = &tpr->rx_std_buffers[dest_idx];
-+ data_size = tp->rx_pkt_map_sz;
-+ break;
-+
-+ case RXD_OPAQUE_RING_JUMBO:
-+ dest_idx = dest_idx_unmasked & tp->rx_jmb_ring_mask;
-+ desc = &tpr->rx_jmb[dest_idx].std;
-+ map = &tpr->rx_jmb_buffers[dest_idx];
-+ data_size = TG3_RX_JMB_MAP_SZ;
-+ break;
-+
-+ default:
-+ return -EINVAL;
-+ }
-+
-+ /* Do not overwrite any of the map or rp information
-+ * until we are sure we can commit to a new buffer.
-+ *
-+ * Callers depend upon this behavior and assume that
-+ * we leave everything unchanged if we fail.
-+ */
-+#ifdef BCM_HAS_BUILD_SKB
-+ skb_size = SKB_DATA_ALIGN(data_size + TG3_RX_OFFSET(tp)) +
-+ SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
-+ if (skb_size <= PAGE_SIZE) {
-+ data = netdev_alloc_frag(skb_size);
-+ *frag_size = skb_size;
-+ } else {
-+ data = kmalloc(skb_size, GFP_ATOMIC);
-+ *frag_size = 0;
-+ }
-+ if (!data)
-+ return -ENOMEM;
-+#else
-+ skb = netdev_alloc_skb(tp->dev, data_size + TG3_RX_OFFSET(tp) +
-+ TG3_COMPAT_VLAN_ALLOC_LEN);
-+ if (skb == NULL)
-+ return -ENOMEM;
-+
-+ skb_reserve(skb, TG3_RX_OFFSET(tp) +
-+ TG3_COMPAT_VLAN_RESERVE(TG3_TO_INT(skb->data)));
-+ data = skb->data;
-+
-+#endif
-+
-+ mapping = pci_map_single(tp->pdev,
-+ data + TG3_RX_OFFSET(tp),
-+ data_size,
-+ PCI_DMA_FROMDEVICE);
-+ if (unlikely(pci_dma_mapping_error_(tp->pdev, mapping))) {
-+#ifdef BCM_HAS_BUILD_SKB
-+ tg3_frag_free(skb_size <= PAGE_SIZE, data);
-+#else
-+ dev_kfree_skb(skb);
-+#endif
-+ return -EIO;
-+ }
-+
-+#ifdef BCM_HAS_BUILD_SKB
-+ map->data = data;
-+#else
-+ map->data = skb;
-+#endif
-+ dma_unmap_addr_set(map, mapping, mapping);
-+
-+ desc->addr_hi = ((u64)mapping >> 32);
-+ desc->addr_lo = ((u64)mapping & 0xffffffff);
-+
-+ return data_size;
-+}
-+
-+/* We only need to move over in the address because the other
-+ * members of the RX descriptor are invariant. See notes above
-+ * tg3_alloc_rx_data for full details.
-+ */
-+static void tg3_recycle_rx(struct tg3_napi *tnapi,
-+ struct tg3_rx_prodring_set *dpr,
-+ u32 opaque_key, int src_idx,
-+ u32 dest_idx_unmasked)
-+{
-+ struct tg3 *tp = tnapi->tp;
-+ struct tg3_rx_buffer_desc *src_desc, *dest_desc;
-+ struct ring_info *src_map, *dest_map;
-+ struct tg3_rx_prodring_set *spr = tnapi->srcprodring;
-+ int dest_idx;
-+
-+ switch (opaque_key) {
-+ case RXD_OPAQUE_RING_STD:
-+ dest_idx = dest_idx_unmasked & tp->rx_std_ring_mask;
-+ dest_desc = &dpr->rx_std[dest_idx];
-+ dest_map = &dpr->rx_std_buffers[dest_idx];
-+ src_desc = &spr->rx_std[src_idx];
-+ src_map = &spr->rx_std_buffers[src_idx];
-+ break;
-+
-+ case RXD_OPAQUE_RING_JUMBO:
-+ dest_idx = dest_idx_unmasked & tp->rx_jmb_ring_mask;
-+ dest_desc = &dpr->rx_jmb[dest_idx].std;
-+ dest_map = &dpr->rx_jmb_buffers[dest_idx];
-+ src_desc = &spr->rx_jmb[src_idx].std;
-+ src_map = &spr->rx_jmb_buffers[src_idx];
-+ break;
-+
-+ default:
-+ return;
-+ }
-+
-+ dest_map->data = src_map->data;
-+ dma_unmap_addr_set(dest_map, mapping,
-+ dma_unmap_addr(src_map, mapping));
-+ dest_desc->addr_hi = src_desc->addr_hi;
-+ dest_desc->addr_lo = src_desc->addr_lo;
-+
-+ /* Ensure that the update to the skb happens after the physical
-+ * addresses have been transferred to the new BD location.
-+ */
-+ smp_wmb();
-+
-+ src_map->data = NULL;
-+}
-+
-+/* The RX ring scheme is composed of multiple rings which post fresh
-+ * buffers to the chip, and one special ring the chip uses to report
-+ * status back to the host.
-+ *
-+ * The special ring reports the status of received packets to the
-+ * host. The chip does not write into the original descriptor the
-+ * RX buffer was obtained from. The chip simply takes the original
-+ * descriptor as provided by the host, updates the status and length
-+ * field, then writes this into the next status ring entry.
-+ *
-+ * Each ring the host uses to post buffers to the chip is described
-+ * by a TG3_BDINFO entry in the chips SRAM area. When a packet arrives,
-+ * it is first placed into the on-chip ram. When the packet's length
-+ * is known, it walks down the TG3_BDINFO entries to select the ring.
-+ * Each TG3_BDINFO specifies a MAXLEN field and the first TG3_BDINFO
-+ * which is within the range of the new packet's length is chosen.
-+ *
-+ * The "separate ring for rx status" scheme may sound queer, but it makes
-+ * sense from a cache coherency perspective. If only the host writes
-+ * to the buffer post rings, and only the chip writes to the rx status
-+ * rings, then cache lines never move beyond shared-modified state.
-+ * If both the host and chip were to write into the same ring, cache line
-+ * eviction could occur since both entities want it in an exclusive state.
-+ */
-+static int tg3_rx(struct tg3_napi *tnapi, int budget)
-+{
-+ struct tg3 *tp = tnapi->tp;
-+ u32 work_mask, rx_std_posted = 0;
-+ u32 std_prod_idx, jmb_prod_idx;
-+ u32 sw_idx = tnapi->rx_rcb_ptr;
-+ u16 hw_idx;
-+ int received;
-+ struct tg3_rx_prodring_set *tpr = &tnapi->prodring;
-+
-+ hw_idx = *(tnapi->rx_rcb_prod_idx);
-+ /*
-+ * We need to order the read of hw_idx and the read of
-+ * the opaque cookie.
-+ */
-+ rmb();
-+ work_mask = 0;
-+ received = 0;
-+ std_prod_idx = tpr->rx_std_prod_idx;
-+ jmb_prod_idx = tpr->rx_jmb_prod_idx;
-+ while (sw_idx != hw_idx && budget > 0) {
-+ struct ring_info *ri;
-+ struct tg3_rx_buffer_desc *desc = &tnapi->rx_rcb[sw_idx];
-+ unsigned int len;
-+ struct sk_buff *skb;
-+ dma_addr_t dma_addr;
-+ u32 opaque_key, desc_idx, *post_ptr;
-+ u8 *data;
-+#ifdef BCM_HAS_IEEE1588_SUPPORT
-+ u64 tstamp = 0;
-+#endif /* BCM_HAS_IEEE1588_SUPPORT */
-+
-+ desc_idx = desc->opaque & RXD_OPAQUE_INDEX_MASK;
-+ opaque_key = desc->opaque & RXD_OPAQUE_RING_MASK;
-+ if (opaque_key == RXD_OPAQUE_RING_STD) {
-+ ri = &tnapi->srcprodring->rx_std_buffers[desc_idx];
-+ dma_addr = dma_unmap_addr(ri, mapping);
-+#ifdef BCM_HAS_BUILD_SKB
-+ data = ri->data;
-+#else
-+ skb = ri->data;
-+ data = skb->data;
-+#endif
-+ post_ptr = &std_prod_idx;
-+ rx_std_posted++;
-+ } else if (opaque_key == RXD_OPAQUE_RING_JUMBO) {
-+ ri = &tnapi->srcprodring->rx_jmb_buffers[desc_idx];
-+ dma_addr = dma_unmap_addr(ri, mapping);
-+#ifdef BCM_HAS_BUILD_SKB
-+ data = ri->data;
-+#else
-+ skb = ri->data;
-+ data = skb->data;
-+#endif
-+ post_ptr = &jmb_prod_idx;
-+ } else
-+ goto next_pkt_nopost;
-+
-+ work_mask |= opaque_key;
-+
-+ if (desc->err_vlan & RXD_ERR_MASK) {
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ tnapi->netq.stats.rx_errors_sw++;
-+
-+ if (desc->err_vlan & RXD_ERR_BAD_CRC)
-+ tnapi->netq.stats.rx_crc_errors++;
-+
-+ if (desc->err_vlan &
-+ (RXD_ERR_TOO_SMALL |
-+ RXD_ERR_HUGE_FRAME))
-+ tnapi->netq.stats.rx_frame_errors++;
-+#endif
-+ drop_it:
-+ tg3_recycle_rx(tnapi, tpr, opaque_key,
-+ desc_idx, *post_ptr);
-+ drop_it_no_recycle:
-+ /* Other statistics kept track of by card. */
-+ tp->rx_dropped++;
-+ goto next_pkt;
-+ }
-+
-+ len = ((desc->idx_len & RXD_LEN_MASK) >> RXD_LEN_SHIFT) -
-+ ETH_FCS_LEN;
-+
-+#ifdef BCM_HAS_IEEE1588_SUPPORT
-+ if ((desc->type_flags & RXD_FLAG_PTPSTAT_MASK) ==
-+ RXD_FLAG_PTPSTAT_PTPV1 ||
-+ (desc->type_flags & RXD_FLAG_PTPSTAT_MASK) ==
-+ RXD_FLAG_PTPSTAT_PTPV2) {
-+ /* Read the timestamp out early, in case we drop the packet. */
-+ tstamp = tr32(TG3_RX_TSTAMP_LSB);
-+ tstamp |= (u64)tr32(TG3_RX_TSTAMP_MSB) << 32;
-+ }
-+#endif /* BCM_HAS_IEEE1588_SUPPORT */
-+
-+ if (len > TG3_RX_COPY_THRESH(tp)) {
-+ int skb_size;
-+ unsigned int frag_size;
-+
-+ skb_size = tg3_alloc_rx_data(tp, tpr, opaque_key,
-+ *post_ptr, &frag_size);
-+ if (skb_size < 0)
-+ goto drop_it;
-+
-+ pci_unmap_single(tp->pdev, dma_addr, skb_size,
-+ PCI_DMA_FROMDEVICE);
-+
-+ /* Ensure that the update to the data happens
-+ * after the usage of the old DMA mapping.
-+ */
-+ smp_wmb();
-+
-+ ri->data = NULL;
-+
-+#ifdef BCM_HAS_BUILD_SKB
-+ skb = build_skb(data, frag_size);
-+ if (!skb) {
-+ tg3_frag_free(frag_size != 0, data);
-+ goto drop_it_no_recycle;
-+ }
-+ skb_reserve(skb, TG3_RX_OFFSET(tp));
-+#endif
-+ } else {
-+ tg3_recycle_rx(tnapi, tpr, opaque_key,
-+ desc_idx, *post_ptr);
-+
-+ skb = netdev_alloc_skb(tp->dev,
-+ len + TG3_RAW_IP_ALIGN);
-+ if (skb == NULL)
-+ goto drop_it_no_recycle;
-+
-+ skb_reserve(skb, TG3_RAW_IP_ALIGN);
-+ pci_dma_sync_single_for_cpu(tp->pdev, dma_addr, len, PCI_DMA_FROMDEVICE);
-+ memcpy(skb->data,
-+ data + TG3_RX_OFFSET(tp),
-+ len);
-+ pci_dma_sync_single_for_device(tp->pdev, dma_addr, len, PCI_DMA_FROMDEVICE);
-+ }
-+
-+ skb_put(skb, len);
-+#ifdef BCM_HAS_IEEE1588_SUPPORT
-+ if (tstamp)
-+ tg3_hwclock_to_timestamp(tp, tstamp,
-+ skb_hwtstamps(skb));
-+#endif /* BCM_HAS_IEEE1588_SUPPORT */
-+
-+ if ((tp->dev->features & NETIF_F_RXCSUM) &&
-+ (desc->type_flags & RXD_FLAG_TCPUDP_CSUM) &&
-+ (((desc->ip_tcp_csum & RXD_TCPCSUM_MASK)
-+ >> RXD_TCPCSUM_SHIFT) == 0xffff))
-+ skb->ip_summed = CHECKSUM_UNNECESSARY;
-+ else
-+ skb_checksum_none_assert(skb);
-+
-+#ifndef BCM_HAS_NEW_VLAN_INTERFACE
-+ if (desc->type_flags & RXD_FLAG_VLAN) {
-+ if (tp->rx_mode & RX_MODE_KEEP_VLAN_TAG) {
-+ desc->type_flags &= ~RXD_FLAG_VLAN;
-+ } else if (!tp->vlgrp) {
-+ struct vlan_ethhdr *ve = (struct vlan_ethhdr *)
-+ __skb_push(skb, VLAN_HLEN);
-+
-+ memmove(ve, skb->data + VLAN_HLEN,
-+ ETH_ALEN * 2);
-+ ve->h_vlan_proto = htons(ETH_P_8021Q);
-+ ve->h_vlan_TCI = htons(desc->err_vlan & RXD_VLAN_MASK);
-+
-+ desc->type_flags &= ~RXD_FLAG_VLAN;
-+ }
-+ }
-+#endif /* BCM_HAS_NEW_VLAN_INTERFACE */
-+
-+ skb->protocol = eth_type_trans(skb, tp->dev);
-+
-+ if (len > (tp->dev->mtu + ETH_HLEN) &&
-+ skb->protocol != htons(ETH_P_8021Q)) {
-+ dev_kfree_skb(skb);
-+ goto drop_it_no_recycle;
-+ }
-+
-+#ifndef BCM_HAS_NEW_VLAN_INTERFACE
-+ if (desc->type_flags & RXD_FLAG_VLAN) {
-+ vlan_gro_receive(&tnapi->napi, tp->vlgrp,
-+ desc->err_vlan & RXD_VLAN_MASK, skb);
-+ } else
-+#else
-+ if (desc->type_flags & RXD_FLAG_VLAN &&
-+ !(tp->rx_mode & RX_MODE_KEEP_VLAN_TAG))
-+ __vlan_hwaccel_put_tag(skb,
-+#ifdef BCM_HWACCEL_HAS_PROTO_ARG
-+ htons(ETH_P_8021Q),
-+#endif
-+ desc->err_vlan & RXD_VLAN_MASK);
-+#endif /* BCM_HAS_NEW_VLAN_INTERFACE */
-+
-+ napi_gro_receive(&tnapi->napi, skb);
-+
-+#if (LINUX_VERSION_CODE < 0x02061D) /* 2.6.29 */
-+ tp->dev->last_rx = jiffies;
-+#endif
-+ received++;
-+ budget--;
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ /* Update queue specific stats */
-+ tnapi->netq.stats.rx_packets_sw++;
-+ tnapi->netq.stats.rx_bytes_sw += len;
-+#endif
-+
-+next_pkt:
-+ (*post_ptr)++;
-+
-+ if (unlikely(rx_std_posted >= tp->rx_std_max_post)) {
-+ tpr->rx_std_prod_idx = std_prod_idx &
-+ tp->rx_std_ring_mask;
-+ tw32_rx_mbox(TG3_RX_STD_PROD_IDX_REG,
-+ tpr->rx_std_prod_idx);
-+ work_mask &= ~RXD_OPAQUE_RING_STD;
-+ rx_std_posted = 0;
-+ }
-+next_pkt_nopost:
-+ sw_idx++;
-+ sw_idx &= tp->rx_ret_ring_mask;
-+
-+ /* Refresh hw_idx to see if there is new work */
-+ if (sw_idx == hw_idx) {
-+ hw_idx = *(tnapi->rx_rcb_prod_idx);
-+ rmb();
-+ }
-+ }
-+
-+ /* ACK the status ring. */
-+ tnapi->rx_rcb_ptr = sw_idx;
-+ tw32_rx_mbox(tnapi->consmbox, sw_idx);
-+
-+ /* Refill RX ring(s). */
-+ if (!tg3_flag(tp, ENABLE_RSS)) {
-+ /* Sync BD data before updating mailbox */
-+ wmb();
-+
-+ if (work_mask & RXD_OPAQUE_RING_STD) {
-+ tpr->rx_std_prod_idx = std_prod_idx &
-+ tp->rx_std_ring_mask;
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ tw32_rx_mbox(tpr->rx_std_mbox, tpr->rx_std_prod_idx);
-+#else
-+ tw32_rx_mbox(TG3_RX_STD_PROD_IDX_REG,
-+ tpr->rx_std_prod_idx);
-+#endif
-+ }
-+ if (work_mask & RXD_OPAQUE_RING_JUMBO) {
-+ tpr->rx_jmb_prod_idx = jmb_prod_idx &
-+ tp->rx_jmb_ring_mask;
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ tw32_rx_mbox(tpr->rx_jmb_mbox, tpr->rx_jmb_prod_idx);
-+#else
-+ tw32_rx_mbox(TG3_RX_JMB_PROD_IDX_REG,
-+ tpr->rx_jmb_prod_idx);
-+#endif
-+ }
-+ mmiowb();
-+ } else if (work_mask) {
-+ /* rx_std_buffers[] and rx_jmb_buffers[] entries must be
-+ * updated before the producer indices can be updated.
-+ */
-+ smp_wmb();
-+
-+ tpr->rx_std_prod_idx = std_prod_idx & tp->rx_std_ring_mask;
-+ tpr->rx_jmb_prod_idx = jmb_prod_idx & tp->rx_jmb_ring_mask;
-+
-+ if (tnapi != &tp->napi[1]) {
-+ tp->rx_refill = true;
-+ napi_schedule_(tp->dev, &tp->napi[1].napi);
-+ }
-+ }
-+
-+ return received;
-+}
-+
-+static void tg3_poll_link(struct tg3 *tp)
-+{
-+ /* handle link change and other phy events */
-+ if (!(tg3_flag(tp, USE_LINKCHG_REG) || tg3_flag(tp, POLL_SERDES))) {
-+ struct tg3_hw_status *sblk = tp->napi[0].hw_status;
-+
-+ if (sblk->status & SD_STATUS_LINK_CHG) {
-+ sblk->status = SD_STATUS_UPDATED |
-+ (sblk->status & ~SD_STATUS_LINK_CHG);
-+ spin_lock(&tp->lock);
-+ if (tg3_flag(tp, USE_PHYLIB)) {
-+ tw32_f(MAC_STATUS,
-+ (MAC_STATUS_SYNC_CHANGED |
-+ MAC_STATUS_CFG_CHANGED |
-+ MAC_STATUS_MI_COMPLETION |
-+ MAC_STATUS_LNKSTATE_CHANGED));
-+ udelay(40);
-+ } else
-+ tg3_setup_phy(tp, false);
-+ spin_unlock(&tp->lock);
-+ }
-+ }
-+}
-+
-+static inline void tg3_reset_task_schedule(struct tg3 *tp)
-+{
-+ if (!test_and_set_bit(TG3_FLAG_RESET_TASK_PENDING, tp->tg3_flags))
-+ schedule_work(&tp->reset_task);
-+}
-+
-+static inline void tg3_reset_task_cancel(struct tg3 *tp)
-+{
-+#if (LINUX_VERSION_CODE >= 0x20616) || defined (__VMKLNX__)
-+ cancel_work_sync(&tp->reset_task);
-+#else
-+ set_current_state(TASK_UNINTERRUPTIBLE);
-+ schedule_timeout(1);
-+#endif
-+ tg3_flag_clear(tp, RESET_TASK_PENDING);
-+ tg3_flag_clear(tp, TX_RECOVERY_PENDING);
-+}
-+
-+static void tg3_process_error(struct tg3 *tp)
-+{
-+ u32 val;
-+ bool real_error = false;
-+
-+ if (tg3_flag(tp, ERROR_PROCESSED))
-+ return;
-+
-+ /* Check Flow Attention register */
-+ val = tr32(HOSTCC_FLOW_ATTN);
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ /* Shutting down NetQueues cause permissible RCB errors */
-+ val &= ~(HOSTCC_FLOW_ATTN_MBUF_LWM |
-+ HOSTCC_FLOW_ATTN_RCB_MISCFG |
-+ HOSTCC_FLOW_ATTN_RCV_BDI_ATTN);
-+#endif
-+ if (val & ~HOSTCC_FLOW_ATTN_MBUF_LWM) {
-+ netdev_err(tp->dev, "FLOW Attention error. Resetting chip.\n");
-+ real_error = true;
-+ }
-+
-+ if (tr32(MSGINT_STATUS) & ~MSGINT_STATUS_MSI_REQ) {
-+ netdev_err(tp->dev, "MSI Status error. Resetting chip.\n");
-+ real_error = true;
-+ }
-+
-+ if (tr32(RDMAC_STATUS) || tr32(WDMAC_STATUS)) {
-+ netdev_err(tp->dev, "DMA Status error. Resetting chip.\n");
-+ real_error = true;
-+ }
-+
-+ if (!real_error)
-+ return;
-+
-+#if !defined(__VMKLNX__)
-+ /* Encounterred real error */
-+ tp->recoverable_err++;
-+
-+ /* Check if we received two recoverable error within 10 seconds, if so
-+ * set the unrecoverable flag and move this port to close state
-+ */
-+ if (time_before(jiffies,
-+ tp->recoverable_err_jiffies +
-+ tp->recoverable_err_interval))
-+ tp->unrecoverable_err++;
-+
-+ tp->recoverable_err_jiffies = jiffies;
-+#endif
-+
-+ tg3_dump_state(tp);
-+
-+ tg3_flag_set(tp, ERROR_PROCESSED);
-+ tg3_reset_task_schedule(tp);
-+}
-+
-+static inline void tg3_send_ape_heartbeat(struct tg3 *tp,
-+ unsigned long interval)
-+{
-+ /* Check if hb interval has exceeded */
-+ if (!tg3_flag(tp, ENABLE_APE) ||
-+ time_before(jiffies, tp->ape_hb_jiffies + interval))
-+ return;
-+
-+ tg3_ape_write32(tp, TG3_APE_HOST_HEARTBEAT_COUNT, tp->ape_hb++);
-+ tp->ape_hb_jiffies = jiffies;
-+ return;
-+}
-+
-+#ifdef TG3_NAPI
-+
-+static int tg3_rx_prodring_xfer(struct tg3 *tp,
-+ struct tg3_rx_prodring_set *dpr,
-+ struct tg3_rx_prodring_set *spr)
-+{
-+ u32 si, di, cpycnt, src_prod_idx;
-+ int i, err = 0;
-+
-+ while (1) {
-+ src_prod_idx = spr->rx_std_prod_idx;
-+
-+ /* Make sure updates to the rx_std_buffers[] entries and the
-+ * standard producer index are seen in the correct order.
-+ */
-+ smp_rmb();
-+
-+ if (spr->rx_std_cons_idx == src_prod_idx)
-+ break;
-+
-+ if (spr->rx_std_cons_idx < src_prod_idx)
-+ cpycnt = src_prod_idx - spr->rx_std_cons_idx;
-+ else
-+ cpycnt = tp->rx_std_ring_mask + 1 -
-+ spr->rx_std_cons_idx;
-+
-+ cpycnt = min(cpycnt,
-+ tp->rx_std_ring_mask + 1 - dpr->rx_std_prod_idx);
-+
-+ si = spr->rx_std_cons_idx;
-+ di = dpr->rx_std_prod_idx;
-+
-+ for (i = di; i < di + cpycnt; i++) {
-+ if (dpr->rx_std_buffers[i].data) {
-+ cpycnt = i - di;
-+ err = -ENOSPC;
-+ break;
-+ }
-+ }
-+
-+ if (!cpycnt)
-+ break;
-+
-+ /* Ensure that updates to the rx_std_buffers ring and the
-+ * shadowed hardware producer ring from tg3_recycle_skb() are
-+ * ordered correctly WRT the skb check above.
-+ */
-+ smp_rmb();
-+
-+ memcpy(&dpr->rx_std_buffers[di],
-+ &spr->rx_std_buffers[si],
-+ cpycnt * sizeof(struct ring_info));
-+
-+ for (i = 0; i < cpycnt; i++, di++, si++) {
-+ struct tg3_rx_buffer_desc *sbd, *dbd;
-+ sbd = &spr->rx_std[si];
-+ dbd = &dpr->rx_std[di];
-+ dbd->addr_hi = sbd->addr_hi;
-+ dbd->addr_lo = sbd->addr_lo;
-+ }
-+
-+ spr->rx_std_cons_idx = (spr->rx_std_cons_idx + cpycnt) &
-+ tp->rx_std_ring_mask;
-+ dpr->rx_std_prod_idx = (dpr->rx_std_prod_idx + cpycnt) &
-+ tp->rx_std_ring_mask;
-+ }
-+
-+ while (1) {
-+ src_prod_idx = spr->rx_jmb_prod_idx;
-+
-+ /* Make sure updates to the rx_jmb_buffers[] entries and
-+ * the jumbo producer index are seen in the correct order.
-+ */
-+ smp_rmb();
-+
-+ if (spr->rx_jmb_cons_idx == src_prod_idx)
-+ break;
-+
-+ if (spr->rx_jmb_cons_idx < src_prod_idx)
-+ cpycnt = src_prod_idx - spr->rx_jmb_cons_idx;
-+ else
-+ cpycnt = tp->rx_jmb_ring_mask + 1 -
-+ spr->rx_jmb_cons_idx;
-+
-+ cpycnt = min(cpycnt,
-+ tp->rx_jmb_ring_mask + 1 - dpr->rx_jmb_prod_idx);
-+
-+ si = spr->rx_jmb_cons_idx;
-+ di = dpr->rx_jmb_prod_idx;
-+
-+ for (i = di; i < di + cpycnt; i++) {
-+ if (dpr->rx_jmb_buffers[i].data) {
-+ cpycnt = i - di;
-+ err = -ENOSPC;
-+ break;
-+ }
-+ }
-+
-+ if (!cpycnt)
-+ break;
-+
-+ /* Ensure that updates to the rx_jmb_buffers ring and the
-+ * shadowed hardware producer ring from tg3_recycle_skb() are
-+ * ordered correctly WRT the skb check above.
-+ */
-+ smp_rmb();
-+
-+ memcpy(&dpr->rx_jmb_buffers[di],
-+ &spr->rx_jmb_buffers[si],
-+ cpycnt * sizeof(struct ring_info));
-+
-+ for (i = 0; i < cpycnt; i++, di++, si++) {
-+ struct tg3_rx_buffer_desc *sbd, *dbd;
-+ sbd = &spr->rx_jmb[si].std;
-+ dbd = &dpr->rx_jmb[di].std;
-+ dbd->addr_hi = sbd->addr_hi;
-+ dbd->addr_lo = sbd->addr_lo;
-+ }
-+
-+ spr->rx_jmb_cons_idx = (spr->rx_jmb_cons_idx + cpycnt) &
-+ tp->rx_jmb_ring_mask;
-+ dpr->rx_jmb_prod_idx = (dpr->rx_jmb_prod_idx + cpycnt) &
-+ tp->rx_jmb_ring_mask;
-+ }
-+
-+ return err;
-+}
-+
-+static int tg3_poll_work(struct tg3_napi *tnapi, int work_done, int budget)
-+{
-+ struct tg3 *tp = tnapi->tp;
-+
-+ /* run TX completion thread */
-+ if (tnapi->hw_status->idx[0].tx_consumer != tnapi->tx_cons) {
-+ tg3_tx(tnapi);
-+ if (unlikely(tg3_flag(tp, TX_RECOVERY_PENDING)))
-+ return work_done;
-+ }
-+
-+ if (!tnapi->rx_rcb_prod_idx)
-+ return work_done;
-+
-+ /* run RX thread, within the bounds set by NAPI.
-+ * All RX "locking" is done by ensuring outside
-+ * code synchronizes with tg3->napi.poll()
-+ */
-+ if (*(tnapi->rx_rcb_prod_idx) != tnapi->rx_rcb_ptr)
-+ work_done += tg3_rx(tnapi, budget - work_done);
-+
-+ if (tg3_flag(tp, ENABLE_RSS) && tnapi == &tp->napi[1]) {
-+ struct tg3_rx_prodring_set *dpr = &tp->napi[0].prodring;
-+ int i, err = 0;
-+ u32 std_prod_idx = dpr->rx_std_prod_idx;
-+ u32 jmb_prod_idx = dpr->rx_jmb_prod_idx;
-+
-+ tp->rx_refill = false;
-+ for (i = 1; i <= tp->rxq_cnt; i++)
-+ err |= tg3_rx_prodring_xfer(tp, dpr,
-+ &tp->napi[i].prodring);
-+
-+ wmb();
-+
-+ if (std_prod_idx != dpr->rx_std_prod_idx)
-+ tw32_rx_mbox(TG3_RX_STD_PROD_IDX_REG,
-+ dpr->rx_std_prod_idx);
-+
-+ if (jmb_prod_idx != dpr->rx_jmb_prod_idx)
-+ tw32_rx_mbox(TG3_RX_JMB_PROD_IDX_REG,
-+ dpr->rx_jmb_prod_idx);
-+
-+ mmiowb();
-+
-+ if (err)
-+ tw32_f(HOSTCC_MODE, tp->coal_now);
-+ }
-+
-+ return work_done;
-+}
-+
-+static int tg3_poll_msix(struct napi_struct *napi, int budget)
-+{
-+ struct tg3_napi *tnapi = container_of(napi, struct tg3_napi, napi);
-+ struct tg3 *tp = tnapi->tp;
-+ int work_done = 0;
-+ struct tg3_hw_status *sblk = tnapi->hw_status;
-+
-+ while (1) {
-+ work_done = tg3_poll_work(tnapi, work_done, budget);
-+
-+ if (unlikely(tg3_flag(tp, TX_RECOVERY_PENDING)))
-+ goto tx_recovery;
-+
-+ if (unlikely(work_done >= budget))
-+ break;
-+
-+ /* tp->last_tag is used in tg3_int_reenable() below
-+ * to tell the hw how much work has been processed,
-+ * so we must read it before checking for more work.
-+ */
-+ tnapi->last_tag = sblk->status_tag;
-+ tnapi->last_irq_tag = tnapi->last_tag;
-+ rmb();
-+
-+ /* check for RX/TX work to do */
-+ if (likely(sblk->idx[0].tx_consumer == tnapi->tx_cons &&
-+ *(tnapi->rx_rcb_prod_idx) == tnapi->rx_rcb_ptr)) {
-+
-+ /* This test here is not race free, but will reduce
-+ * the number of interrupts by looping again.
-+ */
-+ if (tnapi == &tp->napi[1] && tp->rx_refill)
-+ continue;
-+
-+ napi_complete_(tp->dev, napi);
-+ /* Reenable interrupts. */
-+ tw32_mailbox(tnapi->int_mbox, tnapi->last_tag << 24);
-+
-+ /* This test here is synchronized by napi_schedule()
-+ * and napi_complete() to close the race condition.
-+ */
-+ if (unlikely(tnapi == &tp->napi[1] && tp->rx_refill)) {
-+ tw32(HOSTCC_MODE, tp->coalesce_mode |
-+ HOSTCC_MODE_ENABLE |
-+ tnapi->coal_now);
-+ }
-+ mmiowb();
-+ break;
-+ }
-+ }
-+
-+ tg3_send_ape_heartbeat(tp, TG3_APE_HB_INTERVAL << 1);
-+ return work_done;
-+
-+tx_recovery:
-+ /* work_done is guaranteed to be less than budget. */
-+ napi_complete_(tp->dev, napi);
-+ tg3_reset_task_schedule(tp);
-+ return work_done;
-+}
-+
-+static int tg3_poll(struct napi_struct *napi, int budget)
-+{
-+ struct tg3_napi *tnapi = container_of(napi, struct tg3_napi, napi);
-+ struct tg3 *tp = tnapi->tp;
-+ int work_done = 0;
-+ struct tg3_hw_status *sblk = tnapi->hw_status;
-+
-+ while (1) {
-+ if (sblk->status & SD_STATUS_ERROR)
-+ tg3_process_error(tp);
-+
-+ tg3_poll_link(tp);
-+
-+ work_done = tg3_poll_work(tnapi, work_done, budget);
-+
-+ if (unlikely(tg3_flag(tp, TX_RECOVERY_PENDING)))
-+ goto tx_recovery;
-+
-+ if (unlikely(work_done >= budget))
-+ break;
-+
-+ if (tg3_flag(tp, TAGGED_STATUS)) {
-+ /* tp->last_tag is used in tg3_int_reenable() below
-+ * to tell the hw how much work has been processed,
-+ * so we must read it before checking for more work.
-+ */
-+ tnapi->last_tag = sblk->status_tag;
-+ tnapi->last_irq_tag = tnapi->last_tag;
-+ rmb();
-+ } else
-+ sblk->status &= ~SD_STATUS_UPDATED;
-+
-+ if (likely(!tg3_has_work(tnapi))) {
-+ napi_complete_(tp->dev, napi);
-+ tg3_int_reenable(tnapi);
-+ break;
-+ }
-+ }
-+
-+ tg3_send_ape_heartbeat(tp, TG3_APE_HB_INTERVAL << 1);
-+ return work_done;
-+
-+tx_recovery:
-+ /* work_done is guaranteed to be less than budget. */
-+ napi_complete_(tp->dev, napi);
-+ tg3_reset_task_schedule(tp);
-+ return work_done;
-+}
-+
-+#else
-+
-+static int tg3_poll(struct net_device *netdev, int *budget)
-+{
-+ struct tg3 *tp = netdev_priv(netdev);
-+ struct tg3_napi *tnapi = &tp->napi[0];
-+ struct tg3_hw_status *sblk = tnapi->hw_status;
-+ int done;
-+
-+ if (sblk->status & SD_STATUS_ERROR)
-+ tg3_process_error(tp);
-+
-+ tg3_poll_link(tp);
-+
-+ /* run TX completion thread */
-+ if (sblk->idx[0].tx_consumer != tnapi->tx_cons) {
-+ tg3_tx(tnapi);
-+ if (unlikely(tg3_flag(tp, TX_RECOVERY_PENDING))) {
-+ netif_rx_complete(netdev);
-+ tg3_reset_task_schedule(tp);
-+ return 0;
-+ }
-+ }
-+
-+ /* run RX thread, within the bounds set by NAPI.
-+ * All RX "locking" is done by ensuring outside
-+ * code synchronizes with dev->poll()
-+ */
-+ if (sblk->idx[0].rx_producer != tnapi->rx_rcb_ptr) {
-+ int orig_budget = *budget;
-+ int work_done;
-+
-+ if (orig_budget > netdev->quota)
-+ orig_budget = netdev->quota;
-+
-+ work_done = tg3_rx(tnapi, orig_budget);
-+
-+ *budget -= work_done;
-+ netdev->quota -= work_done;
-+ }
-+
-+ if (tg3_flag(tp, TAGGED_STATUS)) {
-+ tnapi->last_tag = sblk->status_tag;
-+ rmb();
-+ } else
-+ sblk->status &= ~SD_STATUS_UPDATED;
-+
-+ /* if no more work, tell net stack and NIC we're done */
-+ done = !tg3_has_work(tnapi);
-+ if (done) {
-+ netif_rx_complete(netdev);
-+ tg3_int_reenable(tnapi);
-+ }
-+
-+ return (done ? 0 : 1);
-+}
-+
-+#endif /* TG3_NAPI */
-+
-+static void tg3_napi_disable(struct tg3 *tp)
-+{
-+#ifdef TG3_NAPI
-+ int i;
-+
-+ for (i = tp->irq_cnt - 1; i >= 0; i--)
-+ napi_disable(&tp->napi[i].napi);
-+#else
-+ netif_poll_disable(tp->dev);
-+#endif
-+}
-+
-+static void tg3_napi_enable(struct tg3 *tp)
-+{
-+#ifdef TG3_NAPI
-+ int i;
-+
-+ for (i = 0; i < tp->irq_cnt; i++)
-+ napi_enable(&tp->napi[i].napi);
-+#else
-+ netif_poll_enable(tp->dev);
-+#endif
-+}
-+
-+static void tg3_napi_init(struct tg3 *tp)
-+{
-+#ifdef TG3_NAPI
-+ int i;
-+
-+ netif_napi_add(tp->dev, &tp->napi[0].napi, tg3_poll, 64);
-+ for (i = 1; i < tp->irq_cnt; i++)
-+ netif_napi_add(tp->dev, &tp->napi[i].napi, tg3_poll_msix, 64);
-+#else
-+ tp->dev->poll = tg3_poll;
-+ tp->dev->weight = 64;
-+#endif
-+}
-+
-+static void tg3_napi_fini(struct tg3 *tp)
-+{
-+#ifdef TG3_NAPI
-+ int i;
-+
-+ for (i = 0; i < tp->irq_cnt; i++)
-+ netif_napi_del(&tp->napi[i].napi);
-+#endif
-+}
-+
-+static inline void tg3_netif_stop(struct tg3 *tp)
-+{
-+ tp->dev->trans_start = jiffies; /* prevent tx timeout */
-+ tg3_napi_disable(tp);
-+ netif_carrier_off(tp->dev); /* prevent spurious tx timeout */
-+ netif_tx_disable(tp->dev);
-+}
-+
-+/* tp->lock must be held */
-+static inline void tg3_netif_start(struct tg3 *tp)
-+{
-+ tg3_ptp_resume(tp);
-+
-+ /* NOTE: unconditional netif_tx_wake_all_queues is only
-+ * appropriate so long as all callers are assured to
-+ * have free tx slots (such as after tg3_init_hw)
-+ */
-+ netif_tx_wake_all_queues(tp->dev);
-+
-+ if (tp->link_up)
-+ netif_carrier_on(tp->dev);
-+
-+ tg3_napi_enable(tp);
-+ tp->napi[0].hw_status->status |= SD_STATUS_UPDATED;
-+ tg3_enable_ints(tp);
-+}
-+
-+static void tg3_irq_quiesce(struct tg3 *tp)
-+{
-+#if (LINUX_VERSION_CODE >= 0x2051c)
-+ int i;
-+#endif
-+
-+ BUG_ON(tp->irq_sync);
-+
-+ tp->irq_sync = 1;
-+ smp_mb();
-+
-+#if (LINUX_VERSION_CODE >= 0x2051c)
-+ for (i = 0; i < tp->irq_cnt; i++)
-+ synchronize_irq(tp->napi[i].irq_vec);
-+#else
-+ synchronize_irq();
-+#endif
-+}
-+
-+/* Fully shutdown all tg3 driver activity elsewhere in the system.
-+ * If irq_sync is non-zero, then the IRQ handler must be synchronized
-+ * with as well. Most of the time, this is not necessary except when
-+ * shutting down the device.
-+ */
-+static inline void tg3_full_lock(struct tg3 *tp, int irq_sync)
-+{
-+ spin_lock_bh(&tp->lock);
-+ if (irq_sync)
-+ tg3_irq_quiesce(tp);
-+}
-+
-+static inline void tg3_full_unlock(struct tg3 *tp)
-+{
-+ spin_unlock_bh(&tp->lock);
-+}
-+
-+/* One-shot MSI handler - Chip automatically disables interrupt
-+ * after sending MSI so driver doesn't have to do it.
-+ */
-+#ifdef BCM_HAS_NEW_IRQ_SIG
-+static irqreturn_t tg3_msi_1shot(int irq, void *dev_id)
-+#else
-+static irqreturn_t tg3_msi_1shot(int irq, void *dev_id, struct pt_regs *regs)
-+#endif
-+{
-+ struct tg3_napi *tnapi = dev_id;
-+ struct tg3 *tp = tnapi->tp;
-+
-+ prefetch(tnapi->hw_status);
-+ if (tnapi->rx_rcb)
-+ prefetch(&tnapi->rx_rcb[tnapi->rx_rcb_ptr]);
-+
-+ if (likely(!tg3_irq_sync(tp)))
-+ napi_schedule_(tp->dev, &tnapi->napi);
-+
-+ return IRQ_HANDLED;
-+}
-+
-+/* MSI ISR - No need to check for interrupt sharing and no need to
-+ * flush status block and interrupt mailbox. PCI ordering rules
-+ * guarantee that MSI will arrive after the status block.
-+ */
-+#ifdef BCM_HAS_NEW_IRQ_SIG
-+static irqreturn_t tg3_msi(int irq, void *dev_id)
-+#else
-+static irqreturn_t tg3_msi(int irq, void *dev_id, struct pt_regs *regs)
-+#endif
-+{
-+ struct tg3_napi *tnapi = dev_id;
-+ struct tg3 *tp = tnapi->tp;
-+
-+ prefetch(tnapi->hw_status);
-+ if (tnapi->rx_rcb)
-+ prefetch(&tnapi->rx_rcb[tnapi->rx_rcb_ptr]);
-+ /*
-+ * Writing any value to intr-mbox-0 clears PCI INTA# and
-+ * chip-internal interrupt pending events.
-+ * Writing non-zero to intr-mbox-0 additional tells the
-+ * NIC to stop sending us irqs, engaging "in-intr-handler"
-+ * event coalescing.
-+ */
-+ tw32_mailbox(tnapi->int_mbox, 0x00000001);
-+ if (likely(!tg3_irq_sync(tp)))
-+ napi_schedule_(tp->dev, &tnapi->napi);
-+
-+ return IRQ_RETVAL(1);
-+}
-+
-+#ifdef BCM_HAS_NEW_IRQ_SIG
-+static irqreturn_t tg3_interrupt(int irq, void *dev_id)
-+#else
-+static irqreturn_t tg3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-+#endif
-+{
-+ struct tg3_napi *tnapi = dev_id;
-+ struct tg3 *tp = tnapi->tp;
-+ struct tg3_hw_status *sblk = tnapi->hw_status;
-+ unsigned int handled = 1;
-+
-+ /* In INTx mode, it is possible for the interrupt to arrive at
-+ * the CPU before the status block posted prior to the interrupt.
-+ * Reading the PCI State register will confirm whether the
-+ * interrupt is ours and will flush the status block.
-+ */
-+ if (unlikely(!(sblk->status & SD_STATUS_UPDATED))) {
-+ if (tg3_flag(tp, CHIP_RESETTING) ||
-+ (tr32(TG3PCI_PCISTATE) & PCISTATE_INT_NOT_ACTIVE)) {
-+ handled = 0;
-+ goto out;
-+ }
-+ }
-+
-+ /*
-+ * Writing any value to intr-mbox-0 clears PCI INTA# and
-+ * chip-internal interrupt pending events.
-+ * Writing non-zero to intr-mbox-0 additional tells the
-+ * NIC to stop sending us irqs, engaging "in-intr-handler"
-+ * event coalescing.
-+ *
-+ * Flush the mailbox to de-assert the IRQ immediately to prevent
-+ * spurious interrupts. The flush impacts performance but
-+ * excessive spurious interrupts can be worse in some cases.
-+ */
-+ tw32_mailbox_f(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000001);
-+ if (tg3_irq_sync(tp))
-+ goto out;
-+ sblk->status &= ~SD_STATUS_UPDATED;
-+ if (likely(tg3_has_work(tnapi))) {
-+ prefetch(&tnapi->rx_rcb[tnapi->rx_rcb_ptr]);
-+ napi_schedule_(tp->dev, &tnapi->napi);
-+ } else {
-+ /* No work, shared interrupt perhaps? re-enable
-+ * interrupts, and flush that PCI write
-+ */
-+ tw32_mailbox_f(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW,
-+ 0x00000000);
-+ }
-+out:
-+ return IRQ_RETVAL(handled);
-+}
-+
-+#ifdef BCM_HAS_NEW_IRQ_SIG
-+static irqreturn_t tg3_interrupt_tagged(int irq, void *dev_id)
-+#else
-+static irqreturn_t tg3_interrupt_tagged(int irq, void *dev_id, struct pt_regs *regs)
-+#endif
-+{
-+ struct tg3_napi *tnapi = dev_id;
-+ struct tg3 *tp = tnapi->tp;
-+ struct tg3_hw_status *sblk = tnapi->hw_status;
-+ unsigned int handled = 1;
-+
-+ /* In INTx mode, it is possible for the interrupt to arrive at
-+ * the CPU before the status block posted prior to the interrupt.
-+ * Reading the PCI State register will confirm whether the
-+ * interrupt is ours and will flush the status block.
-+ */
-+ if (unlikely(sblk->status_tag == tnapi->last_irq_tag)) {
-+ if (tg3_flag(tp, CHIP_RESETTING) ||
-+ (tr32(TG3PCI_PCISTATE) & PCISTATE_INT_NOT_ACTIVE)) {
-+ handled = 0;
-+ goto out;
-+ }
-+ }
-+
-+ /*
-+ * writing any value to intr-mbox-0 clears PCI INTA# and
-+ * chip-internal interrupt pending events.
-+ * writing non-zero to intr-mbox-0 additional tells the
-+ * NIC to stop sending us irqs, engaging "in-intr-handler"
-+ * event coalescing.
-+ *
-+ * Flush the mailbox to de-assert the IRQ immediately to prevent
-+ * spurious interrupts. The flush impacts performance but
-+ * excessive spurious interrupts can be worse in some cases.
-+ */
-+ tw32_mailbox_f(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000001);
-+
-+ /*
-+ * In a shared interrupt configuration, sometimes other devices'
-+ * interrupts will scream. We record the current status tag here
-+ * so that the above check can report that the screaming interrupts
-+ * are unhandled. Eventually they will be silenced.
-+ */
-+ tnapi->last_irq_tag = sblk->status_tag;
-+
-+ if (tg3_irq_sync(tp))
-+ goto out;
-+
-+ prefetch(&tnapi->rx_rcb[tnapi->rx_rcb_ptr]);
-+
-+ napi_schedule_(tp->dev, &tnapi->napi);
-+
-+out:
-+ return IRQ_RETVAL(handled);
-+}
-+
-+/* ISR for interrupt test */
-+#ifdef BCM_HAS_NEW_IRQ_SIG
-+static irqreturn_t tg3_test_isr(int irq, void *dev_id)
-+#else
-+static irqreturn_t tg3_test_isr(int irq, void *dev_id, struct pt_regs *regs)
-+#endif
-+{
-+ struct tg3_napi *tnapi = dev_id;
-+ struct tg3 *tp = tnapi->tp;
-+ struct tg3_hw_status *sblk = tnapi->hw_status;
-+
-+ if ((sblk->status & SD_STATUS_UPDATED) ||
-+ !(tr32(TG3PCI_PCISTATE) & PCISTATE_INT_NOT_ACTIVE)) {
-+ tg3_disable_ints(tp);
-+ return IRQ_RETVAL(1);
-+ }
-+ return IRQ_RETVAL(0);
-+}
-+
-+#ifdef CONFIG_NET_POLL_CONTROLLER
-+static void tg3_poll_controller(struct net_device *dev)
-+{
-+#ifdef BCM_HAS_NEW_IRQ_SIG
-+ int i;
-+#endif
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (tg3_irq_sync(tp))
-+ return;
-+
-+#if defined(BCM_HAS_NETDUMP_MODE) && (LINUX_VERSION_CODE < 0x20600)
-+ if (netdump_mode) {
-+ tg3_interrupt(tp->pdev->irq, dev, NULL);
-+ if (dev->poll_list.prev) {
-+ int budget = 64;
-+
-+ tg3_poll(dev, &budget);
-+ }
-+ }
-+ else
-+#endif
-+#ifdef BCM_HAS_NEW_IRQ_SIG
-+ for (i = 0; i < tp->irq_cnt; i++)
-+ tg3_interrupt(tp->napi[i].irq_vec, &tp->napi[i]);
-+#else
-+ tg3_interrupt(tp->pdev->irq, dev, NULL);
-+#endif
-+}
-+#endif
-+
-+static void tg3_tx_timeout(struct net_device *dev)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (netif_msg_tx_err(tp)) {
-+ netdev_err(dev, "transmit timed out, resetting\n");
-+ tg3_dump_state(tp);
-+#if defined(__VMKLNX__)
-+ if (psod_on_tx_timeout) {
-+ msleep(100);
-+ BUG_ON(1);
-+ return;
-+ }
-+#endif
-+ }
-+
-+ tg3_reset_task_schedule(tp);
-+}
-+
-+/* Test for DMA buffers crossing any 4GB boundaries: 4G, 8G, etc */
-+static inline int tg3_4g_overflow_test(dma_addr_t mapping, int len)
-+{
-+ u32 base = (u32) mapping & 0xffffffff;
-+
-+ return (base + len + 8 < base);
-+}
-+
-+/* Test for TSO DMA buffers that cross into regions which are within MSS bytes
-+ * of any 4GB boundaries: 4G, 8G, etc
-+ */
-+static inline int tg3_4g_tso_overflow_test(struct tg3 *tp, dma_addr_t mapping,
-+ u32 len, u32 mss)
-+{
-+ if (tg3_asic_rev(tp) == ASIC_REV_5762 && mss) {
-+ u32 base = (u32) mapping & 0xffffffff;
-+
-+ return ((base + len + (mss & 0x3fff)) < base);
-+ }
-+ return 0;
-+}
-+
-+/* Test for DMA addresses > 40-bit */
-+static inline int tg3_40bit_overflow_test(struct tg3 *tp, dma_addr_t mapping,
-+ int len)
-+{
-+#if defined(CONFIG_HIGHMEM) && (BITS_PER_LONG == 64)
-+ if (tg3_flag(tp, 40BIT_DMA_BUG))
-+ return ((u64) mapping + len) > DMA_BIT_MASK(40);
-+ return 0;
-+#else
-+ return 0;
-+#endif
-+}
-+
-+static inline void tg3_tx_set_bd(struct tg3_tx_buffer_desc *txbd,
-+ dma_addr_t mapping, u32 len, u32 flags,
-+ u32 mss, u32 vlan)
-+{
-+ txbd->addr_hi = ((u64) mapping >> 32);
-+ txbd->addr_lo = ((u64) mapping & 0xffffffff);
-+ txbd->len_flags = (len << TXD_LEN_SHIFT) | (flags & 0x0000ffff);
-+ txbd->vlan_tag = (mss << TXD_MSS_SHIFT) | (vlan << TXD_VLAN_TAG_SHIFT);
-+}
-+
-+static bool tg3_tx_frag_set(struct tg3_napi *tnapi, u32 *entry, u32 *budget,
-+ dma_addr_t map, u32 len, u32 flags,
-+ u32 mss, u32 vlan)
-+{
-+ struct tg3 *tp = tnapi->tp;
-+ bool hwbug = false;
-+ u32 dma_limit = tp->dma_limit;
-+
-+ if (tg3_flag(tp, SHORT_DMA_BUG) && len <= 8)
-+ hwbug = true;
-+
-+ if (tg3_4g_overflow_test(map, len)) {
-+ tp->dma_4g_cross++;
-+ hwbug = true;
-+ }
-+
-+ if (tg3_4g_tso_overflow_test(tp, map, len, mss))
-+ hwbug = true;
-+
-+ if (tg3_40bit_overflow_test(tp, map, len))
-+ hwbug = true;
-+
-+ if (dma_limit) {
-+ u32 prvidx = *entry;
-+ u32 tmp_flag = flags & ~TXD_FLAG_END;
-+ while (len > dma_limit && *budget) {
-+ u32 frag_len = dma_limit;
-+ len -= dma_limit;
-+
-+ /* Avoid the 8byte DMA problem */
-+ if (len <= 8) {
-+ len += dma_limit / 2;
-+ frag_len = dma_limit / 2;
-+ }
-+
-+ tnapi->tx_buffers[*entry].fragmented = true;
-+
-+ tg3_tx_set_bd(&tnapi->tx_ring[*entry], map,
-+ frag_len, tmp_flag, mss, vlan);
-+ *budget -= 1;
-+ prvidx = *entry;
-+ *entry = NEXT_TX(*entry);
-+
-+ map += frag_len;
-+ }
-+
-+ if (len) {
-+ if (*budget) {
-+ tg3_tx_set_bd(&tnapi->tx_ring[*entry], map,
-+ len, flags, mss, vlan);
-+ *budget -= 1;
-+ *entry = NEXT_TX(*entry);
-+ } else {
-+ hwbug = true;
-+ tnapi->tx_buffers[prvidx].fragmented = false;
-+ }
-+ }
-+ } else {
-+ tg3_tx_set_bd(&tnapi->tx_ring[*entry], map,
-+ len, flags, mss, vlan);
-+ *entry = NEXT_TX(*entry);
-+ }
-+
-+ return hwbug;
-+}
-+
-+static void tg3_tx_skb_unmap(struct tg3_napi *tnapi, u32 entry, int last)
-+{
-+ int i;
-+ struct sk_buff *skb;
-+ struct tg3_tx_ring_info *txb = &tnapi->tx_buffers[entry];
-+
-+ skb = txb->skb;
-+ txb->skb = NULL;
-+
-+ pci_unmap_single(tnapi->tp->pdev,
-+ dma_unmap_addr(txb, mapping),
-+ skb_headlen(skb),
-+ PCI_DMA_TODEVICE);
-+
-+ while (txb->fragmented) {
-+ txb->fragmented = false;
-+ entry = NEXT_TX(entry);
-+ txb = &tnapi->tx_buffers[entry];
-+ }
-+
-+ for (i = 0; i <= last; i++) {
-+ const skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
-+
-+ entry = NEXT_TX(entry);
-+ txb = &tnapi->tx_buffers[entry];
-+
-+ pci_unmap_page(tnapi->tp->pdev,
-+ dma_unmap_addr(txb, mapping),
-+ skb_frag_size(frag), PCI_DMA_TODEVICE);
-+
-+ while (txb->fragmented) {
-+ txb->fragmented = false;
-+ entry = NEXT_TX(entry);
-+ txb = &tnapi->tx_buffers[entry];
-+ }
-+ }
-+}
-+
-+/* Workaround 4GB and 40-bit hardware DMA bugs. */
-+static int tigon3_dma_hwbug_workaround(struct tg3_napi *tnapi,
-+ struct sk_buff **pskb,
-+ u32 *entry, u32 *budget,
-+ u32 base_flags, u32 mss, u32 vlan)
-+{
-+ struct tg3 *tp = tnapi->tp;
-+ struct sk_buff *new_skb, *skb = *pskb;
-+ dma_addr_t new_addr = 0;
-+ int ret = 0;
-+
-+ if (tg3_asic_rev(tp) != ASIC_REV_5701)
-+ new_skb = skb_copy(skb, GFP_ATOMIC);
-+ else {
-+ int more_headroom = 4 - ((unsigned long)skb->data & 3);
-+
-+ new_skb = skb_copy_expand(skb,
-+ skb_headroom(skb) + more_headroom,
-+ skb_tailroom(skb), GFP_ATOMIC);
-+ }
-+
-+ if (!new_skb) {
-+ ret = -1;
-+ } else {
-+ /* New SKB is guaranteed to be linear. */
-+ new_addr = pci_map_single(tp->pdev, new_skb->data, new_skb->len,
-+ PCI_DMA_TODEVICE);
-+ /* Make sure the mapping succeeded */
-+ if (pci_dma_mapping_error_(tp->pdev, new_addr)) {
-+ dev_kfree_skb(new_skb);
-+ ret = -1;
-+ } else {
-+ u32 save_entry = *entry;
-+
-+ base_flags |= TXD_FLAG_END;
-+
-+ tnapi->tx_buffers[*entry].skb = new_skb;
-+ dma_unmap_addr_set(&tnapi->tx_buffers[*entry],
-+ mapping, new_addr);
-+
-+ if (tg3_tx_frag_set(tnapi, entry, budget, new_addr,
-+ new_skb->len, base_flags,
-+ mss, vlan)) {
-+ tg3_tx_skb_unmap(tnapi, save_entry, -1);
-+ dev_kfree_skb(new_skb);
-+ ret = -1;
-+ }
-+ }
-+ }
-+
-+ dev_kfree_skb(skb);
-+ *pskb = new_skb;
-+ return ret;
-+}
-+
-+#if TG3_TSO_SUPPORT != 0
-+static netdev_tx_t tg3_start_xmit(struct sk_buff *, struct net_device *);
-+
-+/* Use GSO to workaround a rare TSO bug that may be triggered when the
-+ * TSO header is greater than 80 bytes.
-+ */
-+static netdev_tx_t tg3_tso_bug(struct tg3 *tp, struct tg3_napi *tnapi,
-+ struct netdev_queue *txq, struct sk_buff *skb)
-+{
-+ struct sk_buff *segs, *nskb;
-+ u32 frag_cnt_est = skb_shinfo(skb)->gso_segs * 3;
-+
-+ /* Estimate the number of fragments in the worst case */
-+ if (unlikely(tg3_tx_avail(tnapi) <= frag_cnt_est)) {
-+ netif_tx_stop_queue(txq);
-+
-+ /* netif_tx_stop_queue() must be done before checking
-+ * checking tx index in tg3_tx_avail() below, because in
-+ * tg3_tx(), we update tx index before checking for
-+ * netif_tx_queue_stopped().
-+ */
-+ smp_mb();
-+ if (tg3_tx_avail(tnapi) <= frag_cnt_est)
-+ return NETDEV_TX_BUSY;
-+
-+ netif_tx_wake_queue(txq);
-+ }
-+
-+ segs = skb_gso_segment(skb, tp->dev->features &
-+ ~(NETIF_F_TSO | NETIF_F_TSO6));
-+ /* VMWare always returns NULL. Linux will only return NULL
-+ * when no segments are required.
-+ */
-+ if (!segs || IS_ERR(segs))
-+ goto tg3_tso_bug_end;
-+
-+ do {
-+ nskb = segs;
-+ segs = segs->next;
-+ nskb->next = NULL;
-+ tg3_start_xmit(nskb, tp->dev);
-+ } while (segs);
-+
-+tg3_tso_bug_end:
-+ dev_kfree_skb(skb);
-+
-+ return NETDEV_TX_OK;
-+}
-+#endif /* TG3_TSO_SUPPORT */
-+
-+/* hard_start_xmit for devices that have the 4G bug and/or 40-bit bug and
-+ * support TG3_FLAG_HW_TSO_1 or firmware TSO only.
-+ */
-+static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ u32 len, entry, base_flags, mss, vlan = 0;
-+ u32 budget;
-+ int i = -1, would_hit_hwbug;
-+ dma_addr_t mapping;
-+ struct tg3_napi *tnapi;
-+ struct netdev_queue *txq;
-+ unsigned int last;
-+ struct iphdr *iph = NULL;
-+ struct tcphdr *tcph = NULL;
-+ __sum16 tcp_csum = 0, ip_csum = 0;
-+ __be16 ip_tot_len = 0;
-+
-+ txq = netdev_get_tx_queue(dev, skb_get_queue_mapping(skb));
-+#if defined(__VMKLNX__) && (VMWARE_ESX_DDK_VERSION < 50000)
-+ /* For esx4.0/esx4.1u0-u2, the vmkernel doesn't check queue state
-+ * before calling start_xmit(). So driver has to check it itself.
-+ */
-+ if (unlikely(netif_tx_queue_stopped(txq)))
-+ goto drop;
-+#endif
-+ tnapi = &tp->napi[skb_get_queue_mapping(skb)];
-+ if (tg3_flag(tp, ENABLE_TSS))
-+ tnapi++;
-+
-+ budget = tg3_tx_avail(tnapi);
-+
-+ /* We are running in BH disabled context with netif_tx_lock
-+ * and TX reclaim runs via tp->napi.poll inside of a software
-+ * interrupt. Furthermore, IRQ processing runs lockless so we have
-+ * no IRQ context deadlocks to worry about either. Rejoice!
-+ */
-+ if (unlikely(budget <= (skb_shinfo(skb)->nr_frags + 1))) {
-+ if (!netif_tx_queue_stopped(txq)) {
-+ netif_tx_stop_queue(txq);
-+
-+ /* This is a hard error, log it. */
-+ netdev_err(dev,
-+ "BUG! Tx Ring full when queue awake!\n");
-+ }
-+ return NETDEV_TX_BUSY;
-+ }
-+
-+ entry = tnapi->tx_prod;
-+ base_flags = 0;
-+ if (skb->ip_summed == CHECKSUM_PARTIAL)
-+ base_flags |= TXD_FLAG_TCPUDP_CSUM;
-+
-+#if TG3_TSO_SUPPORT != 0
-+ mss = skb_shinfo(skb)->gso_size;
-+ if (mss) {
-+ u32 tcp_opt_len, hdr_len;
-+
-+ if (skb_header_cloned(skb) &&
-+ pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
-+ goto drop;
-+
-+ iph = ip_hdr(skb);
-+ tcp_opt_len = tcp_optlen(skb);
-+
-+ hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb) - ETH_HLEN;
-+
-+ if (!skb_is_gso_v6(skb)) {
-+ if (unlikely((ETH_HLEN + hdr_len) > 80) &&
-+ tg3_flag(tp, TSO_BUG))
-+ return tg3_tso_bug(tp, tnapi, txq, skb);
-+
-+ ip_csum = iph->check;
-+ ip_tot_len = iph->tot_len;
-+ iph->check = 0;
-+ iph->tot_len = htons(mss + hdr_len);
-+ }
-+
-+ if (hdr_len + mss >= skb->len - ETH_HLEN) {
-+ mss = 0;
-+ goto abort_lso;
-+ }
-+
-+ base_flags |= (TXD_FLAG_CPU_PRE_DMA |
-+ TXD_FLAG_CPU_POST_DMA);
-+
-+ tcph = tcp_hdr(skb);
-+ tcp_csum = tcph->check;
-+
-+ if (tg3_flag(tp, HW_TSO_1) ||
-+ tg3_flag(tp, HW_TSO_2) ||
-+ tg3_flag(tp, HW_TSO_3)) {
-+ tcph->check = 0;
-+ base_flags &= ~TXD_FLAG_TCPUDP_CSUM;
-+ } else {
-+ tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr,
-+ 0, IPPROTO_TCP, 0);
-+ }
-+
-+ if (tg3_flag(tp, HW_TSO_3)) {
-+ mss |= (hdr_len & 0xc) << 12;
-+ if (hdr_len & 0x10)
-+ base_flags |= 0x00000010;
-+ base_flags |= (hdr_len & 0x3e0) << 5;
-+ } else if (tg3_flag(tp, HW_TSO_2))
-+ mss |= hdr_len << 9;
-+ else if (tg3_flag(tp, HW_TSO_1) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5705) {
-+ if (tcp_opt_len || iph->ihl > 5) {
-+ int tsflags;
-+
-+ tsflags = (iph->ihl - 5) + (tcp_opt_len >> 2);
-+ mss |= (tsflags << 11);
-+ }
-+ } else {
-+ if (tcp_opt_len || iph->ihl > 5) {
-+ int tsflags;
-+
-+ tsflags = (iph->ihl - 5) + (tcp_opt_len >> 2);
-+ base_flags |= tsflags << 12;
-+ }
-+ }
-+ }
-+abort_lso:
-+#else
-+ mss = 0;
-+#endif
-+
-+ if (tg3_flag(tp, USE_JUMBO_BDFLAG) &&
-+ !mss && skb->len > VLAN_ETH_FRAME_LEN)
-+ base_flags |= TXD_FLAG_JMB_PKT;
-+
-+#ifdef BCM_KERNEL_SUPPORTS_8021Q
-+ if (vlan_tx_tag_present(skb)) {
-+ base_flags |= TXD_FLAG_VLAN;
-+ vlan = vlan_tx_tag_get(skb);
-+ }
-+#endif
-+
-+#ifdef BCM_KERNEL_SUPPORTS_TIMESTAMPING
-+ if ((unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) &&
-+ tg3_flag(tp, TX_TSTAMP_EN)) {
-+ skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
-+ base_flags |= TXD_FLAG_HWTSTAMP;
-+ }
-+#endif /* BCM_KERNEL_SUPPORTS_TIMESTAMPING */
-+
-+ len = skb_headlen(skb);
-+
-+ mapping = pci_map_single(tp->pdev, skb->data, len, PCI_DMA_TODEVICE);
-+ if (pci_dma_mapping_error_(tp->pdev, mapping))
-+ goto drop;
-+
-+
-+ tnapi->tx_buffers[entry].skb = skb;
-+ dma_unmap_addr_set(&tnapi->tx_buffers[entry], mapping, mapping);
-+
-+ would_hit_hwbug = 0;
-+
-+ if (tg3_flag(tp, 5701_DMA_BUG))
-+ would_hit_hwbug = 1;
-+
-+ if (tg3_tx_frag_set(tnapi, &entry, &budget, mapping, len, base_flags |
-+ ((skb_shinfo(skb)->nr_frags == 0) ? TXD_FLAG_END : 0),
-+ mss, vlan)) {
-+ would_hit_hwbug = 1;
-+ } else if (skb_shinfo(skb)->nr_frags > 0) {
-+ u32 tmp_mss = mss;
-+
-+ if (!tg3_flag(tp, HW_TSO_1) &&
-+ !tg3_flag(tp, HW_TSO_2) &&
-+ !tg3_flag(tp, HW_TSO_3))
-+ tmp_mss = 0;
-+
-+ /* Now loop through additional data
-+ * fragments, and queue them.
-+ */
-+ last = skb_shinfo(skb)->nr_frags - 1;
-+ for (i = 0; i <= last; i++) {
-+ skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
-+
-+ len = skb_frag_size(frag);
-+ mapping = skb_frag_dma_map(&tp->pdev->dev, frag, 0,
-+ len, DMA_TO_DEVICE);
-+
-+ tnapi->tx_buffers[entry].skb = NULL;
-+ dma_unmap_addr_set(&tnapi->tx_buffers[entry], mapping,
-+ mapping);
-+ if (dma_mapping_error_(&tp->pdev->dev, mapping))
-+ goto dma_error;
-+
-+ if (!budget ||
-+ tg3_tx_frag_set(tnapi, &entry, &budget, mapping,
-+ len, base_flags |
-+ ((i == last) ? TXD_FLAG_END : 0),
-+ tmp_mss, vlan)) {
-+ would_hit_hwbug = 1;
-+ break;
-+ }
-+ }
-+ }
-+
-+ if (would_hit_hwbug) {
-+ tg3_tx_skb_unmap(tnapi, tnapi->tx_prod, i);
-+
-+#if !defined(__VMKLNX__)
-+ if (mss) {
-+ /* If it's a TSO packet, do GSO instead of
-+ * allocating and copying to a large linear SKB.
-+ */
-+ if (ip_tot_len) {
-+ iph->check = ip_csum;
-+ iph->tot_len = ip_tot_len;
-+ }
-+ tcph->check = tcp_csum;
-+ return tg3_tso_bug(tp, tnapi, txq, skb);
-+ }
-+#endif
-+
-+ /* If the workaround fails due to memory/mapping
-+ * failure, silently drop this packet.
-+ */
-+ entry = tnapi->tx_prod;
-+ budget = tg3_tx_avail(tnapi);
-+ if (tigon3_dma_hwbug_workaround(tnapi, &skb, &entry, &budget,
-+ base_flags, mss, vlan))
-+ goto drop_nofree;
-+ }
-+
-+ skb_tx_timestamp(skb);
-+ netdev_tx_sent_queue(txq, skb->len);
-+
-+ /* Sync BD data before updating mailbox */
-+ wmb();
-+
-+ /* Packets are ready, update Tx producer idx local and on card. */
-+ tw32_tx_mbox(tnapi->prodmbox, entry);
-+
-+ tnapi->tx_prod = entry;
-+ if (unlikely(tg3_tx_avail(tnapi) <= (MAX_SKB_FRAGS + 1))) {
-+ netif_tx_stop_queue(txq);
-+
-+ /* netif_tx_stop_queue() must be done before checking
-+ * checking tx index in tg3_tx_avail() below, because in
-+ * tg3_tx(), we update tx index before checking for
-+ * netif_tx_queue_stopped().
-+ */
-+ smp_mb();
-+ if (tg3_tx_avail(tnapi) > TG3_TX_WAKEUP_THRESH(tnapi))
-+ netif_tx_wake_queue(txq);
-+ }
-+
-+ mmiowb();
-+
-+ tg3_update_trans_start(dev);
-+
-+ return NETDEV_TX_OK;
-+
-+dma_error:
-+ tg3_tx_skb_unmap(tnapi, tnapi->tx_prod, --i);
-+ tnapi->tx_buffers[tnapi->tx_prod].skb = NULL;
-+drop:
-+ dev_kfree_skb(skb);
-+drop_nofree:
-+ tp->tx_dropped++;
-+ return NETDEV_TX_OK;
-+}
-+
-+static void tg3_mac_loopback(struct tg3 *tp, bool enable)
-+{
-+ if (enable) {
-+ tp->mac_mode &= ~(MAC_MODE_HALF_DUPLEX |
-+ MAC_MODE_PORT_MODE_MASK);
-+
-+ tp->mac_mode |= MAC_MODE_PORT_INT_LPBACK;
-+
-+ if (!tg3_flag(tp, 5705_PLUS))
-+ tp->mac_mode |= MAC_MODE_LINK_POLARITY;
-+
-+ if (tp->phy_flags & TG3_PHYFLG_10_100_ONLY)
-+ tp->mac_mode |= MAC_MODE_PORT_MODE_MII;
-+ else
-+ tp->mac_mode |= MAC_MODE_PORT_MODE_GMII;
-+ } else {
-+ tp->mac_mode &= ~MAC_MODE_PORT_INT_LPBACK;
-+
-+ if (tg3_flag(tp, 5705_PLUS) ||
-+ (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5700)
-+ tp->mac_mode &= ~MAC_MODE_LINK_POLARITY;
-+ }
-+
-+ tw32(MAC_MODE, tp->mac_mode);
-+ udelay(40);
-+}
-+
-+static int tg3_phy_lpbk_set(struct tg3 *tp, u32 speed, bool extlpbk)
-+{
-+ u32 val, bmcr, mac_mode, ptest = 0;
-+
-+ tg3_phy_toggle_apd(tp, false);
-+ tg3_phy_toggle_automdix(tp, false);
-+
-+ if (extlpbk && tg3_phy_set_extloopbk(tp))
-+ return -EIO;
-+
-+ bmcr = BMCR_FULLDPLX;
-+ switch (speed) {
-+ case SPEED_10:
-+ break;
-+ case SPEED_100:
-+ bmcr |= BMCR_SPEED100;
-+ break;
-+ case SPEED_1000:
-+ default:
-+ if (tp->phy_flags & TG3_PHYFLG_IS_FET) {
-+ speed = SPEED_100;
-+ bmcr |= BMCR_SPEED100;
-+ } else {
-+ speed = SPEED_1000;
-+ bmcr |= BMCR_SPEED1000;
-+ }
-+ }
-+
-+ if (extlpbk) {
-+ if (!(tp->phy_flags & TG3_PHYFLG_IS_FET)) {
-+ tg3_readphy(tp, MII_CTRL1000, &val);
-+ val |= CTL1000_AS_MASTER |
-+ CTL1000_ENABLE_MASTER;
-+ tg3_writephy(tp, MII_CTRL1000, val);
-+ } else {
-+ ptest = MII_TG3_FET_PTEST_TRIM_SEL |
-+ MII_TG3_FET_PTEST_TRIM_2;
-+ tg3_writephy(tp, MII_TG3_FET_PTEST, ptest);
-+ }
-+ } else
-+ bmcr |= BMCR_LOOPBACK;
-+
-+ tg3_writephy(tp, MII_BMCR, bmcr);
-+
-+ /* The write needs to be flushed for the FETs */
-+ if (tp->phy_flags & TG3_PHYFLG_IS_FET)
-+ tg3_readphy(tp, MII_BMCR, &bmcr);
-+
-+ udelay(40);
-+
-+ if ((tp->phy_flags & TG3_PHYFLG_IS_FET) &&
-+ tg3_asic_rev(tp) == ASIC_REV_5785) {
-+ tg3_writephy(tp, MII_TG3_FET_PTEST, ptest |
-+ MII_TG3_FET_PTEST_FRC_TX_LINK |
-+ MII_TG3_FET_PTEST_FRC_TX_LOCK);
-+
-+ /* The write needs to be flushed for the AC131 */
-+ tg3_readphy(tp, MII_TG3_FET_PTEST, &val);
-+ }
-+
-+ /* Reset to prevent losing 1st rx packet intermittently */
-+ if ((tp->phy_flags & TG3_PHYFLG_MII_SERDES) &&
-+ tg3_flag(tp, 5780_CLASS)) {
-+ tw32_f(MAC_RX_MODE, RX_MODE_RESET);
-+ udelay(10);
-+ tw32_f(MAC_RX_MODE, tp->rx_mode);
-+ }
-+
-+ mac_mode = tp->mac_mode &
-+ ~(MAC_MODE_PORT_MODE_MASK | MAC_MODE_HALF_DUPLEX);
-+ if (speed == SPEED_1000)
-+ mac_mode |= MAC_MODE_PORT_MODE_GMII;
-+ else
-+ mac_mode |= MAC_MODE_PORT_MODE_MII;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5700) {
-+ u32 masked_phy_id = tp->phy_id & TG3_PHY_ID_MASK;
-+
-+ if (masked_phy_id == TG3_PHY_ID_BCM5401)
-+ mac_mode &= ~MAC_MODE_LINK_POLARITY;
-+ else if (masked_phy_id == TG3_PHY_ID_BCM5411)
-+ mac_mode |= MAC_MODE_LINK_POLARITY;
-+
-+ tg3_writephy(tp, MII_TG3_EXT_CTRL,
-+ MII_TG3_EXT_CTRL_LNK3_LED_MODE);
-+ }
-+
-+ tw32(MAC_MODE, mac_mode);
-+ udelay(40);
-+
-+ return 0;
-+}
-+
-+#ifdef BCM_HAS_FIX_FEATURES
-+static void tg3_set_loopback(struct net_device *dev, netdev_features_t features)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (features & NETIF_F_LOOPBACK) {
-+ if (tp->mac_mode & MAC_MODE_PORT_INT_LPBACK)
-+ return;
-+
-+ spin_lock_bh(&tp->lock);
-+ tg3_mac_loopback(tp, true);
-+ netif_carrier_on(tp->dev);
-+ spin_unlock_bh(&tp->lock);
-+ netdev_info(dev, "Internal MAC loopback mode enabled.\n");
-+ } else {
-+ if (!(tp->mac_mode & MAC_MODE_PORT_INT_LPBACK))
-+ return;
-+
-+ spin_lock_bh(&tp->lock);
-+ tg3_mac_loopback(tp, false);
-+ /* Force link status check */
-+ tg3_setup_phy(tp, true);
-+ spin_unlock_bh(&tp->lock);
-+ netdev_info(dev, "Internal MAC loopback mode disabled.\n");
-+ }
-+}
-+
-+#if defined(GET_NETDEV_OP_EXT)
-+static u32 tg3_fix_features(struct net_device *dev, u32 features)
-+#else
-+static netdev_features_t tg3_fix_features(struct net_device *dev,
-+ netdev_features_t features)
-+#endif
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (dev->mtu > ETH_DATA_LEN && tg3_flag(tp, 5780_CLASS))
-+ features &= ~NETIF_F_ALL_TSO;
-+
-+ return features;
-+}
-+
-+#if defined(GET_NETDEV_OP_EXT)
-+static int tg3_set_features(struct net_device *dev, u32 features)
-+#else
-+static int tg3_set_features(struct net_device *dev, netdev_features_t features)
-+#endif
-+{
-+ netdev_features_t changed = dev->features ^ features;
-+
-+ if ((changed & NETIF_F_LOOPBACK) && netif_running(dev))
-+ tg3_set_loopback(dev, features);
-+
-+ return 0;
-+}
-+#endif /* BCM_HAS_FIX_FEATURES */
-+
-+static void tg3_rx_prodring_free(struct tg3 *tp,
-+ struct tg3_rx_prodring_set *tpr)
-+{
-+ int i;
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ if (tg3_flag(tp, ENABLE_RSS))
-+#endif
-+ if (tpr != &tp->napi[0].prodring) {
-+ for (i = tpr->rx_std_cons_idx; i != tpr->rx_std_prod_idx;
-+ i = (i + 1) & tp->rx_std_ring_mask)
-+ tg3_rx_data_free(tp, &tpr->rx_std_buffers[i],
-+ tp->rx_pkt_map_sz);
-+
-+ if (tg3_flag(tp, JUMBO_CAPABLE)) {
-+ for (i = tpr->rx_jmb_cons_idx;
-+ i != tpr->rx_jmb_prod_idx;
-+ i = (i + 1) & tp->rx_jmb_ring_mask) {
-+ tg3_rx_data_free(tp, &tpr->rx_jmb_buffers[i],
-+ TG3_RX_JMB_MAP_SZ);
-+ }
-+ }
-+
-+ return;
-+ }
-+
-+ for (i = 0; i <= tp->rx_std_ring_mask; i++)
-+ tg3_rx_data_free(tp, &tpr->rx_std_buffers[i],
-+ tp->rx_pkt_map_sz);
-+
-+ if (tg3_flag(tp, JUMBO_CAPABLE) && !tg3_flag(tp, 5780_CLASS)) {
-+ for (i = 0; i <= tp->rx_jmb_ring_mask; i++)
-+ tg3_rx_data_free(tp, &tpr->rx_jmb_buffers[i],
-+ TG3_RX_JMB_MAP_SZ);
-+ }
-+}
-+
-+/* Initialize rx rings for packet processing.
-+ *
-+ * The chip has been shut down and the driver detached from
-+ * the networking, so no interrupts or new tx packets will
-+ * end up in the driver. tp->{tx,}lock are held and thus
-+ * we may not sleep.
-+ */
-+static int tg3_rx_prodring_alloc(struct tg3 *tp,
-+ struct tg3_rx_prodring_set *tpr)
-+{
-+ u32 i, rx_pkt_dma_sz;
-+
-+ tpr->rx_std_cons_idx = 0;
-+ tpr->rx_std_prod_idx = 0;
-+ tpr->rx_jmb_cons_idx = 0;
-+ tpr->rx_jmb_prod_idx = 0;
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ if (tg3_flag(tp, ENABLE_RSS))
-+#endif
-+ if (tpr != &tp->napi[0].prodring) {
-+ memset(&tpr->rx_std_buffers[0], 0,
-+ TG3_RX_STD_BUFF_RING_SIZE(tp));
-+ if (tpr->rx_jmb_buffers)
-+ memset(&tpr->rx_jmb_buffers[0], 0,
-+ TG3_RX_JMB_BUFF_RING_SIZE(tp));
-+ goto done;
-+ }
-+
-+ /* Zero out all descriptors. */
-+ memset(tpr->rx_std, 0, TG3_RX_STD_RING_BYTES(tp));
-+
-+ rx_pkt_dma_sz = TG3_RX_STD_DMA_SZ;
-+ if (tg3_flag(tp, 5780_CLASS) &&
-+ tp->dev->mtu > ETH_DATA_LEN)
-+ rx_pkt_dma_sz = TG3_RX_JMB_DMA_SZ;
-+ tp->rx_pkt_map_sz = TG3_RX_DMA_TO_MAP_SZ(rx_pkt_dma_sz);
-+
-+ /* Initialize invariants of the rings, we only set this
-+ * stuff once. This works because the card does not
-+ * write into the rx buffer posting rings.
-+ */
-+ for (i = 0; i <= tp->rx_std_ring_mask; i++) {
-+ struct tg3_rx_buffer_desc *rxd;
-+
-+ rxd = &tpr->rx_std[i];
-+ rxd->idx_len = rx_pkt_dma_sz << RXD_LEN_SHIFT;
-+ rxd->type_flags = (RXD_FLAG_END << RXD_FLAGS_SHIFT);
-+ rxd->opaque = (RXD_OPAQUE_RING_STD |
-+ (i << RXD_OPAQUE_INDEX_SHIFT));
-+ }
-+
-+ /* Now allocate fresh SKBs for each rx ring. */
-+ for (i = 0; i < tp->rx_pending; i++) {
-+ unsigned int frag_size;
-+
-+ if (tg3_alloc_rx_data(tp, tpr, RXD_OPAQUE_RING_STD, i,
-+ &frag_size) < 0) {
-+ netdev_warn(tp->dev,
-+ "Using a smaller RX standard ring. Only "
-+ "%d out of %d buffers were allocated "
-+ "successfully\n", i, tp->rx_pending);
-+ if (i == 0)
-+ goto initfail;
-+ tp->rx_pending = i;
-+ break;
-+ }
-+ }
-+
-+ if (!tg3_flag(tp, JUMBO_CAPABLE) || tg3_flag(tp, 5780_CLASS))
-+ goto done;
-+
-+ memset(tpr->rx_jmb, 0, TG3_RX_JMB_RING_BYTES(tp));
-+
-+ if (!tg3_flag(tp, JUMBO_RING_ENABLE))
-+ goto done;
-+
-+ for (i = 0; i <= tp->rx_jmb_ring_mask; i++) {
-+ struct tg3_rx_buffer_desc *rxd;
-+
-+ rxd = &tpr->rx_jmb[i].std;
-+ rxd->idx_len = TG3_RX_JMB_DMA_SZ << RXD_LEN_SHIFT;
-+ rxd->type_flags = (RXD_FLAG_END << RXD_FLAGS_SHIFT) |
-+ RXD_FLAG_JUMBO;
-+ rxd->opaque = (RXD_OPAQUE_RING_JUMBO |
-+ (i << RXD_OPAQUE_INDEX_SHIFT));
-+ }
-+
-+ for (i = 0; i < tp->rx_jumbo_pending; i++) {
-+ unsigned int frag_size;
-+
-+ if (tg3_alloc_rx_data(tp, tpr, RXD_OPAQUE_RING_JUMBO, i,
-+ &frag_size) < 0) {
-+ netdev_warn(tp->dev,
-+ "Using a smaller RX jumbo ring. Only %d "
-+ "out of %d buffers were allocated "
-+ "successfully\n", i, tp->rx_jumbo_pending);
-+ if (i == 0)
-+ goto initfail;
-+ tp->rx_jumbo_pending = i;
-+ break;
-+ }
-+ }
-+
-+done:
-+ return 0;
-+
-+initfail:
-+ tg3_rx_prodring_free(tp, tpr);
-+ return -ENOMEM;
-+}
-+
-+static void tg3_rx_prodring_fini(struct tg3 *tp,
-+ struct tg3_rx_prodring_set *tpr)
-+{
-+ kfree(tpr->rx_std_buffers);
-+ tpr->rx_std_buffers = NULL;
-+ kfree(tpr->rx_jmb_buffers);
-+ tpr->rx_jmb_buffers = NULL;
-+ if (tpr->rx_std) {
-+ dma_free_coherent(&tp->pdev->dev, TG3_RX_STD_RING_BYTES(tp),
-+ tpr->rx_std, tpr->rx_std_mapping);
-+ tpr->rx_std = NULL;
-+ }
-+ if (tpr->rx_jmb) {
-+ dma_free_coherent(&tp->pdev->dev, TG3_RX_JMB_RING_BYTES(tp),
-+ tpr->rx_jmb, tpr->rx_jmb_mapping);
-+ tpr->rx_jmb = NULL;
-+ }
-+}
-+
-+static int tg3_rx_prodring_init(struct tg3 *tp,
-+ struct tg3_rx_prodring_set *tpr)
-+{
-+ tpr->rx_std_buffers = kzalloc(TG3_RX_STD_BUFF_RING_SIZE(tp),
-+ GFP_KERNEL);
-+ if (!tpr->rx_std_buffers)
-+ return -ENOMEM;
-+
-+ tpr->rx_std = dma_alloc_coherent(&tp->pdev->dev,
-+ TG3_RX_STD_RING_BYTES(tp),
-+ &tpr->rx_std_mapping,
-+ GFP_KERNEL);
-+ if (!tpr->rx_std)
-+ goto err_out;
-+
-+ if (tg3_flag(tp, JUMBO_CAPABLE) && !tg3_flag(tp, 5780_CLASS)) {
-+ tpr->rx_jmb_buffers = kzalloc(TG3_RX_JMB_BUFF_RING_SIZE(tp),
-+ GFP_KERNEL);
-+ if (!tpr->rx_jmb_buffers)
-+ goto err_out;
-+
-+ tpr->rx_jmb = dma_alloc_coherent(&tp->pdev->dev,
-+ TG3_RX_JMB_RING_BYTES(tp),
-+ &tpr->rx_jmb_mapping,
-+ GFP_KERNEL);
-+ if (!tpr->rx_jmb)
-+ goto err_out;
-+ }
-+
-+ return 0;
-+
-+err_out:
-+ tg3_rx_prodring_fini(tp, tpr);
-+ return -ENOMEM;
-+}
-+
-+/* Free up pending packets in all rx/tx rings.
-+ *
-+ * The chip has been shut down and the driver detached from
-+ * the networking, so no interrupts or new tx packets will
-+ * end up in the driver. tp->{tx,}lock is not held and we are not
-+ * in an interrupt context and thus may sleep.
-+ */
-+static void tg3_free_rings(struct tg3 *tp)
-+{
-+ int i, j;
-+
-+ for (j = 0; j < tp->irq_cnt; j++) {
-+ struct tg3_napi *tnapi = &tp->napi[j];
-+
-+ tg3_rx_prodring_free(tp, &tnapi->prodring);
-+
-+ if (!tnapi->tx_buffers)
-+ continue;
-+
-+ for (i = 0; i < TG3_TX_RING_SIZE; i++) {
-+ struct sk_buff *skb = tnapi->tx_buffers[i].skb;
-+
-+ if (!skb)
-+ continue;
-+
-+ tg3_tx_skb_unmap(tnapi, i,
-+ skb_shinfo(skb)->nr_frags - 1);
-+
-+ dev_kfree_skb_any(skb);
-+ }
-+ netdev_tx_reset_queue(netdev_get_tx_queue(tp->dev, j));
-+ }
-+}
-+
-+/* Initialize tx/rx rings for packet processing.
-+ *
-+ * The chip has been shut down and the driver detached from
-+ * the networking, so no interrupts or new tx packets will
-+ * end up in the driver. tp->{tx,}lock are held and thus
-+ * we may not sleep.
-+ */
-+static int tg3_init_rings(struct tg3 *tp)
-+{
-+ int i;
-+
-+ /* Free up all the SKBs. */
-+ tg3_free_rings(tp);
-+
-+ for (i = 0; i < tp->irq_cnt; i++) {
-+ struct tg3_napi *tnapi = &tp->napi[i];
-+
-+ tnapi->last_tag = 0;
-+ tnapi->last_irq_tag = 0;
-+ tnapi->hw_status->status = 0;
-+ tnapi->hw_status->status_tag = 0;
-+ memset(tnapi->hw_status, 0, TG3_HW_STATUS_SIZE);
-+
-+ tnapi->tx_prod = 0;
-+ tnapi->tx_cons = 0;
-+ if (tnapi->tx_ring)
-+ memset(tnapi->tx_ring, 0, TG3_TX_RING_BYTES);
-+
-+ tnapi->rx_rcb_ptr = 0;
-+ if (tnapi->rx_rcb)
-+ memset(tnapi->rx_rcb, 0, TG3_RX_RCB_RING_BYTES(tp));
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ if (!i || (i && tg3_flag(tp, ENABLE_RSS)))
-+#endif
-+ if (tg3_rx_prodring_alloc(tp, &tnapi->prodring)) {
-+ tg3_free_rings(tp);
-+ return -ENOMEM;
-+ }
-+ }
-+
-+ return 0;
-+}
-+
-+static void tg3_mem_tx_release(struct tg3 *tp)
-+{
-+ int i;
-+
-+ for (i = 0; i < tp->irq_max; i++) {
-+ struct tg3_napi *tnapi = &tp->napi[i];
-+
-+ if (tnapi->tx_ring) {
-+ dma_free_coherent(&tp->pdev->dev, TG3_TX_RING_BYTES,
-+ tnapi->tx_ring, tnapi->tx_desc_mapping);
-+ tnapi->tx_ring = NULL;
-+ }
-+
-+ kfree(tnapi->tx_buffers);
-+ tnapi->tx_buffers = NULL;
-+ }
-+}
-+
-+static int tg3_mem_tx_acquire(struct tg3 *tp)
-+{
-+ int i;
-+ struct tg3_napi *tnapi = &tp->napi[0];
-+
-+ /* If multivector TSS is enabled, vector 0 does not handle
-+ * tx interrupts. Don't allocate any resources for it.
-+ */
-+ if (tg3_flag(tp, ENABLE_TSS))
-+ tnapi++;
-+
-+ for (i = 0; i < tp->txq_cnt; i++, tnapi++) {
-+ tnapi->tx_buffers = kzalloc(sizeof(struct tg3_tx_ring_info) *
-+ TG3_TX_RING_SIZE, GFP_KERNEL);
-+ if (!tnapi->tx_buffers)
-+ goto err_out;
-+
-+ tnapi->tx_ring = dma_alloc_coherent(&tp->pdev->dev,
-+ TG3_TX_RING_BYTES,
-+ &tnapi->tx_desc_mapping,
-+ GFP_KERNEL);
-+ if (!tnapi->tx_ring)
-+ goto err_out;
-+ }
-+
-+ return 0;
-+
-+err_out:
-+ tg3_mem_tx_release(tp);
-+ return -ENOMEM;
-+}
-+
-+static void tg3_mem_rx_release(struct tg3 *tp)
-+{
-+ int i;
-+
-+ for (i = 0; i < tp->irq_max; i++) {
-+ struct tg3_napi *tnapi = &tp->napi[i];
-+
-+ tg3_rx_prodring_fini(tp, &tnapi->prodring);
-+
-+ if (!tnapi->rx_rcb)
-+ continue;
-+
-+ dma_free_coherent(&tp->pdev->dev,
-+ TG3_RX_RCB_RING_BYTES(tp),
-+ tnapi->rx_rcb,
-+ tnapi->rx_rcb_mapping);
-+ tnapi->rx_rcb = NULL;
-+ }
-+}
-+
-+static int tg3_mem_rx_acquire(struct tg3 *tp)
-+{
-+ unsigned int i, limit;
-+
-+ limit = tp->rxq_cnt;
-+
-+ /* If RSS is enabled, we need a (dummy) producer ring
-+ * set on vector zero. This is the true hw prodring.
-+ */
-+ if (tg3_flag(tp, ENABLE_RSS))
-+ limit++;
-+
-+ for (i = 0; i < limit; i++) {
-+ struct tg3_napi *tnapi = &tp->napi[i];
-+
-+ if (tg3_rx_prodring_init(tp, &tnapi->prodring))
-+ goto err_out;
-+
-+ if (tg3_flag(tp, ENABLE_IOV))
-+ tnapi->srcprodring = &tnapi->prodring;
-+ else
-+ tnapi->srcprodring = &tp->napi[0].prodring;
-+
-+ /* If multivector RSS is enabled, vector 0
-+ * does not handle rx or tx interrupts.
-+ * Don't allocate any resources for it.
-+ */
-+ if (!i && tg3_flag(tp, ENABLE_RSS))
-+ continue;
-+
-+ tnapi->rx_rcb = dma_zalloc_coherent(&tp->pdev->dev,
-+ TG3_RX_RCB_RING_BYTES(tp),
-+ &tnapi->rx_rcb_mapping,
-+ GFP_KERNEL);
-+ if (!tnapi->rx_rcb)
-+ goto err_out;
-+ }
-+
-+ return 0;
-+
-+err_out:
-+ tg3_mem_rx_release(tp);
-+ return -ENOMEM;
-+}
-+
-+/*
-+ * Must not be invoked with interrupt sources disabled and
-+ * the hardware shutdown down.
-+ */
-+static void tg3_free_consistent(struct tg3 *tp)
-+{
-+ int i;
-+
-+ for (i = 0; i < tp->irq_cnt; i++) {
-+ struct tg3_napi *tnapi = &tp->napi[i];
-+
-+ if (tnapi->hw_status) {
-+ dma_free_coherent(&tp->pdev->dev, TG3_HW_STATUS_SIZE,
-+ tnapi->hw_status,
-+ tnapi->status_mapping);
-+ tnapi->hw_status = NULL;
-+ }
-+ }
-+
-+ tg3_mem_rx_release(tp);
-+ tg3_mem_tx_release(tp);
-+
-+ if (tp->hw_stats) {
-+ dma_free_coherent(&tp->pdev->dev, sizeof(struct tg3_hw_stats),
-+ tp->hw_stats, tp->stats_mapping);
-+ tp->hw_stats = NULL;
-+ }
-+}
-+
-+/*
-+ * Must not be invoked with interrupt sources disabled and
-+ * the hardware shutdown down. Can sleep.
-+ */
-+static int tg3_alloc_consistent(struct tg3 *tp)
-+{
-+ int i;
-+
-+ tp->hw_stats = dma_zalloc_coherent(&tp->pdev->dev,
-+ sizeof(struct tg3_hw_stats),
-+ &tp->stats_mapping, GFP_KERNEL);
-+ if (!tp->hw_stats)
-+ goto err_out;
-+
-+ for (i = 0; i < tp->irq_cnt; i++) {
-+ struct tg3_napi *tnapi = &tp->napi[i];
-+ struct tg3_hw_status *sblk;
-+
-+ tnapi->hw_status = dma_zalloc_coherent(&tp->pdev->dev,
-+ TG3_HW_STATUS_SIZE,
-+ &tnapi->status_mapping,
-+ GFP_KERNEL);
-+ if (!tnapi->hw_status)
-+ goto err_out;
-+
-+ sblk = tnapi->hw_status;
-+
-+ if (tg3_flag(tp, ENABLE_RSS)) {
-+ volatile u16 *prodptr = NULL;
-+
-+ /* When RSS is enabled, the status block format changes
-+ * slightly. The "rx_jumbo_consumer", "reserved",
-+ * and "rx_mini_consumer" members get mapped to the
-+ * other three rx return ring producer indexes.
-+ */
-+ switch (i) {
-+ case 1:
-+ prodptr = &sblk->idx[0].rx_producer;
-+ break;
-+ case 2:
-+ prodptr = &sblk->rx_jumbo_consumer;
-+ break;
-+ case 3:
-+ prodptr = &sblk->reserved;
-+ break;
-+ case 4:
-+ prodptr = &sblk->rx_mini_consumer;
-+ break;
-+ }
-+ tnapi->rx_rcb_prod_idx = prodptr;
-+ } else
-+ tnapi->rx_rcb_prod_idx = &sblk->idx[0].rx_producer;
-+ }
-+
-+ if (tg3_mem_tx_acquire(tp) || tg3_mem_rx_acquire(tp))
-+ goto err_out;
-+
-+ return 0;
-+
-+err_out:
-+ tg3_free_consistent(tp);
-+ return -ENOMEM;
-+}
-+
-+#define MAX_WAIT_CNT 1000
-+
-+/* To stop a block, clear the enable bit and poll till it
-+ * clears. tp->lock is held.
-+ */
-+static int tg3_stop_block(struct tg3 *tp, unsigned long ofs, u32 enable_bit, bool silent)
-+{
-+ unsigned int i;
-+ u32 val;
-+
-+ if (tg3_flag(tp, 5705_PLUS)) {
-+ switch (ofs) {
-+ case RCVLSC_MODE:
-+ case DMAC_MODE:
-+ case MBFREE_MODE:
-+ case BUFMGR_MODE:
-+ case MEMARB_MODE:
-+ /* We can't enable/disable these bits of the
-+ * 5705/5750, just say success.
-+ */
-+ return 0;
-+
-+ default:
-+ break;
-+ }
-+ }
-+
-+ val = tr32(ofs);
-+ val &= ~enable_bit;
-+ tw32_f(ofs, val);
-+
-+ for (i = 0; i < MAX_WAIT_CNT; i++) {
-+ if (pci_channel_offline(tp->pdev)) {
-+ dev_err(&tp->pdev->dev,
-+ "tg3_stop_block device offline, "
-+ "ofs=%lx enable_bit=%x\n",
-+ ofs, enable_bit);
-+ return -ENODEV;
-+ }
-+
-+ udelay(100);
-+ val = tr32(ofs);
-+ if ((val & enable_bit) == 0)
-+ break;
-+ }
-+
-+ if (i == MAX_WAIT_CNT && !silent) {
-+ dev_err(&tp->pdev->dev,
-+ "tg3_stop_block timed out, ofs=%lx enable_bit=%x\n",
-+ ofs, enable_bit);
-+ return -ENODEV;
-+ }
-+
-+ return 0;
-+}
-+
-+/* tp->lock is held. */
-+static int tg3_abort_hw(struct tg3 *tp, bool silent)
-+{
-+ int i, err;
-+
-+ tg3_disable_ints(tp);
-+
-+ if (pci_channel_offline(tp->pdev)) {
-+ tp->rx_mode &= ~(RX_MODE_ENABLE | TX_MODE_ENABLE);
-+ tp->mac_mode &= ~MAC_MODE_TDE_ENABLE;
-+ err = -ENODEV;
-+ goto err_no_dev;
-+ }
-+
-+ tp->rx_mode &= ~RX_MODE_ENABLE;
-+ tw32_f(MAC_RX_MODE, tp->rx_mode);
-+ udelay(10);
-+
-+ err = tg3_stop_block(tp, RCVBDI_MODE, RCVBDI_MODE_ENABLE, silent);
-+ err |= tg3_stop_block(tp, RCVLPC_MODE, RCVLPC_MODE_ENABLE, silent);
-+ err |= tg3_stop_block(tp, RCVLSC_MODE, RCVLSC_MODE_ENABLE, silent);
-+ err |= tg3_stop_block(tp, RCVDBDI_MODE, RCVDBDI_MODE_ENABLE, silent);
-+ err |= tg3_stop_block(tp, RCVDCC_MODE, RCVDCC_MODE_ENABLE, silent);
-+ err |= tg3_stop_block(tp, RCVCC_MODE, RCVCC_MODE_ENABLE, silent);
-+
-+ err |= tg3_stop_block(tp, SNDBDS_MODE, SNDBDS_MODE_ENABLE, silent);
-+ err |= tg3_stop_block(tp, SNDBDI_MODE, SNDBDI_MODE_ENABLE, silent);
-+ err |= tg3_stop_block(tp, SNDDATAI_MODE, SNDDATAI_MODE_ENABLE, silent);
-+ err |= tg3_stop_block(tp, RDMAC_MODE, RDMAC_MODE_ENABLE, silent);
-+ err |= tg3_stop_block(tp, SNDDATAC_MODE, SNDDATAC_MODE_ENABLE, silent);
-+ err |= tg3_stop_block(tp, DMAC_MODE, DMAC_MODE_ENABLE, silent);
-+ err |= tg3_stop_block(tp, SNDBDC_MODE, SNDBDC_MODE_ENABLE, silent);
-+
-+ tp->mac_mode &= ~MAC_MODE_TDE_ENABLE;
-+ tw32_f(MAC_MODE, tp->mac_mode);
-+ udelay(40);
-+
-+ tp->tx_mode &= ~TX_MODE_ENABLE;
-+ tw32_f(MAC_TX_MODE, tp->tx_mode);
-+
-+ for (i = 0; i < MAX_WAIT_CNT; i++) {
-+ udelay(100);
-+ if (!(tr32(MAC_TX_MODE) & TX_MODE_ENABLE))
-+ break;
-+ }
-+ if (i >= MAX_WAIT_CNT) {
-+ dev_err(&tp->pdev->dev,
-+ "%s timed out, TX_MODE_ENABLE will not clear "
-+ "MAC_TX_MODE=%08x\n", __func__, tr32(MAC_TX_MODE));
-+ err |= -ENODEV;
-+ }
-+
-+ err |= tg3_stop_block(tp, HOSTCC_MODE, HOSTCC_MODE_ENABLE, silent);
-+ err |= tg3_stop_block(tp, WDMAC_MODE, WDMAC_MODE_ENABLE, silent);
-+ err |= tg3_stop_block(tp, MBFREE_MODE, MBFREE_MODE_ENABLE, silent);
-+
-+ tw32(FTQ_RESET, 0xffffffff);
-+ tw32(FTQ_RESET, 0x00000000);
-+
-+ err |= tg3_stop_block(tp, BUFMGR_MODE, BUFMGR_MODE_ENABLE, silent);
-+ err |= tg3_stop_block(tp, MEMARB_MODE, MEMARB_MODE_ENABLE, silent);
-+
-+err_no_dev:
-+ for (i = 0; i < tp->irq_cnt; i++) {
-+ struct tg3_napi *tnapi = &tp->napi[i];
-+ if (tnapi->hw_status)
-+ memset(tnapi->hw_status, 0, TG3_HW_STATUS_SIZE);
-+ }
-+
-+ return err;
-+}
-+
-+/* Save PCI command register before chip reset */
-+static void tg3_save_pci_state(struct tg3 *tp)
-+{
-+ pci_read_config_word(tp->pdev, PCI_COMMAND, &tp->pci_cmd);
-+}
-+
-+/* Restore PCI state after chip reset */
-+static void tg3_restore_pci_state(struct tg3 *tp)
-+{
-+ u32 val;
-+
-+ /* Re-enable indirect register accesses. */
-+ pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL,
-+ tp->misc_host_ctrl);
-+
-+ /* Set MAX PCI retry to zero. */
-+ val = (PCISTATE_ROM_ENABLE | PCISTATE_ROM_RETRY_ENABLE);
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5704_A0 &&
-+ tg3_flag(tp, PCIX_MODE))
-+ val |= PCISTATE_RETRY_SAME_DMA;
-+ /* Allow reads and writes to the APE register and memory space. */
-+ if (tg3_flag(tp, ENABLE_APE))
-+ val |= PCISTATE_ALLOW_APE_CTLSPC_WR |
-+ PCISTATE_ALLOW_APE_SHMEM_WR |
-+ PCISTATE_ALLOW_APE_PSPACE_WR;
-+ pci_write_config_dword(tp->pdev, TG3PCI_PCISTATE, val);
-+
-+ pci_write_config_word(tp->pdev, PCI_COMMAND, tp->pci_cmd);
-+
-+ if (!tg3_flag(tp, PCI_EXPRESS)) {
-+ pci_write_config_byte(tp->pdev, PCI_CACHE_LINE_SIZE,
-+ tp->pci_cacheline_sz);
-+ pci_write_config_byte(tp->pdev, PCI_LATENCY_TIMER,
-+ tp->pci_lat_timer);
-+ }
-+
-+ /* Make sure PCI-X relaxed ordering bit is clear. */
-+ if (tg3_flag(tp, PCIX_MODE)) {
-+ u16 pcix_cmd;
-+
-+ pci_read_config_word(tp->pdev, tp->pcix_cap + PCI_X_CMD,
-+ &pcix_cmd);
-+ pcix_cmd &= ~PCI_X_CMD_ERO;
-+ pci_write_config_word(tp->pdev, tp->pcix_cap + PCI_X_CMD,
-+ pcix_cmd);
-+ }
-+
-+ if (tg3_flag(tp, 5780_CLASS)) {
-+
-+ /* Chip reset on 5780 will reset MSI enable bit,
-+ * so need to restore it.
-+ */
-+ if (tg3_flag(tp, USING_MSI)) {
-+ u16 ctrl;
-+
-+ pci_read_config_word(tp->pdev,
-+ tp->msi_cap + PCI_MSI_FLAGS,
-+ &ctrl);
-+ pci_write_config_word(tp->pdev,
-+ tp->msi_cap + PCI_MSI_FLAGS,
-+ ctrl | PCI_MSI_FLAGS_ENABLE);
-+ val = tr32(MSGINT_MODE);
-+ tw32(MSGINT_MODE, val | MSGINT_MODE_ENABLE);
-+ }
-+ }
-+
-+ tg3_disable_ints(tp);
-+}
-+
-+static void tg3_override_clk(struct tg3 *tp)
-+{
-+ u32 val;
-+
-+ switch (tg3_asic_rev(tp)) {
-+ case ASIC_REV_5717:
-+ val = tr32(TG3_CPMU_CLCK_ORIDE_ENABLE);
-+ tw32(TG3_CPMU_CLCK_ORIDE_ENABLE, val |
-+ TG3_CPMU_MAC_ORIDE_ENABLE);
-+ break;
-+
-+ case ASIC_REV_5719:
-+ case ASIC_REV_5720:
-+ tw32(TG3_CPMU_CLCK_ORIDE, CPMU_CLCK_ORIDE_MAC_ORIDE_EN);
-+ break;
-+
-+ default:
-+ return;
-+ }
-+}
-+
-+static void tg3_restore_clk(struct tg3 *tp)
-+{
-+ u32 val;
-+
-+ switch (tg3_asic_rev(tp)) {
-+ case ASIC_REV_5717:
-+ val = tr32(TG3_CPMU_CLCK_ORIDE_ENABLE);
-+ tw32(TG3_CPMU_CLCK_ORIDE_ENABLE,
-+ val & ~TG3_CPMU_MAC_ORIDE_ENABLE);
-+ break;
-+
-+ case ASIC_REV_5719:
-+ case ASIC_REV_5720:
-+ val = tr32(TG3_CPMU_CLCK_ORIDE);
-+ tw32(TG3_CPMU_CLCK_ORIDE, val & ~CPMU_CLCK_ORIDE_MAC_ORIDE_EN);
-+ break;
-+
-+ default:
-+ return;
-+ }
-+}
-+
-+/* tp->lock is held. */
-+static int tg3_chip_reset(struct tg3 *tp)
-+{
-+ u32 val;
-+ void (*write_op)(struct tg3 *, u32, u32);
-+ int i, err;
-+
-+ if (!pci_device_is_present(tp->pdev))
-+ return -ENODEV;
-+
-+ tg3_nvram_lock(tp);
-+
-+ tg3_ape_lock(tp, TG3_APE_LOCK_GRC);
-+
-+ /* No matching tg3_nvram_unlock() after this because
-+ * chip reset below will undo the nvram lock.
-+ */
-+ tp->nvram_lock_cnt = 0;
-+
-+ /* GRC_MISC_CFG core clock reset will clear the memory
-+ * enable bit in PCI register 4 and the MSI enable bit
-+ * on some chips, so we save relevant registers here.
-+ */
-+ tg3_save_pci_state(tp);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5752 ||
-+ tg3_flag(tp, 5755_PLUS))
-+ tw32(GRC_FASTBOOT_PC, 0);
-+
-+ /*
-+ * We must avoid the readl() that normally takes place.
-+ * It locks machines, causes machine checks, and other
-+ * fun things. So, temporarily disable the 5701
-+ * hardware workaround, while we do the reset.
-+ */
-+ write_op = tp->write32;
-+ if (write_op == tg3_write_flush_reg32)
-+ tp->write32 = tg3_write32;
-+
-+ /* Prevent the irq handler from reading or writing PCI registers
-+ * during chip reset when the memory enable bit in the PCI command
-+ * register may be cleared. The chip does not generate interrupt
-+ * at this time, but the irq handler may still be called due to irq
-+ * sharing or irqpoll.
-+ */
-+ tg3_flag_set(tp, CHIP_RESETTING);
-+ for (i = 0; i < tp->irq_cnt; i++) {
-+ struct tg3_napi *tnapi = &tp->napi[i];
-+ if (tnapi->hw_status) {
-+ tnapi->hw_status->status = 0;
-+ tnapi->hw_status->status_tag = 0;
-+ }
-+ tnapi->last_tag = 0;
-+ tnapi->last_irq_tag = 0;
-+ }
-+ smp_mb();
-+
-+#if (LINUX_VERSION_CODE >= 0x2051c)
-+ for (i = 0; i < tp->irq_cnt; i++)
-+ synchronize_irq(tp->napi[i].irq_vec);
-+#else
-+ synchronize_irq();
-+#endif
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_57780) {
-+ val = tr32(TG3_PCIE_LNKCTL) & ~TG3_PCIE_LNKCTL_L1_PLL_PD_EN;
-+ tw32(TG3_PCIE_LNKCTL, val | TG3_PCIE_LNKCTL_L1_PLL_PD_DIS);
-+ }
-+
-+ /* do the reset */
-+ val = GRC_MISC_CFG_CORECLK_RESET;
-+
-+ if (tg3_flag(tp, PCI_EXPRESS)) {
-+ /* Force PCIe 1.0a mode */
-+ if (tg3_asic_rev(tp) != ASIC_REV_5785 &&
-+ !tg3_flag(tp, 57765_PLUS) &&
-+ tr32(TG3_PCIE_PHY_TSTCTL) ==
-+ (TG3_PCIE_PHY_TSTCTL_PCIE10 | TG3_PCIE_PHY_TSTCTL_PSCRAM))
-+ tw32(TG3_PCIE_PHY_TSTCTL, TG3_PCIE_PHY_TSTCTL_PSCRAM);
-+
-+ if (tg3_chip_rev_id(tp) != CHIPREV_ID_5750_A0) {
-+ tw32(GRC_MISC_CFG, (1 << 29));
-+ val |= (1 << 29);
-+ }
-+ }
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5906) {
-+ tw32(VCPU_STATUS, tr32(VCPU_STATUS) | VCPU_STATUS_DRV_RESET);
-+ tw32(GRC_VCPU_EXT_CTRL,
-+ tr32(GRC_VCPU_EXT_CTRL) & ~GRC_VCPU_EXT_CTRL_HALT_CPU);
-+ }
-+
-+ /* Set the clock to the highest frequency to avoid timeouts. With link
-+ * aware mode, the clock speed could be slow and bootcode does not
-+ * complete within the expected time. Override the clock to allow the
-+ * bootcode to finish sooner and then restore it. A later bootcode will
-+ * implement this workaround at which time this change must be removed
-+ * from the driver.
-+ */
-+ tg3_override_clk(tp);
-+
-+ /* Manage gphy power for all CPMU absent PCIe devices. */
-+ if (tg3_flag(tp, 5705_PLUS) && !tg3_flag(tp, CPMU_PRESENT))
-+ val |= GRC_MISC_CFG_KEEP_GPHY_POWER;
-+
-+ tw32(GRC_MISC_CFG, val);
-+
-+ /* restore 5701 hardware bug workaround write method */
-+ tp->write32 = write_op;
-+
-+ /* Unfortunately, we have to delay before the PCI read back.
-+ * Some 575X chips even will not respond to a PCI cfg access
-+ * when the reset command is given to the chip.
-+ *
-+ * How do these hardware designers expect things to work
-+ * properly if the PCI write is posted for a long period
-+ * of time? It is always necessary to have some method by
-+ * which a register read back can occur to push the write
-+ * out which does the reset.
-+ *
-+ * For most tg3 variants the trick below was working.
-+ * Ho hum...
-+ */
-+ udelay(120);
-+
-+ /* Flush PCI posted writes. The normal MMIO registers
-+ * are inaccessible at this time so this is the only
-+ * way to make this reliably (actually, this is no longer
-+ * the case, see above). I tried to use indirect
-+ * register read/write but this upset some 5701 variants.
-+ */
-+ pci_read_config_dword(tp->pdev, PCI_COMMAND, &val);
-+
-+ udelay(120);
-+
-+ if (tg3_flag(tp, PCI_EXPRESS) && pci_is_pcie(tp->pdev)) {
-+ u16 val16;
-+
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5750_A0) {
-+ int j;
-+ u32 cfg_val;
-+
-+ /* Wait for link training to complete. */
-+ for (j = 0; j < 5000; j++)
-+ udelay(100);
-+
-+ pci_read_config_dword(tp->pdev, 0xc4, &cfg_val);
-+ pci_write_config_dword(tp->pdev, 0xc4,
-+ cfg_val | (1 << 15));
-+ }
-+
-+ /* Clear the "no snoop" and "relaxed ordering" bits. */
-+ val16 = PCI_EXP_DEVCTL_RELAX_EN | PCI_EXP_DEVCTL_NOSNOOP_EN;
-+ /*
-+ * Older PCIe devices only support the 128 byte
-+ * MPS setting. Enforce the restriction.
-+ */
-+ if (!tg3_flag(tp, CPMU_PRESENT))
-+ val16 |= PCI_EXP_DEVCTL_PAYLOAD;
-+ pcie_capability_clear_word(tp->pdev, PCI_EXP_DEVCTL, val16);
-+
-+ /* Clear error status */
-+ pcie_capability_write_word(tp->pdev, PCI_EXP_DEVSTA,
-+ PCI_EXP_DEVSTA_CED |
-+ PCI_EXP_DEVSTA_NFED |
-+ PCI_EXP_DEVSTA_FED |
-+ PCI_EXP_DEVSTA_URD);
-+ }
-+
-+ tg3_restore_pci_state(tp);
-+
-+ tg3_flag_clear(tp, CHIP_RESETTING);
-+ tg3_flag_clear(tp, ERROR_PROCESSED);
-+
-+ val = 0;
-+ if (tg3_flag(tp, 5780_CLASS))
-+ val = tr32(MEMARB_MODE);
-+ tw32(MEMARB_MODE, val | MEMARB_MODE_ENABLE);
-+
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5750_A3) {
-+ tg3_stop_fw(tp);
-+ tw32(0x5000, 0x400);
-+ }
-+
-+ if (tg3_flag(tp, IS_SSB_CORE)) {
-+ /*
-+ * BCM4785: In order to avoid repercussions from using
-+ * potentially defective internal ROM, stop the Rx RISC CPU,
-+ * which is not required.
-+ */
-+ tg3_stop_fw(tp);
-+ tg3_halt_cpu(tp, RX_CPU_BASE);
-+ }
-+
-+ err = tg3_poll_fw(tp);
-+ if (err)
-+ return err;
-+
-+ tw32(GRC_MODE, tp->grc_mode);
-+
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5705_A0) {
-+ val = tr32(0xc4);
-+
-+ tw32(0xc4, val | (1 << 15));
-+ }
-+
-+ if ((tp->nic_sram_data_cfg & NIC_SRAM_DATA_CFG_MINI_PCI) != 0 &&
-+ tg3_asic_rev(tp) == ASIC_REV_5705) {
-+ tp->pci_clock_ctrl |= CLOCK_CTRL_CLKRUN_OENABLE;
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5705_A0)
-+ tp->pci_clock_ctrl |= CLOCK_CTRL_FORCE_CLKRUN;
-+ tw32(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl);
-+ }
-+
-+ if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) {
-+ tp->mac_mode = MAC_MODE_PORT_MODE_TBI;
-+ val = tp->mac_mode;
-+ } else if (tp->phy_flags & TG3_PHYFLG_MII_SERDES) {
-+ tp->mac_mode = MAC_MODE_PORT_MODE_GMII;
-+ val = tp->mac_mode;
-+ } else
-+ val = 0;
-+
-+ tw32_f(MAC_MODE, val);
-+ udelay(40);
-+
-+ tg3_ape_unlock(tp, TG3_APE_LOCK_GRC);
-+
-+ tg3_mdio_start(tp);
-+
-+ if (tg3_flag(tp, PCI_EXPRESS) &&
-+ tg3_chip_rev_id(tp) != CHIPREV_ID_5750_A0 &&
-+ tg3_asic_rev(tp) != ASIC_REV_5785 &&
-+ !tg3_flag(tp, 57765_PLUS)) {
-+ val = tr32(0x7c00);
-+
-+ tw32(0x7c00, val | (1 << 25));
-+ }
-+
-+ tg3_restore_clk(tp);
-+
-+ /* Reprobe ASF enable state. */
-+ tg3_flag_clear(tp, ENABLE_ASF);
-+ tp->phy_flags &= ~(TG3_PHYFLG_1G_ON_VAUX_OK |
-+ TG3_PHYFLG_KEEP_LINK_ON_PWRDN);
-+
-+ tg3_flag_clear(tp, ASF_NEW_HANDSHAKE);
-+ tg3_read_mem(tp, NIC_SRAM_DATA_SIG, &val);
-+ if (val == NIC_SRAM_DATA_SIG_MAGIC) {
-+ u32 nic_cfg;
-+
-+ tg3_read_mem(tp, NIC_SRAM_DATA_CFG, &nic_cfg);
-+ if (nic_cfg & NIC_SRAM_DATA_CFG_ASF_ENABLE) {
-+ tg3_flag_set(tp, ENABLE_ASF);
-+ tp->last_event_jiffies = jiffies;
-+ if (tg3_flag(tp, 5750_PLUS))
-+ tg3_flag_set(tp, ASF_NEW_HANDSHAKE);
-+
-+ tg3_read_mem(tp, NIC_SRAM_DATA_CFG_3, &nic_cfg);
-+ if (nic_cfg & NIC_SRAM_1G_ON_VAUX_OK)
-+ tp->phy_flags |= TG3_PHYFLG_1G_ON_VAUX_OK;
-+ if (nic_cfg & NIC_SRAM_LNK_FLAP_AVOID)
-+ tp->phy_flags |= TG3_PHYFLG_KEEP_LINK_ON_PWRDN;
-+ }
-+ }
-+
-+ return 0;
-+}
-+
-+static void tg3_get_nstats(struct tg3 *, struct rtnl_link_stats64 *);
-+static void tg3_get_estats(struct tg3 *, struct tg3_ethtool_stats *);
-+static void __tg3_set_rx_mode(struct net_device *);
-+
-+/* tp->lock is held. */
-+static int tg3_halt(struct tg3 *tp, int kind, bool silent)
-+{
-+ int err;
-+
-+ tg3_stop_fw(tp);
-+
-+ tg3_write_sig_pre_reset(tp, kind);
-+
-+ tg3_abort_hw(tp, silent);
-+ err = tg3_chip_reset(tp);
-+
-+ __tg3_set_mac_addr(tp, false);
-+
-+ tg3_write_sig_legacy(tp, kind);
-+ tg3_write_sig_post_reset(tp, kind);
-+
-+ if (tp->hw_stats) {
-+ /* Save the stats across chip resets... */
-+ tg3_get_nstats(tp, &tp->net_stats_prev);
-+ tg3_get_estats(tp, &tp->estats_prev);
-+
-+ /* And make sure the next sample is new data */
-+ memset(tp->hw_stats, 0, sizeof(struct tg3_hw_stats));
-+ }
-+
-+ return err;
-+}
-+
-+static int tg3_set_mac_addr(struct net_device *dev, void *p)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ struct sockaddr *addr = p;
-+ int err = 0;
-+ bool skip_mac_1 = false;
-+
-+ if (!is_valid_ether_addr(addr->sa_data))
-+ return -EADDRNOTAVAIL;
-+
-+ memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
-+
-+ if (!netif_running(dev))
-+ return 0;
-+
-+ if (tg3_flag(tp, ENABLE_ASF)) {
-+ u32 addr0_high, addr0_low, addr1_high, addr1_low;
-+
-+ addr0_high = tr32(MAC_ADDR_0_HIGH);
-+ addr0_low = tr32(MAC_ADDR_0_LOW);
-+ addr1_high = tr32(MAC_ADDR_1_HIGH);
-+ addr1_low = tr32(MAC_ADDR_1_LOW);
-+
-+ /* Skip MAC addr 1 if ASF is using it. */
-+ if ((addr0_high != addr1_high || addr0_low != addr1_low) &&
-+ !(addr1_high == 0 && addr1_low == 0))
-+ skip_mac_1 = true;
-+ }
-+ spin_lock_bh(&tp->lock);
-+ __tg3_set_mac_addr(tp, skip_mac_1);
-+ __tg3_set_rx_mode(dev);
-+ spin_unlock_bh(&tp->lock);
-+
-+ return err;
-+}
-+
-+/* tp->lock is held. */
-+static void tg3_set_bdinfo(struct tg3 *tp, u32 bdinfo_addr,
-+ dma_addr_t mapping, u32 maxlen_flags,
-+ u32 nic_addr)
-+{
-+ tg3_write_mem(tp,
-+ (bdinfo_addr + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_HIGH),
-+ ((u64) mapping >> 32));
-+ tg3_write_mem(tp,
-+ (bdinfo_addr + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW),
-+ ((u64) mapping & 0xffffffff));
-+ tg3_write_mem(tp,
-+ (bdinfo_addr + TG3_BDINFO_MAXLEN_FLAGS),
-+ maxlen_flags);
-+
-+ if (!tg3_flag(tp, 5705_PLUS))
-+ tg3_write_mem(tp,
-+ (bdinfo_addr + TG3_BDINFO_NIC_ADDR),
-+ nic_addr);
-+}
-+
-+static void tg3_coal_tx_init(struct tg3 *tp, struct ethtool_coalesce *ec)
-+{
-+ int i = 0;
-+
-+ if (!tg3_flag(tp, ENABLE_TSS)) {
-+ tw32(HOSTCC_TXCOL_TICKS, ec->tx_coalesce_usecs);
-+ tw32(HOSTCC_TXMAX_FRAMES, ec->tx_max_coalesced_frames);
-+ tw32(HOSTCC_TXCOAL_MAXF_INT, ec->tx_max_coalesced_frames_irq);
-+ } else {
-+ tw32(HOSTCC_TXCOL_TICKS, 0);
-+ tw32(HOSTCC_TXMAX_FRAMES, 0);
-+ tw32(HOSTCC_TXCOAL_MAXF_INT, 0);
-+
-+ for (; i < tp->txq_cnt; i++) {
-+ u32 reg;
-+
-+ reg = HOSTCC_TXCOL_TICKS_VEC1 + i * 0x18;
-+ tw32(reg, ec->tx_coalesce_usecs);
-+ reg = HOSTCC_TXMAX_FRAMES_VEC1 + i * 0x18;
-+ tw32(reg, ec->tx_max_coalesced_frames);
-+ reg = HOSTCC_TXCOAL_MAXF_INT_VEC1 + i * 0x18;
-+ tw32(reg, ec->tx_max_coalesced_frames_irq);
-+ }
-+ }
-+
-+ for (; i < tp->irq_max - 1; i++) {
-+ tw32(HOSTCC_TXCOL_TICKS_VEC1 + i * 0x18, 0);
-+ tw32(HOSTCC_TXMAX_FRAMES_VEC1 + i * 0x18, 0);
-+ tw32(HOSTCC_TXCOAL_MAXF_INT_VEC1 + i * 0x18, 0);
-+ }
-+}
-+
-+static void tg3_coal_rx_init(struct tg3 *tp, struct ethtool_coalesce *ec)
-+{
-+ int i = 0;
-+ u32 limit = tp->rxq_cnt;
-+
-+ if (!tg3_flag(tp, ENABLE_RSS)) {
-+ tw32(HOSTCC_RXCOL_TICKS, ec->rx_coalesce_usecs);
-+ tw32(HOSTCC_RXMAX_FRAMES, ec->rx_max_coalesced_frames);
-+ tw32(HOSTCC_RXCOAL_MAXF_INT, ec->rx_max_coalesced_frames_irq);
-+ limit--;
-+ } else {
-+ tw32(HOSTCC_RXCOL_TICKS, 0);
-+ tw32(HOSTCC_RXMAX_FRAMES, 0);
-+ tw32(HOSTCC_RXCOAL_MAXF_INT, 0);
-+ }
-+
-+ for (; i < limit; i++) {
-+ u32 reg;
-+
-+ reg = HOSTCC_RXCOL_TICKS_VEC1 + i * 0x18;
-+ tw32(reg, ec->rx_coalesce_usecs);
-+ reg = HOSTCC_RXMAX_FRAMES_VEC1 + i * 0x18;
-+ tw32(reg, ec->rx_max_coalesced_frames);
-+ reg = HOSTCC_RXCOAL_MAXF_INT_VEC1 + i * 0x18;
-+ tw32(reg, ec->rx_max_coalesced_frames_irq);
-+ }
-+
-+ for (; i < tp->irq_max - 1; i++) {
-+ tw32(HOSTCC_RXCOL_TICKS_VEC1 + i * 0x18, 0);
-+ tw32(HOSTCC_RXMAX_FRAMES_VEC1 + i * 0x18, 0);
-+ tw32(HOSTCC_RXCOAL_MAXF_INT_VEC1 + i * 0x18, 0);
-+ }
-+}
-+
-+static void __tg3_set_coalesce(struct tg3 *tp, struct ethtool_coalesce *ec)
-+{
-+ tg3_coal_tx_init(tp, ec);
-+ tg3_coal_rx_init(tp, ec);
-+
-+ if (!tg3_flag(tp, 5705_PLUS)) {
-+ u32 val = ec->stats_block_coalesce_usecs;
-+
-+ tw32(HOSTCC_RXCOAL_TICK_INT, ec->rx_coalesce_usecs_irq);
-+ tw32(HOSTCC_TXCOAL_TICK_INT, ec->tx_coalesce_usecs_irq);
-+
-+ if (!tp->link_up)
-+ val = 0;
-+
-+ tw32(HOSTCC_STAT_COAL_TICKS, val);
-+ }
-+}
-+
-+/* tp->lock is held. */
-+static void tg3_tx_rcbs_disable(struct tg3 *tp)
-+{
-+ u32 txrcb, limit;
-+
-+ /* Disable all transmit rings but the first. */
-+ if (!tg3_flag(tp, 5705_PLUS))
-+ limit = NIC_SRAM_SEND_RCB + TG3_BDINFO_SIZE * 16;
-+ else if (tg3_flag(tp, 5717_PLUS))
-+ limit = NIC_SRAM_SEND_RCB + TG3_BDINFO_SIZE * 4;
-+ else if (tg3_flag(tp, 57765_CLASS) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762)
-+ limit = NIC_SRAM_SEND_RCB + TG3_BDINFO_SIZE * 2;
-+ else
-+ limit = NIC_SRAM_SEND_RCB + TG3_BDINFO_SIZE;
-+
-+ for (txrcb = NIC_SRAM_SEND_RCB + TG3_BDINFO_SIZE;
-+ txrcb < limit; txrcb += TG3_BDINFO_SIZE)
-+ tg3_write_mem(tp, txrcb + TG3_BDINFO_MAXLEN_FLAGS,
-+ BDINFO_FLAGS_DISABLED);
-+}
-+
-+/* tp->lock is held. */
-+static void tg3_tx_rcbs_init(struct tg3 *tp)
-+{
-+ int i = 0;
-+ u32 txrcb = NIC_SRAM_SEND_RCB;
-+
-+ if (tg3_flag(tp, ENABLE_TSS))
-+ i++;
-+
-+ for (; i < tp->irq_max; i++, txrcb += TG3_BDINFO_SIZE) {
-+ struct tg3_napi *tnapi = &tp->napi[i];
-+
-+ if (!tnapi->tx_ring)
-+ continue;
-+
-+ tg3_set_bdinfo(tp, txrcb, tnapi->tx_desc_mapping,
-+ (TG3_TX_RING_SIZE << BDINFO_FLAGS_MAXLEN_SHIFT),
-+ NIC_SRAM_TX_BUFFER_DESC);
-+ }
-+}
-+
-+/* tp->lock is held. */
-+static void tg3_rx_ret_rcbs_disable(struct tg3 *tp)
-+{
-+ u32 rxrcb, limit;
-+
-+ /* Disable all receive return rings but the first. */
-+ if (tg3_flag(tp, 5717_PLUS))
-+ limit = NIC_SRAM_RCV_RET_RCB + TG3_BDINFO_SIZE * 17;
-+ else if (!tg3_flag(tp, 5705_PLUS))
-+ limit = NIC_SRAM_RCV_RET_RCB + TG3_BDINFO_SIZE * 16;
-+ else if (tg3_asic_rev(tp) == ASIC_REV_5755 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762 ||
-+ tg3_flag(tp, 57765_CLASS))
-+ limit = NIC_SRAM_RCV_RET_RCB + TG3_BDINFO_SIZE * 4;
-+ else
-+ limit = NIC_SRAM_RCV_RET_RCB + TG3_BDINFO_SIZE;
-+
-+ for (rxrcb = NIC_SRAM_RCV_RET_RCB + TG3_BDINFO_SIZE;
-+ rxrcb < limit; rxrcb += TG3_BDINFO_SIZE)
-+ tg3_write_mem(tp, rxrcb + TG3_BDINFO_MAXLEN_FLAGS,
-+ BDINFO_FLAGS_DISABLED);
-+}
-+
-+/* tp->lock is held. */
-+static void tg3_rx_ret_rcbs_init(struct tg3 *tp)
-+{
-+ int i = 0;
-+ u32 rxrcb = NIC_SRAM_RCV_RET_RCB;
-+
-+ if (tg3_flag(tp, ENABLE_RSS))
-+ i++;
-+
-+ for (; i < tp->irq_max; i++, rxrcb += TG3_BDINFO_SIZE) {
-+ struct tg3_napi *tnapi = &tp->napi[i];
-+
-+ if (!tnapi->rx_rcb)
-+ continue;
-+
-+ tg3_set_bdinfo(tp, rxrcb, tnapi->rx_rcb_mapping,
-+ (tp->rx_ret_ring_mask + 1) <<
-+ BDINFO_FLAGS_MAXLEN_SHIFT, 0);
-+ }
-+}
-+
-+/* tp->lock is held. */
-+static void tg3_rings_reset(struct tg3 *tp)
-+{
-+ int i;
-+ u32 stblk;
-+ struct tg3_napi *tnapi = &tp->napi[0];
-+
-+ tg3_tx_rcbs_disable(tp);
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ for (i = 1; i < TG3_IRQ_MAX_VECS_IOV; i++)
-+ tg3_disable_prod_rcbs(tp, i);
-+#endif
-+
-+ tg3_rx_ret_rcbs_disable(tp);
-+
-+ /* Disable interrupts */
-+ tw32_mailbox_f(tp->napi[0].int_mbox, 1);
-+ tp->napi[0].chk_msi_cnt = 0;
-+ tp->napi[0].last_rx_cons = 0;
-+ tp->napi[0].last_tx_cons = 0;
-+
-+ /* Zero mailbox registers. */
-+ if (tg3_flag(tp, SUPPORT_MSIX)) {
-+ for (i = 1; i < tp->irq_max; i++) {
-+ tp->napi[i].tx_prod = 0;
-+ tp->napi[i].tx_cons = 0;
-+ if (tg3_flag(tp, ENABLE_TSS))
-+ tw32_mailbox(tp->napi[i].prodmbox, 0);
-+ tw32_rx_mbox(tp->napi[i].consmbox, 0);
-+ tw32_mailbox_f(tp->napi[i].int_mbox, 1);
-+ tp->napi[i].chk_msi_cnt = 0;
-+ tp->napi[i].last_rx_cons = 0;
-+ tp->napi[i].last_tx_cons = 0;
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ if (!tg3_flag(tp, ENABLE_RSS)) {
-+ struct tg3_rx_prodring_set *tpr;
-+
-+ tpr = &tp->napi[i].prodring;
-+ tw32_rx_mbox(tpr->rx_jmb_mbox, 0);
-+ tw32_rx_mbox(tpr->rx_std_mbox, 0);
-+ }
-+#endif
-+ }
-+ if (!tg3_flag(tp, ENABLE_TSS))
-+ tw32_mailbox(tp->napi[0].prodmbox, 0);
-+ } else {
-+ tp->napi[0].tx_prod = 0;
-+ tp->napi[0].tx_cons = 0;
-+ tw32_mailbox(tp->napi[0].prodmbox, 0);
-+ tw32_rx_mbox(tp->napi[0].consmbox, 0);
-+ }
-+
-+ /* Make sure the NIC-based send BD rings are disabled. */
-+ if (!tg3_flag(tp, 5705_PLUS)) {
-+ u32 mbox = MAILBOX_SNDNIC_PROD_IDX_0 + TG3_64BIT_REG_LOW;
-+ for (i = 0; i < 16; i++)
-+ tw32_tx_mbox(mbox + i * 8, 0);
-+ }
-+
-+ /* Clear status block in ram. */
-+ memset(tnapi->hw_status, 0, TG3_HW_STATUS_SIZE);
-+
-+ /* Set status block DMA address */
-+ tw32(HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_HIGH,
-+ ((u64) tnapi->status_mapping >> 32));
-+ tw32(HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_LOW,
-+ ((u64) tnapi->status_mapping & 0xffffffff));
-+
-+ stblk = HOSTCC_STATBLCK_RING1;
-+
-+ for (i = 1, tnapi++; i < tp->irq_cnt; i++, tnapi++) {
-+ u64 mapping = (u64)tnapi->status_mapping;
-+ tw32(stblk + TG3_64BIT_REG_HIGH, mapping >> 32);
-+ tw32(stblk + TG3_64BIT_REG_LOW, mapping & 0xffffffff);
-+ stblk += 8;
-+
-+ /* Clear status block in ram. */
-+ memset(tnapi->hw_status, 0, TG3_HW_STATUS_SIZE);
-+ }
-+
-+ tg3_tx_rcbs_init(tp);
-+ tg3_rx_ret_rcbs_init(tp);
-+}
-+
-+static void tg3_setup_rxbd_thresholds(struct tg3 *tp)
-+{
-+ u32 val, bdcache_maxcnt, host_rep_thresh, nic_rep_thresh;
-+
-+ if (!tg3_flag(tp, 5750_PLUS) ||
-+ tg3_flag(tp, 5780_CLASS) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5750 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5752 ||
-+ tg3_flag(tp, 57765_PLUS))
-+ bdcache_maxcnt = TG3_SRAM_RX_STD_BDCACHE_SIZE_5700;
-+ else if (tg3_asic_rev(tp) == ASIC_REV_5755 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5787)
-+ bdcache_maxcnt = TG3_SRAM_RX_STD_BDCACHE_SIZE_5755;
-+ else
-+ bdcache_maxcnt = TG3_SRAM_RX_STD_BDCACHE_SIZE_5906;
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ /* In IOV, mode, the std rx BD cache is chopped into 17 pieces. */
-+ if (tg3_flag(tp, ENABLE_IOV))
-+ bdcache_maxcnt = TG3_SRAM_RX_STD_BDCACHE_SIZE_5906;
-+#endif /* TG3_VMWARE_NETQ_ENABLE */
-+
-+ nic_rep_thresh = min(bdcache_maxcnt / 2, tp->rx_std_max_post);
-+ host_rep_thresh = max_t(u32, tp->rx_pending / 8, 1);
-+
-+ val = min(nic_rep_thresh, host_rep_thresh);
-+ tw32(RCVBDI_STD_THRESH, val);
-+
-+ if (tg3_flag(tp, 57765_PLUS))
-+ tw32(STD_REPLENISH_LWM, bdcache_maxcnt);
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ if (tg3_flag(tp, 5717_PLUS) && tg3_flag(tp, ENABLE_IOV))
-+ tw32(STD_REPLENISH_LWM, bdcache_maxcnt / 2);
-+#endif /* TG3_VMWARE_NETQ_ENABLE */
-+
-+ if (!tg3_flag(tp, JUMBO_CAPABLE) || tg3_flag(tp, 5780_CLASS))
-+ return;
-+
-+ bdcache_maxcnt = TG3_SRAM_RX_JMB_BDCACHE_SIZE_5700;
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ /* In IOV, mode, the jmb rx BD cache is chopped into 17 pieces. */
-+ if (tg3_flag(tp, ENABLE_IOV))
-+ bdcache_maxcnt = TG3_SRAM_RX_JMB_BDCACHE_SIZE_5717;
-+#endif /* TG3_VMWARE_NETQ_ENABLE */
-+
-+ host_rep_thresh = max_t(u32, tp->rx_jumbo_pending / 8, 1);
-+
-+ val = min(bdcache_maxcnt / 2, host_rep_thresh);
-+ tw32(RCVBDI_JUMBO_THRESH, val);
-+
-+ if (tg3_flag(tp, 57765_PLUS))
-+ tw32(JMB_REPLENISH_LWM, bdcache_maxcnt);
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ if (tg3_flag(tp, 5717_PLUS) && tg3_flag(tp, ENABLE_IOV))
-+ tw32(JMB_REPLENISH_LWM, bdcache_maxcnt / 2);
-+#endif /* TG3_VMWARE_NETQ_ENABLE */
-+}
-+
-+static inline u32 calc_crc(unsigned char *buf, int len)
-+{
-+ u32 reg;
-+ u32 tmp;
-+ int j, k;
-+
-+ reg = 0xffffffff;
-+
-+ for (j = 0; j < len; j++) {
-+ reg ^= buf[j];
-+
-+ for (k = 0; k < 8; k++) {
-+ tmp = reg & 0x01;
-+
-+ reg >>= 1;
-+
-+ if (tmp)
-+ reg ^= 0xedb88320;
-+ }
-+ }
-+
-+ return ~reg;
-+}
-+
-+static void tg3_set_multi(struct tg3 *tp, unsigned int accept_all)
-+{
-+ /* accept or reject all multicast frames */
-+ tw32(MAC_HASH_REG_0, accept_all ? 0xffffffff : 0);
-+ tw32(MAC_HASH_REG_1, accept_all ? 0xffffffff : 0);
-+ tw32(MAC_HASH_REG_2, accept_all ? 0xffffffff : 0);
-+ tw32(MAC_HASH_REG_3, accept_all ? 0xffffffff : 0);
-+}
-+
-+static void __tg3_set_rx_mode(struct net_device *dev)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ u32 rx_mode;
-+
-+ rx_mode = tp->rx_mode & ~(RX_MODE_PROMISC |
-+ RX_MODE_KEEP_VLAN_TAG);
-+
-+ /* When ASF is in use, we always keep the RX_MODE_KEEP_VLAN_TAG
-+ * flag clear.
-+ */
-+#ifndef BCM_HAS_NEW_VLAN_INTERFACE
-+ if (!tp->vlgrp)
-+#endif
-+ if (!tg3_flag(tp, ENABLE_ASF))
-+ rx_mode |= RX_MODE_KEEP_VLAN_TAG;
-+
-+ if (dev->flags & IFF_PROMISC) {
-+ /* Promiscuous mode. */
-+ rx_mode |= RX_MODE_PROMISC;
-+ } else if (dev->flags & IFF_ALLMULTI) {
-+ /* Accept all multicast. */
-+ tg3_set_multi(tp, 1);
-+ } else if (netdev_mc_empty(dev)) {
-+ /* Reject all multicast. */
-+ tg3_set_multi(tp, 0);
-+ } else {
-+ /* Accept one or more multicast(s). */
-+ struct netdev_hw_addr *ha;
-+ u32 mc_filter[4] = { 0, };
-+ u32 regidx;
-+ u32 bit;
-+ u32 crc;
-+
-+ netdev_for_each_mc_addr(ha, dev) {
-+ crc = calc_crc(ha->addr, ETH_ALEN);
-+ bit = ~crc & 0x7f;
-+ regidx = (bit & 0x60) >> 5;
-+ bit &= 0x1f;
-+ mc_filter[regidx] |= (1 << bit);
-+ }
-+
-+ tw32(MAC_HASH_REG_0, mc_filter[0]);
-+ tw32(MAC_HASH_REG_1, mc_filter[1]);
-+ tw32(MAC_HASH_REG_2, mc_filter[2]);
-+ tw32(MAC_HASH_REG_3, mc_filter[3]);
-+ }
-+
-+#ifdef IFF_UNICAST_FLT
-+ if (netdev_uc_count(dev) > TG3_MAX_UCAST_ADDR(tp)) {
-+ rx_mode |= RX_MODE_PROMISC;
-+ } else if (!(dev->flags & IFF_PROMISC)) {
-+ /* Add all entries into to the mac addr filter list */
-+ int i = 0;
-+ struct netdev_hw_addr *ha;
-+
-+ netdev_for_each_uc_addr(ha, dev) {
-+ __tg3_set_one_mac_addr(tp, ha->addr,
-+ i + TG3_UCAST_ADDR_IDX(tp));
-+ i++;
-+ }
-+ }
-+#endif
-+
-+ if (rx_mode != tp->rx_mode) {
-+ tp->rx_mode = rx_mode;
-+ tw32_f(MAC_RX_MODE, rx_mode);
-+ udelay(10);
-+ }
-+}
-+
-+static void tg3_rss_init_dflt_indir_tbl(struct tg3 *tp, u32 qcnt)
-+{
-+ int i;
-+
-+ for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i++)
-+ tp->rss_ind_tbl[i] = ethtool_rxfh_indir_default(i, qcnt);
-+}
-+
-+static void tg3_rss_check_indir_tbl(struct tg3 *tp)
-+{
-+ int i;
-+
-+ if (!tg3_flag(tp, ENABLE_RSS))
-+ return;
-+
-+ if (tp->rxq_cnt == 1) {
-+ memset(&tp->rss_ind_tbl[0], 0, sizeof(tp->rss_ind_tbl));
-+ return;
-+ }
-+
-+ /* Validate table against current IRQ count */
-+ for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i++) {
-+ if (tp->rss_ind_tbl[i] >= tp->rxq_cnt)
-+ break;
-+ }
-+
-+ if (i != TG3_RSS_INDIR_TBL_SIZE)
-+ tg3_rss_init_dflt_indir_tbl(tp, tp->rxq_cnt);
-+}
-+
-+static void tg3_rss_write_indir_tbl(struct tg3 *tp)
-+{
-+ int i = 0;
-+ u32 reg = MAC_RSS_INDIR_TBL_0;
-+
-+ while (i < TG3_RSS_INDIR_TBL_SIZE) {
-+ u32 val = tp->rss_ind_tbl[i];
-+ i++;
-+ for (; i % 8; i++) {
-+ val <<= 4;
-+ val |= tp->rss_ind_tbl[i];
-+ }
-+ tw32(reg, val);
-+ reg += 4;
-+ }
-+}
-+
-+static inline u32 tg3_lso_rd_dma_workaround_bit(struct tg3 *tp)
-+{
-+ if (tg3_asic_rev(tp) == ASIC_REV_5719)
-+ return TG3_LSO_RD_DMA_TX_LENGTH_WA_5719;
-+ else
-+ return TG3_LSO_RD_DMA_TX_LENGTH_WA_5720;
-+}
-+
-+/* tp->lock is held. */
-+static int tg3_reset_hw(struct tg3 *tp, bool reset_phy)
-+{
-+ u32 val, rdmac_mode;
-+ int i, err, limit;
-+ struct tg3_rx_prodring_set *tpr = &tp->napi[0].prodring;
-+
-+ tg3_disable_ints(tp);
-+
-+ tg3_stop_fw(tp);
-+
-+ tg3_write_sig_pre_reset(tp, RESET_KIND_INIT);
-+
-+ if (tg3_flag(tp, INIT_COMPLETE))
-+ tg3_abort_hw(tp, 1);
-+
-+ if ((tp->phy_flags & TG3_PHYFLG_KEEP_LINK_ON_PWRDN) &&
-+ !(tp->phy_flags & TG3_PHYFLG_USER_CONFIGURED)) {
-+ tg3_phy_pull_config(tp);
-+
-+ /* Pull eee config only if not overridden by module param */
-+ if (tg3_disable_eee == -1)
-+ tg3_eee_pull_config(tp, NULL);
-+
-+ tp->phy_flags |= TG3_PHYFLG_USER_CONFIGURED;
-+ }
-+
-+ /* Enable MAC control of LPI */
-+#ifndef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if (tg3_asic_rev(tp) != ASIC_REV_5785)
-+#endif
-+ if (tp->phy_flags & TG3_PHYFLG_EEE_CAP)
-+ tg3_setup_eee(tp);
-+
-+ if (reset_phy)
-+ tg3_phy_reset(tp);
-+
-+ err = tg3_chip_reset(tp);
-+ if (err)
-+ return err;
-+
-+ tg3_write_sig_legacy(tp, RESET_KIND_INIT);
-+
-+ if (tg3_chip_rev(tp) == CHIPREV_5784_AX) {
-+ val = tr32(TG3_CPMU_CTRL);
-+ val &= ~(CPMU_CTRL_LINK_AWARE_MODE | CPMU_CTRL_LINK_IDLE_MODE);
-+ tw32(TG3_CPMU_CTRL, val);
-+
-+ val = tr32(TG3_CPMU_LSPD_10MB_CLK);
-+ val &= ~CPMU_LSPD_10MB_MACCLK_MASK;
-+ val |= CPMU_LSPD_10MB_MACCLK_6_25;
-+ tw32(TG3_CPMU_LSPD_10MB_CLK, val);
-+
-+ val = tr32(TG3_CPMU_LNK_AWARE_PWRMD);
-+ val &= ~CPMU_LNK_AWARE_MACCLK_MASK;
-+ val |= CPMU_LNK_AWARE_MACCLK_6_25;
-+ tw32(TG3_CPMU_LNK_AWARE_PWRMD, val);
-+
-+ val = tr32(TG3_CPMU_HST_ACC);
-+ val &= ~CPMU_HST_ACC_MACCLK_MASK;
-+ val |= CPMU_HST_ACC_MACCLK_6_25;
-+ tw32(TG3_CPMU_HST_ACC, val);
-+ }
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_57780) {
-+ val = tr32(PCIE_PWR_MGMT_THRESH) & ~PCIE_PWR_MGMT_L1_THRESH_MSK;
-+ val |= PCIE_PWR_MGMT_EXT_ASPM_TMR_EN |
-+ PCIE_PWR_MGMT_L1_THRESH_4MS;
-+ tw32(PCIE_PWR_MGMT_THRESH, val);
-+
-+ val = tr32(TG3_PCIE_EIDLE_DELAY) & ~TG3_PCIE_EIDLE_DELAY_MASK;
-+ tw32(TG3_PCIE_EIDLE_DELAY, val | TG3_PCIE_EIDLE_DELAY_13_CLKS);
-+
-+ tw32(TG3_CORR_ERR_STAT, TG3_CORR_ERR_STAT_CLEAR);
-+
-+ val = tr32(TG3_PCIE_LNKCTL) & ~TG3_PCIE_LNKCTL_L1_PLL_PD_EN;
-+ tw32(TG3_PCIE_LNKCTL, val | TG3_PCIE_LNKCTL_L1_PLL_PD_DIS);
-+ }
-+
-+ if (tg3_flag(tp, L1PLLPD_EN)) {
-+ u32 grc_mode = tr32(GRC_MODE);
-+
-+ /* Access the lower 1K of PL PCIE block registers. */
-+ val = grc_mode & ~GRC_MODE_PCIE_PORT_MASK;
-+ tw32(GRC_MODE, val | GRC_MODE_PCIE_PL_SEL);
-+
-+ val = tr32(TG3_PCIE_TLDLPL_PORT + TG3_PCIE_PL_LO_PHYCTL1);
-+ tw32(TG3_PCIE_TLDLPL_PORT + TG3_PCIE_PL_LO_PHYCTL1,
-+ val | TG3_PCIE_PL_LO_PHYCTL1_L1PLLPD_EN);
-+
-+ tw32(GRC_MODE, grc_mode);
-+ }
-+
-+ if (tg3_flag(tp, 57765_CLASS)) {
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_57765_A0) {
-+ u32 grc_mode = tr32(GRC_MODE);
-+
-+ /* Access the lower 1K of PL PCIE block registers. */
-+ val = grc_mode & ~GRC_MODE_PCIE_PORT_MASK;
-+ tw32(GRC_MODE, val | GRC_MODE_PCIE_PL_SEL);
-+
-+ val = tr32(TG3_PCIE_TLDLPL_PORT +
-+ TG3_PCIE_PL_LO_PHYCTL5);
-+ tw32(TG3_PCIE_TLDLPL_PORT + TG3_PCIE_PL_LO_PHYCTL5,
-+ val | TG3_PCIE_PL_LO_PHYCTL5_DIS_L2CLKREQ);
-+
-+ tw32(GRC_MODE, grc_mode);
-+ }
-+
-+ if (tg3_chip_rev(tp) != CHIPREV_57765_AX) {
-+ u32 grc_mode;
-+
-+ /* Fix transmit hangs */
-+ val = tr32(TG3_CPMU_PADRNG_CTL);
-+ val |= TG3_CPMU_PADRNG_CTL_RDIV2;
-+ tw32(TG3_CPMU_PADRNG_CTL, val);
-+
-+ grc_mode = tr32(GRC_MODE);
-+
-+ /* Access the lower 1K of DL PCIE block registers. */
-+ val = grc_mode & ~GRC_MODE_PCIE_PORT_MASK;
-+ tw32(GRC_MODE, val | GRC_MODE_PCIE_DL_SEL);
-+
-+ val = tr32(TG3_PCIE_TLDLPL_PORT +
-+ TG3_PCIE_DL_LO_FTSMAX);
-+ val &= ~TG3_PCIE_DL_LO_FTSMAX_MSK;
-+ tw32(TG3_PCIE_TLDLPL_PORT + TG3_PCIE_DL_LO_FTSMAX,
-+ val | TG3_PCIE_DL_LO_FTSMAX_VAL);
-+
-+ tw32(GRC_MODE, grc_mode);
-+ }
-+
-+ val = tr32(TG3_CPMU_LSPD_10MB_CLK);
-+ val &= ~CPMU_LSPD_10MB_MACCLK_MASK;
-+ val |= CPMU_LSPD_10MB_MACCLK_6_25;
-+ tw32(TG3_CPMU_LSPD_10MB_CLK, val);
-+ }
-+
-+ /* This works around an issue with Athlon chipsets on
-+ * B3 tigon3 silicon. This bit has no effect on any
-+ * other revision. But do not set this on PCI Express
-+ * chips and don't even touch the clocks if the CPMU is present.
-+ */
-+ if (!tg3_flag(tp, CPMU_PRESENT)) {
-+ if (!tg3_flag(tp, PCI_EXPRESS))
-+ tp->pci_clock_ctrl |= CLOCK_CTRL_DELAY_PCI_GRANT;
-+ tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl);
-+ }
-+
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5704_A0 &&
-+ tg3_flag(tp, PCIX_MODE)) {
-+ val = tr32(TG3PCI_PCISTATE);
-+ val |= PCISTATE_RETRY_SAME_DMA;
-+ tw32(TG3PCI_PCISTATE, val);
-+ }
-+
-+ if (tg3_flag(tp, ENABLE_APE)) {
-+ /* Allow reads and writes to the
-+ * APE register and memory space.
-+ */
-+ val = tr32(TG3PCI_PCISTATE);
-+ val |= PCISTATE_ALLOW_APE_CTLSPC_WR |
-+ PCISTATE_ALLOW_APE_SHMEM_WR |
-+ PCISTATE_ALLOW_APE_PSPACE_WR;
-+ tw32(TG3PCI_PCISTATE, val);
-+ }
-+
-+ if (tg3_chip_rev(tp) == CHIPREV_5704_BX) {
-+ /* Enable some hw fixes. */
-+ val = tr32(TG3PCI_MSI_DATA);
-+ val |= (1 << 26) | (1 << 28) | (1 << 29);
-+ tw32(TG3PCI_MSI_DATA, val);
-+ }
-+
-+ /* Descriptor ring init may make accesses to the
-+ * NIC SRAM area to setup the TX descriptors, so we
-+ * can only do this after the hardware has been
-+ * successfully reset.
-+ */
-+ err = tg3_init_rings(tp);
-+ if (err)
-+ return err;
-+
-+ if (tg3_flag(tp, 57765_PLUS)) {
-+ val = tr32(TG3PCI_DMA_RW_CTRL) &
-+ ~DMA_RWCTRL_DIS_CACHE_ALIGNMENT;
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_57765_A0)
-+ val &= ~DMA_RWCTRL_CRDRDR_RDMA_MRRS_MSK;
-+ if (!tg3_flag(tp, 57765_CLASS) &&
-+ tg3_asic_rev(tp) != ASIC_REV_5717 &&
-+ tg3_asic_rev(tp) != ASIC_REV_5762)
-+ val |= DMA_RWCTRL_TAGGED_STAT_WA;
-+ tw32(TG3PCI_DMA_RW_CTRL, val | tp->dma_rwctrl);
-+ } else if (tg3_asic_rev(tp) != ASIC_REV_5784 &&
-+ tg3_asic_rev(tp) != ASIC_REV_5761) {
-+ /* This value is determined during the probe time DMA
-+ * engine test, tg3_test_dma.
-+ */
-+ tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl);
-+ }
-+
-+ tp->grc_mode &= ~(GRC_MODE_HOST_SENDBDS |
-+ GRC_MODE_4X_NIC_SEND_RINGS |
-+ GRC_MODE_NO_TX_PHDR_CSUM |
-+ GRC_MODE_NO_RX_PHDR_CSUM);
-+ tp->grc_mode |= GRC_MODE_HOST_SENDBDS;
-+
-+ /* Pseudo-header checksum is done by hardware logic and not
-+ * the offload processers, so make the chip do the pseudo-
-+ * header checksums on receive. For transmit it is more
-+ * convenient to do the pseudo-header checksum in software
-+ * as Linux does that on transmit for us in all cases.
-+ */
-+ tp->grc_mode |= GRC_MODE_NO_TX_PHDR_CSUM;
-+
-+ val = GRC_MODE_IRQ_ON_MAC_ATTN | GRC_MODE_HOST_STACKUP;
-+ if (tp->rxptpctl)
-+ tw32(TG3_RX_PTP_CTL,
-+ tp->rxptpctl | TG3_RX_PTP_CTL_HWTS_INTERLOCK);
-+
-+ if (tg3_flag(tp, PTP_CAPABLE))
-+ val |= GRC_MODE_TIME_SYNC_ENABLE;
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ if (tg3_flag(tp, ENABLE_IOV))
-+ val |= GRC_MODE_IOV_ENABLE;
-+#endif
-+
-+ tw32(GRC_MODE, tp->grc_mode | val);
-+
-+ /* Setup the timer prescalar register. Clock is always 66Mhz. */
-+ val = tr32(GRC_MISC_CFG);
-+ val &= ~0xff;
-+ val |= (65 << GRC_MISC_CFG_PRESCALAR_SHIFT);
-+ tw32(GRC_MISC_CFG, val);
-+
-+ /* Initialize MBUF/DESC pool. */
-+ if (tg3_flag(tp, 5750_PLUS)) {
-+ /* Do nothing. */
-+ } else if (tg3_asic_rev(tp) != ASIC_REV_5705) {
-+ tw32(BUFMGR_MB_POOL_ADDR, NIC_SRAM_MBUF_POOL_BASE);
-+ if (tg3_asic_rev(tp) == ASIC_REV_5704)
-+ tw32(BUFMGR_MB_POOL_SIZE, NIC_SRAM_MBUF_POOL_SIZE64);
-+ else
-+ tw32(BUFMGR_MB_POOL_SIZE, NIC_SRAM_MBUF_POOL_SIZE96);
-+ tw32(BUFMGR_DMA_DESC_POOL_ADDR, NIC_SRAM_DMA_DESC_POOL_BASE);
-+ tw32(BUFMGR_DMA_DESC_POOL_SIZE, NIC_SRAM_DMA_DESC_POOL_SIZE);
-+ } else if (tg3_flag(tp, TSO_CAPABLE)) {
-+#if TG3_TSO_SUPPORT != 0
-+ int fw_len;
-+
-+ fw_len = (TG3_TSO5_FW_TEXT_LEN +
-+ TG3_TSO5_FW_RODATA_LEN +
-+ TG3_TSO5_FW_DATA_LEN +
-+ TG3_TSO5_FW_SBSS_LEN +
-+ TG3_TSO5_FW_BSS_LEN);
-+ fw_len = (fw_len + (0x80 - 1)) & ~(0x80 - 1);
-+ tw32(BUFMGR_MB_POOL_ADDR,
-+ NIC_SRAM_MBUF_POOL_BASE5705 + fw_len);
-+ tw32(BUFMGR_MB_POOL_SIZE,
-+ NIC_SRAM_MBUF_POOL_SIZE5705 - fw_len - 0xa00);
-+#endif
-+ }
-+
-+ if (tp->dev->mtu <= ETH_DATA_LEN) {
-+ tw32(BUFMGR_MB_RDMA_LOW_WATER,
-+ tp->bufmgr_config.mbuf_read_dma_low_water);
-+ tw32(BUFMGR_MB_MACRX_LOW_WATER,
-+ tp->bufmgr_config.mbuf_mac_rx_low_water);
-+ tw32(BUFMGR_MB_HIGH_WATER,
-+ tp->bufmgr_config.mbuf_high_water);
-+ } else {
-+ tw32(BUFMGR_MB_RDMA_LOW_WATER,
-+ tp->bufmgr_config.mbuf_read_dma_low_water_jumbo);
-+ tw32(BUFMGR_MB_MACRX_LOW_WATER,
-+ tp->bufmgr_config.mbuf_mac_rx_low_water_jumbo);
-+ tw32(BUFMGR_MB_HIGH_WATER,
-+ tp->bufmgr_config.mbuf_high_water_jumbo);
-+ }
-+ tw32(BUFMGR_DMA_LOW_WATER,
-+ tp->bufmgr_config.dma_low_water);
-+ tw32(BUFMGR_DMA_HIGH_WATER,
-+ tp->bufmgr_config.dma_high_water);
-+
-+ val = BUFMGR_MODE_ENABLE | BUFMGR_MODE_ATTN_ENABLE;
-+ if (tg3_asic_rev(tp) == ASIC_REV_5719)
-+ val |= BUFMGR_MODE_NO_TX_UNDERRUN;
-+ if (tg3_asic_rev(tp) == ASIC_REV_5717 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762 ||
-+ tg3_chip_rev_id(tp) == CHIPREV_ID_5719_A0 ||
-+ tg3_chip_rev_id(tp) == CHIPREV_ID_5720_A0)
-+ val |= BUFMGR_MODE_MBLOW_ATTN_ENAB;
-+ tw32(BUFMGR_MODE, val);
-+ for (i = 0; i < 2000; i++) {
-+ if (tr32(BUFMGR_MODE) & BUFMGR_MODE_ENABLE)
-+ break;
-+ udelay(10);
-+ }
-+ if (i >= 2000) {
-+ netdev_err(tp->dev, "%s cannot enable BUFMGR\n", __func__);
-+ return -ENODEV;
-+ }
-+
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5906_A1)
-+ tw32(ISO_PKT_TX, (tr32(ISO_PKT_TX) & ~0x3) | 0x2);
-+
-+ tg3_setup_rxbd_thresholds(tp);
-+
-+ /* Initialize TG3_BDINFO's at:
-+ * RCVDBDI_STD_BD: standard eth size rx ring
-+ * RCVDBDI_JUMBO_BD: jumbo frame rx ring
-+ * RCVDBDI_MINI_BD: small frame rx ring (??? does not work)
-+ *
-+ * like so:
-+ * TG3_BDINFO_HOST_ADDR: high/low parts of DMA address of ring
-+ * TG3_BDINFO_MAXLEN_FLAGS: (rx max buffer size << 16) |
-+ * ring attribute flags
-+ * TG3_BDINFO_NIC_ADDR: location of descriptors in nic SRAM
-+ *
-+ * Standard receive ring @ NIC_SRAM_RX_BUFFER_DESC, 512 entries.
-+ * Jumbo receive ring @ NIC_SRAM_RX_JUMBO_BUFFER_DESC, 256 entries.
-+ *
-+ * The size of each ring is fixed in the firmware, but the location is
-+ * configurable.
-+ */
-+ tw32(RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_HIGH,
-+ ((u64) tpr->rx_std_mapping >> 32));
-+ tw32(RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW,
-+ ((u64) tpr->rx_std_mapping & 0xffffffff));
-+ if (!tg3_flag(tp, 5717_PLUS))
-+ tw32(RCVDBDI_STD_BD + TG3_BDINFO_NIC_ADDR,
-+ NIC_SRAM_RX_BUFFER_DESC);
-+
-+ /* Disable the mini ring */
-+ if (!tg3_flag(tp, 5705_PLUS))
-+ tw32(RCVDBDI_MINI_BD + TG3_BDINFO_MAXLEN_FLAGS,
-+ BDINFO_FLAGS_DISABLED);
-+
-+ /* Program the jumbo buffer descriptor ring control
-+ * blocks on those devices that have them.
-+ */
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5719_A0 ||
-+ (tg3_flag(tp, JUMBO_CAPABLE) && !tg3_flag(tp, 5780_CLASS))) {
-+
-+ if (tg3_flag(tp, JUMBO_RING_ENABLE)) {
-+ tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_HIGH,
-+ ((u64) tpr->rx_jmb_mapping >> 32));
-+ tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW,
-+ ((u64) tpr->rx_jmb_mapping & 0xffffffff));
-+ val = TG3_RX_JMB_RING_SIZE(tp) <<
-+ BDINFO_FLAGS_MAXLEN_SHIFT;
-+ tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_MAXLEN_FLAGS,
-+ val | BDINFO_FLAGS_USE_EXT_RECV);
-+ if (!tg3_flag(tp, USE_JUMBO_BDFLAG) ||
-+ tg3_flag(tp, 57765_CLASS) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762)
-+ tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_NIC_ADDR,
-+ NIC_SRAM_RX_JUMBO_BUFFER_DESC);
-+ } else {
-+ tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_MAXLEN_FLAGS,
-+ BDINFO_FLAGS_DISABLED);
-+ }
-+
-+ if (tg3_flag(tp, 57765_PLUS)) {
-+ val = TG3_RX_STD_RING_SIZE(tp);
-+ val <<= BDINFO_FLAGS_MAXLEN_SHIFT;
-+ val |= (TG3_RX_STD_DMA_SZ << 2);
-+ } else
-+ val = TG3_RX_STD_DMA_SZ << BDINFO_FLAGS_MAXLEN_SHIFT;
-+ } else
-+ val = TG3_RX_STD_MAX_SIZE_5700 << BDINFO_FLAGS_MAXLEN_SHIFT;
-+
-+ tw32(RCVDBDI_STD_BD + TG3_BDINFO_MAXLEN_FLAGS, val);
-+
-+ tpr->rx_std_prod_idx = tp->rx_pending;
-+ tw32_rx_mbox(TG3_RX_STD_PROD_IDX_REG, tpr->rx_std_prod_idx);
-+
-+ tpr->rx_jmb_prod_idx =
-+ tg3_flag(tp, JUMBO_RING_ENABLE) ? tp->rx_jumbo_pending : 0;
-+ tw32_rx_mbox(TG3_RX_JMB_PROD_IDX_REG, tpr->rx_jmb_prod_idx);
-+
-+ tg3_rings_reset(tp);
-+
-+ /* Initialize MAC address and backoff seed. */
-+ __tg3_set_mac_addr(tp, false);
-+
-+ /* MTU + ethernet header + FCS + optional VLAN tag */
-+ tw32(MAC_RX_MTU_SIZE,
-+ tp->dev->mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN);
-+
-+ /* The slot time is changed by tg3_setup_phy if we
-+ * run at gigabit with half duplex.
-+ */
-+ val = (2 << TX_LENGTHS_IPG_CRS_SHIFT) |
-+ (6 << TX_LENGTHS_IPG_SHIFT) |
-+ (32 << TX_LENGTHS_SLOT_TIME_SHIFT);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5720 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762)
-+ val |= tr32(MAC_TX_LENGTHS) &
-+ (TX_LENGTHS_JMB_FRM_LEN_MSK |
-+ TX_LENGTHS_CNT_DWN_VAL_MSK);
-+
-+ tw32(MAC_TX_LENGTHS, val);
-+
-+ /* Receive rules. */
-+ tw32(MAC_RCV_RULE_CFG, RCV_RULE_CFG_DEFAULT_CLASS);
-+ tw32(RCVLPC_CONFIG, 0x0181);
-+
-+ /* Calculate RDMAC_MODE setting early, we need it to determine
-+ * the RCVLPC_STATE_ENABLE mask.
-+ */
-+ rdmac_mode = (RDMAC_MODE_ENABLE | RDMAC_MODE_TGTABORT_ENAB |
-+ RDMAC_MODE_MSTABORT_ENAB | RDMAC_MODE_PARITYERR_ENAB |
-+ RDMAC_MODE_ADDROFLOW_ENAB | RDMAC_MODE_FIFOOFLOW_ENAB |
-+ RDMAC_MODE_FIFOURUN_ENAB | RDMAC_MODE_FIFOOREAD_ENAB |
-+ RDMAC_MODE_LNGREAD_ENAB);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5717)
-+ rdmac_mode |= RDMAC_MODE_MULT_DMA_RD_DIS;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5784 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5785 ||
-+ tg3_asic_rev(tp) == ASIC_REV_57780)
-+ rdmac_mode |= RDMAC_MODE_BD_SBD_CRPT_ENAB |
-+ RDMAC_MODE_MBUF_RBD_CRPT_ENAB |
-+ RDMAC_MODE_MBUF_SBD_CRPT_ENAB;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5705 &&
-+ tg3_chip_rev_id(tp) != CHIPREV_ID_5705_A0) {
-+ if (tg3_flag(tp, TSO_CAPABLE) &&
-+ tg3_asic_rev(tp) == ASIC_REV_5705) {
-+ rdmac_mode |= RDMAC_MODE_FIFO_SIZE_128;
-+ } else if (!(tr32(TG3PCI_PCISTATE) & PCISTATE_BUS_SPEED_HIGH) &&
-+ !tg3_flag(tp, IS_5788)) {
-+ rdmac_mode |= RDMAC_MODE_FIFO_LONG_BURST;
-+ }
-+ }
-+
-+ if (tg3_flag(tp, PCI_EXPRESS))
-+ rdmac_mode |= RDMAC_MODE_FIFO_LONG_BURST;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_57766) {
-+ tp->dma_limit = 0;
-+
-+#if defined(__VMKLNX__)
-+ if (tg3_flag(tp, TSO_CAPABLE))
-+ tp->dma_limit = TG3_TX_BD_DMA_MAX_32K;
-+#endif
-+ if (tp->dev->mtu <= ETH_DATA_LEN)
-+ rdmac_mode |= RDMAC_MODE_JMB_2K_MMRR;
-+ }
-+
-+ /* Enables IPV4 checksum offload as well. */
-+ if (tg3_flag(tp, HW_TSO_1) ||
-+ tg3_flag(tp, HW_TSO_2) ||
-+ tg3_flag(tp, HW_TSO_3))
-+ rdmac_mode |= RDMAC_MODE_IPV4_LSO_EN;
-+
-+ /* Enables IPV6 checksum offload as well. */
-+ if (tg3_flag(tp, 57765_PLUS) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5785 ||
-+ tg3_asic_rev(tp) == ASIC_REV_57780)
-+ rdmac_mode |= RDMAC_MODE_IPV6_LSO_EN;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5720 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762)
-+ rdmac_mode |= tr32(RDMAC_MODE) & RDMAC_MODE_H2BNC_VLAN_DET;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5761 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5784 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5785 ||
-+ tg3_asic_rev(tp) == ASIC_REV_57780 ||
-+ tg3_flag(tp, 57765_PLUS)) {
-+ u32 tgtreg;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5762)
-+ tgtreg = TG3_RDMA_RSRVCTRL_REG2;
-+ else
-+ tgtreg = TG3_RDMA_RSRVCTRL_REG;
-+
-+ val = tr32(tgtreg);
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5719_A0 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762) {
-+ val &= ~(TG3_RDMA_RSRVCTRL_TXMRGN_MASK |
-+ TG3_RDMA_RSRVCTRL_FIFO_LWM_MASK |
-+ TG3_RDMA_RSRVCTRL_FIFO_HWM_MASK);
-+ val |= TG3_RDMA_RSRVCTRL_TXMRGN_320B |
-+ TG3_RDMA_RSRVCTRL_FIFO_LWM_1_5K |
-+ TG3_RDMA_RSRVCTRL_FIFO_HWM_1_5K;
-+ }
-+ tw32(tgtreg, val | TG3_RDMA_RSRVCTRL_FIFO_OFLW_FIX);
-+ }
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5719 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5720 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762) {
-+ u32 tgtreg;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5762)
-+ tgtreg = TG3_LSO_RD_DMA_CRPTEN_CTRL2;
-+ else
-+ tgtreg = TG3_LSO_RD_DMA_CRPTEN_CTRL;
-+
-+ val = tr32(tgtreg);
-+ tw32(tgtreg, val |
-+ TG3_LSO_RD_DMA_CRPTEN_CTRL_BLEN_BD_4K |
-+ TG3_LSO_RD_DMA_CRPTEN_CTRL_BLEN_LSO_4K);
-+ }
-+
-+ /* Receive/send statistics. */
-+ if (tg3_flag(tp, 5750_PLUS)) {
-+ val = tr32(RCVLPC_STATS_ENABLE);
-+ val &= ~RCVLPC_STATSENAB_DACK_FIX;
-+ tw32(RCVLPC_STATS_ENABLE, val);
-+ } else if ((rdmac_mode & RDMAC_MODE_FIFO_SIZE_128) &&
-+ tg3_flag(tp, TSO_CAPABLE)) {
-+ val = tr32(RCVLPC_STATS_ENABLE);
-+ val &= ~RCVLPC_STATSENAB_LNGBRST_RFIX;
-+ tw32(RCVLPC_STATS_ENABLE, val);
-+ } else {
-+ tw32(RCVLPC_STATS_ENABLE, 0xffffff);
-+ }
-+ tw32(RCVLPC_STATSCTRL, RCVLPC_STATSCTRL_ENABLE);
-+ tw32(SNDDATAI_STATSENAB, 0xffffff);
-+ tw32(SNDDATAI_STATSCTRL,
-+ (SNDDATAI_SCTRL_ENABLE |
-+ SNDDATAI_SCTRL_FASTUPD));
-+
-+ /* Setup host coalescing engine. */
-+ tw32(HOSTCC_MODE, 0);
-+ for (i = 0; i < 2000; i++) {
-+ if (!(tr32(HOSTCC_MODE) & HOSTCC_MODE_ENABLE))
-+ break;
-+ udelay(10);
-+ }
-+
-+ __tg3_set_coalesce(tp, &tp->coal);
-+
-+ if (!tg3_flag(tp, 5705_PLUS)) {
-+ /* Status/statistics block address. See tg3_timer,
-+ * the tg3_periodic_fetch_stats call there, and
-+ * tg3_get_stats to see how this works for 5705/5750 chips.
-+ */
-+ tw32(HOSTCC_STATS_BLK_HOST_ADDR + TG3_64BIT_REG_HIGH,
-+ ((u64) tp->stats_mapping >> 32));
-+ tw32(HOSTCC_STATS_BLK_HOST_ADDR + TG3_64BIT_REG_LOW,
-+ ((u64) tp->stats_mapping & 0xffffffff));
-+ tw32(HOSTCC_STATS_BLK_NIC_ADDR, NIC_SRAM_STATS_BLK);
-+
-+ tw32(HOSTCC_STATUS_BLK_NIC_ADDR, NIC_SRAM_STATUS_BLK);
-+
-+ /* Clear statistics and status block memory areas */
-+ for (i = NIC_SRAM_STATS_BLK;
-+ i < NIC_SRAM_STATUS_BLK + TG3_HW_STATUS_SIZE;
-+ i += sizeof(u32)) {
-+ tg3_write_mem(tp, i, 0);
-+ udelay(40);
-+ }
-+ }
-+
-+ tw32(HOSTCC_MODE, HOSTCC_MODE_ENABLE | tp->coalesce_mode);
-+
-+ tw32(RCVCC_MODE, RCVCC_MODE_ENABLE | RCVCC_MODE_ATTN_ENABLE);
-+ tw32(RCVLPC_MODE, RCVLPC_MODE_ENABLE);
-+ if (!tg3_flag(tp, 5705_PLUS))
-+ tw32(RCVLSC_MODE, RCVLSC_MODE_ENABLE | RCVLSC_MODE_ATTN_ENABLE);
-+
-+ if (tp->phy_flags & TG3_PHYFLG_MII_SERDES) {
-+ tp->phy_flags &= ~TG3_PHYFLG_PARALLEL_DETECT;
-+ /* reset to prevent losing 1st rx packet intermittently */
-+ tw32_f(MAC_RX_MODE, RX_MODE_RESET);
-+ udelay(10);
-+ }
-+
-+ tp->mac_mode |= MAC_MODE_TXSTAT_ENABLE | MAC_MODE_RXSTAT_ENABLE |
-+ MAC_MODE_TDE_ENABLE | MAC_MODE_RDE_ENABLE |
-+ MAC_MODE_FHDE_ENABLE;
-+ if (tg3_flag(tp, ENABLE_APE))
-+ tp->mac_mode |= MAC_MODE_APE_TX_EN | MAC_MODE_APE_RX_EN;
-+ if (!tg3_flag(tp, 5705_PLUS) &&
-+ !(tp->phy_flags & TG3_PHYFLG_PHY_SERDES) &&
-+ tg3_asic_rev(tp) != ASIC_REV_5700)
-+ tp->mac_mode |= MAC_MODE_LINK_POLARITY;
-+ tw32_f(MAC_MODE, tp->mac_mode | MAC_MODE_RXSTAT_CLEAR | MAC_MODE_TXSTAT_CLEAR);
-+ udelay(40);
-+
-+ /* tp->grc_local_ctrl is partially set up during tg3_get_invariants().
-+ * If TG3_FLAG_IS_NIC is zero, we should read the
-+ * register to preserve the GPIO settings for LOMs. The GPIOs,
-+ * whether used as inputs or outputs, are set by boot code after
-+ * reset.
-+ */
-+ if (!tg3_flag(tp, IS_NIC)) {
-+ u32 gpio_mask;
-+
-+ gpio_mask = GRC_LCLCTRL_GPIO_OE0 | GRC_LCLCTRL_GPIO_OE1 |
-+ GRC_LCLCTRL_GPIO_OE2 | GRC_LCLCTRL_GPIO_OUTPUT0 |
-+ GRC_LCLCTRL_GPIO_OUTPUT1 | GRC_LCLCTRL_GPIO_OUTPUT2;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5752)
-+ gpio_mask |= GRC_LCLCTRL_GPIO_OE3 |
-+ GRC_LCLCTRL_GPIO_OUTPUT3;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5755)
-+ gpio_mask |= GRC_LCLCTRL_GPIO_UART_SEL;
-+
-+ tp->grc_local_ctrl &= ~gpio_mask;
-+ tp->grc_local_ctrl |= tr32(GRC_LOCAL_CTRL) & gpio_mask;
-+
-+ /* GPIO1 must be driven high for eeprom write protect */
-+ if (tg3_flag(tp, EEPROM_WRITE_PROT))
-+ tp->grc_local_ctrl |= (GRC_LCLCTRL_GPIO_OE1 |
-+ GRC_LCLCTRL_GPIO_OUTPUT1);
-+ }
-+ tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl);
-+ udelay(100);
-+
-+ if (tg3_flag(tp, USING_MSIX)) {
-+ val = tr32(MSGINT_MODE);
-+ val |= MSGINT_MODE_ENABLE;
-+ if (tp->irq_cnt > 1)
-+ val |= MSGINT_MODE_MULTIVEC_EN;
-+ if (!tg3_flag(tp, 1SHOT_MSI))
-+ val |= MSGINT_MODE_ONE_SHOT_DISABLE;
-+ tw32(MSGINT_MODE, val);
-+ }
-+
-+ if (!tg3_flag(tp, 5705_PLUS)) {
-+ tw32_f(DMAC_MODE, DMAC_MODE_ENABLE);
-+ udelay(40);
-+ }
-+
-+ val = (WDMAC_MODE_ENABLE | WDMAC_MODE_TGTABORT_ENAB |
-+ WDMAC_MODE_MSTABORT_ENAB | WDMAC_MODE_PARITYERR_ENAB |
-+ WDMAC_MODE_ADDROFLOW_ENAB | WDMAC_MODE_FIFOOFLOW_ENAB |
-+ WDMAC_MODE_FIFOURUN_ENAB | WDMAC_MODE_FIFOOREAD_ENAB |
-+ WDMAC_MODE_LNGREAD_ENAB);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5705 &&
-+ tg3_chip_rev_id(tp) != CHIPREV_ID_5705_A0) {
-+ if (tg3_flag(tp, TSO_CAPABLE) &&
-+ (tg3_chip_rev_id(tp) == CHIPREV_ID_5705_A1 ||
-+ tg3_chip_rev_id(tp) == CHIPREV_ID_5705_A2)) {
-+ /* nothing */
-+ } else if (!(tr32(TG3PCI_PCISTATE) & PCISTATE_BUS_SPEED_HIGH) &&
-+ !tg3_flag(tp, IS_5788)) {
-+ val |= WDMAC_MODE_RX_ACCEL;
-+ }
-+ }
-+
-+ /* Enable host coalescing bug fix */
-+ if (tg3_flag(tp, 5755_PLUS))
-+ val |= WDMAC_MODE_STATUS_TAG_FIX;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5785)
-+ val |= WDMAC_MODE_BURST_ALL_DATA;
-+
-+ tw32_f(WDMAC_MODE, val);
-+ udelay(40);
-+
-+ if (tg3_flag(tp, PCIX_MODE)) {
-+ u16 pcix_cmd;
-+
-+ pci_read_config_word(tp->pdev, tp->pcix_cap + PCI_X_CMD,
-+ &pcix_cmd);
-+ if (tg3_asic_rev(tp) == ASIC_REV_5703) {
-+ pcix_cmd &= ~PCI_X_CMD_MAX_READ;
-+ pcix_cmd |= PCI_X_CMD_READ_2K;
-+ } else if (tg3_asic_rev(tp) == ASIC_REV_5704) {
-+ pcix_cmd &= ~(PCI_X_CMD_MAX_SPLIT | PCI_X_CMD_MAX_READ);
-+ pcix_cmd |= PCI_X_CMD_READ_2K;
-+ }
-+ pci_write_config_word(tp->pdev, tp->pcix_cap + PCI_X_CMD,
-+ pcix_cmd);
-+ }
-+
-+ tw32_f(RDMAC_MODE, rdmac_mode);
-+ udelay(40);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5719 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5720) {
-+ for (i = 0; i < TG3_NUM_RDMA_CHANNELS; i++) {
-+ if (tr32(TG3_RDMA_LENGTH + (i << 2)) > TG3_MAX_MTU(tp))
-+ break;
-+ }
-+ if (i < TG3_NUM_RDMA_CHANNELS) {
-+ val = tr32(TG3_LSO_RD_DMA_CRPTEN_CTRL);
-+ val |= tg3_lso_rd_dma_workaround_bit(tp);
-+ tw32(TG3_LSO_RD_DMA_CRPTEN_CTRL, val);
-+ tg3_flag_set(tp, 5719_5720_RDMA_BUG);
-+ }
-+ }
-+
-+ tw32(RCVDCC_MODE, RCVDCC_MODE_ENABLE | RCVDCC_MODE_ATTN_ENABLE);
-+ if (!tg3_flag(tp, 5705_PLUS))
-+ tw32(MBFREE_MODE, MBFREE_MODE_ENABLE);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5761)
-+ tw32(SNDDATAC_MODE,
-+ SNDDATAC_MODE_ENABLE | SNDDATAC_MODE_CDELAY);
-+ else
-+ tw32(SNDDATAC_MODE, SNDDATAC_MODE_ENABLE);
-+
-+ tw32(SNDBDC_MODE, SNDBDC_MODE_ENABLE | SNDBDC_MODE_ATTN_ENABLE);
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ val = RCVBDI_MODE_ENABLE;
-+ if (!tg3_flag(tp, ENABLE_IOV))
-+ val |= RCVBDI_MODE_RCB_ATTN_ENAB;
-+ tw32(RCVBDI_MODE, val);
-+ /* No packet drop if there is no RBDs. H/w will continues to service
-+ RX packets for particular VMQ until all packets are drained. */
-+ val = RCVDBDI_MODE_ENABLE | RCVDBDI_MODE_INV_RING_SZ | (2<<13);
-+#else
-+ tw32(RCVBDI_MODE, RCVBDI_MODE_ENABLE | RCVBDI_MODE_RCB_ATTN_ENAB);
-+ val = RCVDBDI_MODE_ENABLE | RCVDBDI_MODE_INV_RING_SZ;
-+#endif
-+ if (tg3_flag(tp, LRG_PROD_RING_CAP))
-+ val |= RCVDBDI_MODE_LRG_RING_SZ;
-+ tw32(RCVDBDI_MODE, val);
-+ tw32(SNDDATAI_MODE, SNDDATAI_MODE_ENABLE);
-+#if TG3_TSO_SUPPORT != 0
-+ if (tg3_flag(tp, HW_TSO_1) ||
-+ tg3_flag(tp, HW_TSO_2) ||
-+ tg3_flag(tp, HW_TSO_3))
-+ tw32(SNDDATAI_MODE, SNDDATAI_MODE_ENABLE | 0x8);
-+#endif
-+ val = SNDBDI_MODE_ENABLE | SNDBDI_MODE_ATTN_ENABLE;
-+ if (tg3_flag(tp, ENABLE_TSS))
-+ val |= SNDBDI_MODE_MULTI_TXQ_EN;
-+ tw32(SNDBDI_MODE, val);
-+ tw32(SNDBDS_MODE, SNDBDS_MODE_ENABLE | SNDBDS_MODE_ATTN_ENABLE);
-+
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5701_A0) {
-+ err = tg3_load_5701_a0_firmware_fix(tp);
-+ if (err)
-+ return err;
-+ }
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_57766) {
-+ /* Ignore any errors for the firmware download. If download
-+ * fails, the device will operate with EEE disabled
-+ */
-+ tg3_load_57766_firmware(tp);
-+ }
-+
-+#if TG3_TSO_SUPPORT != 0
-+ if (tg3_flag(tp, TSO_CAPABLE)) {
-+ err = tg3_load_tso_firmware(tp);
-+ if (err)
-+ return err;
-+ }
-+#endif
-+
-+ tp->tx_mode = TX_MODE_ENABLE;
-+
-+ if (tg3_flag(tp, 5755_PLUS) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5906)
-+ tp->tx_mode |= TX_MODE_MBUF_LOCKUP_FIX;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5720 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762) {
-+ val = TX_MODE_JMB_FRM_LEN | TX_MODE_CNT_DN_MODE;
-+ tp->tx_mode &= ~val;
-+ tp->tx_mode |= tr32(MAC_TX_MODE) & val;
-+ }
-+
-+ tw32_f(MAC_TX_MODE, tp->tx_mode);
-+ udelay(100);
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ tg3_netq_restore(tp);
-+#endif
-+
-+ if (tg3_flag(tp, ENABLE_RSS)) {
-+ tg3_rss_write_indir_tbl(tp);
-+
-+ /* Setup the "secret" hash key. */
-+ tw32(MAC_RSS_HASH_KEY_0, 0x5f865437);
-+ tw32(MAC_RSS_HASH_KEY_1, 0xe4ac62cc);
-+ tw32(MAC_RSS_HASH_KEY_2, 0x50103a45);
-+ tw32(MAC_RSS_HASH_KEY_3, 0x36621985);
-+ tw32(MAC_RSS_HASH_KEY_4, 0xbf14c0e8);
-+ tw32(MAC_RSS_HASH_KEY_5, 0x1bc27a1e);
-+ tw32(MAC_RSS_HASH_KEY_6, 0x84f4b556);
-+ tw32(MAC_RSS_HASH_KEY_7, 0x094ea6fe);
-+ tw32(MAC_RSS_HASH_KEY_8, 0x7dda01e7);
-+ tw32(MAC_RSS_HASH_KEY_9, 0xc04d7481);
-+ }
-+
-+ tp->rx_mode = RX_MODE_ENABLE;
-+ if (tg3_flag(tp, 5755_PLUS))
-+ tp->rx_mode |= RX_MODE_IPV6_CSUM_ENABLE;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5762)
-+ tp->rx_mode |= RX_MODE_IPV4_FRAG_FIX;
-+
-+ if (tg3_flag(tp, ENABLE_RSS))
-+ tp->rx_mode |= RX_MODE_RSS_ENABLE |
-+ RX_MODE_RSS_ITBL_HASH_BITS_7 |
-+ RX_MODE_RSS_IPV6_HASH_EN |
-+ RX_MODE_RSS_TCP_IPV6_HASH_EN |
-+ RX_MODE_RSS_IPV4_HASH_EN |
-+ RX_MODE_RSS_TCP_IPV4_HASH_EN;
-+
-+ tw32_f(MAC_RX_MODE, tp->rx_mode);
-+ udelay(10);
-+
-+ tw32(MAC_LED_CTRL, tp->led_ctrl);
-+
-+ tw32(MAC_MI_STAT, MAC_MI_STAT_LNKSTAT_ATTN_ENAB);
-+ if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) {
-+ tw32_f(MAC_RX_MODE, RX_MODE_RESET);
-+ udelay(10);
-+ }
-+ tw32_f(MAC_RX_MODE, tp->rx_mode);
-+ udelay(10);
-+
-+ if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) {
-+ if ((tg3_asic_rev(tp) == ASIC_REV_5704) &&
-+ !(tp->phy_flags & TG3_PHYFLG_SERDES_PREEMPHASIS)) {
-+ /* Set drive transmission level to 1.2V */
-+ /* only if the signal pre-emphasis bit is not set */
-+ val = tr32(MAC_SERDES_CFG);
-+ val &= 0xfffff000;
-+ val |= 0x880;
-+ tw32(MAC_SERDES_CFG, val);
-+ }
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5703_A1)
-+ tw32(MAC_SERDES_CFG, 0x616000);
-+ }
-+
-+ /* Prevent chip from dropping frames when flow control
-+ * is enabled.
-+ */
-+ if (tg3_flag(tp, 57765_CLASS))
-+ val = 1;
-+ else
-+ val = 2;
-+ tw32_f(MAC_LOW_WMARK_MAX_RX_FRAME, val);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5704 &&
-+ (tp->phy_flags & TG3_PHYFLG_PHY_SERDES)) {
-+ /* Use hardware link auto-negotiation */
-+ tg3_flag_set(tp, HW_AUTONEG);
-+ }
-+
-+ if ((tp->phy_flags & TG3_PHYFLG_MII_SERDES) &&
-+ tg3_asic_rev(tp) == ASIC_REV_5714) {
-+ u32 tmp;
-+
-+ tmp = tr32(SERDES_RX_CTRL);
-+ tw32(SERDES_RX_CTRL, tmp | SERDES_RX_SIG_DETECT);
-+ tp->grc_local_ctrl &= ~GRC_LCLCTRL_USE_EXT_SIG_DETECT;
-+ tp->grc_local_ctrl |= GRC_LCLCTRL_USE_SIG_DETECT;
-+ tw32(GRC_LOCAL_CTRL, tp->grc_local_ctrl);
-+ }
-+
-+ if (!tg3_flag(tp, USE_PHYLIB)) {
-+ if (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER)
-+ tp->phy_flags &= ~TG3_PHYFLG_IS_LOW_POWER;
-+
-+ err = tg3_setup_phy(tp, false);
-+ if (err)
-+ return err;
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_PHY_SERDES) &&
-+ !(tp->phy_flags & TG3_PHYFLG_IS_FET)) {
-+ u32 tmp;
-+
-+ /* Clear CRC stats. */
-+ if (!tg3_readphy(tp, MII_TG3_TEST1, &tmp)) {
-+ tg3_writephy(tp, MII_TG3_TEST1,
-+ tmp | MII_TG3_TEST1_CRC_EN);
-+ tg3_readphy(tp, MII_TG3_RXR_COUNTERS, &tmp);
-+ }
-+ }
-+ }
-+
-+ __tg3_set_rx_mode(tp->dev);
-+
-+ /* Initialize receive rules. */
-+ tw32(MAC_RCV_RULE_0, 0xc2000000 & RCV_RULE_DISABLE_MASK);
-+ tw32(MAC_RCV_VALUE_0, 0xffffffff & RCV_RULE_DISABLE_MASK);
-+ tw32(MAC_RCV_RULE_1, 0x86000004 & RCV_RULE_DISABLE_MASK);
-+ tw32(MAC_RCV_VALUE_1, 0xffffffff & RCV_RULE_DISABLE_MASK);
-+
-+ if (tg3_flag(tp, 5705_PLUS) && !tg3_flag(tp, 5780_CLASS))
-+ limit = 8;
-+ else
-+ limit = 16;
-+ if (tg3_flag(tp, ENABLE_ASF))
-+ limit -= 4;
-+ switch (limit) {
-+ case 16:
-+ tw32(MAC_RCV_RULE_15, 0); tw32(MAC_RCV_VALUE_15, 0);
-+ case 15:
-+ tw32(MAC_RCV_RULE_14, 0); tw32(MAC_RCV_VALUE_14, 0);
-+ case 14:
-+ tw32(MAC_RCV_RULE_13, 0); tw32(MAC_RCV_VALUE_13, 0);
-+ case 13:
-+ tw32(MAC_RCV_RULE_12, 0); tw32(MAC_RCV_VALUE_12, 0);
-+ case 12:
-+ tw32(MAC_RCV_RULE_11, 0); tw32(MAC_RCV_VALUE_11, 0);
-+ case 11:
-+ tw32(MAC_RCV_RULE_10, 0); tw32(MAC_RCV_VALUE_10, 0);
-+ case 10:
-+ tw32(MAC_RCV_RULE_9, 0); tw32(MAC_RCV_VALUE_9, 0);
-+ case 9:
-+ tw32(MAC_RCV_RULE_8, 0); tw32(MAC_RCV_VALUE_8, 0);
-+ case 8:
-+ tw32(MAC_RCV_RULE_7, 0); tw32(MAC_RCV_VALUE_7, 0);
-+ case 7:
-+ tw32(MAC_RCV_RULE_6, 0); tw32(MAC_RCV_VALUE_6, 0);
-+ case 6:
-+ tw32(MAC_RCV_RULE_5, 0); tw32(MAC_RCV_VALUE_5, 0);
-+ case 5:
-+ tw32(MAC_RCV_RULE_4, 0); tw32(MAC_RCV_VALUE_4, 0);
-+ case 4:
-+ /* tw32(MAC_RCV_RULE_3, 0); tw32(MAC_RCV_VALUE_3, 0); */
-+ case 3:
-+ /* tw32(MAC_RCV_RULE_2, 0); tw32(MAC_RCV_VALUE_2, 0); */
-+ case 2:
-+ case 1:
-+
-+ default:
-+ break;
-+ }
-+
-+ if (tg3_flag(tp, ENABLE_APE))
-+ /* Write our heartbeat update interval to APE. */
-+ tg3_ape_write32(tp, TG3_APE_HOST_HEARTBEAT_INT_MS,
-+ APE_HOST_HEARTBEAT_INT_5SEC);
-+
-+ tg3_write_sig_post_reset(tp, RESET_KIND_INIT);
-+
-+ return 0;
-+}
-+
-+/* Called at device open time to get the chip ready for
-+ * packet processing. Invoked with tp->lock held.
-+ */
-+static int tg3_init_hw(struct tg3 *tp, bool reset_phy)
-+{
-+ /* Chip may have been just powered on. If so, the boot code may still
-+ * be running initialization. Wait for it to finish to avoid races in
-+ * accessing the hardware.
-+ */
-+ tg3_enable_register_access(tp);
-+ tg3_poll_fw(tp);
-+
-+ tg3_switch_clocks(tp);
-+
-+ tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0);
-+
-+ return tg3_reset_hw(tp, reset_phy);
-+}
-+
-+#if IS_ENABLED(CONFIG_HWMON) && !defined(__VMKLNX__)
-+static void tg3_sd_scan_scratchpad(struct tg3 *tp, struct tg3_ocir *ocir)
-+{
-+ int i;
-+
-+ for (i = 0; i < TG3_SD_NUM_RECS; i++, ocir++) {
-+ u32 off = i * TG3_OCIR_LEN, len = TG3_OCIR_LEN;
-+
-+ tg3_ape_scratchpad_read(tp, (u32 *) ocir, off, len);
-+ off += len;
-+
-+ if (ocir->signature != TG3_OCIR_SIG_MAGIC ||
-+ !(ocir->version_flags & TG3_OCIR_FLAG_ACTIVE))
-+ memset(ocir, 0, TG3_OCIR_LEN);
-+ }
-+}
-+
-+/* sysfs attributes for hwmon */
-+static ssize_t tg3_show_temp(struct device *dev,
-+ struct device_attribute *devattr, char *buf)
-+{
-+ struct pci_dev *pdev = to_pci_dev(dev);
-+ struct net_device *netdev = pci_get_drvdata(pdev);
-+ struct tg3 *tp = netdev_priv(netdev);
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ u32 temperature;
-+
-+ rtnl_lock();
-+ spin_lock_bh(&tp->lock);
-+ tg3_ape_scratchpad_read(tp, &temperature, attr->index,
-+ sizeof(temperature));
-+ spin_unlock_bh(&tp->lock);
-+ rtnl_unlock();
-+ return sprintf(buf, "%u\n", temperature);
-+}
-+
-+
-+static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, tg3_show_temp, NULL,
-+ TG3_TEMP_SENSOR_OFFSET);
-+static SENSOR_DEVICE_ATTR(temp1_crit, S_IRUGO, tg3_show_temp, NULL,
-+ TG3_TEMP_CAUTION_OFFSET);
-+static SENSOR_DEVICE_ATTR(temp1_max, S_IRUGO, tg3_show_temp, NULL,
-+ TG3_TEMP_MAX_OFFSET);
-+
-+static struct attribute *tg3_attributes[] = {
-+ &sensor_dev_attr_temp1_input.dev_attr.attr,
-+ &sensor_dev_attr_temp1_crit.dev_attr.attr,
-+ &sensor_dev_attr_temp1_max.dev_attr.attr,
-+ NULL
-+};
-+
-+static const struct attribute_group tg3_group = {
-+ .attrs = tg3_attributes,
-+};
-+
-+#endif
-+
-+static void tg3_hwmon_close(struct tg3 *tp)
-+{
-+#if IS_ENABLED(CONFIG_HWMON) && !defined(__VMKLNX__)
-+ if (tp->hwmon_dev) {
-+ hwmon_device_unregister(tp->hwmon_dev);
-+ tp->hwmon_dev = NULL;
-+ sysfs_remove_group(&tp->pdev->dev.kobj, &tg3_group);
-+ }
-+#endif
-+}
-+
-+static void tg3_hwmon_open(struct tg3 *tp)
-+{
-+#if IS_ENABLED(CONFIG_HWMON) && !defined(__VMKLNX__)
-+ int i, err;
-+ u32 size = 0;
-+ struct pci_dev *pdev = tp->pdev;
-+ struct tg3_ocir ocirs[TG3_SD_NUM_RECS];
-+
-+ tg3_sd_scan_scratchpad(tp, ocirs);
-+
-+ for (i = 0; i < TG3_SD_NUM_RECS; i++) {
-+ if (!ocirs[i].src_data_length)
-+ continue;
-+
-+ size += ocirs[i].src_hdr_length;
-+ size += ocirs[i].src_data_length;
-+ }
-+
-+ if (!size)
-+ return;
-+
-+ /* Register hwmon sysfs hooks */
-+ err = sysfs_create_group(&pdev->dev.kobj, &tg3_group);
-+ if (err) {
-+ dev_err(&pdev->dev, "Cannot create sysfs group, aborting\n");
-+ return;
-+ }
-+
-+ tp->hwmon_dev = hwmon_device_register(&pdev->dev);
-+ if (IS_ERR(tp->hwmon_dev)) {
-+ tp->hwmon_dev = NULL;
-+ dev_err(&pdev->dev, "Cannot register hwmon device, aborting\n");
-+ sysfs_remove_group(&pdev->dev.kobj, &tg3_group);
-+ }
-+#endif
-+}
-+
-+#define TG3_STAT_ADD32(PSTAT, REG) \
-+do { u32 __val = tr32(REG); \
-+ (PSTAT)->low += __val; \
-+ if ((PSTAT)->low < __val) \
-+ (PSTAT)->high += 1; \
-+} while (0)
-+
-+static void tg3_periodic_fetch_stats(struct tg3 *tp)
-+{
-+ struct tg3_hw_stats *sp = tp->hw_stats;
-+
-+ if (!tp->link_up)
-+ return;
-+
-+ TG3_STAT_ADD32(&sp->tx_octets, MAC_TX_STATS_OCTETS);
-+ TG3_STAT_ADD32(&sp->tx_collisions, MAC_TX_STATS_COLLISIONS);
-+ TG3_STAT_ADD32(&sp->tx_xon_sent, MAC_TX_STATS_XON_SENT);
-+ TG3_STAT_ADD32(&sp->tx_xoff_sent, MAC_TX_STATS_XOFF_SENT);
-+ TG3_STAT_ADD32(&sp->tx_mac_errors, MAC_TX_STATS_MAC_ERRORS);
-+ TG3_STAT_ADD32(&sp->tx_single_collisions, MAC_TX_STATS_SINGLE_COLLISIONS);
-+ TG3_STAT_ADD32(&sp->tx_mult_collisions, MAC_TX_STATS_MULT_COLLISIONS);
-+ TG3_STAT_ADD32(&sp->tx_deferred, MAC_TX_STATS_DEFERRED);
-+ TG3_STAT_ADD32(&sp->tx_excessive_collisions, MAC_TX_STATS_EXCESSIVE_COL);
-+ TG3_STAT_ADD32(&sp->tx_late_collisions, MAC_TX_STATS_LATE_COL);
-+ TG3_STAT_ADD32(&sp->tx_ucast_packets, MAC_TX_STATS_UCAST);
-+ TG3_STAT_ADD32(&sp->tx_mcast_packets, MAC_TX_STATS_MCAST);
-+ TG3_STAT_ADD32(&sp->tx_bcast_packets, MAC_TX_STATS_BCAST);
-+ if (unlikely(tg3_flag(tp, 5719_5720_RDMA_BUG) &&
-+ (sp->tx_ucast_packets.low + sp->tx_mcast_packets.low +
-+ sp->tx_bcast_packets.low) > TG3_NUM_RDMA_CHANNELS)) {
-+ u32 val;
-+
-+ val = tr32(TG3_LSO_RD_DMA_CRPTEN_CTRL);
-+ val &= ~tg3_lso_rd_dma_workaround_bit(tp);
-+ tw32(TG3_LSO_RD_DMA_CRPTEN_CTRL, val);
-+ tg3_flag_clear(tp, 5719_5720_RDMA_BUG);
-+ }
-+
-+ TG3_STAT_ADD32(&sp->rx_octets, MAC_RX_STATS_OCTETS);
-+ TG3_STAT_ADD32(&sp->rx_fragments, MAC_RX_STATS_FRAGMENTS);
-+ TG3_STAT_ADD32(&sp->rx_ucast_packets, MAC_RX_STATS_UCAST);
-+ TG3_STAT_ADD32(&sp->rx_mcast_packets, MAC_RX_STATS_MCAST);
-+ TG3_STAT_ADD32(&sp->rx_bcast_packets, MAC_RX_STATS_BCAST);
-+ TG3_STAT_ADD32(&sp->rx_fcs_errors, MAC_RX_STATS_FCS_ERRORS);
-+ TG3_STAT_ADD32(&sp->rx_align_errors, MAC_RX_STATS_ALIGN_ERRORS);
-+ TG3_STAT_ADD32(&sp->rx_xon_pause_rcvd, MAC_RX_STATS_XON_PAUSE_RECVD);
-+ TG3_STAT_ADD32(&sp->rx_xoff_pause_rcvd, MAC_RX_STATS_XOFF_PAUSE_RECVD);
-+ TG3_STAT_ADD32(&sp->rx_mac_ctrl_rcvd, MAC_RX_STATS_MAC_CTRL_RECVD);
-+ TG3_STAT_ADD32(&sp->rx_xoff_entered, MAC_RX_STATS_XOFF_ENTERED);
-+ TG3_STAT_ADD32(&sp->rx_frame_too_long_errors, MAC_RX_STATS_FRAME_TOO_LONG);
-+ TG3_STAT_ADD32(&sp->rx_jabbers, MAC_RX_STATS_JABBERS);
-+ TG3_STAT_ADD32(&sp->rx_undersize_packets, MAC_RX_STATS_UNDERSIZE);
-+
-+ TG3_STAT_ADD32(&sp->rxbds_empty, RCVLPC_NO_RCV_BD_CNT);
-+ if (tg3_asic_rev(tp) != ASIC_REV_5717 &&
-+ tg3_asic_rev(tp) != ASIC_REV_5762 &&
-+ tg3_chip_rev_id(tp) != CHIPREV_ID_5719_A0 &&
-+ tg3_chip_rev_id(tp) != CHIPREV_ID_5720_A0) {
-+ TG3_STAT_ADD32(&sp->rx_discards, RCVLPC_IN_DISCARDS_CNT);
-+ } else {
-+ u32 val = tr32(HOSTCC_FLOW_ATTN);
-+ val = (val & HOSTCC_FLOW_ATTN_MBUF_LWM) ? 1 : 0;
-+ if (val) {
-+ tw32(HOSTCC_FLOW_ATTN, HOSTCC_FLOW_ATTN_MBUF_LWM);
-+ sp->rx_discards.low += val;
-+ if (sp->rx_discards.low < val)
-+ sp->rx_discards.high += 1;
-+ }
-+ sp->mbuf_lwm_thresh_hit = sp->rx_discards;
-+ }
-+ TG3_STAT_ADD32(&sp->rx_errors, RCVLPC_IN_ERRORS_CNT);
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ tg3_vmware_fetch_stats(tp);
-+#endif
-+}
-+
-+static void tg3_chk_missed_msi(struct tg3 *tp)
-+{
-+ u32 i;
-+
-+ for (i = 0; i < tp->irq_cnt; i++) {
-+ struct tg3_napi *tnapi = &tp->napi[i];
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ if (!(tnapi->netq.flags & TG3_NETQ_RXQ_ENABLED) &&
-+ !(tnapi->netq.flags & TG3_NETQ_TXQ_ALLOCATED))
-+ continue;
-+#endif
-+
-+ if (tg3_has_work(tnapi)) {
-+ if (tnapi->last_rx_cons == tnapi->rx_rcb_ptr &&
-+ tnapi->last_tx_cons == tnapi->tx_cons) {
-+ if (tnapi->chk_msi_cnt < 1) {
-+ tnapi->chk_msi_cnt++;
-+ return;
-+ }
-+#ifdef BCM_HAS_NEW_IRQ_SIG
-+ tg3_msi(0, tnapi);
-+#else
-+ tg3_msi(0, tnapi, 0);
-+#endif
-+ }
-+ }
-+ tnapi->chk_msi_cnt = 0;
-+ tnapi->last_rx_cons = tnapi->rx_rcb_ptr;
-+ tnapi->last_tx_cons = tnapi->tx_cons;
-+ }
-+}
-+
-+static void tg3_timer(unsigned long __opaque)
-+{
-+ struct tg3 *tp = (struct tg3 *) __opaque;
-+
-+ if (tp->irq_sync || tg3_flag(tp, RESET_TASK_PENDING))
-+ goto restart_timer;
-+
-+ spin_lock(&tp->lock);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5717 ||
-+ tg3_flag(tp, 57765_CLASS))
-+ tg3_chk_missed_msi(tp);
-+
-+ if (tg3_flag(tp, FLUSH_POSTED_WRITES)) {
-+ /* BCM4785: Flush posted writes from GbE to host memory. */
-+ tr32(HOSTCC_MODE);
-+ }
-+
-+#if defined(__VMKLNX__)
-+ tg3_vmware_timer(tp);
-+#endif
-+
-+ if (!tg3_flag(tp, TAGGED_STATUS)) {
-+ /* All of this garbage is because when using non-tagged
-+ * IRQ status the mailbox/status_block protocol the chip
-+ * uses with the cpu is race prone.
-+ */
-+ if (tp->napi[0].hw_status->status & SD_STATUS_UPDATED) {
-+ tw32(GRC_LOCAL_CTRL,
-+ tp->grc_local_ctrl | GRC_LCLCTRL_SETINT);
-+ } else {
-+ tw32(HOSTCC_MODE, tp->coalesce_mode |
-+ HOSTCC_MODE_ENABLE | HOSTCC_MODE_NOW);
-+ }
-+
-+ if (!(tr32(WDMAC_MODE) & WDMAC_MODE_ENABLE)) {
-+ spin_unlock(&tp->lock);
-+ tg3_reset_task_schedule(tp);
-+ goto restart_timer;
-+ }
-+ }
-+
-+ /* This part only runs once per second. */
-+ if (!--tp->timer_counter) {
-+ if (tg3_flag(tp, 5705_PLUS))
-+ tg3_periodic_fetch_stats(tp);
-+
-+ if (tp->setlpicnt && !--tp->setlpicnt)
-+ tg3_phy_eee_enable(tp);
-+
-+ if (tg3_flag(tp, USE_LINKCHG_REG)) {
-+ u32 mac_stat;
-+ int phy_event;
-+
-+ mac_stat = tr32(MAC_STATUS);
-+
-+ phy_event = 0;
-+ if (tp->phy_flags & TG3_PHYFLG_USE_MI_INTERRUPT) {
-+ if (mac_stat & MAC_STATUS_MI_INTERRUPT)
-+ phy_event = 1;
-+ } else if (mac_stat & MAC_STATUS_LNKSTATE_CHANGED)
-+ phy_event = 1;
-+
-+ if (phy_event)
-+ tg3_setup_phy(tp, false);
-+ } else if (tg3_flag(tp, POLL_SERDES)) {
-+ u32 mac_stat = tr32(MAC_STATUS);
-+ int need_setup = 0;
-+
-+ if (tp->link_up &&
-+ (mac_stat & MAC_STATUS_LNKSTATE_CHANGED)) {
-+ need_setup = 1;
-+ }
-+ if (!tp->link_up &&
-+ (mac_stat & (MAC_STATUS_PCS_SYNCED |
-+ MAC_STATUS_SIGNAL_DET))) {
-+ need_setup = 1;
-+ }
-+ if (need_setup) {
-+ if (!tp->serdes_counter) {
-+ tw32_f(MAC_MODE,
-+ (tp->mac_mode &
-+ ~MAC_MODE_PORT_MODE_MASK));
-+ udelay(40);
-+ tw32_f(MAC_MODE, tp->mac_mode);
-+ udelay(40);
-+ }
-+ tg3_setup_phy(tp, false);
-+ }
-+ } else if ((tp->phy_flags & TG3_PHYFLG_MII_SERDES) &&
-+ tg3_flag(tp, 5780_CLASS)) {
-+ tg3_serdes_parallel_detect(tp);
-+ } else if (tg3_flag(tp, POLL_CPMU_LINK)) {
-+ u32 cpmu = tr32(TG3_CPMU_STATUS);
-+ bool link_up = !((cpmu & TG3_CPMU_STATUS_LINK_MASK) ==
-+ TG3_CPMU_STATUS_LINK_MASK);
-+
-+ if (link_up != tp->link_up)
-+ tg3_setup_phy(tp, false);
-+ }
-+
-+ tp->timer_counter = tp->timer_multiplier;
-+ }
-+
-+ /* Heartbeat is only sent once every 2 seconds.
-+ *
-+ * The heartbeat is to tell the ASF firmware that the host
-+ * driver is still alive. In the event that the OS crashes,
-+ * ASF needs to reset the hardware to free up the FIFO space
-+ * that may be filled with rx packets destined for the host.
-+ * If the FIFO is full, ASF will no longer function properly.
-+ *
-+ * Unintended resets have been reported on real time kernels
-+ * where the timer doesn't run on time. Netpoll will also have
-+ * same problem.
-+ *
-+ * The new FWCMD_NICDRV_ALIVE3 command tells the ASF firmware
-+ * to check the ring condition when the heartbeat is expiring
-+ * before doing the reset. This will prevent most unintended
-+ * resets.
-+ */
-+ if (!--tp->asf_counter) {
-+ if (tg3_flag(tp, ENABLE_ASF) && !tg3_flag(tp, ENABLE_APE)) {
-+ tg3_wait_for_event_ack(tp);
-+
-+ tg3_write_mem(tp, NIC_SRAM_FW_CMD_MBOX,
-+ FWCMD_NICDRV_ALIVE3);
-+ tg3_write_mem(tp, NIC_SRAM_FW_CMD_LEN_MBOX, 4);
-+ tg3_write_mem(tp, NIC_SRAM_FW_CMD_DATA_MBOX,
-+ TG3_FW_UPDATE_TIMEOUT_SEC);
-+
-+ tg3_generate_fw_event(tp);
-+ }
-+ tp->asf_counter = tp->asf_multiplier;
-+ }
-+
-+ /* Update the APE heartbeat every 5 seconds.*/
-+ tg3_send_ape_heartbeat(tp, TG3_APE_HB_INTERVAL);
-+
-+ spin_unlock(&tp->lock);
-+
-+restart_timer:
-+ tp->timer.expires = jiffies + tp->timer_offset;
-+ add_timer(&tp->timer);
-+}
-+
-+static void __devinit tg3_timer_init(struct tg3 *tp)
-+{
-+ if (tg3_flag(tp, TAGGED_STATUS) &&
-+ tg3_asic_rev(tp) != ASIC_REV_5717 &&
-+ !tg3_flag(tp, 57765_CLASS))
-+ tp->timer_offset = HZ;
-+ else
-+ tp->timer_offset = HZ / 10;
-+
-+ BUG_ON(tp->timer_offset > HZ);
-+
-+ tp->timer_multiplier = (HZ / tp->timer_offset);
-+ tp->asf_multiplier = (HZ / tp->timer_offset) *
-+ TG3_FW_UPDATE_FREQ_SEC;
-+
-+ init_timer(&tp->timer);
-+ tp->timer.data = (unsigned long) tp;
-+ tp->timer.function = tg3_timer;
-+}
-+
-+static void tg3_timer_start(struct tg3 *tp)
-+{
-+ tp->asf_counter = tp->asf_multiplier;
-+ tp->timer_counter = tp->timer_multiplier;
-+
-+ tp->timer.expires = jiffies + tp->timer_offset;
-+ add_timer(&tp->timer);
-+}
-+
-+static void tg3_timer_stop(struct tg3 *tp)
-+{
-+ del_timer_sync(&tp->timer);
-+}
-+
-+/* Restart hardware after configuration changes, self-test, etc.
-+ * Invoked with tp->lock held.
-+ */
-+static int tg3_restart_hw(struct tg3 *tp, bool reset_phy)
-+ __releases(tp->lock)
-+ __acquires(tp->lock)
-+{
-+ int err;
-+
-+ err = tg3_init_hw(tp, reset_phy);
-+ if (err) {
-+ netdev_err(tp->dev,
-+ "Failed to re-initialize device, aborting\n");
-+ tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
-+ tg3_full_unlock(tp);
-+ tg3_timer_stop(tp);
-+ tp->irq_sync = 0;
-+ tg3_napi_enable(tp);
-+ dev_close(tp->dev);
-+ tg3_full_lock(tp, 0);
-+ }
-+ return err;
-+}
-+
-+#ifdef BCM_HAS_NEW_INIT_WORK
-+static void tg3_reset_task(struct work_struct *work)
-+#else
-+static void tg3_reset_task(void *_data)
-+#endif
-+{
-+#ifdef BCM_HAS_NEW_INIT_WORK
-+ struct tg3 *tp = container_of(work, struct tg3, reset_task);
-+#else
-+ struct tg3 *tp = _data;
-+#endif
-+ int err;
-+
-+ tg3_full_lock(tp, 0);
-+
-+ if (!netif_running(tp->dev)) {
-+ tg3_flag_clear(tp, RESET_TASK_PENDING);
-+ tg3_full_unlock(tp);
-+ return;
-+ }
-+
-+ tg3_full_unlock(tp);
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ /* Prevent any netqueue operations while we are resetting. */
-+ if (tg3_flag(tp, ENABLE_IOV))
-+ rtnl_lock();
-+#endif
-+
-+#if !defined(__VMKLNX__)
-+ rtnl_lock();
-+
-+ if (tp->unrecoverable_err) {
-+ dev_close(tp->dev);
-+ netdev_err(tp->dev, "Device moved to closed state due to unrecoverable error\n");
-+ goto out2;
-+ }
-+#endif
-+
-+ tg3_phy_stop(tp);
-+
-+ tg3_netif_stop(tp);
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ tg3_netq_invalidate_state(tp);
-+#endif
-+
-+ tg3_full_lock(tp, 1);
-+
-+ if (tg3_flag(tp, TX_RECOVERY_PENDING)) {
-+ tp->write32_tx_mbox = tg3_write32_tx_mbox;
-+ tp->write32_rx_mbox = tg3_write_flush_reg32;
-+ tg3_flag_set(tp, MBOX_WRITE_REORDER);
-+ tg3_flag_clear(tp, TX_RECOVERY_PENDING);
-+ }
-+
-+ tg3_halt(tp, RESET_KIND_SHUTDOWN, 0);
-+ err = tg3_init_hw(tp, true);
-+#if defined(__VMKLNX__)
-+ if (err) {
-+ if (printk_ratelimit()) {
-+ printk(KERN_ERR "tg3_init_hw failed in tg3_init_task\n");
-+ }
-+ tp->irq_sync = 0;
-+ tg3_napi_enable(tp);
-+ goto out;
-+ }
-+#else /* !defined(__VMKLNX__) */
-+ if (err)
-+ goto out;
-+#endif /* defined(__VMKLNX__) */
-+
-+ tg3_netif_start(tp);
-+
-+out:
-+ tg3_full_unlock(tp);
-+
-+ if (!err)
-+ tg3_phy_start(tp);
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ if (tg3_flag(tp, ENABLE_IOV))
-+ rtnl_unlock();
-+#endif
-+
-+#if !defined(__VMKLNX__)
-+out2:
-+ rtnl_unlock();
-+#endif
-+
-+ tg3_flag_clear(tp, RESET_TASK_PENDING);
-+}
-+
-+static int tg3_request_irq(struct tg3 *tp, int irq_num)
-+{
-+#ifdef BCM_HAS_NEW_IRQ_SIG
-+ irq_handler_t fn;
-+#else
-+ irqreturn_t (*fn)(int, void *, struct pt_regs *);
-+#endif
-+ unsigned long flags;
-+ char *name;
-+ struct tg3_napi *tnapi = &tp->napi[irq_num];
-+
-+ if (tp->irq_cnt == 1)
-+ name = tp->dev->name;
-+ else {
-+ name = &tnapi->irq_lbl[0];
-+ if (tnapi->tx_buffers && tnapi->rx_rcb)
-+ snprintf(name, IFNAMSIZ,
-+ "%s-txrx-%d", tp->dev->name, irq_num);
-+ else if (tnapi->tx_buffers)
-+ snprintf(name, IFNAMSIZ,
-+ "%s-tx-%d", tp->dev->name, irq_num);
-+ else if (tnapi->rx_rcb)
-+ snprintf(name, IFNAMSIZ,
-+ "%s-rx-%d", tp->dev->name, irq_num);
-+ else
-+ snprintf(name, IFNAMSIZ,
-+ "%s-%d", tp->dev->name, irq_num);
-+ name[IFNAMSIZ-1] = 0;
-+ }
-+
-+ if (tg3_flag(tp, USING_MSI) || tg3_flag(tp, USING_MSIX)) {
-+ fn = tg3_msi;
-+ if (tg3_flag(tp, 1SHOT_MSI))
-+ fn = tg3_msi_1shot;
-+ flags = 0;
-+ } else {
-+ fn = tg3_interrupt;
-+ if (tg3_flag(tp, TAGGED_STATUS))
-+ fn = tg3_interrupt_tagged;
-+ flags = IRQF_SHARED;
-+ }
-+
-+ return request_irq(tnapi->irq_vec, fn, flags, name, tnapi);
-+}
-+
-+static int tg3_test_interrupt(struct tg3 *tp)
-+{
-+ struct tg3_napi *tnapi = &tp->napi[0];
-+ struct net_device *dev = tp->dev;
-+ int err, i, intr_ok = 0;
-+ u32 val;
-+
-+ if (!netif_running(dev))
-+ return -ENODEV;
-+
-+ tg3_disable_ints(tp);
-+
-+ free_irq(tnapi->irq_vec, tnapi);
-+
-+ /*
-+ * Turn off MSI one shot mode. Otherwise this test has no
-+ * observable way to know whether the interrupt was delivered.
-+ */
-+ if (tg3_flag(tp, 57765_PLUS)) {
-+ val = tr32(MSGINT_MODE) | MSGINT_MODE_ONE_SHOT_DISABLE;
-+ tw32(MSGINT_MODE, val);
-+ }
-+
-+ err = request_irq(tnapi->irq_vec, tg3_test_isr,
-+ IRQF_SHARED, dev->name, tnapi);
-+ if (err)
-+ return err;
-+
-+ tnapi->hw_status->status &= ~SD_STATUS_UPDATED;
-+ tg3_enable_ints(tp);
-+
-+ tw32_f(HOSTCC_MODE, tp->coalesce_mode | HOSTCC_MODE_ENABLE |
-+ tnapi->coal_now);
-+
-+ for (i = 0; i < 5; i++) {
-+ u32 int_mbox, misc_host_ctrl;
-+
-+ int_mbox = tr32_mailbox(tnapi->int_mbox);
-+ misc_host_ctrl = tr32(TG3PCI_MISC_HOST_CTRL);
-+
-+ if ((int_mbox != 0) ||
-+ (misc_host_ctrl & MISC_HOST_CTRL_MASK_PCI_INT)) {
-+ intr_ok = 1;
-+ break;
-+ }
-+
-+ if (tg3_flag(tp, 57765_PLUS) &&
-+ tnapi->hw_status->status_tag != tnapi->last_tag)
-+ tw32_mailbox_f(tnapi->int_mbox, tnapi->last_tag << 24);
-+
-+ msleep(10);
-+ }
-+
-+ tg3_disable_ints(tp);
-+
-+ free_irq(tnapi->irq_vec, tnapi);
-+
-+ err = tg3_request_irq(tp, 0);
-+
-+ if (err)
-+ return err;
-+
-+ if (intr_ok) {
-+ /* Reenable MSI one shot mode. */
-+ if (tg3_flag(tp, 57765_PLUS) && tg3_flag(tp, 1SHOT_MSI)) {
-+ val = tr32(MSGINT_MODE) & ~MSGINT_MODE_ONE_SHOT_DISABLE;
-+ tw32(MSGINT_MODE, val);
-+ }
-+ return 0;
-+ }
-+
-+ return -EIO;
-+}
-+
-+#ifdef CONFIG_PCI_MSI
-+/* Returns 0 if MSI test succeeds or MSI test fails and INTx mode is
-+ * successfully restored
-+ */
-+static int tg3_test_msi(struct tg3 *tp)
-+{
-+ int err;
-+ u16 pci_cmd;
-+
-+ if (!tg3_flag(tp, USING_MSI))
-+ return 0;
-+
-+ /* Turn off SERR reporting in case MSI terminates with Master
-+ * Abort.
-+ */
-+ pci_read_config_word(tp->pdev, PCI_COMMAND, &pci_cmd);
-+ pci_write_config_word(tp->pdev, PCI_COMMAND,
-+ pci_cmd & ~PCI_COMMAND_SERR);
-+
-+ err = tg3_test_interrupt(tp);
-+
-+ pci_write_config_word(tp->pdev, PCI_COMMAND, pci_cmd);
-+
-+ if (!err)
-+ return 0;
-+
-+ /* other failures */
-+ if (err != -EIO)
-+ return err;
-+
-+ /* MSI test failed, go back to INTx mode */
-+ netdev_warn(tp->dev, "No interrupt was generated using MSI. Switching "
-+ "to INTx mode. Please report this failure to the PCI "
-+ "maintainer and include system chipset information\n");
-+
-+ free_irq(tp->napi[0].irq_vec, &tp->napi[0]);
-+
-+ pci_disable_msi(tp->pdev);
-+
-+ tg3_flag_clear(tp, USING_MSI);
-+ tp->napi[0].irq_vec = tp->pdev->irq;
-+
-+ err = tg3_request_irq(tp, 0);
-+ if (err)
-+ return err;
-+
-+ /* Need to reset the chip because the MSI cycle may have terminated
-+ * with Master Abort.
-+ */
-+ tg3_full_lock(tp, 1);
-+
-+ tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
-+ err = tg3_init_hw(tp, true);
-+
-+ tg3_full_unlock(tp);
-+
-+ if (err)
-+ free_irq(tp->napi[0].irq_vec, &tp->napi[0]);
-+
-+ return err;
-+}
-+#endif /* CONFIG_PCI_MSI */
-+
-+static int tg3_request_firmware(struct tg3 *tp)
-+{
-+ const struct tg3_firmware_hdr *fw_hdr;
-+
-+ if (tg3_priv_request_firmware(&tp->fw, tp->fw_needed, &tp->pdev->dev)) {
-+ netdev_err(tp->dev, "Failed to load firmware \"%s\"\n",
-+ tp->fw_needed);
-+ return -ENOENT;
-+ }
-+
-+ fw_hdr = (struct tg3_firmware_hdr *)tp->fw->data;
-+
-+ /* Firmware blob starts with version numbers, followed by
-+ * start address and _full_ length including BSS sections
-+ * (which must be longer than the actual data, of course
-+ */
-+
-+ tp->fw_len = fw_hdr->len; /* includes bss */
-+ if (tp->fw_len < (tp->fw->size - TG3_FW_HDR_LEN)) {
-+ netdev_err(tp->dev, "bogus length %d in \"%s\"\n",
-+ tp->fw_len, tp->fw_needed);
-+ tg3_priv_release_firmware(tp->fw);
-+ tp->fw = NULL;
-+ return -EINVAL;
-+ }
-+
-+ /* We no longer need firmware; we have it. */
-+ tp->fw_needed = NULL;
-+ return 0;
-+}
-+
-+#if defined(CONFIG_PCI_MSI)
-+static bool tg3_ints_alloc_vectors(struct tg3 *tp)
-+{
-+ int i, rc;
-+ struct msix_entry msix_ent[TG3_IRQ_MAX_VECS];
-+
-+ for (i = 0; i < tp->irq_max; i++) {
-+ msix_ent[i].entry = i;
-+ msix_ent[i].vector = 0;
-+ }
-+
-+ rc = tp->irq_cnt;
-+ while (1) {
-+ int ret;
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ if (!tg3_flag(tp, IOV_CAPABLE))
-+#endif
-+ /* If the kernel says that only two MSI-X
-+ * vectors are available, fallback to a simpler
-+ * single queue, single vector MSI-X mode.
-+ */
-+ if (rc == 2)
-+ rc--;
-+
-+ ret = pci_enable_msix(tp->pdev, msix_ent, rc);
-+ if (ret < 0)
-+ return false;
-+ else if (ret == 0)
-+ break;
-+ rc = ret;
-+ }
-+ tp->irq_cnt = rc;
-+
-+ for (i = 0; i < tp->irq_max; i++)
-+ tp->napi[i].irq_vec = msix_ent[i].vector;
-+
-+ return true;
-+}
-+
-+static inline u32 tg3_irq_count(struct tg3 *tp)
-+{
-+ u32 irq_cnt = max(tp->rxq_cnt, tp->txq_cnt);
-+#if defined(TG3_INBOX)
-+ return TG3_IRQ_MAX_VECS;
-+#endif
-+ if (irq_cnt > 1) {
-+ /* We want as many rx rings enabled as there are cpus.
-+ * In multiqueue MSI-X mode, the first MSI-X vector
-+ * only deals with link interrupts, etc, so we add
-+ * one to the number of vectors we are requesting.
-+ */
-+ irq_cnt = min_t(unsigned, irq_cnt + 1, tp->irq_max);
-+ }
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ if (tg3_flag(tp, IOV_CAPABLE))
-+ irq_cnt = tg3_netq_tune_vector_count(tp);
-+#endif
-+
-+ return irq_cnt;
-+}
-+
-+static bool tg3_enable_msix(struct tg3 *tp)
-+{
-+ u32 cpus, irq_cnt;
-+
-+ cpus = num_online_cpus();
-+
-+ tp->txq_cnt = tp->txq_req;
-+ tp->rxq_cnt = tp->rxq_req;
-+
-+ /* Disable multiple TX rings by default. Simple round-robin hardware
-+ * scheduling of the TX rings can cause starvation of rings with
-+ * small packets when other rings have TSO or jumbo packets.
-+ */
-+ if (!tp->txq_cnt)
-+ tp->txq_cnt = 1;
-+ if (!tp->rxq_cnt)
-+ tp->rxq_cnt = min(cpus, tp->rxq_max);
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ tg3_netq_limit_dflt_queue_counts(tp);
-+#endif
-+
-+ irq_cnt = tg3_irq_count(tp);
-+
-+ tp->irq_cnt = irq_cnt;
-+ while (tp->irq_cnt) {
-+ u32 rxq_cnt, new_irq_cnt;
-+
-+ if (!tg3_ints_alloc_vectors(tp))
-+ return false;
-+
-+ /* If the number of interrupts is less than our desired queue
-+ * count, adjust the queue count downwards to match.
-+ */
-+ rxq_cnt = tp->irq_cnt;
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ if (!tg3_flag(tp, IOV_CAPABLE))
-+#endif
-+ if (tp->irq_cnt > 1)
-+ rxq_cnt--;
-+
-+ rxq_cnt = min(rxq_cnt, tp->rxq_cnt);
-+ tp->rxq_cnt = rxq_cnt;
-+
-+#ifdef BCM_HAS_STRUCT_NETDEV_QUEUE
-+ while (rxq_cnt) {
-+ if (netif_set_real_num_rx_queues(tp->dev, rxq_cnt))
-+ rxq_cnt--;
-+ else
-+ break;
-+ }
-+
-+ if (!rxq_cnt) {
-+ pci_disable_msix(tp->pdev);
-+ return false;
-+ }
-+#endif /* BCM_HAS_STRUCT_NETDEV_QUEUE */
-+
-+ if (tp->rxq_cnt == rxq_cnt)
-+ break;
-+
-+ tp->rxq_cnt = rxq_cnt;
-+
-+ /* See if we can free up any unused MSI-X vectors. */
-+ new_irq_cnt = tg3_irq_count(tp);
-+
-+ /* If the IRQ count is the same, we need
-+ * the extra interrupts for the tx side.
-+ */
-+ if (irq_cnt == new_irq_cnt)
-+ break;
-+
-+ /* Free unused interrupts and reallocate the exact amount. */
-+ pci_disable_msix(tp->pdev);
-+ tp->irq_cnt = new_irq_cnt;
-+ }
-+
-+ if (irq_cnt != tp->irq_cnt)
-+ netdev_notice(tp->dev,
-+ "Requested %d MSI-X vectors, received %d\n",
-+ irq_cnt, tp->irq_cnt);
-+
-+ if (tp->irq_cnt == 1)
-+ return true;
-+
-+ /* If more than one interrupt vector is allocated, we _need_ to enable
-+ * either IOV mode or RSS mode, even if only one rx queue is desired.
-+ * If we don't, TSS will not work.
-+ */
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ if (tg3_flag(tp, IOV_CAPABLE)) {
-+ tg3_flag_set(tp, ENABLE_IOV);
-+ } else
-+#endif
-+ tg3_flag_set(tp, ENABLE_RSS);
-+
-+ tp->txq_cnt = min(tp->txq_cnt, tp->irq_cnt - 1);
-+ if (tp->txq_cnt > 1)
-+ tg3_flag_set(tp, ENABLE_TSS);
-+
-+#ifdef BCM_HAS_STRUCT_NETDEV_QUEUE
-+ netif_set_real_num_tx_queues(tp->dev, tp->txq_cnt);
-+#endif
-+
-+ return true;
-+}
-+#endif
-+
-+static void tg3_ints_init(struct tg3 *tp)
-+{
-+#ifdef CONFIG_PCI_MSI
-+ if ((tg3_flag(tp, SUPPORT_MSI) || tg3_flag(tp, SUPPORT_MSIX)) &&
-+ !tg3_flag(tp, TAGGED_STATUS)) {
-+ /* All MSI supporting chips should support tagged
-+ * status. Assert that this is the case.
-+ */
-+ netdev_warn(tp->dev,
-+ "MSI without TAGGED_STATUS? Not using MSI\n");
-+ goto defcfg;
-+ }
-+
-+ if (tg3_flag(tp, SUPPORT_MSIX) && tg3_enable_msix(tp))
-+ tg3_flag_set(tp, USING_MSIX);
-+ else if (tg3_flag(tp, SUPPORT_MSI) && pci_enable_msi(tp->pdev) == 0)
-+ tg3_flag_set(tp, USING_MSI);
-+
-+ tg3_5780_class_intx_workaround(tp);
-+
-+ if (tg3_flag(tp, USING_MSI) || tg3_flag(tp, USING_MSIX)) {
-+ u32 msi_mode = tr32(MSGINT_MODE);
-+ if (tg3_flag(tp, USING_MSIX) && tp->irq_cnt > 1)
-+ msi_mode |= MSGINT_MODE_MULTIVEC_EN;
-+ if (!tg3_flag(tp, 1SHOT_MSI))
-+ msi_mode |= MSGINT_MODE_ONE_SHOT_DISABLE;
-+ tw32(MSGINT_MODE, msi_mode | MSGINT_MODE_ENABLE);
-+ }
-+defcfg:
-+#endif
-+
-+ if (!tg3_flag(tp, USING_MSIX)) {
-+ tp->irq_cnt = 1;
-+ tp->napi[0].irq_vec = tp->pdev->irq;
-+ }
-+
-+ if (tp->irq_cnt == 1) {
-+ tp->txq_cnt = 1;
-+ tp->rxq_cnt = 1;
-+#ifdef BCM_HAS_STRUCT_NETDEV_QUEUE
-+ netif_set_real_num_tx_queues(tp->dev, 1);
-+ netif_set_real_num_rx_queues(tp->dev, 1);
-+#endif
-+ }
-+}
-+
-+static void tg3_ints_fini(struct tg3 *tp)
-+{
-+#ifdef CONFIG_PCI_MSI
-+ if (tg3_flag(tp, USING_MSIX))
-+ pci_disable_msix(tp->pdev);
-+ else if (tg3_flag(tp, USING_MSI))
-+ pci_disable_msi(tp->pdev);
-+#endif
-+ tg3_flag_clear(tp, USING_MSI);
-+ tg3_flag_clear(tp, USING_MSIX);
-+ tg3_flag_clear(tp, ENABLE_RSS);
-+ tg3_flag_clear(tp, ENABLE_TSS);
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ tg3_flag_clear(tp, ENABLE_IOV);
-+#endif
-+}
-+
-+static int tg3_start(struct tg3 *tp, bool reset_phy, bool test_irq,
-+ bool init)
-+{
-+ struct net_device *dev = tp->dev;
-+ int i, err;
-+
-+ /*
-+ * Setup interrupts first so we know how
-+ * many NAPI resources to allocate
-+ */
-+ tg3_ints_init(tp);
-+
-+ tg3_rss_check_indir_tbl(tp);
-+
-+ /* The placement of this call is tied
-+ * to the setup and use of Host TX descriptors.
-+ */
-+ err = tg3_alloc_consistent(tp);
-+ if (err)
-+ goto out_ints_fini;
-+
-+ tg3_napi_init(tp);
-+
-+ /* napi is disabled by default after init
-+ * Assertion may occur when freeing an IRQ vector
-+ * that has NAPI scheduled and associated. Thus,
-+ * we need to ensure napi is disabled prior to
-+ * freeing an irq.
-+ */
-+ for (i = 0; i < tp->irq_cnt; i++) {
-+ struct tg3_napi *tnapi = &tp->napi[i];
-+ err = tg3_request_irq(tp, i);
-+ if (err) {
-+ for (i--; i >= 0; i--) {
-+ tnapi = &tp->napi[i];
-+ free_irq(tnapi->irq_vec, tnapi);
-+ }
-+ goto out_napi_fini;
-+ }
-+ }
-+
-+ if (init)
-+ tg3_ape_driver_state_change(tp, RESET_KIND_INIT);
-+
-+ tg3_full_lock(tp, 0);
-+
-+ err = tg3_init_hw(tp, reset_phy);
-+ if (err) {
-+ tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
-+ tg3_free_rings(tp);
-+ }
-+
-+ tg3_full_unlock(tp);
-+
-+ if (err)
-+ goto out_free_irq;
-+
-+#ifdef CONFIG_PCI_MSI
-+ if (test_irq && tg3_flag(tp, USING_MSI)) {
-+ err = tg3_test_msi(tp);
-+
-+ if (err) {
-+ tg3_full_lock(tp, 0);
-+ tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
-+ tg3_free_rings(tp);
-+ tg3_full_unlock(tp);
-+
-+ goto out_napi_fini;
-+ }
-+
-+ if (!tg3_flag(tp, 57765_PLUS) && tg3_flag(tp, USING_MSI)) {
-+ u32 val = tr32(PCIE_TRANSACTION_CFG);
-+
-+ tw32(PCIE_TRANSACTION_CFG,
-+ val | PCIE_TRANS_CFG_1SHOT_MSI);
-+ }
-+ }
-+#endif
-+
-+ tg3_napi_enable(tp);
-+
-+ tg3_phy_start(tp);
-+
-+ tg3_hwmon_open(tp);
-+
-+ tg3_full_lock(tp, 0);
-+
-+ tg3_timer_start(tp);
-+
-+ /* JIRA-20238: This fix is to make sure the first heartbeat
-+ * occurs within 5 second interval even if the jiffy value
-+ * is very high. When using time_after() check a higher jiffy
-+ * value makes it –ve when it is type casted to long on 32 bit
-+ * kernel, as long is only 4 bytes. Due to this time_after
-+ * check will not provide incorrect result.
-+ */
-+ if (tg3_flag(tp, ENABLE_APE))
-+ tp->ape_hb_jiffies = jiffies;
-+
-+ tg3_flag_set(tp, INIT_COMPLETE);
-+ if (init)
-+ tg3_ptp_init(tp);
-+ else
-+ tg3_ptp_resume(tp);
-+
-+ tg3_enable_ints(tp);
-+
-+ tg3_full_unlock(tp);
-+
-+ netif_tx_start_all_queues(dev);
-+
-+#ifdef BCM_HAS_FIX_FEATURES
-+ /*
-+ * Reset loopback feature if it was turned on while the device was down
-+ * make sure that it's installed properly now.
-+ */
-+ if (dev->features & NETIF_F_LOOPBACK)
-+ tg3_set_loopback(dev, dev->features);
-+#endif
-+
-+ return 0;
-+
-+out_free_irq:
-+ for (i = tp->irq_cnt - 1; i >= 0; i--) {
-+ struct tg3_napi *tnapi = &tp->napi[i];
-+ free_irq(tnapi->irq_vec, tnapi);
-+ }
-+
-+out_napi_fini:
-+ tg3_napi_fini(tp);
-+ tg3_free_consistent(tp);
-+
-+out_ints_fini:
-+ tg3_ints_fini(tp);
-+
-+ return err;
-+}
-+
-+static void tg3_stop(struct tg3 *tp)
-+{
-+ int i;
-+
-+#if !defined(__VMKLNX__)
-+ if (!tp->unrecoverable_err)
-+ tg3_reset_task_cancel(tp);
-+#else
-+ tg3_reset_task_cancel(tp);
-+#endif
-+
-+ tg3_netif_stop(tp);
-+
-+ tg3_timer_stop(tp);
-+
-+ tg3_hwmon_close(tp);
-+
-+ tg3_phy_stop(tp);
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ tg3_netq_invalidate_state(tp);
-+#endif
-+
-+ tg3_full_lock(tp, 1);
-+
-+ tg3_disable_ints(tp);
-+
-+ tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
-+ tg3_free_rings(tp);
-+ tg3_flag_clear(tp, INIT_COMPLETE);
-+
-+ tg3_full_unlock(tp);
-+
-+ /* napi should be disabled after netif_stop already */
-+ for (i = tp->irq_cnt - 1; i >= 0; i--) {
-+ struct tg3_napi *tnapi = &tp->napi[i];
-+ free_irq(tnapi->irq_vec, tnapi);
-+ }
-+
-+ tg3_napi_fini(tp);
-+
-+ tg3_ints_fini(tp);
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ tg3_netq_stats_clear(tp);
-+#endif
-+
-+ tg3_free_consistent(tp);
-+}
-+
-+static int tg3_open(struct net_device *dev)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ int err;
-+
-+ if (tp->fw_needed) {
-+ err = tg3_request_firmware(tp);
-+ if (tg3_asic_rev(tp) == ASIC_REV_57766) {
-+ if (err) {
-+ netdev_warn(tp->dev, "EEE capability disabled\n");
-+ tp->phy_flags &= ~TG3_PHYFLG_EEE_CAP;
-+ } else if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP)) {
-+ netdev_warn(tp->dev, "EEE capability restored\n");
-+ tp->phy_flags |= TG3_PHYFLG_EEE_CAP;
-+ }
-+ } else if (tg3_chip_rev_id(tp) == CHIPREV_ID_5701_A0) {
-+ if (err)
-+ return err;
-+ } else if (err) {
-+ netdev_warn(tp->dev, "TSO capability disabled\n");
-+ tg3_flag_clear(tp, TSO_CAPABLE);
-+ } else if (!tg3_flag(tp, TSO_CAPABLE)) {
-+ netdev_notice(tp->dev, "TSO capability restored\n");
-+ tg3_flag_set(tp, TSO_CAPABLE);
-+ }
-+ }
-+
-+ tg3_carrier_off(tp);
-+
-+ err = tg3_power_up(tp);
-+ if (err)
-+ return err;
-+
-+ tg3_full_lock(tp, 0);
-+
-+ tg3_disable_ints(tp);
-+ tg3_flag_clear(tp, INIT_COMPLETE);
-+
-+ tg3_full_unlock(tp);
-+
-+ err = tg3_start(tp,
-+ !(tp->phy_flags & TG3_PHYFLG_KEEP_LINK_ON_PWRDN),
-+ true, true);
-+ if (err) {
-+ tg3_frob_aux_power(tp, false);
-+ pci_set_power_state(tp->pdev, PCI_D3hot);
-+ }
-+
-+#if IS_ENABLED(CONFIG_PTP_1588_CLOCK)
-+ if (tg3_flag(tp, PTP_CAPABLE)) {
-+#ifdef BCM_HAS_PTP_CLOCK_REG_HAS_PARENT
-+ tp->ptp_clock = ptp_clock_register(&tp->ptp_info,
-+ &tp->pdev->dev);
-+#else
-+ tp->ptp_clock = ptp_clock_register(&tp->ptp_info);
-+#endif
-+ if (IS_ERR(tp->ptp_clock))
-+ tp->ptp_clock = NULL;
-+ }
-+#endif
-+
-+ return err;
-+}
-+
-+static int tg3_close(struct net_device *dev)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ tg3_ptp_fini(tp);
-+
-+ tg3_stop(tp);
-+
-+ tg3_flag_clear(tp, INIT_COMPLETE);
-+
-+ /* Clear stats across close / open calls */
-+ memset(&tp->net_stats_prev, 0, sizeof(tp->net_stats_prev));
-+ memset(&tp->estats_prev, 0, sizeof(tp->estats_prev));
-+
-+ if (pci_device_is_present(tp->pdev)) {
-+ tg3_power_down_prepare(tp);
-+
-+ tg3_carrier_off(tp);
-+ }
-+ return 0;
-+}
-+
-+static inline u64 get_stat64(tg3_stat64_t *val)
-+{
-+ return ((u64)val->high << 32) | ((u64)val->low);
-+}
-+
-+static u64 tg3_calc_crc_errors(struct tg3 *tp)
-+{
-+ struct tg3_hw_stats *hw_stats = tp->hw_stats;
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_PHY_SERDES) &&
-+ (tg3_asic_rev(tp) == ASIC_REV_5700 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5701)) {
-+ u32 val;
-+
-+ if (!tg3_readphy(tp, MII_TG3_TEST1, &val)) {
-+ tg3_writephy(tp, MII_TG3_TEST1,
-+ val | MII_TG3_TEST1_CRC_EN);
-+ tg3_readphy(tp, MII_TG3_RXR_COUNTERS, &val);
-+ } else
-+ val = 0;
-+
-+ tp->phy_crc_errors += val;
-+
-+ return tp->phy_crc_errors;
-+ }
-+
-+ return get_stat64(&hw_stats->rx_fcs_errors);
-+}
-+
-+#define ESTAT_ADD(member) \
-+ estats->member = old_estats->member + \
-+ get_stat64(&hw_stats->member)
-+
-+static void tg3_get_estats(struct tg3 *tp, struct tg3_ethtool_stats *estats)
-+{
-+ struct tg3_ethtool_stats *old_estats = &tp->estats_prev;
-+ struct tg3_hw_stats *hw_stats = tp->hw_stats;
-+
-+ ESTAT_ADD(rx_octets);
-+ ESTAT_ADD(rx_fragments);
-+ ESTAT_ADD(rx_ucast_packets);
-+ ESTAT_ADD(rx_mcast_packets);
-+ ESTAT_ADD(rx_bcast_packets);
-+ ESTAT_ADD(rx_fcs_errors);
-+ ESTAT_ADD(rx_align_errors);
-+ ESTAT_ADD(rx_xon_pause_rcvd);
-+ ESTAT_ADD(rx_xoff_pause_rcvd);
-+ ESTAT_ADD(rx_mac_ctrl_rcvd);
-+ ESTAT_ADD(rx_xoff_entered);
-+ ESTAT_ADD(rx_frame_too_long_errors);
-+ ESTAT_ADD(rx_jabbers);
-+ ESTAT_ADD(rx_undersize_packets);
-+ ESTAT_ADD(rx_in_length_errors);
-+ ESTAT_ADD(rx_out_length_errors);
-+ ESTAT_ADD(rx_64_or_less_octet_packets);
-+ ESTAT_ADD(rx_65_to_127_octet_packets);
-+ ESTAT_ADD(rx_128_to_255_octet_packets);
-+ ESTAT_ADD(rx_256_to_511_octet_packets);
-+ ESTAT_ADD(rx_512_to_1023_octet_packets);
-+ ESTAT_ADD(rx_1024_to_1522_octet_packets);
-+ ESTAT_ADD(rx_1523_to_2047_octet_packets);
-+ ESTAT_ADD(rx_2048_to_4095_octet_packets);
-+ ESTAT_ADD(rx_4096_to_8191_octet_packets);
-+ ESTAT_ADD(rx_8192_to_9022_octet_packets);
-+
-+ ESTAT_ADD(tx_octets);
-+ ESTAT_ADD(tx_collisions);
-+ ESTAT_ADD(tx_xon_sent);
-+ ESTAT_ADD(tx_xoff_sent);
-+ ESTAT_ADD(tx_flow_control);
-+ ESTAT_ADD(tx_mac_errors);
-+ ESTAT_ADD(tx_single_collisions);
-+ ESTAT_ADD(tx_mult_collisions);
-+ ESTAT_ADD(tx_deferred);
-+ ESTAT_ADD(tx_excessive_collisions);
-+ ESTAT_ADD(tx_late_collisions);
-+ ESTAT_ADD(tx_collide_2times);
-+ ESTAT_ADD(tx_collide_3times);
-+ ESTAT_ADD(tx_collide_4times);
-+ ESTAT_ADD(tx_collide_5times);
-+ ESTAT_ADD(tx_collide_6times);
-+ ESTAT_ADD(tx_collide_7times);
-+ ESTAT_ADD(tx_collide_8times);
-+ ESTAT_ADD(tx_collide_9times);
-+ ESTAT_ADD(tx_collide_10times);
-+ ESTAT_ADD(tx_collide_11times);
-+ ESTAT_ADD(tx_collide_12times);
-+ ESTAT_ADD(tx_collide_13times);
-+ ESTAT_ADD(tx_collide_14times);
-+ ESTAT_ADD(tx_collide_15times);
-+ ESTAT_ADD(tx_ucast_packets);
-+ ESTAT_ADD(tx_mcast_packets);
-+ ESTAT_ADD(tx_bcast_packets);
-+ ESTAT_ADD(tx_carrier_sense_errors);
-+ ESTAT_ADD(tx_discards);
-+ ESTAT_ADD(tx_errors);
-+
-+ ESTAT_ADD(dma_writeq_full);
-+ ESTAT_ADD(dma_write_prioq_full);
-+ ESTAT_ADD(rxbds_empty);
-+ ESTAT_ADD(rx_discards);
-+ ESTAT_ADD(rx_errors);
-+ ESTAT_ADD(rx_threshold_hit);
-+
-+ ESTAT_ADD(dma_readq_full);
-+ ESTAT_ADD(dma_read_prioq_full);
-+ ESTAT_ADD(tx_comp_queue_full);
-+
-+ ESTAT_ADD(ring_set_send_prod_index);
-+ ESTAT_ADD(ring_status_update);
-+ ESTAT_ADD(nic_irqs);
-+ ESTAT_ADD(nic_avoided_irqs);
-+ ESTAT_ADD(nic_tx_threshold_hit);
-+
-+ ESTAT_ADD(mbuf_lwm_thresh_hit);
-+ estats->dma_4g_cross = tp->dma_4g_cross;
-+#if !defined(__VMKLNX__)
-+ estats->recoverable_err = tp->recoverable_err;
-+ estats->unrecoverable_err = tp->unrecoverable_err;
-+#endif
-+}
-+
-+static void tg3_get_nstats(struct tg3 *tp, struct rtnl_link_stats64 *stats)
-+{
-+ struct rtnl_link_stats64 *old_stats = &tp->net_stats_prev;
-+ struct tg3_hw_stats *hw_stats = tp->hw_stats;
-+
-+ stats->rx_packets = old_stats->rx_packets +
-+ get_stat64(&hw_stats->rx_ucast_packets) +
-+ get_stat64(&hw_stats->rx_mcast_packets) +
-+ get_stat64(&hw_stats->rx_bcast_packets);
-+
-+ stats->tx_packets = old_stats->tx_packets +
-+ get_stat64(&hw_stats->tx_ucast_packets) +
-+ get_stat64(&hw_stats->tx_mcast_packets) +
-+ get_stat64(&hw_stats->tx_bcast_packets);
-+
-+ stats->rx_bytes = old_stats->rx_bytes +
-+ get_stat64(&hw_stats->rx_octets);
-+ stats->tx_bytes = old_stats->tx_bytes +
-+ get_stat64(&hw_stats->tx_octets);
-+
-+ stats->rx_errors = old_stats->rx_errors +
-+ get_stat64(&hw_stats->rx_errors);
-+ stats->tx_errors = old_stats->tx_errors +
-+ get_stat64(&hw_stats->tx_errors) +
-+ get_stat64(&hw_stats->tx_mac_errors) +
-+ get_stat64(&hw_stats->tx_carrier_sense_errors) +
-+ get_stat64(&hw_stats->tx_discards);
-+
-+ stats->multicast = old_stats->multicast +
-+ get_stat64(&hw_stats->rx_mcast_packets);
-+ stats->collisions = old_stats->collisions +
-+ get_stat64(&hw_stats->tx_collisions);
-+
-+ stats->rx_length_errors = old_stats->rx_length_errors +
-+ get_stat64(&hw_stats->rx_frame_too_long_errors) +
-+ get_stat64(&hw_stats->rx_undersize_packets);
-+
-+ stats->rx_frame_errors = old_stats->rx_frame_errors +
-+ get_stat64(&hw_stats->rx_align_errors);
-+ stats->tx_aborted_errors = old_stats->tx_aborted_errors +
-+ get_stat64(&hw_stats->tx_discards);
-+ stats->tx_carrier_errors = old_stats->tx_carrier_errors +
-+ get_stat64(&hw_stats->tx_carrier_sense_errors);
-+
-+ stats->rx_crc_errors = old_stats->rx_crc_errors +
-+ tg3_calc_crc_errors(tp);
-+
-+ stats->rx_missed_errors = old_stats->rx_missed_errors +
-+ get_stat64(&hw_stats->rx_discards);
-+
-+ stats->rx_dropped = tp->rx_dropped;
-+ stats->tx_dropped = tp->tx_dropped;
-+}
-+
-+static int tg3_get_regs_len(struct net_device *dev)
-+{
-+ return TG3_REG_BLK_SIZE;
-+}
-+
-+static void tg3_get_regs(struct net_device *dev,
-+ struct ethtool_regs *regs, void *_p)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ regs->version = 0;
-+
-+ memset(_p, 0, TG3_REG_BLK_SIZE);
-+
-+ if (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER)
-+ return;
-+
-+ tg3_full_lock(tp, 0);
-+
-+ tg3_dump_legacy_regs(tp, (u32 *)_p);
-+
-+ tg3_full_unlock(tp);
-+}
-+
-+#if (LINUX_VERSION_CODE >= 0x20418)
-+static int tg3_get_eeprom_len(struct net_device *dev)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ return tp->nvram_size;
-+}
-+#endif
-+
-+#ifdef ETHTOOL_GEEPROM
-+static int tg3_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 *data)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ int ret, cpmu_restore = 0;
-+ u8 *pd;
-+ u32 i, offset, len, b_offset, b_count, cpmu_val = 0;
-+ __be32 val;
-+
-+ if (tg3_flag(tp, NO_NVRAM))
-+ return -EINVAL;
-+
-+ offset = eeprom->offset;
-+ len = eeprom->len;
-+ eeprom->len = 0;
-+
-+ eeprom->magic = TG3_EEPROM_MAGIC;
-+
-+ /* Override clock, link aware and link idle modes */
-+ if (tg3_flag(tp, CPMU_PRESENT)) {
-+ cpmu_val = tr32(TG3_CPMU_CTRL);
-+ if (cpmu_val & (CPMU_CTRL_LINK_AWARE_MODE |
-+ CPMU_CTRL_LINK_IDLE_MODE)) {
-+ tw32(TG3_CPMU_CTRL, cpmu_val &
-+ ~(CPMU_CTRL_LINK_AWARE_MODE |
-+ CPMU_CTRL_LINK_IDLE_MODE));
-+ cpmu_restore = 1;
-+ }
-+ }
-+ tg3_override_clk(tp);
-+
-+ if (offset & 3) {
-+ /* adjustments to start on required 4 byte boundary */
-+ b_offset = offset & 3;
-+ b_count = 4 - b_offset;
-+ if (b_count > len) {
-+ /* i.e. offset=1 len=2 */
-+ b_count = len;
-+ }
-+ ret = tg3_nvram_read_be32(tp, offset-b_offset, &val);
-+ if (ret)
-+ goto eeprom_done;
-+ memcpy(data, ((char *)&val) + b_offset, b_count);
-+ len -= b_count;
-+ offset += b_count;
-+ eeprom->len += b_count;
-+ }
-+
-+ /* read bytes up to the last 4 byte boundary */
-+ pd = &data[eeprom->len];
-+ for (i = 0; i < (len - (len & 3)); i += 4) {
-+ ret = tg3_nvram_read_be32(tp, offset + i, &val);
-+ if (ret) {
-+ if (i)
-+ i -= 4;
-+ eeprom->len += i;
-+ goto eeprom_done;
-+ }
-+ memcpy(pd + i, &val, 4);
-+ if (need_resched()) {
-+ if (signal_pending(current)) {
-+ eeprom->len += i;
-+ ret = -EINTR;
-+ goto eeprom_done;
-+ }
-+ cond_resched();
-+ }
-+ }
-+ eeprom->len += i;
-+
-+ if (len & 3) {
-+ /* read last bytes not ending on 4 byte boundary */
-+ pd = &data[eeprom->len];
-+ b_count = len & 3;
-+ b_offset = offset + len - b_count;
-+ ret = tg3_nvram_read_be32(tp, b_offset, &val);
-+ if (ret)
-+ goto eeprom_done;
-+ memcpy(pd, &val, b_count);
-+ eeprom->len += b_count;
-+ }
-+ ret = 0;
-+
-+eeprom_done:
-+ /* Restore clock, link aware and link idle modes */
-+ tg3_restore_clk(tp);
-+ if (cpmu_restore)
-+ tw32(TG3_CPMU_CTRL, cpmu_val);
-+
-+ return ret;
-+}
-+#endif
-+
-+#ifdef ETHTOOL_SEEPROM
-+static int tg3_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 *data)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ int ret;
-+ u32 offset, len, b_offset, odd_len;
-+ u8 *buf;
-+ __be32 start, end;
-+
-+ if (tg3_flag(tp, NO_NVRAM) ||
-+ eeprom->magic != TG3_EEPROM_MAGIC)
-+ return -EINVAL;
-+
-+ offset = eeprom->offset;
-+ len = eeprom->len;
-+
-+ if ((b_offset = (offset & 3))) {
-+ /* adjustments to start on required 4 byte boundary */
-+ ret = tg3_nvram_read_be32(tp, offset-b_offset, &start);
-+ if (ret)
-+ return ret;
-+ len += b_offset;
-+ offset &= ~3;
-+ if (len < 4)
-+ len = 4;
-+ }
-+
-+ odd_len = 0;
-+ if (len & 3) {
-+ /* adjustments to end on required 4 byte boundary */
-+ odd_len = 1;
-+ len = (len + 3) & ~3;
-+ ret = tg3_nvram_read_be32(tp, offset+len-4, &end);
-+ if (ret)
-+ return ret;
-+ }
-+
-+ buf = data;
-+ if (b_offset || odd_len) {
-+ buf = kmalloc(len, GFP_KERNEL);
-+ if (!buf)
-+ return -ENOMEM;
-+ if (b_offset)
-+ memcpy(buf, &start, 4);
-+ if (odd_len)
-+ memcpy(buf+len-4, &end, 4);
-+ memcpy(buf + b_offset, data, eeprom->len);
-+ }
-+
-+ ret = tg3_nvram_write_block(tp, offset, len, buf);
-+
-+ if (buf != data)
-+ kfree(buf);
-+
-+ return ret;
-+}
-+#endif
-+
-+static int tg3_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if (tg3_flag(tp, USE_PHYLIB)) {
-+ struct phy_device *phydev;
-+ if (!(tp->phy_flags & TG3_PHYFLG_IS_CONNECTED))
-+ return -EAGAIN;
-+ phydev = tp->mdio_bus->phy_map[tp->phy_addr];
-+ return phy_ethtool_gset(phydev, cmd);
-+ }
-+#endif /* BCM_INCLUDE_PHYLIB_SUPPORT */
-+
-+ cmd->supported = (SUPPORTED_Autoneg);
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY))
-+ cmd->supported |= (SUPPORTED_1000baseT_Half |
-+ SUPPORTED_1000baseT_Full);
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES)) {
-+ cmd->supported |= (SUPPORTED_100baseT_Half |
-+ SUPPORTED_100baseT_Full |
-+ SUPPORTED_10baseT_Half |
-+ SUPPORTED_10baseT_Full |
-+ SUPPORTED_TP);
-+ cmd->port = PORT_TP;
-+ } else {
-+ cmd->supported |= SUPPORTED_FIBRE;
-+ cmd->port = PORT_FIBRE;
-+ }
-+
-+ cmd->advertising = tp->link_config.advertising;
-+ if (tg3_flag(tp, PAUSE_AUTONEG)) {
-+ if (tp->link_config.flowctrl & FLOW_CTRL_RX) {
-+ if (tp->link_config.flowctrl & FLOW_CTRL_TX) {
-+ cmd->advertising |= ADVERTISED_Pause;
-+ } else {
-+ cmd->advertising |= ADVERTISED_Pause |
-+ ADVERTISED_Asym_Pause;
-+ }
-+ } else if (tp->link_config.flowctrl & FLOW_CTRL_TX) {
-+ cmd->advertising |= ADVERTISED_Asym_Pause;
-+ }
-+ }
-+ if (netif_running(dev) && tp->link_up) {
-+ ethtool_cmd_speed_set(cmd, tp->link_config.active_speed);
-+ cmd->duplex = tp->link_config.active_duplex;
-+#ifdef BCM_HAS_LP_ADVERTISING
-+ cmd->lp_advertising = tp->link_config.rmt_adv;
-+#endif /* BCM_HAS_LP_ADVERTISING */
-+#ifdef BCM_HAS_MDIX_STATUS
-+ if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES)) {
-+ if (tp->phy_flags & TG3_PHYFLG_MDIX_STATE)
-+ cmd->eth_tp_mdix = ETH_TP_MDI_X;
-+ else
-+ cmd->eth_tp_mdix = ETH_TP_MDI;
-+ }
-+#endif /* BCM_HAS_MDIX_STATUS */
-+ } else {
-+ ethtool_cmd_speed_set(cmd, SPEED_UNKNOWN);
-+ cmd->duplex = DUPLEX_UNKNOWN;
-+#ifdef BCM_HAS_MDIX_STATUS
-+ cmd->eth_tp_mdix = ETH_TP_MDI_INVALID;
-+#endif /* BCM_HAS_MDIX_STATUS */
-+ }
-+ cmd->phy_address = tp->phy_addr;
-+ cmd->transceiver = XCVR_INTERNAL;
-+ cmd->autoneg = tp->link_config.autoneg;
-+ cmd->maxtxpkt = 0;
-+ cmd->maxrxpkt = 0;
-+ return 0;
-+}
-+
-+static int tg3_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ u32 speed = ethtool_cmd_speed(cmd);
-+
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if (tg3_flag(tp, USE_PHYLIB)) {
-+ struct phy_device *phydev;
-+ if (!(tp->phy_flags & TG3_PHYFLG_IS_CONNECTED))
-+ return -EAGAIN;
-+ phydev = tp->mdio_bus->phy_map[tp->phy_addr];
-+ return phy_ethtool_sset(phydev, cmd);
-+ }
-+#endif /* BCM_INCLUDE_PHYLIB_SUPPORT */
-+
-+ if (cmd->autoneg != AUTONEG_ENABLE &&
-+ cmd->autoneg != AUTONEG_DISABLE)
-+ return -EINVAL;
-+
-+ if (cmd->autoneg == AUTONEG_DISABLE &&
-+ cmd->duplex != DUPLEX_FULL &&
-+ cmd->duplex != DUPLEX_HALF)
-+ return -EINVAL;
-+
-+ if (cmd->autoneg == AUTONEG_ENABLE) {
-+ u32 mask = ADVERTISED_Autoneg |
-+ ADVERTISED_Pause |
-+ ADVERTISED_Asym_Pause;
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY))
-+ mask |= ADVERTISED_1000baseT_Half |
-+ ADVERTISED_1000baseT_Full;
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES))
-+ mask |= ADVERTISED_100baseT_Half |
-+ ADVERTISED_100baseT_Full |
-+ ADVERTISED_10baseT_Half |
-+ ADVERTISED_10baseT_Full |
-+ ADVERTISED_TP;
-+ else
-+ mask |= ADVERTISED_FIBRE;
-+
-+ if (cmd->advertising & ~mask)
-+ return -EINVAL;
-+
-+ mask &= (ADVERTISED_1000baseT_Half |
-+ ADVERTISED_1000baseT_Full |
-+ ADVERTISED_100baseT_Half |
-+ ADVERTISED_100baseT_Full |
-+ ADVERTISED_10baseT_Half |
-+ ADVERTISED_10baseT_Full);
-+
-+ cmd->advertising &= mask;
-+ } else {
-+ if (tp->phy_flags & TG3_PHYFLG_ANY_SERDES) {
-+ if (speed != SPEED_1000)
-+ return -EINVAL;
-+
-+ if (cmd->duplex != DUPLEX_FULL)
-+ return -EINVAL;
-+ } else {
-+ if (speed != SPEED_100 &&
-+ speed != SPEED_10)
-+ return -EINVAL;
-+ }
-+ }
-+
-+ tg3_full_lock(tp, 0);
-+
-+ tp->link_config.autoneg = cmd->autoneg;
-+ if (cmd->autoneg == AUTONEG_ENABLE) {
-+ tp->link_config.advertising = (cmd->advertising |
-+ ADVERTISED_Autoneg);
-+ tp->link_config.speed = SPEED_UNKNOWN;
-+ tp->link_config.duplex = DUPLEX_UNKNOWN;
-+ } else {
-+ tp->link_config.advertising = 0;
-+ tp->link_config.speed = speed;
-+ tp->link_config.duplex = cmd->duplex;
-+ }
-+
-+ tp->phy_flags |= TG3_PHYFLG_USER_CONFIGURED;
-+
-+ tg3_warn_mgmt_link_flap(tp);
-+
-+ if (netif_running(dev))
-+ tg3_setup_phy(tp, true);
-+
-+ tg3_full_unlock(tp);
-+
-+ return 0;
-+}
-+
-+static void tg3_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ strlcpy(info->driver, DRV_MODULE_NAME, sizeof(info->driver));
-+ strlcpy(info->version, DRV_MODULE_VERSION, sizeof(info->version));
-+ strlcpy(info->fw_version, tp->fw_ver, sizeof(info->fw_version));
-+ strlcpy(info->bus_info, pci_name(tp->pdev), sizeof(info->bus_info));
-+}
-+
-+static void tg3_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (tg3_flag(tp, WOL_CAP) && device_can_wakeup(&tp->pdev->dev))
-+ wol->supported = WAKE_MAGIC;
-+ else
-+ wol->supported = 0;
-+ wol->wolopts = 0;
-+ if (tg3_flag(tp, WOL_ENABLE) && device_can_wakeup(&tp->pdev->dev))
-+ wol->wolopts = WAKE_MAGIC;
-+ memset(&wol->sopass, 0, sizeof(wol->sopass));
-+}
-+
-+static int tg3_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+#ifdef BCM_HAS_DEVICE_WAKEUP_API
-+ struct device *dp = &tp->pdev->dev;
-+#endif
-+
-+ if (wol->wolopts & ~WAKE_MAGIC)
-+ return -EINVAL;
-+ if ((wol->wolopts & WAKE_MAGIC) &&
-+ !(tg3_flag(tp, WOL_CAP) && device_can_wakeup(dp)))
-+ return -EINVAL;
-+
-+ device_set_wakeup_enable(dp, wol->wolopts & WAKE_MAGIC);
-+
-+ if (wol->wolopts & WAKE_MAGIC)
-+ tg3_flag_set(tp, WOL_ENABLE);
-+ else
-+ tg3_flag_clear(tp, WOL_ENABLE);
-+
-+ return 0;
-+}
-+
-+static u32 tg3_get_msglevel(struct net_device *dev)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ return tp->msg_enable;
-+}
-+
-+static void tg3_set_msglevel(struct net_device *dev, u32 value)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ tp->msg_enable = value;
-+}
-+
-+static int tg3_nway_reset(struct net_device *dev)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ int r;
-+
-+ if (!netif_running(dev))
-+ return -EAGAIN;
-+
-+ if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES)
-+ return -EINVAL;
-+
-+ tg3_warn_mgmt_link_flap(tp);
-+
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if (tg3_flag(tp, USE_PHYLIB)) {
-+ if (!(tp->phy_flags & TG3_PHYFLG_IS_CONNECTED))
-+ return -EAGAIN;
-+ r = phy_start_aneg(tp->mdio_bus->phy_map[tp->phy_addr]);
-+ } else
-+#endif /* BCM_INCLUDE_PHYLIB_SUPPORT */
-+ {
-+ u32 bmcr;
-+
-+ spin_lock_bh(&tp->lock);
-+ r = -EINVAL;
-+ tg3_readphy(tp, MII_BMCR, &bmcr);
-+ if (!tg3_readphy(tp, MII_BMCR, &bmcr) &&
-+ ((bmcr & BMCR_ANENABLE) ||
-+ (tp->phy_flags & TG3_PHYFLG_PARALLEL_DETECT))) {
-+ tg3_writephy(tp, MII_BMCR, bmcr | BMCR_ANRESTART |
-+ BMCR_ANENABLE);
-+ r = 0;
-+ }
-+ spin_unlock_bh(&tp->lock);
-+ }
-+
-+ return r;
-+}
-+
-+static void tg3_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ ering->rx_max_pending = tp->rx_std_ring_mask;
-+ ering->rx_mini_max_pending = 0;
-+ if (tg3_flag(tp, JUMBO_RING_ENABLE))
-+ ering->rx_jumbo_max_pending = tp->rx_jmb_ring_mask;
-+ else
-+ ering->rx_jumbo_max_pending = 0;
-+
-+ ering->tx_max_pending = TG3_TX_RING_SIZE - 1;
-+
-+ ering->rx_pending = tp->rx_pending;
-+ ering->rx_mini_pending = 0;
-+ if (tg3_flag(tp, JUMBO_RING_ENABLE))
-+ ering->rx_jumbo_pending = tp->rx_jumbo_pending;
-+ else
-+ ering->rx_jumbo_pending = 0;
-+
-+ ering->tx_pending = tp->napi[0].tx_pending;
-+}
-+
-+static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ int i, irq_sync = 0, err = 0;
-+
-+ if (!ering->rx_pending || (ering->rx_pending > tp->rx_std_ring_mask) ||
-+ (tg3_flag(tp, JUMBO_RING_ENABLE) && !ering->rx_jumbo_pending) ||
-+ (ering->rx_jumbo_pending > tp->rx_jmb_ring_mask) ||
-+ (ering->tx_pending > TG3_TX_RING_SIZE - 1) ||
-+ (ering->tx_pending <= MAX_SKB_FRAGS) ||
-+ (tg3_flag(tp, TSO_BUG) &&
-+ (ering->tx_pending <= (MAX_SKB_FRAGS * 3))))
-+ return -EINVAL;
-+
-+ if (netif_running(dev)) {
-+ tg3_phy_stop(tp);
-+ tg3_netif_stop(tp);
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ tg3_netq_invalidate_state(tp);
-+#endif
-+ irq_sync = 1;
-+ }
-+
-+ tg3_full_lock(tp, irq_sync);
-+
-+ tp->rx_pending = ering->rx_pending;
-+
-+ if (tg3_flag(tp, MAX_RXPEND_64) &&
-+ tp->rx_pending > 63)
-+ tp->rx_pending = 63;
-+ tp->rx_jumbo_pending = ering->rx_jumbo_pending;
-+
-+ for (i = 0; i < tp->irq_max; i++)
-+ tp->napi[i].tx_pending = ering->tx_pending;
-+
-+ if (netif_running(dev)) {
-+ tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
-+ err = tg3_restart_hw(tp, false);
-+ if (!err)
-+ tg3_netif_start(tp);
-+ }
-+
-+ tg3_full_unlock(tp);
-+
-+ if (irq_sync && !err)
-+ tg3_phy_start(tp);
-+
-+ return err;
-+}
-+
-+static void tg3_get_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ epause->autoneg = !!tg3_flag(tp, PAUSE_AUTONEG);
-+
-+ if (tp->link_config.flowctrl & FLOW_CTRL_RX)
-+ epause->rx_pause = 1;
-+ else
-+ epause->rx_pause = 0;
-+
-+ if (tp->link_config.flowctrl & FLOW_CTRL_TX)
-+ epause->tx_pause = 1;
-+ else
-+ epause->tx_pause = 0;
-+}
-+
-+static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ int err = 0;
-+
-+ if (tp->link_config.autoneg == AUTONEG_ENABLE)
-+ tg3_warn_mgmt_link_flap(tp);
-+
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if (tg3_flag(tp, USE_PHYLIB)) {
-+ u32 newadv;
-+ struct phy_device *phydev;
-+
-+ phydev = tp->mdio_bus->phy_map[tp->phy_addr];
-+
-+ if (!(phydev->supported & SUPPORTED_Pause) ||
-+ (!(phydev->supported & SUPPORTED_Asym_Pause) &&
-+ (epause->rx_pause != epause->tx_pause)))
-+ return -EINVAL;
-+
-+ tp->link_config.flowctrl = 0;
-+ if (epause->rx_pause) {
-+ tp->link_config.flowctrl |= FLOW_CTRL_RX;
-+
-+ if (epause->tx_pause) {
-+ tp->link_config.flowctrl |= FLOW_CTRL_TX;
-+ newadv = ADVERTISED_Pause;
-+ } else
-+ newadv = ADVERTISED_Pause |
-+ ADVERTISED_Asym_Pause;
-+ } else if (epause->tx_pause) {
-+ tp->link_config.flowctrl |= FLOW_CTRL_TX;
-+ newadv = ADVERTISED_Asym_Pause;
-+ } else
-+ newadv = 0;
-+
-+ if (epause->autoneg)
-+ tg3_flag_set(tp, PAUSE_AUTONEG);
-+ else
-+ tg3_flag_clear(tp, PAUSE_AUTONEG);
-+
-+ if (tp->phy_flags & TG3_PHYFLG_IS_CONNECTED) {
-+ u32 oldadv = phydev->advertising &
-+ (ADVERTISED_Pause | ADVERTISED_Asym_Pause);
-+ if (oldadv != newadv) {
-+ phydev->advertising &=
-+ ~(ADVERTISED_Pause |
-+ ADVERTISED_Asym_Pause);
-+ phydev->advertising |= newadv;
-+ if (phydev->autoneg) {
-+ /*
-+ * Always renegotiate the link to
-+ * inform our link partner of our
-+ * flow control settings, even if the
-+ * flow control is forced. Let
-+ * tg3_adjust_link() do the final
-+ * flow control setup.
-+ */
-+ return phy_start_aneg(phydev);
-+ }
-+ }
-+
-+ if (!epause->autoneg)
-+ tg3_setup_flow_control(tp, 0, 0);
-+ } else {
-+ tp->link_config.advertising &=
-+ ~(ADVERTISED_Pause |
-+ ADVERTISED_Asym_Pause);
-+ tp->link_config.advertising |= newadv;
-+ }
-+ } else
-+#endif /* BCM_INCLUDE_PHYLIB_SUPPORT */
-+ {
-+ int irq_sync = 0;
-+
-+ if (netif_running(dev)) {
-+ tg3_netif_stop(tp);
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ tg3_netq_invalidate_state(tp);
-+#endif
-+ irq_sync = 1;
-+ }
-+
-+ tg3_full_lock(tp, irq_sync);
-+
-+ if (epause->autoneg)
-+ tg3_flag_set(tp, PAUSE_AUTONEG);
-+ else
-+ tg3_flag_clear(tp, PAUSE_AUTONEG);
-+ if (epause->rx_pause)
-+ tp->link_config.flowctrl |= FLOW_CTRL_RX;
-+ else
-+ tp->link_config.flowctrl &= ~FLOW_CTRL_RX;
-+ if (epause->tx_pause)
-+ tp->link_config.flowctrl |= FLOW_CTRL_TX;
-+ else
-+ tp->link_config.flowctrl &= ~FLOW_CTRL_TX;
-+
-+ if (netif_running(dev)) {
-+ tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
-+ err = tg3_restart_hw(tp, false);
-+ if (!err)
-+ tg3_netif_start(tp);
-+ }
-+
-+ tg3_full_unlock(tp);
-+ }
-+
-+ tp->phy_flags |= TG3_PHYFLG_USER_CONFIGURED;
-+
-+ return err;
-+}
-+
-+static int tg3_get_sset_count(struct net_device *dev, int sset)
-+{
-+ switch (sset) {
-+ case ETH_SS_TEST:
-+ return TG3_NUM_TEST;
-+ case ETH_SS_STATS:
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ return tg3_netq_stats_size(netdev_priv(dev));
-+#else
-+ return TG3_NUM_STATS;
-+#endif
-+ default:
-+ return -EOPNOTSUPP;
-+ }
-+}
-+
-+#if (LINUX_VERSION_CODE < 0x020618)
-+static int tg3_get_stats_count (struct net_device *dev)
-+{
-+ return tg3_get_sset_count(dev, ETH_SS_STATS);
-+}
-+
-+static int tg3_get_test_count (struct net_device *dev)
-+{
-+ return tg3_get_sset_count(dev, ETH_SS_TEST);
-+}
-+#endif
-+
-+#if defined(BCM_HAS_GET_RXNFC) && !defined(GET_ETHTOOL_OP_EXT)
-+#ifdef BCM_HAS_OLD_GET_RXNFC_SIG
-+static int tg3_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
-+ void *rules)
-+#else
-+static int tg3_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
-+ u32 *rules __always_unused)
-+#endif /* BCM_HAS_OLD_GET_RXNFC_SIG */
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (!tg3_flag(tp, SUPPORT_MSIX))
-+ return -EOPNOTSUPP;
-+
-+ switch (info->cmd) {
-+ case ETHTOOL_GRXRINGS:
-+ if (netif_running(tp->dev))
-+ info->data = tp->rxq_cnt;
-+ else {
-+ info->data = num_online_cpus();
-+ if (info->data > TG3_RSS_MAX_NUM_QS)
-+ info->data = TG3_RSS_MAX_NUM_QS;
-+ }
-+ return 0;
-+
-+ default:
-+ return -EOPNOTSUPP;
-+ }
-+}
-+#endif /* BCM_HAS_GET_RXNFC */
-+
-+#if defined(BCM_HAS_GET_RXFH_INDIR_SIZE) && !defined(GET_ETHTOOL_OP_EXT)
-+static u32 tg3_get_rxfh_indir_size(struct net_device *dev)
-+{
-+ u32 size = 0;
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (tg3_flag(tp, SUPPORT_MSIX))
-+ size = TG3_RSS_INDIR_TBL_SIZE;
-+
-+ return size;
-+}
-+
-+#ifdef BCM_HAS_OLD_RXFH_INDIR
-+static int tg3_get_rxfh_indir(struct net_device *dev, u32 *indir)
-+#else
-+static int tg3_get_rxfh(struct net_device *dev, u32 *indir, u8 *key)
-+#endif
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ int i;
-+
-+ for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i++)
-+ indir[i] = tp->rss_ind_tbl[i];
-+
-+ return 0;
-+}
-+#ifdef BCM_HAS_OLD_RXFH_INDIR
-+static int tg3_set_rxfh_indir(struct net_device *dev, const u32 *indir)
-+#else
-+static int tg3_set_rxfh(struct net_device *dev, const u32 *indir, const u8 *key)
-+#endif
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ size_t i;
-+
-+ for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i++)
-+ tp->rss_ind_tbl[i] = indir[i];
-+
-+ if (!netif_running(dev) || !tg3_flag(tp, ENABLE_RSS))
-+ return 0;
-+
-+ /* It is legal to write the indirection
-+ * table while the device is running.
-+ */
-+ tg3_full_lock(tp, 0);
-+ tg3_rss_write_indir_tbl(tp);
-+ tg3_full_unlock(tp);
-+
-+ return 0;
-+}
-+#endif /* BCM_HAS_GET_RXFH_INDIR_SIZE */
-+
-+#if defined(ETHTOOL_GCHANNELS)
-+static void tg3_get_channels(struct net_device *dev,
-+ struct ethtool_channels *channel)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ u32 deflt_qs = netif_get_num_default_rss_queues();
-+
-+ channel->max_rx = tp->rxq_max;
-+ channel->max_tx = tp->txq_max;
-+
-+ if (netif_running(dev)) {
-+ channel->rx_count = tp->rxq_cnt;
-+ channel->tx_count = tp->txq_cnt;
-+ } else {
-+ if (tp->rxq_req)
-+ channel->rx_count = tp->rxq_req;
-+ else
-+ channel->rx_count = min(deflt_qs, tp->rxq_max);
-+
-+ if (tp->txq_req)
-+ channel->tx_count = tp->txq_req;
-+ else
-+ channel->tx_count = min(deflt_qs, tp->txq_max);
-+ }
-+}
-+
-+static int tg3_set_channels(struct net_device *dev,
-+ struct ethtool_channels *channel)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (!tg3_flag(tp, SUPPORT_MSIX))
-+ return -EOPNOTSUPP;
-+
-+ if (channel->rx_count > tp->rxq_max ||
-+ channel->tx_count > tp->txq_max)
-+ return -EINVAL;
-+
-+ tp->rxq_req = channel->rx_count;
-+ tp->txq_req = channel->tx_count;
-+
-+ if (!netif_running(dev))
-+ return 0;
-+
-+ tg3_stop(tp);
-+
-+ tg3_carrier_off(tp);
-+
-+ tg3_start(tp, true, false, false);
-+
-+ return 0;
-+}
-+#endif /* ETHTOOL_GCHANNELS */
-+
-+static void tg3_get_strings(struct net_device *dev, u32 stringset, u8 *buf)
-+{
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ struct tg3 *tp = netdev_priv(dev);
-+#endif
-+
-+ switch (stringset) {
-+ case ETH_SS_STATS:
-+ memcpy(buf, ðtool_stats_keys, sizeof(ethtool_stats_keys));
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ if (tg3_flag(tp, ENABLE_IOV)) {
-+ buf += sizeof(ethtool_stats_keys);
-+ tg3_netq_stats_get_strings(tp, buf);
-+ }
-+#endif
-+ break;
-+ case ETH_SS_TEST:
-+ memcpy(buf, ðtool_test_keys, sizeof(ethtool_test_keys));
-+ break;
-+ default:
-+ WARN_ON(1); /* we need a WARN() */
-+ break;
-+ }
-+}
-+
-+static int tg3_set_phys_id(struct net_device *dev,
-+ enum ethtool_phys_id_state state)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (!netif_running(tp->dev))
-+ return -EAGAIN;
-+
-+ switch (state) {
-+ case ETHTOOL_ID_ACTIVE:
-+ return 1; /* cycle on/off once per second */
-+
-+ case ETHTOOL_ID_ON:
-+ tw32(MAC_LED_CTRL, LED_CTRL_LNKLED_OVERRIDE |
-+ LED_CTRL_1000MBPS_ON |
-+ LED_CTRL_100MBPS_ON |
-+ LED_CTRL_10MBPS_ON |
-+ LED_CTRL_TRAFFIC_OVERRIDE |
-+ LED_CTRL_TRAFFIC_BLINK |
-+ LED_CTRL_TRAFFIC_LED);
-+ break;
-+
-+ case ETHTOOL_ID_OFF:
-+ tw32(MAC_LED_CTRL, LED_CTRL_LNKLED_OVERRIDE |
-+ LED_CTRL_TRAFFIC_OVERRIDE);
-+ break;
-+
-+ case ETHTOOL_ID_INACTIVE:
-+ tw32(MAC_LED_CTRL, tp->led_ctrl);
-+ break;
-+ }
-+
-+ return 0;
-+}
-+
-+static void tg3_get_ethtool_stats(struct net_device *dev,
-+ struct ethtool_stats *estats, u64 *tmp_stats)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (tp->hw_stats) {
-+ tg3_get_estats(tp, (struct tg3_ethtool_stats *)tmp_stats);
-+ }
-+ else {
-+ memset(tmp_stats, 0, sizeof(struct tg3_ethtool_stats));
-+#if !defined(__VMKLNX__)
-+ ((struct tg3_ethtool_stats *)tmp_stats)->unrecoverable_err =
-+ tp->unrecoverable_err;
-+ ((struct tg3_ethtool_stats *)tmp_stats)->recoverable_err =
-+ tp->recoverable_err;
-+#endif
-+ }
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ tg3_netq_stats_get(tp, tmp_stats + TG3_NUM_STATS);
-+#endif
-+}
-+
-+static __be32 *tg3_vpd_readblock(struct tg3 *tp, u32 *vpdlen)
-+{
-+ int i;
-+ __be32 *buf;
-+ u32 offset = 0, len = 0;
-+ u32 magic, val;
-+
-+ if (tg3_flag(tp, NO_NVRAM) || tg3_nvram_read(tp, 0, &magic))
-+ return NULL;
-+
-+ if (magic == TG3_EEPROM_MAGIC) {
-+ for (offset = TG3_NVM_DIR_START;
-+ offset < TG3_NVM_DIR_END;
-+ offset += TG3_NVM_DIRENT_SIZE) {
-+ if (tg3_nvram_read(tp, offset, &val))
-+ return NULL;
-+
-+ if ((val >> TG3_NVM_DIRTYPE_SHIFT) ==
-+ TG3_NVM_DIRTYPE_EXTVPD)
-+ break;
-+ }
-+
-+ if (offset != TG3_NVM_DIR_END) {
-+ len = (val & TG3_NVM_DIRTYPE_LENMSK) * 4;
-+ if (tg3_nvram_read(tp, offset + 4, &offset))
-+ return NULL;
-+
-+ offset = tg3_nvram_logical_addr(tp, offset);
-+ }
-+ }
-+
-+ if (!offset || !len) {
-+ offset = TG3_NVM_VPD_OFF;
-+ len = TG3_NVM_VPD_LEN;
-+ }
-+
-+ buf = kmalloc(len, GFP_KERNEL);
-+ if (buf == NULL)
-+ return NULL;
-+
-+ if (magic == TG3_EEPROM_MAGIC) {
-+ for (i = 0; i < len; i += 4) {
-+ /* The data is in little-endian format in NVRAM.
-+ * Use the big-endian read routines to preserve
-+ * the byte order as it exists in NVRAM.
-+ */
-+ if (tg3_nvram_read_be32(tp, offset + i, &buf[i/4]))
-+ goto error;
-+ }
-+ } else {
-+ u8 *ptr;
-+ ssize_t cnt;
-+ unsigned int pos = 0;
-+
-+ ptr = (u8 *)&buf[0];
-+ for (i = 0; pos < len && i < 3; i++, pos += cnt, ptr += cnt) {
-+ cnt = pci_read_vpd(tp->pdev, pos,
-+ len - pos, ptr);
-+ if (cnt == -ETIMEDOUT || cnt == -EINTR)
-+ cnt = 0;
-+ else if (cnt < 0)
-+ goto error;
-+ }
-+ if (pos != len)
-+ goto error;
-+ }
-+
-+ *vpdlen = len;
-+
-+ return buf;
-+
-+error:
-+ kfree(buf);
-+ return NULL;
-+}
-+
-+#define NVRAM_TEST_SIZE 0x100
-+#define NVRAM_SELFBOOT_FORMAT1_0_SIZE 0x14
-+#define NVRAM_SELFBOOT_FORMAT1_2_SIZE 0x18
-+#define NVRAM_SELFBOOT_FORMAT1_3_SIZE 0x1c
-+#define NVRAM_SELFBOOT_FORMAT1_4_SIZE 0x20
-+#define NVRAM_SELFBOOT_FORMAT1_5_SIZE 0x24
-+#define NVRAM_SELFBOOT_FORMAT1_6_SIZE 0x50
-+#define NVRAM_SELFBOOT_HW_SIZE 0x20
-+#define NVRAM_SELFBOOT_DATA_SIZE 0x1c
-+
-+static int tg3_test_nvram(struct tg3 *tp)
-+{
-+ u32 csum, magic, len;
-+ __be32 *buf;
-+ int i, j, k, err = 0, size;
-+
-+ if (tg3_flag(tp, NO_NVRAM))
-+ return 0;
-+
-+ if (tg3_nvram_read(tp, 0, &magic) != 0)
-+ return -EIO;
-+
-+ if (magic == TG3_EEPROM_MAGIC)
-+ size = NVRAM_TEST_SIZE;
-+ else if ((magic & TG3_EEPROM_MAGIC_FW_MSK) == TG3_EEPROM_MAGIC_FW) {
-+ if ((magic & TG3_EEPROM_SB_FORMAT_MASK) ==
-+ TG3_EEPROM_SB_FORMAT_1) {
-+ switch (magic & TG3_EEPROM_SB_REVISION_MASK) {
-+ case TG3_EEPROM_SB_REVISION_0:
-+ size = NVRAM_SELFBOOT_FORMAT1_0_SIZE;
-+ break;
-+ case TG3_EEPROM_SB_REVISION_2:
-+ size = NVRAM_SELFBOOT_FORMAT1_2_SIZE;
-+ break;
-+ case TG3_EEPROM_SB_REVISION_3:
-+ size = NVRAM_SELFBOOT_FORMAT1_3_SIZE;
-+ break;
-+ case TG3_EEPROM_SB_REVISION_4:
-+ size = NVRAM_SELFBOOT_FORMAT1_4_SIZE;
-+ break;
-+ case TG3_EEPROM_SB_REVISION_5:
-+ size = NVRAM_SELFBOOT_FORMAT1_5_SIZE;
-+ break;
-+ case TG3_EEPROM_SB_REVISION_6:
-+ size = NVRAM_SELFBOOT_FORMAT1_6_SIZE;
-+ break;
-+ default:
-+ return -EIO;
-+ }
-+ } else
-+ return 0;
-+ } else if ((magic & TG3_EEPROM_MAGIC_HW_MSK) == TG3_EEPROM_MAGIC_HW)
-+ size = NVRAM_SELFBOOT_HW_SIZE;
-+ else
-+ return -EIO;
-+
-+ buf = kmalloc(size, GFP_KERNEL);
-+ if (buf == NULL)
-+ return -ENOMEM;
-+
-+ err = -EIO;
-+ for (i = 0, j = 0; i < size; i += 4, j++) {
-+ err = tg3_nvram_read_be32(tp, i, &buf[j]);
-+ if (err)
-+ break;
-+ }
-+ if (i < size)
-+ goto out;
-+
-+ /* Selfboot format */
-+ magic = be32_to_cpu(buf[0]);
-+ if ((magic & TG3_EEPROM_MAGIC_FW_MSK) ==
-+ TG3_EEPROM_MAGIC_FW) {
-+ u8 *buf8 = (u8 *) buf, csum8 = 0;
-+
-+ if ((magic & TG3_EEPROM_SB_REVISION_MASK) ==
-+ TG3_EEPROM_SB_REVISION_2) {
-+ /* For rev 2, the csum doesn't include the MBA. */
-+ for (i = 0; i < TG3_EEPROM_SB_F1R2_MBA_OFF; i++)
-+ csum8 += buf8[i];
-+ for (i = TG3_EEPROM_SB_F1R2_MBA_OFF + 4; i < size; i++)
-+ csum8 += buf8[i];
-+ } else {
-+ for (i = 0; i < size; i++)
-+ csum8 += buf8[i];
-+ }
-+
-+ if (csum8 == 0) {
-+ err = 0;
-+ goto out;
-+ }
-+
-+ err = -EIO;
-+ goto out;
-+ }
-+
-+ if ((magic & TG3_EEPROM_MAGIC_HW_MSK) ==
-+ TG3_EEPROM_MAGIC_HW) {
-+ u8 data[NVRAM_SELFBOOT_DATA_SIZE];
-+ u8 parity[NVRAM_SELFBOOT_DATA_SIZE];
-+ u8 *buf8 = (u8 *) buf;
-+
-+ /* Separate the parity bits and the data bytes. */
-+ for (i = 0, j = 0, k = 0; i < NVRAM_SELFBOOT_HW_SIZE; i++) {
-+ if ((i == 0) || (i == 8)) {
-+ int l;
-+ u8 msk;
-+
-+ for (l = 0, msk = 0x80; l < 7; l++, msk >>= 1)
-+ parity[k++] = buf8[i] & msk;
-+ i++;
-+ } else if (i == 16) {
-+ int l;
-+ u8 msk;
-+
-+ for (l = 0, msk = 0x20; l < 6; l++, msk >>= 1)
-+ parity[k++] = buf8[i] & msk;
-+ i++;
-+
-+ for (l = 0, msk = 0x80; l < 8; l++, msk >>= 1)
-+ parity[k++] = buf8[i] & msk;
-+ i++;
-+ }
-+ data[j++] = buf8[i];
-+ }
-+
-+ err = -EIO;
-+ for (i = 0; i < NVRAM_SELFBOOT_DATA_SIZE; i++) {
-+ u8 hw8 = hweight8(data[i]);
-+
-+ if ((hw8 & 0x1) && parity[i])
-+ goto out;
-+ else if (!(hw8 & 0x1) && !parity[i])
-+ goto out;
-+ }
-+ err = 0;
-+ goto out;
-+ }
-+
-+ err = -EIO;
-+
-+ /* Bootstrap checksum at offset 0x10 */
-+ csum = calc_crc((unsigned char *) buf, 0x10);
-+ if (csum != le32_to_cpu(buf[0x10/4]))
-+ goto out;
-+
-+ /* Manufacturing block starts at offset 0x74, checksum at 0xfc */
-+ csum = calc_crc((unsigned char *) &buf[0x74/4], 0x88);
-+ if (csum != le32_to_cpu(buf[0xfc/4]))
-+ goto out;
-+
-+ kfree(buf);
-+
-+ buf = tg3_vpd_readblock(tp, &len);
-+ if (!buf)
-+ return -ENOMEM;
-+
-+ i = pci_vpd_find_tag((u8 *)buf, 0, len, PCI_VPD_LRDT_RO_DATA);
-+ if (i > 0) {
-+ j = pci_vpd_lrdt_size(&((u8 *)buf)[i]);
-+ if (j < 0)
-+ goto out;
-+
-+ if (i + PCI_VPD_LRDT_TAG_SIZE + j > len)
-+ goto out;
-+
-+ i += PCI_VPD_LRDT_TAG_SIZE;
-+ j = pci_vpd_find_info_keyword((u8 *)buf, i, j,
-+ PCI_VPD_RO_KEYWORD_CHKSUM);
-+ if (j > 0) {
-+ u8 csum8 = 0;
-+
-+ j += PCI_VPD_INFO_FLD_HDR_SIZE;
-+
-+ for (i = 0; i <= j; i++)
-+ csum8 += ((u8 *)buf)[i];
-+
-+ if (csum8)
-+ goto out;
-+ }
-+ }
-+
-+ err = 0;
-+
-+out:
-+ kfree(buf);
-+ return err;
-+}
-+
-+#define TG3_SERDES_TIMEOUT_SEC 2
-+#define TG3_COPPER_TIMEOUT_SEC 7
-+
-+static int tg3_test_link(struct tg3 *tp)
-+{
-+ int i, max;
-+
-+ if (!netif_running(tp->dev))
-+ return -ENODEV;
-+
-+ if (tp->phy_flags & TG3_PHYFLG_ANY_SERDES)
-+ max = TG3_SERDES_TIMEOUT_SEC;
-+ else
-+ max = TG3_COPPER_TIMEOUT_SEC;
-+
-+ for (i = 0; i < max; i++) {
-+ if (tp->link_up)
-+ return 0;
-+
-+ if (msleep_interruptible(1000))
-+ break;
-+ }
-+
-+ return -EIO;
-+}
-+
-+/* Only test the commonly used registers */
-+static int tg3_test_registers(struct tg3 *tp)
-+{
-+ int i, is_5705, is_5750;
-+ u32 offset, read_mask, write_mask, val, save_val, read_val;
-+ static struct {
-+ u16 offset;
-+ u16 flags;
-+#define TG3_FL_5705 0x1
-+#define TG3_FL_NOT_5705 0x2
-+#define TG3_FL_NOT_5788 0x4
-+#define TG3_FL_NOT_5750 0x8
-+ u32 read_mask;
-+ u32 write_mask;
-+ } reg_tbl[] = {
-+ /* MAC Control Registers */
-+ { MAC_MODE, TG3_FL_NOT_5705,
-+ 0x00000000, 0x00ef6f8c },
-+ { MAC_MODE, TG3_FL_5705,
-+ 0x00000000, 0x01ef6b8c },
-+ { MAC_STATUS, TG3_FL_NOT_5705,
-+ 0x03800107, 0x00000000 },
-+ { MAC_STATUS, TG3_FL_5705,
-+ 0x03800100, 0x00000000 },
-+ { MAC_ADDR_0_HIGH, 0x0000,
-+ 0x00000000, 0x0000ffff },
-+ { MAC_ADDR_0_LOW, 0x0000,
-+ 0x00000000, 0xffffffff },
-+ { MAC_RX_MTU_SIZE, 0x0000,
-+ 0x00000000, 0x0000ffff },
-+ { MAC_TX_MODE, 0x0000,
-+ 0x00000000, 0x00000070 },
-+ { MAC_TX_LENGTHS, 0x0000,
-+ 0x00000000, 0x00003fff },
-+ { MAC_RX_MODE, TG3_FL_NOT_5705,
-+ 0x00000000, 0x000007fc },
-+ { MAC_RX_MODE, TG3_FL_5705,
-+ 0x00000000, 0x000007dc },
-+ { MAC_HASH_REG_0, 0x0000,
-+ 0x00000000, 0xffffffff },
-+ { MAC_HASH_REG_1, 0x0000,
-+ 0x00000000, 0xffffffff },
-+ { MAC_HASH_REG_2, 0x0000,
-+ 0x00000000, 0xffffffff },
-+ { MAC_HASH_REG_3, 0x0000,
-+ 0x00000000, 0xffffffff },
-+
-+ /* Receive Data and Receive BD Initiator Control Registers. */
-+ { RCVDBDI_JUMBO_BD+0, TG3_FL_NOT_5705,
-+ 0x00000000, 0xffffffff },
-+ { RCVDBDI_JUMBO_BD+4, TG3_FL_NOT_5705,
-+ 0x00000000, 0xffffffff },
-+ { RCVDBDI_JUMBO_BD+8, TG3_FL_NOT_5705,
-+ 0x00000000, 0x00000003 },
-+ { RCVDBDI_JUMBO_BD+0xc, TG3_FL_NOT_5705,
-+ 0x00000000, 0xffffffff },
-+ { RCVDBDI_STD_BD+0, 0x0000,
-+ 0x00000000, 0xffffffff },
-+ { RCVDBDI_STD_BD+4, 0x0000,
-+ 0x00000000, 0xffffffff },
-+ { RCVDBDI_STD_BD+8, 0x0000,
-+ 0x00000000, 0xffff0002 },
-+ { RCVDBDI_STD_BD+0xc, 0x0000,
-+ 0x00000000, 0xffffffff },
-+
-+ /* Receive BD Initiator Control Registers. */
-+ { RCVBDI_STD_THRESH, TG3_FL_NOT_5705,
-+ 0x00000000, 0xffffffff },
-+ { RCVBDI_STD_THRESH, TG3_FL_5705,
-+ 0x00000000, 0x000003ff },
-+ { RCVBDI_JUMBO_THRESH, TG3_FL_NOT_5705,
-+ 0x00000000, 0xffffffff },
-+
-+ /* Host Coalescing Control Registers. */
-+ { HOSTCC_MODE, TG3_FL_NOT_5705,
-+ 0x00000000, 0x00000004 },
-+ { HOSTCC_MODE, TG3_FL_5705,
-+ 0x00000000, 0x000000f6 },
-+ { HOSTCC_RXCOL_TICKS, TG3_FL_NOT_5705,
-+ 0x00000000, 0xffffffff },
-+ { HOSTCC_RXCOL_TICKS, TG3_FL_5705,
-+ 0x00000000, 0x000003ff },
-+ { HOSTCC_TXCOL_TICKS, TG3_FL_NOT_5705,
-+ 0x00000000, 0xffffffff },
-+ { HOSTCC_TXCOL_TICKS, TG3_FL_5705,
-+ 0x00000000, 0x000003ff },
-+ { HOSTCC_RXMAX_FRAMES, TG3_FL_NOT_5705,
-+ 0x00000000, 0xffffffff },
-+ { HOSTCC_RXMAX_FRAMES, TG3_FL_5705 | TG3_FL_NOT_5788,
-+ 0x00000000, 0x000000ff },
-+ { HOSTCC_TXMAX_FRAMES, TG3_FL_NOT_5705,
-+ 0x00000000, 0xffffffff },
-+ { HOSTCC_TXMAX_FRAMES, TG3_FL_5705 | TG3_FL_NOT_5788,
-+ 0x00000000, 0x000000ff },
-+ { HOSTCC_RXCOAL_TICK_INT, TG3_FL_NOT_5705,
-+ 0x00000000, 0xffffffff },
-+ { HOSTCC_TXCOAL_TICK_INT, TG3_FL_NOT_5705,
-+ 0x00000000, 0xffffffff },
-+ { HOSTCC_RXCOAL_MAXF_INT, TG3_FL_NOT_5705,
-+ 0x00000000, 0xffffffff },
-+ { HOSTCC_RXCOAL_MAXF_INT, TG3_FL_5705 | TG3_FL_NOT_5788,
-+ 0x00000000, 0x000000ff },
-+ { HOSTCC_TXCOAL_MAXF_INT, TG3_FL_NOT_5705,
-+ 0x00000000, 0xffffffff },
-+ { HOSTCC_TXCOAL_MAXF_INT, TG3_FL_5705 | TG3_FL_NOT_5788,
-+ 0x00000000, 0x000000ff },
-+ { HOSTCC_STAT_COAL_TICKS, TG3_FL_NOT_5705,
-+ 0x00000000, 0xffffffff },
-+ { HOSTCC_STATS_BLK_HOST_ADDR, TG3_FL_NOT_5705,
-+ 0x00000000, 0xffffffff },
-+ { HOSTCC_STATS_BLK_HOST_ADDR+4, TG3_FL_NOT_5705,
-+ 0x00000000, 0xffffffff },
-+ { HOSTCC_STATUS_BLK_HOST_ADDR, 0x0000,
-+ 0x00000000, 0xffffffff },
-+ { HOSTCC_STATUS_BLK_HOST_ADDR+4, 0x0000,
-+ 0x00000000, 0xffffffff },
-+ { HOSTCC_STATS_BLK_NIC_ADDR, 0x0000,
-+ 0xffffffff, 0x00000000 },
-+ { HOSTCC_STATUS_BLK_NIC_ADDR, 0x0000,
-+ 0xffffffff, 0x00000000 },
-+
-+ /* Buffer Manager Control Registers. */
-+ { BUFMGR_MB_POOL_ADDR, TG3_FL_NOT_5750,
-+ 0x00000000, 0x007fff80 },
-+ { BUFMGR_MB_POOL_SIZE, TG3_FL_NOT_5750,
-+ 0x00000000, 0x007fffff },
-+ { BUFMGR_MB_RDMA_LOW_WATER, 0x0000,
-+ 0x00000000, 0x0000003f },
-+ { BUFMGR_MB_MACRX_LOW_WATER, 0x0000,
-+ 0x00000000, 0x000001ff },
-+ { BUFMGR_MB_HIGH_WATER, 0x0000,
-+ 0x00000000, 0x000001ff },
-+ { BUFMGR_DMA_DESC_POOL_ADDR, TG3_FL_NOT_5705,
-+ 0xffffffff, 0x00000000 },
-+ { BUFMGR_DMA_DESC_POOL_SIZE, TG3_FL_NOT_5705,
-+ 0xffffffff, 0x00000000 },
-+
-+ /* Mailbox Registers */
-+ { GRCMBOX_RCVSTD_PROD_IDX+4, 0x0000,
-+ 0x00000000, 0x000001ff },
-+ { GRCMBOX_RCVJUMBO_PROD_IDX+4, TG3_FL_NOT_5705,
-+ 0x00000000, 0x000001ff },
-+ { GRCMBOX_RCVRET_CON_IDX_0+4, 0x0000,
-+ 0x00000000, 0x000007ff },
-+ { GRCMBOX_SNDHOST_PROD_IDX_0+4, 0x0000,
-+ 0x00000000, 0x000001ff },
-+
-+ { 0xffff, 0x0000, 0x00000000, 0x00000000 },
-+ };
-+
-+ is_5705 = is_5750 = 0;
-+ if (tg3_flag(tp, 5705_PLUS)) {
-+ is_5705 = 1;
-+ if (tg3_flag(tp, 5750_PLUS))
-+ is_5750 = 1;
-+ }
-+
-+ for (i = 0; reg_tbl[i].offset != 0xffff; i++) {
-+ if (is_5705 && (reg_tbl[i].flags & TG3_FL_NOT_5705))
-+ continue;
-+
-+ if (!is_5705 && (reg_tbl[i].flags & TG3_FL_5705))
-+ continue;
-+
-+ if (tg3_flag(tp, IS_5788) &&
-+ (reg_tbl[i].flags & TG3_FL_NOT_5788))
-+ continue;
-+
-+ if (is_5750 && (reg_tbl[i].flags & TG3_FL_NOT_5750))
-+ continue;
-+
-+ offset = (u32) reg_tbl[i].offset;
-+ read_mask = reg_tbl[i].read_mask;
-+ write_mask = reg_tbl[i].write_mask;
-+
-+ /* Save the original register content */
-+ save_val = tr32(offset);
-+
-+ /* Determine the read-only value. */
-+ read_val = save_val & read_mask;
-+
-+ /* Write zero to the register, then make sure the read-only bits
-+ * are not changed and the read/write bits are all zeros.
-+ */
-+ tw32(offset, 0);
-+
-+ val = tr32(offset);
-+
-+ /* Test the read-only and read/write bits. */
-+ if (((val & read_mask) != read_val) || (val & write_mask))
-+ goto out;
-+
-+ /* Write ones to all the bits defined by RdMask and WrMask, then
-+ * make sure the read-only bits are not changed and the
-+ * read/write bits are all ones.
-+ */
-+ tw32(offset, read_mask | write_mask);
-+
-+ val = tr32(offset);
-+
-+ /* Test the read-only bits. */
-+ if ((val & read_mask) != read_val)
-+ goto out;
-+
-+ /* Test the read/write bits. */
-+ if ((val & write_mask) != write_mask)
-+ goto out;
-+
-+ tw32(offset, save_val);
-+ }
-+
-+ return 0;
-+
-+out:
-+ if (netif_msg_hw(tp))
-+ netdev_err(tp->dev,
-+ "Register test failed at offset %x\n", offset);
-+ tw32(offset, save_val);
-+ return -EIO;
-+}
-+
-+static int tg3_do_mem_test(struct tg3 *tp, u32 offset, u32 len)
-+{
-+ static const u32 test_pattern[] = { 0x00000000, 0xffffffff, 0xaa55a55a };
-+ int i;
-+ u32 j;
-+
-+ for (i = 0; i < ARRAY_SIZE(test_pattern); i++) {
-+ for (j = 0; j < len; j += 4) {
-+ u32 val;
-+
-+ tg3_write_mem(tp, offset + j, test_pattern[i]);
-+ tg3_read_mem(tp, offset + j, &val);
-+ if (val != test_pattern[i])
-+ return -EIO;
-+ }
-+ }
-+ return 0;
-+}
-+
-+static int tg3_test_memory(struct tg3 *tp)
-+{
-+ static struct mem_entry {
-+ u32 offset;
-+ u32 len;
-+ } mem_tbl_570x[] = {
-+ { 0x00000000, 0x00b50},
-+ { 0x00002000, 0x1c000},
-+ { 0xffffffff, 0x00000}
-+ }, mem_tbl_5705[] = {
-+ { 0x00000100, 0x0000c},
-+ { 0x00000200, 0x00008},
-+ { 0x00004000, 0x00800},
-+ { 0x00006000, 0x01000},
-+ { 0x00008000, 0x02000},
-+ { 0x00010000, 0x0e000},
-+ { 0xffffffff, 0x00000}
-+ }, mem_tbl_5755[] = {
-+ { 0x00000200, 0x00008},
-+ { 0x00004000, 0x00800},
-+ { 0x00006000, 0x00800},
-+ { 0x00008000, 0x02000},
-+ { 0x00010000, 0x0c000},
-+ { 0xffffffff, 0x00000}
-+ }, mem_tbl_5906[] = {
-+ { 0x00000200, 0x00008},
-+ { 0x00004000, 0x00400},
-+ { 0x00006000, 0x00400},
-+ { 0x00008000, 0x01000},
-+ { 0x00010000, 0x01000},
-+ { 0xffffffff, 0x00000}
-+ }, mem_tbl_5717[] = {
-+ { 0x00000200, 0x00008},
-+ { 0x00010000, 0x0a000},
-+ { 0x00020000, 0x13c00},
-+ { 0xffffffff, 0x00000}
-+ }, mem_tbl_57765[] = {
-+ { 0x00000200, 0x00008},
-+ { 0x00004000, 0x00800},
-+ { 0x00006000, 0x09800},
-+ { 0x00010000, 0x0a000},
-+ { 0xffffffff, 0x00000}
-+ };
-+ struct mem_entry *mem_tbl;
-+ int err = 0;
-+ int i;
-+
-+ if (tg3_flag(tp, 5717_PLUS))
-+ mem_tbl = mem_tbl_5717;
-+ else if (tg3_flag(tp, 57765_CLASS) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762)
-+ mem_tbl = mem_tbl_57765;
-+ else if (tg3_flag(tp, 5755_PLUS))
-+ mem_tbl = mem_tbl_5755;
-+ else if (tg3_asic_rev(tp) == ASIC_REV_5906)
-+ mem_tbl = mem_tbl_5906;
-+ else if (tg3_flag(tp, 5705_PLUS))
-+ mem_tbl = mem_tbl_5705;
-+ else
-+ mem_tbl = mem_tbl_570x;
-+
-+ for (i = 0; mem_tbl[i].offset != 0xffffffff; i++) {
-+ err = tg3_do_mem_test(tp, mem_tbl[i].offset, mem_tbl[i].len);
-+ if (err)
-+ break;
-+ }
-+
-+ return err;
-+}
-+
-+#define TG3_TSO_MSS 500
-+
-+#define TG3_TSO_IP_HDR_LEN 20
-+#define TG3_TSO_TCP_HDR_LEN 20
-+#define TG3_TSO_TCP_OPT_LEN 12
-+
-+static const u8 tg3_tso_header[] = {
-+0x08, 0x00,
-+0x45, 0x00, 0x00, 0x00,
-+0x00, 0x00, 0x40, 0x00,
-+0x40, 0x06, 0x00, 0x00,
-+0x0a, 0x00, 0x00, 0x01,
-+0x0a, 0x00, 0x00, 0x02,
-+0x0d, 0x00, 0xe0, 0x00,
-+0x00, 0x00, 0x01, 0x00,
-+0x00, 0x00, 0x02, 0x00,
-+0x80, 0x10, 0x10, 0x00,
-+0x14, 0x09, 0x00, 0x00,
-+0x01, 0x01, 0x08, 0x0a,
-+0x11, 0x11, 0x11, 0x11,
-+0x11, 0x11, 0x11, 0x11,
-+};
-+
-+static int tg3_run_loopback(struct tg3 *tp, u32 pktsz, bool tso_loopback)
-+{
-+ u32 rx_start_idx, rx_idx, tx_idx, opaque_key;
-+ u32 base_flags = 0, mss = 0, desc_idx, coal_now, data_off, val;
-+ u32 budget;
-+ struct sk_buff *skb;
-+#ifndef BCM_HAS_BUILD_SKB
-+ struct sk_buff *rx_skb;
-+#endif
-+ u8 *tx_data, *rx_data;
-+ dma_addr_t map;
-+ int num_pkts, tx_len, rx_len, i, err;
-+ struct tg3_rx_buffer_desc *desc;
-+ struct tg3_napi *tnapi, *rnapi;
-+ struct tg3_rx_prodring_set *tpr = &tp->napi[0].prodring;
-+
-+ tnapi = &tp->napi[0];
-+ rnapi = &tp->napi[0];
-+ if (tg3_flag(tp, ENABLE_RSS))
-+ rnapi = &tp->napi[1];
-+ if (tg3_flag(tp, ENABLE_TSS))
-+ tnapi = &tp->napi[1];
-+ coal_now = tnapi->coal_now | rnapi->coal_now;
-+
-+ err = -EIO;
-+
-+ tx_len = pktsz;
-+ skb = netdev_alloc_skb(tp->dev, tx_len);
-+ if (!skb)
-+ return -ENOMEM;
-+
-+ tx_data = skb_put(skb, tx_len);
-+ memcpy(tx_data, tp->dev->dev_addr, ETH_ALEN);
-+ memset(tx_data + ETH_ALEN, 0x0, 8);
-+
-+ tw32(MAC_RX_MTU_SIZE, tx_len + ETH_FCS_LEN);
-+
-+#if TG3_TSO_SUPPORT != 0
-+ if (tso_loopback) {
-+ struct iphdr *iph = (struct iphdr *)&tx_data[ETH_HLEN];
-+
-+ u32 hdr_len = TG3_TSO_IP_HDR_LEN + TG3_TSO_TCP_HDR_LEN +
-+ TG3_TSO_TCP_OPT_LEN;
-+
-+ memcpy(tx_data + ETH_ALEN * 2, tg3_tso_header,
-+ sizeof(tg3_tso_header));
-+ mss = TG3_TSO_MSS;
-+
-+ val = tx_len - ETH_ALEN * 2 - sizeof(tg3_tso_header);
-+ num_pkts = DIV_ROUND_UP(val, TG3_TSO_MSS);
-+
-+ /* Set the total length field in the IP header */
-+ iph->tot_len = htons((u16)(mss + hdr_len));
-+
-+ base_flags = (TXD_FLAG_CPU_PRE_DMA |
-+ TXD_FLAG_CPU_POST_DMA);
-+
-+ if (tg3_flag(tp, HW_TSO_1) ||
-+ tg3_flag(tp, HW_TSO_2) ||
-+ tg3_flag(tp, HW_TSO_3)) {
-+ struct tcphdr *th;
-+ val = ETH_HLEN + TG3_TSO_IP_HDR_LEN;
-+ th = (struct tcphdr *)&tx_data[val];
-+ th->check = 0;
-+ } else
-+ base_flags |= TXD_FLAG_TCPUDP_CSUM;
-+
-+ if (tg3_flag(tp, HW_TSO_3)) {
-+ mss |= (hdr_len & 0xc) << 12;
-+ if (hdr_len & 0x10)
-+ base_flags |= 0x00000010;
-+ base_flags |= (hdr_len & 0x3e0) << 5;
-+ } else if (tg3_flag(tp, HW_TSO_2))
-+ mss |= hdr_len << 9;
-+ else if (tg3_flag(tp, HW_TSO_1) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5705) {
-+ mss |= (TG3_TSO_TCP_OPT_LEN << 9);
-+ } else {
-+ base_flags |= (TG3_TSO_TCP_OPT_LEN << 10);
-+ }
-+
-+ data_off = ETH_ALEN * 2 + sizeof(tg3_tso_header);
-+ } else
-+#endif
-+ {
-+ num_pkts = 1;
-+ data_off = ETH_HLEN;
-+
-+ if (tg3_flag(tp, USE_JUMBO_BDFLAG) &&
-+ tx_len > VLAN_ETH_FRAME_LEN)
-+ base_flags |= TXD_FLAG_JMB_PKT;
-+ }
-+
-+ for (i = data_off; i < tx_len; i++)
-+ tx_data[i] = (u8) (i & 0xff);
-+
-+ map = pci_map_single(tp->pdev, skb->data, tx_len, PCI_DMA_TODEVICE);
-+ if (pci_dma_mapping_error_(tp->pdev, map)) {
-+ dev_kfree_skb(skb);
-+ return -EIO;
-+ }
-+
-+ val = tnapi->tx_prod;
-+ tnapi->tx_buffers[val].skb = skb;
-+ dma_unmap_addr_set(&tnapi->tx_buffers[val], mapping, map);
-+
-+ tw32_f(HOSTCC_MODE, tp->coalesce_mode | HOSTCC_MODE_ENABLE |
-+ rnapi->coal_now);
-+
-+ udelay(10);
-+
-+ rx_start_idx = rnapi->hw_status->idx[0].rx_producer;
-+
-+ budget = tg3_tx_avail(tnapi);
-+ if (tg3_tx_frag_set(tnapi, &val, &budget, map, tx_len,
-+ base_flags | TXD_FLAG_END, mss, 0)) {
-+ tnapi->tx_buffers[val].skb = NULL;
-+ dev_kfree_skb(skb);
-+ return -EIO;
-+ }
-+
-+ tnapi->tx_prod++;
-+
-+ /* Sync BD data before updating mailbox */
-+ wmb();
-+
-+ tw32_tx_mbox(tnapi->prodmbox, tnapi->tx_prod);
-+ tr32_mailbox(tnapi->prodmbox);
-+
-+ udelay(10);
-+
-+ /* 350 usec to allow enough time on some 10/100 Mbps devices. */
-+ for (i = 0; i < 35; i++) {
-+ tw32_f(HOSTCC_MODE, tp->coalesce_mode | HOSTCC_MODE_ENABLE |
-+ coal_now);
-+
-+ udelay(10);
-+
-+ tx_idx = tnapi->hw_status->idx[0].tx_consumer;
-+ rx_idx = rnapi->hw_status->idx[0].rx_producer;
-+ if ((tx_idx == tnapi->tx_prod) &&
-+ (rx_idx == (rx_start_idx + num_pkts)))
-+ break;
-+ }
-+
-+ tg3_tx_skb_unmap(tnapi, tnapi->tx_prod - 1, -1);
-+ dev_kfree_skb(skb);
-+
-+ if (tx_idx != tnapi->tx_prod)
-+ goto out;
-+
-+ if (rx_idx != rx_start_idx + num_pkts)
-+ goto out;
-+
-+ val = data_off;
-+ while (rx_idx != rx_start_idx) {
-+ desc = &rnapi->rx_rcb[rx_start_idx++];
-+ desc_idx = desc->opaque & RXD_OPAQUE_INDEX_MASK;
-+ opaque_key = desc->opaque & RXD_OPAQUE_RING_MASK;
-+
-+ if ((desc->err_vlan & RXD_ERR_MASK) != 0 &&
-+ (desc->err_vlan != RXD_ERR_ODD_NIBBLE_RCVD_MII))
-+ goto out;
-+
-+ rx_len = ((desc->idx_len & RXD_LEN_MASK) >> RXD_LEN_SHIFT)
-+ - ETH_FCS_LEN;
-+
-+ if (!tso_loopback) {
-+ if (rx_len != tx_len)
-+ goto out;
-+
-+ if (pktsz <= TG3_RX_STD_DMA_SZ - ETH_FCS_LEN) {
-+ if (opaque_key != RXD_OPAQUE_RING_STD)
-+ goto out;
-+ } else {
-+ if (opaque_key != RXD_OPAQUE_RING_JUMBO)
-+ goto out;
-+ }
-+ } else if ((desc->type_flags & RXD_FLAG_TCPUDP_CSUM) &&
-+ (desc->ip_tcp_csum & RXD_TCPCSUM_MASK)
-+ >> RXD_TCPCSUM_SHIFT != 0xffff) {
-+ goto out;
-+ }
-+
-+ if (opaque_key == RXD_OPAQUE_RING_STD) {
-+#ifdef BCM_HAS_BUILD_SKB
-+ rx_data = tpr->rx_std_buffers[desc_idx].data;
-+#else
-+ rx_skb = tpr->rx_std_buffers[desc_idx].data;
-+ rx_data = rx_skb->data;
-+#endif
-+ map = dma_unmap_addr(&tpr->rx_std_buffers[desc_idx],
-+ mapping);
-+ } else if (opaque_key == RXD_OPAQUE_RING_JUMBO) {
-+#ifdef BCM_HAS_BUILD_SKB
-+ rx_data = tpr->rx_jmb_buffers[desc_idx].data;
-+#else
-+ rx_skb = tpr->rx_jmb_buffers[desc_idx].data;
-+ rx_data = rx_skb->data;
-+#endif
-+ map = dma_unmap_addr(&tpr->rx_jmb_buffers[desc_idx],
-+ mapping);
-+ } else
-+ goto out;
-+
-+ pci_dma_sync_single_for_cpu(tp->pdev, map, rx_len,
-+ PCI_DMA_FROMDEVICE);
-+
-+ for (i = data_off; i < rx_len; i++, val++) {
-+ if (*(rx_data + TG3_RX_OFFSET(tp) + i) != (u8) (val & 0xff))
-+ goto out;
-+ }
-+ }
-+
-+ err = 0;
-+
-+ /* tg3_free_rings will unmap and free the rx_data */
-+out:
-+ return err;
-+}
-+
-+#define TG3_STD_LOOPBACK_FAILED 1
-+#define TG3_JMB_LOOPBACK_FAILED 2
-+#define TG3_TSO_LOOPBACK_FAILED 4
-+#define TG3_LOOPBACK_FAILED \
-+ (TG3_STD_LOOPBACK_FAILED | \
-+ TG3_JMB_LOOPBACK_FAILED | \
-+ TG3_TSO_LOOPBACK_FAILED)
-+
-+static int tg3_test_loopback(struct tg3 *tp, u64 *data, bool do_extlpbk)
-+{
-+ int err = -EIO;
-+ u32 eee_cap;
-+ u32 jmb_pkt_sz = 9000;
-+
-+ if (tp->dma_limit)
-+ jmb_pkt_sz = tp->dma_limit - ETH_HLEN;
-+
-+ eee_cap = tp->phy_flags & TG3_PHYFLG_EEE_CAP;
-+ tp->phy_flags &= ~TG3_PHYFLG_EEE_CAP;
-+
-+ if (!netif_running(tp->dev)) {
-+ data[TG3_MAC_LOOPB_TEST] = TG3_LOOPBACK_FAILED;
-+ data[TG3_PHY_LOOPB_TEST] = TG3_LOOPBACK_FAILED;
-+ if (do_extlpbk)
-+ data[TG3_EXT_LOOPB_TEST] = TG3_LOOPBACK_FAILED;
-+ goto done;
-+ }
-+
-+ err = tg3_reset_hw(tp, true);
-+ if (err) {
-+ data[TG3_MAC_LOOPB_TEST] = TG3_LOOPBACK_FAILED;
-+ data[TG3_PHY_LOOPB_TEST] = TG3_LOOPBACK_FAILED;
-+ if (do_extlpbk)
-+ data[TG3_EXT_LOOPB_TEST] = TG3_LOOPBACK_FAILED;
-+ goto done;
-+ }
-+
-+ if (tg3_flag(tp, ENABLE_RSS)) {
-+ int i;
-+
-+ /* Reroute all rx packets to the 1st queue */
-+ for (i = MAC_RSS_INDIR_TBL_0;
-+ i < MAC_RSS_INDIR_TBL_0 + TG3_RSS_INDIR_TBL_SIZE; i += 4)
-+ tw32(i, 0x0);
-+ }
-+
-+ /* HW errata - mac loopback fails in some cases on 5780.
-+ * Normal traffic and PHY loopback are not affected by
-+ * errata. Also, the MAC loopback test is deprecated for
-+ * all newer ASIC revisions.
-+ */
-+ if (tg3_asic_rev(tp) != ASIC_REV_5780 &&
-+ !tg3_flag(tp, CPMU_PRESENT)) {
-+ tg3_mac_loopback(tp, true);
-+
-+ if (tg3_run_loopback(tp, ETH_FRAME_LEN, false))
-+ data[TG3_MAC_LOOPB_TEST] |= TG3_STD_LOOPBACK_FAILED;
-+
-+ if (tg3_flag(tp, JUMBO_RING_ENABLE) &&
-+ tg3_run_loopback(tp, jmb_pkt_sz + ETH_HLEN, false))
-+ data[TG3_MAC_LOOPB_TEST] |= TG3_JMB_LOOPBACK_FAILED;
-+
-+ tg3_mac_loopback(tp, false);
-+ }
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_PHY_SERDES) &&
-+ !tg3_flag(tp, USE_PHYLIB)) {
-+ int i;
-+
-+ tg3_phy_lpbk_set(tp, 0, false);
-+
-+ /* Wait for link */
-+ for (i = 0; i < 700; i++) {
-+ if (tr32(MAC_TX_STATUS) & TX_STATUS_LINK_UP)
-+ break;
-+ mdelay(1);
-+ }
-+
-+ if (i == 700) {
-+ netdev_info(tp->dev, "No link for loopback test!\n" );
-+ data[TG3_PHY_LOOPB_TEST] = TG3_LOOPBACK_FAILED;
-+ return -EIO;
-+ }
-+
-+ if (tg3_run_loopback(tp, ETH_FRAME_LEN, false))
-+ data[TG3_PHY_LOOPB_TEST] |= TG3_STD_LOOPBACK_FAILED;
-+#if TG3_TSO_SUPPORT != 0
-+ if (tg3_flag(tp, TSO_CAPABLE) &&
-+ tg3_run_loopback(tp, ETH_FRAME_LEN, true))
-+ data[TG3_PHY_LOOPB_TEST] |= TG3_TSO_LOOPBACK_FAILED;
-+#endif
-+ if (tg3_flag(tp, JUMBO_RING_ENABLE) &&
-+ tg3_run_loopback(tp, jmb_pkt_sz + ETH_HLEN, false))
-+ data[TG3_PHY_LOOPB_TEST] |= TG3_JMB_LOOPBACK_FAILED;
-+
-+ if (do_extlpbk) {
-+ tg3_phy_lpbk_set(tp, 0, true);
-+
-+ /* All link indications report up, but the hardware
-+ * isn't really ready for about 20 msec. Double it
-+ * to be sure.
-+ */
-+ mdelay(40);
-+
-+ if (tg3_run_loopback(tp, ETH_FRAME_LEN, false))
-+ data[TG3_EXT_LOOPB_TEST] |=
-+ TG3_STD_LOOPBACK_FAILED;
-+ if (tg3_flag(tp, TSO_CAPABLE) &&
-+ tg3_run_loopback(tp, ETH_FRAME_LEN, true))
-+ data[TG3_EXT_LOOPB_TEST] |=
-+ TG3_TSO_LOOPBACK_FAILED;
-+ if (tg3_flag(tp, JUMBO_RING_ENABLE) &&
-+ tg3_run_loopback(tp, jmb_pkt_sz + ETH_HLEN, false))
-+ data[TG3_EXT_LOOPB_TEST] |=
-+ TG3_JMB_LOOPBACK_FAILED;
-+ }
-+
-+ /* Re-enable gphy autopowerdown. */
-+ if (tp->phy_flags & TG3_PHYFLG_ENABLE_APD)
-+ tg3_phy_toggle_apd(tp, true);
-+ }
-+
-+ err = (data[TG3_MAC_LOOPB_TEST] | data[TG3_PHY_LOOPB_TEST] |
-+ data[TG3_EXT_LOOPB_TEST]) ? -EIO : 0;
-+
-+done:
-+ tp->phy_flags |= eee_cap;
-+
-+ return err;
-+}
-+
-+static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest,
-+ u64 *data)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ bool doextlpbk = etest->flags & ETH_TEST_FL_EXTERNAL_LB;
-+
-+ if (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER) {
-+ if (tg3_power_up(tp)) {
-+ etest->flags |= ETH_TEST_FL_FAILED;
-+ memset(data, 1, sizeof(u64) * TG3_NUM_TEST);
-+ return;
-+ }
-+ tg3_ape_driver_state_change(tp, RESET_KIND_INIT);
-+ }
-+
-+ memset(data, 0, sizeof(u64) * TG3_NUM_TEST);
-+
-+ if (tg3_test_nvram(tp) != 0) {
-+ etest->flags |= ETH_TEST_FL_FAILED;
-+ data[TG3_NVRAM_TEST] = 1;
-+ }
-+ if (!doextlpbk && tg3_test_link(tp)) {
-+ etest->flags |= ETH_TEST_FL_FAILED;
-+ data[TG3_LINK_TEST] = 1;
-+ }
-+ if (etest->flags & ETH_TEST_FL_OFFLINE) {
-+ int err, err2 = 0, irq_sync = 0;
-+
-+ if (netif_running(dev)) {
-+ tg3_phy_stop(tp);
-+ tg3_netif_stop(tp);
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ tg3_netq_invalidate_state(tp);
-+#endif
-+ irq_sync = 1;
-+ }
-+
-+ tg3_full_lock(tp, irq_sync);
-+ tg3_halt(tp, RESET_KIND_SUSPEND, 1);
-+ err = tg3_nvram_lock(tp);
-+ tg3_halt_cpu(tp, RX_CPU_BASE);
-+ if (!tg3_flag(tp, 5705_PLUS))
-+ tg3_halt_cpu(tp, TX_CPU_BASE);
-+ if (!err)
-+ tg3_nvram_unlock(tp);
-+
-+ if (tp->phy_flags & TG3_PHYFLG_MII_SERDES)
-+ tg3_phy_reset(tp);
-+
-+ if (tg3_test_registers(tp) != 0) {
-+ etest->flags |= ETH_TEST_FL_FAILED;
-+ data[TG3_REGISTER_TEST] = 1;
-+ }
-+
-+ if (tg3_test_memory(tp) != 0) {
-+ etest->flags |= ETH_TEST_FL_FAILED;
-+ data[TG3_MEMORY_TEST] = 1;
-+ }
-+
-+ if (doextlpbk)
-+ etest->flags |= ETH_TEST_FL_EXTERNAL_LB_DONE;
-+
-+ if (tg3_test_loopback(tp, data, doextlpbk))
-+ etest->flags |= ETH_TEST_FL_FAILED;
-+
-+ tg3_full_unlock(tp);
-+
-+ if (tg3_test_interrupt(tp) != 0) {
-+ etest->flags |= ETH_TEST_FL_FAILED;
-+ data[TG3_INTERRUPT_TEST] = 1;
-+ }
-+
-+ tg3_full_lock(tp, 0);
-+
-+ tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
-+ if (netif_running(dev)) {
-+ tg3_flag_set(tp, INIT_COMPLETE);
-+ err2 = tg3_restart_hw(tp, true);
-+ if (!err2)
-+ tg3_netif_start(tp);
-+ }
-+
-+ tg3_full_unlock(tp);
-+
-+ if (irq_sync && !err2)
-+ tg3_phy_start(tp);
-+ }
-+ if (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER)
-+ tg3_power_down_prepare(tp);
-+
-+}
-+
-+#ifdef BCM_HAS_IEEE1588_SUPPORT
-+static int tg3_hwtstamp_set(struct net_device *dev, struct ifreq *ifr)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ struct hwtstamp_config stmpconf;
-+
-+ if (!tg3_flag(tp, PTP_CAPABLE))
-+ return -EOPNOTSUPP;
-+
-+ if (copy_from_user(&stmpconf, ifr->ifr_data, sizeof(stmpconf)))
-+ return -EFAULT;
-+
-+ if (stmpconf.flags)
-+ return -EINVAL;
-+
-+ if (stmpconf.tx_type != HWTSTAMP_TX_ON &&
-+ stmpconf.tx_type != HWTSTAMP_TX_OFF)
-+ return -ERANGE;
-+
-+ switch (stmpconf.rx_filter) {
-+ case HWTSTAMP_FILTER_NONE:
-+ tp->rxptpctl = 0;
-+ break;
-+ case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
-+ tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V1_EN |
-+ TG3_RX_PTP_CTL_ALL_V1_EVENTS;
-+ break;
-+ case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
-+ tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V1_EN |
-+ TG3_RX_PTP_CTL_SYNC_EVNT;
-+ break;
-+ case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:
-+ tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V1_EN |
-+ TG3_RX_PTP_CTL_DELAY_REQ;
-+ break;
-+ case HWTSTAMP_FILTER_PTP_V2_EVENT:
-+ tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V2_EN |
-+ TG3_RX_PTP_CTL_ALL_V2_EVENTS;
-+ break;
-+ case HWTSTAMP_FILTER_PTP_V2_L2_EVENT:
-+ tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V2_L2_EN |
-+ TG3_RX_PTP_CTL_ALL_V2_EVENTS;
-+ break;
-+ case HWTSTAMP_FILTER_PTP_V2_L4_EVENT:
-+ tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V2_L4_EN |
-+ TG3_RX_PTP_CTL_ALL_V2_EVENTS;
-+ break;
-+ case HWTSTAMP_FILTER_PTP_V2_SYNC:
-+ tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V2_EN |
-+ TG3_RX_PTP_CTL_SYNC_EVNT;
-+ break;
-+ case HWTSTAMP_FILTER_PTP_V2_L2_SYNC:
-+ tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V2_L2_EN |
-+ TG3_RX_PTP_CTL_SYNC_EVNT;
-+ break;
-+ case HWTSTAMP_FILTER_PTP_V2_L4_SYNC:
-+ tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V2_L4_EN |
-+ TG3_RX_PTP_CTL_SYNC_EVNT;
-+ break;
-+ case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:
-+ tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V2_EN |
-+ TG3_RX_PTP_CTL_DELAY_REQ;
-+ break;
-+ case HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ:
-+ tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V2_L2_EN |
-+ TG3_RX_PTP_CTL_DELAY_REQ;
-+ break;
-+ case HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:
-+ tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V2_L4_EN |
-+ TG3_RX_PTP_CTL_DELAY_REQ;
-+ break;
-+ default:
-+ return -ERANGE;
-+ }
-+
-+ if (netif_running(dev) && tp->rxptpctl)
-+ tw32(TG3_RX_PTP_CTL,
-+ tp->rxptpctl | TG3_RX_PTP_CTL_HWTS_INTERLOCK);
-+
-+ if (stmpconf.tx_type == HWTSTAMP_TX_ON)
-+ tg3_flag_set(tp, TX_TSTAMP_EN);
-+ else
-+ tg3_flag_clear(tp, TX_TSTAMP_EN);
-+
-+ return copy_to_user(ifr->ifr_data, &stmpconf, sizeof(stmpconf)) ?
-+ -EFAULT : 0;
-+}
-+
-+static int tg3_hwtstamp_get(struct net_device *dev, struct ifreq *ifr)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ struct hwtstamp_config stmpconf;
-+
-+ if (!tg3_flag(tp, PTP_CAPABLE))
-+ return -EOPNOTSUPP;
-+
-+ stmpconf.flags = 0;
-+ stmpconf.tx_type = (tg3_flag(tp, TX_TSTAMP_EN) ?
-+ HWTSTAMP_TX_ON : HWTSTAMP_TX_OFF);
-+
-+ switch (tp->rxptpctl) {
-+ case 0:
-+ stmpconf.rx_filter = HWTSTAMP_FILTER_NONE;
-+ break;
-+ case TG3_RX_PTP_CTL_RX_PTP_V1_EN | TG3_RX_PTP_CTL_ALL_V1_EVENTS:
-+ stmpconf.rx_filter = HWTSTAMP_FILTER_PTP_V1_L4_EVENT;
-+ break;
-+ case TG3_RX_PTP_CTL_RX_PTP_V1_EN | TG3_RX_PTP_CTL_SYNC_EVNT:
-+ stmpconf.rx_filter = HWTSTAMP_FILTER_PTP_V1_L4_SYNC;
-+ break;
-+ case TG3_RX_PTP_CTL_RX_PTP_V1_EN | TG3_RX_PTP_CTL_DELAY_REQ:
-+ stmpconf.rx_filter = HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ;
-+ break;
-+ case TG3_RX_PTP_CTL_RX_PTP_V2_EN | TG3_RX_PTP_CTL_ALL_V2_EVENTS:
-+ stmpconf.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
-+ break;
-+ case TG3_RX_PTP_CTL_RX_PTP_V2_L2_EN | TG3_RX_PTP_CTL_ALL_V2_EVENTS:
-+ stmpconf.rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_EVENT;
-+ break;
-+ case TG3_RX_PTP_CTL_RX_PTP_V2_L4_EN | TG3_RX_PTP_CTL_ALL_V2_EVENTS:
-+ stmpconf.rx_filter = HWTSTAMP_FILTER_PTP_V2_L4_EVENT;
-+ break;
-+ case TG3_RX_PTP_CTL_RX_PTP_V2_EN | TG3_RX_PTP_CTL_SYNC_EVNT:
-+ stmpconf.rx_filter = HWTSTAMP_FILTER_PTP_V2_SYNC;
-+ break;
-+ case TG3_RX_PTP_CTL_RX_PTP_V2_L2_EN | TG3_RX_PTP_CTL_SYNC_EVNT:
-+ stmpconf.rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_SYNC;
-+ break;
-+ case TG3_RX_PTP_CTL_RX_PTP_V2_L4_EN | TG3_RX_PTP_CTL_SYNC_EVNT:
-+ stmpconf.rx_filter = HWTSTAMP_FILTER_PTP_V2_L4_SYNC;
-+ break;
-+ case TG3_RX_PTP_CTL_RX_PTP_V2_EN | TG3_RX_PTP_CTL_DELAY_REQ:
-+ stmpconf.rx_filter = HWTSTAMP_FILTER_PTP_V2_DELAY_REQ;
-+ break;
-+ case TG3_RX_PTP_CTL_RX_PTP_V2_L2_EN | TG3_RX_PTP_CTL_DELAY_REQ:
-+ stmpconf.rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ;
-+ break;
-+ case TG3_RX_PTP_CTL_RX_PTP_V2_L4_EN | TG3_RX_PTP_CTL_DELAY_REQ:
-+ stmpconf.rx_filter = HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ;
-+ break;
-+ default:
-+ WARN_ON_ONCE(1);
-+ return -ERANGE;
-+ }
-+
-+ return copy_to_user(ifr->ifr_data, &stmpconf, sizeof(stmpconf)) ?
-+ -EFAULT : 0;
-+}
-+#endif /* BCM_HAS_IEEE1588_SUPPORT */
-+
-+static int tg3_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
-+{
-+#if (LINUX_VERSION_CODE >= 0x020607)
-+ struct mii_ioctl_data *data = if_mii(ifr);
-+#else
-+ struct mii_ioctl_data *data = (struct mii_ioctl_data *) &ifr->ifr_ifru;
-+#endif
-+ struct tg3 *tp = netdev_priv(dev);
-+ int err;
-+
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if (tg3_flag(tp, USE_PHYLIB)) {
-+ struct phy_device *phydev;
-+ if (!(tp->phy_flags & TG3_PHYFLG_IS_CONNECTED))
-+ return -EAGAIN;
-+ phydev = tp->mdio_bus->phy_map[tp->phy_addr];
-+ return phy_mii_ioctl(phydev, ifr, cmd);
-+ }
-+#endif /* BCM_INCLUDE_PHYLIB_SUPPORT */
-+
-+ switch (cmd) {
-+ case SIOCGMIIPHY:
-+ data->phy_id = tp->phy_addr;
-+
-+ /* fallthru */
-+ case SIOCGMIIREG: {
-+ u32 mii_regval;
-+
-+ if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES)
-+ break; /* We have no PHY */
-+
-+ if (!netif_running(dev))
-+ return -EAGAIN;
-+
-+ spin_lock_bh(&tp->lock);
-+ err = __tg3_readphy(tp, data->phy_id & 0x1f,
-+ data->reg_num & 0x1f, &mii_regval);
-+ spin_unlock_bh(&tp->lock);
-+
-+ data->val_out = mii_regval;
-+
-+ return err;
-+ }
-+
-+ case SIOCSMIIREG:
-+ if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES)
-+ break; /* We have no PHY */
-+
-+ if (!netif_running(dev))
-+ return -EAGAIN;
-+
-+ spin_lock_bh(&tp->lock);
-+ err = __tg3_writephy(tp, data->phy_id & 0x1f,
-+ data->reg_num & 0x1f, data->val_in);
-+ spin_unlock_bh(&tp->lock);
-+
-+ return err;
-+
-+#if defined(__VMKLNX__) && !defined(TG3_VMWARE_BMAPILNX_DISABLE)
-+ case BRCM_VMWARE_CIM_IOCTL:
-+ return tg3_vmware_ioctl_cim(dev, ifr);
-+#endif /* TG3_VMWARE_BMAPILNX */
-+
-+#ifdef BCM_HAS_IEEE1588_SUPPORT
-+ case SIOCSHWTSTAMP:
-+ return tg3_hwtstamp_set(dev, ifr);
-+
-+ case SIOCGHWTSTAMP:
-+ return tg3_hwtstamp_get(dev, ifr);
-+#endif /* BCM_HAS_IEEE1588_SUPPORT */
-+
-+ default:
-+ /* do nothing */
-+ break;
-+ }
-+ return -EOPNOTSUPP;
-+}
-+
-+static int tg3_get_coalesce(struct net_device *dev, struct ethtool_coalesce *ec)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ memcpy(ec, &tp->coal, sizeof(*ec));
-+ return 0;
-+}
-+
-+static int tg3_set_coalesce(struct net_device *dev, struct ethtool_coalesce *ec)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ u32 max_rxcoal_tick_int = 0, max_txcoal_tick_int = 0;
-+ u32 max_stat_coal_ticks = 0, min_stat_coal_ticks = 0;
-+
-+ if (!tg3_flag(tp, 5705_PLUS)) {
-+ max_rxcoal_tick_int = MAX_RXCOAL_TICK_INT;
-+ max_txcoal_tick_int = MAX_TXCOAL_TICK_INT;
-+ max_stat_coal_ticks = MAX_STAT_COAL_TICKS;
-+ min_stat_coal_ticks = MIN_STAT_COAL_TICKS;
-+ }
-+
-+ if ((ec->rx_coalesce_usecs > MAX_RXCOL_TICKS) ||
-+ (ec->tx_coalesce_usecs > MAX_TXCOL_TICKS) ||
-+ (ec->rx_max_coalesced_frames > MAX_RXMAX_FRAMES) ||
-+ (ec->tx_max_coalesced_frames > MAX_TXMAX_FRAMES) ||
-+ (ec->rx_coalesce_usecs_irq > max_rxcoal_tick_int) ||
-+ (ec->tx_coalesce_usecs_irq > max_txcoal_tick_int) ||
-+ (ec->rx_max_coalesced_frames_irq > MAX_RXCOAL_MAXF_INT) ||
-+ (ec->tx_max_coalesced_frames_irq > MAX_TXCOAL_MAXF_INT) ||
-+ (ec->stats_block_coalesce_usecs > max_stat_coal_ticks) ||
-+ (ec->stats_block_coalesce_usecs < min_stat_coal_ticks))
-+ return -EINVAL;
-+
-+ /* No rx interrupts will be generated if both are zero */
-+ if ((ec->rx_coalesce_usecs == 0) &&
-+ (ec->rx_max_coalesced_frames == 0))
-+ return -EINVAL;
-+
-+ /* No tx interrupts will be generated if both are zero */
-+ if ((ec->tx_coalesce_usecs == 0) &&
-+ (ec->tx_max_coalesced_frames == 0))
-+ return -EINVAL;
-+
-+ /* Only copy relevant parameters, ignore all others. */
-+ tp->coal.rx_coalesce_usecs = ec->rx_coalesce_usecs;
-+ tp->coal.tx_coalesce_usecs = ec->tx_coalesce_usecs;
-+ tp->coal.rx_max_coalesced_frames = ec->rx_max_coalesced_frames;
-+ tp->coal.tx_max_coalesced_frames = ec->tx_max_coalesced_frames;
-+ tp->coal.rx_coalesce_usecs_irq = ec->rx_coalesce_usecs_irq;
-+ tp->coal.tx_coalesce_usecs_irq = ec->tx_coalesce_usecs_irq;
-+ tp->coal.rx_max_coalesced_frames_irq = ec->rx_max_coalesced_frames_irq;
-+ tp->coal.tx_max_coalesced_frames_irq = ec->tx_max_coalesced_frames_irq;
-+ tp->coal.stats_block_coalesce_usecs = ec->stats_block_coalesce_usecs;
-+
-+ if (netif_running(dev)) {
-+ tg3_full_lock(tp, 0);
-+ __tg3_set_coalesce(tp, &tp->coal);
-+ tg3_full_unlock(tp);
-+ }
-+ return 0;
-+}
-+
-+static u32 tg3_get_link(struct net_device *dev)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (!netif_running(tp->dev))
-+ return 0;
-+
-+ if (tg3_flag(tp, POLL_CPMU_LINK)) {
-+ u32 cpmu = tr32(TG3_CPMU_STATUS);
-+ return !((cpmu & TG3_CPMU_STATUS_LINK_MASK) ==
-+ TG3_CPMU_STATUS_LINK_MASK);
-+ }
-+
-+ return tp->link_up;
-+}
-+
-+#if defined(ETHTOOL_GEEE)
-+static int tg3_set_eee(struct net_device *dev, struct ethtool_eee *edata)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP)) {
-+ netdev_warn(tp->dev, "Board does not support EEE!\n");
-+ return -EOPNOTSUPP;
-+ }
-+
-+ if (edata->advertised != tp->eee.advertised) {
-+ netdev_warn(tp->dev,
-+ "Direct manipulation of EEE advertisement is not supported\n");
-+ return -EINVAL;
-+ }
-+
-+ if (edata->tx_lpi_timer > TG3_CPMU_DBTMR1_LNKIDLE_MAX) {
-+ netdev_warn(tp->dev,
-+ "Maximal Tx Lpi timer supported is %#x(u)\n",
-+ TG3_CPMU_DBTMR1_LNKIDLE_MAX);
-+ return -EINVAL;
-+ }
-+
-+ tp->eee = *edata;
-+
-+ tp->phy_flags |= TG3_PHYFLG_USER_CONFIGURED;
-+ tg3_warn_mgmt_link_flap(tp);
-+
-+ if (netif_running(tp->dev)) {
-+ tg3_full_lock(tp, 0);
-+ tg3_setup_eee(tp);
-+ tg3_phy_reset(tp);
-+ tg3_full_unlock(tp);
-+ }
-+
-+ return 0;
-+}
-+
-+static int tg3_get_eee(struct net_device *dev, struct ethtool_eee *edata)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP)) {
-+ netdev_warn(tp->dev,
-+ "Board does not support EEE!\n");
-+ return -EOPNOTSUPP;
-+ }
-+
-+ *edata = tp->eee;
-+ return 0;
-+}
-+#endif
-+
-+static struct ethtool_ops tg3_ethtool_ops = {
-+ .get_settings = tg3_get_settings,
-+ .set_settings = tg3_set_settings,
-+ .get_drvinfo = tg3_get_drvinfo,
-+ .get_regs_len = tg3_get_regs_len,
-+ .get_regs = tg3_get_regs,
-+ .get_wol = tg3_get_wol,
-+ .set_wol = tg3_set_wol,
-+ .get_msglevel = tg3_get_msglevel,
-+ .set_msglevel = tg3_set_msglevel,
-+ .nway_reset = tg3_nway_reset,
-+ .get_link = tg3_get_link,
-+#if (LINUX_VERSION_CODE >= 0x20418)
-+ .get_eeprom_len = tg3_get_eeprom_len,
-+#endif
-+#ifdef ETHTOOL_GEEPROM
-+ .get_eeprom = tg3_get_eeprom,
-+#endif
-+#ifdef ETHTOOL_SEEPROM
-+ .set_eeprom = tg3_set_eeprom,
-+#endif
-+ .get_ringparam = tg3_get_ringparam,
-+ .set_ringparam = tg3_set_ringparam,
-+ .get_pauseparam = tg3_get_pauseparam,
-+ .set_pauseparam = tg3_set_pauseparam,
-+ .self_test = tg3_self_test,
-+ .get_strings = tg3_get_strings,
-+#if defined(BCM_HAS_SET_PHYS_ID) && !defined(GET_ETHTOOL_OP_EXT)
-+ .set_phys_id = tg3_set_phys_id,
-+#endif
-+ .get_ethtool_stats = tg3_get_ethtool_stats,
-+ .get_coalesce = tg3_get_coalesce,
-+ .set_coalesce = tg3_set_coalesce,
-+#if (LINUX_VERSION_CODE >= 0x20618) || defined (__VMKLNX__)
-+ .get_sset_count = tg3_get_sset_count,
-+#endif
-+#if defined(BCM_HAS_GET_RXNFC) && !defined(GET_ETHTOOL_OP_EXT)
-+ .get_rxnfc = tg3_get_rxnfc,
-+#endif /* BCM_HAS_GET_RXNFC */
-+#if defined(BCM_HAS_GET_RXFH_INDIR) && !defined(GET_ETHTOOL_OP_EXT)
-+#ifdef BCM_HAS_GET_RXFH_INDIR_SIZE
-+ .get_rxfh_indir_size = tg3_get_rxfh_indir_size,
-+#endif /* BCM_HAS_GET_RXFH_INDIR_SIZE */
-+#ifdef BCM_HAS_OLD_RXFH_INDIR
-+ .get_rxfh_indir = tg3_get_rxfh_indir,
-+ .set_rxfh_indir = tg3_set_rxfh_indir,
-+#else
-+ .get_rxfh = tg3_get_rxfh,
-+ .set_rxfh = tg3_set_rxfh,
-+#endif
-+#endif /* BCM_HAS_GET_RXFH_INDIR */
-+#if defined(ETHTOOL_GCHANNELS) && !defined(GET_ETHTOOL_OP_EXT)
-+ .get_channels = tg3_get_channels,
-+ .set_channels = tg3_set_channels,
-+#endif
-+
-+#ifndef BCM_HAS_NETDEV_UPDATE_FEATURES
-+ .get_rx_csum = tg3_get_rx_csum,
-+ .set_rx_csum = tg3_set_rx_csum,
-+ .get_tx_csum = ethtool_op_get_tx_csum,
-+#ifdef BCM_HAS_SET_TX_CSUM
-+ .set_tx_csum = tg3_set_tx_csum,
-+#endif
-+#if TG3_TSO_SUPPORT != 0
-+ .get_tso = ethtool_op_get_tso,
-+ .set_tso = tg3_set_tso,
-+#endif
-+#endif /* BCM_HAS_NETDEV_UPDATE_FEATURES */
-+#ifdef ETHTOOL_GSG
-+#if defined(BCM_HAS_ETHTOOL_OP_SET_SG) && !defined(BCM_HAS_FIX_FEATURES)
-+ .get_sg = ethtool_op_get_sg,
-+ .set_sg = ethtool_op_set_sg,
-+#endif
-+#endif
-+#if (LINUX_VERSION_CODE < 0x20618)
-+ .self_test_count = tg3_get_test_count,
-+#endif
-+#if !defined(BCM_HAS_SET_PHYS_ID) || defined(GET_ETHTOOL_OP_EXT)
-+ .phys_id = tg3_phys_id,
-+#endif
-+#if (LINUX_VERSION_CODE < 0x20618)
-+ .get_stats_count = tg3_get_stats_count,
-+#endif
-+#if defined(ETHTOOL_GPERMADDR) && (LINUX_VERSION_CODE < 0x020617)
-+ .get_perm_addr = ethtool_op_get_perm_addr,
-+#endif
-+#if IS_ENABLED(CONFIG_PTP_1588_CLOCK) && defined(ETHTOOL_GET_TS_INFO) && !defined(GET_ETHTOOL_OP_EXT)
-+ .get_ts_info = tg3_get_ts_info,
-+#endif
-+#if defined(ETHTOOL_GEEE) && !defined(GET_ETHTOOL_OP_EXT)
-+ .get_eee = tg3_get_eee,
-+ .set_eee = tg3_set_eee,
-+#endif
-+};
-+
-+#ifdef GET_ETHTOOL_OP_EXT
-+static const struct ethtool_ops_ext tg3_ethtool_ops_ext = {
-+ .size = sizeof(struct ethtool_ops_ext),
-+ .get_ts_info = tg3_get_ts_info,
-+#ifdef ETHTOOL_GEEE
-+ .get_eee = tg3_get_eee,
-+ .set_eee = tg3_set_eee,
-+#endif
-+ .get_channels = tg3_get_channels,
-+ .set_channels = tg3_set_channels,
-+};
-+#endif
-+
-+static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev,
-+ struct rtnl_link_stats64 *stats)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ spin_lock_bh(&tp->lock);
-+ if (!tp->hw_stats) {
-+ spin_unlock_bh(&tp->lock);
-+ return &tp->net_stats_prev;
-+ }
-+
-+ tg3_get_nstats(tp, stats);
-+ spin_unlock_bh(&tp->lock);
-+
-+ return stats;
-+}
-+
-+#ifdef GET_NETDEV_OP_EXT
-+static const struct net_device_ops_ext tg3_net_device_ops_ext = {
-+ .size = sizeof(struct net_device_ops_ext),
-+ .ndo_fix_features = tg3_fix_features,
-+ .ndo_set_features = tg3_set_features,
-+ .ndo_get_stats64 = tg3_get_stats64,
-+};
-+#endif
-+
-+static void tg3_set_rx_mode(struct net_device *dev)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (!netif_running(dev))
-+ return;
-+
-+ tg3_full_lock(tp, 0);
-+ __tg3_set_rx_mode(dev);
-+ tg3_full_unlock(tp);
-+}
-+
-+static inline void tg3_set_mtu(struct net_device *dev, struct tg3 *tp,
-+ int new_mtu)
-+{
-+ dev->mtu = new_mtu;
-+
-+ if (new_mtu > ETH_DATA_LEN) {
-+ if (tg3_flag(tp, 5780_CLASS)) {
-+ netdev_update_features(dev);
-+ tg3_flag_clear(tp, TSO_CAPABLE);
-+#if TG3_TSO_SUPPORT != 0
-+#ifdef BCM_HAS_ETHTOOL_OP_SET_TSO
-+ ethtool_op_set_tso(dev, 0);
-+#endif
-+#endif
-+ } else {
-+ tg3_flag_set(tp, JUMBO_RING_ENABLE);
-+ }
-+ } else {
-+ if (tg3_flag(tp, 5780_CLASS)) {
-+ tg3_flag_set(tp, TSO_CAPABLE);
-+ netdev_update_features(dev);
-+ }
-+ tg3_flag_clear(tp, JUMBO_RING_ENABLE);
-+ }
-+}
-+
-+static int tg3_change_mtu(struct net_device *dev, int new_mtu)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ int err;
-+ bool reset_phy = false;
-+
-+ if (new_mtu < TG3_MIN_MTU || new_mtu > TG3_MAX_MTU(tp))
-+ return -EINVAL;
-+
-+ if (!netif_running(dev)) {
-+ /* We'll just catch it later when the
-+ * device is up'd.
-+ */
-+ tg3_set_mtu(dev, tp, new_mtu);
-+ return 0;
-+ }
-+
-+#if defined(__VMKLNX__) && (VMWARE_ESX_DDK_VERSION < 50000)
-+ /* There is no need to hold rtnl_lock
-+ * when calling change MTU into driver
-+ * from VMkernel ESX 5.0 onwards.
-+ */
-+ rtnl_lock();
-+#endif
-+
-+ tg3_phy_stop(tp);
-+
-+ tg3_netif_stop(tp);
-+
-+ tg3_set_mtu(dev, tp, new_mtu);
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ tg3_netq_invalidate_state(tp);
-+#endif
-+
-+ tg3_full_lock(tp, 1);
-+
-+ tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
-+
-+ /* Reset PHY, otherwise the read DMA engine will be in a mode that
-+ * breaks all requests to 256 bytes.
-+ */
-+ if (tg3_asic_rev(tp) == ASIC_REV_57766)
-+ reset_phy = true;
-+
-+ err = tg3_restart_hw(tp, reset_phy);
-+
-+ if (!err)
-+ tg3_netif_start(tp);
-+
-+ tg3_full_unlock(tp);
-+
-+ if (!err)
-+ tg3_phy_start(tp);
-+
-+#if defined(__VMKLNX__) && (VMWARE_ESX_DDK_VERSION < 50000)
-+ rtnl_unlock();
-+#endif
-+
-+ return err;
-+}
-+
-+#ifdef BCM_HAS_NET_DEVICE_OPS
-+static const struct net_device_ops tg3_netdev_ops = {
-+ .ndo_open = tg3_open,
-+ .ndo_stop = tg3_close,
-+ .ndo_start_xmit = tg3_start_xmit,
-+#if defined(BCM_HAS_GET_STATS64)
-+#if !defined(GET_NETDEV_OP_EXT)
-+ .ndo_get_stats64 = tg3_get_stats64,
-+#endif
-+#else
-+ .ndo_get_stats = tg3_get_stats,
-+#endif
-+ .ndo_validate_addr = eth_validate_addr,
-+#ifdef BCM_HAS_SET_MULTICAST_LIST
-+ .ndo_set_multicast_list = tg3_set_rx_mode,
-+#else
-+ .ndo_set_rx_mode = tg3_set_rx_mode,
-+#endif
-+ .ndo_set_mac_address = tg3_set_mac_addr,
-+ .ndo_do_ioctl = tg3_ioctl,
-+ .ndo_tx_timeout = tg3_tx_timeout,
-+ .ndo_change_mtu = tg3_change_mtu,
-+#if defined(BCM_HAS_FIX_FEATURES) && !defined(GET_NETDEV_OP_EXT)
-+ .ndo_fix_features = tg3_fix_features,
-+ .ndo_set_features = tg3_set_features,
-+#endif
-+#if defined(BCM_KERNEL_SUPPORTS_8021Q) && !defined(BCM_HAS_NEW_VLAN_INTERFACE)
-+ .ndo_vlan_rx_register = tg3_vlan_rx_register,
-+#endif
-+#ifdef CONFIG_NET_POLL_CONTROLLER
-+ .ndo_poll_controller = tg3_poll_controller,
-+#endif
-+};
-+#endif /* BCM_HAS_NET_DEVICE_OPS */
-+
-+static void __devinit tg3_get_eeprom_size(struct tg3 *tp)
-+{
-+ u32 cursize, val, magic;
-+
-+ tp->nvram_size = EEPROM_CHIP_SIZE;
-+
-+ if (tg3_nvram_read(tp, 0, &magic) != 0)
-+ return;
-+
-+ if ((magic != TG3_EEPROM_MAGIC) &&
-+ ((magic & TG3_EEPROM_MAGIC_FW_MSK) != TG3_EEPROM_MAGIC_FW) &&
-+ ((magic & TG3_EEPROM_MAGIC_HW_MSK) != TG3_EEPROM_MAGIC_HW))
-+ return;
-+
-+ /*
-+ * Size the chip by reading offsets at increasing powers of two.
-+ * When we encounter our validation signature, we know the addressing
-+ * has wrapped around, and thus have our chip size.
-+ */
-+ cursize = 0x10;
-+
-+ while (cursize < tp->nvram_size) {
-+ if (tg3_nvram_read(tp, cursize, &val) != 0)
-+ return;
-+
-+ if (val == magic)
-+ break;
-+
-+ cursize <<= 1;
-+ }
-+
-+ tp->nvram_size = cursize;
-+}
-+
-+static void __devinit tg3_get_nvram_size(struct tg3 *tp)
-+{
-+ u32 val;
-+
-+ if (tg3_flag(tp, NO_NVRAM) || tg3_nvram_read(tp, 0, &val) != 0)
-+ return;
-+
-+ /* Selfboot format */
-+ if (val != TG3_EEPROM_MAGIC) {
-+ tg3_get_eeprom_size(tp);
-+ return;
-+ }
-+
-+ if (tg3_nvram_read(tp, 0xf0, &val) == 0) {
-+ if (val != 0) {
-+ /* This is confusing. We want to operate on the
-+ * 16-bit value at offset 0xf2. The tg3_nvram_read()
-+ * call will read from NVRAM and byteswap the data
-+ * according to the byteswapping settings for all
-+ * other register accesses. This ensures the data we
-+ * want will always reside in the lower 16-bits.
-+ * However, the data in NVRAM is in LE format, which
-+ * means the data from the NVRAM read will always be
-+ * opposite the endianness of the CPU. The 16-bit
-+ * byteswap then brings the data to CPU endianness.
-+ */
-+ tp->nvram_size = swab16((u16)(val & 0x0000ffff)) * 1024;
-+ return;
-+ }
-+ }
-+ tp->nvram_size = TG3_NVRAM_SIZE_512KB;
-+}
-+
-+static void __devinit tg3_get_nvram_info(struct tg3 *tp)
-+{
-+ u32 nvcfg1;
-+
-+ nvcfg1 = tr32(NVRAM_CFG1);
-+ if (nvcfg1 & NVRAM_CFG1_FLASHIF_ENAB) {
-+ tg3_flag_set(tp, FLASH);
-+ } else {
-+ nvcfg1 &= ~NVRAM_CFG1_COMPAT_BYPASS;
-+ tw32(NVRAM_CFG1, nvcfg1);
-+ }
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5750 ||
-+ tg3_flag(tp, 5780_CLASS)) {
-+ switch (nvcfg1 & NVRAM_CFG1_VENDOR_MASK) {
-+ case FLASH_VENDOR_ATMEL_FLASH_BUFFERED:
-+ tp->nvram_jedecnum = JEDEC_ATMEL;
-+ tp->nvram_pagesize = ATMEL_AT45DB0X1B_PAGE_SIZE;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ break;
-+ case FLASH_VENDOR_ATMEL_FLASH_UNBUFFERED:
-+ tp->nvram_jedecnum = JEDEC_ATMEL;
-+ tp->nvram_pagesize = ATMEL_AT25F512_PAGE_SIZE;
-+ break;
-+ case FLASH_VENDOR_ATMEL_EEPROM:
-+ tp->nvram_jedecnum = JEDEC_ATMEL;
-+ tp->nvram_pagesize = ATMEL_AT24C512_CHIP_SIZE;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ break;
-+ case FLASH_VENDOR_ST:
-+ tp->nvram_jedecnum = JEDEC_ST;
-+ tp->nvram_pagesize = ST_M45PEX0_PAGE_SIZE;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ break;
-+ case FLASH_VENDOR_SAIFUN:
-+ tp->nvram_jedecnum = JEDEC_SAIFUN;
-+ tp->nvram_pagesize = SAIFUN_SA25F0XX_PAGE_SIZE;
-+ break;
-+ case FLASH_VENDOR_SST_SMALL:
-+ case FLASH_VENDOR_SST_LARGE:
-+ tp->nvram_jedecnum = JEDEC_SST;
-+ tp->nvram_pagesize = SST_25VF0X0_PAGE_SIZE;
-+ break;
-+ }
-+ } else {
-+ tp->nvram_jedecnum = JEDEC_ATMEL;
-+ tp->nvram_pagesize = ATMEL_AT45DB0X1B_PAGE_SIZE;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ }
-+}
-+
-+static void __devinit tg3_nvram_get_pagesize(struct tg3 *tp, u32 nvmcfg1)
-+{
-+ switch (nvmcfg1 & NVRAM_CFG1_5752PAGE_SIZE_MASK) {
-+ case FLASH_5752PAGE_SIZE_256:
-+ tp->nvram_pagesize = 256;
-+ break;
-+ case FLASH_5752PAGE_SIZE_512:
-+ tp->nvram_pagesize = 512;
-+ break;
-+ case FLASH_5752PAGE_SIZE_1K:
-+ tp->nvram_pagesize = 1024;
-+ break;
-+ case FLASH_5752PAGE_SIZE_2K:
-+ tp->nvram_pagesize = 2048;
-+ break;
-+ case FLASH_5752PAGE_SIZE_4K:
-+ tp->nvram_pagesize = 4096;
-+ break;
-+ case FLASH_5752PAGE_SIZE_264:
-+ tp->nvram_pagesize = 264;
-+ break;
-+ case FLASH_5752PAGE_SIZE_528:
-+ tp->nvram_pagesize = 528;
-+ break;
-+ }
-+}
-+
-+static void __devinit tg3_get_5752_nvram_info(struct tg3 *tp)
-+{
-+ u32 nvcfg1;
-+
-+ nvcfg1 = tr32(NVRAM_CFG1);
-+
-+ /* NVRAM protection for TPM */
-+ if (nvcfg1 & (1 << 27))
-+ tg3_flag_set(tp, PROTECTED_NVRAM);
-+
-+ switch (nvcfg1 & NVRAM_CFG1_5752VENDOR_MASK) {
-+ case FLASH_5752VENDOR_ATMEL_EEPROM_64KHZ:
-+ case FLASH_5752VENDOR_ATMEL_EEPROM_376KHZ:
-+ tp->nvram_jedecnum = JEDEC_ATMEL;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ break;
-+ case FLASH_5752VENDOR_ATMEL_FLASH_BUFFERED:
-+ tp->nvram_jedecnum = JEDEC_ATMEL;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tg3_flag_set(tp, FLASH);
-+ break;
-+ case FLASH_5752VENDOR_ST_M45PE10:
-+ case FLASH_5752VENDOR_ST_M45PE20:
-+ case FLASH_5752VENDOR_ST_M45PE40:
-+ tp->nvram_jedecnum = JEDEC_ST;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tg3_flag_set(tp, FLASH);
-+ break;
-+ }
-+
-+ if (tg3_flag(tp, FLASH)) {
-+ tg3_nvram_get_pagesize(tp, nvcfg1);
-+ } else {
-+ /* For eeprom, set pagesize to maximum eeprom size */
-+ tp->nvram_pagesize = ATMEL_AT24C512_CHIP_SIZE;
-+
-+ nvcfg1 &= ~NVRAM_CFG1_COMPAT_BYPASS;
-+ tw32(NVRAM_CFG1, nvcfg1);
-+ }
-+}
-+
-+static void __devinit tg3_get_5755_nvram_info(struct tg3 *tp)
-+{
-+ u32 nvcfg1, protect = 0;
-+
-+ nvcfg1 = tr32(NVRAM_CFG1);
-+
-+ /* NVRAM protection for TPM */
-+ if (nvcfg1 & (1 << 27)) {
-+ tg3_flag_set(tp, PROTECTED_NVRAM);
-+ protect = 1;
-+ }
-+
-+ nvcfg1 &= NVRAM_CFG1_5752VENDOR_MASK;
-+ switch (nvcfg1) {
-+ case FLASH_5755VENDOR_ATMEL_FLASH_1:
-+ case FLASH_5755VENDOR_ATMEL_FLASH_2:
-+ case FLASH_5755VENDOR_ATMEL_FLASH_3:
-+ case FLASH_5755VENDOR_ATMEL_FLASH_5:
-+ tp->nvram_jedecnum = JEDEC_ATMEL;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tg3_flag_set(tp, FLASH);
-+ tp->nvram_pagesize = 264;
-+ if (nvcfg1 == FLASH_5755VENDOR_ATMEL_FLASH_1 ||
-+ nvcfg1 == FLASH_5755VENDOR_ATMEL_FLASH_5)
-+ tp->nvram_size = (protect ? 0x3e200 :
-+ TG3_NVRAM_SIZE_512KB);
-+ else if (nvcfg1 == FLASH_5755VENDOR_ATMEL_FLASH_2)
-+ tp->nvram_size = (protect ? 0x1f200 :
-+ TG3_NVRAM_SIZE_256KB);
-+ else
-+ tp->nvram_size = (protect ? 0x1f200 :
-+ TG3_NVRAM_SIZE_128KB);
-+ break;
-+ case FLASH_5752VENDOR_ST_M45PE10:
-+ case FLASH_5752VENDOR_ST_M45PE20:
-+ case FLASH_5752VENDOR_ST_M45PE40:
-+ tp->nvram_jedecnum = JEDEC_ST;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tg3_flag_set(tp, FLASH);
-+ tp->nvram_pagesize = 256;
-+ if (nvcfg1 == FLASH_5752VENDOR_ST_M45PE10)
-+ tp->nvram_size = (protect ?
-+ TG3_NVRAM_SIZE_64KB :
-+ TG3_NVRAM_SIZE_128KB);
-+ else if (nvcfg1 == FLASH_5752VENDOR_ST_M45PE20)
-+ tp->nvram_size = (protect ?
-+ TG3_NVRAM_SIZE_64KB :
-+ TG3_NVRAM_SIZE_256KB);
-+ else
-+ tp->nvram_size = (protect ?
-+ TG3_NVRAM_SIZE_128KB :
-+ TG3_NVRAM_SIZE_512KB);
-+ break;
-+ }
-+}
-+
-+static void __devinit tg3_get_5787_nvram_info(struct tg3 *tp)
-+{
-+ u32 nvcfg1;
-+
-+ nvcfg1 = tr32(NVRAM_CFG1);
-+
-+ switch (nvcfg1 & NVRAM_CFG1_5752VENDOR_MASK) {
-+ case FLASH_5787VENDOR_ATMEL_EEPROM_64KHZ:
-+ case FLASH_5787VENDOR_ATMEL_EEPROM_376KHZ:
-+ case FLASH_5787VENDOR_MICRO_EEPROM_64KHZ:
-+ case FLASH_5787VENDOR_MICRO_EEPROM_376KHZ:
-+ tp->nvram_jedecnum = JEDEC_ATMEL;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tp->nvram_pagesize = ATMEL_AT24C512_CHIP_SIZE;
-+
-+ nvcfg1 &= ~NVRAM_CFG1_COMPAT_BYPASS;
-+ tw32(NVRAM_CFG1, nvcfg1);
-+ break;
-+ case FLASH_5752VENDOR_ATMEL_FLASH_BUFFERED:
-+ case FLASH_5755VENDOR_ATMEL_FLASH_1:
-+ case FLASH_5755VENDOR_ATMEL_FLASH_2:
-+ case FLASH_5755VENDOR_ATMEL_FLASH_3:
-+ tp->nvram_jedecnum = JEDEC_ATMEL;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tg3_flag_set(tp, FLASH);
-+ tp->nvram_pagesize = 264;
-+ break;
-+ case FLASH_5752VENDOR_ST_M45PE10:
-+ case FLASH_5752VENDOR_ST_M45PE20:
-+ case FLASH_5752VENDOR_ST_M45PE40:
-+ tp->nvram_jedecnum = JEDEC_ST;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tg3_flag_set(tp, FLASH);
-+ tp->nvram_pagesize = 256;
-+ break;
-+ }
-+}
-+
-+static void __devinit tg3_get_5761_nvram_info(struct tg3 *tp)
-+{
-+ u32 nvcfg1, protect = 0;
-+
-+ nvcfg1 = tr32(NVRAM_CFG1);
-+
-+ /* NVRAM protection for TPM */
-+ if (nvcfg1 & (1 << 27)) {
-+ tg3_flag_set(tp, PROTECTED_NVRAM);
-+ protect = 1;
-+ }
-+
-+ nvcfg1 &= NVRAM_CFG1_5752VENDOR_MASK;
-+ switch (nvcfg1) {
-+ case FLASH_5761VENDOR_ATMEL_ADB021D:
-+ case FLASH_5761VENDOR_ATMEL_ADB041D:
-+ case FLASH_5761VENDOR_ATMEL_ADB081D:
-+ case FLASH_5761VENDOR_ATMEL_ADB161D:
-+ case FLASH_5761VENDOR_ATMEL_MDB021D:
-+ case FLASH_5761VENDOR_ATMEL_MDB041D:
-+ case FLASH_5761VENDOR_ATMEL_MDB081D:
-+ case FLASH_5761VENDOR_ATMEL_MDB161D:
-+ tp->nvram_jedecnum = JEDEC_ATMEL;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tg3_flag_set(tp, FLASH);
-+ tg3_flag_set(tp, NO_NVRAM_ADDR_TRANS);
-+ tp->nvram_pagesize = 256;
-+ break;
-+ case FLASH_5761VENDOR_ST_A_M45PE20:
-+ case FLASH_5761VENDOR_ST_A_M45PE40:
-+ case FLASH_5761VENDOR_ST_A_M45PE80:
-+ case FLASH_5761VENDOR_ST_A_M45PE16:
-+ case FLASH_5761VENDOR_ST_M_M45PE20:
-+ case FLASH_5761VENDOR_ST_M_M45PE40:
-+ case FLASH_5761VENDOR_ST_M_M45PE80:
-+ case FLASH_5761VENDOR_ST_M_M45PE16:
-+ tp->nvram_jedecnum = JEDEC_ST;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tg3_flag_set(tp, FLASH);
-+ tp->nvram_pagesize = 256;
-+ break;
-+ }
-+
-+ if (protect) {
-+ tp->nvram_size = tr32(NVRAM_ADDR_LOCKOUT);
-+ } else {
-+ switch (nvcfg1) {
-+ case FLASH_5761VENDOR_ATMEL_ADB161D:
-+ case FLASH_5761VENDOR_ATMEL_MDB161D:
-+ case FLASH_5761VENDOR_ST_A_M45PE16:
-+ case FLASH_5761VENDOR_ST_M_M45PE16:
-+ tp->nvram_size = TG3_NVRAM_SIZE_2MB;
-+ break;
-+ case FLASH_5761VENDOR_ATMEL_ADB081D:
-+ case FLASH_5761VENDOR_ATMEL_MDB081D:
-+ case FLASH_5761VENDOR_ST_A_M45PE80:
-+ case FLASH_5761VENDOR_ST_M_M45PE80:
-+ tp->nvram_size = TG3_NVRAM_SIZE_1MB;
-+ break;
-+ case FLASH_5761VENDOR_ATMEL_ADB041D:
-+ case FLASH_5761VENDOR_ATMEL_MDB041D:
-+ case FLASH_5761VENDOR_ST_A_M45PE40:
-+ case FLASH_5761VENDOR_ST_M_M45PE40:
-+ tp->nvram_size = TG3_NVRAM_SIZE_512KB;
-+ break;
-+ case FLASH_5761VENDOR_ATMEL_ADB021D:
-+ case FLASH_5761VENDOR_ATMEL_MDB021D:
-+ case FLASH_5761VENDOR_ST_A_M45PE20:
-+ case FLASH_5761VENDOR_ST_M_M45PE20:
-+ tp->nvram_size = TG3_NVRAM_SIZE_256KB;
-+ break;
-+ }
-+ }
-+}
-+
-+static void __devinit tg3_get_5906_nvram_info(struct tg3 *tp)
-+{
-+ tp->nvram_jedecnum = JEDEC_ATMEL;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tp->nvram_pagesize = ATMEL_AT24C512_CHIP_SIZE;
-+}
-+
-+static void __devinit tg3_get_57780_nvram_info(struct tg3 *tp)
-+{
-+ u32 nvcfg1;
-+
-+ nvcfg1 = tr32(NVRAM_CFG1);
-+
-+ switch (nvcfg1 & NVRAM_CFG1_5752VENDOR_MASK) {
-+ case FLASH_5787VENDOR_ATMEL_EEPROM_376KHZ:
-+ case FLASH_5787VENDOR_MICRO_EEPROM_376KHZ:
-+ tp->nvram_jedecnum = JEDEC_ATMEL;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tp->nvram_pagesize = ATMEL_AT24C512_CHIP_SIZE;
-+
-+ nvcfg1 &= ~NVRAM_CFG1_COMPAT_BYPASS;
-+ tw32(NVRAM_CFG1, nvcfg1);
-+ return;
-+ case FLASH_5752VENDOR_ATMEL_FLASH_BUFFERED:
-+ case FLASH_57780VENDOR_ATMEL_AT45DB011D:
-+ case FLASH_57780VENDOR_ATMEL_AT45DB011B:
-+ case FLASH_57780VENDOR_ATMEL_AT45DB021D:
-+ case FLASH_57780VENDOR_ATMEL_AT45DB021B:
-+ case FLASH_57780VENDOR_ATMEL_AT45DB041D:
-+ case FLASH_57780VENDOR_ATMEL_AT45DB041B:
-+ tp->nvram_jedecnum = JEDEC_ATMEL;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tg3_flag_set(tp, FLASH);
-+
-+ switch (nvcfg1 & NVRAM_CFG1_5752VENDOR_MASK) {
-+ case FLASH_5752VENDOR_ATMEL_FLASH_BUFFERED:
-+ case FLASH_57780VENDOR_ATMEL_AT45DB011D:
-+ case FLASH_57780VENDOR_ATMEL_AT45DB011B:
-+ tp->nvram_size = TG3_NVRAM_SIZE_128KB;
-+ break;
-+ case FLASH_57780VENDOR_ATMEL_AT45DB021D:
-+ case FLASH_57780VENDOR_ATMEL_AT45DB021B:
-+ tp->nvram_size = TG3_NVRAM_SIZE_256KB;
-+ break;
-+ case FLASH_57780VENDOR_ATMEL_AT45DB041D:
-+ case FLASH_57780VENDOR_ATMEL_AT45DB041B:
-+ tp->nvram_size = TG3_NVRAM_SIZE_512KB;
-+ break;
-+ }
-+ break;
-+ case FLASH_5752VENDOR_ST_M45PE10:
-+ case FLASH_5752VENDOR_ST_M45PE20:
-+ case FLASH_5752VENDOR_ST_M45PE40:
-+ tp->nvram_jedecnum = JEDEC_ST;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tg3_flag_set(tp, FLASH);
-+
-+ switch (nvcfg1 & NVRAM_CFG1_5752VENDOR_MASK) {
-+ case FLASH_5752VENDOR_ST_M45PE10:
-+ tp->nvram_size = TG3_NVRAM_SIZE_128KB;
-+ break;
-+ case FLASH_5752VENDOR_ST_M45PE20:
-+ tp->nvram_size = TG3_NVRAM_SIZE_256KB;
-+ break;
-+ case FLASH_5752VENDOR_ST_M45PE40:
-+ tp->nvram_size = TG3_NVRAM_SIZE_512KB;
-+ break;
-+ }
-+ break;
-+ default:
-+ tg3_flag_set(tp, NO_NVRAM);
-+ return;
-+ }
-+
-+ tg3_nvram_get_pagesize(tp, nvcfg1);
-+ if (tp->nvram_pagesize != 264 && tp->nvram_pagesize != 528)
-+ tg3_flag_set(tp, NO_NVRAM_ADDR_TRANS);
-+}
-+
-+
-+static void __devinit tg3_get_5717_nvram_info(struct tg3 *tp)
-+{
-+ u32 nvcfg1;
-+
-+ nvcfg1 = tr32(NVRAM_CFG1);
-+
-+ switch (nvcfg1 & NVRAM_CFG1_5752VENDOR_MASK) {
-+ case FLASH_5717VENDOR_ATMEL_EEPROM:
-+ case FLASH_5717VENDOR_MICRO_EEPROM:
-+ tp->nvram_jedecnum = JEDEC_ATMEL;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tp->nvram_pagesize = ATMEL_AT24C512_CHIP_SIZE;
-+
-+ nvcfg1 &= ~NVRAM_CFG1_COMPAT_BYPASS;
-+ tw32(NVRAM_CFG1, nvcfg1);
-+ return;
-+ case FLASH_5717VENDOR_ATMEL_MDB011D:
-+ case FLASH_5717VENDOR_ATMEL_ADB011B:
-+ case FLASH_5717VENDOR_ATMEL_ADB011D:
-+ case FLASH_5717VENDOR_ATMEL_MDB021D:
-+ case FLASH_5717VENDOR_ATMEL_ADB021B:
-+ case FLASH_5717VENDOR_ATMEL_ADB021D:
-+ case FLASH_5717VENDOR_ATMEL_45USPT:
-+ tp->nvram_jedecnum = JEDEC_ATMEL;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tg3_flag_set(tp, FLASH);
-+
-+ switch (nvcfg1 & NVRAM_CFG1_5752VENDOR_MASK) {
-+ case FLASH_5717VENDOR_ATMEL_MDB021D:
-+ /* Detect size with tg3_nvram_get_size() */
-+ break;
-+ case FLASH_5717VENDOR_ATMEL_ADB021B:
-+ case FLASH_5717VENDOR_ATMEL_ADB021D:
-+ tp->nvram_size = TG3_NVRAM_SIZE_256KB;
-+ break;
-+ default:
-+ tp->nvram_size = TG3_NVRAM_SIZE_128KB;
-+ break;
-+ }
-+ break;
-+ case FLASH_5717VENDOR_ST_M_M25PE10:
-+ case FLASH_5717VENDOR_ST_A_M25PE10:
-+ case FLASH_5717VENDOR_ST_M_M45PE10:
-+ case FLASH_5717VENDOR_ST_A_M45PE10:
-+ case FLASH_5717VENDOR_ST_M_M25PE20:
-+ case FLASH_5717VENDOR_ST_A_M25PE20:
-+ case FLASH_5717VENDOR_ST_M_M45PE20:
-+ case FLASH_5717VENDOR_ST_A_M45PE20:
-+ case FLASH_5717VENDOR_ST_25USPT:
-+ case FLASH_5717VENDOR_ST_45USPT:
-+ tp->nvram_jedecnum = JEDEC_ST;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tg3_flag_set(tp, FLASH);
-+
-+ switch (nvcfg1 & NVRAM_CFG1_5752VENDOR_MASK) {
-+ case FLASH_5717VENDOR_ST_M_M25PE20:
-+ case FLASH_5717VENDOR_ST_M_M45PE20:
-+ /* Detect size with tg3_nvram_get_size() */
-+ break;
-+ case FLASH_5717VENDOR_ST_A_M25PE20:
-+ case FLASH_5717VENDOR_ST_A_M45PE20:
-+ tp->nvram_size = TG3_NVRAM_SIZE_256KB;
-+ break;
-+ default:
-+ tp->nvram_size = TG3_NVRAM_SIZE_128KB;
-+ break;
-+ }
-+ break;
-+ default:
-+ tg3_flag_set(tp, NO_NVRAM);
-+ return;
-+ }
-+
-+ tg3_nvram_get_pagesize(tp, nvcfg1);
-+ if (tp->nvram_pagesize != 264 && tp->nvram_pagesize != 528)
-+ tg3_flag_set(tp, NO_NVRAM_ADDR_TRANS);
-+}
-+
-+static void __devinit tg3_get_5720_nvram_info(struct tg3 *tp)
-+{
-+ u32 nvcfg1, nvmpinstrp, nv_status;
-+
-+ nvcfg1 = tr32(NVRAM_CFG1);
-+ nvmpinstrp = nvcfg1 & NVRAM_CFG1_5752VENDOR_MASK;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5762) {
-+ if (!(nvcfg1 & NVRAM_CFG1_5762VENDOR_MASK)) {
-+ tg3_flag_set(tp, NO_NVRAM);
-+ return;
-+ }
-+
-+ switch (nvmpinstrp) {
-+ case FLASH_5762_MX25L_100:
-+ case FLASH_5762_MX25L_200:
-+ case FLASH_5762_MX25L_400:
-+ case FLASH_5762_MX25L_800:
-+ case FLASH_5762_MX25L_160_320:
-+ tp->nvram_pagesize = 4096;
-+ tp->nvram_jedecnum = JEDEC_MACRONIX;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tg3_flag_set(tp, NO_NVRAM_ADDR_TRANS);
-+ tg3_flag_set(tp, FLASH);
-+ nv_status = tr32(NVRAM_AUTOSENSE_STATUS);
-+ tp->nvram_size =
-+ (1 << (nv_status >> AUTOSENSE_DEVID &
-+ AUTOSENSE_DEVID_MASK)
-+ << AUTOSENSE_SIZE_IN_MB);
-+ return;
-+
-+ case FLASH_5762_EEPROM_HD:
-+ nvmpinstrp = FLASH_5720_EEPROM_HD;
-+ break;
-+ case FLASH_5762_EEPROM_LD:
-+ nvmpinstrp = FLASH_5720_EEPROM_LD;
-+ break;
-+ case FLASH_5720VENDOR_M_ST_M45PE20:
-+ /* This pinstrap supports multiple sizes, so force it
-+ * to read the actual size from location 0xf0.
-+ */
-+ nvmpinstrp = FLASH_5720VENDOR_ST_45USPT;
-+ break;
-+ }
-+ }
-+
-+ switch (nvmpinstrp) {
-+ case FLASH_5720_EEPROM_HD:
-+ case FLASH_5720_EEPROM_LD:
-+ tp->nvram_jedecnum = JEDEC_ATMEL;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+
-+ nvcfg1 &= ~NVRAM_CFG1_COMPAT_BYPASS;
-+ tw32(NVRAM_CFG1, nvcfg1);
-+ if (nvmpinstrp == FLASH_5720_EEPROM_HD)
-+ tp->nvram_pagesize = ATMEL_AT24C512_CHIP_SIZE;
-+ else
-+ tp->nvram_pagesize = ATMEL_AT24C02_CHIP_SIZE;
-+ return;
-+ case FLASH_5720VENDOR_M_ATMEL_DB011D:
-+ case FLASH_5720VENDOR_A_ATMEL_DB011B:
-+ case FLASH_5720VENDOR_A_ATMEL_DB011D:
-+ case FLASH_5720VENDOR_M_ATMEL_DB021D:
-+ case FLASH_5720VENDOR_A_ATMEL_DB021B:
-+ case FLASH_5720VENDOR_A_ATMEL_DB021D:
-+ case FLASH_5720VENDOR_M_ATMEL_DB041D:
-+ case FLASH_5720VENDOR_A_ATMEL_DB041B:
-+ case FLASH_5720VENDOR_A_ATMEL_DB041D:
-+ case FLASH_5720VENDOR_M_ATMEL_DB081D:
-+ case FLASH_5720VENDOR_A_ATMEL_DB081D:
-+ case FLASH_5720VENDOR_ATMEL_45USPT:
-+ tp->nvram_jedecnum = JEDEC_ATMEL;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tg3_flag_set(tp, FLASH);
-+
-+ switch (nvmpinstrp) {
-+ case FLASH_5720VENDOR_M_ATMEL_DB021D:
-+ case FLASH_5720VENDOR_A_ATMEL_DB021B:
-+ case FLASH_5720VENDOR_A_ATMEL_DB021D:
-+ tp->nvram_size = TG3_NVRAM_SIZE_256KB;
-+ break;
-+ case FLASH_5720VENDOR_M_ATMEL_DB041D:
-+ case FLASH_5720VENDOR_A_ATMEL_DB041B:
-+ case FLASH_5720VENDOR_A_ATMEL_DB041D:
-+ tp->nvram_size = TG3_NVRAM_SIZE_512KB;
-+ break;
-+ case FLASH_5720VENDOR_M_ATMEL_DB081D:
-+ case FLASH_5720VENDOR_A_ATMEL_DB081D:
-+ tp->nvram_size = TG3_NVRAM_SIZE_1MB;
-+ break;
-+ default:
-+ if (tg3_asic_rev(tp) != ASIC_REV_5762)
-+ tp->nvram_size = TG3_NVRAM_SIZE_128KB;
-+ break;
-+ }
-+ break;
-+ case FLASH_5720VENDOR_M_ST_M25PE10:
-+ case FLASH_5720VENDOR_M_ST_M45PE10:
-+ case FLASH_5720VENDOR_A_ST_M25PE10:
-+ case FLASH_5720VENDOR_A_ST_M45PE10:
-+ case FLASH_5720VENDOR_M_ST_M25PE20:
-+ case FLASH_5720VENDOR_M_ST_M45PE20:
-+ case FLASH_5720VENDOR_A_ST_M25PE20:
-+ case FLASH_5720VENDOR_A_ST_M45PE20:
-+ case FLASH_5720VENDOR_M_ST_M25PE40:
-+ case FLASH_5720VENDOR_M_ST_M45PE40:
-+ case FLASH_5720VENDOR_A_ST_M25PE40:
-+ case FLASH_5720VENDOR_A_ST_M45PE40:
-+ case FLASH_5720VENDOR_M_ST_M25PE80:
-+ case FLASH_5720VENDOR_M_ST_M45PE80:
-+ case FLASH_5720VENDOR_A_ST_M25PE80:
-+ case FLASH_5720VENDOR_A_ST_M45PE80:
-+ case FLASH_5720VENDOR_ST_25USPT:
-+ case FLASH_5720VENDOR_ST_45USPT:
-+ tp->nvram_jedecnum = JEDEC_ST;
-+ tg3_flag_set(tp, NVRAM_BUFFERED);
-+ tg3_flag_set(tp, FLASH);
-+
-+ switch (nvmpinstrp) {
-+ case FLASH_5720VENDOR_M_ST_M25PE20:
-+ case FLASH_5720VENDOR_M_ST_M45PE20:
-+ case FLASH_5720VENDOR_A_ST_M25PE20:
-+ case FLASH_5720VENDOR_A_ST_M45PE20:
-+ tp->nvram_size = TG3_NVRAM_SIZE_256KB;
-+ break;
-+ case FLASH_5720VENDOR_M_ST_M25PE40:
-+ case FLASH_5720VENDOR_M_ST_M45PE40:
-+ case FLASH_5720VENDOR_A_ST_M25PE40:
-+ case FLASH_5720VENDOR_A_ST_M45PE40:
-+ tp->nvram_size = TG3_NVRAM_SIZE_512KB;
-+ break;
-+ case FLASH_5720VENDOR_M_ST_M25PE80:
-+ case FLASH_5720VENDOR_M_ST_M45PE80:
-+ case FLASH_5720VENDOR_A_ST_M25PE80:
-+ case FLASH_5720VENDOR_A_ST_M45PE80:
-+ tp->nvram_size = TG3_NVRAM_SIZE_1MB;
-+ break;
-+ default:
-+ if (tg3_asic_rev(tp) != ASIC_REV_5762)
-+ tp->nvram_size = TG3_NVRAM_SIZE_128KB;
-+ break;
-+ }
-+ break;
-+ default:
-+ tg3_flag_set(tp, NO_NVRAM);
-+ return;
-+ }
-+
-+ tg3_nvram_get_pagesize(tp, nvcfg1);
-+ if (tp->nvram_pagesize != 264 && tp->nvram_pagesize != 528)
-+ tg3_flag_set(tp, NO_NVRAM_ADDR_TRANS);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5762) {
-+ u32 val;
-+
-+ if (tg3_nvram_read(tp, 0, &val))
-+ return;
-+
-+ if (val != TG3_EEPROM_MAGIC &&
-+ (val & TG3_EEPROM_MAGIC_FW_MSK) != TG3_EEPROM_MAGIC_FW)
-+ tg3_flag_set(tp, NO_NVRAM);
-+ }
-+}
-+
-+/* Chips other than 5700/5701 use the NVRAM for fetching info. */
-+static void __devinit tg3_nvram_init(struct tg3 *tp)
-+{
-+ if (tg3_flag(tp, IS_SSB_CORE)) {
-+ /* No NVRAM and EEPROM on the SSB Broadcom GigE core. */
-+ tg3_flag_clear(tp, NVRAM);
-+ tg3_flag_clear(tp, NVRAM_BUFFERED);
-+ tg3_flag_set(tp, NO_NVRAM);
-+ return;
-+ }
-+
-+ tw32_f(GRC_EEPROM_ADDR,
-+ (EEPROM_ADDR_FSM_RESET |
-+ (EEPROM_DEFAULT_CLOCK_PERIOD <<
-+ EEPROM_ADDR_CLKPERD_SHIFT)));
-+
-+ msleep(1);
-+
-+ /* Enable seeprom accesses. */
-+ tw32_f(GRC_LOCAL_CTRL,
-+ tr32(GRC_LOCAL_CTRL) | GRC_LCLCTRL_AUTO_SEEPROM);
-+ udelay(100);
-+
-+ if (tg3_asic_rev(tp) != ASIC_REV_5700 &&
-+ tg3_asic_rev(tp) != ASIC_REV_5701) {
-+ tg3_flag_set(tp, NVRAM);
-+
-+ if (tg3_nvram_lock(tp)) {
-+ netdev_warn(tp->dev,
-+ "Cannot get nvram lock, %s failed\n",
-+ __func__);
-+ return;
-+ }
-+ tg3_enable_nvram_access(tp);
-+
-+ tp->nvram_size = 0;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5752)
-+ tg3_get_5752_nvram_info(tp);
-+ else if (tg3_asic_rev(tp) == ASIC_REV_5755)
-+ tg3_get_5755_nvram_info(tp);
-+ else if (tg3_asic_rev(tp) == ASIC_REV_5787 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5784 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5785)
-+ tg3_get_5787_nvram_info(tp);
-+ else if (tg3_asic_rev(tp) == ASIC_REV_5761)
-+ tg3_get_5761_nvram_info(tp);
-+ else if (tg3_asic_rev(tp) == ASIC_REV_5906)
-+ tg3_get_5906_nvram_info(tp);
-+ else if (tg3_asic_rev(tp) == ASIC_REV_57780 ||
-+ tg3_flag(tp, 57765_CLASS))
-+ tg3_get_57780_nvram_info(tp);
-+ else if (tg3_asic_rev(tp) == ASIC_REV_5717 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5719)
-+ tg3_get_5717_nvram_info(tp);
-+ else if (tg3_asic_rev(tp) == ASIC_REV_5720 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762)
-+ tg3_get_5720_nvram_info(tp);
-+ else
-+ tg3_get_nvram_info(tp);
-+
-+ if (tp->nvram_size == 0)
-+ tg3_get_nvram_size(tp);
-+
-+ tg3_disable_nvram_access(tp);
-+ tg3_nvram_unlock(tp);
-+
-+ } else {
-+ tg3_flag_clear(tp, NVRAM);
-+ tg3_flag_clear(tp, NVRAM_BUFFERED);
-+
-+ tg3_get_eeprom_size(tp);
-+ }
-+}
-+
-+struct subsys_tbl_ent {
-+ u16 subsys_vendor, subsys_devid;
-+ u32 phy_id;
-+};
-+
-+static struct subsys_tbl_ent subsys_id_to_phy_id[] __devinitdata = {
-+ /* Broadcom boards. */
-+ { TG3PCI_SUBVENDOR_ID_BROADCOM,
-+ TG3PCI_SUBDEVICE_ID_BROADCOM_95700A6, TG3_PHY_ID_BCM5401 },
-+ { TG3PCI_SUBVENDOR_ID_BROADCOM,
-+ TG3PCI_SUBDEVICE_ID_BROADCOM_95701A5, TG3_PHY_ID_BCM5701 },
-+ { TG3PCI_SUBVENDOR_ID_BROADCOM,
-+ TG3PCI_SUBDEVICE_ID_BROADCOM_95700T6, TG3_PHY_ID_BCM8002 },
-+ { TG3PCI_SUBVENDOR_ID_BROADCOM,
-+ TG3PCI_SUBDEVICE_ID_BROADCOM_95700A9, 0 },
-+ { TG3PCI_SUBVENDOR_ID_BROADCOM,
-+ TG3PCI_SUBDEVICE_ID_BROADCOM_95701T1, TG3_PHY_ID_BCM5701 },
-+ { TG3PCI_SUBVENDOR_ID_BROADCOM,
-+ TG3PCI_SUBDEVICE_ID_BROADCOM_95701T8, TG3_PHY_ID_BCM5701 },
-+ { TG3PCI_SUBVENDOR_ID_BROADCOM,
-+ TG3PCI_SUBDEVICE_ID_BROADCOM_95701A7, 0 },
-+ { TG3PCI_SUBVENDOR_ID_BROADCOM,
-+ TG3PCI_SUBDEVICE_ID_BROADCOM_95701A10, TG3_PHY_ID_BCM5701 },
-+ { TG3PCI_SUBVENDOR_ID_BROADCOM,
-+ TG3PCI_SUBDEVICE_ID_BROADCOM_95701A12, TG3_PHY_ID_BCM5701 },
-+ { TG3PCI_SUBVENDOR_ID_BROADCOM,
-+ TG3PCI_SUBDEVICE_ID_BROADCOM_95703AX1, TG3_PHY_ID_BCM5703 },
-+ { TG3PCI_SUBVENDOR_ID_BROADCOM,
-+ TG3PCI_SUBDEVICE_ID_BROADCOM_95703AX2, TG3_PHY_ID_BCM5703 },
-+
-+ /* 3com boards. */
-+ { TG3PCI_SUBVENDOR_ID_3COM,
-+ TG3PCI_SUBDEVICE_ID_3COM_3C996T, TG3_PHY_ID_BCM5401 },
-+ { TG3PCI_SUBVENDOR_ID_3COM,
-+ TG3PCI_SUBDEVICE_ID_3COM_3C996BT, TG3_PHY_ID_BCM5701 },
-+ { TG3PCI_SUBVENDOR_ID_3COM,
-+ TG3PCI_SUBDEVICE_ID_3COM_3C996SX, 0 },
-+ { TG3PCI_SUBVENDOR_ID_3COM,
-+ TG3PCI_SUBDEVICE_ID_3COM_3C1000T, TG3_PHY_ID_BCM5701 },
-+ { TG3PCI_SUBVENDOR_ID_3COM,
-+ TG3PCI_SUBDEVICE_ID_3COM_3C940BR01, TG3_PHY_ID_BCM5701 },
-+
-+ /* DELL boards. */
-+ { TG3PCI_SUBVENDOR_ID_DELL,
-+ TG3PCI_SUBDEVICE_ID_DELL_VIPER, TG3_PHY_ID_BCM5401 },
-+ { TG3PCI_SUBVENDOR_ID_DELL,
-+ TG3PCI_SUBDEVICE_ID_DELL_JAGUAR, TG3_PHY_ID_BCM5401 },
-+ { TG3PCI_SUBVENDOR_ID_DELL,
-+ TG3PCI_SUBDEVICE_ID_DELL_MERLOT, TG3_PHY_ID_BCM5411 },
-+ { TG3PCI_SUBVENDOR_ID_DELL,
-+ TG3PCI_SUBDEVICE_ID_DELL_SLIM_MERLOT, TG3_PHY_ID_BCM5411 },
-+
-+ /* Compaq boards. */
-+ { TG3PCI_SUBVENDOR_ID_COMPAQ,
-+ TG3PCI_SUBDEVICE_ID_COMPAQ_BANSHEE, TG3_PHY_ID_BCM5701 },
-+ { TG3PCI_SUBVENDOR_ID_COMPAQ,
-+ TG3PCI_SUBDEVICE_ID_COMPAQ_BANSHEE_2, TG3_PHY_ID_BCM5701 },
-+ { TG3PCI_SUBVENDOR_ID_COMPAQ,
-+ TG3PCI_SUBDEVICE_ID_COMPAQ_CHANGELING, 0 },
-+ { TG3PCI_SUBVENDOR_ID_COMPAQ,
-+ TG3PCI_SUBDEVICE_ID_COMPAQ_NC7780, TG3_PHY_ID_BCM5701 },
-+ { TG3PCI_SUBVENDOR_ID_COMPAQ,
-+ TG3PCI_SUBDEVICE_ID_COMPAQ_NC7780_2, TG3_PHY_ID_BCM5701 },
-+
-+ /* IBM boards. */
-+ { TG3PCI_SUBVENDOR_ID_IBM,
-+ TG3PCI_SUBDEVICE_ID_IBM_5703SAX2, 0 }
-+};
-+
-+static struct subsys_tbl_ent * __devinit tg3_lookup_by_subsys(struct tg3 *tp)
-+{
-+ int i;
-+
-+ for (i = 0; i < ARRAY_SIZE(subsys_id_to_phy_id); i++) {
-+ if ((subsys_id_to_phy_id[i].subsys_vendor ==
-+ tp->pdev->subsystem_vendor) &&
-+ (subsys_id_to_phy_id[i].subsys_devid ==
-+ tp->pdev->subsystem_device))
-+ return &subsys_id_to_phy_id[i];
-+ }
-+ return NULL;
-+}
-+
-+static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
-+{
-+ u32 val;
-+
-+ tp->phy_id = TG3_PHY_ID_INVALID;
-+ tp->led_ctrl = LED_CTRL_MODE_PHY_1;
-+
-+ /* Assume an onboard device and WOL capable by default. */
-+ tg3_flag_set(tp, EEPROM_WRITE_PROT);
-+ tg3_flag_set(tp, WOL_CAP);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5906) {
-+ if (!(tr32(PCIE_TRANSACTION_CFG) & PCIE_TRANS_CFG_LOM)) {
-+ tg3_flag_clear(tp, EEPROM_WRITE_PROT);
-+ tg3_flag_set(tp, IS_NIC);
-+ }
-+ val = tr32(VCPU_CFGSHDW);
-+ if (val & VCPU_CFGSHDW_ASPM_DBNC)
-+ tg3_flag_set(tp, ASPM_WORKAROUND);
-+ if ((val & VCPU_CFGSHDW_WOL_ENABLE) &&
-+ (val & VCPU_CFGSHDW_WOL_MAGPKT))
-+ tg3_flag_set(tp, WOL_ENABLE);
-+ goto done;
-+ }
-+
-+ tg3_read_mem(tp, NIC_SRAM_DATA_SIG, &val);
-+ if (val == NIC_SRAM_DATA_SIG_MAGIC) {
-+ u32 nic_cfg, led_cfg;
-+ u32 cfg2 = 0, cfg4 = 0, cfg5 = 0;
-+ u32 nic_phy_id, ver, eeprom_phy_id;
-+ int eeprom_phy_serdes = 0;
-+
-+ tg3_read_mem(tp, NIC_SRAM_DATA_CFG, &nic_cfg);
-+ tp->nic_sram_data_cfg = nic_cfg;
-+
-+ tg3_read_mem(tp, NIC_SRAM_DATA_VER, &ver);
-+ ver >>= NIC_SRAM_DATA_VER_SHIFT;
-+ if (tg3_asic_rev(tp) != ASIC_REV_5700 &&
-+ tg3_asic_rev(tp) != ASIC_REV_5701 &&
-+ tg3_asic_rev(tp) != ASIC_REV_5703 &&
-+ (ver > 0) && (ver < 0x100))
-+ tg3_read_mem(tp, NIC_SRAM_DATA_CFG_2, &cfg2);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5785)
-+ tg3_read_mem(tp, NIC_SRAM_DATA_CFG_4, &cfg4);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5717 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5719 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5720)
-+ tg3_read_mem(tp, NIC_SRAM_DATA_CFG_5, &cfg5);
-+
-+ if ((nic_cfg & NIC_SRAM_DATA_CFG_PHY_TYPE_MASK) ==
-+ NIC_SRAM_DATA_CFG_PHY_TYPE_FIBER)
-+ eeprom_phy_serdes = 1;
-+
-+ tg3_read_mem(tp, NIC_SRAM_DATA_PHY_ID, &nic_phy_id);
-+ if (nic_phy_id != 0) {
-+ u32 id1 = nic_phy_id & NIC_SRAM_DATA_PHY_ID1_MASK;
-+ u32 id2 = nic_phy_id & NIC_SRAM_DATA_PHY_ID2_MASK;
-+
-+ eeprom_phy_id = (id1 >> 16) << 10;
-+ eeprom_phy_id |= (id2 & 0xfc00) << 16;
-+ eeprom_phy_id |= (id2 & 0x03ff) << 0;
-+ } else
-+ eeprom_phy_id = 0;
-+
-+ tp->phy_id = eeprom_phy_id;
-+ if (eeprom_phy_serdes) {
-+ if (!tg3_flag(tp, 5705_PLUS))
-+ tp->phy_flags |= TG3_PHYFLG_PHY_SERDES;
-+ else
-+ tp->phy_flags |= TG3_PHYFLG_MII_SERDES;
-+ }
-+
-+ if (tg3_flag(tp, 5750_PLUS))
-+ led_cfg = cfg2 & (NIC_SRAM_DATA_CFG_LED_MODE_MASK |
-+ SHASTA_EXT_LED_MODE_MASK);
-+ else
-+ led_cfg = nic_cfg & NIC_SRAM_DATA_CFG_LED_MODE_MASK;
-+
-+ switch (led_cfg) {
-+ default:
-+ case NIC_SRAM_DATA_CFG_LED_MODE_PHY_1:
-+ tp->led_ctrl = LED_CTRL_MODE_PHY_1;
-+ break;
-+
-+ case NIC_SRAM_DATA_CFG_LED_MODE_PHY_2:
-+ tp->led_ctrl = LED_CTRL_MODE_PHY_2;
-+ break;
-+
-+ case NIC_SRAM_DATA_CFG_LED_MODE_MAC:
-+ tp->led_ctrl = LED_CTRL_MODE_MAC;
-+
-+ /* Default to PHY_1_MODE if 0 (MAC_MODE) is
-+ * read on some older 5700/5701 bootcode.
-+ */
-+ if (tg3_asic_rev(tp) == ASIC_REV_5700 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5701)
-+ tp->led_ctrl = LED_CTRL_MODE_PHY_1;
-+
-+ break;
-+
-+ case SHASTA_EXT_LED_SHARED:
-+ tp->led_ctrl = LED_CTRL_MODE_SHARED;
-+ if (tg3_chip_rev_id(tp) != CHIPREV_ID_5750_A0 &&
-+ tg3_chip_rev_id(tp) != CHIPREV_ID_5750_A1)
-+ tp->led_ctrl |= (LED_CTRL_MODE_PHY_1 |
-+ LED_CTRL_MODE_PHY_2);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5717 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5719 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5720 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762)
-+ tp->led_ctrl |= 0xfff80000;
-+
-+ break;
-+
-+ case SHASTA_EXT_LED_MAC:
-+ tp->led_ctrl = LED_CTRL_MODE_SHASTA_MAC;
-+ break;
-+
-+ case SHASTA_EXT_LED_COMBO:
-+ tp->led_ctrl = LED_CTRL_MODE_COMBO;
-+ if (tg3_chip_rev_id(tp) != CHIPREV_ID_5750_A0)
-+ tp->led_ctrl |= (LED_CTRL_MODE_PHY_1 |
-+ LED_CTRL_MODE_PHY_2);
-+ break;
-+
-+ }
-+
-+ if ((tg3_asic_rev(tp) == ASIC_REV_5700 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5701) &&
-+ tp->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL)
-+ tp->led_ctrl = LED_CTRL_MODE_PHY_2;
-+
-+ if (tg3_chip_rev(tp) == CHIPREV_5784_AX)
-+ tp->led_ctrl = LED_CTRL_MODE_PHY_1;
-+
-+ if (nic_cfg & NIC_SRAM_DATA_CFG_EEPROM_WP) {
-+ tg3_flag_set(tp, EEPROM_WRITE_PROT);
-+ if ((tp->pdev->subsystem_vendor ==
-+ PCI_VENDOR_ID_ARIMA) &&
-+ (tp->pdev->subsystem_device == 0x205a ||
-+ tp->pdev->subsystem_device == 0x2063))
-+ tg3_flag_clear(tp, EEPROM_WRITE_PROT);
-+ } else {
-+ tg3_flag_clear(tp, EEPROM_WRITE_PROT);
-+ tg3_flag_set(tp, IS_NIC);
-+ }
-+
-+ if (nic_cfg & NIC_SRAM_DATA_CFG_ASF_ENABLE) {
-+ tg3_flag_set(tp, ENABLE_ASF);
-+ if (tg3_flag(tp, 5750_PLUS))
-+ tg3_flag_set(tp, ASF_NEW_HANDSHAKE);
-+ }
-+
-+ if ((nic_cfg & NIC_SRAM_DATA_CFG_APE_ENABLE) &&
-+ tg3_flag(tp, 5750_PLUS))
-+ tg3_flag_set(tp, ENABLE_APE);
-+
-+ if (tp->phy_flags & TG3_PHYFLG_ANY_SERDES &&
-+ !(nic_cfg & NIC_SRAM_DATA_CFG_FIBER_WOL))
-+ tg3_flag_clear(tp, WOL_CAP);
-+
-+ if (tg3_flag(tp, WOL_CAP) &&
-+ (nic_cfg & NIC_SRAM_DATA_CFG_WOL_ENABLE))
-+ tg3_flag_set(tp, WOL_ENABLE);
-+
-+ if (cfg2 & (1 << 17))
-+ tp->phy_flags |= TG3_PHYFLG_CAPACITIVE_COUPLING;
-+
-+ /* serdes signal pre-emphasis in register 0x590 set by */
-+ /* bootcode if bit 18 is set */
-+ if (cfg2 & (1 << 18))
-+ tp->phy_flags |= TG3_PHYFLG_SERDES_PREEMPHASIS;
-+
-+ if ((tg3_flag(tp, 57765_PLUS) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5785 ||
-+ (tg3_asic_rev(tp) == ASIC_REV_5784 &&
-+ tg3_chip_rev(tp) != CHIPREV_5784_AX)) &&
-+ (cfg2 & NIC_SRAM_DATA_CFG_2_APD_EN))
-+ tp->phy_flags |= TG3_PHYFLG_ENABLE_APD;
-+
-+ if (tg3_flag(tp, PCI_EXPRESS)) {
-+ u32 cfg3;
-+
-+ tg3_read_mem(tp, NIC_SRAM_DATA_CFG_3, &cfg3);
-+ if (tg3_asic_rev(tp) != ASIC_REV_5785 &&
-+ !tg3_flag(tp, 57765_PLUS) &&
-+ (cfg3 & NIC_SRAM_ASPM_DEBOUNCE))
-+ tg3_flag_set(tp, ASPM_WORKAROUND);
-+ if (cfg3 & NIC_SRAM_LNK_FLAP_AVOID)
-+ tp->phy_flags |= TG3_PHYFLG_KEEP_LINK_ON_PWRDN;
-+ if (cfg3 & NIC_SRAM_1G_ON_VAUX_OK)
-+ tp->phy_flags |= TG3_PHYFLG_1G_ON_VAUX_OK;
-+ }
-+
-+ if (cfg4 & NIC_SRAM_RGMII_INBAND_DISABLE)
-+ tg3_flag_set(tp, RGMII_INBAND_DISABLE);
-+ if (cfg4 & NIC_SRAM_RGMII_EXT_IBND_RX_EN)
-+ tg3_flag_set(tp, RGMII_EXT_IBND_RX_EN);
-+ if (cfg4 & NIC_SRAM_RGMII_EXT_IBND_TX_EN)
-+ tg3_flag_set(tp, RGMII_EXT_IBND_TX_EN);
-+
-+ if (cfg5 & NIC_SRAM_DISABLE_1G_HALF_ADV)
-+ tp->phy_flags |= TG3_PHYFLG_DISABLE_1G_HD_ADV;
-+ }
-+done:
-+
-+#ifndef BCM_HAS_DEVICE_SET_WAKEUP_CAPABLE
-+ device_init_wakeup(&tp->pdev->dev, tg3_flag(tp, WOL_CAP));
-+#endif
-+
-+ if (tg3_flag(tp, WOL_CAP))
-+ device_set_wakeup_enable(&tp->pdev->dev,
-+ tg3_flag(tp, WOL_ENABLE));
-+ else
-+ device_set_wakeup_capable(&tp->pdev->dev, false);
-+}
-+
-+static int __devinit tg3_ape_otp_read(struct tg3 *tp, u32 offset, u32 *val)
-+{
-+ int i, err;
-+ u32 val2, off = offset * 8;
-+
-+ err = tg3_nvram_lock(tp);
-+ if (err)
-+ return err;
-+
-+ tg3_ape_write32(tp, TG3_APE_OTP_ADDR, off | APE_OTP_ADDR_CPU_ENABLE);
-+ tg3_ape_write32(tp, TG3_APE_OTP_CTRL, APE_OTP_CTRL_PROG_EN |
-+ APE_OTP_CTRL_CMD_RD | APE_OTP_CTRL_START);
-+ tg3_ape_read32(tp, TG3_APE_OTP_CTRL);
-+ udelay(10);
-+
-+ for (i = 0; i < 100; i++) {
-+ val2 = tg3_ape_read32(tp, TG3_APE_OTP_STATUS);
-+ if (val2 & APE_OTP_STATUS_CMD_DONE) {
-+ *val = tg3_ape_read32(tp, TG3_APE_OTP_RD_DATA);
-+ break;
-+ }
-+ udelay(10);
-+ }
-+
-+ tg3_ape_write32(tp, TG3_APE_OTP_CTRL, 0);
-+
-+ tg3_nvram_unlock(tp);
-+ if (val2 & APE_OTP_STATUS_CMD_DONE)
-+ return 0;
-+
-+ return -EBUSY;
-+}
-+
-+static int __devinit tg3_issue_otp_command(struct tg3 *tp, u32 cmd)
-+{
-+ int i;
-+ u32 val;
-+
-+ tw32(OTP_CTRL, cmd | OTP_CTRL_OTP_CMD_START);
-+ tw32(OTP_CTRL, cmd);
-+
-+ /* Wait for up to 1 ms for command to execute. */
-+ for (i = 0; i < 100; i++) {
-+ val = tr32(OTP_STATUS);
-+ if (val & OTP_STATUS_CMD_DONE)
-+ break;
-+ udelay(10);
-+ }
-+
-+ return (val & OTP_STATUS_CMD_DONE) ? 0 : -EBUSY;
-+}
-+
-+/* Read the gphy configuration from the OTP region of the chip. The gphy
-+ * configuration is a 32-bit value that straddles the alignment boundary.
-+ * We do two 32-bit reads and then shift and merge the results.
-+ */
-+static u32 __devinit tg3_read_otp_phycfg(struct tg3 *tp)
-+{
-+ u32 bhalf_otp, thalf_otp;
-+
-+ tw32(OTP_MODE, OTP_MODE_OTP_THRU_GRC);
-+
-+ if (tg3_issue_otp_command(tp, OTP_CTRL_OTP_CMD_INIT))
-+ return 0;
-+
-+ tw32(OTP_ADDRESS, OTP_ADDRESS_MAGIC1);
-+
-+ if (tg3_issue_otp_command(tp, OTP_CTRL_OTP_CMD_READ))
-+ return 0;
-+
-+ thalf_otp = tr32(OTP_READ_DATA);
-+
-+ tw32(OTP_ADDRESS, OTP_ADDRESS_MAGIC2);
-+
-+ if (tg3_issue_otp_command(tp, OTP_CTRL_OTP_CMD_READ))
-+ return 0;
-+
-+ bhalf_otp = tr32(OTP_READ_DATA);
-+
-+ return ((thalf_otp & 0x0000ffff) << 16) | (bhalf_otp >> 16);
-+}
-+
-+static void __devinit tg3_phy_init_link_config(struct tg3 *tp)
-+{
-+ u32 adv = ADVERTISED_Autoneg;
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) {
-+ if (!(tp->phy_flags & TG3_PHYFLG_DISABLE_1G_HD_ADV))
-+ adv |= ADVERTISED_1000baseT_Half;
-+ adv |= ADVERTISED_1000baseT_Full;
-+ }
-+
-+ if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES))
-+ adv |= ADVERTISED_100baseT_Half |
-+ ADVERTISED_100baseT_Full |
-+ ADVERTISED_10baseT_Half |
-+ ADVERTISED_10baseT_Full |
-+ ADVERTISED_TP;
-+ else
-+ adv |= ADVERTISED_FIBRE;
-+
-+ tp->link_config.advertising = adv;
-+ tp->link_config.speed = SPEED_UNKNOWN;
-+ tp->link_config.duplex = DUPLEX_UNKNOWN;
-+ tp->link_config.autoneg = AUTONEG_ENABLE;
-+ tp->link_config.active_speed = SPEED_UNKNOWN;
-+ tp->link_config.active_duplex = DUPLEX_UNKNOWN;
-+
-+ tp->old_link = -1;
-+}
-+
-+static int __devinit tg3_phy_probe(struct tg3 *tp)
-+{
-+ u32 hw_phy_id_1, hw_phy_id_2;
-+ u32 hw_phy_id, hw_phy_id_masked;
-+ int err;
-+
-+ /* flow control autonegotiation is default behavior */
-+ tg3_flag_set(tp, PAUSE_AUTONEG);
-+ tp->link_config.flowctrl = FLOW_CTRL_TX | FLOW_CTRL_RX;
-+
-+ if (tg3_flag(tp, ENABLE_APE)) {
-+ switch (tp->pci_fn) {
-+ case 0:
-+ tp->phy_ape_lock = TG3_APE_LOCK_PHY0;
-+ break;
-+ case 1:
-+ tp->phy_ape_lock = TG3_APE_LOCK_PHY1;
-+ break;
-+ case 2:
-+ tp->phy_ape_lock = TG3_APE_LOCK_PHY2;
-+ break;
-+ case 3:
-+ tp->phy_ape_lock = TG3_APE_LOCK_PHY3;
-+ break;
-+ }
-+ }
-+
-+ if (!tg3_flag(tp, ENABLE_ASF) &&
-+ !(tp->phy_flags & TG3_PHYFLG_ANY_SERDES) &&
-+ !(tp->phy_flags & TG3_PHYFLG_10_100_ONLY))
-+ tp->phy_flags &= ~(TG3_PHYFLG_1G_ON_VAUX_OK |
-+ TG3_PHYFLG_KEEP_LINK_ON_PWRDN);
-+
-+ if (tg3_flag(tp, USE_PHYLIB))
-+ return tg3_phy_init(tp);
-+
-+ /* Reading the PHY ID register can conflict with ASF
-+ * firmware access to the PHY hardware.
-+ */
-+ err = 0;
-+ if (tg3_flag(tp, ENABLE_ASF) || tg3_flag(tp, ENABLE_APE)) {
-+ hw_phy_id = hw_phy_id_masked = TG3_PHY_ID_INVALID;
-+ } else {
-+ /* Now read the physical PHY_ID from the chip and verify
-+ * that it is sane. If it doesn't look good, we fall back
-+ * to either the hard-coded table based PHY_ID and failing
-+ * that the value found in the eeprom area.
-+ */
-+ err |= tg3_readphy(tp, MII_PHYSID1, &hw_phy_id_1);
-+ err |= tg3_readphy(tp, MII_PHYSID2, &hw_phy_id_2);
-+
-+ hw_phy_id = (hw_phy_id_1 & 0xffff) << 10;
-+ hw_phy_id |= (hw_phy_id_2 & 0xfc00) << 16;
-+ hw_phy_id |= (hw_phy_id_2 & 0x03ff) << 0;
-+
-+ hw_phy_id_masked = hw_phy_id & TG3_PHY_ID_MASK;
-+ }
-+
-+ if (!err && TG3_KNOWN_PHY_ID(hw_phy_id_masked)) {
-+ tp->phy_id = hw_phy_id;
-+ if (hw_phy_id_masked == TG3_PHY_ID_BCM8002)
-+ tp->phy_flags |= TG3_PHYFLG_PHY_SERDES;
-+ else
-+ tp->phy_flags &= ~TG3_PHYFLG_PHY_SERDES;
-+ } else {
-+ if (tp->phy_id != TG3_PHY_ID_INVALID) {
-+ /* Do nothing, phy ID already set up in
-+ * tg3_get_eeprom_hw_cfg().
-+ */
-+ } else {
-+ struct subsys_tbl_ent *p;
-+
-+ /* No eeprom signature? Try the hardcoded
-+ * subsys device table.
-+ */
-+ p = tg3_lookup_by_subsys(tp);
-+ if (p) {
-+ tp->phy_id = p->phy_id;
-+ } else if (!tg3_flag(tp, IS_SSB_CORE)) {
-+ /* For now we saw the IDs 0xbc050cd0,
-+ * 0xbc050f80 and 0xbc050c30 on devices
-+ * connected to an BCM4785 and there are
-+ * probably more. Just assume that the phy is
-+ * supported when it is connected to a SSB core
-+ * for now.
-+ */
-+ return -ENODEV;
-+ }
-+
-+ if (!tp->phy_id ||
-+ tp->phy_id == TG3_PHY_ID_BCM8002)
-+ tp->phy_flags |= TG3_PHYFLG_PHY_SERDES;
-+ }
-+ }
-+
-+ /* A0 */
-+ if (tg3_asic_rev(tp) == ASIC_REV_5785 &&
-+ tp->phy_id == TG3_PHY_ID_BCM50612E) {
-+ tp->phy_flags &= ~TG3_PHYFLG_ENABLE_APD;
-+ tg3_flag_clear(tp, RGMII_INBAND_DISABLE);
-+ tg3_flag_clear(tp, RGMII_EXT_IBND_RX_EN);
-+ tg3_flag_clear(tp, RGMII_EXT_IBND_TX_EN);
-+ }
-+
-+#ifndef TG3_DISABLE_EEE_SUPPORT
-+ if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES) &&
-+ (tg3_asic_rev(tp) == ASIC_REV_5719 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5720 ||
-+ tg3_asic_rev(tp) == ASIC_REV_57766 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762 ||
-+ (tg3_asic_rev(tp) == ASIC_REV_5717 &&
-+ tg3_chip_rev_id(tp) != CHIPREV_ID_5717_A0) ||
-+ (tg3_asic_rev(tp) == ASIC_REV_57765 &&
-+ tg3_chip_rev_id(tp) != CHIPREV_ID_57765_A0))) {
-+ tp->phy_flags |= TG3_PHYFLG_EEE_CAP;
-+
-+ tp->eee.supported = SUPPORTED_100baseT_Full |
-+ SUPPORTED_1000baseT_Full;
-+ tp->eee.advertised = ADVERTISED_100baseT_Full |
-+ ADVERTISED_1000baseT_Full;
-+ tp->eee.eee_enabled = !tg3_disable_eee;
-+ tp->eee.tx_lpi_enabled = 1;
-+ tp->eee.tx_lpi_timer = TG3_CPMU_DBTMR1_LNKIDLE_2047US;
-+ }
-+#endif /* TG3_DISABLE_EEE_SUPPORT */
-+
-+ tg3_phy_init_link_config(tp);
-+
-+ /* Bring the phy out of its low-power state. */
-+ if (!(tp->phy_flags & TG3_PHYFLG_KEEP_LINK_ON_PWRDN) &&
-+ !(tp->phy_flags & TG3_PHYFLG_ANY_SERDES) &&
-+ !tg3_flag(tp, ENABLE_APE) && !tg3_flag(tp, ENABLE_ASF))
-+ err = tg3_phy_reset(tp);
-+
-+ return err;
-+}
-+
-+static void __devinit tg3_read_vpd(struct tg3 *tp)
-+{
-+ u8 *vpd_data;
-+ unsigned int block_end, rosize, len;
-+ u32 vpdlen;
-+ int j, i = 0;
-+
-+ vpd_data = (u8 *)tg3_vpd_readblock(tp, &vpdlen);
-+ if (!vpd_data)
-+ goto out_no_vpd;
-+
-+ i = pci_vpd_find_tag(vpd_data, 0, vpdlen, PCI_VPD_LRDT_RO_DATA);
-+ if (i < 0)
-+ goto out_not_found;
-+
-+ rosize = pci_vpd_lrdt_size(&vpd_data[i]);
-+ block_end = i + PCI_VPD_LRDT_TAG_SIZE + rosize;
-+ i += PCI_VPD_LRDT_TAG_SIZE;
-+
-+ if (block_end > vpdlen)
-+ goto out_not_found;
-+
-+ j = pci_vpd_find_info_keyword(vpd_data, i, rosize,
-+ PCI_VPD_RO_KEYWORD_MFR_ID);
-+ if (j > 0) {
-+ len = pci_vpd_info_field_size(&vpd_data[j]);
-+
-+ j += PCI_VPD_INFO_FLD_HDR_SIZE;
-+ if (j + len > block_end || len != 4 ||
-+ memcmp(&vpd_data[j], "1028", 4))
-+ goto partno;
-+
-+ j = pci_vpd_find_info_keyword(vpd_data, i, rosize,
-+ PCI_VPD_RO_KEYWORD_VENDOR0);
-+ if (j < 0)
-+ goto partno;
-+
-+ len = pci_vpd_info_field_size(&vpd_data[j]);
-+
-+ j += PCI_VPD_INFO_FLD_HDR_SIZE;
-+ if (j + len > block_end)
-+ goto partno;
-+
-+ if (len >= sizeof(tp->fw_ver))
-+ len = sizeof(tp->fw_ver) - 1;
-+ memset(tp->fw_ver, 0, sizeof(tp->fw_ver));
-+ snprintf(tp->fw_ver, sizeof(tp->fw_ver), "%.*s bc ", len,
-+ &vpd_data[j]);
-+ }
-+
-+partno:
-+ i = pci_vpd_find_info_keyword(vpd_data, i, rosize,
-+ PCI_VPD_RO_KEYWORD_PARTNO);
-+ if (i < 0)
-+ goto out_not_found;
-+
-+ len = pci_vpd_info_field_size(&vpd_data[i]);
-+
-+ i += PCI_VPD_INFO_FLD_HDR_SIZE;
-+ if (len > TG3_BPN_SIZE ||
-+ (len + i) > vpdlen)
-+ goto out_not_found;
-+
-+ memcpy(tp->board_part_number, &vpd_data[i], len);
-+
-+out_not_found:
-+ kfree(vpd_data);
-+ if (tp->board_part_number[0])
-+ return;
-+
-+out_no_vpd:
-+ if (tg3_asic_rev(tp) == ASIC_REV_5717) {
-+ if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5717 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5717_C)
-+ strcpy(tp->board_part_number, "BCM5717");
-+ else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5718)
-+ strcpy(tp->board_part_number, "BCM5718");
-+ else
-+ goto nomatch;
-+ } else if (tg3_asic_rev(tp) == ASIC_REV_57780) {
-+ if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57780)
-+ strcpy(tp->board_part_number, "BCM57780");
-+ else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57760)
-+ strcpy(tp->board_part_number, "BCM57760");
-+ else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57790)
-+ strcpy(tp->board_part_number, "BCM57790");
-+ else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57788)
-+ strcpy(tp->board_part_number, "BCM57788");
-+ else
-+ goto nomatch;
-+ } else if (tg3_asic_rev(tp) == ASIC_REV_57765) {
-+ if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57761)
-+ strcpy(tp->board_part_number, "BCM57761");
-+ else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57765)
-+ strcpy(tp->board_part_number, "BCM57765");
-+ else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57781)
-+ strcpy(tp->board_part_number, "BCM57781");
-+ else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57785)
-+ strcpy(tp->board_part_number, "BCM57785");
-+ else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57791)
-+ strcpy(tp->board_part_number, "BCM57791");
-+ else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57795)
-+ strcpy(tp->board_part_number, "BCM57795");
-+ else
-+ goto nomatch;
-+ } else if (tg3_asic_rev(tp) == ASIC_REV_57766) {
-+ if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57762)
-+ strcpy(tp->board_part_number, "BCM57762");
-+ else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57766)
-+ strcpy(tp->board_part_number, "BCM57766");
-+ else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57782)
-+ strcpy(tp->board_part_number, "BCM57782");
-+ else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57786)
-+ strcpy(tp->board_part_number, "BCM57786");
-+ else
-+ goto nomatch;
-+ } else if (tg3_asic_rev(tp) == ASIC_REV_5906) {
-+ strcpy(tp->board_part_number, "BCM95906");
-+ } else {
-+nomatch:
-+ strcpy(tp->board_part_number, "none");
-+ }
-+}
-+
-+static int __devinit tg3_fw_img_is_valid(struct tg3 *tp, u32 offset)
-+{
-+ u32 val;
-+
-+ if (tg3_nvram_read(tp, offset, &val) ||
-+ (val & 0xfc000000) != 0x0c000000 ||
-+ tg3_nvram_read(tp, offset + 4, &val) ||
-+ val != 0)
-+ return 0;
-+
-+ return 1;
-+}
-+
-+static void __devinit tg3_read_bc_ver(struct tg3 *tp)
-+{
-+ u32 val, offset, start, ver_offset;
-+ int i, dst_off;
-+ bool newver = false;
-+
-+ if (tg3_nvram_read(tp, 0xc, &offset) ||
-+ tg3_nvram_read(tp, 0x4, &start))
-+ return;
-+
-+ offset = tg3_nvram_logical_addr(tp, offset);
-+
-+ if (tg3_nvram_read(tp, offset, &val))
-+ return;
-+
-+ if ((val & 0xfc000000) == 0x0c000000) {
-+ if (tg3_nvram_read(tp, offset + 4, &val))
-+ return;
-+
-+ if (val == 0)
-+ newver = true;
-+ }
-+
-+ dst_off = strlen(tp->fw_ver);
-+
-+ if (newver) {
-+ if (TG3_VER_SIZE - dst_off < 16 ||
-+ tg3_nvram_read(tp, offset + 8, &ver_offset))
-+ return;
-+
-+ offset = offset + ver_offset - start;
-+ for (i = 0; i < 16; i += 4) {
-+ __be32 v;
-+ if (tg3_nvram_read_be32(tp, offset + i, &v))
-+ return;
-+
-+ memcpy(tp->fw_ver + dst_off + i, &v, sizeof(v));
-+ }
-+ } else {
-+ u32 major, minor;
-+
-+ if (tg3_nvram_read(tp, TG3_NVM_PTREV_BCVER, &ver_offset))
-+ return;
-+
-+ major = (ver_offset & TG3_NVM_BCVER_MAJMSK) >>
-+ TG3_NVM_BCVER_MAJSFT;
-+ minor = ver_offset & TG3_NVM_BCVER_MINMSK;
-+ snprintf(&tp->fw_ver[dst_off], TG3_VER_SIZE - dst_off,
-+ "v%d.%02d", major, minor);
-+ }
-+}
-+
-+static void __devinit tg3_read_hwsb_ver(struct tg3 *tp)
-+{
-+ u32 val, major, minor;
-+
-+ /* Use native endian representation */
-+ if (tg3_nvram_read(tp, TG3_NVM_HWSB_CFG1, &val))
-+ return;
-+
-+ major = (val & TG3_NVM_HWSB_CFG1_MAJMSK) >>
-+ TG3_NVM_HWSB_CFG1_MAJSFT;
-+ minor = (val & TG3_NVM_HWSB_CFG1_MINMSK) >>
-+ TG3_NVM_HWSB_CFG1_MINSFT;
-+
-+ snprintf(&tp->fw_ver[0], 32, "sb v%d.%02d", major, minor);
-+}
-+
-+static void __devinit tg3_read_sb_ver(struct tg3 *tp, u32 val)
-+{
-+ u32 offset, major, minor, build;
-+
-+ strncat(tp->fw_ver, "sb", TG3_VER_SIZE - strlen(tp->fw_ver) - 1);
-+
-+ if ((val & TG3_EEPROM_SB_FORMAT_MASK) != TG3_EEPROM_SB_FORMAT_1)
-+ return;
-+
-+ switch (val & TG3_EEPROM_SB_REVISION_MASK) {
-+ case TG3_EEPROM_SB_REVISION_0:
-+ offset = TG3_EEPROM_SB_F1R0_EDH_OFF;
-+ break;
-+ case TG3_EEPROM_SB_REVISION_2:
-+ offset = TG3_EEPROM_SB_F1R2_EDH_OFF;
-+ break;
-+ case TG3_EEPROM_SB_REVISION_3:
-+ offset = TG3_EEPROM_SB_F1R3_EDH_OFF;
-+ break;
-+ case TG3_EEPROM_SB_REVISION_4:
-+ offset = TG3_EEPROM_SB_F1R4_EDH_OFF;
-+ break;
-+ case TG3_EEPROM_SB_REVISION_5:
-+ offset = TG3_EEPROM_SB_F1R5_EDH_OFF;
-+ break;
-+ case TG3_EEPROM_SB_REVISION_6:
-+ offset = TG3_EEPROM_SB_F1R6_EDH_OFF;
-+ break;
-+ default:
-+ return;
-+ }
-+
-+ if (tg3_nvram_read(tp, offset, &val))
-+ return;
-+
-+ build = (val & TG3_EEPROM_SB_EDH_BLD_MASK) >>
-+ TG3_EEPROM_SB_EDH_BLD_SHFT;
-+ major = (val & TG3_EEPROM_SB_EDH_MAJ_MASK) >>
-+ TG3_EEPROM_SB_EDH_MAJ_SHFT;
-+ minor = val & TG3_EEPROM_SB_EDH_MIN_MASK;
-+
-+ if (minor > 99 || build > 26)
-+ return;
-+
-+ offset = strlen(tp->fw_ver);
-+ snprintf(&tp->fw_ver[offset], TG3_VER_SIZE - offset,
-+ " v%d.%02d", major, minor);
-+
-+ if (build > 0) {
-+ offset = strlen(tp->fw_ver);
-+ if (offset < TG3_VER_SIZE - 1)
-+ tp->fw_ver[offset] = 'a' + build - 1;
-+ }
-+}
-+
-+static void __devinit tg3_read_mgmtfw_ver(struct tg3 *tp)
-+{
-+ u32 val, offset, start;
-+ int i, vlen;
-+
-+ for (offset = TG3_NVM_DIR_START;
-+ offset < TG3_NVM_DIR_END;
-+ offset += TG3_NVM_DIRENT_SIZE) {
-+ if (tg3_nvram_read(tp, offset, &val))
-+ return;
-+
-+ if ((val >> TG3_NVM_DIRTYPE_SHIFT) == TG3_NVM_DIRTYPE_ASFINI)
-+ break;
-+ }
-+
-+ if (offset == TG3_NVM_DIR_END)
-+ return;
-+
-+ if (!tg3_flag(tp, 5705_PLUS))
-+ start = 0x08000000;
-+ else if (tg3_nvram_read(tp, offset - 4, &start))
-+ return;
-+
-+ if (tg3_nvram_read(tp, offset + 4, &offset) ||
-+ !tg3_fw_img_is_valid(tp, offset) ||
-+ tg3_nvram_read(tp, offset + 8, &val))
-+ return;
-+
-+ offset += val - start;
-+
-+ vlen = strlen(tp->fw_ver);
-+
-+ tp->fw_ver[vlen++] = ',';
-+ tp->fw_ver[vlen++] = ' ';
-+
-+ for (i = 0; i < 4; i++) {
-+ __be32 v;
-+ if (tg3_nvram_read_be32(tp, offset, &v))
-+ return;
-+
-+ offset += sizeof(v);
-+
-+ if (vlen > TG3_VER_SIZE - sizeof(v)) {
-+ memcpy(&tp->fw_ver[vlen], &v, TG3_VER_SIZE - vlen);
-+ break;
-+ }
-+
-+ memcpy(&tp->fw_ver[vlen], &v, sizeof(v));
-+ vlen += sizeof(v);
-+ }
-+}
-+
-+static void __devinit tg3_probe_ncsi(struct tg3 *tp)
-+{
-+ u32 apedata;
-+
-+ apedata = tg3_ape_read32(tp, TG3_APE_SEG_SIG);
-+ if (apedata != APE_SEG_SIG_MAGIC)
-+ return;
-+
-+ apedata = tg3_ape_read32(tp, TG3_APE_FW_STATUS);
-+ if (!(apedata & APE_FW_STATUS_READY))
-+ return;
-+
-+ if (tg3_ape_read32(tp, TG3_APE_FW_FEATURES) & TG3_APE_FW_FEATURE_NCSI)
-+ tg3_flag_set(tp, APE_HAS_NCSI);
-+}
-+
-+static void __devinit tg3_read_dash_ver(struct tg3 *tp)
-+{
-+ int vlen;
-+ u32 apedata;
-+ char *fwtype;
-+
-+ apedata = tg3_ape_read32(tp, TG3_APE_FW_VERSION);
-+
-+ if (tg3_flag(tp, APE_HAS_NCSI))
-+ fwtype = "NCSI";
-+ else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5725)
-+ fwtype = "SMASH";
-+ else
-+ fwtype = "DASH";
-+
-+ vlen = strlen(tp->fw_ver);
-+
-+ snprintf(&tp->fw_ver[vlen], TG3_VER_SIZE - vlen, " %s v%d.%d.%d.%d",
-+ fwtype,
-+ (apedata & APE_FW_VERSION_MAJMSK) >> APE_FW_VERSION_MAJSFT,
-+ (apedata & APE_FW_VERSION_MINMSK) >> APE_FW_VERSION_MINSFT,
-+ (apedata & APE_FW_VERSION_REVMSK) >> APE_FW_VERSION_REVSFT,
-+ (apedata & APE_FW_VERSION_BLDMSK));
-+}
-+
-+static void __devinit tg3_read_otp_ver(struct tg3 *tp)
-+{
-+ u32 val, val2;
-+
-+ if (tg3_asic_rev(tp) != ASIC_REV_5762)
-+ return;
-+
-+ if (!tg3_ape_otp_read(tp, OTP_ADDRESS_MAGIC0, &val) &&
-+ !tg3_ape_otp_read(tp, OTP_ADDRESS_MAGIC0 + 4, &val2) &&
-+ TG3_OTP_MAGIC0_VALID(val)) {
-+ u64 val64 = (u64) val << 32 | val2;
-+ u32 ver = 0;
-+ int i, vlen;
-+
-+ for (i = 0; i < 7; i++) {
-+ if ((val64 & 0xff) == 0)
-+ break;
-+ ver = val64 & 0xff;
-+ val64 >>= 8;
-+ }
-+ vlen = strlen(tp->fw_ver);
-+ snprintf(&tp->fw_ver[vlen], TG3_VER_SIZE - vlen, " .%02d", ver);
-+ }
-+}
-+
-+static void __devinit tg3_read_fw_ver(struct tg3 *tp)
-+{
-+ u32 val;
-+ bool vpd_vers = false;
-+
-+ if (tp->fw_ver[0] != 0)
-+ vpd_vers = true;
-+
-+ if (tg3_flag(tp, NO_NVRAM)) {
-+ strcat(tp->fw_ver, "sb");
-+ tg3_read_otp_ver(tp);
-+ return;
-+ }
-+
-+ if (tg3_nvram_read(tp, 0, &val))
-+ return;
-+
-+ if (val == TG3_EEPROM_MAGIC)
-+ tg3_read_bc_ver(tp);
-+ else if ((val & TG3_EEPROM_MAGIC_FW_MSK) == TG3_EEPROM_MAGIC_FW)
-+ tg3_read_sb_ver(tp, val);
-+ else if ((val & TG3_EEPROM_MAGIC_HW_MSK) == TG3_EEPROM_MAGIC_HW)
-+ tg3_read_hwsb_ver(tp);
-+
-+ if (tg3_flag(tp, ENABLE_ASF)) {
-+ if (tg3_flag(tp, ENABLE_APE)) {
-+ tg3_probe_ncsi(tp);
-+ if (!vpd_vers)
-+ tg3_read_dash_ver(tp);
-+ } else if (!vpd_vers) {
-+ tg3_read_mgmtfw_ver(tp);
-+ }
-+ }
-+
-+ tp->fw_ver[TG3_VER_SIZE - 1] = 0;
-+}
-+
-+static inline u32 tg3_rx_ret_ring_size(struct tg3 *tp)
-+{
-+ if (tg3_flag(tp, LRG_PROD_RING_CAP))
-+ return TG3_RX_RET_MAX_SIZE_5717;
-+ else if (tg3_flag(tp, JUMBO_CAPABLE) && !tg3_flag(tp, 5780_CLASS))
-+ return TG3_RX_RET_MAX_SIZE_5700;
-+ else
-+ return TG3_RX_RET_MAX_SIZE_5705;
-+}
-+
-+#if (LINUX_VERSION_CODE >= 0x2060a)
-+static DEFINE_PCI_DEVICE_TABLE(tg3_write_reorder_chipsets) = {
-+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FE_GATE_700C) },
-+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE) },
-+ { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8385_0) },
-+ { },
-+};
-+#endif
-+
-+static struct pci_dev * __devinit tg3_find_peer(struct tg3 *tp)
-+{
-+ struct pci_dev *peer;
-+ unsigned int func, devnr = tp->pdev->devfn & ~7;
-+
-+ for (func = 0; func < 8; func++) {
-+ peer = pci_get_slot(tp->pdev->bus, devnr | func);
-+ if (peer && peer != tp->pdev)
-+ break;
-+ pci_dev_put(peer);
-+ }
-+ /* 5704 can be configured in single-port mode, set peer to
-+ * tp->pdev in that case.
-+ */
-+ if (!peer) {
-+ peer = tp->pdev;
-+ return peer;
-+ }
-+
-+ /*
-+ * We don't need to keep the refcount elevated; there's no way
-+ * to remove one half of this device without removing the other
-+ */
-+ pci_dev_put(peer);
-+
-+ return peer;
-+}
-+
-+static void __devinit tg3_detect_asic_rev(struct tg3 *tp, u32 misc_ctrl_reg)
-+{
-+ tp->pci_chip_rev_id = misc_ctrl_reg >> MISC_HOST_CTRL_CHIPREV_SHIFT;
-+ if (tg3_asic_rev(tp) == ASIC_REV_USE_PROD_ID_REG) {
-+ u32 reg;
-+
-+ /* All devices that use the alternate
-+ * ASIC REV location have a CPMU.
-+ */
-+ tg3_flag_set(tp, CPMU_PRESENT);
-+
-+ if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5717 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5717_C ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5718 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5719 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5720 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_57767 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_57764 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5762 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5725 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5727 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_57787)
-+ reg = TG3PCI_GEN2_PRODID_ASICREV;
-+ else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57781 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_57785 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_57761 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_57765 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_57791 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_57795 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_57762 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_57766 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_57782 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_57786)
-+ reg = TG3PCI_GEN15_PRODID_ASICREV;
-+ else
-+ reg = TG3PCI_PRODID_ASICREV;
-+
-+ pci_read_config_dword(tp->pdev, reg, &tp->pci_chip_rev_id);
-+ }
-+
-+ /* Wrong chip ID in 5752 A0. This code can be removed later
-+ * as A0 is not in production.
-+ */
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5752_A0_HW)
-+ tp->pci_chip_rev_id = CHIPREV_ID_5752_A0;
-+
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5717_C0)
-+ tp->pci_chip_rev_id = CHIPREV_ID_5720_A0;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5717 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5719 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5720)
-+ tg3_flag_set(tp, 5717_PLUS);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_57765 ||
-+ tg3_asic_rev(tp) == ASIC_REV_57766)
-+ tg3_flag_set(tp, 57765_CLASS);
-+
-+ if (tg3_flag(tp, 57765_CLASS) || tg3_flag(tp, 5717_PLUS) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762)
-+ tg3_flag_set(tp, 57765_PLUS);
-+
-+ /* Intentionally exclude ASIC_REV_5906 */
-+ if (tg3_asic_rev(tp) == ASIC_REV_5755 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5787 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5784 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5761 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5785 ||
-+ tg3_asic_rev(tp) == ASIC_REV_57780 ||
-+ tg3_flag(tp, 57765_PLUS))
-+ tg3_flag_set(tp, 5755_PLUS);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5780 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5714)
-+ tg3_flag_set(tp, 5780_CLASS);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5750 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5752 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5906 ||
-+ tg3_flag(tp, 5755_PLUS) ||
-+ tg3_flag(tp, 5780_CLASS))
-+ tg3_flag_set(tp, 5750_PLUS);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5705 ||
-+ tg3_flag(tp, 5750_PLUS))
-+ tg3_flag_set(tp, 5705_PLUS);
-+}
-+
-+static bool tg3_10_100_only_device(struct tg3 *tp,
-+ const struct pci_device_id *ent)
-+{
-+ u32 grc_misc_cfg = tr32(GRC_MISC_CFG) & GRC_MISC_CFG_BOARD_ID_MASK;
-+
-+ if ((tg3_asic_rev(tp) == ASIC_REV_5703 &&
-+ (grc_misc_cfg == 0x8000 || grc_misc_cfg == 0x4000)) ||
-+ (tp->phy_flags & TG3_PHYFLG_IS_FET))
-+ return true;
-+
-+ if (ent->driver_data & TG3_DRV_DATA_FLAG_10_100_ONLY) {
-+ if (tg3_asic_rev(tp) == ASIC_REV_5705) {
-+ if (ent->driver_data & TG3_DRV_DATA_FLAG_5705_10_100)
-+ return true;
-+ } else
-+ return true;
-+ }
-+
-+ return false;
-+}
-+
-+static int __devinit tg3_get_invariants(struct tg3 *tp,
-+ const struct pci_device_id *ent)
-+{
-+ u32 misc_ctrl_reg;
-+ u32 pci_state_reg, grc_misc_cfg;
-+ u32 val;
-+ u16 pci_cmd;
-+ int err;
-+
-+ /* Force memory write invalidate off. If we leave it on,
-+ * then on 5700_BX chips we have to enable a workaround.
-+ * The workaround is to set the TG3PCI_DMA_RW_CTRL boundary
-+ * to match the cacheline size. The Broadcom driver have this
-+ * workaround but turns MWI off all the times so never uses
-+ * it. This seems to suggest that the workaround is insufficient.
-+ */
-+ pci_read_config_word(tp->pdev, PCI_COMMAND, &pci_cmd);
-+ pci_cmd &= ~PCI_COMMAND_INVALIDATE;
-+ pci_write_config_word(tp->pdev, PCI_COMMAND, pci_cmd);
-+
-+ /* Important! -- Make sure register accesses are byteswapped
-+ * correctly. Also, for those chips that require it, make
-+ * sure that indirect register accesses are enabled before
-+ * the first operation.
-+ */
-+ pci_read_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL,
-+ &misc_ctrl_reg);
-+ tp->misc_host_ctrl |= (misc_ctrl_reg &
-+ MISC_HOST_CTRL_CHIPREV);
-+ pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL,
-+ tp->misc_host_ctrl);
-+
-+ tg3_detect_asic_rev(tp, misc_ctrl_reg);
-+
-+ /* Fix for CTRL-20413(Huawei)/19887 in KVM PCI Pass-thru mode
-+ * Qemu is dropping the pci config space writes to
-+ * 0x68, but it is 'not dropping' the BAR space access,
-+ * since BAR registers is setup properly in KVM environment.
-+ * This redundent write fixes the issue for KVM hypervisor
-+ * in SUSE 11.3 reported by Huawei.
-+ */
-+ if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5717_C ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5718 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5719 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5720)
-+ tg3_write32(tp, TG3PCI_MISC_HOST_CTRL, tp->misc_host_ctrl);
-+ /*Fix for CTRL-20413 ends*/
-+
-+ /* If we have 5702/03 A1 or A2 on certain ICH chipsets,
-+ * we need to disable memory and use config. cycles
-+ * only to access all registers. The 5702/03 chips
-+ * can mistakenly decode the special cycles from the
-+ * ICH chipsets as memory write cycles, causing corruption
-+ * of register and memory space. Only certain ICH bridges
-+ * will drive special cycles with non-zero data during the
-+ * address phase which can fall within the 5703's address
-+ * range. This is not an ICH bug as the PCI spec allows
-+ * non-zero address during special cycles. However, only
-+ * these ICH bridges are known to drive non-zero addresses
-+ * during special cycles.
-+ *
-+ * Since special cycles do not cross PCI bridges, we only
-+ * enable this workaround if the 5703 is on the secondary
-+ * bus of these ICH bridges.
-+ */
-+ if ((tg3_chip_rev_id(tp) == CHIPREV_ID_5703_A1) ||
-+ (tg3_chip_rev_id(tp) == CHIPREV_ID_5703_A2)) {
-+ static struct tg3_dev_id {
-+ u32 vendor;
-+ u32 device;
-+ u32 rev;
-+ } ich_chipsets[] = {
-+ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_8,
-+ PCI_ANY_ID },
-+ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_8,
-+ PCI_ANY_ID },
-+ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_11,
-+ 0xa },
-+ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_6,
-+ PCI_ANY_ID },
-+ { },
-+ };
-+ struct tg3_dev_id *pci_id = &ich_chipsets[0];
-+ struct pci_dev *bridge = NULL;
-+
-+ while (pci_id->vendor != 0) {
-+ bridge = pci_get_device(pci_id->vendor, pci_id->device,
-+ bridge);
-+ if (!bridge) {
-+ pci_id++;
-+ continue;
-+ }
-+ if (pci_id->rev != PCI_ANY_ID) {
-+ u8 rev;
-+
-+ pci_read_config_byte(bridge, PCI_REVISION_ID,
-+ &rev);
-+ if (rev > pci_id->rev)
-+ continue;
-+ }
-+ if (bridge->subordinate &&
-+ (bridge->subordinate->number ==
-+ tp->pdev->bus->number)) {
-+ tg3_flag_set(tp, ICH_WORKAROUND);
-+ pci_dev_put(bridge);
-+ break;
-+ }
-+ }
-+ }
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5701) {
-+ static struct tg3_dev_id {
-+ u32 vendor;
-+ u32 device;
-+ } bridge_chipsets[] = {
-+ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXH_0 },
-+ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXH_1 },
-+ { },
-+ };
-+ struct tg3_dev_id *pci_id = &bridge_chipsets[0];
-+ struct pci_dev *bridge = NULL;
-+
-+ while (pci_id->vendor != 0) {
-+ bridge = pci_get_device(pci_id->vendor,
-+ pci_id->device,
-+ bridge);
-+ if (!bridge) {
-+ pci_id++;
-+ continue;
-+ }
-+ if (bridge->subordinate &&
-+ (bridge->subordinate->number <=
-+ tp->pdev->bus->number) &&
-+ (bridge->subordinate->busn_res_end >=
-+ tp->pdev->bus->number)) {
-+ tg3_flag_set(tp, 5701_DMA_BUG);
-+ pci_dev_put(bridge);
-+ break;
-+ }
-+ }
-+ }
-+
-+ /* The EPB bridge inside 5714, 5715, and 5780 cannot support
-+ * DMA addresses > 40-bit. This bridge may have other additional
-+ * 57xx devices behind it in some 4-port NIC designs for example.
-+ * Any tg3 device found behind the bridge will also need the 40-bit
-+ * DMA workaround.
-+ */
-+ if (tg3_flag(tp, 5780_CLASS)) {
-+ tg3_flag_set(tp, 40BIT_DMA_BUG);
-+ tp->msi_cap = pci_find_capability(tp->pdev, PCI_CAP_ID_MSI);
-+ } else {
-+ struct pci_dev *bridge = NULL;
-+
-+ do {
-+ bridge = pci_get_device(PCI_VENDOR_ID_SERVERWORKS,
-+ PCI_DEVICE_ID_SERVERWORKS_EPB,
-+ bridge);
-+ if (bridge && bridge->subordinate &&
-+ (bridge->subordinate->number <=
-+ tp->pdev->bus->number) &&
-+ (bridge->subordinate->busn_res_end >=
-+ tp->pdev->bus->number)) {
-+ tg3_flag_set(tp, 40BIT_DMA_BUG);
-+ pci_dev_put(bridge);
-+ break;
-+ }
-+ } while (bridge);
-+ }
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5704 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5714)
-+ tp->pdev_peer = tg3_find_peer(tp);
-+
-+ /* Determine TSO capabilities */
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5719_A0)
-+ ; /* Do nothing. HW bug. */
-+ else if (tg3_flag(tp, 57765_PLUS))
-+ tg3_flag_set(tp, HW_TSO_3);
-+ else if (tg3_flag(tp, 5755_PLUS) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5906)
-+ tg3_flag_set(tp, HW_TSO_2);
-+ else if (tg3_flag(tp, 5750_PLUS)) {
-+ tg3_flag_set(tp, HW_TSO_1);
-+ tg3_flag_set(tp, TSO_BUG);
-+ if (tg3_asic_rev(tp) == ASIC_REV_5750 &&
-+ tg3_chip_rev_id(tp) >= CHIPREV_ID_5750_C2)
-+ tg3_flag_clear(tp, TSO_BUG);
-+ } else if (tg3_asic_rev(tp) != ASIC_REV_5700 &&
-+ tg3_asic_rev(tp) != ASIC_REV_5701 &&
-+ tg3_chip_rev_id(tp) != CHIPREV_ID_5705_A0) {
-+ tg3_flag_set(tp, FW_TSO);
-+ tg3_flag_set(tp, TSO_BUG);
-+ if (tg3_asic_rev(tp) == ASIC_REV_5705)
-+ tp->fw_needed = FIRMWARE_TG3TSO5;
-+ else
-+ tp->fw_needed = FIRMWARE_TG3TSO;
-+ }
-+
-+ /* Selectively allow TSO based on operating conditions */
-+ if (tg3_flag(tp, HW_TSO_1) ||
-+ tg3_flag(tp, HW_TSO_2) ||
-+ tg3_flag(tp, HW_TSO_3) ||
-+ tg3_flag(tp, FW_TSO)) {
-+ /* For firmware TSO, assume ASF is disabled.
-+ * We'll disable TSO later if we discover ASF
-+ * is enabled in tg3_get_eeprom_hw_cfg().
-+ */
-+ tg3_flag_set(tp, TSO_CAPABLE);
-+ } else {
-+ tg3_flag_clear(tp, TSO_CAPABLE);
-+ tg3_flag_clear(tp, TSO_BUG);
-+ tp->fw_needed = NULL;
-+ }
-+
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5701_A0)
-+ tp->fw_needed = FIRMWARE_TG3;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_57766)
-+ tp->fw_needed = FIRMWARE_TG357766;
-+
-+ tp->irq_max = 1;
-+
-+ if (tg3_flag(tp, 5750_PLUS)) {
-+ tg3_flag_set(tp, SUPPORT_MSI);
-+ if (tg3_chip_rev(tp) == CHIPREV_5750_AX ||
-+ tg3_chip_rev(tp) == CHIPREV_5750_BX ||
-+ (tg3_asic_rev(tp) == ASIC_REV_5714 &&
-+ tg3_chip_rev_id(tp) <= CHIPREV_ID_5714_A2 &&
-+ tp->pdev_peer == tp->pdev))
-+ tg3_flag_clear(tp, SUPPORT_MSI);
-+
-+ if (tg3_flag(tp, 5755_PLUS) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5906) {
-+ tg3_flag_set(tp, 1SHOT_MSI);
-+ }
-+
-+ if (tg3_flag(tp, 57765_PLUS)) {
-+ tg3_flag_set(tp, SUPPORT_MSIX);
-+#ifdef TG3_NAPI
-+ tp->irq_max = TG3_IRQ_MAX_VECS_RSS;
-+#endif
-+ }
-+#if defined(__VMKLNX__)
-+ tp->irq_max = 1;
-+#if defined(TG3_VMWARE_NETQ_ENABLE) && !defined(TG3_INBOX)
-+ if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5718 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5719 ||
-+ (tg3_asic_rev(tp) == ASIC_REV_5720 &&
-+ tp->pdev->device != TG3PCI_DEVICE_TIGON3_5717_C)) {
-+ tp->vmware.netq.index = tg3_netq_index++;
-+ tg3_flag_set(tp, IOV_CAPABLE);
-+ tg3_flag_clear(tp, 1SHOT_MSI);
-+ tp->irq_max = min(TG3_IRQ_MAX_VECS, TG3_IRQ_MAX_VECS_IOV);
-+ }
-+#endif /* TG3_VMWARE_NETQ_ENABLE && !TG3_INBOX */
-+#endif /* __VMKLNX__ */
-+ }
-+
-+ tp->txq_max = 1;
-+ tp->rxq_max = 1;
-+ if (tp->irq_max > 1) {
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ if (tg3_flag(tp, IOV_CAPABLE))
-+ tp->rxq_max = tp->irq_max;
-+ else
-+ tp->rxq_max = 1;
-+#else
-+ tp->rxq_max = TG3_RSS_MAX_NUM_QS;
-+ tg3_rss_init_dflt_indir_tbl(tp, TG3_RSS_MAX_NUM_QS);
-+#endif
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5719 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5720)
-+ tp->txq_max = tp->irq_max - 1;
-+ }
-+
-+ if (tg3_flag(tp, 5755_PLUS) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5906)
-+ tg3_flag_set(tp, SHORT_DMA_BUG);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5719 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762)
-+ tp->dma_limit = TG3_TX_BD_DMA_MAX_4K;
-+#if defined(__VMKLNX__)
-+ else if (tg3_flag(tp, TSO_CAPABLE))
-+ tp->dma_limit = TG3_TX_BD_DMA_MAX_32K;
-+#endif
-+ if (tg3_asic_rev(tp) == ASIC_REV_5717 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5719 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5720 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762)
-+ tg3_flag_set(tp, LRG_PROD_RING_CAP);
-+
-+ if (tg3_flag(tp, 57765_PLUS) &&
-+ tg3_chip_rev_id(tp) != CHIPREV_ID_5719_A0)
-+ tg3_flag_set(tp, USE_JUMBO_BDFLAG);
-+
-+ if (!tg3_flag(tp, 5705_PLUS) ||
-+ tg3_flag(tp, 5780_CLASS) ||
-+ tg3_flag(tp, USE_JUMBO_BDFLAG))
-+ tg3_flag_set(tp, JUMBO_CAPABLE);
-+
-+ pci_read_config_dword(tp->pdev, TG3PCI_PCISTATE,
-+ &pci_state_reg);
-+
-+#ifndef BCM_HAS_PCI_PCIE_CAP
-+ tp->pcie_cap = pci_find_capability(tp->pdev, PCI_CAP_ID_EXP);
-+#endif
-+
-+ if (pci_is_pcie(tp->pdev)) {
-+ u16 lnkctl;
-+
-+ tg3_flag_set(tp, PCI_EXPRESS);
-+
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5719_A0) {
-+ int readrq = pcie_get_readrq(tp->pdev);
-+ if (readrq > 2048)
-+ pcie_set_readrq(tp->pdev, 2048);
-+ }
-+
-+ pcie_capability_read_word(tp->pdev, PCI_EXP_LNKCTL, &lnkctl);
-+ if (lnkctl & PCI_EXP_LNKCTL_CLKREQ_EN) {
-+ if (tg3_asic_rev(tp) == ASIC_REV_5906) {
-+ tg3_flag_clear(tp, HW_TSO_2);
-+ tg3_flag_clear(tp, TSO_CAPABLE);
-+ }
-+ if (tg3_asic_rev(tp) == ASIC_REV_5784 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5761 ||
-+ tg3_chip_rev_id(tp) == CHIPREV_ID_57780_A0 ||
-+ tg3_chip_rev_id(tp) == CHIPREV_ID_57780_A1)
-+ tg3_flag_set(tp, CLKREQ_BUG);
-+ } else if (tg3_chip_rev_id(tp) == CHIPREV_ID_5717_A0) {
-+ tg3_flag_set(tp, L1PLLPD_EN);
-+ }
-+ } else if (tg3_asic_rev(tp) == ASIC_REV_5785) {
-+ /* BCM5785 devices are effectively PCIe devices, and should
-+ * follow PCIe codepaths, but do not have a PCIe capabilities
-+ * section.
-+ */
-+ tg3_flag_set(tp, PCI_EXPRESS);
-+ } else if (!tg3_flag(tp, 5705_PLUS) ||
-+ tg3_flag(tp, 5780_CLASS)) {
-+ tp->pcix_cap = pci_find_capability(tp->pdev, PCI_CAP_ID_PCIX);
-+ if (!tp->pcix_cap) {
-+ dev_err(&tp->pdev->dev,
-+ "Cannot find PCI-X capability, aborting\n");
-+ return -EIO;
-+ }
-+
-+ if (!(pci_state_reg & PCISTATE_CONV_PCI_MODE))
-+ tg3_flag_set(tp, PCIX_MODE);
-+ }
-+
-+ /* If we have an AMD 762 or VIA K8T800 chipset, write
-+ * reordering to the mailbox registers done by the host
-+ * controller can cause major troubles. We read back from
-+ * every mailbox register write to force the writes to be
-+ * posted to the chip in order.
-+ */
-+#if (LINUX_VERSION_CODE < 0x2060a)
-+ if ((pci_find_device(PCI_VENDOR_ID_AMD,
-+ PCI_DEVICE_ID_AMD_FE_GATE_700C, NULL) ||
-+ pci_find_device(PCI_VENDOR_ID_AMD,
-+ PCI_DEVICE_ID_AMD_8131_BRIDGE, NULL) ||
-+ pci_find_device(PCI_VENDOR_ID_VIA,
-+ PCI_DEVICE_ID_VIA_8385_0, NULL)) &&
-+#else
-+ if (pci_dev_present(tg3_write_reorder_chipsets) &&
-+#endif
-+ !tg3_flag(tp, PCI_EXPRESS))
-+ tg3_flag_set(tp, MBOX_WRITE_REORDER);
-+
-+ pci_read_config_byte(tp->pdev, PCI_CACHE_LINE_SIZE,
-+ &tp->pci_cacheline_sz);
-+ pci_read_config_byte(tp->pdev, PCI_LATENCY_TIMER,
-+ &tp->pci_lat_timer);
-+ if (tg3_asic_rev(tp) == ASIC_REV_5703 &&
-+ tp->pci_lat_timer < 64) {
-+ tp->pci_lat_timer = 64;
-+ pci_write_config_byte(tp->pdev, PCI_LATENCY_TIMER,
-+ tp->pci_lat_timer);
-+ }
-+
-+ /* Important! -- It is critical that the PCI-X hw workaround
-+ * situation is decided before the first MMIO register access.
-+ */
-+ if (tg3_chip_rev(tp) == CHIPREV_5700_BX) {
-+ /* 5700 BX chips need to have their TX producer index
-+ * mailboxes written twice to workaround a bug.
-+ */
-+ tg3_flag_set(tp, TXD_MBOX_HWBUG);
-+
-+ /* If we are in PCI-X mode, enable register write workaround.
-+ *
-+ * The workaround is to use indirect register accesses
-+ * for all chip writes not to mailbox registers.
-+ */
-+ if (tg3_flag(tp, PCIX_MODE)) {
-+ u32 pm_reg;
-+
-+ tg3_flag_set(tp, PCIX_TARGET_HWBUG);
-+
-+ /* The chip can have it's power management PCI config
-+ * space registers clobbered due to this bug.
-+ * So explicitly force the chip into D0 here.
-+ */
-+ pci_read_config_dword(tp->pdev,
-+ tp->pm_cap + PCI_PM_CTRL,
-+ &pm_reg);
-+ pm_reg &= ~PCI_PM_CTRL_STATE_MASK;
-+ pm_reg |= PCI_PM_CTRL_PME_ENABLE | 0 /* D0 */;
-+ pci_write_config_dword(tp->pdev,
-+ tp->pm_cap + PCI_PM_CTRL,
-+ pm_reg);
-+
-+ /* Also, force SERR#/PERR# in PCI command. */
-+ pci_read_config_word(tp->pdev, PCI_COMMAND, &pci_cmd);
-+ pci_cmd |= PCI_COMMAND_PARITY | PCI_COMMAND_SERR;
-+ pci_write_config_word(tp->pdev, PCI_COMMAND, pci_cmd);
-+ }
-+ }
-+
-+ if ((pci_state_reg & PCISTATE_BUS_SPEED_HIGH) != 0)
-+ tg3_flag_set(tp, PCI_HIGH_SPEED);
-+ if ((pci_state_reg & PCISTATE_BUS_32BIT) != 0)
-+ tg3_flag_set(tp, PCI_32BIT);
-+
-+ /* Chip-specific fixup from Broadcom driver */
-+ if ((tg3_chip_rev_id(tp) == CHIPREV_ID_5704_A0) &&
-+ (!(pci_state_reg & PCISTATE_RETRY_SAME_DMA))) {
-+ pci_state_reg |= PCISTATE_RETRY_SAME_DMA;
-+ pci_write_config_dword(tp->pdev, TG3PCI_PCISTATE, pci_state_reg);
-+ }
-+
-+ /* Default fast path register access methods */
-+ tp->read32 = tg3_read32;
-+ tp->write32 = tg3_write32;
-+ tp->read32_mbox = tg3_read32;
-+ tp->write32_mbox = tg3_write32;
-+ tp->write32_tx_mbox = tg3_write32;
-+ tp->write32_rx_mbox = tg3_write32;
-+
-+ /* Various workaround register access methods */
-+ if (tg3_flag(tp, PCIX_TARGET_HWBUG))
-+ tp->write32 = tg3_write_indirect_reg32;
-+ else if (tg3_asic_rev(tp) == ASIC_REV_5701 ||
-+ (tg3_flag(tp, PCI_EXPRESS) &&
-+ tg3_chip_rev_id(tp) == CHIPREV_ID_5750_A0)) {
-+ /*
-+ * Back to back register writes can cause problems on these
-+ * chips, the workaround is to read back all reg writes
-+ * except those to mailbox regs.
-+ *
-+ * See tg3_write_indirect_reg32().
-+ */
-+ tp->write32 = tg3_write_flush_reg32;
-+ }
-+
-+ if (tg3_flag(tp, TXD_MBOX_HWBUG) || tg3_flag(tp, MBOX_WRITE_REORDER)) {
-+ tp->write32_tx_mbox = tg3_write32_tx_mbox;
-+ if (tg3_flag(tp, MBOX_WRITE_REORDER))
-+ tp->write32_rx_mbox = tg3_write_flush_reg32;
-+ }
-+
-+ if (tg3_flag(tp, ICH_WORKAROUND)) {
-+ tp->read32 = tg3_read_indirect_reg32;
-+ tp->write32 = tg3_write_indirect_reg32;
-+ tp->read32_mbox = tg3_read_indirect_mbox;
-+ tp->write32_mbox = tg3_write_indirect_mbox;
-+ tp->write32_tx_mbox = tg3_write_indirect_mbox;
-+ tp->write32_rx_mbox = tg3_write_indirect_mbox;
-+
-+ iounmap(tp->regs);
-+ tp->regs = NULL;
-+
-+ pci_read_config_word(tp->pdev, PCI_COMMAND, &pci_cmd);
-+ pci_cmd &= ~PCI_COMMAND_MEMORY;
-+ pci_write_config_word(tp->pdev, PCI_COMMAND, pci_cmd);
-+ }
-+ if (tg3_asic_rev(tp) == ASIC_REV_5906) {
-+ tp->read32_mbox = tg3_read32_mbox_5906;
-+ tp->write32_mbox = tg3_write32_mbox_5906;
-+ tp->write32_tx_mbox = tg3_write32_mbox_5906;
-+ tp->write32_rx_mbox = tg3_write32_mbox_5906;
-+ }
-+
-+ if (tp->write32 == tg3_write_indirect_reg32 ||
-+ (tg3_flag(tp, PCIX_MODE) &&
-+ (tg3_asic_rev(tp) == ASIC_REV_5700 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5701)))
-+ tg3_flag_set(tp, SRAM_USE_CONFIG);
-+
-+ /* The memory arbiter has to be enabled in order for SRAM accesses
-+ * to succeed. Normally on powerup the tg3 chip firmware will make
-+ * sure it is enabled, but other entities such as system netboot
-+ * code might disable it.
-+ */
-+ val = tr32(MEMARB_MODE);
-+ tw32(MEMARB_MODE, val | MEMARB_MODE_ENABLE);
-+
-+ tp->pci_fn = PCI_FUNC(tp->pdev->devfn) & 3;
-+ if (tg3_asic_rev(tp) == ASIC_REV_5704 ||
-+ tg3_flag(tp, 5780_CLASS)) {
-+ if (tg3_flag(tp, PCIX_MODE)) {
-+ pci_read_config_dword(tp->pdev,
-+ tp->pcix_cap + PCI_X_STATUS,
-+ &val);
-+ tp->pci_fn = val & 0x7;
-+ }
-+ } else if (tg3_asic_rev(tp) == ASIC_REV_5717 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5719 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5720) {
-+ tg3_read_mem(tp, NIC_SRAM_CPMU_STATUS, &val);
-+ if ((val & NIC_SRAM_CPMUSTAT_SIG_MSK) != NIC_SRAM_CPMUSTAT_SIG)
-+ val = tr32(TG3_CPMU_STATUS);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5717)
-+ tp->pci_fn = (val & TG3_CPMU_STATUS_FMSK_5717) ? 1 : 0;
-+ else
-+ tp->pci_fn = (val & TG3_CPMU_STATUS_FMSK_5719) >>
-+ TG3_CPMU_STATUS_FSHFT_5719;
-+ }
-+
-+ if (tg3_flag(tp, FLUSH_POSTED_WRITES)) {
-+ tp->write32_tx_mbox = tg3_write_flush_reg32;
-+ tp->write32_rx_mbox = tg3_write_flush_reg32;
-+ }
-+
-+ /* Get eeprom hw config before calling tg3_set_power_state().
-+ * In particular, the TG3_FLAG_IS_NIC flag must be
-+ * determined before calling tg3_set_power_state() so that
-+ * we know whether or not to switch out of Vaux power.
-+ * When the flag is set, it means that GPIO1 is used for eeprom
-+ * write protect and also implies that it is a LOM where GPIOs
-+ * are not used to switch power.
-+ */
-+ tg3_get_eeprom_hw_cfg(tp);
-+
-+ if (tg3_flag(tp, FW_TSO) && tg3_flag(tp, ENABLE_ASF)) {
-+ tg3_flag_clear(tp, TSO_CAPABLE);
-+ tg3_flag_clear(tp, TSO_BUG);
-+ tp->fw_needed = NULL;
-+ }
-+
-+ if (tg3_flag(tp, ENABLE_APE)) {
-+ /* Allow reads and writes to the
-+ * APE register and memory space.
-+ */
-+ pci_state_reg |= PCISTATE_ALLOW_APE_CTLSPC_WR |
-+ PCISTATE_ALLOW_APE_SHMEM_WR |
-+ PCISTATE_ALLOW_APE_PSPACE_WR;
-+ pci_write_config_dword(tp->pdev, TG3PCI_PCISTATE,
-+ pci_state_reg);
-+
-+ tg3_ape_lock_init(tp);
-+ tp->ape_hb_interval =
-+ msecs_to_jiffies(APE_HOST_HEARTBEAT_INT_5SEC);
-+ }
-+
-+#if !defined(__VMKLNX__)
-+ tp->recoverable_err_interval = msecs_to_jiffies(RECOVERABLE_ERR_10SEC);
-+#endif
-+
-+ /* Set up tp->grc_local_ctrl before calling
-+ * tg3_pwrsrc_switch_to_vmain(). GPIO1 driven high
-+ * will bring 5700's external PHY out of reset.
-+ * It is also used as eeprom write protect on LOMs.
-+ */
-+ tp->grc_local_ctrl = GRC_LCLCTRL_INT_ON_ATTN | GRC_LCLCTRL_AUTO_SEEPROM;
-+ if (tg3_asic_rev(tp) == ASIC_REV_5700 ||
-+ tg3_flag(tp, EEPROM_WRITE_PROT))
-+ tp->grc_local_ctrl |= (GRC_LCLCTRL_GPIO_OE1 |
-+ GRC_LCLCTRL_GPIO_OUTPUT1);
-+ /* Unused GPIO3 must be driven as output on 5752 because there
-+ * are no pull-up resistors on unused GPIO pins.
-+ */
-+ else if (tg3_asic_rev(tp) == ASIC_REV_5752)
-+ tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE3;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5755 ||
-+ tg3_asic_rev(tp) == ASIC_REV_57780 ||
-+ tg3_flag(tp, 57765_CLASS))
-+ tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_UART_SEL;
-+
-+ if (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5761 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5761S) {
-+ /* Turn off the debug UART. */
-+ tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_UART_SEL;
-+ if (tg3_flag(tp, IS_NIC))
-+ /* Keep VMain power. */
-+ tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE0 |
-+ GRC_LCLCTRL_GPIO_OUTPUT0;
-+ }
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5762)
-+ tp->grc_local_ctrl |=
-+ tr32(GRC_LOCAL_CTRL) & GRC_LCLCTRL_GPIO_UART_SEL;
-+
-+ /* Switch out of Vaux if it is a NIC */
-+ tg3_pwrsrc_switch_to_vmain(tp);
-+
-+ /* Derive initial jumbo mode from MTU assigned in
-+ * ether_setup() via the alloc_etherdev() call
-+ */
-+ if (tp->dev->mtu > ETH_DATA_LEN && !tg3_flag(tp, 5780_CLASS))
-+ tg3_flag_set(tp, JUMBO_RING_ENABLE);
-+
-+ /* Determine WakeOnLan speed to use. */
-+ if (tg3_asic_rev(tp) == ASIC_REV_5700 ||
-+ tg3_chip_rev_id(tp) == CHIPREV_ID_5701_A0 ||
-+ tg3_chip_rev_id(tp) == CHIPREV_ID_5701_B0 ||
-+ tg3_chip_rev_id(tp) == CHIPREV_ID_5701_B2) {
-+ tg3_flag_clear(tp, WOL_SPEED_100MB);
-+ } else {
-+ tg3_flag_set(tp, WOL_SPEED_100MB);
-+ }
-+
-+#ifndef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if (tg3_asic_rev(tp) == ASIC_REV_5906 ||
-+ (tg3_asic_rev(tp) == ASIC_REV_5785 &&
-+ (tp->phy_id & TG3_PHY_ID_MASK) == TG3_PHY_ID_BCMAC131))
-+ tp->phy_flags |= TG3_PHYFLG_IS_FET;
-+#else
-+ if (tg3_asic_rev(tp) == ASIC_REV_5906)
-+ tp->phy_flags |= TG3_PHYFLG_IS_FET;
-+#endif
-+
-+ /* A few boards don't want Ethernet@WireSpeed phy feature */
-+ if (tg3_asic_rev(tp) == ASIC_REV_5700 ||
-+ (tg3_asic_rev(tp) == ASIC_REV_5705 &&
-+ (tg3_chip_rev_id(tp) != CHIPREV_ID_5705_A0) &&
-+ (tg3_chip_rev_id(tp) != CHIPREV_ID_5705_A1)) ||
-+ (tp->phy_flags & TG3_PHYFLG_IS_FET) ||
-+ (tp->phy_flags & TG3_PHYFLG_ANY_SERDES))
-+ tp->phy_flags |= TG3_PHYFLG_NO_ETH_WIRE_SPEED;
-+
-+ if (tg3_chip_rev(tp) == CHIPREV_5703_AX ||
-+ tg3_chip_rev(tp) == CHIPREV_5704_AX)
-+ tp->phy_flags |= TG3_PHYFLG_ADC_BUG;
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5704_A0)
-+ tp->phy_flags |= TG3_PHYFLG_5704_A0_BUG;
-+
-+ if (tg3_flag(tp, 5705_PLUS) &&
-+ !(tp->phy_flags & TG3_PHYFLG_IS_FET) &&
-+ tg3_asic_rev(tp) != ASIC_REV_5785 &&
-+ tg3_asic_rev(tp) != ASIC_REV_57780 &&
-+ !tg3_flag(tp, 57765_PLUS)) {
-+ if (tg3_asic_rev(tp) == ASIC_REV_5755 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5787 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5784 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5761) {
-+ if (tp->pdev->device != PCI_DEVICE_ID_TIGON3_5756 &&
-+ tp->pdev->device != PCI_DEVICE_ID_TIGON3_5722)
-+ tp->phy_flags |= TG3_PHYFLG_JITTER_BUG;
-+ if (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5755M)
-+ tp->phy_flags |= TG3_PHYFLG_ADJUST_TRIM;
-+ } else
-+ tp->phy_flags |= TG3_PHYFLG_BER_BUG;
-+ }
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5784 &&
-+ tg3_chip_rev(tp) != CHIPREV_5784_AX) {
-+ tp->phy_otp = tg3_read_otp_phycfg(tp);
-+ if (tp->phy_otp == 0)
-+ tp->phy_otp = TG3_OTP_DEFAULT;
-+ }
-+
-+ if (tg3_flag(tp, CPMU_PRESENT))
-+ tp->mi_mode = MAC_MI_MODE_500KHZ_CONST;
-+ else
-+ tp->mi_mode = MAC_MI_MODE_BASE;
-+
-+ tp->coalesce_mode = 0;
-+ if (tg3_chip_rev(tp) != CHIPREV_5700_AX &&
-+ tg3_chip_rev(tp) != CHIPREV_5700_BX)
-+ tp->coalesce_mode |= HOSTCC_MODE_32BYTE;
-+
-+ /* Set these bits to enable statistics workaround. */
-+ if (tg3_asic_rev(tp) == ASIC_REV_5717 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762 ||
-+ tg3_chip_rev_id(tp) == CHIPREV_ID_5719_A0 ||
-+ tg3_chip_rev_id(tp) == CHIPREV_ID_5720_A0) {
-+ tp->coalesce_mode |= HOSTCC_MODE_ATTN;
-+ tp->grc_mode |= GRC_MODE_IRQ_ON_FLOW_ATTN;
-+ }
-+
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if (tg3_asic_rev(tp) == ASIC_REV_5785 ||
-+ tg3_asic_rev(tp) == ASIC_REV_57780)
-+ tg3_flag_set(tp, USE_PHYLIB);
-+#endif
-+
-+ err = tg3_mdio_init(tp);
-+ if (err)
-+ return err;
-+
-+ /* Initialize data/descriptor byte/word swapping. */
-+ val = tr32(GRC_MODE);
-+ if (tg3_asic_rev(tp) == ASIC_REV_5720 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5762)
-+ val &= (GRC_MODE_BYTE_SWAP_B2HRX_DATA |
-+ GRC_MODE_WORD_SWAP_B2HRX_DATA |
-+ GRC_MODE_B2HRX_ENABLE |
-+ GRC_MODE_HTX2B_ENABLE |
-+ GRC_MODE_HOST_STACKUP);
-+ else
-+ val &= GRC_MODE_HOST_STACKUP;
-+
-+ tw32(GRC_MODE, val | tp->grc_mode);
-+
-+ tg3_switch_clocks(tp);
-+
-+ /* Clear this out for sanity. */
-+ tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0);
-+
-+ /* Clear TG3PCI_REG_BASE_ADDR to prevent hangs. */
-+ tw32(TG3PCI_REG_BASE_ADDR, 0);
-+
-+ pci_read_config_dword(tp->pdev, TG3PCI_PCISTATE,
-+ &pci_state_reg);
-+ if ((pci_state_reg & PCISTATE_CONV_PCI_MODE) == 0 &&
-+ !tg3_flag(tp, PCIX_TARGET_HWBUG)) {
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5701_A0 ||
-+ tg3_chip_rev_id(tp) == CHIPREV_ID_5701_B0 ||
-+ tg3_chip_rev_id(tp) == CHIPREV_ID_5701_B2 ||
-+ tg3_chip_rev_id(tp) == CHIPREV_ID_5701_B5) {
-+ void __iomem *sram_base;
-+
-+ /* Write some dummy words into the SRAM status block
-+ * area, see if it reads back correctly. If the return
-+ * value is bad, force enable the PCIX workaround.
-+ */
-+ sram_base = tp->regs + NIC_SRAM_WIN_BASE + NIC_SRAM_STATS_BLK;
-+
-+ writel(0x00000000, sram_base);
-+ writel(0x00000000, sram_base + 4);
-+ writel(0xffffffff, sram_base + 4);
-+ if (readl(sram_base) != 0x00000000)
-+ tg3_flag_set(tp, PCIX_TARGET_HWBUG);
-+ }
-+ }
-+
-+ udelay(50);
-+ tg3_nvram_init(tp);
-+
-+ /* If the device has an NVRAM, no need to load patch firmware */
-+ if (tg3_asic_rev(tp) == ASIC_REV_57766 &&
-+ !tg3_flag(tp, NO_NVRAM))
-+ tp->fw_needed = NULL;
-+
-+ grc_misc_cfg = tr32(GRC_MISC_CFG);
-+ grc_misc_cfg &= GRC_MISC_CFG_BOARD_ID_MASK;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5705 &&
-+ (grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5788 ||
-+ grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5788M))
-+ tg3_flag_set(tp, IS_5788);
-+
-+ if (!tg3_flag(tp, IS_5788) &&
-+ tg3_asic_rev(tp) != ASIC_REV_5700)
-+ tg3_flag_set(tp, TAGGED_STATUS);
-+ if (tg3_flag(tp, TAGGED_STATUS)) {
-+ tp->coalesce_mode |= (HOSTCC_MODE_CLRTICK_RXBD |
-+ HOSTCC_MODE_CLRTICK_TXBD);
-+
-+ tp->misc_host_ctrl |= MISC_HOST_CTRL_TAGGED_STATUS;
-+ pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL,
-+ tp->misc_host_ctrl);
-+ }
-+
-+ /* Preserve the APE MAC_MODE bits */
-+ if (tg3_flag(tp, ENABLE_APE))
-+ tp->mac_mode = MAC_MODE_APE_TX_EN | MAC_MODE_APE_RX_EN;
-+ else
-+ tp->mac_mode = 0;
-+
-+ if (tg3_10_100_only_device(tp, ent))
-+ tp->phy_flags |= TG3_PHYFLG_10_100_ONLY;
-+
-+ err = tg3_phy_probe(tp);
-+ if (err) {
-+ dev_err(&tp->pdev->dev, "phy probe failed, err %d\n", err);
-+ /* ... but do not return immediately ... */
-+ tg3_mdio_fini(tp);
-+ }
-+
-+ tg3_read_vpd(tp);
-+ tg3_read_fw_ver(tp);
-+
-+ if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) {
-+ tp->phy_flags &= ~TG3_PHYFLG_USE_MI_INTERRUPT;
-+ } else {
-+ if (tg3_asic_rev(tp) == ASIC_REV_5700)
-+ tp->phy_flags |= TG3_PHYFLG_USE_MI_INTERRUPT;
-+ else
-+ tp->phy_flags &= ~TG3_PHYFLG_USE_MI_INTERRUPT;
-+ }
-+
-+ /* 5700 {AX,BX} chips have a broken status block link
-+ * change bit implementation, so we must use the
-+ * status register in those cases.
-+ */
-+ if (tg3_asic_rev(tp) == ASIC_REV_5700)
-+ tg3_flag_set(tp, USE_LINKCHG_REG);
-+ else
-+ tg3_flag_clear(tp, USE_LINKCHG_REG);
-+
-+ /* The led_ctrl is set during tg3_phy_probe, here we might
-+ * have to force the link status polling mechanism based
-+ * upon subsystem IDs.
-+ */
-+ if (tp->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL &&
-+ tg3_asic_rev(tp) == ASIC_REV_5701 &&
-+ !(tp->phy_flags & TG3_PHYFLG_PHY_SERDES)) {
-+ tp->phy_flags |= TG3_PHYFLG_USE_MI_INTERRUPT;
-+ tg3_flag_set(tp, USE_LINKCHG_REG);
-+ }
-+
-+ /* For all SERDES we poll the MAC status register. */
-+ if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES)
-+ tg3_flag_set(tp, POLL_SERDES);
-+ else
-+ tg3_flag_clear(tp, POLL_SERDES);
-+
-+ if (tg3_flag(tp, ENABLE_APE) && tg3_flag(tp, ENABLE_ASF))
-+ tg3_flag_set(tp, POLL_CPMU_LINK);
-+
-+ tp->rx_offset = NET_IP_ALIGN;
-+ tp->rx_copy_thresh = TG3_RX_COPY_THRESHOLD;
-+ if (tg3_asic_rev(tp) == ASIC_REV_5701 &&
-+ tg3_flag(tp, PCIX_MODE)) {
-+ tp->rx_offset = 0;
-+#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
-+ tp->rx_copy_thresh = ~(u16)0;
-+#endif
-+ }
-+
-+ tp->rx_std_ring_mask = TG3_RX_STD_RING_SIZE(tp) - 1;
-+ tp->rx_jmb_ring_mask = TG3_RX_JMB_RING_SIZE(tp) - 1;
-+ tp->rx_ret_ring_mask = tg3_rx_ret_ring_size(tp) - 1;
-+
-+ tp->rx_std_max_post = tp->rx_std_ring_mask + 1;
-+
-+ /* Increment the rx prod index on the rx std ring by at most
-+ * 8 for these chips to workaround hw errata.
-+ */
-+ if (tg3_asic_rev(tp) == ASIC_REV_5750 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5752 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5755)
-+ tp->rx_std_max_post = 8;
-+
-+ if (tg3_flag(tp, ASPM_WORKAROUND))
-+ tp->pwrmgmt_thresh = tr32(PCIE_PWR_MGMT_THRESH) &
-+ PCIE_PWR_MGMT_L1_THRESH_MSK;
-+
-+ return err;
-+}
-+
-+#ifdef CONFIG_SPARC
-+static int __devinit tg3_get_macaddr_sparc(struct tg3 *tp)
-+{
-+ struct net_device *dev = tp->dev;
-+ struct pci_dev *pdev = tp->pdev;
-+ struct device_node *dp = pci_device_to_OF_node(pdev);
-+ const unsigned char *addr;
-+ int len;
-+
-+ addr = of_get_property(dp, "local-mac-address", &len);
-+ if (addr && len == ETH_ALEN) {
-+ memcpy(dev->dev_addr, addr, 6);
-+ memcpy(dev->perm_addr, dev->dev_addr, ETH_ALEN);
-+ return 0;
-+ }
-+ return -ENODEV;
-+}
-+
-+static int __devinit tg3_get_default_macaddr_sparc(struct tg3 *tp)
-+{
-+ struct net_device *dev = tp->dev;
-+
-+ memcpy(dev->dev_addr, idprom->id_ethaddr, ETH_ALEN);
-+ memcpy(dev->perm_addr, idprom->id_ethaddr, ETH_ALEN);
-+ return 0;
-+}
-+#endif
-+
-+static int __devinit tg3_get_device_address(struct tg3 *tp)
-+{
-+ struct net_device *dev = tp->dev;
-+ u32 hi, lo, mac_offset;
-+ int addr_ok = 0;
-+ int err;
-+
-+#ifdef CONFIG_SPARC
-+ if (!tg3_get_macaddr_sparc(tp))
-+ return 0;
-+#endif
-+
-+ if (tg3_flag(tp, IS_SSB_CORE)) {
-+ err = ssb_gige_get_macaddr(tp->pdev, &dev->dev_addr[0]);
-+ if (!err && is_valid_ether_addr(&dev->dev_addr[0]))
-+ return 0;
-+ }
-+
-+ mac_offset = 0x7c;
-+ if (tg3_asic_rev(tp) == ASIC_REV_5704 ||
-+ tg3_flag(tp, 5780_CLASS)) {
-+ if (tr32(TG3PCI_DUAL_MAC_CTRL) & DUAL_MAC_CTRL_ID)
-+ mac_offset = 0xcc;
-+ if (tg3_nvram_lock(tp))
-+ tw32_f(NVRAM_CMD, NVRAM_CMD_RESET);
-+ else
-+ tg3_nvram_unlock(tp);
-+ } else if (tg3_flag(tp, 5717_PLUS)) {
-+ if (tp->pci_fn & 1)
-+ mac_offset = 0xcc;
-+ if (tp->pci_fn > 1)
-+ mac_offset += 0x18c;
-+ } else if (tg3_asic_rev(tp) == ASIC_REV_5906)
-+ mac_offset = 0x10;
-+
-+ /* First try to get it from MAC address mailbox. */
-+ tg3_read_mem(tp, NIC_SRAM_MAC_ADDR_HIGH_MBOX, &hi);
-+ if ((hi >> 16) == 0x484b) {
-+ dev->dev_addr[0] = (hi >> 8) & 0xff;
-+ dev->dev_addr[1] = (hi >> 0) & 0xff;
-+
-+ tg3_read_mem(tp, NIC_SRAM_MAC_ADDR_LOW_MBOX, &lo);
-+ dev->dev_addr[2] = (lo >> 24) & 0xff;
-+ dev->dev_addr[3] = (lo >> 16) & 0xff;
-+ dev->dev_addr[4] = (lo >> 8) & 0xff;
-+ dev->dev_addr[5] = (lo >> 0) & 0xff;
-+
-+ /* Some old bootcode may report a 0 MAC address in SRAM */
-+ addr_ok = is_valid_ether_addr(&dev->dev_addr[0]);
-+ }
-+ if (!addr_ok) {
-+ /* Next, try NVRAM. */
-+ if (!tg3_flag(tp, NO_NVRAM) &&
-+ !tg3_nvram_read_be32(tp, mac_offset + 0, &hi) &&
-+ !tg3_nvram_read_be32(tp, mac_offset + 4, &lo)) {
-+ memcpy(&dev->dev_addr[0], ((char *)&hi) + 2, 2);
-+ memcpy(&dev->dev_addr[2], (char *)&lo, sizeof(lo));
-+ }
-+ /* Finally just fetch it out of the MAC control regs. */
-+ else {
-+ hi = tr32(MAC_ADDR_0_HIGH);
-+ lo = tr32(MAC_ADDR_0_LOW);
-+
-+ dev->dev_addr[5] = lo & 0xff;
-+ dev->dev_addr[4] = (lo >> 8) & 0xff;
-+ dev->dev_addr[3] = (lo >> 16) & 0xff;
-+ dev->dev_addr[2] = (lo >> 24) & 0xff;
-+ dev->dev_addr[1] = hi & 0xff;
-+ dev->dev_addr[0] = (hi >> 8) & 0xff;
-+ }
-+ }
-+
-+ if (!is_valid_ether_addr(&dev->dev_addr[0])) {
-+#ifdef CONFIG_SPARC
-+ if (!tg3_get_default_macaddr_sparc(tp))
-+ return 0;
-+#endif
-+ return -EINVAL;
-+ }
-+#ifdef ETHTOOL_GPERMADDR
-+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
-+#endif
-+ return 0;
-+}
-+
-+#define BOUNDARY_SINGLE_CACHELINE 1
-+#define BOUNDARY_MULTI_CACHELINE 2
-+
-+static u32 __devinit tg3_calc_dma_bndry(struct tg3 *tp, u32 val)
-+{
-+ int cacheline_size;
-+ u8 byte;
-+ int goal;
-+
-+ pci_read_config_byte(tp->pdev, PCI_CACHE_LINE_SIZE, &byte);
-+ if (byte == 0)
-+ cacheline_size = 1024;
-+ else
-+ cacheline_size = (int) byte * 4;
-+
-+ /* On 5703 and later chips, the boundary bits have no
-+ * effect.
-+ */
-+ if (tg3_asic_rev(tp) != ASIC_REV_5700 &&
-+ tg3_asic_rev(tp) != ASIC_REV_5701 &&
-+ !tg3_flag(tp, PCI_EXPRESS))
-+ goto out;
-+
-+#if defined(CONFIG_PPC64) || defined(CONFIG_IA64) || defined(CONFIG_PARISC)
-+ goal = BOUNDARY_MULTI_CACHELINE;
-+#else
-+#if defined(CONFIG_SPARC64) || defined(CONFIG_ALPHA)
-+ goal = BOUNDARY_SINGLE_CACHELINE;
-+#else
-+ goal = 0;
-+#endif
-+#endif
-+
-+ if (tg3_flag(tp, 57765_PLUS)) {
-+ val = goal ? 0 : DMA_RWCTRL_DIS_CACHE_ALIGNMENT;
-+ goto out;
-+ }
-+
-+ if (!goal)
-+ goto out;
-+
-+ /* PCI controllers on most RISC systems tend to disconnect
-+ * when a device tries to burst across a cache-line boundary.
-+ * Therefore, letting tg3 do so just wastes PCI bandwidth.
-+ *
-+ * Unfortunately, for PCI-E there are only limited
-+ * write-side controls for this, and thus for reads
-+ * we will still get the disconnects. We'll also waste
-+ * these PCI cycles for both read and write for chips
-+ * other than 5700 and 5701 which do not implement the
-+ * boundary bits.
-+ */
-+ if (tg3_flag(tp, PCIX_MODE) && !tg3_flag(tp, PCI_EXPRESS)) {
-+ switch (cacheline_size) {
-+ case 16:
-+ case 32:
-+ case 64:
-+ case 128:
-+ if (goal == BOUNDARY_SINGLE_CACHELINE) {
-+ val |= (DMA_RWCTRL_READ_BNDRY_128_PCIX |
-+ DMA_RWCTRL_WRITE_BNDRY_128_PCIX);
-+ } else {
-+ val |= (DMA_RWCTRL_READ_BNDRY_384_PCIX |
-+ DMA_RWCTRL_WRITE_BNDRY_384_PCIX);
-+ }
-+ break;
-+
-+ case 256:
-+ val |= (DMA_RWCTRL_READ_BNDRY_256_PCIX |
-+ DMA_RWCTRL_WRITE_BNDRY_256_PCIX);
-+ break;
-+
-+ default:
-+ val |= (DMA_RWCTRL_READ_BNDRY_384_PCIX |
-+ DMA_RWCTRL_WRITE_BNDRY_384_PCIX);
-+ break;
-+ }
-+ } else if (tg3_flag(tp, PCI_EXPRESS)) {
-+ switch (cacheline_size) {
-+ case 16:
-+ case 32:
-+ case 64:
-+ if (goal == BOUNDARY_SINGLE_CACHELINE) {
-+ val &= ~DMA_RWCTRL_WRITE_BNDRY_DISAB_PCIE;
-+ val |= DMA_RWCTRL_WRITE_BNDRY_64_PCIE;
-+ break;
-+ }
-+ /* fallthrough */
-+ case 128:
-+ default:
-+ val &= ~DMA_RWCTRL_WRITE_BNDRY_DISAB_PCIE;
-+ val |= DMA_RWCTRL_WRITE_BNDRY_128_PCIE;
-+ break;
-+ }
-+ } else {
-+ switch (cacheline_size) {
-+ case 16:
-+ if (goal == BOUNDARY_SINGLE_CACHELINE) {
-+ val |= (DMA_RWCTRL_READ_BNDRY_16 |
-+ DMA_RWCTRL_WRITE_BNDRY_16);
-+ break;
-+ }
-+ /* fallthrough */
-+ case 32:
-+ if (goal == BOUNDARY_SINGLE_CACHELINE) {
-+ val |= (DMA_RWCTRL_READ_BNDRY_32 |
-+ DMA_RWCTRL_WRITE_BNDRY_32);
-+ break;
-+ }
-+ /* fallthrough */
-+ case 64:
-+ if (goal == BOUNDARY_SINGLE_CACHELINE) {
-+ val |= (DMA_RWCTRL_READ_BNDRY_64 |
-+ DMA_RWCTRL_WRITE_BNDRY_64);
-+ break;
-+ }
-+ /* fallthrough */
-+ case 128:
-+ if (goal == BOUNDARY_SINGLE_CACHELINE) {
-+ val |= (DMA_RWCTRL_READ_BNDRY_128 |
-+ DMA_RWCTRL_WRITE_BNDRY_128);
-+ break;
-+ }
-+ /* fallthrough */
-+ case 256:
-+ val |= (DMA_RWCTRL_READ_BNDRY_256 |
-+ DMA_RWCTRL_WRITE_BNDRY_256);
-+ break;
-+ case 512:
-+ val |= (DMA_RWCTRL_READ_BNDRY_512 |
-+ DMA_RWCTRL_WRITE_BNDRY_512);
-+ break;
-+ case 1024:
-+ default:
-+ val |= (DMA_RWCTRL_READ_BNDRY_1024 |
-+ DMA_RWCTRL_WRITE_BNDRY_1024);
-+ break;
-+ }
-+ }
-+
-+out:
-+ return val;
-+}
-+
-+static int __devinit tg3_do_test_dma(struct tg3 *tp, u32 *buf, dma_addr_t buf_dma,
-+ int size, bool to_device)
-+{
-+ struct tg3_internal_buffer_desc test_desc;
-+ u32 sram_dma_descs;
-+ int i, ret;
-+
-+ sram_dma_descs = NIC_SRAM_DMA_DESC_POOL_BASE;
-+
-+ tw32(FTQ_RCVBD_COMP_FIFO_ENQDEQ, 0);
-+ tw32(FTQ_RCVDATA_COMP_FIFO_ENQDEQ, 0);
-+ tw32(RDMAC_STATUS, 0);
-+ tw32(WDMAC_STATUS, 0);
-+
-+ tw32(BUFMGR_MODE, 0);
-+ tw32(FTQ_RESET, 0);
-+
-+ test_desc.addr_hi = ((u64) buf_dma) >> 32;
-+ test_desc.addr_lo = buf_dma & 0xffffffff;
-+ test_desc.nic_mbuf = 0x00002100;
-+ test_desc.len = size;
-+
-+ /*
-+ * HP ZX1 was seeing test failures for 5701 cards running at 33Mhz
-+ * the *second* time the tg3 driver was getting loaded after an
-+ * initial scan.
-+ *
-+ * Broadcom tells me:
-+ * ...the DMA engine is connected to the GRC block and a DMA
-+ * reset may affect the GRC block in some unpredictable way...
-+ * The behavior of resets to individual blocks has not been tested.
-+ *
-+ * Broadcom noted the GRC reset will also reset all sub-components.
-+ */
-+ if (to_device) {
-+ test_desc.cqid_sqid = (13 << 8) | 2;
-+
-+ tw32_f(RDMAC_MODE, RDMAC_MODE_ENABLE);
-+ udelay(40);
-+ } else {
-+ test_desc.cqid_sqid = (16 << 8) | 7;
-+
-+ tw32_f(WDMAC_MODE, WDMAC_MODE_ENABLE);
-+ udelay(40);
-+ }
-+ test_desc.flags = 0x00000005;
-+
-+ for (i = 0; i < (sizeof(test_desc) / sizeof(u32)); i++) {
-+ u32 val;
-+
-+ val = *(((u32 *)&test_desc) + i);
-+ pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR,
-+ sram_dma_descs + (i * sizeof(u32)));
-+ pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_DATA, val);
-+ }
-+ pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0);
-+
-+ if (to_device)
-+ tw32(FTQ_DMA_HIGH_READ_FIFO_ENQDEQ, sram_dma_descs);
-+ else
-+ tw32(FTQ_DMA_HIGH_WRITE_FIFO_ENQDEQ, sram_dma_descs);
-+
-+ ret = -ENODEV;
-+ for (i = 0; i < 40; i++) {
-+ u32 val;
-+
-+ if (to_device)
-+ val = tr32(FTQ_RCVBD_COMP_FIFO_ENQDEQ);
-+ else
-+ val = tr32(FTQ_RCVDATA_COMP_FIFO_ENQDEQ);
-+ if ((val & 0xffff) == sram_dma_descs) {
-+ ret = 0;
-+ break;
-+ }
-+
-+ udelay(100);
-+ }
-+
-+ return ret;
-+}
-+
-+#define TEST_BUFFER_SIZE 0x2000
-+
-+#if (LINUX_VERSION_CODE >= 0x2060a)
-+static DEFINE_PCI_DEVICE_TABLE(tg3_dma_wait_state_chipsets) = {
-+ { PCI_DEVICE(PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_PCI15) },
-+ { },
-+};
-+#endif
-+
-+static int __devinit tg3_test_dma(struct tg3 *tp)
-+{
-+ dma_addr_t buf_dma;
-+ u32 *buf, saved_dma_rwctrl;
-+ int ret = 0;
-+
-+ buf = dma_alloc_coherent(&tp->pdev->dev, TEST_BUFFER_SIZE,
-+ &buf_dma, GFP_KERNEL);
-+ if (!buf) {
-+ ret = -ENOMEM;
-+ goto out_nofree;
-+ }
-+
-+ tp->dma_rwctrl = ((0x7 << DMA_RWCTRL_PCI_WRITE_CMD_SHIFT) |
-+ (0x6 << DMA_RWCTRL_PCI_READ_CMD_SHIFT));
-+
-+ tp->dma_rwctrl = tg3_calc_dma_bndry(tp, tp->dma_rwctrl);
-+
-+ if (tg3_flag(tp, 57765_PLUS))
-+ goto out;
-+
-+ if (tg3_flag(tp, PCI_EXPRESS)) {
-+ /* DMA read watermark not used on PCIE */
-+ tp->dma_rwctrl |= 0x00180000;
-+ } else if (!tg3_flag(tp, PCIX_MODE)) {
-+ if (tg3_asic_rev(tp) == ASIC_REV_5705 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5750)
-+ tp->dma_rwctrl |= 0x003f0000;
-+ else
-+ tp->dma_rwctrl |= 0x003f000f;
-+ } else {
-+ if (tg3_asic_rev(tp) == ASIC_REV_5703 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5704) {
-+ u32 ccval = (tr32(TG3PCI_CLOCK_CTRL) & 0x1f);
-+ u32 read_water = 0x7;
-+
-+ /* If the 5704 is behind the EPB bridge, we can
-+ * do the less restrictive ONE_DMA workaround for
-+ * better performance.
-+ */
-+ if (tg3_flag(tp, 40BIT_DMA_BUG) &&
-+ tg3_asic_rev(tp) == ASIC_REV_5704)
-+ tp->dma_rwctrl |= 0x8000;
-+ else if (ccval == 0x6 || ccval == 0x7)
-+ tp->dma_rwctrl |= DMA_RWCTRL_ONE_DMA;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5703)
-+ read_water = 4;
-+ /* Set bit 23 to enable PCIX hw bug fix */
-+ tp->dma_rwctrl |=
-+ (read_water << DMA_RWCTRL_READ_WATER_SHIFT) |
-+ (0x3 << DMA_RWCTRL_WRITE_WATER_SHIFT) |
-+ (1 << 23);
-+ } else if (tg3_asic_rev(tp) == ASIC_REV_5780) {
-+ /* 5780 always in PCIX mode */
-+ tp->dma_rwctrl |= 0x00144000;
-+ } else if (tg3_asic_rev(tp) == ASIC_REV_5714) {
-+ /* 5714 always in PCIX mode */
-+ tp->dma_rwctrl |= 0x00148000;
-+ } else {
-+ tp->dma_rwctrl |= 0x001b000f;
-+ }
-+ }
-+ if (tg3_flag(tp, ONE_DMA_AT_ONCE))
-+ tp->dma_rwctrl |= DMA_RWCTRL_ONE_DMA;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5703 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5704)
-+ tp->dma_rwctrl &= 0xfffffff0;
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5700 ||
-+ tg3_asic_rev(tp) == ASIC_REV_5701) {
-+ /* Remove this if it causes problems for some boards. */
-+ tp->dma_rwctrl |= DMA_RWCTRL_USE_MEM_READ_MULT;
-+
-+ /* On 5700/5701 chips, we need to set this bit.
-+ * Otherwise the chip will issue cacheline transactions
-+ * to streamable DMA memory with not all the byte
-+ * enables turned on. This is an error on several
-+ * RISC PCI controllers, in particular sparc64.
-+ *
-+ * On 5703/5704 chips, this bit has been reassigned
-+ * a different meaning. In particular, it is used
-+ * on those chips to enable a PCI-X workaround.
-+ */
-+ tp->dma_rwctrl |= DMA_RWCTRL_ASSERT_ALL_BE;
-+ }
-+
-+ tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl);
-+
-+#if 0
-+ /* Unneeded, already done by tg3_get_invariants. */
-+ tg3_switch_clocks(tp);
-+#endif
-+
-+ if (tg3_asic_rev(tp) != ASIC_REV_5700 &&
-+ tg3_asic_rev(tp) != ASIC_REV_5701)
-+ goto out;
-+
-+ /* It is best to perform DMA test with maximum write burst size
-+ * to expose the 5700/5701 write DMA bug.
-+ */
-+ saved_dma_rwctrl = tp->dma_rwctrl;
-+ tp->dma_rwctrl &= ~DMA_RWCTRL_WRITE_BNDRY_MASK;
-+ tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl);
-+
-+ while (1) {
-+ u32 *p = buf, i;
-+
-+ for (i = 0; i < TEST_BUFFER_SIZE / sizeof(u32); i++)
-+ p[i] = i;
-+
-+ /* Send the buffer to the chip. */
-+ ret = tg3_do_test_dma(tp, buf, buf_dma, TEST_BUFFER_SIZE, true);
-+ if (ret) {
-+ dev_err(&tp->pdev->dev,
-+ "%s: Buffer write failed. err = %d\n",
-+ __func__, ret);
-+ break;
-+ }
-+
-+#if 0
-+ /* validate data reached card RAM correctly. */
-+ for (i = 0; i < TEST_BUFFER_SIZE / sizeof(u32); i++) {
-+ u32 val;
-+ tg3_read_mem(tp, 0x2100 + (i*4), &val);
-+ if (le32_to_cpu(val) != p[i]) {
-+ dev_err(&tp->pdev->dev,
-+ "%s: Buffer corrupted on device! "
-+ "(%d != %d)\n", __func__, val, i);
-+ /* ret = -ENODEV here? */
-+ }
-+ p[i] = 0;
-+ }
-+#endif
-+ /* Now read it back. */
-+ ret = tg3_do_test_dma(tp, buf, buf_dma, TEST_BUFFER_SIZE, false);
-+ if (ret) {
-+ dev_err(&tp->pdev->dev, "%s: Buffer read failed. "
-+ "err = %d\n", __func__, ret);
-+ break;
-+ }
-+
-+ /* Verify it. */
-+ for (i = 0; i < TEST_BUFFER_SIZE / sizeof(u32); i++) {
-+ if (p[i] == i)
-+ continue;
-+
-+ if ((tp->dma_rwctrl & DMA_RWCTRL_WRITE_BNDRY_MASK) !=
-+ DMA_RWCTRL_WRITE_BNDRY_16) {
-+ tp->dma_rwctrl &= ~DMA_RWCTRL_WRITE_BNDRY_MASK;
-+ tp->dma_rwctrl |= DMA_RWCTRL_WRITE_BNDRY_16;
-+ tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl);
-+ break;
-+ } else {
-+ dev_err(&tp->pdev->dev,
-+ "%s: Buffer corrupted on read back! "
-+ "(%d != %d)\n", __func__, p[i], i);
-+ ret = -ENODEV;
-+ goto out;
-+ }
-+ }
-+
-+ if (i == (TEST_BUFFER_SIZE / sizeof(u32))) {
-+ /* Success. */
-+ ret = 0;
-+ break;
-+ }
-+ }
-+ if ((tp->dma_rwctrl & DMA_RWCTRL_WRITE_BNDRY_MASK) !=
-+ DMA_RWCTRL_WRITE_BNDRY_16) {
-+ /* DMA test passed without adjusting DMA boundary,
-+ * now look for chipsets that are known to expose the
-+ * DMA bug without failing the test.
-+ */
-+#if (LINUX_VERSION_CODE < 0x2060a)
-+ if (pci_find_device(PCI_VENDOR_ID_APPLE,
-+ PCI_DEVICE_ID_APPLE_UNI_N_PCI15, NULL))
-+#else
-+ if (pci_dev_present(tg3_dma_wait_state_chipsets))
-+#endif
-+ {
-+ tp->dma_rwctrl &= ~DMA_RWCTRL_WRITE_BNDRY_MASK;
-+ tp->dma_rwctrl |= DMA_RWCTRL_WRITE_BNDRY_16;
-+ } else {
-+ /* Safe to use the calculated DMA boundary. */
-+ tp->dma_rwctrl = saved_dma_rwctrl;
-+ }
-+
-+ tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl);
-+ }
-+
-+out:
-+ dma_free_coherent(&tp->pdev->dev, TEST_BUFFER_SIZE, buf, buf_dma);
-+out_nofree:
-+ return ret;
-+}
-+
-+static void __devinit tg3_init_bufmgr_config(struct tg3 *tp)
-+{
-+ if (tg3_flag(tp, 57765_PLUS)) {
-+ tp->bufmgr_config.mbuf_read_dma_low_water =
-+ DEFAULT_MB_RDMA_LOW_WATER_5705;
-+ tp->bufmgr_config.mbuf_mac_rx_low_water =
-+ DEFAULT_MB_MACRX_LOW_WATER_57765;
-+ tp->bufmgr_config.mbuf_high_water =
-+ DEFAULT_MB_HIGH_WATER_57765;
-+
-+ tp->bufmgr_config.mbuf_read_dma_low_water_jumbo =
-+ DEFAULT_MB_RDMA_LOW_WATER_5705;
-+ tp->bufmgr_config.mbuf_mac_rx_low_water_jumbo =
-+ DEFAULT_MB_MACRX_LOW_WATER_JUMBO_57765;
-+ tp->bufmgr_config.mbuf_high_water_jumbo =
-+ DEFAULT_MB_HIGH_WATER_JUMBO_57765;
-+ } else if (tg3_flag(tp, 5705_PLUS)) {
-+ tp->bufmgr_config.mbuf_read_dma_low_water =
-+ DEFAULT_MB_RDMA_LOW_WATER_5705;
-+ tp->bufmgr_config.mbuf_mac_rx_low_water =
-+ DEFAULT_MB_MACRX_LOW_WATER_5705;
-+ tp->bufmgr_config.mbuf_high_water =
-+ DEFAULT_MB_HIGH_WATER_5705;
-+ if (tg3_asic_rev(tp) == ASIC_REV_5906) {
-+ tp->bufmgr_config.mbuf_mac_rx_low_water =
-+ DEFAULT_MB_MACRX_LOW_WATER_5906;
-+ tp->bufmgr_config.mbuf_high_water =
-+ DEFAULT_MB_HIGH_WATER_5906;
-+ }
-+
-+ tp->bufmgr_config.mbuf_read_dma_low_water_jumbo =
-+ DEFAULT_MB_RDMA_LOW_WATER_JUMBO_5780;
-+ tp->bufmgr_config.mbuf_mac_rx_low_water_jumbo =
-+ DEFAULT_MB_MACRX_LOW_WATER_JUMBO_5780;
-+ tp->bufmgr_config.mbuf_high_water_jumbo =
-+ DEFAULT_MB_HIGH_WATER_JUMBO_5780;
-+ } else {
-+ tp->bufmgr_config.mbuf_read_dma_low_water =
-+ DEFAULT_MB_RDMA_LOW_WATER;
-+ tp->bufmgr_config.mbuf_mac_rx_low_water =
-+ DEFAULT_MB_MACRX_LOW_WATER;
-+ tp->bufmgr_config.mbuf_high_water =
-+ DEFAULT_MB_HIGH_WATER;
-+
-+ tp->bufmgr_config.mbuf_read_dma_low_water_jumbo =
-+ DEFAULT_MB_RDMA_LOW_WATER_JUMBO;
-+ tp->bufmgr_config.mbuf_mac_rx_low_water_jumbo =
-+ DEFAULT_MB_MACRX_LOW_WATER_JUMBO;
-+ tp->bufmgr_config.mbuf_high_water_jumbo =
-+ DEFAULT_MB_HIGH_WATER_JUMBO;
-+ }
-+
-+ tp->bufmgr_config.dma_low_water = DEFAULT_DMA_LOW_WATER;
-+ tp->bufmgr_config.dma_high_water = DEFAULT_DMA_HIGH_WATER;
-+}
-+
-+static char * __devinit tg3_phy_string(struct tg3 *tp)
-+{
-+ switch (tp->phy_id & TG3_PHY_ID_MASK) {
-+ case TG3_PHY_ID_BCM5400: return "5400";
-+ case TG3_PHY_ID_BCM5401: return "5401";
-+ case TG3_PHY_ID_BCM5411: return "5411";
-+ case TG3_PHY_ID_BCM5701: return "5701";
-+ case TG3_PHY_ID_BCM5703: return "5703";
-+ case TG3_PHY_ID_BCM5704: return "5704";
-+ case TG3_PHY_ID_BCM5705: return "5705";
-+ case TG3_PHY_ID_BCM5750: return "5750";
-+ case TG3_PHY_ID_BCM5752: return "5752";
-+ case TG3_PHY_ID_BCM5714: return "5714";
-+ case TG3_PHY_ID_BCM5780: return "5780";
-+ case TG3_PHY_ID_BCM5755: return "5755";
-+ case TG3_PHY_ID_BCM5787: return "5787";
-+ case TG3_PHY_ID_BCM5784: return "5784";
-+ case TG3_PHY_ID_BCM5756: return "5722/5756";
-+ case TG3_PHY_ID_BCM5906: return "5906";
-+ case TG3_PHY_ID_BCM5761: return "5761";
-+#ifndef BCM_INCLUDE_PHYLIB_SUPPORT
-+ case TG3_PHY_ID_BCM50610: return "50610";
-+ case TG3_PHY_ID_BCM50610M: return "50610M";
-+ case TG3_PHY_ID_BCM50612E: return "50612E";
-+ case TG3_PHY_ID_BCMAC131: return "AC131";
-+ case TG3_PHY_ID_BCM57780: return "57780";
-+#endif
-+ case TG3_PHY_ID_BCM5718C: return "5718C";
-+ case TG3_PHY_ID_BCM5718S: return "5718S";
-+ case TG3_PHY_ID_BCM57765: return "57765";
-+ case TG3_PHY_ID_BCM5719C: return "5719C";
-+ case TG3_PHY_ID_BCM5720C: return "5720C";
-+ case TG3_PHY_ID_BCM5762: return "5762C";
-+ case TG3_PHY_ID_BCM8002: return "8002/serdes";
-+ case 0: return "serdes";
-+ default: return "unknown";
-+ }
-+}
-+
-+static char * __devinit tg3_bus_string(struct tg3 *tp, char *str)
-+{
-+ if (tg3_flag(tp, PCI_EXPRESS)) {
-+ strcpy(str, "PCI Express");
-+ return str;
-+ } else if (tg3_flag(tp, PCIX_MODE)) {
-+ u32 clock_ctrl = tr32(TG3PCI_CLOCK_CTRL) & 0x1f;
-+
-+ strcpy(str, "PCIX:");
-+
-+ if ((clock_ctrl == 7) ||
-+ ((tr32(GRC_MISC_CFG) & GRC_MISC_CFG_BOARD_ID_MASK) ==
-+ GRC_MISC_CFG_BOARD_ID_5704CIOBE))
-+ strcat(str, "133MHz");
-+ else if (clock_ctrl == 0)
-+ strcat(str, "33MHz");
-+ else if (clock_ctrl == 2)
-+ strcat(str, "50MHz");
-+ else if (clock_ctrl == 4)
-+ strcat(str, "66MHz");
-+ else if (clock_ctrl == 6)
-+ strcat(str, "100MHz");
-+ } else {
-+ strcpy(str, "PCI:");
-+ if (tg3_flag(tp, PCI_HIGH_SPEED))
-+ strcat(str, "66MHz");
-+ else
-+ strcat(str, "33MHz");
-+ }
-+ if (tg3_flag(tp, PCI_32BIT))
-+ strcat(str, ":32-bit");
-+ else
-+ strcat(str, ":64-bit");
-+ return str;
-+}
-+
-+static void __devinit tg3_init_coal(struct tg3 *tp)
-+{
-+ struct ethtool_coalesce *ec = &tp->coal;
-+
-+ memset(ec, 0, sizeof(*ec));
-+ ec->cmd = ETHTOOL_GCOALESCE;
-+ ec->rx_coalesce_usecs = LOW_RXCOL_TICKS;
-+ ec->tx_coalesce_usecs = LOW_TXCOL_TICKS;
-+ ec->rx_max_coalesced_frames = LOW_RXMAX_FRAMES;
-+ ec->tx_max_coalesced_frames = LOW_TXMAX_FRAMES;
-+ ec->rx_coalesce_usecs_irq = DEFAULT_RXCOAL_TICK_INT;
-+ ec->tx_coalesce_usecs_irq = DEFAULT_TXCOAL_TICK_INT;
-+ ec->rx_max_coalesced_frames_irq = DEFAULT_RXCOAL_MAXF_INT;
-+ ec->tx_max_coalesced_frames_irq = DEFAULT_TXCOAL_MAXF_INT;
-+ ec->stats_block_coalesce_usecs = DEFAULT_STAT_COAL_TICKS;
-+
-+ if (tp->coalesce_mode & (HOSTCC_MODE_CLRTICK_RXBD |
-+ HOSTCC_MODE_CLRTICK_TXBD)) {
-+ ec->rx_coalesce_usecs = LOW_RXCOL_TICKS_CLRTCKS;
-+ ec->rx_coalesce_usecs_irq = DEFAULT_RXCOAL_TICK_INT_CLRTCKS;
-+ ec->tx_coalesce_usecs = LOW_TXCOL_TICKS_CLRTCKS;
-+ ec->tx_coalesce_usecs_irq = DEFAULT_TXCOAL_TICK_INT_CLRTCKS;
-+ }
-+
-+ if (tg3_flag(tp, 5705_PLUS)) {
-+ ec->rx_coalesce_usecs_irq = 0;
-+ ec->tx_coalesce_usecs_irq = 0;
-+ ec->stats_block_coalesce_usecs = 0;
-+ }
-+}
-+
-+static int __devinit tg3_init_one(struct pci_dev *pdev,
-+ const struct pci_device_id *ent)
-+{
-+ struct net_device *dev;
-+ struct tg3 *tp;
-+ int i, err, pm_cap;
-+ u32 sndmbx, rcvmbx, intmbx;
-+ char str[40];
-+ u64 dma_mask, persist_dma_mask;
-+ DECLARE_MAC_BUF(mac);
-+ netdev_features_t features = 0;
-+
-+ printk_once(KERN_INFO "%s\n", version);
-+
-+ err = pci_enable_device(pdev);
-+ if (err) {
-+ dev_err(&pdev->dev, "Cannot enable PCI device, aborting\n");
-+ return err;
-+ }
-+
-+ err = pci_request_regions(pdev, DRV_MODULE_NAME);
-+ if (err) {
-+ dev_err(&pdev->dev, "Cannot obtain PCI resources, aborting\n");
-+ goto err_out_disable_pdev;
-+ }
-+
-+ pci_set_master(pdev);
-+
-+ /* Find power-management capability. */
-+ pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM);
-+ if (pm_cap == 0) {
-+ dev_err(&pdev->dev,
-+ "Cannot find Power Management capability, aborting\n");
-+ err = -EIO;
-+ goto err_out_free_res;
-+ }
-+
-+ err = pci_set_power_state(pdev, PCI_D0);
-+ if (err) {
-+ dev_err(&pdev->dev, "Transition to D0 failed, aborting\n");
-+ goto err_out_free_res;
-+ }
-+
-+ dev = alloc_etherdev_mq(sizeof(*tp), TG3_IRQ_MAX_VECS);
-+ if (!dev) {
-+ dev_err(&pdev->dev, "Etherdev alloc failed, aborting\n");
-+ err = -ENOMEM;
-+ goto err_out_power_down;
-+ }
-+
-+ SET_MODULE_OWNER(dev);
-+#if (LINUX_VERSION_CODE >= 0x20419)
-+ SET_NETDEV_DEV(dev, &pdev->dev);
-+#endif
-+
-+ pci_set_drvdata(pdev, dev);
-+
-+ tp = netdev_priv(dev);
-+ tp->pdev = pdev;
-+ tp->dev = dev;
-+ tp->pm_cap = pm_cap;
-+ tp->rx_mode = TG3_DEF_RX_MODE;
-+ tp->tx_mode = TG3_DEF_TX_MODE;
-+ tp->irq_sync = 1;
-+
-+ if (tg3_debug > 0)
-+ tp->msg_enable = tg3_debug;
-+ else
-+ tp->msg_enable = TG3_DEF_MSG_ENABLE;
-+
-+ if (pdev_is_ssb_gige_core(pdev)) {
-+ tg3_flag_set(tp, IS_SSB_CORE);
-+ if (ssb_gige_must_flush_posted_writes(pdev))
-+ tg3_flag_set(tp, FLUSH_POSTED_WRITES);
-+ if (ssb_gige_one_dma_at_once(pdev))
-+ tg3_flag_set(tp, ONE_DMA_AT_ONCE);
-+ if (ssb_gige_have_roboswitch(pdev)) {
-+ tg3_flag_set(tp, USE_PHYLIB);
-+ tg3_flag_set(tp, ROBOSWITCH);
-+ }
-+ if (ssb_gige_is_rgmii(pdev))
-+ tg3_flag_set(tp, RGMII_MODE);
-+ }
-+
-+ /* The word/byte swap controls here control register access byte
-+ * swapping. DMA data byte swapping is controlled in the GRC_MODE
-+ * setting below.
-+ */
-+ tp->misc_host_ctrl =
-+ MISC_HOST_CTRL_MASK_PCI_INT |
-+ MISC_HOST_CTRL_WORD_SWAP |
-+ MISC_HOST_CTRL_INDIR_ACCESS |
-+ MISC_HOST_CTRL_PCISTATE_RW;
-+
-+ /* The NONFRM (non-frame) byte/word swap controls take effect
-+ * on descriptor entries, anything which isn't packet data.
-+ *
-+ * The StrongARM chips on the board (one for tx, one for rx)
-+ * are running in big-endian mode.
-+ */
-+ tp->grc_mode = (GRC_MODE_WSWAP_DATA | GRC_MODE_BSWAP_DATA |
-+ GRC_MODE_WSWAP_NONFRM_DATA);
-+#ifdef __BIG_ENDIAN
-+ tp->grc_mode |= GRC_MODE_BSWAP_NONFRM_DATA;
-+#endif
-+ spin_lock_init(&tp->lock);
-+ spin_lock_init(&tp->indirect_lock);
-+#ifdef BCM_HAS_NEW_INIT_WORK
-+ INIT_WORK(&tp->reset_task, tg3_reset_task);
-+#else
-+ INIT_WORK(&tp->reset_task, tg3_reset_task, tp);
-+#endif
-+
-+ tp->regs = pci_ioremap_bar(pdev, BAR_0);
-+ if (!tp->regs) {
-+ dev_err(&pdev->dev, "Cannot map device registers, aborting\n");
-+ err = -ENOMEM;
-+ goto err_out_free_dev;
-+ }
-+
-+ if (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5761 ||
-+ tp->pdev->device == PCI_DEVICE_ID_TIGON3_5761E ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5761S ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5761SE ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5717 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5717_C ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5718 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5719 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5720 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_57767 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_57764 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5762 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5725 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_5727 ||
-+ tp->pdev->device == TG3PCI_DEVICE_TIGON3_57787) {
-+ tg3_flag_set(tp, ENABLE_APE);
-+ tp->aperegs = pci_ioremap_bar(pdev, BAR_2);
-+ if (!tp->aperegs) {
-+ dev_err(&pdev->dev,
-+ "Cannot map APE registers, aborting\n");
-+ err = -ENOMEM;
-+ goto err_out_iounmap;
-+ }
-+ }
-+
-+ tp->rx_pending = TG3_DEF_RX_RING_PENDING;
-+ tp->rx_jumbo_pending = TG3_DEF_RX_JUMBO_RING_PENDING;
-+
-+ dev->ethtool_ops = &tg3_ethtool_ops;
-+#ifdef GET_ETHTOOL_OP_EXT
-+ set_ethtool_ops_ext(dev, &tg3_ethtool_ops_ext);
-+#endif
-+
-+#ifdef GET_NETDEV_OP_EXT
-+ set_netdev_ops_ext(dev, &tg3_net_device_ops_ext);
-+#endif
-+
-+ dev->watchdog_timeo = TG3_TX_TIMEOUT;
-+ dev->irq = pdev->irq;
-+
-+ err = tg3_get_invariants(tp, ent);
-+ if (err) {
-+ dev_err(&pdev->dev,
-+ "Problem fetching invariants of chip, aborting\n");
-+ goto err_out_apeunmap;
-+ }
-+
-+#ifdef BCM_HAS_NET_DEVICE_OPS
-+ dev->netdev_ops = &tg3_netdev_ops;
-+#else
-+ dev->open = tg3_open;
-+ dev->stop = tg3_close;
-+ dev->get_stats = tg3_get_stats;
-+ dev->set_multicast_list = tg3_set_rx_mode;
-+ dev->set_mac_address = tg3_set_mac_addr;
-+ dev->do_ioctl = tg3_ioctl;
-+ dev->tx_timeout = tg3_tx_timeout;
-+ dev->change_mtu = tg3_change_mtu;
-+#ifndef BCM_HAS_NEW_VLAN_INTERFACE
-+ dev->vlan_rx_register = tg3_vlan_rx_register;
-+ dev->vlan_rx_kill_vid = tg3_vlan_rx_kill_vid;
-+#endif
-+#ifdef CONFIG_NET_POLL_CONTROLLER
-+ dev->poll_controller = tg3_poll_controller;
-+#endif
-+
-+ tp->dev->hard_start_xmit = tg3_start_xmit;
-+#endif
-+
-+ /* The EPB bridge inside 5714, 5715, and 5780 and any
-+ * device behind the EPB cannot support DMA addresses > 40-bit.
-+ * On 64-bit systems with IOMMU, use 40-bit dma_mask.
-+ * On 64-bit systems without IOMMU, use 64-bit dma_mask and
-+ * do DMA address check in tg3_start_xmit().
-+ */
-+ if (tg3_flag(tp, IS_5788))
-+ persist_dma_mask = dma_mask = DMA_BIT_MASK(32);
-+ else if (tg3_flag(tp, 40BIT_DMA_BUG)) {
-+ persist_dma_mask = dma_mask = DMA_BIT_MASK(40);
-+#ifdef CONFIG_HIGHMEM
-+ dma_mask = DMA_BIT_MASK(64);
-+#endif
-+ } else
-+ persist_dma_mask = dma_mask = DMA_BIT_MASK(64);
-+
-+ /* Configure DMA attributes. */
-+ if (dma_mask > DMA_BIT_MASK(32)) {
-+ err = pci_set_dma_mask(pdev, dma_mask);
-+ if (!err) {
-+ features |= NETIF_F_HIGHDMA;
-+ err = pci_set_consistent_dma_mask(pdev,
-+ persist_dma_mask);
-+ if (err < 0) {
-+ dev_err(&pdev->dev, "Unable to obtain "
-+ "DMA for consistent allocations\n");
-+ goto err_out_apeunmap;
-+ }
-+ }
-+ }
-+ if (err || dma_mask == DMA_BIT_MASK(32)) {
-+ err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
-+ if (err) {
-+ dev_err(&pdev->dev,
-+ "No usable DMA configuration, aborting\n");
-+ goto err_out_apeunmap;
-+ }
-+ }
-+
-+ tg3_init_bufmgr_config(tp);
-+
-+ /* 5700 B0 chips do not support checksumming correctly due
-+ * to hardware bugs.
-+ */
-+ if (tg3_chip_rev_id(tp) != CHIPREV_ID_5700_B0) {
-+ features |= NETIF_F_SG | NETIF_F_GRO | NETIF_F_RXCSUM;
-+
-+#ifndef BCM_NO_IPV6_CSUM
-+ features |= NETIF_F_IP_CSUM;
-+ if (tg3_flag(tp, 5755_PLUS))
-+ features |= NETIF_F_IPV6_CSUM;
-+#else
-+ if (tg3_flag(tp, 5755_PLUS))
-+ features |= NETIF_F_HW_CSUM;
-+ else
-+ features |= NETIF_F_IP_CSUM;
-+#endif
-+ }
-+
-+#if TG3_TSO_SUPPORT != 0
-+ /* TSO is on by default on chips that support hardware TSO.
-+ * Firmware TSO on older chips gives lower performance, so it
-+ * is off by default, but can be enabled using ethtool.
-+ */
-+ if ((tg3_flag(tp, HW_TSO_1) ||
-+ tg3_flag(tp, HW_TSO_2) ||
-+ tg3_flag(tp, HW_TSO_3)) &&
-+ (features & (NETIF_F_IP_CSUM | NETIF_F_HW_CSUM)))
-+ features |= NETIF_F_TSO;
-+ if (tg3_flag(tp, HW_TSO_2) || tg3_flag(tp, HW_TSO_3)) {
-+ if (features & NETIF_F_IPV6_CSUM)
-+ features |= NETIF_F_TSO6;
-+ if (tg3_flag(tp, HW_TSO_3) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5761 ||
-+ (tg3_asic_rev(tp) == ASIC_REV_5784 &&
-+ tg3_chip_rev(tp) != CHIPREV_5784_AX) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5785 ||
-+ tg3_asic_rev(tp) == ASIC_REV_57780)
-+ features |= NETIF_F_TSO_ECN;
-+ }
-+
-+#if defined(__VMKLNX__)
-+ features = tg3_vmware_tune_tso(tp, features);
-+#endif /* __VMKLNX__ */
-+#endif /* TG3_TSO_SUPPORT != 0 */
-+
-+ dev->features |= features | NETIF_F_HW_VLAN_CTAG_TX |
-+ NETIF_F_HW_VLAN_CTAG_RX;
-+ dev->vlan_features |= features;
-+
-+#ifdef BCM_HAS_FIX_FEATURES
-+ /*
-+ * Add loopback capability only for a subset of devices that support
-+ * MAC-LOOPBACK. Eventually this need to be enhanced to allow INT-PHY
-+ * loopback for the remaining devices.
-+ */
-+ if (tg3_asic_rev(tp) != ASIC_REV_5780 &&
-+ !tg3_flag(tp, CPMU_PRESENT))
-+ /* Add the loopback capability */
-+ features |= NETIF_F_LOOPBACK;
-+#endif
-+
-+#if defined(GET_NETDEV_OP_EXT)
-+ set_netdev_hw_features(dev, get_netdev_hw_features(dev) | features);
-+#else
-+ dev->hw_features |= features;
-+#endif
-+
-+#ifdef IFF_UNICAST_FLT
-+ dev->priv_flags |= IFF_UNICAST_FLT;
-+#endif
-+
-+ if (tg3_chip_rev_id(tp) == CHIPREV_ID_5705_A1 &&
-+ !tg3_flag(tp, TSO_CAPABLE) &&
-+ !(tr32(TG3PCI_PCISTATE) & PCISTATE_BUS_SPEED_HIGH)) {
-+ tg3_flag_set(tp, MAX_RXPEND_64);
-+ tp->rx_pending = 63;
-+ }
-+
-+ err = tg3_get_device_address(tp);
-+ if (err) {
-+ dev_err(&pdev->dev,
-+ "Could not obtain valid ethernet address, aborting\n");
-+ goto err_out_apeunmap;
-+ }
-+
-+ intmbx = MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW;
-+ rcvmbx = MAILBOX_RCVRET_CON_IDX_0 + TG3_64BIT_REG_LOW;
-+ sndmbx = MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW;
-+ for (i = 0; i < tp->irq_max; i++) {
-+ struct tg3_napi *tnapi = &tp->napi[i];
-+
-+ tnapi->tp = tp;
-+ tnapi->tx_pending = TG3_DEF_TX_RING_PENDING;
-+
-+ tnapi->int_mbox = intmbx;
-+ if (i <= 4)
-+ intmbx += 0x8;
-+ else {
-+ if (intmbx & 0x4)
-+ intmbx -= 0x4;
-+ else
-+ intmbx += 0xc;
-+ }
-+
-+ tnapi->consmbox = rcvmbx;
-+ tnapi->prodmbox = sndmbx;
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ tg3_setup_prod_mboxes(tp, i);
-+#endif
-+
-+ if (i)
-+ tnapi->coal_now = HOSTCC_MODE_COAL_VEC1_NOW << (i - 1);
-+ else
-+ tnapi->coal_now = HOSTCC_MODE_NOW;
-+
-+ if (!tg3_flag(tp, SUPPORT_MSIX))
-+ break;
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ /*
-+ * If we support NETQ, the first interrupt vector is the default
-+ * rx queue. The first four queues follow the legacy RSS mailbox
-+ * enumeration scheme. Then, the enumerations follow the quirky
-+ * new way.
-+ */
-+ if(tg3_flag(tp, IOV_CAPABLE)) {
-+ if (i > 3) {
-+ if (rcvmbx & 0x4)
-+ rcvmbx -= 0x4;
-+ else
-+ rcvmbx += 0xc;
-+ } else
-+ rcvmbx += 0x8;
-+ }
-+
-+ if (!i)
-+ continue;
-+
-+ if (!tg3_flag(tp, IOV_CAPABLE))
-+ rcvmbx += 0x8;
-+#else
-+ /*
-+ * If we support MSIX, we'll be using RSS. If we're using
-+ * RSS, the first vector only handles link interrupts and the
-+ * remaining vectors handle rx and tx interrupts. Reuse the
-+ * mailbox values for the next iteration. The values we setup
-+ * above are still useful for the single vectored mode.
-+ */
-+ if (!i)
-+ continue;
-+
-+ rcvmbx += 0x8;
-+#endif
-+
-+ if (sndmbx & 0x4)
-+ sndmbx -= 0x4;
-+ else
-+ sndmbx += 0xc;
-+ }
-+
-+ /*
-+ * Reset chip in case UNDI or EFI driver did not shutdown
-+ * DMA self test will enable WDMAC and we'll see (spurious)
-+ * pending DMA on the PCI bus at that point.
-+ */
-+ if ((tr32(HOSTCC_MODE) & HOSTCC_MODE_ENABLE) ||
-+ (tr32(WDMAC_MODE) & WDMAC_MODE_ENABLE)) {
-+ tw32(MEMARB_MODE, MEMARB_MODE_ENABLE);
-+ tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
-+ }
-+
-+ err = tg3_test_dma(tp);
-+ if (err) {
-+ dev_err(&pdev->dev, "DMA engine test failed, aborting\n");
-+ goto err_out_apeunmap;
-+ }
-+
-+ tg3_init_coal(tp);
-+
-+ if (tg3_asic_rev(tp) == ASIC_REV_5719 ||
-+ (tg3_asic_rev(tp) == ASIC_REV_5720 &&
-+ tp->pdev->device != TG3PCI_DEVICE_TIGON3_5717_C) ||
-+ tg3_asic_rev(tp) != ASIC_REV_5762)
-+ tg3_flag_set(tp, PTP_CAPABLE);
-+
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ if (tg3_flag(tp, IOV_CAPABLE))
-+ tg3_netq_init(tp);
-+#endif
-+
-+ tg3_timer_init(tp);
-+
-+ err = register_netdev(dev);
-+ if (err) {
-+ dev_err(&pdev->dev, "Cannot register net device, aborting\n");
-+ goto err_out_apeunmap;
-+ }
-+
-+ netdev_info(dev, "Tigon3 [partno(%s) rev %04x] (%s) MAC address %s\n",
-+ tp->board_part_number,
-+ tg3_chip_rev_id(tp),
-+ tg3_bus_string(tp, str),
-+ print_mac(mac, dev->dev_addr));
-+
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+ if (tp->phy_flags & TG3_PHYFLG_IS_CONNECTED) {
-+ struct phy_device *phydev;
-+ phydev = tp->mdio_bus->phy_map[tp->phy_addr];
-+ netdev_info(dev,
-+ "attached PHY driver [%s] (mii_bus:phy_addr=%s)\n",
-+ phydev->drv->name, dev_name(&phydev->dev));
-+ } else
-+#endif
-+ {
-+ char *ethtype;
-+
-+ if (tp->phy_flags & TG3_PHYFLG_10_100_ONLY)
-+ ethtype = "10/100Base-TX";
-+ else if (tp->phy_flags & TG3_PHYFLG_ANY_SERDES)
-+ ethtype = "1000Base-SX";
-+ else
-+ ethtype = "10/100/1000Base-T";
-+
-+ netdev_info(dev, "attached PHY is %s (%s Ethernet) "
-+ "(WireSpeed[%d], EEE[%d])\n",
-+ tg3_phy_string(tp), ethtype,
-+ (tp->phy_flags & TG3_PHYFLG_NO_ETH_WIRE_SPEED) == 0,
-+ (tp->phy_flags & TG3_PHYFLG_EEE_CAP) != 0);
-+ }
-+
-+ netdev_info(dev, "RXcsums[%d] LinkChgREG[%d] MIirq[%d] ASF[%d] TSOcap[%d]\n",
-+ (dev->features & NETIF_F_RXCSUM) != 0,
-+ tg3_flag(tp, USE_LINKCHG_REG) != 0,
-+ (tp->phy_flags & TG3_PHYFLG_USE_MI_INTERRUPT) != 0,
-+ tg3_flag(tp, ENABLE_ASF) != 0,
-+ tg3_flag(tp, TSO_CAPABLE) != 0);
-+ netdev_info(dev, "dma_rwctrl[%08x] dma_mask[%d-bit]\n",
-+ tp->dma_rwctrl,
-+ pdev->dma_mask == DMA_BIT_MASK(32) ? 32 :
-+ ((u64)pdev->dma_mask) == DMA_BIT_MASK(40) ? 40 : 64);
-+
-+#if defined(__VMKLNX__)
-+ netdev_info(dev, "Jumbo Frames capable[%d]\n",
-+ tg3_flag(tp, JUMBO_CAPABLE) != 0);
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ if(tg3_flag(tp, IOV_CAPABLE))
-+ netdev_info(dev, "NetQueue module parameter index [%d]\n",
-+ tp->vmware.netq.index);
-+#endif
-+#endif
-+
-+#ifdef BCM_HAS_PCI_EEH_SUPPORT
-+ pci_save_state(pdev);
-+#endif
-+
-+
-+#if defined(__VMKLNX__) && (VMWARE_ESX_DDK_VERSION >= 55000)
-+ if (!disable_fw_dmp) {
-+ static int nic_idx;
-+
-+ /* sanity check the force_netq parameter */
-+ if (nic_idx >= TG3_MAX_NIC) {
-+ dev_err(&pdev->dev,
-+ "Invalid number of dev(%d)\n",
-+ nic_idx);
-+ return -EINVAL;
-+ }
-+ tp->nic_idx = nic_idx;
-+ /* allow fw dmp for newer chip only */
-+ if (tg3_asic_rev(tp) > ASIC_REV_5906)
-+ fwdmp_tp_ptr[tp->nic_idx] = tp;
-+ else
-+ netdev_info(dev, "No FW dump support in legacy chip\n"
-+ );
-+ nic_idx++;
-+ }
-+#endif /*defined(__VMKLNX__) && (VMWARE_ESX_DDK_VERSION >= 55000) */
-+ return 0;
-+
-+err_out_apeunmap:
-+ if (tp->aperegs) {
-+ iounmap(tp->aperegs);
-+ tp->aperegs = NULL;
-+ }
-+
-+err_out_iounmap:
-+ if (tp->regs) {
-+ iounmap(tp->regs);
-+ tp->regs = NULL;
-+ }
-+
-+err_out_free_dev:
-+#if (LINUX_VERSION_CODE >= 0x20418)
-+ free_netdev(dev);
-+#else
-+ kfree(dev);
-+#endif
-+
-+err_out_power_down:
-+ pci_set_power_state(pdev, PCI_D3hot);
-+
-+err_out_free_res:
-+ pci_release_regions(pdev);
-+
-+err_out_disable_pdev:
-+ if (pci_is_enabled(pdev))
-+ pci_disable_device(pdev);
-+ pci_set_drvdata(pdev, NULL);
-+ return err;
-+}
-+
-+static void __devexit tg3_remove_one(struct pci_dev *pdev)
-+{
-+ struct net_device *dev = pci_get_drvdata(pdev);
-+
-+ if (dev) {
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (tp->fw)
-+ tg3_priv_release_firmware(tp->fw);
-+
-+ tg3_reset_task_cancel(tp);
-+
-+ if (tg3_flag(tp, USE_PHYLIB)) {
-+ tg3_phy_fini(tp);
-+ tg3_mdio_fini(tp);
-+ }
-+
-+ unregister_netdev(dev);
-+
-+ if (tp->aperegs) {
-+ iounmap(tp->aperegs);
-+ tp->aperegs = NULL;
-+ }
-+ if (tp->regs) {
-+ iounmap(tp->regs);
-+ tp->regs = NULL;
-+ }
-+#if (LINUX_VERSION_CODE >= 0x20418)
-+ free_netdev(dev);
-+#else
-+ kfree(dev);
-+#endif
-+ pci_release_regions(pdev);
-+ pci_disable_device(pdev);
-+ pci_set_drvdata(pdev, NULL);
-+ }
-+}
-+
-+#undef SIMPLE_DEV_PM_OPS
-+#ifdef SIMPLE_DEV_PM_OPS
-+static int tg3_suspend(struct device *device)
-+#else
-+static int tg3_suspend(struct pci_dev *pdev, pm_message_t state)
-+#endif
-+{
-+#ifdef SIMPLE_DEV_PM_OPS
-+ struct pci_dev *pdev = to_pci_dev(device);
-+#endif
-+ struct net_device *dev = pci_get_drvdata(pdev);
-+ struct tg3 *tp = netdev_priv(dev);
-+ int err = 0;
-+
-+ if (tg3_invalid_pci_state(tp, state))
-+ return -EINVAL;
-+
-+ tg3_pci_save_state(tp);
-+
-+ rtnl_lock();
-+
-+ if (!netif_running(dev))
-+ goto power_down;
-+
-+ tg3_reset_task_cancel(tp);
-+ tg3_phy_stop(tp);
-+ tg3_netif_stop(tp);
-+
-+ tg3_timer_stop(tp);
-+
-+ tg3_full_lock(tp, 1);
-+ tg3_disable_ints(tp);
-+ tg3_full_unlock(tp);
-+
-+ netif_device_detach(dev);
-+
-+ tg3_full_lock(tp, 0);
-+ tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
-+ tg3_flag_clear(tp, INIT_COMPLETE);
-+ tg3_full_unlock(tp);
-+
-+ err = tg3_power_down_prepare(tp);
-+ if (err) {
-+ int err2;
-+
-+ tg3_full_lock(tp, 0);
-+
-+ tg3_flag_set(tp, INIT_COMPLETE);
-+ err2 = tg3_restart_hw(tp, true);
-+ if (err2)
-+ goto out;
-+
-+ tg3_timer_start(tp);
-+
-+ netif_device_attach(dev);
-+ tg3_netif_start(tp);
-+
-+out:
-+ tg3_full_unlock(tp);
-+
-+ if (!err2)
-+ tg3_phy_start(tp);
-+ }
-+
-+power_down:
-+#ifndef SIMPLE_DEV_PM_OPS
-+ if (!err)
-+ tg3_power_down(tp);
-+#endif
-+
-+ rtnl_unlock();
-+ return err;
-+}
-+
-+#ifdef SIMPLE_DEV_PM_OPS
-+static int tg3_resume(struct device *device)
-+#else
-+static int tg3_resume(struct pci_dev *pdev)
-+#endif
-+{
-+#ifdef SIMPLE_DEV_PM_OPS
-+ struct pci_dev *pdev = to_pci_dev(device);
-+#endif
-+ struct net_device *dev = pci_get_drvdata(pdev);
-+ struct tg3 *tp = netdev_priv(dev);
-+ int err = 0;
-+
-+ tg3_pci_restore_state(tp);
-+
-+ rtnl_lock();
-+
-+ if (!netif_running(dev))
-+ goto unlock;
-+
-+ err = tg3_power_up(tp);
-+ if (err)
-+ goto unlock;
-+
-+ tg3_5780_class_intx_workaround(tp);
-+
-+ netif_device_attach(dev);
-+
-+ tg3_ape_driver_state_change(tp, RESET_KIND_INIT);
-+ tg3_full_lock(tp, 0);
-+
-+ tg3_flag_set(tp, INIT_COMPLETE);
-+ err = tg3_restart_hw(tp,
-+ !(tp->phy_flags & TG3_PHYFLG_KEEP_LINK_ON_PWRDN));
-+ if (err)
-+ goto out;
-+
-+ tg3_timer_start(tp);
-+
-+ tg3_netif_start(tp);
-+
-+out:
-+ tg3_full_unlock(tp);
-+
-+ if (!err)
-+ tg3_phy_start(tp);
-+
-+unlock:
-+ rtnl_unlock();
-+ return err;
-+}
-+#ifdef BCM_HAS_PCI_PMOPS_SHUTDOWN
-+#ifdef SIMPLE_DEV_PM_OPS
-+static void tg3_shutdown(struct device *device)
-+#else
-+static void tg3_shutdown(struct pci_dev *pdev)
-+#endif
-+{
-+#ifdef SIMPLE_DEV_PM_OPS
-+ struct pci_dev *pdev = to_pci_dev(device);
-+#endif
-+ struct net_device *dev = pci_get_drvdata(pdev);
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ rtnl_lock();
-+ netif_device_detach(dev);
-+
-+ if (netif_running(dev))
-+#ifdef __VMKLNX__ /* ! BNX2X_UPSTREAM */
-+ if (dev->flags & IFF_UP)
-+#endif
-+ dev_close(dev);
-+
-+ if (system_state == SYSTEM_POWER_OFF)
-+ tg3_power_down(tp);
-+
-+ rtnl_unlock();
-+}
-+#endif /*BCM_HAS_PCI_PMOPS_SHUTDOWN*/
-+
-+#ifdef SIMPLE_DEV_PM_OPS
-+#ifdef CONFIG_PM_SLEEP
-+static SIMPLE_DEV_PM_OPS(tg3_pm_ops, tg3_suspend, tg3_resume);
-+#define TG3_PM_OPS (&tg3_pm_ops)
-+
-+#else
-+
-+#define TG3_PM_OPS NULL
-+
-+#endif /* CONFIG_PM_SLEEP */
-+#endif
-+
-+#ifdef BCM_HAS_PCI_EEH_SUPPORT
-+/**
-+ * tg3_io_error_detected - called when PCI error is detected
-+ * @pdev: Pointer to PCI device
-+ * @state: The current pci connection state
-+ *
-+ * This function is called after a PCI bus error affecting
-+ * this device has been detected.
-+ */
-+static pci_ers_result_t tg3_io_error_detected(struct pci_dev *pdev,
-+ pci_channel_state_t state)
-+{
-+ struct net_device *netdev = pci_get_drvdata(pdev);
-+ struct tg3 *tp = netdev_priv(netdev);
-+ pci_ers_result_t err = PCI_ERS_RESULT_NEED_RESET;
-+
-+ netdev_info(netdev, "PCI I/O error detected\n");
-+
-+ rtnl_lock();
-+
-+ /* We probably don't have netdev yet */
-+ if (!netdev || !netif_running(netdev))
-+ goto done;
-+
-+ tg3_phy_stop(tp);
-+
-+ tg3_netif_stop(tp);
-+
-+ tg3_timer_stop(tp);
-+
-+ /* Want to make sure that the reset task doesn't run */
-+ tg3_reset_task_cancel(tp);
-+
-+ netif_device_detach(netdev);
-+
-+ /* Clean up software state, even if MMIO is blocked */
-+ tg3_full_lock(tp, 0);
-+ tg3_halt(tp, RESET_KIND_SHUTDOWN, 0);
-+ tg3_full_unlock(tp);
-+
-+done:
-+ if (state == pci_channel_io_perm_failure) {
-+ if (netdev) {
-+ tg3_napi_enable(tp);
-+ dev_close(netdev);
-+ }
-+ err = PCI_ERS_RESULT_DISCONNECT;
-+ } else {
-+ pci_disable_device(pdev);
-+ }
-+
-+ rtnl_unlock();
-+
-+ return err;
-+}
-+
-+/**
-+ * tg3_io_slot_reset - called after the pci bus has been reset.
-+ * @pdev: Pointer to PCI device
-+ *
-+ * Restart the card from scratch, as if from a cold-boot.
-+ * At this point, the card has exprienced a hard reset,
-+ * followed by fixups by BIOS, and has its config space
-+ * set up identically to what it was at cold boot.
-+ */
-+static pci_ers_result_t tg3_io_slot_reset(struct pci_dev *pdev)
-+{
-+ struct net_device *netdev = pci_get_drvdata(pdev);
-+ struct tg3 *tp = netdev_priv(netdev);
-+ pci_ers_result_t rc = PCI_ERS_RESULT_DISCONNECT;
-+ int err;
-+
-+ rtnl_lock();
-+
-+ if (pci_enable_device(pdev)) {
-+ dev_err(&pdev->dev,
-+ "Cannot re-enable PCI device after reset.\n");
-+ goto done;
-+ }
-+
-+ pci_set_master(pdev);
-+ pci_restore_state(pdev);
-+ pci_save_state(pdev);
-+
-+ if (!netdev || !netif_running(netdev)) {
-+ rc = PCI_ERS_RESULT_RECOVERED;
-+ goto done;
-+ }
-+
-+ err = tg3_power_up(tp);
-+ if (err)
-+ goto done;
-+
-+ rc = PCI_ERS_RESULT_RECOVERED;
-+
-+done:
-+ if (rc != PCI_ERS_RESULT_RECOVERED && netdev && netif_running(netdev)) {
-+ tg3_napi_enable(tp);
-+ dev_close(netdev);
-+ }
-+ rtnl_unlock();
-+
-+ return rc;
-+}
-+
-+/**
-+ * tg3_io_resume - called when traffic can start flowing again.
-+ * @pdev: Pointer to PCI device
-+ *
-+ * This callback is called when the error recovery driver tells
-+ * us that its OK to resume normal operation.
-+ */
-+static void tg3_io_resume(struct pci_dev *pdev)
-+{
-+ struct net_device *netdev = pci_get_drvdata(pdev);
-+ struct tg3 *tp = netdev_priv(netdev);
-+ int err;
-+
-+ rtnl_lock();
-+
-+ if (!netif_running(netdev))
-+ goto done;
-+
-+ tg3_ape_driver_state_change(tp, RESET_KIND_INIT);
-+ tg3_full_lock(tp, 0);
-+ tg3_flag_set(tp, INIT_COMPLETE);
-+ err = tg3_restart_hw(tp, true);
-+ if (err) {
-+ tg3_full_unlock(tp);
-+ netdev_err(netdev, "Cannot restart hardware after reset.\n");
-+ goto done;
-+ }
-+
-+ netif_device_attach(netdev);
-+
-+ tg3_timer_start(tp);
-+
-+ tg3_netif_start(tp);
-+
-+ tg3_full_unlock(tp);
-+
-+ tg3_phy_start(tp);
-+
-+done:
-+ rtnl_unlock();
-+}
-+
-+static struct pci_error_handlers tg3_err_handler = {
-+ .error_detected = tg3_io_error_detected,
-+ .slot_reset = tg3_io_slot_reset,
-+ .resume = tg3_io_resume
-+};
-+#endif /* BCM_HAS_PCI_EEH_SUPPORT */
-+
-+static struct pci_driver tg3_driver = {
-+ .name = DRV_MODULE_NAME,
-+ .id_table = tg3_pci_tbl,
-+ .probe = tg3_init_one,
-+ .remove = __devexit_p(tg3_remove_one),
-+#ifdef BCM_HAS_PCI_EEH_SUPPORT
-+ .err_handler = &tg3_err_handler,
-+#endif
-+#ifdef SIMPLE_DEV_PM_OPS
-+ .driver.pm = TG3_PM_OPS,
-+#else
-+ .suspend = tg3_suspend,
-+ .resume = tg3_resume,
-+#endif
-+#ifdef BCM_HAS_PCI_PMOPS_SHUTDOWN
-+ .shutdown = tg3_shutdown,
-+#endif
-+};
-+
-+static int __init tg3_init(void)
-+{
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ int i;
-+ for (i = 0; i < TG3_MAX_NIC; i++) {
-+ if (tg3_netq_force[i] < TG3_OPTION_UNSET ||
-+ tg3_netq_force[i] >= TG3_IRQ_MAX_VECS_IOV) {
-+ dev_err(&pdev->dev,
-+ "Invalid force_netq module parameter "
-+ "value for index %d (%d)\n",
-+ i, tg3_netq_force[i]);
-+ return -EINVAL;
-+ }
-+ }
-+#endif
-+#if (LINUX_VERSION_CODE < 0x020613) && !defined (__VMKLNX__)
-+ return pci_module_init(&tg3_driver);
-+#else
-+#if defined(__VMKLNX__) && (VMWARE_ESX_DDK_VERSION >= 55000)
-+ if (!disable_fw_dmp) {
-+ VMK_ReturnStatus status;
-+ tg3_fwdmp_va_ptr = kzalloc(TG3_FWDMP_SIZE, GFP_KERNEL);
-+
-+ if (!tg3_fwdmp_va_ptr)
-+ dev_err(&pdev->dev,
-+ "tg3: Unable to allocate memory "
-+ "for fw dump handler!\n");
-+ status = vmklnx_dump_add_callback(TG3_DUMPNAME,
-+ tg3_fwdmp_callback,
-+ NULL,
-+ TG3_DUMPNAME,
-+ &tg3_fwdmp_dh);
-+ if (status != VMK_OK)
-+ dev_err(&pdev->dev, "tg3: Unable to register fw "
-+ "dump handler (rc = 0x%x!)\n", status);
-+ }
-+#endif /*defined(__VMKLNX__) && (VMWARE_ESX_DDK_VERSION >= 55000) */
-+
-+ return pci_register_driver(&tg3_driver);
-+#endif
-+}
-+
-+static void __exit tg3_cleanup(void)
-+{
-+#if (defined(__VMKLNX__) && VMWARE_ESX_DDK_VERSION >= 55000)
-+ if (tg3_fwdmp_dh) {
-+ VMK_ReturnStatus status =
-+ vmklnx_dump_delete_callback(tg3_fwdmp_dh);
-+ if (status != VMK_OK)
-+ VMK_ASSERT(0);
-+ }
-+ kfree(tg3_fwdmp_va_ptr);
-+ tg3_fwdmp_va_ptr = NULL;
-+#endif /* defined(__VMKLNX__) && (VMWARE_ESX_DDK_VERSION >= 55000) */
-+ pci_unregister_driver(&tg3_driver);
-+}
-+
-+#if defined(__VMKLNX__)
-+#include "tg3_vmware.c"
-+#endif
-+
-+module_init(tg3_init);
-+module_exit(tg3_cleanup);
-diff --git a/drivers/net/ethernet/broadcom/tg3/tg3.h b/drivers/net/ethernet/broadcom/tg3/tg3.h
-new file mode 100644
-index 0000000..0dd1a61
---- /dev/null
-+++ b/drivers/net/ethernet/broadcom/tg3/tg3.h
-@@ -0,0 +1,3596 @@
-+/* $Id$
-+ * tg3.h: Definitions for Broadcom Tigon3 ethernet driver.
-+ *
-+ * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com)
-+ * Copyright (C) 2001 Jeff Garzik (jgarzik@pobox.com)
-+ * Copyright (C) 2004 Sun Microsystems Inc.
-+ * Copyright (C) 2007-2015 Broadcom Corporation.
-+ */
-+
-+#ifndef _T3_H
-+#define _T3_H
-+
-+#include "tg3_compat.h"
-+
-+#define TG3_64BIT_REG_HIGH 0x00UL
-+#define TG3_64BIT_REG_LOW 0x04UL
-+
-+/* Descriptor block info. */
-+#define TG3_BDINFO_HOST_ADDR 0x0UL /* 64-bit */
-+#define TG3_BDINFO_MAXLEN_FLAGS 0x8UL /* 32-bit */
-+#define BDINFO_FLAGS_USE_EXT_RECV 0x00000001 /* ext rx_buffer_desc */
-+#define BDINFO_FLAGS_DISABLED 0x00000002
-+#define BDINFO_FLAGS_MAXLEN_MASK 0xffff0000
-+#define BDINFO_FLAGS_MAXLEN_SHIFT 16
-+#define TG3_BDINFO_NIC_ADDR 0xcUL /* 32-bit */
-+#define TG3_BDINFO_SIZE 0x10UL
-+
-+#define TG3_RX_STD_MAX_SIZE_5700 512
-+#define TG3_RX_STD_MAX_SIZE_5717 2048
-+#define TG3_RX_JMB_MAX_SIZE_5700 256
-+#define TG3_RX_JMB_MAX_SIZE_5717 1024
-+#define TG3_RX_RET_MAX_SIZE_5700 1024
-+#define TG3_RX_RET_MAX_SIZE_5705 512
-+#define TG3_RX_RET_MAX_SIZE_5717 4096
-+
-+#define TG3_RSS_INDIR_TBL_SIZE 128
-+
-+/* First 256 bytes are a mirror of PCI config space. */
-+#define TG3PCI_VENDOR 0x00000000
-+#define TG3PCI_VENDOR_BROADCOM 0x14e4
-+#define TG3PCI_DEVICE 0x00000002
-+#define TG3PCI_DEVICE_TIGON3_1 0x1644 /* BCM5700 */
-+#define TG3PCI_DEVICE_TIGON3_2 0x1645 /* BCM5701 */
-+#define TG3PCI_DEVICE_TIGON3_3 0x1646 /* BCM5702 */
-+#define TG3PCI_DEVICE_TIGON3_4 0x1647 /* BCM5703 */
-+#define TG3PCI_DEVICE_TIGON3_5761S 0x1688
-+#define TG3PCI_DEVICE_TIGON3_5761SE 0x1689
-+#define TG3PCI_DEVICE_TIGON3_57780 0x1692
-+#define TG3PCI_DEVICE_TIGON3_5787M 0x1693
-+#define TG3PCI_DEVICE_TIGON3_57760 0x1690
-+#define TG3PCI_DEVICE_TIGON3_57790 0x1694
-+#define TG3PCI_DEVICE_TIGON3_57788 0x1691
-+#define TG3PCI_DEVICE_TIGON3_5785_G 0x1699 /* GPHY */
-+#define TG3PCI_DEVICE_TIGON3_5785_F 0x16a0 /* 10/100 only */
-+#define TG3PCI_DEVICE_TIGON3_5717 0x1655
-+#define TG3PCI_DEVICE_TIGON3_5717_C 0x1665
-+#define TG3PCI_DEVICE_TIGON3_5718 0x1656
-+#define TG3PCI_DEVICE_TIGON3_57781 0x16b1
-+#define TG3PCI_DEVICE_TIGON3_57785 0x16b5
-+#define TG3PCI_DEVICE_TIGON3_57761 0x16b0
-+#define TG3PCI_DEVICE_TIGON3_57765 0x16b4
-+#define TG3PCI_DEVICE_TIGON3_57791 0x16b2
-+#define TG3PCI_DEVICE_TIGON3_57795 0x16b6
-+#define TG3PCI_DEVICE_TIGON3_5719 0x1657
-+#define TG3PCI_DEVICE_TIGON3_5720 0x165f
-+#define TG3PCI_DEVICE_TIGON3_57762 0x1682
-+#define TG3PCI_DEVICE_TIGON3_57766 0x1686
-+#define TG3PCI_DEVICE_TIGON3_57786 0x16b3
-+#define TG3PCI_DEVICE_TIGON3_57782 0x16b7
-+#define TG3PCI_DEVICE_TIGON3_5762 0x1687
-+#define TG3PCI_DEVICE_TIGON3_5725 0x1643
-+#define TG3PCI_DEVICE_TIGON3_5727 0x16f3
-+#define TG3PCI_DEVICE_TIGON3_57764 0x1642
-+#define TG3PCI_DEVICE_TIGON3_57767 0x1683
-+#define TG3PCI_DEVICE_TIGON3_57787 0x1641
-+/* 0x04 --> 0x2c unused */
-+#define TG3PCI_SUBVENDOR_ID_BROADCOM PCI_VENDOR_ID_BROADCOM
-+#define TG3PCI_SUBDEVICE_ID_BROADCOM_95700A6 0x1644
-+#define TG3PCI_SUBDEVICE_ID_BROADCOM_95701A5 0x0001
-+#define TG3PCI_SUBDEVICE_ID_BROADCOM_95700T6 0x0002
-+#define TG3PCI_SUBDEVICE_ID_BROADCOM_95700A9 0x0003
-+#define TG3PCI_SUBDEVICE_ID_BROADCOM_95701T1 0x0005
-+#define TG3PCI_SUBDEVICE_ID_BROADCOM_95701T8 0x0006
-+#define TG3PCI_SUBDEVICE_ID_BROADCOM_95701A7 0x0007
-+#define TG3PCI_SUBDEVICE_ID_BROADCOM_95701A10 0x0008
-+#define TG3PCI_SUBDEVICE_ID_BROADCOM_95701A12 0x8008
-+#define TG3PCI_SUBDEVICE_ID_BROADCOM_95703AX1 0x0009
-+#define TG3PCI_SUBDEVICE_ID_BROADCOM_95703AX2 0x8009
-+#define TG3PCI_SUBVENDOR_ID_3COM PCI_VENDOR_ID_3COM
-+#define TG3PCI_SUBDEVICE_ID_3COM_3C996T 0x1000
-+#define TG3PCI_SUBDEVICE_ID_3COM_3C996BT 0x1006
-+#define TG3PCI_SUBDEVICE_ID_3COM_3C996SX 0x1004
-+#define TG3PCI_SUBDEVICE_ID_3COM_3C1000T 0x1007
-+#define TG3PCI_SUBDEVICE_ID_3COM_3C940BR01 0x1008
-+#define TG3PCI_SUBVENDOR_ID_DELL PCI_VENDOR_ID_DELL
-+#define TG3PCI_SUBDEVICE_ID_DELL_VIPER 0x00d1
-+#define TG3PCI_SUBDEVICE_ID_DELL_JAGUAR 0x0106
-+#define TG3PCI_SUBDEVICE_ID_DELL_MERLOT 0x0109
-+#define TG3PCI_SUBDEVICE_ID_DELL_SLIM_MERLOT 0x010a
-+#define TG3PCI_SUBVENDOR_ID_COMPAQ PCI_VENDOR_ID_COMPAQ
-+#define TG3PCI_SUBDEVICE_ID_COMPAQ_BANSHEE 0x007c
-+#define TG3PCI_SUBDEVICE_ID_COMPAQ_BANSHEE_2 0x009a
-+#define TG3PCI_SUBDEVICE_ID_COMPAQ_CHANGELING 0x007d
-+#define TG3PCI_SUBDEVICE_ID_COMPAQ_NC7780 0x0085
-+#define TG3PCI_SUBDEVICE_ID_COMPAQ_NC7780_2 0x0099
-+#define TG3PCI_SUBVENDOR_ID_IBM PCI_VENDOR_ID_IBM
-+#define TG3PCI_SUBDEVICE_ID_IBM_5703SAX2 0x0281
-+#define TG3PCI_SUBDEVICE_ID_ACER_57780_A 0x0601
-+#define TG3PCI_SUBDEVICE_ID_ACER_57780_B 0x0612
-+#define TG3PCI_SUBDEVICE_ID_LENOVO_5787M 0x3056
-+
-+/* 0x30 --> 0x64 unused */
-+#define TG3PCI_MSI_DATA 0x00000064
-+/* 0x66 --> 0x68 unused */
-+#define TG3PCI_MISC_HOST_CTRL 0x00000068
-+#define MISC_HOST_CTRL_CLEAR_INT 0x00000001
-+#define MISC_HOST_CTRL_MASK_PCI_INT 0x00000002
-+#define MISC_HOST_CTRL_BYTE_SWAP 0x00000004
-+#define MISC_HOST_CTRL_WORD_SWAP 0x00000008
-+#define MISC_HOST_CTRL_PCISTATE_RW 0x00000010
-+#define MISC_HOST_CTRL_CLKREG_RW 0x00000020
-+#define MISC_HOST_CTRL_REGWORD_SWAP 0x00000040
-+#define MISC_HOST_CTRL_INDIR_ACCESS 0x00000080
-+#define MISC_HOST_CTRL_IRQ_MASK_MODE 0x00000100
-+#define MISC_HOST_CTRL_TAGGED_STATUS 0x00000200
-+#define MISC_HOST_CTRL_CHIPREV 0xffff0000
-+#define MISC_HOST_CTRL_CHIPREV_SHIFT 16
-+
-+#define CHIPREV_ID_5700_A0 0x7000
-+#define CHIPREV_ID_5700_A1 0x7001
-+#define CHIPREV_ID_5700_B0 0x7100
-+#define CHIPREV_ID_5700_B1 0x7101
-+#define CHIPREV_ID_5700_B3 0x7102
-+#define CHIPREV_ID_5700_ALTIMA 0x7104
-+#define CHIPREV_ID_5700_C0 0x7200
-+#define CHIPREV_ID_5701_A0 0x0000
-+#define CHIPREV_ID_5701_B0 0x0100
-+#define CHIPREV_ID_5701_B2 0x0102
-+#define CHIPREV_ID_5701_B5 0x0105
-+#define CHIPREV_ID_5703_A0 0x1000
-+#define CHIPREV_ID_5703_A1 0x1001
-+#define CHIPREV_ID_5703_A2 0x1002
-+#define CHIPREV_ID_5703_A3 0x1003
-+#define CHIPREV_ID_5704_A0 0x2000
-+#define CHIPREV_ID_5704_A1 0x2001
-+#define CHIPREV_ID_5704_A2 0x2002
-+#define CHIPREV_ID_5704_A3 0x2003
-+#define CHIPREV_ID_5705_A0 0x3000
-+#define CHIPREV_ID_5705_A1 0x3001
-+#define CHIPREV_ID_5705_A2 0x3002
-+#define CHIPREV_ID_5705_A3 0x3003
-+#define CHIPREV_ID_5750_A0 0x4000
-+#define CHIPREV_ID_5750_A1 0x4001
-+#define CHIPREV_ID_5750_A3 0x4003
-+#define CHIPREV_ID_5750_C2 0x4202
-+#define CHIPREV_ID_5752_A0_HW 0x5000
-+#define CHIPREV_ID_5752_A0 0x6000
-+#define CHIPREV_ID_5752_A1 0x6001
-+#define CHIPREV_ID_5714_A2 0x9002
-+#define CHIPREV_ID_5906_A1 0xc001
-+#define CHIPREV_ID_57780_A0 0x57780000
-+#define CHIPREV_ID_57780_A1 0x57780001
-+#define CHIPREV_ID_5717_A0 0x05717000
-+#define CHIPREV_ID_5717_C0 0x05717200
-+#define CHIPREV_ID_57765_A0 0x57785000
-+#define CHIPREV_ID_5719_A0 0x05719000
-+#define CHIPREV_ID_5720_A0 0x05720000
-+#define CHIPREV_ID_5762_A0 0x05762000
-+
-+#define ASIC_REV_5700 0x07
-+#define ASIC_REV_5701 0x00
-+#define ASIC_REV_5703 0x01
-+#define ASIC_REV_5704 0x02
-+#define ASIC_REV_5705 0x03
-+#define ASIC_REV_5750 0x04
-+#define ASIC_REV_5752 0x06
-+#define ASIC_REV_5780 0x08
-+#define ASIC_REV_5714 0x09
-+#define ASIC_REV_5755 0x0a
-+#define ASIC_REV_5787 0x0b
-+#define ASIC_REV_5906 0x0c
-+#define ASIC_REV_USE_PROD_ID_REG 0x0f
-+#define ASIC_REV_5784 0x5784
-+#define ASIC_REV_5761 0x5761
-+#define ASIC_REV_5785 0x5785
-+#define ASIC_REV_57780 0x57780
-+#define ASIC_REV_5717 0x5717
-+#define ASIC_REV_57765 0x57785
-+#define ASIC_REV_5719 0x5719
-+#define ASIC_REV_5720 0x5720
-+#define ASIC_REV_57766 0x57766
-+#define ASIC_REV_5762 0x5762
-+#define CHIPREV_5700_AX 0x70
-+#define CHIPREV_5700_BX 0x71
-+#define CHIPREV_5700_CX 0x72
-+#define CHIPREV_5701_AX 0x00
-+#define CHIPREV_5703_AX 0x10
-+#define CHIPREV_5704_AX 0x20
-+#define CHIPREV_5704_BX 0x21
-+#define CHIPREV_5750_AX 0x40
-+#define CHIPREV_5750_BX 0x41
-+#define CHIPREV_5784_AX 0x57840
-+#define CHIPREV_5761_AX 0x57610
-+#define CHIPREV_57765_AX 0x577650
-+#define METAL_REV_A0 0x00
-+#define METAL_REV_A1 0x01
-+#define METAL_REV_B0 0x00
-+#define METAL_REV_B1 0x01
-+#define METAL_REV_B2 0x02
-+#define TG3PCI_DMA_RW_CTRL 0x0000006c
-+#define DMA_RWCTRL_DIS_CACHE_ALIGNMENT 0x00000001
-+#define DMA_RWCTRL_TAGGED_STAT_WA 0x00000080
-+#define DMA_RWCTRL_CRDRDR_RDMA_MRRS_MSK 0x00000380
-+#define DMA_RWCTRL_READ_BNDRY_MASK 0x00000700
-+#define DMA_RWCTRL_READ_BNDRY_DISAB 0x00000000
-+#define DMA_RWCTRL_READ_BNDRY_16 0x00000100
-+#define DMA_RWCTRL_READ_BNDRY_128_PCIX 0x00000100
-+#define DMA_RWCTRL_READ_BNDRY_32 0x00000200
-+#define DMA_RWCTRL_READ_BNDRY_256_PCIX 0x00000200
-+#define DMA_RWCTRL_READ_BNDRY_64 0x00000300
-+#define DMA_RWCTRL_READ_BNDRY_384_PCIX 0x00000300
-+#define DMA_RWCTRL_READ_BNDRY_128 0x00000400
-+#define DMA_RWCTRL_READ_BNDRY_256 0x00000500
-+#define DMA_RWCTRL_READ_BNDRY_512 0x00000600
-+#define DMA_RWCTRL_READ_BNDRY_1024 0x00000700
-+#define DMA_RWCTRL_WRITE_BNDRY_MASK 0x00003800
-+#define DMA_RWCTRL_WRITE_BNDRY_DISAB 0x00000000
-+#define DMA_RWCTRL_WRITE_BNDRY_16 0x00000800
-+#define DMA_RWCTRL_WRITE_BNDRY_128_PCIX 0x00000800
-+#define DMA_RWCTRL_WRITE_BNDRY_32 0x00001000
-+#define DMA_RWCTRL_WRITE_BNDRY_256_PCIX 0x00001000
-+#define DMA_RWCTRL_WRITE_BNDRY_64 0x00001800
-+#define DMA_RWCTRL_WRITE_BNDRY_384_PCIX 0x00001800
-+#define DMA_RWCTRL_WRITE_BNDRY_128 0x00002000
-+#define DMA_RWCTRL_WRITE_BNDRY_256 0x00002800
-+#define DMA_RWCTRL_WRITE_BNDRY_512 0x00003000
-+#define DMA_RWCTRL_WRITE_BNDRY_1024 0x00003800
-+#define DMA_RWCTRL_ONE_DMA 0x00004000
-+#define DMA_RWCTRL_READ_WATER 0x00070000
-+#define DMA_RWCTRL_READ_WATER_SHIFT 16
-+#define DMA_RWCTRL_WRITE_WATER 0x00380000
-+#define DMA_RWCTRL_WRITE_WATER_SHIFT 19
-+#define DMA_RWCTRL_USE_MEM_READ_MULT 0x00400000
-+#define DMA_RWCTRL_ASSERT_ALL_BE 0x00800000
-+#define DMA_RWCTRL_PCI_READ_CMD 0x0f000000
-+#define DMA_RWCTRL_PCI_READ_CMD_SHIFT 24
-+#define DMA_RWCTRL_PCI_WRITE_CMD 0xf0000000
-+#define DMA_RWCTRL_PCI_WRITE_CMD_SHIFT 28
-+#define DMA_RWCTRL_WRITE_BNDRY_64_PCIE 0x10000000
-+#define DMA_RWCTRL_WRITE_BNDRY_128_PCIE 0x30000000
-+#define DMA_RWCTRL_WRITE_BNDRY_DISAB_PCIE 0x70000000
-+#define TG3PCI_PCISTATE 0x00000070
-+#define PCISTATE_FORCE_RESET 0x00000001
-+#define PCISTATE_INT_NOT_ACTIVE 0x00000002
-+#define PCISTATE_CONV_PCI_MODE 0x00000004
-+#define PCISTATE_BUS_SPEED_HIGH 0x00000008
-+#define PCISTATE_BUS_32BIT 0x00000010
-+#define PCISTATE_ROM_ENABLE 0x00000020
-+#define PCISTATE_ROM_RETRY_ENABLE 0x00000040
-+#define PCISTATE_FLAT_VIEW 0x00000100
-+#define PCISTATE_RETRY_SAME_DMA 0x00002000
-+#define PCISTATE_ALLOW_APE_CTLSPC_WR 0x00010000
-+#define PCISTATE_ALLOW_APE_SHMEM_WR 0x00020000
-+#define PCISTATE_ALLOW_APE_PSPACE_WR 0x00040000
-+#define TG3PCI_CLOCK_CTRL 0x00000074
-+#define CLOCK_CTRL_CORECLK_DISABLE 0x00000200
-+#define CLOCK_CTRL_RXCLK_DISABLE 0x00000400
-+#define CLOCK_CTRL_TXCLK_DISABLE 0x00000800
-+#define CLOCK_CTRL_ALTCLK 0x00001000
-+#define CLOCK_CTRL_PWRDOWN_PLL133 0x00008000
-+#define CLOCK_CTRL_44MHZ_CORE 0x00040000
-+#define CLOCK_CTRL_625_CORE 0x00100000
-+#define CLOCK_CTRL_FORCE_CLKRUN 0x00200000
-+#define CLOCK_CTRL_CLKRUN_OENABLE 0x00400000
-+#define CLOCK_CTRL_DELAY_PCI_GRANT 0x80000000
-+#define TG3PCI_REG_BASE_ADDR 0x00000078
-+#define TG3PCI_MEM_WIN_BASE_ADDR 0x0000007c
-+#define TG3PCI_REG_DATA 0x00000080
-+#define TG3PCI_MEM_WIN_DATA 0x00000084
-+#define TG3PCI_MISC_LOCAL_CTRL 0x00000090
-+/* 0x94 --> 0x98 unused */
-+#define TG3PCI_STD_RING_PROD_IDX 0x00000098 /* 64-bit */
-+#define TG3PCI_RCV_RET_RING_CON_IDX 0x000000a0 /* 64-bit */
-+/* 0xa8 --> 0xb8 unused */
-+#define TG3PCI_DUAL_MAC_CTRL 0x000000b8
-+#define DUAL_MAC_CTRL_CH_MASK 0x00000003
-+#define DUAL_MAC_CTRL_ID 0x00000004
-+#define TG3PCI_PRODID_ASICREV 0x000000bc
-+#define PROD_ID_ASIC_REV_MASK 0x0fffffff
-+/* 0xc0 --> 0xf4 unused */
-+
-+#define TG3PCI_GEN2_PRODID_ASICREV 0x000000f4
-+#define TG3PCI_GEN15_PRODID_ASICREV 0x000000fc
-+/* 0xf8 --> 0x200 unused */
-+
-+#define TG3_CORR_ERR_STAT 0x00000110
-+#define TG3_CORR_ERR_STAT_CLEAR 0xffffffff
-+/* 0x114 --> 0x200 unused */
-+
-+/* Mailbox registers */
-+#define MAILBOX_INTERRUPT_0 0x00000200 /* 64-bit */
-+#define MAILBOX_INTERRUPT_1 0x00000208 /* 64-bit */
-+#define MAILBOX_INTERRUPT_2 0x00000210 /* 64-bit */
-+#define MAILBOX_INTERRUPT_3 0x00000218 /* 64-bit */
-+#define MAILBOX_GENERAL_0 0x00000220 /* 64-bit */
-+#define MAILBOX_GENERAL_1 0x00000228 /* 64-bit */
-+#define MAILBOX_GENERAL_2 0x00000230 /* 64-bit */
-+#define MAILBOX_GENERAL_3 0x00000238 /* 64-bit */
-+#define MAILBOX_GENERAL_4 0x00000240 /* 64-bit */
-+#define MAILBOX_GENERAL_5 0x00000248 /* 64-bit */
-+#define MAILBOX_GENERAL_6 0x00000250 /* 64-bit */
-+#define MAILBOX_GENERAL_7 0x00000258 /* 64-bit */
-+#define MAILBOX_RELOAD_STAT 0x00000260 /* 64-bit */
-+#define MAILBOX_RCV_STD_PROD_IDX 0x00000268 /* 64-bit */
-+#define TG3_RX_STD_PROD_IDX_REG (MAILBOX_RCV_STD_PROD_IDX + \
-+ TG3_64BIT_REG_LOW)
-+#define MAILBOX_RCV_JUMBO_PROD_IDX 0x00000270 /* 64-bit */
-+#define TG3_RX_JMB_PROD_IDX_REG (MAILBOX_RCV_JUMBO_PROD_IDX + \
-+ TG3_64BIT_REG_LOW)
-+#define MAILBOX_RCV_MINI_PROD_IDX 0x00000278 /* 64-bit */
-+#define MAILBOX_RCVRET_CON_IDX_0 0x00000280 /* 64-bit */
-+#define MAILBOX_RCVRET_CON_IDX_1 0x00000288 /* 64-bit */
-+#define MAILBOX_RCVRET_CON_IDX_2 0x00000290 /* 64-bit */
-+#define MAILBOX_RCVRET_CON_IDX_3 0x00000298 /* 64-bit */
-+#define MAILBOX_RCVRET_CON_IDX_4 0x000002a0 /* 64-bit */
-+#define MAILBOX_RCVRET_CON_IDX_5 0x000002a8 /* 64-bit */
-+#define MAILBOX_RCVRET_CON_IDX_6 0x000002b0 /* 64-bit */
-+#define MAILBOX_RCVRET_CON_IDX_7 0x000002b8 /* 64-bit */
-+#define MAILBOX_RCVRET_CON_IDX_8 0x000002c0 /* 64-bit */
-+#define MAILBOX_RCVRET_CON_IDX_9 0x000002c8 /* 64-bit */
-+#define MAILBOX_RCVRET_CON_IDX_10 0x000002d0 /* 64-bit */
-+#define MAILBOX_RCV_JUMBO_PROD_IDX_RING1 0x000002d4 /* 32-bit */
-+#define MAILBOX_RCVRET_CON_IDX_11 0x000002d8 /* 64-bit */
-+#define MAILBOX_RCVRET_CON_IDX_12 0x000002e0 /* 64-bit */
-+#define MAILBOX_RCVRET_CON_IDX_13 0x000002e8 /* 64-bit */
-+#define MAILBOX_RCVRET_CON_IDX_14 0x000002f0 /* 64-bit */
-+#define MAILBOX_RCVRET_CON_IDX_15 0x000002f8 /* 64-bit */
-+#define MAILBOX_SNDHOST_PROD_IDX_0 0x00000300 /* 64-bit */
-+#define MAILBOX_SNDHOST_PROD_IDX_1 0x00000308 /* 64-bit */
-+#define MAILBOX_SNDHOST_PROD_IDX_2 0x00000310 /* 64-bit */
-+#define MAILBOX_SNDHOST_PROD_IDX_3 0x00000318 /* 64-bit */
-+#define MAILBOX_SNDHOST_PROD_IDX_4 0x00000320 /* 64-bit */
-+#define MAILBOX_SNDHOST_PROD_IDX_5 0x00000328 /* 64-bit */
-+#define MAILBOX_SNDHOST_PROD_IDX_6 0x00000330 /* 64-bit */
-+#define MAILBOX_SNDHOST_PROD_IDX_7 0x00000338 /* 64-bit */
-+#define MAILBOX_SNDHOST_PROD_IDX_8 0x00000340 /* 64-bit */
-+#define MAILBOX_RCV_JMB_PROD_IDX_RING12 0x00000340 /* 32-bit */
-+#define MAILBOX_SNDHOST_PROD_IDX_9 0x00000348 /* 64-bit */
-+#define MAILBOX_SNDHOST_PROD_IDX_10 0x00000350 /* 64-bit */
-+#define MAILBOX_RCV_STD_PROD_IDX_RING1 0x00000354 /* 32-bit */
-+#define MAILBOX_SNDHOST_PROD_IDX_11 0x00000358 /* 64-bit */
-+#define MAILBOX_SNDHOST_PROD_IDX_12 0x00000360 /* 64-bit */
-+#define MAILBOX_SNDHOST_PROD_IDX_13 0x00000368 /* 64-bit */
-+#define MAILBOX_SNDHOST_PROD_IDX_14 0x00000370 /* 64-bit */
-+#define MAILBOX_SNDHOST_PROD_IDX_15 0x00000378 /* 64-bit */
-+#define MAILBOX_SNDNIC_PROD_IDX_0 0x00000380 /* 64-bit */
-+#define MAILBOX_SNDNIC_PROD_IDX_1 0x00000388 /* 64-bit */
-+#define MAILBOX_SNDNIC_PROD_IDX_2 0x00000390 /* 64-bit */
-+#define MAILBOX_SNDNIC_PROD_IDX_3 0x00000398 /* 64-bit */
-+#define MAILBOX_SNDNIC_PROD_IDX_4 0x000003a0 /* 64-bit */
-+#define MAILBOX_SNDNIC_PROD_IDX_5 0x000003a8 /* 64-bit */
-+#define MAILBOX_SNDNIC_PROD_IDX_6 0x000003b0 /* 64-bit */
-+#define MAILBOX_SNDNIC_PROD_IDX_7 0x000003b8 /* 64-bit */
-+#define MAILBOX_SNDNIC_PROD_IDX_8 0x000003c0 /* 64-bit */
-+#define MAILBOX_SNDNIC_PROD_IDX_9 0x000003c8 /* 64-bit */
-+#define MAILBOX_SNDNIC_PROD_IDX_10 0x000003d0 /* 64-bit */
-+#define MAILBOX_SNDNIC_PROD_IDX_11 0x000003d8 /* 64-bit */
-+#define MAILBOX_SNDNIC_PROD_IDX_12 0x000003e0 /* 64-bit */
-+#define MAILBOX_SNDNIC_PROD_IDX_13 0x000003e8 /* 64-bit */
-+#define MAILBOX_SNDNIC_PROD_IDX_14 0x000003f0 /* 64-bit */
-+#define MAILBOX_SNDNIC_PROD_IDX_15 0x000003f8 /* 64-bit */
-+
-+/* MAC control registers */
-+#define MAC_MODE 0x00000400
-+#define MAC_MODE_RESET 0x00000001
-+#define MAC_MODE_HALF_DUPLEX 0x00000002
-+#define MAC_MODE_PORT_MODE_MASK 0x0000000c
-+#define MAC_MODE_PORT_MODE_TBI 0x0000000c
-+#define MAC_MODE_PORT_MODE_GMII 0x00000008
-+#define MAC_MODE_PORT_MODE_MII 0x00000004
-+#define MAC_MODE_PORT_MODE_NONE 0x00000000
-+#define MAC_MODE_PORT_INT_LPBACK 0x00000010
-+#define MAC_MODE_TAGGED_MAC_CTRL 0x00000080
-+#define MAC_MODE_TX_BURSTING 0x00000100
-+#define MAC_MODE_MAX_DEFER 0x00000200
-+#define MAC_MODE_LINK_POLARITY 0x00000400
-+#define MAC_MODE_RXSTAT_ENABLE 0x00000800
-+#define MAC_MODE_RXSTAT_CLEAR 0x00001000
-+#define MAC_MODE_RXSTAT_FLUSH 0x00002000
-+#define MAC_MODE_TXSTAT_ENABLE 0x00004000
-+#define MAC_MODE_TXSTAT_CLEAR 0x00008000
-+#define MAC_MODE_TXSTAT_FLUSH 0x00010000
-+#define MAC_MODE_SEND_CONFIGS 0x00020000
-+#define MAC_MODE_MAGIC_PKT_ENABLE 0x00040000
-+#define MAC_MODE_ACPI_ENABLE 0x00080000
-+#define MAC_MODE_MIP_ENABLE 0x00100000
-+#define MAC_MODE_TDE_ENABLE 0x00200000
-+#define MAC_MODE_RDE_ENABLE 0x00400000
-+#define MAC_MODE_FHDE_ENABLE 0x00800000
-+#define MAC_MODE_KEEP_FRAME_IN_WOL 0x01000000
-+#define MAC_MODE_APE_RX_EN 0x08000000
-+#define MAC_MODE_APE_TX_EN 0x10000000
-+#define MAC_STATUS 0x00000404
-+#define MAC_STATUS_PCS_SYNCED 0x00000001
-+#define MAC_STATUS_SIGNAL_DET 0x00000002
-+#define MAC_STATUS_RCVD_CFG 0x00000004
-+#define MAC_STATUS_CFG_CHANGED 0x00000008
-+#define MAC_STATUS_SYNC_CHANGED 0x00000010
-+#define MAC_STATUS_PORT_DEC_ERR 0x00000400
-+#define MAC_STATUS_LNKSTATE_CHANGED 0x00001000
-+#define MAC_STATUS_MI_COMPLETION 0x00400000
-+#define MAC_STATUS_MI_INTERRUPT 0x00800000
-+#define MAC_STATUS_AP_ERROR 0x01000000
-+#define MAC_STATUS_ODI_ERROR 0x02000000
-+#define MAC_STATUS_RXSTAT_OVERRUN 0x04000000
-+#define MAC_STATUS_TXSTAT_OVERRUN 0x08000000
-+#define MAC_EVENT 0x00000408
-+#define MAC_EVENT_PORT_DECODE_ERR 0x00000400
-+#define MAC_EVENT_LNKSTATE_CHANGED 0x00001000
-+#define MAC_EVENT_MI_COMPLETION 0x00400000
-+#define MAC_EVENT_MI_INTERRUPT 0x00800000
-+#define MAC_EVENT_AP_ERROR 0x01000000
-+#define MAC_EVENT_ODI_ERROR 0x02000000
-+#define MAC_EVENT_RXSTAT_OVERRUN 0x04000000
-+#define MAC_EVENT_TXSTAT_OVERRUN 0x08000000
-+#define MAC_LED_CTRL 0x0000040c
-+#define LED_CTRL_LNKLED_OVERRIDE 0x00000001
-+#define LED_CTRL_1000MBPS_ON 0x00000002
-+#define LED_CTRL_100MBPS_ON 0x00000004
-+#define LED_CTRL_10MBPS_ON 0x00000008
-+#define LED_CTRL_TRAFFIC_OVERRIDE 0x00000010
-+#define LED_CTRL_TRAFFIC_BLINK 0x00000020
-+#define LED_CTRL_TRAFFIC_LED 0x00000040
-+#define LED_CTRL_1000MBPS_STATUS 0x00000080
-+#define LED_CTRL_100MBPS_STATUS 0x00000100
-+#define LED_CTRL_10MBPS_STATUS 0x00000200
-+#define LED_CTRL_TRAFFIC_STATUS 0x00000400
-+#define LED_CTRL_MODE_MAC 0x00000000
-+#define LED_CTRL_MODE_PHY_1 0x00000800
-+#define LED_CTRL_MODE_PHY_2 0x00001000
-+#define LED_CTRL_MODE_SHASTA_MAC 0x00002000
-+#define LED_CTRL_MODE_SHARED 0x00004000
-+#define LED_CTRL_MODE_COMBO 0x00008000
-+#define LED_CTRL_BLINK_RATE_MASK 0x7ff80000
-+#define LED_CTRL_BLINK_RATE_SHIFT 19
-+#define LED_CTRL_BLINK_PER_OVERRIDE 0x00080000
-+#define LED_CTRL_BLINK_RATE_OVERRIDE 0x80000000
-+#define MAC_ADDR_0_HIGH 0x00000410 /* upper 2 bytes */
-+#define MAC_ADDR_0_LOW 0x00000414 /* lower 4 bytes */
-+#define MAC_ADDR_1_HIGH 0x00000418 /* upper 2 bytes */
-+#define MAC_ADDR_1_LOW 0x0000041c /* lower 4 bytes */
-+#define MAC_ADDR_2_HIGH 0x00000420 /* upper 2 bytes */
-+#define MAC_ADDR_2_LOW 0x00000424 /* lower 4 bytes */
-+#define MAC_ADDR_3_HIGH 0x00000428 /* upper 2 bytes */
-+#define MAC_ADDR_3_LOW 0x0000042c /* lower 4 bytes */
-+#define MAC_ACPI_MBUF_PTR 0x00000430
-+#define MAC_ACPI_LEN_OFFSET 0x00000434
-+#define ACPI_LENOFF_LEN_MASK 0x0000ffff
-+#define ACPI_LENOFF_LEN_SHIFT 0
-+#define ACPI_LENOFF_OFF_MASK 0x0fff0000
-+#define ACPI_LENOFF_OFF_SHIFT 16
-+#define MAC_TX_BACKOFF_SEED 0x00000438
-+#define TX_BACKOFF_SEED_MASK 0x000003ff
-+#define MAC_RX_MTU_SIZE 0x0000043c
-+#define RX_MTU_SIZE_MASK 0x0000ffff
-+#define MAC_PCS_TEST 0x00000440
-+#define PCS_TEST_PATTERN_MASK 0x000fffff
-+#define PCS_TEST_PATTERN_SHIFT 0
-+#define PCS_TEST_ENABLE 0x00100000
-+#define MAC_TX_AUTO_NEG 0x00000444
-+#define TX_AUTO_NEG_MASK 0x0000ffff
-+#define TX_AUTO_NEG_SHIFT 0
-+#define MAC_RX_AUTO_NEG 0x00000448
-+#define RX_AUTO_NEG_MASK 0x0000ffff
-+#define RX_AUTO_NEG_SHIFT 0
-+#define MAC_MI_COM 0x0000044c
-+#define MI_COM_CMD_MASK 0x0c000000
-+#define MI_COM_CMD_WRITE 0x04000000
-+#define MI_COM_CMD_READ 0x08000000
-+#define MI_COM_READ_FAILED 0x10000000
-+#define MI_COM_START 0x20000000
-+#define MI_COM_BUSY 0x20000000
-+#define MI_COM_PHY_ADDR_MASK 0x03e00000
-+#define MI_COM_PHY_ADDR_SHIFT 21
-+#define MI_COM_REG_ADDR_MASK 0x001f0000
-+#define MI_COM_REG_ADDR_SHIFT 16
-+#define MI_COM_DATA_MASK 0x0000ffff
-+#define MAC_MI_STAT 0x00000450
-+#define MAC_MI_STAT_LNKSTAT_ATTN_ENAB 0x00000001
-+#define MAC_MI_STAT_10MBPS_MODE 0x00000002
-+#define MAC_MI_MODE 0x00000454
-+#define MAC_MI_MODE_CLK_10MHZ 0x00000001
-+#define MAC_MI_MODE_SHORT_PREAMBLE 0x00000002
-+#define MAC_MI_MODE_AUTO_POLL 0x00000010
-+#define MAC_MI_MODE_500KHZ_CONST 0x00008000
-+#define MAC_MI_MODE_BASE 0x000c0000 /* XXX magic values XXX */
-+#define MAC_AUTO_POLL_STATUS 0x00000458
-+#define MAC_AUTO_POLL_ERROR 0x00000001
-+#define MAC_TX_MODE 0x0000045c
-+#define TX_MODE_RESET 0x00000001
-+#define TX_MODE_ENABLE 0x00000002
-+#define TX_MODE_FLOW_CTRL_ENABLE 0x00000010
-+#define TX_MODE_BIG_BCKOFF_ENABLE 0x00000020
-+#define TX_MODE_LONG_PAUSE_ENABLE 0x00000040
-+#define TX_MODE_MBUF_LOCKUP_FIX 0x00000100
-+#define TX_MODE_JMB_FRM_LEN 0x00400000
-+#define TX_MODE_CNT_DN_MODE 0x00800000
-+#define MAC_TX_STATUS 0x00000460
-+#define TX_STATUS_XOFFED 0x00000001
-+#define TX_STATUS_SENT_XOFF 0x00000002
-+#define TX_STATUS_SENT_XON 0x00000004
-+#define TX_STATUS_LINK_UP 0x00000008
-+#define TX_STATUS_ODI_UNDERRUN 0x00000010
-+#define TX_STATUS_ODI_OVERRUN 0x00000020
-+#define MAC_TX_LENGTHS 0x00000464
-+#define TX_LENGTHS_SLOT_TIME_MASK 0x000000ff
-+#define TX_LENGTHS_SLOT_TIME_SHIFT 0
-+#define TX_LENGTHS_IPG_MASK 0x00000f00
-+#define TX_LENGTHS_IPG_SHIFT 8
-+#define TX_LENGTHS_IPG_CRS_MASK 0x00003000
-+#define TX_LENGTHS_IPG_CRS_SHIFT 12
-+#define TX_LENGTHS_JMB_FRM_LEN_MSK 0x00ff0000
-+#define TX_LENGTHS_CNT_DWN_VAL_MSK 0xff000000
-+#define MAC_RX_MODE 0x00000468
-+#define RX_MODE_RESET 0x00000001
-+#define RX_MODE_ENABLE 0x00000002
-+#define RX_MODE_FLOW_CTRL_ENABLE 0x00000004
-+#define RX_MODE_KEEP_MAC_CTRL 0x00000008
-+#define RX_MODE_KEEP_PAUSE 0x00000010
-+#define RX_MODE_ACCEPT_OVERSIZED 0x00000020
-+#define RX_MODE_ACCEPT_RUNTS 0x00000040
-+#define RX_MODE_LEN_CHECK 0x00000080
-+#define RX_MODE_PROMISC 0x00000100
-+#define RX_MODE_NO_CRC_CHECK 0x00000200
-+#define RX_MODE_KEEP_VLAN_TAG 0x00000400
-+#define RX_MODE_RSS_IPV4_HASH_EN 0x00010000
-+#define RX_MODE_RSS_TCP_IPV4_HASH_EN 0x00020000
-+#define RX_MODE_RSS_IPV6_HASH_EN 0x00040000
-+#define RX_MODE_RSS_TCP_IPV6_HASH_EN 0x00080000
-+#define RX_MODE_RSS_ITBL_HASH_BITS_7 0x00700000
-+#define RX_MODE_RSS_ENABLE 0x00800000
-+#define RX_MODE_IPV6_CSUM_ENABLE 0x01000000
-+#define RX_MODE_IPV4_FRAG_FIX 0x02000000
-+#define MAC_RX_STATUS 0x0000046c
-+#define RX_STATUS_REMOTE_TX_XOFFED 0x00000001
-+#define RX_STATUS_XOFF_RCVD 0x00000002
-+#define RX_STATUS_XON_RCVD 0x00000004
-+#define MAC_HASH_REG_0 0x00000470
-+#define MAC_HASH_REG_1 0x00000474
-+#define MAC_HASH_REG_2 0x00000478
-+#define MAC_HASH_REG_3 0x0000047c
-+#define MAC_RCV_RULE_0 0x00000480
-+#define MAC_RCV_VALUE_0 0x00000484
-+#define MAC_RCV_RULE_1 0x00000488
-+#define MAC_RCV_VALUE_1 0x0000048c
-+#define MAC_RCV_RULE_2 0x00000490
-+#define MAC_RCV_VALUE_2 0x00000494
-+#define MAC_RCV_RULE_3 0x00000498
-+#define MAC_RCV_VALUE_3 0x0000049c
-+#define MAC_RCV_RULE_4 0x000004a0
-+#define MAC_RCV_VALUE_4 0x000004a4
-+#define MAC_RCV_RULE_5 0x000004a8
-+#define MAC_RCV_VALUE_5 0x000004ac
-+#define MAC_RCV_RULE_6 0x000004b0
-+#define MAC_RCV_VALUE_6 0x000004b4
-+#define MAC_RCV_RULE_7 0x000004b8
-+#define MAC_RCV_VALUE_7 0x000004bc
-+#define MAC_RCV_RULE_8 0x000004c0
-+#define MAC_RCV_VALUE_8 0x000004c4
-+#define MAC_RCV_RULE_9 0x000004c8
-+#define MAC_RCV_VALUE_9 0x000004cc
-+#define MAC_RCV_RULE_10 0x000004d0
-+#define MAC_RCV_VALUE_10 0x000004d4
-+#define MAC_RCV_RULE_11 0x000004d8
-+#define MAC_RCV_VALUE_11 0x000004dc
-+#define MAC_RCV_RULE_12 0x000004e0
-+#define MAC_RCV_VALUE_12 0x000004e4
-+#define MAC_RCV_RULE_13 0x000004e8
-+#define MAC_RCV_VALUE_13 0x000004ec
-+#define MAC_RCV_RULE_14 0x000004f0
-+#define MAC_RCV_VALUE_14 0x000004f4
-+#define MAC_RCV_RULE_15 0x000004f8
-+#define MAC_RCV_VALUE_15 0x000004fc
-+#define RCV_RULE_DISABLE_MASK 0x7fffffff
-+#define MAC_RCV_RULE_CFG 0x00000500
-+#define RCV_RULE_CFG_DEFAULT_CLASS 0x00000008
-+#define MAC_LOW_WMARK_MAX_RX_FRAME 0x00000504
-+/* 0x508 --> 0x520 unused */
-+#define MAC_HASHREGU_0 0x00000520
-+#define MAC_HASHREGU_1 0x00000524
-+#define MAC_HASHREGU_2 0x00000528
-+#define MAC_HASHREGU_3 0x0000052c
-+#define MAC_EXTADDR_0_HIGH 0x00000530
-+#define MAC_EXTADDR_0_LOW 0x00000534
-+#define MAC_EXTADDR_1_HIGH 0x00000538
-+#define MAC_EXTADDR_1_LOW 0x0000053c
-+#define MAC_EXTADDR_2_HIGH 0x00000540
-+#define MAC_EXTADDR_2_LOW 0x00000544
-+#define MAC_EXTADDR_3_HIGH 0x00000548
-+#define MAC_EXTADDR_3_LOW 0x0000054c
-+#define MAC_EXTADDR_4_HIGH 0x00000550
-+#define MAC_EXTADDR_4_LOW 0x00000554
-+#define MAC_EXTADDR_5_HIGH 0x00000558
-+#define MAC_EXTADDR_5_LOW 0x0000055c
-+#define MAC_EXTADDR_6_HIGH 0x00000560
-+#define MAC_VRQ_ENABLE 0x00000560
-+#define MAC_VRQ_ENABLE_DFLT_VRQ 0x00000001
-+#define MAC_EXTADDR_6_LOW 0x00000564
-+#define MAC_EXTADDR_7_HIGH 0x00000568
-+#define MAC_EXTADDR_7_LOW 0x0000056c
-+#define MAC_EXTADDR_8_HIGH 0x00000570
-+#define MAC_EXTADDR_8_LOW 0x00000574
-+#define MAC_EXTADDR_9_HIGH 0x00000578
-+#define MAC_EXTADDR_9_LOW 0x0000057c
-+#define MAC_EXTADDR_10_HIGH 0x00000580
-+#define MAC_EXTADDR_10_LOW 0x00000584
-+#define MAC_EXTADDR_11_HIGH 0x00000588
-+#define MAC_EXTADDR_11_LOW 0x0000058c
-+#define MAC_SERDES_CFG 0x00000590
-+#define MAC_SERDES_CFG_EDGE_SELECT 0x00001000
-+#define MAC_SERDES_STAT 0x00000594
-+/* 0x598 --> 0x5a0 unused */
-+#define MAC_PHYCFG1 0x000005a0
-+#define MAC_PHYCFG1_RGMII_INT 0x00000001
-+#define MAC_PHYCFG1_RXCLK_TO_MASK 0x00001ff0
-+#define MAC_PHYCFG1_RXCLK_TIMEOUT 0x00001000
-+#define MAC_PHYCFG1_TXCLK_TO_MASK 0x01ff0000
-+#define MAC_PHYCFG1_TXCLK_TIMEOUT 0x01000000
-+#define MAC_PHYCFG1_RGMII_EXT_RX_DEC 0x02000000
-+#define MAC_PHYCFG1_RGMII_SND_STAT_EN 0x04000000
-+#define MAC_PHYCFG1_TXC_DRV 0x20000000
-+#define MAC_PHYCFG2 0x000005a4
-+#define MAC_PHYCFG2_INBAND_ENABLE 0x00000001
-+#define MAC_PHYCFG2_EMODE_MASK_MASK 0x000001c0
-+#define MAC_PHYCFG2_EMODE_MASK_AC131 0x000000c0
-+#define MAC_PHYCFG2_EMODE_MASK_50610 0x00000100
-+#define MAC_PHYCFG2_EMODE_MASK_RT8211 0x00000000
-+#define MAC_PHYCFG2_EMODE_MASK_RT8201 0x000001c0
-+#define MAC_PHYCFG2_EMODE_COMP_MASK 0x00000e00
-+#define MAC_PHYCFG2_EMODE_COMP_AC131 0x00000600
-+#define MAC_PHYCFG2_EMODE_COMP_50610 0x00000400
-+#define MAC_PHYCFG2_EMODE_COMP_RT8211 0x00000800
-+#define MAC_PHYCFG2_EMODE_COMP_RT8201 0x00000000
-+#define MAC_PHYCFG2_FMODE_MASK_MASK 0x00007000
-+#define MAC_PHYCFG2_FMODE_MASK_AC131 0x00006000
-+#define MAC_PHYCFG2_FMODE_MASK_50610 0x00004000
-+#define MAC_PHYCFG2_FMODE_MASK_RT8211 0x00000000
-+#define MAC_PHYCFG2_FMODE_MASK_RT8201 0x00007000
-+#define MAC_PHYCFG2_FMODE_COMP_MASK 0x00038000
-+#define MAC_PHYCFG2_FMODE_COMP_AC131 0x00030000
-+#define MAC_PHYCFG2_FMODE_COMP_50610 0x00008000
-+#define MAC_PHYCFG2_FMODE_COMP_RT8211 0x00038000
-+#define MAC_PHYCFG2_FMODE_COMP_RT8201 0x00000000
-+#define MAC_PHYCFG2_GMODE_MASK_MASK 0x001c0000
-+#define MAC_PHYCFG2_GMODE_MASK_AC131 0x001c0000
-+#define MAC_PHYCFG2_GMODE_MASK_50610 0x00100000
-+#define MAC_PHYCFG2_GMODE_MASK_RT8211 0x00000000
-+#define MAC_PHYCFG2_GMODE_MASK_RT8201 0x001c0000
-+#define MAC_PHYCFG2_GMODE_COMP_MASK 0x00e00000
-+#define MAC_PHYCFG2_GMODE_COMP_AC131 0x00e00000
-+#define MAC_PHYCFG2_GMODE_COMP_50610 0x00000000
-+#define MAC_PHYCFG2_GMODE_COMP_RT8211 0x00200000
-+#define MAC_PHYCFG2_GMODE_COMP_RT8201 0x00000000
-+#define MAC_PHYCFG2_ACT_MASK_MASK 0x03000000
-+#define MAC_PHYCFG2_ACT_MASK_AC131 0x03000000
-+#define MAC_PHYCFG2_ACT_MASK_50610 0x01000000
-+#define MAC_PHYCFG2_ACT_MASK_RT8211 0x03000000
-+#define MAC_PHYCFG2_ACT_MASK_RT8201 0x01000000
-+#define MAC_PHYCFG2_ACT_COMP_MASK 0x0c000000
-+#define MAC_PHYCFG2_ACT_COMP_AC131 0x00000000
-+#define MAC_PHYCFG2_ACT_COMP_50610 0x00000000
-+#define MAC_PHYCFG2_ACT_COMP_RT8211 0x00000000
-+#define MAC_PHYCFG2_ACT_COMP_RT8201 0x08000000
-+#define MAC_PHYCFG2_QUAL_MASK_MASK 0x30000000
-+#define MAC_PHYCFG2_QUAL_MASK_AC131 0x30000000
-+#define MAC_PHYCFG2_QUAL_MASK_50610 0x30000000
-+#define MAC_PHYCFG2_QUAL_MASK_RT8211 0x30000000
-+#define MAC_PHYCFG2_QUAL_MASK_RT8201 0x30000000
-+#define MAC_PHYCFG2_QUAL_COMP_MASK 0xc0000000
-+#define MAC_PHYCFG2_QUAL_COMP_AC131 0x00000000
-+#define MAC_PHYCFG2_QUAL_COMP_50610 0x00000000
-+#define MAC_PHYCFG2_QUAL_COMP_RT8211 0x00000000
-+#define MAC_PHYCFG2_QUAL_COMP_RT8201 0x00000000
-+#define MAC_PHYCFG2_50610_LED_MODES \
-+ (MAC_PHYCFG2_EMODE_MASK_50610 | \
-+ MAC_PHYCFG2_EMODE_COMP_50610 | \
-+ MAC_PHYCFG2_FMODE_MASK_50610 | \
-+ MAC_PHYCFG2_FMODE_COMP_50610 | \
-+ MAC_PHYCFG2_GMODE_MASK_50610 | \
-+ MAC_PHYCFG2_GMODE_COMP_50610 | \
-+ MAC_PHYCFG2_ACT_MASK_50610 | \
-+ MAC_PHYCFG2_ACT_COMP_50610 | \
-+ MAC_PHYCFG2_QUAL_MASK_50610 | \
-+ MAC_PHYCFG2_QUAL_COMP_50610)
-+#define MAC_PHYCFG2_AC131_LED_MODES \
-+ (MAC_PHYCFG2_EMODE_MASK_AC131 | \
-+ MAC_PHYCFG2_EMODE_COMP_AC131 | \
-+ MAC_PHYCFG2_FMODE_MASK_AC131 | \
-+ MAC_PHYCFG2_FMODE_COMP_AC131 | \
-+ MAC_PHYCFG2_GMODE_MASK_AC131 | \
-+ MAC_PHYCFG2_GMODE_COMP_AC131 | \
-+ MAC_PHYCFG2_ACT_MASK_AC131 | \
-+ MAC_PHYCFG2_ACT_COMP_AC131 | \
-+ MAC_PHYCFG2_QUAL_MASK_AC131 | \
-+ MAC_PHYCFG2_QUAL_COMP_AC131)
-+#define MAC_PHYCFG2_RTL8211C_LED_MODES \
-+ (MAC_PHYCFG2_EMODE_MASK_RT8211 | \
-+ MAC_PHYCFG2_EMODE_COMP_RT8211 | \
-+ MAC_PHYCFG2_FMODE_MASK_RT8211 | \
-+ MAC_PHYCFG2_FMODE_COMP_RT8211 | \
-+ MAC_PHYCFG2_GMODE_MASK_RT8211 | \
-+ MAC_PHYCFG2_GMODE_COMP_RT8211 | \
-+ MAC_PHYCFG2_ACT_MASK_RT8211 | \
-+ MAC_PHYCFG2_ACT_COMP_RT8211 | \
-+ MAC_PHYCFG2_QUAL_MASK_RT8211 | \
-+ MAC_PHYCFG2_QUAL_COMP_RT8211)
-+#define MAC_PHYCFG2_RTL8201E_LED_MODES \
-+ (MAC_PHYCFG2_EMODE_MASK_RT8201 | \
-+ MAC_PHYCFG2_EMODE_COMP_RT8201 | \
-+ MAC_PHYCFG2_FMODE_MASK_RT8201 | \
-+ MAC_PHYCFG2_FMODE_COMP_RT8201 | \
-+ MAC_PHYCFG2_GMODE_MASK_RT8201 | \
-+ MAC_PHYCFG2_GMODE_COMP_RT8201 | \
-+ MAC_PHYCFG2_ACT_MASK_RT8201 | \
-+ MAC_PHYCFG2_ACT_COMP_RT8201 | \
-+ MAC_PHYCFG2_QUAL_MASK_RT8201 | \
-+ MAC_PHYCFG2_QUAL_COMP_RT8201)
-+#define MAC_EXT_RGMII_MODE 0x000005a8
-+#define MAC_RGMII_MODE_TX_ENABLE 0x00000001
-+#define MAC_RGMII_MODE_TX_LOWPWR 0x00000002
-+#define MAC_RGMII_MODE_TX_RESET 0x00000004
-+#define MAC_RGMII_MODE_RX_INT_B 0x00000100
-+#define MAC_RGMII_MODE_RX_QUALITY 0x00000200
-+#define MAC_RGMII_MODE_RX_ACTIVITY 0x00000400
-+#define MAC_RGMII_MODE_RX_ENG_DET 0x00000800
-+/* 0x5ac --> 0x5b0 unused */
-+#define SERDES_RX_CTRL 0x000005b0 /* 5780/5714 only */
-+#define SERDES_RX_SIG_DETECT 0x00000400
-+#define SG_DIG_CTRL 0x000005b0
-+#define SG_DIG_USING_HW_AUTONEG 0x80000000
-+#define SG_DIG_SOFT_RESET 0x40000000
-+#define SG_DIG_DISABLE_LINKRDY 0x20000000
-+#define SG_DIG_CRC16_CLEAR_N 0x01000000
-+#define SG_DIG_EN10B 0x00800000
-+#define SG_DIG_CLEAR_STATUS 0x00400000
-+#define SG_DIG_LOCAL_DUPLEX_STATUS 0x00200000
-+#define SG_DIG_LOCAL_LINK_STATUS 0x00100000
-+#define SG_DIG_SPEED_STATUS_MASK 0x000c0000
-+#define SG_DIG_SPEED_STATUS_SHIFT 18
-+#define SG_DIG_JUMBO_PACKET_DISABLE 0x00020000
-+#define SG_DIG_RESTART_AUTONEG 0x00010000
-+#define SG_DIG_FIBER_MODE 0x00008000
-+#define SG_DIG_REMOTE_FAULT_MASK 0x00006000
-+#define SG_DIG_PAUSE_MASK 0x00001800
-+#define SG_DIG_PAUSE_CAP 0x00000800
-+#define SG_DIG_ASYM_PAUSE 0x00001000
-+#define SG_DIG_GBIC_ENABLE 0x00000400
-+#define SG_DIG_CHECK_END_ENABLE 0x00000200
-+#define SG_DIG_SGMII_AUTONEG_TIMER 0x00000100
-+#define SG_DIG_CLOCK_PHASE_SELECT 0x00000080
-+#define SG_DIG_GMII_INPUT_SELECT 0x00000040
-+#define SG_DIG_MRADV_CRC16_SELECT 0x00000020
-+#define SG_DIG_COMMA_DETECT_ENABLE 0x00000010
-+#define SG_DIG_AUTONEG_TIMER_REDUCE 0x00000008
-+#define SG_DIG_AUTONEG_LOW_ENABLE 0x00000004
-+#define SG_DIG_REMOTE_LOOPBACK 0x00000002
-+#define SG_DIG_LOOPBACK 0x00000001
-+#define SG_DIG_COMMON_SETUP (SG_DIG_CRC16_CLEAR_N | \
-+ SG_DIG_LOCAL_DUPLEX_STATUS | \
-+ SG_DIG_LOCAL_LINK_STATUS | \
-+ (0x2 << SG_DIG_SPEED_STATUS_SHIFT) | \
-+ SG_DIG_FIBER_MODE | SG_DIG_GBIC_ENABLE)
-+#define SG_DIG_STATUS 0x000005b4
-+#define SG_DIG_CRC16_BUS_MASK 0xffff0000
-+#define SG_DIG_PARTNER_FAULT_MASK 0x00600000 /* If !MRADV_CRC16_SELECT */
-+#define SG_DIG_PARTNER_ASYM_PAUSE 0x00100000 /* If !MRADV_CRC16_SELECT */
-+#define SG_DIG_PARTNER_PAUSE_CAPABLE 0x00080000 /* If !MRADV_CRC16_SELECT */
-+#define SG_DIG_PARTNER_HALF_DUPLEX 0x00040000 /* If !MRADV_CRC16_SELECT */
-+#define SG_DIG_PARTNER_FULL_DUPLEX 0x00020000 /* If !MRADV_CRC16_SELECT */
-+#define SG_DIG_PARTNER_NEXT_PAGE 0x00010000 /* If !MRADV_CRC16_SELECT */
-+#define SG_DIG_AUTONEG_STATE_MASK 0x00000ff0
-+#define SG_DIG_IS_SERDES 0x00000100
-+#define SG_DIG_COMMA_DETECTOR 0x00000008
-+#define SG_DIG_MAC_ACK_STATUS 0x00000004
-+#define SG_DIG_AUTONEG_COMPLETE 0x00000002
-+#define SG_DIG_AUTONEG_ERROR 0x00000001
-+#define TG3_TX_TSTAMP_LSB 0x000005c0
-+#define TG3_TX_TSTAMP_MSB 0x000005c4
-+#define TG3_TSTAMP_MASK 0x7fffffffffffffff
-+/* 0x5c8 --> 0x600 unused */
-+#define MAC_TX_MAC_STATE_BASE 0x00000600 /* 16 bytes */
-+#define MAC_RX_MAC_STATE_BASE 0x00000610 /* 20 bytes */
-+/* 0x624 --> 0x670 unused */
-+
-+#define MAC_RSS_INDIR_TBL_0 0x00000630
-+
-+#define MAC_RSS_HASH_KEY_0 0x00000670
-+#define MAC_RSS_HASH_KEY_1 0x00000674
-+#define MAC_RSS_HASH_KEY_2 0x00000678
-+#define MAC_RSS_HASH_KEY_3 0x0000067c
-+#define MAC_RSS_HASH_KEY_4 0x00000680
-+#define MAC_RSS_HASH_KEY_5 0x00000684
-+#define MAC_RSS_HASH_KEY_6 0x00000688
-+#define MAC_RSS_HASH_KEY_7 0x0000068c
-+#define MAC_RSS_HASH_KEY_8 0x00000690
-+#define MAC_RSS_HASH_KEY_9 0x00000694
-+/* 0x698 --> 0x6b0 unused */
-+
-+#define TG3_RX_TSTAMP_LSB 0x000006b0
-+#define TG3_RX_TSTAMP_MSB 0x000006b4
-+/* 0x6b8 --> 0x6c8 unused */
-+
-+#define TG3_RX_PTP_CTL 0x000006c8
-+#define TG3_RX_PTP_CTL_SYNC_EVNT 0x00000001
-+#define TG3_RX_PTP_CTL_DELAY_REQ 0x00000002
-+#define TG3_RX_PTP_CTL_PDLAY_REQ 0x00000004
-+#define TG3_RX_PTP_CTL_PDLAY_RES 0x00000008
-+#define TG3_RX_PTP_CTL_ALL_V1_EVENTS (TG3_RX_PTP_CTL_SYNC_EVNT | \
-+ TG3_RX_PTP_CTL_DELAY_REQ)
-+#define TG3_RX_PTP_CTL_ALL_V2_EVENTS (TG3_RX_PTP_CTL_SYNC_EVNT | \
-+ TG3_RX_PTP_CTL_DELAY_REQ | \
-+ TG3_RX_PTP_CTL_PDLAY_REQ | \
-+ TG3_RX_PTP_CTL_PDLAY_RES)
-+#define TG3_RX_PTP_CTL_FOLLOW_UP 0x00000100
-+#define TG3_RX_PTP_CTL_DELAY_RES 0x00000200
-+#define TG3_RX_PTP_CTL_PDRES_FLW_UP 0x00000400
-+#define TG3_RX_PTP_CTL_ANNOUNCE 0x00000800
-+#define TG3_RX_PTP_CTL_SIGNALING 0x00001000
-+#define TG3_RX_PTP_CTL_MANAGEMENT 0x00002000
-+#define TG3_RX_PTP_CTL_RX_PTP_V2_L2_EN 0x00800000
-+#define TG3_RX_PTP_CTL_RX_PTP_V2_L4_EN 0x01000000
-+#define TG3_RX_PTP_CTL_RX_PTP_V2_EN (TG3_RX_PTP_CTL_RX_PTP_V2_L2_EN | \
-+ TG3_RX_PTP_CTL_RX_PTP_V2_L4_EN)
-+#define TG3_RX_PTP_CTL_RX_PTP_V1_EN 0x02000000
-+#define TG3_RX_PTP_CTL_HWTS_INTERLOCK 0x04000000
-+/* 0x6cc --> 0x800 unused */
-+
-+#define MAC_TX_STATS_OCTETS 0x00000800
-+#define MAC_TX_STATS_RESV1 0x00000804
-+#define MAC_TX_STATS_COLLISIONS 0x00000808
-+#define MAC_TX_STATS_XON_SENT 0x0000080c
-+#define MAC_TX_STATS_XOFF_SENT 0x00000810
-+#define MAC_TX_STATS_RESV2 0x00000814
-+#define MAC_TX_STATS_MAC_ERRORS 0x00000818
-+#define MAC_TX_STATS_SINGLE_COLLISIONS 0x0000081c
-+#define MAC_TX_STATS_MULT_COLLISIONS 0x00000820
-+#define MAC_TX_STATS_DEFERRED 0x00000824
-+#define MAC_TX_STATS_RESV3 0x00000828
-+#define MAC_TX_STATS_EXCESSIVE_COL 0x0000082c
-+#define MAC_TX_STATS_LATE_COL 0x00000830
-+#define MAC_TX_STATS_RESV4_1 0x00000834
-+#define MAC_TX_STATS_RESV4_2 0x00000838
-+#define MAC_TX_STATS_RESV4_3 0x0000083c
-+#define MAC_TX_STATS_RESV4_4 0x00000840
-+#define MAC_TX_STATS_RESV4_5 0x00000844
-+#define MAC_TX_STATS_RESV4_6 0x00000848
-+#define MAC_TX_STATS_RESV4_7 0x0000084c
-+#define MAC_TX_STATS_RESV4_8 0x00000850
-+#define MAC_TX_STATS_RESV4_9 0x00000854
-+#define MAC_TX_STATS_RESV4_10 0x00000858
-+#define MAC_TX_STATS_RESV4_11 0x0000085c
-+#define MAC_TX_STATS_RESV4_12 0x00000860
-+#define MAC_TX_STATS_RESV4_13 0x00000864
-+#define MAC_TX_STATS_RESV4_14 0x00000868
-+#define MAC_TX_STATS_UCAST 0x0000086c
-+#define MAC_TX_STATS_MCAST 0x00000870
-+#define MAC_TX_STATS_BCAST 0x00000874
-+#define MAC_TX_STATS_RESV5_1 0x00000878
-+#define MAC_TX_STATS_RESV5_2 0x0000087c
-+#define MAC_RX_STATS_OCTETS 0x00000880
-+#define MAC_RX_STATS_RESV1 0x00000884
-+#define MAC_RX_STATS_FRAGMENTS 0x00000888
-+#define MAC_RX_STATS_UCAST 0x0000088c
-+#define MAC_RX_STATS_MCAST 0x00000890
-+#define MAC_RX_STATS_BCAST 0x00000894
-+#define MAC_RX_STATS_FCS_ERRORS 0x00000898
-+#define MAC_RX_STATS_ALIGN_ERRORS 0x0000089c
-+#define MAC_RX_STATS_XON_PAUSE_RECVD 0x000008a0
-+#define MAC_RX_STATS_XOFF_PAUSE_RECVD 0x000008a4
-+#define MAC_RX_STATS_MAC_CTRL_RECVD 0x000008a8
-+#define MAC_RX_STATS_XOFF_ENTERED 0x000008ac
-+#define MAC_RX_STATS_FRAME_TOO_LONG 0x000008b0
-+#define MAC_RX_STATS_JABBERS 0x000008b4
-+#define MAC_RX_STATS_UNDERSIZE 0x000008b8
-+/* 0x8bc --> 0xc00 unused */
-+
-+/* Send data initiator control registers */
-+#define SNDDATAI_MODE 0x00000c00
-+#define SNDDATAI_MODE_RESET 0x00000001
-+#define SNDDATAI_MODE_ENABLE 0x00000002
-+#define SNDDATAI_MODE_STAT_OFLOW_ENAB 0x00000004
-+#define SNDDATAI_STATUS 0x00000c04
-+#define SNDDATAI_STATUS_STAT_OFLOW 0x00000004
-+#define SNDDATAI_STATSCTRL 0x00000c08
-+#define SNDDATAI_SCTRL_ENABLE 0x00000001
-+#define SNDDATAI_SCTRL_FASTUPD 0x00000002
-+#define SNDDATAI_SCTRL_CLEAR 0x00000004
-+#define SNDDATAI_SCTRL_FLUSH 0x00000008
-+#define SNDDATAI_SCTRL_FORCE_ZERO 0x00000010
-+#define SNDDATAI_STATSENAB 0x00000c0c
-+#define SNDDATAI_STATSINCMASK 0x00000c10
-+#define ISO_PKT_TX 0x00000c20
-+/* 0xc24 --> 0xc80 unused */
-+#define SNDDATAI_COS_CNT_0 0x00000c80
-+#define SNDDATAI_COS_CNT_1 0x00000c84
-+#define SNDDATAI_COS_CNT_2 0x00000c88
-+#define SNDDATAI_COS_CNT_3 0x00000c8c
-+#define SNDDATAI_COS_CNT_4 0x00000c90
-+#define SNDDATAI_COS_CNT_5 0x00000c94
-+#define SNDDATAI_COS_CNT_6 0x00000c98
-+#define SNDDATAI_COS_CNT_7 0x00000c9c
-+#define SNDDATAI_COS_CNT_8 0x00000ca0
-+#define SNDDATAI_COS_CNT_9 0x00000ca4
-+#define SNDDATAI_COS_CNT_10 0x00000ca8
-+#define SNDDATAI_COS_CNT_11 0x00000cac
-+#define SNDDATAI_COS_CNT_12 0x00000cb0
-+#define SNDDATAI_COS_CNT_13 0x00000cb4
-+#define SNDDATAI_COS_CNT_14 0x00000cb8
-+#define SNDDATAI_COS_CNT_15 0x00000cbc
-+#define SNDDATAI_DMA_RDQ_FULL_CNT 0x00000cc0
-+#define SNDDATAI_DMA_PRIO_RDQ_FULL_CNT 0x00000cc4
-+#define SNDDATAI_SDCQ_FULL_CNT 0x00000cc8
-+#define SNDDATAI_NICRNG_SSND_PIDX_CNT 0x00000ccc
-+#define SNDDATAI_STATS_UPDATED_CNT 0x00000cd0
-+#define SNDDATAI_INTERRUPTS_CNT 0x00000cd4
-+#define SNDDATAI_AVOID_INTERRUPTS_CNT 0x00000cd8
-+#define SNDDATAI_SND_THRESH_HIT_CNT 0x00000cdc
-+/* 0xce0 --> 0x1000 unused */
-+
-+/* Send data completion control registers */
-+#define SNDDATAC_MODE 0x00001000
-+#define SNDDATAC_MODE_RESET 0x00000001
-+#define SNDDATAC_MODE_ENABLE 0x00000002
-+#define SNDDATAC_MODE_CDELAY 0x00000010
-+/* 0x1004 --> 0x1400 unused */
-+
-+/* Send BD ring selector */
-+#define SNDBDS_MODE 0x00001400
-+#define SNDBDS_MODE_RESET 0x00000001
-+#define SNDBDS_MODE_ENABLE 0x00000002
-+#define SNDBDS_MODE_ATTN_ENABLE 0x00000004
-+#define SNDBDS_STATUS 0x00001404
-+#define SNDBDS_STATUS_ERROR_ATTN 0x00000004
-+#define SNDBDS_HWDIAG 0x00001408
-+/* 0x140c --> 0x1440 */
-+#define SNDBDS_SEL_CON_IDX_0 0x00001440
-+#define SNDBDS_SEL_CON_IDX_1 0x00001444
-+#define SNDBDS_SEL_CON_IDX_2 0x00001448
-+#define SNDBDS_SEL_CON_IDX_3 0x0000144c
-+#define SNDBDS_SEL_CON_IDX_4 0x00001450
-+#define SNDBDS_SEL_CON_IDX_5 0x00001454
-+#define SNDBDS_SEL_CON_IDX_6 0x00001458
-+#define SNDBDS_SEL_CON_IDX_7 0x0000145c
-+#define SNDBDS_SEL_CON_IDX_8 0x00001460
-+#define SNDBDS_SEL_CON_IDX_9 0x00001464
-+#define SNDBDS_SEL_CON_IDX_10 0x00001468
-+#define SNDBDS_SEL_CON_IDX_11 0x0000146c
-+#define SNDBDS_SEL_CON_IDX_12 0x00001470
-+#define SNDBDS_SEL_CON_IDX_13 0x00001474
-+#define SNDBDS_SEL_CON_IDX_14 0x00001478
-+#define SNDBDS_SEL_CON_IDX_15 0x0000147c
-+/* 0x1480 --> 0x1800 unused */
-+
-+/* Send BD initiator control registers */
-+#define SNDBDI_MODE 0x00001800
-+#define SNDBDI_MODE_RESET 0x00000001
-+#define SNDBDI_MODE_ENABLE 0x00000002
-+#define SNDBDI_MODE_ATTN_ENABLE 0x00000004
-+#define SNDBDI_MODE_MULTI_TXQ_EN 0x00000020
-+#define SNDBDI_STATUS 0x00001804
-+#define SNDBDI_STATUS_ERROR_ATTN 0x00000004
-+#define SNDBDI_IN_PROD_IDX_0 0x00001808
-+#define SNDBDI_IN_PROD_IDX_1 0x0000180c
-+#define SNDBDI_IN_PROD_IDX_2 0x00001810
-+#define SNDBDI_IN_PROD_IDX_3 0x00001814
-+#define SNDBDI_IN_PROD_IDX_4 0x00001818
-+#define SNDBDI_IN_PROD_IDX_5 0x0000181c
-+#define SNDBDI_IN_PROD_IDX_6 0x00001820
-+#define SNDBDI_IN_PROD_IDX_7 0x00001824
-+#define SNDBDI_IN_PROD_IDX_8 0x00001828
-+#define SNDBDI_IN_PROD_IDX_9 0x0000182c
-+#define SNDBDI_IN_PROD_IDX_10 0x00001830
-+#define SNDBDI_IN_PROD_IDX_11 0x00001834
-+#define SNDBDI_IN_PROD_IDX_12 0x00001838
-+#define SNDBDI_IN_PROD_IDX_13 0x0000183c
-+#define SNDBDI_IN_PROD_IDX_14 0x00001840
-+#define SNDBDI_IN_PROD_IDX_15 0x00001844
-+/* 0x1848 --> 0x1c00 unused */
-+
-+/* Send BD completion control registers */
-+#define SNDBDC_MODE 0x00001c00
-+#define SNDBDC_MODE_RESET 0x00000001
-+#define SNDBDC_MODE_ENABLE 0x00000002
-+#define SNDBDC_MODE_ATTN_ENABLE 0x00000004
-+/* 0x1c04 --> 0x2000 unused */
-+
-+/* Receive list placement control registers */
-+#define RCVLPC_MODE 0x00002000
-+#define RCVLPC_MODE_RESET 0x00000001
-+#define RCVLPC_MODE_ENABLE 0x00000002
-+#define RCVLPC_MODE_CLASS0_ATTN_ENAB 0x00000004
-+#define RCVLPC_MODE_MAPOOR_AATTN_ENAB 0x00000008
-+#define RCVLPC_MODE_STAT_OFLOW_ENAB 0x00000010
-+#define RCVLPC_STATUS 0x00002004
-+#define RCVLPC_STATUS_CLASS0 0x00000004
-+#define RCVLPC_STATUS_MAPOOR 0x00000008
-+#define RCVLPC_STATUS_STAT_OFLOW 0x00000010
-+#define RCVLPC_LOCK 0x00002008
-+#define RCVLPC_LOCK_REQ_MASK 0x0000ffff
-+#define RCVLPC_LOCK_REQ_SHIFT 0
-+#define RCVLPC_LOCK_GRANT_MASK 0xffff0000
-+#define RCVLPC_LOCK_GRANT_SHIFT 16
-+#define RCVLPC_NON_EMPTY_BITS 0x0000200c
-+#define RCVLPC_NON_EMPTY_BITS_MASK 0x0000ffff
-+#define RCVLPC_CONFIG 0x00002010
-+#define RCVLPC_STATSCTRL 0x00002014
-+#define RCVLPC_STATSCTRL_ENABLE 0x00000001
-+#define RCVLPC_STATSCTRL_FASTUPD 0x00000002
-+#define RCVLPC_STATS_ENABLE 0x00002018
-+#define RCVLPC_STATSENAB_ASF_FIX 0x00000002
-+#define RCVLPC_STATSENAB_DACK_FIX 0x00040000
-+#define RCVLPC_STATSENAB_LNGBRST_RFIX 0x00400000
-+#define RCVLPC_STATS_INCMASK 0x0000201c
-+/* 0x2020 --> 0x2100 unused */
-+#define RCVLPC_SELLST_BASE 0x00002100 /* 16 16-byte entries */
-+#define SELLST_TAIL 0x00000004
-+#define SELLST_CONT 0x00000008
-+#define SELLST_UNUSED 0x0000000c
-+#define RCVLPC_COS_CNTL_BASE 0x00002200 /* 16 4-byte entries */
-+#define RCVLPC_DROP_FILTER_CNT 0x00002240
-+#define RCVLPC_DMA_WQ_FULL_CNT 0x00002244
-+#define RCVLPC_DMA_HIPRIO_WQ_FULL_CNT 0x00002248
-+#define RCVLPC_NO_RCV_BD_CNT 0x0000224c
-+#define RCVLPC_IN_DISCARDS_CNT 0x00002250
-+#define RCVLPC_IN_ERRORS_CNT 0x00002254
-+#define RCVLPC_RCV_THRESH_HIT_CNT 0x00002258
-+/* 0x225c --> 0x2400 unused */
-+
-+/* Receive Data and Receive BD Initiator Control */
-+#define RCVDBDI_MODE 0x00002400
-+#define RCVDBDI_MODE_RESET 0x00000001
-+#define RCVDBDI_MODE_ENABLE 0x00000002
-+#define RCVDBDI_MODE_JUMBOBD_NEEDED 0x00000004
-+#define RCVDBDI_MODE_FRM_TOO_BIG 0x00000008
-+#define RCVDBDI_MODE_INV_RING_SZ 0x00000010
-+#define RCVDBDI_MODE_LRG_RING_SZ 0x00010000
-+#define RCVDBDI_STATUS 0x00002404
-+#define RCVDBDI_STATUS_JUMBOBD_NEEDED 0x00000004
-+#define RCVDBDI_STATUS_FRM_TOO_BIG 0x00000008
-+#define RCVDBDI_STATUS_INV_RING_SZ 0x00000010
-+#define RCVDBDI_SPLIT_FRAME_MINSZ 0x00002408
-+#define VRQ_STATUS 0x0000240c
-+#define VRQ_FLUSH_CTRL 0x00002410
-+#define VRQ_FLUSH_ENABLE 0x00000001
-+#define VRQ_FLUSH_RESET_ENABLE 0x00000002
-+#define VRQ_FLUSH_STATUPDT_INT_ENABLE 0x00000004
-+#define VRQ_FLUSH_DISCARD_PKT_ENABLE 0x00000008
-+#define VRQ_FLUSH_SW_FLUSH 0x00000100
-+/* 0x2414 --> 0x2440 unused */
-+
-+#define RCVDBDI_JUMBO_BD 0x00002440 /* TG3_BDINFO_... */
-+#define RCVDBDI_STD_BD 0x00002450 /* TG3_BDINFO_... */
-+#define RCVDBDI_MINI_BD 0x00002460 /* TG3_BDINFO_... */
-+#define RCVDBDI_JUMBO_CON_IDX 0x00002470
-+#define RCVDBDI_STD_CON_IDX 0x00002474
-+#define RCVDBDI_MINI_CON_IDX 0x00002478
-+/* 0x247c --> 0x2480 unused */
-+#define RCVDBDI_BD_PROD_IDX_0 0x00002480
-+#define RCVDBDI_BD_PROD_IDX_1 0x00002484
-+#define RCVDBDI_BD_PROD_IDX_2 0x00002488
-+#define RCVDBDI_BD_PROD_IDX_3 0x0000248c
-+#define RCVDBDI_BD_PROD_IDX_4 0x00002490
-+#define RCVDBDI_BD_PROD_IDX_5 0x00002494
-+#define RCVDBDI_BD_PROD_IDX_6 0x00002498
-+#define RCVDBDI_BD_PROD_IDX_7 0x0000249c
-+#define RCVDBDI_BD_PROD_IDX_8 0x000024a0
-+#define RCVDBDI_BD_PROD_IDX_9 0x000024a4
-+#define RCVDBDI_BD_PROD_IDX_10 0x000024a8
-+#define RCVDBDI_BD_PROD_IDX_11 0x000024ac
-+#define RCVDBDI_BD_PROD_IDX_12 0x000024b0
-+#define RCVDBDI_BD_PROD_IDX_13 0x000024b4
-+#define RCVDBDI_BD_PROD_IDX_14 0x000024b8
-+#define RCVDBDI_BD_PROD_IDX_15 0x000024bc
-+#define RCVDBDI_HWDIAG 0x000024c0
-+/* 0x24c4 --> 0x2800 unused */
-+
-+#define RCVDBDI_JMB_BD_RING1 0x00002500
-+/* 0x2504 --> 0x2800 unused */
-+
-+/* Receive Data Completion Control */
-+#define RCVDCC_MODE 0x00002800
-+#define RCVDCC_MODE_RESET 0x00000001
-+#define RCVDCC_MODE_ENABLE 0x00000002
-+#define RCVDCC_MODE_ATTN_ENABLE 0x00000004
-+/* 0x2804 --> 0x2c00 unused */
-+
-+/* Receive BD Initiator Control Registers */
-+#define RCVBDI_MODE 0x00002c00
-+#define RCVBDI_MODE_RESET 0x00000001
-+#define RCVBDI_MODE_ENABLE 0x00000002
-+#define RCVBDI_MODE_RCB_ATTN_ENAB 0x00000004
-+#define RCVBDI_STATUS 0x00002c04
-+#define RCVBDI_STATUS_RCB_ATTN 0x00000004
-+#define RCVBDI_JUMBO_PROD_IDX 0x00002c08
-+#define RCVBDI_STD_PROD_IDX 0x00002c0c
-+#define RCVBDI_MINI_PROD_IDX 0x00002c10
-+#define RCVBDI_MINI_THRESH 0x00002c14
-+#define RCVBDI_STD_THRESH 0x00002c18
-+#define RCVBDI_JUMBO_THRESH 0x00002c1c
-+/* 0x2c20 --> 0x2d00 unused */
-+
-+#define STD_REPLENISH_LWM 0x00002d00
-+#define JMB_REPLENISH_LWM 0x00002d04
-+/* 0x2d08 --> 0x3000 unused */
-+
-+/* Receive BD Completion Control Registers */
-+#define RCVCC_MODE 0x00003000
-+#define RCVCC_MODE_RESET 0x00000001
-+#define RCVCC_MODE_ENABLE 0x00000002
-+#define RCVCC_MODE_ATTN_ENABLE 0x00000004
-+#define RCVCC_STATUS 0x00003004
-+#define RCVCC_STATUS_ERROR_ATTN 0x00000004
-+#define RCVCC_JUMP_PROD_IDX 0x00003008
-+#define RCVCC_STD_PROD_IDX 0x0000300c
-+#define RCVCC_MINI_PROD_IDX 0x00003010
-+/* 0x3014 --> 0x3400 unused */
-+
-+/* Receive list selector control registers */
-+#define RCVLSC_MODE 0x00003400
-+#define RCVLSC_MODE_RESET 0x00000001
-+#define RCVLSC_MODE_ENABLE 0x00000002
-+#define RCVLSC_MODE_ATTN_ENABLE 0x00000004
-+#define RCVLSC_STATUS 0x00003404
-+#define RCVLSC_STATUS_ERROR_ATTN 0x00000004
-+/* 0x3408 --> 0x3600 unused */
-+
-+#define TG3_CPMU_DRV_STATUS 0x0000344c
-+
-+/* CPMU registers */
-+#define TG3_CPMU_CTRL 0x00003600
-+#define CPMU_CTRL_LINK_IDLE_MODE 0x00000200
-+#define CPMU_CTRL_LINK_AWARE_MODE 0x00000400
-+#define CPMU_CTRL_LINK_SPEED_MODE 0x00004000
-+#define CPMU_CTRL_GPHY_10MB_RXONLY 0x00010000
-+#define TG3_CPMU_LSPD_10MB_CLK 0x00003604
-+#define CPMU_LSPD_10MB_MACCLK_MASK 0x001f0000
-+#define CPMU_LSPD_10MB_MACCLK_6_25 0x00130000
-+/* 0x3608 --> 0x360c unused */
-+
-+#define TG3_CPMU_LSPD_1000MB_CLK 0x0000360c
-+#define CPMU_LSPD_1000MB_MACCLK_62_5 0x00000000
-+#define CPMU_LSPD_1000MB_MACCLK_12_5 0x00110000
-+#define CPMU_LSPD_1000MB_MACCLK_MASK 0x001f0000
-+#define TG3_CPMU_LNK_AWARE_PWRMD 0x00003610
-+#define CPMU_LNK_AWARE_MACCLK_MASK 0x001f0000
-+#define CPMU_LNK_AWARE_MACCLK_6_25 0x00130000
-+/* 0x3614 --> 0x361c unused */
-+
-+#define TG3_CPMU_HST_ACC 0x0000361c
-+#define CPMU_HST_ACC_MACCLK_MASK 0x001f0000
-+#define CPMU_HST_ACC_MACCLK_6_25 0x00130000
-+/* 0x3620 --> 0x3630 unused */
-+
-+#define TG3_CPMU_CLCK_ORIDE 0x00003624
-+#define CPMU_CLCK_ORIDE_MAC_ORIDE_EN 0x80000000
-+
-+#define TG3_CPMU_CLCK_ORIDE_ENABLE 0x00003628
-+#define TG3_CPMU_MAC_ORIDE_ENABLE (1 << 13)
-+
-+#define TG3_CPMU_STATUS 0x0000362c
-+#define TG3_CPMU_STATUS_FMSK_5717 0x20000000
-+#define TG3_CPMU_STATUS_FMSK_5719 0xc0000000
-+#define TG3_CPMU_STATUS_FSHFT_5719 30
-+#define TG3_CPMU_STATUS_LINK_MASK 0x180000
-+
-+#define TG3_CPMU_CLCK_STAT 0x00003630
-+#define CPMU_CLCK_STAT_MAC_CLCK_MASK 0x001f0000
-+#define CPMU_CLCK_STAT_MAC_CLCK_62_5 0x00000000
-+#define CPMU_CLCK_STAT_MAC_CLCK_12_5 0x00110000
-+#define CPMU_CLCK_STAT_MAC_CLCK_6_25 0x00130000
-+/* 0x3634 --> 0x365c unused */
-+
-+#define TG3_CPMU_MUTEX_REQ 0x0000365c
-+#define CPMU_MUTEX_REQ_DRIVER 0x00001000
-+#define TG3_CPMU_MUTEX_GNT 0x00003660
-+#define CPMU_MUTEX_GNT_DRIVER 0x00001000
-+#define TG3_CPMU_PHY_STRAP 0x00003664
-+#define TG3_CPMU_PHY_STRAP_IS_SERDES 0x00000020
-+#define TG3_CPMU_PADRNG_CTL 0x00003668
-+#define TG3_CPMU_PADRNG_CTL_RDIV2 0x00040000
-+/* 0x3664 --> 0x36b0 unused */
-+
-+#define TG3_CPMU_EEE_MODE 0x000036b0
-+#define TG3_CPMU_EEEMD_APE_TX_DET_EN 0x00000004
-+#define TG3_CPMU_EEEMD_ERLY_L1_XIT_DET 0x00000008
-+#define TG3_CPMU_EEEMD_SND_IDX_DET_EN 0x00000040
-+#define TG3_CPMU_EEEMD_LPI_ENABLE 0x00000080
-+#define TG3_CPMU_EEEMD_LPI_IN_TX 0x00000100
-+#define TG3_CPMU_EEEMD_LPI_IN_RX 0x00000200
-+#define TG3_CPMU_EEEMD_EEE_ENABLE 0x00100000
-+#define TG3_CPMU_EEE_DBTMR1 0x000036b4
-+#define TG3_CPMU_DBTMR1_PCIEXIT_2047US 0x07ff0000
-+#define TG3_CPMU_DBTMR1_LNKIDLE_2047US 0x000007ff
-+#define TG3_CPMU_DBTMR1_LNKIDLE_MAX 0x0000ffff
-+#define TG3_CPMU_EEE_DBTMR2 0x000036b8
-+#define TG3_CPMU_DBTMR2_APE_TX_2047US 0x07ff0000
-+#define TG3_CPMU_DBTMR2_TXIDXEQ_2047US 0x000007ff
-+#define TG3_CPMU_EEE_LNKIDL_CTRL 0x000036bc
-+#define TG3_CPMU_EEE_LNKIDL_PCIE_NL0 0x01000000
-+#define TG3_CPMU_EEE_LNKIDL_UART_IDL 0x00000004
-+#define TG3_CPMU_EEE_LNKIDL_APE_TX_MT 0x00000002
-+/* 0x36c0 --> 0x36d0 unused */
-+
-+#define TG3_CPMU_EEE_CTRL 0x000036d0
-+#define TG3_CPMU_EEE_CTRL_EXIT_16_5_US 0x0000019d
-+#define TG3_CPMU_EEE_CTRL_EXIT_36_US 0x00000384
-+#define TG3_CPMU_EEE_CTRL_EXIT_20_1_US 0x000001f8
-+/* 0x36d4 --> 0x3800 unused */
-+
-+/* Mbuf cluster free registers */
-+#define MBFREE_MODE 0x00003800
-+#define MBFREE_MODE_RESET 0x00000001
-+#define MBFREE_MODE_ENABLE 0x00000002
-+#define MBFREE_STATUS 0x00003804
-+/* 0x3808 --> 0x3c00 unused */
-+
-+/* Host coalescing control registers */
-+#define HOSTCC_MODE 0x00003c00
-+#define HOSTCC_MODE_RESET 0x00000001
-+#define HOSTCC_MODE_ENABLE 0x00000002
-+#define HOSTCC_MODE_ATTN 0x00000004
-+#define HOSTCC_MODE_NOW 0x00000008
-+#define HOSTCC_MODE_FULL_STATUS 0x00000000
-+#define HOSTCC_MODE_64BYTE 0x00000080
-+#define HOSTCC_MODE_32BYTE 0x00000100
-+#define HOSTCC_MODE_CLRTICK_RXBD 0x00000200
-+#define HOSTCC_MODE_CLRTICK_TXBD 0x00000400
-+#define HOSTCC_MODE_NOINT_ON_NOW 0x00000800
-+#define HOSTCC_MODE_NOINT_ON_FORCE 0x00001000
-+#define HOSTCC_MODE_COAL_VEC1_NOW 0x00002000
-+#define HOSTCC_STATUS 0x00003c04
-+#define HOSTCC_STATUS_ERROR_ATTN 0x00000004
-+#define HOSTCC_RXCOL_TICKS 0x00003c08
-+#define LOW_RXCOL_TICKS 0x00000032
-+#if defined(__VMKLNX__)
-+#define LOW_RXCOL_TICKS_CLRTCKS 0x00000012
-+#else
-+#define LOW_RXCOL_TICKS_CLRTCKS 0x00000014
-+#endif
-+#define DEFAULT_RXCOL_TICKS 0x00000048
-+#define HIGH_RXCOL_TICKS 0x00000096
-+#define MAX_RXCOL_TICKS 0x000003ff
-+#define HOSTCC_TXCOL_TICKS 0x00003c0c
-+#define LOW_TXCOL_TICKS 0x00000096
-+#define LOW_TXCOL_TICKS_CLRTCKS 0x00000048
-+#define DEFAULT_TXCOL_TICKS 0x0000012c
-+#define HIGH_TXCOL_TICKS 0x00000145
-+#define MAX_TXCOL_TICKS 0x000003ff
-+#define HOSTCC_RXMAX_FRAMES 0x00003c10
-+#if defined(__VMKLNX__)
-+#define LOW_RXMAX_FRAMES 0x0000000f
-+#else
-+#define LOW_RXMAX_FRAMES 0x00000005
-+#endif
-+#define DEFAULT_RXMAX_FRAMES 0x00000008
-+#define HIGH_RXMAX_FRAMES 0x00000012
-+#define MAX_RXMAX_FRAMES 0x000000ff
-+#define HOSTCC_TXMAX_FRAMES 0x00003c14
-+#define LOW_TXMAX_FRAMES 0x00000035
-+#define DEFAULT_TXMAX_FRAMES 0x0000004b
-+#define HIGH_TXMAX_FRAMES 0x00000052
-+#define MAX_TXMAX_FRAMES 0x000000ff
-+#define HOSTCC_RXCOAL_TICK_INT 0x00003c18
-+#define DEFAULT_RXCOAL_TICK_INT 0x00000019
-+#define DEFAULT_RXCOAL_TICK_INT_CLRTCKS 0x00000014
-+#define MAX_RXCOAL_TICK_INT 0x000003ff
-+#define HOSTCC_TXCOAL_TICK_INT 0x00003c1c
-+#define DEFAULT_TXCOAL_TICK_INT 0x00000019
-+#define DEFAULT_TXCOAL_TICK_INT_CLRTCKS 0x00000014
-+#define MAX_TXCOAL_TICK_INT 0x000003ff
-+#define HOSTCC_RXCOAL_MAXF_INT 0x00003c20
-+#define DEFAULT_RXCOAL_MAXF_INT 0x00000005
-+#define MAX_RXCOAL_MAXF_INT 0x000000ff
-+#define HOSTCC_TXCOAL_MAXF_INT 0x00003c24
-+#define DEFAULT_TXCOAL_MAXF_INT 0x00000005
-+#define MAX_TXCOAL_MAXF_INT 0x000000ff
-+#define HOSTCC_STAT_COAL_TICKS 0x00003c28
-+#define DEFAULT_STAT_COAL_TICKS 0x000f4240
-+#define MAX_STAT_COAL_TICKS 0xd693d400
-+#define MIN_STAT_COAL_TICKS 0x00000064
-+#define HOSTCC_PARAM_SET_RESET 0x00003c28
-+/* 0x3c2c --> 0x3c30 unused */
-+#define HOSTCC_STATS_BLK_HOST_ADDR 0x00003c30 /* 64-bit */
-+#define HOSTCC_STATUS_BLK_HOST_ADDR 0x00003c38 /* 64-bit */
-+#define HOSTCC_STATS_BLK_NIC_ADDR 0x00003c40
-+#define HOSTCC_STATUS_BLK_NIC_ADDR 0x00003c44
-+#define HOSTCC_FLOW_ATTN 0x00003c48
-+#define HOSTCC_FLOW_ATTN_MBUF_LWM 0x00000040
-+#define HOSTCC_FLOW_ATTN_RCB_MISCFG 0x00020000
-+#define HOSTCC_FLOW_ATTN_RCV_BDI_ATTN 0x00800000
-+/* 0x3c4c --> 0x3c50 unused */
-+#define HOSTCC_JUMBO_CON_IDX 0x00003c50
-+#define HOSTCC_STD_CON_IDX 0x00003c54
-+#define HOSTCC_MINI_CON_IDX 0x00003c58
-+/* 0x3c5c --> 0x3c80 unused */
-+#define HOSTCC_RET_PROD_IDX_0 0x00003c80
-+#define HOSTCC_RET_PROD_IDX_1 0x00003c84
-+#define HOSTCC_RET_PROD_IDX_2 0x00003c88
-+#define HOSTCC_RET_PROD_IDX_3 0x00003c8c
-+#define HOSTCC_RET_PROD_IDX_4 0x00003c90
-+#define HOSTCC_RET_PROD_IDX_5 0x00003c94
-+#define HOSTCC_RET_PROD_IDX_6 0x00003c98
-+#define HOSTCC_RET_PROD_IDX_7 0x00003c9c
-+#define HOSTCC_RET_PROD_IDX_8 0x00003ca0
-+#define HOSTCC_RET_PROD_IDX_9 0x00003ca4
-+#define HOSTCC_RET_PROD_IDX_10 0x00003ca8
-+#define HOSTCC_RET_PROD_IDX_11 0x00003cac
-+#define HOSTCC_RET_PROD_IDX_12 0x00003cb0
-+#define HOSTCC_RET_PROD_IDX_13 0x00003cb4
-+#define HOSTCC_RET_PROD_IDX_14 0x00003cb8
-+#define HOSTCC_RET_PROD_IDX_15 0x00003cbc
-+#define HOSTCC_SND_CON_IDX_0 0x00003cc0
-+#define HOSTCC_SND_CON_IDX_1 0x00003cc4
-+#define HOSTCC_SND_CON_IDX_2 0x00003cc8
-+#define HOSTCC_SND_CON_IDX_3 0x00003ccc
-+#define HOSTCC_SND_CON_IDX_4 0x00003cd0
-+#define HOSTCC_SND_CON_IDX_5 0x00003cd4
-+#define HOSTCC_SND_CON_IDX_6 0x00003cd8
-+#define HOSTCC_SND_CON_IDX_7 0x00003cdc
-+#define HOSTCC_SND_CON_IDX_8 0x00003ce0
-+#define HOSTCC_SND_CON_IDX_9 0x00003ce4
-+#define HOSTCC_SND_CON_IDX_10 0x00003ce8
-+#define HOSTCC_SND_CON_IDX_11 0x00003cec
-+#define HOSTCC_SND_CON_IDX_12 0x00003cf0
-+#define HOSTCC_SND_CON_IDX_13 0x00003cf4
-+#define HOSTCC_SND_CON_IDX_14 0x00003cf8
-+#define HOSTCC_SND_CON_IDX_15 0x00003cfc
-+#define HOSTCC_STATBLCK_RING1 0x00003d00
-+/* 0x3d00 --> 0x3d80 unused */
-+
-+#define HOSTCC_RXCOL_TICKS_VEC1 0x00003d80
-+#define HOSTCC_TXCOL_TICKS_VEC1 0x00003d84
-+#define HOSTCC_RXMAX_FRAMES_VEC1 0x00003d88
-+#define HOSTCC_TXMAX_FRAMES_VEC1 0x00003d8c
-+#define HOSTCC_RXCOAL_MAXF_INT_VEC1 0x00003d90
-+#define HOSTCC_TXCOAL_MAXF_INT_VEC1 0x00003d94
-+/* 0x3d98 --> 0x4000 unused */
-+
-+/* Memory arbiter control registers */
-+#define MEMARB_MODE 0x00004000
-+#define MEMARB_MODE_RESET 0x00000001
-+#define MEMARB_MODE_ENABLE 0x00000002
-+#define MEMARB_STATUS 0x00004004
-+#define MEMARB_TRAP_ADDR_LOW 0x00004008
-+#define MEMARB_TRAP_ADDR_HIGH 0x0000400c
-+/* 0x4010 --> 0x4400 unused */
-+
-+/* Buffer manager control registers */
-+#define BUFMGR_MODE 0x00004400
-+#define BUFMGR_MODE_RESET 0x00000001
-+#define BUFMGR_MODE_ENABLE 0x00000002
-+#define BUFMGR_MODE_ATTN_ENABLE 0x00000004
-+#define BUFMGR_MODE_BM_TEST 0x00000008
-+#define BUFMGR_MODE_MBLOW_ATTN_ENAB 0x00000010
-+#define BUFMGR_MODE_NO_TX_UNDERRUN 0x80000000
-+#define BUFMGR_STATUS 0x00004404
-+#define BUFMGR_STATUS_ERROR 0x00000004
-+#define BUFMGR_STATUS_MBLOW 0x00000010
-+#define BUFMGR_MB_POOL_ADDR 0x00004408
-+#define BUFMGR_MB_POOL_SIZE 0x0000440c
-+#define BUFMGR_MB_RDMA_LOW_WATER 0x00004410
-+#define DEFAULT_MB_RDMA_LOW_WATER 0x00000050
-+#define DEFAULT_MB_RDMA_LOW_WATER_5705 0x00000000
-+#define DEFAULT_MB_RDMA_LOW_WATER_JUMBO 0x00000130
-+#define DEFAULT_MB_RDMA_LOW_WATER_JUMBO_5780 0x00000000
-+#define BUFMGR_MB_MACRX_LOW_WATER 0x00004414
-+#define DEFAULT_MB_MACRX_LOW_WATER 0x00000020
-+#define DEFAULT_MB_MACRX_LOW_WATER_5705 0x00000010
-+#define DEFAULT_MB_MACRX_LOW_WATER_5906 0x00000004
-+#define DEFAULT_MB_MACRX_LOW_WATER_57765 0x0000002a
-+#define DEFAULT_MB_MACRX_LOW_WATER_JUMBO 0x00000098
-+#define DEFAULT_MB_MACRX_LOW_WATER_JUMBO_5780 0x0000004b
-+#define DEFAULT_MB_MACRX_LOW_WATER_JUMBO_57765 0x0000007e
-+#define BUFMGR_MB_HIGH_WATER 0x00004418
-+#define DEFAULT_MB_HIGH_WATER 0x00000060
-+#define DEFAULT_MB_HIGH_WATER_5705 0x00000060
-+#define DEFAULT_MB_HIGH_WATER_5906 0x00000010
-+#define DEFAULT_MB_HIGH_WATER_57765 0x000000a0
-+#define DEFAULT_MB_HIGH_WATER_JUMBO 0x0000017c
-+#define DEFAULT_MB_HIGH_WATER_JUMBO_5780 0x00000096
-+#define DEFAULT_MB_HIGH_WATER_JUMBO_57765 0x000000ea
-+#define BUFMGR_RX_MB_ALLOC_REQ 0x0000441c
-+#define BUFMGR_MB_ALLOC_BIT 0x10000000
-+#define BUFMGR_RX_MB_ALLOC_RESP 0x00004420
-+#define BUFMGR_TX_MB_ALLOC_REQ 0x00004424
-+#define BUFMGR_TX_MB_ALLOC_RESP 0x00004428
-+#define BUFMGR_DMA_DESC_POOL_ADDR 0x0000442c
-+#define BUFMGR_DMA_DESC_POOL_SIZE 0x00004430
-+#define BUFMGR_DMA_LOW_WATER 0x00004434
-+#define DEFAULT_DMA_LOW_WATER 0x00000005
-+#define BUFMGR_DMA_HIGH_WATER 0x00004438
-+#define DEFAULT_DMA_HIGH_WATER 0x0000000a
-+#define BUFMGR_RX_DMA_ALLOC_REQ 0x0000443c
-+#define BUFMGR_RX_DMA_ALLOC_RESP 0x00004440
-+#define BUFMGR_TX_DMA_ALLOC_REQ 0x00004444
-+#define BUFMGR_TX_DMA_ALLOC_RESP 0x00004448
-+#define BUFMGR_HWDIAG_0 0x0000444c
-+#define BUFMGR_HWDIAG_1 0x00004450
-+#define BUFMGR_HWDIAG_2 0x00004454
-+/* 0x4458 --> 0x4800 unused */
-+
-+/* Read DMA control registers */
-+#define RDMAC_MODE 0x00004800
-+#define RDMAC_MODE_RESET 0x00000001
-+#define RDMAC_MODE_ENABLE 0x00000002
-+#define RDMAC_MODE_TGTABORT_ENAB 0x00000004
-+#define RDMAC_MODE_MSTABORT_ENAB 0x00000008
-+#define RDMAC_MODE_PARITYERR_ENAB 0x00000010
-+#define RDMAC_MODE_ADDROFLOW_ENAB 0x00000020
-+#define RDMAC_MODE_FIFOOFLOW_ENAB 0x00000040
-+#define RDMAC_MODE_FIFOURUN_ENAB 0x00000080
-+#define RDMAC_MODE_FIFOOREAD_ENAB 0x00000100
-+#define RDMAC_MODE_LNGREAD_ENAB 0x00000200
-+#define RDMAC_MODE_SPLIT_ENABLE 0x00000800
-+#define RDMAC_MODE_BD_SBD_CRPT_ENAB 0x00000800
-+#define RDMAC_MODE_SPLIT_RESET 0x00001000
-+#define RDMAC_MODE_MBUF_RBD_CRPT_ENAB 0x00001000
-+#define RDMAC_MODE_MBUF_SBD_CRPT_ENAB 0x00002000
-+#define RDMAC_MODE_FIFO_SIZE_128 0x00020000
-+#define RDMAC_MODE_FIFO_LONG_BURST 0x00030000
-+#define RDMAC_MODE_JMB_2K_MMRR 0x00800000
-+#define RDMAC_MODE_MULT_DMA_RD_DIS 0x01000000
-+#define RDMAC_MODE_IPV4_LSO_EN 0x08000000
-+#define RDMAC_MODE_IPV6_LSO_EN 0x10000000
-+#define RDMAC_MODE_H2BNC_VLAN_DET 0x20000000
-+#define RDMAC_STATUS 0x00004804
-+#define RDMAC_STATUS_TGTABORT 0x00000004
-+#define RDMAC_STATUS_MSTABORT 0x00000008
-+#define RDMAC_STATUS_PARITYERR 0x00000010
-+#define RDMAC_STATUS_ADDROFLOW 0x00000020
-+#define RDMAC_STATUS_FIFOOFLOW 0x00000040
-+#define RDMAC_STATUS_FIFOURUN 0x00000080
-+#define RDMAC_STATUS_FIFOOREAD 0x00000100
-+#define RDMAC_STATUS_LNGREAD 0x00000200
-+/* 0x4808 --> 0x4900 unused */
-+
-+#define TG3_RDMA_RSRVCTRL_REG2 0x00004890
-+#define TG3_LSO_RD_DMA_CRPTEN_CTRL2 0x000048a0
-+
-+#define TG3_RDMA_RSRVCTRL_REG 0x00004900
-+#define TG3_RDMA_RSRVCTRL_FIFO_OFLW_FIX 0x00000004
-+#define TG3_RDMA_RSRVCTRL_FIFO_LWM_1_5K 0x00000c00
-+#define TG3_RDMA_RSRVCTRL_FIFO_LWM_MASK 0x00000ff0
-+#define TG3_RDMA_RSRVCTRL_FIFO_HWM_1_5K 0x000c0000
-+#define TG3_RDMA_RSRVCTRL_FIFO_HWM_MASK 0x000ff000
-+#define TG3_RDMA_RSRVCTRL_TXMRGN_320B 0x28000000
-+#define TG3_RDMA_RSRVCTRL_TXMRGN_MASK 0xffe00000
-+/* 0x4904 --> 0x4910 unused */
-+
-+#define TG3_LSO_RD_DMA_CRPTEN_CTRL 0x00004910
-+#define TG3_LSO_RD_DMA_CRPTEN_CTRL_BLEN_BD_4K 0x00030000
-+#define TG3_LSO_RD_DMA_CRPTEN_CTRL_BLEN_LSO_4K 0x000c0000
-+#define TG3_LSO_RD_DMA_TX_LENGTH_WA_5719 0x02000000
-+#define TG3_LSO_RD_DMA_TX_LENGTH_WA_5720 0x00200000
-+/* 0x4914 --> 0x4be0 unused */
-+
-+#define TG3_NUM_RDMA_CHANNELS 4
-+#define TG3_RDMA_LENGTH 0x00004be0
-+
-+/* Write DMA control registers */
-+#define WDMAC_MODE 0x00004c00
-+#define WDMAC_MODE_RESET 0x00000001
-+#define WDMAC_MODE_ENABLE 0x00000002
-+#define WDMAC_MODE_TGTABORT_ENAB 0x00000004
-+#define WDMAC_MODE_MSTABORT_ENAB 0x00000008
-+#define WDMAC_MODE_PARITYERR_ENAB 0x00000010
-+#define WDMAC_MODE_ADDROFLOW_ENAB 0x00000020
-+#define WDMAC_MODE_FIFOOFLOW_ENAB 0x00000040
-+#define WDMAC_MODE_FIFOURUN_ENAB 0x00000080
-+#define WDMAC_MODE_FIFOOREAD_ENAB 0x00000100
-+#define WDMAC_MODE_LNGREAD_ENAB 0x00000200
-+#define WDMAC_MODE_RX_ACCEL 0x00000400
-+#define WDMAC_MODE_STATUS_TAG_FIX 0x20000000
-+#define WDMAC_MODE_BURST_ALL_DATA 0xc0000000
-+#define WDMAC_STATUS 0x00004c04
-+#define WDMAC_STATUS_TGTABORT 0x00000004
-+#define WDMAC_STATUS_MSTABORT 0x00000008
-+#define WDMAC_STATUS_PARITYERR 0x00000010
-+#define WDMAC_STATUS_ADDROFLOW 0x00000020
-+#define WDMAC_STATUS_FIFOOFLOW 0x00000040
-+#define WDMAC_STATUS_FIFOURUN 0x00000080
-+#define WDMAC_STATUS_FIFOOREAD 0x00000100
-+#define WDMAC_STATUS_LNGREAD 0x00000200
-+/* 0x4c08 --> 0x5000 unused */
-+
-+/* Per-cpu register offsets (arm9) */
-+#define CPU_MODE 0x00000000
-+#define CPU_MODE_RESET 0x00000001
-+#define CPU_MODE_HALT 0x00000400
-+#define CPU_STATE 0x00000004
-+#define CPU_EVTMASK 0x00000008
-+/* 0xc --> 0x1c reserved */
-+#define CPU_PC 0x0000001c
-+#define CPU_INSN 0x00000020
-+#define CPU_SPAD_UFLOW 0x00000024
-+#define CPU_WDOG_CLEAR 0x00000028
-+#define CPU_WDOG_VECTOR 0x0000002c
-+#define CPU_WDOG_PC 0x00000030
-+#define CPU_HW_BP 0x00000034
-+/* 0x38 --> 0x44 unused */
-+#define CPU_WDOG_SAVED_STATE 0x00000044
-+#define CPU_LAST_BRANCH_ADDR 0x00000048
-+#define CPU_SPAD_UFLOW_SET 0x0000004c
-+/* 0x50 --> 0x200 unused */
-+#define CPU_R0 0x00000200
-+#define CPU_R1 0x00000204
-+#define CPU_R2 0x00000208
-+#define CPU_R3 0x0000020c
-+#define CPU_R4 0x00000210
-+#define CPU_R5 0x00000214
-+#define CPU_R6 0x00000218
-+#define CPU_R7 0x0000021c
-+#define CPU_R8 0x00000220
-+#define CPU_R9 0x00000224
-+#define CPU_R10 0x00000228
-+#define CPU_R11 0x0000022c
-+#define CPU_R12 0x00000230
-+#define CPU_R13 0x00000234
-+#define CPU_R14 0x00000238
-+#define CPU_R15 0x0000023c
-+#define CPU_R16 0x00000240
-+#define CPU_R17 0x00000244
-+#define CPU_R18 0x00000248
-+#define CPU_R19 0x0000024c
-+#define CPU_R20 0x00000250
-+#define CPU_R21 0x00000254
-+#define CPU_R22 0x00000258
-+#define CPU_R23 0x0000025c
-+#define CPU_R24 0x00000260
-+#define CPU_R25 0x00000264
-+#define CPU_R26 0x00000268
-+#define CPU_R27 0x0000026c
-+#define CPU_R28 0x00000270
-+#define CPU_R29 0x00000274
-+#define CPU_R30 0x00000278
-+#define CPU_R31 0x0000027c
-+/* 0x280 --> 0x400 unused */
-+
-+#define RX_CPU_BASE 0x00005000
-+#define RX_CPU_MODE 0x00005000
-+#define RX_CPU_STATE 0x00005004
-+#define RX_CPU_PGMCTR 0x0000501c
-+#define RX_CPU_HWBKPT 0x00005034
-+#define TX_CPU_BASE 0x00005400
-+#define TX_CPU_MODE 0x00005400
-+#define TX_CPU_STATE 0x00005404
-+#define TX_CPU_PGMCTR 0x0000541c
-+
-+#define VCPU_STATUS 0x00005100
-+#define VCPU_STATUS_INIT_DONE 0x04000000
-+#define VCPU_STATUS_DRV_RESET 0x08000000
-+
-+#define VCPU_CFGSHDW 0x00005104
-+#define VCPU_CFGSHDW_WOL_ENABLE 0x00000001
-+#define VCPU_CFGSHDW_WOL_MAGPKT 0x00000004
-+#define VCPU_CFGSHDW_ASPM_DBNC 0x00001000
-+
-+#define MAC_VRQFLT_CFG 0x00005400
-+#define MAC_VRQFLT_ELEM_EN 0x80000000
-+#define MAC_VRQFLT_HDR_VLAN 0x0000e000
-+#define MAC_VRQFLT_PTRN 0x00005480
-+#define MAC_VRQFLT_PTRN_VLANID 0x0000ffff
-+#define MAC_VRQFLT_FLTSET 0x00005500
-+
-+/* Mailboxes */
-+#define GRCMBOX_BASE 0x00005600
-+#define MAC_VRQMAP_1H 0x00005600
-+#define MAC_VRQMAP_1H_PTA_PFEN 0x00000020
-+#define MAC_VRQMAP_2H 0x00005604
-+#define MAC_VRQMAP_2H_PTA_VFEN 0x00000020
-+#define MAC_VRQMAP_2H_PTA_AND 0x00000000
-+#define MAC_VRQMAP_2H_PTA_OR 0x00000040
-+#define MAC_VRQMAP_2H_PTA_EN 0x00000080
-+#define MAC_VRQ_PMATCH_HI_5 0x00005690
-+#define MAC_VRQ_PMATCH_LO_5 0x00005694
-+#define GRCMBOX_INTERRUPT_0 0x00005800 /* 64-bit */
-+#define GRCMBOX_INTERRUPT_1 0x00005808 /* 64-bit */
-+#define GRCMBOX_INTERRUPT_2 0x00005810 /* 64-bit */
-+#define GRCMBOX_INTERRUPT_3 0x00005818 /* 64-bit */
-+#define GRCMBOX_GENERAL_0 0x00005820 /* 64-bit */
-+#define GRCMBOX_GENERAL_1 0x00005828 /* 64-bit */
-+#define GRCMBOX_GENERAL_2 0x00005830 /* 64-bit */
-+#define GRCMBOX_GENERAL_3 0x00005838 /* 64-bit */
-+#define GRCMBOX_GENERAL_4 0x00005840 /* 64-bit */
-+#define GRCMBOX_GENERAL_5 0x00005848 /* 64-bit */
-+#define GRCMBOX_GENERAL_6 0x00005850 /* 64-bit */
-+#define GRCMBOX_GENERAL_7 0x00005858 /* 64-bit */
-+#define GRCMBOX_RELOAD_STAT 0x00005860 /* 64-bit */
-+#define GRCMBOX_RCVSTD_PROD_IDX 0x00005868 /* 64-bit */
-+#define GRCMBOX_RCVJUMBO_PROD_IDX 0x00005870 /* 64-bit */
-+#define GRCMBOX_RCVMINI_PROD_IDX 0x00005878 /* 64-bit */
-+#define GRCMBOX_RCVRET_CON_IDX_0 0x00005880 /* 64-bit */
-+#define GRCMBOX_RCVRET_CON_IDX_1 0x00005888 /* 64-bit */
-+#define GRCMBOX_RCVRET_CON_IDX_2 0x00005890 /* 64-bit */
-+#define GRCMBOX_RCVRET_CON_IDX_3 0x00005898 /* 64-bit */
-+#define GRCMBOX_RCVRET_CON_IDX_4 0x000058a0 /* 64-bit */
-+#define GRCMBOX_RCVRET_CON_IDX_5 0x000058a8 /* 64-bit */
-+#define GRCMBOX_RCVRET_CON_IDX_6 0x000058b0 /* 64-bit */
-+#define GRCMBOX_RCVRET_CON_IDX_7 0x000058b8 /* 64-bit */
-+#define GRCMBOX_RCVRET_CON_IDX_8 0x000058c0 /* 64-bit */
-+#define GRCMBOX_RCVRET_CON_IDX_9 0x000058c8 /* 64-bit */
-+#define GRCMBOX_RCVRET_CON_IDX_10 0x000058d0 /* 64-bit */
-+#define GRCMBOX_RCVRET_CON_IDX_11 0x000058d8 /* 64-bit */
-+#define GRCMBOX_RCVRET_CON_IDX_12 0x000058e0 /* 64-bit */
-+#define GRCMBOX_RCVRET_CON_IDX_13 0x000058e8 /* 64-bit */
-+#define GRCMBOX_RCVRET_CON_IDX_14 0x000058f0 /* 64-bit */
-+#define GRCMBOX_RCVRET_CON_IDX_15 0x000058f8 /* 64-bit */
-+#define GRCMBOX_SNDHOST_PROD_IDX_0 0x00005900 /* 64-bit */
-+#define GRCMBOX_SNDHOST_PROD_IDX_1 0x00005908 /* 64-bit */
-+#define GRCMBOX_SNDHOST_PROD_IDX_2 0x00005910 /* 64-bit */
-+#define GRCMBOX_SNDHOST_PROD_IDX_3 0x00005918 /* 64-bit */
-+#define GRCMBOX_SNDHOST_PROD_IDX_4 0x00005920 /* 64-bit */
-+#define GRCMBOX_SNDHOST_PROD_IDX_5 0x00005928 /* 64-bit */
-+#define GRCMBOX_SNDHOST_PROD_IDX_6 0x00005930 /* 64-bit */
-+#define GRCMBOX_SNDHOST_PROD_IDX_7 0x00005938 /* 64-bit */
-+#define GRCMBOX_SNDHOST_PROD_IDX_8 0x00005940 /* 64-bit */
-+#define GRCMBOX_SNDHOST_PROD_IDX_9 0x00005948 /* 64-bit */
-+#define GRCMBOX_SNDHOST_PROD_IDX_10 0x00005950 /* 64-bit */
-+#define GRCMBOX_SNDHOST_PROD_IDX_11 0x00005958 /* 64-bit */
-+#define GRCMBOX_SNDHOST_PROD_IDX_12 0x00005960 /* 64-bit */
-+#define GRCMBOX_SNDHOST_PROD_IDX_13 0x00005968 /* 64-bit */
-+#define GRCMBOX_SNDHOST_PROD_IDX_14 0x00005970 /* 64-bit */
-+#define GRCMBOX_SNDHOST_PROD_IDX_15 0x00005978 /* 64-bit */
-+#define GRCMBOX_SNDNIC_PROD_IDX_0 0x00005980 /* 64-bit */
-+#define GRCMBOX_SNDNIC_PROD_IDX_1 0x00005988 /* 64-bit */
-+#define GRCMBOX_SNDNIC_PROD_IDX_2 0x00005990 /* 64-bit */
-+#define GRCMBOX_SNDNIC_PROD_IDX_3 0x00005998 /* 64-bit */
-+#define GRCMBOX_SNDNIC_PROD_IDX_4 0x000059a0 /* 64-bit */
-+#define GRCMBOX_SNDNIC_PROD_IDX_5 0x000059a8 /* 64-bit */
-+#define GRCMBOX_SNDNIC_PROD_IDX_6 0x000059b0 /* 64-bit */
-+#define GRCMBOX_SNDNIC_PROD_IDX_7 0x000059b8 /* 64-bit */
-+#define GRCMBOX_SNDNIC_PROD_IDX_8 0x000059c0 /* 64-bit */
-+#define GRCMBOX_SNDNIC_PROD_IDX_9 0x000059c8 /* 64-bit */
-+#define GRCMBOX_SNDNIC_PROD_IDX_10 0x000059d0 /* 64-bit */
-+#define GRCMBOX_SNDNIC_PROD_IDX_11 0x000059d8 /* 64-bit */
-+#define GRCMBOX_SNDNIC_PROD_IDX_12 0x000059e0 /* 64-bit */
-+#define GRCMBOX_SNDNIC_PROD_IDX_13 0x000059e8 /* 64-bit */
-+#define GRCMBOX_SNDNIC_PROD_IDX_14 0x000059f0 /* 64-bit */
-+#define GRCMBOX_SNDNIC_PROD_IDX_15 0x000059f8 /* 64-bit */
-+#define GRCMBOX_HIGH_PRIO_EV_VECTOR 0x00005a00
-+#define GRCMBOX_HIGH_PRIO_EV_MASK 0x00005a04
-+#define GRCMBOX_LOW_PRIO_EV_VEC 0x00005a08
-+#define GRCMBOX_LOW_PRIO_EV_MASK 0x00005a0c
-+/* 0x5a10 --> 0x5c00 */
-+
-+/* Flow Through queues */
-+#define FTQ_RESET 0x00005c00
-+/* 0x5c04 --> 0x5c10 unused */
-+#define FTQ_DMA_NORM_READ_CTL 0x00005c10
-+#define FTQ_DMA_NORM_READ_FULL_CNT 0x00005c14
-+#define FTQ_DMA_NORM_READ_FIFO_ENQDEQ 0x00005c18
-+#define FTQ_DMA_NORM_READ_WRITE_PEEK 0x00005c1c
-+#define FTQ_DMA_HIGH_READ_CTL 0x00005c20
-+#define FTQ_DMA_HIGH_READ_FULL_CNT 0x00005c24
-+#define FTQ_DMA_HIGH_READ_FIFO_ENQDEQ 0x00005c28
-+#define FTQ_DMA_HIGH_READ_WRITE_PEEK 0x00005c2c
-+#define FTQ_DMA_COMP_DISC_CTL 0x00005c30
-+#define FTQ_DMA_COMP_DISC_FULL_CNT 0x00005c34
-+#define FTQ_DMA_COMP_DISC_FIFO_ENQDEQ 0x00005c38
-+#define FTQ_DMA_COMP_DISC_WRITE_PEEK 0x00005c3c
-+#define FTQ_SEND_BD_COMP_CTL 0x00005c40
-+#define FTQ_SEND_BD_COMP_FULL_CNT 0x00005c44
-+#define FTQ_SEND_BD_COMP_FIFO_ENQDEQ 0x00005c48
-+#define FTQ_SEND_BD_COMP_WRITE_PEEK 0x00005c4c
-+#define FTQ_SEND_DATA_INIT_CTL 0x00005c50
-+#define FTQ_SEND_DATA_INIT_FULL_CNT 0x00005c54
-+#define FTQ_SEND_DATA_INIT_FIFO_ENQDEQ 0x00005c58
-+#define FTQ_SEND_DATA_INIT_WRITE_PEEK 0x00005c5c
-+#define FTQ_DMA_NORM_WRITE_CTL 0x00005c60
-+#define FTQ_DMA_NORM_WRITE_FULL_CNT 0x00005c64
-+#define FTQ_DMA_NORM_WRITE_FIFO_ENQDEQ 0x00005c68
-+#define FTQ_DMA_NORM_WRITE_WRITE_PEEK 0x00005c6c
-+#define FTQ_DMA_HIGH_WRITE_CTL 0x00005c70
-+#define FTQ_DMA_HIGH_WRITE_FULL_CNT 0x00005c74
-+#define FTQ_DMA_HIGH_WRITE_FIFO_ENQDEQ 0x00005c78
-+#define FTQ_DMA_HIGH_WRITE_WRITE_PEEK 0x00005c7c
-+#define FTQ_SWTYPE1_CTL 0x00005c80
-+#define FTQ_SWTYPE1_FULL_CNT 0x00005c84
-+#define FTQ_SWTYPE1_FIFO_ENQDEQ 0x00005c88
-+#define FTQ_SWTYPE1_WRITE_PEEK 0x00005c8c
-+#define FTQ_SEND_DATA_COMP_CTL 0x00005c90
-+#define FTQ_SEND_DATA_COMP_FULL_CNT 0x00005c94
-+#define FTQ_SEND_DATA_COMP_FIFO_ENQDEQ 0x00005c98
-+#define FTQ_SEND_DATA_COMP_WRITE_PEEK 0x00005c9c
-+#define FTQ_HOST_COAL_CTL 0x00005ca0
-+#define FTQ_HOST_COAL_FULL_CNT 0x00005ca4
-+#define FTQ_HOST_COAL_FIFO_ENQDEQ 0x00005ca8
-+#define FTQ_HOST_COAL_WRITE_PEEK 0x00005cac
-+#define FTQ_MAC_TX_CTL 0x00005cb0
-+#define FTQ_MAC_TX_FULL_CNT 0x00005cb4
-+#define FTQ_MAC_TX_FIFO_ENQDEQ 0x00005cb8
-+#define FTQ_MAC_TX_WRITE_PEEK 0x00005cbc
-+#define FTQ_MB_FREE_CTL 0x00005cc0
-+#define FTQ_MB_FREE_FULL_CNT 0x00005cc4
-+#define FTQ_MB_FREE_FIFO_ENQDEQ 0x00005cc8
-+#define FTQ_MB_FREE_WRITE_PEEK 0x00005ccc
-+#define FTQ_RCVBD_COMP_CTL 0x00005cd0
-+#define FTQ_RCVBD_COMP_FULL_CNT 0x00005cd4
-+#define FTQ_RCVBD_COMP_FIFO_ENQDEQ 0x00005cd8
-+#define FTQ_RCVBD_COMP_WRITE_PEEK 0x00005cdc
-+#define FTQ_RCVLST_PLMT_CTL 0x00005ce0
-+#define FTQ_RCVLST_PLMT_FULL_CNT 0x00005ce4
-+#define FTQ_RCVLST_PLMT_FIFO_ENQDEQ 0x00005ce8
-+#define FTQ_RCVLST_PLMT_WRITE_PEEK 0x00005cec
-+#define FTQ_RCVDATA_INI_CTL 0x00005cf0
-+#define FTQ_RCVDATA_INI_FULL_CNT 0x00005cf4
-+#define FTQ_RCVDATA_INI_FIFO_ENQDEQ 0x00005cf8
-+#define FTQ_RCVDATA_INI_WRITE_PEEK 0x00005cfc
-+#define FTQ_RCVDATA_COMP_CTL 0x00005d00
-+#define FTQ_RCVDATA_COMP_FULL_CNT 0x00005d04
-+#define FTQ_RCVDATA_COMP_FIFO_ENQDEQ 0x00005d08
-+#define FTQ_RCVDATA_COMP_WRITE_PEEK 0x00005d0c
-+#define FTQ_SWTYPE2_CTL 0x00005d10
-+#define FTQ_SWTYPE2_FULL_CNT 0x00005d14
-+#define FTQ_SWTYPE2_FIFO_ENQDEQ 0x00005d18
-+#define FTQ_SWTYPE2_WRITE_PEEK 0x00005d1c
-+/* 0x5d20 --> 0x6000 unused */
-+
-+/* Message signaled interrupt registers */
-+#define MSGINT_MODE 0x00006000
-+#define MSGINT_MODE_RESET 0x00000001
-+#define MSGINT_MODE_ENABLE 0x00000002
-+#define MSGINT_MODE_ONE_SHOT_DISABLE 0x00000020
-+#define MSGINT_MODE_MULTIVEC_EN 0x00000080
-+#define MSGINT_STATUS 0x00006004
-+#define MSGINT_STATUS_MSI_REQ 0x00000001
-+#define MSGINT_FIFO 0x00006008
-+/* 0x600c --> 0x6400 unused */
-+
-+/* DMA completion registers */
-+#define DMAC_MODE 0x00006400
-+#define DMAC_MODE_RESET 0x00000001
-+#define DMAC_MODE_ENABLE 0x00000002
-+/* 0x6404 --> 0x6800 unused */
-+
-+/* GRC registers */
-+#define GRC_MODE 0x00006800
-+#define GRC_MODE_UPD_ON_COAL 0x00000001
-+#define GRC_MODE_BSWAP_NONFRM_DATA 0x00000002
-+#define GRC_MODE_WSWAP_NONFRM_DATA 0x00000004
-+#define GRC_MODE_BSWAP_DATA 0x00000010
-+#define GRC_MODE_WSWAP_DATA 0x00000020
-+#define GRC_MODE_BYTE_SWAP_B2HRX_DATA 0x00000040
-+#define GRC_MODE_WORD_SWAP_B2HRX_DATA 0x00000080
-+#define GRC_MODE_IOV_ENABLE 0x00000100
-+#define GRC_MODE_SPLITHDR 0x00000100
-+#define GRC_MODE_NOFRM_CRACKING 0x00000200
-+#define GRC_MODE_INCL_CRC 0x00000400
-+#define GRC_MODE_ALLOW_BAD_FRMS 0x00000800
-+#define GRC_MODE_NOIRQ_ON_SENDS 0x00002000
-+#define GRC_MODE_NOIRQ_ON_RCV 0x00004000
-+#define GRC_MODE_FORCE_PCI32BIT 0x00008000
-+#define GRC_MODE_B2HRX_ENABLE 0x00008000
-+#define GRC_MODE_HOST_STACKUP 0x00010000
-+#define GRC_MODE_HOST_SENDBDS 0x00020000
-+#define GRC_MODE_HTX2B_ENABLE 0x00040000
-+#define GRC_MODE_TIME_SYNC_ENABLE 0x00080000
-+#define GRC_MODE_NO_TX_PHDR_CSUM 0x00100000
-+#define GRC_MODE_NVRAM_WR_ENABLE 0x00200000
-+#define GRC_MODE_PCIE_TL_SEL 0x00000000
-+#define GRC_MODE_PCIE_PL_SEL 0x00400000
-+#define GRC_MODE_NO_RX_PHDR_CSUM 0x00800000
-+#define GRC_MODE_IRQ_ON_TX_CPU_ATTN 0x01000000
-+#define GRC_MODE_IRQ_ON_RX_CPU_ATTN 0x02000000
-+#define GRC_MODE_IRQ_ON_MAC_ATTN 0x04000000
-+#define GRC_MODE_IRQ_ON_DMA_ATTN 0x08000000
-+#define GRC_MODE_IRQ_ON_FLOW_ATTN 0x10000000
-+#define GRC_MODE_4X_NIC_SEND_RINGS 0x20000000
-+#define GRC_MODE_PCIE_DL_SEL 0x20000000
-+#define GRC_MODE_MCAST_FRM_ENABLE 0x40000000
-+#define GRC_MODE_PCIE_HI_1K_EN 0x80000000
-+#define GRC_MODE_PCIE_PORT_MASK (GRC_MODE_PCIE_TL_SEL | \
-+ GRC_MODE_PCIE_PL_SEL | \
-+ GRC_MODE_PCIE_DL_SEL | \
-+ GRC_MODE_PCIE_HI_1K_EN)
-+#define GRC_MISC_CFG 0x00006804
-+#define GRC_MISC_CFG_CORECLK_RESET 0x00000001
-+#define GRC_MISC_CFG_PRESCALAR_MASK 0x000000fe
-+#define GRC_MISC_CFG_PRESCALAR_SHIFT 1
-+#define GRC_MISC_CFG_BOARD_ID_MASK 0x0001e000
-+#define GRC_MISC_CFG_BOARD_ID_5700 0x0001e000
-+#define GRC_MISC_CFG_BOARD_ID_5701 0x00000000
-+#define GRC_MISC_CFG_BOARD_ID_5702FE 0x00004000
-+#define GRC_MISC_CFG_BOARD_ID_5703 0x00000000
-+#define GRC_MISC_CFG_BOARD_ID_5703S 0x00002000
-+#define GRC_MISC_CFG_BOARD_ID_5704 0x00000000
-+#define GRC_MISC_CFG_BOARD_ID_5704CIOBE 0x00004000
-+#define GRC_MISC_CFG_BOARD_ID_5704_A2 0x00008000
-+#define GRC_MISC_CFG_BOARD_ID_5788 0x00010000
-+#define GRC_MISC_CFG_BOARD_ID_5788M 0x00018000
-+#define GRC_MISC_CFG_BOARD_ID_AC91002A1 0x00018000
-+#define GRC_MISC_CFG_EPHY_IDDQ 0x00200000
-+#define GRC_MISC_CFG_KEEP_GPHY_POWER 0x04000000
-+#define GRC_LOCAL_CTRL 0x00006808
-+#define GRC_LCLCTRL_INT_ACTIVE 0x00000001
-+#define GRC_LCLCTRL_CLEARINT 0x00000002
-+#define GRC_LCLCTRL_SETINT 0x00000004
-+#define GRC_LCLCTRL_INT_ON_ATTN 0x00000008
-+#define GRC_LCLCTRL_GPIO_UART_SEL 0x00000010 /* 5755 only */
-+#define GRC_LCLCTRL_USE_SIG_DETECT 0x00000010 /* 5714/5780 only */
-+#define GRC_LCLCTRL_USE_EXT_SIG_DETECT 0x00000020 /* 5714/5780 only */
-+#define GRC_LCLCTRL_GPIO_INPUT3 0x00000020
-+#define GRC_LCLCTRL_GPIO_OE3 0x00000040
-+#define GRC_LCLCTRL_GPIO_OUTPUT3 0x00000080
-+#define GRC_LCLCTRL_GPIO_INPUT0 0x00000100
-+#define GRC_LCLCTRL_GPIO_INPUT1 0x00000200
-+#define GRC_LCLCTRL_GPIO_INPUT2 0x00000400
-+#define GRC_LCLCTRL_GPIO_OE0 0x00000800
-+#define GRC_LCLCTRL_GPIO_OE1 0x00001000
-+#define GRC_LCLCTRL_GPIO_OE2 0x00002000
-+#define GRC_LCLCTRL_GPIO_OUTPUT0 0x00004000
-+#define GRC_LCLCTRL_GPIO_OUTPUT1 0x00008000
-+#define GRC_LCLCTRL_GPIO_OUTPUT2 0x00010000
-+#define GRC_LCLCTRL_EXTMEM_ENABLE 0x00020000
-+#define GRC_LCLCTRL_MEMSZ_MASK 0x001c0000
-+#define GRC_LCLCTRL_MEMSZ_256K 0x00000000
-+#define GRC_LCLCTRL_MEMSZ_512K 0x00040000
-+#define GRC_LCLCTRL_MEMSZ_1M 0x00080000
-+#define GRC_LCLCTRL_MEMSZ_2M 0x000c0000
-+#define GRC_LCLCTRL_MEMSZ_4M 0x00100000
-+#define GRC_LCLCTRL_MEMSZ_8M 0x00140000
-+#define GRC_LCLCTRL_MEMSZ_16M 0x00180000
-+#define GRC_LCLCTRL_BANK_SELECT 0x00200000
-+#define GRC_LCLCTRL_SSRAM_TYPE 0x00400000
-+#define GRC_LCLCTRL_AUTO_SEEPROM 0x01000000
-+#define GRC_TIMER 0x0000680c
-+#define GRC_RX_CPU_EVENT 0x00006810
-+#define GRC_RX_CPU_DRIVER_EVENT 0x00004000
-+#define GRC_RX_TIMER_REF 0x00006814
-+#define GRC_RX_CPU_SEM 0x00006818
-+#define GRC_REMOTE_RX_CPU_ATTN 0x0000681c
-+#define GRC_TX_CPU_EVENT 0x00006820
-+#define GRC_TX_TIMER_REF 0x00006824
-+#define GRC_TX_CPU_SEM 0x00006828
-+#define GRC_REMOTE_TX_CPU_ATTN 0x0000682c
-+#define GRC_MEM_POWER_UP 0x00006830 /* 64-bit */
-+#define GRC_EEPROM_ADDR 0x00006838
-+#define EEPROM_ADDR_WRITE 0x00000000
-+#define EEPROM_ADDR_READ 0x80000000
-+#define EEPROM_ADDR_COMPLETE 0x40000000
-+#define EEPROM_ADDR_FSM_RESET 0x20000000
-+#define EEPROM_ADDR_DEVID_MASK 0x1c000000
-+#define EEPROM_ADDR_DEVID_SHIFT 26
-+#define EEPROM_ADDR_START 0x02000000
-+#define EEPROM_ADDR_CLKPERD_SHIFT 16
-+#define EEPROM_ADDR_ADDR_MASK 0x0000ffff
-+#define EEPROM_ADDR_ADDR_SHIFT 0
-+#define EEPROM_DEFAULT_CLOCK_PERIOD 0x60
-+#define EEPROM_CHIP_SIZE (64 * 1024)
-+#define GRC_EEPROM_DATA 0x0000683c
-+#define GRC_EEPROM_CTRL 0x00006840
-+#define GRC_MDI_CTRL 0x00006844
-+#define GRC_SEEPROM_DELAY 0x00006848
-+/* 0x684c --> 0x6890 unused */
-+#define GRC_VCPU_EXT_CTRL 0x00006890
-+#define GRC_VCPU_EXT_CTRL_HALT_CPU 0x00400000
-+#define GRC_VCPU_EXT_CTRL_DISABLE_WOL 0x20000000
-+#define GRC_FASTBOOT_PC 0x00006894 /* 5752, 5755, 5787 */
-+
-+#define TG3_EAV_REF_CLCK_LSB 0x00006900
-+#define TG3_EAV_REF_CLCK_MSB 0x00006904
-+#define TG3_EAV_REF_CLCK_CTL 0x00006908
-+#define TG3_EAV_REF_CLCK_CTL_STOP 0x00000002
-+#define TG3_EAV_REF_CLCK_CTL_RESUME 0x00000004
-+#define TG3_EAV_CTL_TSYNC_GPIO_MASK (0x3 << 16)
-+#define TG3_EAV_CTL_TSYNC_WDOG0 (1 << 17)
-+#define TG3_EAV_REF_CLK_CORRECT_CTL 0x00006928
-+#define TG3_EAV_REF_CLK_CORRECT_EN (1 << 31)
-+#define TG3_EAV_REF_CLK_CORRECT_NEG (1 << 30)
-+
-+#define TG3_EAV_REF_CLK_CORRECT_MASK 0xffffff
-+
-+#define TG3_EAV_WATCHDOG0_LSB 0x00006918
-+#define TG3_EAV_WATCHDOG0_MSB 0x0000691c
-+#define TG3_EAV_WATCHDOG0_EN (1 << 31)
-+#define TG3_EAV_WATCHDOG_MSB_MASK 0x7fffffff
-+/* 0x690c --> 0x7000 unused */
-+
-+/* NVRAM Control registers */
-+#define NVRAM_CMD 0x00007000
-+#define NVRAM_CMD_RESET 0x00000001
-+#define NVRAM_CMD_DONE 0x00000008
-+#define NVRAM_CMD_GO 0x00000010
-+#define NVRAM_CMD_WR 0x00000020
-+#define NVRAM_CMD_RD 0x00000000
-+#define NVRAM_CMD_ERASE 0x00000040
-+#define NVRAM_CMD_FIRST 0x00000080
-+#define NVRAM_CMD_LAST 0x00000100
-+#define NVRAM_CMD_WREN 0x00010000
-+#define NVRAM_CMD_WRDI 0x00020000
-+#define NVRAM_STAT 0x00007004
-+#define NVRAM_WRDATA 0x00007008
-+#define NVRAM_ADDR 0x0000700c
-+#define NVRAM_ADDR_MSK 0x07ffffff
-+#define NVRAM_RDDATA 0x00007010
-+#define NVRAM_CFG1 0x00007014
-+#define NVRAM_CFG1_FLASHIF_ENAB 0x00000001
-+#define NVRAM_CFG1_BUFFERED_MODE 0x00000002
-+#define NVRAM_CFG1_PASS_THRU 0x00000004
-+#define NVRAM_CFG1_STATUS_BITS 0x00000070
-+#define NVRAM_CFG1_BIT_BANG 0x00000008
-+#define NVRAM_CFG1_FLASH_SIZE 0x02000000
-+#define NVRAM_CFG1_COMPAT_BYPASS 0x80000000
-+#define NVRAM_CFG1_VENDOR_MASK 0x03000003
-+#define FLASH_VENDOR_ATMEL_EEPROM 0x02000000
-+#define FLASH_VENDOR_ATMEL_FLASH_BUFFERED 0x02000003
-+#define FLASH_VENDOR_ATMEL_FLASH_UNBUFFERED 0x00000003
-+#define FLASH_VENDOR_ST 0x03000001
-+#define FLASH_VENDOR_SAIFUN 0x01000003
-+#define FLASH_VENDOR_SST_SMALL 0x00000001
-+#define FLASH_VENDOR_SST_LARGE 0x02000001
-+#define NVRAM_CFG1_5752VENDOR_MASK 0x03c00003
-+#define NVRAM_CFG1_5762VENDOR_MASK 0x03e00003
-+#define FLASH_5752VENDOR_ATMEL_EEPROM_64KHZ 0x00000000
-+#define FLASH_5752VENDOR_ATMEL_EEPROM_376KHZ 0x02000000
-+#define FLASH_5752VENDOR_ATMEL_FLASH_BUFFERED 0x02000003
-+#define FLASH_5752VENDOR_ST_M45PE10 0x02400000
-+#define FLASH_5752VENDOR_ST_M45PE20 0x02400002
-+#define FLASH_5752VENDOR_ST_M45PE40 0x02400001
-+#define FLASH_5755VENDOR_ATMEL_FLASH_1 0x03400001
-+#define FLASH_5755VENDOR_ATMEL_FLASH_2 0x03400002
-+#define FLASH_5755VENDOR_ATMEL_FLASH_3 0x03400000
-+#define FLASH_5755VENDOR_ATMEL_FLASH_4 0x00000003
-+#define FLASH_5755VENDOR_ATMEL_FLASH_5 0x02000003
-+#define FLASH_5755VENDOR_ATMEL_EEPROM_64KHZ 0x03c00003
-+#define FLASH_5755VENDOR_ATMEL_EEPROM_376KHZ 0x03c00002
-+#define FLASH_5787VENDOR_ATMEL_EEPROM_64KHZ 0x03000003
-+#define FLASH_5787VENDOR_ATMEL_EEPROM_376KHZ 0x03000002
-+#define FLASH_5787VENDOR_MICRO_EEPROM_64KHZ 0x03000000
-+#define FLASH_5787VENDOR_MICRO_EEPROM_376KHZ 0x02000000
-+#define FLASH_5761VENDOR_ATMEL_MDB021D 0x00800003
-+#define FLASH_5761VENDOR_ATMEL_MDB041D 0x00800000
-+#define FLASH_5761VENDOR_ATMEL_MDB081D 0x00800002
-+#define FLASH_5761VENDOR_ATMEL_MDB161D 0x00800001
-+#define FLASH_5761VENDOR_ATMEL_ADB021D 0x00000003
-+#define FLASH_5761VENDOR_ATMEL_ADB041D 0x00000000
-+#define FLASH_5761VENDOR_ATMEL_ADB081D 0x00000002
-+#define FLASH_5761VENDOR_ATMEL_ADB161D 0x00000001
-+#define FLASH_5761VENDOR_ST_M_M45PE20 0x02800001
-+#define FLASH_5761VENDOR_ST_M_M45PE40 0x02800000
-+#define FLASH_5761VENDOR_ST_M_M45PE80 0x02800002
-+#define FLASH_5761VENDOR_ST_M_M45PE16 0x02800003
-+#define FLASH_5761VENDOR_ST_A_M45PE20 0x02000001
-+#define FLASH_5761VENDOR_ST_A_M45PE40 0x02000000
-+#define FLASH_5761VENDOR_ST_A_M45PE80 0x02000002
-+#define FLASH_5761VENDOR_ST_A_M45PE16 0x02000003
-+#define FLASH_57780VENDOR_ATMEL_AT45DB011D 0x00400000
-+#define FLASH_57780VENDOR_ATMEL_AT45DB011B 0x03400000
-+#define FLASH_57780VENDOR_ATMEL_AT45DB021D 0x00400002
-+#define FLASH_57780VENDOR_ATMEL_AT45DB021B 0x03400002
-+#define FLASH_57780VENDOR_ATMEL_AT45DB041D 0x00400001
-+#define FLASH_57780VENDOR_ATMEL_AT45DB041B 0x03400001
-+#define FLASH_5717VENDOR_ATMEL_EEPROM 0x02000001
-+#define FLASH_5717VENDOR_MICRO_EEPROM 0x02000003
-+#define FLASH_5717VENDOR_ATMEL_MDB011D 0x01000001
-+#define FLASH_5717VENDOR_ATMEL_MDB021D 0x01000003
-+#define FLASH_5717VENDOR_ST_M_M25PE10 0x02000000
-+#define FLASH_5717VENDOR_ST_M_M25PE20 0x02000002
-+#define FLASH_5717VENDOR_ST_M_M45PE10 0x00000001
-+#define FLASH_5717VENDOR_ST_M_M45PE20 0x00000003
-+#define FLASH_5717VENDOR_ATMEL_ADB011B 0x01400000
-+#define FLASH_5717VENDOR_ATMEL_ADB021B 0x01400002
-+#define FLASH_5717VENDOR_ATMEL_ADB011D 0x01400001
-+#define FLASH_5717VENDOR_ATMEL_ADB021D 0x01400003
-+#define FLASH_5717VENDOR_ST_A_M25PE10 0x02400000
-+#define FLASH_5717VENDOR_ST_A_M25PE20 0x02400002
-+#define FLASH_5717VENDOR_ST_A_M45PE10 0x02400001
-+#define FLASH_5717VENDOR_ST_A_M45PE20 0x02400003
-+#define FLASH_5717VENDOR_ATMEL_45USPT 0x03400000
-+#define FLASH_5717VENDOR_ST_25USPT 0x03400002
-+#define FLASH_5717VENDOR_ST_45USPT 0x03400001
-+#define FLASH_5720_EEPROM_HD 0x00000001
-+#define FLASH_5720_EEPROM_LD 0x00000003
-+#define FLASH_5762_EEPROM_HD 0x02000001
-+#define FLASH_5762_EEPROM_LD 0x02000003
-+#define FLASH_5762_MX25L_100 0x00800000
-+#define FLASH_5762_MX25L_200 0x00800002
-+#define FLASH_5762_MX25L_400 0x00800001
-+#define FLASH_5762_MX25L_800 0x00800003
-+#define FLASH_5762_MX25L_160_320 0x03800002
-+#define FLASH_5720VENDOR_M_ATMEL_DB011D 0x01000000
-+#define FLASH_5720VENDOR_M_ATMEL_DB021D 0x01000002
-+#define FLASH_5720VENDOR_M_ATMEL_DB041D 0x01000001
-+#define FLASH_5720VENDOR_M_ATMEL_DB081D 0x01000003
-+#define FLASH_5720VENDOR_M_ST_M25PE10 0x02000000
-+#define FLASH_5720VENDOR_M_ST_M25PE20 0x02000002
-+#define FLASH_5720VENDOR_M_ST_M25PE40 0x02000001
-+#define FLASH_5720VENDOR_M_ST_M25PE80 0x02000003
-+#define FLASH_5720VENDOR_M_ST_M45PE10 0x03000000
-+#define FLASH_5720VENDOR_M_ST_M45PE20 0x03000002
-+#define FLASH_5720VENDOR_M_ST_M45PE40 0x03000001
-+#define FLASH_5720VENDOR_M_ST_M45PE80 0x03000003
-+#define FLASH_5720VENDOR_A_ATMEL_DB011B 0x01800000
-+#define FLASH_5720VENDOR_A_ATMEL_DB021B 0x01800002
-+#define FLASH_5720VENDOR_A_ATMEL_DB041B 0x01800001
-+#define FLASH_5720VENDOR_A_ATMEL_DB011D 0x01c00000
-+#define FLASH_5720VENDOR_A_ATMEL_DB021D 0x01c00002
-+#define FLASH_5720VENDOR_A_ATMEL_DB041D 0x01c00001
-+#define FLASH_5720VENDOR_A_ATMEL_DB081D 0x01c00003
-+#define FLASH_5720VENDOR_A_ST_M25PE10 0x02800000
-+#define FLASH_5720VENDOR_A_ST_M25PE20 0x02800002
-+#define FLASH_5720VENDOR_A_ST_M25PE40 0x02800001
-+#define FLASH_5720VENDOR_A_ST_M25PE80 0x02800003
-+#define FLASH_5720VENDOR_A_ST_M45PE10 0x02c00000
-+#define FLASH_5720VENDOR_A_ST_M45PE20 0x02c00002
-+#define FLASH_5720VENDOR_A_ST_M45PE40 0x02c00001
-+#define FLASH_5720VENDOR_A_ST_M45PE80 0x02c00003
-+#define FLASH_5720VENDOR_ATMEL_45USPT 0x03c00000
-+#define FLASH_5720VENDOR_ST_25USPT 0x03c00002
-+#define FLASH_5720VENDOR_ST_45USPT 0x03c00001
-+#define NVRAM_CFG1_5752PAGE_SIZE_MASK 0x70000000
-+#define FLASH_5752PAGE_SIZE_256 0x00000000
-+#define FLASH_5752PAGE_SIZE_512 0x10000000
-+#define FLASH_5752PAGE_SIZE_1K 0x20000000
-+#define FLASH_5752PAGE_SIZE_2K 0x30000000
-+#define FLASH_5752PAGE_SIZE_4K 0x40000000
-+#define FLASH_5752PAGE_SIZE_264 0x50000000
-+#define FLASH_5752PAGE_SIZE_528 0x60000000
-+#define NVRAM_CFG2 0x00007018
-+#define NVRAM_CFG3 0x0000701c
-+#define NVRAM_SWARB 0x00007020
-+#define SWARB_REQ_SET0 0x00000001
-+#define SWARB_REQ_SET1 0x00000002
-+#define SWARB_REQ_SET2 0x00000004
-+#define SWARB_REQ_SET3 0x00000008
-+#define SWARB_REQ_CLR0 0x00000010
-+#define SWARB_REQ_CLR1 0x00000020
-+#define SWARB_REQ_CLR2 0x00000040
-+#define SWARB_REQ_CLR3 0x00000080
-+#define SWARB_GNT0 0x00000100
-+#define SWARB_GNT1 0x00000200
-+#define SWARB_GNT2 0x00000400
-+#define SWARB_GNT3 0x00000800
-+#define SWARB_REQ0 0x00001000
-+#define SWARB_REQ1 0x00002000
-+#define SWARB_REQ2 0x00004000
-+#define SWARB_REQ3 0x00008000
-+#define NVRAM_ACCESS 0x00007024
-+#define ACCESS_ENABLE 0x00000001
-+#define ACCESS_WR_ENABLE 0x00000002
-+#define NVRAM_WRITE1 0x00007028
-+/* 0x702c unused */
-+
-+#define NVRAM_ADDR_LOCKOUT 0x00007030
-+#define NVRAM_AUTOSENSE_STATUS 0x00007038
-+#define AUTOSENSE_DEVID 0x00000010
-+#define AUTOSENSE_DEVID_MASK 0x00000007
-+#define AUTOSENSE_SIZE_IN_MB 17
-+/* 0x703c --> 0x7500 unused */
-+
-+#define OTP_MODE 0x00007500
-+#define OTP_MODE_OTP_THRU_GRC 0x00000001
-+#define OTP_CTRL 0x00007504
-+#define OTP_CTRL_OTP_PROG_ENABLE 0x00200000
-+#define OTP_CTRL_OTP_CMD_READ 0x00000000
-+#define OTP_CTRL_OTP_CMD_INIT 0x00000008
-+#define OTP_CTRL_OTP_CMD_START 0x00000001
-+#define OTP_STATUS 0x00007508
-+#define OTP_STATUS_CMD_DONE 0x00000001
-+#define OTP_ADDRESS 0x0000750c
-+#define OTP_ADDRESS_MAGIC1 0x000000a0
-+#define OTP_ADDRESS_MAGIC2 0x00000080
-+/* 0x7510 unused */
-+
-+#define OTP_READ_DATA 0x00007514
-+/* 0x7518 --> 0x7c04 unused */
-+
-+#define PCIE_TRANSACTION_CFG 0x00007c04
-+#define PCIE_TRANS_CFG_1SHOT_MSI 0x20000000
-+#define PCIE_TRANS_CFG_LOM 0x00000020
-+/* 0x7c08 --> 0x7d28 unused */
-+
-+#define PCIE_PWR_MGMT_THRESH 0x00007d28
-+#define PCIE_PWR_MGMT_L1_THRESH_MSK 0x0000ff00
-+#define PCIE_PWR_MGMT_L1_THRESH_4MS 0x0000ff00
-+#define PCIE_PWR_MGMT_EXT_ASPM_TMR_EN 0x01000000
-+/* 0x7d2c --> 0x7d54 unused */
-+
-+#define TG3_PCIE_LNKCTL 0x00007d54
-+#define TG3_PCIE_LNKCTL_L1_PLL_PD_EN 0x00000008
-+#define TG3_PCIE_LNKCTL_L1_PLL_PD_DIS 0x00000080
-+/* 0x7d58 --> 0x7e70 unused */
-+
-+#define TG3_PCIE_PHY_TSTCTL 0x00007e2c
-+#define TG3_PCIE_PHY_TSTCTL_PCIE10 0x00000040
-+#define TG3_PCIE_PHY_TSTCTL_PSCRAM 0x00000020
-+
-+#define TG3_PCIE_EIDLE_DELAY 0x00007e70
-+#define TG3_PCIE_EIDLE_DELAY_MASK 0x0000001f
-+#define TG3_PCIE_EIDLE_DELAY_13_CLKS 0x0000000c
-+/* 0x7e74 --> 0x8000 unused */
-+
-+/* Alternate PCIE definitions */
-+#define TG3_PCIE_TLDLPL_PORT 0x00007c00
-+#define TG3_PCIE_DL_LO_FTSMAX 0x0000000c
-+#define TG3_PCIE_DL_LO_FTSMAX_MSK 0x000000ff
-+#define TG3_PCIE_DL_LO_FTSMAX_VAL 0x0000002c
-+#define TG3_PCIE_PL_LO_PHYCTL1 0x00000004
-+#define TG3_PCIE_PL_LO_PHYCTL1_L1PLLPD_EN 0x00001000
-+#define TG3_PCIE_PL_LO_PHYCTL5 0x00000014
-+#define TG3_PCIE_PL_LO_PHYCTL5_DIS_L2CLKREQ 0x80000000
-+
-+#define TG3_REG_BLK_SIZE 0x00008000
-+
-+/* OTP bit definitions */
-+#define TG3_OTP_AGCTGT_MASK 0x000000e0
-+#define TG3_OTP_AGCTGT_SHIFT 1
-+#define TG3_OTP_HPFFLTR_MASK 0x00000300
-+#define TG3_OTP_HPFFLTR_SHIFT 1
-+#define TG3_OTP_HPFOVER_MASK 0x00000400
-+#define TG3_OTP_HPFOVER_SHIFT 1
-+#define TG3_OTP_LPFDIS_MASK 0x00000800
-+#define TG3_OTP_LPFDIS_SHIFT 11
-+#define TG3_OTP_VDAC_MASK 0xff000000
-+#define TG3_OTP_VDAC_SHIFT 24
-+#define TG3_OTP_10BTAMP_MASK 0x0000f000
-+#define TG3_OTP_10BTAMP_SHIFT 8
-+#define TG3_OTP_ROFF_MASK 0x00e00000
-+#define TG3_OTP_ROFF_SHIFT 11
-+#define TG3_OTP_RCOFF_MASK 0x001c0000
-+#define TG3_OTP_RCOFF_SHIFT 16
-+
-+#define TG3_OTP_DEFAULT 0x286c1640
-+
-+
-+/* Hardware Legacy NVRAM layout */
-+#define TG3_NVM_VPD_OFF 0x100
-+#define TG3_NVM_VPD_LEN 256
-+
-+/* Hardware Selfboot NVRAM layout */
-+#define TG3_NVM_HWSB_CFG1 0x00000004
-+#define TG3_NVM_HWSB_CFG1_MAJMSK 0xf8000000
-+#define TG3_NVM_HWSB_CFG1_MAJSFT 27
-+#define TG3_NVM_HWSB_CFG1_MINMSK 0x07c00000
-+#define TG3_NVM_HWSB_CFG1_MINSFT 22
-+
-+#define TG3_EEPROM_MAGIC 0x669955aa
-+#define TG3_EEPROM_MAGIC_FW 0xa5000000
-+#define TG3_EEPROM_MAGIC_FW_MSK 0xff000000
-+#define TG3_EEPROM_SB_FORMAT_MASK 0x00e00000
-+#define TG3_EEPROM_SB_FORMAT_1 0x00200000
-+#define TG3_EEPROM_SB_REVISION_MASK 0x001f0000
-+#define TG3_EEPROM_SB_REVISION_0 0x00000000
-+#define TG3_EEPROM_SB_REVISION_2 0x00020000
-+#define TG3_EEPROM_SB_REVISION_3 0x00030000
-+#define TG3_EEPROM_SB_REVISION_4 0x00040000
-+#define TG3_EEPROM_SB_REVISION_5 0x00050000
-+#define TG3_EEPROM_SB_REVISION_6 0x00060000
-+#define TG3_EEPROM_MAGIC_HW 0xabcd
-+#define TG3_EEPROM_MAGIC_HW_MSK 0xffff
-+
-+#define TG3_NVM_DIR_START 0x18
-+#define TG3_NVM_DIR_END 0x78
-+#define TG3_NVM_DIRENT_SIZE 0xc
-+#define TG3_NVM_DIRTYPE_SHIFT 24
-+#define TG3_NVM_DIRTYPE_LENMSK 0x003fffff
-+#define TG3_NVM_DIRTYPE_ASFINI 1
-+#define TG3_NVM_DIRTYPE_EXTVPD 20
-+#define TG3_NVM_PTREV_BCVER 0x94
-+#define TG3_NVM_BCVER_MAJMSK 0x0000ff00
-+#define TG3_NVM_BCVER_MAJSFT 8
-+#define TG3_NVM_BCVER_MINMSK 0x000000ff
-+
-+#define TG3_EEPROM_SB_F1R0_EDH_OFF 0x10
-+#define TG3_EEPROM_SB_F1R2_EDH_OFF 0x14
-+#define TG3_EEPROM_SB_F1R2_MBA_OFF 0x10
-+#define TG3_EEPROM_SB_F1R3_EDH_OFF 0x18
-+#define TG3_EEPROM_SB_F1R4_EDH_OFF 0x1c
-+#define TG3_EEPROM_SB_F1R5_EDH_OFF 0x20
-+#define TG3_EEPROM_SB_F1R6_EDH_OFF 0x4c
-+#define TG3_EEPROM_SB_EDH_MAJ_MASK 0x00000700
-+#define TG3_EEPROM_SB_EDH_MAJ_SHFT 8
-+#define TG3_EEPROM_SB_EDH_MIN_MASK 0x000000ff
-+#define TG3_EEPROM_SB_EDH_BLD_MASK 0x0000f800
-+#define TG3_EEPROM_SB_EDH_BLD_SHFT 11
-+
-+
-+/* 32K Window into NIC internal memory */
-+#define NIC_SRAM_WIN_BASE 0x00008000
-+
-+/* Offsets into first 32k of NIC internal memory. */
-+#define NIC_SRAM_PAGE_ZERO 0x00000000
-+#define NIC_SRAM_SEND_RCB 0x00000100 /* 16 * TG3_BDINFO_... */
-+#define NIC_SRAM_RCV_RET_RCB 0x00000200 /* 16 * TG3_BDINFO_... */
-+#define NIC_SRAM_STATS_BLK 0x00000300
-+#define NIC_SRAM_STATUS_BLK 0x00000b00
-+
-+#define NIC_SRAM_FIRMWARE_MBOX 0x00000b50
-+#define NIC_SRAM_FIRMWARE_MBOX_MAGIC1 0x4B657654
-+#define NIC_SRAM_FIRMWARE_MBOX_MAGIC2 0x4861764b /* !dma on linkchg */
-+
-+#define NIC_SRAM_DATA_SIG 0x00000b54
-+#define NIC_SRAM_DATA_SIG_MAGIC 0x4b657654 /* ascii for 'KevT' */
-+
-+#define NIC_SRAM_DATA_CFG 0x00000b58
-+#define NIC_SRAM_DATA_CFG_LED_MODE_MASK 0x0000000c
-+#define NIC_SRAM_DATA_CFG_LED_MODE_MAC 0x00000000
-+#define NIC_SRAM_DATA_CFG_LED_MODE_PHY_1 0x00000004
-+#define NIC_SRAM_DATA_CFG_LED_MODE_PHY_2 0x00000008
-+#define NIC_SRAM_DATA_CFG_PHY_TYPE_MASK 0x00000030
-+#define NIC_SRAM_DATA_CFG_PHY_TYPE_UNKNOWN 0x00000000
-+#define NIC_SRAM_DATA_CFG_PHY_TYPE_COPPER 0x00000010
-+#define NIC_SRAM_DATA_CFG_PHY_TYPE_FIBER 0x00000020
-+#define NIC_SRAM_DATA_CFG_WOL_ENABLE 0x00000040
-+#define NIC_SRAM_DATA_CFG_ASF_ENABLE 0x00000080
-+#define NIC_SRAM_DATA_CFG_EEPROM_WP 0x00000100
-+#define NIC_SRAM_DATA_CFG_MINI_PCI 0x00001000
-+#define NIC_SRAM_DATA_CFG_FIBER_WOL 0x00004000
-+#define NIC_SRAM_DATA_CFG_NO_GPIO2 0x00100000
-+#define NIC_SRAM_DATA_CFG_APE_ENABLE 0x00200000
-+
-+#define NIC_SRAM_DATA_VER 0x00000b5c
-+#define NIC_SRAM_DATA_VER_SHIFT 16
-+
-+#define NIC_SRAM_DATA_PHY_ID 0x00000b74
-+#define NIC_SRAM_DATA_PHY_ID1_MASK 0xffff0000
-+#define NIC_SRAM_DATA_PHY_ID2_MASK 0x0000ffff
-+
-+#define NIC_SRAM_FW_CMD_MBOX 0x00000b78
-+#define FWCMD_NICDRV_ALIVE 0x00000001
-+#define FWCMD_NICDRV_PAUSE_FW 0x00000002
-+#define FWCMD_NICDRV_IPV4ADDR_CHG 0x00000003
-+#define FWCMD_NICDRV_IPV6ADDR_CHG 0x00000004
-+#define FWCMD_NICDRV_FIX_DMAR 0x00000005
-+#define FWCMD_NICDRV_FIX_DMAW 0x00000006
-+#define FWCMD_NICDRV_LINK_UPDATE 0x0000000c
-+#define FWCMD_NICDRV_ALIVE2 0x0000000d
-+#define FWCMD_NICDRV_ALIVE3 0x0000000e
-+#define NIC_SRAM_FW_CMD_LEN_MBOX 0x00000b7c
-+#define NIC_SRAM_FW_CMD_DATA_MBOX 0x00000b80
-+#define NIC_SRAM_FW_ASF_STATUS_MBOX 0x00000c00
-+#define NIC_SRAM_FW_DRV_STATE_MBOX 0x00000c04
-+#define DRV_STATE_START 0x00000001
-+#define DRV_STATE_START_DONE 0x80000001
-+#define DRV_STATE_UNLOAD 0x00000002
-+#define DRV_STATE_UNLOAD_DONE 0x80000002
-+#define DRV_STATE_WOL 0x00000003
-+#define DRV_STATE_SUSPEND 0x00000004
-+
-+#define NIC_SRAM_FW_RESET_TYPE_MBOX 0x00000c08
-+
-+#define NIC_SRAM_MAC_ADDR_HIGH_MBOX 0x00000c14
-+#define NIC_SRAM_MAC_ADDR_LOW_MBOX 0x00000c18
-+
-+#define NIC_SRAM_WOL_MBOX 0x00000d30
-+#define WOL_SIGNATURE 0x474c0000
-+#define WOL_DRV_STATE_SHUTDOWN 0x00000001
-+#define WOL_DRV_WOL 0x00000002
-+#define WOL_SET_MAGIC_PKT 0x00000004
-+
-+#define NIC_SRAM_DATA_CFG_2 0x00000d38
-+
-+#define NIC_SRAM_DATA_CFG_2_APD_EN 0x00004000
-+#define SHASTA_EXT_LED_MODE_MASK 0x00018000
-+#define SHASTA_EXT_LED_LEGACY 0x00000000
-+#define SHASTA_EXT_LED_SHARED 0x00008000
-+#define SHASTA_EXT_LED_MAC 0x00010000
-+#define SHASTA_EXT_LED_COMBO 0x00018000
-+
-+#define NIC_SRAM_DATA_CFG_3 0x00000d3c
-+#define NIC_SRAM_ASPM_DEBOUNCE 0x00000002
-+#define NIC_SRAM_LNK_FLAP_AVOID 0x00400000
-+#define NIC_SRAM_1G_ON_VAUX_OK 0x00800000
-+
-+#define NIC_SRAM_DATA_CFG_4 0x00000d60
-+#define NIC_SRAM_GMII_MODE 0x00000002
-+#define NIC_SRAM_RGMII_INBAND_DISABLE 0x00000004
-+#define NIC_SRAM_RGMII_EXT_IBND_RX_EN 0x00000008
-+#define NIC_SRAM_RGMII_EXT_IBND_TX_EN 0x00000010
-+
-+#define NIC_SRAM_CPMU_STATUS 0x00000e00
-+#define NIC_SRAM_CPMUSTAT_SIG 0x0000362c
-+#define NIC_SRAM_CPMUSTAT_SIG_MSK 0x0000ffff
-+
-+#define NIC_SRAM_DATA_CFG_5 0x00000e0c
-+#define NIC_SRAM_DISABLE_1G_HALF_ADV 0x00000002
-+
-+#define NIC_SRAM_RX_MINI_BUFFER_DESC 0x00001000
-+
-+#define NIC_SRAM_DMA_DESC_POOL_BASE 0x00002000
-+#define NIC_SRAM_DMA_DESC_POOL_SIZE 0x00002000
-+#define NIC_SRAM_TX_BUFFER_DESC 0x00004000 /* 512 entries */
-+#define NIC_SRAM_RX_BUFFER_DESC 0x00006000 /* 256 entries */
-+#define NIC_SRAM_RX_JUMBO_BUFFER_DESC 0x00007000 /* 256 entries */
-+#define NIC_SRAM_MBUF_POOL_BASE 0x00008000
-+#define NIC_SRAM_MBUF_POOL_SIZE96 0x00018000
-+#define NIC_SRAM_MBUF_POOL_SIZE64 0x00010000
-+#define NIC_SRAM_MBUF_POOL_BASE5705 0x00010000
-+#define NIC_SRAM_MBUF_POOL_SIZE5705 0x0000e000
-+
-+#define TG3_SRAM_RXCPU_SCRATCH_BASE_57766 0x00030000
-+#define TG3_SRAM_RXCPU_SCRATCH_SIZE_57766 0x00010000
-+#define TG3_SBROM_IN_SERVICE_LOOP 0x51
-+
-+#define TG3_SRAM_RX_STD_BDCACHE_SIZE_5700 128
-+#define TG3_SRAM_RX_STD_BDCACHE_SIZE_5755 64
-+#define TG3_SRAM_RX_STD_BDCACHE_SIZE_5906 32
-+
-+#define TG3_SRAM_RX_JMB_BDCACHE_SIZE_5700 64
-+#define TG3_SRAM_RX_JMB_BDCACHE_SIZE_5717 16
-+
-+
-+/* Currently this is fixed. */
-+#define TG3_PHY_PCIE_ADDR 0x00
-+#define TG3_PHY_MII_ADDR 0x01
-+
-+
-+/*** Tigon3 specific PHY MII registers. ***/
-+#define MII_TG3_MMD_CTRL 0x0d /* MMD Access Control register */
-+#define MII_TG3_MMD_CTRL_DATA_NOINC 0x4000
-+#define MII_TG3_MMD_ADDRESS 0x0e /* MMD Address Data register */
-+
-+#define MII_TG3_EXT_CTRL 0x10 /* Extended control register */
-+#define MII_TG3_EXT_CTRL_FIFO_ELASTIC 0x0001
-+#define MII_TG3_EXT_CTRL_LNK3_LED_MODE 0x0002
-+#define MII_TG3_EXT_CTRL_FORCE_LED_OFF 0x0008
-+#define MII_TG3_EXT_CTRL_TBI 0x8000
-+
-+#define MII_TG3_EXT_STAT 0x11 /* Extended status register */
-+#define MII_TG3_EXT_STAT_MDIX 0x2000
-+#define MII_TG3_EXT_STAT_LPASS 0x0100
-+
-+#define MII_TG3_RXR_COUNTERS 0x14 /* Local/Remote Receiver Counts */
-+#define MII_TG3_DSP_RW_PORT 0x15 /* DSP coefficient read/write port */
-+#define MII_TG3_DSP_CONTROL 0x16 /* DSP control register */
-+#define MII_TG3_DSP_ADDRESS 0x17 /* DSP address register */
-+
-+#define MII_TG3_DSP_TAP1 0x0001
-+#define MII_TG3_DSP_TAP1_AGCTGT_DFLT 0x0007
-+#define MII_TG3_DSP_TAP26 0x001a
-+#define MII_TG3_DSP_TAP26_ALNOKO 0x0001
-+#define MII_TG3_DSP_TAP26_RMRXSTO 0x0002
-+#define MII_TG3_DSP_TAP26_OPCSINPT 0x0004
-+#define MII_TG3_DSP_AADJ1CH0 0x001f
-+#define MII_TG3_DSP_CH34TP2 0x4022
-+#define MII_TG3_DSP_CH34TP2_HIBW01 0x01ff
-+#define MII_TG3_DSP_AADJ1CH3 0x601f
-+#define MII_TG3_DSP_AADJ1CH3_ADCCKADJ 0x0002
-+#define MII_TG3_DSP_TLER 0x0d40 /* Top Level Expansion reg */
-+#define MII_TG3_DSP_TLER_AUTOGREEEN_EN 0x0001
-+#define MII_TG3_DSP_EXP1_INT_STAT 0x0f01
-+#define MII_TG3_DSP_EXP8 0x0f08
-+#define MII_TG3_DSP_EXP8_REJ2MHz 0x0001
-+#define MII_TG3_DSP_EXP8_AEDW 0x0200
-+#define MII_TG3_DSP_EXP75 0x0f75
-+#define MII_TG3_DSP_EXP75_SUP_CM_OSC 0x0001
-+#define MII_TG3_DSP_EXP96 0x0f96
-+#define MII_TG3_DSP_EXP97 0x0f97
-+
-+#define MII_TG3_AUX_CTRL 0x18 /* auxilliary control register */
-+
-+#define MII_TG3_AUXCTL_SHDWSEL_AUXCTL 0x0000
-+#define MII_TG3_AUXCTL_ACTL_TX_6DB 0x0400
-+#define MII_TG3_AUXCTL_ACTL_SMDSP_ENA 0x0800
-+#define MII_TG3_AUXCTL_ACTL_EXTPKTLEN 0x4000
-+#define MII_TG3_AUXCTL_ACTL_EXTLOOPBK 0x8000
-+
-+#define MII_TG3_AUXCTL_SHDWSEL_PWRCTL 0x0002
-+#define MII_TG3_AUXCTL_PCTL_WOL_EN 0x0008
-+#define MII_TG3_AUXCTL_PCTL_100TX_LPWR 0x0010
-+#define MII_TG3_AUXCTL_PCTL_SPR_ISOLATE 0x0020
-+#define MII_TG3_AUXCTL_PCTL_CL_AB_TXDAC 0x0040
-+#define MII_TG3_AUXCTL_PCTL_VREG_11V 0x0180
-+
-+#define MII_TG3_AUXCTL_SHDWSEL_MISCTEST 0x0004
-+
-+#define MII_TG3_AUXCTL_SHDWSEL_MISC 0x0007
-+#define MII_TG3_AUXCTL_MISC_WIRESPD_EN 0x0010
-+#define MII_TG3_AUXCTL_MISC_RGMII_OOBSC 0x0020
-+#define MII_TG3_AUXCTL_MISC_FORCE_AMDIX 0x0200
-+#define MII_TG3_AUXCTL_MISC_RDSEL_SHIFT 12
-+#define MII_TG3_AUXCTL_MISC_WREN 0x8000
-+
-+#define MII_TG3_AUX_STAT 0x19 /* auxilliary status register */
-+#define MII_TG3_AUX_STAT_LPASS 0x0004
-+#define MII_TG3_AUX_STAT_SPDMASK 0x0700
-+#define MII_TG3_AUX_STAT_10HALF 0x0100
-+#define MII_TG3_AUX_STAT_10FULL 0x0200
-+#define MII_TG3_AUX_STAT_100HALF 0x0300
-+#define MII_TG3_AUX_STAT_100_4 0x0400
-+#define MII_TG3_AUX_STAT_100FULL 0x0500
-+#define MII_TG3_AUX_STAT_1000HALF 0x0600
-+#define MII_TG3_AUX_STAT_1000FULL 0x0700
-+#define MII_TG3_AUX_STAT_100 0x0008
-+#define MII_TG3_AUX_STAT_FULL 0x0001
-+
-+#define MII_TG3_ISTAT 0x1a /* IRQ status register */
-+#define MII_TG3_IMASK 0x1b /* IRQ mask register */
-+
-+/* ISTAT/IMASK event bits */
-+#define MII_TG3_INT_LINKCHG 0x0002
-+#define MII_TG3_INT_SPEEDCHG 0x0004
-+#define MII_TG3_INT_DUPLEXCHG 0x0008
-+#define MII_TG3_INT_ANEG_PAGE_RX 0x0400
-+
-+#define MII_TG3_MISC_SHDW 0x1c /* Misc shadow register */
-+#define MII_TG3_MISC_SHDW_WREN 0x8000
-+
-+#define MII_TG3_MISC_SHDW_SCR5_C125OE 0x0001
-+#define MII_TG3_MISC_SHDW_SCR5_DLLAPD 0x0002
-+#define MII_TG3_MISC_SHDW_SCR5_SDTL 0x0004
-+#define MII_TG3_MISC_SHDW_SCR5_DLPTLM 0x0008
-+#define MII_TG3_MISC_SHDW_SCR5_LPED 0x0010
-+#define MII_TG3_MISC_SHDW_SCR5_TRDDAPD 0x0100
-+#define MII_TG3_MISC_SHDW_SCR5_SEL 0x1400
-+
-+#define MII_TG3_MISC_SHDW_APD_WKTM_84MS 0x0001
-+#define MII_TG3_MISC_SHDW_APD_ENABLE 0x0020
-+#define MII_TG3_MISC_SHDW_APD_SEL 0x2800
-+
-+#define MII_TG3_MISC_SHDW_RGMII_MODESEL0 0x0008
-+#define MII_TG3_MISC_SHDW_RGMII_MODESEL1 0x0010
-+#define MII_TG3_MISC_SHDW_RGMII_SEL 0x2c00
-+
-+#define MII_TG3_TEST1 0x1e
-+#define MII_TG3_TEST1_TRIM_EN 0x0010
-+#define MII_TG3_TEST1_CRC_EN 0x8000
-+
-+/* Clause 45 expansion registers */
-+#define TG3_CL45_D7_EEEADV_CAP 0x003c
-+#define TG3_CL45_D7_EEEADV_CAP_100TX 0x0002
-+#define TG3_CL45_D7_EEEADV_CAP_1000T 0x0004
-+#define TG3_CL45_D7_EEERES_STAT 0x803e
-+#define TG3_CL45_D7_EEERES_STAT_LP_100TX 0x0002
-+#define TG3_CL45_D7_EEERES_STAT_LP_1000T 0x0004
-+
-+
-+/* Fast Ethernet Tranceiver definitions */
-+#define MII_TG3_FET_PTEST 0x17
-+#define MII_TG3_FET_PTEST_TRIM_SEL 0x0010
-+#define MII_TG3_FET_PTEST_TRIM_2 0x0002
-+#define MII_TG3_FET_PTEST_FRC_TX_LINK 0x1000
-+#define MII_TG3_FET_PTEST_FRC_TX_LOCK 0x0800
-+
-+#define MII_TG3_FET_GEN_STAT 0x1c
-+#define MII_TG3_FET_GEN_STAT_MDIXSTAT 0x2000
-+
-+#define MII_TG3_FET_TEST 0x1f
-+#define MII_TG3_FET_SHADOW_EN 0x0080
-+
-+#define MII_TG3_FET_SHDW_MISCCTRL 0x10
-+#define MII_TG3_FET_SHDW_MISCCTRL_ELBK 0x1000
-+#define MII_TG3_FET_SHDW_MISCCTRL_MDIX 0x4000
-+
-+#define MII_TG3_FET_SHDW_AUXMODE4 0x1a
-+#define MII_TG3_FET_SHDW_AM4_LED_MODE1 0x0001
-+#define MII_TG3_FET_SHDW_AM4_LED_MASK 0x0003
-+#define MII_TG3_FET_SHDW_AUXMODE4_SBPD 0x0008
-+
-+#define MII_TG3_FET_SHDW_AUXSTAT2 0x1b
-+#define MII_TG3_FET_SHDW_AUXSTAT2_APD 0x0020
-+
-+/* Serdes PHY Register Definitions */
-+#define SERDES_TG3_1000X_STATUS 0x14
-+#define SERDES_TG3_SGMII_MODE 0x0001
-+#define SERDES_TG3_LINK_UP 0x0002
-+#define SERDES_TG3_FULL_DUPLEX 0x0004
-+#define SERDES_TG3_SPEED_100 0x0008
-+#define SERDES_TG3_SPEED_1000 0x0010
-+
-+/* APE registers. Accessible through BAR1 */
-+#define TG3_APE_GPIO_MSG 0x0008
-+#define TG3_APE_GPIO_MSG_SHIFT 4
-+#define TG3_APE_EVENT 0x000c
-+#define APE_EVENT_1 0x00000001
-+#define TG3_APE_LOCK_REQ 0x002c
-+#define APE_LOCK_REQ_DRIVER 0x00001000
-+#define TG3_APE_LOCK_GRANT 0x004c
-+#define APE_LOCK_GRANT_DRIVER 0x00001000
-+#define TG3_APE_STICKY_TMR 0x00b0
-+#define TG3_APE_OTP_CTRL 0x00e8
-+#define APE_OTP_CTRL_PROG_EN 0x200000
-+#define APE_OTP_CTRL_CMD_RD 0x000000
-+#define APE_OTP_CTRL_START 0x000001
-+#define TG3_APE_OTP_STATUS 0x00ec
-+#define APE_OTP_STATUS_CMD_DONE 0x000001
-+#define TG3_APE_OTP_ADDR 0x00f0
-+#define APE_OTP_ADDR_CPU_ENABLE 0x80000000
-+#define TG3_APE_OTP_RD_DATA 0x00f8
-+
-+#define OTP_ADDRESS_MAGIC0 0x00000050
-+#define TG3_OTP_MAGIC0_VALID(val) \
-+ ((((val) & 0xf0000000) == 0xa0000000) ||\
-+ (((val) & 0x0f000000) == 0x0a000000))
-+
-+/* APE shared memory. Accessible through BAR1 */
-+#define TG3_APE_SHMEM_BASE 0x4000
-+#define TG3_APE_SEG_SIG 0x4000
-+#define APE_SEG_SIG_MAGIC 0x41504521
-+#define TG3_APE_FW_STATUS 0x400c
-+#define APE_FW_STATUS_READY 0x00000100
-+#define TG3_APE_FW_FEATURES 0x4010
-+#define TG3_APE_FW_FEATURE_NCSI 0x00000002
-+#define TG3_APE_FW_VERSION 0x4018
-+#define APE_FW_VERSION_MAJMSK 0xff000000
-+#define APE_FW_VERSION_MAJSFT 24
-+#define APE_FW_VERSION_MINMSK 0x00ff0000
-+#define APE_FW_VERSION_MINSFT 16
-+#define APE_FW_VERSION_REVMSK 0x0000ff00
-+#define APE_FW_VERSION_REVSFT 8
-+#define APE_FW_VERSION_BLDMSK 0x000000ff
-+#define TG3_APE_SEG_MSG_BUF_OFF 0x401c
-+#define TG3_APE_SEG_MSG_BUF_LEN 0x4020
-+#define TG3_APE_HOST_SEG_SIG 0x4200
-+#define APE_HOST_SEG_SIG_MAGIC 0x484f5354
-+#define TG3_APE_HOST_SEG_LEN 0x4204
-+#define APE_HOST_SEG_LEN_MAGIC 0x00000020
-+#define TG3_APE_HOST_INIT_COUNT 0x4208
-+#define TG3_APE_HOST_DRIVER_ID 0x420c
-+#define APE_HOST_DRIVER_ID_LINUX 0xf0000000
-+#define APE_HOST_DRIVER_ID_ESX 0xfa000000
-+#if !defined(__VMKLNX__)
-+#define APE_HOST_DRIVER_ID_MAGIC(maj, min, rev) \
-+ (APE_HOST_DRIVER_ID_LINUX | (maj & 0xff) << 16 | (min & 0xff) << 8 |\
-+ (rev & 0xff))
-+#else
-+#define APE_HOST_DRIVER_ID_MAGIC(maj, min, rev) \
-+ (APE_HOST_DRIVER_ID_ESX | (maj & 0xff) << 16 | (min & 0xff) << 8 |\
-+ (rev & 0xff))
-+#endif
-+#define TG3_APE_HOST_BEHAVIOR 0x4210
-+#define APE_HOST_BEHAV_NO_PHYLOCK 0x00000001
-+#define TG3_APE_HOST_HEARTBEAT_INT_MS 0x4214
-+#define APE_HOST_HEARTBEAT_INT_DISABLE 0
-+#define APE_HOST_HEARTBEAT_INT_5SEC 5000
-+#define TG3_APE_HOST_HEARTBEAT_COUNT 0x4218
-+#define TG3_APE_HOST_DRVR_STATE 0x421c
-+#define TG3_APE_HOST_DRVR_STATE_START 0x00000001
-+#define TG3_APE_HOST_DRVR_STATE_UNLOAD 0x00000002
-+#define TG3_APE_HOST_DRVR_STATE_WOL 0x00000003
-+#define TG3_APE_HOST_WOL_SPEED 0x4224
-+#define TG3_APE_HOST_WOL_SPEED_AUTO 0x00008000
-+
-+#define TG3_APE_EVENT_STATUS 0x4300
-+
-+#define APE_EVENT_STATUS_DRIVER_EVNT 0x00000010
-+#define APE_EVENT_STATUS_STATE_CHNGE 0x00000500
-+#define APE_EVENT_STATUS_SCRTCHPD_READ 0x00001600
-+#define APE_EVENT_STATUS_SCRTCHPD_WRITE 0x00001700
-+#define APE_EVENT_STATUS_STATE_START 0x00010000
-+#define APE_EVENT_STATUS_STATE_UNLOAD 0x00020000
-+#define APE_EVENT_STATUS_STATE_WOL 0x00030000
-+#define APE_EVENT_STATUS_STATE_SUSPEND 0x00040000
-+#define APE_EVENT_STATUS_EVENT_PENDING 0x80000000
-+
-+#define TG3_APE_PER_LOCK_REQ 0x8400
-+#define APE_LOCK_PER_REQ_DRIVER 0x00001000
-+#define TG3_APE_PER_LOCK_GRANT 0x8420
-+#define APE_PER_LOCK_GRANT_DRIVER 0x00001000
-+
-+/* APE convenience enumerations. */
-+#define TG3_APE_LOCK_PHY0 0
-+#define TG3_APE_LOCK_GRC 1
-+#define TG3_APE_LOCK_PHY1 2
-+#define TG3_APE_LOCK_PHY2 3
-+#define TG3_APE_LOCK_MEM 4
-+#define TG3_APE_LOCK_PHY3 5
-+#define TG3_APE_LOCK_GPIO 7
-+#define TG3_APE_HB_INTERVAL (tp->ape_hb_interval)
-+
-+/* There are two ways to manage the TX descriptors on the tigon3.
-+ * Either the descriptors are in host DMA'able memory, or they
-+ * exist only in the cards on-chip SRAM. All 16 send bds are under
-+ * the same mode, they may not be configured individually.
-+ *
-+ * This driver always uses host memory TX descriptors.
-+ *
-+ * To use host memory TX descriptors:
-+ * 1) Set GRC_MODE_HOST_SENDBDS in GRC_MODE register.
-+ * Make sure GRC_MODE_4X_NIC_SEND_RINGS is clear.
-+ * 2) Allocate DMA'able memory.
-+ * 3) In NIC_SRAM_SEND_RCB (of desired index) of on-chip SRAM:
-+ * a) Set TG3_BDINFO_HOST_ADDR to DMA address of memory
-+ * obtained in step 2
-+ * b) Set TG3_BDINFO_NIC_ADDR to NIC_SRAM_TX_BUFFER_DESC.
-+ * c) Set len field of TG3_BDINFO_MAXLEN_FLAGS to number
-+ * of TX descriptors. Leave flags field clear.
-+ * 4) Access TX descriptors via host memory. The chip
-+ * will refetch into local SRAM as needed when producer
-+ * index mailboxes are updated.
-+ *
-+ * To use on-chip TX descriptors:
-+ * 1) Set GRC_MODE_4X_NIC_SEND_RINGS in GRC_MODE register.
-+ * Make sure GRC_MODE_HOST_SENDBDS is clear.
-+ * 2) In NIC_SRAM_SEND_RCB (of desired index) of on-chip SRAM:
-+ * a) Set TG3_BDINFO_HOST_ADDR to zero.
-+ * b) Set TG3_BDINFO_NIC_ADDR to NIC_SRAM_TX_BUFFER_DESC
-+ * c) TG3_BDINFO_MAXLEN_FLAGS is don't care.
-+ * 3) Access TX descriptors directly in on-chip SRAM
-+ * using normal {read,write}l(). (and not using
-+ * pointer dereferencing of ioremap()'d memory like
-+ * the broken Broadcom driver does)
-+ *
-+ * Note that BDINFO_FLAGS_DISABLED should be set in the flags field of
-+ * TG3_BDINFO_MAXLEN_FLAGS of all unused SEND_RCB indices.
-+ */
-+struct tg3_tx_buffer_desc {
-+ u32 addr_hi;
-+ u32 addr_lo;
-+
-+ u32 len_flags;
-+#define TXD_FLAG_TCPUDP_CSUM 0x0001
-+#define TXD_FLAG_IP_CSUM 0x0002
-+#define TXD_FLAG_END 0x0004
-+#define TXD_FLAG_IP_FRAG 0x0008
-+#define TXD_FLAG_JMB_PKT 0x0008
-+#define TXD_FLAG_IP_FRAG_END 0x0010
-+#define TXD_FLAG_HWTSTAMP 0x0020
-+#define TXD_FLAG_VLAN 0x0040
-+#define TXD_FLAG_COAL_NOW 0x0080
-+#define TXD_FLAG_CPU_PRE_DMA 0x0100
-+#define TXD_FLAG_CPU_POST_DMA 0x0200
-+#define TXD_FLAG_ADD_SRC_ADDR 0x1000
-+#define TXD_FLAG_CHOOSE_SRC_ADDR 0x6000
-+#define TXD_FLAG_NO_CRC 0x8000
-+#define TXD_LEN_SHIFT 16
-+
-+ u32 vlan_tag;
-+#define TXD_VLAN_TAG_SHIFT 0
-+#define TXD_MSS_SHIFT 16
-+};
-+
-+#define TXD_ADDR 0x00UL /* 64-bit */
-+#define TXD_LEN_FLAGS 0x08UL /* 32-bit (upper 16-bits are len) */
-+#define TXD_VLAN_TAG 0x0cUL /* 32-bit (upper 16-bits are tag) */
-+#define TXD_SIZE 0x10UL
-+
-+struct tg3_rx_buffer_desc {
-+ u32 addr_hi;
-+ u32 addr_lo;
-+
-+ u32 idx_len;
-+#define RXD_IDX_MASK 0xffff0000
-+#define RXD_IDX_SHIFT 16
-+#define RXD_LEN_MASK 0x0000ffff
-+#define RXD_LEN_SHIFT 0
-+
-+ u32 type_flags;
-+#define RXD_TYPE_SHIFT 16
-+#define RXD_FLAGS_SHIFT 0
-+
-+#define RXD_FLAG_END 0x0004
-+#define RXD_FLAG_MINI 0x0800
-+#define RXD_FLAG_JUMBO 0x0020
-+#define RXD_FLAG_VLAN 0x0040
-+#define RXD_FLAG_ERROR 0x0400
-+#define RXD_FLAG_IP_CSUM 0x1000
-+#define RXD_FLAG_TCPUDP_CSUM 0x2000
-+#define RXD_FLAG_IS_TCP 0x4000
-+#define RXD_FLAG_PTPSTAT_MASK 0x0210
-+#define RXD_FLAG_PTPSTAT_PTPV1 0x0010
-+#define RXD_FLAG_PTPSTAT_PTPV2 0x0200
-+
-+ u32 ip_tcp_csum;
-+#define RXD_IPCSUM_MASK 0xffff0000
-+#define RXD_IPCSUM_SHIFT 16
-+#define RXD_TCPCSUM_MASK 0x0000ffff
-+#define RXD_TCPCSUM_SHIFT 0
-+
-+ u32 err_vlan;
-+
-+#define RXD_VLAN_MASK 0x0000ffff
-+
-+#define RXD_ERR_BAD_CRC 0x00010000
-+#define RXD_ERR_COLLISION 0x00020000
-+#define RXD_ERR_LINK_LOST 0x00040000
-+#define RXD_ERR_PHY_DECODE 0x00080000
-+#define RXD_ERR_ODD_NIBBLE_RCVD_MII 0x00100000
-+#define RXD_ERR_MAC_ABRT 0x00200000
-+#define RXD_ERR_TOO_SMALL 0x00400000
-+#define RXD_ERR_NO_RESOURCES 0x00800000
-+#define RXD_ERR_HUGE_FRAME 0x01000000
-+
-+#define RXD_ERR_MASK (RXD_ERR_BAD_CRC | RXD_ERR_COLLISION | \
-+ RXD_ERR_LINK_LOST | RXD_ERR_PHY_DECODE | \
-+ RXD_ERR_MAC_ABRT | RXD_ERR_TOO_SMALL | \
-+ RXD_ERR_NO_RESOURCES | RXD_ERR_HUGE_FRAME)
-+
-+ u32 reserved;
-+ u32 opaque;
-+#define RXD_OPAQUE_INDEX_MASK 0x0000ffff
-+#define RXD_OPAQUE_INDEX_SHIFT 0
-+#define RXD_OPAQUE_RING_STD 0x00010000
-+#define RXD_OPAQUE_RING_JUMBO 0x00020000
-+#define RXD_OPAQUE_RING_MINI 0x00040000
-+#define RXD_OPAQUE_RING_MASK 0x00070000
-+};
-+
-+struct tg3_ext_rx_buffer_desc {
-+ struct {
-+ u32 addr_hi;
-+ u32 addr_lo;
-+ } addrlist[3];
-+ u32 len2_len1;
-+ u32 resv_len3;
-+ struct tg3_rx_buffer_desc std;
-+};
-+
-+/* We only use this when testing out the DMA engine
-+ * at probe time. This is the internal format of buffer
-+ * descriptors used by the chip at NIC_SRAM_DMA_DESCS.
-+ */
-+struct tg3_internal_buffer_desc {
-+ u32 addr_hi;
-+ u32 addr_lo;
-+ u32 nic_mbuf;
-+ /* XXX FIX THIS */
-+#ifdef __BIG_ENDIAN
-+ u16 cqid_sqid;
-+ u16 len;
-+#else
-+ u16 len;
-+ u16 cqid_sqid;
-+#endif
-+ u32 flags;
-+ u32 __cookie1;
-+ u32 __cookie2;
-+ u32 __cookie3;
-+};
-+
-+#define TG3_HW_STATUS_SIZE 0x50
-+struct tg3_hw_status {
-+ volatile u32 status;
-+#define SD_STATUS_UPDATED 0x00000001
-+#define SD_STATUS_LINK_CHG 0x00000002
-+#define SD_STATUS_ERROR 0x00000004
-+
-+ volatile u32 status_tag;
-+
-+#ifdef __BIG_ENDIAN
-+ volatile u16 rx_consumer;
-+ volatile u16 rx_jumbo_consumer;
-+#else
-+ volatile u16 rx_jumbo_consumer;
-+ volatile u16 rx_consumer;
-+#endif
-+
-+#ifdef __BIG_ENDIAN
-+ volatile u16 reserved;
-+ volatile u16 rx_mini_consumer;
-+#else
-+ volatile u16 rx_mini_consumer;
-+ volatile u16 reserved;
-+#endif
-+ struct {
-+#ifdef __BIG_ENDIAN
-+ volatile u16 tx_consumer;
-+ volatile u16 rx_producer;
-+#else
-+ volatile u16 rx_producer;
-+ volatile u16 tx_consumer;
-+#endif
-+ } idx[16];
-+};
-+
-+typedef struct {
-+ u32 high, low;
-+} tg3_stat64_t;
-+
-+struct tg3_hw_stats {
-+ u8 __reserved0[0x400-0x300];
-+
-+ /* Statistics maintained by Receive MAC. */
-+ tg3_stat64_t rx_octets;
-+ u64 __reserved1;
-+ tg3_stat64_t rx_fragments;
-+ tg3_stat64_t rx_ucast_packets;
-+ tg3_stat64_t rx_mcast_packets;
-+ tg3_stat64_t rx_bcast_packets;
-+ tg3_stat64_t rx_fcs_errors;
-+ tg3_stat64_t rx_align_errors;
-+ tg3_stat64_t rx_xon_pause_rcvd;
-+ tg3_stat64_t rx_xoff_pause_rcvd;
-+ tg3_stat64_t rx_mac_ctrl_rcvd;
-+ tg3_stat64_t rx_xoff_entered;
-+ tg3_stat64_t rx_frame_too_long_errors;
-+ tg3_stat64_t rx_jabbers;
-+ tg3_stat64_t rx_undersize_packets;
-+ tg3_stat64_t rx_in_length_errors;
-+ tg3_stat64_t rx_out_length_errors;
-+ tg3_stat64_t rx_64_or_less_octet_packets;
-+ tg3_stat64_t rx_65_to_127_octet_packets;
-+ tg3_stat64_t rx_128_to_255_octet_packets;
-+ tg3_stat64_t rx_256_to_511_octet_packets;
-+ tg3_stat64_t rx_512_to_1023_octet_packets;
-+ tg3_stat64_t rx_1024_to_1522_octet_packets;
-+ tg3_stat64_t rx_1523_to_2047_octet_packets;
-+ tg3_stat64_t rx_2048_to_4095_octet_packets;
-+ tg3_stat64_t rx_4096_to_8191_octet_packets;
-+ tg3_stat64_t rx_8192_to_9022_octet_packets;
-+
-+ u64 __unused0[37];
-+
-+ /* Statistics maintained by Transmit MAC. */
-+ tg3_stat64_t tx_octets;
-+ u64 __reserved2;
-+ tg3_stat64_t tx_collisions;
-+ tg3_stat64_t tx_xon_sent;
-+ tg3_stat64_t tx_xoff_sent;
-+ tg3_stat64_t tx_flow_control;
-+ tg3_stat64_t tx_mac_errors;
-+ tg3_stat64_t tx_single_collisions;
-+ tg3_stat64_t tx_mult_collisions;
-+ tg3_stat64_t tx_deferred;
-+ u64 __reserved3;
-+ tg3_stat64_t tx_excessive_collisions;
-+ tg3_stat64_t tx_late_collisions;
-+ tg3_stat64_t tx_collide_2times;
-+ tg3_stat64_t tx_collide_3times;
-+ tg3_stat64_t tx_collide_4times;
-+ tg3_stat64_t tx_collide_5times;
-+ tg3_stat64_t tx_collide_6times;
-+ tg3_stat64_t tx_collide_7times;
-+ tg3_stat64_t tx_collide_8times;
-+ tg3_stat64_t tx_collide_9times;
-+ tg3_stat64_t tx_collide_10times;
-+ tg3_stat64_t tx_collide_11times;
-+ tg3_stat64_t tx_collide_12times;
-+ tg3_stat64_t tx_collide_13times;
-+ tg3_stat64_t tx_collide_14times;
-+ tg3_stat64_t tx_collide_15times;
-+ tg3_stat64_t tx_ucast_packets;
-+ tg3_stat64_t tx_mcast_packets;
-+ tg3_stat64_t tx_bcast_packets;
-+ tg3_stat64_t tx_carrier_sense_errors;
-+ tg3_stat64_t tx_discards;
-+ tg3_stat64_t tx_errors;
-+
-+ u64 __unused1[31];
-+
-+ /* Statistics maintained by Receive List Placement. */
-+ tg3_stat64_t COS_rx_packets[16];
-+ tg3_stat64_t COS_rx_filter_dropped;
-+ tg3_stat64_t dma_writeq_full;
-+ tg3_stat64_t dma_write_prioq_full;
-+ tg3_stat64_t rxbds_empty;
-+ tg3_stat64_t rx_discards;
-+ tg3_stat64_t rx_errors;
-+ tg3_stat64_t rx_threshold_hit;
-+
-+ u64 __unused2[9];
-+
-+ /* Statistics maintained by Send Data Initiator. */
-+ tg3_stat64_t COS_out_packets[16];
-+ tg3_stat64_t dma_readq_full;
-+ tg3_stat64_t dma_read_prioq_full;
-+ tg3_stat64_t tx_comp_queue_full;
-+
-+ /* Statistics maintained by Host Coalescing. */
-+ tg3_stat64_t ring_set_send_prod_index;
-+ tg3_stat64_t ring_status_update;
-+ tg3_stat64_t nic_irqs;
-+ tg3_stat64_t nic_avoided_irqs;
-+ tg3_stat64_t nic_tx_threshold_hit;
-+
-+ /* NOT a part of the hardware statistics block format.
-+ * These stats are here as storage for tg3_periodic_fetch_stats().
-+ */
-+ tg3_stat64_t mbuf_lwm_thresh_hit;
-+
-+ u8 __reserved4[0xb00-0x9c8];
-+};
-+
-+#define TG3_SD_NUM_RECS 3
-+#define TG3_OCIR_LEN (sizeof(struct tg3_ocir))
-+#define TG3_OCIR_SIG_MAGIC 0x5253434f
-+#define TG3_OCIR_FLAG_ACTIVE 0x00000001
-+
-+#define TG3_TEMP_CAUTION_OFFSET 0xc8
-+#define TG3_TEMP_MAX_OFFSET 0xcc
-+#define TG3_TEMP_SENSOR_OFFSET 0xd4
-+
-+#define TG3_OCIR_DRVR_FEAT_CSUM 0x00000001
-+#define TG3_OCIR_DRVR_FEAT_TSO 0x00000002
-+#define TG3_OCIR_DRVR_FEAT_MASK 0xff
-+
-+#define TG3_OCIR_REFRESH_TMR_OFF 0x00000008
-+#define TG3_OCIR_UPDATE_TMR_OFF 0x0000000c
-+#define TG3_OCIR_PORT0_FLGS_OFF 0x0000002c
-+
-+
-+
-+struct tg3_ocir {
-+ u32 signature;
-+ u16 version_flags;
-+ u16 refresh_int;
-+ u32 refresh_tmr;
-+ u32 update_tmr;
-+ u32 dst_base_addr;
-+ u16 src_hdr_offset;
-+ u16 src_hdr_length;
-+ u16 src_data_offset;
-+ u16 src_data_length;
-+ u16 dst_hdr_offset;
-+ u16 dst_data_offset;
-+ u16 dst_reg_upd_offset;
-+ u16 dst_sem_offset;
-+ u32 reserved1[2];
-+ u32 port0_flags;
-+ u32 port1_flags;
-+ u32 port2_flags;
-+ u32 port3_flags;
-+ u32 reserved2[1];
-+};
-+
-+/* 'mapping' is superfluous as the chip does not write into
-+ * the tx/rx post rings so we could just fetch it from there.
-+ * But the cache behavior is better how we are doing it now.
-+ */
-+struct ring_info {
-+#ifdef BCM_HAS_BUILD_SKB
-+ u8 *data;
-+#else
-+ struct sk_buff *data;
-+#endif
-+ DEFINE_DMA_UNMAP_ADDR(mapping);
-+};
-+
-+struct tg3_tx_ring_info {
-+ struct sk_buff *skb;
-+ DEFINE_DMA_UNMAP_ADDR(mapping);
-+ bool fragmented;
-+};
-+
-+struct tg3_link_config {
-+ /* Describes what we're trying to get. */
-+ u32 advertising;
-+ u16 speed;
-+ u8 duplex;
-+ u8 autoneg;
-+ u8 flowctrl;
-+
-+ /* Describes what we actually have. */
-+ u8 active_flowctrl;
-+
-+ u8 active_duplex;
-+ u16 active_speed;
-+ u32 rmt_adv;
-+};
-+
-+struct tg3_bufmgr_config {
-+ u32 mbuf_read_dma_low_water;
-+ u32 mbuf_mac_rx_low_water;
-+ u32 mbuf_high_water;
-+
-+ u32 mbuf_read_dma_low_water_jumbo;
-+ u32 mbuf_mac_rx_low_water_jumbo;
-+ u32 mbuf_high_water_jumbo;
-+
-+ u32 dma_low_water;
-+ u32 dma_high_water;
-+};
-+
-+struct tg3_ethtool_stats {
-+ /* Statistics maintained by Receive MAC. */
-+ u64 rx_octets;
-+ u64 rx_fragments;
-+ u64 rx_ucast_packets;
-+ u64 rx_mcast_packets;
-+ u64 rx_bcast_packets;
-+ u64 rx_fcs_errors;
-+ u64 rx_align_errors;
-+ u64 rx_xon_pause_rcvd;
-+ u64 rx_xoff_pause_rcvd;
-+ u64 rx_mac_ctrl_rcvd;
-+ u64 rx_xoff_entered;
-+ u64 rx_frame_too_long_errors;
-+ u64 rx_jabbers;
-+ u64 rx_undersize_packets;
-+ u64 rx_in_length_errors;
-+ u64 rx_out_length_errors;
-+ u64 rx_64_or_less_octet_packets;
-+ u64 rx_65_to_127_octet_packets;
-+ u64 rx_128_to_255_octet_packets;
-+ u64 rx_256_to_511_octet_packets;
-+ u64 rx_512_to_1023_octet_packets;
-+ u64 rx_1024_to_1522_octet_packets;
-+ u64 rx_1523_to_2047_octet_packets;
-+ u64 rx_2048_to_4095_octet_packets;
-+ u64 rx_4096_to_8191_octet_packets;
-+ u64 rx_8192_to_9022_octet_packets;
-+
-+ /* Statistics maintained by Transmit MAC. */
-+ u64 tx_octets;
-+ u64 tx_collisions;
-+ u64 tx_xon_sent;
-+ u64 tx_xoff_sent;
-+ u64 tx_flow_control;
-+ u64 tx_mac_errors;
-+ u64 tx_single_collisions;
-+ u64 tx_mult_collisions;
-+ u64 tx_deferred;
-+ u64 tx_excessive_collisions;
-+ u64 tx_late_collisions;
-+ u64 tx_collide_2times;
-+ u64 tx_collide_3times;
-+ u64 tx_collide_4times;
-+ u64 tx_collide_5times;
-+ u64 tx_collide_6times;
-+ u64 tx_collide_7times;
-+ u64 tx_collide_8times;
-+ u64 tx_collide_9times;
-+ u64 tx_collide_10times;
-+ u64 tx_collide_11times;
-+ u64 tx_collide_12times;
-+ u64 tx_collide_13times;
-+ u64 tx_collide_14times;
-+ u64 tx_collide_15times;
-+ u64 tx_ucast_packets;
-+ u64 tx_mcast_packets;
-+ u64 tx_bcast_packets;
-+ u64 tx_carrier_sense_errors;
-+ u64 tx_discards;
-+ u64 tx_errors;
-+
-+ /* Statistics maintained by Receive List Placement. */
-+ u64 dma_writeq_full;
-+ u64 dma_write_prioq_full;
-+ u64 rxbds_empty;
-+ u64 rx_discards;
-+ u64 rx_errors;
-+ u64 rx_threshold_hit;
-+
-+ /* Statistics maintained by Send Data Initiator. */
-+ u64 dma_readq_full;
-+ u64 dma_read_prioq_full;
-+ u64 tx_comp_queue_full;
-+
-+ /* Statistics maintained by Host Coalescing. */
-+ u64 ring_set_send_prod_index;
-+ u64 ring_status_update;
-+ u64 nic_irqs;
-+ u64 nic_avoided_irqs;
-+ u64 nic_tx_threshold_hit;
-+
-+ u64 mbuf_lwm_thresh_hit;
-+ u64 dma_4g_cross;
-+#if !defined(__VMKLNX__)
-+ u64 recoverable_err;
-+ u64 unrecoverable_err;
-+#endif
-+};
-+
-+#if defined(__VMKLNX__)
-+#include "tg3_vmware.h"
-+#endif
-+
-+struct tg3_rx_prodring_set {
-+#ifdef TG3_VMWARE_NETQ_ENABLE
-+ u32 rx_std_mbox;
-+ u32 rx_jmb_mbox;
-+#endif
-+ u32 rx_std_prod_idx;
-+ u32 rx_std_cons_idx;
-+ u32 rx_jmb_prod_idx;
-+ u32 rx_jmb_cons_idx;
-+ struct tg3_rx_buffer_desc *rx_std;
-+ struct tg3_ext_rx_buffer_desc *rx_jmb;
-+ struct ring_info *rx_std_buffers;
-+ struct ring_info *rx_jmb_buffers;
-+ dma_addr_t rx_std_mapping;
-+ dma_addr_t rx_jmb_mapping;
-+};
-+
-+#define TG3_RSS_MAX_NUM_QS 4
-+#define TG3_IRQ_MAX_VECS_RSS TG3_RSS_MAX_NUM_QS + 1
-+
-+#if defined(__VMKLNX__)
-+#if defined(TG3_INBOX)
-+ #define TG3_IRQ_MAX_VECS 1
-+#elif defined(TG3_VMWARE_NETQ_ENABLE)
-+ #define TG3_IRQ_MAX_VECS_IOV 17
-+ #define TG3_IRQ_MAX_VECS TG3_IRQ_MAX_VECS_IOV
-+#endif
-+#endif /* __VMKLNX__ */
-+
-+#ifndef TG3_IRQ_MAX_VECS
-+#define TG3_IRQ_MAX_VECS TG3_IRQ_MAX_VECS_RSS
-+#endif
-+
-+struct tg3_napi {
-+#ifdef TG3_NAPI
-+ struct napi_struct napi ____cacheline_aligned;
-+#endif
-+ struct tg3 *tp;
-+ struct tg3_hw_status *hw_status;
-+
-+ u32 chk_msi_cnt;
-+ u32 last_tag;
-+ u32 last_irq_tag;
-+ u32 int_mbox;
-+ u32 coal_now;
-+
-+ u32 consmbox ____cacheline_aligned;
-+ u32 rx_rcb_ptr;
-+ u32 last_rx_cons;
-+ volatile u16 *rx_rcb_prod_idx;
-+ struct tg3_rx_prodring_set *srcprodring;
-+ struct tg3_rx_prodring_set prodring;
-+ struct tg3_rx_buffer_desc *rx_rcb;
-+
-+ u32 tx_prod ____cacheline_aligned;
-+ u32 tx_cons;
-+ u32 tx_pending;
-+ u32 last_tx_cons;
-+ u32 prodmbox;
-+ struct tg3_tx_buffer_desc *tx_ring;
-+ struct tg3_tx_ring_info *tx_buffers;
-+
-+ dma_addr_t status_mapping;
-+ dma_addr_t rx_rcb_mapping;
-+ dma_addr_t tx_desc_mapping;
-+
-+ char irq_lbl[IFNAMSIZ];
-+ unsigned int irq_vec;
-+
-+#if defined(__VMKLNX__) && !defined(TG3_VMWARE_NETQ_DISABLE)
-+ struct tg3_netq_napi netq;
-+#endif
-+};
-+
-+enum TG3_FLAGS {
-+ TG3_FLAG_TAGGED_STATUS = 0,
-+ TG3_FLAG_TXD_MBOX_HWBUG,
-+ TG3_FLAG_USE_LINKCHG_REG,
-+ TG3_FLAG_ERROR_PROCESSED,
-+ TG3_FLAG_ENABLE_ASF,
-+ TG3_FLAG_ASPM_WORKAROUND,
-+ TG3_FLAG_POLL_SERDES,
-+ TG3_FLAG_POLL_CPMU_LINK,
-+ TG3_FLAG_MBOX_WRITE_REORDER,
-+ TG3_FLAG_PCIX_TARGET_HWBUG,
-+ TG3_FLAG_WOL_SPEED_100MB,
-+ TG3_FLAG_WOL_ENABLE,
-+ TG3_FLAG_EEPROM_WRITE_PROT,
-+ TG3_FLAG_NVRAM,
-+ TG3_FLAG_NVRAM_BUFFERED,
-+ TG3_FLAG_SUPPORT_MSI,
-+ TG3_FLAG_SUPPORT_MSIX,
-+ TG3_FLAG_PCIX_MODE,
-+ TG3_FLAG_PCI_HIGH_SPEED,
-+ TG3_FLAG_PCI_32BIT,
-+ TG3_FLAG_SRAM_USE_CONFIG,
-+ TG3_FLAG_TX_RECOVERY_PENDING,
-+ TG3_FLAG_WOL_CAP,
-+ TG3_FLAG_JUMBO_RING_ENABLE,
-+ TG3_FLAG_PAUSE_AUTONEG,
-+ TG3_FLAG_CPMU_PRESENT,
-+ TG3_FLAG_40BIT_DMA_BUG,
-+ TG3_FLAG_BROKEN_CHECKSUMS,
-+ TG3_FLAG_JUMBO_CAPABLE,
-+ TG3_FLAG_CHIP_RESETTING,
-+ TG3_FLAG_INIT_COMPLETE,
-+ TG3_FLAG_MAX_RXPEND_64,
-+ TG3_FLAG_PCI_EXPRESS, /* BCM5785 + pci_is_pcie() */
-+ TG3_FLAG_ASF_NEW_HANDSHAKE,
-+ TG3_FLAG_HW_AUTONEG,
-+ TG3_FLAG_IS_NIC,
-+ TG3_FLAG_FLASH,
-+ TG3_FLAG_FW_TSO,
-+ TG3_FLAG_HW_TSO_1,
-+ TG3_FLAG_HW_TSO_2,
-+ TG3_FLAG_HW_TSO_3,
-+ TG3_FLAG_TSO_CAPABLE,
-+ TG3_FLAG_TSO_BUG,
-+ TG3_FLAG_USING_MSI,
-+ TG3_FLAG_USING_MSIX,
-+ TG3_FLAG_ICH_WORKAROUND,
-+ TG3_FLAG_1SHOT_MSI,
-+ TG3_FLAG_NO_FWARE_REPORTED,
-+ TG3_FLAG_NO_NVRAM_ADDR_TRANS,
-+ TG3_FLAG_ENABLE_APE,
-+ TG3_FLAG_PROTECTED_NVRAM,
-+ TG3_FLAG_5701_DMA_BUG,
-+ TG3_FLAG_USE_PHYLIB,
-+ TG3_FLAG_MDIOBUS_INITED,
-+ TG3_FLAG_LRG_PROD_RING_CAP,
-+ TG3_FLAG_RGMII_INBAND_DISABLE,
-+ TG3_FLAG_RGMII_EXT_IBND_RX_EN,
-+ TG3_FLAG_RGMII_EXT_IBND_TX_EN,
-+ TG3_FLAG_CLKREQ_BUG,
-+ TG3_FLAG_NO_NVRAM,
-+ TG3_FLAG_ENABLE_RSS,
-+ TG3_FLAG_ENABLE_TSS,
-+ TG3_FLAG_SHORT_DMA_BUG,
-+ TG3_FLAG_USE_JUMBO_BDFLAG,
-+ TG3_FLAG_L1PLLPD_EN,
-+ TG3_FLAG_APE_HAS_NCSI,
-+ TG3_FLAG_TX_TSTAMP_EN,
-+ TG3_FLAG_4K_FIFO_LIMIT,
-+ TG3_FLAG_NO_TSO_BD_LIMIT,
-+ TG3_FLAG_5719_5720_RDMA_BUG,
-+ TG3_FLAG_RESET_TASK_PENDING,
-+ TG3_FLAG_USER_INDIR_TBL,
-+ TG3_FLAG_PTP_CAPABLE,
-+ TG3_FLAG_5705_PLUS,
-+ TG3_FLAG_IS_5788,
-+ TG3_FLAG_5750_PLUS,
-+ TG3_FLAG_5780_CLASS,
-+ TG3_FLAG_5755_PLUS,
-+ TG3_FLAG_57765_PLUS,
-+ TG3_FLAG_57765_CLASS,
-+ TG3_FLAG_5717_PLUS,
-+ TG3_FLAG_IS_SSB_CORE,
-+ TG3_FLAG_FLUSH_POSTED_WRITES,
-+ TG3_FLAG_ROBOSWITCH,
-+ TG3_FLAG_ONE_DMA_AT_ONCE,
-+ TG3_FLAG_RGMII_MODE,
-+
-+ TG3_FLAG_IOV_CAPABLE,
-+ TG3_FLAG_ENABLE_IOV,
-+
-+ /* Add new flags before this comment and TG3_FLAG_NUMBER_OF_FLAGS */
-+ TG3_FLAG_NUMBER_OF_FLAGS, /* Last entry in enum TG3_FLAGS */
-+};
-+
-+struct tg3 {
-+ /* begin "general, frequently-used members" cacheline section */
-+
-+ /* If the IRQ handler (which runs lockless) needs to be
-+ * quiesced, the following bitmask state is used. The
-+ * SYNC flag is set by non-IRQ context code to initiate
-+ * the quiescence.
-+ *
-+ * When the IRQ handler notices that SYNC is set, it
-+ * disables interrupts and returns.
-+ *
-+ * When all outstanding IRQ handlers have returned after
-+ * the SYNC flag has been set, the setter can be assured
-+ * that interrupts will no longer get run.
-+ *
-+ * In this way all SMP driver locks are never acquired
-+ * in hw IRQ context, only sw IRQ context or lower.
-+ */
-+ unsigned int irq_sync;
-+
-+ /* SMP locking strategy:
-+ *
-+ * lock: Held during reset, PHY access, timer, and when
-+ * updating tg3_flags.
-+ *
-+ * netif_tx_lock: Held during tg3_start_xmit. tg3_tx holds
-+ * netif_tx_lock when it needs to call
-+ * netif_wake_queue.
-+ *
-+ * Both of these locks are to be held with BH safety.
-+ *
-+ * Because the IRQ handler, tg3_poll, and tg3_start_xmit
-+ * are running lockless, it is necessary to completely
-+ * quiesce the chip with tg3_netif_stop and tg3_full_lock
-+ * before reconfiguring the device.
-+ *
-+ * indirect_lock: Held when accessing registers indirectly
-+ * with IRQ disabling.
-+ */
-+ spinlock_t lock;
-+ spinlock_t indirect_lock;
-+
-+ u32 (*read32) (struct tg3 *, u32);
-+ void (*write32) (struct tg3 *, u32, u32);
-+ u32 (*read32_mbox) (struct tg3 *, u32);
-+ void (*write32_mbox) (struct tg3 *, u32,
-+ u32);
-+ void __iomem *regs;
-+ void __iomem *aperegs;
-+ struct net_device *dev;
-+ struct pci_dev *pdev;
-+
-+ u32 coal_now;
-+ u32 msg_enable;
-+
-+#ifdef BCM_HAS_IEEE1588_SUPPORT
-+#if IS_ENABLED(CONFIG_PTP_1588_CLOCK)
-+ struct ptp_clock_info ptp_info;
-+ struct ptp_clock *ptp_clock;
-+ s64 ptp_adjust;
-+#else /* IS_ENABLED(CONFIG_PTP_1588_CLOCK) */
-+ struct cyclecounter cycles;
-+ struct timecounter clock;
-+ struct timecompare compare;
-+#endif /* IS_ENABLED(CONFIG_PTP_1588_CLOCK) */
-+#endif /* BCM_HAS_IEEE1588_SUPPORT */
-+
-+ /* begin "tx thread" cacheline section */
-+ void (*write32_tx_mbox) (struct tg3 *, u32,
-+ u32);
-+ u32 dma_limit;
-+ u32 txq_req;
-+ u32 txq_cnt;
-+ u32 txq_max;
-+
-+ /* begin "rx thread" cacheline section */
-+ struct tg3_napi napi[TG3_IRQ_MAX_VECS];
-+ void (*write32_rx_mbox) (struct tg3 *, u32,
-+ u32);
-+ u32 rx_copy_thresh;
-+ u32 rx_std_ring_mask;
-+ u32 rx_jmb_ring_mask;
-+ u32 rx_ret_ring_mask;
-+ u32 rx_pending;
-+ u32 rx_jumbo_pending;
-+ u32 rx_std_max_post;
-+ u32 rx_offset;
-+ u32 rx_pkt_map_sz;
-+ u32 rxq_req;
-+ u32 rxq_cnt;
-+ u32 rxq_max;
-+#ifndef BCM_HAS_NEW_VLAN_INTERFACE
-+ struct vlan_group *vlgrp;
-+#endif
-+
-+ bool rx_refill;
-+
-+ /* begin "everything else" cacheline(s) section */
-+ unsigned long rx_dropped;
-+ unsigned long tx_dropped;
-+ struct rtnl_link_stats64 net_stats_prev;
-+ struct tg3_ethtool_stats estats_prev;
-+
-+ DECLARE_BITMAP(tg3_flags, TG3_FLAG_NUMBER_OF_FLAGS);
-+
-+ union {
-+ unsigned long phy_crc_errors;
-+ unsigned long last_event_jiffies;
-+ };
-+
-+ struct timer_list timer;
-+ u16 timer_counter;
-+ u16 timer_multiplier;
-+ u32 timer_offset;
-+ u16 asf_counter;
-+ u16 asf_multiplier;
-+
-+ /* 1 second counter for transient serdes link events */
-+ u32 serdes_counter;
-+#define SERDES_AN_TIMEOUT_5704S 2
-+#define SERDES_PARALLEL_DET_TIMEOUT 1
-+#define SERDES_AN_TIMEOUT_5714S 1
-+
-+ struct tg3_link_config link_config;
-+ struct tg3_bufmgr_config bufmgr_config;
-+
-+ /* cache h/w values, often passed straight to h/w */
-+ u32 rx_mode;
-+ u32 tx_mode;
-+ u32 mac_mode;
-+ u32 mi_mode;
-+ u32 misc_host_ctrl;
-+ u32 grc_mode;
-+ u32 grc_local_ctrl;
-+ u32 dma_rwctrl;
-+ u32 coalesce_mode;
-+ u32 pwrmgmt_thresh;
-+ u32 rxptpctl;
-+
-+ /* PCI block */
-+ u32 pci_chip_rev_id;
-+ u16 pci_cmd;
-+ u8 pci_cacheline_sz;
-+ u8 pci_lat_timer;
-+
-+ int pci_fn;
-+ int pm_cap;
-+ int msi_cap;
-+ int pcix_cap;
-+ int pcie_readrq;
-+
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+ struct mii_bus *mdio_bus;
-+ int mdio_irq[PHY_MAX_ADDR];
-+#endif
-+ int old_link;
-+
-+ u8 phy_addr;
-+ u8 phy_ape_lock;
-+
-+ /* PHY info */
-+ u32 phy_id;
-+#define TG3_PHY_ID_MASK 0xfffffff0
-+#define TG3_PHY_ID_BCM5400 0x60008040
-+#define TG3_PHY_ID_BCM5401 0x60008050
-+#define TG3_PHY_ID_BCM5411 0x60008070
-+#define TG3_PHY_ID_BCM5701 0x60008110
-+#define TG3_PHY_ID_BCM5703 0x60008160
-+#define TG3_PHY_ID_BCM5704 0x60008190
-+#define TG3_PHY_ID_BCM5705 0x600081a0
-+#define TG3_PHY_ID_BCM5750 0x60008180
-+#define TG3_PHY_ID_BCM5752 0x60008100
-+#define TG3_PHY_ID_BCM5714 0x60008340
-+#define TG3_PHY_ID_BCM5780 0x60008350
-+#define TG3_PHY_ID_BCM5755 0xbc050cc0
-+#define TG3_PHY_ID_BCM5787 0xbc050ce0
-+#define TG3_PHY_ID_BCM5756 0xbc050ed0
-+#define TG3_PHY_ID_BCM5784 0xbc050fa0
-+#define TG3_PHY_ID_BCM5761 0xbc050fd0
-+#define TG3_PHY_ID_BCM5718C 0x5c0d8a00
-+#define TG3_PHY_ID_BCM5718S 0xbc050ff0
-+#define TG3_PHY_ID_BCM57765 0x5c0d8a40
-+#define TG3_PHY_ID_BCM5719C 0x5c0d8a20
-+#define TG3_PHY_ID_BCM5720C 0x5c0d8b60
-+#define TG3_PHY_ID_BCM5762 0x85803780
-+#define TG3_PHY_ID_BCM5906 0xdc00ac40
-+#define TG3_PHY_ID_BCM8002 0x60010140
-+#ifndef BCM_INCLUDE_PHYLIB_SUPPORT
-+#define TG3_PHY_ID_BCM50610 0xbc050d60
-+#define TG3_PHY_ID_BCM50610M 0xbc050d70
-+#define TG3_PHY_ID_BCM50612E 0x5c0d8a60
-+#define TG3_PHY_ID_BCMAC131 0xbc050c70
-+#define TG3_PHY_ID_RTL8211C 0xc8007110
-+#define TG3_PHY_ID_RTL8201E 0xc800aaa0
-+#define TG3_PHY_ID_BCM57780 0x5c0d8990
-+#endif /* BCM_INCLUDE_PHYLIB_SUPPORT */
-+#define TG3_PHY_ID_INVALID 0xffffffff
-+
-+#define PHY_ID_RTL8211C 0x001cc910
-+#define PHY_ID_RTL8201E 0x00008200
-+
-+#define TG3_PHY_ID_REV_MASK 0x0000000f
-+#define TG3_PHY_REV_BCM5401_B0 0x1
-+
-+ /* This macro assumes the passed PHY ID is
-+ * already masked with TG3_PHY_ID_MASK.
-+ */
-+#define TG3_KNOWN_PHY_ID(X) \
-+ ((X) == TG3_PHY_ID_BCM5400 || (X) == TG3_PHY_ID_BCM5401 || \
-+ (X) == TG3_PHY_ID_BCM5411 || (X) == TG3_PHY_ID_BCM5701 || \
-+ (X) == TG3_PHY_ID_BCM5703 || (X) == TG3_PHY_ID_BCM5704 || \
-+ (X) == TG3_PHY_ID_BCM5705 || (X) == TG3_PHY_ID_BCM5750 || \
-+ (X) == TG3_PHY_ID_BCM5752 || (X) == TG3_PHY_ID_BCM5714 || \
-+ (X) == TG3_PHY_ID_BCM5780 || (X) == TG3_PHY_ID_BCM5787 || \
-+ (X) == TG3_PHY_ID_BCM5755 || (X) == TG3_PHY_ID_BCM5756 || \
-+ (X) == TG3_PHY_ID_BCM5906 || (X) == TG3_PHY_ID_BCM5761 || \
-+ (X) == TG3_PHY_ID_BCM5718C || (X) == TG3_PHY_ID_BCM5718S || \
-+ (X) == TG3_PHY_ID_BCM57765 || (X) == TG3_PHY_ID_BCM5719C || \
-+ (X) == TG3_PHY_ID_BCM5720C || (X) == TG3_PHY_ID_BCM5762 || \
-+ (X) == TG3_PHY_ID_BCM8002 || \
-+ (X) == TG3_PHY_ID_BCM50610 || (X) == TG3_PHY_ID_BCM50610M || \
-+ (X) == TG3_PHY_ID_BCM50612E || (X) == TG3_PHY_ID_BCMAC131 || \
-+ (X) == TG3_PHY_ID_BCM57780)
-+
-+ u32 phy_flags;
-+#define TG3_PHYFLG_USER_CONFIGURED 0x00000001
-+#define TG3_PHYFLG_IS_LOW_POWER 0x00000002
-+#define TG3_PHYFLG_IS_CONNECTED 0x00000004
-+#define TG3_PHYFLG_USE_MI_INTERRUPT 0x00000008
-+#define TG3_PHYFLG_PHY_SERDES 0x00000010
-+#define TG3_PHYFLG_MII_SERDES 0x00000020
-+#define TG3_PHYFLG_ANY_SERDES (TG3_PHYFLG_PHY_SERDES | \
-+ TG3_PHYFLG_MII_SERDES)
-+#define TG3_PHYFLG_IS_FET 0x00000040
-+#define TG3_PHYFLG_10_100_ONLY 0x00000080
-+#define TG3_PHYFLG_ENABLE_APD 0x00000100
-+#define TG3_PHYFLG_CAPACITIVE_COUPLING 0x00000200
-+#define TG3_PHYFLG_NO_ETH_WIRE_SPEED 0x00000400
-+#define TG3_PHYFLG_JITTER_BUG 0x00000800
-+#define TG3_PHYFLG_ADJUST_TRIM 0x00001000
-+#define TG3_PHYFLG_ADC_BUG 0x00002000
-+#define TG3_PHYFLG_5704_A0_BUG 0x00004000
-+#define TG3_PHYFLG_BER_BUG 0x00008000
-+#define TG3_PHYFLG_SERDES_PREEMPHASIS 0x00010000
-+#define TG3_PHYFLG_PARALLEL_DETECT 0x00020000
-+#define TG3_PHYFLG_EEE_CAP 0x00040000
-+#define TG3_PHYFLG_1G_ON_VAUX_OK 0x00080000
-+#define TG3_PHYFLG_KEEP_LINK_ON_PWRDN 0x00100000
-+#define TG3_PHYFLG_MDIX_STATE 0x00200000
-+#define TG3_PHYFLG_DISABLE_1G_HD_ADV 0x00400000
-+
-+ u32 led_ctrl;
-+ u32 phy_otp;
-+ u32 setlpicnt;
-+ u8 rss_ind_tbl[TG3_RSS_INDIR_TBL_SIZE];
-+
-+#define TG3_BPN_SIZE 24
-+ char board_part_number[TG3_BPN_SIZE];
-+#define TG3_VER_SIZE ETHTOOL_FWVERS_LEN
-+ char fw_ver[TG3_VER_SIZE];
-+ u32 nic_sram_data_cfg;
-+ u32 pci_clock_ctrl;
-+ struct pci_dev *pdev_peer;
-+
-+ struct tg3_hw_stats *hw_stats;
-+ dma_addr_t stats_mapping;
-+ struct work_struct reset_task;
-+
-+ int nvram_lock_cnt;
-+ u32 nvram_size;
-+#define TG3_NVRAM_SIZE_2KB 0x00000800
-+#define TG3_NVRAM_SIZE_64KB 0x00010000
-+#define TG3_NVRAM_SIZE_128KB 0x00020000
-+#define TG3_NVRAM_SIZE_256KB 0x00040000
-+#define TG3_NVRAM_SIZE_512KB 0x00080000
-+#define TG3_NVRAM_SIZE_1MB 0x00100000
-+#define TG3_NVRAM_SIZE_2MB 0x00200000
-+
-+ u32 nvram_pagesize;
-+ u32 nvram_jedecnum;
-+
-+#define JEDEC_ATMEL 0x1f
-+#define JEDEC_ST 0x20
-+#define JEDEC_SAIFUN 0x4f
-+#define JEDEC_SST 0xbf
-+#define JEDEC_MACRONIX 0xc2
-+
-+#define ATMEL_AT24C02_CHIP_SIZE TG3_NVRAM_SIZE_2KB
-+#define ATMEL_AT24C02_PAGE_SIZE (8)
-+
-+#define ATMEL_AT24C64_CHIP_SIZE TG3_NVRAM_SIZE_64KB
-+#define ATMEL_AT24C64_PAGE_SIZE (32)
-+
-+#define ATMEL_AT24C512_CHIP_SIZE TG3_NVRAM_SIZE_512KB
-+#define ATMEL_AT24C512_PAGE_SIZE (128)
-+
-+#define ATMEL_AT45DB0X1B_PAGE_POS 9
-+#define ATMEL_AT45DB0X1B_PAGE_SIZE 264
-+
-+#define ATMEL_AT25F512_PAGE_SIZE 256
-+
-+#define ST_M45PEX0_PAGE_SIZE 256
-+
-+#define SAIFUN_SA25F0XX_PAGE_SIZE 256
-+
-+#define SST_25VF0X0_PAGE_SIZE 4098
-+
-+ unsigned int irq_max;
-+ unsigned int irq_cnt;
-+
-+ struct ethtool_coalesce coal;
-+ struct ethtool_eee eee;
-+
-+ /* firmware info */
-+ const char *fw_needed;
-+ const struct tg3_firmware *fw;
-+ u32 fw_len; /* includes BSS */
-+
-+#if defined(__VMKLNX__)
-+ struct tg3_vmware vmware;
-+#endif
-+#ifndef BCM_HAS_PCI_PCIE_CAP
-+ int pcie_cap;
-+#endif
-+#if (LINUX_VERSION_CODE < 0x2060a)
-+ u32 pci_cfg_state[64 / sizeof(u32)];
-+#endif
-+#ifndef BCM_HAS_GET_STATS64
-+ struct rtnl_link_stats64 net_stats;
-+#endif
-+#if IS_ENABLED(CONFIG_HWMON) && !defined(__VMKLNX__)
-+#if (LINUX_VERSION_CODE > 0x20618)
-+ struct device *hwmon_dev;
-+#else
-+ struct class_device *hwmon_dev;
-+#endif
-+#endif
-+
-+ bool link_up;
-+#if defined(__VMKLNX__) && VMWARE_ESX_DDK_VERSION >= 55000
-+ int nic_idx;
-+#endif
-+ u32 ape_hb;
-+ unsigned long ape_hb_interval;
-+ unsigned long ape_hb_jiffies;
-+ unsigned long dma_4g_cross;
-+#if !defined(__VMKLNX__)
-+ unsigned long recoverable_err_jiffies;
-+#define RECOVERABLE_ERR_10SEC 10000
-+ unsigned long recoverable_err_interval;
-+ u64 recoverable_err;
-+ u64 unrecoverable_err;
-+#endif
-+};
-+
-+/* Accessor macros for chip and asic attributes
-+ *
-+ * nb: Using static inlines equivalent to the accessor macros generates
-+ * larger object code with gcc 4.7.
-+ * Using statement expression macros to check tp with
-+ * typecheck(struct tg3 *, tp) also creates larger objects.
-+ */
-+#define tg3_chip_rev_id(tp) \
-+ ((tp)->pci_chip_rev_id)
-+#define tg3_asic_rev(tp) \
-+ ((tp)->pci_chip_rev_id >> 12)
-+#define tg3_chip_rev(tp) \
-+ ((tp)->pci_chip_rev_id >> 8)
-+
-+#endif /* !(_T3_H) */
-diff --git a/drivers/net/ethernet/broadcom/tg3/tg3_compat.h b/drivers/net/ethernet/broadcom/tg3/tg3_compat.h
-new file mode 100644
-index 0000000..40cc207
---- /dev/null
-+++ b/drivers/net/ethernet/broadcom/tg3/tg3_compat.h
-@@ -0,0 +1,2172 @@
-+/* Copyright (C) 2008-2015 Broadcom Corporation. */
-+
-+#ifdef CONFIG_X86
-+#undef NET_IP_ALIGN
-+#define NET_IP_ALIGN 0
-+#endif
-+
-+#if !defined(__maybe_unused)
-+#define __maybe_unused /* unimplemented */
-+#endif
-+
-+#if !defined(__iomem)
-+#define __iomem
-+#endif
-+
-+#ifndef __always_unused
-+#define __always_unused
-+#endif
-+
-+#ifndef __acquires
-+#define __acquires(x)
-+#endif
-+
-+#ifndef __releases
-+#define __releases(x)
-+#endif
-+
-+#ifndef mmiowb
-+#define mmiowb()
-+#endif
-+
-+#ifndef WARN_ON
-+#define WARN_ON(x)
-+#endif
-+
-+#ifndef MODULE_VERSION
-+#define MODULE_VERSION(version)
-+#endif
-+
-+#ifndef SET_MODULE_OWNER
-+#define SET_MODULE_OWNER(dev) do { } while (0)
-+#endif
-+
-+#ifndef ARRAY_SIZE
-+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-+#endif
-+
-+#ifndef DIV_ROUND_UP
-+#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
-+#endif
-+
-+#ifndef __ALIGN_MASK
-+#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
-+#endif
-+
-+#ifndef ALIGN
-+#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1)
-+#endif
-+
-+#ifndef BCM_HAS_BOOL
-+typedef int bool;
-+#define false 0
-+#define true 1
-+#endif
-+
-+#ifndef BCM_HAS_LE32
-+typedef u32 __le32;
-+typedef u32 __be32;
-+#endif
-+
-+#ifndef BCM_HAS_RESOURCE_SIZE_T
-+typedef unsigned long resource_size_t;
-+#endif
-+
-+#ifndef IRQ_RETVAL
-+typedef void irqreturn_t;
-+#define IRQ_RETVAL(x)
-+#define IRQ_HANDLED
-+#define IRQ_NONE
-+#endif
-+
-+#ifndef IRQF_SHARED
-+#define IRQF_SHARED SA_SHIRQ
-+#endif
-+
-+#ifndef IRQF_SAMPLE_RANDOM
-+#define IRQF_SAMPLE_RANDOM SA_SAMPLE_RANDOM
-+#endif
-+
-+#if (LINUX_VERSION_CODE <= 0x020600)
-+#define schedule_work(x) schedule_task(x)
-+#define work_struct tq_struct
-+#define INIT_WORK(x, y, z) INIT_TQUEUE(x, y, z)
-+#endif
-+
-+#ifndef BCM_HAS_KZALLOC
-+static inline void *kzalloc(size_t size, int flags)
-+{
-+ void * memptr = kmalloc(size, flags);
-+ if (memptr)
-+ memset(memptr, 0, size);
-+
-+ return memptr;
-+}
-+#endif
-+
-+#ifndef USEC_PER_SEC
-+#define USEC_PER_SEC 1000000
-+#endif
-+
-+#ifndef MSEC_PER_SEC
-+#define MSEC_PER_SEC 1000
-+#endif
-+
-+#ifndef MAX_JIFFY_OFFSET
-+#define MAX_JIFFY_OFFSET ((LONG_MAX >> 1)-1)
-+#endif
-+
-+#ifndef BCM_HAS_JIFFIES_TO_USECS
-+static unsigned int inline jiffies_to_usecs(const unsigned long j)
-+{
-+#if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ)
-+ return (USEC_PER_SEC / HZ) * j;
-+#elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC)
-+ return (j + (HZ / USEC_PER_SEC) - 1)/(HZ / USEC_PER_SEC);
-+#else
-+ return (j * USEC_PER_SEC) / HZ;
-+#endif
-+}
-+#endif /* BCM_HAS_JIFFIES_TO_USECS */
-+
-+#ifndef BCM_HAS_USECS_TO_JIFFIES
-+static unsigned long usecs_to_jiffies(const unsigned int u)
-+{
-+ if (u > jiffies_to_usecs(MAX_JIFFY_OFFSET))
-+ return MAX_JIFFY_OFFSET;
-+#if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ)
-+ return (u + (USEC_PER_SEC / HZ) - 1) / (USEC_PER_SEC / HZ);
-+#elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC)
-+ return u * (HZ / USEC_PER_SEC);
-+#else
-+ return (u * HZ + USEC_PER_SEC - 1) / USEC_PER_SEC;
-+#endif
-+}
-+#endif /* BCM_HAS_USECS_TO_JIFFIES */
-+
-+#ifndef BCM_HAS_MSECS_TO_JIFFIES
-+static unsigned long msecs_to_jiffies(const unsigned int m)
-+{
-+#if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ)
-+ /*
-+ * HZ is equal to or smaller than 1000, and 1000 is a nice
-+ * round multiple of HZ, divide with the factor between them,
-+ * but round upwards:
-+ */
-+ return (m + (MSEC_PER_SEC / HZ) - 1) / (MSEC_PER_SEC / HZ);
-+#elif HZ > MSEC_PER_SEC && !(HZ % MSEC_PER_SEC)
-+ /*
-+ * HZ is larger than 1000, and HZ is a nice round multiple of
-+ * 1000 - simply multiply with the factor between them.
-+ *
-+ * But first make sure the multiplication result cannot
-+ * overflow:
-+ */
-+ if (m > jiffies_to_msecs(MAX_JIFFY_OFFSET))
-+ return MAX_JIFFY_OFFSET;
-+
-+ return m * (HZ / MSEC_PER_SEC);
-+#else
-+ /*
-+ * Generic case - multiply, round and divide. But first
-+ * check that if we are doing a net multiplication, that
-+ * we wouldn't overflow:
-+ */
-+ if (HZ > MSEC_PER_SEC && m > jiffies_to_msecs(MAX_JIFFY_OFFSET))
-+ return MAX_JIFFY_OFFSET;
-+
-+ return (m * HZ + MSEC_PER_SEC - 1) / MSEC_PER_SEC;
-+#endif
-+}
-+#endif /* BCM_HAS_MSECS_TO_JIFFIES */
-+
-+#ifndef BCM_HAS_MSLEEP
-+static void msleep(unsigned int msecs)
-+{
-+ unsigned long timeout = msecs_to_jiffies(msecs) + 1;
-+
-+ while (timeout) {
-+ __set_current_state(TASK_UNINTERRUPTIBLE);
-+ timeout = schedule_timeout(timeout);
-+ }
-+}
-+#endif /* BCM_HAS_MSLEEP */
-+
-+#ifndef BCM_HAS_MSLEEP_INTERRUPTIBLE
-+static unsigned long msleep_interruptible(unsigned int msecs)
-+{
-+ unsigned long timeout = msecs_to_jiffies(msecs) + 1;
-+
-+ while (timeout) {
-+ __set_current_state(TASK_UNINTERRUPTIBLE);
-+ timeout = schedule_timeout(timeout);
-+ }
-+
-+ return 0;
-+}
-+#endif /* BCM_HAS_MSLEEP_INTERRUPTIBLE */
-+
-+#ifndef printk_once
-+#define printk_once(x...) ({ \
-+ static bool tg3___print_once = false; \
-+ \
-+ if (!tg3___print_once) { \
-+ tg3___print_once = true; \
-+ printk(x); \
-+ } \
-+})
-+#endif
-+
-+#if !defined(BCM_HAS_DEV_DRIVER_STRING) || defined(__VMKLNX__)
-+#define dev_driver_string(dev) "tg3"
-+#endif
-+
-+#if !defined(BCM_HAS_DEV_NAME) || defined(__VMKLNX__)
-+#define dev_name(dev) ""
-+#endif
-+
-+#if defined(dev_printk) && ((LINUX_VERSION_CODE < 0x020609) || defined(__VMKLNX__))
-+/*
-+ * SLES 9 and VMWare do not populate the pdev->dev.bus_id string soon
-+ * enough for driver use during boot. Use our own format instead.
-+ */
-+#undef dev_printk
-+#endif
-+
-+#ifndef dev_printk
-+#define dev_printk(level, dev, format, arg...) \
-+ printk(level "%s %s: " format , dev_driver_string(dev) , \
-+ dev_name(dev) , ## arg)
-+#endif
-+
-+#ifndef dev_err
-+#define dev_err(dev, format, arg...) \
-+ dev_printk(KERN_ERR , dev , format , ## arg)
-+#endif
-+
-+#ifndef dev_warn
-+#define dev_warn(dev, format, arg...) \
-+ dev_printk(KERN_WARNING , dev , format , ## arg)
-+#endif
-+
-+#ifndef BCM_HAS_PCI_IOREMAP_BAR
-+static inline void * pci_ioremap_bar(struct pci_dev *pdev, int bar)
-+{
-+ resource_size_t base, size;
-+
-+ if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) {
-+ printk(KERN_ERR
-+ "Cannot find proper PCI device base address for BAR %d.\n",
-+ bar);
-+ return NULL;
-+ }
-+
-+ base = pci_resource_start(pdev, bar);
-+ size = pci_resource_len(pdev, bar);
-+
-+ return ioremap_nocache(base, size);
-+}
-+#endif
-+
-+#ifndef DEFINE_PCI_DEVICE_TABLE
-+#define DEFINE_PCI_DEVICE_TABLE(x) struct pci_device_id x[]
-+#endif
-+
-+#if (LINUX_VERSION_CODE < 0x020547)
-+#define pci_set_consistent_dma_mask(pdev, mask) (0)
-+#endif
-+
-+#if (LINUX_VERSION_CODE < 0x020600)
-+#define pci_get_device(x, y, z) pci_find_device(x, y, z)
-+#define pci_get_slot(x, y) pci_find_slot((x)->number, y)
-+#define pci_dev_put(x)
-+#endif
-+
-+#if (LINUX_VERSION_CODE < 0x020605)
-+#define pci_dma_sync_single_for_cpu(pdev, map, len, dir) \
-+ pci_dma_sync_single(pdev, map, len, dir)
-+#define pci_dma_sync_single_for_device(pdev, map, len, dir)
-+#endif
-+
-+#ifndef PCI_DEVICE
-+#define PCI_DEVICE(vend,dev) \
-+ .vendor = (vend), .device = (dev), \
-+ .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
-+#endif
-+
-+#ifndef PCI_DEVICE_SUB
-+#define PCI_DEVICE_SUB(vend, dev, subvend, subdev) \
-+ .vendor = (vend), .device = (dev), \
-+ .subvendor = (subvend), .subdevice = (subdev)
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5704S_2
-+#define PCI_DEVICE_ID_TIGON3_5704S_2 0x1649
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5705F
-+#define PCI_DEVICE_ID_TIGON3_5705F 0x166e
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5720
-+#define PCI_DEVICE_ID_TIGON3_5720 0x1658
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5721
-+#define PCI_DEVICE_ID_TIGON3_5721 0x1659
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5750
-+#define PCI_DEVICE_ID_TIGON3_5750 0x1676
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5751
-+#define PCI_DEVICE_ID_TIGON3_5751 0x1677
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5750M
-+#define PCI_DEVICE_ID_TIGON3_5750M 0x167c
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5751M
-+#define PCI_DEVICE_ID_TIGON3_5751M 0x167d
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5751F
-+#define PCI_DEVICE_ID_TIGON3_5751F 0x167e
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5789
-+#define PCI_DEVICE_ID_TIGON3_5789 0x169d
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5753
-+#define PCI_DEVICE_ID_TIGON3_5753 0x16f7
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5753M
-+#define PCI_DEVICE_ID_TIGON3_5753M 0x16fd
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5753F
-+#define PCI_DEVICE_ID_TIGON3_5753F 0x16fe
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5781
-+#define PCI_DEVICE_ID_TIGON3_5781 0x16dd
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5752
-+#define PCI_DEVICE_ID_TIGON3_5752 0x1600
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5752M
-+#define PCI_DEVICE_ID_TIGON3_5752M 0x1601
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5714
-+#define PCI_DEVICE_ID_TIGON3_5714 0x1668
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5714S
-+#define PCI_DEVICE_ID_TIGON3_5714S 0x1669
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5780
-+#define PCI_DEVICE_ID_TIGON3_5780 0x166a
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5780S
-+#define PCI_DEVICE_ID_TIGON3_5780S 0x166b
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5715
-+#define PCI_DEVICE_ID_TIGON3_5715 0x1678
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5715S
-+#define PCI_DEVICE_ID_TIGON3_5715S 0x1679
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5756
-+#define PCI_DEVICE_ID_TIGON3_5756 0x1674
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5754
-+#define PCI_DEVICE_ID_TIGON3_5754 0x167a
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5754M
-+#define PCI_DEVICE_ID_TIGON3_5754M 0x1672
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5755
-+#define PCI_DEVICE_ID_TIGON3_5755 0x167b
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5755M
-+#define PCI_DEVICE_ID_TIGON3_5755M 0x1673
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5722
-+#define PCI_DEVICE_ID_TIGON3_5722 0x165a
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5786
-+#define PCI_DEVICE_ID_TIGON3_5786 0x169a
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5787M
-+#define PCI_DEVICE_ID_TIGON3_5787M 0x1693
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5787
-+#define PCI_DEVICE_ID_TIGON3_5787 0x169b
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5787F
-+#define PCI_DEVICE_ID_TIGON3_5787F 0x167f
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5906
-+#define PCI_DEVICE_ID_TIGON3_5906 0x1712
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5906M
-+#define PCI_DEVICE_ID_TIGON3_5906M 0x1713
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5784
-+#define PCI_DEVICE_ID_TIGON3_5784 0x1698
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5764
-+#define PCI_DEVICE_ID_TIGON3_5764 0x1684
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5723
-+#define PCI_DEVICE_ID_TIGON3_5723 0x165b
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5761
-+#define PCI_DEVICE_ID_TIGON3_5761 0x1681
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_TIGON3_5761E
-+#define PCI_DEVICE_ID_TIGON3_5761E 0x1680
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_APPLE_TIGON3
-+#define PCI_DEVICE_ID_APPLE_TIGON3 0x1645
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_APPLE_UNI_N_PCI15
-+#define PCI_DEVICE_ID_APPLE_UNI_N_PCI15 0x002e
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_VIA_8385_0
-+#define PCI_DEVICE_ID_VIA_8385_0 0x3188
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_AMD_8131_BRIDGE
-+#define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_SERVERWORKS_EPB
-+#define PCI_DEVICE_ID_SERVERWORKS_EPB 0x0103
-+#endif
-+
-+#ifndef PCI_VENDOR_ID_ARIMA
-+#define PCI_VENDOR_ID_ARIMA 0x161f
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_INTEL_PXH_0
-+#define PCI_DEVICE_ID_INTEL_PXH_0 0x0329
-+#endif
-+
-+#ifndef PCI_DEVICE_ID_INTEL_PXH_1
-+#define PCI_DEVICE_ID_INTEL_PXH_1 0x032A
-+#endif
-+
-+#ifndef PCI_VENDOR_ID_LENOVO
-+#define PCI_VENDOR_ID_LENOVO 0x17aa
-+#endif
-+
-+#ifndef PCI_D0
-+typedef u32 pm_message_t;
-+typedef u32 pci_power_t;
-+#define PCI_D0 0
-+#define PCI_D1 1
-+#define PCI_D2 2
-+#define PCI_D3hot 3
-+#endif
-+
-+#ifndef PCI_D3cold
-+#define PCI_D3cold 4
-+#endif
-+
-+#ifndef DMA_64BIT_MASK
-+#define DMA_64BIT_MASK ((u64) 0xffffffffffffffffULL)
-+#endif
-+
-+#ifndef DMA_40BIT_MASK
-+#define DMA_40BIT_MASK ((u64) 0x000000ffffffffffULL)
-+#endif
-+
-+#ifndef DMA_32BIT_MASK
-+#define DMA_32BIT_MASK ((u64) 0x00000000ffffffffULL)
-+#endif
-+
-+#ifndef DMA_BIT_MASK
-+#define DMA_BIT_MASK(n) DMA_ ##n ##BIT_MASK
-+#endif
-+
-+#ifndef DEFINE_DMA_UNMAP_ADDR
-+#define DEFINE_DMA_UNMAP_ADDR DECLARE_PCI_UNMAP_ADDR
-+#endif
-+
-+#if !defined(BCM_HAS_DMA_UNMAP_ADDR)
-+#define dma_unmap_addr pci_unmap_addr
-+#endif
-+
-+#if !defined(BCM_HAS_DMA_UNMAP_ADDR_SET)
-+#define dma_unmap_addr_set pci_unmap_addr_set
-+#endif
-+
-+#if !defined(BCM_HAS_PCI_TARGET_STATE) && !defined(BCM_HAS_PCI_CHOOSE_STATE)
-+static inline pci_power_t pci_choose_state(struct pci_dev *dev,
-+ pm_message_t state)
-+{
-+ return state;
-+}
-+#endif
-+
-+#ifndef BCM_HAS_PCI_ENABLE_WAKE
-+static int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable)
-+{
-+ int pm_cap;
-+ u16 pmcsr;
-+
-+ pm_cap = pci_find_capability(dev, PCI_CAP_ID_PM);
-+ if (pm_cap == 0)
-+ return -EIO;
-+
-+ pci_read_config_word(dev, pm_cap + PCI_PM_CTRL, &pmcsr);
-+
-+ /* Clear PME_Status by writing 1 to it */
-+ pmcsr |= PCI_PM_CTRL_PME_STATUS;
-+
-+ if (enable)
-+ pmcsr |= PCI_PM_CTRL_PME_ENABLE;
-+ else
-+ pmcsr &= ~PCI_PM_CTRL_PME_ENABLE;
-+
-+ pci_write_config_word(dev, pm_cap + PCI_PM_CTRL, pmcsr);
-+
-+ return 0;
-+}
-+#endif /* BCM_HAS_PCI_ENABLE_WAKE */
-+
-+#ifndef BCM_HAS_PCI_WAKE_FROM_D3
-+#ifndef BCM_HAS_PCI_PME_CAPABLE
-+static bool pci_pme_capable(struct pci_dev *dev, pci_power_t state)
-+{
-+ int pm_cap;
-+ u16 caps;
-+ bool ret = false;
-+
-+ pm_cap = pci_find_capability(dev, PCI_CAP_ID_PM);
-+ if (pm_cap == 0)
-+ goto done;
-+
-+ pci_read_config_word(dev, pm_cap + PCI_PM_PMC, &caps);
-+
-+ if (state == PCI_D3cold &&
-+ (caps & PCI_PM_CAP_PME_D3cold))
-+ ret = true;
-+
-+done:
-+ return ret;
-+}
-+#endif /* BCM_HAS_PCI_PME_CAPABLE */
-+
-+static int pci_wake_from_d3(struct pci_dev *dev, bool enable)
-+{
-+ return pci_pme_capable(dev, PCI_D3cold) ?
-+ pci_enable_wake(dev, PCI_D3cold, enable) :
-+ pci_enable_wake(dev, PCI_D3hot, enable);
-+}
-+#endif /* BCM_HAS_PCI_WAKE_FROM_D3 */
-+
-+#ifndef BCM_HAS_PCI_SET_POWER_STATE
-+static int pci_set_power_state(struct pci_dev *dev, pci_power_t state)
-+{
-+ int pm_cap;
-+ u16 pmcsr;
-+
-+ if (state < PCI_D0 || state > PCI_D3hot)
-+ return -EINVAL;
-+
-+ pm_cap = pci_find_capability(dev, PCI_CAP_ID_PM);
-+ if (pm_cap == 0)
-+ return -EIO;
-+
-+ pci_read_config_word(dev, pm_cap + PCI_PM_CTRL, &pmcsr);
-+
-+ pmcsr &= ~(PCI_PM_CTRL_STATE_MASK);
-+ pmcsr |= state;
-+
-+ pci_write_config_word(dev, pm_cap + PCI_PM_CTRL, pmcsr);
-+
-+ msleep(10);
-+
-+ return 0;
-+}
-+#endif /* BCM_HAS_PCI_SET_POWER_STATE */
-+
-+#ifdef __VMKLNX__
-+/* VMWare disables CONFIG_PM in their kernel configs.
-+ * This renders WOL inop, because device_may_wakeup() always returns false.
-+ */
-+#undef BCM_HAS_DEVICE_WAKEUP_API
-+#endif
-+
-+#ifndef BCM_HAS_DEVICE_WAKEUP_API
-+#undef device_init_wakeup
-+#define device_init_wakeup(dev, val)
-+#undef device_can_wakeup
-+#define device_can_wakeup(dev) 1
-+#undef device_set_wakeup_enable
-+#define device_set_wakeup_enable(dev, val)
-+#undef device_may_wakeup
-+#define device_may_wakeup(dev) 1
-+#endif /* BCM_HAS_DEVICE_WAKEUP_API */
-+
-+#ifndef BCM_HAS_DEVICE_SET_WAKEUP_CAPABLE
-+#define device_set_wakeup_capable(dev, val)
-+#endif /* BCM_HAS_DEVICE_SET_WAKEUP_CAPABLE */
-+
-+
-+#ifndef PCI_X_CMD_READ_2K
-+#define PCI_X_CMD_READ_2K 0x0008
-+#endif
-+#ifndef PCI_CAP_ID_EXP
-+#define PCI_CAP_ID_EXP 0x10
-+#endif
-+#ifndef PCI_EXP_LNKCTL
-+#define PCI_EXP_LNKCTL 16
-+#endif
-+#ifndef PCI_EXP_LNKCTL_CLKREQ_EN
-+#define PCI_EXP_LNKCTL_CLKREQ_EN 0x100
-+#endif
-+
-+#ifndef PCI_EXP_DEVCTL_NOSNOOP_EN
-+#define PCI_EXP_DEVCTL_NOSNOOP_EN 0x0800
-+#endif
-+
-+#ifndef PCI_EXP_DEVCTL_RELAX_EN
-+#define PCI_EXP_DEVCTL_RELAX_EN 0x0010
-+#endif
-+
-+#ifndef PCI_EXP_DEVCTL_PAYLOAD
-+#define PCI_EXP_DEVCTL_PAYLOAD 0x00e0
-+#endif
-+
-+#ifndef PCI_EXP_DEVSTA
-+#define PCI_EXP_DEVSTA 10
-+#define PCI_EXP_DEVSTA_CED 0x01
-+#define PCI_EXP_DEVSTA_NFED 0x02
-+#define PCI_EXP_DEVSTA_FED 0x04
-+#define PCI_EXP_DEVSTA_URD 0x08
-+#endif
-+
-+#ifndef PCI_EXP_LNKSTA
-+#define PCI_EXP_LNKSTA 18
-+#endif
-+
-+#ifndef PCI_EXP_LNKSTA_CLS
-+#define PCI_EXP_LNKSTA_CLS 0x000f
-+#endif
-+
-+#ifndef PCI_EXP_LNKSTA_CLS_2_5GB
-+#define PCI_EXP_LNKSTA_CLS_2_5GB 0x01
-+#endif
-+
-+#ifndef PCI_EXP_LNKSTA_CLS_5_0GB
-+#define PCI_EXP_LNKSTA_CLS_5_0GB 0x02
-+#endif
-+
-+#ifndef PCI_EXP_LNKSTA_NLW
-+#define PCI_EXP_LNKSTA_NLW 0x03f0
-+#endif
-+
-+#ifndef PCI_EXP_LNKSTA_NLW_SHIFT
-+#define PCI_EXP_LNKSTA_NLW_SHIFT 4
-+#endif
-+
-+#ifndef PCI_EXP_DEVCTL
-+#define PCI_EXP_DEVCTL 8
-+#endif
-+#ifndef PCI_EXP_DEVCTL_READRQ
-+#define PCI_EXP_DEVCTL_READRQ 0x7000
-+#endif
-+
-+#ifndef BCM_HAS_PCIE_GET_READRQ
-+int pcie_get_readrq(struct pci_dev *dev)
-+{
-+ int ret, cap;
-+ u16 ctl;
-+
-+ cap = pci_find_capability(dev, PCI_CAP_ID_EXP);
-+ if (!cap) {
-+ ret = -EINVAL;
-+ goto out;
-+ }
-+
-+ ret = pci_read_config_word(dev, cap + PCI_EXP_DEVCTL, &ctl);
-+ if (!ret)
-+ ret = 128 << ((ctl & PCI_EXP_DEVCTL_READRQ) >> 12);
-+
-+out:
-+ return ret;
-+}
-+#endif /* BCM_HAS_PCIE_GET_READRQ */
-+
-+#ifndef BCM_HAS_PCIE_SET_READRQ
-+static inline int pcie_set_readrq(struct pci_dev *dev, int rq)
-+{
-+ int cap, err = -EINVAL;
-+ u16 ctl, v;
-+
-+ if (rq < 128 || rq > 4096 || (rq & (rq-1)))
-+ goto out;
-+
-+ v = (ffs(rq) - 8) << 12;
-+
-+ cap = pci_find_capability(dev, PCI_CAP_ID_EXP);
-+ if (!cap)
-+ goto out;
-+
-+ err = pci_read_config_word(dev, cap + PCI_EXP_DEVCTL, &ctl);
-+ if (err)
-+ goto out;
-+
-+ if ((ctl & PCI_EXP_DEVCTL_READRQ) != v) {
-+ ctl &= ~PCI_EXP_DEVCTL_READRQ;
-+ ctl |= v;
-+ err = pci_write_config_dword(dev, cap + PCI_EXP_DEVCTL, ctl);
-+ }
-+
-+out:
-+ return err;
-+}
-+#endif /* BCM_HAS_PCIE_SET_READRQ */
-+
-+#ifndef BCM_HAS_PCI_READ_VPD
-+#if !defined(PCI_CAP_ID_VPD)
-+#define PCI_CAP_ID_VPD 0x03
-+#endif
-+#if !defined(PCI_VPD_ADDR)
-+#define PCI_VPD_ADDR 2
-+#endif
-+#if !defined(PCI_VPD_DATA)
-+#define PCI_VPD_DATA 4
-+#endif
-+static inline ssize_t
-+pci_read_vpd(struct pci_dev *dev, loff_t pos, size_t count, u8 *buf)
-+{
-+ int i, vpd_cap;
-+
-+ vpd_cap = pci_find_capability(dev, PCI_CAP_ID_VPD);
-+ if (!vpd_cap)
-+ return -ENODEV;
-+
-+ for (i = 0; i < count; i += 4) {
-+ u32 tmp, j = 0;
-+ __le32 v;
-+ u16 tmp16;
-+
-+ pci_write_config_word(dev, vpd_cap + PCI_VPD_ADDR, i);
-+ while (j++ < 100) {
-+ pci_read_config_word(dev, vpd_cap +
-+ PCI_VPD_ADDR, &tmp16);
-+ if (tmp16 & 0x8000)
-+ break;
-+ msleep(1);
-+ }
-+ if (!(tmp16 & 0x8000))
-+ break;
-+
-+ pci_read_config_dword(dev, vpd_cap + PCI_VPD_DATA, &tmp);
-+ v = cpu_to_le32(tmp);
-+ memcpy(&buf[i], &v, sizeof(v));
-+ }
-+
-+ return i;
-+}
-+#endif /* BCM_HAS_PCI_READ_VPD */
-+
-+#ifndef PCI_VPD_RO_KEYWORD_CHKSUM
-+#define PCI_VPD_RO_KEYWORD_CHKSUM "RV"
-+#endif
-+
-+#ifndef PCI_VPD_LRDT
-+#define PCI_VPD_LRDT 0x80 /* Large Resource Data Type */
-+#define PCI_VPD_LRDT_ID(x) (x | PCI_VPD_LRDT)
-+
-+/* Large Resource Data Type Tag Item Names */
-+#define PCI_VPD_LTIN_ID_STRING 0x02 /* Identifier String */
-+#define PCI_VPD_LTIN_RO_DATA 0x10 /* Read-Only Data */
-+#define PCI_VPD_LTIN_RW_DATA 0x11 /* Read-Write Data */
-+
-+#define PCI_VPD_LRDT_ID_STRING PCI_VPD_LRDT_ID(PCI_VPD_LTIN_ID_STRING)
-+#define PCI_VPD_LRDT_RO_DATA PCI_VPD_LRDT_ID(PCI_VPD_LTIN_RO_DATA)
-+#define PCI_VPD_LRDT_RW_DATA PCI_VPD_LRDT_ID(PCI_VPD_LTIN_RW_DATA)
-+
-+/* Small Resource Data Type Tag Item Names */
-+#define PCI_VPD_STIN_END 0x78 /* End */
-+
-+#define PCI_VPD_SRDT_END PCI_VPD_STIN_END
-+
-+#define PCI_VPD_SRDT_TIN_MASK 0x78
-+#define PCI_VPD_SRDT_LEN_MASK 0x07
-+
-+#define PCI_VPD_LRDT_TAG_SIZE 3
-+#define PCI_VPD_SRDT_TAG_SIZE 1
-+
-+#define PCI_VPD_INFO_FLD_HDR_SIZE 3
-+
-+#define PCI_VPD_RO_KEYWORD_PARTNO "PN"
-+#define PCI_VPD_RO_KEYWORD_MFR_ID "MN"
-+#define PCI_VPD_RO_KEYWORD_VENDOR0 "V0"
-+
-+/**
-+ * pci_vpd_lrdt_size - Extracts the Large Resource Data Type length
-+ * @lrdt: Pointer to the beginning of the Large Resource Data Type tag
-+ *
-+ * Returns the extracted Large Resource Data Type length.
-+ */
-+static inline u16 pci_vpd_lrdt_size(const u8 *lrdt)
-+{
-+ return (u16)lrdt[1] + ((u16)lrdt[2] << 8);
-+}
-+
-+/**
-+ * pci_vpd_srdt_size - Extracts the Small Resource Data Type length
-+ * @lrdt: Pointer to the beginning of the Small Resource Data Type tag
-+ *
-+ * Returns the extracted Small Resource Data Type length.
-+ */
-+static inline u8 pci_vpd_srdt_size(const u8 *srdt)
-+{
-+ return (*srdt) & PCI_VPD_SRDT_LEN_MASK;
-+}
-+
-+/**
-+ * pci_vpd_info_field_size - Extracts the information field length
-+ * @lrdt: Pointer to the beginning of an information field header
-+ *
-+ * Returns the extracted information field length.
-+ */
-+static inline u8 pci_vpd_info_field_size(const u8 *info_field)
-+{
-+ return info_field[2];
-+}
-+
-+static int pci_vpd_find_tag(const u8 *buf, unsigned int off, unsigned int len, u8 rdt)
-+{
-+ int i;
-+
-+ for (i = off; i < len; ) {
-+ u8 val = buf[i];
-+
-+ if (val & PCI_VPD_LRDT) {
-+ /* Don't return success of the tag isn't complete */
-+ if (i + PCI_VPD_LRDT_TAG_SIZE > len)
-+ break;
-+
-+ if (val == rdt)
-+ return i;
-+
-+ i += PCI_VPD_LRDT_TAG_SIZE +
-+ pci_vpd_lrdt_size(&buf[i]);
-+ } else {
-+ u8 tag = val & ~PCI_VPD_SRDT_LEN_MASK;
-+
-+ if (tag == rdt)
-+ return i;
-+
-+ if (tag == PCI_VPD_SRDT_END)
-+ break;
-+
-+ i += PCI_VPD_SRDT_TAG_SIZE +
-+ pci_vpd_srdt_size(&buf[i]);
-+ }
-+ }
-+
-+ return -ENOENT;
-+}
-+
-+static int pci_vpd_find_info_keyword(const u8 *buf, unsigned int off,
-+ unsigned int len, const char *kw)
-+{
-+ int i;
-+
-+ for (i = off; i + PCI_VPD_INFO_FLD_HDR_SIZE <= off + len;) {
-+ if (buf[i + 0] == kw[0] &&
-+ buf[i + 1] == kw[1])
-+ return i;
-+
-+ i += PCI_VPD_INFO_FLD_HDR_SIZE +
-+ pci_vpd_info_field_size(&buf[i]);
-+ }
-+
-+ return -ENOENT;
-+}
-+#endif
-+
-+#ifndef BCM_HAS_INTX_MSI_WORKAROUND
-+static inline void tg3_enable_intx(struct pci_dev *pdev)
-+{
-+#if (LINUX_VERSION_CODE < 0x2060e)
-+ u16 pci_command;
-+
-+ pci_read_config_word(pdev, PCI_COMMAND, &pci_command);
-+ if (pci_command & PCI_COMMAND_INTX_DISABLE)
-+ pci_write_config_word(pdev, PCI_COMMAND,
-+ pci_command & ~PCI_COMMAND_INTX_DISABLE);
-+#else
-+ pci_intx(pdev, 1);
-+#endif
-+}
-+#endif /* BCM_HAS_INTX_MSI_WORKAROUND */
-+
-+
-+#if (LINUX_VERSION_CODE >= 0x20613) || \
-+ (defined(__VMKLNX__) && defined(__USE_COMPAT_LAYER_2_6_18_PLUS__))
-+#define BCM_HAS_NEW_IRQ_SIG
-+#endif
-+
-+#if defined(INIT_DELAYED_WORK_DEFERRABLE) || \
-+ defined(INIT_DEFERRABLE_WORK) || \
-+ defined(INIT_WORK_NAR) || \
-+ (defined(__VMKLNX__) && defined(__USE_COMPAT_LAYER_2_6_18_PLUS__))
-+#define BCM_HAS_NEW_INIT_WORK
-+#endif
-+
-+#ifndef ETH_FCS_LEN
-+#define ETH_FCS_LEN 4
-+#endif
-+
-+#ifndef BCM_HAS_PRINT_MAC
-+
-+#ifndef DECLARE_MAC_BUF
-+#define DECLARE_MAC_BUF(_mac) char _mac[18]
-+#endif
-+
-+#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
-+
-+static char *print_mac(char * buf, const u8 *addr)
-+{
-+ sprintf(buf, MAC_FMT,
-+ addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
-+ return buf;
-+}
-+#endif
-+
-+
-+#ifndef NET_IP_ALIGN
-+#define NET_IP_ALIGN 2
-+#endif
-+
-+
-+#if !defined(BCM_HAS_ETHTOOL_OP_SET_TX_IPV6_CSUM) && \
-+ !defined(BCM_HAS_ETHTOOL_OP_SET_TX_HW_CSUM) && \
-+ defined(BCM_HAS_SET_TX_CSUM)
-+static int tg3_set_tx_hw_csum(struct net_device *dev, u32 data)
-+{
-+ if (data)
-+ dev->features |= NETIF_F_HW_CSUM;
-+ else
-+ dev->features &= ~NETIF_F_HW_CSUM;
-+
-+ return 0;
-+}
-+#endif
-+
-+#ifndef NETDEV_TX_OK
-+#define NETDEV_TX_OK 0
-+#endif
-+
-+#ifndef NETDEV_TX_BUSY
-+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,32)
-+#define NETDEV_TX_BUSY 0x1
-+#else
-+#define NETDEV_TX_BUSY 0x10
-+#endif
-+#endif
-+
-+#ifndef NETDEV_TX_LOCKED
-+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,32)
-+#define NETDEV_TX_LOCKED -1
-+#else
-+#define NETDEV_TX_LOCKED 0x20
-+#endif
-+#endif
-+
-+#ifndef CHECKSUM_PARTIAL
-+#define CHECKSUM_PARTIAL CHECKSUM_HW
-+#endif
-+
-+#ifndef NETIF_F_IPV6_CSUM
-+#define NETIF_F_IPV6_CSUM 16
-+#define BCM_NO_IPV6_CSUM 1
-+#endif
-+
-+#ifndef NETIF_F_RXCSUM
-+#define NETIF_F_RXCSUM (1 << 29)
-+#endif
-+
-+#ifndef NETIF_F_GRO
-+#define NETIF_F_GRO 16384
-+#endif
-+
-+#ifndef NETIF_F_LOOPBACK
-+#define NETIF_F_LOOPBACK (1 << 31)
-+#endif
-+
-+#ifdef NETIF_F_TSO
-+#ifndef NETIF_F_GSO
-+#define gso_size tso_size
-+#define gso_segs tso_segs
-+#endif
-+#ifndef NETIF_F_TSO6
-+#define NETIF_F_TSO6 0
-+#define BCM_NO_TSO6 1
-+#endif
-+#ifndef NETIF_F_TSO_ECN
-+#define NETIF_F_TSO_ECN 0
-+#endif
-+
-+#ifndef NETIF_F_ALL_TSO
-+#define NETIF_F_ALL_TSO (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN)
-+#endif
-+
-+#ifndef BCM_HAS_SKB_TX_TIMESTAMP
-+#define skb_tx_timestamp(skb)
-+#endif
-+
-+#ifdef BCM_HAS_SKB_SHARED_TX_UNION
-+#define tx_flags tx_flags.flags
-+
-+/* Definitions for tx_flags in struct skb_shared_info */
-+enum {
-+ /* generate hardware time stamp */
-+ SKBTX_HW_TSTAMP = 1 << 0,
-+
-+ /* device driver is going to provide hardware time stamp */
-+ SKBTX_IN_PROGRESS = 1 << 2,
-+};
-+#endif
-+
-+#ifndef BCM_HAS_SKB_FRAG_SIZE
-+#define skb_frag_size(skb_frag) ((skb_frag)->size)
-+#endif
-+
-+#if (LINUX_VERSION_CODE < 0x2060c)
-+static inline int skb_header_cloned(struct sk_buff *skb) { return 0; }
-+#endif
-+
-+#ifndef BCM_HAS_SKB_TRANSPORT_OFFSET
-+static inline int skb_transport_offset(const struct sk_buff *skb)
-+{
-+ return (int) (skb->h.raw - skb->data);
-+}
-+#endif
-+
-+#ifndef BCM_HAS_IP_HDR
-+static inline struct iphdr *ip_hdr(const struct sk_buff *skb)
-+{
-+ return skb->nh.iph;
-+}
-+#endif
-+
-+#ifndef BCM_HAS_IP_HDRLEN
-+static inline unsigned int ip_hdrlen(const struct sk_buff *skb)
-+{
-+ return ip_hdr(skb)->ihl * 4;
-+}
-+#endif
-+
-+#ifndef BCM_HAS_TCP_HDR
-+static inline struct tcphdr *tcp_hdr(const struct sk_buff *skb)
-+{
-+ return skb->h.th;
-+}
-+#endif
-+
-+#ifndef BCM_HAS_TCP_HDRLEN
-+static inline unsigned int tcp_hdrlen(const struct sk_buff *skb)
-+{
-+ return tcp_hdr(skb)->doff * 4;
-+}
-+#endif
-+
-+#ifndef BCM_HAS_TCP_OPTLEN
-+static inline unsigned int tcp_optlen(const struct sk_buff *skb)
-+{
-+ return (tcp_hdr(skb)->doff - 5) * 4;
-+}
-+#endif
-+
-+#ifndef NETIF_F_GSO
-+static struct sk_buff *skb_segment(struct sk_buff *skb, int features)
-+{
-+ struct sk_buff *segs = NULL;
-+ struct sk_buff *tail = NULL;
-+ unsigned int mss = skb_shinfo(skb)->gso_size;
-+ unsigned int doffset = skb->data - skb->mac.raw;
-+ unsigned int offset = doffset;
-+ unsigned int headroom;
-+ unsigned int len;
-+ int nfrags = skb_shinfo(skb)->nr_frags;
-+ int err = -ENOMEM;
-+ int i = 0;
-+ int pos;
-+
-+ __skb_push(skb, doffset);
-+ headroom = skb_headroom(skb);
-+ pos = skb_headlen(skb);
-+
-+ do {
-+ struct sk_buff *nskb;
-+ skb_frag_t *frag;
-+ int hsize;
-+ int k;
-+ int size;
-+
-+ len = skb->len - offset;
-+ if (len > mss)
-+ len = mss;
-+
-+ hsize = skb_headlen(skb) - offset;
-+ if (hsize < 0)
-+ hsize = 0;
-+ if (hsize > len)
-+ hsize = len;
-+
-+ nskb = alloc_skb(hsize + doffset + headroom, GFP_ATOMIC);
-+ if (unlikely(!nskb))
-+ goto err;
-+
-+ if (segs)
-+ tail->next = nskb;
-+ else
-+ segs = nskb;
-+ tail = nskb;
-+
-+ nskb->dev = skb->dev;
-+ nskb->priority = skb->priority;
-+ nskb->protocol = skb->protocol;
-+ nskb->dst = dst_clone(skb->dst);
-+ memcpy(nskb->cb, skb->cb, sizeof(skb->cb));
-+ nskb->pkt_type = skb->pkt_type;
-+ nskb->mac_len = skb->mac_len;
-+
-+ skb_reserve(nskb, headroom);
-+ nskb->mac.raw = nskb->data;
-+ nskb->nh.raw = nskb->data + skb->mac_len;
-+ nskb->h.raw = nskb->nh.raw + (skb->h.raw - skb->nh.raw);
-+ memcpy(skb_put(nskb, doffset), skb->data, doffset);
-+
-+ frag = skb_shinfo(nskb)->frags;
-+ k = 0;
-+
-+ nskb->ip_summed = CHECKSUM_PARTIAL;
-+ nskb->csum = skb->csum;
-+ memcpy(skb_put(nskb, hsize), skb->data + offset, hsize);
-+
-+ while (pos < offset + len) {
-+ BUG_ON(i >= nfrags);
-+
-+ *frag = skb_shinfo(skb)->frags[i];
-+ get_page(frag->page);
-+ size = frag->size;
-+
-+ if (pos < offset) {
-+ frag->page_offset += offset - pos;
-+ frag->size -= offset - pos;
-+ }
-+
-+ k++;
-+
-+ if (pos + size <= offset + len) {
-+ i++;
-+ pos += size;
-+ } else {
-+ frag->size -= pos + size - (offset + len);
-+ break;
-+ }
-+
-+ frag++;
-+ }
-+
-+ skb_shinfo(nskb)->nr_frags = k;
-+ nskb->data_len = len - hsize;
-+ nskb->len += nskb->data_len;
-+ nskb->truesize += nskb->data_len;
-+ } while ((offset += len) < skb->len);
-+
-+ return segs;
-+
-+err:
-+ while ((skb = segs)) {
-+ segs = skb->next;
-+ kfree(skb);
-+ }
-+ return ERR_PTR(err);
-+}
-+
-+static struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
-+{
-+ struct sk_buff *segs = ERR_PTR(-EINVAL);
-+ struct tcphdr *th;
-+ unsigned thlen;
-+ unsigned int seq;
-+ u32 delta;
-+ unsigned int oldlen;
-+ unsigned int len;
-+
-+ if (!pskb_may_pull(skb, sizeof(*th)))
-+ goto out;
-+
-+ th = skb->h.th;
-+ thlen = th->doff * 4;
-+ if (thlen < sizeof(*th))
-+ goto out;
-+
-+ if (!pskb_may_pull(skb, thlen))
-+ goto out;
-+
-+ oldlen = (u16)~skb->len;
-+ __skb_pull(skb, thlen);
-+
-+ segs = skb_segment(skb, features);
-+ if (IS_ERR(segs))
-+ goto out;
-+
-+ len = skb_shinfo(skb)->gso_size;
-+ delta = htonl(oldlen + (thlen + len));
-+
-+ skb = segs;
-+ th = skb->h.th;
-+ seq = ntohl(th->seq);
-+
-+ do {
-+ th->fin = th->psh = 0;
-+
-+ th->check = ~csum_fold((u32)((u32)th->check +
-+ (u32)delta));
-+ seq += len;
-+ skb = skb->next;
-+ th = skb->h.th;
-+
-+ th->seq = htonl(seq);
-+ th->cwr = 0;
-+ } while (skb->next);
-+
-+ delta = htonl(oldlen + (skb->tail - skb->h.raw) + skb->data_len);
-+ th->check = ~csum_fold((u32)((u32)th->check +
-+ (u32)delta));
-+out:
-+ return segs;
-+}
-+
-+static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features)
-+{
-+ struct sk_buff *segs = ERR_PTR(-EINVAL);
-+ struct iphdr *iph;
-+ int ihl;
-+ int id;
-+
-+ if (unlikely(!pskb_may_pull(skb, sizeof(*iph))))
-+ goto out;
-+
-+ iph = skb->nh.iph;
-+ ihl = iph->ihl * 4;
-+ if (ihl < sizeof(*iph))
-+ goto out;
-+
-+ if (unlikely(!pskb_may_pull(skb, ihl)))
-+ goto out;
-+
-+ skb->h.raw = __skb_pull(skb, ihl);
-+ iph = skb->nh.iph;
-+ id = ntohs(iph->id);
-+ segs = ERR_PTR(-EPROTONOSUPPORT);
-+
-+ segs = tcp_tso_segment(skb, features);
-+
-+ if (!segs || IS_ERR(segs))
-+ goto out;
-+
-+ skb = segs;
-+ do {
-+ iph = skb->nh.iph;
-+ iph->id = htons(id++);
-+ iph->tot_len = htons(skb->len - skb->mac_len);
-+ iph->check = 0;
-+ iph->check = ip_fast_csum(skb->nh.raw, iph->ihl);
-+ } while ((skb = skb->next));
-+
-+out:
-+ return segs;
-+}
-+
-+static struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features)
-+{
-+ struct sk_buff *segs = ERR_PTR(-EPROTONOSUPPORT);
-+
-+ skb->mac.raw = skb->data;
-+ skb->mac_len = skb->nh.raw - skb->data;
-+ __skb_pull(skb, skb->mac_len);
-+
-+ segs = inet_gso_segment(skb, features);
-+
-+ __skb_push(skb, skb->data - skb->mac.raw);
-+ return segs;
-+}
-+#endif /* NETIF_F_GSO */
-+
-+#endif /* NETIF_F_TSO */
-+
-+#ifndef BCM_HAS_SKB_COPY_FROM_LINEAR_DATA
-+static inline void skb_copy_from_linear_data(const struct sk_buff *skb,
-+ void *to,
-+ const unsigned int len)
-+{
-+ memcpy(to, skb->data, len);
-+}
-+#endif
-+
-+#if TG3_TSO_SUPPORT != 0
-+#if defined(BCM_NO_TSO6)
-+static inline int skb_is_gso_v6(const struct sk_buff *skb)
-+{
-+ return 0;
-+}
-+#else
-+#if !defined(BCM_HAS_SKB_IS_GSO_V6)
-+static inline int skb_is_gso_v6(const struct sk_buff *skb)
-+{
-+ return skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6;
-+}
-+#endif
-+#endif
-+#endif
-+
-+#ifndef BCM_HAS_SKB_CHECKSUM_NONE_ASSERT
-+static inline void skb_checksum_none_assert(struct sk_buff *skb)
-+{
-+ skb->ip_summed = CHECKSUM_NONE;
-+}
-+#endif
-+
-+#ifndef BCM_HAS_NETDEV_TX_T
-+typedef int netdev_tx_t;
-+#endif
-+
-+#ifndef BCM_HAS_NETDEV_FEATURES_T
-+typedef u32 netdev_features_t;
-+#endif
-+
-+#ifndef BCM_HAS_NETDEV_NAME
-+#define netdev_name(netdev) netdev->name
-+#endif
-+
-+#if defined(netdev_printk) && (LINUX_VERSION_CODE < 0x020609)
-+/* SLES 9.X provides their own print routines, but they are not compatible
-+ * with the versions found in the latest upstream kernel. The kernel
-+ * version check above was picked out of the air as a value greater than
-+ * 2.6.5-7.308, but any number that preserves this boundary should be
-+ * acceptable.
-+ */
-+#undef netdev_printk
-+#undef netdev_info
-+#undef netdev_err
-+#undef netdev_warn
-+#endif
-+
-+#ifndef netdev_printk
-+#define netdev_printk(level, netdev, format, args...) \
-+ dev_printk(level, tp->pdev->dev.parent, \
-+ "%s: " format, \
-+ netdev_name(tp->dev), ##args)
-+#endif
-+
-+#ifndef netif_printk
-+#define netif_printk(priv, type, level, dev, fmt, args...) \
-+do { \
-+ if (netif_msg_##type(priv)) \
-+ netdev_printk(level, (dev), fmt, ##args); \
-+} while (0)
-+#endif
-+
-+#ifndef netif_info
-+#define netif_info(priv, type, dev, fmt, args...) \
-+ netif_printk(priv, type, KERN_INFO, (dev), fmt, ##args)
-+#endif
-+
-+#ifndef netdev_err
-+#define netdev_err(dev, format, args...) \
-+ netdev_printk(KERN_ERR, dev, format, ##args)
-+#endif
-+
-+#ifndef netdev_warn
-+#define netdev_warn(dev, format, args...) \
-+ netdev_printk(KERN_WARNING, dev, format, ##args)
-+#endif
-+
-+#ifndef netdev_notice
-+#define netdev_notice(dev, format, args...) \
-+ netdev_printk(KERN_NOTICE, dev, format, ##args)
-+#endif
-+
-+#ifndef netdev_info
-+#define netdev_info(dev, format, args...) \
-+ netdev_printk(KERN_INFO, dev, format, ##args)
-+#endif
-+
-+#ifndef BCM_HAS_NETIF_TX_LOCK
-+static inline void netif_tx_lock(struct net_device *dev)
-+{
-+ spin_lock(&dev->xmit_lock);
-+ dev->xmit_lock_owner = smp_processor_id();
-+}
-+
-+static inline void netif_tx_unlock(struct net_device *dev)
-+{
-+ dev->xmit_lock_owner = -1;
-+ spin_unlock(&dev->xmit_lock);
-+}
-+#endif /* BCM_HAS_NETIF_TX_LOCK */
-+
-+#if defined(BCM_HAS_STRUCT_NETDEV_QUEUE) || \
-+ (defined(__VMKLNX__) && defined(__USE_COMPAT_LAYER_2_6_18_PLUS__))
-+
-+#define TG3_NAPI
-+#define napi_complete_(dev, napi) napi_complete((napi))
-+#define napi_schedule_(dev, napi) napi_schedule((napi))
-+#define tg3_netif_rx_schedule_prep(dev, napi) napi_schedule_prep((napi))
-+
-+#else /* BCM_HAS_STRUCT_NETDEV_QUEUE */
-+
-+#define netdev_queue net_device
-+#define netdev_get_tx_queue(dev, i) (dev)
-+#define netif_tx_start_queue(dev) netif_start_queue((dev))
-+#define netif_tx_start_all_queues(dev) netif_start_queue((dev))
-+#define netif_tx_stop_queue(dev) netif_stop_queue((dev))
-+#define netif_tx_stop_all_queues(dev) netif_stop_queue((dev))
-+#define netif_tx_queue_stopped(dev) netif_queue_stopped((dev))
-+#define netif_tx_wake_queue(dev) netif_wake_queue((dev))
-+#define netif_tx_wake_all_queues(dev) netif_wake_queue((dev))
-+#define __netif_tx_lock(txq, procid) netif_tx_lock((txq))
-+#define __netif_tx_unlock(txq) netif_tx_unlock((txq))
-+
-+#if defined(BCM_HAS_NEW_NETIF_INTERFACE)
-+#define TG3_NAPI
-+#define napi_complete_(dev, napi) netif_rx_complete((dev), (napi))
-+#define napi_schedule_(dev, napi) netif_rx_schedule((dev), (napi))
-+#define tg3_netif_rx_schedule_prep(dev, napi) netif_rx_schedule_prep((dev), (napi))
-+#else /* BCM_HAS_NEW_NETIF_INTERFACE */
-+#define napi_complete_(dev, napi) netif_rx_complete((dev))
-+#define napi_schedule_(dev, napi) netif_rx_schedule((dev))
-+#define tg3_netif_rx_schedule_prep(dev, napi) netif_rx_schedule_prep((dev))
-+#endif /* BCM_HAS_NEW_NETIF_INTERFACE */
-+
-+#endif /* BCM_HAS_STRUCT_NETDEV_QUEUE */
-+
-+#if !defined(BCM_HAS_ALLOC_ETHERDEV_MQ) || !defined(TG3_NAPI)
-+#define alloc_etherdev_mq(size, numqs) alloc_etherdev((size))
-+#endif
-+
-+#if !defined(TG3_NAPI) || !defined(BCM_HAS_VLAN_GRO_RECEIVE)
-+#define vlan_gro_receive(nap, grp, tag, skb) \
-+ vlan_hwaccel_receive_skb((skb), (grp), (tag))
-+#endif
-+
-+#ifndef NETIF_F_HW_VLAN_CTAG_TX
-+#define NETIF_F_HW_VLAN_CTAG_TX NETIF_F_HW_VLAN_TX
-+#else
-+#define BCM_HWACCEL_HAS_PROTO_ARG
-+#endif
-+
-+#ifndef NETIF_F_HW_VLAN_CTAG_RX
-+#define NETIF_F_HW_VLAN_CTAG_RX NETIF_F_HW_VLAN_RX
-+#endif
-+#if !defined(TG3_NAPI) || !defined(BCM_HAS_NAPI_GRO_RECEIVE)
-+#define napi_gro_receive(nap, skb) \
-+ netif_receive_skb((skb))
-+#endif
-+
-+#if !defined(BCM_HAS_SKB_GET_QUEUE_MAPPING) || !defined(TG3_NAPI)
-+#define skb_get_queue_mapping(skb) 0
-+#endif
-+
-+#ifdef TG3_NAPI
-+#if (LINUX_VERSION_CODE < 0x02061b) && !defined(__VMKLNX__)
-+
-+static inline void netif_napi_del(struct napi_struct *napi)
-+{
-+#ifdef CONFIG_NETPOLL
-+ list_del(&napi->dev_list);
-+#endif
-+}
-+#endif
-+
-+#endif
-+#if (LINUX_VERSION_CODE < 0x020612)
-+static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev,
-+ unsigned int length)
-+{
-+ struct sk_buff *skb = dev_alloc_skb(length);
-+ if (skb)
-+ skb->dev = dev;
-+ return skb;
-+}
-+#endif
-+
-+#ifndef BCM_HAS_NETDEV_PRIV
-+static inline void *netdev_priv(struct net_device *dev)
-+{
-+ return dev->priv;
-+}
-+#endif
-+
-+#ifdef OLD_NETIF
-+static inline void netif_poll_disable(struct net_device *dev)
-+{
-+ while (test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state)) {
-+ /* No hurry. */
-+ current->state = TASK_INTERRUPTIBLE;
-+ schedule_timeout(1);
-+ }
-+}
-+
-+static inline void netif_poll_enable(struct net_device *dev)
-+{
-+ clear_bit(__LINK_STATE_RX_SCHED, &dev->state);
-+}
-+
-+static inline void netif_tx_disable(struct net_device *dev)
-+{
-+ spin_lock_bh(&dev->xmit_lock);
-+ netif_stop_queue(dev);
-+ spin_unlock_bh(&dev->xmit_lock);
-+}
-+#endif /* OLD_NETIF */
-+
-+#ifndef BCM_HAS_NETDEV_SENT_QUEUE
-+#define netdev_sent_queue(dev, bytes)
-+#endif
-+
-+#ifndef BCM_HAS_NETDEV_TX_SENT_QUEUE
-+#define netdev_tx_sent_queue(q, bytes) \
-+ netdev_sent_queue(tp->dev, bytes)
-+#endif
-+
-+#ifndef BCM_HAS_NETDEV_COMPLETED_QUEUE
-+#define netdev_completed_queue(dev, pkts, bytes)
-+#endif
-+
-+#ifndef BCM_HAS_NETDEV_TX_COMPLETED_QUEUE
-+#define netdev_tx_completed_queue(q, pkt_cnt, byte_cnt) \
-+ netdev_completed_queue(tp->dev, pkt_cnt, byte_cnt)
-+#endif
-+
-+#ifndef BCM_HAS_NETDEV_RESET_QUEUE
-+#define netdev_reset_queue(dev_queue)
-+#endif
-+
-+#ifndef BCM_HAS_NETDEV_TX_RESET_QUEUE
-+#define netdev_tx_reset_queue(q) \
-+ netdev_reset_queue(tp->dev)
-+#endif
-+
-+#ifndef BCM_HAS_NETIF_SET_REAL_NUM_TX_QUEUES
-+#define netif_set_real_num_tx_queues(dev, nq) ((dev)->real_num_tx_queues = (nq))
-+#endif
-+
-+#ifndef BCM_HAS_NETIF_SET_REAL_NUM_RX_QUEUES
-+#define netif_set_real_num_rx_queues(dev, nq) 0
-+#endif
-+
-+#ifndef netdev_mc_count
-+#define netdev_mc_count(dev) ((dev)->mc_count)
-+#endif
-+
-+#ifndef netdev_mc_empty
-+#define netdev_mc_empty(dev) (netdev_mc_count(dev) == 0)
-+#endif
-+
-+/*
-+ * Commit ID 22bedad3ce112d5ca1eaf043d4990fa2ed698c87 is the patch that
-+ * undefines dmi_addr and pivots the code to use netdev_hw_addr rather
-+ * than dev_mc_list. Commit ID 6683ece36e3531fc8c75f69e7165c5f20930be88
-+ * is the patch that introduces netdev_for_each_mc_addr. Commit ID
-+ * f001fde5eadd915f4858d22ed70d7040f48767cf is the patch that introduces
-+ * netdev_hw_addr. These features are presented in reverse chronological
-+ * order.
-+ */
-+#ifdef BCM_HAS_NETDEV_HW_ADDR
-+#ifdef dmi_addr
-+#undef netdev_for_each_mc_addr
-+#define netdev_for_each_mc_addr(ha, dev) \
-+ struct dev_mc_list * oldmclist; \
-+ struct netdev_hw_addr foo; \
-+ ha = &foo; \
-+ for (oldmclist = dev->mc_list; oldmclist && memcpy(foo.addr, oldmclist->dmi_addr, 6); oldmclist = oldmclist->next)
-+#endif
-+#else /* BCM_HAS_NETDEV_HW_ADDR */
-+struct netdev_hw_addr {
-+ u8 * addr;
-+ struct dev_mc_list * curr;
-+};
-+#undef netdev_for_each_mc_addr
-+#define netdev_for_each_mc_addr(ha, dev) \
-+ struct netdev_hw_addr mclist; \
-+ ha = &mclist; \
-+ for (mclist.curr = dev->mc_list; mclist.curr && (mclist.addr = &mclist.curr->dmi_addr[0]); mclist.curr = mclist.curr->next)
-+#endif /* BCM_HAS_NETDEV_HW_ADDR */
-+
-+#ifndef BCM_HAS_GET_STATS64
-+#define rtnl_link_stats64 net_device_stats
-+#endif /* BCM_HAS_GET_STATS64 */
-+
-+#ifndef BCM_HAS_EXTERNAL_LB_DONE
-+#define ETH_TEST_FL_EXTERNAL_LB (1 << 2)
-+#define ETH_TEST_FL_EXTERNAL_LB_DONE (1 << 3)
-+#endif
-+
-+#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
-+#define BCM_KERNEL_SUPPORTS_8021Q
-+#endif
-+
-+#ifndef ETH_SS_TEST
-+#define ETH_SS_TEST 0
-+#endif
-+#ifndef ETH_SS_STATS
-+#define ETH_SS_STATS 1
-+#endif
-+#ifndef ADVERTISED_Pause
-+#define ADVERTISED_Pause (1 << 13)
-+#endif
-+#ifndef ADVERTISED_Asym_Pause
-+#define ADVERTISED_Asym_Pause (1 << 14)
-+#endif
-+
-+#ifndef ADVERTISED_1000baseKX_Full
-+#define ADVERTISED_1000baseKX_Full (1 << 17)
-+#endif
-+
-+#ifndef MII_CTRL1000
-+#define MII_CTRL1000 0x09
-+#endif
-+#ifndef ADVERTISE_1000HALF
-+#define ADVERTISE_1000HALF 0x0100
-+#endif
-+#ifndef ADVERTISE_1000FULL
-+#define ADVERTISE_1000FULL 0x0200
-+#endif
-+#ifndef CTL1000_AS_MASTER
-+#define CTL1000_AS_MASTER 0x0800
-+#endif
-+#ifndef CTL1000_ENABLE_MASTER
-+#define CTL1000_ENABLE_MASTER 0x1000
-+#endif
-+#ifndef MII_STAT1000
-+#define MII_STAT1000 0x0a
-+#endif
-+#ifndef BMCR_SPEED1000
-+#define BMCR_SPEED1000 0x0040
-+#endif
-+#ifndef ADVERTISE_1000XFULL
-+#define ADVERTISE_1000XFULL 0x0020
-+#endif
-+#ifndef ADVERTISE_1000XHALF
-+#define ADVERTISE_1000XHALF 0x0040
-+#endif
-+#ifndef ADVERTISE_1000XPAUSE
-+#define ADVERTISE_1000XPAUSE 0x0080
-+#endif
-+#ifndef ADVERTISE_1000XPSE_ASYM
-+#define ADVERTISE_1000XPSE_ASYM 0x0100
-+#endif
-+#ifndef ADVERTISE_PAUSE
-+#define ADVERTISE_PAUSE_CAP 0x0400
-+#endif
-+#ifndef ADVERTISE_PAUSE_ASYM
-+#define ADVERTISE_PAUSE_ASYM 0x0800
-+#endif
-+#ifndef LPA_1000XFULL
-+#define LPA_1000XFULL 0x0020
-+#endif
-+#ifndef LPA_1000XHALF
-+#define LPA_1000XHALF 0x0040
-+#endif
-+#ifndef LPA_1000XPAUSE
-+#define LPA_1000XPAUSE 0x0080
-+#endif
-+#ifndef LPA_1000XPAUSE_ASYM
-+#define LPA_1000XPAUSE_ASYM 0x0100
-+#endif
-+#ifndef LPA_PAUSE
-+#define LPA_PAUSE_CAP 0x0400
-+#endif
-+#ifndef LPA_PAUSE_ASYM
-+#define LPA_PAUSE_ASYM 0x0800
-+#endif
-+#ifndef LPA_1000FULL
-+#define LPA_1000FULL 0x0800
-+#endif
-+#ifndef LPA_1000HALF
-+#define LPA_1000HALF 0x0400
-+#endif
-+
-+#ifndef ETHTOOL_FWVERS_LEN
-+#define ETHTOOL_FWVERS_LEN 32
-+#endif
-+
-+#ifndef MDIO_MMD_AN
-+#define MDIO_MMD_AN 7
-+#endif
-+
-+#ifndef MDIO_AN_EEE_ADV
-+#define MDIO_AN_EEE_ADV 60
-+#endif
-+
-+#ifndef MDIO_AN_EEE_ADV_100TX
-+#define MDIO_AN_EEE_ADV_100TX 0x0002
-+#endif
-+
-+#ifndef MDIO_AN_EEE_ADV_1000T
-+#define MDIO_AN_EEE_ADV_1000T 0x0004
-+#endif
-+
-+#ifndef MDIO_AN_EEE_LPABLE
-+#define MDIO_AN_EEE_LPABLE 61
-+#endif
-+
-+#ifndef MDIO_EEE_100TX
-+#define MDIO_EEE_100TX MDIO_AN_EEE_ADV_100TX /* 100TX EEE cap */
-+#endif
-+
-+#ifndef MDIO_EEE_1000T
-+#define MDIO_EEE_1000T MDIO_AN_EEE_ADV_1000T /* 1000T EEE cap */
-+#endif
-+
-+#ifndef MDIO_EEE_1000KX
-+#define MDIO_EEE_1000KX 0x0010 /* 1000KX EEE cap */
-+#endif
-+
-+#ifndef BCM_HAS_MMD_EEE_ADV_TO_ETHTOOL
-+/**
-+ * mmd_eee_adv_to_ethtool_adv_t
-+ * @eee_adv: value of the MMD EEE Advertisement/Link Partner Ability registers
-+ *
-+ * A small helper function that translates the MMD EEE Advertisment (7.60)
-+ * and MMD EEE Link Partner Ability (7.61) bits to ethtool advertisement
-+ * settings.
-+ */
-+static inline u32 mmd_eee_adv_to_ethtool_adv_t(u16 eee_adv)
-+{
-+ u32 adv = 0;
-+
-+ if (eee_adv & MDIO_EEE_100TX)
-+ adv |= ADVERTISED_100baseT_Full;
-+ if (eee_adv & MDIO_EEE_1000T)
-+ adv |= ADVERTISED_1000baseT_Full;
-+ if (eee_adv & MDIO_EEE_1000KX)
-+ adv |= ADVERTISED_1000baseKX_Full;
-+
-+ return adv;
-+}
-+#endif
-+
-+#ifndef SPEED_UNKNOWN
-+#define SPEED_UNKNOWN -1
-+#endif
-+
-+#ifndef DUPLEX_UNKNOWN
-+#define DUPLEX_UNKNOWN 0xff
-+#endif
-+
-+#ifndef BCM_HAS_ETHTOOL_ADV_TO_MII_ADV_T
-+static inline u32 ethtool_adv_to_mii_adv_t(u32 ethadv)
-+{
-+ u32 result = 0;
-+
-+ if (ethadv & ADVERTISED_10baseT_Half)
-+ result |= ADVERTISE_10HALF;
-+ if (ethadv & ADVERTISED_10baseT_Full)
-+ result |= ADVERTISE_10FULL;
-+ if (ethadv & ADVERTISED_100baseT_Half)
-+ result |= ADVERTISE_100HALF;
-+ if (ethadv & ADVERTISED_100baseT_Full)
-+ result |= ADVERTISE_100FULL;
-+ if (ethadv & ADVERTISED_Pause)
-+ result |= ADVERTISE_PAUSE_CAP;
-+ if (ethadv & ADVERTISED_Asym_Pause)
-+ result |= ADVERTISE_PAUSE_ASYM;
-+
-+ return result;
-+}
-+
-+static inline u32 mii_adv_to_ethtool_adv_t(u32 adv)
-+{
-+ u32 result = 0;
-+
-+ if (adv & ADVERTISE_10HALF)
-+ result |= ADVERTISED_10baseT_Half;
-+ if (adv & ADVERTISE_10FULL)
-+ result |= ADVERTISED_10baseT_Full;
-+ if (adv & ADVERTISE_100HALF)
-+ result |= ADVERTISED_100baseT_Half;
-+ if (adv & ADVERTISE_100FULL)
-+ result |= ADVERTISED_100baseT_Full;
-+ if (adv & ADVERTISE_PAUSE_CAP)
-+ result |= ADVERTISED_Pause;
-+ if (adv & ADVERTISE_PAUSE_ASYM)
-+ result |= ADVERTISED_Asym_Pause;
-+
-+ return result;
-+}
-+
-+static inline u32 ethtool_adv_to_mii_ctrl1000_t(u32 ethadv)
-+{
-+ u32 result = 0;
-+
-+ if (ethadv & ADVERTISED_1000baseT_Half)
-+ result |= ADVERTISE_1000HALF;
-+ if (ethadv & ADVERTISED_1000baseT_Full)
-+ result |= ADVERTISE_1000FULL;
-+
-+ return result;
-+}
-+
-+static inline u32 mii_ctrl1000_to_ethtool_adv_t(u32 adv)
-+{
-+ u32 result = 0;
-+
-+ if (adv & ADVERTISE_1000HALF)
-+ result |= ADVERTISED_1000baseT_Half;
-+ if (adv & ADVERTISE_1000FULL)
-+ result |= ADVERTISED_1000baseT_Full;
-+
-+ return result;
-+}
-+
-+static inline u32 mii_lpa_to_ethtool_lpa_t(u32 lpa)
-+{
-+ u32 result = 0;
-+
-+ if (lpa & LPA_LPACK)
-+ result |= ADVERTISED_Autoneg;
-+
-+ return result | mii_adv_to_ethtool_adv_t(lpa);
-+}
-+
-+static inline u32 mii_stat1000_to_ethtool_lpa_t(u32 lpa)
-+{
-+ u32 result = 0;
-+
-+ if (lpa & LPA_1000HALF)
-+ result |= ADVERTISED_1000baseT_Half;
-+ if (lpa & LPA_1000FULL)
-+ result |= ADVERTISED_1000baseT_Full;
-+
-+ return result;
-+}
-+
-+static inline u32 ethtool_adv_to_mii_adv_x(u32 ethadv)
-+{
-+ u32 result = 0;
-+
-+ if (ethadv & ADVERTISED_1000baseT_Half)
-+ result |= ADVERTISE_1000XHALF;
-+ if (ethadv & ADVERTISED_1000baseT_Full)
-+ result |= ADVERTISE_1000XFULL;
-+ if (ethadv & ADVERTISED_Pause)
-+ result |= ADVERTISE_1000XPAUSE;
-+ if (ethadv & ADVERTISED_Asym_Pause)
-+ result |= ADVERTISE_1000XPSE_ASYM;
-+
-+ return result;
-+}
-+
-+static inline u32 mii_adv_to_ethtool_adv_x(u32 adv)
-+{
-+ u32 result = 0;
-+
-+ if (adv & ADVERTISE_1000XHALF)
-+ result |= ADVERTISED_1000baseT_Half;
-+ if (adv & ADVERTISE_1000XFULL)
-+ result |= ADVERTISED_1000baseT_Full;
-+ if (adv & ADVERTISE_1000XPAUSE)
-+ result |= ADVERTISED_Pause;
-+ if (adv & ADVERTISE_1000XPSE_ASYM)
-+ result |= ADVERTISED_Asym_Pause;
-+
-+ return result;
-+}
-+
-+static inline u32 mii_lpa_to_ethtool_lpa_x(u32 lpa)
-+{
-+ u32 result = 0;
-+
-+ if (lpa & LPA_LPACK)
-+ result |= ADVERTISED_Autoneg;
-+
-+ return result | mii_adv_to_ethtool_adv_x(lpa);
-+}
-+#endif /* BCM_HAS_ETHTOOL_ADV_TO_MII_100BT */
-+
-+#ifndef BCM_HAS_ETHTOOL_RXFH_INDIR_DEFAULT
-+static inline u32 ethtool_rxfh_indir_default(u32 index, u32 n_rx_rings)
-+{
-+ return index % n_rx_rings;
-+}
-+#endif /* BCM_HAS_ETHTOOL_RXFH_INDIR_DEFAULT */
-+
-+#ifndef BCM_HAS_MII_RESOLVE_FLOWCTRL_FDX
-+#ifndef FLOW_CTRL_TX
-+#define FLOW_CTRL_TX 0x01
-+#endif
-+#ifndef FLOW_CTRL_RX
-+#define FLOW_CTRL_RX 0x02
-+#endif
-+static u8 mii_resolve_flowctrl_fdx(u16 lcladv, u16 rmtadv)
-+{
-+ u8 cap = 0;
-+
-+ if (lcladv & rmtadv & ADVERTISE_PAUSE_CAP) {
-+ cap = FLOW_CTRL_TX | FLOW_CTRL_RX;
-+ } else if (lcladv & ADVERTISE_PAUSE_ASYM) {
-+ if (lcladv & LPA_PAUSE_CAP)
-+ cap = FLOW_CTRL_RX;
-+ if (rmtadv & LPA_PAUSE_CAP)
-+ cap = FLOW_CTRL_TX;
-+ }
-+
-+ return cap;
-+}
-+#endif /* BCM_HAS_MII_RESOLVE_FLOWCTRL_FDX */
-+
-+#ifndef BCM_HAS_MII_ADVERTISE_FLOWCTRL
-+static u16 mii_advertise_flowctrl(u8 flow_ctrl)
-+{
-+ u16 miireg;
-+
-+ if ((flow_ctrl & FLOW_CTRL_TX) && (flow_ctrl & FLOW_CTRL_RX))
-+ miireg = ADVERTISE_PAUSE_CAP;
-+ else if (flow_ctrl & FLOW_CTRL_TX)
-+ miireg = ADVERTISE_PAUSE_ASYM;
-+ else if (flow_ctrl & FLOW_CTRL_RX)
-+ miireg = ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
-+ else
-+ miireg = 0;
-+
-+ return miireg;
-+}
-+#endif /* BCM_HAS_MII_ADVERTISE_FLOWCTRL */
-+
-+#ifdef BCM_INCLUDE_PHYLIB_SUPPORT
-+
-+#ifndef PHY_ID_BCM50610
-+#define PHY_ID_BCM50610 0x0143bd60
-+#endif
-+#ifndef PHY_ID_BCM50610M
-+#define PHY_ID_BCM50610M 0x0143bd70
-+#endif
-+#ifndef PHY_ID_BCM50612E
-+#define PHY_ID_BCM50612E 0x03625e20
-+#endif
-+#ifndef PHY_ID_BCMAC131
-+#define PHY_ID_BCMAC131 0x0143bc70
-+#endif
-+#ifndef PHY_ID_BCM57780
-+#define PHY_ID_BCM57780 0x03625d90
-+#endif
-+#ifndef PHY_BCM_OUI_MASK
-+#define PHY_BCM_OUI_MASK 0xfffffc00
-+#endif
-+#ifndef PHY_BCM_OUI_1
-+#define PHY_BCM_OUI_1 0x00206000
-+#endif
-+#ifndef PHY_BCM_OUI_2
-+#define PHY_BCM_OUI_2 0x0143bc00
-+#endif
-+#ifndef PHY_BCM_OUI_3
-+#define PHY_BCM_OUI_3 0x03625c00
-+#endif
-+
-+#ifndef PHY_BRCM_STD_IBND_DISABLE
-+#define PHY_BRCM_STD_IBND_DISABLE 0x00000800
-+#define PHY_BRCM_EXT_IBND_RX_ENABLE 0x00001000
-+#define PHY_BRCM_EXT_IBND_TX_ENABLE 0x00002000
-+#endif
-+
-+#ifndef PHY_BRCM_RX_REFCLK_UNUSED
-+#define PHY_BRCM_RX_REFCLK_UNUSED 0x00000400
-+#endif
-+
-+#ifndef PHY_BRCM_CLEAR_RGMII_MODE
-+#define PHY_BRCM_CLEAR_RGMII_MODE 0x00004000
-+#endif
-+
-+#ifndef PHY_BRCM_DIS_TXCRXC_NOENRGY
-+#define PHY_BRCM_DIS_TXCRXC_NOENRGY 0x00008000
-+#endif
-+
-+#ifndef BCM_HAS_MDIOBUS_ALLOC
-+static struct mii_bus *mdiobus_alloc(void)
-+{
-+ struct mii_bus *bus;
-+
-+ bus = kzalloc(sizeof(*bus), GFP_KERNEL);
-+
-+ return bus;
-+}
-+
-+void mdiobus_free(struct mii_bus *bus)
-+{
-+ kfree(bus);
-+}
-+#endif
-+
-+#endif /* BCM_INCLUDE_PHYLIB_SUPPORT */
-+
-+#ifndef BCM_HAS_ETHTOOL_CMD_SPEED
-+static inline __u32 ethtool_cmd_speed(struct ethtool_cmd *ep)
-+{
-+ return ep->speed;
-+}
-+#endif /* BCM_HAS_ETHTOOL_CMD_SPEED */
-+
-+#ifndef BCM_HAS_ETHTOOL_CMD_SPEED_SET
-+static inline __u32 ethtool_cmd_speed_set(struct ethtool_cmd *ep, __u32 speed)
-+{
-+ ep->speed = speed;
-+ return 0;
-+}
-+#endif /* BCM_HAS_ETHTOOL_CMD_SPEED_SET */
-+
-+#ifdef BCM_HAS_PCI_BUSN_RES
-+#define busn_res_end busn_res.end
-+#else
-+#define busn_res_end subordinate
-+#endif
-+
-+#ifndef __devinit
-+#define __devinit
-+#endif
-+
-+#ifndef __devinitdata
-+#define __devinitdata
-+#endif
-+
-+#ifndef __devexit
-+#define __devexit
-+#endif
-+
-+#ifndef __devexit_p
-+#define __devexit_p(x) (x)
-+#endif
-+
-+#ifndef CONFIG_SSB_DRIVER_GIGE
-+#define ssb_gige_get_macaddr(a, b) (0)
-+#define ssb_gige_get_phyaddr(a) (0)
-+#define pdev_is_ssb_gige_core(a) (0)
-+#define ssb_gige_must_flush_posted_writes(a) (0)
-+#define ssb_gige_one_dma_at_once(a) (0)
-+#define ssb_gige_have_roboswitch(a) (0)
-+#define ssb_gige_is_rgmii(a) (0)
-+#else
-+#include
-+#endif
-+
-+#ifndef ETHTOOL_GEEE
-+struct ethtool_eee {
-+ __u32 cmd;
-+ __u32 supported;
-+ __u32 advertised;
-+ __u32 lp_advertised;
-+ __u32 eee_active;
-+ __u32 eee_enabled;
-+ __u32 tx_lpi_enabled;
-+ __u32 tx_lpi_timer;
-+ __u32 reserved[2];
-+};
-+#endif
-+
-+#ifdef __VMKLNX__
-+#ifndef SYSTEM_POWER_OFF
-+#define SYSTEM_POWER_OFF (3)
-+#endif
-+
-+#define system_state SYSTEM_POWER_OFF
-+#endif
-+
-+#ifndef BCM_HAS_PCI_CHANNEL_OFFLINE
-+static inline int pci_channel_offline(struct pci_dev *pdev)
-+{
-+#ifdef BCM_HAS_PCI_CHANNEL_IO_NORMAL_ENUM
-+ return (pdev->error_state != pci_channel_io_normal);
-+#else
-+ return 0;
-+#endif
-+}
-+#endif /*BCM_HAS_PCI_CHANNEL_OFFLINE*/
-+
-+#ifndef BCM_HAS_PCI_IS_ENABLED
-+static inline int pci_is_enabled(struct pci_dev *pdev)
-+{
-+ return 1;
-+}
-+#endif
-+
-+#ifndef BCM_HAS_PCI_DEV_IS_PRESENT
-+static inline int pci_device_is_present(struct pci_dev *pdev)
-+{
-+ return 1;
-+}
-+#endif
-+#ifndef BCM_HAS_DMA_ZALLOC_COHERENT
-+#ifndef __GFP_ZERO
-+ #define ___GFP_ZERO 0x8000u
-+ #define __GFP_ZERO ((__force unsigned)___GFP_ZERO) /* Return zeroed page on success */
-+#endif
-+
-+static inline void *dma_zalloc_coherent(struct device *dev, size_t size,
-+ dma_addr_t *dma_handle, unsigned flag)
-+{
-+ void *ret = dma_alloc_coherent(dev, size, dma_handle,
-+ flag | __GFP_ZERO);
-+ return ret;
-+}
-+#endif
-+
-+#ifndef DEFAULT_MAX_NUM_RSS_QUEUES
-+#define DEFAULT_MAX_NUM_RSS_QUEUES (8)
-+#endif
-+
-+#ifndef BCM_HAS_GET_NUM_DFLT_RSS_QS
-+int netif_get_num_default_rss_queues(void)
-+{
-+ return min_t(int, DEFAULT_MAX_NUM_RSS_QUEUES, num_online_cpus());
-+}
-+#endif
-+
-+#ifndef SIOCGHWTSTAMP
-+#define SIOCGHWTSTAMP 0x89b1
-+#endif
-diff --git a/drivers/net/ethernet/broadcom/tg3/tg3_compat2.h b/drivers/net/ethernet/broadcom/tg3/tg3_compat2.h
-new file mode 100644
-index 0000000..07c968d
---- /dev/null
-+++ b/drivers/net/ethernet/broadcom/tg3/tg3_compat2.h
-@@ -0,0 +1,518 @@
-+/* Copyright (C) 2009-2015 Broadcom Corporation. */
-+
-+#ifndef BCM_HAS_PCI_PCIE_CAP
-+static inline int pci_pcie_cap(struct pci_dev *pdev)
-+{
-+ struct net_device *dev = pci_get_drvdata(pdev);
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ return tp->pcie_cap;
-+}
-+#endif
-+
-+#ifndef BCM_HAS_PCI_IS_PCIE
-+static inline bool pci_is_pcie(struct pci_dev *dev)
-+{
-+ return !!pci_pcie_cap(dev);
-+}
-+#endif
-+
-+#ifndef BCM_HAS_PCIE_CAP_RW
-+static inline int pcie_capability_set_word(struct pci_dev *dev, int pos,
-+ u16 set)
-+{
-+ u16 val;
-+ int rval;
-+
-+ rval = pci_read_config_word(dev, pci_pcie_cap(dev) + pos, &val);
-+
-+ if (!rval) {
-+ val |= set;
-+ rval = pci_write_config_word(dev, pci_pcie_cap(dev) + pos, val);
-+ }
-+
-+ return rval;
-+}
-+
-+static inline int pcie_capability_clear_word(struct pci_dev *dev, int pos,
-+ u16 clear)
-+{
-+ u16 val;
-+ int rval;
-+
-+ rval = pci_read_config_word(dev, pci_pcie_cap(dev) + pos, &val);
-+
-+ if (!rval) {
-+ val &= ~clear;
-+ rval = pci_write_config_word(dev, pci_pcie_cap(dev) + pos, val);
-+ }
-+
-+ return rval;
-+}
-+
-+static int pcie_capability_write_word(struct pci_dev *dev, int pos, u16 val)
-+{
-+ return pci_write_config_word(dev, pci_pcie_cap(dev) + pos, val);
-+}
-+
-+static int pcie_capability_read_word(struct pci_dev *dev, int pos, u16 *val)
-+{
-+ return pci_read_config_word(dev, pci_pcie_cap(dev) + pos, val);
-+}
-+#endif
-+
-+#ifndef BCM_HAS_SKB_FRAG_DMA_MAP
-+#define skb_frag_dma_map(x, frag, y, len, z) \
-+ pci_map_page(tp->pdev, (frag)->page, \
-+ (frag)->page_offset, (len), PCI_DMA_TODEVICE)
-+#endif
-+
-+#ifdef SIMPLE_DEV_PM_OPS
-+
-+#define tg3_invalid_pci_state(tp, state) false
-+#define tg3_pci_save_state(tp)
-+#define tg3_pci_restore_state(tp)
-+
-+#else /* SIMPLE_DEV_PM_OPS */
-+
-+#if (LINUX_VERSION_CODE < 0x2060b)
-+static bool tg3_invalid_pci_state(struct tg3 *tp, u32 state)
-+{
-+ bool ret = true;
-+ pci_power_t target_state;
-+
-+ target_state = pci_choose_state(tp->pdev, state);
-+ if (target_state != PCI_D3hot || target_state != PCI_D3cold)
-+ ret = false;
-+
-+ return ret;
-+}
-+#else
-+static bool tg3_invalid_pci_state(struct tg3 *tp, pm_message_t state)
-+{
-+ bool ret = true;
-+ pci_power_t target_state;
-+
-+#ifdef BCM_HAS_PCI_TARGET_STATE
-+ target_state = tp->pdev->pm_cap ? pci_target_state(tp->pdev) : PCI_D3hot;
-+#else
-+ target_state = pci_choose_state(tp->pdev, state);
-+#endif
-+ if (target_state != PCI_D3hot || target_state != PCI_D3cold)
-+ ret = false;
-+
-+ return ret;
-+}
-+#endif
-+
-+#if (LINUX_VERSION_CODE < 0x2060a)
-+#define tg3_pci_save_state(tp) pci_save_state(tp->pdev, tp->pci_cfg_state)
-+#define tg3_pci_restore_state(tp) pci_restore_state(tp->pdev, tp->pci_cfg_state)
-+#else
-+#define tg3_pci_save_state(tp) pci_save_state(tp->pdev)
-+#define tg3_pci_restore_state(tp) pci_restore_state(tp->pdev)
-+#endif
-+
-+#endif /* SIMPLE_DEV_PM_OPS */
-+
-+
-+#ifdef BCM_HAS_NEW_PCI_DMA_MAPPING_ERROR
-+#define pci_dma_mapping_error_(pdev, mapping) pci_dma_mapping_error((pdev), (mapping))
-+#define dma_mapping_error_(pdev, mapping) dma_mapping_error((pdev), (mapping))
-+#elif defined(BCM_HAS_PCI_DMA_MAPPING_ERROR)
-+#define pci_dma_mapping_error_(pdev, mapping) pci_dma_mapping_error((mapping))
-+#define dma_mapping_error_(pdev, mapping) dma_mapping_error((mapping))
-+#else
-+#define pci_dma_mapping_error_(pdev, mapping) 0
-+#define dma_mapping_error_(pdev, mapping) 0
-+#endif
-+
-+#ifndef BCM_HAS_HW_FEATURES
-+#define hw_features features
-+#endif
-+
-+#ifndef BCM_HAS_VLAN_FEATURES
-+#define vlan_features features
-+#endif
-+
-+#ifdef HAVE_POLL_CONTROLLER
-+#define CONFIG_NET_POLL_CONTROLLER
-+#endif
-+
-+static inline void tg3_5780_class_intx_workaround(struct tg3 *tp)
-+{
-+#ifndef BCM_HAS_INTX_MSI_WORKAROUND
-+ if (tg3_flag(tp, 5780_CLASS) &&
-+ tg3_flag(tp, USING_MSI))
-+ tg3_enable_intx(tp->pdev);
-+#endif
-+}
-+
-+#ifdef BCM_HAS_TXQ_TRANS_UPDATE
-+#define tg3_update_trans_start(dev)
-+#else
-+#define tg3_update_trans_start(dev) ((dev)->trans_start = jiffies)
-+#endif
-+
-+#ifndef BCM_HAS_NEW_VLAN_INTERFACE
-+#define TG3_TO_INT(Y) ((int)((ptrdiff_t)(Y) & (SMP_CACHE_BYTES - 1)))
-+#define TG3_COMPAT_VLAN_ALLOC_LEN (SMP_CACHE_BYTES + VLAN_HLEN)
-+#define TG3_COMPAT_VLAN_RESERVE(addr) (SKB_DATA_ALIGN((addr) + VLAN_HLEN) - (addr))
-+#else
-+#define TG3_COMPAT_VLAN_ALLOC_LEN 0
-+#define TG3_COMPAT_VLAN_RESERVE(addr) 0
-+#endif
-+
-+#ifdef BCM_KERNEL_SUPPORTS_8021Q
-+
-+#ifndef BCM_HAS_NEW_VLAN_INTERFACE
-+#undef TG3_RAW_IP_ALIGN
-+#define TG3_RAW_IP_ALIGN (2 + VLAN_HLEN)
-+#endif /* BCM_HAS_NEW_VLAN_INTERFACE */
-+
-+#ifndef BCM_HAS_NEW_VLAN_INTERFACE
-+static void __tg3_set_rx_mode(struct net_device *);
-+static inline void tg3_netif_start(struct tg3 *tp);
-+static inline void tg3_netif_stop(struct tg3 *tp);
-+static inline void tg3_full_lock(struct tg3 *tp, int irq_sync);
-+static inline void tg3_full_unlock(struct tg3 *tp);
-+
-+static void tg3_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (!netif_running(dev)) {
-+ tp->vlgrp = grp;
-+ return;
-+ }
-+
-+ tg3_netif_stop(tp);
-+
-+ tg3_full_lock(tp, 0);
-+
-+ tp->vlgrp = grp;
-+
-+ /* Update RX_MODE_KEEP_VLAN_TAG bit in RX_MODE register. */
-+ __tg3_set_rx_mode(dev);
-+
-+ tg3_netif_start(tp);
-+
-+ tg3_full_unlock(tp);
-+}
-+
-+#ifndef BCM_HAS_NET_DEVICE_OPS
-+#ifndef BCM_HAS_VLAN_GROUP_SET_DEVICE
-+static inline void vlan_group_set_device(struct vlan_group *vg, int vlan_id,
-+ struct net_device *dev)
-+{
-+ if (vg)
-+ vg->vlan_devices[vlan_id] = dev;
-+}
-+#endif
-+
-+static void tg3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (netif_running(dev))
-+ tg3_netif_stop(tp);
-+
-+ tg3_full_lock(tp, 0);
-+ vlan_group_set_device(tp->vlgrp, vid, NULL);
-+ tg3_full_unlock(tp);
-+
-+ if (netif_running(dev))
-+ tg3_netif_start(tp);
-+}
-+#endif /* BCM_HAS_NET_DEVICE_OPS */
-+#endif /* BCM_USE_OLD_VLAN_INTERFACE */
-+#endif /* BCM_KERNEL_SUPPORTS_8021Q */
-+
-+
-+#ifndef BCM_HAS_NETDEV_UPDATE_FEATURES
-+static u32 tg3_get_rx_csum(struct net_device *dev)
-+{
-+ return (dev->features & NETIF_F_RXCSUM) != 0;
-+}
-+
-+static int tg3_set_rx_csum(struct net_device *dev, u32 data)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ /* BROKEN_CHECKSUMS */
-+ if (tp->pci_chip_rev_id == CHIPREV_ID_5700_B0) {
-+ if (data != 0)
-+ return -EINVAL;
-+ return 0;
-+ }
-+
-+ spin_lock_bh(&tp->lock);
-+ if (data)
-+ dev->features |= NETIF_F_RXCSUM;
-+ else
-+ dev->features &= ~NETIF_F_RXCSUM;
-+ spin_unlock_bh(&tp->lock);
-+
-+ return 0;
-+}
-+
-+#ifdef BCM_HAS_SET_TX_CSUM
-+static int tg3_set_tx_csum(struct net_device *dev, u32 data)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ /* BROKEN_CHECKSUMS */
-+ if (tp->pci_chip_rev_id == CHIPREV_ID_5700_B0) {
-+ if (data != 0)
-+ return -EINVAL;
-+ return 0;
-+ }
-+
-+ if (tg3_flag(tp, 5755_PLUS))
-+#if defined(BCM_HAS_ETHTOOL_OP_SET_TX_IPV6_CSUM)
-+ ethtool_op_set_tx_ipv6_csum(dev, data);
-+#elif defined(BCM_HAS_ETHTOOL_OP_SET_TX_HW_CSUM)
-+ ethtool_op_set_tx_hw_csum(dev, data);
-+#else
-+ tg3_set_tx_hw_csum(dev, data);
-+#endif
-+ else
-+ ethtool_op_set_tx_csum(dev, data);
-+
-+ return 0;
-+}
-+#endif
-+
-+#if TG3_TSO_SUPPORT != 0
-+static int tg3_set_tso(struct net_device *dev, u32 value)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (!tg3_flag(tp, TSO_CAPABLE)) {
-+ if (value)
-+ return -EINVAL;
-+ return 0;
-+ }
-+ if ((dev->features & NETIF_F_IPV6_CSUM) &&
-+ (tg3_flag(tp, HW_TSO_2) ||
-+ tg3_flag(tp, HW_TSO_3))) {
-+ if (value) {
-+ dev->features |= NETIF_F_TSO6;
-+ if (tg3_flag(tp, HW_TSO_3) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5761 ||
-+ (tg3_asic_rev(tp) == ASIC_REV_5784 &&
-+ tg3_chip_rev(tp) != CHIPREV_5784_AX) ||
-+ tg3_asic_rev(tp) == ASIC_REV_5785 ||
-+ tg3_asic_rev(tp) == ASIC_REV_57780)
-+ dev->features |= NETIF_F_TSO_ECN;
-+ } else
-+ dev->features &= ~(NETIF_F_TSO6 | NETIF_F_TSO_ECN);
-+ }
-+ return ethtool_op_set_tso(dev, value);
-+}
-+#endif
-+
-+static void netdev_update_features(struct net_device *dev)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+
-+ if (dev->mtu > ETH_DATA_LEN) {
-+ if (tg3_flag(tp, 5780_CLASS)) {
-+#if TG3_TSO_SUPPORT != 0
-+ ethtool_op_set_tso(dev, 0);
-+#endif
-+ }
-+ }
-+}
-+#endif /* BCM_HAS_NETDEV_UPDATE_FEATURES */
-+
-+#if !defined(BCM_HAS_SET_PHYS_ID) || defined(GET_ETHTOOL_OP_EXT)
-+
-+#if !defined(BCM_HAS_SET_PHYS_ID)
-+enum ethtool_phys_id_state {
-+ ETHTOOL_ID_INACTIVE,
-+ ETHTOOL_ID_ACTIVE,
-+ ETHTOOL_ID_ON,
-+ ETHTOOL_ID_OFF
-+};
-+#endif
-+
-+static int tg3_set_phys_id(struct net_device *dev,
-+ enum ethtool_phys_id_state state);
-+static int tg3_phys_id(struct net_device *dev, u32 data)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ int i;
-+
-+ if (!netif_running(tp->dev))
-+ return -EAGAIN;
-+
-+ if (data == 0)
-+ data = UINT_MAX / 2;
-+
-+ for (i = 0; i < (data * 2); i++) {
-+ if ((i % 2) == 0)
-+ tg3_set_phys_id(dev, ETHTOOL_ID_ON);
-+ else
-+ tg3_set_phys_id(dev, ETHTOOL_ID_OFF);
-+
-+ if (msleep_interruptible(500))
-+ break;
-+ }
-+ tg3_set_phys_id(dev, ETHTOOL_ID_INACTIVE);
-+ return 0;
-+}
-+#endif /* BCM_HAS_SET_PHYS_ID */
-+
-+#ifndef BCM_HAS_GET_STATS64
-+static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev,
-+ struct rtnl_link_stats64 *stats);
-+static struct rtnl_link_stats64 *tg3_get_stats(struct net_device *dev)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ return tg3_get_stats64(dev, &tp->net_stats);
-+}
-+#endif /* BCM_HAS_GET_STATS64 */
-+
-+#ifdef BCM_HAS_GET_RXFH_INDIR
-+#ifndef BCM_HAS_GET_RXFH_INDIR_SIZE
-+static int tg3_get_rxfh_indir(struct net_device *dev,
-+ struct ethtool_rxfh_indir *indir)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ int i;
-+
-+ if (!tg3_flag(tp, SUPPORT_MSIX))
-+ return -EINVAL;
-+
-+ if (!indir->size) {
-+ indir->size = TG3_RSS_INDIR_TBL_SIZE;
-+ return 0;
-+ }
-+
-+ if (indir->size != TG3_RSS_INDIR_TBL_SIZE)
-+ return -EINVAL;
-+
-+ for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i++)
-+ indir->ring_index[i] = tp->rss_ind_tbl[i];
-+
-+ return 0;
-+}
-+
-+static void tg3_rss_init_dflt_indir_tbl(struct tg3 *tp, u32 qcnt);
-+static void tg3_rss_write_indir_tbl(struct tg3 *tp);
-+static inline void tg3_full_lock(struct tg3 *tp, int irq_sync);
-+static inline void tg3_full_unlock(struct tg3 *tp);
-+
-+static int tg3_set_rxfh_indir(struct net_device *dev,
-+ const struct ethtool_rxfh_indir *indir)
-+{
-+ struct tg3 *tp = netdev_priv(dev);
-+ size_t i;
-+
-+ if (!tg3_flag(tp, SUPPORT_MSIX))
-+ return -EINVAL;
-+
-+ if (!indir->size) {
-+ tg3_flag_clear(tp, USER_INDIR_TBL);
-+ tg3_rss_init_dflt_indir_tbl(tp, tp->rxq_cnt);
-+ } else {
-+ int limit;
-+
-+ /* Validate size and indices */
-+ if (indir->size != TG3_RSS_INDIR_TBL_SIZE)
-+ return -EINVAL;
-+
-+ if (netif_running(dev))
-+ limit = tp->irq_cnt;
-+ else {
-+ limit = num_online_cpus();
-+ if (limit > TG3_IRQ_MAX_VECS_RSS)
-+ limit = TG3_IRQ_MAX_VECS_RSS;
-+ }
-+
-+ /* The first interrupt vector only
-+ * handles link interrupts.
-+ */
-+ limit -= 1;
-+
-+ /* Check the indices in the table.
-+ * Leave the existing table unmodified
-+ * if an error is detected.
-+ */
-+ for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i++)
-+ if (indir->ring_index[i] >= limit)
-+ return -EINVAL;
-+
-+ tg3_flag_set(tp, USER_INDIR_TBL);
-+
-+ for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i++)
-+ tp->rss_ind_tbl[i] = indir->ring_index[i];
-+ }
-+
-+ if (!netif_running(dev) || !tg3_flag(tp, ENABLE_RSS))
-+ return 0;
-+
-+ /* It is legal to write the indirection
-+ * table while the device is running.
-+ */
-+ tg3_full_lock(tp, 0);
-+ tg3_rss_write_indir_tbl(tp);
-+ tg3_full_unlock(tp);
-+
-+ return 0;
-+}
-+#endif /* !BCM_HAS_GET_RXFH_INDIR_SIZE */
-+#endif /* BCM_HAS_GET_RXFH_INDIR */
-+
-+#ifdef __VMKLNX__
-+
-+/**
-+ * skb_copy_expand - copy and expand sk_buff
-+ * @skb: buffer to copy
-+ * @newheadroom: new free bytes at head
-+ * @newtailroom: new free bytes at tail
-+ * @gfp_mask: allocation priority
-+ *
-+ * Make a copy of both an &sk_buff and its data and while doing so
-+ * allocate additional space.
-+ *
-+ * This is used when the caller wishes to modify the data and needs a
-+ * private copy of the data to alter as well as more space for new fields.
-+ * Returns %NULL on failure or the pointer to the buffer
-+ * on success. The returned buffer has a reference count of 1.
-+ *
-+ * You must pass %GFP_ATOMIC as the allocation priority if this function
-+ * is called from an interrupt.
-+ */
-+struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
-+ int newheadroom, int newtailroom,
-+ gfp_t gfp_mask)
-+{
-+ int rc;
-+ struct sk_buff *new_skb = skb_copy((struct sk_buff *) skb, gfp_mask);
-+
-+ if(new_skb == NULL)
-+ return NULL;
-+
-+ rc = pskb_expand_head(new_skb, newheadroom, newtailroom, gfp_mask);
-+
-+ if(rc != 0)
-+ return NULL;
-+
-+ return new_skb;
-+}
-+
-+void *memmove(void *dest, const void *src, size_t count)
-+{
-+ if (dest < src) {
-+ return memcpy(dest, src, count);
-+ } else {
-+ char *p = dest + count;
-+ const char *s = src + count;
-+ while (count--)
-+ *--p = *--s;
-+ }
-+ return dest;
-+}
-+#endif
-diff --git a/drivers/net/ethernet/broadcom/tg3/tg3_firmware.h b/drivers/net/ethernet/broadcom/tg3/tg3_firmware.h
-new file mode 100644
-index 0000000..a5a4928
---- /dev/null
-+++ b/drivers/net/ethernet/broadcom/tg3/tg3_firmware.h
-@@ -0,0 +1,1012 @@
-+/* Copyright (C) 2009-2015 Broadcom Corporation. */
-+
-+#ifdef NETIF_F_TSO
-+#define TG3_TSO_SUPPORT 1
-+#else
-+#define TG3_TSO_SUPPORT 0
-+#endif
-+
-+#ifndef BCM_HAS_REQUEST_FIRMWARE
-+
-+struct tg3_firmware {
-+ size_t size;
-+ const u8 *data;
-+};
-+
-+struct tg3_firmware_hdr {
-+ u32 version; /* unused for fragments */
-+ u32 base_addr;
-+ u32 len;
-+};
-+#define TG3_FW_HDR_LEN (sizeof(struct tg3_firmware_hdr))
-+
-+#ifndef MODULE_FIRMWARE
-+#define MODULE_FIRMWARE(x)
-+#endif
-+
-+#define TG3_FW_RELEASE_MAJOR 0x0
-+#define TG3_FW_RELASE_MINOR 0x0
-+#define TG3_FW_RELEASE_FIX 0x0
-+#define TG3_FW_START_ADDR 0x08000000
-+#define TG3_FW_TEXT_ADDR 0x08000000
-+#define TG3_FW_TEXT_LEN 0x9c0
-+#define TG3_FW_RODATA_ADDR 0x080009c0
-+#define TG3_FW_RODATA_LEN 0x60
-+#define TG3_FW_DATA_ADDR 0x08000a40
-+#define TG3_FW_DATA_LEN 0x20
-+#define TG3_FW_SBSS_ADDR 0x08000a60
-+#define TG3_FW_SBSS_LEN 0xc
-+#define TG3_FW_BSS_ADDR 0x08000a70
-+#define TG3_FW_BSS_LEN 0x10
-+
-+#define TG3_5701_RLS_FW_LEN (TG3_FW_TEXT_LEN + TG3_FW_RODATA_LEN)
-+
-+static const u32 tg3FwText[] = {
-+0x00000000, (u32)TG3_FW_TEXT_ADDR, (u32)TG3_5701_RLS_FW_LEN,
-+0x00000000, 0x10000003, 0x00000000, 0x0000000d,
-+0x0000000d, 0x3c1d0800, 0x37bd3ffc, 0x03a0f021,
-+0x3c100800, 0x26100000, 0x0e000018, 0x00000000,
-+0x0000000d, 0x3c1d0800, 0x37bd3ffc, 0x03a0f021,
-+0x3c100800, 0x26100034, 0x0e00021c, 0x00000000,
-+0x0000000d, 0x00000000, 0x00000000, 0x00000000,
-+0x27bdffe0, 0x3c1cc000, 0xafbf0018, 0xaf80680c,
-+0x0e00004c, 0x241b2105, 0x97850000, 0x97870002,
-+0x9782002c, 0x9783002e, 0x3c040800, 0x248409c0,
-+0xafa00014, 0x00021400, 0x00621825, 0x00052c00,
-+0xafa30010, 0x8f860010, 0x00e52825, 0x0e000060,
-+0x24070102, 0x3c02ac00, 0x34420100, 0x3c03ac01,
-+0x34630100, 0xaf820490, 0x3c02ffff, 0xaf820494,
-+0xaf830498, 0xaf82049c, 0x24020001, 0xaf825ce0,
-+0x0e00003f, 0xaf825d00, 0x0e000140, 0x00000000,
-+0x8fbf0018, 0x03e00008, 0x27bd0020, 0x2402ffff,
-+0xaf825404, 0x8f835400, 0x34630400, 0xaf835400,
-+0xaf825404, 0x3c020800, 0x24420034, 0xaf82541c,
-+0x03e00008, 0xaf805400, 0x00000000, 0x00000000,
-+0x3c020800, 0x34423000, 0x3c030800, 0x34633000,
-+0x3c040800, 0x348437ff, 0x3c010800, 0xac220a64,
-+0x24020040, 0x3c010800, 0xac220a68, 0x3c010800,
-+0xac200a60, 0xac600000, 0x24630004, 0x0083102b,
-+0x5040fffd, 0xac600000, 0x03e00008, 0x00000000,
-+0x00804821, 0x8faa0010, 0x3c020800, 0x8c420a60,
-+0x3c040800, 0x8c840a68, 0x8fab0014, 0x24430001,
-+0x0044102b, 0x3c010800, 0xac230a60, 0x14400003,
-+0x00004021, 0x3c010800, 0xac200a60, 0x3c020800,
-+0x8c420a60, 0x3c030800, 0x8c630a64, 0x91240000,
-+0x00021140, 0x00431021, 0x00481021, 0x25080001,
-+0xa0440000, 0x29020008, 0x1440fff4, 0x25290001,
-+0x3c020800, 0x8c420a60, 0x3c030800, 0x8c630a64,
-+0x8f84680c, 0x00021140, 0x00431021, 0xac440008,
-+0xac45000c, 0xac460010, 0xac470014, 0xac4a0018,
-+0x03e00008, 0xac4b001c, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x02000008, 0x00000000, 0x0a0001e3, 0x3c0a0001,
-+0x0a0001e3, 0x3c0a0002, 0x0a0001e3, 0x00000000,
-+0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000,
-+0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000,
-+0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000,
-+0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000,
-+0x0a0001e3, 0x3c0a0007, 0x0a0001e3, 0x3c0a0008,
-+0x0a0001e3, 0x3c0a0009, 0x0a0001e3, 0x00000000,
-+0x0a0001e3, 0x00000000, 0x0a0001e3, 0x3c0a000b,
-+0x0a0001e3, 0x3c0a000c, 0x0a0001e3, 0x3c0a000d,
-+0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000,
-+0x0a0001e3, 0x3c0a000e, 0x0a0001e3, 0x00000000,
-+0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000,
-+0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000,
-+0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000,
-+0x0a0001e3, 0x00000000, 0x0a0001e3, 0x3c0a0013,
-+0x0a0001e3, 0x3c0a0014, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x27bdffe0, 0x00001821, 0x00001021, 0xafbf0018,
-+0xafb10014, 0xafb00010, 0x3c010800, 0x00220821,
-+0xac200a70, 0x3c010800, 0x00220821, 0xac200a74,
-+0x3c010800, 0x00220821, 0xac200a78, 0x24630001,
-+0x1860fff5, 0x2442000c, 0x24110001, 0x8f906810,
-+0x32020004, 0x14400005, 0x24040001, 0x3c020800,
-+0x8c420a78, 0x18400003, 0x00002021, 0x0e000182,
-+0x00000000, 0x32020001, 0x10400003, 0x00000000,
-+0x0e000169, 0x00000000, 0x0a000153, 0xaf915028,
-+0x8fbf0018, 0x8fb10014, 0x8fb00010, 0x03e00008,
-+0x27bd0020, 0x3c050800, 0x8ca50a70, 0x3c060800,
-+0x8cc60a80, 0x3c070800, 0x8ce70a78, 0x27bdffe0,
-+0x3c040800, 0x248409d0, 0xafbf0018, 0xafa00010,
-+0x0e000060, 0xafa00014, 0x0e00017b, 0x00002021,
-+0x8fbf0018, 0x03e00008, 0x27bd0020, 0x24020001,
-+0x8f836810, 0x00821004, 0x00021027, 0x00621824,
-+0x03e00008, 0xaf836810, 0x27bdffd8, 0xafbf0024,
-+0x1080002e, 0xafb00020, 0x8f825cec, 0xafa20018,
-+0x8f825cec, 0x3c100800, 0x26100a78, 0xafa2001c,
-+0x34028000, 0xaf825cec, 0x8e020000, 0x18400016,
-+0x00000000, 0x3c020800, 0x94420a74, 0x8fa3001c,
-+0x000221c0, 0xac830004, 0x8fa2001c, 0x3c010800,
-+0x0e000201, 0xac220a74, 0x10400005, 0x00000000,
-+0x8e020000, 0x24420001, 0x0a0001df, 0xae020000,
-+0x3c020800, 0x8c420a70, 0x00021c02, 0x000321c0,
-+0x0a0001c5, 0xafa2001c, 0x0e000201, 0x00000000,
-+0x1040001f, 0x00000000, 0x8e020000, 0x8fa3001c,
-+0x24420001, 0x3c010800, 0xac230a70, 0x3c010800,
-+0xac230a74, 0x0a0001df, 0xae020000, 0x3c100800,
-+0x26100a78, 0x8e020000, 0x18400028, 0x00000000,
-+0x0e000201, 0x00000000, 0x14400024, 0x00000000,
-+0x8e020000, 0x3c030800, 0x8c630a70, 0x2442ffff,
-+0xafa3001c, 0x18400006, 0xae020000, 0x00031402,
-+0x000221c0, 0x8c820004, 0x3c010800, 0xac220a70,
-+0x97a2001e, 0x2442ff00, 0x2c420300, 0x1440000b,
-+0x24024000, 0x3c040800, 0x248409dc, 0xafa00010,
-+0xafa00014, 0x8fa6001c, 0x24050008, 0x0e000060,
-+0x00003821, 0x0a0001df, 0x00000000, 0xaf825cf8,
-+0x3c020800, 0x8c420a40, 0x8fa3001c, 0x24420001,
-+0xaf835cf8, 0x3c010800, 0xac220a40, 0x8fbf0024,
-+0x8fb00020, 0x03e00008, 0x27bd0028, 0x27bdffe0,
-+0x3c040800, 0x248409e8, 0x00002821, 0x00003021,
-+0x00003821, 0xafbf0018, 0xafa00010, 0x0e000060,
-+0xafa00014, 0x8fbf0018, 0x03e00008, 0x27bd0020,
-+0x8f82680c, 0x8f85680c, 0x00021827, 0x0003182b,
-+0x00031823, 0x00431024, 0x00441021, 0x00a2282b,
-+0x10a00006, 0x00000000, 0x00401821, 0x8f82680c,
-+0x0043102b, 0x1440fffd, 0x00000000, 0x03e00008,
-+0x00000000, 0x3c040800, 0x8c840000, 0x3c030800,
-+0x8c630a40, 0x0064102b, 0x54400002, 0x00831023,
-+0x00641023, 0x2c420008, 0x03e00008, 0x38420001,
-+0x27bdffe0, 0x00802821, 0x3c040800, 0x24840a00,
-+0x00003021, 0x00003821, 0xafbf0018, 0xafa00010,
-+0x0e000060, 0xafa00014, 0x0a000216, 0x00000000,
-+0x8fbf0018, 0x03e00008, 0x27bd0020, 0x00000000,
-+0x27bdffe0, 0x3c1cc000, 0xafbf0018, 0x0e00004c,
-+0xaf80680c, 0x3c040800, 0x24840a10, 0x03802821,
-+0x00003021, 0x00003821, 0xafa00010, 0x0e000060,
-+0xafa00014, 0x2402ffff, 0xaf825404, 0x3c0200aa,
-+0x0e000234, 0xaf825434, 0x8fbf0018, 0x03e00008,
-+0x27bd0020, 0x00000000, 0x00000000, 0x00000000,
-+0x27bdffe8, 0xafb00010, 0x24100001, 0xafbf0014,
-+0x3c01c003, 0xac200000, 0x8f826810, 0x30422000,
-+0x10400003, 0x00000000, 0x0e000246, 0x00000000,
-+0x0a00023a, 0xaf905428, 0x8fbf0014, 0x8fb00010,
-+0x03e00008, 0x27bd0018, 0x27bdfff8, 0x8f845d0c,
-+0x3c0200ff, 0x3c030800, 0x8c630a50, 0x3442fff8,
-+0x00821024, 0x1043001e, 0x3c0500ff, 0x34a5fff8,
-+0x3c06c003, 0x3c074000, 0x00851824, 0x8c620010,
-+0x3c010800, 0xac230a50, 0x30420008, 0x10400005,
-+0x00871025, 0x8cc20000, 0x24420001, 0xacc20000,
-+0x00871025, 0xaf825d0c, 0x8fa20000, 0x24420001,
-+0xafa20000, 0x8fa20000, 0x8fa20000, 0x24420001,
-+0xafa20000, 0x8fa20000, 0x8f845d0c, 0x3c030800,
-+0x8c630a50, 0x00851024, 0x1443ffe8, 0x00851824,
-+0x27bd0008, 0x03e00008, 0x00000000, 0x00000000,
-+0x35373031, 0x726c7341, 0x00000000, 0x00000000,
-+0x53774576, 0x656e7430, 0x00000000, 0x726c7045,
-+0x76656e74, 0x31000000, 0x556e6b6e, 0x45766e74,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x66617461, 0x6c457272, 0x00000000, 0x00000000,
-+0x4d61696e, 0x43707542, 0x00000000, 0x00000000,
-+};
-+
-+static const struct tg3_firmware tg3_5701_fw = {
-+ .size = TG3_5701_RLS_FW_LEN,
-+ .data = (u8 *)&tg3FwText[0],
-+};
-+
-+#define TG3_57766_FW_BASE_ADDR 0x00030000
-+#define TG3_57766_FW_HANDSHAKE 0x0003fccc
-+#define TG3_57766_FW_TEXT_ADDR 0x00030000
-+#define TG3_57766_FW_TEXT_LEN (0x58 + TG3_FW_HDR_LEN)
-+#define TG3_57766_FW_PRIV1_ADDR 0x0003fd00
-+#define TG3_57766_FW_PRIV1_SIZE (0x4 + TG3_FW_HDR_LEN)
-+#define TG3_57766_FW_PRIV2_ADDR 0x0003fccc
-+#define TG3_57766_FW_PRIV2_SIZE (0x4 + TG3_FW_HDR_LEN)
-+#define TG3_57766_FW_RESERVED 0xdecafbad
-+
-+static const u32 tg3_57766_fwdata[] = {
-+0x00000000, TG3_57766_FW_BASE_ADDR, 0xffffffff,
-+TG3_57766_FW_RESERVED, TG3_57766_FW_TEXT_ADDR, TG3_57766_FW_TEXT_LEN,
-+0x27800001, 0xf7f0403e, 0xcd283674, 0x11001100,
-+0xf7ff1064, 0x376e0001, 0x27600000, 0xf7f07fea,
-+0xf7f00004, 0xf7f00018, 0xcc10362c, 0x00180018,
-+0x17800000, 0xf7f00008, 0xc33836b0, 0xf7f00004,
-+0xc43836b0, 0xc62036bc, 0x00000009, 0xcb3836b0,
-+0x17800001, 0x1760000a,
-+TG3_57766_FW_RESERVED, TG3_57766_FW_PRIV1_ADDR, TG3_57766_FW_PRIV1_SIZE,
-+0xd044d816,
-+TG3_57766_FW_RESERVED, TG3_57766_FW_PRIV2_ADDR, TG3_57766_FW_PRIV2_SIZE,
-+0x02300202,
-+};
-+
-+static const struct tg3_firmware tg3_57766_fw = {
-+ .size = sizeof(tg3_57766_fwdata),
-+ .data = (u8 *)&tg3_57766_fwdata[0],
-+};
-+
-+#if TG3_TSO_SUPPORT != 0
-+
-+#define TG3_TSO_FW_RELEASE_MAJOR 0x1
-+#define TG3_TSO_FW_RELASE_MINOR 0x6
-+#define TG3_TSO_FW_RELEASE_FIX 0x0
-+#define TG3_TSO_FW_START_ADDR 0x08000000
-+#define TG3_TSO_FW_TEXT_ADDR 0x08000000
-+#define TG3_TSO_FW_TEXT_LEN 0x1aa0
-+#define TG3_TSO_FW_RODATA_ADDR 0x08001aa0
-+#define TG3_TSO_FW_RODATA_LEN 0x60
-+#define TG3_TSO_FW_DATA_ADDR 0x08001b20
-+#define TG3_TSO_FW_DATA_LEN 0x30
-+#define TG3_TSO_FW_SBSS_ADDR 0x08001b50
-+#define TG3_TSO_FW_SBSS_LEN 0x2c
-+#define TG3_TSO_FW_BSS_ADDR 0x08001b80
-+#define TG3_TSO_FW_BSS_LEN 0x894
-+
-+#define TG3_LGCY_TSO_FW_LEN \
-+ (TG3_TSO_FW_TEXT_LEN + \
-+ TG3_TSO_FW_RODATA_LEN + \
-+ 0x20 + \
-+ TG3_TSO_FW_DATA_LEN)
-+
-+static const u32 tg3TsoFwText[] = {
-+0x00010600, (u32)TG3_TSO_FW_TEXT_ADDR, (u32)TG3_LGCY_TSO_FW_LEN,
-+0x0e000003, 0x00000000, 0x08001b24, 0x00000000,
-+0x10000003, 0x00000000, 0x0000000d, 0x0000000d,
-+0x3c1d0800, 0x37bd4000, 0x03a0f021, 0x3c100800,
-+0x26100000, 0x0e000010, 0x00000000, 0x0000000d,
-+0x27bdffe0, 0x3c04fefe, 0xafbf0018, 0x0e0005d8,
-+0x34840002, 0x0e000668, 0x00000000, 0x3c030800,
-+0x90631b68, 0x24020002, 0x3c040800, 0x24841aac,
-+0x14620003, 0x24050001, 0x3c040800, 0x24841aa0,
-+0x24060006, 0x00003821, 0xafa00010, 0x0e00067c,
-+0xafa00014, 0x8f625c50, 0x34420001, 0xaf625c50,
-+0x8f625c90, 0x34420001, 0xaf625c90, 0x2402ffff,
-+0x0e000034, 0xaf625404, 0x8fbf0018, 0x03e00008,
-+0x27bd0020, 0x00000000, 0x00000000, 0x00000000,
-+0x27bdffe0, 0xafbf001c, 0xafb20018, 0xafb10014,
-+0x0e00005b, 0xafb00010, 0x24120002, 0x24110001,
-+0x8f706820, 0x32020100, 0x10400003, 0x00000000,
-+0x0e0000bb, 0x00000000, 0x8f706820, 0x32022000,
-+0x10400004, 0x32020001, 0x0e0001f0, 0x24040001,
-+0x32020001, 0x10400003, 0x00000000, 0x0e0000a3,
-+0x00000000, 0x3c020800, 0x90421b98, 0x14520003,
-+0x00000000, 0x0e0004c0, 0x00000000, 0x0a00003c,
-+0xaf715028, 0x8fbf001c, 0x8fb20018, 0x8fb10014,
-+0x8fb00010, 0x03e00008, 0x27bd0020, 0x27bdffe0,
-+0x3c040800, 0x24841ac0, 0x00002821, 0x00003021,
-+0x00003821, 0xafbf0018, 0xafa00010, 0x0e00067c,
-+0xafa00014, 0x3c040800, 0x248423d8, 0xa4800000,
-+0x3c010800, 0xa0201b98, 0x3c010800, 0xac201b9c,
-+0x3c010800, 0xac201ba0, 0x3c010800, 0xac201ba4,
-+0x3c010800, 0xac201bac, 0x3c010800, 0xac201bb8,
-+0x3c010800, 0xac201bbc, 0x8f624434, 0x3c010800,
-+0xac221b88, 0x8f624438, 0x3c010800, 0xac221b8c,
-+0x8f624410, 0xac80f7a8, 0x3c010800, 0xac201b84,
-+0x3c010800, 0xac2023e0, 0x3c010800, 0xac2023c8,
-+0x3c010800, 0xac2023cc, 0x3c010800, 0xac202400,
-+0x3c010800, 0xac221b90, 0x8f620068, 0x24030007,
-+0x00021702, 0x10430005, 0x00000000, 0x8f620068,
-+0x00021702, 0x14400004, 0x24020001, 0x3c010800,
-+0x0a000097, 0xac20240c, 0xac820034, 0x3c040800,
-+0x24841acc, 0x3c050800, 0x8ca5240c, 0x00003021,
-+0x00003821, 0xafa00010, 0x0e00067c, 0xafa00014,
-+0x8fbf0018, 0x03e00008, 0x27bd0020, 0x27bdffe0,
-+0x3c040800, 0x24841ad8, 0x00002821, 0x00003021,
-+0x00003821, 0xafbf0018, 0xafa00010, 0x0e00067c,
-+0xafa00014, 0x0e00005b, 0x00000000, 0x0e0000b4,
-+0x00002021, 0x8fbf0018, 0x03e00008, 0x27bd0020,
-+0x24020001, 0x8f636820, 0x00821004, 0x00021027,
-+0x00621824, 0x03e00008, 0xaf636820, 0x27bdffd0,
-+0xafbf002c, 0xafb60028, 0xafb50024, 0xafb40020,
-+0xafb3001c, 0xafb20018, 0xafb10014, 0xafb00010,
-+0x8f675c5c, 0x3c030800, 0x24631bbc, 0x8c620000,
-+0x14470005, 0x3c0200ff, 0x3c020800, 0x90421b98,
-+0x14400119, 0x3c0200ff, 0x3442fff8, 0x00e28824,
-+0xac670000, 0x00111902, 0x306300ff, 0x30e20003,
-+0x000211c0, 0x00622825, 0x00a04021, 0x00071602,
-+0x3c030800, 0x90631b98, 0x3044000f, 0x14600036,
-+0x00804821, 0x24020001, 0x3c010800, 0xa0221b98,
-+0x00051100, 0x00821025, 0x3c010800, 0xac201b9c,
-+0x3c010800, 0xac201ba0, 0x3c010800, 0xac201ba4,
-+0x3c010800, 0xac201bac, 0x3c010800, 0xac201bb8,
-+0x3c010800, 0xac201bb0, 0x3c010800, 0xac201bb4,
-+0x3c010800, 0xa42223d8, 0x9622000c, 0x30437fff,
-+0x3c010800, 0xa4222410, 0x30428000, 0x3c010800,
-+0xa4231bc6, 0x10400005, 0x24020001, 0x3c010800,
-+0xac2223f4, 0x0a000102, 0x2406003e, 0x24060036,
-+0x3c010800, 0xac2023f4, 0x9622000a, 0x3c030800,
-+0x94631bc6, 0x3c010800, 0xac2023f0, 0x3c010800,
-+0xac2023f8, 0x00021302, 0x00021080, 0x00c21021,
-+0x00621821, 0x3c010800, 0xa42223d0, 0x3c010800,
-+0x0a000115, 0xa4231b96, 0x9622000c, 0x3c010800,
-+0xa42223ec, 0x3c040800, 0x24841b9c, 0x8c820000,
-+0x00021100, 0x3c010800, 0x00220821, 0xac311bc8,
-+0x8c820000, 0x00021100, 0x3c010800, 0x00220821,
-+0xac271bcc, 0x8c820000, 0x25030001, 0x306601ff,
-+0x00021100, 0x3c010800, 0x00220821, 0xac261bd0,
-+0x8c820000, 0x00021100, 0x3c010800, 0x00220821,
-+0xac291bd4, 0x96230008, 0x3c020800, 0x8c421bac,
-+0x00432821, 0x3c010800, 0xac251bac, 0x9622000a,
-+0x30420004, 0x14400018, 0x00061100, 0x8f630c14,
-+0x3063000f, 0x2c620002, 0x1440000b, 0x3c02c000,
-+0x8f630c14, 0x3c020800, 0x8c421b40, 0x3063000f,
-+0x24420001, 0x3c010800, 0xac221b40, 0x2c620002,
-+0x1040fff7, 0x3c02c000, 0x00e21825, 0xaf635c5c,
-+0x8f625c50, 0x30420002, 0x10400014, 0x00000000,
-+0x0a000147, 0x00000000, 0x3c030800, 0x8c631b80,
-+0x3c040800, 0x94841b94, 0x01221025, 0x3c010800,
-+0xa42223da, 0x24020001, 0x3c010800, 0xac221bb8,
-+0x24630001, 0x0085202a, 0x3c010800, 0x10800003,
-+0xac231b80, 0x3c010800, 0xa4251b94, 0x3c060800,
-+0x24c61b9c, 0x8cc20000, 0x24420001, 0xacc20000,
-+0x28420080, 0x14400005, 0x00000000, 0x0e000656,
-+0x24040002, 0x0a0001e6, 0x00000000, 0x3c020800,
-+0x8c421bb8, 0x10400078, 0x24020001, 0x3c050800,
-+0x90a51b98, 0x14a20072, 0x00000000, 0x3c150800,
-+0x96b51b96, 0x3c040800, 0x8c841bac, 0x32a3ffff,
-+0x0083102a, 0x1440006c, 0x00000000, 0x14830003,
-+0x00000000, 0x3c010800, 0xac2523f0, 0x1060005c,
-+0x00009021, 0x24d60004, 0x0060a021, 0x24d30014,
-+0x8ec20000, 0x00028100, 0x3c110800, 0x02308821,
-+0x0e000625, 0x8e311bc8, 0x00402821, 0x10a00054,
-+0x00000000, 0x9628000a, 0x31020040, 0x10400005,
-+0x2407180c, 0x8e22000c, 0x2407188c, 0x00021400,
-+0xaca20018, 0x3c030800, 0x00701821, 0x8c631bd0,
-+0x3c020800, 0x00501021, 0x8c421bd4, 0x00031d00,
-+0x00021400, 0x00621825, 0xaca30014, 0x8ec30004,
-+0x96220008, 0x00432023, 0x3242ffff, 0x3083ffff,
-+0x00431021, 0x0282102a, 0x14400002, 0x02b23023,
-+0x00803021, 0x8e620000, 0x30c4ffff, 0x00441021,
-+0xae620000, 0x8e220000, 0xaca20000, 0x8e220004,
-+0x8e63fff4, 0x00431021, 0xaca20004, 0xa4a6000e,
-+0x8e62fff4, 0x00441021, 0xae62fff4, 0x96230008,
-+0x0043102a, 0x14400005, 0x02469021, 0x8e62fff0,
-+0xae60fff4, 0x24420001, 0xae62fff0, 0xaca00008,
-+0x3242ffff, 0x14540008, 0x24020305, 0x31020080,
-+0x54400001, 0x34e70010, 0x24020905, 0xa4a2000c,
-+0x0a0001cb, 0x34e70020, 0xa4a2000c, 0x3c020800,
-+0x8c4223f0, 0x10400003, 0x3c024b65, 0x0a0001d3,
-+0x34427654, 0x3c02b49a, 0x344289ab, 0xaca2001c,
-+0x30e2ffff, 0xaca20010, 0x0e0005a2, 0x00a02021,
-+0x3242ffff, 0x0054102b, 0x1440ffa9, 0x00000000,
-+0x24020002, 0x3c010800, 0x0a0001e6, 0xa0221b98,
-+0x8ec2083c, 0x24420001, 0x0a0001e6, 0xaec2083c,
-+0x0e0004c0, 0x00000000, 0x8fbf002c, 0x8fb60028,
-+0x8fb50024, 0x8fb40020, 0x8fb3001c, 0x8fb20018,
-+0x8fb10014, 0x8fb00010, 0x03e00008, 0x27bd0030,
-+0x27bdffd0, 0xafbf0028, 0xafb30024, 0xafb20020,
-+0xafb1001c, 0xafb00018, 0x8f725c9c, 0x3c0200ff,
-+0x3442fff8, 0x3c070800, 0x24e71bb4, 0x02428824,
-+0x9623000e, 0x8ce20000, 0x00431021, 0xace20000,
-+0x8e220010, 0x30420020, 0x14400011, 0x00809821,
-+0x0e00063b, 0x02202021, 0x3c02c000, 0x02421825,
-+0xaf635c9c, 0x8f625c90, 0x30420002, 0x1040011e,
-+0x00000000, 0xaf635c9c, 0x8f625c90, 0x30420002,
-+0x10400119, 0x00000000, 0x0a00020d, 0x00000000,
-+0x8e240008, 0x8e230014, 0x00041402, 0x000231c0,
-+0x00031502, 0x304201ff, 0x2442ffff, 0x3042007f,
-+0x00031942, 0x30637800, 0x00021100, 0x24424000,
-+0x00624821, 0x9522000a, 0x3084ffff, 0x30420008,
-+0x104000b0, 0x000429c0, 0x3c020800, 0x8c422400,
-+0x14400024, 0x24c50008, 0x94c20014, 0x3c010800,
-+0xa42223d0, 0x8cc40010, 0x00041402, 0x3c010800,
-+0xa42223d2, 0x3c010800, 0xa42423d4, 0x94c2000e,
-+0x3083ffff, 0x00431023, 0x3c010800, 0xac222408,
-+0x94c2001a, 0x3c010800, 0xac262400, 0x3c010800,
-+0xac322404, 0x3c010800, 0xac2223fc, 0x3c02c000,
-+0x02421825, 0xaf635c9c, 0x8f625c90, 0x30420002,
-+0x104000e5, 0x00000000, 0xaf635c9c, 0x8f625c90,
-+0x30420002, 0x104000e0, 0x00000000, 0x0a000246,
-+0x00000000, 0x94c2000e, 0x3c030800, 0x946323d4,
-+0x00434023, 0x3103ffff, 0x2c620008, 0x1040001c,
-+0x00000000, 0x94c20014, 0x24420028, 0x00a22821,
-+0x00031042, 0x1840000b, 0x00002021, 0x24e60848,
-+0x00403821, 0x94a30000, 0x8cc20000, 0x24840001,
-+0x00431021, 0xacc20000, 0x0087102a, 0x1440fff9,
-+0x24a50002, 0x31020001, 0x1040001f, 0x3c024000,
-+0x3c040800, 0x248423fc, 0xa0a00001, 0x94a30000,
-+0x8c820000, 0x00431021, 0x0a000285, 0xac820000,
-+0x8f626800, 0x3c030010, 0x00431024, 0x10400009,
-+0x00000000, 0x94c2001a, 0x3c030800, 0x8c6323fc,
-+0x00431021, 0x3c010800, 0xac2223fc, 0x0a000286,
-+0x3c024000, 0x94c2001a, 0x94c4001c, 0x3c030800,
-+0x8c6323fc, 0x00441023, 0x00621821, 0x3c010800,
-+0xac2323fc, 0x3c024000, 0x02421825, 0xaf635c9c,
-+0x8f625c90, 0x30420002, 0x1440fffc, 0x00000000,
-+0x9522000a, 0x30420010, 0x1040009b, 0x00000000,
-+0x3c030800, 0x946323d4, 0x3c070800, 0x24e72400,
-+0x8ce40000, 0x8f626800, 0x24630030, 0x00832821,
-+0x3c030010, 0x00431024, 0x1440000a, 0x00000000,
-+0x94a20004, 0x3c040800, 0x8c842408, 0x3c030800,
-+0x8c6323fc, 0x00441023, 0x00621821, 0x3c010800,
-+0xac2323fc, 0x3c040800, 0x8c8423fc, 0x00041c02,
-+0x3082ffff, 0x00622021, 0x00041402, 0x00822021,
-+0x00041027, 0xa4a20006, 0x3c030800, 0x8c632404,
-+0x3c0200ff, 0x3442fff8, 0x00628824, 0x96220008,
-+0x24050001, 0x24034000, 0x000231c0, 0x00801021,
-+0xa4c2001a, 0xa4c0001c, 0xace00000, 0x3c010800,
-+0xac251b60, 0xaf635cb8, 0x8f625cb0, 0x30420002,
-+0x10400003, 0x00000000, 0x3c010800, 0xac201b60,
-+0x8e220008, 0xaf625cb8, 0x8f625cb0, 0x30420002,
-+0x10400003, 0x00000000, 0x3c010800, 0xac201b60,
-+0x3c020800, 0x8c421b60, 0x1040ffec, 0x00000000,
-+0x3c040800, 0x0e00063b, 0x8c842404, 0x0a00032a,
-+0x00000000, 0x3c030800, 0x90631b98, 0x24020002,
-+0x14620003, 0x3c034b65, 0x0a0002e1, 0x00008021,
-+0x8e22001c, 0x34637654, 0x10430002, 0x24100002,
-+0x24100001, 0x00c02021, 0x0e000350, 0x02003021,
-+0x24020003, 0x3c010800, 0xa0221b98, 0x24020002,
-+0x1202000a, 0x24020001, 0x3c030800, 0x8c6323f0,
-+0x10620006, 0x00000000, 0x3c020800, 0x944223d8,
-+0x00021400, 0x0a00031f, 0xae220014, 0x3c040800,
-+0x248423da, 0x94820000, 0x00021400, 0xae220014,
-+0x3c020800, 0x8c421bbc, 0x3c03c000, 0x3c010800,
-+0xa0201b98, 0x00431025, 0xaf625c5c, 0x8f625c50,
-+0x30420002, 0x10400009, 0x00000000, 0x2484f7e2,
-+0x8c820000, 0x00431025, 0xaf625c5c, 0x8f625c50,
-+0x30420002, 0x1440fffa, 0x00000000, 0x3c020800,
-+0x24421b84, 0x8c430000, 0x24630001, 0xac430000,
-+0x8f630c14, 0x3063000f, 0x2c620002, 0x1440000c,
-+0x3c024000, 0x8f630c14, 0x3c020800, 0x8c421b40,
-+0x3063000f, 0x24420001, 0x3c010800, 0xac221b40,
-+0x2c620002, 0x1040fff7, 0x00000000, 0x3c024000,
-+0x02421825, 0xaf635c9c, 0x8f625c90, 0x30420002,
-+0x1440fffc, 0x00000000, 0x12600003, 0x00000000,
-+0x0e0004c0, 0x00000000, 0x8fbf0028, 0x8fb30024,
-+0x8fb20020, 0x8fb1001c, 0x8fb00018, 0x03e00008,
-+0x27bd0030, 0x8f634450, 0x3c040800, 0x24841b88,
-+0x8c820000, 0x00031c02, 0x0043102b, 0x14400007,
-+0x3c038000, 0x8c840004, 0x8f624450, 0x00021c02,
-+0x0083102b, 0x1040fffc, 0x3c038000, 0xaf634444,
-+0x8f624444, 0x00431024, 0x1440fffd, 0x00000000,
-+0x8f624448, 0x03e00008, 0x3042ffff, 0x3c024000,
-+0x00822025, 0xaf645c38, 0x8f625c30, 0x30420002,
-+0x1440fffc, 0x00000000, 0x03e00008, 0x00000000,
-+0x27bdffe0, 0x00805821, 0x14c00011, 0x256e0008,
-+0x3c020800, 0x8c4223f4, 0x10400007, 0x24020016,
-+0x3c010800, 0xa42223d2, 0x2402002a, 0x3c010800,
-+0x0a000364, 0xa42223d4, 0x8d670010, 0x00071402,
-+0x3c010800, 0xa42223d2, 0x3c010800, 0xa42723d4,
-+0x3c040800, 0x948423d4, 0x3c030800, 0x946323d2,
-+0x95cf0006, 0x3c020800, 0x944223d0, 0x00832023,
-+0x01e2c023, 0x3065ffff, 0x24a20028, 0x01c24821,
-+0x3082ffff, 0x14c0001a, 0x01226021, 0x9582000c,
-+0x3042003f, 0x3c010800, 0xa42223d6, 0x95820004,
-+0x95830006, 0x3c010800, 0xac2023e4, 0x3c010800,
-+0xac2023e8, 0x00021400, 0x00431025, 0x3c010800,
-+0xac221bc0, 0x95220004, 0x3c010800, 0xa4221bc4,
-+0x95230002, 0x01e51023, 0x0043102a, 0x10400010,
-+0x24020001, 0x3c010800, 0x0a000398, 0xac2223f8,
-+0x3c030800, 0x8c6323e8, 0x3c020800, 0x94421bc4,
-+0x00431021, 0xa5220004, 0x3c020800, 0x94421bc0,
-+0xa5820004, 0x3c020800, 0x8c421bc0, 0xa5820006,
-+0x3c020800, 0x8c4223f0, 0x3c0d0800, 0x8dad23e4,
-+0x3c0a0800, 0x144000e5, 0x8d4a23e8, 0x3c020800,
-+0x94421bc4, 0x004a1821, 0x3063ffff, 0x0062182b,
-+0x24020002, 0x10c2000d, 0x01435023, 0x3c020800,
-+0x944223d6, 0x30420009, 0x10400008, 0x00000000,
-+0x9582000c, 0x3042fff6, 0xa582000c, 0x3c020800,
-+0x944223d6, 0x30420009, 0x01a26823, 0x3c020800,
-+0x8c4223f8, 0x1040004a, 0x01203821, 0x3c020800,
-+0x944223d2, 0x00004021, 0xa520000a, 0x01e21023,
-+0xa5220002, 0x3082ffff, 0x00021042, 0x18400008,
-+0x00003021, 0x00401821, 0x94e20000, 0x25080001,
-+0x00c23021, 0x0103102a, 0x1440fffb, 0x24e70002,
-+0x00061c02, 0x30c2ffff, 0x00623021, 0x00061402,
-+0x00c23021, 0x00c02821, 0x00061027, 0xa522000a,
-+0x00003021, 0x2527000c, 0x00004021, 0x94e20000,
-+0x25080001, 0x00c23021, 0x2d020004, 0x1440fffb,
-+0x24e70002, 0x95220002, 0x00004021, 0x91230009,
-+0x00442023, 0x01803821, 0x3082ffff, 0xa4e00010,
-+0x00621821, 0x00021042, 0x18400010, 0x00c33021,
-+0x00404821, 0x94e20000, 0x24e70002, 0x00c23021,
-+0x30e2007f, 0x14400006, 0x25080001, 0x8d630000,
-+0x3c02007f, 0x3442ff80, 0x00625824, 0x25670008,
-+0x0109102a, 0x1440fff3, 0x00000000, 0x30820001,
-+0x10400005, 0x00061c02, 0xa0e00001, 0x94e20000,
-+0x00c23021, 0x00061c02, 0x30c2ffff, 0x00623021,
-+0x00061402, 0x00c23021, 0x0a00047d, 0x30c6ffff,
-+0x24020002, 0x14c20081, 0x00000000, 0x3c020800,
-+0x8c42240c, 0x14400007, 0x00000000, 0x3c020800,
-+0x944223d2, 0x95230002, 0x01e21023, 0x10620077,
-+0x00000000, 0x3c020800, 0x944223d2, 0x01e21023,
-+0xa5220002, 0x3c020800, 0x8c42240c, 0x1040001a,
-+0x31e3ffff, 0x8dc70010, 0x3c020800, 0x94421b96,
-+0x00e04021, 0x00072c02, 0x00aa2021, 0x00431023,
-+0x00823823, 0x00072402, 0x30e2ffff, 0x00823821,
-+0x00071027, 0xa522000a, 0x3102ffff, 0x3c040800,
-+0x948423d4, 0x00453023, 0x00e02821, 0x00641823,
-+0x006d1821, 0x00c33021, 0x00061c02, 0x30c2ffff,
-+0x0a00047d, 0x00623021, 0x01203821, 0x00004021,
-+0x3082ffff, 0x00021042, 0x18400008, 0x00003021,
-+0x00401821, 0x94e20000, 0x25080001, 0x00c23021,
-+0x0103102a, 0x1440fffb, 0x24e70002, 0x00061c02,
-+0x30c2ffff, 0x00623021, 0x00061402, 0x00c23021,
-+0x00c02821, 0x00061027, 0xa522000a, 0x00003021,
-+0x2527000c, 0x00004021, 0x94e20000, 0x25080001,
-+0x00c23021, 0x2d020004, 0x1440fffb, 0x24e70002,
-+0x95220002, 0x00004021, 0x91230009, 0x00442023,
-+0x01803821, 0x3082ffff, 0xa4e00010, 0x3c040800,
-+0x948423d4, 0x00621821, 0x00c33021, 0x00061c02,
-+0x30c2ffff, 0x00623021, 0x00061c02, 0x3c020800,
-+0x944223d0, 0x00c34821, 0x00441023, 0x00021fc2,
-+0x00431021, 0x00021043, 0x18400010, 0x00003021,
-+0x00402021, 0x94e20000, 0x24e70002, 0x00c23021,
-+0x30e2007f, 0x14400006, 0x25080001, 0x8d630000,
-+0x3c02007f, 0x3442ff80, 0x00625824, 0x25670008,
-+0x0104102a, 0x1440fff3, 0x00000000, 0x3c020800,
-+0x944223ec, 0x00c23021, 0x3122ffff, 0x00c23021,
-+0x00061c02, 0x30c2ffff, 0x00623021, 0x00061402,
-+0x00c23021, 0x00c04021, 0x00061027, 0xa5820010,
-+0xadc00014, 0x0a00049d, 0xadc00000, 0x8dc70010,
-+0x00e04021, 0x11400007, 0x00072c02, 0x00aa3021,
-+0x00061402, 0x30c3ffff, 0x00433021, 0x00061402,
-+0x00c22821, 0x00051027, 0xa522000a, 0x3c030800,
-+0x946323d4, 0x3102ffff, 0x01e21021, 0x00433023,
-+0x00cd3021, 0x00061c02, 0x30c2ffff, 0x00623021,
-+0x00061402, 0x00c23021, 0x00c04021, 0x00061027,
-+0xa5820010, 0x3102ffff, 0x00051c00, 0x00431025,
-+0xadc20010, 0x3c020800, 0x8c4223f4, 0x10400005,
-+0x2de205eb, 0x14400002, 0x25e2fff2, 0x34028870,
-+0xa5c20034, 0x3c030800, 0x246323e8, 0x8c620000,
-+0x24420001, 0xac620000, 0x3c040800, 0x8c8423e4,
-+0x3c020800, 0x8c421bc0, 0x3303ffff, 0x00832021,
-+0x00431821, 0x0062102b, 0x3c010800, 0xac2423e4,
-+0x10400003, 0x2482ffff, 0x3c010800, 0xac2223e4,
-+0x3c010800, 0xac231bc0, 0x03e00008, 0x27bd0020,
-+0x27bdffb8, 0x3c050800, 0x24a51b96, 0xafbf0044,
-+0xafbe0040, 0xafb7003c, 0xafb60038, 0xafb50034,
-+0xafb40030, 0xafb3002c, 0xafb20028, 0xafb10024,
-+0xafb00020, 0x94a90000, 0x3c020800, 0x944223d0,
-+0x3c030800, 0x8c631bb0, 0x3c040800, 0x8c841bac,
-+0x01221023, 0x0064182a, 0xa7a9001e, 0x106000be,
-+0xa7a20016, 0x24be0022, 0x97b6001e, 0x24b3001a,
-+0x24b70016, 0x8fc20000, 0x14400008, 0x00000000,
-+0x8fc2fff8, 0x97a30016, 0x8fc4fff4, 0x00431021,
-+0x0082202a, 0x148000b0, 0x00000000, 0x97d50818,
-+0x32a2ffff, 0x104000a3, 0x00009021, 0x0040a021,
-+0x00008821, 0x0e000625, 0x00000000, 0x00403021,
-+0x14c00007, 0x00000000, 0x3c020800, 0x8c4223dc,
-+0x24420001, 0x3c010800, 0x0a000596, 0xac2223dc,
-+0x3c100800, 0x02118021, 0x8e101bc8, 0x9608000a,
-+0x31020040, 0x10400005, 0x2407180c, 0x8e02000c,
-+0x2407188c, 0x00021400, 0xacc20018, 0x31020080,
-+0x54400001, 0x34e70010, 0x3c020800, 0x00511021,
-+0x8c421bd0, 0x3c030800, 0x00711821, 0x8c631bd4,
-+0x00021500, 0x00031c00, 0x00431025, 0xacc20014,
-+0x96040008, 0x3242ffff, 0x00821021, 0x0282102a,
-+0x14400002, 0x02b22823, 0x00802821, 0x8e020000,
-+0x02459021, 0xacc20000, 0x8e020004, 0x00c02021,
-+0x26310010, 0xac820004, 0x30e2ffff, 0xac800008,
-+0xa485000e, 0xac820010, 0x24020305, 0x0e0005a2,
-+0xa482000c, 0x3242ffff, 0x0054102b, 0x1440ffc5,
-+0x3242ffff, 0x0a00058e, 0x00000000, 0x8e620000,
-+0x8e63fffc, 0x0043102a, 0x10400067, 0x00000000,
-+0x8e62fff0, 0x00028900, 0x3c100800, 0x02118021,
-+0x0e000625, 0x8e101bc8, 0x00403021, 0x14c00005,
-+0x00000000, 0x8e62082c, 0x24420001, 0x0a000596,
-+0xae62082c, 0x9608000a, 0x31020040, 0x10400005,
-+0x2407180c, 0x8e02000c, 0x2407188c, 0x00021400,
-+0xacc20018, 0x3c020800, 0x00511021, 0x8c421bd0,
-+0x3c030800, 0x00711821, 0x8c631bd4, 0x00021500,
-+0x00031c00, 0x00431025, 0xacc20014, 0x8e63fff4,
-+0x96020008, 0x00432023, 0x3242ffff, 0x3083ffff,
-+0x00431021, 0x02c2102a, 0x10400003, 0x00802821,
-+0x97a9001e, 0x01322823, 0x8e620000, 0x30a4ffff,
-+0x00441021, 0xae620000, 0xa4c5000e, 0x8e020000,
-+0xacc20000, 0x8e020004, 0x8e63fff4, 0x00431021,
-+0xacc20004, 0x8e63fff4, 0x96020008, 0x00641821,
-+0x0062102a, 0x14400006, 0x02459021, 0x8e62fff0,
-+0xae60fff4, 0x24420001, 0x0a000571, 0xae62fff0,
-+0xae63fff4, 0xacc00008, 0x3242ffff, 0x10560003,
-+0x31020004, 0x10400006, 0x24020305, 0x31020080,
-+0x54400001, 0x34e70010, 0x34e70020, 0x24020905,
-+0xa4c2000c, 0x8ee30000, 0x8ee20004, 0x14620007,
-+0x3c02b49a, 0x8ee20860, 0x54400001, 0x34e70400,
-+0x3c024b65, 0x0a000588, 0x34427654, 0x344289ab,
-+0xacc2001c, 0x30e2ffff, 0xacc20010, 0x0e0005a2,
-+0x00c02021, 0x3242ffff, 0x0056102b, 0x1440ff9b,
-+0x00000000, 0x8e620000, 0x8e63fffc, 0x0043102a,
-+0x1440ff48, 0x00000000, 0x8fbf0044, 0x8fbe0040,
-+0x8fb7003c, 0x8fb60038, 0x8fb50034, 0x8fb40030,
-+0x8fb3002c, 0x8fb20028, 0x8fb10024, 0x8fb00020,
-+0x03e00008, 0x27bd0048, 0x27bdffe8, 0xafbf0014,
-+0xafb00010, 0x8f624450, 0x8f634410, 0x0a0005b1,
-+0x00808021, 0x8f626820, 0x30422000, 0x10400003,
-+0x00000000, 0x0e0001f0, 0x00002021, 0x8f624450,
-+0x8f634410, 0x3042ffff, 0x0043102b, 0x1440fff5,
-+0x00000000, 0x8f630c14, 0x3063000f, 0x2c620002,
-+0x1440000b, 0x00000000, 0x8f630c14, 0x3c020800,
-+0x8c421b40, 0x3063000f, 0x24420001, 0x3c010800,
-+0xac221b40, 0x2c620002, 0x1040fff7, 0x00000000,
-+0xaf705c18, 0x8f625c10, 0x30420002, 0x10400009,
-+0x00000000, 0x8f626820, 0x30422000, 0x1040fff8,
-+0x00000000, 0x0e0001f0, 0x00002021, 0x0a0005c4,
-+0x00000000, 0x8fbf0014, 0x8fb00010, 0x03e00008,
-+0x27bd0018, 0x00000000, 0x00000000, 0x00000000,
-+0x27bdffe8, 0x3c1bc000, 0xafbf0014, 0xafb00010,
-+0xaf60680c, 0x8f626804, 0x34420082, 0xaf626804,
-+0x8f634000, 0x24020b50, 0x3c010800, 0xac221b54,
-+0x24020b78, 0x3c010800, 0xac221b64, 0x34630002,
-+0xaf634000, 0x0e000605, 0x00808021, 0x3c010800,
-+0xa0221b68, 0x304200ff, 0x24030002, 0x14430005,
-+0x00000000, 0x3c020800, 0x8c421b54, 0x0a0005f8,
-+0xac5000c0, 0x3c020800, 0x8c421b54, 0xac5000bc,
-+0x8f624434, 0x8f634438, 0x8f644410, 0x3c010800,
-+0xac221b5c, 0x3c010800, 0xac231b6c, 0x3c010800,
-+0xac241b58, 0x8fbf0014, 0x8fb00010, 0x03e00008,
-+0x27bd0018, 0x3c040800, 0x8c870000, 0x3c03aa55,
-+0x3463aa55, 0x3c06c003, 0xac830000, 0x8cc20000,
-+0x14430007, 0x24050002, 0x3c0355aa, 0x346355aa,
-+0xac830000, 0x8cc20000, 0x50430001, 0x24050001,
-+0x3c020800, 0xac470000, 0x03e00008, 0x00a01021,
-+0x27bdfff8, 0x18800009, 0x00002821, 0x8f63680c,
-+0x8f62680c, 0x1043fffe, 0x00000000, 0x24a50001,
-+0x00a4102a, 0x1440fff9, 0x00000000, 0x03e00008,
-+0x27bd0008, 0x8f634450, 0x3c020800, 0x8c421b5c,
-+0x00031c02, 0x0043102b, 0x14400008, 0x3c038000,
-+0x3c040800, 0x8c841b6c, 0x8f624450, 0x00021c02,
-+0x0083102b, 0x1040fffc, 0x3c038000, 0xaf634444,
-+0x8f624444, 0x00431024, 0x1440fffd, 0x00000000,
-+0x8f624448, 0x03e00008, 0x3042ffff, 0x3082ffff,
-+0x2442e000, 0x2c422001, 0x14400003, 0x3c024000,
-+0x0a000648, 0x2402ffff, 0x00822025, 0xaf645c38,
-+0x8f625c30, 0x30420002, 0x1440fffc, 0x00001021,
-+0x03e00008, 0x00000000, 0x8f624450, 0x3c030800,
-+0x8c631b58, 0x0a000651, 0x3042ffff, 0x8f624450,
-+0x3042ffff, 0x0043102b, 0x1440fffc, 0x00000000,
-+0x03e00008, 0x00000000, 0x27bdffe0, 0x00802821,
-+0x3c040800, 0x24841af0, 0x00003021, 0x00003821,
-+0xafbf0018, 0xafa00010, 0x0e00067c, 0xafa00014,
-+0x0a000660, 0x00000000, 0x8fbf0018, 0x03e00008,
-+0x27bd0020, 0x00000000, 0x00000000, 0x00000000,
-+0x3c020800, 0x34423000, 0x3c030800, 0x34633000,
-+0x3c040800, 0x348437ff, 0x3c010800, 0xac221b74,
-+0x24020040, 0x3c010800, 0xac221b78, 0x3c010800,
-+0xac201b70, 0xac600000, 0x24630004, 0x0083102b,
-+0x5040fffd, 0xac600000, 0x03e00008, 0x00000000,
-+0x00804821, 0x8faa0010, 0x3c020800, 0x8c421b70,
-+0x3c040800, 0x8c841b78, 0x8fab0014, 0x24430001,
-+0x0044102b, 0x3c010800, 0xac231b70, 0x14400003,
-+0x00004021, 0x3c010800, 0xac201b70, 0x3c020800,
-+0x8c421b70, 0x3c030800, 0x8c631b74, 0x91240000,
-+0x00021140, 0x00431021, 0x00481021, 0x25080001,
-+0xa0440000, 0x29020008, 0x1440fff4, 0x25290001,
-+0x3c020800, 0x8c421b70, 0x3c030800, 0x8c631b74,
-+0x8f64680c, 0x00021140, 0x00431021, 0xac440008,
-+0xac45000c, 0xac460010, 0xac470014, 0xac4a0018,
-+0x03e00008, 0xac4b001c, 0x00000000, 0x00000000,
-+0x4d61696e, 0x43707542, 0x00000000, 0x4d61696e,
-+0x43707541, 0x00000000, 0x00000000, 0x00000000,
-+0x73746b6f, 0x66666c64, 0x496e0000, 0x73746b6f,
-+0x66662a2a, 0x00000000, 0x53774576, 0x656e7430,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x66617461, 0x6c457272, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x73746b6f, 0x66666c64, 0x5f76312e,
-+0x362e3000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+};
-+
-+static const struct tg3_firmware tg3_lgcy_tso_fw = {
-+ .size = TG3_LGCY_TSO_FW_LEN,
-+ .data = (u8 *)&tg3TsoFwText[0],
-+};
-+
-+/* 5705 needs a special version of the TSO firmware. */
-+#define TG3_TSO5_FW_RELEASE_MAJOR 0x1
-+#define TG3_TSO5_FW_RELASE_MINOR 0x2
-+#define TG3_TSO5_FW_RELEASE_FIX 0x0
-+#define TG3_TSO5_FW_START_ADDR 0x00010000
-+#define TG3_TSO5_FW_TEXT_ADDR 0x00010000
-+#define TG3_TSO5_FW_TEXT_LEN 0xe90
-+#define TG3_TSO5_FW_RODATA_ADDR 0x00010e90
-+#define TG3_TSO5_FW_RODATA_LEN 0x50
-+#define TG3_TSO5_FW_DATA_ADDR 0x00010f00
-+#define TG3_TSO5_FW_DATA_LEN 0x20
-+#define TG3_TSO5_FW_SBSS_ADDR 0x00010f20
-+#define TG3_TSO5_FW_SBSS_LEN 0x28
-+#define TG3_TSO5_FW_BSS_ADDR 0x00010f50
-+#define TG3_TSO5_FW_BSS_LEN 0x88
-+
-+#define TG3_5705_TSO_FW_LEN \
-+ (TG3_TSO5_FW_TEXT_LEN + \
-+ TG3_TSO5_FW_RODATA_LEN + \
-+ 0x20 + \
-+ TG3_TSO5_FW_DATA_LEN)
-+
-+static const u32 tg3Tso5FwText[] = {
-+0x00010200, (u32)TG3_TSO5_FW_TEXT_ADDR, (u32)TG3_5705_TSO_FW_LEN,
-+0x0c004003, 0x00000000, 0x00010f04, 0x00000000,
-+0x10000003, 0x00000000, 0x0000000d, 0x0000000d,
-+0x3c1d0001, 0x37bde000, 0x03a0f021, 0x3c100001,
-+0x26100000, 0x0c004010, 0x00000000, 0x0000000d,
-+0x27bdffe0, 0x3c04fefe, 0xafbf0018, 0x0c0042e8,
-+0x34840002, 0x0c004364, 0x00000000, 0x3c030001,
-+0x90630f34, 0x24020002, 0x3c040001, 0x24840e9c,
-+0x14620003, 0x24050001, 0x3c040001, 0x24840e90,
-+0x24060002, 0x00003821, 0xafa00010, 0x0c004378,
-+0xafa00014, 0x0c00402c, 0x00000000, 0x8fbf0018,
-+0x03e00008, 0x27bd0020, 0x00000000, 0x00000000,
-+0x27bdffe0, 0xafbf001c, 0xafb20018, 0xafb10014,
-+0x0c0042d4, 0xafb00010, 0x3c128000, 0x24110001,
-+0x8f706810, 0x32020400, 0x10400007, 0x00000000,
-+0x8f641008, 0x00921024, 0x14400003, 0x00000000,
-+0x0c004064, 0x00000000, 0x3c020001, 0x90420f56,
-+0x10510003, 0x32020200, 0x1040fff1, 0x00000000,
-+0x0c0041b4, 0x00000000, 0x08004034, 0x00000000,
-+0x8fbf001c, 0x8fb20018, 0x8fb10014, 0x8fb00010,
-+0x03e00008, 0x27bd0020, 0x27bdffe0, 0x3c040001,
-+0x24840eb0, 0x00002821, 0x00003021, 0x00003821,
-+0xafbf0018, 0xafa00010, 0x0c004378, 0xafa00014,
-+0x0000d021, 0x24020130, 0xaf625000, 0x3c010001,
-+0xa4200f50, 0x3c010001, 0xa0200f57, 0x8fbf0018,
-+0x03e00008, 0x27bd0020, 0x00000000, 0x00000000,
-+0x3c030001, 0x24630f60, 0x90620000, 0x27bdfff0,
-+0x14400003, 0x0080c021, 0x08004073, 0x00004821,
-+0x3c022000, 0x03021024, 0x10400003, 0x24090002,
-+0x08004073, 0xa0600000, 0x24090001, 0x00181040,
-+0x30431f80, 0x346f8008, 0x1520004b, 0x25eb0028,
-+0x3c040001, 0x00832021, 0x8c848010, 0x3c050001,
-+0x24a50f7a, 0x00041402, 0xa0a20000, 0x3c010001,
-+0xa0240f7b, 0x3c020001, 0x00431021, 0x94428014,
-+0x3c010001, 0xa0220f7c, 0x3c0c0001, 0x01836021,
-+0x8d8c8018, 0x304200ff, 0x24420008, 0x000220c3,
-+0x24020001, 0x3c010001, 0xa0220f60, 0x0124102b,
-+0x1040000c, 0x00003821, 0x24a6000e, 0x01602821,
-+0x8ca20000, 0x8ca30004, 0x24a50008, 0x24e70001,
-+0xacc20000, 0xacc30004, 0x00e4102b, 0x1440fff8,
-+0x24c60008, 0x00003821, 0x3c080001, 0x25080f7b,
-+0x91060000, 0x3c020001, 0x90420f7c, 0x2503000d,
-+0x00c32821, 0x00461023, 0x00021fc2, 0x00431021,
-+0x00021043, 0x1840000c, 0x00002021, 0x91020001,
-+0x00461023, 0x00021fc2, 0x00431021, 0x00021843,
-+0x94a20000, 0x24e70001, 0x00822021, 0x00e3102a,
-+0x1440fffb, 0x24a50002, 0x00041c02, 0x3082ffff,
-+0x00622021, 0x00041402, 0x00822021, 0x3c02ffff,
-+0x01821024, 0x3083ffff, 0x00431025, 0x3c010001,
-+0x080040fa, 0xac220f80, 0x3c050001, 0x24a50f7c,
-+0x90a20000, 0x3c0c0001, 0x01836021, 0x8d8c8018,
-+0x000220c2, 0x1080000e, 0x00003821, 0x01603021,
-+0x24a5000c, 0x8ca20000, 0x8ca30004, 0x24a50008,
-+0x24e70001, 0xacc20000, 0xacc30004, 0x00e4102b,
-+0x1440fff8, 0x24c60008, 0x3c050001, 0x24a50f7c,
-+0x90a20000, 0x30430007, 0x24020004, 0x10620011,
-+0x28620005, 0x10400005, 0x24020002, 0x10620008,
-+0x000710c0, 0x080040fa, 0x00000000, 0x24020006,
-+0x1062000e, 0x000710c0, 0x080040fa, 0x00000000,
-+0x00a21821, 0x9463000c, 0x004b1021, 0x080040fa,
-+0xa4430000, 0x000710c0, 0x00a21821, 0x8c63000c,
-+0x004b1021, 0x080040fa, 0xac430000, 0x00a21821,
-+0x8c63000c, 0x004b2021, 0x00a21021, 0xac830000,
-+0x94420010, 0xa4820004, 0x95e70006, 0x3c020001,
-+0x90420f7c, 0x3c030001, 0x90630f7a, 0x00e2c823,
-+0x3c020001, 0x90420f7b, 0x24630028, 0x01e34021,
-+0x24420028, 0x15200012, 0x01e23021, 0x94c2000c,
-+0x3c010001, 0xa4220f78, 0x94c20004, 0x94c30006,
-+0x3c010001, 0xa4200f76, 0x3c010001, 0xa4200f72,
-+0x00021400, 0x00431025, 0x3c010001, 0xac220f6c,
-+0x95020004, 0x3c010001, 0x08004124, 0xa4220f70,
-+0x3c020001, 0x94420f70, 0x3c030001, 0x94630f72,
-+0x00431021, 0xa5020004, 0x3c020001, 0x94420f6c,
-+0xa4c20004, 0x3c020001, 0x8c420f6c, 0xa4c20006,
-+0x3c040001, 0x94840f72, 0x3c020001, 0x94420f70,
-+0x3c0a0001, 0x954a0f76, 0x00441821, 0x3063ffff,
-+0x0062182a, 0x24020002, 0x1122000b, 0x00832023,
-+0x3c030001, 0x94630f78, 0x30620009, 0x10400006,
-+0x3062fff6, 0xa4c2000c, 0x3c020001, 0x94420f78,
-+0x30420009, 0x01425023, 0x24020001, 0x1122001b,
-+0x29220002, 0x50400005, 0x24020002, 0x11200007,
-+0x31a2ffff, 0x08004197, 0x00000000, 0x1122001d,
-+0x24020016, 0x08004197, 0x31a2ffff, 0x3c0e0001,
-+0x95ce0f80, 0x10800005, 0x01806821, 0x01c42021,
-+0x00041c02, 0x3082ffff, 0x00627021, 0x000e1027,
-+0xa502000a, 0x3c030001, 0x90630f7b, 0x31a2ffff,
-+0x00e21021, 0x0800418d, 0x00432023, 0x3c020001,
-+0x94420f80, 0x00442021, 0x00041c02, 0x3082ffff,
-+0x00622021, 0x00807021, 0x00041027, 0x08004185,
-+0xa502000a, 0x3c050001, 0x24a50f7a, 0x90a30000,
-+0x14620002, 0x24e2fff2, 0xa5e20034, 0x90a20000,
-+0x00e21023, 0xa5020002, 0x3c030001, 0x94630f80,
-+0x3c020001, 0x94420f5a, 0x30e5ffff, 0x00641821,
-+0x00451023, 0x00622023, 0x00041c02, 0x3082ffff,
-+0x00622021, 0x00041027, 0xa502000a, 0x3c030001,
-+0x90630f7c, 0x24620001, 0x14a20005, 0x00807021,
-+0x01631021, 0x90420000, 0x08004185, 0x00026200,
-+0x24620002, 0x14a20003, 0x306200fe, 0x004b1021,
-+0x944c0000, 0x3c020001, 0x94420f82, 0x3183ffff,
-+0x3c040001, 0x90840f7b, 0x00431021, 0x00e21021,
-+0x00442023, 0x008a2021, 0x00041c02, 0x3082ffff,
-+0x00622021, 0x00041402, 0x00822021, 0x00806821,
-+0x00041027, 0xa4c20010, 0x31a2ffff, 0x000e1c00,
-+0x00431025, 0x3c040001, 0x24840f72, 0xade20010,
-+0x94820000, 0x3c050001, 0x94a50f76, 0x3c030001,
-+0x8c630f6c, 0x24420001, 0x00b92821, 0xa4820000,
-+0x3322ffff, 0x00622021, 0x0083182b, 0x3c010001,
-+0xa4250f76, 0x10600003, 0x24a2ffff, 0x3c010001,
-+0xa4220f76, 0x3c024000, 0x03021025, 0x3c010001,
-+0xac240f6c, 0xaf621008, 0x03e00008, 0x27bd0010,
-+0x3c030001, 0x90630f56, 0x27bdffe8, 0x24020001,
-+0xafbf0014, 0x10620026, 0xafb00010, 0x8f620cf4,
-+0x2442ffff, 0x3042007f, 0x00021100, 0x8c434000,
-+0x3c010001, 0xac230f64, 0x8c434008, 0x24444000,
-+0x8c5c4004, 0x30620040, 0x14400002, 0x24020088,
-+0x24020008, 0x3c010001, 0xa4220f68, 0x30620004,
-+0x10400005, 0x24020001, 0x3c010001, 0xa0220f57,
-+0x080041d5, 0x00031402, 0x3c010001, 0xa0200f57,
-+0x00031402, 0x3c010001, 0xa4220f54, 0x9483000c,
-+0x24020001, 0x3c010001, 0xa4200f50, 0x3c010001,
-+0xa0220f56, 0x3c010001, 0xa4230f62, 0x24020001,
-+0x1342001e, 0x00000000, 0x13400005, 0x24020003,
-+0x13420067, 0x00000000, 0x080042cf, 0x00000000,
-+0x3c020001, 0x94420f62, 0x241a0001, 0x3c010001,
-+0xa4200f5e, 0x3c010001, 0xa4200f52, 0x304407ff,
-+0x00021bc2, 0x00031823, 0x3063003e, 0x34630036,
-+0x00021242, 0x3042003c, 0x00621821, 0x3c010001,
-+0xa4240f58, 0x00832021, 0x24630030, 0x3c010001,
-+0xa4240f5a, 0x3c010001, 0xa4230f5c, 0x3c060001,
-+0x24c60f52, 0x94c50000, 0x94c30002, 0x3c040001,
-+0x94840f5a, 0x00651021, 0x0044102a, 0x10400013,
-+0x3c108000, 0x00a31021, 0xa4c20000, 0x3c02a000,
-+0xaf620cf4, 0x3c010001, 0xa0200f56, 0x8f641008,
-+0x00901024, 0x14400003, 0x00000000, 0x0c004064,
-+0x00000000, 0x8f620cf4, 0x00501024, 0x104000b7,
-+0x00000000, 0x0800420f, 0x00000000, 0x3c030001,
-+0x94630f50, 0x00851023, 0xa4c40000, 0x00621821,
-+0x3042ffff, 0x3c010001, 0xa4230f50, 0xaf620ce8,
-+0x3c020001, 0x94420f68, 0x34420024, 0xaf620cec,
-+0x94c30002, 0x3c020001, 0x94420f50, 0x14620012,
-+0x3c028000, 0x3c108000, 0x3c02a000, 0xaf620cf4,
-+0x3c010001, 0xa0200f56, 0x8f641008, 0x00901024,
-+0x14400003, 0x00000000, 0x0c004064, 0x00000000,
-+0x8f620cf4, 0x00501024, 0x1440fff7, 0x00000000,
-+0x080042cf, 0x241a0003, 0xaf620cf4, 0x3c108000,
-+0x8f641008, 0x00901024, 0x14400003, 0x00000000,
-+0x0c004064, 0x00000000, 0x8f620cf4, 0x00501024,
-+0x1440fff7, 0x00000000, 0x080042cf, 0x241a0003,
-+0x3c070001, 0x24e70f50, 0x94e20000, 0x03821021,
-+0xaf620ce0, 0x3c020001, 0x8c420f64, 0xaf620ce4,
-+0x3c050001, 0x94a50f54, 0x94e30000, 0x3c040001,
-+0x94840f58, 0x3c020001, 0x94420f5e, 0x00a32823,
-+0x00822023, 0x30a6ffff, 0x3083ffff, 0x00c3102b,
-+0x14400043, 0x00000000, 0x3c020001, 0x94420f5c,
-+0x00021400, 0x00621025, 0xaf620ce8, 0x94e20000,
-+0x3c030001, 0x94630f54, 0x00441021, 0xa4e20000,
-+0x3042ffff, 0x14430021, 0x3c020008, 0x3c020001,
-+0x90420f57, 0x10400006, 0x3c03000c, 0x3c020001,
-+0x94420f68, 0x34630624, 0x0800427c, 0x0000d021,
-+0x3c020001, 0x94420f68, 0x3c030008, 0x34630624,
-+0x00431025, 0xaf620cec, 0x3c108000, 0x3c02a000,
-+0xaf620cf4, 0x3c010001, 0xa0200f56, 0x8f641008,
-+0x00901024, 0x14400003, 0x00000000, 0x0c004064,
-+0x00000000, 0x8f620cf4, 0x00501024, 0x10400015,
-+0x00000000, 0x08004283, 0x00000000, 0x3c030001,
-+0x94630f68, 0x34420624, 0x3c108000, 0x00621825,
-+0x3c028000, 0xaf630cec, 0xaf620cf4, 0x8f641008,
-+0x00901024, 0x14400003, 0x00000000, 0x0c004064,
-+0x00000000, 0x8f620cf4, 0x00501024, 0x1440fff7,
-+0x00000000, 0x3c010001, 0x080042cf, 0xa4200f5e,
-+0x3c020001, 0x94420f5c, 0x00021400, 0x00c21025,
-+0xaf620ce8, 0x3c020001, 0x90420f57, 0x10400009,
-+0x3c03000c, 0x3c020001, 0x94420f68, 0x34630624,
-+0x0000d021, 0x00431025, 0xaf620cec, 0x080042c1,
-+0x3c108000, 0x3c020001, 0x94420f68, 0x3c030008,
-+0x34630604, 0x00431025, 0xaf620cec, 0x3c020001,
-+0x94420f5e, 0x00451021, 0x3c010001, 0xa4220f5e,
-+0x3c108000, 0x3c02a000, 0xaf620cf4, 0x3c010001,
-+0xa0200f56, 0x8f641008, 0x00901024, 0x14400003,
-+0x00000000, 0x0c004064, 0x00000000, 0x8f620cf4,
-+0x00501024, 0x1440fff7, 0x00000000, 0x8fbf0014,
-+0x8fb00010, 0x03e00008, 0x27bd0018, 0x00000000,
-+0x27bdffe0, 0x3c040001, 0x24840ec0, 0x00002821,
-+0x00003021, 0x00003821, 0xafbf0018, 0xafa00010,
-+0x0c004378, 0xafa00014, 0x0000d021, 0x24020130,
-+0xaf625000, 0x3c010001, 0xa4200f50, 0x3c010001,
-+0xa0200f57, 0x8fbf0018, 0x03e00008, 0x27bd0020,
-+0x27bdffe8, 0x3c1bc000, 0xafbf0014, 0xafb00010,
-+0xaf60680c, 0x8f626804, 0x34420082, 0xaf626804,
-+0x8f634000, 0x24020b50, 0x3c010001, 0xac220f20,
-+0x24020b78, 0x3c010001, 0xac220f30, 0x34630002,
-+0xaf634000, 0x0c004315, 0x00808021, 0x3c010001,
-+0xa0220f34, 0x304200ff, 0x24030002, 0x14430005,
-+0x00000000, 0x3c020001, 0x8c420f20, 0x08004308,
-+0xac5000c0, 0x3c020001, 0x8c420f20, 0xac5000bc,
-+0x8f624434, 0x8f634438, 0x8f644410, 0x3c010001,
-+0xac220f28, 0x3c010001, 0xac230f38, 0x3c010001,
-+0xac240f24, 0x8fbf0014, 0x8fb00010, 0x03e00008,
-+0x27bd0018, 0x03e00008, 0x24020001, 0x27bdfff8,
-+0x18800009, 0x00002821, 0x8f63680c, 0x8f62680c,
-+0x1043fffe, 0x00000000, 0x24a50001, 0x00a4102a,
-+0x1440fff9, 0x00000000, 0x03e00008, 0x27bd0008,
-+0x8f634450, 0x3c020001, 0x8c420f28, 0x00031c02,
-+0x0043102b, 0x14400008, 0x3c038000, 0x3c040001,
-+0x8c840f38, 0x8f624450, 0x00021c02, 0x0083102b,
-+0x1040fffc, 0x3c038000, 0xaf634444, 0x8f624444,
-+0x00431024, 0x1440fffd, 0x00000000, 0x8f624448,
-+0x03e00008, 0x3042ffff, 0x3082ffff, 0x2442e000,
-+0x2c422001, 0x14400003, 0x3c024000, 0x08004347,
-+0x2402ffff, 0x00822025, 0xaf645c38, 0x8f625c30,
-+0x30420002, 0x1440fffc, 0x00001021, 0x03e00008,
-+0x00000000, 0x8f624450, 0x3c030001, 0x8c630f24,
-+0x08004350, 0x3042ffff, 0x8f624450, 0x3042ffff,
-+0x0043102b, 0x1440fffc, 0x00000000, 0x03e00008,
-+0x00000000, 0x27bdffe0, 0x00802821, 0x3c040001,
-+0x24840ed0, 0x00003021, 0x00003821, 0xafbf0018,
-+0xafa00010, 0x0c004378, 0xafa00014, 0x0800435f,
-+0x00000000, 0x8fbf0018, 0x03e00008, 0x27bd0020,
-+0x3c020001, 0x3442d600, 0x3c030001, 0x3463d600,
-+0x3c040001, 0x3484ddff, 0x3c010001, 0xac220f40,
-+0x24020040, 0x3c010001, 0xac220f44, 0x3c010001,
-+0xac200f3c, 0xac600000, 0x24630004, 0x0083102b,
-+0x5040fffd, 0xac600000, 0x03e00008, 0x00000000,
-+0x00804821, 0x8faa0010, 0x3c020001, 0x8c420f3c,
-+0x3c040001, 0x8c840f44, 0x8fab0014, 0x24430001,
-+0x0044102b, 0x3c010001, 0xac230f3c, 0x14400003,
-+0x00004021, 0x3c010001, 0xac200f3c, 0x3c020001,
-+0x8c420f3c, 0x3c030001, 0x8c630f40, 0x91240000,
-+0x00021140, 0x00431021, 0x00481021, 0x25080001,
-+0xa0440000, 0x29020008, 0x1440fff4, 0x25290001,
-+0x3c020001, 0x8c420f3c, 0x3c030001, 0x8c630f40,
-+0x8f64680c, 0x00021140, 0x00431021, 0xac440008,
-+0xac45000c, 0xac460010, 0xac470014, 0xac4a0018,
-+0x03e00008, 0xac4b001c, 0x00000000, 0x00000000,
-+0x4d61696e, 0x43707542, 0x00000000, 0x4d61696e,
-+0x43707541, 0x00000000, 0x00000000, 0x00000000,
-+0x73746b6f, 0x66666c64, 0x00000000, 0x00000000,
-+0x73746b6f, 0x66666c64, 0x00000000, 0x00000000,
-+0x66617461, 0x6c457272, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x00000000, 0x00000000, 0x00000000,
-+0x00000000, 0x73746b6f, 0x66666c64, 0x5f76312e,
-+0x322e3000, 0x00000000, 0x00000000, 0x00000000,
-+};
-+
-+static const struct tg3_firmware tg3_5705_tso_fw = {
-+ .size = TG3_5705_TSO_FW_LEN,
-+ .data = (u8 *)&tg3Tso5FwText[0],
-+};
-+
-+#endif /* TG3_TSO_SUPPORT != 0 */
-+
-+static int tg3_hidden_request_firmware(const struct tg3_firmware **fw,
-+ const char *name)
-+{
-+ *fw = 0;
-+
-+ if (strcmp(name, "tigon/tg3.bin") == 0)
-+ *fw = &tg3_5701_fw;
-+ else if (strcmp(name, "tigon/tg357766.bin") == 0)
-+ *fw = &tg3_57766_fw;
-+#if TG3_TSO_SUPPORT != 0
-+ else if (strcmp(name, "tigon/tg3_tso.bin") == 0)
-+ *fw = &tg3_lgcy_tso_fw;
-+ else if (strcmp(name, "tigon/tg3_tso5.bin") == 0)
-+ *fw = &tg3_5705_tso_fw;
-+#endif
-+
-+ return *fw ? 0 : -EINVAL;
-+}
-+
-+#define tg3_priv_request_firmware(x, y, z) tg3_hidden_request_firmware((x), (y))
-+
-+#define tg3_priv_release_firmware(x)
-+
-+#endif /* BCM_HAS_REQUEST_FIRMWARE */
-diff --git a/drivers/net/ethernet/broadcom/tg3/tg3_flags.h b/drivers/net/ethernet/broadcom/tg3/tg3_flags.h
-new file mode 100644
-index 0000000..6788434
---- /dev/null
-+++ b/drivers/net/ethernet/broadcom/tg3/tg3_flags.h
-@@ -0,0 +1,95 @@
-+#define BCM_HAS_BOOL
-+#define BCM_HAS_LE32
-+#define BCM_HAS_RESOURCE_SIZE_T
-+#define BCM_HAS_KZALLOC
-+#define BCM_HAS_JIFFIES_TO_USECS
-+#define BCM_HAS_USECS_TO_JIFFIES
-+#define BCM_HAS_MSECS_TO_JIFFIES
-+#define BCM_HAS_MSLEEP
-+#define BCM_HAS_MSLEEP_INTERRUPTIBLE
-+#define BCM_HAS_SKB_COPY_FROM_LINEAR_DATA
-+#define BCM_HAS_SKB_IS_GSO_V6
-+#define BCM_HAS_SKB_CHECKSUM_NONE_ASSERT
-+#define BCM_KERNEL_SUPPORTS_TIMESTAMPING
-+#define BCM_HAS_SKB_TX_TIMESTAMP
-+#define BCM_HAS_SKB_FRAG_SIZE
-+#define BCM_HAS_SKB_FRAG_DMA_MAP
-+#define BCM_HAS_PCI_PCIE_CAP
-+#define BCM_HAS_PCIE_CAP_RW
-+#define BCM_HAS_PCI_IS_PCIE
-+#define BCM_HAS_PCI_IOREMAP_BAR
-+#define BCM_HAS_PCI_READ_VPD
-+#define BCM_HAS_INTX_MSI_WORKAROUND
-+#define BCM_HAS_PCI_TARGET_STATE
-+#define BCM_HAS_PCI_CHOOSE_STATE
-+#define BCM_HAS_PCI_PME_CAPABLE
-+#define BCM_HAS_PCI_ENABLE_WAKE
-+#define BCM_HAS_PCI_WAKE_FROM_D3
-+#define BCM_HAS_PCI_SET_POWER_STATE
-+#define BCM_HAS_PCI_EEH_SUPPORT
-+#define BCM_HAS_PCI_IS_ENABLED
-+#define BCM_HAS_DEVICE_WAKEUP_API
-+#define BCM_HAS_DEVICE_SET_WAKEUP_CAPABLE
-+#define BCM_HAS_NEW_PCI_DMA_MAPPING_ERROR
-+#define BCM_HAS_PCIE_GET_READRQ
-+#define BCM_HAS_PCIE_SET_READRQ
-+#define BCM_HAS_ETHTOOL_OP_SET_TX_IPV6_CSUM
-+#define BCM_HAS_ETHTOOL_OP_SET_TX_HW_CSUM
-+#define BCM_HAS_ETHTOOL_OP_SET_SG
-+#define BCM_HAS_ETHTOOL_OP_SET_TSO
-+#define BCM_HAS_MDIX_STATUS
-+#define BCM_HAS_SET_PHYS_ID
-+#define BCM_HAS_SET_TX_CSUM
-+#define BCM_HAS_ETHTOOL_CMD_SPEED_SET
-+#define BCM_HAS_ETHTOOL_CMD_SPEED
-+#define BCM_HAS_EXTERNAL_LB_DONE
-+#define BCM_HAS_GET_RXNFC
-+#define BCM_HAS_GET_RXFH_INDIR
-+#define BCM_HAS_LP_ADVERTISING
-+#define BCM_HAS_SKB_TRANSPORT_OFFSET
-+#define BCM_HAS_SKB_GET_QUEUE_MAPPING
-+#define BCM_HAS_IP_HDR
-+#define BCM_HAS_IP_HDRLEN
-+#define BCM_HAS_TCP_HDR
-+#define BCM_HAS_TCP_HDRLEN
-+#define BCM_HAS_TCP_OPTLEN
-+#define BCM_HAS_STRUCT_NETDEV_QUEUE
-+#define BCM_HAS_NETIF_SET_REAL_NUM_TX_QUEUES
-+#define BCM_HAS_NETIF_SET_REAL_NUM_RX_QUEUES
-+#define BCM_HAS_NETDEV_PRIV
-+#define BCM_HAS_NETDEV_TX_T
-+#define BCM_HAS_NETDEV_HW_ADDR
-+#define BCM_HAS_NETDEV_NAME
-+#define BCM_HAS_NETDEV_SENT_QUEUE
-+#define BCM_HAS_NETDEV_TX_SENT_QUEUE
-+#define BCM_HAS_NETDEV_COMPLETED_QUEUE
-+#define BCM_HAS_NETDEV_TX_COMPLETED_QUEUE
-+#define BCM_HAS_NETDEV_RESET_QUEUE
-+#define BCM_HAS_NETDEV_TX_RESET_QUEUE
-+#define BCM_HAS_NET_DEVICE_OPS
-+#define BCM_HAS_GET_STATS64
-+#define BCM_HAS_FIX_FEATURES
-+#define BCM_HAS_HW_FEATURES
-+#define BCM_HAS_VLAN_FEATURES
-+#define BCM_HAS_NETDEV_UPDATE_FEATURES
-+#define BCM_HAS_ALLOC_ETHERDEV_MQ
-+#define BCM_HAS_NAPI_GRO_RECEIVE
-+#define BCM_HAS_NETIF_TX_LOCK
-+#define BCM_HAS_TXQ_TRANS_UPDATE
-+#define BCM_HAS_NETDEV_FEATURES_T
-+#define BCM_HAS_NEW_VLAN_INTERFACE
-+#define BCM_HAS_DEV_DRIVER_STRING
-+#define BCM_HAS_DEV_NAME
-+#define BCM_HAS_MDIO_H
-+#define BCM_HAS_MII_RESOLVE_FLOWCTRL_FDX
-+#define BCM_HAS_MII_ADVERTISE_FLOWCTRL
-+#define BCM_HAS_MDIOBUS_ALLOC
-+#define BCM_HAS_DMA_DATA_DIRECTION
-+#define BCM_HAS_DMA_UNMAP_ADDR
-+#define BCM_HAS_DMA_UNMAP_ADDR_SET
-+#define BCM_HAS_DMA_ZALLOC_COHERENT
-+#define BCM_HAS_IEEE1588_SUPPORT
-+#define BCM_HAS_PCI_PMOPS_SHUTDOWN
-+#define BCM_HAS_OLD_RXFH_INDIR
-+#define BCM_HAS_PCI_CHANNEL_OFFLINE
-+#define BCM_HAS_PCI_CHANNEL_IO_NORMAL_ENUM
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-cy8c3245-hwmon.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-cy8c3245-hwmon.patch
deleted file mode 100644
index b8e955f9..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-cy8c3245-hwmon.patch
+++ /dev/null
@@ -1,1126 +0,0 @@
-Add a hwmon style driver for the CY8C3XX family
-
-diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
-index 0c248ec..7e7cdf6 100644
---- a/drivers/hwmon/Kconfig
-+++ b/drivers/hwmon/Kconfig
-@@ -293,6 +293,17 @@ config SENSORS_ATXP1
- This driver can also be built as a module. If so, the module
- will be called atxp1.
-
-+config SENSORS_CY8CXX
-+ tristate "Cypress Semiconductor CY8Cxx"
-+ depends on I2C
-+ help
-+ If you say yes here you get support for Cypress Semiconductor
-+ CY8C series sensor chips.
-+
-+ This driver can also be built as a module. If so, the module
-+ will be called cy8cxx.
-+
-+
- config SENSORS_DS620
- tristate "Dallas Semiconductor DS620"
- depends on I2C
-diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
-index 8251ce8..5e22567 100644
---- a/drivers/hwmon/Makefile
-+++ b/drivers/hwmon/Makefile
-@@ -42,6 +42,7 @@ obj-$(CONFIG_SENSORS_APPLESMC) += applesmc.o
- obj-$(CONFIG_SENSORS_ASC7621) += asc7621.o
- obj-$(CONFIG_SENSORS_ATXP1) += atxp1.o
- obj-$(CONFIG_SENSORS_CORETEMP) += coretemp.o
-+obj-$(CONFIG_SENSORS_CY8CXX) += cy8cxx.o
- obj-$(CONFIG_SENSORS_DME1737) += dme1737.o
- obj-$(CONFIG_SENSORS_DS620) += ds620.o
- obj-$(CONFIG_SENSORS_DS1621) += ds1621.o
-diff --git a/drivers/hwmon/cy8cxx.c b/drivers/hwmon/cy8cxx.c
-new file mode 100644
-index 0000000..3edfbe7
---- /dev/null
-+++ b/drivers/hwmon/cy8cxx.c
-@@ -0,0 +1,1084 @@
-+/*
-+ * A hwmon driver for the Cypress Semiconductor C3245
-+ * Copyright (C) 2013 Cumulus Networks
-+ *
-+ * Author: Shrijeet Mukherjee
-+ *
-+ * Based on the adt7470 driver
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+ */
-+
-+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-+
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+
-+/* Addresses to scan */
-+static const unsigned short normal_i2c[] = { 0x2E, I2C_CLIENT_END };
-+
-+/* CY8C3XX registers */
-+#define CY8C3XX_REG_BASE_ADDR 0x00
-+#define CY8C3XX_REG_DEV_ID 0x04
-+#define CY8C3XX_REG_COMPANY_ID 0x05
-+#define CY8C3XX_REG_FW_REV_MAJ 0x06
-+#define CY8C3XX_REG_FW_REV_MIN 0x07
-+#define CY8C3XX_REG_RESET 0x08
-+
-+/*
-+ * Fan PWM / RPM Profile control registers
-+ *
-+ * These registers consist of two-bytes each
-+ */
-+#define CY8C3XX_REG_FAN_PROFILE_BASE_ADDR 0x10
-+#define CY8C3XX_REG_FAN_PROFILE(x) (CY8C3XX_REG_FAN_PROFILE_BASE_ADDR + ((x) * 2))
-+enum {
-+ CY8C3XX_FAN_PROFILE_LOW_DUTY = 0,
-+ CY8C3XX_FAN_PROFILE_LOW_RPM,
-+ CY8C3XX_FAN_PROFILE_HIGH_DUTY,
-+ CY8C3XX_FAN_PROFILE_HIGH_RPM,
-+ CY8C3XX_FAN_PROFILE_SPEED_0_DUTY,
-+ CY8C3XX_FAN_PROFILE_SPEED_100_DUTY,
-+ CY8C3XX_FAN_PROFILE_MAX
-+};
-+
-+/* skipping over regs to set */
-+
-+#define CY8C3XX_REG_TEMP_BASE_ADDR 0x30
-+
-+#define CY8C3XX_REG_FAN_BASE_ADDR 0x80
-+#define CY8C3XX_REG_FAN_TARGET_BASE_ADDR 0xA0
-+
-+#define CY8C3XX_REG_PWM_BASE_ADDR 0x60
-+
-+#define CY8C3XX_REG_PWM_MAX_BASE_ADDR 0x38
-+
-+#define CY8C3XX_REG_TEMP_LIMITS_BASE_ADDR 0x30
-+#define CY8C3XX_REG_TEMP_LIMITS_MAX_ADDR 0x40
-+
-+#define CY8C3XX_REG_FAN_MAX_BASE_ADDR 0x16
-+
-+#define CY8C3XX_REG_PWM_CFG_BASE_ADDR 0x55
-+
-+#define CY8C3XX_TEMP_COUNT 5
-+#define CY8C3XX_TEMP_REG(x) (CY8C3XX_REG_TEMP_BASE_ADDR + (x))
-+#define CY8C3XX_TEMP_MAX_REG(x) (CY8C3XX_REG_TEMP_LIMITS_MAX_ADDR + (x))
-+
-+#define CY8C3XX_FAN_COUNT 8
-+#define CY8C3XX_REG_FAN(x) (CY8C3XX_REG_FAN_BASE_ADDR + ((x) * 2))
-+
-+#define CY8C3XX_REG_FAN_MIN(x) (CY8C3XX_REG_FAN_MIN_BASE_ADDR + ((x) * 2))
-+#define CY8C3XX_REG_FAN_MAX(x) (CY8C3XX_REG_FAN_MAX_BASE_ADDR)
-+#define CY8C3XX_REG_FAN_TARGET(x) (CY8C3XX_REG_FAN_TARGET_BASE_ADDR + \
-+ ((x) * 2))
-+
-+#define CY8C3XX_PWM_COUNT 8
-+#define CY8C3XX_REG_PWM(x) (CY8C3XX_REG_PWM_BASE_ADDR + ((x) * 2))
-+
-+#define CY8C3XX_COMPANY_ID 0xCC
-+#define CY8C3XX_DEV_ID 0x02
-+#define CY8C3XX_FW_REV_MAJ 0x01
-+
-+/* "all temps" according to hwmon sysfs interface spec */
-+#define CY8C3XX_PWM_ALL_TEMPS 0x3FF
-+
-+/* How often do we reread sensors values? (In jiffies) */
-+#define SENSOR_REFRESH_INTERVAL (5 * HZ)
-+
-+/* How often do we reread sensor limit values? (In jiffies) */
-+#define LIMIT_REFRESH_INTERVAL (60 * HZ)
-+
-+/* Wait at least 200ms per sensor for 10 sensors */
-+#define TEMP_COLLECTION_TIME 2000
-+
-+/* auto update thing won't fire more than every 2s */
-+#define AUTO_UPDATE_INTERVAL 2000
-+
-+/* datasheet says to divide this number by the fan reading to get fan rpm */
-+#define FAN_PERIOD_INVALID 65535
-+#define FAN_DATA_VALID(x) ((x) && (x) != FAN_PERIOD_INVALID)
-+
-+struct cy8c3xx_data {
-+ struct device *hwmon_dev;
-+ struct attribute_group attrs;
-+ struct mutex lock;
-+ char sensors_valid;
-+ char limits_valid;
-+ unsigned long sensors_last_updated; /* In jiffies */
-+ unsigned long limits_last_updated; /* In jiffies */
-+
-+ int num_temp_sensors; /* -1 = probe */
-+ int temperatures_probed;
-+
-+ s8 temp[CY8C3XX_TEMP_COUNT];
-+ s8 temp_max[CY8C3XX_TEMP_COUNT];
-+ u16 fan[CY8C3XX_FAN_COUNT];
-+ u16 fan_max[CY8C3XX_FAN_COUNT];
-+ u16 fan_min[CY8C3XX_FAN_COUNT];
-+ u16 fan_tgt[CY8C3XX_FAN_COUNT];
-+ u16 fan_profile[CY8C3XX_FAN_PROFILE_MAX];
-+ u8 fan_alarm;
-+ u8 temp_alarm;
-+ u8 force_pwm_max;
-+ u8 pwm[CY8C3XX_PWM_COUNT];
-+ u8 pwm_automatic;
-+ struct task_struct *auto_update;
-+ struct completion auto_update_stop;
-+ unsigned int auto_update_interval;
-+};
-+
-+static int cy8c3xx_probe(struct i2c_client *client,
-+ const struct i2c_device_id *id);
-+static int cy8c3xx_detect(struct i2c_client *client,
-+ struct i2c_board_info *info);
-+static int cy8c3xx_remove(struct i2c_client *client);
-+
-+static const struct i2c_device_id cy8c3xx_id[] = {
-+ { "CY8C3245", 0 },
-+ { }
-+};
-+MODULE_DEVICE_TABLE(i2c, cy8c3xx_id);
-+
-+static struct i2c_driver cy8c3xx_driver = {
-+ .class = I2C_CLASS_HWMON,
-+ .driver = {
-+ .name = "cy8c3xx",
-+ },
-+ .probe = cy8c3xx_probe,
-+ .remove = cy8c3xx_remove,
-+ .id_table = cy8c3xx_id,
-+ .detect = cy8c3xx_detect,
-+ .address_list = normal_i2c,
-+};
-+
-+/*
-+ * 16-bit registers on the CY8C3XX are high-byte first.
-+ */
-+static inline int cy8c3xx_read_word_data(struct i2c_client *client, u8 reg)
-+{
-+ s32 rc;
-+ u16 val;
-+
-+ /* read high byte */
-+ rc = i2c_smbus_read_byte_data(client, reg);
-+ if (rc < 0) {
-+ dev_warn(&client->dev, "i2c read failed: 0x%02x, errno %d\n",
-+ reg, -rc);
-+ return rc;
-+ }
-+ val = ((u16)rc & 0xFF) << 8;
-+
-+ /* read low byte */
-+ rc = i2c_smbus_read_byte_data(client, reg + 1);
-+ if (rc < 0) {
-+ dev_warn(&client->dev, "i2c read failed: 0x%02x, errno %d\n",
-+ reg + 1, -rc);
-+ return rc;
-+ }
-+ val |= (u16)rc & 0xFF;
-+
-+ return val;
-+}
-+
-+static inline int cy8c3xx_write_word_data(struct i2c_client *client,
-+ u8 reg,
-+ u16 value)
-+{
-+ s32 rc;
-+
-+ /* write high byte */
-+ rc = i2c_smbus_write_byte_data(client, reg, value >> 8);
-+ if (rc < 0) {
-+ dev_warn(&client->dev,
-+ "i2c write failed: 0x%02x: 0x%02x, errno %d\n",
-+ reg, value >> 8, -rc);
-+ return rc;
-+ }
-+
-+ /* write low byte */
-+ rc = i2c_smbus_write_byte_data(client, reg + 1, value & 0xFF);
-+ if (rc < 0) {
-+ dev_warn(&client->dev,
-+ "i2c write failed: 0x%02x: 0x%02x, errno %d\n",
-+ reg + 1, value & 0xFF, -rc);
-+ return rc;
-+ }
-+
-+ return rc;
-+}
-+
-+/* Probe for temperature sensors. Assumes lock is held */
-+static int cy8c3xx_read_temperatures(struct i2c_client *client,
-+ struct cy8c3xx_data *data)
-+{
-+ int i;
-+
-+ /* Only count fans if we have to */
-+ if (data->num_temp_sensors >= 0)
-+ return 0;
-+
-+ for (i = 0; i < CY8C3XX_TEMP_COUNT; i++) {
-+ data->temp[i] = i2c_smbus_read_byte_data(client,
-+ CY8C3XX_TEMP_REG(i));
-+ if (data->temp[i])
-+ data->num_temp_sensors = i + 1;
-+ }
-+ data->temperatures_probed = 1;
-+ return 0;
-+}
-+
-+static int cy8c3xx_update_thread(void *p)
-+{
-+ struct i2c_client *client = p;
-+ struct cy8c3xx_data *data = i2c_get_clientdata(client);
-+
-+ while (!kthread_should_stop()) {
-+ mutex_lock(&data->lock);
-+ cy8c3xx_read_temperatures(client, data);
-+ mutex_unlock(&data->lock);
-+ if (kthread_should_stop())
-+ break;
-+ msleep_interruptible(data->auto_update_interval);
-+ }
-+
-+ complete_all(&data->auto_update_stop);
-+ return 0;
-+}
-+
-+static struct cy8c3xx_data *cy8c3xx_update_device(struct device *dev)
-+{
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3xx_data *data = i2c_get_clientdata(client);
-+ unsigned long local_jiffies = jiffies;
-+ int i;
-+ int need_sensors = 1;
-+ int need_limits = 1;
-+
-+ /*
-+ * Figure out if we need to update the shadow registers.
-+ * Lockless means that we may occasionally report out of
-+ * date data.
-+ */
-+ if (time_before(local_jiffies, data->sensors_last_updated +
-+ SENSOR_REFRESH_INTERVAL) &&
-+ data->sensors_valid)
-+ need_sensors = 0;
-+
-+ if (time_before(local_jiffies, data->limits_last_updated +
-+ LIMIT_REFRESH_INTERVAL) &&
-+ data->limits_valid)
-+ need_limits = 0;
-+
-+ if (!need_sensors && !need_limits)
-+ return data;
-+
-+ mutex_lock(&data->lock);
-+ if (!need_sensors)
-+ goto no_sensor_update;
-+
-+ if (!data->temperatures_probed)
-+ cy8c3xx_read_temperatures(client, data);
-+ else
-+ for (i = 0; i < CY8C3XX_TEMP_COUNT; i++)
-+ data->temp[i] = i2c_smbus_read_byte_data(client,
-+ CY8C3XX_TEMP_REG(i));
-+
-+ for (i = 0; i < CY8C3XX_FAN_COUNT; i++) {
-+ data->fan[i] = cy8c3xx_read_word_data(client,
-+ CY8C3XX_REG_FAN(i));
-+ }
-+
-+ for (i = 0; i < CY8C3XX_PWM_COUNT; i++) {
-+ data->pwm[i] = i2c_smbus_read_byte_data(client,
-+ CY8C3XX_REG_PWM(i));
-+ }
-+
-+ data->sensors_last_updated = local_jiffies;
-+ data->sensors_valid = 1;
-+
-+no_sensor_update:
-+ if (!need_limits)
-+ goto out;
-+
-+ for (i = 0; i < CY8C3XX_TEMP_COUNT; i++) {
-+ data->temp_max[i] = i2c_smbus_read_byte_data(client,
-+ CY8C3XX_TEMP_MAX_REG(i));
-+ }
-+
-+ for (i = 0; i < CY8C3XX_FAN_COUNT; i++) {
-+ data->fan_max[i] = cy8c3xx_read_word_data(client,
-+ CY8C3XX_REG_FAN_MAX(i));
-+ data->fan_tgt[i] = cy8c3xx_read_word_data(client,
-+ CY8C3XX_REG_FAN_TARGET(i));
-+ }
-+
-+ for (i = 0; i < CY8C3XX_FAN_PROFILE_MAX; i++) {
-+ data->fan_profile[i] = cy8c3xx_read_word_data(client,
-+ CY8C3XX_REG_FAN_PROFILE(i));
-+ }
-+
-+ data->limits_last_updated = local_jiffies;
-+ data->limits_valid = 1;
-+
-+out:
-+ mutex_unlock(&data->lock);
-+ return data;
-+}
-+
-+static ssize_t show_auto_update_interval(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct cy8c3xx_data *data = cy8c3xx_update_device(dev);
-+ return sprintf(buf, "%d\n", data->auto_update_interval);
-+}
-+
-+static ssize_t set_auto_update_interval(struct device *dev,
-+ struct device_attribute *devattr,
-+ const char *buf,
-+ size_t count)
-+{
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3xx_data *data = i2c_get_clientdata(client);
-+ long temp;
-+
-+ if (strict_strtol(buf, 10, &temp))
-+ return -EINVAL;
-+
-+ temp = SENSORS_LIMIT(temp, 0, 60000);
-+
-+ mutex_lock(&data->lock);
-+ data->auto_update_interval = temp;
-+ mutex_unlock(&data->lock);
-+
-+ return count;
-+}
-+
-+static ssize_t show_num_temp_sensors(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct cy8c3xx_data *data = cy8c3xx_update_device(dev);
-+ return sprintf(buf, "%d\n", data->num_temp_sensors);
-+}
-+
-+static ssize_t set_num_temp_sensors(struct device *dev,
-+ struct device_attribute *devattr,
-+ const char *buf,
-+ size_t count)
-+{
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3xx_data *data = i2c_get_clientdata(client);
-+ long temp;
-+
-+ if (strict_strtol(buf, 10, &temp))
-+ return -EINVAL;
-+
-+ temp = SENSORS_LIMIT(temp, -1, 10);
-+
-+ mutex_lock(&data->lock);
-+ data->num_temp_sensors = temp;
-+ if (temp < 0)
-+ data->temperatures_probed = 0;
-+ mutex_unlock(&data->lock);
-+
-+ return count;
-+}
-+
-+static ssize_t show_temp_max(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3xx_data *data = cy8c3xx_update_device(dev);
-+ return sprintf(buf, "%d\n", 1000 * data->temp_max[attr->index]);
-+}
-+
-+static ssize_t set_temp_max(struct device *dev,
-+ struct device_attribute *devattr,
-+ const char *buf,
-+ size_t count)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3xx_data *data = i2c_get_clientdata(client);
-+ long temp;
-+
-+ if (strict_strtol(buf, 10, &temp))
-+ return -EINVAL;
-+
-+ temp = DIV_ROUND_CLOSEST(temp, 1000);
-+ temp = SENSORS_LIMIT(temp, -128, 127);
-+
-+ mutex_lock(&data->lock);
-+ data->temp_max[attr->index] = temp;
-+ i2c_smbus_write_byte_data(client, CY8C3XX_TEMP_MAX_REG(attr->index),
-+ temp);
-+ mutex_unlock(&data->lock);
-+
-+ return count;
-+}
-+
-+static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3xx_data *data = cy8c3xx_update_device(dev);
-+ return sprintf(buf, "%d\n", 1000 * data->temp[attr->index]);
-+}
-+
-+static ssize_t show_fan_max(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3xx_data *data = cy8c3xx_update_device(dev);
-+
-+ if (FAN_DATA_VALID(data->fan_max[attr->index]))
-+ return sprintf(buf, "%d\n",
-+ data->fan_max[attr->index]);
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t set_fan_max(struct device *dev,
-+ struct device_attribute *devattr,
-+ const char *buf, size_t count)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3xx_data *data = i2c_get_clientdata(client);
-+ long rpm;
-+
-+ if (strict_strtol(buf, 10, &rpm) || !rpm)
-+ return -EINVAL;
-+
-+ rpm = SENSORS_LIMIT(rpm, 1, 65534);
-+
-+ mutex_lock(&data->lock);
-+ data->fan_max[attr->index] = rpm;
-+ cy8c3xx_write_word_data(client, CY8C3XX_REG_FAN_MAX(attr->index), rpm);
-+ mutex_unlock(&data->lock);
-+
-+ return count;
-+}
-+
-+/*
-+ * fan_min is a pure software concept, not implemented by hardware.
-+ * It is used to compute the alarm status.
-+ */
-+static ssize_t show_fan_min(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3xx_data *data = cy8c3xx_update_device(dev);
-+
-+ return sprintf(buf, "%d\n", data->fan_min[attr->index]);
-+}
-+
-+static ssize_t set_fan_min(struct device *dev,
-+ struct device_attribute *devattr,
-+ const char *buf, size_t count)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3xx_data *data = i2c_get_clientdata(client);
-+ long rpm;
-+
-+ if (strict_strtol(buf, 10, &rpm) || !rpm)
-+ return -EINVAL;
-+
-+ rpm = SENSORS_LIMIT(rpm, 1, 65534);
-+
-+ mutex_lock(&data->lock);
-+ data->fan_min[attr->index] = rpm;
-+ mutex_unlock(&data->lock);
-+
-+ return count;
-+}
-+
-+static ssize_t show_fan_target(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3xx_data *data = cy8c3xx_update_device(dev);
-+
-+ if (FAN_DATA_VALID(data->fan_tgt[attr->index]))
-+ return sprintf(buf, "%d\n",
-+ data->fan_tgt[attr->index]);
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t set_fan_target(struct device *dev,
-+ struct device_attribute *devattr,
-+ const char *buf, size_t count)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3xx_data *data = i2c_get_clientdata(client);
-+ long rpm;
-+
-+ if (strict_strtol(buf, 10, &rpm) || !rpm)
-+ return -EINVAL;
-+
-+ rpm = SENSORS_LIMIT(rpm, 1, 65534);
-+
-+ mutex_lock(&data->lock);
-+ data->fan_tgt[attr->index] = rpm;
-+ cy8c3xx_write_word_data(client, CY8C3XX_REG_FAN_TARGET(attr->index), rpm);
-+ mutex_unlock(&data->lock);
-+
-+ return count;
-+}
-+
-+/*
-+ * Show Fan Profile Settings
-+ */
-+static ssize_t show_fan_profile(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3xx_data *data = cy8c3xx_update_device(dev);
-+
-+ return sprintf(buf, "%u\n",
-+ data->fan_profile[attr->index]);
-+}
-+
-+/*
-+ * Set Fan Profile Settings
-+ */
-+static ssize_t set_fan_profile(struct device *dev,
-+ struct device_attribute *devattr,
-+ const char *buf, size_t count)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3xx_data *data = i2c_get_clientdata(client);
-+ long parm;
-+
-+ if (strict_strtoul(buf, 10, &parm))
-+ return -EINVAL;
-+
-+ parm = SENSORS_LIMIT(parm, 1, 65534);
-+
-+ mutex_lock(&data->lock);
-+ data->fan_profile[attr->index] = parm;
-+ cy8c3xx_write_word_data(client, CY8C3XX_REG_FAN_PROFILE(attr->index), parm);
-+ mutex_unlock(&data->lock);
-+
-+ return count;
-+}
-+
-+static ssize_t show_fan(struct device *dev, struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3xx_data *data = cy8c3xx_update_device(dev);
-+
-+ if (FAN_DATA_VALID(data->fan[attr->index]))
-+ return sprintf(buf, "%d\n", data->fan[attr->index]);
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t show_pwm(struct device *dev, struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3xx_data *data = cy8c3xx_update_device(dev);
-+ return sprintf(buf, "%d\n", data->pwm[attr->index]);
-+}
-+
-+static ssize_t set_pwm(struct device *dev, struct device_attribute *devattr,
-+ const char *buf, size_t count)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3xx_data *data = i2c_get_clientdata(client);
-+ long temp;
-+
-+ if (strict_strtol(buf, 10, &temp))
-+ return -EINVAL;
-+
-+ temp = SENSORS_LIMIT(temp, 0, 255);
-+
-+ mutex_lock(&data->lock);
-+ data->pwm[attr->index] = temp;
-+ i2c_smbus_write_byte_data(client, CY8C3XX_REG_PWM(attr->index), temp);
-+ mutex_unlock(&data->lock);
-+
-+ return count;
-+}
-+
-+static ssize_t show_fan_alarm_mask(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct cy8c3xx_data *data = cy8c3xx_update_device(dev);
-+ int i;
-+ u32 alarm_mask = 0;
-+
-+ for (i = 0; i < CY8C3XX_FAN_COUNT; i++)
-+ if ((data->fan[i] < data->fan_min[i]) ||
-+ (data->fan[i] >= data->fan_max[i]))
-+ alarm_mask |= 0x1 << i;
-+
-+ return sprintf(buf, "%x\n", alarm_mask);
-+}
-+
-+static ssize_t show_temp_alarm_mask(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct cy8c3xx_data *data = cy8c3xx_update_device(dev);
-+ int i;
-+ u32 alarm_mask = 0;
-+
-+ for (i = 0; i < CY8C3XX_TEMP_COUNT; i++)
-+ if (data->temp[i] >= data->temp_max[i])
-+ alarm_mask |= 0x1 << i;
-+
-+ return sprintf(buf, "%x\n", alarm_mask);
-+}
-+
-+static ssize_t show_fan_alarm(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3xx_data *data = cy8c3xx_update_device(dev);
-+
-+ if ((data->fan[attr->index] < data->fan_min[attr->index]) ||
-+ (data->fan[attr->index] >= data->fan_max[attr->index]))
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t show_temp_alarm(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3xx_data *data = cy8c3xx_update_device(dev);
-+
-+ if (data->temp[attr->index] >= data->temp_max[attr->index])
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t set_pwm_auto(struct device *dev,
-+ struct device_attribute *devattr,
-+ const char *buf,
-+ size_t count)
-+{
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3xx_data *data = i2c_get_clientdata(client);
-+ long temp;
-+
-+ if (strict_strtol(buf, 10, &temp))
-+ return -EINVAL;
-+
-+ if (!(temp > 0 && temp < 3))
-+ return -EINVAL;
-+
-+ mutex_lock(&data->lock);
-+ data->pwm_automatic = temp;
-+ i2c_smbus_write_byte_data(client, CY8C3XX_REG_PWM_CFG_BASE_ADDR, temp);
-+ mutex_unlock(&data->lock);
-+
-+ return count;
-+}
-+
-+static ssize_t show_pwm_auto(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct cy8c3xx_data *data = cy8c3xx_update_device(dev);
-+
-+ return sprintf(buf, "%d\n", data->pwm_automatic);
-+}
-+
-+#define CY8C3XX_REG_MIN 0x00
-+#define CY8C3XX_REG_MAX 0xe0
-+
-+static ssize_t show_debug(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct i2c_client *client = to_i2c_client(dev);
-+
-+ int len = 0, i, j;
-+ u8 val;
-+ for (i = 0; i < (CY8C3XX_REG_MAX - CY8C3XX_REG_MIN) / 16; i++) {
-+ len += sprintf(buf+len, "0x%02x: ", CY8C3XX_REG_MIN + (i * 16));
-+ for (j = 0; j < 16; j++) {
-+ val = i2c_smbus_read_byte_data(client, CY8C3XX_REG_MIN + (i * 16) + j);
-+ len += sprintf(buf+len, "%02x ", val);
-+ }
-+ len += sprintf(buf+len, "\n");
-+ }
-+ return len;
-+}
-+
-+static DEVICE_ATTR(fan_alarm_mask, S_IRUGO, show_fan_alarm_mask, NULL);
-+static DEVICE_ATTR(temp_alarm_mask, S_IRUGO, show_temp_alarm_mask, NULL);
-+static DEVICE_ATTR(num_temp_sensors, S_IWUSR | S_IRUGO, show_num_temp_sensors,
-+ set_num_temp_sensors);
-+static DEVICE_ATTR(auto_update_interval, S_IWUSR | S_IRUGO,
-+ show_auto_update_interval, set_auto_update_interval);
-+
-+static SENSOR_DEVICE_ATTR(temp1_max, S_IWUSR | S_IRUGO, show_temp_max,
-+ set_temp_max, 0);
-+static SENSOR_DEVICE_ATTR(temp2_max, S_IWUSR | S_IRUGO, show_temp_max,
-+ set_temp_max, 1);
-+static SENSOR_DEVICE_ATTR(temp3_max, S_IWUSR | S_IRUGO, show_temp_max,
-+ set_temp_max, 2);
-+static SENSOR_DEVICE_ATTR(temp4_max, S_IWUSR | S_IRUGO, show_temp_max,
-+ set_temp_max, 3);
-+static SENSOR_DEVICE_ATTR(temp5_max, S_IWUSR | S_IRUGO, show_temp_max,
-+ set_temp_max, 4);
-+
-+static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL, 0);
-+static SENSOR_DEVICE_ATTR(temp2_input, S_IRUGO, show_temp, NULL, 1);
-+static SENSOR_DEVICE_ATTR(temp3_input, S_IRUGO, show_temp, NULL, 2);
-+static SENSOR_DEVICE_ATTR(temp4_input, S_IRUGO, show_temp, NULL, 3);
-+static SENSOR_DEVICE_ATTR(temp5_input, S_IRUGO, show_temp, NULL, 4);
-+
-+static SENSOR_DEVICE_ATTR(temp1_alarm, S_IRUGO, show_temp_alarm, NULL, 0);
-+static SENSOR_DEVICE_ATTR(temp2_alarm, S_IRUGO, show_temp_alarm, NULL, 1);
-+static SENSOR_DEVICE_ATTR(temp3_alarm, S_IRUGO, show_temp_alarm, NULL, 2);
-+static SENSOR_DEVICE_ATTR(temp4_alarm, S_IRUGO, show_temp_alarm, NULL, 3);
-+static SENSOR_DEVICE_ATTR(temp5_alarm, S_IRUGO, show_temp_alarm, NULL, 4);
-+
-+static SENSOR_DEVICE_ATTR(fan1_max, S_IWUSR | S_IRUGO, show_fan_max,
-+ set_fan_max, 0);
-+static SENSOR_DEVICE_ATTR(fan2_max, S_IWUSR | S_IRUGO, show_fan_max,
-+ set_fan_max, 1);
-+static SENSOR_DEVICE_ATTR(fan3_max, S_IWUSR | S_IRUGO, show_fan_max,
-+ set_fan_max, 2);
-+static SENSOR_DEVICE_ATTR(fan4_max, S_IWUSR | S_IRUGO, show_fan_max,
-+ set_fan_max, 3);
-+static SENSOR_DEVICE_ATTR(fan5_max, S_IWUSR | S_IRUGO, show_fan_max,
-+ set_fan_max, 4);
-+static SENSOR_DEVICE_ATTR(fan6_max, S_IWUSR | S_IRUGO, show_fan_max,
-+ set_fan_max, 5);
-+static SENSOR_DEVICE_ATTR(fan7_max, S_IWUSR | S_IRUGO, show_fan_max,
-+ set_fan_max, 6);
-+static SENSOR_DEVICE_ATTR(fan8_max, S_IWUSR | S_IRUGO, show_fan_max,
-+ set_fan_max, 7);
-+
-+static SENSOR_DEVICE_ATTR(fan1_min, S_IWUSR | S_IRUGO, show_fan_min,
-+ set_fan_min, 0);
-+static SENSOR_DEVICE_ATTR(fan2_min, S_IWUSR | S_IRUGO, show_fan_min,
-+ set_fan_min, 1);
-+static SENSOR_DEVICE_ATTR(fan3_min, S_IWUSR | S_IRUGO, show_fan_min,
-+ set_fan_min, 2);
-+static SENSOR_DEVICE_ATTR(fan4_min, S_IWUSR | S_IRUGO, show_fan_min,
-+ set_fan_min, 3);
-+static SENSOR_DEVICE_ATTR(fan5_min, S_IWUSR | S_IRUGO, show_fan_min,
-+ set_fan_min, 4);
-+static SENSOR_DEVICE_ATTR(fan6_min, S_IWUSR | S_IRUGO, show_fan_min,
-+ set_fan_min, 5);
-+static SENSOR_DEVICE_ATTR(fan7_min, S_IWUSR | S_IRUGO, show_fan_min,
-+ set_fan_min, 6);
-+static SENSOR_DEVICE_ATTR(fan8_min, S_IWUSR | S_IRUGO, show_fan_min,
-+ set_fan_min, 7);
-+
-+static SENSOR_DEVICE_ATTR(fan1_target, S_IWUSR | S_IRUGO, show_fan_target,
-+ set_fan_target, 0);
-+static SENSOR_DEVICE_ATTR(fan2_target, S_IWUSR | S_IRUGO, show_fan_target,
-+ set_fan_target, 1);
-+static SENSOR_DEVICE_ATTR(fan3_target, S_IWUSR | S_IRUGO, show_fan_target,
-+ set_fan_target, 2);
-+static SENSOR_DEVICE_ATTR(fan4_target, S_IWUSR | S_IRUGO, show_fan_target,
-+ set_fan_target, 3);
-+static SENSOR_DEVICE_ATTR(fan5_target, S_IWUSR | S_IRUGO, show_fan_target,
-+ set_fan_target, 4);
-+static SENSOR_DEVICE_ATTR(fan6_target, S_IWUSR | S_IRUGO, show_fan_target,
-+ set_fan_target, 5);
-+static SENSOR_DEVICE_ATTR(fan7_target, S_IWUSR | S_IRUGO, show_fan_target,
-+ set_fan_target, 6);
-+static SENSOR_DEVICE_ATTR(fan8_target, S_IWUSR | S_IRUGO, show_fan_target,
-+ set_fan_target, 7);
-+
-+#define FAN_PROFILE_ATTR(_name, _index) \
-+ SENSOR_DEVICE_ATTR(_name, S_IWUSR | S_IRUGO, \
-+ show_fan_profile, set_fan_profile, _index)
-+
-+static FAN_PROFILE_ATTR(fan_low_duty, CY8C3XX_FAN_PROFILE_LOW_DUTY);
-+static FAN_PROFILE_ATTR(fan_low_rpm, CY8C3XX_FAN_PROFILE_LOW_RPM);
-+static FAN_PROFILE_ATTR(fan_high_duty, CY8C3XX_FAN_PROFILE_HIGH_DUTY);
-+static FAN_PROFILE_ATTR(fan_high_rpm, CY8C3XX_FAN_PROFILE_HIGH_RPM);
-+static FAN_PROFILE_ATTR(fan_speed_0_duty, CY8C3XX_FAN_PROFILE_SPEED_0_DUTY);
-+static FAN_PROFILE_ATTR(fan_speed_100_duty,CY8C3XX_FAN_PROFILE_SPEED_100_DUTY);
-+
-+static SENSOR_DEVICE_ATTR(fan1_input, S_IRUGO, show_fan, NULL, 0);
-+static SENSOR_DEVICE_ATTR(fan2_input, S_IRUGO, show_fan, NULL, 1);
-+static SENSOR_DEVICE_ATTR(fan3_input, S_IRUGO, show_fan, NULL, 2);
-+static SENSOR_DEVICE_ATTR(fan4_input, S_IRUGO, show_fan, NULL, 3);
-+static SENSOR_DEVICE_ATTR(fan5_input, S_IRUGO, show_fan, NULL, 4);
-+static SENSOR_DEVICE_ATTR(fan6_input, S_IRUGO, show_fan, NULL, 5);
-+static SENSOR_DEVICE_ATTR(fan7_input, S_IRUGO, show_fan, NULL, 6);
-+static SENSOR_DEVICE_ATTR(fan8_input, S_IRUGO, show_fan, NULL, 7);
-+
-+static SENSOR_DEVICE_ATTR(fan1_alarm, S_IRUGO, show_fan_alarm, NULL, 0);
-+static SENSOR_DEVICE_ATTR(fan2_alarm, S_IRUGO, show_fan_alarm, NULL, 1);
-+static SENSOR_DEVICE_ATTR(fan3_alarm, S_IRUGO, show_fan_alarm, NULL, 2);
-+static SENSOR_DEVICE_ATTR(fan4_alarm, S_IRUGO, show_fan_alarm, NULL, 3);
-+static SENSOR_DEVICE_ATTR(fan5_alarm, S_IRUGO, show_fan_alarm, NULL, 4);
-+static SENSOR_DEVICE_ATTR(fan6_alarm, S_IRUGO, show_fan_alarm, NULL, 5);
-+static SENSOR_DEVICE_ATTR(fan7_alarm, S_IRUGO, show_fan_alarm, NULL, 6);
-+static SENSOR_DEVICE_ATTR(fan8_alarm, S_IRUGO, show_fan_alarm, NULL, 7);
-+
-+static SENSOR_DEVICE_ATTR(pwm1, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 0);
-+static SENSOR_DEVICE_ATTR(pwm2, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 1);
-+static SENSOR_DEVICE_ATTR(pwm3, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 2);
-+static SENSOR_DEVICE_ATTR(pwm4, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 3);
-+static SENSOR_DEVICE_ATTR(pwm5, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 4);
-+static SENSOR_DEVICE_ATTR(pwm6, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 5);
-+static SENSOR_DEVICE_ATTR(pwm7, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 6);
-+static SENSOR_DEVICE_ATTR(pwm8, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 7);
-+
-+static SENSOR_DEVICE_ATTR(pwm1_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
-+ set_pwm_auto, 0);
-+static SENSOR_DEVICE_ATTR(pwm2_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
-+ set_pwm_auto, 0);
-+static SENSOR_DEVICE_ATTR(pwm3_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
-+ set_pwm_auto, 0);
-+static SENSOR_DEVICE_ATTR(pwm4_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
-+ set_pwm_auto, 0);
-+static SENSOR_DEVICE_ATTR(pwm5_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
-+ set_pwm_auto, 0);
-+static SENSOR_DEVICE_ATTR(pwm6_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
-+ set_pwm_auto, 0);
-+static SENSOR_DEVICE_ATTR(pwm7_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
-+ set_pwm_auto, 0);
-+static SENSOR_DEVICE_ATTR(pwm8_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
-+ set_pwm_auto, 0);
-+
-+static SENSOR_DEVICE_ATTR(debug, S_IRUGO, show_debug, NULL, 0);
-+
-+static struct attribute *cy8c3xx_attr[] =
-+{
-+ &dev_attr_fan_alarm_mask.attr,
-+ &dev_attr_temp_alarm_mask.attr,
-+ &dev_attr_num_temp_sensors.attr,
-+ &dev_attr_auto_update_interval.attr,
-+ &sensor_dev_attr_temp1_max.dev_attr.attr,
-+ &sensor_dev_attr_temp2_max.dev_attr.attr,
-+ &sensor_dev_attr_temp3_max.dev_attr.attr,
-+ &sensor_dev_attr_temp4_max.dev_attr.attr,
-+ &sensor_dev_attr_temp5_max.dev_attr.attr,
-+ &sensor_dev_attr_temp1_input.dev_attr.attr,
-+ &sensor_dev_attr_temp2_input.dev_attr.attr,
-+ &sensor_dev_attr_temp3_input.dev_attr.attr,
-+ &sensor_dev_attr_temp4_input.dev_attr.attr,
-+ &sensor_dev_attr_temp5_input.dev_attr.attr,
-+ &sensor_dev_attr_temp1_alarm.dev_attr.attr,
-+ &sensor_dev_attr_temp2_alarm.dev_attr.attr,
-+ &sensor_dev_attr_temp3_alarm.dev_attr.attr,
-+ &sensor_dev_attr_temp4_alarm.dev_attr.attr,
-+ &sensor_dev_attr_temp5_alarm.dev_attr.attr,
-+ &sensor_dev_attr_fan1_max.dev_attr.attr,
-+ &sensor_dev_attr_fan2_max.dev_attr.attr,
-+ &sensor_dev_attr_fan3_max.dev_attr.attr,
-+ &sensor_dev_attr_fan4_max.dev_attr.attr,
-+ &sensor_dev_attr_fan5_max.dev_attr.attr,
-+ &sensor_dev_attr_fan6_max.dev_attr.attr,
-+ &sensor_dev_attr_fan7_max.dev_attr.attr,
-+ &sensor_dev_attr_fan8_max.dev_attr.attr,
-+ &sensor_dev_attr_fan1_min.dev_attr.attr,
-+ &sensor_dev_attr_fan2_min.dev_attr.attr,
-+ &sensor_dev_attr_fan3_min.dev_attr.attr,
-+ &sensor_dev_attr_fan4_min.dev_attr.attr,
-+ &sensor_dev_attr_fan5_min.dev_attr.attr,
-+ &sensor_dev_attr_fan6_min.dev_attr.attr,
-+ &sensor_dev_attr_fan7_min.dev_attr.attr,
-+ &sensor_dev_attr_fan8_min.dev_attr.attr,
-+ &sensor_dev_attr_fan1_target.dev_attr.attr,
-+ &sensor_dev_attr_fan2_target.dev_attr.attr,
-+ &sensor_dev_attr_fan3_target.dev_attr.attr,
-+ &sensor_dev_attr_fan4_target.dev_attr.attr,
-+ &sensor_dev_attr_fan5_target.dev_attr.attr,
-+ &sensor_dev_attr_fan6_target.dev_attr.attr,
-+ &sensor_dev_attr_fan7_target.dev_attr.attr,
-+ &sensor_dev_attr_fan8_target.dev_attr.attr,
-+ &sensor_dev_attr_fan1_input.dev_attr.attr,
-+ &sensor_dev_attr_fan2_input.dev_attr.attr,
-+ &sensor_dev_attr_fan3_input.dev_attr.attr,
-+ &sensor_dev_attr_fan4_input.dev_attr.attr,
-+ &sensor_dev_attr_fan5_input.dev_attr.attr,
-+ &sensor_dev_attr_fan6_input.dev_attr.attr,
-+ &sensor_dev_attr_fan7_input.dev_attr.attr,
-+ &sensor_dev_attr_fan8_input.dev_attr.attr,
-+ &sensor_dev_attr_fan1_alarm.dev_attr.attr,
-+ &sensor_dev_attr_fan2_alarm.dev_attr.attr,
-+ &sensor_dev_attr_fan3_alarm.dev_attr.attr,
-+ &sensor_dev_attr_fan4_alarm.dev_attr.attr,
-+ &sensor_dev_attr_fan5_alarm.dev_attr.attr,
-+ &sensor_dev_attr_fan6_alarm.dev_attr.attr,
-+ &sensor_dev_attr_fan7_alarm.dev_attr.attr,
-+ &sensor_dev_attr_fan8_alarm.dev_attr.attr,
-+ &sensor_dev_attr_pwm1.dev_attr.attr,
-+ &sensor_dev_attr_pwm2.dev_attr.attr,
-+ &sensor_dev_attr_pwm3.dev_attr.attr,
-+ &sensor_dev_attr_pwm4.dev_attr.attr,
-+ &sensor_dev_attr_pwm5.dev_attr.attr,
-+ &sensor_dev_attr_pwm6.dev_attr.attr,
-+ &sensor_dev_attr_pwm7.dev_attr.attr,
-+ &sensor_dev_attr_pwm8.dev_attr.attr,
-+ &sensor_dev_attr_pwm1_enable.dev_attr.attr,
-+ &sensor_dev_attr_pwm2_enable.dev_attr.attr,
-+ &sensor_dev_attr_pwm3_enable.dev_attr.attr,
-+ &sensor_dev_attr_pwm4_enable.dev_attr.attr,
-+ &sensor_dev_attr_pwm5_enable.dev_attr.attr,
-+ &sensor_dev_attr_pwm6_enable.dev_attr.attr,
-+ &sensor_dev_attr_pwm7_enable.dev_attr.attr,
-+ &sensor_dev_attr_pwm8_enable.dev_attr.attr,
-+ &sensor_dev_attr_fan_low_duty.dev_attr.attr,
-+ &sensor_dev_attr_fan_low_rpm.dev_attr.attr,
-+ &sensor_dev_attr_fan_high_duty.dev_attr.attr,
-+ &sensor_dev_attr_fan_high_rpm.dev_attr.attr,
-+ &sensor_dev_attr_fan_speed_0_duty.dev_attr.attr,
-+ &sensor_dev_attr_fan_speed_100_duty.dev_attr.attr,
-+ &sensor_dev_attr_debug.dev_attr.attr,
-+ NULL
-+};
-+
-+/* Return 0 if detection is successful, -ENODEV otherwise */
-+static int cy8c3xx_detect(struct i2c_client *client,
-+ struct i2c_board_info *info)
-+{
-+ struct i2c_adapter *adapter = client->adapter;
-+ int vendor, device, revision;
-+
-+ if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
-+ return -ENODEV;
-+
-+ vendor = i2c_smbus_read_byte_data(client, CY8C3XX_REG_COMPANY_ID);
-+ printk(KERN_INFO "vendor = %u\n", vendor);
-+ if (vendor != CY8C3XX_COMPANY_ID)
-+ return -ENODEV;
-+
-+ device = i2c_smbus_read_byte_data(client, CY8C3XX_REG_DEV_ID);
-+ printk(KERN_INFO "device = %u\n", device);
-+ if (device != CY8C3XX_DEV_ID)
-+ return -ENODEV;
-+
-+ revision = i2c_smbus_read_byte_data(client, CY8C3XX_REG_FW_REV_MAJ);
-+ printk(KERN_INFO "rev = %u\n", revision);
-+ if (revision != CY8C3XX_FW_REV_MAJ)
-+ return -ENODEV;
-+
-+ strlcpy(info->type, "cy8c3xx", I2C_NAME_SIZE);
-+
-+ printk(KERN_INFO "cy8c3xx detected\n");
-+ return 0;
-+}
-+
-+static int cy8c3xx_probe(struct i2c_client *client,
-+ const struct i2c_device_id *id)
-+{
-+ struct cy8c3xx_data *data;
-+ int err;
-+
-+ data = kzalloc(sizeof(struct cy8c3xx_data), GFP_KERNEL);
-+ if (!data) {
-+ err = -ENOMEM;
-+ goto exit;
-+ }
-+
-+ data->num_temp_sensors = -1;
-+ data->auto_update_interval = AUTO_UPDATE_INTERVAL;
-+
-+ i2c_set_clientdata(client, data);
-+ mutex_init(&data->lock);
-+
-+ dev_info(&client->dev, "%s chip found\n", client->name);
-+
-+ /* Register sysfs hooks */
-+ data->attrs.attrs = cy8c3xx_attr;
-+ if ((err = sysfs_create_group(&client->dev.kobj, &data->attrs)))
-+ goto exit_free;
-+
-+ data->hwmon_dev = hwmon_device_register(&client->dev);
-+ if (IS_ERR(data->hwmon_dev)) {
-+ err = PTR_ERR(data->hwmon_dev);
-+ goto exit_remove;
-+ }
-+
-+ init_completion(&data->auto_update_stop);
-+ data->auto_update = kthread_run(cy8c3xx_update_thread, client,
-+ dev_name(data->hwmon_dev));
-+ if (IS_ERR(data->auto_update)) {
-+ err = PTR_ERR(data->auto_update);
-+ goto exit_unregister;
-+ }
-+
-+ return 0;
-+
-+exit_unregister:
-+ hwmon_device_unregister(data->hwmon_dev);
-+exit_remove:
-+ sysfs_remove_group(&client->dev.kobj, &data->attrs);
-+exit_free:
-+ kfree(data);
-+exit:
-+ return err;
-+}
-+
-+static int cy8c3xx_remove(struct i2c_client *client)
-+{
-+ struct cy8c3xx_data *data = i2c_get_clientdata(client);
-+
-+ kthread_stop(data->auto_update);
-+ wait_for_completion(&data->auto_update_stop);
-+ hwmon_device_unregister(data->hwmon_dev);
-+ sysfs_remove_group(&client->dev.kobj, &data->attrs);
-+ kfree(data);
-+ return 0;
-+}
-+
-+static int __init cy8c3xx_init(void)
-+{
-+ return i2c_add_driver(&cy8c3xx_driver);
-+}
-+
-+static void __exit cy8c3xx_exit(void)
-+{
-+ i2c_del_driver(&cy8c3xx_driver);
-+}
-+
-+MODULE_AUTHOR("Shrijeet Mukherjee ");
-+MODULE_DESCRIPTION("CY8C3XX driver");
-+MODULE_LICENSE("GPL");
-+
-+module_init(cy8c3xx_init);
-+module_exit(cy8c3xx_exit);
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-cy8c3245r1-hwmon.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-cy8c3245r1-hwmon.patch
deleted file mode 100644
index 7009f35c..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-cy8c3245r1-hwmon.patch
+++ /dev/null
@@ -1,1127 +0,0 @@
-Driver for updated PSoc CY8C3245 on Quanta LY6
-
-diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
-index 7e7cdf6..fe87335 100644
---- a/drivers/hwmon/Kconfig
-+++ b/drivers/hwmon/Kconfig
-@@ -303,6 +303,15 @@ config SENSORS_CY8CXX
- This driver can also be built as a module. If so, the module
- will be called cy8cxx.
-
-+config SENSORS_CY8C3245R1
-+ tristate "Cypress Semiconductor CY8C3245R1"
-+ depends on I2C
-+ help
-+ If you say yes here you get support for Cypress Semiconductor
-+ CY8C3245 first revision sensor chips.
-+
-+ This driver can also be built as a module. If so, the module
-+ will be called cy8c3245r1.
-
- config SENSORS_DS620
- tristate "Dallas Semiconductor DS620"
-diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
-index 5e22567..cf7f0b8 100644
---- a/drivers/hwmon/Makefile
-+++ b/drivers/hwmon/Makefile
-@@ -43,6 +43,7 @@ obj-$(CONFIG_SENSORS_ASC7621) += asc7621.o
- obj-$(CONFIG_SENSORS_ATXP1) += atxp1.o
- obj-$(CONFIG_SENSORS_CORETEMP) += coretemp.o
- obj-$(CONFIG_SENSORS_CY8CXX) += cy8cxx.o
-+obj-$(CONFIG_SENSORS_CY8C3245R1) += cy8c3245r1.o
- obj-$(CONFIG_SENSORS_DME1737) += dme1737.o
- obj-$(CONFIG_SENSORS_DS620) += ds620.o
- obj-$(CONFIG_SENSORS_DS1621) += ds1621.o
-diff --git a/drivers/hwmon/cy8c3245r1.c b/drivers/hwmon/cy8c3245r1.c
-new file mode 100644
-index 0000000..0f4f4d1
---- /dev/null
-+++ b/drivers/hwmon/cy8c3245r1.c
-@@ -0,0 +1,1087 @@
-+/*
-+ * A hwmon driver for the Cypress Semiconductor C3245
-+ * Copyright (C) 2014 Cumulus Networks
-+ *
-+ * Author: Shrijeet Mukherjee
-+ * Author: Vidya Ravipati
-+ *
-+ * Based on the adt7470 driver
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+ */
-+
-+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-+
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+
-+/* cy8c3245r1 registers */
-+#define CY8C3245R1_REG_BASE_ADDR 0x00
-+#define CY8C3245R1_REG_DEV_ID 0x09
-+#define CY8C3245R1_REG_COMPANY_ID 0x05
-+#define CY8C3245R1_REG_FW_REV_MAJ 0x06
-+#define CY8C3245R1_REG_FW_REV_MIN 0x07
-+#define CY8C3245R1_REG_RESET 0x08
-+
-+/*
-+ * Fan PWM / RPM Profile control registers
-+ *
-+ * These registers consist of two-bytes each
-+ */
-+#define CY8C3245R1_REG_FAN_PROFILE_BASE_ADDR 0x10
-+#define CY8C3245R1_REG_FAN_PROFILE(x) (CY8C3245R1_REG_FAN_PROFILE_BASE_ADDR + ((x) * 2))
-+enum {
-+ CY8C3245R1_FAN_PROFILE_LOW_DUTY = 0,
-+ CY8C3245R1_FAN_PROFILE_LOW_RPM,
-+ CY8C3245R1_FAN_PROFILE_HIGH_DUTY,
-+ CY8C3245R1_FAN_PROFILE_HIGH_RPM,
-+ CY8C3245R1_FAN_PROFILE_SPEED_0_DUTY,
-+ CY8C3245R1_FAN_PROFILE_SPEED_100_DUTY,
-+ CY8C3245R1_FAN_PROFILE_MAX
-+};
-+
-+/* skipping over regs to set */
-+
-+#define CY8C3245R1_REG_TEMP_BASE_ADDR 0x20
-+
-+#define CY8C3245R1_REG_FAN_BASE_ADDR 0x40
-+#define CY8C3245R1_REG_FAN_TARGET_BASE_ADDR 0x3E
-+
-+#define CY8C3245R1_REG_PWM_BASE_ADDR 0x3C
-+
-+#define CY8C3245R1_REG_TEMP_LIMITS_BASE_ADDR 0x20
-+#define CY8C3245R1_REG_TEMP_LIMITS_MAX_ADDR 0x28
-+
-+#define CY8C3245R1_REG_FAN_MAX_BASE_ADDR 0x16
-+
-+#define CY8C3245R1_REG_PWM_CFG_BASE_ADDR 0x33
-+
-+#define CY8C3245R1_TEMP_COUNT 8
-+#define CY8C3245R1_TEMP_REG(x) (CY8C3245R1_REG_TEMP_BASE_ADDR + (x))
-+#define CY8C3245R1_TEMP_MAX_REG(x) (CY8C3245R1_REG_TEMP_LIMITS_MAX_ADDR + (x))
-+
-+#define CY8C3245R1_FAN_COUNT 8
-+#define CY8C3245R1_REG_FAN(x) (CY8C3245R1_REG_FAN_BASE_ADDR + ((x) * 2))
-+
-+#define CY8C3245R1_REG_FAN_MIN(x) (CY8C3245R1_REG_FAN_MIN_BASE_ADDR + ((x) * 2))
-+#define CY8C3245R1_REG_FAN_MAX(x) (CY8C3245R1_REG_FAN_MAX_BASE_ADDR)
-+#define CY8C3245R1_REG_FAN_TARGET (CY8C3245R1_REG_FAN_TARGET_BASE_ADDR)
-+
-+#define CY8C3245R1_PWM_COUNT 1
-+#define CY8C3245R1_REG_PWM (CY8C3245R1_REG_PWM_BASE_ADDR)
-+
-+#define CY8C3245R1_COMPANY_ID 0xCC
-+#define CY8C3245R1_DEV_ID 0x09
-+#define CY8C3245R1_FW_REV_MAJ 0x02
-+#define CY8C3245R1_FW_REV_MIN 0x03
-+
-+/* "all temps" according to hwmon sysfs interface spec */
-+#define CY8C3245R1_PWM_ALL_TEMPS 0x3FF
-+
-+/* How often do we reread sensors values? (In jiffies) */
-+#define SENSOR_REFRESH_INTERVAL (5 * HZ)
-+
-+/* How often do we reread sensor limit values? (In jiffies) */
-+#define LIMIT_REFRESH_INTERVAL (60 * HZ)
-+
-+/* Wait at least 200ms per sensor for 10 sensors */
-+#define TEMP_COLLECTION_TIME 2000
-+
-+/* auto update thing won't fire more than every 2s */
-+#define AUTO_UPDATE_INTERVAL 2000
-+
-+/* datasheet says to divide this number by the fan reading to get fan rpm */
-+#define FAN_PERIOD_INVALID 65535
-+#define FAN_DATA_VALID(x) ((x) && (x) != FAN_PERIOD_INVALID)
-+
-+struct cy8c3245r1_data {
-+ struct device *hwmon_dev;
-+ struct attribute_group attrs;
-+ struct mutex lock;
-+ char sensors_valid;
-+ char limits_valid;
-+ unsigned long sensors_last_updated; /* In jiffies */
-+ unsigned long limits_last_updated; /* In jiffies */
-+
-+ int num_temp_sensors; /* -1 = probe */
-+ int temperatures_probed;
-+
-+ s8 temp[CY8C3245R1_TEMP_COUNT];
-+ s8 temp_max[CY8C3245R1_TEMP_COUNT];
-+ u16 fan[CY8C3245R1_FAN_COUNT];
-+ u16 fan_max[CY8C3245R1_FAN_COUNT];
-+ u16 fan_min[CY8C3245R1_FAN_COUNT];
-+ u16 fan_tgt;
-+ u16 fan_profile[CY8C3245R1_FAN_PROFILE_MAX];
-+ u8 fan_alarm;
-+ u8 temp_alarm;
-+ u8 force_pwm_max;
-+ u8 pwm;
-+ u8 pwm_automatic;
-+ struct task_struct *auto_update;
-+ struct completion auto_update_stop;
-+ unsigned int auto_update_interval;
-+};
-+
-+static int cy8c3245r1_probe(struct i2c_client *client,
-+ const struct i2c_device_id *id);
-+static int cy8c3245r1_remove(struct i2c_client *client);
-+
-+static const struct i2c_device_id cy8c3245r1_id[] = {
-+ { "CY8C3245R1", 0 },
-+ { }
-+};
-+MODULE_DEVICE_TABLE(i2c, cy8c3245r1_id);
-+
-+static struct i2c_driver cy8c3245r1_driver = {
-+ .class = I2C_CLASS_HWMON,
-+ .driver = {
-+ .name = "cy8c3245r1",
-+ },
-+ .probe = cy8c3245r1_probe,
-+ .remove = cy8c3245r1_remove,
-+ .id_table = cy8c3245r1_id,
-+};
-+
-+/*
-+ * 16-bit registers on the CY8C3245R1 are high-byte first.
-+ */
-+static inline int cy8c3245r1_read_word_data(struct i2c_client *client, u8 reg)
-+{
-+ s32 rc;
-+ u16 val;
-+
-+ /* read high byte */
-+ rc = i2c_smbus_read_byte_data(client, reg);
-+ if (rc < 0) {
-+ dev_warn(&client->dev, "i2c read failed: 0x%02x, errno %d\n",
-+ reg, -rc);
-+ return rc;
-+ }
-+ val = ((u16)rc & 0xFF) << 8;
-+
-+ /* read low byte */
-+ rc = i2c_smbus_read_byte_data(client, reg + 1);
-+ if (rc < 0) {
-+ dev_warn(&client->dev, "i2c read failed: 0x%02x, errno %d\n",
-+ reg + 1, -rc);
-+ return rc;
-+ }
-+ val |= (u16)rc & 0xFF;
-+
-+ return val;
-+}
-+
-+static inline int cy8c3245r1_write_word_data(struct i2c_client *client,
-+ u8 reg,
-+ u16 value)
-+{
-+ s32 rc;
-+
-+ /* write high byte */
-+ rc = i2c_smbus_write_byte_data(client, reg, value >> 8);
-+ if (rc < 0) {
-+ dev_warn(&client->dev,
-+ "i2c write failed: 0x%02x: 0x%02x, errno %d\n",
-+ reg, value >> 8, -rc);
-+ return rc;
-+ }
-+
-+ /* write low byte */
-+ rc = i2c_smbus_write_byte_data(client, reg + 1, value & 0xFF);
-+ if (rc < 0) {
-+ dev_warn(&client->dev,
-+ "i2c write failed: 0x%02x: 0x%02x, errno %d\n",
-+ reg + 1, value & 0xFF, -rc);
-+ return rc;
-+ }
-+
-+ return rc;
-+}
-+
-+static void cy8c3245r1_init_client(struct i2c_client *client)
-+{
-+ int reg = i2c_smbus_read_byte_data(client, CY8C3245R1_REG_PWM_CFG_BASE_ADDR);
-+
-+ if (reg < 0) {
-+ dev_err(&client->dev, "cannot read configuration register\n");
-+ } else {
-+ i2c_smbus_write_byte_data(client, CY8C3245R1_REG_PWM_CFG_BASE_ADDR, 0);
-+ }
-+}
-+
-+/* Probe for temperature sensors. Assumes lock is held */
-+static int cy8c3245r1_read_temperatures(struct i2c_client *client,
-+ struct cy8c3245r1_data *data)
-+{
-+ int i;
-+
-+ /* Only count fans if we have to */
-+ if (data->num_temp_sensors >= 0)
-+ return 0;
-+
-+ for (i = 0; i < CY8C3245R1_TEMP_COUNT; i++) {
-+ data->temp[i] = i2c_smbus_read_byte_data(client,
-+ CY8C3245R1_TEMP_REG(i));
-+ if (data->temp[i])
-+ data->num_temp_sensors = i + 1;
-+ }
-+ data->temperatures_probed = 1;
-+ return 0;
-+}
-+
-+static int cy8c3245r1_update_thread(void *p)
-+{
-+ struct i2c_client *client = p;
-+ struct cy8c3245r1_data *data = i2c_get_clientdata(client);
-+
-+ while (!kthread_should_stop()) {
-+ mutex_lock(&data->lock);
-+ cy8c3245r1_read_temperatures(client, data);
-+ mutex_unlock(&data->lock);
-+ if (kthread_should_stop())
-+ break;
-+ msleep_interruptible(data->auto_update_interval);
-+ }
-+
-+ complete_all(&data->auto_update_stop);
-+ return 0;
-+}
-+
-+static struct cy8c3245r1_data *cy8c3245r1_update_device(struct device *dev)
-+{
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3245r1_data *data = i2c_get_clientdata(client);
-+ unsigned long local_jiffies = jiffies;
-+ int i;
-+ int need_sensors = 1;
-+ int need_limits = 1;
-+
-+ /*
-+ * Figure out if we need to update the shadow registers.
-+ * Lockless means that we may occasionally report out of
-+ * date data.
-+ */
-+ if (time_before(local_jiffies, data->sensors_last_updated +
-+ SENSOR_REFRESH_INTERVAL) &&
-+ data->sensors_valid)
-+ need_sensors = 0;
-+
-+ if (time_before(local_jiffies, data->limits_last_updated +
-+ LIMIT_REFRESH_INTERVAL) &&
-+ data->limits_valid)
-+ need_limits = 0;
-+
-+ if (!need_sensors && !need_limits)
-+ return data;
-+
-+ mutex_lock(&data->lock);
-+ if (!need_sensors)
-+ goto no_sensor_update;
-+
-+ if (!data->temperatures_probed)
-+ cy8c3245r1_read_temperatures(client, data);
-+ else
-+ for (i = 0; i < CY8C3245R1_TEMP_COUNT; i++)
-+ data->temp[i] = i2c_smbus_read_byte_data(client,
-+ CY8C3245R1_TEMP_REG(i));
-+
-+ for (i = 0; i < CY8C3245R1_FAN_COUNT; i++) {
-+ data->fan[i] = cy8c3245r1_read_word_data(client,
-+ CY8C3245R1_REG_FAN(i));
-+ }
-+
-+ data->pwm = i2c_smbus_read_byte_data(client,
-+ CY8C3245R1_REG_PWM);
-+
-+ data->sensors_last_updated = local_jiffies;
-+ data->sensors_valid = 1;
-+
-+no_sensor_update:
-+ if (!need_limits)
-+ goto out;
-+
-+ for (i = 0; i < CY8C3245R1_TEMP_COUNT; i++) {
-+ data->temp_max[i] = i2c_smbus_read_byte_data(client,
-+ CY8C3245R1_TEMP_MAX_REG(i));
-+ }
-+
-+ for (i = 0; i < CY8C3245R1_FAN_COUNT; i++) {
-+ data->fan_max[i] = cy8c3245r1_read_word_data(client,
-+ CY8C3245R1_REG_FAN_MAX(i));
-+ }
-+ data->fan_tgt = cy8c3245r1_read_word_data(client,
-+ CY8C3245R1_REG_FAN_TARGET);
-+
-+ for (i = 0; i < CY8C3245R1_FAN_PROFILE_MAX; i++) {
-+ data->fan_profile[i] = cy8c3245r1_read_word_data(client,
-+ CY8C3245R1_REG_FAN_PROFILE(i));
-+ }
-+
-+ data->limits_last_updated = local_jiffies;
-+ data->limits_valid = 1;
-+
-+out:
-+ mutex_unlock(&data->lock);
-+ return data;
-+}
-+
-+static ssize_t show_auto_update_interval(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct cy8c3245r1_data *data = cy8c3245r1_update_device(dev);
-+ return sprintf(buf, "%d\n", data->auto_update_interval);
-+}
-+
-+static ssize_t set_auto_update_interval(struct device *dev,
-+ struct device_attribute *devattr,
-+ const char *buf,
-+ size_t count)
-+{
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3245r1_data *data = i2c_get_clientdata(client);
-+ long temp;
-+
-+ if (strict_strtol(buf, 10, &temp))
-+ return -EINVAL;
-+
-+ temp = SENSORS_LIMIT(temp, 0, 60000);
-+
-+ mutex_lock(&data->lock);
-+ data->auto_update_interval = temp;
-+ mutex_unlock(&data->lock);
-+
-+ return count;
-+}
-+
-+static ssize_t show_num_temp_sensors(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct cy8c3245r1_data *data = cy8c3245r1_update_device(dev);
-+ return sprintf(buf, "%d\n", data->num_temp_sensors);
-+}
-+
-+static ssize_t set_num_temp_sensors(struct device *dev,
-+ struct device_attribute *devattr,
-+ const char *buf,
-+ size_t count)
-+{
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3245r1_data *data = i2c_get_clientdata(client);
-+ long temp;
-+
-+ if (strict_strtol(buf, 10, &temp))
-+ return -EINVAL;
-+
-+ temp = SENSORS_LIMIT(temp, -1, 10);
-+
-+ mutex_lock(&data->lock);
-+ data->num_temp_sensors = temp;
-+ if (temp < 0)
-+ data->temperatures_probed = 0;
-+ mutex_unlock(&data->lock);
-+
-+ return count;
-+}
-+
-+static ssize_t show_temp_max(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3245r1_data *data = cy8c3245r1_update_device(dev);
-+ return sprintf(buf, "%d\n", 1000 * data->temp_max[attr->index]);
-+}
-+
-+static ssize_t set_temp_max(struct device *dev,
-+ struct device_attribute *devattr,
-+ const char *buf,
-+ size_t count)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3245r1_data *data = i2c_get_clientdata(client);
-+ long temp;
-+
-+ if (strict_strtol(buf, 10, &temp))
-+ return -EINVAL;
-+
-+ temp = DIV_ROUND_CLOSEST(temp, 1000);
-+ temp = SENSORS_LIMIT(temp, -128, 127);
-+
-+ mutex_lock(&data->lock);
-+ data->temp_max[attr->index] = temp;
-+ i2c_smbus_write_byte_data(client, CY8C3245R1_TEMP_MAX_REG(attr->index),
-+ temp);
-+ mutex_unlock(&data->lock);
-+
-+ return count;
-+}
-+
-+static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3245r1_data *data = cy8c3245r1_update_device(dev);
-+ return sprintf(buf, "%d\n", 1000 * data->temp[attr->index]);
-+}
-+
-+static ssize_t show_fan_max(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3245r1_data *data = cy8c3245r1_update_device(dev);
-+
-+ if (FAN_DATA_VALID(data->fan_max[attr->index]))
-+ return sprintf(buf, "%d\n",
-+ data->fan_max[attr->index]);
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t set_fan_max(struct device *dev,
-+ struct device_attribute *devattr,
-+ const char *buf, size_t count)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3245r1_data *data = i2c_get_clientdata(client);
-+ long rpm;
-+
-+ if (strict_strtol(buf, 10, &rpm) || !rpm)
-+ return -EINVAL;
-+
-+ rpm = SENSORS_LIMIT(rpm, 1, 65534);
-+
-+ mutex_lock(&data->lock);
-+ data->fan_max[attr->index] = rpm;
-+ cy8c3245r1_write_word_data(client, CY8C3245R1_REG_FAN_MAX(attr->index), rpm);
-+ mutex_unlock(&data->lock);
-+
-+ return count;
-+}
-+
-+/*
-+ * fan_min is a pure software concept, not implemented by hardware.
-+ * It is used to compute the alarm status.
-+ */
-+static ssize_t show_fan_min(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3245r1_data *data = cy8c3245r1_update_device(dev);
-+
-+ return sprintf(buf, "%d\n", data->fan_min[attr->index]);
-+}
-+
-+static ssize_t set_fan_min(struct device *dev,
-+ struct device_attribute *devattr,
-+ const char *buf, size_t count)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3245r1_data *data = i2c_get_clientdata(client);
-+ long rpm;
-+
-+ if (strict_strtol(buf, 10, &rpm) || !rpm)
-+ return -EINVAL;
-+
-+ rpm = SENSORS_LIMIT(rpm, 1, 65534);
-+
-+ mutex_lock(&data->lock);
-+ data->fan_min[attr->index] = rpm;
-+ mutex_unlock(&data->lock);
-+
-+ return count;
-+}
-+
-+static ssize_t show_fan_target(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3245r1_data *data = cy8c3245r1_update_device(dev);
-+
-+ if (FAN_DATA_VALID(data->fan_tgt))
-+ return sprintf(buf, "%d\n",
-+ data->fan_tgt);
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t set_fan_target(struct device *dev,
-+ struct device_attribute *devattr,
-+ const char *buf, size_t count)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3245r1_data *data = i2c_get_clientdata(client);
-+ long rpm;
-+
-+ if (strict_strtol(buf, 10, &rpm) || !rpm)
-+ return -EINVAL;
-+
-+ rpm = SENSORS_LIMIT(rpm, 1, 65534);
-+
-+ mutex_lock(&data->lock);
-+ data->fan_tgt = rpm;
-+ cy8c3245r1_write_word_data(client, CY8C3245R1_REG_FAN_TARGET, rpm);
-+ mutex_unlock(&data->lock);
-+
-+ return count;
-+}
-+
-+/*
-+ * Show Fan Profile Settings
-+ */
-+static ssize_t show_fan_profile(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3245r1_data *data = cy8c3245r1_update_device(dev);
-+
-+ return sprintf(buf, "%u\n",
-+ data->fan_profile[attr->index]);
-+}
-+
-+/*
-+ * Set Fan Profile Settings
-+ */
-+static ssize_t set_fan_profile(struct device *dev,
-+ struct device_attribute *devattr,
-+ const char *buf, size_t count)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3245r1_data *data = i2c_get_clientdata(client);
-+ long parm;
-+
-+ if (strict_strtoul(buf, 10, &parm))
-+ return -EINVAL;
-+
-+ parm = SENSORS_LIMIT(parm, 1, 65534);
-+
-+ mutex_lock(&data->lock);
-+ data->fan_profile[attr->index] = parm;
-+ cy8c3245r1_write_word_data(client, CY8C3245R1_REG_FAN_PROFILE(attr->index), parm);
-+ mutex_unlock(&data->lock);
-+
-+ return count;
-+}
-+
-+static ssize_t show_fan(struct device *dev, struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3245r1_data *data = cy8c3245r1_update_device(dev);
-+
-+ if (FAN_DATA_VALID(data->fan[attr->index]))
-+ return sprintf(buf, "%d\n", data->fan[attr->index]);
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t show_pwm(struct device *dev, struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3245r1_data *data = cy8c3245r1_update_device(dev);
-+ return sprintf(buf, "%d\n", data->pwm);
-+}
-+
-+static ssize_t set_pwm(struct device *dev, struct device_attribute *devattr,
-+ const char *buf, size_t count)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3245r1_data *data = i2c_get_clientdata(client);
-+ long temp;
-+
-+ if (strict_strtol(buf, 10, &temp))
-+ return -EINVAL;
-+
-+ temp = SENSORS_LIMIT(temp, 0, 255);
-+
-+ mutex_lock(&data->lock);
-+ data->pwm = temp;
-+ i2c_smbus_write_byte_data(client, CY8C3245R1_REG_PWM, temp);
-+ mutex_unlock(&data->lock);
-+
-+ return count;
-+}
-+
-+static ssize_t show_fan_alarm_mask(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct cy8c3245r1_data *data = cy8c3245r1_update_device(dev);
-+ int i;
-+ u32 alarm_mask = 0;
-+
-+ for (i = 0; i < CY8C3245R1_FAN_COUNT; i++)
-+ if ((data->fan[i] < data->fan_min[i]) ||
-+ (data->fan[i] >= data->fan_max[i]))
-+ alarm_mask |= 0x1 << i;
-+
-+ return sprintf(buf, "%x\n", alarm_mask);
-+}
-+
-+static ssize_t show_temp_alarm_mask(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct cy8c3245r1_data *data = cy8c3245r1_update_device(dev);
-+ int i;
-+ u32 alarm_mask = 0;
-+
-+ for (i = 0; i < CY8C3245R1_TEMP_COUNT; i++)
-+ if (data->temp[i] >= data->temp_max[i])
-+ alarm_mask |= 0x1 << i;
-+
-+ return sprintf(buf, "%x\n", alarm_mask);
-+}
-+
-+static ssize_t show_fan_alarm(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3245r1_data *data = cy8c3245r1_update_device(dev);
-+
-+ if ((data->fan[attr->index] < data->fan_min[attr->index]) ||
-+ (data->fan[attr->index] >= data->fan_max[attr->index]))
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t show_temp_alarm(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
-+ struct cy8c3245r1_data *data = cy8c3245r1_update_device(dev);
-+
-+ if (data->temp[attr->index] >= data->temp_max[attr->index])
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t set_pwm_auto(struct device *dev,
-+ struct device_attribute *devattr,
-+ const char *buf,
-+ size_t count)
-+{
-+ struct i2c_client *client = to_i2c_client(dev);
-+ struct cy8c3245r1_data *data = i2c_get_clientdata(client);
-+ long temp;
-+
-+ if (strict_strtol(buf, 10, &temp))
-+ return -EINVAL;
-+
-+ if (!(temp >= 0 && temp <= 3))
-+ return -EINVAL;
-+
-+ return count;
-+}
-+
-+static ssize_t show_pwm_auto(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct cy8c3245r1_data *data = cy8c3245r1_update_device(dev);
-+
-+ return sprintf(buf, "%d\n", data->pwm_automatic);
-+}
-+
-+#define CY8C3245R1_REG_MIN 0x00
-+#define CY8C3245R1_REG_MAX 0xe0
-+
-+static ssize_t show_debug(struct device *dev,
-+ struct device_attribute *devattr,
-+ char *buf)
-+{
-+ struct i2c_client *client = to_i2c_client(dev);
-+
-+ int len = 0, i, j;
-+ u8 val;
-+ for (i = 0; i < (CY8C3245R1_REG_MAX - CY8C3245R1_REG_MIN) / 16; i++) {
-+ len += sprintf(buf+len, "0x%02x: ", CY8C3245R1_REG_MIN + (i * 16));
-+ for (j = 0; j < 16; j++) {
-+ val = i2c_smbus_read_byte_data(client, CY8C3245R1_REG_MIN + (i * 16) + j);
-+ len += sprintf(buf+len, "%02x ", val);
-+ }
-+ len += sprintf(buf+len, "\n");
-+ }
-+ return len;
-+}
-+
-+static DEVICE_ATTR(fan_alarm_mask, S_IRUGO, show_fan_alarm_mask, NULL);
-+static DEVICE_ATTR(temp_alarm_mask, S_IRUGO, show_temp_alarm_mask, NULL);
-+static DEVICE_ATTR(num_temp_sensors, S_IWUSR | S_IRUGO, show_num_temp_sensors,
-+ set_num_temp_sensors);
-+static DEVICE_ATTR(auto_update_interval, S_IWUSR | S_IRUGO,
-+ show_auto_update_interval, set_auto_update_interval);
-+
-+static SENSOR_DEVICE_ATTR(temp1_max, S_IWUSR | S_IRUGO, show_temp_max,
-+ set_temp_max, 0);
-+static SENSOR_DEVICE_ATTR(temp2_max, S_IWUSR | S_IRUGO, show_temp_max,
-+ set_temp_max, 1);
-+static SENSOR_DEVICE_ATTR(temp3_max, S_IWUSR | S_IRUGO, show_temp_max,
-+ set_temp_max, 2);
-+static SENSOR_DEVICE_ATTR(temp4_max, S_IWUSR | S_IRUGO, show_temp_max,
-+ set_temp_max, 3);
-+static SENSOR_DEVICE_ATTR(temp5_max, S_IWUSR | S_IRUGO, show_temp_max,
-+ set_temp_max, 4);
-+static SENSOR_DEVICE_ATTR(temp6_max, S_IWUSR | S_IRUGO, show_temp_max,
-+ set_temp_max, 5);
-+static SENSOR_DEVICE_ATTR(temp7_max, S_IWUSR | S_IRUGO, show_temp_max,
-+ set_temp_max, 6);
-+static SENSOR_DEVICE_ATTR(temp8_max, S_IWUSR | S_IRUGO, show_temp_max,
-+ set_temp_max, 7);
-+
-+static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL, 0);
-+static SENSOR_DEVICE_ATTR(temp2_input, S_IRUGO, show_temp, NULL, 1);
-+static SENSOR_DEVICE_ATTR(temp3_input, S_IRUGO, show_temp, NULL, 2);
-+static SENSOR_DEVICE_ATTR(temp4_input, S_IRUGO, show_temp, NULL, 3);
-+static SENSOR_DEVICE_ATTR(temp5_input, S_IRUGO, show_temp, NULL, 4);
-+static SENSOR_DEVICE_ATTR(temp6_input, S_IRUGO, show_temp, NULL, 5);
-+static SENSOR_DEVICE_ATTR(temp7_input, S_IRUGO, show_temp, NULL, 6);
-+static SENSOR_DEVICE_ATTR(temp8_input, S_IRUGO, show_temp, NULL, 7);
-+
-+static SENSOR_DEVICE_ATTR(temp1_alarm, S_IRUGO, show_temp_alarm, NULL, 0);
-+static SENSOR_DEVICE_ATTR(temp2_alarm, S_IRUGO, show_temp_alarm, NULL, 1);
-+static SENSOR_DEVICE_ATTR(temp3_alarm, S_IRUGO, show_temp_alarm, NULL, 2);
-+static SENSOR_DEVICE_ATTR(temp4_alarm, S_IRUGO, show_temp_alarm, NULL, 3);
-+static SENSOR_DEVICE_ATTR(temp5_alarm, S_IRUGO, show_temp_alarm, NULL, 4);
-+static SENSOR_DEVICE_ATTR(temp6_alarm, S_IRUGO, show_temp_alarm, NULL, 4);
-+static SENSOR_DEVICE_ATTR(temp7_alarm, S_IRUGO, show_temp_alarm, NULL, 4);
-+static SENSOR_DEVICE_ATTR(temp8_alarm, S_IRUGO, show_temp_alarm, NULL, 4);
-+
-+static SENSOR_DEVICE_ATTR(fan1_max, S_IWUSR | S_IRUGO, show_fan_max,
-+ set_fan_max, 0);
-+static SENSOR_DEVICE_ATTR(fan2_max, S_IWUSR | S_IRUGO, show_fan_max,
-+ set_fan_max, 1);
-+static SENSOR_DEVICE_ATTR(fan3_max, S_IWUSR | S_IRUGO, show_fan_max,
-+ set_fan_max, 2);
-+static SENSOR_DEVICE_ATTR(fan4_max, S_IWUSR | S_IRUGO, show_fan_max,
-+ set_fan_max, 3);
-+static SENSOR_DEVICE_ATTR(fan5_max, S_IWUSR | S_IRUGO, show_fan_max,
-+ set_fan_max, 4);
-+static SENSOR_DEVICE_ATTR(fan6_max, S_IWUSR | S_IRUGO, show_fan_max,
-+ set_fan_max, 5);
-+static SENSOR_DEVICE_ATTR(fan7_max, S_IWUSR | S_IRUGO, show_fan_max,
-+ set_fan_max, 6);
-+static SENSOR_DEVICE_ATTR(fan8_max, S_IWUSR | S_IRUGO, show_fan_max,
-+ set_fan_max, 7);
-+
-+static SENSOR_DEVICE_ATTR(fan1_min, S_IWUSR | S_IRUGO, show_fan_min,
-+ set_fan_min, 0);
-+static SENSOR_DEVICE_ATTR(fan2_min, S_IWUSR | S_IRUGO, show_fan_min,
-+ set_fan_min, 1);
-+static SENSOR_DEVICE_ATTR(fan3_min, S_IWUSR | S_IRUGO, show_fan_min,
-+ set_fan_min, 2);
-+static SENSOR_DEVICE_ATTR(fan4_min, S_IWUSR | S_IRUGO, show_fan_min,
-+ set_fan_min, 3);
-+static SENSOR_DEVICE_ATTR(fan5_min, S_IWUSR | S_IRUGO, show_fan_min,
-+ set_fan_min, 4);
-+static SENSOR_DEVICE_ATTR(fan6_min, S_IWUSR | S_IRUGO, show_fan_min,
-+ set_fan_min, 5);
-+static SENSOR_DEVICE_ATTR(fan7_min, S_IWUSR | S_IRUGO, show_fan_min,
-+ set_fan_min, 6);
-+static SENSOR_DEVICE_ATTR(fan8_min, S_IWUSR | S_IRUGO, show_fan_min,
-+ set_fan_min, 7);
-+
-+static SENSOR_DEVICE_ATTR(fan1_target, S_IWUSR | S_IRUGO, show_fan_target,
-+ set_fan_target, 0);
-+static SENSOR_DEVICE_ATTR(fan2_target, S_IWUSR | S_IRUGO, show_fan_target,
-+ set_fan_target, 1);
-+static SENSOR_DEVICE_ATTR(fan3_target, S_IWUSR | S_IRUGO, show_fan_target,
-+ set_fan_target, 2);
-+static SENSOR_DEVICE_ATTR(fan4_target, S_IWUSR | S_IRUGO, show_fan_target,
-+ set_fan_target, 3);
-+static SENSOR_DEVICE_ATTR(fan5_target, S_IWUSR | S_IRUGO, show_fan_target,
-+ set_fan_target, 4);
-+static SENSOR_DEVICE_ATTR(fan6_target, S_IWUSR | S_IRUGO, show_fan_target,
-+ set_fan_target, 5);
-+static SENSOR_DEVICE_ATTR(fan7_target, S_IWUSR | S_IRUGO, show_fan_target,
-+ set_fan_target, 6);
-+static SENSOR_DEVICE_ATTR(fan8_target, S_IWUSR | S_IRUGO, show_fan_target,
-+ set_fan_target, 7);
-+
-+#define FAN_PROFILE_ATTR(_name, _index) \
-+ SENSOR_DEVICE_ATTR(_name, S_IWUSR | S_IRUGO, \
-+ show_fan_profile, set_fan_profile, _index)
-+
-+static FAN_PROFILE_ATTR(fan_low_duty, CY8C3245R1_FAN_PROFILE_LOW_DUTY);
-+static FAN_PROFILE_ATTR(fan_low_rpm, CY8C3245R1_FAN_PROFILE_LOW_RPM);
-+static FAN_PROFILE_ATTR(fan_high_duty, CY8C3245R1_FAN_PROFILE_HIGH_DUTY);
-+static FAN_PROFILE_ATTR(fan_high_rpm, CY8C3245R1_FAN_PROFILE_HIGH_RPM);
-+static FAN_PROFILE_ATTR(fan_speed_0_duty, CY8C3245R1_FAN_PROFILE_SPEED_0_DUTY);
-+static FAN_PROFILE_ATTR(fan_speed_100_duty,CY8C3245R1_FAN_PROFILE_SPEED_100_DUTY);
-+
-+static SENSOR_DEVICE_ATTR(fan1_input, S_IRUGO, show_fan, NULL, 0);
-+static SENSOR_DEVICE_ATTR(fan2_input, S_IRUGO, show_fan, NULL, 1);
-+static SENSOR_DEVICE_ATTR(fan3_input, S_IRUGO, show_fan, NULL, 2);
-+static SENSOR_DEVICE_ATTR(fan4_input, S_IRUGO, show_fan, NULL, 3);
-+static SENSOR_DEVICE_ATTR(fan5_input, S_IRUGO, show_fan, NULL, 4);
-+static SENSOR_DEVICE_ATTR(fan6_input, S_IRUGO, show_fan, NULL, 5);
-+static SENSOR_DEVICE_ATTR(fan7_input, S_IRUGO, show_fan, NULL, 6);
-+static SENSOR_DEVICE_ATTR(fan8_input, S_IRUGO, show_fan, NULL, 7);
-+
-+static SENSOR_DEVICE_ATTR(fan1_alarm, S_IRUGO, show_fan_alarm, NULL, 0);
-+static SENSOR_DEVICE_ATTR(fan2_alarm, S_IRUGO, show_fan_alarm, NULL, 1);
-+static SENSOR_DEVICE_ATTR(fan3_alarm, S_IRUGO, show_fan_alarm, NULL, 2);
-+static SENSOR_DEVICE_ATTR(fan4_alarm, S_IRUGO, show_fan_alarm, NULL, 3);
-+static SENSOR_DEVICE_ATTR(fan5_alarm, S_IRUGO, show_fan_alarm, NULL, 4);
-+static SENSOR_DEVICE_ATTR(fan6_alarm, S_IRUGO, show_fan_alarm, NULL, 5);
-+static SENSOR_DEVICE_ATTR(fan7_alarm, S_IRUGO, show_fan_alarm, NULL, 6);
-+static SENSOR_DEVICE_ATTR(fan8_alarm, S_IRUGO, show_fan_alarm, NULL, 7);
-+
-+static SENSOR_DEVICE_ATTR(pwm1, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 0);
-+static SENSOR_DEVICE_ATTR(pwm2, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 1);
-+static SENSOR_DEVICE_ATTR(pwm3, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 2);
-+static SENSOR_DEVICE_ATTR(pwm4, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 3);
-+static SENSOR_DEVICE_ATTR(pwm5, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 4);
-+static SENSOR_DEVICE_ATTR(pwm6, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 5);
-+static SENSOR_DEVICE_ATTR(pwm7, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 6);
-+static SENSOR_DEVICE_ATTR(pwm8, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 7);
-+
-+static SENSOR_DEVICE_ATTR(pwm1_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
-+ set_pwm_auto, 0);
-+static SENSOR_DEVICE_ATTR(pwm2_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
-+ set_pwm_auto, 0);
-+static SENSOR_DEVICE_ATTR(pwm3_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
-+ set_pwm_auto, 0);
-+static SENSOR_DEVICE_ATTR(pwm4_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
-+ set_pwm_auto, 0);
-+static SENSOR_DEVICE_ATTR(pwm5_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
-+ set_pwm_auto, 0);
-+static SENSOR_DEVICE_ATTR(pwm6_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
-+ set_pwm_auto, 0);
-+static SENSOR_DEVICE_ATTR(pwm7_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
-+ set_pwm_auto, 0);
-+static SENSOR_DEVICE_ATTR(pwm8_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
-+ set_pwm_auto, 0);
-+
-+static SENSOR_DEVICE_ATTR(debug, S_IRUGO, show_debug, NULL, 0);
-+
-+static struct attribute *cy8c3245r1_attr[] =
-+{
-+ &dev_attr_fan_alarm_mask.attr,
-+ &dev_attr_temp_alarm_mask.attr,
-+ &dev_attr_num_temp_sensors.attr,
-+ &dev_attr_auto_update_interval.attr,
-+ &sensor_dev_attr_temp1_max.dev_attr.attr,
-+ &sensor_dev_attr_temp2_max.dev_attr.attr,
-+ &sensor_dev_attr_temp3_max.dev_attr.attr,
-+ &sensor_dev_attr_temp4_max.dev_attr.attr,
-+ &sensor_dev_attr_temp5_max.dev_attr.attr,
-+ &sensor_dev_attr_temp6_max.dev_attr.attr,
-+ &sensor_dev_attr_temp7_max.dev_attr.attr,
-+ &sensor_dev_attr_temp8_max.dev_attr.attr,
-+ &sensor_dev_attr_temp1_input.dev_attr.attr,
-+ &sensor_dev_attr_temp2_input.dev_attr.attr,
-+ &sensor_dev_attr_temp3_input.dev_attr.attr,
-+ &sensor_dev_attr_temp4_input.dev_attr.attr,
-+ &sensor_dev_attr_temp5_input.dev_attr.attr,
-+ &sensor_dev_attr_temp6_input.dev_attr.attr,
-+ &sensor_dev_attr_temp7_input.dev_attr.attr,
-+ &sensor_dev_attr_temp8_input.dev_attr.attr,
-+ &sensor_dev_attr_temp1_alarm.dev_attr.attr,
-+ &sensor_dev_attr_temp2_alarm.dev_attr.attr,
-+ &sensor_dev_attr_temp3_alarm.dev_attr.attr,
-+ &sensor_dev_attr_temp4_alarm.dev_attr.attr,
-+ &sensor_dev_attr_temp5_alarm.dev_attr.attr,
-+ &sensor_dev_attr_temp6_alarm.dev_attr.attr,
-+ &sensor_dev_attr_temp7_alarm.dev_attr.attr,
-+ &sensor_dev_attr_temp8_alarm.dev_attr.attr,
-+ &sensor_dev_attr_fan1_max.dev_attr.attr,
-+ &sensor_dev_attr_fan2_max.dev_attr.attr,
-+ &sensor_dev_attr_fan3_max.dev_attr.attr,
-+ &sensor_dev_attr_fan4_max.dev_attr.attr,
-+ &sensor_dev_attr_fan5_max.dev_attr.attr,
-+ &sensor_dev_attr_fan6_max.dev_attr.attr,
-+ &sensor_dev_attr_fan7_max.dev_attr.attr,
-+ &sensor_dev_attr_fan8_max.dev_attr.attr,
-+ &sensor_dev_attr_fan1_min.dev_attr.attr,
-+ &sensor_dev_attr_fan2_min.dev_attr.attr,
-+ &sensor_dev_attr_fan3_min.dev_attr.attr,
-+ &sensor_dev_attr_fan4_min.dev_attr.attr,
-+ &sensor_dev_attr_fan5_min.dev_attr.attr,
-+ &sensor_dev_attr_fan6_min.dev_attr.attr,
-+ &sensor_dev_attr_fan7_min.dev_attr.attr,
-+ &sensor_dev_attr_fan8_min.dev_attr.attr,
-+ &sensor_dev_attr_fan1_target.dev_attr.attr,
-+ &sensor_dev_attr_fan2_target.dev_attr.attr,
-+ &sensor_dev_attr_fan3_target.dev_attr.attr,
-+ &sensor_dev_attr_fan4_target.dev_attr.attr,
-+ &sensor_dev_attr_fan5_target.dev_attr.attr,
-+ &sensor_dev_attr_fan6_target.dev_attr.attr,
-+ &sensor_dev_attr_fan7_target.dev_attr.attr,
-+ &sensor_dev_attr_fan8_target.dev_attr.attr,
-+ &sensor_dev_attr_fan1_input.dev_attr.attr,
-+ &sensor_dev_attr_fan2_input.dev_attr.attr,
-+ &sensor_dev_attr_fan3_input.dev_attr.attr,
-+ &sensor_dev_attr_fan4_input.dev_attr.attr,
-+ &sensor_dev_attr_fan5_input.dev_attr.attr,
-+ &sensor_dev_attr_fan6_input.dev_attr.attr,
-+ &sensor_dev_attr_fan7_input.dev_attr.attr,
-+ &sensor_dev_attr_fan8_input.dev_attr.attr,
-+ &sensor_dev_attr_fan1_alarm.dev_attr.attr,
-+ &sensor_dev_attr_fan2_alarm.dev_attr.attr,
-+ &sensor_dev_attr_fan3_alarm.dev_attr.attr,
-+ &sensor_dev_attr_fan4_alarm.dev_attr.attr,
-+ &sensor_dev_attr_fan5_alarm.dev_attr.attr,
-+ &sensor_dev_attr_fan6_alarm.dev_attr.attr,
-+ &sensor_dev_attr_fan7_alarm.dev_attr.attr,
-+ &sensor_dev_attr_fan8_alarm.dev_attr.attr,
-+ &sensor_dev_attr_pwm1.dev_attr.attr,
-+ &sensor_dev_attr_pwm2.dev_attr.attr,
-+ &sensor_dev_attr_pwm3.dev_attr.attr,
-+ &sensor_dev_attr_pwm4.dev_attr.attr,
-+ &sensor_dev_attr_pwm5.dev_attr.attr,
-+ &sensor_dev_attr_pwm6.dev_attr.attr,
-+ &sensor_dev_attr_pwm7.dev_attr.attr,
-+ &sensor_dev_attr_pwm8.dev_attr.attr,
-+ &sensor_dev_attr_pwm1_enable.dev_attr.attr,
-+ &sensor_dev_attr_pwm2_enable.dev_attr.attr,
-+ &sensor_dev_attr_pwm3_enable.dev_attr.attr,
-+ &sensor_dev_attr_pwm4_enable.dev_attr.attr,
-+ &sensor_dev_attr_pwm5_enable.dev_attr.attr,
-+ &sensor_dev_attr_pwm6_enable.dev_attr.attr,
-+ &sensor_dev_attr_pwm7_enable.dev_attr.attr,
-+ &sensor_dev_attr_pwm8_enable.dev_attr.attr,
-+ &sensor_dev_attr_fan_low_duty.dev_attr.attr,
-+ &sensor_dev_attr_fan_low_rpm.dev_attr.attr,
-+ &sensor_dev_attr_fan_high_duty.dev_attr.attr,
-+ &sensor_dev_attr_fan_high_rpm.dev_attr.attr,
-+ &sensor_dev_attr_fan_speed_0_duty.dev_attr.attr,
-+ &sensor_dev_attr_fan_speed_100_duty.dev_attr.attr,
-+ &sensor_dev_attr_debug.dev_attr.attr,
-+ NULL
-+};
-+
-+static int cy8c3245r1_probe(struct i2c_client *client,
-+ const struct i2c_device_id *id)
-+{
-+ struct cy8c3245r1_data *data;
-+ int err;
-+ int minor_revision, major_revision;
-+
-+ data = kzalloc(sizeof(struct cy8c3245r1_data), GFP_KERNEL);
-+ if (!data) {
-+ err = -ENOMEM;
-+ goto exit;
-+ }
-+
-+ data->num_temp_sensors = -1;
-+ data->auto_update_interval = AUTO_UPDATE_INTERVAL;
-+
-+ i2c_set_clientdata(client, data);
-+ mutex_init(&data->lock);
-+
-+ dev_info(&client->dev, "%s chip found\n", client->name);
-+
-+ /* Initialize the CY8C3245R1 chip */
-+ cy8c3245r1_init_client(client);
-+
-+ minor_revision = i2c_smbus_read_byte_data(client, CY8C3245R1_REG_FW_REV_MIN);
-+ major_revision = i2c_smbus_read_byte_data(client, CY8C3245R1_REG_FW_REV_MAJ);
-+ if ((minor_revision < CY8C3245R1_FW_REV_MIN) ||
-+ (major_revision != CY8C3245R1_FW_REV_MAJ)) {
-+ dev_err(&client->dev,
-+ "PSoC Supported Version >= %u.%u, Current version %u.%u\n",
-+ CY8C3245R1_FW_REV_MAJ, CY8C3245R1_FW_REV_MIN, major_revision,
-+ minor_revision);
-+ err = -ENODEV;
-+ goto exit_free;
-+ }
-+
-+ /* Register sysfs hooks */
-+ data->attrs.attrs = cy8c3245r1_attr;
-+ if ((err = sysfs_create_group(&client->dev.kobj, &data->attrs)))
-+ goto exit_free;
-+
-+ data->hwmon_dev = hwmon_device_register(&client->dev);
-+ if (IS_ERR(data->hwmon_dev)) {
-+ err = PTR_ERR(data->hwmon_dev);
-+ goto exit_remove;
-+ }
-+
-+ init_completion(&data->auto_update_stop);
-+ data->auto_update = kthread_run(cy8c3245r1_update_thread, client,
-+ dev_name(data->hwmon_dev));
-+ if (IS_ERR(data->auto_update)) {
-+ err = PTR_ERR(data->auto_update);
-+ goto exit_unregister;
-+ }
-+
-+ return 0;
-+
-+exit_unregister:
-+ hwmon_device_unregister(data->hwmon_dev);
-+exit_remove:
-+ sysfs_remove_group(&client->dev.kobj, &data->attrs);
-+exit_free:
-+ kfree(data);
-+exit:
-+ return err;
-+}
-+
-+static int cy8c3245r1_remove(struct i2c_client *client)
-+{
-+ struct cy8c3245r1_data *data = i2c_get_clientdata(client);
-+
-+ kthread_stop(data->auto_update);
-+ wait_for_completion(&data->auto_update_stop);
-+ hwmon_device_unregister(data->hwmon_dev);
-+ sysfs_remove_group(&client->dev.kobj, &data->attrs);
-+ kfree(data);
-+ return 0;
-+}
-+
-+static int __init cy8c3245r1_init(void)
-+{
-+ return i2c_add_driver(&cy8c3245r1_driver);
-+}
-+
-+static void __exit cy8c3245r1_exit(void)
-+{
-+ i2c_del_driver(&cy8c3245r1_driver);
-+}
-+
-+MODULE_AUTHOR("Shrijeet Mukherjee ");
-+MODULE_AUTHOR("Vidya Ravipati ");
-+MODULE_DESCRIPTION("CY8C3245R1 driver");
-+MODULE_LICENSE("GPL");
-+
-+module_init(cy8c3245r1_init);
-+module_exit(cy8c3245r1_exit);
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-ds100df410-retimer.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-ds100df410-retimer.patch
deleted file mode 100644
index e5841f8b..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-ds100df410-retimer.patch
+++ /dev/null
@@ -1,546 +0,0 @@
-Driver for DS100DF410 Low Power 10GbE Quad Channel Retimer/Equalizer
-
-diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
-index 846aab1..41989b0 100644
---- a/drivers/misc/Kconfig
-+++ b/drivers/misc/Kconfig
-@@ -527,6 +527,27 @@ config EDA_DEF_ALIGN
- help
- Default alignment of the memory region. Default is 1MB.
-
-+config RETIMER_CLASS
-+ tristate "Retimer Class support"
-+ depends on SYSFS
-+ default y
-+ help
-+ Creates a hardware class in sysfs called "retimer_dev",
-+ providing a common place to register RETIMER devices.
-+
-+ This support can also be built as a module. If so, the module
-+ will be called retimer_class.
-+
-+config DS100DF410
-+ tristate "DS100DF410 Low Power 10GbE Quad Channel Retimer"
-+ depends on I2C && SYSFS
-+ help
-+ If you say yes here you get support for the DS100DF410
-+ Low Power 10GbE Quad Channel Retimer.
-+
-+ This driver can also be built as a module. If so, the module
-+ will be called ds100df410.
-+
- source "drivers/misc/c2port/Kconfig"
- source "drivers/misc/eeprom/Kconfig"
- source "drivers/misc/cb710/Kconfig"
-diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
-index cf09aa8..ad70876 100644
---- a/drivers/misc/Makefile
-+++ b/drivers/misc/Makefile
-@@ -49,3 +49,5 @@ obj-y += carma/
- obj-$(CONFIG_USB_SWITCH_FSA9480) += fsa9480.o
- obj-$(CONFIG_ALTERA_STAPL) +=altera-stapl/
- obj-$(CONFIG_EARLY_DMA_ALLOC) += early_dma_alloc.o
-+obj-$(CONFIG_RETIMER_CLASS) += retimer_class.o
-+obj-$(CONFIG_DS100DF410) += ds100df410.o
-diff --git a/drivers/misc/ds100df410.c b/drivers/misc/ds100df410.c
-new file mode 100644
-index 0000000..b626111
---- /dev/null
-+++ b/drivers/misc/ds100df410.c
-@@ -0,0 +1,290 @@
-+/*
-+ * ds100df410.c - I2c client driver to manage DS100DF410
-+ * DS100DF410 Low Power 10GbE Quad Channel Retimer
-+ *
-+ * Copyright (C) 2014 Cumulus Networks, Inc.
-+ * Author: Puneet Shenoy
-+ *
-+ * Ideas and structure regarding introducing the class device graciously borrowed
-+ * from the eeprom sysfs/class support by:
-+ * Copyright (C) 2013 CumulusNetworks, Inc.
-+ * Author: Curt Brune
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+
-+#ifdef CONFIG_RETIMER_CLASS
-+#include
-+#endif
-+
-+#define DS100DF410_DRV_NAME "ds100df410"
-+#define DRIVER_VERSION "1.0"
-+
-+#define DS100DF410_CDR_RST_REG 0x0a
-+#define DS100DF410_TAP_DEM_REG 0x15
-+#define DS100DF410_PFD_PRBS_DFE_REG 0x1e
-+#define DS100DF410_DRV_SEL_VOD_REG 0x2d
-+#define DS100DF410_ADAPT_EQ_SM_REG 0x31
-+#define DS100DF410_VEO_CLK_CDR_CAP_REG 0x36
-+#define DS100DF410_CHANNELS_REG 0xff
-+
-+struct ds100df410_data {
-+ struct i2c_client *client;
-+
-+#ifdef CONFIG_RETIMER_CLASS
-+ struct device *retimer_dev;
-+#endif
-+ struct mutex lock;
-+};
-+
-+static u32 ds100df410_read(struct device *dev, u8 reg, char *buf)
-+{
-+ struct i2c_client *client = to_i2c_client(dev);
-+ u32 ret = i2c_smbus_read_byte_data(client, reg);
-+
-+ return sprintf(buf, "%d\n", ret);
-+}
-+
-+static u32 ds100df410_write(struct device *dev, u8 reg, const char *buf,
-+ size_t count)
-+{
-+ struct i2c_client *client = to_i2c_client(dev);
-+ unsigned long val;
-+ int ret;
-+
-+ if (strict_strtoul(buf, 0, &val) < 0)
-+ return -EINVAL;
-+
-+ ret = i2c_smbus_write_byte_data(client, reg, (u8)val);
-+ if (ret < 0)
-+ return ret;
-+
-+ return count;
-+}
-+
-+static ssize_t ds100df410_show_cdr_rst(struct device *dev,
-+ struct device_attribute *attr,
-+ char *buf)
-+{
-+ return ds100df410_read(dev, DS100DF410_CDR_RST_REG, buf);
-+}
-+
-+static ssize_t ds100df410_store_cdr_rst(struct device *dev,
-+ struct device_attribute *attr,
-+ const char *buf, size_t count)
-+{
-+ return ds100df410_write(dev, DS100DF410_CDR_RST_REG, buf, count);
-+}
-+
-+static ssize_t ds100df410_show_tap_dem(struct device *dev,
-+ struct device_attribute *attr,
-+ char *buf)
-+{
-+ return ds100df410_read(dev, DS100DF410_TAP_DEM_REG, buf);
-+}
-+
-+static ssize_t ds100df410_store_tap_dem(struct device *dev,
-+ struct device_attribute *attr,
-+ const char *buf, size_t count)
-+{
-+ return ds100df410_write(dev, DS100DF410_TAP_DEM_REG, buf, count);
-+}
-+
-+static ssize_t ds100df410_show_pfd_prbs_dfe(struct device *dev,
-+ struct device_attribute *attr,
-+ char *buf)
-+{
-+ return ds100df410_read(dev, DS100DF410_PFD_PRBS_DFE_REG, buf);
-+}
-+
-+static ssize_t ds100df410_store_pfd_prbs_dfe(struct device *dev,
-+ struct device_attribute *attr,
-+ const char *buf, size_t count)
-+{
-+ return ds100df410_write(dev, DS100DF410_PFD_PRBS_DFE_REG, buf, count);
-+}
-+
-+static ssize_t ds100df410_show_drv_sel_vod(struct device *dev,
-+ struct device_attribute *attr,
-+ char *buf)
-+{
-+ return ds100df410_read(dev, DS100DF410_DRV_SEL_VOD_REG, buf);
-+}
-+
-+static ssize_t ds100df410_store_drv_sel_vod(struct device *dev,
-+ struct device_attribute *attr,
-+ const char *buf, size_t count)
-+{
-+ return ds100df410_write(dev, DS100DF410_DRV_SEL_VOD_REG, buf, count);
-+}
-+
-+static ssize_t ds100df410_show_adapt_eq_sm(struct device *dev,
-+ struct device_attribute *attr,
-+ char *buf)
-+{
-+ return ds100df410_read(dev, DS100DF410_ADAPT_EQ_SM_REG, buf);
-+}
-+
-+static ssize_t ds100df410_store_adapt_eq_sm(struct device *dev,
-+ struct device_attribute *attr,
-+ const char *buf, size_t count)
-+{
-+ return ds100df410_write(dev, DS100DF410_ADAPT_EQ_SM_REG, buf, count);
-+}
-+
-+static ssize_t ds100df410_show_veo_clk_cdr_cap(struct device *dev,
-+ struct device_attribute *attr,
-+ char *buf)
-+{
-+ return ds100df410_read(dev, DS100DF410_VEO_CLK_CDR_CAP_REG, buf);
-+}
-+
-+static ssize_t ds100df410_store_veo_clk_cdr_cap(struct device *dev,
-+ struct device_attribute *attr,
-+ const char *buf, size_t count)
-+{
-+ return ds100df410_write(dev, DS100DF410_VEO_CLK_CDR_CAP_REG, buf, count);
-+}
-+
-+static ssize_t ds100df410_show_channels(struct device *dev,
-+ struct device_attribute *attr,
-+ char *buf)
-+{
-+ return ds100df410_read(dev, DS100DF410_CHANNELS_REG, buf);
-+}
-+
-+static ssize_t ds100df410_store_channels(struct device *dev,
-+ struct device_attribute *attr,
-+ const char *buf, size_t count)
-+{
-+ return ds100df410_write(dev, DS100DF410_CHANNELS_REG, buf, count);
-+}
-+
-+static DEVICE_ATTR(cdr_rst, S_IWUSR | S_IRUGO,
-+ ds100df410_show_cdr_rst, ds100df410_store_cdr_rst);
-+static DEVICE_ATTR(tap_dem, S_IWUSR | S_IRUGO,
-+ ds100df410_show_tap_dem, ds100df410_store_tap_dem);
-+static DEVICE_ATTR(pfd_prbs_dfe, S_IWUSR | S_IRUGO,
-+ ds100df410_show_pfd_prbs_dfe, ds100df410_store_pfd_prbs_dfe);
-+static DEVICE_ATTR(drv_sel_vod, S_IWUSR | S_IRUGO,
-+ ds100df410_show_drv_sel_vod, ds100df410_store_drv_sel_vod);
-+static DEVICE_ATTR(adapt_eq_sm, S_IWUSR | S_IRUGO,
-+ ds100df410_show_adapt_eq_sm, ds100df410_store_adapt_eq_sm);
-+static DEVICE_ATTR(veo_clk_cdr_cap, S_IWUSR | S_IRUGO,
-+ ds100df410_show_veo_clk_cdr_cap,
-+ ds100df410_store_veo_clk_cdr_cap);
-+static DEVICE_ATTR(channels, S_IWUSR | S_IRUGO,
-+ ds100df410_show_channels, ds100df410_store_channels);
-+
-+static struct attribute *ds100df410_attributes[] = {
-+ &dev_attr_cdr_rst.attr,
-+ &dev_attr_tap_dem.attr,
-+ &dev_attr_pfd_prbs_dfe.attr,
-+ &dev_attr_drv_sel_vod.attr,
-+ &dev_attr_adapt_eq_sm.attr,
-+ &dev_attr_veo_clk_cdr_cap.attr,
-+ &dev_attr_channels.attr,
-+ NULL
-+};
-+
-+static const struct attribute_group ds100df410_attr_group = {
-+ .attrs = ds100df410_attributes,
-+};
-+
-+static int __devinit ds100df410_probe(struct i2c_client *client,
-+ const struct i2c_device_id *id)
-+{
-+ struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
-+ struct ds100df410_data *data;
-+ int err = 0;
-+
-+ if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE)) {
-+ return -EIO;
-+ }
-+
-+ data = kzalloc(sizeof(struct ds100df410_data), GFP_KERNEL);
-+ if (!data)
-+ return -ENOMEM;
-+ data->client = client;
-+ mutex_init(&data->lock);
-+
-+ /* register sysfs hooks */
-+ err = sysfs_create_group(&client->dev.kobj, &ds100df410_attr_group);
-+ if (err)
-+ goto exit_kfree;
-+
-+
-+#ifdef CONFIG_RETIMER_CLASS
-+ data->retimer_dev = retimer_device_register(&client->dev);
-+ if (IS_ERR(data->retimer_dev)) {
-+ dev_err(&client->dev, "error registering retimer device.\n");
-+ err = PTR_ERR(data->retimer_dev);
-+ goto exit_kfree;
-+ }
-+#endif
-+
-+ i2c_set_clientdata(client, data);
-+ return 0;
-+exit_kfree:
-+ kfree(data);
-+ return err;
-+}
-+
-+static int __devexit ds100df410_remove(struct i2c_client *client)
-+{
-+ struct ds100df410_data *data;
-+
-+ data = i2c_get_clientdata(client);
-+ sysfs_remove_group(&client->dev.kobj, &ds100df410_attr_group);
-+
-+#ifdef CONFIG_RETIMER_CLASS
-+ retimer_device_unregister(data->retimer_dev);
-+#endif
-+
-+ kfree(data);
-+ return 0;
-+}
-+
-+static const struct i2c_device_id ds100df410_id[] = {
-+ { "ds100df410", 0 },
-+ {}
-+};
-+MODULE_DEVICE_TABLE(i2c, ds100df410_id);
-+
-+static struct i2c_driver ds100df410_driver = {
-+ .driver = {
-+ .name = DS100DF410_DRV_NAME,
-+ },
-+ .probe = ds100df410_probe,
-+ .remove = __devexit_p(ds100df410_remove),
-+ .id_table = ds100df410_id,
-+};
-+
-+module_i2c_driver(ds100df410_driver);
-+MODULE_AUTHOR("Puneet Shenoy ");
-+MODULE_DESCRIPTION("I2C client for DS100DF410 10GE Quad Core Retimer");
-+MODULE_LICENSE("GPL v2");
-+MODULE_VERSION(DRIVER_VERSION);
-diff --git a/drivers/misc/retimer_class.c b/drivers/misc/retimer_class.c
-new file mode 100644
-index 0000000..176df29
---- /dev/null
-+++ b/drivers/misc/retimer_class.c
-@@ -0,0 +1,159 @@
-+/*
-+ * retimer_class.c
-+ *
-+ * This file defines the sysfs class "retimer", for use by RETIMER
-+ * drivers.
-+ *
-+ * Copyright (C) 2014 Cumulus Networks, Inc.
-+ * Author: Puneet Shenoy
-+ *
-+ * Ideas and structure graciously borrowed from the eeprom_class class:
-+ * Copyright (C) 2013 Curt Brune
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; version 2 of the License.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-+ *
-+ */
-+
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+
-+/* Root retimer "class" object (corresponds to '//class/retimer_dev/') */
-+static struct class *retimer_class;
-+
-+#define RETIMER_CLASS_NAME "retimer_dev"
-+#define RETIMER_ID_PREFIX "retimer"
-+#define RETIMER_ID_FORMAT RETIMER_ID_PREFIX "%d"
-+
-+static DEFINE_IDA(retimer_ida);
-+
-+/**
-+ * retimer_device_register - register w/ retimer class
-+ * @dev: the device to register
-+ *
-+ * retimer_device_unregister() must be called when the device is no
-+ * longer needed.
-+ *
-+ * Creates a new retimer class device that is a child of @dev. Also
-+ * creates a symlink in //class/retimer_dev/retimer[N] pointing
-+ * to the new device.
-+ *
-+ * Returns the pointer to the new device.
-+ */
-+struct device *retimer_device_register(struct device *dev)
-+{
-+ struct device *retimer_dev;
-+ int id;
-+
-+ id = ida_simple_get(&retimer_ida, 0, 0, GFP_KERNEL);
-+ if (id < 0)
-+ return ERR_PTR(id);
-+
-+ retimer_dev = device_create(retimer_class, dev, MKDEV(0, 0), NULL,
-+ RETIMER_ID_FORMAT, id);
-+
-+ if (IS_ERR(retimer_dev))
-+ ida_simple_remove(&retimer_ida, id);
-+
-+ return retimer_dev;
-+}
-+
-+/**
-+ * retimer_device_unregister - removes the previously registered class device
-+ *
-+ * @dev: the class device to destroy
-+ */
-+void retimer_device_unregister(struct device *dev)
-+{
-+ int id;
-+
-+ if (likely(sscanf(dev_name(dev), RETIMER_ID_FORMAT, &id) == 1)) {
-+ device_unregister(dev);
-+ ida_simple_remove(&retimer_ida, id);
-+ } else
-+ dev_dbg(dev->parent,
-+ "retimer_device_unregister() failed: bad class ID!\n");
-+}
-+
-+/**
-+ * Each member of the retimer class exports a sysfs file called
-+ * "label", containing the label property from the corresponding
-+ * device tree node.
-+ *
-+ * Userspace can use the label to identify what the RETIMER is for.
-+ */
-+static ssize_t label_show(struct device *dev,
-+ struct device_attribute *attr,
-+ char *buf)
-+{
-+ const char* cp = NULL;
-+ int len = 0;
-+
-+ /*
-+ * The class device is a child of the original device,
-+ * i.e. dev->parent points to the original device.
-+ */
-+ if (dev->parent && dev->parent->of_node)
-+ cp = of_get_property(dev->parent->of_node, "label", &len);
-+
-+ if ((cp == NULL) || (len == 0)) {
-+ cp = "unknown";
-+ len = strlen(cp) + 1;
-+ }
-+
-+ strncpy(buf, cp, len - 1);
-+ buf[len - 1] = '\n';
-+ buf[len] = '\0';
-+
-+ return len;
-+}
-+
-+struct device_attribute retimer_class_dev_attrs[] = {
-+ __ATTR_RO(label),
-+ __ATTR_NULL,
-+};
-+
-+static int __init retimer_init(void)
-+{
-+ retimer_class = class_create(THIS_MODULE, RETIMER_CLASS_NAME);
-+ if (IS_ERR(retimer_class)) {
-+ pr_err("couldn't create sysfs class\n");
-+ return PTR_ERR(retimer_class);
-+ }
-+
-+ retimer_class->dev_attrs = retimer_class_dev_attrs;
-+
-+ return 0;
-+}
-+
-+static void __exit retimer_exit(void)
-+{
-+ class_destroy(retimer_class);
-+}
-+
-+subsys_initcall(retimer_init);
-+module_exit(retimer_exit);
-+
-+EXPORT_SYMBOL_GPL(retimer_device_register);
-+EXPORT_SYMBOL_GPL(retimer_device_unregister);
-+
-+MODULE_AUTHOR("Puneet Shenoy ");
-+MODULE_DESCRIPTION("retimer sysfs/class support");
-+MODULE_LICENSE("GPL v2");
-diff --git a/include/linux/retimer_class.h b/include/linux/retimer_class.h
-new file mode 100644
-index 0000000..6f37318
---- /dev/null
-+++ b/include/linux/retimer_class.h
-@@ -0,0 +1,35 @@
-+/*
-+ * retimer_class.c
-+ *
-+ * This file exports interface functions for the sysfs class "retimer",
-+ * for use by RETIMER drivers.
-+ *
-+ * Copyright (C) 2014 Cumulus Networks, Inc.
-+ * Author: Puneet Shenoy
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; version 2 of the License.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-+ *
-+ */
-+
-+#ifndef RETIMER_CLASS_H__
-+#define RETIMER_CLASS_H__
-+
-+#include
-+#include
-+
-+struct device *retimer_device_register(struct device *dev);
-+
-+void retimer_device_unregister(struct device *dev);
-+
-+#endif /* RETIMER_CLASS_H__ */
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-early-dma-allocator.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-early-dma-allocator.patch
deleted file mode 100644
index 5e1d0484..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-early-dma-allocator.patch
+++ /dev/null
@@ -1,357 +0,0 @@
-early dma allocator patch
-
-Add a tiny driver called "Early DMA Allocator (EDA)" that allocates
-memory using the early boot alloc_bootmem() interface. The platform
-dependent kernel code (dni_7448.c for example) would call this
-driver's init at boot time.
-
-The size and alignment of the DMA memory region are specified in any
-one of a kernel command line option, device tree node (compatible with
-"early-dma-alloc"), or a Kbuild configurable compiled in default.
-
-The driver also publishes an interface for other kernel drivers
-to call that returns the physical offset and size of the allocated
-region.
-
-diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
-index b506f41..cfaf677 100644
---- a/arch/x86/kernel/setup.c
-+++ b/arch/x86/kernel/setup.c
-@@ -50,6 +50,9 @@
- #include
- #include
- #include
-+#ifdef CONFIG_EARLY_DMA_ALLOC
-+#include
-+#endif
-
- #include
- #include
-@@ -1144,6 +1147,9 @@ void __init setup_arch(char **cmdline_p)
- mcheck_init();
-
- arch_init_ideal_nops();
-+#ifdef CONFIG_EARLY_DMA_ALLOC
-+ eda_init();
-+#endif
- }
-
- #ifdef CONFIG_X86_32
-diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
-index 5664696..846aab1 100644
---- a/drivers/misc/Kconfig
-+++ b/drivers/misc/Kconfig
-@@ -500,6 +500,33 @@ config USB_SWITCH_FSA9480
- stereo and mono audio, video, microphone and UART data to use
- a common connector port.
-
-+config EARLY_DMA_ALLOC
-+ bool "Early DMA Memory Allocator"
-+ depends on HAS_DMA
-+
-+ ---help---
-+ This driver locks down a region of DMA accessible memory
-+ early in the boot process. This memory can be used by other
-+ drivers that might rmmod/insmod, insuring the memory region
-+ does not become fragmented.
-+
-+config EDA_DEF_SIZE
-+ hex "EDA Default Region Size"
-+ depends on EARLY_DMA_ALLOC
-+ default 0x04000000
-+ help
-+ Default size of the reserved memory pool, if not altered by the
-+ open firmware interface or kernel boot parameter. This memory
-+ will not be accessable to the rest of the system. Default is
-+ 64MB.
-+
-+config EDA_DEF_ALIGN
-+ hex "EDA Default Alignment"
-+ depends on EARLY_DMA_ALLOC
-+ default 0x00100000
-+ help
-+ Default alignment of the memory region. Default is 1MB.
-+
- source "drivers/misc/c2port/Kconfig"
- source "drivers/misc/eeprom/Kconfig"
- source "drivers/misc/cb710/Kconfig"
-diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
-index b26495a..cf09aa8 100644
---- a/drivers/misc/Makefile
-+++ b/drivers/misc/Makefile
-@@ -48,3 +48,4 @@ obj-y += lis3lv02d/
- obj-y += carma/
- obj-$(CONFIG_USB_SWITCH_FSA9480) += fsa9480.o
- obj-$(CONFIG_ALTERA_STAPL) +=altera-stapl/
-+obj-$(CONFIG_EARLY_DMA_ALLOC) += early_dma_alloc.o
-diff --git a/drivers/misc/early_dma_alloc.c b/drivers/misc/early_dma_alloc.c
-new file mode 100644
-index 0000000..ab3ac32
---- /dev/null
-+++ b/drivers/misc/early_dma_alloc.c
-@@ -0,0 +1,223 @@
-+/*
-+ * Early DMA Memory Allocator
-+ *
-+ * Copyright © 2013,2014 Cumulus Networks, Inc.
-+ *
-+ * Author: Curt Brune
-+ * Modified: Jonathan Toppins
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-+ *
-+ */
-+
-+/*
-+ * This driver allocates a region of DMA accessible memory, making it
-+ * available to one other device driver.
-+ *
-+ * The client device driver may be unloaded and reloaded over time.
-+ * This driver keeps the DMA region from becoming fragmented across
-+ * module reloads.
-+ *
-+ * Memory Region Restrictions
-+ * --------------------------
-+ * The memory region allocated by EDA MUST exist below a 4GB limit. This
-+ * is because EDA's primary (only at time of writing) user is the
-+ * Broadcom BDE driver wich assumes a 32-bit physical address space and
-+ * assumes paddr is no more than 32-bits wide. Furthermore, before porting
-+ * the BDE driver to use EDA the BDE driver specifically checked if the
-+ * memory region provided by highmem was less than 4GB. We assume Broadcom
-+ * knew what they were doing and there is a specific reason why this 4GB
-+ * limit is needed, so we enforce this limit by checking the physical address
-+ * after allocation.
-+ *
-+ * Memory Region Size and Alignment
-+ * --------------------------------
-+ * This driver allows three ways for the user to define the DMA memory
-+ * that will be created, listed in order of preference.
-+ * 1. The user may specify on the kernel command line in the boot loader
-+ * the "eda_mem" option, this option has the format "size@alignment",
-+ * example: eda_mem=0x04000000@0x00100000
-+ * 2. This driver looks for a device tree node compatible with
-+ * "early-dma-alloc". The "region_size" property of the node contains
-+ * the size, in bytes, of the desired DMA memory region. The
-+ * "alignment" property contains the desired memory alignment of the
-+ * region.
-+ * 3. Finally if neither of the above are provided the Kbuild changable,
-+ * compiled in default size and alignment will be used.
-+ *
-+ */
-+
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+
-+#if (!defined CONFIG_EDA_DEF_SIZE) || \
-+ (!defined CONFIG_EDA_DEF_ALIGN)
-+#error incorrect kernel config - fix it
-+#endif
-+
-+// #define DEBUG
-+#if (defined DEBUG)
-+#define eda_debug(fmt, ... ) \
-+ printk(KERN_ERR "eda-debug:%s(): " fmt "\n", __func__ , \
-+ ##__VA_ARGS__)
-+#else
-+#define eda_debug(fmt, ... )
-+#endif
-+
-+#define eda_info(fmt, ... ) \
-+ printk(KERN_INFO "eda: " fmt "\n", ##__VA_ARGS__)
-+
-+static uint32_t dma_size;
-+static void *dma_vaddr;
-+static u32 dma_align __initdata;
-+static bool eda_cmdline __initdata;
-+
-+static int __init setup_eda_mem(char *str)
-+{
-+ char *endp;
-+
-+ dma_size = memparse(str, &endp) & PAGE_MASK;
-+ if (*endp == '@')
-+ dma_align = memparse(endp + 1, NULL) & PAGE_MASK;
-+ eda_cmdline = true;
-+ return 0;
-+}
-+early_param("eda_mem", setup_eda_mem);
-+
-+static int __init of_eda_init(uint32_t *size, u32 *align)
-+#ifdef CONFIG_OF_FLATTREE
-+{
-+ int rc = -ENODEV;
-+ struct device_node *np = NULL;
-+ const u32 *region_sz_p = NULL;
-+ const u32 *align_p = NULL;
-+ u32 prop_sz = 0;
-+
-+ eda_debug("entry");
-+
-+ /* is a programming error make it really painful so it gets fixed */
-+ BUG_ON(NULL == size || NULL == align);
-+
-+ np = of_find_compatible_node(NULL, NULL, "early-dma-alloc");
-+ if (!np) {
-+ printk(KERN_WARNING "WARN: Can not find `early-dma-alloc'"
-+ " device tree node.\n");
-+ goto cleanup;
-+ }
-+
-+ region_sz_p = of_get_property(np, "region_size", &prop_sz);
-+ if (!region_sz_p || (prop_sz != sizeof(*region_sz_p))) {
-+ printk(KERN_ERR "ERROR: Can not find `region_size' property"
-+ " in early-dma-alloc device tree node.\n");
-+ goto cleanup;
-+ }
-+ *size = *region_sz_p;
-+
-+ align_p = of_get_property(np, "alignment", &prop_sz);
-+ if (!align_p || (prop_sz != sizeof(*align_p))) {
-+ printk(KERN_ERR "ERROR: Can not find `alignment' property in"
-+ "early-dma-alloc device tree node.\n");
-+ goto cleanup;
-+ }
-+ *align = *align_p;
-+ rc = 0;
-+
-+ eda_debug("cleanup");
-+
-+cleanup:
-+ of_node_put(np);
-+ return rc;
-+
-+}
-+#else
-+{
-+ return -ENODEV;
-+}
-+#endif
-+
-+int eda_dma_info_get(void **vaddr, uint32_t *paddr, uint32_t *size)
-+{
-+ eda_debug("entry");
-+
-+ if (!dma_vaddr)
-+ return -ENOMEM;
-+
-+ if (!vaddr || !paddr || !size)
-+ return -EINVAL;
-+
-+ *vaddr = dma_vaddr;
-+ *paddr = (uint32_t) virt_to_phys(dma_vaddr);
-+ *size = dma_size;
-+
-+ eda_debug("returning -- dma_vaddr: 0x%pK, dma_paddr: 0x%08x,"
-+ " size: 0x%08x", *vaddr, *paddr, *size);
-+
-+ return 0;
-+}
-+EXPORT_SYMBOL(eda_dma_info_get);
-+
-+int __init eda_init(void)
-+{
-+ int rc = 0;
-+
-+ if (eda_cmdline) {
-+ if (!dma_align)
-+ dma_align = CONFIG_EDA_DEF_ALIGN;
-+ if (!dma_size)
-+ dma_size = CONFIG_EDA_DEF_SIZE;
-+ eda_debug("size & alignment came from: kernel cmdline");
-+ } else if (!of_eda_init(&dma_size, &dma_align)) {
-+ eda_debug("size & alignment came from: open firmware entry");
-+ } else {
-+ dma_align = CONFIG_EDA_DEF_ALIGN;
-+ dma_size = CONFIG_EDA_DEF_SIZE;
-+ eda_debug("size & alignment came from: compiled in defaults");
-+ }
-+
-+ dma_vaddr = __alloc_bootmem_low(dma_size, dma_align, 0);
-+ /*
-+ * enforce EDA's requirement to allocate the memory region below a
-+ * 32-bit limit.
-+ */
-+ if (virt_to_phys(dma_vaddr) > 0xFFFFFFFFULL) {
-+ rc = -ENOMEM;
-+ printk(KERN_ERR "ERROR: DMA memory beyond 32-bit address"
-+ " space not supported.\n");
-+ goto cleanup;
-+ }
-+
-+ eda_info("dma_vaddr: 0x%pK, dma_paddr: 0x%016llx, size: 0x%08x,"
-+ " alignment: 0x%08x",
-+ dma_vaddr, (unsigned long long) virt_to_phys(dma_vaddr),
-+ dma_size, dma_align);
-+cleanup:
-+ if (rc && dma_vaddr) {
-+ free_bootmem(dma_vaddr, dma_size);
-+ }
-+ if (rc) {
-+ dma_vaddr = NULL;
-+ dma_size = 0;
-+ }
-+ return rc;
-+}
-+EXPORT_SYMBOL(eda_init);
-diff --git a/include/linux/early_dma_alloc.h b/include/linux/early_dma_alloc.h
-new file mode 100644
-index 0000000..a6d87ec
---- /dev/null
-+++ b/include/linux/early_dma_alloc.h
-@@ -0,0 +1,36 @@
-+/*
-+ * Early DMA Memory Allocator
-+ *
-+ * Copyright © 2013 Cumulus Networks, Inc.
-+ *
-+ * Author: Curt Brune
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-+ *
-+ */
-+
-+#ifndef EARLY_DMA_ALLOC_H__
-+#define EARLY_DMA_ALLOC_H__
-+
-+#ifdef __KERNEL__
-+
-+#include
-+
-+extern int eda_init(void);
-+extern int eda_dma_info_get(void** vaddr, uint32_t* paddr, uint32_t* size);
-+
-+#endif /* __KERNEL__ */
-+
-+#endif /* EARLY_DMA_ALLOC_H__ */
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-eeprom-class.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-eeprom-class.patch
deleted file mode 100644
index 629493a8..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-eeprom-class.patch
+++ /dev/null
@@ -1,345 +0,0 @@
-Create eeprom_dev hardware class for EEPROM devices
-
-Create a new hardware class under /sys/class/eeprom_dev
-
-EEPROM drivers can register their devices with the eeprom_dev class
-during instantiation.
-
-The registered devices show up as:
-
- /sys/class/eeprom_dev/eeprom0
- /sys/class/eeprom_dev/eeprom1
- ...
- /sys/class/eeprom_dev/eeprom[N]
-
-Each member of the eeprom class exports a sysfs file called "label",
-containing the label property from the corresponding device tree node.
-
-Example:
-
- /sys/class/eeprom_dev/eeprom0/label
-
-If the device tree node property "label" does not exist the value
-"unknown" is used.
-
-Userspace can use the label to identify what the EEPROM is for.
-
-The real device is available from the class device via the "device"
-link:
-
- /sys/class/eeprom_dev/eeprom0/device
-
-diff --git a/drivers/misc/eeprom/Kconfig b/drivers/misc/eeprom/Kconfig
-index 701edf6..08c7a23 100644
---- a/drivers/misc/eeprom/Kconfig
-+++ b/drivers/misc/eeprom/Kconfig
-@@ -1,5 +1,16 @@
- menu "EEPROM support"
-
-+config EEPROM_CLASS
-+ tristate "EEPROM Hardware Class support"
-+ depends on SYSFS
-+ default y
-+ help
-+ Creates a hardware class in sysfs called "eeprom_dev",
-+ providing a common place to register EEPROM devices.
-+
-+ This support can also be built as a module. If so, the module
-+ will be called eeprom_class.
-+
- config EEPROM_AT24
- tristate "I2C EEPROMs from most vendors"
- depends on I2C && SYSFS
-diff --git a/drivers/misc/eeprom/Makefile b/drivers/misc/eeprom/Makefile
-index fc1e81d..eabb373 100644
---- a/drivers/misc/eeprom/Makefile
-+++ b/drivers/misc/eeprom/Makefile
-@@ -1,3 +1,4 @@
-+obj-$(CONFIG_EEPROM_CLASS) += eeprom_class.o
- obj-$(CONFIG_EEPROM_AT24) += at24.o
- obj-$(CONFIG_EEPROM_AT25) += at25.o
- obj-$(CONFIG_EEPROM_LEGACY) += eeprom.o
-diff --git a/drivers/misc/eeprom/eeprom_class.c b/drivers/misc/eeprom/eeprom_class.c
-new file mode 100644
-index 0000000..aecb778
---- /dev/null
-+++ b/drivers/misc/eeprom/eeprom_class.c
-@@ -0,0 +1,193 @@
-+/*
-+ * eeprom_class.c
-+ *
-+ * This file defines the sysfs class "eeprom", for use by EEPROM
-+ * drivers.
-+ *
-+ * Copyright (C) 2013 Cumulus Networks, Inc.
-+ * Author: Curt Brune
-+ *
-+ * Ideas and structure graciously borrowed from the hwmon class:
-+ * Copyright (C) 2005 Mark M. Hoffman
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; version 2 of the License.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-+ *
-+ */
-+
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+
-+/* Root eeprom "class" object (corresponds to '//class/eeprom_dev/') */
-+static struct class *eeprom_class;
-+
-+#define EEPROM_CLASS_NAME "eeprom_dev"
-+#define EEPROM_ID_PREFIX "eeprom"
-+#define EEPROM_ID_FORMAT EEPROM_ID_PREFIX "%d"
-+
-+static DEFINE_IDA(eeprom_ida);
-+
-+/**
-+ * eeprom_device_register - register w/ eeprom class
-+ * @dev: the device to register
-+ * @data: platform data to use for the device
-+ *
-+ * eeprom_device_unregister() must be called when the device is no
-+ * longer needed.
-+ *
-+ * Creates a new eeprom class device that is a child of @dev. Also
-+ * creates a symlink in //class/eeprom_dev/eeprom[N] pointing
-+ * to the new device.
-+ *
-+ * Returns the pointer to the new device.
-+ */
-+struct eeprom_device *eeprom_device_register(struct device *dev, struct eeprom_platform_data *data)
-+{
-+ struct eeprom_device *eeprom_dev;
-+ int id;
-+ int ret;
-+
-+ id = ida_simple_get(&eeprom_ida, 0, 0, GFP_KERNEL);
-+ if (id < 0)
-+ return ERR_PTR(id);
-+
-+ eeprom_dev = kzalloc(sizeof(struct eeprom_device), GFP_KERNEL);
-+ if (!eeprom_dev) {
-+ ret = -ENOMEM;
-+ goto err_ida;
-+ }
-+
-+ eeprom_dev->dev = device_create(eeprom_class, dev, MKDEV(0, 0),
-+ eeprom_dev, EEPROM_ID_FORMAT, id);
-+ if (IS_ERR(eeprom_dev->dev)) {
-+ ret = PTR_ERR(eeprom_dev->dev);
-+ goto err_eeprom_dev_free;
-+ }
-+
-+ eeprom_dev->data = data;
-+
-+ return eeprom_dev;
-+
-+err_eeprom_dev_free:
-+ kfree(eeprom_dev);
-+
-+err_ida:
-+ ida_simple_remove(&eeprom_ida, id);
-+ return ERR_PTR(ret);
-+}
-+
-+/**
-+ * eeprom_device_unregister - removes the previously registered class device
-+ *
-+ * @eeprom: the eeprom class device to destroy
-+ */
-+void eeprom_device_unregister(struct eeprom_device *eeprom_dev)
-+{
-+ int id;
-+
-+ if (likely(sscanf(dev_name(eeprom_dev->dev), EEPROM_ID_FORMAT, &id) == 1)) {
-+ device_unregister(eeprom_dev->dev);
-+ kfree(eeprom_dev);
-+ ida_simple_remove(&eeprom_ida, id);
-+ } else
-+ dev_dbg(eeprom_dev->dev->parent,
-+ "eeprom_device_unregister() failed: bad class ID!\n");
-+}
-+
-+/**
-+ * Each member of the eeprom class exports a sysfs file called
-+ * "label", containing the label property from the corresponding
-+ * device tree node.
-+ *
-+ * Userspace can use the label to identify what the EEPROM is for.
-+ */
-+static ssize_t label_show(struct device *dev,
-+ struct device_attribute *attr,
-+ char *buf)
-+{
-+ struct eeprom_device *eeprom_dev = (struct eeprom_device *)dev_get_drvdata(dev);
-+ const char* cp = NULL;
-+ int len = 0;
-+
-+ /* Check if the eeprom device has an explicit label:
-+ * - explicitly passed in to eeprom_device_register()
-+ * - explicitly passed via the device tree node
-+ *
-+ * Otherwise use "unknown".
-+ */
-+ if (eeprom_dev->data && eeprom_dev->data->label) {
-+ cp = eeprom_dev->data->label;
-+ len = strlen(cp) + 1;
-+ } else {
-+ /*
-+ * Check for a device tree property.
-+ *
-+ * The class device is a child of the original device,
-+ * i.e. dev->parent points to the original device.
-+ */
-+ if (dev->parent && dev->parent->of_node)
-+ cp = of_get_property(dev->parent->of_node, "label", &len);
-+ }
-+
-+ if ((cp == NULL) || (len == 0)) {
-+ cp = "unknown";
-+ len = strlen(cp) + 1;
-+ }
-+
-+ strncpy(buf, cp, len - 1);
-+ buf[len - 1] = '\n';
-+ buf[len] = '\0';
-+
-+ return len;
-+}
-+
-+struct device_attribute eeprom_class_dev_attrs[] = {
-+ __ATTR_RO(label),
-+ __ATTR_NULL,
-+};
-+
-+static int __init eeprom_init(void)
-+{
-+ eeprom_class = class_create(THIS_MODULE, EEPROM_CLASS_NAME);
-+ if (IS_ERR(eeprom_class)) {
-+ pr_err("couldn't create sysfs class\n");
-+ return PTR_ERR(eeprom_class);
-+ }
-+
-+ eeprom_class->dev_attrs = eeprom_class_dev_attrs;
-+
-+ return 0;
-+}
-+
-+static void __exit eeprom_exit(void)
-+{
-+ class_destroy(eeprom_class);
-+}
-+
-+subsys_initcall(eeprom_init);
-+module_exit(eeprom_exit);
-+
-+EXPORT_SYMBOL_GPL(eeprom_device_register);
-+EXPORT_SYMBOL_GPL(eeprom_device_unregister);
-+
-+MODULE_AUTHOR("Curt Brune ");
-+MODULE_DESCRIPTION("eeprom sysfs/class support");
-+MODULE_LICENSE("GPL v2");
-diff --git a/include/linux/eeprom_class.h b/include/linux/eeprom_class.h
-new file mode 100644
-index 0000000..d21d350
---- /dev/null
-+++ b/include/linux/eeprom_class.h
-@@ -0,0 +1,79 @@
-+/*
-+ * eeprom_class.h
-+ *
-+ * This file exports interface functions for the sysfs class "eeprom",
-+ * for use by EEPROM drivers.
-+ *
-+ * Copyright (C) 2013 Cumulus Networks, Inc.
-+ * Author: Curt Brune
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; version 2 of the License.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-+ *
-+ */
-+
-+#ifndef EEPROM_CLASS_H__
-+#define EEPROM_CLASS_H__
-+
-+#include
-+#include
-+
-+/*
-+ * Extra platform data used by the eeprom class
-+ *
-+ * An eeprom device can include this structure in its own platform
-+ * data structure.
-+ *
-+ * A specific platform can set the values in this structure to values
-+ * suitable for that platform.
-+ *
-+ */
-+struct eeprom_platform_data {
-+ char *label; /* device label to use with the eeprom class */
-+};
-+
-+/*
-+ * EEPROM device structure
-+ *
-+ * This structure is used by the eeprom_class driver to manage the
-+ * state of the class device.
-+ *
-+ */
-+struct eeprom_device {
-+ struct device *dev;
-+ struct eeprom_platform_data *data;
-+};
-+
-+#if defined(CONFIG_EEPROM_CLASS) || defined (CONFIG_EEPROM_CLASS_MODULE)
-+
-+extern struct eeprom_device *
-+eeprom_device_register(struct device *dev, struct eeprom_platform_data *data);
-+extern void
-+eeprom_device_unregister(struct eeprom_device *eeprom_dev);
-+
-+#else
-+
-+static inline struct eeprom_device *
-+eeprom_device_register(struct device *dev, char *label)
-+{
-+ return NULL;
-+}
-+
-+static inline void
-+eeprom_device_unregister(struct eeprom_device *eeprom_dev)
-+{
-+}
-+
-+#endif
-+
-+#endif /* EEPROM_CLASS_H__ */
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-esdhc-p2020-broken-timeout.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-esdhc-p2020-broken-timeout.patch
deleted file mode 100644
index 8d8591ff..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-esdhc-p2020-broken-timeout.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-The P2020 platforms have a broken timeout for the ESDHC device.
-This patch forces the driver to use the maximum value.
-
-diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
-index 01e5f62..92c86bf 100644
---- a/drivers/mmc/host/sdhci-of-esdhc.c
-+++ b/drivers/mmc/host/sdhci-of-esdhc.c
-@@ -98,7 +98,7 @@ static struct sdhci_ops sdhci_esdhc_ops = {
- static struct sdhci_pltfm_data sdhci_esdhc_pdata = {
- /* card detection could be handled via GPIO */
- .quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_CARD_DETECTION
-- | SDHCI_QUIRK_NO_CARD_NO_RESET,
-+ | SDHCI_QUIRK_NO_CARD_NO_RESET | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL,
- .ops = &sdhci_esdhc_ops,
- };
-
diff --git a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-fsl-dpaa_eth.patch b/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-fsl-dpaa_eth.patch
deleted file mode 100644
index db04de90..00000000
--- a/packages/base/any/kernels/3.2.65-1+deb7u2/patches/driver-fsl-dpaa_eth.patch
+++ /dev/null
@@ -1,154125 +0,0 @@
-Freescale DPAA Ethernet Support
-
-diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
-index 491fa33..ca5290a 100644
---- a/arch/powerpc/Kconfig
-+++ b/arch/powerpc/Kconfig
-@@ -693,6 +693,42 @@ config FSL_GTM
- help
- Freescale General-purpose Timers support
-
-+config HAS_FSL_PAMU
-+ bool
-+ default n
-+
-+config FSL_PAMU
-+ bool "PAMU/IOMMU support"
-+ depends on HAS_FSL_PAMU
-+ help
-+ Freescale PAMU/IOMMU support
-+
-+config FSL_PAMU_ERRATUM_A_004510
-+ bool "Enable PAMU work-around for erratum A-004510"
-+ depends on FSL_PAMU
-+ # For now, enable this by default, so that we don't have to update
-+ # defconfigs. All current PAMU-enabled SOCs have the erratum.
-+ default y
-+ help
-+ Select this option to enable a work-around for erratum A-004510
-+ in the Freescale PAMU device driver. Erratum A-004510 says that
-+ under certain load conditions, modified cache lines can be discarded,
-+ causing data corruption. This option enables the PAMU portion of
-+ the work-around.
-+
-+config FSL_FMAN_CPC_STASH
-+ bool "Enable stashing of FMAN write transactions for ethernet ports"
-+ depends on FSL_PAMU
-+ default n
-+ help
-+ Select this option to enable stashing of incoming ethernet frames
-+ from FMAN ports into platform cache.
-+
-+config HAS_FSL_QBMAN
-+ bool "Datapath Acceleration Queue and Buffer management"
-+ help
-+ Datapath Acceleration Queue and Buffer management
-+
- # Yes MCA RS/6000s exist but Linux-PPC does not currently support any
- config MCA
- bool
-diff --git a/arch/powerpc/boot/dts/fsl/b4420si-post.dtsi b/arch/powerpc/boot/dts/fsl/b4420si-post.dtsi
-new file mode 100644
-index 0000000..0d13641
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/b4420si-post.dtsi
-@@ -0,0 +1,292 @@
-+/*
-+ * B4420 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2012 Freescale Semiconductor, Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * This software is provided by Freescale Semiconductor "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 Freescale Semiconductor 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.
-+ */
-+
-+&ifc {
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+ compatible = "fsl,ifc", "simple-bus";
-+ interrupts = <25 2 0 0>;
-+};
-+
-+/* controller at 0x200000 */
-+&pci0 {
-+ compatible = "fsl,b4420-pcie", "fsl,qoriq-pcie-v2.4";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ interrupts = <20 2 0 0>;
-+ pcie@0 {
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <20 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 40 1 0 0
-+ 0000 0 0 2 &mpic 1 1 0 0
-+ 0000 0 0 3 &mpic 2 1 0 0
-+ 0000 0 0 4 &mpic 3 1 0 0
-+ >;
-+ };
-+};
-+
-+&bportals {
-+/include/ "qoriq-bman2-portals.dtsi"
-+};
-+&qportals {
-+/include/ "qoriq-qman2-portals.dtsi"
-+};
-+
-+&dcsr {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,dcsr", "simple-bus";
-+
-+ dcsr-epu@0 {
-+ compatible = "fsl,b4420-dcsr-epu", "fsl,dcsr-epu";
-+ interrupts = <52 2 0 0
-+ 84 2 0 0
-+ 85 2 0 0
-+ 94 2 0 0
-+ 95 2 0 0>;
-+ reg = <0x0 0x1000>;
-+ };
-+ dcsr-npc {
-+ compatible = "fsl,b4420-dcsr-cnpc", "fsl,dcsr-cnpc";
-+ reg = <0x1000 0x1000 0x1002000 0x10000>;
-+ };
-+ dcsr-nxc@2000 {
-+ compatible = "fsl,dcsr-nxc";
-+ reg = <0x2000 0x1000>;
-+ };
-+ dcsr-corenet {
-+ compatible = "fsl,dcsr-corenet";
-+ reg = <0x8000 0x1000 0x1A000 0x1000>;
-+ };
-+ dcsr-dpaa@9000 {
-+ compatible = "fsl,b4420-dcsr-dpaa", "fsl,dcsr-dpaa";
-+ reg = <0x9000 0x1000>;
-+ };
-+ dcsr-ocn@11000 {
-+ compatible = "fsl,b4420-dcsr-ocn", "fsl,dcsr-ocn";
-+ reg = <0x11000 0x1000>;
-+ };
-+ dcsr-ddr@12000 {
-+ compatible = "fsl,dcsr-ddr";
-+ dev-handle = <&ddr1>;
-+ reg = <0x12000 0x1000>;
-+ };
-+ dcsr-nal@18000 {
-+ compatible = "fsl,b4420-dcsr-nal", "fsl,dcsr-nal";
-+ reg = <0x18000 0x1000>;
-+ };
-+ dcsr-rcpm@22000 {
-+ compatible = "fsl,b4420-dcsr-rcpm", "fsl,dcsr-rcpm";
-+ reg = <0x22000 0x1000>;
-+ };
-+ dcsr-snpc@30000 {
-+ compatible = "fsl,b4420-dcsr-snpc", "fsl,dcsr-snpc";
-+ reg = <0x30000 0x1000 0x1022000 0x10000>;
-+ };
-+ dcsr-snpc@31000 {
-+ compatible = "fsl,b4420-dcsr-snpc", "fsl,dcsr-snpc";
-+ reg = <0x31000 0x1000 0x1042000 0x10000>;
-+ };
-+ dcsr-cpu-sb-proxy@100000 {
-+ compatible = "fsl,dcsr-e6500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu0>;
-+ reg = <0x100000 0x1000 0x101000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@108000 {
-+ compatible = "fsl,dcsr-e6500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu1>;
-+ reg = <0x108000 0x1000 0x109000 0x1000>;
-+ };
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "simple-bus";
-+
-+ soc-sram-error {
-+ compatible = "fsl,soc-sram-error";
-+ interrupts = <16 2 1 2>;
-+ };
-+
-+ corenet-law@0 {
-+ compatible = "fsl,corenet-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <32>;
-+ };
-+
-+ ddr1: memory-controller@8000 {
-+ compatible = "fsl,qoriq-memory-controller-v4.5", "fsl,qoriq-memory-controller";
-+ reg = <0x8000 0x1000>;
-+ interrupts = <16 2 1 8>;
-+ };
-+
-+ cpc: l3-cache-controller@10000 {
-+ compatible = "fsl,p5020-l3-cache-controller", "fsl,p4080-l3-cache-controller", "cache";
-+ reg = <0x10000 0x1000>;
-+ interrupts = <16 2 1 4>;
-+ };
-+
-+ corenet-cf@18000 {
-+ compatible = "fsl,corenet-cf";
-+ reg = <0x18000 0x1000>;
-+ interrupts = <16 2 1 0>;
-+ fsl,ccf-num-csdids = <32>;
-+ fsl,ccf-num-snoopids = <32>;
-+ };
-+
-+ iommu@20000 {
-+ compatible = "fsl,pamu";
-+ reg = <0x20000 0x4000>;
-+ interrupts = <
-+ 24 2 0 0
-+ 16 2 1 1>;
-+ };
-+
-+/include/ "qoriq-qman1.dtsi"
-+
-+ qman: qman@318000 {
-+ interrupts = <16 2 1 28>;
-+ };
-+
-+/include/ "qoriq-bman1.dtsi"
-+
-+ bman: bman@31a000 {
-+ interrupts = <16 2 1 29>;
-+ };
-+
-+/include/ "qoriq-fman3-0.dtsi"
-+/include/ "qoriq-fman3-0-1g-0.dtsi"
-+/include/ "qoriq-fman3-0-1g-1.dtsi"
-+/include/ "qoriq-fman3-0-1g-2.dtsi"
-+/include/ "qoriq-fman3-0-1g-3.dtsi"
-+ fman0: fman@400000 {
-+ interrupts = <
-+ 96 2 0 0
-+ 16 2 1 30>;
-+
-+ /* tx - 1g - 0 */
-+ port@a8000 {
-+ fsl,qman-channel-id = <0x802>;
-+ };
-+ /* tx - 1g - 1 */
-+ port@a9000 {
-+ fsl,qman-channel-id = <0x803>;
-+ };
-+ /* tx - 1g - 2 */
-+ port@aa000 {
-+ fsl,qman-channel-id = <0x804>;
-+ };
-+ /* tx - 1g - 3 */
-+ port@ab000 {
-+ fsl,qman-channel-id = <0x805>;
-+ };
-+
-+ /* offline - 0 is not usable on B4420 */
-+ /* offline - 1 */
-+ port@82000 {
-+ fsl,qman-channel-id = <0x809>;
-+ };
-+ /* offline - 2 */
-+ port@83000 {
-+ fsl,qman-channel-id = <0x80a>;
-+ };
-+ /* offline - 3 */
-+ port@84000 {
-+ fsl,qman-channel-id = <0x80b>;
-+ };
-+ /* offline - 4 */
-+ port@85000 {
-+ fsl,qman-channel-id = <0x80c>;
-+ };
-+ /* offline - 5 */
-+ port@86000 {
-+ fsl,qman-channel-id = <0x80d>;
-+ };
-+ /* offline - 6 */
-+ port@87000 {
-+ fsl,qman-channel-id = <0x80e>;
-+ };
-+ };
-+
-+/include/ "qoriq-mpic.dtsi"
-+
-+ guts: global-utilities@e0000 {
-+ compatible = "fsl,b4420-device-config";
-+ reg = <0xe0000 0xe00>;
-+ fsl,has-rstcr;
-+ fsl,liodn-bits = <12>;
-+ };
-+
-+ rcpm: global-utilities@e2000 {
-+ compatible = "fsl,b4420-rcpm", "fsl,qoriq-rcpm-2";
-+ reg = <0xe2000 0x1000>;
-+ };
-+
-+/include/ "qoriq-dma-0.dtsi"
-+/include/ "qoriq-dma-1.dtsi"
-+
-+/include/ "qonverge-usb2-dr-0.dtsi"
-+ usb0: usb@210000 {
-+ compatible = "fsl-usb2-dr-v2.4", "fsl-usb2-dr";
-+ };
-+
-+/include/ "qoriq-espi-0.dtsi"
-+ spi@110000 {
-+ fsl,espi-num-chipselects = <4>;
-+ };
-+
-+/include/ "qoriq-esdhc-0.dtsi"
-+ sdhc@114000 {
-+ sdhci,auto-cmd12;
-+ };
-+/include/ "qoriq-i2c-0.dtsi"
-+/include/ "qoriq-i2c-1.dtsi"
-+/include/ "qoriq-duart-0.dtsi"
-+/include/ "qoriq-duart-1.dtsi"
-+/include/ "qoriq-sec5.3-0.dtsi"
-+
-+ L2: l2-cache-controller@c20000 {
-+ next-level-cache = <&cpc>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/b4420si-pre.dtsi b/arch/powerpc/boot/dts/fsl/b4420si-pre.dtsi
-new file mode 100644
-index 0000000..9493fb0
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/b4420si-pre.dtsi
-@@ -0,0 +1,83 @@
-+/*
-+ * B4420 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2012 Freescale Semiconductor, Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * This software is provided by Freescale Semiconductor "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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+/ {
-+ compatible = "fsl,B4420";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ ccsr = &soc;
-+ dcsr = &dcsr;
-+
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ serial2 = &serial2;
-+ serial3 = &serial3;
-+ pci0 = &pci0;
-+ dma0 = &dma0;
-+ dma1 = &dma1;
-+ sdhc = &sdhc;
-+
-+ fman0 = &fman0;
-+ crypto = &crypto;
-+ sec_jr0 = &sec_jr0;
-+ sec_jr1 = &sec_jr1;
-+ sec_jr2 = &sec_jr2;
-+ sec_jr3 = &sec_jr3;
-+ rtic_a = &rtic_a;
-+ rtic_b = &rtic_b;
-+ rtic_c = &rtic_c;
-+ rtic_d = &rtic_d;
-+ sec_mon = &sec_mon;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ cpu0: PowerPC,e6500@0 {
-+ device_type = "cpu";
-+ reg = <0 1>;
-+ next-level-cache = <&L2>;
-+ };
-+ cpu1: PowerPC,e6500@1 {
-+ device_type = "cpu";
-+ reg = <2 3>;
-+ next-level-cache = <&L2>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/b4860si-post.dtsi b/arch/powerpc/boot/dts/fsl/b4860si-post.dtsi
-new file mode 100644
-index 0000000..818f652
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/b4860si-post.dtsi
-@@ -0,0 +1,356 @@
-+/*
-+ * B4860 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&ifc {
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+ compatible = "fsl,ifc", "simple-bus";
-+ interrupts = <25 2 0 0>;
-+};
-+
-+/* controller at 0x200000 */
-+&pci0 {
-+ compatible = "fsl,b4860-pcie", "fsl,qoriq-pcie-v2.4";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ interrupts = <20 2 0 0>;
-+ pcie@0 {
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <20 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 40 1 0 0
-+ 0000 0 0 2 &mpic 1 1 0 0
-+ 0000 0 0 3 &mpic 2 1 0 0
-+ 0000 0 0 4 &mpic 3 1 0 0
-+ >;
-+ };
-+};
-+
-+&rio {
-+ compatible = "fsl,srio";
-+ interrupts = <16 2 1 11>;
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ ranges;
-+
-+ port1 {
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ cell-index = <1>;
-+ };
-+
-+ port2 {
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ cell-index = <2>;
-+ };
-+};
-+
-+&bportals {
-+/include/ "qoriq-bman2-portals.dtsi"
-+};
-+&qportals {
-+/include/ "qoriq-qman2-portals.dtsi"
-+};
-+
-+&dcsr {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,dcsr", "simple-bus";
-+
-+ dcsr-epu@0 {
-+ compatible = "fsl,b4860-dcsr-epu", "fsl,dcsr-epu";
-+ interrupts = <52 2 0 0
-+ 84 2 0 0
-+ 85 2 0 0
-+ 94 2 0 0
-+ 95 2 0 0>;
-+ reg = <0x0 0x1000>;
-+ };
-+ dcsr-npc {
-+ compatible = "fsl,b4860-dcsr-cnpc", "fsl,dcsr-cnpc";
-+ reg = <0x1000 0x1000 0x1002000 0x10000>;
-+ };
-+ dcsr-nxc@2000 {
-+ compatible = "fsl,dcsr-nxc";
-+ reg = <0x2000 0x1000>;
-+ };
-+ dcsr-corenet {
-+ compatible = "fsl,dcsr-corenet";
-+ reg = <0x8000 0x1000 0x1A000 0x1000>;
-+ };
-+ dcsr-dpaa@9000 {
-+ compatible = "fsl,b4860-dcsr-dpaa", "fsl,dcsr-dpaa";
-+ reg = <0x9000 0x1000>;
-+ };
-+ dcsr-ocn@11000 {
-+ compatible = "fsl,b4860-dcsr-ocn", "fsl,dcsr-ocn";
-+ reg = <0x11000 0x1000>;
-+ };
-+ dcsr-ddr@12000 {
-+ compatible = "fsl,dcsr-ddr";
-+ dev-handle = <&ddr1>;
-+ reg = <0x12000 0x1000>;
-+ };
-+ dcsr-ddr@13000 {
-+ compatible = "fsl,dcsr-ddr";
-+ dev-handle = <&ddr2>;
-+ reg = <0x13000 0x1000>;
-+ };
-+ dcsr-nal@18000 {
-+ compatible = "fsl,b4860-dcsr-nal", "fsl,dcsr-nal";
-+ reg = <0x18000 0x1000>;
-+ };
-+ dcsr-rcpm@22000 {
-+ compatible = "fsl,b4860-dcsr-rcpm", "fsl,dcsr-rcpm";
-+ reg = <0x22000 0x1000>;
-+ };
-+ dcsr-snpc@30000 {
-+ compatible = "fsl,b4860-dcsr-snpc", "fsl,dcsr-snpc";
-+ reg = <0x30000 0x1000 0x1022000 0x10000>;
-+ };
-+ dcsr-snpc@31000 {
-+ compatible = "fsl,b4860-dcsr-snpc", "fsl,dcsr-snpc";
-+ reg = <0x31000 0x1000 0x1042000 0x10000>;
-+ };
-+ dcsr-cpu-sb-proxy@100000 {
-+ compatible = "fsl,dcsr-e6500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu0>;
-+ reg = <0x100000 0x1000 0x101000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@108000 {
-+ compatible = "fsl,dcsr-e6500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu1>;
-+ reg = <0x108000 0x1000 0x109000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@110000 {
-+ compatible = "fsl,dcsr-e6500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu2>;
-+ reg = <0x110000 0x1000 0x111000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@118000 {
-+ compatible = "fsl,dcsr-e6500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu3>;
-+ reg = <0x118000 0x1000 0x119000 0x1000>;
-+ };
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "simple-bus";
-+
-+ soc-sram-error {
-+ compatible = "fsl,soc-sram-error";
-+ interrupts = <16 2 1 2>;
-+ };
-+
-+ corenet-law@0 {
-+ compatible = "fsl,corenet-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <32>;
-+ };
-+
-+ ddr1: memory-controller@8000 {
-+ compatible = "fsl,qoriq-memory-controller-v4.5", "fsl,qoriq-memory-controller";
-+ reg = <0x8000 0x1000>;
-+ interrupts = <16 2 1 8>;
-+ };
-+
-+ ddr2: memory-controller@9000 {
-+ compatible = "fsl,qoriq-memory-controller-v4.5","fsl,qoriq-memory-controller";
-+ reg = <0x9000 0x1000>;
-+ interrupts = <16 2 1 9>;
-+ };
-+
-+ cpc: l3-cache-controller@10000 {
-+ compatible = "fsl,p5020-l3-cache-controller", "fsl,p4080-l3-cache-controller", "cache";
-+ reg = <0x10000 0x1000
-+ 0x11000 0x1000>;
-+ interrupts = <16 2 1 4
-+ 16 2 1 5>;
-+ };
-+
-+ corenet-cf@18000 {
-+ compatible = "fsl,corenet-cf";
-+ reg = <0x18000 0x1000>;
-+ interrupts = <16 2 1 0>;
-+ fsl,ccf-num-csdids = <32>;
-+ fsl,ccf-num-snoopids = <32>;
-+ };
-+
-+ iommu@20000 {
-+ compatible = "fsl,pamu-v1.0", "fsl,pamu";
-+ reg = <0x20000 0x4000>;
-+ interrupts = <
-+ 24 2 0 0
-+ 16 2 1 1>;
-+ };
-+
-+/include/ "qoriq-qman1.dtsi"
-+
-+ qman: qman@318000 {
-+ interrupts = <16 2 1 28>;
-+ };
-+
-+/include/ "qoriq-bman1.dtsi"
-+
-+ bman: bman@31a000 {
-+ interrupts = <16 2 1 29>;
-+ };
-+
-+/include/ "qoriq-rman-0.dtsi"
-+ rman: rman@1e0000 {
-+ fsl,qman-channels-id = <0x820 0x821>;
-+ };
-+
-+/include/ "qoriq-fman3-0.dtsi"
-+/include/ "qoriq-fman3-0-1g-0.dtsi"
-+/include/ "qoriq-fman3-0-1g-1.dtsi"
-+/include/ "qoriq-fman3-0-1g-2.dtsi"
-+/include/ "qoriq-fman3-0-1g-3.dtsi"
-+/include/ "qoriq-fman3-0-1g-4.dtsi"
-+/include/ "qoriq-fman3-0-1g-5.dtsi"
-+/include/ "qoriq-fman3-0-10g-0.dtsi"
-+/include/ "qoriq-fman3-0-10g-1.dtsi"
-+ fman0: fman@400000 {
-+ interrupts = <
-+ 96 2 0 0
-+ 16 2 1 30>;
-+
-+ /* tx - 1g - 0 */
-+ port@a8000 {
-+ fsl,qman-channel-id = <0x802>;
-+ };
-+ /* tx - 1g - 1 */
-+ port@a9000 {
-+ fsl,qman-channel-id = <0x803>;
-+ };
-+ /* tx - 1g - 2 */
-+ port@aa000 {
-+ fsl,qman-channel-id = <0x804>;
-+ };
-+ /* tx - 1g - 3 */
-+ port@ab000 {
-+ fsl,qman-channel-id = <0x805>;
-+ };
-+ /* tx - 1g - 4 */
-+ port@ac000 {
-+ fsl,qman-channel-id = <0x806>;
-+ };
-+ /* tx - 1g - 5 */
-+ port@ad000 {
-+ fsl,qman-channel-id = <0x807>;
-+ };
-+ /* offline - 0 is not usable on B4860 */
-+ /* offline - 1 */
-+ port@82000 {
-+ fsl,qman-channel-id = <0x809>;
-+ };
-+ /* offline - 2 */
-+ port@83000 {
-+ fsl,qman-channel-id = <0x80a>;
-+ };
-+ /* offline - 3 */
-+ port@84000 {
-+ fsl,qman-channel-id = <0x80b>;
-+ };
-+ /* offline - 4 */
-+ port@85000 {
-+ fsl,qman-channel-id = <0x80c>;
-+ };
-+ /* offline - 5 */
-+ port@86000 {
-+ fsl,qman-channel-id = <0x80d>;
-+ };
-+ /* offline - 6 */
-+ port@87000 {
-+ fsl,qman-channel-id = <0x80e>;
-+ };
-+ };
-+
-+/include/ "qoriq-mpic.dtsi"
-+
-+ guts: global-utilities@e0000 {
-+ compatible = "fsl,b4860-device-config";
-+ reg = <0xe0000 0xe00>;
-+ fsl,has-rstcr;
-+ fsl,liodn-bits = <12>;
-+ };
-+
-+ clockgen: global-utilities@e1000 {
-+ compatible = "fsl,b4860-clockgen", "fsl,qoriq-clockgen-2";
-+ reg = <0xe1000 0x1000>;
-+ };
-+
-+ rcpm: global-utilities@e2000 {
-+ compatible = "fsl,b4860-rcpm", "fsl,qoriq-rcpm-2";
-+ reg = <0xe2000 0x1000>;
-+ };
-+
-+/include/ "qoriq-dma-0.dtsi"
-+/include/ "qoriq-dma-1.dtsi"
-+
-+/include/ "qonverge-usb2-dr-0.dtsi"
-+ usb0: usb@210000 {
-+ compatible = "fsl-usb2-dr-v2.4", "fsl-usb2-dr";
-+ };
-+
-+/include/ "qoriq-espi-0.dtsi"
-+ spi@110000 {
-+ fsl,espi-num-chipselects = <4>;
-+ };
-+
-+/include/ "qoriq-esdhc-0.dtsi"
-+ sdhc@114000 {
-+ sdhci,auto-cmd12;
-+ };
-+/include/ "qoriq-i2c-0.dtsi"
-+/include/ "qoriq-i2c-1.dtsi"
-+/include/ "qoriq-duart-0.dtsi"
-+/include/ "qoriq-duart-1.dtsi"
-+/include/ "qoriq-sec5.3-0.dtsi"
-+
-+ L2: l2-cache-controller@c20000 {
-+ next-level-cache = <&cpc>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/b4860si-pre.dtsi b/arch/powerpc/boot/dts/fsl/b4860si-pre.dtsi
-new file mode 100644
-index 0000000..eb441da
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/b4860si-pre.dtsi
-@@ -0,0 +1,93 @@
-+/*
-+ * B4860 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+/ {
-+ compatible = "fsl,B4860";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ ccsr = &soc;
-+ dcsr = &dcsr;
-+
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ serial2 = &serial2;
-+ serial3 = &serial3;
-+ pci0 = &pci0;
-+ dma0 = &dma0;
-+ dma1 = &dma1;
-+ sdhc = &sdhc;
-+
-+ fman0 = &fman0;
-+ crypto = &crypto;
-+ sec_jr0 = &sec_jr0;
-+ sec_jr1 = &sec_jr1;
-+ sec_jr2 = &sec_jr2;
-+ sec_jr3 = &sec_jr3;
-+ rtic_a = &rtic_a;
-+ rtic_b = &rtic_b;
-+ rtic_c = &rtic_c;
-+ rtic_d = &rtic_d;
-+ sec_mon = &sec_mon;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ cpu0: PowerPC,e6500@0 {
-+ device_type = "cpu";
-+ reg = <0 1>;
-+ next-level-cache = <&L2>;
-+ };
-+ cpu1: PowerPC,e6500@1 {
-+ device_type = "cpu";
-+ reg = <2 3>;
-+ next-level-cache = <&L2>;
-+ };
-+ cpu2: PowerPC,e6500@2 {
-+ device_type = "cpu";
-+ reg = <4 5>;
-+ next-level-cache = <&L2>;
-+ };
-+ cpu3: PowerPC,e6500@3 {
-+ device_type = "cpu";
-+ reg = <6 7>;
-+ next-level-cache = <&L2>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/bsc9131si-post.dtsi b/arch/powerpc/boot/dts/fsl/bsc9131si-post.dtsi
-new file mode 100644
-index 0000000..5180d9d
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/bsc9131si-post.dtsi
-@@ -0,0 +1,193 @@
-+/*
-+ * BSC9131 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2011-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&ifc {
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+ compatible = "fsl,ifc", "simple-bus";
-+ interrupts = <16 2 0 0 20 2 0 0>;
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "fsl,bsc9131-immr", "simple-bus";
-+ bus-frequency = <0>; // Filled out by uboot.
-+
-+ ecm-law@0 {
-+ compatible = "fsl,ecm-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <12>;
-+ };
-+
-+ ecm@1000 {
-+ compatible = "fsl,bsc9131-ecm", "fsl,ecm";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+ memory-controller@2000 {
-+ compatible = "fsl,bsc9131-memory-controller";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-i2c-0.dtsi"
-+ i2c@3000 {
-+ interrupts = <17 2 0 0>;
-+ };
-+
-+/include/ "pq3-i2c-1.dtsi"
-+ i2c@3100 {
-+ interrupts = <17 2 0 0>;
-+ };
-+
-+/include/ "pq3-duart-0.dtsi"
-+ serial0: serial@4500 {
-+ interrupts = <18 2 0 0>;
-+ };
-+
-+ serial1: serial@4600 {
-+ interrupts = <18 2 0 0 >;
-+ };
-+/include/ "pq3-espi-0.dtsi"
-+ spi0: spi@7000 {
-+ fsl,espi-num-chipselects = <1>;
-+ interrupts = <22 0x2 0 0>;
-+ };
-+
-+/include/ "pq3-gpio-0.dtsi"
-+ gpio-controller@f000 {
-+ interrupts = <19 0x2 0 0>;
-+ };
-+
-+ L2: l2-cache-controller@20000 {
-+ compatible = "fsl,bsc9131-l2-cache-controller";
-+ reg = <0x20000 0x1000>;
-+ cache-line-size = <32>; // 32 bytes
-+ cache-size = <0x40000>; // L2,256K
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-dma-0.dtsi"
-+
-+dma@21300 {
-+
-+ dma-channel@0 {
-+ interrupts = <62 2 0 0>;
-+ };
-+
-+ dma-channel@80 {
-+ interrupts = <63 2 0 0>;
-+ };
-+
-+ dma-channel@100 {
-+ interrupts = <64 2 0 0>;
-+ };
-+
-+ dma-channel@180 {
-+ interrupts = <65 2 0 0>;
-+ };
-+};
-+
-+/include/ "pq3-usb2-dr-0.dtsi"
-+usb@22000 {
-+ compatible = "fsl-usb2-dr","fsl-usb2-dr-v2.2";
-+ interrupts = <40 0x2 0 0>;
-+};
-+
-+/include/ "pq3-esdhc-0.dtsi"
-+ sdhc@2e000 {
-+ fsl,sdhci-auto-cmd12;
-+ interrupts = <41 0x2 0 0>;
-+ };
-+
-+/include/ "pq3-sec4.4-0.dtsi"
-+crypto@30000 {
-+ interrupts = <57 2 0 0>;
-+
-+ sec_jr0: jr@1000 {
-+ interrupts = <58 2 0 0>;
-+ };
-+
-+ sec_jr1: jr@2000 {
-+ interrupts = <59 2 0 0>;
-+ };
-+
-+ sec_jr2: jr@3000 {
-+ interrupts = <60 2 0 0>;
-+ };
-+
-+ sec_jr3: jr@4000 {
-+ interrupts = <61 2 0 0>;
-+ };
-+};
-+
-+/include/ "pq3-mpic.dtsi"
-+
-+timer@41100 {
-+ compatible = "fsl,mpic-v1.2-msgr", "fsl,mpic-msg";
-+ reg = <0x41400 0x200>;
-+ interrupts = <
-+ 0xb0 2
-+ 0xb1 2
-+ 0xb2 2
-+ 0xb3 2>;
-+};
-+
-+/include/ "pq3-etsec2-0.dtsi"
-+enet0: ethernet@b0000 {
-+ queue-group@b0000 {
-+ fsl,rx-bit-map = <0xff>;
-+ fsl,tx-bit-map = <0xff>;
-+ interrupts = <26 2 0 0 27 2 0 0 28 2 0 0>;
-+ };
-+};
-+
-+/include/ "pq3-etsec2-1.dtsi"
-+enet1: ethernet@b1000 {
-+ queue-group@b1000 {
-+ fsl,rx-bit-map = <0xff>;
-+ fsl,tx-bit-map = <0xff>;
-+ interrupts = <33 2 0 0 34 2 0 0 35 2 0 0>;
-+ };
-+};
-+
-+global-utilities@e0000 {
-+ compatible = "fsl,bsc9131-guts";
-+ reg = <0xe0000 0x1000>;
-+ fsl,has-rstcr;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/bsc9131si-pre.dtsi b/arch/powerpc/boot/dts/fsl/bsc9131si-pre.dtsi
-new file mode 100644
-index 0000000..743e4ae
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/bsc9131si-pre.dtsi
-@@ -0,0 +1,59 @@
-+/*
-+ * BSC9131 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2011-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+/ {
-+ compatible = "fsl,BSC9131";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ serial0 = &serial0;
-+ ethernet0 = &enet0;
-+ ethernet1 = &enet1;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ PowerPC,BSC9131@0 {
-+ device_type = "cpu";
-+ compatible = "fsl,e500v2";
-+ reg = <0x0>;
-+ next-level-cache = <&L2>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/e500mc_power_isa.dtsi b/arch/powerpc/boot/dts/fsl/e500mc_power_isa.dtsi
-new file mode 100644
-index 0000000..870c653
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/e500mc_power_isa.dtsi
-@@ -0,0 +1,58 @@
-+/*
-+ * e500mc Power ISA Device Tree Source (include)
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "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 Freescale Semiconductor 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.
-+ */
-+
-+/ {
-+ cpus {
-+ power-isa-version = "2.06";
-+ power-isa-b; // Base
-+ power-isa-e; // Embedded
-+ power-isa-atb; // Alternate Time Base
-+ power-isa-cs; // Cache Specification
-+ power-isa-ds; // Decorated Storage
-+ power-isa-e.ed; // Embedded.Enhanced Debug
-+ power-isa-e.pd; // Embedded.External PID
-+ power-isa-e.hv; // Embedded.Hypervisor
-+ power-isa-e.le; // Embedded.Little-Endian
-+ power-isa-e.pm; // Embedded.Performance Monitor
-+ power-isa-e.pc; // Embedded.Processor Control
-+ power-isa-ecl; // Embedded Cache Locking
-+ power-isa-exp; // External Proxy
-+ power-isa-fp; // Floating Point
-+ power-isa-fp.r; // Floating Point.Record
-+ power-isa-mmc; // Memory Coherence
-+ power-isa-scpm; // Store Conditional Page Mobility
-+ power-isa-wt; // Wait
-+ mmu-type = "power-embedded";
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/e500v2_power_isa.dtsi b/arch/powerpc/boot/dts/fsl/e500v2_power_isa.dtsi
-new file mode 100644
-index 0000000..f492814
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/e500v2_power_isa.dtsi
-@@ -0,0 +1,52 @@
-+/*
-+ * e500v2 Power ISA Device Tree Source (include)
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "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 Freescale Semiconductor 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.
-+ */
-+
-+/ {
-+ cpus {
-+ power-isa-version = "2.03";
-+ power-isa-b; // Base
-+ power-isa-e; // Embedded
-+ power-isa-atb; // Alternate Time Base
-+ power-isa-cs; // Cache Specification
-+ power-isa-e.le; // Embedded.Little-Endian
-+ power-isa-e.pm; // Embedded.Performance Monitor
-+ power-isa-ecl; // Embedded Cache Locking
-+ power-isa-mmc; // Memory Coherence
-+ power-isa-sp; // Signal Processing Engine
-+ power-isa-sp.fd; // SPE.Embedded Float Scalar Double
-+ power-isa-sp.fs; // SPE.Embedded Float Scalar Single
-+ power-isa-sp.fv; // SPE.Embedded Float Vector
-+ mmu-type = "power-embedded";
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/e5500_power_isa.dtsi b/arch/powerpc/boot/dts/fsl/e5500_power_isa.dtsi
-new file mode 100644
-index 0000000..3230212
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/e5500_power_isa.dtsi
-@@ -0,0 +1,59 @@
-+/*
-+ * e5500 Power ISA Device Tree Source (include)
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "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 Freescale Semiconductor 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.
-+ */
-+
-+/ {
-+ cpus {
-+ power-isa-version = "2.06";
-+ power-isa-b; // Base
-+ power-isa-e; // Embedded
-+ power-isa-atb; // Alternate Time Base
-+ power-isa-cs; // Cache Specification
-+ power-isa-ds; // Decorated Storage
-+ power-isa-e.ed; // Embedded.Enhanced Debug
-+ power-isa-e.pd; // Embedded.External PID
-+ power-isa-e.hv; // Embedded.Hypervisor
-+ power-isa-e.le; // Embedded.Little-Endian
-+ power-isa-e.pm; // Embedded.Performance Monitor
-+ power-isa-e.pc; // Embedded.Processor Control
-+ power-isa-ecl; // Embedded Cache Locking
-+ power-isa-exp; // External Proxy
-+ power-isa-fp; // Floating Point
-+ power-isa-fp.r; // Floating Point.Record
-+ power-isa-mmc; // Memory Coherence
-+ power-isa-scpm; // Store Conditional Page Mobility
-+ power-isa-wt; // Wait
-+ power-isa-64; // 64-bit
-+ mmu-type = "power-embedded";
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/interlaken-lac-portals.dtsi b/arch/powerpc/boot/dts/fsl/interlaken-lac-portals.dtsi
-new file mode 100644
-index 0000000..9cffccf
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/interlaken-lac-portals.dtsi
-@@ -0,0 +1,156 @@
-+/* T4240 Interlaken LAC Portal device tree stub with 24 portals.
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "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 Freescale Semiconductor 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.
-+ */
-+
-+#address-cells = <0x1>;
-+#size-cells = <0x1>;
-+compatible = "fsl,interlaken-lac-portals";
-+
-+lportal0: lac-portal@0 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0x0 0x1000>;
-+};
-+
-+lportal1: lac-portal@1000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0x1000 0x1000>;
-+};
-+
-+lportal2: lac-portal@2000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0x2000 0x1000>;
-+};
-+
-+lportal3: lac-portal@3000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0x3000 0x1000>;
-+};
-+
-+lportal4: lac-portal@4000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0x4000 0x1000>;
-+};
-+
-+lportal5: lac-portal@5000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0x5000 0x1000>;
-+};
-+
-+lportal6: lac-portal@6000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0x6000 0x1000>;
-+};
-+
-+lportal7: lac-portal@7000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0x7000 0x1000>;
-+};
-+
-+lportal8: lac-portal@8000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0x8000 0x1000>;
-+};
-+
-+lportal9: lac-portal@9000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0x9000 0x1000>;
-+};
-+
-+lportal10: lac-portal@A000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0xA000 0x1000>;
-+};
-+
-+lportal11: lac-portal@B000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0xB000 0x1000>;
-+};
-+
-+lportal12: lac-portal@C000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0xC000 0x1000>;
-+};
-+
-+lportal13: lac-portal@D000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0xD000 0x1000>;
-+};
-+
-+lportal14: lac-portal@E000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0xE000 0x1000>;
-+};
-+
-+lportal15: lac-portal@F000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0xF000 0x1000>;
-+};
-+
-+lportal16: lac-portal@10000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0x10000 0x1000>;
-+};
-+
-+lportal17: lac-portal@11000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0x11000 0x1000>;
-+};
-+
-+lportal18: lac-portal@1200 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0x12000 0x1000>;
-+};
-+
-+lportal19: lac-portal@13000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0x13000 0x1000>;
-+};
-+
-+lportal20: lac-portal@14000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0x14000 0x1000>;
-+};
-+
-+lportal21: lac-portal@15000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0x15000 0x1000>;
-+};
-+
-+lportal22: lac-portal@16000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0x16000 0x1000>;
-+};
-+
-+lportal23: lac-portal@17000 {
-+ compatible = "fsl,interlaken-lac-portal-v1.0";
-+ reg = <0x17000 0x1000>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/interlaken-lac.dtsi b/arch/powerpc/boot/dts/fsl/interlaken-lac.dtsi
-new file mode 100644
-index 0000000..e820872
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/interlaken-lac.dtsi
-@@ -0,0 +1,45 @@
-+/*
-+ * T4 Interlaken Look-aside Controller (LAC) device tree stub
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "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 Freescale Semiconductor 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.
-+ */
-+
-+lac: lac@229000 {
-+ compatible = "fsl,interlaken-lac";
-+ reg = <0x229000 0x1000>;
-+ interrupts = <16 2 1 18>;
-+};
-+
-+lac-hv@228000 {
-+ compatible = "fsl,interlaken-lac-hv";
-+ reg = <0x228000 0x1000>;
-+ fsl,non-hv-node = <&lac>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/mpc8536si-post.dtsi b/arch/powerpc/boot/dts/fsl/mpc8536si-post.dtsi
-new file mode 100644
-index 0000000..900f117
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/mpc8536si-post.dtsi
-@@ -0,0 +1,262 @@
-+/*
-+ * MPC8536 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&lbc {
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+ compatible = "fsl,mpc8536-elbc", "fsl,elbc", "simple-bus";
-+ interrupts = <19 2 0 0>;
-+};
-+
-+/* controller at 0x8000 */
-+&pci0 {
-+ compatible = "fsl,mpc8540-pci";
-+ device_type = "pci";
-+ interrupts = <24 0x2 0 0>;
-+ bus-range = <0 0xff>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+};
-+
-+/* controller at 0x9000 */
-+&pci1 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <25 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <25 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x4 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x5 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x6 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x7 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+/* controller at 0xa000 */
-+&pci2 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <26 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <26 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x0 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x1 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x2 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x3 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+/* controller at 0xb000 */
-+&pci3 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <27 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <27 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x8 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x9 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0xa 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0xb 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "fsl,mpc8536-immr", "simple-bus";
-+ bus-frequency = <0>; // Filled out by uboot.
-+
-+ ecm-law@0 {
-+ compatible = "fsl,ecm-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <12>;
-+ };
-+
-+ ecm@1000 {
-+ compatible = "fsl,mpc8536-ecm", "fsl,ecm";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <17 2 0 0>;
-+ };
-+
-+ memory-controller@2000 {
-+ compatible = "fsl,mpc8536-memory-controller";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <18 2 0 0>;
-+ };
-+
-+/include/ "pq3-i2c-0.dtsi"
-+/include/ "pq3-i2c-1.dtsi"
-+/include/ "pq3-duart-0.dtsi"
-+
-+/include/ "pq3-espi-0.dtsi"
-+ spi@7000 {
-+ fsl,espi-num-chipselects = <4>;
-+ };
-+
-+/include/ "pq3-gpio-0.dtsi"
-+
-+ /* mark compat w/8572 to get some erratum treatment */
-+ gpio-controller@f000 {
-+ compatible = "fsl,mpc8572-gpio", "fsl,pq3-gpio";
-+ };
-+
-+ sata@18000 {
-+ compatible = "fsl,mpc8536-sata", "fsl,pq-sata";
-+ reg = <0x18000 0x1000>;
-+ cell-index = <1>;
-+ interrupts = <74 0x2 0 0>;
-+ };
-+
-+ sata@19000 {
-+ compatible = "fsl,mpc8536-sata", "fsl,pq-sata";
-+ reg = <0x19000 0x1000>;
-+ cell-index = <2>;
-+ interrupts = <41 0x2 0 0>;
-+ };
-+
-+ L2: l2-cache-controller@20000 {
-+ compatible = "fsl,mpc8536-l2-cache-controller";
-+ reg = <0x20000 0x1000>;
-+ cache-line-size = <32>; // 32 bytes
-+ cache-size = <0x80000>; // L2, 512K
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-dma-0.dtsi"
-+/include/ "pq3-etsec1-0.dtsi"
-+ enet0: ethernet@24000 {
-+ fsl,wake-on-filer;
-+ fsl,pmc-handle = <&etsec1_clk>;
-+ };
-+/include/ "pq3-etsec1-timer-0.dtsi"
-+
-+ usb@22000 {
-+ compatible = "fsl-usb2-mph-v1.2", "fsl,mpc8536-usb2-mph", "fsl-usb2-mph";
-+ reg = <0x22000 0x1000>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ interrupts = <28 0x2 0 0>;
-+ };
-+
-+ usb@23000 {
-+ compatible = "fsl-usb2-mph-v1.2", "fsl,mpc8536-usb2-mph", "fsl-usb2-mph";
-+ reg = <0x23000 0x1000>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ interrupts = <46 0x2 0 0>;
-+ };
-+
-+ ptp_clock@24e00 {
-+ interrupts = <68 2 0 0 69 2 0 0 70 2 0 0 71 2 0 0>;
-+ };
-+
-+/include/ "pq3-etsec1-2.dtsi"
-+ enet2: ethernet@26000 {
-+ cell-index = <1>;
-+ fsl,wake-on-filer;
-+ fsl,pmc-handle = <&etsec3_clk>;
-+ };
-+
-+ usb@2b000 {
-+ compatible = "fsl,mpc8536-usb2-dr", "fsl-usb2-dr";
-+ reg = <0x2b000 0x1000>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ interrupts = <60 0x2 0 0>;
-+ };
-+
-+/include/ "pq3-esdhc-0.dtsi"
-+ sdhc@2e000 {
-+ compatible = "fsl,mpc8536-esdhc", "fsl,esdhc";
-+ };
-+
-+/include/ "pq3-sec3.0-0.dtsi"
-+/include/ "pq3-mpic.dtsi"
-+/include/ "pq3-mpic-timer-B.dtsi"
-+
-+ global-utilities@e0000 {
-+ compatible = "fsl,mpc8536-guts";
-+ reg = <0xe0000 0x1000>;
-+ fsl,has-rstcr;
-+ };
-+
-+/include/ "pq3-power.dtsi"
-+ power@e0070 {
-+ compatible = "fsl,mpc8536-pmc", "fsl,mpc8548-pmc";
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/mpc8536si-pre.dtsi b/arch/powerpc/boot/dts/fsl/mpc8536si-pre.dtsi
-new file mode 100644
-index 0000000..152906f
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/mpc8536si-pre.dtsi
-@@ -0,0 +1,66 @@
-+/*
-+ * MPC8536 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "e500v2_power_isa.dtsi"
-+
-+/ {
-+ compatible = "fsl,MPC8536";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ ethernet0 = &enet0;
-+ ethernet1 = &enet2;
-+ pci0 = &pci0;
-+ pci1 = &pci1;
-+ pci2 = &pci2;
-+ pci3 = &pci3;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ PowerPC,8536@0 {
-+ device_type = "cpu";
-+ reg = <0x0>;
-+ next-level-cache = <&L2>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/mpc8544si-post.dtsi b/arch/powerpc/boot/dts/fsl/mpc8544si-post.dtsi
-new file mode 100644
-index 0000000..ea7416a
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/mpc8544si-post.dtsi
-@@ -0,0 +1,193 @@
-+/*
-+ * MPC8544 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&lbc {
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+ compatible = "fsl,mpc8544-lbc", "fsl,pq3-localbus", "simple-bus";
-+ interrupts = <19 2 0 0>;
-+};
-+
-+/* controller at 0x8000 */
-+&pci0 {
-+ compatible = "fsl,mpc8540-pci";
-+ device_type = "pci";
-+ interrupts = <24 0x2 0 0>;
-+ bus-range = <0 0xff>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+};
-+
-+/* controller at 0x9000 */
-+&pci1 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <25 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <25 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x4 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x5 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x6 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x7 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+/* controller at 0xa000 */
-+&pci2 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <26 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <26 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x0 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x1 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x2 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x3 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+/* controller at 0xb000 */
-+&pci3 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <27 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <27 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x8 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x9 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0xa 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0xb 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "fsl,mpc8544-immr", "simple-bus";
-+ bus-frequency = <0>; // Filled out by uboot.
-+
-+ ecm-law@0 {
-+ compatible = "fsl,ecm-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <10>;
-+ };
-+
-+ ecm@1000 {
-+ compatible = "fsl,mpc8544-ecm", "fsl,ecm";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <17 2 0 0>;
-+ };
-+
-+ memory-controller@2000 {
-+ compatible = "fsl,mpc8544-memory-controller";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <18 2 0 0>;
-+ };
-+
-+/include/ "pq3-i2c-0.dtsi"
-+/include/ "pq3-i2c-1.dtsi"
-+/include/ "pq3-duart-0.dtsi"
-+
-+ L2: l2-cache-controller@20000 {
-+ compatible = "fsl,mpc8544-l2-cache-controller";
-+ reg = <0x20000 0x1000>;
-+ cache-line-size = <32>; // 32 bytes
-+ cache-size = <0x40000>; // L2, 256K
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-dma-0.dtsi"
-+/include/ "pq3-etsec1-0.dtsi"
-+/include/ "pq3-etsec1-2.dtsi"
-+
-+ ethernet@26000 {
-+ cell-index = <1>;
-+ };
-+
-+/include/ "pq3-sec2.1-0.dtsi"
-+/include/ "pq3-mpic.dtsi"
-+
-+ global-utilities@e0000 {
-+ compatible = "fsl,mpc8544-guts";
-+ reg = <0xe0000 0x1000>;
-+ fsl,has-rstcr;
-+ };
-+
-+/include/ "pq3-power.dtsi"
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/mpc8544si-pre.dtsi b/arch/powerpc/boot/dts/fsl/mpc8544si-pre.dtsi
-new file mode 100644
-index 0000000..5a69baf
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/mpc8544si-pre.dtsi
-@@ -0,0 +1,66 @@
-+/*
-+ * MPC8544 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "e500v2_power_isa.dtsi"
-+
-+/ {
-+ compatible = "fsl,MPC8544";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ ethernet0 = &enet0;
-+ ethernet1 = &enet2;
-+ pci0 = &pci0;
-+ pci1 = &pci1;
-+ pci2 = &pci2;
-+ pci3 = &pci3;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ PowerPC,8544@0 {
-+ device_type = "cpu";
-+ reg = <0x0>;
-+ next-level-cache = <&L2>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/mpc8548si-post.dtsi b/arch/powerpc/boot/dts/fsl/mpc8548si-post.dtsi
-new file mode 100644
-index 0000000..dddb737
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/mpc8548si-post.dtsi
-@@ -0,0 +1,161 @@
-+/*
-+ * MPC8548 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&lbc {
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+ compatible = "fsl,mpc8548-lbc", "fsl,pq3-localbus", "simple-bus";
-+ interrupts = <19 2 0 0>;
-+};
-+
-+/* controller at 0x8000 */
-+&pci0 {
-+ compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
-+ device_type = "pci";
-+ interrupts = <24 0x2 0 0>;
-+ bus-range = <0 0xff>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+};
-+
-+/* controller at 0x9000 */
-+&pci1 {
-+ compatible = "fsl,mpc8540-pci";
-+ device_type = "pci";
-+ interrupts = <25 0x2 0 0>;
-+ bus-range = <0 0xff>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+};
-+
-+/* controller at 0xa000 */
-+&pci2 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <26 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <26 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x0 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x1 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x2 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x3 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+&rio {
-+ compatible = "fsl,srio";
-+ interrupts = <48 2 0 0>;
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ fsl,srio-rmu-handle = <&rmu>;
-+ ranges;
-+
-+ port1 {
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ cell-index = <1>;
-+ };
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "fsl,mpc8548-immr", "simple-bus";
-+ bus-frequency = <0>; // Filled out by uboot.
-+
-+ ecm-law@0 {
-+ compatible = "fsl,ecm-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <10>;
-+ };
-+
-+ ecm@1000 {
-+ compatible = "fsl,mpc8548-ecm", "fsl,ecm";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <17 2 0 0>;
-+ };
-+
-+ memory-controller@2000 {
-+ compatible = "fsl,mpc8548-memory-controller";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <18 2 0 0>;
-+ };
-+
-+/include/ "pq3-i2c-0.dtsi"
-+/include/ "pq3-i2c-1.dtsi"
-+/include/ "pq3-duart-0.dtsi"
-+
-+ L2: l2-cache-controller@20000 {
-+ compatible = "fsl,mpc8548-l2-cache-controller";
-+ reg = <0x20000 0x1000>;
-+ cache-line-size = <32>; // 32 bytes
-+ cache-size = <0x80000>; // L2, 512K
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-dma-0.dtsi"
-+/include/ "pq3-etsec1-0.dtsi"
-+/include/ "pq3-etsec1-1.dtsi"
-+/include/ "pq3-etsec1-2.dtsi"
-+/include/ "pq3-etsec1-3.dtsi"
-+
-+/include/ "pq3-sec2.1-0.dtsi"
-+/include/ "pq3-mpic.dtsi"
-+/include/ "pq3-rmu-0.dtsi"
-+
-+ global-utilities@e0000 {
-+ compatible = "fsl,mpc8548-guts";
-+ reg = <0xe0000 0x1000>;
-+ fsl,has-rstcr;
-+ };
-+
-+/include/ "pq3-power.dtsi"
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/mpc8548si-pre.dtsi b/arch/powerpc/boot/dts/fsl/mpc8548si-pre.dtsi
-new file mode 100644
-index 0000000..fc1ce97
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/mpc8548si-pre.dtsi
-@@ -0,0 +1,67 @@
-+/*
-+ * MPC8548 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "e500v2_power_isa.dtsi"
-+
-+/ {
-+ compatible = "fsl,MPC8548";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ ethernet0 = &enet0;
-+ ethernet1 = &enet1;
-+ ethernet2 = &enet2;
-+ ethernet3 = &enet3;
-+ pci0 = &pci0;
-+ pci1 = &pci1;
-+ pci2 = &pci2;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ PowerPC,8548@0 {
-+ device_type = "cpu";
-+ reg = <0x0>;
-+ next-level-cache = <&L2>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/mpc8568si-post.dtsi b/arch/powerpc/boot/dts/fsl/mpc8568si-post.dtsi
-new file mode 100644
-index 0000000..64e7075
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/mpc8568si-post.dtsi
-@@ -0,0 +1,270 @@
-+/*
-+ * MPC8568 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&lbc {
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+ compatible = "fsl,mpc8568-localbus", "fsl,pq3-localbus", "simple-bus";
-+ interrupts = <19 2 0 0>;
-+ sleep = <&pmc 0x08000000>;
-+};
-+
-+/* controller at 0x8000 */
-+&pci0 {
-+ compatible = "fsl,mpc8540-pci";
-+ device_type = "pci";
-+ interrupts = <24 0x2 0 0>;
-+ bus-range = <0 0xff>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ sleep = <&pmc 0x80000000>;
-+};
-+
-+/* controller at 0xa000 */
-+&pci1 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <26 2 0 0>;
-+ sleep = <&pmc 0x20000000>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <26 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x0 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x1 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x2 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x3 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+&rio {
-+ compatible = "fsl,srio";
-+ interrupts = <48 2 0 0>;
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ fsl,srio-rmu-handle = <&rmu>;
-+ sleep = <&pmc 0x00080000>;
-+ ranges;
-+
-+ port1 {
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ cell-index = <1>;
-+ };
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "fsl,mpc8568-immr", "simple-bus";
-+ bus-frequency = <0>; // Filled out by uboot.
-+
-+ ecm-law@0 {
-+ compatible = "fsl,ecm-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <10>;
-+ };
-+
-+ ecm@1000 {
-+ compatible = "fsl,mpc8568-ecm", "fsl,ecm";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <17 2 0 0>;
-+ };
-+
-+ memory-controller@2000 {
-+ compatible = "fsl,mpc8568-memory-controller";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <18 2 0 0>;
-+ };
-+
-+ i2c-sleep-nexus {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "simple-bus";
-+ sleep = <&pmc 0x00000004>;
-+ ranges;
-+
-+/include/ "pq3-i2c-0.dtsi"
-+/include/ "pq3-i2c-1.dtsi"
-+
-+ };
-+
-+ duart-sleep-nexus {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "simple-bus";
-+ sleep = <&pmc 0x00000002>;
-+ ranges;
-+
-+/include/ "pq3-duart-0.dtsi"
-+
-+ };
-+
-+ L2: l2-cache-controller@20000 {
-+ compatible = "fsl,mpc8568-l2-cache-controller";
-+ reg = <0x20000 0x1000>;
-+ cache-line-size = <32>; // 32 bytes
-+ cache-size = <0x80000>; // L2, 512K
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-dma-0.dtsi"
-+ dma@21300 {
-+ sleep = <&pmc 0x00000400>;
-+ };
-+
-+/include/ "pq3-etsec1-0.dtsi"
-+ ethernet@24000 {
-+ sleep = <&pmc 0x00000080>;
-+ };
-+
-+/include/ "pq3-etsec1-1.dtsi"
-+ ethernet@25000 {
-+ sleep = <&pmc 0x00000040>;
-+ };
-+
-+ par_io@e0100 {
-+ reg = <0xe0100 0x100>;
-+ device_type = "par_io";
-+ };
-+
-+/include/ "pq3-sec2.1-0.dtsi"
-+ crypto@30000 {
-+ sleep = <&pmc 0x01000000>;
-+ };
-+
-+/include/ "pq3-mpic.dtsi"
-+/include/ "pq3-rmu-0.dtsi"
-+ rmu@d3000 {
-+ sleep = <&pmc 0x00040000>;
-+ };
-+
-+ global-utilities@e0000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,mpc8568-guts", "fsl,mpc8548-guts";
-+ reg = <0xe0000 0x1000>;
-+ ranges = <0 0xe0000 0x1000>;
-+ fsl,has-rstcr;
-+
-+ pmc: power@70 {
-+ compatible = "fsl,mpc8568-pmc",
-+ "fsl,mpc8548-pmc";
-+ reg = <0x70 0x20>;
-+ };
-+ };
-+};
-+
-+&qe {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "qe";
-+ compatible = "fsl,qe";
-+ sleep = <&pmc 0x00000800>;
-+ brg-frequency = <0>;
-+ bus-frequency = <396000000>;
-+ fsl,qe-num-riscs = <2>;
-+ fsl,qe-num-snums = <28>;
-+
-+ qeic: interrupt-controller@80 {
-+ interrupt-controller;
-+ compatible = "fsl,qe-ic";
-+ #address-cells = <0>;
-+ #interrupt-cells = <1>;
-+ reg = <0x80 0x80>;
-+ interrupts = <46 2 0 0 46 2 0 0>; //high:30 low:30
-+ interrupt-parent = <&mpic>;
-+ };
-+
-+ spi@4c0 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,spi";
-+ reg = <0x4c0 0x40>;
-+ cell-index = <0>;
-+ interrupts = <2>;
-+ interrupt-parent = <&qeic>;
-+ };
-+
-+ spi@500 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ cell-index = <1>;
-+ compatible = "fsl,spi";
-+ reg = <0x500 0x40>;
-+ interrupts = <1>;
-+ interrupt-parent = <&qeic>;
-+ };
-+
-+ ucc@2000 {
-+ cell-index = <1>;
-+ reg = <0x2000 0x200>;
-+ interrupts = <32>;
-+ interrupt-parent = <&qeic>;
-+ };
-+
-+ ucc@3000 {
-+ cell-index = <2>;
-+ reg = <0x3000 0x200>;
-+ interrupts = <33>;
-+ interrupt-parent = <&qeic>;
-+ };
-+
-+ muram@10000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,qe-muram", "fsl,cpm-muram";
-+ ranges = <0x0 0x10000 0x10000>;
-+
-+ data-only@0 {
-+ compatible = "fsl,qe-muram-data",
-+ "fsl,cpm-muram-data";
-+ reg = <0x0 0x10000>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/mpc8568si-pre.dtsi b/arch/powerpc/boot/dts/fsl/mpc8568si-pre.dtsi
-new file mode 100644
-index 0000000..122ca3b
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/mpc8568si-pre.dtsi
-@@ -0,0 +1,68 @@
-+/*
-+ * MPC8568 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "e500v2_power_isa.dtsi"
-+
-+/ {
-+ compatible = "fsl,MPC8568";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ ethernet0 = &enet0;
-+ ethernet1 = &enet1;
-+ ethernet2 = &enet2;
-+ ethernet3 = &enet3;
-+ pci0 = &pci0;
-+ pci1 = &pci1;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ PowerPC,8568@0 {
-+ device_type = "cpu";
-+ reg = <0x0>;
-+ next-level-cache = <&L2>;
-+ sleep = <&pmc 0x00008000 // core
-+ &pmc 0x00004000>; // timebase
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/mpc8569si-post.dtsi b/arch/powerpc/boot/dts/fsl/mpc8569si-post.dtsi
-new file mode 100644
-index 0000000..3e6346a
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/mpc8569si-post.dtsi
-@@ -0,0 +1,304 @@
-+/*
-+ * MPC8569 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&lbc {
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+ compatible = "fsl,mpc8569-elbc", "fsl,elbc", "simple-bus";
-+ interrupts = <19 2 0 0>;
-+ sleep = <&pmc 0x08000000>;
-+};
-+
-+/* controller at 0xa000 */
-+&pci1 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <26 2 0 0>;
-+ sleep = <&pmc 0x20000000>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <26 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x0 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x1 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x2 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x3 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+&rio {
-+ compatible = "fsl,srio";
-+ interrupts = <48 2 0 0>;
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ fsl,srio-rmu-handle = <&rmu>;
-+ sleep = <&pmc 0x00080000>;
-+ ranges;
-+
-+ port1 {
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ cell-index = <1>;
-+ };
-+
-+ port2 {
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ cell-index = <2>;
-+ };
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "fsl,mpc8569-immr", "simple-bus";
-+ bus-frequency = <0>; // Filled out by uboot.
-+
-+ ecm-law@0 {
-+ compatible = "fsl,ecm-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <10>;
-+ };
-+
-+ ecm@1000 {
-+ compatible = "fsl,mpc8569-ecm", "fsl,ecm";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <17 2 0 0>;
-+ };
-+
-+ memory-controller@2000 {
-+ compatible = "fsl,mpc8569-memory-controller";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <18 2 0 0>;
-+ };
-+
-+ i2c-sleep-nexus {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "simple-bus";
-+ sleep = <&pmc 0x00000004>;
-+ ranges;
-+
-+/include/ "pq3-i2c-0.dtsi"
-+/include/ "pq3-i2c-1.dtsi"
-+
-+ };
-+
-+ duart-sleep-nexus {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "simple-bus";
-+ sleep = <&pmc 0x00000002>;
-+ ranges;
-+
-+/include/ "pq3-duart-0.dtsi"
-+
-+ };
-+
-+ L2: l2-cache-controller@20000 {
-+ compatible = "fsl,mpc8569-l2-cache-controller";
-+ reg = <0x20000 0x1000>;
-+ cache-line-size = <32>; // 32 bytes
-+ cache-size = <0x80000>; // L2, 512K
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-dma-0.dtsi"
-+/include/ "pq3-esdhc-0.dtsi"
-+ sdhc@2e000 {
-+ sleep = <&pmc 0x00200000>;
-+ };
-+
-+ par_io@e0100 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0xe0100 0x100>;
-+ ranges = <0x0 0xe0100 0x100>;
-+ device_type = "par_io";
-+ };
-+
-+/include/ "pq3-sec3.1-0.dtsi"
-+ crypto@30000 {
-+ sleep = <&pmc 0x01000000>;
-+ };
-+
-+/include/ "pq3-mpic.dtsi"
-+/include/ "pq3-rmu-0.dtsi"
-+ rmu@d3000 {
-+ sleep = <&pmc 0x00040000>;
-+ };
-+
-+ global-utilities@e0000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,mpc8569-guts", "fsl,mpc8548-guts";
-+ reg = <0xe0000 0x1000>;
-+ ranges = <0 0xe0000 0x1000>;
-+ fsl,has-rstcr;
-+
-+ pmc: power@70 {
-+ compatible = "fsl,mpc8569-pmc",
-+ "fsl,mpc8548-pmc";
-+ reg = <0x70 0x20>;
-+ };
-+ };
-+};
-+
-+&qe {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "qe";
-+ compatible = "fsl,qe";
-+ sleep = <&pmc 0x00000800>;
-+ brg-frequency = <0>;
-+ bus-frequency = <0>;
-+ fsl,qe-num-riscs = <4>;
-+ fsl,qe-num-snums = <46>;
-+
-+ qeic: interrupt-controller@80 {
-+ interrupt-controller;
-+ compatible = "fsl,qe-ic";
-+ #address-cells = <0>;
-+ #interrupt-cells = <1>;
-+ reg = <0x80 0x80>;
-+ interrupts = <46 2 0 0 46 2 0 0>; //high:30 low:30
-+ interrupt-parent = <&mpic>;
-+ };
-+
-+ timer@440 {
-+ compatible = "fsl,mpc8569-qe-gtm",
-+ "fsl,qe-gtm", "fsl,gtm";
-+ reg = <0x440 0x40>;
-+ interrupts = <12 13 14 15>;
-+ interrupt-parent = <&qeic>;
-+ /* Filled in by U-Boot */
-+ clock-frequency = <0>;
-+ };
-+
-+ spi@4c0 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,mpc8569-qe-spi", "fsl,spi";
-+ reg = <0x4c0 0x40>;
-+ cell-index = <0>;
-+ interrupts = <2>;
-+ interrupt-parent = <&qeic>;
-+ };
-+
-+ spi@500 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ cell-index = <1>;
-+ compatible = "fsl,spi";
-+ reg = <0x500 0x40>;
-+ interrupts = <1>;
-+ interrupt-parent = <&qeic>;
-+ };
-+
-+ usb@6c0 {
-+ compatible = "fsl,mpc8569-qe-usb",
-+ "fsl,mpc8323-qe-usb";
-+ reg = <0x6c0 0x40 0x8b00 0x100>;
-+ interrupts = <11>;
-+ interrupt-parent = <&qeic>;
-+ };
-+
-+ ucc@2000 {
-+ cell-index = <1>;
-+ reg = <0x2000 0x200>;
-+ interrupts = <32>;
-+ interrupt-parent = <&qeic>;
-+ };
-+
-+ ucc@2200 {
-+ cell-index = <3>;
-+ reg = <0x2200 0x200>;
-+ interrupts = <34>;
-+ interrupt-parent = <&qeic>;
-+ };
-+
-+ ucc@3000 {
-+ cell-index = <2>;
-+ reg = <0x3000 0x200>;
-+ interrupts = <33>;
-+ interrupt-parent = <&qeic>;
-+ };
-+
-+ ucc@3200 {
-+ cell-index = <4>;
-+ reg = <0x3200 0x200>;
-+ interrupts = <35>;
-+ interrupt-parent = <&qeic>;
-+ };
-+
-+ ucc@3400 {
-+ cell-index = <6>;
-+ reg = <0x3400 0x200>;
-+ interrupts = <41>;
-+ interrupt-parent = <&qeic>;
-+ };
-+
-+ ucc@3600 {
-+ cell-index = <8>;
-+ reg = <0x3600 0x200>;
-+ interrupts = <43>;
-+ interrupt-parent = <&qeic>;
-+ };
-+
-+ muram@10000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,qe-muram", "fsl,cpm-muram";
-+ ranges = <0x0 0x10000 0x20000>;
-+
-+ data-only@0 {
-+ compatible = "fsl,qe-muram-data",
-+ "fsl,cpm-muram-data";
-+ reg = <0x0 0x20000>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/mpc8569si-pre.dtsi b/arch/powerpc/boot/dts/fsl/mpc8569si-pre.dtsi
-new file mode 100644
-index 0000000..2cd15a2
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/mpc8569si-pre.dtsi
-@@ -0,0 +1,67 @@
-+/*
-+ * MPC8569 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "e500v2_power_isa.dtsi"
-+
-+/ {
-+ compatible = "fsl,MPC8569";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ ethernet0 = &enet0;
-+ ethernet1 = &enet1;
-+ ethernet2 = &enet2;
-+ ethernet3 = &enet3;
-+ pci1 = &pci1;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ PowerPC,8569@0 {
-+ device_type = "cpu";
-+ reg = <0x0>;
-+ next-level-cache = <&L2>;
-+ sleep = <&pmc 0x00008000 // core
-+ &pmc 0x00004000>; // timebase
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/mpc8572si-post.dtsi b/arch/powerpc/boot/dts/fsl/mpc8572si-post.dtsi
-new file mode 100644
-index 0000000..7313351
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/mpc8572si-post.dtsi
-@@ -0,0 +1,198 @@
-+/*
-+ * MPC8572 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&lbc {
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+ compatible = "fsl,mpc8572-elbc", "fsl,elbc", "simple-bus";
-+ interrupts = <19 2 0 0>;
-+};
-+
-+/* controller at 0x8000 */
-+&pci0 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <24 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <24 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x8 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x9 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0xa 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0xb 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+/* controller at 0x9000 */
-+&pci1 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <25 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <25 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x4 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x5 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x6 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x7 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+/* controller at 0xa000 */
-+&pci2 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <26 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <26 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x0 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x1 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x2 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x3 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "fsl,mpc8572-immr", "simple-bus";
-+ bus-frequency = <0>; // Filled out by uboot.
-+
-+ ecm-law@0 {
-+ compatible = "fsl,ecm-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <12>;
-+ };
-+
-+ ecm@1000 {
-+ compatible = "fsl,mpc8572-ecm", "fsl,ecm";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <17 2 0 0>;
-+ };
-+
-+ memory-controller@2000 {
-+ compatible = "fsl,mpc8572-memory-controller";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <18 2 0 0>;
-+ };
-+
-+ memory-controller@6000 {
-+ compatible = "fsl,mpc8572-memory-controller";
-+ reg = <0x6000 0x1000>;
-+ interrupts = <18 2 0 0>;
-+ };
-+
-+/include/ "pq3-i2c-0.dtsi"
-+/include/ "pq3-i2c-1.dtsi"
-+/include/ "pq3-duart-0.dtsi"
-+/include/ "pq3-dma-1.dtsi"
-+/include/ "pq3-gpio-0.dtsi"
-+ gpio-controller@f000 {
-+ compatible = "fsl,mpc8572-gpio", "fsl,pq3-gpio";
-+ };
-+
-+ L2: l2-cache-controller@20000 {
-+ compatible = "fsl,mpc8572-l2-cache-controller";
-+ reg = <0x20000 0x1000>;
-+ cache-line-size = <32>; // 32 bytes
-+ cache-size = <0x100000>; // L2,1M
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-dma-0.dtsi"
-+/include/ "pq3-etsec1-0.dtsi"
-+/include/ "pq3-etsec1-timer-0.dtsi"
-+
-+ ptp_clock@24e00 {
-+ interrupts = <68 2 0 0 69 2 0 0 70 2 0 0 71 2 0 0>;
-+ };
-+
-+/include/ "pq3-etsec1-1.dtsi"
-+/include/ "pq3-etsec1-2.dtsi"
-+/include/ "pq3-etsec1-3.dtsi"
-+/include/ "pq3-sec3.0-0.dtsi"
-+/include/ "pq3-mpic.dtsi"
-+/include/ "pq3-mpic-timer-B.dtsi"
-+
-+ global-utilities@e0000 {
-+ compatible = "fsl,mpc8572-guts";
-+ reg = <0xe0000 0x1000>;
-+ fsl,has-rstcr;
-+ };
-+
-+/include/ "pq3-power.dtsi"
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/mpc8572si-pre.dtsi b/arch/powerpc/boot/dts/fsl/mpc8572si-pre.dtsi
-new file mode 100644
-index 0000000..28c2a86
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/mpc8572si-pre.dtsi
-@@ -0,0 +1,73 @@
-+/*
-+ * MPC8572 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "e500v2_power_isa.dtsi"
-+
-+/ {
-+ compatible = "fsl,MPC8572";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ ethernet0 = &enet0;
-+ ethernet1 = &enet1;
-+ ethernet2 = &enet2;
-+ ethernet3 = &enet3;
-+ pci0 = &pci0;
-+ pci1 = &pci1;
-+ pci2 = &pci2;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ PowerPC,8572@0 {
-+ device_type = "cpu";
-+ reg = <0x0>;
-+ next-level-cache = <&L2>;
-+ };
-+
-+ PowerPC,8572@1 {
-+ device_type = "cpu";
-+ reg = <0x1>;
-+ next-level-cache = <&L2>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p1010si-post.dtsi b/arch/powerpc/boot/dts/fsl/p1010si-post.dtsi
-new file mode 100644
-index 0000000..e949c47
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p1010si-post.dtsi
-@@ -0,0 +1,211 @@
-+/*
-+ * P1010/P1014 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2011-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&ifc {
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+ compatible = "fsl,ifc", "simple-bus";
-+ interrupts = <16 2 0 0 19 2 0 0>;
-+};
-+
-+/* controller at 0x9000 */
-+&pci0 {
-+ compatible = "fsl,p1010-pcie", "fsl,qoriq-pcie-v2.3", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x4 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x5 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x6 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x7 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+/* controller at 0xa000 */
-+&pci1 {
-+ compatible = "fsl,p1010-pcie", "fsl,qoriq-pcie-v2.3", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x0 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x1 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x2 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x3 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "fsl,p1010-immr", "simple-bus";
-+ bus-frequency = <0>; // Filled out by uboot.
-+
-+ ecm-law@0 {
-+ compatible = "fsl,ecm-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <12>;
-+ };
-+
-+ ecm@1000 {
-+ compatible = "fsl,p1010-ecm", "fsl,ecm";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+ memory-controller@2000 {
-+ compatible = "fsl,p1010-memory-controller";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-i2c-0.dtsi"
-+/include/ "pq3-i2c-1.dtsi"
-+/include/ "pq3-duart-0.dtsi"
-+/include/ "pq3-espi-0.dtsi"
-+ spi0: spi@7000 {
-+ fsl,espi-num-chipselects = <1>;
-+ };
-+
-+/include/ "pq3-gpio-0.dtsi"
-+/include/ "pq3-sata2-0.dtsi"
-+/include/ "pq3-sata2-1.dtsi"
-+/include/ "pq3-tdm1.0-0.dtsi"
-+
-+ can0: can@1c000 {
-+ compatible = "fsl,p1010-flexcan";
-+ reg = <0x1c000 0x1000>;
-+ interrupts = <48 0x2 0 0>;
-+ };
-+
-+ can1: can@1d000 {
-+ compatible = "fsl,p1010-flexcan";
-+ reg = <0x1d000 0x1000>;
-+ interrupts = <61 0x2 0 0>;
-+ };
-+
-+ L2: l2-cache-controller@20000 {
-+ compatible = "fsl,p1010-l2-cache-controller",
-+ "fsl,p1014-l2-cache-controller";
-+ reg = <0x20000 0x1000>;
-+ cache-line-size = <32>; // 32 bytes
-+ cache-size = <0x40000>; // L2,256K
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-dma-0.dtsi"
-+/include/ "pq3-usb2-dr-0.dtsi"
-+ usb@22000 {
-+ compatible = "fsl-usb2-dr-v1.6", "fsl-usb2-dr";
-+ };
-+/include/ "pq3-esdhc-0.dtsi"
-+ sdhc@2e000 {
-+ compatible = "fsl,p1010-esdhc", "fsl,esdhc";
-+ sdhci,auto-cmd12;
-+ };
-+
-+/include/ "pq3-sec4.4-0.dtsi"
-+/include/ "pq3-mpic.dtsi"
-+/include/ "pq3-mpic-timer-B.dtsi"
-+
-+/include/ "pq3-etsec2-0.dtsi"
-+ enet0: ethernet@b0000 {
-+ fsl,pmc-handle = <&etsec1_clk>;
-+
-+ queue-group@b0000 {
-+ fsl,rx-bit-map = <0xff>;
-+ fsl,tx-bit-map = <0xff>;
-+ };
-+ };
-+
-+/include/ "pq3-etsec2-1.dtsi"
-+ enet1: ethernet@b1000 {
-+ fsl,pmc-handle = <&etsec2_clk>;
-+
-+ queue-group@b1000 {
-+ fsl,rx-bit-map = <0xff>;
-+ fsl,tx-bit-map = <0xff>;
-+ };
-+ };
-+
-+/include/ "pq3-etsec2-2.dtsi"
-+ enet2: ethernet@b2000 {
-+ fsl,pmc-handle = <&etsec3_clk>;
-+
-+ queue-group@b2000 {
-+ fsl,rx-bit-map = <0xff>;
-+ fsl,tx-bit-map = <0xff>;
-+ };
-+
-+ };
-+
-+ global-utilities@e0000 {
-+ compatible = "fsl,p1010-guts";
-+ reg = <0xe0000 0x1000>;
-+ fsl,has-rstcr;
-+ };
-+
-+/include/ "pq3-power.dtsi"
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p1010si-pre.dtsi b/arch/powerpc/boot/dts/fsl/p1010si-pre.dtsi
-new file mode 100644
-index 0000000..6e76f9b
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p1010si-pre.dtsi
-@@ -0,0 +1,67 @@
-+/*
-+ * P1010/P1014 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "e500v2_power_isa.dtsi"
-+
-+/ {
-+ compatible = "fsl,P1010";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ ethernet0 = &enet0;
-+ ethernet1 = &enet1;
-+ ethernet2 = &enet2;
-+ pci0 = &pci0;
-+ pci1 = &pci1;
-+ can0 = &can0;
-+ can1 = &can1;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ PowerPC,P1010@0 {
-+ device_type = "cpu";
-+ reg = <0x0>;
-+ next-level-cache = <&L2>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p1020si-post.dtsi b/arch/powerpc/boot/dts/fsl/p1020si-post.dtsi
-new file mode 100644
-index 0000000..5af0aae
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p1020si-post.dtsi
-@@ -0,0 +1,201 @@
-+/*
-+ * P1020/P1011 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&lbc {
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+ compatible = "fsl,p1020-elbc", "fsl,elbc", "simple-bus";
-+ interrupts = <19 2 0 0>;
-+};
-+
-+/* controller at 0x9000 */
-+&pci0 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x4 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x5 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x6 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x7 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+/* controller at 0xa000 */
-+&pci1 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x0 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x1 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x2 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x3 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "fsl,p1020-immr", "simple-bus";
-+ bus-frequency = <0>; // Filled out by uboot.
-+
-+ ecm-law@0 {
-+ compatible = "fsl,ecm-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <12>;
-+ };
-+
-+ ecm@1000 {
-+ compatible = "fsl,p1020-ecm", "fsl,ecm";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+ memory-controller@2000 {
-+ compatible = "fsl,p1020-memory-controller";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-i2c-0.dtsi"
-+/include/ "pq3-i2c-1.dtsi"
-+/include/ "pq3-duart-0.dtsi"
-+
-+/include/ "pq3-espi-0.dtsi"
-+ spi@7000 {
-+ fsl,espi-num-chipselects = <4>;
-+ };
-+
-+/include/ "pq3-gpio-0.dtsi"
-+/include/ "pq3-tdm1.0-0.dtsi"
-+
-+ L2: l2-cache-controller@20000 {
-+ compatible = "fsl,p1020-l2-cache-controller";
-+ reg = <0x20000 0x1000>;
-+ cache-line-size = <32>; // 32 bytes
-+ cache-size = <0x40000>; // L2,256K
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-dma-0.dtsi"
-+/include/ "pq3-usb2-dr-0.dtsi"
-+ usb@22000 {
-+ compatible = "fsl-usb2-dr-v1.6", "fsl-usb2-dr";
-+ };
-+/include/ "pq3-usb2-dr-1.dtsi"
-+ usb@23000 {
-+ compatible = "fsl-usb2-dr-v1.6", "fsl-usb2-dr";
-+ };
-+
-+/include/ "pq3-esdhc-0.dtsi"
-+ sdhc@2e000 {
-+ compatible = "fsl,p1020-esdhc", "fsl,esdhc";
-+ sdhci,auto-cmd12;
-+ };
-+/include/ "pq3-sec3.3-0.dtsi"
-+
-+/include/ "pq3-mpic.dtsi"
-+/include/ "pq3-mpic-timer-B.dtsi"
-+
-+ ptp_timer: ptimer@b0e00 {
-+ compatible = "fsl,gianfar-ptp-timer";
-+ reg = <0xb0e00 0xb0>;
-+ fsl,ts-to-buffer;
-+ fsl,tmr-prsc = <0x2>;
-+ fsl,clock-source-select = <1>;
-+ };
-+
-+/include/ "pq3-etsec2-0.dtsi"
-+ enet0: enet0_grp2: ethernet@b0000 {
-+ fsl,pmc-handle = <&etsec1_clk>;
-+ ptimer-handle = <&ptp_timer>;
-+ };
-+
-+/include/ "pq3-etsec2-1.dtsi"
-+ enet1: enet1_grp2: ethernet@b1000 {
-+ fsl,pmc-handle = <&etsec2_clk>;
-+ ptimer-handle = <&ptp_timer>;
-+ };
-+
-+/include/ "pq3-etsec2-2.dtsi"
-+ enet2: enet2_grp2: ethernet@b2000 {
-+ fsl,pmc-handle = <&etsec3_clk>;
-+ ptimer-handle = <&ptp_timer>;
-+ };
-+
-+ global-utilities@e0000 {
-+ compatible = "fsl,p1020-guts";
-+ reg = <0xe0000 0x1000>;
-+ fsl,has-rstcr;
-+ };
-+
-+/include/ "pq3-power.dtsi"
-+};
-+
-+/include/ "pq3-etsec2-grp2-0.dtsi"
-+/include/ "pq3-etsec2-grp2-1.dtsi"
-+/include/ "pq3-etsec2-grp2-2.dtsi"
-diff --git a/arch/powerpc/boot/dts/fsl/p1020si-pre.dtsi b/arch/powerpc/boot/dts/fsl/p1020si-pre.dtsi
-new file mode 100644
-index 0000000..fed9c4c
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p1020si-pre.dtsi
-@@ -0,0 +1,71 @@
-+/*
-+ * P1020/P1011 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "e500v2_power_isa.dtsi"
-+
-+/ {
-+ compatible = "fsl,P1020";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ ethernet0 = &enet0;
-+ ethernet1 = &enet1;
-+ ethernet2 = &enet2;
-+ pci0 = &pci0;
-+ pci1 = &pci1;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ PowerPC,P1020@0 {
-+ device_type = "cpu";
-+ reg = <0x0>;
-+ next-level-cache = <&L2>;
-+ };
-+
-+ PowerPC,P1020@1 {
-+ device_type = "cpu";
-+ reg = <0x1>;
-+ next-level-cache = <&L2>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi b/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi
-new file mode 100644
-index 0000000..cbdf47f
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi
-@@ -0,0 +1,262 @@
-+/*
-+ * P1021/P1012 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2011-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&lbc {
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+ compatible = "fsl,p1021-elbc", "fsl,elbc", "simple-bus";
-+ interrupts = <19 2 0 0>;
-+};
-+
-+/* controller at 0x9000 */
-+&pci0 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x4 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x5 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x6 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x7 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+/* controller at 0xa000 */
-+&pci1 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x0 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x1 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x2 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x3 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "fsl,p1021-immr", "simple-bus";
-+ bus-frequency = <0>; // Filled out by uboot.
-+
-+ ecm-law@0 {
-+ compatible = "fsl,ecm-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <12>;
-+ };
-+
-+ ecm@1000 {
-+ compatible = "fsl,p1021-ecm", "fsl,ecm";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+ memory-controller@2000 {
-+ compatible = "fsl,p1021-memory-controller";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-i2c-0.dtsi"
-+/include/ "pq3-i2c-1.dtsi"
-+/include/ "pq3-duart-0.dtsi"
-+
-+/include/ "pq3-espi-0.dtsi"
-+ spi@7000 {
-+ fsl,espi-num-chipselects = <4>;
-+ };
-+
-+/include/ "pq3-gpio-0.dtsi"
-+
-+ L2: l2-cache-controller@20000 {
-+ compatible = "fsl,p1021-l2-cache-controller";
-+ reg = <0x20000 0x1000>;
-+ cache-line-size = <32>; // 32 bytes
-+ cache-size = <0x40000>; // L2,256K
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-dma-0.dtsi"
-+/include/ "pq3-usb2-dr-0.dtsi"
-+ usb@22000 {
-+ compatible = "fsl-usb2-dr-v1.6", "fsl-usb2-dr";
-+ };
-+
-+/include/ "pq3-esdhc-0.dtsi"
-+ sdhc@2e000 {
-+ sdhci,auto-cmd12;
-+ };
-+
-+/include/ "pq3-sec3.3-0.dtsi"
-+
-+/include/ "pq3-mpic.dtsi"
-+/include/ "pq3-mpic-timer-B.dtsi"
-+
-+ ptp_timer: ptimer@b0e00 {
-+ compatible = "fsl,gianfar-ptp-timer";
-+ reg = <0xb0e00 0xb0>;
-+ fsl,ts-to-buffer;
-+ fsl,tmr-prsc = <0x2>;
-+ fsl,clock-source-select = <1>;
-+ };
-+
-+/include/ "pq3-etsec2-0.dtsi"
-+ enet0: enet0_grp2: ethernet@b0000 {
-+ fsl,pmc-handle = <&etsec1_clk>;
-+ ptimer-handle = <&ptp_timer>;
-+ };
-+
-+/include/ "pq3-etsec2-1.dtsi"
-+ enet1: enet1_grp2: ethernet@b1000 {
-+ fsl,pmc-handle = <&etsec2_clk>;
-+ ptimer-handle = <&ptp_timer>;
-+ };
-+
-+/include/ "pq3-etsec2-2.dtsi"
-+ enet2: enet2_grp2: ethernet@b2000 {
-+ fsl,pmc-handle = <&etsec3_clk>;
-+ ptimer-handle = <&ptp_timer>;
-+ };
-+
-+ global-utilities@e0000 {
-+ compatible = "fsl,p1021-guts";
-+ reg = <0xe0000 0x1000>;
-+ fsl,has-rstcr;
-+ };
-+
-+/include/ "pq3-power.dtsi"
-+};
-+
-+&qe {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "qe";
-+ compatible = "fsl,qe";
-+ fsl,qe-num-riscs = <1>;
-+ fsl,qe-num-snums = <28>;
-+
-+ qeic: interrupt-controller@80 {
-+ interrupt-controller;
-+ compatible = "fsl,qe-ic";
-+ #address-cells = <0>;
-+ #interrupt-cells = <1>;
-+ reg = <0x80 0x80>;
-+ interrupts = <63 2 0 0 60 2 0 0>; //high:47 low:44
-+ };
-+
-+ ucc@2000 {
-+ cell-index = <1>;
-+ reg = <0x2000 0x200>;
-+ interrupts = <32>;
-+ interrupt-parent = <&qeic>;
-+ };
-+
-+ mdio@2120 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ reg = <0x2120 0x18>;
-+ compatible = "fsl,ucc-mdio";
-+ };
-+
-+ ucc@2400 {
-+ cell-index = <5>;
-+ reg = <0x2400 0x200>;
-+ interrupts = <40>;
-+ interrupt-parent = <&qeic>;
-+ };
-+
-+ ucc@2600 {
-+ cell-index = <7>;
-+ reg = <0x2600 0x200>;
-+ interrupts = <42>;
-+ interrupt-parent = <&qeic>;
-+ };
-+
-+ ucc@2200 {
-+ cell-index = <3>;
-+ reg = <0x2200 0x200>;
-+ interrupts = <34>;
-+ interrupt-parent = <&qeic>;
-+ };
-+
-+ muram@10000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,qe-muram", "fsl,cpm-muram";
-+ ranges = <0x0 0x10000 0x6000>;
-+
-+ data-only@0 {
-+ compatible = "fsl,qe-muram-data",
-+ "fsl,cpm-muram-data";
-+ reg = <0x0 0x6000>;
-+ };
-+ };
-+};
-+
-+/include/ "pq3-etsec2-grp2-0.dtsi"
-+/include/ "pq3-etsec2-grp2-1.dtsi"
-+/include/ "pq3-etsec2-grp2-2.dtsi"
-diff --git a/arch/powerpc/boot/dts/fsl/p1021si-pre.dtsi b/arch/powerpc/boot/dts/fsl/p1021si-pre.dtsi
-new file mode 100644
-index 0000000..36161b5
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p1021si-pre.dtsi
-@@ -0,0 +1,71 @@
-+/*
-+ * P1021/P1012 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "e500v2_power_isa.dtsi"
-+
-+/ {
-+ compatible = "fsl,P1021";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ ethernet0 = &enet0;
-+ ethernet1 = &enet1;
-+ ethernet2 = &enet2;
-+ pci0 = &pci0;
-+ pci1 = &pci1;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ PowerPC,P1021@0 {
-+ device_type = "cpu";
-+ reg = <0x0>;
-+ next-level-cache = <&L2>;
-+ };
-+
-+ PowerPC,P1021@1 {
-+ device_type = "cpu";
-+ reg = <0x1>;
-+ next-level-cache = <&L2>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p1022si-post.dtsi b/arch/powerpc/boot/dts/fsl/p1022si-post.dtsi
-new file mode 100644
-index 0000000..3f3fc1e
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p1022si-post.dtsi
-@@ -0,0 +1,252 @@
-+/*
-+ * P1022/P1013 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&lbc {
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+ /*
-+ * The localbus on the P1022 is not a simple-bus because of the eLBC
-+ * pin muxing when the DIU is enabled.
-+ */
-+ compatible = "fsl,p1022-elbc", "fsl,elbc";
-+ interrupts = <19 2 0 0>;
-+};
-+
-+/* controller at 0x9000 */
-+&pci0 {
-+ compatible = "fsl,p1022-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x4 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x5 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x6 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x7 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+/* controller at 0xa000 */
-+&pci1 {
-+ compatible = "fsl,p1022-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x0 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x1 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x2 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x3 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+/* controller at 0xb000 */
-+&pci2 {
-+ compatible = "fsl,p1022-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x8 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x9 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0xa 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0xb 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "fsl,p1022-immr", "simple-bus";
-+ bus-frequency = <0>; // Filled out by uboot.
-+
-+ ecm-law@0 {
-+ compatible = "fsl,ecm-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <12>;
-+ };
-+
-+ ecm@1000 {
-+ compatible = "fsl,p1022-ecm", "fsl,ecm";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+ memory-controller@2000 {
-+ compatible = "fsl,p1022-memory-controller";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-i2c-0.dtsi"
-+/include/ "pq3-i2c-1.dtsi"
-+/include/ "pq3-duart-0.dtsi"
-+/include/ "pq3-espi-0.dtsi"
-+ spi@7000 {
-+ fsl,espi-num-chipselects = <4>;
-+ };
-+
-+/include/ "pq3-dma-1.dtsi"
-+ dma@c300 {
-+ dma00: dma-channel@0 {
-+ compatible = "fsl,ssi-dma-channel";
-+ };
-+ dma01: dma-channel@80 {
-+ compatible = "fsl,ssi-dma-channel";
-+ };
-+ };
-+
-+/include/ "pq3-gpio-0.dtsi"
-+
-+ display@10000 {
-+ compatible = "fsl,diu", "fsl,p1022-diu";
-+ reg = <0x10000 1000>;
-+ interrupts = <64 2 0 0>;
-+ };
-+
-+ ssi@15000 {
-+ compatible = "fsl,mpc8610-ssi";
-+ cell-index = <0>;
-+ reg = <0x15000 0x100>;
-+ interrupts = <75 2 0 0>;
-+ fsl,playback-dma = <&dma00>;
-+ fsl,capture-dma = <&dma01>;
-+ fsl,fifo-depth = <15>;
-+ };
-+
-+/include/ "pq3-tdm1.0-0.dtsi"
-+/include/ "pq3-sata2-0.dtsi"
-+/include/ "pq3-sata2-1.dtsi"
-+
-+ L2: l2-cache-controller@20000 {
-+ compatible = "fsl,p1022-l2-cache-controller";
-+ reg = <0x20000 0x1000>;
-+ cache-line-size = <32>; // 32 bytes
-+ cache-size = <0x40000>; // L2,256K
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-dma-0.dtsi"
-+/include/ "pq3-usb2-dr-0.dtsi"
-+ usb@22000 {
-+ compatible = "fsl-usb2-dr-v1.6", "fsl-usb2-dr";
-+ };
-+/include/ "pq3-usb2-dr-1.dtsi"
-+ usb@23000 {
-+ compatible = "fsl-usb2-dr-v1.6", "fsl-usb2-dr";
-+ };
-+
-+/include/ "pq3-esdhc-0.dtsi"
-+ sdhc@2e000 {
-+ compatible = "fsl,p1022-esdhc", "fsl,esdhc";
-+ sdhci,auto-cmd12;
-+ };
-+
-+/include/ "pq3-sec3.3-0.dtsi"
-+/include/ "pq3-mpic.dtsi"
-+/include/ "pq3-mpic-timer-B.dtsi"
-+
-+/include/ "pq3-etsec2-0.dtsi"
-+ enet0: enet0_grp2: ethernet@b0000 {
-+ fsl,wake-on-filer;
-+ fsl,pmc-handle = <&etsec1_clk>;
-+ };
-+
-+/include/ "pq3-etsec2-1.dtsi"
-+ enet1: enet1_grp2: ethernet@b1000 {
-+ fsl,wake-on-filer;
-+ fsl,pmc-handle = <&etsec2_clk>;
-+ };
-+
-+ global-utilities@e0000 {
-+ compatible = "fsl,p1022-guts";
-+ reg = <0xe0000 0x1000>;
-+ fsl,has-rstcr;
-+ };
-+
-+/include/ "pq3-power.dtsi"
-+ power@e0070 {
-+ compatible = "fsl,p1022-pmc", "fsl,mpc8536-pmc",
-+ "fsl,mpc8548-pmc";
-+ };
-+
-+};
-+
-+/include/ "pq3-etsec2-grp2-0.dtsi"
-+/include/ "pq3-etsec2-grp2-1.dtsi"
-diff --git a/arch/powerpc/boot/dts/fsl/p1022si-pre.dtsi b/arch/powerpc/boot/dts/fsl/p1022si-pre.dtsi
-new file mode 100644
-index 0000000..1956dea
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p1022si-pre.dtsi
-@@ -0,0 +1,71 @@
-+/*
-+ * P1022/P1013 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "e500v2_power_isa.dtsi"
-+
-+/ {
-+ compatible = "fsl,P1022";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ ethernet0 = &enet0;
-+ ethernet1 = &enet1;
-+ pci0 = &pci0;
-+ pci1 = &pci1;
-+ pci2 = &pci2;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ PowerPC,P1022@0 {
-+ device_type = "cpu";
-+ reg = <0x0>;
-+ next-level-cache = <&L2>;
-+ };
-+
-+ PowerPC,P1022@1 {
-+ device_type = "cpu";
-+ reg = <0x1>;
-+ next-level-cache = <&L2>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p1023si-post.dtsi b/arch/powerpc/boot/dts/fsl/p1023si-post.dtsi
-new file mode 100644
-index 0000000..7bb575a
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p1023si-post.dtsi
-@@ -0,0 +1,413 @@
-+/*
-+ * P1023/P1017 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2011-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&lbc {
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+ compatible = "fsl,p1023-elbc", "fsl,elbc", "simple-bus";
-+ interrupts = <19 2 0 0>;
-+};
-+
-+/* controller at 0xa000 */
-+&pci0 {
-+ compatible = "fsl,p1023-pcie", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 0 0>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 0 0>;
-+ };
-+};
-+
-+/* controller at 0x9000 */
-+&pci1 {
-+ compatible = "fsl,p1023-pcie", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 0 0>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 0 0>;
-+ };
-+};
-+
-+/* controller at 0xb000 */
-+&pci2 {
-+ compatible = "fsl,p1023-pcie", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 0 0>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 0 0>;
-+ };
-+};
-+
-+&qportals {
-+ #address-cells = <0x1>;
-+ #size-cells = <0x1>;
-+ compatible = "simple-bus";
-+ qportal0: qman-portal@0 {
-+ cell-index = <0x0>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x0 0x4000 0x100000 0x1000>;
-+ interrupts = <29 2 0 0>;
-+ fsl,qman-channel-id = <0x0>;
-+ };
-+
-+ qportal1: qman-portal@4000 {
-+ cell-index = <0x1>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x4000 0x4000 0x101000 0x1000>;
-+ interrupts = <31 2 0 0>;
-+ fsl,qman-channel-id = <0x1>;
-+ };
-+
-+ qportal2: qman-portal@8000 {
-+ cell-index = <0x2>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x8000 0x4000 0x102000 0x1000>;
-+ interrupts = <33 2 0 0>;
-+ fsl,qman-channel-id = <0x2>;
-+ };
-+};
-+
-+&bportals {
-+ #address-cells = <0x1>;
-+ #size-cells = <0x1>;
-+ compatible = "simple-bus";
-+ bman-portal@0 {
-+ cell-index = <0x0>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x0 0x4000 0x100000 0x1000>;
-+ interrupts = <30 2 0 0>;
-+ };
-+ bman-portal@4000 {
-+ cell-index = <0x1>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x4000 0x4000 0x101000 0x1000>;
-+ interrupts = <32 2 0 0>;
-+ };
-+ bman-portal@8000 {
-+ cell-index = <2>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x8000 0x4000 0x102000 0x1000>;
-+ interrupts = <34 2 0 0>;
-+ };
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "fsl,p1023-immr", "simple-bus";
-+ bus-frequency = <0>; // Filled out by uboot.
-+
-+ ecm-law@0 {
-+ compatible = "fsl,ecm-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <12>;
-+ };
-+
-+ ecm@1000 {
-+ compatible = "fsl,p1023-ecm", "fsl,ecm";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+ memory-controller@2000 {
-+ compatible = "fsl,p1023-memory-controller";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-i2c-0.dtsi"
-+/include/ "pq3-i2c-1.dtsi"
-+/include/ "pq3-duart-0.dtsi"
-+
-+/include/ "pq3-espi-0.dtsi"
-+ spi@7000 {
-+ fsl,espi-num-chipselects = <4>;
-+ };
-+
-+/include/ "pq3-gpio-0.dtsi"
-+
-+ L2: l2-cache-controller@20000 {
-+ compatible = "fsl,p1023-l2-cache-controller";
-+ reg = <0x20000 0x1000>;
-+ cache-line-size = <32>; // 32 bytes
-+ cache-size = <0x40000>; // L2,256K
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-dma-0.dtsi"
-+/include/ "pq3-usb2-dr-0.dtsi"
-+ usb@22000 {
-+ compatible = "fsl-usb2-dr-v1.6", "fsl-usb2-dr";
-+ };
-+
-+ crypto: crypto@300000 {
-+ compatible = "fsl,sec-v4.2", "fsl,sec-v4.0";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0x30000 0x10000>;
-+ ranges = <0 0x30000 0x10000>;
-+ interrupts = <58 2 0 0>;
-+
-+ sec_jr0: jr@1000 {
-+ compatible = "fsl,sec-v4.2-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <45 2 0 0>;
-+ };
-+
-+ sec_jr1: jr@2000 {
-+ compatible = "fsl,sec-v4.2-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <45 2 0 0>;
-+ };
-+
-+ sec_jr2: jr@3000 {
-+ compatible = "fsl,sec-v4.2-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x3000 0x1000>;
-+ interrupts = <57 2 0 0>;
-+ };
-+
-+ sec_jr3: jr@4000 {
-+ compatible = "fsl,sec-v4.2-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x4000 0x1000>;
-+ interrupts = <57 2 0 0>;
-+ };
-+
-+ rtic@6000 {
-+ compatible = "fsl,sec-v4.2-rtic",
-+ "fsl,sec-v4.0-rtic";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0x6000 0x100>;
-+ ranges = <0x0 0x6100 0xe00>;
-+
-+ rtic_a: rtic-a@0 {
-+ compatible = "fsl,sec-v4.2-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x00 0x20 0x100 0x80>;
-+ };
-+
-+ rtic_b: rtic-b@20 {
-+ compatible = "fsl,sec-v4.2-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x20 0x20 0x200 0x80>;
-+ };
-+
-+ rtic_c: rtic-c@40 {
-+ compatible = "fsl,sec-v4.2-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x40 0x20 0x300 0x80>;
-+ };
-+
-+ rtic_d: rtic-d@60 {
-+ compatible = "fsl,sec-v4.2-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x60 0x20 0x500 0x80>;
-+ };
-+ };
-+ };
-+
-+/include/ "pq3-mpic.dtsi"
-+/include/ "pq3-mpic-timer-B.dtsi"
-+
-+ qman: qman@88000 {
-+ compatible = "fsl,qman";
-+ reg = <0x88000 0x1000>;
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+ bman: bman@8a000 {
-+ compatible = "fsl,bman";
-+ reg = <0x8a000 0x1000>;
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+ global-utilities@e0000 {
-+ compatible = "fsl,p1023-guts";
-+ reg = <0xe0000 0x1000>;
-+ fsl,has-rstcr;
-+ };
-+
-+ fman0: fman@100000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ cell-index = <0>;
-+ compatible = "fsl,fman", "simple-bus";
-+ ranges = <0 0x100000 0x100000>;
-+ reg = <0x100000 0x100000>;
-+ clock-frequency = <0>;
-+ interrupts = <
-+ 24 2 0 0
-+ 16 2 0 0>;
-+ cc@0 {
-+ compatible = "fsl,fman-cc";
-+ };
-+ muram@0 {
-+ compatible = "fsl,fman-muram";
-+ reg = <0x0 0x10000>;
-+ };
-+ bmi@80000 {
-+ compatible = "fsl,fman-bmi";
-+ reg = <0x80000 0x400>;
-+ };
-+ qmi@80400 {
-+ compatible = "fsl,fman-qmi";
-+ reg = <0x80400 0x400>;
-+ };
-+ policer@c0000 {
-+ compatible = "fsl,fman-policer";
-+ reg = <0xc0000 0x1000>;
-+ };
-+ keygen@c1000 {
-+ compatible = "fsl,fman-keygen";
-+ reg = <0xc1000 0x1000>;
-+ };
-+ dma@c2000 {
-+ compatible = "fsl,fman-dma";
-+ reg = <0xc2000 0x1000>;
-+ };
-+ fpm@c3000 {
-+ compatible = "fsl,fman-fpm";
-+ reg = <0xc3000 0x1000>;
-+ };
-+ parser@c7000 {
-+ compatible = "fsl,fman-parser";
-+ reg = <0xc7000 0x1000>;
-+ };
-+ fman0_rx0: port@88000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x88000 0x1000>;
-+ };
-+ fman0_rx1: port@89000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x89000 0x1000>;
-+ };
-+ fman0_tx0: port@a8000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xa8000 0x1000>;
-+ fsl,qman-channel-id = <0x40>;
-+ };
-+ fman0_tx1: port@a9000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xa9000 0x1000>;
-+ fsl,qman-channel-id = <0x41>;
-+ };
-+ fman0_oh1: port@82000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x82000 0x1000>;
-+ fsl,qman-channel-id = <0x43>;
-+ };
-+ fman0_oh2: port@83000 {
-+ cell-index = <2>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x83000 0x1000>;
-+ fsl,qman-channel-id = <0x44>;
-+ };
-+ fman0_oh3: port@84000 {
-+ cell-index = <3>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x84000 0x1000>;
-+ fsl,qman-channel-id = <0x45>;
-+ };
-+ fman0_oh4: port@85000 {
-+ cell-index = <4>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x85000 0x1000>;
-+ fsl,qman-channel-id = <0x46>;
-+ };
-+ enet0: ethernet@e0000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-1g-mac";
-+ reg = <0xe0000 0x1000>;
-+ fsl,port-handles = <&fman0_rx0 &fman0_tx0>;
-+ ptimer-handle = <&ptp_timer0>;
-+ };
-+ enet1: ethernet@e2000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-1g-mac";
-+ reg = <0xe2000 0x1000>;
-+ fsl,port-handles = <&fman0_rx1 &fman0_tx1>;
-+ ptimer-handle = <&ptp_timer0>;
-+ };
-+ mdio0: mdio@e1120 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-mdio";
-+ reg = <0xe1120 0xee0>;
-+ interrupts = <26 1 0 0>;
-+ };
-+
-+ ptp_timer0: rtc@fe000 {
-+ compatible = "fsl,fman-rtc";
-+ reg = <0xfe000 0x1000>;
-+ };
-+ };
-+
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p1023si-pre.dtsi b/arch/powerpc/boot/dts/fsl/p1023si-pre.dtsi
-new file mode 100644
-index 0000000..6cfff45
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p1023si-pre.dtsi
-@@ -0,0 +1,83 @@
-+/*
-+ * P1023/P1017 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "e500v2_power_isa.dtsi"
-+
-+/ {
-+ compatible = "fsl,P1023";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ pci0 = &pci0;
-+ pci1 = &pci1;
-+ pci2 = &pci2;
-+
-+ crypto = &crypto;
-+ sec_jr0 = &sec_jr0;
-+ sec_jr1 = &sec_jr1;
-+ sec_jr2 = &sec_jr2;
-+ sec_jr3 = &sec_jr3;
-+ rtic_a = &rtic_a;
-+ rtic_b = &rtic_b;
-+ rtic_c = &rtic_c;
-+ rtic_d = &rtic_d;
-+
-+ bman = &bman;
-+ qman = &qman;
-+ fman0 = &fman0;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ cpu0: PowerPC,P1023@0 {
-+ device_type = "cpu";
-+ reg = <0x0>;
-+ next-level-cache = <&L2>;
-+ };
-+
-+ cpu1: PowerPC,P1023@1 {
-+ device_type = "cpu";
-+ reg = <0x1>;
-+ next-level-cache = <&L2>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p2020si-post.dtsi b/arch/powerpc/boot/dts/fsl/p2020si-post.dtsi
-new file mode 100644
-index 0000000..7d155b3
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p2020si-post.dtsi
-@@ -0,0 +1,215 @@
-+/*
-+ * P2020/P2010 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&lbc {
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+ compatible = "fsl,p2020-elbc", "fsl,elbc", "simple-bus";
-+ interrupts = <19 2 0 0>;
-+};
-+
-+/* controller at 0xa000 */
-+&pci0 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <26 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <26 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x0 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x1 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x2 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x3 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+/* controller at 0x9000 */
-+&pci1 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <25 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <25 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x4 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x5 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0x6 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0x7 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+/* controller at 0x8000 */
-+&pci2 {
-+ compatible = "fsl,mpc8548-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 255>;
-+ clock-frequency = <33333333>;
-+ interrupts = <24 2 0 0>;
-+
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <24 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0x0 0x0 0x1 &mpic 0x8 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x2 &mpic 0x9 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x3 &mpic 0xa 0x1 0x0 0x0
-+ 0000 0x0 0x0 0x4 &mpic 0xb 0x1 0x0 0x0
-+ >;
-+ };
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "fsl,p2020-immr", "simple-bus";
-+ bus-frequency = <0>; // Filled out by uboot.
-+
-+ ecm-law@0 {
-+ compatible = "fsl,ecm-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <12>;
-+ };
-+
-+ ecm@1000 {
-+ compatible = "fsl,p2020-ecm", "fsl,ecm";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <17 2 0 0>;
-+ };
-+
-+ memory-controller@2000 {
-+ compatible = "fsl,p2020-memory-controller";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <18 2 0 0>;
-+ };
-+
-+/include/ "pq3-i2c-0.dtsi"
-+/include/ "pq3-i2c-1.dtsi"
-+/include/ "pq3-duart-0.dtsi"
-+/include/ "pq3-espi-0.dtsi"
-+ spi0: spi@7000 {
-+ fsl,espi-num-chipselects = <4>;
-+ };
-+
-+/include/ "pq3-dma-1.dtsi"
-+/include/ "pq3-gpio-0.dtsi"
-+
-+ L2: l2-cache-controller@20000 {
-+ compatible = "fsl,p2020-l2-cache-controller";
-+ reg = <0x20000 0x1000>;
-+ cache-line-size = <32>; // 32 bytes
-+ cache-size = <0x80000>; // L2,512K
-+ interrupts = <16 2 0 0>;
-+ };
-+
-+/include/ "pq3-dma-0.dtsi"
-+/include/ "pq3-usb2-dr-0.dtsi"
-+ usb@22000 {
-+ compatible = "fsl-usb2-dr-v1.6", "fsl-usb2-dr";
-+ };
-+/include/ "pq3-etsec1-0.dtsi"
-+ enet0: ethernet@24000 {
-+ fsl,pmc-handle = <&etsec1_clk>;
-+
-+ };
-+/include/ "pq3-etsec1-timer-0.dtsi"
-+
-+ ptp_clock@24e00 {
-+ interrupts = <68 2 0 0 69 2 0 0 70 2 0 0>;
-+ };
-+
-+
-+/include/ "pq3-etsec1-1.dtsi"
-+ enet1: ethernet@25000 {
-+ fsl,pmc-handle = <&etsec2_clk>;
-+ };
-+
-+/include/ "pq3-etsec1-2.dtsi"
-+ enet2: ethernet@26000 {
-+ fsl,pmc-handle = <&etsec3_clk>;
-+ };
-+
-+/include/ "pq3-esdhc-0.dtsi"
-+ sdhc@2e000 {
-+ compatible = "fsl,p2020-esdhc", "fsl,esdhc";
-+ };
-+
-+/include/ "pq3-sec3.1-0.dtsi"
-+/include/ "pq3-mpic.dtsi"
-+/include/ "pq3-mpic-timer-B.dtsi"
-+
-+ global-utilities@e0000 {
-+ compatible = "fsl,p2020-guts";
-+ reg = <0xe0000 0x1000>;
-+ fsl,has-rstcr;
-+ };
-+
-+/include/ "pq3-power.dtsi"
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p2020si-pre.dtsi b/arch/powerpc/boot/dts/fsl/p2020si-pre.dtsi
-new file mode 100644
-index 0000000..42bf3c6
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p2020si-pre.dtsi
-@@ -0,0 +1,72 @@
-+/*
-+ * P2020/P2010 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "e500v2_power_isa.dtsi"
-+
-+/ {
-+ compatible = "fsl,P2020";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ ethernet0 = &enet0;
-+ ethernet1 = &enet1;
-+ ethernet2 = &enet2;
-+ pci0 = &pci0;
-+ pci1 = &pci1;
-+ pci2 = &pci2;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ PowerPC,P2020@0 {
-+ device_type = "cpu";
-+ reg = <0x0>;
-+ next-level-cache = <&L2>;
-+ };
-+
-+ PowerPC,P2020@1 {
-+ device_type = "cpu";
-+ reg = <0x1>;
-+ next-level-cache = <&L2>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi b/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi
-new file mode 100644
-index 0000000..d9a9bf4
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi
-@@ -0,0 +1,407 @@
-+/*
-+ * P2041/P2040 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&lbc {
-+ compatible = "fsl,p2041-elbc", "fsl,elbc", "simple-bus";
-+ interrupts = <25 2 0 0>;
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+};
-+
-+/* controller at 0x200000 */
-+&pci0 {
-+ compatible = "fsl,p2041-pcie", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 1 15>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 1 15>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 40 1 0 0
-+ 0000 0 0 2 &mpic 1 1 0 0
-+ 0000 0 0 3 &mpic 2 1 0 0
-+ 0000 0 0 4 &mpic 3 1 0 0
-+ >;
-+ };
-+};
-+
-+/* controller at 0x201000 */
-+&pci1 {
-+ compatible = "fsl,p2041-pcie", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 1 14>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 1 14>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 41 1 0 0
-+ 0000 0 0 2 &mpic 5 1 0 0
-+ 0000 0 0 3 &mpic 6 1 0 0
-+ 0000 0 0 4 &mpic 7 1 0 0
-+ >;
-+ };
-+};
-+
-+/* controller at 0x202000 */
-+&pci2 {
-+ compatible = "fsl,p2041-pcie", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 1 13>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 1 13>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 42 1 0 0
-+ 0000 0 0 2 &mpic 9 1 0 0
-+ 0000 0 0 3 &mpic 10 1 0 0
-+ 0000 0 0 4 &mpic 11 1 0 0
-+ >;
-+ };
-+};
-+
-+&rio {
-+ compatible = "fsl,srio";
-+ interrupts = <16 2 1 11>;
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ ranges;
-+
-+ port1 {
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ cell-index = <1>;
-+ };
-+
-+ port2 {
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ cell-index = <2>;
-+ };
-+};
-+
-+&dcsr {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,dcsr", "simple-bus";
-+
-+ dcsr-epu@0 {
-+ compatible = "fsl,p2041-dcsr-epu", "fsl,dcsr-epu";
-+ interrupts = <52 2 0 0
-+ 84 2 0 0
-+ 85 2 0 0>;
-+ reg = <0x0 0x1000>;
-+ };
-+ dcsr-npc {
-+ compatible = "fsl,dcsr-npc";
-+ reg = <0x1000 0x1000 0x1000000 0x8000>;
-+ };
-+ dcsr-nxc@2000 {
-+ compatible = "fsl,dcsr-nxc";
-+ reg = <0x2000 0x1000>;
-+ };
-+ dcsr-corenet {
-+ compatible = "fsl,dcsr-corenet";
-+ reg = <0x8000 0x1000 0xB0000 0x1000>;
-+ };
-+ dcsr-dpaa@9000 {
-+ compatible = "fsl,p2041-dcsr-dpaa", "fsl,dcsr-dpaa";
-+ reg = <0x9000 0x1000>;
-+ };
-+ dcsr-ocn@11000 {
-+ compatible = "fsl,p2041-dcsr-ocn", "fsl,dcsr-ocn";
-+ reg = <0x11000 0x1000>;
-+ };
-+ dcsr-ddr@12000 {
-+ compatible = "fsl,dcsr-ddr";
-+ dev-handle = <&ddr1>;
-+ reg = <0x12000 0x1000>;
-+ };
-+ dcsr-nal@18000 {
-+ compatible = "fsl,p2041-dcsr-nal", "fsl,dcsr-nal";
-+ reg = <0x18000 0x1000>;
-+ };
-+ dcsr-rcpm@22000 {
-+ compatible = "fsl,p2041-dcsr-rcpm", "fsl,dcsr-rcpm";
-+ reg = <0x22000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@40000 {
-+ compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu0>;
-+ reg = <0x40000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@41000 {
-+ compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu1>;
-+ reg = <0x41000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@42000 {
-+ compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu2>;
-+ reg = <0x42000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@43000 {
-+ compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu3>;
-+ reg = <0x43000 0x1000>;
-+ };
-+};
-+
-+&bportals {
-+/include/ "qoriq-bman1-portals.dtsi"
-+};
-+
-+&qportals {
-+/include/ "qoriq-qman1-portals.dtsi"
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "simple-bus";
-+
-+ soc-sram-error {
-+ compatible = "fsl,soc-sram-error";
-+ interrupts = <16 2 1 29>;
-+ };
-+
-+ corenet-law@0 {
-+ compatible = "fsl,corenet-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <32>;
-+ };
-+
-+ ddr1: memory-controller@8000 {
-+ compatible = "fsl,qoriq-memory-controller-v4.5", "fsl,qoriq-memory-controller";
-+ reg = <0x8000 0x1000>;
-+ interrupts = <16 2 1 23>;
-+ };
-+
-+ cpc: l3-cache-controller@10000 {
-+ compatible = "fsl,p2041-l3-cache-controller", "fsl,p4080-l3-cache-controller", "cache";
-+ reg = <0x10000 0x1000>;
-+ interrupts = <16 2 1 27>;
-+ };
-+
-+ corenet-cf@18000 {
-+ compatible = "fsl,corenet-cf";
-+ reg = <0x18000 0x1000>;
-+ interrupts = <16 2 1 31>;
-+ fsl,ccf-num-csdids = <32>;
-+ fsl,ccf-num-snoopids = <32>;
-+ };
-+
-+ iommu@20000 {
-+ compatible = "fsl,pamu-v1.0", "fsl,pamu";
-+ reg = <0x20000 0x4000>;
-+ interrupts = <
-+ 24 2 0 0
-+ 16 2 1 30>;
-+ };
-+
-+/include/ "qoriq-mpic.dtsi"
-+
-+ guts: global-utilities@e0000 {
-+ compatible = "fsl,qoriq-device-config-1.0";
-+ reg = <0xe0000 0xe00>;
-+ fsl,has-rstcr;
-+ #sleep-cells = <1>;
-+ fsl,liodn-bits = <12>;
-+ };
-+
-+ pins: global-utilities@e0e00 {
-+ compatible = "fsl,qoriq-pin-control-1.0";
-+ reg = <0xe0e00 0x200>;
-+ #sleep-cells = <2>;
-+ };
-+
-+ clockgen: global-utilities@e1000 {
-+ compatible = "fsl,p2041-clockgen", "fsl,qoriq-clockgen-1.0";
-+ reg = <0xe1000 0x1000>;
-+ clock-frequency = <0>;
-+ };
-+
-+ rcpm: global-utilities@e2000 {
-+ compatible = "fsl,qoriq-rcpm-1.0";
-+ reg = <0xe2000 0x1000>;
-+ #sleep-cells = <1>;
-+ };
-+
-+ sfp: sfp@e8000 {
-+ compatible = "fsl,p2041-sfp", "fsl,qoriq-sfp-1.0";
-+ reg = <0xe8000 0x1000>;
-+ };
-+
-+ serdes: serdes@ea000 {
-+ compatible = "fsl,p2041-serdes";
-+ reg = <0xea000 0x1000>;
-+ };
-+
-+/include/ "qoriq-dma-0.dtsi"
-+/include/ "qoriq-dma-1.dtsi"
-+/include/ "qoriq-espi-0.dtsi"
-+ spi@110000 {
-+ fsl,espi-num-chipselects = <4>;
-+ };
-+
-+/include/ "qoriq-esdhc-0.dtsi"
-+ sdhc@114000 {
-+ sdhci,auto-cmd12;
-+ };
-+
-+/include/ "qoriq-i2c-0.dtsi"
-+/include/ "qoriq-i2c-1.dtsi"
-+/include/ "qoriq-duart-0.dtsi"
-+/include/ "qoriq-duart-1.dtsi"
-+/include/ "qoriq-gpio-0.dtsi"
-+/include/ "qoriq-usb2-mph-0.dtsi"
-+ usb0: usb@210000 {
-+ compatible = "fsl-usb2-mph-v1.6", "fsl,mpc85xx-usb2-mph", "fsl-usb2-mph";
-+ phy_type = "utmi";
-+ port0;
-+ };
-+
-+/include/ "qoriq-usb2-dr-0.dtsi"
-+ usb1: usb@211000 {
-+ compatible = "fsl-usb2-dr-v1.6", "fsl,mpc85xx-usb2-dr", "fsl-usb2-dr";
-+ dr_mode = "host";
-+ phy_type = "utmi";
-+ };
-+
-+/include/ "qoriq-sata2-0.dtsi"
-+ sata@220000 {
-+ compatible = "fsl,p2041-sata", "fsl,pq-sata-v2";
-+ };
-+/include/ "qoriq-sata2-1.dtsi"
-+ sata@221000 {
-+ compatible = "fsl,p2041-sata", "fsl,pq-sata-v2";
-+ };
-+/include/ "qoriq-sec4.2-0.dtsi"
-+/include/ "qoriq-pme-0.dtsi"
-+/include/ "qoriq-rman-0.dtsi"
-+ rman: rman@1e0000 {
-+ fsl,qman-channels-id = <0x62 0x63>;
-+ };
-+
-+/include/ "qoriq-qman1.dtsi"
-+/include/ "qoriq-bman1.dtsi"
-+
-+/include/ "qoriq-fman-0.dtsi"
-+/include/ "qoriq-fman-0-1g-0.dtsi"
-+/include/ "qoriq-fman-0-1g-1.dtsi"
-+/include/ "qoriq-fman-0-1g-2.dtsi"
-+/include/ "qoriq-fman-0-1g-3.dtsi"
-+/include/ "qoriq-fman-0-1g-4.dtsi"
-+/include/ "qoriq-fman-0-10g-0.dtsi"
-+ fman0: fman@400000 {
-+ /* tx - 1g - 0 */
-+ port@a8000 {
-+ fsl,qman-channel-id = <0x41>;
-+ };
-+ /* tx - 1g - 1 */
-+ port@a9000 {
-+ fsl,qman-channel-id = <0x42>;
-+ };
-+ /* tx - 1g - 2 */
-+ port@aa000 {
-+ fsl,qman-channel-id = <0x43>;
-+ };
-+ /* tx - 1g - 3 */
-+ port@ab000 {
-+ fsl,qman-channel-id = <0x44>;
-+ };
-+ /* tx - 1g - 4 */
-+ port@ac000 {
-+ fsl,qman-channel-id = <0x45>;
-+ };
-+ /* tx - 10g - 0 */
-+ port@b0000 {
-+ fsl,qman-channel-id = <0x40>;
-+ };
-+ /* offline 0 */
-+ port@81000 {
-+ fsl,qman-channel-id = <0x46>;
-+ };
-+ /* offline 1 */
-+ port@82000 {
-+ fsl,qman-channel-id = <0x47>;
-+ };
-+ /* offline 2 */
-+ port@83000 {
-+ fsl,qman-channel-id = <0x48>;
-+ };
-+ /* offline 3 */
-+ port@84000 {
-+ fsl,qman-channel-id = <0x49>;
-+ };
-+ /* offline 4 */
-+ port@85000 {
-+ fsl,qman-channel-id = <0x4a>;
-+ };
-+ /* offline 5 */
-+ port@86000 {
-+ fsl,qman-channel-id = <0x4b>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p2041si-pre.dtsi b/arch/powerpc/boot/dts/fsl/p2041si-pre.dtsi
-new file mode 100644
-index 0000000..c463a0b
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p2041si-pre.dtsi
-@@ -0,0 +1,120 @@
-+/*
-+ * P2041 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "e500mc_power_isa.dtsi"
-+
-+/ {
-+ compatible = "fsl,P2041";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ ccsr = &soc;
-+ dcsr = &dcsr;
-+
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ serial2 = &serial2;
-+ serial3 = &serial3;
-+ pci0 = &pci0;
-+ pci1 = &pci1;
-+ pci2 = &pci2;
-+ usb0 = &usb0;
-+ usb1 = &usb1;
-+ dma0 = &dma0;
-+ dma1 = &dma1;
-+ sdhc = &sdhc;
-+ msi0 = &msi0;
-+ msi1 = &msi1;
-+ msi2 = &msi2;
-+
-+ crypto = &crypto;
-+ sec_jr0 = &sec_jr0;
-+ sec_jr1 = &sec_jr1;
-+ sec_jr2 = &sec_jr2;
-+ sec_jr3 = &sec_jr3;
-+ rtic_a = &rtic_a;
-+ rtic_b = &rtic_b;
-+ rtic_c = &rtic_c;
-+ rtic_d = &rtic_d;
-+ sec_mon = &sec_mon;
-+
-+ bman = &bman;
-+ qman = &qman;
-+ pme = &pme;
-+ rman = &rman;
-+ fman0 = &fman0;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ cpu0: PowerPC,e500mc@0 {
-+ device_type = "cpu";
-+ reg = <0>;
-+ next-level-cache = <&L2_0>;
-+ L2_0: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ cpu1: PowerPC,e500mc@1 {
-+ device_type = "cpu";
-+ reg = <1>;
-+ next-level-cache = <&L2_1>;
-+ L2_1: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ cpu2: PowerPC,e500mc@2 {
-+ device_type = "cpu";
-+ reg = <2>;
-+ next-level-cache = <&L2_2>;
-+ L2_2: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ cpu3: PowerPC,e500mc@3 {
-+ device_type = "cpu";
-+ reg = <3>;
-+ next-level-cache = <&L2_3>;
-+ L2_3: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p3041si-post.dtsi b/arch/powerpc/boot/dts/fsl/p3041si-post.dtsi
-new file mode 100644
-index 0000000..5a8c7e3
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p3041si-post.dtsi
-@@ -0,0 +1,434 @@
-+/*
-+ * P3041 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&lbc {
-+ compatible = "fsl,p3041-elbc", "fsl,elbc", "simple-bus";
-+ interrupts = <25 2 0 0>;
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+};
-+
-+/* controller at 0x200000 */
-+&pci0 {
-+ compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 1 15>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 1 15>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 40 1 0 0
-+ 0000 0 0 2 &mpic 1 1 0 0
-+ 0000 0 0 3 &mpic 2 1 0 0
-+ 0000 0 0 4 &mpic 3 1 0 0
-+ >;
-+ };
-+};
-+
-+/* controller at 0x201000 */
-+&pci1 {
-+ compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 1 14>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 1 14>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 41 1 0 0
-+ 0000 0 0 2 &mpic 5 1 0 0
-+ 0000 0 0 3 &mpic 6 1 0 0
-+ 0000 0 0 4 &mpic 7 1 0 0
-+ >;
-+ };
-+};
-+
-+/* controller at 0x202000 */
-+&pci2 {
-+ compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 1 13>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 1 13>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 42 1 0 0
-+ 0000 0 0 2 &mpic 9 1 0 0
-+ 0000 0 0 3 &mpic 10 1 0 0
-+ 0000 0 0 4 &mpic 11 1 0 0
-+ >;
-+ };
-+};
-+
-+/* controller at 0x203000 */
-+&pci3 {
-+ compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 1 12>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 1 12>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 43 1 0 0
-+ 0000 0 0 2 &mpic 0 1 0 0
-+ 0000 0 0 3 &mpic 4 1 0 0
-+ 0000 0 0 4 &mpic 8 1 0 0
-+ >;
-+ };
-+};
-+
-+&rio {
-+ compatible = "fsl,srio";
-+ interrupts = <16 2 1 11>;
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ ranges;
-+
-+ port1 {
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ cell-index = <1>;
-+ };
-+
-+ port2 {
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ cell-index = <2>;
-+ };
-+};
-+
-+&dcsr {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,dcsr", "simple-bus";
-+
-+ dcsr-epu@0 {
-+ compatible = "fsl,p3041-dcsr-epu", "fsl,dcsr-epu";
-+ interrupts = <52 2 0 0
-+ 84 2 0 0
-+ 85 2 0 0>;
-+ reg = <0x0 0x1000>;
-+ };
-+ dcsr-npc {
-+ compatible = "fsl,dcsr-npc";
-+ reg = <0x1000 0x1000 0x1000000 0x8000>;
-+ };
-+ dcsr-nxc@2000 {
-+ compatible = "fsl,dcsr-nxc";
-+ reg = <0x2000 0x1000>;
-+ };
-+ dcsr-corenet {
-+ compatible = "fsl,dcsr-corenet";
-+ reg = <0x8000 0x1000 0xB0000 0x1000>;
-+ };
-+ dcsr-dpaa@9000 {
-+ compatible = "fsl,p3041-dcsr-dpaa", "fsl,dcsr-dpaa";
-+ reg = <0x9000 0x1000>;
-+ };
-+ dcsr-ocn@11000 {
-+ compatible = "fsl,p3041-dcsr-ocn", "fsl,dcsr-ocn";
-+ reg = <0x11000 0x1000>;
-+ };
-+ dcsr-ddr@12000 {
-+ compatible = "fsl,dcsr-ddr";
-+ dev-handle = <&ddr1>;
-+ reg = <0x12000 0x1000>;
-+ };
-+ dcsr-nal@18000 {
-+ compatible = "fsl,p3041-dcsr-nal", "fsl,dcsr-nal";
-+ reg = <0x18000 0x1000>;
-+ };
-+ dcsr-rcpm@22000 {
-+ compatible = "fsl,p3041-dcsr-rcpm", "fsl,dcsr-rcpm";
-+ reg = <0x22000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@40000 {
-+ compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu0>;
-+ reg = <0x40000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@41000 {
-+ compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu1>;
-+ reg = <0x41000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@42000 {
-+ compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu2>;
-+ reg = <0x42000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@43000 {
-+ compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu3>;
-+ reg = <0x43000 0x1000>;
-+ };
-+};
-+
-+&bportals {
-+/include/ "qoriq-bman1-portals.dtsi"
-+};
-+
-+&qportals {
-+/include/ "qoriq-qman1-portals.dtsi"
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "simple-bus";
-+
-+ soc-sram-error {
-+ compatible = "fsl,soc-sram-error";
-+ interrupts = <16 2 1 29>;
-+ };
-+
-+ corenet-law@0 {
-+ compatible = "fsl,corenet-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <32>;
-+ };
-+
-+ ddr1: memory-controller@8000 {
-+ compatible = "fsl,qoriq-memory-controller-v4.5", "fsl,qoriq-memory-controller";
-+ reg = <0x8000 0x1000>;
-+ interrupts = <16 2 1 23>;
-+ };
-+
-+ cpc: l3-cache-controller@10000 {
-+ compatible = "fsl,p3041-l3-cache-controller", "fsl,p4080-l3-cache-controller", "cache";
-+ reg = <0x10000 0x1000>;
-+ interrupts = <16 2 1 27>;
-+ };
-+
-+ corenet-cf@18000 {
-+ compatible = "fsl,corenet-cf";
-+ reg = <0x18000 0x1000>;
-+ interrupts = <16 2 1 31>;
-+ fsl,ccf-num-csdids = <32>;
-+ fsl,ccf-num-snoopids = <32>;
-+ };
-+
-+ iommu@20000 {
-+ compatible = "fsl,pamu-v1.0", "fsl,pamu";
-+ reg = <0x20000 0x4000>;
-+ interrupts = <
-+ 24 2 0 0
-+ 16 2 1 30>;
-+ };
-+
-+/include/ "qoriq-mpic.dtsi"
-+
-+ guts: global-utilities@e0000 {
-+ compatible = "fsl,qoriq-device-config-1.0";
-+ reg = <0xe0000 0xe00>;
-+ fsl,has-rstcr;
-+ #sleep-cells = <1>;
-+ fsl,liodn-bits = <12>;
-+ };
-+
-+ pins: global-utilities@e0e00 {
-+ compatible = "fsl,qoriq-pin-control-1.0";
-+ reg = <0xe0e00 0x200>;
-+ #sleep-cells = <2>;
-+ };
-+
-+ clockgen: global-utilities@e1000 {
-+ compatible = "fsl,p3041-clockgen", "fsl,qoriq-clockgen-1.0";
-+ reg = <0xe1000 0x1000>;
-+ clock-frequency = <0>;
-+ };
-+
-+ rcpm: global-utilities@e2000 {
-+ compatible = "fsl,qoriq-rcpm-1.0";
-+ reg = <0xe2000 0x1000>;
-+ #sleep-cells = <1>;
-+ };
-+
-+ sfp: sfp@e8000 {
-+ compatible = "fsl,p3041-sfp", "fsl,qoriq-sfp-1.0";
-+ reg = <0xe8000 0x1000>;
-+ };
-+
-+ serdes: serdes@ea000 {
-+ compatible = "fsl,p3041-serdes";
-+ reg = <0xea000 0x1000>;
-+ };
-+
-+/include/ "qoriq-dma-0.dtsi"
-+/include/ "qoriq-dma-1.dtsi"
-+/include/ "qoriq-espi-0.dtsi"
-+ spi@110000 {
-+ fsl,espi-num-chipselects = <4>;
-+ };
-+
-+/include/ "qoriq-esdhc-0.dtsi"
-+ sdhc@114000 {
-+ sdhci,auto-cmd12;
-+ };
-+
-+/include/ "qoriq-i2c-0.dtsi"
-+/include/ "qoriq-i2c-1.dtsi"
-+/include/ "qoriq-duart-0.dtsi"
-+/include/ "qoriq-duart-1.dtsi"
-+/include/ "qoriq-gpio-0.dtsi"
-+/include/ "qoriq-usb2-mph-0.dtsi"
-+ usb0: usb@210000 {
-+ compatible = "fsl-usb2-mph-v1.6", "fsl-usb2-mph";
-+ phy_type = "utmi";
-+ port0;
-+ };
-+
-+/include/ "qoriq-usb2-dr-0.dtsi"
-+ usb1: usb@211000 {
-+ compatible = "fsl-usb2-dr-v1.6", "fsl,mpc85xx-usb2-dr", "fsl-usb2-dr";
-+ dr_mode = "host";
-+ phy_type = "utmi";
-+ };
-+
-+/include/ "qoriq-sata2-0.dtsi"
-+ sata@220000 {
-+ compatible = "fsl,p3041-sata", "fsl,pq-sata-v2";
-+ };
-+/include/ "qoriq-sata2-1.dtsi"
-+ sata@221000 {
-+ compatible = "fsl,p3041-sata", "fsl,pq-sata-v2";
-+ };
-+/include/ "qoriq-sec4.2-0.dtsi"
-+/include/ "qoriq-pme-0.dtsi"
-+/include/ "qoriq-rman-0.dtsi"
-+ rman: rman@1e0000 {
-+ fsl,qman-channels-id = <0x62 0x63>;
-+ };
-+
-+/include/ "qoriq-qman1.dtsi"
-+/include/ "qoriq-bman1.dtsi"
-+
-+/include/ "qoriq-fman-0.dtsi"
-+/include/ "qoriq-fman-0-1g-0.dtsi"
-+/include/ "qoriq-fman-0-1g-1.dtsi"
-+/include/ "qoriq-fman-0-1g-2.dtsi"
-+/include/ "qoriq-fman-0-1g-3.dtsi"
-+/include/ "qoriq-fman-0-1g-4.dtsi"
-+/include/ "qoriq-fman-0-10g-0.dtsi"
-+ fman0: fman@400000 {
-+ /* tx - 1g - 0 */
-+ port@a8000 {
-+ fsl,qman-channel-id = <0x41>;
-+ };
-+ /* tx - 1g - 1 */
-+ port@a9000 {
-+ fsl,qman-channel-id = <0x42>;
-+ };
-+ /* tx - 1g - 2 */
-+ port@aa000 {
-+ fsl,qman-channel-id = <0x43>;
-+ };
-+ /* tx - 1g - 3 */
-+ port@ab000 {
-+ fsl,qman-channel-id = <0x44>;
-+ };
-+ /* tx - 1g - 4 */
-+ port@ac000 {
-+ fsl,qman-channel-id = <0x45>;
-+ };
-+ /* tx - 10g - 0 */
-+ port@b0000 {
-+ fsl,qman-channel-id = <0x40>;
-+ };
-+ /* offline 0 */
-+ port@81000 {
-+ fsl,qman-channel-id = <0x46>;
-+ };
-+ /* offline 1 */
-+ port@82000 {
-+ fsl,qman-channel-id = <0x47>;
-+ };
-+ /* offline 2 */
-+ port@83000 {
-+ fsl,qman-channel-id = <0x48>;
-+ };
-+ /* offline 3 */
-+ port@84000 {
-+ fsl,qman-channel-id = <0x49>;
-+ };
-+ /* offline 4 */
-+ port@85000 {
-+ fsl,qman-channel-id = <0x4a>;
-+ };
-+ /* offline 5 */
-+ port@86000 {
-+ fsl,qman-channel-id = <0x4b>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p3041si-pre.dtsi b/arch/powerpc/boot/dts/fsl/p3041si-pre.dtsi
-new file mode 100644
-index 0000000..18ba76f
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p3041si-pre.dtsi
-@@ -0,0 +1,121 @@
-+/*
-+ * P3041 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "e500mc_power_isa.dtsi"
-+
-+/ {
-+ compatible = "fsl,P3041";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ ccsr = &soc;
-+ dcsr = &dcsr;
-+
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ serial2 = &serial2;
-+ serial3 = &serial3;
-+ pci0 = &pci0;
-+ pci1 = &pci1;
-+ pci2 = &pci2;
-+ pci3 = &pci3;
-+ usb0 = &usb0;
-+ usb1 = &usb1;
-+ dma0 = &dma0;
-+ dma1 = &dma1;
-+ sdhc = &sdhc;
-+ msi0 = &msi0;
-+ msi1 = &msi1;
-+ msi2 = &msi2;
-+
-+ crypto = &crypto;
-+ sec_jr0 = &sec_jr0;
-+ sec_jr1 = &sec_jr1;
-+ sec_jr2 = &sec_jr2;
-+ sec_jr3 = &sec_jr3;
-+ rtic_a = &rtic_a;
-+ rtic_b = &rtic_b;
-+ rtic_c = &rtic_c;
-+ rtic_d = &rtic_d;
-+ sec_mon = &sec_mon;
-+
-+ bman = &bman;
-+ qman = &qman;
-+ pme = &pme;
-+ rman = &rman;
-+ fman0 = &fman0;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ cpu0: PowerPC,e500mc@0 {
-+ device_type = "cpu";
-+ reg = <0>;
-+ next-level-cache = <&L2_0>;
-+ L2_0: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ cpu1: PowerPC,e500mc@1 {
-+ device_type = "cpu";
-+ reg = <1>;
-+ next-level-cache = <&L2_1>;
-+ L2_1: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ cpu2: PowerPC,e500mc@2 {
-+ device_type = "cpu";
-+ reg = <2>;
-+ next-level-cache = <&L2_2>;
-+ L2_2: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ cpu3: PowerPC,e500mc@3 {
-+ device_type = "cpu";
-+ reg = <3>;
-+ next-level-cache = <&L2_3>;
-+ L2_3: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi b/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
-new file mode 100644
-index 0000000..01ce97e
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
-@@ -0,0 +1,481 @@
-+/*
-+ * P4080/P4040 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&lbc {
-+ compatible = "fsl,p4080-elbc", "fsl,elbc", "simple-bus";
-+ interrupts = <25 2 0 0>;
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+};
-+
-+/* controller at 0x200000 */
-+&pci0 {
-+ compatible = "fsl,p4080-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 1 15>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 1 15>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 40 1 0 0
-+ 0000 0 0 2 &mpic 1 1 0 0
-+ 0000 0 0 3 &mpic 2 1 0 0
-+ 0000 0 0 4 &mpic 3 1 0 0
-+ >;
-+ };
-+};
-+
-+/* controller at 0x201000 */
-+&pci1 {
-+ compatible = "fsl,p4080-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 1 14>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 1 14>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 41 1 0 0
-+ 0000 0 0 2 &mpic 5 1 0 0
-+ 0000 0 0 3 &mpic 6 1 0 0
-+ 0000 0 0 4 &mpic 7 1 0 0
-+ >;
-+ };
-+};
-+
-+/* controller at 0x202000 */
-+&pci2 {
-+ compatible = "fsl,p4080-pcie";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 1 13>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 1 13>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 42 1 0 0
-+ 0000 0 0 2 &mpic 9 1 0 0
-+ 0000 0 0 3 &mpic 10 1 0 0
-+ 0000 0 0 4 &mpic 11 1 0 0
-+ >;
-+ };
-+};
-+
-+&rio {
-+ compatible = "fsl,srio";
-+ interrupts = <16 2 1 11>;
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ fsl,srio-rmu-handle = <&rmu>;
-+ ranges;
-+
-+ port1 {
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ cell-index = <1>;
-+ };
-+
-+ port2 {
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ cell-index = <2>;
-+ };
-+};
-+
-+&dcsr {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,dcsr", "simple-bus";
-+
-+ dcsr-epu@0 {
-+ compatible = "fsl,p4080-dcsr-epu", "fsl,dcsr-epu";
-+ interrupts = <52 2 0 0
-+ 84 2 0 0
-+ 85 2 0 0>;
-+ reg = <0x0 0x1000>;
-+ };
-+ dcsr-npc {
-+ compatible = "fsl,dcsr-npc";
-+ reg = <0x1000 0x1000 0x1000000 0x8000>;
-+ };
-+ dcsr-nxc@2000 {
-+ compatible = "fsl,dcsr-nxc";
-+ reg = <0x2000 0x1000>;
-+ };
-+ dcsr-corenet {
-+ compatible = "fsl,dcsr-corenet";
-+ reg = <0x8000 0x1000 0xB0000 0x1000>;
-+ };
-+ dcsr-dpaa@9000 {
-+ compatible = "fsl,p4080-dcsr-dpaa", "fsl,dcsr-dpaa";
-+ reg = <0x9000 0x1000>;
-+ };
-+ dcsr-ocn@11000 {
-+ compatible = "fsl,p4080-dcsr-ocn", "fsl,dcsr-ocn";
-+ reg = <0x11000 0x1000>;
-+ };
-+ dcsr-ddr@12000 {
-+ compatible = "fsl,dcsr-ddr";
-+ dev-handle = <&ddr1>;
-+ reg = <0x12000 0x1000>;
-+ };
-+ dcsr-ddr@13000 {
-+ compatible = "fsl,dcsr-ddr";
-+ dev-handle = <&ddr2>;
-+ reg = <0x13000 0x1000>;
-+ };
-+ dcsr-nal@18000 {
-+ compatible = "fsl,p4080-dcsr-nal", "fsl,dcsr-nal";
-+ reg = <0x18000 0x1000>;
-+ };
-+ dcsr-rcpm@22000 {
-+ compatible = "fsl,p4080-dcsr-rcpm", "fsl,dcsr-rcpm";
-+ reg = <0x22000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@40000 {
-+ compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu0>;
-+ reg = <0x40000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@41000 {
-+ compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu1>;
-+ reg = <0x41000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@42000 {
-+ compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu2>;
-+ reg = <0x42000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@43000 {
-+ compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu3>;
-+ reg = <0x43000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@44000 {
-+ compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu4>;
-+ reg = <0x44000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@45000 {
-+ compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu5>;
-+ reg = <0x45000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@46000 {
-+ compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu6>;
-+ reg = <0x46000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@47000 {
-+ compatible = "fsl,dcsr-e500mc-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu7>;
-+ reg = <0x47000 0x1000>;
-+ };
-+
-+};
-+
-+&bportals {
-+/include/ "qoriq-bman1-portals.dtsi"
-+};
-+
-+&qportals {
-+/include/ "qoriq-qman1-portals.dtsi"
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "simple-bus";
-+
-+ soc-sram-error {
-+ compatible = "fsl,soc-sram-error";
-+ interrupts = <16 2 1 29>;
-+ };
-+
-+ corenet-law@0 {
-+ compatible = "fsl,corenet-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <32>;
-+ };
-+
-+ ddr1: memory-controller@8000 {
-+ compatible = "fsl,qoriq-memory-controller-v4.4", "fsl,qoriq-memory-controller";
-+ reg = <0x8000 0x1000>;
-+ interrupts = <16 2 1 23>;
-+ };
-+
-+ ddr2: memory-controller@9000 {
-+ compatible = "fsl,qoriq-memory-controller-v4.4","fsl,qoriq-memory-controller";
-+ reg = <0x9000 0x1000>;
-+ interrupts = <16 2 1 22>;
-+ };
-+
-+ cpc: l3-cache-controller@10000 {
-+ compatible = "fsl,p4080-l3-cache-controller", "cache";
-+ reg = <0x10000 0x1000
-+ 0x11000 0x1000>;
-+ interrupts = <16 2 1 27
-+ 16 2 1 26>;
-+ };
-+
-+ corenet-cf@18000 {
-+ compatible = "fsl,corenet-cf";
-+ reg = <0x18000 0x1000>;
-+ interrupts = <16 2 1 31>;
-+ fsl,ccf-num-csdids = <32>;
-+ fsl,ccf-num-snoopids = <32>;
-+ };
-+
-+ iommu@20000 {
-+ compatible = "fsl,pamu-v1.0", "fsl,pamu";
-+ reg = <0x20000 0x5000>;
-+ interrupts = <
-+ 24 2 0 0
-+ 16 2 1 30>;
-+ };
-+
-+/include/ "qoriq-rmu-0.dtsi"
-+/include/ "qoriq-mpic.dtsi"
-+
-+ guts: global-utilities@e0000 {
-+ compatible = "fsl,qoriq-device-config-1.0";
-+ reg = <0xe0000 0xe00>;
-+ fsl,has-rstcr;
-+ #sleep-cells = <1>;
-+ fsl,liodn-bits = <12>;
-+ };
-+
-+ pins: global-utilities@e0e00 {
-+ compatible = "fsl,qoriq-pin-control-1.0";
-+ reg = <0xe0e00 0x200>;
-+ #sleep-cells = <2>;
-+ };
-+
-+ clockgen: global-utilities@e1000 {
-+ compatible = "fsl,p4080-clockgen", "fsl,qoriq-clockgen-1.0";
-+ reg = <0xe1000 0x1000>;
-+ clock-frequency = <0>;
-+ };
-+
-+ rcpm: global-utilities@e2000 {
-+ compatible = "fsl,qoriq-rcpm-1.0";
-+ reg = <0xe2000 0x1000>;
-+ #sleep-cells = <1>;
-+ };
-+
-+ sfp: sfp@e8000 {
-+ compatible = "fsl,p4080-sfp", "fsl,qoriq-sfp-1.0";
-+ reg = <0xe8000 0x1000>;
-+ };
-+
-+ serdes: serdes@ea000 {
-+ compatible = "fsl,p4080-serdes";
-+ reg = <0xea000 0x1000>;
-+ };
-+
-+/include/ "qoriq-dma-0.dtsi"
-+/include/ "qoriq-dma-1.dtsi"
-+/include/ "qoriq-espi-0.dtsi"
-+ spi@110000 {
-+ fsl,espi-num-chipselects = <4>;
-+ };
-+
-+/include/ "qoriq-esdhc-0.dtsi"
-+ sdhc@114000 {
-+ voltage-ranges = <3300 3300>;
-+ sdhci,auto-cmd12;
-+ };
-+
-+/include/ "qoriq-i2c-0.dtsi"
-+/include/ "qoriq-i2c-1.dtsi"
-+/include/ "qoriq-duart-0.dtsi"
-+/include/ "qoriq-duart-1.dtsi"
-+/include/ "qoriq-gpio-0.dtsi"
-+/include/ "qoriq-usb2-mph-0.dtsi"
-+ usb@210000 {
-+ compatible = "fsl-usb2-mph-v1.6", "fsl,mpc85xx-usb2-mph", "fsl-usb2-mph";
-+ port0;
-+ };
-+/include/ "qoriq-usb2-dr-0.dtsi"
-+ usb@211000 {
-+ compatible = "fsl-usb2-dr-v1.6", "fsl,mpc85xx-usb2-dr", "fsl-usb2-dr";
-+ };
-+/include/ "qoriq-sec4.0-0.dtsi"
-+/include/ "qoriq-pme-0.dtsi"
-+/include/ "qoriq-qman1.dtsi"
-+/include/ "qoriq-bman1.dtsi"
-+/include/ "qoriq-fman-0.dtsi"
-+/include/ "qoriq-fman-0-1g-0.dtsi"
-+/include/ "qoriq-fman-0-1g-1.dtsi"
-+/include/ "qoriq-fman-0-1g-2.dtsi"
-+/include/ "qoriq-fman-0-1g-3.dtsi"
-+/include/ "qoriq-fman-0-10g-0.dtsi"
-+ fman0: fman@400000 {
-+ /* tx - 1g - 0 */
-+ port@a8000 {
-+ fsl,qman-channel-id = <0x41>;
-+ };
-+ /* tx - 1g - 1 */
-+ port@a9000 {
-+ fsl,qman-channel-id = <0x42>;
-+ };
-+ /* tx - 1g - 2 */
-+ port@aa000 {
-+ fsl,qman-channel-id = <0x43>;
-+ };
-+ /* tx - 1g - 3 */
-+ port@ab000 {
-+ fsl,qman-channel-id = <0x44>;
-+ };
-+ /* tx - 10g - 0 */
-+ port@b0000 {
-+ fsl,qman-channel-id = <0x40>;
-+ };
-+ /* offline 0 */
-+ port@81000 {
-+ fsl,qman-channel-id = <0x45>;
-+ };
-+ /* offline 1 */
-+ port@82000 {
-+ fsl,qman-channel-id = <0x46>;
-+ };
-+ /* offline 2 */
-+ port@83000 {
-+ fsl,qman-channel-id = <0x47>;
-+ };
-+ /* offline 3 */
-+ port@84000 {
-+ fsl,qman-channel-id = <0x48>;
-+ };
-+ /* offline 4 */
-+ port@85000 {
-+ fsl,qman-channel-id = <0x49>;
-+ };
-+ /* offline 5 */
-+ port@86000 {
-+ fsl,qman-channel-id = <0x4a>;
-+ };
-+ /* offline 6 */
-+ port@87000 {
-+ fsl,qman-channel-id = <0x4b>;
-+ };
-+ };
-+
-+/include/ "qoriq-fman-1.dtsi"
-+/include/ "qoriq-fman-1-1g-0.dtsi"
-+/include/ "qoriq-fman-1-1g-1.dtsi"
-+/include/ "qoriq-fman-1-1g-2.dtsi"
-+/include/ "qoriq-fman-1-1g-3.dtsi"
-+/include/ "qoriq-fman-1-10g-0.dtsi"
-+ fman1: fman@500000 {
-+ /* tx - 1g - 0 */
-+ port@a8000 {
-+ fsl,qman-channel-id = <0x61>;
-+ };
-+ /* tx - 1g - 1 */
-+ port@a9000 {
-+ fsl,qman-channel-id = <0x62>;
-+ };
-+ /* tx - 1g - 2 */
-+ port@aa000 {
-+ fsl,qman-channel-id = <0x63>;
-+ };
-+ /* tx - 1g - 3 */
-+ port@ab000 {
-+ fsl,qman-channel-id = <0x64>;
-+ };
-+ /* tx - 10g - 0 */
-+ port@b0000 {
-+ fsl,qman-channel-id = <0x60>;
-+ };
-+ /* offline 0 */
-+ port@81000 {
-+ fsl,qman-channel-id = <0x65>;
-+ };
-+ /* offline 1 */
-+ port@82000 {
-+ fsl,qman-channel-id = <0x66>;
-+ };
-+ /* offline 2 */
-+ port@83000 {
-+ fsl,qman-channel-id = <0x67>;
-+ };
-+ /* offline 3 */
-+ port@84000 {
-+ fsl,qman-channel-id = <0x68>;
-+ };
-+ /* offline 4 */
-+ port@85000 {
-+ fsl,qman-channel-id = <0x69>;
-+ };
-+ /* offline 5 */
-+ port@86000 {
-+ fsl,qman-channel-id = <0x6a>;
-+ };
-+ /* offline 6 */
-+ port@87000 {
-+ fsl,qman-channel-id = <0x6b>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p4080si-pre.dtsi b/arch/powerpc/boot/dts/fsl/p4080si-pre.dtsi
-new file mode 100644
-index 0000000..aea2e14
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p4080si-pre.dtsi
-@@ -0,0 +1,152 @@
-+/*
-+ * P4080/P4040 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "e500mc_power_isa.dtsi"
-+
-+/ {
-+ compatible = "fsl,P4080";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ ccsr = &soc;
-+ dcsr = &dcsr;
-+
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ serial2 = &serial2;
-+ serial3 = &serial3;
-+ pci0 = &pci0;
-+ pci1 = &pci1;
-+ pci2 = &pci2;
-+ usb0 = &usb0;
-+ usb1 = &usb1;
-+ dma0 = &dma0;
-+ dma1 = &dma1;
-+ sdhc = &sdhc;
-+ msi0 = &msi0;
-+ msi1 = &msi1;
-+ msi2 = &msi2;
-+
-+ crypto = &crypto;
-+ sec_jr0 = &sec_jr0;
-+ sec_jr1 = &sec_jr1;
-+ sec_jr2 = &sec_jr2;
-+ sec_jr3 = &sec_jr3;
-+ rtic_a = &rtic_a;
-+ rtic_b = &rtic_b;
-+ rtic_c = &rtic_c;
-+ rtic_d = &rtic_d;
-+ sec_mon = &sec_mon;
-+
-+ bman = &bman;
-+ qman = &qman;
-+ pme = &pme;
-+ fman0 = &fman0;
-+ fman1 = &fman1;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ cpu0: PowerPC,e500mc@0 {
-+ device_type = "cpu";
-+ reg = <0>;
-+ next-level-cache = <&L2_0>;
-+ L2_0: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ cpu1: PowerPC,e500mc@1 {
-+ device_type = "cpu";
-+ reg = <1>;
-+ next-level-cache = <&L2_1>;
-+ L2_1: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ cpu2: PowerPC,e500mc@2 {
-+ device_type = "cpu";
-+ reg = <2>;
-+ next-level-cache = <&L2_2>;
-+ L2_2: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ cpu3: PowerPC,e500mc@3 {
-+ device_type = "cpu";
-+ reg = <3>;
-+ next-level-cache = <&L2_3>;
-+ L2_3: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ cpu4: PowerPC,e500mc@4 {
-+ device_type = "cpu";
-+ reg = <4>;
-+ next-level-cache = <&L2_4>;
-+ L2_4: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ cpu5: PowerPC,e500mc@5 {
-+ device_type = "cpu";
-+ reg = <5>;
-+ next-level-cache = <&L2_5>;
-+ L2_5: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ cpu6: PowerPC,e500mc@6 {
-+ device_type = "cpu";
-+ reg = <6>;
-+ next-level-cache = <&L2_6>;
-+ L2_6: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ cpu7: PowerPC,e500mc@7 {
-+ device_type = "cpu";
-+ reg = <7>;
-+ next-level-cache = <&L2_7>;
-+ L2_7: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi b/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi
-new file mode 100644
-index 0000000..3a330c1
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi
-@@ -0,0 +1,439 @@
-+/*
-+ * P5020/5010 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&lbc {
-+ compatible = "fsl,p5020-elbc", "fsl,elbc", "simple-bus";
-+ interrupts = <25 2 0 0>;
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+};
-+
-+/* controller at 0x200000 */
-+&pci0 {
-+ compatible = "fsl,p5020-pcie", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 1 15>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 1 15>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 40 1 0 0
-+ 0000 0 0 2 &mpic 1 1 0 0
-+ 0000 0 0 3 &mpic 2 1 0 0
-+ 0000 0 0 4 &mpic 3 1 0 0
-+ >;
-+ };
-+};
-+
-+/* controller at 0x201000 */
-+&pci1 {
-+ compatible = "fsl,p5020-pcie", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 1 14>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 1 14>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 41 1 0 0
-+ 0000 0 0 2 &mpic 5 1 0 0
-+ 0000 0 0 3 &mpic 6 1 0 0
-+ 0000 0 0 4 &mpic 7 1 0 0
-+ >;
-+ };
-+};
-+
-+/* controller at 0x202000 */
-+&pci2 {
-+ compatible = "fsl,p5020-pcie", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 1 13>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 1 13>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 42 1 0 0
-+ 0000 0 0 2 &mpic 9 1 0 0
-+ 0000 0 0 3 &mpic 10 1 0 0
-+ 0000 0 0 4 &mpic 11 1 0 0
-+ >;
-+ };
-+};
-+
-+/* controller at 0x203000 */
-+&pci3 {
-+ compatible = "fsl,p5020-pcie", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 1 12>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 1 12>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 43 1 0 0
-+ 0000 0 0 2 &mpic 0 1 0 0
-+ 0000 0 0 3 &mpic 4 1 0 0
-+ 0000 0 0 4 &mpic 8 1 0 0
-+ >;
-+ };
-+};
-+
-+&rio {
-+ compatible = "fsl,srio";
-+ interrupts = <16 2 1 11>;
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ ranges;
-+
-+ port1 {
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ cell-index = <1>;
-+ };
-+
-+ port2 {
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ cell-index = <2>;
-+ };
-+};
-+
-+&dcsr {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,dcsr", "simple-bus";
-+
-+ dcsr-epu@0 {
-+ compatible = "fsl,p5020-dcsr-epu", "fsl,dcsr-epu";
-+ interrupts = <52 2 0 0
-+ 84 2 0 0
-+ 85 2 0 0>;
-+ reg = <0x0 0x1000>;
-+ };
-+ dcsr-npc {
-+ compatible = "fsl,dcsr-npc";
-+ reg = <0x1000 0x1000 0x1000000 0x8000>;
-+ };
-+ dcsr-nxc@2000 {
-+ compatible = "fsl,dcsr-nxc";
-+ reg = <0x2000 0x1000>;
-+ };
-+ dcsr-corenet {
-+ compatible = "fsl,dcsr-corenet";
-+ reg = <0x8000 0x1000 0xB0000 0x1000>;
-+ };
-+ dcsr-dpaa@9000 {
-+ compatible = "fsl,p5020-dcsr-dpaa", "fsl,dcsr-dpaa";
-+ reg = <0x9000 0x1000>;
-+ };
-+ dcsr-ocn@11000 {
-+ compatible = "fsl,p5020-dcsr-ocn", "fsl,dcsr-ocn";
-+ reg = <0x11000 0x1000>;
-+ };
-+ dcsr-ddr@12000 {
-+ compatible = "fsl,dcsr-ddr";
-+ dev-handle = <&ddr1>;
-+ reg = <0x12000 0x1000>;
-+ };
-+ dcsr-ddr@13000 {
-+ compatible = "fsl,dcsr-ddr";
-+ dev-handle = <&ddr2>;
-+ reg = <0x13000 0x1000>;
-+ };
-+ dcsr-nal@18000 {
-+ compatible = "fsl,p5020-dcsr-nal", "fsl,dcsr-nal";
-+ reg = <0x18000 0x1000>;
-+ };
-+ dcsr-rcpm@22000 {
-+ compatible = "fsl,p5020-dcsr-rcpm", "fsl,dcsr-rcpm";
-+ reg = <0x22000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@40000 {
-+ compatible = "fsl,dcsr-e5500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu0>;
-+ reg = <0x40000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@41000 {
-+ compatible = "fsl,dcsr-e5500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu1>;
-+ reg = <0x41000 0x1000>;
-+ };
-+};
-+
-+&bportals {
-+/include/ "qoriq-bman1-portals.dtsi"
-+};
-+
-+&qportals {
-+/include/ "qoriq-qman1-portals.dtsi"
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "simple-bus";
-+
-+ soc-sram-error {
-+ compatible = "fsl,soc-sram-error";
-+ interrupts = <16 2 1 29>;
-+ };
-+
-+ corenet-law@0 {
-+ compatible = "fsl,corenet-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <32>;
-+ };
-+
-+ ddr1: memory-controller@8000 {
-+ compatible = "fsl,qoriq-memory-controller-v4.5", "fsl,qoriq-memory-controller";
-+ reg = <0x8000 0x1000>;
-+ interrupts = <16 2 1 23>;
-+ };
-+
-+ ddr2: memory-controller@9000 {
-+ compatible = "fsl,qoriq-memory-controller-v4.5","fsl,qoriq-memory-controller";
-+ reg = <0x9000 0x1000>;
-+ interrupts = <16 2 1 22>;
-+ };
-+
-+ cpc: l3-cache-controller@10000 {
-+ compatible = "fsl,p5020-l3-cache-controller", "fsl,p4080-l3-cache-controller", "cache";
-+ reg = <0x10000 0x1000
-+ 0x11000 0x1000>;
-+ interrupts = <16 2 1 27
-+ 16 2 1 26>;
-+ };
-+
-+ corenet-cf@18000 {
-+ compatible = "fsl,corenet-cf";
-+ reg = <0x18000 0x1000>;
-+ interrupts = <16 2 1 31>;
-+ fsl,ccf-num-csdids = <32>;
-+ fsl,ccf-num-snoopids = <32>;
-+ };
-+
-+ iommu@20000 {
-+ compatible = "fsl,pamu-v1.0", "fsl,pamu";
-+ reg = <0x20000 0x4000>;
-+ interrupts = <
-+ 24 2 0 0
-+ 16 2 1 30>;
-+ };
-+
-+/include/ "qoriq-mpic.dtsi"
-+
-+ guts: global-utilities@e0000 {
-+ compatible = "fsl,qoriq-device-config-1.0";
-+ reg = <0xe0000 0xe00>;
-+ fsl,has-rstcr;
-+ #sleep-cells = <1>;
-+ fsl,liodn-bits = <12>;
-+ };
-+
-+ pins: global-utilities@e0e00 {
-+ compatible = "fsl,qoriq-pin-control-1.0";
-+ reg = <0xe0e00 0x200>;
-+ #sleep-cells = <2>;
-+ };
-+
-+ clockgen: global-utilities@e1000 {
-+ compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0";
-+ reg = <0xe1000 0x1000>;
-+ clock-frequency = <0>;
-+ };
-+
-+ rcpm: global-utilities@e2000 {
-+ compatible = "fsl,qoriq-rcpm-1.0";
-+ reg = <0xe2000 0x1000>;
-+ #sleep-cells = <1>;
-+ };
-+
-+ sfp: sfp@e8000 {
-+ compatible = "fsl,p5020-sfp", "fsl,qoriq-sfp-1.0";
-+ reg = <0xe8000 0x1000>;
-+ };
-+
-+ serdes: serdes@ea000 {
-+ compatible = "fsl,p5020-serdes";
-+ reg = <0xea000 0x1000>;
-+ };
-+
-+/include/ "qoriq-dma-0.dtsi"
-+/include/ "qoriq-dma-1.dtsi"
-+/include/ "qoriq-espi-0.dtsi"
-+ spi@110000 {
-+ fsl,espi-num-chipselects = <4>;
-+ };
-+
-+/include/ "qoriq-esdhc-0.dtsi"
-+ sdhc@114000 {
-+ sdhci,auto-cmd12;
-+ };
-+
-+/include/ "qoriq-i2c-0.dtsi"
-+/include/ "qoriq-i2c-1.dtsi"
-+/include/ "qoriq-duart-0.dtsi"
-+/include/ "qoriq-duart-1.dtsi"
-+/include/ "qoriq-gpio-0.dtsi"
-+/include/ "qoriq-usb2-mph-0.dtsi"
-+ usb0: usb@210000 {
-+ compatible = "fsl-usb2-mph-v1.6", "fsl,mpc85xx-usb2-mph", "fsl-usb2-mph";
-+ phy_type = "utmi";
-+ port0;
-+ };
-+
-+/include/ "qoriq-usb2-dr-0.dtsi"
-+ usb1: usb@211000 {
-+ compatible = "fsl-usb2-dr-v1.6", "fsl,mpc85xx-usb2-dr", "fsl-usb2-dr";
-+ dr_mode = "host";
-+ phy_type = "utmi";
-+ };
-+
-+/include/ "qoriq-sata2-0.dtsi"
-+ sata@220000 {
-+ compatible = "fsl,p5020-sata", "fsl,pq-sata-v2";
-+ };
-+/include/ "qoriq-sata2-1.dtsi"
-+ sata@221000 {
-+ compatible = "fsl,p5020-sata", "fsl,pq-sata-v2";
-+ };
-+/include/ "qoriq-sec4.2-0.dtsi"
-+/include/ "qoriq-pme-0.dtsi"
-+/include/ "qoriq-rman-0.dtsi"
-+ rman: rman@1e0000 {
-+ fsl,qman-channels-id = <0x62 0x63>;
-+ };
-+
-+/include/ "qoriq-qman1.dtsi"
-+/include/ "qoriq-bman1.dtsi"
-+
-+/include/ "qoriq-fman-0.dtsi"
-+/include/ "qoriq-fman-0-1g-0.dtsi"
-+/include/ "qoriq-fman-0-1g-1.dtsi"
-+/include/ "qoriq-fman-0-1g-2.dtsi"
-+/include/ "qoriq-fman-0-1g-3.dtsi"
-+/include/ "qoriq-fman-0-1g-4.dtsi"
-+/include/ "qoriq-fman-0-10g-0.dtsi"
-+ fman0: fman@400000 {
-+ /* tx - 1g - 0 */
-+ port@a8000 {
-+ fsl,qman-channel-id = <0x41>;
-+ };
-+ /* tx - 1g - 1 */
-+ port@a9000 {
-+ fsl,qman-channel-id = <0x42>;
-+ };
-+ /* tx - 1g - 2 */
-+ port@aa000 {
-+ fsl,qman-channel-id = <0x43>;
-+ };
-+ /* tx - 1g - 3 */
-+ port@ab000 {
-+ fsl,qman-channel-id = <0x44>;
-+ };
-+ /* tx - 1g - 4 */
-+ port@ac000 {
-+ fsl,qman-channel-id = <0x45>;
-+ };
-+ /* tx - 10g - 0 */
-+ port@b0000 {
-+ fsl,qman-channel-id = <0x40>;
-+ };
-+ /* offline 0 */
-+ port@81000 {
-+ fsl,qman-channel-id = <0x46>;
-+ };
-+ /* offline 1 */
-+ port@82000 {
-+ fsl,qman-channel-id = <0x47>;
-+ };
-+ /* offline 2 */
-+ port@83000 {
-+ fsl,qman-channel-id = <0x48>;
-+ };
-+ /* offline 3 */
-+ port@84000 {
-+ fsl,qman-channel-id = <0x49>;
-+ };
-+ /* offline 4 */
-+ port@85000 {
-+ fsl,qman-channel-id = <0x4a>;
-+ };
-+ /* offline 5 */
-+ port@86000 {
-+ fsl,qman-channel-id = <0x4b>;
-+ };
-+ };
-+
-+/include/ "qoriq-raid1.0-0.dtsi"
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi b/arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi
-new file mode 100644
-index 0000000..8cda17b
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi
-@@ -0,0 +1,111 @@
-+/*
-+ * P5020/P5010 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "e5500_power_isa.dtsi"
-+
-+/ {
-+ compatible = "fsl,P5020";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ ccsr = &soc;
-+ dcsr = &dcsr;
-+
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ serial2 = &serial2;
-+ serial3 = &serial3;
-+ pci0 = &pci0;
-+ pci1 = &pci1;
-+ pci2 = &pci2;
-+ pci3 = &pci3;
-+ usb0 = &usb0;
-+ usb1 = &usb1;
-+ dma0 = &dma0;
-+ dma1 = &dma1;
-+ sdhc = &sdhc;
-+ msi0 = &msi0;
-+ msi1 = &msi1;
-+ msi2 = &msi2;
-+
-+ crypto = &crypto;
-+ sec_jr0 = &sec_jr0;
-+ sec_jr1 = &sec_jr1;
-+ sec_jr2 = &sec_jr2;
-+ sec_jr3 = &sec_jr3;
-+ rtic_a = &rtic_a;
-+ rtic_b = &rtic_b;
-+ rtic_c = &rtic_c;
-+ rtic_d = &rtic_d;
-+ sec_mon = &sec_mon;
-+
-+ raideng = &raideng;
-+ raideng_jr0 = &raideng_jr0;
-+ raideng_jr1 = &raideng_jr1;
-+ raideng_jr2 = &raideng_jr2;
-+ raideng_jr3 = &raideng_jr3;
-+
-+ bman = &bman;
-+ qman = &qman;
-+ pme = &pme;
-+ rman = &rman;
-+ fman0 = &fman0;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ cpu0: PowerPC,e5500@0 {
-+ device_type = "cpu";
-+ reg = <0>;
-+ next-level-cache = <&L2_0>;
-+ L2_0: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ cpu1: PowerPC,e5500@1 {
-+ device_type = "cpu";
-+ reg = <1>;
-+ next-level-cache = <&L2_1>;
-+ L2_1: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p5040si-post.dtsi b/arch/powerpc/boot/dts/fsl/p5040si-post.dtsi
-new file mode 100644
-index 0000000..7eee08c
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p5040si-post.dtsi
-@@ -0,0 +1,448 @@
-+/*
-+ * P5040 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * This software is provided by Freescale Semiconductor "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 Freescale Semiconductor 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.
-+ */
-+
-+&lbc {
-+ compatible = "fsl,p5040-elbc", "fsl,elbc", "simple-bus";
-+ interrupts = <25 2 0 0>;
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+};
-+
-+/* controller at 0x200000 */
-+&pci0 {
-+ compatible = "fsl,p5040-pcie", "fsl,qoriq-pcie-v2.4", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 1 15>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 1 15>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 40 1 0 0
-+ 0000 0 0 2 &mpic 1 1 0 0
-+ 0000 0 0 3 &mpic 2 1 0 0
-+ 0000 0 0 4 &mpic 3 1 0 0
-+ >;
-+ };
-+};
-+
-+/* controller at 0x201000 */
-+&pci1 {
-+ compatible = "fsl,p5040-pcie", "fsl,qoriq-pcie-v2.4", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 1 14>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 1 14>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 41 1 0 0
-+ 0000 0 0 2 &mpic 5 1 0 0
-+ 0000 0 0 3 &mpic 6 1 0 0
-+ 0000 0 0 4 &mpic 7 1 0 0
-+ >;
-+ };
-+};
-+
-+/* controller at 0x202000 */
-+&pci2 {
-+ compatible = "fsl,p5040-pcie", "fsl,qoriq-pcie-v2.4", "fsl,qoriq-pcie-v2.2";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <16 2 1 13>;
-+ pcie@0 {
-+ reg = <0 0 0 0 0>;
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <16 2 1 13>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 42 1 0 0
-+ 0000 0 0 2 &mpic 9 1 0 0
-+ 0000 0 0 3 &mpic 10 1 0 0
-+ 0000 0 0 4 &mpic 11 1 0 0
-+ >;
-+ };
-+};
-+
-+&dcsr {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,dcsr", "simple-bus";
-+
-+ dcsr-epu@0 {
-+ compatible = "fsl,p5040-dcsr-epu", "fsl,dcsr-epu";
-+ interrupts = <52 2 0 0
-+ 84 2 0 0
-+ 85 2 0 0>;
-+ reg = <0x0 0x1000>;
-+ };
-+ dcsr-npc {
-+ compatible = "fsl,dcsr-npc";
-+ reg = <0x1000 0x1000 0x1000000 0x8000>;
-+ };
-+ dcsr-nxc@2000 {
-+ compatible = "fsl,dcsr-nxc";
-+ reg = <0x2000 0x1000>;
-+ };
-+ dcsr-corenet {
-+ compatible = "fsl,dcsr-corenet";
-+ reg = <0x8000 0x1000 0xB0000 0x1000>;
-+ };
-+ dcsr-dpaa@9000 {
-+ compatible = "fsl,p5040-dcsr-dpaa", "fsl,dcsr-dpaa";
-+ reg = <0x9000 0x1000>;
-+ };
-+ dcsr-ocn@11000 {
-+ compatible = "fsl,p5040-dcsr-ocn", "fsl,dcsr-ocn";
-+ reg = <0x11000 0x1000>;
-+ };
-+ dcsr-ddr@12000 {
-+ compatible = "fsl,dcsr-ddr";
-+ dev-handle = <&ddr1>;
-+ reg = <0x12000 0x1000>;
-+ };
-+ dcsr-ddr@13000 {
-+ compatible = "fsl,dcsr-ddr";
-+ dev-handle = <&ddr2>;
-+ reg = <0x13000 0x1000>;
-+ };
-+ dcsr-nal@18000 {
-+ compatible = "fsl,p5040-dcsr-nal", "fsl,dcsr-nal";
-+ reg = <0x18000 0x1000>;
-+ };
-+ dcsr-rcpm@22000 {
-+ compatible = "fsl,p5040-dcsr-rcpm", "fsl,dcsr-rcpm";
-+ reg = <0x22000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@40000 {
-+ compatible = "fsl,dcsr-e5500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu0>;
-+ reg = <0x40000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@41000 {
-+ compatible = "fsl,dcsr-e5500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu1>;
-+ reg = <0x41000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@42000 {
-+ compatible = "fsl,dcsr-e5500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu2>;
-+ reg = <0x42000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@43000 {
-+ compatible = "fsl,dcsr-e5500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu3>;
-+ reg = <0x43000 0x1000>;
-+ };
-+};
-+
-+&bportals {
-+/include/ "qoriq-bman1-portals.dtsi"
-+};
-+
-+&qportals {
-+/include/ "qoriq-qman1-portals.dtsi"
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "simple-bus";
-+
-+ soc-sram-error {
-+ compatible = "fsl,soc-sram-error";
-+ interrupts = <16 2 1 29>;
-+ };
-+
-+ corenet-law@0 {
-+ compatible = "fsl,corenet-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <32>;
-+ };
-+
-+ ddr1: memory-controller@8000 {
-+ compatible = "fsl,qoriq-memory-controller-v4.5", "fsl,qoriq-memory-controller";
-+ reg = <0x8000 0x1000>;
-+ interrupts = <16 2 1 23>;
-+ };
-+
-+ ddr2: memory-controller@9000 {
-+ compatible = "fsl,qoriq-memory-controller-v4.5","fsl,qoriq-memory-controller";
-+ reg = <0x9000 0x1000>;
-+ interrupts = <16 2 1 22>;
-+ };
-+
-+ cpc: l3-cache-controller@10000 {
-+ compatible = "fsl,p5040-l3-cache-controller", "fsl,p4080-l3-cache-controller", "cache";
-+ reg = <0x10000 0x1000
-+ 0x11000 0x1000>;
-+ interrupts = <16 2 1 27
-+ 16 2 1 26>;
-+ };
-+
-+ corenet-cf@18000 {
-+ compatible = "fsl,corenet-cf";
-+ reg = <0x18000 0x1000>;
-+ interrupts = <16 2 1 31>;
-+ fsl,ccf-num-csdids = <32>;
-+ fsl,ccf-num-snoopids = <32>;
-+ };
-+
-+ iommu@20000 {
-+ compatible = "fsl,pamu-v1.0", "fsl,pamu";
-+ reg = <0x20000 0x5000>;
-+ interrupts = <
-+ 24 2 0 0
-+ 16 2 1 30>;
-+ };
-+
-+/include/ "qoriq-mpic.dtsi"
-+
-+ guts: global-utilities@e0000 {
-+ compatible = "fsl,p5040-device-config", "fsl,qoriq-device-config-1.0";
-+ reg = <0xe0000 0xe00>;
-+ fsl,has-rstcr;
-+ #sleep-cells = <1>;
-+ fsl,liodn-bits = <12>;
-+ };
-+
-+ pins: global-utilities@e0e00 {
-+ compatible = "fsl,p5040-pin-control", "fsl,qoriq-pin-control-1.0";
-+ reg = <0xe0e00 0x200>;
-+ #sleep-cells = <2>;
-+ };
-+
-+ clockgen: global-utilities@e1000 {
-+ compatible = "fsl,p5040-clockgen", "fsl,qoriq-clockgen-1.0";
-+ reg = <0xe1000 0x1000>;
-+ clock-frequency = <0>;
-+ };
-+
-+ rcpm: global-utilities@e2000 {
-+ compatible = "fsl,p5040-rcpm", "fsl,qoriq-rcpm-1.0";
-+ reg = <0xe2000 0x1000>;
-+ #sleep-cells = <1>;
-+ };
-+
-+ sfp: sfp@e8000 {
-+ compatible = "fsl,p5040-sfp", "fsl,qoriq-sfp-1.0";
-+ reg = <0xe8000 0x1000>;
-+ };
-+
-+ serdes: serdes@ea000 {
-+ compatible = "fsl,p5040-serdes";
-+ reg = <0xea000 0x1000>;
-+ };
-+
-+/include/ "qoriq-dma-0.dtsi"
-+/include/ "qoriq-dma-1.dtsi"
-+/include/ "qoriq-espi-0.dtsi"
-+ spi@110000 {
-+ fsl,espi-num-chipselects = <4>;
-+ };
-+
-+/include/ "qoriq-esdhc-0.dtsi"
-+ sdhc@114000 {
-+ sdhci,auto-cmd12;
-+ };
-+
-+/include/ "qoriq-i2c-0.dtsi"
-+/include/ "qoriq-i2c-1.dtsi"
-+/include/ "qoriq-duart-0.dtsi"
-+/include/ "qoriq-duart-1.dtsi"
-+/include/ "qoriq-gpio-0.dtsi"
-+/include/ "qoriq-usb2-mph-0.dtsi"
-+ usb0: usb@210000 {
-+ compatible = "fsl-usb2-mph-v1.6", "fsl,mpc85xx-usb2-mph", "fsl-usb2-mph";
-+ phy_type = "utmi";
-+ port0;
-+ };
-+
-+/include/ "qoriq-usb2-dr-0.dtsi"
-+ usb1: usb@211000 {
-+ compatible = "fsl-usb2-dr-v1.6", "fsl,mpc85xx-usb2-dr", "fsl-usb2-dr";
-+ dr_mode = "host";
-+ phy_type = "utmi";
-+ };
-+
-+/include/ "qoriq-sata2-0.dtsi"
-+/include/ "qoriq-sata2-1.dtsi"
-+/include/ "qoriq-sec5.2-0.dtsi"
-+/include/ "qoriq-qman1.dtsi"
-+/include/ "qoriq-bman1.dtsi"
-+
-+/include/ "qoriq-fman-0.dtsi"
-+/include/ "qoriq-fman-0-1g-0.dtsi"
-+/include/ "qoriq-fman-0-1g-1.dtsi"
-+/include/ "qoriq-fman-0-1g-2.dtsi"
-+/include/ "qoriq-fman-0-1g-3.dtsi"
-+/include/ "qoriq-fman-0-1g-4.dtsi"
-+/include/ "qoriq-fman-0-10g-0.dtsi"
-+ fman0: fman@400000 {
-+ /* tx - 1g - 0 */
-+ port@a8000 {
-+ fsl,qman-channel-id = <0x41>;
-+ };
-+ /* tx - 1g - 1 */
-+ port@a9000 {
-+ fsl,qman-channel-id = <0x42>;
-+ };
-+ /* tx - 1g - 2 */
-+ port@aa000 {
-+ fsl,qman-channel-id = <0x43>;
-+ };
-+ /* tx - 1g - 3 */
-+ port@ab000 {
-+ fsl,qman-channel-id = <0x44>;
-+ };
-+ /* tx - 1g - 4 */
-+ port@ac000 {
-+ fsl,qman-channel-id = <0x45>;
-+ };
-+ /* tx - 10g - 0 */
-+ port@b0000 {
-+ fsl,qman-channel-id = <0x40>;
-+ };
-+ /* offline 0 */
-+ port@81000 {
-+ fsl,qman-channel-id = <0x46>;
-+ };
-+ /* offline 1 */
-+ port@82000 {
-+ fsl,qman-channel-id = <0x47>;
-+ };
-+ /* offline 2 */
-+ port@83000 {
-+ fsl,qman-channel-id = <0x48>;
-+ };
-+ /* offline 3 */
-+ port@84000 {
-+ fsl,qman-channel-id = <0x49>;
-+ };
-+ /* offline 4 */
-+ port@85000 {
-+ fsl,qman-channel-id = <0x4a>;
-+ };
-+ /* offline 5 */
-+ port@86000 {
-+ fsl,qman-channel-id = <0x4b>;
-+ };
-+ };
-+
-+/include/ "qoriq-fman-1.dtsi"
-+/include/ "qoriq-fman-1-1g-0.dtsi"
-+/include/ "qoriq-fman-1-1g-1.dtsi"
-+/include/ "qoriq-fman-1-1g-2.dtsi"
-+/include/ "qoriq-fman-1-1g-3.dtsi"
-+/include/ "qoriq-fman-1-1g-4.dtsi"
-+/include/ "qoriq-fman-1-10g-0.dtsi"
-+ fman1: fman@500000 {
-+ /* tx - 1g - 0 */
-+ port@a8000 {
-+ fsl,qman-channel-id = <0x61>;
-+ };
-+ /* tx - 1g - 1 */
-+ port@a9000 {
-+ fsl,qman-channel-id = <0x62>;
-+ };
-+ /* tx - 1g - 2 */
-+ port@aa000 {
-+ fsl,qman-channel-id = <0x63>;
-+ };
-+ /* tx - 1g - 3 */
-+ port@ab000 {
-+ fsl,qman-channel-id = <0x64>;
-+ };
-+ /* tx - 1g - 4 */
-+ port@ac000 {
-+ fsl,qman-channel-id = <0x65>;
-+ };
-+ /* tx - 10g - 0 */
-+ port@b0000 {
-+ fsl,qman-channel-id = <0x60>;
-+ };
-+ /* offline 0 */
-+ port@81000 {
-+ fsl,qman-channel-id = <0x66>;
-+ };
-+ /* offline 1 */
-+ port@82000 {
-+ fsl,qman-channel-id = <0x67>;
-+ };
-+ /* offline 2 */
-+ port@83000 {
-+ fsl,qman-channel-id = <0x68>;
-+ };
-+ /* offline 3 */
-+ port@84000 {
-+ fsl,qman-channel-id = <0x69>;
-+ };
-+ /* offline 4 */
-+ port@85000 {
-+ fsl,qman-channel-id = <0x6a>;
-+ };
-+ /* offline 5 */
-+ port@86000 {
-+ fsl,qman-channel-id = <0x6b>;
-+ };
-+ };
-+
-+/include/ "qoriq-raid1.0-0.dtsi"
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/p5040si-pre.dtsi b/arch/powerpc/boot/dts/fsl/p5040si-pre.dtsi
-new file mode 100644
-index 0000000..64edbf1
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/p5040si-pre.dtsi
-@@ -0,0 +1,125 @@
-+/*
-+ * P5040 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * This software is provided by Freescale Semiconductor "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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "e5500_power_isa.dtsi"
-+
-+/ {
-+ compatible = "fsl,P5040";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ ccsr = &soc;
-+ dcsr = &dcsr;
-+
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ serial2 = &serial2;
-+ serial3 = &serial3;
-+ pci0 = &pci0;
-+ pci1 = &pci1;
-+ pci2 = &pci2;
-+ usb0 = &usb0;
-+ usb1 = &usb1;
-+ dma0 = &dma0;
-+ dma1 = &dma1;
-+ sdhc = &sdhc;
-+ msi0 = &msi0;
-+ msi1 = &msi1;
-+ msi2 = &msi2;
-+
-+ crypto = &crypto;
-+ sec_jr0 = &sec_jr0;
-+ sec_jr1 = &sec_jr1;
-+ sec_jr2 = &sec_jr2;
-+ sec_jr3 = &sec_jr3;
-+ rtic_a = &rtic_a;
-+ rtic_b = &rtic_b;
-+ rtic_c = &rtic_c;
-+ rtic_d = &rtic_d;
-+ sec_mon = &sec_mon;
-+
-+ raideng = &raideng;
-+ raideng_jr0 = &raideng_jr0;
-+ raideng_jr1 = &raideng_jr1;
-+ raideng_jr2 = &raideng_jr2;
-+ raideng_jr3 = &raideng_jr3;
-+
-+ bman = &bman;
-+ qman = &qman;
-+ fman0 = &fman0;
-+ fman1 = &fman1;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ cpu0: PowerPC,e5500@0 {
-+ device_type = "cpu";
-+ reg = <0>;
-+ next-level-cache = <&L2_0>;
-+ L2_0: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ cpu1: PowerPC,e5500@1 {
-+ device_type = "cpu";
-+ reg = <1>;
-+ next-level-cache = <&L2_1>;
-+ L2_1: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ cpu2: PowerPC,e5500@2 {
-+ device_type = "cpu";
-+ reg = <2>;
-+ next-level-cache = <&L2_2>;
-+ L2_2: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ cpu3: PowerPC,e5500@3 {
-+ device_type = "cpu";
-+ reg = <3>;
-+ next-level-cache = <&L2_3>;
-+ L2_3: l2-cache {
-+ next-level-cache = <&cpc>;
-+ };
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-dma-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-dma-0.dtsi
-new file mode 100644
-index 0000000..b5b37ad
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-dma-0.dtsi
-@@ -0,0 +1,66 @@
-+/*
-+ * PQ3 DMA device tree stub [ controller @ offset 0x21000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+dma@21300 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,eloplus-dma";
-+ reg = <0x21300 0x4>;
-+ ranges = <0x0 0x21100 0x200>;
-+ cell-index = <0>;
-+ dma-channel@0 {
-+ compatible = "fsl,eloplus-dma-channel";
-+ reg = <0x0 0x80>;
-+ cell-index = <0>;
-+ interrupts = <20 2 0 0>;
-+ };
-+ dma-channel@80 {
-+ compatible = "fsl,eloplus-dma-channel";
-+ reg = <0x80 0x80>;
-+ cell-index = <1>;
-+ interrupts = <21 2 0 0>;
-+ };
-+ dma-channel@100 {
-+ compatible = "fsl,eloplus-dma-channel";
-+ reg = <0x100 0x80>;
-+ cell-index = <2>;
-+ interrupts = <22 2 0 0>;
-+ };
-+ dma-channel@180 {
-+ compatible = "fsl,eloplus-dma-channel";
-+ reg = <0x180 0x80>;
-+ cell-index = <3>;
-+ interrupts = <23 2 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-dma-1.dtsi b/arch/powerpc/boot/dts/fsl/pq3-dma-1.dtsi
-new file mode 100644
-index 0000000..28cb8a5
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-dma-1.dtsi
-@@ -0,0 +1,66 @@
-+/*
-+ * PQ3 DMA device tree stub [ controller @ offset 0xc300 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+dma@c300 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,eloplus-dma";
-+ reg = <0xc300 0x4>;
-+ ranges = <0x0 0xc100 0x200>;
-+ cell-index = <1>;
-+ dma-channel@0 {
-+ compatible = "fsl,eloplus-dma-channel";
-+ reg = <0x0 0x80>;
-+ cell-index = <0>;
-+ interrupts = <76 2 0 0>;
-+ };
-+ dma-channel@80 {
-+ compatible = "fsl,eloplus-dma-channel";
-+ reg = <0x80 0x80>;
-+ cell-index = <1>;
-+ interrupts = <77 2 0 0>;
-+ };
-+ dma-channel@100 {
-+ compatible = "fsl,eloplus-dma-channel";
-+ reg = <0x100 0x80>;
-+ cell-index = <2>;
-+ interrupts = <78 2 0 0>;
-+ };
-+ dma-channel@180 {
-+ compatible = "fsl,eloplus-dma-channel";
-+ reg = <0x180 0x80>;
-+ cell-index = <3>;
-+ interrupts = <79 2 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-duart-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-duart-0.dtsi
-new file mode 100644
-index 0000000..5e268fd
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-duart-0.dtsi
-@@ -0,0 +1,51 @@
-+/*
-+ * PQ3 DUART device tree stub [ controller @ offset 0x4000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+serial0: serial@4500 {
-+ cell-index = <0>;
-+ device_type = "serial";
-+ compatible = "fsl,ns16550", "ns16550";
-+ reg = <0x4500 0x100>;
-+ clock-frequency = <0>;
-+ interrupts = <42 2 0 0>;
-+};
-+
-+serial1: serial@4600 {
-+ cell-index = <1>;
-+ device_type = "serial";
-+ compatible = "fsl,ns16550", "ns16550";
-+ reg = <0x4600 0x100>;
-+ clock-frequency = <0>;
-+ interrupts = <42 2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-esdhc-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-esdhc-0.dtsi
-new file mode 100644
-index 0000000..5743433
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-esdhc-0.dtsi
-@@ -0,0 +1,41 @@
-+/*
-+ * PQ3 eSDHC device tree stub [ controller @ offset 0x2e000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+sdhc@2e000 {
-+ compatible = "fsl,esdhc";
-+ reg = <0x2e000 0x1000>;
-+ interrupts = <72 0x2 0 0>;
-+ /* Filled in by U-Boot */
-+ clock-frequency = <0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-espi-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-espi-0.dtsi
-new file mode 100644
-index 0000000..75854b2
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-espi-0.dtsi
-@@ -0,0 +1,41 @@
-+/*
-+ * PQ3 eSPI device tree stub [ controller @ offset 0x7000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+spi@7000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,mpc8536-espi";
-+ reg = <0x7000 0x1000>;
-+ interrupts = <59 0x2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec1-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec1-0.dtsi
-new file mode 100644
-index 0000000..3b0650a
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec1-0.dtsi
-@@ -0,0 +1,54 @@
-+/*
-+ * PQ3 eTSEC device tree stub [ @ offsets 0x24000 ]
-+ *
-+ * Copyright 2011-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+ethernet@24000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ cell-index = <0>;
-+ device_type = "network";
-+ model = "eTSEC";
-+ compatible = "gianfar";
-+ reg = <0x24000 0x1000>;
-+ ranges = <0x0 0x24000 0x1000>;
-+ fsl,magic-packet;
-+ local-mac-address = [ 00 00 00 00 00 00 ];
-+ interrupts = <29 2 0 0 30 2 0 0 34 2 0 0>;
-+};
-+
-+mdio@24520 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,gianfar-mdio";
-+ reg = <0x24520 0x20>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec1-1.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec1-1.dtsi
-new file mode 100644
-index 0000000..96693b4
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec1-1.dtsi
-@@ -0,0 +1,54 @@
-+/*
-+ * PQ3 eTSEC device tree stub [ @ offsets 0x25000 ]
-+ *
-+ * Copyright 2011-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+ethernet@25000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ cell-index = <1>;
-+ device_type = "network";
-+ model = "eTSEC";
-+ compatible = "gianfar";
-+ reg = <0x25000 0x1000>;
-+ ranges = <0x0 0x25000 0x1000>;
-+ fsl,magic-packet;
-+ local-mac-address = [ 00 00 00 00 00 00 ];
-+ interrupts = <35 2 0 0 36 2 0 0 40 2 0 0>;
-+};
-+
-+mdio@25520 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,gianfar-tbi";
-+ reg = <0x25520 0x20>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec1-2.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec1-2.dtsi
-new file mode 100644
-index 0000000..6b3fab1
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec1-2.dtsi
-@@ -0,0 +1,54 @@
-+/*
-+ * PQ3 eTSEC device tree stub [ @ offsets 0x26000 ]
-+ *
-+ * Copyright 2011-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+ethernet@26000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ cell-index = <2>;
-+ device_type = "network";
-+ model = "eTSEC";
-+ compatible = "gianfar";
-+ reg = <0x26000 0x1000>;
-+ ranges = <0x0 0x26000 0x1000>;
-+ fsl,magic-packet;
-+ local-mac-address = [ 00 00 00 00 00 00 ];
-+ interrupts = <31 2 0 0 32 2 0 0 33 2 0 0>;
-+};
-+
-+mdio@26520 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,gianfar-tbi";
-+ reg = <0x26520 0x20>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec1-3.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec1-3.dtsi
-new file mode 100644
-index 0000000..0da592d
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec1-3.dtsi
-@@ -0,0 +1,54 @@
-+/*
-+ * PQ3 eTSEC device tree stub [ @ offsets 0x27000 ]
-+ *
-+ * Copyright 2011-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+ethernet@27000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ cell-index = <3>;
-+ device_type = "network";
-+ model = "eTSEC";
-+ compatible = "gianfar";
-+ reg = <0x27000 0x1000>;
-+ ranges = <0x0 0x27000 0x1000>;
-+ fsl,magic-packet;
-+ local-mac-address = [ 00 00 00 00 00 00 ];
-+ interrupts = <37 2 0 0 38 2 0 0 39 2 0 0>;
-+};
-+
-+mdio@27520 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,gianfar-tbi";
-+ reg = <0x27520 0x20>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec1-timer-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec1-timer-0.dtsi
-new file mode 100644
-index 0000000..efe2ca0
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec1-timer-0.dtsi
-@@ -0,0 +1,39 @@
-+/*
-+ * PQ3 eTSEC Timer (IEEE 1588) device tree stub [ @ offsets 0x24e00 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+ptp_clock@24e00 {
-+ compatible = "fsl,etsec-ptp";
-+ reg = <0x24e00 0xb0>;
-+ interrupts = <68 2 0 0 69 2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi
-new file mode 100644
-index 0000000..1382fec
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi
-@@ -0,0 +1,60 @@
-+/*
-+ * PQ3 eTSEC2 device tree stub [ @ offsets 0x24000/0xb0000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+mdio@24000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,etsec2-mdio";
-+ reg = <0x24000 0x1000 0xb0030 0x4>;
-+};
-+
-+ethernet@b0000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "network";
-+ model = "eTSEC";
-+ compatible = "fsl,etsec2";
-+ fsl,num_rx_queues = <0x8>;
-+ fsl,num_tx_queues = <0x8>;
-+ fsl,magic-packet;
-+ local-mac-address = [ 00 00 00 00 00 00 ];
-+
-+ queue-group@b0000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0xb0000 0x1000>;
-+ interrupts = <29 2 0 0 30 2 0 0 34 2 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi
-new file mode 100644
-index 0000000..221cd2e
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi
-@@ -0,0 +1,60 @@
-+/*
-+ * PQ3 eTSEC2 device tree stub [ @ offsets 0x25000/0xb1000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+mdio@25000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,etsec2-tbi";
-+ reg = <0x25000 0x1000 0xb1030 0x4>;
-+};
-+
-+ethernet@b1000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "network";
-+ model = "eTSEC";
-+ compatible = "fsl,etsec2";
-+ fsl,num_rx_queues = <0x8>;
-+ fsl,num_tx_queues = <0x8>;
-+ fsl,magic-packet;
-+ local-mac-address = [ 00 00 00 00 00 00 ];
-+
-+ queue-group@b1000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0xb1000 0x1000>;
-+ interrupts = <35 2 0 0 36 2 0 0 40 2 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi
-new file mode 100644
-index 0000000..61456c3
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi
-@@ -0,0 +1,59 @@
-+/*
-+ * PQ3 eTSEC2 device tree stub [ @ offsets 0x26000/0xb2000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+mdio@26000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,etsec2-tbi";
-+ reg = <0x26000 0x1000 0xb1030 0x4>;
-+};
-+
-+ethernet@b2000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "network";
-+ model = "eTSEC";
-+ compatible = "fsl,etsec2";
-+ fsl,num_rx_queues = <0x8>;
-+ fsl,num_tx_queues = <0x8>;
-+ fsl,magic-packet;
-+ local-mac-address = [ 00 00 00 00 00 00 ];
-+
-+ queue-group@b2000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0xb2000 0x1000>;
-+ interrupts = <31 2 0 0 32 2 0 0 33 2 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-grp2-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-grp2-0.dtsi
-new file mode 100644
-index 0000000..034ab8f
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-grp2-0.dtsi
-@@ -0,0 +1,42 @@
-+/*
-+ * PQ3 eTSEC2 Group 2 device tree stub [ @ offsets 0xb4000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&enet0_grp2 {
-+ queue-group@b4000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0xb4000 0x1000>;
-+ interrupts = <17 2 0 0 18 2 0 0 24 2 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-grp2-1.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-grp2-1.dtsi
-new file mode 100644
-index 0000000..3be9ba3
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-grp2-1.dtsi
-@@ -0,0 +1,42 @@
-+/*
-+ * PQ3 eTSEC2 Group 2 device tree stub [ @ offsets 0xb5000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&enet1_grp2 {
-+ queue-group@b5000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0xb5000 0x1000>;
-+ interrupts = <51 2 0 0 52 2 0 0 67 2 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-grp2-2.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-grp2-2.dtsi
-new file mode 100644
-index 0000000..02a3345
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-grp2-2.dtsi
-@@ -0,0 +1,42 @@
-+/*
-+ * PQ3 eTSEC2 Group 2 device tree stub [ @ offsets 0xb6000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&enet2_grp2 {
-+ queue-group@b6000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0xb6000 0x1000>;
-+ interrupts = <25 2 0 0 26 2 0 0 27 2 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-gpio-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-gpio-0.dtsi
-new file mode 100644
-index 0000000..72a3ef5
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-gpio-0.dtsi
-@@ -0,0 +1,41 @@
-+/*
-+ * PQ3 GPIO device tree stub [ controller @ offset 0xf000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+gpio-controller@f000 {
-+ #gpio-cells = <2>;
-+ compatible = "fsl,pq3-gpio";
-+ reg = <0xf000 0x100>;
-+ interrupts = <47 0x2 0 0>;
-+ gpio-controller;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-i2c-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-i2c-0.dtsi
-new file mode 100644
-index 0000000..d1dd6fb
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-i2c-0.dtsi
-@@ -0,0 +1,43 @@
-+/*
-+ * PQ3 I2C device tree stub [ controller @ offset 0x3000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+i2c@3000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ cell-index = <0>;
-+ compatible = "fsl-i2c";
-+ reg = <0x3000 0x100>;
-+ interrupts = <43 2 0 0>;
-+ dfsrr;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-i2c-1.dtsi b/arch/powerpc/boot/dts/fsl/pq3-i2c-1.dtsi
-new file mode 100644
-index 0000000..a9bd803
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-i2c-1.dtsi
-@@ -0,0 +1,43 @@
-+/*
-+ * PQ3 I2C device tree stub [ controller @ offset 0x3100 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+i2c@3100 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ cell-index = <1>;
-+ compatible = "fsl-i2c";
-+ reg = <0x3100 0x100>;
-+ interrupts = <43 2 0 0>;
-+ dfsrr;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-mpic-timer-B.dtsi b/arch/powerpc/boot/dts/fsl/pq3-mpic-timer-B.dtsi
-new file mode 100644
-index 0000000..8734cff
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-mpic-timer-B.dtsi
-@@ -0,0 +1,42 @@
-+/*
-+ * PQ3 MPIC Timer (Group B) device tree stub [ controller @ offset 0x42100 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+timer@42100 {
-+ compatible = "fsl,mpic-global-timer";
-+ reg = <0x42100 0x100 0x42300 4>;
-+ interrupts = <4 0 3 0
-+ 5 0 3 0
-+ 6 0 3 0
-+ 7 0 3 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi b/arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi
-new file mode 100644
-index 0000000..5c80460
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi
-@@ -0,0 +1,66 @@
-+/*
-+ * PQ3 MPIC device tree stub [ controller @ offset 0x40000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+mpic: pic@40000 {
-+ interrupt-controller;
-+ #address-cells = <0>;
-+ #interrupt-cells = <4>;
-+ reg = <0x40000 0x40000>;
-+ compatible = "fsl,mpic";
-+ device_type = "open-pic";
-+};
-+
-+timer@41100 {
-+ compatible = "fsl,mpic-global-timer";
-+ reg = <0x41100 0x100 0x41300 4>;
-+ interrupts = <0 0 3 0
-+ 1 0 3 0
-+ 2 0 3 0
-+ 3 0 3 0>;
-+};
-+
-+msi@41600 {
-+ compatible = "fsl,mpic-msi";
-+ reg = <0x41600 0x80>;
-+ msi-available-ranges = <0 0x100>;
-+ interrupts = <
-+ 0xe0 0 0 0
-+ 0xe1 0 0 0
-+ 0xe2 0 0 0
-+ 0xe3 0 0 0
-+ 0xe4 0 0 0
-+ 0xe5 0 0 0
-+ 0xe6 0 0 0
-+ 0xe7 0 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-power.dtsi b/arch/powerpc/boot/dts/fsl/pq3-power.dtsi
-new file mode 100644
-index 0000000..5aa854c
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-power.dtsi
-@@ -0,0 +1,48 @@
-+/*
-+ * PQ3 Power Management device tree stub
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+power@e0070 {
-+ compatible = "fsl,mpc8548-pmc";
-+ reg = <0xe0070 0x20>;
-+
-+ etsec1_clk: soc-clk@24 {
-+ fsl,pmcdr-mask = <0x00000080>;
-+ };
-+ etsec2_clk: soc-clk@25 {
-+ fsl,pmcdr-mask = <0x00000040>;
-+ };
-+ etsec3_clk: soc-clk@26 {
-+ fsl,pmcdr-mask = <0x00000020>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-rmu-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-rmu-0.dtsi
-new file mode 100644
-index 0000000..587ca9f
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-rmu-0.dtsi
-@@ -0,0 +1,68 @@
-+/*
-+ * PQ3 RIO Message Unit device tree stub [ controller @ offset 0xd3000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+rmu: rmu@d3000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,srio-rmu";
-+ reg = <0xd3000 0x500>;
-+ ranges = <0x0 0xd3000 0x500>;
-+
-+ message-unit@0 {
-+ compatible = "fsl,srio-msg-unit";
-+ reg = <0x0 0x100>;
-+ interrupts = <
-+ 53 2 0 0 /* msg1_tx_irq */
-+ 54 2 0 0>;/* msg1_rx_irq */
-+ };
-+ message-unit@100 {
-+ compatible = "fsl,srio-msg-unit";
-+ reg = <0x100 0x100>;
-+ interrupts = <
-+ 55 2 0 0 /* msg2_tx_irq */
-+ 56 2 0 0>;/* msg2_rx_irq */
-+ };
-+ doorbell-unit@400 {
-+ compatible = "fsl,srio-dbell-unit";
-+ reg = <0x400 0x80>;
-+ interrupts = <
-+ 49 2 0 0 /* bell_outb_irq */
-+ 50 2 0 0>;/* bell_inb_irq */
-+ };
-+ port-write-unit@4e0 {
-+ compatible = "fsl,srio-port-write-unit";
-+ reg = <0x4e0 0x20>;
-+ interrupts = <48 2 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-sata2-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-sata2-0.dtsi
-new file mode 100644
-index 0000000..3c28dd0
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-sata2-0.dtsi
-@@ -0,0 +1,40 @@
-+/*
-+ * PQ3 SATAv2 device tree stub [ controller @ offset 0x18000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+sata@18000 {
-+ compatible = "fsl,pq-sata-v2";
-+ reg = <0x18000 0x1000>;
-+ cell-index = <1>;
-+ interrupts = <74 0x2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-sata2-1.dtsi b/arch/powerpc/boot/dts/fsl/pq3-sata2-1.dtsi
-new file mode 100644
-index 0000000..eefaf28
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-sata2-1.dtsi
-@@ -0,0 +1,40 @@
-+/*
-+ * PQ3 SATAv2 device tree stub [ controller @ offset 0x19000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+sata@19000 {
-+ compatible = "fsl,pq-sata-v2";
-+ reg = <0x19000 0x1000>;
-+ cell-index = <2>;
-+ interrupts = <41 0x2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-sec2.1-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-sec2.1-0.dtsi
-new file mode 100644
-index 0000000..02a5c7a
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-sec2.1-0.dtsi
-@@ -0,0 +1,43 @@
-+/*
-+ * PQ3 Sec/Crypto 2.1 device tree stub [ controller @ offset 0x30000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+crypto@30000 {
-+ compatible = "fsl,sec2.1", "fsl,sec2.0";
-+ reg = <0x30000 0x10000>;
-+ interrupts = <45 2 0 0>;
-+ fsl,num-channels = <4>;
-+ fsl,channel-fifo-len = <24>;
-+ fsl,exec-units-mask = <0xfe>;
-+ fsl,descriptor-types-mask = <0x12b0ebf>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-sec3.0-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-sec3.0-0.dtsi
-new file mode 100644
-index 0000000..bba1ba4
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-sec3.0-0.dtsi
-@@ -0,0 +1,45 @@
-+/*
-+ * PQ3 Sec/Crypto 3.0 device tree stub [ controller @ offset 0x30000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+crypto@30000 {
-+ compatible = "fsl,sec3.0",
-+ "fsl,sec2.4", "fsl,sec2.2", "fsl,sec2.1",
-+ "fsl,sec2.0";
-+ reg = <0x30000 0x10000>;
-+ interrupts = <45 2 0 0 58 2 0 0>;
-+ fsl,num-channels = <4>;
-+ fsl,channel-fifo-len = <24>;
-+ fsl,exec-units-mask = <0x9fe>;
-+ fsl,descriptor-types-mask = <0x3ab0ebf>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-sec3.1-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-sec3.1-0.dtsi
-new file mode 100644
-index 0000000..8f0a566
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-sec3.1-0.dtsi
-@@ -0,0 +1,45 @@
-+/*
-+ * PQ3 Sec/Crypto 3.1 device tree stub [ controller @ offset 0x30000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+crypto@30000 {
-+ compatible = "fsl,sec3.1", "fsl,sec3.0",
-+ "fsl,sec2.4", "fsl,sec2.2", "fsl,sec2.1",
-+ "fsl,sec2.0";
-+ reg = <0x30000 0x10000>;
-+ interrupts = <45 2 0 0 58 2 0 0>;
-+ fsl,num-channels = <4>;
-+ fsl,channel-fifo-len = <24>;
-+ fsl,exec-units-mask = <0xbfe>;
-+ fsl,descriptor-types-mask = <0x3ab0ebf>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-sec3.3-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-sec3.3-0.dtsi
-new file mode 100644
-index 0000000..c227f27
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-sec3.3-0.dtsi
-@@ -0,0 +1,45 @@
-+/*
-+ * PQ3 Sec/Crypto 3.3 device tree stub [ controller @ offset 0x30000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+crypto@30000 {
-+ compatible = "fsl,sec3.3", "fsl,sec3.1", "fsl,sec3.0",
-+ "fsl,sec2.4", "fsl,sec2.2", "fsl,sec2.1",
-+ "fsl,sec2.0";
-+ reg = <0x30000 0x10000>;
-+ interrupts = <45 2 0 0 58 2 0 0>;
-+ fsl,num-channels = <4>;
-+ fsl,channel-fifo-len = <24>;
-+ fsl,exec-units-mask = <0x97c>;
-+ fsl,descriptor-types-mask = <0x3a30abf>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-sec4.4-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-sec4.4-0.dtsi
-new file mode 100644
-index 0000000..ffadcb5
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-sec4.4-0.dtsi
-@@ -0,0 +1,66 @@
-+/*
-+ * PQ3 Sec/Crypto 4.4 device tree stub [ controller @ offset 0x30000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+crypto@30000 {
-+ compatible = "fsl,sec-v4.4", "fsl,sec-v4.0";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ ranges = <0x0 0x30000 0x10000>;
-+ reg = <0x30000 0x10000>;
-+ interrupts = <58 2 0 0>;
-+
-+ sec_jr0: jr@1000 {
-+ compatible = "fsl,sec-v4.4-job-ring", "fsl,sec-v4.0-job-ring";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <45 2 0 0>;
-+ };
-+
-+ sec_jr1: jr@2000 {
-+ compatible = "fsl,sec-v4.4-job-ring", "fsl,sec-v4.0-job-ring";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <45 2 0 0>;
-+ };
-+
-+ sec_jr2: jr@3000 {
-+ compatible = "fsl,sec-v4.4-job-ring", "fsl,sec-v4.0-job-ring";
-+ reg = <0x3000 0x1000>;
-+ interrupts = <45 2 0 0>;
-+ };
-+
-+ sec_jr3: jr@4000 {
-+ compatible = "fsl,sec-v4.4-job-ring", "fsl,sec-v4.0-job-ring";
-+ reg = <0x4000 0x1000>;
-+ interrupts = <45 2 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-tdm1.0-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-tdm1.0-0.dtsi
-new file mode 100644
-index 0000000..d4bdd5d
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-tdm1.0-0.dtsi
-@@ -0,0 +1,41 @@
-+/*
-+ * PQ3 TDM device tree stub [ controller @ offset 0x16000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+tdm@16000 {
-+ compatible = "fsl,tdm1.0";
-+ reg = <0x16000 0x200 0x2c000 0x2000>;
-+ clock-frequency = <0>;
-+ interrupts = <62 8 0 0>;
-+ fsl,max-time-slots = <128>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-usb2-dr-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-usb2-dr-0.dtsi
-new file mode 100644
-index 0000000..185ab9d
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-usb2-dr-0.dtsi
-@@ -0,0 +1,41 @@
-+/*
-+ * PQ3 USB DR device tree stub [ controller @ offset 0x22000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+usb@22000 {
-+ compatible = "fsl-usb2-dr";
-+ reg = <0x22000 0x1000>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ interrupts = <28 0x2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-usb2-dr-1.dtsi b/arch/powerpc/boot/dts/fsl/pq3-usb2-dr-1.dtsi
-new file mode 100644
-index 0000000..fe24cd6
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/pq3-usb2-dr-1.dtsi
-@@ -0,0 +1,41 @@
-+/*
-+ * PQ3 USB DR device tree stub [ controller @ offset 0x23000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+usb@23000 {
-+ compatible = "fsl-usb2-dr";
-+ reg = <0x23000 0x1000>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ interrupts = <46 0x2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qonverge-usb2-dr-0.dtsi b/arch/powerpc/boot/dts/fsl/qonverge-usb2-dr-0.dtsi
-new file mode 100644
-index 0000000..8bf4a72
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qonverge-usb2-dr-0.dtsi
-@@ -0,0 +1,41 @@
-+/*
-+ * QorIQ Qonverge USB Host device tree stub [ controller @ offset 0x210000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+usb@210000 {
-+ compatible = "fsl-usb2-dr";
-+ reg = <0x210000 0x1000>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ interrupts = <44 0x2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-bman1-portals.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-bman1-portals.dtsi
-new file mode 100644
-index 0000000..88ccba4
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-bman1-portals.dtsi
-@@ -0,0 +1,97 @@
-+/*
-+ * QorIQ BMan Portal device tree stub for 10 portals
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+#address-cells = <0x1>;
-+#size-cells = <0x1>;
-+compatible = "simple-bus";
-+bman-portal@0 {
-+ cell-index = <0x0>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x0 0x4000 0x100000 0x1000>;
-+ interrupts = <105 2 0 0>;
-+};
-+bman-portal@4000 {
-+ cell-index = <0x1>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x4000 0x4000 0x101000 0x1000>;
-+ interrupts = <107 2 0 0>;
-+};
-+bman-portal@8000 {
-+ cell-index = <2>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x8000 0x4000 0x102000 0x1000>;
-+ interrupts = <109 2 0 0>;
-+};
-+bman-portal@c000 {
-+ cell-index = <0x3>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0xc000 0x4000 0x103000 0x1000>;
-+ interrupts = <111 2 0 0>;
-+};
-+bman-portal@10000 {
-+ cell-index = <0x4>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x10000 0x4000 0x104000 0x1000>;
-+ interrupts = <113 2 0 0>;
-+};
-+bman-portal@14000 {
-+ cell-index = <0x5>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x14000 0x4000 0x105000 0x1000>;
-+ interrupts = <115 2 0 0>;
-+};
-+bman-portal@18000 {
-+ cell-index = <0x6>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x18000 0x4000 0x106000 0x1000>;
-+ interrupts = <117 2 0 0>;
-+};
-+bman-portal@1c000 {
-+ cell-index = <0x7>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x1c000 0x4000 0x107000 0x1000>;
-+ interrupts = <119 2 0 0>;
-+};
-+bman-portal@20000 {
-+ cell-index = <0x8>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x20000 0x4000 0x108000 0x1000>;
-+ interrupts = <121 2 0 0>;
-+};
-+bman-portal@24000 {
-+ cell-index = <0x9>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x24000 0x4000 0x109000 0x1000>;
-+ interrupts = <123 2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-bman1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-bman1.dtsi
-new file mode 100644
-index 0000000..b05be1c
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-bman1.dtsi
-@@ -0,0 +1,39 @@
-+/*
-+ * QorIQ BMan device tree stub [ controller @ offset 0x31a000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+bman: bman@31a000 {
-+ compatible = "fsl,bman";
-+ reg = <0x31a000 0x1000>;
-+ interrupts = <16 2 1 2>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-bman2-portals.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-bman2-portals.dtsi
-new file mode 100644
-index 0000000..8c0ced5
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-bman2-portals.dtsi
-@@ -0,0 +1,338 @@
-+/*
-+ * QorIQ BMan Portal device tree stub for 50 portals
-+ * i.e BMan2.1
-+ *
-+ * Copyright 2011-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+#address-cells = <0x1>;
-+#size-cells = <0x1>;
-+compatible = "simple-bus";
-+bman-portal@0 {
-+ cell-index = <0x0>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x0 0x4000 0x1000000 0x1000>;
-+ interrupts = <105 2 0 0>;
-+};
-+bman-portal@4000 {
-+ cell-index = <0x1>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x4000 0x4000 0x1001000 0x1000>;
-+ interrupts = <107 2 0 0>;
-+};
-+bman-portal@8000 {
-+ cell-index = <2>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x8000 0x4000 0x1002000 0x1000>;
-+ interrupts = <109 2 0 0>;
-+};
-+bman-portal@c000 {
-+ cell-index = <0x3>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0xc000 0x4000 0x1003000 0x1000>;
-+ interrupts = <111 2 0 0>;
-+};
-+bman-portal@10000 {
-+ cell-index = <0x4>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x10000 0x4000 0x1004000 0x1000>;
-+ interrupts = <113 2 0 0>;
-+};
-+bman-portal@14000 {
-+ cell-index = <0x5>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x14000 0x4000 0x1005000 0x1000>;
-+ interrupts = <115 2 0 0>;
-+};
-+bman-portal@18000 {
-+ cell-index = <0x6>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x18000 0x4000 0x1006000 0x1000>;
-+ interrupts = <117 2 0 0>;
-+};
-+bman-portal@1c000 {
-+ cell-index = <0x7>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x1c000 0x4000 0x1007000 0x1000>;
-+ interrupts = <119 2 0 0>;
-+};
-+bman-portal@20000 {
-+ cell-index = <0x8>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x20000 0x4000 0x1008000 0x1000>;
-+ interrupts = <121 2 0 0>;
-+};
-+bman-portal@24000 {
-+ cell-index = <0x9>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x24000 0x4000 0x1009000 0x1000>;
-+ interrupts = <123 2 0 0>;
-+};
-+bman-portal@28000 {
-+ cell-index = <0xa>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x28000 0x4000 0x100a000 0x1000>;
-+ interrupts = <125 2 0 0>;
-+};
-+bman-portal@2c000 {
-+ cell-index = <0xb>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x2c000 0x4000 0x100b000 0x1000>;
-+ interrupts = <127 2 0 0>;
-+};
-+bman-portal@30000 {
-+ cell-index = <0xc>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x30000 0x4000 0x100c000 0x1000>;
-+ interrupts = <129 2 0 0>;
-+};
-+bman-portal@34000 {
-+ cell-index = <0xd>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x34000 0x4000 0x100d000 0x1000>;
-+ interrupts = <131 2 0 0>;
-+};
-+bman-portal@38000 {
-+ cell-index = <0xe>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x38000 0x4000 0x100e000 0x1000>;
-+ interrupts = <133 2 0 0>;
-+};
-+bman-portal@3c000 {
-+ cell-index = <0xf>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x3c000 0x4000 0x100f000 0x1000>;
-+ interrupts = <135 2 0 0>;
-+};
-+bman-portal@40000 {
-+ cell-index = <0x10>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x40000 0x4000 0x1010000 0x1000>;
-+ interrupts = <137 2 0 0>;
-+};
-+bman-portal@44000 {
-+ cell-index = <0x11>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x44000 0x4000 0x1011000 0x1000>;
-+ interrupts = <139 2 0 0>;
-+};
-+bman-portal@48000 {
-+ cell-index = <0x12>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x48000 0x4000 0x1012000 0x1000>;
-+ interrupts = <141 2 0 0>;
-+};
-+bman-portal@4c000 {
-+ cell-index = <0x13>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x4c000 0x4000 0x1013000 0x1000>;
-+ interrupts = <143 2 0 0>;
-+};
-+bman-portal@50000 {
-+ cell-index = <0x14>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x50000 0x4000 0x1014000 0x1000>;
-+ interrupts = <145 2 0 0>;
-+};
-+bman-portal@54000 {
-+ cell-index = <0x15>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x54000 0x4000 0x1015000 0x1000>;
-+ interrupts = <147 2 0 0>;
-+};
-+bman-portal@58000 {
-+ cell-index = <0x16>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x58000 0x4000 0x1016000 0x1000>;
-+ interrupts = <149 2 0 0>;
-+};
-+bman-portal@5c000 {
-+ cell-index = <0x17>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x5c000 0x4000 0x1017000 0x1000>;
-+ interrupts = <151 2 0 0>;
-+};
-+bman-portal@60000 {
-+ cell-index = <0x18>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x60000 0x4000 0x1018000 0x1000>;
-+ interrupts = <153 2 0 0>;
-+};
-+bman-portal@64000 {
-+ cell-index = <0x19>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x64000 0x4000 0x1019000 0x1000>;
-+ interrupts = <155 2 0 0>;
-+};
-+bman-portal@68000 {
-+ cell-index = <0x1a>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x68000 0x4000 0x101a000 0x1000>;
-+ interrupts = <157 2 0 0>;
-+};
-+bman-portal@6c000 {
-+ cell-index = <0x1b>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x6c000 0x4000 0x101b000 0x1000>;
-+ interrupts = <159 2 0 0>;
-+};
-+bman-portal@70000 {
-+ cell-index = <0x1c>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x70000 0x4000 0x101c000 0x1000>;
-+ interrupts = <161 2 0 0>;
-+};
-+bman-portal@74000 {
-+ cell-index = <0x1d>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x74000 0x4000 0x101d000 0x1000>;
-+ interrupts = <163 2 0 0>;
-+};
-+bman-portal@78000 {
-+ cell-index = <0x1e>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x78000 0x4000 0x101e000 0x1000>;
-+ interrupts = <165 2 0 0>;
-+};
-+bman-portal@7c000 {
-+ cell-index = <0x1f>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x7c000 0x4000 0x101f000 0x1000>;
-+ interrupts = <167 2 0 0>;
-+};
-+bman-portal@80000 {
-+ cell-index = <0x20>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x80000 0x4000 0x1020000 0x1000>;
-+ interrupts = <169 2 0 0>;
-+};
-+bman-portal@84000 {
-+ cell-index = <0x21>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x84000 0x4000 0x1021000 0x1000>;
-+ interrupts = <171 2 0 0>;
-+};
-+bman-portal@88000 {
-+ cell-index = <0x22>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x88000 0x4000 0x1022000 0x1000>;
-+ interrupts = <173 2 0 0>;
-+};
-+bman-portal@8c000 {
-+ cell-index = <0x23>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x8c000 0x4000 0x1023000 0x1000>;
-+ interrupts = <175 2 0 0>;
-+};
-+bman-portal@90000 {
-+ cell-index = <0x24>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x90000 0x4000 0x1024000 0x1000>;
-+ interrupts = <385 2 0 0>;
-+};
-+bman-portal@94000 {
-+ cell-index = <0x25>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x94000 0x4000 0x1025000 0x1000>;
-+ interrupts = <387 2 0 0>;
-+};
-+bman-portal@98000 {
-+ cell-index = <0x26>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x98000 0x4000 0x1026000 0x1000>;
-+ interrupts = <389 2 0 0>;
-+};
-+bman-portal@9c000 {
-+ cell-index = <0x27>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0x9c000 0x4000 0x1027000 0x1000>;
-+ interrupts = <391 2 0 0>;
-+};
-+bman-portal@a0000 {
-+ cell-index = <0x28>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0xa0000 0x4000 0x1028000 0x1000>;
-+ interrupts = <393 2 0 0>;
-+};
-+bman-portal@a4000 {
-+ cell-index = <0x29>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0xa4000 0x4000 0x1029000 0x1000>;
-+ interrupts = <395 2 0 0>;
-+};
-+bman-portal@a8000 {
-+ cell-index = <0x2a>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0xa8000 0x4000 0x102a000 0x1000>;
-+ interrupts = <397 2 0 0>;
-+};
-+bman-portal@ac000 {
-+ cell-index = <0x2b>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0xac000 0x4000 0x102b000 0x1000>;
-+ interrupts = <399 2 0 0>;
-+};
-+bman-portal@b0000 {
-+ cell-index = <0x2c>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0xb0000 0x4000 0x102c000 0x1000>;
-+ interrupts = <401 2 0 0>;
-+};
-+bman-portal@b4000 {
-+ cell-index = <0x2d>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0xb4000 0x4000 0x102d000 0x1000>;
-+ interrupts = <403 2 0 0>;
-+};
-+bman-portal@b8000 {
-+ cell-index = <0x2e>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0xb8000 0x4000 0x102e000 0x1000>;
-+ interrupts = <405 2 0 0>;
-+};
-+bman-portal@bc000 {
-+ cell-index = <0x2f>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0xbc000 0x4000 0x102f000 0x1000>;
-+ interrupts = <407 2 0 0>;
-+};
-+bman-portal@c0000 {
-+ cell-index = <0x30>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0xc0000 0x4000 0x1030000 0x1000>;
-+ interrupts = <409 2 0 0>;
-+};
-+bman-portal@c4000 {
-+ cell-index = <0x31>;
-+ compatible = "fsl,bman-portal";
-+ reg = <0xc4000 0x4000 0x1031000 0x1000>;
-+ interrupts = <411 2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-dce-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-dce-0.dtsi
-new file mode 100644
-index 0000000..9b747ba
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-dce-0.dtsi
-@@ -0,0 +1,39 @@
-+/*
-+ * QorIQ DCE device tree stub [ controller @ offset 0x312000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "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 Freescale Semiconductor 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.
-+ */
-+
-+dce: dce@312000 {
-+ compatible = "fsl,dce";
-+ reg = <0x312000 0x10000>;
-+ interrupts = <16 2 1 4>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-dma-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-dma-0.dtsi
-new file mode 100644
-index 0000000..1aebf3e
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-dma-0.dtsi
-@@ -0,0 +1,66 @@
-+/*
-+ * QorIQ DMA device tree stub [ controller @ offset 0x100000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+dma0: dma@100300 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,eloplus-dma";
-+ reg = <0x100300 0x4>;
-+ ranges = <0x0 0x100100 0x200>;
-+ cell-index = <0>;
-+ dma-channel@0 {
-+ compatible = "fsl,eloplus-dma-channel";
-+ reg = <0x0 0x80>;
-+ cell-index = <0>;
-+ interrupts = <28 2 0 0>;
-+ };
-+ dma-channel@80 {
-+ compatible = "fsl,eloplus-dma-channel";
-+ reg = <0x80 0x80>;
-+ cell-index = <1>;
-+ interrupts = <29 2 0 0>;
-+ };
-+ dma-channel@100 {
-+ compatible = "fsl,eloplus-dma-channel";
-+ reg = <0x100 0x80>;
-+ cell-index = <2>;
-+ interrupts = <30 2 0 0>;
-+ };
-+ dma-channel@180 {
-+ compatible = "fsl,eloplus-dma-channel";
-+ reg = <0x180 0x80>;
-+ cell-index = <3>;
-+ interrupts = <31 2 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-dma-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-dma-1.dtsi
-new file mode 100644
-index 0000000..ecf5e18
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-dma-1.dtsi
-@@ -0,0 +1,66 @@
-+/*
-+ * QorIQ DMA device tree stub [ controller @ offset 0x101000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+dma1: dma@101300 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,eloplus-dma";
-+ reg = <0x101300 0x4>;
-+ ranges = <0x0 0x101100 0x200>;
-+ cell-index = <1>;
-+ dma-channel@0 {
-+ compatible = "fsl,eloplus-dma-channel";
-+ reg = <0x0 0x80>;
-+ cell-index = <0>;
-+ interrupts = <32 2 0 0>;
-+ };
-+ dma-channel@80 {
-+ compatible = "fsl,eloplus-dma-channel";
-+ reg = <0x80 0x80>;
-+ cell-index = <1>;
-+ interrupts = <33 2 0 0>;
-+ };
-+ dma-channel@100 {
-+ compatible = "fsl,eloplus-dma-channel";
-+ reg = <0x100 0x80>;
-+ cell-index = <2>;
-+ interrupts = <34 2 0 0>;
-+ };
-+ dma-channel@180 {
-+ compatible = "fsl,eloplus-dma-channel";
-+ reg = <0x180 0x80>;
-+ cell-index = <3>;
-+ interrupts = <35 2 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-dpaa-res1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-dpaa-res1.dtsi
-new file mode 100644
-index 0000000..6c6f7d7
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-dpaa-res1.dtsi
-@@ -0,0 +1,84 @@
-+/*
-+ * QorIQ DPAA resources device tree stub [ FQIDs, BPIDs ]
-+ *
-+ * Copyright 2011-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/* These stubs are required to alloc qbman drivers to determine what ranges of
-+ * resources are available for dynamic allocation, primarily because there are
-+ * some legacy "a priori" assumptions in certain subsystems (eg. networking)
-+ * that certain resources are reserved for their use. When those drivers (and in
-+ * some cases, their corresponding device-tree nodes) are updated to dynamically
-+ * allocate their resources, then *all* resources can be managed by the
-+ * allocators and there may be no further need to define these stubs.
-+ *
-+ * A couple of qualifiers to the above statement though:
-+ *
-+ * - Some resource ranges are hardware-specific, rather than being defined by
-+ * software memory allocation choices. Eg. the number of available BPIDs is
-+ * baked into silicon and so will probably always need to be expressed in the
-+ * device-tree, though in that case it will express all BPIDs, not just those
-+ * available for dynamic allocation.
-+ *
-+ * - Even for memory-backed resources that are software determined (FQIDs), this
-+ * information may only be configured and available on the control-plane
-+ * partition that manages the device, so in AMP or hypervised scenarios there
-+ * may still be need to a way to provide allocation ranges. Ie. for O/S
-+ * instances that don't know how many resources are available to hardware, and
-+ * possibly even for O/S instances that do know how many are available but
-+ * that should not "own" all of them.
-+ */
-+
-+&bportals {
-+ bman-bpids@0 {
-+ compatible = "fsl,bpid-range";
-+ fsl,bpid-range = <32 32>;
-+ };
-+};
-+
-+&qportals {
-+ qman-fqids@0 {
-+ compatible = "fsl,fqid-range";
-+ fsl,fqid-range = <256 256>;
-+ };
-+ qman-fqids@1 {
-+ compatible = "fsl,fqid-range";
-+ fsl,fqid-range = <32768 32768>;
-+ };
-+ qman-pools@0 {
-+ compatible = "fsl,pool-channel-range";
-+ fsl,pool-channel-range = <0x21 0xf>;
-+ };
-+ qman-cgrids@0 {
-+ compatible = "fsl,cgrid-range";
-+ fsl,cgrid-range = <0 256>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-dpaa-res2.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-dpaa-res2.dtsi
-new file mode 100644
-index 0000000..73ee049
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-dpaa-res2.dtsi
-@@ -0,0 +1,63 @@
-+/*
-+ * QorIQ DPAA resources device tree stub [ FQIDs, BPIDs ]
-+ *
-+ * Copyright 2011-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/* The comments in qoriq-dpaa-res1.dtsi apply here too so will not be repeated.
-+ * This alternative file is to support p1023 which does not have the same
-+ * resource ranges as other SoCs to date. */
-+
-+&bportals {
-+ bman-bpids@0 {
-+ compatible = "fsl,bpid-range";
-+ fsl,bpid-range = <1 7>;
-+ };
-+};
-+
-+&qportals {
-+ qman-fqids@0 {
-+ compatible = "fsl,fqid-range";
-+ fsl,fqid-range = <256 256>;
-+ };
-+ qman-fqids@1 {
-+ compatible = "fsl,fqid-range";
-+ fsl,fqid-range = <32768 32768>;
-+ };
-+ qman-pools@0 {
-+ compatible = "fsl,pool-channel-range";
-+ fsl,pool-channel-range = <0x21 0x3>;
-+ };
-+ qman-cgrids@0 {
-+ compatible = "fsl,cgrid-range";
-+ fsl,cgrid-range = <0 64>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-dpaa-res3.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-dpaa-res3.dtsi
-new file mode 100644
-index 0000000..1bc5af9
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-dpaa-res3.dtsi
-@@ -0,0 +1,84 @@
-+/*
-+ * QorIQ DPAA resources device tree stub [ FQIDs, BPIDs ]
-+ *
-+ * Copyright 2011-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/* These stubs are required to alloc qbman drivers to determine what ranges of
-+ * resources are available for dynamic allocation, primarily because there are
-+ * some legacy "a priori" assumptions in certain subsystems (eg. networking)
-+ * that certain resources are reserved for their use. When those drivers (and in
-+ * some cases, their corresponding device-tree nodes) are updated to dynamically
-+ * allocate their resources, then *all* resources can be managed by the
-+ * allocators and there may be no further need to define these stubs.
-+ *
-+ * A couple of qualifiers to the above statement though:
-+ *
-+ * - Some resource ranges are hardware-specific, rather than being defined by
-+ * software memory allocation choices. Eg. the number of available BPIDs is
-+ * baked into silicon and so will probably always need to be expressed in the
-+ * device-tree, though in that case it will express all BPIDs, not just those
-+ * available for dynamic allocation.
-+ *
-+ * - Even for memory-backed resources that are software determined (FQIDs), this
-+ * information may only be configured and available on the control-plane
-+ * partition that manages the device, so in AMP or hypervised scenarios there
-+ * may still be need to a way to provide allocation ranges. Ie. for O/S
-+ * instances that don't know how many resources are available to hardware, and
-+ * possibly even for O/S instances that do know how many are available but
-+ * that should not "own" all of them.
-+ */
-+
-+&bportals {
-+ bman-bpids@0 {
-+ compatible = "fsl,bpid-range";
-+ fsl,bpid-range = <32 32>;
-+ };
-+};
-+
-+&qportals {
-+ qman-fqids@0 {
-+ compatible = "fsl,fqid-range";
-+ fsl,fqid-range = <256 512>;
-+ };
-+ qman-fqids@1 {
-+ compatible = "fsl,fqid-range";
-+ fsl,fqid-range = <32768 32768>;
-+ };
-+ qman-pools@0 {
-+ compatible = "fsl,pool-channel-range";
-+ fsl,pool-channel-range = <0x401 0xf>;
-+ };
-+ qman-cgrids@0 {
-+ compatible = "fsl,cgrid-range";
-+ fsl,cgrid-range = <0 256>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-duart-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-duart-0.dtsi
-new file mode 100644
-index 0000000..225c07b
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-duart-0.dtsi
-@@ -0,0 +1,51 @@
-+/*
-+ * QorIQ DUART device tree stub [ controller @ offset 0x11c000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+serial0: serial@11c500 {
-+ cell-index = <0>;
-+ device_type = "serial";
-+ compatible = "fsl,ns16550", "ns16550";
-+ reg = <0x11c500 0x100>;
-+ clock-frequency = <0>;
-+ interrupts = <36 2 0 0>;
-+};
-+
-+serial1: serial@11c600 {
-+ cell-index = <1>;
-+ device_type = "serial";
-+ compatible = "fsl,ns16550", "ns16550";
-+ reg = <0x11c600 0x100>;
-+ clock-frequency = <0>;
-+ interrupts = <36 2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-duart-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-duart-1.dtsi
-new file mode 100644
-index 0000000..d23233a
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-duart-1.dtsi
-@@ -0,0 +1,51 @@
-+/*
-+ * QorIQ DUART device tree stub [ controller @ offset 0x11d000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+serial2: serial@11d500 {
-+ cell-index = <2>;
-+ device_type = "serial";
-+ compatible = "fsl,ns16550", "ns16550";
-+ reg = <0x11d500 0x100>;
-+ clock-frequency = <0>;
-+ interrupts = <37 2 0 0>;
-+};
-+
-+serial3: serial@11d600 {
-+ cell-index = <3>;
-+ device_type = "serial";
-+ compatible = "fsl,ns16550", "ns16550";
-+ reg = <0x11d600 0x100>;
-+ clock-frequency = <0>;
-+ interrupts = <37 2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
-new file mode 100644
-index 0000000..20835ae
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
-@@ -0,0 +1,40 @@
-+/*
-+ * QorIQ eSDHC device tree stub [ controller @ offset 0x114000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+sdhc: sdhc@114000 {
-+ compatible = "fsl,esdhc";
-+ reg = <0x114000 0x1000>;
-+ interrupts = <48 2 0 0>;
-+ clock-frequency = <0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-espi-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-espi-0.dtsi
-new file mode 100644
-index 0000000..6db0697
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-espi-0.dtsi
-@@ -0,0 +1,41 @@
-+/*
-+ * QorIQ eSPI device tree stub [ controller @ offset 0x110000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+spi@110000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,mpc8536-espi";
-+ reg = <0x110000 0x1000>;
-+ interrupts = <53 0x2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-0-10g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-10g-0.dtsi
-new file mode 100644
-index 0000000..c5c5086
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-10g-0.dtsi
-@@ -0,0 +1,63 @@
-+/*
-+ * QorIQ FMan 10g port #0 device tree stub [ controller @ offset 0x400000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@400000 {
-+ fman0_10g_rx0: port@90000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-10g-rx";
-+ reg = <0x90000 0x1000>;
-+ };
-+
-+ fman0_10g_tx0: port@b0000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-10g-tx";
-+ reg = <0xb0000 0x1000>;
-+ fsl,qman-channel-id = <0x40>;
-+ };
-+
-+ ethernet@f0000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-10g-mac";
-+ reg = <0xf0000 0x1000>;
-+ fsl,port-handles = <&fman0_10g_rx0 &fman0_10g_tx0>;
-+ };
-+
-+ xmdio0: mdio@f1000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-xmdio";
-+ reg = <0xf1000 0x1000>;
-+ interrupts = <100 1 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-0.dtsi
-new file mode 100644
-index 0000000..e52cb1f
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-0.dtsi
-@@ -0,0 +1,63 @@
-+/*
-+ * QorIQ FMan 1g port #0 device tree stub [ controller @ offset 0x400000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@400000 {
-+ fman0_rx0: port@88000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x88000 0x1000>;
-+ };
-+
-+ fman0_tx0: port@a8000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xa8000 0x1000>;
-+ };
-+
-+ ethernet@e0000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-1g-mac";
-+ reg = <0xe0000 0x1000>;
-+ fsl,port-handles = <&fman0_rx0 &fman0_tx0>;
-+ ptimer-handle = <&ptp_timer0>;
-+ };
-+
-+ mdio0: mdio@e1120 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-mdio";
-+ reg = <0xe1120 0xee0>;
-+ interrupts = <100 1 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-1.dtsi
-new file mode 100644
-index 0000000..a500a84
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-1.dtsi
-@@ -0,0 +1,63 @@
-+/*
-+ * QorIQ FMan 1g port #1 device tree stub [ controller @ offset 0x400000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@400000 {
-+ fman0_rx1: port@89000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x89000 0x1000>;
-+ };
-+
-+ fman0_tx1: port@a9000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xa9000 0x1000>;
-+ };
-+
-+ ethernet@e2000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-1g-mac";
-+ reg = <0xe2000 0x1000>;
-+ fsl,port-handles = <&fman0_rx1 &fman0_tx1>;
-+ ptimer-handle = <&ptp_timer0>;
-+ };
-+
-+ mdio@e3120 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-tbi";
-+ reg = <0xe3120 0xee0>;
-+ interrupts = <100 1 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-2.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-2.dtsi
-new file mode 100644
-index 0000000..14a8d22
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-2.dtsi
-@@ -0,0 +1,63 @@
-+/*
-+ * QorIQ FMan 1g port #2 device tree stub [ controller @ offset 0x400000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@400000 {
-+ fman0_rx2: port@8a000 {
-+ cell-index = <2>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x8a000 0x1000>;
-+ };
-+
-+ fman0_tx2: port@aa000 {
-+ cell-index = <2>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xaa000 0x1000>;
-+ };
-+
-+ ethernet@e4000 {
-+ cell-index = <2>;
-+ compatible = "fsl,fman-1g-mac";
-+ reg = <0xe4000 0x1000>;
-+ fsl,port-handles = <&fman0_rx2 &fman0_tx2>;
-+ ptimer-handle = <&ptp_timer0>;
-+ };
-+
-+ mdio@e5120 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-tbi";
-+ reg = <0xe5120 0xee0>;
-+ interrupts = <100 1 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-3.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-3.dtsi
-new file mode 100644
-index 0000000..fbd5887
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-3.dtsi
-@@ -0,0 +1,63 @@
-+/*
-+ * QorIQ FMan 1g port #3 device tree stub [ controller @ offset 0x400000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@400000 {
-+ fman0_rx3: port@8b000 {
-+ cell-index = <3>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x8b000 0x1000>;
-+ };
-+
-+ fman0_tx3: port@ab000 {
-+ cell-index = <3>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xab000 0x1000>;
-+ };
-+
-+ ethernet@e6000 {
-+ cell-index = <3>;
-+ compatible = "fsl,fman-1g-mac";
-+ reg = <0xe6000 0x1000>;
-+ fsl,port-handles = <&fman0_rx3 &fman0_tx3>;
-+ ptimer-handle = <&ptp_timer0>;
-+ };
-+
-+ mdio@e7120 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-tbi";
-+ reg = <0xe7120 0xee0>;
-+ interrupts = <100 1 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-4.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-4.dtsi
-new file mode 100644
-index 0000000..1c27647
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-4.dtsi
-@@ -0,0 +1,63 @@
-+/*
-+ * QorIQ FMan 1g port #4 device tree stub [ controller @ offset 0x400000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@400000 {
-+ fman0_rx4: port@8c000 {
-+ cell-index = <4>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x8c000 0x1000>;
-+ };
-+
-+ fman0_tx4: port@ac000 {
-+ cell-index = <4>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xac000 0x1000>;
-+ };
-+
-+ ethernet@e8000 {
-+ cell-index = <4>;
-+ compatible = "fsl,fman-1g-mac";
-+ reg = <0xe8000 0x1000>;
-+ fsl,port-handles = <&fman0_rx4 &fman0_tx4>;
-+ ptimer-handle = <&ptp_timer0>;
-+ };
-+
-+ mdio@e9120 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-tbi";
-+ reg = <0xe9120 0xee0>;
-+ interrupts = <100 1 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-0.dtsi
-new file mode 100644
-index 0000000..b074d13
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-0.dtsi
-@@ -0,0 +1,140 @@
-+/*
-+ * QorIQ FMan device tree stub [ controller @ offset 0x400000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman0: fman@400000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ cell-index = <0>;
-+ compatible = "fsl,fman", "simple-bus";
-+ ranges = <0 0x400000 0x100000>;
-+ reg = <0x400000 0x100000>;
-+ clock-frequency = <0>;
-+ interrupts = <
-+ 96 2 0 0
-+ 16 2 1 1>;
-+
-+ cc {
-+ compatible = "fsl,fman-cc";
-+ };
-+
-+ muram@0 {
-+ compatible = "fsl,fman-muram";
-+ reg = <0x0 0x28000>;
-+ };
-+
-+ bmi@80000 {
-+ compatible = "fsl,fman-bmi";
-+ reg = <0x80000 0x400>;
-+ };
-+
-+ qmi@80400 {
-+ compatible = "fsl,fman-qmi";
-+ reg = <0x80400 0x400>;
-+ };
-+
-+ fman0_oh0: port@81000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x81000 0x1000>;
-+ };
-+
-+ fman0_oh1: port@82000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x82000 0x1000>;
-+ };
-+
-+ fman0_oh2: port@83000 {
-+ cell-index = <2>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x83000 0x1000>;
-+ };
-+
-+ fman0_oh3: port@84000 {
-+ cell-index = <3>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x84000 0x1000>;
-+ };
-+
-+ fman0_oh4: port@85000 {
-+ cell-index = <4>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x85000 0x1000>;
-+ status = "disabled";
-+ };
-+
-+ fman0_oh5: port@86000 {
-+ cell-index = <5>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x86000 0x1000>;
-+ status = "disabled";
-+ };
-+
-+ fman0_oh6: port@87000 {
-+ cell-index = <6>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x87000 0x1000>;
-+ status = "disabled";
-+ };
-+
-+ policer@c0000 {
-+ compatible = "fsl,fman-policer";
-+ reg = <0xc0000 0x1000>;
-+ };
-+
-+ keygen@c1000 {
-+ compatible = "fsl,fman-keygen";
-+ reg = <0xc1000 0x1000>;
-+ };
-+
-+ dma@c2000 {
-+ compatible = "fsl,fman-dma";
-+ reg = <0xc2000 0x1000>;
-+ };
-+
-+ fpm@c3000 {
-+ compatible = "fsl,fman-fpm";
-+ reg = <0xc3000 0x1000>;
-+ };
-+
-+ parser@c7000 {
-+ compatible = "fsl,fman-parser";
-+ reg = <0xc7000 0x1000>;
-+ };
-+
-+ ptp_timer0: rtc@fe000 {
-+ compatible = "fsl,fman-rtc";
-+ reg = <0xfe000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-1-10g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-10g-0.dtsi
-new file mode 100644
-index 0000000..dcaf84a
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-10g-0.dtsi
-@@ -0,0 +1,54 @@
-+/*
-+ * QorIQ FMan 10g port #0 device tree stub [ controller @ offset 0x500000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@500000 {
-+ fman1_10g_rx0: port@90000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-10g-rx";
-+ reg = <0x90000 0x1000>;
-+ };
-+
-+ fman1_10g_tx0: port@b0000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-10g-tx";
-+ reg = <0xb0000 0x1000>;
-+ };
-+
-+ ethernet@f0000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-10g-mac";
-+ reg = <0xf0000 0x1000>;
-+ fsl,port-handles = <&fman1_10g_rx0 &fman1_10g_tx0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-0.dtsi
-new file mode 100644
-index 0000000..5280661
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-0.dtsi
-@@ -0,0 +1,63 @@
-+/*
-+ * QorIQ FMan 1g port #0 device tree stub [ controller @ offset 0x500000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@500000 {
-+ fman1_rx0: port@88000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x88000 0x1000>;
-+ };
-+
-+ fman1_tx0: port@a8000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xa8000 0x1000>;
-+ };
-+
-+ ethernet@e0000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-1g-mac";
-+ reg = <0xe0000 0x1000>;
-+ fsl,port-handles = <&fman1_rx0 &fman1_tx0>;
-+ ptimer-handle = <&ptp_timer1>;
-+ };
-+
-+ mdio@e1120 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-tbi";
-+ reg = <0xe1120 0xee0>;
-+ interrupts = <101 1 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-1.dtsi
-new file mode 100644
-index 0000000..1d5fcde
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-1.dtsi
-@@ -0,0 +1,63 @@
-+/*
-+ * QorIQ FMan 1g port #1 device tree stub [ controller @ offset 0x500000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@500000 {
-+ fman1_rx1: port@89000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x89000 0x1000>;
-+ };
-+
-+ fman1_tx1: port@a9000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xa9000 0x1000>;
-+ };
-+
-+ ethernet@e2000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-1g-mac";
-+ reg = <0xe2000 0x1000>;
-+ fsl,port-handles = <&fman1_rx1 &fman1_tx1>;
-+ ptimer-handle = <&ptp_timer1>;
-+ };
-+
-+ mdio@e3120 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-tbi";
-+ reg = <0xe3120 0xee0>;
-+ interrupts = <101 1 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-2.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-2.dtsi
-new file mode 100644
-index 0000000..cf6cab1
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-2.dtsi
-@@ -0,0 +1,63 @@
-+/*
-+ * QorIQ FMan 1g port #2 device tree stub [ controller @ offset 0x500000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@500000 {
-+ fman1_rx2: port@8a000 {
-+ cell-index = <2>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x8a000 0x1000>;
-+ };
-+
-+ fman1_tx2: port@aa000 {
-+ cell-index = <2>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xaa000 0x1000>;
-+ };
-+
-+ ethernet@e4000 {
-+ cell-index = <2>;
-+ compatible = "fsl,fman-1g-mac";
-+ reg = <0xe4000 0x1000>;
-+ fsl,port-handles = <&fman1_rx2 &fman1_tx2>;
-+ ptimer-handle = <&ptp_timer1>;
-+ };
-+
-+ mdio@e5120 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-tbi";
-+ reg = <0xe5120 0xee0>;
-+ interrupts = <101 1 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-3.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-3.dtsi
-new file mode 100644
-index 0000000..0d85b37
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-3.dtsi
-@@ -0,0 +1,63 @@
-+/*
-+ * QorIQ FMan 1g port #3 device tree stub [ controller @ offset 0x500000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@500000 {
-+ fman1_rx3: port@8b000 {
-+ cell-index = <3>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x8b000 0x1000>;
-+ };
-+
-+ fman1_tx3: port@ab000 {
-+ cell-index = <3>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xab000 0x1000>;
-+ };
-+
-+ ethernet@e6000 {
-+ cell-index = <3>;
-+ compatible = "fsl,fman-1g-mac";
-+ reg = <0xe6000 0x1000>;
-+ fsl,port-handles = <&fman1_rx3 &fman1_tx3>;
-+ ptimer-handle = <&ptp_timer1>;
-+ };
-+
-+ mdio@e7120 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-tbi";
-+ reg = <0xe7120 0xee0>;
-+ interrupts = <101 1 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-4.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-4.dtsi
-new file mode 100644
-index 0000000..ed0f504
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-4.dtsi
-@@ -0,0 +1,63 @@
-+/*
-+ * QorIQ FMan 1g port #4 device tree stub [ controller @ offset 0x500000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@500000 {
-+ fman1_rx4: port@8c000 {
-+ cell-index = <4>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x8c000 0x1000>;
-+ };
-+
-+ fman1_tx4: port@ac000 {
-+ cell-index = <4>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xac000 0x1000>;
-+ };
-+
-+ ethernet@e8000 {
-+ cell-index = <4>;
-+ compatible = "fsl,fman-1g-mac";
-+ reg = <0xe8000 0x1000>;
-+ fsl,port-handles = <&fman1_rx4 &fman1_tx4>;
-+ ptimer-handle = <&ptp_timer1>;
-+ };
-+
-+ mdio@e9120 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-tbi";
-+ reg = <0xe9120 0xee0>;
-+ interrupts = <101 1 0 0>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-1.dtsi
-new file mode 100644
-index 0000000..d94f6cc
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-1.dtsi
-@@ -0,0 +1,140 @@
-+/*
-+ * QorIQ FMan device tree stub [ controller @ offset 0x500000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman1: fman@500000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ cell-index = <1>;
-+ compatible = "fsl,fman", "simple-bus";
-+ ranges = <0 0x500000 0x100000>;
-+ reg = <0x500000 0x100000>;
-+ clock-frequency = <0>;
-+ interrupts = <
-+ 97 2 0 0
-+ 16 2 1 0>;
-+
-+ cc {
-+ compatible = "fsl,fman-cc";
-+ };
-+
-+ muram@0 {
-+ compatible = "fsl,fman-muram";
-+ reg = <0x0 0x28000>;
-+ };
-+
-+ bmi@80000 {
-+ compatible = "fsl,fman-bmi";
-+ reg = <0x80000 0x400>;
-+ };
-+
-+ qmi@80400 {
-+ compatible = "fsl,fman-qmi";
-+ reg = <0x80400 0x400>;
-+ };
-+
-+ fman1_oh0: port@81000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x81000 0x1000>;
-+ };
-+
-+ fman1_oh1: port@82000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x82000 0x1000>;
-+ };
-+
-+ fman1_oh2: port@83000 {
-+ cell-index = <2>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x83000 0x1000>;
-+ };
-+
-+ fman1_oh3: port@84000 {
-+ cell-index = <3>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x84000 0x1000>;
-+ };
-+
-+ fman1_oh4: port@85000 {
-+ cell-index = <4>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x85000 0x1000>;
-+ status = "disabled";
-+ };
-+
-+ fman1_oh5: port@86000 {
-+ cell-index = <5>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x86000 0x1000>;
-+ status = "disabled";
-+ };
-+
-+ fman1_oh6: port@87000 {
-+ cell-index = <6>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x87000 0x1000>;
-+ status = "disabled";
-+ };
-+
-+ policer@c0000 {
-+ compatible = "fsl,fman-policer";
-+ reg = <0xc0000 0x1000>;
-+ };
-+
-+ keygen@c1000 {
-+ compatible = "fsl,fman-keygen";
-+ reg = <0xc1000 0x1000>;
-+ };
-+
-+ dma@c2000 {
-+ compatible = "fsl,fman-dma";
-+ reg = <0xc2000 0x1000>;
-+ };
-+
-+ fpm@c3000 {
-+ compatible = "fsl,fman-fpm";
-+ reg = <0xc3000 0x1000>;
-+ };
-+
-+ parser@c7000 {
-+ compatible = "fsl,fman-parser";
-+ reg = <0xc7000 0x1000>;
-+ };
-+
-+ ptp_timer1: rtc@fe000 {
-+ compatible = "fsl,fman-rtc";
-+ reg = <0xfe000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi
-new file mode 100644
-index 0000000..72c306c
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi
-@@ -0,0 +1,62 @@
-+/*
-+ * QorIQ FMan v3 10g port #0 device tree stub [ controller @ offset 0x400000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@400000 {
-+ fman0_10g_rx0: port@90000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-10g-rx";
-+ reg = <0x90000 0x1000>;
-+ };
-+
-+ fman0_10g_tx0: port@b0000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-10g-tx";
-+ reg = <0xb0000 0x1000>;
-+ fsl,qman-channel-id = <0x800>;
-+ };
-+
-+ ethernet@f0000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-memac";
-+ reg = <0xf0000 0x1000>;
-+ fsl,port-handles = <&fman0_10g_rx0 &fman0_10g_tx0>;
-+ };
-+
-+ mdio@f1000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-tbi";
-+ reg = <0xf1000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi
-new file mode 100644
-index 0000000..c53dadc
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi
-@@ -0,0 +1,62 @@
-+/*
-+ * QorIQ FMan v3 10g port #1 device tree stub [ controller @ offset 0x400000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@400000 {
-+ fman0_10g_rx1: port@91000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-10g-rx";
-+ reg = <0x91000 0x1000>;
-+ };
-+
-+ fman0_10g_tx1: port@b1000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-10g-tx";
-+ reg = <0xb1000 0x1000>;
-+ fsl,qman-channel-id = <0x801>;
-+ };
-+
-+ ethernet@f2000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-memac";
-+ reg = <0xf2000 0x1000>;
-+ fsl,port-handles = <&fman0_10g_rx1 &fman0_10g_tx1>;
-+ };
-+
-+ mdio@f3000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-tbi";
-+ reg = <0xf3000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi
-new file mode 100644
-index 0000000..5d34959
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi
-@@ -0,0 +1,62 @@
-+/*
-+ * QorIQ FMan v3 1g port #0 device tree stub [ controller @ offset 0x400000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@400000 {
-+ fman0_rx0: port@88000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x88000 0x1000>;
-+ };
-+
-+ fman0_tx0: port@a8000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xa8000 0x1000>;
-+ };
-+
-+ ethernet@e0000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-memac";
-+ reg = <0xe0000 0x1000>;
-+ fsl,port-handles = <&fman0_rx0 &fman0_tx0>;
-+ ptimer-handle = <&ptp_timer0>;
-+ };
-+
-+ mdio@e1000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-tbi";
-+ reg = <0xe1000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi
-new file mode 100644
-index 0000000..39620a3
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi
-@@ -0,0 +1,62 @@
-+/*
-+ * QorIQ FMan v3 1g port #1 device tree stub [ controller @ offset 0x400000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@400000 {
-+ fman0_rx1: port@89000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x89000 0x1000>;
-+ };
-+
-+ fman0_tx1: port@a9000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xa9000 0x1000>;
-+ };
-+
-+ ethernet@e2000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-memac";
-+ reg = <0xe2000 0x1000>;
-+ fsl,port-handles = <&fman0_rx1 &fman0_tx1>;
-+ ptimer-handle = <&ptp_timer0>;
-+ };
-+
-+ mdio@e3000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-tbi";
-+ reg = <0xe3000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi
-new file mode 100644
-index 0000000..9c1fb1a
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi
-@@ -0,0 +1,62 @@
-+/*
-+ * QorIQ FMan v3 1g port #2 device tree stub [ controller @ offset 0x400000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@400000 {
-+ fman0_rx2: port@8a000 {
-+ cell-index = <2>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x8a000 0x1000>;
-+ };
-+
-+ fman0_tx2: port@aa000 {
-+ cell-index = <2>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xaa000 0x1000>;
-+ };
-+
-+ ethernet@e4000 {
-+ cell-index = <2>;
-+ compatible = "fsl,fman-memac";
-+ reg = <0xe4000 0x1000>;
-+ fsl,port-handles = <&fman0_rx2 &fman0_tx2>;
-+ ptimer-handle = <&ptp_timer0>;
-+ };
-+
-+ mdio@e5000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-tbi";
-+ reg = <0xe5000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi
-new file mode 100644
-index 0000000..5d2ba1a
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi
-@@ -0,0 +1,62 @@
-+/*
-+ * QorIQ FMan v3 1g port #3 device tree stub [ controller @ offset 0x400000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@400000 {
-+ fman0_rx3: port@8b000 {
-+ cell-index = <3>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x8b000 0x1000>;
-+ };
-+
-+ fman0_tx3: port@ab000 {
-+ cell-index = <3>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xab000 0x1000>;
-+ };
-+
-+ ethernet@e6000 {
-+ cell-index = <3>;
-+ compatible = "fsl,fman-memac";
-+ reg = <0xe6000 0x1000>;
-+ fsl,port-handles = <&fman0_rx3 &fman0_tx3>;
-+ ptimer-handle = <&ptp_timer0>;
-+ };
-+
-+ mdio@e7000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-tbi";
-+ reg = <0xe7000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi
-new file mode 100644
-index 0000000..4b1820b
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi
-@@ -0,0 +1,62 @@
-+/*
-+ * QorIQ FMan v3 1g port #4 device tree stub [ controller @ offset 0x400000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@400000 {
-+ fman0_rx4: port@8c000 {
-+ cell-index = <4>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x8c000 0x1000>;
-+ };
-+
-+ fman0_tx4: port@ac000 {
-+ cell-index = <4>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xac000 0x1000>;
-+ };
-+
-+ ethernet@e8000 {
-+ cell-index = <4>;
-+ compatible = "fsl,fman-memac";
-+ reg = <0xe8000 0x1000>;
-+ fsl,port-handles = <&fman0_rx4 &fman0_tx4>;
-+ ptimer-handle = <&ptp_timer0>;
-+ };
-+
-+ mdio@e9000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-tbi";
-+ reg = <0xe9000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi
-new file mode 100644
-index 0000000..aa06d13
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi
-@@ -0,0 +1,62 @@
-+/*
-+ * QorIQ FMan v3 1g port #5 device tree stub [ controller @ offset 0x400000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@400000 {
-+ fman0_rx5: port@8d000 {
-+ cell-index = <5>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x8d000 0x1000>;
-+ };
-+
-+ fman0_tx5: port@ad000 {
-+ cell-index = <5>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xad000 0x1000>;
-+ };
-+
-+ ethernet@ea000 {
-+ cell-index = <5>;
-+ compatible = "fsl,fman-memac";
-+ reg = <0xea000 0x1000>;
-+ fsl,port-handles = <&fman0_rx5 &fman0_tx5>;
-+ ptimer-handle = <&ptp_timer0>;
-+ };
-+
-+ mdio@eb000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-tbi";
-+ reg = <0xeb000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0.dtsi
-new file mode 100644
-index 0000000..28f38b9
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0.dtsi
-@@ -0,0 +1,150 @@
-+/*
-+ * QorIQ FMan v3 device tree stub [ controller @ offset 0x400000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman0: fman@400000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ cell-index = <0>;
-+ compatible = "fsl,fman", "simple-bus";
-+ ranges = <0 0x400000 0x100000>;
-+ reg = <0x400000 0x100000>;
-+ clock-frequency = <0>;
-+ interrupts = <
-+ 96 2 0 0
-+ 16 2 1 1>;
-+
-+ cc {
-+ compatible = "fsl,fman-cc";
-+ };
-+
-+ muram@0 {
-+ compatible = "fsl,fman-muram";
-+ reg = <0x0 0x60000>;
-+ };
-+
-+ bmi@80000 {
-+ compatible = "fsl,fman-bmi";
-+ reg = <0x80000 0x400>;
-+ };
-+
-+ qmi@80400 {
-+ compatible = "fsl,fman-qmi";
-+ reg = <0x80400 0x400>;
-+ };
-+
-+ fman0_oh1: port@82000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x82000 0x1000>;
-+ };
-+
-+ fman0_oh2: port@83000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x83000 0x1000>;
-+ };
-+
-+ fman0_oh3: port@84000 {
-+ cell-index = <2>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x84000 0x1000>;
-+ };
-+
-+ fman0_oh4: port@85000 {
-+ cell-index = <3>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x85000 0x1000>;
-+ };
-+
-+ fman0_oh5: port@86000 {
-+ cell-index = <4>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x86000 0x1000>;
-+ };
-+
-+ fman0_oh6: port@87000 {
-+ cell-index = <5>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x87000 0x1000>;
-+ };
-+
-+ policer@c0000 {
-+ compatible = "fsl,fman-policer";
-+ reg = <0xc0000 0x1000>;
-+ };
-+
-+ keygen@c1000 {
-+ compatible = "fsl,fman-keygen";
-+ reg = <0xc1000 0x1000>;
-+ };
-+
-+ dma@c2000 {
-+ compatible = "fsl,fman-dma";
-+ reg = <0xc2000 0x1000>;
-+ };
-+
-+ fpm@c3000 {
-+ compatible = "fsl,fman-fpm";
-+ reg = <0xc3000 0x1000>;
-+ };
-+
-+ parser@c7000 {
-+ compatible = "fsl,fman-parser";
-+ reg = <0xc7000 0x1000>;
-+ };
-+
-+ vsps@dc000 {
-+ compatible = "fsl,fman-vsps";
-+ reg = <0xdc000 0x1000>;
-+ };
-+
-+ mdio@fc000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-mdio";
-+ reg = <0xfc000 0x1000>;
-+ };
-+
-+ mdio@fd000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-mdio";
-+ reg = <0xfd000 0x1000>;
-+ };
-+
-+ ptp_timer0: rtc@fe000 {
-+ compatible = "fsl,fman-rtc";
-+ reg = <0xfe000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi
-new file mode 100644
-index 0000000..b63fb54
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi
-@@ -0,0 +1,62 @@
-+/*
-+ * QorIQ FMan v3 10g port #0 device tree stub [ controller @ offset 0x500000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@500000 {
-+ fman1_10g_rx0: port@90000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-10g-rx";
-+ reg = <0x90000 0x1000>;
-+ };
-+
-+ fman1_10g_tx0: port@b0000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-10g-tx";
-+ reg = <0xb0000 0x1000>;
-+ fsl,qman-channel-id = <0x820>;
-+ };
-+
-+ ethernet@f0000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-memac";
-+ reg = <0xf0000 0x1000>;
-+ fsl,port-handles = <&fman1_10g_rx0 &fman1_10g_tx0>;
-+ };
-+
-+ mdio@f1000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-tbi";
-+ reg = <0xf1000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi
-new file mode 100644
-index 0000000..56cb7b1
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi
-@@ -0,0 +1,62 @@
-+/*
-+ * QorIQ FMan v3 10g port #1 device tree stub [ controller @ offset 0x500000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@500000 {
-+ fman1_10g_rx1: port@91000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-10g-rx";
-+ reg = <0x91000 0x1000>;
-+ };
-+
-+ fman1_10g_tx1: port@b1000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-10g-tx";
-+ reg = <0xb1000 0x1000>;
-+ fsl,qman-channel-id = <0x821>;
-+ };
-+
-+ ethernet@f2000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-memac";
-+ reg = <0xf2000 0x1000>;
-+ fsl,port-handles = <&fman1_10g_rx1 &fman1_10g_tx1>;
-+ };
-+
-+ mdio@f3000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-tbi";
-+ reg = <0xf3000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi
-new file mode 100644
-index 0000000..6a4fea5
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi
-@@ -0,0 +1,62 @@
-+/*
-+ * QorIQ FMan v3 1g port #0 device tree stub [ controller @ offset 0x500000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@500000 {
-+ fman1_rx0: port@88000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x88000 0x1000>;
-+ };
-+
-+ fman1_tx0: port@a8000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xa8000 0x1000>;
-+ };
-+
-+ ethernet@e0000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-memac";
-+ reg = <0xe0000 0x1000>;
-+ fsl,port-handles = <&fman1_rx0 &fman1_tx0>;
-+ ptimer-handle = <&ptp_timer1>;
-+ };
-+
-+ mdio@e1000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-tbi";
-+ reg = <0xe1000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi
-new file mode 100644
-index 0000000..80f0cd9
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi
-@@ -0,0 +1,62 @@
-+/*
-+ * QorIQ FMan v3 1g port #1 device tree stub [ controller @ offset 0x500000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@500000 {
-+ fman1_rx1: port@89000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x89000 0x1000>;
-+ };
-+
-+ fman1_tx1: port@a9000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xa9000 0x1000>;
-+ };
-+
-+ ethernet@e2000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-memac";
-+ reg = <0xe2000 0x1000>;
-+ fsl,port-handles = <&fman1_rx1 &fman1_tx1>;
-+ ptimer-handle = <&ptp_timer1>;
-+ };
-+
-+ mdio@e3000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-tbi";
-+ reg = <0xe3000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi
-new file mode 100644
-index 0000000..a0cbf96
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi
-@@ -0,0 +1,62 @@
-+/*
-+ * QorIQ FMan v3 1g port #2 device tree stub [ controller @ offset 0x500000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@500000 {
-+ fman1_rx2: port@8a000 {
-+ cell-index = <2>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x8a000 0x1000>;
-+ };
-+
-+ fman1_tx2: port@aa000 {
-+ cell-index = <2>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xaa000 0x1000>;
-+ };
-+
-+ ethernet@e4000 {
-+ cell-index = <2>;
-+ compatible = "fsl,fman-memac";
-+ reg = <0xe4000 0x1000>;
-+ fsl,port-handles = <&fman1_rx2 &fman1_tx2>;
-+ ptimer-handle = <&ptp_timer1>;
-+ };
-+
-+ mdio@e5000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-tbi";
-+ reg = <0xe5000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi
-new file mode 100644
-index 0000000..636ff3e
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi
-@@ -0,0 +1,62 @@
-+/*
-+ * QorIQ FMan v3 1g port #3 device tree stub [ controller @ offset 0x500000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@500000 {
-+ fman1_rx3: port@8b000 {
-+ cell-index = <3>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x8b000 0x1000>;
-+ };
-+
-+ fman1_tx3: port@ab000 {
-+ cell-index = <3>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xab000 0x1000>;
-+ };
-+
-+ ethernet@e6000 {
-+ cell-index = <3>;
-+ compatible = "fsl,fman-memac";
-+ reg = <0xe6000 0x1000>;
-+ fsl,port-handles = <&fman1_rx3 &fman1_tx3>;
-+ ptimer-handle = <&ptp_timer1>;
-+ };
-+
-+ mdio@e7000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-tbi";
-+ reg = <0xe7000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi
-new file mode 100644
-index 0000000..ba12e35
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi
-@@ -0,0 +1,62 @@
-+/*
-+ * QorIQ FMan v3 1g port #4 device tree stub [ controller @ offset 0x500000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@500000 {
-+ fman1_rx4: port@8c000 {
-+ cell-index = <4>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x8c000 0x1000>;
-+ };
-+
-+ fman1_tx4: port@ac000 {
-+ cell-index = <4>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xac000 0x1000>;
-+ };
-+
-+ ethernet@e8000 {
-+ cell-index = <4>;
-+ compatible = "fsl,fman-memac";
-+ reg = <0xe8000 0x1000>;
-+ fsl,port-handles = <&fman1_rx4 &fman1_tx4>;
-+ ptimer-handle = <&ptp_timer1>;
-+ };
-+
-+ mdio@e9000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-tbi";
-+ reg = <0xe9000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi
-new file mode 100644
-index 0000000..c8d145e
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi
-@@ -0,0 +1,62 @@
-+/*
-+ * QorIQ FMan v3 1g port #5 device tree stub [ controller @ offset 0x500000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman@500000 {
-+ fman1_rx5: port@8d000 {
-+ cell-index = <5>;
-+ compatible = "fsl,fman-port-1g-rx";
-+ reg = <0x8d000 0x1000>;
-+ };
-+
-+ fman1_tx5: port@ad000 {
-+ cell-index = <5>;
-+ compatible = "fsl,fman-port-1g-tx";
-+ reg = <0xad000 0x1000>;
-+ };
-+
-+ ethernet@ea000 {
-+ cell-index = <5>;
-+ compatible = "fsl,fman-memac";
-+ reg = <0xea000 0x1000>;
-+ fsl,port-handles = <&fman1_rx5 &fman1_tx5>;
-+ ptimer-handle = <&ptp_timer1>;
-+ };
-+
-+ mdio@eb000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-tbi";
-+ reg = <0xeb000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1.dtsi
-new file mode 100644
-index 0000000..4eeb060
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1.dtsi
-@@ -0,0 +1,150 @@
-+/*
-+ * QorIQ FMan v3 device tree stub [ controller @ offset 0x500000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+fman1: fman@500000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ cell-index = <1>;
-+ compatible = "fsl,fman", "simple-bus";
-+ ranges = <0 0x500000 0x100000>;
-+ reg = <0x500000 0x100000>;
-+ clock-frequency = <0>;
-+ interrupts = <
-+ 97 2 0 0
-+ 16 2 1 0>;
-+
-+ cc {
-+ compatible = "fsl,fman-cc";
-+ };
-+
-+ muram@0 {
-+ compatible = "fsl,fman-muram";
-+ reg = <0x0 0x60000>;
-+ };
-+
-+ bmi@80000 {
-+ compatible = "fsl,fman-bmi";
-+ reg = <0x80000 0x400>;
-+ };
-+
-+ qmi@80400 {
-+ compatible = "fsl,fman-qmi";
-+ reg = <0x80400 0x400>;
-+ };
-+
-+ fman1_oh1: port@82000 {
-+ cell-index = <0>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x82000 0x1000>;
-+ };
-+
-+ fman1_oh2: port@83000 {
-+ cell-index = <1>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x83000 0x1000>;
-+ };
-+
-+ fman1_oh3: port@84000 {
-+ cell-index = <2>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x84000 0x1000>;
-+ };
-+
-+ fman1_oh4: port@85000 {
-+ cell-index = <3>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x85000 0x1000>;
-+ };
-+
-+ fman1_oh5: port@86000 {
-+ cell-index = <4>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x86000 0x1000>;
-+ };
-+
-+ fman1_oh6: port@87000 {
-+ cell-index = <5>;
-+ compatible = "fsl,fman-port-oh";
-+ reg = <0x87000 0x1000>;
-+ };
-+
-+ policer@c0000 {
-+ compatible = "fsl,fman-policer";
-+ reg = <0xc0000 0x1000>;
-+ };
-+
-+ keygen@c1000 {
-+ compatible = "fsl,fman-keygen";
-+ reg = <0xc1000 0x1000>;
-+ };
-+
-+ dma@c2000 {
-+ compatible = "fsl,fman-dma";
-+ reg = <0xc2000 0x1000>;
-+ };
-+
-+ fpm@c3000 {
-+ compatible = "fsl,fman-fpm";
-+ reg = <0xc3000 0x1000>;
-+ };
-+
-+ parser@c7000 {
-+ compatible = "fsl,fman-parser";
-+ reg = <0xc7000 0x1000>;
-+ };
-+
-+ vsps@dc000 {
-+ compatible = "fsl,fman-vsps";
-+ reg = <0xdc000 0x1000>;
-+ };
-+
-+ mdio@fc000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-mdio";
-+ reg = <0xfc000 0x1000>;
-+ };
-+
-+ mdio@fd000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,fman-memac-mdio";
-+ reg = <0xfd000 0x1000>;
-+ };
-+
-+ ptp_timer1: rtc@fe000 {
-+ compatible = "fsl,fman-rtc";
-+ reg = <0xfe000 0x1000>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-gpio-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-gpio-0.dtsi
-new file mode 100644
-index 0000000..cf714f5
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-gpio-0.dtsi
-@@ -0,0 +1,41 @@
-+/*
-+ * QorIQ GPIO device tree stub [ controller @ offset 0x130000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+gpio0: gpio@130000 {
-+ compatible = "fsl,qoriq-gpio";
-+ reg = <0x130000 0x1000>;
-+ interrupts = <55 2 0 0>;
-+ #gpio-cells = <2>;
-+ gpio-controller;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-i2c-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-i2c-0.dtsi
-new file mode 100644
-index 0000000..5f9bf7d
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-i2c-0.dtsi
-@@ -0,0 +1,53 @@
-+/*
-+ * QorIQ I2C device tree stub [ controller @ offset 0x118000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+i2c@118000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ cell-index = <0>;
-+ compatible = "fsl-i2c";
-+ reg = <0x118000 0x100>;
-+ interrupts = <38 2 0 0>;
-+ dfsrr;
-+};
-+
-+i2c@118100 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ cell-index = <1>;
-+ compatible = "fsl-i2c";
-+ reg = <0x118100 0x100>;
-+ interrupts = <38 2 0 0>;
-+ dfsrr;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-i2c-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-i2c-1.dtsi
-new file mode 100644
-index 0000000..7989bf5
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-i2c-1.dtsi
-@@ -0,0 +1,53 @@
-+/*
-+ * QorIQ I2C device tree stub [ controller @ offset 0x119000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+i2c@119000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ cell-index = <2>;
-+ compatible = "fsl-i2c";
-+ reg = <0x119000 0x100>;
-+ interrupts = <39 2 0 0>;
-+ dfsrr;
-+};
-+
-+i2c@119100 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ cell-index = <3>;
-+ compatible = "fsl-i2c";
-+ reg = <0x119100 0x100>;
-+ interrupts = <39 2 0 0>;
-+ dfsrr;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-mpic.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-mpic.dtsi
-new file mode 100644
-index 0000000..08f4227
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-mpic.dtsi
-@@ -0,0 +1,106 @@
-+/*
-+ * QorIQ MPIC device tree stub [ controller @ offset 0x40000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+mpic: pic@40000 {
-+ interrupt-controller;
-+ #address-cells = <0>;
-+ #interrupt-cells = <4>;
-+ reg = <0x40000 0x40000>;
-+ compatible = "fsl,mpic", "chrp,open-pic";
-+ device_type = "open-pic";
-+ clock-frequency = <0x0>;
-+};
-+
-+timer@41100 {
-+ compatible = "fsl,mpic-global-timer";
-+ reg = <0x41100 0x100 0x41300 4>;
-+ interrupts = <0 0 3 0
-+ 1 0 3 0
-+ 2 0 3 0
-+ 3 0 3 0>;
-+};
-+
-+msi0: msi@41600 {
-+ compatible = "fsl,mpic-msi";
-+ reg = <0x41600 0x200 0x44140 4>;
-+ msi-available-ranges = <0 0x100>;
-+ interrupts = <
-+ 0xe0 0 0 0
-+ 0xe1 0 0 0
-+ 0xe2 0 0 0
-+ 0xe3 0 0 0
-+ 0xe4 0 0 0
-+ 0xe5 0 0 0
-+ 0xe6 0 0 0
-+ 0xe7 0 0 0>;
-+};
-+
-+msi1: msi@41800 {
-+ compatible = "fsl,mpic-msi";
-+ reg = <0x41800 0x200 0x45140 4>;
-+ msi-available-ranges = <0 0x100>;
-+ interrupts = <
-+ 0xe8 0 0 0
-+ 0xe9 0 0 0
-+ 0xea 0 0 0
-+ 0xeb 0 0 0
-+ 0xec 0 0 0
-+ 0xed 0 0 0
-+ 0xee 0 0 0
-+ 0xef 0 0 0>;
-+};
-+
-+msi2: msi@41a00 {
-+ compatible = "fsl,mpic-msi";
-+ reg = <0x41a00 0x200 0x46140 4>;
-+ msi-available-ranges = <0 0x100>;
-+ interrupts = <
-+ 0xf0 0 0 0
-+ 0xf1 0 0 0
-+ 0xf2 0 0 0
-+ 0xf3 0 0 0
-+ 0xf4 0 0 0
-+ 0xf5 0 0 0
-+ 0xf6 0 0 0
-+ 0xf7 0 0 0>;
-+};
-+
-+timer@42100 {
-+ compatible = "fsl,mpic-global-timer";
-+ reg = <0x42100 0x100 0x42300 4>;
-+ interrupts = <4 0 3 0
-+ 5 0 3 0
-+ 6 0 3 0
-+ 7 0 3 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-pme-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-pme-0.dtsi
-new file mode 100644
-index 0000000..8789df1
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-pme-0.dtsi
-@@ -0,0 +1,39 @@
-+/*
-+ * QorIQ PME device tree stub [ controller @ offset 0x316000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+pme: pme@316000 {
-+ compatible = "fsl,pme";
-+ reg = <0x316000 0x10000>;
-+ interrupts = <16 2 1 5>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-qman-ceetm0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-qman-ceetm0.dtsi
-new file mode 100644
-index 0000000..9d3cf3e
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-qman-ceetm0.dtsi
-@@ -0,0 +1,43 @@
-+/*
-+ * QorIQ QMan CEETM stub
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&qportals {
-+ qman-ceetm@0 {
-+ compatible = "fsl,qman-ceetm";
-+ fsl,ceetm-lfqid-range = <0xf00000 0x1000>;
-+ fsl,ceetm-sp-range = <0 12>;
-+ fsl,ceetm-lni-range = <0 8>;
-+ fsl,ceetm-channel-range = <0 32>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-qman-ceetm1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-qman-ceetm1.dtsi
-new file mode 100644
-index 0000000..4028542
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-qman-ceetm1.dtsi
-@@ -0,0 +1,43 @@
-+/*
-+ * QorIQ QMan CEETM stub
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+&qportals {
-+ qman-ceetm@1 {
-+ compatible = "fsl,qman-ceetm";
-+ fsl,ceetm-lfqid-range = <0xf10000 0x1000>;
-+ fsl,ceetm-sp-range = <0 12>;
-+ fsl,ceetm-lni-range = <0 8>;
-+ fsl,ceetm-channel-range = <0 32>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-qman1-portals.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-qman1-portals.dtsi
-new file mode 100644
-index 0000000..8476b32
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-qman1-portals.dtsi
-@@ -0,0 +1,116 @@
-+/*
-+ * QorIQ QMan Portal device tree stub for 10 portals & 15 pool channels
-+ *
-+ * Copyright 2011-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+#address-cells = <0x1>;
-+#size-cells = <0x1>;
-+compatible = "simple-bus";
-+qportal0: qman-portal@0 {
-+ cell-index = <0x0>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x0 0x4000 0x100000 0x1000>;
-+ interrupts = <104 0x2 0 0>;
-+ fsl,qman-channel-id = <0x0>;
-+};
-+
-+qportal1: qman-portal@4000 {
-+ cell-index = <0x1>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x4000 0x4000 0x101000 0x1000>;
-+ interrupts = <106 0x2 0 0>;
-+ fsl,qman-channel-id = <0x1>;
-+};
-+
-+qportal2: qman-portal@8000 {
-+ cell-index = <0x2>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x8000 0x4000 0x102000 0x1000>;
-+ interrupts = <108 0x2 0 0>;
-+ fsl,qman-channel-id = <0x2>;
-+};
-+
-+qportal3: qman-portal@c000 {
-+ cell-index = <0x3>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0xc000 0x4000 0x103000 0x1000>;
-+ interrupts = <110 0x2 0 0>;
-+ fsl,qman-channel-id = <0x3>;
-+};
-+
-+qportal4: qman-portal@10000 {
-+ cell-index = <0x4>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x10000 0x4000 0x104000 0x1000>;
-+ interrupts = <112 0x2 0 0>;
-+ fsl,qman-channel-id = <0x4>;
-+};
-+
-+qportal5: qman-portal@14000 {
-+ cell-index = <0x5>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x14000 0x4000 0x105000 0x1000>;
-+ interrupts = <114 0x2 0 0>;
-+ fsl,qman-channel-id = <0x5>;
-+};
-+
-+qportal6: qman-portal@18000 {
-+ cell-index = <0x6>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x18000 0x4000 0x106000 0x1000>;
-+ interrupts = <116 0x2 0 0>;
-+ fsl,qman-channel-id = <0x6>;
-+};
-+
-+qportal7: qman-portal@1c000 {
-+ cell-index = <0x7>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x1c000 0x4000 0x107000 0x1000>;
-+ interrupts = <118 0x2 0 0>;
-+ fsl,qman-channel-id = <0x7>;
-+};
-+
-+qportal8: qman-portal@20000 {
-+ cell-index = <0x8>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x20000 0x4000 0x108000 0x1000>;
-+ interrupts = <120 0x2 0 0>;
-+ fsl,qman-channel-id = <0x8>;
-+};
-+
-+qportal9: qman-portal@24000 {
-+ cell-index = <0x9>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x24000 0x4000 0x109000 0x1000>;
-+ interrupts = <122 0x2 0 0>;
-+ fsl,qman-channel-id = <0x9>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-qman1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-qman1.dtsi
-new file mode 100644
-index 0000000..8edd2c0
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-qman1.dtsi
-@@ -0,0 +1,39 @@
-+/*
-+ * QorIQ QMan device tree stub [ controller @ offset 0x318000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+qman: qman@318000 {
-+ compatible = "fsl,qman";
-+ reg = <0x318000 0x2000>;
-+ interrupts = <16 2 1 3>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-qman2-portals.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-qman2-portals.dtsi
-new file mode 100644
-index 0000000..6c6010d
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-qman2-portals.dtsi
-@@ -0,0 +1,436 @@
-+/*
-+ * QorIQ QMan Portal device tree stub for QMan 3.0 with maximum 50 portals.
-+ *
-+ * Copyright 2011-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+#address-cells = <0x1>;
-+#size-cells = <0x1>;
-+compatible = "simple-bus";
-+qportal0: qman-portal@0 {
-+ cell-index = <0x0>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x0 0x4000 0x1000000 0x1000>;
-+ interrupts = <104 0x2 0 0>;
-+ fsl,qman-channel-id = <0x0>;
-+};
-+
-+qportal1: qman-portal@4000 {
-+ cell-index = <0x1>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x4000 0x4000 0x1001000 0x1000>;
-+ interrupts = <106 0x2 0 0>;
-+ fsl,qman-channel-id = <0x1>;
-+};
-+
-+qportal2: qman-portal@8000 {
-+ cell-index = <0x2>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x8000 0x4000 0x1002000 0x1000>;
-+ interrupts = <108 0x2 0 0>;
-+ fsl,qman-channel-id = <0x2>;
-+};
-+
-+qportal3: qman-portal@c000 {
-+ cell-index = <0x3>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0xc000 0x4000 0x1003000 0x1000>;
-+ interrupts = <110 0x2 0 0>;
-+ fsl,qman-channel-id = <0x3>;
-+};
-+
-+qportal4: qman-portal@10000 {
-+ cell-index = <0x4>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x10000 0x4000 0x1004000 0x1000>;
-+ interrupts = <112 0x2 0 0>;
-+ fsl,qman-channel-id = <0x4>;
-+};
-+
-+qportal5: qman-portal@14000 {
-+ cell-index = <0x5>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x14000 0x4000 0x1005000 0x1000>;
-+ interrupts = <114 0x2 0 0>;
-+ fsl,qman-channel-id = <0x5>;
-+};
-+
-+qportal6: qman-portal@18000 {
-+ cell-index = <0x6>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x18000 0x4000 0x1006000 0x1000>;
-+ interrupts = <116 0x2 0 0>;
-+ fsl,qman-channel-id = <0x6>;
-+};
-+
-+qportal7: qman-portal@1c000 {
-+ cell-index = <0x7>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x1c000 0x4000 0x1007000 0x1000>;
-+ interrupts = <118 0x2 0 0>;
-+ fsl,qman-channel-id = <0x7>;
-+};
-+
-+qportal8: qman-portal@20000 {
-+ cell-index = <0x8>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x20000 0x4000 0x1008000 0x1000>;
-+ interrupts = <120 0x2 0 0>;
-+ fsl,qman-channel-id = <0x8>;
-+};
-+
-+qportal9: qman-portal@24000 {
-+ cell-index = <0x9>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x24000 0x4000 0x1009000 0x1000>;
-+ interrupts = <122 0x2 0 0>;
-+ fsl,qman-channel-id = <0x9>;
-+};
-+
-+qportal10: qman-portal@28000 {
-+ cell-index = <0xa>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x28000 0x4000 0x100a000 0x1000>;
-+ interrupts = <124 0x2 0 0>;
-+ fsl,qman-channel-id = <0xa>;
-+};
-+
-+qportal11: qman-portal@2c000 {
-+ cell-index = <0xb>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x2c000 0x4000 0x100b000 0x1000>;
-+ interrupts = <126 0x2 0 0>;
-+ fsl,qman-channel-id = <0xb>;
-+};
-+
-+qportal12: qman-portal@30000 {
-+ cell-index = <0xc>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x30000 0x4000 0x100c000 0x1000>;
-+ interrupts = <128 0x2 0 0>;
-+ fsl,qman-channel-id = <0xc>;
-+};
-+
-+qportal13: qman-portal@34000 {
-+ cell-index = <0xd>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x34000 0x4000 0x100d000 0x1000>;
-+ interrupts = <130 0x2 0 0>;
-+ fsl,qman-channel-id = <0xd>;
-+};
-+
-+qportal14: qman-portal@38000 {
-+ cell-index = <0xe>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x38000 0x4000 0x100e000 0x1000>;
-+ interrupts = <132 0x2 0 0>;
-+ fsl,qman-channel-id = <0xe>;
-+};
-+
-+qportal15: qman-portal@3c000 {
-+ cell-index = <0xf>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x3c000 0x4000 0x100f000 0x1000>;
-+ interrupts = <134 0x2 0 0>;
-+ fsl,qman-channel-id = <0xf>;
-+};
-+
-+qportal16: qman-portal@40000 {
-+ cell-index = <0x10>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x40000 0x4000 0x1010000 0x1000>;
-+ interrupts = <136 0x2 0 0>;
-+ fsl,qman-channel-id = <0x10>;
-+};
-+
-+qportal17: qman-portal@44000 {
-+ cell-index = <0x11>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x44000 0x4000 0x1011000 0x1000>;
-+ interrupts = <138 0x2 0 0>;
-+ fsl,qman-channel-id = <0x11>;
-+};
-+
-+qportal18: qman-portal@48000 {
-+ cell-index = <0x12>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x48000 0x4000 0x1012000 0x1000>;
-+ interrupts = <140 0x2 0 0>;
-+ fsl,qman-channel-id = <0x12>;
-+};
-+
-+qportal19: qman-portal@4c000 {
-+ cell-index = <0x13>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x4c000 0x4000 0x1013000 0x1000>;
-+ interrupts = <142 0x2 0 0>;
-+ fsl,qman-channel-id = <0x13>;
-+};
-+
-+qportal20: qman-portal@50000 {
-+ cell-index = <0x14>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x50000 0x4000 0x1014000 0x1000>;
-+ interrupts = <144 0x2 0 0>;
-+ fsl,qman-channel-id = <0x14>;
-+};
-+
-+qportal21: qman-portal@54000 {
-+ cell-index = <0x15>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x54000 0x4000 0x1015000 0x1000>;
-+ interrupts = <146 0x2 0 0>;
-+ fsl,qman-channel-id = <0x15>;
-+};
-+
-+qportal22: qman-portal@58000 {
-+ cell-index = <0x16>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x58000 0x4000 0x1016000 0x1000>;
-+ interrupts = <148 0x2 0 0>;
-+ fsl,qman-channel-id = <0x16>;
-+};
-+
-+qportal23: qman-portal@5c000 {
-+ cell-index = <0x17>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x5c000 0x4000 0x1017000 0x1000>;
-+ interrupts = <150 0x2 0 0>;
-+ fsl,qman-channel-id = <0x17>;
-+};
-+
-+qportal24: qman-portal@60000 {
-+ cell-index = <0x18>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x60000 0x4000 0x1018000 0x1000>;
-+ interrupts = <152 0x2 0 0>;
-+ fsl,qman-channel-id = <0x18>;
-+};
-+
-+qportal25: qman-portal@64000 {
-+ cell-index = <0x19>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x64000 0x4000 0x1019000 0x1000>;
-+ interrupts = <154 0x2 0 0>;
-+ fsl,qman-channel-id = <0x19>;
-+};
-+
-+qportal26: qman-portal@68000 {
-+ cell-index = <0x1a>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x68000 0x4000 0x101a000 0x1000>;
-+ interrupts = <156 0x2 0 0>;
-+ fsl,qman-channel-id = <0x1a>;
-+};
-+
-+qportal27: qman-portal@6c000 {
-+ cell-index = <0x1b>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x6c000 0x4000 0x101b000 0x1000>;
-+ interrupts = <158 0x2 0 0>;
-+ fsl,qman-channel-id = <0x1b>;
-+};
-+
-+qportal28: qman-portal@70000 {
-+ cell-index = <0x1c>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x70000 0x4000 0x101c000 0x1000>;
-+ interrupts = <160 0x2 0 0>;
-+ fsl,qman-channel-id = <0x1c>;
-+};
-+
-+qportal29: qman-portal@74000 {
-+ cell-index = <0x1d>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x74000 0x4000 0x101d000 0x1000>;
-+ interrupts = <162 0x2 0 0>;
-+ fsl,qman-channel-id = <0x1d>;
-+};
-+
-+qportal30: qman-portal@78000 {
-+ cell-index = <0x1e>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x78000 0x4000 0x101e000 0x1000>;
-+ interrupts = <164 0x2 0 0>;
-+ fsl,qman-channel-id = <0x1e>;
-+};
-+
-+qportal31: qman-portal@7c000 {
-+ cell-index = <0x1f>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x7c000 0x4000 0x101f000 0x1000>;
-+ interrupts = <166 0x2 0 0>;
-+ fsl,qman-channel-id = <0x1f>;
-+};
-+
-+qportal32: qman-portal@80000 {
-+ cell-index = <0x20>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x80000 0x4000 0x1020000 0x1000>;
-+ interrupts = <168 0x2 0 0>;
-+ fsl,qman-channel-id = <0x20>;
-+};
-+
-+qportal33: qman-portal@84000 {
-+ cell-index = <0x21>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x84000 0x4000 0x1021000 0x1000>;
-+ interrupts = <170 0x2 0 0>;
-+ fsl,qman-channel-id = <0x21>;
-+};
-+
-+qportal34: qman-portal@88000 {
-+ cell-index = <0x22>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x88000 0x4000 0x1022000 0x1000>;
-+ interrupts = <172 0x2 0 0>;
-+ fsl,qman-channel-id = <0x22>;
-+};
-+
-+qportal35: qman-portal@8c000 {
-+ cell-index = <0x23>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x8c000 0x4000 0x1023000 0x1000>;
-+ interrupts = <174 0x2 0 0>;
-+ fsl,qman-channel-id = <0x23>;
-+};
-+
-+qportal36: qman-portal@90000 {
-+ cell-index = <0x24>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x90000 0x4000 0x1024000 0x1000>;
-+ interrupts = <384 0x2 0 0>;
-+ fsl,qman-channel-id = <0x24>;
-+};
-+
-+qportal37: qman-portal@94000 {
-+ cell-index = <0x25>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x94000 0x4000 0x1025000 0x1000>;
-+ interrupts = <386 0x2 0 0>;
-+ fsl,qman-channel-id = <0x25>;
-+};
-+
-+qportal38: qman-portal@98000 {
-+ cell-index = <0x26>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x98000 0x4000 0x1026000 0x1000>;
-+ interrupts = <388 0x2 0 0>;
-+ fsl,qman-channel-id = <0x26>;
-+};
-+
-+qportal39: qman-portal@9c000 {
-+ cell-index = <0x27>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0x9c000 0x4000 0x1027000 0x1000>;
-+ interrupts = <390 0x2 0 0>;
-+ fsl,qman-channel-id = <0x27>;
-+};
-+
-+qportal40: qman-portal@a0000 {
-+ cell-index = <0x28>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0xa0000 0x4000 0x1028000 0x1000>;
-+ interrupts = <392 0x2 0 0>;
-+ fsl,qman-channel-id = <0x28>;
-+};
-+
-+qportal41: qman-portal@a4000 {
-+ cell-index = <0x29>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0xa4000 0x4000 0x1029000 0x1000>;
-+ interrupts = <394 0x2 0 0>;
-+ fsl,qman-channel-id = <0x29>;
-+};
-+
-+qportal42: qman-portal@a8000 {
-+ cell-index = <0x2a>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0xa8000 0x4000 0x102a000 0x1000>;
-+ interrupts = <396 0x2 0 0>;
-+ fsl,qman-channel-id = <0x2a>;
-+};
-+
-+qportal43: qman-portal@ac000 {
-+ cell-index = <0x2b>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0xac000 0x4000 0x102b000 0x1000>;
-+ interrupts = <398 0x2 0 0>;
-+ fsl,qman-channel-id = <0x2b>;
-+};
-+
-+qportal44: qman-portal@b0000 {
-+ cell-index = <0x2c>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0xb0000 0x4000 0x102c000 0x1000>;
-+ interrupts = <400 0x2 0 0>;
-+ fsl,qman-channel-id = <0x2c>;
-+};
-+
-+qportal45: qman-portal@b4000 {
-+ cell-index = <0x2d>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0xb4000 0x4000 0x102d000 0x1000>;
-+ interrupts = <402 0x2 0 0>;
-+ fsl,qman-channel-id = <0x2d>;
-+};
-+
-+qportal46: qman-portal@b8000 {
-+ cell-index = <0x2e>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0xb8000 0x4000 0x102e000 0x1000>;
-+ interrupts = <404 0x2 0 0>;
-+ fsl,qman-channel-id = <0x2e>;
-+};
-+
-+qportal47: qman-portal@bc000 {
-+ cell-index = <0x2f>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0xbc000 0x4000 0x102f000 0x1000>;
-+ interrupts = <406 0x2 0 0>;
-+ fsl,qman-channel-id = <0x2f>;
-+};
-+
-+qportal48: qman-portal@c0000 {
-+ cell-index = <0x30>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0xc0000 0x4000 0x1030000 0x1000>;
-+ interrupts = <408 0x2 0 0>;
-+ fsl,qman-channel-id = <0x30>;
-+};
-+
-+qportal49: qman-portal@c4000 {
-+ cell-index = <0x31>;
-+ compatible = "fsl,qman-portal";
-+ reg = <0xc4000 0x4000 0x1031000 0x1000>;
-+ interrupts = <410 0x2 0 0>;
-+ fsl,qman-channel-id = <0x31>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-raid1.0-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-raid1.0-0.dtsi
-new file mode 100644
-index 0000000..d2f1315
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-raid1.0-0.dtsi
-@@ -0,0 +1,85 @@
-+/*
-+ * QorIQ RAID 1.0 device tree stub [ controller @ offset 0x320000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+raideng: raideng@320000 {
-+ compatible = "fsl,raideng-v1.0";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0x320000 0x10000>;
-+ ranges = <0 0x320000 0x10000>;
-+
-+ raideng_jq0@1000 {
-+ compatible = "fsl,raideng-v1.0-job-queue";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0x1000 0x1000>;
-+ ranges = <0x0 0x1000 0x1000>;
-+
-+ raideng_jr0: jr@0 {
-+ compatible = "fsl,raideng-v1.0-job-ring", "fsl,raideng-v1.0-hp-ring";
-+ reg = <0x0 0x400>;
-+ interrupts = <139 2 0 0>;
-+ interrupt-parent = <&mpic>;
-+ };
-+
-+ raideng_jr1: jr@400 {
-+ compatible = "fsl,raideng-v1.0-job-ring", "fsl,raideng-v1.0-lp-ring";
-+ reg = <0x400 0x400>;
-+ interrupts = <140 2 0 0>;
-+ interrupt-parent = <&mpic>;
-+ };
-+ };
-+
-+ raideng_jq1@2000 {
-+ compatible = "fsl,raideng-v1.0-job-queue";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0x2000 0x1000>;
-+ ranges = <0x0 0x2000 0x1000>;
-+
-+ raideng_jr2: jr@0 {
-+ compatible = "fsl,raideng-v1.0-job-ring", "fsl,raideng-v1.0-hp-ring";
-+ reg = <0x0 0x400>;
-+ interrupts = <141 2 0 0>;
-+ interrupt-parent = <&mpic>;
-+ };
-+
-+ raideng_jr3: jr@400 {
-+ compatible = "fsl,raideng-v1.0-job-ring", "fsl,raideng-v1.0-lp-ring";
-+ reg = <0x400 0x400>;
-+ interrupts = <142 2 0 0>;
-+ interrupt-parent = <&mpic>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-rman-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-rman-0.dtsi
-new file mode 100644
-index 0000000..3fcfdde
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-rman-0.dtsi
-@@ -0,0 +1,63 @@
-+/*
-+ * QorIQ RMan device tree stub [ controller @ offset 0x1e0000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+rman: rman@1e0000 {
-+ compatible = "fsl,rman";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ ranges = <0x0 0x1e0000 0x20000>;
-+ reg = <0x1e0000 0x20000>;
-+ interrupts = <16 2 1 11>; /* err_irq */
-+
-+ inbound-block@0 {
-+ compatible = "fsl,rman-inbound-block";
-+ reg = <0x0 0x800>;
-+ };
-+ global-cfg@b00 {
-+ compatible = "fsl,rman-global-cfg";
-+ reg = <0xb00 0x500>;
-+ };
-+ inbound-block@1000 {
-+ compatible = "fsl,rman-inbound-block";
-+ reg = <0x1000 0x800>;
-+ };
-+ inbound-block@2000 {
-+ compatible = "fsl,rman-inbound-block";
-+ reg = <0x2000 0x800>;
-+ };
-+ inbound-block@3000 {
-+ compatible = "fsl,rman-inbound-block";
-+ reg = <0x3000 0x800>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-rmu-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-rmu-0.dtsi
-new file mode 100644
-index 0000000..ca7fec7
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-rmu-0.dtsi
-@@ -0,0 +1,68 @@
-+/*
-+ * QorIQ RIO Message Unit device tree stub [ controller @ offset 0xd3000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+rmu: rmu@d3000 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,srio-rmu";
-+ reg = <0xd3000 0x500>;
-+ ranges = <0x0 0xd3000 0x500>;
-+
-+ message-unit@0 {
-+ compatible = "fsl,srio-msg-unit";
-+ reg = <0x0 0x100>;
-+ interrupts = <
-+ 60 2 0 0 /* msg1_tx_irq */
-+ 61 2 0 0>;/* msg1_rx_irq */
-+ };
-+ message-unit@100 {
-+ compatible = "fsl,srio-msg-unit";
-+ reg = <0x100 0x100>;
-+ interrupts = <
-+ 62 2 0 0 /* msg2_tx_irq */
-+ 63 2 0 0>;/* msg2_rx_irq */
-+ };
-+ doorbell-unit@400 {
-+ compatible = "fsl,srio-dbell-unit";
-+ reg = <0x400 0x80>;
-+ interrupts = <
-+ 56 2 0 0 /* bell_outb_irq */
-+ 57 2 0 0>;/* bell_inb_irq */
-+ };
-+ port-write-unit@4e0 {
-+ compatible = "fsl,srio-port-write-unit";
-+ reg = <0x4e0 0x20>;
-+ interrupts = <16 2 1 11>;
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-sata2-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-sata2-0.dtsi
-new file mode 100644
-index 0000000..b642047
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-sata2-0.dtsi
-@@ -0,0 +1,39 @@
-+/*
-+ * QorIQ SATAv2 device tree stub [ controller @ offset 0x220000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+sata@220000 {
-+ compatible = "fsl,pq-sata-v2";
-+ reg = <0x220000 0x1000>;
-+ interrupts = <68 0x2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-sata2-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-sata2-1.dtsi
-new file mode 100644
-index 0000000..c573702
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-sata2-1.dtsi
-@@ -0,0 +1,39 @@
-+/*
-+ * QorIQ SATAv2 device tree stub [ controller @ offset 0x221000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+sata@221000 {
-+ compatible = "fsl,pq-sata-v2";
-+ reg = <0x221000 0x1000>;
-+ interrupts = <69 0x2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-sec4.0-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-sec4.0-0.dtsi
-new file mode 100644
-index 0000000..0cbbac3
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-sec4.0-0.dtsi
-@@ -0,0 +1,100 @@
-+/*
-+ * QorIQ Sec/Crypto 4.0 device tree stub [ controller @ offset 0x300000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+crypto: crypto@300000 {
-+ compatible = "fsl,sec-v4.0";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0x300000 0x10000>;
-+ ranges = <0 0x300000 0x10000>;
-+ interrupts = <92 2 0 0>;
-+
-+ sec_jr0: jr@1000 {
-+ compatible = "fsl,sec-v4.0-job-ring";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <88 2 0 0>;
-+ };
-+
-+ sec_jr1: jr@2000 {
-+ compatible = "fsl,sec-v4.0-job-ring";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <89 2 0 0>;
-+ };
-+
-+ sec_jr2: jr@3000 {
-+ compatible = "fsl,sec-v4.0-job-ring";
-+ reg = <0x3000 0x1000>;
-+ interrupts = <90 2 0 0>;
-+ };
-+
-+ sec_jr3: jr@4000 {
-+ compatible = "fsl,sec-v4.0-job-ring";
-+ reg = <0x4000 0x1000>;
-+ interrupts = <91 2 0 0>;
-+ };
-+
-+ rtic@6000 {
-+ compatible = "fsl,sec-v4.0-rtic";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0x6000 0x100>;
-+ ranges = <0x0 0x6100 0xe00>;
-+
-+ rtic_a: rtic-a@0 {
-+ compatible = "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x00 0x20 0x100 0x80>;
-+ };
-+
-+ rtic_b: rtic-b@20 {
-+ compatible = "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x20 0x20 0x200 0x80>;
-+ };
-+
-+ rtic_c: rtic-c@40 {
-+ compatible = "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x40 0x20 0x300 0x80>;
-+ };
-+
-+ rtic_d: rtic-d@60 {
-+ compatible = "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x60 0x20 0x500 0x80>;
-+ };
-+ };
-+};
-+
-+sec_mon: sec_mon@314000 {
-+ compatible = "fsl,sec-v4.0-mon";
-+ reg = <0x314000 0x1000>;
-+ interrupts = <93 2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-sec4.1-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-sec4.1-0.dtsi
-new file mode 100644
-index 0000000..3308986
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-sec4.1-0.dtsi
-@@ -0,0 +1,109 @@
-+/*
-+ * QorIQ Sec/Crypto 4.1 device tree stub [ controller @ offset 0x300000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+crypto: crypto@300000 {
-+ compatible = "fsl,sec-v4.1", "fsl,sec-v4.0";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0x300000 0x10000>;
-+ ranges = <0 0x300000 0x10000>;
-+ interrupts = <92 2 0 0>;
-+
-+ sec_jr0: jr@1000 {
-+ compatible = "fsl,sec-v4.1-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <88 2 0 0>;
-+ };
-+
-+ sec_jr1: jr@2000 {
-+ compatible = "fsl,sec-v4.1-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <89 2 0 0>;
-+ };
-+
-+ sec_jr2: jr@3000 {
-+ compatible = "fsl,sec-v4.1-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x3000 0x1000>;
-+ interrupts = <90 2 0 0>;
-+ };
-+
-+ sec_jr3: jr@4000 {
-+ compatible = "fsl,sec-v4.1-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x4000 0x1000>;
-+ interrupts = <91 2 0 0>;
-+ };
-+
-+ rtic@6000 {
-+ compatible = "fsl,sec-v4.1-rtic",
-+ "fsl,sec-v4.0-rtic";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0x6000 0x100>;
-+ ranges = <0x0 0x6100 0xe00>;
-+
-+ rtic_a: rtic-a@0 {
-+ compatible = "fsl,sec-v4.1-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x00 0x20 0x100 0x80>;
-+ };
-+
-+ rtic_b: rtic-b@20 {
-+ compatible = "fsl,sec-v4.1-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x20 0x20 0x200 0x80>;
-+ };
-+
-+ rtic_c: rtic-c@40 {
-+ compatible = "fsl,sec-v4.1-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x40 0x20 0x300 0x80>;
-+ };
-+
-+ rtic_d: rtic-d@60 {
-+ compatible = "fsl,sec-v4.1-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x60 0x20 0x500 0x80>;
-+ };
-+ };
-+};
-+
-+sec_mon: sec_mon@314000 {
-+ compatible = "fsl,sec-v4.1-mon", "fsl,sec-v4.0-mon";
-+ reg = <0x314000 0x1000>;
-+ interrupts = <93 2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-sec4.2-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-sec4.2-0.dtsi
-new file mode 100644
-index 0000000..7990e0d
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-sec4.2-0.dtsi
-@@ -0,0 +1,109 @@
-+/*
-+ * QorIQ Sec/Crypto 4.2 device tree stub [ controller @ offset 0x300000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+crypto: crypto@300000 {
-+ compatible = "fsl,sec-v4.2", "fsl,sec-v4.0";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0x300000 0x10000>;
-+ ranges = <0 0x300000 0x10000>;
-+ interrupts = <92 2 0 0>;
-+
-+ sec_jr0: jr@1000 {
-+ compatible = "fsl,sec-v4.2-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <88 2 0 0>;
-+ };
-+
-+ sec_jr1: jr@2000 {
-+ compatible = "fsl,sec-v4.2-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <89 2 0 0>;
-+ };
-+
-+ sec_jr2: jr@3000 {
-+ compatible = "fsl,sec-v4.2-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x3000 0x1000>;
-+ interrupts = <90 2 0 0>;
-+ };
-+
-+ sec_jr3: jr@4000 {
-+ compatible = "fsl,sec-v4.2-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x4000 0x1000>;
-+ interrupts = <91 2 0 0>;
-+ };
-+
-+ rtic@6000 {
-+ compatible = "fsl,sec-v4.2-rtic",
-+ "fsl,sec-v4.0-rtic";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0x6000 0x100>;
-+ ranges = <0x0 0x6100 0xe00>;
-+
-+ rtic_a: rtic-a@0 {
-+ compatible = "fsl,sec-v4.2-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x00 0x20 0x100 0x80>;
-+ };
-+
-+ rtic_b: rtic-b@20 {
-+ compatible = "fsl,sec-v4.2-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x20 0x20 0x200 0x80>;
-+ };
-+
-+ rtic_c: rtic-c@40 {
-+ compatible = "fsl,sec-v4.2-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x40 0x20 0x300 0x80>;
-+ };
-+
-+ rtic_d: rtic-d@60 {
-+ compatible = "fsl,sec-v4.2-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x60 0x20 0x500 0x80>;
-+ };
-+ };
-+};
-+
-+sec_mon: sec_mon@314000 {
-+ compatible = "fsl,sec-v4.2-mon", "fsl,sec-v4.0-mon";
-+ reg = <0x314000 0x1000>;
-+ interrupts = <93 2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-sec5.0-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-sec5.0-0.dtsi
-new file mode 100644
-index 0000000..ffd458f
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-sec5.0-0.dtsi
-@@ -0,0 +1,109 @@
-+/*
-+ * QorIQ Sec/Crypto 5.0 device tree stub [ controller @ offset 0x300000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+crypto: crypto@300000 {
-+ compatible = "fsl,sec-v5.0", "fsl,sec-v4.0";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0x300000 0x10000>;
-+ ranges = <0 0x300000 0x10000>;
-+ interrupts = <92 2 0 0>;
-+
-+ sec_jr0: jr@1000 {
-+ compatible = "fsl,sec-v5.0-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <88 2 0 0>;
-+ };
-+
-+ sec_jr1: jr@2000 {
-+ compatible = "fsl,sec-v5.0-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <89 2 0 0>;
-+ };
-+
-+ sec_jr2: jr@3000 {
-+ compatible = "fsl,sec-v5.0-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x3000 0x1000>;
-+ interrupts = <90 2 0 0>;
-+ };
-+
-+ sec_jr3: jr@4000 {
-+ compatible = "fsl,sec-v5.0-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x4000 0x1000>;
-+ interrupts = <91 2 0 0>;
-+ };
-+
-+ rtic@6000 {
-+ compatible = "fsl,sec-v5.0-rtic",
-+ "fsl,sec-v4.0-rtic";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0x6000 0x100>;
-+ ranges = <0x0 0x6100 0xe00>;
-+
-+ rtic_a: rtic-a@0 {
-+ compatible = "fsl,sec-v5.0-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x00 0x20 0x100 0x80>;
-+ };
-+
-+ rtic_b: rtic-b@20 {
-+ compatible = "fsl,sec-v5.0-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x20 0x20 0x200 0x80>;
-+ };
-+
-+ rtic_c: rtic-c@40 {
-+ compatible = "fsl,sec-v5.0-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x40 0x20 0x300 0x80>;
-+ };
-+
-+ rtic_d: rtic-d@60 {
-+ compatible = "fsl,sec-v5.0-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x60 0x20 0x500 0x80>;
-+ };
-+ };
-+};
-+
-+sec_mon: sec_mon@314000 {
-+ compatible = "fsl,sec-v5.0-mon", "fsl,sec-v4.0-mon";
-+ reg = <0x314000 0x1000>;
-+ interrupts = <93 2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-sec5.2-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-sec5.2-0.dtsi
-new file mode 100644
-index 0000000..7b2ab8a
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-sec5.2-0.dtsi
-@@ -0,0 +1,118 @@
-+/*
-+ * QorIQ Sec/Crypto 5.2 device tree stub [ controller @ offset 0x300000 ]
-+ *
-+ * Copyright 2011-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+crypto: crypto@300000 {
-+ compatible = "fsl,sec-v5.2", "fsl,sec-v5.0", "fsl,sec-v4.0";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0x300000 0x10000>;
-+ ranges = <0 0x300000 0x10000>;
-+ interrupts = <92 2 0 0>;
-+
-+ sec_jr0: jr@1000 {
-+ compatible = "fsl,sec-v5.2-job-ring",
-+ "fsl,sec-v5.0-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <88 2 0 0>;
-+ };
-+
-+ sec_jr1: jr@2000 {
-+ compatible = "fsl,sec-v5.2-job-ring",
-+ "fsl,sec-v5.0-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <89 2 0 0>;
-+ };
-+
-+ sec_jr2: jr@3000 {
-+ compatible = "fsl,sec-v5.2-job-ring",
-+ "fsl,sec-v5.0-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x3000 0x1000>;
-+ interrupts = <90 2 0 0>;
-+ };
-+
-+ sec_jr3: jr@4000 {
-+ compatible = "fsl,sec-v5.2-job-ring",
-+ "fsl,sec-v5.0-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x4000 0x1000>;
-+ interrupts = <91 2 0 0>;
-+ };
-+
-+ rtic@6000 {
-+ compatible = "fsl,sec-v5.2-rtic",
-+ "fsl,sec-v5.0-rtic",
-+ "fsl,sec-v4.0-rtic";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0x6000 0x100>;
-+ ranges = <0x0 0x6100 0xe00>;
-+
-+ rtic_a: rtic-a@0 {
-+ compatible = "fsl,sec-v5.2-rtic-memory",
-+ "fsl,sec-v5.0-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x00 0x20 0x100 0x80>;
-+ };
-+
-+ rtic_b: rtic-b@20 {
-+ compatible = "fsl,sec-v5.2-rtic-memory",
-+ "fsl,sec-v5.0-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x20 0x20 0x200 0x80>;
-+ };
-+
-+ rtic_c: rtic-c@40 {
-+ compatible = "fsl,sec-v5.2-rtic-memory",
-+ "fsl,sec-v5.0-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x40 0x20 0x300 0x80>;
-+ };
-+
-+ rtic_d: rtic-d@60 {
-+ compatible = "fsl,sec-v5.2-rtic-memory",
-+ "fsl,sec-v5.0-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x60 0x20 0x500 0x80>;
-+ };
-+ };
-+};
-+
-+sec_mon: sec_mon@314000 {
-+ compatible = "fsl,sec-v5.2-mon", "fsl,sec-v5.0-mon", "fsl,sec-v4.0-mon";
-+ reg = <0x314000 0x1000>;
-+ interrupts = <93 2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-sec5.3-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-sec5.3-0.dtsi
-new file mode 100644
-index 0000000..0339825
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-sec5.3-0.dtsi
-@@ -0,0 +1,118 @@
-+/*
-+ * QorIQ Sec/Crypto 5.3 device tree stub [ controller @ offset 0x300000 ]
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+crypto: crypto@300000 {
-+ compatible = "fsl,sec-v5.3", "fsl,sec-v5.0", "fsl,sec-v4.0";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0x300000 0x10000>;
-+ ranges = <0 0x300000 0x10000>;
-+ interrupts = <92 2 0 0>;
-+
-+ sec_jr0: jr@1000 {
-+ compatible = "fsl,sec-v5.3-job-ring",
-+ "fsl,sec-v5.0-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x1000 0x1000>;
-+ interrupts = <88 2 0 0>;
-+ };
-+
-+ sec_jr1: jr@2000 {
-+ compatible = "fsl,sec-v5.3-job-ring",
-+ "fsl,sec-v5.0-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x2000 0x1000>;
-+ interrupts = <89 2 0 0>;
-+ };
-+
-+ sec_jr2: jr@3000 {
-+ compatible = "fsl,sec-v5.3-job-ring",
-+ "fsl,sec-v5.0-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x3000 0x1000>;
-+ interrupts = <90 2 0 0>;
-+ };
-+
-+ sec_jr3: jr@4000 {
-+ compatible = "fsl,sec-v5.3-job-ring",
-+ "fsl,sec-v5.0-job-ring",
-+ "fsl,sec-v4.0-job-ring";
-+ reg = <0x4000 0x1000>;
-+ interrupts = <91 2 0 0>;
-+ };
-+
-+ rtic@6000 {
-+ compatible = "fsl,sec-v5.3-rtic",
-+ "fsl,sec-v5.0-rtic",
-+ "fsl,sec-v4.0-rtic";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0x6000 0x100>;
-+ ranges = <0x0 0x6100 0xe00>;
-+
-+ rtic_a: rtic-a@0 {
-+ compatible = "fsl,sec-v5.3-rtic-memory",
-+ "fsl,sec-v5.0-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x00 0x20 0x100 0x80>;
-+ };
-+
-+ rtic_b: rtic-b@20 {
-+ compatible = "fsl,sec-v5.3-rtic-memory",
-+ "fsl,sec-v5.0-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x20 0x20 0x200 0x80>;
-+ };
-+
-+ rtic_c: rtic-c@40 {
-+ compatible = "fsl,sec-v5.3-rtic-memory",
-+ "fsl,sec-v5.0-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x40 0x20 0x300 0x80>;
-+ };
-+
-+ rtic_d: rtic-d@60 {
-+ compatible = "fsl,sec-v5.3-rtic-memory",
-+ "fsl,sec-v5.0-rtic-memory",
-+ "fsl,sec-v4.0-rtic-memory";
-+ reg = <0x60 0x20 0x500 0x80>;
-+ };
-+ };
-+};
-+
-+sec_mon: sec_mon@314000 {
-+ compatible = "fsl,sec-v5.3-mon", "fsl,sec-v5.0-mon", "fsl,sec-v4.0-mon";
-+ reg = <0x314000 0x1000>;
-+ interrupts = <93 2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-usb2-dr-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-usb2-dr-0.dtsi
-new file mode 100644
-index 0000000..4dd6f84
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-usb2-dr-0.dtsi
-@@ -0,0 +1,41 @@
-+/*
-+ * QorIQ USB DR device tree stub [ controller @ offset 0x211000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+usb@211000 {
-+ compatible = "fsl,mpc85xx-usb2-dr", "fsl-usb2-dr";
-+ reg = <0x211000 0x1000>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ interrupts = <45 0x2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/qoriq-usb2-mph-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-usb2-mph-0.dtsi
-new file mode 100644
-index 0000000..f053835
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/qoriq-usb2-mph-0.dtsi
-@@ -0,0 +1,41 @@
-+/*
-+ * QorIQ USB Host device tree stub [ controller @ offset 0x210000 ]
-+ *
-+ * Copyright 2011 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+usb@210000 {
-+ compatible = "fsl,mpc85xx-usb2-mph", "fsl-usb2-mph";
-+ reg = <0x210000 0x1000>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ interrupts = <44 0x2 0 0>;
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
-new file mode 100644
-index 0000000..b27fb24
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
-@@ -0,0 +1,599 @@
-+/*
-+ * T4240 Silicon/SoC Device Tree Source (post include)
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "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 Freescale Semiconductor 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.
-+ */
-+
-+&ifc {
-+ #address-cells = <2>;
-+ #size-cells = <1>;
-+ compatible = "fsl,ifc", "simple-bus";
-+ interrupts = <25 2 0 0>;
-+};
-+
-+&lportals {
-+/include/ "interlaken-lac-portals.dtsi"
-+};
-+
-+&bportals {
-+/include/ "qoriq-bman2-portals.dtsi"
-+};
-+
-+&qportals {
-+/include/ "qoriq-qman2-portals.dtsi"
-+};
-+
-+/* controller at 0x240000 */
-+&pci0 {
-+ compatible = "fsl,t4240-pcie", "fsl,qoriq-pcie-v3.0";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <20 2 0 0>;
-+ pcie@0 {
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <20 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 40 1 0 0
-+ 0000 0 0 2 &mpic 1 1 0 0
-+ 0000 0 0 3 &mpic 2 1 0 0
-+ 0000 0 0 4 &mpic 3 1 0 0
-+ >;
-+ };
-+};
-+
-+/* controller at 0x250000 */
-+&pci1 {
-+ compatible = "fsl,t4240-pcie", "fsl,qoriq-pcie-v3.0";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <21 2 0 0>;
-+ pcie@0 {
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <21 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 41 1 0 0
-+ 0000 0 0 2 &mpic 5 1 0 0
-+ 0000 0 0 3 &mpic 6 1 0 0
-+ 0000 0 0 4 &mpic 7 1 0 0
-+ >;
-+ };
-+};
-+
-+/* controller at 0x260000 */
-+&pci2 {
-+ compatible = "fsl,t4240-pcie", "fsl,qoriq-pcie-v3.0";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <22 2 0 0>;
-+ pcie@0 {
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <22 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 42 1 0 0
-+ 0000 0 0 2 &mpic 9 1 0 0
-+ 0000 0 0 3 &mpic 10 1 0 0
-+ 0000 0 0 4 &mpic 11 1 0 0
-+ >;
-+ };
-+};
-+
-+/* controller at 0x270000 */
-+&pci3 {
-+ compatible = "fsl,t4240-pcie", "fsl,qoriq-pcie-v3.0";
-+ device_type = "pci";
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ bus-range = <0x0 0xff>;
-+ clock-frequency = <33333333>;
-+ interrupts = <23 2 0 0>;
-+ pcie@0 {
-+ #interrupt-cells = <1>;
-+ #size-cells = <2>;
-+ #address-cells = <3>;
-+ device_type = "pci";
-+ interrupts = <23 2 0 0>;
-+ interrupt-map-mask = <0xf800 0 0 7>;
-+ interrupt-map = <
-+ /* IDSEL 0x0 */
-+ 0000 0 0 1 &mpic 43 1 0 0
-+ 0000 0 0 2 &mpic 0 1 0 0
-+ 0000 0 0 3 &mpic 4 1 0 0
-+ 0000 0 0 4 &mpic 8 1 0 0
-+ >;
-+ };
-+};
-+
-+&rio {
-+ compatible = "fsl,srio";
-+ interrupts = <16 2 1 11>;
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ ranges;
-+
-+ port1 {
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ cell-index = <1>;
-+ };
-+
-+ port2 {
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ cell-index = <2>;
-+ };
-+};
-+
-+&dcsr {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,dcsr", "simple-bus";
-+
-+ dcsr-epu@0 {
-+ compatible = "fsl,t4240-dcsr-epu", "fsl,dcsr-epu";
-+ interrupts = <52 2 0 0
-+ 84 2 0 0
-+ 85 2 0 0
-+ 94 2 0 0
-+ 95 2 0 0>;
-+ reg = <0x0 0x1000>;
-+ };
-+ dcsr-npc {
-+ compatible = "fsl,t4240-dcsr-cnpc", "fsl,dcsr-cnpc";
-+ reg = <0x1000 0x1000 0x1002000 0x10000>;
-+ };
-+ dcsr-nxc@2000 {
-+ compatible = "fsl,dcsr-nxc";
-+ reg = <0x2000 0x1000>;
-+ };
-+ dcsr-corenet {
-+ compatible = "fsl,dcsr-corenet";
-+ reg = <0x8000 0x1000 0x1A000 0x1000>;
-+ };
-+ dcsr-dpaa@9000 {
-+ compatible = "fsl,t4240-dcsr-dpaa", "fsl,dcsr-dpaa";
-+ reg = <0x9000 0x1000>;
-+ };
-+ dcsr-ocn@11000 {
-+ compatible = "fsl,t4240-dcsr-ocn", "fsl,dcsr-ocn";
-+ reg = <0x11000 0x1000>;
-+ };
-+ dcsr-ddr@12000 {
-+ compatible = "fsl,dcsr-ddr";
-+ dev-handle = <&ddr1>;
-+ reg = <0x12000 0x1000>;
-+ };
-+ dcsr-ddr@13000 {
-+ compatible = "fsl,dcsr-ddr";
-+ dev-handle = <&ddr2>;
-+ reg = <0x13000 0x1000>;
-+ };
-+ dcsr-ddr@14000 {
-+ compatible = "fsl,dcsr-ddr";
-+ dev-handle = <&ddr3>;
-+ reg = <0x14000 0x1000>;
-+ };
-+ dcsr-nal@18000 {
-+ compatible = "fsl,t4240-dcsr-nal", "fsl,dcsr-nal";
-+ reg = <0x18000 0x1000>;
-+ };
-+ dcsr-rcpm@22000 {
-+ compatible = "fsl,t4240-dcsr-rcpm", "fsl,dcsr-rcpm";
-+ reg = <0x22000 0x1000>;
-+ };
-+ dcsr-snpc@30000 {
-+ compatible = "fsl,t4240-dcsr-snpc", "fsl,dcsr-snpc";
-+ reg = <0x30000 0x1000 0x1022000 0x10000>;
-+ };
-+ dcsr-snpc@31000 {
-+ compatible = "fsl,t4240-dcsr-snpc", "fsl,dcsr-snpc";
-+ reg = <0x31000 0x1000 0x1042000 0x10000>;
-+ };
-+ dcsr-snpc@32000 {
-+ compatible = "fsl,t4240-dcsr-snpc", "fsl,dcsr-snpc";
-+ reg = <0x32000 0x1000 0x1062000 0x10000>;
-+ };
-+ dcsr-cpu-sb-proxy@100000 {
-+ compatible = "fsl,dcsr-e6500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu0>;
-+ reg = <0x100000 0x1000 0x101000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@108000 {
-+ compatible = "fsl,dcsr-e6500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu1>;
-+ reg = <0x108000 0x1000 0x109000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@110000 {
-+ compatible = "fsl,dcsr-e6500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu2>;
-+ reg = <0x110000 0x1000 0x111000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@118000 {
-+ compatible = "fsl,dcsr-e6500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu3>;
-+ reg = <0x118000 0x1000 0x119000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@120000 {
-+ compatible = "fsl,dcsr-e6500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu4>;
-+ reg = <0x120000 0x1000 0x121000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@128000 {
-+ compatible = "fsl,dcsr-e6500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu5>;
-+ reg = <0x128000 0x1000 0x129000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@130000 {
-+ compatible = "fsl,dcsr-e6500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu6>;
-+ reg = <0x130000 0x1000 0x131000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@138000 {
-+ compatible = "fsl,dcsr-e6500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu7>;
-+ reg = <0x138000 0x1000 0x139000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@140000 {
-+ compatible = "fsl,dcsr-e6500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu8>;
-+ reg = <0x140000 0x1000 0x141000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@148000 {
-+ compatible = "fsl,dcsr-e6500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu9>;
-+ reg = <0x148000 0x1000 0x149000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@150000 {
-+ compatible = "fsl,dcsr-e6500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu10>;
-+ reg = <0x150000 0x1000 0x151000 0x1000>;
-+ };
-+ dcsr-cpu-sb-proxy@158000 {
-+ compatible = "fsl,dcsr-e6500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";
-+ cpu-handle = <&cpu11>;
-+ reg = <0x158000 0x1000 0x159000 0x1000>;
-+ };
-+};
-+
-+&soc {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ device_type = "soc";
-+ compatible = "simple-bus";
-+
-+ soc-sram-error {
-+ compatible = "fsl,soc-sram-error";
-+ interrupts = <16 2 1 29>;
-+ };
-+
-+ corenet-law@0 {
-+ compatible = "fsl,corenet-law";
-+ reg = <0x0 0x1000>;
-+ fsl,num-laws = <32>;
-+ };
-+
-+ ddr1: memory-controller@8000 {
-+ compatible = "fsl,qoriq-memory-controller-v4.7",
-+ "fsl,qoriq-memory-controller";
-+ reg = <0x8000 0x1000>;
-+ interrupts = <16 2 1 23>;
-+ };
-+
-+ ddr2: memory-controller@9000 {
-+ compatible = "fsl,qoriq-memory-controller-v4.7",
-+ "fsl,qoriq-memory-controller";
-+ reg = <0x9000 0x1000>;
-+ interrupts = <16 2 1 22>;
-+ };
-+
-+ ddr3: memory-controller@a000 {
-+ compatible = "fsl,qoriq-memory-controller-v4.7",
-+ "fsl,qoriq-memory-controller";
-+ reg = <0xa000 0x1000>;
-+ interrupts = <16 2 1 21>;
-+ };
-+
-+ cpc: l3-cache-controller@10000 {
-+ compatible = "fsl,p5020-l3-cache-controller", "fsl,p4080-l3-cache-controller", "cache";
-+ reg = <0x10000 0x1000
-+ 0x11000 0x1000>;
-+ interrupts = <16 2 1 27
-+ 16 2 1 26>;
-+ };
-+
-+ corenet-cf@18000 {
-+ compatible = "fsl,corenet-cf";
-+ reg = <0x18000 0x1000>;
-+ interrupts = <16 2 1 31>;
-+ fsl,ccf-num-csdids = <32>;
-+ fsl,ccf-num-snoopids = <32>;
-+ };
-+
-+ iommu@20000 {
-+ compatible = "fsl,pamu-v1.0", "fsl,pamu";
-+ reg = <0x20000 0x6000>;
-+ interrupts = <
-+ 24 2 0 0
-+ 16 2 1 30>;
-+ };
-+
-+/include/ "qoriq-mpic.dtsi"
-+
-+ guts: global-utilities@e0000 {
-+ compatible = "fsl,t4240-device-config";
-+ reg = <0xe0000 0xe00>;
-+ fsl,has-rstcr;
-+ fsl,liodn-bits = <12>;
-+ };
-+
-+ clockgen: global-utilities@e1000 {
-+ compatible = "fsl,t4240-clockgen", "fsl,qoriq-clockgen-2";
-+ reg = <0xe1000 0x1000>;
-+ };
-+
-+/include/ "interlaken-lac.dtsi"
-+
-+ rcpm: global-utilities@e2000 {
-+ compatible = "fsl,t4240-rcpm", "fsl,qoriq-rcpm-2";
-+ reg = <0xe2000 0x1000>;
-+ };
-+
-+/include/ "qoriq-dma-0.dtsi"
-+/include/ "qoriq-dma-1.dtsi"
-+
-+/include/ "qoriq-espi-0.dtsi"
-+ spi@110000 {
-+ fsl,espi-num-chipselects = <4>;
-+ };
-+
-+/include/ "qoriq-esdhc-0.dtsi"
-+ sdhc@114000 {
-+ compatible = "fsl,t4240-esdhc", "fsl,esdhc";
-+ sdhci,auto-cmd12;
-+ };
-+/include/ "qoriq-i2c-0.dtsi"
-+/include/ "qoriq-i2c-1.dtsi"
-+/include/ "qoriq-duart-0.dtsi"
-+/include/ "qoriq-duart-1.dtsi"
-+/include/ "qoriq-sec5.0-0.dtsi"
-+
-+
-+ /*
-+ * Temporarily define cluster 1/2/3's L2 cache nodes in order to pass
-+ * next-level-cache info to uboot to do L3 cache fixup. This can be
-+ * removed once u-boot can create cpu node with cache info.
-+ */
-+ L2_1: l2-cache-controller@c20000 {
-+ compatible = "fsl,t4240-l2-cache-controller";
-+ reg = <0xc20000 0x40000>;
-+ next-level-cache = <&cpc>;
-+ };
-+ L2_2: l2-cache-controller@c60000 {
-+ compatible = "fsl,t4240-l2-cache-controller";
-+ reg = <0xc60000 0x40000>;
-+ next-level-cache = <&cpc>;
-+ };
-+ L2_3: l2-cache-controller@ca0000 {
-+ compatible = "fsl,t4240-l2-cache-controller";
-+ reg = <0xca0000 0x40000>;
-+ next-level-cache = <&cpc>;
-+ };
-+
-+/include/ "qoriq-qman1.dtsi"
-+/include/ "qoriq-bman1.dtsi"
-+
-+/include/ "qoriq-rman-0.dtsi"
-+ rman: rman@1e0000 {
-+ fsl,qman-channels-id = <0x880 0x881>;
-+ };
-+
-+/include/ "qoriq-usb2-mph-0.dtsi"
-+ usb0: usb@210000 {
-+ compatible = "fsl-usb2-mph-v2.4", "fsl-usb2-mph";
-+ phy_type = "utmi";
-+ port0;
-+ };
-+/include/ "qoriq-usb2-dr-0.dtsi"
-+ usb1: usb@211000 {
-+ compatible = "fsl-usb2-dr-v2.4", "fsl-usb2-dr";
-+ dr_mode = "host";
-+ phy_type = "utmi";
-+ };
-+/include/ "qoriq-sata2-0.dtsi"
-+ sata0: sata@220000 {
-+ compatible = "fsl,t4240-rev1.0-sata", "fsl,pq-sata-v2";
-+ };
-+/include/ "qoriq-sata2-1.dtsi"
-+ sata1: sata@221000 {
-+ compatible = "fsl,t4240-rev1.0-sata", "fsl,pq-sata-v2";
-+ };
-+/include/ "qoriq-dce-0.dtsi"
-+/include/ "qoriq-pme-0.dtsi"
-+
-+/include/ "qoriq-fman3-0.dtsi"
-+/include/ "qoriq-fman3-0-1g-0.dtsi"
-+/include/ "qoriq-fman3-0-1g-1.dtsi"
-+/include/ "qoriq-fman3-0-1g-2.dtsi"
-+/include/ "qoriq-fman3-0-1g-3.dtsi"
-+/include/ "qoriq-fman3-0-1g-4.dtsi"
-+/include/ "qoriq-fman3-0-1g-5.dtsi"
-+/include/ "qoriq-fman3-0-10g-0.dtsi"
-+/include/ "qoriq-fman3-0-10g-1.dtsi"
-+ fman0: fman@400000 {
-+ /* tx - 1g - 0 */
-+ port@a8000 {
-+ fsl,qman-channel-id = <0x802>;
-+ };
-+ /* tx - 1g - 1 */
-+ port@a9000 {
-+ fsl,qman-channel-id = <0x803>;
-+ };
-+ /* tx - 1g - 2 */
-+ port@aa000 {
-+ fsl,qman-channel-id = <0x804>;
-+ };
-+ /* tx - 1g - 3 */
-+ port@ab000 {
-+ fsl,qman-channel-id = <0x805>;
-+ };
-+ /* tx - 1g - 4 */
-+ port@ac000 {
-+ fsl,qman-channel-id = <0x806>;
-+ };
-+ /* tx - 1g - 5 */
-+ port@ad000 {
-+ fsl,qman-channel-id = <0x807>;
-+ };
-+ /* tx - 10g - 0 */
-+ port@b0000 {
-+ fsl,qman-channel-id = <0x800>;
-+ };
-+ /* tx - 10g - 1 */
-+ port@b1000 {
-+ fsl,qman-channel-id = <0x801>;
-+ };
-+ /* offline - 1 */
-+ port@82000 {
-+ fsl,qman-channel-id = <0x809>;
-+ };
-+ /* offline - 2 */
-+ port@83000 {
-+ fsl,qman-channel-id = <0x80a>;
-+ };
-+ /* offline - 3 */
-+ port@84000 {
-+ fsl,qman-channel-id = <0x80b>;
-+ };
-+ /* offline - 4 */
-+ port@85000 {
-+ fsl,qman-channel-id = <0x80c>;
-+ };
-+ /* offline - 5 */
-+ port@86000 {
-+ fsl,qman-channel-id = <0x80d>;
-+ };
-+ /* offline - 6 */
-+ port@87000 {
-+ fsl,qman-channel-id = <0x80e>;
-+ };
-+ };
-+
-+/include/ "qoriq-fman3-1.dtsi"
-+/include/ "qoriq-fman3-1-1g-0.dtsi"
-+/include/ "qoriq-fman3-1-1g-1.dtsi"
-+/include/ "qoriq-fman3-1-1g-2.dtsi"
-+/include/ "qoriq-fman3-1-1g-3.dtsi"
-+/include/ "qoriq-fman3-1-1g-4.dtsi"
-+/include/ "qoriq-fman3-1-1g-5.dtsi"
-+/include/ "qoriq-fman3-1-10g-0.dtsi"
-+/include/ "qoriq-fman3-1-10g-1.dtsi"
-+ fman1: fman@500000 {
-+ /* tx - 1g - 0 */
-+ port@a8000 {
-+ fsl,qman-channel-id = <0x822>;
-+ };
-+ /* tx - 1g - 1 */
-+ port@a9000 {
-+ fsl,qman-channel-id = <0x823>;
-+ };
-+ /* tx - 1g - 2 */
-+ port@aa000 {
-+ fsl,qman-channel-id = <0x824>;
-+ };
-+ /* tx - 1g - 3 */
-+ port@ab000 {
-+ fsl,qman-channel-id = <0x825>;
-+ };
-+ /* tx - 1g - 4 */
-+ port@ac000 {
-+ fsl,qman-channel-id = <0x826>;
-+ };
-+ /* tx - 1g - 5 */
-+ port@ad000 {
-+ fsl,qman-channel-id = <0x827>;
-+ };
-+ /* tx - 10g - 0 */
-+ port@b0000 {
-+ fsl,qman-channel-id = <0x820>;
-+ };
-+ /* tx - 10g - 1 */
-+ port@b1000 {
-+ fsl,qman-channel-id = <0x821>;
-+ };
-+ /* offline - 1 */
-+ port@82000 {
-+ fsl,qman-channel-id = <0x829>;
-+ };
-+ /* offline - 2 */
-+ port@83000 {
-+ fsl,qman-channel-id = <0x82a>;
-+ };
-+ /* offline - 3 */
-+ port@84000 {
-+ fsl,qman-channel-id = <0x82b>;
-+ };
-+ /* offline - 4 */
-+ port@85000 {
-+ fsl,qman-channel-id = <0x82c>;
-+ };
-+ /* offline - 5 */
-+ port@86000 {
-+ fsl,qman-channel-id = <0x82d>;
-+ };
-+ /* offline - 6 */
-+ port@87000 {
-+ fsl,qman-channel-id = <0x82e>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/fsl/t4240si-pre.dtsi b/arch/powerpc/boot/dts/fsl/t4240si-pre.dtsi
-new file mode 100644
-index 0000000..0997ef1
---- /dev/null
-+++ b/arch/powerpc/boot/dts/fsl/t4240si-pre.dtsi
-@@ -0,0 +1,156 @@
-+/*
-+ * T4240 Silicon/SoC Device Tree Source (pre include)
-+ *
-+ * Copyright 2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "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 Freescale Semiconductor 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.
-+ */
-+
-+/dts-v1/;
-+/ {
-+ compatible = "fsl,T4240";
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ interrupt-parent = <&mpic>;
-+
-+ aliases {
-+ ccsr = &soc;
-+ dcsr = &dcsr;
-+
-+ serial0 = &serial0;
-+ serial1 = &serial1;
-+ serial2 = &serial2;
-+ serial3 = &serial3;
-+ lac = &lac;
-+ bman = &bman;
-+ qman = &qman;
-+ pme = &pme;
-+ dce = &dce;
-+ crypto = &crypto;
-+ fman0 = &fman0;
-+ fman1 = &fman1;
-+ ethernet0 = &enet0;
-+ ethernet1 = &enet1;
-+ ethernet2 = &enet2;
-+ ethernet3 = &enet3;
-+ ethernet4 = &enet4;
-+ ethernet5 = &enet5;
-+ ethernet6 = &enet6;
-+ ethernet7 = &enet7;
-+ ethernet8 = &enet8;
-+ ethernet9 = &enet9;
-+ ethernet10 = &enet10;
-+ ethernet11 = &enet11;
-+ ethernet12 = &enet12;
-+ ethernet13 = &enet13;
-+ ethernet14 = &enet14;
-+ ethernet15 = &enet15;
-+ pci0 = &pci0;
-+ pci1 = &pci1;
-+ pci2 = &pci2;
-+ pci3 = &pci3;
-+ rman = &rman;
-+ dma0 = &dma0;
-+ dma1 = &dma1;
-+ sdhc = &sdhc;
-+ };
-+
-+ cpus {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ /*
-+ * Temporarily add next-level-cache info in each cpu node so
-+ * that uboot can do L2 cache fixup. This can be removed once
-+ * u-boot can create cpu node with cache info.
-+ */
-+ cpu0: PowerPC,e6500@0 {
-+ device_type = "cpu";
-+ reg = <0 1>;
-+ next-level-cache = <&L2_1>;
-+ };
-+ cpu1: PowerPC,e6500@1 {
-+ device_type = "cpu";
-+ reg = <2 3>;
-+ next-level-cache = <&L2_1>;
-+ };
-+ cpu2: PowerPC,e6500@2 {
-+ device_type = "cpu";
-+ reg = <4 5>;
-+ next-level-cache = <&L2_1>;
-+ };
-+ cpu3: PowerPC,e6500@3 {
-+ device_type = "cpu";
-+ reg = <6 7>;
-+ next-level-cache = <&L2_1>;
-+ };
-+
-+ cpu4: PowerPC,e6500@4 {
-+ device_type = "cpu";
-+ reg = <8 9>;
-+ next-level-cache = <&L2_2>;
-+ };
-+ cpu5: PowerPC,e6500@5 {
-+ device_type = "cpu";
-+ reg = <10 11>;
-+ next-level-cache = <&L2_2>;
-+ };
-+ cpu6: PowerPC,e6500@6 {
-+ device_type = "cpu";
-+ reg = <12 13>;
-+ next-level-cache = <&L2_2>;
-+ };
-+ cpu7: PowerPC,e6500@7 {
-+ device_type = "cpu";
-+ reg = <14 15>;
-+ next-level-cache = <&L2_2>;
-+ };
-+
-+ cpu8: PowerPC,e6500@8 {
-+ device_type = "cpu";
-+ reg = <16 17>;
-+ next-level-cache = <&L2_3>;
-+ };
-+ cpu9: PowerPC,e6500@9 {
-+ device_type = "cpu";
-+ reg = <18 19>;
-+ next-level-cache = <&L2_3>;
-+ };
-+ cpu10: PowerPC,e6500@10 {
-+ device_type = "cpu";
-+ reg = <20 21>;
-+ next-level-cache = <&L2_3>;
-+ };
-+ cpu11: PowerPC,e6500@11 {
-+ device_type = "cpu";
-+ reg = <22 23>;
-+ next-level-cache = <&L2_3>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/p2041rdb-usdpaa.dts b/arch/powerpc/boot/dts/p2041rdb-usdpaa.dts
-new file mode 100644
-index 0000000..2557614
---- /dev/null
-+++ b/arch/powerpc/boot/dts/p2041rdb-usdpaa.dts
-@@ -0,0 +1,110 @@
-+/*
-+ * P2041RDB Device Tree Source
-+ *
-+ * Copyright 2011-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+/include/ "p2041rdb.dts"
-+
-+/ {
-+ /* NB: "bpool-ethernet-seeds" is not set to avoid buffer seeding,
-+ * because apps seed these pools with buffers allocated at
-+ * run-time.
-+ * HOWEVER, the kernel driver requires the buffer-size so
-+ * "fsl,bpool-ethernet-cfg" is set. It also mis-interprets
-+ * things if the base-address is zero (hence the 0xdeadbeef
-+ * values).
-+ */
-+ bp7: buffer-pool@7 {
-+ compatible = "fsl,p2041-bpool", "fsl,bpool";
-+ fsl,bpid = <7>;
-+ fsl,bpool-ethernet-cfg = <0 0 0 192 0 0xdeadbeef>;
-+ fsl,bpool-thresholds = <0x400 0xc00 0x0 0x0>;
-+ };
-+ bp8: buffer-pool@8 {
-+ compatible = "fsl,p2041-bpool", "fsl,bpool";
-+ fsl,bpid = <8>;
-+ fsl,bpool-ethernet-cfg = <0 0 0 576 0 0xabbaf00d>;
-+ fsl,bpool-thresholds = <0x100 0x300 0x0 0x0>;
-+ };
-+ bp9: buffer-pool@9 {
-+ compatible = "fsl,p2041-bpool", "fsl,bpool";
-+ fsl,bpid = <9>;
-+ fsl,bpool-ethernet-cfg = <0 0 0 1728 0 0xfeedabba>;
-+ fsl,bpool-thresholds = <0x100 0x300 0x0 0x0>;
-+ };
-+
-+ fsl,dpaa {
-+ ethernet@0 {
-+ compatible = "fsl,p2041-dpa-ethernet-init", "fsl,dpa-ethernet-init";
-+ fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
-+ fsl,qman-frame-queues-rx = <0x50 1 0x51 1>;
-+ fsl,qman-frame-queues-tx = <0x70 1 0x71 1>;
-+ };
-+ ethernet@1 {
-+ compatible = "fsl,p2041-dpa-ethernet-init", "fsl,dpa-ethernet-init";
-+ fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
-+ fsl,qman-frame-queues-rx = <0x52 1 0x53 1>;
-+ fsl,qman-frame-queues-tx = <0x72 1 0x73 1>;
-+ };
-+ ethernet@2 {
-+ compatible = "fsl,p2041-dpa-ethernet-init", "fsl,dpa-ethernet-init";
-+ fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
-+ fsl,qman-frame-queues-rx = <0x54 1 0x55 1>;
-+ fsl,qman-frame-queues-tx = <0x74 1 0x75 1>;
-+ };
-+ ethernet@3 {
-+ compatible = "fsl,p2041-dpa-ethernet-init", "fsl,dpa-ethernet-init";
-+ fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
-+ fsl,qman-frame-queues-rx = <0x56 1 0x57 1>;
-+ fsl,qman-frame-queues-tx = <0x76 1 0x77 1>;
-+ };
-+ ethernet@4 {
-+ compatible = "fsl,p2041-dpa-ethernet-init", "fsl,dpa-ethernet-init";
-+ fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
-+ fsl,qman-frame-queues-rx = <0x58 1 0x59 1>;
-+ fsl,qman-frame-queues-tx = <0x78 1 0x79 1>;
-+ };
-+ ethernet@5 {
-+ compatible = "fsl,p2041-dpa-ethernet-init", "fsl,dpa-ethernet-init";
-+ fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
-+ fsl,qman-frame-queues-rx = <0x5a 1 0x5b 1>;
-+ fsl,qman-frame-queues-tx = <0x7a 1 0x7b 1>;
-+ };
-+ dpa-fman0-oh@1 {
-+ compatible = "fsl,dpa-oh";
-+ /* Define frame queues for the OH port*/
-+ /* */
-+ fsl,qman-frame-queues-oh = <0x68 1 0x69 1>;
-+ fsl,fman-oh-port = <&fman0_oh1>;
-+ };
-+ };
-+};
-diff --git a/arch/powerpc/boot/dts/p2041rdb.dts b/arch/powerpc/boot/dts/p2041rdb.dts
-index 79b6895..c712717 100644
---- a/arch/powerpc/boot/dts/p2041rdb.dts
-+++ b/arch/powerpc/boot/dts/p2041rdb.dts
-@@ -1,7 +1,7 @@
- /*
- * P2041RDB Device Tree Source
- *
-- * Copyright 2011 Freescale Semiconductor Inc.
-+ * Copyright 2011-2012 Freescale Semiconductor Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
-@@ -32,7 +32,7 @@
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
--/include/ "p2041si.dtsi"
-+/include/ "fsl/p2041si-pre.dtsi"
-
- / {
- model = "fsl,P2041RDB";
-@@ -41,6 +41,25 @@
- #size-cells = <2>;
- interrupt-parent = <&mpic>;
-
-+ aliases {
-+ ethernet0 = &enet0;
-+ ethernet1 = &enet1;
-+ ethernet2 = &enet2;
-+ ethernet3 = &enet3;
-+ ethernet4 = &enet4;
-+ ethernet5 = &enet5;
-+ phy_rgmii_0 = &phy_rgmii_0;
-+ phy_rgmii_1 = &phy_rgmii_1;
-+ phy_sgmii_2 = &phy_sgmii_2;
-+ phy_sgmii_3 = &phy_sgmii_3;
-+ phy_sgmii_4 = &phy_sgmii_4;
-+ phy_sgmii_1c = &phy_sgmii_1c;
-+ phy_sgmii_1d = &phy_sgmii_1d;
-+ phy_sgmii_1e = &phy_sgmii_1e;
-+ phy_sgmii_1f = &phy_sgmii_1f;
-+ phy_xgmii_2 = &phy_xgmii_2;
-+ };
-+
- memory {
- device_type = "memory";
- };
-@@ -49,7 +68,17 @@
- ranges = <0x00000000 0xf 0x00000000 0x01008000>;
- };
-
-+ bportals: bman-portals@ff4000000 {
-+ ranges = <0x0 0xf 0xf4000000 0x200000>;
-+ };
-+
-+ qportals: qman-portals@ff4200000 {
-+ ranges = <0x0 0xf 0xf4200000 0x200000>;
-+ };
-+
- soc: soc@ffe000000 {
-+ ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
-+ reg = <0xf 0xfe000000 0 0x00001000>;
- spi@110000 {
- flash@0 {
- #address-cells = <1>;
-@@ -92,6 +121,10 @@
- compatible = "pericom,pt7c4338";
- reg = <0x68>;
- };
-+ adt7461@4c {
-+ compatible = "adi,adt7461";
-+ reg = <0x4c>;
-+ };
- };
-
- i2c@118100 {
-@@ -104,11 +137,134 @@
- usb1: usb@211000 {
- dr_mode = "host";
- };
-+
-+ fman0: fman@400000 {
-+ enet0: ethernet@e0000 {
-+ tbi-handle = <&tbi0>;
-+ phy-handle = <&phy_sgmii_2>;
-+ phy-connection-type = "sgmii";
-+ };
-+
-+ mdio0: mdio@e1120 {
-+ tbi0: tbi-phy@8 {
-+ reg = <0x8>;
-+ device_type = "tbi-phy";
-+ };
-+
-+ phy_rgmii_0: ethernet-phy@0 {
-+ reg = <0x0>;
-+ };
-+ phy_rgmii_1: ethernet-phy@1 {
-+ reg = <0x1>;
-+ };
-+ phy_sgmii_2: ethernet-phy@2 {
-+ reg = <0x2>;
-+ };
-+ phy_sgmii_3: ethernet-phy@3 {
-+ reg = <0x3>;
-+ };
-+ phy_sgmii_4: ethernet-phy@4 {
-+ reg = <0x4>;
-+ };
-+ phy_sgmii_1c: ethernet-phy@1c {
-+ reg = <0x1c>;
-+ };
-+ phy_sgmii_1d: ethernet-phy@1d {
-+ reg = <0x1d>;
-+ };
-+ phy_sgmii_1e: ethernet-phy@1e {
-+ reg = <0x1e>;
-+ };
-+ phy_sgmii_1f: ethernet-phy@1f {
-+ reg = <0x1f>;
-+ };
-+ };
-+
-+ enet1: ethernet@e2000 {
-+ tbi-handle = <&tbi1>;
-+ phy-handle = <&phy_sgmii_3>;
-+ phy-connection-type = "sgmii";
-+ };
-+
-+ mdio@e3120 {
-+ tbi1: tbi-phy@8 {
-+ reg = <8>;
-+ device_type = "tbi-phy";
-+ };
-+ };
-+
-+ enet2: ethernet@e4000 {
-+ tbi-handle = <&tbi2>;
-+ phy-handle = <&phy_sgmii_4>;
-+ phy-connection-type = "sgmii";
-+ };
-+
-+ mdio@e5120 {
-+ tbi2: tbi-phy@8 {
-+ reg = <8>;
-+ device_type = "tbi-phy";
-+ };
-+ };
-+
-+ enet3: ethernet@e6000 {
-+ tbi-handle = <&tbi3>;
-+ phy-handle = <&phy_rgmii_1>;
-+ phy-connection-type = "rgmii";
-+ };
-+
-+ mdio@e7120 {
-+ tbi3: tbi-phy@8 {
-+ reg = <8>;
-+ device_type = "tbi-phy";
-+ };
-+ };
-+
-+ enet4: ethernet@e8000 {
-+ tbi-handle = <&tbi4>;
-+ phy-handle = <&phy_rgmii_0>;
-+ phy-connection-type = "rgmii";
-+ };
-+
-+ mdio@e9120 {
-+ tbi4: tbi-phy@8 {
-+ reg = <8>;
-+ device_type = "tbi-phy";
-+ };
-+ };
-+
-+ enet5: ethernet@f0000 {
-+ /*
-+ * phy-handle will be updated by U-Boot to
-+ * reflect the actual slot the XAUI card is in.
-+ */
-+ phy-handle = <&phy_xgmii_2>;
-+ phy-connection-type = "xgmii";
-+ };
-+
-+ mdio@f1000 {
-+ /* XAUI card in slot 2 */
-+ phy_xgmii_2: ethernet-phy@0 {
-+ reg = <0x0>;
-+ };
-+ };
-+ };
-+ };
-+
-+ rio: rapidio@ffe0c0000 {
-+ reg = <0xf 0xfe0c0000 0 0x11000>;
-+
-+ port1 {
-+ ranges = <0 0 0xc 0x20000000 0 0x10000000>;
-+ };
-+ port2 {
-+ ranges = <0 0 0xc 0x30000000 0 0x10000000>;
-+ };
- };
-
-- localbus@ffe124000 {
-+ lbc: localbus@ffe124000 {
- reg = <0xf 0xfe124000 0 0x1000>;
-- ranges = <0 0 0xf 0xe8000000 0x08000000>;
-+ ranges = <0 0 0xf 0xe8000000 0x08000000
-+ 1 0 0xf 0xffa00000 0x00040000>;
-
- flash@0,0 {
- compatible = "cfi-flash";
-@@ -116,6 +272,44 @@
- bank-width = <2>;
- device-width = <2>;
- };
-+
-+ nand@1,0 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "fsl,elbc-fcm-nand";
-+ reg = <0x1 0x0 0x40000>;
-+
-+ partition@0 {
-+ label = "NAND U-Boot Image";
-+ reg = <0x0 0x02000000>;
-+ read-only;
-+ };
-+
-+ partition@2000000 {
-+ label = "NAND Root File System";
-+ reg = <0x02000000 0x10000000>;
-+ };
-+
-+ partition@12000000 {
-+ label = "NAND Compressed RFS Image";
-+ reg = <0x12000000 0x08000000>;
-+ };
-+
-+ partition@1a000000 {
-+ label = "NAND Linux Kernel Image";
-+ reg = <0x1a000000 0x04000000>;
-+ };
-+
-+ partition@1e000000 {
-+ label = "NAND DTB Image";
-+ reg = <0x1e000000 0x01000000>;
-+ };
-+
-+ partition@1f000000 {
-+ label = "NAND Writable User area";
-+ reg = <0x1f000000 0x01000000>;
-+ };
-+ };
- };
-
- pci0: pcie@ffe200000 {
-@@ -162,4 +356,37 @@
- 0 0x00010000>;
- };
- };
-+
-+ fsl,dpaa {
-+ compatible = "fsl,p2041-dpaa", "fsl,dpaa";
-+
-+ ethernet@0 {
-+ compatible = "fsl,p2041-dpa-ethernet", "fsl,dpa-ethernet";
-+ fsl,fman-mac = <&enet0>;
-+ };
-+ ethernet@1 {
-+ compatible = "fsl,p2041-dpa-ethernet", "fsl,dpa-ethernet";
-+ fsl,fman-mac = <&enet1>;
-+ };
-+ ethernet@2 {
-+ compatible = "fsl,p2041-dpa-ethernet", "fsl,dpa-ethernet";
-+ fsl,fman-mac = <&enet2>;
-+ };
-+ ethernet@3 {
-+ compatible = "fsl,p2041-dpa-ethernet", "fsl,dpa-ethernet";
-+ fsl,fman-mac = <&enet3>;
-+ };
-+ ethernet@4 {
-+ compatible = "fsl,p2041-dpa-ethernet", "fsl,dpa-ethernet";
-+ fsl,fman-mac = <&enet4>;
-+ };
-+ ethernet@5 {
-+ compatible = "fsl,p2041-dpa-ethernet", "fsl,dpa-ethernet";
-+ fsl,fman-mac = <&enet5>;
-+ };
-+ };
- };
-+
-+/include/ "fsl/p2041si-post.dtsi"
-+
-+/include/ "fsl/qoriq-dpaa-res1.dtsi"
-diff --git a/arch/powerpc/configs/corenet32_smp_defconfig b/arch/powerpc/configs/corenet32_smp_defconfig
-index f087de6..fc5ece3 100644
---- a/arch/powerpc/configs/corenet32_smp_defconfig
-+++ b/arch/powerpc/configs/corenet32_smp_defconfig
-@@ -26,17 +26,21 @@ CONFIG_P3041_DS=y
- CONFIG_P3060_QDS=y
- CONFIG_P4080_DS=y
- CONFIG_P5020_DS=y
-+CONFIG_P5040_DS=y
- CONFIG_HIGHMEM=y
- CONFIG_NO_HZ=y
- CONFIG_HIGH_RES_TIMERS=y
- # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
- CONFIG_BINFMT_MISC=m
- CONFIG_KEXEC=y
-+CONFIG_IRQ_ALL_CPUS=y
- CONFIG_FORCE_MAX_ZONEORDER=13
- CONFIG_FSL_LBC=y
-+CONFIG_FSL_PAMU=y
- CONFIG_PCI=y
- CONFIG_PCIEPORTBUS=y
- # CONFIG_PCIEASPM is not set
-+CONFIG_PCI_MSI=y
- CONFIG_NET=y
- CONFIG_PACKET=y
- CONFIG_UNIX=y
-@@ -67,6 +71,7 @@ CONFIG_INET_IPCOMP=y
- CONFIG_IPV6=y
- CONFIG_IP_SCTP=m
- CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-+CONFIG_DEVTMPFS=y
- CONFIG_MTD=y
- CONFIG_MTD_CMDLINE_PARTS=y
- CONFIG_MTD_CHAR=y
-@@ -78,7 +83,7 @@ CONFIG_MTD_M25P80=y
- CONFIG_PROC_DEVICETREE=y
- CONFIG_BLK_DEV_LOOP=y
- CONFIG_BLK_DEV_RAM=y
--CONFIG_BLK_DEV_RAM_SIZE=131072
-+CONFIG_BLK_DEV_RAM_SIZE=262144
- CONFIG_MISC_DEVICES=y
- CONFIG_BLK_DEV_SD=y
- CONFIG_CHR_DEV_ST=y
-@@ -93,13 +98,18 @@ CONFIG_SATA_FSL=y
- CONFIG_SATA_SIL24=y
- CONFIG_SATA_SIL=y
- CONFIG_PATA_SIL680=y
-+CONFIG_MD=y
-+CONFIG_BLK_DEV_MD=y
-+# CONFIG_MD_AUTODETECT is not set
-+CONFIG_MD_RAID456=y
-+CONFIG_MULTICORE_RAID456=y
- CONFIG_NETDEVICES=y
--CONFIG_VITESSE_PHY=y
- CONFIG_FIXED_PHY=y
- CONFIG_NET_ETHERNET=y
- CONFIG_E1000=y
- CONFIG_E1000E=y
- CONFIG_FSL_PQ_MDIO=y
-+CONFIG_DPA=y
- # CONFIG_INPUT_MOUSEDEV is not set
- # CONFIG_INPUT_KEYBOARD is not set
- # CONFIG_INPUT_MOUSE is not set
-@@ -133,16 +143,25 @@ CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
- CONFIG_USB_STORAGE=y
- CONFIG_MMC=y
- CONFIG_MMC_SDHCI=y
-+CONFIG_MMC_SDHCI_OF=y
-+CONFIG_MMC_SDHCI_OF_ESDHC=y
- CONFIG_EDAC=y
- CONFIG_EDAC_MM_EDAC=y
- CONFIG_EDAC_MPC85XX=y
- CONFIG_RTC_CLASS=y
-+CONFIG_RTC_DRV_DS1307=y
- CONFIG_RTC_DRV_DS3232=y
- CONFIG_RTC_DRV_CMOS=y
-+CONFIG_DMADEVICES=y
-+CONFIG_FSL_RAID=y
-+CONFIG_ASYNC_TX_DMA=y
- CONFIG_UIO=y
-+CONFIG_UIO_FSL_SRIO=y
-+CONFIG_UIO_FSL_DMA=y
- CONFIG_STAGING=y
- CONFIG_VIRT_DRIVERS=y
- CONFIG_FSL_HV_MANAGER=y
-+CONFIG_FMAN_RESOURCE_ALLOCATION_ALGORITHM=y
- CONFIG_EXT2_FS=y
- CONFIG_EXT3_FS=y
- # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
-@@ -167,6 +186,7 @@ CONFIG_MAC_PARTITION=y
- CONFIG_NLS_ISO8859_1=y
- CONFIG_NLS_UTF8=m
- CONFIG_MAGIC_SYSRQ=y
-+CONFIG_DEBUG_KERNEL=y
- CONFIG_DEBUG_SHIRQ=y
- CONFIG_DETECT_HUNG_TASK=y
- CONFIG_DEBUG_INFO=y
-diff --git a/arch/powerpc/include/asm/fsl_guts.h b/arch/powerpc/include/asm/fsl_guts.h
-index bebd124..a9a85ef 100644
---- a/arch/powerpc/include/asm/fsl_guts.h
-+++ b/arch/powerpc/include/asm/fsl_guts.h
-@@ -85,7 +85,9 @@ struct ccsr_guts_86xx {
- u8 res0c4[0x224 - 0xc4];
- __be32 iodelay1; /* 0x.0224 - IO delay control register 1 */
- __be32 iodelay2; /* 0x.0228 - IO delay control register 2 */
-- u8 res22c[0x800 - 0x22c];
-+ u8 res22c[0x604 - 0x22c];
-+ __be32 pamubypenr; /* 0x.0604 - PAMU bypass enable register */
-+ u8 res608[0x800 - 0x608];
- __be32 clkdvdr; /* 0x.0800 - Clock Divide Register */
- u8 res804[0x900 - 0x804];
- __be32 ircr; /* 0x.0900 - Infrared Control Register */
-diff --git a/arch/powerpc/include/asm/fsl_hcalls.h b/arch/powerpc/include/asm/fsl_hcalls.h
-index 922d9b5..7e0b5b7 100644
---- a/arch/powerpc/include/asm/fsl_hcalls.h
-+++ b/arch/powerpc/include/asm/fsl_hcalls.h
-@@ -45,7 +45,7 @@
- #include
- #include
-
--#define FH_API_VERSION 1
-+#define FH_API_VERSION 3
-
- #define FH_ERR_GET_INFO 1
- #define FH_PARTITION_GET_DTPROP 2
-@@ -65,6 +65,8 @@
- #define FH_EXIT_NAP 16
- #define FH_CLAIM_DEVICE 17
- #define FH_PARTITION_STOP_DMA 18
-+#define FH_DMA_ATTR_SET 19
-+#define FH_DMA_ATTR_GET 20
-
- /* vendor ID: Freescale Semiconductor */
- #define FH_HCALL_TOKEN(num) _EV_HCALL_TOKEN(EV_FSL_VENDOR_ID, num)
-@@ -652,4 +654,80 @@ static inline unsigned int fh_partition_stop_dma(unsigned int handle)
-
- return r3;
- }
-+
-+#define FSL_PAMU_ATTR_STASH 2
-+
-+struct fh_dma_attr_stash {
-+ uint32_t vcpu; /* vcpu number */
-+ uint32_t cache; /* cache to stash to: 1=L1, 2=L2, 3=L3 */
-+};
-+
-+/**
-+ * fh_dma_attr_set - configure a DMA window
-+ * @handle: value from fsl,hv-device-handle property
-+ * @attr_name: the FSL_PAMU_ATTR_xxx attribute to change
-+ * @attr_address: the physical address of the attribute structure
-+ *
-+ * FSL_PAMU_ATTR_STASH: Configure the target CPU and cache level for stashing
-+ *
-+ * Returns 0 for success, or an error code.
-+ */
-+static inline unsigned int fh_dma_attr_set(unsigned int handle,
-+ unsigned int attr_name, phys_addr_t attr_address)
-+{
-+ register uintptr_t r11 __asm__("r11");
-+ register uintptr_t r3 __asm__("r3");
-+ register uintptr_t r4 __asm__("r4");
-+ register uintptr_t r5 __asm__("r5");
-+ register uintptr_t r6 __asm__("r6");
-+
-+ r11 = FH_HCALL_TOKEN(FH_DMA_ATTR_SET);
-+ r3 = handle;
-+ r4 = attr_name;
-+ r5 = (uint64_t)attr_address >> 32;
-+ r6 = (uint32_t)attr_address;
-+
-+ __asm__ __volatile__ ("sc 1"
-+ : "+r" (r11),
-+ "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
-+ : : EV_HCALL_CLOBBERS4
-+ );
-+
-+ return r3;
-+}
-+
-+/**
-+ * fh_dma_attr_get - query the DMA window configuration
-+ * @handle: value from fsl,hv-device-handle property
-+ * @attr_name: the FSL_PAMU_ATTR_xxx attribute to change
-+ * @attr_address: the physical address of the attribute structure
-+ *
-+ * FSL_PAMU_ATTR_STASH: Query the target CPU and cache level for stashing
-+ *
-+ * Returns 0 for success, or an error code.
-+ */
-+static inline unsigned int fh_dma_attr_get(unsigned int handle,
-+ unsigned int attr_name, phys_addr_t attr_address)
-+{
-+ register uintptr_t r11 __asm__("r11");
-+ register uintptr_t r3 __asm__("r3");
-+ register uintptr_t r4 __asm__("r4");
-+ register uintptr_t r5 __asm__("r5");
-+ register uintptr_t r6 __asm__("r6");
-+
-+ r11 = FH_HCALL_TOKEN(FH_DMA_ATTR_GET);
-+ r3 = handle;
-+ r4 = attr_name;
-+ r5 = (uint64_t)attr_address >> 32;
-+ r6 = (uint32_t)attr_address;
-+
-+ __asm__ __volatile__ ("sc 1"
-+ : "+r" (r11),
-+ "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
-+ : : EV_HCALL_CLOBBERS4
-+ );
-+
-+ return r3;
-+}
-+
- #endif
-diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h
-index 88b0bd9..bc52378 100644
---- a/arch/powerpc/include/asm/pgtable.h
-+++ b/arch/powerpc/include/asm/pgtable.h
-@@ -172,6 +172,9 @@ extern int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long addre
-
- #define pgprot_writecombine pgprot_noncached_wc
-
-+#define pgprot_cached_noncoherent(prot) \
-+ (__pgprot(pgprot_val(prot) & ~_PAGE_CACHE_CTL))
-+
- struct file;
- extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
- unsigned long size, pgprot_t vma_prot);
-diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
-index d7946be..b9a2559 100644
---- a/arch/powerpc/platforms/85xx/Kconfig
-+++ b/arch/powerpc/platforms/85xx/Kconfig
-@@ -181,6 +181,8 @@ config P2041_RDB
- select GPIO_MPC8XXX
- select HAS_RAPIDIO
- select PPC_EPAPR_HV_PIC
-+ select HAS_FSL_PAMU
-+ select HAS_FSL_QBMAN
- help
- This option enables support for the P2041 RDB board
-
-@@ -194,6 +196,9 @@ config P3041_DS
- select GPIO_MPC8XXX
- select HAS_RAPIDIO
- select PPC_EPAPR_HV_PIC
-+ select HAS_FSL_PAMU
-+ select HAS_FSL_QBMAN
-+ select FSL_HYDRA_DS_MDIO if PHYLIB
- help
- This option enables support for the P3041 DS board
-
-@@ -235,6 +240,9 @@ config P5020_DS
- select GPIO_MPC8XXX
- select HAS_RAPIDIO
- select PPC_EPAPR_HV_PIC
-+ select HAS_FSL_PAMU
-+ select HAS_FSL_QBMAN
-+ select FSL_HYDRA_DS_MDIO if PHYLIB
- help
- This option enables support for the P5020 DS board
-
-diff --git a/arch/powerpc/platforms/85xx/corenet_ds.c b/arch/powerpc/platforms/85xx/corenet_ds.c
-index 802ad11..5b6aebf 100644
---- a/arch/powerpc/platforms/85xx/corenet_ds.c
-+++ b/arch/powerpc/platforms/85xx/corenet_ds.c
-@@ -112,6 +112,12 @@ static const struct of_device_id of_device_ids[] __devinitconst = {
- .compatible = "simple-bus"
- },
- {
-+ .compatible = "fsl,dpaa"
-+ },
-+ {
-+ .compatible = "fsl,srio"
-+ },
-+ {
- .compatible = "fsl,rapidio-delta",
- },
- {
-@@ -134,3 +140,32 @@ int __init corenet_ds_publish_devices(void)
- {
- return of_platform_bus_probe(NULL, of_device_ids, NULL);
- }
-+
-+/* Early setup is required for large chunks of contiguous (and coarsely-aligned)
-+ * memory. The following shoe-horns Qman/Bman "init_early" calls into the
-+ * platform setup to let them parse their CCSR nodes early on. */
-+#ifdef CONFIG_FSL_QMAN_CONFIG
-+void __init qman_init_early(void);
-+#endif
-+#ifdef CONFIG_FSL_BMAN_CONFIG
-+void __init bman_init_early(void);
-+#endif
-+#ifdef CONFIG_FSL_PME2_CTRL
-+void __init pme2_init_early(void);
-+#endif
-+
-+__init void corenet_ds_init_early(void)
-+{
-+#ifdef CONFIG_FSL_QMAN_CONFIG
-+ qman_init_early();
-+#endif
-+#ifdef CONFIG_FSL_BMAN_CONFIG
-+ bman_init_early();
-+#endif
-+#ifdef CONFIG_FSL_PME2_CTRL
-+ pme2_init_early();
-+#endif
-+#ifdef CONFIG_FSL_USDPAA
-+ fsl_usdpaa_init_early();
-+#endif
-+}
-diff --git a/arch/powerpc/platforms/85xx/corenet_ds.h b/arch/powerpc/platforms/85xx/corenet_ds.h
-index ddd700b..a5b63c6 100644
---- a/arch/powerpc/platforms/85xx/corenet_ds.h
-+++ b/arch/powerpc/platforms/85xx/corenet_ds.h
-@@ -15,5 +15,6 @@
- extern void __init corenet_ds_pic_init(void);
- extern void __init corenet_ds_setup_arch(void);
- extern int __init corenet_ds_publish_devices(void);
-+extern void __init corenet_ds_init_early(void);
-
- #endif
-diff --git a/arch/powerpc/platforms/85xx/p2041_rdb.c b/arch/powerpc/platforms/85xx/p2041_rdb.c
-index eda6ed5..595670e 100644
---- a/arch/powerpc/platforms/85xx/p2041_rdb.c
-+++ b/arch/powerpc/platforms/85xx/p2041_rdb.c
-@@ -79,6 +79,7 @@ define_machine(p2041_rdb) {
- .calibrate_decr = generic_calibrate_decr,
- .progress = udbg_progress,
- .power_save = e500_idle,
-+ .init_early = corenet_ds_init_early,
- };
-
- machine_device_initcall(p2041_rdb, corenet_ds_publish_devices);
-diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
-index 84e1325..94aa06f 100644
---- a/arch/powerpc/sysdev/Makefile
-+++ b/arch/powerpc/sysdev/Makefile
-@@ -18,6 +18,7 @@ obj-$(CONFIG_FSL_PCI) += fsl_pci.o $(fsl-msi-obj-y)
- obj-$(CONFIG_FSL_PMC) += fsl_pmc.o
- obj-$(CONFIG_FSL_LBC) += fsl_lbc.o
- obj-$(CONFIG_FSL_GTM) += fsl_gtm.o
-+obj-$(CONFIG_FSL_PAMU) += fsl_pamu.o
- obj-$(CONFIG_FSL_85XX_CACHE_SRAM) += fsl_85xx_l2ctlr.o fsl_85xx_cache_sram.o
- obj-$(CONFIG_SIMPLE_GPIO) += simple_gpio.o
- obj-$(CONFIG_FSL_RIO) += fsl_rio.o
-diff --git a/arch/powerpc/sysdev/fsl_pamu.c b/arch/powerpc/sysdev/fsl_pamu.c
-new file mode 100644
-index 0000000..a9e9fc7
---- /dev/null
-+++ b/arch/powerpc/sysdev/fsl_pamu.c
-@@ -0,0 +1,1431 @@
-+/* Copyright (c) 2008-2012 Freescale Semiconductor, Inc.
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "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 Freescale Semiconductor 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.
-+ */
-+
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+
-+/* PAMU CCSR space */
-+#define PAMU_PGC 0x00000000 /* Allows all peripheral accesses */
-+#define PAMU_PE 0x40000000 /* enable PAMU */
-+
-+/* PAMU_OFFSET to the next pamu space in ccsr */
-+#define PAMU_OFFSET 0x1000
-+
-+#define PAMU_MMAP_REGS_BASE 0
-+
-+struct pamu_mmap_regs {
-+ u32 ppbah;
-+ u32 ppbal;
-+ u32 pplah;
-+ u32 pplal;
-+ u32 spbah;
-+ u32 spbal;
-+ u32 splah;
-+ u32 splal;
-+ u32 obah;
-+ u32 obal;
-+ u32 olah;
-+ u32 olal;
-+};
-+
-+/* PAMU Error Registers */
-+#define PAMU_POES1 0x0040
-+#define PAMU_POES2 0x0044
-+#define PAMU_POEAH 0x0048
-+#define PAMU_POEAL 0x004C
-+#define PAMU_AVS1 0x0050
-+#define PAMU_AVS1_AV 0x1
-+#define PAMU_AVS1_OTV 0x6
-+#define PAMU_AVS1_APV 0x78
-+#define PAMU_AVS1_WAV 0x380
-+#define PAMU_AVS1_LAV 0x1c00
-+#define PAMU_AVS1_GCV 0x2000
-+#define PAMU_AVS1_PDV 0x4000
-+#define PAMU_AV_MASK (PAMU_AVS1_AV | PAMU_AVS1_OTV | PAMU_AVS1_APV | \
-+ PAMU_AVS1_WAV | PAMU_AVS1_LAV | PAMU_AVS1_GCV | \
-+ PAMU_AVS1_PDV)
-+#define PAMU_AVS1_LIODN_SHIFT 16
-+#define PAMU_LAV_LIODN_NOT_IN_PPAACT 0x400
-+
-+#define PAMU_AVS2 0x0054
-+#define PAMU_AVAH 0x0058
-+#define PAMU_AVAL 0x005C
-+#define PAMU_EECTL 0x0060
-+#define PAMU_EEDIS 0x0064
-+#define PAMU_EEINTEN 0x0068
-+#define PAMU_EEDET 0x006C
-+#define PAMU_EEATTR 0x0070
-+#define PAMU_EEAHI 0x0074
-+#define PAMU_EEALO 0x0078
-+#define PAMU_EEDHI 0X007C
-+#define PAMU_EEDLO 0x0080
-+#define PAMU_EECC 0x0084
-+#define PAMU_UDAD 0x0090
-+
-+/* PAMU Revision Registers */
-+#define PAMU_PR1 0x0BF8
-+#define PAMU_PR2 0x0BFC
-+
-+/* PAMU Capabilities Registers */
-+#define PAMU_PC1 0x0C00
-+#define PAMU_PC2 0x0C04
-+#define PAMU_PC3 0x0C08
-+#define PAMU_PC4 0x0C0C
-+
-+/* PAMU Control Register */
-+#define PAMU_PC 0x0C10
-+
-+/* PAMU control defs */
-+#define PAMU_CONTROL 0x0C10
-+#define PAMU_PC_PGC 0x80000000 /* 1 = PAMU Gate Closed : block all
-+peripheral access, 0 : may allow peripheral access */
-+
-+#define PAMU_PC_PE 0x40000000 /* 0 = PAMU disabled, 1 = PAMU enabled */
-+#define PAMU_PC_SPCC 0x00000010 /* sPAACE cache enable */
-+#define PAMU_PC_PPCC 0x00000001 /* pPAACE cache enable */
-+#define PAMU_PC_OCE 0x00001000 /* OMT cache enable */
-+
-+#define PAMU_PFA1 0x0C14
-+#define PAMU_PFA2 0x0C18
-+
-+/* PAMU Interrupt control and Status Register */
-+#define PAMU_PICS 0x0C1C
-+#define PAMU_ACCESS_VIOLATION_STAT 0x8
-+#define PAMU_ACCESS_VIOLATION_ENABLE 0x4
-+
-+/* PAMU Debug Registers */
-+#define PAMU_PD1 0x0F00
-+#define PAMU_PD2 0x0F04
-+#define PAMU_PD3 0x0F08
-+#define PAMU_PD4 0x0F0C
-+
-+#define PAACE_AP_PERMS_DENIED 0x0
-+#define PAACE_AP_PERMS_QUERY 0x1
-+#define PAACE_AP_PERMS_UPDATE 0x2
-+#define PAACE_AP_PERMS_ALL 0x3
-+#define PAACE_DD_TO_HOST 0x0
-+#define PAACE_DD_TO_IO 0x1
-+#define PAACE_PT_PRIMARY 0x0
-+#define PAACE_PT_SECONDARY 0x1
-+#define PAACE_V_INVALID 0x0
-+#define PAACE_V_VALID 0x1
-+#define PAACE_MW_SUBWINDOWS 0x1
-+
-+#define PAACE_WSE_4K 0xB
-+#define PAACE_WSE_8K 0xC
-+#define PAACE_WSE_16K 0xD
-+#define PAACE_WSE_32K 0xE
-+#define PAACE_WSE_64K 0xF
-+#define PAACE_WSE_128K 0x10
-+#define PAACE_WSE_256K 0x11
-+#define PAACE_WSE_512K 0x12
-+#define PAACE_WSE_1M 0x13
-+#define PAACE_WSE_2M 0x14
-+#define PAACE_WSE_4M 0x15
-+#define PAACE_WSE_8M 0x16
-+#define PAACE_WSE_16M 0x17
-+#define PAACE_WSE_32M 0x18
-+#define PAACE_WSE_64M 0x19
-+#define PAACE_WSE_128M 0x1A
-+#define PAACE_WSE_256M 0x1B
-+#define PAACE_WSE_512M 0x1C
-+#define PAACE_WSE_1G 0x1D
-+#define PAACE_WSE_2G 0x1E
-+#define PAACE_WSE_4G 0x1F
-+
-+#define PAACE_DID_PCI_EXPRESS_1 0x00
-+#define PAACE_DID_PCI_EXPRESS_2 0x01
-+#define PAACE_DID_PCI_EXPRESS_3 0x02
-+#define PAACE_DID_PCI_EXPRESS_4 0x03
-+#define PAACE_DID_LOCAL_BUS 0x04
-+#define PAACE_DID_SRIO 0x0C
-+#define PAACE_DID_MEM_1 0x10
-+#define PAACE_DID_MEM_2 0x11
-+#define PAACE_DID_MEM_3 0x12
-+#define PAACE_DID_MEM_4 0x13
-+#define PAACE_DID_MEM_1_2 0x14
-+#define PAACE_DID_MEM_3_4 0x15
-+#define PAACE_DID_MEM_1_4 0x16
-+#define PAACE_DID_BM_SW_PORTAL 0x18
-+#define PAACE_DID_PAMU 0x1C
-+#define PAACE_DID_CAAM 0x21
-+#define PAACE_DID_QM_SW_PORTAL 0x3C
-+#define PAACE_DID_CORE0_INST 0x80
-+#define PAACE_DID_CORE0_DATA 0x81
-+#define PAACE_DID_CORE1_INST 0x82
-+#define PAACE_DID_CORE1_DATA 0x83
-+#define PAACE_DID_CORE2_INST 0x84
-+#define PAACE_DID_CORE2_DATA 0x85
-+#define PAACE_DID_CORE3_INST 0x86
-+#define PAACE_DID_CORE3_DATA 0x87
-+#define PAACE_DID_CORE4_INST 0x88
-+#define PAACE_DID_CORE4_DATA 0x89
-+#define PAACE_DID_CORE5_INST 0x8A
-+#define PAACE_DID_CORE5_DATA 0x8B
-+#define PAACE_DID_CORE6_INST 0x8C
-+#define PAACE_DID_CORE6_DATA 0x8D
-+#define PAACE_DID_CORE7_INST 0x8E
-+#define PAACE_DID_CORE7_DATA 0x8F
-+#define PAACE_DID_BROADCAST 0xFF
-+
-+#define PAACE_ATM_NO_XLATE 0x00
-+#define PAACE_ATM_WINDOW_XLATE 0x01
-+#define PAACE_ATM_PAGE_XLATE 0x02
-+#define PAACE_ATM_WIN_PG_XLATE (PAACE_ATM_WINDOW_XLATE | PAACE_ATM_PAGE_XLATE)
-+#define PAACE_OTM_NO_XLATE 0x00
-+#define PAACE_OTM_IMMEDIATE 0x01
-+#define PAACE_OTM_INDEXED 0x02
-+#define PAACE_OTM_RESERVED 0x03
-+
-+#define PAACE_M_COHERENCE_REQ 0x01
-+
-+#define PAACE_TCEF_FORMAT0_8B 0x00
-+#define PAACE_TCEF_FORMAT1_RSVD 0x01
-+
-+#define PAACE_NUMBER_ENTRIES 0x500
-+
-+#define OME_NUMBER_ENTRIES 16 /* based on P4080 2.0 silicon plan */
-+
-+/* PAMU Data Structures */
-+
-+struct ppaace {
-+ /* PAACE Offset 0x00 */
-+ /* Window Base Address */
-+ u32 wbah;
-+ unsigned int wbal:20;
-+ /* Window Size, 2^(N+1), N must be > 10 */
-+ unsigned int wse:6;
-+ /* 1 Means there are secondary windows, wce is count */
-+ unsigned int mw:1;
-+ /* Permissions, see PAACE_AP_PERMS_* defines */
-+ unsigned int ap:2;
-+ /*
-+ * Destination Domain, see PAACE_DD_* defines,
-+ * defines data structure reference for ingress ops into
-+ * host/coherency domain or ingress ops into I/O domain
-+ */
-+ unsigned int dd:1;
-+ /* PAACE Type, see PAACE_PT_* defines */
-+ unsigned int pt:1;
-+ /* PAACE Valid, 0 is invalid */
-+ unsigned int v:1;
-+
-+ /* PAACE Offset 0x08 */
-+ /* Interpretation of first 32 bits dependent on DD above */
-+ union {
-+ struct {
-+ /* Destination ID, see PAACE_DID_* defines */
-+ u8 did;
-+ /* Partition ID */
-+ u8 pid;
-+ /* Snoop ID */
-+ u8 snpid;
-+ unsigned int coherency_required:1;
-+ unsigned int reserved:7;
-+ } to_host;
-+ struct {
-+ /* Destination ID, see PAACE_DID_* defines */
-+ u8 did;
-+ unsigned int __reserved:24;
-+ } to_io;
-+ } __packed domain_attr;
-+ /* Implementation attributes */
-+ struct {
-+ unsigned int reserved1:8;
-+ unsigned int cid:8;
-+ unsigned int reserved2:8;
-+ } __packed impl_attr;
-+ /* Window Count; 2^(N+1) sub-windows; only valid for primary PAACE */
-+ unsigned int wce:4;
-+ /* Address translation mode, see PAACE_ATM_* defines */
-+ unsigned int atm:2;
-+ /* Operation translation mode, see PAACE_OTM_* defines */
-+ unsigned int otm:2;
-+
-+ /* PAACE Offset 0x10 */
-+ /* Translated window base address */
-+ u32 twbah;
-+ unsigned int twbal:20;
-+ /* Subwindow size encoding; 2^(N+1), N > 10 */
-+ unsigned int swse:6;
-+ unsigned int reserved4:6;
-+
-+ /* PAACE Offset 0x18 */
-+ u32 fspi;
-+ union {
-+ struct {
-+ u8 ioea;
-+ u8 moea;
-+ u8 ioeb;
-+ u8 moeb;
-+ } immed_ot;
-+ struct {
-+ u16 reserved;
-+ u16 omi;
-+ } index_ot;
-+ } __packed op_encode;
-+
-+ /* PAACE Offset 0x20 */
-+ u32 sbah;
-+ unsigned int sbal:20;
-+ unsigned int sse:6;
-+ unsigned int reserved5:6;
-+
-+ /* PAACE Offset 0x28 */
-+ u32 tctbah;
-+ unsigned int tctbal:20;
-+ unsigned int pse:6;
-+ unsigned int tcef:1;
-+ unsigned int reserved6:5;
-+
-+ /* PAACE Offset 0x30 */
-+ u32 reserved7[2];
-+
-+ /* PAACE Offset 0x38 */
-+ u32 reserved8[2];
-+} __packed ppaace;
-+
-+/* MOE : Mapped Operation Encodings */
-+#define NUM_MOE 128
-+struct ome {
-+ u8 moe[NUM_MOE];
-+} __packed ome;
-+
-+/*
-+ * The Primary Peripheral Access Authorization and Control Table
-+ *
-+ * To keep things simple, we use one shared PPAACT for all PAMUs. This means
-+ * that LIODNs must be unique across all PAMUs.
-+ */
-+static struct ppaace *ppaact;
-+static phys_addr_t ppaact_phys;
-+
-+/* TRUE if we're running under the Freescale hypervisor */
-+bool has_fsl_hypervisor;
-+
-+#define PAACT_SIZE (sizeof(struct ppaace) * PAACE_NUMBER_ENTRIES)
-+#define OMT_SIZE (sizeof(struct ome) * OME_NUMBER_ENTRIES)
-+
-+#define IOE_READ 0x00
-+#define IOE_READ_IDX 0x00
-+#define IOE_WRITE 0x81
-+#define IOE_WRITE_IDX 0x01
-+#define IOE_EREAD0 0x82 /* Enhanced read type 0 */
-+#define IOE_EREAD0_IDX 0x02 /* Enhanced read type 0 */
-+#define IOE_EWRITE0 0x83 /* Enhanced write type 0 */
-+#define IOE_EWRITE0_IDX 0x03 /* Enhanced write type 0 */
-+#define IOE_DIRECT0 0x84 /* Directive type 0 */
-+#define IOE_DIRECT0_IDX 0x04 /* Directive type 0 */
-+#define IOE_EREAD1 0x85 /* Enhanced read type 1 */
-+#define IOE_EREAD1_IDX 0x05 /* Enhanced read type 1 */
-+#define IOE_EWRITE1 0x86 /* Enhanced write type 1 */
-+#define IOE_EWRITE1_IDX 0x06 /* Enhanced write type 1 */
-+#define IOE_DIRECT1 0x87 /* Directive type 1 */
-+#define IOE_DIRECT1_IDX 0x07 /* Directive type 1 */
-+#define IOE_RAC 0x8c /* Read with Atomic clear */
-+#define IOE_RAC_IDX 0x0c /* Read with Atomic clear */
-+#define IOE_RAS 0x8d /* Read with Atomic set */
-+#define IOE_RAS_IDX 0x0d /* Read with Atomic set */
-+#define IOE_RAD 0x8e /* Read with Atomic decrement */
-+#define IOE_RAD_IDX 0x0e /* Read with Atomic decrement */
-+#define IOE_RAI 0x8f /* Read with Atomic increment */
-+#define IOE_RAI_IDX 0x0f /* Read with Atomic increment */
-+
-+#define EOE_READ 0x00
-+#define EOE_WRITE 0x01
-+#define EOE_RAC 0x0c /* Read with Atomic clear */
-+#define EOE_RAS 0x0d /* Read with Atomic set */
-+#define EOE_RAD 0x0e /* Read with Atomic decrement */
-+#define EOE_RAI 0x0f /* Read with Atomic increment */
-+#define EOE_LDEC 0x10 /* Load external cache */
-+#define EOE_LDECL 0x11 /* Load external cache with stash lock */
-+#define EOE_LDECPE 0x12 /* Load ext. cache with preferred exclusive */
-+#define EOE_LDECPEL 0x13 /* Load ext. cache w/ preferred excl. & lock */
-+#define EOE_LDECFE 0x14 /* Load external cache with forced exclusive */
-+#define EOE_LDECFEL 0x15 /* Load ext. cache w/ forced excl. & lock */
-+#define EOE_RSA 0x16 /* Read with stash allocate */
-+#define EOE_RSAU 0x17 /* Read with stash allocate and unlock */
-+#define EOE_READI 0x18 /* Read with invalidate */
-+#define EOE_RWNITC 0x19 /* Read with no intention to cache */
-+#define EOE_WCI 0x1a /* Write cache inhibited */
-+#define EOE_WWSA 0x1b /* Write with stash allocate */
-+#define EOE_WWSAL 0x1c /* Write with stash allocate and lock */
-+#define EOE_WWSAO 0x1d /* Write with stash allocate only */
-+#define EOE_WWSAOL 0x1e /* Write with stash allocate only and lock */
-+#define EOE_VALID 0x80
-+
-+/* define indexes for each operation mapping scenario */
-+#define OMI_QMAN 0x00
-+#define OMI_FMAN 0x01
-+#define OMI_QMAN_PRIV 0x02
-+#define OMI_CAAM 0x03
-+
-+/*
-+ * Return the Nth integer of a given property in a given node
-+ *
-+ * 'index' is the index into the property (e.g. 'N').
-+ * 'property' is the name of the property.
-+ *
-+ * This function assumes the value of the property is <= INT_MAX. A negative
-+ * return value indicates an error.
-+ */
-+static int of_read_indexed_number(struct device_node *node,
-+ const char *property, unsigned int index)
-+{
-+ const u32 *prop;
-+ int value;
-+ int len;
-+
-+ prop = of_get_property(node, property, &len);
-+ if (!prop || (len % sizeof(uint32_t)))
-+ return -ENODEV;
-+
-+ if (index >= (len / sizeof(uint32_t)))
-+ return -EINVAL;
-+
-+ value = be32_to_cpu(prop[index]);
-+
-+ return value;
-+}
-+
-+/**
-+ * pamu_set_stash_dest() - set the stash target for a given LIODN
-+ * @liodn: LIODN to set
-+ * @cache_level: target cache level (1, 2, or 3)
-+ * @cpu: target CPU (0, 1, 2, etc)
-+ *
-+ * This function sets the stash target for a given LIODN, assuming that the
-+ * PAACE entry for that LIODN is already configured.
-+ *
-+ * The function returns 0 on success, or a negative error code on failure.
-+ */
-+int pamu_set_stash_dest(struct device_node *node, unsigned int index,
-+ unsigned int cpu, unsigned int cache_level)
-+{
-+ int liodn;
-+ const u32 *prop;
-+ unsigned int i;
-+ int psize;
-+
-+#ifdef CONFIG_FSL_PAMU_ERRATUM_A_004510
-+ /*
-+ * The work-around says that we cannot have multiple writes to the
-+ * PAACT in flight simultaneously, which could happen if multiple
-+ * cores try to update CID simultaneously. To prevent that, we wrap
-+ * the write in a mutex, which will force the cores to perform their
-+ * updates in sequence.
-+ */
-+ static DEFINE_SPINLOCK(pamu_lock);
-+#endif
-+
-+
-+ /* If we're running under a support hypervisor, make an hcall instead */
-+ if (has_fsl_hypervisor) {
-+ struct fh_dma_attr_stash attr;
-+ phys_addr_t paddr = virt_to_phys(&attr);
-+ int handle;
-+
-+ handle = of_read_indexed_number(node, "fsl,hv-dma-handle",
-+ index);
-+
-+ if (handle < 0)
-+ return -EINVAL;
-+
-+ attr.vcpu = cpu;
-+ attr.cache = cache_level;
-+
-+ if (fh_dma_attr_set(handle, FSL_PAMU_ATTR_STASH, paddr))
-+ return -EINVAL;
-+
-+ return 0;
-+ }
-+
-+ liodn = of_read_indexed_number(node, "fsl,liodn", index);
-+ if (liodn < 0)
-+ return liodn;
-+
-+ for_each_node_by_type(node, "cpu") {
-+ prop = of_get_property(node, "reg", &psize);
-+ if (prop) {
-+ psize /= 4;
-+ for (i = 0; i < psize; i++)
-+ if (be32_to_cpup(prop++) == cpu)
-+ goto found_cpu;
-+ }
-+ }
-+
-+ pr_err("fsl-pamu: could not find 'cpu' node %u\n", cpu);
-+ return -EINVAL;
-+
-+found_cpu:
-+ /*
-+ * Traverse the list of caches until we find the one we want. The CPU
-+ * node is also the L1 cache node
-+ */
-+ for (i = 1; i < cache_level; i++) {
-+ node = of_parse_phandle(node, "next-level-cache", 0);
-+ if (!node) {
-+ pr_err("fsl-pamu: cache level %u invalid for cpu %u\n",
-+ i, cpu);
-+ return -EINVAL;
-+ }
-+ }
-+
-+ prop = of_get_property(node, "cache-stash-id", NULL);
-+ if (!prop) {
-+ pr_err("fsl-pamu: missing 'cache-stash-id' in %s\n",
-+ node->full_name);
-+ return -EINVAL;
-+ }
-+
-+#ifdef CONFIG_FSL_PAMU_ERRATUM_A_004510
-+ spin_lock(&pamu_lock);
-+#endif
-+
-+ ppaact[liodn].impl_attr.cid = be32_to_cpup(prop);
-+ mb();
-+
-+#ifdef CONFIG_FSL_PAMU_ERRATUM_A_004510
-+ spin_unlock(&pamu_lock);
-+#endif
-+
-+ return 0;
-+}
-+EXPORT_SYMBOL(pamu_set_stash_dest);
-+
-+/**
-+ * pamu_get_liodn_count() - returns the number of LIODNs for a given node
-+ * @node: the node to query
-+ *
-+ * This function returns the number of LIODNs in a given node.
-+ *
-+ * The function returns the number >= 0 on success, or a negative error code
-+ * on failure. Currently, an error code cannot be returned, but that may
-+ * change in the future. Callers are still expected to test for an error.
-+ */
-+int pamu_get_liodn_count(struct device_node *node)
-+{
-+ const u32 *prop;
-+ int len;
-+
-+ /*
-+ * Under the hypervisor, use the "fsl,hv-dma-handle". Otherwise,
-+ * use the "fsl,liodn" property.
-+ */
-+ if (has_fsl_hypervisor)
-+ prop = of_get_property(node, "fsl,hv-dma-handle", &len);
-+ else
-+ prop = of_get_property(node, "fsl,liodn", &len);
-+
-+ if (!prop)
-+ /*
-+ * KVM sets up default stashing but does not provide an
-+ * interface to the PAMU, so there are no PAMU nodes or LIODN
-+ * properties in the guest device tree. Therefore, if the
-+ * LIODN property is missing, that doesn't mean that 'node' is
-+ * invalid.
-+ */
-+ return 0;
-+
-+ return len / sizeof(uint32_t);
-+}
-+EXPORT_SYMBOL(pamu_get_liodn_count);
-+
-+
-+static void __init setup_omt(struct ome *omt)
-+{
-+ struct ome *ome;
-+
-+ /* Configure OMI_QMAN */
-+ ome = &omt[OMI_QMAN];
-+
-+ ome->moe[IOE_READ_IDX] = EOE_VALID | EOE_READ;
-+ ome->moe[IOE_EREAD0_IDX] = EOE_VALID | EOE_RSA;
-+ ome->moe[IOE_WRITE_IDX] = EOE_VALID | EOE_WRITE;
-+ ome->moe[IOE_EWRITE0_IDX] = EOE_VALID | EOE_WWSAO;
-+
-+ /*
-+ * When it comes to stashing DIRECTIVEs, the QMan BG says
-+ * (1.5.6.7.1: FQD Context_A field used for dequeued etc.
-+ * etc. stashing control):
-+ * - AE/DE/CE == 0: don't stash exclusive. Use DIRECT0,
-+ * which should be a non-PE LOADEC.
-+ * - AE/DE/CE == 1: stash exclusive via DIRECT1, i.e.
-+ * LOADEC-PE
-+ * If one desires to alter how the three different types of
-+ * stashing are done, please alter rx_conf.exclusive in
-+ * ipfwd_a.c (that specifies the 3-bit AE/DE/CE field), and
-+ * do not alter the settings here. - bgrayson
-+ */
-+ ome->moe[IOE_DIRECT0_IDX] = EOE_VALID | EOE_LDEC;
-+ ome->moe[IOE_DIRECT1_IDX] = EOE_VALID | EOE_LDECPE;
-+
-+ /* Configure OMI_FMAN */
-+ ome = &omt[OMI_FMAN];
-+ ome->moe[IOE_READ_IDX] = EOE_VALID | EOE_READI;
-+ ome->moe[IOE_WRITE_IDX] = EOE_VALID | EOE_WWSA;
-+
-+ /* Configure OMI_QMAN private */
-+ ome = &omt[OMI_QMAN_PRIV];
-+ ome->moe[IOE_READ_IDX] = EOE_VALID | EOE_READ;
-+ ome->moe[IOE_WRITE_IDX] = EOE_VALID | EOE_WRITE;
-+ ome->moe[IOE_EREAD0_IDX] = EOE_VALID | EOE_RSA;
-+ ome->moe[IOE_EWRITE0_IDX] = EOE_VALID | EOE_WWSA;
-+
-+ /* Configure OMI_CAAM */
-+ ome = &omt[OMI_CAAM];
-+ ome->moe[IOE_READ_IDX] = EOE_VALID | EOE_READI;
-+ ome->moe[IOE_WRITE_IDX] = EOE_VALID | EOE_WRITE;
-+}
-+
-+static u32 __init get_stash_id(unsigned int stash_dest_hint,
-+ struct device_node *portal_dn)
-+{
-+ const u32 *prop;
-+ struct device_node *node;
-+ unsigned int cache_level;
-+
-+ /* Fastpath, exit early if 3/CPC cache is target for stashing */
-+ if (stash_dest_hint == 3) {
-+ node = of_find_compatible_node(NULL, NULL,
-+ "fsl,p4080-l3-cache-controller");
-+ if (node) {
-+ prop = of_get_property(node, "cache-stash-id", 0);
-+ if (!prop) {
-+ pr_err("fsl-pamu: missing cache-stash-id in "
-+ " %s\n", node->full_name);
-+ of_node_put(node);
-+ return ~(u32)0;
-+ }
-+ of_node_put(node);
-+ return *prop;
-+ }
-+ return ~(u32)0;
-+ }
-+
-+ prop = of_get_property(portal_dn, "cpu-handle", 0);
-+ /* if no cpu-phandle assume that this is not a per-cpu portal */
-+ if (!prop)
-+ return ~(u32)0;
-+
-+ node = of_find_node_by_phandle(*prop);
-+ if (!node) {
-+ pr_err("fsl-pamu: bad cpu-handle reference in %s\n",
-+ portal_dn->full_name);
-+ return ~(u32)0;
-+ }
-+
-+ /* find the hwnode that represents the cache */
-+ for (cache_level = 1; cache_level <= 3; cache_level++) {
-+ if (stash_dest_hint == cache_level) {
-+ prop = of_get_property(node, "cache-stash-id", 0);
-+ of_node_put(node);
-+ if (!prop) {
-+ pr_err("fsl-pamu: missing cache-stash-id in "
-+ "%s\n", node->full_name);
-+ return ~(u32)0;
-+ }
-+ return *prop;
-+ }
-+
-+ prop = of_get_property(node, "next-level-cache", 0);
-+ if (!prop) {
-+ pr_err("fsl-pamu: can't find next-level-cache in %s\n",
-+ node->full_name);
-+ of_node_put(node);
-+ return ~(u32)0; /* can't traverse any further */
-+ }
-+ of_node_put(node);
-+
-+ /* advance to next node in cache hierarchy */
-+ node = of_find_node_by_phandle(*prop);
-+ if (!node) {
-+ pr_err("fsl-pamu: bad cpu phandle reference in %s\n",
-+ portal_dn->full_name);
-+ return ~(u32)0;
-+ }
-+ }
-+
-+ pr_err("fsl-pamu: stash destination not found for cache level %d "
-+ "on portal node %s\n", stash_dest_hint, portal_dn->full_name);
-+
-+ return ~(u32)0;
-+}
-+
-+#ifdef CONFIG_FSL_FMAN_CPC_STASH
-+static void __init enable_fman_io_stashing(struct device_node *dn)
-+{
-+ const u32 *prop;
-+ struct ppaace *ppaace;
-+ u32 cache_id;
-+
-+ prop = of_get_property(dn, "fsl,liodn", NULL);
-+ if (prop) {
-+ ppaace = &ppaact[*prop];
-+ ppaace->otm = PAACE_OTM_INDEXED;
-+ ppaace->domain_attr.to_host.coherency_required = 1;
-+ ppaace->op_encode.index_ot.omi = OMI_FMAN;
-+ cache_id = get_stash_id(3, NULL);
-+ pr_debug("%s cache_stash_id = %d\n", dn->full_name, cache_id);
-+ if (~cache_id != 0)
-+ ppaace->impl_attr.cid = cache_id;
-+ } else {
-+ pr_err("fsl-pamu: missing fsl,liodn property in %s\n",
-+ dn->full_name);
-+ }
-+}
-+#endif
-+
-+static void __init setup_liodns(void)
-+{
-+ int i, len;
-+ struct ppaace *ppaace;
-+ struct device_node *qman_portal_dn = NULL;
-+ struct device_node *qman_dn = NULL;
-+ struct device_node *bman_dn;
-+ const u32 *prop;
-+ u32 cache_id, prop_cnt;
-+#ifdef CONFIG_FSL_FMAN_CPC_STASH
-+ struct device_node *port_dn;
-+#endif
-+
-+ for (i = 0; i < PAACE_NUMBER_ENTRIES; i++) {
-+ ppaace = &ppaact[i];
-+ ppaace->pt = PAACE_PT_PRIMARY;
-+ ppaace->domain_attr.to_host.coherency_required =
-+ PAACE_M_COHERENCE_REQ;
-+ /* window size is 2^(WSE+1) bytes */
-+ ppaace->wse = 35; /* 36-bit phys. addr space */
-+ ppaace->wbah = ppaace->wbal = 0;
-+ ppaace->atm = PAACE_ATM_NO_XLATE;
-+ ppaace->ap = PAACE_AP_PERMS_ALL;
-+ mb();
-+ ppaace->v = 1;
-+ }
-+
-+ /*
-+ * Now, do specific stashing setup for qman portals.
-+ * We need stashing setup for LIODNs for qman portal(s) dqrr stashing
-+ * (DLIODNs), qman portal(s) data stashing (FLIODNs)
-+ */
-+
-+ for_each_compatible_node(qman_portal_dn, NULL, "fsl,qman-portal") {
-+ pr_debug("qman portal %s found\n", qman_portal_dn->full_name);
-+
-+ prop = of_get_property(qman_portal_dn, "fsl,liodn", &len);
-+ if (prop) {
-+ prop_cnt = len / sizeof(u32);
-+ do {
-+ pr_debug("liodn = %d\n", *prop);
-+ ppaace = &ppaact[*prop++];
-+ ppaace->otm = PAACE_OTM_INDEXED;
-+ ppaace->op_encode.index_ot.omi = OMI_QMAN;
-+ cache_id = get_stash_id(3, qman_portal_dn);
-+ pr_debug("cache_stash_id = %d\n", cache_id);
-+ if (~cache_id != 0)
-+ ppaace->impl_attr.cid = cache_id;
-+ } while (--prop_cnt);
-+ } else {
-+ pr_err("fsl-pamu: missing fsl,liodn property in %s\n",
-+ qman_portal_dn->full_name);
-+ }
-+ }
-+
-+ /*
-+ * Next, do stashing setups for qman private memory access
-+ */
-+
-+ qman_dn = of_find_compatible_node(NULL, NULL, "fsl,qman");
-+ if (qman_dn) {
-+ prop = of_get_property(qman_dn, "fsl,liodn", NULL);
-+ if (prop) {
-+ ppaace = &ppaact[*prop];
-+ ppaace->otm = PAACE_OTM_INDEXED;
-+ ppaace->domain_attr.to_host.coherency_required = 0;
-+ ppaace->op_encode.index_ot.omi = OMI_QMAN_PRIV;
-+ cache_id = get_stash_id(3, qman_dn);
-+ pr_debug("cache_stash_id = %d\n", cache_id);
-+ if (~cache_id != 0)
-+ ppaace->impl_attr.cid = cache_id;
-+ } else {
-+ pr_err("fsl-pamu: missing fsl,liodn property in %s\n",
-+ qman_dn->full_name);
-+ }
-+ of_node_put(qman_dn);
-+ }
-+
-+#ifdef CONFIG_FSL_FMAN_CPC_STASH
-+ port_dn = NULL;
-+ for_each_compatible_node(port_dn, NULL, "fsl,fman-port-10g-rx")
-+ enable_fman_io_stashing(port_dn);
-+
-+ port_dn = NULL;
-+ for_each_compatible_node(port_dn, NULL, "fsl,fman-port-1g-rx")
-+ enable_fman_io_stashing(port_dn);
-+#endif
-+ /*
-+ * For liodn used by BMAN for its private memory accesses,
-+ * turn the 'coherency required' off. This saves snoops to cores.
-+ */
-+
-+ bman_dn = of_find_compatible_node(NULL, NULL, "fsl,bman");
-+ if (bman_dn) {
-+ prop = of_get_property(bman_dn, "fsl,liodn", NULL);
-+ if (prop) {
-+ ppaace = &ppaact[*prop];
-+ ppaace->domain_attr.to_host.coherency_required = 0;
-+ } else {
-+ pr_err("fsl-pamu: missing fsl,liodn property in %s\n",
-+ bman_dn->full_name);
-+ }
-+ of_node_put(bman_dn);
-+ }
-+}
-+
-+static int __init setup_one_pamu(void *pamu_reg_base, struct ome *omt)
-+{
-+ struct pamu_mmap_regs *pamu_regs = pamu_reg_base + PAMU_MMAP_REGS_BASE;
-+ phys_addr_t phys;
-+
-+ /* set up pointers to corenet control blocks */
-+
-+ phys = ppaact_phys;
-+ out_be32(&pamu_regs->ppbah, upper_32_bits(phys));
-+ out_be32(&pamu_regs->ppbal, lower_32_bits(phys));
-+
-+ phys = ppaact_phys + PAACE_NUMBER_ENTRIES * sizeof(struct ppaace);
-+ out_be32(&pamu_regs->pplah, upper_32_bits(phys));
-+ out_be32(&pamu_regs->pplal, lower_32_bits(phys));
-+
-+ phys = virt_to_phys(omt);
-+ out_be32(&pamu_regs->obah, upper_32_bits(phys));
-+ out_be32(&pamu_regs->obal, lower_32_bits(phys));
-+
-+ phys = virt_to_phys(omt + OME_NUMBER_ENTRIES);
-+ out_be32(&pamu_regs->olah, upper_32_bits(phys));
-+ out_be32(&pamu_regs->olal, lower_32_bits(phys));
-+
-+
-+ /*
-+ * set PAMU enable bit,
-+ * allow ppaact & omt to be cached
-+ * & enable PAMU access violation interrupts.
-+ */
-+
-+ out_be32(pamu_reg_base + PAMU_PICS, PAMU_ACCESS_VIOLATION_ENABLE);
-+ out_be32(pamu_reg_base + PAMU_PC,
-+ PAMU_PC_PE | PAMU_PC_OCE | PAMU_PC_SPCC | PAMU_PC_PPCC);
-+
-+ return 0;
-+}
-+
-+#define make64(high, low) (((u64)(high) << 32) | (low))
-+
-+struct pamu_isr_data {
-+ void __iomem *pamu_reg_base; /* Base address of PAMU regs*/
-+ unsigned int count; /* The number of PAMUs */
-+};
-+
-+static irqreturn_t pamu_av_isr(int irq, void *arg)
-+{
-+ struct pamu_isr_data *data = arg;
-+ phys_addr_t phys;
-+ unsigned int i, j;
-+
-+ pr_emerg("fsl-pamu: access violation interrupt\n");
-+
-+ for (i = 0; i < data->count; i++) {
-+ void __iomem *p = data->pamu_reg_base + i * PAMU_OFFSET;
-+ u32 pics = in_be32(p + PAMU_PICS);
-+
-+ if (pics & PAMU_ACCESS_VIOLATION_STAT) {
-+ pr_emerg("POES1=%08x\n", in_be32(p + PAMU_POES1));
-+ pr_emerg("POES2=%08x\n", in_be32(p + PAMU_POES2));
-+ pr_emerg("AVS1=%08x\n", in_be32(p + PAMU_AVS1));
-+ pr_emerg("AVS2=%08x\n", in_be32(p + PAMU_AVS2));
-+ pr_emerg("AVA=%016llx\n", make64(in_be32(p + PAMU_AVAH),
-+ in_be32(p + PAMU_AVAL)));
-+ pr_emerg("UDAD=%08x\n", in_be32(p + PAMU_UDAD));
-+ pr_emerg("POEA=%016llx\n", make64(in_be32(p + PAMU_POEAH),
-+ in_be32(p + PAMU_POEAL)));
-+
-+ phys = make64(in_be32(p + PAMU_POEAH),
-+ in_be32(p + PAMU_POEAL));
-+
-+ /* Assume that POEA points to a PAACE */
-+ if (phys) {
-+ u32 *paace = phys_to_virt(phys);
-+
-+ /* Only the first four words are relevant */
-+ for (j = 0; j < 4; j++)
-+ pr_emerg("PAACE[%u]=%08x\n", j, in_be32(paace + j));
-+ }
-+ }
-+ }
-+
-+ panic("\n");
-+
-+ /* NOT REACHED */
-+ return IRQ_HANDLED;
-+}
-+
-+#ifdef CONFIG_FSL_PAMU_ERRATUM_A_004510
-+
-+/*
-+ * The work-around for erratum A-004510 says we need to create a coherency
-+ * subdomain (CSD), which means we need to create a LAW (local access window)
-+ * just for the PAACT and OMT, and then give it a unique CSD ID. Linux
-+ * normally doesn't touch the LAWs, so we define everything here.
-+ */
-+
-+#define LAWAR_EN 0x80000000
-+#define LAWAR_TARGET_MASK 0x0FF00000
-+#define LAWAR_TARGET_SHIFT 20
-+#define LAWAR_SIZE_MASK 0x0000003F
-+#define LAWAR_CSDID_MASK 0x000FF000
-+#define LAWAR_CSDID_SHIFT 12
-+
-+#define LAW_SIZE_4K 0xb
-+
-+struct ccsr_law {
-+ u32 lawbarh; /* LAWn base address high */
-+ u32 lawbarl; /* LAWn base address low */
-+ u32 lawar; /* LAWn attributes */
-+ u32 reserved;
-+};
-+
-+/*
-+ * Create a coherence subdomain for a given memory block.
-+ */
-+static int __init create_csd(phys_addr_t phys, size_t size, u32 csd_port_id)
-+{
-+ struct device_node *np;
-+ const __be32 *iprop;
-+ void __iomem *lac = NULL; /* Local Access Control registers */
-+ struct ccsr_law __iomem *law;
-+ void __iomem *ccm = NULL;
-+ u32 __iomem *csdids;
-+ unsigned int i, num_laws, num_csds;
-+ u32 law_target = 0;
-+ u32 csd_id = 0;
-+ int ret = 0;
-+
-+ np = of_find_compatible_node(NULL, NULL, "fsl,corenet-law");
-+ if (!np)
-+ return -ENODEV;
-+
-+ iprop = of_get_property(np, "fsl,num-laws", NULL);
-+ if (!iprop) {
-+ ret = -ENODEV;
-+ goto error;
-+ }
-+
-+ num_laws = be32_to_cpup(iprop);
-+ if (!num_laws) {
-+ ret = -ENODEV;
-+ goto error;
-+ }
-+
-+ lac = of_iomap(np, 0);
-+ if (!lac) {
-+ ret = -ENODEV;
-+ goto error;
-+ }
-+
-+ /* LAW registers are at offset 0xC00 */
-+ law = lac + 0xC00;
-+
-+ of_node_put(np);
-+
-+ np = of_find_compatible_node(NULL, NULL, "fsl,corenet-cf");
-+ if (!np) {
-+ ret = -ENODEV;
-+ goto error;
-+ }
-+
-+ iprop = of_get_property(np, "fsl,ccf-num-csdids", NULL);
-+ if (!iprop) {
-+ ret = -ENODEV;
-+ goto error;
-+ }
-+
-+ num_csds = be32_to_cpup(iprop);
-+ if (!num_csds) {
-+ ret = -ENODEV;
-+ goto error;
-+ }
-+
-+ ccm = of_iomap(np, 0);
-+ if (!ccm) {
-+ ret = -ENOMEM;
-+ goto error;
-+ }
-+
-+ /* The undocumented CSDID registers are at offset 0x600 */
-+ csdids = ccm + 0x600;
-+
-+ of_node_put(np);
-+ np = NULL;
-+
-+ /* Find an unused coherence subdomain ID */
-+ for (csd_id = 0; csd_id < num_csds; csd_id++) {
-+ if (!csdids[csd_id])
-+ break;
-+ }
-+
-+ /* Store the Port ID in the (undocumented) proper CIDMRxx register */
-+ csdids[csd_id] = csd_port_id;
-+
-+ /* Find the DDR LAW that maps to our buffer. */
-+ for (i = 0; i < num_laws; i++) {
-+ if (law[i].lawar & LAWAR_EN) {
-+ phys_addr_t law_start, law_end;
-+
-+ law_start = make64(law[i].lawbarh, law[i].lawbarl);
-+ law_end = law_start +
-+ (2ULL << (law[i].lawar & LAWAR_SIZE_MASK));
-+
-+ if (law_start <= phys && phys < law_end) {
-+ law_target = law[i].lawar & LAWAR_TARGET_MASK;
-+ break;
-+ }
-+ }
-+ }
-+
-+ if (i == 0 || i == num_laws) {
-+ /* This should never happen*/
-+ ret = -ENOENT;
-+ goto error;
-+ }
-+
-+ /* Find a free LAW entry */
-+ while (law[--i].lawar & LAWAR_EN) {
-+ if (i == 0) {
-+ /* No higher priority LAW slots available */
-+ ret = -ENOENT;
-+ goto error;
-+ }
-+ }
-+
-+ law[i].lawbarh = upper_32_bits(phys);
-+ law[i].lawbarl = lower_32_bits(phys);
-+ wmb();
-+ law[i].lawar = LAWAR_EN | law_target | (csd_id << LAWAR_CSDID_SHIFT) |
-+ (LAW_SIZE_4K + get_order(size));
-+ wmb();
-+
-+error:
-+ if (ccm)
-+ iounmap(ccm);
-+
-+ if (lac)
-+ iounmap(lac);
-+
-+ if (np)
-+ of_node_put(np);
-+
-+ return ret;
-+}
-+#endif
-+
-+/*
-+ * Table of SVRs and the corresponding PORT_ID values.
-+ *
-+ * All future CoreNet-enabled SOCs will have this erratum fixed, so this table
-+ * should never need to be updated. SVRs are guaranteed to be unique, so
-+ * there is no worry that a future SOC will inadvertently have one of these
-+ * values.
-+ */
-+static const struct {
-+ u32 svr;
-+ u32 port_id;
-+} port_id_map[] = {
-+ {0x82100010, 0xFF000000}, /* P2040 1.0 */
-+ {0x82100011, 0xFF000000}, /* P2040 1.1 */
-+ {0x82100110, 0xFF000000}, /* P2041 1.0 */
-+ {0x82100111, 0xFF000000}, /* P2041 1.1 */
-+ {0x82110310, 0xFF000000}, /* P3041 1.0 */
-+ {0x82110311, 0xFF000000}, /* P3041 1.1 */
-+ {0x82010020, 0xFFF80000}, /* P4040 2.0 */
-+ {0x82000020, 0xFFF80000}, /* P4080 2.0 */
-+ {0x82210010, 0xFC000000}, /* P5010 1.0 */
-+ {0x82210020, 0xFC000000}, /* P5010 2.0 */
-+ {0x82200010, 0xFC000000}, /* P5020 1.0 */
-+ {0x82050010, 0xFF800000}, /* P5021 1.0 */
-+ {0x82040010, 0xFF800000}, /* P5040 1.0 */
-+};
-+
-+#define SVR_SECURITY 0x80000 /* The Security (E) bit */
-+
-+static struct of_device_id qoriq_device_config[] = {
-+ {
-+ .compatible = "fsl,qoriq-device-config-1.0",
-+ },
-+ {
-+ .compatible = "fsl,t4240-device-config",
-+ },
-+ {
-+ .compatible = "fsl,b4860-device-config",
-+ },
-+ {
-+ .compatible = "fsl,b4420-device-config",
-+ },
-+ {}
-+};
-+
-+static int __init fsl_pamu_probe(struct platform_device *pdev)
-+{
-+ void __iomem *pamu_regs = NULL;
-+ struct ccsr_guts_85xx __iomem *guts_regs = NULL;
-+ u32 pamubypenr, pamu_counter;
-+ unsigned long pamu_reg_off;
-+ struct device_node *guts_node;
-+ struct pamu_isr_data *data;
-+ u64 size;
-+ struct page *p;
-+ int ret = 0;
-+ struct ome *omt = NULL;
-+ int irq;
-+#ifdef CONFIG_FSL_PAMU_ERRATUM_A_004510
-+ size_t mem_size = 0;
-+ unsigned int order = 0;
-+ u32 csd_port_id = 0;
-+ unsigned i;
-+#endif
-+
-+ /*
-+ * enumerate all PAMUs and allocate and setup PAMU tables
-+ * for each of them,
-+ * NOTE : All PAMUs share the same LIODN tables.
-+ */
-+
-+ pamu_regs = of_iomap(pdev->dev.of_node, 0);
-+ if (!pamu_regs) {
-+ dev_err(&pdev->dev, "ioremap of PAMU node failed\n");
-+ return -ENOMEM;
-+ }
-+ of_get_address(pdev->dev.of_node, 0, &size, NULL);
-+
-+ data = kzalloc(sizeof(struct pamu_isr_data), GFP_KERNEL);
-+ if (!data) {
-+ iounmap(pamu_regs);
-+ return -ENOMEM;
-+ }
-+ data->pamu_reg_base = pamu_regs;
-+ data->count = size / PAMU_OFFSET;
-+
-+ irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
-+ if (irq == NO_IRQ) {
-+ dev_warn(&pdev->dev, "no interrupts listed in PAMU node\n");
-+ goto error;
-+ }
-+
-+ /* The ISR needs access to the regs, so we won't iounmap them */
-+ ret = request_irq(irq, pamu_av_isr, 0, "pamu", data);
-+ if (ret < 0) {
-+ dev_err(&pdev->dev, "error %i installing ISR for irq %i\n",
-+ ret, irq);
-+ goto error;
-+ }
-+
-+ guts_node = of_find_matching_node(NULL, qoriq_device_config);
-+ if (!guts_node) {
-+ dev_err(&pdev->dev, "could not find GUTS node %s\n",
-+ pdev->dev.of_node->full_name);
-+ ret = -ENODEV;
-+ goto error;
-+ }
-+
-+ guts_regs = of_iomap(guts_node, 0);
-+ of_node_put(guts_node);
-+ if (!guts_regs) {
-+ dev_err(&pdev->dev, "ioremap of GUTS node failed\n");
-+ ret = -ENODEV;
-+ goto error;
-+ }
-+
-+#ifdef CONFIG_FSL_PAMU_ERRATUM_A_004510
-+ /*
-+ * To simplify the allocation of a coherency domain, we allocate the
-+ * PAACT and the OMT in the same memory buffer. Unfortunately, this
-+ * wastes more memory compared to allocating the buffers separately.
-+ */
-+
-+ /* Determine how much memory we need */
-+ mem_size = (PAGE_SIZE << get_order(PAACT_SIZE)) +
-+ (PAGE_SIZE << get_order(OMT_SIZE));
-+ order = get_order(mem_size);
-+
-+ p = alloc_pages(GFP_KERNEL | __GFP_ZERO, order);
-+ if (!p) {
-+ dev_err(&pdev->dev, "unable to allocate PAACT/OMT block\n");
-+ ret = -ENOMEM;
-+ goto error;
-+ }
-+
-+ ppaact = page_address(p);
-+ ppaact_phys = page_to_phys(p);
-+
-+ /* Make sure the memory is naturally aligned */
-+ if (ppaact_phys & ((PAGE_SIZE << order) - 1)) {
-+ dev_err(&pdev->dev, "PAACT/OMT block is unaligned\n");
-+ ret = -ENOMEM;
-+ goto error;
-+ }
-+
-+ /* This assumes that PAACT_SIZE is larger than OMT_SIZE */
-+ omt = (void *)ppaact + (PAGE_SIZE << get_order(PAACT_SIZE));
-+
-+ dev_dbg(&pdev->dev, "ppaact virt=%p phys=0x%llx\n", ppaact,
-+ (unsigned long long) ppaact_phys);
-+
-+ dev_dbg(&pdev->dev, "omt virt=%p phys=0x%llx\n", omt,
-+ (unsigned long long) virt_to_phys(omt));
-+
-+ /* Check to see if we need to implement the work-around on this SOC */
-+
-+ /* Determine the Port ID for our coherence subdomain */
-+ for (i = 0; i < ARRAY_SIZE(port_id_map); i++) {
-+ if (port_id_map[i].svr == (mfspr(SPRN_SVR) & ~SVR_SECURITY)) {
-+ csd_port_id = port_id_map[i].port_id;
-+ dev_dbg(&pdev->dev, "found matching SVR %08x\n",
-+ port_id_map[i].svr);
-+ break;
-+ }
-+ }
-+
-+ if (csd_port_id) {
-+ dev_info(&pdev->dev, "implementing work-around for erratum "
-+ "A-004510\n");
-+ dev_dbg(&pdev->dev, "creating coherency subdomain at address "
-+ "0x%llx, size %zu, port id 0x%08x", ppaact_phys,
-+ mem_size, csd_port_id);
-+
-+ ret = create_csd(ppaact_phys, mem_size, csd_port_id);
-+ if (ret) {
-+ dev_err(&pdev->dev, "could not create coherence "
-+ "subdomain\n");
-+ return ret;
-+ }
-+ }
-+#else
-+ p = alloc_pages(GFP_KERNEL | __GFP_ZERO, get_order(PAACT_SIZE));
-+ if (!p) {
-+ dev_err(&pdev->dev, "unable to allocate PAACT table\n");
-+ ret = -ENOMEM;
-+ goto error;
-+ }
-+ ppaact = page_address(p);
-+ ppaact_phys = page_to_phys(p);
-+
-+ dev_dbg(&pdev->dev, "ppaact virt=%p phys=0x%llx\n", ppaact,
-+ (unsigned long long) ppaact_phys);
-+
-+ p = alloc_pages(GFP_KERNEL | __GFP_ZERO, get_order(OMT_SIZE));
-+ if (!p) {
-+ dev_err(&pdev->dev, "unable to allocate OMT table\n");
-+ ret = -ENOMEM;
-+ goto error;
-+ }
-+ omt = page_address(p);
-+
-+ dev_dbg(&pdev->dev, "omt virt=%p phys=0x%llx\n", omt,
-+ (unsigned long long) page_to_phys(p));
-+#endif
-+
-+ pamubypenr = in_be32(&guts_regs->pamubypenr);
-+
-+ for (pamu_reg_off = 0, pamu_counter = 0x80000000; pamu_reg_off < size;
-+ pamu_reg_off += PAMU_OFFSET, pamu_counter >>= 1) {
-+ setup_one_pamu(pamu_regs + pamu_reg_off, omt);
-+
-+ /* Disable PAMU bypass for this PAMU */
-+ pamubypenr &= ~pamu_counter;
-+ }
-+
-+ setup_omt(omt);
-+
-+ /*
-+ * setup all LIODNS(s) to define a 1:1 mapping for the entire
-+ * 36-bit physical address space
-+ */
-+ setup_liodns();
-+ mb();
-+
-+ /* Enable all relevant PAMU(s) */
-+ out_be32(&guts_regs->pamubypenr, pamubypenr);
-+
-+ iounmap(guts_regs);
-+
-+ return 0;
-+
-+error:
-+ if (irq != NO_IRQ)
-+ free_irq(irq, 0);
-+
-+ if (pamu_regs)
-+ iounmap(pamu_regs);
-+
-+ if (guts_regs)
-+ iounmap(guts_regs);
-+
-+#ifdef CONFIG_FSL_PAMU_ERRATUM_A_004510
-+ if (ppaact)
-+ free_pages((unsigned long)ppaact, order);
-+#else
-+ if (ppaact)
-+ free_pages((unsigned long)ppaact, get_order(PAACT_SIZE));
-+
-+ if (omt)
-+ free_pages((unsigned long)omt, get_order(OMT_SIZE));
-+#endif
-+
-+ ppaact = NULL;
-+ ppaact_phys = 0;
-+
-+ return ret;
-+}
-+
-+static struct platform_driver fsl_of_pamu_driver = {
-+ .driver = {
-+ .name = "fsl-of-pamu",
-+ .owner = THIS_MODULE,
-+ },
-+ .probe = fsl_pamu_probe,
-+};
-+
-+static bool is_fsl_hypervisor(void)
-+{
-+ struct device_node *np;
-+ struct property *prop;
-+
-+ np = of_find_node_by_path("/hypervisor");
-+ if (!np)
-+ return false;
-+
-+ prop = of_find_property(np, "fsl,has-stash-attr-hcall", NULL);
-+ of_node_put(np);
-+
-+ if (!prop)
-+ pr_notice("fsl-pamu: this hypervisor does not support the "
-+ "stash attribute hypercall\n");
-+
-+ return !!prop;
-+}
-+
-+static __init int fsl_pamu_init(void)
-+{
-+ struct platform_device *pdev = NULL;
-+ struct device_node *np;
-+ int ret;
-+
-+ /*
-+ * The normal OF process calls the probe function at some
-+ * indeterminate later time, after most drivers have loaded. This is
-+ * too late for us, because PAMU clients (like the Qman driver)
-+ * depend on PAMU being initialized early.
-+ *
-+ * So instead, we "manually" call our probe function by creating the
-+ * platform devices ourselves.
-+ */
-+
-+ /*
-+ * We assume that there is only one PAMU node in the device tree. A
-+ * single PAMU node represents all of the PAMU devices in the SOC
-+ * already. Everything else already makes that assumption, and the
-+ * binding for the PAMU nodes doesn't allow for any parent-child
-+ * relationships anyway. In other words, support for more than one
-+ * PAMU node would require significant changes to a lot of code.
-+ */
-+
-+ np = of_find_compatible_node(NULL, NULL, "fsl,pamu");
-+ if (!np) {
-+ /* No PAMU nodes, so check for a hypervisor */
-+ if (is_fsl_hypervisor()) {
-+ has_fsl_hypervisor = true;
-+ /* Remain resident, but we don't need a platform */
-+ return 0;
-+ }
-+
-+ pr_err("fsl-pamu: could not find a PAMU node\n");
-+ return -ENODEV;
-+ }
-+
-+ ret = platform_driver_register(&fsl_of_pamu_driver);
-+ if (ret) {
-+ pr_err("fsl-pamu: could not register driver (err=%i)\n", ret);
-+ goto error_driver_register;
-+ }
-+
-+ pdev = platform_device_alloc("fsl-of-pamu", 0);
-+ if (!pdev) {
-+ pr_err("fsl-pamu: could not allocate device %s\n",
-+ np->full_name);
-+ ret = -ENOMEM;
-+ goto error_device_alloc;
-+ }
-+ pdev->dev.of_node = of_node_get(np);
-+
-+ ret = platform_device_add(pdev);
-+ if (ret) {
-+ pr_err("fsl-pamu: could not add device %s (err=%i)\n",
-+ np->full_name, ret);
-+ goto error_device_add;
-+ }
-+
-+ return 0;
-+
-+error_device_add:
-+ of_node_put(pdev->dev.of_node);
-+ pdev->dev.of_node = NULL;
-+
-+ platform_device_put(pdev);
-+
-+error_device_alloc:
-+ platform_driver_unregister(&fsl_of_pamu_driver);
-+
-+error_driver_register:
-+ of_node_put(np);
-+
-+ return ret;
-+}
-+
-+arch_initcall(fsl_pamu_init);
-diff --git a/arch/powerpc/sysdev/fsl_pamu.h b/arch/powerpc/sysdev/fsl_pamu.h
-new file mode 100644
-index 0000000..b816812
---- /dev/null
-+++ b/arch/powerpc/sysdev/fsl_pamu.h
-@@ -0,0 +1,58 @@
-+/* Copyright (c) 2012 Freescale Semiconductor, Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "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 Freescale Semiconductor 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.
-+ */
-+
-+#ifndef FSL_PAMU_H
-+#define FSL_PAMU_H
-+
-+#ifdef CONFIG_FSL_PAMU
-+
-+/* Set the stash target for a given LIODN */
-+int pamu_set_stash_dest(struct device_node *node, unsigned int index,
-+ unsigned int cpu, unsigned int cache_level);
-+
-+int pamu_get_liodn_count(struct device_node *node);
-+
-+#else
-+
-+static inline int pamu_set_stash_dest(struct device_node *node, unsigned int index,
-+ unsigned int cpu, unsigned int cache_level)
-+{
-+ return -ENOSYS;
-+}
-+
-+static inline int pamu_get_liodn_count(struct device_node *node)
-+{
-+ return 0;
-+}
-+
-+#endif
-+
-+#endif
-diff --git a/drivers/Kconfig b/drivers/Kconfig
-index b5e6f24..e458b8e 100644
---- a/drivers/Kconfig
-+++ b/drivers/Kconfig
-@@ -136,4 +136,6 @@ source "drivers/hv/Kconfig"
-
- source "drivers/devfreq/Kconfig"
-
-+source "drivers/net/dpa/NetCommSw/Kconfig"
-+
- endmenu
-diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c
-new file mode 100644
-index 0000000..74de0b5
---- /dev/null
-+++ b/drivers/mmc/host/sdhci-of-core.c
-@@ -0,0 +1,274 @@
-+/*
-+ * OpenFirmware bindings for Secure Digital Host Controller Interface.
-+ *
-+ * Copyright (c) 2007, 2011 Freescale Semiconductor, Inc.
-+ * Copyright (c) 2009 MontaVista Software, Inc.
-+ *
-+ * Authors: Xiaobo Xie
-+ * Anton Vorontsov
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or (at
-+ * your option) any later version.
-+ */
-+
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#ifdef CONFIG_PPC
-+#include
-+#endif
-+#include "sdhci-of.h"
-+#include "sdhci.h"
-+
-+#ifdef CONFIG_MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER
-+
-+/*
-+ * These accessors are designed for big endian hosts doing I/O to
-+ * little endian controllers incorporating a 32-bit hardware byte swapper.
-+ */
-+
-+u32 sdhci_be32bs_readl(struct sdhci_host *host, int reg)
-+{
-+ return in_be32(host->ioaddr + reg);
-+}
-+
-+u16 sdhci_be32bs_readw(struct sdhci_host *host, int reg)
-+{
-+ return in_be16(host->ioaddr + (reg ^ 0x2));
-+}
-+
-+u8 sdhci_be32bs_readb(struct sdhci_host *host, int reg)
-+{
-+ return in_8(host->ioaddr + (reg ^ 0x3));
-+}
-+
-+void sdhci_be32bs_writel(struct sdhci_host *host, u32 val, int reg)
-+{
-+ out_be32(host->ioaddr + reg, val);
-+}
-+
-+void sdhci_be32bs_writew(struct sdhci_host *host, u16 val, int reg)
-+{
-+ struct sdhci_of_host *of_host = sdhci_priv(host);
-+ int base = reg & ~0x3;
-+ int shift = (reg & 0x2) * 8;
-+
-+ switch (reg) {
-+ case SDHCI_TRANSFER_MODE:
-+ /*
-+ * Postpone this write, we must do it together with a
-+ * command write that is down below.
-+ */
-+ of_host->xfer_mode_shadow = val;
-+ return;
-+ case SDHCI_COMMAND:
-+ sdhci_be32bs_writel(host, val << 16 | of_host->xfer_mode_shadow,
-+ SDHCI_TRANSFER_MODE);
-+ return;
-+ }
-+ clrsetbits_be32(host->ioaddr + base, 0xffff << shift, val << shift);
-+}
-+
-+void sdhci_be32bs_writeb(struct sdhci_host *host, u8 val, int reg)
-+{
-+ int base = reg & ~0x3;
-+ int shift = (reg & 0x3) * 8;
-+
-+ clrsetbits_be32(host->ioaddr + base , 0xff << shift, val << shift);
-+}
-+#endif /* CONFIG_MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER */
-+
-+#ifdef CONFIG_PM
-+
-+static int sdhci_of_suspend(struct platform_device *ofdev, pm_message_t state)
-+{
-+ struct sdhci_host *host = dev_get_drvdata(&ofdev->dev);
-+
-+ return mmc_suspend_host(host->mmc);
-+}
-+
-+static int sdhci_of_resume(struct platform_device *ofdev)
-+{
-+ struct sdhci_host *host = dev_get_drvdata(&ofdev->dev);
-+
-+ return mmc_resume_host(host->mmc);
-+}
-+
-+#else
-+
-+#define sdhci_of_suspend NULL
-+#define sdhci_of_resume NULL
-+
-+#endif
-+
-+static bool __devinit sdhci_of_wp_inverted(struct device_node *np)
-+{
-+ if (of_get_property(np, "sdhci,wp-inverted", NULL))
-+ return true;
-+
-+ /* Old device trees don't have the wp-inverted property. */
-+#ifdef CONFIG_PPC
-+ return machine_is(mpc837x_rdb) || machine_is(mpc837x_mds);
-+#else
-+ return false;
-+#endif
-+}
-+
-+static const struct of_device_id sdhci_of_match[];
-+static int __devinit sdhci_of_probe(struct platform_device *ofdev)
-+{
-+ const struct of_device_id *match;
-+ struct device_node *np = ofdev->dev.of_node;
-+ struct sdhci_of_data *sdhci_of_data;
-+ struct sdhci_host *host;
-+ struct sdhci_of_host *of_host;
-+ const __be32 *clk;
-+ int size;
-+ int ret;
-+
-+ match = of_match_device(sdhci_of_match, &ofdev->dev);
-+ if (!match)
-+ return -EINVAL;
-+ sdhci_of_data = match->data;
-+
-+ if (!of_device_is_available(np))
-+ return -ENODEV;
-+
-+ host = sdhci_alloc_host(&ofdev->dev, sizeof(*of_host));
-+ if (IS_ERR(host))
-+ return -ENOMEM;
-+
-+ of_host = sdhci_priv(host);
-+ dev_set_drvdata(&ofdev->dev, host);
-+
-+ host->ioaddr = of_iomap(np, 0);
-+ if (!host->ioaddr) {
-+ ret = -ENOMEM;
-+ goto err_addr_map;
-+ }
-+
-+ host->irq = irq_of_parse_and_map(np, 0);
-+ if (!host->irq) {
-+ ret = -EINVAL;
-+ goto err_no_irq;
-+ }
-+
-+ host->hw_name = dev_name(&ofdev->dev);
-+ if (sdhci_of_data) {
-+ host->quirks = sdhci_of_data->quirks;
-+ host->ops = &sdhci_of_data->ops;
-+ }
-+
-+ if (of_get_property(np, "sdhci,auto-cmd12", NULL))
-+ host->quirks |= SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12;
-+
-+
-+ if (of_get_property(np, "sdhci,1-bit-only", NULL))
-+ host->quirks |= SDHCI_QUIRK_FORCE_1_BIT_DATA;
-+
-+ if (sdhci_of_wp_inverted(np))
-+ host->quirks |= SDHCI_QUIRK_INVERTED_WRITE_PROTECT;
-+
-+ if (of_device_is_compatible(np, "fsl,esdhc"))
-+ host->quirks |= SDHCI_QUIRK_QORIQ_PROCTL_WEIRD;
-+
-+ if (of_device_is_compatible(np, "fsl,p4080-esdhc"))
-+ host->quirks |= SDHCI_QUIRK_QORIQ_HOSTCAPBLT_ONLY_VS33;
-+
-+ if (of_device_is_compatible(np, "fsl,p2020-rev1-esdhc"))
-+ host->quirks |= SDHCI_QUIRK_BROKEN_DMA;
-+
-+ if (of_device_is_compatible(np, "fsl,p2020-esdhc") ||
-+ of_device_is_compatible(np, "fsl,p1010-esdhc") ||
-+ of_device_is_compatible(np, "fsl,t4240-esdhc") ||
-+ of_device_is_compatible(np, "fsl,mpc8536-esdhc"))
-+ host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
-+
-+ if (of_device_is_compatible(np, "fsl,t4240-esdhc")) {
-+ host->quirks |= SDHCI_QUIRK_BROKEN_ADMA;
-+ host->quirks |= SDHCI_QUIRK_QORIQ_CIRCUIT_SUPPORT_VS33;
-+ host->quirks |= SDHCI_QUIRK_LONG_TIME_CMD_COMPLETE_IRQ;
-+ }
-+
-+ clk = of_get_property(np, "clock-frequency", &size);
-+ if (clk && size == sizeof(*clk) && *clk)
-+ of_host->clock = be32_to_cpup(clk);
-+
-+ ret = sdhci_add_host(host);
-+ if (ret)
-+ goto err_add_host;
-+
-+ return 0;
-+
-+err_add_host:
-+ irq_dispose_mapping(host->irq);
-+err_no_irq:
-+ iounmap(host->ioaddr);
-+err_addr_map:
-+ sdhci_free_host(host);
-+ return ret;
-+}
-+
-+static int __devexit sdhci_of_remove(struct platform_device *ofdev)
-+{
-+ struct sdhci_host *host = dev_get_drvdata(&ofdev->dev);
-+
-+ sdhci_remove_host(host, 0);
-+ sdhci_free_host(host);
-+ irq_dispose_mapping(host->irq);
-+ iounmap(host->ioaddr);
-+ return 0;
-+}
-+
-+static const struct of_device_id sdhci_of_match[] = {
-+#ifdef CONFIG_MMC_SDHCI_OF_ESDHC
-+ { .compatible = "fsl,mpc8379-esdhc", .data = &sdhci_esdhc, },
-+ { .compatible = "fsl,mpc8536-esdhc", .data = &sdhci_esdhc, },
-+ { .compatible = "fsl,esdhc", .data = &sdhci_esdhc, },
-+#endif
-+#ifdef CONFIG_MMC_SDHCI_OF_HLWD
-+ { .compatible = "nintendo,hollywood-sdhci", .data = &sdhci_hlwd, },
-+#endif
-+ { .compatible = "generic-sdhci", },
-+ {},
-+};
-+MODULE_DEVICE_TABLE(of, sdhci_of_match);
-+
-+static struct platform_driver sdhci_of_driver = {
-+ .driver = {
-+ .name = "sdhci-of",
-+ .owner = THIS_MODULE,
-+ .of_match_table = sdhci_of_match,
-+ },
-+ .probe = sdhci_of_probe,
-+ .remove = __devexit_p(sdhci_of_remove),
-+ .suspend = sdhci_of_suspend,
-+ .resume = sdhci_of_resume,
-+};
-+
-+static int __init sdhci_of_init(void)
-+{
-+ return platform_driver_register(&sdhci_of_driver);
-+}
-+module_init(sdhci_of_init);
-+
-+static void __exit sdhci_of_exit(void)
-+{
-+ platform_driver_unregister(&sdhci_of_driver);
-+}
-+module_exit(sdhci_of_exit);
-+
-+MODULE_DESCRIPTION("Secure Digital Host Controller Interface OF driver");
-+MODULE_AUTHOR("Xiaobo Xie , "
-+ "Anton Vorontsov ");
-+MODULE_LICENSE("GPL");
-diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
-index 99aa7fa..c1384c7 100644
---- a/drivers/net/Kconfig
-+++ b/drivers/net/Kconfig
-@@ -340,4 +340,99 @@ config VMXNET3
-
- source "drivers/net/hyperv/Kconfig"
-
-+config DPA
-+ bool "Freescale Data Path Frame Manager Ethernet"
-+ depends on FSL_SOC && FSL_BMAN && FSL_QMAN && FSL_FMAN && LIBFCOE=n
-+ select PHYLIB
-+
-+config DPA_OFFLINE_PORTS
-+ bool "Offline Ports support"
-+ depends on DPA
-+ default y
-+ help
-+ The Offline Parsing / Host Command ports (short: OH ports, of Offline ports) provide
-+ most of the functionality of the regular, online ports, except they receive their
-+ frames from a core or an accelerator on the SoC, via QMan frame queues,
-+ rather than directly from the network.
-+ Offline ports are configured via PCD (Parse-Classify-Distribute) schemes, just like
-+ any online FMan port. They deliver the processed frames to frame queues, according
-+ to the applied PCD configurations.
-+
-+ Choosing this feature will not impact the functionality and/or performance of the system,
-+ so it is safe to have it.
-+
-+config DPAA_ETH_SG_SUPPORT
-+ bool
-+
-+choice DPAA_ETH_OPTIMIZE
-+ prompt "Optimization choices for the DPAA Ethernet driver"
-+ depends on DPA
-+ default DPAA_ETH_OPTIMIZE_FOR_IPFWD
-+
-+ ---help---
-+ Compile-time switch between driver optimizations for forwarding use-cases and
-+ termination scenarios.
-+
-+ config DPAA_ETH_OPTIMIZE_FOR_IPFWD
-+ bool "Optimize for forwarding"
-+ select DPA_TX_RECYCLE if FMAN_T4240
-+ help
-+ Optimize the DPAA-Ethernet driver for IP/IPSec forwarding use-cases.
-+
-+ config DPAA_ETH_OPTIMIZE_FOR_TERM
-+ bool "Optimize for termination"
-+ select DPAA_ETH_SG_SUPPORT
-+ help
-+ Optimize the DPAA-Ethernet driver for termination (TCP, UDP) use-cases.
-+ In particular, this choice enables Scatter-Gather (SG) support
-+ in the driver, which is momentarily not accessible otherwise.
-+
-+endchoice
-+
-+config DPA_TX_RECYCLE
-+ bool
-+ depends on FMAN_T4240
-+
-+config FSL_DPA_1588
-+ tristate "IEEE 1588-compliant timestamping"
-+ depends on DPA
-+ default n
-+
-+choice DPA_ETH_WQ_ASSIGN
-+ prompt "WorkQueue assignment scheme for FrameQueues"
-+ depends on DPA
-+ default DPA_ETH_WQ_MULTI
-+ help
-+ Selects the FrameQueue to WorkQueue assignment scheme.
-+
-+ config DPA_ETH_WQ_LEGACY
-+ bool "Legacy WQ assignment"
-+ help
-+ Statically-defined FQIDs are round-robin assigned to all WQs (0..7). PCD queues are always
-+ in this category. Other frame queues may be those used for "MAC-less" or "shared MAC" configurations
-+ of the driver.
-+ Dynamically-defined FQIDs all go to WQ7.
-+ config DPA_ETH_WQ_MULTI
-+ bool "Multi-WQ assignment"
-+ help
-+ Tx Confirmation FQs go to WQ1.
-+ Rx Default, Tx and PCD FQs go to WQ3.
-+ Rx Error and Tx Error FQs go to WQ2.
-+endchoice
-+
-+config DPAA_ETH_USE_NDO_SELECT_QUEUE
-+ bool "Use driver's Tx queue selection mechanism"
-+ default y
-+ ---help---
-+ The DPAA-Ethernet driver defines a ndo_select_queue() callback for optimal selection
-+ of the egress FQ. That will override the XPS support for this netdevice.
-+ If for whatever reason you want to be in control of the egress FQ-to-CPU selection and mapping,
-+ or simply don't want to use the driver's ndo_select_queue() callback, then unselect this
-+ and use the standard XPS support instead.
-+
-+config DPAA_ETH_UNIT_TESTS
-+ bool "Run Unit Tests for DPAA Ethernet"
-+ depends on DPA
-+ default y
-+
- endif # NETDEVICES
-diff --git a/drivers/net/Makefile b/drivers/net/Makefile
-index a81192b..435771c 100644
---- a/drivers/net/Makefile
-+++ b/drivers/net/Makefile
-@@ -57,6 +57,8 @@ obj-$(CONFIG_VMXNET3) += vmxnet3/
- obj-$(CONFIG_XEN_NETDEV_FRONTEND) += xen-netfront.o
- obj-$(CONFIG_XEN_NETDEV_BACKEND) += xen-netback/
-
-+obj-$(if $(CONFIG_DPA),y) += dpa/
-+
- obj-$(CONFIG_USB_CATC) += usb/
- obj-$(CONFIG_USB_KAWETH) += usb/
- obj-$(CONFIG_USB_PEGASUS) += usb/
-diff --git a/drivers/net/dpa/Makefile b/drivers/net/dpa/Makefile
-new file mode 100644
-index 0000000..0e59076
---- /dev/null
-+++ b/drivers/net/dpa/Makefile
-@@ -0,0 +1,21 @@
-+#
-+# Makefile for the Freescale Ethernet controllers
-+#
-+EXTRA_CFLAGS += -DVERSION=\"\"
-+#
-+#Include netcomm SW specific definitions
-+include $(srctree)/drivers/net/dpa/NetCommSw/ncsw_config.mk
-+
-+EXTRA_CFLAGS += -I$(NET_DPA)
-+
-+#Netcomm SW tree
-+obj-$(CONFIG_FSL_FMAN) += NetCommSw/
-+obj-$(CONFIG_FSL_DPA_1588) += dpaa_1588.o
-+obj-$(CONFIG_DPAA_ETH_SG_SUPPORT) += fsl-dpa-sg.o
-+obj-$(CONFIG_DPA) += fsl-mac.o fsl-dpa.o
-+obj-$(CONFIG_DPA_OFFLINE_PORTS) += fsl-oh.o
-+
-+fsl-dpa-objs := dpa-ethtool.o dpaa_eth.o dpaa_eth_sysfs.o xgmac_mdio.o memac_mdio.o
-+fsl-dpa-sg-objs := dpaa_eth_sg.o
-+fsl-mac-objs := mac.o mac-api.o
-+fsl-oh-objs := offline_port.o
-diff --git a/drivers/net/dpa/NetCommSw/Kconfig b/drivers/net/dpa/NetCommSw/Kconfig
-new file mode 100644
-index 0000000..e640465
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Kconfig
-@@ -0,0 +1,112 @@
-+menu "Frame Manager support"
-+
-+menuconfig FSL_FMAN
-+ bool "Freescale Frame Manager (datapath) support"
-+ # depends on PPC_E500MC
-+ default y
-+ ---help---
-+ If unsure, say Y.
-+
-+if FSL_FMAN
-+
-+config FSL_FMAN_TEST
-+ bool "FMan test module"
-+ default n
-+ ---help---
-+ This option compiles test code for FMan.
-+
-+menu "FMAN Processor support"
-+choice
-+ depends on FSL_FMAN
-+ prompt "Processor Type"
-+
-+config FMAN_P3040_P4080_P5020
-+ bool "P3040 P4080 5020"
-+
-+config FMAN_P1023
-+ bool "P1023"
-+
-+config FMAN_T4240
-+ bool "T4240"
-+
-+endchoice
-+endmenu
-+
-+config FMAN_RESOURCE_ALLOCATION_ALGORITHM
-+ bool "Enable FMan dynamic resource allocation algorithm"
-+ default n
-+ ---help---
-+ Enables algorithm for dynamic resource allocation
-+
-+config FMAN_DISABLE_OH_TO_REUSE_RESOURCES
-+ depends on FMAN_RESOURCE_ALLOCATION_ALGORITHM
-+ bool "Disable offline parsing ports to reuse resources"
-+ default n
-+ ---help---
-+ Redistributes FMan OH's resources to all other ports,
-+ thus enabling other configurations.
-+
-+config FMAN_MIB_CNT_OVF_IRQ_EN
-+ bool "Enable the dTSEC MIB counters overflow interrupt"
-+ default n
-+ ---help---
-+ Enable the dTSEC MIB counters overflow interrupt to get
-+ accurate MIB counters values. Enabled it compensates
-+ for the counters overflow but reduces performance and
-+ triggers error messages in HV setups.
-+
-+
-+config FSL_FM_MAX_FRAME_SIZE
-+ int "Maximum L2 frame size"
-+ depends on FSL_FMAN
-+ range 64 9600
-+ default "1522"
-+ help
-+ Configure this in relation to the maximum possible MTU of your
-+ network configuration. In particular, one would need to
-+ increase this value in order to use jumbo frames.
-+ FSL_FM_MAX_FRAME_SIZE must accomodate the Ethernet FCS (4 bytes)
-+ and one ETH+VLAN header (18 bytes), to a total of 22 bytes in
-+ excess of the desired L3 MTU.
-+
-+ Note that having too large a FSL_FM_MAX_FRAME_SIZE (much larger
-+ than the actual MTU) may lead to buffer exhaustion, especially
-+ in the case of badly fragmented datagrams on the Rx path.
-+ Conversely, having a FSL_FM_MAX_FRAME_SIZE smaller than the actual
-+ MTU will lead to frames being dropped.
-+
-+ This can be overridden by specifying "fsl_fm_max_frm" in
-+ the kernel bootargs:
-+ * in Hypervisor-based scenarios, by adding a "chosen" node
-+ with the "bootargs" property specifying
-+ "fsl_fm_max_frm=";
-+ * in non-Hypervisor-based scenarios, via u-boot's env, by
-+ modifying the "bootargs" env variable.
-+
-+config FSL_FM_RX_EXTRA_HEADROOM
-+ int "Add extra headroom at beginning of data buffers"
-+ depends on FSL_FMAN
-+ range 0 384
-+ default "64"
-+ help
-+ Configure this to tell the Frame Manager to reserve some extra
-+ space at the beginning of a data buffer on the receive path,
-+ before Internal Context fields are copied. This is in addition
-+ to the private data area already reserved for driver internal
-+ use. The option does not affect in any way the layout of
-+ transmitted buffers. You may be required to enable the config
-+ option FMAN_RESOURCE_ALLOCATION_ALGORITHM and also
-+ FMAN_DISABLE_OH_TO_REUSE_RESOURCES to have enough resources
-+ when using this option and also supporting jumbo frames.
-+
-+ This setting can be overridden by specifying
-+ "fsl_fm_rx_extra_headroom" in the kernel bootargs:
-+ * in Hypervisor-based scenarios, by adding a "chosen" node
-+ with the "bootargs" property specifying
-+ "fsl_fm_rx_extra_headroom=";
-+ * in non-Hypervisor-based scenarios, via u-boot's env, by
-+ modifying the "bootargs" env variable.
-+
-+endif # FSL_FMAN
-+
-+endmenu
-diff --git a/drivers/net/dpa/NetCommSw/Makefile b/drivers/net/dpa/NetCommSw/Makefile
-new file mode 100644
-index 0000000..c21d5a5
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Makefile
-@@ -0,0 +1,11 @@
-+#
-+# Makefile for the Freescale Ethernet controllers
-+#
-+EXTRA_CFLAGS += -DVERSION=\"\"
-+#
-+#Include netcomm SW specific definitions
-+include $(srctree)/drivers/net/dpa/NetCommSw/ncsw_config.mk
-+#
-+obj-y += etc/
-+obj-y += Peripherals/FM/
-+obj-y += src/
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/HC/Makefile b/drivers/net/dpa/NetCommSw/Peripherals/FM/HC/Makefile
-new file mode 100644
-index 0000000..3ec3824
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/HC/Makefile
-@@ -0,0 +1,15 @@
-+#
-+# Makefile for the Freescale Ethernet controllers
-+#
-+EXTRA_CFLAGS += -DVERSION=\"\"
-+#
-+#Include netcomm SW specific definitions
-+include $(srctree)/drivers/net/dpa/NetCommSw/ncsw_config.mk
-+
-+NCSW_FM_INC = $(srctree)/drivers/net/dpa/NetCommSw/Peripherals/FM/inc
-+
-+EXTRA_CFLAGS += -I$(NCSW_FM_INC)
-+
-+obj-y += fsl-ncsw-Hc.o
-+
-+fsl-ncsw-Hc-objs := hc.o
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/HC/hc.c b/drivers/net/dpa/NetCommSw/Peripherals/FM/HC/hc.c
-new file mode 100644
-index 0000000..dca9478
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/HC/hc.c
-@@ -0,0 +1,1191 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+#include "std_ext.h"
-+#include "error_ext.h"
-+#include "sprint_ext.h"
-+#include "string_ext.h"
-+
-+#include "fm_common.h"
-+#include "fm_hc.h"
-+
-+
-+/**************************************************************************//**
-+ @Description defaults
-+*//***************************************************************************/
-+#define DEFAULT_dataMemId 0
-+
-+#define HC_HCOR_OPCODE_PLCR_PRFL 0x0
-+#define HC_HCOR_OPCODE_KG_SCM 0x1
-+#define HC_HCOR_OPCODE_SYNC 0x2
-+#define HC_HCOR_OPCODE_CC 0x3
-+#define HC_HCOR_OPCODE_CC_CAPWAP_REASSM_TIMEOUT 0x5
-+#define HC_HCOR_OPCODE_CC_IP_REASSM_TIMEOUT 0x10
-+#define HC_HCOR_OPCODE_CC_IP_FRAG_INITIALIZATION 0x11
-+#define HC_HCOR_ACTION_REG_IP_REASSM_TIMEOUT_ACTIVE_SHIFT 24
-+#define HC_HCOR_EXTRA_REG_IP_REASSM_TIMEOUT_TSBS_SHIFT 24
-+#define HC_HCOR_ACTION_REG_IP_REASSM_TIMEOUT_RES_SHIFT 16
-+#define HC_HCOR_ACTION_REG_IP_REASSM_TIMEOUT_RES_MASK 0xF
-+#define HC_HCOR_ACTION_REG_IP_FRAG_SCRATCH_POOL_CMD_SHIFT 24
-+#define HC_HCOR_ACTION_REG_IP_FRAG_SCRATCH_POOL_BPID 16
-+
-+#define HC_HCOR_GBL 0x20000000
-+
-+#define HC_HCOR_KG_SCHEME_COUNTER 0x00000400
-+
-+#if (DPAA_VERSION == 10)
-+#define HC_HCOR_KG_SCHEME_REGS_MASK 0xFFFFF800
-+#else
-+#define HC_HCOR_KG_SCHEME_REGS_MASK 0xFFFFFE00
-+#endif /* (DPAA_VERSION == 10) */
-+
-+#define SIZE_OF_HC_FRAME_PORT_REGS (sizeof(t_HcFrame)-sizeof(struct fman_kg_scheme_regs)+sizeof(t_FmPcdKgPortRegs))
-+#define SIZE_OF_HC_FRAME_SCHEME_REGS sizeof(t_HcFrame)
-+#define SIZE_OF_HC_FRAME_PROFILES_REGS (sizeof(t_HcFrame)-sizeof(struct fman_kg_scheme_regs)+sizeof(t_FmPcdPlcrProfileRegs))
-+#define SIZE_OF_HC_FRAME_PROFILE_CNT (sizeof(t_HcFrame)-sizeof(t_FmPcdPlcrProfileRegs)+sizeof(uint32_t))
-+#define SIZE_OF_HC_FRAME_READ_OR_CC_DYNAMIC 16
-+
-+#define HC_CMD_POOL_SIZE (INTG_MAX_NUM_OF_CORES)
-+
-+#define BUILD_FD(len) \
-+do { \
-+ memset(&fmFd, 0, sizeof(t_DpaaFD)); \
-+ DPAA_FD_SET_ADDR(&fmFd, p_HcFrame); \
-+ DPAA_FD_SET_OFFSET(&fmFd, 0); \
-+ DPAA_FD_SET_LENGTH(&fmFd, len); \
-+} while (0)
-+
-+
-+#if defined(__MWERKS__) && !defined(__GNUC__)
-+#pragma pack(push,1)
-+#endif /* defined(__MWERKS__) && ... */
-+
-+typedef _Packed struct t_FmPcdKgPortRegs {
-+ volatile uint32_t spReg;
-+ volatile uint32_t cppReg;
-+} _PackedType t_FmPcdKgPortRegs;
-+
-+typedef _Packed struct t_HcFrame {
-+ volatile uint32_t opcode;
-+ volatile uint32_t actionReg;
-+ volatile uint32_t extraReg;
-+ volatile uint32_t commandSequence;
-+ union {
-+ struct fman_kg_scheme_regs schemeRegs;
-+ struct fman_kg_scheme_regs schemeRegsWithoutCounter;
-+ t_FmPcdPlcrProfileRegs profileRegs;
-+ volatile uint32_t singleRegForWrite; /* for writing SP, CPP, profile counter */
-+ t_FmPcdKgPortRegs portRegsForRead;
-+ volatile uint32_t clsPlanEntries[CLS_PLAN_NUM_PER_GRP];
-+ t_FmPcdCcCapwapReassmTimeoutParams ccCapwapReassmTimeout;
-+ t_FmPcdCcIpReassmTimeoutParams ccIpReassmTimeout;
-+ } hcSpecificData;
-+} _PackedType t_HcFrame;
-+
-+#if defined(__MWERKS__) && !defined(__GNUC__)
-+#pragma pack(pop)
-+#endif /* defined(__MWERKS__) && ... */
-+
-+
-+typedef struct t_FmHc {
-+ t_Handle h_FmPcd;
-+ t_Handle h_HcPortDev;
-+ t_FmPcdQmEnqueueCallback *f_QmEnqueue; /**< A callback for enqueuing frames to the QM */
-+ t_Handle h_QmArg; /**< A handle to the QM module */
-+ uint8_t dataMemId; /**< Memory partition ID for data buffers */
-+
-+ uint32_t seqNum[HC_CMD_POOL_SIZE]; /* FIFO of seqNum to use when
-+ taking buffer */
-+ uint32_t nextSeqNumLocation; /* seqNum location in seqNum[] for next buffer */
-+ volatile bool enqueued[HC_CMD_POOL_SIZE]; /* HC is active - frame is enqueued
-+ and not confirmed yet */
-+ t_HcFrame *p_Frm[HC_CMD_POOL_SIZE];
-+} t_FmHc;
-+
-+
-+static t_Error FillBufPool(t_FmHc *p_FmHc)
-+{
-+ uint32_t i;
-+
-+ ASSERT_COND(p_FmHc);
-+
-+ for (i = 0; i < HC_CMD_POOL_SIZE; i++)
-+ {
-+#ifdef FM_LOCKUP_ALIGNMENT_ERRATA_FMAN_SW004
-+ p_FmHc->p_Frm[i] = (t_HcFrame *)XX_MallocSmart((sizeof(t_HcFrame) + (16 - (sizeof(t_FmHc) % 16))),
-+ p_FmHc->dataMemId,
-+ 16);
-+#else
-+ p_FmHc->p_Frm[i] = (t_HcFrame *)XX_MallocSmart(sizeof(t_HcFrame),
-+ p_FmHc->dataMemId,
-+ 16);
-+#endif /* FM_LOCKUP_ALIGNMENT_ERRATA_FMAN_SW004 */
-+ if (!p_FmHc->p_Frm[i])
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("FM HC frames!"));
-+ }
-+
-+ /* Initialize FIFO of seqNum to use during GetBuf */
-+ for (i = 0; i < HC_CMD_POOL_SIZE; i++)
-+ {
-+ p_FmHc->seqNum[i] = i;
-+ }
-+ p_FmHc->nextSeqNumLocation = 0;
-+
-+ return E_OK;
-+}
-+
-+static __inline__ t_HcFrame * GetBuf(t_FmHc *p_FmHc, uint32_t *p_SeqNum)
-+{
-+ uint32_t intFlags;
-+
-+ ASSERT_COND(p_FmHc);
-+
-+ intFlags = FmPcdLock(p_FmHc->h_FmPcd);
-+
-+ if (p_FmHc->nextSeqNumLocation == HC_CMD_POOL_SIZE)
-+ {
-+ /* No more buffers */
-+ FmPcdUnlock(p_FmHc->h_FmPcd, intFlags);
-+ return NULL;
-+ }
-+
-+ *p_SeqNum = p_FmHc->seqNum[p_FmHc->nextSeqNumLocation];
-+ p_FmHc->nextSeqNumLocation++;
-+
-+ FmPcdUnlock(p_FmHc->h_FmPcd, intFlags);
-+ return p_FmHc->p_Frm[*p_SeqNum];
-+}
-+
-+static __inline__ void PutBuf(t_FmHc *p_FmHc, t_HcFrame *p_Buf, uint32_t seqNum)
-+{
-+ uint32_t intFlags;
-+
-+ UNUSED(p_Buf);
-+
-+ intFlags = FmPcdLock(p_FmHc->h_FmPcd);
-+ ASSERT_COND(p_FmHc->nextSeqNumLocation);
-+ p_FmHc->nextSeqNumLocation--;
-+ p_FmHc->seqNum[p_FmHc->nextSeqNumLocation] = seqNum;
-+ FmPcdUnlock(p_FmHc->h_FmPcd, intFlags);
-+}
-+
-+static __inline__ t_Error EnQFrm(t_FmHc *p_FmHc, t_DpaaFD *p_FmFd, uint32_t seqNum)
-+{
-+ t_Error err = E_OK;
-+ uint32_t intFlags;
-+ uint32_t timeout=100;
-+
-+ intFlags = FmPcdLock(p_FmHc->h_FmPcd);
-+ ASSERT_COND(!p_FmHc->enqueued[seqNum]);
-+ p_FmHc->enqueued[seqNum] = TRUE;
-+ FmPcdUnlock(p_FmHc->h_FmPcd, intFlags);
-+ DBG(TRACE, ("Send Hc, SeqNum %d, buff@0x%x, fd offset 0x%x",
-+ seqNum,
-+ DPAA_FD_GET_ADDR(p_FmFd),
-+ DPAA_FD_GET_OFFSET(p_FmFd)));
-+ err = p_FmHc->f_QmEnqueue(p_FmHc->h_QmArg, (void *)p_FmFd);
-+ if (err)
-+ RETURN_ERROR(MINOR, err, ("HC enqueue failed"));
-+
-+ while (p_FmHc->enqueued[seqNum] && --timeout)
-+ XX_UDelay(100);
-+
-+ if (!timeout)
-+ RETURN_ERROR(MINOR, E_TIMEOUT, ("HC Callback, timeout exceeded"));
-+
-+ return err;
-+}
-+
-+
-+t_Handle FmHcConfigAndInit(t_FmHcParams *p_FmHcParams)
-+{
-+ t_FmHc *p_FmHc;
-+ t_FmPortParams fmPortParam;
-+ t_Error err;
-+
-+ p_FmHc = (t_FmHc *)XX_Malloc(sizeof(t_FmHc));
-+ if (!p_FmHc)
-+ {
-+ REPORT_ERROR(MINOR, E_NO_MEMORY, ("HC obj"));
-+ return NULL;
-+ }
-+ memset(p_FmHc,0,sizeof(t_FmHc));
-+
-+ p_FmHc->h_FmPcd = p_FmHcParams->h_FmPcd;
-+ p_FmHc->f_QmEnqueue = p_FmHcParams->params.f_QmEnqueue;
-+ p_FmHc->h_QmArg = p_FmHcParams->params.h_QmArg;
-+ p_FmHc->dataMemId = DEFAULT_dataMemId;
-+
-+ err = FillBufPool(p_FmHc);
-+ if (err != E_OK)
-+ {
-+ REPORT_ERROR(MAJOR, err, NO_MSG);
-+ FmHcFree(p_FmHc);
-+ return NULL;
-+ }
-+
-+ if (!FmIsMaster(p_FmHcParams->h_Fm))
-+ return (t_Handle)p_FmHc;
-+
-+ memset(&fmPortParam, 0, sizeof(fmPortParam));
-+ fmPortParam.baseAddr = p_FmHcParams->params.portBaseAddr;
-+ fmPortParam.portType = e_FM_PORT_TYPE_OH_HOST_COMMAND;
-+ fmPortParam.portId = p_FmHcParams->params.portId;
-+ fmPortParam.liodnBase = p_FmHcParams->params.liodnBase;
-+ fmPortParam.h_Fm = p_FmHcParams->h_Fm;
-+
-+ fmPortParam.specificParams.nonRxParams.errFqid = p_FmHcParams->params.errFqid;
-+ fmPortParam.specificParams.nonRxParams.dfltFqid = p_FmHcParams->params.confFqid;
-+ fmPortParam.specificParams.nonRxParams.qmChannel = p_FmHcParams->params.qmChannel;
-+
-+ p_FmHc->h_HcPortDev = FM_PORT_Config(&fmPortParam);
-+ if (!p_FmHc->h_HcPortDev)
-+ {
-+ REPORT_ERROR(MAJOR, E_INVALID_HANDLE, ("FM HC port!"));
-+ XX_Free(p_FmHc);
-+ return NULL;
-+ }
-+
-+ /* final init */
-+ err = FM_PORT_Init(p_FmHc->h_HcPortDev);
-+ if (err != E_OK)
-+ {
-+ REPORT_ERROR(MAJOR, err, ("FM HC port init!"));
-+ FmHcFree(p_FmHc);
-+ return NULL;
-+ }
-+
-+ err = FM_PORT_Enable(p_FmHc->h_HcPortDev);
-+ if (err != E_OK)
-+ {
-+ REPORT_ERROR(MAJOR, err, ("FM HC port enable!"));
-+ FmHcFree(p_FmHc);
-+ return NULL;
-+ }
-+
-+ return (t_Handle)p_FmHc;
-+}
-+
-+t_Handle FmGcGetHcPortDevH(t_Handle h_FmHc)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc *)h_FmHc;
-+
-+ return (p_FmHc) ? p_FmHc->h_HcPortDev : NULL;
-+}
-+
-+void FmHcFree(t_Handle h_FmHc)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ int i;
-+
-+ if (!p_FmHc)
-+ return;
-+
-+ for (i=0; ip_Frm[i])
-+ XX_FreeSmart(p_FmHc->p_Frm[i]);
-+ else
-+ break;
-+
-+ if (p_FmHc->h_HcPortDev)
-+ FM_PORT_Free(p_FmHc->h_HcPortDev);
-+
-+ XX_Free(p_FmHc);
-+}
-+
-+/*****************************************************************************/
-+t_Error FmHcSetFramesDataMemory(t_Handle h_FmHc,
-+ uint8_t memId)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ int i;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmHc, E_INVALID_HANDLE);
-+
-+ p_FmHc->dataMemId = memId;
-+
-+ for (i=0; ip_Frm[i])
-+ XX_FreeSmart(p_FmHc->p_Frm[i]);
-+
-+ return FillBufPool(p_FmHc);
-+}
-+
-+#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))
-+t_Error FmHcDumpRegs(t_Handle h_FmHc)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmHc, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmHc->h_HcPortDev, E_INVALID_HANDLE);
-+
-+ return FM_PORT_DumpRegs(p_FmHc->h_HcPortDev);
-+
-+}
-+#endif /* (defined(DEBUG_ERRORS) && ... */
-+
-+void FmHcTxConf(t_Handle h_FmHc, t_DpaaFD *p_Fd)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ t_HcFrame *p_HcFrame;
-+ uint32_t intFlags;
-+
-+ ASSERT_COND(p_FmHc);
-+
-+ intFlags = FmPcdLock(p_FmHc->h_FmPcd);
-+ p_HcFrame = (t_HcFrame *)PTR_MOVE(DPAA_FD_GET_ADDR(p_Fd), DPAA_FD_GET_OFFSET(p_Fd));
-+
-+ DBG(TRACE, ("Hc Conf, SeqNum %d, FD@0x%x, fd offset 0x%x",
-+ p_HcFrame->commandSequence, DPAA_FD_GET_ADDR(p_Fd), DPAA_FD_GET_OFFSET(p_Fd)));
-+
-+ if (!(p_FmHc->enqueued[p_HcFrame->commandSequence]))
-+ REPORT_ERROR(MINOR, E_INVALID_FRAME, ("Not an Host-Command frame received!"));
-+ else
-+ p_FmHc->enqueued[p_HcFrame->commandSequence] = FALSE;
-+ FmPcdUnlock(p_FmHc->h_FmPcd, intFlags);
-+}
-+
-+t_Error FmHcPcdKgSetScheme(t_Handle h_FmHc,
-+ t_Handle h_Scheme,
-+ struct fman_kg_scheme_regs *p_SchemeRegs,
-+ bool updateCounter)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ t_Error err = E_OK;
-+ t_HcFrame *p_HcFrame;
-+ t_DpaaFD fmFd;
-+ uint8_t physicalSchemeId;
-+ uint32_t seqNum;
-+
-+ p_HcFrame = GetBuf(p_FmHc, &seqNum);
-+ if (!p_HcFrame)
-+ RETURN_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object"));
-+
-+ physicalSchemeId = FmPcdKgGetSchemeId(h_Scheme);
-+
-+ memset(p_HcFrame, 0, sizeof(t_HcFrame));
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_KG_SCM);
-+ p_HcFrame->actionReg = FmPcdKgBuildWriteSchemeActionReg(physicalSchemeId, updateCounter);
-+ p_HcFrame->extraReg = HC_HCOR_KG_SCHEME_REGS_MASK;
-+ memcpy(&p_HcFrame->hcSpecificData.schemeRegs, p_SchemeRegs, sizeof(struct fman_kg_scheme_regs));
-+ if (!updateCounter)
-+ {
-+ p_HcFrame->hcSpecificData.schemeRegs.kgse_dv0 = p_SchemeRegs->kgse_dv0;
-+ p_HcFrame->hcSpecificData.schemeRegs.kgse_dv1 = p_SchemeRegs->kgse_dv1;
-+ p_HcFrame->hcSpecificData.schemeRegs.kgse_ccbs = p_SchemeRegs->kgse_ccbs;
-+ p_HcFrame->hcSpecificData.schemeRegs.kgse_mv = p_SchemeRegs->kgse_mv;
-+ }
-+ p_HcFrame->commandSequence = seqNum;
-+
-+ BUILD_FD(sizeof(t_HcFrame));
-+
-+ err = EnQFrm(p_FmHc, &fmFd, seqNum);
-+
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+
-+ if (err != E_OK)
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+
-+ return E_OK;
-+}
-+
-+t_Error FmHcPcdKgDeleteScheme(t_Handle h_FmHc, t_Handle h_Scheme)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ t_Error err = E_OK;
-+ t_HcFrame *p_HcFrame;
-+ t_DpaaFD fmFd;
-+ uint8_t physicalSchemeId = FmPcdKgGetSchemeId(h_Scheme);
-+ uint32_t seqNum;
-+
-+ p_HcFrame = GetBuf(p_FmHc, &seqNum);
-+ if (!p_HcFrame)
-+ RETURN_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object"));
-+
-+ memset(p_HcFrame, 0, sizeof(t_HcFrame));
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_KG_SCM);
-+ p_HcFrame->actionReg = FmPcdKgBuildWriteSchemeActionReg(physicalSchemeId, TRUE);
-+ p_HcFrame->extraReg = HC_HCOR_KG_SCHEME_REGS_MASK;
-+ memset(&p_HcFrame->hcSpecificData.schemeRegs, 0, sizeof(struct fman_kg_scheme_regs));
-+ p_HcFrame->commandSequence = seqNum;
-+
-+ BUILD_FD(sizeof(t_HcFrame));
-+
-+ err = EnQFrm(p_FmHc, &fmFd, seqNum);
-+
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+
-+ if (err != E_OK)
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+
-+ return E_OK;
-+}
-+
-+t_Error FmHcPcdKgCcGetSetParams(t_Handle h_FmHc, t_Handle h_Scheme, uint32_t requiredAction, uint32_t value)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ t_Error err = E_OK;
-+ t_HcFrame *p_HcFrame;
-+ t_DpaaFD fmFd;
-+ uint8_t relativeSchemeId;
-+ uint8_t physicalSchemeId = FmPcdKgGetSchemeId(h_Scheme);
-+ uint32_t tmpReg32 = 0;
-+ uint32_t seqNum;
-+
-+ /* Scheme is locked by calling routine */
-+ /* WARNING - this lock will not be efficient if other HC routine will attempt to change
-+ * "kgse_mode" or "kgse_om" without locking scheme !
-+ */
-+
-+ relativeSchemeId = FmPcdKgGetRelativeSchemeId(p_FmHc->h_FmPcd, physicalSchemeId);
-+ if ( relativeSchemeId == FM_PCD_KG_NUM_OF_SCHEMES)
-+ RETURN_ERROR(MAJOR, E_NOT_IN_RANGE, NO_MSG);
-+
-+ if (!FmPcdKgGetPointedOwners(p_FmHc->h_FmPcd, relativeSchemeId) ||
-+ !(FmPcdKgGetRequiredAction(p_FmHc->h_FmPcd, relativeSchemeId) & requiredAction))
-+ {
-+ if ((requiredAction & UPDATE_NIA_ENQ_WITHOUT_DMA) &&
-+ (FmPcdKgGetNextEngine(p_FmHc->h_FmPcd, relativeSchemeId) == e_FM_PCD_PLCR))
-+ {
-+ if ((FmPcdKgIsDirectPlcr(p_FmHc->h_FmPcd, relativeSchemeId) == FALSE) ||
-+ (FmPcdKgIsDistrOnPlcrProfile(p_FmHc->h_FmPcd, relativeSchemeId) == TRUE))
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("In this situation PP can not be with distribution and has to be shared"));
-+ err = FmPcdPlcrCcGetSetParams(p_FmHc->h_FmPcd, FmPcdKgGetRelativeProfileId(p_FmHc->h_FmPcd, relativeSchemeId), requiredAction);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+ else /* From here we deal with KG-Schemes only */
-+ {
-+ /* Pre change general code */
-+ p_HcFrame = GetBuf(p_FmHc, &seqNum);
-+ if (!p_HcFrame)
-+ RETURN_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object"));
-+ memset(p_HcFrame, 0, sizeof(t_HcFrame));
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_KG_SCM);
-+ p_HcFrame->actionReg = FmPcdKgBuildReadSchemeActionReg(physicalSchemeId);
-+ p_HcFrame->extraReg = HC_HCOR_KG_SCHEME_REGS_MASK;
-+ p_HcFrame->commandSequence = seqNum;
-+ BUILD_FD(SIZE_OF_HC_FRAME_READ_OR_CC_DYNAMIC);
-+ if ((err = EnQFrm(p_FmHc, &fmFd, seqNum)) != E_OK)
-+ {
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+ }
-+
-+ /* specific change */
-+ if ((requiredAction & UPDATE_NIA_ENQ_WITHOUT_DMA) &&
-+ ((FmPcdKgGetNextEngine(p_FmHc->h_FmPcd, relativeSchemeId) == e_FM_PCD_DONE) &&
-+ (FmPcdKgGetDoneAction(p_FmHc->h_FmPcd, relativeSchemeId) == e_FM_PCD_ENQ_FRAME)))
-+ {
-+ tmpReg32 = p_HcFrame->hcSpecificData.schemeRegs.kgse_mode;
-+ ASSERT_COND(tmpReg32 & (NIA_ENG_BMI | NIA_BMI_AC_ENQ_FRAME));
-+ p_HcFrame->hcSpecificData.schemeRegs.kgse_mode = tmpReg32 | NIA_BMI_AC_ENQ_FRAME_WITHOUT_DMA;
-+ }
-+
-+ if ((requiredAction & UPDATE_KG_NIA_CC_WA) &&
-+ (FmPcdKgGetNextEngine(p_FmHc->h_FmPcd, relativeSchemeId) == e_FM_PCD_CC))
-+ {
-+ tmpReg32 = p_HcFrame->hcSpecificData.schemeRegs.kgse_mode;
-+ ASSERT_COND(tmpReg32 & (NIA_ENG_FM_CTL | NIA_FM_CTL_AC_CC));
-+ tmpReg32 &= ~NIA_FM_CTL_AC_CC;
-+ p_HcFrame->hcSpecificData.schemeRegs.kgse_mode = tmpReg32 | NIA_FM_CTL_AC_PRE_CC;
-+ }
-+
-+ if (requiredAction & UPDATE_KG_OPT_MODE)
-+ p_HcFrame->hcSpecificData.schemeRegs.kgse_om = value;
-+
-+ if (requiredAction & UPDATE_KG_NIA)
-+ {
-+ tmpReg32 = p_HcFrame->hcSpecificData.schemeRegs.kgse_mode;
-+ tmpReg32 &= ~(NIA_ENG_MASK | NIA_AC_MASK);
-+ tmpReg32 |= value;
-+ p_HcFrame->hcSpecificData.schemeRegs.kgse_mode = tmpReg32;
-+ }
-+
-+ /* Post change general code */
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_KG_SCM);
-+ p_HcFrame->actionReg = FmPcdKgBuildWriteSchemeActionReg(physicalSchemeId, FALSE);
-+ p_HcFrame->extraReg = HC_HCOR_KG_SCHEME_REGS_MASK;
-+
-+ BUILD_FD(sizeof(t_HcFrame));
-+ err = EnQFrm(p_FmHc, &fmFd, seqNum);
-+
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+
-+ if (err != E_OK)
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+ }
-+ }
-+
-+ return E_OK;
-+}
-+
-+uint32_t FmHcPcdKgGetSchemeCounter(t_Handle h_FmHc, t_Handle h_Scheme)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ t_Error err;
-+ t_HcFrame *p_HcFrame;
-+ t_DpaaFD fmFd;
-+ uint32_t retVal;
-+ uint8_t relativeSchemeId;
-+ uint8_t physicalSchemeId = FmPcdKgGetSchemeId(h_Scheme);
-+ uint32_t seqNum;
-+
-+ relativeSchemeId = FmPcdKgGetRelativeSchemeId(p_FmHc->h_FmPcd, physicalSchemeId);
-+ if ( relativeSchemeId == FM_PCD_KG_NUM_OF_SCHEMES)
-+ {
-+ REPORT_ERROR(MAJOR, E_NOT_IN_RANGE, NO_MSG);
-+ return 0;
-+ }
-+
-+ /* first read scheme and check that it is valid */
-+ p_HcFrame = GetBuf(p_FmHc, &seqNum);
-+ if (!p_HcFrame)
-+ {
-+ REPORT_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object"));
-+ return 0;
-+ }
-+ memset(p_HcFrame, 0, sizeof(t_HcFrame));
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_KG_SCM);
-+ p_HcFrame->actionReg = FmPcdKgBuildReadSchemeActionReg(physicalSchemeId);
-+ p_HcFrame->extraReg = HC_HCOR_KG_SCHEME_REGS_MASK;
-+ p_HcFrame->commandSequence = seqNum;
-+
-+ BUILD_FD(SIZE_OF_HC_FRAME_READ_OR_CC_DYNAMIC);
-+
-+ err = EnQFrm(p_FmHc, &fmFd, seqNum);
-+ if (err != E_OK)
-+ {
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ REPORT_ERROR(MINOR, err, NO_MSG);
-+ return 0;
-+ }
-+
-+ if (!FmPcdKgHwSchemeIsValid(p_HcFrame->hcSpecificData.schemeRegs.kgse_mode))
-+ {
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ REPORT_ERROR(MAJOR, E_ALREADY_EXISTS, ("Scheme is invalid"));
-+ return 0;
-+ }
-+
-+ retVal = p_HcFrame->hcSpecificData.schemeRegs.kgse_spc;
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+
-+ return retVal;
-+}
-+
-+t_Error FmHcPcdKgSetSchemeCounter(t_Handle h_FmHc, t_Handle h_Scheme, uint32_t value)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ t_Error err = E_OK;
-+ t_HcFrame *p_HcFrame;
-+ t_DpaaFD fmFd;
-+ uint8_t relativeSchemeId, physicalSchemeId;
-+ uint32_t seqNum;
-+
-+ physicalSchemeId = FmPcdKgGetSchemeId(h_Scheme);
-+ relativeSchemeId = FmPcdKgGetRelativeSchemeId(p_FmHc->h_FmPcd, physicalSchemeId);
-+ if ( relativeSchemeId == FM_PCD_KG_NUM_OF_SCHEMES)
-+ RETURN_ERROR(MAJOR, E_NOT_IN_RANGE, NO_MSG);
-+
-+ /* first read scheme and check that it is valid */
-+ p_HcFrame = GetBuf(p_FmHc, &seqNum);
-+ if (!p_HcFrame)
-+ RETURN_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object"));
-+ memset(p_HcFrame, 0, sizeof(t_HcFrame));
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_KG_SCM);
-+ p_HcFrame->actionReg = FmPcdKgBuildWriteSchemeActionReg(physicalSchemeId, TRUE);
-+ p_HcFrame->extraReg = HC_HCOR_KG_SCHEME_COUNTER;
-+ /* write counter */
-+ p_HcFrame->hcSpecificData.singleRegForWrite = value;
-+ p_HcFrame->commandSequence = seqNum;
-+
-+ BUILD_FD(sizeof(t_HcFrame));
-+
-+ err = EnQFrm(p_FmHc, &fmFd, seqNum);
-+
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ return err;
-+}
-+
-+t_Error FmHcPcdKgSetClsPlan(t_Handle h_FmHc, t_FmPcdKgInterModuleClsPlanSet *p_Set)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ t_HcFrame *p_HcFrame;
-+ t_DpaaFD fmFd;
-+ uint32_t i;
-+ uint32_t seqNum;
-+ t_Error err = E_OK;
-+
-+ ASSERT_COND(p_FmHc);
-+
-+ p_HcFrame = GetBuf(p_FmHc, &seqNum);
-+ if (!p_HcFrame)
-+ RETURN_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object"));
-+
-+ for (i = p_Set->baseEntry; i < (p_Set->baseEntry+p_Set->numOfClsPlanEntries); i+=8)
-+ {
-+ memset(p_HcFrame, 0, sizeof(t_HcFrame));
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_KG_SCM);
-+ p_HcFrame->actionReg = FmPcdKgBuildWriteClsPlanBlockActionReg((uint8_t)(i / CLS_PLAN_NUM_PER_GRP));
-+ p_HcFrame->extraReg = HC_HCOR_KG_SCHEME_REGS_MASK;
-+ memcpy((void*)&p_HcFrame->hcSpecificData.clsPlanEntries, (void *)&p_Set->vectors[i-p_Set->baseEntry], CLS_PLAN_NUM_PER_GRP*sizeof(uint32_t));
-+ p_HcFrame->commandSequence = seqNum;
-+
-+ BUILD_FD(sizeof(t_HcFrame));
-+
-+ if ((err = EnQFrm(p_FmHc, &fmFd, seqNum)) != E_OK)
-+ {
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+ }
-+ }
-+
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ return err;
-+}
-+
-+t_Error FmHcPcdKgDeleteClsPlan(t_Handle h_FmHc, uint8_t grpId)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ t_FmPcdKgInterModuleClsPlanSet *p_ClsPlanSet;
-+
-+ p_ClsPlanSet = (t_FmPcdKgInterModuleClsPlanSet *)XX_Malloc(sizeof(t_FmPcdKgInterModuleClsPlanSet));
-+ if (!p_ClsPlanSet)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("Classification plan set"));
-+
-+ memset(p_ClsPlanSet, 0, sizeof(t_FmPcdKgInterModuleClsPlanSet));
-+
-+ p_ClsPlanSet->baseEntry = FmPcdKgGetClsPlanGrpBase(p_FmHc->h_FmPcd, grpId);
-+ p_ClsPlanSet->numOfClsPlanEntries = FmPcdKgGetClsPlanGrpSize(p_FmHc->h_FmPcd, grpId);
-+ ASSERT_COND(p_ClsPlanSet->numOfClsPlanEntries <= FM_PCD_MAX_NUM_OF_CLS_PLANS);
-+
-+ if (FmHcPcdKgSetClsPlan(p_FmHc, p_ClsPlanSet) != E_OK)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, NO_MSG);
-+ XX_Free(p_ClsPlanSet);
-+
-+ FmPcdKgDestroyClsPlanGrp(p_FmHc->h_FmPcd, grpId);
-+
-+ return E_OK;
-+}
-+
-+t_Error FmHcPcdCcCapwapTimeoutReassm(t_Handle h_FmHc, t_FmPcdCcCapwapReassmTimeoutParams *p_CcCapwapReassmTimeoutParams )
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ t_HcFrame *p_HcFrame;
-+ t_DpaaFD fmFd;
-+ t_Error err;
-+ uint32_t seqNum;
-+
-+ SANITY_CHECK_RETURN_VALUE(h_FmHc, E_INVALID_HANDLE,0);
-+
-+ p_HcFrame = GetBuf(p_FmHc, &seqNum);
-+ if (!p_HcFrame)
-+ RETURN_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object"));
-+
-+ memset(p_HcFrame, 0, sizeof(t_HcFrame));
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_CC_CAPWAP_REASSM_TIMEOUT);
-+ memcpy(&p_HcFrame->hcSpecificData.ccCapwapReassmTimeout, p_CcCapwapReassmTimeoutParams, sizeof(t_FmPcdCcCapwapReassmTimeoutParams));
-+ p_HcFrame->commandSequence = seqNum;
-+ BUILD_FD(sizeof(t_HcFrame));
-+
-+ err = EnQFrm(p_FmHc, &fmFd, seqNum);
-+
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ return err;
-+}
-+
-+t_Error FmHcPcdCcIpFragScratchPollCmd(t_Handle h_FmHc, bool fill, t_FmPcdCcFragScratchPoolCmdParams *p_FmPcdCcFragScratchPoolCmdParams)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ t_HcFrame *p_HcFrame;
-+ t_DpaaFD fmFd;
-+ t_Error err;
-+ uint32_t seqNum;
-+
-+ SANITY_CHECK_RETURN_VALUE(h_FmHc, E_INVALID_HANDLE,0);
-+
-+ p_HcFrame = GetBuf(p_FmHc, &seqNum);
-+ if (!p_HcFrame)
-+ RETURN_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object"));
-+
-+ memset(p_HcFrame, 0, sizeof(t_HcFrame));
-+
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_CC_IP_FRAG_INITIALIZATION);
-+ p_HcFrame->actionReg = (uint32_t)(((fill == TRUE) ? 0 : 1) << HC_HCOR_ACTION_REG_IP_FRAG_SCRATCH_POOL_CMD_SHIFT);
-+ p_HcFrame->actionReg |= p_FmPcdCcFragScratchPoolCmdParams->bufferPoolId << HC_HCOR_ACTION_REG_IP_FRAG_SCRATCH_POOL_BPID;
-+ if (fill == TRUE)
-+ {
-+ p_HcFrame->extraReg = p_FmPcdCcFragScratchPoolCmdParams->numOfBuffers;
-+ }
-+ p_HcFrame->commandSequence = seqNum;
-+
-+ BUILD_FD(sizeof(t_HcFrame));
-+ if ((err = EnQFrm(p_FmHc, &fmFd, seqNum)) != E_OK)
-+ {
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+ }
-+
-+ p_FmPcdCcFragScratchPoolCmdParams->numOfBuffers = p_HcFrame->extraReg;
-+
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ return E_OK;
-+}
-+
-+t_Error FmHcPcdCcIpTimeoutReassm(t_Handle h_FmHc, t_FmPcdCcIpReassmTimeoutParams *p_CcIpReassmTimeoutParams, uint8_t *p_Result)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ t_HcFrame *p_HcFrame;
-+ t_DpaaFD fmFd;
-+ t_Error err;
-+ uint32_t seqNum;
-+
-+ SANITY_CHECK_RETURN_VALUE(h_FmHc, E_INVALID_HANDLE,0);
-+
-+ p_HcFrame = GetBuf(p_FmHc, &seqNum);
-+ if (!p_HcFrame)
-+ RETURN_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object"));
-+
-+ memset(p_HcFrame, 0, sizeof(t_HcFrame));
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_CC_IP_REASSM_TIMEOUT);
-+ p_HcFrame->actionReg = (uint32_t)((p_CcIpReassmTimeoutParams->activate ? 0 : 1) << HC_HCOR_ACTION_REG_IP_REASSM_TIMEOUT_ACTIVE_SHIFT);
-+ p_HcFrame->extraReg = (p_CcIpReassmTimeoutParams->tsbs << HC_HCOR_EXTRA_REG_IP_REASSM_TIMEOUT_TSBS_SHIFT) | p_CcIpReassmTimeoutParams->iprcpt;
-+ p_HcFrame->commandSequence = seqNum;
-+
-+ BUILD_FD(sizeof(t_HcFrame));
-+ if ((err = EnQFrm(p_FmHc, &fmFd, seqNum)) != E_OK)
-+ {
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+ }
-+
-+ *p_Result = (uint8_t)
-+ ((p_HcFrame->actionReg >> HC_HCOR_ACTION_REG_IP_REASSM_TIMEOUT_RES_SHIFT) & HC_HCOR_ACTION_REG_IP_REASSM_TIMEOUT_RES_MASK);
-+
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ return E_OK;
-+}
-+
-+t_Error FmHcPcdPlcrCcGetSetParams(t_Handle h_FmHc,uint16_t absoluteProfileId, uint32_t requiredAction)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ t_HcFrame *p_HcFrame;
-+ t_DpaaFD fmFd;
-+ t_Error err;
-+ uint32_t tmpReg32 = 0;
-+ uint32_t requiredActionTmp, pointedOwnersTmp;
-+ uint32_t seqNum;
-+
-+ SANITY_CHECK_RETURN_VALUE(h_FmHc, E_INVALID_HANDLE,0);
-+
-+ /* Profile is locked by calling routine */
-+ /* WARNING - this lock will not be efficient if other HC routine will attempt to change
-+ * "fmpl_pegnia" "fmpl_peynia" or "fmpl_pernia" without locking Profile !
-+ */
-+
-+ requiredActionTmp = FmPcdPlcrGetRequiredAction(p_FmHc->h_FmPcd, absoluteProfileId);
-+ pointedOwnersTmp = FmPcdPlcrGetPointedOwners(p_FmHc->h_FmPcd, absoluteProfileId);
-+
-+ if (!pointedOwnersTmp || !(requiredActionTmp & requiredAction))
-+ {
-+ if (requiredAction & UPDATE_NIA_ENQ_WITHOUT_DMA)
-+ {
-+ p_HcFrame = GetBuf(p_FmHc, &seqNum);
-+ if (!p_HcFrame)
-+ RETURN_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object"));
-+ /* first read scheme and check that it is valid */
-+ memset(p_HcFrame, 0, sizeof(t_HcFrame));
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_PLCR_PRFL);
-+ p_HcFrame->actionReg = FmPcdPlcrBuildReadPlcrActionReg(absoluteProfileId);
-+ p_HcFrame->extraReg = 0x00008000;
-+ p_HcFrame->commandSequence = seqNum;
-+
-+ BUILD_FD(SIZE_OF_HC_FRAME_READ_OR_CC_DYNAMIC);
-+
-+ if ((err = EnQFrm(p_FmHc, &fmFd, seqNum)) != E_OK)
-+ {
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+ }
-+
-+ tmpReg32 = p_HcFrame->hcSpecificData.profileRegs.fmpl_pegnia;
-+ if (!(tmpReg32 & (NIA_ENG_BMI | NIA_BMI_AC_ENQ_FRAME)))
-+ {
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE,
-+ ("Next engine of this policer profile has to be assigned to FM_PCD_DONE"));
-+ }
-+
-+ tmpReg32 |= NIA_BMI_AC_ENQ_FRAME_WITHOUT_DMA;
-+
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_PLCR_PRFL);
-+ p_HcFrame->actionReg = FmPcdPlcrBuildWritePlcrActionReg(absoluteProfileId);
-+ p_HcFrame->actionReg |= FmPcdPlcrBuildNiaProfileReg(TRUE, FALSE, FALSE);
-+ p_HcFrame->extraReg = 0x00008000;
-+ p_HcFrame->hcSpecificData.singleRegForWrite = tmpReg32;
-+
-+ BUILD_FD(SIZE_OF_HC_FRAME_PROFILE_CNT);
-+
-+ if ((err = EnQFrm(p_FmHc, &fmFd, seqNum)) != E_OK)
-+ {
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+ }
-+
-+ tmpReg32 = p_HcFrame->hcSpecificData.profileRegs.fmpl_peynia;
-+ if (!(tmpReg32 & (NIA_ENG_BMI | NIA_BMI_AC_ENQ_FRAME)))
-+ {
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Next engine of this policer profile has to be assigned to FM_PCD_DONE"));
-+ }
-+
-+ tmpReg32 |= NIA_BMI_AC_ENQ_FRAME_WITHOUT_DMA;
-+
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_PLCR_PRFL);
-+ p_HcFrame->actionReg = FmPcdPlcrBuildWritePlcrActionReg(absoluteProfileId);
-+ p_HcFrame->actionReg |= FmPcdPlcrBuildNiaProfileReg(FALSE, TRUE, FALSE);
-+ p_HcFrame->extraReg = 0x00008000;
-+ p_HcFrame->hcSpecificData.singleRegForWrite = tmpReg32;
-+
-+ BUILD_FD(SIZE_OF_HC_FRAME_PROFILE_CNT);
-+
-+ if ((err = EnQFrm(p_FmHc, &fmFd, seqNum)) != E_OK)
-+ {
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+ }
-+
-+ tmpReg32 = p_HcFrame->hcSpecificData.profileRegs.fmpl_pernia;
-+ if (!(tmpReg32 & (NIA_ENG_BMI | NIA_BMI_AC_ENQ_FRAME)))
-+ {
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Next engine of this policer profile has to be assigned to FM_PCD_DONE"));
-+ }
-+
-+ tmpReg32 |= NIA_BMI_AC_ENQ_FRAME_WITHOUT_DMA;
-+
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_PLCR_PRFL);
-+ p_HcFrame->actionReg = FmPcdPlcrBuildWritePlcrActionReg(absoluteProfileId);
-+ p_HcFrame->actionReg |= FmPcdPlcrBuildNiaProfileReg(FALSE, FALSE, TRUE);
-+ p_HcFrame->extraReg = 0x00008000;
-+ p_HcFrame->hcSpecificData.singleRegForWrite = tmpReg32;
-+
-+ BUILD_FD(SIZE_OF_HC_FRAME_PROFILE_CNT);
-+
-+ if ((err = EnQFrm(p_FmHc, &fmFd, seqNum)) != E_OK)
-+ {
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+ }
-+
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ }
-+ }
-+
-+ return E_OK;
-+}
-+
-+t_Error FmHcPcdPlcrSetProfile(t_Handle h_FmHc, t_Handle h_Profile, t_FmPcdPlcrProfileRegs *p_PlcrRegs)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ t_Error err = E_OK;
-+ uint16_t profileIndx;
-+ t_HcFrame *p_HcFrame;
-+ t_DpaaFD fmFd;
-+ uint32_t seqNum;
-+
-+ p_HcFrame = GetBuf(p_FmHc, &seqNum);
-+ if (!p_HcFrame)
-+ RETURN_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object"));
-+
-+ profileIndx = FmPcdPlcrProfileGetAbsoluteId(h_Profile);
-+
-+ memset(p_HcFrame, 0, sizeof(t_HcFrame));
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_PLCR_PRFL);
-+ p_HcFrame->actionReg = FmPcdPlcrBuildWritePlcrActionRegs(profileIndx);
-+ p_HcFrame->extraReg = 0x00008000;
-+ memcpy(&p_HcFrame->hcSpecificData.profileRegs, p_PlcrRegs, sizeof(t_FmPcdPlcrProfileRegs));
-+ p_HcFrame->commandSequence = seqNum;
-+
-+ BUILD_FD(sizeof(t_HcFrame));
-+
-+ err = EnQFrm(p_FmHc, &fmFd, seqNum);
-+
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+
-+ if (err != E_OK)
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+
-+ return E_OK;
-+}
-+
-+t_Error FmHcPcdPlcrDeleteProfile(t_Handle h_FmHc, t_Handle h_Profile)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ uint16_t absoluteProfileId = FmPcdPlcrProfileGetAbsoluteId(h_Profile);
-+ t_Error err = E_OK;
-+ t_HcFrame *p_HcFrame;
-+ t_DpaaFD fmFd;
-+ uint32_t seqNum;
-+
-+ p_HcFrame = GetBuf(p_FmHc, &seqNum);
-+ if (!p_HcFrame)
-+ RETURN_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object"));
-+ memset(p_HcFrame, 0, sizeof(t_HcFrame));
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_PLCR_PRFL);
-+ p_HcFrame->actionReg = FmPcdPlcrBuildWritePlcrActionReg(absoluteProfileId);
-+ p_HcFrame->actionReg |= 0x00008000;
-+ p_HcFrame->extraReg = 0x00008000;
-+ memset(&p_HcFrame->hcSpecificData.profileRegs, 0, sizeof(t_FmPcdPlcrProfileRegs));
-+ p_HcFrame->commandSequence = seqNum;
-+
-+ BUILD_FD(sizeof(t_HcFrame));
-+
-+ err = EnQFrm(p_FmHc, &fmFd, seqNum);
-+
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+
-+ if (err != E_OK)
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+
-+ return E_OK;
-+}
-+
-+t_Error FmHcPcdPlcrSetProfileCounter(t_Handle h_FmHc, t_Handle h_Profile, e_FmPcdPlcrProfileCounters counter, uint32_t value)
-+{
-+
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ uint16_t absoluteProfileId = FmPcdPlcrProfileGetAbsoluteId(h_Profile);
-+ t_Error err = E_OK;
-+ t_HcFrame *p_HcFrame;
-+ t_DpaaFD fmFd;
-+ uint32_t seqNum;
-+
-+ /* first read scheme and check that it is valid */
-+ p_HcFrame = GetBuf(p_FmHc, &seqNum);
-+ if (!p_HcFrame)
-+ RETURN_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object"));
-+ memset(p_HcFrame, 0, sizeof(t_HcFrame));
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_PLCR_PRFL);
-+ p_HcFrame->actionReg = FmPcdPlcrBuildWritePlcrActionReg(absoluteProfileId);
-+ p_HcFrame->actionReg |= FmPcdPlcrBuildCounterProfileReg(counter);
-+ p_HcFrame->extraReg = 0x00008000;
-+ p_HcFrame->hcSpecificData.singleRegForWrite = value;
-+ p_HcFrame->commandSequence = seqNum;
-+
-+ BUILD_FD(SIZE_OF_HC_FRAME_PROFILE_CNT);
-+
-+ err = EnQFrm(p_FmHc, &fmFd, seqNum);
-+
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+
-+ if (err != E_OK)
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+
-+ return E_OK;
-+}
-+
-+uint32_t FmHcPcdPlcrGetProfileCounter(t_Handle h_FmHc, t_Handle h_Profile, e_FmPcdPlcrProfileCounters counter)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ uint16_t absoluteProfileId = FmPcdPlcrProfileGetAbsoluteId(h_Profile);
-+ t_Error err;
-+ t_HcFrame *p_HcFrame;
-+ t_DpaaFD fmFd;
-+ uint32_t retVal = 0;
-+ uint32_t seqNum;
-+
-+ SANITY_CHECK_RETURN_VALUE(h_FmHc, E_INVALID_HANDLE,0);
-+
-+ /* first read scheme and check that it is valid */
-+ p_HcFrame = GetBuf(p_FmHc, &seqNum);
-+ if (!p_HcFrame)
-+ {
-+ REPORT_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object"));
-+ return 0;
-+ }
-+ memset(p_HcFrame, 0, sizeof(t_HcFrame));
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_PLCR_PRFL);
-+ p_HcFrame->actionReg = FmPcdPlcrBuildReadPlcrActionReg(absoluteProfileId);
-+ p_HcFrame->extraReg = 0x00008000;
-+ p_HcFrame->commandSequence = seqNum;
-+
-+ BUILD_FD(SIZE_OF_HC_FRAME_READ_OR_CC_DYNAMIC);
-+
-+ err = EnQFrm(p_FmHc, &fmFd, seqNum);
-+ if (err != E_OK)
-+ {
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ REPORT_ERROR(MINOR, err, NO_MSG);
-+ return 0;
-+ }
-+
-+ switch (counter)
-+ {
-+ case e_FM_PCD_PLCR_PROFILE_GREEN_PACKET_TOTAL_COUNTER:
-+ retVal = p_HcFrame->hcSpecificData.profileRegs.fmpl_pegpc;
-+ break;
-+ case e_FM_PCD_PLCR_PROFILE_YELLOW_PACKET_TOTAL_COUNTER:
-+ retVal = p_HcFrame->hcSpecificData.profileRegs.fmpl_peypc;
-+ break;
-+ case e_FM_PCD_PLCR_PROFILE_RED_PACKET_TOTAL_COUNTER:
-+ retVal = p_HcFrame->hcSpecificData.profileRegs.fmpl_perpc;
-+ break;
-+ case e_FM_PCD_PLCR_PROFILE_RECOLOURED_YELLOW_PACKET_TOTAL_COUNTER:
-+ retVal = p_HcFrame->hcSpecificData.profileRegs.fmpl_perypc;
-+ break;
-+ case e_FM_PCD_PLCR_PROFILE_RECOLOURED_RED_PACKET_TOTAL_COUNTER:
-+ retVal = p_HcFrame->hcSpecificData.profileRegs.fmpl_perrpc;
-+ break;
-+ default:
-+ REPORT_ERROR(MAJOR, E_INVALID_SELECTION, NO_MSG);
-+ }
-+
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ return retVal;
-+}
-+
-+t_Error FmHcKgWriteSp(t_Handle h_FmHc, uint8_t hardwarePortId, uint32_t spReg, bool add)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ t_HcFrame *p_HcFrame;
-+ t_DpaaFD fmFd;
-+ t_Error err = E_OK;
-+ uint32_t seqNum;
-+
-+ ASSERT_COND(p_FmHc);
-+
-+ p_HcFrame = GetBuf(p_FmHc, &seqNum);
-+ if (!p_HcFrame)
-+ RETURN_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object"));
-+ memset(p_HcFrame, 0, sizeof(t_HcFrame));
-+ /* first read SP register */
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_KG_SCM);
-+ p_HcFrame->actionReg = FmPcdKgBuildReadPortSchemeBindActionReg(hardwarePortId);
-+ p_HcFrame->extraReg = HC_HCOR_KG_SCHEME_REGS_MASK;
-+ p_HcFrame->commandSequence = seqNum;
-+
-+ BUILD_FD(SIZE_OF_HC_FRAME_PORT_REGS);
-+
-+ if ((err = EnQFrm(p_FmHc, &fmFd, seqNum)) != E_OK)
-+ {
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+ }
-+
-+ /* spReg is the first reg, so we can use it both for read and for write */
-+ if (add)
-+ p_HcFrame->hcSpecificData.portRegsForRead.spReg |= spReg;
-+ else
-+ p_HcFrame->hcSpecificData.portRegsForRead.spReg &= ~spReg;
-+
-+ p_HcFrame->actionReg = FmPcdKgBuildWritePortSchemeBindActionReg(hardwarePortId);
-+
-+ BUILD_FD(sizeof(t_HcFrame));
-+
-+ err = EnQFrm(p_FmHc, &fmFd, seqNum);
-+
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+
-+ if (err != E_OK)
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+
-+ return E_OK;
-+}
-+
-+t_Error FmHcKgWriteCpp(t_Handle h_FmHc, uint8_t hardwarePortId, uint32_t cppReg)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ t_HcFrame *p_HcFrame;
-+ t_DpaaFD fmFd;
-+ t_Error err = E_OK;
-+ uint32_t seqNum;
-+
-+ ASSERT_COND(p_FmHc);
-+
-+ p_HcFrame = GetBuf(p_FmHc, &seqNum);
-+ if (!p_HcFrame)
-+ RETURN_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object"));
-+ memset(p_HcFrame, 0, sizeof(t_HcFrame));
-+ /* first read SP register */
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_KG_SCM);
-+ p_HcFrame->actionReg = FmPcdKgBuildWritePortClsPlanBindActionReg(hardwarePortId);
-+ p_HcFrame->extraReg = HC_HCOR_KG_SCHEME_REGS_MASK;
-+ p_HcFrame->hcSpecificData.singleRegForWrite = cppReg;
-+ p_HcFrame->commandSequence = seqNum;
-+
-+ BUILD_FD(sizeof(t_HcFrame));
-+
-+ err = EnQFrm(p_FmHc, &fmFd, seqNum);
-+
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+
-+ if (err != E_OK)
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+
-+ return E_OK;
-+}
-+
-+t_Error FmHcPcdCcDoDynamicChange(t_Handle h_FmHc, uint32_t oldAdAddrOffset, uint32_t newAdAddrOffset)
-+{
-+ t_FmHc *p_FmHc = (t_FmHc*)h_FmHc;
-+ t_HcFrame *p_HcFrame;
-+ t_DpaaFD fmFd;
-+ t_Error err = E_OK;
-+ uint32_t seqNum;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmHc, E_INVALID_HANDLE);
-+
-+ p_HcFrame = GetBuf(p_FmHc, &seqNum);
-+ if (!p_HcFrame)
-+ RETURN_ERROR(MINOR, E_NO_MEMORY, ("HC Frame object"));
-+ memset(p_HcFrame, 0, sizeof(t_HcFrame));
-+
-+ p_HcFrame->opcode = (uint32_t)(HC_HCOR_GBL | HC_HCOR_OPCODE_CC);
-+ p_HcFrame->actionReg = newAdAddrOffset;
-+ p_HcFrame->actionReg |= 0xc0000000;
-+ p_HcFrame->extraReg = oldAdAddrOffset;
-+ p_HcFrame->commandSequence = seqNum;
-+
-+ BUILD_FD(SIZE_OF_HC_FRAME_READ_OR_CC_DYNAMIC);
-+
-+ err = EnQFrm(p_FmHc, &fmFd, seqNum);
-+
-+ PutBuf(p_FmHc, p_HcFrame, seqNum);
-+
-+ if (err != E_OK)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ return E_OK;
-+}
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/Makefile b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/Makefile
-new file mode 100644
-index 0000000..629949c
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/Makefile
-@@ -0,0 +1,20 @@
-+#
-+# Makefile for the Freescale Ethernet controllers
-+#
-+EXTRA_CFLAGS += -DVERSION=\"\"
-+#
-+#Include netcomm SW specific definitions
-+include $(srctree)/drivers/net/dpa/NetCommSw/ncsw_config.mk
-+NCSW_FM_INC = $(srctree)/drivers/net/dpa/NetCommSw/Peripherals/FM/inc
-+
-+EXTRA_CFLAGS += -I$(NCSW_FM_INC)
-+
-+obj-y += fsl-ncsw-MAC.o
-+
-+fsl-ncsw-MAC-objs := dtsec.o dtsec_mii_acc.o fm_mac.o tgec.o tgec_mii_acc.o \
-+ fman_dtsec.o fman_dtsec_mii_acc.o fman_memac.o \
-+ fman_tgec.o fman_crc32.o
-+
-+ifeq ($(CONFIG_FMAN_T4240),y)
-+fsl-ncsw-MAC-objs += memac.o memac_mii_acc.o
-+endif
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/dtsec.c b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/dtsec.c
-new file mode 100644
-index 0000000..e4cb509
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/dtsec.c
-@@ -0,0 +1,1513 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+/******************************************************************************
-+ @File dtsec.c
-+
-+ @Description FM dTSEC ...
-+*//***************************************************************************/
-+
-+#include "std_ext.h"
-+#include "error_ext.h"
-+#include "string_ext.h"
-+#include "xx_ext.h"
-+#include "endian_ext.h"
-+#include "debug_ext.h"
-+#include "crc_mac_addr_ext.h"
-+
-+#include "fm_common.h"
-+#include "dtsec.h"
-+#include "fsl_fman_dtsec.h"
-+
-+
-+/*****************************************************************************/
-+/* Internal routines */
-+/*****************************************************************************/
-+
-+static t_Error CheckInitParameters(t_Dtsec *p_Dtsec)
-+{
-+ if (ENET_SPEED_FROM_MODE(p_Dtsec->enetMode) >= e_ENET_SPEED_10000)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Ethernet 1G MAC driver only supports 1G or lower speeds"));
-+ if (p_Dtsec->macId >= FM_MAX_NUM_OF_1G_MACS)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("macId can not be greater than the number of 1G MACs"));
-+ if (p_Dtsec->addr == 0)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Ethernet MAC Must have a valid MAC Address"));
-+ if ((ENET_SPEED_FROM_MODE(p_Dtsec->enetMode) >= e_ENET_SPEED_1000) &&
-+ p_Dtsec->p_DtsecDriverParam->halfdup_on)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Ethernet MAC 1G can't work in half duplex"));
-+ if (p_Dtsec->p_DtsecDriverParam->halfdup_on && (p_Dtsec->p_DtsecDriverParam)->loopback)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("LoopBack is not supported in halfDuplex mode"));
-+#ifdef FM_RX_PREAM_4_ERRATA_DTSEC_A001
-+ if (p_Dtsec->fmMacControllerDriver.fmRevInfo.majorRev <= 6) /* fixed for rev3 */
-+ if (p_Dtsec->p_DtsecDriverParam->rx_preamble)
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("preambleRxEn"));
-+#endif /* FM_RX_PREAM_4_ERRATA_DTSEC_A001 */
-+ if (((p_Dtsec->p_DtsecDriverParam)->tx_preamble || (p_Dtsec->p_DtsecDriverParam)->rx_preamble) &&( (p_Dtsec->p_DtsecDriverParam)->preamble_len != 0x7))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Preamble length should be 0x7 bytes"));
-+ if ((p_Dtsec->p_DtsecDriverParam)->halfdup_on &&
-+ (p_Dtsec->p_DtsecDriverParam->tx_time_stamp_en || p_Dtsec->p_DtsecDriverParam->rx_time_stamp_en))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("dTSEC in half duplex mode has to be with 1588 timeStamping diable"));
-+ if ((p_Dtsec->p_DtsecDriverParam)->rx_flow && (p_Dtsec->p_DtsecDriverParam)->rx_ctrl_acc )
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Receive control frame are not passed to the system memory so it can not be accept "));
-+ if ((p_Dtsec->p_DtsecDriverParam)->rx_prepend > MAX_PACKET_ALIGNMENT)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("packetAlignmentPadding can't be greater than %d ",MAX_PACKET_ALIGNMENT ));
-+ if (((p_Dtsec->p_DtsecDriverParam)->non_back_to_back_ipg1 > MAX_INTER_PACKET_GAP) ||
-+ ((p_Dtsec->p_DtsecDriverParam)->non_back_to_back_ipg2 > MAX_INTER_PACKET_GAP) ||
-+ ((p_Dtsec->p_DtsecDriverParam)->back_to_back_ipg > MAX_INTER_PACKET_GAP))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Inter packet gap can't be greater than %d ",MAX_INTER_PACKET_GAP ));
-+ if ((p_Dtsec->p_DtsecDriverParam)->halfdup_alt_backoff_val > MAX_INTER_PALTERNATE_BEB)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("alternateBackoffVal can't be greater than %d ",MAX_INTER_PALTERNATE_BEB ));
-+ if ((p_Dtsec->p_DtsecDriverParam)->halfdup_retransmit > MAX_RETRANSMISSION)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("maxRetransmission can't be greater than %d ",MAX_RETRANSMISSION ));
-+ if ((p_Dtsec->p_DtsecDriverParam)->halfdup_coll_window > MAX_COLLISION_WINDOW)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("collisionWindow can't be greater than %d ",MAX_COLLISION_WINDOW ));
-+
-+ /* If Auto negotiation process is disabled, need to */
-+ /* Set up the PHY using the MII Management Interface */
-+ if (p_Dtsec->p_DtsecDriverParam->tbipa > MAX_PHYS)
-+ RETURN_ERROR(MAJOR, E_NOT_IN_RANGE, ("PHY address (should be 0-%d)", MAX_PHYS));
-+ if (!p_Dtsec->f_Exception)
-+ RETURN_ERROR(MAJOR, E_INVALID_HANDLE, ("uninitialized f_Exception"));
-+ if (!p_Dtsec->f_Event)
-+ RETURN_ERROR(MAJOR, E_INVALID_HANDLE, ("uninitialized f_Event"));
-+
-+#ifdef FM_LEN_CHECK_ERRATA_FMAN_SW002
-+ if (p_Dtsec->p_DtsecDriverParam->rx_len_check)
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, ("LengthCheck!"));
-+#endif /* FM_LEN_CHECK_ERRATA_FMAN_SW002 */
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static uint32_t GetMacAddrHashCode(uint64_t ethAddr)
-+{
-+ uint32_t crc;
-+
-+ /* CRC calculation */
-+ GET_MAC_ADDR_CRC(ethAddr, crc);
-+
-+ crc = GetMirror32(crc);
-+
-+ return crc;
-+}
-+
-+/* ......................................................................... */
-+
-+static void UpdateStatistics(t_Dtsec *p_Dtsec)
-+{
-+ uint32_t car1, car2;
-+
-+ dtsec_get_clear_carry_regs(p_Dtsec->p_MemMap, &car1, &car2);
-+
-+ if (car1)
-+ {
-+ if (car1 & CAR1_TR64)
-+ p_Dtsec->internalStatistics.tr64 += VAL22BIT;
-+ if (car1 & CAR1_TR127)
-+ p_Dtsec->internalStatistics.tr127 += VAL22BIT;
-+ if (car1 & CAR1_TR255)
-+ p_Dtsec->internalStatistics.tr255 += VAL22BIT;
-+ if (car1 & CAR1_TR511)
-+ p_Dtsec->internalStatistics.tr511 += VAL22BIT;
-+ if (car1 & CAR1_TRK1)
-+ p_Dtsec->internalStatistics.tr1k += VAL22BIT;
-+ if (car1 & CAR1_TRMAX)
-+ p_Dtsec->internalStatistics.trmax += VAL22BIT;
-+ if (car1 & CAR1_TRMGV)
-+ p_Dtsec->internalStatistics.trmgv += VAL22BIT;
-+ if (car1 & CAR1_RBYT)
-+ p_Dtsec->internalStatistics.rbyt += (uint64_t)VAL32BIT;
-+ if (car1 & CAR1_RPKT)
-+ p_Dtsec->internalStatistics.rpkt += VAL22BIT;
-+ if (car1 & CAR1_RMCA)
-+ p_Dtsec->internalStatistics.rmca += VAL22BIT;
-+ if (car1 & CAR1_RBCA)
-+ p_Dtsec->internalStatistics.rbca += VAL22BIT;
-+ if (car1 & CAR1_RXPF)
-+ p_Dtsec->internalStatistics.rxpf += VAL16BIT;
-+ if (car1 & CAR1_RALN)
-+ p_Dtsec->internalStatistics.raln += VAL16BIT;
-+ if (car1 & CAR1_RFLR)
-+ p_Dtsec->internalStatistics.rflr += VAL16BIT;
-+ if (car1 & CAR1_RCDE)
-+ p_Dtsec->internalStatistics.rcde += VAL16BIT;
-+ if (car1 & CAR1_RCSE)
-+ p_Dtsec->internalStatistics.rcse += VAL16BIT;
-+ if (car1 & CAR1_RUND)
-+ p_Dtsec->internalStatistics.rund += VAL16BIT;
-+ if (car1 & CAR1_ROVR)
-+ p_Dtsec->internalStatistics.rovr += VAL16BIT;
-+ if (car1 & CAR1_RFRG)
-+ p_Dtsec->internalStatistics.rfrg += VAL16BIT;
-+ if (car1 & CAR1_RJBR)
-+ p_Dtsec->internalStatistics.rjbr += VAL16BIT;
-+ if (car1 & CAR1_RDRP)
-+ p_Dtsec->internalStatistics.rdrp += VAL16BIT;
-+ }
-+ if (car2)
-+ {
-+ if (car2 & CAR2_TFCS)
-+ p_Dtsec->internalStatistics.tfcs += VAL12BIT;
-+ if (car2 & CAR2_TBYT)
-+ p_Dtsec->internalStatistics.tbyt += (uint64_t)VAL32BIT;
-+ if (car2 & CAR2_TPKT)
-+ p_Dtsec->internalStatistics.tpkt += VAL22BIT;
-+ if (car2 & CAR2_TMCA)
-+ p_Dtsec->internalStatistics.tmca += VAL22BIT;
-+ if (car2 & CAR2_TBCA)
-+ p_Dtsec->internalStatistics.tbca += VAL22BIT;
-+ if (car2 & CAR2_TXPF)
-+ p_Dtsec->internalStatistics.txpf += VAL16BIT;
-+ if (car2 & CAR2_TDRP)
-+ p_Dtsec->internalStatistics.tdrp += VAL16BIT;
-+ }
-+}
-+
-+/* .............................................................................. */
-+
-+static uint16_t DtsecGetMaxFrameLength(t_Handle h_Dtsec)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ SANITY_CHECK_RETURN_VALUE(p_Dtsec, E_INVALID_HANDLE, 0);
-+ SANITY_CHECK_RETURN_VALUE(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE, 0);
-+
-+ return dtsec_get_max_frame_len(p_Dtsec->p_MemMap);
-+}
-+
-+/* .............................................................................. */
-+
-+static void DtsecIsr(t_Handle h_Dtsec)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+ uint32_t event;
-+ struct dtsec_regs *p_DtsecMemMap = p_Dtsec->p_MemMap;
-+
-+ /* do not handle MDIO events */
-+ event = dtsec_get_event(p_DtsecMemMap, (uint32_t)(~(DTSEC_IMASK_MMRDEN | DTSEC_IMASK_MMWREN)));
-+
-+ event &= dtsec_get_interrupt_mask(p_DtsecMemMap);
-+
-+ dtsec_ack_event(p_DtsecMemMap, event);
-+
-+ if (event & DTSEC_IMASK_BREN)
-+ p_Dtsec->f_Exception(p_Dtsec->h_App, e_FM_MAC_EX_1G_BAB_RX);
-+ if (event & DTSEC_IMASK_RXCEN)
-+ p_Dtsec->f_Exception(p_Dtsec->h_App, e_FM_MAC_EX_1G_RX_CTL);
-+ if (event & DTSEC_IMASK_MSROEN)
-+ UpdateStatistics(p_Dtsec);
-+ if (event & DTSEC_IMASK_GTSCEN)
-+ p_Dtsec->f_Exception(p_Dtsec->h_App, e_FM_MAC_EX_1G_GRATEFUL_TX_STP_COMPLET);
-+ if (event & DTSEC_IMASK_BTEN)
-+ p_Dtsec->f_Exception(p_Dtsec->h_App, e_FM_MAC_EX_1G_BAB_TX);
-+ if (event & DTSEC_IMASK_TXCEN)
-+ p_Dtsec->f_Exception(p_Dtsec->h_App, e_FM_MAC_EX_1G_TX_CTL);
-+ if (event & DTSEC_IMASK_TXEEN)
-+ p_Dtsec->f_Exception(p_Dtsec->h_App, e_FM_MAC_EX_1G_TX_ERR);
-+ if (event & DTSEC_IMASK_LCEN)
-+ p_Dtsec->f_Exception(p_Dtsec->h_App, e_FM_MAC_EX_1G_LATE_COL);
-+ if (event & DTSEC_IMASK_CRLEN)
-+ p_Dtsec->f_Exception(p_Dtsec->h_App, e_FM_MAC_EX_1G_COL_RET_LMT);
-+ if (event & DTSEC_IMASK_XFUNEN)
-+ {
-+#ifdef FM_TX_LOCKUP_ERRATA_DTSEC6
-+ if (p_Dtsec->fmMacControllerDriver.fmRevInfo.majorRev == 2)
-+ {
-+ uint32_t tpkt1, tmpReg1, tpkt2, tmpReg2, i;
-+ /* a. Write 0x00E0_0C00 to DTSEC_ID */
-+ /* This is a read only regidter */
-+
-+ /* b. Read and save the value of TPKT */
-+ tpkt1 = GET_UINT32(p_DtsecMemMap->tpkt);
-+
-+ /* c. Read the register at dTSEC address offset 0x32C */
-+ tmpReg1 = GET_UINT32(*(uint32_t*)((uint8_t*)p_DtsecMemMap + 0x32c));
-+
-+ /* d. Compare bits [9:15] to bits [25:31] of the register at address offset 0x32C. */
-+ if ((tmpReg1 & 0x007F0000) != (tmpReg1 & 0x0000007F))
-+ {
-+ /* If they are not equal, save the value of this register and wait for at least
-+ * MAXFRM*16 ns */
-+ XX_UDelay((uint32_t)(MIN(DtsecGetMaxFrameLength(p_Dtsec)*16/1000, 1)));
-+ }
-+
-+ /* e. Read and save TPKT again and read the register at dTSEC address offset
-+ 0x32C again*/
-+ tpkt2 = GET_UINT32(p_DtsecMemMap->tpkt);
-+ tmpReg2 = GET_UINT32(*(uint32_t*)((uint8_t*)p_DtsecMemMap + 0x32c));
-+
-+ /* f. Compare the value of TPKT saved in step b to value read in step e. Also
-+ compare bits [9:15] of the register at offset 0x32C saved in step d to the value
-+ of bits [9:15] saved in step e. If the two registers values are unchanged, then
-+ the transmit portion of the dTSEC controller is locked up and the user should
-+ proceed to the recover sequence. */
-+ if ((tpkt1 == tpkt2) && ((tmpReg1 & 0x007F0000) == (tmpReg2 & 0x007F0000)))
-+ {
-+ /* recover sequence */
-+
-+ /* a.Write a 1 to RCTRL[GRS]*/
-+
-+ WRITE_UINT32(p_DtsecMemMap->rctrl, GET_UINT32(p_DtsecMemMap->rctrl) | RCTRL_GRS);
-+
-+ /* b.Wait until IEVENT[GRSC]=1, or at least 100 us has elapsed. */
-+ for (i = 0 ; i < 100 ; i++ )
-+ {
-+ if (GET_UINT32(p_DtsecMemMap->ievent) & DTSEC_IMASK_GRSCEN)
-+ break;
-+ XX_UDelay(1);
-+ }
-+ if (GET_UINT32(p_DtsecMemMap->ievent) & DTSEC_IMASK_GRSCEN)
-+ WRITE_UINT32(p_DtsecMemMap->ievent, DTSEC_IMASK_GRSCEN);
-+ else
-+ DBG(INFO,("Rx lockup due to dTSEC Tx lockup"));
-+
-+ /* c.Write a 1 to bit n of FM_RSTC (offset 0x0CC of FPM)*/
-+ FmResetMac(p_Dtsec->fmMacControllerDriver.h_Fm, e_FM_MAC_1G, p_Dtsec->fmMacControllerDriver.macId);
-+
-+ /* d.Wait 4 Tx clocks (32 ns) */
-+ XX_UDelay(1);
-+
-+ /* e.Write a 0 to bit n of FM_RSTC. */
-+ /* cleared by FMAN */
-+ }
-+ }
-+#endif /* FM_TX_LOCKUP_ERRATA_DTSEC6 */
-+
-+ p_Dtsec->f_Exception(p_Dtsec->h_App, e_FM_MAC_EX_1G_TX_FIFO_UNDRN);
-+ }
-+ if (event & DTSEC_IMASK_MAGEN)
-+ p_Dtsec->f_Exception(p_Dtsec->h_App, e_FM_MAC_EX_1G_MAG_PCKT);
-+ if (event & DTSEC_IMASK_GRSCEN)
-+ p_Dtsec->f_Exception(p_Dtsec->h_App, e_FM_MAC_EX_1G_GRATEFUL_RX_STP_COMPLET);
-+ if (event & DTSEC_IMASK_TDPEEN)
-+ p_Dtsec->f_Exception(p_Dtsec->h_App, e_FM_MAC_EX_1G_TX_DATA_ERR);
-+ if (event & DTSEC_IMASK_RDPEEN)
-+ p_Dtsec->f_Exception(p_Dtsec->h_App, e_FM_MAC_EX_1G_RX_DATA_ERR);
-+
-+ /* - masked interrupts */
-+ ASSERT_COND(!(event & DTSEC_IMASK_ABRTEN));
-+ ASSERT_COND(!(event & DTSEC_IMASK_IFERREN));
-+}
-+
-+static void DtsecMdioIsr(t_Handle h_Dtsec)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+ uint32_t event;
-+ struct dtsec_regs *p_DtsecMemMap = p_Dtsec->p_MemMap;
-+
-+ event = GET_UINT32(p_DtsecMemMap->ievent);
-+ /* handle only MDIO events */
-+ event &= (DTSEC_IMASK_MMRDEN | DTSEC_IMASK_MMWREN);
-+ if (event)
-+ {
-+ event &= GET_UINT32(p_DtsecMemMap->imask);
-+
-+ WRITE_UINT32(p_DtsecMemMap->ievent, event);
-+
-+ if (event & DTSEC_IMASK_MMRDEN)
-+ p_Dtsec->f_Event(p_Dtsec->h_App, e_FM_MAC_EX_1G_MII_MNG_RD_COMPLET);
-+ if (event & DTSEC_IMASK_MMWREN)
-+ p_Dtsec->f_Event(p_Dtsec->h_App, e_FM_MAC_EX_1G_MII_MNG_WR_COMPLET);
-+ }
-+}
-+
-+static void Dtsec1588Isr(t_Handle h_Dtsec)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+ uint32_t event;
-+ struct dtsec_regs *p_DtsecMemMap = p_Dtsec->p_MemMap;
-+
-+ if (p_Dtsec->ptpTsuEnabled)
-+ {
-+ event = dtsec_check_and_clear_tmr_event(p_DtsecMemMap);
-+
-+ if (event)
-+ {
-+ ASSERT_COND(event & TMR_PEVENT_TSRE);
-+ p_Dtsec->f_Exception(p_Dtsec->h_App, e_FM_MAC_EX_1G_1588_TS_RX_ERR);
-+ }
-+ }
-+}
-+
-+/* ........................................................................... */
-+
-+static void FreeInitResources(t_Dtsec *p_Dtsec)
-+{
-+ /*TODO - need to ask why with mdioIrq != 0*/
-+ if ((p_Dtsec->mdioIrq != 0) && (p_Dtsec->mdioIrq != NO_IRQ))
-+ {
-+ XX_DisableIntr(p_Dtsec->mdioIrq);
-+ XX_FreeIntr(p_Dtsec->mdioIrq);
-+ }
-+ FmUnregisterIntr(p_Dtsec->fmMacControllerDriver.h_Fm, e_FM_MOD_1G_MAC, p_Dtsec->macId, e_FM_INTR_TYPE_ERR);
-+ FmUnregisterIntr(p_Dtsec->fmMacControllerDriver.h_Fm, e_FM_MOD_1G_MAC, p_Dtsec->macId, e_FM_INTR_TYPE_NORMAL);
-+
-+ /* release the driver's group hash table */
-+ FreeHashTable(p_Dtsec->p_MulticastAddrHash);
-+ p_Dtsec->p_MulticastAddrHash = NULL;
-+
-+ /* release the driver's individual hash table */
-+ FreeHashTable(p_Dtsec->p_UnicastAddrHash);
-+ p_Dtsec->p_UnicastAddrHash = NULL;
-+}
-+
-+/* ........................................................................... */
-+
-+static t_Error GracefulStop(t_Dtsec *p_Dtsec, e_CommMode mode)
-+{
-+ struct dtsec_regs *p_MemMap;
-+
-+ ASSERT_COND(p_Dtsec);
-+
-+ p_MemMap = p_Dtsec->p_MemMap;
-+ ASSERT_COND(p_MemMap);
-+
-+ /* Assert the graceful transmit stop bit */
-+ if (mode & e_COMM_MODE_RX)
-+ {
-+ dtsec_stop_rx(p_MemMap);
-+
-+#ifdef FM_GRS_ERRATA_DTSEC_A002
-+ if (p_Dtsec->fmMacControllerDriver.fmRevInfo.majorRev == 2)
-+ XX_UDelay(100);
-+#else /* FM_GRS_ERRATA_DTSEC_A002 */
-+#ifdef FM_GTS_AFTER_DROPPED_FRAME_ERRATA_DTSEC_A004839
-+ XX_UDelay(10);
-+#endif /* FM_GTS_AFTER_DROPPED_FRAME_ERRATA_DTSEC_A004839 */
-+#endif /* FM_GRS_ERRATA_DTSEC_A002 */
-+ }
-+
-+ if (mode & e_COMM_MODE_TX)
-+#if defined(FM_GTS_ERRATA_DTSEC_A004) || defined(FM_GTS_AFTER_MAC_ABORTED_FRAME_ERRATA_DTSEC_A0012)
-+ if (p_Dtsec->fmMacControllerDriver.fmRevInfo.majorRev == 2)
-+ DBG(INFO, ("GTS not supported due to DTSEC_A004 errata."));
-+#else /* not defined(FM_GTS_ERRATA_DTSEC_A004) ||... */
-+#ifdef FM_GTS_UNDERRUN_ERRATA_DTSEC_A0014
-+ DBG(INFO, ("GTS not supported due to DTSEC_A0014 errata."));
-+#else /* FM_GTS_UNDERRUN_ERRATA_DTSEC_A0014 */
-+ dtsec_stop_tx(p_MemMap);
-+#endif /* FM_GTS_UNDERRUN_ERRATA_DTSEC_A0014 */
-+#endif /* defined(FM_GTS_ERRATA_DTSEC_A004) ||... */
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error GracefulRestart(t_Dtsec *p_Dtsec, e_CommMode mode)
-+{
-+ struct dtsec_regs *p_MemMap;
-+
-+ ASSERT_COND(p_Dtsec);
-+ p_MemMap = p_Dtsec->p_MemMap;
-+ ASSERT_COND(p_MemMap);
-+
-+ /* clear the graceful receive stop bit */
-+ if (mode & e_COMM_MODE_TX)
-+ dtsec_start_tx(p_MemMap);
-+
-+ if (mode & e_COMM_MODE_RX)
-+ dtsec_start_rx(p_MemMap);
-+
-+ return E_OK;
-+}
-+
-+
-+/*****************************************************************************/
-+/* dTSEC Configs modification functions */
-+/*****************************************************************************/
-+
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecConfigLoopback(t_Handle h_Dtsec, bool newVal)
-+{
-+
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ p_Dtsec->p_DtsecDriverParam->loopback = newVal;
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecConfigMaxFrameLength(t_Handle h_Dtsec, uint16_t newVal)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ p_Dtsec->p_DtsecDriverParam->maximum_frame = newVal;
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecConfigPadAndCrc(t_Handle h_Dtsec, bool newVal)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ p_Dtsec->p_DtsecDriverParam->tx_pad_crc = newVal;
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecConfigHalfDuplex(t_Handle h_Dtsec, bool newVal)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ p_Dtsec->p_DtsecDriverParam->halfdup_on = newVal;
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecConfigTbiPhyAddr(t_Handle h_Dtsec, uint8_t newVal)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ p_Dtsec->p_DtsecDriverParam->tbi_phy_addr = newVal;
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecConfigLengthCheck(t_Handle h_Dtsec, bool newVal)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ p_Dtsec->p_DtsecDriverParam->rx_len_check = newVal;
-+
-+ return E_OK;
-+}
-+
-+static t_Error DtsecConfigException(t_Handle h_Dtsec, e_FmMacExceptions exception, bool enable)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+ uint32_t bitMask = 0;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ if (exception != e_FM_MAC_EX_1G_1588_TS_RX_ERR)
-+ {
-+ GET_EXCEPTION_FLAG(bitMask, exception);
-+ if (bitMask)
-+ {
-+ if (enable)
-+ p_Dtsec->exceptions |= bitMask;
-+ else
-+ p_Dtsec->exceptions &= ~bitMask;
-+ }
-+ else
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Undefined exception"));
-+ }
-+ else
-+ {
-+ if (!p_Dtsec->ptpTsuEnabled)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Exception valid for 1588 only"));
-+ switch (exception){
-+ case (e_FM_MAC_EX_1G_1588_TS_RX_ERR):
-+ if (enable)
-+ p_Dtsec->enTsuErrExeption = TRUE;
-+ else
-+ p_Dtsec->enTsuErrExeption = FALSE;
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Undefined exception"));
-+ }
-+ }
-+ return E_OK;
-+}
-+/*****************************************************************************/
-+/* dTSEC Run Time API functions */
-+/*****************************************************************************/
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecEnable(t_Handle h_Dtsec, e_CommMode mode)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ dtsec_enable(p_Dtsec->p_MemMap,
-+ (bool)!!(mode & e_COMM_MODE_RX),
-+ (bool)!!(mode & e_COMM_MODE_TX));
-+
-+ GracefulRestart(p_Dtsec, mode);
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecDisable (t_Handle h_Dtsec, e_CommMode mode)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ GracefulStop(p_Dtsec, mode);
-+
-+ dtsec_disable(p_Dtsec->p_MemMap,
-+ (bool)!!(mode & e_COMM_MODE_RX),
-+ (bool)!!(mode & e_COMM_MODE_TX));
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecSetTxPauseFrames(t_Handle h_Dtsec,
-+ uint8_t priority,
-+ uint16_t pauseTime,
-+ uint16_t threshTime)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ UNUSED(priority);UNUSED(threshTime);
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+#ifdef FM_BAD_TX_TS_IN_B_2_B_ERRATA_DTSEC_A003
-+ if (p_Dtsec->fmMacControllerDriver.fmRevInfo.majorRev == 2)
-+ if (pauseTime <= 320)
-+ RETURN_ERROR(MINOR, E_INVALID_VALUE,
-+ ("This pause-time value of %d is illegal due to errata dTSEC-A003!"
-+ " value should be greater than 320."));
-+#endif /* FM_BAD_TX_TS_IN_B_2_B_ERRATA_DTSEC_A003 */
-+
-+ dtsec_set_tx_pause_time(p_Dtsec->p_MemMap, pauseTime);
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+/* backward compatibility. will be removed in the future. */
-+static t_Error DtsecTxMacPause(t_Handle h_Dtsec, uint16_t pauseTime)
-+{
-+ return DtsecSetTxPauseFrames(h_Dtsec, 0, pauseTime, 0);
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecRxIgnoreMacPause(t_Handle h_Dtsec, bool en)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+ bool accept_pause = !en;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ dtsec_handle_rx_pause(p_Dtsec->p_MemMap, accept_pause);
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecEnable1588TimeStamp(t_Handle h_Dtsec)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ p_Dtsec->ptpTsuEnabled = TRUE;
-+ dtsec_set_ts(p_Dtsec->p_MemMap, TRUE);
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecDisable1588TimeStamp(t_Handle h_Dtsec)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ p_Dtsec->ptpTsuEnabled = FALSE;
-+ dtsec_set_ts(p_Dtsec->p_MemMap, FALSE);
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecGetStatistics(t_Handle h_Dtsec, t_FmMacStatistics *p_Statistics)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+ struct dtsec_regs *p_DtsecMemMap;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR(p_Statistics, E_NULL_POINTER);
-+
-+ p_DtsecMemMap = p_Dtsec->p_MemMap;
-+
-+ if (p_Dtsec->statisticsLevel == e_FM_MAC_NONE_STATISTICS)
-+ RETURN_ERROR(MINOR, E_INVALID_STATE, ("Statistics disabled"));
-+
-+ memset(p_Statistics, 0xff, sizeof(t_FmMacStatistics));
-+
-+ if (p_Dtsec->statisticsLevel == e_FM_MAC_FULL_STATISTICS)
-+ {
-+ p_Statistics->eStatPkts64 = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_TR64)
-+ + p_Dtsec->internalStatistics.tr64;
-+ p_Statistics->eStatPkts65to127 = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_TR127)
-+ + p_Dtsec->internalStatistics.tr127;
-+ p_Statistics->eStatPkts128to255 = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_TR255)
-+ + p_Dtsec->internalStatistics.tr255;
-+ p_Statistics->eStatPkts256to511 = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_TR511)
-+ + p_Dtsec->internalStatistics.tr511;
-+ p_Statistics->eStatPkts512to1023 = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_TR1K)
-+ + p_Dtsec->internalStatistics.tr1k;
-+ p_Statistics->eStatPkts1024to1518 = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_TRMAX)
-+ + p_Dtsec->internalStatistics.trmax;
-+ p_Statistics->eStatPkts1519to1522 = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_TRMGV)
-+ + p_Dtsec->internalStatistics.trmgv;
-+
-+ /* MIB II */
-+ p_Statistics->ifInOctets = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_RBYT)
-+ + p_Dtsec->internalStatistics.rbyt;
-+ p_Statistics->ifInPkts = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_RPKT)
-+ + p_Dtsec->internalStatistics.rpkt;
-+ p_Statistics->ifInUcastPkts = 0;
-+ p_Statistics->ifInMcastPkts = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_RMCA)
-+ + p_Dtsec->internalStatistics.rmca;
-+ p_Statistics->ifInBcastPkts = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_RBCA)
-+ + p_Dtsec->internalStatistics.rbca;
-+ p_Statistics->ifOutOctets = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_TBYT)
-+ + p_Dtsec->internalStatistics.tbyt;
-+ p_Statistics->ifOutPkts = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_TPKT)
-+ + p_Dtsec->internalStatistics.tpkt;
-+ p_Statistics->ifOutUcastPkts = 0;
-+ p_Statistics->ifOutMcastPkts = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_TMCA)
-+ + p_Dtsec->internalStatistics.tmca;
-+ p_Statistics->ifOutBcastPkts = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_TBCA)
-+ + p_Dtsec->internalStatistics.tbca;
-+ }
-+
-+ p_Statistics->eStatFragments = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_RFRG)
-+ + p_Dtsec->internalStatistics.rfrg;
-+ p_Statistics->eStatJabbers = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_RJBR)
-+ + p_Dtsec->internalStatistics.rjbr;
-+ p_Statistics->eStatsDropEvents = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_RDRP)
-+ + p_Dtsec->internalStatistics.rdrp;
-+ p_Statistics->eStatCRCAlignErrors = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_RALN)
-+ + p_Dtsec->internalStatistics.raln;
-+ p_Statistics->eStatUndersizePkts = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_RUND)
-+ + p_Dtsec->internalStatistics.rund;
-+ p_Statistics->eStatOversizePkts = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_ROVR)
-+ + p_Dtsec->internalStatistics.rovr;
-+ p_Statistics->reStatPause = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_RXPF)
-+ + p_Dtsec->internalStatistics.rxpf;
-+ p_Statistics->teStatPause = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_TXPF)
-+ + p_Dtsec->internalStatistics.txpf;
-+ p_Statistics->ifInDiscards = p_Statistics->eStatsDropEvents;
-+ p_Statistics->ifInErrors = p_Statistics->eStatsDropEvents + p_Statistics->eStatCRCAlignErrors
-+ + dtsec_get_stat_counter(p_DtsecMemMap,E_DTSEC_STAT_RFLR) + p_Dtsec->internalStatistics.rflr
-+ + dtsec_get_stat_counter(p_DtsecMemMap,E_DTSEC_STAT_RCDE) + p_Dtsec->internalStatistics.rcde
-+ + dtsec_get_stat_counter(p_DtsecMemMap,E_DTSEC_STAT_RCSE) + p_Dtsec->internalStatistics.rcse;
-+
-+ p_Statistics->ifOutDiscards = dtsec_get_stat_counter(p_DtsecMemMap, E_DTSEC_STAT_TDRP)
-+ + p_Dtsec->internalStatistics.tdrp;
-+ p_Statistics->ifOutErrors = p_Statistics->ifOutDiscards /**< Number of frames transmitted with error: */
-+ + dtsec_get_stat_counter(p_DtsecMemMap,E_DTSEC_STAT_TFCS)
-+ + p_Dtsec->internalStatistics.tfcs;
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecModifyMacAddress (t_Handle h_Dtsec, t_EnetAddr *p_EnetAddr)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ /* Initialize MAC Station Address registers (1 & 2) */
-+ /* Station address have to be swapped (big endian to little endian */
-+ p_Dtsec->addr = ENET_ADDR_TO_UINT64(*p_EnetAddr);
-+ dtsec_set_mac_address(p_Dtsec->p_MemMap, (uint8_t *)(*p_EnetAddr));
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecResetCounters (t_Handle h_Dtsec)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ /* clear HW counters */
-+ dtsec_reset_stat(p_Dtsec->p_MemMap);
-+
-+ /* clear SW counters holding carries */
-+ memset(&p_Dtsec->internalStatistics, 0, sizeof(t_InternalStatistics));
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecAddExactMatchMacAddress(t_Handle h_Dtsec, t_EnetAddr *p_EthAddr)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *) h_Dtsec;
-+ uint64_t ethAddr;
-+ uint8_t paddrNum;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ ethAddr = ENET_ADDR_TO_UINT64(*p_EthAddr);
-+
-+ if (ethAddr & GROUP_ADDRESS)
-+ /* Multicast address has no effect in PADDR */
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Multicast address"));
-+
-+ /* Make sure no PADDR contains this address */
-+ for (paddrNum = 0; paddrNum < DTSEC_NUM_OF_PADDRS; paddrNum++)
-+ if (p_Dtsec->indAddrRegUsed[paddrNum])
-+ if (p_Dtsec->paddr[paddrNum] == ethAddr)
-+ RETURN_ERROR(MAJOR, E_ALREADY_EXISTS, NO_MSG);
-+
-+ /* Find first unused PADDR */
-+ for (paddrNum = 0; paddrNum < DTSEC_NUM_OF_PADDRS; paddrNum++)
-+ if (!(p_Dtsec->indAddrRegUsed[paddrNum]))
-+ {
-+ /* mark this PADDR as used */
-+ p_Dtsec->indAddrRegUsed[paddrNum] = TRUE;
-+ /* store address */
-+ p_Dtsec->paddr[paddrNum] = ethAddr;
-+
-+ /* put in hardware */
-+ dtsec_add_addr_in_paddr(p_Dtsec->p_MemMap, (uint64_t)PTR_TO_UINT(ðAddr), paddrNum);
-+ p_Dtsec->numOfIndAddrInRegs++;
-+
-+ return E_OK;
-+ }
-+
-+ /* No free PADDR */
-+ RETURN_ERROR(MAJOR, E_FULL, NO_MSG);
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecDelExactMatchMacAddress(t_Handle h_Dtsec, t_EnetAddr *p_EthAddr)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *) h_Dtsec;
-+ uint64_t ethAddr;
-+ uint8_t paddrNum;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ ethAddr = ENET_ADDR_TO_UINT64(*p_EthAddr);
-+
-+ /* Find used PADDR containing this address */
-+ for (paddrNum = 0; paddrNum < DTSEC_NUM_OF_PADDRS; paddrNum++)
-+ {
-+ if ((p_Dtsec->indAddrRegUsed[paddrNum]) &&
-+ (p_Dtsec->paddr[paddrNum] == ethAddr))
-+ {
-+ /* mark this PADDR as not used */
-+ p_Dtsec->indAddrRegUsed[paddrNum] = FALSE;
-+ /* clear in hardware */
-+ dtsec_clear_addr_in_paddr(p_Dtsec->p_MemMap, paddrNum);
-+ p_Dtsec->numOfIndAddrInRegs--;
-+
-+ return E_OK;
-+ }
-+ }
-+
-+ RETURN_ERROR(MAJOR, E_NOT_FOUND, NO_MSG);
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecAddHashMacAddress(t_Handle h_Dtsec, t_EnetAddr *p_EthAddr)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+ t_EthHashEntry *p_HashEntry;
-+ uint64_t ethAddr;
-+ int32_t bucket;
-+ uint32_t crc;
-+ bool mcast, ghtx;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ ethAddr = ENET_ADDR_TO_UINT64(*p_EthAddr);
-+
-+ ghtx = (bool)((dtsec_get_rctrl(p_Dtsec->p_MemMap) & RCTRL_GHTX) ? TRUE : FALSE);
-+ mcast = (bool)((ethAddr & MAC_GROUP_ADDRESS) ? TRUE : FALSE);
-+
-+ if (ghtx && !mcast) /* Cannot handle unicast mac addr when GHTX is on */
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Could not compute hash bucket"));
-+
-+ crc = GetMacAddrHashCode(ethAddr);
-+
-+ /* considering the 9 highest order bits in crc H[8:0]:
-+ * if ghtx = 0 H[8:6] (highest order 3 bits) identify the hash register
-+ * and H[5:1] (next 5 bits) identify the hash bit
-+ * if ghts = 1 H[8:5] (highest order 4 bits) identify the hash register
-+ * and H[4:0] (next 5 bits) identify the hash bit.
-+ *
-+ * In bucket index output the low 5 bits identify the hash register bit,
-+ * while the higher 4 bits identify the hash register
-+ */
-+
-+ if (ghtx)
-+ bucket = (int32_t)((crc >> 23) & 0x1ff);
-+ else {
-+ bucket = (int32_t)((crc >> 24) & 0xff);
-+ /* if !ghtx and mcast the bit must be set in gaddr instead of igaddr. */
-+ if (mcast)
-+ bucket += 0x100;
-+ }
-+
-+ dtsec_set_bucket(p_Dtsec->p_MemMap, bucket, TRUE);
-+
-+ /* Create element to be added to the driver hash table */
-+ p_HashEntry = (t_EthHashEntry *)XX_Malloc(sizeof(t_EthHashEntry));
-+ p_HashEntry->addr = ethAddr;
-+ INIT_LIST(&p_HashEntry->node);
-+
-+ if (ethAddr & MAC_GROUP_ADDRESS)
-+ /* Group Address */
-+ LIST_AddToTail(&(p_HashEntry->node), &(p_Dtsec->p_MulticastAddrHash->p_Lsts[bucket]));
-+ else
-+ LIST_AddToTail(&(p_HashEntry->node), &(p_Dtsec->p_UnicastAddrHash->p_Lsts[bucket]));
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecDelHashMacAddress(t_Handle h_Dtsec, t_EnetAddr *p_EthAddr)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+ t_List *p_Pos;
-+ t_EthHashEntry *p_HashEntry = NULL;
-+ uint64_t ethAddr;
-+ int32_t bucket;
-+ uint32_t crc;
-+ bool mcast, ghtx;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ ethAddr = ENET_ADDR_TO_UINT64(*p_EthAddr);
-+
-+ ghtx = (bool)((dtsec_get_rctrl(p_Dtsec->p_MemMap) & RCTRL_GHTX) ? TRUE : FALSE);
-+ mcast = (bool)((ethAddr & MAC_GROUP_ADDRESS) ? TRUE : FALSE);
-+
-+ if (ghtx && !mcast) /* Cannot handle unicast mac addr when GHTX is on */
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Could not compute hash bucket"));
-+
-+ crc = GetMacAddrHashCode(ethAddr);
-+
-+ if (ghtx)
-+ bucket = (int32_t)((crc >> 23) & 0x1ff);
-+ else {
-+ bucket = (int32_t)((crc >> 24) & 0xff);
-+ /* if !ghtx and mcast the bit must be set in gaddr instead of igaddr. */
-+ if (mcast)
-+ bucket += 0x100;
-+ }
-+
-+ if (ethAddr & MAC_GROUP_ADDRESS)
-+ {
-+ /* Group Address */
-+ LIST_FOR_EACH(p_Pos, &(p_Dtsec->p_MulticastAddrHash->p_Lsts[bucket]))
-+ {
-+ p_HashEntry = ETH_HASH_ENTRY_OBJ(p_Pos);
-+ if (p_HashEntry->addr == ethAddr)
-+ {
-+ LIST_DelAndInit(&p_HashEntry->node);
-+ XX_Free(p_HashEntry);
-+ break;
-+ }
-+ }
-+ if (LIST_IsEmpty(&p_Dtsec->p_MulticastAddrHash->p_Lsts[bucket]))
-+ dtsec_set_bucket(p_Dtsec->p_MemMap, bucket, FALSE);
-+ }
-+ else
-+ {
-+ /* Individual Address */
-+ LIST_FOR_EACH(p_Pos, &(p_Dtsec->p_UnicastAddrHash->p_Lsts[bucket]))
-+ {
-+ p_HashEntry = ETH_HASH_ENTRY_OBJ(p_Pos);
-+ if (p_HashEntry->addr == ethAddr)
-+ {
-+ LIST_DelAndInit(&p_HashEntry->node);
-+ XX_Free(p_HashEntry);
-+ break;
-+ }
-+ }
-+ if (LIST_IsEmpty(&p_Dtsec->p_UnicastAddrHash->p_Lsts[bucket]))
-+ dtsec_set_bucket(p_Dtsec->p_MemMap, bucket, FALSE);
-+ }
-+
-+ /* address does not exist */
-+ ASSERT_COND(p_HashEntry != NULL);
-+
-+ return E_OK;
-+}
-+
-+void DtsecRestartTbiAN(t_Handle h_Dtsec)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ if (!p_Dtsec)
-+ return;
-+
-+ DTSEC_MII_WritePhyReg(p_Dtsec, p_Dtsec->tbi_phy_addr, 0,
-+ PHY_CR_ANE | PHY_CR_RESET_AN | PHY_CR_FULLDUPLEX | PHY_CR_SPEED1);
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecSetPromiscuous(t_Handle h_Dtsec, bool newVal)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ dtsec_set_uc_promisc(p_Dtsec->p_MemMap, newVal);
-+ dtsec_set_mc_promisc(p_Dtsec->p_MemMap, newVal);
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecSetStatistics(t_Handle h_Dtsec, e_FmMacStatisticsLevel statisticsLevel)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ p_Dtsec->statisticsLevel = statisticsLevel;
-+
-+ err = (t_Error)dtsec_set_stat_level(p_Dtsec->p_MemMap,
-+ (enum mac_stat_level)statisticsLevel);
-+ if (err != E_OK)
-+ return err;
-+
-+ switch (statisticsLevel)
-+ {
-+ case (e_FM_MAC_NONE_STATISTICS):
-+ p_Dtsec->exceptions &= ~DTSEC_IMASK_MSROEN;
-+ break;
-+ case (e_FM_MAC_PARTIAL_STATISTICS):
-+ p_Dtsec->exceptions |= DTSEC_IMASK_MSROEN;
-+ break;
-+ case (e_FM_MAC_FULL_STATISTICS):
-+ p_Dtsec->exceptions |= DTSEC_IMASK_MSROEN;
-+ break;
-+ default:
-+ RETURN_ERROR(MINOR, E_INVALID_SELECTION, NO_MSG);
-+ }
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecAdjustLink(t_Handle h_Dtsec, e_EnetSpeed speed, bool fullDuplex)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+ t_Error err;
-+ enum enet_interface enet_interface;
-+ enum enet_speed enet_speed;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ p_Dtsec->enetMode = MAKE_ENET_MODE(ENET_INTERFACE_FROM_MODE(p_Dtsec->enetMode), speed);
-+ enet_interface = (enum enet_interface) ENET_INTERFACE_FROM_MODE(p_Dtsec->enetMode);
-+ enet_speed = (enum enet_speed) ENET_SPEED_FROM_MODE(p_Dtsec->enetMode);
-+ p_Dtsec->halfDuplex = !fullDuplex;
-+
-+ err = (t_Error)dtsec_adjust_link(p_Dtsec->p_MemMap, enet_interface, enet_speed, fullDuplex);
-+
-+ if (err == E_CONFLICT)
-+ RETURN_ERROR(MAJOR, E_CONFLICT, ("Ethernet interface does not support Half Duplex mode"));
-+
-+ return err;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecRestartAutoneg(t_Handle h_Dtsec)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+ uint16_t tmpReg16;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ DTSEC_MII_ReadPhyReg(p_Dtsec, p_Dtsec->tbi_phy_addr, 0, &tmpReg16);
-+ tmpReg16 |= (PHY_CR_RESET_AN);
-+ DTSEC_MII_WritePhyReg(p_Dtsec, p_Dtsec->tbi_phy_addr, 0, tmpReg16);
-+
-+ return E_OK;
-+}
-+
-+/*************************************************************************************/
-+/* .............................................................................. */
-+
-+static t_Error DtsecGetId(t_Handle h_Dtsec, uint32_t *macId)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ *macId = p_Dtsec->macId;
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecGetVersion(t_Handle h_Dtsec, uint32_t *macVersion)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ *macVersion = dtsec_get_revision(p_Dtsec->p_MemMap);
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecSetException(t_Handle h_Dtsec, e_FmMacExceptions exception, bool enable)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+ uint32_t bitMask = 0;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+
-+ if (exception != e_FM_MAC_EX_1G_1588_TS_RX_ERR)
-+ {
-+ GET_EXCEPTION_FLAG(bitMask, exception);
-+ if (bitMask)
-+ {
-+ if (enable)
-+ p_Dtsec->exceptions |= bitMask;
-+ else
-+ p_Dtsec->exceptions &= ~bitMask;
-+ }
-+ else
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Undefined exception"));
-+
-+ if (enable)
-+ dtsec_enable_interrupt(p_Dtsec->p_MemMap, bitMask);
-+ else
-+ dtsec_disable_interrupt(p_Dtsec->p_MemMap, bitMask);
-+ }
-+ else
-+ {
-+ if (!p_Dtsec->ptpTsuEnabled)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Exception valid for 1588 only"));
-+ switch (exception)
-+ {
-+ case (e_FM_MAC_EX_1G_1588_TS_RX_ERR):
-+ if (enable)
-+ {
-+ p_Dtsec->enTsuErrExeption = TRUE;
-+ dtsec_enable_tmr_interrupt(p_Dtsec->p_MemMap);
-+ } else {
-+ p_Dtsec->enTsuErrExeption = FALSE;
-+ dtsec_disable_tmr_interrupt(p_Dtsec->p_MemMap);
-+ }
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Undefined exception"));
-+ }
-+ }
-+
-+ return E_OK;
-+}
-+
-+
-+
-+/* ........................................................................... */
-+
-+#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))
-+static t_Error DtsecDumpRegs(t_Handle h_Dtsec)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+ int i = 0;
-+
-+ DECLARE_DUMP;
-+
-+ if (p_Dtsec->p_MemMap)
-+ {
-+
-+ DUMP_TITLE(p_Dtsec->p_MemMap, ("dTSEC %d: ", p_Dtsec->macId));
-+ DUMP_VAR(p_Dtsec->p_MemMap, tsec_id);
-+ DUMP_VAR(p_Dtsec->p_MemMap, tsec_id2);
-+ DUMP_VAR(p_Dtsec->p_MemMap, ievent);
-+ DUMP_VAR(p_Dtsec->p_MemMap, imask);
-+ DUMP_VAR(p_Dtsec->p_MemMap, ecntrl);
-+ DUMP_VAR(p_Dtsec->p_MemMap, ptv);
-+ DUMP_VAR(p_Dtsec->p_MemMap, tmr_ctrl);
-+ DUMP_VAR(p_Dtsec->p_MemMap, tmr_pevent);
-+ DUMP_VAR(p_Dtsec->p_MemMap, tmr_pemask);
-+ DUMP_VAR(p_Dtsec->p_MemMap, tctrl);
-+ DUMP_VAR(p_Dtsec->p_MemMap, rctrl);
-+ DUMP_VAR(p_Dtsec->p_MemMap, maccfg1);
-+ DUMP_VAR(p_Dtsec->p_MemMap, maccfg2);
-+ DUMP_VAR(p_Dtsec->p_MemMap, ipgifg);
-+ DUMP_VAR(p_Dtsec->p_MemMap, hafdup);
-+ DUMP_VAR(p_Dtsec->p_MemMap, maxfrm);
-+
-+ DUMP_VAR(p_Dtsec->p_MemMap, macstnaddr1);
-+ DUMP_VAR(p_Dtsec->p_MemMap, macstnaddr2);
-+
-+ DUMP_SUBSTRUCT_ARRAY(i, 8)
-+ {
-+ DUMP_VAR(p_Dtsec->p_MemMap, macaddr[i].exact_match1);
-+ DUMP_VAR(p_Dtsec->p_MemMap, macaddr[i].exact_match2);
-+ }
-+ DUMP_VAR(p_Dtsec->p_MemMap, car1);
-+ DUMP_VAR(p_Dtsec->p_MemMap, car2);
-+ }
-+
-+ return E_OK;
-+}
-+#endif /* (defined(DEBUG_ERRORS) && ... */
-+
-+
-+/*****************************************************************************/
-+/* dTSEC Init & Free API */
-+/*****************************************************************************/
-+
-+/* .............................................................................. */
-+
-+static t_Error DtsecInit(t_Handle h_Dtsec)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+ struct dtsec_cfg *p_DtsecDriverParam;
-+ t_Error err;
-+ uint16_t maxFrmLn;
-+ enum enet_interface enet_interface;
-+ enum enet_speed enet_speed;
-+ t_EnetAddr ethAddr;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec->p_DtsecDriverParam, E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec->fmMacControllerDriver.h_Fm, E_INVALID_HANDLE);
-+
-+ FM_GetRevision(p_Dtsec->fmMacControllerDriver.h_Fm, &p_Dtsec->fmMacControllerDriver.fmRevInfo);
-+ CHECK_INIT_PARAMETERS(p_Dtsec, CheckInitParameters);
-+
-+ p_DtsecDriverParam = p_Dtsec->p_DtsecDriverParam;
-+ p_Dtsec->halfDuplex = p_DtsecDriverParam->halfdup_on;
-+
-+ enet_interface = (enum enet_interface)ENET_INTERFACE_FROM_MODE(p_Dtsec->enetMode);
-+ enet_speed = (enum enet_speed)ENET_SPEED_FROM_MODE(p_Dtsec->enetMode);
-+ MAKE_ENET_ADDR_FROM_UINT64(p_Dtsec->addr, ethAddr);
-+
-+ err = (t_Error)dtsec_init(p_Dtsec->p_MemMap,
-+ p_DtsecDriverParam,
-+ enet_interface,
-+ enet_speed,
-+ (uint8_t*)ethAddr,
-+ p_Dtsec->fmMacControllerDriver.fmRevInfo.majorRev,
-+ p_Dtsec->fmMacControllerDriver.fmRevInfo.minorRev,
-+ p_Dtsec->exceptions);
-+ if (err)
-+ {
-+ FreeInitResources(p_Dtsec);
-+ RETURN_ERROR(MAJOR, err, ("This DTSEC version does not support the required i/f mode"));
-+ }
-+
-+ DTSEC_MII_Init(h_Dtsec);
-+
-+ if (ENET_INTERFACE_FROM_MODE(p_Dtsec->enetMode) == e_ENET_IF_SGMII)
-+ {
-+ uint16_t tmpReg16;
-+
-+ /* Configure the TBI PHY Control Register */
-+ tmpReg16 = PHY_TBICON_CLK_SEL | PHY_TBICON_SRESET;
-+ DTSEC_MII_WritePhyReg(p_Dtsec, (uint8_t)p_DtsecDriverParam->tbipa, 17, tmpReg16);
-+
-+ tmpReg16 = PHY_TBICON_CLK_SEL;
-+ DTSEC_MII_WritePhyReg(p_Dtsec, (uint8_t)p_DtsecDriverParam->tbipa, 17, tmpReg16);
-+
-+ tmpReg16 = (PHY_CR_PHY_RESET | PHY_CR_ANE | PHY_CR_FULLDUPLEX | PHY_CR_SPEED1);
-+ DTSEC_MII_WritePhyReg(p_Dtsec, (uint8_t)p_DtsecDriverParam->tbipa, 0, tmpReg16);
-+
-+ if (p_Dtsec->enetMode & ENET_IF_SGMII_BASEX)
-+ tmpReg16 = PHY_TBIANA_1000X;
-+ else
-+ tmpReg16 = PHY_TBIANA_SGMII;
-+ DTSEC_MII_WritePhyReg(p_Dtsec, (uint8_t)p_DtsecDriverParam->tbipa, 4, tmpReg16);
-+
-+ tmpReg16 = (PHY_CR_ANE | PHY_CR_RESET_AN | PHY_CR_FULLDUPLEX | PHY_CR_SPEED1);
-+
-+ DTSEC_MII_WritePhyReg(p_Dtsec, (uint8_t)p_DtsecDriverParam->tbipa, 0, tmpReg16);
-+ }
-+
-+ /* Max Frame Length */
-+ maxFrmLn = dtsec_get_max_frame_len(p_Dtsec->p_MemMap);
-+ err = FmSetMacMaxFrame(p_Dtsec->fmMacControllerDriver.h_Fm, e_FM_MAC_1G,
-+ p_Dtsec->fmMacControllerDriver.macId, maxFrmLn);
-+
-+ p_Dtsec->p_MulticastAddrHash = AllocHashTable(EXTENDED_HASH_TABLE_SIZE);
-+ if (!p_Dtsec->p_MulticastAddrHash) {
-+ FreeInitResources(p_Dtsec);
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MC hash table is FAILED"));
-+ }
-+
-+ p_Dtsec->p_UnicastAddrHash = AllocHashTable(HASH_TABLE_SIZE);
-+ if (!p_Dtsec->p_UnicastAddrHash)
-+ {
-+ FreeInitResources(p_Dtsec);
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("UC hash table is FAILED"));
-+ }
-+
-+ /* register err intr handler for dtsec to FPM (err)*/
-+ FmRegisterIntr(p_Dtsec->fmMacControllerDriver.h_Fm,
-+ e_FM_MOD_1G_MAC,
-+ p_Dtsec->macId,
-+ e_FM_INTR_TYPE_ERR,
-+ DtsecIsr,
-+ p_Dtsec);
-+ /* register 1588 intr handler for TMR to FPM (normal)*/
-+ FmRegisterIntr(p_Dtsec->fmMacControllerDriver.h_Fm,
-+ e_FM_MOD_1G_MAC,
-+ p_Dtsec->macId,
-+ e_FM_INTR_TYPE_NORMAL,
-+ Dtsec1588Isr,
-+ p_Dtsec);
-+ /* register normal intr handler for dtsec to main interrupt controller. */
-+ if (p_Dtsec->mdioIrq != NO_IRQ)
-+ {
-+ XX_SetIntr(p_Dtsec->mdioIrq, DtsecMdioIsr, p_Dtsec);
-+ XX_EnableIntr(p_Dtsec->mdioIrq);
-+ }
-+
-+ XX_Free(p_DtsecDriverParam);
-+ p_Dtsec->p_DtsecDriverParam = NULL;
-+
-+ err = DtsecSetStatistics(h_Dtsec, e_FM_MAC_FULL_STATISTICS);
-+ if (err)
-+ {
-+ FreeInitResources(p_Dtsec);
-+ RETURN_ERROR(MAJOR, err, ("Undefined statistics level"));
-+ }
-+
-+ return E_OK;
-+}
-+
-+/* ........................................................................... */
-+
-+static t_Error DtsecFree(t_Handle h_Dtsec)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+
-+ FreeInitResources(p_Dtsec);
-+
-+ if (p_Dtsec->p_DtsecDriverParam)
-+ {
-+ XX_Free(p_Dtsec->p_DtsecDriverParam);
-+ p_Dtsec->p_DtsecDriverParam = NULL;
-+ }
-+ XX_Free (h_Dtsec);
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static void InitFmMacControllerDriver(t_FmMacControllerDriver *p_FmMacControllerDriver)
-+{
-+ p_FmMacControllerDriver->f_FM_MAC_Init = DtsecInit;
-+ p_FmMacControllerDriver->f_FM_MAC_Free = DtsecFree;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_SetStatistics = DtsecSetStatistics;
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigLoopback = DtsecConfigLoopback;
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigMaxFrameLength = DtsecConfigMaxFrameLength;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigWan = NULL; /* Not supported on dTSEC */
-+
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigPadAndCrc = DtsecConfigPadAndCrc;
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigHalfDuplex = DtsecConfigHalfDuplex;
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigLengthCheck = DtsecConfigLengthCheck;
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigTbiPhyAddr = DtsecConfigTbiPhyAddr;
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigException = DtsecConfigException;
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigResetOnInit = NULL;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_Enable = DtsecEnable;
-+ p_FmMacControllerDriver->f_FM_MAC_Disable = DtsecDisable;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_SetException = DtsecSetException;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_SetPromiscuous = DtsecSetPromiscuous;
-+ p_FmMacControllerDriver->f_FM_MAC_AdjustLink = DtsecAdjustLink;
-+ p_FmMacControllerDriver->f_FM_MAC_RestartAutoneg = DtsecRestartAutoneg;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_Enable1588TimeStamp = DtsecEnable1588TimeStamp;
-+ p_FmMacControllerDriver->f_FM_MAC_Disable1588TimeStamp = DtsecDisable1588TimeStamp;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_SetTxAutoPauseFrames = DtsecTxMacPause;
-+ p_FmMacControllerDriver->f_FM_MAC_SetTxPauseFrames = DtsecSetTxPauseFrames;
-+ p_FmMacControllerDriver->f_FM_MAC_SetRxIgnorePauseFrames = DtsecRxIgnoreMacPause;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_ResetCounters = DtsecResetCounters;
-+ p_FmMacControllerDriver->f_FM_MAC_GetStatistics = DtsecGetStatistics;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_ModifyMacAddr = DtsecModifyMacAddress;
-+ p_FmMacControllerDriver->f_FM_MAC_AddHashMacAddr = DtsecAddHashMacAddress;
-+ p_FmMacControllerDriver->f_FM_MAC_RemoveHashMacAddr = DtsecDelHashMacAddress;
-+ p_FmMacControllerDriver->f_FM_MAC_AddExactMatchMacAddr = DtsecAddExactMatchMacAddress;
-+ p_FmMacControllerDriver->f_FM_MAC_RemovelExactMatchMacAddr = DtsecDelExactMatchMacAddress;
-+ p_FmMacControllerDriver->f_FM_MAC_GetId = DtsecGetId;
-+ p_FmMacControllerDriver->f_FM_MAC_GetVersion = DtsecGetVersion;
-+ p_FmMacControllerDriver->f_FM_MAC_GetMaxFrameLength = DtsecGetMaxFrameLength;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_MII_WritePhyReg = DTSEC_MII_WritePhyReg;
-+ p_FmMacControllerDriver->f_FM_MAC_MII_ReadPhyReg = DTSEC_MII_ReadPhyReg;
-+
-+#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))
-+ p_FmMacControllerDriver->f_FM_MAC_DumpRegs = DtsecDumpRegs;
-+#endif /* (defined(DEBUG_ERRORS) && ... */
-+}
-+
-+
-+/*****************************************************************************/
-+/* dTSEC Config Main Entry */
-+/*****************************************************************************/
-+
-+/* .............................................................................. */
-+
-+t_Handle DTSEC_Config(t_FmMacParams *p_FmMacParam)
-+{
-+ t_Dtsec *p_Dtsec;
-+ struct dtsec_cfg *p_DtsecDriverParam;
-+ uintptr_t baseAddr;
-+
-+ SANITY_CHECK_RETURN_VALUE(p_FmMacParam, E_NULL_POINTER, NULL);
-+
-+ baseAddr = p_FmMacParam->baseAddr;
-+
-+ /* allocate memory for the UCC GETH data structure. */
-+ p_Dtsec = (t_Dtsec *)XX_Malloc(sizeof(t_Dtsec));
-+ if (!p_Dtsec)
-+ {
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("dTSEC driver structure"));
-+ return NULL;
-+ }
-+ memset(p_Dtsec, 0, sizeof(t_Dtsec));
-+ InitFmMacControllerDriver(&p_Dtsec->fmMacControllerDriver);
-+
-+ /* allocate memory for the dTSEC driver parameters data structure. */
-+ p_DtsecDriverParam = (struct dtsec_cfg *) XX_Malloc(sizeof(struct dtsec_cfg));
-+ if (!p_DtsecDriverParam)
-+ {
-+ XX_Free(p_Dtsec);
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("dTSEC driver parameters"));
-+ return NULL;
-+ }
-+ memset(p_DtsecDriverParam, 0, sizeof(struct dtsec_cfg));
-+
-+ /* Plant parameter structure pointer */
-+ p_Dtsec->p_DtsecDriverParam = p_DtsecDriverParam;
-+
-+ dtsec_defconfig(p_DtsecDriverParam);
-+
-+ p_Dtsec->p_MemMap = (struct dtsec_regs *)UINT_TO_PTR(baseAddr);
-+ p_Dtsec->p_MiiMemMap = (struct dtsec_mii_reg *)UINT_TO_PTR(baseAddr + DTSEC_TO_MII_OFFSET);
-+ p_Dtsec->addr = ENET_ADDR_TO_UINT64(p_FmMacParam->addr);
-+ p_Dtsec->enetMode = p_FmMacParam->enetMode;
-+ p_Dtsec->macId = p_FmMacParam->macId;
-+ p_Dtsec->exceptions = DEFAULT_exceptions;
-+ p_Dtsec->mdioIrq = p_FmMacParam->mdioIrq;
-+ p_Dtsec->f_Exception = p_FmMacParam->f_Exception;
-+ p_Dtsec->f_Event = p_FmMacParam->f_Event;
-+ p_Dtsec->h_App = p_FmMacParam->h_App;
-+ p_Dtsec->ptpTsuEnabled = p_Dtsec->p_DtsecDriverParam->ptp_tsu_en;
-+ p_Dtsec->enTsuErrExeption = p_Dtsec->p_DtsecDriverParam->ptp_exception_en;
-+ p_Dtsec->tbi_phy_addr = p_Dtsec->p_DtsecDriverParam->tbi_phy_addr;
-+
-+ return p_Dtsec;
-+}
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/dtsec.h b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/dtsec.h
-new file mode 100644
-index 0000000..01296dd
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/dtsec.h
-@@ -0,0 +1,245 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+/******************************************************************************
-+ @File dtsec.h
-+
-+ @Description FM dTSEC ...
-+*//***************************************************************************/
-+#ifndef __DTSEC_H
-+#define __DTSEC_H
-+
-+#include "std_ext.h"
-+#include "error_ext.h"
-+#include "list_ext.h"
-+#include "enet_ext.h"
-+
-+#include "dtsec_mii_acc.h"
-+#include "fm_mac.h"
-+
-+
-+#define DEFAULT_exceptions \
-+ ((uint32_t)(DTSEC_IMASK_BREN | \
-+ DTSEC_IMASK_RXCEN | \
-+ DTSEC_IMASK_BTEN | \
-+ DTSEC_IMASK_TXCEN | \
-+ DTSEC_IMASK_TXEEN | \
-+ DTSEC_IMASK_ABRTEN | \
-+ DTSEC_IMASK_LCEN | \
-+ DTSEC_IMASK_CRLEN | \
-+ DTSEC_IMASK_XFUNEN | \
-+ DTSEC_IMASK_IFERREN | \
-+ DTSEC_IMASK_MAGEN | \
-+ DTSEC_IMASK_TDPEEN | \
-+ DTSEC_IMASK_RDPEEN))
-+
-+#define GET_EXCEPTION_FLAG(bitMask, exception) switch (exception){ \
-+ case e_FM_MAC_EX_1G_BAB_RX: \
-+ bitMask = DTSEC_IMASK_BREN; break; \
-+ case e_FM_MAC_EX_1G_RX_CTL: \
-+ bitMask = DTSEC_IMASK_RXCEN; break; \
-+ case e_FM_MAC_EX_1G_GRATEFUL_TX_STP_COMPLET: \
-+ bitMask = DTSEC_IMASK_GTSCEN ; break; \
-+ case e_FM_MAC_EX_1G_BAB_TX: \
-+ bitMask = DTSEC_IMASK_BTEN ; break; \
-+ case e_FM_MAC_EX_1G_TX_CTL: \
-+ bitMask = DTSEC_IMASK_TXCEN ; break; \
-+ case e_FM_MAC_EX_1G_TX_ERR: \
-+ bitMask = DTSEC_IMASK_TXEEN ; break; \
-+ case e_FM_MAC_EX_1G_LATE_COL: \
-+ bitMask = DTSEC_IMASK_LCEN ; break; \
-+ case e_FM_MAC_EX_1G_COL_RET_LMT: \
-+ bitMask = DTSEC_IMASK_CRLEN ; break; \
-+ case e_FM_MAC_EX_1G_TX_FIFO_UNDRN: \
-+ bitMask = DTSEC_IMASK_XFUNEN ; break; \
-+ case e_FM_MAC_EX_1G_MAG_PCKT: \
-+ bitMask = DTSEC_IMASK_MAGEN ; break; \
-+ case e_FM_MAC_EX_1G_MII_MNG_RD_COMPLET: \
-+ bitMask = DTSEC_IMASK_MMRDEN; break; \
-+ case e_FM_MAC_EX_1G_MII_MNG_WR_COMPLET: \
-+ bitMask = DTSEC_IMASK_MMWREN ; break; \
-+ case e_FM_MAC_EX_1G_GRATEFUL_RX_STP_COMPLET: \
-+ bitMask = DTSEC_IMASK_GRSCEN; break; \
-+ case e_FM_MAC_EX_1G_TX_DATA_ERR: \
-+ bitMask = DTSEC_IMASK_TDPEEN; break; \
-+ case e_FM_MAC_EX_1G_RX_MIB_CNT_OVFL: \
-+ bitMask = DTSEC_IMASK_MSROEN ; break; \
-+ default: bitMask = 0;break;}
-+
-+
-+#define MAX_PACKET_ALIGNMENT 31
-+#define MAX_INTER_PACKET_GAP 0x7f
-+#define MAX_INTER_PALTERNATE_BEB 0x0f
-+#define MAX_RETRANSMISSION 0x0f
-+#define MAX_COLLISION_WINDOW 0x03ff
-+
-+
-+/********************* From mac ext ******************************************/
-+typedef uint32_t t_ErrorDisable;
-+
-+#define ERROR_DISABLE_TRANSMIT 0x00400000
-+#define ERROR_DISABLE_LATE_COLLISION 0x00040000
-+#define ERROR_DISABLE_COLLISION_RETRY_LIMIT 0x00020000
-+#define ERROR_DISABLE_TxFIFO_UNDERRUN 0x00010000
-+#define ERROR_DISABLE_TxABORT 0x00008000
-+#define ERROR_DISABLE_INTERFACE 0x00004000
-+#define ERROR_DISABLE_TxDATA_PARITY 0x00000002
-+#define ERROR_DISABLE_RxDATA_PARITY 0x00000001
-+
-+/*****************************************************************************/
-+#define DTSEC_NUM_OF_PADDRS 15 /* number of pattern match registers (entries) */
-+
-+#define GROUP_ADDRESS 0x0000010000000000LL /* Group address bit indication */
-+
-+#define HASH_TABLE_SIZE 256 /* Hash table size (= 32 bits * 8 regs) */
-+
-+#define HASH_TABLE_SIZE 256 /* Hash table size (32 bits * 8 regs) */
-+#define EXTENDED_HASH_TABLE_SIZE 512 /* Extended Hash table size (32 bits * 16 regs) */
-+
-+#define DTSEC_TO_MII_OFFSET 0x1000 /* number of pattern match registers (entries) */
-+
-+#define MAX_PHYS 32 /* maximum number of phys */
-+
-+#define VAL32BIT 0x100000000LL
-+#define VAL22BIT 0x00400000
-+#define VAL16BIT 0x00010000
-+#define VAL12BIT 0x00001000
-+
-+/* PHY Control Register */
-+#define PHY_CR_PHY_RESET 0x8000
-+#define PHY_CR_LOOPBACK 0x4000
-+#define PHY_CR_SPEED0 0x2000
-+#define PHY_CR_ANE 0x1000
-+#define PHY_CR_RESET_AN 0x0200
-+#define PHY_CR_FULLDUPLEX 0x0100
-+#define PHY_CR_SPEED1 0x0040
-+
-+#define PHY_TBICON_SRESET 0x8000
-+#define PHY_TBICON_CLK_SEL 0x0020
-+
-+#define PHY_TBIANA_SGMII 0x4001
-+#define PHY_TBIANA_1000X 0x01a0
-+
-+
-+/* CAR1/2 bits */
-+#define CAR1_TR64 0x80000000
-+#define CAR1_TR127 0x40000000
-+#define CAR1_TR255 0x20000000
-+#define CAR1_TR511 0x10000000
-+#define CAR1_TRK1 0x08000000
-+#define CAR1_TRMAX 0x04000000
-+#define CAR1_TRMGV 0x02000000
-+
-+#define CAR1_RBYT 0x00010000
-+#define CAR1_RPKT 0x00008000
-+#define CAR1_RMCA 0x00002000
-+#define CAR1_RBCA 0x00001000
-+#define CAR1_RXPF 0x00000400
-+#define CAR1_RALN 0x00000100
-+#define CAR1_RFLR 0x00000080
-+#define CAR1_RCDE 0x00000040
-+#define CAR1_RCSE 0x00000020
-+#define CAR1_RUND 0x00000010
-+#define CAR1_ROVR 0x00000008
-+#define CAR1_RFRG 0x00000004
-+#define CAR1_RJBR 0x00000002
-+#define CAR1_RDRP 0x00000001
-+
-+#define CAR2_TFCS 0x00040000
-+#define CAR2_TBYT 0x00002000
-+#define CAR2_TPKT 0x00001000
-+#define CAR2_TMCA 0x00000800
-+#define CAR2_TBCA 0x00000400
-+#define CAR2_TXPF 0x00000200
-+#define CAR2_TDRP 0x00000001
-+
-+typedef struct t_InternalStatistics
-+{
-+ uint64_t tr64;
-+ uint64_t tr127;
-+ uint64_t tr255;
-+ uint64_t tr511;
-+ uint64_t tr1k;
-+ uint64_t trmax;
-+ uint64_t trmgv;
-+ uint64_t rfrg;
-+ uint64_t rjbr;
-+ uint64_t rdrp;
-+ uint64_t raln;
-+ uint64_t rund;
-+ uint64_t rovr;
-+ uint64_t rxpf;
-+ uint64_t txpf;
-+ uint64_t rbyt;
-+ uint64_t rpkt;
-+ uint64_t rmca;
-+ uint64_t rbca;
-+ uint64_t rflr;
-+ uint64_t rcde;
-+ uint64_t rcse;
-+ uint64_t tbyt;
-+ uint64_t tpkt;
-+ uint64_t tmca;
-+ uint64_t tbca;
-+ uint64_t tdrp;
-+ uint64_t tfcs;
-+} t_InternalStatistics;
-+
-+typedef struct {
-+ t_FmMacControllerDriver fmMacControllerDriver;
-+ t_Handle h_App; /**< Handle to the upper layer application */
-+ struct dtsec_regs *p_MemMap; /**< pointer to dTSEC memory mapped registers. */
-+ struct dtsec_mii_reg *p_MiiMemMap; /**< pointer to dTSEC MII memory mapped registers. */
-+ uint64_t addr; /**< MAC address of device; */
-+ e_EnetMode enetMode; /**< Ethernet physical interface */
-+ t_FmMacExceptionCallback *f_Exception;
-+ int mdioIrq;
-+ t_FmMacExceptionCallback *f_Event;
-+ bool indAddrRegUsed[DTSEC_NUM_OF_PADDRS]; /**< Whether a particular individual address recognition register is being used */
-+ uint64_t paddr[DTSEC_NUM_OF_PADDRS]; /**< MAC address for particular individual address recognition register */
-+ uint8_t numOfIndAddrInRegs; /**< Number of individual addresses in registers for this station. */
-+ bool halfDuplex;
-+ t_InternalStatistics internalStatistics;
-+ t_EthHash *p_MulticastAddrHash; /* pointer to driver's global address hash table */
-+ t_EthHash *p_UnicastAddrHash; /* pointer to driver's individual address hash table */
-+ uint8_t macId;
-+ uint8_t tbi_phy_addr;
-+ uint32_t exceptions;
-+ bool ptpTsuEnabled;
-+ bool enTsuErrExeption;
-+ e_FmMacStatisticsLevel statisticsLevel;
-+ struct dtsec_cfg *p_DtsecDriverParam;
-+} t_Dtsec;
-+
-+
-+#endif /* __DTSEC_H */
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/dtsec_mii_acc.c b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/dtsec_mii_acc.c
-new file mode 100644
-index 0000000..371e1f9
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/dtsec_mii_acc.c
-@@ -0,0 +1,109 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+/******************************************************************************
-+ @File dtsec_mii_acc.c
-+
-+ @Description FM dtsec MII register access MAC ...
-+*//***************************************************************************/
-+
-+#include "error_ext.h"
-+#include "std_ext.h"
-+#include "fm_mac.h"
-+#include "dtsec.h"
-+#include "fsl_fman_dtsec_mii_acc.h"
-+
-+
-+/*****************************************************************************/
-+t_Error DTSEC_MII_WritePhyReg(t_Handle h_Dtsec,
-+ uint8_t phyAddr,
-+ uint8_t reg,
-+ uint16_t data)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+ struct dtsec_mii_reg *miiregs;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec->p_MiiMemMap, E_INVALID_HANDLE);
-+
-+ miiregs = p_Dtsec->p_MiiMemMap;
-+
-+ err = (t_Error)dtsec_mii_write_reg(miiregs, phyAddr, reg, data);
-+
-+ return err;
-+}
-+
-+/*****************************************************************************/
-+t_Error DTSEC_MII_ReadPhyReg(t_Handle h_Dtsec,
-+ uint8_t phyAddr,
-+ uint8_t reg,
-+ uint16_t *p_Data)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+ struct dtsec_mii_reg *miiregs;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec->p_MiiMemMap, E_INVALID_HANDLE);
-+
-+ miiregs = p_Dtsec->p_MiiMemMap;
-+
-+ err = (t_Error)dtsec_mii_read_reg(miiregs, phyAddr, reg, p_Data);
-+
-+ if (*p_Data == 0xffff)
-+ RETURN_ERROR(MINOR, E_NO_DEVICE,
-+ ("Read wrong data (0xffff): phyAddr 0x%x, reg 0x%x",
-+ phyAddr, reg));
-+ if (err)
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+
-+ return err;
-+}
-+
-+t_Error DTSEC_MII_Init(t_Handle h_Dtsec)
-+{
-+ t_Dtsec *p_Dtsec = (t_Dtsec *)h_Dtsec;
-+ struct dtsec_mii_reg *miiregs;
-+ uint16_t dtsec_freq;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Dtsec->p_MiiMemMap, E_INVALID_HANDLE);
-+
-+ miiregs = p_Dtsec->p_MiiMemMap;
-+ dtsec_freq = (uint16_t)(p_Dtsec->fmMacControllerDriver.clkFreq >> 1);
-+
-+ dtsec_mii_init(miiregs, dtsec_freq);
-+
-+ return E_OK;
-+}
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/dtsec_mii_acc.h b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/dtsec_mii_acc.h
-new file mode 100644
-index 0000000..d5dd39a
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/dtsec_mii_acc.h
-@@ -0,0 +1,45 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+#ifndef __DTSEC_MII_ACC_H
-+#define __DTSEC_MII_ACC_H
-+
-+#include "std_ext.h"
-+
-+
-+t_Error DTSEC_MII_WritePhyReg(t_Handle h_Dtsec, uint8_t phyAddr, uint8_t reg, uint16_t data);
-+t_Error DTSEC_MII_ReadPhyReg(t_Handle h_Dtsec, uint8_t phyAddr, uint8_t reg, uint16_t *p_Data);
-+t_Error DTSEC_MII_Init(t_Handle h_Dtsec);
-+
-+
-+#endif /* __DTSEC_MII_ACC_H */
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fm_mac.c b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fm_mac.c
-new file mode 100644
-index 0000000..e2deaa2
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fm_mac.c
-@@ -0,0 +1,628 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+/******************************************************************************
-+ @File fm_mac.c
-+
-+ @Description FM MAC ...
-+*//***************************************************************************/
-+#include "std_ext.h"
-+#include "string_ext.h"
-+#include "sprint_ext.h"
-+#include "error_ext.h"
-+#include "fm_ext.h"
-+
-+#include "fm_common.h"
-+#include "fm_mac.h"
-+
-+
-+/* ......................................................................... */
-+
-+t_Handle FM_MAC_Config (t_FmMacParams *p_FmMacParam)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver;
-+
-+ SANITY_CHECK_RETURN_VALUE(p_FmMacParam, E_INVALID_HANDLE, NULL);
-+
-+#if (DPAA_VERSION == 10)
-+ if (ENET_SPEED_FROM_MODE(p_FmMacParam->enetMode) < e_ENET_SPEED_10000)
-+ p_FmMacControllerDriver = (t_FmMacControllerDriver *)DTSEC_Config(p_FmMacParam);
-+ else
-+#if FM_MAX_NUM_OF_10G_MACS > 0
-+ p_FmMacControllerDriver = (t_FmMacControllerDriver *)TGEC_Config(p_FmMacParam);
-+#else
-+ p_FmMacControllerDriver = NULL;
-+#endif /* FM_MAX_NUM_OF_10G_MACS > 0 */
-+#else
-+ p_FmMacControllerDriver = (t_FmMacControllerDriver *)MEMAC_Config(p_FmMacParam);
-+#endif /* (DPAA_VERSION == 10) */
-+
-+ if (!p_FmMacControllerDriver)
-+ return NULL;
-+
-+ p_FmMacControllerDriver->h_Fm = p_FmMacParam->h_Fm;
-+ p_FmMacControllerDriver->enetMode = p_FmMacParam->enetMode;
-+ p_FmMacControllerDriver->macId = p_FmMacParam->macId;
-+ p_FmMacControllerDriver->resetOnInit = DEFAULT_resetOnInit;
-+
-+ if ((p_FmMacControllerDriver->clkFreq = FmGetClockFreq(p_FmMacControllerDriver->h_Fm)) == 0)
-+ {
-+ REPORT_ERROR(MAJOR, E_INVALID_STATE, ("Can't get clock for MAC!"));
-+ return NULL;
-+ }
-+
-+ return (t_Handle)p_FmMacControllerDriver;
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_Init (t_Handle h_FmMac)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->resetOnInit &&
-+ !p_FmMacControllerDriver->f_FM_MAC_ConfigResetOnInit &&
-+ (FmResetMac(p_FmMacControllerDriver->h_Fm,
-+ ((ENET_INTERFACE_FROM_MODE(p_FmMacControllerDriver->enetMode) == e_ENET_IF_XGMII) ?
-+ e_FM_MAC_10G : e_FM_MAC_1G),
-+ p_FmMacControllerDriver->macId) != E_OK))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Can't reset MAC!"));
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_Init)
-+ return p_FmMacControllerDriver->f_FM_MAC_Init(h_FmMac);
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_Free (t_Handle h_FmMac)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_Free)
-+ return p_FmMacControllerDriver->f_FM_MAC_Free(h_FmMac);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_ConfigResetOnInit (t_Handle h_FmMac, bool enable)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_ConfigResetOnInit)
-+ return p_FmMacControllerDriver->f_FM_MAC_ConfigResetOnInit(h_FmMac, enable);
-+
-+ p_FmMacControllerDriver->resetOnInit = enable;
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_ConfigLoopback (t_Handle h_FmMac, bool newVal)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_ConfigLoopback)
-+ return p_FmMacControllerDriver->f_FM_MAC_ConfigLoopback(h_FmMac, newVal);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_ConfigMaxFrameLength (t_Handle h_FmMac, uint16_t newVal)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_ConfigMaxFrameLength)
-+ return p_FmMacControllerDriver->f_FM_MAC_ConfigMaxFrameLength(h_FmMac, newVal);
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_ConfigWan (t_Handle h_FmMac, bool flag)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_ConfigWan)
-+ return p_FmMacControllerDriver->f_FM_MAC_ConfigWan(h_FmMac, flag);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_ConfigPadAndCrc (t_Handle h_FmMac, bool newVal)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_ConfigPadAndCrc)
-+ return p_FmMacControllerDriver->f_FM_MAC_ConfigPadAndCrc(h_FmMac, newVal);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_ConfigHalfDuplex (t_Handle h_FmMac, bool newVal)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_ConfigHalfDuplex)
-+ return p_FmMacControllerDriver->f_FM_MAC_ConfigHalfDuplex(h_FmMac,newVal);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_ConfigTbiPhyAddr (t_Handle h_FmMac, uint8_t newVal)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_ConfigTbiPhyAddr)
-+ return p_FmMacControllerDriver->f_FM_MAC_ConfigTbiPhyAddr(h_FmMac,newVal);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_ConfigLengthCheck (t_Handle h_FmMac, bool newVal)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_ConfigLengthCheck)
-+ return p_FmMacControllerDriver->f_FM_MAC_ConfigLengthCheck(h_FmMac,newVal);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_ConfigException (t_Handle h_FmMac, e_FmMacExceptions ex, bool enable)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_ConfigException)
-+ return p_FmMacControllerDriver->f_FM_MAC_ConfigException(h_FmMac, ex, enable);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+#ifdef FM_TX_ECC_FRMS_ERRATA_10GMAC_A004
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_ConfigSkipFman11Workaround (t_Handle h_FmMac)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_ConfigSkipFman11Workaround)
-+ return p_FmMacControllerDriver->f_FM_MAC_ConfigSkipFman11Workaround(h_FmMac);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+#endif /* FM_TX_ECC_FRMS_ERRATA_10GMAC_A004 */
-+
-+
-+/*****************************************************************************/
-+/* Run Time Control */
-+/*****************************************************************************/
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_Enable (t_Handle h_FmMac, e_CommMode mode)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_Enable)
-+ return p_FmMacControllerDriver->f_FM_MAC_Enable(h_FmMac, mode);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_Disable (t_Handle h_FmMac, e_CommMode mode)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_Disable)
-+ return p_FmMacControllerDriver->f_FM_MAC_Disable(h_FmMac, mode);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_Enable1588TimeStamp (t_Handle h_FmMac)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_Enable1588TimeStamp)
-+ return p_FmMacControllerDriver->f_FM_MAC_Enable1588TimeStamp(h_FmMac);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_Disable1588TimeStamp (t_Handle h_FmMac)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_Disable1588TimeStamp)
-+ return p_FmMacControllerDriver->f_FM_MAC_Disable1588TimeStamp(h_FmMac);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_SetTxAutoPauseFrames(t_Handle h_FmMac,
-+ uint16_t pauseTime)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_SetTxAutoPauseFrames)
-+ return p_FmMacControllerDriver->f_FM_MAC_SetTxAutoPauseFrames(h_FmMac,
-+ pauseTime);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_SetTxPauseFrames(t_Handle h_FmMac,
-+ uint8_t priority,
-+ uint16_t pauseTime,
-+ uint16_t threshTime)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_SetTxPauseFrames)
-+ return p_FmMacControllerDriver->f_FM_MAC_SetTxPauseFrames(h_FmMac,
-+ priority,
-+ pauseTime,
-+ threshTime);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_SetRxIgnorePauseFrames (t_Handle h_FmMac, bool en)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_SetRxIgnorePauseFrames)
-+ return p_FmMacControllerDriver->f_FM_MAC_SetRxIgnorePauseFrames(h_FmMac, en);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_ResetCounters (t_Handle h_FmMac)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_ResetCounters)
-+ return p_FmMacControllerDriver->f_FM_MAC_ResetCounters(h_FmMac);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_SetException(t_Handle h_FmMac, e_FmMacExceptions ex, bool enable)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_SetException)
-+ return p_FmMacControllerDriver->f_FM_MAC_SetException(h_FmMac, ex, enable);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_SetStatistics (t_Handle h_FmMac, e_FmMacStatisticsLevel statisticsLevel)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_SetStatistics)
-+ return p_FmMacControllerDriver->f_FM_MAC_SetStatistics(h_FmMac, statisticsLevel);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_GetStatistics (t_Handle h_FmMac, t_FmMacStatistics *p_Statistics)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_GetStatistics)
-+ return p_FmMacControllerDriver->f_FM_MAC_GetStatistics(h_FmMac, p_Statistics);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_ModifyMacAddr (t_Handle h_FmMac, t_EnetAddr *p_EnetAddr)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_ModifyMacAddr)
-+ return p_FmMacControllerDriver->f_FM_MAC_ModifyMacAddr(h_FmMac, p_EnetAddr);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_AddHashMacAddr (t_Handle h_FmMac, t_EnetAddr *p_EnetAddr)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_AddHashMacAddr)
-+ return p_FmMacControllerDriver->f_FM_MAC_AddHashMacAddr(h_FmMac, p_EnetAddr);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_RemoveHashMacAddr (t_Handle h_FmMac, t_EnetAddr *p_EnetAddr)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_RemoveHashMacAddr)
-+ return p_FmMacControllerDriver->f_FM_MAC_RemoveHashMacAddr(h_FmMac, p_EnetAddr);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_AddExactMatchMacAddr (t_Handle h_FmMac, t_EnetAddr *p_EnetAddr)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_AddExactMatchMacAddr)
-+ return p_FmMacControllerDriver->f_FM_MAC_AddExactMatchMacAddr(h_FmMac, p_EnetAddr);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_RemovelExactMatchMacAddr (t_Handle h_FmMac, t_EnetAddr *p_EnetAddr)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_RemovelExactMatchMacAddr)
-+ return p_FmMacControllerDriver->f_FM_MAC_RemovelExactMatchMacAddr(h_FmMac, p_EnetAddr);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_GetVesrion (t_Handle h_FmMac, uint32_t *macVresion)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_GetVersion)
-+ return p_FmMacControllerDriver->f_FM_MAC_GetVersion(h_FmMac, macVresion);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_GetId (t_Handle h_FmMac, uint32_t *macId)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_GetId)
-+ return p_FmMacControllerDriver->f_FM_MAC_GetId(h_FmMac, macId);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_SetPromiscuous (t_Handle h_FmMac, bool newVal)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_SetPromiscuous)
-+ return p_FmMacControllerDriver->f_FM_MAC_SetPromiscuous(h_FmMac, newVal);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_AdjustLink(t_Handle h_FmMac, e_EnetSpeed speed, bool fullDuplex)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_AdjustLink)
-+ return p_FmMacControllerDriver->f_FM_MAC_AdjustLink(h_FmMac, speed, fullDuplex);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_RestartAutoneg(t_Handle h_FmMac)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_RestartAutoneg)
-+ return p_FmMacControllerDriver->f_FM_MAC_RestartAutoneg(h_FmMac);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_MII_WritePhyReg (t_Handle h_FmMac, uint8_t phyAddr, uint8_t reg, uint16_t data)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_MII_WritePhyReg)
-+ return p_FmMacControllerDriver->f_FM_MAC_MII_WritePhyReg(h_FmMac, phyAddr, reg, data);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+t_Error FM_MAC_MII_ReadPhyReg(t_Handle h_FmMac, uint8_t phyAddr, uint8_t reg, uint16_t *p_Data)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_MII_ReadPhyReg)
-+ return p_FmMacControllerDriver->f_FM_MAC_MII_ReadPhyReg(h_FmMac, phyAddr, reg, p_Data);
-+
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+uint16_t FM_MAC_GetMaxFrameLength(t_Handle h_FmMac)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_VALUE(p_FmMacControllerDriver, E_INVALID_HANDLE, 0);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_GetMaxFrameLength)
-+ return p_FmMacControllerDriver->f_FM_MAC_GetMaxFrameLength(h_FmMac);
-+
-+ REPORT_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+ return 0;
-+}
-+
-+#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))
-+/*****************************************************************************/
-+t_Error FM_MAC_DumpRegs(t_Handle h_FmMac)
-+{
-+ t_FmMacControllerDriver *p_FmMacControllerDriver = (t_FmMacControllerDriver *)h_FmMac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmMacControllerDriver, E_INVALID_HANDLE);
-+
-+ if (p_FmMacControllerDriver->f_FM_MAC_DumpRegs)
-+ return p_FmMacControllerDriver->f_FM_MAC_DumpRegs(h_FmMac);
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+}
-+#endif /* (defined(DEBUG_ERRORS) && ... */
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fm_mac.h b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fm_mac.h
-new file mode 100644
-index 0000000..94f7b09
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fm_mac.h
-@@ -0,0 +1,222 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+/******************************************************************************
-+ @File fm_mac.h
-+
-+ @Description FM MAC ...
-+*//***************************************************************************/
-+#ifndef __FM_MAC_H
-+#define __FM_MAC_H
-+
-+#include "std_ext.h"
-+#include "error_ext.h"
-+#include "list_ext.h"
-+#include "fm_mac_ext.h"
-+#include "fm_common.h"
-+
-+
-+#define __ERR_MODULE__ MODULE_FM_MAC
-+
-+/**************************************************************************//**
-+ @Description defaults
-+*//***************************************************************************/
-+
-+
-+#define DEFAULT_halfDuplex FALSE
-+#define DEFAULT_padAndCrcEnable TRUE
-+#define DEFAULT_resetOnInit FALSE
-+
-+
-+typedef struct {
-+ uint64_t addr; /* Ethernet Address */
-+ t_List node;
-+} t_EthHashEntry;
-+#define ETH_HASH_ENTRY_OBJ(ptr) LIST_OBJECT(ptr, t_EthHashEntry, node)
-+
-+typedef struct {
-+ uint16_t size;
-+ t_List *p_Lsts;
-+} t_EthHash;
-+
-+typedef struct {
-+ t_Error (*f_FM_MAC_Init) (t_Handle h_FmMac);
-+ t_Error (*f_FM_MAC_Free) (t_Handle h_FmMac);
-+
-+ t_Error (*f_FM_MAC_SetStatistics) (t_Handle h_FmMac, e_FmMacStatisticsLevel statisticsLevel);
-+ t_Error (*f_FM_MAC_ConfigLoopback) (t_Handle h_FmMac, bool newVal);
-+ t_Error (*f_FM_MAC_ConfigMaxFrameLength) (t_Handle h_FmMac, uint16_t newVal);
-+ t_Error (*f_FM_MAC_ConfigWan) (t_Handle h_FmMac, bool flag);
-+ t_Error (*f_FM_MAC_ConfigPadAndCrc) (t_Handle h_FmMac, bool newVal);
-+ t_Error (*f_FM_MAC_ConfigHalfDuplex) (t_Handle h_FmMac, bool newVal);
-+ t_Error (*f_FM_MAC_ConfigLengthCheck) (t_Handle h_FmMac, bool newVal);
-+ t_Error (*f_FM_MAC_ConfigTbiPhyAddr) (t_Handle h_FmMac, uint8_t newVal);
-+ t_Error (*f_FM_MAC_ConfigException) (t_Handle h_FmMac, e_FmMacExceptions, bool enable);
-+ t_Error (*f_FM_MAC_ConfigResetOnInit) (t_Handle h_FmMac, bool enable);
-+#ifdef FM_TX_ECC_FRMS_ERRATA_10GMAC_A004
-+ t_Error (*f_FM_MAC_ConfigSkipFman11Workaround) (t_Handle h_FmMac);
-+#endif /* FM_TX_ECC_FRMS_ERRATA_10GMAC_A004 */
-+
-+ t_Error (*f_FM_MAC_SetException) (t_Handle h_FmMac, e_FmMacExceptions ex, bool enable);
-+
-+ t_Error (*f_FM_MAC_Enable) (t_Handle h_FmMac, e_CommMode mode);
-+ t_Error (*f_FM_MAC_Disable) (t_Handle h_FmMac, e_CommMode mode);
-+ t_Error (*f_FM_MAC_Enable1588TimeStamp) (t_Handle h_FmMac);
-+ t_Error (*f_FM_MAC_Disable1588TimeStamp) (t_Handle h_FmMac);
-+ t_Error (*f_FM_MAC_Reset) (t_Handle h_FmMac, bool wait);
-+
-+ t_Error (*f_FM_MAC_SetTxAutoPauseFrames) (t_Handle h_FmMac,
-+ uint16_t pauseTime);
-+ t_Error (*f_FM_MAC_SetTxPauseFrames) (t_Handle h_FmMac,
-+ uint8_t priority,
-+ uint16_t pauseTime,
-+ uint16_t threshTime);
-+ t_Error (*f_FM_MAC_SetRxIgnorePauseFrames) (t_Handle h_FmMac, bool en);
-+
-+ t_Error (*f_FM_MAC_ResetCounters) (t_Handle h_FmMac);
-+ t_Error (*f_FM_MAC_GetStatistics) (t_Handle h_FmMac, t_FmMacStatistics *p_Statistics);
-+
-+ t_Error (*f_FM_MAC_ModifyMacAddr) (t_Handle h_FmMac, t_EnetAddr *p_EnetAddr);
-+ t_Error (*f_FM_MAC_AddHashMacAddr) (t_Handle h_FmMac, t_EnetAddr *p_EnetAddr);
-+ t_Error (*f_FM_MAC_RemoveHashMacAddr) (t_Handle h_FmMac, t_EnetAddr *p_EnetAddr);
-+ t_Error (*f_FM_MAC_AddExactMatchMacAddr) (t_Handle h_FmMac, t_EnetAddr *p_EnetAddr);
-+ t_Error (*f_FM_MAC_RemovelExactMatchMacAddr) (t_Handle h_FmMac, t_EnetAddr *p_EnetAddr);
-+
-+ t_Error (*f_FM_MAC_SetPromiscuous) (t_Handle h_FmMac, bool newVal);
-+ t_Error (*f_FM_MAC_AdjustLink) (t_Handle h_FmMac, e_EnetSpeed speed, bool fullDuplex);
-+ t_Error (*f_FM_MAC_RestartAutoneg) (t_Handle h_FmMac);
-+
-+ t_Error (*f_FM_MAC_GetId) (t_Handle h_FmMac, uint32_t *macId);
-+
-+ t_Error (*f_FM_MAC_GetVersion) (t_Handle h_FmMac, uint32_t *macVersion);
-+
-+ uint16_t (*f_FM_MAC_GetMaxFrameLength) (t_Handle h_FmMac);
-+
-+ t_Error (*f_FM_MAC_MII_WritePhyReg)(t_Handle h_FmMac, uint8_t phyAddr, uint8_t reg, uint16_t data);
-+ t_Error (*f_FM_MAC_MII_ReadPhyReg)(t_Handle h_FmMac, uint8_t phyAddr, uint8_t reg, uint16_t *p_Data);
-+
-+#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))
-+ t_Error (*f_FM_MAC_DumpRegs) (t_Handle h_FmMac);
-+#endif /* (defined(DEBUG_ERRORS) && ... */
-+
-+ t_Handle h_Fm;
-+ t_FmRevisionInfo fmRevInfo;
-+ e_EnetMode enetMode;
-+ uint8_t macId;
-+ bool resetOnInit;
-+ uint16_t clkFreq;
-+} t_FmMacControllerDriver;
-+
-+
-+#if (DPAA_VERSION == 10)
-+t_Handle DTSEC_Config(t_FmMacParams *p_FmMacParam);
-+t_Handle TGEC_Config(t_FmMacParams *p_FmMacParams);
-+#else
-+t_Handle MEMAC_Config(t_FmMacParams *p_FmMacParam);
-+#endif /* (DPAA_VERSION == 10) */
-+uint16_t FM_MAC_GetMaxFrameLength(t_Handle FmMac);
-+
-+
-+/* ........................................................................... */
-+
-+static __inline__ t_EthHashEntry *DequeueAddrFromHashEntry(t_List *p_AddrLst)
-+{
-+ t_EthHashEntry *p_HashEntry = NULL;
-+ if (!LIST_IsEmpty(p_AddrLst))
-+ {
-+ p_HashEntry = ETH_HASH_ENTRY_OBJ(p_AddrLst->p_Next);
-+ LIST_DelAndInit(&p_HashEntry->node);
-+ }
-+ return p_HashEntry;
-+}
-+
-+/* ........................................................................... */
-+
-+static __inline__ void FreeHashTable(t_EthHash *p_Hash)
-+{
-+ t_EthHashEntry *p_HashEntry;
-+ int i = 0;
-+
-+ if (p_Hash)
-+ {
-+ if (p_Hash->p_Lsts)
-+ {
-+ for (i=0; isize; i++)
-+ {
-+ p_HashEntry = DequeueAddrFromHashEntry(&p_Hash->p_Lsts[i]);
-+ while (p_HashEntry)
-+ {
-+ XX_Free(p_HashEntry);
-+ p_HashEntry = DequeueAddrFromHashEntry(&p_Hash->p_Lsts[i]);
-+ }
-+ }
-+
-+ XX_Free(p_Hash->p_Lsts);
-+ }
-+
-+ XX_Free(p_Hash);
-+ }
-+}
-+
-+/* ........................................................................... */
-+
-+static __inline__ t_EthHash * AllocHashTable(uint16_t size)
-+{
-+ uint32_t i;
-+ t_EthHash *p_Hash;
-+
-+ /* Allocate address hash table */
-+ p_Hash = (t_EthHash *)XX_Malloc(size*sizeof(t_EthHash *));
-+ if (!p_Hash)
-+ {
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("Address hash table"));
-+ return NULL;
-+ }
-+ p_Hash->size = size;
-+
-+ p_Hash->p_Lsts = (t_List *)XX_Malloc(p_Hash->size*sizeof(t_List));
-+ if (!p_Hash->p_Lsts)
-+ {
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("Address hash table"));
-+ XX_Free(p_Hash);
-+ return NULL;
-+ }
-+
-+ for (i=0 ; isize; i++)
-+ INIT_LIST(&p_Hash->p_Lsts[i]);
-+
-+ return p_Hash;
-+}
-+
-+
-+#endif /* __FM_MAC_H */
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fman_crc32.c b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fman_crc32.c
-new file mode 100644
-index 0000000..b6a4ca2
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fman_crc32.c
-@@ -0,0 +1,119 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+#include "fman_crc32.h"
-+#include "common/general.h"
-+
-+
-+/* precomputed CRC values for address hashing */
-+static const uint32_t crc_tbl[256] = {
-+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
-+ 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
-+ 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
-+ 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
-+ 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
-+ 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
-+ 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,
-+ 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
-+ 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,
-+ 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
-+ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,
-+ 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
-+ 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,
-+ 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
-+ 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
-+ 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
-+ 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,
-+ 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
-+ 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa,
-+ 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
-+ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,
-+ 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
-+ 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,
-+ 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
-+ 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
-+ 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
-+ 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,
-+ 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
-+ 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,
-+ 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
-+ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,
-+ 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
-+ 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,
-+ 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
-+ 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
-+ 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
-+ 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,
-+ 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
-+ 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,
-+ 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
-+ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,
-+ 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
-+ 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
-+};
-+
-+/* Get the mirrored value of a byte size number. (0x11010011 --> 0x11001011) */
-+static inline uint8_t get_mirror8(uint8_t n)
-+{
-+ uint8_t mirror[16] = {
-+ 0x00, 0x08, 0x04, 0x0c, 0x02, 0x0a, 0x06, 0x0e,
-+ 0x01, 0x09, 0x05, 0x0d, 0x03, 0x0b, 0x07, 0x0f
-+ };
-+ return (uint8_t)(((mirror[n & 0x0f] << 4) | (mirror[n >> 4])));
-+}
-+
-+static inline uint32_t get_mirror32(uint32_t n)
-+{
-+ return ((uint32_t)get_mirror8((uint8_t)(n))<<24) |
-+ ((uint32_t)get_mirror8((uint8_t)(n>>8))<<16) |
-+ ((uint32_t)get_mirror8((uint8_t)(n>>16))<<8) |
-+ ((uint32_t)get_mirror8((uint8_t)(n>>24)));
-+}
-+
-+uint32_t get_mac_addr_crc(uint64_t _addr)
-+{
-+ uint32_t i;
-+ uint8_t data;
-+ uint32_t crc;
-+
-+ /* CRC calculation */
-+ crc = 0xffffffff;
-+ for (i = 0; i < 6; i++) {
-+ data = (uint8_t)(_addr >> ((5-i)*8));
-+ crc = crc ^ data;
-+ crc = crc_tbl[crc&0xff] ^ (crc>>8);
-+ }
-+
-+ crc = get_mirror32(crc);
-+ return crc;
-+}
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fman_crc32.h b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fman_crc32.h
-new file mode 100644
-index 0000000..6e32fdc
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fman_crc32.h
-@@ -0,0 +1,43 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+#ifndef __FMAN_CRC32_H
-+#define __FMAN_CRC32_H
-+
-+#include "common/general.h"
-+
-+
-+uint32_t get_mac_addr_crc(uint64_t _addr);
-+
-+
-+#endif /* __FMAN_CRC32_H */
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fman_dtsec.c b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fman_dtsec.c
-new file mode 100644
-index 0000000..2ba8554
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fman_dtsec.c
-@@ -0,0 +1,818 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+#include "fsl_fman_dtsec.h"
-+
-+
-+void dtsec_stop_rx(struct dtsec_regs *regs)
-+{
-+ /* Assert the graceful stop bit */
-+ iowrite32be(ioread32be(®s->rctrl) | RCTRL_GRS, ®s->rctrl);
-+}
-+
-+void dtsec_stop_tx(struct dtsec_regs *regs)
-+{
-+ /* Assert the graceful stop bit */
-+ iowrite32be(ioread32be(®s->tctrl) | DTSEC_TCTRL_GTS, ®s->tctrl);
-+}
-+
-+void dtsec_start_tx(struct dtsec_regs *regs)
-+{
-+ /* clear the graceful stop bit */
-+ iowrite32be(ioread32be(®s->tctrl) & ~DTSEC_TCTRL_GTS, ®s->tctrl);
-+}
-+
-+void dtsec_start_rx(struct dtsec_regs *regs)
-+{
-+ /* clear the graceful stop bit */
-+ iowrite32be(ioread32be(®s->rctrl) & ~RCTRL_GRS, ®s->rctrl);
-+}
-+
-+void dtsec_defconfig(struct dtsec_cfg *cfg)
-+{
-+ cfg->halfdup_on = DEFAULT_HALFDUP_ON;
-+ cfg->halfdup_retransmit = DEFAULT_HALFDUP_RETRANSMIT;
-+ cfg->halfdup_coll_window = DEFAULT_HALFDUP_COLL_WINDOW;
-+ cfg->halfdup_excess_defer = DEFAULT_HALFDUP_EXCESS_DEFER;
-+ cfg->halfdup_no_backoff = DEFAULT_HALFDUP_NO_BACKOFF;
-+ cfg->halfdup_bp_no_backoff = DEFAULT_HALFDUP_BP_NO_BACKOFF;
-+ cfg->halfdup_alt_backoff_val = DEFAULT_HALFDUP_ALT_BACKOFF_VAL;
-+ cfg->halfdup_alt_backoff_en = DEFAULT_HALFDUP_ALT_BACKOFF_EN;
-+ cfg->rx_drop_bcast = DEFAULT_RX_DROP_BCAST;
-+ cfg->rx_short_frm = DEFAULT_RX_SHORT_FRM;
-+ cfg->rx_len_check = DEFAULT_RX_LEN_CHECK;
-+ cfg->tx_pad_crc = DEFAULT_TX_PAD_CRC;
-+ cfg->tx_crc = DEFAULT_TX_CRC;
-+ cfg->rx_ctrl_acc = DEFAULT_RX_CTRL_ACC;
-+ cfg->tx_pause_time = DEFAULT_TX_PAUSE_TIME;
-+ cfg->tbipa = DEFAULT_TBIPA; /* PHY address 0 is reserved (DPAA RM)*/
-+ cfg->rx_prepend = DEFAULT_RX_PREPEND;
-+ cfg->ptp_tsu_en = DEFAULT_PTP_TSU_EN;
-+ cfg->ptp_exception_en = DEFAULT_PTP_EXCEPTION_EN;
-+ cfg->preamble_len = DEFAULT_PREAMBLE_LEN;
-+ cfg->rx_preamble = DEFAULT_RX_PREAMBLE;
-+ cfg->tx_preamble = DEFAULT_TX_PREAMBLE;
-+ cfg->loopback = DEFAULT_LOOPBACK;
-+ cfg->rx_time_stamp_en = DEFAULT_RX_TIME_STAMP_EN;
-+ cfg->tx_time_stamp_en = DEFAULT_TX_TIME_STAMP_EN;
-+ cfg->rx_flow = DEFAULT_RX_FLOW;
-+ cfg->tx_flow = DEFAULT_TX_FLOW;
-+ cfg->rx_group_hash_exd = DEFAULT_RX_GROUP_HASH_EXD;
-+ cfg->tx_pause_time_extd = DEFAULT_TX_PAUSE_TIME_EXTD;
-+ cfg->rx_promisc = DEFAULT_RX_PROMISC;
-+ cfg->non_back_to_back_ipg1 = DEFAULT_NON_BACK_TO_BACK_IPG1;
-+ cfg->non_back_to_back_ipg2 = DEFAULT_NON_BACK_TO_BACK_IPG2;
-+ cfg->min_ifg_enforcement = DEFAULT_MIN_IFG_ENFORCEMENT;
-+ cfg->back_to_back_ipg = DEFAULT_BACK_TO_BACK_IPG;
-+ cfg->maximum_frame = DEFAULT_MAXIMUM_FRAME;
-+ cfg->tbi_phy_addr = DEFAULT_TBI_PHY_ADDR;
-+}
-+
-+int dtsec_init(struct dtsec_regs *regs, struct dtsec_cfg *cfg,
-+ enum enet_interface iface_mode,
-+ enum enet_speed iface_speed,
-+ uint8_t *macaddr,
-+ uint8_t fm_rev_maj,
-+ uint8_t fm_rev_min,
-+ uint32_t exception_mask)
-+{
-+ bool is_rgmii = FALSE;
-+ bool is_sgmii = FALSE;
-+ bool is_qsgmii = FALSE;
-+ int i;
-+ uint32_t tmp;
-+
-+UNUSED(fm_rev_maj);UNUSED(fm_rev_min);
-+
-+ /* let's start with a soft reset */
-+ iowrite32be(MACCFG1_SOFT_RESET, ®s->maccfg1);
-+ iowrite32be(0, ®s->maccfg1);
-+
-+ /*************dtsec_id2******************/
-+ tmp = ioread32be(®s->tsec_id2);
-+
-+ /* check RGMII support */
-+ if (iface_mode == E_ENET_IF_RGMII ||
-+ iface_mode == E_ENET_IF_RMII)
-+ if (tmp & DTSEC_ID2_INT_REDUCED_OFF)
-+ return -EINVAL;
-+
-+ if (iface_mode == E_ENET_IF_SGMII ||
-+ iface_mode == E_ENET_IF_MII)
-+ if (tmp & DTSEC_ID2_INT_REDUCED_OFF)
-+ return -EINVAL;
-+
-+ /***************ECNTRL************************/
-+
-+ is_rgmii = (bool)((iface_mode == E_ENET_IF_RGMII) ? TRUE : FALSE);
-+ is_sgmii = (bool)((iface_mode == E_ENET_IF_SGMII) ? TRUE : FALSE);
-+ is_qsgmii = (bool)((iface_mode == E_ENET_IF_QSGMII) ? TRUE : FALSE);
-+
-+ tmp = 0;
-+ if (is_rgmii || iface_mode == E_ENET_IF_GMII)
-+ tmp |= DTSEC_ECNTRL_GMIIM;
-+ if (is_sgmii)
-+ tmp |= (DTSEC_ECNTRL_SGMIIM | DTSEC_ECNTRL_TBIM);
-+ if (is_qsgmii)
-+ tmp |= (DTSEC_ECNTRL_SGMIIM | DTSEC_ECNTRL_TBIM |
-+ DTSEC_ECNTRL_QSGMIIM);
-+ if (is_rgmii)
-+ tmp |= DTSEC_ECNTRL_RPM;
-+ if (iface_speed == E_ENET_SPEED_100)
-+ tmp |= DTSEC_ECNTRL_R100M;
-+
-+ iowrite32be(tmp, ®s->ecntrl);
-+ /***************ECNTRL************************/
-+
-+ /***************TCTRL************************/
-+ tmp = 0;
-+ if (cfg->halfdup_on)
-+ tmp |= DTSEC_TCTRL_THDF;
-+ if (cfg->tx_time_stamp_en)
-+ tmp |= DTSEC_TCTRL_TTSE;
-+
-+ iowrite32be(tmp, ®s->tctrl);
-+
-+ /***************TCTRL************************/
-+
-+ /***************PTV************************/
-+ tmp = 0;
-+
-+#ifdef FM_SHORT_PAUSE_TIME_ERRATA_DTSEC1
-+ if ((fm_rev_maj == 1) && (fm_rev_min == 0))
-+ cfg->tx_pause_time += 2;
-+#endif /* FM_SHORT_PAUSE_TIME_ERRATA_DTSEC1 */
-+
-+ if (cfg->tx_pause_time)
-+ tmp |= cfg->tx_pause_time;
-+ if (cfg->tx_pause_time_extd)
-+ tmp |= cfg->tx_pause_time_extd << PTV_PTE_OFST;
-+ iowrite32be(tmp, ®s->ptv);
-+
-+ /***************RCTRL************************/
-+ tmp = 0;
-+ tmp |= ((uint32_t)(cfg->rx_prepend & 0x0000001f)) << 16;
-+ if (cfg->rx_ctrl_acc)
-+ tmp |= RCTRL_CFA;
-+ if (cfg->rx_group_hash_exd)
-+ tmp |= RCTRL_GHTX;
-+ if (cfg->rx_time_stamp_en)
-+ tmp |= RCTRL_RTSE;
-+ if (cfg->rx_drop_bcast)
-+ tmp |= RCTRL_BC_REJ;
-+ if (cfg->rx_short_frm)
-+ tmp |= RCTRL_RSF;
-+ if (cfg->rx_promisc)
-+ tmp |= RCTRL_PROM;
-+
-+ iowrite32be(tmp, ®s->rctrl);
-+ /***************RCTRL************************/
-+
-+ /*
-+ * Assign a Phy Address to the TBI (TBIPA).
-+ * Done also in cases where TBI is not selected to avoid conflict with
-+ * the external PHY's Physical address
-+ */
-+ iowrite32be(cfg->tbipa, ®s->tbipa);
-+
-+ /***************TMR_CTL************************/
-+ iowrite32be(0, ®s->tmr_ctrl);
-+
-+ if (cfg->ptp_tsu_en) {
-+ tmp = 0;
-+ tmp |= TMR_PEVENT_TSRE;
-+ iowrite32be(tmp, ®s->tmr_pevent);
-+
-+ if (cfg->ptp_exception_en) {
-+ tmp = 0;
-+ tmp |= TMR_PEMASK_TSREEN;
-+ iowrite32be(tmp, ®s->tmr_pemask);
-+ }
-+ }
-+
-+ /***************MACCFG1***********************/
-+ tmp = 0;
-+ if (cfg->loopback)
-+ tmp |= MACCFG1_LOOPBACK;
-+ if (cfg->rx_flow)
-+ tmp |= MACCFG1_RX_FLOW;
-+ if (cfg->tx_flow)
-+ tmp |= MACCFG1_TX_FLOW;
-+ iowrite32be(tmp, ®s->maccfg1);
-+
-+ /***************MACCFG1***********************/
-+
-+ /***************MACCFG2***********************/
-+ tmp = 0;
-+
-+ if (iface_speed < E_ENET_SPEED_1000)
-+ tmp |= MACCFG2_NIBBLE_MODE;
-+ else if (iface_speed == E_ENET_SPEED_1000)
-+ tmp |= MACCFG2_BYTE_MODE;
-+
-+ tmp |= ((uint32_t) cfg->preamble_len & 0x0000000f)
-+ << PREAMBLE_LENGTH_SHIFT;
-+
-+ if (cfg->rx_preamble)
-+ tmp |= MACCFG2_PRE_AM_Rx_EN;
-+ if (cfg->tx_preamble)
-+ tmp |= MACCFG2_PRE_AM_Tx_EN;
-+ if (cfg->rx_len_check)
-+ tmp |= MACCFG2_LENGTH_CHECK;
-+ if (cfg->tx_pad_crc)
-+ tmp |= MACCFG2_PAD_CRC_EN;
-+ if (cfg->tx_crc)
-+ tmp |= MACCFG2_CRC_EN;
-+ if (!cfg->halfdup_on)
-+ tmp |= MACCFG2_FULL_DUPLEX;
-+ iowrite32be(tmp, ®s->maccfg2);
-+
-+ /***************MACCFG2***********************/
-+
-+ /***************IPGIFG************************/
-+ tmp = 0;
-+ tmp = (((cfg->non_back_to_back_ipg1 <<
-+ IPGIFG_NON_BACK_TO_BACK_IPG_1_SHIFT)
-+ & IPGIFG_NON_BACK_TO_BACK_IPG_1)
-+ | ((cfg->non_back_to_back_ipg2 <<
-+ IPGIFG_NON_BACK_TO_BACK_IPG_2_SHIFT)
-+ & IPGIFG_NON_BACK_TO_BACK_IPG_2)
-+ | ((cfg->min_ifg_enforcement <<
-+ IPGIFG_MIN_IFG_ENFORCEMENT_SHIFT)
-+ & IPGIFG_MIN_IFG_ENFORCEMENT)
-+ | (cfg->back_to_back_ipg & IPGIFG_BACK_TO_BACK_IPG));
-+ iowrite32be(tmp, ®s->ipgifg);
-+
-+ /***************IPGIFG************************/
-+
-+ /***************HAFDUP************************/
-+ tmp = 0;
-+
-+ if (cfg->halfdup_alt_backoff_en)
-+ tmp = (uint32_t)(HAFDUP_ALT_BEB |
-+ ((cfg->halfdup_alt_backoff_val & 0x0000000f)
-+ << HAFDUP_ALTERNATE_BEB_TRUNCATION_SHIFT));
-+ if (cfg->halfdup_bp_no_backoff)
-+ tmp |= HAFDUP_BP_NO_BACKOFF;
-+ if (cfg->halfdup_no_backoff)
-+ tmp |= HAFDUP_NO_BACKOFF;
-+ if (cfg->halfdup_excess_defer)
-+ tmp |= HAFDUP_EXCESS_DEFER;
-+ tmp |= ((cfg->halfdup_retransmit << HAFDUP_RETRANSMISSION_MAX_SHIFT)
-+ & HAFDUP_RETRANSMISSION_MAX);
-+ tmp |= (cfg->halfdup_coll_window & HAFDUP_COLLISION_WINDOW);
-+
-+ iowrite32be(tmp, ®s->hafdup);
-+ /***************HAFDUP************************/
-+
-+ /***************MAXFRM************************/
-+ /* Initialize MAXFRM */
-+ iowrite32be(cfg->maximum_frame, ®s->maxfrm);
-+
-+ /***************MAXFRM************************/
-+
-+ /***************CAM1************************/
-+ iowrite32be(0xffffffff, ®s->cam1);
-+ iowrite32be(0xffffffff, ®s->cam2);
-+
-+ /***************IMASK************************/
-+ iowrite32be(exception_mask, ®s->imask);
-+ /***************IMASK************************/
-+
-+ /***************IEVENT************************/
-+ iowrite32be(0xffffffff, ®s->ievent);
-+
-+ /***************MACSTNADDR1/2*****************/
-+
-+ tmp = (uint32_t)((macaddr[5] << 24) |
-+ (macaddr[4] << 16) |
-+ (macaddr[3] << 8) |
-+ macaddr[2]);
-+ iowrite32be(tmp, ®s->macstnaddr1);
-+
-+ tmp = (uint32_t)((macaddr[1] << 24) |
-+ (macaddr[0] << 16));
-+ iowrite32be(tmp, ®s->macstnaddr2);
-+
-+ /***************MACSTNADDR1/2*****************/
-+
-+ /*****************HASH************************/
-+ for (i = 0; i < NUM_OF_HASH_REGS ; i++) {
-+ /* Initialize IADDRx */
-+ iowrite32be(0, ®s->igaddr[i]);
-+ /* Initialize GADDRx */
-+ iowrite32be(0, ®s->gaddr[i]);
-+ }
-+
-+ dtsec_reset_stat(regs);
-+
-+ return 0;
-+}
-+
-+uint16_t dtsec_get_max_frame_len(struct dtsec_regs *regs)
-+{
-+ return (uint16_t)ioread32be(®s->maxfrm);
-+}
-+
-+void dtsec_set_max_frame_len(struct dtsec_regs *regs, uint16_t length)
-+{
-+ iowrite32be(length, ®s->maxfrm);
-+}
-+
-+void dtsec_set_mac_address(struct dtsec_regs *regs, uint8_t *adr)
-+{
-+ uint32_t tmp;
-+
-+ tmp = (uint32_t)((adr[5] << 24) |
-+ (adr[4] << 16) |
-+ (adr[3] << 8) |
-+ adr[2]);
-+ iowrite32be(tmp, ®s->macstnaddr1);
-+
-+ tmp = (uint32_t)((adr[1] << 24) |
-+ (adr[0] << 16));
-+ iowrite32be(tmp, ®s->macstnaddr2);
-+}
-+
-+void dtsec_get_mac_address(struct dtsec_regs *regs, uint8_t *macaddr)
-+{
-+ uint32_t tmp1, tmp2;
-+
-+ tmp1 = ioread32be(®s->macstnaddr1);
-+ tmp2 = ioread32be(®s->macstnaddr2);
-+
-+ macaddr[0] = (uint8_t)((tmp2 & 0x00ff0000) >> 16);
-+ macaddr[1] = (uint8_t)((tmp2 & 0xff000000) >> 24);
-+ macaddr[2] = (uint8_t)(tmp1 & 0x000000ff);
-+ macaddr[3] = (uint8_t)((tmp1 & 0x0000ff00) >> 8);
-+ macaddr[4] = (uint8_t)((tmp1 & 0x00ff0000) >> 16);
-+ macaddr[5] = (uint8_t)((tmp1 & 0xff000000) >> 24);
-+}
-+
-+void dtsec_set_bucket(struct dtsec_regs *regs, int bucket, bool enable)
-+{
-+ int reg_idx = (bucket >> 5) & 0xf;
-+ int bit_idx = bucket & 0x1f;
-+ uint32_t bit_mask = 0x80000000 >> bit_idx;
-+ uint32_t *reg;
-+
-+ if (reg_idx > 7)
-+ reg = ®s->gaddr[reg_idx-8];
-+ else
-+ reg = ®s->igaddr[reg_idx];
-+
-+ if (enable)
-+ iowrite32be(ioread32be(reg) | bit_mask, reg);
-+ else
-+ iowrite32be(ioread32be(reg) & (~bit_mask), reg);
-+}
-+
-+void dtsec_reset_filter_table(struct dtsec_regs *regs, bool mcast, bool ucast)
-+{
-+ int i;
-+ bool ghtx;
-+
-+ ghtx = (bool)((ioread32be(®s->rctrl) & RCTRL_GHTX) ? TRUE : FALSE);
-+
-+ if (ucast || (ghtx && mcast)) {
-+ for (i = 0; i < NUM_OF_HASH_REGS; i++)
-+ iowrite32be(0, ®s->igaddr[i]);
-+ }
-+ if (mcast) {
-+ for (i = 0; i < NUM_OF_HASH_REGS; i++)
-+ iowrite32be(0, ®s->gaddr[i]);
-+ }
-+}
-+
-+int dtsec_set_tbi_phy_addr(struct dtsec_regs *regs,
-+ uint8_t addr)
-+{
-+ if (addr > 0 && addr < 32)
-+ iowrite32be(addr, ®s->tbipa);
-+ else
-+ return -EINVAL;
-+
-+ return 0;
-+}
-+
-+int dtsec_adjust_link(struct dtsec_regs *regs,
-+ enum enet_interface iface_mode,
-+ enum enet_speed speed, bool full_dx)
-+{
-+ uint32_t tmp;
-+
-+ if ((speed == E_ENET_SPEED_1000) && !full_dx)
-+ return -EINVAL;
-+
-+ tmp = ioread32be(®s->maccfg2);
-+ if (!full_dx)
-+ tmp &= ~MACCFG2_FULL_DUPLEX;
-+ else
-+ tmp |= MACCFG2_FULL_DUPLEX;
-+
-+ tmp &= ~(MACCFG2_NIBBLE_MODE | MACCFG2_BYTE_MODE);
-+ if (speed < E_ENET_SPEED_1000)
-+ tmp |= MACCFG2_NIBBLE_MODE;
-+ else if (speed == E_ENET_SPEED_1000)
-+ tmp |= MACCFG2_BYTE_MODE;
-+ iowrite32be(tmp, ®s->maccfg2);
-+
-+ tmp = ioread32be(®s->ecntrl);
-+ if (speed == E_ENET_SPEED_100)
-+ tmp |= DTSEC_ECNTRL_R100M;
-+ else
-+ tmp &= ~DTSEC_ECNTRL_R100M;
-+ iowrite32be(tmp, ®s->ecntrl);
-+
-+ return 0;
-+}
-+
-+void dtsec_set_uc_promisc(struct dtsec_regs *regs, bool enable)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->rctrl);
-+
-+ if (enable)
-+ tmp |= RCTRL_UPROM;
-+ else
-+ tmp &= ~RCTRL_UPROM;
-+
-+ iowrite32be(tmp, ®s->rctrl);
-+}
-+
-+void dtsec_set_mc_promisc(struct dtsec_regs *regs, bool enable)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->rctrl);
-+
-+ if (enable)
-+ tmp |= RCTRL_MPROM;
-+ else
-+ tmp &= ~RCTRL_MPROM;
-+
-+ iowrite32be(tmp, ®s->rctrl);
-+}
-+
-+bool dtsec_get_clear_carry_regs(struct dtsec_regs *regs,
-+ uint32_t *car1, uint32_t *car2)
-+{
-+ /* read carry registers */
-+ *car1 = ioread32be(®s->car1);
-+ *car2 = ioread32be(®s->car2);
-+ /* clear carry registers */
-+ if (*car1)
-+ iowrite32be(*car1, ®s->car1);
-+ if (*car2)
-+ iowrite32be(*car2, ®s->car2);
-+
-+ return (bool)((*car1 | *car2) ? TRUE : FALSE);
-+}
-+
-+
-+void dtsec_reset_stat(struct dtsec_regs *regs)
-+{
-+ /* clear HW counters */
-+ iowrite32be(ioread32be(®s->ecntrl) |
-+ DTSEC_ECNTRL_CLRCNT, ®s->ecntrl);
-+}
-+
-+int dtsec_set_stat_level(struct dtsec_regs *regs, enum mac_stat_level level)
-+{
-+ switch (level) {
-+ case E_MAC_STAT_NONE:
-+ iowrite32be(0xffffffff, ®s->cam1);
-+ iowrite32be(0xffffffff, ®s->cam2);
-+ iowrite32be(ioread32be(®s->ecntrl) & ~DTSEC_ECNTRL_STEN,
-+ ®s->ecntrl);
-+ iowrite32be(ioread32be(®s->imask) & ~DTSEC_IMASK_MSROEN,
-+ ®s->imask);
-+ break;
-+ case E_MAC_STAT_PARTIAL:
-+ iowrite32be(CAM1_ERRORS_ONLY, ®s->cam1);
-+ iowrite32be(CAM2_ERRORS_ONLY, ®s->cam2);
-+ iowrite32be(ioread32be(®s->ecntrl) | DTSEC_ECNTRL_STEN,
-+ ®s->ecntrl);
-+ iowrite32be(ioread32be(®s->imask) | DTSEC_IMASK_MSROEN,
-+ ®s->imask);
-+ break;
-+ case E_MAC_STAT_MIB_GRP1:
-+ iowrite32be((uint32_t)~CAM1_MIB_GRP_1, ®s->cam1);
-+ iowrite32be((uint32_t)~CAM2_MIB_GRP_1, ®s->cam2);
-+ iowrite32be(ioread32be(®s->ecntrl) | DTSEC_ECNTRL_STEN,
-+ ®s->ecntrl);
-+ iowrite32be(ioread32be(®s->imask) | DTSEC_IMASK_MSROEN,
-+ ®s->imask);
-+ break;
-+ case E_MAC_STAT_FULL:
-+ iowrite32be(0, ®s->cam1);
-+ iowrite32be(0, ®s->cam2);
-+ iowrite32be(ioread32be(®s->ecntrl) | DTSEC_ECNTRL_STEN,
-+ ®s->ecntrl);
-+ iowrite32be(ioread32be(®s->imask) | DTSEC_IMASK_MSROEN,
-+ ®s->imask);
-+ break;
-+ default:
-+ return -EINVAL;
-+ }
-+
-+ return 0;
-+}
-+
-+void dtsec_set_ts(struct dtsec_regs *regs, bool en)
-+{
-+ if (en) {
-+ iowrite32be(ioread32be(®s->rctrl) | RCTRL_RTSE,
-+ ®s->rctrl);
-+ iowrite32be(ioread32be(®s->tctrl) | DTSEC_TCTRL_TTSE,
-+ ®s->tctrl);
-+ } else {
-+ iowrite32be(ioread32be(®s->rctrl) & ~RCTRL_RTSE,
-+ ®s->rctrl);
-+ iowrite32be(ioread32be(®s->tctrl) & ~DTSEC_TCTRL_TTSE,
-+ ®s->tctrl);
-+ }
-+}
-+
-+void dtsec_enable(struct dtsec_regs *regs, bool apply_rx, bool apply_tx)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->maccfg1);
-+
-+ if (apply_rx)
-+ tmp |= MACCFG1_RX_EN ;
-+
-+ if (apply_tx)
-+ tmp |= MACCFG1_TX_EN ;
-+
-+ iowrite32be(tmp, ®s->maccfg1);
-+}
-+
-+void dtsec_clear_addr_in_paddr(struct dtsec_regs *regs, uint8_t paddr_num)
-+{
-+ iowrite32be(0, ®s->macaddr[paddr_num].exact_match1);
-+ iowrite32be(0, ®s->macaddr[paddr_num].exact_match2);
-+}
-+
-+void dtsec_add_addr_in_paddr(struct dtsec_regs *regs,
-+ uint64_t addr,
-+ uint8_t paddr_num)
-+{
-+ uint32_t tmp;
-+
-+ tmp = (uint32_t)(addr);
-+ /* swap */
-+ tmp = (((tmp & 0x000000FF) << 24) |
-+ ((tmp & 0x0000FF00) << 8) |
-+ ((tmp & 0x00FF0000) >> 8) |
-+ ((tmp & 0xFF000000) >> 24));
-+ iowrite32be(tmp, ®s->macaddr[paddr_num].exact_match1);
-+
-+ tmp = (uint32_t)(addr>>32);
-+ /* swap */
-+ tmp = (((tmp & 0x000000FF) << 24) |
-+ ((tmp & 0x0000FF00) << 8) |
-+ ((tmp & 0x00FF0000) >> 8) |
-+ ((tmp & 0xFF000000) >> 24));
-+ iowrite32be(tmp, ®s->macaddr[paddr_num].exact_match2);
-+}
-+
-+void dtsec_disable(struct dtsec_regs *regs, bool apply_rx, bool apply_tx)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->maccfg1);
-+
-+ if (apply_rx)
-+ tmp &= ~MACCFG1_RX_EN;
-+
-+ if (apply_tx)
-+ tmp &= ~MACCFG1_TX_EN;
-+
-+ iowrite32be(tmp, ®s->maccfg1);
-+}
-+
-+void dtsec_set_tx_pause_time(struct dtsec_regs *regs, uint16_t time)
-+{
-+ uint32_t ptv = 0;
-+
-+ /* fixme: don't enable tx pause for half-duplex */
-+
-+ if (time) {
-+ ptv = ioread32be(®s->ptv);
-+ ptv &= 0xffff0000;
-+ ptv |= time & 0x0000ffff;
-+ iowrite32be(ptv, ®s->ptv);
-+
-+ /* trigger the transmission of a flow-control pause frame */
-+ iowrite32be(ioread32be(®s->maccfg1) | MACCFG1_TX_FLOW,
-+ ®s->maccfg1);
-+ } else
-+ iowrite32be(ioread32be(®s->maccfg1) & ~MACCFG1_TX_FLOW,
-+ ®s->maccfg1);
-+}
-+
-+void dtsec_handle_rx_pause(struct dtsec_regs *regs, bool en)
-+{
-+ uint32_t tmp;
-+
-+ /* todo: check if mac is set to full-duplex */
-+
-+ tmp = ioread32be(®s->maccfg1);
-+ if (en)
-+ tmp |= MACCFG1_RX_FLOW;
-+ else
-+ tmp &= ~MACCFG1_RX_FLOW;
-+ iowrite32be(tmp, ®s->maccfg1);
-+}
-+
-+uint32_t dtsec_get_rctrl(struct dtsec_regs *regs)
-+{
-+ return ioread32be(®s->rctrl);
-+}
-+
-+uint32_t dtsec_get_revision(struct dtsec_regs *regs)
-+{
-+ return ioread32be(®s->tsec_id);
-+}
-+
-+uint32_t dtsec_get_event(struct dtsec_regs *regs, uint32_t ev_mask)
-+{
-+ return ioread32be(®s->ievent) & ev_mask;
-+}
-+
-+void dtsec_ack_event(struct dtsec_regs *regs, uint32_t ev_mask)
-+{
-+ iowrite32be(ev_mask, ®s->ievent);
-+}
-+
-+uint32_t dtsec_get_interrupt_mask(struct dtsec_regs *regs)
-+{
-+ return ioread32be(®s->imask);
-+}
-+
-+uint32_t dtsec_check_and_clear_tmr_event(struct dtsec_regs *regs)
-+{
-+ uint32_t event;
-+
-+ event = ioread32be(®s->tmr_pevent);
-+ event &= ioread32be(®s->tmr_pemask);
-+
-+ if (event)
-+ iowrite32be(event, ®s->tmr_pevent);
-+ return event;
-+}
-+
-+void dtsec_enable_tmr_interrupt(struct dtsec_regs *regs)
-+{
-+ iowrite32be(ioread32be(®s->tmr_pemask) | TMR_PEMASK_TSREEN,
-+ ®s->tmr_pemask);
-+}
-+
-+void dtsec_disable_tmr_interrupt(struct dtsec_regs *regs)
-+{
-+ iowrite32be(ioread32be(®s->tmr_pemask) & ~TMR_PEMASK_TSREEN,
-+ ®s->tmr_pemask);
-+}
-+
-+void dtsec_enable_interrupt(struct dtsec_regs *regs, uint32_t ev_mask)
-+{
-+ iowrite32be(ioread32be(®s->imask) | ev_mask, ®s->imask);
-+}
-+
-+void dtsec_disable_interrupt(struct dtsec_regs *regs, uint32_t ev_mask)
-+{
-+ iowrite32be(ioread32be(®s->imask) & ~ev_mask, ®s->imask);
-+}
-+
-+uint32_t dtsec_get_stat_counter(struct dtsec_regs *regs,
-+ enum dtsec_stat_counters reg_name)
-+{
-+ uint32_t ret_val;
-+
-+ switch (reg_name) {
-+ case E_DTSEC_STAT_TR64:
-+ ret_val = ioread32be(®s->tr64);
-+ break;
-+ case E_DTSEC_STAT_TR127:
-+ ret_val = ioread32be(®s->tr127);
-+ break;
-+ case E_DTSEC_STAT_TR255:
-+ ret_val = ioread32be(®s->tr255);
-+ break;
-+ case E_DTSEC_STAT_TR511:
-+ ret_val = ioread32be(®s->tr511);
-+ break;
-+ case E_DTSEC_STAT_TR1K:
-+ ret_val = ioread32be(®s->tr1k);
-+ break;
-+ case E_DTSEC_STAT_TRMAX:
-+ ret_val = ioread32be(®s->trmax);
-+ break;
-+ case E_DTSEC_STAT_TRMGV:
-+ ret_val = ioread32be(®s->trmgv);
-+ break;
-+ case E_DTSEC_STAT_RBYT:
-+ ret_val = ioread32be(®s->rbyt);
-+ break;
-+ case E_DTSEC_STAT_RPKT:
-+ ret_val = ioread32be(®s->rpkt);
-+ break;
-+ case E_DTSEC_STAT_RMCA:
-+ ret_val = ioread32be(®s->rmca);
-+ break;
-+ case E_DTSEC_STAT_RBCA:
-+ ret_val = ioread32be(®s->rbca);
-+ break;
-+ case E_DTSEC_STAT_RXPF:
-+ ret_val = ioread32be(®s->rxpf);
-+ break;
-+ case E_DTSEC_STAT_RALN:
-+ ret_val = ioread32be(®s->raln);
-+ break;
-+ case E_DTSEC_STAT_RFLR:
-+ ret_val = ioread32be(®s->rflr);
-+ break;
-+ case E_DTSEC_STAT_RCDE:
-+ ret_val = ioread32be(®s->rcde);
-+ break;
-+ case E_DTSEC_STAT_RCSE:
-+ ret_val = ioread32be(®s->rcse);
-+ break;
-+ case E_DTSEC_STAT_RUND:
-+ ret_val = ioread32be(®s->rund);
-+ break;
-+ case E_DTSEC_STAT_ROVR:
-+ ret_val = ioread32be(®s->rovr);
-+ break;
-+ case E_DTSEC_STAT_RFRG:
-+ ret_val = ioread32be(®s->rfrg);
-+ break;
-+ case E_DTSEC_STAT_RJBR:
-+ ret_val = ioread32be(®s->rjbr);
-+ break;
-+ case E_DTSEC_STAT_RDRP:
-+ ret_val = ioread32be(®s->rdrp);
-+ break;
-+ case E_DTSEC_STAT_TFCS:
-+ ret_val = ioread32be(®s->tfcs);
-+ break;
-+ case E_DTSEC_STAT_TBYT:
-+ ret_val = ioread32be(®s->tbyt);
-+ break;
-+ case E_DTSEC_STAT_TPKT:
-+ ret_val = ioread32be(®s->tpkt);
-+ break;
-+ case E_DTSEC_STAT_TMCA:
-+ ret_val = ioread32be(®s->tmca);
-+ break;
-+ case E_DTSEC_STAT_TBCA:
-+ ret_val = ioread32be(®s->tbca);
-+ break;
-+ case E_DTSEC_STAT_TXPF:
-+ ret_val = ioread32be(®s->txpf);
-+ break;
-+ case E_DTSEC_STAT_TNCL:
-+ ret_val = ioread32be(®s->tncl);
-+ break;
-+ case E_DTSEC_STAT_TDRP:
-+ ret_val = ioread32be(®s->tdrp);
-+ break;
-+ default:
-+ ret_val = 0;
-+ }
-+
-+ return ret_val;
-+}
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fman_dtsec_mii_acc.c b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fman_dtsec_mii_acc.c
-new file mode 100644
-index 0000000..82f4997
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fman_dtsec_mii_acc.c
-@@ -0,0 +1,148 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+#include "common/general.h"
-+#include "fsl_fman_dtsec_mii_acc.h"
-+
-+
-+/**
-+ * dtsec_mii_get_div() - calculates the value of the dtsec mii divider
-+ * @dtsec_freq: dtsec clock frequency (in Mhz)
-+ *
-+ * This function calculates the dtsec mii clock divider that determines
-+ * the MII MDC clock. MII MDC clock can work in the range of 2.5 to 12.5 Mhz.
-+ * The output of this function is the value of MIIMCFG[MgmtClk] which
-+ * implicitly determines the divider value.
-+ * Note: the dTSEC system clock is equal to 1/2 of the FMan clock.
-+ *
-+ * The table below which reflects dtsec_mii_get_div() functionality
-+ * shows the relations among dtsec_freq, MgmtClk, actual divider
-+ * and the MII frequency:
-+ *
-+ * dtsec freq MgmtClk div MII freq
-+ * [80..159] 0 (1/4)(1/8) [2.5 to 5.0]
-+ * [160..319] 1 (1/4)(1/8) [5.0 to 10.0]
-+ * [320..479] 2 (1/6)(1/8) [6.7 to 10.0]
-+ * [480..639] 3 (1/8)(1/8) [7.5 to 10.0]
-+ * [640..799] 4 (1/10)(1/8) [8.0 to 10.0]
-+ * [800..959] 5 (1/14)(1/8) [7.1 to 8.5]
-+ * [960..1119] 6 (1/20)(1/8) [6.0 to 7.0]
-+ * [1120..1279] 7 (1/28)(1/8) [5.0 to 5.7]
-+ * [1280..2800] 7 (1/28)(1/8) [5.7 to 12.5]
-+ *
-+ * Returns: the MIIMCFG[MgmtClk] appropriate value
-+ */
-+
-+static uint8_t dtsec_mii_get_div(uint16_t dtsec_freq)
-+{
-+ uint16_t mgmt_clk = (uint16_t)(dtsec_freq / 160);
-+
-+ if (mgmt_clk > 7)
-+ mgmt_clk = 7;
-+
-+ return (uint8_t)mgmt_clk;
-+}
-+
-+void dtsec_mii_reset(struct dtsec_mii_reg *regs)
-+{
-+ /* Reset the management interface */
-+ iowrite32be(ioread32be(®s->miimcfg) | MIIMCFG_RESET_MGMT,
-+ ®s->miimcfg);
-+ iowrite32be(ioread32be(®s->miimcfg) & ~MIIMCFG_RESET_MGMT,
-+ ®s->miimcfg);
-+}
-+
-+void dtsec_mii_init(struct dtsec_mii_reg *regs, uint16_t dtsec_freq)
-+{
-+ /* Setup the MII Mgmt clock speed */
-+ iowrite32be((uint32_t)dtsec_mii_get_div(dtsec_freq), ®s->miimcfg);
-+}
-+
-+int dtsec_mii_write_reg(struct dtsec_mii_reg *regs, uint8_t addr,
-+ uint8_t reg, uint16_t data)
-+{
-+ uint32_t tmp;
-+
-+ /* Stop the MII management read cycle */
-+ iowrite32be(0, ®s->miimcom);
-+ /* Dummy read to make sure MIIMCOM is written */
-+ tmp = ioread32be(®s->miimcom);
-+
-+ /* Setting up MII Management Address Register */
-+ tmp = (uint32_t)((addr << MIIMADD_PHY_ADDR_SHIFT) | reg);
-+ iowrite32be(tmp, ®s->miimadd);
-+
-+ /* Setting up MII Management Control Register with data */
-+ iowrite32be((uint32_t)data, ®s->miimcon);
-+ /* Dummy read to make sure MIIMCON is written */
-+ tmp = ioread32be(®s->miimcon);
-+
-+ /* Wait untill MII management write is complete */
-+ /* todo: a timeout could be useful here */
-+ while ((ioread32be(®s->miimind)) & MIIMIND_BUSY)
-+ /* busy wait */;
-+
-+ return 0;
-+}
-+
-+int dtsec_mii_read_reg(struct dtsec_mii_reg *regs, uint8_t addr,
-+ uint8_t reg, uint16_t *data)
-+{
-+ uint32_t tmp;
-+
-+ /* Setting up the MII Management Address Register */
-+ tmp = (uint32_t)((addr << MIIMADD_PHY_ADDR_SHIFT) | reg);
-+ iowrite32be(tmp, ®s->miimadd);
-+
-+ /* Perform an MII management read cycle */
-+ iowrite32be(MIIMCOM_READ_CYCLE, ®s->miimcom);
-+ /* Dummy read to make sure MIIMCOM is written */
-+ tmp = ioread32be(®s->miimcom);
-+
-+ /* Wait until MII management read is complete */
-+ /* todo: a timeout could be useful here */
-+ while ((ioread32be(®s->miimind)) & MIIMIND_BUSY)
-+ /* busy wait */;
-+
-+ /* Read MII management status */
-+ *data = (uint16_t)ioread32be(®s->miimstat);
-+
-+ iowrite32be(0, ®s->miimcom);
-+ /* Dummy read to make sure MIIMCOM is written */
-+ tmp = ioread32be(®s->miimcom);
-+
-+ if (*data == 0xffff)
-+ return -ENXIO;
-+
-+ return 0;
-+}
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fman_memac.c b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fman_memac.c
-new file mode 100644
-index 0000000..a63d06a
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fman_memac.c
-@@ -0,0 +1,427 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+#include "fsl_fman_memac.h"
-+
-+
-+uint32_t memac_get_event(struct memac_regs *regs, uint32_t ev_mask)
-+{
-+ return ioread32be(®s->ievent) & ev_mask;
-+}
-+
-+uint32_t memac_get_interrupt_mask(struct memac_regs *regs)
-+{
-+ return ioread32be(®s->imask);
-+}
-+
-+void memac_ack_event(struct memac_regs *regs, uint32_t ev_mask)
-+{
-+ iowrite32be(ev_mask, ®s->ievent);
-+}
-+
-+void memac_set_promiscuous(struct memac_regs *regs, bool val)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->command_config);
-+
-+ if (val)
-+ tmp |= CMD_CFG_PROMIS_EN;
-+ else
-+ tmp &= ~CMD_CFG_PROMIS_EN;
-+
-+ iowrite32be(tmp, ®s->command_config);
-+}
-+
-+void memac_hardware_clear_addr_in_paddr(struct memac_regs *regs,
-+ uint8_t paddr_num)
-+{
-+ if (paddr_num == 0) {
-+ iowrite32be(0, ®s->mac_addr0.mac_addr_l);
-+ iowrite32be(0, ®s->mac_addr0.mac_addr_u);
-+ } else {
-+ iowrite32be(0x0, ®s->mac_addr[paddr_num - 1].mac_addr_l);
-+ iowrite32be(0x0, ®s->mac_addr[paddr_num - 1].mac_addr_u);
-+ }
-+}
-+
-+void memac_hardware_add_addr_in_paddr(struct memac_regs *regs,
-+ uint8_t *adr,
-+ uint8_t paddr_num)
-+{
-+ uint32_t tmp0, tmp1;
-+
-+ tmp0 = (uint32_t)(adr[0] |
-+ adr[1] << 8 |
-+ adr[2] << 16 |
-+ adr[3] << 24);
-+ tmp1 = (uint32_t)(adr[4] | adr[5] << 8);
-+
-+ if (paddr_num == 0) {
-+ iowrite32be(tmp0, ®s->mac_addr0.mac_addr_l);
-+ iowrite32be(tmp1, ®s->mac_addr0.mac_addr_u);
-+ } else {
-+ iowrite32be(tmp0, ®s->mac_addr[paddr_num-1].mac_addr_l);
-+ iowrite32be(tmp1, ®s->mac_addr[paddr_num-1].mac_addr_u);
-+ }
-+}
-+
-+void memac_enable(struct memac_regs *regs, bool apply_rx, bool apply_tx)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->command_config);
-+
-+ if (apply_rx)
-+ tmp |= CMD_CFG_RX_EN;
-+
-+ if (apply_tx)
-+ tmp |= CMD_CFG_TX_EN;
-+
-+ iowrite32be(tmp, ®s->command_config);
-+}
-+
-+void memac_disable(struct memac_regs *regs, bool apply_rx, bool apply_tx)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->command_config);
-+
-+ if (apply_rx)
-+ tmp &= ~CMD_CFG_RX_EN;
-+
-+ if (apply_tx)
-+ tmp &= ~CMD_CFG_TX_EN;
-+
-+ iowrite32be(tmp, ®s->command_config);
-+}
-+
-+void memac_reset_counter(struct memac_regs *regs)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->statn_config);
-+
-+ tmp |= STATS_CFG_CLR;
-+
-+ iowrite32be(tmp, ®s->statn_config);
-+
-+ while (ioread32be(®s->statn_config) & STATS_CFG_CLR);
-+}
-+
-+void memac_reset(struct memac_regs *regs)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->command_config);
-+
-+ tmp |= CMD_CFG_SW_RESET;
-+
-+ iowrite32be(tmp, ®s->command_config);
-+
-+ while (ioread32be(®s->command_config) & CMD_CFG_SW_RESET);
-+}
-+
-+void memac_init(struct memac_regs *regs,
-+ struct memac_cfg *cfg,
-+ enum enet_interface enet_interface,
-+ enum enet_speed enet_speed,
-+ uint32_t exceptions)
-+{
-+ uint32_t tmp;
-+
-+ /* Config */
-+ tmp = 0;
-+ if (cfg->wan_mode_enable)
-+ tmp |= CMD_CFG_WAN_MODE;
-+ if (cfg->promiscuous_mode_enable)
-+ tmp |= CMD_CFG_PROMIS_EN;
-+ if (cfg->pause_forward_enable)
-+ tmp |= CMD_CFG_PAUSE_FWD;
-+ if (cfg->pause_ignore)
-+ tmp |= CMD_CFG_PAUSE_IGNORE;
-+ if (cfg->tx_addr_ins_enable)
-+ tmp |= CMD_CFG_TX_ADDR_INS;
-+ if (cfg->loopback_enable)
-+ tmp |= CMD_CFG_LOOPBACK_EN;
-+ if (cfg->cmd_frame_enable)
-+ tmp |= CMD_CFG_CNT_FRM_EN;
-+ if (cfg->send_idle_enable)
-+ tmp |= CMD_CFG_SEND_IDLE;
-+ if (cfg->no_length_check_enable)
-+ tmp |= CMD_CFG_NO_LEN_CHK;
-+ if (cfg->rx_sfd_any)
-+ tmp |= CMD_CFG_SFD_ANY;
-+ if (cfg->pad_enable)
-+ tmp |= CMD_CFG_TX_PAD_EN;
-+
-+ tmp |= CMD_CFG_CRC_FWD;
-+
-+ iowrite32be(tmp, ®s->command_config);
-+
-+ /* Max Frame Length */
-+ iowrite32be((uint32_t)cfg->max_frame_length, ®s->maxfrm);
-+
-+ /* Pause Time */
-+ iowrite32be(cfg->pause_quanta, ®s->pause_quanta[0]);
-+ iowrite32be(0, ®s->pause_thresh[0]);
-+
-+ /* interrupts */
-+ iowrite32be(MEMAC_EVENTS_MASK, ®s->ievent);
-+ iowrite32be(exceptions, ®s->imask);
-+
-+ /* IF_MODE */
-+ tmp = 0;
-+ switch (enet_interface) {
-+ case E_ENET_IF_XGMII:
-+ case E_ENET_IF_XFI:
-+ tmp |= IF_MODE_XGMII;
-+ break;
-+ default:
-+ tmp |= IF_MODE_GMII;
-+ if (enet_interface == E_ENET_IF_RGMII)
-+ tmp |= IF_MODE_RGMII | IF_MODE_RGMII_AUTO;
-+ }
-+ iowrite32be(tmp, ®s->if_mode);
-+}
-+
-+void memac_set_exception(struct memac_regs *regs, uint32_t val, bool enable)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->imask);
-+ if (enable)
-+ tmp |= val;
-+ else
-+ tmp &= ~val;
-+
-+ iowrite32be(tmp, ®s->imask);
-+}
-+
-+void memac_set_hash_table(struct memac_regs *regs, uint32_t val)
-+{
-+ iowrite32be(val, ®s->hashtable_ctrl);
-+}
-+
-+uint16_t memac_get_max_frame_length(struct memac_regs *regs)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->maxfrm);
-+
-+ return(uint16_t)tmp;
-+}
-+
-+
-+void memac_set_tx_pause_frames(struct memac_regs *regs,
-+ uint8_t priority,
-+ uint16_t pause_time,
-+ uint16_t thresh_time)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->command_config);
-+ if (priority == 0xff) {
-+ tmp &= ~CMD_CFG_PFC_MODE;
-+ priority = 0;
-+ }
-+ else
-+ tmp |= CMD_CFG_PFC_MODE;
-+
-+ iowrite32be(tmp, ®s->command_config);
-+
-+ tmp = ioread32be(®s->pause_quanta[priority / 2]);
-+ if (priority % 2)
-+ tmp &= 0x0000FFFF;
-+ else
-+ tmp &= 0xFFFF0000;
-+ tmp |= ((uint32_t)pause_time << (16 * (priority % 2)));
-+ iowrite32be(tmp, ®s->pause_quanta[priority / 2]);
-+
-+ tmp = ioread32be(®s->pause_thresh[priority / 2]);
-+ if (priority % 2)
-+ tmp &= 0x0000FFFF;
-+ else
-+ tmp &= 0xFFFF0000;
-+ tmp |= ((uint32_t)thresh_time<<(16 * (priority % 2)));
-+ iowrite32be(tmp, ®s->pause_thresh[priority / 2]);
-+}
-+
-+void memac_set_rx_ignore_pause_frames(struct memac_regs *regs,bool enable)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->command_config);
-+ if (enable)
-+ tmp |= CMD_CFG_PAUSE_IGNORE;
-+ else
-+ tmp &= ~CMD_CFG_PAUSE_IGNORE;
-+
-+ iowrite32be(tmp, ®s->command_config);
-+}
-+
-+void memac_set_loopback(struct memac_regs *regs, bool enable)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->command_config);
-+
-+ if (enable)
-+ tmp |= CMD_CFG_LOOPBACK_EN;
-+ else
-+ tmp &= ~CMD_CFG_LOOPBACK_EN;
-+
-+ iowrite32be(tmp, ®s->command_config);
-+}
-+
-+
-+#define GET_MEMAC_CNTR_64(bn) \
-+ (ioread32be(®s->bn ## _l) | \
-+ ((uint64_t)ioread32be(®s->bn ## _u) << 32))
-+
-+uint64_t memac_get_counter(struct memac_regs *regs,
-+ enum memac_counters reg_name)
-+{
-+ uint64_t ret_val;
-+
-+ switch (reg_name) {
-+ case E_MEMAC_COUNTER_R64:
-+ ret_val = GET_MEMAC_CNTR_64(r64);
-+ break;
-+ case E_MEMAC_COUNTER_R127:
-+ ret_val = GET_MEMAC_CNTR_64(r127);
-+ break;
-+ case E_MEMAC_COUNTER_R255:
-+ ret_val = GET_MEMAC_CNTR_64(r255);
-+ break;
-+ case E_MEMAC_COUNTER_R511:
-+ ret_val = GET_MEMAC_CNTR_64(r511);
-+ break;
-+ case E_MEMAC_COUNTER_R1023:
-+ ret_val = GET_MEMAC_CNTR_64(r1023);
-+ break;
-+ case E_MEMAC_COUNTER_R1518:
-+ ret_val = GET_MEMAC_CNTR_64(r1518);
-+ break;
-+ case E_MEMAC_COUNTER_R1519X:
-+ ret_val = GET_MEMAC_CNTR_64(r1519x);
-+ break;
-+ case E_MEMAC_COUNTER_RFRG:
-+ ret_val = GET_MEMAC_CNTR_64(rfrg);
-+ break;
-+ case E_MEMAC_COUNTER_RJBR:
-+ ret_val = GET_MEMAC_CNTR_64(rjbr);
-+ break;
-+ case E_MEMAC_COUNTER_RDRP:
-+ ret_val = GET_MEMAC_CNTR_64(rdrp);
-+ break;
-+ case E_MEMAC_COUNTER_RALN:
-+ ret_val = GET_MEMAC_CNTR_64(raln);
-+ break;
-+ case E_MEMAC_COUNTER_TUND:
-+ ret_val = GET_MEMAC_CNTR_64(tund);
-+ break;
-+ case E_MEMAC_COUNTER_ROVR:
-+ ret_val = GET_MEMAC_CNTR_64(rovr);
-+ break;
-+ case E_MEMAC_COUNTER_RXPF:
-+ ret_val = GET_MEMAC_CNTR_64(rxpf);
-+ break;
-+ case E_MEMAC_COUNTER_TXPF:
-+ ret_val = GET_MEMAC_CNTR_64(txpf);
-+ break;
-+ case E_MEMAC_COUNTER_ROCT:
-+ ret_val = GET_MEMAC_CNTR_64(roct);
-+ break;
-+ case E_MEMAC_COUNTER_RMCA:
-+ ret_val = GET_MEMAC_CNTR_64(rmca);
-+ break;
-+ case E_MEMAC_COUNTER_RBCA:
-+ ret_val = GET_MEMAC_CNTR_64(rbca);
-+ break;
-+ case E_MEMAC_COUNTER_RPKT:
-+ ret_val = GET_MEMAC_CNTR_64(rpkt);
-+ break;
-+ case E_MEMAC_COUNTER_RUCA:
-+ ret_val = GET_MEMAC_CNTR_64(ruca);
-+ break;
-+ case E_MEMAC_COUNTER_RERR:
-+ ret_val = GET_MEMAC_CNTR_64(rerr);
-+ break;
-+ case E_MEMAC_COUNTER_TOCT:
-+ ret_val = GET_MEMAC_CNTR_64(toct);
-+ break;
-+ case E_MEMAC_COUNTER_TMCA:
-+ ret_val = GET_MEMAC_CNTR_64(tmca);
-+ break;
-+ case E_MEMAC_COUNTER_TBCA:
-+ ret_val = GET_MEMAC_CNTR_64(tbca);
-+ break;
-+ case E_MEMAC_COUNTER_TUCA:
-+ ret_val = GET_MEMAC_CNTR_64(tuca);
-+ break;
-+ case E_MEMAC_COUNTER_TERR:
-+ ret_val = GET_MEMAC_CNTR_64(terr);
-+ break;
-+ default:
-+ ret_val = 0;
-+ }
-+
-+ return ret_val;
-+}
-+
-+void memac_defconfig(struct memac_cfg *cfg)
-+{
-+ cfg->reset_on_init = FALSE;
-+ cfg->wan_mode_enable = FALSE;
-+ cfg->promiscuous_mode_enable = FALSE;
-+ cfg->pause_forward_enable = FALSE;
-+ cfg->pause_ignore = FALSE;
-+ cfg->tx_addr_ins_enable = FALSE;
-+ cfg->loopback_enable = FALSE;
-+ cfg->cmd_frame_enable = FALSE;
-+ cfg->rx_error_discard = FALSE;
-+ cfg->send_idle_enable = FALSE;
-+ cfg->no_length_check_enable = TRUE;
-+ cfg->lgth_check_nostdr = FALSE;
-+ cfg->time_stamp_enable = FALSE;
-+ cfg->tx_ipg_length = DEFAULT_TX_IPG_LENGTH;
-+ cfg->max_frame_length = DEFAULT_FRAME_LENGTH;
-+ cfg->pause_quanta = DEFAULT_PAUSE_QUANTA;
-+ cfg->pad_enable = TRUE;
-+ cfg->phy_tx_ena_on = FALSE;
-+ cfg->rx_sfd_any = FALSE;
-+ cfg->rx_pbl_fwd = FALSE;
-+ cfg->tx_pbl_fwd = FALSE;
-+ cfg->debug_mode = FALSE;
-+}
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fman_tgec.c b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fman_tgec.c
-new file mode 100644
-index 0000000..fa80a36
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fman_tgec.c
-@@ -0,0 +1,355 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+#include "fsl_fman_tgec.h"
-+
-+
-+void tgec_set_mac_address(struct tgec_regs *regs, uint8_t *adr)
-+{
-+ uint32_t tmp0, tmp1;
-+
-+ tmp0 = (uint32_t)(adr[0] |
-+ adr[1] << 8 |
-+ adr[2] << 16 |
-+ adr[3] << 24);
-+ tmp1 = (uint32_t)(adr[4] | adr[5] << 8);
-+ iowrite32be(tmp0, ®s->mac_addr_0);
-+ iowrite32be(tmp1, ®s->mac_addr_1);
-+}
-+
-+void tgec_reset_stat(struct tgec_regs *regs)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->command_config);
-+
-+ tmp |= CMD_CFG_STAT_CLR;
-+
-+ iowrite32be(tmp, ®s->command_config);
-+
-+ while (ioread32be(®s->command_config) & CMD_CFG_STAT_CLR);
-+}
-+
-+#define GET_TGEC_CNTR_64(bn) \
-+ (((uint64_t)ioread32be(®s->bn ## _u) << 32) | \
-+ ioread32be(®s->bn ## _l))
-+
-+uint64_t tgec_get_counter(struct tgec_regs *regs, enum tgec_counters reg_name)
-+{
-+ uint64_t ret_val;
-+
-+ switch (reg_name) {
-+ case E_TGEC_COUNTER_R64:
-+ ret_val = GET_TGEC_CNTR_64(r64);
-+ break;
-+ case E_TGEC_COUNTER_R127:
-+ ret_val = GET_TGEC_CNTR_64(r127);
-+ break;
-+ case E_TGEC_COUNTER_R255:
-+ ret_val = GET_TGEC_CNTR_64(r255);
-+ break;
-+ case E_TGEC_COUNTER_R511:
-+ ret_val = GET_TGEC_CNTR_64(r511);
-+ break;
-+ case E_TGEC_COUNTER_R1023:
-+ ret_val = GET_TGEC_CNTR_64(r1023);
-+ break;
-+ case E_TGEC_COUNTER_R1518:
-+ ret_val = GET_TGEC_CNTR_64(r1518);
-+ break;
-+ case E_TGEC_COUNTER_R1519X:
-+ ret_val = GET_TGEC_CNTR_64(r1519x);
-+ break;
-+ case E_TGEC_COUNTER_TRFRG:
-+ ret_val = GET_TGEC_CNTR_64(trfrg);
-+ break;
-+ case E_TGEC_COUNTER_TRJBR:
-+ ret_val = GET_TGEC_CNTR_64(trjbr);
-+ break;
-+ case E_TGEC_COUNTER_RDRP:
-+ ret_val = GET_TGEC_CNTR_64(rdrp);
-+ break;
-+ case E_TGEC_COUNTER_RALN:
-+ ret_val = GET_TGEC_CNTR_64(raln);
-+ break;
-+ case E_TGEC_COUNTER_TRUND:
-+ ret_val = GET_TGEC_CNTR_64(trund);
-+ break;
-+ case E_TGEC_COUNTER_TROVR:
-+ ret_val = GET_TGEC_CNTR_64(trovr);
-+ break;
-+ case E_TGEC_COUNTER_RXPF:
-+ ret_val = GET_TGEC_CNTR_64(rxpf);
-+ break;
-+ case E_TGEC_COUNTER_TXPF:
-+ ret_val = GET_TGEC_CNTR_64(txpf);
-+ break;
-+ case E_TGEC_COUNTER_ROCT:
-+ ret_val = GET_TGEC_CNTR_64(roct);
-+ break;
-+ case E_TGEC_COUNTER_RMCA:
-+ ret_val = GET_TGEC_CNTR_64(rmca);
-+ break;
-+ case E_TGEC_COUNTER_RBCA:
-+ ret_val = GET_TGEC_CNTR_64(rbca);
-+ break;
-+ case E_TGEC_COUNTER_RPKT:
-+ ret_val = GET_TGEC_CNTR_64(rpkt);
-+ break;
-+ case E_TGEC_COUNTER_RUCA:
-+ ret_val = GET_TGEC_CNTR_64(ruca);
-+ break;
-+ case E_TGEC_COUNTER_RERR:
-+ ret_val = GET_TGEC_CNTR_64(rerr);
-+ break;
-+ case E_TGEC_COUNTER_TOCT:
-+ ret_val = GET_TGEC_CNTR_64(toct);
-+ break;
-+ case E_TGEC_COUNTER_TMCA:
-+ ret_val = GET_TGEC_CNTR_64(tmca);
-+ break;
-+ case E_TGEC_COUNTER_TBCA:
-+ ret_val = GET_TGEC_CNTR_64(tbca);
-+ break;
-+ case E_TGEC_COUNTER_TUCA:
-+ ret_val = GET_TGEC_CNTR_64(tuca);
-+ break;
-+ case E_TGEC_COUNTER_TERR:
-+ ret_val = GET_TGEC_CNTR_64(terr);
-+ break;
-+ default:
-+ ret_val = 0;
-+ }
-+
-+ return ret_val;
-+}
-+
-+void tgec_enable(struct tgec_regs *regs, bool apply_rx, bool apply_tx)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->command_config);
-+ if (apply_rx)
-+ tmp |= CMD_CFG_RX_EN;
-+ if (apply_tx)
-+ tmp |= CMD_CFG_TX_EN;
-+ iowrite32be(tmp, ®s->command_config);
-+}
-+
-+void tgec_disable(struct tgec_regs *regs, bool apply_rx, bool apply_tx)
-+{
-+ uint32_t tmp_reg_32;
-+
-+ tmp_reg_32 = ioread32be(®s->command_config);
-+ if (apply_rx)
-+ tmp_reg_32 &= ~CMD_CFG_RX_EN;
-+ if (apply_tx)
-+ tmp_reg_32 &= ~CMD_CFG_TX_EN;
-+ iowrite32be(tmp_reg_32, ®s->command_config);
-+}
-+
-+void tgec_set_promiscuous(struct tgec_regs *regs, bool val)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->command_config);
-+
-+ if (val)
-+ tmp |= CMD_CFG_PROMIS_EN;
-+ else
-+ tmp &= ~CMD_CFG_PROMIS_EN;
-+
-+ iowrite32be(tmp, ®s->command_config);
-+}
-+
-+void tgec_set_hash_table(struct tgec_regs *regs, uint32_t value)
-+{
-+ iowrite32be(value, ®s->hashtable_ctrl);
-+}
-+
-+void tgec_tx_mac_pause(struct tgec_regs *regs, uint16_t pause_time)
-+{
-+ iowrite32be((uint32_t)pause_time, ®s->pause_quant);
-+}
-+
-+void tgec_rx_ignore_mac_pause(struct tgec_regs *regs, bool en)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->command_config);
-+ if (en)
-+ tmp |= CMD_CFG_PAUSE_IGNORE;
-+ else
-+ tmp &= ~CMD_CFG_PAUSE_IGNORE;
-+ iowrite32be(tmp, ®s->command_config);
-+}
-+
-+void tgec_enable_1588_time_stamp(struct tgec_regs *regs, bool en)
-+{
-+ uint32_t tmp;
-+
-+ tmp = ioread32be(®s->command_config);
-+ if (en)
-+ tmp |= CMD_CFG_EN_TIMESTAMP;
-+ else
-+ tmp &= ~CMD_CFG_EN_TIMESTAMP;
-+ iowrite32be(tmp, ®s->command_config);
-+}
-+
-+uint32_t tgec_get_event(struct tgec_regs *regs, uint32_t ev_mask)
-+{
-+ return ioread32be(®s->ievent) & ev_mask;
-+}
-+
-+void tgec_ack_event(struct tgec_regs *regs, uint32_t ev_mask)
-+{
-+ iowrite32be(ev_mask, ®s->ievent);
-+}
-+
-+uint32_t tgec_get_interrupt_mask(struct tgec_regs *regs)
-+{
-+ return ioread32be(®s->imask);
-+}
-+
-+void tgec_add_addr_in_paddr(struct tgec_regs *regs, uint8_t *adr)
-+{
-+ uint32_t tmp0, tmp1;
-+
-+ tmp0 = (uint32_t)(adr[0] |
-+ adr[1] << 8 |
-+ adr[2] << 16 |
-+ adr[3] << 24);
-+ tmp1 = (uint32_t)(adr[4] | adr[5] << 8);
-+ iowrite32be(tmp0, ®s->mac_addr_2);
-+ iowrite32be(tmp1, ®s->mac_addr_3);
-+}
-+
-+void tgec_clear_addr_in_paddr(struct tgec_regs *regs)
-+{
-+ iowrite32be(0, ®s->mac_addr_2);
-+ iowrite32be(0, ®s->mac_addr_3);
-+}
-+
-+uint32_t tgec_get_revision(struct tgec_regs *regs)
-+{
-+ return ioread32be(®s->tgec_id);
-+}
-+
-+void tgec_enable_interrupt(struct tgec_regs *regs, uint32_t ev_mask)
-+{
-+ iowrite32be(ioread32be(®s->imask) | ev_mask, ®s->imask);
-+}
-+
-+void tgec_disable_interrupt(struct tgec_regs *regs, uint32_t ev_mask)
-+{
-+ iowrite32be(ioread32be(®s->imask) & ~ev_mask, ®s->imask);
-+}
-+
-+uint16_t tgec_get_max_frame_len(struct tgec_regs *regs)
-+{
-+ return (uint16_t) ioread32be(®s->maxfrm);
-+}
-+
-+void tgec_defconfig(struct tgec_cfg *cfg)
-+{
-+ cfg->wan_mode_enable = DEFAULT_WAN_MODE_ENABLE;
-+ cfg->promiscuous_mode_enable = DEFAULT_PROMISCUOUS_MODE_ENABLE;
-+ cfg->pause_forward_enable = DEFAULT_PAUSE_FORWARD_ENABLE;
-+ cfg->pause_ignore = DEFAULT_PAUSE_IGNORE;
-+ cfg->tx_addr_ins_enable = DEFAULT_TX_ADDR_INS_ENABLE;
-+ cfg->loopback_enable = DEFAULT_LOOPBACK_ENABLE;
-+ cfg->cmd_frame_enable = DEFAULT_CMD_FRAME_ENABLE;
-+ cfg->rx_error_discard = DEFAULT_RX_ERROR_DISCARD;
-+ cfg->send_idle_enable = DEFAULT_SEND_IDLE_ENABLE;
-+ cfg->no_length_check_enable = DEFAULT_NO_LENGTH_CHECK_ENABLE;
-+ cfg->lgth_check_nostdr = DEFAULT_LGTH_CHECK_NOSTDR;
-+ cfg->time_stamp_enable = DEFAULT_TIME_STAMP_ENABLE;
-+ cfg->tx_ipg_length = DEFAULT_TX_IPG_LENGTH;
-+ cfg->max_frame_length = DEFAULT_MAX_FRAME_LENGTH;
-+ cfg->pause_quant = DEFAULT_PAUSE_QUANT;
-+#ifdef FM_TX_ECC_FRMS_ERRATA_10GMAC_A004
-+ cfg->skip_fman11_workaround = FALSE;
-+#endif /* FM_TX_ECC_FRMS_ERRATA_10GMAC_A004 */
-+}
-+
-+int tgec_init(struct tgec_regs *regs, struct tgec_cfg *cfg,
-+ uint32_t exception_mask)
-+{
-+ uint32_t tmp;
-+
-+ /* Config */
-+ tmp = 0x40; /* CRC forward */
-+ if (cfg->wan_mode_enable)
-+ tmp |= CMD_CFG_WAN_MODE;
-+ if (cfg->promiscuous_mode_enable)
-+ tmp |= CMD_CFG_PROMIS_EN;
-+ if (cfg->pause_forward_enable)
-+ tmp |= CMD_CFG_PAUSE_FWD;
-+ if (cfg->pause_ignore)
-+ tmp |= CMD_CFG_PAUSE_IGNORE;
-+ if (cfg->tx_addr_ins_enable)
-+ tmp |= CMD_CFG_TX_ADDR_INS;
-+ if (cfg->loopback_enable)
-+ tmp |= CMD_CFG_LOOPBACK_EN;
-+ if (cfg->cmd_frame_enable)
-+ tmp |= CMD_CFG_CMD_FRM_EN;
-+ if (cfg->rx_error_discard)
-+ tmp |= CMD_CFG_RX_ER_DISC;
-+ if (cfg->send_idle_enable)
-+ tmp |= CMD_CFG_SEND_IDLE;
-+ if (cfg->no_length_check_enable)
-+ tmp |= CMD_CFG_NO_LEN_CHK;
-+ if (cfg->time_stamp_enable)
-+ tmp |= CMD_CFG_EN_TIMESTAMP;
-+ iowrite32be(tmp, ®s->command_config);
-+ /* Max Frame Length */
-+ iowrite32be((uint32_t)cfg->max_frame_length, ®s->maxfrm);
-+ /* Pause Time */
-+ iowrite32be(cfg->pause_quant, ®s->pause_quant);
-+
-+ /* clear all pending events and set-up interrupts */
-+ tgec_ack_event(regs, 0xffffffff);
-+ tgec_enable_interrupt(regs, exception_mask);
-+ return 0;
-+}
-+
-+void tgec_fm_tx_fifo_corruption_errata_10gmac_a007(struct tgec_regs *regs)
-+{
-+ uint32_t tmp;
-+
-+ /* restore the default tx ipg Length */
-+ tmp = (ioread32be(®s->tx_ipg_len) & ~TX_IPG_LENGTH_MASK) | 12;
-+
-+ iowrite32be(tmp, ®s->tx_ipg_len);
-+
-+}
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fsl_fman_dtsec_mii_acc.h b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fsl_fman_dtsec_mii_acc.h
-new file mode 100644
-index 0000000..2d74b6a
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/fsl_fman_dtsec_mii_acc.h
-@@ -0,0 +1,102 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+#ifndef __FSL_FMAN_DTSEC_MII_ACC_H
-+#define __FSL_FMAN_DTSEC_MII_ACC_H
-+
-+#include "common/general.h"
-+
-+
-+/* MII Management Configuration Register */
-+#define MIIMCFG_RESET_MGMT 0x80000000
-+#define MIIMCFG_MGNTCLK_MASK 0x00000007
-+#define MIIMCFG_MGNTCLK_SHIFT 0
-+
-+/* MII Management Command Register */
-+#define MIIMCOM_SCAN_CYCLE 0x00000002
-+#define MIIMCOM_READ_CYCLE 0x00000001
-+
-+/* MII Management Address Register */
-+#define MIIMADD_PHY_ADDR_SHIFT 8
-+#define MIIMADD_PHY_ADDR_MASK 0x00001f00
-+
-+#define MIIMADD_REG_ADDR_SHIFT 0
-+#define MIIMADD_REG_ADDR_MASK 0x0000001f
-+
-+/* MII Management Indicator Register */
-+#define MIIMIND_BUSY 0x00000001
-+
-+
-+/* PHY Control Register */
-+#define PHY_CR_LOOPBACK 0x4000
-+#define PHY_CR_SPEED0 0x2000
-+#define PHY_CR_ANE 0x1000
-+#define PHY_CR_FULLDUPLEX 0x0100
-+#define PHY_CR_SPEED1 0x0040
-+
-+#define PHY_TBICON_SRESET 0x8000
-+#define PHY_TBICON_SPEED2 0x0020
-+
-+/* register map */
-+
-+/* MII Configuration Control Memory Map Registers */
-+struct dtsec_mii_reg {
-+ uint32_t reserved1[72];
-+ uint32_t miimcfg; /* MII Mgmt:configuration */
-+ uint32_t miimcom; /* MII Mgmt:command */
-+ uint32_t miimadd; /* MII Mgmt:address */
-+ uint32_t miimcon; /* MII Mgmt:control 3 */
-+ uint32_t miimstat; /* MII Mgmt:status */
-+ uint32_t miimind; /* MII Mgmt:indicators */
-+};
-+
-+/* dTSEC MII API */
-+
-+/* functions to access the mii registers for phy configuration.
-+ * this functionality may not be available for all dtsecs in the system.
-+ * consult the reference manual for details */
-+void dtsec_mii_reset(struct dtsec_mii_reg *regs);
-+/* frequency is in MHz.
-+ * note that dtsec clock is 1/2 of fman clock */
-+void dtsec_mii_init(struct dtsec_mii_reg *regs, uint16_t dtsec_freq);
-+int dtsec_mii_write_reg(struct dtsec_mii_reg *regs,
-+ uint8_t addr,
-+ uint8_t reg,
-+ uint16_t data);
-+
-+int dtsec_mii_read_reg(struct dtsec_mii_reg *regs,
-+ uint8_t addr,
-+ uint8_t reg,
-+ uint16_t *data);
-+
-+#endif /* __FSL_FMAN_DTSEC_MII_ACC_H */
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/memac.c b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/memac.c
-new file mode 100644
-index 0000000..6e5440d
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/memac.c
-@@ -0,0 +1,1036 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+/******************************************************************************
-+ @File memac.c
-+
-+ @Description FM mEMAC driver
-+*//***************************************************************************/
-+
-+#include "std_ext.h"
-+#include "string_ext.h"
-+#include "error_ext.h"
-+#include "xx_ext.h"
-+#include "endian_ext.h"
-+#include "debug_ext.h"
-+
-+#include "fm_common.h"
-+#include "memac.h"
-+
-+
-+/*****************************************************************************/
-+/* Internal routines */
-+/*****************************************************************************/
-+
-+/* ......................................................................... */
-+
-+static uint32_t GetMacAddrHashCode(uint64_t ethAddr)
-+{
-+ uint64_t mask1, mask2;
-+ uint32_t xor = 0;
-+ uint8_t i, j;
-+
-+ for (i=0; i < 6; i++)
-+ {
-+ mask1 = ethAddr & (uint64_t)0x01;
-+ ethAddr >>= 1;
-+
-+ for (j=0; j < 7; j++)
-+ {
-+ mask2 = ethAddr & (uint64_t)0x01;
-+ mask1 ^= mask2;
-+ ethAddr >>= 1;
-+ }
-+ xor |= (mask1 << (5-i));
-+ }
-+
-+ return xor;
-+}
-+
-+
-+/* ......................................................................... */
-+
-+static void SetupSgmiiInternalPhy(t_Memac *p_Memac, uint8_t phyAddr)
-+{
-+ uint16_t tmpReg16;
-+
-+ /* SGMII mode + AN enable */
-+ tmpReg16 = PHY_SGMII_IF_MODE_AN | PHY_SGMII_IF_MODE_SGMII;
-+ MEMAC_MII_WritePhyReg(p_Memac, phyAddr, 0x14, tmpReg16);
-+
-+ /* Device ability according to SGMII specification */
-+ tmpReg16 = PHY_SGMII_DEV_ABILITY_SGMII;
-+ MEMAC_MII_WritePhyReg(p_Memac, phyAddr, 0x4, tmpReg16);
-+
-+ /* Adjust link timer for SGMII -
-+ According to Cisco SGMII specification the timer should be 1.6 ms.
-+ The link_timer register is configured in units of the clock.
-+ - When running as 1G SGMII, Serdes clock is 125 MHz, so
-+ unit = 1 / (125*10^6 Hz) = 8 ns.
-+ 1.6 ms in units of 8 ns = 1.6ms / 8ns = 2 * 10^5 = 0x30d40
-+ - When running as 2.5G SGMII, Serdes clock is 312.5 MHz, so
-+ unit = 1 / (312.5*10^6 Hz) = 3.2 ns.
-+ 1.6 ms in units of 3.2 ns = 1.6ms / 3.2ns = 5 * 10^5 = 0x7a120.
-+ Since link_timer value of 1G SGMII will be too short for 2.5 SGMII,
-+ we always set up here a value of 2.5 SGMII. */
-+ MEMAC_MII_WritePhyReg(p_Memac, phyAddr, 0x13, 0x0007);
-+ MEMAC_MII_WritePhyReg(p_Memac, phyAddr, 0x12, 0xa120);
-+
-+ /* Restart AN */
-+ tmpReg16 = PHY_SGMII_CR_DEF_VAL | PHY_SGMII_CR_RESET_AN;
-+ MEMAC_MII_WritePhyReg(p_Memac, phyAddr, 0x0, tmpReg16);
-+}
-+
-+/* ......................................................................... */
-+
-+static void SetupSgmiiInternalPhyBaseX(t_Memac *p_Memac, uint8_t phyAddr)
-+{
-+ uint16_t tmpReg16;
-+
-+ /* 1000BaseX mode */
-+ tmpReg16 = PHY_SGMII_IF_MODE_1000X;
-+ MEMAC_MII_WritePhyReg(p_Memac, phyAddr, 0x14, tmpReg16);
-+
-+ /* AN Device capability */
-+ tmpReg16 = PHY_SGMII_DEV_ABILITY_1000X;
-+ MEMAC_MII_WritePhyReg(p_Memac, phyAddr, 0x4, tmpReg16);
-+
-+ /* Adjust link timer for SGMII -
-+ For Serdes 1000BaseX auto-negotiation the timer should be 10 ms.
-+ The link_timer register is configured in units of the clock.
-+ - When running as 1G SGMII, Serdes clock is 125 MHz, so
-+ unit = 1 / (125*10^6 Hz) = 8 ns.
-+ 10 ms in units of 8 ns = 10ms / 8ns = 1250000 = 0x1312d0
-+ - When running as 2.5G SGMII, Serdes clock is 312.5 MHz, so
-+ unit = 1 / (312.5*10^6 Hz) = 3.2 ns.
-+ 10 ms in units of 3.2 ns = 10ms / 3.2ns = 3125000 = 0x2faf08.
-+ Since link_timer value of 1G SGMII will be too short for 2.5 SGMII,
-+ we always set up here a value of 2.5 SGMII. */
-+ MEMAC_MII_WritePhyReg(p_Memac, phyAddr, 0x13, 0x002f);
-+ MEMAC_MII_WritePhyReg(p_Memac, phyAddr, 0x12, 0xaf08);
-+
-+ /* Restart AN */
-+ tmpReg16 = PHY_SGMII_CR_DEF_VAL | PHY_SGMII_CR_RESET_AN;
-+ MEMAC_MII_WritePhyReg(p_Memac, phyAddr, 0x0, tmpReg16);
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error CheckInitParameters(t_Memac *p_Memac)
-+{
-+ e_FmMacType portType;
-+
-+ portType = ((ENET_SPEED_FROM_MODE(p_Memac->enetMode) < e_ENET_SPEED_10000) ? e_FM_MAC_1G : e_FM_MAC_10G);
-+
-+#if (FM_MAX_NUM_OF_10G_MACS > 0)
-+ if ((portType == e_FM_MAC_10G) && (p_Memac->macId >= FM_MAX_NUM_OF_10G_MACS))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("10G MAC ID must be less than %d", FM_MAX_NUM_OF_10G_MACS));
-+#endif /* (FM_MAX_NUM_OF_10G_MACS > 0) */
-+
-+ if ((portType == e_FM_MAC_1G) && (p_Memac->macId >= FM_MAX_NUM_OF_1G_MACS))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("1G MAC ID must be less than %d", FM_MAX_NUM_OF_1G_MACS));
-+ if (p_Memac->addr == 0)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Ethernet MAC must have a valid MAC address"));
-+ if (!p_Memac->f_Exception)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Uninitialized f_Exception"));
-+ if (!p_Memac->f_Event)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Uninitialized f_Event"));
-+#ifdef FM_LEN_CHECK_ERRATA_FMAN_SW002
-+ if (!p_Memac->p_MemacDriverParam->no_length_check_enable)
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, ("LengthCheck!"));
-+#endif /* FM_LEN_CHECK_ERRATA_FMAN_SW002 */
-+
-+ return E_OK;
-+}
-+
-+/* ........................................................................... */
-+
-+static void MemacErrException(t_Handle h_Memac)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+ struct memac_regs *regs = p_Memac->p_MemMap;
-+ uint32_t event, imsk;
-+
-+ event = memac_get_event(regs, 0xffffffff);
-+
-+ /*
-+ * Apparently the imask bits are shifted by 16 bits offset from
-+ * their corresponding bits in the ievent - hence the >> 16
-+ */
-+ imsk = memac_get_interrupt_mask(regs) >> 16;;
-+
-+ /*
-+ * Extract all event bits plus the pending interrupts according to
-+ * their imask
-+ */
-+ event = (event & ~(MEMAC_ALL_IMASKS >> 16)) | (event & imsk);
-+
-+ /* Ignoring the status bits */
-+ event = event & ~(MEMAC_IEVNT_RX_EMPTY |
-+ MEMAC_IEVNT_TX_EMPTY |
-+ MEMAC_IEVNT_RX_LOWP |
-+ MEMAC_IEVNT_PHY_LOS);
-+
-+ memac_ack_event(regs, event);
-+
-+ if (event & MEMAC_IEVNT_RX_FIFO_OVFL)
-+ p_Memac->f_Exception(p_Memac->h_App, e_FM_MAC_EX_10G_RX_FIFO_OVFL);
-+ if (event & MEMAC_IEVNT_TX_FIFO_UNFL)
-+ p_Memac->f_Exception(p_Memac->h_App, e_FM_MAC_EX_10G_TX_FIFO_UNFL);
-+ if (event & MEMAC_IEVNT_TX_FIFO_OVFL)
-+ p_Memac->f_Exception(p_Memac->h_App, e_FM_MAC_EX_10G_TX_FIFO_OVFL);
-+ if (event & MEMAC_IEVNT_TX_ECC_ER)
-+ p_Memac->f_Exception(p_Memac->h_App, e_FM_MAC_EX_10G_1TX_ECC_ER);
-+ if (event & MEMAC_IEVNT_RX_ECC_ER)
-+ p_Memac->f_Exception(p_Memac->h_App, e_FM_MAC_EX_10G_RX_ECC_ER);
-+ if (event & MEMAC_IEVNT_REM_FAULT)
-+ p_Memac->f_Exception(p_Memac->h_App, e_FM_MAC_EX_10G_REM_FAULT);
-+ if (event & MEMAC_IEVNT_LOC_FAULT)
-+ p_Memac->f_Exception(p_Memac->h_App, e_FM_MAC_EX_10G_LOC_FAULT);
-+}
-+
-+
-+/* ......................................................................... */
-+
-+static void FreeInitResources(t_Memac *p_Memac)
-+{
-+ e_FmMacType portType;
-+
-+ portType =
-+ ((ENET_SPEED_FROM_MODE(p_Memac->enetMode) < e_ENET_SPEED_10000) ? e_FM_MAC_1G : e_FM_MAC_10G);
-+
-+ if (portType == e_FM_MAC_10G)
-+ FmUnregisterIntr(p_Memac->fmMacControllerDriver.h_Fm, e_FM_MOD_10G_MAC, p_Memac->macId, e_FM_INTR_TYPE_ERR);
-+ else
-+ FmUnregisterIntr(p_Memac->fmMacControllerDriver.h_Fm, e_FM_MOD_1G_MAC, p_Memac->macId, e_FM_INTR_TYPE_ERR);
-+
-+ /* release the driver's group hash table */
-+ FreeHashTable(p_Memac->p_MulticastAddrHash);
-+ p_Memac->p_MulticastAddrHash = NULL;
-+
-+ /* release the driver's individual hash table */
-+ FreeHashTable(p_Memac->p_UnicastAddrHash);
-+ p_Memac->p_UnicastAddrHash = NULL;
-+}
-+
-+
-+/*****************************************************************************/
-+/* mEMAC API routines */
-+/*****************************************************************************/
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacEnable(t_Handle h_Memac, e_CommMode mode)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ memac_enable(p_Memac->p_MemMap, (mode & e_COMM_MODE_RX), (mode & e_COMM_MODE_TX));
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacDisable (t_Handle h_Memac, e_CommMode mode)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ memac_disable(p_Memac->p_MemMap, (mode & e_COMM_MODE_RX), (mode & e_COMM_MODE_TX));
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacSetPromiscuous(t_Handle h_Memac, bool newVal)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ memac_set_promiscuous(p_Memac->p_MemMap, newVal);
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error MemacAdjustLink(t_Handle h_Memac, e_EnetSpeed speed, bool fullDuplex)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+UNUSED(p_Memac);
-+DBG(WARNING, ("mEMAC works in automatic-mode; therefore, adjust-link is not needed!"));
-+
-+ return E_OK;
-+}
-+
-+
-+/*****************************************************************************/
-+/* Memac Configs modification functions */
-+/*****************************************************************************/
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacConfigLoopback(t_Handle h_Memac, bool newVal)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ p_Memac->p_MemacDriverParam->loopback_enable = newVal;
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacConfigWan(t_Handle h_Memac, bool newVal)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ p_Memac->p_MemacDriverParam->wan_mode_enable = newVal;
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacConfigMaxFrameLength(t_Handle h_Memac, uint16_t newVal)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ p_Memac->p_MemacDriverParam->max_frame_length = newVal;
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacConfigPad(t_Handle h_Memac, bool newVal)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ p_Memac->p_MemacDriverParam->pad_enable = newVal;
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacConfigLengthCheck(t_Handle h_Memac, bool newVal)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ p_Memac->p_MemacDriverParam->no_length_check_enable = !newVal;
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacConfigException(t_Handle h_Memac, e_FmMacExceptions exception, bool enable)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+ uint32_t bitMask = 0;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ GET_EXCEPTION_FLAG(bitMask, exception);
-+ if (bitMask)
-+ {
-+ if (enable)
-+ p_Memac->exceptions |= bitMask;
-+ else
-+ p_Memac->exceptions &= ~bitMask;
-+ }
-+ else
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Undefined exception"));
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacConfigResetOnInit(t_Handle h_Memac, bool enable)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ p_Memac->p_MemacDriverParam->reset_on_init = enable;
-+
-+ return E_OK;
-+}
-+
-+
-+/*****************************************************************************/
-+/* Memac Run Time API functions */
-+/*****************************************************************************/
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacSetTxPauseFrames(t_Handle h_Memac,
-+ uint8_t priority,
-+ uint16_t pauseTime,
-+ uint16_t threshTime)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ memac_set_tx_pause_frames(p_Memac->p_MemMap, priority, pauseTime, threshTime);
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacSetTxAutoPauseFrames(t_Handle h_Memac,
-+ uint16_t pauseTime)
-+{
-+ return MemacSetTxPauseFrames(h_Memac, FM_MAC_NO_PFC, pauseTime, 0);
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacSetRxIgnorePauseFrames(t_Handle h_Memac, bool en)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ memac_set_rx_ignore_pause_frames(p_Memac->p_MemMap, en);
-+
-+ return E_OK;
-+}
-+
-+/* .............................................................................. */
-+
-+static t_Error MemacEnable1588TimeStamp(t_Handle h_Memac)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+UNUSED(p_Memac);
-+DBG(WARNING, ("mEMAC has 1588 always enabled!"));
-+
-+ return E_OK;
-+}
-+
-+/* Counters handling */
-+/* ......................................................................... */
-+
-+static t_Error MemacGetStatistics(t_Handle h_Memac, t_FmMacStatistics *p_Statistics)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(!p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR(p_Statistics, E_NULL_POINTER);
-+
-+ p_Statistics->eStatPkts64 = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_R64);
-+ p_Statistics->eStatPkts65to127 = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_R127);
-+ p_Statistics->eStatPkts128to255 = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_R255);
-+ p_Statistics->eStatPkts256to511 = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_R511);
-+ p_Statistics->eStatPkts512to1023 = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_R1023);
-+ p_Statistics->eStatPkts1024to1518 = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_R1518);
-+ p_Statistics->eStatPkts1519to1522 = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_R1519X);
-+/* */
-+ p_Statistics->eStatFragments = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_RFRG);
-+ p_Statistics->eStatJabbers = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_RJBR);
-+
-+ p_Statistics->eStatsDropEvents = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_RDRP);
-+ p_Statistics->eStatCRCAlignErrors = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_RALN);
-+
-+ p_Statistics->eStatUndersizePkts = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_TUND);
-+ p_Statistics->eStatOversizePkts = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_ROVR);
-+/* Pause */
-+ p_Statistics->reStatPause = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_RXPF);
-+ p_Statistics->teStatPause = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_TXPF);
-+
-+/* MIB II */
-+ p_Statistics->ifInOctets = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_ROCT);
-+ p_Statistics->ifInUcastPkts = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_RUCA);
-+ p_Statistics->ifInMcastPkts = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_RMCA);
-+ p_Statistics->ifInBcastPkts = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_RBCA);
-+ p_Statistics->ifInPkts = p_Statistics->ifInUcastPkts
-+ + p_Statistics->ifInMcastPkts
-+ + p_Statistics->ifInBcastPkts;
-+ p_Statistics->ifInDiscards = 0;
-+ p_Statistics->ifInErrors = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_RERR);
-+
-+ p_Statistics->ifOutOctets = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_TOCT);
-+ p_Statistics->ifOutUcastPkts = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_TUCA);
-+ p_Statistics->ifOutMcastPkts = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_TMCA);
-+ p_Statistics->ifOutBcastPkts = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_TBCA);
-+ p_Statistics->ifOutPkts = p_Statistics->ifOutUcastPkts
-+ + p_Statistics->ifOutMcastPkts
-+ + p_Statistics->ifOutBcastPkts;
-+ p_Statistics->ifOutDiscards = 0;
-+ p_Statistics->ifOutErrors = memac_get_counter(p_Memac->p_MemMap, E_MEMAC_COUNTER_TERR);
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacModifyMacAddress (t_Handle h_Memac, t_EnetAddr *p_EnetAddr)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(!p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ memac_hardware_add_addr_in_paddr(p_Memac->p_MemMap, (uint8_t *)(*p_EnetAddr), 0);
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacResetCounters (t_Handle h_Memac)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ memac_reset_counter(p_Memac->p_MemMap);
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacAddExactMatchMacAddress(t_Handle h_Memac, t_EnetAddr *p_EthAddr)
-+{
-+ t_Memac *p_Memac = (t_Memac *) h_Memac;
-+ uint64_t ethAddr;
-+ uint8_t paddrNum;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ ethAddr = ENET_ADDR_TO_UINT64(*p_EthAddr);
-+
-+ if (ethAddr & GROUP_ADDRESS)
-+ /* Multicast address has no effect in PADDR */
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Multicast address"));
-+
-+ /* Make sure no PADDR contains this address */
-+ for (paddrNum = 0; paddrNum < MEMAC_NUM_OF_PADDRS; paddrNum++)
-+ if (p_Memac->indAddrRegUsed[paddrNum])
-+ if (p_Memac->paddr[paddrNum] == ethAddr)
-+ RETURN_ERROR(MAJOR, E_ALREADY_EXISTS, NO_MSG);
-+
-+ /* Find first unused PADDR */
-+ for (paddrNum = 0; paddrNum < MEMAC_NUM_OF_PADDRS; paddrNum++)
-+ if (!(p_Memac->indAddrRegUsed[paddrNum]))
-+ {
-+ /* mark this PADDR as used */
-+ p_Memac->indAddrRegUsed[paddrNum] = TRUE;
-+ /* store address */
-+ p_Memac->paddr[paddrNum] = ethAddr;
-+
-+ /* put in hardware */
-+ memac_hardware_add_addr_in_paddr(p_Memac->p_MemMap, (uint8_t*)(*p_EthAddr), paddrNum);
-+ p_Memac->numOfIndAddrInRegs++;
-+
-+ return E_OK;
-+ }
-+
-+ /* No free PADDR */
-+ RETURN_ERROR(MAJOR, E_FULL, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacDelExactMatchMacAddress(t_Handle h_Memac, t_EnetAddr *p_EthAddr)
-+{
-+ t_Memac *p_Memac = (t_Memac *) h_Memac;
-+ uint64_t ethAddr;
-+ uint8_t paddrNum;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ ethAddr = ENET_ADDR_TO_UINT64(*p_EthAddr);
-+
-+ /* Find used PADDR containing this address */
-+ for (paddrNum = 0; paddrNum < MEMAC_NUM_OF_PADDRS; paddrNum++)
-+ {
-+ if ((p_Memac->indAddrRegUsed[paddrNum]) &&
-+ (p_Memac->paddr[paddrNum] == ethAddr))
-+ {
-+ /* mark this PADDR as not used */
-+ p_Memac->indAddrRegUsed[paddrNum] = FALSE;
-+ /* clear in hardware */
-+ memac_hardware_clear_addr_in_paddr(p_Memac->p_MemMap, paddrNum);
-+ p_Memac->numOfIndAddrInRegs--;
-+
-+ return E_OK;
-+ }
-+ }
-+
-+ RETURN_ERROR(MAJOR, E_NOT_FOUND, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacAddHashMacAddress(t_Handle h_Memac, t_EnetAddr *p_EthAddr)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+ t_EthHashEntry *p_HashEntry;
-+ uint32_t hash;
-+ uint64_t ethAddr;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(!p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ ethAddr = ENET_ADDR_TO_UINT64(*p_EthAddr);
-+
-+ if (!(ethAddr & GROUP_ADDRESS))
-+ /* Unicast addresses not supported in hash */
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("Unicast Address"));
-+
-+ hash = GetMacAddrHashCode(ethAddr) & HASH_CTRL_ADDR_MASK;
-+
-+ /* Create element to be added to the driver hash table */
-+ p_HashEntry = (t_EthHashEntry *)XX_Malloc(sizeof(t_EthHashEntry));
-+ p_HashEntry->addr = ethAddr;
-+ INIT_LIST(&p_HashEntry->node);
-+
-+ LIST_AddToTail(&(p_HashEntry->node), &(p_Memac->p_MulticastAddrHash->p_Lsts[hash]));
-+ memac_set_hash_table(p_Memac->p_MemMap, (hash | HASH_CTRL_MCAST_EN));
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacDelHashMacAddress(t_Handle h_Memac, t_EnetAddr *p_EthAddr)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+ t_EthHashEntry *p_HashEntry = NULL;
-+ t_List *p_Pos;
-+ uint32_t hash;
-+ uint64_t ethAddr;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(!p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ ethAddr = ENET_ADDR_TO_UINT64(*p_EthAddr);
-+
-+ hash = GetMacAddrHashCode(ethAddr) & HASH_CTRL_ADDR_MASK;
-+
-+ LIST_FOR_EACH(p_Pos, &(p_Memac->p_MulticastAddrHash->p_Lsts[hash]))
-+ {
-+ p_HashEntry = ETH_HASH_ENTRY_OBJ(p_Pos);
-+ if (p_HashEntry->addr == ethAddr)
-+ {
-+ LIST_DelAndInit(&p_HashEntry->node);
-+ XX_Free(p_HashEntry);
-+ break;
-+ }
-+ }
-+ if (LIST_IsEmpty(&p_Memac->p_MulticastAddrHash->p_Lsts[hash]))
-+ memac_set_hash_table(p_Memac->p_MemMap, (hash & ~HASH_CTRL_MCAST_EN));
-+
-+ return E_OK;
-+}
-+
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacSetException(t_Handle h_Memac, e_FmMacExceptions exception, bool enable)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+ uint32_t bitMask = 0;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+
-+ GET_EXCEPTION_FLAG(bitMask, exception);
-+ if (bitMask)
-+ {
-+ if (enable)
-+ p_Memac->exceptions |= bitMask;
-+ else
-+ p_Memac->exceptions &= ~bitMask;
-+ }
-+ else
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Undefined exception"));
-+
-+ memac_set_exception(p_Memac->p_MemMap, bitMask, enable);
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static uint16_t MemacGetMaxFrameLength(t_Handle h_Memac)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_VALUE(p_Memac, E_INVALID_HANDLE, 0);
-+ SANITY_CHECK_RETURN_VALUE(!p_Memac->p_MemacDriverParam, E_INVALID_STATE, 0);
-+
-+ return memac_get_max_frame_length(p_Memac->p_MemMap);
-+}
-+
-+/* ......................................................................... */
-+
-+#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))
-+static t_Error MemacDumpRegs(t_Handle h_Memac)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+ int i = 0;
-+
-+ DECLARE_DUMP;
-+
-+ if (p_Memac->p_MemMap)
-+ {
-+ DUMP_TITLE(p_Memac->p_MemMap, ("mEMAC %d: ", p_Memac->macId));
-+ DUMP_VAR(p_Memac->p_MemMap, command_config);
-+ DUMP_VAR(p_Memac->p_MemMap, mac_addr0.mac_addr_l);
-+ DUMP_VAR(p_Memac->p_MemMap, mac_addr0.mac_addr_u);
-+ DUMP_VAR(p_Memac->p_MemMap, maxfrm);
-+ DUMP_VAR(p_Memac->p_MemMap, hashtable_ctrl);
-+ DUMP_VAR(p_Memac->p_MemMap, ievent);
-+ DUMP_VAR(p_Memac->p_MemMap, tx_ipg_length);
-+ DUMP_VAR(p_Memac->p_MemMap, imask);
-+
-+ DUMP_SUBSTRUCT_ARRAY(i, 4)
-+ {
-+ DUMP_VAR(p_Memac->p_MemMap, pause_quanta[i]);
-+ }
-+ DUMP_SUBSTRUCT_ARRAY(i, 4)
-+ {
-+ DUMP_VAR(p_Memac->p_MemMap, pause_thresh[i]);
-+ }
-+
-+ DUMP_VAR(p_Memac->p_MemMap, rx_pause_status);
-+
-+ DUMP_SUBSTRUCT_ARRAY(i, MEMAC_NUM_OF_PADDRS)
-+ {
-+ DUMP_VAR(p_Memac->p_MemMap, mac_addr[i].mac_addr_l);
-+ DUMP_VAR(p_Memac->p_MemMap, mac_addr[i].mac_addr_u);
-+ }
-+
-+ DUMP_VAR(p_Memac->p_MemMap, lpwake_timer);
-+ DUMP_VAR(p_Memac->p_MemMap, sleep_timer);
-+ DUMP_VAR(p_Memac->p_MemMap, statn_config);
-+ DUMP_VAR(p_Memac->p_MemMap, if_mode);
-+ DUMP_VAR(p_Memac->p_MemMap, if_status);
-+ DUMP_VAR(p_Memac->p_MemMap, hg_config);
-+ DUMP_VAR(p_Memac->p_MemMap, hg_pause_quanta);
-+ DUMP_VAR(p_Memac->p_MemMap, hg_pause_thresh);
-+ DUMP_VAR(p_Memac->p_MemMap, hgrx_pause_status);
-+ DUMP_VAR(p_Memac->p_MemMap, hg_fifos_status);
-+ DUMP_VAR(p_Memac->p_MemMap, rhm);
-+ DUMP_VAR(p_Memac->p_MemMap, thm);
-+ }
-+
-+ return E_OK;
-+}
-+#endif /* (defined(DEBUG_ERRORS) && ... */
-+
-+
-+/*****************************************************************************/
-+/* mEMAC Init & Free API */
-+/*****************************************************************************/
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacInit(t_Handle h_Memac)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+ struct memac_cfg *p_MemacDriverParam;
-+ enum enet_interface enet_interface;
-+ enum enet_speed enet_speed;
-+ uint8_t i, phyAddr;
-+ t_EnetAddr ethAddr;
-+ e_FmMacType portType;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Memac->p_MemacDriverParam, E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR(p_Memac->fmMacControllerDriver.h_Fm, E_INVALID_HANDLE);
-+
-+ /* not needed! */
-+ /*FM_GetRevision(p_Memac->fmMacControllerDriver.h_Fm, &p_Memac->fmMacControllerDriver.fmRevInfo);*/
-+
-+ CHECK_INIT_PARAMETERS(p_Memac, CheckInitParameters);
-+
-+ p_MemacDriverParam = p_Memac->p_MemacDriverParam;
-+
-+ portType =
-+ ((ENET_SPEED_FROM_MODE(p_Memac->enetMode) < e_ENET_SPEED_10000) ? e_FM_MAC_1G : e_FM_MAC_10G);
-+
-+ /* First, reset the MAC if desired. */
-+ if (p_MemacDriverParam->reset_on_init)
-+ memac_reset(p_Memac->p_MemMap);
-+
-+ /* MAC Address */
-+ MAKE_ENET_ADDR_FROM_UINT64(p_Memac->addr, ethAddr);
-+ memac_hardware_add_addr_in_paddr(p_Memac->p_MemMap, (uint8_t*)ethAddr, 0);
-+
-+ enet_interface = (enum enet_interface) ENET_INTERFACE_FROM_MODE(p_Memac->enetMode);
-+ enet_speed = (enum enet_speed) ENET_SPEED_FROM_MODE(p_Memac->enetMode);
-+
-+ memac_init(p_Memac->p_MemMap,
-+ p_Memac->p_MemacDriverParam,
-+ enet_interface,
-+ enet_speed,
-+ p_Memac->exceptions);
-+
-+ if (ENET_INTERFACE_FROM_MODE(p_Memac->enetMode) == e_ENET_IF_SGMII)
-+ {
-+ /* Configure internal SGMII PHY */
-+ if (p_Memac->enetMode & ENET_IF_SGMII_BASEX)
-+ SetupSgmiiInternalPhyBaseX(p_Memac, PHY_MDIO_ADDR);
-+ else
-+ SetupSgmiiInternalPhy(p_Memac, PHY_MDIO_ADDR);
-+ }
-+ else if (ENET_INTERFACE_FROM_MODE(p_Memac->enetMode) == e_ENET_IF_QSGMII)
-+ {
-+ /* Configure 4 internal SGMII PHYs */
-+ for (i = 0; i < 4; i++)
-+ {
-+ /* QSGMII PHY address occupies 3 upper bits of 5-bit
-+ phyAddress; the lower 2 bits are used to extend
-+ register address space and access each one of 4
-+ ports inside QSGMII. */
-+ phyAddr = (uint8_t)((PHY_MDIO_ADDR << 2) | i);
-+ if (p_Memac->enetMode & ENET_IF_SGMII_BASEX)
-+ SetupSgmiiInternalPhyBaseX(p_Memac, phyAddr);
-+ else
-+ SetupSgmiiInternalPhy(p_Memac, phyAddr);
-+ }
-+ }
-+
-+ /* Max Frame Length */
-+ err = FmSetMacMaxFrame(p_Memac->fmMacControllerDriver.h_Fm,
-+ portType,
-+ p_Memac->fmMacControllerDriver.macId,
-+ p_MemacDriverParam->max_frame_length);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, ("settings Mac max frame length is FAILED"));
-+
-+ p_Memac->p_MulticastAddrHash = AllocHashTable(HASH_TABLE_SIZE);
-+ if (!p_Memac->p_MulticastAddrHash)
-+ {
-+ FreeInitResources(p_Memac);
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("allocation hash table is FAILED"));
-+ }
-+
-+ p_Memac->p_UnicastAddrHash = AllocHashTable(HASH_TABLE_SIZE);
-+ if (!p_Memac->p_UnicastAddrHash)
-+ {
-+ FreeInitResources(p_Memac);
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("allocation hash table is FAILED"));
-+ }
-+
-+ FmRegisterIntr(p_Memac->fmMacControllerDriver.h_Fm,
-+ (portType == e_FM_MAC_10G) ? e_FM_MOD_10G_MAC : e_FM_MOD_1G_MAC,
-+ p_Memac->macId,
-+ e_FM_INTR_TYPE_ERR,
-+ MemacErrException,
-+ p_Memac);
-+
-+
-+ XX_Free(p_MemacDriverParam);
-+ p_Memac->p_MemacDriverParam = NULL;
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error MemacFree(t_Handle h_Memac)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+
-+ FreeInitResources(p_Memac);
-+
-+ if (p_Memac->p_MemacDriverParam)
-+ {
-+ XX_Free(p_Memac->p_MemacDriverParam);
-+ p_Memac->p_MemacDriverParam = NULL;
-+ }
-+ XX_Free(p_Memac);
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static void InitFmMacControllerDriver(t_FmMacControllerDriver *p_FmMacControllerDriver)
-+{
-+ p_FmMacControllerDriver->f_FM_MAC_Init = MemacInit;
-+ p_FmMacControllerDriver->f_FM_MAC_Free = MemacFree;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_SetStatistics = NULL;
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigLoopback = MemacConfigLoopback;
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigMaxFrameLength = MemacConfigMaxFrameLength;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigWan = MemacConfigWan;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigPadAndCrc = MemacConfigPad;
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigHalfDuplex = NULL; /* half-duplex is detected automatically */
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigLengthCheck = MemacConfigLengthCheck;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigException = MemacConfigException;
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigResetOnInit = MemacConfigResetOnInit;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_SetException = MemacSetException;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_Enable1588TimeStamp = MemacEnable1588TimeStamp; /* always enabled */
-+ p_FmMacControllerDriver->f_FM_MAC_Disable1588TimeStamp = NULL;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_SetPromiscuous = MemacSetPromiscuous;
-+ p_FmMacControllerDriver->f_FM_MAC_AdjustLink = MemacAdjustLink;
-+ p_FmMacControllerDriver->f_FM_MAC_RestartAutoneg = NULL;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_Enable = MemacEnable;
-+ p_FmMacControllerDriver->f_FM_MAC_Disable = MemacDisable;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_SetTxAutoPauseFrames = MemacSetTxAutoPauseFrames;
-+ p_FmMacControllerDriver->f_FM_MAC_SetTxPauseFrames = MemacSetTxPauseFrames;
-+ p_FmMacControllerDriver->f_FM_MAC_SetRxIgnorePauseFrames = MemacSetRxIgnorePauseFrames;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_ResetCounters = MemacResetCounters;
-+ p_FmMacControllerDriver->f_FM_MAC_GetStatistics = MemacGetStatistics;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_ModifyMacAddr = MemacModifyMacAddress;
-+ p_FmMacControllerDriver->f_FM_MAC_AddHashMacAddr = MemacAddHashMacAddress;
-+ p_FmMacControllerDriver->f_FM_MAC_RemoveHashMacAddr = MemacDelHashMacAddress;
-+ p_FmMacControllerDriver->f_FM_MAC_AddExactMatchMacAddr = MemacAddExactMatchMacAddress;
-+ p_FmMacControllerDriver->f_FM_MAC_RemovelExactMatchMacAddr = MemacDelExactMatchMacAddress;
-+ p_FmMacControllerDriver->f_FM_MAC_GetId = NULL;
-+ p_FmMacControllerDriver->f_FM_MAC_GetVersion = NULL;
-+ p_FmMacControllerDriver->f_FM_MAC_GetMaxFrameLength = MemacGetMaxFrameLength;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_MII_WritePhyReg = MEMAC_MII_WritePhyReg;
-+ p_FmMacControllerDriver->f_FM_MAC_MII_ReadPhyReg = MEMAC_MII_ReadPhyReg;
-+
-+#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))
-+ p_FmMacControllerDriver->f_FM_MAC_DumpRegs = MemacDumpRegs;
-+#endif /* (defined(DEBUG_ERRORS) && ... */
-+}
-+
-+
-+/*****************************************************************************/
-+/* mEMAC Config Main Entry */
-+/*****************************************************************************/
-+
-+/* ......................................................................... */
-+
-+t_Handle MEMAC_Config(t_FmMacParams *p_FmMacParam)
-+{
-+ t_Memac *p_Memac;
-+ struct memac_cfg *p_MemacDriverParam;
-+ uintptr_t baseAddr;
-+
-+ SANITY_CHECK_RETURN_VALUE(p_FmMacParam, E_NULL_POINTER, NULL);
-+
-+ baseAddr = p_FmMacParam->baseAddr;
-+ /* Allocate memory for the mEMAC data structure */
-+ p_Memac = (t_Memac *)XX_Malloc(sizeof(t_Memac));
-+ if (!p_Memac)
-+ {
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("mEMAC driver structure"));
-+ return NULL;
-+ }
-+ memset(p_Memac, 0, sizeof(t_Memac));
-+ InitFmMacControllerDriver(&p_Memac->fmMacControllerDriver);
-+
-+ /* Allocate memory for the mEMAC driver parameters data structure */
-+ p_MemacDriverParam = (struct memac_cfg *) XX_Malloc(sizeof(struct memac_cfg));
-+ if (!p_MemacDriverParam)
-+ {
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("mEMAC driver parameters"));
-+ MemacFree(p_Memac);
-+ return NULL;
-+ }
-+ memset(p_MemacDriverParam, 0, sizeof(struct memac_cfg));
-+
-+ /* Plant parameter structure pointer */
-+ p_Memac->p_MemacDriverParam = p_MemacDriverParam;
-+
-+ memac_defconfig(p_MemacDriverParam);
-+
-+ p_Memac->addr = ENET_ADDR_TO_UINT64(p_FmMacParam->addr);
-+
-+ p_Memac->p_MemMap = (struct memac_regs *)UINT_TO_PTR(baseAddr);
-+ p_Memac->p_MiiMemMap = (t_MemacMiiAccessMemMap *)UINT_TO_PTR(baseAddr + MEMAC_TO_MII_OFFSET);
-+
-+ p_Memac->enetMode = p_FmMacParam->enetMode;
-+ p_Memac->macId = p_FmMacParam->macId;
-+ p_Memac->exceptions = MEMAC_default_exceptions;
-+ p_Memac->f_Exception = p_FmMacParam->f_Exception;
-+ p_Memac->f_Event = p_FmMacParam->f_Event;
-+ p_Memac->h_App = p_FmMacParam->h_App;
-+
-+ return p_Memac;
-+}
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/memac.h b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/memac.h
-new file mode 100644
-index 0000000..e1c4c53
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/memac.h
-@@ -0,0 +1,104 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+/******************************************************************************
-+ @File memac.h
-+
-+ @Description FM Multirate Ethernet MAC (mEMAC)
-+*//***************************************************************************/
-+#ifndef __MEMAC_H
-+#define __MEMAC_H
-+
-+#include "std_ext.h"
-+#include "error_ext.h"
-+#include "list_ext.h"
-+
-+#include "memac_mii_acc.h"
-+#include "fm_mac.h"
-+#include "fsl_fman_memac.h"
-+
-+
-+#define MEMAC_default_exceptions ((uint32_t)(MEMAC_IMASK_TECC_ER | MEMAC_IMASK_RECC_ER))
-+
-+#define GET_EXCEPTION_FLAG(bitMask, exception) switch (exception){ \
-+ case e_FM_MAC_EX_10G_1TX_ECC_ER: \
-+ bitMask = MEMAC_IMASK_TECC_ER; break; \
-+ case e_FM_MAC_EX_10G_RX_ECC_ER: \
-+ bitMask = MEMAC_IMASK_RECC_ER; break; \
-+ default: bitMask = 0;break;}
-+
-+
-+typedef struct
-+{
-+ t_FmMacControllerDriver fmMacControllerDriver; /**< Upper Mac control block */
-+ t_Handle h_App; /**< Handle to the upper layer application */
-+ struct memac_regs *p_MemMap; /**< Pointer to MAC memory mapped registers */
-+ t_MemacMiiAccessMemMap *p_MiiMemMap; /**< Pointer to MII memory mapped registers */
-+ uint64_t addr; /**< MAC address of device */
-+ e_EnetMode enetMode; /**< Ethernet physical interface */
-+ t_FmMacExceptionCallback *f_Exception;
-+ int mdioIrq;
-+ t_FmMacExceptionCallback *f_Event;
-+ bool indAddrRegUsed[MEMAC_NUM_OF_PADDRS]; /**< Whether a particular individual address recognition register is being used */
-+ uint64_t paddr[MEMAC_NUM_OF_PADDRS]; /**< MAC address for particular individual address recognition register */
-+ uint8_t numOfIndAddrInRegs; /**< Number of individual addresses in registers for this station. */
-+ t_EthHash *p_MulticastAddrHash; /**< Pointer to driver's global address hash table */
-+ t_EthHash *p_UnicastAddrHash; /**< Pointer to driver's individual address hash table */
-+ bool debugMode;
-+ uint8_t macId;
-+ uint32_t exceptions;
-+ struct memac_cfg *p_MemacDriverParam;
-+} t_Memac;
-+
-+
-+/* Internal PHY access */
-+#define PHY_MDIO_ADDR 0
-+
-+/* Internal PHY Registers - SGMII */
-+#define PHY_SGMII_CR_PHY_RESET 0x8000
-+#define PHY_SGMII_CR_RESET_AN 0x0200
-+#define PHY_SGMII_CR_DEF_VAL 0x1140
-+#define PHY_SGMII_DEV_ABILITY_SGMII 0x4001
-+#define PHY_SGMII_DEV_ABILITY_1000X 0x01A0
-+#define PHY_SGMII_IF_MODE_AN 0x0002
-+#define PHY_SGMII_IF_MODE_SGMII 0x0001
-+#define PHY_SGMII_IF_MODE_1000X 0x0000
-+
-+
-+#define MEMAC_TO_MII_OFFSET 0x030 /* Offset from the MEM map to the MDIO mem map */
-+
-+t_Error MEMAC_MII_WritePhyReg(t_Handle h_Memac, uint8_t phyAddr, uint8_t reg, uint16_t data);
-+t_Error MEMAC_MII_ReadPhyReg(t_Handle h_Memac, uint8_t phyAddr, uint8_t reg, uint16_t *p_Data);
-+
-+
-+#endif /* __MEMAC_H */
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/memac_mii_acc.c b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/memac_mii_acc.c
-new file mode 100644
-index 0000000..be5b867
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/memac_mii_acc.c
-@@ -0,0 +1,240 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+#include "error_ext.h"
-+#include "std_ext.h"
-+#include "fm_mac.h"
-+#include "memac.h"
-+#include "xx_ext.h"
-+
-+#include "fm_common.h"
-+
-+
-+static void WritePhyReg10G(t_MemacMiiAccessMemMap *p_MiiAccess,
-+ uint8_t phyAddr,
-+ uint8_t reg,
-+ uint16_t data)
-+{
-+ uint32_t tmpReg;
-+
-+ tmpReg = GET_UINT32(p_MiiAccess->mdio_cfg);
-+ /* Leave only MDIO_CLK_DIV bits set on */
-+ tmpReg &= MDIO_CFG_CLK_DIV_MASK;
-+ /* Set maximum MDIO_HOLD value to allow phy to see
-+ change of data signal */
-+ tmpReg |= MDIO_CFG_HOLD_MASK;
-+ /* Add 10G interface mode */
-+ tmpReg |= MDIO_CFG_ENC45;
-+ WRITE_UINT32(p_MiiAccess->mdio_cfg, tmpReg);
-+
-+ /* Wait for command completion */
-+ while ((GET_UINT32(p_MiiAccess->mdio_cfg)) & MDIO_CFG_BSY)
-+ XX_UDelay(1);
-+
-+ /* Specify phy and register to be accessed */
-+ WRITE_UINT32(p_MiiAccess->mdio_ctrl, phyAddr);
-+ WRITE_UINT32(p_MiiAccess->mdio_addr, reg);
-+ CORE_MemoryBarrier();
-+
-+ while ((GET_UINT32(p_MiiAccess->mdio_cfg)) & MDIO_CFG_BSY)
-+ XX_UDelay(1);
-+
-+ /* Write data */
-+ WRITE_UINT32(p_MiiAccess->mdio_data, data);
-+ CORE_MemoryBarrier();
-+
-+ /* Wait for write transaction end */
-+ while ((GET_UINT32(p_MiiAccess->mdio_data)) & MDIO_DATA_BSY)
-+ XX_UDelay(1);
-+}
-+
-+static uint32_t ReadPhyReg10G(t_MemacMiiAccessMemMap *p_MiiAccess,
-+ uint8_t phyAddr,
-+ uint8_t reg,
-+ uint16_t *p_Data)
-+{
-+ uint32_t tmpReg;
-+
-+ tmpReg = GET_UINT32(p_MiiAccess->mdio_cfg);
-+ /* Leave only MDIO_CLK_DIV bits set on */
-+ tmpReg &= MDIO_CFG_CLK_DIV_MASK;
-+ /* Set maximum MDIO_HOLD value to allow phy to see
-+ change of data signal */
-+ tmpReg |= MDIO_CFG_HOLD_MASK;
-+ /* Add 10G interface mode */
-+ tmpReg |= MDIO_CFG_ENC45;
-+ WRITE_UINT32(p_MiiAccess->mdio_cfg, tmpReg);
-+
-+ /* Wait for command completion */
-+ while ((GET_UINT32(p_MiiAccess->mdio_cfg)) & MDIO_CFG_BSY)
-+ XX_UDelay(1);
-+
-+ /* Specify phy and register to be accessed */
-+ WRITE_UINT32(p_MiiAccess->mdio_ctrl, phyAddr);
-+ WRITE_UINT32(p_MiiAccess->mdio_addr, reg);
-+ CORE_MemoryBarrier();
-+
-+ while ((GET_UINT32(p_MiiAccess->mdio_cfg)) & MDIO_CFG_BSY)
-+ XX_UDelay(1);
-+
-+ /* Read cycle */
-+ tmpReg = phyAddr;
-+ tmpReg |= MDIO_CTL_READ;
-+ WRITE_UINT32(p_MiiAccess->mdio_ctrl, tmpReg);
-+ CORE_MemoryBarrier();
-+
-+ /* Wait for data to be available */
-+ while ((GET_UINT32(p_MiiAccess->mdio_data)) & MDIO_DATA_BSY)
-+ XX_UDelay(1);
-+
-+ *p_Data = (uint16_t)GET_UINT32(p_MiiAccess->mdio_data);
-+
-+ /* Check if there was an error */
-+ return GET_UINT32(p_MiiAccess->mdio_cfg);
-+}
-+
-+static void WritePhyReg1G(t_MemacMiiAccessMemMap *p_MiiAccess,
-+ uint8_t phyAddr,
-+ uint8_t reg,
-+ uint16_t data)
-+{
-+ uint32_t tmpReg;
-+
-+ /* Leave only MDIO_CLK_DIV and MDIO_HOLD bits set on */
-+ tmpReg = GET_UINT32(p_MiiAccess->mdio_cfg);
-+ tmpReg &= (MDIO_CFG_CLK_DIV_MASK | MDIO_CFG_HOLD_MASK);
-+ WRITE_UINT32(p_MiiAccess->mdio_cfg, tmpReg);
-+
-+ /* Wait for command completion */
-+ while ((GET_UINT32(p_MiiAccess->mdio_cfg)) & MDIO_CFG_BSY)
-+ XX_UDelay(1);
-+
-+ /* Write transaction */
-+ tmpReg = (phyAddr << MDIO_CTL_PHY_ADDR_SHIFT);
-+ tmpReg |= reg;
-+ WRITE_UINT32(p_MiiAccess->mdio_ctrl, tmpReg);
-+
-+ while ((GET_UINT32(p_MiiAccess->mdio_cfg)) & MDIO_CFG_BSY)
-+ XX_UDelay(1);
-+
-+ WRITE_UINT32(p_MiiAccess->mdio_data, data);
-+
-+ CORE_MemoryBarrier();
-+
-+ /* Wait for write transaction to end */
-+ while ((GET_UINT32(p_MiiAccess->mdio_data)) & MDIO_DATA_BSY)
-+ XX_UDelay(1);
-+}
-+
-+static uint32_t ReadPhyReg1G(t_MemacMiiAccessMemMap *p_MiiAccess,
-+ uint8_t phyAddr,
-+ uint8_t reg,
-+ uint16_t *p_Data)
-+{
-+ uint32_t tmpReg;
-+
-+ /* Leave only MDIO_CLK_DIV and MDIO_HOLD bits set on */
-+ tmpReg = GET_UINT32(p_MiiAccess->mdio_cfg);
-+ tmpReg &= (MDIO_CFG_CLK_DIV_MASK | MDIO_CFG_HOLD_MASK);
-+ WRITE_UINT32(p_MiiAccess->mdio_cfg, tmpReg);
-+
-+ /* Wait for command completion */
-+ while ((GET_UINT32(p_MiiAccess->mdio_cfg)) & MDIO_CFG_BSY)
-+ XX_UDelay(1);
-+
-+ /* Read transaction */
-+ tmpReg = (phyAddr << MDIO_CTL_PHY_ADDR_SHIFT);
-+ tmpReg |= reg;
-+ tmpReg |= MDIO_CTL_READ;
-+ WRITE_UINT32(p_MiiAccess->mdio_ctrl, tmpReg);
-+
-+ while ((GET_UINT32(p_MiiAccess->mdio_cfg)) & MDIO_CFG_BSY)
-+ XX_UDelay(1);
-+
-+ /* Wait for data to be available */
-+ while ((GET_UINT32(p_MiiAccess->mdio_data)) & MDIO_DATA_BSY)
-+ XX_UDelay(1);
-+
-+ *p_Data = (uint16_t)GET_UINT32(p_MiiAccess->mdio_data);
-+
-+ /* Check error */
-+ return GET_UINT32(p_MiiAccess->mdio_cfg);
-+}
-+
-+/*****************************************************************************/
-+t_Error MEMAC_MII_WritePhyReg(t_Handle h_Memac,
-+ uint8_t phyAddr,
-+ uint8_t reg,
-+ uint16_t data)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Memac->p_MiiMemMap, E_INVALID_HANDLE);
-+
-+ /* Figure out interface type - 10G vs 1G.
-+ In 10G interface both phyAddr and devAddr present. */
-+ if (ENET_SPEED_FROM_MODE(p_Memac->enetMode) == e_ENET_SPEED_10000)
-+ WritePhyReg10G(p_Memac->p_MiiMemMap, phyAddr, reg, data);
-+ else
-+ WritePhyReg1G(p_Memac->p_MiiMemMap, phyAddr, reg, data);
-+
-+ return E_OK;
-+}
-+
-+/*****************************************************************************/
-+t_Error MEMAC_MII_ReadPhyReg(t_Handle h_Memac,
-+ uint8_t phyAddr,
-+ uint8_t reg,
-+ uint16_t *p_Data)
-+{
-+ t_Memac *p_Memac = (t_Memac *)h_Memac;
-+ uint32_t ans;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Memac->p_MiiMemMap, E_INVALID_HANDLE);
-+
-+ /* Figure out interface type - 10G vs 1G.
-+ In 10G interface both phyAddr and devAddr present. */
-+ if (ENET_SPEED_FROM_MODE(p_Memac->enetMode) == e_ENET_SPEED_10000)
-+ ans = ReadPhyReg10G(p_Memac->p_MiiMemMap, phyAddr, reg, p_Data);
-+ else
-+ ans = ReadPhyReg1G(p_Memac->p_MiiMemMap, phyAddr, reg, p_Data);
-+
-+ if (ans & MDIO_CFG_READ_ERR)
-+ RETURN_ERROR(MINOR, E_INVALID_VALUE,
-+ ("Read Error: phyAddr 0x%x, dev 0x%x, reg 0x%x, cfgReg 0x%x",
-+ ((phyAddr & 0xe0) >> 5), (phyAddr & 0x1f), reg, ans));
-+
-+ return E_OK;
-+}
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/memac_mii_acc.h b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/memac_mii_acc.h
-new file mode 100644
-index 0000000..dab4360
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/memac_mii_acc.h
-@@ -0,0 +1,73 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+#ifndef __MEMAC_MII_ACC_H
-+#define __MEMAC_MII_ACC_H
-+
-+#include "std_ext.h"
-+
-+
-+/* MII Management Registers */
-+#define MDIO_CFG_CLK_DIV_MASK 0x0000ff80
-+#define MDIO_CFG_CLK_DIV_SHIFT 7
-+#define MDIO_CFG_HOLD_MASK 0x0000001c
-+#define MDIO_CFG_ENC45 0x00000040
-+#define MDIO_CFG_READ_ERR 0x00000002
-+#define MDIO_CFG_BSY 0x00000001
-+
-+#define MDIO_CTL_PHY_ADDR_SHIFT 5
-+#define MDIO_CTL_READ 0x00008000
-+
-+#define MDIO_DATA_BSY 0x80000000
-+
-+#if defined(__MWERKS__) && !defined(__GNUC__)
-+#pragma pack(push,1)
-+#endif /* defined(__MWERKS__) && ... */
-+
-+/*----------------------------------------------------*/
-+/* MII Configuration Control Memory Map Registers */
-+/*----------------------------------------------------*/
-+typedef _Packed struct t_MemacMiiAccessMemMap
-+{
-+ volatile uint32_t mdio_cfg; /* 0x030 */
-+ volatile uint32_t mdio_ctrl; /* 0x034 */
-+ volatile uint32_t mdio_data; /* 0x038 */
-+ volatile uint32_t mdio_addr; /* 0x03c */
-+} _PackedType t_MemacMiiAccessMemMap ;
-+
-+#if defined(__MWERKS__) && !defined(__GNUC__)
-+#pragma pack(pop)
-+#endif /* defined(__MWERKS__) && ... */
-+
-+
-+#endif /* __MEMAC_MII_ACC_H */
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/tgec.c b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/tgec.c
-new file mode 100644
-index 0000000..522d64b
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/tgec.c
-@@ -0,0 +1,1018 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+/******************************************************************************
-+ @File tgec.c
-+
-+ @Description FM 10G MAC ...
-+*//***************************************************************************/
-+
-+#include "std_ext.h"
-+#include "string_ext.h"
-+#include "error_ext.h"
-+#include "xx_ext.h"
-+#include "endian_ext.h"
-+#include "debug_ext.h"
-+#include "crc_mac_addr_ext.h"
-+
-+#include "fm_common.h"
-+#include "fsl_fman_tgec.h"
-+#include "tgec.h"
-+
-+
-+/*****************************************************************************/
-+/* Internal routines */
-+/*****************************************************************************/
-+
-+static t_Error CheckInitParameters(t_Tgec *p_Tgec)
-+{
-+ if (ENET_SPEED_FROM_MODE(p_Tgec->enetMode) < e_ENET_SPEED_10000)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Ethernet 10G MAC driver only support 10G speed"));
-+#if (FM_MAX_NUM_OF_10G_MACS > 0)
-+ if (p_Tgec->macId >= FM_MAX_NUM_OF_10G_MACS)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("macId of 10G can not be greater than 0"));
-+#endif /* (FM_MAX_NUM_OF_10G_MACS > 0) */
-+
-+ if (p_Tgec->addr == 0)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Ethernet 10G MAC Must have a valid MAC Address"));
-+ if (!p_Tgec->f_Exception)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("uninitialized f_Exception"));
-+ if (!p_Tgec->f_Event)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("uninitialized f_Event"));
-+#ifdef FM_LEN_CHECK_ERRATA_FMAN_SW002
-+ if (!p_Tgec->p_TgecDriverParam->no_length_check_enable)
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, ("LengthCheck!"));
-+#endif /* FM_LEN_CHECK_ERRATA_FMAN_SW002 */
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static uint32_t GetMacAddrHashCode(uint64_t ethAddr)
-+{
-+ uint32_t crc;
-+
-+ /* CRC calculation */
-+ GET_MAC_ADDR_CRC(ethAddr, crc);
-+
-+ crc = GetMirror32(crc);
-+
-+ return crc;
-+}
-+
-+/* ......................................................................... */
-+
-+static void TgecErrException(t_Handle h_Tgec)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+ uint32_t event;
-+ struct tgec_regs *p_TgecMemMap = p_Tgec->p_MemMap;
-+
-+ /* do not handle MDIO events */
-+ event = tgec_get_event(p_TgecMemMap, ~(TGEC_IMASK_MDIO_SCAN_EVENT | TGEC_IMASK_MDIO_CMD_CMPL));
-+ event &= tgec_get_interrupt_mask(p_TgecMemMap);
-+
-+ tgec_ack_event(p_TgecMemMap, event);
-+
-+ if (event & TGEC_IMASK_REM_FAULT)
-+ p_Tgec->f_Exception(p_Tgec->h_App, e_FM_MAC_EX_10G_REM_FAULT);
-+ if (event & TGEC_IMASK_LOC_FAULT)
-+ p_Tgec->f_Exception(p_Tgec->h_App, e_FM_MAC_EX_10G_LOC_FAULT);
-+ if (event & TGEC_IMASK_TX_ECC_ER)
-+ p_Tgec->f_Exception(p_Tgec->h_App, e_FM_MAC_EX_10G_1TX_ECC_ER);
-+ if (event & TGEC_IMASK_TX_FIFO_UNFL)
-+ p_Tgec->f_Exception(p_Tgec->h_App, e_FM_MAC_EX_10G_TX_FIFO_UNFL);
-+ if (event & TGEC_IMASK_TX_FIFO_OVFL)
-+ p_Tgec->f_Exception(p_Tgec->h_App, e_FM_MAC_EX_10G_TX_FIFO_OVFL);
-+ if (event & TGEC_IMASK_TX_ER)
-+ p_Tgec->f_Exception(p_Tgec->h_App, e_FM_MAC_EX_10G_TX_ER);
-+ if (event & TGEC_IMASK_RX_FIFO_OVFL)
-+ p_Tgec->f_Exception(p_Tgec->h_App, e_FM_MAC_EX_10G_RX_FIFO_OVFL);
-+ if (event & TGEC_IMASK_RX_ECC_ER)
-+ p_Tgec->f_Exception(p_Tgec->h_App, e_FM_MAC_EX_10G_RX_ECC_ER);
-+ if (event & TGEC_IMASK_RX_JAB_FRM)
-+ p_Tgec->f_Exception(p_Tgec->h_App, e_FM_MAC_EX_10G_RX_JAB_FRM);
-+ if (event & TGEC_IMASK_RX_OVRSZ_FRM)
-+ p_Tgec->f_Exception(p_Tgec->h_App, e_FM_MAC_EX_10G_RX_OVRSZ_FRM);
-+ if (event & TGEC_IMASK_RX_RUNT_FRM)
-+ p_Tgec->f_Exception(p_Tgec->h_App, e_FM_MAC_EX_10G_RX_RUNT_FRM);
-+ if (event & TGEC_IMASK_RX_FRAG_FRM)
-+ p_Tgec->f_Exception(p_Tgec->h_App, e_FM_MAC_EX_10G_RX_FRAG_FRM);
-+ if (event & TGEC_IMASK_RX_LEN_ER)
-+ p_Tgec->f_Exception(p_Tgec->h_App, e_FM_MAC_EX_10G_RX_LEN_ER);
-+ if (event & TGEC_IMASK_RX_CRC_ER)
-+ p_Tgec->f_Exception(p_Tgec->h_App, e_FM_MAC_EX_10G_RX_CRC_ER);
-+ if (event & TGEC_IMASK_RX_ALIGN_ER)
-+ p_Tgec->f_Exception(p_Tgec->h_App, e_FM_MAC_EX_10G_RX_ALIGN_ER);
-+}
-+
-+/* ......................................................................... */
-+
-+static void TgecException(t_Handle h_Tgec)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+ uint32_t event;
-+ struct tgec_regs *p_TgecMemMap = p_Tgec->p_MemMap;
-+
-+ /* handle only MDIO events */
-+ event = tgec_get_event(p_TgecMemMap, (TGEC_IMASK_MDIO_SCAN_EVENT | TGEC_IMASK_MDIO_CMD_CMPL));
-+ event &= tgec_get_interrupt_mask(p_TgecMemMap);
-+
-+ tgec_ack_event(p_TgecMemMap, event);
-+
-+ if (event & TGEC_IMASK_MDIO_SCAN_EVENT)
-+ p_Tgec->f_Event(p_Tgec->h_App, e_FM_MAC_EX_10G_MDIO_SCAN_EVENTMDIO);
-+ if (event & TGEC_IMASK_MDIO_CMD_CMPL)
-+ p_Tgec->f_Event(p_Tgec->h_App, e_FM_MAC_EX_10G_MDIO_CMD_CMPL);
-+}
-+
-+/* ......................................................................... */
-+
-+static void FreeInitResources(t_Tgec *p_Tgec)
-+{
-+ if ((p_Tgec->mdioIrq != 0) && (p_Tgec->mdioIrq != NO_IRQ))
-+ {
-+ XX_DisableIntr(p_Tgec->mdioIrq);
-+ XX_FreeIntr(p_Tgec->mdioIrq);
-+ }
-+ else if (p_Tgec->mdioIrq == 0)
-+ REPORT_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+ FmUnregisterIntr(p_Tgec->fmMacControllerDriver.h_Fm, e_FM_MOD_10G_MAC, p_Tgec->macId, e_FM_INTR_TYPE_ERR);
-+
-+ /* release the driver's group hash table */
-+ FreeHashTable(p_Tgec->p_MulticastAddrHash);
-+ p_Tgec->p_MulticastAddrHash = NULL;
-+
-+ /* release the driver's individual hash table */
-+ FreeHashTable(p_Tgec->p_UnicastAddrHash);
-+ p_Tgec->p_UnicastAddrHash = NULL;
-+}
-+
-+
-+/*****************************************************************************/
-+/* 10G MAC API routines */
-+/*****************************************************************************/
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecEnable(t_Handle h_Tgec, e_CommMode mode)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ tgec_enable(p_Tgec->p_MemMap, (mode & e_COMM_MODE_RX), (mode & e_COMM_MODE_TX));
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecDisable (t_Handle h_Tgec, e_CommMode mode)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ tgec_disable(p_Tgec->p_MemMap, (mode & e_COMM_MODE_RX), (mode & e_COMM_MODE_TX));
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecSetPromiscuous(t_Handle h_Tgec, bool newVal)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ tgec_set_promiscuous(p_Tgec->p_MemMap, newVal);
-+
-+ return E_OK;
-+}
-+
-+
-+/*****************************************************************************/
-+/* Tgec Configs modification functions */
-+/*****************************************************************************/
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecConfigLoopback(t_Handle h_Tgec, bool newVal)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ p_Tgec->p_TgecDriverParam->loopback_enable = newVal;
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecConfigWan(t_Handle h_Tgec, bool newVal)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ p_Tgec->p_TgecDriverParam->wan_mode_enable = newVal;
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecConfigMaxFrameLength(t_Handle h_Tgec, uint16_t newVal)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ p_Tgec->p_TgecDriverParam->max_frame_length = newVal;
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecConfigLengthCheck(t_Handle h_Tgec, bool newVal)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ UNUSED(newVal);
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ p_Tgec->p_TgecDriverParam->no_length_check_enable = !newVal;
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecConfigException(t_Handle h_Tgec, e_FmMacExceptions exception, bool enable)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+ uint32_t bitMask = 0;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ GET_EXCEPTION_FLAG(bitMask, exception);
-+ if (bitMask)
-+ {
-+ if (enable)
-+ p_Tgec->exceptions |= bitMask;
-+ else
-+ p_Tgec->exceptions &= ~bitMask;
-+ }
-+ else
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Undefined exception"));
-+
-+ return E_OK;
-+}
-+
-+#ifdef FM_TX_ECC_FRMS_ERRATA_10GMAC_A004
-+/* ......................................................................... */
-+
-+static t_Error TgecConfigSkipFman11Workaround(t_Handle h_Tgec)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ p_Tgec->p_TgecDriverParam->skip_fman11_workaround = TRUE;
-+
-+ return E_OK;
-+}
-+#endif /* FM_TX_ECC_FRMS_ERRATA_10GMAC_A004 */
-+
-+
-+/*****************************************************************************/
-+/* Tgec Run Time API functions */
-+/*****************************************************************************/
-+
-+/* ......................................................................... */
-+/* backward compatibility. will be removed in the future. */
-+static t_Error TgecTxMacPause(t_Handle h_Tgec, uint16_t pauseTime)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+ tgec_tx_mac_pause(p_Tgec->p_MemMap, pauseTime);
-+
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecSetTxPauseFrames(t_Handle h_Tgec,
-+ uint8_t priority,
-+ uint16_t pauseTime,
-+ uint16_t threshTime)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ UNUSED(priority); UNUSED(threshTime);
-+
-+ tgec_tx_mac_pause(p_Tgec->p_MemMap, pauseTime);
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecRxIgnoreMacPause(t_Handle h_Tgec, bool en)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ tgec_rx_ignore_mac_pause(p_Tgec->p_MemMap, en);
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecGetStatistics(t_Handle h_Tgec, t_FmMacStatistics *p_Statistics)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+ struct tgec_regs *p_TgecMemMap;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR(p_Statistics, E_NULL_POINTER);
-+
-+ p_TgecMemMap = p_Tgec->p_MemMap;
-+
-+ p_Statistics->eStatPkts64 = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_R64);
-+ p_Statistics->eStatPkts65to127 = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_R127);
-+ p_Statistics->eStatPkts128to255 = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_R255);
-+ p_Statistics->eStatPkts256to511 = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_R511);
-+ p_Statistics->eStatPkts512to1023 = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_R1023);
-+ p_Statistics->eStatPkts1024to1518 = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_R1518);
-+ p_Statistics->eStatPkts1519to1522 = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_R1519X);
-+/* */
-+ p_Statistics->eStatFragments = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_TRFRG);
-+ p_Statistics->eStatJabbers = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_TRJBR);
-+
-+ p_Statistics->eStatsDropEvents = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_RDRP);
-+ p_Statistics->eStatCRCAlignErrors = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_RALN);
-+
-+ p_Statistics->eStatUndersizePkts = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_TRUND);
-+ p_Statistics->eStatOversizePkts = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_TROVR);
-+/* Pause */
-+ p_Statistics->reStatPause = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_RXPF);
-+ p_Statistics->teStatPause = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_TXPF);
-+
-+/* MIB II */
-+ p_Statistics->ifInOctets = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_ROCT);
-+ p_Statistics->ifInUcastPkts = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_RUCA);
-+ p_Statistics->ifInMcastPkts = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_RMCA);
-+ p_Statistics->ifInBcastPkts = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_RBCA);
-+ p_Statistics->ifInPkts = p_Statistics->ifInUcastPkts
-+ + p_Statistics->ifInMcastPkts
-+ + p_Statistics->ifInBcastPkts;
-+ p_Statistics->ifInDiscards = 0;
-+ p_Statistics->ifInErrors = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_RERR);
-+
-+ p_Statistics->ifOutOctets = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_TOCT);
-+ p_Statistics->ifOutUcastPkts = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_TUCA);
-+ p_Statistics->ifOutMcastPkts = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_TMCA);
-+ p_Statistics->ifOutBcastPkts = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_TBCA);
-+ p_Statistics->ifOutPkts = p_Statistics->ifOutUcastPkts
-+ + p_Statistics->ifOutMcastPkts
-+ + p_Statistics->ifOutBcastPkts;
-+ p_Statistics->ifOutDiscards = 0;
-+ p_Statistics->ifOutErrors = tgec_get_counter(p_TgecMemMap, E_TGEC_COUNTER_TERR);
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecEnable1588TimeStamp(t_Handle h_Tgec)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ tgec_enable_1588_time_stamp(p_Tgec->p_MemMap, 1);
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecDisable1588TimeStamp(t_Handle h_Tgec)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ tgec_enable_1588_time_stamp(p_Tgec->p_MemMap, 0);
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecModifyMacAddress (t_Handle h_Tgec, t_EnetAddr *p_EnetAddr)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ p_Tgec->addr = ENET_ADDR_TO_UINT64(*p_EnetAddr);
-+ tgec_set_mac_address(p_Tgec->p_MemMap, (uint8_t *)(*p_EnetAddr));
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecResetCounters (t_Handle h_Tgec)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ tgec_reset_stat(p_Tgec->p_MemMap);
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecAddExactMatchMacAddress(t_Handle h_Tgec, t_EnetAddr *p_EthAddr)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *) h_Tgec;
-+ uint64_t ethAddr;
-+ uint8_t paddrNum;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ ethAddr = ENET_ADDR_TO_UINT64(*p_EthAddr);
-+
-+ if (ethAddr & GROUP_ADDRESS)
-+ /* Multicast address has no effect in PADDR */
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Multicast address"));
-+
-+ /* Make sure no PADDR contains this address */
-+ for (paddrNum = 0; paddrNum < TGEC_NUM_OF_PADDRS; paddrNum++)
-+ if (p_Tgec->indAddrRegUsed[paddrNum])
-+ if (p_Tgec->paddr[paddrNum] == ethAddr)
-+ RETURN_ERROR(MAJOR, E_ALREADY_EXISTS, NO_MSG);
-+
-+ /* Find first unused PADDR */
-+ for (paddrNum = 0; paddrNum < TGEC_NUM_OF_PADDRS; paddrNum++)
-+ {
-+ if (!(p_Tgec->indAddrRegUsed[paddrNum]))
-+ {
-+ /* mark this PADDR as used */
-+ p_Tgec->indAddrRegUsed[paddrNum] = TRUE;
-+ /* store address */
-+ p_Tgec->paddr[paddrNum] = ethAddr;
-+
-+ /* put in hardware */
-+ tgec_add_addr_in_paddr(p_Tgec->p_MemMap, (uint8_t*)(*p_EthAddr)/* , paddrNum */);
-+ p_Tgec->numOfIndAddrInRegs++;
-+
-+ return E_OK;
-+ }
-+ }
-+
-+ /* No free PADDR */
-+ RETURN_ERROR(MAJOR, E_FULL, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecDelExactMatchMacAddress(t_Handle h_Tgec, t_EnetAddr *p_EthAddr)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *) h_Tgec;
-+ uint64_t ethAddr;
-+ uint8_t paddrNum;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ ethAddr = ENET_ADDR_TO_UINT64(*p_EthAddr);
-+
-+ /* Find used PADDR containing this address */
-+ for (paddrNum = 0; paddrNum < TGEC_NUM_OF_PADDRS; paddrNum++)
-+ {
-+ if ((p_Tgec->indAddrRegUsed[paddrNum]) &&
-+ (p_Tgec->paddr[paddrNum] == ethAddr))
-+ {
-+ /* mark this PADDR as not used */
-+ p_Tgec->indAddrRegUsed[paddrNum] = FALSE;
-+ /* clear in hardware */
-+ tgec_clear_addr_in_paddr(p_Tgec->p_MemMap /*, paddrNum */);
-+ p_Tgec->numOfIndAddrInRegs--;
-+
-+ return E_OK;
-+ }
-+ }
-+
-+ RETURN_ERROR(MAJOR, E_NOT_FOUND, NO_MSG);
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecAddHashMacAddress(t_Handle h_Tgec, t_EnetAddr *p_EthAddr)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+ t_EthHashEntry *p_HashEntry;
-+ uint32_t crc;
-+ uint32_t hash;
-+ uint64_t ethAddr;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ ethAddr = ENET_ADDR_TO_UINT64(*p_EthAddr);
-+
-+ if (!(ethAddr & GROUP_ADDRESS))
-+ /* Unicast addresses not supported in hash */
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("Unicast Address"));
-+
-+ /* CRC calculation */
-+ crc = GetMacAddrHashCode(ethAddr);
-+
-+ hash = (crc >> TGEC_HASH_MCAST_SHIFT) & TGEC_HASH_ADR_MSK; /* Take 9 MSB bits */
-+
-+ /* Create element to be added to the driver hash table */
-+ p_HashEntry = (t_EthHashEntry *)XX_Malloc(sizeof(t_EthHashEntry));
-+ p_HashEntry->addr = ethAddr;
-+ INIT_LIST(&p_HashEntry->node);
-+
-+ LIST_AddToTail(&(p_HashEntry->node), &(p_Tgec->p_MulticastAddrHash->p_Lsts[hash]));
-+ tgec_set_hash_table(p_Tgec->p_MemMap, (hash | TGEC_HASH_MCAST_EN));
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecDelHashMacAddress(t_Handle h_Tgec, t_EnetAddr *p_EthAddr)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+ t_EthHashEntry *p_HashEntry = NULL;
-+ t_List *p_Pos;
-+ uint32_t crc;
-+ uint32_t hash;
-+ uint64_t ethAddr;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ ethAddr = ((*(uint64_t *)p_EthAddr) >> 16);
-+
-+ /* CRC calculation */
-+ crc = GetMacAddrHashCode(ethAddr);
-+
-+ hash = (crc >> TGEC_HASH_MCAST_SHIFT) & TGEC_HASH_ADR_MSK; /* Take 9 MSB bits */
-+
-+ LIST_FOR_EACH(p_Pos, &(p_Tgec->p_MulticastAddrHash->p_Lsts[hash]))
-+ {
-+ p_HashEntry = ETH_HASH_ENTRY_OBJ(p_Pos);
-+ if (p_HashEntry->addr == ethAddr)
-+ {
-+ LIST_DelAndInit(&p_HashEntry->node);
-+ XX_Free(p_HashEntry);
-+ break;
-+ }
-+ }
-+ if (LIST_IsEmpty(&p_Tgec->p_MulticastAddrHash->p_Lsts[hash]))
-+ tgec_set_hash_table(p_Tgec->p_MemMap, (hash & ~TGEC_HASH_MCAST_EN));
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecGetId(t_Handle h_Tgec, uint32_t *macId)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ UNUSED(p_Tgec);
-+ UNUSED(macId);
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, ("TgecGetId Not Supported"));
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecGetVersion(t_Handle h_Tgec, uint32_t *macVersion)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ *macVersion = tgec_get_revision(p_Tgec->p_MemMap);
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecSetExcpetion(t_Handle h_Tgec, e_FmMacExceptions exception, bool enable)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+ uint32_t bitMask = 0;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+
-+ GET_EXCEPTION_FLAG(bitMask, exception);
-+ if (bitMask)
-+ {
-+ if (enable)
-+ p_Tgec->exceptions |= bitMask;
-+ else
-+ p_Tgec->exceptions &= ~bitMask;
-+ }
-+ else
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Undefined exception"));
-+
-+ if (enable)
-+ tgec_enable_interrupt(p_Tgec->p_MemMap, bitMask);
-+ else
-+ tgec_disable_interrupt(p_Tgec->p_MemMap, bitMask);
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static uint16_t TgecGetMaxFrameLength(t_Handle h_Tgec)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ SANITY_CHECK_RETURN_VALUE(p_Tgec, E_INVALID_HANDLE, 0);
-+ SANITY_CHECK_RETURN_VALUE(!p_Tgec->p_TgecDriverParam, E_INVALID_STATE, 0);
-+
-+ return tgec_get_max_frame_len(p_Tgec->p_MemMap);
-+}
-+
-+/* ......................................................................... */
-+
-+#ifdef FM_TX_ECC_FRMS_ERRATA_10GMAC_A004
-+static t_Error TgecTxEccWorkaround(t_Tgec *p_Tgec)
-+{
-+ t_Error err;
-+
-+#if defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0)
-+ XX_Print("Applying 10G TX ECC workaround (10GMAC-A004) ... ");
-+#endif /* (DEBUG_ERRORS > 0) */
-+ /* enable and set promiscuous */
-+ tgec_enable(p_Tgec->p_MemMap, TRUE, TRUE);
-+ tgec_set_promiscuous(p_Tgec->p_MemMap, TRUE);
-+ err = Fm10GTxEccWorkaround(p_Tgec->fmMacControllerDriver.h_Fm, p_Tgec->macId);
-+ /* disable */
-+ tgec_set_promiscuous(p_Tgec->p_MemMap, FALSE);
-+ tgec_enable(p_Tgec->p_MemMap, FALSE, FALSE);
-+#if defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0)
-+ if (err)
-+ XX_Print("FAILED!\n");
-+ else
-+ XX_Print("done.\n");
-+#endif /* (DEBUG_ERRORS > 0) */
-+ tgec_reset_stat(p_Tgec->p_MemMap);
-+
-+ return err;
-+}
-+#endif /* FM_TX_ECC_FRMS_ERRATA_10GMAC_A004 */
-+
-+/* ......................................................................... */
-+
-+#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))
-+static t_Error TgecDumpRegs(t_Handle h_Tgec)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ DECLARE_DUMP;
-+
-+ if (p_Tgec->p_MemMap)
-+ {
-+ DUMP_TITLE(p_Tgec->p_MemMap, ("10G MAC %d: ", p_Tgec->macId));
-+ DUMP_VAR(p_Tgec->p_MemMap, tgec_id);
-+ DUMP_VAR(p_Tgec->p_MemMap, command_config);
-+ DUMP_VAR(p_Tgec->p_MemMap, mac_addr_0);
-+ DUMP_VAR(p_Tgec->p_MemMap, mac_addr_1);
-+ DUMP_VAR(p_Tgec->p_MemMap, maxfrm);
-+ DUMP_VAR(p_Tgec->p_MemMap, pause_quant);
-+ DUMP_VAR(p_Tgec->p_MemMap, rx_fifo_sections);
-+ DUMP_VAR(p_Tgec->p_MemMap, tx_fifo_sections);
-+ DUMP_VAR(p_Tgec->p_MemMap, rx_fifo_almost_f_e);
-+ DUMP_VAR(p_Tgec->p_MemMap, tx_fifo_almost_f_e);
-+ DUMP_VAR(p_Tgec->p_MemMap, hashtable_ctrl);
-+ DUMP_VAR(p_Tgec->p_MemMap, mdio_cfg_status);
-+ DUMP_VAR(p_Tgec->p_MemMap, mdio_command);
-+ DUMP_VAR(p_Tgec->p_MemMap, mdio_data);
-+ DUMP_VAR(p_Tgec->p_MemMap, mdio_regaddr);
-+ DUMP_VAR(p_Tgec->p_MemMap, status);
-+ DUMP_VAR(p_Tgec->p_MemMap, tx_ipg_len);
-+ DUMP_VAR(p_Tgec->p_MemMap, mac_addr_2);
-+ DUMP_VAR(p_Tgec->p_MemMap, mac_addr_3);
-+ DUMP_VAR(p_Tgec->p_MemMap, rx_fifo_ptr_rd);
-+ DUMP_VAR(p_Tgec->p_MemMap, rx_fifo_ptr_wr);
-+ DUMP_VAR(p_Tgec->p_MemMap, tx_fifo_ptr_rd);
-+ DUMP_VAR(p_Tgec->p_MemMap, tx_fifo_ptr_wr);
-+ DUMP_VAR(p_Tgec->p_MemMap, imask);
-+ DUMP_VAR(p_Tgec->p_MemMap, ievent);
-+ }
-+
-+ return E_OK;
-+}
-+#endif /* (defined(DEBUG_ERRORS) && ... */
-+
-+
-+/*****************************************************************************/
-+/* FM Init & Free API */
-+/*****************************************************************************/
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecInit(t_Handle h_Tgec)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+ struct tgec_cfg *p_TgecDriverParam;
-+ t_EnetAddr ethAddr;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec->p_TgecDriverParam, E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec->fmMacControllerDriver.h_Fm, E_INVALID_HANDLE);
-+
-+ FM_GetRevision(p_Tgec->fmMacControllerDriver.h_Fm, &p_Tgec->fmMacControllerDriver.fmRevInfo);
-+ CHECK_INIT_PARAMETERS(p_Tgec, CheckInitParameters);
-+
-+ p_TgecDriverParam = p_Tgec->p_TgecDriverParam;
-+
-+ MAKE_ENET_ADDR_FROM_UINT64(p_Tgec->addr, ethAddr);
-+ tgec_set_mac_address(p_Tgec->p_MemMap, (uint8_t *)ethAddr);
-+
-+ /* interrupts */
-+#ifdef FM_10G_REM_N_LCL_FLT_EX_10GMAC_ERRATA_SW005
-+ {
-+ if (p_Tgec->fmMacControllerDriver.fmRevInfo.majorRev <=2)
-+ p_Tgec->exceptions &= ~(TGEC_IMASK_REM_FAULT | TGEC_IMASK_LOC_FAULT);
-+ }
-+#endif /* FM_10G_REM_N_LCL_FLT_EX_10GMAC_ERRATA_SW005 */
-+
-+#ifdef FM_TX_ECC_FRMS_ERRATA_10GMAC_A004
-+ if (p_Tgec->fmMacControllerDriver.fmRevInfo.majorRev <= 6 /*fixed for rev3 */)
-+ {
-+ if (!p_Tgec->p_TgecDriverParam->skip_fman11_workaround &&
-+ ((err = TgecTxEccWorkaround(p_Tgec)) != E_OK))
-+ {
-+ FreeInitResources(p_Tgec);
-+ REPORT_ERROR(MINOR, err, ("TgecTxEccWorkaround FAILED"));
-+ }
-+ }
-+#endif /* FM_TX_ECC_FRMS_ERRATA_10GMAC_A004 */
-+
-+ err = tgec_init(p_Tgec->p_MemMap, p_TgecDriverParam, p_Tgec->exceptions);
-+ if (err)
-+ {
-+ FreeInitResources(p_Tgec);
-+ RETURN_ERROR(MAJOR, err, ("This TGEC version does not support the required i/f mode"));
-+ }
-+
-+ /* Max Frame Length */
-+ err = FmSetMacMaxFrame(p_Tgec->fmMacControllerDriver.h_Fm,
-+ e_FM_MAC_10G,
-+ p_Tgec->fmMacControllerDriver.macId,
-+ p_TgecDriverParam->max_frame_length);
-+ /* we consider having no IPC a non crasher... */
-+
-+#ifdef FM_TX_FIFO_CORRUPTION_ERRATA_10GMAC_A007
-+ if (p_Tgec->fmMacControllerDriver.fmRevInfo.majorRev == 2)
-+ tgec_fm_tx_fifo_corruption_errata_10gmac_a007(p_Tgec->p_MemMap);
-+#endif /* FM_TX_FIFO_CORRUPTION_ERRATA_10GMAC_A007 */
-+
-+ p_Tgec->p_MulticastAddrHash = AllocHashTable(HASH_TABLE_SIZE);
-+ if (!p_Tgec->p_MulticastAddrHash)
-+ {
-+ FreeInitResources(p_Tgec);
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("allocation hash table is FAILED"));
-+ }
-+
-+ p_Tgec->p_UnicastAddrHash = AllocHashTable(HASH_TABLE_SIZE);
-+ if (!p_Tgec->p_UnicastAddrHash)
-+ {
-+ FreeInitResources(p_Tgec);
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("allocation hash table is FAILED"));
-+ }
-+
-+ FmRegisterIntr(p_Tgec->fmMacControllerDriver.h_Fm,
-+ e_FM_MOD_10G_MAC,
-+ p_Tgec->macId,
-+ e_FM_INTR_TYPE_ERR,
-+ TgecErrException,
-+ p_Tgec);
-+ if ((p_Tgec->mdioIrq != 0) && (p_Tgec->mdioIrq != NO_IRQ))
-+ {
-+ XX_SetIntr(p_Tgec->mdioIrq, TgecException, p_Tgec);
-+ XX_EnableIntr(p_Tgec->mdioIrq);
-+ }
-+ else if (p_Tgec->mdioIrq == 0)
-+ REPORT_ERROR(MINOR, E_NOT_SUPPORTED, (NO_MSG));
-+
-+ XX_Free(p_TgecDriverParam);
-+ p_Tgec->p_TgecDriverParam = NULL;
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static t_Error TgecFree(t_Handle h_Tgec)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+
-+ FreeInitResources(p_Tgec);
-+
-+ if (p_Tgec->p_TgecDriverParam)
-+ {
-+ XX_Free(p_Tgec->p_TgecDriverParam);
-+ p_Tgec->p_TgecDriverParam = NULL;
-+ }
-+ XX_Free (p_Tgec);
-+
-+ return E_OK;
-+}
-+
-+/* ......................................................................... */
-+
-+static void InitFmMacControllerDriver(t_FmMacControllerDriver *p_FmMacControllerDriver)
-+{
-+ p_FmMacControllerDriver->f_FM_MAC_Init = TgecInit;
-+ p_FmMacControllerDriver->f_FM_MAC_Free = TgecFree;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_SetStatistics = NULL;
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigLoopback = TgecConfigLoopback;
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigMaxFrameLength = TgecConfigMaxFrameLength;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigWan = TgecConfigWan;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigPadAndCrc = NULL; /* TGEC always works with pad+crc */
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigHalfDuplex = NULL; /* half-duplex is not supported in xgec */
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigLengthCheck = TgecConfigLengthCheck;
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigException = TgecConfigException;
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigResetOnInit = NULL;
-+
-+#ifdef FM_TX_ECC_FRMS_ERRATA_10GMAC_A004
-+ p_FmMacControllerDriver->f_FM_MAC_ConfigSkipFman11Workaround= TgecConfigSkipFman11Workaround;
-+#endif /* FM_TX_ECC_FRMS_ERRATA_10GMAC_A004 */
-+
-+ p_FmMacControllerDriver->f_FM_MAC_SetException = TgecSetExcpetion;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_Enable1588TimeStamp = TgecEnable1588TimeStamp;
-+ p_FmMacControllerDriver->f_FM_MAC_Disable1588TimeStamp = TgecDisable1588TimeStamp;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_SetPromiscuous = TgecSetPromiscuous;
-+ p_FmMacControllerDriver->f_FM_MAC_AdjustLink = NULL;
-+ p_FmMacControllerDriver->f_FM_MAC_RestartAutoneg = NULL;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_Enable = TgecEnable;
-+ p_FmMacControllerDriver->f_FM_MAC_Disable = TgecDisable;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_SetTxAutoPauseFrames = TgecTxMacPause;
-+ p_FmMacControllerDriver->f_FM_MAC_SetTxPauseFrames = TgecSetTxPauseFrames;
-+ p_FmMacControllerDriver->f_FM_MAC_SetRxIgnorePauseFrames = TgecRxIgnoreMacPause;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_ResetCounters = TgecResetCounters;
-+ p_FmMacControllerDriver->f_FM_MAC_GetStatistics = TgecGetStatistics;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_ModifyMacAddr = TgecModifyMacAddress;
-+ p_FmMacControllerDriver->f_FM_MAC_AddHashMacAddr = TgecAddHashMacAddress;
-+ p_FmMacControllerDriver->f_FM_MAC_RemoveHashMacAddr = TgecDelHashMacAddress;
-+ p_FmMacControllerDriver->f_FM_MAC_AddExactMatchMacAddr = TgecAddExactMatchMacAddress;
-+ p_FmMacControllerDriver->f_FM_MAC_RemovelExactMatchMacAddr = TgecDelExactMatchMacAddress;
-+ p_FmMacControllerDriver->f_FM_MAC_GetId = TgecGetId;
-+ p_FmMacControllerDriver->f_FM_MAC_GetVersion = TgecGetVersion;
-+ p_FmMacControllerDriver->f_FM_MAC_GetMaxFrameLength = TgecGetMaxFrameLength;
-+
-+ p_FmMacControllerDriver->f_FM_MAC_MII_WritePhyReg = TGEC_MII_WritePhyReg;
-+ p_FmMacControllerDriver->f_FM_MAC_MII_ReadPhyReg = TGEC_MII_ReadPhyReg;
-+
-+#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))
-+ p_FmMacControllerDriver->f_FM_MAC_DumpRegs = TgecDumpRegs;
-+#endif /* (defined(DEBUG_ERRORS) && ... */
-+}
-+
-+
-+/*****************************************************************************/
-+/* Tgec Config Main Entry */
-+/*****************************************************************************/
-+
-+/* ......................................................................... */
-+
-+t_Handle TGEC_Config(t_FmMacParams *p_FmMacParam)
-+{
-+ t_Tgec *p_Tgec;
-+ struct tgec_cfg *p_TgecDriverParam;
-+ uintptr_t baseAddr;
-+
-+ SANITY_CHECK_RETURN_VALUE(p_FmMacParam, E_NULL_POINTER, NULL);
-+
-+ baseAddr = p_FmMacParam->baseAddr;
-+ /* allocate memory for the UCC GETH data structure. */
-+ p_Tgec = (t_Tgec *)XX_Malloc(sizeof(t_Tgec));
-+ if (!p_Tgec)
-+ {
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("10G MAC driver structure"));
-+ return NULL;
-+ }
-+ memset(p_Tgec, 0, sizeof(t_Tgec));
-+ InitFmMacControllerDriver(&p_Tgec->fmMacControllerDriver);
-+
-+ /* allocate memory for the 10G MAC driver parameters data structure. */
-+ p_TgecDriverParam = (struct tgec_cfg *) XX_Malloc(sizeof(struct tgec_cfg));
-+ if (!p_TgecDriverParam)
-+ {
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("10G MAC driver parameters"));
-+ TgecFree(p_Tgec);
-+ return NULL;
-+ }
-+ memset(p_TgecDriverParam, 0, sizeof(struct tgec_cfg));
-+
-+ /* Plant parameter structure pointer */
-+ p_Tgec->p_TgecDriverParam = p_TgecDriverParam;
-+
-+ tgec_defconfig(p_TgecDriverParam);
-+
-+ p_Tgec->p_MemMap = (struct tgec_regs *)UINT_TO_PTR(baseAddr);
-+ p_Tgec->p_MiiMemMap = (t_TgecMiiAccessMemMap *)UINT_TO_PTR(baseAddr + TGEC_TO_MII_OFFSET);
-+ p_Tgec->addr = ENET_ADDR_TO_UINT64(p_FmMacParam->addr);
-+ p_Tgec->enetMode = p_FmMacParam->enetMode;
-+ p_Tgec->macId = p_FmMacParam->macId;
-+ p_Tgec->exceptions = DEFAULT_exceptions;
-+ p_Tgec->mdioIrq = p_FmMacParam->mdioIrq;
-+ p_Tgec->f_Exception = p_FmMacParam->f_Exception;
-+ p_Tgec->f_Event = p_FmMacParam->f_Event;
-+ p_Tgec->h_App = p_FmMacParam->h_App;
-+
-+ return p_Tgec;
-+}
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/tgec.h b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/tgec.h
-new file mode 100644
-index 0000000..2aa3923
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/tgec.h
-@@ -0,0 +1,151 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+/******************************************************************************
-+ @File tgec.h
-+
-+ @Description FM 10G MAC ...
-+*//***************************************************************************/
-+#ifndef __TGEC_H
-+#define __TGEC_H
-+
-+#include "std_ext.h"
-+#include "error_ext.h"
-+#include "list_ext.h"
-+#include "enet_ext.h"
-+
-+#include "tgec_mii_acc.h"
-+#include "fm_mac.h"
-+
-+
-+#define DEFAULT_exceptions \
-+ ((uint32_t)(TGEC_IMASK_MDIO_SCAN_EVENT | \
-+ TGEC_IMASK_REM_FAULT | \
-+ TGEC_IMASK_LOC_FAULT | \
-+ TGEC_IMASK_TX_ECC_ER | \
-+ TGEC_IMASK_TX_FIFO_UNFL | \
-+ TGEC_IMASK_TX_FIFO_OVFL | \
-+ TGEC_IMASK_TX_ER | \
-+ TGEC_IMASK_RX_FIFO_OVFL | \
-+ TGEC_IMASK_RX_ECC_ER | \
-+ TGEC_IMASK_RX_JAB_FRM | \
-+ TGEC_IMASK_RX_OVRSZ_FRM | \
-+ TGEC_IMASK_RX_RUNT_FRM | \
-+ TGEC_IMASK_RX_FRAG_FRM | \
-+ TGEC_IMASK_RX_CRC_ER | \
-+ TGEC_IMASK_RX_ALIGN_ER))
-+
-+#define GET_EXCEPTION_FLAG(bitMask, exception) switch (exception){ \
-+ case e_FM_MAC_EX_10G_MDIO_SCAN_EVENTMDIO: \
-+ bitMask = TGEC_IMASK_MDIO_SCAN_EVENT ; break; \
-+ case e_FM_MAC_EX_10G_MDIO_CMD_CMPL: \
-+ bitMask = TGEC_IMASK_MDIO_CMD_CMPL ; break; \
-+ case e_FM_MAC_EX_10G_REM_FAULT: \
-+ bitMask = TGEC_IMASK_REM_FAULT ; break; \
-+ case e_FM_MAC_EX_10G_LOC_FAULT: \
-+ bitMask = TGEC_IMASK_LOC_FAULT ; break; \
-+ case e_FM_MAC_EX_10G_1TX_ECC_ER: \
-+ bitMask = TGEC_IMASK_TX_ECC_ER ; break; \
-+ case e_FM_MAC_EX_10G_TX_FIFO_UNFL: \
-+ bitMask = TGEC_IMASK_TX_FIFO_UNFL ; break; \
-+ case e_FM_MAC_EX_10G_TX_FIFO_OVFL: \
-+ bitMask = TGEC_IMASK_TX_FIFO_OVFL ; break; \
-+ case e_FM_MAC_EX_10G_TX_ER: \
-+ bitMask = TGEC_IMASK_TX_ER ; break; \
-+ case e_FM_MAC_EX_10G_RX_FIFO_OVFL: \
-+ bitMask = TGEC_IMASK_RX_FIFO_OVFL ; break; \
-+ case e_FM_MAC_EX_10G_RX_ECC_ER: \
-+ bitMask = TGEC_IMASK_RX_ECC_ER ; break; \
-+ case e_FM_MAC_EX_10G_RX_JAB_FRM: \
-+ bitMask = TGEC_IMASK_RX_JAB_FRM ; break; \
-+ case e_FM_MAC_EX_10G_RX_OVRSZ_FRM: \
-+ bitMask = TGEC_IMASK_RX_OVRSZ_FRM ; break; \
-+ case e_FM_MAC_EX_10G_RX_RUNT_FRM: \
-+ bitMask = TGEC_IMASK_RX_RUNT_FRM ; break; \
-+ case e_FM_MAC_EX_10G_RX_FRAG_FRM: \
-+ bitMask = TGEC_IMASK_RX_FRAG_FRM ; break; \
-+ case e_FM_MAC_EX_10G_RX_LEN_ER: \
-+ bitMask = TGEC_IMASK_RX_LEN_ER ; break; \
-+ case e_FM_MAC_EX_10G_RX_CRC_ER: \
-+ bitMask = TGEC_IMASK_RX_CRC_ER ; break; \
-+ case e_FM_MAC_EX_10G_RX_ALIGN_ER: \
-+ bitMask = TGEC_IMASK_RX_ALIGN_ER ; break; \
-+ default: bitMask = 0;break;}
-+
-+#define MAX_PACKET_ALIGNMENT 31
-+#define MAX_INTER_PACKET_GAP 0x7f
-+#define MAX_INTER_PALTERNATE_BEB 0x0f
-+#define MAX_RETRANSMISSION 0x0f
-+#define MAX_COLLISION_WINDOW 0x03ff
-+
-+#define TGEC_NUM_OF_PADDRS 1 /* number of pattern match registers (entries) */
-+
-+#define GROUP_ADDRESS 0x0000010000000000LL /* Group address bit indication */
-+
-+#define HASH_TABLE_SIZE 512 /* Hash table size (= 32 bits * 8 regs) */
-+
-+#define TGEC_TO_MII_OFFSET 0x1030 /* Offset from the MEM map to the MDIO mem map */
-+
-+/* 10-gigabit Ethernet MAC Controller ID (10GEC_ID) */
-+#define TGEC_ID_ID 0xffff0000
-+#define TGEC_ID_MAC_VERSION 0x0000FF00
-+#define TGEC_ID_MAC_REV 0x000000ff
-+
-+
-+typedef struct {
-+ t_FmMacControllerDriver fmMacControllerDriver; /**< Upper Mac control block */
-+ t_Handle h_App; /**< Handle to the upper layer application */
-+ struct tgec_regs *p_MemMap; /**< pointer to 10G memory mapped registers. */
-+ t_TgecMiiAccessMemMap *p_MiiMemMap; /**< pointer to MII memory mapped registers. */
-+ uint64_t addr; /**< MAC address of device; */
-+ e_EnetMode enetMode; /**< Ethernet physical interface */
-+ t_FmMacExceptionCallback *f_Exception;
-+ int mdioIrq;
-+ t_FmMacExceptionCallback *f_Event;
-+ bool indAddrRegUsed[TGEC_NUM_OF_PADDRS]; /**< Whether a particular individual address recognition register is being used */
-+ uint64_t paddr[TGEC_NUM_OF_PADDRS]; /**< MAC address for particular individual address recognition register */
-+ uint8_t numOfIndAddrInRegs; /**< Number of individual addresses in registers for this station. */
-+ t_EthHash *p_MulticastAddrHash; /**< pointer to driver's global address hash table */
-+ t_EthHash *p_UnicastAddrHash; /**< pointer to driver's individual address hash table */
-+ bool debugMode;
-+ uint8_t macId;
-+ uint32_t exceptions;
-+ struct tgec_cfg *p_TgecDriverParam;
-+} t_Tgec;
-+
-+
-+t_Error TGEC_MII_WritePhyReg(t_Handle h_Tgec, uint8_t phyAddr, uint8_t reg, uint16_t data);
-+t_Error TGEC_MII_ReadPhyReg(t_Handle h_Tgec, uint8_t phyAddr, uint8_t reg, uint16_t *p_Data);
-+
-+
-+#endif /* __TGEC_H */
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/tgec_mii_acc.c b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/tgec_mii_acc.c
-new file mode 100644
-index 0000000..e0fafd1
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/tgec_mii_acc.c
-@@ -0,0 +1,139 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+
-+#include "error_ext.h"
-+#include "std_ext.h"
-+#include "fm_mac.h"
-+#include "tgec.h"
-+#include "xx_ext.h"
-+
-+#include "fm_common.h"
-+
-+
-+/*****************************************************************************/
-+t_Error TGEC_MII_WritePhyReg(t_Handle h_Tgec,
-+ uint8_t phyAddr,
-+ uint8_t reg,
-+ uint16_t data)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+ t_TgecMiiAccessMemMap *p_MiiAccess;
-+ uint32_t cfgStatusReg;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec->p_MiiMemMap, E_INVALID_HANDLE);
-+
-+ p_MiiAccess = p_Tgec->p_MiiMemMap;
-+
-+ /* Configure MII */
-+ cfgStatusReg = GET_UINT32(p_MiiAccess->mdio_cfg_status);
-+ cfgStatusReg &= ~MIIMCOM_DIV_MASK;
-+ /* (one half of fm clock => 2.5Mhz) */
-+ cfgStatusReg |=((((p_Tgec->fmMacControllerDriver.clkFreq*10)/2)/25) << MIIMCOM_DIV_SHIFT);
-+ WRITE_UINT32(p_MiiAccess->mdio_cfg_status, cfgStatusReg);
-+
-+ while ((GET_UINT32(p_MiiAccess->mdio_cfg_status)) & MIIMIND_BUSY)
-+ XX_UDelay (1);
-+
-+ WRITE_UINT32(p_MiiAccess->mdio_command, phyAddr);
-+
-+ WRITE_UINT32(p_MiiAccess->mdio_regaddr, reg);
-+
-+ CORE_MemoryBarrier();
-+
-+ while ((GET_UINT32(p_MiiAccess->mdio_cfg_status)) & MIIMIND_BUSY)
-+ XX_UDelay (1);
-+
-+ WRITE_UINT32(p_MiiAccess->mdio_data, data);
-+
-+ CORE_MemoryBarrier();
-+
-+ while ((GET_UINT32(p_MiiAccess->mdio_data)) & MIIDATA_BUSY)
-+ XX_UDelay (1);
-+
-+ return E_OK;
-+}
-+
-+/*****************************************************************************/
-+t_Error TGEC_MII_ReadPhyReg(t_Handle h_Tgec,
-+ uint8_t phyAddr,
-+ uint8_t reg,
-+ uint16_t *p_Data)
-+{
-+ t_Tgec *p_Tgec = (t_Tgec *)h_Tgec;
-+ t_TgecMiiAccessMemMap *p_MiiAccess;
-+ uint32_t cfgStatusReg;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Tgec->p_MiiMemMap, E_INVALID_HANDLE);
-+
-+ p_MiiAccess = p_Tgec->p_MiiMemMap;
-+
-+ /* Configure MII */
-+ cfgStatusReg = GET_UINT32(p_MiiAccess->mdio_cfg_status);
-+ cfgStatusReg &= ~MIIMCOM_DIV_MASK;
-+ /* (one half of fm clock => 2.5Mhz) */
-+ cfgStatusReg |=((((p_Tgec->fmMacControllerDriver.clkFreq*10)/2)/25) << MIIMCOM_DIV_SHIFT);
-+ WRITE_UINT32(p_MiiAccess->mdio_cfg_status, cfgStatusReg);
-+
-+ while ((GET_UINT32(p_MiiAccess->mdio_cfg_status)) & MIIMIND_BUSY)
-+ XX_UDelay (1);
-+
-+ WRITE_UINT32(p_MiiAccess->mdio_command, phyAddr);
-+
-+ WRITE_UINT32(p_MiiAccess->mdio_regaddr, reg);
-+
-+ CORE_MemoryBarrier();
-+
-+ while ((GET_UINT32(p_MiiAccess->mdio_cfg_status)) & MIIMIND_BUSY)
-+ XX_UDelay (1);
-+
-+ WRITE_UINT32(p_MiiAccess->mdio_command, (uint32_t)(phyAddr | MIIMCOM_READ_CYCLE));
-+
-+ CORE_MemoryBarrier();
-+
-+ while ((GET_UINT32(p_MiiAccess->mdio_data)) & MIIDATA_BUSY)
-+ XX_UDelay (1);
-+
-+ *p_Data = (uint16_t)GET_UINT32(p_MiiAccess->mdio_data);
-+
-+ cfgStatusReg = GET_UINT32(p_MiiAccess->mdio_cfg_status);
-+
-+ if (cfgStatusReg & MIIMIND_READ_ERROR)
-+ RETURN_ERROR(MINOR, E_INVALID_VALUE,
-+ ("Read Error: phyAddr 0x%x, dev 0x%x, reg 0x%x, cfgStatusReg 0x%x",
-+ ((phyAddr & 0xe0)>>5), (phyAddr & 0x1f), reg, cfgStatusReg));
-+
-+ return E_OK;
-+}
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/tgec_mii_acc.h b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/tgec_mii_acc.h
-new file mode 100644
-index 0000000..645cdde
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/MAC/tgec_mii_acc.h
-@@ -0,0 +1,80 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+#ifndef __TGEC_MII_ACC_H
-+#define __TGEC_MII_ACC_H
-+
-+#include "std_ext.h"
-+
-+
-+/* MII Management Command Register */
-+#define MIIMCOM_READ_POST_INCREMENT 0x00004000
-+#define MIIMCOM_READ_CYCLE 0x00008000
-+#define MIIMCOM_SCAN_CYCLE 0x00000800
-+#define MIIMCOM_PREAMBLE_DISABLE 0x00000400
-+
-+#define MIIMCOM_MDIO_HOLD_1_REG_CLK 0
-+#define MIIMCOM_MDIO_HOLD_2_REG_CLK 1
-+#define MIIMCOM_MDIO_HOLD_3_REG_CLK 2
-+#define MIIMCOM_MDIO_HOLD_4_REG_CLK 3
-+
-+#define MIIMCOM_DIV_MASK 0x0000ff00
-+#define MIIMCOM_DIV_SHIFT 8
-+
-+/* MII Management Indicator Register */
-+#define MIIMIND_BUSY 0x00000001
-+#define MIIMIND_READ_ERROR 0x00000002
-+
-+#define MIIDATA_BUSY 0x80000000
-+
-+#if defined(__MWERKS__) && !defined(__GNUC__)
-+#pragma pack(push,1)
-+#endif /* defined(__MWERKS__) && ... */
-+
-+/*----------------------------------------------------*/
-+/* MII Configuration Control Memory Map Registers */
-+/*----------------------------------------------------*/
-+typedef _Packed struct t_TgecMiiAccessMemMap
-+{
-+ volatile uint32_t mdio_cfg_status; /* 0x030 */
-+ volatile uint32_t mdio_command; /* 0x034 */
-+ volatile uint32_t mdio_data; /* 0x038 */
-+ volatile uint32_t mdio_regaddr; /* 0x03c */
-+} _PackedType t_TgecMiiAccessMemMap ;
-+
-+#if defined(__MWERKS__) && !defined(__GNUC__)
-+#pragma pack(pop)
-+#endif /* defined(__MWERKS__) && ... */
-+
-+
-+#endif /* __TGEC_MII_ACC_H */
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/Makefile b/drivers/net/dpa/NetCommSw/Peripherals/FM/Makefile
-new file mode 100644
-index 0000000..67d6e21
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/Makefile
-@@ -0,0 +1,22 @@
-+#
-+# Makefile for the Freescale Ethernet controllers
-+#
-+EXTRA_CFLAGS += -DVERSION=\"\"
-+#
-+#Include netcomm SW specific definitions
-+include $(srctree)/drivers/net/dpa/NetCommSw/ncsw_config.mk
-+NCSW_FM_INC = $(srctree)/drivers/net/dpa/NetCommSw/Peripherals/FM/inc
-+
-+EXTRA_CFLAGS += -I$(NCSW_FM_INC)
-+
-+
-+obj-y += fsl-ncsw-PFM1.o
-+
-+fsl-ncsw-PFM1-objs := fm.o fm_muram.o
-+
-+obj-y += MAC/
-+obj-y += Pcd/
-+obj-y += SP/
-+obj-y += Port/
-+obj-y += HC/
-+obj-y += Rtc/
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/Makefile b/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/Makefile
-new file mode 100644
-index 0000000..72c921d
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/Makefile
-@@ -0,0 +1,19 @@
-+#
-+# Makefile for the Freescale Ethernet controllers
-+#
-+EXTRA_CFLAGS += -DVERSION=\"\"
-+#
-+#Include netcomm SW specific definitions
-+include $(srctree)/drivers/net/dpa/NetCommSw/ncsw_config.mk
-+
-+NCSW_FM_INC = $(srctree)/drivers/net/dpa/NetCommSw/Peripherals/FM/inc
-+
-+EXTRA_CFLAGS += -I$(NCSW_FM_INC)
-+
-+obj-y += fsl-ncsw-Pcd.o
-+
-+fsl-ncsw-Pcd-objs := fman_kg.o fman_prs.o fm_cc.o fm_kg.o fm_pcd.o fm_plcr.o fm_prs.o fm_manip.o
-+
-+ifeq ($(CONFIG_FMAN_T4240),y)
-+fsl-ncsw-Pcd-objs += fm_replic.o
-+endif
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/crc64.h b/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/crc64.h
-new file mode 100644
-index 0000000..335ee68
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/crc64.h
-@@ -0,0 +1,360 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+ /**************************************************************************//**
-+ @File crc64.h
-+
-+ @Description brief This file contains the CRC64 Table, and __inline__
-+ functions used for calculating crc.
-+*//***************************************************************************/
-+#ifndef __CRC64_H
-+#define __CRC64_H
-+
-+#include "std_ext.h"
-+
-+
-+#define BITS_PER_BYTE 8
-+
-+#define CRC64_EXPON_ECMA_182 0xC96C5795D7870F42ULL
-+#define CRC64_DEFAULT_INITVAL 0xFFFFFFFFFFFFFFFFULL
-+
-+#define CRC64_BYTE_MASK 0xFF
-+#define CRC64_TABLE_ENTRIES ( 1 << BITS_PER_BYTE )
-+#define CRC64_ODD_MASK 1
-+
-+
-+/**
-+ \brief '64 bit crc' Table
-+ */
-+struct crc64_t {
-+ uint64_t initial; /**< Initial seed */
-+ uint64_t table[CRC64_TABLE_ENTRIES]; /**< CRC table entries */
-+};
-+
-+
-+static struct crc64_t CRC64_ECMA_182 = {
-+ CRC64_DEFAULT_INITVAL,
-+ {
-+ 0x0000000000000000ULL,
-+ 0xb32e4cbe03a75f6fULL,
-+ 0xf4843657a840a05bULL,
-+ 0x47aa7ae9abe7ff34ULL,
-+ 0x7bd0c384ff8f5e33ULL,
-+ 0xc8fe8f3afc28015cULL,
-+ 0x8f54f5d357cffe68ULL,
-+ 0x3c7ab96d5468a107ULL,
-+ 0xf7a18709ff1ebc66ULL,
-+ 0x448fcbb7fcb9e309ULL,
-+ 0x0325b15e575e1c3dULL,
-+ 0xb00bfde054f94352ULL,
-+ 0x8c71448d0091e255ULL,
-+ 0x3f5f08330336bd3aULL,
-+ 0x78f572daa8d1420eULL,
-+ 0xcbdb3e64ab761d61ULL,
-+ 0x7d9ba13851336649ULL,
-+ 0xceb5ed8652943926ULL,
-+ 0x891f976ff973c612ULL,
-+ 0x3a31dbd1fad4997dULL,
-+ 0x064b62bcaebc387aULL,
-+ 0xb5652e02ad1b6715ULL,
-+ 0xf2cf54eb06fc9821ULL,
-+ 0x41e11855055bc74eULL,
-+ 0x8a3a2631ae2dda2fULL,
-+ 0x39146a8fad8a8540ULL,
-+ 0x7ebe1066066d7a74ULL,
-+ 0xcd905cd805ca251bULL,
-+ 0xf1eae5b551a2841cULL,
-+ 0x42c4a90b5205db73ULL,
-+ 0x056ed3e2f9e22447ULL,
-+ 0xb6409f5cfa457b28ULL,
-+ 0xfb374270a266cc92ULL,
-+ 0x48190ecea1c193fdULL,
-+ 0x0fb374270a266cc9ULL,
-+ 0xbc9d3899098133a6ULL,
-+ 0x80e781f45de992a1ULL,
-+ 0x33c9cd4a5e4ecdceULL,
-+ 0x7463b7a3f5a932faULL,
-+ 0xc74dfb1df60e6d95ULL,
-+ 0x0c96c5795d7870f4ULL,
-+ 0xbfb889c75edf2f9bULL,
-+ 0xf812f32ef538d0afULL,
-+ 0x4b3cbf90f69f8fc0ULL,
-+ 0x774606fda2f72ec7ULL,
-+ 0xc4684a43a15071a8ULL,
-+ 0x83c230aa0ab78e9cULL,
-+ 0x30ec7c140910d1f3ULL,
-+ 0x86ace348f355aadbULL,
-+ 0x3582aff6f0f2f5b4ULL,
-+ 0x7228d51f5b150a80ULL,
-+ 0xc10699a158b255efULL,
-+ 0xfd7c20cc0cdaf4e8ULL,
-+ 0x4e526c720f7dab87ULL,
-+ 0x09f8169ba49a54b3ULL,
-+ 0xbad65a25a73d0bdcULL,
-+ 0x710d64410c4b16bdULL,
-+ 0xc22328ff0fec49d2ULL,
-+ 0x85895216a40bb6e6ULL,
-+ 0x36a71ea8a7ace989ULL,
-+ 0x0adda7c5f3c4488eULL,
-+ 0xb9f3eb7bf06317e1ULL,
-+ 0xfe5991925b84e8d5ULL,
-+ 0x4d77dd2c5823b7baULL,
-+ 0x64b62bcaebc387a1ULL,
-+ 0xd7986774e864d8ceULL,
-+ 0x90321d9d438327faULL,
-+ 0x231c512340247895ULL,
-+ 0x1f66e84e144cd992ULL,
-+ 0xac48a4f017eb86fdULL,
-+ 0xebe2de19bc0c79c9ULL,
-+ 0x58cc92a7bfab26a6ULL,
-+ 0x9317acc314dd3bc7ULL,
-+ 0x2039e07d177a64a8ULL,
-+ 0x67939a94bc9d9b9cULL,
-+ 0xd4bdd62abf3ac4f3ULL,
-+ 0xe8c76f47eb5265f4ULL,
-+ 0x5be923f9e8f53a9bULL,
-+ 0x1c4359104312c5afULL,
-+ 0xaf6d15ae40b59ac0ULL,
-+ 0x192d8af2baf0e1e8ULL,
-+ 0xaa03c64cb957be87ULL,
-+ 0xeda9bca512b041b3ULL,
-+ 0x5e87f01b11171edcULL,
-+ 0x62fd4976457fbfdbULL,
-+ 0xd1d305c846d8e0b4ULL,
-+ 0x96797f21ed3f1f80ULL,
-+ 0x2557339fee9840efULL,
-+ 0xee8c0dfb45ee5d8eULL,
-+ 0x5da24145464902e1ULL,
-+ 0x1a083bacedaefdd5ULL,
-+ 0xa9267712ee09a2baULL,
-+ 0x955cce7fba6103bdULL,
-+ 0x267282c1b9c65cd2ULL,
-+ 0x61d8f8281221a3e6ULL,
-+ 0xd2f6b4961186fc89ULL,
-+ 0x9f8169ba49a54b33ULL,
-+ 0x2caf25044a02145cULL,
-+ 0x6b055fede1e5eb68ULL,
-+ 0xd82b1353e242b407ULL,
-+ 0xe451aa3eb62a1500ULL,
-+ 0x577fe680b58d4a6fULL,
-+ 0x10d59c691e6ab55bULL,
-+ 0xa3fbd0d71dcdea34ULL,
-+ 0x6820eeb3b6bbf755ULL,
-+ 0xdb0ea20db51ca83aULL,
-+ 0x9ca4d8e41efb570eULL,
-+ 0x2f8a945a1d5c0861ULL,
-+ 0x13f02d374934a966ULL,
-+ 0xa0de61894a93f609ULL,
-+ 0xe7741b60e174093dULL,
-+ 0x545a57dee2d35652ULL,
-+ 0xe21ac88218962d7aULL,
-+ 0x5134843c1b317215ULL,
-+ 0x169efed5b0d68d21ULL,
-+ 0xa5b0b26bb371d24eULL,
-+ 0x99ca0b06e7197349ULL,
-+ 0x2ae447b8e4be2c26ULL,
-+ 0x6d4e3d514f59d312ULL,
-+ 0xde6071ef4cfe8c7dULL,
-+ 0x15bb4f8be788911cULL,
-+ 0xa6950335e42fce73ULL,
-+ 0xe13f79dc4fc83147ULL,
-+ 0x521135624c6f6e28ULL,
-+ 0x6e6b8c0f1807cf2fULL,
-+ 0xdd45c0b11ba09040ULL,
-+ 0x9aefba58b0476f74ULL,
-+ 0x29c1f6e6b3e0301bULL,
-+ 0xc96c5795d7870f42ULL,
-+ 0x7a421b2bd420502dULL,
-+ 0x3de861c27fc7af19ULL,
-+ 0x8ec62d7c7c60f076ULL,
-+ 0xb2bc941128085171ULL,
-+ 0x0192d8af2baf0e1eULL,
-+ 0x4638a2468048f12aULL,
-+ 0xf516eef883efae45ULL,
-+ 0x3ecdd09c2899b324ULL,
-+ 0x8de39c222b3eec4bULL,
-+ 0xca49e6cb80d9137fULL,
-+ 0x7967aa75837e4c10ULL,
-+ 0x451d1318d716ed17ULL,
-+ 0xf6335fa6d4b1b278ULL,
-+ 0xb199254f7f564d4cULL,
-+ 0x02b769f17cf11223ULL,
-+ 0xb4f7f6ad86b4690bULL,
-+ 0x07d9ba1385133664ULL,
-+ 0x4073c0fa2ef4c950ULL,
-+ 0xf35d8c442d53963fULL,
-+ 0xcf273529793b3738ULL,
-+ 0x7c0979977a9c6857ULL,
-+ 0x3ba3037ed17b9763ULL,
-+ 0x888d4fc0d2dcc80cULL,
-+ 0x435671a479aad56dULL,
-+ 0xf0783d1a7a0d8a02ULL,
-+ 0xb7d247f3d1ea7536ULL,
-+ 0x04fc0b4dd24d2a59ULL,
-+ 0x3886b22086258b5eULL,
-+ 0x8ba8fe9e8582d431ULL,
-+ 0xcc0284772e652b05ULL,
-+ 0x7f2cc8c92dc2746aULL,
-+ 0x325b15e575e1c3d0ULL,
-+ 0x8175595b76469cbfULL,
-+ 0xc6df23b2dda1638bULL,
-+ 0x75f16f0cde063ce4ULL,
-+ 0x498bd6618a6e9de3ULL,
-+ 0xfaa59adf89c9c28cULL,
-+ 0xbd0fe036222e3db8ULL,
-+ 0x0e21ac88218962d7ULL,
-+ 0xc5fa92ec8aff7fb6ULL,
-+ 0x76d4de52895820d9ULL,
-+ 0x317ea4bb22bfdfedULL,
-+ 0x8250e80521188082ULL,
-+ 0xbe2a516875702185ULL,
-+ 0x0d041dd676d77eeaULL,
-+ 0x4aae673fdd3081deULL,
-+ 0xf9802b81de97deb1ULL,
-+ 0x4fc0b4dd24d2a599ULL,
-+ 0xfceef8632775faf6ULL,
-+ 0xbb44828a8c9205c2ULL,
-+ 0x086ace348f355aadULL,
-+ 0x34107759db5dfbaaULL,
-+ 0x873e3be7d8faa4c5ULL,
-+ 0xc094410e731d5bf1ULL,
-+ 0x73ba0db070ba049eULL,
-+ 0xb86133d4dbcc19ffULL,
-+ 0x0b4f7f6ad86b4690ULL,
-+ 0x4ce50583738cb9a4ULL,
-+ 0xffcb493d702be6cbULL,
-+ 0xc3b1f050244347ccULL,
-+ 0x709fbcee27e418a3ULL,
-+ 0x3735c6078c03e797ULL,
-+ 0x841b8ab98fa4b8f8ULL,
-+ 0xadda7c5f3c4488e3ULL,
-+ 0x1ef430e13fe3d78cULL,
-+ 0x595e4a08940428b8ULL,
-+ 0xea7006b697a377d7ULL,
-+ 0xd60abfdbc3cbd6d0ULL,
-+ 0x6524f365c06c89bfULL,
-+ 0x228e898c6b8b768bULL,
-+ 0x91a0c532682c29e4ULL,
-+ 0x5a7bfb56c35a3485ULL,
-+ 0xe955b7e8c0fd6beaULL,
-+ 0xaeffcd016b1a94deULL,
-+ 0x1dd181bf68bdcbb1ULL,
-+ 0x21ab38d23cd56ab6ULL,
-+ 0x9285746c3f7235d9ULL,
-+ 0xd52f0e859495caedULL,
-+ 0x6601423b97329582ULL,
-+ 0xd041dd676d77eeaaULL,
-+ 0x636f91d96ed0b1c5ULL,
-+ 0x24c5eb30c5374ef1ULL,
-+ 0x97eba78ec690119eULL,
-+ 0xab911ee392f8b099ULL,
-+ 0x18bf525d915feff6ULL,
-+ 0x5f1528b43ab810c2ULL,
-+ 0xec3b640a391f4fadULL,
-+ 0x27e05a6e926952ccULL,
-+ 0x94ce16d091ce0da3ULL,
-+ 0xd3646c393a29f297ULL,
-+ 0x604a2087398eadf8ULL,
-+ 0x5c3099ea6de60cffULL,
-+ 0xef1ed5546e415390ULL,
-+ 0xa8b4afbdc5a6aca4ULL,
-+ 0x1b9ae303c601f3cbULL,
-+ 0x56ed3e2f9e224471ULL,
-+ 0xe5c372919d851b1eULL,
-+ 0xa26908783662e42aULL,
-+ 0x114744c635c5bb45ULL,
-+ 0x2d3dfdab61ad1a42ULL,
-+ 0x9e13b115620a452dULL,
-+ 0xd9b9cbfcc9edba19ULL,
-+ 0x6a978742ca4ae576ULL,
-+ 0xa14cb926613cf817ULL,
-+ 0x1262f598629ba778ULL,
-+ 0x55c88f71c97c584cULL,
-+ 0xe6e6c3cfcadb0723ULL,
-+ 0xda9c7aa29eb3a624ULL,
-+ 0x69b2361c9d14f94bULL,
-+ 0x2e184cf536f3067fULL,
-+ 0x9d36004b35545910ULL,
-+ 0x2b769f17cf112238ULL,
-+ 0x9858d3a9ccb67d57ULL,
-+ 0xdff2a94067518263ULL,
-+ 0x6cdce5fe64f6dd0cULL,
-+ 0x50a65c93309e7c0bULL,
-+ 0xe388102d33392364ULL,
-+ 0xa4226ac498dedc50ULL,
-+ 0x170c267a9b79833fULL,
-+ 0xdcd7181e300f9e5eULL,
-+ 0x6ff954a033a8c131ULL,
-+ 0x28532e49984f3e05ULL,
-+ 0x9b7d62f79be8616aULL,
-+ 0xa707db9acf80c06dULL,
-+ 0x14299724cc279f02ULL,
-+ 0x5383edcd67c06036ULL,
-+ 0xe0ada17364673f59ULL
-+ }
-+};
-+
-+
-+/**
-+ \brief Initializes the crc seed
-+ */
-+static __inline__ uint64_t crc64_init(void)
-+{
-+ return CRC64_ECMA_182.initial;
-+}
-+
-+/**
-+ \brief Computes 64 bit the crc
-+ \param[in] data Pointer to the Data in the frame
-+ \param[in] len Length of the Data
-+ \param[in] crc seed
-+ \return calculated crc
-+ */
-+static __inline__ uint64_t crc64_compute(void const *data,
-+ uint32_t len,
-+ uint64_t seed)
-+{
-+ uint32_t i;
-+ uint64_t crc = seed;
-+ uint8_t *bdata = (uint8_t *) data;
-+
-+ for (i = 0; i < len; i++)
-+ crc =
-+ CRC64_ECMA_182.
-+ table[(crc ^ *bdata++) & CRC64_BYTE_MASK] ^ (crc >> 8);
-+
-+ return crc;
-+}
-+
-+
-+#endif /* __CRC64_H */
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/fm_cc.c b/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/fm_cc.c
-new file mode 100644
-index 0000000..85810a9
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/fm_cc.c
-@@ -0,0 +1,6940 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+/******************************************************************************
-+ @File fm_cc.c
-+
-+ @Description FM Coarse Classifier implementation
-+*//***************************************************************************/
-+#include "std_ext.h"
-+#include "error_ext.h"
-+#include "string_ext.h"
-+#include "debug_ext.h"
-+#include "fm_pcd_ext.h"
-+#include "fm_muram_ext.h"
-+
-+#include "fm_common.h"
-+#include "fm_pcd.h"
-+#include "fm_hc.h"
-+#include "fm_cc.h"
-+#include "crc64.h"
-+
-+
-+/****************************************/
-+/* static functions */
-+/****************************************/
-+
-+
-+static t_Error CcRootTryLock(t_Handle h_FmPcdCcTree)
-+{
-+ t_FmPcdCcTree *p_FmPcdCcTree = (t_FmPcdCcTree *)h_FmPcdCcTree;
-+
-+ ASSERT_COND(h_FmPcdCcTree);
-+
-+ if (FmPcdLockTryLock(p_FmPcdCcTree->p_Lock))
-+ return E_OK;
-+
-+ return ERROR_CODE(E_BUSY);
-+}
-+
-+static void CcRootReleaseLock(t_Handle h_FmPcdCcTree)
-+{
-+ t_FmPcdCcTree *p_FmPcdCcTree = (t_FmPcdCcTree *)h_FmPcdCcTree;
-+
-+ ASSERT_COND(h_FmPcdCcTree);
-+
-+ FmPcdLockUnlock(p_FmPcdCcTree->p_Lock);
-+}
-+
-+static void UpdateNodeOwner(t_FmPcdCcNode *p_CcNode, bool add)
-+{
-+ uint32_t intFlags;
-+
-+ ASSERT_COND(p_CcNode);
-+
-+ intFlags = XX_LockIntrSpinlock(p_CcNode->h_Spinlock);
-+
-+ if (add)
-+ p_CcNode->owners++;
-+ else
-+ {
-+ ASSERT_COND(p_CcNode->owners);
-+ p_CcNode->owners--;
-+ }
-+
-+ XX_UnlockIntrSpinlock(p_CcNode->h_Spinlock, intFlags);
-+}
-+
-+static __inline__ t_FmPcdStatsObj* DequeueStatsObj(t_List *p_List)
-+{
-+ t_FmPcdStatsObj *p_StatsObj = NULL;
-+ t_List *p_Next;
-+
-+ if (!LIST_IsEmpty(p_List))
-+ {
-+ p_Next = LIST_FIRST(p_List);
-+ p_StatsObj = LIST_OBJECT(p_Next, t_FmPcdStatsObj, node);
-+ ASSERT_COND(p_StatsObj);
-+ LIST_DelAndInit(p_Next);
-+ }
-+
-+ return p_StatsObj;
-+}
-+
-+static __inline__ void EnqueueStatsObj(t_List *p_List,
-+ t_FmPcdStatsObj *p_StatsObj)
-+{
-+ LIST_AddToTail(&p_StatsObj->node, p_List);
-+}
-+
-+static void FreeStatObjects(t_List *p_List,
-+ t_Handle h_FmMuram)
-+{
-+ t_FmPcdStatsObj *p_StatsObj;
-+
-+ while (!LIST_IsEmpty(p_List))
-+ {
-+ p_StatsObj = DequeueStatsObj(p_List);
-+ ASSERT_COND(p_StatsObj);
-+
-+ FM_MURAM_FreeMem(h_FmMuram, p_StatsObj->h_StatsAd);
-+ FM_MURAM_FreeMem(h_FmMuram, p_StatsObj->h_StatsCounters);
-+
-+ XX_Free(p_StatsObj);
-+ }
-+}
-+
-+static t_FmPcdStatsObj* GetStatsObj(t_FmPcdCcNode *p_CcNode)
-+{
-+ t_FmPcdStatsObj* p_StatsObj;
-+ t_Handle h_FmMuram;
-+
-+ ASSERT_COND(p_CcNode);
-+
-+ /* If 'maxNumOfKeys' was passed, all statistics object were preallocated
-+ upon node initialization */
-+ if (p_CcNode->maxNumOfKeys)
-+ {
-+ p_StatsObj = DequeueStatsObj(&p_CcNode->availableStatsLst);
-+ }
-+ else
-+ {
-+ h_FmMuram = ((t_FmPcd *)(p_CcNode->h_FmPcd))->h_FmMuram;
-+ ASSERT_COND(h_FmMuram);
-+
-+ p_StatsObj = XX_Malloc(sizeof(t_FmPcdStatsObj));
-+ if (!p_StatsObj)
-+ {
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("statistics object"));
-+ return NULL;
-+ }
-+
-+ p_StatsObj->h_StatsAd = (t_Handle)FM_MURAM_AllocMem(h_FmMuram,
-+ FM_PCD_CC_AD_ENTRY_SIZE,
-+ FM_PCD_CC_AD_TABLE_ALIGN);
-+ if (!p_StatsObj->h_StatsAd)
-+ {
-+ XX_Free(p_StatsObj);
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("MURAM allocation for statistics ADs"));
-+ return NULL;
-+ }
-+ IOMemSet32(p_StatsObj->h_StatsAd, 0, FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ p_StatsObj->h_StatsCounters = (t_Handle)FM_MURAM_AllocMem(h_FmMuram,
-+ p_CcNode->countersArraySize,
-+ FM_PCD_CC_AD_TABLE_ALIGN);
-+ if (!p_StatsObj->h_StatsCounters)
-+ {
-+ FM_MURAM_FreeMem(h_FmMuram, p_StatsObj->h_StatsAd);
-+ XX_Free(p_StatsObj);
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("MURAM allocation for statistics counters"));
-+ return NULL;
-+ }
-+ IOMemSet32(p_StatsObj->h_StatsCounters, 0, p_CcNode->countersArraySize);
-+ }
-+
-+ return p_StatsObj;
-+}
-+
-+static void PutStatsObj(t_FmPcdCcNode *p_CcNode,
-+ t_FmPcdStatsObj *p_StatsObj)
-+{
-+ t_Handle h_FmMuram;
-+
-+ ASSERT_COND(p_CcNode);
-+ ASSERT_COND(p_StatsObj);
-+
-+ /* If 'maxNumOfKeys' was passed, all statistics object were preallocated
-+ upon node initialization and now will be enqueued back to the list */
-+ if (p_CcNode->maxNumOfKeys)
-+ {
-+ /* Nullify counters */
-+ IOMemSet32(p_StatsObj->h_StatsCounters, 0, p_CcNode->countersArraySize);
-+
-+ EnqueueStatsObj(&p_CcNode->availableStatsLst, p_StatsObj);
-+ }
-+ else
-+ {
-+ h_FmMuram = ((t_FmPcd *)(p_CcNode->h_FmPcd))->h_FmMuram;
-+ ASSERT_COND(h_FmMuram);
-+
-+ FM_MURAM_FreeMem(h_FmMuram, p_StatsObj->h_StatsAd);
-+ FM_MURAM_FreeMem(h_FmMuram, p_StatsObj->h_StatsCounters);
-+
-+ XX_Free(p_StatsObj);
-+ }
-+}
-+
-+static void SetStatsCounters(t_AdOfTypeStats *p_StatsAd,
-+ uint32_t statsCountersAddr)
-+{
-+ uint32_t tmp = (statsCountersAddr & FM_PCD_AD_STATS_COUNTERS_ADDR_MASK);
-+
-+ WRITE_UINT32(p_StatsAd->statsTableAddr, tmp);
-+}
-+
-+
-+static void UpdateStatsAd(t_FmPcdCcStatsParams *p_FmPcdCcStatsParams,
-+ t_Handle h_Ad,
-+ uint64_t physicalMuramBase)
-+{
-+ t_AdOfTypeStats *p_StatsAd;
-+ uint32_t statsCountersAddr, nextActionAddr, tmp;
-+#if (DPAA_VERSION >= 11)
-+ uint32_t frameLengthRangesAddr;
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ p_StatsAd = (t_AdOfTypeStats *)p_FmPcdCcStatsParams->h_StatsAd;
-+
-+ tmp = FM_PCD_AD_STATS_TYPE;
-+
-+#if (DPAA_VERSION >= 11)
-+ if (p_FmPcdCcStatsParams->h_StatsFLRs)
-+ {
-+ frameLengthRangesAddr = (uint32_t)((XX_VirtToPhys(p_FmPcdCcStatsParams->h_StatsFLRs) - physicalMuramBase));
-+ tmp |= (frameLengthRangesAddr & FM_PCD_AD_STATS_FLR_ADDR_MASK);
-+ }
-+#endif /* (DPAA_VERSION >= 11) */
-+ WRITE_UINT32(p_StatsAd->profileTableAddr, tmp);
-+
-+ nextActionAddr = (uint32_t)((XX_VirtToPhys(h_Ad) - physicalMuramBase));
-+ tmp = 0;
-+ tmp |= (uint32_t)((nextActionAddr << FM_PCD_AD_STATS_NEXT_ACTION_SHIFT) & FM_PCD_AD_STATS_NEXT_ACTION_MASK);
-+ tmp |= (FM_PCD_AD_STATS_NAD_EN | FM_PCD_AD_STATS_OP_CODE);
-+
-+#if (DPAA_VERSION >= 11)
-+ if (p_FmPcdCcStatsParams->h_StatsFLRs)
-+ tmp |= FM_PCD_AD_STATS_FLR_EN;
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ WRITE_UINT32(p_StatsAd->nextActionIndx, tmp);
-+
-+ statsCountersAddr = (uint32_t)((XX_VirtToPhys(p_FmPcdCcStatsParams->h_StatsCounters) - physicalMuramBase));
-+ SetStatsCounters(p_StatsAd, statsCountersAddr);
-+}
-+
-+static void FillAdOfTypeContLookup(t_Handle h_Ad,
-+ t_FmPcdCcStatsParams *p_FmPcdCcStatsParams,
-+ t_Handle h_FmPcd,
-+ t_Handle p_CcNode,
-+ t_Handle h_Manip,
-+ t_Handle h_FrmReplic)
-+{
-+ t_FmPcdCcNode *p_Node = (t_FmPcdCcNode *)p_CcNode;
-+ t_AdOfTypeContLookup *p_AdContLookup = (t_AdOfTypeContLookup *)h_Ad;
-+ t_Handle h_TmpAd;
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+ uint32_t tmpReg32;
-+ t_Handle p_AdNewPtr = NULL;
-+
-+ UNUSED(h_Manip);
-+ UNUSED(h_FrmReplic);
-+
-+ /* there are 3 cases handled in this routine of building a "Continue lookup" type AD.
-+ * Case 1: No Manip. The action descriptor is built within the match table.
-+ * p_AdResult = p_AdNewPtr;
-+ * Case 2: Manip exists. A new AD is created - p_AdNewPtr. It is initialized
-+ * either in the FmPcdManipUpdateAdResultForCc routine or it was already
-+ * initialized and returned here.
-+ * p_AdResult (within the match table) will be initialized after
-+ * this routine returns and point to the existing AD.
-+ * Case 3: Manip exists. The action descriptor is built within the match table.
-+ * FmPcdManipUpdateAdContLookupForCc returns a NULL p_AdNewPtr.
-+ */
-+
-+ /* As default, the "new" ptr is the current one. i.e. the content of the result
-+ * AD will be written into the match table itself (case (1))*/
-+ p_AdNewPtr = p_AdContLookup;
-+
-+ /* Initialize an action descriptor, if current statistics mode requires an Ad */
-+ if (p_FmPcdCcStatsParams)
-+ {
-+ ASSERT_COND(p_FmPcdCcStatsParams->h_StatsAd);
-+ ASSERT_COND(p_FmPcdCcStatsParams->h_StatsCounters);
-+
-+ /* Swapping addresses between statistics Ad and the current lookup AD */
-+ h_TmpAd = p_FmPcdCcStatsParams->h_StatsAd;
-+ p_FmPcdCcStatsParams->h_StatsAd = h_Ad;
-+ h_Ad = h_TmpAd;
-+
-+ p_AdNewPtr = h_Ad;
-+ p_AdContLookup = h_Ad;
-+
-+ /* Init statistics Ad and connect current lookup AD as 'next action' from statistics Ad */
-+ UpdateStatsAd(p_FmPcdCcStatsParams,
-+ h_Ad,
-+ p_FmPcd->physicalMuramBase);
-+ }
-+
-+#if DPAA_VERSION >= 11
-+ if (h_Manip && h_FrmReplic)
-+ FmPcdManipUpdateAdContLookupForCc(h_Manip,
-+ h_Ad,
-+ &p_AdNewPtr,
-+ (uint32_t)((XX_VirtToPhys(FrmReplicGroupGetSourceTableDescriptor(h_FrmReplic)) - p_FmPcd->physicalMuramBase)));
-+ else if (h_FrmReplic)
-+ FrmReplicGroupUpdateAd(h_FrmReplic, h_Ad, &p_AdNewPtr);
-+ else
-+#endif /* (DPAA_VERSION >= 11) */
-+ if (h_Manip)
-+ FmPcdManipUpdateAdContLookupForCc(h_Manip,
-+ h_Ad,
-+ &p_AdNewPtr,
-+
-+#ifdef FM_CAPWAP_SUPPORT
-+ /*no check for opcode of manip - this step can be reached only with capwap_applic_specific*/
-+ (uint32_t)((XX_VirtToPhys(p_Node->h_AdTable) - p_FmPcd->physicalMuramBase))
-+#else /* not FM_CAPWAP_SUPPORT */
-+ (uint32_t)((XX_VirtToPhys(p_Node->h_Ad) - p_FmPcd->physicalMuramBase))
-+#endif /* not FM_CAPWAP_SUPPORT */
-+ );
-+
-+ /* if (p_AdNewPtr = NULL) --> Done. (case (3)) */
-+ if (p_AdNewPtr)
-+ {
-+ /* cases (1) & (2) */
-+ tmpReg32 = 0;
-+ tmpReg32 |= FM_PCD_AD_CONT_LOOKUP_TYPE;
-+ tmpReg32 |= p_Node->sizeOfExtraction ? ((p_Node->sizeOfExtraction - 1) << 24) : 0;
-+ tmpReg32 |= (uint32_t)(XX_VirtToPhys(p_Node->h_AdTable) - p_FmPcd->physicalMuramBase);
-+ WRITE_UINT32(p_AdContLookup->ccAdBase, tmpReg32);
-+
-+ tmpReg32 = 0;
-+ tmpReg32 |= p_Node->numOfKeys << 24;
-+ tmpReg32 |= (p_Node->lclMask ? FM_PCD_AD_CONT_LOOKUP_LCL_MASK : 0);
-+ tmpReg32 |= p_Node->h_KeysMatchTable ?
-+ (uint32_t)(XX_VirtToPhys(p_Node->h_KeysMatchTable) - p_FmPcd->physicalMuramBase) : 0;
-+ WRITE_UINT32(p_AdContLookup->matchTblPtr, tmpReg32);
-+
-+ tmpReg32 = 0;
-+ tmpReg32 |= p_Node->prsArrayOffset << 24;
-+ tmpReg32 |= p_Node->offset << 16;
-+ tmpReg32 |= p_Node->parseCode;
-+ WRITE_UINT32(p_AdContLookup->pcAndOffsets, tmpReg32);
-+
-+ Mem2IOCpy32((void*)&p_AdContLookup->gmask, p_Node->p_GlblMask, CC_GLBL_MASK_SIZE);
-+ }
-+}
-+
-+static t_Error AllocAndFillAdForContLookupManip(t_Handle h_CcNode)
-+{
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+ uint32_t intFlags;
-+
-+ ASSERT_COND(p_CcNode);
-+
-+ intFlags = XX_LockIntrSpinlock(p_CcNode->h_Spinlock);
-+
-+ if (!p_CcNode->h_Ad)
-+ {
-+ p_CcNode->h_Ad = (t_Handle)FM_MURAM_AllocMem(((t_FmPcd *)(p_CcNode->h_FmPcd))->h_FmMuram,
-+ FM_PCD_CC_AD_ENTRY_SIZE,
-+ FM_PCD_CC_AD_TABLE_ALIGN);
-+
-+ XX_UnlockIntrSpinlock(p_CcNode->h_Spinlock, intFlags);
-+
-+ if (!p_CcNode->h_Ad)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM allocation for CC action descriptor"));
-+
-+ IOMemSet32(p_CcNode->h_Ad, 0, FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ FillAdOfTypeContLookup(p_CcNode->h_Ad,
-+ NULL,
-+ p_CcNode->h_FmPcd,
-+ p_CcNode,
-+ NULL,
-+ NULL);
-+ }
-+ else
-+ XX_UnlockIntrSpinlock(p_CcNode->h_Spinlock, intFlags);
-+
-+ return E_OK;
-+}
-+
-+static t_Error SetRequiredAction(t_Handle h_FmPcd,
-+ uint32_t requiredAction,
-+ t_FmPcdCcKeyAndNextEngineParams *p_CcKeyAndNextEngineParamsTmp,
-+ t_Handle h_AdTmp,
-+ uint16_t numOfEntries,
-+ t_Handle h_Tree)
-+{
-+ t_AdOfTypeResult *p_AdTmp = (t_AdOfTypeResult *)h_AdTmp;
-+ uint32_t tmpReg32;
-+ t_Error err;
-+ t_FmPcdCcNode *p_CcNode;
-+ int i = 0;
-+ uint16_t tmp = 0;
-+ uint16_t profileId;
-+ uint8_t relativeSchemeId, physicalSchemeId;
-+ t_CcNodeInformation ccNodeInfo;
-+
-+ for (i = 0; i < numOfEntries; i++)
-+ {
-+ if (i == 0)
-+ h_AdTmp = PTR_MOVE(h_AdTmp, i*FM_PCD_CC_AD_ENTRY_SIZE);
-+ else
-+ h_AdTmp = PTR_MOVE(h_AdTmp, FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ switch (p_CcKeyAndNextEngineParamsTmp[i].nextEngineParams.nextEngine)
-+ {
-+ case (e_FM_PCD_CC):
-+ if (requiredAction)
-+ {
-+ p_CcNode = p_CcKeyAndNextEngineParamsTmp[i].nextEngineParams.params.ccParams.h_CcNode;
-+ ASSERT_COND(p_CcNode);
-+ if (p_CcNode->shadowAction == requiredAction)
-+ break;
-+ if ((requiredAction & UPDATE_CC_WITH_TREE) && !(p_CcNode->shadowAction & UPDATE_CC_WITH_TREE))
-+ {
-+
-+ ASSERT_COND(LIST_NumOfObjs(&p_CcNode->ccTreesLst) == 0);
-+ if (p_CcNode->shadowAction & UPDATE_CC_WITH_DELETE_TREE)
-+ p_CcNode->shadowAction &= ~UPDATE_CC_WITH_DELETE_TREE;
-+ memset(&ccNodeInfo, 0, sizeof(t_CcNodeInformation));
-+ ccNodeInfo.h_CcNode = h_Tree;
-+ EnqueueNodeInfoToRelevantLst(&p_CcNode->ccTreesLst, &ccNodeInfo, NULL);
-+ p_CcKeyAndNextEngineParamsTmp[i].shadowAction |= UPDATE_CC_WITH_TREE;
-+ }
-+ if ((requiredAction & UPDATE_CC_WITH_DELETE_TREE) && !(p_CcNode->shadowAction & UPDATE_CC_WITH_DELETE_TREE))
-+ {
-+ ASSERT_COND(LIST_NumOfObjs(&p_CcNode->ccTreesLst) == 1);
-+ if (p_CcNode->shadowAction & UPDATE_CC_WITH_TREE)
-+ p_CcNode->shadowAction &= ~UPDATE_CC_WITH_TREE;
-+ DequeueNodeInfoFromRelevantLst(&p_CcNode->ccTreesLst, h_Tree, NULL);
-+ p_CcKeyAndNextEngineParamsTmp[i].shadowAction |= UPDATE_CC_WITH_DELETE_TREE;
-+ }
-+ if (p_CcNode->keyAndNextEngineParams[p_CcNode->numOfKeys].nextEngineParams.nextEngine != e_FM_PCD_INVALID)
-+ tmp = (uint8_t)(p_CcNode->numOfKeys + 1);
-+ else
-+ tmp = p_CcNode->numOfKeys;
-+ err = SetRequiredAction(h_FmPcd,
-+ requiredAction,
-+ p_CcNode->keyAndNextEngineParams,
-+ p_CcNode->h_AdTable,
-+ tmp,
-+ h_Tree);
-+ if (err != E_OK)
-+ return err;
-+ p_CcNode->shadowAction |= requiredAction;
-+ }
-+ break;
-+
-+ case (e_FM_PCD_KG):
-+ if ((requiredAction & UPDATE_NIA_ENQ_WITHOUT_DMA) && !(p_CcKeyAndNextEngineParamsTmp[i].shadowAction & UPDATE_NIA_ENQ_WITHOUT_DMA))
-+ {
-+ physicalSchemeId = FmPcdKgGetSchemeId(p_CcKeyAndNextEngineParamsTmp[i].nextEngineParams.params.kgParams.h_DirectScheme);
-+ relativeSchemeId = FmPcdKgGetRelativeSchemeId(h_FmPcd, physicalSchemeId);
-+ if (relativeSchemeId == FM_PCD_KG_NUM_OF_SCHEMES)
-+ RETURN_ERROR(MAJOR, E_NOT_IN_RANGE, NO_MSG);
-+ if (!FmPcdKgIsSchemeValidSw(p_CcKeyAndNextEngineParamsTmp[i].nextEngineParams.params.kgParams.h_DirectScheme))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Invalid direct scheme."));
-+ if (!KgIsSchemeAlwaysDirect(h_FmPcd, relativeSchemeId))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("For this action scheme has to be direct."));
-+ err = FmPcdKgCcGetSetParams(h_FmPcd, p_CcKeyAndNextEngineParamsTmp[i].nextEngineParams.params.kgParams.h_DirectScheme, requiredAction, 0);
-+ if (err != E_OK)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ p_CcKeyAndNextEngineParamsTmp[i].shadowAction |= requiredAction;
-+ }
-+ break;
-+
-+ case (e_FM_PCD_PLCR):
-+ if ((requiredAction & UPDATE_NIA_ENQ_WITHOUT_DMA) && !(p_CcKeyAndNextEngineParamsTmp[i].shadowAction & UPDATE_NIA_ENQ_WITHOUT_DMA))
-+ {
-+ if (!p_CcKeyAndNextEngineParamsTmp[i].nextEngineParams.params.plcrParams.overrideParams)
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("In this initialization only overrideFqid can be initialized"));
-+ if (!p_CcKeyAndNextEngineParamsTmp[i].nextEngineParams.params.plcrParams.sharedProfile)
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("In this initialization only overrideFqid can be initialized"));
-+ err = FmPcdPlcrGetAbsoluteIdByProfileParams(h_FmPcd, e_FM_PCD_PLCR_SHARED, NULL, p_CcKeyAndNextEngineParamsTmp[i].nextEngineParams.params.plcrParams.newRelativeProfileId, &profileId);
-+ if (err!= E_OK)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ err = FmPcdPlcrCcGetSetParams(h_FmPcd, profileId, requiredAction);
-+ if (err != E_OK)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ p_CcKeyAndNextEngineParamsTmp[i].shadowAction |= requiredAction;
-+ }
-+ break;
-+
-+ case (e_FM_PCD_DONE):
-+ if ((requiredAction & UPDATE_NIA_ENQ_WITHOUT_DMA) && !(p_CcKeyAndNextEngineParamsTmp[i].shadowAction & UPDATE_NIA_ENQ_WITHOUT_DMA))
-+ {
-+ tmpReg32 = GET_UINT32(p_AdTmp->nia);
-+ if ((tmpReg32 & GET_NIA_BMI_AC_ENQ_FRAME(h_FmPcd)) != GET_NIA_BMI_AC_ENQ_FRAME(h_FmPcd))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Next engine was previously assigned not as PCD_DONE"));
-+ tmpReg32 |= NIA_BMI_AC_ENQ_FRAME_WITHOUT_DMA;
-+ WRITE_UINT32(p_AdTmp->nia, tmpReg32);
-+ p_CcKeyAndNextEngineParamsTmp[i].shadowAction |= requiredAction;
-+ }
-+ break;
-+
-+ default:
-+ break;
-+ }
-+ }
-+
-+ return E_OK;
-+}
-+
-+static t_Error ReleaseModifiedDataStructure(t_Handle h_FmPcd,
-+ t_List *h_FmPcdOldPointersLst,
-+ t_List *h_FmPcdNewPointersLst,
-+ uint16_t numOfGoodChanges,
-+ t_FmPcdModifyCcKeyAdditionalParams *p_AdditionalParams,
-+ bool useShadowStructs)
-+{
-+ t_List *p_Pos;
-+ t_Error err = E_OK;
-+ t_CcNodeInformation ccNodeInfo, *p_CcNodeInformation;
-+ t_Handle h_Muram;
-+ t_FmPcdCcNode *p_FmPcdCcNextNode;
-+ t_List *p_UpdateLst;
-+ uint32_t intFlags;
-+
-+ UNUSED(numOfGoodChanges);
-+
-+ SANITY_CHECK_RETURN_ERROR(h_FmPcd,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_AdditionalParams->h_CurrentNode,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(h_FmPcdOldPointersLst,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(h_FmPcdNewPointersLst,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR((numOfGoodChanges == LIST_NumOfObjs(h_FmPcdOldPointersLst)),E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR((1 == LIST_NumOfObjs(h_FmPcdNewPointersLst)),E_INVALID_STATE);
-+
-+ /* We don't update subtree of the new node with new tree because it was done in the previous stage */
-+ if (p_AdditionalParams->h_NodeForAdd)
-+ {
-+ p_FmPcdCcNextNode = (t_FmPcdCcNode*)p_AdditionalParams->h_NodeForAdd;
-+
-+ if (!p_AdditionalParams->tree)
-+ p_UpdateLst = &p_FmPcdCcNextNode->ccPrevNodesLst;
-+ else
-+ p_UpdateLst = &p_FmPcdCcNextNode->ccTreeIdLst;
-+
-+ p_CcNodeInformation = FindNodeInfoInReleventLst(p_UpdateLst,
-+ p_AdditionalParams->h_CurrentNode,
-+ p_FmPcdCcNextNode->h_Spinlock);
-+
-+ if (p_CcNodeInformation)
-+ p_CcNodeInformation->index++;
-+ else
-+ {
-+ memset(&ccNodeInfo, 0, sizeof(t_CcNodeInformation));
-+ ccNodeInfo.h_CcNode = (t_Handle)p_AdditionalParams->h_CurrentNode;
-+ ccNodeInfo.index = 1;
-+ EnqueueNodeInfoToRelevantLst(p_UpdateLst,
-+ &ccNodeInfo,
-+ p_FmPcdCcNextNode->h_Spinlock);
-+ }
-+ if (p_AdditionalParams->h_ManipForAdd)
-+ {
-+ p_CcNodeInformation = FindNodeInfoInReleventLst(FmPcdManipGetNodeLstPointedOnThisManip(p_AdditionalParams->h_ManipForAdd),
-+ p_AdditionalParams->h_CurrentNode,
-+ FmPcdManipGetSpinlock(p_AdditionalParams->h_ManipForAdd));
-+
-+ if (p_CcNodeInformation)
-+ p_CcNodeInformation->index++;
-+ else
-+ {
-+ memset(&ccNodeInfo, 0, sizeof(t_CcNodeInformation));
-+ ccNodeInfo.h_CcNode = (t_Handle)p_AdditionalParams->h_CurrentNode;
-+ ccNodeInfo.index = 1;
-+ EnqueueNodeInfoToRelevantLst(FmPcdManipGetNodeLstPointedOnThisManip(p_AdditionalParams->h_ManipForAdd),
-+ &ccNodeInfo,
-+ FmPcdManipGetSpinlock(p_AdditionalParams->h_ManipForAdd));
-+ }
-+ }
-+ }
-+
-+ if (p_AdditionalParams->h_NodeForRmv)
-+ {
-+ p_FmPcdCcNextNode = (t_FmPcdCcNode*)p_AdditionalParams->h_NodeForRmv;
-+
-+ if (!p_AdditionalParams->tree)
-+ {
-+ p_UpdateLst = &p_FmPcdCcNextNode->ccPrevNodesLst;
-+
-+ while (!LIST_IsEmpty(&p_FmPcdCcNextNode->ccTreesLst))
-+ {
-+ p_Pos = LIST_NEXT(&p_FmPcdCcNextNode->ccTreesLst);
-+ p_CcNodeInformation = CC_NODE_F_OBJECT(p_Pos);
-+
-+ ASSERT_COND(p_CcNodeInformation->h_CcNode);
-+
-+ err = SetRequiredAction(h_FmPcd,
-+ UPDATE_CC_WITH_DELETE_TREE,
-+ &((t_FmPcdCcNode *)(p_AdditionalParams->h_CurrentNode))->keyAndNextEngineParams[p_AdditionalParams->savedKeyIndex],
-+ PTR_MOVE(((t_FmPcdCcNode *)(p_AdditionalParams->h_CurrentNode))->h_AdTable, p_AdditionalParams->savedKeyIndex*FM_PCD_CC_AD_ENTRY_SIZE),
-+ 1,
-+ p_CcNodeInformation->h_CcNode);
-+ }
-+ }
-+ else
-+ {
-+ p_UpdateLst = &p_FmPcdCcNextNode->ccTreeIdLst;
-+
-+ err = SetRequiredAction(h_FmPcd,
-+ UPDATE_CC_WITH_DELETE_TREE,
-+ &((t_FmPcdCcTree *)(p_AdditionalParams->h_CurrentNode))->keyAndNextEngineParams[p_AdditionalParams->savedKeyIndex],
-+ UINT_TO_PTR(((t_FmPcdCcTree *)(p_AdditionalParams->h_CurrentNode))->ccTreeBaseAddr + p_AdditionalParams->savedKeyIndex*FM_PCD_CC_AD_ENTRY_SIZE),
-+ 1,
-+ p_AdditionalParams->h_CurrentNode);
-+ }
-+ if (err)
-+ return err;
-+
-+ /* We remove from the subtree of the removed node tree because it wasn't done in the previous stage
-+ Update ccPrevNodesLst or ccTreeIdLst of the removed node
-+ Update of the node owner */
-+ p_CcNodeInformation = FindNodeInfoInReleventLst(p_UpdateLst,
-+ p_AdditionalParams->h_CurrentNode,
-+ p_FmPcdCcNextNode->h_Spinlock);
-+
-+ ASSERT_COND(p_CcNodeInformation);
-+ ASSERT_COND(p_CcNodeInformation->index);
-+
-+ p_CcNodeInformation->index--;
-+
-+ if (p_CcNodeInformation->index == 0)
-+ DequeueNodeInfoFromRelevantLst(p_UpdateLst,
-+ p_AdditionalParams->h_CurrentNode,
-+ p_FmPcdCcNextNode->h_Spinlock);
-+
-+ UpdateNodeOwner(p_FmPcdCcNextNode, FALSE);
-+
-+ if (p_AdditionalParams->h_ManipForRmv)
-+ {
-+ p_CcNodeInformation = FindNodeInfoInReleventLst(FmPcdManipGetNodeLstPointedOnThisManip(p_AdditionalParams->h_ManipForRmv),
-+ p_AdditionalParams->h_CurrentNode,
-+ FmPcdManipGetSpinlock(p_AdditionalParams->h_ManipForRmv));
-+
-+ ASSERT_COND(p_CcNodeInformation);
-+ ASSERT_COND(p_CcNodeInformation->index);
-+
-+ p_CcNodeInformation->index--;
-+
-+ if (p_CcNodeInformation->index == 0)
-+ DequeueNodeInfoFromRelevantLst(FmPcdManipGetNodeLstPointedOnThisManip(p_AdditionalParams->h_ManipForRmv),
-+ p_AdditionalParams->h_CurrentNode,
-+ FmPcdManipGetSpinlock(p_AdditionalParams->h_ManipForRmv));
-+ }
-+ }
-+
-+ if (p_AdditionalParams->h_ManipForRmv)
-+ FmPcdManipUpdateOwner(p_AdditionalParams->h_ManipForRmv, FALSE);
-+
-+ if (p_AdditionalParams->p_StatsObjForRmv)
-+ PutStatsObj((t_FmPcdCcNode *)(p_AdditionalParams->h_CurrentNode),
-+ p_AdditionalParams->p_StatsObjForRmv);
-+
-+#if (DPAA_VERSION >= 11)
-+ if (p_AdditionalParams->h_FrmReplicForRmv)
-+ FrmReplicGroupUpdateOwner(p_AdditionalParams->h_FrmReplicForRmv,
-+ FALSE/* remove */);
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ if (!useShadowStructs)
-+ {
-+ h_Muram = FmPcdGetMuramHandle(h_FmPcd);
-+ ASSERT_COND(h_Muram);
-+
-+ if ((p_AdditionalParams->tree &&
-+ !((t_FmPcd *)h_FmPcd)->p_CcShadow) ||
-+ (!p_AdditionalParams->tree &&
-+ !((t_FmPcdCcNode *)(p_AdditionalParams->h_CurrentNode))->maxNumOfKeys))
-+ {
-+ /* We release new AD which was allocated and updated for copy from to actual AD */
-+ p_Pos = LIST_FIRST(h_FmPcdNewPointersLst);
-+ p_CcNodeInformation = CC_NODE_F_OBJECT(p_Pos);
-+ ASSERT_COND(p_CcNodeInformation->h_CcNode);
-+ FM_MURAM_FreeMem(h_Muram, p_CcNodeInformation->h_CcNode);
-+ }
-+
-+ /* Free Old data structure if it has to be freed - new data structure was allocated*/
-+ if (p_AdditionalParams->p_AdTableOld)
-+ FM_MURAM_FreeMem(h_Muram,p_AdditionalParams->p_AdTableOld);
-+
-+ if (p_AdditionalParams->p_KeysMatchTableOld)
-+ FM_MURAM_FreeMem(h_Muram,p_AdditionalParams->p_KeysMatchTableOld);
-+ }
-+
-+ /* Update current modified node with changed fields if it's required*/
-+ if (!p_AdditionalParams->tree)
-+ {
-+ if (p_AdditionalParams->p_AdTableNew)
-+ ((t_FmPcdCcNode *)(p_AdditionalParams->h_CurrentNode))->h_AdTable = p_AdditionalParams->p_AdTableNew;
-+
-+ if (p_AdditionalParams->p_KeysMatchTableNew)
-+ ((t_FmPcdCcNode *)(p_AdditionalParams->h_CurrentNode))->h_KeysMatchTable = p_AdditionalParams->p_KeysMatchTableNew;
-+
-+ /* Locking node's spinlock before updating 'keys and next engine' structure,
-+ as it maybe used to retrieve keys statistics */
-+ intFlags = XX_LockIntrSpinlock(((t_FmPcdCcNode *)(p_AdditionalParams->h_CurrentNode))->h_Spinlock);
-+
-+ ((t_FmPcdCcNode *)(p_AdditionalParams->h_CurrentNode))->numOfKeys = p_AdditionalParams->numOfKeys;
-+
-+ memcpy(((t_FmPcdCcNode *)(p_AdditionalParams->h_CurrentNode))->keyAndNextEngineParams,
-+ &p_AdditionalParams->keyAndNextEngineParams,
-+ sizeof(t_FmPcdCcKeyAndNextEngineParams) * (CC_MAX_NUM_OF_KEYS));
-+
-+ XX_UnlockIntrSpinlock(((t_FmPcdCcNode *)(p_AdditionalParams->h_CurrentNode))->h_Spinlock, intFlags);
-+ }
-+ else
-+ {
-+ uint8_t numEntries = ((t_FmPcdCcTree *)(p_AdditionalParams->h_CurrentNode))->numOfEntries;
-+ ASSERT_COND(numEntries < FM_PCD_MAX_NUM_OF_CC_GROUPS);
-+ memcpy(&((t_FmPcdCcTree *)(p_AdditionalParams->h_CurrentNode))->keyAndNextEngineParams,
-+ &p_AdditionalParams->keyAndNextEngineParams,
-+ sizeof(t_FmPcdCcKeyAndNextEngineParams) * numEntries);
-+ }
-+
-+ ReleaseLst(h_FmPcdOldPointersLst);
-+ ReleaseLst(h_FmPcdNewPointersLst);
-+
-+ XX_Free(p_AdditionalParams);
-+
-+ return E_OK;
-+}
-+
-+static t_Handle BuildNewAd(t_Handle h_Ad,
-+ t_FmPcdModifyCcKeyAdditionalParams *p_FmPcdModifyCcKeyAdditionalParams,
-+ t_FmPcdCcNode *p_CcNode,
-+ t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams)
-+{
-+ t_FmPcdCcNode *p_FmPcdCcNodeTmp;
-+
-+ p_FmPcdCcNodeTmp = (t_FmPcdCcNode*)XX_Malloc(sizeof(t_FmPcdCcNode));
-+ if (!p_FmPcdCcNodeTmp)
-+ {
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("p_FmPcdCcNodeTmp"));
-+ return NULL;
-+ }
-+ memset(p_FmPcdCcNodeTmp, 0, sizeof(t_FmPcdCcNode));
-+
-+ p_FmPcdCcNodeTmp->numOfKeys = p_FmPcdModifyCcKeyAdditionalParams->numOfKeys;
-+ p_FmPcdCcNodeTmp->h_KeysMatchTable = p_FmPcdModifyCcKeyAdditionalParams->p_KeysMatchTableNew;
-+ p_FmPcdCcNodeTmp->h_AdTable = p_FmPcdModifyCcKeyAdditionalParams->p_AdTableNew;
-+
-+ p_FmPcdCcNodeTmp->lclMask = p_CcNode->lclMask;
-+ p_FmPcdCcNodeTmp->parseCode = p_CcNode->parseCode;
-+ p_FmPcdCcNodeTmp->offset = p_CcNode->offset;
-+ p_FmPcdCcNodeTmp->prsArrayOffset = p_CcNode->prsArrayOffset;
-+ p_FmPcdCcNodeTmp->ctrlFlow = p_CcNode->ctrlFlow;
-+ p_FmPcdCcNodeTmp->ccKeySizeAccExtraction = p_CcNode->ccKeySizeAccExtraction;
-+ p_FmPcdCcNodeTmp->sizeOfExtraction = p_CcNode->sizeOfExtraction;
-+ p_FmPcdCcNodeTmp->glblMaskSize = p_CcNode->glblMaskSize;
-+ p_FmPcdCcNodeTmp->p_GlblMask = p_CcNode->p_GlblMask;
-+
-+ if (p_FmPcdCcNextEngineParams->nextEngine == e_FM_PCD_CC)
-+ {
-+ if (p_FmPcdCcNextEngineParams->h_Manip)
-+ {
-+ if (AllocAndFillAdForContLookupManip(p_FmPcdCcNextEngineParams->params.ccParams.h_CcNode)!= E_OK)
-+ {
-+ REPORT_ERROR(MAJOR, E_INVALID_STATE, NO_MSG);
-+ return NULL;
-+ }
-+ }
-+ FillAdOfTypeContLookup(h_Ad,
-+ NULL,
-+ p_CcNode->h_FmPcd,
-+ p_FmPcdCcNodeTmp,
-+ p_FmPcdCcNextEngineParams->h_Manip,
-+ NULL);
-+ }
-+
-+#if (DPAA_VERSION >= 11)
-+ if ((p_FmPcdCcNextEngineParams->nextEngine == e_FM_PCD_FR) &&
-+ (p_FmPcdCcNextEngineParams->params.frParams.h_FrmReplic))
-+ {
-+ FillAdOfTypeContLookup(h_Ad,
-+ NULL,
-+ p_CcNode->h_FmPcd,
-+ p_FmPcdCcNodeTmp,
-+ p_FmPcdCcNextEngineParams->h_Manip,
-+ p_FmPcdCcNextEngineParams->params.frParams.h_FrmReplic);
-+ }
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ XX_Free(p_FmPcdCcNodeTmp);
-+
-+ return E_OK;
-+}
-+
-+static t_Error DynamicChangeHc(t_Handle h_FmPcd,
-+ t_List *h_OldPointersLst,
-+ t_List *h_NewPointersLst,
-+ t_FmPcdModifyCcKeyAdditionalParams *p_AdditionalParams,
-+ bool useShadowStructs)
-+{
-+ t_List *p_PosOld, *p_PosNew;
-+ uint32_t oldAdAddrOffset, newAdAddrOffset;
-+ uint16_t i = 0;
-+ t_Error err = E_OK;
-+ uint8_t numOfModifiedPtr;
-+
-+ ASSERT_COND(h_FmPcd);
-+ ASSERT_COND(h_OldPointersLst);
-+ ASSERT_COND(h_NewPointersLst);
-+
-+ numOfModifiedPtr = (uint8_t)LIST_NumOfObjs(h_OldPointersLst);
-+
-+ p_PosNew = LIST_FIRST(h_NewPointersLst);
-+ p_PosOld = LIST_FIRST(h_OldPointersLst);
-+
-+ /* Retrieve address of new AD */
-+ newAdAddrOffset = FmPcdCcGetNodeAddrOffsetFromNodeInfo(h_FmPcd, p_PosNew);
-+ if (newAdAddrOffset == (uint32_t)ILLEGAL_BASE)
-+ {
-+ ReleaseModifiedDataStructure(h_FmPcd,
-+ h_OldPointersLst,
-+ h_NewPointersLst,
-+ 0,
-+ p_AdditionalParams,
-+ useShadowStructs);
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("New AD address"));
-+ }
-+
-+ for (i=0; ih_Hc, oldAdAddrOffset, newAdAddrOffset);
-+ if (err)
-+ {
-+ ReleaseModifiedDataStructure(h_FmPcd,
-+ h_OldPointersLst,
-+ h_NewPointersLst,
-+ i,
-+ p_AdditionalParams,
-+ useShadowStructs);
-+ RETURN_ERROR(MAJOR, err, ("For part of nodes changes are done - situation is danger"));
-+ }
-+
-+ p_PosOld = LIST_NEXT(p_PosOld);
-+ }
-+
-+ return E_OK;
-+}
-+
-+static t_Error DoDynamicChange(t_Handle h_FmPcd,
-+ t_List *h_OldPointersLst,
-+ t_List *h_NewPointersLst,
-+ t_FmPcdModifyCcKeyAdditionalParams *p_AdditionalParams,
-+ bool useShadowStructs)
-+{
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)(p_AdditionalParams->h_CurrentNode);
-+ t_List *p_PosNew;
-+ t_CcNodeInformation *p_CcNodeInfo;
-+ t_FmPcdCcNextEngineParams nextEngineParams;
-+ t_Handle h_Ad;
-+ uint32_t keySize;
-+ t_Error err = E_OK;
-+ uint8_t numOfModifiedPtr;
-+
-+ ASSERT_COND(h_FmPcd);
-+
-+ SANITY_CHECK_RETURN_ERROR((LIST_NumOfObjs(h_OldPointersLst) >= 1),E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR((LIST_NumOfObjs(h_NewPointersLst) == 1),E_INVALID_STATE);
-+
-+ memset(&nextEngineParams, 0, sizeof(t_FmPcdCcNextEngineParams));
-+
-+ numOfModifiedPtr = (uint8_t)LIST_NumOfObjs(h_OldPointersLst);
-+
-+ p_PosNew = LIST_FIRST(h_NewPointersLst);
-+
-+ /* Invoke host-command to copy from the new Ad to existing Ads */
-+ err = DynamicChangeHc(h_FmPcd, h_OldPointersLst, h_NewPointersLst, p_AdditionalParams, useShadowStructs);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ if (useShadowStructs)
-+ {
-+ /* When the host-command above has ended, the old structures are 'free'and we can update
-+ them by copying from the new shadow structures. */
-+ if (p_CcNode->lclMask)
-+ keySize = (uint32_t)(2 * p_CcNode->ccKeySizeAccExtraction);
-+ else
-+ keySize = p_CcNode->ccKeySizeAccExtraction;
-+
-+ IO2IOCpy32(p_AdditionalParams->p_KeysMatchTableOld,
-+ p_AdditionalParams->p_KeysMatchTableNew,
-+ p_CcNode->maxNumOfKeys * keySize * sizeof (uint8_t));
-+
-+ IO2IOCpy32(p_AdditionalParams->p_AdTableOld,
-+ p_AdditionalParams->p_AdTableNew,
-+ (uint32_t)((p_CcNode->maxNumOfKeys + 1) * FM_PCD_CC_AD_ENTRY_SIZE));
-+
-+ /* Retrieve the address of the allocated Ad */
-+ p_CcNodeInfo = CC_NODE_F_OBJECT(p_PosNew);
-+ h_Ad = p_CcNodeInfo->h_CcNode;
-+
-+ /* Build a new Ad that holds the old (now updated) structures */
-+ p_AdditionalParams->p_KeysMatchTableNew = p_AdditionalParams->p_KeysMatchTableOld;
-+ p_AdditionalParams->p_AdTableNew = p_AdditionalParams->p_AdTableOld;
-+
-+ nextEngineParams.nextEngine = e_FM_PCD_CC;
-+ nextEngineParams.params.ccParams.h_CcNode = (t_Handle)p_CcNode;
-+
-+ BuildNewAd(h_Ad, p_AdditionalParams, p_CcNode, &nextEngineParams);
-+
-+ /* HC to copy from the new Ad (old updated structures) to current Ad (uses shadow structures) */
-+ err = DynamicChangeHc(h_FmPcd, h_OldPointersLst, h_NewPointersLst, p_AdditionalParams, useShadowStructs);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+
-+ err = ReleaseModifiedDataStructure(h_FmPcd,
-+ h_OldPointersLst,
-+ h_NewPointersLst,
-+ numOfModifiedPtr,
-+ p_AdditionalParams,
-+ useShadowStructs);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ return E_OK;
-+}
-+
-+#ifdef FM_CAPWAP_SUPPORT
-+static bool IsCapwapApplSpecific(t_Handle h_Node)
-+{
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_Node;
-+ bool isManipForCapwapApplSpecificBuild = FALSE;
-+ int i = 0;
-+
-+ ASSERT_COND(h_Node);
-+ /* assumption that this function called only for INDEXED_FLOW_ID - so no miss*/
-+ for (i = 0; i < p_CcNode->numOfKeys; i++)
-+ {
-+ if ( p_CcNode->keyAndNextEngineParams[i].nextEngineParams.h_Manip &&
-+ FmPcdManipIsCapwapApplSpecific(p_CcNode->keyAndNextEngineParams[i].nextEngineParams.h_Manip))
-+ {
-+ isManipForCapwapApplSpecificBuild = TRUE;
-+ break;
-+ }
-+ }
-+ return isManipForCapwapApplSpecificBuild;
-+
-+}
-+#endif /* FM_CAPWAP_SUPPORT */
-+
-+static t_Error CcUpdateParam(t_Handle h_FmPcd,
-+ t_Handle h_PcdParams,
-+ t_Handle h_FmPort,
-+ t_FmPcdCcKeyAndNextEngineParams *p_CcKeyAndNextEngineParams,
-+ uint16_t numOfEntries,
-+ t_Handle h_Ad,
-+ bool validate,
-+ uint16_t level,
-+ t_Handle h_FmTree,
-+ bool modify)
-+{
-+ t_FmPcdCcNode *p_CcNode;
-+ t_Error err;
-+ uint16_t tmp = 0;
-+ int i = 0;
-+ t_FmPcdCcTree *p_CcTree = (t_FmPcdCcTree *) h_FmTree;
-+
-+ level++;
-+
-+ if (p_CcTree->h_IpReassemblyManip)
-+ {
-+ err = FmPcdManipUpdate(h_FmPcd,
-+ h_PcdParams,
-+ h_FmPort,
-+ p_CcTree->h_IpReassemblyManip,
-+ NULL,
-+ validate,
-+ level,
-+ h_FmTree,
-+ modify);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+
-+ if (numOfEntries)
-+ {
-+ for (i=0; ikeyAndNextEngineParams[p_CcNode->numOfKeys].nextEngineParams.nextEngine != e_FM_PCD_INVALID)
-+ tmp = (uint8_t)(p_CcNode->numOfKeys + 1);
-+ else
-+ tmp = p_CcNode->numOfKeys;
-+
-+ err = CcUpdateParam(h_FmPcd,
-+ h_PcdParams,
-+ h_FmPort,
-+ p_CcNode->keyAndNextEngineParams,
-+ tmp,
-+ p_CcNode->h_AdTable,
-+ validate,
-+ level,
-+ h_FmTree,
-+ modify);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+ else
-+ {
-+ if (p_CcKeyAndNextEngineParams[i].nextEngineParams.h_Manip)
-+ {
-+ err = FmPcdManipUpdate(h_FmPcd,
-+ NULL,
-+ h_FmPort,
-+ p_CcKeyAndNextEngineParams[i].nextEngineParams.h_Manip,
-+ h_Ad,
-+ validate,
-+ level,
-+ h_FmTree,
-+ modify);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+ }
-+ }
-+ }
-+
-+ return E_OK;
-+}
-+
-+static ccPrivateInfo_t IcDefineCode(t_FmPcdCcNodeParams *p_CcNodeParam)
-+{
-+ switch (p_CcNodeParam->extractCcParams.extractNonHdr.action)
-+ {
-+ case (e_FM_PCD_ACTION_EXACT_MATCH):
-+ switch (p_CcNodeParam->extractCcParams.extractNonHdr.src)
-+ {
-+ case (e_FM_PCD_EXTRACT_FROM_KEY):
-+ return CC_PRIVATE_INFO_IC_KEY_EXACT_MATCH;
-+ case (e_FM_PCD_EXTRACT_FROM_HASH):
-+ return CC_PRIVATE_INFO_IC_HASH_EXACT_MATCH;
-+ default:
-+ return CC_PRIVATE_INFO_NONE;
-+ }
-+
-+ case (e_FM_PCD_ACTION_INDEXED_LOOKUP):
-+ switch (p_CcNodeParam->extractCcParams.extractNonHdr.src)
-+ {
-+ case (e_FM_PCD_EXTRACT_FROM_HASH):
-+ return CC_PRIVATE_INFO_IC_HASH_INDEX_LOOKUP;
-+ case (e_FM_PCD_EXTRACT_FROM_FLOW_ID):
-+ return CC_PRIVATE_INFO_IC_DEQ_FQID_INDEX_LOOKUP;
-+ default:
-+ return CC_PRIVATE_INFO_NONE;
-+ }
-+
-+ default:
-+ break;
-+ }
-+
-+ return CC_PRIVATE_INFO_NONE;
-+}
-+
-+static t_CcNodeInformation * DequeueAdditionalInfoFromRelevantLst(t_List *p_List)
-+{
-+ t_CcNodeInformation *p_CcNodeInfo = NULL;
-+
-+ if (!LIST_IsEmpty(p_List))
-+ {
-+ p_CcNodeInfo = CC_NODE_F_OBJECT(p_List->p_Next);
-+ LIST_DelAndInit(&p_CcNodeInfo->node);
-+ }
-+
-+ return p_CcNodeInfo;
-+}
-+
-+void ReleaseLst(t_List *p_List)
-+{
-+ t_CcNodeInformation *p_CcNodeInfo = NULL;
-+
-+ if (!LIST_IsEmpty(p_List))
-+ {
-+ p_CcNodeInfo = DequeueAdditionalInfoFromRelevantLst(p_List);
-+ while (p_CcNodeInfo)
-+ {
-+ XX_Free(p_CcNodeInfo);
-+ p_CcNodeInfo = DequeueAdditionalInfoFromRelevantLst(p_List);
-+ }
-+ }
-+
-+ LIST_Del(p_List);
-+}
-+
-+static void DeleteNode(t_FmPcdCcNode *p_CcNode)
-+{
-+ uint32_t i;
-+
-+ if (!p_CcNode)
-+ return;
-+
-+ if (p_CcNode->p_GlblMask)
-+ {
-+ XX_Free(p_CcNode->p_GlblMask);
-+ p_CcNode->p_GlblMask = NULL;
-+ }
-+
-+ if (p_CcNode->h_KeysMatchTable)
-+ {
-+ FM_MURAM_FreeMem(FmPcdGetMuramHandle(p_CcNode->h_FmPcd), p_CcNode->h_KeysMatchTable);
-+ p_CcNode->h_KeysMatchTable = NULL;
-+ }
-+
-+ if (p_CcNode->h_AdTable)
-+ {
-+ FM_MURAM_FreeMem(FmPcdGetMuramHandle(p_CcNode->h_FmPcd), p_CcNode->h_AdTable);
-+ p_CcNode->h_AdTable = NULL;
-+ }
-+
-+ if (p_CcNode->h_Ad)
-+ {
-+ FM_MURAM_FreeMem(FmPcdGetMuramHandle(p_CcNode->h_FmPcd), p_CcNode->h_Ad);
-+ p_CcNode->h_Ad = NULL;
-+ }
-+
-+ if (p_CcNode->h_StatsFLRs)
-+ {
-+ FM_MURAM_FreeMem(FmPcdGetMuramHandle(p_CcNode->h_FmPcd), p_CcNode->h_StatsFLRs);
-+ p_CcNode->h_StatsFLRs = NULL;
-+ }
-+
-+ if (p_CcNode->h_Spinlock)
-+ {
-+ XX_FreeSpinlock(p_CcNode->h_Spinlock);
-+ p_CcNode->h_Spinlock = NULL;
-+ }
-+
-+ /* Releasing all currently used statistics objects, including 'miss' entry */
-+ for (i = 0; i < p_CcNode->numOfKeys + 1; i++)
-+ if (p_CcNode->keyAndNextEngineParams[i].p_StatsObj)
-+ PutStatsObj(p_CcNode, p_CcNode->keyAndNextEngineParams[i].p_StatsObj);
-+
-+ if (!LIST_IsEmpty(&p_CcNode->availableStatsLst))
-+ {
-+ t_Handle h_FmMuram = FmPcdGetMuramHandle(p_CcNode->h_FmPcd);
-+
-+ ASSERT_COND(h_FmMuram);
-+
-+ FreeStatObjects(&p_CcNode->availableStatsLst, h_FmMuram);
-+ }
-+
-+ LIST_Del(&p_CcNode->availableStatsLst);
-+
-+ ReleaseLst(&p_CcNode->ccPrevNodesLst);
-+ ReleaseLst(&p_CcNode->ccTreeIdLst);
-+ ReleaseLst(&p_CcNode->ccTreesLst);
-+
-+ XX_Free(p_CcNode);
-+}
-+
-+static void DeleteTree(t_FmPcdCcTree *p_FmPcdTree, t_FmPcd *p_FmPcd)
-+{
-+ if (p_FmPcdTree)
-+ {
-+ if (p_FmPcdTree->ccTreeBaseAddr)
-+ {
-+ FM_MURAM_FreeMem(FmPcdGetMuramHandle(p_FmPcd), UINT_TO_PTR(p_FmPcdTree->ccTreeBaseAddr));
-+ p_FmPcdTree->ccTreeBaseAddr = 0;
-+ }
-+
-+ ReleaseLst(&p_FmPcdTree->fmPortsLst);
-+
-+ XX_Free(p_FmPcdTree);
-+ }
-+}
-+
-+static void GetCcExtractKeySize(uint8_t parseCodeRealSize, uint8_t *parseCodeCcSize)
-+{
-+ if ((parseCodeRealSize > 0) && (parseCodeRealSize < 2))
-+ *parseCodeCcSize = 1;
-+ else if (parseCodeRealSize == 2)
-+ *parseCodeCcSize = 2;
-+ else if ((parseCodeRealSize > 2) && (parseCodeRealSize <= 4))
-+ *parseCodeCcSize = 4;
-+ else if ((parseCodeRealSize > 4) && (parseCodeRealSize <= 8))
-+ *parseCodeCcSize = 8;
-+ else if ((parseCodeRealSize > 8) && (parseCodeRealSize <= 16))
-+ *parseCodeCcSize = 16;
-+ else if ((parseCodeRealSize > 16) && (parseCodeRealSize <= 24))
-+ *parseCodeCcSize = 24;
-+ else if ((parseCodeRealSize > 24) && (parseCodeRealSize <= 32))
-+ *parseCodeCcSize = 32;
-+ else if ((parseCodeRealSize > 32) && (parseCodeRealSize <= 40))
-+ *parseCodeCcSize = 40;
-+ else if ((parseCodeRealSize > 40) && (parseCodeRealSize <= 48))
-+ *parseCodeCcSize = 48;
-+ else if ((parseCodeRealSize > 48) && (parseCodeRealSize <= 56))
-+ *parseCodeCcSize = 56;
-+ else
-+ *parseCodeCcSize = 0;
-+}
-+
-+static void GetSizeHeaderField(e_NetHeaderType hdr,
-+ e_FmPcdHdrIndex index,
-+ t_FmPcdFields field,
-+ uint8_t *parseCodeRealSize)
-+{
-+ UNUSED(index);
-+ switch (hdr)
-+ {
-+ case (HEADER_TYPE_ETH):
-+ switch (field.eth)
-+ {
-+ case (NET_HEADER_FIELD_ETH_DA):
-+ *parseCodeRealSize = 6;
-+ break;
-+
-+ case (NET_HEADER_FIELD_ETH_SA):
-+ *parseCodeRealSize = 6;
-+ break;
-+
-+ case (NET_HEADER_FIELD_ETH_TYPE):
-+ *parseCodeRealSize = 2;
-+ break;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported1"));
-+ *parseCodeRealSize = CC_SIZE_ILLEGAL;
-+ break;
-+ }
-+ break;
-+
-+ case (HEADER_TYPE_PPPoE):
-+ switch (field.pppoe)
-+ {
-+ case (NET_HEADER_FIELD_PPPoE_PID):
-+ *parseCodeRealSize = 2;
-+ break;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported1"));
-+ *parseCodeRealSize = CC_SIZE_ILLEGAL;
-+ break;
-+ }
-+ break;
-+
-+ case (HEADER_TYPE_VLAN):
-+ switch (field.vlan)
-+ {
-+ case (NET_HEADER_FIELD_VLAN_TCI):
-+ *parseCodeRealSize = 2;
-+ break;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported2"));
-+ *parseCodeRealSize = CC_SIZE_ILLEGAL;
-+ break;
-+ }
-+ break;
-+
-+ case (HEADER_TYPE_MPLS):
-+ switch (field.mpls)
-+ {
-+ case (NET_HEADER_FIELD_MPLS_LABEL_STACK):
-+ *parseCodeRealSize = 4;
-+ break;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported3"));
-+ *parseCodeRealSize = CC_SIZE_ILLEGAL;
-+ break;
-+ }
-+ break;
-+
-+ case (HEADER_TYPE_IPv4):
-+ switch (field.ipv4)
-+ {
-+ case (NET_HEADER_FIELD_IPv4_DST_IP):
-+ case (NET_HEADER_FIELD_IPv4_SRC_IP):
-+ *parseCodeRealSize = 4;
-+ break;
-+
-+ case (NET_HEADER_FIELD_IPv4_TOS):
-+ case (NET_HEADER_FIELD_IPv4_PROTO):
-+ *parseCodeRealSize = 1;
-+ break;
-+
-+ case (NET_HEADER_FIELD_IPv4_DST_IP | NET_HEADER_FIELD_IPv4_SRC_IP):
-+ *parseCodeRealSize = 8;
-+ break;
-+
-+ case (NET_HEADER_FIELD_IPv4_TTL):
-+ *parseCodeRealSize = 1;
-+ break;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported4"));
-+ *parseCodeRealSize = CC_SIZE_ILLEGAL;
-+ break;
-+ }
-+ break;
-+
-+ case (HEADER_TYPE_IPv6):
-+ switch (field.ipv6)
-+ {
-+ case (NET_HEADER_FIELD_IPv6_VER | NET_HEADER_FIELD_IPv6_FL | NET_HEADER_FIELD_IPv6_TC):
-+ *parseCodeRealSize = 4;
-+ break;
-+
-+ case (NET_HEADER_FIELD_IPv6_NEXT_HDR):
-+ case (NET_HEADER_FIELD_IPv6_HOP_LIMIT):
-+ *parseCodeRealSize = 1;
-+ break;
-+
-+ case (NET_HEADER_FIELD_IPv6_DST_IP):
-+ case (NET_HEADER_FIELD_IPv6_SRC_IP):
-+ *parseCodeRealSize = 16;
-+ break;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported5"));
-+ *parseCodeRealSize = CC_SIZE_ILLEGAL;
-+ break;
-+ }
-+ break;
-+
-+ case (HEADER_TYPE_IP):
-+ switch (field.ip)
-+ {
-+ case (NET_HEADER_FIELD_IP_DSCP):
-+ case (NET_HEADER_FIELD_IP_PROTO):
-+ *parseCodeRealSize = 1;
-+ break;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported5"));
-+ *parseCodeRealSize = CC_SIZE_ILLEGAL;
-+ break;
-+ }
-+ break;
-+
-+ case (HEADER_TYPE_GRE):
-+ switch (field.gre)
-+ {
-+ case ( NET_HEADER_FIELD_GRE_TYPE):
-+ *parseCodeRealSize = 2;
-+ break;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported6"));
-+ *parseCodeRealSize = CC_SIZE_ILLEGAL;
-+ break;
-+ }
-+ break;
-+
-+ case (HEADER_TYPE_MINENCAP):
-+ switch (field.minencap)
-+ {
-+ case (NET_HEADER_FIELD_MINENCAP_TYPE):
-+ *parseCodeRealSize = 1;
-+ break;
-+
-+ case (NET_HEADER_FIELD_MINENCAP_DST_IP):
-+ case (NET_HEADER_FIELD_MINENCAP_SRC_IP):
-+ *parseCodeRealSize = 4;
-+ break;
-+
-+ case (NET_HEADER_FIELD_MINENCAP_SRC_IP | NET_HEADER_FIELD_MINENCAP_DST_IP):
-+ *parseCodeRealSize = 8;
-+ break;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported7"));
-+ *parseCodeRealSize = CC_SIZE_ILLEGAL;
-+ break;
-+ }
-+ break;
-+
-+ case (HEADER_TYPE_TCP):
-+ switch (field.tcp)
-+ {
-+ case (NET_HEADER_FIELD_TCP_PORT_SRC):
-+ case (NET_HEADER_FIELD_TCP_PORT_DST):
-+ *parseCodeRealSize = 2;
-+ break;
-+
-+ case (NET_HEADER_FIELD_TCP_PORT_SRC | NET_HEADER_FIELD_TCP_PORT_DST):
-+ *parseCodeRealSize = 4;
-+ break;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported8"));
-+ *parseCodeRealSize = CC_SIZE_ILLEGAL;
-+ break;
-+ }
-+ break;
-+
-+ case (HEADER_TYPE_UDP):
-+ switch (field.udp)
-+ {
-+ case (NET_HEADER_FIELD_UDP_PORT_SRC):
-+ case (NET_HEADER_FIELD_UDP_PORT_DST):
-+ *parseCodeRealSize = 2;
-+ break;
-+
-+ case (NET_HEADER_FIELD_UDP_PORT_SRC | NET_HEADER_FIELD_UDP_PORT_DST):
-+ *parseCodeRealSize = 4;
-+ break;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported9"));
-+ *parseCodeRealSize = CC_SIZE_ILLEGAL;
-+ break;
-+ }
-+ break;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported10"));
-+ *parseCodeRealSize = CC_SIZE_ILLEGAL;
-+ break;
-+ }
-+}
-+
-+t_Error ValidateNextEngineParams(t_Handle h_FmPcd,
-+ t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams,
-+ e_FmPcdCcStatsMode statsMode)
-+{
-+ uint16_t absoluteProfileId;
-+ t_Error err = E_OK;
-+ uint8_t relativeSchemeId;
-+
-+ if ((statsMode == e_FM_PCD_CC_STATS_MODE_NONE) &&
-+ (p_FmPcdCcNextEngineParams->statisticsEn))
-+ RETURN_ERROR(MAJOR, E_CONFLICT,
-+ ("Statistics are requested for a key, but statistics mode was set"
-+ "to 'NONE' upon initialization of this match table"));
-+
-+ switch (p_FmPcdCcNextEngineParams->nextEngine)
-+ {
-+ case (e_FM_PCD_INVALID):
-+ err = E_NOT_SUPPORTED;
-+ break;
-+
-+ case (e_FM_PCD_DONE):
-+ if ((p_FmPcdCcNextEngineParams->params.enqueueParams.action == e_FM_PCD_ENQ_FRAME) &&
-+ p_FmPcdCcNextEngineParams->params.enqueueParams.overrideFqid)
-+ {
-+ if (!p_FmPcdCcNextEngineParams->params.enqueueParams.newFqid)
-+ RETURN_ERROR(MAJOR, E_CONFLICT, ("When overrideFqid is set, newFqid must not be zero"));
-+ if (p_FmPcdCcNextEngineParams->params.enqueueParams.newFqid & ~0x00FFFFFF)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("fqidForCtrlFlow must be between 1 and 2^24-1"));
-+ }
-+ break;
-+
-+ case (e_FM_PCD_KG):
-+ relativeSchemeId = FmPcdKgGetRelativeSchemeId(h_FmPcd,
-+ FmPcdKgGetSchemeId(p_FmPcdCcNextEngineParams->params.kgParams.h_DirectScheme));
-+ if (relativeSchemeId == FM_PCD_KG_NUM_OF_SCHEMES)
-+ RETURN_ERROR(MAJOR, E_NOT_IN_RANGE, NO_MSG);
-+ if (!FmPcdKgIsSchemeValidSw(p_FmPcdCcNextEngineParams->params.kgParams.h_DirectScheme))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("not valid schemeIndex in KG next engine param"));
-+ if (!KgIsSchemeAlwaysDirect(h_FmPcd, relativeSchemeId))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("CC Node may point only to a scheme that is always direct."));
-+ break;
-+
-+ case (e_FM_PCD_PLCR):
-+ if (p_FmPcdCcNextEngineParams->params.plcrParams.overrideParams)
-+ {
-+ /* if private policer profile, it may be uninitialized yet, therefore no checks are done at this stage */
-+ if (p_FmPcdCcNextEngineParams->params.plcrParams.sharedProfile)
-+ {
-+ err = FmPcdPlcrGetAbsoluteIdByProfileParams(h_FmPcd,
-+ e_FM_PCD_PLCR_SHARED,
-+ NULL,
-+ p_FmPcdCcNextEngineParams->params.plcrParams.newRelativeProfileId,
-+ &absoluteProfileId);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, ("Shared profile offset is out of range"));
-+ if (!FmPcdPlcrIsProfileValid(h_FmPcd, absoluteProfileId))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Invalid profile"));
-+ }
-+ }
-+ break;
-+
-+ case (e_FM_PCD_HASH):
-+ p_FmPcdCcNextEngineParams->nextEngine = e_FM_PCD_CC;
-+ case (e_FM_PCD_CC):
-+ if (!p_FmPcdCcNextEngineParams->params.ccParams.h_CcNode)
-+ RETURN_ERROR(MAJOR, E_NULL_POINTER, ("handler to next Node is NULL"));
-+ break;
-+
-+#if (DPAA_VERSION >= 11)
-+ case (e_FM_PCD_FR):
-+ if (!p_FmPcdCcNextEngineParams->params.frParams.h_FrmReplic)
-+ err = E_NOT_SUPPORTED;
-+ break;
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Next engine is not correct"));
-+ }
-+
-+
-+ return err;
-+}
-+
-+static uint8_t GetGenParseCode(t_Handle h_FmPcd,
-+ e_FmPcdExtractFrom src,
-+ uint32_t offset,
-+ bool glblMask,
-+ uint8_t *parseArrayOffset,
-+ bool fromIc,
-+ ccPrivateInfo_t icCode)
-+{
-+ UNUSED(h_FmPcd);
-+
-+ if (!fromIc)
-+ {
-+ switch (src)
-+ {
-+ case (e_FM_PCD_EXTRACT_FROM_FRAME_START):
-+ if (glblMask)
-+ return CC_PC_GENERIC_WITH_MASK ;
-+ else
-+ return CC_PC_GENERIC_WITHOUT_MASK;
-+
-+ case (e_FM_PCD_EXTRACT_FROM_CURR_END_OF_PARSE):
-+ *parseArrayOffset = CC_PC_PR_NEXT_HEADER_OFFSET;
-+ if (offset)
-+ return CC_PR_OFFSET;
-+ else
-+ return CC_PR_WITHOUT_OFFSET;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_INVALID_VALUE, ("Illegal 'extract from' src"));
-+ return CC_PC_ILLEGAL;
-+ }
-+ }
-+ else
-+ {
-+ switch (icCode)
-+ {
-+ case (CC_PRIVATE_INFO_IC_KEY_EXACT_MATCH):
-+ *parseArrayOffset = 0x50;
-+ return CC_PC_GENERIC_IC_GMASK;
-+
-+ case (CC_PRIVATE_INFO_IC_HASH_EXACT_MATCH):
-+ *parseArrayOffset = 0x48;
-+ return CC_PC_GENERIC_IC_GMASK;
-+
-+ case (CC_PRIVATE_INFO_IC_HASH_INDEX_LOOKUP):
-+ *parseArrayOffset = 0x48;
-+ return CC_PC_GENERIC_IC_HASH_INDEXED;
-+
-+ case (CC_PRIVATE_INFO_IC_DEQ_FQID_INDEX_LOOKUP):
-+ *parseArrayOffset = 0x16;
-+ return CC_PC_GENERIC_IC_HASH_INDEXED;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_INVALID_VALUE, ("Illegal 'extract from' src"));
-+ break;
-+ }
-+ }
-+
-+ return CC_PC_ILLEGAL;
-+}
-+
-+static uint8_t GetFullFieldParseCode(e_NetHeaderType hdr,
-+ e_FmPcdHdrIndex index,
-+ t_FmPcdFields field)
-+{
-+ switch (hdr)
-+ {
-+ case (HEADER_TYPE_NONE):
-+ ASSERT_COND(FALSE);
-+ return CC_PC_ILLEGAL;
-+
-+ case (HEADER_TYPE_ETH):
-+ switch (field.eth)
-+ {
-+ case (NET_HEADER_FIELD_ETH_DA):
-+ return CC_PC_FF_MACDST;
-+ case (NET_HEADER_FIELD_ETH_SA):
-+ return CC_PC_FF_MACSRC;
-+ case (NET_HEADER_FIELD_ETH_TYPE):
-+ return CC_PC_FF_ETYPE;
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return CC_PC_ILLEGAL;
-+ }
-+
-+ case (HEADER_TYPE_VLAN):
-+ switch (field.vlan)
-+ {
-+ case (NET_HEADER_FIELD_VLAN_TCI):
-+ if ((index == e_FM_PCD_HDR_INDEX_NONE) || (index == e_FM_PCD_HDR_INDEX_1))
-+ return CC_PC_FF_TCI1;
-+ if (index == e_FM_PCD_HDR_INDEX_LAST)
-+ return CC_PC_FF_TCI2;
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return CC_PC_ILLEGAL;
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return CC_PC_ILLEGAL;
-+ }
-+
-+ case (HEADER_TYPE_MPLS):
-+ switch (field.mpls)
-+ {
-+ case (NET_HEADER_FIELD_MPLS_LABEL_STACK):
-+ if ((index == e_FM_PCD_HDR_INDEX_NONE) || (index == e_FM_PCD_HDR_INDEX_1))
-+ return CC_PC_FF_MPLS1;
-+ if (index == e_FM_PCD_HDR_INDEX_LAST)
-+ return CC_PC_FF_MPLS_LAST;
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal MPLS index"));
-+ return CC_PC_ILLEGAL;
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return CC_PC_ILLEGAL;
-+ }
-+
-+ case (HEADER_TYPE_IPv4):
-+ switch (field.ipv4)
-+ {
-+ case (NET_HEADER_FIELD_IPv4_DST_IP):
-+ if ((index == e_FM_PCD_HDR_INDEX_NONE) || (index == e_FM_PCD_HDR_INDEX_1))
-+ return CC_PC_FF_IPV4DST1;
-+ if (index == e_FM_PCD_HDR_INDEX_2)
-+ return CC_PC_FF_IPV4DST2;
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal IPv4 index"));
-+ return CC_PC_ILLEGAL;
-+ case (NET_HEADER_FIELD_IPv4_TOS):
-+ if ((index == e_FM_PCD_HDR_INDEX_NONE) || (index == e_FM_PCD_HDR_INDEX_1))
-+ return CC_PC_FF_IPV4IPTOS_TC1;
-+ if (index == e_FM_PCD_HDR_INDEX_2)
-+ return CC_PC_FF_IPV4IPTOS_TC2;
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal IPv4 index"));
-+ return CC_PC_ILLEGAL;
-+ case (NET_HEADER_FIELD_IPv4_PROTO):
-+ if ((index == e_FM_PCD_HDR_INDEX_NONE) || (index == e_FM_PCD_HDR_INDEX_1))
-+ return CC_PC_FF_IPV4PTYPE1;
-+ if(index == e_FM_PCD_HDR_INDEX_2)
-+ return CC_PC_FF_IPV4PTYPE2;
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal IPv4 index"));
-+ return CC_PC_ILLEGAL;
-+ case (NET_HEADER_FIELD_IPv4_SRC_IP):
-+ if ((index == e_FM_PCD_HDR_INDEX_NONE) || (index == e_FM_PCD_HDR_INDEX_1))
-+ return CC_PC_FF_IPV4SRC1;
-+ if (index == e_FM_PCD_HDR_INDEX_2)
-+ return CC_PC_FF_IPV4SRC2;
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal IPv4 index"));
-+ return CC_PC_ILLEGAL;
-+ case (NET_HEADER_FIELD_IPv4_SRC_IP | NET_HEADER_FIELD_IPv4_DST_IP):
-+ if ((index == e_FM_PCD_HDR_INDEX_NONE) || (index == e_FM_PCD_HDR_INDEX_1))
-+ return CC_PC_FF_IPV4SRC1_IPV4DST1;
-+ if (index == e_FM_PCD_HDR_INDEX_2)
-+ return CC_PC_FF_IPV4SRC2_IPV4DST2;
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal IPv4 index"));
-+ return CC_PC_ILLEGAL;
-+ case (NET_HEADER_FIELD_IPv4_TTL):
-+ return CC_PC_FF_IPV4TTL;
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return CC_PC_ILLEGAL;
-+ }
-+
-+ case (HEADER_TYPE_IPv6):
-+ switch (field.ipv6)
-+ {
-+ case (NET_HEADER_FIELD_IPv6_VER | NET_HEADER_FIELD_IPv6_FL | NET_HEADER_FIELD_IPv6_TC):
-+ if ((index == e_FM_PCD_HDR_INDEX_NONE) || (index == e_FM_PCD_HDR_INDEX_1))
-+ return CC_PC_FF_IPTOS_IPV6TC1_IPV6FLOW1;
-+ if (index == e_FM_PCD_HDR_INDEX_2)
-+ return CC_PC_FF_IPTOS_IPV6TC2_IPV6FLOW2;
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal IPv6 index"));
-+ return CC_PC_ILLEGAL;
-+
-+ case (NET_HEADER_FIELD_IPv6_NEXT_HDR):
-+ if ((index == e_FM_PCD_HDR_INDEX_NONE) || (index == e_FM_PCD_HDR_INDEX_1))
-+ return CC_PC_FF_IPV6PTYPE1;
-+ if (index == e_FM_PCD_HDR_INDEX_2)
-+ return CC_PC_FF_IPV6PTYPE2;
-+ if (index == e_FM_PCD_HDR_INDEX_LAST)
-+ return CC_PC_FF_IPPID;
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal IPv6 index"));
-+ return CC_PC_ILLEGAL;
-+
-+ case (NET_HEADER_FIELD_IPv6_DST_IP):
-+ if ((index == e_FM_PCD_HDR_INDEX_NONE) || (index == e_FM_PCD_HDR_INDEX_1))
-+ return CC_PC_FF_IPV6DST1;
-+ if (index == e_FM_PCD_HDR_INDEX_2)
-+ return CC_PC_FF_IPV6DST2;
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal IPv6 index"));
-+ return CC_PC_ILLEGAL;
-+
-+ case (NET_HEADER_FIELD_IPv6_SRC_IP):
-+ if ((index == e_FM_PCD_HDR_INDEX_NONE) || (index == e_FM_PCD_HDR_INDEX_1))
-+ return CC_PC_FF_IPV6SRC1;
-+ if (index == e_FM_PCD_HDR_INDEX_2)
-+ return CC_PC_FF_IPV6SRC2;
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal IPv6 index"));
-+ return CC_PC_ILLEGAL;
-+
-+ case (NET_HEADER_FIELD_IPv6_HOP_LIMIT):
-+ return CC_PC_FF_IPV6HOP_LIMIT;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return CC_PC_ILLEGAL;
-+ }
-+
-+ case (HEADER_TYPE_IP):
-+ switch (field.ip)
-+ {
-+ case (NET_HEADER_FIELD_IP_DSCP):
-+ if ((index == e_FM_PCD_HDR_INDEX_NONE) || (index == e_FM_PCD_HDR_INDEX_1))
-+ return CC_PC_FF_IPDSCP;
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal IP index"));
-+ return CC_PC_ILLEGAL;
-+
-+ case (NET_HEADER_FIELD_IP_PROTO):
-+ if (index == e_FM_PCD_HDR_INDEX_LAST)
-+ return CC_PC_FF_IPPID;
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal IP index"));
-+ return CC_PC_ILLEGAL;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return CC_PC_ILLEGAL;
-+ }
-+
-+ case (HEADER_TYPE_GRE):
-+ switch (field.gre)
-+ {
-+ case (NET_HEADER_FIELD_GRE_TYPE):
-+ return CC_PC_FF_GREPTYPE;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return CC_PC_ILLEGAL;
-+ }
-+
-+ case (HEADER_TYPE_MINENCAP):
-+ switch (field.minencap)
-+ {
-+ case (NET_HEADER_FIELD_MINENCAP_TYPE):
-+ return CC_PC_FF_MINENCAP_PTYPE;
-+
-+ case (NET_HEADER_FIELD_MINENCAP_DST_IP):
-+ return CC_PC_FF_MINENCAP_IPDST;
-+
-+ case (NET_HEADER_FIELD_MINENCAP_SRC_IP):
-+ return CC_PC_FF_MINENCAP_IPSRC;
-+
-+ case (NET_HEADER_FIELD_MINENCAP_SRC_IP | NET_HEADER_FIELD_MINENCAP_DST_IP):
-+ return CC_PC_FF_MINENCAP_IPSRC_IPDST;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return CC_PC_ILLEGAL;
-+ }
-+
-+ case (HEADER_TYPE_TCP):
-+ switch (field.tcp)
-+ {
-+ case (NET_HEADER_FIELD_TCP_PORT_SRC):
-+ return CC_PC_FF_L4PSRC;
-+
-+ case (NET_HEADER_FIELD_TCP_PORT_DST):
-+ return CC_PC_FF_L4PDST;
-+
-+ case (NET_HEADER_FIELD_TCP_PORT_DST | NET_HEADER_FIELD_TCP_PORT_SRC):
-+ return CC_PC_FF_L4PSRC_L4PDST;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return CC_PC_ILLEGAL;
-+ }
-+
-+ case (HEADER_TYPE_PPPoE):
-+ switch (field.pppoe)
-+ {
-+ case (NET_HEADER_FIELD_PPPoE_PID):
-+ return CC_PC_FF_PPPPID;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return CC_PC_ILLEGAL;
-+ }
-+
-+ case (HEADER_TYPE_UDP):
-+ switch (field.udp)
-+ {
-+ case (NET_HEADER_FIELD_UDP_PORT_SRC):
-+ return CC_PC_FF_L4PSRC;
-+
-+ case (NET_HEADER_FIELD_UDP_PORT_DST):
-+ return CC_PC_FF_L4PDST;
-+
-+ case (NET_HEADER_FIELD_UDP_PORT_DST | NET_HEADER_FIELD_UDP_PORT_SRC):
-+ return CC_PC_FF_L4PSRC_L4PDST;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return CC_PC_ILLEGAL;
-+ }
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return CC_PC_ILLEGAL;
-+ }
-+}
-+
-+static uint8_t GetPrParseCode(e_NetHeaderType hdr,
-+ e_FmPcdHdrIndex hdrIndex,
-+ uint32_t offset,
-+ bool glblMask,
-+ uint8_t *parseArrayOffset)
-+{
-+ bool offsetRelevant = FALSE;
-+
-+ if (offset)
-+ offsetRelevant = TRUE;
-+
-+ switch (hdr)
-+ {
-+ case (HEADER_TYPE_NONE):
-+ ASSERT_COND(FALSE);
-+ return CC_PC_ILLEGAL;
-+
-+ case (HEADER_TYPE_ETH):
-+ *parseArrayOffset = (uint8_t)CC_PC_PR_ETH_OFFSET;
-+ break;
-+
-+ case (HEADER_TYPE_USER_DEFINED_SHIM1):
-+ if (offset || glblMask)
-+ *parseArrayOffset = (uint8_t)CC_PC_PR_USER_DEFINED_SHIM1_OFFSET;
-+ else
-+ return CC_PC_PR_SHIM1;
-+ break;
-+
-+ case (HEADER_TYPE_USER_DEFINED_SHIM2):
-+ if (offset || glblMask)
-+ *parseArrayOffset = (uint8_t)CC_PC_PR_USER_DEFINED_SHIM2_OFFSET;
-+ else
-+ return CC_PC_PR_SHIM2;
-+ break;
-+
-+ case (HEADER_TYPE_LLC_SNAP):
-+ *parseArrayOffset = CC_PC_PR_USER_LLC_SNAP_OFFSET;
-+ break;
-+
-+ case (HEADER_TYPE_PPPoE):
-+ *parseArrayOffset = CC_PC_PR_PPPOE_OFFSET;
-+ break;
-+
-+ case (HEADER_TYPE_MPLS):
-+ if ((hdrIndex == e_FM_PCD_HDR_INDEX_NONE) || (hdrIndex == e_FM_PCD_HDR_INDEX_1))
-+ *parseArrayOffset = CC_PC_PR_MPLS1_OFFSET;
-+ else if (hdrIndex == e_FM_PCD_HDR_INDEX_LAST)
-+ *parseArrayOffset = CC_PC_PR_MPLS_LAST_OFFSET;
-+ else
-+ {
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal MPLS header index"));
-+ return CC_PC_ILLEGAL;
-+ }
-+ break;
-+
-+ case (HEADER_TYPE_IPv4):
-+ case (HEADER_TYPE_IPv6):
-+ if ((hdrIndex == e_FM_PCD_HDR_INDEX_NONE) || (hdrIndex == e_FM_PCD_HDR_INDEX_1))
-+ *parseArrayOffset = CC_PC_PR_IP1_OFFSET;
-+ else if (hdrIndex == e_FM_PCD_HDR_INDEX_2)
-+ *parseArrayOffset = CC_PC_PR_IP_LAST_OFFSET;
-+ else
-+ {
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal IP header index"));
-+ return CC_PC_ILLEGAL;
-+ }
-+ break;
-+
-+ case (HEADER_TYPE_MINENCAP):
-+ *parseArrayOffset = CC_PC_PR_MINENC_OFFSET;
-+ break;
-+
-+ case (HEADER_TYPE_GRE):
-+ *parseArrayOffset = CC_PC_PR_GRE_OFFSET;
-+ break;
-+
-+ case (HEADER_TYPE_TCP):
-+ case (HEADER_TYPE_UDP):
-+ case (HEADER_TYPE_IPSEC_AH):
-+ case (HEADER_TYPE_IPSEC_ESP):
-+ case (HEADER_TYPE_DCCP):
-+ case (HEADER_TYPE_SCTP):
-+ *parseArrayOffset = CC_PC_PR_L4_OFFSET;
-+ break;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal IP header for this type of operation"));
-+ return CC_PC_ILLEGAL;
-+ }
-+
-+ if (offsetRelevant)
-+ return CC_PR_OFFSET;
-+ else
-+ return CC_PR_WITHOUT_OFFSET;
-+}
-+
-+static uint8_t GetFieldParseCode(e_NetHeaderType hdr,
-+ t_FmPcdFields field,
-+ uint32_t offset,
-+ uint8_t *parseArrayOffset,
-+ e_FmPcdHdrIndex hdrIndex)
-+{
-+ bool offsetRelevant = FALSE;
-+
-+ if (offset)
-+ offsetRelevant = TRUE;
-+
-+ switch (hdr)
-+ {
-+ case (HEADER_TYPE_NONE):
-+ ASSERT_COND(FALSE);
-+ case (HEADER_TYPE_ETH):
-+ switch (field.eth)
-+ {
-+ case (NET_HEADER_FIELD_ETH_TYPE):
-+ *parseArrayOffset = CC_PC_PR_ETYPE_LAST_OFFSET;
-+ break;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return CC_PC_ILLEGAL;
-+ }
-+ break;
-+
-+ case (HEADER_TYPE_VLAN):
-+ switch (field.vlan)
-+ {
-+ case (NET_HEADER_FIELD_VLAN_TCI):
-+ if ((hdrIndex == e_FM_PCD_HDR_INDEX_NONE) || (hdrIndex == e_FM_PCD_HDR_INDEX_1))
-+ *parseArrayOffset = CC_PC_PR_VLAN1_OFFSET;
-+ else if (hdrIndex == e_FM_PCD_HDR_INDEX_LAST)
-+ *parseArrayOffset = CC_PC_PR_VLAN2_OFFSET;
-+ break;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return CC_PC_ILLEGAL;
-+ }
-+ break;
-+
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal header "));
-+ return CC_PC_ILLEGAL;
-+ }
-+
-+ if (offsetRelevant)
-+ return CC_PR_OFFSET;
-+ else
-+ return CC_PR_WITHOUT_OFFSET;
-+}
-+
-+static void FillAdOfTypeResult(t_Handle h_Ad,
-+ t_FmPcdCcStatsParams *p_FmPcdCcStatsParams,
-+ t_FmPcd *p_FmPcd,
-+ t_FmPcdCcNextEngineParams *p_CcNextEngineParams)
-+{
-+ t_AdOfTypeResult *p_AdResult = (t_AdOfTypeResult *)h_Ad;
-+ t_Handle h_TmpAd;
-+ uint32_t tmp = 0, tmpNia = 0;
-+ uint16_t profileId;
-+ t_Handle p_AdNewPtr = NULL;
-+
-+ /* There are 3 cases handled in this routine of building a "result" type AD.
-+ * Case 1: No Manip. The action descriptor is built within the match table.
-+ * Case 2: Manip exists. A new AD is created - p_AdNewPtr. It is initialized
-+ * either in the FmPcdManipUpdateAdResultForCc routine or it was already
-+ * initialized and returned here.
-+ * p_AdResult (within the match table) will be initialized after
-+ * this routine returns and point to the existing AD.
-+ * Case 3: Manip exists. The action descriptor is built within the match table.
-+ * FmPcdManipUpdateAdResultForCc returns a NULL p_AdNewPtr.
-+ *
-+ * If statistics were enabled and the statistics mode of this node requires
-+ * a statistics Ad, it will be placed after the result Ad and before the
-+ * manip Ad, if manip Ad exists here.
-+ */
-+
-+ /* As default, the "new" ptr is the current one. i.e. the content of the result
-+ * AD will be written into the match table itself (case (1))*/
-+ p_AdNewPtr = p_AdResult;
-+
-+ /* Initialize an action descriptor, if current statistics mode requires an Ad */
-+ if (p_FmPcdCcStatsParams)
-+ {
-+ ASSERT_COND(p_FmPcdCcStatsParams->h_StatsAd);
-+ ASSERT_COND(p_FmPcdCcStatsParams->h_StatsCounters);
-+
-+ /* Swapping addresses between statistics Ad and the current lookup AD addresses */
-+ h_TmpAd = p_FmPcdCcStatsParams->h_StatsAd;
-+ p_FmPcdCcStatsParams->h_StatsAd = h_Ad;
-+ h_Ad = h_TmpAd;
-+
-+ p_AdNewPtr = h_Ad;
-+ p_AdResult = h_Ad;
-+
-+ /* Init statistics Ad and connect current lookup AD as 'next action' from statistics Ad */
-+ UpdateStatsAd(p_FmPcdCcStatsParams,
-+ h_Ad,
-+ p_FmPcd->physicalMuramBase);
-+ }
-+
-+ /* Create manip and return p_AdNewPtr to either a new descriptor or NULL */
-+ if (p_CcNextEngineParams->h_Manip)
-+ FmPcdManipUpdateAdResultForCc(p_CcNextEngineParams->h_Manip,
-+ p_CcNextEngineParams,
-+ h_Ad,
-+ &p_AdNewPtr);
-+
-+ /* if (p_AdNewPtr = NULL) --> Done. (case (3)) */
-+ if (p_AdNewPtr)
-+ {
-+ /* case (1) and (2) */
-+ switch (p_CcNextEngineParams->nextEngine)
-+ {
-+ case (e_FM_PCD_DONE):
-+ if (p_CcNextEngineParams->params.enqueueParams.action == e_FM_PCD_ENQ_FRAME)
-+ {
-+ if (p_CcNextEngineParams->params.enqueueParams.overrideFqid)
-+ {
-+ tmp = FM_PCD_AD_RESULT_CONTRL_FLOW_TYPE;
-+ tmp |= p_CcNextEngineParams->params.enqueueParams.newFqid;
-+#if (DPAA_VERSION >= 11)
-+ tmp |= (p_CcNextEngineParams->params.enqueueParams.newRelativeStorageProfileId & FM_PCD_AD_RESULT_VSP_MASK) << FM_PCD_AD_RESULT_VSP_SHIFT;
-+#endif /* (DPAA_VERSION >= 11) */
-+ }
-+ else
-+ {
-+ tmp = FM_PCD_AD_RESULT_DATA_FLOW_TYPE;
-+ tmp |= FM_PCD_AD_RESULT_PLCR_DIS;
-+ }
-+ }
-+
-+ if (p_CcNextEngineParams->params.enqueueParams.action == e_FM_PCD_DROP_FRAME)
-+ tmpNia |= GET_NIA_BMI_AC_DISCARD_FRAME(p_FmPcd);
-+ else
-+ tmpNia |= GET_NIA_BMI_AC_ENQ_FRAME(p_FmPcd);
-+ break;
-+
-+ case (e_FM_PCD_KG):
-+ if (p_CcNextEngineParams->params.kgParams.overrideFqid)
-+ {
-+ tmp = FM_PCD_AD_RESULT_CONTRL_FLOW_TYPE;
-+ tmp |= p_CcNextEngineParams->params.kgParams.newFqid;
-+#if (DPAA_VERSION >= 11)
-+ tmp |= (p_CcNextEngineParams->params.kgParams.newRelativeStorageProfileId & FM_PCD_AD_RESULT_VSP_MASK) << FM_PCD_AD_RESULT_VSP_SHIFT;
-+#endif /* (DPAA_VERSION >= 11) */
-+ }
-+ else
-+ {
-+ tmp = FM_PCD_AD_RESULT_DATA_FLOW_TYPE;
-+ tmp |= FM_PCD_AD_RESULT_PLCR_DIS;
-+ }
-+ tmpNia = NIA_KG_DIRECT;
-+ tmpNia |= NIA_ENG_KG;
-+ tmpNia |= NIA_KG_CC_EN;
-+ tmpNia |= FmPcdKgGetSchemeId(p_CcNextEngineParams->params.kgParams.h_DirectScheme);
-+ break;
-+
-+ case (e_FM_PCD_PLCR):
-+ tmp = 0;
-+ if (p_CcNextEngineParams->params.plcrParams.overrideParams)
-+ {
-+ tmp = FM_PCD_AD_RESULT_CONTRL_FLOW_TYPE;
-+
-+ /* if private policer profile, it may be uninitialized yet, therefore no checks are done at this stage */
-+ if (p_CcNextEngineParams->params.plcrParams.sharedProfile)
-+ {
-+ tmpNia |= NIA_PLCR_ABSOLUTE;
-+ FmPcdPlcrGetAbsoluteIdByProfileParams((t_Handle)p_FmPcd,
-+ e_FM_PCD_PLCR_SHARED,
-+ NULL,
-+ p_CcNextEngineParams->params.plcrParams.newRelativeProfileId,
-+ &profileId);
-+ }
-+ else
-+ profileId = p_CcNextEngineParams->params.plcrParams.newRelativeProfileId;
-+
-+ tmp |= p_CcNextEngineParams->params.plcrParams.newFqid;
-+#if (DPAA_VERSION >= 11)
-+ tmp |= (p_CcNextEngineParams->params.plcrParams.newRelativeStorageProfileId & FM_PCD_AD_RESULT_VSP_MASK)<< FM_PCD_AD_RESULT_VSP_SHIFT;
-+#endif /* (DPAA_VERSION >= 11) */
-+ WRITE_UINT32(p_AdResult->plcrProfile,(uint32_t)((uint32_t)profileId << FM_PCD_AD_PROFILEID_FOR_CNTRL_SHIFT));
-+ }
-+ else
-+ tmp = FM_PCD_AD_RESULT_DATA_FLOW_TYPE;
-+
-+ tmpNia |= NIA_ENG_PLCR | p_CcNextEngineParams->params.plcrParams.newRelativeProfileId;
-+ break;
-+
-+ default:
-+ return;
-+ }
-+ WRITE_UINT32(p_AdResult->fqid, tmp);
-+
-+ if (p_CcNextEngineParams->h_Manip)
-+ {
-+ tmp = GET_UINT32(p_AdResult->plcrProfile);
-+ tmp |= (uint32_t)(XX_VirtToPhys(p_AdNewPtr) - (p_FmPcd->physicalMuramBase)) >> 4;
-+ WRITE_UINT32(p_AdResult->plcrProfile, tmp);
-+
-+ tmpNia |= FM_PCD_AD_RESULT_EXTENDED_MODE;
-+ tmpNia |= FM_PCD_AD_RESULT_NADEN;
-+ }
-+
-+#if (DPAA_VERSION >= 11)
-+ tmpNia |= FM_PCD_AD_RESULT_NO_OM_VSPE;
-+#endif /* (DPAA_VERSION >= 11) */
-+ WRITE_UINT32(p_AdResult->nia, tmpNia);
-+ }
-+}
-+
-+static t_Error CcUpdateParams(t_Handle h_FmPcd,
-+ t_Handle h_PcdParams,
-+ t_Handle h_FmPort,
-+ t_Handle h_FmTree,
-+ bool validate)
-+{
-+ t_FmPcdCcTree *p_CcTree = (t_FmPcdCcTree *) h_FmTree;
-+
-+ return CcUpdateParam(h_FmPcd,
-+ h_PcdParams,
-+ h_FmPort,
-+ p_CcTree->keyAndNextEngineParams,
-+ p_CcTree->numOfEntries,
-+ UINT_TO_PTR(p_CcTree->ccTreeBaseAddr),
-+ validate,
-+ 0,
-+ h_FmTree,
-+ FALSE);
-+}
-+
-+
-+static void ReleaseNewNodeCommonPart(t_FmPcdModifyCcKeyAdditionalParams *p_AdditionalInfo)
-+{
-+ if (p_AdditionalInfo->p_AdTableNew)
-+ FM_MURAM_FreeMem(FmPcdGetMuramHandle(((t_FmPcdCcNode *)(p_AdditionalInfo->h_CurrentNode))->h_FmPcd),
-+ p_AdditionalInfo->p_AdTableNew);
-+
-+ if (p_AdditionalInfo->p_KeysMatchTableNew)
-+ FM_MURAM_FreeMem(FmPcdGetMuramHandle(((t_FmPcdCcNode *)(p_AdditionalInfo->h_CurrentNode))->h_FmPcd),
-+ p_AdditionalInfo->p_KeysMatchTableNew);
-+}
-+
-+static t_Error UpdateGblMask(t_FmPcdCcNode *p_CcNode,
-+ uint8_t keySize,
-+ uint8_t *p_Mask)
-+{
-+ uint8_t prvGlblMaskSize = p_CcNode->glblMaskSize;
-+
-+ if (p_Mask &&
-+ !p_CcNode->glblMaskUpdated &&
-+ (keySize <= 4) &&
-+ !p_CcNode->lclMask)
-+ {
-+ memcpy(p_CcNode->p_GlblMask, p_Mask, (sizeof(uint8_t))*keySize);
-+ p_CcNode->glblMaskUpdated = TRUE;
-+ p_CcNode->glblMaskSize = 4;
-+ }
-+ else if (p_Mask &&
-+ (keySize <= 4) &&
-+ !p_CcNode->lclMask)
-+ {
-+ if (memcmp(p_CcNode->p_GlblMask, p_Mask, keySize) != 0)
-+ {
-+ p_CcNode->lclMask = TRUE;
-+ p_CcNode->glblMaskSize = 0;
-+ }
-+ }
-+ else if (!p_Mask && p_CcNode->glblMaskUpdated && (keySize <= 4))
-+ {
-+ uint32_t tmpMask = 0xffffffff;
-+ if (memcmp(p_CcNode->p_GlblMask, &tmpMask, 4) != 0)
-+ {
-+ p_CcNode->lclMask = TRUE;
-+ p_CcNode->glblMaskSize = 0;
-+ }
-+ }
-+ else if (p_Mask)
-+ {
-+ p_CcNode->lclMask = TRUE;
-+ p_CcNode->glblMaskSize = 0;
-+ }
-+
-+ /* In static mode (maxNumOfKeys > 0), local mask is supported
-+ only is mask support was enabled at initialization */
-+ if (p_CcNode->maxNumOfKeys && (!p_CcNode->maskSupport) && p_CcNode->lclMask)
-+ {
-+ p_CcNode->lclMask = FALSE;
-+ p_CcNode->glblMaskSize = prvGlblMaskSize;
-+ return ERROR_CODE(E_NOT_SUPPORTED);
-+ }
-+
-+ return E_OK;
-+}
-+
-+static __inline__ t_Handle GetNewAd(t_Handle h_FmPcdCcNodeOrTree, bool isTree)
-+{
-+ t_FmPcd *p_FmPcd;
-+ t_Handle h_Ad;
-+
-+ if (isTree)
-+ p_FmPcd = (t_FmPcd *)(((t_FmPcdCcTree *)h_FmPcdCcNodeOrTree)->h_FmPcd);
-+ else
-+ p_FmPcd = (t_FmPcd *)(((t_FmPcdCcNode *)h_FmPcdCcNodeOrTree)->h_FmPcd);
-+
-+ if ((isTree && p_FmPcd->p_CcShadow) ||
-+ (!isTree && ((t_FmPcdCcNode *)h_FmPcdCcNodeOrTree)->maxNumOfKeys))
-+ {
-+ /* The allocated shadow is divided as follows:
-+ 0 . . . 16 . . .
-+ ---------------------------------------------------
-+ | Shadow | Shadow Keys | Shadow Next |
-+ | Ad | Match Table | Engine Table |
-+ | (16 bytes) | (maximal size) | (maximal size) |
-+ ---------------------------------------------------
-+ */
-+ if (!p_FmPcd->p_CcShadow)
-+ {
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("CC Shadow not allocated"));
-+ return NULL;
-+ }
-+
-+ h_Ad = p_FmPcd->p_CcShadow;
-+ }
-+ else
-+ {
-+ h_Ad = (t_Handle)FM_MURAM_AllocMem(FmPcdGetMuramHandle(p_FmPcd),
-+ FM_PCD_CC_AD_ENTRY_SIZE,
-+ FM_PCD_CC_AD_TABLE_ALIGN);
-+ if (!h_Ad)
-+ {
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("MURAM allocation for CC node action descriptor"));
-+ return NULL;
-+ }
-+ }
-+
-+ return h_Ad;
-+}
-+
-+static t_Error BuildNewNodeCommonPart(t_FmPcdCcNode *p_CcNode,
-+ int *size,
-+ t_FmPcdModifyCcKeyAdditionalParams *p_AdditionalInfo)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+
-+ if (p_CcNode->lclMask)
-+ *size = 2 * p_CcNode->ccKeySizeAccExtraction;
-+ else
-+ *size = p_CcNode->ccKeySizeAccExtraction;
-+
-+ if (p_CcNode->maxNumOfKeys == 0)
-+ {
-+ p_AdditionalInfo->p_AdTableNew =
-+ (t_Handle)FM_MURAM_AllocMem(FmPcdGetMuramHandle(p_FmPcd),
-+ (uint32_t)( (p_AdditionalInfo->numOfKeys+1) * FM_PCD_CC_AD_ENTRY_SIZE),
-+ FM_PCD_CC_AD_TABLE_ALIGN);
-+ if (!p_AdditionalInfo->p_AdTableNew)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM allocation for CC node action descriptors table"));
-+
-+ p_AdditionalInfo->p_KeysMatchTableNew =
-+ (t_Handle)FM_MURAM_AllocMem(FmPcdGetMuramHandle(p_FmPcd),
-+ (uint32_t)(*size * sizeof(uint8_t) * (p_AdditionalInfo->numOfKeys + 1)),
-+ FM_PCD_CC_KEYS_MATCH_TABLE_ALIGN);
-+ if (!p_AdditionalInfo->p_KeysMatchTableNew)
-+ {
-+ FM_MURAM_FreeMem(FmPcdGetMuramHandle(p_CcNode->h_FmPcd), p_AdditionalInfo->p_AdTableNew);
-+ p_AdditionalInfo->p_AdTableNew = NULL;
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM allocation for CC node key match table"));
-+ }
-+
-+ IOMemSet32((uint8_t*)p_AdditionalInfo->p_AdTableNew, 0, (uint32_t)((p_AdditionalInfo->numOfKeys+1) * FM_PCD_CC_AD_ENTRY_SIZE));
-+ IOMemSet32((uint8_t*)p_AdditionalInfo->p_KeysMatchTableNew, 0, *size * sizeof(uint8_t) * (p_AdditionalInfo->numOfKeys + 1));
-+ }
-+ else
-+ {
-+ /* The allocated shadow is divided as follows:
-+ 0 . . . 16 . . .
-+ ---------------------------------------------------
-+ | Shadow | Shadow Keys | Shadow Next |
-+ | Ad | Match Table | Engine Table |
-+ | (16 bytes) | (maximal size) | (maximal size) |
-+ ---------------------------------------------------
-+ */
-+
-+ if (!p_FmPcd->p_CcShadow)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("CC Shadow not allocated"));
-+
-+ p_AdditionalInfo->p_KeysMatchTableNew = PTR_MOVE(p_FmPcd->p_CcShadow, FM_PCD_CC_AD_ENTRY_SIZE);
-+ p_AdditionalInfo->p_AdTableNew = PTR_MOVE(p_AdditionalInfo->p_KeysMatchTableNew, p_CcNode->keysMatchTableMaxSize);
-+
-+ IOMemSet32((uint8_t*)p_AdditionalInfo->p_AdTableNew, 0, (uint32_t)((p_CcNode->maxNumOfKeys + 1) * FM_PCD_CC_AD_ENTRY_SIZE));
-+ IOMemSet32((uint8_t*)p_AdditionalInfo->p_KeysMatchTableNew, 0, (*size) * sizeof(uint8_t) * (p_CcNode->maxNumOfKeys));
-+ }
-+
-+ p_AdditionalInfo->p_AdTableOld = p_CcNode->h_AdTable;
-+ p_AdditionalInfo->p_KeysMatchTableOld = p_CcNode->h_KeysMatchTable;
-+
-+ return E_OK;
-+}
-+
-+static t_Error BuildNewNodeAddOrMdfyKeyAndNextEngine(t_Handle h_FmPcd,
-+ t_FmPcdCcNode *p_CcNode,
-+ uint16_t keyIndex,
-+ t_FmPcdCcKeyParams *p_KeyParams,
-+ t_FmPcdModifyCcKeyAdditionalParams *p_AdditionalInfo,
-+ bool add)
-+{
-+ t_Error err = E_OK;
-+ t_Handle p_AdTableNewTmp, p_KeysMatchTableNewTmp;
-+ t_Handle p_KeysMatchTableOldTmp, p_AdTableOldTmp;
-+ int size;
-+ int i = 0, j = 0;
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+ uint32_t requiredAction = 0;
-+ bool prvLclMask;
-+ t_CcNodeInformation *p_CcNodeInformation;
-+ t_FmPcdCcStatsParams statsParams = {0};
-+ t_List *p_Pos;
-+ t_FmPcdStatsObj *p_StatsObj;
-+
-+ /* Check that new NIA is legal */
-+ err = ValidateNextEngineParams(h_FmPcd,
-+ &p_KeyParams->ccNextEngineParams,
-+ p_CcNode->statisticsMode);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ prvLclMask = p_CcNode->lclMask;
-+
-+ /* Check that new key is not require update of localMask */
-+ err = UpdateGblMask(p_CcNode,
-+ p_CcNode->ccKeySizeAccExtraction,
-+ p_KeyParams->p_Mask);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+
-+ /* Update internal data structure with new next engine for the given index */
-+ memcpy(&p_AdditionalInfo->keyAndNextEngineParams[keyIndex].nextEngineParams,
-+ &p_KeyParams->ccNextEngineParams,
-+ sizeof(t_FmPcdCcNextEngineParams));
-+
-+ memcpy(p_AdditionalInfo->keyAndNextEngineParams[keyIndex].key,
-+ p_KeyParams->p_Key,
-+ p_CcNode->userSizeOfExtraction);
-+
-+ if ((p_AdditionalInfo->keyAndNextEngineParams[keyIndex].nextEngineParams.nextEngine == e_FM_PCD_CC)
-+ && p_AdditionalInfo->keyAndNextEngineParams[keyIndex].nextEngineParams.h_Manip)
-+ {
-+ err = AllocAndFillAdForContLookupManip(p_AdditionalInfo->keyAndNextEngineParams[keyIndex].nextEngineParams.params.ccParams.h_CcNode);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+ }
-+
-+ if (p_KeyParams->p_Mask)
-+ memcpy(p_AdditionalInfo->keyAndNextEngineParams[keyIndex].mask,
-+ p_KeyParams->p_Mask,
-+ p_CcNode->userSizeOfExtraction);
-+ else
-+ memset(p_AdditionalInfo->keyAndNextEngineParams[keyIndex].mask,
-+ 0xFF,
-+ p_CcNode->userSizeOfExtraction);
-+
-+ /* Update numOfKeys */
-+ if (add)
-+ p_AdditionalInfo->numOfKeys = (uint8_t)(p_CcNode->numOfKeys + 1);
-+ else
-+ p_AdditionalInfo->numOfKeys = (uint8_t)p_CcNode->numOfKeys;
-+
-+ /* Allocate new tables in MURAM: keys match table and action descriptors table */
-+ err = BuildNewNodeCommonPart(p_CcNode, &size, p_AdditionalInfo);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ /* Check that manip is legal and what requiredAction is necessary for this manip */
-+ if (p_KeyParams->ccNextEngineParams.h_Manip)
-+ {
-+ err = FmPcdManipCheckParamsForCcNextEngine(&p_KeyParams->ccNextEngineParams,&requiredAction);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+ }
-+
-+ p_AdditionalInfo->keyAndNextEngineParams[keyIndex].requiredAction = requiredAction;
-+ p_AdditionalInfo->keyAndNextEngineParams[keyIndex].requiredAction |= UPDATE_CC_WITH_TREE;
-+
-+ /* Update new Ad and new Key Table according to new requirement */
-+ i = 0;
-+ for (j = 0; j < p_AdditionalInfo->numOfKeys; j++)
-+ {
-+ p_AdTableNewTmp = PTR_MOVE(p_AdditionalInfo->p_AdTableNew, j*FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ if (j == keyIndex)
-+ {
-+ if (p_KeyParams->ccNextEngineParams.statisticsEn)
-+ {
-+ /* Allocate a statistics object that holds statistics AD and counters.
-+ - For added key - New statistics AD and counters pointer need to be allocated
-+ new statistics object. If statistics were enabled, we need to replace the
-+ existing descriptor with a new descriptor with nullified counters.
-+ */
-+ p_StatsObj = GetStatsObj(p_CcNode);
-+ ASSERT_COND(p_StatsObj);
-+
-+ /* Store allocated statistics object */
-+ ASSERT_COND(keyIndex < CC_MAX_NUM_OF_KEYS);
-+ p_AdditionalInfo->keyAndNextEngineParams[keyIndex].p_StatsObj = p_StatsObj;
-+
-+ statsParams.h_StatsAd = p_StatsObj->h_StatsAd;
-+ statsParams.h_StatsCounters = p_StatsObj->h_StatsCounters;
-+#if (DPAA_VERSION >= 11)
-+ statsParams.h_StatsFLRs = p_CcNode->h_StatsFLRs;
-+
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ /* Building action descriptor for the received new key */
-+ NextStepAd(p_AdTableNewTmp,
-+ &statsParams,
-+ &p_KeyParams->ccNextEngineParams,
-+ p_FmPcd);
-+ }
-+ else
-+ {
-+ /* Building action descriptor for the received new key */
-+ NextStepAd(p_AdTableNewTmp,
-+ NULL,
-+ &p_KeyParams->ccNextEngineParams,
-+ p_FmPcd);
-+ }
-+
-+ /* Copy the received new key into keys match table */
-+ p_KeysMatchTableNewTmp = PTR_MOVE(p_AdditionalInfo->p_KeysMatchTableNew, j*size*sizeof(uint8_t));
-+
-+ Mem2IOCpy32((void*)p_KeysMatchTableNewTmp, p_KeyParams->p_Key, p_CcNode->userSizeOfExtraction);
-+
-+ /* Update mask for the received new key */
-+ if (p_CcNode->lclMask)
-+ {
-+ if (p_KeyParams->p_Mask)
-+ {
-+ Mem2IOCpy32(PTR_MOVE(p_KeysMatchTableNewTmp,
-+ p_CcNode->ccKeySizeAccExtraction),
-+ p_KeyParams->p_Mask,
-+ p_CcNode->userSizeOfExtraction);
-+ }
-+ else if (p_CcNode->ccKeySizeAccExtraction > 4)
-+ {
-+ IOMemSet32(PTR_MOVE(p_KeysMatchTableNewTmp,
-+ p_CcNode->ccKeySizeAccExtraction),
-+ 0xff,
-+ p_CcNode->userSizeOfExtraction);
-+ }
-+ else
-+ {
-+ Mem2IOCpy32(PTR_MOVE(p_KeysMatchTableNewTmp,
-+ p_CcNode->ccKeySizeAccExtraction),
-+ p_CcNode->p_GlblMask,
-+ p_CcNode->userSizeOfExtraction);
-+ }
-+ }
-+
-+ /* If key modification requested, the old entry is omitted and replaced by the new parameters */
-+ if (!add)
-+ i++;
-+ }
-+ else
-+ {
-+ /* Copy existing action descriptors to the newly allocated Ad table */
-+ p_AdTableOldTmp = PTR_MOVE(p_AdditionalInfo->p_AdTableOld, i*FM_PCD_CC_AD_ENTRY_SIZE);
-+ IO2IOCpy32(p_AdTableNewTmp, p_AdTableOldTmp, FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ /* Copy existing keys and their masks to the newly allocated keys match table */
-+ p_KeysMatchTableNewTmp = PTR_MOVE(p_AdditionalInfo->p_KeysMatchTableNew, j * size * sizeof(uint8_t));
-+ p_KeysMatchTableOldTmp = PTR_MOVE(p_AdditionalInfo->p_KeysMatchTableOld, i * size * sizeof(uint8_t));
-+
-+ if (p_CcNode->lclMask)
-+ {
-+ if (prvLclMask)
-+ {
-+ IO2IOCpy32(PTR_MOVE(p_KeysMatchTableNewTmp, p_CcNode->ccKeySizeAccExtraction),
-+ PTR_MOVE(p_KeysMatchTableOldTmp, p_CcNode->ccKeySizeAccExtraction),
-+ p_CcNode->ccKeySizeAccExtraction);
-+ }
-+ else
-+ {
-+ p_KeysMatchTableOldTmp = PTR_MOVE(p_CcNode->h_KeysMatchTable,
-+ i * p_CcNode->ccKeySizeAccExtraction*sizeof(uint8_t));
-+
-+ if (p_CcNode->ccKeySizeAccExtraction > 4)
-+ {
-+ IOMemSet32(PTR_MOVE(p_KeysMatchTableNewTmp,
-+ p_CcNode->ccKeySizeAccExtraction),
-+ 0xff,
-+ p_CcNode->userSizeOfExtraction);
-+ }
-+ else
-+ {
-+ IO2IOCpy32(PTR_MOVE(p_KeysMatchTableNewTmp,
-+ p_CcNode->ccKeySizeAccExtraction),
-+ p_CcNode->p_GlblMask,
-+ p_CcNode->userSizeOfExtraction);
-+ }
-+ }
-+ }
-+
-+ IO2IOCpy32(p_KeysMatchTableNewTmp, p_KeysMatchTableOldTmp, p_CcNode->ccKeySizeAccExtraction);
-+
-+ i++;
-+ }
-+ }
-+
-+ /* Miss action descriptor */
-+ p_AdTableNewTmp = PTR_MOVE(p_AdditionalInfo->p_AdTableNew, j * FM_PCD_CC_AD_ENTRY_SIZE);
-+ p_AdTableOldTmp = PTR_MOVE(p_AdditionalInfo->p_AdTableOld, i * FM_PCD_CC_AD_ENTRY_SIZE);
-+ IO2IOCpy32(p_AdTableNewTmp, p_AdTableOldTmp, FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ if (!LIST_IsEmpty(&p_CcNode->ccTreesLst))
-+ {
-+ LIST_FOR_EACH(p_Pos, &p_CcNode->ccTreesLst)
-+ {
-+ p_CcNodeInformation = CC_NODE_F_OBJECT(p_Pos);
-+ ASSERT_COND(p_CcNodeInformation->h_CcNode);
-+ /* Update the manipulation which has to be updated from parameters of the port */
-+ /* It's has to be updated with restrictions defined in the function */
-+ err = SetRequiredAction(p_CcNode->h_FmPcd,
-+ p_CcNode->shadowAction | p_AdditionalInfo->keyAndNextEngineParams[keyIndex].requiredAction,
-+ &p_AdditionalInfo->keyAndNextEngineParams[keyIndex],
-+ PTR_MOVE(p_AdditionalInfo->p_AdTableNew, keyIndex*FM_PCD_CC_AD_ENTRY_SIZE),
-+ 1,
-+ p_CcNodeInformation->h_CcNode);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+
-+ err = CcUpdateParam(p_CcNode->h_FmPcd,
-+ NULL,
-+ NULL,
-+ &p_AdditionalInfo->keyAndNextEngineParams[keyIndex],
-+ 1,
-+ PTR_MOVE(p_AdditionalInfo->p_AdTableNew, keyIndex*FM_PCD_CC_AD_ENTRY_SIZE),
-+ TRUE,
-+ p_CcNodeInformation->index,
-+ p_CcNodeInformation->h_CcNode,
-+ TRUE);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+ }
-+ }
-+
-+ if (p_CcNode->lclMask)
-+ memset(p_CcNode->p_GlblMask, 0xff, CC_GLBL_MASK_SIZE * sizeof(uint8_t));
-+
-+ if (p_KeyParams->ccNextEngineParams.nextEngine == e_FM_PCD_CC)
-+ p_AdditionalInfo->h_NodeForAdd = p_KeyParams->ccNextEngineParams.params.ccParams.h_CcNode;
-+ if (p_KeyParams->ccNextEngineParams.h_Manip)
-+ p_AdditionalInfo->h_ManipForAdd = p_KeyParams->ccNextEngineParams.h_Manip;
-+
-+#if (DPAA_VERSION >= 11)
-+ if ((p_KeyParams->ccNextEngineParams.nextEngine == e_FM_PCD_FR) &&
-+ (p_KeyParams->ccNextEngineParams.params.frParams.h_FrmReplic))
-+ p_AdditionalInfo->h_FrmReplicForAdd = p_KeyParams->ccNextEngineParams.params.frParams.h_FrmReplic;
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ if (!add)
-+ {
-+ if (p_CcNode->keyAndNextEngineParams[keyIndex].nextEngineParams.nextEngine == e_FM_PCD_CC)
-+ p_AdditionalInfo->h_NodeForRmv = p_CcNode->keyAndNextEngineParams[keyIndex].nextEngineParams.params.ccParams.h_CcNode;
-+
-+ if (p_CcNode->keyAndNextEngineParams[keyIndex].nextEngineParams.h_Manip)
-+ p_AdditionalInfo->h_ManipForRmv = p_CcNode->keyAndNextEngineParams[keyIndex].nextEngineParams.h_Manip;
-+
-+ /* If statistics were previously enabled, store the old statistics object to be released */
-+ if (p_CcNode->keyAndNextEngineParams[keyIndex].p_StatsObj)
-+ {
-+ p_AdditionalInfo->p_StatsObjForRmv = p_CcNode->keyAndNextEngineParams[keyIndex].p_StatsObj;
-+ }
-+
-+#if (DPAA_VERSION >= 11)
-+ if ((p_CcNode->keyAndNextEngineParams[keyIndex].nextEngineParams.nextEngine == e_FM_PCD_FR) &&
-+ (p_CcNode->keyAndNextEngineParams[keyIndex].nextEngineParams.params.frParams.h_FrmReplic))
-+ p_AdditionalInfo->h_FrmReplicForRmv = p_CcNode->keyAndNextEngineParams[keyIndex].nextEngineParams.params.frParams.h_FrmReplic;
-+#endif /* (DPAA_VERSION >= 11) */
-+ }
-+
-+ return E_OK;
-+}
-+
-+static t_Error BuildNewNodeRemoveKey(t_FmPcdCcNode *p_CcNode,
-+ uint16_t keyIndex,
-+ t_FmPcdModifyCcKeyAdditionalParams *p_AdditionalInfo)
-+{
-+ int i = 0, j = 0;
-+ t_Handle p_AdTableNewTmp,p_KeysMatchTableNewTmp;
-+ t_Handle p_KeysMatchTableOldTmp, p_AdTableOldTmp;
-+ int size;
-+ t_Error err = E_OK;
-+
-+ /*save new numOfKeys*/
-+ p_AdditionalInfo->numOfKeys = (uint16_t)(p_CcNode->numOfKeys - 1);
-+
-+ /*function which allocates in the memory new KeyTbl, AdTbl*/
-+ err = BuildNewNodeCommonPart(p_CcNode, &size, p_AdditionalInfo);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ /*update new Ad and new Key Table according to new requirement*/
-+ for (i=0, j=0; jnumOfKeys; i++, j++)
-+ {
-+ if (j == keyIndex)
-+ {
-+ p_AdTableOldTmp = PTR_MOVE(p_AdditionalInfo->p_AdTableOld, j * FM_PCD_CC_AD_ENTRY_SIZE);
-+ j++;
-+ }
-+ if (j == p_CcNode->numOfKeys)
-+ break;
-+ p_AdTableNewTmp = PTR_MOVE(p_AdditionalInfo->p_AdTableNew, i * FM_PCD_CC_AD_ENTRY_SIZE);
-+ p_AdTableOldTmp = PTR_MOVE(p_AdditionalInfo->p_AdTableOld, j * FM_PCD_CC_AD_ENTRY_SIZE);
-+ IO2IOCpy32(p_AdTableNewTmp, p_AdTableOldTmp, FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ p_KeysMatchTableOldTmp = PTR_MOVE(p_AdditionalInfo->p_KeysMatchTableOld, j * size * sizeof(uint8_t));
-+ p_KeysMatchTableNewTmp = PTR_MOVE(p_AdditionalInfo->p_KeysMatchTableNew, i * size * sizeof(uint8_t));
-+ IO2IOCpy32(p_KeysMatchTableNewTmp, p_KeysMatchTableOldTmp, size * sizeof(uint8_t));
-+ }
-+
-+ p_AdTableNewTmp = PTR_MOVE(p_AdditionalInfo->p_AdTableNew, i * FM_PCD_CC_AD_ENTRY_SIZE);
-+ p_AdTableOldTmp = PTR_MOVE(p_AdditionalInfo->p_AdTableOld, j * FM_PCD_CC_AD_ENTRY_SIZE);
-+ IO2IOCpy32(p_AdTableNewTmp, p_AdTableOldTmp, FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ if (p_CcNode->keyAndNextEngineParams[keyIndex].nextEngineParams.nextEngine == e_FM_PCD_CC)
-+ p_AdditionalInfo->h_NodeForRmv =
-+ p_CcNode->keyAndNextEngineParams[keyIndex].nextEngineParams.params.ccParams.h_CcNode;
-+
-+ if (p_CcNode->keyAndNextEngineParams[keyIndex].nextEngineParams.h_Manip)
-+ p_AdditionalInfo->h_ManipForRmv =
-+ p_CcNode->keyAndNextEngineParams[keyIndex].nextEngineParams.h_Manip;
-+
-+ /* If statistics were previously enabled, store the old statistics object to be released */
-+ if (p_CcNode->keyAndNextEngineParams[keyIndex].p_StatsObj)
-+ {
-+ p_AdditionalInfo->p_StatsObjForRmv = p_CcNode->keyAndNextEngineParams[keyIndex].p_StatsObj;
-+ }
-+
-+#if (DPAA_VERSION >= 11)
-+ if ((p_CcNode->keyAndNextEngineParams[keyIndex].nextEngineParams.nextEngine == e_FM_PCD_FR) &&
-+ (p_CcNode->keyAndNextEngineParams[keyIndex].nextEngineParams.params.frParams.h_FrmReplic))
-+ p_AdditionalInfo->h_FrmReplicForRmv =
-+ p_CcNode->keyAndNextEngineParams[keyIndex].nextEngineParams.params.frParams.h_FrmReplic;
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ return E_OK;
-+}
-+
-+static t_Error BuildNewNodeModifyKey(t_FmPcdCcNode *p_CcNode,
-+ uint16_t keyIndex,
-+ uint8_t *p_Key,
-+ uint8_t *p_Mask,
-+ t_FmPcdModifyCcKeyAdditionalParams *p_AdditionalInfo)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+ t_Error err = E_OK;
-+ t_Handle p_AdTableNewTmp, p_KeysMatchTableNewTmp;
-+ t_Handle p_KeysMatchTableOldTmp, p_AdTableOldTmp;
-+ int size;
-+ int i = 0, j = 0;
-+ bool prvLclMask;
-+ t_FmPcdStatsObj *p_StatsObj, tmpStatsObj;
-+ p_AdditionalInfo->numOfKeys = p_CcNode->numOfKeys;
-+
-+ prvLclMask = p_CcNode->lclMask;
-+
-+ /* Check that new key is not require update of localMask */
-+ err = UpdateGblMask(p_CcNode,
-+ p_CcNode->ccKeySizeAccExtraction,
-+ p_Mask);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+
-+ /* Update internal data structure with new next engine for the given index */
-+ memcpy(p_AdditionalInfo->keyAndNextEngineParams[keyIndex].key,
-+ p_Key,
-+ p_CcNode->userSizeOfExtraction);
-+
-+ if (p_Mask)
-+ memcpy(p_AdditionalInfo->keyAndNextEngineParams[keyIndex].mask,
-+ p_Mask,
-+ p_CcNode->userSizeOfExtraction);
-+ else
-+ memset(p_AdditionalInfo->keyAndNextEngineParams[keyIndex].mask,
-+ 0xFF,
-+ p_CcNode->userSizeOfExtraction);
-+
-+ /*function which build in the memory new KeyTbl, AdTbl*/
-+ err = BuildNewNodeCommonPart(p_CcNode, &size, p_AdditionalInfo);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ /*fill the New AdTable and New KeyTable*/
-+ for (j=0, i=0; jnumOfKeys; j++, i++)
-+ {
-+ p_AdTableNewTmp = PTR_MOVE(p_AdditionalInfo->p_AdTableNew, j*FM_PCD_CC_AD_ENTRY_SIZE);
-+ p_AdTableOldTmp = PTR_MOVE(p_AdditionalInfo->p_AdTableOld, i*FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ IO2IOCpy32(p_AdTableNewTmp, p_AdTableOldTmp, FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ if (j == keyIndex)
-+ {
-+ ASSERT_COND(keyIndex < CC_MAX_NUM_OF_KEYS);
-+ if (p_CcNode->keyAndNextEngineParams[keyIndex].p_StatsObj)
-+ {
-+ /* As statistics were enabled, we need to update the existing
-+ statistics descriptor with a new nullified counters. */
-+ p_StatsObj = GetStatsObj(p_CcNode);
-+ ASSERT_COND(p_StatsObj);
-+
-+ SetStatsCounters(p_AdTableNewTmp,
-+ (uint32_t)((XX_VirtToPhys(p_StatsObj->h_StatsCounters) - p_FmPcd->physicalMuramBase)));
-+
-+ tmpStatsObj.h_StatsAd = p_StatsObj->h_StatsAd;
-+ tmpStatsObj.h_StatsCounters = p_StatsObj->h_StatsCounters;
-+
-+ /* As we need to replace only the counters, we build a new statistics
-+ object that holds the old AD and the new counters - this will be the
-+ currently used statistics object.
-+ The newly allocated AD is not required and may be released back to
-+ the available objects with the previous counters pointer. */
-+ p_StatsObj->h_StatsAd = p_CcNode->keyAndNextEngineParams[keyIndex].p_StatsObj->h_StatsAd;
-+
-+ p_CcNode->keyAndNextEngineParams[keyIndex].p_StatsObj->h_StatsAd = tmpStatsObj.h_StatsAd;
-+
-+ /* Store allocated statistics object */
-+ p_AdditionalInfo->keyAndNextEngineParams[keyIndex].p_StatsObj = p_StatsObj;
-+
-+ /* As statistics were previously enabled, store the old statistics object to be released */
-+ p_AdditionalInfo->p_StatsObjForRmv = p_CcNode->keyAndNextEngineParams[keyIndex].p_StatsObj;
-+ }
-+
-+ p_KeysMatchTableNewTmp = PTR_MOVE(p_AdditionalInfo->p_KeysMatchTableNew, j * size * sizeof(uint8_t));
-+
-+ Mem2IOCpy32(p_KeysMatchTableNewTmp, p_Key, p_CcNode->userSizeOfExtraction);
-+
-+ if (p_CcNode->lclMask)
-+ {
-+ if (p_Mask)
-+ Mem2IOCpy32(PTR_MOVE(p_KeysMatchTableNewTmp,
-+ p_CcNode->ccKeySizeAccExtraction),
-+ p_Mask,
-+ p_CcNode->userSizeOfExtraction);
-+ else if (p_CcNode->ccKeySizeAccExtraction > 4)
-+ IOMemSet32(PTR_MOVE(p_KeysMatchTableNewTmp,
-+ p_CcNode->ccKeySizeAccExtraction),
-+ 0xff,
-+ p_CcNode->userSizeOfExtraction);
-+ else
-+ Mem2IOCpy32(PTR_MOVE(p_KeysMatchTableNewTmp,
-+ p_CcNode->ccKeySizeAccExtraction),
-+ p_CcNode->p_GlblMask,
-+ p_CcNode->userSizeOfExtraction);
-+ }
-+ }
-+ else
-+ {
-+ p_KeysMatchTableNewTmp = PTR_MOVE(p_AdditionalInfo->p_KeysMatchTableNew, j * size * sizeof(uint8_t));
-+ p_KeysMatchTableOldTmp = PTR_MOVE(p_CcNode->h_KeysMatchTable, i * size * sizeof(uint8_t));
-+
-+ if (p_CcNode->lclMask)
-+ {
-+ if (prvLclMask)
-+ IO2IOCpy32(PTR_MOVE(p_KeysMatchTableNewTmp, p_CcNode->ccKeySizeAccExtraction),
-+ PTR_MOVE(p_KeysMatchTableOldTmp, p_CcNode->ccKeySizeAccExtraction),
-+ p_CcNode->userSizeOfExtraction);
-+ else
-+ {
-+ p_KeysMatchTableOldTmp = PTR_MOVE(p_CcNode->h_KeysMatchTable, i * p_CcNode->ccKeySizeAccExtraction * sizeof(uint8_t));
-+
-+ if (p_CcNode->ccKeySizeAccExtraction > 4)
-+ IOMemSet32(PTR_MOVE(p_KeysMatchTableNewTmp,
-+ p_CcNode->ccKeySizeAccExtraction),
-+ 0xff,
-+ p_CcNode->userSizeOfExtraction);
-+ else
-+ IO2IOCpy32(PTR_MOVE(p_KeysMatchTableNewTmp, p_CcNode->ccKeySizeAccExtraction),
-+ p_CcNode->p_GlblMask,
-+ p_CcNode->userSizeOfExtraction);
-+ }
-+ }
-+ IO2IOCpy32((void*)p_KeysMatchTableNewTmp,
-+ p_KeysMatchTableOldTmp,
-+ p_CcNode->ccKeySizeAccExtraction);
-+ }
-+ }
-+
-+ p_AdTableNewTmp = PTR_MOVE(p_AdditionalInfo->p_AdTableNew, j * FM_PCD_CC_AD_ENTRY_SIZE);
-+ p_AdTableOldTmp = PTR_MOVE(p_CcNode->h_AdTable, i * FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ IO2IOCpy32(p_AdTableNewTmp, p_AdTableOldTmp, FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ return E_OK;
-+}
-+
-+static t_Error BuildNewNodeModifyNextEngine(t_Handle h_FmPcd,
-+ t_Handle h_FmPcdCcNodeOrTree,
-+ uint16_t keyIndex,
-+ t_FmPcdCcNextEngineParams *p_CcNextEngineParams,
-+ t_List *h_OldLst,
-+ t_List *h_NewLst,
-+ t_FmPcdModifyCcKeyAdditionalParams *p_AdditionalInfo)
-+{
-+ t_Error err = E_OK;
-+ uint32_t requiredAction = 0;
-+ t_List *p_Pos;
-+ t_CcNodeInformation *p_CcNodeInformation, ccNodeInfo;
-+ t_Handle p_Ad;
-+ t_FmPcdCcNode *p_FmPcdCcNode1 = NULL;
-+ t_FmPcdCcTree *p_FmPcdCcTree = NULL;
-+ t_FmPcdStatsObj *p_StatsObj;
-+ t_FmPcdCcStatsParams statsParams = {0};
-+
-+ ASSERT_COND(p_CcNextEngineParams);
-+
-+ /* check that new NIA is legal */
-+ if (!p_AdditionalInfo->tree)
-+ err = ValidateNextEngineParams(h_FmPcd,
-+ p_CcNextEngineParams,
-+ ((t_FmPcdCcNode *)h_FmPcdCcNodeOrTree)->statisticsMode);
-+ else
-+ /* Statistics are not supported for CC root */
-+ err = ValidateNextEngineParams(h_FmPcd,
-+ p_CcNextEngineParams,
-+ e_FM_PCD_CC_STATS_MODE_NONE);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ /* Update internal data structure for next engine per index (index - key) */
-+ memcpy(&p_AdditionalInfo->keyAndNextEngineParams[keyIndex].nextEngineParams,
-+ p_CcNextEngineParams,
-+ sizeof(t_FmPcdCcNextEngineParams));
-+
-+ /* Check that manip is legal and what requiredAction is necessary for this manip */
-+ if (p_CcNextEngineParams->h_Manip)
-+ {
-+ err = FmPcdManipCheckParamsForCcNextEngine(p_CcNextEngineParams, &requiredAction);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+ }
-+
-+ if (!p_AdditionalInfo->tree)
-+ {
-+ p_FmPcdCcNode1 = (t_FmPcdCcNode *)h_FmPcdCcNodeOrTree;
-+ p_AdditionalInfo->numOfKeys = p_FmPcdCcNode1->numOfKeys;
-+ p_Ad = p_FmPcdCcNode1->h_AdTable;
-+
-+ if (p_FmPcdCcNode1->keyAndNextEngineParams[keyIndex].nextEngineParams.nextEngine == e_FM_PCD_CC)
-+ p_AdditionalInfo->h_NodeForRmv = p_FmPcdCcNode1->keyAndNextEngineParams[keyIndex].nextEngineParams.params.ccParams.h_CcNode;
-+
-+ if (p_FmPcdCcNode1->keyAndNextEngineParams[keyIndex].nextEngineParams.h_Manip)
-+ p_AdditionalInfo->h_ManipForRmv = p_FmPcdCcNode1->keyAndNextEngineParams[keyIndex].nextEngineParams.h_Manip;
-+
-+#if (DPAA_VERSION >= 11)
-+ if ((p_FmPcdCcNode1->keyAndNextEngineParams[keyIndex].nextEngineParams.nextEngine == e_FM_PCD_FR) &&
-+ (p_FmPcdCcNode1->keyAndNextEngineParams[keyIndex].nextEngineParams.params.frParams.h_FrmReplic))
-+ p_AdditionalInfo->h_FrmReplicForRmv = p_FmPcdCcNode1->keyAndNextEngineParams[keyIndex].nextEngineParams.params.frParams.h_FrmReplic;
-+#endif /* (DPAA_VERSION >= 11) */
-+ }
-+ else
-+ {
-+ p_FmPcdCcTree = (t_FmPcdCcTree *)h_FmPcdCcNodeOrTree;
-+ p_Ad = UINT_TO_PTR(p_FmPcdCcTree->ccTreeBaseAddr);
-+
-+ if (p_FmPcdCcTree->keyAndNextEngineParams[keyIndex].nextEngineParams.nextEngine == e_FM_PCD_CC)
-+ p_AdditionalInfo->h_NodeForRmv = p_FmPcdCcTree->keyAndNextEngineParams[keyIndex].nextEngineParams.params.ccParams.h_CcNode;
-+
-+ if (p_FmPcdCcTree->keyAndNextEngineParams[keyIndex].nextEngineParams.h_Manip)
-+ p_AdditionalInfo->h_ManipForRmv = p_FmPcdCcTree->keyAndNextEngineParams[keyIndex].nextEngineParams.h_Manip;
-+
-+#if (DPAA_VERSION >= 11)
-+ if ((p_FmPcdCcTree->keyAndNextEngineParams[keyIndex].nextEngineParams.nextEngine == e_FM_PCD_FR) &&
-+ (p_FmPcdCcTree->keyAndNextEngineParams[keyIndex].nextEngineParams.params.frParams.h_FrmReplic))
-+ p_AdditionalInfo->h_FrmReplicForRmv = p_FmPcdCcTree->keyAndNextEngineParams[keyIndex].nextEngineParams.params.frParams.h_FrmReplic;
-+#endif /* (DPAA_VERSION >= 11) */
-+ }
-+
-+ if ((p_CcNextEngineParams->nextEngine == e_FM_PCD_CC)
-+ && p_CcNextEngineParams->h_Manip)
-+ {
-+ err = AllocAndFillAdForContLookupManip(p_CcNextEngineParams->params.ccParams.h_CcNode);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+ }
-+
-+ ASSERT_COND(p_Ad);
-+
-+ memset(&ccNodeInfo, 0, sizeof(t_CcNodeInformation));
-+ ccNodeInfo.h_CcNode = PTR_MOVE(p_Ad, keyIndex * FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ /* If statistics were enabled, this Ad is the statistics Ad. Need to follow its
-+ nextAction to retrieve the actual Nia-Ad. If statistics should remain enabled,
-+ only the actual Nia-Ad should be modified. */
-+ if ((!p_AdditionalInfo->tree) &&
-+ (((t_FmPcdCcNode *)h_FmPcdCcNodeOrTree)->keyAndNextEngineParams[keyIndex].p_StatsObj) &&
-+ (p_CcNextEngineParams->statisticsEn))
-+ ccNodeInfo.h_CcNode = ((t_FmPcdCcNode *)h_FmPcdCcNodeOrTree)->keyAndNextEngineParams[keyIndex].p_StatsObj->h_StatsAd;
-+
-+ EnqueueNodeInfoToRelevantLst(h_OldLst, &ccNodeInfo, NULL);
-+
-+ memset(&ccNodeInfo, 0, sizeof(t_CcNodeInformation));
-+ p_Ad = GetNewAd(h_FmPcdCcNodeOrTree, p_AdditionalInfo->tree);
-+ if (!p_Ad)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM allocation for CC node action descriptor"));
-+ IOMemSet32((uint8_t *)p_Ad, 0, FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ /* If statistics were not enabled before, but requested now - Allocate a statistics
-+ object that holds statistics AD and counters. */
-+ if ((!p_AdditionalInfo->tree) &&
-+ (!((t_FmPcdCcNode *)h_FmPcdCcNodeOrTree)->keyAndNextEngineParams[keyIndex].p_StatsObj) &&
-+ (p_CcNextEngineParams->statisticsEn))
-+ {
-+ p_StatsObj = GetStatsObj((t_FmPcdCcNode *)h_FmPcdCcNodeOrTree);
-+ ASSERT_COND(p_StatsObj);
-+
-+ /* Store allocated statistics object */
-+ p_AdditionalInfo->keyAndNextEngineParams[keyIndex].p_StatsObj = p_StatsObj;
-+
-+ statsParams.h_StatsAd = p_StatsObj->h_StatsAd;
-+ statsParams.h_StatsCounters = p_StatsObj->h_StatsCounters;
-+
-+#if (DPAA_VERSION >= 11)
-+ statsParams.h_StatsFLRs = ((t_FmPcdCcNode *)h_FmPcdCcNodeOrTree)->h_StatsFLRs;
-+
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ NextStepAd(p_Ad,
-+ &statsParams,
-+ p_CcNextEngineParams,
-+ h_FmPcd);
-+ }
-+ else
-+ NextStepAd(p_Ad,
-+ NULL,
-+ p_CcNextEngineParams,
-+ h_FmPcd);
-+
-+ ccNodeInfo.h_CcNode = p_Ad;
-+ EnqueueNodeInfoToRelevantLst(h_NewLst, &ccNodeInfo, NULL);
-+
-+ p_AdditionalInfo->keyAndNextEngineParams[keyIndex].requiredAction = requiredAction;
-+ p_AdditionalInfo->keyAndNextEngineParams[keyIndex].requiredAction |= UPDATE_CC_WITH_TREE;
-+
-+ if (!p_AdditionalInfo->tree)
-+ {
-+ ASSERT_COND(p_FmPcdCcNode1);
-+ if (!LIST_IsEmpty(&p_FmPcdCcNode1->ccTreesLst))
-+ {
-+ LIST_FOR_EACH(p_Pos, &p_FmPcdCcNode1->ccTreesLst)
-+ {
-+ p_CcNodeInformation = CC_NODE_F_OBJECT(p_Pos);
-+
-+ ASSERT_COND(p_CcNodeInformation->h_CcNode);
-+ /* Update the manipulation which has to be updated from parameters of the port
-+ it's has to be updated with restrictions defined in the function */
-+
-+ err = SetRequiredAction(p_FmPcdCcNode1->h_FmPcd,
-+ p_FmPcdCcNode1->shadowAction | p_AdditionalInfo->keyAndNextEngineParams[keyIndex].requiredAction,
-+ &p_AdditionalInfo->keyAndNextEngineParams[keyIndex],
-+ p_Ad,
-+ 1,
-+ p_CcNodeInformation->h_CcNode);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+
-+ err = CcUpdateParam(p_FmPcdCcNode1->h_FmPcd,
-+ NULL,
-+ NULL,
-+ &p_AdditionalInfo->keyAndNextEngineParams[keyIndex],
-+ 1,
-+ p_Ad,
-+ TRUE,
-+ p_CcNodeInformation->index,
-+ p_CcNodeInformation->h_CcNode,
-+ TRUE);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+ }
-+ }
-+ }
-+ else
-+ {
-+ ASSERT_COND(p_FmPcdCcTree);
-+
-+ err = SetRequiredAction(h_FmPcd,
-+ p_FmPcdCcTree->requiredAction | p_AdditionalInfo->keyAndNextEngineParams[keyIndex].requiredAction,
-+ &p_AdditionalInfo->keyAndNextEngineParams[keyIndex],
-+ p_Ad,
-+ 1,
-+ (t_Handle)p_FmPcdCcTree);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+
-+ err = CcUpdateParam(h_FmPcd,
-+ NULL,
-+ NULL,
-+ &p_AdditionalInfo->keyAndNextEngineParams[keyIndex],
-+ 1,
-+ p_Ad,
-+ TRUE,
-+ 0,
-+ (t_Handle)p_FmPcdCcTree, TRUE);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+ }
-+
-+ if (p_CcNextEngineParams->nextEngine == e_FM_PCD_CC)
-+ p_AdditionalInfo->h_NodeForAdd = p_CcNextEngineParams->params.ccParams.h_CcNode;
-+ if (p_CcNextEngineParams->h_Manip)
-+ p_AdditionalInfo->h_ManipForAdd = p_CcNextEngineParams->h_Manip;
-+
-+ /* If statistics were previously enabled, but now are disabled,
-+ store the old statistics object to be released */
-+ if ((!p_AdditionalInfo->tree) &&
-+ (((t_FmPcdCcNode *)h_FmPcdCcNodeOrTree)->keyAndNextEngineParams[keyIndex].p_StatsObj) &&
-+ (!p_CcNextEngineParams->statisticsEn))
-+ {
-+ p_AdditionalInfo->p_StatsObjForRmv =
-+ ((t_FmPcdCcNode *)h_FmPcdCcNodeOrTree)->keyAndNextEngineParams[keyIndex].p_StatsObj;
-+
-+
-+ p_AdditionalInfo->keyAndNextEngineParams[keyIndex].p_StatsObj = NULL;
-+ }
-+#if (DPAA_VERSION >= 11)
-+ if ((p_CcNextEngineParams->nextEngine == e_FM_PCD_FR) &&
-+ (p_CcNextEngineParams->params.frParams.h_FrmReplic))
-+ p_AdditionalInfo->h_FrmReplicForAdd = p_CcNextEngineParams->params.frParams.h_FrmReplic;
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ return E_OK;
-+}
-+
-+static void UpdateAdPtrOfNodesWhichPointsOnCrntMdfNode(t_FmPcdCcNode *p_CrntMdfNode,
-+ t_List *h_OldLst,
-+ t_FmPcdCcNextEngineParams **p_NextEngineParams)
-+{
-+ t_CcNodeInformation *p_CcNodeInformation;
-+ t_FmPcdCcNode *p_NodePtrOnCurrentMdfNode = NULL;
-+ t_List *p_Pos;
-+ int i = 0;
-+ t_Handle p_AdTablePtOnCrntCurrentMdfNode/*, p_AdTableNewModified*/;
-+ t_CcNodeInformation ccNodeInfo;
-+
-+ LIST_FOR_EACH(p_Pos, &p_CrntMdfNode->ccPrevNodesLst)
-+ {
-+ p_CcNodeInformation = CC_NODE_F_OBJECT(p_Pos);
-+ p_NodePtrOnCurrentMdfNode = (t_FmPcdCcNode *)p_CcNodeInformation->h_CcNode;
-+
-+ ASSERT_COND(p_NodePtrOnCurrentMdfNode);
-+
-+ /* Search in the previous node which exact index points on this current modified node for getting AD */
-+ for (i = 0; i < p_NodePtrOnCurrentMdfNode->numOfKeys + 1; i++)
-+ {
-+ if (p_NodePtrOnCurrentMdfNode->keyAndNextEngineParams[i].nextEngineParams.nextEngine == e_FM_PCD_CC)
-+ {
-+ if (p_NodePtrOnCurrentMdfNode->keyAndNextEngineParams[i].nextEngineParams.params.ccParams.h_CcNode == (t_Handle)p_CrntMdfNode)
-+ {
-+ if (p_NodePtrOnCurrentMdfNode->keyAndNextEngineParams[i].nextEngineParams.h_Manip)
-+ p_AdTablePtOnCrntCurrentMdfNode = p_CrntMdfNode->h_Ad;
-+ else if (p_NodePtrOnCurrentMdfNode->keyAndNextEngineParams[i].p_StatsObj)
-+ p_AdTablePtOnCrntCurrentMdfNode =
-+ p_NodePtrOnCurrentMdfNode->keyAndNextEngineParams[i].p_StatsObj->h_StatsAd;
-+ else
-+ p_AdTablePtOnCrntCurrentMdfNode =
-+ PTR_MOVE(p_NodePtrOnCurrentMdfNode->h_AdTable, i*FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ memset(&ccNodeInfo, 0, sizeof(t_CcNodeInformation));
-+ ccNodeInfo.h_CcNode = p_AdTablePtOnCrntCurrentMdfNode;
-+ EnqueueNodeInfoToRelevantLst(h_OldLst, &ccNodeInfo, NULL);
-+
-+ if (!(*p_NextEngineParams))
-+ *p_NextEngineParams = &p_NodePtrOnCurrentMdfNode->keyAndNextEngineParams[i].nextEngineParams;
-+ }
-+ }
-+ }
-+
-+ ASSERT_COND(i != p_NodePtrOnCurrentMdfNode->numOfKeys);
-+ }
-+}
-+
-+static void UpdateAdPtrOfTreesWhichPointsOnCrntMdfNode(t_FmPcdCcNode *p_CrntMdfNode,
-+ t_List *h_OldLst,
-+ t_FmPcdCcNextEngineParams **p_NextEngineParams)
-+{
-+ t_CcNodeInformation *p_CcNodeInformation;
-+ t_FmPcdCcTree *p_TreePtrOnCurrentMdfNode = NULL;
-+ t_List *p_Pos;
-+ int i = 0;
-+ t_Handle p_AdTableTmp;
-+ t_CcNodeInformation ccNodeInfo;
-+
-+ LIST_FOR_EACH(p_Pos, &p_CrntMdfNode->ccTreeIdLst)
-+ {
-+ p_CcNodeInformation = CC_NODE_F_OBJECT(p_Pos);
-+ p_TreePtrOnCurrentMdfNode = (t_FmPcdCcTree *)p_CcNodeInformation->h_CcNode;
-+
-+ ASSERT_COND(p_TreePtrOnCurrentMdfNode);
-+
-+ /*search in the trees which exact index points on this current modified node for getting AD */
-+ for (i = 0; i < p_TreePtrOnCurrentMdfNode->numOfEntries; i++)
-+ {
-+ if (p_TreePtrOnCurrentMdfNode->keyAndNextEngineParams[i].nextEngineParams.nextEngine == e_FM_PCD_CC)
-+ {
-+ if (p_TreePtrOnCurrentMdfNode->keyAndNextEngineParams[i].nextEngineParams.params.ccParams.h_CcNode == (t_Handle)p_CrntMdfNode)
-+ {
-+ p_AdTableTmp = UINT_TO_PTR(p_TreePtrOnCurrentMdfNode->ccTreeBaseAddr + i*FM_PCD_CC_AD_ENTRY_SIZE);
-+ memset(&ccNodeInfo, 0, sizeof(t_CcNodeInformation));
-+ ccNodeInfo.h_CcNode = p_AdTableTmp;
-+ EnqueueNodeInfoToRelevantLst(h_OldLst, &ccNodeInfo, NULL);
-+
-+ if (!(*p_NextEngineParams))
-+ *p_NextEngineParams = &p_TreePtrOnCurrentMdfNode->keyAndNextEngineParams[i].nextEngineParams;
-+ }
-+ }
-+ }
-+
-+ ASSERT_COND(i == p_TreePtrOnCurrentMdfNode->numOfEntries);
-+ }
-+}
-+
-+static t_FmPcdModifyCcKeyAdditionalParams* ModifyKeyCommonPart1(t_Handle h_FmPcdCcNodeOrTree,
-+ uint16_t keyIndex,
-+ e_ModifyState modifyState,
-+ bool ttlCheck,
-+ bool hashCheck,
-+ bool tree)
-+{
-+ t_FmPcdModifyCcKeyAdditionalParams *p_FmPcdModifyCcKeyAdditionalParams;
-+ int i = 0, j = 0;
-+ bool wasUpdate = FALSE;
-+ t_FmPcdCcNode *p_CcNode = NULL;
-+ t_FmPcdCcTree *p_FmPcdCcTree;
-+ uint16_t numOfKeys;
-+ t_FmPcdCcKeyAndNextEngineParams *p_KeyAndNextEngineParams;
-+
-+ SANITY_CHECK_RETURN_VALUE(h_FmPcdCcNodeOrTree, E_INVALID_HANDLE, NULL);
-+
-+ p_KeyAndNextEngineParams = (t_FmPcdCcKeyAndNextEngineParams *)XX_Malloc(sizeof(t_FmPcdCcKeyAndNextEngineParams)*CC_MAX_NUM_OF_KEYS);
-+ if (!p_KeyAndNextEngineParams)
-+ {
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("Next engine and required action structure"));
-+ return NULL;
-+ }
-+ memset(p_KeyAndNextEngineParams, 0, sizeof(t_FmPcdCcKeyAndNextEngineParams)*CC_MAX_NUM_OF_KEYS);
-+
-+ if (!tree)
-+ {
-+ p_CcNode = (t_FmPcdCcNode *)h_FmPcdCcNodeOrTree;
-+ numOfKeys = p_CcNode->numOfKeys;
-+
-+ /* node has to be pointed by another node or tree */
-+ if (!LIST_NumOfObjs(&p_CcNode->ccPrevNodesLst) &&
-+ !LIST_NumOfObjs(&p_CcNode->ccTreeIdLst))
-+ {
-+ XX_Free(p_KeyAndNextEngineParams);
-+ REPORT_ERROR(MAJOR, E_INVALID_VALUE, ("node has to be pointed by node or tree"));
-+ return NULL;
-+ }
-+
-+ if (!LIST_NumOfObjs(&p_CcNode->ccTreesLst) ||
-+ (LIST_NumOfObjs(&p_CcNode->ccTreesLst) != 1))
-+ {
-+ XX_Free(p_KeyAndNextEngineParams);
-+ REPORT_ERROR(MAJOR, E_INVALID_VALUE, ("node has to be belonging to some tree and only to one tree"));
-+ return NULL;
-+ }
-+
-+ memcpy(p_KeyAndNextEngineParams,
-+ p_CcNode->keyAndNextEngineParams,
-+ CC_MAX_NUM_OF_KEYS * sizeof(t_FmPcdCcKeyAndNextEngineParams));
-+
-+ if (ttlCheck)
-+ {
-+ if ((p_CcNode->parseCode == CC_PC_FF_IPV4TTL) ||
-+ (p_CcNode->parseCode == CC_PC_FF_IPV6HOP_LIMIT))
-+ {
-+ XX_Free(p_KeyAndNextEngineParams);
-+ REPORT_ERROR(MAJOR, E_INVALID_VALUE, ("nodeId of CC_PC_FF_IPV4TTL or CC_PC_FF_IPV6HOP_LIMIT can not be used for this operation"));
-+ return NULL;
-+ }
-+ }
-+
-+ if (hashCheck)
-+ {
-+ if (p_CcNode->parseCode == CC_PC_GENERIC_IC_HASH_INDEXED)
-+ {
-+ XX_Free(p_KeyAndNextEngineParams);
-+ REPORT_ERROR(MAJOR, E_INVALID_VALUE, ("nodeId of CC_PC_GENERIC_IC_HASH_INDEXED can not be used for this operation"));
-+ return NULL;
-+ }
-+ }
-+ }
-+ else
-+ {
-+ p_FmPcdCcTree = (t_FmPcdCcTree *)h_FmPcdCcNodeOrTree;
-+ numOfKeys = p_FmPcdCcTree->numOfEntries;
-+ memcpy(p_KeyAndNextEngineParams,
-+ p_FmPcdCcTree->keyAndNextEngineParams,
-+ FM_PCD_MAX_NUM_OF_CC_GROUPS * sizeof(t_FmPcdCcKeyAndNextEngineParams));
-+ }
-+
-+ p_FmPcdModifyCcKeyAdditionalParams =
-+ (t_FmPcdModifyCcKeyAdditionalParams *)XX_Malloc(sizeof(t_FmPcdModifyCcKeyAdditionalParams));
-+ if (!p_FmPcdModifyCcKeyAdditionalParams)
-+ {
-+ XX_Free(p_KeyAndNextEngineParams);
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("Allocation of internal data structure FAILED"));
-+ return NULL;
-+ }
-+ memset(p_FmPcdModifyCcKeyAdditionalParams, 0, sizeof(t_FmPcdModifyCcKeyAdditionalParams));
-+
-+ p_FmPcdModifyCcKeyAdditionalParams->h_CurrentNode = h_FmPcdCcNodeOrTree;
-+ p_FmPcdModifyCcKeyAdditionalParams->savedKeyIndex = keyIndex;
-+
-+ while (i < numOfKeys)
-+ {
-+ if ((j == keyIndex) && !wasUpdate)
-+ {
-+ if (modifyState == e_MODIFY_STATE_ADD)
-+ j++;
-+ else if (modifyState == e_MODIFY_STATE_REMOVE)
-+ i++;
-+ wasUpdate = TRUE;
-+ }
-+ else
-+ {
-+ memcpy(&p_FmPcdModifyCcKeyAdditionalParams->keyAndNextEngineParams[j],
-+ p_KeyAndNextEngineParams + i,
-+ sizeof(t_FmPcdCcKeyAndNextEngineParams));
-+ i++;
-+ j++;
-+ }
-+ }
-+
-+ if (keyIndex == numOfKeys)
-+ {
-+ if (modifyState == e_MODIFY_STATE_ADD)
-+ j++;
-+ else if (modifyState == e_MODIFY_STATE_REMOVE)
-+ i++;
-+ }
-+
-+ memcpy(&p_FmPcdModifyCcKeyAdditionalParams->keyAndNextEngineParams[j],
-+ p_KeyAndNextEngineParams + numOfKeys,
-+ sizeof(t_FmPcdCcKeyAndNextEngineParams));
-+
-+ XX_Free(p_KeyAndNextEngineParams);
-+
-+ return p_FmPcdModifyCcKeyAdditionalParams;
-+}
-+
-+static t_Error UpdatePtrWhichPointOnCrntMdfNode(t_FmPcdCcNode *p_CcNode,
-+ t_FmPcdModifyCcKeyAdditionalParams *p_FmPcdModifyCcKeyAdditionalParams,
-+ t_List *h_OldLst,
-+ t_List *h_NewLst)
-+{
-+ t_FmPcdCcNextEngineParams *p_NextEngineParams = NULL;
-+ t_CcNodeInformation ccNodeInfo = {0};
-+ t_Handle h_NewAd;
-+
-+ /* Building a list of all action descriptors that point to the previous node */
-+ if (!LIST_IsEmpty(&p_CcNode->ccPrevNodesLst))
-+ UpdateAdPtrOfNodesWhichPointsOnCrntMdfNode(p_CcNode, h_OldLst, &p_NextEngineParams);
-+
-+ if (!LIST_IsEmpty(&p_CcNode->ccTreeIdLst))
-+ UpdateAdPtrOfTreesWhichPointsOnCrntMdfNode(p_CcNode, h_OldLst, &p_NextEngineParams);
-+
-+ /* This node must be found as next engine of one of its previous nodes or trees*/
-+ ASSERT_COND(p_NextEngineParams);
-+
-+ /* Building a new action descriptor that points to the modified node */
-+ h_NewAd = GetNewAd(p_CcNode, FALSE);
-+ if (!h_NewAd)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, NO_MSG);
-+ IOMemSet32(h_NewAd, 0, FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ BuildNewAd(h_NewAd,
-+ p_FmPcdModifyCcKeyAdditionalParams,
-+ p_CcNode,
-+ p_NextEngineParams);
-+
-+ ccNodeInfo.h_CcNode = h_NewAd;
-+ EnqueueNodeInfoToRelevantLst(h_NewLst, &ccNodeInfo, NULL);
-+
-+ return E_OK;
-+}
-+
-+static void UpdateCcRootOwner(t_FmPcdCcTree *p_FmPcdCcTree, bool add)
-+{
-+ ASSERT_COND(p_FmPcdCcTree);
-+
-+ /* this routine must be protected by the calling routine! */
-+
-+ if (add)
-+ p_FmPcdCcTree->owners++;
-+ else
-+ {
-+ ASSERT_COND(p_FmPcdCcTree->owners);
-+ p_FmPcdCcTree->owners--;
-+ }
-+}
-+
-+static t_Error CheckAndSetManipParamsWithCcNodeParams(t_FmPcdCcNode *p_CcNode)
-+{
-+ t_Error err = E_OK;
-+ int i = 0;
-+
-+ for (i = 0; i < p_CcNode->numOfKeys; i++)
-+ {
-+ if (p_CcNode->keyAndNextEngineParams[i].nextEngineParams.h_Manip)
-+ {
-+ err = FmPcdManipCheckParamsWithCcNodeParams(p_CcNode->keyAndNextEngineParams[i].nextEngineParams.h_Manip,
-+ (t_Handle)p_CcNode);
-+ if (err)
-+ return err;
-+ }
-+ }
-+
-+ return err;
-+}
-+static t_Error ValidateAndCalcStatsParams(t_FmPcdCcNode *p_CcNode,
-+ t_FmPcdCcNodeParams *p_CcNodeParam,
-+ uint32_t *p_NumOfRanges,
-+ uint32_t *p_CountersArraySize)
-+{
-+ e_FmPcdCcStatsMode statisticsMode = p_CcNode->statisticsMode;
-+
-+ UNUSED(p_CcNodeParam);
-+
-+ switch (statisticsMode)
-+ {
-+ case e_FM_PCD_CC_STATS_MODE_NONE:
-+ return E_OK;
-+
-+ case e_FM_PCD_CC_STATS_MODE_FRAME:
-+ case e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME:
-+ *p_NumOfRanges = 1;
-+ *p_CountersArraySize = 2 * FM_PCD_CC_STATS_COUNTER_SIZE;
-+ return E_OK;
-+
-+#if (DPAA_VERSION >= 11)
-+ case e_FM_PCD_CC_STATS_MODE_RMON:
-+ {
-+ uint16_t *p_FrameLengthRanges = p_CcNodeParam->keysParams.frameLengthRanges;
-+ uint32_t i;
-+
-+ if (p_FrameLengthRanges[0] <= 0)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Statistics mode"));
-+
-+ if (p_FrameLengthRanges[0] == 0xFFFF)
-+ {
-+ *p_NumOfRanges = 1;
-+ *p_CountersArraySize = 2 * FM_PCD_CC_STATS_COUNTER_SIZE;
-+ return E_OK;
-+ }
-+
-+ for (i = 1; i < FM_PCD_CC_STATS_MAX_NUM_OF_FLR; i++)
-+ {
-+ if (p_FrameLengthRanges[i-1] >= p_FrameLengthRanges[i])
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE,
-+ ("Frame length range must be larger at least by 1 from preceding range"));
-+
-+ /* Stop when last range is reached */
-+ if (p_FrameLengthRanges[i] == 0xFFFF)
-+ break;
-+ }
-+
-+ if ((i >= FM_PCD_CC_STATS_MAX_NUM_OF_FLR) ||
-+ (p_FrameLengthRanges[i] != 0xFFFF))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Last Frame length range must be 0xFFFF"));
-+
-+ *p_NumOfRanges = i+1;
-+
-+ /* Allocate an extra counter for byte count, as counters
-+ array always begins with byte count */
-+ *p_CountersArraySize = (*p_NumOfRanges + 1) * FM_PCD_CC_STATS_COUNTER_SIZE;
-+
-+ }
-+ return E_OK;
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Statistics mode"));
-+ }
-+}
-+
-+static t_Error CheckParams(t_Handle h_FmPcd,
-+ t_FmPcdCcNodeParams *p_CcNodeParam,
-+ t_FmPcdCcNode *p_CcNode,
-+ bool *isKeyTblAlloc)
-+{
-+ int tmp = 0;
-+ t_FmPcdCcKeyParams *p_KeyParams;
-+ t_Error err;
-+ uint32_t requiredAction = 0;
-+
-+ /* Validate statistics parameters */
-+ err = ValidateAndCalcStatsParams(p_CcNode,
-+ p_CcNodeParam,
-+ &(p_CcNode->numOfStatsFLRs),
-+ &(p_CcNode->countersArraySize));
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, ("Invalid statistics parameters"));
-+
-+ /* Validate next engine parameters on Miss */
-+ err = ValidateNextEngineParams(h_FmPcd,
-+ &p_CcNodeParam->keysParams.ccNextEngineParamsForMiss,
-+ p_CcNode->statisticsMode);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, ("For this node MissNextEngineParams are not valid"));
-+
-+ if (p_CcNodeParam->keysParams.ccNextEngineParamsForMiss.h_Manip)
-+ {
-+ err = FmPcdManipCheckParamsForCcNextEngine(&p_CcNodeParam->keysParams.ccNextEngineParamsForMiss, &requiredAction);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+ }
-+
-+ memcpy(&p_CcNode->keyAndNextEngineParams[p_CcNode->numOfKeys].nextEngineParams,
-+ &p_CcNodeParam->keysParams.ccNextEngineParamsForMiss,
-+ sizeof(t_FmPcdCcNextEngineParams));
-+
-+ p_CcNode->keyAndNextEngineParams[p_CcNode->numOfKeys].requiredAction = requiredAction;
-+
-+ if ((p_CcNode->keyAndNextEngineParams[p_CcNode->numOfKeys].nextEngineParams.nextEngine == e_FM_PCD_CC)
-+ && p_CcNode->keyAndNextEngineParams[p_CcNode->numOfKeys].nextEngineParams.h_Manip)
-+ {
-+ err = AllocAndFillAdForContLookupManip(p_CcNode->keyAndNextEngineParams[p_CcNode->numOfKeys].nextEngineParams.params.ccParams.h_CcNode);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+ }
-+
-+ for (tmp = 0; tmp < p_CcNode->numOfKeys; tmp++)
-+ {
-+ p_KeyParams = &p_CcNodeParam->keysParams.keyParams[tmp];
-+
-+ if (!p_KeyParams->p_Key)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("p_Key is not initialized"));
-+
-+ err = ValidateNextEngineParams(h_FmPcd,
-+ &p_KeyParams->ccNextEngineParams,
-+ p_CcNode->statisticsMode);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+
-+ err = UpdateGblMask(p_CcNode,
-+ p_CcNodeParam->keysParams.keySize,
-+ p_KeyParams->p_Mask);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+
-+ if (p_KeyParams->ccNextEngineParams.h_Manip)
-+ {
-+ err = FmPcdManipCheckParamsForCcNextEngine(&p_KeyParams->ccNextEngineParams, &requiredAction);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+ }
-+
-+ /* Store 'key' parameters - key, mask (if passed by the user) */
-+ memcpy(p_CcNode->keyAndNextEngineParams[tmp].key, p_KeyParams->p_Key, p_CcNodeParam->keysParams.keySize);
-+
-+ if (p_KeyParams->p_Mask)
-+ memcpy(p_CcNode->keyAndNextEngineParams[tmp].mask,
-+ p_KeyParams->p_Mask,
-+ p_CcNodeParam->keysParams.keySize);
-+ else
-+ memset((void *)(p_CcNode->keyAndNextEngineParams[tmp].mask),
-+ 0xFF,
-+ p_CcNodeParam->keysParams.keySize);
-+
-+ /* Store next engine parameters */
-+ memcpy(&p_CcNode->keyAndNextEngineParams[tmp].nextEngineParams,
-+ &p_KeyParams->ccNextEngineParams,
-+ sizeof(t_FmPcdCcNextEngineParams));
-+
-+ p_CcNode->keyAndNextEngineParams[tmp].requiredAction = requiredAction;
-+
-+ if ((p_CcNode->keyAndNextEngineParams[tmp].nextEngineParams.nextEngine == e_FM_PCD_CC)
-+ && p_CcNode->keyAndNextEngineParams[tmp].nextEngineParams.h_Manip)
-+ {
-+ err = AllocAndFillAdForContLookupManip(p_CcNode->keyAndNextEngineParams[tmp].nextEngineParams.params.ccParams.h_CcNode);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+ }
-+ }
-+
-+ if (p_CcNode->maxNumOfKeys)
-+ {
-+ if (p_CcNode->maxNumOfKeys < p_CcNode->numOfKeys)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Number of keys exceed the provided maximal number of keys"));
-+ }
-+
-+ *isKeyTblAlloc = TRUE;
-+
-+ return E_OK;
-+}
-+
-+static t_Error Ipv4TtlOrIpv6HopLimitCheckParams(t_Handle h_FmPcd,
-+ t_FmPcdCcNodeParams *p_CcNodeParam,
-+ t_FmPcdCcNode *p_CcNode,
-+ bool *isKeyTblAlloc)
-+{
-+ int tmp = 0;
-+ t_FmPcdCcKeyParams *p_KeyParams;
-+ t_Error err;
-+ uint8_t key = 0x01;
-+ uint32_t requiredAction = 0;
-+
-+ if (p_CcNode->numOfKeys != 1)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("For node of the type IPV4_TTL or IPV6_HOP_LIMIT the maximal supported 'numOfKeys' is 1"));
-+
-+ if ((p_CcNodeParam->keysParams.maxNumOfKeys) && (p_CcNodeParam->keysParams.maxNumOfKeys != 1))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("For node of the type IPV4_TTL or IPV6_HOP_LIMIT the maximal supported 'maxNumOfKeys' is 1"));
-+
-+ /* Validate statistics parameters */
-+ err = ValidateAndCalcStatsParams(p_CcNode,
-+ p_CcNodeParam,
-+ &(p_CcNode->numOfStatsFLRs),
-+ &(p_CcNode->countersArraySize));
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, ("Invalid statistics parameters"));
-+
-+ err = ValidateNextEngineParams(h_FmPcd,
-+ &p_CcNodeParam->keysParams.ccNextEngineParamsForMiss,
-+ p_CcNodeParam->keysParams.statisticsMode);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, ("For this node MissNextEngineParams are not valid"));
-+
-+ if (p_CcNodeParam->keysParams.ccNextEngineParamsForMiss.h_Manip)
-+ {
-+ err = FmPcdManipCheckParamsForCcNextEngine(&p_CcNodeParam->keysParams.ccNextEngineParamsForMiss, &requiredAction);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+ }
-+
-+ memcpy(&p_CcNode->keyAndNextEngineParams[p_CcNode->numOfKeys].nextEngineParams,
-+ &p_CcNodeParam->keysParams.ccNextEngineParamsForMiss,
-+ sizeof(t_FmPcdCcNextEngineParams));
-+
-+ p_CcNode->keyAndNextEngineParams[p_CcNode->numOfKeys].requiredAction = requiredAction;
-+
-+ if ((p_CcNode->keyAndNextEngineParams[p_CcNode->numOfKeys].nextEngineParams.nextEngine == e_FM_PCD_CC)
-+ && p_CcNode->keyAndNextEngineParams[p_CcNode->numOfKeys].nextEngineParams.h_Manip)
-+ {
-+ err = AllocAndFillAdForContLookupManip(p_CcNode->keyAndNextEngineParams[p_CcNode->numOfKeys].nextEngineParams.params.ccParams.h_CcNode);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+ }
-+
-+ for (tmp = 0; tmp < p_CcNode->numOfKeys; tmp++)
-+ {
-+ p_KeyParams = &p_CcNodeParam->keysParams.keyParams[tmp];
-+
-+ if (p_KeyParams->p_Mask)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("For node of the type IPV4_TTL or IPV6_HOP_LIMIT p_Mask can not be initialized"));
-+
-+ if (memcmp(p_KeyParams->p_Key, &key, 1) != 0)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("For node of the type IPV4_TTL or IPV6_HOP_LIMIT p_Key has to be 1"));
-+
-+ err = ValidateNextEngineParams(h_FmPcd,
-+ &p_KeyParams->ccNextEngineParams,
-+ p_CcNode->statisticsMode);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+
-+ if (p_KeyParams->ccNextEngineParams.h_Manip)
-+ {
-+ err = FmPcdManipCheckParamsForCcNextEngine(&p_KeyParams->ccNextEngineParams, &requiredAction);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+ }
-+
-+ /* Store 'key' parameters - key (fixed to 0x01), key size of 1 byte and full mask */
-+ p_CcNode->keyAndNextEngineParams[tmp].key[0] = key;
-+ p_CcNode->keyAndNextEngineParams[tmp].mask[0] = 0xFF;
-+
-+ /* Store NextEngine parameters */
-+ memcpy(&p_CcNode->keyAndNextEngineParams[tmp].nextEngineParams,
-+ &p_KeyParams->ccNextEngineParams,
-+ sizeof(t_FmPcdCcNextEngineParams));
-+
-+ if ((p_CcNode->keyAndNextEngineParams[tmp].nextEngineParams.nextEngine == e_FM_PCD_CC)
-+ && p_CcNode->keyAndNextEngineParams[tmp].nextEngineParams.h_Manip)
-+ {
-+ err = AllocAndFillAdForContLookupManip(p_CcNode->keyAndNextEngineParams[tmp].nextEngineParams.params.ccParams.h_CcNode);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+ }
-+ p_CcNode->keyAndNextEngineParams[tmp].requiredAction = requiredAction;
-+ }
-+
-+ *isKeyTblAlloc = FALSE;
-+
-+ return E_OK;
-+}
-+
-+static t_Error IcHashIndexedCheckParams(t_Handle h_FmPcd,
-+ t_FmPcdCcNodeParams *p_CcNodeParam,
-+ t_FmPcdCcNode *p_CcNode,
-+ bool *isKeyTblAlloc)
-+{
-+ int tmp = 0, countOnes = 0;
-+ t_FmPcdCcKeyParams *p_KeyParams;
-+ t_Error err;
-+ uint16_t glblMask = p_CcNodeParam->extractCcParams.extractNonHdr.icIndxMask;
-+ uint16_t countMask = (uint16_t)(glblMask >> 4);
-+ uint32_t requiredAction = 0;
-+
-+ if (glblMask & 0x000f)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("icIndxMask has to be with last nibble 0"));
-+
-+ while (countMask)
-+ {
-+ countOnes++;
-+ countMask = (uint16_t)(countMask >> 1);
-+ }
-+
-+ if (!POWER_OF_2(p_CcNode->numOfKeys))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("For Node of the type INDEXED numOfKeys has to be powerOfTwo"));
-+
-+ if (p_CcNode->numOfKeys != ((uint32_t)1 << countOnes))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("For Node of the type IC_HASH_INDEXED numOfKeys has to be powerOfTwo"));
-+
-+ if (p_CcNodeParam->keysParams.maxNumOfKeys &&
-+ (p_CcNodeParam->keysParams.maxNumOfKeys != p_CcNode->numOfKeys))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("For Node of the type INDEXED 'maxNumOfKeys' should be 0 or equal 'numOfKeys'"));
-+
-+ /* Validate statistics parameters */
-+ err = ValidateAndCalcStatsParams(p_CcNode,
-+ p_CcNodeParam,
-+ &(p_CcNode->numOfStatsFLRs),
-+ &(p_CcNode->countersArraySize));
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, ("Invalid statistics parameters"));
-+
-+ err = ValidateNextEngineParams(h_FmPcd,
-+ &p_CcNodeParam->keysParams.ccNextEngineParamsForMiss,
-+ p_CcNode->statisticsMode);
-+ if (GET_ERROR_TYPE(err)!= E_NOT_SUPPORTED)
-+ RETURN_ERROR(MAJOR, err, ("MissNextEngineParams for the node of the type IC_INDEX_HASH has to be UnInitialized"));
-+
-+ for (tmp = 0; tmp < p_CcNode->numOfKeys; tmp++)
-+ {
-+ p_KeyParams = &p_CcNodeParam->keysParams.keyParams[tmp];
-+
-+ if (p_KeyParams->p_Mask || p_KeyParams->p_Key)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("For Node of the type IC_HASH_INDEXED p_Key or p_Mask has to be NULL"));
-+
-+ if ((glblMask & (tmp * 16)) == (tmp * 16))
-+ {
-+ err = ValidateNextEngineParams(h_FmPcd,
-+ &p_KeyParams->ccNextEngineParams,
-+ p_CcNode->statisticsMode);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, ("This index has to be initialized for the node of the type IC_INDEX_HASH according to settings of GlobalMask "));
-+
-+ if (p_KeyParams->ccNextEngineParams.h_Manip)
-+ {
-+ err = FmPcdManipCheckParamsForCcNextEngine(&p_KeyParams->ccNextEngineParams, &requiredAction);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+ p_CcNode->keyAndNextEngineParams[tmp].requiredAction = requiredAction;
-+ }
-+
-+ memcpy(&p_CcNode->keyAndNextEngineParams[tmp].nextEngineParams,
-+ &p_KeyParams->ccNextEngineParams,
-+ sizeof(t_FmPcdCcNextEngineParams));
-+
-+ if ((p_CcNode->keyAndNextEngineParams[tmp].nextEngineParams.nextEngine == e_FM_PCD_CC)
-+ && p_CcNode->keyAndNextEngineParams[tmp].nextEngineParams.h_Manip)
-+ {
-+ err = AllocAndFillAdForContLookupManip(p_CcNode->keyAndNextEngineParams[tmp].nextEngineParams.params.ccParams.h_CcNode);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, (NO_MSG));
-+ }
-+ }
-+ else
-+ {
-+ err = ValidateNextEngineParams(h_FmPcd,
-+ &p_KeyParams->ccNextEngineParams,
-+ p_CcNode->statisticsMode);
-+ if (GET_ERROR_TYPE(err)!= E_NOT_SUPPORTED)
-+ RETURN_ERROR(MAJOR, err, ("This index has to be UnInitialized for the node of the type IC_INDEX_HASH according to settings of GlobalMask"));
-+ }
-+ }
-+
-+ *isKeyTblAlloc = FALSE;
-+ memcpy(PTR_MOVE(p_CcNode->p_GlblMask, 2), &glblMask, 2);
-+
-+ return E_OK;
-+}
-+
-+static t_Error ModifyNextEngineParamNode(t_Handle h_FmPcd,
-+ t_Handle h_FmPcdCcNode,
-+ uint16_t keyIndex,
-+ t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams)
-+{
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_FmPcdCcNode;
-+ t_FmPcd *p_FmPcd;
-+ t_List h_OldPointersLst, h_NewPointersLst;
-+ t_FmPcdModifyCcKeyAdditionalParams *p_ModifyKeyParams;
-+ t_Error err = E_OK;
-+
-+ SANITY_CHECK_RETURN_ERROR(h_FmPcd,E_INVALID_VALUE);
-+ SANITY_CHECK_RETURN_ERROR(p_CcNode,E_INVALID_HANDLE);
-+
-+ if (keyIndex >= p_CcNode->numOfKeys)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("keyIndex > previously cleared last index + 1"));
-+
-+ p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+
-+ INIT_LIST(&h_OldPointersLst);
-+ INIT_LIST(&h_NewPointersLst);
-+
-+ p_ModifyKeyParams = ModifyKeyCommonPart1(p_CcNode, keyIndex, e_MODIFY_STATE_CHANGE, FALSE, FALSE, FALSE);
-+ if (!p_ModifyKeyParams)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, NO_MSG);
-+
-+ if (p_CcNode->maxNumOfKeys)
-+ {
-+ if (!TRY_LOCK(p_FmPcd->h_ShadowSpinlock, &p_FmPcd->shadowLock))
-+ {
-+ XX_Free(p_ModifyKeyParams);
-+ return ERROR_CODE(E_BUSY);
-+ }
-+ }
-+
-+ err = BuildNewNodeModifyNextEngine(h_FmPcd,
-+ p_CcNode,
-+ keyIndex,
-+ p_FmPcdCcNextEngineParams,
-+ &h_OldPointersLst,
-+ &h_NewPointersLst,
-+ p_ModifyKeyParams);
-+ if (err)
-+ {
-+ XX_Free(p_ModifyKeyParams);
-+ if (p_CcNode->maxNumOfKeys)
-+ RELEASE_LOCK(p_FmPcd->shadowLock);
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+
-+ err = DoDynamicChange(p_FmPcd, &h_OldPointersLst, &h_NewPointersLst, p_ModifyKeyParams, FALSE);
-+
-+ if (p_CcNode->maxNumOfKeys)
-+ RELEASE_LOCK(p_FmPcd->shadowLock);
-+
-+ return err;
-+}
-+
-+static t_Error FindKeyIndex(t_Handle h_CcNode,
-+ uint8_t keySize,
-+ uint8_t *p_Key,
-+ uint8_t *p_Mask,
-+ uint16_t *p_KeyIndex)
-+{
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+ uint8_t tmpMask[FM_PCD_MAX_SIZE_OF_KEY];
-+ uint16_t i;
-+
-+ ASSERT_COND(p_Key);
-+ ASSERT_COND(p_KeyIndex);
-+ ASSERT_COND(keySize < FM_PCD_MAX_SIZE_OF_KEY);
-+
-+ if (keySize != p_CcNode->userSizeOfExtraction)
-+ RETURN_ERROR(MINOR, E_INVALID_VALUE, ("Key size doesn't match the extraction size of the node"));
-+
-+ /* If user didn't pass a mask for this key, we'll look for full extraction mask */
-+ if (!p_Mask)
-+ memset(tmpMask, 0xFF, keySize);
-+
-+ for (i = 0 ; i < p_CcNode->numOfKeys; i++)
-+ {
-+ /* Comparing received key */
-+ if (memcmp(p_Key, p_CcNode->keyAndNextEngineParams[i].key, keySize) == 0)
-+ {
-+ if (p_Mask)
-+ {
-+ /* If a user passed a mask for this key, it must match to the existing key's mask for a correct match */
-+ if (memcmp(p_Mask, p_CcNode->keyAndNextEngineParams[i].mask, keySize) == 0)
-+ {
-+ *p_KeyIndex = i;
-+ return E_OK;
-+ }
-+ }
-+ else
-+ {
-+ /* If user didn't pass a mask for this key, check if the existing key mask is full extraction */
-+ if (memcmp(tmpMask, p_CcNode->keyAndNextEngineParams[i].mask, keySize) == 0)
-+ {
-+ *p_KeyIndex = i;
-+ return E_OK;
-+ }
-+ }
-+ }
-+ }
-+
-+ return ERROR_CODE(E_NOT_FOUND);
-+}
-+
-+static t_Error CalcAndUpdateCcShadow(t_FmPcdCcNode *p_CcNode,
-+ bool isKeyTblAlloc,
-+ uint32_t *p_MatchTableSize,
-+ uint32_t *p_AdTableSize)
-+{
-+ uint32_t shadowSize;
-+ t_Error err;
-+
-+ /* Calculate keys table maximal size - each entry consists of a key and a mask,
-+ (if local mask support is requested) */
-+ *p_MatchTableSize = p_CcNode->ccKeySizeAccExtraction * sizeof(uint8_t) * p_CcNode->maxNumOfKeys;
-+
-+ if (p_CcNode->maskSupport)
-+ *p_MatchTableSize *= 2;
-+
-+ /* Calculate next action descriptors table, including one more entry for miss */
-+ *p_AdTableSize = (uint32_t)((p_CcNode->maxNumOfKeys + 1) * FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ /* Calculate maximal shadow size of this node.
-+ All shadow structures will be used for runtime modifications host command. If
-+ keys table was allocated for this node, the keys table and next engines table may
-+ be modified in run time (entries added or removed), so shadow tables are requires.
-+ Otherwise, the only supported runtime modification is a specific next engine update
-+ and this requires shadow memory of a single AD */
-+
-+ /* Shadow size should be enough to hold the following 3 structures:
-+ * 1 - an action descriptor */
-+ shadowSize = FM_PCD_CC_AD_ENTRY_SIZE;
-+
-+ /* 2 - keys match table, if was allocated for the current node */
-+ if (isKeyTblAlloc)
-+ shadowSize += *p_MatchTableSize;
-+
-+ /* 3 - next action descriptors table */
-+ shadowSize += *p_AdTableSize;
-+
-+ /* Update shadow to the calculated size */
-+ err = FmPcdUpdateCcShadow (p_CcNode->h_FmPcd, (uint32_t)shadowSize, FM_PCD_CC_AD_TABLE_ALIGN);
-+ if (err != E_OK)
-+ {
-+ DeleteNode(p_CcNode);
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("MURAM allocation for CC node shadow"));
-+ }
-+
-+ return E_OK;
-+}
-+
-+static t_Error AllocStatsObjs(t_FmPcdCcNode *p_CcNode)
-+{
-+ t_FmPcdStatsObj *p_StatsObj;
-+ t_Handle h_FmMuram, h_StatsAd, h_StatsCounters;
-+ uint32_t i;
-+
-+ h_FmMuram = FmPcdGetMuramHandle(p_CcNode->h_FmPcd);
-+ if (!h_FmMuram)
-+ RETURN_ERROR(MAJOR, E_INVALID_HANDLE, ("FM MURAM"));
-+
-+ /* Allocate statistics ADs and statistics counter. An extra pair (AD + counters)
-+ will be allocated to support runtime modifications */
-+ for (i = 0; i < p_CcNode->maxNumOfKeys + 2; i++)
-+ {
-+ /* Allocate list object structure */
-+ p_StatsObj = XX_Malloc(sizeof(t_FmPcdStatsObj));
-+ if (!p_StatsObj)
-+ {
-+ FreeStatObjects(&p_CcNode->availableStatsLst, h_FmMuram);
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("Statistics object"));
-+ }
-+ memset(p_StatsObj, 0, sizeof(t_FmPcdStatsObj));
-+
-+ /* Allocate statistics AD from MURAM */
-+ h_StatsAd = (t_Handle)FM_MURAM_AllocMem(h_FmMuram,
-+ FM_PCD_CC_AD_ENTRY_SIZE,
-+ FM_PCD_CC_AD_TABLE_ALIGN);
-+ if (!h_StatsAd)
-+ {
-+ FreeStatObjects(&p_CcNode->availableStatsLst, h_FmMuram);
-+ XX_Free(p_StatsObj);
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM allocation for statistics ADs"));
-+ }
-+ IOMemSet32(h_StatsAd, 0, FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ /* Allocate statistics counters from MURAM */
-+ h_StatsCounters = (t_Handle)FM_MURAM_AllocMem(h_FmMuram,
-+ p_CcNode->countersArraySize,
-+ FM_PCD_CC_AD_TABLE_ALIGN);
-+ if (!h_StatsCounters)
-+ {
-+ FreeStatObjects(&p_CcNode->availableStatsLst, h_FmMuram);
-+ FM_MURAM_FreeMem(h_FmMuram, h_StatsAd);
-+ XX_Free(p_StatsObj);
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM allocation for statistics counters"));
-+ }
-+ IOMemSet32(h_StatsCounters, 0, p_CcNode->countersArraySize);
-+
-+ p_StatsObj->h_StatsAd = h_StatsAd;
-+ p_StatsObj->h_StatsCounters = h_StatsCounters;
-+
-+ EnqueueStatsObj(&p_CcNode->availableStatsLst, p_StatsObj);
-+ }
-+
-+ return E_OK;
-+}
-+
-+static t_Error MatchTableGetKeyStatistics(t_FmPcdCcNode *p_CcNode,
-+ uint16_t keyIndex,
-+ t_FmPcdCcKeyStatistics *p_KeyStatistics)
-+{
-+ uint32_t *p_StatsCounters, i;
-+
-+ if (p_CcNode->statisticsMode == e_FM_PCD_CC_STATS_MODE_NONE)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Statistics were not enabled for this match table"));
-+
-+ if (keyIndex >= p_CcNode->numOfKeys)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("The provided keyIndex exceeds the number of keys in this match table"));
-+
-+ if (!p_CcNode->keyAndNextEngineParams[keyIndex].p_StatsObj)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Statistics were not enabled for this key"));
-+
-+ memset(p_KeyStatistics, 0, sizeof (t_FmPcdCcKeyStatistics));
-+
-+ p_StatsCounters = p_CcNode->keyAndNextEngineParams[keyIndex].p_StatsObj->h_StatsCounters;
-+ ASSERT_COND(p_StatsCounters);
-+
-+ p_KeyStatistics->byteCount = GET_UINT32(*p_StatsCounters);
-+
-+ for (i = 1; i <= p_CcNode->numOfStatsFLRs; i++)
-+ {
-+ p_StatsCounters = PTR_MOVE(p_StatsCounters, FM_PCD_CC_STATS_COUNTER_SIZE);
-+
-+ p_KeyStatistics->frameCount += GET_UINT32(*p_StatsCounters);
-+
-+#if (DPAA_VERSION >= 11)
-+ p_KeyStatistics->frameLengthRangeCount[i-1] = GET_UINT32(*p_StatsCounters);
-+#endif /* (DPAA_VERSION >= 11) */
-+ }
-+
-+ return E_OK;
-+}
-+
-+
-+/*****************************************************************************/
-+/* Inter-module API routines */
-+/*****************************************************************************/
-+
-+t_CcNodeInformation* FindNodeInfoInReleventLst(t_List *p_List, t_Handle h_Info, t_Handle h_Spinlock)
-+{
-+ t_CcNodeInformation *p_CcInformation;
-+ t_List *p_Pos;
-+ uint32_t intFlags;
-+
-+ intFlags = XX_LockIntrSpinlock(h_Spinlock);
-+
-+ for (p_Pos = LIST_FIRST(p_List); p_Pos != (p_List); p_Pos = LIST_NEXT(p_Pos))
-+ {
-+ p_CcInformation = CC_NODE_F_OBJECT(p_Pos);
-+
-+ ASSERT_COND(p_CcInformation->h_CcNode);
-+
-+ if (p_CcInformation->h_CcNode == h_Info)
-+ {
-+ XX_UnlockIntrSpinlock(h_Spinlock, intFlags);
-+ return p_CcInformation;
-+ }
-+ }
-+
-+ XX_UnlockIntrSpinlock(h_Spinlock, intFlags);
-+
-+ return NULL;
-+}
-+
-+void EnqueueNodeInfoToRelevantLst(t_List *p_List, t_CcNodeInformation *p_CcInfo, t_Handle h_Spinlock)
-+{
-+ t_CcNodeInformation *p_CcInformation;
-+ uint32_t intFlags = 0;
-+
-+ p_CcInformation = (t_CcNodeInformation *)XX_Malloc(sizeof(t_CcNodeInformation));
-+
-+ if (p_CcInformation)
-+ {
-+ memset(p_CcInformation, 0, sizeof(t_CcNodeInformation));
-+ memcpy(p_CcInformation, p_CcInfo, sizeof(t_CcNodeInformation));
-+ INIT_LIST(&p_CcInformation->node);
-+
-+ if (h_Spinlock)
-+ intFlags = XX_LockIntrSpinlock(h_Spinlock);
-+
-+ LIST_AddToTail(&p_CcInformation->node, p_List);
-+
-+ if (h_Spinlock)
-+ XX_UnlockIntrSpinlock(h_Spinlock, intFlags);
-+ }
-+ else
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("CC Node Information"));
-+}
-+
-+void DequeueNodeInfoFromRelevantLst(t_List *p_List, t_Handle h_Info, t_Handle h_Spinlock)
-+{
-+ t_CcNodeInformation *p_CcInformation = NULL;
-+ uint32_t intFlags = 0;
-+ t_List *p_Pos;
-+
-+ if (h_Spinlock)
-+ intFlags = XX_LockIntrSpinlock(h_Spinlock);
-+
-+ if (LIST_IsEmpty(p_List))
-+ {
-+ XX_RestoreAllIntr(intFlags);
-+ return;
-+ }
-+
-+ for (p_Pos = LIST_FIRST(p_List); p_Pos != (p_List); p_Pos = LIST_NEXT(p_Pos))
-+ {
-+ p_CcInformation = CC_NODE_F_OBJECT(p_Pos);
-+ ASSERT_COND(p_CcInformation);
-+ ASSERT_COND(p_CcInformation->h_CcNode);
-+ if (p_CcInformation->h_CcNode == h_Info)
-+ break;
-+ }
-+
-+ if (p_CcInformation)
-+ {
-+ LIST_DelAndInit(&p_CcInformation->node);
-+ XX_Free(p_CcInformation);
-+ }
-+
-+ if (h_Spinlock)
-+ XX_UnlockIntrSpinlock(h_Spinlock, intFlags);
-+}
-+
-+void NextStepAd(t_Handle h_Ad,
-+ t_FmPcdCcStatsParams *p_FmPcdCcStatsParams,
-+ t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams,
-+ t_FmPcd *p_FmPcd)
-+{
-+ switch (p_FmPcdCcNextEngineParams->nextEngine)
-+ {
-+ case (e_FM_PCD_KG):
-+ case (e_FM_PCD_PLCR):
-+ case (e_FM_PCD_DONE):
-+ /* if NIA is not CC, create a "result" type AD */
-+ FillAdOfTypeResult(h_Ad,
-+ p_FmPcdCcStatsParams,
-+ p_FmPcd,
-+ p_FmPcdCcNextEngineParams);
-+ break;
-+#if (DPAA_VERSION >= 11)
-+ case (e_FM_PCD_FR):
-+ if (p_FmPcdCcNextEngineParams->params.frParams.h_FrmReplic)
-+ {
-+ FillAdOfTypeContLookup(h_Ad,
-+ p_FmPcdCcStatsParams,
-+ p_FmPcd,
-+ p_FmPcdCcNextEngineParams->params.ccParams.h_CcNode,
-+ p_FmPcdCcNextEngineParams->h_Manip,
-+ p_FmPcdCcNextEngineParams->params.frParams.h_FrmReplic);
-+ FrmReplicGroupUpdateOwner(p_FmPcdCcNextEngineParams->params.frParams.h_FrmReplic,
-+ TRUE/* add */);
-+ }
-+ break;
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ case (e_FM_PCD_CC):
-+ /* if NIA is not CC, create a TD to continue the CC lookup */
-+ FillAdOfTypeContLookup(h_Ad,
-+ p_FmPcdCcStatsParams,
-+ p_FmPcd,
-+ p_FmPcdCcNextEngineParams->params.ccParams.h_CcNode,
-+ p_FmPcdCcNextEngineParams->h_Manip,
-+ NULL);
-+
-+ UpdateNodeOwner(p_FmPcdCcNextEngineParams->params.ccParams.h_CcNode, TRUE);
-+ break;
-+
-+ default:
-+ return;
-+ }
-+}
-+
-+t_Error FmPcdCcTreeAddIPR(t_Handle h_FmPcd,
-+ t_Handle h_FmTree,
-+ t_Handle h_NetEnv,
-+ t_Handle h_IpReassemblyManip,
-+ bool createSchemes)
-+{
-+ t_FmPcdCcTree *p_FmPcdCcTree = (t_FmPcdCcTree *)h_FmTree;
-+ t_FmPcdCcNextEngineParams nextEngineParams;
-+ t_NetEnvParams netEnvParams;
-+ t_Handle h_Ad;
-+ bool isIpv6Present;
-+ uint8_t ipv4GroupId, ipv6GroupId;
-+ t_Error err;
-+
-+ ASSERT_COND(p_FmPcdCcTree);
-+
-+ /* this routine must be protected by the calling routine! */
-+
-+ memset(&nextEngineParams, 0, sizeof(t_FmPcdCcNextEngineParams));
-+ memset(&netEnvParams, 0, sizeof(t_NetEnvParams));
-+
-+ h_Ad = UINT_TO_PTR(p_FmPcdCcTree->ccTreeBaseAddr);
-+
-+ isIpv6Present = FmPcdManipIpReassmIsIpv6Hdr(h_IpReassemblyManip);
-+
-+ if (isIpv6Present && (p_FmPcdCcTree->numOfEntries > (FM_PCD_MAX_NUM_OF_CC_GROUPS-2)))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("need two free entries for IPR"));
-+
-+ if (p_FmPcdCcTree->numOfEntries > (FM_PCD_MAX_NUM_OF_CC_GROUPS-1))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("need two free entries for IPR"));
-+
-+ nextEngineParams.nextEngine = e_FM_PCD_DONE;
-+ nextEngineParams.h_Manip = h_IpReassemblyManip;
-+
-+ /* Lock tree */
-+ err = CcRootTryLock(p_FmPcdCcTree);
-+ if (err)
-+ return ERROR_CODE(E_BUSY);
-+
-+ if (p_FmPcdCcTree->h_IpReassemblyManip == h_IpReassemblyManip)
-+ {
-+ CcRootReleaseLock(p_FmPcdCcTree);
-+ return E_OK;
-+ }
-+
-+ if ((p_FmPcdCcTree->h_IpReassemblyManip) &&
-+ (p_FmPcdCcTree->h_IpReassemblyManip != h_IpReassemblyManip))
-+ {
-+ CcRootReleaseLock(p_FmPcdCcTree);
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("This tree was previously updated with different IPR"));
-+ }
-+
-+ /* Initialize IPR for the first time for this tree */
-+ if (isIpv6Present)
-+ {
-+ ipv6GroupId = p_FmPcdCcTree->numOfGrps++;
-+ p_FmPcdCcTree->fmPcdGroupParam[ipv6GroupId].baseGroupEntry = (FM_PCD_MAX_NUM_OF_CC_GROUPS-2);
-+
-+ if (createSchemes)
-+ {
-+ err = FmPcdManipBuildIpReassmScheme(h_FmPcd, h_NetEnv, p_FmPcdCcTree, h_IpReassemblyManip, FALSE, ipv6GroupId);
-+ if (err)
-+ {
-+ p_FmPcdCcTree->numOfGrps--;
-+ CcRootReleaseLock(p_FmPcdCcTree);
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+ }
-+
-+ NextStepAd(PTR_MOVE(h_Ad, (FM_PCD_MAX_NUM_OF_CC_GROUPS-2) * FM_PCD_CC_AD_ENTRY_SIZE),
-+ NULL,
-+ &nextEngineParams,
-+ h_FmPcd);
-+ }
-+
-+ ipv4GroupId = p_FmPcdCcTree->numOfGrps++;
-+ p_FmPcdCcTree->fmPcdGroupParam[ipv4GroupId].totalBitsMask = 0;
-+ p_FmPcdCcTree->fmPcdGroupParam[ipv4GroupId].baseGroupEntry = (FM_PCD_MAX_NUM_OF_CC_GROUPS-1);
-+
-+ if (createSchemes)
-+ {
-+ err = FmPcdManipBuildIpReassmScheme(h_FmPcd, h_NetEnv, p_FmPcdCcTree, h_IpReassemblyManip, TRUE, ipv4GroupId);
-+ if (err)
-+ {
-+ p_FmPcdCcTree->numOfGrps--;
-+ if (isIpv6Present)
-+ {
-+ p_FmPcdCcTree->numOfGrps--;
-+ FmPcdManipDeleteIpReassmSchemes(h_IpReassemblyManip);
-+ }
-+ CcRootReleaseLock(p_FmPcdCcTree);
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+ }
-+
-+ NextStepAd(PTR_MOVE(h_Ad, (FM_PCD_MAX_NUM_OF_CC_GROUPS-1) * FM_PCD_CC_AD_ENTRY_SIZE),
-+ NULL,
-+ &nextEngineParams,
-+ h_FmPcd);
-+
-+ p_FmPcdCcTree->h_IpReassemblyManip = h_IpReassemblyManip;
-+
-+ CcRootReleaseLock(p_FmPcdCcTree);
-+
-+ return E_OK;
-+}
-+
-+
-+t_Handle FmPcdCcTreeGetSavedManipParams(t_Handle h_FmTree)
-+{
-+ t_FmPcdCcTree *p_FmPcdCcTree = (t_FmPcdCcTree *)h_FmTree;
-+
-+ ASSERT_COND(p_FmPcdCcTree);
-+
-+ return p_FmPcdCcTree->h_FmPcdCcSavedManipParams;
-+}
-+
-+void FmPcdCcTreeSetSavedManipParams(t_Handle h_FmTree, t_Handle h_SavedManipParams)
-+{
-+ t_FmPcdCcTree *p_FmPcdCcTree = (t_FmPcdCcTree *)h_FmTree;
-+
-+ ASSERT_COND(p_FmPcdCcTree);
-+
-+ p_FmPcdCcTree->h_FmPcdCcSavedManipParams = h_SavedManipParams;
-+}
-+
-+uint8_t FmPcdCcGetParseCode(t_Handle h_CcNode)
-+{
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+
-+ ASSERT_COND(p_CcNode);
-+
-+ return p_CcNode->parseCode;
-+}
-+
-+uint8_t FmPcdCcGetOffset(t_Handle h_CcNode)
-+{
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+
-+ ASSERT_COND(p_CcNode);
-+
-+ return p_CcNode->offset;
-+}
-+
-+uint16_t FmPcdCcGetNumOfKeys(t_Handle h_CcNode)
-+{
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+
-+ ASSERT_COND(p_CcNode);
-+
-+ return p_CcNode->numOfKeys;
-+}
-+
-+t_Error FmPcdCcModifyNextEngineParamTree(t_Handle h_FmPcd,
-+ t_Handle h_FmPcdCcTree,
-+ uint8_t grpId,
-+ uint8_t index,
-+ t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams)
-+{
-+ t_FmPcdCcTree *p_FmPcdCcTree = (t_FmPcdCcTree *)h_FmPcdCcTree;
-+ t_FmPcd *p_FmPcd;
-+ t_List h_OldPointersLst, h_NewPointersLst;
-+ uint16_t keyIndex;
-+ t_FmPcdModifyCcKeyAdditionalParams *p_ModifyKeyParams;
-+ t_Error err = E_OK;
-+
-+ SANITY_CHECK_RETURN_ERROR(h_FmPcd,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(h_FmPcdCcTree,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR((grpId <= 7),E_INVALID_VALUE);
-+
-+ if (grpId >= p_FmPcdCcTree->numOfGrps)
-+ RETURN_ERROR(MAJOR, E_INVALID_HANDLE, ("grpId you asked > numOfGroup of relevant tree"));
-+
-+ if (index >= p_FmPcdCcTree->fmPcdGroupParam[grpId].numOfEntriesInGroup)
-+ RETURN_ERROR(MAJOR, E_INVALID_HANDLE, ("index > numOfEntriesInGroup"));
-+
-+ p_FmPcd = (t_FmPcd *)h_FmPcd;
-+
-+ INIT_LIST(&h_OldPointersLst);
-+ INIT_LIST(&h_NewPointersLst);
-+
-+ keyIndex = (uint16_t)(p_FmPcdCcTree->fmPcdGroupParam[grpId].baseGroupEntry + index);
-+
-+ p_ModifyKeyParams = ModifyKeyCommonPart1(p_FmPcdCcTree, keyIndex, e_MODIFY_STATE_CHANGE, FALSE, FALSE, TRUE);
-+ if (!p_ModifyKeyParams)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, NO_MSG);
-+
-+ p_ModifyKeyParams->tree = TRUE;
-+
-+ if (p_FmPcd->p_CcShadow)
-+ if (!TRY_LOCK(p_FmPcd->h_ShadowSpinlock, &p_FmPcd->shadowLock))
-+ {
-+ XX_Free(p_ModifyKeyParams);
-+ return ERROR_CODE(E_BUSY);
-+ }
-+
-+ err = BuildNewNodeModifyNextEngine(p_FmPcd,
-+ p_FmPcdCcTree,
-+ keyIndex,
-+ p_FmPcdCcNextEngineParams,
-+ &h_OldPointersLst,
-+ &h_NewPointersLst,
-+ p_ModifyKeyParams);
-+ if (err)
-+ {
-+ XX_Free(p_ModifyKeyParams);
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+
-+ err = DoDynamicChange(p_FmPcd, &h_OldPointersLst, &h_NewPointersLst, p_ModifyKeyParams, FALSE);
-+
-+ if (p_FmPcd->p_CcShadow)
-+ RELEASE_LOCK(p_FmPcd->shadowLock);
-+
-+ return err;
-+
-+}
-+
-+t_Error FmPcdCcRemoveKey(t_Handle h_FmPcd,
-+ t_Handle h_FmPcdCcNode,
-+ uint16_t keyIndex)
-+{
-+
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *) h_FmPcdCcNode;
-+ t_FmPcd *p_FmPcd;
-+ t_FmPcdModifyCcKeyAdditionalParams *p_ModifyKeyParams;
-+ t_List h_OldPointersLst, h_NewPointersLst;
-+ bool useShadowStructs = FALSE;
-+ t_Error err = E_OK;
-+
-+ if (keyIndex >= p_CcNode->numOfKeys)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("impossible to remove key when numOfKeys <= keyIndex"));
-+
-+ if (!p_CcNode->numOfKeys)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("keyIndex you asked > numOfKeys of relevant node that was initialized"));
-+
-+ if (p_CcNode->h_FmPcd != h_FmPcd)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("handler to FmPcd is different from the handle provided at node initialization time"));
-+
-+ p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+
-+ INIT_LIST(&h_OldPointersLst);
-+ INIT_LIST(&h_NewPointersLst);
-+
-+ p_ModifyKeyParams = ModifyKeyCommonPart1(p_CcNode, keyIndex, e_MODIFY_STATE_REMOVE, TRUE, TRUE, FALSE);
-+ if (!p_ModifyKeyParams)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, NO_MSG);
-+
-+ if (p_CcNode->maxNumOfKeys)
-+ {
-+ if (!TRY_LOCK(p_FmPcd->h_ShadowSpinlock, &p_FmPcd->shadowLock))
-+ {
-+ XX_Free(p_ModifyKeyParams);
-+ return ERROR_CODE(E_BUSY);
-+ }
-+
-+ useShadowStructs = TRUE;
-+ }
-+
-+ err = BuildNewNodeRemoveKey(p_CcNode, keyIndex, p_ModifyKeyParams);
-+ if (err)
-+ {
-+ XX_Free(p_ModifyKeyParams);
-+ if (p_CcNode->maxNumOfKeys)
-+ RELEASE_LOCK(p_FmPcd->shadowLock);
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+
-+ err = UpdatePtrWhichPointOnCrntMdfNode(p_CcNode,
-+ p_ModifyKeyParams,
-+ &h_OldPointersLst,
-+ &h_NewPointersLst);
-+ if (err)
-+ {
-+ ReleaseNewNodeCommonPart(p_ModifyKeyParams);
-+ XX_Free(p_ModifyKeyParams);
-+ if (p_CcNode->maxNumOfKeys)
-+ RELEASE_LOCK(p_FmPcd->shadowLock);
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+
-+ err = DoDynamicChange(p_FmPcd,
-+ &h_OldPointersLst,
-+ &h_NewPointersLst,
-+ p_ModifyKeyParams,
-+ useShadowStructs);
-+
-+ if (p_CcNode->maxNumOfKeys)
-+ RELEASE_LOCK(p_FmPcd->shadowLock);
-+
-+ return err;
-+}
-+
-+t_Error FmPcdCcModifyKey(t_Handle h_FmPcd,
-+ t_Handle h_FmPcdCcNode,
-+ uint16_t keyIndex,
-+ uint8_t keySize,
-+ uint8_t *p_Key,
-+ uint8_t *p_Mask)
-+{
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_FmPcdCcNode;
-+ t_FmPcd *p_FmPcd;
-+ t_List h_OldPointersLst, h_NewPointersLst;
-+ t_FmPcdModifyCcKeyAdditionalParams *p_ModifyKeyParams;
-+ uint16_t tmpKeyIndex;
-+ bool useShadowStructs = FALSE;
-+ t_Error err = E_OK;
-+
-+ if (keyIndex >= p_CcNode->numOfKeys)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("keyIndex > previously cleared last index + 1"));
-+
-+ if (keySize != p_CcNode->userSizeOfExtraction)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("size for ModifyKey has to be the same as defined in SetNode"));
-+
-+ if (p_CcNode->h_FmPcd != h_FmPcd)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("handler to FmPcd is different from the handle provided at node initialization time"));
-+
-+ err = FindKeyIndex(h_FmPcdCcNode,
-+ keySize,
-+ p_Key,
-+ p_Mask,
-+ &tmpKeyIndex);
-+ if (GET_ERROR_TYPE(err) != E_NOT_FOUND)
-+ RETURN_ERROR(MINOR, E_ALREADY_EXISTS,
-+ ("The received key and mask pair was already found in the match table of the provided node"));
-+
-+ p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+
-+ INIT_LIST(&h_OldPointersLst);
-+ INIT_LIST(&h_NewPointersLst);
-+
-+ p_ModifyKeyParams = ModifyKeyCommonPart1(p_CcNode, keyIndex, e_MODIFY_STATE_CHANGE, TRUE, TRUE, FALSE);
-+ if (!p_ModifyKeyParams)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, NO_MSG);
-+
-+ if (p_CcNode->maxNumOfKeys)
-+ {
-+ if (!TRY_LOCK(p_FmPcd->h_ShadowSpinlock, &p_FmPcd->shadowLock))
-+ {
-+ XX_Free(p_ModifyKeyParams);
-+ return ERROR_CODE(E_BUSY);
-+ }
-+
-+ useShadowStructs = TRUE;
-+ }
-+
-+ err = BuildNewNodeModifyKey(p_CcNode,
-+ keyIndex,
-+ p_Key,
-+ p_Mask,
-+ p_ModifyKeyParams);
-+ if (err)
-+ {
-+ XX_Free(p_ModifyKeyParams);
-+ if (p_CcNode->maxNumOfKeys)
-+ RELEASE_LOCK(p_FmPcd->shadowLock);
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+
-+ err = UpdatePtrWhichPointOnCrntMdfNode(p_CcNode,
-+ p_ModifyKeyParams,
-+ &h_OldPointersLst,
-+ &h_NewPointersLst);
-+ if (err)
-+ {
-+ ReleaseNewNodeCommonPart(p_ModifyKeyParams);
-+ XX_Free(p_ModifyKeyParams);
-+ if (p_CcNode->maxNumOfKeys)
-+ RELEASE_LOCK(p_FmPcd->shadowLock);
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+
-+ err = DoDynamicChange(p_FmPcd,
-+ &h_OldPointersLst,
-+ &h_NewPointersLst,
-+ p_ModifyKeyParams,
-+ useShadowStructs);
-+
-+ if (p_CcNode->maxNumOfKeys)
-+ RELEASE_LOCK(p_FmPcd->shadowLock);
-+
-+ return err;
-+}
-+
-+t_Error FmPcdCcModifyMissNextEngineParamNode(t_Handle h_FmPcd,
-+ t_Handle h_FmPcdCcNode,
-+ t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams)
-+{
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_FmPcdCcNode;
-+ t_FmPcd *p_FmPcd;
-+ t_List h_OldPointersLst, h_NewPointersLst;
-+ uint16_t keyIndex;
-+ t_FmPcdModifyCcKeyAdditionalParams *p_ModifyKeyParams;
-+ t_Error err = E_OK;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_CcNode,E_INVALID_VALUE);
-+
-+ keyIndex = p_CcNode->numOfKeys;
-+
-+ p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+
-+ INIT_LIST(&h_OldPointersLst);
-+ INIT_LIST(&h_NewPointersLst);
-+
-+ p_ModifyKeyParams = ModifyKeyCommonPart1(p_CcNode, keyIndex, e_MODIFY_STATE_CHANGE, FALSE, TRUE, FALSE);
-+ if (!p_ModifyKeyParams)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, NO_MSG);
-+
-+ if (p_CcNode->maxNumOfKeys)
-+ {
-+ if (!TRY_LOCK(p_FmPcd->h_ShadowSpinlock, &p_FmPcd->shadowLock))
-+ {
-+ XX_Free(p_ModifyKeyParams);
-+ return ERROR_CODE(E_BUSY);
-+ }
-+ }
-+
-+ err = BuildNewNodeModifyNextEngine(h_FmPcd,
-+ p_CcNode,
-+ keyIndex,
-+ p_FmPcdCcNextEngineParams,
-+ &h_OldPointersLst,
-+ &h_NewPointersLst,
-+ p_ModifyKeyParams);
-+ if (err)
-+ {
-+ XX_Free(p_ModifyKeyParams);
-+ if (p_CcNode->maxNumOfKeys)
-+ RELEASE_LOCK(p_FmPcd->shadowLock);
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+
-+ err = DoDynamicChange(p_FmPcd, &h_OldPointersLst, &h_NewPointersLst, p_ModifyKeyParams, FALSE);
-+
-+ if (p_CcNode->maxNumOfKeys)
-+ RELEASE_LOCK(p_FmPcd->shadowLock);
-+
-+ return err;
-+}
-+
-+t_Error FmPcdCcAddKey(t_Handle h_FmPcd,
-+ t_Handle h_FmPcdCcNode,
-+ uint16_t keyIndex,
-+ uint8_t keySize,
-+ t_FmPcdCcKeyParams *p_FmPcdCcKeyParams)
-+{
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_FmPcdCcNode;
-+ t_FmPcd *p_FmPcd;
-+ t_FmPcdModifyCcKeyAdditionalParams *p_ModifyKeyParams;
-+ t_List h_OldPointersLst, h_NewPointersLst;
-+ bool useShadowStructs = FALSE;
-+ uint16_t tmpKeyIndex;
-+ t_Error err = E_OK;
-+
-+ if (keyIndex > p_CcNode->numOfKeys)
-+ RETURN_ERROR(MAJOR, E_NOT_IN_RANGE, ("keyIndex > previously cleared last index + 1"));
-+
-+ if (keySize != p_CcNode->userSizeOfExtraction)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("keySize has to be defined as it was defined in initialization step"));
-+
-+ if (p_CcNode->h_FmPcd != h_FmPcd)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("handler to FmPcd is different from the handle provided at node initialization time"));
-+
-+ if (p_CcNode->maxNumOfKeys)
-+ {
-+ if (p_CcNode->numOfKeys == p_CcNode->maxNumOfKeys)
-+ RETURN_ERROR(MAJOR, E_FULL, ("number of keys exceeds the maximal number of keys provided at node initialization time"));
-+ }
-+ else if (p_CcNode->numOfKeys == FM_PCD_MAX_NUM_OF_KEYS)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("number of keys can not be larger than %d", FM_PCD_MAX_NUM_OF_KEYS));
-+
-+ err = FindKeyIndex(h_FmPcdCcNode,
-+ keySize,
-+ p_FmPcdCcKeyParams->p_Key,
-+ p_FmPcdCcKeyParams->p_Mask,
-+ &tmpKeyIndex);
-+ if (GET_ERROR_TYPE(err) != E_NOT_FOUND)
-+ RETURN_ERROR(MINOR, E_ALREADY_EXISTS,
-+ ("The received key and mask pair was already found in the match table of the provided node"));
-+
-+ p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+
-+ INIT_LIST(&h_OldPointersLst);
-+ INIT_LIST(&h_NewPointersLst);
-+
-+ p_ModifyKeyParams = ModifyKeyCommonPart1(p_CcNode,
-+ keyIndex,
-+ e_MODIFY_STATE_ADD,
-+ TRUE,
-+ TRUE,
-+ FALSE);
-+ if (!p_ModifyKeyParams)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, NO_MSG);
-+
-+ if (p_CcNode->maxNumOfKeys)
-+ {
-+ if (!TRY_LOCK(p_FmPcd->h_ShadowSpinlock, &p_FmPcd->shadowLock))
-+ {
-+ XX_Free(p_ModifyKeyParams);
-+ return ERROR_CODE(E_BUSY);
-+ }
-+
-+ useShadowStructs = TRUE;
-+ }
-+
-+ err = BuildNewNodeAddOrMdfyKeyAndNextEngine (h_FmPcd,
-+ p_CcNode,
-+ keyIndex,
-+ p_FmPcdCcKeyParams,
-+ p_ModifyKeyParams,
-+ TRUE);
-+ if (err)
-+ {
-+ ReleaseNewNodeCommonPart(p_ModifyKeyParams);
-+ XX_Free(p_ModifyKeyParams);
-+ if (p_CcNode->maxNumOfKeys)
-+ RELEASE_LOCK(p_FmPcd->shadowLock);
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+
-+ err = UpdatePtrWhichPointOnCrntMdfNode(p_CcNode,
-+ p_ModifyKeyParams,
-+ &h_OldPointersLst,
-+ &h_NewPointersLst);
-+ if (err)
-+ {
-+ ReleaseNewNodeCommonPart(p_ModifyKeyParams);
-+ XX_Free(p_ModifyKeyParams);
-+ if (p_CcNode->maxNumOfKeys)
-+ RELEASE_LOCK(p_FmPcd->shadowLock);
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+
-+ err = DoDynamicChange(p_FmPcd,
-+ &h_OldPointersLst,
-+ &h_NewPointersLst,
-+ p_ModifyKeyParams,
-+ useShadowStructs);
-+ if (p_CcNode->maxNumOfKeys)
-+ RELEASE_LOCK(p_FmPcd->shadowLock);
-+
-+ return err;
-+}
-+
-+t_Error FmPcdCcModifyKeyAndNextEngine(t_Handle h_FmPcd,
-+ t_Handle h_FmPcdCcNode,
-+ uint16_t keyIndex,
-+ uint8_t keySize,
-+ t_FmPcdCcKeyParams *p_FmPcdCcKeyParams)
-+{
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_FmPcdCcNode;
-+ t_FmPcd *p_FmPcd;
-+ t_List h_OldPointersLst, h_NewPointersLst;
-+ t_FmPcdModifyCcKeyAdditionalParams *p_ModifyKeyParams;
-+ uint16_t tmpKeyIndex;
-+ bool useShadowStructs = FALSE;
-+ t_Error err = E_OK;
-+
-+ if (keyIndex > p_CcNode->numOfKeys)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("keyIndex > previously cleared last index + 1"));
-+
-+ if (keySize != p_CcNode->userSizeOfExtraction)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("keySize has to be defined as it was defined in initialization step"));
-+
-+ if (p_CcNode->h_FmPcd != h_FmPcd)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("handler to FmPcd is different from the handle provided at node initialization time"));
-+
-+ err = FindKeyIndex(h_FmPcdCcNode,
-+ keySize,
-+ p_FmPcdCcKeyParams->p_Key,
-+ p_FmPcdCcKeyParams->p_Mask,
-+ &tmpKeyIndex);
-+ if (GET_ERROR_TYPE(err) != E_NOT_FOUND)
-+ RETURN_ERROR(MINOR, E_ALREADY_EXISTS,
-+ ("The received key and mask pair was already found in the match table of the provided node"));
-+
-+ p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+
-+ INIT_LIST(&h_OldPointersLst);
-+ INIT_LIST(&h_NewPointersLst);
-+
-+ p_ModifyKeyParams = ModifyKeyCommonPart1(p_CcNode, keyIndex, e_MODIFY_STATE_CHANGE, TRUE, TRUE, FALSE);
-+ if (!p_ModifyKeyParams)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, NO_MSG);
-+
-+ if (p_CcNode->maxNumOfKeys)
-+ {
-+ if (!TRY_LOCK(p_FmPcd->h_ShadowSpinlock, &p_FmPcd->shadowLock))
-+ {
-+ XX_Free(p_ModifyKeyParams);
-+ return ERROR_CODE(E_BUSY);
-+ }
-+
-+ useShadowStructs = TRUE;
-+ }
-+
-+ err = BuildNewNodeAddOrMdfyKeyAndNextEngine (h_FmPcd,
-+ p_CcNode,
-+ keyIndex,
-+ p_FmPcdCcKeyParams,
-+ p_ModifyKeyParams,
-+ FALSE);
-+ if (err)
-+ {
-+ ReleaseNewNodeCommonPart(p_ModifyKeyParams);
-+ XX_Free(p_ModifyKeyParams);
-+ if (p_CcNode->maxNumOfKeys)
-+ RELEASE_LOCK(p_FmPcd->shadowLock);
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+
-+ err = UpdatePtrWhichPointOnCrntMdfNode(p_CcNode,
-+ p_ModifyKeyParams,
-+ &h_OldPointersLst,
-+ &h_NewPointersLst);
-+ if (err)
-+ {
-+ ReleaseNewNodeCommonPart(p_ModifyKeyParams);
-+ XX_Free(p_ModifyKeyParams);
-+ if (p_CcNode->maxNumOfKeys)
-+ RELEASE_LOCK(p_FmPcd->shadowLock);
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+
-+ err = DoDynamicChange(p_FmPcd,
-+ &h_OldPointersLst,
-+ &h_NewPointersLst,
-+ p_ModifyKeyParams,
-+ useShadowStructs);
-+
-+ if (p_CcNode->maxNumOfKeys)
-+ RELEASE_LOCK(p_FmPcd->shadowLock);
-+
-+ return err;
-+}
-+
-+uint32_t FmPcdCcGetNodeAddrOffsetFromNodeInfo(t_Handle h_FmPcd, t_Handle h_Pointer)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
-+ t_CcNodeInformation *p_CcNodeInfo;
-+
-+ SANITY_CHECK_RETURN_VALUE(h_FmPcd,E_INVALID_HANDLE, (uint32_t)ILLEGAL_BASE);
-+
-+ p_CcNodeInfo = CC_NODE_F_OBJECT(h_Pointer);
-+
-+ return (uint32_t)(XX_VirtToPhys(p_CcNodeInfo->h_CcNode) - p_FmPcd->physicalMuramBase);
-+}
-+
-+t_Error FmPcdCcGetGrpParams(t_Handle h_FmPcdCcTree, uint8_t grpId, uint32_t *p_GrpBits, uint8_t *p_GrpBase)
-+{
-+ t_FmPcdCcTree *p_FmPcdCcTree = (t_FmPcdCcTree *) h_FmPcdCcTree;
-+
-+ SANITY_CHECK_RETURN_ERROR(h_FmPcdCcTree, E_INVALID_HANDLE);
-+
-+ if (grpId >= p_FmPcdCcTree->numOfGrps)
-+ RETURN_ERROR(MAJOR, E_INVALID_HANDLE, ("grpId you asked > numOfGroup of relevant tree"));
-+
-+ *p_GrpBits = p_FmPcdCcTree->fmPcdGroupParam[grpId].totalBitsMask;
-+ *p_GrpBase = p_FmPcdCcTree->fmPcdGroupParam[grpId].baseGroupEntry;
-+
-+ return E_OK;
-+}
-+
-+t_Error FmPcdCcBindTree(t_Handle h_FmPcd,
-+ t_Handle h_PcdParams,
-+ t_Handle h_FmPcdCcTree,
-+ uint32_t *p_Offset,
-+ t_Handle h_FmPort)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+ t_FmPcdCcTree *p_FmPcdCcTree = (t_FmPcdCcTree *)h_FmPcdCcTree;
-+ t_Error err = E_OK;
-+
-+ SANITY_CHECK_RETURN_ERROR(h_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(h_FmPcdCcTree, E_INVALID_HANDLE);
-+
-+ /* this routine must be protected by the calling routine by locking all PCD modules! */
-+
-+ err = CcUpdateParams(h_FmPcd, h_PcdParams, h_FmPort, h_FmPcdCcTree, TRUE);
-+
-+ if (err == E_OK)
-+ UpdateCcRootOwner(p_FmPcdCcTree, TRUE);
-+
-+ *p_Offset = (uint32_t)(XX_VirtToPhys(UINT_TO_PTR(p_FmPcdCcTree->ccTreeBaseAddr)) -
-+ p_FmPcd->physicalMuramBase);
-+
-+ return err;
-+}
-+
-+t_Error FmPcdCcUnbindTree(t_Handle h_FmPcd, t_Handle h_FmPcdCcTree)
-+{
-+ t_FmPcdCcTree *p_FmPcdCcTree = (t_FmPcdCcTree *)h_FmPcdCcTree;
-+
-+ /* this routine must be protected by the calling routine by locking all PCD modules! */
-+
-+ UNUSED(h_FmPcd);
-+
-+ SANITY_CHECK_RETURN_ERROR(h_FmPcdCcTree,E_INVALID_HANDLE);
-+
-+ UpdateCcRootOwner(p_FmPcdCcTree, FALSE);
-+
-+ return E_OK;
-+}
-+
-+t_Error FmPcdCcNodeTreeTryLock(t_Handle h_FmPcd,t_Handle h_FmPcdCcNode, t_List *p_List)
-+{
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_FmPcdCcNode;
-+ t_List *p_Pos, *p_Tmp;
-+ t_CcNodeInformation *p_CcNodeInfo, nodeInfo;
-+ uint32_t intFlags;
-+ t_Error err = E_OK;
-+
-+ intFlags = FmPcdLock(h_FmPcd);
-+
-+ if (LIST_IsEmpty(&p_CcNode->ccTreesLst))
-+ RETURN_ERROR(MAJOR, E_NOT_AVAILABLE, ("asked for more nodes in CC than MAX"));
-+
-+ LIST_FOR_EACH(p_Pos, &p_CcNode->ccTreesLst)
-+ {
-+ p_CcNodeInfo = CC_NODE_F_OBJECT(p_Pos);
-+ ASSERT_COND(p_CcNodeInfo->h_CcNode);
-+
-+ err = CcRootTryLock(p_CcNodeInfo->h_CcNode);
-+
-+ if (err)
-+ {
-+ LIST_FOR_EACH(p_Tmp, &p_CcNode->ccTreesLst)
-+ {
-+ if (p_Tmp == p_Pos)
-+ break;
-+
-+ CcRootReleaseLock(p_CcNodeInfo->h_CcNode);
-+ }
-+ break;
-+ }
-+
-+ memset(&nodeInfo, 0, sizeof(t_CcNodeInformation));
-+ nodeInfo.h_CcNode = p_CcNodeInfo->h_CcNode;
-+ EnqueueNodeInfoToRelevantLst(p_List, &nodeInfo, NULL);
-+ }
-+
-+ FmPcdUnlock(h_FmPcd, intFlags);
-+ CORE_MemoryBarrier();
-+
-+ return err;
-+}
-+
-+void FmPcdCcNodeTreeReleaseLock(t_Handle h_FmPcd, t_List *p_List)
-+{
-+ t_List *p_Pos;
-+ t_CcNodeInformation *p_CcNodeInfo;
-+ t_Handle h_FmPcdCcTree;
-+ uint32_t intFlags;
-+
-+ intFlags = FmPcdLock(h_FmPcd);
-+
-+ LIST_FOR_EACH(p_Pos, p_List)
-+ {
-+ p_CcNodeInfo = CC_NODE_F_OBJECT(p_Pos);
-+ h_FmPcdCcTree = p_CcNodeInfo->h_CcNode;
-+ CcRootReleaseLock(h_FmPcdCcTree);
-+ }
-+
-+ ReleaseLst(p_List);
-+
-+ FmPcdUnlock(h_FmPcd, intFlags);
-+ CORE_MemoryBarrier();
-+}
-+
-+
-+t_Error FmPcdUpdateCcShadow (t_FmPcd *p_FmPcd, uint32_t size, uint32_t align)
-+{
-+ uint32_t intFlags;
-+ uint32_t newSize = 0, newAlign = 0;
-+ bool allocFail = FALSE;
-+
-+ ASSERT_COND(p_FmPcd);
-+
-+ if (!size)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("size must be larger then 0"));
-+
-+ if (!POWER_OF_2(align))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("alignment must be power of 2"));
-+
-+ newSize = p_FmPcd->ccShadowSize;
-+ newAlign = p_FmPcd->ccShadowAlign;
-+
-+ /* Check if current shadow is large enough to hold the requested size */
-+ if (size > p_FmPcd->ccShadowSize)
-+ newSize = size;
-+
-+ /* Check if current shadow matches the requested alignment */
-+ if (align > p_FmPcd->ccShadowAlign)
-+ newAlign = align;
-+
-+ /* If a bigger shadow size or bigger shadow alignment are required,
-+ a new shadow will be allocated */
-+ if ((newSize != p_FmPcd->ccShadowSize) || (newAlign != p_FmPcd->ccShadowAlign))
-+ {
-+ intFlags = FmPcdLock(p_FmPcd);
-+
-+ if (p_FmPcd->p_CcShadow)
-+ {
-+ FM_MURAM_FreeMem(FmPcdGetMuramHandle(p_FmPcd), p_FmPcd->p_CcShadow);
-+ p_FmPcd->ccShadowSize = 0;
-+ p_FmPcd->ccShadowAlign = 0;
-+ }
-+
-+ p_FmPcd->p_CcShadow = FM_MURAM_AllocMem(FmPcdGetMuramHandle(p_FmPcd),
-+ newSize,
-+ newAlign);
-+ if (!p_FmPcd->p_CcShadow)
-+ {
-+ allocFail = TRUE;
-+
-+ /* If new shadow size allocation failed,
-+ re-allocate with previous parameters */
-+ p_FmPcd->p_CcShadow = FM_MURAM_AllocMem(FmPcdGetMuramHandle(p_FmPcd),
-+ p_FmPcd->ccShadowSize,
-+ p_FmPcd->ccShadowAlign);
-+ }
-+
-+ FmPcdUnlock(p_FmPcd, intFlags);
-+
-+ if (allocFail)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM allocation for CC Shadow memory"));
-+
-+ p_FmPcd->ccShadowSize = newSize;
-+ p_FmPcd->ccShadowAlign = newAlign;
-+ }
-+
-+ return E_OK;
-+}
-+
-+#if (DPAA_VERSION >= 11)
-+void FmPcdCcGetAdTablesThatPointOnReplicGroup(t_Handle h_Node,
-+ t_Handle h_ReplicGroup,
-+ t_List *p_AdTables,
-+ uint32_t *p_NumOfAdTables)
-+{
-+ t_FmPcdCcNode *p_CurrentNode = (t_FmPcdCcNode *)h_Node;
-+ int i = 0;
-+ void * p_AdTable;
-+ t_CcNodeInformation ccNodeInfo;
-+
-+ ASSERT_COND(h_Node);
-+ *p_NumOfAdTables = 0;
-+
-+ /* search in the current node which exact index points on this current replicator group for getting AD */
-+ for (i = 0; i < p_CurrentNode->numOfKeys + 1; i++)
-+ {
-+ if ((p_CurrentNode->keyAndNextEngineParams[i].nextEngineParams.nextEngine == e_FM_PCD_FR) &&
-+ ((p_CurrentNode->keyAndNextEngineParams[i].nextEngineParams.params.frParams.h_FrmReplic == (t_Handle)h_ReplicGroup)))
-+ {
-+ /* save the current ad table in the list */
-+ /* this entry uses the input replicator group */
-+ p_AdTable = PTR_MOVE(p_CurrentNode->h_AdTable, i*FM_PCD_CC_AD_ENTRY_SIZE);
-+ memset(&ccNodeInfo, 0, sizeof(t_CcNodeInformation));
-+ ccNodeInfo.h_CcNode = p_AdTable;
-+ EnqueueNodeInfoToRelevantLst(p_AdTables, &ccNodeInfo, NULL);
-+ (*p_NumOfAdTables)++;
-+ }
-+ }
-+
-+ ASSERT_COND(i != p_CurrentNode->numOfKeys);
-+}
-+#endif /* (DPAA_VERSION >= 11) */
-+/*********************** End of inter-module routines ************************/
-+
-+
-+/****************************************/
-+/* API Init unit functions */
-+/****************************************/
-+
-+t_Handle FM_PCD_CcRootBuild(t_Handle h_FmPcd, t_FmPcdCcTreeParams *p_PcdGroupsParam)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
-+ t_Error err = E_OK;
-+ int i = 0, j = 0, k = 0;
-+ t_FmPcdCcTree *p_FmPcdCcTree;
-+ uint8_t numOfEntries;
-+ t_Handle p_CcTreeTmp;
-+ t_FmPcdCcGrpParams *p_FmPcdCcGroupParams;
-+ t_FmPcdCcKeyAndNextEngineParams *p_Params, *p_KeyAndNextEngineParams;
-+ t_NetEnvParams netEnvParams;
-+ uint8_t lastOne = 0;
-+ uint32_t requiredAction = 0;
-+ t_FmPcdCcNode *p_FmPcdCcNextNode;
-+ t_CcNodeInformation ccNodeInfo, *p_CcInformation;
-+
-+ SANITY_CHECK_RETURN_VALUE(h_FmPcd,E_INVALID_HANDLE, NULL);
-+ SANITY_CHECK_RETURN_VALUE(p_PcdGroupsParam,E_INVALID_HANDLE, NULL);
-+
-+ if (p_PcdGroupsParam->numOfGrps > FM_PCD_MAX_NUM_OF_CC_GROUPS)
-+ {
-+ REPORT_ERROR(MAJOR, E_INVALID_VALUE, ("numOfGrps should not exceed %d", FM_PCD_MAX_NUM_OF_CC_GROUPS));
-+ return NULL;
-+ }
-+
-+ p_FmPcdCcTree = (t_FmPcdCcTree*)XX_Malloc(sizeof(t_FmPcdCcTree));
-+ if (!p_FmPcdCcTree)
-+ {
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("PCD tree structure"));
-+ return NULL;
-+ }
-+ memset(p_FmPcdCcTree, 0, sizeof(t_FmPcdCcTree));
-+ p_FmPcdCcTree->h_FmPcd = h_FmPcd;
-+
-+ p_Params = (t_FmPcdCcKeyAndNextEngineParams*)XX_Malloc(FM_PCD_MAX_NUM_OF_CC_GROUPS * sizeof(t_FmPcdCcKeyAndNextEngineParams));
-+ memset(p_Params, 0, FM_PCD_MAX_NUM_OF_CC_GROUPS * sizeof(t_FmPcdCcKeyAndNextEngineParams));
-+
-+ INIT_LIST(&p_FmPcdCcTree->fmPortsLst);
-+
-+#ifdef FM_CAPWAP_SUPPORT
-+ if ((p_PcdGroupsParam->numOfGrps == 1) &&
-+ (p_PcdGroupsParam->ccGrpParams[0].numOfDistinctionUnits == 0) &&
-+ (p_PcdGroupsParam->ccGrpParams[0].nextEnginePerEntriesInGrp[0].nextEngine == e_FM_PCD_CC) &&
-+ p_PcdGroupsParam->ccGrpParams[0].nextEnginePerEntriesInGrp[0].params.ccParams.h_CcNode &&
-+ IsCapwapApplSpecific(p_PcdGroupsParam->ccGrpParams[0].nextEnginePerEntriesInGrp[0].params.ccParams.h_CcNode))
-+ {
-+ p_PcdGroupsParam->ccGrpParams[0].nextEnginePerEntriesInGrp[0].h_Manip = FmPcdManipApplSpecificBuild();
-+ if (!p_PcdGroupsParam->ccGrpParams[0].nextEnginePerEntriesInGrp[0].h_Manip)
-+ {
-+ DeleteTree(p_FmPcdCcTree,p_FmPcd);
-+ XX_Free(p_Params);
-+ REPORT_ERROR(MAJOR, E_INVALID_STATE, NO_MSG);
-+ return NULL;
-+ }
-+ }
-+#endif /* FM_CAPWAP_SUPPORT */
-+
-+ numOfEntries = 0;
-+ p_FmPcdCcTree->netEnvId = FmPcdGetNetEnvId(p_PcdGroupsParam->h_NetEnv);
-+
-+ for (i = 0; i < p_PcdGroupsParam->numOfGrps; i++)
-+ {
-+ p_FmPcdCcGroupParams = &p_PcdGroupsParam->ccGrpParams[i];
-+
-+ if (p_FmPcdCcGroupParams->numOfDistinctionUnits > FM_PCD_MAX_NUM_OF_CC_UNITS)
-+ {
-+ DeleteTree(p_FmPcdCcTree,p_FmPcd);
-+ XX_Free(p_Params);
-+ REPORT_ERROR(MAJOR, E_INVALID_VALUE,
-+ ("numOfDistinctionUnits (group %d) should not exceed %d", i, FM_PCD_MAX_NUM_OF_CC_UNITS));
-+ return NULL;
-+ }
-+
-+ p_FmPcdCcTree->fmPcdGroupParam[i].baseGroupEntry = numOfEntries;
-+ p_FmPcdCcTree->fmPcdGroupParam[i].numOfEntriesInGroup =(uint8_t)( 0x01 << p_FmPcdCcGroupParams->numOfDistinctionUnits);
-+ numOfEntries += p_FmPcdCcTree->fmPcdGroupParam[i].numOfEntriesInGroup;
-+ if (numOfEntries > FM_PCD_MAX_NUM_OF_CC_GROUPS)
-+ {
-+ DeleteTree(p_FmPcdCcTree,p_FmPcd);
-+ XX_Free(p_Params);
-+ REPORT_ERROR(MAJOR, E_INVALID_VALUE, ("numOfEntries can not be larger than %d", FM_PCD_MAX_NUM_OF_CC_GROUPS));
-+ return NULL;
-+ }
-+
-+ if (lastOne)
-+ {
-+ if (p_FmPcdCcTree->fmPcdGroupParam[i].numOfEntriesInGroup > lastOne)
-+ {
-+ DeleteTree(p_FmPcdCcTree,p_FmPcd);
-+ XX_Free(p_Params);
-+ REPORT_ERROR(MAJOR, E_CONFLICT, ("numOfEntries per group must be set in descending order"));
-+ return NULL;
-+ }
-+ }
-+
-+ lastOne = p_FmPcdCcTree->fmPcdGroupParam[i].numOfEntriesInGroup;
-+
-+ netEnvParams.netEnvId = p_FmPcdCcTree->netEnvId;
-+ netEnvParams.numOfDistinctionUnits = p_FmPcdCcGroupParams->numOfDistinctionUnits;
-+
-+ memcpy(netEnvParams.unitIds,
-+ &p_FmPcdCcGroupParams->unitIds,
-+ (sizeof(uint8_t)) * p_FmPcdCcGroupParams->numOfDistinctionUnits);
-+
-+ err = PcdGetUnitsVector(p_FmPcd, &netEnvParams);
-+ if (err)
-+ {
-+ DeleteTree(p_FmPcdCcTree,p_FmPcd);
-+ XX_Free(p_Params);
-+ REPORT_ERROR(MAJOR, err, NO_MSG);
-+ return NULL;
-+ }
-+
-+ p_FmPcdCcTree->fmPcdGroupParam[i].totalBitsMask = netEnvParams.vector;
-+ for (j = 0; j < p_FmPcdCcTree->fmPcdGroupParam[i].numOfEntriesInGroup; j++)
-+ {
-+ err = ValidateNextEngineParams(h_FmPcd,
-+ &p_FmPcdCcGroupParams->nextEnginePerEntriesInGrp[j],
-+ e_FM_PCD_CC_STATS_MODE_NONE);
-+ if (err)
-+ {
-+ DeleteTree(p_FmPcdCcTree,p_FmPcd);
-+ XX_Free(p_Params);
-+ REPORT_ERROR(MAJOR, err, (NO_MSG));
-+ return NULL;
-+ }
-+
-+ if (p_FmPcdCcGroupParams->nextEnginePerEntriesInGrp[j].h_Manip)
-+ {
-+ err = FmPcdManipCheckParamsForCcNextEngine(&p_FmPcdCcGroupParams->nextEnginePerEntriesInGrp[j], &requiredAction);
-+ if (err)
-+ {
-+ DeleteTree(p_FmPcdCcTree,p_FmPcd);
-+ XX_Free(p_Params);
-+ REPORT_ERROR(MAJOR, E_INVALID_STATE, NO_MSG);
-+ return NULL;
-+ }
-+ }
-+ p_KeyAndNextEngineParams = p_Params+k;
-+
-+ memcpy(&p_KeyAndNextEngineParams->nextEngineParams,
-+ &p_FmPcdCcGroupParams->nextEnginePerEntriesInGrp[j],
-+ sizeof(t_FmPcdCcNextEngineParams));
-+
-+ if ((p_KeyAndNextEngineParams->nextEngineParams.nextEngine == e_FM_PCD_CC)
-+ && p_KeyAndNextEngineParams->nextEngineParams.h_Manip)
-+ {
-+ err = AllocAndFillAdForContLookupManip(p_KeyAndNextEngineParams->nextEngineParams.params.ccParams.h_CcNode);
-+ if (err)
-+ {
-+ DeleteTree(p_FmPcdCcTree,p_FmPcd);
-+ XX_Free(p_Params);
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("MURAM allocation for CC Tree"));
-+ return NULL;
-+ }
-+ }
-+
-+ requiredAction |= UPDATE_CC_WITH_TREE;
-+ p_KeyAndNextEngineParams->requiredAction = requiredAction;
-+
-+ k++;
-+ }
-+ }
-+
-+ p_FmPcdCcTree->numOfEntries = (uint8_t)k;
-+ p_FmPcdCcTree->numOfGrps = p_PcdGroupsParam->numOfGrps;
-+
-+ p_FmPcdCcTree->ccTreeBaseAddr =
-+ PTR_TO_UINT(FM_MURAM_AllocMem(FmPcdGetMuramHandle(h_FmPcd),
-+ (uint32_t)( FM_PCD_MAX_NUM_OF_CC_GROUPS * FM_PCD_CC_AD_ENTRY_SIZE),
-+ FM_PCD_CC_TREE_ADDR_ALIGN));
-+ if (!p_FmPcdCcTree->ccTreeBaseAddr)
-+ {
-+ DeleteTree(p_FmPcdCcTree,p_FmPcd);
-+ XX_Free(p_Params);
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("MURAM allocation for CC Tree"));
-+ return NULL;
-+ }
-+ IOMemSet32(UINT_TO_PTR(p_FmPcdCcTree->ccTreeBaseAddr), 0, (uint32_t)(FM_PCD_MAX_NUM_OF_CC_GROUPS * FM_PCD_CC_AD_ENTRY_SIZE));
-+
-+ p_CcTreeTmp = UINT_TO_PTR(p_FmPcdCcTree->ccTreeBaseAddr);
-+
-+ j = 0;
-+ for (i = 0; i < numOfEntries; i++)
-+ {
-+ p_KeyAndNextEngineParams = p_Params + i;
-+
-+ NextStepAd(p_CcTreeTmp,
-+ NULL,
-+ &p_KeyAndNextEngineParams->nextEngineParams,
-+ p_FmPcd);
-+
-+ p_CcTreeTmp = PTR_MOVE(p_CcTreeTmp, FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ memcpy(&p_FmPcdCcTree->keyAndNextEngineParams[i],
-+ p_KeyAndNextEngineParams,
-+ sizeof(t_FmPcdCcKeyAndNextEngineParams));
-+
-+ if (p_FmPcdCcTree->keyAndNextEngineParams[i].nextEngineParams.nextEngine== e_FM_PCD_CC)
-+ {
-+ p_FmPcdCcNextNode = (t_FmPcdCcNode*)p_FmPcdCcTree->keyAndNextEngineParams[i].nextEngineParams.params.ccParams.h_CcNode;
-+ p_CcInformation = FindNodeInfoInReleventLst(&p_FmPcdCcNextNode->ccTreeIdLst,
-+ (t_Handle)p_FmPcdCcTree,
-+ p_FmPcdCcNextNode->h_Spinlock);
-+
-+ if (!p_CcInformation)
-+ {
-+ memset(&ccNodeInfo, 0, sizeof(t_CcNodeInformation));
-+ ccNodeInfo.h_CcNode = (t_Handle)p_FmPcdCcTree;
-+ ccNodeInfo.index = 1;
-+ EnqueueNodeInfoToRelevantLst(&p_FmPcdCcNextNode->ccTreeIdLst,
-+ &ccNodeInfo,
-+ p_FmPcdCcNextNode->h_Spinlock);
-+ }
-+ else
-+ p_CcInformation->index++;
-+ }
-+ }
-+
-+ FmPcdIncNetEnvOwners(h_FmPcd, p_FmPcdCcTree->netEnvId);
-+ p_CcTreeTmp = UINT_TO_PTR(p_FmPcdCcTree->ccTreeBaseAddr);
-+
-+ if (!FmPcdLockTryLockAll(p_FmPcd))
-+ {
-+ FM_PCD_CcRootDelete(p_FmPcdCcTree);
-+ XX_Free(p_Params);
-+ DBG(TRACE, ("FmPcdLockTryLockAll failed"));
-+ return NULL;
-+ }
-+
-+ for (i = 0; i < numOfEntries; i++)
-+ {
-+ if (p_FmPcdCcTree->keyAndNextEngineParams[i].requiredAction)
-+ {
-+ err = SetRequiredAction(h_FmPcd,
-+ p_FmPcdCcTree->keyAndNextEngineParams[i].requiredAction,
-+ &p_FmPcdCcTree->keyAndNextEngineParams[i],
-+ p_CcTreeTmp,
-+ 1,
-+ p_FmPcdCcTree);
-+ if (err)
-+ {
-+ FmPcdLockUnlockAll(p_FmPcd);
-+ FM_PCD_CcRootDelete(p_FmPcdCcTree);
-+ XX_Free(p_Params);
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("No memory"));
-+ return NULL;
-+ }
-+ p_CcTreeTmp = PTR_MOVE(p_CcTreeTmp, FM_PCD_CC_AD_ENTRY_SIZE);
-+ }
-+ }
-+
-+ FmPcdLockUnlockAll(p_FmPcd);
-+ p_FmPcdCcTree->p_Lock = FmPcdAcquireLock(p_FmPcd);
-+ if (!p_FmPcdCcTree->p_Lock)
-+ {
-+ FM_PCD_CcRootDelete(p_FmPcdCcTree);
-+ XX_Free(p_Params);
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("FM CC lock"));
-+ return NULL;
-+ }
-+
-+ XX_Free(p_Params);
-+
-+ return p_FmPcdCcTree;
-+}
-+
-+t_Error FM_PCD_CcRootDelete(t_Handle h_CcTree)
-+{
-+ t_FmPcd *p_FmPcd;
-+ t_FmPcdCcTree *p_CcTree = (t_FmPcdCcTree *)h_CcTree;
-+ int i= 0;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_CcTree,E_INVALID_STATE);
-+ p_FmPcd = (t_FmPcd *)p_CcTree->h_FmPcd;
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+
-+ FmPcdDecNetEnvOwners(p_FmPcd, p_CcTree->netEnvId);
-+
-+ if (p_CcTree->owners)
-+ RETURN_ERROR(MAJOR, E_INVALID_SELECTION, ("the tree with this ID can not be removed because this tree is occupied, first - unbind this tree"));
-+
-+ /* Delete reassembly schemes if exist */
-+ if (p_CcTree->h_IpReassemblyManip)
-+ {
-+ FmPcdManipDeleteIpReassmSchemes(p_CcTree->h_IpReassemblyManip);
-+ FmPcdManipUpdateOwner(p_CcTree->h_IpReassemblyManip, FALSE);
-+ }
-+
-+ for (i = 0; i numOfEntries; i++)
-+ {
-+ if (p_CcTree->keyAndNextEngineParams[i].nextEngineParams.nextEngine == e_FM_PCD_CC)
-+ UpdateNodeOwner(p_CcTree->keyAndNextEngineParams[i].nextEngineParams.params.ccParams.h_CcNode, FALSE);
-+
-+ if (p_CcTree->keyAndNextEngineParams[i].nextEngineParams.h_Manip)
-+ FmPcdManipUpdateOwner(p_CcTree->keyAndNextEngineParams[i].nextEngineParams.h_Manip, FALSE);
-+
-+#ifdef FM_CAPWAP_SUPPORT
-+ if ((p_CcTree->numOfGrps == 1) &&
-+ (p_CcTree->fmPcdGroupParam[0].numOfEntriesInGroup == 1) &&
-+ (p_CcTree->keyAndNextEngineParams[0].nextEngineParams.nextEngine == e_FM_PCD_CC) &&
-+ p_CcTree->keyAndNextEngineParams[0].nextEngineParams.params.ccParams.h_CcNode &&
-+ IsCapwapApplSpecific(p_CcTree->keyAndNextEngineParams[0].nextEngineParams.params.ccParams.h_CcNode))
-+ {
-+ if (FM_PCD_ManipNodeDelete(p_CcTree->keyAndNextEngineParams[0].nextEngineParams.h_Manip) != E_OK)
-+ return E_INVALID_STATE;
-+ }
-+#endif /* FM_CAPWAP_SUPPORT */
-+
-+#if (DPAA_VERSION >= 11)
-+ if ((p_CcTree->keyAndNextEngineParams[i].nextEngineParams.nextEngine == e_FM_PCD_FR) &&
-+ (p_CcTree->keyAndNextEngineParams[i].nextEngineParams.params.frParams.h_FrmReplic))
-+ FrmReplicGroupUpdateOwner(p_CcTree->keyAndNextEngineParams[i].nextEngineParams.params.frParams.h_FrmReplic,
-+ FALSE);
-+#endif /* (DPAA_VERSION >= 11) */
-+ }
-+
-+ if (p_CcTree->p_Lock)
-+ FmPcdReleaseLock(p_CcTree->h_FmPcd, p_CcTree->p_Lock);
-+
-+ DeleteTree(p_CcTree, p_FmPcd);
-+
-+ return E_OK;
-+}
-+
-+t_Error FM_PCD_CcRootModifyNextEngine(t_Handle h_CcTree,
-+ uint8_t grpId,
-+ uint8_t index,
-+ t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams)
-+{
-+ t_FmPcd *p_FmPcd;
-+ t_FmPcdCcTree *p_CcTree = (t_FmPcdCcTree *)h_CcTree;
-+ t_Error err = E_OK;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcdCcNextEngineParams, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_CcTree,E_INVALID_STATE);
-+ p_FmPcd = (t_FmPcd *)p_CcTree->h_FmPcd;
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+
-+ if (!FmPcdLockTryLockAll(p_FmPcd))
-+ {
-+ DBG(TRACE, ("FmPcdLockTryLockAll failed"));
-+ return ERROR_CODE(E_BUSY);
-+ }
-+
-+ err = FmPcdCcModifyNextEngineParamTree(p_FmPcd,
-+ p_CcTree,
-+ grpId,
-+ index,
-+ p_FmPcdCcNextEngineParams);
-+ FmPcdLockUnlockAll(p_FmPcd);
-+
-+ if (err)
-+ {
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+
-+ return E_OK;
-+}
-+
-+t_Handle FM_PCD_MatchTableSet(t_Handle h_FmPcd, t_FmPcdCcNodeParams *p_CcNodeParam)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd *) h_FmPcd;
-+ t_FmPcdCcNode *p_CcNode, *p_FmPcdCcNextNode;
-+ t_Error err = E_OK;
-+ uint32_t tmp, keySize;
-+ bool glblMask = FALSE;
-+ t_FmPcdCcKeyParams *p_KeyParams;
-+ t_Handle h_FmMuram, p_KeysMatchTblTmp, p_AdTableTmp;
-+#if (DPAA_VERSION >= 11)
-+ t_Handle h_StatsFLRs;
-+#endif /* (DPAA_VERSION >= 11) */
-+ bool fullField = FALSE;
-+ ccPrivateInfo_t icCode = CC_PRIVATE_INFO_NONE;
-+ bool isKeyTblAlloc, fromIc = FALSE;
-+ uint32_t matchTableSize, adTableSize;
-+ t_CcNodeInformation ccNodeInfo, *p_CcInformation;
-+ t_FmPcdStatsObj *p_StatsObj;
-+ t_FmPcdCcStatsParams statsParams = {0};
-+ t_Handle h_Manip;
-+
-+ SANITY_CHECK_RETURN_VALUE(h_FmPcd,E_INVALID_HANDLE,NULL);
-+
-+ p_CcNode = (t_FmPcdCcNode*)XX_Malloc(sizeof(t_FmPcdCcNode));
-+ if (!p_CcNode)
-+ {
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("No memory"));
-+ return NULL;
-+ }
-+ memset(p_CcNode, 0, sizeof(t_FmPcdCcNode));
-+
-+ p_CcNode->p_GlblMask = (t_Handle)XX_Malloc(CC_GLBL_MASK_SIZE * sizeof(uint8_t));
-+ memset(p_CcNode->p_GlblMask, 0, CC_GLBL_MASK_SIZE * sizeof(uint8_t));
-+
-+ p_CcNode->h_FmPcd = h_FmPcd;
-+ p_CcNode->numOfKeys = p_CcNodeParam->keysParams.numOfKeys;
-+ p_CcNode->maxNumOfKeys = p_CcNodeParam->keysParams.maxNumOfKeys;
-+ p_CcNode->maskSupport = p_CcNodeParam->keysParams.maskSupport;
-+ p_CcNode->statisticsMode = p_CcNodeParam->keysParams.statisticsMode;
-+
-+ /* For backward compatibility - even if statistics mode is nullified,
-+ we'll fix it to frame mode so we can support per-key request for
-+ statistics using 'statisticsEn' in next engine parameters */
-+ if (!p_CcNode->maxNumOfKeys &&
-+ (p_CcNode->statisticsMode == e_FM_PCD_CC_STATS_MODE_NONE))
-+ p_CcNode->statisticsMode = e_FM_PCD_CC_STATS_MODE_FRAME;
-+
-+ h_FmMuram = FmPcdGetMuramHandle(h_FmPcd);
-+ if (!h_FmMuram)
-+ {
-+ REPORT_ERROR(MAJOR, E_INVALID_HANDLE, ("FM MURAM"));
-+ return NULL;
-+ }
-+
-+ INIT_LIST(&p_CcNode->ccPrevNodesLst);
-+ INIT_LIST(&p_CcNode->ccTreeIdLst);
-+ INIT_LIST(&p_CcNode->ccTreesLst);
-+ INIT_LIST(&p_CcNode->availableStatsLst);
-+
-+ p_CcNode->h_Spinlock = XX_InitSpinlock();
-+ if (!p_CcNode->h_Spinlock)
-+ {
-+ DeleteNode(p_CcNode);
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("CC node spinlock"));
-+ return NULL;
-+ }
-+
-+ if ((p_CcNodeParam->extractCcParams.type == e_FM_PCD_EXTRACT_BY_HDR) &&
-+ ((p_CcNodeParam->extractCcParams.extractByHdr.hdr == HEADER_TYPE_IPv4) ||
-+ (p_CcNodeParam->extractCcParams.extractByHdr.hdr == HEADER_TYPE_IPv6)) &&
-+ (p_CcNodeParam->extractCcParams.extractByHdr.type == e_FM_PCD_EXTRACT_FULL_FIELD) &&
-+ ((p_CcNodeParam->extractCcParams.extractByHdr.extractByHdrType.fullField.ipv6 == NET_HEADER_FIELD_IPv6_HOP_LIMIT) ||
-+ (p_CcNodeParam->extractCcParams.extractByHdr.extractByHdrType.fullField.ipv4 == NET_HEADER_FIELD_IPv4_TTL)))
-+ {
-+ err = Ipv4TtlOrIpv6HopLimitCheckParams(h_FmPcd, p_CcNodeParam, p_CcNode, &isKeyTblAlloc);
-+ glblMask = FALSE;
-+ }
-+ else if ((p_CcNodeParam->extractCcParams.type == e_FM_PCD_EXTRACT_NON_HDR) &&
-+ ((p_CcNodeParam->extractCcParams.extractNonHdr.src == e_FM_PCD_EXTRACT_FROM_KEY) ||
-+ (p_CcNodeParam->extractCcParams.extractNonHdr.src == e_FM_PCD_EXTRACT_FROM_HASH) ||
-+ (p_CcNodeParam->extractCcParams.extractNonHdr.src == e_FM_PCD_EXTRACT_FROM_FLOW_ID)))
-+ {
-+ if ((p_CcNodeParam->extractCcParams.extractNonHdr.src == e_FM_PCD_EXTRACT_FROM_FLOW_ID) &&
-+ (p_CcNodeParam->extractCcParams.extractNonHdr.offset != 0))
-+ {
-+ REPORT_ERROR(MAJOR, E_INVALID_VALUE,
-+ ("In the case of the extraction from e_FM_PCD_EXTRACT_FROM_FLOW_ID offset has to be 0"));
-+ return NULL;
-+ }
-+
-+ icCode = IcDefineCode(p_CcNodeParam);
-+ fromIc = TRUE;
-+ if (icCode == CC_PRIVATE_INFO_NONE)
-+ {
-+ REPORT_ERROR(MAJOR, E_INVALID_STATE,
-+ ("user asked extraction from IC and field in internal context or action wasn't initialized in the right way"));
-+ return NULL;
-+ }
-+
-+ if ((icCode == CC_PRIVATE_INFO_IC_DEQ_FQID_INDEX_LOOKUP) ||
-+ (icCode == CC_PRIVATE_INFO_IC_HASH_INDEX_LOOKUP))
-+ {
-+ err = IcHashIndexedCheckParams(h_FmPcd, p_CcNodeParam, p_CcNode, &isKeyTblAlloc);
-+ glblMask = TRUE;
-+ }
-+ else
-+ {
-+ err = CheckParams(h_FmPcd, p_CcNodeParam, p_CcNode, &isKeyTblAlloc);
-+ if (p_CcNode->glblMaskSize)
-+ glblMask = TRUE;
-+ }
-+ }
-+ else
-+ {
-+ err = CheckParams(h_FmPcd, p_CcNodeParam, p_CcNode, &isKeyTblAlloc);
-+ if (p_CcNode->glblMaskSize)
-+ glblMask = TRUE;
-+ }
-+
-+ if (err)
-+ {
-+ DeleteNode(p_CcNode);
-+ REPORT_ERROR(MAJOR, err, NO_MSG);
-+ return NULL;
-+ }
-+
-+ switch (p_CcNodeParam->extractCcParams.type)
-+ {
-+ case (e_FM_PCD_EXTRACT_BY_HDR):
-+ switch (p_CcNodeParam->extractCcParams.extractByHdr.type)
-+ {
-+ case (e_FM_PCD_EXTRACT_FULL_FIELD):
-+ p_CcNode->parseCode =
-+ GetFullFieldParseCode(p_CcNodeParam->extractCcParams.extractByHdr.hdr,
-+ p_CcNodeParam->extractCcParams.extractByHdr.hdrIndex,
-+ p_CcNodeParam->extractCcParams.extractByHdr.extractByHdrType.fullField);
-+ GetSizeHeaderField(p_CcNodeParam->extractCcParams.extractByHdr.hdr,
-+ p_CcNodeParam->extractCcParams.extractByHdr.hdrIndex,
-+ p_CcNodeParam->extractCcParams.extractByHdr.extractByHdrType.fullField,
-+ &p_CcNode->sizeOfExtraction);
-+ fullField = TRUE;
-+ if ((p_CcNode->parseCode != CC_PC_FF_TCI1) &&
-+ (p_CcNode->parseCode != CC_PC_FF_TCI2) &&
-+ (p_CcNode->parseCode != CC_PC_FF_MPLS1) &&
-+ (p_CcNode->parseCode != CC_PC_FF_MPLS1) &&
-+ (p_CcNode->parseCode != CC_PC_FF_IPV4IPTOS_TC1) &&
-+ (p_CcNode->parseCode != CC_PC_FF_IPV4IPTOS_TC2) &&
-+ (p_CcNode->parseCode != CC_PC_FF_IPTOS_IPV6TC1_IPV6FLOW1) &&
-+ (p_CcNode->parseCode != CC_PC_FF_IPDSCP) &&
-+ (p_CcNode->parseCode != CC_PC_FF_IPTOS_IPV6TC2_IPV6FLOW2) &&
-+ glblMask)
-+ {
-+ glblMask = FALSE;
-+ p_CcNode->glblMaskSize = 4;
-+ p_CcNode->lclMask = TRUE;
-+ }
-+ break;
-+
-+ case (e_FM_PCD_EXTRACT_FROM_HDR):
-+ p_CcNode->sizeOfExtraction = p_CcNodeParam->extractCcParams.extractByHdr.extractByHdrType.fromHdr.size;
-+ p_CcNode->offset = p_CcNodeParam->extractCcParams.extractByHdr.extractByHdrType.fromHdr.offset;
-+ p_CcNode->userOffset = p_CcNodeParam->extractCcParams.extractByHdr.extractByHdrType.fromHdr.offset;
-+ p_CcNode->parseCode =
-+ GetPrParseCode(p_CcNodeParam->extractCcParams.extractByHdr.hdr,
-+ p_CcNodeParam->extractCcParams.extractByHdr.hdrIndex,
-+ p_CcNode->offset,glblMask,
-+ &p_CcNode->prsArrayOffset);
-+ break;
-+
-+ case (e_FM_PCD_EXTRACT_FROM_FIELD):
-+ p_CcNode->offset = p_CcNodeParam->extractCcParams.extractByHdr.extractByHdrType.fromField.offset;
-+ p_CcNode->userOffset = p_CcNodeParam->extractCcParams.extractByHdr.extractByHdrType.fromField.offset;
-+ p_CcNode->sizeOfExtraction = p_CcNodeParam->extractCcParams.extractByHdr.extractByHdrType.fromField.size;
-+ p_CcNode->parseCode =
-+ GetFieldParseCode(p_CcNodeParam->extractCcParams.extractByHdr.hdr,
-+ p_CcNodeParam->extractCcParams.extractByHdr.extractByHdrType.fromField.field,
-+ p_CcNode->offset,
-+ &p_CcNode->prsArrayOffset,
-+ p_CcNodeParam->extractCcParams.extractByHdr.hdrIndex);
-+ break;
-+
-+ default:
-+ DeleteNode(p_CcNode);
-+ REPORT_ERROR(MAJOR, E_INVALID_SELECTION, NO_MSG);
-+ return NULL;
-+ }
-+ break;
-+
-+ case (e_FM_PCD_EXTRACT_NON_HDR):
-+ /* get the field code for the generic extract */
-+ p_CcNode->sizeOfExtraction = p_CcNodeParam->extractCcParams.extractNonHdr.size;
-+ p_CcNode->offset = p_CcNodeParam->extractCcParams.extractNonHdr.offset;
-+ p_CcNode->userOffset = p_CcNodeParam->extractCcParams.extractNonHdr.offset;
-+ p_CcNode->parseCode =
-+ GetGenParseCode(h_FmPcd,
-+ p_CcNodeParam->extractCcParams.extractNonHdr.src,
-+ p_CcNode->offset,
-+ glblMask,
-+ &p_CcNode->prsArrayOffset,
-+ fromIc,icCode);
-+
-+ if (p_CcNode->parseCode == CC_PC_GENERIC_IC_HASH_INDEXED)
-+ {
-+ if ((p_CcNode->offset + p_CcNode->sizeOfExtraction) > 8)
-+ {
-+ DeleteNode(p_CcNode);
-+ REPORT_ERROR(MAJOR, E_INVALID_SELECTION,("when node of the type CC_PC_GENERIC_IC_HASH_INDEXED offset + size can not be bigger then size of HASH 64 bits (8 bytes)"));
-+ return NULL;
-+ }
-+ }
-+ if ((p_CcNode->parseCode == CC_PC_GENERIC_IC_GMASK) ||
-+ (p_CcNode->parseCode == CC_PC_GENERIC_IC_HASH_INDEXED))
-+ {
-+ p_CcNode->offset += p_CcNode->prsArrayOffset;
-+ p_CcNode->prsArrayOffset = 0;
-+ }
-+ break;
-+
-+ default:
-+ DeleteNode(p_CcNode);
-+ REPORT_ERROR(MAJOR, E_INVALID_SELECTION, NO_MSG);
-+ return NULL;
-+ }
-+
-+ if (p_CcNode->parseCode == CC_PC_ILLEGAL)
-+ {
-+ DeleteNode(p_CcNode);
-+ REPORT_ERROR(MAJOR, E_INVALID_VALUE, ("illegal extraction type"));
-+ return NULL;
-+ }
-+
-+ if ((p_CcNode->sizeOfExtraction > FM_PCD_MAX_SIZE_OF_KEY) ||
-+ !p_CcNode->sizeOfExtraction)
-+ {
-+ DeleteNode(p_CcNode);
-+ REPORT_ERROR(MAJOR, E_INVALID_VALUE, ("sizeOfExatrction can not be greater than 56 and not 0"));
-+ return NULL;
-+ }
-+
-+ if (p_CcNodeParam->keysParams.keySize != p_CcNode->sizeOfExtraction)
-+ {
-+ DeleteNode(p_CcNode);
-+ REPORT_ERROR(MAJOR, E_INVALID_VALUE, ("keySize has to be equal to sizeOfExtraction"));
-+ return NULL;
-+ }
-+
-+ p_CcNode->userSizeOfExtraction = p_CcNode->sizeOfExtraction;
-+
-+ if (!glblMask)
-+ memset(p_CcNode->p_GlblMask, 0xff, CC_GLBL_MASK_SIZE * sizeof(uint8_t));
-+
-+ err = CheckAndSetManipParamsWithCcNodeParams(p_CcNode);
-+ if (err != E_OK)
-+ {
-+ DeleteNode(p_CcNode);
-+ REPORT_ERROR(MAJOR, E_INVALID_VALUE, ("keySize has to be equal to sizeOfExtraction"));
-+ return NULL;
-+ }
-+
-+ /* Calculating matching table entry size by rounding up the user-defined size of extraction to valid entry size */
-+ GetCcExtractKeySize(p_CcNode->sizeOfExtraction, &p_CcNode->ccKeySizeAccExtraction);
-+
-+ /* If local mask is used, it is stored next to each key in the keys match table */
-+ if (p_CcNode->lclMask)
-+ keySize = (uint32_t)(2 * p_CcNode->ccKeySizeAccExtraction);
-+ else
-+ keySize = p_CcNode->ccKeySizeAccExtraction;
-+
-+ /* Update CC shadow with maximal size required by this node */
-+ if (p_CcNode->maxNumOfKeys)
-+ {
-+ err = CalcAndUpdateCcShadow(p_CcNode,
-+ isKeyTblAlloc,
-+ &matchTableSize,
-+ &adTableSize);
-+ if (err != E_OK)
-+ {
-+ DeleteNode(p_CcNode);
-+ REPORT_ERROR(MAJOR, err, NO_MSG);
-+ return NULL;
-+ }
-+
-+ p_CcNode->keysMatchTableMaxSize = matchTableSize;
-+
-+ if (p_CcNode->statisticsMode != e_FM_PCD_CC_STATS_MODE_NONE)
-+ {
-+ err = AllocStatsObjs(p_CcNode);
-+ if (err != E_OK)
-+ {
-+ DeleteNode(p_CcNode);
-+ REPORT_ERROR(MAJOR, err, NO_MSG);
-+ return NULL;
-+ }
-+ }
-+
-+ /* If manipulation will be initialized before this node, it will use the table
-+ descriptor in the AD table of previous node and this node will need an extra
-+ AD as his table descriptor. */
-+ p_CcNode->h_Ad = (t_Handle)FM_MURAM_AllocMem(h_FmMuram,
-+ FM_PCD_CC_AD_ENTRY_SIZE,
-+ FM_PCD_CC_AD_TABLE_ALIGN);
-+ if (!p_CcNode->h_Ad)
-+ {
-+ DeleteNode(p_CcNode);
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("MURAM allocation for CC action descriptor"));
-+ return NULL;
-+ }
-+ }
-+ else
-+ {
-+ matchTableSize = (uint32_t)(keySize * sizeof(uint8_t) * (p_CcNode->numOfKeys + 1));
-+ adTableSize = (uint32_t)(FM_PCD_CC_AD_ENTRY_SIZE * (p_CcNode->numOfKeys + 1));
-+ }
-+
-+#if (DPAA_VERSION >= 11)
-+ switch (p_CcNode->statisticsMode)
-+ {
-+
-+ case e_FM_PCD_CC_STATS_MODE_RMON:
-+ /* If RMON statistics or RMON conditional statistics modes are requested,
-+ allocate frame length ranges array */
-+ p_CcNode->h_StatsFLRs =
-+ FM_MURAM_AllocMem(h_FmMuram,
-+ (uint32_t)(p_CcNode->numOfStatsFLRs) * FM_PCD_CC_STATS_FLR_SIZE,
-+ FM_PCD_CC_AD_TABLE_ALIGN);
-+
-+ if (!p_CcNode->h_StatsFLRs)
-+ {
-+ DeleteNode(p_CcNode);
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("MURAM allocation for CC frame length ranges array"));
-+ return NULL;
-+ }
-+
-+ /* Initialize using value received from the user */
-+ for (tmp = 0; tmp < p_CcNode->numOfStatsFLRs; tmp++)
-+ {
-+ h_StatsFLRs = PTR_MOVE(p_CcNode->h_StatsFLRs, tmp * FM_PCD_CC_STATS_FLR_SIZE);
-+
-+ Mem2IOCpy32(h_StatsFLRs,
-+ &(p_CcNodeParam->keysParams.frameLengthRanges[tmp]),
-+ FM_PCD_CC_STATS_FLR_SIZE);
-+ }
-+ break;
-+
-+ default:
-+ break;
-+ }
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+
-+ /* Allocate keys match table. Not required for some CC nodes, for example for IPv4 TTL
-+ identification, IPv6 hop count identification, etc. */
-+ if (isKeyTblAlloc)
-+ {
-+ p_CcNode->h_KeysMatchTable =
-+ (t_Handle)FM_MURAM_AllocMem(h_FmMuram,
-+ matchTableSize,
-+ FM_PCD_CC_KEYS_MATCH_TABLE_ALIGN);
-+ if (!p_CcNode->h_KeysMatchTable)
-+ {
-+ DeleteNode(p_CcNode);
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("MURAM allocation for CC node key match table"));
-+ return NULL;
-+ }
-+ IOMemSet32((uint8_t *)p_CcNode->h_KeysMatchTable,
-+ 0,
-+ matchTableSize);
-+ }
-+
-+ /* Allocate action descriptors table */
-+ p_CcNode->h_AdTable =
-+ (t_Handle)FM_MURAM_AllocMem(h_FmMuram,
-+ adTableSize,
-+ FM_PCD_CC_AD_TABLE_ALIGN);
-+ if (!p_CcNode->h_AdTable)
-+ {
-+ DeleteNode(p_CcNode);
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("MURAM allocation for CC node action descriptors table"));
-+ return NULL;
-+ }
-+ IOMemSet32((uint8_t *)p_CcNode->h_AdTable, 0, adTableSize);
-+
-+ p_KeysMatchTblTmp = p_CcNode->h_KeysMatchTable;
-+ p_AdTableTmp = p_CcNode->h_AdTable;
-+
-+ /* For each key, create the key and the next step AD */
-+ for (tmp = 0; tmp < p_CcNode->numOfKeys; tmp++)
-+ {
-+ p_KeyParams = &p_CcNodeParam->keysParams.keyParams[tmp];
-+
-+ if (p_KeysMatchTblTmp)
-+ {
-+ /* Copy the key */
-+ Mem2IOCpy32((void*)p_KeysMatchTblTmp, p_KeyParams->p_Key, p_CcNode->sizeOfExtraction);
-+
-+ /* Copy the key mask or initialize it to 0xFF..F */
-+ if (p_CcNode->lclMask && p_KeyParams->p_Mask)
-+ {
-+ Mem2IOCpy32(PTR_MOVE(p_KeysMatchTblTmp,
-+ p_CcNode->ccKeySizeAccExtraction), /* User's size of extraction rounded up to a valid matching table entry size */
-+ p_KeyParams->p_Mask,
-+ p_CcNode->sizeOfExtraction); /* Exact size of extraction as received from the user */
-+ }
-+ else if (p_CcNode->lclMask)
-+ {
-+ IOMemSet32(PTR_MOVE(p_KeysMatchTblTmp,
-+ p_CcNode->ccKeySizeAccExtraction), /* User's size of extraction rounded up to a valid matching table entry size */
-+ 0xff,
-+ p_CcNode->sizeOfExtraction); /* Exact size of extraction as received from the user */
-+ }
-+
-+ p_KeysMatchTblTmp = PTR_MOVE(p_KeysMatchTblTmp, keySize * sizeof(uint8_t));
-+ }
-+
-+ /* Create the next action descriptor in the match table */
-+ if (p_KeyParams->ccNextEngineParams.statisticsEn)
-+ {
-+ p_StatsObj = GetStatsObj(p_CcNode);
-+ ASSERT_COND(p_StatsObj);
-+
-+ statsParams.h_StatsAd = p_StatsObj->h_StatsAd;
-+ statsParams.h_StatsCounters = p_StatsObj->h_StatsCounters;
-+#if (DPAA_VERSION >= 11)
-+ statsParams.h_StatsFLRs = p_CcNode->h_StatsFLRs;
-+
-+#endif /* (DPAA_VERSION >= 11) */
-+ NextStepAd(p_AdTableTmp,
-+ &statsParams,
-+ &p_KeyParams->ccNextEngineParams,
-+ p_FmPcd);
-+
-+ p_CcNode->keyAndNextEngineParams[tmp].p_StatsObj = p_StatsObj;
-+ }
-+ else
-+ {
-+ NextStepAd(p_AdTableTmp,
-+ NULL,
-+ &p_KeyParams->ccNextEngineParams,
-+ p_FmPcd);
-+
-+ p_CcNode->keyAndNextEngineParams[tmp].p_StatsObj = NULL;
-+ }
-+
-+ p_AdTableTmp = PTR_MOVE(p_AdTableTmp, FM_PCD_CC_AD_ENTRY_SIZE);
-+ }
-+
-+ /* Update next engine for the 'miss' entry */
-+ if (p_CcNodeParam->keysParams.ccNextEngineParamsForMiss.statisticsEn)
-+ {
-+ p_StatsObj = GetStatsObj(p_CcNode);
-+ ASSERT_COND(p_StatsObj);
-+
-+ statsParams.h_StatsAd = p_StatsObj->h_StatsAd;
-+ statsParams.h_StatsCounters = p_StatsObj->h_StatsCounters;
-+#if (DPAA_VERSION >= 11)
-+ statsParams.h_StatsFLRs = p_CcNode->h_StatsFLRs;
-+
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ NextStepAd(p_AdTableTmp,
-+ &statsParams,
-+ &p_CcNodeParam->keysParams.ccNextEngineParamsForMiss,
-+ p_FmPcd);
-+
-+ p_CcNode->keyAndNextEngineParams[tmp].p_StatsObj = p_StatsObj;
-+ }
-+ else
-+ {
-+ NextStepAd(p_AdTableTmp,
-+ NULL,
-+ &p_CcNodeParam->keysParams.ccNextEngineParamsForMiss,
-+ p_FmPcd);
-+
-+ p_CcNode->keyAndNextEngineParams[tmp].p_StatsObj = NULL;
-+ }
-+
-+ /* This parameter will be used to initialize the "key length" field in the action descriptor
-+ that points to this node and it should be 0 for full field extraction */
-+ if (fullField == TRUE)
-+ p_CcNode->sizeOfExtraction = 0;
-+
-+ for (tmp = 0; tmp < MIN(p_CcNode->numOfKeys + 1, CC_MAX_NUM_OF_KEYS); tmp++)
-+ {
-+ if (p_CcNode->keyAndNextEngineParams[tmp].nextEngineParams.nextEngine == e_FM_PCD_CC)
-+ {
-+ p_FmPcdCcNextNode = (t_FmPcdCcNode*)p_CcNode->keyAndNextEngineParams[tmp].nextEngineParams.params.ccParams.h_CcNode;
-+ p_CcInformation = FindNodeInfoInReleventLst(&p_FmPcdCcNextNode->ccPrevNodesLst,
-+ (t_Handle)p_CcNode,
-+ p_FmPcdCcNextNode->h_Spinlock);
-+ if (!p_CcInformation)
-+ {
-+ memset(&ccNodeInfo, 0, sizeof(t_CcNodeInformation));
-+ ccNodeInfo.h_CcNode = (t_Handle)p_CcNode;
-+ ccNodeInfo.index = 1;
-+ EnqueueNodeInfoToRelevantLst(&p_FmPcdCcNextNode->ccPrevNodesLst,
-+ &ccNodeInfo,
-+ p_FmPcdCcNextNode->h_Spinlock);
-+ }
-+ else
-+ p_CcInformation->index++;
-+
-+ if (p_CcNode->keyAndNextEngineParams[tmp].nextEngineParams.h_Manip)
-+ {
-+ h_Manip = p_CcNode->keyAndNextEngineParams[tmp].nextEngineParams.h_Manip;
-+ p_CcInformation = FindNodeInfoInReleventLst(FmPcdManipGetNodeLstPointedOnThisManip(h_Manip),
-+ (t_Handle)p_CcNode,
-+ FmPcdManipGetSpinlock(h_Manip));
-+ if (!p_CcInformation)
-+ {
-+ memset(&ccNodeInfo, 0, sizeof(t_CcNodeInformation));
-+ ccNodeInfo.h_CcNode = (t_Handle)p_CcNode;
-+ ccNodeInfo.index = 1;
-+ EnqueueNodeInfoToRelevantLst(FmPcdManipGetNodeLstPointedOnThisManip(h_Manip),
-+ &ccNodeInfo,
-+ FmPcdManipGetSpinlock(h_Manip));
-+ }
-+ else
-+ p_CcInformation->index++;
-+ }
-+ }
-+ }
-+
-+ p_AdTableTmp = p_CcNode->h_AdTable;
-+
-+ if (!FmPcdLockTryLockAll(h_FmPcd))
-+ {
-+ FM_PCD_MatchTableDelete((t_Handle)p_CcNode);
-+ DBG(TRACE, ("FmPcdLockTryLockAll failed"));
-+ return NULL;
-+ }
-+
-+ /* Required action for each next engine */
-+ for (tmp = 0; tmp < MIN(p_CcNode->numOfKeys + 1, CC_MAX_NUM_OF_KEYS); tmp++)
-+ {
-+ if (p_CcNode->keyAndNextEngineParams[tmp].requiredAction)
-+ {
-+ err = SetRequiredAction(h_FmPcd,
-+ p_CcNode->keyAndNextEngineParams[tmp].requiredAction,
-+ &p_CcNode->keyAndNextEngineParams[tmp],
-+ p_AdTableTmp,
-+ 1,
-+ NULL);
-+ if (err)
-+ {
-+ FmPcdLockUnlockAll(h_FmPcd);
-+ FM_PCD_MatchTableDelete((t_Handle)p_CcNode);
-+ REPORT_ERROR(MAJOR, err, NO_MSG);
-+ return NULL;
-+ }
-+ p_AdTableTmp = PTR_MOVE(p_AdTableTmp, FM_PCD_CC_AD_ENTRY_SIZE);
-+ }
-+ }
-+
-+ FmPcdLockUnlockAll(h_FmPcd);
-+ return p_CcNode;
-+}
-+
-+t_Error FM_PCD_MatchTableDelete(t_Handle h_CcNode)
-+{
-+ t_FmPcd *p_FmPcd;
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+ int i = 0;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_CcNode, E_INVALID_HANDLE);
-+ p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+
-+ if (p_CcNode->owners)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("This node cannot be removed because it is occupied; first unbind this node"));
-+
-+ for (i = 0; i < p_CcNode->numOfKeys; i++)
-+ if (p_CcNode->keyAndNextEngineParams[i].nextEngineParams.nextEngine == e_FM_PCD_CC)
-+ UpdateNodeOwner(p_CcNode->keyAndNextEngineParams[i].nextEngineParams.params.ccParams.h_CcNode, FALSE);
-+
-+ if (p_CcNode->keyAndNextEngineParams[i].nextEngineParams.nextEngine == e_FM_PCD_CC)
-+ UpdateNodeOwner(p_CcNode->keyAndNextEngineParams[i].nextEngineParams.params.ccParams.h_CcNode, FALSE);
-+
-+ /* Handle also Miss entry */
-+ for (i = 0; i < p_CcNode->numOfKeys + 1; i++)
-+ {
-+ if (p_CcNode->keyAndNextEngineParams[i].nextEngineParams.h_Manip)
-+ FmPcdManipUpdateOwner(p_CcNode->keyAndNextEngineParams[i].nextEngineParams.h_Manip, FALSE);
-+
-+#if (DPAA_VERSION >= 11)
-+ if ((p_CcNode->keyAndNextEngineParams[i].nextEngineParams.nextEngine == e_FM_PCD_FR) &&
-+ (p_CcNode->keyAndNextEngineParams[i].nextEngineParams.params.frParams.h_FrmReplic))
-+ {
-+ FrmReplicGroupUpdateOwner(p_CcNode->keyAndNextEngineParams[i].nextEngineParams.params.frParams.h_FrmReplic,
-+ FALSE);
-+ }
-+#endif /* (DPAA_VERSION >= 11) */
-+ }
-+
-+ DeleteNode(p_CcNode);
-+
-+ return E_OK;
-+}
-+
-+t_Error FM_PCD_MatchTableAddKey(t_Handle h_CcNode,
-+ uint16_t keyIndex,
-+ uint8_t keySize,
-+ t_FmPcdCcKeyParams *p_KeyParams)
-+{
-+ t_FmPcd *p_FmPcd;
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+ t_Error err = E_OK;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_KeyParams, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_CcNode, E_INVALID_HANDLE);
-+ p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->h_Hc, E_INVALID_HANDLE);
-+
-+ if (keyIndex == FM_PCD_LAST_KEY_INDEX)
-+ keyIndex = p_CcNode->numOfKeys;
-+
-+ if (!FmPcdLockTryLockAll(p_FmPcd))
-+ {
-+ DBG(TRACE, ("FmPcdLockTryLockAll failed"));
-+ return ERROR_CODE(E_BUSY);
-+ }
-+
-+ err = FmPcdCcAddKey(p_FmPcd,
-+ p_CcNode,
-+ keyIndex,
-+ keySize,
-+ p_KeyParams);
-+
-+ FmPcdLockUnlockAll(p_FmPcd);
-+
-+ switch (GET_ERROR_TYPE(err))
-+ {
-+ case E_OK:
-+ return E_OK;
-+
-+ case E_BUSY:
-+ DBG(TRACE, ("E_BUSY error"));
-+ return ERROR_CODE(E_BUSY);
-+
-+ default:
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+}
-+
-+t_Error FM_PCD_MatchTableRemoveKey(t_Handle h_CcNode, uint16_t keyIndex)
-+{
-+ t_FmPcd *p_FmPcd;
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+ t_Error err = E_OK;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_CcNode, E_INVALID_HANDLE);
-+ p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->h_Hc, E_INVALID_HANDLE);
-+
-+ if (!FmPcdLockTryLockAll(p_FmPcd))
-+ {
-+ DBG(TRACE, ("FmPcdLockTryLockAll failed"));
-+ return ERROR_CODE(E_BUSY);
-+ }
-+
-+ err = FmPcdCcRemoveKey(p_FmPcd, p_CcNode, keyIndex);
-+
-+ FmPcdLockUnlockAll(p_FmPcd);
-+
-+ switch (GET_ERROR_TYPE(err))
-+ {
-+ case E_OK:
-+ return E_OK;
-+
-+ case E_BUSY:
-+ DBG(TRACE, ("E_BUSY error"));
-+ return ERROR_CODE(E_BUSY);
-+
-+ default:
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+
-+ return E_OK;
-+}
-+
-+t_Error FM_PCD_MatchTableModifyKey(t_Handle h_CcNode,
-+ uint16_t keyIndex,
-+ uint8_t keySize,
-+ uint8_t *p_Key,
-+ uint8_t *p_Mask)
-+{
-+ t_FmPcd *p_FmPcd;
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+ t_List h_List;
-+ t_Error err = E_OK;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_CcNode, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Key, E_NULL_POINTER);
-+ p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->h_Hc, E_INVALID_HANDLE);
-+
-+ INIT_LIST(&h_List);
-+
-+ err = FmPcdCcNodeTreeTryLock(p_FmPcd, p_CcNode, &h_List);
-+ if (err)
-+ {
-+ DBG(TRACE, ("Node's trees lock failed"));
-+ return ERROR_CODE(E_BUSY);
-+ }
-+
-+ err = FmPcdCcModifyKey(p_FmPcd,
-+ p_CcNode,
-+ keyIndex,
-+ keySize,
-+ p_Key,
-+ p_Mask);
-+
-+ FmPcdCcNodeTreeReleaseLock(p_FmPcd, &h_List);
-+
-+ switch (GET_ERROR_TYPE(err))
-+ {
-+ case E_OK:
-+ return E_OK;
-+
-+ case E_BUSY:
-+ DBG(TRACE, ("E_BUSY error"));
-+ return ERROR_CODE(E_BUSY);
-+
-+ default:
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+}
-+
-+t_Error FM_PCD_MatchTableModifyNextEngine(t_Handle h_CcNode,
-+ uint16_t keyIndex,
-+ t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams)
-+{
-+ t_FmPcd *p_FmPcd;
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+ t_Error err = E_OK;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcdCcNextEngineParams, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_CcNode, E_INVALID_HANDLE);
-+ p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->h_Hc, E_INVALID_HANDLE);
-+
-+ if (!FmPcdLockTryLockAll(p_FmPcd))
-+ {
-+ DBG(TRACE, ("FmPcdLockTryLockAll failed"));
-+ return ERROR_CODE(E_BUSY);
-+ }
-+
-+ err = ModifyNextEngineParamNode(p_FmPcd,
-+ p_CcNode,
-+ keyIndex,
-+ p_FmPcdCcNextEngineParams);
-+
-+ FmPcdLockUnlockAll(p_FmPcd);
-+
-+ switch (GET_ERROR_TYPE(err))
-+ {
-+ case E_OK:
-+ return E_OK;
-+
-+ case E_BUSY:
-+ DBG(TRACE, ("E_BUSY error"));
-+ return ERROR_CODE(E_BUSY);
-+
-+ default:
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+}
-+
-+t_Error FM_PCD_MatchTableModifyMissNextEngine(t_Handle h_CcNode,
-+ t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams)
-+{
-+ t_FmPcd *p_FmPcd;
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+ t_Error err = E_OK;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcdCcNextEngineParams, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_CcNode, E_INVALID_HANDLE);
-+ p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->h_Hc, E_INVALID_HANDLE);
-+
-+ if (!FmPcdLockTryLockAll(p_FmPcd))
-+ {
-+ DBG(TRACE, ("FmPcdLockTryLockAll failed"));
-+ return ERROR_CODE(E_BUSY);
-+ }
-+
-+ err = FmPcdCcModifyMissNextEngineParamNode(p_FmPcd,
-+ p_CcNode,
-+ p_FmPcdCcNextEngineParams);
-+
-+ FmPcdLockUnlockAll(p_FmPcd);
-+
-+ switch (GET_ERROR_TYPE(err))
-+ {
-+ case E_OK:
-+ return E_OK;
-+
-+ case E_BUSY:
-+ DBG(TRACE, ("E_BUSY error"));
-+ return ERROR_CODE(E_BUSY);
-+
-+ default:
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+}
-+
-+t_Error FM_PCD_MatchTableModifyKeyAndNextEngine(t_Handle h_CcNode,
-+ uint16_t keyIndex,
-+ uint8_t keySize,
-+ t_FmPcdCcKeyParams *p_KeyParams)
-+{
-+ t_FmPcd *p_FmPcd;
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+ t_Error err = E_OK;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_KeyParams, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_CcNode, E_INVALID_HANDLE);
-+ p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->h_Hc, E_INVALID_HANDLE);
-+
-+ if (!FmPcdLockTryLockAll(p_FmPcd))
-+ {
-+ DBG(TRACE, ("FmPcdLockTryLockAll failed"));
-+ return ERROR_CODE(E_BUSY);
-+ }
-+
-+ err = FmPcdCcModifyKeyAndNextEngine(p_FmPcd,
-+ p_CcNode,
-+ keyIndex,
-+ keySize,
-+ p_KeyParams);
-+
-+ FmPcdLockUnlockAll(p_FmPcd);
-+
-+ switch (GET_ERROR_TYPE(err))
-+ {
-+ case E_OK:
-+ return E_OK;
-+
-+ case E_BUSY:
-+ DBG(TRACE, ("E_BUSY error"));
-+ return ERROR_CODE(E_BUSY);
-+
-+ default:
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+}
-+
-+
-+t_Error FM_PCD_MatchTableFindNRemoveKey(t_Handle h_CcNode,
-+ uint8_t keySize,
-+ uint8_t *p_Key,
-+ uint8_t *p_Mask)
-+{
-+ t_FmPcd *p_FmPcd;
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+ uint16_t keyIndex;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Key, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_CcNode, E_INVALID_HANDLE);
-+ p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->h_Hc, E_INVALID_HANDLE);
-+
-+ if (!FmPcdLockTryLockAll(p_FmPcd))
-+ {
-+ DBG(TRACE, ("FmPcdLockTryLockAll failed"));
-+ return ERROR_CODE(E_BUSY);
-+ }
-+
-+ err = FindKeyIndex(p_CcNode, keySize, p_Key, p_Mask, &keyIndex);
-+ if (GET_ERROR_TYPE(err) != E_OK)
-+ {
-+ FmPcdLockUnlockAll(p_FmPcd);
-+ RETURN_ERROR(MAJOR, err, ("The received key and mask pair was not found in the match table of the provided node"));
-+ }
-+
-+ err = FmPcdCcRemoveKey(p_FmPcd, p_CcNode, keyIndex);
-+
-+ FmPcdLockUnlockAll(p_FmPcd);
-+
-+ switch (GET_ERROR_TYPE(err))
-+ {
-+ case E_OK:
-+ return E_OK;
-+
-+ case E_BUSY:
-+ DBG(TRACE, ("E_BUSY error"));
-+ return ERROR_CODE(E_BUSY);
-+
-+ default:
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+}
-+
-+
-+t_Error FM_PCD_MatchTableFindNModifyNextEngine(t_Handle h_CcNode,
-+ uint8_t keySize,
-+ uint8_t *p_Key,
-+ uint8_t *p_Mask,
-+ t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams)
-+{
-+ t_FmPcd *p_FmPcd;
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+ uint16_t keyIndex;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Key, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcdCcNextEngineParams, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_CcNode, E_INVALID_HANDLE);
-+ p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->h_Hc, E_INVALID_HANDLE);
-+
-+ if (!FmPcdLockTryLockAll(p_FmPcd))
-+ {
-+ DBG(TRACE, ("FmPcdLockTryLockAll failed"));
-+ return ERROR_CODE(E_BUSY);
-+ }
-+
-+ err = FindKeyIndex(p_CcNode, keySize, p_Key, p_Mask, &keyIndex);
-+ if (GET_ERROR_TYPE(err) != E_OK)
-+ {
-+ FmPcdLockUnlockAll(p_FmPcd);
-+ RETURN_ERROR(MAJOR, err, ("The received key and mask pair was not found in the match table of the provided node"));
-+ }
-+
-+ err = ModifyNextEngineParamNode(p_FmPcd,
-+ p_CcNode,
-+ keyIndex,
-+ p_FmPcdCcNextEngineParams);
-+
-+ FmPcdLockUnlockAll(p_FmPcd);
-+
-+ switch (GET_ERROR_TYPE(err))
-+ {
-+ case E_OK:
-+ return E_OK;
-+
-+ case E_BUSY:
-+ DBG(TRACE, ("E_BUSY error"));
-+ return ERROR_CODE(E_BUSY);
-+
-+ default:
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+}
-+
-+t_Error FM_PCD_MatchTableFindNModifyKeyAndNextEngine(t_Handle h_CcNode,
-+ uint8_t keySize,
-+ uint8_t *p_Key,
-+ uint8_t *p_Mask,
-+ t_FmPcdCcKeyParams *p_KeyParams)
-+{
-+ t_FmPcd *p_FmPcd;
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+ uint16_t keyIndex;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Key, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_KeyParams, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_CcNode, E_INVALID_HANDLE);
-+ p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->h_Hc, E_INVALID_HANDLE);
-+
-+ if (!FmPcdLockTryLockAll(p_FmPcd))
-+ {
-+ DBG(TRACE, ("FmPcdLockTryLockAll failed"));
-+ return ERROR_CODE(E_BUSY);
-+ }
-+
-+ err = FindKeyIndex(p_CcNode, keySize, p_Key, p_Mask, &keyIndex);
-+ if (GET_ERROR_TYPE(err) != E_OK)
-+ {
-+ FmPcdLockUnlockAll(p_FmPcd);
-+ RETURN_ERROR(MAJOR, err, ("The received key and mask pair was not found in the match table of the provided node"));
-+ }
-+
-+ err = FmPcdCcModifyKeyAndNextEngine(p_FmPcd,
-+ h_CcNode,
-+ keyIndex,
-+ keySize,
-+ p_KeyParams);
-+
-+ FmPcdLockUnlockAll(p_FmPcd);
-+
-+ switch (GET_ERROR_TYPE(err))
-+ {
-+ case E_OK:
-+ return E_OK;
-+
-+ case E_BUSY:
-+ DBG(TRACE, ("E_BUSY error"));
-+ return ERROR_CODE(E_BUSY);
-+
-+ default:
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+}
-+
-+t_Error FM_PCD_MatchTableFindNModifyKey(t_Handle h_CcNode,
-+ uint8_t keySize,
-+ uint8_t *p_Key,
-+ uint8_t *p_Mask,
-+ uint8_t *p_NewKey,
-+ uint8_t *p_NewMask)
-+{
-+ t_FmPcd *p_FmPcd;
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+ t_List h_List;
-+ uint16_t keyIndex;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Key, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_NewKey, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_CcNode, E_INVALID_HANDLE);
-+ p_FmPcd = (t_FmPcd *)p_CcNode->h_FmPcd;
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->h_Hc, E_INVALID_HANDLE);
-+
-+ INIT_LIST(&h_List);
-+
-+ err = FmPcdCcNodeTreeTryLock(p_FmPcd, p_CcNode, &h_List);
-+ if (err)
-+ {
-+ DBG(TRACE, ("Node's trees lock failed"));
-+ return ERROR_CODE(E_BUSY);
-+ }
-+
-+ err = FindKeyIndex(p_CcNode, keySize, p_Key, p_Mask, &keyIndex);
-+ if (GET_ERROR_TYPE(err) != E_OK)
-+ {
-+ FmPcdCcNodeTreeReleaseLock(p_FmPcd, &h_List);
-+ RETURN_ERROR(MAJOR, err, ("The received key and mask pair was not found in the "
-+ "match table of the provided node"));
-+ }
-+
-+ err = FmPcdCcModifyKey(p_FmPcd,
-+ p_CcNode,
-+ keyIndex,
-+ keySize,
-+ p_NewKey,
-+ p_NewMask);
-+
-+ FmPcdCcNodeTreeReleaseLock(p_FmPcd, &h_List);
-+
-+ switch (GET_ERROR_TYPE(err))
-+ {
-+ case E_OK:
-+ return E_OK;
-+
-+ case E_BUSY:
-+ DBG(TRACE, ("E_BUSY error"));
-+ return ERROR_CODE(E_BUSY);
-+
-+ default:
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+}
-+
-+t_Error FM_PCD_MatchTableGetNextEngine(t_Handle h_CcNode,
-+ uint16_t keyIndex,
-+ t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams)
-+{
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_CcNode, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcdCcNextEngineParams, E_NULL_POINTER);
-+
-+ if (keyIndex >= p_CcNode->numOfKeys)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("keyIndex exceeds current number of keys"));
-+
-+ if (keyIndex > (FM_PCD_MAX_NUM_OF_KEYS - 1))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("keyIndex can not be larger than %d", (FM_PCD_MAX_NUM_OF_KEYS - 1)));
-+
-+ memcpy(p_FmPcdCcNextEngineParams,
-+ &p_CcNode->keyAndNextEngineParams[keyIndex].nextEngineParams,
-+ sizeof(t_FmPcdCcNextEngineParams));
-+
-+ return E_OK;
-+}
-+
-+
-+uint32_t FM_PCD_MatchTableGetKeyCounter(t_Handle h_CcNode, uint16_t keyIndex)
-+{
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+ uint32_t *p_StatsCounters, frameCount;
-+ uint32_t intFlags;
-+
-+ SANITY_CHECK_RETURN_VALUE(p_CcNode, E_INVALID_HANDLE, 0);
-+
-+ if (p_CcNode->statisticsMode == e_FM_PCD_CC_STATS_MODE_NONE)
-+ {
-+ REPORT_ERROR(MAJOR, E_INVALID_STATE, ("Statistics were not enabled for this match table"));
-+ return 0;
-+ }
-+
-+ if ((p_CcNode->statisticsMode != e_FM_PCD_CC_STATS_MODE_FRAME) &&
-+ (p_CcNode->statisticsMode != e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME))
-+ {
-+ REPORT_ERROR(MAJOR, E_INVALID_STATE, ("Frame count is not supported in the statistics mode of this match table"));
-+ return 0;
-+ }
-+
-+ intFlags = XX_LockIntrSpinlock(p_CcNode->h_Spinlock);
-+
-+ if (keyIndex >= p_CcNode->numOfKeys)
-+ {
-+ XX_UnlockIntrSpinlock(p_CcNode->h_Spinlock, intFlags);
-+ REPORT_ERROR(MAJOR, E_INVALID_STATE, ("The provided keyIndex exceeds the number of keys in this match table"));
-+ return 0;
-+ }
-+
-+ if (!p_CcNode->keyAndNextEngineParams[keyIndex].p_StatsObj)
-+ {
-+ XX_UnlockIntrSpinlock(p_CcNode->h_Spinlock, intFlags);
-+ REPORT_ERROR(MAJOR, E_INVALID_STATE, ("Statistics were not enabled for this key"));
-+ return 0;
-+ }
-+
-+ p_StatsCounters = p_CcNode->keyAndNextEngineParams[keyIndex].p_StatsObj->h_StatsCounters;
-+ ASSERT_COND(p_StatsCounters);
-+
-+ /* The first counter is byte counter, so we need to advance to the next counter */
-+ frameCount = GET_UINT32(*(uint32_t *)(PTR_MOVE(p_StatsCounters,
-+ FM_PCD_CC_STATS_COUNTER_SIZE)));
-+
-+ XX_UnlockIntrSpinlock(p_CcNode->h_Spinlock, intFlags);
-+
-+ return frameCount;
-+}
-+
-+t_Error FM_PCD_MatchTableGetKeyStatistics(t_Handle h_CcNode,
-+ uint16_t keyIndex,
-+ t_FmPcdCcKeyStatistics *p_KeyStatistics)
-+{
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+ uint32_t intFlags;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(h_CcNode, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_KeyStatistics, E_NULL_POINTER);
-+
-+ intFlags = XX_LockIntrSpinlock(p_CcNode->h_Spinlock);
-+
-+ err = MatchTableGetKeyStatistics(p_CcNode,
-+ keyIndex,
-+ p_KeyStatistics);
-+
-+ XX_UnlockIntrSpinlock(p_CcNode->h_Spinlock, intFlags);
-+
-+ if (err != E_OK)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ return E_OK;
-+}
-+
-+t_Error FM_PCD_MatchTableFindNGetKeyStatistics(t_Handle h_CcNode,
-+ uint8_t keySize,
-+ uint8_t *p_Key,
-+ uint8_t *p_Mask,
-+ t_FmPcdCcKeyStatistics *p_KeyStatistics)
-+{
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+ uint16_t keyIndex;
-+ uint32_t intFlags;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Key, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_KeyStatistics, E_NULL_POINTER);
-+
-+ intFlags = XX_LockIntrSpinlock(p_CcNode->h_Spinlock);
-+
-+ err = FindKeyIndex(p_CcNode, keySize, p_Key, p_Mask, &keyIndex);
-+ if (GET_ERROR_TYPE(err) != E_OK)
-+ {
-+ XX_UnlockIntrSpinlock(p_CcNode->h_Spinlock, intFlags);
-+ RETURN_ERROR(MAJOR, err, ("The received key and mask pair was not found in the "
-+ "match table of the provided node"));
-+ }
-+
-+ err = MatchTableGetKeyStatistics(p_CcNode,
-+ keyIndex,
-+ p_KeyStatistics);
-+
-+ XX_UnlockIntrSpinlock(p_CcNode->h_Spinlock, intFlags);
-+
-+ if (err != E_OK)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ return E_OK;
-+}
-+
-+t_Error FM_PCD_MatchTableGetIndexedHashBucket(t_Handle h_CcNode,
-+ uint8_t keySize,
-+ uint8_t *p_Key,
-+ uint8_t hashShift,
-+ t_Handle *p_CcNodeBucketHandle,
-+ uint8_t *p_BucketIndex,
-+ uint16_t *p_LastIndex)
-+{
-+ t_FmPcdCcNode *p_CcNode = (t_FmPcdCcNode *)h_CcNode;
-+ uint16_t glblMask;
-+ uint64_t crc64 = 0;
-+
-+ SANITY_CHECK_RETURN_ERROR(h_CcNode, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_CcNode->parseCode == CC_PC_GENERIC_IC_HASH_INDEXED, E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR(p_Key, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_CcNodeBucketHandle, E_NULL_POINTER);
-+
-+ memcpy(&glblMask, PTR_MOVE(p_CcNode->p_GlblMask, 2), 2);
-+
-+ crc64 = crc64_init();
-+ crc64 = crc64_compute(p_Key, keySize, crc64);
-+ crc64 >>= hashShift;
-+
-+ *p_BucketIndex = (uint8_t)(((crc64 >> (8 * (6 - p_CcNode->userOffset))) & glblMask) >> 4);
-+ if (*p_BucketIndex >= p_CcNode->numOfKeys)
-+ RETURN_ERROR(MINOR, E_NOT_IN_RANGE, ("bucket index!"));
-+
-+ *p_CcNodeBucketHandle = p_CcNode->keyAndNextEngineParams[*p_BucketIndex].nextEngineParams.params.ccParams.h_CcNode;
-+ if (!*p_CcNodeBucketHandle)
-+ RETURN_ERROR(MINOR, E_NOT_FOUND, ("bucket!"));
-+
-+ *p_LastIndex = ((t_FmPcdCcNode *)*p_CcNodeBucketHandle)->numOfKeys;
-+
-+ return E_OK;
-+}
-+
-+t_Handle FM_PCD_HashTableSet(t_Handle h_FmPcd, t_FmPcdHashTableParams *p_Param)
-+{
-+ t_FmPcdCcNode *p_CcNodeHashTbl;
-+ t_FmPcdCcNodeParams *p_IndxHashCcNodeParam, *p_ExactMatchCcNodeParam;
-+ t_Handle h_CcNode;
-+ t_FmPcdCcKeyParams *p_HashKeyParams;
-+ int i;
-+ uint16_t numOfSets, numOfWays, countMask, onesCount = 0;
-+
-+ SANITY_CHECK_RETURN_VALUE(h_FmPcd, E_INVALID_HANDLE, NULL);
-+ SANITY_CHECK_RETURN_VALUE(p_Param, E_NULL_POINTER, NULL);
-+
-+ if (p_Param->maxNumOfKeys == 0)
-+ {
-+ REPORT_ERROR(MINOR, E_INVALID_VALUE, ("Max number of keys must be higher then 0"));
-+ return NULL;
-+ }
-+
-+ if (p_Param->hashResMask == 0)
-+ {
-+ REPORT_ERROR(MINOR, E_INVALID_VALUE, ("Hash result mask must differ from 0"));
-+ return NULL;
-+ }
-+
-+#if (DPAA_VERSION >= 11)
-+ if (p_Param->statisticsMode == e_FM_PCD_CC_STATS_MODE_RMON)
-+ {
-+ REPORT_ERROR(MAJOR, E_INVALID_VALUE,
-+ ("RMON statistics mode is not supported for hash table"));
-+ return NULL;
-+ }
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ p_ExactMatchCcNodeParam = (t_FmPcdCcNodeParams*)XX_Malloc(sizeof(t_FmPcdCcNodeParams));
-+ if (!p_ExactMatchCcNodeParam)
-+ {
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("p_ExactMatchCcNodeParam"));
-+ return NULL;
-+ }
-+ memset(p_ExactMatchCcNodeParam, 0, sizeof(t_FmPcdCcNodeParams));
-+
-+ p_IndxHashCcNodeParam = (t_FmPcdCcNodeParams*)XX_Malloc(sizeof(t_FmPcdCcNodeParams));
-+ if (!p_IndxHashCcNodeParam)
-+ {
-+ XX_Free(p_ExactMatchCcNodeParam);
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("p_IndxHashCcNodeParam"));
-+ return NULL;
-+ }
-+ memset(p_IndxHashCcNodeParam, 0, sizeof(t_FmPcdCcNodeParams));
-+
-+ /* Calculate number of sets and number of ways of the hash table */
-+ countMask = (uint16_t)(p_Param->hashResMask >> 4);
-+ while (countMask)
-+ {
-+ onesCount++;
-+ countMask = (uint16_t)(countMask >> 1);
-+ }
-+
-+ numOfSets = (uint16_t)(1 << onesCount);
-+ numOfWays = (uint16_t)DIV_CEIL(p_Param->maxNumOfKeys, numOfSets);
-+
-+ if (p_Param->maxNumOfKeys % numOfSets)
-+ DBG(INFO, ("'maxNumOfKeys' is not a multiple of hash number of ways, so number of ways will be rounded up"));
-+
-+ /* Building exact-match node params, will be used to create the hash buckets */
-+ p_ExactMatchCcNodeParam->extractCcParams.type = e_FM_PCD_EXTRACT_NON_HDR;
-+
-+ p_ExactMatchCcNodeParam->extractCcParams.extractNonHdr.src = e_FM_PCD_EXTRACT_FROM_KEY;
-+ p_ExactMatchCcNodeParam->extractCcParams.extractNonHdr.action = e_FM_PCD_ACTION_EXACT_MATCH;
-+ p_ExactMatchCcNodeParam->extractCcParams.extractNonHdr.offset = 0;
-+ p_ExactMatchCcNodeParam->extractCcParams.extractNonHdr.size = p_Param->matchKeySize;
-+
-+ p_ExactMatchCcNodeParam->keysParams.maxNumOfKeys = numOfWays;
-+ p_ExactMatchCcNodeParam->keysParams.maskSupport = FALSE;
-+ p_ExactMatchCcNodeParam->keysParams.statisticsMode = p_Param->statisticsMode;
-+ p_ExactMatchCcNodeParam->keysParams.numOfKeys = 0;
-+ p_ExactMatchCcNodeParam->keysParams.keySize = p_Param->matchKeySize;
-+ p_ExactMatchCcNodeParam->keysParams.ccNextEngineParamsForMiss = p_Param->ccNextEngineParamsForMiss;
-+
-+ p_HashKeyParams = p_IndxHashCcNodeParam->keysParams.keyParams;
-+
-+ for (i = 0; i < numOfSets; i++)
-+ {
-+ h_CcNode = FM_PCD_MatchTableSet(h_FmPcd, p_ExactMatchCcNodeParam);
-+ if (!h_CcNode)
-+ break;
-+
-+ p_HashKeyParams[i].ccNextEngineParams.nextEngine = e_FM_PCD_CC;
-+ p_HashKeyParams[i].ccNextEngineParams.statisticsEn = FALSE;
-+ p_HashKeyParams[i].ccNextEngineParams.params.ccParams.h_CcNode = h_CcNode;
-+ }
-+
-+ if (i < numOfSets)
-+ {
-+ for (i = i-1; i >=0; i--)
-+ FM_PCD_MatchTableDelete(p_HashKeyParams[i].ccNextEngineParams.params.ccParams.h_CcNode);
-+
-+ REPORT_ERROR(MAJOR, E_NULL_POINTER, NO_MSG);
-+ XX_Free(p_IndxHashCcNodeParam);
-+ XX_Free(p_ExactMatchCcNodeParam);
-+ return NULL;
-+ }
-+
-+ /* Creating indexed-hash CC node */
-+ p_IndxHashCcNodeParam->extractCcParams.type = e_FM_PCD_EXTRACT_NON_HDR;
-+ p_IndxHashCcNodeParam->extractCcParams.extractNonHdr.src = e_FM_PCD_EXTRACT_FROM_HASH;
-+ p_IndxHashCcNodeParam->extractCcParams.extractNonHdr.action = e_FM_PCD_ACTION_INDEXED_LOOKUP;
-+ p_IndxHashCcNodeParam->extractCcParams.extractNonHdr.icIndxMask = p_Param->hashResMask;
-+ p_IndxHashCcNodeParam->extractCcParams.extractNonHdr.offset = p_Param->hashShift;
-+ p_IndxHashCcNodeParam->extractCcParams.extractNonHdr.size = 2;
-+
-+ p_IndxHashCcNodeParam->keysParams.maxNumOfKeys = numOfSets;
-+ p_IndxHashCcNodeParam->keysParams.maskSupport = FALSE;
-+ p_IndxHashCcNodeParam->keysParams.statisticsMode = e_FM_PCD_CC_STATS_MODE_NONE;
-+ p_IndxHashCcNodeParam->keysParams.numOfKeys = numOfSets; /* Number of keys of this node is number of sets of the hash */
-+ p_IndxHashCcNodeParam->keysParams.keySize = 2;
-+
-+ p_CcNodeHashTbl = FM_PCD_MatchTableSet(h_FmPcd, p_IndxHashCcNodeParam);
-+
-+ XX_Free(p_IndxHashCcNodeParam);
-+ XX_Free(p_ExactMatchCcNodeParam);
-+
-+ return p_CcNodeHashTbl;
-+}
-+
-+t_Error FM_PCD_HashTableDelete(t_Handle h_HashTbl)
-+{
-+ t_FmPcdCcNode *p_HashTbl = (t_FmPcdCcNode *)h_HashTbl;
-+ t_Handle *p_HashBuckets;
-+ uint16_t i, numOfBuckets;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_HashTbl, E_INVALID_HANDLE);
-+
-+ numOfBuckets = p_HashTbl->numOfKeys;
-+
-+ p_HashBuckets = (t_Handle *)XX_Malloc(numOfBuckets * sizeof(t_Handle));
-+ if (!p_HashBuckets)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, NO_MSG);
-+
-+ for (i = 0; i < numOfBuckets; i++)
-+ p_HashBuckets[i] = p_HashTbl->keyAndNextEngineParams[i].nextEngineParams.params.ccParams.h_CcNode;
-+
-+ err = FM_PCD_MatchTableDelete(p_HashTbl);
-+
-+ for (i = 0; i < numOfBuckets; i++)
-+ err |= FM_PCD_MatchTableDelete(p_HashBuckets[i]);
-+
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ XX_Free(p_HashBuckets);
-+
-+ return E_OK;
-+}
-+
-+t_Error FM_PCD_HashTableAddKey(t_Handle h_HashTbl,
-+ uint8_t keySize,
-+ t_FmPcdCcKeyParams *p_KeyParams)
-+{
-+ t_FmPcdCcNode *p_HashTbl = (t_FmPcdCcNode *)h_HashTbl;
-+ t_Handle h_HashBucket;
-+ uint8_t bucketIndex;
-+ uint16_t lastIndex;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_HashTbl, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_KeyParams, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_KeyParams->p_Key, E_NULL_POINTER);
-+
-+ if (p_KeyParams->p_Mask)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Keys masks not supported for hash table"));
-+
-+ err = FM_PCD_MatchTableGetIndexedHashBucket(p_HashTbl,
-+ keySize,
-+ p_KeyParams->p_Key,
-+ p_HashTbl->userOffset,
-+ &h_HashBucket,
-+ &bucketIndex,
-+ &lastIndex);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ return FM_PCD_MatchTableAddKey(h_HashBucket,
-+ FM_PCD_LAST_KEY_INDEX,
-+ keySize,
-+ p_KeyParams);
-+}
-+
-+t_Error FM_PCD_HashTableRemoveKey(t_Handle h_HashTbl,
-+ uint8_t keySize,
-+ uint8_t *p_Key)
-+{
-+ t_FmPcdCcNode *p_HashTbl = (t_FmPcdCcNode *)h_HashTbl;
-+ t_Handle h_HashBucket;
-+ uint8_t bucketIndex;
-+ uint16_t lastIndex;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_HashTbl, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Key, E_NULL_POINTER);
-+
-+ err = FM_PCD_MatchTableGetIndexedHashBucket(p_HashTbl,
-+ keySize,
-+ p_Key,
-+ p_HashTbl->userOffset,
-+ &h_HashBucket,
-+ &bucketIndex,
-+ &lastIndex);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ return FM_PCD_MatchTableFindNRemoveKey(h_HashBucket,
-+ keySize,
-+ p_Key,
-+ NULL);
-+}
-+
-+t_Error FM_PCD_HashTableModifyNextEngine(t_Handle h_HashTbl,
-+ uint8_t keySize,
-+ uint8_t *p_Key,
-+ t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams)
-+{
-+ t_FmPcdCcNode *p_HashTbl = (t_FmPcdCcNode *)h_HashTbl;
-+ t_Handle h_HashBucket;
-+ uint8_t bucketIndex;
-+ uint16_t lastIndex;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_HashTbl, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Key, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcdCcNextEngineParams, E_NULL_POINTER);
-+
-+ err = FM_PCD_MatchTableGetIndexedHashBucket(p_HashTbl,
-+ keySize,
-+ p_Key,
-+ p_HashTbl->userOffset,
-+ &h_HashBucket,
-+ &bucketIndex,
-+ &lastIndex);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ return FM_PCD_MatchTableFindNModifyNextEngine(h_HashBucket,
-+ keySize,
-+ p_Key,
-+ NULL,
-+ p_FmPcdCcNextEngineParams);
-+}
-+
-+t_Error FM_PCD_HashTableModifyMissNextEngine(t_Handle h_HashTbl,
-+ t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams)
-+{
-+ t_FmPcdCcNode *p_HashTbl = (t_FmPcdCcNode *)h_HashTbl;
-+ t_Handle h_HashBucket;
-+ uint8_t i;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(h_HashTbl, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcdCcNextEngineParams, E_NULL_POINTER);
-+
-+ for (i = 0; i < p_HashTbl->numOfKeys; i++)
-+ {
-+ h_HashBucket = p_HashTbl->keyAndNextEngineParams[i].nextEngineParams.params.ccParams.h_CcNode;
-+
-+ err = FM_PCD_MatchTableModifyMissNextEngine(h_HashBucket,
-+ p_FmPcdCcNextEngineParams);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+
-+ return E_OK;
-+}
-+
-+
-+t_Error FM_PCD_HashTableGetMissNextEngine(t_Handle h_HashTbl,
-+ t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams)
-+{
-+ t_FmPcdCcNode *p_HashTbl = (t_FmPcdCcNode *)h_HashTbl;
-+ t_FmPcdCcNode *p_HashBucket;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_HashTbl, E_INVALID_HANDLE);
-+
-+ /* Miss next engine of each bucket was initialized with the next engine of the hash table */
-+ p_HashBucket = p_HashTbl->keyAndNextEngineParams[0].nextEngineParams.params.ccParams.h_CcNode;
-+
-+ memcpy(p_FmPcdCcNextEngineParams,
-+ &p_HashBucket->keyAndNextEngineParams[p_HashBucket->numOfKeys].nextEngineParams,
-+ sizeof(t_FmPcdCcNextEngineParams));
-+
-+ return E_OK;
-+}
-+
-+t_Error FM_PCD_HashTableFindNGetKeyStatistics(t_Handle h_HashTbl,
-+ uint8_t keySize,
-+ uint8_t *p_Key,
-+ t_FmPcdCcKeyStatistics *p_KeyStatistics)
-+{
-+ t_FmPcdCcNode *p_HashTbl = (t_FmPcdCcNode *)h_HashTbl;
-+ t_Handle h_HashBucket;
-+ uint8_t bucketIndex;
-+ uint16_t lastIndex;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_HashTbl, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Key, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_KeyStatistics, E_NULL_POINTER);
-+
-+ err = FM_PCD_MatchTableGetIndexedHashBucket(p_HashTbl,
-+ keySize,
-+ p_Key,
-+ p_HashTbl->userOffset,
-+ &h_HashBucket,
-+ &bucketIndex,
-+ &lastIndex);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ return FM_PCD_MatchTableFindNGetKeyStatistics(h_HashBucket,
-+ keySize,
-+ p_Key,
-+ NULL,
-+ p_KeyStatistics);
-+}
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/fm_cc.h b/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/fm_cc.h
-new file mode 100644
-index 0000000..9efe721
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/fm_cc.h
-@@ -0,0 +1,390 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+/******************************************************************************
-+ @File fm_cc.h
-+
-+ @Description FM PCD CC ...
-+*//***************************************************************************/
-+#ifndef __FM_CC_H
-+#define __FM_CC_H
-+
-+#include "std_ext.h"
-+#include "error_ext.h"
-+#include "list_ext.h"
-+
-+#include "fm_pcd.h"
-+
-+
-+/***********************************************************************/
-+/* Coarse classification defines */
-+/***********************************************************************/
-+
-+#define CC_MAX_NUM_OF_KEYS MAX(FM_PCD_MAX_NUM_OF_KEYS + 1, FM_PCD_MAX_NUM_OF_FLOWS)
-+
-+#define CC_PC_FF_MACDST 0x00
-+#define CC_PC_FF_MACSRC 0x01
-+#define CC_PC_FF_ETYPE 0x02
-+
-+#define CC_PC_FF_TCI1 0x03
-+#define CC_PC_FF_TCI2 0x04
-+
-+#define CC_PC_FF_MPLS1 0x06
-+#define CC_PC_FF_MPLS_LAST 0x07
-+
-+#define CC_PC_FF_IPV4DST1 0x08
-+#define CC_PC_FF_IPV4DST2 0x16
-+#define CC_PC_FF_IPV4IPTOS_TC1 0x09
-+#define CC_PC_FF_IPV4IPTOS_TC2 0x17
-+#define CC_PC_FF_IPV4PTYPE1 0x0A
-+#define CC_PC_FF_IPV4PTYPE2 0x18
-+#define CC_PC_FF_IPV4SRC1 0x0b
-+#define CC_PC_FF_IPV4SRC2 0x19
-+#define CC_PC_FF_IPV4SRC1_IPV4DST1 0x0c
-+#define CC_PC_FF_IPV4SRC2_IPV4DST2 0x1a
-+#define CC_PC_FF_IPV4TTL 0x29
-+
-+
-+#define CC_PC_FF_IPTOS_IPV6TC1_IPV6FLOW1 0x0d /*TODO - CLASS - what is it? TOS*/
-+#define CC_PC_FF_IPTOS_IPV6TC2_IPV6FLOW2 0x1b
-+#define CC_PC_FF_IPV6PTYPE1 0x0e
-+#define CC_PC_FF_IPV6PTYPE2 0x1c
-+#define CC_PC_FF_IPV6DST1 0x0f
-+#define CC_PC_FF_IPV6DST2 0x1d
-+#define CC_PC_FF_IPV6SRC1 0x10
-+#define CC_PC_FF_IPV6SRC2 0x1e
-+#define CC_PC_FF_IPV6HOP_LIMIT 0x2a
-+#define CC_PC_FF_IPPID 0x24
-+#define CC_PC_FF_IPDSCP 0x76
-+
-+#define CC_PC_FF_GREPTYPE 0x11
-+
-+#define CC_PC_FF_MINENCAP_PTYPE 0x12
-+#define CC_PC_FF_MINENCAP_IPDST 0x13
-+#define CC_PC_FF_MINENCAP_IPSRC 0x14
-+#define CC_PC_FF_MINENCAP_IPSRC_IPDST 0x15
-+
-+#define CC_PC_FF_L4PSRC 0x1f
-+#define CC_PC_FF_L4PDST 0x20
-+#define CC_PC_FF_L4PSRC_L4PDST 0x21
-+
-+#define CC_PC_FF_PPPPID 0x05
-+
-+#define CC_PC_PR_SHIM1 0x22
-+#define CC_PC_PR_SHIM2 0x23
-+
-+#define CC_PC_GENERIC_WITHOUT_MASK 0x27
-+#define CC_PC_GENERIC_WITH_MASK 0x28
-+#define CC_PC_GENERIC_IC_GMASK 0x2B
-+#define CC_PC_GENERIC_IC_HASH_INDEXED 0x2C
-+
-+#define CC_PR_OFFSET 0x25
-+#define CC_PR_WITHOUT_OFFSET 0x26
-+
-+#define CC_PC_PR_ETH_OFFSET 19
-+#define CC_PC_PR_USER_DEFINED_SHIM1_OFFSET 16
-+#define CC_PC_PR_USER_DEFINED_SHIM2_OFFSET 17
-+#define CC_PC_PR_USER_LLC_SNAP_OFFSET 20
-+#define CC_PC_PR_VLAN1_OFFSET 21
-+#define CC_PC_PR_VLAN2_OFFSET 22
-+#define CC_PC_PR_PPPOE_OFFSET 24
-+#define CC_PC_PR_MPLS1_OFFSET 25
-+#define CC_PC_PR_MPLS_LAST_OFFSET 26
-+#define CC_PC_PR_IP1_OFFSET 27
-+#define CC_PC_PR_IP_LAST_OFFSET 28
-+#define CC_PC_PR_MINENC_OFFSET 28
-+#define CC_PC_PR_L4_OFFSET 30
-+#define CC_PC_PR_GRE_OFFSET 29
-+#define CC_PC_PR_ETYPE_LAST_OFFSET 23
-+#define CC_PC_PR_NEXT_HEADER_OFFSET 31
-+
-+#define CC_PC_ILLEGAL 0xff
-+#define CC_SIZE_ILLEGAL 0
-+
-+#define FM_PCD_CC_KEYS_MATCH_TABLE_ALIGN 16
-+#define FM_PCD_CC_AD_TABLE_ALIGN 16
-+#define FM_PCD_CC_AD_ENTRY_SIZE 16
-+#define FM_PCD_CC_NUM_OF_KEYS 255
-+#define FM_PCD_CC_TREE_ADDR_ALIGN 256
-+
-+#define FM_PCD_AD_RESULT_CONTRL_FLOW_TYPE 0x00000000
-+#define FM_PCD_AD_RESULT_DATA_FLOW_TYPE 0x80000000
-+#define FM_PCD_AD_RESULT_PLCR_DIS 0x20000000
-+#define FM_PCD_AD_RESULT_EXTENDED_MODE 0x80000000
-+#define FM_PCD_AD_RESULT_NADEN 0x20000000
-+#define FM_PCD_AD_RESULT_STATISTICS_EN 0x40000000
-+
-+#define FM_PCD_AD_CONT_LOOKUP_TYPE 0x40000000
-+#define FM_PCD_AD_CONT_LOOKUP_LCL_MASK 0x00800000
-+
-+#define FM_PCD_AD_STATS_TYPE 0x40000000
-+#define FM_PCD_AD_STATS_FLR_ADDR_MASK 0x00FFFFFF
-+#define FM_PCD_AD_STATS_COUNTERS_ADDR_MASK 0x00FFFFFF
-+#define FM_PCD_AD_STATS_NEXT_ACTION_MASK 0xFFFF0000
-+#define FM_PCD_AD_STATS_NEXT_ACTION_SHIFT 12
-+#define FM_PCD_AD_STATS_NAD_EN 0x00008000
-+#define FM_PCD_AD_STATS_OP_CODE 0x00000036
-+#define FM_PCD_AD_STATS_FLR_EN 0x00004000
-+#define FM_PCD_AD_STATS_COND_EN 0x00002000
-+
-+
-+
-+#define FM_PCD_AD_BYPASS_TYPE 0xc0000000
-+
-+#define FM_PCD_AD_TYPE_MASK 0xc0000000
-+#define FM_PCD_AD_OPCODE_MASK 0x0000000f
-+
-+#define FM_PCD_AD_PROFILEID_FOR_CNTRL_SHIFT 16
-+#if (DPAA_VERSION >= 11)
-+#define FM_PCD_AD_RESULT_VSP_SHIFT 24
-+#define FM_PCD_AD_RESULT_NO_OM_VSPE 0x02000000
-+#define FM_PCD_AD_RESULT_VSP_MASK 0x3f
-+#define FM_PCD_AD_NCSPFQIDM_MASK 0x80000000
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+#define GLBL_MASK_FOR_HASH_INDEXED 0xfff00000
-+#define CC_GLBL_MASK_SIZE 4
-+
-+typedef uint32_t ccPrivateInfo_t; /**< private info of CC: */
-+
-+#define CC_PRIVATE_INFO_NONE 0
-+#define CC_PRIVATE_INFO_IC_HASH_INDEX_LOOKUP 0x80000000
-+#define CC_PRIVATE_INFO_IC_HASH_EXACT_MATCH 0x40000000
-+#define CC_PRIVATE_INFO_IC_KEY_EXACT_MATCH 0x20000000
-+#define CC_PRIVATE_INFO_IC_DEQ_FQID_INDEX_LOOKUP 0x10000000
-+
-+/***********************************************************************/
-+/* Memory map */
-+/***********************************************************************/
-+#if defined(__MWERKS__) && !defined(__GNUC__)
-+#pragma pack(push,1)
-+#endif /* defined(__MWERKS__) && ... */
-+
-+typedef _Packed struct
-+{
-+ volatile uint32_t fqid;
-+ volatile uint32_t plcrProfile;
-+ volatile uint32_t nia;
-+ volatile uint32_t res;
-+} _PackedType t_AdOfTypeResult;
-+
-+typedef _Packed struct
-+{
-+ volatile uint32_t ccAdBase;
-+ volatile uint32_t matchTblPtr;
-+ volatile uint32_t pcAndOffsets;
-+ volatile uint32_t gmask;
-+} _PackedType t_AdOfTypeContLookup;
-+
-+typedef _Packed struct
-+{
-+ volatile uint32_t profileTableAddr;
-+ volatile uint32_t reserved;
-+ volatile uint32_t nextActionIndx;
-+ volatile uint32_t statsTableAddr;
-+} _PackedType t_AdOfTypeStats;
-+
-+typedef _Packed union
-+{
-+ volatile t_AdOfTypeResult adResult;
-+ volatile t_AdOfTypeContLookup adContLookup;
-+} _PackedType t_Ad;
-+
-+#if defined(__MWERKS__) && !defined(__GNUC__)
-+#pragma pack(pop)
-+#endif /* defined(__MWERKS__) && ... */
-+
-+
-+/***********************************************************************/
-+/* Driver's internal structures */
-+/***********************************************************************/
-+
-+typedef enum e_ModifyState
-+{
-+ e_MODIFY_STATE_ADD = 0,
-+ e_MODIFY_STATE_REMOVE,
-+ e_MODIFY_STATE_CHANGE
-+} e_ModifyState;
-+
-+typedef struct t_FmPcdStatsObj
-+{
-+ t_Handle h_StatsAd;
-+ t_Handle h_StatsCounters;
-+ t_List node;
-+} t_FmPcdStatsObj;
-+
-+typedef struct
-+{
-+ uint8_t key[FM_PCD_MAX_SIZE_OF_KEY];
-+ uint8_t mask[FM_PCD_MAX_SIZE_OF_KEY];
-+
-+ t_FmPcdCcNextEngineParams nextEngineParams;
-+ uint32_t requiredAction;
-+ uint32_t shadowAction;
-+
-+ t_FmPcdStatsObj *p_StatsObj;
-+
-+} t_FmPcdCcKeyAndNextEngineParams;
-+
-+typedef struct
-+{
-+ t_Handle p_Ad;
-+ e_FmPcdEngine fmPcdEngine;
-+ bool adAllocated;
-+ bool isTree;
-+
-+ uint32_t myInfo;
-+ t_List *h_CcNextNodesLst;
-+ t_Handle h_AdditionalInfo;
-+ t_Handle h_Node;
-+} t_FmPcdModifyCcAdditionalParams;
-+
-+typedef struct
-+{
-+ t_Handle p_AdTableNew;
-+ t_Handle p_KeysMatchTableNew;
-+ t_Handle p_AdTableOld;
-+ t_Handle p_KeysMatchTableOld;
-+ uint16_t numOfKeys;
-+ t_Handle h_CurrentNode;
-+ uint16_t savedKeyIndex;
-+ t_Handle h_NodeForAdd;
-+ t_Handle h_NodeForRmv;
-+ t_Handle h_ManipForRmv;
-+ t_Handle h_ManipForAdd;
-+ t_FmPcdStatsObj *p_StatsObjForRmv;
-+#if (DPAA_VERSION >= 11)
-+ t_Handle h_FrmReplicForAdd;
-+ t_Handle h_FrmReplicForRmv;
-+#endif /* (DPAA_VERSION >= 11) */
-+ bool tree;
-+
-+ t_FmPcdCcKeyAndNextEngineParams keyAndNextEngineParams[CC_MAX_NUM_OF_KEYS];
-+} t_FmPcdModifyCcKeyAdditionalParams;
-+
-+typedef struct
-+{
-+ t_Handle h_Manip;
-+ t_Handle h_CcNode;
-+} t_CcNextEngineInfo;
-+
-+typedef struct
-+{
-+ uint16_t numOfKeys;
-+ uint16_t maxNumOfKeys;
-+
-+ bool maskSupport;
-+ uint32_t keysMatchTableMaxSize;
-+
-+ e_FmPcdCcStatsMode statisticsMode;
-+ uint32_t numOfStatsFLRs;
-+ uint32_t countersArraySize;
-+
-+ bool glblMaskUpdated;
-+ t_Handle p_GlblMask;
-+ bool lclMask;
-+ uint8_t parseCode;
-+ uint8_t offset;
-+ uint8_t prsArrayOffset;
-+ bool ctrlFlow;
-+ uint8_t owners;
-+
-+ uint8_t ccKeySizeAccExtraction;
-+ uint8_t sizeOfExtraction;
-+ uint8_t glblMaskSize;
-+
-+ t_Handle h_KeysMatchTable;
-+ t_Handle h_AdTable;
-+ t_Handle h_StatsAds;
-+ t_Handle h_Ad;
-+ t_Handle h_StatsFLRs;
-+
-+ t_List availableStatsLst;
-+
-+ t_List ccPrevNodesLst;
-+
-+ t_List ccTreeIdLst;
-+ t_List ccTreesLst;
-+
-+ t_Handle h_FmPcd;
-+ uint32_t shadowAction;
-+ uint8_t userSizeOfExtraction;
-+ uint8_t userOffset;
-+
-+ t_Handle h_Spinlock;
-+
-+ t_FmPcdCcKeyAndNextEngineParams keyAndNextEngineParams[CC_MAX_NUM_OF_KEYS];
-+} t_FmPcdCcNode;
-+
-+typedef struct
-+{
-+ t_FmPcdCcNode *p_FmPcdCcNode;
-+ bool occupied;
-+ uint8_t owners;
-+ volatile bool lock;
-+} t_FmPcdCcNodeArray;
-+
-+typedef struct
-+{
-+ uint8_t numOfEntriesInGroup;
-+ uint32_t totalBitsMask;
-+ uint8_t baseGroupEntry;
-+} t_FmPcdCcGroupParam;
-+
-+typedef struct
-+{
-+ t_Handle h_FmPcd;
-+ uint8_t netEnvId;
-+ uintptr_t ccTreeBaseAddr;
-+ uint8_t numOfGrps;
-+ t_FmPcdCcGroupParam fmPcdGroupParam[FM_PCD_MAX_NUM_OF_CC_GROUPS];
-+ t_List fmPortsLst;
-+ t_FmPcdLock *p_Lock;
-+ uint8_t numOfEntries;
-+ uint8_t owners;
-+ t_Handle h_FmPcdCcSavedManipParams;
-+ bool modifiedState;
-+ uint32_t requiredAction;
-+ t_Handle h_IpReassemblyManip;
-+
-+ t_FmPcdCcKeyAndNextEngineParams keyAndNextEngineParams[FM_PCD_MAX_NUM_OF_CC_GROUPS];
-+} t_FmPcdCcTree;
-+
-+
-+bool FmPcdManipIsManipNode(t_Handle h_Ad);
-+t_Error FmPcdCcNodeTreeTryLock(t_Handle h_FmPcd,t_Handle h_FmPcdCcNode, t_List *p_List);
-+void FmPcdCcNodeTreeReleaseLock(t_Handle h_FmPcd, t_List *p_List);
-+t_Error FmPcdUpdateCcShadow (t_FmPcd *p_FmPcd, uint32_t size, uint32_t align);
-+
-+
-+#endif /* __FM_CC_H */
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/fm_kg.c b/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/fm_kg.c
-new file mode 100644
-index 0000000..bdbc8ae
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/fm_kg.c
-@@ -0,0 +1,3263 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+/******************************************************************************
-+ @File fm_kg.c
-+
-+ @Description FM PCD ...
-+*//***************************************************************************/
-+#include "std_ext.h"
-+#include "error_ext.h"
-+#include "string_ext.h"
-+#include "debug_ext.h"
-+#include "net_ext.h"
-+#include "fm_port_ext.h"
-+
-+#include "fm_common.h"
-+#include "fm_pcd.h"
-+#include "fm_hc.h"
-+#include "fm_pcd_ipc.h"
-+#include "fm_kg.h"
-+#include "fsl_fman_kg.h"
-+
-+
-+/****************************************/
-+/* static functions */
-+/****************************************/
-+
-+static uint32_t KgHwLock(t_Handle h_FmPcdKg)
-+{
-+ ASSERT_COND(h_FmPcdKg);
-+ return XX_LockIntrSpinlock(((t_FmPcdKg *)h_FmPcdKg)->h_HwSpinlock);
-+}
-+
-+static void KgHwUnlock(t_Handle h_FmPcdKg, uint32_t intFlags)
-+{
-+ ASSERT_COND(h_FmPcdKg);
-+ XX_UnlockIntrSpinlock(((t_FmPcdKg *)h_FmPcdKg)->h_HwSpinlock, intFlags);
-+}
-+
-+static uint32_t KgSchemeLock(t_Handle h_Scheme)
-+{
-+ ASSERT_COND(h_Scheme);
-+ return FmPcdLockSpinlock(((t_FmPcdKgScheme *)h_Scheme)->p_Lock);
-+}
-+
-+static void KgSchemeUnlock(t_Handle h_Scheme, uint32_t intFlags)
-+{
-+ ASSERT_COND(h_Scheme);
-+ FmPcdUnlockSpinlock(((t_FmPcdKgScheme *)h_Scheme)->p_Lock, intFlags);
-+}
-+
-+static bool KgSchemeFlagTryLock(t_Handle h_Scheme)
-+{
-+ ASSERT_COND(h_Scheme);
-+ return FmPcdLockTryLock(((t_FmPcdKgScheme *)h_Scheme)->p_Lock);
-+}
-+
-+static void KgSchemeFlagUnlock(t_Handle h_Scheme)
-+{
-+ ASSERT_COND(h_Scheme);
-+ FmPcdLockUnlock(((t_FmPcdKgScheme *)h_Scheme)->p_Lock);
-+}
-+
-+static t_Error WriteKgarWait(t_FmPcd *p_FmPcd, uint32_t fmkg_ar)
-+{
-+
-+ struct fman_kg_regs *regs = p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs;
-+
-+ if (fman_kg_write_ar_wait(regs, fmkg_ar))
-+ RETURN_ERROR(MINOR, E_INVALID_STATE, ("Keygen scheme access violation"));
-+
-+ return E_OK;
-+}
-+
-+static e_FmPcdKgExtractDfltSelect GetGenericSwDefault(t_FmPcdKgExtractDflt swDefaults[], uint8_t numOfSwDefaults, uint8_t code)
-+{
-+ int i;
-+
-+ switch (code)
-+ {
-+ case (KG_SCH_GEN_PARSE_RESULT_N_FQID):
-+ case (KG_SCH_GEN_DEFAULT):
-+ case (KG_SCH_GEN_NEXTHDR):
-+ for (i=0 ; ifmRevInfo.majorRev < 6)
-+ return KG_SCH_KN_PTYPE2;
-+#endif /* FM_KG_NO_IPPID_SUPPORT */
-+ return KG_SCH_KN_IPPID;
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal IPv6 index"));
-+ return 0;
-+ case (NET_HEADER_FIELD_IPv6_VER | NET_HEADER_FIELD_IPv6_FL | NET_HEADER_FIELD_IPv6_TC):
-+ if ((index == e_FM_PCD_HDR_INDEX_NONE) || (index == e_FM_PCD_HDR_INDEX_1))
-+ return (KG_SCH_KN_IPV6FL1 | KG_SCH_KN_IPTOS_TC1);
-+ if ((index == e_FM_PCD_HDR_INDEX_2) || (index == e_FM_PCD_HDR_INDEX_LAST))
-+ return (KG_SCH_KN_IPV6FL2 | KG_SCH_KN_IPTOS_TC2);
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal IPv6 index"));
-+ return 0;
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return 0;
-+ }
-+ case (HEADER_TYPE_GRE):
-+ switch (field.gre)
-+ {
-+ case (NET_HEADER_FIELD_GRE_TYPE):
-+ return KG_SCH_KN_GREPTYPE;
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return 0;
-+ }
-+ case (HEADER_TYPE_MINENCAP):
-+ switch (field.minencap)
-+ {
-+ case (NET_HEADER_FIELD_MINENCAP_SRC_IP):
-+ return KG_SCH_KN_IPSRC2;
-+ case (NET_HEADER_FIELD_MINENCAP_DST_IP):
-+ return KG_SCH_KN_IPDST2;
-+ case (NET_HEADER_FIELD_MINENCAP_TYPE):
-+ return KG_SCH_KN_PTYPE2;
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return 0;
-+ }
-+ case (HEADER_TYPE_TCP):
-+ switch (field.tcp)
-+ {
-+ case (NET_HEADER_FIELD_TCP_PORT_SRC):
-+ return KG_SCH_KN_L4PSRC;
-+ case (NET_HEADER_FIELD_TCP_PORT_DST):
-+ return KG_SCH_KN_L4PDST;
-+ case (NET_HEADER_FIELD_TCP_FLAGS):
-+ return KG_SCH_KN_TFLG;
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return 0;
-+ }
-+ case (HEADER_TYPE_UDP):
-+ switch (field.udp)
-+ {
-+ case (NET_HEADER_FIELD_UDP_PORT_SRC):
-+ return KG_SCH_KN_L4PSRC;
-+ case (NET_HEADER_FIELD_UDP_PORT_DST):
-+ return KG_SCH_KN_L4PDST;
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return 0;
-+ }
-+ case (HEADER_TYPE_IPSEC_AH):
-+ switch (field.ipsecAh)
-+ {
-+ case (NET_HEADER_FIELD_IPSEC_AH_SPI):
-+ return KG_SCH_KN_IPSEC_SPI;
-+ case (NET_HEADER_FIELD_IPSEC_AH_NH):
-+ return KG_SCH_KN_IPSEC_NH;
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return 0;
-+ }
-+ case (HEADER_TYPE_IPSEC_ESP):
-+ switch (field.ipsecEsp)
-+ {
-+ case (NET_HEADER_FIELD_IPSEC_ESP_SPI):
-+ return KG_SCH_KN_IPSEC_SPI;
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return 0;
-+ }
-+ case (HEADER_TYPE_SCTP):
-+ switch (field.sctp)
-+ {
-+ case (NET_HEADER_FIELD_SCTP_PORT_SRC):
-+ return KG_SCH_KN_L4PSRC;
-+ case (NET_HEADER_FIELD_SCTP_PORT_DST):
-+ return KG_SCH_KN_L4PDST;
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return 0;
-+ }
-+ case (HEADER_TYPE_DCCP):
-+ switch (field.dccp)
-+ {
-+ case (NET_HEADER_FIELD_DCCP_PORT_SRC):
-+ return KG_SCH_KN_L4PSRC;
-+ case (NET_HEADER_FIELD_DCCP_PORT_DST):
-+ return KG_SCH_KN_L4PDST;
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return 0;
-+ }
-+ case (HEADER_TYPE_PPPoE):
-+ switch (field.pppoe)
-+ {
-+ case (NET_HEADER_FIELD_PPPoE_PID):
-+ return KG_SCH_KN_PPPID;
-+ case (NET_HEADER_FIELD_PPPoE_SID):
-+ return KG_SCH_KN_PPPSID;
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return 0;
-+ }
-+ default:
-+ REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("Extraction not supported"));
-+ return 0;
-+ }
-+}
-+
-+
-+static uint8_t GetKnownFieldId(uint32_t bitMask)
-+{
-+ uint8_t cnt = 0;
-+
-+ while (bitMask)
-+ if (bitMask & 0x80000000)
-+ break;
-+ else
-+ {
-+ cnt++;
-+ bitMask <<= 1;
-+ }
-+ return cnt;
-+
-+}
-+
-+static uint8_t GetExtractedOrMask(uint8_t bitOffset, bool fqid)
-+{
-+ uint8_t i, mask, numOfOnesToClear, walking1Mask = 1;
-+
-+ /* bitOffset 1-7 --> mask 0x1-0x7F */
-+ if (bitOffset<8)
-+ {
-+ mask = 0;
-+ for (i = 0 ; i < bitOffset ; i++, walking1Mask <<= 1)
-+ mask |= walking1Mask;
-+ }
-+ else
-+ {
-+ mask = 0xFF;
-+ numOfOnesToClear = 0;
-+ if (fqid && bitOffset>24)
-+ /* bitOffset 25-31 --> mask 0xFE-0x80 */
-+ numOfOnesToClear = (uint8_t)(bitOffset-24);
-+ else
-+ /* bitOffset 9-15 --> mask 0xFE-0x80 */
-+ if (!fqid && bitOffset>8)
-+ numOfOnesToClear = (uint8_t)(bitOffset-8);
-+ for (i = 0 ; i < numOfOnesToClear ; i++, walking1Mask <<= 1)
-+ mask &= ~walking1Mask;
-+ /* bitOffset 8-24 for FQID, 8 for PP --> no mask (0xFF)*/
-+ }
-+ return mask;
-+}
-+
-+static void IncSchemeOwners(t_FmPcd *p_FmPcd, t_FmPcdKgInterModuleBindPortToSchemes *p_BindPort)
-+{
-+ t_FmPcdKg *p_FmPcdKg;
-+ t_FmPcdKgScheme *p_Scheme;
-+ uint32_t intFlags;
-+ uint8_t relativeSchemeId;
-+ int i;
-+
-+ p_FmPcdKg = p_FmPcd->p_FmPcdKg;
-+
-+ /* for each scheme - update owners counters */
-+ for (i = 0; i < p_BindPort->numOfSchemes; i++)
-+ {
-+ relativeSchemeId = FmPcdKgGetRelativeSchemeId(p_FmPcd, p_BindPort->schemesIds[i]);
-+ ASSERT_COND(relativeSchemeId < FM_PCD_KG_NUM_OF_SCHEMES);
-+
-+ p_Scheme = &p_FmPcdKg->schemes[relativeSchemeId];
-+
-+ /* increment owners number */
-+ intFlags = KgSchemeLock(p_Scheme);
-+ p_Scheme->owners++;
-+ KgSchemeUnlock(p_Scheme, intFlags);
-+ }
-+}
-+
-+static void DecSchemeOwners(t_FmPcd *p_FmPcd, t_FmPcdKgInterModuleBindPortToSchemes *p_BindPort)
-+{
-+ t_FmPcdKg *p_FmPcdKg;
-+ t_FmPcdKgScheme *p_Scheme;
-+ uint32_t intFlags;
-+ uint8_t relativeSchemeId;
-+ int i;
-+
-+ p_FmPcdKg = p_FmPcd->p_FmPcdKg;
-+
-+ /* for each scheme - update owners counters */
-+ for (i = 0; i < p_BindPort->numOfSchemes; i++)
-+ {
-+ relativeSchemeId = FmPcdKgGetRelativeSchemeId(p_FmPcd, p_BindPort->schemesIds[i]);
-+ ASSERT_COND(relativeSchemeId < FM_PCD_KG_NUM_OF_SCHEMES);
-+
-+ p_Scheme = &p_FmPcdKg->schemes[relativeSchemeId];
-+
-+ /* increment owners number */
-+ ASSERT_COND(p_Scheme->owners);
-+ intFlags = KgSchemeLock(p_Scheme);
-+ p_Scheme->owners--;
-+ KgSchemeUnlock(p_Scheme, intFlags);
-+ }
-+}
-+
-+static void UpateSchemePointedOwner(t_FmPcdKgScheme *p_Scheme, bool add)
-+{
-+ /* this routine is locked by the calling routine */
-+ ASSERT_COND(p_Scheme);
-+ ASSERT_COND(p_Scheme->valid);
-+
-+ if (add)
-+ p_Scheme->pointedOwners++;
-+ else
-+ p_Scheme->pointedOwners--;
-+}
-+
-+static t_Error KgWriteSp(t_FmPcd *p_FmPcd, uint8_t hardwarePortId, uint32_t spReg, bool add)
-+{
-+ struct fman_kg_regs *p_KgRegs;
-+
-+ uint32_t tmpKgarReg = 0, intFlags;
-+ t_Error err = E_OK;
-+
-+ /* The calling routine had locked the port, so for each port only one core can access
-+ * (so we don't need a lock here) */
-+
-+ if (p_FmPcd->h_Hc)
-+ return FmHcKgWriteSp(p_FmPcd->h_Hc, hardwarePortId, spReg, add);
-+
-+ p_KgRegs = p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs;
-+
-+ tmpKgarReg = FmPcdKgBuildReadPortSchemeBindActionReg(hardwarePortId);
-+ /* lock a common KG reg */
-+ intFlags = KgHwLock(p_FmPcd->p_FmPcdKg);
-+ err = WriteKgarWait(p_FmPcd, tmpKgarReg);
-+ if (err)
-+ {
-+ KgHwUnlock(p_FmPcd->p_FmPcdKg, intFlags);
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+ }
-+
-+ fman_kg_write_sp(p_KgRegs, spReg, add);
-+
-+ tmpKgarReg = FmPcdKgBuildWritePortSchemeBindActionReg(hardwarePortId);
-+
-+ err = WriteKgarWait(p_FmPcd, tmpKgarReg);
-+ KgHwUnlock(p_FmPcd->p_FmPcdKg, intFlags);
-+ return err;
-+}
-+
-+static t_Error KgWriteCpp(t_FmPcd *p_FmPcd, uint8_t hardwarePortId, uint32_t cppReg)
-+{
-+ struct fman_kg_regs *p_KgRegs;
-+ uint32_t tmpKgarReg, intFlags;
-+ t_Error err;
-+
-+ p_KgRegs = p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs;
-+
-+ if (p_FmPcd->h_Hc)
-+ {
-+ err = FmHcKgWriteCpp(p_FmPcd->h_Hc, hardwarePortId, cppReg);
-+ return err;
-+ }
-+
-+ intFlags = KgHwLock(p_FmPcd->p_FmPcdKg);
-+ fman_kg_write_cpp(p_KgRegs, cppReg);
-+ tmpKgarReg = FmPcdKgBuildWritePortClsPlanBindActionReg(hardwarePortId);
-+ err = WriteKgarWait(p_FmPcd, tmpKgarReg);
-+ KgHwUnlock(p_FmPcd->p_FmPcdKg, intFlags);
-+
-+ return err;
-+}
-+
-+static uint32_t BuildCppReg(t_FmPcd *p_FmPcd, uint8_t clsPlanGrpId)
-+{
-+ uint32_t tmpKgpeCpp;
-+
-+ tmpKgpeCpp = (uint32_t)(p_FmPcd->p_FmPcdKg->clsPlanGrps[clsPlanGrpId].baseEntry / 8);
-+ tmpKgpeCpp |= (uint32_t)(((p_FmPcd->p_FmPcdKg->clsPlanGrps[clsPlanGrpId].sizeOfGrp / 8) - 1) << FM_KG_PE_CPP_MASK_SHIFT);
-+
-+ return tmpKgpeCpp;
-+}
-+
-+static t_Error BindPortToClsPlanGrp(t_FmPcd *p_FmPcd, uint8_t hardwarePortId, uint8_t clsPlanGrpId)
-+{
-+ uint32_t tmpKgpeCpp = 0;
-+
-+ tmpKgpeCpp = BuildCppReg(p_FmPcd, clsPlanGrpId);
-+ return KgWriteCpp(p_FmPcd, hardwarePortId, tmpKgpeCpp);
-+}
-+
-+static void UnbindPortToClsPlanGrp(t_FmPcd *p_FmPcd, uint8_t hardwarePortId)
-+{
-+ KgWriteCpp(p_FmPcd, hardwarePortId, 0);
-+}
-+
-+static uint32_t ReadClsPlanBlockActionReg(uint8_t grpId)
-+{
-+ return (uint32_t)(FM_KG_KGAR_GO |
-+ FM_KG_KGAR_READ |
-+ FM_PCD_KG_KGAR_SEL_CLS_PLAN_ENTRY |
-+ DUMMY_PORT_ID |
-+ ((uint32_t)grpId << FM_PCD_KG_KGAR_NUM_SHIFT) |
-+ FM_PCD_KG_KGAR_WSEL_MASK);
-+
-+ /* if we ever want to write 1 by 1, use:
-+ sel = (uint8_t)(0x01 << (7- (entryId % CLS_PLAN_NUM_PER_GRP)));
-+ */
-+}
-+
-+static void PcdKgErrorException(t_Handle h_FmPcd)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
-+ uint32_t event,schemeIndexes = 0, index = 0;
-+ struct fman_kg_regs *p_KgRegs;
-+
-+ ASSERT_COND(FmIsMaster(p_FmPcd->h_Fm));
-+ p_KgRegs = p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs;
-+ fman_kg_get_event(p_KgRegs, &event, &schemeIndexes);
-+
-+ if (event & FM_EX_KG_DOUBLE_ECC)
-+ p_FmPcd->f_Exception(p_FmPcd->h_App,e_FM_PCD_KG_EXCEPTION_DOUBLE_ECC);
-+ if (event & FM_EX_KG_KEYSIZE_OVERFLOW)
-+ {
-+ if (schemeIndexes)
-+ {
-+ while (schemeIndexes)
-+ {
-+ if (schemeIndexes & 0x1)
-+ p_FmPcd->f_FmPcdIndexedException(p_FmPcd->h_App,e_FM_PCD_KG_EXCEPTION_KEYSIZE_OVERFLOW, (uint16_t)(31 - index));
-+ schemeIndexes >>= 1;
-+ index+=1;
-+ }
-+ }
-+ else /* this should happen only when interrupt is forced. */
-+ p_FmPcd->f_Exception(p_FmPcd->h_App,e_FM_PCD_KG_EXCEPTION_KEYSIZE_OVERFLOW);
-+ }
-+}
-+
-+static t_Error KgInitGuest(t_FmPcd *p_FmPcd)
-+{
-+ t_Error err = E_OK;
-+ t_FmPcdIpcKgSchemesParams kgAlloc;
-+ uint32_t replyLength;
-+ t_FmPcdIpcReply reply;
-+ t_FmPcdIpcMsg msg;
-+
-+ ASSERT_COND(p_FmPcd->guestId != NCSW_MASTER_ID);
-+
-+ /* in GUEST_PARTITION, we use the IPC */
-+ memset(&reply, 0, sizeof(reply));
-+ memset(&msg, 0, sizeof(msg));
-+ memset(&kgAlloc, 0, sizeof(t_FmPcdIpcKgSchemesParams));
-+ kgAlloc.numOfSchemes = p_FmPcd->p_FmPcdKg->numOfSchemes;
-+ kgAlloc.guestId = p_FmPcd->guestId;
-+ msg.msgId = FM_PCD_ALLOC_KG_SCHEMES;
-+ memcpy(msg.msgBody, &kgAlloc, sizeof(kgAlloc));
-+ replyLength = sizeof(uint32_t) + p_FmPcd->p_FmPcdKg->numOfSchemes*sizeof(uint8_t);
-+ if ((err = XX_IpcSendMessage(p_FmPcd->h_IpcSession,
-+ (uint8_t*)&msg,
-+ sizeof(msg.msgId) + sizeof(kgAlloc),
-+ (uint8_t*)&reply,
-+ &replyLength,
-+ NULL,
-+ NULL)) != E_OK)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ if (replyLength != (sizeof(uint32_t) + p_FmPcd->p_FmPcdKg->numOfSchemes*sizeof(uint8_t)))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("IPC reply length mismatch"));
-+ memcpy(p_FmPcd->p_FmPcdKg->schemesIds, (uint8_t*)(reply.replyBody),p_FmPcd->p_FmPcdKg->numOfSchemes*sizeof(uint8_t));
-+
-+ return (t_Error)reply.error;
-+}
-+
-+static t_Error KgInitMaster(t_FmPcd *p_FmPcd)
-+{
-+ t_Error err = E_OK;
-+ struct fman_kg_regs *p_Regs = p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs;
-+
-+ ASSERT_COND(p_FmPcd->guestId == NCSW_MASTER_ID);
-+
-+ if (p_FmPcd->exceptions & FM_EX_KG_DOUBLE_ECC)
-+ FmEnableRamsEcc(p_FmPcd->h_Fm);
-+
-+ fman_kg_init(p_Regs, p_FmPcd->exceptions, GET_NIA_BMI_AC_ENQ_FRAME(p_FmPcd));
-+
-+ /* register even if no interrupts enabled, to allow future enablement */
-+ FmRegisterIntr(p_FmPcd->h_Fm,
-+ e_FM_MOD_KG,
-+ 0,
-+ e_FM_INTR_TYPE_ERR,
-+ PcdKgErrorException,
-+ p_FmPcd);
-+
-+ fman_kg_enable_scheme_interrupts(p_Regs);
-+
-+ if (p_FmPcd->p_FmPcdKg->numOfSchemes)
-+ {
-+ err = FmPcdKgAllocSchemes(p_FmPcd,
-+ p_FmPcd->p_FmPcdKg->numOfSchemes,
-+ p_FmPcd->guestId,
-+ p_FmPcd->p_FmPcdKg->schemesIds);
-+ if (err)
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+ }
-+
-+ return E_OK;
-+}
-+
-+static void ValidateSchemeSw(t_FmPcdKgScheme *p_Scheme)
-+{
-+ ASSERT_COND(!p_Scheme->valid);
-+ if (p_Scheme->netEnvId != ILLEGAL_NETENV)
-+ FmPcdIncNetEnvOwners(p_Scheme->h_FmPcd, p_Scheme->netEnvId);
-+ p_Scheme->valid = TRUE;
-+}
-+
-+static t_Error InvalidateSchemeSw(t_FmPcdKgScheme *p_Scheme)
-+{
-+ if (p_Scheme->owners)
-+ RETURN_ERROR(MINOR, E_INVALID_STATE, ("Trying to delete a scheme that has ports bound to"));
-+
-+ if (p_Scheme->netEnvId != ILLEGAL_NETENV)
-+ FmPcdDecNetEnvOwners(p_Scheme->h_FmPcd, p_Scheme->netEnvId);
-+ p_Scheme->valid = FALSE;
-+
-+ return E_OK;
-+}
-+
-+static t_Error BuildSchemeRegs(t_FmPcdKgScheme *p_Scheme,
-+ t_FmPcdKgSchemeParams *p_SchemeParams,
-+ struct fman_kg_scheme_regs *p_SchemeRegs)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)(p_Scheme->h_FmPcd);
-+ uint32_t grpBits = 0;
-+ uint8_t grpBase;
-+ bool direct=TRUE, absolute=FALSE;
-+ uint16_t profileId=0, numOfProfiles=0, relativeProfileId;
-+ t_Error err = E_OK;
-+ int i = 0;
-+ t_NetEnvParams netEnvParams;
-+ uint32_t tmpReg, fqbTmp = 0, ppcTmp = 0, selectTmp, maskTmp, knownTmp, genTmp;
-+ t_FmPcdKgKeyExtractAndHashParams *p_KeyAndHash = NULL;
-+ uint8_t j, curr, idx;
-+ uint8_t id, shift=0, code=0, offset=0, size=0;
-+ t_FmPcdExtractEntry *p_Extract = NULL;
-+ t_FmPcdKgExtractedOrParams *p_ExtractOr;
-+ bool generic = FALSE;
-+ t_KnownFieldsMasks bitMask;
-+ e_FmPcdKgExtractDfltSelect swDefault = (e_FmPcdKgExtractDfltSelect)0;
-+ t_FmPcdKgSchemesExtracts *p_LocalExtractsArray;
-+ uint8_t numOfSwDefaults = 0;
-+ t_FmPcdKgExtractDflt swDefaults[NUM_OF_SW_DEFAULTS];
-+ uint8_t currGenId = 0;
-+
-+ memset(swDefaults, 0, NUM_OF_SW_DEFAULTS*sizeof(t_FmPcdKgExtractDflt));
-+ memset(p_SchemeRegs, 0, sizeof(struct fman_kg_scheme_regs));
-+
-+ if (p_SchemeParams->netEnvParams.numOfDistinctionUnits > FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE,
-+ ("numOfDistinctionUnits should not exceed %d", FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS));
-+
-+ /* by netEnv parameters, get match vector */
-+ if (!p_SchemeParams->alwaysDirect)
-+ {
-+ p_Scheme->netEnvId = FmPcdGetNetEnvId(p_SchemeParams->netEnvParams.h_NetEnv);
-+ netEnvParams.netEnvId = p_Scheme->netEnvId;
-+ netEnvParams.numOfDistinctionUnits = p_SchemeParams->netEnvParams.numOfDistinctionUnits;
-+ memcpy(netEnvParams.unitIds, p_SchemeParams->netEnvParams.unitIds, (sizeof(uint8_t))*p_SchemeParams->netEnvParams.numOfDistinctionUnits);
-+ err = PcdGetUnitsVector(p_FmPcd, &netEnvParams);
-+ if (err)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, NO_MSG);
-+ p_Scheme->matchVector = netEnvParams.vector;
-+ }
-+ else
-+ {
-+ p_Scheme->matchVector = SCHEME_ALWAYS_DIRECT;
-+ p_Scheme->netEnvId = ILLEGAL_NETENV;
-+ }
-+
-+ if (p_SchemeParams->nextEngine == e_FM_PCD_INVALID)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Next Engine of the scheme is not Valid"));
-+
-+ if (p_SchemeParams->bypassFqidGeneration)
-+ {
-+#ifdef FM_KG_NO_BYPASS_FQID_GEN
-+ if ((p_FmPcd->fmRevInfo.majorRev != 4) && (p_FmPcd->fmRevInfo.majorRev < 6))
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("bypassFqidGeneration."));
-+#endif /* FM_KG_NO_BYPASS_FQID_GEN */
-+ if (p_SchemeParams->baseFqid)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("baseFqid set for a scheme that does not generate an FQID"));
-+ }
-+ else
-+ if (!p_SchemeParams->baseFqid)
-+ DBG(WARNING, ("baseFqid is 0."));
-+
-+ if (p_SchemeParams->nextEngine == e_FM_PCD_PLCR)
-+ {
-+ direct = p_SchemeParams->kgNextEngineParams.plcrProfile.direct;
-+ p_Scheme->directPlcr = direct;
-+ absolute = (bool)(p_SchemeParams->kgNextEngineParams.plcrProfile.sharedProfile ? TRUE : FALSE);
-+ if (!direct && absolute)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Indirect policing is not available when profile is shared."));
-+
-+ if (direct)
-+ {
-+ profileId = p_SchemeParams->kgNextEngineParams.plcrProfile.profileSelect.directRelativeProfileId;
-+ numOfProfiles = 1;
-+ }
-+ else
-+ {
-+ profileId = p_SchemeParams->kgNextEngineParams.plcrProfile.profileSelect.indirectProfile.fqidOffsetRelativeProfileIdBase;
-+ shift = p_SchemeParams->kgNextEngineParams.plcrProfile.profileSelect.indirectProfile.fqidOffsetShift;
-+ numOfProfiles = p_SchemeParams->kgNextEngineParams.plcrProfile.profileSelect.indirectProfile.numOfProfiles;
-+ }
-+ }
-+
-+ if (p_SchemeParams->nextEngine == e_FM_PCD_CC)
-+ {
-+#ifdef FM_KG_NO_BYPASS_PLCR_PROFILE_GEN
-+ if ((p_SchemeParams->kgNextEngineParams.cc.plcrNext) && (p_SchemeParams->kgNextEngineParams.cc.bypassPlcrProfileGeneration))
-+ {
-+ if ((p_FmPcd->fmRevInfo.majorRev != 4) && (p_FmPcd->fmRevInfo.majorRev < 6))
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("bypassPlcrProfileGeneration."));
-+ }
-+#endif /* FM_KG_NO_BYPASS_PLCR_PROFILE_GEN */
-+
-+ err = FmPcdCcGetGrpParams(p_SchemeParams->kgNextEngineParams.cc.h_CcTree,
-+ p_SchemeParams->kgNextEngineParams.cc.grpId,
-+ &grpBits,
-+ &grpBase);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ p_Scheme->ccUnits = grpBits;
-+
-+ if ((p_SchemeParams->kgNextEngineParams.cc.plcrNext) &&
-+ (!p_SchemeParams->kgNextEngineParams.cc.bypassPlcrProfileGeneration))
-+ {
-+ if (p_SchemeParams->kgNextEngineParams.cc.plcrProfile.sharedProfile)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Shared profile may not be used after Coarse classification."));
-+ absolute = FALSE;
-+ direct = p_SchemeParams->kgNextEngineParams.cc.plcrProfile.direct;
-+ if (direct)
-+ {
-+ profileId = p_SchemeParams->kgNextEngineParams.cc.plcrProfile.profileSelect.directRelativeProfileId;
-+ numOfProfiles = 1;
-+ }
-+ else
-+ {
-+ profileId = p_SchemeParams->kgNextEngineParams.cc.plcrProfile.profileSelect.indirectProfile.fqidOffsetRelativeProfileIdBase;
-+ shift = p_SchemeParams->kgNextEngineParams.cc.plcrProfile.profileSelect.indirectProfile.fqidOffsetShift;
-+ numOfProfiles = p_SchemeParams->kgNextEngineParams.cc.plcrProfile.profileSelect.indirectProfile.numOfProfiles;
-+ }
-+ }
-+ }
-+
-+ /* if policer is used directly after KG, or after CC */
-+ if ((p_SchemeParams->nextEngine == e_FM_PCD_PLCR) ||
-+ ((p_SchemeParams->nextEngine == e_FM_PCD_CC) &&
-+ (p_SchemeParams->kgNextEngineParams.cc.plcrNext) &&
-+ (!p_SchemeParams->kgNextEngineParams.cc.bypassPlcrProfileGeneration)))
-+ {
-+ /* if private policer profile, it may be uninitialized yet, therefore no checks are done at this stage */
-+ if (absolute)
-+ {
-+ /* for absolute direct policy only, */
-+ relativeProfileId = profileId;
-+ err = FmPcdPlcrGetAbsoluteIdByProfileParams((t_Handle)p_FmPcd,e_FM_PCD_PLCR_SHARED,NULL, relativeProfileId, &profileId);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, ("Shared profile not valid offset"));
-+ if (!FmPcdPlcrIsProfileValid(p_FmPcd, profileId))
-+ RETURN_ERROR(MINOR, E_INVALID_STATE, ("Shared profile not valid."));
-+ p_Scheme->relativeProfileId = profileId;
-+ }
-+ else
-+ {
-+ /* save relative profile id's for later check */
-+ p_Scheme->nextRelativePlcrProfile = TRUE;
-+ p_Scheme->relativeProfileId = profileId;
-+ p_Scheme->numOfProfiles = numOfProfiles;
-+ }
-+ }
-+ else
-+ {
-+ /* if policer is NOT going to be used after KG at all than if bypassFqidGeneration
-+ is set, we do not need numOfUsedExtractedOrs and hashDistributionNumOfFqids */
-+ if (p_SchemeParams->bypassFqidGeneration && p_SchemeParams->numOfUsedExtractedOrs)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE,
-+ ("numOfUsedExtractedOrs is set in a scheme that does not generate FQID or policer profile ID"));
-+ if (p_SchemeParams->bypassFqidGeneration &&
-+ p_SchemeParams->useHash &&
-+ p_SchemeParams->keyExtractAndHashParams.hashDistributionNumOfFqids)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE,
-+ ("hashDistributionNumOfFqids is set in a scheme that does not generate FQID or policer profile ID"));
-+ }
-+
-+ /* configure all 21 scheme registers */
-+ tmpReg = KG_SCH_MODE_EN;
-+ switch (p_SchemeParams->nextEngine)
-+ {
-+ case (e_FM_PCD_PLCR):
-+ /* add to mode register - NIA */
-+ tmpReg |= KG_SCH_MODE_NIA_PLCR;
-+ tmpReg |= NIA_ENG_PLCR;
-+ tmpReg |= (uint32_t)(p_SchemeParams->kgNextEngineParams.plcrProfile.sharedProfile ? NIA_PLCR_ABSOLUTE:0);
-+ /* initialize policer profile command - */
-+ /* configure kgse_ppc */
-+ if (direct)
-+ /* use profileId as base, other fields are 0 */
-+ p_SchemeRegs->kgse_ppc = (uint32_t)profileId;
-+ else
-+ {
-+ if (shift > MAX_PP_SHIFT)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("fqidOffsetShift may not be larger than %d", MAX_PP_SHIFT));
-+
-+ if (!numOfProfiles || !POWER_OF_2(numOfProfiles))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("numOfProfiles must not be 0 and must be a power of 2"));
-+
-+ ppcTmp = ((uint32_t)shift << KG_SCH_PP_SHIFT_HIGH_SHIFT) & KG_SCH_PP_SHIFT_HIGH;
-+ ppcTmp |= ((uint32_t)shift << KG_SCH_PP_SHIFT_LOW_SHIFT) & KG_SCH_PP_SHIFT_LOW;
-+ ppcTmp |= ((uint32_t)(numOfProfiles-1) << KG_SCH_PP_MASK_SHIFT);
-+ ppcTmp |= (uint32_t)profileId;
-+
-+ p_SchemeRegs->kgse_ppc = ppcTmp;
-+ }
-+ break;
-+ case (e_FM_PCD_CC):
-+ /* mode reg - define NIA */
-+ tmpReg |= (NIA_ENG_FM_CTL | NIA_FM_CTL_AC_CC);
-+
-+ p_SchemeRegs->kgse_ccbs = grpBits;
-+ tmpReg |= (uint32_t)(grpBase << KG_SCH_MODE_CCOBASE_SHIFT);
-+
-+ if (p_SchemeParams->kgNextEngineParams.cc.plcrNext)
-+ {
-+ if (!p_SchemeParams->kgNextEngineParams.cc.bypassPlcrProfileGeneration)
-+ {
-+ /* find out if absolute or relative */
-+ if (absolute)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("It is illegal to request a shared profile in a scheme that is in a KG->CC->PLCR flow"));
-+ if (direct)
-+ {
-+ /* mask = 0, base = directProfileId */
-+ p_SchemeRegs->kgse_ppc = (uint32_t)profileId;
-+ }
-+ else
-+ {
-+ if (shift > MAX_PP_SHIFT)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("fqidOffsetShift may not be larger than %d", MAX_PP_SHIFT));
-+ if (!numOfProfiles || !POWER_OF_2(numOfProfiles))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("numOfProfiles must not be 0 and must be a power of 2"));
-+
-+ ppcTmp = ((uint32_t)shift << KG_SCH_PP_SHIFT_HIGH_SHIFT) & KG_SCH_PP_SHIFT_HIGH;
-+ ppcTmp |= ((uint32_t)shift << KG_SCH_PP_SHIFT_LOW_SHIFT) & KG_SCH_PP_SHIFT_LOW;
-+ ppcTmp |= ((uint32_t)(numOfProfiles-1) << KG_SCH_PP_MASK_SHIFT);
-+ ppcTmp |= (uint32_t)profileId;
-+
-+ p_SchemeRegs->kgse_ppc = ppcTmp;
-+ }
-+ }
-+ else
-+ ppcTmp = KG_SCH_PP_NO_GEN;
-+ }
-+ break;
-+ case (e_FM_PCD_DONE):
-+ if (p_SchemeParams->kgNextEngineParams.doneAction == e_FM_PCD_DROP_FRAME)
-+ tmpReg |= GET_NIA_BMI_AC_DISCARD_FRAME(p_FmPcd);
-+ else
-+ tmpReg |= GET_NIA_BMI_AC_ENQ_FRAME(p_FmPcd);
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("Next engine not supported"));
-+ }
-+ p_SchemeRegs->kgse_mode = tmpReg;
-+
-+ p_SchemeRegs->kgse_mv = p_Scheme->matchVector;
-+
-+#if (DPAA_VERSION >= 11)
-+ if (p_SchemeParams->overrideStorageProfile)
-+ {
-+ p_SchemeRegs->kgse_om |= KG_SCH_OM_VSPE;
-+
-+ tmpReg = 0;
-+ if (p_SchemeParams->storageProfile.direct)
-+ {
-+ profileId = p_SchemeParams->storageProfile.profileSelect.directRelativeProfileId;
-+ shift = 0;
-+ numOfProfiles = 1;
-+ }
-+ else
-+ {
-+ profileId = p_SchemeParams->storageProfile.profileSelect.indirectProfile.fqidOffsetRelativeProfileIdBase;
-+ shift = p_SchemeParams->storageProfile.profileSelect.indirectProfile.fqidOffsetShift;
-+ numOfProfiles = p_SchemeParams->storageProfile.profileSelect.indirectProfile.numOfProfiles;
-+ }
-+ if (shift > MAX_SP_SHIFT)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("fqidOffsetShift may not be larger than %d", MAX_SP_SHIFT));
-+
-+ if (!numOfProfiles || !POWER_OF_2(numOfProfiles))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("numOfProfiles must not be 0 and must be a power of 2"));
-+
-+ tmpReg = (uint32_t)shift << KG_SCH_VSP_SHIFT;
-+ tmpReg |= ((uint32_t)(numOfProfiles-1) << KG_SCH_VSP_MASK_SHIFT);
-+ tmpReg |= (uint32_t)profileId;
-+
-+
-+ p_SchemeRegs->kgse_vsp = tmpReg;
-+
-+ p_Scheme->vspe = TRUE;
-+
-+ }
-+ else
-+ p_SchemeRegs->kgse_vsp = KG_SCH_VSP_NO_KSP_EN;
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ if (p_SchemeParams->useHash)
-+ {
-+ p_KeyAndHash = &p_SchemeParams->keyExtractAndHashParams;
-+
-+ if (p_KeyAndHash->numOfUsedExtracts >= FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("numOfUsedExtracts out of range"));
-+
-+ /* configure kgse_dv0 */
-+ p_SchemeRegs->kgse_dv0 = p_KeyAndHash->privateDflt0;
-+
-+ /* configure kgse_dv1 */
-+ p_SchemeRegs->kgse_dv1 = p_KeyAndHash->privateDflt1;
-+
-+ if (!p_SchemeParams->bypassFqidGeneration)
-+ {
-+ if (!p_KeyAndHash->hashDistributionNumOfFqids || !POWER_OF_2(p_KeyAndHash->hashDistributionNumOfFqids))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("hashDistributionNumOfFqids must not be 0 and must be a power of 2"));
-+ if ((p_KeyAndHash->hashDistributionNumOfFqids-1) & p_SchemeParams->baseFqid)
-+ DBG(WARNING, ("baseFqid unaligned. Distribution may result in less than hashDistributionNumOfFqids queues."));
-+ }
-+
-+ /* configure kgse_ekdv */
-+ tmpReg = 0;
-+ for ( i=0 ;inumOfUsedDflts ; i++)
-+ {
-+ switch (p_KeyAndHash->dflts[i].type)
-+ {
-+ case (e_FM_PCD_KG_MAC_ADDR):
-+ tmpReg |= (p_KeyAndHash->dflts[i].dfltSelect << KG_SCH_DEF_MAC_ADDR_SHIFT);
-+ break;
-+ case (e_FM_PCD_KG_TCI):
-+ tmpReg |= (p_KeyAndHash->dflts[i].dfltSelect << KG_SCH_DEF_TCI_SHIFT);
-+ break;
-+ case (e_FM_PCD_KG_ENET_TYPE):
-+ tmpReg |= (p_KeyAndHash->dflts[i].dfltSelect << KG_SCH_DEF_ENET_TYPE_SHIFT);
-+ break;
-+ case (e_FM_PCD_KG_PPP_SESSION_ID):
-+ tmpReg |= (p_KeyAndHash->dflts[i].dfltSelect << KG_SCH_DEF_PPP_SESSION_ID_SHIFT);
-+ break;
-+ case (e_FM_PCD_KG_PPP_PROTOCOL_ID):
-+ tmpReg |= (p_KeyAndHash->dflts[i].dfltSelect << KG_SCH_DEF_PPP_PROTOCOL_ID_SHIFT);
-+ break;
-+ case (e_FM_PCD_KG_MPLS_LABEL):
-+ tmpReg |= (p_KeyAndHash->dflts[i].dfltSelect << KG_SCH_DEF_MPLS_LABEL_SHIFT);
-+ break;
-+ case (e_FM_PCD_KG_IP_ADDR):
-+ tmpReg |= (p_KeyAndHash->dflts[i].dfltSelect << KG_SCH_DEF_IP_ADDR_SHIFT);
-+ break;
-+ case (e_FM_PCD_KG_PROTOCOL_TYPE):
-+ tmpReg |= (p_KeyAndHash->dflts[i].dfltSelect << KG_SCH_DEF_PROTOCOL_TYPE_SHIFT);
-+ break;
-+ case (e_FM_PCD_KG_IP_TOS_TC):
-+ tmpReg |= (p_KeyAndHash->dflts[i].dfltSelect << KG_SCH_DEF_IP_TOS_TC_SHIFT);
-+ break;
-+ case (e_FM_PCD_KG_IPV6_FLOW_LABEL):
-+ tmpReg |= (p_KeyAndHash->dflts[i].dfltSelect << KG_SCH_DEF_L4_PORT_SHIFT);
-+ break;
-+ case (e_FM_PCD_KG_IPSEC_SPI):
-+ tmpReg |= (p_KeyAndHash->dflts[i].dfltSelect << KG_SCH_DEF_IPSEC_SPI_SHIFT);
-+ break;
-+ case (e_FM_PCD_KG_L4_PORT):
-+ tmpReg |= (p_KeyAndHash->dflts[i].dfltSelect << KG_SCH_DEF_L4_PORT_SHIFT);
-+ break;
-+ case (e_FM_PCD_KG_TCP_FLAG):
-+ tmpReg |= (p_KeyAndHash->dflts[i].dfltSelect << KG_SCH_DEF_TCP_FLAG_SHIFT);
-+ break;
-+ case (e_FM_PCD_KG_GENERIC_FROM_DATA):
-+ swDefaults[numOfSwDefaults].type = e_FM_PCD_KG_GENERIC_FROM_DATA;
-+ swDefaults[numOfSwDefaults].dfltSelect = p_KeyAndHash->dflts[i].dfltSelect;
-+ numOfSwDefaults ++;
-+ break;
-+ case (e_FM_PCD_KG_GENERIC_FROM_DATA_NO_V):
-+ swDefaults[numOfSwDefaults].type = e_FM_PCD_KG_GENERIC_FROM_DATA_NO_V;
-+ swDefaults[numOfSwDefaults].dfltSelect = p_KeyAndHash->dflts[i].dfltSelect;
-+ numOfSwDefaults ++;
-+ break;
-+ case (e_FM_PCD_KG_GENERIC_NOT_FROM_DATA):
-+ swDefaults[numOfSwDefaults].type = e_FM_PCD_KG_GENERIC_NOT_FROM_DATA;
-+ swDefaults[numOfSwDefaults].dfltSelect = p_KeyAndHash->dflts[i].dfltSelect;
-+ numOfSwDefaults ++;
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_SELECTION, NO_MSG);
-+ }
-+ }
-+ p_SchemeRegs->kgse_ekdv = tmpReg;
-+
-+ p_LocalExtractsArray = (t_FmPcdKgSchemesExtracts *)XX_Malloc(sizeof(t_FmPcdKgSchemesExtracts));
-+ if (!p_LocalExtractsArray)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("No memory"));
-+
-+ /* configure kgse_ekfc and kgse_gec */
-+ knownTmp = 0;
-+ for ( i=0 ;inumOfUsedExtracts ; i++)
-+ {
-+ p_Extract = &p_KeyAndHash->extractArray[i];
-+ switch (p_Extract->type)
-+ {
-+ case (e_FM_PCD_KG_EXTRACT_PORT_PRIVATE_INFO):
-+ knownTmp |= KG_SCH_KN_PORT_ID;
-+ /* save in driver structure */
-+ p_LocalExtractsArray->extractsArray[i].id = GetKnownFieldId(KG_SCH_KN_PORT_ID);
-+ p_LocalExtractsArray->extractsArray[i].known = TRUE;
-+ break;
-+ case (e_FM_PCD_EXTRACT_BY_HDR):
-+ switch (p_Extract->extractByHdr.hdr)
-+ {
-+
-+#ifdef FM_CAPWAP_SUPPORT
-+ case (HEADER_TYPE_UDP_LITE):
-+ p_Extract->extractByHdr.hdr = HEADER_TYPE_UDP;
-+ break;
-+#endif
-+ case (HEADER_TYPE_UDP_ENCAP_ESP):
-+ switch (p_Extract->extractByHdr.type)
-+ {
-+ case (e_FM_PCD_EXTRACT_FROM_HDR):
-+ /* case where extraction from ESP only */
-+ if (p_Extract->extractByHdr.extractByHdrType.fromHdr.offset >= UDP_HEADER_SIZE)
-+ {
-+ p_Extract->extractByHdr.hdr = FmPcdGetAliasHdr(p_FmPcd, p_Scheme->netEnvId, HEADER_TYPE_UDP_ENCAP_ESP);
-+ p_Extract->extractByHdr.extractByHdrType.fromHdr.offset -= UDP_HEADER_SIZE;
-+ p_Extract->extractByHdr.ignoreProtocolValidation = TRUE;
-+ }
-+ else
-+ {
-+ p_Extract->extractByHdr.hdr = HEADER_TYPE_UDP;
-+ p_Extract->extractByHdr.ignoreProtocolValidation = FALSE;
-+ }
-+ break;
-+ case (e_FM_PCD_EXTRACT_FROM_FIELD):
-+ switch (p_Extract->extractByHdr.extractByHdrType.fromField.field.udpEncapEsp)
-+ {
-+ case (NET_HEADER_FIELD_UDP_ENCAP_ESP_PORT_SRC):
-+ case (NET_HEADER_FIELD_UDP_ENCAP_ESP_PORT_DST):
-+ case (NET_HEADER_FIELD_UDP_ENCAP_ESP_LEN):
-+ case (NET_HEADER_FIELD_UDP_ENCAP_ESP_CKSUM):
-+ p_Extract->extractByHdr.hdr = HEADER_TYPE_UDP;
-+ break;
-+ case (NET_HEADER_FIELD_UDP_ENCAP_ESP_SPI):
-+ p_Extract->extractByHdr.type = e_FM_PCD_EXTRACT_FROM_HDR;
-+ p_Extract->extractByHdr.hdr = FmPcdGetAliasHdr(p_FmPcd, p_Scheme->netEnvId, HEADER_TYPE_UDP_ENCAP_ESP);
-+ p_Extract->extractByHdr.extractByHdrType.fromField.size = p_Extract->extractByHdr.extractByHdrType.fromField.size;
-+ /*p_Extract->extractByHdr.extractByHdrType.fromField.offset += ESP_SPI_OFFSET;*/
-+ p_Extract->extractByHdr.ignoreProtocolValidation = TRUE;
-+ break;
-+ case (NET_HEADER_FIELD_UDP_ENCAP_ESP_SEQUENCE_NUM):
-+ p_Extract->extractByHdr.type = e_FM_PCD_EXTRACT_FROM_HDR;
-+ p_Extract->extractByHdr.hdr = FmPcdGetAliasHdr(p_FmPcd, p_Scheme->netEnvId, HEADER_TYPE_UDP_ENCAP_ESP);
-+ p_Extract->extractByHdr.extractByHdrType.fromField.size = p_Extract->extractByHdr.extractByHdrType.fromField.size;
-+ p_Extract->extractByHdr.extractByHdrType.fromField.offset += ESP_SEQ_NUM_OFFSET;
-+ p_Extract->extractByHdr.ignoreProtocolValidation = TRUE;
-+ break;
-+ }
-+ break;
-+ case (e_FM_PCD_EXTRACT_FULL_FIELD):
-+ switch (p_Extract->extractByHdr.extractByHdrType.fullField.udpEncapEsp)
-+ {
-+ case (NET_HEADER_FIELD_UDP_ENCAP_ESP_PORT_SRC):
-+ case (NET_HEADER_FIELD_UDP_ENCAP_ESP_PORT_DST):
-+ case (NET_HEADER_FIELD_UDP_ENCAP_ESP_LEN):
-+ case (NET_HEADER_FIELD_UDP_ENCAP_ESP_CKSUM):
-+ p_Extract->extractByHdr.hdr = HEADER_TYPE_UDP;
-+ break;
-+ case (NET_HEADER_FIELD_UDP_ENCAP_ESP_SPI):
-+ p_Extract->extractByHdr.type = e_FM_PCD_EXTRACT_FROM_HDR;
-+ p_Extract->extractByHdr.hdr = FmPcdGetAliasHdr(p_FmPcd, p_Scheme->netEnvId, HEADER_TYPE_UDP_ENCAP_ESP);
-+ p_Extract->extractByHdr.extractByHdrType.fromHdr.size = ESP_SPI_SIZE;
-+ p_Extract->extractByHdr.extractByHdrType.fromHdr.offset = ESP_SPI_OFFSET;
-+ p_Extract->extractByHdr.ignoreProtocolValidation = TRUE;
-+ break;
-+ case (NET_HEADER_FIELD_UDP_ENCAP_ESP_SEQUENCE_NUM):
-+ p_Extract->extractByHdr.type = e_FM_PCD_EXTRACT_FROM_HDR;
-+ p_Extract->extractByHdr.hdr = FmPcdGetAliasHdr(p_FmPcd, p_Scheme->netEnvId, HEADER_TYPE_UDP_ENCAP_ESP);
-+ p_Extract->extractByHdr.extractByHdrType.fromHdr.size = ESP_SEQ_NUM_SIZE;
-+ p_Extract->extractByHdr.extractByHdrType.fromHdr.offset = ESP_SEQ_NUM_OFFSET;
-+ p_Extract->extractByHdr.ignoreProtocolValidation = TRUE;
-+ break;
-+ }
-+ break;
-+ }
-+ break;
-+ default:
-+ break;
-+ }
-+ switch (p_Extract->extractByHdr.type)
-+ {
-+ case (e_FM_PCD_EXTRACT_FROM_HDR):
-+ generic = TRUE;
-+ /* get the header code for the generic extract */
-+ code = GetGenHdrCode(p_Extract->extractByHdr.hdr, p_Extract->extractByHdr.hdrIndex, p_Extract->extractByHdr.ignoreProtocolValidation);
-+ /* set generic register fields */
-+ offset = p_Extract->extractByHdr.extractByHdrType.fromHdr.offset;
-+ size = p_Extract->extractByHdr.extractByHdrType.fromHdr.size;
-+ break;
-+ case (e_FM_PCD_EXTRACT_FROM_FIELD):
-+ generic = TRUE;
-+ /* get the field code for the generic extract */
-+ code = GetGenFieldCode(p_Extract->extractByHdr.hdr,
-+ p_Extract->extractByHdr.extractByHdrType.fromField.field, p_Extract->extractByHdr.ignoreProtocolValidation,p_Extract->extractByHdr.hdrIndex);
-+ offset = p_Extract->extractByHdr.extractByHdrType.fromField.offset;
-+ size = p_Extract->extractByHdr.extractByHdrType.fromField.size;
-+ break;
-+ case (e_FM_PCD_EXTRACT_FULL_FIELD):
-+ if (!p_Extract->extractByHdr.ignoreProtocolValidation)
-+ {
-+ /* if we have a known field for it - use it, otherwise use generic */
-+ bitMask = GetKnownProtMask(p_FmPcd, p_Extract->extractByHdr.hdr, p_Extract->extractByHdr.hdrIndex,
-+ p_Extract->extractByHdr.extractByHdrType.fullField);
-+ if (bitMask)
-+ {
-+ knownTmp |= bitMask;
-+ /* save in driver structure */
-+ p_LocalExtractsArray->extractsArray[i].id = GetKnownFieldId(bitMask);
-+ p_LocalExtractsArray->extractsArray[i].known = TRUE;
-+ }
-+ else
-+ generic = TRUE;
-+
-+ }
-+ else
-+ generic = TRUE;
-+ if (generic)
-+ {
-+ /* tmp - till we cover more headers under generic */
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("Full header selection not supported"));
-+ }
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_SELECTION, NO_MSG);
-+ }
-+ break;
-+ case (e_FM_PCD_EXTRACT_NON_HDR):
-+ /* use generic */
-+ generic = TRUE;
-+ offset = 0;
-+ /* get the field code for the generic extract */
-+ code = GetGenCode(p_Extract->extractNonHdr.src, &offset);
-+ offset += p_Extract->extractNonHdr.offset;
-+ size = p_Extract->extractNonHdr.size;
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_SELECTION, NO_MSG);
-+ }
-+
-+ if (generic)
-+ {
-+ /* set generic register fields */
-+ if (currGenId >= FM_KG_NUM_OF_GENERIC_REGS)
-+ RETURN_ERROR(MAJOR, E_FULL, ("Generic registers are fully used"));
-+ if (!code)
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, NO_MSG);
-+
-+ genTmp = KG_SCH_GEN_VALID;
-+ genTmp |= (uint32_t)(code << KG_SCH_GEN_HT_SHIFT);
-+ genTmp |= offset;
-+ if ((size > MAX_KG_SCH_SIZE) || (size < 1))
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("Illegal extraction (size out of range)"));
-+ genTmp |= (uint32_t)((size - 1) << KG_SCH_GEN_SIZE_SHIFT);
-+ swDefault = GetGenericSwDefault(swDefaults, numOfSwDefaults, code);
-+ if (swDefault == e_FM_PCD_KG_DFLT_ILLEGAL)
-+ DBG(WARNING, ("No sw default configured"));
-+
-+ genTmp |= swDefault << KG_SCH_GEN_DEF_SHIFT;
-+ genTmp |= KG_SCH_GEN_MASK;
-+ p_SchemeRegs->kgse_gec[currGenId] = genTmp;
-+ /* save in driver structure */
-+ p_LocalExtractsArray->extractsArray[i].id = currGenId++;
-+ p_LocalExtractsArray->extractsArray[i].known = FALSE;
-+ generic = FALSE;
-+ }
-+ }
-+ p_SchemeRegs->kgse_ekfc = knownTmp;
-+
-+ selectTmp = 0;
-+ maskTmp = 0xFFFFFFFF;
-+ /* configure kgse_bmch, kgse_bmcl and kgse_fqb */
-+
-+ if (p_KeyAndHash->numOfUsedMasks >= FM_PCD_KG_NUM_OF_EXTRACT_MASKS)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Only %d masks supported", FM_PCD_KG_NUM_OF_EXTRACT_MASKS));
-+ for ( i=0 ;inumOfUsedMasks ; i++)
-+ {
-+ /* Get the relative id of the extract (for known 0-0x1f, for generic 0-7) */
-+ id = p_LocalExtractsArray->extractsArray[p_KeyAndHash->masks[i].extractArrayIndex].id;
-+ /* Get the shift of the select field (depending on i) */
-+ GET_MASK_SEL_SHIFT(shift,i);
-+ if (p_LocalExtractsArray->extractsArray[p_KeyAndHash->masks[i].extractArrayIndex].known)
-+ selectTmp |= id << shift;
-+ else
-+ selectTmp |= (id + MASK_FOR_GENERIC_BASE_ID) << shift;
-+
-+ /* Get the shift of the offset field (depending on i) - may
-+ be in kgse_bmch or in kgse_fqb (depending on i) */
-+ GET_MASK_OFFSET_SHIFT(shift,i);
-+ if (i<=1)
-+ selectTmp |= p_KeyAndHash->masks[i].offset << shift;
-+ else
-+ fqbTmp |= p_KeyAndHash->masks[i].offset << shift;
-+
-+ /* Get the shift of the mask field (depending on i) */
-+ GET_MASK_SHIFT(shift,i);
-+ /* pass all bits */
-+ maskTmp |= KG_SCH_BITMASK_MASK << shift;
-+ /* clear bits that need masking */
-+ maskTmp &= ~(0xFF << shift) ;
-+ /* set mask bits */
-+ maskTmp |= (p_KeyAndHash->masks[i].mask << shift) ;
-+ }
-+ p_SchemeRegs->kgse_bmch = selectTmp;
-+ p_SchemeRegs->kgse_bmcl = maskTmp;
-+ /* kgse_fqb will be written t the end of the routine */
-+
-+ /* configure kgse_hc */
-+ if (p_KeyAndHash->hashShift > MAX_HASH_SHIFT)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("hashShift must not be larger than %d", MAX_HASH_SHIFT));
-+ if (p_KeyAndHash->hashDistributionFqidsShift > MAX_DIST_FQID_SHIFT)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("hashDistributionFqidsShift must not be larger than %d", MAX_DIST_FQID_SHIFT));
-+
-+ tmpReg = 0;
-+
-+ tmpReg |= ((p_KeyAndHash->hashDistributionNumOfFqids - 1) << p_KeyAndHash->hashDistributionFqidsShift);
-+ tmpReg |= p_KeyAndHash->hashShift << KG_SCH_HASH_CONFIG_SHIFT_SHIFT;
-+
-+ if (p_KeyAndHash->symmetricHash)
-+ {
-+ if ((!!(p_SchemeRegs->kgse_ekfc & KG_SCH_KN_MACSRC) != !!(p_SchemeRegs->kgse_ekfc & KG_SCH_KN_MACDST)) ||
-+ (!!(p_SchemeRegs->kgse_ekfc & KG_SCH_KN_IPSRC1) != !!(p_SchemeRegs->kgse_ekfc & KG_SCH_KN_IPDST1)) ||
-+ (!!(p_SchemeRegs->kgse_ekfc & KG_SCH_KN_IPSRC2) != !!(p_SchemeRegs->kgse_ekfc & KG_SCH_KN_IPDST2)) ||
-+ (!!(p_SchemeRegs->kgse_ekfc & KG_SCH_KN_L4PSRC) != !!(p_SchemeRegs->kgse_ekfc & KG_SCH_KN_L4PDST)))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("symmetricHash set but src/dest extractions missing"));
-+ tmpReg |= KG_SCH_HASH_CONFIG_SYM;
-+ }
-+ p_SchemeRegs->kgse_hc = tmpReg;
-+
-+ /* build the return array describing the order of the extractions */
-+
-+ /* the last currGenId places of the array
-+ are for generic extracts that are always last.
-+ We now sort for the calculation of the order of the known
-+ extractions we sort the known extracts between orderedArray[0] and
-+ orderedArray[p_KeyAndHash->numOfUsedExtracts - currGenId - 1].
-+ for the calculation of the order of the generic extractions we use:
-+ num_of_generic - currGenId
-+ num_of_known - p_KeyAndHash->numOfUsedExtracts - currGenId
-+ first_generic_index = num_of_known */
-+ curr = 0;
-+ for (i=0;inumOfUsedExtracts ; i++)
-+ {
-+ if (p_LocalExtractsArray->extractsArray[i].known)
-+ {
-+ ASSERT_COND(curr<(p_KeyAndHash->numOfUsedExtracts - currGenId));
-+ j = curr;
-+ /* id is the extract id (port id = 0, mac src = 1 etc.). the value in the array is the original
-+ index in the user's extractions array */
-+ /* we compare the id of the current extract with the id of the extract in the orderedArray[j-1]
-+ location */
-+ while ((j > 0) && (p_LocalExtractsArray->extractsArray[i].id <
-+ p_LocalExtractsArray->extractsArray[p_Scheme->orderedArray[j-1]].id))
-+ {
-+ p_Scheme->orderedArray[j] =
-+ p_Scheme->orderedArray[j-1];
-+ j--;
-+ }
-+ p_Scheme->orderedArray[j] = (uint8_t)i;
-+ curr++;
-+ }
-+ else
-+ {
-+ /* index is first_generic_index + generic index (id) */
-+ idx = (uint8_t)(p_KeyAndHash->numOfUsedExtracts - currGenId + p_LocalExtractsArray->extractsArray[i].id);
-+ ASSERT_COND(idx < FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY);
-+ p_Scheme->orderedArray[idx]= (uint8_t)i;
-+ }
-+ }
-+ XX_Free(p_LocalExtractsArray);
-+ p_LocalExtractsArray = NULL;
-+
-+ }
-+ else
-+ {
-+ /* clear all unused registers: */
-+ p_SchemeRegs->kgse_ekfc = 0;
-+ p_SchemeRegs->kgse_ekdv = 0;
-+ p_SchemeRegs->kgse_bmch = 0;
-+ p_SchemeRegs->kgse_bmcl = 0;
-+ p_SchemeRegs->kgse_hc = 0;
-+ p_SchemeRegs->kgse_dv0 = 0;
-+ p_SchemeRegs->kgse_dv1 = 0;
-+ }
-+
-+ if (p_SchemeParams->bypassFqidGeneration)
-+ p_SchemeRegs->kgse_hc |= KG_SCH_HASH_CONFIG_NO_FQID;
-+
-+ /* configure kgse_spc */
-+ if ( p_SchemeParams->schemeCounter.update)
-+ p_SchemeRegs->kgse_spc = p_SchemeParams->schemeCounter.value;
-+
-+
-+ /* check that are enough generic registers */
-+ if (p_SchemeParams->numOfUsedExtractedOrs + currGenId > FM_KG_NUM_OF_GENERIC_REGS)
-+ RETURN_ERROR(MAJOR, E_FULL, ("Generic registers are fully used"));
-+
-+ /* extracted OR mask on Qid */
-+ for ( i=0 ;inumOfUsedExtractedOrs ; i++)
-+ {
-+
-+ p_Scheme->extractedOrs = TRUE;
-+ /* configure kgse_gec[i] */
-+ p_ExtractOr = &p_SchemeParams->extractedOrs[i];
-+ switch (p_ExtractOr->type)
-+ {
-+ case (e_FM_PCD_KG_EXTRACT_PORT_PRIVATE_INFO):
-+ code = KG_SCH_GEN_PARSE_RESULT_N_FQID;
-+ offset = 0;
-+ break;
-+ case (e_FM_PCD_EXTRACT_BY_HDR):
-+ /* get the header code for the generic extract */
-+ code = GetGenHdrCode(p_ExtractOr->extractByHdr.hdr, p_ExtractOr->extractByHdr.hdrIndex, p_ExtractOr->extractByHdr.ignoreProtocolValidation);
-+ /* set generic register fields */
-+ offset = p_ExtractOr->extractionOffset;
-+ break;
-+ case (e_FM_PCD_EXTRACT_NON_HDR):
-+ /* get the field code for the generic extract */
-+ offset = 0;
-+ code = GetGenCode(p_ExtractOr->src, &offset);
-+ offset += p_ExtractOr->extractionOffset;
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_SELECTION, NO_MSG);
-+ }
-+
-+ /* set generic register fields */
-+ if (!code)
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, NO_MSG);
-+ genTmp = KG_SCH_GEN_EXTRACT_TYPE | KG_SCH_GEN_VALID;
-+ genTmp |= (uint32_t)(code << KG_SCH_GEN_HT_SHIFT);
-+ genTmp |= offset;
-+ if (!!p_ExtractOr->bitOffsetInFqid == !!p_ExtractOr->bitOffsetInPlcrProfile)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, (" extracted byte must effect either FQID or Policer profile"));
-+
-+ /************************************************************************************
-+ bitOffsetInFqid and bitOffsetInPolicerProfile are translated to rotate parameter
-+ in the following way:
-+
-+ Driver API and implementation:
-+ ==============================
-+ FQID: extracted OR byte may be shifted right 1-31 bits to effect parts of the FQID.
-+ if shifted less than 8 bits, or more than 24 bits a mask is set on the bits that
-+ are not overlapping FQID.
-+ ------------------------
-+ | FQID (24) |
-+ ------------------------
-+ --------
-+ | | extracted OR byte
-+ --------
-+
-+ Policer Profile: extracted OR byte may be shifted right 1-15 bits to effect parts of the
-+ PP id. Unless shifted exactly 8 bits to overlap the PP id, a mask is set on the bits that
-+ are not overlapping PP id.
-+
-+ --------
-+ | PP (8) |
-+ --------
-+ --------
-+ | | extracted OR byte
-+ --------
-+
-+ HW implementation
-+ =================
-+ FQID and PP construct a 32 bit word in the way describe below. Extracted byte is located
-+ as the highest byte of that word and may be rotated to effect any part os the FQID or
-+ the PP.
-+ ------------------------ --------
-+ | FQID (24) || PP (8) |
-+ ------------------------ --------
-+ --------
-+ | | extracted OR byte
-+ --------
-+
-+ ************************************************************************************/
-+
-+ if (p_ExtractOr->bitOffsetInFqid)
-+ {
-+ if (p_ExtractOr->bitOffsetInFqid > MAX_KG_SCH_FQID_BIT_OFFSET )
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Illegal extraction (bitOffsetInFqid out of range)"));
-+ if (p_ExtractOr->bitOffsetInFqid<8)
-+ genTmp |= (uint32_t)((p_ExtractOr->bitOffsetInFqid+24) << KG_SCH_GEN_SIZE_SHIFT);
-+ else
-+ genTmp |= (uint32_t)((p_ExtractOr->bitOffsetInFqid-8) << KG_SCH_GEN_SIZE_SHIFT);
-+ p_ExtractOr->mask &= GetExtractedOrMask(p_ExtractOr->bitOffsetInFqid, TRUE);
-+ }
-+ else /* effect policer profile */
-+ {
-+ if (p_ExtractOr->bitOffsetInPlcrProfile > MAX_KG_SCH_PP_BIT_OFFSET )
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Illegal extraction (bitOffsetInPlcrProfile out of range)"));
-+ p_Scheme->bitOffsetInPlcrProfile = p_ExtractOr->bitOffsetInPlcrProfile;
-+ genTmp |= (uint32_t)((p_ExtractOr->bitOffsetInPlcrProfile+16) << KG_SCH_GEN_SIZE_SHIFT);
-+ p_ExtractOr->mask &= GetExtractedOrMask(p_ExtractOr->bitOffsetInPlcrProfile, FALSE);
-+ }
-+
-+ genTmp |= (uint32_t)(p_ExtractOr->extractionOffset << KG_SCH_GEN_DEF_SHIFT);
-+ /* clear bits that need masking */
-+ genTmp &= ~KG_SCH_GEN_MASK ;
-+ /* set mask bits */
-+ genTmp |= (uint32_t)(p_ExtractOr->mask << KG_SCH_GEN_MASK_SHIFT);
-+ p_SchemeRegs->kgse_gec[currGenId++] = genTmp;
-+
-+ }
-+ /* clear all unused GEC registers */
-+ for ( i=currGenId ;ikgse_gec[i] = 0;
-+
-+ /* add base Qid for this scheme */
-+ /* add configuration for kgse_fqb */
-+ if (p_SchemeParams->baseFqid & ~0x00FFFFFF)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("baseFqid must be between 1 and 2^24-1"));
-+
-+ fqbTmp |= p_SchemeParams->baseFqid;
-+ p_SchemeRegs->kgse_fqb = fqbTmp;
-+
-+ p_Scheme->nextEngine = p_SchemeParams->nextEngine;
-+ p_Scheme->doneAction = p_SchemeParams->kgNextEngineParams.doneAction;
-+
-+ return E_OK;
-+}
-+
-+
-+/*****************************************************************************/
-+/* Inter-module API routines */
-+/*****************************************************************************/
-+
-+t_Error FmPcdKgBuildClsPlanGrp(t_Handle h_FmPcd, t_FmPcdKgInterModuleClsPlanGrpParams *p_Grp, t_FmPcdKgInterModuleClsPlanSet *p_ClsPlanSet)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+ t_FmPcdKgClsPlanGrp *p_ClsPlanGrp;
-+ t_FmPcdIpcKgClsPlanParams kgAlloc;
-+ t_Error err = E_OK;
-+ uint32_t oredVectors = 0;
-+ int i, j;
-+
-+ /* this routine is protected by the calling routine ! */
-+ if (p_Grp->numOfOptions >= FM_PCD_MAX_NUM_OF_OPTIONS(FM_PCD_MAX_NUM_OF_CLS_PLANS))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE,("Too many classification plan basic options selected."));
-+
-+ /* find a new clsPlan group */
-+ for (i = 0; i < FM_MAX_NUM_OF_PORTS; i++)
-+ if (!p_FmPcd->p_FmPcdKg->clsPlanGrps[i].used)
-+ break;
-+ if (i == FM_MAX_NUM_OF_PORTS)
-+ RETURN_ERROR(MAJOR, E_FULL,("No classification plan groups available."));
-+
-+ p_FmPcd->p_FmPcdKg->clsPlanGrps[i].used = TRUE;
-+
-+ p_Grp->clsPlanGrpId = (uint8_t)i;
-+
-+ if (p_Grp->numOfOptions == 0)
-+ p_FmPcd->p_FmPcdKg->emptyClsPlanGrpId = (uint8_t)i;
-+
-+ p_ClsPlanGrp = &p_FmPcd->p_FmPcdKg->clsPlanGrps[i];
-+ p_ClsPlanGrp->netEnvId = p_Grp->netEnvId;
-+ p_ClsPlanGrp->owners = 0;
-+ FmPcdSetClsPlanGrpId(p_FmPcd, p_Grp->netEnvId, p_Grp->clsPlanGrpId);
-+ if (p_Grp->numOfOptions != 0)
-+ FmPcdIncNetEnvOwners(p_FmPcd, p_Grp->netEnvId);
-+
-+ p_ClsPlanGrp->sizeOfGrp = (uint16_t)(1 << p_Grp->numOfOptions);
-+ /* a minimal group of 8 is required */
-+ if (p_ClsPlanGrp->sizeOfGrp < CLS_PLAN_NUM_PER_GRP)
-+ p_ClsPlanGrp->sizeOfGrp = CLS_PLAN_NUM_PER_GRP;
-+ if (p_FmPcd->guestId == NCSW_MASTER_ID)
-+ {
-+ err = KgAllocClsPlanEntries(h_FmPcd, p_ClsPlanGrp->sizeOfGrp, p_FmPcd->guestId, &p_ClsPlanGrp->baseEntry);
-+
-+ if (err)
-+ RETURN_ERROR(MINOR, E_INVALID_STATE, NO_MSG);
-+ }
-+ else
-+ {
-+ t_FmPcdIpcMsg msg;
-+ uint32_t replyLength;
-+ t_FmPcdIpcReply reply;
-+
-+ /* in GUEST_PARTITION, we use the IPC, to also set a private driver group if required */
-+ memset(&reply, 0, sizeof(reply));
-+ memset(&msg, 0, sizeof(msg));
-+ memset(&kgAlloc, 0, sizeof(kgAlloc));
-+ kgAlloc.guestId = p_FmPcd->guestId;
-+ kgAlloc.numOfClsPlanEntries = p_ClsPlanGrp->sizeOfGrp;
-+ msg.msgId = FM_PCD_ALLOC_KG_CLSPLAN;
-+ memcpy(msg.msgBody, &kgAlloc, sizeof(kgAlloc));
-+ replyLength = (sizeof(uint32_t) + sizeof(p_ClsPlanGrp->baseEntry));
-+ if ((err = XX_IpcSendMessage(p_FmPcd->h_IpcSession,
-+ (uint8_t*)&msg,
-+ sizeof(msg.msgId) + sizeof(kgAlloc),
-+ (uint8_t*)&reply,
-+ &replyLength,
-+ NULL,
-+ NULL)) != E_OK)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ if (replyLength != (sizeof(uint32_t) + sizeof(p_ClsPlanGrp->baseEntry)))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("IPC reply length mismatch"));
-+ if ((t_Error)reply.error != E_OK)
-+ RETURN_ERROR(MINOR, (t_Error)reply.error, NO_MSG);
-+
-+ p_ClsPlanGrp->baseEntry = *(uint8_t*)(reply.replyBody);
-+ }
-+
-+ /* build classification plan entries parameters */
-+ p_ClsPlanSet->baseEntry = p_ClsPlanGrp->baseEntry;
-+ p_ClsPlanSet->numOfClsPlanEntries = p_ClsPlanGrp->sizeOfGrp;
-+
-+ oredVectors = 0;
-+ for (i = 0; inumOfOptions; i++)
-+ {
-+ oredVectors |= p_Grp->optVectors[i];
-+ /* save an array of used options - the indexes represent the power of 2 index */
-+ p_ClsPlanGrp->optArray[i] = p_Grp->options[i];
-+ }
-+ /* set the classification plan relevant entries so that all bits
-+ * relevant to the list of options is cleared
-+ */
-+ for (j = 0; jsizeOfGrp; j++)
-+ p_ClsPlanSet->vectors[j] = ~oredVectors;
-+
-+ for (i = 0; inumOfOptions; i++)
-+ {
-+ /* option i got the place 2^i in the clsPlan array. all entries that
-+ * have bit i set, should have the vector bit cleared. So each option
-+ * has one location that it is exclusive (1,2,4,8...) and represent the
-+ * presence of that option only, and other locations that represent a
-+ * combination of options.
-+ * e.g:
-+ * If ethernet-BC is option 1 it gets entry 2 in the table. Entry 2
-+ * now represents a frame with ethernet-BC header - so the bit
-+ * representing ethernet-BC should be set and all other option bits
-+ * should be cleared.
-+ * Entries 2,3,6,7,10... also have ethernet-BC and therefore have bit
-+ * vector[1] set, but they also have other bits set:
-+ * 3=1+2, options 0 and 1
-+ * 6=2+4, options 1 and 2
-+ * 7=1+2+4, options 0,1,and 2
-+ * 10=2+8, options 1 and 3
-+ * etc.
-+ * */
-+
-+ /* now for each option (i), we set their bits in all entries (j)
-+ * that contain bit 2^i.
-+ */
-+ for (j = 0; jsizeOfGrp; j++)
-+ {
-+ if (j & (1<vectors[j] |= p_Grp->optVectors[i];
-+ }
-+ }
-+
-+ return E_OK;
-+}
-+
-+void FmPcdKgDestroyClsPlanGrp(t_Handle h_FmPcd, uint8_t grpId)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+ t_FmPcdIpcKgClsPlanParams kgAlloc;
-+ t_Error err;
-+ t_FmPcdIpcMsg msg;
-+ uint32_t replyLength;
-+ t_FmPcdIpcReply reply;
-+
-+ /* check that no port is bound to this clsPlan */
-+ if (p_FmPcd->p_FmPcdKg->clsPlanGrps[grpId].owners)
-+ {
-+ REPORT_ERROR(MINOR, E_INVALID_STATE, ("Trying to delete a clsPlan grp that has ports bound to"));
-+ return;
-+ }
-+
-+ FmPcdSetClsPlanGrpId(p_FmPcd, p_FmPcd->p_FmPcdKg->clsPlanGrps[grpId].netEnvId, ILLEGAL_CLS_PLAN);
-+
-+ if (grpId == p_FmPcd->p_FmPcdKg->emptyClsPlanGrpId)
-+ p_FmPcd->p_FmPcdKg->emptyClsPlanGrpId = ILLEGAL_CLS_PLAN;
-+ else
-+ FmPcdDecNetEnvOwners(p_FmPcd, p_FmPcd->p_FmPcdKg->clsPlanGrps[grpId].netEnvId);
-+
-+ /* free blocks */
-+ if (p_FmPcd->guestId == NCSW_MASTER_ID)
-+ KgFreeClsPlanEntries(h_FmPcd,
-+ p_FmPcd->p_FmPcdKg->clsPlanGrps[grpId].sizeOfGrp,
-+ p_FmPcd->guestId,
-+ p_FmPcd->p_FmPcdKg->clsPlanGrps[grpId].baseEntry);
-+ else /* in GUEST_PARTITION, we use the IPC, to also set a private driver group if required */
-+ {
-+ memset(&reply, 0, sizeof(reply));
-+ memset(&msg, 0, sizeof(msg));
-+ kgAlloc.guestId = p_FmPcd->guestId;
-+ kgAlloc.numOfClsPlanEntries = p_FmPcd->p_FmPcdKg->clsPlanGrps[grpId].sizeOfGrp;
-+ kgAlloc.clsPlanBase = p_FmPcd->p_FmPcdKg->clsPlanGrps[grpId].baseEntry;
-+ msg.msgId = FM_PCD_FREE_KG_CLSPLAN;
-+ memcpy(msg.msgBody, &kgAlloc, sizeof(kgAlloc));
-+ replyLength = sizeof(uint32_t);
-+ err = XX_IpcSendMessage(p_FmPcd->h_IpcSession,
-+ (uint8_t*)&msg,
-+ sizeof(msg.msgId) + sizeof(kgAlloc),
-+ (uint8_t*)&reply,
-+ &replyLength,
-+ NULL,
-+ NULL);
-+ if (err != E_OK)
-+ {
-+ REPORT_ERROR(MINOR, err, NO_MSG);
-+ return;
-+ }
-+ if (replyLength != sizeof(uint32_t))
-+ {
-+ REPORT_ERROR(MAJOR, E_INVALID_VALUE, ("IPC reply length mismatch"));
-+ return;
-+ }
-+ if ((t_Error)reply.error != E_OK)
-+ {
-+ REPORT_ERROR(MAJOR, E_INVALID_STATE, ("Free KG clsPlan failed"));
-+ return;
-+ }
-+ }
-+
-+ /* clear clsPlan driver structure */
-+ memset(&p_FmPcd->p_FmPcdKg->clsPlanGrps[grpId], 0, sizeof(t_FmPcdKgClsPlanGrp));
-+}
-+
-+t_Error FmPcdKgBuildBindPortToSchemes(t_Handle h_FmPcd , t_FmPcdKgInterModuleBindPortToSchemes *p_BindPort, uint32_t *p_SpReg, bool add)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+ uint32_t j, schemesPerPortVector = 0;
-+ t_FmPcdKgScheme *p_Scheme;
-+ uint8_t i, relativeSchemeId;
-+ uint32_t tmp, walking1Mask;
-+ uint8_t swPortIndex = 0;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdKg, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_FmPcd->p_FmPcdDriverParam, E_INVALID_STATE);
-+
-+ /* for each scheme */
-+ for (i = 0; inumOfSchemes; i++)
-+ {
-+ relativeSchemeId = FmPcdKgGetRelativeSchemeId(p_FmPcd, p_BindPort->schemesIds[i]);
-+ if (relativeSchemeId >= FM_PCD_KG_NUM_OF_SCHEMES)
-+ RETURN_ERROR(MAJOR, E_NOT_IN_RANGE, NO_MSG);
-+
-+ if (add)
-+ {
-+ p_Scheme = &p_FmPcd->p_FmPcdKg->schemes[relativeSchemeId];
-+ if (!FmPcdKgIsSchemeValidSw(p_Scheme))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Requested scheme is invalid."));
-+ /* check netEnvId of the port against the scheme netEnvId */
-+ if ((p_Scheme->netEnvId != p_BindPort->netEnvId) && (p_Scheme->netEnvId != ILLEGAL_NETENV))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Port may not be bound to requested scheme - differ in netEnvId"));
-+
-+ /* if next engine is private port policer profile, we need to check that it is valid */
-+ HW_PORT_ID_TO_SW_PORT_INDX(swPortIndex, p_BindPort->hardwarePortId);
-+ if (p_Scheme->nextRelativePlcrProfile)
-+ {
-+ for (j = 0;jnumOfProfiles;j++)
-+ {
-+ ASSERT_COND(p_FmPcd->p_FmPcdPlcr->portsMapping[swPortIndex].h_FmPort);
-+ if (p_Scheme->relativeProfileId+j >= p_FmPcd->p_FmPcdPlcr->portsMapping[swPortIndex].numOfProfiles)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Relative profile not in range"));
-+ if (!FmPcdPlcrIsProfileValid(p_FmPcd, (uint16_t)(p_FmPcd->p_FmPcdPlcr->portsMapping[swPortIndex].profilesBase + p_Scheme->relativeProfileId + j)))
-+ RETURN_ERROR(MINOR, E_INVALID_STATE, ("Relative profile not valid."));
-+ }
-+ }
-+ if (!p_BindPort->useClsPlan)
-+ {
-+ /* This check may be redundant as port is a assigned to the whole NetEnv */
-+
-+ /* if this port does not use clsPlan, it may not be bound to schemes with units that contain
-+ cls plan options. Schemes that are used only directly, should not be checked.
-+ it also may not be bound to schemes that go to CC with units that are options - so we OR
-+ the match vector and the grpBits (= ccUnits) */
-+ if ((p_Scheme->matchVector != SCHEME_ALWAYS_DIRECT) || p_Scheme->ccUnits)
-+ {
-+ walking1Mask = 0x80000000;
-+ tmp = (p_Scheme->matchVector == SCHEME_ALWAYS_DIRECT)? 0:p_Scheme->matchVector;
-+ tmp |= p_Scheme->ccUnits;
-+ while (tmp)
-+ {
-+ if (tmp & walking1Mask)
-+ {
-+ tmp &= ~walking1Mask;
-+ if (!PcdNetEnvIsUnitWithoutOpts(p_FmPcd, p_Scheme->netEnvId, walking1Mask))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Port (without clsPlan) may not be bound to requested scheme - uses clsPlan options"));
-+ }
-+ walking1Mask >>= 1;
-+ }
-+ }
-+ }
-+ }
-+ /* build vector */
-+ schemesPerPortVector |= 1 << (31 - p_BindPort->schemesIds[i]);
-+ }
-+
-+ *p_SpReg = schemesPerPortVector;
-+
-+ return E_OK;
-+}
-+
-+t_Error FmPcdKgBindPortToSchemes(t_Handle h_FmPcd , t_FmPcdKgInterModuleBindPortToSchemes *p_SchemeBind)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+ uint32_t spReg;
-+ t_Error err = E_OK;
-+
-+ err = FmPcdKgBuildBindPortToSchemes(h_FmPcd, p_SchemeBind, &spReg, TRUE);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ err = KgWriteSp(p_FmPcd, p_SchemeBind->hardwarePortId, spReg, TRUE);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ IncSchemeOwners(p_FmPcd, p_SchemeBind);
-+
-+ return E_OK;
-+}
-+
-+t_Error FmPcdKgUnbindPortToSchemes(t_Handle h_FmPcd, t_FmPcdKgInterModuleBindPortToSchemes *p_SchemeBind)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+ uint32_t spReg;
-+ t_Error err = E_OK;
-+
-+ err = FmPcdKgBuildBindPortToSchemes(p_FmPcd, p_SchemeBind, &spReg, FALSE);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ err = KgWriteSp(p_FmPcd, p_SchemeBind->hardwarePortId, spReg, FALSE);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ DecSchemeOwners(p_FmPcd, p_SchemeBind);
-+
-+ return E_OK;
-+}
-+
-+bool FmPcdKgIsSchemeValidSw(t_Handle h_Scheme)
-+{
-+ t_FmPcdKgScheme *p_Scheme = (t_FmPcdKgScheme*)h_Scheme;
-+
-+ return p_Scheme->valid;
-+}
-+
-+bool KgIsSchemeAlwaysDirect(t_Handle h_FmPcd, uint8_t schemeId)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+
-+ if (p_FmPcd->p_FmPcdKg->schemes[schemeId].matchVector == SCHEME_ALWAYS_DIRECT)
-+ return TRUE;
-+ else
-+ return FALSE;
-+}
-+
-+t_Error FmPcdKgAllocSchemes(t_Handle h_FmPcd, uint8_t numOfSchemes, uint8_t guestId, uint8_t *p_SchemesIds)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
-+ uint8_t i, j;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdKg, E_INVALID_HANDLE);
-+
-+ /* This routine is issued only on master core of master partition -
-+ either directly or through IPC, so no need for lock */
-+
-+ for (j = 0, i = 0; i < FM_PCD_KG_NUM_OF_SCHEMES && j < numOfSchemes; i++)
-+ {
-+ if (!p_FmPcd->p_FmPcdKg->schemesMng[i].allocated)
-+ {
-+ p_FmPcd->p_FmPcdKg->schemesMng[i].allocated = TRUE;
-+ p_FmPcd->p_FmPcdKg->schemesMng[i].ownerId = guestId;
-+ p_SchemesIds[j] = i;
-+ j++;
-+ }
-+ }
-+
-+ if (j != numOfSchemes)
-+ {
-+ /* roll back */
-+ for (j--; j; j--)
-+ {
-+ p_FmPcd->p_FmPcdKg->schemesMng[p_SchemesIds[j]].allocated = FALSE;
-+ p_FmPcd->p_FmPcdKg->schemesMng[p_SchemesIds[j]].ownerId = 0;
-+ p_SchemesIds[j] = 0;
-+ }
-+
-+ RETURN_ERROR(MAJOR, E_NOT_AVAILABLE, ("No schemes found"));
-+ }
-+
-+ return E_OK;
-+}
-+
-+t_Error FmPcdKgFreeSchemes(t_Handle h_FmPcd, uint8_t numOfSchemes, uint8_t guestId, uint8_t *p_SchemesIds)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
-+ uint8_t i;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdKg, E_INVALID_HANDLE);
-+
-+ /* This routine is issued only on master core of master partition -
-+ either directly or through IPC */
-+
-+ for (i = 0; i < numOfSchemes; i++)
-+ {
-+ if (!p_FmPcd->p_FmPcdKg->schemesMng[p_SchemesIds[i]].allocated)
-+ {
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Scheme was not previously allocated"));
-+ }
-+ if (p_FmPcd->p_FmPcdKg->schemesMng[p_SchemesIds[i]].ownerId != guestId)
-+ {
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Scheme is not owned by caller. "));
-+ }
-+ p_FmPcd->p_FmPcdKg->schemesMng[p_SchemesIds[i]].allocated = FALSE;
-+ p_FmPcd->p_FmPcdKg->schemesMng[p_SchemesIds[i]].ownerId = 0;
-+ }
-+
-+ return E_OK;
-+}
-+
-+t_Error KgAllocClsPlanEntries(t_Handle h_FmPcd, uint16_t numOfClsPlanEntries, uint8_t guestId, uint8_t *p_First)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
-+ uint8_t numOfBlocks, blocksFound=0, first=0;
-+ uint8_t i, j;
-+
-+ /* This routine is issued only on master core of master partition -
-+ either directly or through IPC, so no need for lock */
-+
-+ if (!numOfClsPlanEntries)
-+ return E_OK;
-+
-+ if ((numOfClsPlanEntries % CLS_PLAN_NUM_PER_GRP) || (!POWER_OF_2(numOfClsPlanEntries)))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("numOfClsPlanEntries must be a power of 2 and divisible by 8"));
-+
-+ numOfBlocks = (uint8_t)(numOfClsPlanEntries/CLS_PLAN_NUM_PER_GRP);
-+
-+ /* try to find consequent blocks */
-+ first = 0;
-+ for (i = 0; i < FM_PCD_MAX_NUM_OF_CLS_PLANS/CLS_PLAN_NUM_PER_GRP;)
-+ {
-+ if (!p_FmPcd->p_FmPcdKg->clsPlanBlocksMng[i].allocated)
-+ {
-+ blocksFound++;
-+ i++;
-+ if (blocksFound == numOfBlocks)
-+ break;
-+ }
-+ else
-+ {
-+ blocksFound = 0;
-+ /* advance i to the next aligned address */
-+ first = i = (uint8_t)(first + numOfBlocks);
-+ }
-+ }
-+
-+ if (blocksFound == numOfBlocks)
-+ {
-+ *p_First = (uint8_t)(first * CLS_PLAN_NUM_PER_GRP);
-+ for (j = first; j < (first + numOfBlocks); j++)
-+ {
-+ p_FmPcd->p_FmPcdKg->clsPlanBlocksMng[j].allocated = TRUE;
-+ p_FmPcd->p_FmPcdKg->clsPlanBlocksMng[j].ownerId = guestId;
-+ }
-+ return E_OK;
-+ }
-+ else
-+ RETURN_ERROR(MINOR, E_FULL, ("No resources for clsPlan"));
-+}
-+
-+void KgFreeClsPlanEntries(t_Handle h_FmPcd, uint16_t numOfClsPlanEntries, uint8_t guestId, uint8_t base)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+ uint8_t numOfBlocks;
-+ uint8_t i, baseBlock;
-+
-+#ifdef DISABLE_ASSERTIONS
-+UNUSED(guestId);
-+#endif /* DISABLE_ASSERTIONS */
-+
-+ /* This routine is issued only on master core of master partition -
-+ either directly or through IPC, so no need for lock */
-+
-+ numOfBlocks = (uint8_t)(numOfClsPlanEntries/CLS_PLAN_NUM_PER_GRP);
-+ ASSERT_COND(!(base%CLS_PLAN_NUM_PER_GRP));
-+
-+ baseBlock = (uint8_t)(base/CLS_PLAN_NUM_PER_GRP);
-+ for (i=baseBlock;ip_FmPcdKg->clsPlanBlocksMng[i].allocated);
-+ ASSERT_COND(guestId == p_FmPcd->p_FmPcdKg->clsPlanBlocksMng[i].ownerId);
-+ p_FmPcd->p_FmPcdKg->clsPlanBlocksMng[i].allocated = FALSE;
-+ p_FmPcd->p_FmPcdKg->clsPlanBlocksMng[i].ownerId = 0;
-+ }
-+}
-+
-+void KgEnable(t_FmPcd *p_FmPcd)
-+{
-+ struct fman_kg_regs *p_Regs = p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs;
-+
-+ ASSERT_COND(FmIsMaster(p_FmPcd->h_Fm));
-+ fman_kg_enable(p_Regs);
-+}
-+
-+void KgDisable(t_FmPcd *p_FmPcd)
-+{
-+ struct fman_kg_regs *p_Regs = p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs;
-+
-+ ASSERT_COND(FmIsMaster(p_FmPcd->h_Fm));
-+ fman_kg_disable(p_Regs);
-+}
-+
-+void KgSetClsPlan(t_Handle h_FmPcd, t_FmPcdKgInterModuleClsPlanSet *p_Set)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
-+ struct fman_kg_cp_regs *p_FmPcdKgPortRegs;
-+ uint32_t tmpKgarReg = 0, intFlags;
-+ uint16_t i, j;
-+
-+ /* This routine is protected by the calling routine ! */
-+ ASSERT_COND(FmIsMaster(p_FmPcd->h_Fm));
-+ p_FmPcdKgPortRegs = &p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->clsPlanRegs;
-+
-+ intFlags = KgHwLock(p_FmPcd->p_FmPcdKg);
-+ for (i=p_Set->baseEntry;ibaseEntry+p_Set->numOfClsPlanEntries;i+=8)
-+ {
-+ tmpKgarReg = FmPcdKgBuildWriteClsPlanBlockActionReg((uint8_t)(i / CLS_PLAN_NUM_PER_GRP));
-+
-+ for (j = i; j < i+8; j++)
-+ {
-+ ASSERT_COND(IN_RANGE(0, (j - p_Set->baseEntry), FM_PCD_MAX_NUM_OF_CLS_PLANS-1));
-+ WRITE_UINT32(p_FmPcdKgPortRegs->kgcpe[j % CLS_PLAN_NUM_PER_GRP],p_Set->vectors[j - p_Set->baseEntry]);
-+ }
-+
-+ if (WriteKgarWait(p_FmPcd, tmpKgarReg) != E_OK)
-+ {
-+ REPORT_ERROR(MAJOR, E_INVALID_STATE, ("WriteKgarWait FAILED"));
-+ KgHwUnlock(p_FmPcd->p_FmPcdKg, intFlags);
-+ return;
-+ }
-+ }
-+ KgHwUnlock(p_FmPcd->p_FmPcdKg, intFlags);
-+}
-+
-+t_Handle KgConfig( t_FmPcd *p_FmPcd, t_FmPcdParams *p_FmPcdParams)
-+{
-+ t_FmPcdKg *p_FmPcdKg;
-+
-+ UNUSED(p_FmPcd);
-+
-+ if (p_FmPcdParams->numOfSchemes > FM_PCD_KG_NUM_OF_SCHEMES)
-+ {
-+ REPORT_ERROR(MAJOR, E_INVALID_VALUE,
-+ ("numOfSchemes should not exceed %d", FM_PCD_KG_NUM_OF_SCHEMES));
-+ return NULL;
-+ }
-+
-+ p_FmPcdKg = (t_FmPcdKg *)XX_Malloc(sizeof(t_FmPcdKg));
-+ if (!p_FmPcdKg)
-+ {
-+ REPORT_ERROR(MAJOR, E_NO_MEMORY, ("FM Keygen allocation FAILED"));
-+ return NULL;
-+ }
-+ memset(p_FmPcdKg, 0, sizeof(t_FmPcdKg));
-+
-+
-+ if (FmIsMaster(p_FmPcd->h_Fm))
-+ {
-+ p_FmPcdKg->p_FmPcdKgRegs = (struct fman_kg_regs *)UINT_TO_PTR(FmGetPcdKgBaseAddr(p_FmPcdParams->h_Fm));
-+ p_FmPcd->exceptions |= DEFAULT_fmPcdKgErrorExceptions;
-+ p_FmPcdKg->p_IndirectAccessRegs = (u_FmPcdKgIndirectAccessRegs *)&p_FmPcdKg->p_FmPcdKgRegs->fmkg_indirect[0];
-+ }
-+
-+ p_FmPcdKg->numOfSchemes = p_FmPcdParams->numOfSchemes;
-+ if ((p_FmPcd->guestId == NCSW_MASTER_ID) && !p_FmPcdKg->numOfSchemes)
-+ {
-+ p_FmPcdKg->numOfSchemes = FM_PCD_KG_NUM_OF_SCHEMES;
-+ DBG(WARNING, ("numOfSchemes was defined 0 by user, re-defined by driver to FM_PCD_KG_NUM_OF_SCHEMES"));
-+ }
-+
-+ p_FmPcdKg->emptyClsPlanGrpId = ILLEGAL_CLS_PLAN;
-+
-+ return p_FmPcdKg;
-+}
-+
-+t_Error KgInit(t_FmPcd *p_FmPcd)
-+{
-+ t_Error err = E_OK;
-+
-+ p_FmPcd->p_FmPcdKg->h_HwSpinlock = XX_InitSpinlock();
-+ if (!p_FmPcd->p_FmPcdKg->h_HwSpinlock)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("FM KG HW spinlock"));
-+
-+ if (p_FmPcd->guestId == NCSW_MASTER_ID)
-+ err = KgInitMaster(p_FmPcd);
-+ else
-+ err = KgInitGuest(p_FmPcd);
-+
-+ if (err != E_OK)
-+ {
-+ if (p_FmPcd->p_FmPcdKg->h_HwSpinlock)
-+ XX_FreeSpinlock(p_FmPcd->p_FmPcdKg->h_HwSpinlock);
-+ }
-+
-+ return err;
-+}
-+
-+t_Error KgFree(t_FmPcd *p_FmPcd)
-+{
-+ t_FmPcdIpcKgSchemesParams kgAlloc;
-+ t_Error err = E_OK;
-+ t_FmPcdIpcMsg msg;
-+ uint32_t replyLength;
-+ t_FmPcdIpcReply reply;
-+
-+ FmUnregisterIntr(p_FmPcd->h_Fm, e_FM_MOD_KG, 0, e_FM_INTR_TYPE_ERR);
-+
-+ if (p_FmPcd->guestId == NCSW_MASTER_ID)
-+ {
-+ err = FmPcdKgFreeSchemes(p_FmPcd,
-+ p_FmPcd->p_FmPcdKg->numOfSchemes,
-+ p_FmPcd->guestId,
-+ p_FmPcd->p_FmPcdKg->schemesIds);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ if (p_FmPcd->p_FmPcdKg->h_HwSpinlock)
-+ XX_FreeSpinlock(p_FmPcd->p_FmPcdKg->h_HwSpinlock);
-+
-+ return E_OK;
-+ }
-+
-+ /* guest */
-+ memset(&reply, 0, sizeof(reply));
-+ memset(&msg, 0, sizeof(msg));
-+ kgAlloc.numOfSchemes = p_FmPcd->p_FmPcdKg->numOfSchemes;
-+ kgAlloc.guestId = p_FmPcd->guestId;
-+ ASSERT_COND(kgAlloc.numOfSchemes < FM_PCD_KG_NUM_OF_SCHEMES);
-+ memcpy(kgAlloc.schemesIds, p_FmPcd->p_FmPcdKg->schemesIds, (sizeof(uint8_t))*kgAlloc.numOfSchemes);
-+ msg.msgId = FM_PCD_FREE_KG_SCHEMES;
-+ memcpy(msg.msgBody, &kgAlloc, sizeof(kgAlloc));
-+ replyLength = sizeof(uint32_t);
-+ if ((err = XX_IpcSendMessage(p_FmPcd->h_IpcSession,
-+ (uint8_t*)&msg,
-+ sizeof(msg.msgId) + sizeof(kgAlloc),
-+ (uint8_t*)&reply,
-+ &replyLength,
-+ NULL,
-+ NULL)) != E_OK)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ if (replyLength != sizeof(uint32_t))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("IPC reply length mismatch"));
-+
-+ if (p_FmPcd->p_FmPcdKg->h_HwSpinlock)
-+ XX_FreeSpinlock(p_FmPcd->p_FmPcdKg->h_HwSpinlock);
-+
-+ return (t_Error)reply.error;
-+}
-+
-+t_Error FmPcdKgSetOrBindToClsPlanGrp(t_Handle h_FmPcd, uint8_t hardwarePortId, uint8_t netEnvId, protocolOpt_t *p_OptArray, uint8_t *p_ClsPlanGrpId, bool *p_IsEmptyClsPlanGrp)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
-+ t_FmPcdKgInterModuleClsPlanGrpParams grpParams, *p_GrpParams;
-+ t_FmPcdKgClsPlanGrp *p_ClsPlanGrp;
-+ t_FmPcdKgInterModuleClsPlanSet *p_ClsPlanSet;
-+ t_Error err;
-+
-+ /* This function is issued only from FM_PORT_SetPcd which locked all PCD modules,
-+ so no need for lock here */
-+
-+ memset(&grpParams, 0, sizeof(grpParams));
-+ grpParams.clsPlanGrpId = ILLEGAL_CLS_PLAN;
-+ p_GrpParams = &grpParams;
-+
-+ p_GrpParams->netEnvId = netEnvId;
-+
-+ /* Get from the NetEnv the information of the clsPlan (can be already created,
-+ * or needs to build) */
-+ err = PcdGetClsPlanGrpParams(h_FmPcd, p_GrpParams);
-+ if (err)
-+ RETURN_ERROR(MINOR,err,NO_MSG);
-+
-+ if (p_GrpParams->grpExists)
-+ {
-+ /* this group was already updated (at least) in SW */
-+ *p_ClsPlanGrpId = p_GrpParams->clsPlanGrpId;
-+ }
-+ else
-+ {
-+ p_ClsPlanSet = (t_FmPcdKgInterModuleClsPlanSet *)XX_Malloc(sizeof(t_FmPcdKgInterModuleClsPlanSet));
-+ if (!p_ClsPlanSet)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("Classification plan set"));
-+ memset(p_ClsPlanSet, 0, sizeof(t_FmPcdKgInterModuleClsPlanSet));
-+ /* Build (in SW) the clsPlan parameters, including the vectors to be written to HW */
-+ err = FmPcdKgBuildClsPlanGrp(h_FmPcd, p_GrpParams, p_ClsPlanSet);
-+ if (err)
-+ {
-+ XX_Free(p_ClsPlanSet);
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+ }
-+ *p_ClsPlanGrpId = p_GrpParams->clsPlanGrpId;
-+
-+ if (p_FmPcd->h_Hc)
-+ {
-+ /* write clsPlan entries to memory */
-+ err = FmHcPcdKgSetClsPlan(p_FmPcd->h_Hc, p_ClsPlanSet);
-+ if (err)
-+ {
-+ XX_Free(p_ClsPlanSet);
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+ }
-+ else
-+ /* write clsPlan entries to memory */
-+ KgSetClsPlan(p_FmPcd, p_ClsPlanSet);
-+
-+ XX_Free(p_ClsPlanSet);
-+ }
-+
-+ /* Set caller parameters */
-+
-+ /* mark if this is an empty classification group */
-+ if (*p_ClsPlanGrpId == p_FmPcd->p_FmPcdKg->emptyClsPlanGrpId)
-+ *p_IsEmptyClsPlanGrp = TRUE;
-+ else
-+ *p_IsEmptyClsPlanGrp = FALSE;
-+
-+ p_ClsPlanGrp = &p_FmPcd->p_FmPcdKg->clsPlanGrps[*p_ClsPlanGrpId];
-+
-+ /* increment owners number */
-+ p_ClsPlanGrp->owners++;
-+
-+ /* copy options array for port */
-+ memcpy(p_OptArray, &p_FmPcd->p_FmPcdKg->clsPlanGrps[*p_ClsPlanGrpId].optArray, FM_PCD_MAX_NUM_OF_OPTIONS(FM_PCD_MAX_NUM_OF_CLS_PLANS)*sizeof(protocolOpt_t));
-+
-+ /* bind port to the new or existing group */
-+ err = BindPortToClsPlanGrp(p_FmPcd, hardwarePortId, p_GrpParams->clsPlanGrpId);
-+ if (err)
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+
-+ return E_OK;
-+}
-+
-+t_Error FmPcdKgDeleteOrUnbindPortToClsPlanGrp(t_Handle h_FmPcd, uint8_t hardwarePortId, uint8_t clsPlanGrpId)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
-+ t_FmPcdKgClsPlanGrp *p_ClsPlanGrp = &p_FmPcd->p_FmPcdKg->clsPlanGrps[clsPlanGrpId];
-+ t_FmPcdKgInterModuleClsPlanSet *p_ClsPlanSet;
-+ t_Error err;
-+
-+ /* This function is issued only from FM_PORT_DeletePcd which locked all PCD modules,
-+ so no need for lock here */
-+
-+ UnbindPortToClsPlanGrp(p_FmPcd, hardwarePortId);
-+
-+ /* decrement owners number */
-+ ASSERT_COND(p_ClsPlanGrp->owners);
-+ p_ClsPlanGrp->owners--;
-+
-+ if (!p_ClsPlanGrp->owners)
-+ {
-+ if (p_FmPcd->h_Hc)
-+ {
-+ err = FmHcPcdKgDeleteClsPlan(p_FmPcd->h_Hc, clsPlanGrpId);
-+ return err;
-+ }
-+ else
-+ {
-+ /* clear clsPlan entries in memory */
-+ p_ClsPlanSet = (t_FmPcdKgInterModuleClsPlanSet *)XX_Malloc(sizeof(t_FmPcdKgInterModuleClsPlanSet));
-+ if (!p_ClsPlanSet)
-+ {
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("Classification plan set"));
-+ }
-+ memset(p_ClsPlanSet, 0, sizeof(t_FmPcdKgInterModuleClsPlanSet));
-+
-+ p_ClsPlanSet->baseEntry = p_FmPcd->p_FmPcdKg->clsPlanGrps[clsPlanGrpId].baseEntry;
-+ p_ClsPlanSet->numOfClsPlanEntries = p_FmPcd->p_FmPcdKg->clsPlanGrps[clsPlanGrpId].sizeOfGrp;
-+ KgSetClsPlan(p_FmPcd, p_ClsPlanSet);
-+ XX_Free(p_ClsPlanSet);
-+
-+ FmPcdKgDestroyClsPlanGrp(h_FmPcd, clsPlanGrpId);
-+ }
-+ }
-+ return E_OK;
-+}
-+
-+uint32_t FmPcdKgGetRequiredAction(t_Handle h_FmPcd, uint8_t schemeId)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+ ASSERT_COND(p_FmPcd->p_FmPcdKg->schemes[schemeId].valid);
-+
-+ return p_FmPcd->p_FmPcdKg->schemes[schemeId].requiredAction;
-+}
-+
-+uint32_t FmPcdKgGetPointedOwners(t_Handle h_FmPcd, uint8_t schemeId)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+
-+ ASSERT_COND(p_FmPcd->p_FmPcdKg->schemes[schemeId].valid);
-+
-+ return p_FmPcd->p_FmPcdKg->schemes[schemeId].pointedOwners;
-+}
-+
-+bool FmPcdKgIsDirectPlcr(t_Handle h_FmPcd, uint8_t schemeId)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+
-+ ASSERT_COND(p_FmPcd->p_FmPcdKg->schemes[schemeId].valid);
-+
-+ return p_FmPcd->p_FmPcdKg->schemes[schemeId].directPlcr;
-+}
-+
-+
-+uint16_t FmPcdKgGetRelativeProfileId(t_Handle h_FmPcd, uint8_t schemeId)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+
-+ ASSERT_COND(p_FmPcd->p_FmPcdKg->schemes[schemeId].valid);
-+
-+ return p_FmPcd->p_FmPcdKg->schemes[schemeId].relativeProfileId;
-+}
-+
-+bool FmPcdKgIsDistrOnPlcrProfile(t_Handle h_FmPcd, uint8_t schemeId)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+
-+ ASSERT_COND(p_FmPcd->p_FmPcdKg->schemes[schemeId].valid);
-+
-+ if ((p_FmPcd->p_FmPcdKg->schemes[schemeId].extractedOrs &&
-+ p_FmPcd->p_FmPcdKg->schemes[schemeId].bitOffsetInPlcrProfile) ||
-+ p_FmPcd->p_FmPcdKg->schemes[schemeId].nextRelativePlcrProfile)
-+ return TRUE;
-+ else
-+ return FALSE;
-+
-+}
-+
-+e_FmPcdEngine FmPcdKgGetNextEngine(t_Handle h_FmPcd, uint8_t relativeSchemeId)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+
-+ ASSERT_COND(p_FmPcd->p_FmPcdKg->schemes[relativeSchemeId].valid);
-+
-+ return p_FmPcd->p_FmPcdKg->schemes[relativeSchemeId].nextEngine;
-+}
-+
-+e_FmPcdDoneAction FmPcdKgGetDoneAction(t_Handle h_FmPcd, uint8_t schemeId)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+
-+ ASSERT_COND(p_FmPcd->p_FmPcdKg->schemes[schemeId].valid);
-+
-+ return p_FmPcd->p_FmPcdKg->schemes[schemeId].doneAction;
-+}
-+
-+void FmPcdKgUpdateRequiredAction(t_Handle h_Scheme, uint32_t requiredAction)
-+{
-+ t_FmPcdKgScheme *p_Scheme = (t_FmPcdKgScheme *)h_Scheme;
-+
-+ /* this routine is protected by calling routine */
-+
-+ ASSERT_COND(p_Scheme->valid);
-+
-+ p_Scheme->requiredAction |= requiredAction;
-+}
-+
-+bool FmPcdKgHwSchemeIsValid(uint32_t schemeModeReg)
-+{
-+ return (bool)!!(schemeModeReg & KG_SCH_MODE_EN);
-+}
-+
-+uint32_t FmPcdKgBuildWriteSchemeActionReg(uint8_t schemeId, bool updateCounter)
-+{
-+ return (uint32_t)(((uint32_t)schemeId << FM_PCD_KG_KGAR_NUM_SHIFT) |
-+ FM_KG_KGAR_GO |
-+ FM_KG_KGAR_WRITE |
-+ FM_KG_KGAR_SEL_SCHEME_ENTRY |
-+ DUMMY_PORT_ID |
-+ (updateCounter ? FM_KG_KGAR_SCM_WSEL_UPDATE_CNT:0));
-+}
-+
-+uint32_t FmPcdKgBuildReadSchemeActionReg(uint8_t schemeId)
-+{
-+ return (uint32_t)(((uint32_t)schemeId << FM_PCD_KG_KGAR_NUM_SHIFT) |
-+ FM_KG_KGAR_GO |
-+ FM_KG_KGAR_READ |
-+ FM_KG_KGAR_SEL_SCHEME_ENTRY |
-+ DUMMY_PORT_ID |
-+ FM_KG_KGAR_SCM_WSEL_UPDATE_CNT);
-+
-+}
-+
-+uint32_t FmPcdKgBuildWriteClsPlanBlockActionReg(uint8_t grpId)
-+{
-+ return (uint32_t)(FM_KG_KGAR_GO |
-+ FM_KG_KGAR_WRITE |
-+ FM_PCD_KG_KGAR_SEL_CLS_PLAN_ENTRY |
-+ DUMMY_PORT_ID |
-+ ((uint32_t)grpId << FM_PCD_KG_KGAR_NUM_SHIFT) |
-+ FM_PCD_KG_KGAR_WSEL_MASK);
-+
-+ /* if we ever want to write 1 by 1, use:
-+ sel = (uint8_t)(0x01 << (7- (entryId % CLS_PLAN_NUM_PER_GRP)));
-+ */
-+}
-+
-+uint32_t FmPcdKgBuildWritePortSchemeBindActionReg(uint8_t hardwarePortId)
-+{
-+
-+ return (uint32_t)(FM_KG_KGAR_GO |
-+ FM_KG_KGAR_WRITE |
-+ FM_PCD_KG_KGAR_SEL_PORT_ENTRY |
-+ hardwarePortId |
-+ FM_PCD_KG_KGAR_SEL_PORT_WSEL_SP);
-+}
-+
-+uint32_t FmPcdKgBuildReadPortSchemeBindActionReg(uint8_t hardwarePortId)
-+{
-+
-+ return (uint32_t)(FM_KG_KGAR_GO |
-+ FM_KG_KGAR_READ |
-+ FM_PCD_KG_KGAR_SEL_PORT_ENTRY |
-+ hardwarePortId |
-+ FM_PCD_KG_KGAR_SEL_PORT_WSEL_SP);
-+}
-+
-+uint32_t FmPcdKgBuildWritePortClsPlanBindActionReg(uint8_t hardwarePortId)
-+{
-+
-+ return (uint32_t)(FM_KG_KGAR_GO |
-+ FM_KG_KGAR_WRITE |
-+ FM_PCD_KG_KGAR_SEL_PORT_ENTRY |
-+ hardwarePortId |
-+ FM_PCD_KG_KGAR_SEL_PORT_WSEL_CPP);
-+}
-+
-+uint8_t FmPcdKgGetClsPlanGrpBase(t_Handle h_FmPcd, uint8_t clsPlanGrp)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+
-+ return p_FmPcd->p_FmPcdKg->clsPlanGrps[clsPlanGrp].baseEntry;
-+}
-+
-+uint16_t FmPcdKgGetClsPlanGrpSize(t_Handle h_FmPcd, uint8_t clsPlanGrp)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+
-+ return p_FmPcd->p_FmPcdKg->clsPlanGrps[clsPlanGrp].sizeOfGrp;
-+}
-+
-+
-+uint8_t FmPcdKgGetSchemeId(t_Handle h_Scheme)
-+{
-+ return ((t_FmPcdKgScheme*)h_Scheme)->schemeId;
-+
-+}
-+
-+#if (DPAA_VERSION >= 11)
-+bool FmPcdKgGetVspe(t_Handle h_Scheme)
-+{
-+ return ((t_FmPcdKgScheme*)h_Scheme)->vspe;
-+
-+}
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+uint8_t FmPcdKgGetRelativeSchemeId(t_Handle h_FmPcd, uint8_t schemeId)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+ uint8_t i;
-+
-+ for (i = 0;ip_FmPcdKg->numOfSchemes;i++)
-+ if (p_FmPcd->p_FmPcdKg->schemesIds[i] == schemeId)
-+ return i;
-+
-+ if (i == p_FmPcd->p_FmPcdKg->numOfSchemes)
-+ REPORT_ERROR(MAJOR, E_NOT_IN_RANGE, ("Scheme is out of partition range"));
-+
-+ return FM_PCD_KG_NUM_OF_SCHEMES;
-+}
-+
-+t_Error FmPcdKgCcGetSetParams(t_Handle h_FmPcd, t_Handle h_Scheme, uint32_t requiredAction, uint32_t value)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+ uint8_t relativeSchemeId, physicalSchemeId;
-+ uint32_t tmpKgarReg, tmpReg32 = 0, intFlags;
-+ t_Error err;
-+ t_FmPcdKgScheme *p_Scheme = (t_FmPcdKgScheme*)h_Scheme;
-+
-+ SANITY_CHECK_RETURN_VALUE(h_FmPcd, E_INVALID_HANDLE, 0);
-+ SANITY_CHECK_RETURN_VALUE(p_FmPcd->p_FmPcdKg, E_INVALID_HANDLE, 0);
-+ SANITY_CHECK_RETURN_VALUE(!p_FmPcd->p_FmPcdDriverParam, E_INVALID_STATE, 0);
-+
-+ /* Calling function locked all PCD modules, so no need to lock here */
-+
-+ if (!FmPcdKgIsSchemeValidSw(h_Scheme))
-+ RETURN_ERROR(MAJOR, E_ALREADY_EXISTS, ("Scheme is Invalid"));
-+
-+ if (p_FmPcd->h_Hc)
-+ {
-+ err = FmHcPcdKgCcGetSetParams(p_FmPcd->h_Hc, h_Scheme, requiredAction, value);
-+
-+ UpateSchemePointedOwner(h_Scheme,TRUE);
-+ FmPcdKgUpdateRequiredAction(h_Scheme,requiredAction);
-+ return err;
-+ }
-+
-+ physicalSchemeId = p_Scheme->schemeId;
-+
-+ relativeSchemeId = FmPcdKgGetRelativeSchemeId(p_FmPcd, physicalSchemeId);
-+ if (relativeSchemeId >= FM_PCD_KG_NUM_OF_SCHEMES)
-+ RETURN_ERROR(MAJOR, E_NOT_IN_RANGE, NO_MSG);
-+
-+ if (!p_FmPcd->p_FmPcdKg->schemes[relativeSchemeId].pointedOwners ||
-+ !(p_FmPcd->p_FmPcdKg->schemes[relativeSchemeId].requiredAction & requiredAction))
-+ {
-+ if (requiredAction & UPDATE_NIA_ENQ_WITHOUT_DMA)
-+ {
-+ switch (p_FmPcd->p_FmPcdKg->schemes[relativeSchemeId].nextEngine)
-+ {
-+ case (e_FM_PCD_DONE):
-+ if (p_FmPcd->p_FmPcdKg->schemes[relativeSchemeId].doneAction == e_FM_PCD_ENQ_FRAME)
-+ {
-+ tmpKgarReg = FmPcdKgBuildReadSchemeActionReg(physicalSchemeId);
-+ intFlags = KgHwLock(p_FmPcd->p_FmPcdKg);
-+ WriteKgarWait(p_FmPcd, tmpKgarReg);
-+ tmpReg32 = GET_UINT32(p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs.kgse_mode);
-+ ASSERT_COND(tmpReg32 & (NIA_ENG_BMI | NIA_BMI_AC_ENQ_FRAME));
-+ WRITE_UINT32(p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs.kgse_mode, tmpReg32 | NIA_BMI_AC_ENQ_FRAME_WITHOUT_DMA);
-+ /* call indirect command for scheme write */
-+ tmpKgarReg = FmPcdKgBuildWriteSchemeActionReg(physicalSchemeId, FALSE);
-+ WriteKgarWait(p_FmPcd, tmpKgarReg);
-+ KgHwUnlock(p_FmPcd->p_FmPcdKg, intFlags);
-+ }
-+ break;
-+ case (e_FM_PCD_PLCR):
-+ if (!p_FmPcd->p_FmPcdKg->schemes[relativeSchemeId].directPlcr ||
-+ (p_FmPcd->p_FmPcdKg->schemes[relativeSchemeId].extractedOrs &&
-+ p_FmPcd->p_FmPcdKg->schemes[relativeSchemeId].bitOffsetInPlcrProfile) ||
-+ p_FmPcd->p_FmPcdKg->schemes[relativeSchemeId].nextRelativePlcrProfile)
-+ {
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("In this situation PP can not be with distribution and has to be shared"));
-+ }
-+ err = FmPcdPlcrCcGetSetParams(h_FmPcd, p_FmPcd->p_FmPcdKg->schemes[relativeSchemeId].relativeProfileId, requiredAction);
-+ if (err)
-+ {
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE,("in this situation the next engine after scheme can be or PLCR or ENQ_FRAME"));
-+ }
-+ }
-+ if (requiredAction & UPDATE_KG_NIA_CC_WA)
-+ {
-+ if (p_FmPcd->p_FmPcdKg->schemes[relativeSchemeId].nextEngine == e_FM_PCD_CC)
-+ {
-+ tmpKgarReg = FmPcdKgBuildReadSchemeActionReg(physicalSchemeId);
-+ intFlags = KgHwLock(p_FmPcd->p_FmPcdKg);
-+ WriteKgarWait(p_FmPcd, tmpKgarReg);
-+ tmpReg32 = GET_UINT32(p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs.kgse_mode);
-+ ASSERT_COND(tmpReg32 & (NIA_ENG_FM_CTL | NIA_FM_CTL_AC_CC));
-+ tmpReg32 &= ~NIA_FM_CTL_AC_CC;
-+ WRITE_UINT32(p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs.kgse_mode, tmpReg32 | NIA_FM_CTL_AC_PRE_CC);
-+ /* call indirect command for scheme write */
-+ tmpKgarReg = FmPcdKgBuildWriteSchemeActionReg(physicalSchemeId, FALSE);
-+ WriteKgarWait(p_FmPcd, tmpKgarReg);
-+ KgHwUnlock(p_FmPcd->p_FmPcdKg, intFlags);
-+ }
-+ }
-+ if (requiredAction & UPDATE_KG_OPT_MODE)
-+ {
-+ tmpKgarReg = FmPcdKgBuildReadSchemeActionReg(physicalSchemeId);
-+ intFlags = KgHwLock(p_FmPcd->p_FmPcdKg);
-+ WriteKgarWait(p_FmPcd, tmpKgarReg);
-+ WRITE_UINT32(p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs.kgse_om, value);
-+ /* call indirect command for scheme write */
-+ tmpKgarReg = FmPcdKgBuildWriteSchemeActionReg(physicalSchemeId, FALSE);
-+ WriteKgarWait(p_FmPcd, tmpKgarReg);
-+ KgHwUnlock(p_FmPcd->p_FmPcdKg, intFlags);
-+ }
-+ if (requiredAction & UPDATE_KG_NIA)
-+ {
-+ tmpKgarReg = FmPcdKgBuildReadSchemeActionReg(physicalSchemeId);
-+ intFlags = KgHwLock(p_FmPcd->p_FmPcdKg);
-+ WriteKgarWait(p_FmPcd, tmpKgarReg);
-+ tmpReg32 = GET_UINT32(p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs.kgse_mode);
-+ tmpReg32 &= ~(NIA_ENG_MASK | NIA_AC_MASK);
-+ tmpReg32 |= value;
-+ WRITE_UINT32(p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs.kgse_mode, tmpReg32);
-+ /* call indirect command for scheme write */
-+ tmpKgarReg = FmPcdKgBuildWriteSchemeActionReg(physicalSchemeId, FALSE);
-+ WriteKgarWait(p_FmPcd, tmpKgarReg);
-+ KgHwUnlock(p_FmPcd->p_FmPcdKg, intFlags);
-+ }
-+ }
-+
-+ UpateSchemePointedOwner(h_Scheme, TRUE);
-+ FmPcdKgUpdateRequiredAction(h_Scheme, requiredAction);
-+
-+ return E_OK;
-+}
-+/*********************** End of inter-module routines ************************/
-+
-+
-+/****************************************/
-+/* API routines */
-+/****************************************/
-+
-+t_Handle FM_PCD_KgSchemeSet(t_Handle h_FmPcd, t_FmPcdKgSchemeParams *p_SchemeParams)
-+{
-+ t_FmPcd *p_FmPcd;
-+ struct fman_kg_scheme_regs schemeRegs;
-+ struct fman_kg_scheme_regs *p_MemRegs;
-+ uint8_t i;
-+ t_Error err = E_OK;
-+ uint32_t tmpKgarReg;
-+ uint32_t intFlags;
-+ uint8_t physicalSchemeId, relativeSchemeId = 0;
-+ t_FmPcdKgScheme *p_Scheme;
-+
-+ if (p_SchemeParams->modify)
-+ {
-+ p_Scheme = (t_FmPcdKgScheme *)p_SchemeParams->id.h_Scheme;
-+ p_FmPcd = p_Scheme->h_FmPcd;
-+
-+ SANITY_CHECK_RETURN_VALUE(p_FmPcd, E_INVALID_HANDLE, NULL);
-+ SANITY_CHECK_RETURN_VALUE(p_FmPcd->p_FmPcdKg, E_INVALID_HANDLE, NULL);
-+
-+ if (!FmPcdKgIsSchemeValidSw(p_Scheme))
-+ {
-+ REPORT_ERROR(MAJOR, E_ALREADY_EXISTS,
-+ ("Scheme is invalid"));
-+ return NULL;
-+ }
-+
-+ if (!KgSchemeFlagTryLock(p_Scheme))
-+ {
-+ DBG(TRACE, ("Scheme Try Lock - BUSY"));
-+ /* Signal to caller BUSY condition */
-+ p_SchemeParams->id.h_Scheme = NULL;
-+ return NULL;
-+ }
-+ }
-+ else
-+ {
-+ p_FmPcd = (t_FmPcd*)h_FmPcd;
-+
-+ SANITY_CHECK_RETURN_VALUE(p_FmPcd, E_INVALID_HANDLE, NULL);
-+ SANITY_CHECK_RETURN_VALUE(p_FmPcd->p_FmPcdKg, E_INVALID_HANDLE, NULL);
-+
-+ relativeSchemeId = p_SchemeParams->id.relativeSchemeId;
-+ /* check that schemeId is in range */
-+ if (relativeSchemeId >= p_FmPcd->p_FmPcdKg->numOfSchemes)
-+ {
-+ REPORT_ERROR(MAJOR, E_NOT_IN_RANGE, ("relative-scheme-id %d!", relativeSchemeId));
-+ return NULL;
-+ }
-+
-+ p_Scheme = &p_FmPcd->p_FmPcdKg->schemes[relativeSchemeId];
-+ if (FmPcdKgIsSchemeValidSw(p_Scheme))
-+ {
-+ REPORT_ERROR(MAJOR, E_ALREADY_EXISTS,
-+ ("Scheme id (%d)!", relativeSchemeId));
-+ return NULL;
-+ }
-+
-+ p_Scheme->schemeId = p_FmPcd->p_FmPcdKg->schemesIds[relativeSchemeId];
-+ p_Scheme->h_FmPcd = p_FmPcd;
-+
-+ p_Scheme->p_Lock = FmPcdAcquireLock(p_FmPcd);
-+ if (!p_Scheme->p_Lock)
-+ REPORT_ERROR(MAJOR, E_NOT_AVAILABLE, ("FM KG Scheme lock obj!"));
-+ }
-+
-+ err = BuildSchemeRegs((t_Handle)p_Scheme, p_SchemeParams, &schemeRegs);
-+ if (err)
-+ {
-+ REPORT_ERROR(MAJOR, err, NO_MSG);
-+ if (p_SchemeParams->modify)
-+ KgSchemeFlagUnlock(p_Scheme);
-+ if (!p_SchemeParams->modify &&
-+ p_Scheme->p_Lock)
-+ FmPcdReleaseLock(p_FmPcd, p_Scheme->p_Lock);
-+ return NULL;
-+ }
-+
-+ if (p_FmPcd->h_Hc)
-+ {
-+ err = FmHcPcdKgSetScheme(p_FmPcd->h_Hc,
-+ (t_Handle)p_Scheme,
-+ &schemeRegs,
-+ p_SchemeParams->schemeCounter.update);
-+ if (p_SchemeParams->modify)
-+ KgSchemeFlagUnlock(p_Scheme);
-+ if (err)
-+ {
-+ if (!p_SchemeParams->modify &&
-+ p_Scheme->p_Lock)
-+ FmPcdReleaseLock(p_FmPcd, p_Scheme->p_Lock);
-+ return NULL;
-+ }
-+ if (!p_SchemeParams->modify)
-+ ValidateSchemeSw(p_Scheme);
-+ return (t_Handle)p_Scheme;
-+ }
-+
-+ physicalSchemeId = p_Scheme->schemeId;
-+
-+ /* configure all 21 scheme registers */
-+ p_MemRegs = &p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs;
-+ intFlags = KgHwLock(p_FmPcd->p_FmPcdKg);
-+ WRITE_UINT32(p_MemRegs->kgse_ppc, schemeRegs.kgse_ppc);
-+ WRITE_UINT32(p_MemRegs->kgse_ccbs, schemeRegs.kgse_ccbs);
-+ WRITE_UINT32(p_MemRegs->kgse_mode, schemeRegs.kgse_mode);
-+ WRITE_UINT32(p_MemRegs->kgse_mv, schemeRegs.kgse_mv);
-+ WRITE_UINT32(p_MemRegs->kgse_dv0, schemeRegs.kgse_dv0);
-+ WRITE_UINT32(p_MemRegs->kgse_dv1, schemeRegs.kgse_dv1);
-+ WRITE_UINT32(p_MemRegs->kgse_ekdv, schemeRegs.kgse_ekdv);
-+ WRITE_UINT32(p_MemRegs->kgse_ekfc, schemeRegs.kgse_ekfc);
-+ WRITE_UINT32(p_MemRegs->kgse_bmch, schemeRegs.kgse_bmch);
-+ WRITE_UINT32(p_MemRegs->kgse_bmcl, schemeRegs.kgse_bmcl);
-+ WRITE_UINT32(p_MemRegs->kgse_hc, schemeRegs.kgse_hc);
-+ WRITE_UINT32(p_MemRegs->kgse_spc, schemeRegs.kgse_spc);
-+ WRITE_UINT32(p_MemRegs->kgse_fqb, schemeRegs.kgse_fqb);
-+ WRITE_UINT32(p_MemRegs->kgse_om, schemeRegs.kgse_om);
-+ WRITE_UINT32(p_MemRegs->kgse_vsp, schemeRegs.kgse_vsp);
-+ for (i=0 ; ikgse_gec[i], schemeRegs.kgse_gec[i]);
-+
-+ /* call indirect command for scheme write */
-+ tmpKgarReg = FmPcdKgBuildWriteSchemeActionReg(physicalSchemeId, p_SchemeParams->schemeCounter.update);
-+
-+ WriteKgarWait(p_FmPcd, tmpKgarReg);
-+ KgHwUnlock(p_FmPcd->p_FmPcdKg, intFlags);
-+
-+ if (!p_SchemeParams->modify)
-+ ValidateSchemeSw(p_Scheme);
-+ else
-+ KgSchemeFlagUnlock(p_Scheme);
-+
-+ return (t_Handle)p_Scheme;
-+}
-+
-+t_Error FM_PCD_KgSchemeDelete(t_Handle h_Scheme)
-+{
-+ t_FmPcd *p_FmPcd;
-+ uint8_t physicalSchemeId;
-+ uint32_t tmpKgarReg, intFlags;
-+ t_Error err = E_OK;
-+ t_FmPcdKgScheme *p_Scheme = (t_FmPcdKgScheme *)h_Scheme;
-+
-+ SANITY_CHECK_RETURN_ERROR(h_Scheme, E_INVALID_HANDLE);
-+
-+ p_FmPcd = (t_FmPcd*)(p_Scheme->h_FmPcd);
-+
-+ /* check that no port is bound to this scheme */
-+ err = InvalidateSchemeSw(h_Scheme);
-+ if (err)
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+
-+ if (p_FmPcd->h_Hc)
-+ {
-+ err = FmHcPcdKgDeleteScheme(p_FmPcd->h_Hc, h_Scheme);
-+ if (p_Scheme->p_Lock)
-+ FmPcdReleaseLock(p_FmPcd, p_Scheme->p_Lock);
-+ return err;
-+ }
-+
-+ physicalSchemeId = ((t_FmPcdKgScheme *)h_Scheme)->schemeId;
-+
-+ intFlags = KgHwLock(p_FmPcd->p_FmPcdKg);
-+ /* clear mode register, including enable bit */
-+ WRITE_UINT32(p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs.kgse_mode, 0);
-+
-+ /* call indirect command for scheme write */
-+ tmpKgarReg = FmPcdKgBuildWriteSchemeActionReg(physicalSchemeId, FALSE);
-+
-+ WriteKgarWait(p_FmPcd, tmpKgarReg);
-+ KgHwUnlock(p_FmPcd->p_FmPcdKg, intFlags);
-+
-+ if (p_Scheme->p_Lock)
-+ FmPcdReleaseLock(p_FmPcd, p_Scheme->p_Lock);
-+
-+ return E_OK;
-+}
-+
-+uint32_t FM_PCD_KgSchemeGetCounter(t_Handle h_Scheme)
-+{
-+ t_FmPcd *p_FmPcd;
-+ uint32_t tmpKgarReg, spc, intFlags;
-+ uint8_t physicalSchemeId;
-+
-+ SANITY_CHECK_RETURN_VALUE(h_Scheme, E_INVALID_HANDLE, 0);
-+
-+ p_FmPcd = (t_FmPcd*)(((t_FmPcdKgScheme *)h_Scheme)->h_FmPcd);
-+ if (p_FmPcd->h_Hc)
-+ return FmHcPcdKgGetSchemeCounter(p_FmPcd->h_Hc, h_Scheme);
-+
-+ physicalSchemeId = ((t_FmPcdKgScheme *)h_Scheme)->schemeId;
-+
-+ if (FmPcdKgGetRelativeSchemeId(p_FmPcd, physicalSchemeId) == FM_PCD_KG_NUM_OF_SCHEMES)
-+ REPORT_ERROR(MAJOR, E_NOT_IN_RANGE, NO_MSG);
-+
-+ tmpKgarReg = FmPcdKgBuildReadSchemeActionReg(physicalSchemeId);
-+ intFlags = KgHwLock(p_FmPcd->p_FmPcdKg);
-+ WriteKgarWait(p_FmPcd, tmpKgarReg);
-+ if (!(GET_UINT32(p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs.kgse_mode) & KG_SCH_MODE_EN))
-+ REPORT_ERROR(MAJOR, E_ALREADY_EXISTS, ("Scheme is Invalid"));
-+ spc = GET_UINT32(p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs.kgse_spc);
-+ KgHwUnlock(p_FmPcd->p_FmPcdKg, intFlags);
-+
-+ return spc;
-+}
-+
-+t_Error FM_PCD_KgSchemeSetCounter(t_Handle h_Scheme, uint32_t value)
-+{
-+ t_FmPcd *p_FmPcd;
-+ uint32_t tmpKgarReg, intFlags;
-+ uint8_t physicalSchemeId;
-+
-+ SANITY_CHECK_RETURN_VALUE(h_Scheme, E_INVALID_HANDLE, 0);
-+
-+ p_FmPcd = (t_FmPcd*)(((t_FmPcdKgScheme *)h_Scheme)->h_FmPcd);
-+
-+ if (!FmPcdKgIsSchemeValidSw(h_Scheme))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Requested scheme is invalid."));
-+
-+ if (p_FmPcd->h_Hc)
-+ return FmHcPcdKgSetSchemeCounter(p_FmPcd->h_Hc, h_Scheme, value);
-+
-+ physicalSchemeId = ((t_FmPcdKgScheme *)h_Scheme)->schemeId;
-+ /* check that schemeId is in range */
-+ if (FmPcdKgGetRelativeSchemeId(p_FmPcd, physicalSchemeId) == FM_PCD_KG_NUM_OF_SCHEMES)
-+ REPORT_ERROR(MAJOR, E_NOT_IN_RANGE, NO_MSG);
-+
-+ /* read specified scheme into scheme registers */
-+ tmpKgarReg = FmPcdKgBuildReadSchemeActionReg(physicalSchemeId);
-+ intFlags = KgHwLock(p_FmPcd->p_FmPcdKg);
-+ WriteKgarWait(p_FmPcd, tmpKgarReg);
-+ if (!(GET_UINT32(p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs.kgse_mode) & KG_SCH_MODE_EN))
-+ {
-+ KgHwUnlock(p_FmPcd->p_FmPcdKg, intFlags);
-+ RETURN_ERROR(MAJOR, E_ALREADY_EXISTS, ("Scheme is Invalid"));
-+ }
-+
-+ /* change counter value */
-+ WRITE_UINT32(p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs.kgse_spc, value);
-+
-+ /* call indirect command for scheme write */
-+ tmpKgarReg = FmPcdKgBuildWriteSchemeActionReg(physicalSchemeId, TRUE);
-+
-+ WriteKgarWait(p_FmPcd, tmpKgarReg);
-+ KgHwUnlock(p_FmPcd->p_FmPcdKg, intFlags);
-+
-+ return E_OK;
-+}
-+
-+t_Error FM_PCD_KgSetAdditionalDataAfterParsing(t_Handle h_FmPcd, uint8_t payloadOffset)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+ struct fman_kg_regs *p_Regs;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_FmPcd->p_FmPcdDriverParam, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdKg, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs, E_NULL_POINTER);
-+
-+ p_Regs = p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs;
-+ if (!FmIsMaster(p_FmPcd->h_Fm))
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("FM_PCD_KgSetAdditionalDataAfterParsing - guest mode!"));
-+
-+ WRITE_UINT32(p_Regs->fmkg_fdor,payloadOffset);
-+
-+ return E_OK;
-+}
-+
-+t_Error FM_PCD_KgSetDfltValue(t_Handle h_FmPcd, uint8_t valueId, uint32_t value)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+ struct fman_kg_regs *p_Regs;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(((valueId == 0) || (valueId == 1)), E_INVALID_VALUE);
-+ SANITY_CHECK_RETURN_ERROR(!p_FmPcd->p_FmPcdDriverParam, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdKg, E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs, E_NULL_POINTER);
-+
-+ p_Regs = p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs;
-+
-+ if (!FmIsMaster(p_FmPcd->h_Fm))
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("FM_PCD_KgSetDfltValue - guest mode!"));
-+
-+ if (valueId == 0)
-+ WRITE_UINT32(p_Regs->fmkg_gdv0r,value);
-+ else
-+ WRITE_UINT32(p_Regs->fmkg_gdv1r,value);
-+ return E_OK;
-+}
-+
-+#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))
-+t_Error FM_PCD_KgDumpRegs(t_Handle h_FmPcd)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+ int i = 0, j = 0;
-+ uint8_t hardwarePortId = 0;
-+ uint32_t tmpKgarReg, intFlags;
-+ t_Error err = E_OK;
-+
-+ DECLARE_DUMP;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdKg, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_FmPcd->p_FmPcdDriverParam, E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR(((p_FmPcd->guestId == NCSW_MASTER_ID) ||
-+ p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs), E_INVALID_OPERATION);
-+
-+ DUMP_SUBTITLE(("\n"));
-+ DUMP_TITLE(p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs, ("FmPcdKgRegs Regs"));
-+
-+ DUMP_VAR(p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs,fmkg_gcr);
-+ DUMP_VAR(p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs,fmkg_eer);
-+ DUMP_VAR(p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs,fmkg_eeer);
-+ DUMP_VAR(p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs,fmkg_seer);
-+ DUMP_VAR(p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs,fmkg_seeer);
-+ DUMP_VAR(p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs,fmkg_gsr);
-+ DUMP_VAR(p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs,fmkg_tpc);
-+ DUMP_VAR(p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs,fmkg_serc);
-+ DUMP_VAR(p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs,fmkg_fdor);
-+ DUMP_VAR(p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs,fmkg_gdv0r);
-+ DUMP_VAR(p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs,fmkg_gdv1r);
-+ DUMP_VAR(p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs,fmkg_feer);
-+ DUMP_VAR(p_FmPcd->p_FmPcdKg->p_FmPcdKgRegs,fmkg_ar);
-+
-+ DUMP_SUBTITLE(("\n"));
-+ intFlags = KgHwLock(p_FmPcd->p_FmPcdKg);
-+ for (j = 0;jp_FmPcdKg->p_IndirectAccessRegs->schemeRegs, ("FmPcdKgIndirectAccessSchemeRegs Scheme %d Regs", j));
-+
-+ DUMP_VAR(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs,kgse_mode);
-+ DUMP_VAR(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs,kgse_ekfc);
-+ DUMP_VAR(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs,kgse_ekdv);
-+ DUMP_VAR(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs,kgse_bmch);
-+ DUMP_VAR(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs,kgse_bmcl);
-+ DUMP_VAR(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs,kgse_fqb);
-+ DUMP_VAR(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs,kgse_hc);
-+ DUMP_VAR(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs,kgse_ppc);
-+
-+ DUMP_TITLE(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs.kgse_gec, ("kgse_gec"));
-+ DUMP_SUBSTRUCT_ARRAY(i, FM_KG_NUM_OF_GENERIC_REGS)
-+ {
-+ DUMP_MEMORY(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs.kgse_gec[i], sizeof(uint32_t));
-+ }
-+
-+ DUMP_VAR(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs,kgse_spc);
-+ DUMP_VAR(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs,kgse_dv0);
-+ DUMP_VAR(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs,kgse_dv1);
-+ DUMP_VAR(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs,kgse_ccbs);
-+ DUMP_VAR(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->schemeRegs,kgse_mv);
-+ }
-+ DUMP_SUBTITLE(("\n"));
-+
-+ for (i=0;ip_FmPcdKg->p_IndirectAccessRegs->portRegs, ("FmPcdKgIndirectAccessPortRegs PCD Port %d regs", hardwarePortId));
-+
-+ DUMP_VAR(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->portRegs, fmkg_pe_sp);
-+ DUMP_VAR(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->portRegs, fmkg_pe_cpp);
-+ }
-+
-+ DUMP_SUBTITLE(("\n"));
-+ for (j=0;jp_FmPcdKg->p_IndirectAccessRegs->clsPlanRegs, ("FmPcdKgIndirectAccessClsPlanRegs Regs group %d", j));
-+ DUMP_TITLE(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->clsPlanRegs.kgcpe, ("kgcpe"));
-+
-+ tmpKgarReg = ReadClsPlanBlockActionReg((uint8_t)j);
-+ err = WriteKgarWait(p_FmPcd, tmpKgarReg);
-+ if (err)
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+ DUMP_SUBSTRUCT_ARRAY(i, 8)
-+ DUMP_MEMORY(&p_FmPcd->p_FmPcdKg->p_IndirectAccessRegs->clsPlanRegs.kgcpe[i], sizeof(uint32_t));
-+ }
-+ KgHwUnlock(p_FmPcd->p_FmPcdKg, intFlags);
-+
-+ return E_OK;
-+}
-+#endif /* (defined(DEBUG_ERRORS) && ... */
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/fm_kg.h b/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/fm_kg.h
-new file mode 100644
-index 0000000..cb7521a
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/fm_kg.h
-@@ -0,0 +1,206 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+/******************************************************************************
-+ @File fm_kg.h
-+
-+ @Description FM KG private header
-+*//***************************************************************************/
-+#ifndef __FM_KG_H
-+#define __FM_KG_H
-+
-+#include "std_ext.h"
-+
-+/***********************************************************************/
-+/* Keygen defines */
-+/***********************************************************************/
-+/* maskes */
-+#if (DPAA_VERSION >= 11)
-+#define KG_SCH_VSP_SHIFT_MASK 0x0003f000
-+#define KG_SCH_OM_VSPE 0x00000001
-+#define KG_SCH_VSP_NO_KSP_EN 0x80000000
-+
-+#define MAX_SP_SHIFT 23
-+#define KG_SCH_VSP_MASK_SHIFT 12
-+#define KG_SCH_VSP_SHIFT 24
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+typedef uint32_t t_KnownFieldsMasks;
-+#define KG_SCH_KN_PORT_ID 0x80000000
-+#define KG_SCH_KN_MACDST 0x40000000
-+#define KG_SCH_KN_MACSRC 0x20000000
-+#define KG_SCH_KN_TCI1 0x10000000
-+#define KG_SCH_KN_TCI2 0x08000000
-+#define KG_SCH_KN_ETYPE 0x04000000
-+#define KG_SCH_KN_PPPSID 0x02000000
-+#define KG_SCH_KN_PPPID 0x01000000
-+#define KG_SCH_KN_MPLS1 0x00800000
-+#define KG_SCH_KN_MPLS2 0x00400000
-+#define KG_SCH_KN_MPLS_LAST 0x00200000
-+#define KG_SCH_KN_IPSRC1 0x00100000
-+#define KG_SCH_KN_IPDST1 0x00080000
-+#define KG_SCH_KN_PTYPE1 0x00040000
-+#define KG_SCH_KN_IPTOS_TC1 0x00020000
-+#define KG_SCH_KN_IPV6FL1 0x00010000
-+#define KG_SCH_KN_IPSRC2 0x00008000
-+#define KG_SCH_KN_IPDST2 0x00004000
-+#define KG_SCH_KN_PTYPE2 0x00002000
-+#define KG_SCH_KN_IPTOS_TC2 0x00001000
-+#define KG_SCH_KN_IPV6FL2 0x00000800
-+#define KG_SCH_KN_GREPTYPE 0x00000400
-+#define KG_SCH_KN_IPSEC_SPI 0x00000200
-+#define KG_SCH_KN_IPSEC_NH 0x00000100
-+#define KG_SCH_KN_IPPID 0x00000080
-+#define KG_SCH_KN_L4PSRC 0x00000004
-+#define KG_SCH_KN_L4PDST 0x00000002
-+#define KG_SCH_KN_TFLG 0x00000001
-+
-+typedef uint8_t t_GenericCodes;
-+#define KG_SCH_GEN_SHIM1 0x70
-+#define KG_SCH_GEN_DEFAULT 0x10
-+#define KG_SCH_GEN_PARSE_RESULT_N_FQID 0x20
-+#define KG_SCH_GEN_START_OF_FRM 0x40
-+#define KG_SCH_GEN_SHIM2 0x71
-+#define KG_SCH_GEN_IP_PID_NO_V 0x72
-+#define KG_SCH_GEN_ETH 0x03
-+#define KG_SCH_GEN_ETH_NO_V 0x73
-+#define KG_SCH_GEN_SNAP 0x04
-+#define KG_SCH_GEN_SNAP_NO_V 0x74
-+#define KG_SCH_GEN_VLAN1 0x05
-+#define KG_SCH_GEN_VLAN1_NO_V 0x75
-+#define KG_SCH_GEN_VLAN2 0x06
-+#define KG_SCH_GEN_VLAN2_NO_V 0x76
-+#define KG_SCH_GEN_ETH_TYPE 0x07
-+#define KG_SCH_GEN_ETH_TYPE_NO_V 0x77
-+#define KG_SCH_GEN_PPP 0x08
-+#define KG_SCH_GEN_PPP_NO_V 0x78
-+#define KG_SCH_GEN_MPLS1 0x09
-+#define KG_SCH_GEN_MPLS2 0x19
-+#define KG_SCH_GEN_MPLS3 0x29
-+#define KG_SCH_GEN_MPLS1_NO_V 0x79
-+#define KG_SCH_GEN_MPLS_LAST 0x0a
-+#define KG_SCH_GEN_MPLS_LAST_NO_V 0x7a
-+#define KG_SCH_GEN_IPV4 0x0b
-+#define KG_SCH_GEN_IPV6 0x1b
-+#define KG_SCH_GEN_L3_NO_V 0x7b
-+#define KG_SCH_GEN_IPV4_TUNNELED 0x0c
-+#define KG_SCH_GEN_IPV6_TUNNELED 0x1c
-+#define KG_SCH_GEN_MIN_ENCAP 0x2c
-+#define KG_SCH_GEN_IP2_NO_V 0x7c
-+#define KG_SCH_GEN_GRE 0x0d
-+#define KG_SCH_GEN_GRE_NO_V 0x7d
-+#define KG_SCH_GEN_TCP 0x0e
-+#define KG_SCH_GEN_UDP 0x1e
-+#define KG_SCH_GEN_IPSEC_AH 0x2e
-+#define KG_SCH_GEN_SCTP 0x3e
-+#define KG_SCH_GEN_DCCP 0x4e
-+#define KG_SCH_GEN_IPSEC_ESP 0x6e
-+#define KG_SCH_GEN_L4_NO_V 0x7e
-+#define KG_SCH_GEN_NEXTHDR 0x7f
-+/* shifts */
-+#define KG_SCH_PP_SHIFT_HIGH_SHIFT 27
-+#define KG_SCH_PP_SHIFT_LOW_SHIFT 12
-+#define KG_SCH_PP_MASK_SHIFT 16
-+#define KG_SCH_MODE_CCOBASE_SHIFT 24
-+#define KG_SCH_DEF_MAC_ADDR_SHIFT 30
-+#define KG_SCH_DEF_TCI_SHIFT 28
-+#define KG_SCH_DEF_ENET_TYPE_SHIFT 26
-+#define KG_SCH_DEF_PPP_SESSION_ID_SHIFT 24
-+#define KG_SCH_DEF_PPP_PROTOCOL_ID_SHIFT 22
-+#define KG_SCH_DEF_MPLS_LABEL_SHIFT 20
-+#define KG_SCH_DEF_IP_ADDR_SHIFT 18
-+#define KG_SCH_DEF_PROTOCOL_TYPE_SHIFT 16
-+#define KG_SCH_DEF_IP_TOS_TC_SHIFT 14
-+#define KG_SCH_DEF_IPV6_FLOW_LABEL_SHIFT 12
-+#define KG_SCH_DEF_IPSEC_SPI_SHIFT 10
-+#define KG_SCH_DEF_L4_PORT_SHIFT 8
-+#define KG_SCH_DEF_TCP_FLAG_SHIFT 6
-+#define KG_SCH_HASH_CONFIG_SHIFT_SHIFT 24
-+#define KG_SCH_GEN_MASK_SHIFT 16
-+#define KG_SCH_GEN_HT_SHIFT 8
-+#define KG_SCH_GEN_SIZE_SHIFT 24
-+#define KG_SCH_GEN_DEF_SHIFT 29
-+#define FM_PCD_KG_KGAR_NUM_SHIFT 16
-+
-+/* others */
-+#define NUM_OF_SW_DEFAULTS 3
-+#define MAX_PP_SHIFT 23
-+#define MAX_KG_SCH_SIZE 16
-+#define MASK_FOR_GENERIC_BASE_ID 0x20
-+#define MAX_HASH_SHIFT 40
-+#define MAX_KG_SCH_FQID_BIT_OFFSET 31
-+#define MAX_KG_SCH_PP_BIT_OFFSET 15
-+#define MAX_DIST_FQID_SHIFT 23
-+
-+#define GET_MASK_SEL_SHIFT(shift,i) \
-+switch (i) { \
-+ case (0):shift = 26;break; \
-+ case (1):shift = 20;break; \
-+ case (2):shift = 10;break; \
-+ case (3):shift = 4;break; \
-+ default: \
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, NO_MSG); \
-+}
-+
-+#define GET_MASK_OFFSET_SHIFT(shift,i) \
-+switch (i) { \
-+ case (0):shift = 16;break; \
-+ case (1):shift = 0;break; \
-+ case (2):shift = 28;break; \
-+ case (3):shift = 24;break; \
-+ default: \
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, NO_MSG); \
-+}
-+
-+#define GET_MASK_SHIFT(shift,i) \
-+switch (i) { \
-+ case (0):shift = 24;break; \
-+ case (1):shift = 16;break; \
-+ case (2):shift = 8;break; \
-+ case (3):shift = 0;break; \
-+ default: \
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, NO_MSG); \
-+}
-+
-+/***********************************************************************/
-+/* Keygen defines */
-+/***********************************************************************/
-+
-+#define KG_DOUBLE_MEANING_REGS_OFFSET 0x100
-+#define NO_VALIDATION 0x70
-+#define KG_ACTION_REG_TO 1024
-+#define KG_MAX_PROFILE 255
-+#define SCHEME_ALWAYS_DIRECT 0xFFFFFFFF
-+
-+
-+#endif /* __FM_KG_H */
-diff --git a/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/fm_manip.c b/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/fm_manip.c
-new file mode 100644
-index 0000000..e6c8d2d
---- /dev/null
-+++ b/drivers/net/dpa/NetCommSw/Peripherals/FM/Pcd/fm_manip.c
-@@ -0,0 +1,4193 @@
-+/*
-+ * Copyright 2008-2012 Freescale Semiconductor Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Freescale Semiconductor nor the
-+ * names of its contributors may be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ *
-+ * ALTERNATIVELY, this software may be distributed under the terms of the
-+ * GNU General Public License ("GPL") as published by the Free Software
-+ * Foundation, either version 2 of that License or (at your option) any
-+ * later version.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
-+ */
-+
-+
-+/******************************************************************************
-+ @File fm_manip.c
-+
-+ @Description FM PCD manip ...
-+*//***************************************************************************/
-+#include "std_ext.h"
-+#include "error_ext.h"
-+#include "string_ext.h"
-+#include "debug_ext.h"
-+#include "fm_pcd_ext.h"
-+#include "fm_port_ext.h"
-+#include "fm_muram_ext.h"
-+#include "memcpy_ext.h"
-+
-+#include "fm_common.h"
-+#include "fm_hc.h"
-+#include "fm_manip.h"
-+
-+
-+/****************************************/
-+/* static functions */
-+/****************************************/
-+static t_Handle GetManipInfo(t_FmPcdManip *p_Manip, e_ManipInfo manipInfo)
-+{
-+ t_FmPcdManip *p_CurManip = p_Manip;
-+
-+ if (!MANIP_IS_UNIFIED(p_Manip))
-+ p_CurManip = p_Manip;
-+ else
-+ {
-+ /* go to first unified */
-+ while (MANIP_IS_UNIFIED_NON_FIRST(p_CurManip))
-+ p_CurManip = p_CurManip->h_PrevManip;
-+ }
-+
-+ switch (manipInfo)
-+ {
-+ case (e_MANIP_HMCT):
-+ return p_CurManip->p_Hmct;
-+ case (e_MANIP_HMTD):
-+ return p_CurManip->h_Ad;
-+ case (e_MANIP_HANDLER_TABLE_OWNER):
-+ return (t_Handle)p_CurManip;
-+ default:
-+ return NULL;
-+ }
-+}
-+static uint16_t GetHmctSize(t_FmPcdManip *p_Manip)
-+{
-+ uint16_t size = 0;
-+ t_FmPcdManip *p_CurManip = p_Manip;
-+
-+ if (!MANIP_IS_UNIFIED(p_Manip))
-+ return p_Manip->tableSize;
-+
-+ /* accumulate sizes, starting with the first node */
-+ while (MANIP_IS_UNIFIED_NON_FIRST(p_CurManip))
-+ p_CurManip = p_CurManip->h_PrevManip;
-+
-+ while (MANIP_IS_UNIFIED_NON_LAST(p_CurManip))
-+ {
-+ size += p_CurManip->tableSize;
-+ p_CurManip = (t_FmPcdManip *)p_CurManip->h_NextManip;
-+ }
-+ size += p_CurManip->tableSize; /* add last size */
-+
-+ return(size);
-+}
-+static uint16_t GetDataSize(t_FmPcdManip *p_Manip)
-+{
-+ uint16_t size = 0;
-+ t_FmPcdManip *p_CurManip = p_Manip;
-+
-+ if (!MANIP_IS_UNIFIED(p_Manip))
-+ return p_Manip->dataSize;
-+
-+ /* accumulate sizes, starting with the first node */
-+ while (MANIP_IS_UNIFIED_NON_FIRST(p_CurManip))
-+ p_CurManip = p_CurManip->h_PrevManip;
-+
-+ while (MANIP_IS_UNIFIED_NON_LAST(p_CurManip))
-+ {
-+ size += p_CurManip->dataSize;
-+ p_CurManip = (t_FmPcdManip *)p_CurManip->h_NextManip;
-+ }
-+ size += p_CurManip->dataSize; /* add last size */
-+
-+ return(size);
-+}
-+static t_Error CalculateTableSize(t_FmPcdManipParams *p_FmPcdManipParams, uint16_t *p_TableSize, uint8_t *p_DataSize)
-+{
-+ uint8_t localDataSize, remain, tableSize = 0, dataSize = 0;
-+
-+ if (p_FmPcdManipParams->u.hdr.rmv)
-+ {
-+ switch (p_FmPcdManipParams->u.hdr.rmvParams.type){
-+ case (e_FM_PCD_MANIP_RMV_GENERIC):
-+ case (e_FM_PCD_MANIP_RMV_BY_HDR):
-+ /* As long as the only rmv command is the L2, no check on type is required */
-+ tableSize += HMCD_BASIC_SIZE;
-+ break;
-+ default:
-+ RETURN_ERROR(MINOR, E_INVALID_SELECTION, ("Unknown rmvParams.type"));
-+ }
-+ }
-+
-+ if (p_FmPcdManipParams->u.hdr.insrt)
-+ {
-+ switch (p_FmPcdManipParams->u.hdr.insrtParams.type){
-+ case (e_FM_PCD_MANIP_INSRT_GENERIC):
-+ remain = (uint8_t)(p_FmPcdManipParams->u.hdr.insrtParams.u.generic.size % 4);
-+ if (remain)
-+ localDataSize = (uint8_t)(p_FmPcdManipParams->u.hdr.insrtParams.u.generic.size + 4 - remain);
-+ else
-+ localDataSize = p_FmPcdManipParams->u.hdr.insrtParams.u.generic.size;
-+ tableSize += (uint8_t)(HMCD_BASIC_SIZE + localDataSize);
-+ break;
-+ case (e_FM_PCD_MANIP_INSRT_BY_HDR):
-+ /* As long as the only insert command is the internal L2, no check on type is required */
-+ tableSize += HMCD_BASIC_SIZE+HMCD_PTR_SIZE;
-+ if (p_FmPcdManipParams->u.hdr.insrtParams.u.byHdr.type == e_FM_PCD_MANIP_INSRT_BY_HDR_SPECIFIC_L2)
-+ switch (p_FmPcdManipParams->u.hdr.insrtParams.u.byHdr.u.specificL2Params.specificL2)
-+ {
-+ case (e_FM_PCD_MANIP_HDR_INSRT_MPLS):
-+ dataSize += p_FmPcdManipParams->u.hdr.insrtParams.u.byHdr.u.specificL2Params.size;
-+ break;
-+ default:
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+ }
-+ break;
-+ default:
-+ RETURN_ERROR(MINOR, E_INVALID_SELECTION, ("Unknown insrtParams.type"));
-+ }
-+ }
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdate)
-+ {
-+ switch (p_FmPcdManipParams->u.hdr.fieldUpdateParams.type){
-+ case (e_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN):
-+ tableSize += HMCD_BASIC_SIZE;
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.vlan.updateType ==
-+ e_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN)
-+ {
-+ tableSize += HMCD_PTR_SIZE;
-+ dataSize += DSCP_TO_VLAN_TABLE_SIZE;
-+ }
-+ break;
-+ case (e_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV4):
-+ tableSize += HMCD_BASIC_SIZE;
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv4.validUpdates & HDR_MANIP_IPV4_ID)
-+ {
-+ tableSize += HMCD_PARAM_SIZE;
-+ dataSize += 2;
-+ }
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv4.validUpdates & HDR_MANIP_IPV4_SRC)
-+ tableSize += HMCD_IPV4_ADDR_SIZE;
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv4.validUpdates & HDR_MANIP_IPV4_DST)
-+ tableSize += HMCD_IPV4_ADDR_SIZE;
-+ break;
-+ case (e_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV6):
-+ tableSize += HMCD_BASIC_SIZE;
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv4.validUpdates & HDR_MANIP_IPV6_SRC)
-+ tableSize += HMCD_IPV6_ADDR_SIZE;
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv4.validUpdates & HDR_MANIP_IPV6_DST)
-+ tableSize += HMCD_IPV6_ADDR_SIZE;
-+ break;
-+ case (e_FM_PCD_MANIP_HDR_FIELD_UPDATE_TCP_UDP):
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.tcpUdp.validUpdates == HDR_MANIP_TCP_UDP_CHECKSUM)
-+ /* we implement this case with the update-checksum descriptor */
-+ tableSize += HMCD_BASIC_SIZE;
-+ else
-+ /* we implement this case with the TCP/UDP-update descriptor */
-+ tableSize += HMCD_BASIC_SIZE + HMCD_PARAM_SIZE;
-+ break;
-+ default:
-+ RETURN_ERROR(MINOR, E_INVALID_SELECTION, ("Unknown fieldUpdateParams.type"));
-+ }
-+ }
-+
-+ if (p_FmPcdManipParams->u.hdr.custom)
-+ {
-+ switch (p_FmPcdManipParams->u.hdr.customParams.type){
-+ case (e_FM_PCD_MANIP_HDR_CUSTOM_IP_REPLACE):
-+ {
-+ tableSize += HMCD_BASIC_SIZE + HMCD_PARAM_SIZE + HMCD_PARAM_SIZE;
-+ dataSize += p_FmPcdManipParams->u.hdr.customParams.u.ipHdrReplace.hdrSize;
-+ if ((p_FmPcdManipParams->u.hdr.customParams.u.ipHdrReplace.replaceType == e_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV6_BY_IPV4) &&
-+ (p_FmPcdManipParams->u.hdr.customParams.u.ipHdrReplace.updateIpv4Id))
-+ dataSize += 2;
-+ }
-+ break;
-+ default:
-+ RETURN_ERROR(MINOR, E_INVALID_SELECTION, ("Unknown customParams.type"));
-+ }
-+ }
-+
-+ *p_TableSize = tableSize;
-+ *p_DataSize = dataSize;
-+
-+ return E_OK;
-+}
-+
-+static t_Error BuildHmct(t_FmPcdManip *p_Manip, t_FmPcdManipParams *p_FmPcdManipParams, uint8_t *p_DestHmct, uint8_t *p_DestData, bool new)
-+{
-+ uint32_t *p_TmpHmct = (uint32_t*)p_DestHmct, *p_LocalData;
-+ uint32_t tmpReg=0, *p_Last = NULL;
-+ uint8_t remain, i, size=0, origSize, *p_UsrData = NULL, *p_TmpData = p_DestData;
-+ t_Handle h_FmPcd = p_Manip->h_FmPcd;
-+ uint8_t j=0;
-+
-+ if (p_FmPcdManipParams->u.hdr.rmv)
-+ {
-+ if (p_FmPcdManipParams->u.hdr.rmvParams.type == e_FM_PCD_MANIP_RMV_GENERIC)
-+ {
-+ /* initialize HMCD */
-+ tmpReg = (uint32_t)(HMCD_OPCODE_GENERIC_RMV) << HMCD_OC_SHIFT;
-+ /* tmp, should be conditional */
-+ tmpReg |= p_FmPcdManipParams->u.hdr.rmvParams.u.generic.offset << HMCD_RMV_OFFSET_SHIFT;
-+ tmpReg |= p_FmPcdManipParams->u.hdr.rmvParams.u.generic.size << HMCD_RMV_SIZE_SHIFT;
-+ }
-+ else if (p_FmPcdManipParams->u.hdr.rmvParams.type == e_FM_PCD_MANIP_RMV_BY_HDR)
-+ {
-+ uint8_t hmcdOpt;
-+ if (!p_FmPcdManipParams->u.hdr.rmvParams.u.byHdr.type == e_FM_PCD_MANIP_RMV_BY_HDR_SPECIFIC_L2)
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+
-+ /* initialize HMCD */
-+ tmpReg = (uint32_t)(HMCD_OPCODE_L2_RMV) << HMCD_OC_SHIFT;
-+
-+ switch (p_FmPcdManipParams->u.hdr.rmvParams.u.byHdr.u.specificL2)
-+ {
-+ case (e_FM_PCD_MANIP_HDR_RMV_ETHERNET):
-+ hmcdOpt = HMCD_RMV_L2_ETHERNET;
-+ break;
-+ case (e_FM_PCD_MANIP_HDR_RMV_STACKED_QTAGS):
-+ hmcdOpt = HMCD_RMV_L2_STACKED_QTAGS;
-+ break;
-+ case (e_FM_PCD_MANIP_HDR_RMV_ETHERNET_AND_MPLS):
-+ hmcdOpt = HMCD_RMV_L2_ETHERNET_AND_MPLS;
-+ break;
-+ case (e_FM_PCD_MANIP_HDR_RMV_MPLS):
-+ hmcdOpt = HMCD_RMV_L2_MPLS;
-+ break;
-+ default:
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+ }
-+ tmpReg |= hmcdOpt << HMCD_L2_MODE_SHIFT;
-+ }
-+ else
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, ("manip header remove type!"));
-+
-+ WRITE_UINT32(*p_TmpHmct, tmpReg);
-+ /* save a pointer to the "last" indication word */
-+ p_Last = p_TmpHmct;
-+ /* advance to next command */
-+ p_TmpHmct += HMCD_BASIC_SIZE/4;
-+ }
-+
-+ if (p_FmPcdManipParams->u.hdr.insrt)
-+ {
-+ if (p_FmPcdManipParams->u.hdr.insrtParams.type == e_FM_PCD_MANIP_INSRT_GENERIC)
-+ {
-+ /* initialize HMCD */
-+ if (p_FmPcdManipParams->u.hdr.insrtParams.u.generic.replace)
-+ tmpReg = (uint32_t)(HMCD_OPCODE_GENERIC_REPLACE) << HMCD_OC_SHIFT;
-+ else
-+ tmpReg = (uint32_t)(HMCD_OPCODE_GENERIC_INSRT) << HMCD_OC_SHIFT;
-+
-+ tmpReg |= p_FmPcdManipParams->u.hdr.insrtParams.u.generic.offset << HMCD_INSRT_OFFSET_SHIFT;
-+ tmpReg |= p_FmPcdManipParams->u.hdr.insrtParams.u.generic.size << HMCD_INSRT_SIZE_SHIFT;
-+
-+ size = p_FmPcdManipParams->u.hdr.insrtParams.u.generic.size;
-+ p_UsrData = p_FmPcdManipParams->u.hdr.insrtParams.u.generic.p_Data;
-+
-+ WRITE_UINT32(*p_TmpHmct, tmpReg);
-+ /* save a pointer to the "last" indication word */
-+ p_Last = p_TmpHmct;
-+
-+ p_TmpHmct += HMCD_BASIC_SIZE/4;
-+
-+ /* initialize data to be inserted */
-+ /* if size is not a multiple of 4, padd with 0's */
-+ origSize = size;
-+ remain = (uint8_t)(size % 4);
-+ if (remain)
-+ {
-+ size += (uint8_t)(4 - remain);
-+ p_LocalData = (uint32_t *)XX_Malloc(size);
-+ memset((uint8_t *)p_LocalData, 0, size);
-+ memcpy((uint8_t *)p_LocalData, p_UsrData, origSize);
-+ }
-+ else
-+ p_LocalData = (uint32_t*)p_UsrData;
-+
-+ /* initialize data and advance pointer to next command */
-+ for (i = 0; iu.hdr.insrtParams.type == e_FM_PCD_MANIP_INSRT_BY_HDR)
-+ {
-+ uint8_t hmcdOpt;
-+ if (!p_FmPcdManipParams->u.hdr.insrtParams.u.byHdr.type == e_FM_PCD_MANIP_INSRT_BY_HDR_SPECIFIC_L2)
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+
-+ /* initialize HMCD */
-+ tmpReg = (uint32_t)(HMCD_OPCODE_L2_INSRT) << HMCD_OC_SHIFT;
-+
-+ switch (p_FmPcdManipParams->u.hdr.insrtParams.u.byHdr.u.specificL2Params.specificL2)
-+ {
-+ case (e_FM_PCD_MANIP_HDR_INSRT_MPLS):
-+ if (p_FmPcdManipParams->u.hdr.insrtParams.u.byHdr.u.specificL2Params.update)
-+ hmcdOpt = HMCD_INSRT_N_UPDATE_L2_MPLS;
-+ else
-+ hmcdOpt = HMCD_INSRT_L2_MPLS;
-+ break;
-+ default:
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG);
-+ }
-+ tmpReg |= hmcdOpt << HMCD_L2_MODE_SHIFT;
-+
-+ WRITE_UINT32(*p_TmpHmct, tmpReg);
-+ /* save a pointer to the "last" indication word */
-+ p_Last = p_TmpHmct;
-+
-+ p_TmpHmct += HMCD_BASIC_SIZE/4;
-+
-+ /* set size and pointer of user's data */
-+ size = (uint8_t)p_FmPcdManipParams->u.hdr.insrtParams.u.byHdr.u.specificL2Params.size;
-+
-+ ASSERT_COND(p_TmpData);
-+ Mem2IOCpy32(p_TmpData, p_FmPcdManipParams->u.hdr.insrtParams.u.byHdr.u.specificL2Params.p_Data, size);
-+ tmpReg = (size << HMCD_INSRT_L2_SIZE_SHIFT) | (uint32_t)(XX_VirtToPhys(p_TmpData) - (((t_FmPcd*)h_FmPcd)->physicalMuramBase));
-+ WRITE_UINT32(*p_TmpHmct, tmpReg);
-+ p_TmpHmct += HMCD_PTR_SIZE/4;
-+ p_TmpData += size;
-+ }
-+ else
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED, ("manip header insert type!"));
-+ }
-+
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdate)
-+ {
-+ switch (p_FmPcdManipParams->u.hdr.fieldUpdateParams.type){
-+ case (e_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN):
-+ /* set opcode */
-+ tmpReg = (uint32_t)(HMCD_OPCODE_VLAN_PRI_UPDATE) << HMCD_OC_SHIFT;
-+
-+ /* set mode & table pointer */
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.vlan.updateType ==
-+ e_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN)
-+ {
-+ /* set Mode */
-+ tmpReg |= (uint32_t)(HMCD_VLAN_PRI_UPDATE_DSCP_TO_VPRI) << HMCD_VLAN_PRI_REP_MODE_SHIFT;
-+ /* set VPRI default */
-+ tmpReg |= p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.vlan.u.dscpToVpri.vpriDefVal;
-+ WRITE_UINT32(*p_TmpHmct, tmpReg);
-+ /* save a pointer to the "last" indication word */
-+ p_Last = p_TmpHmct;
-+ /* write the table pointer into the Manip descriptor */
-+ p_TmpHmct += HMCD_BASIC_SIZE/4;
-+
-+ tmpReg = 0;
-+ ASSERT_COND(p_TmpData);
-+ for (i=0; iu.hdr.fieldUpdateParams.u.vlan.u.dscpToVpri.dscpToVpriTable[i]) << (32-4*(j+1));
-+ j++;
-+ /* Than we write this register to the next table word
-+ * (i=7-->word 0, i=15-->word 1,... i=63-->word 7) */
-+ if ((i%8) == 7)
-+ {
-+ WRITE_UINT32(*((uint32_t*)p_TmpData + (i+1)/8-1), tmpReg);
-+ tmpReg = 0;
-+ j = 0;
-+ }
-+ }
-+ WRITE_UINT32(*p_TmpHmct, (uint32_t)(XX_VirtToPhys(p_TmpData) - (((t_FmPcd*)h_FmPcd)->physicalMuramBase)));
-+ p_TmpHmct += HMCD_PTR_SIZE/4;
-+
-+ p_TmpData += DSCP_TO_VLAN_TABLE_SIZE;
-+ }
-+ else if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.vlan.updateType ==
-+ e_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN_VPRI)
-+ {
-+ /* set Mode */
-+ /* line commented out as it has no-side-effect ('0' value). */
-+ /*tmpReg |= HMCD_VLAN_PRI_UPDATE << HMCD_VLAN_PRI_REP_MODE_SHIFT*/;
-+ /* set VPRI parameter */
-+ tmpReg |= p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.vlan.u.vpri;
-+ WRITE_UINT32(*p_TmpHmct, tmpReg);
-+ /* save a pointer to the "last" indication word */
-+ p_Last = p_TmpHmct;
-+ p_TmpHmct += HMCD_BASIC_SIZE/4;
-+ }
-+ break;
-+
-+ case (e_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV4):
-+ /* set opcode */
-+ tmpReg = (uint32_t)(HMCD_OPCODE_IPV4_UPDATE) << HMCD_OC_SHIFT;
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv4.validUpdates & HDR_MANIP_IPV4_TTL)
-+ tmpReg |= HMCD_IPV4_UPDATE_TTL;
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv4.validUpdates & HDR_MANIP_IPV4_TOS)
-+ {
-+ tmpReg |= HMCD_IPV4_UPDATE_TOS;
-+ tmpReg |= p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv4.tos << HMCD_IPV4_UPDATE_TOS_SHIFT;
-+ }
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv4.validUpdates & HDR_MANIP_IPV4_ID)
-+ tmpReg |= HMCD_IPV4_UPDATE_ID;
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv4.validUpdates & HDR_MANIP_IPV4_SRC)
-+ tmpReg |= HMCD_IPV4_UPDATE_SRC;
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv4.validUpdates & HDR_MANIP_IPV4_DST)
-+ tmpReg |= HMCD_IPV4_UPDATE_DST;
-+ /* write the first 4 bytes of the descriptor */
-+ WRITE_UINT32(*p_TmpHmct, tmpReg);
-+ /* save a pointer to the "last" indication word */
-+ p_Last = p_TmpHmct;
-+
-+ p_TmpHmct += HMCD_BASIC_SIZE/4;
-+
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv4.validUpdates & HDR_MANIP_IPV4_ID)
-+ {
-+ ASSERT_COND(p_TmpData);
-+ WRITE_UINT16(*(uint16_t*)p_TmpData, p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv4.id);
-+ WRITE_UINT32(*p_TmpHmct, (uint32_t)(XX_VirtToPhys(p_TmpData) - (((t_FmPcd*)p_Manip->h_FmPcd)->physicalMuramBase)));
-+ p_TmpData += 2;
-+ p_TmpHmct += HMCD_PTR_SIZE/4;
-+ }
-+
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv4.validUpdates & HDR_MANIP_IPV4_SRC)
-+ {
-+ WRITE_UINT32(*p_TmpHmct, p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv4.src);
-+ p_TmpHmct += HMCD_IPV4_ADDR_SIZE/4;
-+ }
-+
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv4.validUpdates & HDR_MANIP_IPV4_DST)
-+ {
-+ WRITE_UINT32(*p_TmpHmct, p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv4.dst);
-+ p_TmpHmct += HMCD_IPV4_ADDR_SIZE/4;
-+ }
-+ break;
-+
-+ case (e_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV6):
-+ /* set opcode */
-+ tmpReg = (uint32_t)(HMCD_OPCODE_IPV6_UPDATE) << HMCD_OC_SHIFT;
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv6.validUpdates & HDR_MANIP_IPV6_HL)
-+ tmpReg |= HMCD_IPV6_UPDATE_HL;
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv6.validUpdates & HDR_MANIP_IPV6_TC)
-+ {
-+ tmpReg |= HMCD_IPV6_UPDATE_TC;
-+ tmpReg |= p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv6.trafficClass << HMCD_IPV6_UPDATE_TC_SHIFT;
-+ }
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv6.validUpdates & HDR_MANIP_IPV6_SRC)
-+ tmpReg |= HMCD_IPV6_UPDATE_SRC;
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv6.validUpdates & HDR_MANIP_IPV6_DST)
-+ tmpReg |= HMCD_IPV6_UPDATE_DST;
-+ /* write the first 4 bytes of the descriptor */
-+ WRITE_UINT32(*p_TmpHmct, tmpReg);
-+ /* save a pointer to the "last" indication word */
-+ p_Last = p_TmpHmct;
-+
-+ p_TmpHmct += HMCD_BASIC_SIZE/4;
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv6.validUpdates & HDR_MANIP_IPV6_SRC)
-+ for (i = 0 ; i < NET_HEADER_FIELD_IPv6_ADDR_SIZE ; i+=4)
-+ {
-+ WRITE_UINT32(*p_TmpHmct, *(uint32_t*)&p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv6.src[i]);
-+ p_TmpHmct += HMCD_PTR_SIZE/4;
-+ }
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv6.validUpdates & HDR_MANIP_IPV6_DST)
-+ for (i = 0 ; i < NET_HEADER_FIELD_IPv6_ADDR_SIZE ; i+=4)
-+ {
-+ WRITE_UINT32(*p_TmpHmct, *(uint32_t*)&p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.ipv6.dst[i]);
-+ p_TmpHmct += HMCD_PTR_SIZE/4;
-+ }
-+ break;
-+
-+ case (e_FM_PCD_MANIP_HDR_FIELD_UPDATE_TCP_UDP):
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.tcpUdp.validUpdates == HDR_MANIP_TCP_UDP_CHECKSUM)
-+ {
-+ /* we implement this case with the update-checksum descriptor */
-+ /* set opcode */
-+ tmpReg = (uint32_t)(HMCD_OPCODE_TCP_UDP_CHECKSUM) << HMCD_OC_SHIFT;
-+ /* write the first 4 bytes of the descriptor */
-+ WRITE_UINT32(*p_TmpHmct, tmpReg);
-+ /* save a pointer to the "last" indication word */
-+ p_Last = p_TmpHmct;
-+
-+ p_TmpHmct += HMCD_BASIC_SIZE/4;
-+ }
-+ else
-+ {
-+ /* we implement this case with the TCP/UDP update descriptor */
-+ /* set opcode */
-+ tmpReg = (uint32_t)(HMCD_OPCODE_TCP_UDP_UPDATE) << HMCD_OC_SHIFT;
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.tcpUdp.validUpdates & HDR_MANIP_TCP_UDP_DST)
-+ tmpReg |= HMCD_TCP_UDP_UPDATE_DST;
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.tcpUdp.validUpdates & HDR_MANIP_TCP_UDP_SRC)
-+ tmpReg |= HMCD_TCP_UDP_UPDATE_SRC;
-+ /* write the first 4 bytes of the descriptor */
-+ WRITE_UINT32(*p_TmpHmct, tmpReg);
-+ /* save a pointer to the "last" indication word */
-+ p_Last = p_TmpHmct;
-+
-+ p_TmpHmct += HMCD_BASIC_SIZE/4;
-+
-+ tmpReg = 0;
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.tcpUdp.validUpdates & HDR_MANIP_TCP_UDP_SRC)
-+ tmpReg |= ((uint32_t)p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.tcpUdp.src) << HMCD_TCP_UDP_UPDATE_SRC_SHIFT;
-+ if (p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.tcpUdp.validUpdates & HDR_MANIP_TCP_UDP_DST)
-+ tmpReg |= ((uint32_t)p_FmPcdManipParams->u.hdr.fieldUpdateParams.u.tcpUdp.dst);
-+ WRITE_UINT32(*p_TmpHmct, tmpReg);
-+ p_TmpHmct += HMCD_PTR_SIZE/4;
-+ }
-+ break;
-+
-+ default:
-+ RETURN_ERROR(MINOR, E_INVALID_SELECTION, ("Unknown fieldUpdateParams.type"));
-+ }
-+ }
-+
-+ if (p_FmPcdManipParams->u.hdr.custom)
-+ {
-+ switch (p_FmPcdManipParams->u.hdr.customParams.type)
-+ {
-+ case (e_FM_PCD_MANIP_HDR_CUSTOM_IP_REPLACE):
-+ /* set opcode */
-+ tmpReg = (uint32_t)(HMCD_OPCODE_REPLACE_IP) << HMCD_OC_SHIFT;
-+
-+ if (p_FmPcdManipParams->u.hdr.customParams.u.ipHdrReplace.decTtlHl)
-+ tmpReg |= HMCD_IP_REPLACE_TTL_HL;
-+ if (p_FmPcdManipParams->u.hdr.customParams.u.ipHdrReplace.replaceType == e_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV4_BY_IPV6)
-+ /* line commented out as it has no-side-effect ('0' value). */
-+ /*tmpReg |= HMCD_IP_REPLACE_REPLACE_IPV4*/;
-+ else if (p_FmPcdManipParams->u.hdr.customParams.u.ipHdrReplace.replaceType == e_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV6_BY_IPV4)
-+ {
-+ tmpReg |= HMCD_IP_REPLACE_REPLACE_IPV6;
-+ if (p_FmPcdManipParams->u.hdr.customParams.u.ipHdrReplace.updateIpv4Id)
-+ tmpReg |= HMCD_IP_REPLACE_ID;
-+ }
-+ else
-+ RETURN_ERROR(MINOR, E_NOT_SUPPORTED,
-+ ("One flag out of HDR_MANIP_IP_REPLACE_IPV4, HDR_MANIP_IP_REPLACE_IPV6 - must be set."));
-+
-+ /* write the first 4 bytes of the descriptor */
-+ WRITE_UINT32(*p_TmpHmct, tmpReg);
-+ /* save a pointer to the "last" indication word */
-+ p_Last = p_TmpHmct;
-+
-+ p_TmpHmct += HMCD_BASIC_SIZE/4;
-+
-+ size = p_FmPcdManipParams->u.hdr.customParams.u.ipHdrReplace.hdrSize;
-+ ASSERT_COND(p_TmpData);
-+ Mem2IOCpy32(p_TmpData, p_FmPcdManipParams->u.hdr.customParams.u.ipHdrReplace.hdr, size);
-+ tmpReg = (uint32_t)(size << HMCD_IP_REPLACE_L3HDRSIZE_SHIFT);
-+ tmpReg |= (uint32_t)(XX_VirtToPhys(p_TmpData) - (((t_FmPcd*)h_FmPcd)->physicalMuramBase));
-+ WRITE_UINT32(*p_TmpHmct, tmpReg);
-+ p_TmpHmct += HMCD_PTR_SIZE/4;
-+ p_TmpData += size;
-+
-+ if ((p_FmPcdManipParams->u.hdr.customParams.u.ipHdrReplace.replaceType == e_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV6_BY_IPV4) &&
-+ (p_FmPcdManipParams->u.hdr.customParams.u.ipHdrReplace.updateIpv4Id))
-+ {
-+ WRITE_UINT16(*(uint16_t*)p_TmpData, p_FmPcdManipParams->u.hdr.customParams.u.ipHdrReplace.id);
-+ WRITE_UINT32(*p_TmpHmct, (uint32_t)(XX_VirtToPhys(p_TmpData) - (((t_FmPcd*)h_FmPcd)->physicalMuramBase)));
-+ p_TmpData += 2;
-+ }
-+ p_TmpHmct += HMCD_PTR_SIZE/4;
-+ break;
-+ default:
-+ RETURN_ERROR(MINOR, E_INVALID_SELECTION, ("Unknown customParams.type"));
-+ }
-+ }
-+
-+
-+ /* If this node has a nextManip, and no parsing is required after it, the old table must be copied to the new table
-+ the old table and should be freed */
-+ if (p_FmPcdManipParams->h_NextManip &&
-+ (MANIP_DONT_REPARSE(p_FmPcdManipParams->h_NextManip)))
-+ {
-+ if (new)
-+ {
-+ /* If this is the first time this manip is created we need to free unused memory. If it
-+ * is a dynamic changes case, the memory used is either the CC shadow or the existing
-+ * table - no allocation, no free */
-+ MANIP_UPDATE_UNIFIED_POSITION(p_FmPcdManipParams->h_NextManip);
-+
-+ p_Manip->unifiedPosition = e_MANIP_UNIFIED_FIRST;
-+
-+ /* The HMTD of the next Manip is never going to be used */
-+ if (((t_FmPcdManip *)p_FmPcdManipParams->h_NextManip)->muramAllocate)
-+ FM_MURAM_FreeMem(((t_FmPcd *)((t_FmPcdManip *)p_FmPcdManipParams->h_NextManip)->h_FmPcd)->h_FmMuram, ((t_FmPcdManip *)p_FmPcdManipParams->h_NextManip)->h_Ad);
-+ else
-+ XX_Free(((t_FmPcdManip *)p_FmPcdManipParams->h_NextManip)->h_Ad);
-+ ((t_FmPcdManip *)p_FmPcdManipParams->h_NextManip)->h_Ad = NULL;
-+
-+ /* advance pointer */
-+ p_TmpHmct += MANIP_GET_HMCT_SIZE(p_FmPcdManipParams->h_NextManip)/4;
-+ }
-+ }
-+ else
-+ {
-+ ASSERT_COND(p_Last);
-+ /* set the "last" indication on the last command of the current table */
-+ WRITE_UINT32(*p_Last, GET_UINT32(*p_Last) | HMCD_LAST);
-+ }
-+
-+ return E_OK;
-+}
-+
-+static t_Error CreateManipActionNew(t_FmPcdManip *p_Manip, t_FmPcdManipParams *p_FmPcdManipParams)
-+{
-+ t_FmPcdManip *p_CurManip;
-+ t_Error err;
-+ uint32_t nextSize = 0, totalSize;
-+ uint16_t tmpReg;
-+ uint8_t *p_OldHmct, *p_TmpHmctPtr, *p_TmpDataPtr;
-+
-+ /* set Manip structure */
-+ if (p_FmPcdManipParams->h_NextManip)
-+ {
-+ if (MANIP_DONT_REPARSE(p_FmPcdManipParams->h_NextManip))
-+ nextSize = (uint32_t)(GetHmctSize(p_FmPcdManipParams->h_NextManip) + GetDataSize(p_FmPcdManipParams->h_NextManip));
-+ else
-+ p_Manip->cascadedNext = TRUE;
-+ }
-+ p_Manip->dontParseAfterManip = p_FmPcdManipParams->u.hdr.dontParseAfterManip;
-+
-+ /* Allocate new table */
-+ /* calculate table size according to manip parameters */
-+ err = CalculateTableSize(p_FmPcdManipParams, &p_Manip->tableSize, &p_Manip->dataSize);
-+ if (err)
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+
-+ totalSize =(uint16_t)(p_Manip->tableSize + p_Manip->dataSize + nextSize);
-+
-+ p_Manip->p_Hmct = (uint8_t*)FM_MURAM_AllocMem(((t_FmPcd *)p_Manip->h_FmPcd)->h_FmMuram, totalSize, 4);
-+ if (!p_Manip->p_Hmct)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM alloc failed"));
-+
-+ if (p_Manip->dataSize)
-+ p_Manip->p_Data = (uint8_t*)PTR_MOVE(p_Manip->p_Hmct, (p_Manip->tableSize + nextSize));
-+
-+ /* update shadow size to allow runtime replacement of Header manipulation */
-+ /* The allocated shadow is divided as follows:
-+ 0 . . . 16 . . .
-+ --------------------------------
-+ | Shadow | Shadow HMTD |
-+ | HMTD | Match Table |
-+ | (16 bytes) | (maximal size) |
-+ --------------------------------
-+ */
-+
-+ err = FmPcdUpdateCcShadow (p_Manip->h_FmPcd, (uint32_t)(totalSize + 16), (uint16_t)FM_PCD_CC_AD_TABLE_ALIGN);
-+ if (err != E_OK)
-+ {
-+ FM_MURAM_FreeMem(p_Manip->h_FmPcd, p_Manip->p_Hmct);
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM allocation for HdrManip node shadow"));
-+ }
-+
-+
-+ if (p_FmPcdManipParams->h_NextManip &&
-+ (MANIP_DONT_REPARSE(p_FmPcdManipParams->h_NextManip)))
-+ {
-+ p_OldHmct = (uint8_t *)GetManipInfo(p_FmPcdManipParams->h_NextManip, e_MANIP_HMCT);
-+ p_CurManip = p_FmPcdManipParams->h_NextManip;
-+ /* Run till the last Manip (which is the first to configure) */
-+ while (MANIP_IS_UNIFIED_NON_LAST(p_CurManip))
-+ p_CurManip = p_CurManip->h_NextManip;
-+
-+ while (p_CurManip)
-+ {
-+ /* If this is a unified table, point to the part of the table
-+ * which is the relative offset in HMCT.
-+ */
-+ p_TmpHmctPtr = (uint8_t*)PTR_MOVE(p_Manip->p_Hmct,
-+ (p_Manip->tableSize +
-+ (PTR_TO_UINT(p_CurManip->p_Hmct) -
-+ PTR_TO_UINT(p_OldHmct))));
-+ if (p_CurManip->p_Data)
-+ p_TmpDataPtr = (uint8_t*)PTR_MOVE(p_Manip->p_Hmct,
-+ (p_Manip->tableSize +
-+ (PTR_TO_UINT(p_CurManip->p_Data) -
-+ PTR_TO_UINT(p_OldHmct))));
-+ else
-+ p_TmpDataPtr = NULL;
-+
-+ BuildHmct(p_CurManip, &p_CurManip->manipParams, p_TmpHmctPtr, p_TmpDataPtr, FALSE);
-+ /* update old manip table pointer */
-+ MANIP_SET_HMCT_PTR(p_CurManip, p_TmpHmctPtr);
-+ MANIP_SET_DATA_PTR(p_CurManip, p_TmpDataPtr);
-+
-+ p_CurManip = p_CurManip->h_PrevManip;
-+ }
-+ /* We copied the HMCT to create a new large HMCT so we can free the old one */
-+ FM_MURAM_FreeMem(MANIP_GET_MURAM(p_FmPcdManipParams->h_NextManip), p_OldHmct);
-+ }
-+
-+ /* Fill table */
-+ err = BuildHmct(p_Manip, p_FmPcdManipParams, p_Manip->p_Hmct, p_Manip->p_Data, TRUE);
-+ if (err)
-+ {
-+ FM_MURAM_FreeMem(p_Manip->h_FmPcd, p_Manip->p_Hmct);
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+ }
-+
-+ /* Build HMTD (table descriptor) */
-+ tmpReg = HMTD_CFG_TYPE; /* NADEN = 0 */
-+ /* add parseAfterManip */
-+ if (!p_Manip->dontParseAfterManip)
-+ tmpReg |= HMTD_CFG_PRS_AFTER_HM;
-+ /* create cascade */
-+ if (p_FmPcdManipParams->h_NextManip &&
-+ !MANIP_DONT_REPARSE(p_FmPcdManipParams->h_NextManip))
-+ {
-+ /* indicate that there's another HM table descriptor */
-+ tmpReg |= HMTD_CFG_NEXT_AD_EN;
-+ WRITE_UINT16(((t_Hmtd *)p_Manip->h_Ad)->nextAdIdx,
-+ (uint16_t)((uint32_t)(XX_VirtToPhys(MANIP_GET_HMTD_PTR(p_FmPcdManipParams->h_NextManip)) -
-+ (((t_FmPcd*)p_Manip->h_FmPcd)->physicalMuramBase)) >> 4));
-+ }
-+
-+ WRITE_UINT16(((t_Hmtd *)p_Manip->h_Ad)->cfg, tmpReg);
-+ WRITE_UINT32(((t_Hmtd *)p_Manip->h_Ad)->hmcdBasePtr,
-+ (uint32_t)(XX_VirtToPhys(p_Manip->p_Hmct) - (((t_FmPcd*)p_Manip->h_FmPcd)->physicalMuramBase)));
-+
-+ WRITE_UINT8(((t_Hmtd *)p_Manip->h_Ad)->opCode, HMAN_OC);
-+
-+ return E_OK;
-+}
-+
-+static t_Error CreateManipActionShadow(t_FmPcdManip *p_Manip, t_FmPcdManipParams *p_FmPcdManipParams)
-+{
-+ uint8_t *p_WholeHmct, *p_TmpHmctPtr, newDataSize, *p_TmpDataPtr = NULL;
-+ uint16_t newSize;
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)p_Manip->h_FmPcd;
-+ t_Error err;
-+ t_FmPcdManip *p_CurManip = p_Manip;
-+
-+ err = CalculateTableSize(p_FmPcdManipParams, &newSize, &newDataSize);
-+ if (err)
-+ RETURN_ERROR(MINOR, err, NO_MSG);
-+
-+ /* check coherency of new table parameters */
-+ if (newSize > p_Manip->tableSize)
-+ RETURN_ERROR(MINOR, E_INVALID_VALUE, ("New Hdr Manip configuration requires larger size than current one (command table)."));
-+ if (newDataSize > p_Manip->dataSize)
-+ RETURN_ERROR(MINOR, E_INVALID_VALUE, ("New Hdr Manip configuration requires larger size than current one (data)."));
-+ if (p_FmPcdManipParams->h_NextManip)
-+ RETURN_ERROR(MINOR, E_INVALID_VALUE, ("New Hdr Manip configuration can not contain h_NextManip."));
-+ if (MANIP_IS_UNIFIED(p_Manip) && (newSize != p_Manip->tableSize))
-+ RETURN_ERROR(MINOR, E_INVALID_VALUE, ("New Hdr Manip configuration in a chained manipulation requires different size than current one."));
-+ if (p_Manip->dontParseAfterManip != p_FmPcdManipParams->u.hdr.dontParseAfterManip)
-+ RETURN_ERROR(MINOR, E_INVALID_VALUE, ("New Hdr Manip configuration differs in dontParseAfterManip value."));
-+
-+ p_Manip->tableSize = newSize;
-+ p_Manip->dataSize = newDataSize;
-+
-+
-+ /* Build the new table in the shadow */
-+ if (!MANIP_IS_UNIFIED(p_Manip))
-+ {
-+ p_TmpHmctPtr = (uint8_t*)PTR_MOVE(p_FmPcd->p_CcShadow, 16);
-+ if (p_Manip->p_Data)
-+ p_TmpDataPtr = (uint8_t*)PTR_MOVE(p_TmpHmctPtr,
-+ (PTR_TO_UINT(p_Manip->p_Data) - PTR_TO_UINT(p_Manip->p_Hmct)));
-+
-+ BuildHmct(p_Manip, p_FmPcdManipParams, p_TmpHmctPtr, p_Manip->p_Data, FALSE);
-+ }
-+ else
-+ {
-+ p_WholeHmct = (uint8_t *)GetManipInfo(p_Manip, e_MANIP_HMCT);
-+ ASSERT_COND(p_WholeHmct);
-+
-+ /* Run till the last Manip (which is the first to configure) */
-+ while (MANIP_IS_UNIFIED_NON_LAST(p_CurManip))
-+ p_CurManip = p_CurManip->h_NextManip;
-+
-+ while (p_CurManip)
-+ {
-+ /* If this is a non-head node in a unified table, point to the part of the shadow
-+ * which is the relative offset in HMCT.
-+ * else, point to the beginning of the
-+ * shadow table (we save 16 for the HMTD.
-+ */
-+ p_TmpHmctPtr = (uint8_t*)PTR_MOVE(p_FmPcd->p_CcShadow,
-+ (16 + PTR_TO_UINT(p_CurManip->p_Hmct) - PTR_TO_UINT(p_WholeHmct)));
-+ if (p_CurManip->p_Data)
-+ p_TmpDataPtr = (uint8_t*)PTR_MOVE(p_FmPcd->p_CcShadow,
-+ (16 + PTR_TO_UINT(p_CurManip->p_Data) - PTR_TO_UINT(p_WholeHmct)));
-+
-+ BuildHmct(p_CurManip, &p_CurManip->manipParams, p_TmpHmctPtr, p_TmpDataPtr, FALSE);
-+ p_CurManip = p_CurManip->h_PrevManip;
-+ }
-+ }
-+
-+ return E_OK;
-+}
-+
-+static t_Error CreateManipActionBackToOrig(t_FmPcdManip *p_Manip, t_FmPcdManipParams *p_FmPcdManipParams)
-+{
-+ uint8_t *p_WholeHmct, *p_TmpHmctPtr, *p_TmpDataPtr;
-+ t_FmPcdManip *p_CurManip = p_Manip;
-+
-+ /* Build the new table in the shadow */
-+ if (!MANIP_IS_UNIFIED(p_Manip))
-+ BuildHmct(p_Manip, p_FmPcdManipParams, p_Manip->p_Hmct, p_Manip->p_Data, FALSE);
-+ else
-+ {
-+ p_WholeHmct = (uint8_t *)GetManipInfo(p_Manip, e_MANIP_HMCT);
-+ ASSERT_COND(p_WholeHmct);
-+
-+ /* Run till the last Manip (which is the first to configure) */
-+ while (MANIP_IS_UNIFIED_NON_LAST(p_CurManip))
-+ p_CurManip = p_CurManip->h_NextManip;
-+
-+ while (p_CurManip)
-+ {
-+ /* If this is a unified table, point to the part of the table
-+ * which is the relative offset in HMCT.
-+ */
-+ p_TmpHmctPtr = p_CurManip->p_Hmct; /*- (uint32_t)p_WholeHmct*/
-+ p_TmpDataPtr = p_CurManip->p_Data; /*- (uint32_t)p_WholeHmct*/
-+
-+ BuildHmct(p_CurManip, &p_CurManip->manipParams, p_TmpHmctPtr, p_TmpDataPtr, FALSE);
-+
-+ p_CurManip = p_CurManip->h_PrevManip;
-+ }
-+ }
-+
-+ return E_OK;
-+}
-+
-+static t_Error UpdateManipIc(t_Handle h_Manip, uint8_t icOffset)
-+{
-+ t_FmPcdManip *p_Manip = (t_FmPcdManip *)h_Manip;
-+ t_Handle p_Ad;
-+ uint32_t tmpReg32 = 0;
-+ SANITY_CHECK_RETURN_ERROR(h_Manip,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Manip->h_Ad, E_INVALID_HANDLE);
-+
-+ switch (p_Manip->opcode)
-+ {
-+ case (HMAN_OC_MV_INT_FRAME_HDR_FROM_FRM_TO_BUFFER_PREFFIX):
-+ p_Ad = (t_AdOfTypeContLookup *)p_Manip->h_Ad;
-+ if (p_Manip->updateParams & INTERNAL_CONTEXT_OFFSET)
-+ {
-+ tmpReg32 = *(uint32_t *)&((t_AdOfTypeContLookup *)p_Ad)->pcAndOffsets;
-+ tmpReg32 |= (uint32_t)((uint32_t)icOffset << 16);
-+ *(uint32_t *)&((t_AdOfTypeContLookup *)p_Ad)->pcAndOffsets = tmpReg32;
-+ p_Manip->updateParams &= ~INTERNAL_CONTEXT_OFFSET;
-+ p_Manip->icOffset = icOffset;
-+ }
-+ else
-+ {
-+ if (p_Manip->icOffset != icOffset)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("this manipulation was updated previously by different value"););
-+ }
-+ break;
-+#ifdef FM_CAPWAP_SUPPORT
-+ case (HMAN_OC_CAPWAP_RMV_DTLS_IF_EXIST):
-+ if (p_Manip->h_Frag)
-+ {
-+ if (p_Manip->updateParams & INTERNAL_CONTEXT_OFFSET)
-+ {
-+ p_Ad = (t_AdOfTypeContLookup *)p_Manip->h_Ad;
-+ tmpReg32 |= GET_UINT32(((t_AdOfTypeContLookup *)p_Ad)->pcAndOffsets);
-+ tmpReg32 |= (uint32_t)((uint32_t)icOffset << 16);
-+ WRITE_UINT32(((t_AdOfTypeContLookup *)p_Ad)->pcAndOffsets, tmpReg32);
-+ p_Manip->updateParams &= ~INTERNAL_CONTEXT_OFFSET;
-+ p_Manip->icOffset = icOffset;
-+ }
-+ else
-+ {
-+ if (p_Manip->icOffset != icOffset)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("this manipulation was updated previousely by different value"););
-+ }
-+ }
-+ break;
-+#endif /* FM_CAPWAP_SUPPORT */
-+ }
-+
-+ return E_OK;
-+}
-+
-+static t_Error UpdateInitMvIntFrameHeaderFromFrameToBufferPrefix(t_Handle h_FmPort, t_FmPcdManip *p_Manip, t_Handle h_Ad, bool validate)
-+{
-+
-+ t_AdOfTypeContLookup *p_Ad = (t_AdOfTypeContLookup *)h_Ad;
-+ t_FmPortGetSetCcParams fmPortGetSetCcParams;
-+ t_Error err;
-+ uint32_t tmpReg32;
-+
-+ memset(&fmPortGetSetCcParams, 0, sizeof(t_FmPortGetSetCcParams));
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Manip,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR((p_Manip->opcode & HMAN_OC_MV_INT_FRAME_HDR_FROM_FRM_TO_BUFFER_PREFFIX), E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Manip->muramAllocate, E_INVALID_STATE);
-+
-+ if (p_Manip->updateParams)
-+ {
-+ if ((!(p_Manip->updateParams & OFFSET_OF_PR)) ||
-+ (p_Manip->shadowUpdateParams & OFFSET_OF_PR))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("in this stage parameters from Port has not be updated"));
-+
-+ fmPortGetSetCcParams.getCcParams.type = p_Manip->updateParams;
-+ fmPortGetSetCcParams.setCcParams.type = UPDATE_PSO;
-+ fmPortGetSetCcParams.setCcParams.psoSize = 16;
-+
-+ err = FmPortGetSetCcParams(h_FmPort, &fmPortGetSetCcParams);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ if (fmPortGetSetCcParams.getCcParams.type & OFFSET_OF_PR)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Parser result offset wasn't configured previousely"));
-+#ifdef FM_LOCKUP_ALIGNMENT_ERRATA_FMAN_SW004
-+ ASSERT_COND(!(fmPortGetSetCcParams.getCcParams.prOffset % 16));
-+#endif
-+ }
-+ else if (validate)
-+ {
-+ if ((!(p_Manip->shadowUpdateParams & OFFSET_OF_PR)) ||
-+ (p_Manip->updateParams & OFFSET_OF_PR))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("in this stage parameters from Port has be updated"));
-+ fmPortGetSetCcParams.getCcParams.type = p_Manip->shadowUpdateParams;
-+ fmPortGetSetCcParams.setCcParams.type = UPDATE_PSO;
-+ fmPortGetSetCcParams.setCcParams.psoSize = 16;
-+
-+ err = FmPortGetSetCcParams(h_FmPort, &fmPortGetSetCcParams);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ if (fmPortGetSetCcParams.getCcParams.type & OFFSET_OF_PR)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Parser result offset wasn't configured previousely"));
-+
-+ }
-+
-+ ASSERT_COND(p_Ad);
-+
-+ if (p_Manip->updateParams & OFFSET_OF_PR)
-+ {
-+ tmpReg32 = 0;
-+ tmpReg32 |= fmPortGetSetCcParams.getCcParams.prOffset;
-+ WRITE_UINT32(p_Ad->matchTblPtr, (GET_UINT32(p_Ad->matchTblPtr) | tmpReg32));
-+ p_Manip->updateParams &= ~OFFSET_OF_PR;
-+ p_Manip->shadowUpdateParams |= OFFSET_OF_PR;
-+ }
-+ else if (validate)
-+ {
-+ tmpReg32 = GET_UINT32(p_Ad->matchTblPtr);
-+ if ((uint8_t)tmpReg32 != fmPortGetSetCcParams.getCcParams.prOffset)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("this manipulation was updated previousely by different value"););
-+ }
-+
-+ return E_OK;
-+}
-+
-+#ifdef FM_CAPWAP_SUPPORT
-+static t_Error UpdateModifyCapwapFragmenation(t_FmPcdManip *p_Manip, t_Handle h_Ad, bool validate,t_Handle h_FmTree)
-+{
-+ t_AdOfTypeContLookup *p_Ad = (t_AdOfTypeContLookup *)h_Ad;
-+ t_FmPcdCcSavedManipParams *p_SavedManipParams = NULL;
-+ uint32_t tmpReg32 = 0;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Manip,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Manip->h_Frag,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Manip->frag,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(((p_Manip->opcode == HMAN_OC_CAPWAP_FRAGMENTATION) || (p_Manip->opcode == HMAN_OC_INSRT_HDR_BY_TEMPL_N_OR_FRAG_AFTER)), E_INVALID_STATE);
-+
-+ p_Ad = (t_AdOfTypeContLookup *)p_Manip->h_Frag;
-+
-+ if (p_Manip->updateParams)
-+ {
-+
-+ if ((!(p_Manip->updateParams & OFFSET_OF_DATA)) ||
-+ ((p_Manip->shadowUpdateParams & OFFSET_OF_DATA)))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("in this stage parameters from Port has not be updated"));
-+ p_SavedManipParams = FmPcdCcTreeGetSavedManipParams(h_FmTree);
-+ if (!p_SavedManipParams)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("for this manipulation tree has to be configured previosely with this type"));
-+ p_Manip->fragParams.dataOffset = p_SavedManipParams->capwapParams.dataOffset;
-+
-+ tmpReg32 = GET_UINT32(p_Ad->pcAndOffsets);
-+ tmpReg32 |= ((uint32_t)p_Manip->fragParams.dataOffset<< 16);
-+ WRITE_UINT32(p_Ad->pcAndOffsets,tmpReg32);
-+
-+ p_Manip->updateParams &= ~OFFSET_OF_DATA;
-+ p_Manip->shadowUpdateParams |= OFFSET_OF_DATA;
-+ }
-+ else if (validate)
-+ {
-+
-+ p_SavedManipParams = FmPcdCcTreeGetSavedManipParams(h_FmTree);
-+ if (!p_SavedManipParams)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("for this manipulation tree has to be configured previosely with this type"));
-+ if (p_Manip->fragParams.dataOffset != p_SavedManipParams->capwapParams.dataOffset)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("this manipulation was updated previousely by different value"));
-+ }
-+
-+ return E_OK;
-+}
-+
-+static t_Error UpdateInitCapwapFragmentation(t_Handle h_FmPort,
-+ t_FmPcdManip *p_Manip,
-+ t_Handle h_Ad,
-+ bool validate,
-+ t_Handle h_FmTree)
-+{
-+ t_AdOfTypeContLookup *p_Ad;
-+ t_FmPortGetSetCcParams fmPortGetSetCcParams;
-+ t_Error err;
-+ uint32_t tmpReg32 = 0;
-+ t_FmPcdCcSavedManipParams *p_SavedManipParams;
-+
-+ UNUSED(h_Ad);
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Manip,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Manip->h_Frag,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Manip->frag,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(((p_Manip->opcode == HMAN_OC_CAPWAP_FRAGMENTATION) ||
-+ (p_Manip->opcode == HMAN_OC_INSRT_HDR_BY_TEMPL_N_OR_FRAG_AFTER)), E_INVALID_STATE);
-+
-+ p_Ad = (t_AdOfTypeContLookup *)p_Manip->h_Frag;
-+
-+ if (p_Manip->updateParams)
-+ {
-+ if ((!(p_Manip->updateParams & OFFSET_OF_DATA)) ||
-+ ((p_Manip->shadowUpdateParams & OFFSET_OF_DATA)))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("in this stage parameters from Port has not be updated"));
-+ fmPortGetSetCcParams.getCcParams.type = p_Manip->updateParams;
-+ fmPortGetSetCcParams.setCcParams.type = UPDATE_NIA_PNEN | UPDATE_FMFP_PRC_WITH_ONE_RISC_ONLY;
-+ fmPortGetSetCcParams.setCcParams.nia = NIA_FM_CTL_AC_FRAG | NIA_ENG_FM_CTL;
-+ /* For CAPWAP Rassembly used FMAN_CTRL2 hardcoded - so for fragmentation its better to use FMAN_CTRL1 */
-+ fmPortGetSetCcParams.setCcParams.orFmanCtrl = FPM_PORT_FM_CTL1;
-+
-+ err = FmPortGetSetCcParams(h_FmPort, &fmPortGetSetCcParams);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ if (fmPortGetSetCcParams.getCcParams.type & OFFSET_OF_DATA)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Data offset wasn't configured previousely"));
-+
-+ p_SavedManipParams = (t_FmPcdCcSavedManipParams *)XX_Malloc(sizeof(t_FmPcdCcSavedManipParams));
-+ p_SavedManipParams->capwapParams.dataOffset = fmPortGetSetCcParams.getCcParams.dataOffset;
-+
-+#ifdef FM_LOCKUP_ALIGNMENT_ERRATA_FMAN_SW004
-+ ASSERT_COND(!(p_SavedManipParams->capwapParams.dataOffset % 16));
-+#endif /* FM_LOCKUP_ALIGNMENT_ERRATA_FMAN_SW004 */
-+
-+ FmPcdCcTreeSetSavedManipParams(h_FmTree, (t_Handle)p_SavedManipParams);
-+ }
-+ else if (validate)
-+ {
-+ if ((!(p_Manip->shadowUpdateParams & OFFSET_OF_DATA)) ||
-+ ((p_Manip->updateParams & OFFSET_OF_DATA)))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("in this stage parameters from Port has be updated"));
-+ fmPortGetSetCcParams.getCcParams.type = p_Manip->shadowUpdateParams;
-+ fmPortGetSetCcParams.setCcParams.type = UPDATE_NIA_PNEN | UPDATE_FMFP_PRC_WITH_ONE_RISC_ONLY;
-+ fmPortGetSetCcParams.setCcParams.nia = NIA_FM_CTL_AC_FRAG | NIA_ENG_FM_CTL;
-+ err = FmPortGetSetCcParams(h_FmPort, &fmPortGetSetCcParams);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ if (fmPortGetSetCcParams.getCcParams.type & OFFSET_OF_DATA)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Data offset wasn't configured previousely"));
-+ }
-+
-+ if (p_Manip->updateParams)
-+ {
-+ tmpReg32 = GET_UINT32(p_Ad->pcAndOffsets);
-+ tmpReg32 |= ((uint32_t)fmPortGetSetCcParams.getCcParams.dataOffset<< 16);
-+ WRITE_UINT32(p_Ad->pcAndOffsets,tmpReg32);
-+
-+ p_Manip->updateParams &= ~OFFSET_OF_DATA;
-+ p_Manip->shadowUpdateParams |= OFFSET_OF_DATA;
-+ p_Manip->fragParams.dataOffset = fmPortGetSetCcParams.getCcParams.dataOffset;
-+ }
-+ else if (validate)
-+ {
-+ if (p_Manip->fragParams.dataOffset != fmPortGetSetCcParams.getCcParams.dataOffset)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("this manipulation was updated previousely by different value"));
-+ }
-+
-+ return E_OK;
-+}
-+
-+static t_Error UpdateInitCapwapReasm(t_Handle h_FmPcd,
-+ t_Handle h_FmPort,
-+ t_FmPcdManip *p_Manip,
-+ t_Handle h_Ad,
-+ bool validate)
-+{
-+ t_CapwapReasmPram *p_ReassmTbl;
-+ t_Error err;
-+ t_FmPortGetSetCcParams fmPortGetSetCcParams;
-+ uint8_t i = 0;
-+ uint16_t size;
-+ uint32_t tmpReg32;
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
-+ t_FmPcdCcCapwapReassmTimeoutParams ccCapwapReassmTimeoutParams;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Manip,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Manip->h_Frag,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Manip->frag,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR((p_Manip->opcode == HMAN_OC_CAPWAP_RMV_DTLS_IF_EXIST), E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR(h_FmPcd,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->h_Hc,E_INVALID_HANDLE);
-+
-+ if (p_Manip->h_FmPcd != h_FmPcd)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE,
-+ ("handler of PCD previously was initiated by different value"));
-+
-+ UNUSED(h_Ad);
-+
-+ memset(&fmPortGetSetCcParams, 0, sizeof(t_FmPortGetSetCcParams));
-+ p_ReassmTbl = (t_CapwapReasmPram *)p_Manip->h_Frag;
-+
-+ if (p_Manip->updateParams)
-+ {
-+ if ((!(p_Manip->updateParams & NUM_OF_TASKS) &&
-+ !(p_Manip->updateParams & OFFSET_OF_DATA) &&
-+ !(p_Manip->updateParams & OFFSET_OF_PR) &&
-+ !(p_Manip->updateParams & HW_PORT_ID)) ||
-+ ((p_Manip->shadowUpdateParams & NUM_OF_TASKS) ||
-+ (p_Manip->shadowUpdateParams & OFFSET_OF_DATA) || (p_Manip->shadowUpdateParams & OFFSET_OF_PR) ||
-+ (p_Manip->shadowUpdateParams & HW_PORT_ID)))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("in this stage parameters from Port has not be updated"));
-+
-+ fmPortGetSetCcParams.getCcParams.type = p_Manip->updateParams;
-+ fmPortGetSetCcParams.setCcParams.type = UPDATE_NIA_PNEN;
-+ fmPortGetSetCcParams.setCcParams.nia = NIA_FM_CTL_AC_FRAG | NIA_ENG_FM_CTL;
-+
-+ err = FmPortGetSetCcParams(h_FmPort, &fmPortGetSetCcParams);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ if (fmPortGetSetCcParams.getCcParams.type & NUM_OF_TASKS)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Num of tasks wasn't configured previousely"));
-+ if (fmPortGetSetCcParams.getCcParams.type & OFFSET_OF_DATA)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("offset of the data wasn't configured previousely"));
-+ if (fmPortGetSetCcParams.getCcParams.type & HW_PORT_ID)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("hwPortId wasn't updated"));
-+#ifdef FM_LOCKUP_ALIGNMENT_ERRATA_FMAN_SW004
-+ ASSERT_COND((fmPortGetSetCcParams.getCcParams.dataOffset % 16) == 0);
-+#endif /* FM_LOCKUP_ALIGNMENT_ERRATA_FMAN_SW004 */
-+ }
-+ else if (validate)
-+ {
-+ if ((!(p_Manip->shadowUpdateParams & NUM_OF_TASKS) &&
-+ !(p_Manip->shadowUpdateParams & OFFSET_OF_DATA) &&
-+ !(p_Manip->shadowUpdateParams & OFFSET_OF_PR) &&
-+ !(p_Manip->shadowUpdateParams & HW_PORT_ID)) &&
-+ ((p_Manip->updateParams & NUM_OF_TASKS) ||
-+ (p_Manip->updateParams & OFFSET_OF_DATA) || (p_Manip->updateParams & OFFSET_OF_PR) ||
-+ (p_Manip->updateParams & HW_PORT_ID)))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("in this stage parameters from Port has be updated"));
-+
-+ fmPortGetSetCcParams.getCcParams.type = p_Manip->shadowUpdateParams;
-+ fmPortGetSetCcParams.setCcParams.type = UPDATE_NIA_PNEN;
-+ fmPortGetSetCcParams.setCcParams.nia = NIA_FM_CTL_AC_FRAG | NIA_ENG_FM_CTL;
-+
-+ err = FmPortGetSetCcParams(h_FmPort, &fmPortGetSetCcParams);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ if (fmPortGetSetCcParams.getCcParams.type & NUM_OF_TASKS)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("NumOfTasks wasn't configured previously"));
-+ if (fmPortGetSetCcParams.getCcParams.type & OFFSET_OF_DATA)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("offset of the data wasn't configured previously"));
-+ if (fmPortGetSetCcParams.getCcParams.type & HW_PORT_ID)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("hwPortId wasn't updated"));
-+ }
-+
-+ if (p_Manip->updateParams)
-+ {
-+ if (p_Manip->updateParams & NUM_OF_TASKS)
-+ {
-+ /*recommendation of Microcode team - (maxNumFramesInProcess * 2) */
-+ size = (uint16_t)(p_Manip->fragParams.maxNumFramesInProcess*2 + fmPortGetSetCcParams.getCcParams.numOfTasks);
-+ if (size > 255)
-+ RETURN_ERROR(MAJOR,E_INVALID_VALUE, ("numOfOpenReassmEntries + numOfTasks per port can not be greater than 256"));
-+
-+ p_Manip->fragParams.numOfTasks = fmPortGetSetCcParams.getCcParams.numOfTasks;
-+
-+ /*p_ReassmFrmDescrIndxPoolTbl*/
-+ p_Manip->fragParams.p_ReassmFrmDescrIndxPoolTbl =
-+ (t_Handle)FM_MURAM_AllocMem(p_FmPcd->h_FmMuram,
-+ (uint32_t)(size + 1),
-+ 4);
-+ if (!p_Manip->fragParams.p_ReassmFrmDescrIndxPoolTbl)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM alloc for CAPWAP Reassembly frame buffer index pool table"));
-+
-+ IOMemSet32(p_Manip->fragParams.p_ReassmFrmDescrIndxPoolTbl, 0, (uint32_t)(size + 1));
-+
-+ for ( i = 0; i < size; i++)
-+ WRITE_UINT8(*(uint8_t *)PTR_MOVE(p_Manip->fragParams.p_ReassmFrmDescrIndxPoolTbl, i), (uint8_t)(i+1));
-+
-+ tmpReg32 = (uint32_t)(XX_VirtToPhys(p_Manip->fragParams.p_ReassmFrmDescrIndxPoolTbl) - p_FmPcd->physicalMuramBase);
-+
-+ WRITE_UINT32(p_ReassmTbl->reasmFrmDescIndexPoolTblPtr, tmpReg32);
-+
-+ /*p_ReassmFrmDescrPoolTbl*/
-+ p_Manip->fragParams.p_ReassmFrmDescrPoolTbl =
-+ (t_Handle)FM_MURAM_AllocMem(p_FmPcd->h_FmMuram,
-+ (uint32_t)((size + 1) * FM_PCD_MANIP_CAPWAP_REASM_RFD_SIZE),
-+ 4);
-+
-+ if (!p_Manip->fragParams.p_ReassmFrmDescrPoolTbl)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM alloc for CAPWAP Reassembly frame buffer pool table"));
-+
-+ IOMemSet32(p_Manip->fragParams.p_ReassmFrmDescrPoolTbl, 0, (uint32_t)((size +1)* FM_PCD_MANIP_CAPWAP_REASM_RFD_SIZE));
-+
-+ tmpReg32 = (uint32_t)(XX_VirtToPhys(p_Manip->fragParams.p_ReassmFrmDescrPoolTbl) - p_FmPcd->physicalMuramBase);
-+
-+ WRITE_UINT32(p_ReassmTbl->reasmFrmDescPoolTblPtr, tmpReg32);
-+
-+ /*p_TimeOutTbl*/
-+
-+ p_Manip->fragParams.p_TimeOutTbl =
-+ (t_Handle)FM_MURAM_AllocMem(p_FmPcd->h_FmMuram,
-+ (uint32_t)((size + 1)* FM_PCD_MANIP_CAPWAP_REASM_TIME_OUT_ENTRY_SIZE),
-+ 4);
-+
-+ if (!p_Manip->fragParams.p_TimeOutTbl)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM alloc for CAPWAP Reassembly timeout table"));
-+
-+ IOMemSet32(p_Manip->fragParams.p_TimeOutTbl, 0, (uint16_t)((size + 1)*FM_PCD_MANIP_CAPWAP_REASM_TIME_OUT_ENTRY_SIZE));
-+
-+ tmpReg32 = (uint32_t)(XX_VirtToPhys(p_Manip->fragParams.p_TimeOutTbl) - p_FmPcd->physicalMuramBase);
-+ WRITE_UINT32(p_ReassmTbl->timeOutTblPtr, tmpReg32);
-+
-+ p_Manip->updateParams &= ~NUM_OF_TASKS;
-+ p_Manip->shadowUpdateParams |= NUM_OF_TASKS;
-+ }
-+
-+ if (p_Manip->updateParams & OFFSET_OF_DATA)
-+ {
-+ p_Manip->fragParams.dataOffset = fmPortGetSetCcParams.getCcParams.dataOffset;
-+ tmpReg32 = GET_UINT32(p_ReassmTbl->mode);
-+ tmpReg32|= p_Manip->fragParams.dataOffset;
-+ WRITE_UINT32(p_ReassmTbl->mode, tmpReg32);
-+ p_Manip->updateParams &= ~OFFSET_OF_DATA;
-+ p_Manip->shadowUpdateParams |= OFFSET_OF_DATA;
-+ }
-+
-+ if (!(fmPortGetSetCcParams.getCcParams.type & OFFSET_OF_PR))
-+ {
-+ p_Manip->fragParams.prOffset = fmPortGetSetCcParams.getCcParams.prOffset;
-+
-+ tmpReg32 = GET_UINT32(p_ReassmTbl->mode);
-+ tmpReg32|= FM_PCD_MANIP_CAPWAP_REASM_PR_COPY;
-+ WRITE_UINT32(p_ReassmTbl->mode, tmpReg32);
-+
-+ tmpReg32 = GET_UINT32(p_ReassmTbl->intStatsTblPtr);
-+ tmpReg32 |= (uint32_t)p_Manip->fragParams.prOffset << 24;
-+ WRITE_UINT32(p_ReassmTbl->intStatsTblPtr, tmpReg32);
-+ p_Manip->updateParams &= ~OFFSET_OF_PR;
-+ p_Manip->shadowUpdateParams |= OFFSET_OF_PR;
-+ }
-+ else
-+ {
-+ p_Manip->fragParams.prOffset = 0xff;
-+ p_Manip->updateParams &= ~OFFSET_OF_PR;
-+ p_Manip->shadowUpdateParams |= OFFSET_OF_PR;
-+ }
-+
-+ p_Manip->fragParams.hwPortId = fmPortGetSetCcParams.getCcParams.hardwarePortId;
-+ p_Manip->updateParams &= ~HW_PORT_ID;
-+ p_Manip->shadowUpdateParams |= HW_PORT_ID;
-+
-+ /*timeout hc */
-+ ccCapwapReassmTimeoutParams.fqidForTimeOutFrames = p_Manip->fragParams.fqidForTimeOutFrames;
-+ ccCapwapReassmTimeoutParams.portIdAndCapwapReassmTbl = (uint32_t)p_Manip->fragParams.hwPortId << 24;
-+ ccCapwapReassmTimeoutParams.portIdAndCapwapReassmTbl |= (uint32_t)((XX_VirtToPhys(p_ReassmTbl) - p_FmPcd->physicalMuramBase));
-+ ccCapwapReassmTimeoutParams.timeoutRequestTime = (((uint32_t)1<fragParams.bitFor1Micro) * p_Manip->fragParams.timeoutRoutineRequestTime)/2;
-+ return FmHcPcdCcCapwapTimeoutReassm(p_FmPcd->h_Hc,&ccCapwapReassmTimeoutParams);
-+ }
-+
-+ else if (validate)
-+ {
-+ if (fmPortGetSetCcParams.getCcParams.hardwarePortId != p_Manip->fragParams.hwPortId)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Reassembly manipulation previously was assigned to another port"));
-+ if (fmPortGetSetCcParams.getCcParams.numOfTasks != p_Manip->fragParams.numOfTasks)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("numOfTasks for this manipulation previously was defined by another value "));
-+
-+
-+ if (!(fmPortGetSetCcParams.getCcParams.type & OFFSET_OF_PR))
-+ {
-+ if (p_Manip->fragParams.prOffset != fmPortGetSetCcParams.getCcParams.prOffset)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Parse result offset previously was defined by another value "));
-+ }
-+ else
-+ {
-+ if (p_Manip->fragParams.prOffset != 0xff)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Parse result offset previously was defined by another value "));
-+ }
-+ if (fmPortGetSetCcParams.getCcParams.dataOffset != p_Manip->fragParams.dataOffset)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Data offset previously was defined by another value "));
-+ }
-+
-+ return E_OK;
-+}
-+#endif /* FM_CAPWAP_SUPPORT */
-+
-+t_Error FmPcdRegisterReassmPort(t_Handle h_FmPcd, t_Handle h_IpReasmCommonPramTbl)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+ t_FmPcdCcIpReassmTimeoutParams ccIpReassmTimeoutParams = {0};
-+ t_Error err = E_OK;
-+ uint8_t result;
-+ uint32_t bitFor1Micro, tsbs, log2num;
-+
-+ ASSERT_COND(p_FmPcd);
-+ ASSERT_COND(h_IpReasmCommonPramTbl);
-+
-+ bitFor1Micro = FmGetTimeStampScale(p_FmPcd->h_Fm);
-+ bitFor1Micro = 32 - bitFor1Micro;
-+ LOG2(FM_PCD_MANIP_IP_REASSM_TIMEOUT_THREAD_THRESH, log2num);
-+ tsbs = bitFor1Micro - log2num;
-+
-+ ccIpReassmTimeoutParams.iprcpt = (uint32_t)(XX_VirtToPhys(h_IpReasmCommonPramTbl) - p_FmPcd->physicalMuramBase);
-+ ccIpReassmTimeoutParams.tsbs = (uint8_t)tsbs;
-+ ccIpReassmTimeoutParams.activate = TRUE;
-+ if ((err = FmHcPcdCcIpTimeoutReassm(p_FmPcd->h_Hc, &ccIpReassmTimeoutParams, &result)) != E_OK)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ switch (result)
-+ {
-+ case (0):
-+ return E_OK;
-+ case (1):
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("failed to allocate TNUM"));
-+ case (2):
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("failed to allocate internal buffer"));
-+ case (3):
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("'Disable Timeout Task' with invalid IPRCPT"));
-+ case (4):
-+ RETURN_ERROR(MAJOR, E_FULL, ("too many timeout tasks"));
-+ case (5):
-+ RETURN_ERROR(MAJOR, E_INVALID_SELECTION, ("invalid sub command"));
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, NO_MSG);
-+ }
-+ return E_OK;
-+}
-+
-+static t_Error CreateIpReassCommonTable(t_FmPcdManip *p_Manip)
-+{
-+ uint32_t tmpReg32 = 0, i;
-+ uint64_t tmpReg64, size;
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)p_Manip->h_FmPcd;
-+ t_Error err = E_OK;
-+
-+ /* Allocation of the IP Reassembly Common Parameters table. This table is located in the
-+ MURAM. Its size is 64 bytes and its base address should be 8-byte aligned.
-+ It contains parameters that are common to both the IPv4 reassembly function and IPv6
-+ reassembly function.*/
-+ p_Manip->ipReassmParams.p_IpReassCommonTbl =
-+ (t_IpReassCommonTbl *)FM_MURAM_AllocMem(p_FmPcd->h_FmMuram,
-+ FM_PCD_MANIP_IP_REASM_COMMON_PARAM_TABLE_SIZE,
-+ FM_PCD_MANIP_IP_REASM_COMMON_PARAM_TABLE_ALIGN);
-+
-+ if (!p_Manip->ipReassmParams.p_IpReassCommonTbl)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM alloc for Reassembly common parameters table"));
-+
-+ IOMemSet32(p_Manip->ipReassmParams.p_IpReassCommonTbl, 0, FM_PCD_MANIP_IP_REASM_COMMON_PARAM_TABLE_SIZE);
-+
-+ /* Setting the TimeOut Mode.*/
-+ tmpReg32 = 0;
-+ if (p_Manip->ipReassmParams.timeOutMode == e_FM_PCD_MANIP_TIME_OUT_BETWEEN_FRAMES)
-+ tmpReg32 |= FM_PCD_MANIP_IP_REASM_TIME_OUT_BETWEEN_FRAMES;
-+
-+ /* Setting TimeOut FQID - Frames that time out are enqueued to this FQID.
-+ In order to cause TimeOut frames to be discarded, this queue should be configured accordingly*/
-+ tmpReg32 |= p_Manip->ipReassmParams.fqidForTimeOutFrames;
-+ WRITE_UINT32(p_Manip->ipReassmParams.p_IpReassCommonTbl->timeoutModeAndFqid, tmpReg32);
-+
-+ /* Calculation the size of IP Reassembly Frame Descriptor - number of frames that are allowed to be reassembled simultaneously + 129.*/
-+ size = p_Manip->ipReassmParams.maxNumFramesInProcess + 129;
-+
-+ /*Allocation of IP Reassembly Frame Descriptor Indexes Pool - This pool resides in the MURAM */
-+ p_Manip->ipReassmParams.reassFrmDescrIndxPoolTblAddr =
-+ PTR_TO_UINT(FM_MURAM_AllocMem(p_FmPcd->h_FmMuram,
-+ (uint32_t)(size * 2),
-+ 256));
-+ if (!p_Manip->ipReassmParams.reassFrmDescrIndxPoolTblAddr)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM alloc for Reassembly frame descriptor indexes pool"));
-+
-+ IOMemSet32(UINT_TO_PTR(p_Manip->ipReassmParams.reassFrmDescrIndxPoolTblAddr), 0, (uint32_t)(size * 2));
-+
-+ /* The entries in IP Reassembly Frame Descriptor Indexes Pool contains indexes starting with 1 up to
-+ the maximum number of frames that are allowed to be reassembled simultaneously + 128.
-+ The last entry in this pool must contain the index zero*/
-+ for (i=0; i<(size-1); i++)
-+ WRITE_UINT16(*(uint16_t *)PTR_MOVE(UINT_TO_PTR(p_Manip->ipReassmParams.reassFrmDescrIndxPoolTblAddr), (i<<1)),
-+ (uint16_t)(i+1));
-+
-+ /* Sets the IP Reassembly Frame Descriptor Indexes Pool offset from MURAM */
-+ tmpReg32 = (uint32_t)(XX_VirtToPhys(UINT_TO_PTR(p_Manip->ipReassmParams.reassFrmDescrIndxPoolTblAddr)) - p_FmPcd->physicalMuramBase);
-+ WRITE_UINT32(p_Manip->ipReassmParams.p_IpReassCommonTbl->reassFrmDescIndexPoolTblPtr, tmpReg32);
-+
-+ /* Allocation of the Reassembly Frame Descriptors Pool - This pool resides in external memory.
-+ The number of entries in this pool should be equal to the number of entries in IP Reassembly Frame Descriptor Indexes Pool.*/
-+ p_Manip->ipReassmParams.reassFrmDescrPoolTblAddr =
-+ PTR_TO_UINT(XX_MallocSmart((uint32_t)(size * 64), p_Manip->ipReassmParams.dataMemId, 64));
-+
-+ if (!p_Manip->ipReassmParams.reassFrmDescrPoolTblAddr)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("Memory allocation FAILED"));
-+
-+ IOMemSet32(UINT_TO_PTR(p_Manip->ipReassmParams.reassFrmDescrPoolTblAddr), 0, (uint32_t)(size * 64));
-+
-+ /* Sets the Reassembly Frame Descriptors Pool and liodn offset*/
-+ tmpReg64 = (uint64_t)(XX_VirtToPhys(UINT_TO_PTR(p_Manip->ipReassmParams.reassFrmDescrPoolTblAddr)));
-+ tmpReg64 |= ((uint64_t)(p_Manip->ipReassmParams.dataLiodnOffset & FM_PCD_MANIP_IP_REASM_LIODN_MASK) << (uint64_t)FM_PCD_MANIP_IP_REASM_LIODN_SHIFT);
-+ tmpReg64 |= ((uint64_t)(p_Manip->ipReassmParams.dataLiodnOffset & FM_PCD_MANIP_IP_REASM_ELIODN_MASK) << (uint64_t)FM_PCD_MANIP_IP_REASM_ELIODN_SHIFT);
-+ WRITE_UINT32(p_Manip->ipReassmParams.p_IpReassCommonTbl->liodnAndReassFrmDescPoolPtrHi, (uint32_t)(tmpReg64 >> 32));
-+ WRITE_UINT32(p_Manip->ipReassmParams.p_IpReassCommonTbl->reassFrmDescPoolPtrLow, (uint32_t)tmpReg64);
-+
-+ /*Allocation of the TimeOut table - This table resides in the MURAM.
-+ The number of entries in this table is identical to the number of entries in the Reassembly Frame Descriptors Pool*/
-+ p_Manip->ipReassmParams.timeOutTblAddr =
-+ PTR_TO_UINT(FM_MURAM_AllocMem(p_FmPcd->h_FmMuram, (uint32_t)(size * 8),8));
-+
-+ if (!p_Manip->ipReassmParams.timeOutTblAddr)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM alloc for Reassembly timeout table"));
-+
-+ IOMemSet32(UINT_TO_PTR(p_Manip->ipReassmParams.timeOutTblAddr), 0, (uint16_t)(size * 8));
-+
-+ /* Sets the TimeOut table offset from MURAM */
-+ tmpReg32 = (uint32_t)(XX_VirtToPhys(UINT_TO_PTR(p_Manip->ipReassmParams.timeOutTblAddr)) - p_FmPcd->physicalMuramBase);
-+ WRITE_UINT32(p_Manip->ipReassmParams.p_IpReassCommonTbl->timeOutTblPtr, tmpReg32);
-+
-+ /* Sets the Expiration Delay */
-+ tmpReg32 = 0;
-+ tmpReg32 |= (((uint32_t)(1 << FmGetTimeStampScale(p_FmPcd->h_Fm))) * p_Manip->ipReassmParams.timeoutThresholdForReassmProcess);
-+ WRITE_UINT32(p_Manip->ipReassmParams.p_IpReassCommonTbl->expirationDelay, tmpReg32);
-+
-+ err = FmPcdRegisterReassmPort(p_FmPcd, p_Manip->ipReassmParams.p_IpReassCommonTbl);
-+ if (err != E_OK)
-+ {
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, p_Manip->ipReassmParams.p_IpReassCommonTbl);
-+ RETURN_ERROR(MAJOR, err, ("port registration"));
-+ }
-+
-+ return err;
-+}
-+
-+static t_Error CreateIpReassTable(t_FmPcdManip *p_Manip, bool ipv4)
-+{
-+ t_FmPcd *p_FmPcd = p_Manip->h_FmPcd;
-+ uint32_t tmpReg32, autoLearnHashTblSize;
-+ uint32_t numOfWays, setSize, setSizeCode, keySize;
-+ uint32_t waySize, numOfSets, numOfEntries;
-+ uint64_t tmpReg64;
-+ uint16_t minFragSize;
-+ uintptr_t *p_AutoLearnHashTblAddr, *p_AutoLearnSetLockTblAddr;
-+ t_IpReassTbl **p_IpReassTbl;
-+
-+ if (ipv4)
-+ {
-+ p_IpReassTbl = &p_Manip->ipReassmParams.p_Ipv4ReassTbl;
-+ p_AutoLearnHashTblAddr = &p_Manip->ipReassmParams.ipv4AutoLearnHashTblAddr;
-+ p_AutoLearnSetLockTblAddr = &p_Manip->ipReassmParams.ipv4AutoLearnSetLockTblAddr;
-+ minFragSize = p_Manip->ipReassmParams.minFragSize[0];
-+ numOfWays = p_Manip->ipReassmParams.numOfFramesPerHashEntry[0];
-+ keySize = 4 + 4 + 1 + 2; /* 3-tuple + IP-Id */
-+ }
-+ else
-+ {
-+ p_IpReassTbl = &p_Manip->ipReassmParams.p_Ipv6ReassTbl;
-+ p_AutoLearnHashTblAddr = &p_Manip->ipReassmParams.ipv6AutoLearnHashTblAddr;
-+ p_AutoLearnSetLockTblAddr = &p_Manip->ipReassmParams.ipv6AutoLearnSetLockTblAddr;
-+ minFragSize = p_Manip->ipReassmParams.minFragSize[1];
-+ numOfWays = p_Manip->ipReassmParams.numOfFramesPerHashEntry[1];
-+ keySize = 16 + 16 + 4; /* 2-tuple + IP-Id */
-+ if (numOfWays > e_FM_PCD_MANIP_SIX_WAYS_HASH)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("num of ways"));
-+ }
-+ keySize += 2; /* 2 bytes reserved for RFDIndex */
-+#if (DPAA_VERSION >= 11)
-+ keySize += 2; /* 2 bytes reserved */
-+#endif /* (DPAA_VERSION >= 11) */
-+ waySize = ROUND_UP(keySize, 8);
-+
-+ /* Allocates the IP Reassembly Parameters Table - This table is located in the MURAM.*/
-+ *p_IpReassTbl = (t_IpReassTbl *)FM_MURAM_AllocMem(p_FmPcd->h_FmMuram,
-+ FM_PCD_MANIP_IP_REASM_TABLE_SIZE,
-+ FM_PCD_MANIP_IP_REASM_TABLE_ALIGN);
-+ if (!*p_IpReassTbl)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM alloc for Reassembly IPv4/IPv6 specific parameters table"));
-+ memset(*p_IpReassTbl, 0, sizeof(t_IpReassTbl));
-+
-+ /* Sets the IP Reassembly common Parameters table offset from MURAM in the IP Reassembly Table descriptor*/
-+ tmpReg32 = (uint32_t)(XX_VirtToPhys(p_Manip->ipReassmParams.p_IpReassCommonTbl) - p_FmPcd->physicalMuramBase);
-+ WRITE_UINT32((*p_IpReassTbl)->ipReassCommonPrmTblPtr, tmpReg32);
-+
-+ /* Calculate set size (set size is rounded-up to next power of 2) */
-+ NEXT_POWER_OF_2(numOfWays * waySize, setSize);
-+
-+ /* Get set size code */
-+ LOG2(setSize, setSizeCode);
-+
-+ /* Sets ways number and set size code */
-+ WRITE_UINT16((*p_IpReassTbl)->waysNumAndSetSize, (uint16_t)((numOfWays << 8) | setSizeCode));
-+
-+ /* It is recommended that the total number of entries in this table
-+ (number of sets * number of ways) will be twice the number of frames that
-+ are expected to be reassembled simultaneously.*/
-+ numOfEntries = (uint32_t)(p_Manip->ipReassmParams.maxNumFramesInProcess * 2);
-+
-+ /* sets number calculation - number of entries = number of sets * number of ways */
-+ numOfSets = numOfEntries / numOfWays;
-+
-+ /* Sets AutoLearnHashKeyMask*/
-+ NEXT_POWER_OF_2(numOfSets, numOfSets);
-+
-+ WRITE_UINT16((*p_IpReassTbl)->autoLearnHashKeyMask, (uint16_t)(numOfSets - 1));
-+
-+ /* Allocation of IP Reassembly Automatic Learning Hash Table - This table resides in external memory.
-+ The size of this table is determined by the number of sets and the set size.
-+ Table size = set size * number of sets
-+ This table base address should be aligned to SetSize.*/
-+ autoLearnHashTblSize = numOfSets * setSize;
-+
-+ *p_AutoLearnHashTblAddr = PTR_TO_UINT(XX_MallocSmart(autoLearnHashTblSize, p_Manip->ipReassmParams.dataMemId, setSize));
-+ if (!*p_AutoLearnHashTblAddr)
-+ {
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, *p_IpReassTbl);
-+ *p_IpReassTbl = NULL;
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("Memory allocation FAILED"));
-+ }
-+ IOMemSet32(UINT_TO_PTR(*p_AutoLearnHashTblAddr), 0, autoLearnHashTblSize);
-+
-+ /* Sets the IP Reassembly Automatic Learning Hash Table and liodn offset */
-+ tmpReg64 = ((uint64_t)(p_Manip->ipReassmParams.dataLiodnOffset & FM_PCD_MANIP_IP_REASM_LIODN_MASK) << (uint64_t)FM_PCD_MANIP_IP_REASM_LIODN_SHIFT);
-+ tmpReg64 |= ((uint64_t)(p_Manip->ipReassmParams.dataLiodnOffset & FM_PCD_MANIP_IP_REASM_ELIODN_MASK) << (uint64_t)FM_PCD_MANIP_IP_REASM_ELIODN_SHIFT);
-+ tmpReg64 |= XX_VirtToPhys(UINT_TO_PTR(*p_AutoLearnHashTblAddr));
-+ WRITE_UINT32((*p_IpReassTbl)->liodnAlAndAutoLearnHashTblPtrHi, (uint32_t)(tmpReg64 >> 32));
-+ WRITE_UINT32((*p_IpReassTbl)->autoLearnHashTblPtrLow, (uint32_t)tmpReg64);
-+
-+ /* Allocation of the Set Lock table - This table resides in external memory
-+ The size of this table is (number of sets in the IP Reassembly Automatic Learning Hash table)*4 bytes.
-+ This table resides in external memory and its base address should be 4-byte aligned */
-+ *p_AutoLearnSetLockTblAddr = PTR_TO_UINT(XX_MallocSmart((uint32_t)(numOfSets * 4), p_Manip->ipReassmParams.dataMemId, 4));
-+ if (!*p_AutoLearnSetLockTblAddr)
-+ {
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, *p_IpReassTbl);
-+ *p_IpReassTbl = NULL;
-+ XX_FreeSmart(UINT_TO_PTR(*p_AutoLearnHashTblAddr));
-+ *p_AutoLearnHashTblAddr = 0;
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("Memory allocation FAILED"));
-+ }
-+ IOMemSet32(UINT_TO_PTR(*p_AutoLearnSetLockTblAddr), 0, (numOfSets * 4));
-+
-+ /* sets Set Lock table pointer and liodn offset*/
-+ tmpReg64 = ((uint64_t)(p_Manip->ipReassmParams.dataLiodnOffset & FM_PCD_MANIP_IP_REASM_LIODN_MASK) << (uint64_t)FM_PCD_MANIP_IP_REASM_LIODN_SHIFT);
-+ tmpReg64 |= ((uint64_t)(p_Manip->ipReassmParams.dataLiodnOffset & FM_PCD_MANIP_IP_REASM_ELIODN_MASK) << (uint64_t)FM_PCD_MANIP_IP_REASM_ELIODN_SHIFT);
-+ tmpReg64 |= XX_VirtToPhys(UINT_TO_PTR(*p_AutoLearnSetLockTblAddr));
-+ WRITE_UINT32((*p_IpReassTbl)->liodnSlAndAutoLearnSetLockTblPtrHi, (uint32_t)(tmpReg64 >> 32));
-+ WRITE_UINT32((*p_IpReassTbl)->autoLearnSetLockTblPtrLow, (uint32_t)tmpReg64);
-+
-+ /* Sets user's requested minimum fragment size (in Bytes) for First/Middle fragment */
-+ WRITE_UINT16((*p_IpReassTbl)->minFragSize, minFragSize);
-+
-+ return E_OK;
-+}
-+
-+static t_Error UpdateInitIpReasm(t_Handle h_FmPcd,
-+ t_Handle h_PcdParams,
-+ t_Handle h_FmPort,
-+ t_FmPcdManip *p_Manip,
-+ t_Handle h_Ad,
-+ bool validate)
-+{
-+ t_FmPortGetSetCcParams fmPortGetSetCcParams;
-+ uint32_t tmpReg32;
-+ t_Error err;
-+ t_FmPortPcdParams *p_PcdParams = (t_FmPortPcdParams *)h_PcdParams;
-+#if (DPAA_VERSION >= 11)
-+ uint8_t *p_Ptr;
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Manip, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Manip->frag, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR((p_Manip->opcode == HMAN_OC_IP_REASSEMBLY), E_INVALID_STATE);
-+ SANITY_CHECK_RETURN_ERROR(h_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(!p_Manip->updateParams || h_PcdParams, E_INVALID_HANDLE);
-+
-+ UNUSED(h_Ad);
-+
-+ if (!p_Manip->updateParams)
-+ return E_OK;
-+
-+ if (p_Manip->h_FmPcd != h_FmPcd)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("handler of PCD previously was initiated by different value"));
-+
-+ if (p_Manip->updateParams)
-+ {
-+ if ((!(p_Manip->updateParams & (NUM_OF_TASKS | NUM_OF_EXTRA_TASKS))) ||
-+ ((p_Manip->shadowUpdateParams & (NUM_OF_TASKS | NUM_OF_EXTRA_TASKS))))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("in this stage parameters from Port has not be updated"));
-+
-+ fmPortGetSetCcParams.setCcParams.type = 0;
-+ fmPortGetSetCcParams.getCcParams.type = p_Manip->updateParams;
-+ if ((err = FmPortGetSetCcParams(h_FmPort, &fmPortGetSetCcParams)) != E_OK)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ if (fmPortGetSetCcParams.getCcParams.type & (NUM_OF_TASKS | NUM_OF_EXTRA_TASKS))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("offset of the data wasn't configured previously"));
-+ }
-+ else if (validate)
-+ {
-+ if ((!(p_Manip->shadowUpdateParams & (NUM_OF_TASKS | NUM_OF_EXTRA_TASKS))) ||
-+ ((p_Manip->updateParams & (NUM_OF_TASKS | NUM_OF_EXTRA_TASKS))))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("in this stage parameters from Port has be updated"));
-+
-+ fmPortGetSetCcParams.setCcParams.type = 0;
-+ fmPortGetSetCcParams.getCcParams.type = p_Manip->shadowUpdateParams;
-+ if ((err = FmPortGetSetCcParams(h_FmPort, &fmPortGetSetCcParams)) != E_OK)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ if (fmPortGetSetCcParams.getCcParams.type & (NUM_OF_TASKS | NUM_OF_EXTRA_TASKS))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("offset of the data wasn't configured previously"));
-+ }
-+
-+ if (p_Manip->updateParams)
-+ {
-+ if (p_Manip->updateParams & (NUM_OF_TASKS | NUM_OF_EXTRA_TASKS))
-+ {
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
-+ uint8_t *p_Ptr, i, totalNumOfTnums;
-+
-+ totalNumOfTnums = (uint8_t)(fmPortGetSetCcParams.getCcParams.numOfTasks +
-+ fmPortGetSetCcParams.getCcParams.numOfExtraTasks);
-+
-+ p_Manip->ipReassmParams.internalBufferPoolAddr =
-+ PTR_TO_UINT(FM_MURAM_AllocMem(p_FmPcd->h_FmMuram,
-+ (uint32_t)(totalNumOfTnums * BMI_FIFO_UNITS),
-+ BMI_FIFO_UNITS));
-+ if (!p_Manip->ipReassmParams.internalBufferPoolAddr)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM alloc for Reassembly internal buffers pool"));
-+ IOMemSet32(UINT_TO_PTR(p_Manip->ipReassmParams.internalBufferPoolAddr),
-+ 0,
-+ (uint32_t)(totalNumOfTnums * BMI_FIFO_UNITS));
-+
-+ p_Manip->ipReassmParams.internalBufferPoolManagementIndexAddr =
-+ PTR_TO_UINT(FM_MURAM_AllocMem(p_FmPcd->h_FmMuram,
-+ (uint32_t)(5 + totalNumOfTnums),
-+ 4));
-+ if (!p_Manip->ipReassmParams.internalBufferPoolManagementIndexAddr)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM alloc for Reassembly internal buffers management"));
-+
-+ p_Ptr = (uint8_t*)UINT_TO_PTR(p_Manip->ipReassmParams.internalBufferPoolManagementIndexAddr);
-+ WRITE_UINT32(*(uint32_t*)p_Ptr, (uint32_t)(XX_VirtToPhys(UINT_TO_PTR(p_Manip->ipReassmParams.internalBufferPoolAddr)) - p_FmPcd->physicalMuramBase));
-+ for (i=0, p_Ptr += 4; i < totalNumOfTnums; i++, p_Ptr++)
-+ WRITE_UINT8(*p_Ptr, i);
-+ WRITE_UINT8(*p_Ptr, 0xFF);
-+
-+ tmpReg32 = (4 << FM_PCD_MANIP_IP_REASM_COMMON_INT_BUFFER_IDX_SHIFT) |
-+ ((uint32_t)(XX_VirtToPhys(UINT_TO_PTR(p_Manip->ipReassmParams.internalBufferPoolManagementIndexAddr)) - p_FmPcd->physicalMuramBase));
-+ WRITE_UINT32(p_Manip->ipReassmParams.p_IpReassCommonTbl->internalBufferManagement, tmpReg32);
-+
-+ p_Manip->updateParams &= ~(NUM_OF_TASKS | NUM_OF_EXTRA_TASKS);
-+ p_Manip->shadowUpdateParams |= (NUM_OF_TASKS | NUM_OF_EXTRA_TASKS);
-+ }
-+ }
-+
-+ if (p_Manip->ipReassmParams.h_Ipv4Scheme)
-+ {
-+ p_PcdParams->p_KgParams->h_Schemes[p_PcdParams->p_KgParams->numOfSchemes] = p_Manip->ipReassmParams.h_Ipv4Scheme;
-+ p_PcdParams->p_KgParams->numOfSchemes++;
-+ }
-+ if (p_Manip->ipReassmParams.h_Ipv6Scheme)
-+ {
-+ p_PcdParams->p_KgParams->h_Schemes[p_PcdParams->p_KgParams->numOfSchemes] = p_Manip->ipReassmParams.h_Ipv6Scheme;
-+ p_PcdParams->p_KgParams->numOfSchemes++;
-+ }
-+
-+#if (DPAA_VERSION >= 11)
-+ memset(&fmPortGetSetCcParams, 0, sizeof(t_FmPortGetSetCcParams));
-+ fmPortGetSetCcParams.setCcParams.type = 0;
-+ fmPortGetSetCcParams.getCcParams.type = FM_REV;
-+ if ((err = FmPortGetSetCcParams(h_FmPort, &fmPortGetSetCcParams)) != E_OK)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ if (fmPortGetSetCcParams.getCcParams.revInfo.majorRev >= 6)
-+ {
-+ if ((err = FmPortSetGprFunc(h_FmPort, e_FM_PORT_GPR_MURAM_PAGE, (void**)&p_Ptr)) != E_OK)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ tmpReg32 = NIA_ENG_KG;
-+ if (p_Manip->ipReassmParams.h_Ipv4Scheme)
-+ {
-+ tmpReg32 |= NIA_KG_DIRECT;
-+ tmpReg32 |= NIA_KG_CC_EN;
-+ tmpReg32 |= FmPcdKgGetSchemeId(p_Manip->ipReassmParams.h_Ipv4Scheme);
-+ WRITE_UINT32(*(uint32_t*)PTR_MOVE(p_Ptr, NIA_IPR_DIRECT_SCHEME_IPV4_OFFSET), tmpReg32);
-+ }
-+ if (p_Manip->ipReassmParams.h_Ipv6Scheme)
-+ {
-+ tmpReg32 &= ~NIA_AC_MASK;
-+ tmpReg32 |= NIA_KG_DIRECT;
-+ tmpReg32 |= NIA_KG_CC_EN;
-+ tmpReg32 |= FmPcdKgGetSchemeId(p_Manip->ipReassmParams.h_Ipv6Scheme);
-+ WRITE_UINT32(*(uint32_t*)PTR_MOVE(p_Ptr, NIA_IPR_DIRECT_SCHEME_IPV6_OFFSET), tmpReg32);
-+ }
-+ }
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ return E_OK;
-+}
-+
-+#if (DPAA_VERSION == 10)
-+static t_Error FmPcdFragHcScratchPoolFill(t_Handle h_FmPcd, uint8_t scratchBpid)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+ t_FmPcdCcFragScratchPoolCmdParams fmPcdCcFragScratchPoolCmdParams;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+
-+ memset(&fmPcdCcFragScratchPoolCmdParams, 0, sizeof(t_FmPcdCcFragScratchPoolCmdParams));
-+
-+ fmPcdCcFragScratchPoolCmdParams.numOfBuffers = NUM_OF_SCRATCH_POOL_BUFFERS;
-+ fmPcdCcFragScratchPoolCmdParams.bufferPoolId = scratchBpid;
-+ if ((err = FmHcPcdCcIpFragScratchPollCmd(p_FmPcd->h_Hc, TRUE, &fmPcdCcFragScratchPoolCmdParams)) != E_OK)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ if (fmPcdCcFragScratchPoolCmdParams.numOfBuffers != 0)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Fill scratch pool failed,"
-+ "Failed to release %d buffers to the BM (missing FBPRs)",
-+ fmPcdCcFragScratchPoolCmdParams.numOfBuffers));
-+
-+ return E_OK;
-+}
-+
-+static t_Error FmPcdFragHcScratchPoolEmpty(t_Handle h_FmPcd, uint8_t scratchBpid)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
-+ t_FmPcdCcFragScratchPoolCmdParams fmPcdCcFragScratchPoolCmdParams;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
-+
-+ memset(&fmPcdCcFragScratchPoolCmdParams, 0, sizeof(t_FmPcdCcFragScratchPoolCmdParams));
-+
-+ fmPcdCcFragScratchPoolCmdParams.bufferPoolId = scratchBpid;
-+ if ((err = FmHcPcdCcIpFragScratchPollCmd(p_FmPcd->h_Hc, FALSE, &fmPcdCcFragScratchPoolCmdParams)) != E_OK)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ return E_OK;
-+}
-+#endif /* (DPAA_VERSION == 10) */
-+
-+static void ReleaseManipHandler(t_FmPcdManip *p_Manip, t_FmPcd *p_FmPcd)
-+{
-+ if (p_Manip->h_Ad)
-+ {
-+ if (p_Manip->muramAllocate)
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, p_Manip->h_Ad);
-+ else
-+ XX_Free(p_Manip->h_Ad);
-+ p_Manip->h_Ad = NULL;
-+ }
-+ if (p_Manip->p_Template)
-+ {
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, p_Manip->p_Template);
-+ p_Manip->p_Template = NULL;
-+ }
-+ if (p_Manip->h_Frag)
-+ {
-+ if (p_Manip->fragParams.p_AutoLearnHashTbl)
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, p_Manip->fragParams.p_AutoLearnHashTbl);
-+ if (p_Manip->fragParams.p_ReassmFrmDescrPoolTbl)
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, p_Manip->fragParams.p_ReassmFrmDescrPoolTbl);
-+ if (p_Manip->fragParams.p_ReassmFrmDescrIndxPoolTbl)
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, p_Manip->fragParams.p_ReassmFrmDescrIndxPoolTbl);
-+ if (p_Manip->fragParams.p_TimeOutTbl)
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, p_Manip->fragParams.p_TimeOutTbl);
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, p_Manip->h_Frag);
-+
-+ }
-+ if (p_Manip->frag)
-+ {
-+ if (p_Manip->ipFragParams.p_Frag)
-+ {
-+#if (DPAA_VERSION == 10)
-+ FmPcdFragHcScratchPoolEmpty((t_Handle)p_FmPcd, p_Manip->ipFragParams.scratchBpid);
-+#endif /* (DPAA_VERSION == 10) */
-+
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, p_Manip->ipFragParams.p_Frag);
-+ }
-+ }
-+ else if (p_Manip->reassm)
-+ {
-+ FmPcdUnregisterReassmPort(p_FmPcd, p_Manip->ipReassmParams.p_IpReassCommonTbl);
-+
-+ if (p_Manip->ipReassmParams.timeOutTblAddr)
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, UINT_TO_PTR(p_Manip->ipReassmParams.timeOutTblAddr));
-+ if (p_Manip->ipReassmParams.reassFrmDescrPoolTblAddr)
-+ XX_FreeSmart(UINT_TO_PTR(p_Manip->ipReassmParams.reassFrmDescrPoolTblAddr));
-+
-+ if (p_Manip->ipReassmParams.ipv4AutoLearnHashTblAddr)
-+ XX_FreeSmart(UINT_TO_PTR(p_Manip->ipReassmParams.ipv4AutoLearnHashTblAddr));
-+ if (p_Manip->ipReassmParams.ipv6AutoLearnHashTblAddr)
-+ XX_FreeSmart(UINT_TO_PTR(p_Manip->ipReassmParams.ipv6AutoLearnHashTblAddr));
-+ if (p_Manip->ipReassmParams.ipv4AutoLearnSetLockTblAddr)
-+ XX_FreeSmart(UINT_TO_PTR(p_Manip->ipReassmParams.ipv4AutoLearnSetLockTblAddr));
-+ if (p_Manip->ipReassmParams.ipv6AutoLearnSetLockTblAddr)
-+ XX_FreeSmart(UINT_TO_PTR(p_Manip->ipReassmParams.ipv6AutoLearnSetLockTblAddr));
-+ if (p_Manip->ipReassmParams.p_Ipv4ReassTbl)
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, p_Manip->ipReassmParams.p_Ipv4ReassTbl);
-+ if (p_Manip->ipReassmParams.p_Ipv6ReassTbl)
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, p_Manip->ipReassmParams.p_Ipv6ReassTbl);
-+ if (p_Manip->ipReassmParams.p_IpReassCommonTbl)
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, p_Manip->ipReassmParams.p_IpReassCommonTbl);
-+ if (p_Manip->ipReassmParams.reassFrmDescrIndxPoolTblAddr)
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, UINT_TO_PTR(p_Manip->ipReassmParams.reassFrmDescrIndxPoolTblAddr));
-+ if (p_Manip->ipReassmParams.internalBufferPoolManagementIndexAddr)
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, UINT_TO_PTR(p_Manip->ipReassmParams.internalBufferPoolManagementIndexAddr));
-+ if (p_Manip->ipReassmParams.internalBufferPoolAddr)
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, UINT_TO_PTR(p_Manip->ipReassmParams.internalBufferPoolAddr));
-+
-+ if (p_Manip->ipReassmParams.h_Ipv6Ad)
-+ XX_FreeSmart(p_Manip->ipReassmParams.h_Ipv6Ad);
-+ if (p_Manip->ipReassmParams.h_Ipv4Ad)
-+ XX_FreeSmart(p_Manip->ipReassmParams.h_Ipv4Ad);
-+ }
-+
-+ if (p_Manip->p_StatsTbl)
-+ FM_MURAM_FreeMem(p_FmPcd->h_FmMuram, p_Manip->p_StatsTbl);
-+}
-+
-+#ifdef FM_CAPWAP_SUPPORT
-+static t_Error CheckManipParamsAndSetType(t_FmPcdManip *p_Manip, t_FmPcdManipParams *p_ManipParams)
-+{
-+ if (p_ManipParams->u.hdr.rmv)
-+ {
-+ switch (p_ManipParams->u.hdr.rmvParams.type)
-+ {
-+ case (e_FM_PCD_MANIP_RMV_BY_HDR):
-+ switch (p_ManipParams->u.hdr.rmvParams.u.byHdr.type)
-+ {
-+ case (e_FM_PCD_MANIP_RMV_BY_HDR_FROM_START) :
-+ if (p_ManipParams->u.hdr.rmvParams.u.byHdr.u.fromStartByHdr.include)
-+ {
-+ switch (p_ManipParams->u.hdr.rmvParams.u.byHdr.u.fromStartByHdr.hdrInfo.hdr)
-+ {
-+ case (HEADER_TYPE_CAPWAP_DTLS) :
-+ p_Manip->opcode = HMAN_OC_CAPWAP_RMV_DTLS_IF_EXIST;
-+ p_Manip->muramAllocate = TRUE;
-+ if (p_ManipParams->u.hdr.insrt)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("for CAPWAP_DTLS_HDR remove can not be insrt manipualtion after"));
-+ if (p_ManipParams->fragOrReasm)
-+ {
-+ if (!p_ManipParams->fragOrReasmParams.frag)
-+ {
-+ switch (p_ManipParams->fragOrReasmParams.hdr)
-+ {
-+ case (HEADER_TYPE_CAPWAP):
-+ p_Manip->opcode = HMAN_OC_CAPWAP_REASSEMBLY;
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("unsupported header for Reassembly"));
-+ }
-+ }
-+ else
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("for this type of manipulation frag can not be TRUE"));
-+ }
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("non valid net header of remove location"));
-+ }
-+ }
-+ else
-+ {
-+ switch (p_ManipParams->u.hdr.rmvParams.u.byHdr.u.fromStartByHdr.hdrInfo.hdr)
-+ {
-+ case (HEADER_TYPE_CAPWAP_DTLS) :
-+ case (HEADER_TYPE_CAPWAP) :
-+ if (p_ManipParams->fragOrReasm || p_ManipParams->u.hdr.insrt)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("for the type of remove e_FM_PCD_MANIP_RMV_FROM_START_OF_FRAME_TILL_CAPWAP can not be insert or fragOrReasm TRUE"));
-+ p_Manip->opcode = HMAN_OC_RMV_N_OR_INSRT_INT_FRM_HDR;
-+ p_Manip->muramAllocate = TRUE;
-+ p_ManipParams->u.hdr.insrt = TRUE; //internal frame header
-+ break;
-+ default :
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("invalid type of remove manipulation"));
-+ }
-+ }
-+ break;
-+ default :
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("invalid type of remove manipulation"));
-+ }
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("invalid type of remove manipulation"));
-+ }
-+ }
-+ else if (p_ManipParams->u.hdr.insrt)
-+ {
-+ switch (p_ManipParams->u.hdr.insrtParams.type)
-+ {
-+ case (e_FM_PCD_MANIP_INSRT_BY_TEMPLATE) :
-+
-+ p_Manip->opcode = HMAN_OC_INSRT_HDR_BY_TEMPL_N_OR_FRAG_AFTER;
-+ p_Manip->muramAllocate = FALSE;
-+ if (p_ManipParams->fragOrReasm)
-+ {
-+ if (p_ManipParams->fragOrReasmParams.frag)
-+ {
-+ switch (p_ManipParams->fragOrReasmParams.hdr)
-+ {
-+ case (HEADER_TYPE_CAPWAP):
-+ p_Manip->opcode = HMAN_OC_CAPWAP_FRAGMENTATION;
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Invalid header for fragmentation"));
-+ }
-+ }
-+ else
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE,("can not reach this point"));
-+ }
-+ break;
-+
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("for only isert manipulation unsupported type"));
-+ }
-+ }
-+ else if (p_ManipParams->fragOrReasm)
-+ {
-+ if (p_ManipParams->fragOrReasmParams.frag)
-+ {
-+ switch (p_ManipParams->fragOrReasmParams.hdr)
-+ {
-+ case (HEADER_TYPE_CAPWAP):
-+ p_Manip->opcode = HMAN_OC_CAPWAP_FRAGMENTATION;
-+ p_Manip->muramAllocate = FALSE;
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Unsupported header for fragmentation"));
-+ }
-+ }
-+ else
-+ {
-+ switch (p_ManipParams->fragOrReasmParams.hdr)
-+ {
-+ case (HEADER_TYPE_CAPWAP):
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Reassembly has to be with additional operation - rmv = TRUE, type of remove - e_FM_PCD_MANIP_RMV_FROM_START_OF_FRAME_INCLUDE_SPECIFIC_LOCATION,type = e_FM_PCD_MANIP_LOC_BY_HDR, hdr = HEADER_TYPE_CAPWAP_DTLS"));
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("Unsupported header for reassembly"));
-+ }
-+ }
-+
-+ }
-+ else
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("User didn't ask for any manipulation"));
-+
-+ p_Manip->insrt = p_ManipParams->u.hdr.insrt;
-+ p_Manip->rmv = p_ManipParams->u.hdr.rmv;
-+
-+ return E_OK;
-+}
-+
-+#else /* not FM_CAPWAP_SUPPORT */
-+static t_Error CheckManipParamsAndSetType(t_FmPcdManip *p_Manip, t_FmPcdManipParams *p_ManipParams)
-+{
-+ switch (p_ManipParams->type)
-+ {
-+ case e_FM_PCD_MANIP_HDR :
-+ /* Check that next-manip is not already used */
-+ if (p_ManipParams->h_NextManip)
-+ {
-+ if (!MANIP_IS_FIRST(p_ManipParams->h_NextManip))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("h_NextManip is already a part of another chain"));
-+ if (MANIP_GET_TYPE(p_ManipParams->h_NextManip) != e_FM_PCD_MANIP_HDR)
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("For a Header Manipulation node - no support of h_NextManip of type other than Header Manipulation."));
-+ }
-+
-+ if (p_ManipParams->u.hdr.rmv)
-+ {
-+ switch (p_ManipParams->u.hdr.rmvParams.type)
-+ {
-+ case (e_FM_PCD_MANIP_RMV_BY_HDR):
-+ switch (p_ManipParams->u.hdr.rmvParams.u.byHdr.type)
-+ {
-+ case (e_FM_PCD_MANIP_RMV_BY_HDR_SPECIFIC_L2) :
-+ p_Manip->opcode = HMAN_OC;
-+ p_Manip->muramAllocate = TRUE;
-+ break;
-+ default :
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("invalid type of remove manipulation"));
-+ }
-+ break;
-+ case (e_FM_PCD_MANIP_RMV_GENERIC):
-+ p_Manip->opcode = HMAN_OC;
-+ p_Manip->muramAllocate = TRUE;
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("invalid type of remove manipulation"));
-+ }
-+ p_Manip->rmv = TRUE;
-+ }
-+ else if (p_ManipParams->u.hdr.insrt)
-+ {
-+ switch (p_ManipParams->u.hdr.insrtParams.type)
-+ {
-+ case (e_FM_PCD_MANIP_INSRT_BY_HDR) :
-+ case (e_FM_PCD_MANIP_INSRT_GENERIC):
-+ p_Manip->opcode = HMAN_OC;
-+ p_Manip->muramAllocate = TRUE;
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("for only isert manipulation unsupported type"));
-+ }
-+ p_Manip->insrt = TRUE;
-+ }
-+ else if (p_ManipParams->u.hdr.fieldUpdate)
-+ {
-+ /* Check parameters */
-+ if (p_ManipParams->u.hdr.fieldUpdateParams.type == e_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN)
-+ {
-+ if ((p_ManipParams->u.hdr.fieldUpdateParams.u.vlan.updateType == e_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN_VPRI)
-+ && (p_ManipParams->u.hdr.fieldUpdateParams.u.vlan.u.vpri > 7))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("vpri should get values of 0-7 "));
-+ if (p_ManipParams->u.hdr.fieldUpdateParams.u.vlan.updateType == e_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN)
-+ {
-+ int i;
-+
-+ if (p_ManipParams->u.hdr.fieldUpdateParams.u.vlan.u.dscpToVpri.vpriDefVal > 7)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("vpriDefVal should get values of 0-7 "));
-+ for (i = 0 ; i < FM_PCD_MANIP_DSCP_TO_VLAN_TRANS ; i++)
-+ if (p_ManipParams->u.hdr.fieldUpdateParams.u.vlan.u.dscpToVpri.dscpToVpriTable[i] & 0xf0)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("dscpToVpriTabl value out of range (0-15)"));
-+ }
-+
-+ }
-+
-+ p_Manip->opcode = HMAN_OC;
-+ p_Manip->muramAllocate = TRUE;
-+ p_Manip->fieldUpdate = TRUE;
-+ }
-+ else if (p_ManipParams->u.hdr.custom)
-+ {
-+ p_Manip->opcode = HMAN_OC;
-+ p_Manip->muramAllocate = TRUE;
-+ p_Manip->custom = TRUE;
-+ }
-+ break;
-+ case e_FM_PCD_MANIP_REASSEM :
-+ if (p_ManipParams->h_NextManip)
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("next manip with reassembly"));
-+ switch (p_ManipParams->u.reassem.hdr)
-+ {
-+ case (HEADER_TYPE_IPv4):
-+ p_Manip->ipReassmParams.hdr = HEADER_TYPE_IPv4;
-+ break;
-+ case (HEADER_TYPE_IPv6):
-+ p_Manip->ipReassmParams.hdr = HEADER_TYPE_IPv6;
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("header for reassembly"));
-+ }
-+ p_Manip->opcode = HMAN_OC_IP_REASSEMBLY;
-+ break;
-+ case e_FM_PCD_MANIP_FRAG :
-+ if (p_ManipParams->h_NextManip)
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("next manip with fragmentation"));
-+ switch (p_ManipParams->u.frag.hdr)
-+ {
-+ case (HEADER_TYPE_IPv4):
-+ case (HEADER_TYPE_IPv6):
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("header for fragmentation"));
-+ }
-+ p_Manip->opcode = HMAN_OC_IP_FRAGMENTATION;
-+ p_Manip->muramAllocate = TRUE;
-+ break;
-+ case e_FM_PCD_MANIP_SPECIAL_OFFLOAD :
-+ switch (p_ManipParams->u.specialOffload.type)
-+ {
-+ case (e_FM_PCD_MANIP_SPECIAL_OFFLOAD_IPSEC):
-+ p_Manip->opcode = HMAN_OC_IPSEC_MANIP;
-+ p_Manip->muramAllocate = TRUE;
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("special offload type"));
-+ }
-+ break;
-+ default :
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("manip type"));
-+ }
-+
-+ return E_OK;
-+}
-+#endif /* not FM_CAPWAP_SUPPORT */
-+
-+#ifdef FM_CAPWAP_SUPPORT
-+static t_Error UpdateIndxStats(t_Handle h_FmPcd,
-+ t_Handle h_FmPort,
-+ t_FmPcdManip *p_Manip)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
-+ uint32_t tmpReg32 = 0;
-+ t_AdOfTypeContLookup *p_Ad;
-+ t_FmPortGetSetCcParams fmPortGetSetCcParams;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Manip,E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_Manip->h_Ad,E_INVALID_HANDLE);
-+
-+ p_Ad = (t_AdOfTypeContLookup *)p_Manip->h_Ad;
-+ if (p_Manip->h_FmPcd != h_FmPcd)
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE,
-+ ("handler of PCD previously was initiated by different value"));
-+
-+ memset(&fmPortGetSetCcParams, 0, sizeof(t_FmPortGetSetCcParams));
-+
-+ if (!p_Manip->p_StatsTbl)
-+ {
-+
-+ fmPortGetSetCcParams.setCcParams.type = UPDATE_NIA_PNDN;
-+ fmPortGetSetCcParams.setCcParams.nia = NIA_FM_CTL_AC_CC;
-+ err = FmPortGetSetCcParams(h_FmPort, &fmPortGetSetCcParams);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ tmpReg32 = GET_UINT32(p_Ad->ccAdBase);
-+
-+ p_Manip->p_StatsTbl =
-+ (t_Handle)FM_MURAM_AllocMem(p_FmPcd->h_FmMuram,
-+ (uint32_t)p_Manip->owner * FM_PCD_MANIP_INDEXED_STATS_ENTRY_SIZE,
-+ 4);
-+ if (!p_Manip->p_StatsTbl)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM alloc for Manipulation indexed statistics table"));
-+
-+ IOMemSet32(p_Manip->p_StatsTbl, 0, (uint32_t)(p_Manip->owner * 4));
-+
-+ tmpReg32 |= (uint32_t)(XX_VirtToPhys(p_Manip->p_StatsTbl) - p_FmPcd->physicalMuramBase);
-+
-+ if (p_Manip->cnia)
-+ tmpReg32 |= FM_PCD_MANIP_INDEXED_STATS_CNIA;
-+
-+ tmpReg32 |= FM_PCD_MANIP_INDEXED_STATS_DPD;
-+ WRITE_UINT32(p_Ad->ccAdBase, tmpReg32);
-+ }
-+ else
-+ {
-+ fmPortGetSetCcParams.setCcParams.type = UPDATE_NIA_PNDN;
-+ fmPortGetSetCcParams.setCcParams.nia = NIA_FM_CTL_AC_CC;
-+ err = FmPortGetSetCcParams(h_FmPort, &fmPortGetSetCcParams);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+ }
-+
-+ return E_OK;
-+}
-+#endif /* FM_CAPWAP_SUPPORT */
-+
-+static t_Error FmPcdManipInitUpdate(t_Handle h_FmPcd,
-+ t_Handle h_PcdParams,
-+ t_Handle h_FmPort,
-+ t_Handle h_Manip,
-+ t_Handle h_Ad,
-+ bool validate,
-+ int level,
-+ t_Handle h_FmTree)
-+{
-+ t_FmPcdManip *p_Manip = (t_FmPcdManip *)h_Manip;
-+ t_Error err = E_OK;
-+
-+ SANITY_CHECK_RETURN_ERROR(h_Manip,E_INVALID_HANDLE);
-+
-+ UNUSED(level);
-+ UNUSED(h_FmPcd);
-+ UNUSED(h_FmTree);
-+
-+ switch (p_Manip->opcode)
-+ {
-+ case (HMAN_OC_MV_INT_FRAME_HDR_FROM_FRM_TO_BUFFER_PREFFIX):
-+ err = UpdateInitMvIntFrameHeaderFromFrameToBufferPrefix(h_FmPort, p_Manip, h_Ad, validate);
-+ break;
-+#ifdef FM_CAPWAP_SUPPORT
-+ case (HMAN_OC_INSRT_HDR_BY_TEMPL_N_OR_FRAG_AFTER):
-+ if (!p_Manip->h_Frag)
-+ break;
-+ case (HMAN_OC_CAPWAP_FRAGMENTATION):
-+ err = UpdateInitCapwapFragmentation(h_FmPort, p_Manip, h_Ad, validate, h_FmTree);
-+ break;
-+ case (HMAN_OC_CAPWAP_RMV_DTLS_IF_EXIST):
-+ if (p_Manip->h_Frag)
-+ err = UpdateInitCapwapReasm(h_FmPcd, h_FmPort, p_Manip, h_Ad, validate);
-+ break;
-+ case (HMAN_OC_CAPWAP_INDEXED_STATS):
-+ err = UpdateIndxStats(h_FmPcd, h_FmPort, p_Manip);
-+ break;
-+#endif /* FM_CAPWAP_SUPPORT */
-+ case (HMAN_OC_IP_REASSEMBLY):
-+ err = UpdateInitIpReasm(h_FmPcd, h_PcdParams, h_FmPort, p_Manip, h_Ad, validate);
-+ break;
-+ default:
-+ return E_OK;
-+ }
-+
-+ return err;
-+}
-+
-+static t_Error FmPcdManipModifyUpdate(t_Handle h_Manip, t_Handle h_Ad, bool validate, int level, t_Handle h_FmTree)
-+{
-+
-+ t_FmPcdManip *p_Manip = (t_FmPcdManip *)h_Manip;
-+ t_Error err = E_OK;
-+
-+ UNUSED(level);
-+
-+ switch (p_Manip->opcode)
-+ {
-+ case (HMAN_OC_MV_INT_FRAME_HDR_FROM_FRM_TO_BUFFER_PREFFIX):
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("modify node with this type of manipulation is not suppported"));
-+ case (HMAN_OC_CAPWAP_RMV_DTLS_IF_EXIST):
-+
-+ if (p_Manip->h_Frag)
-+ {
-+ if (!(p_Manip->shadowUpdateParams & NUM_OF_TASKS) &&
-+ !(p_Manip->shadowUpdateParams & OFFSET_OF_DATA) &&
-+ !(p_Manip->shadowUpdateParams & OFFSET_OF_PR))
-+ RETURN_ERROR(MAJOR, E_INVALID_STATE, ("modify node with this type of manipulation requires manipulation be updated previously in SetPcd function"));
-+ }
-+ break;
-+#ifdef FM_CAPWAP_SUPPORT
-+ case (HMAN_OC_INSRT_HDR_BY_TEMPL_N_OR_FRAG_AFTER):
-+ if (p_Manip->h_Frag)
-+ err = UpdateModifyCapwapFragmenation(p_Manip, h_Ad, validate, h_FmTree);
-+ break;
-+#endif /* FM_CAPWAP_SUPPORT */
-+ default:
-+ return E_OK;
-+ }
-+
-+ return err;
-+}
-+
-+#ifdef FM_CAPWAP_SUPPORT
-+static t_Error GetPrOffsetByHeaderOrField(t_FmManipHdrInfo *p_HdrInfo, uint8_t *parseArrayOffset)
-+{
-+ e_NetHeaderType hdr = p_HdrInfo->hdr;
-+ e_FmPcdHdrIndex hdrIndex = p_HdrInfo->hdrIndex;
-+ bool byField = p_HdrInfo->byField;
-+ t_FmPcdFields field;
-+
-+ if (byField)
-+ field = p_HdrInfo->fullField;
-+
-+ if (byField)
-+ {
-+ switch (hdr)
-+ {
-+ case (HEADER_TYPE_ETH):
-+ switch (field.eth)
-+ {
-+ case (NET_HEADER_FIELD_ETH_TYPE):
-+ *parseArrayOffset = CC_PC_PR_ETYPE_LAST_OFFSET;
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("Header manipulation of the type Ethernet with this field not supported"));
-+ }
-+ break;
-+ case (HEADER_TYPE_VLAN):
-+ switch (field.vlan)
-+ {
-+ case (NET_HEADER_FIELD_VLAN_TCI) :
-+ if ((hdrIndex == e_FM_PCD_HDR_INDEX_NONE) || (hdrIndex == e_FM_PCD_HDR_INDEX_1))
-+ *parseArrayOffset = CC_PC_PR_VLAN1_OFFSET;
-+ else if (hdrIndex == e_FM_PCD_HDR_INDEX_LAST)
-+ *parseArrayOffset = CC_PC_PR_VLAN2_OFFSET;
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("Header manipulation of the type VLAN with this field not supported"));
-+ }
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("Header manipulation of this header by field not supported"));
-+ }
-+ }
-+ else
-+ {
-+ switch (hdr){
-+ case (HEADER_TYPE_ETH):
-+ *parseArrayOffset = (uint8_t)CC_PC_PR_ETH_OFFSET;
-+ break;
-+ case (HEADER_TYPE_USER_DEFINED_SHIM1):
-+ *parseArrayOffset = (uint8_t)CC_PC_PR_USER_DEFINED_SHIM1_OFFSET;
-+ break;
-+ case (HEADER_TYPE_USER_DEFINED_SHIM2):
-+ *parseArrayOffset = (uint8_t)CC_PC_PR_USER_DEFINED_SHIM2_OFFSET;
-+ break;
-+ case (HEADER_TYPE_LLC_SNAP):
-+ *parseArrayOffset = CC_PC_PR_USER_LLC_SNAP_OFFSET;
-+ break;
-+ case (HEADER_TYPE_PPPoE):
-+ *parseArrayOffset = CC_PC_PR_PPPOE_OFFSET;
-+ break;
-+ case (HEADER_TYPE_MPLS):
-+ if ((hdrIndex == e_FM_PCD_HDR_INDEX_NONE) || (hdrIndex == e_FM_PCD_HDR_INDEX_1))
-+ *parseArrayOffset = CC_PC_PR_MPLS1_OFFSET;
-+ else if (hdrIndex == e_FM_PCD_HDR_INDEX_LAST)
-+ *parseArrayOffset = CC_PC_PR_MPLS_LAST_OFFSET;
-+ break;
-+ case (HEADER_TYPE_IPv4):
-+ case (HEADER_TYPE_IPv6):
-+ if ((hdrIndex == e_FM_PCD_HDR_INDEX_NONE) || (hdrIndex == e_FM_PCD_HDR_INDEX_1))
-+ *parseArrayOffset = CC_PC_PR_IP1_OFFSET;
-+ else if (hdrIndex == e_FM_PCD_HDR_INDEX_2)
-+ *parseArrayOffset = CC_PC_PR_IP_LAST_OFFSET;
-+ break;
-+ case (HEADER_TYPE_MINENCAP):
-+ *parseArrayOffset = CC_PC_PR_MINENC_OFFSET;
-+ break;
-+ case (HEADER_TYPE_GRE):
-+ *parseArrayOffset = CC_PC_PR_GRE_OFFSET;
-+ break;
-+ case (HEADER_TYPE_TCP):
-+ case (HEADER_TYPE_UDP):
-+ case (HEADER_TYPE_IPSEC_AH):
-+ case (HEADER_TYPE_IPSEC_ESP):
-+ case (HEADER_TYPE_DCCP):
-+ case (HEADER_TYPE_SCTP):
-+ *parseArrayOffset = CC_PC_PR_L4_OFFSET;
-+ break;
-+ case (HEADER_TYPE_CAPWAP):
-+ case (HEADER_TYPE_CAPWAP_DTLS):
-+ *parseArrayOffset = CC_PC_PR_NEXT_HEADER_OFFSET;
-+ break;
-+ default:
-+ RETURN_ERROR(MAJOR, E_NOT_SUPPORTED, ("Header manipulation of this header is not supported"));
-+ }
-+ }
-+ return E_OK;
-+}
-+
-+static t_Error RmvHdrTillSpecLocNOrInsrtIntFrmHdr(t_FmPcdManipHdrRmvParams *p_ManipParams, t_FmPcdManip *p_Manip)
-+{
-+ t_AdOfTypeContLookup *p_Ad;
-+ uint32_t tmpReg32 = 0;
-+ uint8_t prsArrayOffset = 0;
-+ t_Error err;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Manip,E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_ManipParams,E_NULL_POINTER);
-+ SANITY_CHECK_RETURN_ERROR(p_Manip->h_Ad,E_INVALID_HANDLE);
-+
-+ p_Ad = (t_AdOfTypeContLookup *)p_Manip->h_Ad;
-+ if (p_Manip->rmv)
-+ {
-+ err = GetPrOffsetByHeaderOrField(&p_ManipParams->u.byHdr.u.fromStartByHdr.hdrInfo, &prsArrayOffset);
-+ if (err)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ tmpReg32 |= (uint32_t)prsArrayOffset << 24;
-+ tmpReg32 |= HMAN_RMV_HDR;
-+ }
-+
-+ if (p_Manip->insrt)
-+ tmpReg32 |= HMAN_INSRT_INT_FRM_HDR;
-+
-+ tmpReg32 |= (uint32_t)HMAN_OC_RMV_N_OR_INSRT_INT_FRM_HDR;
-+
-+ WRITE_UINT32(p_Ad->pcAndOffsets, tmpReg32);
-+
-+ tmpReg32 = 0;
-+ tmpReg32 |= FM_PCD_AD_CONT_LOOKUP_TYPE;
-+ WRITE_UINT32(p_Ad->ccAdBase, tmpReg32);
-+
-+ return E_OK;
-+}
-+#endif /* FM_CAPWAP_SUPPORT */
-+
-+static t_Error MvIntFrameHeaderFromFrameToBufferPrefix(t_FmPcdManip *p_Manip, bool caamUsed)
-+{
-+ t_AdOfTypeContLookup *p_Ad = (t_AdOfTypeContLookup *)p_Manip->h_Ad;
-+ uint32_t tmpReg32 = 0;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Ad,E_INVALID_HANDLE);
-+
-+ p_Manip->updateParams |= OFFSET_OF_PR | INTERNAL_CONTEXT_OFFSET;
-+
-+ tmpReg32 = 0;
-+ tmpReg32 |= FM_PCD_AD_CONT_LOOKUP_TYPE;
-+ *(uint32_t *)&p_Ad->ccAdBase = tmpReg32;
-+
-+ tmpReg32 = 0;
-+ tmpReg32 |= HMAN_OC_MV_INT_FRAME_HDR_FROM_FRM_TO_BUFFER_PREFFIX;
-+ tmpReg32 |= (uint32_t)0x16 << 16;
-+ *(uint32_t *)&p_Ad->pcAndOffsets = tmpReg32;
-+
-+ if (caamUsed)
-+ *(uint32_t *)&p_Ad->gmask = 0xf0000000;
-+
-+ return E_OK;
-+}
-+
-+#ifdef FM_CAPWAP_SUPPORT
-+static t_Error CapwapRmvDtlsHdr(t_FmPcd *p_FmPcd, t_FmPcdManip *p_Manip)
-+{
-+ t_AdOfTypeContLookup *p_Ad;
-+ uint32_t tmpReg32 = 0;
-+ t_Error err = E_OK;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Manip->h_Ad,E_INVALID_HANDLE);
-+
-+ p_Ad = (t_AdOfTypeContLookup *)p_Manip->h_Ad;
-+
-+ tmpReg32 = 0;
-+ tmpReg32 |= (uint32_t)HMAN_OC_CAPWAP_RMV_DTLS_IF_EXIST;
-+ WRITE_UINT32(p_Ad->pcAndOffsets, tmpReg32);
-+
-+ tmpReg32 = 0;
-+ tmpReg32 |= FM_PCD_AD_CONT_LOOKUP_TYPE;
-+
-+
-+ if (p_Manip->h_Frag)
-+ {
-+ p_Manip->updateParams |= INTERNAL_CONTEXT_OFFSET;
-+ tmpReg32 |= (uint32_t)(XX_VirtToPhys(p_Manip->h_Frag) - (p_FmPcd->physicalMuramBase));
-+ }
-+
-+ WRITE_UINT32(p_Ad->ccAdBase, tmpReg32);
-+
-+ return err;
-+}
-+
-+static t_Error CapwapReassembly(t_CapwapReassemblyParams *p_ManipParams,
-+ t_FmPcdManip *p_Manip,
-+ t_FmPcd *p_FmPcd,
-+ uint8_t poolId)
-+{
-+ t_Handle p_Table;
-+ uint32_t tmpReg32 = 0;
-+ int i = 0;
-+ uint8_t log2Num;
-+ uint8_t numOfSets;
-+ uint32_t j = 0;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Manip->h_Ad, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(p_FmPcd->h_Hc, E_INVALID_HANDLE);
-+
-+ if (!p_FmPcd->h_Hc)
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE,("hc port has to be initialized in this mode"));
-+ if (!POWER_OF_2(p_ManipParams->timeoutRoutineRequestTime))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("timeoutRoutineRequestTime has to be power of 2"));
-+ if (!POWER_OF_2(p_ManipParams->maxNumFramesInProcess))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE,("maxNumFramesInProcess has to be power of 2"));
-+ if (!p_ManipParams->timeoutRoutineRequestTime && p_ManipParams->timeoutThresholdForReassmProcess)
-+ DBG(WARNING, ("if timeoutRoutineRequestTime 0, timeoutThresholdForReassmProcess is uselessly"));
-+ if (p_ManipParams->numOfFramesPerHashEntry == e_FM_PCD_MANIP_FOUR_WAYS_HASH)
-+ {
-+ if ((p_ManipParams->maxNumFramesInProcess < 4) ||
-+ (p_ManipParams->maxNumFramesInProcess > 512))
-+ RETURN_ERROR(MAJOR,E_INVALID_VALUE, ("In the case of numOfFramesPerHashEntry = e_FM_PCD_MANIP_EIGHT_WAYS_HASH maxNumFramesInProcess has to be in the range 4-512"));
-+ }
-+ else
-+ {
-+ if ((p_ManipParams->maxNumFramesInProcess < 8) ||
-+ (p_ManipParams->maxNumFramesInProcess > 2048))
-+ RETURN_ERROR(MAJOR,E_INVALID_VALUE, ("In the case of numOfFramesPerHashEntry = e_FM_PCD_MANIP_FOUR_WAYS_HASH maxNumFramesInProcess has to be in the range 8-2048"));
-+ }
-+
-+ p_Manip->updateParams |= (NUM_OF_TASKS | OFFSET_OF_PR | OFFSET_OF_DATA | HW_PORT_ID);
-+
-+ p_Manip->h_Frag = (t_Handle)FM_MURAM_AllocMem(p_FmPcd->h_FmMuram,
-+ FM_PCD_MANIP_CAPWAP_REASM_TABLE_SIZE,
-+ FM_PCD_MANIP_CAPWAP_REASM_TABLE_ALIGN);
-+ if (!p_Manip->h_Frag)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM alloc CAPWAP reassembly parameters table"));
-+
-+ IOMemSet32(p_Manip->h_Frag, 0, FM_PCD_MANIP_CAPWAP_REASM_TABLE_SIZE);
-+
-+ p_Table = (t_CapwapReasmPram *)p_Manip->h_Frag;
-+
-+ p_Manip->fragParams.p_AutoLearnHashTbl =
-+ (t_Handle)FM_MURAM_AllocMem(p_FmPcd->h_FmMuram,
-+ (uint32_t)(p_ManipParams->maxNumFramesInProcess * 2 * FM_PCD_MANIP_CAPWAP_REASM_AUTO_LEARNING_HASH_ENTRY_SIZE),
-+ FM_PCD_MANIP_CAPWAP_REASM_TABLE_ALIGN);
-+
-+ if (!p_Manip->fragParams.p_AutoLearnHashTbl)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY,("MURAM alloc for CAPWAP automatic learning hash table"));
-+
-+ IOMemSet32(p_Manip->fragParams.p_AutoLearnHashTbl, 0, (uint32_t)(p_ManipParams->maxNumFramesInProcess * 2 * FM_PCD_MANIP_CAPWAP_REASM_AUTO_LEARNING_HASH_ENTRY_SIZE));
-+
-+
-+ tmpReg32 = (uint32_t)(XX_VirtToPhys(p_Manip->fragParams.p_AutoLearnHashTbl) - p_FmPcd->physicalMuramBase);
-+
-+ WRITE_UINT32(((t_CapwapReasmPram *)p_Table)->autoLearnHashTblPtr, tmpReg32);
-+
-+ tmpReg32 = 0;
-+ if (p_ManipParams->timeOutMode == e_FM_PCD_MANIP_TIME_OUT_BETWEEN_FRAMES)
-+ tmpReg32 |= FM_PCD_MANIP_CAPWAP_REASM_TIME_OUT_BETWEEN_FRAMES;
-+ if (p_ManipParams->haltOnDuplicationFrag)
-+ tmpReg32 |= FM_PCD_MANIP_CAPWAP_REASM_HALT_ON_DUPLICATE_FRAG;
-+ if (p_ManipParams->numOfFramesPerHashEntry == e_FM_PCD_MANIP_EIGHT_WAYS_HASH)
-+ {
-+ i = 8;
-+ tmpReg32 |= FM_PCD_MANIP_CAPWAP_REASM_AUTOMATIC_LEARNIN_HASH_8_WAYS;
-+ }
-+ else
-+ i = 4;
-+
-+ numOfSets = (uint8_t)((p_ManipParams->maxNumFramesInProcess * 2) / i);
-+ LOG2(numOfSets, log2Num);
-+ tmpReg32 |= (uint32_t)(log2Num - 1) << 24;
-+
-+ WRITE_UINT32(((t_CapwapReasmPram *)p_Table)->mode, tmpReg32);
-+
-+ for (j=0; jmaxNumFramesInProcess*2; j++)
-+ if (((j / i) % 2)== 0)
-+ WRITE_UINT32(*(uint32_t *)PTR_MOVE(p_Manip->fragParams.p_AutoLearnHashTbl, j * FM_PCD_MANIP_CAPWAP_REASM_AUTO_LEARNING_HASH_ENTRY_SIZE), 0x80000000);
-+
-+ tmpReg32 = 0x00008000;
-+ tmpReg32 |= (uint32_t)poolId << 16;
-+ WRITE_UINT32(((t_CapwapReasmPram *)p_Table)->bufferPoolIdAndRisc1SetIndexes, tmpReg32);
-+ WRITE_UINT32(((t_CapwapReasmPram *)p_Table)->risc23SetIndexes, 0x80008000);
-+ WRITE_UINT32(((t_CapwapReasmPram *)p_Table)->risc4SetIndexesAndExtendedStatsTblPtr, 0x80000000);
-+
-+ p_Manip->fragParams.maxNumFramesInProcess = p_ManipParams->maxNumFramesInProcess;
-+
-+ p_Manip->fragParams.sgBpid = poolId;
-+
-+ p_Manip->fragParams.fqidForTimeOutFrames = p_ManipParams->fqidForTimeOutFrames;
-+ p_Manip->fragParams.timeoutRoutineRequestTime = p_ManipParams->timeoutRoutineRequestTime;
-+ p_Manip->fragParams.bitFor1Micro = FmGetTimeStampScale(p_FmPcd->h_Fm);
-+
-+ tmpReg32 = 0;
-+ tmpReg32 |= (((uint32_t)1<fragParams.bitFor1Micro) * p_ManipParams->timeoutThresholdForReassmProcess);
-+ WRITE_UINT32(((t_CapwapReasmPram *)p_Table)->expirationDelay, tmpReg32);
-+
-+ return E_OK;
-+}
-+
-+static t_Error CapwapFragmentation(t_CapwapFragmentationParams *p_ManipParams,
-+ t_FmPcdManip *p_Manip,
-+ t_FmPcd *p_FmPcd,
-+ uint8_t poolId)
-+{
-+ t_AdOfTypeContLookup *p_Ad;
-+ uint32_t tmpReg32 = 0;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Manip->h_Ad,E_INVALID_HANDLE);
-+
-+ p_Manip->updateParams |= OFFSET_OF_DATA;
-+
-+ p_Manip->frag = TRUE;
-+
-+ p_Manip->h_Frag = (t_Handle)FM_MURAM_AllocMem(p_FmPcd->h_FmMuram,
-+ FM_PCD_CC_AD_ENTRY_SIZE,
-+ FM_PCD_CC_AD_TABLE_ALIGN);
-+ if (!p_Manip->h_Frag)
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("MURAM alloc for CAPWAP fragmentation table descriptor"));
-+
-+ IOMemSet32(p_Manip->h_Frag, 0, FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ p_Ad = (t_AdOfTypeContLookup *)p_Manip->h_Frag;
-+
-+ tmpReg32 = 0;
-+ tmpReg32 |= (uint32_t)HMAN_OC_CAPWAP_FRAGMENTATION;
-+
-+ if (p_ManipParams->headerOptionsCompr)
-+ tmpReg32 |= FM_PCD_MANIP_CAPWAP_FRAG_COMPR_OPTION_FIELD_EN;
-+ tmpReg32 |= ((uint32_t)poolId << 8);
-+ WRITE_UINT32(p_Ad->pcAndOffsets, tmpReg32);
-+
-+ tmpReg32 = 0;
-+ tmpReg32 |= FM_PCD_AD_CONT_LOOKUP_TYPE;
-+ WRITE_UINT32(p_Ad->ccAdBase, tmpReg32);
-+
-+ p_Manip->sizeForFragmentation = p_ManipParams->sizeForFragmentation;
-+ p_Manip->fragParams.sgBpid = poolId;
-+
-+ return E_OK;
-+}
-+#endif /* FM_CAPWAP_SUPPORT */
-+
-+static t_Error FillReassmManipParams(t_FmPcdManip *p_Manip, bool ipv4)
-+{
-+ t_AdOfTypeContLookup *p_Ad;
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)p_Manip->h_FmPcd;
-+ uint32_t tmpReg32;
-+ t_Error err = E_OK;
-+
-+ /* Creates the IP Reassembly Parameters table. It contains parameters that are specific to either the IPv4 reassembly
-+ function or to the IPv6 reassembly function. If both IPv4 reassembly and IPv6 reassembly are required, then
-+ two separate IP Reassembly Parameter tables are required.*/
-+ if ((err = CreateIpReassTable(p_Manip, ipv4)) != E_OK)
-+ RETURN_ERROR(MAJOR, err, NO_MSG);
-+
-+ /* Sets the first Ad register (ccAdBase) - Action Descriptor Type and Pointer to the IP Reassembly Parameters Table offset from MURAM*/
-+ tmpReg32 = 0;
-+ tmpReg32 |= FM_PCD_AD_CONT_LOOKUP_TYPE;
-+
-+ /* Gets the required Action descriptor table pointer */
-+ if (ipv4)
-+ {
-+ p_Ad = (t_AdOfTypeContLookup *)p_Manip->ipReassmParams.h_Ipv4Ad;
-+ tmpReg32 |= (uint32_t)(XX_VirtToPhys(p_Manip->ipReassmParams.p_Ipv4ReassTbl) - (p_FmPcd->physicalMuramBase));
-+ }
-+ else
-+ {
-+ p_Ad = (t_AdOfTypeContLookup *)p_Manip->ipReassmParams.h_Ipv6Ad;
-+ tmpReg32 |= (uint32_t)(XX_VirtToPhys(p_Manip->ipReassmParams.p_Ipv6ReassTbl) - (p_FmPcd->physicalMuramBase));
-+ }
-+
-+ WRITE_UINT32(p_Ad->ccAdBase, tmpReg32);
-+
-+ /* Sets the second Ad register (matchTblPtr) - Buffer pool ID (BPID for V2) and Scatter/Gather table offset*/
-+ /* mark the Scatter/Gather table offset to be set later on when the port will be known */
-+ p_Manip->updateParams = (NUM_OF_TASKS | NUM_OF_EXTRA_TASKS);
-+
-+#if (DPAA_VERSION == 10)
-+ tmpReg32 = (uint32_t)(p_Manip->ipReassmParams.sgBpid << 8);
-+ WRITE_UINT32(p_Ad->matchTblPtr, tmpReg32);
-+#endif /* (DPAA_VERSION == 10) */
-+#if (DPAA_VERSION >= 11)
-+ if (p_Manip->ipReassmParams.nonConsistentSpFqid != 0)
-+ {
-+ tmpReg32 = FM_PCD_AD_NCSPFQIDM_MASK | (uint32_t)(p_Manip->ipReassmParams.nonConsistentSpFqid);
-+ WRITE_UINT32(p_Ad->gmask, tmpReg32);
-+ }
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ /* Sets the third Ad register (pcAndOffsets)- IP Reassemble Operation Code*/
-+ tmpReg32 = 0;
-+ tmpReg32 |= (uint32_t)HMAN_OC_IP_REASSEMBLY;
-+ WRITE_UINT32(p_Ad->pcAndOffsets, tmpReg32);
-+
-+ p_Manip->reassm = TRUE;
-+
-+ return E_OK;
-+}
-+
-+static t_Error SetIpv4ReassmManip(t_FmPcdManip *p_Manip)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)p_Manip->h_FmPcd;
-+
-+ /* Allocation if IPv4 Action descriptor */
-+ p_Manip->ipReassmParams.h_Ipv4Ad =
-+ (t_Handle)XX_MallocSmart(FM_PCD_CC_AD_ENTRY_SIZE,
-+ p_Manip->ipReassmParams.dataMemId,
-+ FM_PCD_CC_AD_TABLE_ALIGN);
-+ if (!p_Manip->ipReassmParams.h_Ipv4Ad)
-+ {
-+ ReleaseManipHandler(p_Manip, p_FmPcd);
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("Allocation of IPv4 table descriptor"));
-+ }
-+
-+ memset(p_Manip->ipReassmParams.h_Ipv4Ad, 0, FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ /* Fill reassembly manipulation parameter in the IP Reassembly Action Descriptor */
-+ return FillReassmManipParams(p_Manip, TRUE);
-+}
-+
-+static t_Error SetIpv6ReassmManip(t_FmPcdManip *p_Manip)
-+{
-+ t_FmPcd *p_FmPcd = (t_FmPcd *)p_Manip->h_FmPcd;
-+
-+ /* Allocation if IPv6 Action descriptor */
-+ p_Manip->ipReassmParams.h_Ipv6Ad =
-+ (t_Handle)XX_MallocSmart(FM_PCD_CC_AD_ENTRY_SIZE,
-+ p_Manip->ipReassmParams.dataMemId,
-+ FM_PCD_CC_AD_TABLE_ALIGN);
-+ if (!p_Manip->ipReassmParams.h_Ipv6Ad)
-+ {
-+ ReleaseManipHandler(p_Manip, p_FmPcd);
-+ RETURN_ERROR(MAJOR, E_NO_MEMORY, ("Allocation of IPv6 table descriptor"));
-+ }
-+
-+ memset(p_Manip->ipReassmParams.h_Ipv6Ad, 0, FM_PCD_CC_AD_ENTRY_SIZE);
-+
-+ /* Fill reassembly manipulation parameter in the IP Reassembly Action Descriptor */
-+ return FillReassmManipParams(p_Manip, FALSE);
-+}
-+
-+static t_Error IpReassembly(t_FmPcdManipReassemParams *p_ManipReassmParams,
-+ t_FmPcdManip *p_Manip)
-+{
-+ uint32_t maxSetNumber = 10000;
-+ t_FmPcdManipReassemIpParams reassmManipParams = p_ManipReassmParams->u.ipReassem;
-+ t_Error res;
-+
-+ SANITY_CHECK_RETURN_ERROR(p_Manip->h_FmPcd, E_INVALID_HANDLE);
-+ SANITY_CHECK_RETURN_ERROR(((t_FmPcd *)p_Manip->h_FmPcd)->h_Hc, E_INVALID_HANDLE);
-+
-+ /* Check validation of user's parameter.*/
-+ if ((reassmManipParams.timeoutThresholdForReassmProcess < 1000) ||
-+ (reassmManipParams.timeoutThresholdForReassmProcess > 8000000))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE,("timeoutThresholdForReassmProcess should be 1msec - 8sec"));
-+ /* It is recommended that the total number of entries in this table (number of sets * number of ways)
-+ will be twice the number of frames that are expected to be reassembled simultaneously.*/
-+ if (reassmManipParams.maxNumFramesInProcess >
-+ (reassmManipParams.maxNumFramesInProcess * maxSetNumber / 2))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("maxNumFramesInProcess has to be less than (maximun set number * number of ways / 2)"));
-+
-+ if ((p_ManipReassmParams->hdr == HEADER_TYPE_IPv6) &&
-+ (reassmManipParams.minFragSize[1] < 256))
-+ RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("minFragSize[1] must be >= 256"));
-+
-+ /* Saves user's reassembly manipulation parameters */
-+ p_Manip->ipReassmParams.relativeSchemeId[0] = reassmManipParams.relativeSchemeId[0];
-+ p_Manip->ipReassmParams.relativeSchemeId[1] = reassmManipParams.relativeSchemeId[1];
-+ p_Manip->ipReassmParams.numOfFramesPerHashEntry[0] = reassmManipParams.numOfFramesPerHashEntry[0];
-+ p_Manip->ipReassmParams.numOfFramesPerHashEntry[1] = reassmManipParams.numOfFramesPerHashEntry[1];
-+ p_Manip->ipReassmParams.minFragSize[0] = reassmManipParams.minFragSize[0];
-+ p_Manip->ipReassmParams.minFragSize[1] = reassmManipParams.minFragSize[1];
-+ p_Manip->ipReassmParams.maxNumFramesInProcess = reassmManipParams.maxNumFramesInProcess;
-+ p_Manip->ipReassmParams.timeOutMode = reassmManipParams.timeOutMode;
-+ p_Manip->ipReassmParams.fqidForTimeOutFrames = reassmManipParams.fqidForTimeOutFrames;
-+ p_Manip->ipReassmParams.timeoutThresholdForReassmProcess = reassmManipParams.timeoutThresholdForReassmProcess;
-+ p_Manip->ipReassmParams.dataMemId = reassmManipParams.dataMemId;
-+ p_Manip->ipReassmParams.dataLiodnOffset = reassmManipParams.dataLiodnOffset;
-+#if (DPAA_VERSION == 10)
-+ p_Manip->ipReassmParams.sgBpid = reassmManipParams.sgBpid;
-+#endif /* (DPAA_VERSION == 10) */
-+#if (DPAA_VERSION >= 11)
-+ if (reassmManipParams.nonConsistentSpFqid != 0)
-+ {
-+ p_Manip->ipReassmParams.nonConsistentSpFqid = reassmManipParams.nonConsistentSpFqid;
-+ }
-+#endif /* (DPAA_VERSION >= 11) */
-+
-+ /* Creates and initializes the IP Reassembly common parameter table */
-+ CreateIpReassCommonTable(p_Manip);
-+
-+ /* Creation of IPv4 reassembly manipulation */
-+ if ((p_Manip->ipReassmParams.hdr == HEADER_TYPE_IPv6) || (p_Manip->ipReassmParams.hdr == HEADER_TYPE_IPv4))
-+ {
-+ res = SetIpv4ReassmManip(p_Manip);
-+ if (res != E_OK)
-+ return res;
-+ }
-+
-+ /* Creation of IPv6 reassembly manipulation */
-+ if (p_Manip->ipReassmParams.hdr == HEADER_TYPE_IPv6)
-+ {
-+ res = SetIpv6ReassmManip(p_Manip);
-+ if (res != E_OK)
-+ return res;
-+ }
-+
-+ return E_OK;
-+}
-+
-+static void setReassmSchemeParams(t_FmPcd* p_FmPcd, t_FmPcdKgSchemeParams *p_Scheme, t_Handle h_CcTree, bool ipv4, uint8_t groupId)
-+{
-+ uint32_t j;
-+ uint8_t res;
-+
-+ /* Configures scheme's network environment parameters */
-+ p_Scheme->netEnvParams.numOfDistinctionUnits = 2;
-+ if (ipv4)
-+ res = FmPcdNetEnvGetUnitId(p_FmPcd, FmPcdGetNetEnvId(p_Scheme->netEnvParams.h_NetEnv), HEADER_TYPE_IPv4, FALSE, 0);
-+ else
-+ res = FmPcdNetEnvGetUnitId(p_FmPcd, FmPcdGetNetEnvId(p_Scheme->netEnvParams.h_NetEnv), HEADER_TYPE_IPv6, FALSE, 0);
-+ ASSERT_COND(res != FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS);
-+ p_Scheme->netEnvParams.unitIds[0] = res;
-+
-+ res = FmPcdNetEnvGetUnitId(p_FmPcd, FmPcdGetNetEnvId(p_Scheme->netEnvParams.h_NetEnv), HEADER_TYPE_USER_DEFINED_SHIM2, FALSE, 0);
-+ ASSERT_COND(res != FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS);
-+ p_Scheme->netEnvParams.unitIds[1] = res;
-+
-+ /* Configures scheme's next engine parameters*/
-+ p_Scheme->nextEngine = e_FM_PCD_CC;
-+ p_Scheme->kgNextEngineParams.cc.h_CcTree = h_CcTree;
-+ p_Scheme->kgNextEngineParams.cc.grpId = groupId;
-+ p_Scheme->useHash = TRUE;
-+
-+ /* Configures scheme's key*/
-+ if (ipv4 == TRUE)
-+ {
-+ p_Scheme->keyExtractAndHashParams.numOfUsedExtracts = 4;
-+ p_Scheme->keyExtractAndHashParams.extractArray[0].type = e_FM_PCD_EXTRACT_BY_HDR;
-+ p_Scheme->keyExtractAndHashParams.extractArray[0].extractByHdr.type = e_FM_PCD_EXTRACT_FULL_FIELD;
-+ p_Scheme->keyExtractAndHashParams.extractArray[0].extractByHdr.hdr = HEADER_TYPE_IPv4 ;
-+ p_Scheme->keyExtractAndHashParams.extractArray[0].extractByHdr.extractByHdrType.fullField.ipv4 = NET_HEADER_FIELD_IPv4_DST_IP;
-+ p_Scheme->keyExtractAndHashParams.extractArray[1].type = e_FM_PCD_EXTRACT_BY_HDR;
-+ p_Scheme->keyExtractAndHashParams.extractArray[1].extractByHdr.type = e_FM_PCD_EXTRACT_FULL_FIELD;
-+ p_Scheme->keyExtractAndHashParams.extractArray[1].extractByHdr.hdr = HEADER_TYPE_IPv4;
-+ p_Scheme->keyExtractAndHashParams.extractArray[1].extractByHdr.extractByHdrType.fullField.ipv4 = NET_HEADER_FIELD_IPv4_SRC_IP;
-+ p_Scheme->keyExtractAndHashParams.extractArray[2].type = e_FM_PCD_EXTRACT_BY_HDR;
-+ p_Scheme->keyExtractAndHashParams.extractArray[2].extractByHdr.type = e_FM_PCD_EXTRACT_FULL_FIELD;
-+ p_Scheme->keyExtractAndHashParams.extractArray[2].extractByHdr.hdr = HEADER_TYPE_IPv4;
-+ p_Scheme->keyExtractAndHashParams.extractArray[2].extractByHdr.extractByHdrType.fullField.ipv4 = NET_HEADER_FIELD_IPv4_PROTO;
-+ p_Scheme->keyExtractAndHashParams.extractArray[3].type = e_FM_PCD_EXTRACT_BY_HDR;
-+ p_Scheme->keyExtractAndHashParams.extractArray[3].extractByHdr.hdr = HEADER_TYPE_IPv4;
-+ p_Scheme->keyExtractAndHashParams.extractArray[3].extractByHdr.type = e_FM_PCD_EXTRACT_FROM_HDR;
-+ p_Scheme->keyExtractAndHashParams.extractArray[3].extractByHdr.ignoreProtocolValidation = FALSE;
-+ p_Scheme->keyExtractAndHashParams.extractArray[3].extractByHdr.extractByHdrType.fromHdr.size = 2;
-+ p_Scheme->keyExtractAndHashParams.extractArray[3].extractByHdr.extractByHdrType.fromHdr.offset = 4;
-+ }
-+ else /* IPv6 */
-+ {
-+ p_Scheme->keyExtractAndHashParams.numOfUsedExtracts = 3;
-+ p_Scheme->keyExtractAndHashParams.extractArray[0].type = e_FM_PCD_EXTRACT_BY_HDR;
-+ p_Scheme->keyExtractAndHashParams.extractArray[0].extractByHdr.type = e_FM_PCD_EXTRACT_FULL_FIELD;
-+ p_Scheme->keyExtractAndHashParams.extractArray[0].extractByHdr.hdr = HEADER_TYPE_IPv6 ;
-+ p_Scheme->keyExtractAndHashParams.extractArray[0].extractByHdr.extractByHdrType.fullField.ipv6 = NET_HEADER_FIELD_IPv6_DST_IP;
-+ p_Scheme->keyExtractAndHashParams.extractArray[1].type = e_FM_PCD_EXTRACT_BY_HDR;
-+ p_Scheme->keyExtractAndHashParams.extractArray[1].extractByHdr.type = e_FM_PCD_EXTRACT_FULL_FIELD;
-+ p_Scheme->keyExtractAndHashParams.extractArray[1].extractByHdr.hdr = HEADER_TYPE_IPv6;
-+ p_Scheme->keyExtractAndHashParams.extractArray[1].extractByHdr.extractByHdrType.fullField.ipv6 = NET_HEADER_FIELD_IPv6_SRC_IP;
-+ p_Scheme->keyExtractAndHashParams.extractArray[2].type = e_FM_PCD_EXTRACT_BY_HDR;
-+ p_Scheme->keyExtractAndHashParams.extractArray[2].extractByHdr.hdr = HEADER_TYPE_USER_DEFINED_SHIM2;
-+ p_Scheme->keyExtractAndHashParams.extractArray[2].extractByHdr.type = e_FM_PCD_EXTRACT_FROM_HDR;
-+ p_Scheme->keyExtractAndHashParams.extractArray[2].extractByHdr.extractByHdrType.fromHdr.size = 4;
-+ p_Scheme->keyExtractAndHashParams.extractArray[2].extractByHdr.extractByHdrType.fromHdr.offset = 4;
-+ p_Scheme->keyExtractAndHashParams.extractArray[2].extractByHdr.ignoreProtocolValidation = TRUE;
-+ }
-+
-+ p_Scheme->keyExtractAndHashParams.privateDflt0 = 0x01020304;
-+ p_Scheme->keyExtractAndHashParams.privateDflt1 = 0x11121314;
-+ p_Scheme->keyExtractAndHashParams.numOfUsedDflts = FM_PCD_KG_NUM_OF_DEFAULT_GROUPS;
-+ for (j=0; j