diff mbox

[v2,2/5] xscom: Add POWER9 scom reset

Message ID 20170323061509.4231-2-mikey@neuling.org
State Accepted
Headers show

Commit Message

Michael Neuling March 23, 2017, 6:15 a.m. UTC
Add scom reset registers for POWER9.

Signed-off-by: Michael Neuling <mikey@neuling.org>
---
 hw/xscom.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Comments

Cédric Le Goater March 23, 2017, 1:18 p.m. UTC | #1
On 03/23/2017 07:15 AM, Michael Neuling wrote:
> Add scom reset registers for POWER9.

Reviewed-by: Cédric Le Goater <clg@kaod.org>


> Signed-off-by: Michael Neuling <mikey@neuling.org>
> ---
>  hw/xscom.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/xscom.c b/hw/xscom.c
> index dd7aeca65e..6fde427f1e 100644
> --- a/hw/xscom.c
> +++ b/hw/xscom.c
> @@ -101,9 +101,15 @@ static void xscom_reset(uint32_t gcid)
>  	mtspr(SPR_HMER, HMER_CLR_MASK);
>  
>  	/* Setup local and target scom addresses */
> -	recv_status_reg = 0x202000f;
> -	log_reg = 0x2020007;
> -	err_reg = 0x2020009;
> +	if (proc_gen == proc_gen_p9) {
> +		recv_status_reg = 0x00090018;
> +		log_reg = 0x0090012;
> +		err_reg = 0x0090013;
> +	} else {
> +		recv_status_reg = 0x202000f;
> +		log_reg = 0x2020007;
> +		err_reg = 0x2020009;
> +	}
>  
>  	/* First we need to write 0 to a register on our chip */
>  	out_be64(xscom_addr(this_cpu()->chip_id, recv_status_reg), 0);
>
diff mbox

Patch

diff --git a/hw/xscom.c b/hw/xscom.c
index dd7aeca65e..6fde427f1e 100644
--- a/hw/xscom.c
+++ b/hw/xscom.c
@@ -101,9 +101,15 @@  static void xscom_reset(uint32_t gcid)
 	mtspr(SPR_HMER, HMER_CLR_MASK);
 
 	/* Setup local and target scom addresses */
-	recv_status_reg = 0x202000f;
-	log_reg = 0x2020007;
-	err_reg = 0x2020009;
+	if (proc_gen == proc_gen_p9) {
+		recv_status_reg = 0x00090018;
+		log_reg = 0x0090012;
+		err_reg = 0x0090013;
+	} else {
+		recv_status_reg = 0x202000f;
+		log_reg = 0x2020007;
+		err_reg = 0x2020009;
+	}
 
 	/* First we need to write 0 to a register on our chip */
 	out_be64(xscom_addr(this_cpu()->chip_id, recv_status_reg), 0);