Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sonic-platform-modules-cel dx010: speed up dx010 platform init script #10313

Merged
merged 1 commit into from
Apr 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ start)
[ $found -eq 0 ] && echo "cannot find iSMT" && exit 1

i2cset -y ${devnum} 0x70 0x10 0x00 0x01 i
sleep 1
sleep 0.1

# Attach PCA9548 0x71 Channel Extender for Main Board
echo pca9548 0x71 > /sys/bus/i2c/devices/i2c-${devnum}/new_device
sleep 1
sleep 0.1

# Attach PCA9548 0x73 Channel Extender for CPU Board
echo pca9548 0x73 > /sys/bus/i2c/devices/i2c-${devnum}/new_device
sleep 1
sleep 0.1

# Attach PCA9548 0x77 Channel Extender for Fan's EEPROMs
echo pca9548 0x77 > /sys/bus/i2c/devices/i2c-${devnum}/new_device
sleep 1
sleep 0.1

# Attach syseeprom
echo 24lc64t 0x50 > /sys/bus/i2c/devices/i2c-12/new_device
Expand Down Expand Up @@ -106,7 +106,7 @@ start)
echo pca9505 0x20 > /sys/bus/i2c/devices/i2c-17/new_device

modprobe dx010_cpld
sleep 2
sleep 1

# Export platform gpio sysfs
export_gpio 10 "in" # Fan 1 present
Expand Down Expand Up @@ -148,15 +148,14 @@ start)
done

bus_en=8
sleep 1
cfg_r=`i2cget -y -f 8 0x60 0xD1`
((cfg_w=$cfg_r+$bus_en))
i2cset -y -f 8 0x60 0xD1 $cfg_w
sleep 1
sleep 0.1
cfg_r=`i2cget -y -f 9 0x20 0xD1`
((cfg_w=$cfg_r+$bus_en))
i2cset -y -f 9 0x20 0xD1 $cfg_w
sleep 1
sleep 0.1

/bin/sh /usr/local/bin/platform_api_mgnt.sh init

Expand Down