From: jinhyung.jo Date: Wed, 30 Jan 2013 10:11:11 +0000 (+0900) Subject: maru_overlay : source clean up X-Git-Tag: TizenStudio_2.0_p2.3~961 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2557dd8f6401d60dd4e9faf8d5a83751384e8130;p=sdk%2Femulator%2Fqemu.git maru_overlay : source clean up Corrected the boilerplates. Modified to suit the QEMU coding conventions. Signed-off-by: Jinhyung Jo --- diff --git a/tizen/src/hw/maru_overlay.c b/tizen/src/hw/maru_overlay.c index 43194b4..7072f58 100644 --- a/tizen/src/hw/maru_overlay.c +++ b/tizen/src/hw/maru_overlay.c @@ -1,17 +1,10 @@ -/* +/* * Maru overlay device for VGA * - * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved. * - * Contact: - * SeokYeon Hwang - * SangJin Kim - * MunKyu Im - * KiTae Kim + * Contact: * JinHyung Jo - * SungMin Ha - * JiHye Kim - * GiWoong Kim * YeongKyoon Lee * DongKyun Yun * DoHyung Hong @@ -29,12 +22,14 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. * * Contributors: * - S-Core Co., Ltd * */ + #include "pc.h" #include "pci.h" #include "maru_device_ids.h" @@ -43,20 +38,20 @@ MULTI_DEBUG_CHANNEL(qemu, maru_overlay); -#define QEMU_DEV_NAME "MARU_OVERLAY" +#define QEMU_DEV_NAME "MARU_OVERLAY" -#define OVERLAY_MEM_SIZE (8192 * 1024) // 4MB(overlay0) + 4MB(overlay1) -#define OVERLAY_REG_SIZE 256 -#define OVERLAY1_REG_OFFSET (OVERLAY_REG_SIZE / 2) +#define OVERLAY_MEM_SIZE (8192 * 1024) /* 4MB(overlay0) + 4MB(overlay1) */ +#define OVERLAY_REG_SIZE 256 +#define OVERLAY1_REG_OFFSET (OVERLAY_REG_SIZE / 2) enum { - OVERLAY_POWER = 0x00, - OVERLAY_POSITION = 0x04, // left top position - OVERLAY_SIZE = 0x08, // width and height + OVERLAY_POWER = 0x00, + OVERLAY_POSITION = 0x04, /* left top position */ + OVERLAY_SIZE = 0x08, /* width and height */ }; -uint8_t* overlay_ptr; +uint8_t *overlay_ptr; uint8_t overlay0_power; uint16_t overlay0_left; @@ -75,11 +70,12 @@ typedef struct OverlayState { MemoryRegion mem_addr; MemoryRegion mmio_addr; - } OverlayState; -static uint64_t overlay_reg_read(void *opaque, target_phys_addr_t addr, unsigned size) +static uint64_t overlay_reg_read(void *opaque, + target_phys_addr_t addr, + unsigned size) { switch (addr) { case OVERLAY_POWER: @@ -118,7 +114,10 @@ static uint64_t overlay_reg_read(void *opaque, target_phys_addr_t addr, unsigned return 0; } -static void overlay_reg_write(void *opaque, target_phys_addr_t addr, uint64_t val, unsigned size) +static void overlay_reg_write(void *opaque, + target_phys_addr_t addr, + uint64_t val, + unsigned size) { switch (addr) { case OVERLAY_POWER: @@ -190,7 +189,10 @@ static int overlay_initfn(PCIDevice *dev) memory_region_init_ram(&s->mem_addr, "maru_overlay.ram", OVERLAY_MEM_SIZE); overlay_ptr = memory_region_get_ram_ptr(&s->mem_addr); - memory_region_init_io (&s->mmio_addr, &overlay_mmio_ops, s, "maru_overlay_mmio", OVERLAY_REG_SIZE); + memory_region_init_io(&s->mmio_addr, &overlay_mmio_ops, + s, + "maru_overlay_mmio", + OVERLAY_REG_SIZE); /* setup memory space */ /* memory #0 device memory (overlay surface) */ diff --git a/tizen/src/hw/maru_overlay.h b/tizen/src/hw/maru_overlay.h index 673e0d6..24a4529 100644 --- a/tizen/src/hw/maru_overlay.h +++ b/tizen/src/hw/maru_overlay.h @@ -1,17 +1,10 @@ /* * Maru overlay device for VGA * - * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved. * * Contact: - * SeokYeon Hwang - * SangJin Kim - * MunKyu Im - * KiTae Kim * JinHyung Jo - * SungMin Ha - * JiHye Kim - * GiWoong Kim * YeongKyoon Lee * DoHyung Hong * Hyunjun Son @@ -28,7 +21,8 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. * * Contributors: * - S-Core Co., Ltd @@ -41,7 +35,7 @@ #include "qemu-common.h" -extern uint8_t* overlay_ptr; +extern uint8_t *overlay_ptr; extern uint8_t overlay0_power; extern uint16_t overlay0_left; extern uint16_t overlay0_top; @@ -54,6 +48,6 @@ extern uint16_t overlay1_top; extern uint16_t overlay1_width; extern uint16_t overlay1_height; -DeviceState *pci_maru_overlay_init( PCIBus *bus ); +DeviceState *pci_maru_overlay_init(PCIBus *bus); #endif /* MARU_OVERLAY_H_ */