aboutsummaryrefslogtreecommitdiff
path: root/include/chiptod.h
diff options
context:
space:
mode:
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>2015-06-05 23:40:15 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-07-09 16:27:32 +1000
commit8c6d7e5aa922c580ebea630a0dec492aee25e6ee (patch)
tree3b6fed858ef0ece5cb6a539a0577e25d7e15ed57 /include/chiptod.h
parent939ac40f8010210078a04a4d35f5dbfd780603e1 (diff)
downloadskiboot-8c6d7e5aa922c580ebea630a0dec492aee25e6ee.zip
skiboot-8c6d7e5aa922c580ebea630a0dec492aee25e6ee.tar.gz
skiboot-8c6d7e5aa922c580ebea630a0dec492aee25e6ee.tar.bz2
opal: Enable backup topology.
Whenever FSP makes any changes to backup topology as part of either routine hardware maintenance or fixing failed backup topology configuration, it sends out mailbox command xE6, s/c 0x06, mod 0, to enable/disable the backup topology. OPAL layer should keep itself up-to-date with accurate details of current topology configurations. This will help OPAL layer to successfully handle any TOD failover in future. The FSP can only request that the currently inactive (backup) topology be disabled or enabled. If the requested topology is currently the active topology, then fail this request with a 0xB8 (TOD topology in use) status as return code. For disable request, set the backup topology status as disabled. For enable request, scan all the available chips and find the new backup master chip by looking at TOD status register of each chip. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/chiptod.h')
-rw-r--r--include/chiptod.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/chiptod.h b/include/chiptod.h
index 43f1d3d..07e3115 100644
--- a/include/chiptod.h
+++ b/include/chiptod.h
@@ -21,9 +21,16 @@
* time base across the fabric.
*/
+enum chiptod_topology {
+ chiptod_topo_unknown = -1,
+ chiptod_topo_primary = 0,
+ chiptod_topo_secondary = 1,
+};
+
extern void chiptod_init(void);
extern bool chiptod_wakeup_resync(void);
extern int chiptod_recover_tb_errors(void);
extern void chiptod_reset_tb(void);
+extern int chiptod_adjust_topology(enum chiptod_topology topo, bool enable);
#endif /* __CHIPTOD_H */