[U-Boot] [PATCH] TI: DaVinci DM355: Fix Compilation warning
Tom
Tom.Rix at windriver.com
Tue Sep 29 14:24:26 CEST 2009
s-paulraj at ti.com wrote:
> From: Sandeep Paulraj <s-paulraj at ti.com>
>
> This patch fixes a compilation warning while building DM355
>
> Signed-off-by: Sandeep Paulraj <s-paulraj at ti.com>
> ---
> board/davinci/dm355evm/dm355evm.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/board/davinci/dm355evm/dm355evm.c b/board/davinci/dm355evm/dm355evm.c
> index 0a44748..5dd3b0d 100644
> --- a/board/davinci/dm355evm/dm355evm.c
> +++ b/board/davinci/dm355evm/dm355evm.c
> @@ -96,11 +96,11 @@ static void nand_dm355evm_select_chip(struct mtd_info *mtd, int chip)
> u32 rbase = (u32) this->IO_ADDR_R;
>
> if (chip == 1) {
> - __set_bit(14, &wbase);
> - __set_bit(14, &rbase);
> + __set_bit(14, (void *)&wbase);
> + __set_bit(14, (void *)&rbase);
> } else {
> - __clear_bit(14, &wbase);
> - __clear_bit(14, &rbase);
> + __clear_bit(14, (void *)&wbase);
> + __clear_bit(14, (void *)&rbase);
> }
> this->IO_ADDR_W = (void *)wbase;
> this->IO_ADDR_R = (void *)rbase;
It looks like __clear_bit is #defined to generic_clear_bit which has
this declaration. generic_clear_bit(int nr, volatile unsigned long addr)
So maybe changing u32 to volatile unsigned long will work?
Also it looks like dm365evm has the same logic for chip select.
At the least, it should also be fixed. Since they look like copies, it
would be better if there was a common function.
Tom
More information about the U-Boot
mailing list