linux-openmoko recipes cleanup
Hi,
I would like to clean linux-openmoko recipes a bit
(as I'm also responsible for this mess by adding -shr-devel, -shr-drm-devel and all 2.6.3*).
There are:
linux-openmoko-2.6.24_git (old stable)
linux-openmoko-2.6.28_git (stable branch)
linux-openmoko-devel_git (andy-tracking branch with old SRCREV) linux-openmoko-shr-devel_git (andy-tracking branch with few extra patches and newer SRCREV) linux-openmoko-shr-drm-devel_git (andy-tracking branch like shr-devel + DRM patches and WSOD on resume) linux-openmoko-2.6.31_git (om-gta02-2.6.31 branch + DRM patches and WSOD on resume) linux-openmoko-2.6.32_git (om-gta02-2.6.32 branch + DRM patches and WSOD on resume fixed in newer revisions) linux-openmoko-2.6.34_git (om-gta02-2.6.34 branch + DRM patches and WSOD on resume fixed)
I propose to drop not much usable linux-openmoko-shr-drm-devel_git and linux-openmoko-2.6.31_git. Merge linux-openmoko-devel_git linux-openmoko-shr-devel_git to linux-openmoko-2.6.29 (andy-tracking is based on 2.6.29-rc3).
Rename all recipes to PN_PV scheme ie linux-openmoko_2.6.34.bb (many git recipes doesn't have _git.bb too).
Update for machine configs is part of 3rd patch. I don't think there is many users of those old recipes so if nobody NACKs I'll push it tomorrow.
Regards,
PATCH 1/3 linux-openmoko: drop 2.6.31 and shr-drm-devel (2.6.29-rc3+drm patches) version
* 2.6.32 version is superior in all aspects
* this versions have WSOD issue on every resume (so not as usable as 2.6.32 where it's fixed)
--- .../0001-DRM-for-platform-devices.patch | 458 --- .../0001-gta02_defconfig-Enable-GLAMO_DRM.patch | 37 - ...build-with-gcc-4.4.2-which-works-ok-with-.patch | 27 - .../0002-Glamo-DRM-and-KMS-driver.patch | 3818 -------------------- .../0003-Work-on-Glamo-core-for-DRM.patch | 252 -- .../0004-Add-JBT6k74-hook-for-use-by-KMS.patch | 49 - .../0004-gta02_defconfig-Enable-UBI-support.patch | 67 - .../0005-gta02_defconfig-Enable-UBI-debug.patch | 88 - ...a02-defconfig-enable-NFS-and-INOTIFY_USER.patch | 124 - ...a02_defconfig-disable-LEDS_GTA02_VIBRATOR.patch | 25 - recipes/linux/linux-openmoko-2.6.31_git.bb | 38 - .../0001-Add-drm-to-Makefile-version.patch | 25 - ...efconfig-start-from-gta02_packaging_defco.patch | 129 - .../0005-Enable-DRM-and-MFD_GLAMO_DRM.patch | 51 - ...06-Enable-I2C_ALGOBIT-from-make-oldconfig.patch | 33 - .../0007-Enable-UBI-UBIFS.patch | 81 - .../linux-openmoko-shr-drm-devel/fix-install.patch | 23 - recipes/linux/linux-openmoko-shr-drm-devel_git.bb | 31 - 18 files changed, 0 insertions(+), 5356 deletions(-) delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0001-DRM-for-platform-devices.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0001-gta02_defconfig-Enable-GLAMO_DRM.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0001-wm8753-fix-build-with-gcc-4.4.2-which-works-ok-with-.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0002-Glamo-DRM-and-KMS-driver.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0003-Work-on-Glamo-core-for-DRM.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0004-Add-JBT6k74-hook-for-use-by-KMS.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0004-gta02_defconfig-Enable-UBI-support.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0005-gta02_defconfig-Enable-UBI-debug.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0006-gta02-defconfig-enable-NFS-and-INOTIFY_USER.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0007-gta02_defconfig-disable-LEDS_GTA02_VIBRATOR.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31_git.bb delete mode 100644 recipes/linux/linux-openmoko-shr-drm-devel/0001-Add-drm-to-Makefile-version.patch delete mode 100644 recipes/linux/linux-openmoko-shr-drm-devel/0004-gta02_drm_defconfig-start-from-gta02_packaging_defco.patch delete mode 100644 recipes/linux/linux-openmoko-shr-drm-devel/0005-Enable-DRM-and-MFD_GLAMO_DRM.patch delete mode 100644 recipes/linux/linux-openmoko-shr-drm-devel/0006-Enable-I2C_ALGOBIT-from-make-oldconfig.patch delete mode 100644 recipes/linux/linux-openmoko-shr-drm-devel/0007-Enable-UBI-UBIFS.patch delete mode 100644 recipes/linux/linux-openmoko-shr-drm-devel/fix-install.patch delete mode 100644 recipes/linux/linux-openmoko-shr-drm-devel_git.bb
recipes/linux/linux-openmoko-2.6.31/0001-DRM-for-platform-devices.patch deleted +0 -458
@@ -1,458 +0,0 @@ -From da270cf61e67d912b38e314719511efc4c2ea085 Mon Sep 17 00:00:00 2001 -From: Thomas White <[email protected]> -Date: Tue, 20 Oct 2009 15:52:30 +0200 -Subject: [PATCH 1/4] DRM for platform devices - -This modifies the DRM core in a small number of places to allow platform -devices to be used for direct rendering, alongside PCI devices. - -Signed-off-by: Thomas White <[email protected]> ---- - drivers/gpu/drm/Kconfig | 2 +- - drivers/gpu/drm/drm_bufs.c | 2 +- - drivers/gpu/drm/drm_drv.c | 27 ++++++++++ - drivers/gpu/drm/drm_info.c | 27 ++++++++-- - drivers/gpu/drm/drm_ioctl.c | 118 ++++++++++++++++++++++++++++++------------- - drivers/gpu/drm/drm_stub.c | 76 +++++++++++++++++++++++++++- - drivers/gpu/drm/drm_sysfs.c | 6 ++- - include/drm/drmP.h | 13 +++++ - 8 files changed, 224 insertions(+), 47 deletions(-) - -diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig -index 39b393d..cef3d2c 100644 ---- a/drivers/gpu/drm/Kconfig -+++ b/drivers/gpu/drm/Kconfig -@@ -6,7 +6,7 @@ - # - menuconfig DRM - tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)" -- depends on (AGP || AGP=n) && PCI && !EMULATED_CMPXCHG && MMU -+ depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && MMU - select I2C - select I2C_ALGOBIT - help -diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c -index 6246e3f..b9f15bf 100644 ---- a/drivers/gpu/drm/drm_bufs.c -+++ b/drivers/gpu/drm/drm_bufs.c -@@ -188,7 +188,7 @@ static int drm_addmap_core(struct drm_device * dev, resource_size_t offset, - switch (map->type) { - case _DRM_REGISTERS: - case _DRM_FRAME_BUFFER: --#if !defined(__sparc__) && !defined(__alpha__) && !defined(__ia64__) && !defined(__powerpc64__) && !defined(__x86_64__) -+#if !defined(__sparc__) && !defined(__alpha__) && !defined(__ia64__) && !defined(__powerpc64__) && !defined(__x86_64__) && !defined(__arm__) - if (map->offset + (map->size-1) < map->offset || - map->offset < virt_to_phys(high_memory)) { - kfree(map); -diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c -index b39d7bf..a7861e8 100644 ---- a/drivers/gpu/drm/drm_drv.c -+++ b/drivers/gpu/drm/drm_drv.c -@@ -247,6 +247,7 @@ int drm_lastclose(struct drm_device * dev) - */ - int drm_init(struct drm_driver *driver) - { -+#ifdef CONFIG_PCI - struct pci_dev *pdev = NULL; - const struct pci_device_id *pid; - int i; -@@ -280,11 +281,37 @@ int drm_init(struct drm_driver *driver) - drm_get_dev(pdev, pid, driver); - } - } -+#endif - return 0; - } - - EXPORT_SYMBOL(drm_init); - -+/** -+ * Call this to associate a drm_driver with a platform_device. -+ * -+ * \return zero on success or a negative number on failure. -+ * -+ * This is a replacement for drm_init(), but for platform drivers. -+ * In this case, the caller must provide the matching platform_device -+ * -+ * since there is no physical bus to scan through. -+ * -+ * \sa drm_init -+ * -+ */ -+int drm_platform_init(struct drm_driver *driver, struct platform_device *pdev, -+ void *priv) -+{ -+ DRM_DEBUG("\n"); -+ -+ INIT_LIST_HEAD(&driver->device_list); -+ -+ return drm_get_platform_dev(pdev, driver, priv); -+} -+ -+EXPORT_SYMBOL(drm_platform_init); -+ - void drm_exit(struct drm_driver *driver) - { - struct drm_device *dev, *tmp; -diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c -index f0f6c6b..838c2ee 100644 ---- a/drivers/gpu/drm/drm_info.c -+++ b/drivers/gpu/drm/drm_info.c -@@ -52,12 +52,28 @@ int drm_name_info(struct seq_file *m, void *data) - return 0; - - if (master->unique) { -- seq_printf(m, "%s %s %s\n", -- dev->driver->pci_driver.name, -- pci_name(dev->pdev), master->unique); -+ -+ if (drm_core_is_platform(dev)) { -+ seq_printf(m, "%s %s %s\n", -+ dev->driver->name, -+ dev_name(&dev->platform_dev->dev), -+ master->unique); -+ } else { -+ seq_printf(m, "%s %s %s\n", -+ dev->driver->pci_driver.name, -+ pci_name(dev->pdev), master->unique); -+ } -+ - } else { -- seq_printf(m, "%s %s\n", dev->driver->pci_driver.name, -- pci_name(dev->pdev)); -+ -+ if (drm_core_is_platform(dev)) { -+ seq_printf(m, "%s %s\n", dev->driver->name, -+ dev_name(&dev->platform_dev->dev)); -+ } else { -+ seq_printf(m, "%s %s\n", dev->driver->pci_driver.name, -+ pci_name(dev->pdev)); -+ } -+ - } - - return 0; -@@ -325,4 +341,3 @@ int drm_vma_info(struct seq_file *m, void *data) - } - - #endif -- -diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c -index 9b9ff46..133ef29 100644 ---- a/drivers/gpu/drm/drm_ioctl.c -+++ b/drivers/gpu/drm/drm_ioctl.c -@@ -83,7 +83,6 @@ int drm_setunique(struct drm_device *dev, void *data, - { - struct drm_unique *u = data; - struct drm_master *master = file_priv->master; -- int domain, bus, slot, func, ret; - - if (master->unique_len || master->unique) - return -EBUSY; -@@ -101,28 +100,46 @@ int drm_setunique(struct drm_device *dev, void *data, - - master->unique[master->unique_len] = '\0'; - -- dev->devname = kmalloc(strlen(dev->driver->pci_driver.name) + -- strlen(master->unique) + 2, GFP_KERNEL); -- if (!dev->devname) -- return -ENOMEM; -+ if ( !drm_core_is_platform(dev) ) { - -- sprintf(dev->devname, "%s@%s", dev->driver->pci_driver.name, -- master->unique); -+ int domain, bus, slot, func, ret; - -- /* Return error if the busid submitted doesn't match the device's actual -- * busid. -- */ -- ret = sscanf(master->unique, "PCI:%d:%d:%d", &bus, &slot, &func); -- if (ret != 3) -- return -EINVAL; -- domain = bus >> 8; -- bus &= 0xff; -+ /* PCI device */ -+ dev->devname = kmalloc(strlen(dev->driver->pci_driver.name) + -+ strlen(master->unique) + 2, GFP_KERNEL); -+ if (!dev->devname) -+ return -ENOMEM; - -- if ((domain != drm_get_pci_domain(dev)) || -- (bus != dev->pdev->bus->number) || -- (slot != PCI_SLOT(dev->pdev->devfn)) || -- (func != PCI_FUNC(dev->pdev->devfn))) -- return -EINVAL; -+ sprintf(dev->devname, "%s@%s", dev->driver->pci_driver.name, -+ master->unique); -+ -+ /* Return error if the busid submitted doesn't match the -+ * device's actual busid. -+ */ -+ ret = sscanf(master->unique, "PCI:%d:%d:%d", &bus, &slot, &func); -+ if (ret != 3) -+ return -EINVAL; -+ domain = bus >> 8; -+ bus &= 0xff; -+ -+ if ((domain != drm_get_pci_domain(dev)) || -+ (bus != dev->pdev->bus->number) || -+ (slot != PCI_SLOT(dev->pdev->devfn)) || -+ (func != PCI_FUNC(dev->pdev->devfn))) -+ return -EINVAL; -+ -+ } else { -+ -+ /* Platform device */ -+ dev->devname = kmalloc(strlen(dev->driver->name) + -+ strlen(master->unique) + 2, GFP_KERNEL); -+ if (!dev->devname) -+ return -ENOMEM; -+ -+ sprintf(dev->devname, "%s@%s", dev->driver->name, -+ master->unique); -+ -+ } - - return 0; - } -@@ -141,23 +158,52 @@ static int drm_set_busid(struct drm_device *dev, struct drm_file *file_priv) - if (master->unique == NULL) - return -ENOMEM; - -- len = snprintf(master->unique, master->unique_len, "pci:%04x:%02x:%02x.%d", -- drm_get_pci_domain(dev), -- dev->pdev->bus->number, -- PCI_SLOT(dev->pdev->devfn), -- PCI_FUNC(dev->pdev->devfn)); -- if (len >= master->unique_len) -- DRM_ERROR("buffer overflow"); -- else -- master->unique_len = len; -- -- dev->devname = kmalloc(strlen(dev->driver->pci_driver.name) + -- master->unique_len + 2, GFP_KERNEL); -- if (dev->devname == NULL) -- return -ENOMEM; -+ if ( !drm_core_is_platform(dev) ) { -+ -+ /* PCI device */ - -- sprintf(dev->devname, "%s@%s", dev->driver->pci_driver.name, -- master->unique); -+ len = snprintf(master->unique, master->unique_len, -+ "pci:%04x:%02x:%02x.%d", -+ drm_get_pci_domain(dev), -+ dev->pdev->bus->number, -+ PCI_SLOT(dev->pdev->devfn), -+ PCI_FUNC(dev->pdev->devfn)); -+ if (len >= master->unique_len) -+ DRM_ERROR("buffer overflow"); -+ else -+ master->unique_len = len; -+ -+ dev->devname = kmalloc(strlen(dev->driver->pci_driver.name) + -+ master->unique_len + 2, GFP_KERNEL); -+ if (dev->devname == NULL) -+ return -ENOMEM; -+ -+ sprintf(dev->devname, "%s@%s", dev->driver->pci_driver.name, -+ master->unique); -+ -+ } else { -+ -+ /* Platform device */ -+ -+ int len; -+ -+ len = snprintf(master->unique, master->unique_len, -+ "platform:%s", dev->platform_dev->name); -+ -+ if (len >= master->unique_len) -+ DRM_ERROR("buffer overflow"); -+ else -+ master->unique_len = len; -+ -+ dev->devname = kmalloc(strlen(dev->driver->name) -+ + master->unique_len + 2, GFP_KERNEL); -+ if (dev->devname == NULL) -+ return -ENOMEM; -+ -+ sprintf(dev->devname, "%s@%s", dev->driver->name, -+ master->unique); -+ -+ } - - return 0; - } -diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c -index 55bb8a8..a7069ad 100644 ---- a/drivers/gpu/drm/drm_stub.c -+++ b/drivers/gpu/drm/drm_stub.c -@@ -230,8 +230,10 @@ static int drm_fill_in_dev(struct drm_device * dev, struct pci_dev *pdev, - idr_init(&dev->drw_idr); - - dev->pdev = pdev; -- dev->pci_device = pdev->device; -- dev->pci_vendor = pdev->vendor; -+ if (pdev) { -+ dev->pci_device = pdev->device; -+ dev->pci_vendor = pdev->vendor; -+ } - - #ifdef __alpha__ - dev->hose = pdev->sysdata; -@@ -449,6 +451,76 @@ err_g1: - EXPORT_SYMBOL(drm_get_dev); - - /** -+ * -+ * Register a platform device as a DRM device -+ * -+ * \param pdev - platform device structure -+ * \param driver - the matching drm_driver structure -+ * \return zero on success or a negative number on failure. -+ * -+ * Attempt to gets inter module "drm" information. If we are first -+ * then register the character device and inter module information. -+ * Try and register, if we fail to register, backout previous work. -+ * -+ * \sa drm_get_dev -+ */ -+int drm_get_platform_dev(struct platform_device *pdev, -+ struct drm_driver *driver, void *priv) -+{ -+ struct drm_device *dev; -+ int ret; -+ DRM_DEBUG("\n"); -+ -+ dev = kmalloc(sizeof(*dev), GFP_KERNEL); -+ if (!dev) -+ return -ENOMEM; -+ dev->dev_private = priv; -+ -+ if ((ret = drm_fill_in_dev(dev, NULL, NULL, driver))) { -+ printk(KERN_ERR "DRM: Fill_in_dev failed.\n"); -+ goto err_g1; -+ } -+ dev->platform_dev = pdev; -+ -+ if (drm_core_check_feature(dev, DRIVER_MODESET)) { -+ ret = drm_get_minor(dev, &dev->control, DRM_MINOR_CONTROL); -+ if (ret) -+ goto err_g2; -+ } -+ -+ if ((ret = drm_get_minor(dev, &dev->primary, DRM_MINOR_LEGACY))) -+ goto err_g3; -+ -+ if (dev->driver->load) { -+ ret = dev->driver->load(dev, 0); -+ if (ret) -+ goto err_g3; -+ } -+ -+ /* setup the grouping for the legacy output */ -+ if (drm_core_check_feature(dev, DRIVER_MODESET)) { -+ ret = drm_mode_group_init_legacy_group(dev, &dev->primary->mode_group); -+ if (ret) -+ goto err_g3; -+ } -+ -+ list_add_tail(&dev->driver_item, &driver->device_list); -+ -+ DRM_INFO("Initialized %s %d.%d.%d %s on minor %d\n", -+ driver->name, driver->major, driver->minor, driver->patchlevel, -+ driver->date, dev->primary->index); -+ -+ return 0; -+ -+err_g3: -+ drm_put_minor(&dev->primary); -+err_g2: -+err_g1: -+ kfree(dev); -+ return ret; -+} -+ -+/** - * Put a secondary minor number. - * - * \param sec_minor - structure to be released -diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c -index f7a615b..fea2b71 100644 ---- a/drivers/gpu/drm/drm_sysfs.c -+++ b/drivers/gpu/drm/drm_sysfs.c -@@ -482,7 +482,11 @@ int drm_sysfs_device_add(struct drm_minor *minor) - int err; - char *minor_str; - -- minor->kdev.parent = &minor->dev->pdev->dev; -+ if (minor->dev->pdev) { -+ minor->kdev.parent = &minor->dev->pdev->dev; -+ } else { -+ minor->kdev.parent = &minor->dev->platform_dev->dev; -+ } - minor->kdev.class = drm_class; - minor->kdev.release = drm_sysfs_device_release; - minor->kdev.devt = minor->device; -diff --git a/include/drm/drmP.h b/include/drm/drmP.h -index 45b67d9..66253f9 100644 ---- a/include/drm/drmP.h -+++ b/include/drm/drmP.h -@@ -55,6 +55,7 @@ - #include <linux/mm.h> - #include <linux/cdev.h> - #include <linux/mutex.h> -+#include <linux/platform_device.h> - #if defined(__alpha__) || defined(__powerpc__) - #include <asm/pgtable.h> /* For pte_wrprotect */ - #endif -@@ -113,6 +114,7 @@ extern void drm_ut_debug_printk(unsigned int request_level, - #define DRIVER_IRQ_VBL2 0x800 - #define DRIVER_GEM 0x1000 - #define DRIVER_MODESET 0x2000 -+#define DRIVER_IS_PLATFORM 0x4000 - - /***********************************************************************/ - /** \name Begin the DRM... */ -@@ -981,6 +983,7 @@ struct drm_device { - wait_queue_head_t buf_writers; /**< Processes waiting to ctx switch */ - - struct drm_agp_head *agp; /**< AGP data */ -+ struct platform_device *platform_dev; /**< platform device structure */ - - struct pci_dev *pdev; /**< PCI device structure */ - int pci_vendor; /**< PCI vendor id */ -@@ -1091,12 +1094,20 @@ static inline int drm_mtrr_del(int handle, unsigned long offset, - } - #endif - -+static inline int drm_core_is_platform(struct drm_device *dev) -+{ -+ return drm_core_check_feature(dev, DRIVER_IS_PLATFORM); -+} -+ - /******************************************************************/ - /** \name Internal function definitions */ - /*@{*/ - - /* Driver support (drm_drv.h) */ - extern int drm_init(struct drm_driver *driver); -+extern int drm_platform_init(struct drm_driver *driver, -+ struct platform_device *pdev, -+ void *dev_private); - extern void drm_exit(struct drm_driver *driver); - extern int drm_ioctl(struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg); -@@ -1314,6 +1325,8 @@ extern int drm_dropmaster_ioctl(struct drm_device *dev, void *data, - struct drm_file *file_priv); - struct drm_master *drm_master_create(struct drm_minor *minor); - extern struct drm_master *drm_master_get(struct drm_master *master); -+extern int drm_get_platform_dev(struct platform_device *pdev, -+ struct drm_driver *driver, void *priv); - extern void drm_master_put(struct drm_master **master); - extern int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent, - struct drm_driver *driver); --- -1.6.5.3 -
recipes/linux/linux-openmoko-2.6.31/0001-gta02_defconfig-Enable-GLAMO_DRM.patch deleted +0 -37
@@ -1,37 +0,0 @@ -From 6cc1ca971b357db4760a40729728c05e403857d7 Mon Sep 17 00:00:00 2001 -From: Martin Jansa <[email protected]> -Date: Thu, 19 Nov 2009 11:39:51 +0100 -Subject: [PATCH] gta02_defconfig: Enable GLAMO_DRM - ---- - arch/arm/configs/gta02_defconfig | 7 ++++++- - 1 files changed, 6 insertions(+), 1 deletions(-) - -diff --git a/arch/arm/configs/gta02_defconfig b/arch/arm/configs/gta02_defconfig -index 0f53baf..1cce709 100644 ---- a/arch/arm/configs/gta02_defconfig -+++ b/arch/arm/configs/gta02_defconfig -@@ -1000,14 +1000,19 @@ CONFIG_PCF50633_GPIO=y - # CONFIG_EZX_PCAP is not set - # CONFIG_MFD_PCF50606 is not set - CONFIG_MFD_GLAMO=y --CONFIG_MFD_GLAMO_FB=y -+# CONFIG_MFD_GLAMO_FB is not set - CONFIG_MFD_GLAMO_GPIO=y - CONFIG_MFD_GLAMO_MCI=y -+CONFIG_MFD_GLAMO_DRM=y - # CONFIG_MEDIA_SUPPORT is not set - - # - # Graphics support - # -+CONFIG_DRM=y -+# CONFIG_DRM_MGA is not set -+# CONFIG_DRM_VIA is not set -+# CONFIG_DRM_SAVAGE is not set - # CONFIG_VGASTATE is not set - CONFIG_VIDEO_OUTPUT_CONTROL=y - CONFIG_FB=y --- -1.6.5.3 -
recipes/linux/linux-openmoko-2.6.31/0001-wm8753-fix-build-with-gcc-4.4.2-which-works-ok-with-.patch deleted +0 -27
@@ -1,27 +0,0 @@ -From 63b619f9466dc36648d082dc4e4fad714a343d80 Mon Sep 17 00:00:00 2001 -From: Martin Jansa <[email protected]> -Date: Sat, 7 Nov 2009 20:33:06 +0100 -Subject: [PATCH 1/5] wm8753: fix build with gcc-4.4.2, which works ok with 4.1.2 - ---- - sound/soc/codecs/wm8753.c | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) - -diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c -index d80d414..1e685b2 100644 ---- a/sound/soc/codecs/wm8753.c -+++ b/sound/soc/codecs/wm8753.c -@@ -709,7 +709,9 @@ static void pll_factors(struct _pll_div *pll_div, unsigned int target, - Nmod = target % source; - Kpart = FIXED_PLL_SIZE * (long long)Nmod; - -- do_div(Kpart, source); -+ // with this, gcc-4.4.2 emits the reference to uldivmod, but then optimizes it out -+ //do_div(Kpart, source); -+ __do_div_asm(Kpart, source); - - K = Kpart & 0xFFFFFFFF; - --- -1.6.5.2 -
recipes/linux/linux-openmoko-2.6.31/0002-Glamo-DRM-and-KMS-driver.patch deleted +0 -3818
2,478 lines not on this page · raw message
recipes/linux/linux-openmoko-2.6.31/0003-Work-on-Glamo-core-for-DRM.patch deleted +0 -252
252 lines not on this page · raw message
recipes/linux/linux-openmoko-2.6.31/0004-Add-JBT6k74-hook-for-use-by-KMS.patch deleted +0 -49
49 lines not on this page · raw message
recipes/linux/linux-openmoko-2.6.31/0004-gta02_defconfig-Enable-UBI-support.patch deleted +0 -67
67 lines not on this page · raw message
recipes/linux/linux-openmoko-2.6.31/0005-gta02_defconfig-Enable-UBI-debug.patch deleted +0 -88
88 lines not on this page · raw message
recipes/linux/linux-openmoko-2.6.31/0006-gta02-defconfig-enable-NFS-and-INOTIFY_USER.patch deleted +0 -124
124 lines not on this page · raw message
recipes/linux/linux-openmoko-2.6.31/0007-gta02_defconfig-disable-LEDS_GTA02_VIBRATOR.patch deleted +0 -25
Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-2.6.31_git.bb deleted +0 -38
Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-shr-drm-devel/0001-Add-drm-to-Makefile-version.patch deleted +0 -25
Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-shr-drm-devel/0004-gta02_drm_defconfig-start-from-gta02_packaging_defco.patch deleted +0 -129
129 lines not on this page · raw message
recipes/linux/linux-openmoko-shr-drm-devel/0005-Enable-DRM-and-MFD_GLAMO_DRM.patch deleted +0 -51
51 lines not on this page · raw message
recipes/linux/linux-openmoko-shr-drm-devel/0006-Enable-I2C_ALGOBIT-from-make-oldconfig.patch deleted +0 -33
Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-shr-drm-devel/0007-Enable-UBI-UBIFS.patch deleted +0 -81
81 lines not on this page · raw message
recipes/linux/linux-openmoko-shr-drm-devel/fix-install.patch deleted +0 -23
Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-shr-drm-devel_git.bb deleted +0 -31
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.1
Part of the diff is not shown here. View the raw message.
Re: [PATCH 1/3] linux-openmoko: drop 2.6.31 and shr-drm-devel (2.6.29-rc3+drm patches) version
Quoted 5 lines · Martin Jansa
* 2.6.32 version is superior in all aspects
* this versions have WSOD issue on every resume (so not as usable as 2.6.32 where it's fixed)Signed-off-by Martin Jansa <[email protected]>
Quoted 5,512 lines
--- .../0001-DRM-for-platform-devices.patch | 458 --- .../0001-gta02_defconfig-Enable-GLAMO_DRM.patch | 37 - ...build-with-gcc-4.4.2-which-works-ok-with-.patch | 27 - .../0002-Glamo-DRM-and-KMS-driver.patch | 3818 -------------------- .../0003-Work-on-Glamo-core-for-DRM.patch | 252 -- .../0004-Add-JBT6k74-hook-for-use-by-KMS.patch | 49 - .../0004-gta02_defconfig-Enable-UBI-support.patch | 67 - .../0005-gta02_defconfig-Enable-UBI-debug.patch | 88 - ...a02-defconfig-enable-NFS-and-INOTIFY_USER.patch | 124 - ...a02_defconfig-disable-LEDS_GTA02_VIBRATOR.patch | 25 - recipes/linux/linux-openmoko-2.6.31_git.bb | 38 - .../0001-Add-drm-to-Makefile-version.patch | 25 - ...efconfig-start-from-gta02_packaging_defco.patch | 129 - .../0005-Enable-DRM-and-MFD_GLAMO_DRM.patch | 51 - ...06-Enable-I2C_ALGOBIT-from-make-oldconfig.patch | 33 - .../0007-Enable-UBI-UBIFS.patch | 81 - .../linux-openmoko-shr-drm-devel/fix-install.patch | 23 - recipes/linux/linux-openmoko-shr-drm-devel_git.bb | 31 - 18 files changed, 0 insertions(+), 5356 deletions(-) delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0001-DRM-for-platform-devices.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0001-gta02_defconfig-Enable-GLAMO_DRM.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0001-wm8753-fix-build-with-gcc-4.4.2-which-works-ok-with-.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0002-Glamo-DRM-and-KMS-driver.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0003-Work-on-Glamo-core-for-DRM.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0004-Add-JBT6k74-hook-for-use-by-KMS.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0004-gta02_defconfig-Enable-UBI-support.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0005-gta02_defconfig-Enable-UBI-debug.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0006-gta02-defconfig-enable-NFS-and-INOTIFY_USER.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31/0007-gta02_defconfig-disable-LEDS_GTA02_VIBRATOR.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.31_git.bb delete mode 100644 recipes/linux/linux-openmoko-shr-drm-devel/0001-Add-drm-to-Makefile-version.patch delete mode 100644 recipes/linux/linux-openmoko-shr-drm-devel/0004-gta02_drm_defconfig-start-from-gta02_packaging_defco.patch delete mode 100644 recipes/linux/linux-openmoko-shr-drm-devel/0005-Enable-DRM-and-MFD_GLAMO_DRM.patch delete mode 100644 recipes/linux/linux-openmoko-shr-drm-devel/0006-Enable-I2C_ALGOBIT-from-make-oldconfig.patch delete mode 100644 recipes/linux/linux-openmoko-shr-drm-devel/0007-Enable-UBI-UBIFS.patch delete mode 100644 recipes/linux/linux-openmoko-shr-drm-devel/fix-install.patch delete mode 100644 recipes/linux/linux-openmoko-shr-drm-devel_git.bbrecipes/linux/linux-openmoko-2.6.31/0001-DRM-for-platform-devices.patch deleted +0
-458@@ -1,458 +0,0 @@ -From da270cf61e67d912b38e314719511efc4c2ea085 Mon Sep 17 00:00:00 2001 -From: Thomas White <[email protected]> -Date: Tue, 20 Oct 2009 15:52:30 +0200 -Subject: [PATCH 1/4] DRM for platform devices - -This modifies the DRM core in a small number of places to allow platform -devices to be used for direct rendering, alongside PCI devices. - -Signed-off-by: Thomas White <[email protected]> ---- - drivers/gpu/drm/Kconfig | 2 +- - drivers/gpu/drm/drm_bufs.c | 2 +- - drivers/gpu/drm/drm_drv.c | 27 ++++++++++ - drivers/gpu/drm/drm_info.c | 27 ++++++++-- - drivers/gpu/drm/drm_ioctl.c | 118 ++++++++++++++++++++++++++++++------------- - drivers/gpu/drm/drm_stub.c | 76 +++++++++++++++++++++++++++- - drivers/gpu/drm/drm_sysfs.c | 6 ++- - include/drm/drmP.h | 13 +++++ - 8 files changed, 224 insertions(+), 47 deletions(-) - -diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig -index 39b393d..cef3d2c 100644 ---- a/drivers/gpu/drm/Kconfig -+++ b/drivers/gpu/drm/Kconfig -@@ -6,7 +6,7 @@ - # - menuconfig DRM - tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)" -- depends on (AGP || AGP=n) && PCI && !EMULATED_CMPXCHG && MMU -+ depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && MMU - select I2C - select I2C_ALGOBIT - help -diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c -index 6246e3f..b9f15bf 100644 ---- a/drivers/gpu/drm/drm_bufs.c -+++ b/drivers/gpu/drm/drm_bufs.c -@@ -188,7 +188,7 @@ static int drm_addmap_core(struct drm_device * dev, resource_size_t offset, - switch (map->type) { - case _DRM_REGISTERS: - case _DRM_FRAME_BUFFER: --#if !defined(__sparc__) && !defined(__alpha__) && !defined(__ia64__) && !defined(__powerpc64__) && !defined(__x86_64__) -+#if !defined(__sparc__) && !defined(__alpha__) && !defined(__ia64__) && !defined(__powerpc64__) && !defined(__x86_64__) && !defined(__arm__) - if (map->offset + (map->size-1) < map->offset || - map->offset < virt_to_phys(high_memory)) { - kfree(map); -diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c -index b39d7bf..a7861e8 100644 ---- a/drivers/gpu/drm/drm_drv.c -+++ b/drivers/gpu/drm/drm_drv.c -@@ -247,6 +247,7 @@ int drm_lastclose(struct drm_device * dev) - */ - int drm_init(struct drm_driver *driver) - { -+#ifdef CONFIG_PCI - struct pci_dev *pdev = NULL; - const struct pci_device_id *pid; - int i; -@@ -280,11 +281,37 @@ int drm_init(struct drm_driver *driver) - drm_get_dev(pdev, pid, driver); - } - } -+#endif - return 0; - } - - EXPORT_SYMBOL(drm_init); - -+/** -+ * Call this to associate a drm_driver with a platform_device. -+ * -+ * \return zero on success or a negative number on failure. -+ * -+ * This is a replacement for drm_init(), but for platform drivers. -+ * In this case, the caller must provide the matching platform_device -+ * -+ * since there is no physical bus to scan through. -+ * -+ * \sa drm_init -+ * -+ */ -+int drm_platform_init(struct drm_driver *driver, struct platform_device *pdev, -+ void *priv) -+{ -+ DRM_DEBUG("\n"); -+ -+ INIT_LIST_HEAD(&driver->device_list); -+ -+ return drm_get_platform_dev(pdev, driver, priv); -+} -+ -+EXPORT_SYMBOL(drm_platform_init); -+ - void drm_exit(struct drm_driver *driver) - { - struct drm_device *dev, *tmp; -diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c -index f0f6c6b..838c2ee 100644 ---- a/drivers/gpu/drm/drm_info.c -+++ b/drivers/gpu/drm/drm_info.c -@@ -52,12 +52,28 @@ int drm_name_info(struct seq_file *m, void *data) - return 0; - - if (master->unique) { -- seq_printf(m, "%s %s %s\n", -- dev->driver->pci_driver.name, -- pci_name(dev->pdev), master->unique); -+ -+ if (drm_core_is_platform(dev)) { -+ seq_printf(m, "%s %s %s\n", -+ dev->driver->name, -+ dev_name(&dev->platform_dev->dev), -+ master->unique); -+ } else { -+ seq_printf(m, "%s %s %s\n", -+ dev->driver->pci_driver.name, -+ pci_name(dev->pdev), master->unique); -+ } -+ - } else { -- seq_printf(m, "%s %s\n", dev->driver->pci_driver.name, -- pci_name(dev->pdev)); -+ -+ if (drm_core_is_platform(dev)) { -+ seq_printf(m, "%s %s\n", dev->driver->name, -+ dev_name(&dev->platform_dev->dev)); -+ } else { -+ seq_printf(m, "%s %s\n", dev->driver->pci_driver.name, -+ pci_name(dev->pdev)); -+ } -+ - } - - return 0; -@@ -325,4 +341,3 @@ int drm_vma_info(struct seq_file *m, void *data) - } - - #endif -- -diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c -index 9b9ff46..133ef29 100644 ---- a/drivers/gpu/drm/drm_ioctl.c -+++ b/drivers/gpu/drm/drm_ioctl.c -@@ -83,7 +83,6 @@ int drm_setunique(struct drm_device *dev, void *data, - { - struct drm_unique *u = data; - struct drm_master *master = file_priv->master; -- int domain, bus, slot, func, ret; - - if (master->unique_len || master->unique) - return -EBUSY; -@@ -101,28 +100,46 @@ int drm_setunique(struct drm_device *dev, void *data, - - master->unique[master->unique_len] = '\0'; - -- dev->devname = kmalloc(strlen(dev->driver->pci_driver.name) + -- strlen(master->unique) + 2, GFP_KERNEL); -- if (!dev->devname) -- return -ENOMEM; -+ if ( !drm_core_is_platform(dev) ) { - -- sprintf(dev->devname, "%s@%s", dev->driver->pci_driver.name, -- master->unique); -+ int domain, bus, slot, func, ret; - -- /* Return error if the busid submitted doesn't match the device's actual -- * busid. -- */ -- ret = sscanf(master->unique, "PCI:%d:%d:%d", &bus, &slot, &func); -- if (ret != 3) -- return -EINVAL; -- domain = bus >> 8; -- bus &= 0xff; -+ /* PCI device */ -+ dev->devname = kmalloc(strlen(dev->driver->pci_driver.name) + -+ strlen(master->unique) + 2, GFP_KERNEL); -+ if (!dev->devname) -+ return -ENOMEM; - -- if ((domain != drm_get_pci_domain(dev)) || -- (bus != dev->pdev->bus->number) || -- (slot != PCI_SLOT(dev->pdev->devfn)) || -- (func != PCI_FUNC(dev->pdev->devfn))) -- return -EINVAL; -+ sprintf(dev->devname, "%s@%s", dev->driver->pci_driver.name, -+ master->unique); -+ -+ /* Return error if the busid submitted doesn't match the -+ * device's actual busid. -+ */ -+ ret = sscanf(master->unique, "PCI:%d:%d:%d", &bus, &slot, &func); -+ if (ret != 3) -+ return -EINVAL; -+ domain = bus >> 8; -+ bus &= 0xff; -+ -+ if ((domain != drm_get_pci_domain(dev)) || -+ (bus != dev->pdev->bus->number) || -+ (slot != PCI_SLOT(dev->pdev->devfn)) || -+ (func != PCI_FUNC(dev->pdev->devfn))) -+ return -EINVAL; -+ -+ } else { -+ -+ /* Platform device */ -+ dev->devname = kmalloc(strlen(dev->driver->name) + -+ strlen(master->unique) + 2, GFP_KERNEL); -+ if (!dev->devname) -+ return -ENOMEM; -+ -+ sprintf(dev->devname, "%s@%s", dev->driver->name, -+ master->unique); -+ -+ } - - return 0; - } -@@ -141,23 +158,52 @@ static int drm_set_busid(struct drm_device *dev, struct drm_file *file_priv) - if (master->unique == NULL) - return -ENOMEM; - -- len = snprintf(master->unique, master->unique_len, "pci:%04x:%02x:%02x.%d", -- drm_get_pci_domain(dev), -- dev->pdev->bus->number, -- PCI_SLOT(dev->pdev->devfn), -- PCI_FUNC(dev->pdev->devfn)); -- if (len >= master->unique_len) -- DRM_ERROR("buffer overflow"); -- else -- master->unique_len = len; -- -- dev->devname = kmalloc(strlen(dev->driver->pci_driver.name) + -- master->unique_len + 2, GFP_KERNEL); -- if (dev->devname == NULL) -- return -ENOMEM; -+ if ( !drm_core_is_platform(dev) ) { -+ -+ /* PCI device */ - -- sprintf(dev->devname, "%s@%s", dev->driver->pci_driver.name, -- master->unique); -+ len = snprintf(master->unique, master->unique_len, -+ "pci:%04x:%02x:%02x.%d", -+ drm_get_pci_domain(dev), -+ dev->pdev->bus->number, -+ PCI_SLOT(dev->pdev->devfn), -+ PCI_FUNC(dev->pdev->devfn)); -+ if (len >= master->unique_len) -+ DRM_ERROR("buffer overflow"); -+ else -+ master->unique_len = len; -+ -+ dev->devname = kmalloc(strlen(dev->driver->pci_driver.name) + -+ master->unique_len + 2, GFP_KERNEL); -+ if (dev->devname == NULL) -+ return -ENOMEM; -+ -+ sprintf(dev->devname, "%s@%s", dev->driver->pci_driver.name, -+ master->unique); -+ -+ } else { -+ -+ /* Platform device */ -+ -+ int len; -+ -+ len = snprintf(master->unique, master->unique_len, -+ "platform:%s", dev->platform_dev->name); -+ -+ if (len >= master->unique_len) -+ DRM_ERROR("buffer overflow"); -+ else -+ master->unique_len = len; -+ -+ dev->devname = kmalloc(strlen(dev->driver->name) -+ + master->unique_len + 2, GFP_KERNEL); -+ if (dev->devname == NULL) -+ return -ENOMEM; -+ -+ sprintf(dev->devname, "%s@%s", dev->driver->name, -+ master->unique); -+ -+ } - - return 0; - } -diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c -index 55bb8a8..a7069ad 100644 ---- a/drivers/gpu/drm/drm_stub.c -+++ b/drivers/gpu/drm/drm_stub.c -@@ -230,8 +230,10 @@ static int drm_fill_in_dev(struct drm_device * dev, struct pci_dev *pdev, - idr_init(&dev->drw_idr); - - dev->pdev = pdev; -- dev->pci_device = pdev->device; -- dev->pci_vendor = pdev->vendor; -+ if (pdev) { -+ dev->pci_device = pdev->device; -+ dev->pci_vendor = pdev->vendor; -+ } - - #ifdef __alpha__ - dev->hose = pdev->sysdata; -@@ -449,6 +451,76 @@ err_g1: - EXPORT_SYMBOL(drm_get_dev); - - /** -+ * -+ * Register a platform device as a DRM device -+ * -+ * \param pdev - platform device structure -+ * \param driver - the matching drm_driver structure -+ * \return zero on success or a negative number on failure. -+ * -+ * Attempt to gets inter module "drm" information. If we are first -+ * then register the character device and inter module information. -+ * Try and register, if we fail to register, backout previous work. -+ * -+ * \sa drm_get_dev -+ */ -+int drm_get_platform_dev(struct platform_device *pdev, -+ struct drm_driver *driver, void *priv) -+{ -+ struct drm_device *dev; -+ int ret; -+ DRM_DEBUG("\n"); -+ -+ dev = kmalloc(sizeof(*dev), GFP_KERNEL); -+ if (!dev) -+ return -ENOMEM; -+ dev->dev_private = priv; -+ -+ if ((ret = drm_fill_in_dev(dev, NULL, NULL, driver))) { -+ printk(KERN_ERR "DRM: Fill_in_dev failed.\n"); -+ goto err_g1; -+ } -+ dev->platform_dev = pdev; -+ -+ if (drm_core_check_feature(dev, DRIVER_MODESET)) { -+ ret = drm_get_minor(dev, &dev->control, DRM_MINOR_CONTROL); -+ if (ret) -+ goto err_g2; -+ } -+ -+ if ((ret = drm_get_minor(dev, &dev->primary, DRM_MINOR_LEGACY))) -+ goto err_g3; -+ -+ if (dev->driver->load) { -+ ret = dev->driver->load(dev, 0); -+ if (ret) -+ goto err_g3; -+ } -+ -+ /* setup the grouping for the legacy output */ -+ if (drm_core_check_feature(dev, DRIVER_MODESET)) { -+ ret = drm_mode_group_init_legacy_group(dev, &dev->primary->mode_group); -+ if (ret) -+ goto err_g3; -+ } -+ -+ list_add_tail(&dev->driver_item, &driver->device_list); -+ -+ DRM_INFO("Initialized %s %d.%d.%d %s on minor %d\n", -+ driver->name, driver->major, driver->minor, driver->patchlevel, -+ driver->date, dev->primary->index); -+ -+ return 0; -+ -+err_g3: -+ drm_put_minor(&dev->primary); -+err_g2: -+err_g1: -+ kfree(dev); -+ return ret; -+} -+ -+/** - * Put a secondary minor number. - * - * \param sec_minor - structure to be released -diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c -index f7a615b..fea2b71 100644 ---- a/drivers/gpu/drm/drm_sysfs.c -+++ b/drivers/gpu/drm/drm_sysfs.c -@@ -482,7 +482,11 @@ int drm_sysfs_device_add(struct drm_minor *minor) - int err; - char *minor_str; - -- minor->kdev.parent = &minor->dev->pdev->dev; -+ if (minor->dev->pdev) { -+ minor->kdev.parent = &minor->dev->pdev->dev; -+ } else { -+ minor->kdev.parent = &minor->dev->platform_dev->dev; -+ } - minor->kdev.class = drm_class; - minor->kdev.release = drm_sysfs_device_release; - minor->kdev.devt = minor->device; -diff --git a/include/drm/drmP.h b/include/drm/drmP.h -index 45b67d9..66253f9 100644 ---- a/include/drm/drmP.h -+++ b/include/drm/drmP.h -@@ -55,6 +55,7 @@ - #include <linux/mm.h> - #include <linux/cdev.h> - #include <linux/mutex.h> -+#include <linux/platform_device.h> - #if defined(__alpha__) || defined(__powerpc__) - #include <asm/pgtable.h> /* For pte_wrprotect */ - #endif -@@ -113,6 +114,7 @@ extern void drm_ut_debug_printk(unsigned int request_level, - #define DRIVER_IRQ_VBL2 0x800 - #define DRIVER_GEM 0x1000 - #define DRIVER_MODESET 0x2000 -+#define DRIVER_IS_PLATFORM 0x4000 - - /***********************************************************************/ - /** \name Begin the DRM... */ -@@ -981,6 +983,7 @@ struct drm_device { - wait_queue_head_t buf_writers; /**< Processes waiting to ctx switch */ - - struct drm_agp_head *agp; /**< AGP data */ -+ struct platform_device *platform_dev; /**< platform device structure */ - - struct pci_dev *pdev; /**< PCI device structure */ - int pci_vendor; /**< PCI vendor id */ -@@ -1091,12 +1094,20 @@ static inline int drm_mtrr_del(int handle, unsigned long offset, - } - #endif - -+static inline int drm_core_is_platform(struct drm_device *dev) -+{ -+ return drm_core_check_feature(dev, DRIVER_IS_PLATFORM); -+} -+ - /******************************************************************/ - /** \name Internal function definitions */ - /*@{*/ - - /* Driver support (drm_drv.h) */ - extern int drm_init(struct drm_driver *driver); -+extern int drm_platform_init(struct drm_driver *driver, -+ struct platform_device *pdev, -+ void *dev_private); - extern void drm_exit(struct drm_driver *driver); - extern int drm_ioctl(struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg); -@@ -1314,6 +1325,8 @@ extern int drm_dropmaster_ioctl(struct drm_device *dev, void *data, - struct drm_file *file_priv); - struct drm_master *drm_master_create(struct drm_minor *minor); - extern struct drm_master *drm_master_get(struct drm_master *master); -+extern int drm_get_platform_dev(struct platform_device *pdev, -+ struct drm_driver *driver, void *priv); - extern void drm_master_put(struct drm_master **master); - extern int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent, - struct drm_driver *driver); --- -1.6.5.3 -recipes/linux/linux-openmoko-2.6.31/0001-gta02_defconfig-Enable-GLAMO_DRM.patch deleted +0
-37@@ -1,37 +0,0 @@ -From 6cc1ca971b357db4760a40729728c05e403857d7 Mon Sep 17 00:00:00 2001 -From: Martin Jansa <[email protected]> -Date: Thu, 19 Nov 2009 11:39:51 +0100 -Subject: [PATCH] gta02_defconfig: Enable GLAMO_DRM - ---- - arch/arm/configs/gta02_defconfig | 7 ++++++- - 1 files changed, 6 insertions(+), 1 deletions(-) - -diff --git a/arch/arm/configs/gta02_defconfig b/arch/arm/configs/gta02_defconfig -index 0f53baf..1cce709 100644 ---- a/arch/arm/configs/gta02_defconfig -+++ b/arch/arm/configs/gta02_defconfig -@@ -1000,14 +1000,19 @@ CONFIG_PCF50633_GPIO=y - # CONFIG_EZX_PCAP is not set - # CONFIG_MFD_PCF50606 is not set - CONFIG_MFD_GLAMO=y --CONFIG_MFD_GLAMO_FB=y -+# CONFIG_MFD_GLAMO_FB is not set - CONFIG_MFD_GLAMO_GPIO=y - CONFIG_MFD_GLAMO_MCI=y -+CONFIG_MFD_GLAMO_DRM=y - # CONFIG_MEDIA_SUPPORT is not set - - # - # Graphics support - # -+CONFIG_DRM=y -+# CONFIG_DRM_MGA is not set -+# CONFIG_DRM_VIA is not set -+# CONFIG_DRM_SAVAGE is not set - # CONFIG_VGASTATE is not set - CONFIG_VIDEO_OUTPUT_CONTROL=y - CONFIG_FB=y --- -1.6.5.3 -recipes/linux/linux-openmoko-2.6.31/0001-wm8753-fix-build-with-gcc-4.4.2-which-works-ok-with-.patch deleted +0
-27@@ -1,27 +0,0 @@ -From 63b619f9466dc36648d082dc4e4fad714a343d80 Mon Sep 17 00:00:00 2001 -From: Martin Jansa <[email protected]> -Date: Sat, 7 Nov 2009 20:33:06 +0100 -Subject: [PATCH 1/5] wm8753: fix build with gcc-4.4.2, which works ok with 4.1.2 - ---- - sound/soc/codecs/wm8753.c | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) - -diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c -index d80d414..1e685b2 100644 ---- a/sound/soc/codecs/wm8753.c -+++ b/sound/soc/codecs/wm8753.c -@@ -709,7 +709,9 @@ static void pll_factors(struct _pll_div *pll_div, unsigned int target, - Nmod = target % source; - Kpart = FIXED_PLL_SIZE * (long long)Nmod; - -- do_div(Kpart, source); -+ // with this, gcc-4.4.2 emits the reference to uldivmod, but then optimizes it out -+ //do_div(Kpart, source); -+ __do_div_asm(Kpart, source); - - K = Kpart & 0xFFFFFFFF; - --- -1.6.5.2 -recipes/linux/linux-openmoko-2.6.31/0002-Glamo-DRM-and-KMS-driver.patch deleted +0
-3818@@ -1,3818 +0,0 @@ -From 01435b6f8fba2031e6941756a6a4e42be553f4a0 Mon Sep 17 00:00:00 2001 -From: Thomas White <[email protected]> -Date: Tue, 20 Oct 2009 16:14:55 +0200 -Subject: [PATCH 2/4] Glamo DRM and KMS driver - -This adds the Glamo DRM and KMS driver, but not the modifications needed -elsewhere to support it. - -Signed-off-by: Thomas White <[email protected]> ---- - drivers/gpu/drm/drm_stub.c | 2 +- - drivers/mfd/glamo/Kconfig | 15 + - drivers/mfd/glamo/Makefile | 5 +- - drivers/mfd/glamo/glamo-buffer.c | 372 ++++++++++++++ - drivers/mfd/glamo/glamo-buffer.h | 60 +++ - drivers/mfd/glamo/glamo-cmdq.c | 528 ++++++++++++++++++++ - drivers/mfd/glamo/glamo-cmdq.h | 49 ++ - drivers/mfd/glamo/glamo-display.c | 875 +++++++++++++++++++++++++++++++++ - drivers/mfd/glamo/glamo-display.h | 39 ++ - drivers/mfd/glamo/glamo-drm-drv.c | 453 +++++++++++++++++ - drivers/mfd/glamo/glamo-drm-private.h | 156 ++++++ - drivers/mfd/glamo/glamo-fence.c | 329 +++++++++++++ - drivers/mfd/glamo/glamo-fence.h | 36 ++ - drivers/mfd/glamo/glamo-kms-fb.c | 540 ++++++++++++++++++++ - drivers/mfd/glamo/glamo-kms-fb.h | 41 ++ - include/drm/Kbuild | 1 + - include/drm/glamo_drm.h | 153 ++++++ - 17 files changed, 3652 insertions(+), 2 deletions(-) - create mode 100644 drivers/mfd/glamo/glamo-buffer.c - create mode 100644 drivers/mfd/glamo/glamo-buffer.h - create mode 100644 drivers/mfd/glamo/glamo-cmdq.c - create mode 100644 drivers/mfd/glamo/glamo-cmdq.h - create mode 100644 drivers/mfd/glamo/glamo-display.c - create mode 100644 drivers/mfd/glamo/glamo-display.h - create mode 100644 drivers/mfd/glamo/glamo-drm-drv.c - create mode 100644 drivers/mfd/glamo/glamo-drm-private.h - create mode 100644 drivers/mfd/glamo/glamo-fence.c - create mode 100644 drivers/mfd/glamo/glamo-fence.h - create mode 100644 drivers/mfd/glamo/glamo-kms-fb.c - create mode 100644 drivers/mfd/glamo/glamo-kms-fb.h - create mode 100644 include/drm/glamo_drm.h - -diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c -index a7069ad..5e3d65a 100644 ---- a/drivers/gpu/drm/drm_stub.c -+++ b/drivers/gpu/drm/drm_stub.c -@@ -471,7 +471,7 @@ int drm_get_platform_dev(struct platform_device *pdev, - int ret; - DRM_DEBUG("\n"); - -- dev = kmalloc(sizeof(*dev), GFP_KERNEL); -+ dev = kzalloc(sizeof(*dev), GFP_KERNEL); - if (!dev) - return -ENOMEM; - dev->dev_private = priv; -diff --git a/drivers/mfd/glamo/Kconfig b/drivers/mfd/glamo/Kconfig -index 8c93bcb..375e5db 100644 ---- a/drivers/mfd/glamo/Kconfig -+++ b/drivers/mfd/glamo/Kconfig -@@ -39,3 +39,18 @@ config MFD_GLAMO_MCI - neo1973 GTA-02. - - If unsure, say N. -+ -+config MFD_GLAMO_DRM -+ tristate "Glamo direct rendering and kernel modesetting support" -+ depends on MFD_GLAMO && DRM -+ select FB_CFB_FILLRECT -+ select FB_CFB_COPYAREA -+ select FB_CFB_IMAGEBLIT -+ help -+ Direct Rendering Manager interface for the S-Media Glamo chip, as -+ used in Openmoko FreeRunner (GTA02). -+ -+ This DRM driver includes kernel modesetting (KMS) support. As such, -+ do not select MFD_GLAMO_FB above if you choose to enable this option. -+ -+ If unsure, say N. -diff --git a/drivers/mfd/glamo/Makefile b/drivers/mfd/glamo/Makefile -index ebf26f7..d5ebf8f 100644 ---- a/drivers/mfd/glamo/Makefile -+++ b/drivers/mfd/glamo/Makefile -@@ -1,5 +1,5 @@ - # --# Makefile for the Smedia Glamo framebuffer driver -+# Makefile for the Smedia Glamo driver(s) - # - - obj-$(CONFIG_MFD_GLAMO) += glamo-core.o -@@ -8,4 +8,7 @@ obj-$(CONFIG_MFD_GLAMO_SPI) += glamo-spi.o - - obj-$(CONFIG_MFD_GLAMO_FB) += glamo-fb.o - obj-$(CONFIG_MFD_GLAMO_MCI) += glamo-mci.o -+obj-$(CONFIG_MFD_GLAMO_DRM) += glamo-drm.o - -+glamo-drm-objs := glamo-drm-drv.o glamo-cmdq.o glamo-buffer.o \ -+ glamo-display.o glamo-kms-fb.o glamo-fence.o -diff --git a/drivers/mfd/glamo/glamo-buffer.c b/drivers/mfd/glamo/glamo-buffer.c -new file mode 100644 -index 0000000..45500d3 ---- /dev/null -+++ b/drivers/mfd/glamo/glamo-buffer.c -@@ -0,0 +1,372 @@ -+/* -+ * SMedia Glamo 336x/337x memory management -+ * -+ * Copyright (c) 2009 Thomas White <[email protected]> -+ * -+ * 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, see <http://www.gnu.org/licenses/>. -+ * -+ * -+ * Memory mapping functions based on i915_gem.c, to which the following -+ * notice applies: -+ * -+ * Copyright © 2008 Intel Corporation -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice (including the next -+ * paragraph) shall be included in all copies or substantial portions of the -+ * Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -+ * IN THE SOFTWARE. -+ * -+ * Authors: -+ * Eric Anholt <[email protected]> -+ */ -+ -+ -+#include <drm/drmP.h> -+#include <drm/glamo_drm.h> -+ -+#include "glamo-drm-private.h" -+#include "glamo-cmdq.h" /* For glamo_cmdq_blank() */ -+ -+ -+struct drm_gem_object *glamo_gem_object_alloc(struct drm_device *dev, int size, -+ int alignment) -+{ -+ struct drm_gem_object *obj; -+ struct glamodrm_handle *gdrm; -+ struct drm_glamo_gem_object *gobj; -+ -+ gdrm = dev->dev_private; -+ -+ size = roundup(size, PAGE_SIZE); -+ -+ obj = drm_gem_object_alloc(dev, size); -+ if (obj == NULL) return NULL; -+ -+ /* See glamodrm_gem_init_object() below */ -+ gobj = obj->driver_private; -+ -+ /* Allocate memory for this object in VRAM */ -+ gobj->block = drm_mm_search_free(gdrm->mmgr, size, alignment, 1); -+ if (!gobj->block) { -+ goto fail; -+ } -+ gobj->block = drm_mm_get_block(gobj->block, size, alignment); -+ if (!gobj->block) { -+ goto fail; -+ } -+ -+ /* Arrange for the contents to be set to zero */ -+ glamo_cmdq_blank(gdrm, obj); -+ -+ return obj; -+ -+fail: -+ mutex_lock(&dev->struct_mutex); -+ drm_gem_object_unreference(obj); -+ mutex_unlock(&dev->struct_mutex); -+ printk(KERN_INFO "[glamo-drm] Failed to allocate object\n"); -+ -+ return NULL; -+} -+ -+ -+int glamo_ioctl_gem_create(struct drm_device *dev, void *data, -+ struct drm_file *file_priv) -+{ -+ struct drm_glamo_gem_create *args = data; -+ struct drm_gem_object *obj; -+ int handle, ret, alignment, size; -+ -+ /* Alignment must be a non-zero multiple of 2 */ -+ alignment = args->alignment; -+ if ( alignment < 2 ) alignment = 2; -+ if ( alignment % 2 ) alignment *= 2; -+ -+ /* Size must be similarly sanitised */ -+ size = args->size; -+ if ( size < 2 ) size = 2; -+ if ( size % 2 ) size += 1; -+ -+ /* Create an object */ -+ obj = glamo_gem_object_alloc(dev, size, alignment); -+ if ( obj == NULL ) return -ENOMEM; -+ -+ /* Create a handle for it */ -+ ret = drm_gem_handle_create(file_priv, obj, &handle); -+ mutex_lock(&dev->struct_mutex); -+ drm_gem_object_handle_unreference(obj); -+ mutex_unlock(&dev->struct_mutex); -+ if (ret) goto fail; -+ -+ /* Return */ -+ args->handle = handle; -+ return 0; -+ -+fail: -+ mutex_lock(&dev->struct_mutex); -+ drm_gem_object_unreference(obj); -+ mutex_unlock(&dev->struct_mutex); -+ printk(KERN_INFO "[glamo-drm] Failed to allocate object\n"); -+ return ret; -+} -+ -+ -+int glamodrm_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf) -+{ -+ struct drm_gem_object *obj = vma->vm_private_data; -+ struct drm_device *dev = obj->dev; -+ struct drm_glamo_gem_object *gobj = obj->driver_private; -+ struct glamodrm_handle *gdrm = dev->dev_private; -+ pgoff_t page_offset; -+ unsigned long pfn; -+ int ret = 0; -+ -+ /* We don't use vmf->pgoff since that has the fake offset */ -+ page_offset = ((unsigned long)vmf->virtual_address - vma->vm_start) >> -+ PAGE_SHIFT; -+ -+ mutex_lock(&dev->struct_mutex); -+ pfn = ((gdrm->vram->start + GLAMO_OFFSET_FB + gobj->block->start) -+ >> PAGE_SHIFT) + page_offset; -+ ret = vm_insert_pfn(vma, (unsigned long)vmf->virtual_address, pfn); -+ mutex_unlock(&dev->struct_mutex); -+ -+ switch (ret) { -+ case -ENOMEM: -+ case -EAGAIN: -+ return VM_FAULT_OOM; -+ case -EFAULT: -+ case -EBUSY: -+ DRM_ERROR("can't insert pfn?? fault or busy...\n"); -+ return VM_FAULT_SIGBUS; -+ default: -+ return VM_FAULT_NOPAGE; -+ } -+} -+ -+ -+static int glamo_gem_create_mmap_offset(struct drm_gem_object *obj) -+{ -+ struct drm_device *dev = obj->dev; -+ struct drm_gem_mm *mm = dev->mm_private; -+ struct drm_glamo_gem_object *gobj = obj->driver_private; -+ struct drm_map_list *list; -+ struct drm_local_map *map; -+ int ret = 0; -+ -+ /* Set the object up for mmap'ing */ -+ list = &obj->map_list; -+ list->map = kzalloc(sizeof(struct drm_map_list), GFP_KERNEL); -+ if (!list->map) -+ return -ENOMEM; -+ -+ map = list->map; -+ map->type = _DRM_GEM; -+ map->size = obj->size; -+ map->handle = obj; -+ -+ /* Get a DRM GEM mmap offset allocated... */ -+ list->file_offset_node = drm_mm_search_free(&mm->offset_manager, -+ obj->size / PAGE_SIZE, 0, 0); -+ if (!list->file_offset_node) { -+ DRM_ERROR("failed to allocate offset for bo %d\n", obj->name); -+ ret = -ENOMEM; -+ goto out_free_list; -+ } -+ -+ list->file_offset_node = drm_mm_get_block(list->file_offset_node, -+ obj->size / PAGE_SIZE, 0); -+ if (!list->file_offset_node) { -+ ret = -ENOMEM; -+ goto out_free_list; -+ } -+ -+ list->hash.key = list->file_offset_node->start; -+ if (drm_ht_insert_item(&mm->offset_hash, &list->hash)) { -+ DRM_ERROR("failed to add to map hash\n"); -+ goto out_free_mm; -+ } -+ -+ /* By now we should be all set, any drm_mmap request on the offset -+ * below will get to our mmap & fault handler */ -+ gobj->mmap_offset = ((uint64_t) list->hash.key) << PAGE_SHIFT; -+ -+ return 0; -+ -+out_free_mm: -+ drm_mm_put_block(list->file_offset_node); -+out_free_list: -+ kfree(list->map); -+ -+ return ret; -+} -+ -+ -+int glamo_ioctl_gem_mmap(struct drm_device *dev, void *data, -+ struct drm_file *file_priv) -+{ -+ struct drm_glamo_gem_mmap *args = data; -+ struct drm_gem_object *obj; -+ struct drm_glamo_gem_object *gobj; -+ int ret; -+ -+ obj = drm_gem_object_lookup(dev, file_priv, args->handle); -+ if (obj == NULL) -+ return -EBADF; -+ -+ mutex_lock(&dev->struct_mutex); -+ -+ gobj = obj->driver_private; -+ if (!gobj->mmap_offset) { -+ ret = glamo_gem_create_mmap_offset(obj); -+ if (ret) { -+ mutex_unlock(&dev->struct_mutex); -+ return ret; -+ } -+ } -+ -+ args->offset = gobj->mmap_offset; -+ -+ drm_gem_object_unreference(obj); -+ mutex_unlock(&dev->struct_mutex); -+ -+ return 0; -+} -+ -+ -+int glamo_ioctl_gem_pin(struct drm_device *dev, void *data, -+ struct drm_file *file_priv) -+{ -+ printk(KERN_INFO "glamo_ioctl_gem_pin\n"); -+ return 0; -+} -+ -+ -+int glamo_ioctl_gem_unpin(struct drm_device *dev, void *data, -+ struct drm_file *file_priv) -+{ -+ printk(KERN_INFO "glamo_ioctl_gem_unpin\n"); -+ return 0; -+} -+ -+ -+int glamo_ioctl_gem_pread(struct drm_device *dev, void *data, -+ struct drm_file *file_priv) -+{ -+ printk(KERN_INFO "glamo_ioctl_gem_pread\n"); -+ return 0; -+} -+ -+ -+int glamo_ioctl_gem_pwrite(struct drm_device *dev, void *data, -+ struct drm_file *file_priv) -+{ -+ printk(KERN_INFO "glamo_ioctl_gem_pwrite\n"); -+ return 0; -+} -+ -+ -+int glamodrm_gem_init_object(struct drm_gem_object *obj) -+{ -+ struct drm_glamo_gem_object *gobj; -+ -+ /* Allocate a private structure */ -+ gobj = kzalloc(sizeof(*gobj), GFP_KERNEL); -+ if (!gobj) return -ENOMEM; -+ -+ obj->driver_private = gobj; -+ gobj->obj = obj; -+ -+ return 0; -+} -+ -+ -+void glamodrm_gem_free_object(struct drm_gem_object *obj) -+{ -+ struct drm_glamo_gem_object *gobj; -+ struct drm_map_list *list; -+ struct drm_device *dev; -+ struct drm_gem_mm *mm; -+ struct drm_local_map *map; -+ -+ dev = obj->dev; -+ mm = dev->mm_private; -+ gobj = obj->driver_private; -+ -+ /* Free the VRAM */ -+ if ( gobj->block != NULL ) { -+ drm_mm_put_block(gobj->block); -+ } -+ -+ /* Release mappings */ -+ list = &obj->map_list; -+ drm_ht_remove_item(&mm->offset_hash, &list->hash); -+ if (list->file_offset_node) { -+ drm_mm_put_block(list->file_offset_node); -+ list->file_offset_node = NULL; -+ } -+ map = list->map; -+ if (map) { -+ kfree(map); -+ list->map = NULL; -+ } -+ -+ /* Free the private structure */ -+ kfree(obj->driver_private); -+} -+ -+ -+/* Memory management initialisation */ -+int glamo_buffer_init(struct glamodrm_handle *gdrm) -+{ -+ gdrm->mmgr = kzalloc(sizeof(struct drm_mm), GFP_KERNEL); -+ drm_mm_init(gdrm->mmgr, 0, gdrm->vram_size); -+ -+ /* Reserve a scratch buffer. We do this outside the protections -+ * of the other GEM code. To do this safely, the allocation must -+ * be a multiple of PAGE_SIZE. */ -+ gdrm->scratch = drm_mm_search_free(gdrm->mmgr, PAGE_SIZE, 4, 1); -+ if ( gdrm->scratch ) { -+ gdrm->scratch = drm_mm_get_block(gdrm->scratch, PAGE_SIZE, 4); -+ } -+ if ( !gdrm->scratch ) { -+ printk(KERN_WARNING "[glamo-drm] Couldn't allocate" -+ " scratch buffer!\n"); -+ } -+ -+ return 0; -+} -+ -+ -+/* Memory management finalisation */ -+int glamo_buffer_final(struct glamodrm_handle *gdrm) -+{ -+ drm_mm_takedown(gdrm->mmgr); -+ kfree(gdrm->mmgr); -+ return 0; -+} -diff --git a/drivers/mfd/glamo/glamo-buffer.h b/drivers/mfd/glamo/glamo-buffer.h -new file mode 100644 -index 0000000..41f18fd ---- /dev/null -+++ b/drivers/mfd/glamo/glamo-buffer.h -@@ -0,0 +1,60 @@ -+/* -+ * SMedia Glamo 336x/337x memory management -+ * -+ * Copyright (c) 2009 Thomas White <[email protected]> -+ * -+ * 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., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ * -+ */ -+ -+#ifndef __GLAMO_BUFFER_H -+#define __GLAMO_BUFFER_H -+ -+#include <drm/drmP.h> -+ -+#include "glamo-drm-private.h" -+ -+extern int glamo_buffer_init(struct glamodrm_handle *gdrm); -+extern int glamo_buffer_final(struct glamodrm_handle *gdrm); -+ -+extern int glamodrm_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf); -+ -+extern int glamodrm_gem_init_object(struct drm_gem_object *obj); -+ -+extern void glamodrm_gem_free_object(struct drm_gem_object *obj); -+ -+extern struct drm_gem_object *glamo_gem_object_alloc(struct drm_device *dev, -+ int size, int alignment); -+ -+extern int glamo_ioctl_gem_create(struct drm_device *dev, void *data, -+ struct drm_file *file_priv); -+ -+extern int glamo_ioctl_gem_mmap(struct drm_device *dev, void *data, -+ struct drm_file *file_priv); -+ -+extern int glamo_ioctl_gem_pin(struct drm_device *dev, void *data, -+ struct drm_file *file_priv); -+ -+extern int glamo_ioctl_gem_unpin(struct drm_device *dev, void *data, -+ struct drm_file *file_priv); -+ -+extern int glamo_ioctl_gem_pread(struct drm_device *dev, void *data, -+ struct drm_file *file_priv); -+ -+extern int glamo_ioctl_gem_pwrite(struct drm_device *dev, void *data, -+ struct drm_file *file_priv); -+ -+#endif /* __GLAMO_BUFFER_H */ -diff --git a/drivers/mfd/glamo/glamo-cmdq.c b/drivers/mfd/glamo/glamo-cmdq.c -new file mode 100644 -index 0000000..caedc27 ---- /dev/null -+++ b/drivers/mfd/glamo/glamo-cmdq.c -@@ -0,0 +1,528 @@ -+/* -+ * SMedia Glamo 336x/337x command queue handling -+ * -+ * Copyright (C) 2008-2009 Thomas White <[email protected]> -+ * Copyright (C) 2009 Andreas Pokorny <[email protected]> -+ * Based on xf86-video-glamo (see below for details) -+ * -+ * All rights reserved. -+ * -+ * 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., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ * -+ * Command queue handling functions based on those from xf86-video-glamo, to -+ * which the following licence applies: -+ * -+ * Copyright 2007 OpenMoko, Inc. -+ * Copyright © 2009 Lars-Peter Clausen <[email protected]> -+ * -+ * This driver is based on Xati, -+ * Copyright 2004 Eric Anholt -+ * -+ * Permission to use, copy, modify, distribute, and sell this software and its -+ * documentation for any purpose is hereby granted without fee, provided that -+ * the above copyright notice appear in all copies and that both that copyright -+ * notice and this permission notice appear in supporting documentation, and -+ * that the name of the copyright holders not be used in advertising or -+ * publicity pertaining to distribution of the software without specific, -+ * written prior permission. The copyright holders make no representations -+ * about the suitability of this software for any purpose. It is provided "as -+ * is" without express or implied warranty. -+ * -+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR -+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -+ * OF THIS SOFTWARE. -+ */ -+ -+ -+#include <drm/drmP.h> -+#include <drm/glamo_drm.h> -+ -+#include "glamo-core.h" -+#include "glamo-drm-private.h" -+#include "glamo-regs.h" -+ -+ -+static inline void reg_write(struct glamodrm_handle *gdrm, -+ u_int16_t reg, u_int16_t val) -+{ -+ iowrite16(val, gdrm->reg_base + reg); -+} -+ -+ -+static inline u16 reg_read(struct glamodrm_handle *gdrm, u_int16_t reg) -+{ -+ return ioread16(gdrm->reg_base + reg); -+} -+ -+ -+static u32 glamo_get_read(struct glamodrm_handle *gdrm) -+{ -+ /* we could turn off clock here */ -+ u32 ring_read = reg_read(gdrm, GLAMO_REG_CMDQ_READ_ADDRL); -+ ring_read |= (reg_read(gdrm, GLAMO_REG_CMDQ_READ_ADDRH) & 0x7) << 16; -+ -+ return ring_read; -+} -+ -+ -+static u32 glamo_get_write(struct glamodrm_handle *gdrm) -+{ -+ u32 ring_write = reg_read(gdrm, GLAMO_REG_CMDQ_WRITE_ADDRL); -+ ring_write |= (reg_read(gdrm, GLAMO_REG_CMDQ_WRITE_ADDRH) & 0x7) << 16; -+ -+ return ring_write; -+} -+ -+ -+/* Add commands to the ring buffer */ -+int glamo_add_to_ring(struct glamodrm_handle *gdrm, u16 *addr, -+ unsigned int count) -+{ -+ size_t ring_write, ring_read; -+ size_t new_ring_write; -+ -+ if ( count >= GLAMO_CMDQ_SIZE ) { -+ printk(KERN_WARNING "[glamo-drm] CmdQ submission too large\n"); -+ return -EINVAL; -+ } -+ -+ down(&gdrm->add_to_ring); -+ -+ ring_write = glamo_get_write(gdrm); -+ -+ /* Calculate where we'll end up */ -+ new_ring_write = (ring_write + count) % GLAMO_CMDQ_SIZE; -+ -+ /* Wait until there is enough space to queue the cmd buffer */ -+ if (new_ring_write > ring_write) { -+ /* Loop while the read pointer is between the old and new -+ * positions */ -+ do { -+ ring_read = glamo_get_read(gdrm); -+ } while (ring_read > ring_write && ring_read < new_ring_write); -+ } else { -+ /* Same, but kind of inside-out */ -+ do { -+ ring_read = glamo_get_read(gdrm); -+ } while (ring_read > ring_write || ring_read < new_ring_write); -+ } -+ -+ /* Are we about to wrap around? */ -+ if (ring_write >= new_ring_write) { -+ -+ u32 rest_size; -+ -+ /* Wrap around */ -+ rest_size = GLAMO_CMDQ_SIZE - ring_write; /* Space left */ -+ -+ /* Write from current position to end */ -+ memcpy_toio(gdrm->cmdq_base+ring_write, addr, rest_size); -+ -+ /* Write from start */ -+ memcpy_toio(gdrm->cmdq_base, addr+(rest_size>>1), -+ count - rest_size); -+ -+ /* ring_write being 0 will result in a deadlock because the -+ * cmdq read will never stop. To avoid such an behaviour insert -+ * an empty instruction. */ -+ if (new_ring_write == 0) { -+ iowrite16(0x0000, gdrm->cmdq_base); -+ iowrite16(0x0000, gdrm->cmdq_base + 2); -+ new_ring_write = 4; -+ } -+ -+ } else { -+ -+ memcpy_toio(gdrm->cmdq_base+ring_write, addr, count); -+ -+ } -+ -+ reg_write(gdrm, GLAMO_REG_CMDQ_WRITE_ADDRH, -+ (new_ring_write >> 16) & 0x7f); -+ reg_write(gdrm, GLAMO_REG_CMDQ_WRITE_ADDRL, -+ new_ring_write & 0xffff); -+ -+ if ( !(reg_read(gdrm, GLAMO_REG_CMDQ_STATUS) & 1<<3) ) { -+ printk(KERN_ERR "[glamo-drm] CmdQ decode failure.\n"); -+ } -+ -+ up(&gdrm->add_to_ring); -+ -+ return 0; -+} -+ -+ -+/* Return true for a legal sequence of commands, otherwise false */ -+static int glamo_sanitize_buffer(u16 *cmds, unsigned int count) -+{ -+ /* XXX FIXME TODO: Implementation... */ -+ return 1; -+} -+ -+ -+/* Substitute the real addresses in VRAM for any required buffer objects */ -+static int glamo_do_relocation(struct glamodrm_handle *gdrm, -+ drm_glamo_cmd_buffer_t *cbuf, u16 *cmds, -+ struct drm_device *dev, -+ struct drm_file *file_priv) -+{ -+ u32 *handles; -+ int *offsets; -+ int nobjs = cbuf->nobjs; -+ int i; -+ -+ if ( nobjs > 32 ) return -EINVAL; /* Get real... */ -+ -+ handles = kmalloc(nobjs*sizeof(u32), GFP_KERNEL); -+ if ( handles == NULL ) return -1; -+ if ( copy_from_user(handles, cbuf->objs, nobjs*sizeof(u32)) ) -+ return -1; -+ -+ offsets = kmalloc(nobjs*sizeof(int), GFP_KERNEL); -+ if ( offsets == NULL ) return -1; -+ if ( copy_from_user(offsets, cbuf->obj_pos, nobjs*sizeof(int)) ) -+ return -1; -+ -+ for ( i=0; i<nobjs; i++ ) { -+ -+ u32 handle = handles[i]; -+ int offset = offsets[i]; -+ struct drm_gem_object *obj; -+ struct drm_glamo_gem_object *gobj; -+ u32 addr; -+ u16 addr_low, addr_high; -+ -+ if ( offset > cbuf->bufsz ) { -+ printk(KERN_WARNING "[glamo-drm] Offset out of range" -+ " for this relocation!\n"); -+ goto fail; -+ } -+ -+ obj = drm_gem_object_lookup(dev, file_priv, handle); -+ if ( obj == NULL ) return -1; -+ -+ /* Unref the object now, or it'll never get freed. -+ * This should really happen after the GPU has finished -+ * the commands which are about to be submitted. */ -+ drm_gem_object_unreference(obj); -+ -+ gobj = obj->driver_private; -+ if ( gobj == NULL ) { -+ printk(KERN_WARNING "[glamo-drm] This object has no" -+ " private data!\n"); -+ goto fail; -+ } -+ -+ addr = GLAMO_OFFSET_FB + gobj->block->start; -+ addr_low = addr & 0xffff; -+ addr_high = (addr >> 16) & 0x7f; -+ -+ /* FIXME: Should really check that the register is a -+ * valid one for this relocation. */ -+ -+ *(cmds+(offset/2)+1) = addr_low; -+ *(cmds+(offset/2)+3) = addr_high; -+ -+ } -+ -+ kfree(handles); -+ kfree(offsets); -+ return 0; -+ -+fail: -+ kfree(handles); -+ kfree(offsets); -+ return -1; -+} -+ -+ -+/* This is DRM_IOCTL_GLAMO_CMDBUF */ -+int glamo_ioctl_cmdbuf(struct drm_device *dev, void *data, -+ struct drm_file *file_priv) -+{ -+ int ret = 0; -+ struct glamodrm_handle *gdrm; -+ unsigned int count; -+ drm_glamo_cmd_buffer_t *cbuf = data; -+ u16 *cmds; -+ -+ gdrm = dev->dev_private; -+ -+ count = cbuf->bufsz; -+ -+ if ( count > PAGE_SIZE ) return -EINVAL; -+ -+ cmds = kmalloc(count, GFP_KERNEL); -+ if ( cmds == NULL ) return -ENOMEM; -+ if ( copy_from_user(cmds, cbuf->buf, count) ) { -+ printk(KERN_WARNING "[glamo-drm] copy from user failed\n"); -+ ret = -EINVAL; -+ goto cleanup; -+ } -+ -+ /* Check the buffer isn't going to tell Glamo to enact naughtiness */ -+ if ( !glamo_sanitize_buffer(cmds, count) ) { -+ printk(KERN_WARNING "[glamo-drm] sanitize buffer failed\n"); -+ ret = -EINVAL; -+ goto cleanup; -+ } -+ -+ /* Perform relocation, if necessary */ -+ if ( cbuf->nobjs ) { -+ if ( glamo_do_relocation(gdrm, cbuf, cmds, dev, file_priv) ) -+ { -+ printk(KERN_WARNING "[glamo-drm] Relocation failed\n"); -+ ret = -EINVAL; -+ goto cleanup; -+ } -+ } -+ -+ glamo_add_to_ring(gdrm, cmds, count); -+ -+cleanup: -+ kfree(cmds); -+ -+ return ret; -+} -+ -+ -+/* Return true for a legal sequence of commands, otherwise false */ -+static int glamo_sanitize_burst(u16 base, u16 *cmds, unsigned int count) -+{ -+ /* XXX FIXME TODO: Implementation... */ -+ return 1; -+} -+ -+ -+static int glamo_relocate_burst(struct glamodrm_handle *gdrm, -+ drm_glamo_cmd_burst_t *cbuf, u16 *data, -+ struct drm_device *dev, -+ struct drm_file *file_priv) -+{ -+ u32 *handles; -+ int *offsets; -+ int nobjs = cbuf->nobjs; -+ int i; -+ -+ if ( nobjs > 32 ) return -EINVAL; /* Get real... */ -+ -+ handles = kmalloc(nobjs*sizeof(u32), GFP_KERNEL); -+ if ( handles == NULL ) return -1; -+ if ( copy_from_user(handles, cbuf->objs, nobjs*sizeof(u32)) ) -+ return -1; -+ -+ offsets = kmalloc(nobjs*sizeof(int), GFP_KERNEL); -+ if ( offsets == NULL ) return -1; -+ if ( copy_from_user(offsets, cbuf->obj_pos, nobjs*sizeof(int)) ) -+ return -1; -+ -+ for ( i=0; i<nobjs; i++ ) { -+ -+ u32 handle = handles[i]; -+ int offset = offsets[i]; -+ struct drm_gem_object *obj; -+ struct drm_glamo_gem_object *gobj; -+ u32 addr; -+ u16 addr_low, addr_high; -+ -+ if ( offset > cbuf->bufsz ) { -+ printk(KERN_WARNING "[glamo-drm] Offset out of range" -+ " for this relocation!\n"); -+ goto fail; -+ } -+ -+ obj = drm_gem_object_lookup(dev, file_priv, handle); -+ if ( obj == NULL ) return -1; -+ -+ /* Unref the object now, or it'll never get freed. -+ * FIXME: This should really happen after the GPU has -+ * finished executing these commands. */ -+ drm_gem_object_unreference(obj); -+ -+ gobj = obj->driver_private; -+ if ( gobj == NULL ) { -+ printk(KERN_WARNING "[glamo-drm] This object has no" -+ " private data!\n"); -+ goto fail; -+ } -+ -+ addr = GLAMO_OFFSET_FB + gobj->block->start; -+ addr_low = addr & 0xffff; -+ addr_high = (addr >> 16) & 0x7f; -+ -+ /* FIXME: Should really check that the register is a -+ * valid one for this relocation. */ -+ -+ *(data+(offset/2)+0) = addr_low; -+ *(data+(offset/2)+1) = addr_high; -+ -+ } -+ -+ kfree(handles); -+ kfree(offsets); -+ return 0; -+ -+fail: -+ kfree(handles); -+ kfree(offsets); -+ return -1; -+} -+ -+ -+/* This is DRM_IOCTL_GLAMO_CMDBURST */ -+int glamo_ioctl_cmdburst(struct drm_device *dev, void *data, -+ struct drm_file *file_priv) -+{ -+ int ret = 0; -+ struct glamodrm_handle *gdrm; -+ drm_glamo_cmd_burst_t *cbuf = data; -+ u16 *burst; -+ size_t burst_size; -+ size_t data_size; -+ -+ gdrm = dev->dev_private; -+ -+ data_size = cbuf->bufsz; -+ if ( data_size % 4 ) data_size += 2; -+ if ( data_size % 4 ) return -EINVAL; -+ burst_size = data_size + 4; /* Add space for header */ -+ if ( burst_size > PAGE_SIZE ) return -EINVAL; -+ -+ burst = kmalloc(burst_size, GFP_KERNEL); -+ if ( burst == NULL ) return -ENOMEM; -+ -+ /* Get data from userspace */ -+ if ( copy_from_user(burst+2, cbuf->data, cbuf->bufsz) ) { -+ printk(KERN_WARNING "[glamo-drm] copy from user failed\n"); -+ ret = -EINVAL; -+ goto cleanup; -+ } -+ -+ /* Sanitise */ -+ if ( !glamo_sanitize_burst(cbuf->base, burst+2, cbuf->bufsz) ) { -+ printk(KERN_WARNING "[glamo-drm] sanitize buffer failed\n"); -+ ret = -EINVAL; -+ goto cleanup; -+ } -+ -+ /* Relocate */ -+ if ( cbuf->nobjs ) { -+ if ( glamo_relocate_burst(gdrm, cbuf, burst+2, dev, file_priv) ) -+ { -+ printk(KERN_WARNING "[glamo-drm] Relocation failed\n"); -+ ret = -EINVAL; -+ goto cleanup; -+ } -+ } -+ -+ /* Add burst header */ -+ burst[0] = 1<<15 | cbuf->base; -+ burst[1] = data_size / 2; /* -> 2-byte words */ -+ if ( burst[1] & 0x01 ) { -+ printk(KERN_CRIT "Burst not aligned!\n"); -+ goto cleanup; -+ } -+ -+ /* Zero-pad if necessary */ -+ if ( data_size % 4 ) { -+ burst[burst_size-1] = 0x0000; -+ } -+ -+ /* Add to command queue */ -+ glamo_add_to_ring(gdrm, burst, burst_size); -+ -+cleanup: -+ kfree(burst); -+ -+ return ret; -+} -+ -+ -+int glamo_cmdq_init(struct glamodrm_handle *gdrm) -+{ -+ unsigned int i; -+ -+ init_MUTEX(&gdrm->add_to_ring); -+ -+ /* Enable 2D and 3D */ -+ glamo_engine_enable(gdrm->glamo_core, GLAMO_ENGINE_2D); -+ glamo_engine_reset(gdrm->glamo_core, GLAMO_ENGINE_2D); -+ -+ /* Start by zeroing the command queue memory */ -+ for ( i=0; i<GLAMO_CMDQ_SIZE; i+=2 ) { -+ iowrite16(0x0000, gdrm->cmdq_base+i); -+ } -+ -+ glamo_engine_enable(gdrm->glamo_core, GLAMO_ENGINE_CMDQ); -+ glamo_engine_reset(gdrm->glamo_core, GLAMO_ENGINE_CMDQ); -+ -+ /* Set up command queue location */ -+ reg_write(gdrm, GLAMO_REG_CMDQ_BASE_ADDRL, -+ GLAMO_OFFSET_CMDQ & 0xffff); -+ reg_write(gdrm, GLAMO_REG_CMDQ_BASE_ADDRH, -+ (GLAMO_OFFSET_CMDQ >> 16) & 0x7f); -+ -+ /* Length of command queue in 1k blocks, minus one */ -+ reg_write(gdrm, GLAMO_REG_CMDQ_LEN, (GLAMO_CMDQ_SIZE >> 10)-1); -+ reg_write(gdrm, GLAMO_REG_CMDQ_WRITE_ADDRH, 0); -+ reg_write(gdrm, GLAMO_REG_CMDQ_WRITE_ADDRL, 0); -+ reg_write(gdrm, GLAMO_REG_CMDQ_CONTROL, -+ 1 << 12 | /* Turbo flip (?) */ -+ 5 << 8 | /* no interrupt */ -+ 8 << 4); /* HQ threshold */ -+ -+ return 0; -+} -+ -+ -+int glamo_cmdq_shutdown(struct glamodrm_handle *gdrm) -+{ -+ return 0; -+} -+ -+ -+void glamo_cmdq_suspend(struct glamodrm_handle *gdrm) -+{ -+ /* Placeholder... */ -+} -+ -+ -+void glamo_cmdq_resume(struct glamodrm_handle *gdrm) -+{ -+ glamo_cmdq_init(gdrm); -+} -+ -+ -+/* Initialise an object's contents to zero. -+ * This is in glamo-cmdq.c in the hope that we can accelerate it later. */ -+void glamo_cmdq_blank(struct glamodrm_handle *gdrm, struct drm_gem_object *obj) -+{ -+ char __iomem *cookie; -+ struct drm_glamo_gem_object *gobj; -+ int i; -+ -+ gobj = obj->driver_private; -+ -+ cookie = ioremap(gdrm->vram->start + gobj->block->start, obj->size); -+ for ( i=0; i<obj->size; i+=2 ) { -+ iowrite16(0, cookie+i); -+ } -+ iounmap(cookie); -+} -diff --git a/drivers/mfd/glamo/glamo-cmdq.h b/drivers/mfd/glamo/glamo-cmdq.h -new file mode 100644 -index 0000000..510d195 ---- /dev/null -+++ b/drivers/mfd/glamo/glamo-cmdq.h -@@ -0,0 +1,49 @@ -+/* Smedia Glamo 336x/337x command queue handling -+ * -+ * Copyright (c) 2008-2009 Thomas White <[email protected]> -+ * Copyright (c) 2009 Andreas Pokorny <[email protected]> -+ * Based on xf86-video-glamo -+ * Copyright 2007 OpenMoko, Inc. -+ * Copyright © 2009 Lars-Peter Clausen <[email protected]> -+ * -+ * All rights reserved. -+ * -+ * 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., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#ifndef __GLAMO_CMDQ_H -+#define __GLAMO_CMDQ_H -+ -+#include <drm/drmP.h> -+ -+#include "glamo-drm-private.h" -+ -+extern int glamo_ioctl_cmdbuf(struct drm_device *dev, void *data, -+ struct drm_file *file_priv); -+extern int glamo_ioctl_cmdburst(struct drm_device *dev, void *data, -+ struct drm_file *file_priv); -+extern void glamo_cmdq_blank(struct glamodrm_handle *gdrm, -+ struct drm_gem_object *obj); -+ -+extern int glamo_cmdq_init(struct glamodrm_handle *gdrm); -+extern int glamo_cmdq_shutdown(struct glamodrm_handle *gdrm); -+extern void glamo_cmdq_suspend(struct glamodrm_handle *gdrm); -+extern void glamo_cmdq_resume(struct glamodrm_handle *gdrm); -+ -+extern int glamo_add_to_ring(struct glamodrm_handle *gdrm, u16 *addr, -+ unsigned int count); -+ -+#endif /* __GLAMO_CMDQ_H */ -diff --git a/drivers/mfd/glamo/glamo-display.c b/drivers/mfd/glamo/glamo-display.c -new file mode 100644 -index 0000000..93aa917 ---- /dev/null -+++ b/drivers/mfd/glamo/glamo-display.c -@@ -0,0 +1,875 @@ -+/* -+ * SMedia Glamo 336x/337x display -+ * -+ * Copyright (C) 2008-2009 Thomas White <[email protected]> -+ * -+ * Based on glamo-fb.c (C) 2007-2008 by Openmoko, Inc. -+ * Author: Harald Welte <[email protected]> -+ * All rights reserved. -+ * -+ * 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., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ * -+ * -+ * Based on intel_display.c and intel_crt.c from drivers/gpu/drm/i915 -+ * to which the following licence applies: -+ * -+ * Copyright © 2006-2007 Intel Corporation -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice (including the next -+ * paragraph) shall be included in all copies or substantial portions of the -+ * Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -+ * DEALINGS IN THE SOFTWARE. -+ * -+ * Authors: -+ * Eric Anholt <[email protected]> -+ * -+ */ -+ -+#define DEBUG 1 -+ -+#include <drm/drmP.h> -+#include <drm/glamo_drm.h> -+#include <drm/drm_crtc_helper.h> -+#include <drm/drm_crtc.h> -+ -+#include "glamo-core.h" -+#include "glamo-drm-private.h" -+#include "glamo-regs.h" -+#include "glamo-kms-fb.h" -+#include "glamo-display.h" -+#include <linux/glamofb.h> -+ -+ -+#define GLAMO_LCD_WIDTH_MASK 0x03FF -+#define GLAMO_LCD_HEIGHT_MASK 0x03FF -+#define GLAMO_LCD_PITCH_MASK 0x07FE -+#define GLAMO_LCD_HV_TOTAL_MASK 0x03FF -+#define GLAMO_LCD_HV_RETR_START_MASK 0x03FF -+#define GLAMO_LCD_HV_RETR_END_MASK 0x03FF -+#define GLAMO_LCD_HV_RETR_DISP_START_MASK 0x03FF -+#define GLAMO_LCD_HV_RETR_DISP_END_MASK 0x03FF -+ -+ -+struct glamofb_par { -+ struct drm_device *dev; -+ struct drm_display_mode *our_mode; -+ struct glamo_framebuffer *glamo_fb; -+ int crtc_count; -+ /* crtc currently bound to this */ -+ uint32_t crtc_ids[2]; -+}; -+ -+ -+static int reg_read_lcd(struct glamodrm_handle *gdrm, u_int16_t reg) -+{ -+ int i = 0; -+ -+ for (i = 0; i != 2; i++) -+ nop(); -+ -+ return ioread16(gdrm->lcd_base + reg); -+} -+ -+ -+static void reg_write_lcd(struct glamodrm_handle *gdrm, -+ u_int16_t reg, u_int16_t val) -+{ -+ int i = 0; -+ -+ for (i = 0; i != 2; i++) -+ nop(); -+ -+ iowrite16(val, gdrm->lcd_base + reg); -+} -+ -+ -+static void reg_set_bit_mask_lcd(struct glamodrm_handle *gdrm, -+ u_int16_t reg, u_int16_t mask, -+ u_int16_t val) -+{ -+ u_int16_t tmp; -+ -+ val &= mask; -+ -+ tmp = reg_read_lcd(gdrm, reg); -+ tmp &= ~mask; -+ tmp |= val; -+ reg_write_lcd(gdrm, reg, tmp); -+} -+ -+ -+/* Note that this has nothing at all to do with the engine command queue -+ * in glamo-cmdq.c */ -+static inline int glamo_lcd_cmdq_empty(struct glamodrm_handle *gdrm) -+{ -+ /* DGCMdQempty -- 1 == command queue is empty */ -+ return reg_read_lcd(gdrm, GLAMO_REG_LCD_STATUS1) & (1 << 15); -+} -+ -+ -+/* call holding gfb->lock_cmd when locking, until you unlock */ -+int glamo_lcd_cmd_mode(struct glamodrm_handle *gdrm, int on) -+{ -+ int timeout = 2000000; -+ -+ dev_dbg(gdrm->dev, "glamofb_cmd_mode(on=%d)\n", on); -+ if (on) { -+ -+ while ((!glamo_lcd_cmdq_empty(gdrm)) && (timeout--)) -+ /* yield() */; -+ if (timeout < 0) { -+ printk(KERN_ERR "*************" -+ " LCD command queue never got empty " -+ "*************\n"); -+ return -EIO; -+ } -+ -+ /* display the entire frame then switch to command */ -+ reg_write_lcd(gdrm, GLAMO_REG_LCD_COMMAND1, -+ GLAMO_LCD_CMD_TYPE_DISP | -+ GLAMO_LCD_CMD_DATA_FIRE_VSYNC); -+ -+ /* wait until lcd idle */ -+ timeout = 2000000; -+ while ((!reg_read_lcd(gdrm, GLAMO_REG_LCD_STATUS2) & (1 << 12)) -+ && (timeout--)) -+ /* yield() */; -+ if (timeout < 0) { -+ printk(KERN_ERR"*************" -+ " LCD never idle " -+ "*************\n"); -+ return -EIO; -+ } -+ -+ mdelay(100); -+ -+ } else { -+ /* RGB interface needs vsync/hsync */ -+ int mode; -+ mode = reg_read_lcd(gdrm, GLAMO_REG_LCD_MODE3); -+ if ( mode & GLAMO_LCD_MODE3_RGB) -+ reg_write_lcd(gdrm, GLAMO_REG_LCD_COMMAND1, -+ GLAMO_LCD_CMD_TYPE_DISP | -+ GLAMO_LCD_CMD_DATA_DISP_SYNC); -+ -+ reg_write_lcd(gdrm, GLAMO_REG_LCD_COMMAND1, -+ GLAMO_LCD_CMD_TYPE_DISP | -+ GLAMO_LCD_CMD_DATA_DISP_FIRE); -+ } -+ -+ return 0; -+} -+ -+ -+static struct glamo_script lcd_init_script[] = { -+ { GLAMO_REG_LCD_MODE1, 0x0020 }, -+ /* no display rotation, no hardware cursor, no dither, no gamma, -+ * no retrace flip, vsync low-active, hsync low active, -+ * no TVCLK, no partial display, hw dest color from fb, -+ * no partial display mode, LCD1, software flip, */ -+ { GLAMO_REG_LCD_MODE2, 0x9020 }, -+ /* video flip, no ptr, no ptr, dhclk off, -+ * normal mode, no cpuif, -+ * res, serial msb first, single fb, no fr ctrl, -+ * cpu if bits all zero, no crc -+ * 0000 0000 0010 0000 */ -+ { GLAMO_REG_LCD_MODE3, 0x0b40 }, -+ /* src data rgb565, res, 18bit rgb666 -+ * 000 01 011 0100 0000 */ -+ { GLAMO_REG_LCD_POLARITY, 0x440c }, -+ /* DE high active, no cpu/lcd if, cs0 force low, a0 low active, -+ * np cpu if, 9bit serial data, sclk rising edge latch data -+ * 01 00 0 100 0 000 01 0 0 */ -+ /* The following values assume 640*480@16bpp */ -+ /* FIXME: fb0 has not yet been allocated! */ -+ { GLAMO_REG_LCD_A_BASE1, PAGE_SIZE }, /* display A base address 15:0 */ -+ { GLAMO_REG_LCD_A_BASE2, 0x0000 }, /* display A base address 22:16 */ -+ { GLAMO_REG_LCD_B_BASE1, 0x6000 }, /* display B base address 15:0 */ -+ { GLAMO_REG_LCD_B_BASE2, 0x0009 }, /* display B base address 22:16 */ -+ { GLAMO_REG_LCD_CURSOR_BASE1, 0xC000 }, /* cursor base address 15:0 */ -+ { GLAMO_REG_LCD_CURSOR_BASE2, 0x0012 }, /* cursor base address 22:16 */ -+ { GLAMO_REG_LCD_COMMAND2, 0x0000 }, /* display page A */ -+}; -+ -+ -+static int glamo_run_lcd_script(struct glamodrm_handle *gdrm, -+ struct glamo_script *script, int len) -+{ -+ int i; -+ -+ for (i = 0; i < len; i++) { -+ struct glamo_script *line = &script[i]; -+ -+ if (line->reg == 0xffff) -+ return 0; -+ else if (line->reg == 0xfffe) -+ msleep(line->val); -+ else -+ reg_write_lcd(gdrm, script[i].reg, script[i].val); -+ } -+ -+ return 0; -+} -+ -+ -+extern void jbt6k74_action(int val); -+ -+/* Power on/off */ -+static void glamo_crtc_dpms(struct drm_crtc *crtc, int mode) -+{ -+} -+ -+ -+static bool glamo_crtc_mode_fixup(struct drm_crtc *crtc, -+ struct drm_display_mode *mode, -+ struct drm_display_mode *adjusted_mode) -+{ -+ return true; -+} -+ -+ -+static int glamo_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, -+ struct drm_framebuffer *old_fb) -+{ -+ struct glamodrm_handle *gdrm; -+ struct glamo_crtc *gcrtc; -+ struct glamo_framebuffer *gfb; -+ struct drm_gem_object *obj; -+ struct drm_glamo_gem_object *gobj; -+ u32 addr; -+ u16 addr_low, addr_high; -+ -+ if (!crtc->fb) { -+ DRM_DEBUG("No FB bound\n"); -+ return -EINVAL; -+ } -+ -+ /* Dig out our handle */ -+ gcrtc = to_glamo_crtc(crtc); -+ gdrm = gcrtc->gdrm; /* Here it is! */ -+ -+ gfb = to_glamo_framebuffer(crtc->fb); -+ obj = gfb->obj; -+ gobj = obj->driver_private; -+ -+ addr = GLAMO_OFFSET_FB + gobj->block->start; -+ addr_low = addr & 0xffff; -+ addr_high = ((addr >> 16) & 0x7f) | 0x4000; -+ -+ glamo_lcd_cmd_mode(gdrm, 1); -+ reg_write_lcd(gdrm, GLAMO_REG_LCD_A_BASE1, addr_low); -+ reg_write_lcd(gdrm, GLAMO_REG_LCD_A_BASE2, addr_high); -+ glamo_lcd_cmd_mode(gdrm, 0); -+ -+ return 0; -+} -+ -+ -+static int glamo_crtc_mode_set(struct drm_crtc *crtc, -+ struct drm_display_mode *mode, -+ struct drm_display_mode *adjusted_mode, -+ int x, int y, -+ struct drm_framebuffer *old_fb) -+{ -+ struct glamodrm_handle *gdrm; -+ struct glamo_crtc *gcrtc; -+ int retr_start, retr_end, disp_start, disp_end; -+ -+ /* Dig out our handle */ -+ gcrtc = to_glamo_crtc(crtc); -+ gdrm = gcrtc->gdrm; /* Here it is! */ -+ -+ glamo_lcd_cmd_mode(gdrm, 1); -+ -+ glamo_engine_reclock(gdrm->glamo_core, GLAMO_ENGINE_LCD, mode->clock); -+ gdrm->saved_clock = mode->clock; -+ -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_WIDTH, -+ GLAMO_LCD_WIDTH_MASK, mode->hdisplay); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HEIGHT, -+ GLAMO_LCD_HEIGHT_MASK, mode->vdisplay); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_PITCH, -+ GLAMO_LCD_PITCH_MASK, mode->hdisplay*2); -+ -+ /* Convert "X modeline timings" into "Glamo timings" */ -+ retr_start = 0; -+ retr_end = retr_start + mode->hsync_end - mode->hsync_start; -+ disp_start = mode->htotal - mode->hsync_start; -+ disp_end = disp_start + mode->hdisplay; -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_TOTAL, -+ GLAMO_LCD_HV_TOTAL_MASK, mode->htotal); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_RETR_START, -+ GLAMO_LCD_HV_RETR_START_MASK, retr_start); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_RETR_END, -+ GLAMO_LCD_HV_RETR_END_MASK, retr_end); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_DISP_START, -+ GLAMO_LCD_HV_RETR_DISP_START_MASK, disp_start); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_DISP_END, -+ GLAMO_LCD_HV_RETR_DISP_END_MASK, disp_end); -+ -+ /* The same in the vertical direction */ -+ retr_start = 0; -+ retr_end = retr_start + mode->vsync_end - mode->vsync_start; -+ disp_start = mode->vtotal - mode->vsync_start; -+ disp_end = disp_start + mode->vdisplay; -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_TOTAL, -+ GLAMO_LCD_HV_TOTAL_MASK, mode->vtotal); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_RETR_START, -+ GLAMO_LCD_HV_RETR_START_MASK, retr_start); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_RETR_END, -+ GLAMO_LCD_HV_RETR_END_MASK, retr_end); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_DISP_START, -+ GLAMO_LCD_HV_RETR_DISP_START_MASK, disp_start); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_DISP_END, -+ GLAMO_LCD_HV_RETR_DISP_END_MASK, disp_end); -+ -+ glamo_lcd_cmd_mode(gdrm, 0); -+ -+ glamo_crtc_mode_set_base(crtc, 0, 0, old_fb); -+ -+ return 0; -+} -+ -+ -+static void glamo_crtc_prepare(struct drm_crtc *crtc) -+{ -+} -+ -+ -+static void glamo_crtc_commit(struct drm_crtc *crtc) -+{ -+} -+ -+ -+static int glamo_crtc_cursor_set(struct drm_crtc *crtc, -+ struct drm_file *file_priv, -+ uint32_t handle, -+ uint32_t width, uint32_t height) -+{ -+ return 0; -+} -+ -+ -+static int glamo_crtc_cursor_move(struct drm_crtc *crtc, int x, int y) -+{ -+ return 0; -+} -+ -+ -+static void glamo_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, -+ u16 *blue, uint32_t size) -+{ -+} -+ -+ -+static void glamo_crtc_destroy(struct drm_crtc *crtc) -+{ -+ struct glamo_crtc *glamo_crtc = to_glamo_crtc(crtc); -+ drm_crtc_cleanup(crtc); -+ kfree(glamo_crtc); -+} -+ -+ -+static enum drm_connector_status -+glamo_connector_detect(struct drm_connector *connector) -+{ -+ /* One hopes it hasn't been de-soldered... */ -+ return connector_status_connected; -+} -+ -+ -+static void glamo_connector_destroy(struct drm_connector *connector) -+{ -+ drm_sysfs_connector_remove(connector); -+ drm_connector_cleanup(connector); -+ kfree(connector); -+} -+ -+ -+static int glamo_connector_get_modes(struct drm_connector *connector) -+{ -+ struct drm_display_mode *mode; -+ struct glamo_fb_platform_data *fb_info; -+ struct glamo_output *goutput = to_glamo_output(connector); -+ struct glamodrm_handle *gdrm = goutput->gdrm; -+ -+ /* Dig out the record which will tell us about the hardware */ -+ fb_info = gdrm->glamo_core->pdata->fb_data; -+ -+ mode = drm_mode_create(connector->dev); -+ if (!mode) -+ return 0; -+ /* Fill in 'mode' here */ -+ mode->type = DRM_MODE_TYPE_DEFAULT | DRM_MODE_TYPE_PREFERRED; -+ -+ /* Convert framebuffer timings into KMS timings */ -+ mode->clock = 1000000000UL / fb_info->modes[0].pixclock; /* ps -> kHz */ -+ mode->clock *= 1000; /* kHz -> Hz */ -+ mode->hdisplay = fb_info->modes[0].xres; -+ mode->hsync_start = fb_info->modes[0].right_margin + mode->hdisplay; -+ mode->hsync_end = mode->hsync_start + fb_info->modes[0].hsync_len; -+ mode->htotal = mode->hsync_end + fb_info->modes[0].left_margin; -+ mode->hskew = 0; -+ -+ mode->vdisplay = fb_info->modes[0].yres; -+ mode->vsync_start = fb_info->modes[0].lower_margin + mode->vdisplay; -+ mode->vsync_end = mode->vsync_start + fb_info->modes[0].vsync_len; -+ mode->vtotal = mode->vsync_end + fb_info->modes[0].upper_margin; -+ mode->vscan = 0; -+ -+ /* Physical size */ -+ mode->width_mm = fb_info->width; -+ mode->height_mm = fb_info->height; -+ -+ drm_mode_set_name(mode); -+ drm_mode_probed_add(connector, mode); -+ -+ return 1; /* one mode, for now */ -+} -+ -+ -+static int glamo_connector_set_property(struct drm_connector *connector, -+ struct drm_property *property, -+ uint64_t value) -+{ -+ return 0; -+} -+ -+ -+static int glamo_connector_mode_valid(struct drm_connector *connector, -+ struct drm_display_mode *mode) -+{ -+ if (mode->flags & DRM_MODE_FLAG_DBLSCAN) -+ return MODE_NO_DBLESCAN; -+ -+ return MODE_OK; -+} -+ -+ -+struct drm_encoder * -+glamo_connector_best_encoder(struct drm_connector *connector) -+{ -+ struct glamo_output *glamo_output = to_glamo_output(connector); -+ return &glamo_output->enc; -+} -+ -+ -+static void glamo_encoder_dpms(struct drm_encoder *encoder, int mode) -+{ -+} -+ -+ -+static bool glamo_encoder_mode_fixup(struct drm_encoder *encoder, -+ struct drm_display_mode *mode, -+ struct drm_display_mode *adjusted_mode) -+{ -+ return true; -+} -+ -+ -+void glamo_encoder_prepare(struct drm_encoder *encoder) -+{ -+} -+ -+ -+void glamo_encoder_commit(struct drm_encoder *encoder) -+{ -+} -+ -+ -+static void glamo_encoder_mode_set(struct drm_encoder *encoder, -+ struct drm_display_mode *mode, -+ struct drm_display_mode *adjusted_mode) -+{ -+} -+ -+ -+static void glamo_encoder_destroy(struct drm_encoder *encoder) -+{ -+ drm_encoder_cleanup(encoder); -+} -+ -+ -+static void glamo_framebuffer_destroy(struct drm_framebuffer *fb) -+{ -+ struct glamo_framebuffer *glamo_fb = to_glamo_framebuffer(fb); -+ struct drm_device *dev = fb->dev; -+ -+ drm_framebuffer_cleanup(fb); -+ mutex_lock(&dev->struct_mutex); -+ drm_gem_object_unreference(glamo_fb->obj); -+ mutex_unlock(&dev->struct_mutex); -+ -+ kfree(glamo_fb); -+} -+ -+static int glamo_framebuffer_create_handle(struct drm_framebuffer *fb, -+ struct drm_file *file_priv, -+ unsigned int *handle) -+{ -+ struct glamo_framebuffer *glamo_fb = to_glamo_framebuffer(fb); -+ struct drm_gem_object *object = glamo_fb->obj; -+ -+ return drm_gem_handle_create(file_priv, object, handle); -+} -+ -+ -+static const struct drm_framebuffer_funcs glamo_fb_funcs = { -+ .destroy = glamo_framebuffer_destroy, -+ .create_handle = glamo_framebuffer_create_handle, -+}; -+ -+ -+int glamo_framebuffer_create(struct drm_device *dev, -+ struct drm_mode_fb_cmd *mode_cmd, -+ struct drm_framebuffer **fb, -+ struct drm_gem_object *obj) -+{ -+ struct glamo_framebuffer *glamo_fb; -+ int ret; -+ -+ glamo_fb = kzalloc(sizeof(*glamo_fb), GFP_KERNEL); -+ if (!glamo_fb) -+ return -ENOMEM; -+ -+ ret = drm_framebuffer_init(dev, &glamo_fb->base, &glamo_fb_funcs); -+ if (ret) { -+ DRM_ERROR("framebuffer init failed %d\n", ret); -+ return ret; -+ } -+ -+ drm_helper_mode_fill_fb_struct(&glamo_fb->base, mode_cmd); -+ -+ glamo_fb->obj = obj; -+ -+ *fb = &glamo_fb->base; -+ -+ return 0; -+} -+ -+ -+static struct drm_framebuffer * -+glamo_user_framebuffer_create(struct drm_device *dev, -+ struct drm_file *filp, -+ struct drm_mode_fb_cmd *mode_cmd) -+{ -+ struct drm_gem_object *obj; -+ struct drm_framebuffer *fb; -+ int ret; -+ -+ obj = drm_gem_object_lookup(dev, filp, mode_cmd->handle); -+ if (!obj) -+ return NULL; -+ -+ ret = glamo_framebuffer_create(dev, mode_cmd, &fb, obj); -+ if (ret) { -+ drm_gem_object_unreference(obj); -+ return NULL; -+ } -+ -+ return fb; -+} -+ -+ -+int glamo_fbchanged(struct drm_device *dev) -+{ -+ return 0; -+} -+ -+ -+/* CRTC functions */ -+static const struct drm_crtc_funcs glamo_crtc_funcs = { -+ .cursor_set = glamo_crtc_cursor_set, -+ .cursor_move = glamo_crtc_cursor_move, -+ .gamma_set = glamo_crtc_gamma_set, -+ .set_config = drm_crtc_helper_set_config, -+ .destroy = glamo_crtc_destroy, -+}; -+ -+ -+/* CRTC helper functions */ -+static const struct drm_crtc_helper_funcs glamo_crtc_helper_funcs = { -+ .dpms = glamo_crtc_dpms, -+ .mode_fixup = glamo_crtc_mode_fixup, -+ .mode_set = glamo_crtc_mode_set, -+ .mode_set_base = glamo_crtc_mode_set_base, -+ .prepare = glamo_crtc_prepare, -+ .commit = glamo_crtc_commit, -+}; -+ -+ -+/* Connector functions */ -+static const struct drm_connector_funcs glamo_connector_funcs = { -+ .detect = glamo_connector_detect, -+ .fill_modes = drm_helper_probe_single_connector_modes, -+ .destroy = glamo_connector_destroy, -+ .set_property = glamo_connector_set_property, -+}; -+ -+ -+/* Connector helper functions */ -+static const struct drm_connector_helper_funcs glamo_connector_helper_funcs = { -+ .mode_valid = glamo_connector_mode_valid, -+ .get_modes = glamo_connector_get_modes, -+ .best_encoder = glamo_connector_best_encoder, -+}; -+ -+ -+/* Encoder functions */ -+static const struct drm_encoder_funcs glamo_encoder_funcs = { -+ .destroy = glamo_encoder_destroy, -+}; -+ -+ -+/* Encoder helper functions */ -+static const struct drm_encoder_helper_funcs glamo_encoder_helper_funcs = { -+ .dpms = glamo_encoder_dpms, -+ .mode_fixup = glamo_encoder_mode_fixup, -+ .prepare = glamo_encoder_prepare, -+ .commit = glamo_encoder_commit, -+ .mode_set = glamo_encoder_mode_set, -+}; -+ -+ -+/* Mode functions */ -+static const struct drm_mode_config_funcs glamo_mode_funcs = { -+ .fb_create = glamo_user_framebuffer_create, -+ .fb_changed = glamo_fbchanged -+}; -+ -+ -+static struct drm_mode_set kernelfb_mode; -+ -+ -+/* Restore's the kernel's fbcon mode, used for panic path */ -+void glamo_display_restore(void) -+{ -+ drm_crtc_helper_set_config(&kernelfb_mode); -+} -+ -+ -+static int glamo_display_panic(struct notifier_block *n, unsigned long ununsed, -+ void *panic_str) -+{ -+ DRM_ERROR("panic occurred, switching back to text console\n"); -+ -+ glamo_display_restore(); -+ return 0; -+} -+ -+ -+static struct notifier_block paniced = { -+ .notifier_call = glamo_display_panic, -+}; -+ -+ -+int glamo_display_init(struct drm_device *dev) -+{ -+ struct glamodrm_handle *gdrm; -+ struct glamo_crtc *glamo_crtc; -+ struct glamo_output *glamo_output; -+ struct drm_connector *connector; -+ struct glamo_framebuffer *glamo_fb; -+ struct fb_info *info; -+ struct glamofb_par *par; -+ struct drm_mode_set *modeset; -+ -+ gdrm = dev->dev_private; -+ -+ /* Initial setup of the LCD controller */ -+ glamo_engine_enable(gdrm->glamo_core, GLAMO_ENGINE_LCD); -+ glamo_engine_reset(gdrm->glamo_core, GLAMO_ENGINE_LCD); -+ -+ glamo_run_lcd_script(gdrm, lcd_init_script, -+ ARRAY_SIZE(lcd_init_script)); -+ -+ drm_mode_config_init(dev); -+ -+ dev->mode_config.min_width = 240; -+ dev->mode_config.min_height = 320; -+ dev->mode_config.max_width = 480; -+ dev->mode_config.max_height = 640; -+ -+ dev->mode_config.funcs = (void *)&glamo_mode_funcs; -+ -+ /* Initialise our CRTC object. -+ * Only one connector per CRTC. We know this: it's kind of soldered. */ -+ glamo_crtc = kzalloc(sizeof(struct glamo_crtc) -+ + sizeof(struct drm_connector *), GFP_KERNEL); -+ if (glamo_crtc == NULL) return 1; -+ glamo_crtc->gdrm = gdrm; -+ glamo_crtc->blank_mode = DRM_MODE_DPMS_OFF; -+ drm_crtc_init(dev, &glamo_crtc->base, &glamo_crtc_funcs); -+ drm_crtc_helper_add(&glamo_crtc->base, &glamo_crtc_helper_funcs); -+ -+ glamo_crtc->mode_set.crtc = &glamo_crtc->base; -+ glamo_crtc->mode_set.connectors = -+ (struct drm_connector **)(glamo_crtc + 1); -+ glamo_crtc->mode_set.num_connectors = 0; -+ -+ /* Create our "output" object: consists of an output and an encoder */ -+ glamo_output = kzalloc(sizeof(struct glamo_output), GFP_KERNEL); -+ if (glamo_output == NULL) return 1; -+ connector = &glamo_output->base; -+ glamo_output->gdrm = gdrm; -+ -+ /* Initialise the connector */ -+ drm_connector_init(dev, connector, &glamo_connector_funcs, -+ DRM_MODE_CONNECTOR_Unknown); -+ drm_sysfs_connector_add(connector); -+ connector->interlace_allowed = 0; -+ connector->doublescan_allowed = 0; -+ -+ /* Initialise the encoder */ -+ drm_encoder_init(dev, &glamo_output->enc, &glamo_encoder_funcs, -+ DRM_MODE_ENCODER_DAC); -+ glamo_output->enc.possible_crtcs = 1 << 0; -+ drm_mode_connector_attach_encoder(&glamo_output->base, -+ &glamo_output->enc); -+ -+ drm_encoder_helper_add(&glamo_output->enc, &glamo_encoder_helper_funcs); -+ drm_connector_helper_add(connector, &glamo_connector_helper_funcs); -+ -+ drm_helper_initial_config(dev); -+ -+ if (list_empty(&dev->mode_config.fb_kernel_list)) { -+ int ret, cols, cols_g; -+ cols_g = reg_read_lcd(gdrm, GLAMO_REG_LCD_MODE3) & 0xc000; -+ switch ( cols_g ) { -+ case GLAMO_LCD_SRC_RGB565 : -+ cols = GLAMO_FB_RGB565; break; -+ case GLAMO_LCD_SRC_ARGB1555 : -+ cols = GLAMO_FB_ARGB1555; break; -+ case GLAMO_LCD_SRC_ARGB4444 : -+ cols = GLAMO_FB_ARGB4444; break; -+ default : -+ printk(KERN_WARNING "Unrecognised LCD colour mode\n"); -+ cols = GLAMO_FB_RGB565; break; /* Take a guess */ -+ } -+ ret = glamofb_create(dev, 480, 640, 480, 640, cols, &glamo_fb); -+ if (ret) return -EINVAL; -+ } -+ -+ info = glamo_fb->base.fbdev; -+ par = info->par; -+ -+ modeset = &glamo_crtc->mode_set; -+ modeset->fb = &glamo_fb->base; -+ modeset->connectors[0] = connector; -+ -+ par->crtc_ids[0] = glamo_crtc->base.base.id; -+ -+ modeset->num_connectors = 1; -+ modeset->mode = modeset->crtc->desired_mode; -+ -+ par->crtc_count = 1; -+ -+ if (register_framebuffer(info) < 0) -+ return -EINVAL; -+ -+ printk(KERN_INFO "[glamo-drm] fb%d: %s frame buffer device\n", -+ info->node, info->fix.id); -+ -+ /* Switch back to kernel console on panic */ -+ kernelfb_mode = *modeset; -+ atomic_notifier_chain_register(&panic_notifier_list, &paniced); -+ printk(KERN_INFO "[glamo-drm] Registered panic notifier\n"); -+ -+ return 0; -+} -+ -+ -+void glamo_display_suspend(struct glamodrm_handle *gdrm) -+{ -+ gdrm->saved_width = reg_read_lcd(gdrm, GLAMO_REG_LCD_WIDTH); -+ gdrm->saved_height = reg_read_lcd(gdrm, GLAMO_REG_LCD_HEIGHT); -+ gdrm->saved_pitch = reg_read_lcd(gdrm, GLAMO_REG_LCD_PITCH); -+ gdrm->saved_htotal = reg_read_lcd(gdrm, GLAMO_REG_LCD_HORIZ_TOTAL); -+ gdrm->saved_hrtrst = reg_read_lcd(gdrm, GLAMO_REG_LCD_HORIZ_RETR_START); -+ gdrm->saved_hrtren = reg_read_lcd(gdrm, GLAMO_REG_LCD_HORIZ_RETR_END); -+ gdrm->saved_hdspst = reg_read_lcd(gdrm, GLAMO_REG_LCD_HORIZ_DISP_START); -+ gdrm->saved_hdspen = reg_read_lcd(gdrm, GLAMO_REG_LCD_HORIZ_DISP_END); -+ gdrm->saved_vtotal = reg_read_lcd(gdrm, GLAMO_REG_LCD_VERT_TOTAL); -+ gdrm->saved_vrtrst = reg_read_lcd(gdrm, GLAMO_REG_LCD_VERT_RETR_START); -+ gdrm->saved_vrtren = reg_read_lcd(gdrm, GLAMO_REG_LCD_VERT_RETR_END); -+ gdrm->saved_vdspst = reg_read_lcd(gdrm, GLAMO_REG_LCD_VERT_DISP_START); -+ gdrm->saved_vdspen = reg_read_lcd(gdrm, GLAMO_REG_LCD_VERT_DISP_END); -+} -+ -+ -+void glamo_display_resume(struct glamodrm_handle *gdrm) -+{ -+ glamo_engine_enable(gdrm->glamo_core, GLAMO_ENGINE_LCD); -+ glamo_engine_reset(gdrm->glamo_core, GLAMO_ENGINE_LCD); -+ glamo_run_lcd_script(gdrm, lcd_init_script, -+ ARRAY_SIZE(lcd_init_script)); -+ -+ /* Enable pixel clock */ -+ glamo_engine_clkreg_set(gdrm->glamo_core, -+ GLAMO_ENGINE_LCD, -+ GLAMO_CLOCK_LCD_EN_DCLK, -+ GLAMO_CLOCK_LCD_EN_DCLK); -+ -+ /* Restore timings */ -+ glamo_lcd_cmd_mode(gdrm, 1); -+ glamo_engine_reclock(gdrm->glamo_core, GLAMO_ENGINE_LCD, -+ gdrm->saved_clock); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_WIDTH, GLAMO_LCD_WIDTH_MASK, -+ gdrm->saved_width); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HEIGHT, GLAMO_LCD_HEIGHT_MASK, -+ gdrm->saved_height); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_PITCH, GLAMO_LCD_PITCH_MASK, -+ gdrm->saved_pitch); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_TOTAL, -+ GLAMO_LCD_HV_TOTAL_MASK, gdrm->saved_htotal); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_RETR_START, -+ GLAMO_LCD_HV_RETR_START_MASK, gdrm->saved_hrtrst); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_RETR_END, -+ GLAMO_LCD_HV_RETR_END_MASK, gdrm->saved_hrtren); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_DISP_START, -+ GLAMO_LCD_HV_RETR_DISP_START_MASK, -+ gdrm->saved_hdspst); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_HORIZ_DISP_END, -+ GLAMO_LCD_HV_RETR_DISP_END_MASK, -+ gdrm->saved_hdspen); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_TOTAL, -+ GLAMO_LCD_HV_TOTAL_MASK, gdrm->saved_vtotal); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_RETR_START, -+ GLAMO_LCD_HV_RETR_START_MASK, gdrm->saved_vrtrst); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_RETR_END, -+ GLAMO_LCD_HV_RETR_END_MASK, gdrm->saved_vrtren); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_DISP_START, -+ GLAMO_LCD_HV_RETR_DISP_START_MASK, -+ gdrm->saved_vdspst); -+ reg_set_bit_mask_lcd(gdrm, GLAMO_REG_LCD_VERT_DISP_END, -+ GLAMO_LCD_HV_RETR_DISP_END_MASK, -+ gdrm->saved_vdspen); -+ glamo_lcd_cmd_mode(gdrm, 0); -+} -diff --git a/drivers/mfd/glamo/glamo-display.h b/drivers/mfd/glamo/glamo-display.h -new file mode 100644 -index 0000000..d6f21bc ---- /dev/null -+++ b/drivers/mfd/glamo/glamo-display.h -@@ -0,0 +1,39 @@ -+/* Smedia Glamo 336x/337x Display -+ * -+ * Copyright (c) 2008-2009 Thomas White <[email protected]> -+ * -+ * All rights reserved. -+ * -+ * 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., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#ifndef __GLAMO_DISPLAY_H -+#define __GLAMO_DISPLAY_H -+ -+#include <drm/drmP.h> -+#include "glamo-drm-private.h" -+ -+extern int glamo_display_init(struct drm_device *dev); -+ -+extern int glamo_framebuffer_create(struct drm_device *dev, -+ struct drm_mode_fb_cmd *mode_cmd, -+ struct drm_framebuffer **fb, -+ struct drm_gem_object *obj); -+ -+extern void glamo_display_suspend(struct glamodrm_handle *gdrm); -+extern void glamo_display_resume(struct glamodrm_handle *gdrm); -+ -+#endif /* __GLAMO_DISPLAY_H */ -diff --git a/drivers/mfd/glamo/glamo-drm-drv.c b/drivers/mfd/glamo/glamo-drm-drv.c -new file mode 100644 -index 0000000..81215f4 ---- /dev/null -+++ b/drivers/mfd/glamo/glamo-drm-drv.c -@@ -0,0 +1,453 @@ -+/* Smedia Glamo 336x/337x Graphics Driver -+ * -+ * Copyright (C) 2009 Openmoko, Inc. Jorge Luis Zapata <[email protected]> -+ * Copyright (C) 2008-2009 Thomas White <[email protected]> -+ * Copyright (C) 2009 Andreas Pokorny <[email protected]> -+ * -+ * All rights reserved. -+ * -+ * 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., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+ -+#include <linux/module.h> -+#include <linux/platform_device.h> -+#include <drm/drmP.h> -+#include <drm/glamo_drm.h> -+#include <linux/glamofb.h> -+ -+#include "glamo-core.h" -+#include "glamo-cmdq.h" -+#include "glamo-buffer.h" -+#include "glamo-drm-private.h" -+#include "glamo-display.h" -+#include "glamo-kms-fb.h" -+#include "glamo-fence.h" -+ -+#define DRIVER_AUTHOR "Openmoko, Inc." -+#define DRIVER_NAME "glamo-drm" -+#define DRIVER_DESC "SMedia Glamo 3362" -+#define DRIVER_DATE "20090614" -+ -+ -+static int glamo_ioctl_swap(struct drm_device *dev, void *data, -+ struct drm_file *file_priv) -+{ -+ printk(KERN_INFO "glamo_ioctl_swap\n"); -+ return 0; -+} -+ -+ -+static int glamo_ioctl_gem_info(struct drm_device *dev, void *data, -+ struct drm_file *file_priv) -+{ -+ printk(KERN_INFO "glamo_ioctl_gem_info\n"); -+ return 0; -+} -+ -+ -+struct drm_ioctl_desc glamo_ioctls[] = { -+ DRM_IOCTL_DEF(DRM_GLAMO_CMDBUF, glamo_ioctl_cmdbuf, DRM_AUTH), -+ DRM_IOCTL_DEF(DRM_GLAMO_SWAP, glamo_ioctl_swap, DRM_AUTH), -+ DRM_IOCTL_DEF(DRM_GLAMO_CMDBURST, glamo_ioctl_cmdburst, DRM_AUTH), -+ DRM_IOCTL_DEF(DRM_GLAMO_GEM_INFO, glamo_ioctl_gem_info, DRM_AUTH), -+ DRM_IOCTL_DEF(DRM_GLAMO_GEM_CREATE, glamo_ioctl_gem_create, DRM_AUTH), -+ DRM_IOCTL_DEF(DRM_GLAMO_GEM_MMAP, glamo_ioctl_gem_mmap, DRM_AUTH), -+ DRM_IOCTL_DEF(DRM_GLAMO_GEM_PIN, glamo_ioctl_gem_pin, DRM_AUTH), -+ DRM_IOCTL_DEF(DRM_GLAMO_GEM_UNPIN, glamo_ioctl_gem_unpin, DRM_AUTH), -+ DRM_IOCTL_DEF(DRM_GLAMO_GEM_PREAD, glamo_ioctl_gem_pread, DRM_AUTH), -+ DRM_IOCTL_DEF(DRM_GLAMO_GEM_PWRITE, glamo_ioctl_gem_pwrite, DRM_AUTH), -+ DRM_IOCTL_DEF(DRM_GLAMO_GEM_WAIT_RENDERING, -+ glamo_ioctl_wait_rendering, DRM_AUTH), -+}; -+ -+ -+static int glamodrm_firstopen(struct drm_device *dev) -+{ -+ DRM_DEBUG("\n"); -+ return 0; -+} -+ -+ -+static int glamodrm_open(struct drm_device *dev, struct drm_file *fh) -+{ -+ DRM_DEBUG("\n"); -+ return 0; -+} -+ -+ -+static void glamodrm_preclose(struct drm_device *dev, struct drm_file *fh) -+{ -+ DRM_DEBUG("\n"); -+} -+ -+static void glamodrm_postclose(struct drm_device *dev, struct drm_file *fh) -+{ -+ DRM_DEBUG("\n"); -+} -+ -+ -+static void glamodrm_lastclose(struct drm_device *dev) -+{ -+ DRM_DEBUG("\n"); -+} -+ -+ -+static int glamodrm_master_create(struct drm_device *dev, -+ struct drm_master *master) -+{ -+ DRM_DEBUG("\n"); -+ -+ return 0; -+} -+ -+ -+static void glamodrm_master_destroy(struct drm_device *dev, -+ struct drm_master *master) -+{ -+ DRM_DEBUG("\n"); -+} -+ -+ -+static int glamodrm_load(struct drm_device *dev, unsigned long flags) -+{ -+ struct glamodrm_handle *gdrm; -+ gdrm = dev->dev_private; -+ -+ glamo_buffer_init(gdrm); -+ glamo_cmdq_init(gdrm); -+ glamo_fence_init(gdrm); -+ glamo_display_init(dev); -+ -+ return 0; -+} -+ -+ -+static int glamodrm_unload(struct drm_device *dev) -+{ -+ struct glamodrm_handle *gdrm; -+ -+ gdrm = dev->dev_private; -+ -+ glamo_engine_disable(gdrm->glamo_core, GLAMO_ENGINE_2D); -+ glamo_engine_disable(gdrm->glamo_core, GLAMO_ENGINE_3D); -+ glamo_buffer_final(gdrm); -+ glamo_fence_shutdown(gdrm); -+ -+ return 0; -+} -+ -+ -+static struct vm_operations_struct glamodrm_gem_vm_ops = { -+ .fault = glamodrm_gem_fault, -+}; -+ -+static struct drm_driver glamodrm_drm_driver = { -+ .driver_features = DRIVER_IS_PLATFORM | DRIVER_GEM | DRIVER_MODESET, -+ .firstopen = glamodrm_firstopen, -+ .load = glamodrm_load, -+ .unload = glamodrm_unload, -+ .open = glamodrm_open, -+ .preclose = glamodrm_preclose, -+ .postclose = glamodrm_postclose, -+ .lastclose = glamodrm_lastclose, -+ .reclaim_buffers = drm_core_reclaim_buffers, -+ .get_map_ofs = drm_core_get_map_ofs, -+ .get_reg_ofs = drm_core_get_reg_ofs, -+ .master_create = glamodrm_master_create, -+ .master_destroy = glamodrm_master_destroy, -+ .gem_init_object = glamodrm_gem_init_object, -+ .gem_free_object = glamodrm_gem_free_object, -+ .gem_vm_ops = &glamodrm_gem_vm_ops, -+ .ioctls = glamo_ioctls, -+ .fops = { -+ .owner = THIS_MODULE, -+ .open = drm_open, -+ .release = drm_release, -+ .ioctl = drm_ioctl, -+ .mmap = drm_gem_mmap, -+ .poll = drm_poll, -+ .fasync = drm_fasync, -+ }, -+ .major = 0, -+ .minor = 1, -+ .patchlevel = 0, -+ .name = DRIVER_NAME, -+ .desc = DRIVER_DESC, -+ .date = DRIVER_DATE, -+}; -+ -+ -+static int glamodrm_probe(struct platform_device *pdev) -+{ -+ int rc; -+ struct glamodrm_handle *gdrm; -+ struct glamo_core *core = dev_get_drvdata(pdev->dev.parent); -+ -+ printk(KERN_INFO "[glamo-drm] SMedia Glamo Direct Rendering Support\n"); -+ -+ gdrm = kzalloc(sizeof(*gdrm), GFP_KERNEL); -+ if ( !gdrm ) -+ return -ENOMEM; -+ platform_set_drvdata(pdev, gdrm); -+ gdrm->glamo_core = core; -+ gdrm->dev = &pdev->dev; -+ -+ /* Find the command queue registers */ -+ gdrm->reg = platform_get_resource_byname(pdev, IORESOURCE_MEM, -+ "glamo-cmdq-regs"); -+ if ( !gdrm->reg ) { -+ dev_err(&pdev->dev, "Unable to find cmdq registers.\n"); -+ rc = -ENOENT; -+ goto out_free; -+ } -+ gdrm->reg = request_mem_region(gdrm->reg->start, -+ resource_size(gdrm->reg), pdev->name); -+ if ( !gdrm->reg ) { -+ dev_err(&pdev->dev, "failed to request MMIO region\n"); -+ rc = -ENOENT; -+ goto out_free; -+ } -+ gdrm->reg_base = ioremap_nocache(gdrm->reg->start, -+ resource_size(gdrm->reg)); -+ if ( !gdrm->reg_base ) { -+ dev_err(&pdev->dev, "failed to ioremap() MMIO registers\n"); -+ rc = -ENOENT; -+ goto out_release_regs; -+ } -+ -+ /* Find the command queue itself */ -+ gdrm->cmdq = platform_get_resource_byname(pdev, IORESOURCE_MEM, -+ "glamo-command-queue"); -+ if ( !gdrm->cmdq ) { -+ dev_err(&pdev->dev, "Unable to find command queue.\n"); -+ rc = -ENOENT; -+ goto out_unmap_regs; -+ } -+ gdrm->cmdq = request_mem_region(gdrm->cmdq->start, -+ resource_size(gdrm->cmdq), pdev->name); -+ if ( !gdrm->cmdq ) { -+ dev_err(&pdev->dev, "failed to request command queue region\n"); -+ rc = -ENOENT; -+ goto out_unmap_regs; -+ } -+ gdrm->cmdq_base = ioremap_nocache(gdrm->cmdq->start, -+ resource_size(gdrm->cmdq)); -+ if ( !gdrm->cmdq_base ) { -+ dev_err(&pdev->dev, "failed to ioremap() command queue\n"); -+ rc = -ENOENT; -+ goto out_release_cmdq; -+ } -+ -+ /* Find the VRAM */ -+ gdrm->vram = platform_get_resource_byname(pdev, IORESOURCE_MEM, -+ "glamo-fb-mem"); -+ if ( !gdrm->vram ) { -+ dev_err(&pdev->dev, "Unable to find VRAM.\n"); -+ rc = -ENOENT; -+ goto out_unmap_cmdq; -+ } -+ gdrm->vram = request_mem_region(gdrm->vram->start, -+ resource_size(gdrm->vram), pdev->name); -+ if ( !gdrm->vram ) { -+ dev_err(&pdev->dev, "failed to request VRAM region\n"); -+ rc = -ENOENT; -+ goto out_unmap_cmdq; -+ } -+ -+ /* Find the LCD controller */ -+ gdrm->lcd_regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, -+ "glamo-fb-regs"); -+ if ( !gdrm->lcd_regs ) { -+ dev_err(&pdev->dev, "Unable to find LCD registers.\n"); -+ rc = -ENOENT; -+ goto out_release_vram; -+ } -+ gdrm->lcd_regs = request_mem_region(gdrm->lcd_regs->start, -+ resource_size(gdrm->lcd_regs), -+ pdev->name); -+ if ( !gdrm->lcd_regs ) { -+ dev_err(&pdev->dev, "failed to request LCD registers\n"); -+ rc = -ENOENT; -+ goto out_release_vram; -+ } -+ gdrm->lcd_base = ioremap_nocache(gdrm->lcd_regs->start, -+ resource_size(gdrm->lcd_regs)); -+ if ( !gdrm->lcd_base ) { -+ dev_err(&pdev->dev, "failed to ioremap() LCD registers\n"); -+ rc = -ENOENT; -+ goto out_release_lcd; -+ } -+ -+ /* Find the 2D engine */ -+ gdrm->twod_regs = platform_get_resource(pdev, IORESOURCE_MEM, 4); -+ if ( !gdrm->twod_regs ) { -+ dev_err(&pdev->dev, "Unable to find 2D registers.\n"); -+ rc = -ENOENT; -+ goto out_unmap_lcd; -+ } -+ gdrm->twod_regs = request_mem_region(gdrm->twod_regs->start, -+ resource_size(gdrm->twod_regs), -+ pdev->name); -+ if ( !gdrm->twod_regs ) { -+ dev_err(&pdev->dev, "failed to request 2D registers\n"); -+ rc = -ENOENT; -+ goto out_unmap_lcd; -+ } -+ gdrm->twod_base = ioremap(gdrm->twod_regs->start, -+ resource_size(gdrm->twod_regs)); -+ if ( !gdrm->twod_base ) { -+ dev_err(&pdev->dev, "failed to ioremap() 2D registers\n"); -+ rc = -ENOENT; -+ goto out_release_2d; -+ } -+ -+ /* Hook up IRQ handle for fence processing */ -+ gdrm->twod_irq = platform_get_irq_byname(pdev, "glamo-2d-irq"); -+ rc = request_irq(gdrm->twod_irq, glamo_fence_irq_handler, -+ IRQF_SHARED, pdev->name, gdrm); -+ if ( rc ) { -+ dev_err(&pdev->dev, "failed to register irq.\n"); -+ goto out_unmap_2d; -+ } -+ -+ gdrm->vram_size = GLAMO_FB_SIZE; -+ printk(KERN_INFO "[glamo-drm] %lli bytes of VRAM\n", -+ (long long int)gdrm->vram_size); -+ -+ /* Initialise DRM */ -+ drm_platform_init(&glamodrm_drm_driver, pdev, (void *)gdrm); -+ -+ return 0; -+ -+out_unmap_2d: -+ iounmap(gdrm->twod_base); -+out_release_2d: -+ release_mem_region(gdrm->twod_regs->start, -+ resource_size(gdrm->twod_regs)); -+out_unmap_lcd: -+ iounmap(gdrm->lcd_base); -+out_release_lcd: -+ release_mem_region(gdrm->lcd_regs->start, -+ resource_size(gdrm->lcd_regs)); -+out_release_vram: -+ release_mem_region(gdrm->vram->start, resource_size(gdrm->vram)); -+out_unmap_cmdq: -+ iounmap(gdrm->cmdq_base); -+out_release_cmdq: -+ release_mem_region(gdrm->cmdq->start, resource_size(gdrm->cmdq)); -+out_unmap_regs: -+ iounmap(gdrm->reg_base); -+out_release_regs: -+ release_mem_region(gdrm->reg->start, resource_size(gdrm->reg)); -+out_free: -+ kfree(gdrm); -+ pdev->dev.driver_data = NULL; -+ return rc; -+} -+ -+ -+static int glamodrm_remove(struct platform_device *pdev) -+{ -+ struct glamodrm_handle *gdrm = platform_get_drvdata(pdev); -+ -+ glamo_buffer_final(gdrm); -+ glamo_cmdq_shutdown(gdrm); -+ -+ drm_exit(&glamodrm_drm_driver); -+ -+ platform_set_drvdata(pdev, NULL); -+ -+ /* Release registers */ -+ iounmap(gdrm->reg_base); -+ release_mem_region(gdrm->reg->start, resource_size(gdrm->reg)); -+ -+ /* Release VRAM */ -+ release_mem_region(gdrm->vram->start, resource_size(gdrm->vram)); -+ -+ /* Release command queue */ -+ iounmap(gdrm->cmdq_base); -+ release_mem_region(gdrm->cmdq->start, resource_size(gdrm->cmdq)); -+ -+ /* Release 2D engine */ -+ free_irq(gdrm->twod_irq, gdrm); -+ iounmap(gdrm->twod_base); -+ release_mem_region(gdrm->twod_regs->start, -+ resource_size(gdrm->twod_regs)); -+ -+ kfree(gdrm); -+ -+ return 0; -+} -+ -+ -+static int glamodrm_suspend(struct platform_device *pdev, pm_message_t state) -+{ -+ struct glamodrm_handle *gdrm = platform_get_drvdata(pdev); -+ -+ glamo_kmsfb_suspend(gdrm); -+ glamo_display_suspend(gdrm); -+ glamo_cmdq_suspend(gdrm); -+ -+ /* glamo_core.c will suspend the engines for us */ -+ -+ return 0; -+} -+ -+ -+static int glamodrm_resume(struct platform_device *pdev) -+{ -+ struct glamodrm_handle *gdrm = platform_get_drvdata(pdev); -+ -+ glamo_cmdq_resume(gdrm); -+ glamo_display_resume(gdrm);Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-2.6.31/0003-Work-on-Glamo-core-for-DRM.patch deleted +0
-252Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-2.6.31/0004-Add-JBT6k74-hook-for-use-by-KMS.patch deleted +0
-49Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-2.6.31/0004-gta02_defconfig-Enable-UBI-support.patch deleted +0
-67Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-2.6.31/0005-gta02_defconfig-Enable-UBI-debug.patch deleted +0
-88Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-2.6.31/0006-gta02-defconfig-enable-NFS-and-INOTIFY_USER.patch deleted +0
-124Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-2.6.31/0007-gta02_defconfig-disable-LEDS_GTA02_VIBRATOR.patch deleted +0
-25Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-2.6.31_git.bb deleted +0
-38Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-shr-drm-devel/0001-Add-drm-to-Makefile-version.patch deleted +0
-25Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-shr-drm-devel/0004-gta02_drm_defconfig-start-from-gta02_packaging_defco.patch deleted +0
-129Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-shr-drm-devel/0005-Enable-DRM-and-MFD_GLAMO_DRM.patch deleted +0
-51Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-shr-drm-devel/0006-Enable-I2C_ALGOBIT-from-make-oldconfig.patch deleted +0
-33Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-shr-drm-devel/0007-Enable-UBI-UBIFS.patch deleted +0
-81Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-shr-drm-devel/fix-install.patch deleted +0
-23Lines of this file are not shown. View the raw message.
recipes/linux/linux-openmoko-shr-drm-devel_git.bb deleted +0
-31Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 8 lines
1.7.1 _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Part of the diff is not shown here. View the raw message.
PATCH 2/3 linux-openmoko: remove linux-openmoko-devel as it will be merged with linux-openmoko-shr-devel to linux-openmoko_2.6.29
In reply to Martin Jansa--- .../linux/linux-openmoko-devel/defconfig-oe.patch | 12 ------- recipes/linux/linux-openmoko-devel_git.bb | 34 -------------------- 2 files changed, 0 insertions(+), 46 deletions(-) delete mode 100644 recipes/linux/linux-openmoko-devel/defconfig-oe.patch delete mode 100644 recipes/linux/linux-openmoko-devel_git.bb
recipes/linux/linux-openmoko-devel/defconfig-oe.patch deleted +0 -12
@@ -1,12 +0,0 @@ ---- gta02-packaging-defconfig 2009-01-12 13:09:33.000000000 +0000 -+++ defconfig-oe 2009-01-12 13:18:23.000000000 +0000 -@@ -337,9 +337,6 @@ - # - # At least one emulation must be selected - # --CONFIG_FPE_NWFPE=y --# CONFIG_FPE_NWFPE_XP is not set --# CONFIG_FPE_FASTFPE is not set - - # - # Userspace binary formats
recipes/linux/linux-openmoko-devel_git.bb deleted +0 -34
@@ -1,34 +0,0 @@ -require linux.inc -require linux-openmoko.inc - -DEFAULT_PREFERENCE = "-1" - -KERNEL_RELEASE = "2.6.29" -KERNEL_VERSION = "${KERNEL_RELEASE}" - -SRCREV = "a15608f241a40b41fed5bffe511355c2067c4e88" -OEV = "oe1" -PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" -PR = "r2" - -SRC_URI = "\ - git://git.openmoko.org/git/kernel.git;protocol=git;branch=andy-tracking \ -" -S = "${WORKDIR}/git" - -CONFIG_NAME_om-gta01 = "gta01_moredrivers_defconfig" -CONFIG_NAME_om-gta02 = "gta02_packaging_defconfig" - -do_configure_prepend() { - - # Rename getline in ./scripts/unifdef.c - # Kernels up to 2.6.29 are currently failing to build unifdef.c, - # clashing with exposed getline() from <stdio.h> - # see https://patchwork.kernel.org/patch/11166/ - # committed in 2.6.29 (commit d15bd1067b1fcb2b7250d22bc0c7c7fea0b759f7) - - sed -i -e 's/getline/parseline/g' ${S}/scripts/unifdef.c - - install -m 644 ./arch/arm/configs/${CONFIG_NAME} ${WORKDIR}/defconfig-oe - cat ${WORKDIR}/defconfig-oe.patch | patch -p0 -d ${WORKDIR} -}
Signature · 1 line
1.7.1
Re: [PATCH 2/3] linux-openmoko: remove linux-openmoko-devel as it will be merged with linux-openmoko-shr-devel to linux-openmoko_2.6.29
Quoted 1 line · Martin Jansa
Signed-off-by Martin Jansa <[email protected]>
Quoted 73 lines
--- .../linux/linux-openmoko-devel/defconfig-oe.patch | 12 ------- recipes/linux/linux-openmoko-devel_git.bb | 34 -------------------- 2 files changed, 0 insertions(+), 46 deletions(-) delete mode 100644 recipes/linux/linux-openmoko-devel/defconfig-oe.patch delete mode 100644 recipes/linux/linux-openmoko-devel_git.bbrecipes/linux/linux-openmoko-devel/defconfig-oe.patch deleted +0
-12@@ -1,12 +0,0 @@ ---- gta02-packaging-defconfig 2009-01-12 13:09:33.000000000 +0000 -+++ defconfig-oe 2009-01-12 13:18:23.000000000 +0000 -@@ -337,9 +337,6 @@ - # - # At least one emulation must be selected - # --CONFIG_FPE_NWFPE=y --# CONFIG_FPE_NWFPE_XP is not set --# CONFIG_FPE_FASTFPE is not set - - # - # Userspace binary formatsrecipes/linux/linux-openmoko-devel_git.bb deleted +0
-34@@ -1,34 +0,0 @@ -require linux.inc -require linux-openmoko.inc - -DEFAULT_PREFERENCE = "-1" - -KERNEL_RELEASE = "2.6.29" -KERNEL_VERSION = "${KERNEL_RELEASE}" - -SRCREV = "a15608f241a40b41fed5bffe511355c2067c4e88" -OEV = "oe1" -PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" -PR = "r2" - -SRC_URI = "\ - git://git.openmoko.org/git/kernel.git;protocol=git;branch=andy-tracking \ -" -S = "${WORKDIR}/git" - -CONFIG_NAME_om-gta01 = "gta01_moredrivers_defconfig" -CONFIG_NAME_om-gta02 = "gta02_packaging_defconfig" - -do_configure_prepend() { - - # Rename getline in ./scripts/unifdef.c - # Kernels up to 2.6.29 are currently failing to build unifdef.c, - # clashing with exposed getline() from <stdio.h> - # see https://patchwork.kernel.org/patch/11166/ - # committed in 2.6.29 (commit d15bd1067b1fcb2b7250d22bc0c7c7fea0b759f7) - - sed -i -e 's/getline/parseline/g' ${S}/scripts/unifdef.c - - install -m 644 ./arch/arm/configs/${CONFIG_NAME} ${WORKDIR}/defconfig-oe - cat ${WORKDIR}/defconfig-oe.patch | patch -p0 -d ${WORKDIR} -}Signature · 7 lines
1.7.1 _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
PATCH 3/3 linux-openmoko: rename recipes to common PN_PV scheme and adjust om-gta* machine configs
In reply to Martin Jansa* unify preferred provider and version for om-gta02
--- conf/distro/openmoko.conf | 8 - conf/machine/om-3d7k.conf | 3 +- conf/machine/om-gta01.conf | 12 +-- conf/machine/om-gta02.conf | 10 +- recipes/linux/linux-openmoko-2.6.24_git.bb | 28 ---- recipes/linux/linux-openmoko-2.6.28_git.bb | 28 ---- .../0007-Enable-UBI-UBIFS.patch | 149 ++++++++++++++++++++ .../linux/linux-openmoko-2.6.29/fix-install.patch | 23 +++ recipes/linux/linux-openmoko-2.6.32_git.bb | 46 ------ recipes/linux/linux-openmoko-2.6.34_git.bb | 39 ----- .../0007-Enable-UBI-UBIFS.patch | 149 -------------------- .../linux-openmoko-shr-devel/fix-install.patch | 23 --- recipes/linux/linux-openmoko-shr-devel_git.bb | 26 ---- recipes/linux/linux-openmoko_2.6.24.bb | 28 ++++ recipes/linux/linux-openmoko_2.6.28.bb | 28 ++++ recipes/linux/linux-openmoko_2.6.29.bb | 26 ++++ recipes/linux/linux-openmoko_2.6.32.bb | 46 ++++++ recipes/linux/linux-openmoko_2.6.34_git | 39 +++++ 18 files changed, 347 insertions(+), 364 deletions(-) delete mode 100644 recipes/linux/linux-openmoko-2.6.24_git.bb delete mode 100644 recipes/linux/linux-openmoko-2.6.28_git.bb create mode 100644 recipes/linux/linux-openmoko-2.6.29/0007-Enable-UBI-UBIFS.patch create mode 100644 recipes/linux/linux-openmoko-2.6.29/fix-install.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.32_git.bb delete mode 100644 recipes/linux/linux-openmoko-2.6.34_git.bb delete mode 100644 recipes/linux/linux-openmoko-shr-devel/0007-Enable-UBI-UBIFS.patch delete mode 100644 recipes/linux/linux-openmoko-shr-devel/fix-install.patch delete mode 100644 recipes/linux/linux-openmoko-shr-devel_git.bb create mode 100644 recipes/linux/linux-openmoko_2.6.24.bb create mode 100644 recipes/linux/linux-openmoko_2.6.28.bb create mode 100644 recipes/linux/linux-openmoko_2.6.29.bb create mode 100644 recipes/linux/linux-openmoko_2.6.32.bb create mode 100644 recipes/linux/linux-openmoko_2.6.34_git
conf/distro/openmoko.conf +0 -8
@@ -53,14 +53,6 @@ PREFERRED_VERSION_binutils-cross ?= "2.17.50.0.12" # require conf/distro/include/fso-autorev.inc # override the PACKAGE_ARCH of certain packages for openmoko distro -# -# Same kernel used to run on both these machines... -# Currently not used but left here in case someone wants to switch on -# quickly -#PACKAGE_ARCH_pn-linux-openmoko_om-gta01 = "armv4t" -#PACKAGE_ARCH_pn-linux-openmoko_om-gta02 = "armv4t" -#PACKAGE_ARCH_pn-linux-openmoko-devel_om-gta01 = "armv4t" -#PACKAGE_ARCH_pn-linux-openmoko-devel_om-gta02 = "armv4t" # Same kernel so same usb PACKAGE_ARCH_pn-usb-gadget-mode_om-gta01 = "armv4t"
conf/machine/om-3d7k.conf +2 -1
@@ -6,8 +6,9 @@ TARGET_ARCH = "arm" -PREFERRED_PROVIDER_virtual/kernel ?= "linux-openmoko-devel" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-openmoko" PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" +PREFERRED_VERSION_linux-openmoko ?= "2.6.29" MACHINE_FEATURES = "kernel26 apm alsa bluetooth usbgadget usbhost phone vfat ext2" MACHINE_DISPLAY_WIDTH_PIXELS = "480"
conf/machine/om-gta01.conf +3 -9
@@ -6,16 +6,10 @@ TARGET_ARCH = "arm" -PREFERRED_PROVIDER_virtual/kernel ?= "linux-openmoko-2.6.24" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-openmoko" PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" - -# If you want to have KMS enabled in default kernel, uncomment linux-openmoko-shr-drm-devel -PREFERRED_PROVIDER_virtual/kernel_shr = "linux-openmoko-shr-devel" -#PREFERRED_PROVIDER_virtual/kernel_shr = "linux-openmoko-shr-drm-devel" -#PREFERRED_PROVIDER_virtual/kernel_shr = "linux-openmoko-2.6.31" -#PREFERRED_PROVIDER_virtual/kernel_shr = "linux-openmoko-2.6.32" - -PREFERRED_PROVIDER_virtual/libgl_shr = "mesa-dri" +PREFERRED_VERSION_linux-openmoko ?= "2.6.29" +PREFERRED_PROVIDER_virtual/libgl = "mesa-dri" UBOOT_ENTRYPOINT = "30008000"
conf/machine/om-gta02.conf +3 -7
@@ -6,15 +6,11 @@ TARGET_ARCH = "arm" -PREFERRED_PROVIDER_virtual/kernel ?= "linux-openmoko-2.6.28" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-openmoko" PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" +PREFERRED_VERSION_linux-openmoko ?= "2.6.29" -# If you want to have KMS enabled in default kernel, uncomment linux-openmoko-shr-drm-devel -PREFERRED_PROVIDER_virtual/kernel_shr = "linux-openmoko-shr-devel" -#PREFERRED_PROVIDER_virtual/kernel_shr = "linux-openmoko-shr-drm-devel" -#PREFERRED_PROVIDER_virtual/kernel_shr = "linux-openmoko-2.6.31" - -PREFERRED_PROVIDER_virtual/libgl_shr = "mesa-dri" +PREFERRED_PROVIDER_virtual/libgl = "mesa-dri" # Override only for shr as it needs mesa-dri_git and ie angstrom has preferred_version set to 7.6 MACHINE_DRI_MODULES_shr = "glamo"
recipes/linux/linux-openmoko-2.6.24_git.bb deleted +0 -28
@@ -1,28 +0,0 @@ -require linux.inc -require linux-openmoko.inc - -DESCRIPTION = "The Linux kernel for the Openmoko devices GTA01 (Neo1973) and GTA02 (Neo FreeRunner)" - -KERNEL_RELEASE = "2.6.24" -KERNEL_VERSION = "${KERNEL_RELEASE}" - -SRCREV = "fb42ce6724576fc173faf8abfb04aa2c36d213b7" -OEV = "oe5" -PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" -PR = "r1" - -SRC_URI = "\ - git://git.openmoko.org/git/kernel.git;protocol=git;branch=stable \ - \ - file://0001-squashfs-with-lzma.patch;patch=1 \ - file://0002-squashfs-initrd.patch;patch=1 \ - file://0003-squashfs-force-O2.patch;patch=1 \ - file://0004-squashfs-Kconfig.patch;patch=1 \ - file://0005-squashfs-Makefile.patch;patch=1 \ - \ - file://openwrt-ledtrig-netdev.patch;patch=1 \ - file://gta01-fix-battery-class-name.patch;patch=1 \ - \ - file://defconfig-oe \ -" -S = "${WORKDIR}/git"
recipes/linux/linux-openmoko-2.6.28_git.bb deleted +0 -28
@@ -1,28 +0,0 @@ -require linux.inc -require linux-openmoko.inc - -DESCRIPTION_${PN} = "Linux ${KERNEL_RELEASE} kernel for the Openmoko Neo GSM Smartphones" - -KERNEL_RELEASE = "2.6.28" -KERNEL_VERSION = "${KERNEL_RELEASE}" - -SRCREV = "8c65792a5c83c76d662a617a7c4e1ae8104bb6a5" -OEV = "oe2" -PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" -PR = "r0" - -SRC_URI = "\ - git://git.openmoko.org/git/kernel.git;protocol=git;branch=stable \ - file://defconfig-oe.patch \ -" -S = "${WORKDIR}/git" - -CONFIG_NAME_om-gta01 = "gta01_moredrivers_defconfig" -CONFIG_NAME_om-gta02 = "gta02_packaging_defconfig" - -do_configure_prepend() { - install -m 644 ./arch/arm/configs/${CONFIG_NAME} ${WORKDIR}/defconfig-oe - cat ${WORKDIR}/defconfig-oe.patch | patch -p0 -d ${WORKDIR} -} - -
recipes/linux/linux-openmoko-2.6.29/0007-Enable-UBI-UBIFS.patch new file +149 -0
149 lines not on this page · raw message
recipes/linux/linux-openmoko-2.6.29/fix-install.patch new file +23 -0
@@ -0,0 +1,23 @@ +From: Steve Sakoman <[email protected]> +Date: Mon, 18 Aug 2008 16:07:31 +0000 (-0700) +Subject: scripts/Makefile.fwinst: add missing space when setting mode in cmd_install +X-Git-Url: http://www.sakoman.net/cgi-bin/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff_plain;h=f039944bdd491cde7327133e9976881d3133ae70 + +scripts/Makefile.fwinst: add missing space when setting mode in cmd_install + +This was causing build failures on some machines +--- + +diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst +index 6bf8e87..fb20532 100644 +--- a/scripts/Makefile.fwinst ++++ b/scripts/Makefile.fwinst +@@ -37,7 +37,7 @@ + @true + + quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@) +- cmd_install = $(INSTALL) -m0644 $< $@ ++ cmd_install = $(INSTALL) -m 0644 $< $@ + + $(installed-fw-dirs): + $(call cmd,mkdir)
recipes/linux/linux-openmoko-2.6.32_git.bb deleted +0 -46
46 lines not on this page · raw message
recipes/linux/linux-openmoko-2.6.34_git.bb deleted +0 -39
@@ -1,39 +0,0 @@ -require linux.inc -require linux-openmoko.inc - -DESCRIPTION_${PN} = "Linux ${KERNEL_RELEASE} kernel for the Openmoko Neo GSM Smartphones" - -KERNEL_RELEASE="2.6.34" - -SRCREV = "dd1225cc08c3375bf80289ac1965c724881b149a" -OEV = "oe2" -PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" - -SRC_URI = "\ - git://git.openmoko.org/git/kernel.git;protocol=git;branch=om-gta02-2.6.34 \ -# build fix - file://wm8753-fix-build-with-gcc-4.4.2-which-works-ok-with-.patch;patch=1 \ -# patches from Thomas White's gdrm-for-merging branch - file://0001-DRM-for-platform-devices.patch;patch=1 \ - file://0002-Glamo-DRM-and-KMS-driver.patch;patch=1 \ - file://0003-Work-on-Glamo-core-for-DRM.patch;patch=1 \ - file://0004-JBT6k74-work-for-KMS.patch;patch=1 \ - file://0005-Fix-crash-when-reading-Glamo-registers-via-sysfs.patch;patch=1 \ - file://0006-Fix-dynamic-command-queue-allocation.patch;patch=1 \ - file://0007-Debug-statements-for-testing.patch;patch=1 \ - file://0008-Fix-claim-of-2D-register-resource.patch;patch=1 \ - file://0009-Use-unlocked_ioctl-rather-than-ioctl.patch;patch=1 \ -# patches from Radek Polak used in qtmoko - file://0001-accels.patch.patch;patch=1 \ - file://0002-usbhost.patch.patch;patch=1 \ - file://0003-ar6000_delay.patch.patch;patch=1 \ - file://0004-save_regs.patch.patch;patch=1 \ -" - -S = "${WORKDIR}/git" - -CONFIG_NAME_om-gta02 = "gta02_drm_defconfig" - -do_configure_prepend() { - install -m 644 ./arch/arm/configs/${CONFIG_NAME} ${WORKDIR}/defconfig-oe -}
recipes/linux/linux-openmoko-shr-devel/0007-Enable-UBI-UBIFS.patch deleted +0 -149
149 lines not on this page · raw message
recipes/linux/linux-openmoko-shr-devel/fix-install.patch deleted +0 -23
@@ -1,23 +0,0 @@ -From: Steve Sakoman <[email protected]> -Date: Mon, 18 Aug 2008 16:07:31 +0000 (-0700) -Subject: scripts/Makefile.fwinst: add missing space when setting mode in cmd_install -X-Git-Url: http://www.sakoman.net/cgi-bin/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff_plain;h=f039944bdd491cde7327133e9976881d3133ae70 - -scripts/Makefile.fwinst: add missing space when setting mode in cmd_install - -This was causing build failures on some machines ---- - -diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst -index 6bf8e87..fb20532 100644 ---- a/scripts/Makefile.fwinst -+++ b/scripts/Makefile.fwinst -@@ -37,7 +37,7 @@ - @true - - quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@) -- cmd_install = $(INSTALL) -m0644 $< $@ -+ cmd_install = $(INSTALL) -m 0644 $< $@ - - $(installed-fw-dirs): - $(call cmd,mkdir)
recipes/linux/linux-openmoko-shr-devel_git.bb deleted +0 -26
@@ -1,26 +0,0 @@ -require linux.inc -require linux-openmoko.inc - -DESCRIPTION_${PN} = "Linux ${KERNEL_VERSION} kernel for the Openmoko Neo GSM Smartphones" - -KERNEL_RELEASE = "2.6.29" -KERNEL_VERSION = "2.6.29-rc3" - -SRCREV = "973a41fce60e5f6edfcf0eaf94056a57eee65e16" -OMV = "oe11" -PV = "${KERNEL_RELEASE}-${OMV}+gitr${SRCPV}" -PR = "r8" - -SRC_URI = "\ - git://git.openmoko.org/git/kernel.git;protocol=git;branch=andy-tracking \ - file://fix-install.patch;patch=1 \ - file://0007-Enable-UBI-UBIFS.patch;patch=1 \ -" -S = "${WORKDIR}/git" - -CONFIG_NAME_om-gta01 = "gta01_moredrivers_defconfig" -CONFIG_NAME_om-gta02 = "gta02_packaging_defconfig" - -do_configure_prepend() { - install -m 644 ./arch/arm/configs/${CONFIG_NAME} ${WORKDIR}/defconfig-oe -}
recipes/linux/linux-openmoko_2.6.24.bb new file +28 -0
@@ -0,0 +1,28 @@ +require linux.inc +require linux-openmoko.inc + +DESCRIPTION = "The Linux kernel for the Openmoko devices GTA01 (Neo1973) and GTA02 (Neo FreeRunner)" + +KERNEL_RELEASE = "2.6.24" +KERNEL_VERSION = "${KERNEL_RELEASE}" + +SRCREV = "fb42ce6724576fc173faf8abfb04aa2c36d213b7" +OEV = "oe5" +PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" +PR = "r1" + +SRC_URI = "\ + git://git.openmoko.org/git/kernel.git;protocol=git;branch=stable \ + \ + file://0001-squashfs-with-lzma.patch;patch=1 \ + file://0002-squashfs-initrd.patch;patch=1 \ + file://0003-squashfs-force-O2.patch;patch=1 \ + file://0004-squashfs-Kconfig.patch;patch=1 \ + file://0005-squashfs-Makefile.patch;patch=1 \ + \ + file://openwrt-ledtrig-netdev.patch;patch=1 \ + file://gta01-fix-battery-class-name.patch;patch=1 \ + \ + file://defconfig-oe \ +" +S = "${WORKDIR}/git"
recipes/linux/linux-openmoko_2.6.28.bb new file +28 -0
@@ -0,0 +1,28 @@ +require linux.inc +require linux-openmoko.inc + +DESCRIPTION_${PN} = "Linux ${KERNEL_RELEASE} kernel for the Openmoko Neo GSM Smartphones" + +KERNEL_RELEASE = "2.6.28" +KERNEL_VERSION = "${KERNEL_RELEASE}" + +SRCREV = "8c65792a5c83c76d662a617a7c4e1ae8104bb6a5" +OEV = "oe2" +PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" +PR = "r0" + +SRC_URI = "\ + git://git.openmoko.org/git/kernel.git;protocol=git;branch=stable \ + file://defconfig-oe.patch \ +" +S = "${WORKDIR}/git" + +CONFIG_NAME_om-gta01 = "gta01_moredrivers_defconfig" +CONFIG_NAME_om-gta02 = "gta02_packaging_defconfig" + +do_configure_prepend() { + install -m 644 ./arch/arm/configs/${CONFIG_NAME} ${WORKDIR}/defconfig-oe + cat ${WORKDIR}/defconfig-oe.patch | patch -p0 -d ${WORKDIR} +} + +
recipes/linux/linux-openmoko_2.6.29.bb new file +26 -0
@@ -0,0 +1,26 @@ +require linux.inc +require linux-openmoko.inc + +DESCRIPTION_${PN} = "Linux ${KERNEL_VERSION} kernel for the Openmoko Neo GSM Smartphones" + +KERNEL_RELEASE = "2.6.29" +KERNEL_VERSION = "2.6.29-rc3" + +SRCREV = "973a41fce60e5f6edfcf0eaf94056a57eee65e16" +OMV = "oe11" +PV = "${KERNEL_RELEASE}-${OMV}+gitr${SRCPV}" +PR = "r8" + +SRC_URI = "\ + git://git.openmoko.org/git/kernel.git;protocol=git;branch=andy-tracking \ + file://fix-install.patch;patch=1 \ + file://0007-Enable-UBI-UBIFS.patch;patch=1 \ +" +S = "${WORKDIR}/git" + +CONFIG_NAME_om-gta01 = "gta01_moredrivers_defconfig" +CONFIG_NAME_om-gta02 = "gta02_packaging_defconfig" + +do_configure_prepend() { + install -m 644 ./arch/arm/configs/${CONFIG_NAME} ${WORKDIR}/defconfig-oe +}
recipes/linux/linux-openmoko_2.6.32.bb new file +46 -0
46 lines not on this page · raw message
recipes/linux/linux-openmoko_2.6.34_git new file +39 -0
@@ -0,0 +1,39 @@ +require linux.inc +require linux-openmoko.inc + +DESCRIPTION_${PN} = "Linux ${KERNEL_RELEASE} kernel for the Openmoko Neo GSM Smartphones" + +KERNEL_RELEASE="2.6.34" + +SRCREV = "dd1225cc08c3375bf80289ac1965c724881b149a" +OEV = "oe2" +PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" + +SRC_URI = "\ + git://git.openmoko.org/git/kernel.git;protocol=git;branch=om-gta02-2.6.34 \ +# build fix + file://wm8753-fix-build-with-gcc-4.4.2-which-works-ok-with-.patch;patch=1 \ +# patches from Thomas White's gdrm-for-merging branch + file://0001-DRM-for-platform-devices.patch;patch=1 \ + file://0002-Glamo-DRM-and-KMS-driver.patch;patch=1 \ + file://0003-Work-on-Glamo-core-for-DRM.patch;patch=1 \ + file://0004-JBT6k74-work-for-KMS.patch;patch=1 \ + file://0005-Fix-crash-when-reading-Glamo-registers-via-sysfs.patch;patch=1 \ + file://0006-Fix-dynamic-command-queue-allocation.patch;patch=1 \ + file://0007-Debug-statements-for-testing.patch;patch=1 \ + file://0008-Fix-claim-of-2D-register-resource.patch;patch=1 \ + file://0009-Use-unlocked_ioctl-rather-than-ioctl.patch;patch=1 \ +# patches from Radek Polak used in qtmoko + file://0001-accels.patch.patch;patch=1 \ + file://0002-usbhost.patch.patch;patch=1 \ + file://0003-ar6000_delay.patch.patch;patch=1 \ + file://0004-save_regs.patch.patch;patch=1 \ +" + +S = "${WORKDIR}/git" + +CONFIG_NAME_om-gta02 = "gta02_drm_defconfig" + +do_configure_prepend() { + install -m 644 ./arch/arm/configs/${CONFIG_NAME} ${WORKDIR}/defconfig-oe +}
Signature · 1 line
1.7.1
PATCH 1/1 linux-openmoko: move DESCRIPTION to .inc, remove OEV, KERNEL_RELEASE and KERNEL_VERSION
--- recipes/linux/linux-openmoko.inc | 2 ++ recipes/linux/linux-openmoko_2.6.24.bb | 10 ++-------- recipes/linux/linux-openmoko_2.6.28.bb | 10 ++-------- recipes/linux/linux-openmoko_2.6.29.bb | 10 ++-------- recipes/linux/linux-openmoko_2.6.32.bb | 10 +++------- recipes/linux/linux-openmoko_2.6.34_git | 8 ++------ 6 files changed, 13 insertions(+), 37 deletions(-)
recipes/linux/linux-openmoko.inc +2 -0
@@ -7,6 +7,8 @@ UBOOT_ENTRYPOINT = "30008000" COMPATIBLE_HOST = "arm.*-linux" COMPATIBLE_MACHINE = "om-gta01|om-gta02|om-3d7k" +DESCRIPTION_${PN} = "Linux kernel for the Openmoko Neo GSM Smartphones" + KERNEL_IMAGE_SYMLINK_NAME_om-gta01 = "uImage-GTA01.bin" KERNEL_IMAGE_SYMLINK_NAME_om-gta02 = "uImage-GTA02.bin" KERNEL_IMAGE_SYMLINK_NAME_om-3d7k = "uImage-OM3D7K.bin"
recipes/linux/linux-openmoko_2.6.24.bb +2 -8
@@ -1,15 +1,9 @@ require linux.inc require linux-openmoko.inc -DESCRIPTION = "The Linux kernel for the Openmoko devices GTA01 (Neo1973) and GTA02 (Neo FreeRunner)" - -KERNEL_RELEASE = "2.6.24" -KERNEL_VERSION = "${KERNEL_RELEASE}" - SRCREV = "fb42ce6724576fc173faf8abfb04aa2c36d213b7" -OEV = "oe5" -PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" -PR = "r1" +PR = "r2" +PR_append = "+gitr${SRCPV}" SRC_URI = "\ git://git.openmoko.org/git/kernel.git;protocol=git;branch=stable \
recipes/linux/linux-openmoko_2.6.28.bb +2 -8
@@ -1,15 +1,9 @@ require linux.inc require linux-openmoko.inc -DESCRIPTION_${PN} = "Linux ${KERNEL_RELEASE} kernel for the Openmoko Neo GSM Smartphones" - -KERNEL_RELEASE = "2.6.28" -KERNEL_VERSION = "${KERNEL_RELEASE}" - SRCREV = "8c65792a5c83c76d662a617a7c4e1ae8104bb6a5" -OEV = "oe2" -PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" -PR = "r0" +PR = "r1" +PR_append = "+gitr${SRCPV}" SRC_URI = "\ git://git.openmoko.org/git/kernel.git;protocol=git;branch=stable \
recipes/linux/linux-openmoko_2.6.29.bb +2 -8
@@ -1,15 +1,9 @@ require linux.inc require linux-openmoko.inc -DESCRIPTION_${PN} = "Linux ${KERNEL_VERSION} kernel for the Openmoko Neo GSM Smartphones" - -KERNEL_RELEASE = "2.6.29" -KERNEL_VERSION = "2.6.29-rc3" - SRCREV = "973a41fce60e5f6edfcf0eaf94056a57eee65e16" -OMV = "oe11" -PV = "${KERNEL_RELEASE}-${OMV}+gitr${SRCPV}" -PR = "r8" +PR = "r9" +PR_append = "+gitr${SRCPV}" SRC_URI = "\ git://git.openmoko.org/git/kernel.git;protocol=git;branch=andy-tracking \
recipes/linux/linux-openmoko_2.6.32.bb +3 -7
@@ -1,19 +1,15 @@ require linux.inc require linux-openmoko.inc -DESCRIPTION_${PN} = "Linux ${KERNEL_RELEASE} kernel for the Openmoko Neo GSM Smartphones" - -KERNEL_RELEASE="2.6.32.13" - SRCREV = "a9254be10ac2294ea20165a87c09ea6afcf66d94" -OEV = "oe2" -PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" +PR = "r1" +PR_append = "+gitr${SRCPV}" SRC_URI = "\ git://git.openmoko.org/git/kernel.git;protocol=git;branch=om-gta02-2.6.32 \ file://0001-Revert-s3cmci-initialize-default-platform-data-no_wp.patch;patch=1 \ # latest stable patch for ubi fix 943e167cb3e8fb191894bde8a4a75db78531a7c8 - ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-${KERNEL_RELEASE}.bz2;patch=1;name=stablepatch \ + ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-2.6.32.13.bz2;patch=1;name=stablepatch \ # build fix file://0001-wm8753-fix-build-with-gcc-4.4.2-which-works-ok-with-.patch;patch=1 \ # patches from Radek Polak used in qtmoko
recipes/linux/linux-openmoko_2.6.34_git +2 -6
@@ -1,13 +1,9 @@ require linux.inc require linux-openmoko.inc -DESCRIPTION_${PN} = "Linux ${KERNEL_RELEASE} kernel for the Openmoko Neo GSM Smartphones" - -KERNEL_RELEASE="2.6.34" - SRCREV = "dd1225cc08c3375bf80289ac1965c724881b149a" -OEV = "oe2" -PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" +PR = "r1" +PR_append = "+gitr${SRCPV}" SRC_URI = "\ git://git.openmoko.org/git/kernel.git;protocol=git;branch=om-gta02-2.6.34 \
Signature · 1 line
1.7.1
Re: [PATCH] linux-openmoko: move DESCRIPTION to .inc, remove OEV, KERNEL_RELEASE and KERNEL_VERSION
Quoted 1 line · Martin Jansa
Signed-off-by Martin Jansa <[email protected]>
Quoted 21 lines
--- recipes/linux/linux-openmoko.inc | 2 ++ recipes/linux/linux-openmoko_2.6.24.bb | 10 ++-------- recipes/linux/linux-openmoko_2.6.28.bb | 10 ++-------- recipes/linux/linux-openmoko_2.6.29.bb | 10 ++-------- recipes/linux/linux-openmoko_2.6.32.bb | 10 +++------- recipes/linux/linux-openmoko_2.6.34_git | 8 ++------ 6 files changed, 13 insertions(+), 37 deletions(-)recipes/linux/linux-openmoko_2.6.32.bb +0
-5@@ -1,19 +1,15 @@ require linux.inc require linux-openmoko.inc -DESCRIPTION_${PN} = "Linux ${KERNEL_RELEASE} kernel for the Openmoko Neo GSM Smartphones" - -KERNEL_RELEASE="2.6.32.13" - SRCREV = "a9254be10ac2294ea20165a87c09ea6afcf66d94" -OEV = "oe2"
recipes/linux/linux-openmoko_2.6.32.bb line 12
Quoted 10 lines
recipes/linux/linux-openmoko_2.6.32.bb +3
-2-PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" +PR = "r1" +PR_append = "+gitr${SRCPV}" SRC_URI = "\ git://git.openmoko.org/git/kernel.git;protocol=git;branch=om-gta02-2.6.32 \ file://0001-Revert-s3cmci-initialize-default-platform-data-no_wp.patch;patch=1 \ # latest stable patch for ubi fix 943e167cb3e8fb191894bde8a4a75db78531a7c8 - ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-${KERNEL_RELEASE}.bz2;patch=1;name=stablepatch \ + ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-2.6.32.13.bz2;patch=1;name=stablepatch \
you could have use ${PV}.13 here
Re: [PATCH 3/3] linux-openmoko: rename recipes to common PN_PV scheme and adjust om-gta* machine configs
In reply to Martin JansaQuoted 3 lines · Martin Jansa
* unify preferred provider and version for om-gta02
Signed-off-by Martin Jansa <[email protected]>
Quoted 886 lines
--- conf/distro/openmoko.conf | 8 - conf/machine/om-3d7k.conf | 3 +- conf/machine/om-gta01.conf | 12 +-- conf/machine/om-gta02.conf | 10 +- recipes/linux/linux-openmoko-2.6.24_git.bb | 28 ---- recipes/linux/linux-openmoko-2.6.28_git.bb | 28 ---- .../0007-Enable-UBI-UBIFS.patch | 149 ++++++++++++++++++++ .../linux/linux-openmoko-2.6.29/fix-install.patch | 23 +++ recipes/linux/linux-openmoko-2.6.32_git.bb | 46 ------ recipes/linux/linux-openmoko-2.6.34_git.bb | 39 ----- .../0007-Enable-UBI-UBIFS.patch | 149 -------------------- .../linux-openmoko-shr-devel/fix-install.patch | 23 --- recipes/linux/linux-openmoko-shr-devel_git.bb | 26 ---- recipes/linux/linux-openmoko_2.6.24.bb | 28 ++++ recipes/linux/linux-openmoko_2.6.28.bb | 28 ++++ recipes/linux/linux-openmoko_2.6.29.bb | 26 ++++ recipes/linux/linux-openmoko_2.6.32.bb | 46 ++++++ recipes/linux/linux-openmoko_2.6.34_git | 39 +++++ 18 files changed, 347 insertions(+), 364 deletions(-) delete mode 100644 recipes/linux/linux-openmoko-2.6.24_git.bb delete mode 100644 recipes/linux/linux-openmoko-2.6.28_git.bb create mode 100644 recipes/linux/linux-openmoko-2.6.29/0007-Enable-UBI-UBIFS.patch create mode 100644 recipes/linux/linux-openmoko-2.6.29/fix-install.patch delete mode 100644 recipes/linux/linux-openmoko-2.6.32_git.bb delete mode 100644 recipes/linux/linux-openmoko-2.6.34_git.bb delete mode 100644 recipes/linux/linux-openmoko-shr-devel/0007-Enable-UBI-UBIFS.patch delete mode 100644 recipes/linux/linux-openmoko-shr-devel/fix-install.patch delete mode 100644 recipes/linux/linux-openmoko-shr-devel_git.bb create mode 100644 recipes/linux/linux-openmoko_2.6.24.bb create mode 100644 recipes/linux/linux-openmoko_2.6.28.bb create mode 100644 recipes/linux/linux-openmoko_2.6.29.bb create mode 100644 recipes/linux/linux-openmoko_2.6.32.bb create mode 100644 recipes/linux/linux-openmoko_2.6.34_gitconf/distro/openmoko.conf +0
-8@@ -53,14 +53,6 @@ PREFERRED_VERSION_binutils-cross ?= "2.17.50.0.12" # require conf/distro/include/fso-autorev.inc # override the PACKAGE_ARCH of certain packages for openmoko distro -# -# Same kernel used to run on both these machines... -# Currently not used but left here in case someone wants to switch on -# quickly -#PACKAGE_ARCH_pn-linux-openmoko_om-gta01 = "armv4t" -#PACKAGE_ARCH_pn-linux-openmoko_om-gta02 = "armv4t" -#PACKAGE_ARCH_pn-linux-openmoko-devel_om-gta01 = "armv4t" -#PACKAGE_ARCH_pn-linux-openmoko-devel_om-gta02 = "armv4t" # Same kernel so same usb PACKAGE_ARCH_pn-usb-gadget-mode_om-gta01 = "armv4t"conf/machine/om-3d7k.conf +2
-1@@ -6,8 +6,9 @@ TARGET_ARCH = "arm" -PREFERRED_PROVIDER_virtual/kernel ?= "linux-openmoko-devel" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-openmoko" PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" +PREFERRED_VERSION_linux-openmoko ?= "2.6.29" MACHINE_FEATURES = "kernel26 apm alsa bluetooth usbgadget usbhost phone vfat ext2" MACHINE_DISPLAY_WIDTH_PIXELS = "480"conf/machine/om-gta01.conf +3
-9@@ -6,16 +6,10 @@ TARGET_ARCH = "arm" -PREFERRED_PROVIDER_virtual/kernel ?= "linux-openmoko-2.6.24" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-openmoko" PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" - -# If you want to have KMS enabled in default kernel, uncomment linux-openmoko-shr-drm-devel -PREFERRED_PROVIDER_virtual/kernel_shr = "linux-openmoko-shr-devel" -#PREFERRED_PROVIDER_virtual/kernel_shr = "linux-openmoko-shr-drm-devel" -#PREFERRED_PROVIDER_virtual/kernel_shr = "linux-openmoko-2.6.31" -#PREFERRED_PROVIDER_virtual/kernel_shr = "linux-openmoko-2.6.32" - -PREFERRED_PROVIDER_virtual/libgl_shr = "mesa-dri" +PREFERRED_VERSION_linux-openmoko ?= "2.6.29" +PREFERRED_PROVIDER_virtual/libgl = "mesa-dri" UBOOT_ENTRYPOINT = "30008000"conf/machine/om-gta02.conf +3
-7@@ -6,15 +6,11 @@ TARGET_ARCH = "arm" -PREFERRED_PROVIDER_virtual/kernel ?= "linux-openmoko-2.6.28" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-openmoko" PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" +PREFERRED_VERSION_linux-openmoko ?= "2.6.29" -# If you want to have KMS enabled in default kernel, uncomment linux-openmoko-shr-drm-devel -PREFERRED_PROVIDER_virtual/kernel_shr = "linux-openmoko-shr-devel" -#PREFERRED_PROVIDER_virtual/kernel_shr = "linux-openmoko-shr-drm-devel" -#PREFERRED_PROVIDER_virtual/kernel_shr = "linux-openmoko-2.6.31" - -PREFERRED_PROVIDER_virtual/libgl_shr = "mesa-dri" +PREFERRED_PROVIDER_virtual/libgl = "mesa-dri" # Override only for shr as it needs mesa-dri_git and ie angstrom has preferred_version set to 7.6 MACHINE_DRI_MODULES_shr = "glamo"recipes/linux/linux-openmoko-2.6.24_git.bb deleted +0
-28@@ -1,28 +0,0 @@ -require linux.inc -require linux-openmoko.inc - -DESCRIPTION = "The Linux kernel for the Openmoko devices GTA01 (Neo1973) and GTA02 (Neo FreeRunner)" - -KERNEL_RELEASE = "2.6.24" -KERNEL_VERSION = "${KERNEL_RELEASE}" - -SRCREV = "fb42ce6724576fc173faf8abfb04aa2c36d213b7" -OEV = "oe5" -PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" -PR = "r1" - -SRC_URI = "\ - git://git.openmoko.org/git/kernel.git;protocol=git;branch=stable \ - \ - file://0001-squashfs-with-lzma.patch;patch=1 \ - file://0002-squashfs-initrd.patch;patch=1 \ - file://0003-squashfs-force-O2.patch;patch=1 \ - file://0004-squashfs-Kconfig.patch;patch=1 \ - file://0005-squashfs-Makefile.patch;patch=1 \ - \ - file://openwrt-ledtrig-netdev.patch;patch=1 \ - file://gta01-fix-battery-class-name.patch;patch=1 \ - \ - file://defconfig-oe \ -" -S = "${WORKDIR}/git"recipes/linux/linux-openmoko-2.6.28_git.bb deleted +0
-28@@ -1,28 +0,0 @@ -require linux.inc -require linux-openmoko.inc - -DESCRIPTION_${PN} = "Linux ${KERNEL_RELEASE} kernel for the Openmoko Neo GSM Smartphones" - -KERNEL_RELEASE = "2.6.28" -KERNEL_VERSION = "${KERNEL_RELEASE}" - -SRCREV = "8c65792a5c83c76d662a617a7c4e1ae8104bb6a5" -OEV = "oe2" -PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" -PR = "r0" - -SRC_URI = "\ - git://git.openmoko.org/git/kernel.git;protocol=git;branch=stable \ - file://defconfig-oe.patch \ -" -S = "${WORKDIR}/git" - -CONFIG_NAME_om-gta01 = "gta01_moredrivers_defconfig" -CONFIG_NAME_om-gta02 = "gta02_packaging_defconfig" - -do_configure_prepend() { - install -m 644 ./arch/arm/configs/${CONFIG_NAME} ${WORKDIR}/defconfig-oe - cat ${WORKDIR}/defconfig-oe.patch | patch -p0 -d ${WORKDIR} -} - -recipes/linux/linux-openmoko-2.6.29/0007-Enable-UBI-UBIFS.patch new file +149
-0@@ -0,0 +1,149 @@ +From 8f907c17c068beb94264a4a6d40314658a0c1393 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <[email protected]> +Date: Sun, 8 Nov 2009 10:58:28 +0100 +Subject: [PATCH 7/7] Enable UBI/UBIFS + +--- + arch/arm/configs/gta02_packaging_defconfig | 39 ++++++++++++++++++++++++++++++--- + 1 files changed, 35 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/configs/gta02_packaging_defconfig b/arch/arm/configs/gta02_packaging_defconfig +index e17ddc3..7506963 100644 +--- a/arch/arm/configs/gta02_packaging_defconfig ++++ b/arch/arm/configs/gta02_packaging_defconfig +@@ -806,7 +806,30 @@ CONFIG_MTD_NAND_S3C2410_HWECC=y + # + # UBI - Unsorted block images + # +-# CONFIG_MTD_UBI is not set ++CONFIG_MTD_UBI=y ++CONFIG_MTD_UBI_WL_THRESHOLD=4096 ++CONFIG_MTD_UBI_BEB_RESERVE=1 ++CONFIG_MTD_UBI_GLUEBI=y ++ ++# ++# UBI debugging options ++# ++CONFIG_MTD_UBI_DEBUG=y ++# CONFIG_MTD_UBI_DEBUG_MSG is not set ++# CONFIG_MTD_UBI_DEBUG_PARANOID is not set ++CONFIG_MTD_UBI_DEBUG_DISABLE_BGT=y ++# CONFIG_MTD_UBI_DEBUG_USERSPACE_IO is not set ++# CONFIG_MTD_UBI_DEBUG_EMULATE_BITFLIPS is not set ++# CONFIG_MTD_UBI_DEBUG_EMULATE_WRITE_FAILURES is not set ++# CONFIG_MTD_UBI_DEBUG_EMULATE_ERASE_FAILURES is not set ++ ++# ++# Additional UBI debugging messages ++# ++# CONFIG_MTD_UBI_DEBUG_MSG_BLD is not set ++# CONFIG_MTD_UBI_DEBUG_MSG_EBA is not set ++# CONFIG_MTD_UBI_DEBUG_MSG_WL is not set ++# CONFIG_MTD_UBI_DEBUG_MSG_IO is not set + # CONFIG_PARPORT is not set + CONFIG_BLK_DEV=y + # CONFIG_BLK_DEV_COW_COMMON is not set +@@ -1877,6 +1900,12 @@ CONFIG_JFFS2_ZLIB=y + # CONFIG_JFFS2_LZO is not set + CONFIG_JFFS2_RTIME=y + # CONFIG_JFFS2_RUBIN is not set ++CONFIG_UBIFS_FS=y ++# CONFIG_UBIFS_FS_XATTR is not set ++# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set ++CONFIG_UBIFS_FS_LZO=y ++CONFIG_UBIFS_FS_ZLIB=y ++# CONFIG_UBIFS_FS_DEBUG is not set + CONFIG_CRAMFS=y + CONFIG_SQUASHFS=m + # CONFIG_SQUASHFS_EMBEDDED is not set +@@ -2151,8 +2180,8 @@ CONFIG_CRYPTO_TWOFISH_COMMON=m + # + # Compression + # +-CONFIG_CRYPTO_DEFLATE=m +-# CONFIG_CRYPTO_LZO is not set ++CONFIG_CRYPTO_DEFLATE=y ++CONFIG_CRYPTO_LZO=y + + # + # Random Number Generation +@@ -2174,6 +2203,8 @@ CONFIG_CRC32=y + CONFIG_LIBCRC32C=m + CONFIG_ZLIB_INFLATE=y + CONFIG_ZLIB_DEFLATE=y ++CONFIG_LZO_COMPRESS=y ++CONFIG_LZO_DECOMPRESS=y + CONFIG_TEXTSEARCH=y + CONFIG_TEXTSEARCH_KMP=m + CONFIG_TEXTSEARCH_BM=m +diff --git a/arch/arm/configs/gta01_moredrivers_defconfig b/arch/arm/configs/gta01_moredrivers_defconfig +index e17ddc3..7506963 100644 +--- a/arch/arm/configs/gta01_moredrivers_defconfig ++++ b/arch/arm/configs/gta01_moredrivers_defconfig +@@ -806,7 +806,30 @@ CONFIG_MTD_NAND_S3C2410_HWECC=y + # + # UBI - Unsorted block images + # +-# CONFIG_MTD_UBI is not set ++CONFIG_MTD_UBI=y ++CONFIG_MTD_UBI_WL_THRESHOLD=4096 ++CONFIG_MTD_UBI_BEB_RESERVE=1 ++CONFIG_MTD_UBI_GLUEBI=y ++ ++# ++# UBI debugging options ++# ++CONFIG_MTD_UBI_DEBUG=y ++# CONFIG_MTD_UBI_DEBUG_MSG is not set ++# CONFIG_MTD_UBI_DEBUG_PARANOID is not set ++CONFIG_MTD_UBI_DEBUG_DISABLE_BGT=y ++# CONFIG_MTD_UBI_DEBUG_USERSPACE_IO is not set ++# CONFIG_MTD_UBI_DEBUG_EMULATE_BITFLIPS is not set ++# CONFIG_MTD_UBI_DEBUG_EMULATE_WRITE_FAILURES is not set ++# CONFIG_MTD_UBI_DEBUG_EMULATE_ERASE_FAILURES is not set ++ ++# ++# Additional UBI debugging messages ++# ++# CONFIG_MTD_UBI_DEBUG_MSG_BLD is not set ++# CONFIG_MTD_UBI_DEBUG_MSG_EBA is not set ++# CONFIG_MTD_UBI_DEBUG_MSG_WL is not set ++# CONFIG_MTD_UBI_DEBUG_MSG_IO is not set + # CONFIG_PARPORT is not set + CONFIG_BLK_DEV=y + # CONFIG_BLK_DEV_COW_COMMON is not set +@@ -1877,6 +1900,12 @@ CONFIG_JFFS2_ZLIB=y + # CONFIG_JFFS2_LZO is not set + CONFIG_JFFS2_RTIME=y + # CONFIG_JFFS2_RUBIN is not set ++CONFIG_UBIFS_FS=y ++# CONFIG_UBIFS_FS_XATTR is not set ++# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set ++CONFIG_UBIFS_FS_LZO=y ++CONFIG_UBIFS_FS_ZLIB=y ++# CONFIG_UBIFS_FS_DEBUG is not set + CONFIG_CRAMFS=y + CONFIG_SQUASHFS=m + # CONFIG_SQUASHFS_EMBEDDED is not set +@@ -2151,8 +2180,8 @@ CONFIG_CRYPTO_TWOFISH_COMMON=m + # + # Compression + # +-CONFIG_CRYPTO_DEFLATE=m +-# CONFIG_CRYPTO_LZO is not set ++CONFIG_CRYPTO_DEFLATE=y ++CONFIG_CRYPTO_LZO=y + + # + # Random Number Generation +@@ -2174,6 +2203,8 @@ CONFIG_CRC32=y + CONFIG_LIBCRC32C=m + CONFIG_ZLIB_INFLATE=y + CONFIG_ZLIB_DEFLATE=y ++CONFIG_LZO_COMPRESS=y ++CONFIG_LZO_DECOMPRESS=y + CONFIG_TEXTSEARCH=y + CONFIG_TEXTSEARCH_KMP=m + CONFIG_TEXTSEARCH_BM=m +-- +1.6.5.2recipes/linux/linux-openmoko-2.6.29/fix-install.patch new file +23
-0@@ -0,0 +1,23 @@ +From: Steve Sakoman <[email protected]> +Date: Mon, 18 Aug 2008 16:07:31 +0000 (-0700) +Subject: scripts/Makefile.fwinst: add missing space when setting mode in cmd_install +X-Git-Url: http://www.sakoman.net/cgi-bin/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff_plain;h=f039944bdd491cde7327133e9976881d3133ae70 + +scripts/Makefile.fwinst: add missing space when setting mode in cmd_install + +This was causing build failures on some machines +--- + +diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst +index 6bf8e87..fb20532 100644 +--- a/scripts/Makefile.fwinst ++++ b/scripts/Makefile.fwinst +@@ -37,7 +37,7 @@ + @true + + quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@) +- cmd_install = $(INSTALL) -m0644 $< $@ ++ cmd_install = $(INSTALL) -m 0644 $< $@ + + $(installed-fw-dirs): + $(call cmd,mkdir)recipes/linux/linux-openmoko-2.6.32_git.bb deleted +0
-46@@ -1,46 +0,0 @@ -require linux.inc -require linux-openmoko.inc - -DESCRIPTION_${PN} = "Linux ${KERNEL_RELEASE} kernel for the Openmoko Neo GSM Smartphones" - -KERNEL_RELEASE="2.6.32.13" - -SRCREV = "a9254be10ac2294ea20165a87c09ea6afcf66d94" -OEV = "oe2" -PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" - -SRC_URI = "\ - git://git.openmoko.org/git/kernel.git;protocol=git;branch=om-gta02-2.6.32 \ - file://0001-Revert-s3cmci-initialize-default-platform-data-no_wp.patch;patch=1 \ -# latest stable patch for ubi fix 943e167cb3e8fb191894bde8a4a75db78531a7c8 - ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-${KERNEL_RELEASE}.bz2;patch=1;name=stablepatch \ -# build fix - file://0001-wm8753-fix-build-with-gcc-4.4.2-which-works-ok-with-.patch;patch=1 \ -# patches from Radek Polak used in qtmoko - file://0002-accels.patch.patch;patch=1 \ - file://0003-usbhost.patch.patch;patch=1 \ - file://0004-ar6000_delay.patch.patch;patch=1 \ - file://0005-save_regs.patch.patch;patch=1 \ -# defconfig updates - file://0006-gta02-defconfigs-enable-LEDS_S3C24XX-and-dummy-batte.patch;patch=1 \ -# patches from Weiss's gdrm-for-merging branch - file://0007-DRM-for-platform-devices.patch;patch=1 \ - file://0008-Glamo-DRM-and-KMS-driver.patch;patch=1 \ - file://0009-Work-on-Glamo-core-for-DRM.patch;patch=1 \ - file://0010-JBT6k74-work-for-KMS.patch;patch=1 \ - file://0011-Fix-crash-when-reading-Glamo-registers-via-sysfs.patch;patch=1 \ - file://0012-Fix-dynamic-command-queue-allocation.patch;patch=1 \ - file://0013-Debug-statements-for-testing.patch;patch=1 \ - file://0014-Fix-claim-of-2D-register-resource.patch;patch=1 \ -" - -SRC_URI[stablepatch.md5sum] = "ba6abb1ffee513a1d4f831599ddae490" -SRC_URI[stablepatch.sha256sum] = "baf6dff5d1c478e65decf2e8b704c60e546ea37c4de59ee8eb6af9dd3d63f145" - -S = "${WORKDIR}/git" - -CONFIG_NAME_om-gta02 = "gta02_drm_defconfig" - -do_configure_prepend() { - install -m 644 ./arch/arm/configs/${CONFIG_NAME} ${WORKDIR}/defconfig-oe -}recipes/linux/linux-openmoko-2.6.34_git.bb deleted +0
-39@@ -1,39 +0,0 @@ -require linux.inc -require linux-openmoko.inc - -DESCRIPTION_${PN} = "Linux ${KERNEL_RELEASE} kernel for the Openmoko Neo GSM Smartphones" - -KERNEL_RELEASE="2.6.34" - -SRCREV = "dd1225cc08c3375bf80289ac1965c724881b149a" -OEV = "oe2" -PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" - -SRC_URI = "\ - git://git.openmoko.org/git/kernel.git;protocol=git;branch=om-gta02-2.6.34 \ -# build fix - file://wm8753-fix-build-with-gcc-4.4.2-which-works-ok-with-.patch;patch=1 \ -# patches from Thomas White's gdrm-for-merging branch - file://0001-DRM-for-platform-devices.patch;patch=1 \ - file://0002-Glamo-DRM-and-KMS-driver.patch;patch=1 \ - file://0003-Work-on-Glamo-core-for-DRM.patch;patch=1 \ - file://0004-JBT6k74-work-for-KMS.patch;patch=1 \ - file://0005-Fix-crash-when-reading-Glamo-registers-via-sysfs.patch;patch=1 \ - file://0006-Fix-dynamic-command-queue-allocation.patch;patch=1 \ - file://0007-Debug-statements-for-testing.patch;patch=1 \ - file://0008-Fix-claim-of-2D-register-resource.patch;patch=1 \ - file://0009-Use-unlocked_ioctl-rather-than-ioctl.patch;patch=1 \ -# patches from Radek Polak used in qtmoko - file://0001-accels.patch.patch;patch=1 \ - file://0002-usbhost.patch.patch;patch=1 \ - file://0003-ar6000_delay.patch.patch;patch=1 \ - file://0004-save_regs.patch.patch;patch=1 \ -" - -S = "${WORKDIR}/git" - -CONFIG_NAME_om-gta02 = "gta02_drm_defconfig" - -do_configure_prepend() { - install -m 644 ./arch/arm/configs/${CONFIG_NAME} ${WORKDIR}/defconfig-oe -}recipes/linux/linux-openmoko-shr-devel/0007-Enable-UBI-UBIFS.patch deleted +0
-149@@ -1,149 +0,0 @@ -From 8f907c17c068beb94264a4a6d40314658a0c1393 Mon Sep 17 00:00:00 2001 -From: Martin Jansa <[email protected]> -Date: Sun, 8 Nov 2009 10:58:28 +0100 -Subject: [PATCH 7/7] Enable UBI/UBIFS - ---- - arch/arm/configs/gta02_packaging_defconfig | 39 ++++++++++++++++++++++++++++++--- - 1 files changed, 35 insertions(+), 4 deletions(-) - -diff --git a/arch/arm/configs/gta02_packaging_defconfig b/arch/arm/configs/gta02_packaging_defconfig -index e17ddc3..7506963 100644 ---- a/arch/arm/configs/gta02_packaging_defconfig -+++ b/arch/arm/configs/gta02_packaging_defconfig -@@ -806,7 +806,30 @@ CONFIG_MTD_NAND_S3C2410_HWECC=y - # - # UBI - Unsorted block images - # --# CONFIG_MTD_UBI is not set -+CONFIG_MTD_UBI=y -+CONFIG_MTD_UBI_WL_THRESHOLD=4096 -+CONFIG_MTD_UBI_BEB_RESERVE=1 -+CONFIG_MTD_UBI_GLUEBI=y -+ -+# -+# UBI debugging options -+# -+CONFIG_MTD_UBI_DEBUG=y -+# CONFIG_MTD_UBI_DEBUG_MSG is not set -+# CONFIG_MTD_UBI_DEBUG_PARANOID is not set -+CONFIG_MTD_UBI_DEBUG_DISABLE_BGT=y -+# CONFIG_MTD_UBI_DEBUG_USERSPACE_IO is not set -+# CONFIG_MTD_UBI_DEBUG_EMULATE_BITFLIPS is not set -+# CONFIG_MTD_UBI_DEBUG_EMULATE_WRITE_FAILURES is not set -+# CONFIG_MTD_UBI_DEBUG_EMULATE_ERASE_FAILURES is not set -+ -+# -+# Additional UBI debugging messages -+# -+# CONFIG_MTD_UBI_DEBUG_MSG_BLD is not set -+# CONFIG_MTD_UBI_DEBUG_MSG_EBA is not set -+# CONFIG_MTD_UBI_DEBUG_MSG_WL is not set -+# CONFIG_MTD_UBI_DEBUG_MSG_IO is not set - # CONFIG_PARPORT is not set - CONFIG_BLK_DEV=y - # CONFIG_BLK_DEV_COW_COMMON is not set -@@ -1877,6 +1900,12 @@ CONFIG_JFFS2_ZLIB=y - # CONFIG_JFFS2_LZO is not set - CONFIG_JFFS2_RTIME=y - # CONFIG_JFFS2_RUBIN is not set -+CONFIG_UBIFS_FS=y -+# CONFIG_UBIFS_FS_XATTR is not set -+# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set -+CONFIG_UBIFS_FS_LZO=y -+CONFIG_UBIFS_FS_ZLIB=y -+# CONFIG_UBIFS_FS_DEBUG is not set - CONFIG_CRAMFS=y - CONFIG_SQUASHFS=m - # CONFIG_SQUASHFS_EMBEDDED is not set -@@ -2151,8 +2180,8 @@ CONFIG_CRYPTO_TWOFISH_COMMON=m - # - # Compression - # --CONFIG_CRYPTO_DEFLATE=m --# CONFIG_CRYPTO_LZO is not set -+CONFIG_CRYPTO_DEFLATE=y -+CONFIG_CRYPTO_LZO=y - - # - # Random Number Generation -@@ -2174,6 +2203,8 @@ CONFIG_CRC32=y - CONFIG_LIBCRC32C=m - CONFIG_ZLIB_INFLATE=y - CONFIG_ZLIB_DEFLATE=y -+CONFIG_LZO_COMPRESS=y -+CONFIG_LZO_DECOMPRESS=y - CONFIG_TEXTSEARCH=y - CONFIG_TEXTSEARCH_KMP=m - CONFIG_TEXTSEARCH_BM=m -diff --git a/arch/arm/configs/gta01_moredrivers_defconfig b/arch/arm/configs/gta01_moredrivers_defconfig -index e17ddc3..7506963 100644 ---- a/arch/arm/configs/gta01_moredrivers_defconfig -+++ b/arch/arm/configs/gta01_moredrivers_defconfig -@@ -806,7 +806,30 @@ CONFIG_MTD_NAND_S3C2410_HWECC=y - # - # UBI - Unsorted block images - # --# CONFIG_MTD_UBI is not set -+CONFIG_MTD_UBI=y -+CONFIG_MTD_UBI_WL_THRESHOLD=4096 -+CONFIG_MTD_UBI_BEB_RESERVE=1 -+CONFIG_MTD_UBI_GLUEBI=y -+ -+# -+# UBI debugging options -+# -+CONFIG_MTD_UBI_DEBUG=y -+# CONFIG_MTD_UBI_DEBUG_MSG is not set -+# CONFIG_MTD_UBI_DEBUG_PARANOID is not set -+CONFIG_MTD_UBI_DEBUG_DISABLE_BGT=y -+# CONFIG_MTD_UBI_DEBUG_USERSPACE_IO is not set -+# CONFIG_MTD_UBI_DEBUG_EMULATE_BITFLIPS is not set -+# CONFIG_MTD_UBI_DEBUG_EMULATE_WRITE_FAILURES is not set -+# CONFIG_MTD_UBI_DEBUG_EMULATE_ERASE_FAILURES is not set -+ -+# -+# Additional UBI debugging messages -+# -+# CONFIG_MTD_UBI_DEBUG_MSG_BLD is not set -+# CONFIG_MTD_UBI_DEBUG_MSG_EBA is not set -+# CONFIG_MTD_UBI_DEBUG_MSG_WL is not set -+# CONFIG_MTD_UBI_DEBUG_MSG_IO is not set - # CONFIG_PARPORT is not set - CONFIG_BLK_DEV=y - # CONFIG_BLK_DEV_COW_COMMON is not set -@@ -1877,6 +1900,12 @@ CONFIG_JFFS2_ZLIB=y - # CONFIG_JFFS2_LZO is not set - CONFIG_JFFS2_RTIME=y - # CONFIG_JFFS2_RUBIN is not set -+CONFIG_UBIFS_FS=y -+# CONFIG_UBIFS_FS_XATTR is not set -+# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set -+CONFIG_UBIFS_FS_LZO=y -+CONFIG_UBIFS_FS_ZLIB=y -+# CONFIG_UBIFS_FS_DEBUG is not set - CONFIG_CRAMFS=y - CONFIG_SQUASHFS=m - # CONFIG_SQUASHFS_EMBEDDED is not set -@@ -2151,8 +2180,8 @@ CONFIG_CRYPTO_TWOFISH_COMMON=m - # - # Compression - # --CONFIG_CRYPTO_DEFLATE=m --# CONFIG_CRYPTO_LZO is not set -+CONFIG_CRYPTO_DEFLATE=y -+CONFIG_CRYPTO_LZO=y - - # - # Random Number Generation -@@ -2174,6 +2203,8 @@ CONFIG_CRC32=y - CONFIG_LIBCRC32C=m - CONFIG_ZLIB_INFLATE=y - CONFIG_ZLIB_DEFLATE=y -+CONFIG_LZO_COMPRESS=y -+CONFIG_LZO_DECOMPRESS=y - CONFIG_TEXTSEARCH=y - CONFIG_TEXTSEARCH_KMP=m - CONFIG_TEXTSEARCH_BM=m --- -1.6.5.2recipes/linux/linux-openmoko-shr-devel/fix-install.patch deleted +0
-23@@ -1,23 +0,0 @@ -From: Steve Sakoman <[email protected]> -Date: Mon, 18 Aug 2008 16:07:31 +0000 (-0700) -Subject: scripts/Makefile.fwinst: add missing space when setting mode in cmd_install -X-Git-Url: http://www.sakoman.net/cgi-bin/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff_plain;h=f039944bdd491cde7327133e9976881d3133ae70 - -scripts/Makefile.fwinst: add missing space when setting mode in cmd_install - -This was causing build failures on some machines ---- - -diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst -index 6bf8e87..fb20532 100644 ---- a/scripts/Makefile.fwinst -+++ b/scripts/Makefile.fwinst -@@ -37,7 +37,7 @@ - @true - - quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@) -- cmd_install = $(INSTALL) -m0644 $< $@ -+ cmd_install = $(INSTALL) -m 0644 $< $@ - - $(installed-fw-dirs): - $(call cmd,mkdir)recipes/linux/linux-openmoko-shr-devel_git.bb deleted +0
-26@@ -1,26 +0,0 @@ -require linux.inc -require linux-openmoko.inc - -DESCRIPTION_${PN} = "Linux ${KERNEL_VERSION} kernel for the Openmoko Neo GSM Smartphones" - -KERNEL_RELEASE = "2.6.29" -KERNEL_VERSION = "2.6.29-rc3" - -SRCREV = "973a41fce60e5f6edfcf0eaf94056a57eee65e16" -OMV = "oe11" -PV = "${KERNEL_RELEASE}-${OMV}+gitr${SRCPV}" -PR = "r8" - -SRC_URI = "\ - git://git.openmoko.org/git/kernel.git;protocol=git;branch=andy-tracking \ - file://fix-install.patch;patch=1 \ - file://0007-Enable-UBI-UBIFS.patch;patch=1 \ -" -S = "${WORKDIR}/git" - -CONFIG_NAME_om-gta01 = "gta01_moredrivers_defconfig" -CONFIG_NAME_om-gta02 = "gta02_packaging_defconfig" - -do_configure_prepend() { - install -m 644 ./arch/arm/configs/${CONFIG_NAME} ${WORKDIR}/defconfig-oe -}recipes/linux/linux-openmoko_2.6.24.bb new file +28
-0@@ -0,0 +1,28 @@ +require linux.inc +require linux-openmoko.inc + +DESCRIPTION = "The Linux kernel for the Openmoko devices GTA01 (Neo1973) and GTA02 (Neo FreeRunner)" + +KERNEL_RELEASE = "2.6.24" +KERNEL_VERSION = "${KERNEL_RELEASE}" + +SRCREV = "fb42ce6724576fc173faf8abfb04aa2c36d213b7" +OEV = "oe5" +PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" +PR = "r1" + +SRC_URI = "\ + git://git.openmoko.org/git/kernel.git;protocol=git;branch=stable \ + \ + file://0001-squashfs-with-lzma.patch;patch=1 \ + file://0002-squashfs-initrd.patch;patch=1 \ + file://0003-squashfs-force-O2.patch;patch=1 \ + file://0004-squashfs-Kconfig.patch;patch=1 \ + file://0005-squashfs-Makefile.patch;patch=1 \ + \ + file://openwrt-ledtrig-netdev.patch;patch=1 \ + file://gta01-fix-battery-class-name.patch;patch=1 \ + \ + file://defconfig-oe \ +" +S = "${WORKDIR}/git"recipes/linux/linux-openmoko_2.6.28.bb new file +28
-0@@ -0,0 +1,28 @@ +require linux.inc +require linux-openmoko.inc + +DESCRIPTION_${PN} = "Linux ${KERNEL_RELEASE} kernel for the Openmoko Neo GSM Smartphones" + +KERNEL_RELEASE = "2.6.28" +KERNEL_VERSION = "${KERNEL_RELEASE}" + +SRCREV = "8c65792a5c83c76d662a617a7c4e1ae8104bb6a5" +OEV = "oe2" +PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" +PR = "r0" + +SRC_URI = "\ + git://git.openmoko.org/git/kernel.git;protocol=git;branch=stable \ + file://defconfig-oe.patch \ +" +S = "${WORKDIR}/git" + +CONFIG_NAME_om-gta01 = "gta01_moredrivers_defconfig" +CONFIG_NAME_om-gta02 = "gta02_packaging_defconfig" + +do_configure_prepend() { + install -m 644 ./arch/arm/configs/${CONFIG_NAME} ${WORKDIR}/defconfig-oe + cat ${WORKDIR}/defconfig-oe.patch | patch -p0 -d ${WORKDIR} +} + +recipes/linux/linux-openmoko_2.6.29.bb new file +26
-0@@ -0,0 +1,26 @@ +require linux.inc +require linux-openmoko.inc + +DESCRIPTION_${PN} = "Linux ${KERNEL_VERSION} kernel for the Openmoko Neo GSM Smartphones" + +KERNEL_RELEASE = "2.6.29" +KERNEL_VERSION = "2.6.29-rc3" + +SRCREV = "973a41fce60e5f6edfcf0eaf94056a57eee65e16" +OMV = "oe11" +PV = "${KERNEL_RELEASE}-${OMV}+gitr${SRCPV}" +PR = "r8" + +SRC_URI = "\ + git://git.openmoko.org/git/kernel.git;protocol=git;branch=andy-tracking \ + file://fix-install.patch;patch=1 \ + file://0007-Enable-UBI-UBIFS.patch;patch=1 \ +" +S = "${WORKDIR}/git" + +CONFIG_NAME_om-gta01 = "gta01_moredrivers_defconfig" +CONFIG_NAME_om-gta02 = "gta02_packaging_defconfig" + +do_configure_prepend() { + install -m 644 ./arch/arm/configs/${CONFIG_NAME} ${WORKDIR}/defconfig-oe +}recipes/linux/linux-openmoko_2.6.32.bb new file +46
-0@@ -0,0 +1,46 @@ +require linux.inc +require linux-openmoko.inc + +DESCRIPTION_${PN} = "Linux ${KERNEL_RELEASE} kernel for the Openmoko Neo GSM Smartphones" + +KERNEL_RELEASE="2.6.32.13" + +SRCREV = "a9254be10ac2294ea20165a87c09ea6afcf66d94" +OEV = "oe2" +PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" + +SRC_URI = "\ + git://git.openmoko.org/git/kernel.git;protocol=git;branch=om-gta02-2.6.32 \ + file://0001-Revert-s3cmci-initialize-default-platform-data-no_wp.patch;patch=1 \ +# latest stable patch for ubi fix 943e167cb3e8fb191894bde8a4a75db78531a7c8 + ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-${KERNEL_RELEASE}.bz2;patch=1;name=stablepatch \ +# build fix + file://0001-wm8753-fix-build-with-gcc-4.4.2-which-works-ok-with-.patch;patch=1 \ +# patches from Radek Polak used in qtmoko + file://0002-accels.patch.patch;patch=1 \ + file://0003-usbhost.patch.patch;patch=1 \ + file://0004-ar6000_delay.patch.patch;patch=1 \ + file://0005-save_regs.patch.patch;patch=1 \ +# defconfig updates + file://0006-gta02-defconfigs-enable-LEDS_S3C24XX-and-dummy-batte.patch;patch=1 \ +# patches from Weiss's gdrm-for-merging branch + file://0007-DRM-for-platform-devices.patch;patch=1 \ + file://0008-Glamo-DRM-and-KMS-driver.patch;patch=1 \ + file://0009-Work-on-Glamo-core-for-DRM.patch;patch=1 \ + file://0010-JBT6k74-work-for-KMS.patch;patch=1 \ + file://0011-Fix-crash-when-reading-Glamo-registers-via-sysfs.patch;patch=1 \ + file://0012-Fix-dynamic-command-queue-allocation.patch;patch=1 \ + file://0013-Debug-statements-for-testing.patch;patch=1 \ + file://0014-Fix-claim-of-2D-register-resource.patch;patch=1 \ +" + +SRC_URI[stablepatch.md5sum] = "ba6abb1ffee513a1d4f831599ddae490" +SRC_URI[stablepatch.sha256sum] = "baf6dff5d1c478e65decf2e8b704c60e546ea37c4de59ee8eb6af9dd3d63f145" + +S = "${WORKDIR}/git" + +CONFIG_NAME_om-gta02 = "gta02_drm_defconfig" + +do_configure_prepend() { + install -m 644 ./arch/arm/configs/${CONFIG_NAME} ${WORKDIR}/defconfig-oe +}recipes/linux/linux-openmoko_2.6.34_git new file +39
-0@@ -0,0 +1,39 @@ +require linux.inc +require linux-openmoko.inc + +DESCRIPTION_${PN} = "Linux ${KERNEL_RELEASE} kernel for the Openmoko Neo GSM Smartphones" + +KERNEL_RELEASE="2.6.34" + +SRCREV = "dd1225cc08c3375bf80289ac1965c724881b149a" +OEV = "oe2" +PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}" + +SRC_URI = "\ + git://git.openmoko.org/git/kernel.git;protocol=git;branch=om-gta02-2.6.34 \ +# build fix + file://wm8753-fix-build-with-gcc-4.4.2-which-works-ok-with-.patch;patch=1 \ +# patches from Thomas White's gdrm-for-merging branch + file://0001-DRM-for-platform-devices.patch;patch=1 \ + file://0002-Glamo-DRM-and-KMS-driver.patch;patch=1 \ + file://0003-Work-on-Glamo-core-for-DRM.patch;patch=1 \ + file://0004-JBT6k74-work-for-KMS.patch;patch=1 \ + file://0005-Fix-crash-when-reading-Glamo-registers-via-sysfs.patch;patch=1 \ + file://0006-Fix-dynamic-command-queue-allocation.patch;patch=1 \ + file://0007-Debug-statements-for-testing.patch;patch=1 \ + file://0008-Fix-claim-of-2D-register-resource.patch;patch=1 \ + file://0009-Use-unlocked_ioctl-rather-than-ioctl.patch;patch=1 \ +# patches from Radek Polak used in qtmoko + file://0001-accels.patch.patch;patch=1 \ + file://0002-usbhost.patch.patch;patch=1 \ + file://0003-ar6000_delay.patch.patch;patch=1 \ + file://0004-save_regs.patch.patch;patch=1 \ +" + +S = "${WORKDIR}/git" + +CONFIG_NAME_om-gta02 = "gta02_drm_defconfig" + +do_configure_prepend() { + install -m 644 ./arch/arm/configs/${CONFIG_NAME} ${WORKDIR}/defconfig-oe +}Signature · 7 lines
1.7.1 _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Re: [PATCH 3/3] linux-openmoko: rename recipes to common PN_PV scheme and adjust om-gta* machine configs
Quoted 41 lines · Khem Raj
Quoted 3 lines · Martin Jansa
* unify preferred provider and version for om-gta02
Signed-off-by Martin Jansa <[email protected]>Acked-by Khem Raj <[email protected]>Quoted 34 lines
---
conf/distro/openmoko.conf | 8 -conf/machine/om-3d7k.conf| 3 +-conf/machine/om-gta01.conf| 12 +--conf/machine/om-gta02.conf| 10 +- recipes/linux/linux-openmoko-2.6.24_git.bb | 28 ---- recipes/linux/linux-openmoko-2.6.28_git.bb | 28 ----.../0007-Enable-UBI-UBIFS.patch| 149 ++++++++++++++++++++.../linux/linux-openmoko-2.6.29/fix-install.patch| 23 +++ recipes/linux/linux-openmoko-2.6.32_git.bb | 46 ------ recipes/linux/linux-openmoko-2.6.34_git.bb | 39 -----.../0007-Enable-UBI-UBIFS.patch| 149 --------------------.../linux-openmoko-shr-devel/fix-install.patch| 23 --- recipes/linux/linux-openmoko-shr-devel_git.bb | 26 ----recipes/linux/linux-openmoko_2.6.24.bb | 28 ++++ recipes/linux/linux-openmoko_2.6.28.bb | 28 ++++ recipes/linux/linux-openmoko_2.6.29.bb | 26 ++++ recipes/linux/linux-openmoko_2.6.32.bb | 46 ++++++ recipes/linux/linux-openmoko_2.6.34_git | 39 +++++ 18 files changed, 347 insertions(+), 364 deletions(-)delete mode 100644 recipes/linux/linux-openmoko-2.6.24_git.bb
delete mode 100644 recipes/linux/linux-openmoko-2.6.28_git.bb
create mode 100644recipes/linux/linux-openmoko-2.6.29/0007-Enable-UBI-UBIFS.patchcreate mode 100644recipes/linux/linux-openmoko-2.6.29/fix-install.patchdelete mode 100644 recipes/linux/linux-openmoko-2.6.32_git.bb
delete mode 100644 recipes/linux/linux-openmoko-2.6.34_git.bb
delete mode 100644recipes/linux/linux-openmoko-shr-devel/0007-Enable-UBI-UBIFS.patchdelete mode 100644recipes/linux/linux-openmoko-shr-devel/fix-install.patchdelete mode 100644 recipes/linux/linux-openmoko-shr-devel_git.bb
create mode 100644 recipes/linux/linux-openmoko_2.6.24.bb
create mode 100644 recipes/linux/linux-openmoko_2.6.28.bb
create mode 100644 recipes/linux/linux-openmoko_2.6.29.bb
create mode 100644 recipes/linux/linux-openmoko_2.6.32.bb
create mode 100644 recipes/linux/linux-openmoko_2.6.34_git
Too late I found flaw of this (or in how SRCPV works) :/.
As long as those were recipes from same GIT repo but with different PN it was ok, because in persistent cache they got different keys:
sqlite> select * from BB_URI_LOCALCOUNT where key like '%linux-openmoko%'; git:git.openmoko.org.git.kernel.git-linux-openmoko-shr-devel_rev|973a41fce60e5f6edfcf0eaf94056a57eee65e16 git:git.openmoko.org.git.kernel.git-linux-openmoko-shr-devel_count|1 git:git.openmoko.org.git.kernel.git-linux-openmoko-2.6.32_rev|a9254be10ac2294ea20165a87c09ea6afcf66d94 git:git.openmoko.org.git.kernel.git-linux-openmoko-2.6.32_count|0 git:git.openmoko.org.git.kernel.git-linux-openmoko-2.6.31_rev|dd32737aa524e09c1d141a0e735dd58674552244 git:git.openmoko.org.git.kernel.git-linux-openmoko-2.6.31_count|0 git:git.openmoko.org.git.kernel.git-linux-openmoko-2.6.28_rev|8c65792a5c83c76d662a617a7c4e1ae8104bb6a5 git:git.openmoko.org.git.kernel.git-linux-openmoko-2.6.28_count|0 git:git.openmoko.org.git.kernel.git-linux-openmoko-shr-drm-devel_rev|e62a4ae1c6783f41b41a9ac3d258786586b65a40 git:git.openmoko.org.git.kernel.git-linux-openmoko-shr-drm-devel_count|0 git:git.openmoko.org.git.kernel.git-linux-openmoko-devel_rev|a15608f241a40b41fed5bffe511355c2067c4e88 git:git.openmoko.org.git.kernel.git-linux-openmoko-devel_count|0 git:git.openmoko.org.git.kernel.git-linux-openmoko-2.6.24_rev|fb42ce6724576fc173faf8abfb04aa2c36d213b7 git:git.openmoko.org.git.kernel.git-linux-openmoko-2.6.24_count|0 git:git.openmoko.org.git.kernel.git-linux-openmoko-2.6.34_rev|dd1225cc08c3375bf80289ac1965c724881b149a git:git.openmoko.org.git.kernel.git-linux-openmoko-2.6.34_count|1
now they all use 'git:git.openmoko.org.git.kernel.git-linux-openmoko_rev' and each recipe parsing seems to increase _count by number of linux-openmoko*.bb recipes (because _rev is changed between each recipe) :/.
git:git.openmoko.org.git.kernel.git-linux-openmoko_rev|dd1225cc08c3375bf80289ac1965c724881b149a git:git.openmoko.org.git.kernel.git-linux-openmoko_count|78
Please advise what should be best fix for this. I'm OK with reverting my last 2 commits and keeping unique PN for them, but maybe the same issue can be found in other recipes too.
Using recipe name for persistent cache could be easy solution but needs updated bitbake :/.
Regards,