Lines Matching +full:mctp +full:- +full:i2c +full:- +full:controller
8 // http://www.apache.org/licenses/LICENSE-2.0
24 #include <phosphor-logging/lg2.hpp>
62 const static constexpr char* pidControlService = "phosphor-pid-control.service";
67 ctx->bus->yield_method_call<>(ctx->yield, ec, specialModeService, in resetMtmTimer()
95 return -1; in getGpioPathForSmSignal()
109 std::string ledName = ledProp->getName(); in ledStoreAndSet()
113 if (false == ledProp->getLock()) in ledStoreAndSet()
120 ledProp->setPrevState(std::get<std::string>(presentState)); in ledStoreAndSet()
121 ledProp->setLock(true); in ledStoreAndSet()
143 if (true == ledProp->getLock()) in ledRevert()
145 ledProp->setLock(false); in ledRevert()
163 std::string ledName = ledProp->getName(); in ledRevert()
166 ledProp->getPrevState()) != 0) in ledRevert()
200 if (mtmTestBeepFd != -1) in revertTimerHandler()
203 mtmTestBeepFd = -1; in revertTimerHandler()
237 return -1; in getProperty()
256 return -1; in setProperty()
267 auto method = dbus->new_method_call(systemDService, systemDObjPath, in disablePidControlService()
271 auto reply = dbus->call(method); in disablePidControlService()
275 lg2::info("ERROR: phosphor-pid-control service start or stop failed"); in disablePidControlService()
276 return -1; in disablePidControlService()
318 auto findPwmName = connector->second.find("PwmName"); in findPwmName()
319 if (findPwmName != connector->second.end()) in findPwmName()
322 std::get_if<std::string>(&findPwmName->second); in findPwmName()
331 auto findPwm = connector->second.find("Pwm"); in findPwmName()
332 if (findPwm == connector->second.end()) in findPwmName()
336 auto fanPwm = std::get_if<uint64_t>(&findPwm->second); in findPwmName()
377 if (!intrusionStatus->compare("Normal")) in appMTMGetSignal()
381 else if (!intrusionStatus->compare("HardwareIntrusion")) in appMTMGetSignal()
386 else if (!intrusionStatus->compare("TamperingDetected")) in appMTMGetSignal()
429 auto flatMap = ctx->bus->yield_method_call<objFlatMap>( in appMTMGetSignal()
430 ctx->yield, ec, "xyz.openbmc_project.ObjectMapper", in appMTMGetSignal()
445 if (mtm.getProperty(fanService, itr->first, fanIntf, "Value", in appMTMGetSignal()
652 } // fall-through in appMTMSetSignal()
696 if (mtm.mtmTestBeepFd != -1) in appMTMSetSignal()
721 mtm.mtmTestBeepFd = -1; in appMTMSetSignal()
730 if (mtm.mtmTestBeepFd != -1) in appMTMSetSignal()
733 mtm.mtmTestBeepFd = -1; in appMTMSetSignal()
755 auto driveList = ctx->bus->yield_method_call<objPaths>( in appMTMSetSignal()
756 ctx->yield, ec, "xyz.openbmc_project.ObjectMapper", in appMTMSetSignal()
837 switch (makeCmdKey(request->ctx->netFn, request->ctx->cmd)) in mfgFilterMessage()
839 // i2c controller write read command needs additional checking in mfgFilterMessage()
841 if (request->payload.size() > 4) in mfgFilterMessage()
884 "/var/sofs/factory-settings/network/mac/eth";
916 auto fruBus = std::get_if<uint64_t>(&findBus->second); in findFruDevice()
917 auto fruAddress = std::get_if<uint64_t>(&findAddress->second); in findFruDevice()
919 std::get_if<uint64_t>(&findMacOffset->second); in findFruDevice()
950 return (checksumMod - sum) % checksumMod; in calculateChecksum()
979 std::string i2cBus = "/dev/i2c-" + std::to_string(fruBus); in readMacFromFru()
987 std::copy(++readBuf.begin(), --readBuf.end(), ethData.data()); in readMacFromFru()
1028 std::string i2cBus = "/dev/i2c-" + std::to_string(fruBus); in writeMacToFru()
1046 // boost::asio::get_associated_executor(ctx->yield), in writeMacToFru()
1048 // timer.async_wait(ctx->yield); in writeMacToFru()
1159 /** @brief implements slot controller write read IPMI command which can be used
1160 * for low-level I2C/SMBus write, read or write-read access for PCIE slots
1161 * @param reserved - skip 3 bit
1162 * @param muxType - mux type
1163 * @param addressType - address type
1164 * @param bbSlotNum - baseboard slot number
1165 * @param riserSlotNum - riser slot number
1166 * @param reserved2 - skip 2 bit
1167 * @param targetAddr - target address
1168 * @param readCount - number of bytes to be read
1169 * @param writeData - data to be written
1187 std::string path = "/dev/i2c-mux/"; in appSlotI2CControllerWriteRead()
1222 lg2::error("Controller write read command: Cannot get BusID"); in appSlotI2CControllerWriteRead()
1228 i2cBus = "/dev/i2c-" + in appSlotI2CControllerWriteRead()
1234 lg2::error("Controller write read command: invalid request"); in appSlotI2CControllerWriteRead()
1250 lg2::error("Controller write read command: Read count exceeds limit"); in appSlotI2CControllerWriteRead()
1256 lg2::error("Controller write read command: Read & write count are 0"); in appSlotI2CControllerWriteRead()
1274 // There is an i2c device on bus 4, the target address is 0x38. Based on in clearCMOS()
1278 std::string i2cBus = "/dev/i2c-4"; in clearCMOS()
1290 "/var/sofs/factory-settings/layout/fitc"; in setFITcLayout()
1318 auto configPaths = ctx->bus->yield_method_call<std::vector<std::string>>( in getMCTPServiceConfigPaths()
1319 ctx->yield, ec, "xyz.openbmc_project.ObjectMapper", in getMCTPServiceConfigPaths()
1344 ctx->bus->yield_method_call(ctx->yield, ec, systemDService, in startOrStopService()
1349 ctx->bus->yield_method_call(ctx->yield, ec, systemDService, in startOrStopService()
1356 ctx->bus->yield_method_call( in startOrStopService()
1357 ctx->yield, ec, systemDService, systemDObjPath, in startOrStopService()
1362 ctx->bus->yield_method_call( in startOrStopService()
1363 ctx->yield, ec, systemDService, systemDObjPath, systemDMgrIntf, in startOrStopService()
1369 ctx->bus->yield_method_call( in startOrStopService()
1370 ctx->yield, ec, systemDService, systemDObjPath, systemDMgrIntf, in startOrStopService()
1375 ctx->bus->yield_method_call( in startOrStopService()
1376 ctx->yield, ec, systemDService, systemDObjPath, in startOrStopService()
1452 boost::split(parts, path, boost::is_any_of("-")); in getBusNumFromPath()
1470 "/dev/i2c-mux/" + muxName + "/Slot_" + std::to_string(slotNum + 1); in muxSlotDisable()
1482 auto res = ctx->bus->yield_method_call<int>( in muxSlotDisable()
1483 ctx->yield, ec, service, mctpObjPath, mctpBaseIntf, "SkipList", in muxSlotDisable()
1487 lg2::error("Failed to set mctp skiplist"); in muxSlotDisable()
1536 * @param yield - context object that represents the currently executing
1538 * @param feature - feature enum to enable or disable
1539 * @param enable - enable or disable the feature
1540 * @param featureArg - custom arguments for that feature
1541 * @param reserved - reserved for future use
1556 case ipmi::SupportedFeatureControls::mctp: in mtmBMCFeatureControl()