Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1247238

Re: [PATCH] spmi-pmic-arb: support configurable number of peripherals

From Stephen Boyd <sboyd@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH] spmi-pmic-arb: support configurable number of peripherals
Date 2015-10-15 00:50 +0200
Message-ID <qjD1U-4gA-17@gated-at.bofh.it> (permalink)
References <q8JX4-1Xs-7@gated-at.bofh.it> <q8Neh-6JP-5@gated-at.bofh.it> <q8WAW-3m7-19@gated-at.bofh.it> <q939o-4nZ-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 09/15/2015 11:27 AM, Stephen Boyd wrote:
> On 09/15, Ivan T. Ivanov wrote:
>> On Mon, 2015-09-14 at 18:28 -0700, Stephen Boyd wrote:
>>> On 09/14/2015 02:54 PM, Stephen Boyd wrote:
>>>> The current driver implementation supports only 128 peripherals.
>>>> Add support for more than 128 peripherals by taking a lazy
>>>> caching approach to the mapping tables. Instead of reading the
>>>> tables at boot given some fixed size, read them on an as needed
>>>> basis and cache the results. We still assume a max number of 512
>>>> peripherals, trading off some space for simplicity.
>>>>
>>>> Based on a patch by Gilad Avidov <gavidov@codeaurora.org> and
>>>> Sagar Dharia <sdharia@codeaurora.org>.
>>>>
>>>> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
>>>> ---
>>> Hi Ivan,
>>>
>>> This patch causes 8916 to crash, because there isn't a mapping for ppid
>>> 257 in the ppid to channel table. It seems that we're reading the revid
>>> from the slave id 1 pmic by going through channel 0, which seems to be
>>> setup for ppid 9 (slave id 0 and the peripheral starting at 0x900). Can
>>> we stop reading the revid registers from non-zero slave id pmic devices?
>>> That would be one solution to fix this problem. Or maybe we need to
>>> special case this in the pmic arbiter code to fold ppid 0xN01 (slave id
>>> N and address 0x100) onto channel 0 all the time?
>>>
>> Yes, we can. We are not using this information at the moment.
>> Right now, revision read is more or less for debug purposes.
>>
>> Would following patch work for you? Of course it will be difficult
> Yes the patch works fine. Feel free to add a
>
> Tested-by: Stephen Boyd <sboyd@codeaurora.org>
>
>

I have to take this back. I missed the part where some pmics are on
slave id 2 or slave id 4, so this check isn't going to work. I've
adjusted it to use sid % 2 instead and I'll resend these two patches,
but I imagine to be more robust we're going to need to add a revid node
to the DT under the SID that actually has it. Then we can search the
child nodes for a revid compatible node and do the rev probing stuff.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] spmi-pmic-arb: support configurable number of peripherals Stephen Boyd <sboyd@codeaurora.org> - 2015-10-15 00:50 +0200
  Re: [PATCH] spmi-pmic-arb: support configurable number of peripherals "Ivan T. Ivanov" <iivanov.xz@gmail.com> - 2015-10-15 11:30 +0200
    Re: [PATCH] spmi-pmic-arb: support configurable number of peripherals Stephen Boyd <sboyd@codeaurora.org> - 2015-10-15 20:30 +0200

csiph-web