diff options
Diffstat (limited to 'recipes')
32 files changed, 1204 insertions, 2346 deletions
diff --git a/recipes/freesmartphone/fsonetworkd_git.bb b/recipes/freesmartphone/fsonetworkd_git.bb index e64de8e96d..974ac3ccc7 100644 --- a/recipes/freesmartphone/fsonetworkd_git.bb +++ b/recipes/freesmartphone/fsonetworkd_git.bb @@ -3,4 +3,5 @@ inherit fso-plugin SRCREV = "${FSO_CORNUCOPIA_SRCREV}" PV = "0.1.0.0+gitr${SRCPV}" PE = "1" -PR = "${INC_PR}.2" +PR = "${INC_PR}.3" +RDEPENDS += "iptables" diff --git a/recipes/linux/linux-openmoko-2.6.32/0001-wm8753-fix-build-with-gcc-4.4.2-which-works-ok-with-.patch b/recipes/linux/linux-openmoko-2.6.32/0001-wm8753-fix-build-with-gcc-4.4.2-which-works-ok-with-.patch index c6a16ab4d5..52fe6262cc 100644 --- a/recipes/linux/linux-openmoko-2.6.32/0001-wm8753-fix-build-with-gcc-4.4.2-which-works-ok-with-.patch +++ b/recipes/linux/linux-openmoko-2.6.32/0001-wm8753-fix-build-with-gcc-4.4.2-which-works-ok-with-.patch @@ -1,7 +1,7 @@ -From b3b22a8f23e6b49d21bbfe70f278a0d79419e3df Mon Sep 17 00:00:00 2001 +From 16722526979959805c493deabaac8cf9ba2f8ef6 Mon Sep 17 00:00:00 2001 From: Martin Jansa <Martin.Jansa@gmail.com> Date: Sat, 7 Nov 2009 20:33:06 +0100 -Subject: [PATCH 1/9] wm8753: fix build with gcc-4.4.2, which works ok with 4.1.2 +Subject: [PATCH 01/14] wm8753: fix build with gcc-4.4.2, which works ok with 4.1.2 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> --- @@ -24,5 +24,5 @@ index 5ad677c..e148406 100644 K = Kpart & 0xFFFFFFFF; -- -1.6.6.1 +1.7.1 diff --git a/recipes/linux/linux-openmoko-2.6.32/0016-accels.patch.patch b/recipes/linux/linux-openmoko-2.6.32/0002-accels.patch.patch index 16f379d055..9644473eda 100644 --- a/recipes/linux/linux-openmoko-2.6.32/0016-accels.patch.patch +++ b/recipes/linux/linux-openmoko-2.6.32/0002-accels.patch.patch @@ -1,7 +1,7 @@ -From a08be3ba79daf13baca6de98249c8784ede31297 Mon Sep 17 00:00:00 2001 +From b96dbc75c274014171a53da13686bd90d239c023 Mon Sep 17 00:00:00 2001 From: Radek Polak <psonek2@seznam.cz> Date: Fri, 9 Apr 2010 09:15:40 +0200 -Subject: [PATCH 17/22] accels.patch +Subject: [PATCH 02/14] accels.patch adds support for accelerometers. You will need include/linux/lis302dl.h and drivers/input/misc/lis302dl.c from andy-tracking. The patch needs @@ -39,7 +39,7 @@ index 980a099..0ff8949 100644 diff --git a/arch/arm/mach-s3c2442/mach-gta02.c b/arch/arm/mach-s3c2442/mach-gta02.c -index b580b1b..8e3cc91 100644 +index 7965cad..0675181 100644 --- a/arch/arm/mach-s3c2442/mach-gta02.c +++ b/arch/arm/mach-s3c2442/mach-gta02.c @@ -63,6 +63,7 @@ @@ -73,7 +73,7 @@ index b580b1b..8e3cc91 100644 struct pcf50633 *gta02_pcf; /* -@@ -776,6 +793,60 @@ const struct jbt6k74_platform_data jbt6k74_pdata = { +@@ -775,6 +792,60 @@ const struct jbt6k74_platform_data jbt6k74_pdata = { .gpio_reset = GTA02_GPIO_GLAMO(4), }; @@ -134,7 +134,7 @@ index b580b1b..8e3cc91 100644 static struct spi_board_info gta02_spi_board_info[] = { { .modalias = "jbt6k74", -@@ -786,6 +857,81 @@ static struct spi_board_info gta02_spi_board_info[] = { +@@ -785,6 +856,81 @@ static struct spi_board_info gta02_spi_board_info[] = { .bus_num = 2, .chip_select = 0 }, @@ -216,7 +216,7 @@ index b580b1b..8e3cc91 100644 }; /* BQ27000 Battery */ -@@ -1136,6 +1282,7 @@ static struct platform_device *gta02_devices[] __initdata = { +@@ -1135,6 +1281,7 @@ static struct platform_device *gta02_devices[] __initdata = { static struct platform_device *gta02_devices_pmu_children[] = { &s3c_device_ts, >a02_glamo_dev, @@ -224,7 +224,7 @@ index b580b1b..8e3cc91 100644 &s3c_device_timer[2], >a02_hdq_device, >a02_gps_userspace_consumer -@@ -1362,6 +1509,16 @@ static void __init gta02_machine_init(void) +@@ -1361,6 +1508,16 @@ static void __init gta02_machine_init(void) /* Set the panic callback to make AUX LED blink at ~5Hz. */ panic_blink = gta02_panic_blink; @@ -1755,5 +1755,5 @@ index eed4254..f92de01 100644 /* start or stop queue processing */ extern int spi_bitbang_start(struct spi_bitbang *spi); -- -1.7.0.4 +1.7.1 diff --git a/recipes/linux/linux-openmoko-2.6.32/0017-usbhost.patch.patch b/recipes/linux/linux-openmoko-2.6.32/0003-usbhost.patch.patch index 16ed3746fd..80b05eac18 100644 --- a/recipes/linux/linux-openmoko-2.6.32/0017-usbhost.patch.patch +++ b/recipes/linux/linux-openmoko-2.6.32/0003-usbhost.patch.patch @@ -1,7 +1,7 @@ -From d71534de6ab5e132d0798df30408042c229cbb62 Mon Sep 17 00:00:00 2001 +From 1000aee5e65dc824e02aafe2a70ad5b3f0d44d2d Mon Sep 17 00:00:00 2001 From: Radek Polak <psonek2@seznam.cz> Date: Fri, 9 Apr 2010 09:17:28 +0200 -Subject: [PATCH 18/22] usbhost.patch +Subject: [PATCH 03/14] usbhost.patch adds support for usb host mode and adds usb host pm sysfs node. I just copied and modified how modem is powered up and backported changes in ohci-s3c2410.c. @@ -32,7 +32,7 @@ index 6247ca0..3e7145c 100644 # Machine support diff --git a/arch/arm/mach-s3c2442/mach-gta02.c b/arch/arm/mach-s3c2442/mach-gta02.c -index 8e3cc91..f1d4d51 100644 +index 0675181..779d6df 100644 --- a/arch/arm/mach-s3c2442/mach-gta02.c +++ b/arch/arm/mach-s3c2442/mach-gta02.c @@ -322,6 +322,10 @@ static struct platform_device gta02_pm_gsm_dev = { @@ -106,7 +106,7 @@ index 8e3cc91..f1d4d51 100644 static struct regulator_bulk_data gta02_gps_consumer_supply = { .supply = "GPS", }; -@@ -1332,12 +1368,17 @@ static struct platform_device* gta02_glamo_gpio_children[] = { +@@ -1331,12 +1367,17 @@ static struct platform_device* gta02_glamo_gpio_children[] = { static struct platform_device* gta02_pcf50633_gpio_children[] = { >a02_gsm_supply_device, @@ -124,7 +124,7 @@ index 8e3cc91..f1d4d51 100644 static struct platform_device* gta02_hdq_children[] = { &bq27000_battery_device, }; -@@ -1364,14 +1405,19 @@ static struct gta02_device_children gta02_device_children[] = { +@@ -1363,14 +1404,19 @@ static struct gta02_device_children gta02_device_children[] = { }, { .dev_name = "pcf50633-gpio", @@ -229,5 +229,5 @@ index a68af2d..02bd7b0 100644 s3c2410_stop_hc(dev); iounmap(hcd->regs); -- -1.7.0.4 +1.7.1 diff --git a/recipes/linux/linux-openmoko-2.6.32/0018-ar6000_delay.patch.patch b/recipes/linux/linux-openmoko-2.6.32/0004-ar6000_delay.patch.patch index 54200d558f..104a8c8951 100644 --- a/recipes/linux/linux-openmoko-2.6.32/0018-ar6000_delay.patch.patch +++ b/recipes/linux/linux-openmoko-2.6.32/0004-ar6000_delay.patch.patch @@ -1,7 +1,7 @@ -From cf93a0f8d2d61a2e13590c261dee4c4d74412db7 Mon Sep 17 00:00:00 2001 +From c9580261d79d8d1664fbd2da52dcd2148da9ef14 Mon Sep 17 00:00:00 2001 From: Radek Polak <psonek2@seznam.cz> Date: Fri, 9 Apr 2010 09:18:02 +0200 -Subject: [PATCH 19/22] ar6000_delay.patch +Subject: [PATCH 04/14] ar6000_delay.patch patch from https://docs.openmoko.org/trac/ticket/2327 - wifi is working good (100% until now) for me with this patch. @@ -207,5 +207,5 @@ index 386d96e..90178d0 100644 if (ret == A_OK) return 0; -- -1.7.0.4 +1.7.1 diff --git a/recipes/linux/linux-openmoko-2.6.32/0005-Add-JBT6k74-hook-for-use-by-KMS.patch b/recipes/linux/linux-openmoko-2.6.32/0005-Add-JBT6k74-hook-for-use-by-KMS.patch deleted file mode 100644 index 744004e7b1..0000000000 --- a/recipes/linux/linux-openmoko-2.6.32/0005-Add-JBT6k74-hook-for-use-by-KMS.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 972c0a58e9e238c266adc77c88dcd8de6f123742 Mon Sep 17 00:00:00 2001 -From: Thomas White <taw@bitwiz.org.uk> -Date: Sat, 21 Nov 2009 21:42:16 +0100 -Subject: [PATCH 5/9] Add JBT6k74 hook for use by KMS - -Signed-off-by: Thomas White <taw@bitwiz.org.uk> ---- - drivers/video/backlight/jbt6k74.c | 18 ++++++++++++++++++ - 1 files changed, 18 insertions(+), 0 deletions(-) - -diff --git a/drivers/video/backlight/jbt6k74.c b/drivers/video/backlight/jbt6k74.c -index 8450904..95ca4cf 100644 ---- a/drivers/video/backlight/jbt6k74.c -+++ b/drivers/video/backlight/jbt6k74.c -@@ -698,6 +698,22 @@ static int jbt6k74_get_power(struct lcd_device *ld) - } - } - -+/* This is utterly, totally horrible. I'm REALLY sorry... */ -+struct jbt_info *jbt_global; -+void jbt6k74_action(int val) -+{ -+ if ( !jbt_global ) { -+ printk(KERN_CRIT "JBT not initialised!!!\n"); -+ return; -+ } -+ if ( val == 0 ) { -+ jbt6k74_enter_power_mode(jbt_global, JBT_POWER_MODE_SLEEP); -+ } else { -+ jbt6k74_enter_power_mode(jbt_global, JBT_POWER_MODE_NORMAL); -+ } -+} -+EXPORT_SYMBOL_GPL(jbt6k74_action); -+ - struct lcd_ops jbt6k74_lcd_ops = { - .set_power = jbt6k74_set_power, - .get_power = jbt6k74_get_power, -@@ -728,6 +744,8 @@ static int __devinit jbt_probe(struct spi_device *spi) - if (!jbt) - return -ENOMEM; - -+ jbt_global = jbt; -+ - jbt->spi = spi; - - jbt->lcd_dev = lcd_device_register("jbt6k74-lcd", &spi->dev, jbt, --- -1.6.6.1 - diff --git a/recipes/linux/linux-openmoko-2.6.32/0019-save_regs.patch.patch b/recipes/linux/linux-openmoko-2.6.32/0005-save_regs.patch.patch index 8fc2cea326..7873f850e4 100644 --- a/recipes/linux/linux-openmoko-2.6.32/0019-save_regs.patch.patch +++ b/recipes/linux/linux-openmoko-2.6.32/0005-save_regs.patch.patch @@ -1,7 +1,7 @@ -From a9d6c115089a0a34fbca89c539de50148a2cf34e Mon Sep 17 00:00:00 2001 +From f143dfe95e9b48aebc8fad111086a25c915bf479 Mon Sep 17 00:00:00 2001 From: Radek Polak <psonek2@seznam.cz> Date: Fri, 9 Apr 2010 09:22:23 +0200 -Subject: [PATCH 20/22] save_regs.patch +Subject: [PATCH 05/14] save_regs.patch With this patch wifi can survive suspend. --- @@ -136,5 +136,5 @@ index e4898e9..b49d674 100644 extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int); extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *, -- -1.7.0.4 +1.7.1 diff --git a/recipes/linux/linux-openmoko-2.6.32/0006-glamo-drm-use-dev_set_drvdata-instead-of-setting-dri.patch b/recipes/linux/linux-openmoko-2.6.32/0006-glamo-drm-use-dev_set_drvdata-instead-of-setting-dri.patch deleted file mode 100644 index f685608253..0000000000 --- a/recipes/linux/linux-openmoko-2.6.32/0006-glamo-drm-use-dev_set_drvdata-instead-of-setting-dri.patch +++ /dev/null @@ -1,29 +0,0 @@ -From be2d944c2b29b19b4cee7c64b00bd75cf7209724 Mon Sep 17 00:00:00 2001 -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Tue, 22 Dec 2009 16:11:27 +0100 -Subject: [PATCH 6/9] glamo-drm: use dev_set_drvdata instead of setting driver_data directly - -* driver_data is private since 2.6.32 - http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b4028437876866aba4747a655ede00f892089e14 - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - drivers/mfd/glamo/glamo-drm-drv.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/drivers/mfd/glamo/glamo-drm-drv.c b/drivers/mfd/glamo/glamo-drm-drv.c -index f30097e..1907a47 100644 ---- a/drivers/mfd/glamo/glamo-drm-drv.c -+++ b/drivers/mfd/glamo/glamo-drm-drv.c -@@ -347,7 +347,7 @@ out_release_regs: - release_mem_region(gdrm->reg->start, resource_size(gdrm->reg)); - out_free: - kfree(gdrm); -- pdev->dev.driver_data = NULL; -+ dev_set_drvdata(&pdev->dev, NULL); - return rc; - } - --- -1.6.6.1 - diff --git a/recipes/linux/linux-openmoko-2.6.32/0026-gta02-defconfigs-enable-LEDS_S3C24XX.patch b/recipes/linux/linux-openmoko-2.6.32/0006-gta02-defconfigs-enable-LEDS_S3C24XX-and-dummy-batte.patch index 7a40345689..103c06c886 100644 --- a/recipes/linux/linux-openmoko-2.6.32/0026-gta02-defconfigs-enable-LEDS_S3C24XX.patch +++ b/recipes/linux/linux-openmoko-2.6.32/0006-gta02-defconfigs-enable-LEDS_S3C24XX-and-dummy-batte.patch @@ -1,12 +1,12 @@ -From f80beb203e503696cd2e74e194176b8d6f49b27b Mon Sep 17 00:00:00 2001 +From 7e4a1fee4f08ef7ccedd4706b4890afc71f37dc4 Mon Sep 17 00:00:00 2001 From: Martin Jansa <Martin.Jansa@gmail.com> Date: Mon, 17 May 2010 12:41:06 +0200 -Subject: [PATCH] gta02 defconfigs, enable LEDS_S3C24XX and dummy battery driver +Subject: [PATCH 06/14] gta02 defconfigs, enable LEDS_S3C24XX and dummy battery driver --- arch/arm/configs/gta02_defconfig | 2 +- - arch/arm/configs/gta02_drm_defconfig | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) + arch/arm/configs/gta02_drm_defconfig | 10 +++++----- + 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/configs/gta02_defconfig b/arch/arm/configs/gta02_defconfig index 73d26ba..55832ac 100644 @@ -22,9 +22,19 @@ index 73d26ba..55832ac 100644 CONFIG_LEDS_GPIO=y CONFIG_LEDS_GPIO_PLATFORM=y diff --git a/arch/arm/configs/gta02_drm_defconfig b/arch/arm/configs/gta02_drm_defconfig -index 05aa130..4d85e9a 100644 +index 05aa130..62c1ee4 100644 --- a/arch/arm/configs/gta02_drm_defconfig +++ b/arch/arm/configs/gta02_drm_defconfig +@@ -1,7 +1,7 @@ + # + # Automatically generated make config: don't edit +-# Linux kernel version: 2.6.32.11 +-# Sun Apr 11 14:20:07 2010 ++# Linux kernel version: 2.6.32.13 ++# Mon May 17 14:13:35 2010 + # + CONFIG_ARM=y + CONFIG_HAVE_PWM=y @@ -1233,7 +1233,7 @@ CONFIG_POWER_SUPPLY=y CONFIG_CHARGER_PCF50633=y CONFIG_BATTERY_BQ27000_HDQ=y @@ -34,7 +44,7 @@ index 05aa130..4d85e9a 100644 # CONFIG_HWMON is not set # CONFIG_THERMAL is not set CONFIG_WATCHDOG=y -@@ -1681,7 +1681,7 @@ CONFIG_LEDS_CLASS=y +@@ -1681,14 +1681,14 @@ CONFIG_LEDS_CLASS=y # # LED drivers # @@ -43,6 +53,14 @@ index 05aa130..4d85e9a 100644 # CONFIG_LEDS_PCA9532 is not set CONFIG_LEDS_GPIO=y CONFIG_LEDS_GPIO_PLATFORM=y + # CONFIG_LEDS_LP3944 is not set + # CONFIG_LEDS_PCA955X is not set + # CONFIG_LEDS_DAC124S085 is not set +-# CONFIG_LEDS_PWM is not set ++CONFIG_LEDS_PWM=y + # CONFIG_LEDS_BD2802 is not set + + # -- 1.7.1 diff --git a/recipes/linux/linux-openmoko-2.6.32/0002-DRM-for-platform-devices.patch b/recipes/linux/linux-openmoko-2.6.32/0007-DRM-for-platform-devices.patch index 4e47a088d0..e16379fecf 100644 --- a/recipes/linux/linux-openmoko-2.6.32/0002-DRM-for-platform-devices.patch +++ b/recipes/linux/linux-openmoko-2.6.32/0007-DRM-for-platform-devices.patch @@ -1,7 +1,7 @@ -From 660570997a5c998aaecc94798b6ea8d60b0da053 Mon Sep 17 00:00:00 2001 +From d05d2c82e2ec110720c5c714ad18d60ef676aa1d Mon Sep 17 00:00:00 2001 From: Thomas White <taw@bitwiz.org.uk> Date: Tue, 20 Oct 2009 15:52:30 +0200 -Subject: [PATCH 2/9] DRM for platform devices +Subject: [PATCH 07/14] 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. @@ -454,5 +454,5 @@ index 7ad3faa..1d9a229 100644 extern int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent, struct drm_driver *driver); -- -1.6.6.1 +1.7.1 diff --git a/recipes/linux/linux-openmoko-2.6.32/0007-glamo-drm-select-DRM_KMS_HELPER-for-crtc-functions.patch b/recipes/linux/linux-openmoko-2.6.32/0007-glamo-drm-select-DRM_KMS_HELPER-for-crtc-functions.patch deleted file mode 100644 index 68751942a9..0000000000 --- a/recipes/linux/linux-openmoko-2.6.32/0007-glamo-drm-select-DRM_KMS_HELPER-for-crtc-functions.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 8bb128ce2474ef10c71ea681fa01e574c1ec3114 Mon Sep 17 00:00:00 2001 -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Tue, 22 Dec 2009 16:32:57 +0100 -Subject: [PATCH 7/9] glamo-drm: select DRM_KMS_HELPER for crtc functions - ---- - drivers/mfd/glamo/Kconfig | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/drivers/mfd/glamo/Kconfig b/drivers/mfd/glamo/Kconfig -index 214c70e..a12ebf6 100644 ---- a/drivers/mfd/glamo/Kconfig -+++ b/drivers/mfd/glamo/Kconfig -@@ -47,6 +47,7 @@ config MFD_GLAMO_DRM - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT -+ select DRM_KMS_HELPER - help - Direct Rendering Manager interface for the S-Media Glamo chip, as - used in Openmoko FreeRunner (GTA02). --- -1.6.6.1 - diff --git a/recipes/linux/linux-openmoko-2.6.32/0003-Glamo-DRM-and-KMS-driver.patch b/recipes/linux/linux-openmoko-2.6.32/0008-Glamo-DRM-and-KMS-driver.patch index 6c1cc415d9..cb680f1ed5 100644 --- a/recipes/linux/linux-openmoko-2.6.32/0003-Glamo-DRM-and-KMS-driver.patch +++ b/recipes/linux/linux-openmoko-2.6.32/0008-Glamo-DRM-and-KMS-driver.patch @@ -1,30 +1,31 @@ -From eff70b6d14cc372944bbeda0dd0afe8599327f96 Mon Sep 17 00:00:00 2001 +From ee4092984dd817e3889a48c0b51c173e96c71913 Mon Sep 17 00:00:00 2001 From: Thomas White <taw@bitwiz.org.uk> Date: Tue, 20 Oct 2009 16:14:55 +0200 -Subject: [PATCH 3/9] Glamo DRM and KMS driver +Subject: [PATCH 08/14] Glamo DRM and KMS driver -This adds the Glamo DRM and KMS driver, but not the modifications needed +This adds the Glamo DRM and KMS driver, but note that modifications are needed elsewhere to support it. Signed-off-by: Thomas White <taw@bitwiz.org.uk> +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> --- - drivers/mfd/glamo/Kconfig | 15 + + drivers/mfd/glamo/Kconfig | 16 + 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-buffer.c | 374 +++++++++++++ + drivers/mfd/glamo/glamo-buffer.h | 60 ++ + drivers/mfd/glamo/glamo-cmdq.c | 555 +++++++++++++++++++ drivers/mfd/glamo/glamo-cmdq.h | 49 ++ - drivers/mfd/glamo/glamo-display.c | 869 +++++++++++++++++++++++++++++++++ - drivers/mfd/glamo/glamo-display.h | 39 ++ - drivers/mfd/glamo/glamo-drm-drv.c | 444 +++++++++++++++++ - drivers/mfd/glamo/glamo-drm-private.h | 156 ++++++ - drivers/mfd/glamo/glamo-fence.c | 330 +++++++++++++ + drivers/mfd/glamo/glamo-display.c | 975 +++++++++++++++++++++++++++++++++ + drivers/mfd/glamo/glamo-display.h | 41 ++ + drivers/mfd/glamo/glamo-drm-drv.c | 423 ++++++++++++++ + drivers/mfd/glamo/glamo-drm-private.h | 166 ++++++ + drivers/mfd/glamo/glamo-fence.c | 330 +++++++++++ drivers/mfd/glamo/glamo-fence.h | 34 ++ - drivers/mfd/glamo/glamo-kms-fb.c | 540 ++++++++++++++++++++ + drivers/mfd/glamo/glamo-kms-fb.c | 493 +++++++++++++++++ drivers/mfd/glamo/glamo-kms-fb.h | 41 ++ include/drm/Kbuild | 1 + - include/drm/glamo_drm.h | 153 ++++++ - 16 files changed, 3635 insertions(+), 1 deletions(-) + include/drm/glamo_drm.h | 153 +++++ + 16 files changed, 3715 insertions(+), 1 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 @@ -40,10 +41,10 @@ Signed-off-by: Thomas White <taw@bitwiz.org.uk> create mode 100644 include/drm/glamo_drm.h diff --git a/drivers/mfd/glamo/Kconfig b/drivers/mfd/glamo/Kconfig -index 3aa4831..214c70e 100644 +index 3aa4831..a12ebf6 100644 --- a/drivers/mfd/glamo/Kconfig +++ b/drivers/mfd/glamo/Kconfig -@@ -40,3 +40,18 @@ config MFD_GLAMO_MCI +@@ -40,3 +40,19 @@ config MFD_GLAMO_MCI neo1973 GTA-02. If unsure, say N. @@ -54,6 +55,7 @@ index 3aa4831..214c70e 100644 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT ++ select DRM_KMS_HELPER + help + Direct Rendering Manager interface for the S-Media Glamo chip, as + used in Openmoko FreeRunner (GTA02). @@ -83,10 +85,10 @@ index ebf26f7..d5ebf8f 100644 + 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 +index 0000000..82ea0c0 --- /dev/null +++ b/drivers/mfd/glamo/glamo-buffer.c -@@ -0,0 +1,372 @@ +@@ -0,0 +1,374 @@ +/* + * SMedia Glamo 336x/337x memory management + * @@ -334,6 +336,8 @@ index 0000000..45500d3 + if (!gobj->mmap_offset) { + ret = glamo_gem_create_mmap_offset(obj); + if (ret) { ++ printk(KERN_CRIT "Couldn't create mmap offset\n"); ++ drm_gem_object_unreference(obj); + mutex_unlock(&dev->struct_mutex); + return ret; + } @@ -527,10 +531,10 @@ index 0000000..41f18fd +#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 +index 0000000..442963c --- /dev/null +++ b/drivers/mfd/glamo/glamo-cmdq.c -@@ -0,0 +1,528 @@ +@@ -0,0 +1,555 @@ +/* + * SMedia Glamo 336x/337x command queue handling + * @@ -592,6 +596,9 @@ index 0000000..caedc27 +#include "glamo-regs.h" + + ++#define GLAMO_CMDQ_SIZE (128 * 1024) /* 128k ring buffer */ ++ ++ +static inline void reg_write(struct glamodrm_handle *gdrm, + u_int16_t reg, u_int16_t val) +{ @@ -969,7 +976,7 @@ index 0000000..caedc27 + 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"); ++ printk(KERN_WARNING "[glamo-drm] Burst not aligned!\n"); + goto cleanup; + } + @@ -988,7 +995,7 @@ index 0000000..caedc27 +} + + -+int glamo_cmdq_init(struct glamodrm_handle *gdrm) ++int glamo_cmdq_setup(struct glamodrm_handle *gdrm) +{ + unsigned int i; + @@ -1008,9 +1015,9 @@ index 0000000..caedc27 + + /* Set up command queue location */ + reg_write(gdrm, GLAMO_REG_CMDQ_BASE_ADDRL, -+ GLAMO_OFFSET_CMDQ & 0xffff); ++ gdrm->cmdq_offs & 0xffff); + reg_write(gdrm, GLAMO_REG_CMDQ_BASE_ADDRH, -+ (GLAMO_OFFSET_CMDQ >> 16) & 0x7f); ++ (gdrm->cmdq_offs >> 16) & 0x7f); + + /* Length of command queue in 1k blocks, minus one */ + reg_write(gdrm, GLAMO_REG_CMDQ_LEN, (GLAMO_CMDQ_SIZE >> 10)-1); @@ -1025,6 +1032,30 @@ index 0000000..caedc27 +} + + ++int glamo_cmdq_init(struct glamodrm_handle *gdrm) ++{ ++ struct drm_gem_object *obj; ++ struct drm_glamo_gem_object *gobj; ++ int ret = 0; ++ ++ obj = glamo_gem_object_alloc(dev, GLAMO_CMDQ_SIZE, 4); ++ if ( !obj ) { ++ printk(KERN_ERR "[glamo-drm] Failed to allocate CmdQ\n"); ++ ret = -ENOMEM; ++ goto out; ++ } ++ gobj = fbo->driver_private; ++ gdrm->cmdq_offs = GLAMO_OFFSET_FB + gobj->block->start; ++ gdrm->cmdq_base = ioremap(gdrm->vram->start + offs, GLAMO_CMDQ_SIZE); ++ ++ /* Set up registers */ ++ glamo_cmdq_setup(gdrm); ++ ++out: ++ return ret; ++} ++ ++ +int glamo_cmdq_shutdown(struct glamodrm_handle *gdrm) +{ + return 0; @@ -1039,7 +1070,7 @@ index 0000000..caedc27 + +void glamo_cmdq_resume(struct glamodrm_handle *gdrm) +{ -+ glamo_cmdq_init(gdrm); ++ glamo_cmdq_setup(gdrm); +} + + @@ -1116,10 +1147,10 @@ index 0000000..510d195 +#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..34a665a +index 0000000..75ad734 --- /dev/null +++ b/drivers/mfd/glamo/glamo-display.c -@@ -0,0 +1,869 @@ +@@ -0,0 +1,975 @@ +/* + * SMedia Glamo 336x/337x display + * @@ -1174,19 +1205,18 @@ index 0000000..34a665a + * + */ + -+#define DEBUG 1 -+ +#include <drm/drmP.h> +#include <drm/glamo_drm.h> +#include <drm/drm_crtc_helper.h> +#include <drm/drm_crtc.h> ++#include <linux/glamofb.h> ++#include <linux/jbt6k74.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 @@ -1361,14 +1391,6 @@ index 0000000..34a665a +} + + -+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) @@ -1397,6 +1419,12 @@ index 0000000..34a665a + gcrtc = to_glamo_crtc(crtc); + gdrm = gcrtc->gdrm; /* Here it is! */ + ++ if ( !gcrtc->pixel_clock_on ) { ++ printk(KERN_WARNING "[glamo-drm] Display is off - " ++ "enabling it before setting base.\n"); ++ glamo_lcd_power(gdrm, 1); ++ } ++ + gfb = to_glamo_framebuffer(crtc->fb); + obj = gfb->obj; + gobj = obj->driver_private; @@ -1423,63 +1451,176 @@ index 0000000..34a665a + struct glamodrm_handle *gdrm; + struct glamo_crtc *gcrtc; + int retr_start, retr_end, disp_start, disp_end; ++ int rot; + + /* Dig out our handle */ + gcrtc = to_glamo_crtc(crtc); + gdrm = gcrtc->gdrm; /* Here it is! */ + ++ if ( !gcrtc->pixel_clock_on ) { ++ printk(KERN_WARNING "[glamo-drm] Display is off - " ++ "enabling it before setting mode.\n"); ++ glamo_lcd_power(gdrm, 1); ++ msleep(500); ++ } ++ ++ /* Rotate? */ ++ if ( (mode->hdisplay == 640) && (mode->vdisplay == 480) ) { ++ rot = GLAMO_LCD_ROT_MODE_90; ++ } else if ( (mode->hdisplay == 480) && (mode->vdisplay == 640) ) { ++ rot = GLAMO_LCD_ROT_MODE_0; ++ } else if ( (mode->hdisplay == 320) && (mode->vdisplay == 240) ) { ++ rot = GLAMO_LCD_ROT_MODE_90; ++ } else if ( (mode->hdisplay == 240) && (mode->vdisplay == 320) ) { ++ rot = GLAMO_LCD_ROT_MODE_0; ++ } else { ++ printk(KERN_WARNING "[glamo-drm] Couldn't choose rotation.\n"); ++ rot = GLAMO_LCD_ROT_MODE_0; |
