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


Groups > linux.kernel > #1673081

Re: [RFC PATCH 3/4] ARM: l2x0: add arm,ecc-enable property for aurora

From Chris Packham <Chris.Packham@alliedtelesis.co.nz>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 3/4] ARM: l2x0: add arm,ecc-enable property for aurora
Date 2017-06-23 00:00 +0200
Message-ID <tViiS-1PL-21@gated-at.bofh.it> (permalink)
References <tPX5n-7J4-3@gated-at.bofh.it> <tPX5n-7J4-1@gated-at.bofh.it> <tQnVV-7KC-37@gated-at.bofh.it> <tRjZT-2qh-1@gated-at.bofh.it> <tVbAJ-62K-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 23/06/17 02:46, Jan Lübbe wrote:
> Chris,
> 
> On So, 2017-06-11 at 22:55 +0000, Chris Packham wrote:
>> On 09/06/17 20:58, Jan Lübbe wrote:
>>> On Do, 2017-06-08 at 16:11 +1200, Chris Packham wrote:
>>>> +       if (of_property_read_bool(np, "arm,ecc-enable")) {
>>>> +               mask |= L2C_AUX_CTRL_EVTMON_ENABLE;
>>>> +               val |= L2C_AUX_CTRL_EVTMON_ENABLE;
>>>> +       } else if (of_property_read_bool(np, "arm,ecc-disable")) {
>>>> +               mask |= L2C_AUX_CTRL_EVTMON_ENABLE;
>>>> +       }
>>>
>>> Unless I misunderstand the code in __l2c_init(), the mask is used to
>>> specify the bits to preserve:
>>>           old_aux = aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
>>>           aux &= aux_mask;
>>>           aux |= aux_val;
>>>
>>>           if (old_aux != aux)
>>>                   pr_warn("L2C: DT/platform modifies aux control register: 0x%08x -> 0x%08x\n",
>>>                           old_aux, aux);
>>>
>>> So the arm,ecc-disable property will have no effect. This probably also
>>> applies to patch 2/4. The existing property *-disable code removes the
>>> corresponding bit from the mask.
>>
>> Indeed the disable version should be mask &= ~L2C_AUX_CTRL_EVTMON_ENABLE
>> and I was probably a little lazy to have used the L2C EVTMON instead of
>> adding AURORA specific ones like you have in your series.
>>
>> I'll rebase my series on top of yours and send it direct to you so you
>> can include it in the overall submission.
> 
> While picking up your arm,parity-enable and arm,ecc-enable patches for
> my series, I noticed that the mask variable is inverted when merging the
> local changes into aux_val/aux_mask at the end of aurora_of_parse. So I
> now believe your code is correct. ;) I'd appreciate a close look,
> nevertheless.

For my part I tested the enable case but I never tested the disable case 
(because u-boot doesn't enable it there's nothing to disable). I can 
probably just poke the register before starting the kernel to confirm 
the disable case works with whatever masking logic we end up with.

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


Thread

Re: [RFC PATCH 3/4] ARM: l2x0: add arm,ecc-enable property for  aurora Jan Lübbe <jlu@pengutronix.de> - 2017-06-22 16:50 +0200
  Re: [RFC PATCH 3/4] ARM: l2x0: add arm,ecc-enable property for aurora Chris Packham <Chris.Packham@alliedtelesis.co.nz> - 2017-06-23 00:00 +0200

csiph-web