From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754072AbbHXS2X (ORCPT ); Mon, 24 Aug 2015 14:28:23 -0400 Received: from smtp06.smtpout.orange.fr ([80.12.242.128]:52162 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751179AbbHXS2W (ORCPT ); Mon, 24 Aug 2015 14:28:22 -0400 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Mon, 24 Aug 2015 20:28:21 +0200 X-ME-IP: 92.136.77.243 From: Robert Jarzmik To: Ezequiel Garcia Cc: Ezequiel Garcia , David Woodhouse , Brian Norris , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: nand: pxa3xx-nand: prevent DFI bus lockup on removal References: <1440356741-24308-1-git-send-email-robert.jarzmik@free.fr> <20150824150847.GA8497@laptop.cereza> X-URL: http://belgarath.falguerolles.org/ Date: Mon, 24 Aug 2015 20:24:03 +0200 In-Reply-To: <20150824150847.GA8497@laptop.cereza> (Ezequiel Garcia's message of "Mon, 24 Aug 2015 12:08:47 -0300") Message-ID: <87io8435q4.fsf@belgarion.home> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ezequiel Garcia 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. >> @@ -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. 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. */ Cheers. -- Robert