Skip to content

Commit

Permalink
sonix: Upgrade vedge patches to 6.6
Browse files Browse the repository at this point in the history
  • Loading branch information
bluecmd committed Aug 17, 2024
1 parent 284cffb commit d9d1ca9
Show file tree
Hide file tree
Showing 16 changed files with 84 additions and 166 deletions.
3 changes: 1 addition & 2 deletions target/linux/octeon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ BOARDNAME:=Cavium Networks Octeon
FEATURES:=squashfs ramdisk pci usb
CPU_TYPE:=octeonplus

KERNEL_PATCHVER:=6.1
KERNEL_TESTING_PATCHVER:=6.6
KERNEL_PATCHVER:=6.6

define Target/Description
Build firmware images for Cavium Networks Octeon-based boards.
Expand Down
5 changes: 5 additions & 0 deletions target/linux/octeon/config-6.6
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,17 @@ CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_IRQ_WORK=y
CONFIG_JBD2=y
CONFIG_LEDS_SYSCON=y
CONFIG_LEGACY_DIRECT_IO=y
CONFIG_LIBFDT=y
CONFIG_LOCK_DEBUGGING_SUPPORT=y
CONFIG_MDIO_BUS=y
CONFIG_MDIO_CAVIUM=y
CONFIG_MDIO_DEVICE=y
CONFIG_MDIO_DEVRES=y
CONFIG_MDIO_I2C=y
CONFIG_MDIO_OCTEON=y
CONFIG_MFD_SYSCON=y
CONFIG_MIGRATION=y
CONFIG_MIPS=y
CONFIG_MIPS_ASID_BITS=8
Expand Down Expand Up @@ -221,6 +224,7 @@ CONFIG_RANDSTRUCT_NONE=y
CONFIG_RAS=y
CONFIG_REGMAP=y
CONFIG_REGMAP_I2C=y
CONFIG_REGMAP_MMIO=y
CONFIG_RELAY=y
CONFIG_RFS_ACCEL=y
CONFIG_RPS=y
Expand All @@ -231,6 +235,7 @@ CONFIG_SCSI_COMMON=y
CONFIG_SERIAL_8250_DW=y
CONFIG_SERIAL_8250_DWLIB=y
CONFIG_SERIAL_MCTRL_GPIO=y
CONFIG_SFP=y
CONFIG_SG_POOL=y
CONFIG_SMP=y
CONFIG_SOCK_RX_QUEUE_MAPPING=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ Subject: [PATCH] sonix: Enable REGMAP_ALLOW_WRITE_DEBUGFS
drivers/base/regmap/regmap-debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
index 817eda2075aa..e90007f1aeeb 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -290,7 +290,7 @@ static ssize_t regmap_map_read_file(struct file *file, char __user *user_buf,
@@ -290,7 +290,7 @@ static ssize_t regmap_map_read_file(stru
count, ppos);
}

Expand All @@ -20,6 +18,3 @@ index 817eda2075aa..e90007f1aeeb 100644
#ifdef REGMAP_ALLOW_WRITE_DEBUGFS
/*
* This can be dangerous especially when we have clients such as
--
2.44.1

Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,16 @@ Allows setting 1000base-x instead of SGMII using device-tree attributes.
create mode 100644 arch/mips/cavium-octeon/executive/cvmx-helper-cfg.c
create mode 100644 arch/mips/include/asm/octeon/cvmx-helper-cfg.h

diff --git a/arch/mips/cavium-octeon/executive/Makefile b/arch/mips/cavium-octeon/executive/Makefile
index 50b427879465..2bff7ee3af30 100644
--- a/arch/mips/cavium-octeon/executive/Makefile
+++ b/arch/mips/cavium-octeon/executive/Makefile
@@ -14,6 +14,6 @@ obj-y += cvmx-pko.o cvmx-spi.o cvmx-cmd-queue.o \
@@ -14,6 +14,6 @@ obj-y += cvmx-pko.o cvmx-spi.o cvmx-cmd-
cvmx-helper-board.o cvmx-helper.o cvmx-helper-xaui.o \
cvmx-helper-rgmii.o cvmx-helper-sgmii.o cvmx-helper-npi.o \
cvmx-helper-loop.o cvmx-helper-spi.o cvmx-helper-util.o \
- cvmx-interrupt-decodes.o cvmx-interrupt-rsl.o
+ cvmx-interrupt-decodes.o cvmx-interrupt-rsl.o cvmx-helper-cfg.o

obj-y += cvmx-helper-errata.o cvmx-helper-jtag.o cvmx-boot-vector.o
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-cfg.c b/arch/mips/cavium-octeon/executive/cvmx-helper-cfg.c
new file mode 100644
index 000000000000..0cb4193160f9
--- /dev/null
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-cfg.c
@@ -0,0 +1,1183 @@
Expand Down Expand Up @@ -1220,8 +1215,6 @@ index 000000000000..0cb4193160f9
+ cvmx_cfg_port[xi.node][xi.interface][index].phy_info = phy_info;
+}
+
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c b/arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c
index e07d8f15efba..c186b7558cd9 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c
@@ -40,6 +40,8 @@
Expand All @@ -1233,7 +1226,7 @@ index e07d8f15efba..c186b7558cd9 100644

/**
* Perform initialization required only once for an SGMII port.
@@ -68,6 +70,17 @@ static int __cvmx_helper_sgmii_hardware_init_one_time(int interface, int index)
@@ -68,6 +70,17 @@ static int __cvmx_helper_sgmii_hardware_
*/
pcs_misc_ctl_reg.u64 =
cvmx_read_csr(CVMX_PCSX_MISCX_CTL_REG(index, interface));
Expand All @@ -1251,15 +1244,15 @@ index e07d8f15efba..c186b7558cd9 100644
pcsx_linkx_timer_count_reg.u64 =
cvmx_read_csr(CVMX_PCSX_LINKX_TIMER_COUNT_REG(index, interface));
if (pcs_misc_ctl_reg.s.mode) {
@@ -94,6 +107,7 @@ static int __cvmx_helper_sgmii_hardware_init_one_time(int interface, int index)
@@ -94,6 +107,7 @@ static int __cvmx_helper_sgmii_hardware_
if (pcs_misc_ctl_reg.s.mode) {
/* 1000BASE-X */
union cvmx_pcsx_anx_adv_reg pcsx_anx_adv_reg;
+ pr_err("__cvmx_helper_sgmii_hardware_init_one_time, interface %d/%d, protocol 1000BASE-X\n", interface, index);
pcsx_anx_adv_reg.u64 =
cvmx_read_csr(CVMX_PCSX_ANX_ADV_REG(index, interface));
pcsx_anx_adv_reg.s.rem_flt = 0;
@@ -103,12 +117,10 @@ static int __cvmx_helper_sgmii_hardware_init_one_time(int interface, int index)
@@ -103,12 +117,10 @@ static int __cvmx_helper_sgmii_hardware_
cvmx_write_csr(CVMX_PCSX_ANX_ADV_REG(index, interface),
pcsx_anx_adv_reg.u64);
} else {
Expand All @@ -1274,15 +1267,15 @@ index e07d8f15efba..c186b7558cd9 100644
pcsx_sgmx_an_adv_reg.u64 =
cvmx_read_csr(CVMX_PCSX_SGMX_AN_ADV_REG
(index, interface));
@@ -120,6 +132,7 @@ static int __cvmx_helper_sgmii_hardware_init_one_time(int interface, int index)
@@ -120,6 +132,7 @@ static int __cvmx_helper_sgmii_hardware_
pcsx_sgmx_an_adv_reg.u64);
} else {
/* MAC Mode - Nothing to do */
+ pr_err("__cvmx_helper_sgmii_hardware_init_one_time, interface %d/%d, protocol SGMII, MAC mode\n", interface, index);
}
}
return 0;
@@ -424,71 +437,17 @@ union cvmx_helper_link_info __cvmx_helper_sgmii_link_get(int ipd_port)
@@ -424,71 +437,17 @@ union cvmx_helper_link_info __cvmx_helpe

pcs_misc_ctl_reg.u64 =
cvmx_read_csr(CVMX_PCSX_MISCX_CTL_REG(index, interface));
Expand Down Expand Up @@ -1364,9 +1357,6 @@ index e07d8f15efba..c186b7558cd9 100644
}
return result;
}
diff --git a/arch/mips/include/asm/octeon/cvmx-helper-cfg.h b/arch/mips/include/asm/octeon/cvmx-helper-cfg.h
new file mode 100644
index 000000000000..02c0968aa59c
--- /dev/null
+++ b/arch/mips/include/asm/octeon/cvmx-helper-cfg.h
@@ -0,0 +1,793 @@
Expand Down Expand Up @@ -2163,11 +2153,9 @@ index 000000000000..02c0968aa59c
+/* *INDENT-ON* */
+#endif
+#endif /* __CVMX_HELPER_CFG_H__ */
diff --git a/arch/mips/include/asm/octeon/cvmx-helper-util.h b/arch/mips/include/asm/octeon/cvmx-helper-util.h
index 97b27a07cfb0..f08d0e75c85e 100644
--- a/arch/mips/include/asm/octeon/cvmx-helper-util.h
+++ b/arch/mips/include/asm/octeon/cvmx-helper-util.h
@@ -189,4 +189,37 @@ extern int cvmx_helper_get_interface_num(int ipd_port);
@@ -189,4 +189,37 @@ extern int cvmx_helper_get_interface_num
*/
extern int cvmx_helper_get_interface_index_num(int ipd_port);

Expand Down Expand Up @@ -2205,8 +2193,6 @@ index 97b27a07cfb0..f08d0e75c85e 100644
+}
+
#endif /* __CVMX_HELPER_H__ */
diff --git a/drivers/staging/octeon/Makefile b/drivers/staging/octeon/Makefile
index 3887cf5f1e84..2e81ed33009d 100644
--- a/drivers/staging/octeon/Makefile
+++ b/drivers/staging/octeon/Makefile
@@ -9,6 +9,8 @@
Expand All @@ -2218,11 +2204,9 @@ index 3887cf5f1e84..2e81ed33009d 100644
octeon-ethernet-y := ethernet.o
octeon-ethernet-y += ethernet-mdio.o
octeon-ethernet-y += ethernet-mem.o
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index 12bcc5632e61..c7452e013aca 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -487,7 +487,13 @@ int cvm_oct_common_open(struct net_device *dev,
@@ -487,7 +487,13 @@ int cvm_oct_common_open(struct net_devic
netif_carrier_off(dev);
cvm_oct_adjust_link(dev);
} else {
Expand All @@ -2236,7 +2220,7 @@ index 12bcc5632e61..c7452e013aca 100644
if (!link_info.s.link_up)
netif_carrier_off(dev);
priv->poll = link_poll;
@@ -502,7 +508,13 @@ void cvm_oct_link_poll(struct net_device *dev)
@@ -502,7 +508,13 @@ void cvm_oct_link_poll(struct net_device
struct octeon_ethernet *priv = netdev_priv(dev);
union cvmx_helper_link_info link_info;

Expand All @@ -2250,7 +2234,7 @@ index 12bcc5632e61..c7452e013aca 100644
if (link_info.u64 == priv->link_info)
return;

@@ -677,6 +689,67 @@ static void cvm_set_rgmii_delay(struct octeon_ethernet *priv, int iface,
@@ -677,6 +689,67 @@ static void cvm_set_rgmii_delay(struct o
priv->phy_mode = PHY_INTERFACE_MODE_RGMII;
}

Expand Down Expand Up @@ -2318,7 +2302,7 @@ index 12bcc5632e61..c7452e013aca 100644
static int cvm_oct_probe(struct platform_device *pdev)
{
int num_interfaces;
@@ -701,6 +774,8 @@ static int cvm_oct_probe(struct platform_device *pdev)
@@ -701,6 +774,8 @@ static int cvm_oct_probe(struct platform

cvmx_helper_initialize_packet_io_global();

Expand All @@ -2327,8 +2311,6 @@ index 12bcc5632e61..c7452e013aca 100644
if (receive_group_order) {
if (receive_group_order > 4)
receive_group_order = 4;
diff --git a/drivers/staging/octeon/octeon-ethernet.h b/drivers/staging/octeon/octeon-ethernet.h
index a6140705706f..d7dc1d37b117 100644
--- a/drivers/staging/octeon/octeon-ethernet.h
+++ b/drivers/staging/octeon/octeon-ethernet.h
@@ -23,6 +23,7 @@
Expand All @@ -2339,6 +2321,3 @@ index a6140705706f..d7dc1d37b117 100644
#include <asm/octeon/cvmx-helper-util.h>
#include <asm/octeon/cvmx-ipd.h>
#include <asm/octeon/cvmx-ipd-defs.h>
--
2.39.3

Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,22 @@ Functionally sort of complete patch. Enough for production for now.
create mode 100644 drivers/staging/n821-cpld/cpld_psu.c
create mode 100644 drivers/staging/n821-cpld/mdio-i2c-gen.c

diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index e03627ad4460..ea84ef8c9e2d 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -80,4 +80,6 @@ source "drivers/staging/qlge/Kconfig"
@@ -78,4 +78,6 @@ source "drivers/staging/qlge/Kconfig"

source "drivers/vme_user/Kconfig"
source "drivers/staging/vme_user/Kconfig"

+source "drivers/staging/n821-cpld/Kconfig"
+
endif # STAGING
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index c7f8d8d8dd11..efeda9bf2243 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -30,2 +30,3 @@ obj-$(CONFIG_XIL_AXIS_FIFO) += axis-fifo/
@@ -28,3 +28,4 @@ obj-$(CONFIG_PI433) += pi433/
obj-$(CONFIG_XIL_AXIS_FIFO) += axis-fifo/
obj-$(CONFIG_FIELDBUS_DEV) += fieldbus/
obj-$(CONFIG_QLGE) += qlge/
+obj-$(CONFIG_N821_CPLD) += n821-cpld/
diff --git a/drivers/staging/n821-cpld/Kconfig b/drivers/staging/n821-cpld/Kconfig
new file mode 100644
index 000000000000..1db74863f66d
--- /dev/null
+++ b/drivers/staging/n821-cpld/Kconfig
@@ -0,0 +1,58 @@
Expand Down Expand Up @@ -110,9 +104,6 @@ index 000000000000..1db74863f66d
+
+ To compile this driver as a module, choose M here. The module
+ will be called n821-cpld-psu.
diff --git a/drivers/staging/n821-cpld/Makefile b/drivers/staging/n821-cpld/Makefile
new file mode 100644
index 000000000000..a41ce015901f
--- /dev/null
+++ b/drivers/staging/n821-cpld/Makefile
@@ -0,0 +1,16 @@
Expand All @@ -132,9 +123,6 @@ index 000000000000..a41ce015901f
+n821-cpld-fan-objs := cpld_fan.o
+n821-cpld-psu-objs := cpld_psu.o
+n821-cpld-gpio-objs := cpld_gpio.o
diff --git a/drivers/staging/n821-cpld/cpld.h b/drivers/staging/n821-cpld/cpld.h
new file mode 100644
index 000000000000..3053994cdc2f
--- /dev/null
+++ b/drivers/staging/n821-cpld/cpld.h
@@ -0,0 +1,28 @@
Expand Down Expand Up @@ -166,9 +154,6 @@ index 000000000000..3053994cdc2f
+};
+
+#endif
diff --git a/drivers/staging/n821-cpld/cpld_core.c b/drivers/staging/n821-cpld/cpld_core.c
new file mode 100644
index 000000000000..81c6372244e9
--- /dev/null
+++ b/drivers/staging/n821-cpld/cpld_core.c
@@ -0,0 +1,154 @@
Expand Down Expand Up @@ -326,9 +311,6 @@ index 000000000000..81c6372244e9
+MODULE_DESCRIPTION("Niagara 821 CPLD driver");
+MODULE_AUTHOR("Christian Svensson <[email protected]>");
+MODULE_LICENSE("GPL");
diff --git a/drivers/staging/n821-cpld/cpld_fan.c b/drivers/staging/n821-cpld/cpld_fan.c
new file mode 100644
index 000000000000..44e99580ccd7
--- /dev/null
+++ b/drivers/staging/n821-cpld/cpld_fan.c
@@ -0,0 +1,116 @@
Expand Down Expand Up @@ -448,9 +430,6 @@ index 000000000000..44e99580ccd7
+MODULE_DESCRIPTION("Niagara 821 CPLD fan driver");
+MODULE_AUTHOR("Christian Svensson <[email protected]>");
+MODULE_LICENSE("GPL");
diff --git a/drivers/staging/n821-cpld/cpld_gpio.c b/drivers/staging/n821-cpld/cpld_gpio.c
new file mode 100644
index 000000000000..c63f6233ba6a
--- /dev/null
+++ b/drivers/staging/n821-cpld/cpld_gpio.c
@@ -0,0 +1,167 @@
Expand Down Expand Up @@ -621,9 +600,6 @@ index 000000000000..c63f6233ba6a
+MODULE_DESCRIPTION("Niagara 821 CPLD GPIO driver");
+MODULE_AUTHOR("Christian Svensson <[email protected]>");
+MODULE_LICENSE("GPL");
diff --git a/drivers/staging/n821-cpld/cpld_i2c.c b/drivers/staging/n821-cpld/cpld_i2c.c
new file mode 100644
index 000000000000..bbd32eefbba4
--- /dev/null
+++ b/drivers/staging/n821-cpld/cpld_i2c.c
@@ -0,0 +1,266 @@
Expand Down Expand Up @@ -893,9 +869,6 @@ index 000000000000..bbd32eefbba4
+MODULE_DESCRIPTION("Niagara 821 CPLD I2C driver");
+MODULE_AUTHOR("Christian Svensson <[email protected]>");
+MODULE_LICENSE("GPL");
diff --git a/drivers/staging/n821-cpld/cpld_psu.c b/drivers/staging/n821-cpld/cpld_psu.c
new file mode 100644
index 000000000000..1e7f896f217b
--- /dev/null
+++ b/drivers/staging/n821-cpld/cpld_psu.c
@@ -0,0 +1,135 @@
Expand Down Expand Up @@ -1034,9 +1007,6 @@ index 000000000000..1e7f896f217b
+MODULE_DESCRIPTION("Niagara 821 CPLD psu driver");
+MODULE_AUTHOR("Christian Svensson <[email protected]>");
+MODULE_LICENSE("GPL");
diff --git a/drivers/staging/n821-cpld/mdio-i2c-gen.c b/drivers/staging/n821-cpld/mdio-i2c-gen.c
new file mode 100644
index 000000000000..64005914ffd2
--- /dev/null
+++ b/drivers/staging/n821-cpld/mdio-i2c-gen.c
@@ -0,0 +1,92 @@
Expand Down Expand Up @@ -1132,6 +1102,3 @@ index 000000000000..64005914ffd2
+MODULE_AUTHOR("Brian Silverman <[email protected]>");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Generic driver for MDIO bus over I2C");
--
2.39.3

Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ when voltage changes.
drivers/staging/n821-cpld/cpld_psu.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/n821-cpld/cpld.h b/drivers/staging/n821-cpld/cpld.h
index 3053994cdc2f..cfe1bac92946 100644
--- a/drivers/staging/n821-cpld/cpld.h
+++ b/drivers/staging/n821-cpld/cpld.h
@@ -16,6 +16,7 @@
Expand All @@ -22,11 +20,9 @@ index 3053994cdc2f..cfe1bac92946 100644

#define N821_CPLD_I2C_REG_CTRL 0x2

diff --git a/drivers/staging/n821-cpld/cpld_psu.c b/drivers/staging/n821-cpld/cpld_psu.c
index 1e7f896f217b..b7e060688ced 100644
--- a/drivers/staging/n821-cpld/cpld_psu.c
+++ b/drivers/staging/n821-cpld/cpld_psu.c
@@ -100,7 +100,7 @@ static int n821_cpld_psu_probe(struct platform_device *pdev)
@@ -100,7 +100,7 @@ static int n821_cpld_psu_probe(struct pl
return PTR_ERR(psu->regmap);
}

Expand All @@ -35,6 +31,3 @@ index 1e7f896f217b..b7e060688ced 100644
hwmon_dev = devm_hwmon_device_register_with_info(&pdev->dev,
"n821_psu", psu, &n821_cpld_psu_chip_info, NULL);
if (IS_ERR(hwmon_dev))
--
2.39.3

Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ Subject: [PATCH] sonix: wait for regmap to be available for n821 cpld
drivers/staging/n821-cpld/cpld_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/n821-cpld/cpld_core.c b/drivers/staging/n821-cpld/cpld_core.c
index 81c6372244e9..2cf4c7fe8459 100644
--- a/drivers/staging/n821-cpld/cpld_core.c
+++ b/drivers/staging/n821-cpld/cpld_core.c
@@ -88,8 +88,8 @@ static int n821_cpld_probe(struct platform_device *pdev)
@@ -88,8 +88,8 @@ static int n821_cpld_probe(struct platfo

regmap = syscon_node_to_regmap(dev->of_node);
if (IS_ERR(regmap)) {
Expand All @@ -22,6 +20,3 @@ index 81c6372244e9..2cf4c7fe8459 100644
}

irq = irq_of_parse_and_map(dev->of_node, 0);
--
2.39.3

Loading

0 comments on commit d9d1ca9

Please sign in to comment.