From b1918fd7dde901388dc215ca7779e8e41dbb7df6 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Wed, 10 Feb 2021 15:27:31 +0300 Subject: support multiple models as they all use the same gpios --- get_mbp101_ramcfg | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) delete mode 100755 get_mbp101_ramcfg (limited to 'get_mbp101_ramcfg') diff --git a/get_mbp101_ramcfg b/get_mbp101_ramcfg deleted file mode 100755 index 7cead1e..0000000 --- a/get_mbp101_ramcfg +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env python3 -import sys - - -ramconfigs = ( - '4g_hynix_1600s', - '1g_samsung_1600', - '4g_samsung_1600s', - '1g_hynix_1600', - '4g_elpida_1600s', - '2g_samsung_1600', - '2g_samsung_1333', - '2g_hynix_1600', - '4g_samsung_1600', - '4g_hynix_1600', - '2g_elpida_1600s', - '2g_elpida_1600', - '4g_elpida_1600', - '2g_samsung_1600s', - '2g_hynix_1600s' -) - - -def main(): - reg = None - for line in sys.stdin: - line = line.strip() - if not line.endswith('(GPIO_LVL3)'): - continue - - reg = int(line.split(' ')[1], 16) - break - - if reg is None: - raise Exceptions("failed to parse gpio registers") - - # GPIO68..GPIO71 - ramcfg = (reg >> 4) & 0xf - - # reverse bit order - ramcfg = int('{:04b}'.format(ramcfg)[::-1], 2) - - if ramcfg >= len(ramconfigs): - print("unsupported memory configuration %d" % ramcfg) - else: - print(ramconfigs[ramcfg]) - - -if __name__ == '__main__': - main() -- cgit v1.2.3