Skip to content

Commit

Permalink
Upgrade new DellEMC platforms to bullseye kernel (#10)
Browse files Browse the repository at this point in the history
* Upgrade new DellEMC platforms to Bullseye

* Update s5212f kernel module
  • Loading branch information
aravindmani-1 authored and saiarcot895 committed Nov 10, 2021
1 parent 8080a92 commit 166efef
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 46 deletions.
6 changes: 3 additions & 3 deletions platform/broadcom/sonic-platform-modules-dell/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ Description: kernel modules for platform devices such as fan, led, sfp

Package: platform-modules-s5212f
Architecture: amd64
Depends: linux-image-4.19.0-12-2-amd64-unsigned
Depends: linux-image-5.10.0-8-2-amd64-unsigned
Description: kernel modules for platform devices such as fan, led, sfp

Package: platform-modules-s5224f
Architecture: amd64
Depends: linux-image-4.19.0-12-2-amd64-unsigned
Depends: linux-image-5.10.0-8-2-amd64-unsigned
Description: kernel modules for platform devices such as fan, led, sfp

Package: platform-modules-s5232f
Expand All @@ -47,7 +47,7 @@ Description: kernel modules for platform devices such as fan, led, sfp

Package: platform-modules-n3248te
Architecture: amd64
Depends: linux-image-4.19.0-12-2-amd64-unsigned
Depends: linux-image-5.10.0-8-2-amd64-unsigned
Description: kernel modules for platform devices such as fan, led, sfp

Package: platform-modules-z9332f
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ install_python_api_package() {
}

remove_python_api_package() {
rv=$(pip show sonic-platform > /dev/null 2>/dev/null)

rv=$(pip3 show sonic-platform > /dev/null 2>/dev/null)
if [ $? -eq 0 ]; then
rv=$(pip3 uninstall -y sonic-platform > /dev/null 2>/dev/null)
Expand All @@ -112,7 +110,7 @@ get_reboot_cause() {

if [[ "$1" == "init" ]]; then
modprobe i2c-dev
modprobe i2c-mux-pca954x force_deselect_on_exit=1
modprobe i2c-mux-pca954x
modprobe pmbus
modprobe emc2305
modprobe dps200
Expand All @@ -124,12 +122,12 @@ if [[ "$1" == "init" ]]; then
echo 0xf0 > /sys/devices/platform/dell-n3248pxe-cpld.0/sfp_txdis
install_python_api_package
platform_firmware_versions
echo -2 > /sys/class/i2c-adapter/i2c-0/0-0071/idle_state
elif [[ "$1" == "deinit" ]]; then
switch_board_sfp "delete_device"
sysdevices "delete_device"

modprobe -r dell_n3248pxe_platform

modprobe -r dps200
modprobe -r emc2305
modprobe -r pmbus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ get_reboot_cause() {

if [[ "$1" == "init" ]]; then
modprobe i2c-dev
modprobe i2c-mux-pca954x force_deselect_on_exit=1
modprobe i2c-mux-pca954x
modprobe pmbus
modprobe emc2305
modprobe dps200
Expand All @@ -126,12 +126,12 @@ if [[ "$1" == "init" ]]; then
echo 0xf0 > /sys/devices/platform/dell-n3248te-cpld.0/sfp_txdis
install_python_api_package
platform_firmware_versions
echo -2 > /sys/class/i2c-adapter/i2c-0/0-0071/idle_state
elif [[ "$1" == "deinit" ]]; then
switch_board_sfp "delete_device"
sysdevices "delete_device"

modprobe -r dell_n3248te_platform

modprobe -r dps200
modprobe -r emc2305
modprobe -r pmbus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ static int map_bars(struct fpgapci_dev *fpgapci, struct pci_dev *dev)

/* map the device memory or IO region into kernel virtual
* address space */
fpgapci->bar[i] = ioremap_nocache (bar_start + FPGALOGIC_I2C_BASE, I2C_PCI_MAX_BUS * FPGALOGIC_CH_OFFSET);
fpgapci->bar[i] = ioremap(bar_start + FPGALOGIC_I2C_BASE, I2C_PCI_MAX_BUS * FPGALOGIC_CH_OFFSET);

if (!fpgapci->bar[i]) {
PRINT ( "Could not map BAR #%d.\n", i);
Expand All @@ -1061,7 +1061,7 @@ static int map_bars(struct fpgapci_dev *fpgapci, struct pci_dev *dev)
{

fpga_phys_addr = bar_start;
fpga_ctl_addr = ioremap_nocache (bar_start, FPGA_CTL_REG_SIZE);
fpga_ctl_addr = ioremap(bar_start, FPGA_CTL_REG_SIZE);
fpga_base_addr = fpgapci->bar[i];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ init_devnum

if [ "$1" == "init" ]; then
modprobe i2c-dev
modprobe i2c-mux-pca954x force_deselect_on_exit=1
modprobe i2c-mux-pca954x
modprobe ipmi_devintf
modprobe ipmi_si kipmid_max_busy_us=1000
modprobe i2c_ocores
Expand All @@ -189,18 +189,22 @@ if [ "$1" == "init" ]; then
switch_board_led_default
install_python_api_package
platform_firmware_versions

echo -2 > /sys/bus/i2c/drivers/pca954x/603-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/604-0074/idle_state
elif [ "$1" == "deinit" ]; then
sys_eeprom "delete_device"
switch_board_qsfp "delete_device"
switch_board_sfp "delete_device"
switch_board_qsfp_mux "delete_device"

modprobe -r dell_s5212f_fpga_ocores
modprobe -r i2c_ocores
modprobe -r acpi_ipmi
modprobe -r ipmi_si
modprobe -r ipmi_devintf
modprobe -r i2c-mux-pca954x
modprobe -r i2c-dev
remove_python_api_package
modprobe -r ipmi_devintf
modprobe -r ipmi_si
else
echo "s5212f_platform : Invalid option !"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ init_devnum

if [ "$1" == "init" ]; then
modprobe i2c-dev
modprobe i2c-mux-pca954x force_deselect_on_exit=1
modprobe i2c-mux-pca954x
modprobe ipmi_devintf
modprobe ipmi_si kipmid_max_busy_us=1000
modprobe i2c_ocores
Expand All @@ -186,17 +186,22 @@ if [ "$1" == "init" ]; then
install_python_api_package
#python /usr/bin/qsfp_irq_enable.py
platform_firmware_versions

echo -2 > /sys/bus/i2c/drivers/pca954x/603-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/604-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/605-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/606-0074/idle_state
elif [ "$1" == "deinit" ]; then
sys_eeprom "delete_device"
switch_board_qsfp "delete_device"
switch_board_qsfp_mux "delete_device"

modprobe -r i2c-mux-pca954x
modprobe -r i2c-dev
modprobe -r dell_s5224f_fpga_ocores
modprobe -r i2c_ocores
modprobe -r acpi_ipmi
modprobe -r ipmi_devintf
modprobe -r ipmi_si
modprobe -r ipmi_devintf
modprobe -r i2c-mux-pca954x
modprobe -r i2c-dev
remove_python_api_package
else
echo "s5224f_platform : Invalid option !"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,14 @@ elif [ "$1" == "deinit" ]; then
switch_board_qsfp "delete_device"
switch_board_sfp "delete_device"
switch_board_qsfp_mux "delete_device"
modprobe -r i2c-mux-pca954x
modprobe -r i2c-dev

modprobe -r dell_s5232f_fpga_ocores
modprobe -r i2c_ocores
modprobe -r acpi_ipmi
modprobe -r ipmi_devintf
modprobe -r ipmi_si
modprobe -r i2c_ocores
modprobe -r dell_s5232f_fpga_ocores
modprobe -r ipmi_devintf
modprobe -r i2c-mux-pca954x
modprobe -r i2c-dev
remove_python_api_package
else
echo "s5232f_platform : Invalid option !"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,14 @@ elif [ "$1" == "deinit" ]; then
sys_eeprom "delete_device"
switch_board_qsfp "delete_device"
switch_board_qsfp_mux "delete_device"
modprobe -r i2c-mux-pca954x
modprobe -r i2c-dev

modprobe -r dell_s5248f_fpga_ocores
modprobe -r i2c_ocores
modprobe -r acpi_ipmi
modprobe -r ipmi_devintf
modprobe -r ipmi_si
modprobe -r i2c_ocores
modprobe -r dell_s5248f_fpga_ocores
modprobe -r ipmi_devintf
modprobe -r i2c-mux-pca954x
modprobe -r i2c-dev
remove_python_api_package
else
echo "s5248f_platform : Invalid option !"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,14 @@ elif [ "$1" == "deinit" ]; then
sys_eeprom "delete_device"
switch_board_qsfp "delete_device"
switch_board_qsfp_mux "delete_device"
modprobe -r i2c-mux-pca954x
modprobe -r i2c-dev

modprobe -r dell_s5296f_fpga_ocores
modprobe -r i2c_ocores
modprobe -r acpi_ipmi
modprobe -r ipmi_devintf
modprobe -r ipmi_si
modprobe -r i2c_ocores
modprobe -r dell_s5296f_fpga_ocores
modprobe -r ipmi_devintf
modprobe -r i2c-mux-pca954x
modprobe -r i2c-dev
remove_python_api_package
else
echo "s5296f_platform : Invalid option !"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,14 @@ elif [ "$1" == "deinit" ]; then
switch_board_qsfp "delete_device"
switch_board_qsfp_mux "delete_device"
switch_board_sfp "delete_device"
modprobe -r i2c-mux-pca954x
modprobe -r i2c-dev

modprobe -r dell_z9264f_fpga_ocores
modprobe -r i2c_ocores
modprobe -r acpi_ipmi
modprobe -r ipmi_devintf
modprobe -r ipmi_si
modprobe -r i2c_ocores
modprobe -r dell_z9264f_fpga_ocores
modprobe -r ipmi_devintf
modprobe -r i2c-mux-pca954x
modprobe -r i2c-dev
remove_python_api_package
else
echo "z9264f_platform : Invalid option !"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,15 @@ elif [ "$1" == "deinit" ]; then
sys_eeprom "delete_device"
switch_board_qsfp "delete_device"
switch_board_sfp "delete_device"
modprobe -r cls-i2c-mux-pca954x
modprobe -r i2c-dev
modprobe -r ipmi_devintf

modprobe -r mc24lc64t
modprobe -r cls-switchboard
modprobe -r cls-i2c-ocore
modprobe -r acpi_ipmi
modprobe -r ipmi_si
modprobe -r cls-i2c-ocore
modprobe -r cls-switchboard
modprobe -r mc24lc64t
modprobe -r ipmi_devintf
modprobe -r cls-i2c-mux-pca954x
modprobe -r i2c-dev
remove_python_api_package
else
echo "z9332f_platform : Invalid option !"
Expand Down

0 comments on commit 166efef

Please sign in to comment.