From: Stephen Warren <swarren@xxxxxxxxxx> Putting the whole filename in to the data structure allows us to keep different CSV files in different directories. This will allow explicit separation of public and private CSV files. The per-board data is also modified to be a dictionary so that additional fields can be stored in the future. Signed-off-by: Stephen Warren <swarren@xxxxxxxxxx> --- csv-to-board-tegra124-xlsx.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/csv-to-board-tegra124-xlsx.py b/csv-to-board-tegra124-xlsx.py index c150fface9d2..d5a8f2f3f645 100755 --- a/csv-to-board-tegra124-xlsx.py +++ b/csv-to-board-tegra124-xlsx.py @@ -42,15 +42,26 @@ if args.debug: if dbg: print(args) supported_boards = { - 'jetson-tk1': 'T124_customer_pinmux_PM375_30Apr2014_v2.csv', # worksheet PM375Beaver_Configuration - 'norrin': 'PM370_T124_customer_pinmux_1.1.csv', # worksheet Customer_Configuration - 'venice2': 'Venice2_T124_customer_pinmux_based_on_P4_rev47_2013-07-12.csv', # worksheet Customer_Configuration + 'jetson-tk1': { + # T124_customer_pinmux_PM375_30Apr2014_v2.xlsm worksheet PM375Beaver_Configuration + # T124_customer_pinmux.xlsm worksheet Jetson TK1 Configuration + # Jetson_TK1_customer_pinmux_release.xlsm worksheet Jetson TK1 Configuration + 'filename': 'csv/jetson-tk1.csv', # worksheet PM375Beaver_Configuration + }, + 'norrin': { + # PM370_T124_customer_pinmux_1.1.xlsm worksheet Customer_Configuration + 'filename': 'nv-internal-data/PM370_T124_customer_pinmux_1.1.csv', + }, + 'venice2': { + # Venice2_T124_customer_pinmux_based_on_P4_rev47_2013-07-12.xlsm worksheet Customer_Configuration + 'filename': 'nv-internal-data/Venice2_T124_customer_pinmux_based_on_P4_rev47_2013-07-12.csv', + }, } if not args.board in supported_boards: print('ERROR: Unsupported board %s' % args.board, file=sys.stderr) sys.exit(1) -csvfile = os.path.join('nv-internal-data', supported_boards[args.board]) +board_conf = supported_boards[args.board] soc = tegra_pmx_soc_parser.load_soc('tegra124') @@ -136,7 +147,7 @@ def rcv_sel_munge(d): found_header = False pin_table = [] -with open(csvfile, newline='') as fh: +with open(board_conf['filename'], newline='') as fh: csv = csv.reader(fh) lnum = 0 for row in csv: -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html