qemu-armv7/media.c: fix coding style
Change-Id: I01a11923fc1b250afeed36acc20793fd072421ba Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: https://chromium-review.googlesource.com/168574 Reviewed-by: Gabe Black <gabeblack@chromium.org> (cherry picked from commit 46b5f64096c55d0d9627cb9537fc4910e1bddcd9) Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com> Reviewed-on: http://review.coreboot.org/6520 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
parent
9dd01eb416
commit
da36bcf0d4
|
@ -18,32 +18,39 @@
|
||||||
|
|
||||||
/* Simple memory-mapped ROM emulation. */
|
/* Simple memory-mapped ROM emulation. */
|
||||||
|
|
||||||
static int emu_rom_open(struct cbfs_media *media) {
|
static int emu_rom_open(struct cbfs_media *media)
|
||||||
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *emu_rom_map(struct cbfs_media *media, size_t offset, size_t count) {
|
static void *emu_rom_map(struct cbfs_media *media, size_t offset, size_t count)
|
||||||
|
{
|
||||||
return (void*)(offset + CONFIG_BOOTBLOCK_BASE);
|
return (void*)(offset + CONFIG_BOOTBLOCK_BASE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *emu_rom_unmap(struct cbfs_media *media, const void *address) {
|
static void *emu_rom_unmap(struct cbfs_media *media, const void *address)
|
||||||
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static size_t emu_rom_read(struct cbfs_media *media, void *dest, size_t offset,
|
static size_t emu_rom_read(struct cbfs_media *media, void *dest, size_t offset,
|
||||||
size_t count) {
|
size_t count)
|
||||||
|
{
|
||||||
void *ptr = emu_rom_map(media, offset, count);
|
void *ptr = emu_rom_map(media, offset, count);
|
||||||
memcpy(dest, ptr, count);
|
memcpy(dest, ptr, count);
|
||||||
emu_rom_unmap(media, ptr);
|
emu_rom_unmap(media, ptr);
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int emu_rom_close(struct cbfs_media *media) {
|
static int emu_rom_close(struct cbfs_media *media)
|
||||||
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int init_emu_rom_cbfs_media(struct cbfs_media *media);
|
int init_emu_rom_cbfs_media(struct cbfs_media *media);
|
||||||
int init_emu_rom_cbfs_media(struct cbfs_media *media) {
|
|
||||||
|
int init_emu_rom_cbfs_media(struct cbfs_media *media)
|
||||||
|
{
|
||||||
media->open = emu_rom_open;
|
media->open = emu_rom_open;
|
||||||
media->close = emu_rom_close;
|
media->close = emu_rom_close;
|
||||||
media->map = emu_rom_map;
|
media->map = emu_rom_map;
|
||||||
|
@ -52,6 +59,7 @@ int init_emu_rom_cbfs_media(struct cbfs_media *media) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int init_default_cbfs_media(struct cbfs_media *media) {
|
int init_default_cbfs_media(struct cbfs_media *media)
|
||||||
|
{
|
||||||
return init_emu_rom_cbfs_media(media);
|
return init_emu_rom_cbfs_media(media);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue