thunderbolt: Move nvm_write_ops to tb.h
authorRajmohan Mani <rajmohan.mani@intel.com>
Mon, 12 Apr 2021 11:01:46 +0000 (14:01 +0300)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 1 Jun 2021 07:53:32 +0000 (10:53 +0300)
Currently these write ops are used for updating router firmware images
only. Moving to tb.h helps the retimers also to use the same ops.

Also add tb_ prefix to the enum while there.

Signed-off-by: Rajmohan Mani <rajmohan.mani@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thunderbolt/switch.c
drivers/thunderbolt/tb.h

index dae59919e2bfa97d529c365c10e346e1ede5310a..bf4821d3bbabe8605f1b71e58de0bdd95dc28fc0 100644 (file)
@@ -26,11 +26,6 @@ struct nvm_auth_status {
        u32 status;
 };
 
-enum nvm_write_ops {
-       WRITE_AND_AUTHENTICATE = 1,
-       WRITE_ONLY = 2,
-};
-
 /*
  * Hold NVM authentication failure status per switch This information
  * needs to stay around even when the switch gets power cycled so we
index 341e8443a22da1933e5b23d91fc98f04a1be5861..863d80ad44abd76170854585514d663d1f39ecef 100644 (file)
@@ -58,6 +58,11 @@ struct tb_nvm {
        bool flushed;
 };
 
+enum tb_nvm_write_ops {
+       WRITE_AND_AUTHENTICATE = 1,
+       WRITE_ONLY = 2,
+};
+
 #define TB_SWITCH_KEY_SIZE             32
 #define TB_SWITCH_MAX_DEPTH            6
 #define USB4_SWITCH_MAX_DEPTH          5