Default to enable all clock outputs
In the current code flow, as and when Entity manager detects the
HSBP config, and the hardware is initialized, the Clock Buffers are
set to a default value, which is to disable all outputs. Even the IO
controller is initialized to disable the clock output.
This approach leads to two issues
1. The code assumes HSBP is the only consumer of the MCIO port. In the
event of attaching any other card to the MCIO port, the clock will be
disabled by default which is incorrect.
2. During the scenario when bmc goes for reboot, or even if
entity-manager service reloads, the clock buffers are momentorily
initialized to disable clocks until the code finds that there are
drives connected. This leads to an issue when, HOST is accessing the
drive and clock buffers are re-initialized, the HOST loses the control
over the drive for that moment.
This commit fixes both of these issues by defaulting the clocks to be
enabled, and upon detection of HSBP, determine the drives connected and
accordingly disable clocks which are not required.
TESTED:
- Restarted Entity manager to simulate the bmc reboot scenario and
verified the Clock buffer status
- With older code, the buffer value was reset and then
re-initialized
- With the fix implemented, the buffer retained its value.
- On removing/inserting a drive, the corresponding clock was
enabled/disabled
Change-Id: I2e85fb50de33ba763a6ea05076fb99d53d90d859
Signed-off-by: Rashmi R V <rashmi.r.v@intel.com>
1 file changed