Brandon Wyman | 34e257b | 2019-03-28 17:39:18 -0500 | [diff] [blame] | 1 | /* This is a generated file. */ |
Matt Spinler | b54357f | 2017-08-21 14:38:54 -0500 | [diff] [blame] | 2 | |
Brandon Wyman | 34e257b | 2019-03-28 17:39:18 -0500 | [diff] [blame] | 3 | #include "ucd90160.hpp" |
Matt Spinler | b54357f | 2017-08-21 14:38:54 -0500 | [diff] [blame] | 4 | |
| 5 | namespace witherspoon |
| 6 | { |
| 7 | namespace power |
| 8 | { |
| 9 | |
| 10 | using namespace ucd90160; |
| 11 | using namespace std::string_literals; |
| 12 | |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 13 | const DeviceMap UCD90160::deviceMap{ |
Brandon Wyman | f99887b | 2019-04-05 17:37:14 -0500 | [diff] [blame] | 14 | %for ucd_data in ucd90160s: |
| 15 | {${ucd_data['index']}, |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 16 | DeviceDefinition{ |
Brandon Wyman | ee21fd2 | 2019-04-11 15:46:45 -0500 | [diff] [blame] | 17 | "${ucd_data['path']}", |
Matt Spinler | e7e432b | 2017-08-21 15:01:40 -0500 | [diff] [blame] | 18 | |
Brandon Wyman | ee21fd2 | 2019-04-11 15:46:45 -0500 | [diff] [blame] | 19 | RailNames{ |
| 20 | %for rail in ucd_data['RailNames']: |
| 21 | "${rail}"s, |
| 22 | %endfor |
| 23 | }, |
Matt Spinler | d998b73 | 2017-08-21 15:35:54 -0500 | [diff] [blame] | 24 | |
Brandon Wyman | 2ca8e48 | 2019-04-11 16:33:14 -0500 | [diff] [blame^] | 25 | GPIConfigs{ |
| 26 | %for gpi_config in ucd_data['GPIConfigs']: |
| 27 | <% |
| 28 | poll = str(gpi_config['poll']).lower() |
| 29 | %>\ |
| 30 | GPIConfig{${gpi_config['gpi']}, ${gpi_config['pinID']}, "${gpi_config['name']}"s, ${poll}, extraAnalysisType::${gpi_config['analysis']}}, |
| 31 | %endfor |
| 32 | }, |
Matt Spinler | 2d248ae | 2017-09-19 11:06:48 -0500 | [diff] [blame] | 33 | |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 34 | GPIOAnalysis{ |
| 35 | {extraAnalysisType::gpuPGOOD, |
| 36 | GPIOGroup{ |
Matt Spinler | 57bee32 | 2019-03-22 10:39:03 -0500 | [diff] [blame] | 37 | "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@" |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 38 | "1e78a000/1e78a400.i2c-bus/i2c-11/11-0060", |
| 39 | gpio::Value::low, |
| 40 | [](auto& ucd, const auto& callout) { |
| 41 | ucd.gpuPGOODError(callout); |
| 42 | }, |
| 43 | optionFlags::none, |
| 44 | GPIODefinitions{ |
| 45 | GPIODefinition{8, |
| 46 | "/system/chassis/motherboard/gv100card0"s}, |
| 47 | GPIODefinition{9, |
| 48 | "/system/chassis/motherboard/gv100card1"s}, |
| 49 | GPIODefinition{10, |
| 50 | "/system/chassis/motherboard/gv100card2"s}, |
| 51 | GPIODefinition{11, |
| 52 | "/system/chassis/motherboard/gv100card3"s}, |
| 53 | GPIODefinition{12, |
| 54 | "/system/chassis/motherboard/gv100card4"s}, |
| 55 | GPIODefinition{ |
| 56 | 13, "/system/chassis/motherboard/gv100card5"s}}}}, |
Matt Spinler | 2d248ae | 2017-09-19 11:06:48 -0500 | [diff] [blame] | 57 | |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 58 | {extraAnalysisType::gpuOverTemp, |
| 59 | GPIOGroup{ |
Matt Spinler | 57bee32 | 2019-03-22 10:39:03 -0500 | [diff] [blame] | 60 | "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@" |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 61 | "1e78a000/1e78a400.i2c-bus/i2c-11/11-0060", |
| 62 | gpio::Value::low, |
| 63 | [](auto& ucd, |
| 64 | const auto& callout) { ucd.gpuOverTempError(callout); }, |
| 65 | optionFlags::shutdownOnFault, |
| 66 | GPIODefinitions{ |
| 67 | GPIODefinition{2, |
| 68 | "/system/chassis/motherboard/gv100card0"s}, |
| 69 | GPIODefinition{3, |
| 70 | "/system/chassis/motherboard/gv100card1"s}, |
| 71 | GPIODefinition{4, |
| 72 | "/system/chassis/motherboard/gv100card2"s}, |
| 73 | GPIODefinition{5, |
| 74 | "/system/chassis/motherboard/gv100card3"s}, |
| 75 | GPIODefinition{6, |
| 76 | "/system/chassis/motherboard/gv100card4"s}, |
| 77 | GPIODefinition{ |
Brandon Wyman | f99887b | 2019-04-05 17:37:14 -0500 | [diff] [blame] | 78 | 7, "/system/chassis/motherboard/gv100card5"s}}}}}} |
| 79 | }, |
| 80 | %endfor |
| 81 | }; |
Matt Spinler | b54357f | 2017-08-21 14:38:54 -0500 | [diff] [blame] | 82 | |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 83 | } // namespace power |
| 84 | } // namespace witherspoon |