From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Wed, 12 Sep 2012 18:20:24 -0500 Subject: [U-Boot] [PATCH 5/7] S3C24XX: Add NAND Flash driver In-Reply-To: <505117D3.1070303@inov.pt> References: <1347448523-19565-1-git-send-email-jose.goncalves@inov.pt> <1347448523-19565-6-git-send-email-jose.goncalves@inov.pt> <201209122311.16702.marex@denx.de> <505117D3.1070303@inov.pt> Message-ID: <505118B8.9030609@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09/12/2012 06:16 PM, Jos? Miguel Gon?alves wrote: > Hi Marek, > > On 09/12/2012 10:11 PM, Marek Vasut wrote: >> Dear Jos? Miguel Gon?alves, >> >>> + >>> +/* >>> + * Hardware specific access to control-lines function >>> + */ >>> +static void s3c_nand_hwcontrol(struct mtd_info *mtd, int cmd, >>> unsigned int >>> ctrl) +{ >>> + s3c24xx_nand *const nand = s3c24xx_get_base_nand(); >>> + struct nand_chip *this = mtd->priv; >>> + >>> + if (ctrl & NAND_CTRL_CHANGE) { >>> + if (ctrl & NAND_CLE) >>> + this->IO_ADDR_W = (void __iomem *)&nand->nfcmmd; >>> + else if (ctrl & NAND_ALE) >>> + this->IO_ADDR_W = (void __iomem *)&nand->nfaddr; >>> + else >>> + this->IO_ADDR_W = (void __iomem *)&nand->nfdata; >> Do you need this cast ? > > Without it gcc gives me a warning: > > s3c24xx_nand.c:90:20: warning: assignment discards `volatile' qualifier > from pointer target type [enabled by default] Why do you have volatile in your s3c24xx_nand struct? -Scott