thunderbolt: Read router NVM version before applying quirks
The router NVM version is currently only available after the NVMem devices
have been registered. This is too late for firmware-dependent quirks that
are evaluated during tb_switch_add() before device registration.
Split router NVM handling into two phases:
- tb_switch_nvm_init() allocates the NVM object and reads the version
- tb_switch_nvm_add() registers the NVMem devices using the pre-read NVM
This makes the NVM major/minor version available before tb_check_quirks()
without changing when the NVMem devices are registered.
Signed-off-by: Rene Sapiens <rene.sapiens@linux.intel.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>