Skip to content

Commit 869ac1d

Browse files
authored
sonic-platform-modules-cel dx010: speed up dx010 platform init script (sonic-net#10313)
* Optimize dx010 sonic platform init script to speed up init process * Merge issue sonic-net#10152: [warm-upgrade][202012] Slow Celestica platform init in rc.local causes lacp-teardown fix into master branch Signed-off-by: Eric Zhu <[email protected]>
1 parent 988a687 commit 869ac1d

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-dx010.init

+7-8
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,19 @@ start)
6161
[ $found -eq 0 ] && echo "cannot find iSMT" && exit 1
6262

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

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

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

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

7878
# Attach syseeprom
7979
echo 24lc64t 0x50 > /sys/bus/i2c/devices/i2c-12/new_device
@@ -106,7 +106,7 @@ start)
106106
echo pca9505 0x20 > /sys/bus/i2c/devices/i2c-17/new_device
107107

108108
modprobe dx010_cpld
109-
sleep 2
109+
sleep 1
110110

111111
# Export platform gpio sysfs
112112
export_gpio 10 "in" # Fan 1 present
@@ -148,15 +148,14 @@ start)
148148
done
149149

150150
bus_en=8
151-
sleep 1
152151
cfg_r=`i2cget -y -f 8 0x60 0xD1`
153152
((cfg_w=$cfg_r+$bus_en))
154153
i2cset -y -f 8 0x60 0xD1 $cfg_w
155-
sleep 1
154+
sleep 0.1
156155
cfg_r=`i2cget -y -f 9 0x20 0xD1`
157156
((cfg_w=$cfg_r+$bus_en))
158157
i2cset -y -f 9 0x20 0xD1 $cfg_w
159-
sleep 1
158+
sleep 0.1
160159

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

0 commit comments

Comments
 (0)