[U-Boot] [PATCH 5/7] S3C24XX: Add NAND Flash driver
Scott Wood
scottwood at freescale.com
Thu Sep 13 01:20:24 CEST 2012
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
More information about the U-Boot
mailing list