From 83b2e15fe4a34927273d01f205c2fab6120bcc08 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Thu, 9 May 2019 16:34:46 -0600 Subject: Support board CSV files that obscure information Some board spreadsheets specify RSVD for some SoC pinmux options even where the SoC does actually support some "real" option. Enhance the pinmux scripts' error checking not to throw an error when board CSVs and SoC data files don't match, in this one specific case. --- csv-to-board.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/csv-to-board.py b/csv-to-board.py index ff0fcba..a177b79 100755 --- a/csv-to-board.py +++ b/csv-to-board.py @@ -306,10 +306,12 @@ with open(board_conf['filename'], newline='') as fh: gpio_pin = soc.gpio_or_pin_by_name(ball_name) for i, func in enumerate((f0, f1, f2, f3)): - if func != gpio_pin.funcs[i]: + alt_rsvd = 'rsvd' + str(soc.soc_rsvd_base + i) + if func != gpio_pin.funcs[i] and func != alt_rsvd: print('WARNING: %s: F%d mismatch CSV %s vs SOC %s' % (ball_name, i, repr(func), repr(gpio_pin.funcs[i])), file=sys.stderr) for i, func in enumerate((f0, f1, f2, f3)): - if func not in gpio_pin.funcs: + alt_rsvd = 'rsvd' + str(soc.soc_rsvd_base + i) + if func not in gpio_pin.funcs and func != alt_rsvd: print('ERROR: %s: F%d CSV %s not in SOC list %s' % (ball_name, i, repr(func), repr(gpio_pin.funcs)), file=sys.stderr) sys.exit(1) if fs not in (f0, f1, f2, f3): -- cgit v1.2.1