update source for tizen_2.1
authorSooyoung Ha <yoosah.ha@samsung.com>
Wed, 3 Apr 2013 02:26:32 +0000 (11:26 +0900)
committerSooyoung Ha <yoosah.ha@samsung.com>
Wed, 3 Apr 2013 02:26:32 +0000 (11:26 +0900)
21 files changed:
arch/x86/configs/i386_tizen_emul_defconfig
drivers/char/vdpram.c
drivers/char/virtio-gl.c
drivers/input/input.c [changed mode: 0644->0755]
drivers/input/keyboard/atkbd.c [changed mode: 0644->0755]
drivers/maru/Kconfig
drivers/maru/Makefile
drivers/maru/maru_bl.c
drivers/maru/maru_codec.c
drivers/maru/maru_fb.c
drivers/maru/maru_fb.h
drivers/maru/maru_lcd.c
drivers/maru/maru_overlay.c
drivers/maru/maru_usb_touchscreen.c
drivers/maru/maru_virtio_esm.c
drivers/maru/maru_virtio_hwkey.c [new file with mode: 0644]
drivers/maru/maru_virtio_keyboard.c
include/linux/virtio_ids.h
package/changelog
package/pkginfo.manifest
ramfs/init

index 9e9dfe0bd68783dc470a6d0c68e7f7529b4f1ff0..2b774cddc96a7eff0ed135acb4ea3109eae21a33 100644 (file)
@@ -2769,6 +2769,7 @@ CONFIG_MARU_LCD=y
 CONFIG_MARU_CODEC=y
 CONFIG_MARU_TOUCHSCREEN=y
 CONFIG_MARU_VIRTIO_TOUCHSCREEN=y
+CONFIG_MARU_VIRTIO_HWKEY=y
 CONFIG_MARU_FB=y
 CONFIG_MARU_CAMERA=y
 CONFIG_MARU_BACKLIGHT=y
@@ -2803,9 +2804,16 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
-# CONFIG_EXT4_FS is not set
+CONFIG_EXT4_FS=y
+CONFIG_EXT4_USE_FOR_EXT23=y
+CONFIG_EXT4_FS_XATTR=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
+# CONFIG_EXT4_DEBUG is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
+CONFIG_JBD2=y
+# CONFIG_JBD2_DEBUG is not set
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
@@ -3250,7 +3258,7 @@ CONFIG_GENERIC_PCI_IOMAP=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_GENERIC_IO=y
 # CONFIG_CRC_CCITT is not set
-# CONFIG_CRC16 is not set
+CONFIG_CRC16=y
 CONFIG_CRC_T10DIF=y
 # CONFIG_CRC_ITU_T is not set
 CONFIG_CRC32=y
index def1402f7d438a41b3a605498a1f8e1bb80a85de..7b078b56f31e6cfb9e6c6dba98eca4e5b0d1be06 100755 (executable)
@@ -4,8 +4,8 @@
  * Copyright (c) 2009 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact:
+ * DongKyun Yun <dk77.yun@samsung.com>
  * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
- * DongKyun Yun
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -28,6 +28,7 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 
+#include <linux/types.h>
 #include <linux/kernel.h>      /* printk(), min() */
 #include <linux/slab.h>                /* kmalloc() */
 #include <linux/fs.h>          /* everything... */
@@ -37,6 +38,7 @@
 #include <linux/fcntl.h>
 #include <linux/poll.h>
 #include <linux/cdev.h>
+#include <linux/device.h>
 #include <linux/sched.h>
 #include <asm/uaccess.h>
 
@@ -104,6 +106,7 @@ module_param(vdpram_buffer, int, 0);
 static struct vdpram_dev *vdpram_devices;
 static struct buffer_t *buffer;
 static struct queue_t *queue;
+static struct class *vdpram_class;
 
 static int vdpram_fasync(int fd, struct file *filp, int mode);
 static int spacefree(struct vdpram_dev *dev);
@@ -580,52 +583,57 @@ long vdpram_ioctl(struct file* filp, unsigned int cmd, unsigned long arg)
  */
 static void vdpram_setup_cdev(struct vdpram_dev *dev, int index)
 {
-       int err, devno = vdpram_devno + index;
-       
-       if (index % 2 ==0) {
-               dev->flag = 1;
-               cdev_init(&dev->cdev, &vdpram_even_fops);
-               dev->cdev.owner = THIS_MODULE;
-               err = cdev_add (&dev->cdev, devno, 1);
-               dev->index = index;
-       }
-       else {
-               dev->flag = 0;
-               cdev_init(&dev->cdev, &vdpram_odd_fops);
-               dev->cdev.owner = THIS_MODULE;
-               err = cdev_add (&dev->cdev, devno, 1);
-               dev->index = index;
-       }
+       dev_t node = MKDEV(vdpram_major, index);
+       int err;
+       int is_odd = index & 1; // "index % 2" equivalent
+
+       dev->flag = !is_odd;
+       cdev_init(&dev->cdev, is_odd ? &vdpram_odd_fops : &vdpram_even_fops);
+       dev->cdev.owner = THIS_MODULE;
+       err = cdev_add (&dev->cdev, node, 1);
+       dev->index = index;
        
        /* Fail gracefully if need be */
        if (err)
-               printk(KERN_NOTICE "Error %d adding deive%d\n", err, index);
+               printk(KERN_NOTICE "Error %d adding device%d\n", err, index);
 }
 
+static char *vdpram_devnode(struct device *dev, umode_t *mode)
+{
+       return kasprintf(GFP_KERNEL, "%s", dev_name(dev));
+}
 
 /* Initialize the devs; return how many we did */
 int vdpram_init(void)
 {
        int i, result;
-//     dev_t dev;
        dev_t dev = MKDEV(vdpram_major, 0);
 
        printk("Initializing vdpram device driver ...\n");
        result = register_chrdev_region(dev, vdpram_nr_devs, "vdpram");
-//     result = alloc_chrdev_region(&dev, 0, vdpram_nr_devs, "vdpram");
        if (result < 0) {
                printk("Unable to get vdpram region, error %d\n", result);
-               return 0;
+               goto err_out;
        }
-//     vdpram_major = MAJOR( dev );
-       printk( " vdpram device major num = %d \n", vdpram_major );
+
+       printk("vdpram device major num = %d \n", vdpram_major);
        vdpram_devno = dev;
+
        vdpram_devices = kmalloc(vdpram_nr_devs * sizeof(struct vdpram_dev), GFP_KERNEL);
-       if (vdpram_devices == NULL) {
-               unregister_chrdev_region(dev, vdpram_nr_devs);
-               return 0;
+       buffer = kmalloc(vdpram_nr_devs * sizeof(struct buffer_t), GFP_KERNEL);
+       queue = kmalloc(vdpram_nr_devs * sizeof(struct queue_t), GFP_KERNEL);
+       if (!vdpram_devices || !buffer || !queue) {
+               result = -ENOMEM;
+               goto err_alloc;
+       }
+
+       vdpram_class = class_create(THIS_MODULE, "vdpram");
+       if (IS_ERR(vdpram_class)) {
+               result = PTR_ERR(vdpram_class);
+               goto err_alloc;
        }
+       vdpram_class->devnode = vdpram_devnode;
+
        memset(vdpram_devices, 0, vdpram_nr_devs * sizeof(struct vdpram_dev));
        for (i = 0; i < vdpram_nr_devs; i++) {
                if (i% 2 ==1) {
@@ -638,9 +646,7 @@ int vdpram_init(void)
                vdpram_setup_cdev(vdpram_devices + i, i);
        }
 
-       buffer = kmalloc(vdpram_nr_devs * sizeof(struct buffer_t) , GFP_KERNEL);
        memset(buffer, 0, vdpram_nr_devs * sizeof(struct buffer_t));
-       queue = kmalloc(vdpram_nr_devs * sizeof(struct queue_t) , GFP_KERNEL);
        // hwjang fix buffer -> queue
        memset(queue, 0, vdpram_nr_devs * sizeof(struct queue_t));
        for (i = 0; i < vdpram_nr_devs; i++) {
@@ -657,9 +663,23 @@ int vdpram_init(void)
 //printk("%s buffer[%x].begin      =%x\n", __FUNCTION__, i,  buffer[i].begin );
 //printk("%s buffer[%x].buffersize =%x\n", __FUNCTION__, i,  buffer[i].buffersize );
 //printk("%s buffer[%x].end        =%x\n", __FUNCTION__, i,  buffer[i].end );
-       } 
+       }
+
+       for (i = 0; i < vdpram_nr_devs; i++)
+               device_create(vdpram_class, NULL, MKDEV(vdpram_major, i), NULL,
+                             kasprintf(GFP_KERNEL, "vdpram%d", i));
 
        return 0;
+
+err_alloc:
+       kfree(vdpram_devices);
+       kfree(buffer);
+       kfree(queue);
+
+       unregister_chrdev_region(dev, vdpram_nr_devs);
+
+err_out:
+       return result;
 }
 
 /*
@@ -676,8 +696,10 @@ void vdpram_cleanup(void)
                return; /* nothing else to release */
 
        for (i = 0; i < vdpram_nr_devs; i++) {
+               device_destroy(vdpram_class, MKDEV(vdpram_major, i));
                cdev_del(&vdpram_devices[i].cdev);
        }
+       class_destroy(vdpram_class);
        kfree(vdpram_devices);
 
        for (i= 0;i < vdpram_nr_devs ; i++) {
index b71a2b50dccbc92bc25262ccf5288de0fdcc3c87..380940fbe1ef692937851d63d1b5e435e9de0dba 100755 (executable)
@@ -223,8 +223,7 @@ static int glmem_mmap(struct file *filp, struct vm_area_struct *vma)
        return 0;\r
 }\r
 \r
-// FIX ME : fsync parameter 2,3 parameter missing\r
-static int glmem_fsync(struct file *filp, int datasync)\r
+static int glmem_fsync(struct file *filp, loff_t start, loff_t end, int datasync)\r
 {\r
        struct virtio_gl_data *gldata = to_virtio_gl_data(filp);\r
 \r
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 1bd2a62f955d426c9bf753d3863b42442740cb07..6f959334ea812eaab56e81154d353ed68e98b003 100644 (file)
@@ -18,6 +18,10 @@ config MARU_VIRTIO_TOUCHSCREEN
        tristate "MARU Virtio Touchscreen Driver"
        depends on MARU != n
 
+config MARU_VIRTIO_HWKEY
+       tristate "MARU Virtio Hwkey Driver"
+       depends on MARU != n
+
 config MARU_FB
        tristate "MARU framebuffer driver"
        depends on MARU != n
index 6fac6dc1a6e14a4ceacce2a4e73439bd221c11b8..01700ce335f9f837f545f3e03b5ffa282d314839 100644 (file)
@@ -2,6 +2,7 @@ obj-$(CONFIG_MARU_LCD) += maru_lcd.o
 obj-$(CONFIG_MARU_CODEC) += maru_codec.o
 obj-$(CONFIG_MARU_TOUCHSCREEN) += maru_usb_touchscreen.o
 obj-$(CONFIG_MARU_VIRTIO_TOUCHSCREEN) += maru_virtio_touchscreen.o
+obj-$(CONFIG_MARU_VIRTIO_HWKEY) += maru_virtio_hwkey.o
 obj-$(CONFIG_MARU_FB) += maru_fb.o
 obj-$(CONFIG_MARU_CAMERA) += maru_camera.o
 obj-$(CONFIG_MARU_BACKLIGHT) += maru_bl.o
index 45979459ce0b5b8c961689b6b54b6f0ff3c936bc..c242dcd128e96f3dded4c1276b387d80a3566789 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * MARU Virtual Backlight Driver
  *
- * Copyright (c) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact:
  *  Jinhyung Jo <jinhyung.jo@samsung.com>
@@ -20,7 +20,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
 #include <linux/fb.h>
 #include <linux/backlight.h>
 
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 
-#define MARUBL_DRIVER_NAME "svb"
-#define PCI_DEVICE_ID_VIRTUAL_BRIGHTNESS       0x1014
+#define MARUBL_DRIVER_NAME                     "maru_backlight"
 
-static struct pci_device_id marubl_pci_table[] __devinitdata =
-{
+#define MIN_BRIGHTNESS 0
+#define MAX_BRIGHTNESS 100
+
+static struct pci_device_id marubl_pci_table[] __devinitdata = {
        {
                .vendor         = PCI_VENDOR_ID_TIZEN,
-               .device     = PCI_DEVICE_ID_VIRTUAL_BRIGHTNESS,
+               .device         = PCI_DEVICE_ID_VIRTUAL_BRIGHTNESS,
                .subvendor      = PCI_ANY_ID,
                .subdevice      = PCI_ANY_ID,
        },
@@ -56,18 +58,19 @@ MODULE_DEVICE_TABLE(pci, marubl_pci_table);
 
 /* MARU virtual brightness(backlight) device structure */
 struct marubl {
-       struct backlight_device *bl_dev;
-       unsigned int brightness;
-       resource_size_t reg_start, reg_size;
-       unsigned char __iomem *marubl_mmreg;    /* marubl: memory mapped registers */
+       struct backlight_device         *bl_dev;
+       unsigned int                    brightness;
+       resource_size_t                 reg_start, reg_size;
+       /* memory mapped registers */
+       unsigned char __iomem           *marubl_mmreg;
 };
 
-/* ============================================================================== */
+/* ========================================================================== */
 static struct marubl *marubl_device;
-/* ============================================================================== */
+/* ========================================================================== */
 
-static int min_brightness = 0;
-static int max_brightness = 100;
+static int min_brightness = MIN_BRIGHTNESS;
+static int max_brightness = MAX_BRIGHTNESS;
 
 static int marubl_get_intensity(struct backlight_device *bd)
 {
@@ -99,16 +102,16 @@ static int marubl_send_intensity(struct backlight_device *bd)
        return 0;
 }
 
-static struct backlight_ops marubl_ops = {
-       .options = BL_CORE_SUSPENDRESUME,
-       .get_brightness = marubl_get_intensity,
-       .update_status  = marubl_send_intensity,
+static const struct backlight_ops marubl_ops = {
+       .options        = BL_CORE_SUSPENDRESUME,
+       .get_brightness = marubl_get_intensity,
+       .update_status  = marubl_send_intensity,
 };
 
 /* pci probe function
 */
 static int __devinit marubl_probe(struct pci_dev *pci_dev,
-                       const struct pci_device_id *ent)
+                                 const struct pci_device_id *ent)
 {
        int ret;
        struct backlight_device *bd;
@@ -131,7 +134,7 @@ static int __devinit marubl_probe(struct pci_dev *pci_dev,
        }
 
        ret = -EIO;
-       
+
        /* 1 : IORESOURCE_MEM */
        marubl_device->reg_start = pci_resource_start(pci_dev, 1);
        marubl_device->reg_size  = pci_resource_len(pci_dev, 1);
@@ -145,9 +148,11 @@ static int __devinit marubl_probe(struct pci_dev *pci_dev,
        }
 
        /* memory areas mapped kernel space */
-       marubl_device->marubl_mmreg = ioremap(marubl_device->reg_start, marubl_device->reg_size);
+       marubl_device->marubl_mmreg = ioremap(marubl_device->reg_start,
+                                             marubl_device->reg_size);
        if (!marubl_device->marubl_mmreg) {
-               release_mem_region(marubl_device->reg_start, marubl_device->reg_size);
+               release_mem_region(marubl_device->reg_start,
+                                  marubl_device->reg_size);
                pci_disable_device(pci_dev);
                kfree(marubl_device);
                marubl_device = NULL;
@@ -164,24 +169,29 @@ static int __devinit marubl_probe(struct pci_dev *pci_dev,
        props.min_brightness = min_brightness;
        props.max_brightness = max_brightness;
        props.type = BACKLIGHT_PLATFORM;
-       bd = backlight_device_register ("emulator",     &pci_dev->dev, NULL, &marubl_ops, &props);
+       bd = backlight_device_register("emulator",
+                                      &pci_dev->dev,
+                                      NULL,
+                                      &marubl_ops,
+                                      &props);
        if (IS_ERR(bd)) {
                ret = PTR_ERR(bd);
                iounmap(marubl_device->marubl_mmreg);
-               release_mem_region(marubl_device->reg_start, marubl_device->reg_size);
+               release_mem_region(marubl_device->reg_start,
+                                  marubl_device->reg_size);
                pci_disable_device(pci_dev);
                kfree(marubl_device);
                marubl_device = NULL;
                return ret;
        }
 
-       bd->props.brightness = (unsigned int)readl(marubl_device->marubl_mmreg);;
+       bd->props.brightness = (unsigned int)readl(marubl_device->marubl_mmreg);
        bd->props.power = FB_BLANK_UNBLANK;
        backlight_update_status(bd);
 
        marubl_device->bl_dev = bd;
 
-       printk(KERN_INFO "marubl: MARU Virtual Backlight driver.\n");
+       printk(KERN_INFO "marubl: MARU Virtual Backlight driver is loaded.\n");
        return 0;
 }
 
@@ -212,13 +222,13 @@ static void __devexit marubl_exit(struct pci_dev *pcidev)
  * register pci driver
  */
 static struct pci_driver marubl_pci_driver = {
-       .name     = MARUBL_DRIVER_NAME,
-       .id_table = marubl_pci_table,
-       .probe    = marubl_probe,
-       .remove   = __devexit_p(marubl_exit),
+       .name           = MARUBL_DRIVER_NAME,
+       .id_table       = marubl_pci_table,
+       .probe          = marubl_probe,
+       .remove         = __devexit_p(marubl_exit),
 #ifdef CONFIG_PM
-       //.suspend  = marubl_suspend,
-       //.resume   = marubl_resume,
+       /* .suspend  = marubl_suspend, */
+       /* .resume   = marubl_resume, */
 #endif
 };
 
index 7e098219d97a3e85dd342b3ee1d9047e1a0b605f..04bbf7cfc765caa308604d5e60f0e03c626a1297 100644 (file)
@@ -4,8 +4,9 @@
  * Copyright (c) 2011-2012 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact:
- *  Kitae Kim <kt920.kim@samsung.com>
+ *  Kitae KIM <kt920.kim@samsung.com>
  *  SeokYeon Hwang <syeon.hwang@samsung.com>
+ *  DongKyun Yun <dk77.yun@samsung.com>
  *  YeongKyoon Lee <yeongkyoon.lee@samsung.com>
  *
  * This program is free software; you can redistribute it and/or
@@ -142,7 +143,7 @@ static long svcodec_ioctl(struct file *file,
        } else if (cmd == CODEC_CMD_GET_MMAP_OFFSET) {
                value = readl(svcodec->ioaddr + cmd);
                CODEC_LOG(KERN_DEBUG,
-                               "ioctl: get mmap offset: %d.\n", value);
+                               "ioctl: get mmap offset: %ld.\n", value);
        } else {
                CODEC_LOG(KERN_INFO,
                                "ioctl: no command available.\n");
index 1008aa453d7c2f90ffc92e1d0f932fe0923a1872..c1f8b84fd905a33349f5725a5df13058214b03f3 100644 (file)
@@ -5,9 +5,9 @@
  * Copyright (C) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact:
+ * Hyunjun Son <hj79.son@samsung.com>
  * GiWoong Kim <giwoong.kim@samsung.com>
  * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
- * Hyunjun Son
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
index a998aa359d582be65184cf6a5b67af883cb70cea..1f1cae5c4f9639781cb9691a488a10a61edfb25d 100644 (file)
@@ -5,9 +5,9 @@
  * Copyright (C) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact:
+ * Hyunjun Son <hj79.son@samsung.com>
  * GiWoong Kim <giwoong.kim@samsung.com>
  * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
- * Hyunjun Son
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
index f2c204839684060fe3f2dbdb09f0f764198e9563..46996ac3e5ea4118c488a588aaef68f3e0b721a7 100644 (file)
@@ -4,10 +4,9 @@
  * Copyright (c) 2011-2012 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact:
- *  Jinhyung Jo <jinhyung.jo@samsung.com>
+ *  Hyunjun Son <hj79.son@samsung.com>
+ *  DongKyun Yun <dk77.yun@samsung.com>
  *  YeongKyoon Lee <yeongkyoon.lee@samsung.com>
- *  Hyunjun Son
- *  DongKyun Yun
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -90,5 +89,5 @@ module_init(emul_lcd_class_init);
 module_exit(emul_lcd_class_exit);
 
 MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Jinhyung Jo <jinhyung.jo@samsung.com>");
+MODULE_AUTHOR("s-core");
 MODULE_DESCRIPTION("Emulator LCD driver for x86");
index 9ee2ac414d69106e0d56e0c874d5c9914d503a0c..a99764b39f8429720bec61122d7a4650be0d8bcb 100644 (file)
@@ -1,10 +1,11 @@
 /*
  * Maru Virtual Overlay Driver
  *
- * Copyright (c) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact:
  * Jinhyung Jo <jinhyung.jo@samsung.com>
+ * Yeongkyoon Lee <yeongkyoon.lee@samsung.com>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -19,7 +20,7 @@
  * 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.
+ * Boston, MA  02110-1301, USA.
  *
  * Contributors:
  * - S-Core Co., Ltd
@@ -533,7 +534,7 @@ static int __devinit svo_initdev(struct pci_dev *pci_dev,
                return ret;
        }
 
-       printk(KERN_INFO "svo: Tizen Virtual Overlay Driver v%d.%d\n",
+       printk(KERN_INFO "svo: MARU Virtual Overlay Driver v%d.%d is loaded\n",
                SVO_DRIVER_MAJORVERSION, SVO_DRIVER_MINORVERSION);
 
        return 0;
@@ -552,9 +553,6 @@ static struct pci_driver svo_pci_driver = {
 
 static int __init svo_init(void)
 {
-       printk(KERN_INFO "svo: Maru overlay driver version %d.%d loaded\n",
-               SVO_DRIVER_MAJORVERSION, SVO_DRIVER_MINORVERSION);
-
        return pci_register_driver(&svo_pci_driver);
 }
 
index 4d52d2585178bb23cadf0eab938cef3014dbb71e..578fdc645d40bfd6c0b974142cf012af041da23d 100644 (file)
@@ -6,6 +6,8 @@
  *
  * Contact: 
  *  GiWoong Kim <giwoong.kim@samsung.com>
+ *  HyunJun Son <hj79.son@samsung.com>
+ *  DongKyun Yun <dk77.yun@samsung.com>
  *  YeongKyoon Lee <yeongkyoon.lee@samsung.com>
  *
  * This program is free software; you can redistribute it and/or
index f2cb2d54b929b556f4b2697fb4b40b7bc4f4eb6a..27b6b88804dd202975f711ea82f04d34c9b010c4 100644 (file)
@@ -100,7 +100,7 @@ static ssize_t esm_read(struct file *f, char __user *buf, size_t len, loff_t *of
        return 0;
 }
 
-static ssize_t esm_write(struct inode *i, const char __user *ubuf, size_t len, loff_t *off)
+static ssize_t esm_write(struct file *f, const char __user *ubuf, size_t len, loff_t *off)
 {
        int err = 0;
        ssize_t ret = 0;
@@ -120,7 +120,11 @@ static ssize_t esm_write(struct inode *i, const char __user *ubuf, size_t len, l
        }
        buf[len - 1] = '\0';
 
-       kstrtou16(buf, 10, &vesm->progress.percentage);
+       ret = kstrtou16(buf, 10, &vesm->progress.percentage);
+       if (ret < 0) {
+               VESM_LOG(KERN_ERR, "failed to convert string to integer.\n");
+               return ret;
+       }
 
        VESM_LOG(KERN_DEBUG, "boot up progress is [%u] percent done.\n", vesm->progress.percentage);
 
diff --git a/drivers/maru/maru_virtio_hwkey.c b/drivers/maru/maru_virtio_hwkey.c
new file mode 100644 (file)
index 0000000..937f860
--- /dev/null
@@ -0,0 +1,287 @@
+/*
+ * Maru Virtio Hwkey Device Driver
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ *  Sungmin Ha <sungmin82.ha@samsung.com>
+ *  Sangjin Kim <sangjin3.kim@samsung.com>
+ *  YeongKyoon Lee <yeongkyoon.lee@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * 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.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/fs.h>
+#include <linux/input.h>
+#include <linux/miscdevice.h>
+#include <linux/slab.h>
+#include <linux/virtio.h>
+#include <linux/virtio_ids.h>
+#include <linux/virtio_config.h>
+#include <linux/kthread.h>
+
+MODULE_LICENSE("GPL2");
+MODULE_AUTHOR("Sungmin Ha <sungmin82.ha@samsung.com>");
+MODULE_DESCRIPTION("Emulator Virtio Hwkey driver");
+
+#define DEVICE_NAME "virtio-hwkey"
+
+/* This structure must match the qemu definitions */
+typedef struct EmulHwkeyEvent {
+    uint8_t event_type;
+    uint32_t keycode;
+} EmulHwkeyEvent;
+static EmulHwkeyEvent *event;
+
+typedef struct virtio_hwkey
+{
+    struct virtio_device *vdev;
+    struct virtqueue *vq;
+    struct input_dev *idev;
+} virtio_hwkey;
+virtio_hwkey *vh;
+
+static struct virtio_device_id id_table[] = {
+    { VIRTIO_ID_HWKEY, VIRTIO_DEV_ANY_ID },
+    { 0 },
+};
+
+#define MAX_BUF_COUNT 10
+static struct scatterlist sg[MAX_BUF_COUNT];
+static EmulHwkeyEvent vbuf[MAX_BUF_COUNT];
+
+/* keep it consistent with emulator-skin definition */
+enum {  
+    KEY_PRESSED = 1,
+    KEY_RELEASED = 2,
+};
+
+static int err = 0;
+static unsigned int len = 0; /* not used */
+static unsigned int index = 0;
+static unsigned int recv_index = 0;
+
+/**
+* @brief : callback for virtqueue
+*/
+static void vq_hwkey_callback(struct virtqueue *vq)
+{
+#if 0
+    printk(KERN_INFO "vq hwkey callback\n");
+#endif
+
+    recv_index = (unsigned int)virtqueue_get_buf(vh->vq, &len);
+    if (recv_index == 0) {
+        printk(KERN_ERR "failed to get buffer\n");
+        return;
+    }
+
+    do {
+        event = &vbuf[recv_index - 1];
+#if 0
+        printk(KERN_INFO "hwkey event_type=%d, keycodey=%d, recv_index=%d\n",
+            event->event_type, event->keycode, recv_index);
+#endif
+        if (event->event_type == KEY_PRESSED) { /* pressed */
+          input_event(vh->idev, EV_KEY, event->keycode, true);
+        }
+        else if (event->event_type == KEY_RELEASED) { /* released */
+          input_event(vh->idev, EV_KEY, event->keycode, false);
+        }
+        else {
+          printk(KERN_ERR "Unknown event type\n");
+          return;
+        }
+
+        input_sync(vh->idev);
+
+        /* expose buffer to other end */
+        err = virtqueue_add_buf(vh->vq, sg, 0,
+            recv_index, (void *)recv_index, GFP_ATOMIC);
+
+        if (err < 0) {
+            printk(KERN_ERR "failed to add buffer!\n");
+        }
+
+        recv_index = (unsigned int)virtqueue_get_buf(vh->vq, &len);
+        if (recv_index == 0) {
+            break;
+        }
+    } while(true);
+
+    virtqueue_kick(vh->vq);
+}
+
+static int virtio_hwkey_open(struct inode *inode, struct file *file)
+{
+    printk(KERN_INFO "virtio hwkey device is opened\n");
+    return 0;
+}
+
+static int virtio_hwkey_release(struct inode *inode, struct file *file)
+{
+    printk(KERN_INFO "virtio hwkey device is closed\n");
+    return 0;
+}
+
+static int input_hwkey_open(struct input_dev *dev)
+{
+    printk(KERN_INFO "input hwkey device is opened\n");
+    return 0;
+}
+
+static void input_hwkey_close(struct input_dev *dev)
+{
+    printk(KERN_INFO "input hwkey device is closed\n");
+}
+
+struct file_operations virtio_hwkey_fops = {
+    .owner   = THIS_MODULE,
+    .open    = virtio_hwkey_open,
+    .release = virtio_hwkey_release,
+};
+
+static int virtio_hwkey_probe(struct virtio_device *vdev)
+{
+    int ret = 0;
+
+    printk(KERN_INFO "virtio hwkey driver is probed\n");
+
+    /* init virtio */
+    vdev->priv = vh = kmalloc(sizeof(*vh), GFP_KERNEL);
+    if (!vh) {
+        return -ENOMEM;
+    }
+
+    vh->vdev = vdev;
+
+    vh->vq = virtio_find_single_vq(vh->vdev,
+        vq_hwkey_callback, "virtio-hwkey-vq");
+    if (IS_ERR(vh->vq)) {
+        ret = PTR_ERR(vh->vq);
+
+        kfree(vh);
+        vdev->priv = NULL;
+        return ret;
+    }
+
+    /* enable callback */
+    virtqueue_enable_cb(vh->vq);
+
+    sg_init_table(sg, MAX_BUF_COUNT);
+
+    /* prepare the buffers */
+    for (index = 0; index < MAX_BUF_COUNT; index++) {
+        sg_set_buf(&sg[index], &vbuf[index], sizeof(EmulHwkeyEvent));
+
+        err = virtqueue_add_buf(vh->vq, sg, 0,
+            index + 1, (void *)index + 1, GFP_ATOMIC);
+
+        if (err < 0) {
+            printk(KERN_ERR "failed to add buffer\n");
+
+            kfree(vh);
+            vdev->priv = NULL;
+            return ret;
+        }
+    }
+
+    /* register for input device */
+    vh->idev = input_allocate_device();
+    if (!vh->idev) {
+        printk(KERN_ERR "failed to allocate a input hwkey device\n");
+        ret = -1;
+
+        kfree(vh);
+        vdev->priv = NULL;
+        return ret;
+    }
+
+    vh->idev->name = "Maru Virtio Hwkey";
+    vh->idev->dev.parent = &(vdev->dev);
+
+    input_set_drvdata(vh->idev, vh);
+    vh->idev->open = input_hwkey_open;
+    vh->idev->close = input_hwkey_close;
+
+    vh->idev->evbit[0] = BIT_MASK(EV_KEY);
+    /* to support any keycode */
+    memset(vh->idev->keybit, 0xffffffff, sizeof(unsigned long) * BITS_TO_LONGS(KEY_CNT));
+
+    ret = input_register_device(vh->idev);
+    if (ret) {
+        printk(KERN_ERR "input hwkey driver cannot registered\n");
+        ret = -1;
+
+        input_free_device(vh->idev);
+        kfree(vh);
+        vdev->priv = NULL;
+        return ret;
+    }
+
+    virtqueue_kick(vh->vq);
+    index = 0;
+
+    return 0;
+}
+
+static void __devexit virtio_hwkey_remove(struct virtio_device *vdev)
+{
+    virtio_hwkey *vhk = NULL;
+
+    printk(KERN_INFO "virtio hwkey driver is removed\n");
+
+    vhk = vdev->priv;
+
+    vdev->config->reset(vdev); /* reset device */
+    vdev->config->del_vqs(vdev); /* clean up the queues */
+
+    input_unregister_device(vhk->idev);
+
+    kfree(vhk);
+}
+
+MODULE_DEVICE_TABLE(virtio, id_table);
+
+static struct virtio_driver virtio_hwkey_driver = {
+    .driver.name = KBUILD_MODNAME,
+    .driver.owner = THIS_MODULE,
+    .id_table = id_table,
+    .probe = virtio_hwkey_probe,
+    .remove = __devexit_p(virtio_hwkey_remove),
+};
+
+static int __init virtio_hwkey_init(void)
+{
+    printk(KERN_INFO "virtio hwkey device is initialized\n");
+    return register_virtio_driver(&virtio_hwkey_driver);
+}
+
+static void __exit virtio_hwkey_exit(void)
+{
+    printk(KERN_INFO "virtio hwkey device is destroyed\n");
+    unregister_virtio_driver(&virtio_hwkey_driver);
+}
+
+module_init(virtio_hwkey_init);
+module_exit(virtio_hwkey_exit);
+
index 15af27a70cbc7419cb32d1cbe5d166d237b41612..be2f68d925ff5075e47f8ec215d560ddaf3efbb0 100644 (file)
@@ -175,7 +175,7 @@ static int virtio_keyboard_probe(struct virtio_device *vdev)
                                sizeof(struct EmulKbdEvent));
        }
 
-       ret = virtqueue_add_buf(vkbd->vq, &vkbd->sg, 0, 10, (void *)(10), GFP_ATOMIC);
+       ret = virtqueue_add_buf(vkbd->vq, vkbd->sg, 0, 10, (void *)(10), GFP_ATOMIC);
        if (ret < 0) {
                VKBD_LOG(KERN_ERR, "failed to add buffer to virtqueue.\n");
                kfree(vkbd);
index 96975a785b1a1ba3db275bc0a38e17faf4cc6423..f401735b2e331c2f565302ddcfe6dd33f35743f0 100644 (file)
@@ -44,6 +44,7 @@
 #define VIRTIO_ID_TOUCHSCREEN  11 /* virtio touchscreen */
 #define VIRTIO_ID_KEYBOARD     12 /* virtio keyboard */
 #define VIRTIO_ID_ESM          13 /* virtio ESM */
+#define VIRTIO_ID_HWKEY                14 /* virtio hwkey */
 #endif
 
 #endif /* _LINUX_VIRTIO_IDS_H */
index 0af2ad33abdc77a9bd9d7d579b85be4a76dffbf4..1e034332b0c9614c1ff2985a0b1425d05fac4946 100644 (file)
@@ -1,3 +1,57 @@
-* 2.0.0
-- Tizen 2.0 release.
-== Kitae Kim <kt920.kim@samsung.com> 2013-01-11
+* 1.4.17
+- added virtio hwkey driver and improved hwkey mapping
+== Sungmin Ha <sungmin82.ha@samsung.com> 2013-03-20
+* 1.4.15
+- source clean-up for overlay and backlight module.
+== Kitae Kim <kt920.kim@samsung.com> 2013-03-08
+* 1.4.14
+- enable BLK_DEV_CRYPTOLOOP.
+== Kitae Kim <kt920.kim@samsung.com> 2013-02-01
+* 1.4.13
+- modified block device name for sdcard
+== Sungmin Ha <sungmin82.ha@samsung.com> 2013-01-21
+* 1.4.12
+- Fixed a bug does not close when the device has been shut down with no streaming data.
+== Jinhyung Jo <jinhyung.jo@samsung.com> 2013-01-14
+* 1.4.11
+- Fixed a bug when audio some codecs are decoded simultaneously.
+- Source cleanup and codec driver can get and set offset of device memory for audio type.
+== Kitae Kim <kt920.kim@samsung.com> 2012-12-18
+* 1.4.10
+- Added virtio-esm driver.
+- This driver is for displaying boot status of emulator.
+== Kitae Kim <kt920.kim@samsung.com> 2012-12-17
+* 1.4.4
+- Modified touchscreen range
+== GiWoong Kim <giwoong.kim@samsung.com> 2012-11-27
+* 1.4.3
+- Removed an invalid symbolic-link in init script
+- touchscreen0, keyboard0, smotion node
+== GiWoong Kim <giwoong.kim@samsung.com> 2012-11-12
+* 1.4.2
+- Do not ignore a touch event on emulator
+- The current touch event may be same as the previous coordinate data.
+== GiWoong Kim <giwoong.kim@samsung.com> 2012-10-23
+* 1.4.0
+- Merge develop into release branch.
+- Some features or bug fixes are merged from develop.
+== Kitae Kim <kt920.kim@samsung.com> 2012-11-02
+* 1.3.24
+- The range of brightness level has been changed.(1 ~ 24 => 0 ~ 100)
+== Jinhyung.jo <jinhyung.jo@samsung.com> 2012-10-31
+* 1.3.23
+- Modify dibs build script for arm package.
+- Since arm toolchain has been installed on build environment, kernel source can support arm package.
+== Kitae Kim <kt920.kim@samsung.com> 2012-10-31
+* 1.3.22
+- Merge tizen_arm branch into develop branch.
+- Merge arm kernel source for emulator into x86 kernel source.
+== Kitae Kim <kt920.kim@samsung.com> 2012-10-30
+* 1.3.20
+- Change kernel keycode of KEY_MENU.
+- Since X key mapping has been changed, kernel keycode has to be changed.
+== GiWoong Kim <giwoong.kim@samsung.com> 2012-10-23
+* 1.3.19
+- Enable devtmpfs config.
+- Since udev module has been updated kernel need to enable devtmfs config.
+== Kitae Kim <kt920.kim@samsung.com> 2012-10-23
index b3d1688a8e6641540952626fdf1feb42f8a7f723..11f9e0c4c06a62673674fb10fc08d479046a5064 100644 (file)
@@ -1,7 +1,13 @@
-Package: emulator-kernel-x86
-Version: 2.0.0 
-Maintainer: Yeong-Kyoon Lee <yeongkyoon.lee@samsung.com>
+Version: 1.4.17
+Maintainer: Yeong-Kyoon, Lee <yeongkyoon.lee@samsung.com>
 Source: emulator-kernel
+
+Package: emulator-kernel-x86
 OS: ubuntu-32, ubuntu-64, windows-32, windows-64, macos-64
 Build-host-os: ubuntu-32
 Description: Tizen x86 Emulator Kernel
+
+#Package: emulator-kernel-arm
+#OS: ubuntu-32, ubuntu-64, windows-32, windows-64, macos-64
+#Build-host-os: ubuntu-32
+#Description: Tizen ARM Emulator Kernel
index 7c7f5b3d2269ce4e42aa8c74b2466ad1f2cbb838..8f14404fe4efe1c7af3af1d64985d6eee5bc4a13 100644 (file)
@@ -50,134 +50,9 @@ echo "create device filesystem"
 
 # create device filesystem
 /bin/mkdir -p /new_root/dev
-/bin/mount -t ramfs ramfs /new_root/dev
-
-/bin/mknod /new_root/dev/ram0 c 1 0
-/bin/mknod /new_root/dev/mem c 1 1
-/bin/mknod /new_root/dev/kmem c 1 2
-/bin/mknod /new_root/dev/null c 1 3
-/bin/mknod /new_root/dev/zero c 1 5
-/bin/mknod /new_root/dev/random c 1 8
-/bin/mknod /new_root/dev/urandom c 1 9
-
-#/bin/mknod /new_root/dev/hda b 3 0
-#/bin/mknod /new_root/dev/hdb b 3 64
-
-#filesystem in userspace
-/bin/mknod /new_root/dev/fuse c 10 229
-
-/bin/mknod /new_root/dev/tty0 c 4 0
-/bin/mknod /new_root/dev/tty1 c 4 1
-/bin/mknod /new_root/dev/tty2 c 4 2
-/bin/mknod /new_root/dev/tty3 c 4 3
-/bin/mknod /new_root/dev/tty4 c 4 4
-/bin/mknod /new_root/dev/tty5 c 4 5
-/bin/mknod /new_root/dev/tty6 c 4 6
-/bin/mknod /new_root/dev/tty7 c 4 7
-
-/bin/mknod /new_root/dev/ttyS0 c 4 64
-/bin/mknod /new_root/dev/ttyS1 c 4 65
-/bin/mknod /new_root/dev/ttyS2 c 4 66
-
-/bin/mknod /new_root/dev/tty c 5 0
-/bin/mknod /new_root/dev/console c 5 1
-/bin/mknod /new_root/dev/ptmx c 5 2
-
-/bin/mknod /new_root/dev/sda b 8 0
-/bin/mknod /new_root/dev/sda1 b 8 1
-
-#/bin/mknod /new_root/dev/log_radio c 10 60
-#/bin/mknod /new_root/dev/log_events c 10 61
-#/bin/mknod /new_root/dev/log_main c 10 62
-#/bin/mknod /new_root/dev/log_system c 10 59
-
-/bin/mkdir -p /new_root/dev/input
-/bin/mknod /new_root/dev/input/mouse0 c 13 32
-/bin/mknod /new_root/dev/input/mouse1 c 13 33
-/bin/mknod /new_root/dev/input/event0 c 13 64
-/bin/mknod /new_root/dev/input/event1 c 13 65
-/bin/mknod /new_root/dev/input/event2 c 13 66
-/bin/mknod /new_root/dev/input/event3 c 13 67
-/bin/mknod /new_root/dev/input/event4 c 13 68
-#(cd /new_root/dev/input && /bin/ln -s event1 touchscreen0)
-#(cd /new_root/dev/input && /bin/ln -s event2 keyboard0)
-#(cd /new_root/dev && /bin/ln -s input/event3 smotion)
-
-/bin/mknod /new_root/dev/mixer c 14 0
-/bin/mknod /new_root/dev/sequencer c 14 1
-/bin/mknod /new_root/dev/midi00 c 14 2
-/bin/mknod /new_root/dev/dsp c 14 3
-/bin/mknod /new_root/dev/sndstat c 14 6
-/bin/mknod /new_root/dev/mixer1 c 14 16
-/bin/mknod /new_root/dev/midi01 c 14 18
-/bin/mknod /new_root/dev/dsp1 c 14 19
-/bin/mknod /new_root/dev/mixer2 c 14 32
-/bin/mknod /new_root/dev/midi02 c 14 34
-/bin/mknod /new_root/dev/dsp2 c 14 35
-/bin/mknod /new_root/dev/mixer3 c 14 48
-/bin/mknod /new_root/dev/midi03 c 14 50
-/bin/mknod /new_root/dev/dsp3 c 14 51
-
-/bin/mknod /new_root/dev/hdc b 22 0
-/bin/mknod /new_root/dev/hdd b 22 64
-
-/bin/mknod /new_root/dev/fb0 c 29 0
-/bin/mknod /new_root/dev/fb1 c 29 1
-/bin/mknod /new_root/dev/fb2 c 29 2
-/bin/mknod /new_root/dev/fb3 c 29 3
-
-/bin/mknod /new_root/dev/mtdblock0 b 31 0
-/bin/mknod /new_root/dev/mtdblock1 b 31 1
-/bin/mknod /new_root/dev/mtdblock2 b 31 2
-/bin/mknod /new_root/dev/mtdblock3 b 31 3
-/bin/mknod /new_root/dev/mtdblock4 b 31 4
-
-/bin/mknod /new_root/dev/video0 c 81 0
-/bin/mknod /new_root/dev/video1 c 81 1
-/bin/mknod /new_root/dev/video2 c 81 2
-
-/bin/mknod /new_root/dev/mtd0 b 90 0
-/bin/mknod /new_root/dev/mtd1 b 90 2
-/bin/mknod /new_root/dev/mtd2 b 90 4
-/bin/mknod /new_root/dev/mtd3 b 90 6
-/bin/mknod /new_root/dev/mtd4 b 90 8
-
-/bin/mknod /new_root/dev/ttygs c 127 0
-
-/bin/mkdir -p /new_root/dev/pts
-/bin/mknod /new_root/dev/pts/0 c 136 0
-/bin/mknod /new_root/dev/pts/1 c 136 1
-/bin/mknod /new_root/dev/pts/2 c 136 2
-/bin/mknod /new_root/dev/pts/3 c 136 3
-/bin/mknod /new_root/dev/pts/4 c 136 4
-
-/bin/mkdir -p /new_root/dev/dpram
-/bin/mknod /new_root/dev/dpram/0 c 249 0
-/bin/mknod /new_root/dev/vdpram1 c 249 1
-
-/bin/mkdir -p /new_root/dev/input
-
-# commented out by caramis...
-#/bin/mkdir -p /new_root/dev/snd 
-#/bin/mknod -m 660 /new_root/dev/snd/controlC0 c 116 7 
-#/bin/mknod -m 660 /new_root/dev/snd/pcmC0D0c c 116 6 
-#/bin/mknod -m 660 /new_root/dev/snd/pcmC0D0p c 116 5 
-#/bin/mknod -m 660 /new_root/dev/snd/pcmC0D1p c 116 4 
-#/bin/mknod -m 660 /new_root/dev/snd/timer c 116 2
-
-/bin/mknod /new_root/dev/vda b 254 0
-/bin/mknod /new_root/dev/vdb b 254 16
-(cd /new_root/dev && /bin/ln -sf vdb mmcblk0)
-(cd /new_root/dev && /bin/ln -sf vdb1 mmcblk0p1)
-(cd /new_root/dev && /bin/ln -sf vdb2 mmcblk0p2)
-(cd /new_root/dev && /bin/ln -sf vdb3 mmcblk0p3)
-
-#echo "Create sys"
+/bin/mount -t devtmpfs devtmpfs /new_root/dev
 /bin/mkdir -p /new_root/sys
 
-#/bin/mknod /new_root/dev/opengl c 240 0
-
-
 >${CONSOLE} <${CONSOLE} 2>&1
 
 echo "Switching root"