From 373a84d52900ffa9fcdd68024e8173c4300109db Mon Sep 17 00:00:00 2001 From: SeokYeon Hwang Date: Thu, 21 Nov 2013 12:55:24 +0900 Subject: [PATCH] esm: Implement reset function. Change-Id: I0770e6011e12185b74b23af908dd3c54f719ddce Signed-off-by: SeokYeon Hwang --- tizen/src/hw/maru_virtio_esm.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/tizen/src/hw/maru_virtio_esm.c b/tizen/src/hw/maru_virtio_esm.c index 65d353d..9806ec1 100644 --- a/tizen/src/hw/maru_virtio_esm.c +++ b/tizen/src/hw/maru_virtio_esm.c @@ -106,20 +106,23 @@ static void virtio_esm_handle(VirtIODevice *vdev, VirtQueue *vq) virtio_notify(&vesm->vdev, vesm->vq); } -static void virtio_esm_reset(VirtIODevice *vdev) -{ - TRACE("virtio_esm_reset.\n"); -} - static uint32_t virtio_esm_get_features(VirtIODevice *vdev, uint32_t feature) { TRACE("virtio_esm_get_features.\n"); return feature; } +static void virtio_esm_reset(VirtIODevice* vdev) +{ + TRACE("virtio_esm_reset.\n"); + + progress.mode = '\0'; + progress.percentage = 0; +} + + static int virtio_esm_device_init(VirtIODevice *vdev) { -// DeviceState *qdev = DEVICE(vdev); VirtIOESM *vesm = VIRTIO_ESM(vdev); INFO("initialize virtio-esm device\n"); @@ -127,6 +130,8 @@ static int virtio_esm_device_init(VirtIODevice *vdev) vesm->vq = virtio_add_queue(vdev, 1, virtio_esm_handle); + virtio_esm_reset(vdev); + return 0; } @@ -147,7 +152,8 @@ static void virtio_esm_class_init(ObjectClass *klass, void *data) dc->exit = virtio_esm_device_exit; vdc->init = virtio_esm_device_init; vdc->get_features = virtio_esm_get_features; - vdc->reset = virtio_esm_reset; + // This device is no need to reset. + //vdc->reset = virtio_esm_reset; } static const TypeInfo virtio_device_info = { -- 2.7.4