quick_dump: Add a file argument

-f, or --file will simply dump the file in the specified format. All
other options will be skipped. This is helpful when one wants to create
their own list for temporary debug, or if one requires a subset of
registers to work around things like fused off PCH.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
This commit is contained in:
Ben Widawsky 2014-01-31 04:46:06 +00:00
parent 8ce7c366d7
commit b5a1ab3d6e

View File

@ -76,6 +76,8 @@ if __name__ == "__main__":
parser.add_argument('-a', '--autodetect',
action='store_true', default=False,
help='autodetect chipset')
parser.add_argument('-f', '--file',
type=argparse.FileType('r'), default=None)
parser.add_argument('profile', nargs='?',
type=argparse.FileType('r'), default=None)
@ -88,6 +90,11 @@ if __name__ == "__main__":
# Put us where the script is
os.chdir(os.path.dirname(sys.argv[0]))
# specifying a file trumps all other things
if args.file != None:
parse_file(args.file)
sys.exit()
#parse anything named base_ these are assumed to apply for all gens.
if args.baseless == False:
walk_base_files()