diff mbox

[4/5] i2c: Remove old hack for bad clock frequency

Message ID 20170424044544.23810-4-benh@kernel.crashing.org
State Accepted
Headers show

Commit Message

Benjamin Herrenschmidt April 24, 2017, 4:45 a.m. UTC
This hack dates back to ancient P8 hostboots. The value
it would use if it detected the "bad" value was incorrect
anyway.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 hw/p8-i2c.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Oliver O'Halloran April 27, 2017, 8:50 a.m. UTC | #1
Tested-by: Oliver O'Halloran <oohall@gmail.com>

On Mon, Apr 24, 2017 at 2:45 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> This hack dates back to ancient P8 hostboots. The value
> it would use if it detected the "bad" value was incorrect
> anyway.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>  hw/p8-i2c.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/hw/p8-i2c.c b/hw/p8-i2c.c
> index bfbc31d..c201ad2 100644
> --- a/hw/p8-i2c.c
> +++ b/hw/p8-i2c.c
> @@ -1446,12 +1446,6 @@ static void p8_i2c_init_one(struct dt_node *i2cm, enum p8_i2c_master_type type)
>         /* Local bus speed in Hz */
>         lb_freq = dt_prop_get_u32(i2cm, "clock-frequency");
>
> -       /* XXX HACK for bad HB value */
> -       if (lb_freq == 600000000) {
> -               prlog(PR_ERR, "I2C: Fixing up HB bad clock freq !\n");
> -               lb_freq = 50000000;
> -       }
> -
>         /* Initialise the i2c master structure */
>         master->state = state_idle;
>         master->chip_id = dt_get_chip_id(i2cm);
> --
> 2.9.3
>
> _______________________________________________
> Skiboot mailing list
> Skiboot@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot
diff mbox

Patch

diff --git a/hw/p8-i2c.c b/hw/p8-i2c.c
index bfbc31d..c201ad2 100644
--- a/hw/p8-i2c.c
+++ b/hw/p8-i2c.c
@@ -1446,12 +1446,6 @@  static void p8_i2c_init_one(struct dt_node *i2cm, enum p8_i2c_master_type type)
 	/* Local bus speed in Hz */
 	lb_freq = dt_prop_get_u32(i2cm, "clock-frequency");
 
-	/* XXX HACK for bad HB value */
-	if (lb_freq == 600000000) {
-		prlog(PR_ERR, "I2C: Fixing up HB bad clock freq !\n");
-		lb_freq = 50000000;
-	}
-
 	/* Initialise the i2c master structure */
 	master->state = state_idle;
 	master->chip_id = dt_get_chip_id(i2cm);