In preparation for adding more text types, refactor the common fields into a new structure. This will allow common code to be used. Signed-off-by: Simon Glass <sjg@chromium.org>