diff mbox series

[2/2] hw/phb4.c: limit the max-link-speed of Mowgli's phb0 to gen3

Message ID 20201028105009.27398-2-Lulu_Su@wistron.com
State Rejected
Headers show
Series [1/2] platform/mowgli: modify slot_name | expand

Commit Message

Lulu Su Oct. 28, 2020, 10:50 a.m. UTC
From: LuluTHSu <Lulu_Su@wistron.com>

Add a condition in phb4_get_max_link_speed(),
when it's mowgli's phb0, max-link-speed is set to gen3.
For mowgli platform spec.

Cc: skiboot-stable@lists.ozlabs.org
Signed-off-by: LuluTHSu <Lulu_Su@wistron.com>
---
 hw/phb4.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Oliver O'Halloran Oct. 28, 2020, 11:36 a.m. UTC | #1
On Wed, Oct 28, 2020 at 9:50 PM Lulu Su <Lulu_Su@wistron.com> wrote:
>
> From: LuluTHSu <Lulu_Su@wistron.com>
>
> Add a condition in phb4_get_max_link_speed(),
> when it's mowgli's phb0, max-link-speed is set to gen3.
> For mowgli platform spec.
>
> Cc: skiboot-stable@lists.ozlabs.org
> Signed-off-by: LuluTHSu <Lulu_Su@wistron.com>
> ---
>  hw/phb4.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/hw/phb4.c b/hw/phb4.c
> index 17a233f..ef6b176 100644
> --- a/hw/phb4.c
> +++ b/hw/phb4.c
> @@ -2966,6 +2966,10 @@ static unsigned int phb4_get_max_link_speed(struct phb4 *p, struct dt_node *np)
>
>         /* Priority order: NVRAM -> dt -> GEN3 dd2.00 -> GEN4 */
>         max_link_speed = 4;
> +       if(dt_node_is_compatible(dt_root,"ibm,mowgli") && p->pec==0){

This sort of hack shouldn't be done in the platform independent parts
of skiboot. If that's not currently possible then implement the
infrastructure required to make it doable from the platform file.

> +               max_link_speed = 3;
> +               prlog(PR_DEBUG, "Set the max link speed of Mowgli phb0 to gen3\n");
> +       }
>         if (p->rev == PHB4_REV_NIMBUS_DD20 &&
>             ((0xf & chip->ec_level) == 0) && chip->ec_rev == 0)
>                 max_link_speed = 3;
> --
> 2.7.4
>
>
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------
> This email contains confidential or legally privileged information and is for the sole use of its intended recipient.
> Any unauthorized review, use, copying or distribution of this email or the content of this email is strictly prohibited.
> If you are not the intended recipient, you may reply to the sender and should delete this e-mail immediately.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------
> --
> Skiboot-stable mailing list
> Skiboot-stable@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot-stable
diff mbox series

Patch

diff --git a/hw/phb4.c b/hw/phb4.c
index 17a233f..ef6b176 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -2966,6 +2966,10 @@  static unsigned int phb4_get_max_link_speed(struct phb4 *p, struct dt_node *np)
 
 	/* Priority order: NVRAM -> dt -> GEN3 dd2.00 -> GEN4 */
 	max_link_speed = 4;
+	if(dt_node_is_compatible(dt_root,"ibm,mowgli") && p->pec==0){
+		max_link_speed = 3;
+		prlog(PR_DEBUG, "Set the max link speed of Mowgli phb0 to gen3\n");
+	}
 	if (p->rev == PHB4_REV_NIMBUS_DD20 &&
 	    ((0xf & chip->ec_level) == 0) && chip->ec_rev == 0)
 		max_link_speed = 3;