Skip to content

Commit

Permalink
ARM: OMAP: OCM RAM: use memset_io() when clearing SRAM
Browse files Browse the repository at this point in the history
We currently treat the OCM RAM memory as memory that hangs off an
I/O bus, so use memset_io() to clear it rather than memset().
This also takes care of this sparse warning:

arch/arm/plat-omap/sram.c:199:9: warning: cast removes address space of expression

There is still one SRAM-related sparse warning, but it appears that
fixing it correctly will take some time and thought.

N.B., at some point, the OCM RAM IP block interface code should probably
be reimplemented as an MTD device or something similar under drivers/.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
  • Loading branch information
Paul Walmsley committed Apr 13, 2012
1 parent a7022d6 commit 7cc0442
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/plat-omap/sram.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ static void __init omap_map_sram(void)
* Looks like we need to preserve some bootloader code at the
* beginning of SRAM for jumping to flash for reboot to work...
*/
memset((void *)omap_sram_base + SRAM_BOOTLOADER_SZ, 0,
omap_sram_size - SRAM_BOOTLOADER_SZ);
memset_io(omap_sram_base + SRAM_BOOTLOADER_SZ, 0,
omap_sram_size - SRAM_BOOTLOADER_SZ);
}

/*
Expand Down

0 comments on commit 7cc0442

Please sign in to comment.