From: Jorge Ramirez-Ortiz Date: Sat, 2 Dec 2017 16:24:42 +0000 (+0100) Subject: drivers: spmi-msm: fix scanning for peripherals X-Git-Tag: v2018.01-rc2~23 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bd3006c8494bedb11814e593ba1a64f3e4935030;p=u-boot drivers: spmi-msm: fix scanning for peripherals A typo in the probe function causes not all peripherals to be scanned (in the case of the Dragonboard820c - work in progress - it wont find pmic0). --- diff --git a/drivers/spmi/spmi-msm.c b/drivers/spmi/spmi-msm.c index ca27ee5736..c226913f9e 100644 --- a/drivers/spmi/spmi-msm.c +++ b/drivers/spmi/spmi-msm.c @@ -161,7 +161,7 @@ static int msm_spmi_probe(struct udevice *dev) return -EINVAL; /* Scan peripherals connected to each SPMI channel */ - for (i = 0; i < SPMI_MAX_CHANNELS ; i++) { + for (i = 0; i < SPMI_MAX_PERIPH ; i++) { uint32_t periph = readl(priv->arb_chnl + ARB_CHANNEL_OFFSET(i)); uint8_t slave_id = (periph & 0xf0000) >> 16; uint8_t pid = (periph & 0xff00) >> 8;