[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAEAJfDCUGDbssCkQEazcJLuvJWjbSxKDix9ts4peSZ8Xk1ZOA@mail.gmail.com>
Date: Fri, 28 Aug 2015 19:46:09 -0300
From: Ezequiel Garcia <ezequiel@...guardiasur.com.ar>
To: Robert Jarzmik <robert.jarzmik@...e.fr>
Cc: Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>,
David Woodhouse <dwmw2@...radead.org>,
Brian Norris <computersforpeace@...il.com>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mtd: nand: pxa3xx-nand: prevent DFI bus lockup on removal
Robert,
On 24 August 2015 at 15:24, Robert Jarzmik <robert.jarzmik@...e.fr> wrote:
> Ezequiel Garcia <ezequiel@...guardiasur.com.ar> writes:
>
>> Should we worry about having two definitions for the same bit?
>> Would it be too ugly to mix the two meaning? Something like this:
>>
>> /* This bit has two different meanings on NFCv1 and NFCv2 */
>> #define NDCR_STOP_ON_UNCOR_ARB_CNTL (0x1 << 19)
> I don't find that very pretty, but if you want I can put that in the patch
> instead.
>
Yeah, it's far from pretty.
OK, another idea. How about this:
#define NFCV2_NDCR_STOP_ON_UNCOR (0x1 << 19)
#define NFCV1_NDCR_ARB_CNTL (0x1 << 19)
Or maybe I'm just bike-shedding here? I figured it's important
to document the bit has different meanings in different
hardware versions.
Anyway, just submit a v2 with whatever you feel it's less ugly.
>>> @@ -1784,6 +1787,8 @@ static int pxa3xx_nand_remove(struct platform_device *pdev)
>>> free_irq(irq, info);
>>> pxa3xx_nand_free_buff(info);
>>>
>>
>> I think a comment here explaining how this disables DFI arbitration and
>> how clearing it grants DFI access to SMC only.
>>
>> While here, we might want to document how the whole arbiter applies to
>> PXA only, since the DFI bus is shared there.
> Ok, for v2. I take it that DFI bus is not shared on Armada, lucky you.
Right, seems not shared.
> Maybe
> something like :
>
> /*
> * In the pxa3xx case, the DFI bus is shared between the SMC and NFC. In order
> * to prevent a lockup of the system bus, the DFI bus arbitration is granted
> * to SMC upon driver removal. This is done by setting the x_ARB_CNTL bit,
> * which also prevents the NAND to have access to the bus anymore.
> */
>
That'll work. Feel free to send a v2.
--
Ezequiel GarcĂa, VanguardiaSur
www.vanguardiasur.com.ar
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists