[Skiboot] [PATCH 05/12] opal: Modify chiptod_running_check() function to take chip id as argument.
    Mahesh J Salgaonkar 
    mahesh at linux.vnet.ibm.com
       
    Sat Mar 28 20:35:39 AEDT 2015
    
    
  
From: Mahesh Salgaonkar <mahesh at linux.vnet.ibm.com>
Modify chiptod_running_check() function to take chip id as argument.
The subsequent patches will use this.
Signed-off-by: Mahesh Salgaonkar <mahesh at linux.vnet.ibm.com>
---
 hw/chiptod.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/chiptod.c b/hw/chiptod.c
index fa75554..1b73be0 100644
--- a/hw/chiptod.c
+++ b/hw/chiptod.c
@@ -473,11 +473,11 @@ static bool chiptod_interrupt_check(void)
 	return true;
 }
 
-static bool chiptod_running_check(void)
+static bool chiptod_running_check(uint32_t chip_id)
 {
 	uint64_t tval;
 
-	if (xscom_readme(TOD_CHIPTOD_FSM, &tval) != 0) {
+	if (xscom_read(chip_id, TOD_CHIPTOD_FSM, &tval) != 0) {
 		prerror("CHIPTOD: XSCOM error polling run\n");
 		return false;
 	}
@@ -1157,7 +1157,7 @@ int chiptod_recover_tb_errors(void)
 		 * Before we move TOD to core TB check if TOD is running.
 		 * If not, then get TOD in running state.
 		 */
-		if (!chiptod_running_check())
+		if (!chiptod_running_check(this_cpu()->chip_id))
 			if (!chiptod_start_tod())
 				goto error_out;
 
    
    
More information about the Skiboot
mailing list