summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/configs/hsdk.h6
-rw-r--r--include/configs/mx28evk.h2
-rw-r--r--include/configs/pcm051.h68
-rw-r--r--include/configs/xilinx_zynqmp_zcu102.h3
-rw-r--r--include/cortina.h4
-rw-r--r--include/efi.h3
-rw-r--r--include/environment.h2
-rw-r--r--include/fat.h2
-rw-r--r--include/hexdump.h91
-rw-r--r--include/linux/byteorder/generic.h107
-rw-r--r--include/linux/compat.h1
-rw-r--r--include/pe.h3
-rw-r--r--include/phy.h3
-rw-r--r--include/vsc9953.h70
14 files changed, 287 insertions, 78 deletions
diff --git a/include/configs/hsdk.h b/include/configs/hsdk.h
index 3684f4d6d6..5da053002e 100644
--- a/include/configs/hsdk.h
+++ b/include/configs/hsdk.h
@@ -62,6 +62,12 @@
#define CONFIG_ENV_SIZE SZ_16K
#define CONFIG_EXTRA_ENV_SETTINGS \
+ "upgrade=if mmc rescan && " \
+ "fatload mmc 0:1 ${loadaddr} u-boot-update.scr && " \
+ "iminfo ${loadaddr} && source ${loadaddr}; then; else echo " \
+ "\"Fail to upgrade.\n" \
+ "Do you have u-boot-update.scr and u-boot.head on first (FAT) SD card partition?\"" \
+ "; fi\0" \
"core_dccm_0=0x10\0" \
"core_dccm_1=0x6\0" \
"core_dccm_2=0x10\0" \
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index f373b1e24e..dc4db2bec8 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -43,7 +43,7 @@
(CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE)
#endif
-/* Environemnt is in SPI flash */
+/* Environment is in SPI flash */
#if defined(CONFIG_CMD_SF) && defined(CONFIG_ENV_IS_IN_SPI_FLASH)
#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
#define CONFIG_ENV_OFFSET 0x40000 /* 256K */
diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h
index a59e88171f..5381ed1f45 100644
--- a/include/configs/pcm051.h
+++ b/include/configs/pcm051.h
@@ -25,23 +25,46 @@
#define CONFIG_MACH_TYPE MACH_TYPE_PCM051
/* set to negative value for no autoboot */
+#define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \
+ "bootcmd_" #devtypel #instance "=" \
+ "setenv mmcdev " #instance"; "\
+ "setenv bootpart " #instance":2 ; "\
+ "run mmcboot\0"
+
+#define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \
+ #devtypel #instance " "
+
+#define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
+ "bootcmd_" #devtypel "=" \
+ "run nandboot\0"
+
+#define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
+ #devtypel #instance " "
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 0) \
+ func(LEGACY_MMC, legacy_mmc, 0) \
+ func(MMC, mmc, 1) \
+ func(LEGACY_MMC, legacy_mmc, 1) \
+ func(NAND, nand, 0)
+
+#define CONFIG_BOOTCOMMAND \
+ "run distro_bootcmd"
+
+#include <config_distro_bootcmd.h>
+
+#include <environment/ti/dfu.h>
+#include <environment/ti/mmc.h>
+
#define CONFIG_EXTRA_ENV_SETTINGS \
- "loadaddr=0x80007fc0\0" \
- "fdtaddr=0x80000000\0" \
- "rdaddr=0x81000000\0" \
+ DEFAULT_LINUX_BOOT_ENV \
+ DEFAULT_MMC_TI_ARGS \
"bootfile=uImage\0" \
- "fdtfile=pcm051.dtb\0" \
+ "fdtfile=am335x-wega-rdk.dtb\0" \
"console=ttyO0,115200n8\0" \
"optargs=\0" \
- "mmcdev=0\0" \
- "mmcroot=/dev/mmcblk0p2 ro\0" \
- "mmcrootfstype=ext4 rootwait\0" \
"ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \
"ramrootfstype=ext2\0" \
- "mmcargs=setenv bootargs console=${console} " \
- "${optargs} " \
- "root=${mmcroot} " \
- "rootfstype=${mmcrootfstype}\0" \
"bootenv=uEnv.txt\0" \
"loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
@@ -57,31 +80,12 @@
"loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \
"loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} ${bootfile}\0" \
"mmcboot=echo Booting from mmc ...; " \
- "run mmcargs; " \
+ "run args_mmc; " \
"bootm ${loadaddr}\0" \
"ramboot=echo Booting from ramdisk ...; " \
"run ramargs; " \
"bootm ${loadaddr}\0" \
-
-#define CONFIG_BOOTCOMMAND \
- "mmc dev ${mmcdev}; if mmc rescan; then " \
- "echo SD/MMC found on device ${mmcdev};" \
- "if run loadbootscript; then " \
- "run bootscript;" \
- "else " \
- "if run loadbootenv; then " \
- "echo Loaded environment from ${bootenv};" \
- "run importbootenv;" \
- "fi;" \
- "if test -n $uenvcmd; then " \
- "echo Running uenvcmd ...;" \
- "run uenvcmd;" \
- "fi;" \
- "if run loaduimage; then " \
- "run mmcboot;" \
- "fi;" \
- "fi ;" \
- "fi;" \
+ BOOTENV
/* Clock Defines */
#define V_OSCK 25000000 /* Clock output from T2 */
diff --git a/include/configs/xilinx_zynqmp_zcu102.h b/include/configs/xilinx_zynqmp_zcu102.h
index ca11b97c7c..ad6bc3d1bf 100644
--- a/include/configs/xilinx_zynqmp_zcu102.h
+++ b/include/configs/xilinx_zynqmp_zcu102.h
@@ -39,6 +39,9 @@
#define CONFIG_ZYNQ_EEPROM_BUS 5
#define CONFIG_ZYNQ_GEM_EEPROM_ADDR 0x54
+#define CONFIG_SPD_EEPROM
+#define CONFIG_DDR_SPD
+
#include <configs/xilinx_zynqmp.h>
#endif /* __CONFIG_ZYNQMP_ZCU102_H */
diff --git a/include/cortina.h b/include/cortina.h
index 4cb0985519..ba7fafe9c4 100644
--- a/include/cortina.h
+++ b/include/cortina.h
@@ -64,6 +64,10 @@
#define VILLA_LINE_SDS_COMMON_STX0_TX_OUTPUT_CTRLA 0x427
#define VILLA_LINE_SDS_COMMON_STX0_TX_OUTPUT_CTRLB 0x428
+/* Cortina CS4223 */
+#define CS4223_EEPROM_STATUS 0x5001
+#define CS4223_EEPROM_FIRMWARE_LOADDONE 0x1
+
#define mseq_edc_bist_done (0x1<<0)
#define mseq_edc_bist_fail (0x1<<8)
diff --git a/include/efi.h b/include/efi.h
index 98bddbac1a..e30a3c51c6 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -89,12 +89,11 @@ typedef u64 efi_virtual_addr_t;
typedef void *efi_handle_t;
#define EFI_GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \
- ((efi_guid_t) \
{{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, \
((a) >> 24) & 0xff, \
(b) & 0xff, ((b) >> 8) & 0xff, \
(c) & 0xff, ((c) >> 8) & 0xff, \
- (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) } })
+ (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) } }
/* Generic EFI table header */
struct efi_table_hdr {
diff --git a/include/environment.h b/include/environment.h
index 50c62c5645..70b7eda428 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -292,7 +292,7 @@ int env_import_redund(const char *buf1, int buf1_status,
/**
* env_get_char() - Get a character from the early environment
*
- * This reads from the pre-relocation environemnt
+ * This reads from the pre-relocation environment
*
* @index: Index of character to read (0 = first)
* @return character read, or -ve on error
diff --git a/include/fat.h b/include/fat.h
index 7dada411e5..09e1423685 100644
--- a/include/fat.h
+++ b/include/fat.h
@@ -180,7 +180,7 @@ static inline u32 clust_to_sect(fsdata *fsdata, u32 clust)
return fsdata->data_begin + clust * fsdata->clust_size;
}
-static inline u32 sect_to_clust(fsdata *fsdata, u32 sect)
+static inline u32 sect_to_clust(fsdata *fsdata, int sect)
{
return (sect - fsdata->data_begin) / fsdata->clust_size;
}
diff --git a/include/hexdump.h b/include/hexdump.h
new file mode 100644
index 0000000000..f7b76ff712
--- /dev/null
+++ b/include/hexdump.h
@@ -0,0 +1,91 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2018 Synopsys, Inc. All rights reserved.
+ *
+ */
+
+#ifndef HEXDUMP_H
+#define HEXDUMP_H
+
+#include <linux/ctype.h>
+#include <linux/types.h>
+
+enum {
+ DUMP_PREFIX_NONE,
+ DUMP_PREFIX_ADDRESS,
+ DUMP_PREFIX_OFFSET
+};
+
+extern const char hex_asc[];
+#define hex_asc_lo(x) hex_asc[((x) & 0x0f)]
+#define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4]
+
+static inline char *hex_byte_pack(char *buf, u8 byte)
+{
+ *buf++ = hex_asc_hi(byte);
+ *buf++ = hex_asc_lo(byte);
+ return buf;
+}
+
+/**
+ * hex_to_bin - convert a hex digit to its real value
+ * @ch: ascii character represents hex digit
+ *
+ * hex_to_bin() converts one hex digit to its actual value or -1 in case of bad
+ * input.
+ */
+static inline int hex_to_bin(char ch)
+{
+ if ((ch >= '0') && (ch <= '9'))
+ return ch - '0';
+ ch = tolower(ch);
+ if ((ch >= 'a') && (ch <= 'f'))
+ return ch - 'a' + 10;
+ return -1;
+}
+
+/**
+ * hex2bin - convert an ascii hexadecimal string to its binary representation
+ * @dst: binary result
+ * @src: ascii hexadecimal string
+ * @count: result length
+ *
+ * Return 0 on success, -1 in case of bad input.
+ */
+static inline int hex2bin(u8 *dst, const char *src, size_t count)
+{
+ while (count--) {
+ int hi = hex_to_bin(*src++);
+ int lo = hex_to_bin(*src++);
+
+ if ((hi < 0) || (lo < 0))
+ return -1;
+
+ *dst++ = (hi << 4) | lo;
+ }
+ return 0;
+}
+
+/**
+ * bin2hex - convert binary data to an ascii hexadecimal string
+ * @dst: ascii hexadecimal result
+ * @src: binary data
+ * @count: binary data length
+ */
+static inline char *bin2hex(char *dst, const void *src, size_t count)
+{
+ const unsigned char *_src = src;
+
+ while (count--)
+ dst = hex_byte_pack(dst, *_src++);
+ return dst;
+}
+
+int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, int groupsize,
+ char *linebuf, size_t linebuflen, bool ascii);
+void print_hex_dump(const char *prefix_str, int prefix_type, int rowsize,
+ int groupsize, const void *buf, size_t len, bool ascii);
+void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
+ const void *buf, size_t len);
+
+#endif /* HEXDUMP_H */
diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h
index cff850f850..8fae186d1a 100644
--- a/include/linux/byteorder/generic.h
+++ b/include/linux/byteorder/generic.h
@@ -1,10 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_BYTEORDER_GENERIC_H
#define _LINUX_BYTEORDER_GENERIC_H
/*
- * linux/byteorder_generic.h
+ * linux/byteorder/generic.h
* Generic Byte-reordering support
*
+ * The "... p" macros, like le64_to_cpup, can be used with pointers
+ * to unaligned data, but there will be a performance penalty on
+ * some architectures. Use get_unaligned for unaligned data.
+ *
* Francois-Rene Rideau <fare@tunes.org> 19970707
* gathered all the good ideas from all asm-foo/byteorder.h into one file,
* cleaned them up.
@@ -78,12 +83,6 @@
*
*/
-
-#if defined(__KERNEL__)
-/*
- * inside the kernel, we can use nicknames;
- * outside of it, we must avoid POSIX namespace pollution...
- */
#define cpu_to_le64 __cpu_to_le64
#define le64_to_cpu __le64_to_cpu
#define cpu_to_le32 __cpu_to_le32
@@ -120,18 +119,8 @@
#define be32_to_cpus __be32_to_cpus
#define cpu_to_be16s __cpu_to_be16s
#define be16_to_cpus __be16_to_cpus
-#endif
-
/*
- * Handle ntohl and suches. These have various compatibility
- * issues - like we want to give the prototype even though we
- * also have a macro for them in case some strange program
- * wants to take the address of the thing or something..
- *
- * Note that these used to return a "long" in libc5, even though
- * long is often 64-bit these days.. Thus the casts.
- *
* They have to be macros in order to do the constant folding
* correctly - if the argument passed into a inline function
* it is no longer constant according to gcc..
@@ -142,39 +131,77 @@
#undef htonl
#undef htons
-/*
- * Do the prototypes. Somebody might want to take the
- * address or some such sick thing..
- */
-#if defined(__KERNEL__) || (defined (__GLIBC__) && __GLIBC__ >= 2)
-extern __u32 ntohl(__u32);
-extern __u32 htonl(__u32);
-#else
-extern unsigned long int ntohl(unsigned long int);
-extern unsigned long int htonl(unsigned long int);
-#endif
-extern unsigned short int ntohs(unsigned short int);
-extern unsigned short int htons(unsigned short int);
-
-
-#if defined(__GNUC__) && (__GNUC__ >= 2)
-
#define ___htonl(x) __cpu_to_be32(x)
#define ___htons(x) __cpu_to_be16(x)
#define ___ntohl(x) __be32_to_cpu(x)
#define ___ntohs(x) __be16_to_cpu(x)
-#if defined(__KERNEL__) || (defined (__GLIBC__) && __GLIBC__ >= 2)
#define htonl(x) ___htonl(x)
#define ntohl(x) ___ntohl(x)
-#else
-#define htonl(x) ((unsigned long)___htonl(x))
-#define ntohl(x) ((unsigned long)___ntohl(x))
-#endif
#define htons(x) ___htons(x)
#define ntohs(x) ___ntohs(x)
-#endif /* OPTIMIZE */
+static inline void le16_add_cpu(__le16 *var, u16 val)
+{
+ *var = cpu_to_le16(le16_to_cpu(*var) + val);
+}
+
+static inline void le32_add_cpu(__le32 *var, u32 val)
+{
+ *var = cpu_to_le32(le32_to_cpu(*var) + val);
+}
+
+static inline void le64_add_cpu(__le64 *var, u64 val)
+{
+ *var = cpu_to_le64(le64_to_cpu(*var) + val);
+}
+
+/* XXX: this stuff can be optimized */
+static inline void le32_to_cpu_array(u32 *buf, unsigned int words)
+{
+ while (words--) {
+ __le32_to_cpus(buf);
+ buf++;
+ }
+}
+
+static inline void cpu_to_le32_array(u32 *buf, unsigned int words)
+{
+ while (words--) {
+ __cpu_to_le32s(buf);
+ buf++;
+ }
+}
+
+static inline void be16_add_cpu(__be16 *var, u16 val)
+{
+ *var = cpu_to_be16(be16_to_cpu(*var) + val);
+}
+
+static inline void be32_add_cpu(__be32 *var, u32 val)
+{
+ *var = cpu_to_be32(be32_to_cpu(*var) + val);
+}
+
+static inline void be64_add_cpu(__be64 *var, u64 val)
+{
+ *var = cpu_to_be64(be64_to_cpu(*var) + val);
+}
+
+static inline void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len)
+{
+ int i;
+
+ for (i = 0; i < len; i++)
+ dst[i] = cpu_to_be32(src[i]);
+}
+
+static inline void be32_to_cpu_array(u32 *dst, const __be32 *src, size_t len)
+{
+ int i;
+ for (i = 0; i < len; i++)
+ dst[i] = be32_to_cpu(src[i]);
+}
#endif /* _LINUX_BYTEORDER_GENERIC_H */
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 8711fe2b48..6e3feb64d2 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -193,7 +193,6 @@ typedef unsigned long blkcnt_t;
#define init_waitqueue_head(...) do { } while (0)
#define wait_event_interruptible(...) 0
#define wake_up_interruptible(...) do { } while (0)
-#define print_hex_dump(...) do { } while (0)
#define dump_stack(...) do { } while (0)
#define task_pid_nr(x) 0
diff --git a/include/pe.h b/include/pe.h
index d73eb142cb..36e1908b7e 100644
--- a/include/pe.h
+++ b/include/pe.h
@@ -201,10 +201,13 @@ typedef struct _IMAGE_RELOCATION
#define IMAGE_REL_BASED_MIPS_JMPADDR 5
#define IMAGE_REL_BASED_ARM_MOV32A 5 /* yes, 5 too */
#define IMAGE_REL_BASED_ARM_MOV32 5 /* yes, 5 too */
+#define IMAGE_REL_BASED_RISCV_HI20 5 /* yes, 5 too */
#define IMAGE_REL_BASED_SECTION 6
#define IMAGE_REL_BASED_REL 7
#define IMAGE_REL_BASED_ARM_MOV32T 7 /* yes, 7 too */
#define IMAGE_REL_BASED_THUMB_MOV32 7 /* yes, 7 too */
+#define IMAGE_REL_BASED_RISCV_LOW12I 7 /* yes, 7 too */
+#define IMAGE_REL_BASED_RISCV_LOW12S 8
#define IMAGE_REL_BASED_MIPS_JMPADDR16 9
#define IMAGE_REL_BASED_IA64_IMM64 9 /* yes, 9 too */
#define IMAGE_REL_BASED_DIR64 10
diff --git a/include/phy.h b/include/phy.h
index 52bf99717c..7c3fc5ce40 100644
--- a/include/phy.h
+++ b/include/phy.h
@@ -65,6 +65,7 @@ typedef enum {
PHY_INTERFACE_MODE_XAUI,
PHY_INTERFACE_MODE_RXAUI,
PHY_INTERFACE_MODE_SFI,
+ PHY_INTERFACE_MODE_INTERNAL,
PHY_INTERFACE_MODE_NONE, /* Must be last */
PHY_INTERFACE_MODE_COUNT,
@@ -87,6 +88,7 @@ static const char *phy_interface_strings[] = {
[PHY_INTERFACE_MODE_XAUI] = "xaui",
[PHY_INTERFACE_MODE_RXAUI] = "rxaui",
[PHY_INTERFACE_MODE_SFI] = "sfi",
+ [PHY_INTERFACE_MODE_INTERNAL] = "internal",
[PHY_INTERFACE_MODE_NONE] = "",
};
@@ -314,6 +316,7 @@ static inline bool phy_interface_is_sgmii(struct phy_device *phydev)
/* PHY UIDs for various PHYs that are referenced in external code */
#define PHY_UID_CS4340 0x13e51002
+#define PHY_UID_CS4223 0x03e57003
#define PHY_UID_TN2020 0x00a19410
#endif
diff --git a/include/vsc9953.h b/include/vsc9953.h
index bb7f8ecde5..fe072da516 100644
--- a/include/vsc9953.h
+++ b/include/vsc9953.h
@@ -186,6 +186,76 @@
#define MIIMIND_OPR_PEND 0x00000004
+#define VSC9953_BITMASK(offset) ((BIT(offset)) - 1)
+#define VSC9953_ENC_BITFIELD(target, offset, width) \
+ (((target) & VSC9953_BITMASK(width)) << (offset))
+
+#define VSC9953_IO_ADDR(target, offset) ((target) + (offset << 2))
+
+#define VSC9953_IO_REG(target, offset) (VSC9953_IO_ADDR(target, offset))
+#define VSC9953_VCAP_CACHE_ENTRY_DAT(target, ri) \
+ VSC9953_IO_REG(target, (0x2 + (ri)))
+
+#define VSC9953_VCAP_CACHE_MASK_DAT(target, ri) \
+ VSC9953_IO_REG(target, (0x42 + (ri)))
+
+#define VSC9953_VCAP_CACHE_TG_DAT(target) VSC9953_IO_REG(target, 0xe2)
+#define VSC9953_VCAP_CFG_MV_CFG(target) VSC9953_IO_REG(target, 0x1)
+#define VSC9953_VCAP_CFG_MV_CFG_SIZE(target) \
+ VSC9953_ENC_BITFIELD(target, 0, 16)
+
+#define VSC9953_VCAP_CFG_UPDATE_CTRL(target) VSC9953_IO_REG(target, 0x0)
+#define VSC9953_VCAP_UPDATE_CTRL_UPDATE_CMD(target) \
+ VSC9953_ENC_BITFIELD(target, 22, 3)
+
+#define VSC9953_VCAP_UPDATE_CTRL_UPDATE_ADDR(target) \
+ VSC9953_ENC_BITFIELD(target, 3, 16)
+
+#define VSC9953_VCAP_UPDATE_CTRL_UPDATE_SHOT BIT(2)
+#define VSC9953_VCAP_UPDATE_CTRL_UPDATE_ENTRY_DIS BIT(21)
+#define VSC9953_VCAP_UPDATE_CTRL_UPDATE_ACTION_DIS BIT(20)
+#define VSC9953_VCAP_UPDATE_CTRL_UPDATE_CNT_DIS BIT(19)
+#define VSC9953_VCAP_CACHE_ACTION_DAT(target, ri) \
+ VSC9953_IO_REG(target, (0x82 + (ri)))
+
+#define VSC9953_VCAP_CACHE_CNT_DAT(target, ri) \
+ VSC9953_IO_REG(target, (0xc2 + (ri)))
+
+#define VSC9953_PORT_OFFSET 1
+#define VSC9953_IS1_CNT 256
+#define VSC9953_IS2_CNT 1024
+#define VSC9953_ES0_CNT 1024
+
+#define BITS_TO_DWORD(in) (1 + (((in) - 1) / 32))
+#define ENTRY_WORDS_ES0 BITS_TO_DWORD(29)
+#define ENTRY_WORDS_IS1 BITS_TO_DWORD(376)
+#define ENTRY_WORDS_IS2 BITS_TO_DWORD(376)
+#define ES0_ACT_WIDTH BITS_TO_DWORD(91)
+#define ES0_CNT_WIDTH BITS_TO_DWORD(1)
+#define IS1_ACT_WIDTH BITS_TO_DWORD(320)
+#define IS1_CNT_WIDTH BITS_TO_DWORD(4)
+#define IS2_ACT_WIDTH BITS_TO_DWORD(103 - 2 * VSC9953_PORT_OFFSET)
+#define IS2_CNT_WIDTH BITS_TO_DWORD(4 * 32)
+#define ES0_ACT_COUNT (VSC9953_ES0_CNT + VSC9953_MAX_PORTS)
+#define IS1_ACT_COUNT (VSC9953_IS1_CNT + 1)
+#define IS2_ACT_COUNT (VSC9953_IS2_CNT + VSC9953_MAX_PORTS + 2)
+
+/* TCAM entries */
+enum tcam_sel {
+ TCAM_SEL_ENTRY = BIT(0),
+ TCAM_SEL_ACTION = BIT(1),
+ TCAM_SEL_COUNTER = BIT(2),
+ TCAM_SEL_ALL = VSC9953_BITMASK(3),
+};
+
+enum tcam_cmd {
+ TCAM_CMD_WRITE = 0,
+ TCAM_CMD_READ = 1,
+ TCAM_CMD_MOVE_UP = 2,
+ TCAM_CMD_MOVE_DOWN = 3,
+ TCAM_CMD_INITIALIZE = 4,
+};
+
struct vsc9953_mdio_info {
struct vsc9953_mii_mng *regs;
char *name;