diff --git a/patch.sh b/patch.sh index 9f2ea9f61bb117c808026ee1bc1b404e4b0b5708..1a1300b2cbb27491e379a1ed23d4bd37cd3c5b52 100644 --- a/patch.sh +++ b/patch.sh @@ -32,7 +32,7 @@ git_add () { } cleanup () { - git format-patch -7 + git format-patch -4 exit } @@ -55,7 +55,15 @@ micrel_zippy2 () { git am "${DIR}/patches/micrel_zippy2/0007-ksz8851-add-ks8851_tx_check.patch" } -function beagle { +sakoman () { + echo "Patches from: Sakoman git tree" + git am "${DIR}/patches/sakoman/0001-OMAP-DSS2-add-bootarg-for-selecting-svideo.patch" + git am "${DIR}/patches/sakoman/0002-video-add-timings-for-hd720.patch" + git am "${DIR}/patches/sakoman/0003-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch" +} + + +beagle () { echo "Board Patches for: BeagleBoard" git am "${DIR}/patches/beagle/expansion/0001-expansion-add-buddy-param-for-expansionboard-names.patch" @@ -63,52 +71,44 @@ function beagle { git am "${DIR}/patches/beagle/expansion/0003-expansion-add-zippy.patch" git am "${DIR}/patches/beagle/expansion/0004-expansion-add-zippy2.patch" git am "${DIR}/patches/beagle/expansion/0005-expansion-add-trainer.patch" - git am "${DIR}/patches/beagle/expansion/0006-expansion-add-ulcd.patch" - - git am "${DIR}/patches/beagle/0001-beagleboard-reinstate-usage-of-hi-speed-PLL-divider.patch" - git am "${DIR}/patches/beagle/0001-Turn-on-the-USB-regulator-on-Beagle-xM-explicitly-wh.patch" -#merged v3.4-rc2 -# git am "${DIR}/patches/beagle/0001-ARM-OMAP3-clock-data-fill-in-some-missing-clockdomai.patch" - -#merged v3.4-rc4 -# git am "${DIR}/patches/beagle/0001-ARM-OMAP3-USB-Fix-the-EHCI-ULPI-PHY-reset-issue.patch" - git am "${DIR}/patches/beagle/0001-omap3_beagle-init-uart2-for-beagle-rev-AX-BX-only.patch" + git am "${DIR}/patches/beagle/expansion/0006-expansion-add-CircuitCo-ulcd-Support.patch" - git am "${DIR}/patches/beagle/0001-meego-modedb-add-Toshiba-LTA070B220F-800x480-support.patch" - git am "${DIR}/patches/beagle/0001-default-to-fifo-mode-5-for-old-musb-beagles.patch" +#changes need to be ported to the 3.4-rc.. +# git am "${DIR}/patches/beagle/expansion/0007-expansion-add-wifi.patch" - git am "${DIR}/patches/omap/0001-omap3-Increase-limit-on-bootarg-mpurate.patch" - -#switch to mainline sound -# git am "${DIR}/patches/beagle/0001-ASoC-omap-add-MODULE_ALIAS-to-mcbsp-and-pcm-drivers.patch" -# git am "${DIR}/patches/beagle/0001-ASoC-omap-convert-per-board-modules-to-platform-driv.patch" - - git am "${DIR}/patches/sakoman/2.6.39/0006-OMAP-DSS2-add-bootarg-for-selecting-svideo-or-compos.patch" - git am "${DIR}/patches/sakoman/2.6.39/0007-video-add-timings-for-hd720.patch" - git am "${DIR}/patches/sakoman/2.6.39/0025-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch" + git am "${DIR}/patches/beagle/0001-beagleboard-reinstate-usage-of-hi-speed-PLL-divider.patch" + git am "${DIR}/patches/beagle/0002-Turn-on-the-USB-regulator-on-Beagle-xM-explicitly.patch" + git am "${DIR}/patches/beagle/0003-meego-modedb-add-Toshiba-LTA070B220F-800x480-support.patch" + git am "${DIR}/patches/beagle/0004-default-to-fifo-mode-5-for-old-musb-beagles.patch" + git am "${DIR}/patches/beagle/0005-omap3_beagle-init-uart2-for-beagle-rev-AX-BX-only.patch" -# git am "${DIR}/patches/omap/0001-Fix-sprz319-erratum-2.1.patch" } -function devkit8000 { +devkit8000 () { echo "Board Patches for: devkit8000" git am "${DIR}/patches/devkit8000/0001-arm-omap-devkit8000-for-lcd-use-samsung_lte_panel-2.6.37-git10.patch" } -function touchbook { - echo "Board Patches for: Touchbook" - git am "${DIR}/patches/touchbook/0001-omap3-touchbook-remove-mmc-gpio_wp.patch" - git am "${DIR}/patches/touchbook/0002-omap3-touchbook-drop-u-boot-readonly.patch" -} - -function pandaboard { +panda () { echo "Board Patches for: PandaBoard" git am "${DIR}/patches/panda/0001-panda-fix-wl12xx-regulator.patch" - git am "${DIR}/patches/panda/0001-panda-enable-bluetooth.patch" - git am "${DIR}/patches/panda/0001-ti-st-st-kim-fixing-firmware-path.patch" + git am "${DIR}/patches/panda/0002-panda-enable-bluetooth.patch" + git am "${DIR}/patches/panda/0003-ti-st-st-kim-fixing-firmware-path.patch" } -function omapdrm { +omap_fixes () { + echo "omap cherry pick fixes" + git am "${DIR}/patches/omap_fixes/0001-omap3-Increase-limit-on-bootarg-mpurate.patch" + git am "${DIR}/patches/omap_fixes/0002-OMAP2-UART-Remove-cpu-checks-for-populating-errata-f.patch" + git am "${DIR}/patches/omap_fixes/0003-OMAP2-UART-enable-tx-wakeup-bit-for-wer-reg.patch" + git am "${DIR}/patches/omap_fixes/0004-OMAP2-UART-replace-omap34xx-omap4xx-cpu-checks-with-.patch" + git am "${DIR}/patches/omap_fixes/0005-mfd-cpu_is_omap3430-wasnt-defined.patch" + +#breaks beagle c4, needs fix.. +# git am "${DIR}/patches/omap_fixes/0001-Fix-sprz319-erratum-2.1.patch" +} + +omapdrm () { echo "omap testing omapdrm/kms" echo "Patches for 3.4-rc1-cma-v24" @@ -129,61 +129,23 @@ function omapdrm { git am "${DIR}/patches/drm/cma/0014-X86-integrate-CMA-with-DMA-mapping-subsystem.patch" git am "${DIR}/patches/drm/cma/0015-ARM-integrate-CMA-with-DMA-mapping-subsystem.patch" -#merged v3.4-rc0 -# echo "omapdrm driver patches for 3.4" -# git am "${DIR}/patches/drm/0001-staging-drm-omap-get-supported-color-formats-from-ov.patch" -# git am "${DIR}/patches/drm/0002-staging-drm-omap-add-a-workqueue.patch" -# git am "${DIR}/patches/drm/0003-staging-drm-omap-call-omap_gem_roll-in-non-atomic-ct.patch" -# git am "${DIR}/patches/drm/0004-staging-drm-omap-some-minor-fb-cleanups.patch" -# git am "${DIR}/patches/drm/0005-staging-drm-omap-defer-unpin-until-scanout-completes.patch" -# git am "${DIR}/patches/drm/0006-staging-drm-omap-debugfs-for-object-and-fb-tracking.patch" -# git am "${DIR}/patches/drm/0007-staging-drm-omap-Disable-DMM-debugfs-for-OMAP3.patch" -# git am "${DIR}/patches/drm/0008-staging-drm-omap-Validate-debugfs-device.patch" -# git am "${DIR}/patches/drm/0009-staging-drm-omap-Get-DMM-resources-from-hwmod.patch" -# git am "${DIR}/patches/drm/0010-staging-drm-omap-mmap-of-tiled-buffers-with-stride-4.patch" - -#merged v3.4-rc0 -# #posted: 11 Mar 2012 19:12:01 for 3.4 -# git am "${DIR}/patches/drm/0001-staging-drm-omap-avoid-multiple-planes-having-same-z.patch" -# git am "${DIR}/patches/drm/0002-staging-drm-omap-send-page-flip-event-after-endwin.patch" -# git am "${DIR}/patches/drm/0003-staging-drm-omap-use-current-time-for-page-flip-even.patch" - #posted: 13 Mar 2012 for 3.4 git am "${DIR}/patches/drm/0001-omap2-add-drm-device.patch" #might be merged in 3.4 - git am "${DIR}/patches/drm/0001-ARM-OMAP2-3-HWMOD-Add-missing-flags-for-dispc-class.patch" - git am "${DIR}/patches/drm/0002-ARM-OMAP2-3-HWMOD-Add-missing-flag-for-rfbi-class.patch" - git am "${DIR}/patches/drm/0003-ARM-OMAP3-HWMOD-Add-omap_hwmod_class_sysconfig-for-d.patch" - -#merged v3.4-rc3 -# git am "${DIR}/patches/drm/0001-staging-drm-omap-move-where-DMM-driver-is-registered.patch" -} - -function fixes { - echo "omap cherry pick fixes" - #3/22/2012: replaces: 0001-OMAP-UART-Enable-tx-wakeup-bit-in-wer.patch - git am "${DIR}/patches/omap/0001-OMAP2-UART-Remove-cpu-checks-for-populating-errata-f.patch" - git am "${DIR}/patches/omap/0002-OMAP2-UART-enable-tx-wakeup-bit-for-wer-reg.patch" - git am "${DIR}/patches/omap/0003-OMAP2-UART-replace-omap34xx-omap4xx-cpu-checks-with-.patch" - - #3/27/2012 - git am "${DIR}/patches/omap/0001-mfd-cpu_is_omap3430-wasnt-defined.patch" - -#merged in v3.4-rc5 -# #https://lkml.org/lkml/2012/4/20/554 -# git am "${DIR}/patches/omap/0001-staging-tidspbridge-remove-usage-of-OMAP2_L4_IO_ADDR.patch" + git am "${DIR}/patches/drm/0002-ARM-OMAP2-3-HWMOD-Add-missing-flags-for-dispc-class.patch" + git am "${DIR}/patches/drm/0003-ARM-OMAP2-3-HWMOD-Add-missing-flag-for-rfbi-class.patch" + git am "${DIR}/patches/drm/0004-ARM-OMAP3-HWMOD-Add-omap_hwmod_class_sysconfig-for-d.patch" } distro micrel_zippy2 +sakoman beagle devkit8000 -#touchbook -pandaboard - +panda +omap_fixes omapdrm -fixes echo "patch.sh ran successful" diff --git a/patches/beagle/0001-ARM-OMAP3-USB-Fix-the-EHCI-ULPI-PHY-reset-issue.patch b/patches/beagle/0001-ARM-OMAP3-USB-Fix-the-EHCI-ULPI-PHY-reset-issue.patch deleted file mode 100644 index 62de795064747189b3065761c2423a5ac3527391..0000000000000000000000000000000000000000 --- a/patches/beagle/0001-ARM-OMAP3-USB-Fix-the-EHCI-ULPI-PHY-reset-issue.patch +++ /dev/null @@ -1,184 +0,0 @@ -From 603cbf9204b370df309c45935a4c5f1131ecf9dc Mon Sep 17 00:00:00 2001 -From: Keshava Munegowda <Keshava_mgowda@ti.com> -Date: Fri, 24 Feb 2012 15:36:15 +0530 -Subject: [PATCH] ARM: OMAP3: USB: Fix the EHCI ULPI PHY reset issue - -It is observed that the echi ports of 3430 sdp board -are not working due to the random timing of programming -the associated GPIOs of the ULPI PHYs of the EHCI for reset. -If the PHYs are reset at during usbhs core driver, host ports will -not work because EHCI driver is loaded after the resetting PHYs. -The PHYs should be in reset state while initializing the EHCI -controller. -The code which does the GPIO pins associated with the PHYs -are programmed to reset is moved from the USB host core driver -to EHCI driver. - -Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> -Reviewed-by: Partha Basak <parthab@india.ti.com> ---- - drivers/mfd/omap-usb-host.c | 44 ------------------------------------------ - drivers/usb/host/ehci-omap.c | 39 +++++++++++++++++++++++++++++++++++- - 2 files changed, 37 insertions(+), 46 deletions(-) - -diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c -index 68ac2c5..9927129 100644 ---- a/drivers/mfd/omap-usb-host.c -+++ b/drivers/mfd/omap-usb-host.c -@@ -25,7 +25,6 @@ - #include <linux/clk.h> - #include <linux/dma-mapping.h> - #include <linux/spinlock.h> --#include <linux/gpio.h> - #include <plat/usb.h> - #include <linux/pm_runtime.h> - -@@ -502,19 +501,6 @@ static void omap_usbhs_init(struct device *dev) - pm_runtime_get_sync(dev); - spin_lock_irqsave(&omap->lock, flags); - -- if (pdata->ehci_data->phy_reset) { -- if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0])) -- gpio_request_one(pdata->ehci_data->reset_gpio_port[0], -- GPIOF_OUT_INIT_LOW, "USB1 PHY reset"); -- -- if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) -- gpio_request_one(pdata->ehci_data->reset_gpio_port[1], -- GPIOF_OUT_INIT_LOW, "USB2 PHY reset"); -- -- /* Hold the PHY in RESET for enough time till DIR is high */ -- udelay(10); -- } -- - omap->usbhs_rev = usbhs_read(omap->uhh_base, OMAP_UHH_REVISION); - dev_dbg(dev, "OMAP UHH_REVISION 0x%x\n", omap->usbhs_rev); - -@@ -593,39 +579,10 @@ static void omap_usbhs_init(struct device *dev) - usbhs_omap_tll_init(dev, OMAP_TLL_CHANNEL_COUNT); - } - -- if (pdata->ehci_data->phy_reset) { -- /* Hold the PHY in RESET for enough time till -- * PHY is settled and ready -- */ -- udelay(10); -- -- if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0])) -- gpio_set_value -- (pdata->ehci_data->reset_gpio_port[0], 1); -- -- if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) -- gpio_set_value -- (pdata->ehci_data->reset_gpio_port[1], 1); -- } -- - spin_unlock_irqrestore(&omap->lock, flags); - pm_runtime_put_sync(dev); - } - --static void omap_usbhs_deinit(struct device *dev) --{ -- struct usbhs_hcd_omap *omap = dev_get_drvdata(dev); -- struct usbhs_omap_platform_data *pdata = &omap->platdata; -- -- if (pdata->ehci_data->phy_reset) { -- if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0])) -- gpio_free(pdata->ehci_data->reset_gpio_port[0]); -- -- if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) -- gpio_free(pdata->ehci_data->reset_gpio_port[1]); -- } --} -- - - /** - * usbhs_omap_probe - initialize TI-based HCDs -@@ -861,7 +818,6 @@ static int __devexit usbhs_omap_remove(struct platform_device *pdev) - { - struct usbhs_hcd_omap *omap = platform_get_drvdata(pdev); - -- omap_usbhs_deinit(&pdev->dev); - iounmap(omap->tll_base); - iounmap(omap->uhh_base); - clk_put(omap->init_60m_fclk); -diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c -index bba9850..5c78f9e 100644 ---- a/drivers/usb/host/ehci-omap.c -+++ b/drivers/usb/host/ehci-omap.c -@@ -42,6 +42,7 @@ - #include <plat/usb.h> - #include <linux/regulator/consumer.h> - #include <linux/pm_runtime.h> -+#include <linux/gpio.h> - - /* EHCI Register Set */ - #define EHCI_INSNREG04 (0xA0) -@@ -191,6 +192,19 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) - } - } - -+ if (pdata->phy_reset) { -+ if (gpio_is_valid(pdata->reset_gpio_port[0])) -+ gpio_request_one(pdata->reset_gpio_port[0], -+ GPIOF_OUT_INIT_LOW, "USB1 PHY reset"); -+ -+ if (gpio_is_valid(pdata->reset_gpio_port[1])) -+ gpio_request_one(pdata->reset_gpio_port[1], -+ GPIOF_OUT_INIT_LOW, "USB2 PHY reset"); -+ -+ /* Hold the PHY in RESET for enough time till DIR is high */ -+ udelay(10); -+ } -+ - pm_runtime_enable(dev); - pm_runtime_get_sync(dev); - -@@ -237,6 +251,19 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) - /* root ports should always stay powered */ - ehci_port_power(omap_ehci, 1); - -+ if (pdata->phy_reset) { -+ /* Hold the PHY in RESET for enough time till -+ * PHY is settled and ready -+ */ -+ udelay(10); -+ -+ if (gpio_is_valid(pdata->reset_gpio_port[0])) -+ gpio_set_value(pdata->reset_gpio_port[0], 1); -+ -+ if (gpio_is_valid(pdata->reset_gpio_port[1])) -+ gpio_set_value(pdata->reset_gpio_port[1], 1); -+ } -+ - return 0; - - err_add_hcd: -@@ -259,8 +286,9 @@ err_io: - */ - static int ehci_hcd_omap_remove(struct platform_device *pdev) - { -- struct device *dev = &pdev->dev; -- struct usb_hcd *hcd = dev_get_drvdata(dev); -+ struct device *dev = &pdev->dev; -+ struct usb_hcd *hcd = dev_get_drvdata(dev); -+ struct ehci_hcd_omap_platform_data *pdata = dev->platform_data; - - usb_remove_hcd(hcd); - disable_put_regulator(dev->platform_data); -@@ -269,6 +297,13 @@ static int ehci_hcd_omap_remove(struct platform_device *pdev) - pm_runtime_put_sync(dev); - pm_runtime_disable(dev); - -+ if (pdata->phy_reset) { -+ if (gpio_is_valid(pdata->reset_gpio_port[0])) -+ gpio_free(pdata->reset_gpio_port[0]); -+ -+ if (gpio_is_valid(pdata->reset_gpio_port[1])) -+ gpio_free(pdata->reset_gpio_port[1]); -+ } - return 0; - } - --- -1.7.9 - diff --git a/patches/beagle/0001-ARM-OMAP3-clock-data-fill-in-some-missing-clockdomai.patch b/patches/beagle/0001-ARM-OMAP3-clock-data-fill-in-some-missing-clockdomai.patch deleted file mode 100644 index 96613d69796521abefd7910fbca8d0c6f85f8658..0000000000000000000000000000000000000000 --- a/patches/beagle/0001-ARM-OMAP3-clock-data-fill-in-some-missing-clockdomai.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 2d3f230f8b6d233c425cb501da167fb9f8451f8b Mon Sep 17 00:00:00 2001 -From: Paul Walmsley <paul@pwsan.com> -Date: Thu, 26 Jan 2012 12:19:04 -0700 -Subject: [PATCH] ARM: OMAP3: clock data: fill in some missing clockdomains - -Several clocks are missing clockdomains. This can cause problems with -the hwmod and power management code. Fill these in. - -Signed-off-by: Paul Walmsley <paul@pwsan.com> -Cc: Matt Porter <mporter@ti.com> -Cc: Vaibhav Hiremath <hvaibhav@ti.com> ---- - arch/arm/mach-omap2/clock3xxx_data.c | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c -index d75e5f6..5e167d6 100644 ---- a/arch/arm/mach-omap2/clock3xxx_data.c -+++ b/arch/arm/mach-omap2/clock3xxx_data.c -@@ -1392,6 +1392,7 @@ static struct clk cpefuse_fck = { - .name = "cpefuse_fck", - .ops = &clkops_omap2_dflt, - .parent = &sys_ck, -+ .clkdm_name = "core_l4_clkdm", - .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3), - .enable_bit = OMAP3430ES2_EN_CPEFUSE_SHIFT, - .recalc = &followparent_recalc, -@@ -1401,6 +1402,7 @@ static struct clk ts_fck = { - .name = "ts_fck", - .ops = &clkops_omap2_dflt, - .parent = &omap_32k_fck, -+ .clkdm_name = "core_l4_clkdm", - .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3), - .enable_bit = OMAP3430ES2_EN_TS_SHIFT, - .recalc = &followparent_recalc, -@@ -1410,6 +1412,7 @@ static struct clk usbtll_fck = { - .name = "usbtll_fck", - .ops = &clkops_omap2_dflt_wait, - .parent = &dpll5_m2_ck, -+ .clkdm_name = "core_l4_clkdm", - .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3), - .enable_bit = OMAP3430ES2_EN_USBTLL_SHIFT, - .recalc = &followparent_recalc, -@@ -1615,6 +1618,7 @@ static struct clk fshostusb_fck = { - .name = "fshostusb_fck", - .ops = &clkops_omap2_dflt_wait, - .parent = &core_48m_fck, -+ .clkdm_name = "core_l4_clkdm", - .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), - .enable_bit = OMAP3430ES1_EN_FSHOSTUSB_SHIFT, - .recalc = &followparent_recalc, -@@ -2041,6 +2045,7 @@ static struct clk omapctrl_ick = { - .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), - .enable_bit = OMAP3430_EN_OMAPCTRL_SHIFT, - .flags = ENABLE_ON_INIT, -+ .clkdm_name = "core_l4_clkdm", - .recalc = &followparent_recalc, - }; - -@@ -2092,6 +2097,7 @@ static struct clk usb_l4_ick = { - .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL), - .clksel_mask = OMAP3430ES1_CLKSEL_FSHOSTUSB_MASK, - .clksel = usb_l4_clksel, -+ .clkdm_name = "core_l4_clkdm", - .recalc = &omap2_clksel_recalc, - }; - --- -1.7.9 - diff --git a/patches/beagle/0001-ASoC-omap-add-MODULE_ALIAS-to-mcbsp-and-pcm-drivers.patch b/patches/beagle/0001-ASoC-omap-add-MODULE_ALIAS-to-mcbsp-and-pcm-drivers.patch deleted file mode 100644 index 7cd0ed3930fca204c520ef42e8fbae6f7669d9ce..0000000000000000000000000000000000000000 --- a/patches/beagle/0001-ASoC-omap-add-MODULE_ALIAS-to-mcbsp-and-pcm-drivers.patch +++ /dev/null @@ -1,37 +0,0 @@ -From a51662d4a678f3ffed52df998d795a9d3b5c36a2 Mon Sep 17 00:00:00 2001 -From: Robert Nelson <robertcnelson@gmail.com> -Date: Tue, 3 Jan 2012 11:06:07 -0600 -Subject: [PATCH] ASoC: omap: add MODULE_ALIAS to mcbsp and pcm drivers - -This adds MODULE_ALIAS directives to the omap-mcbsp-dai and -omap-pcm-audio drivers so they can be auto-loaded when platform -devices are scanned. - -Signed-off-by: Mans Rullgard <mans.rullgard at linaro.org> -Signed-off-by: Robert Nelson <robertcnelson@gmail.com> ---- - sound/soc/omap/omap-mcbsp.c | 1 + - sound/soc/omap/omap-pcm.c | 1 + - 2 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c -index 4314647..a13eb34 100644 ---- a/sound/soc/omap/omap-mcbsp.c -+++ b/sound/soc/omap/omap-mcbsp.c -@@ -800,3 +800,4 @@ module_exit(snd_omap_mcbsp_exit); - MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@bitmer.com>"); - MODULE_DESCRIPTION("OMAP I2S SoC Interface"); - MODULE_LICENSE("GPL"); -+MODULE_ALIAS("platform:omap-mcbsp-dai"); -diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c -index 6ede7dc..d5cffcf 100644 ---- a/sound/soc/omap/omap-pcm.c -+++ b/sound/soc/omap/omap-pcm.c -@@ -448,3 +448,4 @@ module_exit(snd_omap_pcm_exit); - MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@bitmer.com>"); - MODULE_DESCRIPTION("OMAP PCM DMA module"); - MODULE_LICENSE("GPL"); -+MODULE_ALIAS("platform:omap-pcm-audio"); --- -1.7.9.1 - diff --git a/patches/beagle/0001-ASoC-omap-convert-per-board-modules-to-platform-driv.patch b/patches/beagle/0001-ASoC-omap-convert-per-board-modules-to-platform-driv.patch deleted file mode 100644 index 525ba645861e3f80e417a94b61235f9bd0dfea4f..0000000000000000000000000000000000000000 --- a/patches/beagle/0001-ASoC-omap-convert-per-board-modules-to-platform-driv.patch +++ /dev/null @@ -1,1118 +0,0 @@ -From c648d59b6ff9c65fc6f4e25c43fa4214b7860939 Mon Sep 17 00:00:00 2001 -From: Robert Nelson <robertcnelson@gmail.com> -Date: Tue, 3 Jan 2012 11:03:32 -0600 -Subject: [PATCH] ASoC: omap: convert per-board modules to platform drivers - -This converts the per-board modules to platform drivers for a -device created by in main platform setup. These drivers call -snd_soc_register_card() directly instead of going via a "soc-audio" -device and the corresponding driver in soc-core. - -Signed-off-by: Mans Rullgard <mans.rullgard at linaro.org> -Signed-off-by: Robert Nelson <robertcnelson@gmail.com> ---- - arch/arm/mach-omap2/devices.c | 34 ++++++++++++++++++++ - sound/soc/omap/am3517evm.c | 52 ++++++++++++++++++------------ - sound/soc/omap/igep0020.c | 49 ++++++++++++++++++---------- - sound/soc/omap/n810.c | 70 +++++++++++++++++++++++++---------------- - sound/soc/omap/omap3beagle.c | 52 ++++++++++++++++++------------ - sound/soc/omap/omap3evm.c | 53 +++++++++++++++++++------------ - sound/soc/omap/omap3pandora.c | 67 +++++++++++++++++++++++---------------- - sound/soc/omap/overo.c | 53 ++++++++++++++++++------------ - sound/soc/omap/rx51.c | 52 ++++++++++++++++++++---------- - sound/soc/omap/sdp3430.c | 62 +++++++++++++++++++++-------------- - sound/soc/omap/sdp4430.c | 53 +++++++++++++++++++------------ - sound/soc/omap/zoom2.c | 65 ++++++++++++++++++++++++------------- - 12 files changed, 423 insertions(+), 239 deletions(-) - -diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c -index c15cfad..0f0b320 100644 ---- a/arch/arm/mach-omap2/devices.c -+++ b/arch/arm/mach-omap2/devices.c -@@ -285,6 +285,10 @@ static struct platform_device omap_pcm = { - .id = -1, - }; - -+static struct platform_device omap_soc_audio = { -+ .id = -1, -+}; -+ - /* - * OMAP2420 has 2 McBSP ports - * OMAP2430 has 5 McBSP ports -@@ -297,8 +301,30 @@ OMAP_MCBSP_PLATFORM_DEVICE(3); - OMAP_MCBSP_PLATFORM_DEVICE(4); - OMAP_MCBSP_PLATFORM_DEVICE(5); - -+static struct { -+ int machine; -+ const char *name; -+} soc_device_names[] = { -+ { MACH_TYPE_OMAP3517EVM, "am3517evm-soc-audio" }, -+ { MACH_TYPE_IGEP0020, "igep2-soc-audio" }, -+ { MACH_TYPE_NOKIA_N810, "n8x1-soc-audio" }, -+ { MACH_TYPE_NOKIA_N810_WIMAX, "n8x1-soc-audio" }, -+ { MACH_TYPE_OMAP3_BEAGLE, "omap3beagle-soc-audio" }, -+ { MACH_TYPE_DEVKIT8000, "omap3beagle-soc-audio" }, -+ { MACH_TYPE_OMAP3EVM, "omap3evm-soc-audio" }, -+ { MACH_TYPE_OMAP3_PANDORA, "pandora-soc-audio" }, -+ { MACH_TYPE_OVERO, "overo-soc-audio", }, -+ { MACH_TYPE_CM_T35, "overo-soc-audio", }, -+ { MACH_TYPE_NOKIA_RX51, "rx51-soc-audio", }, -+ { MACH_TYPE_OMAP_3430SDP, "sdp3430-soc-audio", }, -+ { MACH_TYPE_OMAP_4430SDP, "sdp4430-soc-audio", }, -+ { MACH_TYPE_OMAP_ZOOM2, "zoom2-soc-audio", }, -+}; -+ - static void omap_init_audio(void) - { -+ int i; -+ - platform_device_register(&omap_mcbsp1); - platform_device_register(&omap_mcbsp2); - if (cpu_is_omap243x() || cpu_is_omap34xx() || cpu_is_omap44xx()) { -@@ -309,6 +335,14 @@ static void omap_init_audio(void) - platform_device_register(&omap_mcbsp5); - - platform_device_register(&omap_pcm); -+ -+ for (i = 0; i < ARRAY_SIZE(soc_device_names); i++) { -+ if (machine_arch_type == soc_device_names[i].machine) { -+ omap_soc_audio.name = soc_device_names[i].name; -+ platform_device_register(&omap_soc_audio); -+ break; -+ } -+ } - } - - #else -diff --git a/sound/soc/omap/am3517evm.c b/sound/soc/omap/am3517evm.c -index c1cd4a0..df8f795 100644 ---- a/sound/soc/omap/am3517evm.c -+++ b/sound/soc/omap/am3517evm.c -@@ -116,45 +116,57 @@ static struct snd_soc_card snd_soc_am3517evm = { - .num_dapm_routes = ARRAY_SIZE(audio_map), - }; - --static struct platform_device *am3517evm_snd_device; -- --static int __init am3517evm_soc_init(void) -+static int __devinit am3517evm_soc_probe(struct platform_device *pdev) - { -+ struct snd_soc_card *card = &snd_soc_am3517evm; - int ret; - -- if (!machine_is_omap3517evm()) -- return -ENODEV; - pr_info("OMAP3517 / AM3517 EVM SoC init\n"); - -- am3517evm_snd_device = platform_device_alloc("soc-audio", -1); -- if (!am3517evm_snd_device) { -- printk(KERN_ERR "Platform device allocation failed\n"); -- return -ENOMEM; -+ card->dev = &pdev->dev; -+ -+ ret = snd_soc_register_card(card); -+ if (ret) { -+ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", -+ ret); -+ return ret; - } - -- platform_set_drvdata(am3517evm_snd_device, &snd_soc_am3517evm); -+ return 0; -+} -+ -+static int __devexit am3517evm_soc_remove(struct platform_device *pdev) -+{ -+ struct snd_soc_card *card = platform_get_drvdata(pdev); - -- ret = platform_device_add(am3517evm_snd_device); -- if (ret) -- goto err1; -+ snd_soc_unregister_card(card); - - return 0; -+} -+ -+static struct platform_driver am3517evm_driver = { -+ .driver = { -+ .name = "am3517evm-soc-audio", -+ .owner = THIS_MODULE, -+ }, - --err1: -- printk(KERN_ERR "Unable to add platform device\n"); -- platform_device_put(am3517evm_snd_device); -+ .probe = am3517evm_soc_probe, -+ .remove = __devexit_p(am3517evm_soc_remove), -+}; - -- return ret; -+static int __init am3517evm_soc_init(void) -+{ -+ return platform_driver_register(&am3517evm_driver); - } -+module_init(am3517evm_soc_init); - - static void __exit am3517evm_soc_exit(void) - { -- platform_device_unregister(am3517evm_snd_device); -+ platform_driver_unregister(&am3517evm_driver); - } -- --module_init(am3517evm_soc_init); - module_exit(am3517evm_soc_exit); - - MODULE_AUTHOR("Anuj Aggarwal <anuj.aggarwal@ti.com>"); - MODULE_DESCRIPTION("ALSA SoC OMAP3517 / AM3517 EVM"); - MODULE_LICENSE("GPL v2"); -+MODULE_ALIAS("platform:am3517evm-soc-audio"); -diff --git a/sound/soc/omap/igep0020.c b/sound/soc/omap/igep0020.c -index 591fbf8..6446532 100644 ---- a/sound/soc/omap/igep0020.c -+++ b/sound/soc/omap/igep0020.c -@@ -76,44 +76,57 @@ static struct snd_soc_card snd_soc_card_igep2 = { - .num_links = 1, - }; - --static struct platform_device *igep2_snd_device; -- --static int __init igep2_soc_init(void) -+static int __devinit igep2_soc_probe(struct platform_device *pdev) - { -+ struct snd_soc_card *card = &snd_soc_card_igep2; - int ret; - -- if (!machine_is_igep0020()) -- return -ENODEV; - printk(KERN_INFO "IGEP v2 SoC init\n"); - -- igep2_snd_device = platform_device_alloc("soc-audio", -1); -- if (!igep2_snd_device) { -- printk(KERN_ERR "Platform device allocation failed\n"); -- return -ENOMEM; -+ card->dev = &pdev->dev; -+ -+ ret = snd_soc_register_card(card); -+ if (ret) { -+ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", -+ ret); -+ return ret; - } - -- platform_set_drvdata(igep2_snd_device, &snd_soc_card_igep2); -+ return 0; -+} - -- ret = platform_device_add(igep2_snd_device); -- if (ret) -- goto err1; -+static int __devexit igep2_soc_remove(struct platform_device *pdev) -+{ -+ struct snd_soc_card *card = platform_get_drvdata(pdev); -+ -+ snd_soc_unregister_card(card); - - return 0; -+} -+ -+static struct platform_driver igep2_driver = { -+ .driver = { -+ .name = "igep2-soc-audio", -+ .owner = THIS_MODULE, -+ }, - --err1: -- printk(KERN_ERR "Unable to add platform device\n"); -- platform_device_put(igep2_snd_device); -+ .probe = igep2_soc_probe, -+ .remove = __devexit_p(igep2_soc_remove), -+}; - -- return ret; -+static int __init igep2_soc_init(void) -+{ -+ return platform_driver_register(&igep2_driver); - } - module_init(igep2_soc_init); - - static void __exit igep2_soc_exit(void) - { -- platform_device_unregister(igep2_snd_device); -+ platform_driver_unregister(&igep2_driver); - } - module_exit(igep2_soc_exit); - - MODULE_AUTHOR("Enric Balletbo i Serra <eballetbo@iseebcn.com>"); - MODULE_DESCRIPTION("ALSA SoC IGEP v2"); - MODULE_LICENSE("GPL"); -+MODULE_ALIAS("platform:igep2-soc-audio"); -diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c -index fc6209b..1db768c 100644 ---- a/sound/soc/omap/n810.c -+++ b/sound/soc/omap/n810.c -@@ -300,38 +300,25 @@ static struct snd_soc_card snd_soc_n810 = { - .num_dapm_routes = ARRAY_SIZE(audio_map), - }; - --static struct platform_device *n810_snd_device; -- --static int __init n810_soc_init(void) -+static int __devinit n810_soc_probe(struct platform_device *pdev) - { -+ struct snd_soc_card *card = &snd_soc_n810; -+ struct device *dev = &pdev->dev; - int err; -- struct device *dev; -- -- if (!(machine_is_nokia_n810() || machine_is_nokia_n810_wimax())) -- return -ENODEV; -- -- n810_snd_device = platform_device_alloc("soc-audio", -1); -- if (!n810_snd_device) -- return -ENOMEM; - -- platform_set_drvdata(n810_snd_device, &snd_soc_n810); -- err = platform_device_add(n810_snd_device); -- if (err) -- goto err1; -- -- dev = &n810_snd_device->dev; -+ card->dev = dev; - - sys_clkout2_src = clk_get(dev, "sys_clkout2_src"); - if (IS_ERR(sys_clkout2_src)) { - dev_err(dev, "Could not get sys_clkout2_src clock\n"); - err = PTR_ERR(sys_clkout2_src); -- goto err2; -+ return err; - } - sys_clkout2 = clk_get(dev, "sys_clkout2"); - if (IS_ERR(sys_clkout2)) { - dev_err(dev, "Could not get sys_clkout2\n"); - err = PTR_ERR(sys_clkout2); -- goto err3; -+ goto err1; - } - /* - * Configure 12 MHz output on SYS_CLKOUT2. Therefore we must use -@@ -341,7 +328,7 @@ static int __init n810_soc_init(void) - if (IS_ERR(func96m_clk)) { - dev_err(dev, "Could not get func 96M clock\n"); - err = PTR_ERR(func96m_clk); -- goto err4; -+ goto err2; - } - clk_set_parent(sys_clkout2_src, func96m_clk); - clk_set_rate(sys_clkout2, 12000000); -@@ -352,33 +339,62 @@ static int __init n810_soc_init(void) - gpio_direction_output(N810_HEADSET_AMP_GPIO, 0); - gpio_direction_output(N810_SPEAKER_AMP_GPIO, 0); - -+ err = snd_soc_register_card(card); -+ if (err) { -+ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", -+ err); -+ goto err3; -+ } -+ - return 0; --err4: -- clk_put(sys_clkout2); - err3: -- clk_put(sys_clkout2_src); -+ clk_put(func96m_clk); - err2: -- platform_device_del(n810_snd_device); -+ clk_put(sys_clkout2); - err1: -- platform_device_put(n810_snd_device); -+ clk_put(sys_clkout2_src); - - return err; - } - --static void __exit n810_soc_exit(void) -+static int __devexit n810_soc_remove(struct platform_device *pdev) - { -+ struct snd_soc_card *card = platform_get_drvdata(pdev); -+ - gpio_free(N810_SPEAKER_AMP_GPIO); - gpio_free(N810_HEADSET_AMP_GPIO); - clk_put(sys_clkout2_src); - clk_put(sys_clkout2); - clk_put(func96m_clk); - -- platform_device_unregister(n810_snd_device); -+ snd_soc_unregister_card(card); -+ -+ return 0; - } - -+static struct platform_driver n810_driver = { -+ .driver = { -+ .name = "n8x0-soc-audio", -+ .owner = THIS_MODULE, -+ }, -+ -+ .probe = n810_soc_probe, -+ .remove = __devexit_p(n810_soc_remove), -+}; -+ -+static int __init n810_soc_init(void) -+{ -+ return platform_driver_register(&n810_driver); -+} - module_init(n810_soc_init); -+ -+static void __exit n810_soc_exit(void) -+{ -+ platform_driver_unregister(&n810_driver); -+} - module_exit(n810_soc_exit); - - MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@bitmer.com>"); - MODULE_DESCRIPTION("ALSA SoC Nokia N810"); - MODULE_LICENSE("GPL"); -+MODULE_ALIAS("platform:n8x0-soc-audio"); -diff --git a/sound/soc/omap/omap3beagle.c b/sound/soc/omap/omap3beagle.c -index 3357dcc..10b51d8 100644 ---- a/sound/soc/omap/omap3beagle.c -+++ b/sound/soc/omap/omap3beagle.c -@@ -106,45 +106,57 @@ static struct snd_soc_card snd_soc_omap3beagle = { - .num_links = 1, - }; - --static struct platform_device *omap3beagle_snd_device; -- --static int __init omap3beagle_soc_init(void) -+static int __devinit omap3beagle_soc_probe(struct platform_device *pdev) - { -+ struct snd_soc_card *card = &snd_soc_omap3beagle; - int ret; - -- if (!(machine_is_omap3_beagle() || machine_is_devkit8000())) -- return -ENODEV; - pr_info("OMAP3 Beagle/Devkit8000 SoC init\n"); - -- omap3beagle_snd_device = platform_device_alloc("soc-audio", -1); -- if (!omap3beagle_snd_device) { -- printk(KERN_ERR "Platform device allocation failed\n"); -- return -ENOMEM; -+ card->dev = &pdev->dev; -+ -+ ret = snd_soc_register_card(card); -+ if (ret) { -+ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", -+ ret); -+ return ret; - } - -- platform_set_drvdata(omap3beagle_snd_device, &snd_soc_omap3beagle); -+ return 0; -+} -+ -+static int __devexit omap3beagle_soc_remove(struct platform_device *pdev) -+{ -+ struct snd_soc_card *card = platform_get_drvdata(pdev); - -- ret = platform_device_add(omap3beagle_snd_device); -- if (ret) -- goto err1; -+ snd_soc_unregister_card(card); - - return 0; -+} -+ -+static struct platform_driver omap3beagle_driver = { -+ .driver = { -+ .name = "omap3beagle-soc-audio", -+ .owner = THIS_MODULE, -+ }, - --err1: -- printk(KERN_ERR "Unable to add platform device\n"); -- platform_device_put(omap3beagle_snd_device); -+ .probe = omap3beagle_soc_probe, -+ .remove = __devexit_p(omap3beagle_soc_remove), -+}; - -- return ret; -+static int __init omap3beagle_soc_init(void) -+{ -+ return platform_driver_register(&omap3beagle_driver); - } -+module_init(omap3beagle_soc_init); - - static void __exit omap3beagle_soc_exit(void) - { -- platform_device_unregister(omap3beagle_snd_device); -+ platform_driver_unregister(&omap3beagle_driver); - } -- --module_init(omap3beagle_soc_init); - module_exit(omap3beagle_soc_exit); - - MODULE_AUTHOR("Steve Sakoman <steve@sakoman.com>"); - MODULE_DESCRIPTION("ALSA SoC OMAP3 Beagle"); - MODULE_LICENSE("GPL"); -+MODULE_ALIAS("platform:omap3beagle-soc-audio"); -diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c -index 6857895..3b95cea 100644 ---- a/sound/soc/omap/omap3evm.c -+++ b/sound/soc/omap/omap3evm.c -@@ -74,44 +74,57 @@ static struct snd_soc_card snd_soc_omap3evm = { - .num_links = 1, - }; - --static struct platform_device *omap3evm_snd_device; -- --static int __init omap3evm_soc_init(void) -+static int __devinit omap3evm_soc_probe(struct platform_device *pdev) - { -+ struct snd_soc_card *card = &snd_soc_omap3evm; - int ret; - -- if (!machine_is_omap3evm()) -- return -ENODEV; - pr_info("OMAP3 EVM SoC init\n"); - -- omap3evm_snd_device = platform_device_alloc("soc-audio", -1); -- if (!omap3evm_snd_device) { -- printk(KERN_ERR "Platform device allocation failed\n"); -- return -ENOMEM; -+ card->dev = &pdev->dev; -+ -+ ret = snd_soc_register_card(card); -+ if (ret) { -+ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", -+ ret); -+ return ret; - } - -- platform_set_drvdata(omap3evm_snd_device, &snd_soc_omap3evm); -- ret = platform_device_add(omap3evm_snd_device); -- if (ret) -- goto err1; -+ return 0; -+} -+ -+static int __devexit omap3evm_soc_remove(struct platform_device *pdev) -+{ -+ struct snd_soc_card *card = platform_get_drvdata(pdev); -+ -+ snd_soc_unregister_card(card); - - return 0; -+} -+ -+static struct platform_driver omap3evm_driver = { -+ .driver = { -+ .name = "omap3evm-soc-audio", -+ .owner = THIS_MODULE, -+ }, - --err1: -- printk(KERN_ERR "Unable to add platform device\n"); -- platform_device_put(omap3evm_snd_device); -+ .probe = omap3evm_soc_probe, -+ .remove = __devexit_p(omap3evm_soc_remove), -+}; - -- return ret; -+static int __init omap3evm_soc_init(void) -+{ -+ return platform_driver_register(&omap3evm_driver); - } -+module_init(omap3evm_soc_init); - - static void __exit omap3evm_soc_exit(void) - { -- platform_device_unregister(omap3evm_snd_device); -+ platform_driver_unregister(&omap3evm_driver); - } -- --module_init(omap3evm_soc_init); - module_exit(omap3evm_soc_exit); - - MODULE_AUTHOR("Anuj Aggarwal <anuj.aggarwal@ti.com>"); - MODULE_DESCRIPTION("ALSA SoC OMAP3 EVM"); - MODULE_LICENSE("GPL v2"); -+MODULE_ALIAS("platform:omap3evm-soc-audio"); -diff --git a/sound/soc/omap/omap3pandora.c b/sound/soc/omap/omap3pandora.c -index 7605c37..fd289a4 100644 ---- a/sound/soc/omap/omap3pandora.c -+++ b/sound/soc/omap/omap3pandora.c -@@ -237,17 +237,15 @@ static struct snd_soc_card snd_soc_card_omap3pandora = { - .num_links = ARRAY_SIZE(omap3pandora_dai), - }; - --static struct platform_device *omap3pandora_snd_device; -- --static int __init omap3pandora_soc_init(void) -+static int __devinit omap3pandora_soc_probe(struct platform_device *pdev) - { -+ struct snd_soc_card *card = &snd_soc_card_omap3pandora; - int ret; - -- if (!machine_is_omap3_pandora()) -- return -ENODEV; -- - pr_info("OMAP3 Pandora SoC init\n"); - -+ card->dev = &pdev->dev; -+ - ret = gpio_request(OMAP3_PANDORA_DAC_POWER_GPIO, "dac_power"); - if (ret) { - pr_err(PREFIX "Failed to get DAC power GPIO\n"); -@@ -272,53 +270,68 @@ static int __init omap3pandora_soc_init(void) - goto fail1; - } - -- omap3pandora_snd_device = platform_device_alloc("soc-audio", -1); -- if (omap3pandora_snd_device == NULL) { -- pr_err(PREFIX "Platform device allocation failed\n"); -- ret = -ENOMEM; -- goto fail1; -- } -- -- platform_set_drvdata(omap3pandora_snd_device, &snd_soc_card_omap3pandora); -- -- ret = platform_device_add(omap3pandora_snd_device); -+ ret = snd_soc_register_card(card); - if (ret) { -- pr_err(PREFIX "Unable to add platform device\n"); -- goto fail2; -+ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", -+ ret); -+ goto fail1; - } - -- omap3pandora_dac_reg = regulator_get(&omap3pandora_snd_device->dev, "vcc"); -+ omap3pandora_dac_reg = regulator_get(card->dev, "vcc"); - if (IS_ERR(omap3pandora_dac_reg)) { - pr_err(PREFIX "Failed to get DAC regulator from %s: %ld\n", -- dev_name(&omap3pandora_snd_device->dev), -+ dev_name(card->dev), - PTR_ERR(omap3pandora_dac_reg)); - ret = PTR_ERR(omap3pandora_dac_reg); -- goto fail3; -+ goto fail2; - } - - return 0; - --fail3: -- platform_device_del(omap3pandora_snd_device); - fail2: -- platform_device_put(omap3pandora_snd_device); -+ snd_soc_unregister_card(card); - fail1: - gpio_free(OMAP3_PANDORA_AMP_POWER_GPIO); - fail0: - gpio_free(OMAP3_PANDORA_DAC_POWER_GPIO); - return ret; - } --module_init(omap3pandora_soc_init); - --static void __exit omap3pandora_soc_exit(void) -+static int __devexit omap3pandora_soc_remove(struct platform_device *pdev) - { -+ struct snd_soc_card *card = platform_get_drvdata(pdev); -+ - regulator_put(omap3pandora_dac_reg); -- platform_device_unregister(omap3pandora_snd_device); -+ snd_soc_unregister_card(card); - gpio_free(OMAP3_PANDORA_AMP_POWER_GPIO); - gpio_free(OMAP3_PANDORA_DAC_POWER_GPIO); -+ -+ return 0; -+} -+ -+static struct platform_driver omap3pandora_driver = { -+ .driver = { -+ .name = "pandora-soc-audio", -+ .owner = THIS_MODULE, -+ }, -+ -+ .probe = omap3pandora_soc_probe, -+ .remove = __devexit_p(omap3pandora_soc_remove), -+}; -+ -+static int __init omap3pandora_soc_init(void) -+{ -+ return platform_driver_register(&omap3pandora_driver); -+} -+module_init(omap3pandora_soc_init); -+ -+static void __exit omap3pandora_soc_exit(void) -+{ -+ platform_driver_unregister(&omap3pandora_driver); - } - module_exit(omap3pandora_soc_exit); - - MODULE_AUTHOR("Grazvydas Ignotas <notasas@gmail.com>"); - MODULE_DESCRIPTION("ALSA SoC OMAP3 Pandora"); - MODULE_LICENSE("GPL"); -+MODULE_ALIAS("platform:pandora-soc-audio"); -diff --git a/sound/soc/omap/overo.c b/sound/soc/omap/overo.c -index c3550ae..fe8fd5e 100644 ---- a/sound/soc/omap/overo.c -+++ b/sound/soc/omap/overo.c -@@ -76,46 +76,57 @@ static struct snd_soc_card snd_soc_card_overo = { - .num_links = 1, - }; - --static struct platform_device *overo_snd_device; -- --static int __init overo_soc_init(void) -+static int __devinit overo_soc_probe(struct platform_device *pdev) - { -+ struct snd_soc_card *card = &snd_soc_card_overo; - int ret; - -- if (!(machine_is_overo() || machine_is_cm_t35())) { -- pr_debug("Incomatible machine!\n"); -- return -ENODEV; -- } -- printk(KERN_INFO "overo SoC init\n"); -+ pr_info("overo SoC init\n"); -+ -+ card->dev = &pdev->dev; - -- overo_snd_device = platform_device_alloc("soc-audio", -1); -- if (!overo_snd_device) { -- printk(KERN_ERR "Platform device allocation failed\n"); -- return -ENOMEM; -+ ret = snd_soc_register_card(card); -+ if (ret) { -+ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", -+ ret); -+ return ret; - } - -- platform_set_drvdata(overo_snd_device, &snd_soc_card_overo); -+ return 0; -+} -+ -+static int __devexit overo_soc_remove(struct platform_device *pdev) -+{ -+ struct snd_soc_card *card = platform_get_drvdata(pdev); - -- ret = platform_device_add(overo_snd_device); -- if (ret) -- goto err1; -+ snd_soc_unregister_card(card); - - return 0; -+} - --err1: -- printk(KERN_ERR "Unable to add platform device\n"); -- platform_device_put(overo_snd_device); -+static struct platform_driver overo_driver = { -+ .driver = { -+ .name = "overo-soc-audio", -+ .owner = THIS_MODULE, -+ }, - -- return ret; -+ .probe = overo_soc_probe, -+ .remove = __devexit_p(overo_soc_remove), -+}; -+ -+static int __init overo_soc_init(void) -+{ -+ return platform_driver_register(&overo_driver); - } - module_init(overo_soc_init); - - static void __exit overo_soc_exit(void) - { -- platform_device_unregister(overo_snd_device); -+ platform_driver_unregister(&overo_driver); - } - module_exit(overo_soc_exit); - - MODULE_AUTHOR("Steve Sakoman <steve@sakoman.com>"); - MODULE_DESCRIPTION("ALSA SoC overo"); - MODULE_LICENSE("GPL"); -+MODULE_ALIAS("platform:overo-soc-audio"); -diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c -index 4cabb74..aca084d 100644 ---- a/sound/soc/omap/rx51.c -+++ b/sound/soc/omap/rx51.c -@@ -391,14 +391,12 @@ static struct snd_soc_card rx51_sound_card = { - .num_configs = ARRAY_SIZE(rx51_codec_conf), - }; - --static struct platform_device *rx51_snd_device; -- --static int __init rx51_soc_init(void) -+static int __devinit rx51_soc_probe(struct platform_device *pdev) - { -+ struct snd_soc_card *card = &rx51_sound_card; - int err; - -- if (!machine_is_nokia_rx51()) -- return -ENODEV; -+ card->dev = &pdev->dev; - - err = gpio_request_one(RX51_TVOUT_SEL_GPIO, - GPIOF_DIR_OUT | GPIOF_INIT_LOW, "tvout_sel"); -@@ -409,21 +407,14 @@ static int __init rx51_soc_init(void) - if (err) - goto err_gpio_eci_sw; - -- rx51_snd_device = platform_device_alloc("soc-audio", -1); -- if (!rx51_snd_device) { -- err = -ENOMEM; -+ err = snd_soc_register_card(card); -+ if (err) { -+ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", -+ err); - goto err1; - } - -- platform_set_drvdata(rx51_snd_device, &rx51_sound_card); -- -- err = platform_device_add(rx51_snd_device); -- if (err) -- goto err2; -- - return 0; --err2: -- platform_device_put(rx51_snd_device); - err1: - gpio_free(RX51_ECI_SW_GPIO); - err_gpio_eci_sw: -@@ -433,19 +424,44 @@ err_gpio_tvout_sel: - return err; - } - --static void __exit rx51_soc_exit(void) -+static int __devexit rx51_soc_remove(struct platform_device *pdev) - { -+ struct snd_soc_card *card = platform_get_drvdata(pdev); -+ - snd_soc_jack_free_gpios(&rx51_av_jack, ARRAY_SIZE(rx51_av_jack_gpios), - rx51_av_jack_gpios); - -- platform_device_unregister(rx51_snd_device); -+ snd_soc_unregister_card(card); -+ - gpio_free(RX51_ECI_SW_GPIO); - gpio_free(RX51_TVOUT_SEL_GPIO); -+ -+ return 0; - } - -+static struct platform_driver rx51_driver = { -+ .driver = { -+ .name = "rx51-soc-audio", -+ .owner = THIS_MODULE, -+ }, -+ -+ .probe = rx51_soc_probe, -+ .remove = __devexit_p(rx51_soc_remove), -+}; -+ -+static int __init rx51_soc_init(void) -+{ -+ return platform_driver_register(&rx51_driver); -+} - module_init(rx51_soc_init); -+ -+static void __exit rx51_soc_exit(void) -+{ -+ platform_driver_unregister(&rx51_driver); -+} - module_exit(rx51_soc_exit); - - MODULE_AUTHOR("Nokia Corporation"); - MODULE_DESCRIPTION("ALSA SoC Nokia RX-51"); - MODULE_LICENSE("GPL"); -+MODULE_ALIAS("platform:rx51-soc-audio"); -diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c -index e8fbf8e..09fd5bd 100644 ---- a/sound/soc/omap/sdp3430.c -+++ b/sound/soc/omap/sdp3430.c -@@ -222,24 +222,15 @@ static struct snd_soc_card snd_soc_sdp3430 = { - .num_dapm_routes = ARRAY_SIZE(audio_map), - }; - --static struct platform_device *sdp3430_snd_device; -- --static int __init sdp3430_soc_init(void) -+static int __devinit sdp3430_soc_probe(struct platform_device *pdev) - { -+ struct snd_soc_card *card = &snd_soc_sdp3430; - int ret; - u8 pin_mux; - -- if (!machine_is_omap_3430sdp()) -- return -ENODEV; -- printk(KERN_INFO "SDP3430 SoC init\n"); -- -- sdp3430_snd_device = platform_device_alloc("soc-audio", -1); -- if (!sdp3430_snd_device) { -- printk(KERN_ERR "Platform device allocation failed\n"); -- return -ENOMEM; -- } -+ pr_info("SDP3430 SoC init\n"); - -- platform_set_drvdata(sdp3430_snd_device, &snd_soc_sdp3430); -+ card->dev = &pdev->dev; - - /* Set TWL4030 GPIO6 as EXTMUTE signal */ - twl_i2c_read_u8(TWL4030_MODULE_INTBR, &pin_mux, -@@ -249,30 +240,51 @@ static int __init sdp3430_soc_init(void) - twl_i2c_write_u8(TWL4030_MODULE_INTBR, pin_mux, - TWL4030_INTBR_PMBR1); - -- ret = platform_device_add(sdp3430_snd_device); -- if (ret) -- goto err1; -+ ret = snd_soc_register_card(card); -+ if (ret) { -+ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", -+ ret); -+ return ret; -+ } - - return 0; -+} - --err1: -- printk(KERN_ERR "Unable to add platform device\n"); -- platform_device_put(sdp3430_snd_device); -+static int __devexit sdp3430_soc_remove(struct platform_device *pdev) -+{ -+ struct snd_soc_card *card = platform_get_drvdata(pdev); - -- return ret; -+ snd_soc_jack_free_gpios(&hs_jack, ARRAY_SIZE(hs_jack_gpios), -+ hs_jack_gpios); -+ -+ snd_soc_unregister_card(card); -+ -+ return 0; -+} -+ -+static struct platform_driver sdp3430_driver = { -+ .driver = { -+ .name = "sdp3430-soc-audio", -+ .owner = THIS_MODULE, -+ }, -+ -+ .probe = sdp3430_soc_probe, -+ .remove = __devexit_p(sdp3430_soc_remove), -+}; -+ -+static int __init sdp3430_soc_init(void) -+{ -+ return platform_driver_register(&sdp3430_driver); - } - module_init(sdp3430_soc_init); - - static void __exit sdp3430_soc_exit(void) - { -- snd_soc_jack_free_gpios(&hs_jack, ARRAY_SIZE(hs_jack_gpios), -- hs_jack_gpios); -- -- platform_device_unregister(sdp3430_snd_device); -+ platform_driver_unregister(&sdp3430_driver); - } - module_exit(sdp3430_soc_exit); - - MODULE_AUTHOR("Misael Lopez Cruz <x0052729@ti.com>"); - MODULE_DESCRIPTION("ALSA SoC SDP3430"); - MODULE_LICENSE("GPL"); -- -+MODULE_ALIAS("platform:sdp3430-soc-audio"); -diff --git a/sound/soc/omap/sdp4430.c b/sound/soc/omap/sdp4430.c -index 03d9fa4..b3a05b1 100644 ---- a/sound/soc/omap/sdp4430.c -+++ b/sound/soc/omap/sdp4430.c -@@ -172,44 +172,57 @@ static struct snd_soc_card snd_soc_sdp4430 = { - .num_dapm_routes = ARRAY_SIZE(audio_map), - }; - --static struct platform_device *sdp4430_snd_device; -- --static int __init sdp4430_soc_init(void) -+static int __devinit sdp4430_soc_probe(struct platform_device *pdev) - { -+ struct snd_soc_card *card = &snd_soc_sdp4430; - int ret; - -- if (!machine_is_omap_4430sdp()) -- return -ENODEV; -- printk(KERN_INFO "SDP4430 SoC init\n"); -+ pr_info("SDP4430 SoC init\n"); -+ -+ card->dev = &pdev->dev; - -- sdp4430_snd_device = platform_device_alloc("soc-audio", -1); -- if (!sdp4430_snd_device) { -- printk(KERN_ERR "Platform device allocation failed\n"); -- return -ENOMEM; -+ ret = snd_soc_register_card(card); -+ if (ret) { -+ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", -+ ret); -+ return ret; - } - -- platform_set_drvdata(sdp4430_snd_device, &snd_soc_sdp4430); -+ return 0; -+} - -- ret = platform_device_add(sdp4430_snd_device); -- if (ret) -- goto err; -+static int __devexit sdp4430_soc_remove(struct platform_device *pdev) -+{ -+ struct snd_soc_card *card = platform_get_drvdata(pdev); -+ -+ snd_soc_unregister_card(card); - - return 0; -+} - --err: -- printk(KERN_ERR "Unable to add platform device\n"); -- platform_device_put(sdp4430_snd_device); -- return ret; -+static struct platform_driver sdp4430_driver = { -+ .driver = { -+ .name = "sdp4430-soc-audio", -+ .owner = THIS_MODULE, -+ }, -+ -+ .probe = sdp4430_soc_probe, -+ .remove = __devexit_p(sdp4430_soc_remove), -+}; -+ -+static int __init sdp4430_soc_init(void) -+{ -+ return platform_driver_register(&sdp4430_driver); - } - module_init(sdp4430_soc_init); - - static void __exit sdp4430_soc_exit(void) - { -- platform_device_unregister(sdp4430_snd_device); -+ platform_driver_unregister(&sdp4430_driver); - } - module_exit(sdp4430_soc_exit); - - MODULE_AUTHOR("Misael Lopez Cruz <x0052729@ti.com>"); - MODULE_DESCRIPTION("ALSA SoC SDP4430"); - MODULE_LICENSE("GPL"); -- -+MODULE_ALIAS("platform:sdp4430-soc-audio"); -diff --git a/sound/soc/omap/zoom2.c b/sound/soc/omap/zoom2.c -index 7641a7f..8db8e10 100644 ---- a/sound/soc/omap/zoom2.c -+++ b/sound/soc/omap/zoom2.c -@@ -166,26 +166,14 @@ static struct snd_soc_card snd_soc_zoom2 = { - .num_dapm_routes = ARRAY_SIZE(audio_map), - }; - --static struct platform_device *zoom2_snd_device; -- --static int __init zoom2_soc_init(void) -+static int __devinit zoom2_soc_probe(struct platform_device *pdev) - { -+ struct snd_soc_card *card = &snd_soc_zoom2; - int ret; - -- if (!machine_is_omap_zoom2()) -- return -ENODEV; -- printk(KERN_INFO "Zoom2 SoC init\n"); -- -- zoom2_snd_device = platform_device_alloc("soc-audio", -1); -- if (!zoom2_snd_device) { -- printk(KERN_ERR "Platform device allocation failed\n"); -- return -ENOMEM; -- } -+ pr_info("Zoom2 SoC init\n"); - -- platform_set_drvdata(zoom2_snd_device, &snd_soc_zoom2); -- ret = platform_device_add(zoom2_snd_device); -- if (ret) -- goto err1; -+ card->dev = &pdev->dev; - - BUG_ON(gpio_request(ZOOM2_HEADSET_MUX_GPIO, "hs_mux") < 0); - gpio_direction_output(ZOOM2_HEADSET_MUX_GPIO, 0); -@@ -193,26 +181,57 @@ static int __init zoom2_soc_init(void) - BUG_ON(gpio_request(ZOOM2_HEADSET_EXTMUTE_GPIO, "ext_mute") < 0); - gpio_direction_output(ZOOM2_HEADSET_EXTMUTE_GPIO, 0); - -+ ret = snd_soc_register_card(card); -+ if (ret) { -+ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", -+ ret); -+ goto err; -+ } -+ - return 0; - --err1: -- printk(KERN_ERR "Unable to add platform device\n"); -- platform_device_put(zoom2_snd_device); -+err: -+ gpio_free(ZOOM2_HEADSET_MUX_GPIO); -+ gpio_free(ZOOM2_HEADSET_EXTMUTE_GPIO); - - return ret; - } --module_init(zoom2_soc_init); - --static void __exit zoom2_soc_exit(void) -+static int __devexit zoom2_soc_remove(struct platform_device *pdev) - { -+ struct snd_soc_card *card = platform_get_drvdata(pdev); -+ -+ snd_soc_unregister_card(card); -+ - gpio_free(ZOOM2_HEADSET_MUX_GPIO); - gpio_free(ZOOM2_HEADSET_EXTMUTE_GPIO); - -- platform_device_unregister(zoom2_snd_device); -+ return 0; -+} -+ -+static struct platform_driver zoom2_driver = { -+ .driver = { -+ .name = "zoom2-soc-audio", -+ .owner = THIS_MODULE, -+ }, -+ -+ .probe = zoom2_soc_probe, -+ .remove = __devexit_p(zoom2_soc_remove), -+}; -+ -+static int __init zoom2_soc_init(void) -+{ -+ return platform_driver_register(&zoom2_driver); -+} -+module_init(zoom2_soc_init); -+ -+static void __exit zoom2_soc_exit(void) -+{ -+ platform_driver_unregister(&zoom2_driver); - } - module_exit(zoom2_soc_exit); - - MODULE_AUTHOR("Misael Lopez Cruz <x0052729@ti.com>"); - MODULE_DESCRIPTION("ALSA SoC Zoom2"); - MODULE_LICENSE("GPL"); -- -+MODULE_ALIAS("platform:zoom2-soc-audio"); --- -1.7.9.1 - diff --git a/patches/beagle/0001-beagle-hack-enable-1Ghz.patch b/patches/beagle/0001-beagle-hack-enable-1Ghz.patch deleted file mode 100644 index 3264301344c958aad063c4760927bcbca2557494..0000000000000000000000000000000000000000 --- a/patches/beagle/0001-beagle-hack-enable-1Ghz.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 7d3cd0dff34b241f7964fb7404f09cf3bdfdc799 Mon Sep 17 00:00:00 2001 -From: Robert Nelson <robertcnelson@gmail.com> -Date: Tue, 11 Oct 2011 10:46:29 -0500 -Subject: [PATCH] beagle: hack enable 1Ghz - -Signed-off-by: Robert Nelson <robertcnelson@gmail.com> ---- - arch/arm/mach-omap2/board-omap3beagle.c | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index ac6c2b8..477b196 100644 ---- a/arch/arm/mach-omap2/board-omap3beagle.c -+++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -618,10 +618,12 @@ static void __init beagle_opp_init(void) - } - /* Enable MPU 1GHz and lower opps */ - r = opp_enable(mpu_dev, 800000000); -+ r |= opp_enable(mpu_dev, 1000000000); - /* TODO: MPU 1GHz needs SR and ABB */ - - /* Enable IVA 800MHz and lower opps */ - r |= opp_enable(iva_dev, 660000000); -+ r |= opp_enable(iva_dev, 800000000); - /* TODO: DSP 800MHz needs SR and ABB */ - if (r) { - pr_err("%s: failed to enable higher opp %d\n", --- -1.7.4.1 - diff --git a/patches/beagle/0001-beagleboard-reinstate-usage-of-hi-speed-PLL-divider.patch b/patches/beagle/0001-beagleboard-reinstate-usage-of-hi-speed-PLL-divider.patch index 8e6dc774e8873306705a2ab68179e7de17eb63ec..65d23b5761a62729ac4c40b36c824ac7e919bb30 100644 --- a/patches/beagle/0001-beagleboard-reinstate-usage-of-hi-speed-PLL-divider.patch +++ b/patches/beagle/0001-beagleboard-reinstate-usage-of-hi-speed-PLL-divider.patch @@ -1,18 +1,18 @@ -From 2ebf7078b6eb78d75cdd453c21f8f295ebab8879 Mon Sep 17 00:00:00 2001 +From dfe5a1a6b148d665967f9d3fba1bc438e9661022 Mon Sep 17 00:00:00 2001 From: Koen Kooi <koen@dominion.thruhere.net> Date: Wed, 25 Jan 2012 15:48:36 +0100 -Subject: [PATCH] beagleboard: reinstate usage of hi-speed PLL divider +Subject: [PATCH 1/5] beagleboard: reinstate usage of hi-speed PLL divider Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> --- arch/arm/mach-omap2/board-omap3beagle.c | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index cf43b53..f715631 100644 +index d4d8d96..f6a5554 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -308,6 +308,11 @@ static struct omap_dss_device beagle_dvi_device = { +@@ -306,6 +306,11 @@ static struct omap_dss_device beagle_dvi_device = { .driver_name = "dvi", .data = &dvi_panel, .phy.dpi.data_lines = 24, @@ -25,5 +25,5 @@ index cf43b53..f715631 100644 }; -- -1.7.4.1 +1.7.10 diff --git a/patches/beagle/0001-Turn-on-the-USB-regulator-on-Beagle-xM-explicitly-wh.patch b/patches/beagle/0002-Turn-on-the-USB-regulator-on-Beagle-xM-explicitly.patch similarity index 81% rename from patches/beagle/0001-Turn-on-the-USB-regulator-on-Beagle-xM-explicitly-wh.patch rename to patches/beagle/0002-Turn-on-the-USB-regulator-on-Beagle-xM-explicitly.patch index b31a3a3e5056b9a804355a638385951a67c061a1..7a45a570d30fac80a6ddb44e3505a6401afccf75 100644 --- a/patches/beagle/0001-Turn-on-the-USB-regulator-on-Beagle-xM-explicitly-wh.patch +++ b/patches/beagle/0002-Turn-on-the-USB-regulator-on-Beagle-xM-explicitly.patch @@ -1,7 +1,7 @@ -From b13070e502e519df29baabf782e816cf5a1f4e85 Mon Sep 17 00:00:00 2001 +From e5b2437974e05e8a5a03dc277b3d45530734df64 Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Thu, 23 Feb 2012 09:23:10 -0600 -Subject: [PATCH] Turn on the USB regulator on Beagle xM explicitly +Subject: [PATCH 2/5] Turn on the USB regulator on Beagle xM explicitly Turn on the USB regulator on Beagle xM explicitly when the USB subsystem asks for it, rather than relying on u-boot to do it. @@ -11,13 +11,13 @@ Subject: [PATCH] Turn on the USB regulator on Beagle xM explicitly Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- arch/arm/mach-omap2/board-omap3beagle.c | 19 +++++++++++++++++++ - 1 files changed, 19 insertions(+), 0 deletions(-) + 1 file changed, 19 insertions(+) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index e28ae72..30cb2f0 100644 +index f6a5554..e3026a6 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -411,6 +411,24 @@ static struct regulator_consumer_supply beagle_vsim_supply[] = { +@@ -417,6 +417,24 @@ static struct regulator_consumer_supply beagle_vsim_supply[] = { REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), }; @@ -42,7 +42,7 @@ index e28ae72..30cb2f0 100644 static struct gpio_led gpio_leds[]; static int beagle_twl_gpio_setup(struct device *dev, -@@ -513,6 +531,7 @@ static struct twl4030_platform_data beagle_twldata = { +@@ -517,6 +535,7 @@ static struct twl4030_platform_data beagle_twldata = { .gpio = &beagle_gpio_data, .vmmc1 = &beagle_vmmc1, .vsim = &beagle_vsim, @@ -51,5 +51,5 @@ index e28ae72..30cb2f0 100644 static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { -- -1.7.9.1 +1.7.10 diff --git a/patches/beagle/0001-meego-modedb-add-Toshiba-LTA070B220F-800x480-support.patch b/patches/beagle/0003-meego-modedb-add-Toshiba-LTA070B220F-800x480-support.patch similarity index 71% rename from patches/beagle/0001-meego-modedb-add-Toshiba-LTA070B220F-800x480-support.patch rename to patches/beagle/0003-meego-modedb-add-Toshiba-LTA070B220F-800x480-support.patch index 30807e7eaf620ddf143bac620cc93af1664bfa9c..69dc276097b12923d0c1723ba57fdf965943b977 100644 --- a/patches/beagle/0001-meego-modedb-add-Toshiba-LTA070B220F-800x480-support.patch +++ b/patches/beagle/0003-meego-modedb-add-Toshiba-LTA070B220F-800x480-support.patch @@ -1,20 +1,20 @@ -From f12a8be5eda93efd131c6accc5a61165b10f5358 Mon Sep 17 00:00:00 2001 +From 267071adbe8e8867b6f33d8c0a318a4bf9989e9d Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Wed, 23 Mar 2011 08:37:54 -0500 -Subject: [PATCH] meego: modedb add Toshiba LTA070B220F 800x480 support +Subject: [PATCH 3/5] meego: modedb add Toshiba LTA070B220F 800x480 support from http://wiki.meego.com/ARM/Meego_on_Beagleboard_from_scratch Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- drivers/video/modedb.c | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c -index a9a907c..bbe75c5 100644 +index 5b686de..69ad1ec 100644 --- a/drivers/video/modedb.c +++ b/drivers/video/modedb.c -@@ -289,6 +289,10 @@ static const struct fb_videomode modedb[] = { +@@ -293,6 +293,10 @@ static const struct fb_videomode modedb[] = { /* 864x480 @ 60 Hz, 35.15 kHz hsync */ { NULL, 60, 864, 480, 27777, 1, 1, 1, 1, 0, 0, 0, FB_VMODE_NONINTERLACED }, @@ -26,5 +26,5 @@ index a9a907c..bbe75c5 100644 #ifdef CONFIG_FB_MODE_HELPERS -- -1.7.9.1 +1.7.10 diff --git a/patches/beagle/0001-default-to-fifo-mode-5-for-old-musb-beagles.patch b/patches/beagle/0004-default-to-fifo-mode-5-for-old-musb-beagles.patch similarity index 73% rename from patches/beagle/0001-default-to-fifo-mode-5-for-old-musb-beagles.patch rename to patches/beagle/0004-default-to-fifo-mode-5-for-old-musb-beagles.patch index 8881e4c438ad9a55cfff327602cb9113eee779f0..4911b5179d8e957bf52c458602eb09a83179c4f2 100644 --- a/patches/beagle/0001-default-to-fifo-mode-5-for-old-musb-beagles.patch +++ b/patches/beagle/0004-default-to-fifo-mode-5-for-old-musb-beagles.patch @@ -1,7 +1,7 @@ -From bd9072aad16a43ccaacaaa869412b0467184f61c Mon Sep 17 00:00:00 2001 +From 3d409034188be53c20990c9c04d59f9c098a7f5d Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Sat, 8 Jan 2011 14:31:37 -0600 -Subject: [PATCH] default to fifo mode 5, for old musb beagles +Subject: [PATCH 4/5] default to fifo mode 5, for old musb beagles The fifo mode 4, 16kb can cause corruption on musb/omap35xx, use mode 5, 8kb... @@ -9,13 +9,13 @@ use mode 5, 8kb... Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- drivers/usb/musb/musb_core.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c -index 0f8b829..8260bcb 100644 +index 66aaccf..d4bd034 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c -@@ -1017,7 +1017,7 @@ static void musb_shutdown(struct platform_device *pdev) +@@ -1035,7 +1035,7 @@ static void musb_shutdown(struct platform_device *pdev) || defined(CONFIG_USB_MUSB_OMAP2PLUS_MODULE) \ || defined(CONFIG_USB_MUSB_AM35X) \ || defined(CONFIG_USB_MUSB_AM35X_MODULE) @@ -25,5 +25,5 @@ index 0f8b829..8260bcb 100644 || defined(CONFIG_USB_MUSB_UX500_MODULE) static ushort __devinitdata fifo_mode = 5; -- -1.7.9.1 +1.7.10 diff --git a/patches/beagle/0001-omap3_beagle-init-uart2-for-beagle-rev-AX-BX-only.patch b/patches/beagle/0005-omap3_beagle-init-uart2-for-beagle-rev-AX-BX-only.patch similarity index 89% rename from patches/beagle/0001-omap3_beagle-init-uart2-for-beagle-rev-AX-BX-only.patch rename to patches/beagle/0005-omap3_beagle-init-uart2-for-beagle-rev-AX-BX-only.patch index d8b16fc1275d58f611153184cb3979c1172b8fff..0c8fa0a1101c263d2cc876ceb9041b3dfc0eb5d1 100644 --- a/patches/beagle/0001-omap3_beagle-init-uart2-for-beagle-rev-AX-BX-only.patch +++ b/patches/beagle/0005-omap3_beagle-init-uart2-for-beagle-rev-AX-BX-only.patch @@ -1,7 +1,7 @@ -From d51f48dcce68dd520ecade6e10491e2ecaebfdaf Mon Sep 17 00:00:00 2001 +From 38862a334e15ef6a747e6bd4dfc1fc9aa5a884e5 Mon Sep 17 00:00:00 2001 From: "Govindraj.R" <govindraj.raja@ti.com> Date: Tue, 6 Mar 2012 14:35:11 +0530 -Subject: [PATCH] omap3_beagle: init uart2 for beagle rev AX/BX only +Subject: [PATCH 5/5] omap3_beagle: init uart2 for beagle rev AX/BX only All beagle boards rev > AX/BX have external usb hubs connected to ehci interface, external hub/peripheral uses a nreset sequence for which @@ -24,13 +24,13 @@ Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Robert Nelson <robertcnelson@gmail.com> Signed-off-by: Govindraj.R <govindraj.raja@ti.com> --- - arch/arm/mach-omap2/board-omap3beagle.c | 6 +++- - arch/arm/mach-omap2/serial.c | 41 ++++++++++++++++------------- - arch/arm/plat-omap/include/plat/serial.h | 3 +- + arch/arm/mach-omap2/board-omap3beagle.c | 6 ++++- + arch/arm/mach-omap2/serial.c | 41 +++++++++++++++++------------- + arch/arm/plat-omap/include/plat/serial.h | 3 ++- 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index 76c8a59..ff1ecd1 100644 +index e3026a6..059a308 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -132,6 +132,7 @@ static void __init omap3_beagle_init_rev(void) @@ -41,7 +41,7 @@ index 76c8a59..ff1ecd1 100644 break; case 6: printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n"); -@@ -786,7 +787,10 @@ static void __init omap3_beagle_init(void) +@@ -797,7 +798,10 @@ static void __init omap3_beagle_init(void) platform_add_devices(omap3_beagle_devices, ARRAY_SIZE(omap3_beagle_devices)); omap_display_init(&beagle_dss_data); @@ -54,10 +54,10 @@ index 76c8a59..ff1ecd1 100644 mt46h32m32lf6_sdrc_params); diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c -index 0cdd359..35a8c8c 100644 +index 9fc2f44..619f864 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c -@@ -389,30 +389,32 @@ void __init omap_serial_init_port(struct omap_board_data *bdata, +@@ -279,30 +279,32 @@ void __init omap_serial_init_port(struct omap_board_data *bdata, /** * omap_serial_board_init() - initialize all supported serial ports * @info: platform specific data pointer @@ -107,7 +107,7 @@ index 0cdd359..35a8c8c 100644 } /** -@@ -424,5 +426,8 @@ void __init omap_serial_board_init(struct omap_uart_port_info *info) +@@ -314,5 +316,8 @@ void __init omap_serial_board_init(struct omap_uart_port_info *info) */ void __init omap_serial_init(void) { @@ -132,5 +132,5 @@ index b073e5f..fd14d28 100644 struct omap_uart_port_info *platform_data); #endif -- -1.7.9.1 +1.7.10 diff --git a/patches/beagle/expansion/0001-expansion-add-buddy-param-for-expansionboard-names.patch b/patches/beagle/expansion/0001-expansion-add-buddy-param-for-expansionboard-names.patch index cac85653b9de22dccdb84efaf6f072dc8ff41597..50e521ab5b1737cdb218e5aa77a8faf4cdc25cef 100644 --- a/patches/beagle/expansion/0001-expansion-add-buddy-param-for-expansionboard-names.patch +++ b/patches/beagle/expansion/0001-expansion-add-buddy-param-for-expansionboard-names.patch @@ -1,4 +1,4 @@ -From 0861ec3c403faf3bea51b2076232853260d41f70 Mon Sep 17 00:00:00 2001 +From af2b4d09a670331b02b6d198d4d46a3c6a061f3b Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Mon, 10 Oct 2011 11:12:40 -0500 Subject: [PATCH 1/6] expansion: add buddy param for expansionboard names @@ -6,7 +6,7 @@ Subject: [PATCH 1/6] expansion: add buddy param for expansionboard names Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- arch/arm/mach-omap2/board-omap3beagle.c | 14 ++++++++++++++ - 1 files changed, 14 insertions(+), 0 deletions(-) + 1 file changed, 14 insertions(+) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 7be8d65..ec30ef4 100644 @@ -55,5 +55,5 @@ index 7be8d65..ec30ef4 100644 /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */ .atag_offset = 0x100, -- -1.7.9.1 +1.7.10 diff --git a/patches/beagle/expansion/0002-expansion-add-mmc-regulator-and-ds1307-rtc.patch b/patches/beagle/expansion/0002-expansion-add-mmc-regulator-and-ds1307-rtc.patch index 38b1e48f92ead071fcfc31a4a845c97ebcfa13ee..d7ce38e7bd5ef0cb09e0ff15185914e6e99f062d 100644 --- a/patches/beagle/expansion/0002-expansion-add-mmc-regulator-and-ds1307-rtc.patch +++ b/patches/beagle/expansion/0002-expansion-add-mmc-regulator-and-ds1307-rtc.patch @@ -1,4 +1,4 @@ -From d6fa7ceb8d13bf6c3c268ad2700f8e75fcb0d347 Mon Sep 17 00:00:00 2001 +From bcf3b6e9ed406571aae65a3bae01a1ebdaed9a70 Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Mon, 10 Oct 2011 11:13:49 -0500 Subject: [PATCH 2/6] expansion: add mmc regulator and ds1307 rtc @@ -6,7 +6,7 @@ Subject: [PATCH 2/6] expansion: add mmc regulator and ds1307 rtc Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- arch/arm/mach-omap2/board-omap3beagle.c | 19 +++++++++++++++++++ - 1 files changed, 19 insertions(+), 0 deletions(-) + 1 file changed, 19 insertions(+) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index ec30ef4..153af8f 100644 @@ -53,5 +53,5 @@ index ec30ef4..153af8f 100644 * projector don't work reliably with 400kHz */ omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom)); -- -1.7.9.1 +1.7.10 diff --git a/patches/beagle/expansion/0003-expansion-add-zippy.patch b/patches/beagle/expansion/0003-expansion-add-zippy.patch index ec8e7a5c596baa4309035d5eb631939bfb996eae..a5d2edfd9989df989cdfff49b1363725c18fe3c3 100644 --- a/patches/beagle/expansion/0003-expansion-add-zippy.patch +++ b/patches/beagle/expansion/0003-expansion-add-zippy.patch @@ -1,4 +1,4 @@ -From db78a6b6d3b75805e7afd4c7aec5cc9d1706dbf9 Mon Sep 17 00:00:00 2001 +From a10671ce1e6f14fe32e1c8b8cb2838e715140a3f Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Mon, 10 Oct 2011 11:16:12 -0500 Subject: [PATCH 3/6] expansion: add zippy @@ -6,7 +6,7 @@ Subject: [PATCH 3/6] expansion: add zippy Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- arch/arm/mach-omap2/board-omap3beagle.c | 50 +++++++++++++++++++++++++++++++ - 1 files changed, 50 insertions(+), 0 deletions(-) + 1 file changed, 50 insertions(+) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 153af8f..b7ca056 100644 @@ -77,5 +77,5 @@ index 153af8f..b7ca056 100644 usbhs_init(&usbhs_bdata); omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions, -- -1.7.9.1 +1.7.10 diff --git a/patches/beagle/expansion/0004-expansion-add-zippy2.patch b/patches/beagle/expansion/0004-expansion-add-zippy2.patch index 81a4c4c415640313bd474e59fcc6e07d2089359d..87a0fa8fd50c8b58918a8cb8fe97a0490598bd4e 100644 --- a/patches/beagle/expansion/0004-expansion-add-zippy2.patch +++ b/patches/beagle/expansion/0004-expansion-add-zippy2.patch @@ -1,4 +1,4 @@ -From ade4c54aacb26ef51d59f906d9be7c5e17f80f01 Mon Sep 17 00:00:00 2001 +From 8fb256574ae126fcc9de8b0825fe505a23b56ed6 Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Mon, 10 Oct 2011 11:18:08 -0500 Subject: [PATCH 4/6] expansion: add zippy2 @@ -6,7 +6,7 @@ Subject: [PATCH 4/6] expansion: add zippy2 Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- arch/arm/mach-omap2/board-omap3beagle.c | 50 +++++++++++++++++++++++++++++++ - 1 files changed, 50 insertions(+), 0 deletions(-) + 1 file changed, 50 insertions(+) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index b7ca056..db5e9d5 100644 @@ -77,5 +77,5 @@ index b7ca056..db5e9d5 100644 usbhs_init(&usbhs_bdata); omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions, -- -1.7.9.1 +1.7.10 diff --git a/patches/beagle/expansion/0005-expansion-add-trainer.patch b/patches/beagle/expansion/0005-expansion-add-trainer.patch index b1bd8ef850db518e678b2087e1755fea8751bfe3..8156960b8475c704bce76aeab9722c3b0f9a537b 100644 --- a/patches/beagle/expansion/0005-expansion-add-trainer.patch +++ b/patches/beagle/expansion/0005-expansion-add-trainer.patch @@ -1,4 +1,4 @@ -From 3976a8f48859381cc41e9d63b50e1053d5370427 Mon Sep 17 00:00:00 2001 +From 40360f85433fed8468ea512f0318e8f0238a8723 Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Mon, 10 Oct 2011 11:18:49 -0500 Subject: [PATCH 5/6] expansion: add trainer @@ -6,7 +6,7 @@ Subject: [PATCH 5/6] expansion: add trainer Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- arch/arm/mach-omap2/board-omap3beagle.c | 31 +++++++++++++++++++++++++++++++ - 1 files changed, 31 insertions(+), 0 deletions(-) + 1 file changed, 31 insertions(+) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index db5e9d5..27d3902 100644 @@ -51,5 +51,5 @@ index db5e9d5..27d3902 100644 usbhs_init(&usbhs_bdata); omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions, -- -1.7.9.1 +1.7.10 diff --git a/patches/beagle/expansion/0006-expansion-add-ulcd.patch b/patches/beagle/expansion/0006-expansion-add-CircuitCo-ulcd-Support.patch similarity index 78% rename from patches/beagle/expansion/0006-expansion-add-ulcd.patch rename to patches/beagle/expansion/0006-expansion-add-CircuitCo-ulcd-Support.patch index b4db1cfe8a69d1d9b4b821645ce7ceab0c7abaa3..24593c148bc1d2d6933c52a23a120085fca74bb6 100644 --- a/patches/beagle/expansion/0006-expansion-add-ulcd.patch +++ b/patches/beagle/expansion/0006-expansion-add-CircuitCo-ulcd-Support.patch @@ -1,19 +1,41 @@ -From 826f1ceb1deaed516b22536f499689596beb5a7e Mon Sep 17 00:00:00 2001 +From 0d0c7f78734bec0c9f73d95d80bf65e4f94e4736 Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> -Date: Fri, 16 Mar 2012 09:47:57 -0500 -Subject: [PATCH 6/6] expansion: add ulcd +Date: Wed, 2 May 2012 13:58:58 -0500 +Subject: [PATCH 6/6] expansion: add CircuitCo ulcd Support + +This of a cleanup, squashed both ulcd commits into one: + +====================================================================== + +expansion: add ulcd +Signed-off-by: Robert Nelson <robertcnelson@gmail.com> + +====================================================================== + +beagleboard: fix uLCD7 support +Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> + +====================================================================== Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- - arch/arm/mach-omap2/board-omap3beagle.c | 125 ++++++++++++++++++++++ - drivers/video/omap2/displays/panel-generic-dpi.c | 25 +++++ - 2 files changed, 150 insertions(+), 0 deletions(-) + arch/arm/mach-omap2/board-omap3beagle.c | 135 ++++++++++++++++++++++ + drivers/video/omap2/displays/panel-generic-dpi.c | 25 ++++ + 2 files changed, 160 insertions(+) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index 27d3902..8612647 100644 +index 27d3902..d4d8d96 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -84,11 +84,15 @@ static struct { +@@ -43,6 +43,7 @@ + #include <plat/board.h> + #include "common.h" + #include <video/omapdss.h> ++#include <video/omap-panel-generic-dpi.h> + #include <video/omap-panel-dvi.h> + #include <plat/gpmc.h> + #include <plat/nand.h> +@@ -84,11 +85,15 @@ static struct { int usb_pwr_level; int reset_gpio; int usr_button_gpio; @@ -29,7 +51,7 @@ index 27d3902..8612647 100644 }; static struct gpio omap3_beagle_rev_gpios[] __initdata = { -@@ -158,6 +162,7 @@ static void __init omap3_beagle_init_rev(void) +@@ -158,6 +163,7 @@ static void __init omap3_beagle_init_rev(void) } char expansionboard_name[16]; @@ -37,7 +59,7 @@ index 27d3902..8612647 100644 #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) -@@ -310,9 +315,46 @@ static struct omap_dss_device beagle_tv_device = { +@@ -310,9 +316,53 @@ static struct omap_dss_device beagle_tv_device = { .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, }; @@ -67,14 +89,21 @@ index 27d3902..8612647 100644 + return; +} + ++static struct panel_generic_dpi_data lcd_panel = { ++ .name = "tfc_s9700rtwv35tr-01b", ++ .platform_enable = beagle_enable_lcd, ++ .platform_disable = beagle_disable_lcd, ++}; ++ +static struct omap_dss_device beagle_lcd_device = { + .type = OMAP_DISPLAY_TYPE_DPI, + .name = "lcd", -+ .driver_name = "tfc_s9700rtwv35tr-01b", ++ .driver_name = "generic_dpi_panel", + .phy.dpi.data_lines = 24, + .platform_enable = beagle_enable_lcd, + .platform_disable = beagle_disable_lcd, + .reset_gpio = -EINVAL, ++ .data = &lcd_panel, +}; + static struct omap_dss_device *beagle_dss_devices[] = { @@ -84,7 +113,7 @@ index 27d3902..8612647 100644 }; static struct omap_dss_board_info beagle_dss_data = { -@@ -329,6 +371,11 @@ static void __init beagle_display_init(void) +@@ -329,6 +379,11 @@ static void __init beagle_display_init(void) "DVI reset"); if (r < 0) printk(KERN_ERR "Unable to get DVI reset GPIO\n"); @@ -96,7 +125,7 @@ index 27d3902..8612647 100644 } #include "sdram-micron-mt46h32m32lf-6.h" -@@ -477,6 +524,54 @@ static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = { +@@ -477,6 +532,56 @@ static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = { static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {}; #endif @@ -122,6 +151,8 @@ index 27d3902..8612647 100644 +static struct i2c_board_info __initdata beagle_i2c2_bbtoys_ulcd[] __initdata = { + { + I2C_BOARD_INFO("tlc59108", 0x40), ++ }, ++ { + I2C_BOARD_INFO("tsc2007", 0x48), + .platform_data = &tsc2007_info, + }, @@ -151,7 +182,7 @@ index 27d3902..8612647 100644 static int __init omap3_beagle_i2c_init(void) { omap3_pmic_get_config(&beagle_twldata, -@@ -487,7 +582,17 @@ static int __init omap3_beagle_i2c_init(void) +@@ -487,7 +592,17 @@ static int __init omap3_beagle_i2c_init(void) beagle_twldata.vpll2->constraints.name = "VDVI"; omap3_pmic_init("twl4030", &beagle_twldata); @@ -169,7 +200,7 @@ index 27d3902..8612647 100644 /* Bus 3 is attached to the DVI port where devices like the pico DLP * projector don't work reliably with 400kHz */ omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom)); -@@ -586,6 +691,15 @@ static int __init expansionboard_setup(char *str) +@@ -586,6 +701,15 @@ static int __init expansionboard_setup(char *str) return 0; } @@ -185,18 +216,18 @@ index 27d3902..8612647 100644 static void __init beagle_opp_init(void) { int r = 0; -@@ -642,6 +756,10 @@ static void __init omap3_beagle_init(void) +@@ -642,6 +766,10 @@ static void __init omap3_beagle_init(void) gpio_buttons[0].gpio = beagle_config.usr_button_gpio; + /* TODO: set lcd_driver_name by command line or device tree */ + beagle_config.lcd_driver_name = "tfc_s9700rtwv35tr-01b", -+ //lcd_panel.name = beagle_config.lcd_driver_name; ++ lcd_panel.name = beagle_config.lcd_driver_name; + platform_add_devices(omap3_beagle_devices, ARRAY_SIZE(omap3_beagle_devices)); omap_display_init(&beagle_dss_data); -@@ -702,6 +820,12 @@ static void __init omap3_beagle_init(void) +@@ -702,6 +830,12 @@ static void __init omap3_beagle_init(void) gpio_export(162, 1); } @@ -209,7 +240,7 @@ index 27d3902..8612647 100644 usb_musb_init(NULL); usbhs_init(&usbhs_bdata); omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions, -@@ -719,6 +843,7 @@ static void __init omap3_beagle_init(void) +@@ -719,6 +853,7 @@ static void __init omap3_beagle_init(void) } early_param("buddy", expansionboard_setup); @@ -254,5 +285,5 @@ index 30fe4df..648a6e5 100644 struct panel_drv_data { -- -1.7.9.1 +1.7.10 diff --git a/patches/beagle/expansion/0007-expansion-add-wifi.patch b/patches/beagle/expansion/0007-expansion-add-wifi.patch new file mode 100644 index 0000000000000000000000000000000000000000..1c382964bebd7514e4825c6b70f6ae99f8309645 --- /dev/null +++ b/patches/beagle/expansion/0007-expansion-add-wifi.patch @@ -0,0 +1,142 @@ +From 31285130fedbd6e72a72b2f41f1b325c54f84982 Mon Sep 17 00:00:00 2001 +From: Robert Nelson <robertcnelson@gmail.com> +Date: Mon, 16 Apr 2012 10:56:17 -0500 +Subject: [PATCH 07/13] expansion: add wifi + +Signed-off-by: Robert Nelson <robertcnelson@gmail.com> +--- + arch/arm/mach-omap2/board-omap3beagle.c | 103 +++++++++++++++++++++++++++++++ + 1 file changed, 103 insertions(+) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 0299d47..a7d81fc 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -166,6 +166,90 @@ static void __init omap3_beagle_init_rev(void) + char expansionboard_name[16]; + char expansionboard2_name[16]; + ++#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE) ++#include <linux/regulator/fixed.h> ++#include <linux/ti_wilink_st.h> ++#include <linux/wl12xx.h> ++ ++#define OMAP_BEAGLE_WLAN_EN_GPIO (139) ++#define OMAP_BEAGLE_BT_EN_GPIO (138) ++#define OMAP_BEAGLE_WLAN_IRQ_GPIO (137) ++#define OMAP_BEAGLE_FM_EN_BT_WU (136) ++ ++struct wl12xx_platform_data omap_beagle_wlan_data __initdata = { ++ .irq = OMAP_GPIO_IRQ(OMAP_BEAGLE_WLAN_IRQ_GPIO), ++ .board_ref_clock = 2, /* 38.4 MHz */ ++}; ++ ++static struct ti_st_plat_data wilink_platform_data = { ++ .nshutdown_gpio = OMAP_BEAGLE_BT_EN_GPIO, ++ .dev_name = "/dev/ttyO1", ++ .flow_cntrl = 1, ++ .baud_rate = 3000000, ++ .chip_enable = NULL, ++ .suspend = NULL, ++ .resume = NULL, ++}; ++ ++static struct platform_device wl12xx_device = { ++ .name = "kim", ++ .id = -1, ++ .dev.platform_data = &wilink_platform_data, ++}; ++ ++static struct platform_device btwilink_device = { ++ .name = "btwilink", ++ .id = -1, ++}; ++ ++static struct omap2_hsmmc_info mmcbbt[] = { ++ { ++ .mmc = 1, ++ .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, ++ .gpio_wp = -EINVAL, ++ }, ++ { ++ .name = "wl1271", ++ .mmc = 2, ++ .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, ++ .gpio_wp = -EINVAL, ++ .gpio_cd = -EINVAL, ++ .ocr_mask = MMC_VDD_165_195, ++ .nonremovable = true, ++ }, ++ {} /* Terminator */ ++}; ++ ++static struct regulator_consumer_supply beagle_vmmc2_supply = ++ REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); ++ ++static struct regulator_init_data beagle_vmmc2 = { ++ .constraints = { ++ .valid_ops_mask = REGULATOR_CHANGE_STATUS, ++ }, ++ .num_consumer_supplies = 1, ++ .consumer_supplies = &beagle_vmmc2_supply, ++}; ++ ++static struct fixed_voltage_config beagle_vwlan = { ++ .supply_name = "vwl1271", ++ .microvolts = 1800000, /* 1.8V */ ++ .gpio = OMAP_BEAGLE_WLAN_EN_GPIO, ++ .startup_delay = 70000, /* 70ms */ ++ .enable_high = 1, ++ .enabled_at_boot = 0, ++ .init_data = &beagle_vmmc2, ++}; ++ ++static struct platform_device omap_vwlan_device = { ++ .name = "reg-fixed-voltage", ++ .id = 1, ++ .dev = { ++ .platform_data = &beagle_vwlan, ++ }, ++}; ++#endif ++ + #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) + + #include <plat/mcspi.h> +@@ -449,7 +533,15 @@ static int beagle_twl_gpio_setup(struct device *dev, + mmc[0].gpio_wp = beagle_config.mmc1_gpio_wp; + /* gpio + 0 is "mmc0_cd" (input/IRQ) */ + mmc[0].gpio_cd = gpio + 0; ++#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE) ++ if(!strcmp(expansionboard_name, "bbtoys-wifi")) { ++ omap2_hsmmc_init(mmcbbt); ++ } else { ++ omap2_hsmmc_init(mmc); ++ } ++#else + omap2_hsmmc_init(mmc); ++#endif + + /* + * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active +@@ -849,6 +941,17 @@ static void __init omap3_beagle_init(void) + gpio_export(162, 1); + } + ++ if(!strcmp(expansionboard_name, "bbtoys-wifi")) ++ { ++ if (wl12xx_set_platform_data(&omap_beagle_wlan_data)) ++ pr_err("error setting wl12xx data\n"); ++ printk(KERN_INFO "Beagle expansionboard: registering wl12xx bt platform device\n"); ++ platform_device_register(&wl12xx_device); ++ platform_device_register(&btwilink_device); ++ printk(KERN_INFO "Beagle expansionboard: registering wl12xx wifi platform device\n"); ++ platform_device_register(&omap_vwlan_device); ++ } ++ + if(!strcmp(expansionboard2_name, "bbtoys-ulcd")) + { + printk(KERN_INFO "Beagle second expansionboard: initializing touchscreen: tsc2007\n"); +-- +1.7.10 + diff --git a/patches/drm/0001-omap2-add-drm-device.patch b/patches/drm/0001-omap2-add-drm-device.patch index cb7578f15b701149357fe60581853fa62a601073..73984d45833ee408b8badeb5ffe9a92556ba987d 100644 --- a/patches/drm/0001-omap2-add-drm-device.patch +++ b/patches/drm/0001-omap2-add-drm-device.patch @@ -1,7 +1,7 @@ -From 274f7baa8d4d06327e144fc8104aa65dc3b65e3c Mon Sep 17 00:00:00 2001 +From b953d0b39bc1885b4b1477d71698cca03995bba2 Mon Sep 17 00:00:00 2001 From: Andy Gross <andy.gross@ti.com> Date: Tue, 13 Mar 2012 15:34:38 -0500 -Subject: [PATCH] omap2+: add drm device +Subject: [PATCH 1/4] omap2+: add drm device Register OMAP DRM/KMS platform device, and reserve a CMA region for the device to use for buffer allocation. DMM is split into a @@ -14,15 +14,15 @@ Signed-off-by: Rob Clark <rob@ti.com> arch/arm/mach-omap2/drm.c | 83 +++++++++++++++++++++++++++++++++ arch/arm/plat-omap/common.c | 3 +- arch/arm/plat-omap/include/plat/drm.h | 64 +++++++++++++++++++++++++ - 4 files changed, 153 insertions(+), 1 deletions(-) + 4 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 arch/arm/mach-omap2/drm.c create mode 100644 arch/arm/plat-omap/include/plat/drm.h diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile -index 06326a6..14843c8 100644 +index 49f92bc..c301ab7 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile -@@ -191,6 +191,10 @@ ifneq ($(CONFIG_TIDSPBRIDGE),) +@@ -187,6 +187,10 @@ ifneq ($(CONFIG_TIDSPBRIDGE),) obj-y += dsp.o endif @@ -217,5 +217,5 @@ index 0000000..df9bc41 + +#endif /* __PLAT_OMAP_DRM_H__ */ -- -1.7.9.1 +1.7.10 diff --git a/patches/drm/0001-staging-drm-omap-avoid-multiple-planes-having-same-z.patch b/patches/drm/0001-staging-drm-omap-avoid-multiple-planes-having-same-z.patch deleted file mode 100644 index 4d31be1a9776b56b147d34f7f4611319392e2304..0000000000000000000000000000000000000000 --- a/patches/drm/0001-staging-drm-omap-avoid-multiple-planes-having-same-z.patch +++ /dev/null @@ -1,30 +0,0 @@ -From a129938ace6b6063afb6137fae56ab8ea01fdca7 Mon Sep 17 00:00:00 2001 -From: Rob Clark <rob@ti.com> -Date: Sun, 11 Mar 2012 21:11:20 -0500 -Subject: [PATCH 1/3] staging: drm/omap: avoid multiple planes having same - z-order - -Multiple video pipes on same output with same z-order is an undefined -behavior. Set a unique z-order value based on overlay number/id. - -Signed-off-by: Rob Clark <rob@ti.com> ---- - drivers/staging/omapdrm/omap_plane.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/drivers/staging/omapdrm/omap_plane.c b/drivers/staging/omapdrm/omap_plane.c -index 55ddc58..9b3bfa0 100644 ---- a/drivers/staging/omapdrm/omap_plane.c -+++ b/drivers/staging/omapdrm/omap_plane.c -@@ -439,7 +439,7 @@ struct drm_plane *omap_plane_init(struct drm_device *dev, - if (priv) - omap_plane->info.zorder = 0; - else -- omap_plane->info.zorder = 1; -+ omap_plane->info.zorder = ovl->id; - - update_manager(plane); - --- -1.7.9.1 - diff --git a/patches/drm/0001-staging-drm-omap-get-supported-color-formats-from-ov.patch b/patches/drm/0001-staging-drm-omap-get-supported-color-formats-from-ov.patch deleted file mode 100644 index 124c835a85821562009d86cf60105655355171da..0000000000000000000000000000000000000000 --- a/patches/drm/0001-staging-drm-omap-get-supported-color-formats-from-ov.patch +++ /dev/null @@ -1,114 +0,0 @@ -From 7e8db350f30aa0eb84201a5a29f6c7717b39f155 Mon Sep 17 00:00:00 2001 -From: Rob Clark <rob@ti.com> -Date: Mon, 5 Mar 2012 10:48:31 -0600 -Subject: [PATCH 01/10] staging: drm/omap: get supported color formats from - ovl - -Get the supported formats for a plane from ovl's supported_modes -bitmask. - -Signed-off-by: Rob Clark <rob@ti.com> ---- - drivers/staging/omapdrm/omap_drv.h | 2 ++ - drivers/staging/omapdrm/omap_fb.c | 14 ++++++++++++++ - drivers/staging/omapdrm/omap_plane.c | 27 +++++++-------------------- - 3 files changed, 23 insertions(+), 20 deletions(-) - -diff --git a/drivers/staging/omapdrm/omap_drv.h b/drivers/staging/omapdrm/omap_drv.h -index 61fe022..d924c95 100644 ---- a/drivers/staging/omapdrm/omap_drv.h -+++ b/drivers/staging/omapdrm/omap_drv.h -@@ -92,6 +92,8 @@ void omap_connector_mode_set(struct drm_connector *connector, - void omap_connector_flush(struct drm_connector *connector, - int x, int y, int w, int h); - -+uint32_t omap_framebuffer_get_formats(uint32_t *pixel_formats, -+ uint32_t max_formats, enum omap_color_mode supported_modes); - struct drm_framebuffer *omap_framebuffer_create(struct drm_device *dev, - struct drm_file *file, struct drm_mode_fb_cmd2 *mode_cmd); - struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev, -diff --git a/drivers/staging/omapdrm/omap_fb.c b/drivers/staging/omapdrm/omap_fb.c -index d021a7e..116a8ff 100644 ---- a/drivers/staging/omapdrm/omap_fb.c -+++ b/drivers/staging/omapdrm/omap_fb.c -@@ -59,6 +59,20 @@ static const struct format formats[] = { - { OMAP_DSS_COLOR_UYVY, DRM_FORMAT_UYVY, {{2, 1}}, true }, - }; - -+/* convert from overlay's pixel formats bitmask to an array of fourcc's */ -+uint32_t omap_framebuffer_get_formats(uint32_t *pixel_formats, -+ uint32_t max_formats, enum omap_color_mode supported_modes) -+{ -+ uint32_t nformats = 0; -+ int i = 0; -+ -+ for (i = 0; i < ARRAY_SIZE(formats) && nformats < max_formats; i++) -+ if (formats[i].dss_format & supported_modes) -+ pixel_formats[nformats++] = formats[i].pixel_format; -+ -+ return nformats; -+} -+ - /* per-plane info for the fb: */ - struct plane { - struct drm_gem_object *bo; -diff --git a/drivers/staging/omapdrm/omap_plane.c b/drivers/staging/omapdrm/omap_plane.c -index 9790912..c5625e3 100644 ---- a/drivers/staging/omapdrm/omap_plane.c -+++ b/drivers/staging/omapdrm/omap_plane.c -@@ -43,8 +43,10 @@ struct omap_plane { - - /* last fb that we pinned: */ - struct drm_framebuffer *pinned_fb; --}; - -+ uint32_t nformats; -+ uint32_t formats[32]; -+}; - - /* push changes down to dss2 */ - static int commit(struct drm_plane *plane) -@@ -271,24 +273,6 @@ static const struct drm_plane_funcs omap_plane_funcs = { - .destroy = omap_plane_destroy, - }; - --static const uint32_t formats[] = { -- DRM_FORMAT_RGB565, -- DRM_FORMAT_RGBX4444, -- DRM_FORMAT_XRGB4444, -- DRM_FORMAT_RGBA4444, -- DRM_FORMAT_ABGR4444, -- DRM_FORMAT_XRGB1555, -- DRM_FORMAT_ARGB1555, -- DRM_FORMAT_RGB888, -- DRM_FORMAT_RGBX8888, -- DRM_FORMAT_XRGB8888, -- DRM_FORMAT_RGBA8888, -- DRM_FORMAT_ARGB8888, -- DRM_FORMAT_NV12, -- DRM_FORMAT_YUYV, -- DRM_FORMAT_UYVY, --}; -- - /* initialize plane */ - struct drm_plane *omap_plane_init(struct drm_device *dev, - struct omap_overlay *ovl, unsigned int possible_crtcs, -@@ -306,11 +290,14 @@ struct drm_plane *omap_plane_init(struct drm_device *dev, - goto fail; - } - -+ omap_plane->nformats = omap_framebuffer_get_formats( -+ omap_plane->formats, ARRAY_SIZE(omap_plane->formats), -+ ovl->supported_modes); - omap_plane->ovl = ovl; - plane = &omap_plane->base; - - drm_plane_init(dev, plane, possible_crtcs, &omap_plane_funcs, -- formats, ARRAY_SIZE(formats), priv); -+ omap_plane->formats, omap_plane->nformats, priv); - - /* get our starting configuration, set defaults for parameters - * we don't currently use, etc: --- -1.7.9.1 - diff --git a/patches/drm/0001-staging-drm-omap-move-where-DMM-driver-is-registered.patch b/patches/drm/0001-staging-drm-omap-move-where-DMM-driver-is-registered.patch deleted file mode 100644 index 46c0bbb5c08c017c0bb1996853710a7072674ff4..0000000000000000000000000000000000000000 --- a/patches/drm/0001-staging-drm-omap-move-where-DMM-driver-is-registered.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 6604f85254d1cccbe5423f6398f17503c4103f8b Mon Sep 17 00:00:00 2001 -From: Rob Clark <rob@ti.com> -Date: Thu, 5 Apr 2012 10:34:56 -0500 -Subject: [PATCH] staging: drm/omap: move where DMM driver is registered - -Not sure what triggered the change in behavior, but seems to -result in recursively acquiring a mutex and hanging on boot. But -omap_drm_init() seems a much more sane place to register the -driver for the DMM sub-device. ---- - drivers/staging/omapdrm/omap_drv.c | 7 ++++--- - 1 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/drivers/staging/omapdrm/omap_drv.c b/drivers/staging/omapdrm/omap_drv.c -index 3df5b4c..620b8d5 100644 ---- a/drivers/staging/omapdrm/omap_drv.c -+++ b/drivers/staging/omapdrm/omap_drv.c -@@ -803,9 +803,6 @@ static void pdev_shutdown(struct platform_device *device) - static int pdev_probe(struct platform_device *device) - { - DBG("%s", device->name); -- if (platform_driver_register(&omap_dmm_driver)) -- dev_err(&device->dev, "DMM registration failed\n"); -- - return drm_platform_init(&omap_drm_driver, device); - } - -@@ -833,6 +830,10 @@ struct platform_driver pdev = { - static int __init omap_drm_init(void) - { - DBG("init"); -+ if (platform_driver_register(&omap_dmm_driver)) { -+ /* we can continue on without DMM.. so not fatal */ -+ dev_err(NULL, "DMM registration failed\n"); -+ } - return platform_driver_register(&pdev); - } - --- -1.7.9.1 - diff --git a/patches/drm/0001-ARM-OMAP2-3-HWMOD-Add-missing-flags-for-dispc-class.patch b/patches/drm/0002-ARM-OMAP2-3-HWMOD-Add-missing-flags-for-dispc-class.patch similarity index 88% rename from patches/drm/0001-ARM-OMAP2-3-HWMOD-Add-missing-flags-for-dispc-class.patch rename to patches/drm/0002-ARM-OMAP2-3-HWMOD-Add-missing-flags-for-dispc-class.patch index 6ed217266525bfafd0bd33d628c90fa03fd4ead4..3f1f8d1672799b520cfced25a811c80cfd68a56e 100644 --- a/patches/drm/0001-ARM-OMAP2-3-HWMOD-Add-missing-flags-for-dispc-class.patch +++ b/patches/drm/0002-ARM-OMAP2-3-HWMOD-Add-missing-flags-for-dispc-class.patch @@ -1,7 +1,7 @@ -From 3f8b6bb0983cac0a5a5a73917361dc75257fbc9d Mon Sep 17 00:00:00 2001 +From 4ff97fd59f8687952a1c4771a9d754dbedfdb02c Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen <tomi.valkeinen@ti.com> Date: Tue, 24 Jan 2012 12:45:18 +0200 -Subject: [PATCH 1/3] ARM: OMAP2/3: HWMOD: Add missing flags for dispc class +Subject: [PATCH 2/4] ARM: OMAP2/3: HWMOD: Add missing flags for dispc class hwmod class for dispc is missing sysc flags, which this patch adds. @@ -26,10 +26,10 @@ index 2a67297..7d1f71a 100644 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), .sysc_fields = &omap_hwmod_sysc_type1, diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c -index b176d44..76e6498 100644 +index db86ce9..489c374 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c -@@ -1491,7 +1491,8 @@ static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = { +@@ -1502,7 +1502,8 @@ static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = { .syss_offs = 0x0014, .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | @@ -40,5 +40,5 @@ index b176d44..76e6498 100644 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), .sysc_fields = &omap_hwmod_sysc_type1, -- -1.7.4.1 +1.7.10 diff --git a/patches/drm/0002-staging-drm-omap-add-a-workqueue.patch b/patches/drm/0002-staging-drm-omap-add-a-workqueue.patch deleted file mode 100644 index ca5d77463c07480ac9a09b9dc197c192c33ccaa8..0000000000000000000000000000000000000000 --- a/patches/drm/0002-staging-drm-omap-add-a-workqueue.patch +++ /dev/null @@ -1,66 +0,0 @@ -From fe0787cc1f8c361b657c6fd32b2c63fd5cb1965c Mon Sep 17 00:00:00 2001 -From: Rob Clark <rob@ti.com> -Date: Mon, 5 Mar 2012 10:48:32 -0600 -Subject: [PATCH 02/10] staging: drm/omap: add a workqueue - -Add a workqueue for omapdrm driver, which is needed for at least a -couple things currently: (1) moving omap_gem_roll() to a non-atomic -context, (2) synchronizing page flips w/ DSS scanout related irq's -(in particular not unmapping previous buffer until DSS finishes -scanout). - -Signed-off-by: Rob Clark <rob@ti.com> ---- - drivers/staging/omapdrm/omap_drv.c | 8 ++++++++ - drivers/staging/omapdrm/omap_drv.h | 2 ++ - 2 files changed, 10 insertions(+), 0 deletions(-) - -diff --git a/drivers/staging/omapdrm/omap_drv.c b/drivers/staging/omapdrm/omap_drv.c -index 3bbea9a..7417e1f 100644 ---- a/drivers/staging/omapdrm/omap_drv.c -+++ b/drivers/staging/omapdrm/omap_drv.c -@@ -570,6 +570,9 @@ static int dev_load(struct drm_device *dev, unsigned long flags) - - dev->dev_private = priv; - -+ priv->wq = alloc_workqueue("omapdrm", -+ WQ_UNBOUND | WQ_NON_REENTRANT, 1); -+ - omap_gem_init(dev); - - ret = omap_modeset_init(dev); -@@ -598,6 +601,8 @@ static int dev_load(struct drm_device *dev, unsigned long flags) - - static int dev_unload(struct drm_device *dev) - { -+ struct omap_drm_private *priv = dev->dev_private; -+ - DBG("unload: dev=%p", dev); - - drm_vblank_cleanup(dev); -@@ -607,6 +612,9 @@ static int dev_unload(struct drm_device *dev) - omap_modeset_free(dev); - omap_gem_deinit(dev); - -+ flush_workqueue(priv->wq); -+ destroy_workqueue(priv->wq); -+ - kfree(dev->dev_private); - dev->dev_private = NULL; - -diff --git a/drivers/staging/omapdrm/omap_drv.h b/drivers/staging/omapdrm/omap_drv.h -index d924c95..a84547c 100644 ---- a/drivers/staging/omapdrm/omap_drv.h -+++ b/drivers/staging/omapdrm/omap_drv.h -@@ -51,6 +51,8 @@ struct omap_drm_private { - - struct drm_fb_helper *fbdev; - -+ struct workqueue_struct *wq; -+ - bool has_dmm; - }; - --- -1.7.9.1 - diff --git a/patches/drm/0002-staging-drm-omap-send-page-flip-event-after-endwin.patch b/patches/drm/0002-staging-drm-omap-send-page-flip-event-after-endwin.patch deleted file mode 100644 index 0769479f38ccb212d3cbc38d6bf9c9a9d5cc5579..0000000000000000000000000000000000000000 --- a/patches/drm/0002-staging-drm-omap-send-page-flip-event-after-endwin.patch +++ /dev/null @@ -1,192 +0,0 @@ -From b4a223562d3643e0b5c388b0dada20bdae1aaa2a Mon Sep 17 00:00:00 2001 -From: Rob Clark <rob@ti.com> -Date: Sun, 11 Mar 2012 21:11:21 -0500 -Subject: [PATCH 2/3] staging: drm/omap: send page-flip event after endwin - -The endwin irq indicates that DSS has finished scanning out a buffer. -Use this to trigger page-flip event to userspace, so this happens -only *after* the previous buffer is finished. - -Signed-off-by: Rob Clark <rob@ti.com> ---- - drivers/staging/omapdrm/omap_crtc.c | 27 ++++++++++++---- - drivers/staging/omapdrm/omap_drv.h | 2 + - drivers/staging/omapdrm/omap_plane.c | 56 +++++++++++++++++++++++++++------- - 3 files changed, 67 insertions(+), 18 deletions(-) - -diff --git a/drivers/staging/omapdrm/omap_crtc.c b/drivers/staging/omapdrm/omap_crtc.c -index 17ca163..13e3c7f 100644 ---- a/drivers/staging/omapdrm/omap_crtc.c -+++ b/drivers/staging/omapdrm/omap_crtc.c -@@ -118,25 +118,21 @@ static void omap_crtc_load_lut(struct drm_crtc *crtc) - { - } - --static void page_flip_cb(void *arg) -+static void vblank_cb(void *arg) - { -+ static uint32_t sequence = 0; - struct drm_crtc *crtc = arg; - struct drm_device *dev = crtc->dev; - struct omap_crtc *omap_crtc = to_omap_crtc(crtc); - struct drm_pending_vblank_event *event = omap_crtc->event; -- struct drm_framebuffer *old_fb = omap_crtc->old_fb; -- struct timeval now; - unsigned long flags; -+ struct timeval now; - - WARN_ON(!event); - - omap_crtc->event = NULL; -- omap_crtc->old_fb = NULL; -- -- omap_crtc_mode_set_base(crtc, crtc->x, crtc->y, old_fb); - - /* wakeup userspace */ -- /* TODO: this should happen *after* flip in vsync IRQ handler */ - if (event) { - spin_lock_irqsave(&dev->event_lock, flags); - event->event.sequence = drm_vblank_count_and_time( -@@ -150,6 +146,23 @@ static void page_flip_cb(void *arg) - } - } - -+static void page_flip_cb(void *arg) -+{ -+ struct drm_crtc *crtc = arg; -+ struct omap_crtc *omap_crtc = to_omap_crtc(crtc); -+ struct drm_framebuffer *old_fb = omap_crtc->old_fb; -+ -+ omap_crtc->old_fb = NULL; -+ -+ omap_crtc_mode_set_base(crtc, crtc->x, crtc->y, old_fb); -+ -+ /* really we'd like to setup the callback atomically w/ setting the -+ * new scanout buffer to avoid getting stuck waiting an extra vblank -+ * cycle.. for now go for correctness and later figure out speed.. -+ */ -+ omap_plane_on_endwin(omap_crtc->plane, vblank_cb, crtc); -+} -+ - static int omap_crtc_page_flip_locked(struct drm_crtc *crtc, - struct drm_framebuffer *fb, - struct drm_pending_vblank_event *event) -diff --git a/drivers/staging/omapdrm/omap_drv.h b/drivers/staging/omapdrm/omap_drv.h -index 21e48cf..b7e0f07 100644 ---- a/drivers/staging/omapdrm/omap_drv.h -+++ b/drivers/staging/omapdrm/omap_drv.h -@@ -85,6 +85,8 @@ int omap_plane_mode_set(struct drm_plane *plane, - unsigned int crtc_w, unsigned int crtc_h, - uint32_t src_x, uint32_t src_y, - uint32_t src_w, uint32_t src_h); -+void omap_plane_on_endwin(struct drm_plane *plane, -+ void (*fxn)(void *), void *arg); - - struct drm_encoder *omap_encoder_init(struct drm_device *dev, - struct omap_overlay_manager *mgr); -diff --git a/drivers/staging/omapdrm/omap_plane.c b/drivers/staging/omapdrm/omap_plane.c -index 9b3bfa0..7997be7 100644 ---- a/drivers/staging/omapdrm/omap_plane.c -+++ b/drivers/staging/omapdrm/omap_plane.c -@@ -31,6 +31,11 @@ - * plane funcs - */ - -+struct callback { -+ void (*fxn)(void *); -+ void *arg; -+}; -+ - #define to_omap_plane(x) container_of(x, struct omap_plane, base) - - struct omap_plane { -@@ -58,6 +63,9 @@ struct omap_plane { - - /* for deferred unpin when we need to wait for scanout complete irq */ - struct work_struct work; -+ -+ /* callback on next endwin irq */ -+ struct callback endwin; - }; - - /* map from ovl->id to the irq we are interested in for scanout-done */ -@@ -84,6 +92,7 @@ static void unpin_worker(struct work_struct *work) - { - struct omap_plane *omap_plane = - container_of(work, struct omap_plane, work); -+ struct callback endwin; - - mutex_lock(&omap_plane->unpin_mutex); - DBG("unpinning %d of %d", omap_plane->num_unpins, -@@ -96,7 +105,28 @@ static void unpin_worker(struct work_struct *work) - drm_gem_object_unreference_unlocked(bo); - omap_plane->num_unpins--; - } -+ endwin = omap_plane->endwin; -+ omap_plane->endwin.fxn = NULL; - mutex_unlock(&omap_plane->unpin_mutex); -+ -+ if (endwin.fxn) -+ endwin.fxn(endwin.arg); -+} -+ -+static void install_irq(struct drm_plane *plane) -+{ -+ struct omap_plane *omap_plane = to_omap_plane(plane); -+ struct omap_overlay *ovl = omap_plane->ovl; -+ int ret; -+ -+ ret = omap_dispc_register_isr(dispc_isr, plane, id2irq[ovl->id]); -+ -+ /* -+ * omapdss has upper limit on # of registered irq handlers, -+ * which we shouldn't hit.. but if we do the limit should -+ * be raised or bad things happen: -+ */ -+ WARN_ON(ret == -EBUSY); - } - - /* push changes down to dss2 */ -@@ -146,17 +176,8 @@ static int commit(struct drm_plane *plane) - * NOTE: really this should be atomic w/ mgr->apply() but - * omapdss does not expose such an API - */ -- if (omap_plane->num_unpins > 0) { -- ret = omap_dispc_register_isr(dispc_isr, -- plane, id2irq[ovl->id]); -- } -- -- /* -- * omapdss has upper limit on # of registered irq handlers, -- * which we shouldn't hit.. but if we do the limit should -- * be raised or bad things happen: -- */ -- WARN_ON(ret == -EBUSY); -+ if (omap_plane->num_unpins > 0) -+ install_irq(plane); - - } else { - struct omap_drm_private *priv = dev->dev_private; -@@ -375,6 +396,19 @@ int omap_plane_dpms(struct drm_plane *plane, int mode) - return r; - } - -+void omap_plane_on_endwin(struct drm_plane *plane, -+ void (*fxn)(void *), void *arg) -+{ -+ struct omap_plane *omap_plane = to_omap_plane(plane); -+ -+ mutex_lock(&omap_plane->unpin_mutex); -+ omap_plane->endwin.fxn = fxn; -+ omap_plane->endwin.arg = arg; -+ mutex_unlock(&omap_plane->unpin_mutex); -+ -+ install_irq(plane); -+} -+ - static const struct drm_plane_funcs omap_plane_funcs = { - .update_plane = omap_plane_update, - .disable_plane = omap_plane_disable, --- -1.7.9.1 - diff --git a/patches/drm/0002-ARM-OMAP2-3-HWMOD-Add-missing-flag-for-rfbi-class.patch b/patches/drm/0003-ARM-OMAP2-3-HWMOD-Add-missing-flag-for-rfbi-class.patch similarity index 78% rename from patches/drm/0002-ARM-OMAP2-3-HWMOD-Add-missing-flag-for-rfbi-class.patch rename to patches/drm/0003-ARM-OMAP2-3-HWMOD-Add-missing-flag-for-rfbi-class.patch index 5ebde0275a87de2e0715c76a16ea9f37ffde6fc1..29ac4fe0f46f9a88e0a6fa4b23d17cb48a42f911 100644 --- a/patches/drm/0002-ARM-OMAP2-3-HWMOD-Add-missing-flag-for-rfbi-class.patch +++ b/patches/drm/0003-ARM-OMAP2-3-HWMOD-Add-missing-flag-for-rfbi-class.patch @@ -1,15 +1,15 @@ -From 2f2f0bb041148435d7a9b3e8271390040bb4d335 Mon Sep 17 00:00:00 2001 +From 984b9f711643964ad22bc528d04de759f2f5113c Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen <tomi.valkeinen@ti.com> Date: Tue, 24 Jan 2012 12:45:19 +0200 -Subject: [PATCH 2/3] ARM: OMAP2/3: HWMOD: Add missing flag for rfbi class +Subject: [PATCH 3/4] ARM: OMAP2/3: HWMOD: Add missing flag for rfbi class hwmod class for rfbi is missing SYSS_HAS_RESET_STATUS, which this patch adds. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> --- - .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c index f08e442..bae4afd 100644 @@ -25,5 +25,5 @@ index f08e442..bae4afd 100644 .sysc_fields = &omap_hwmod_sysc_type1, }; -- -1.7.4.1 +1.7.10 diff --git a/patches/drm/0003-staging-drm-omap-call-omap_gem_roll-in-non-atomic-ct.patch b/patches/drm/0003-staging-drm-omap-call-omap_gem_roll-in-non-atomic-ct.patch deleted file mode 100644 index 23cfab5f2abd1bc492b72ef82f7f7bff7a0b47fd..0000000000000000000000000000000000000000 --- a/patches/drm/0003-staging-drm-omap-call-omap_gem_roll-in-non-atomic-ct.patch +++ /dev/null @@ -1,114 +0,0 @@ -From d337008b0ddaff9c9d290f0f5887d6ae6f1e9a04 Mon Sep 17 00:00:00 2001 -From: Rob Clark <rob@ti.com> -Date: Mon, 5 Mar 2012 10:48:33 -0600 -Subject: [PATCH 03/10] staging: drm/omap: call omap_gem_roll() in non-atomic - ctx - -If fbcon calls us from atomic context, push the work off to the -workqueue to avoid calling into the gem/dmm code in an atomic -context. - -Signed-off-by: Rob Clark <rob@ti.com> ---- - drivers/staging/omapdrm/omap_fbdev.c | 26 ++++++++++++++++++++++---- - drivers/staging/omapdrm/omap_gem.c | 14 ++------------ - 2 files changed, 24 insertions(+), 16 deletions(-) - -diff --git a/drivers/staging/omapdrm/omap_fbdev.c b/drivers/staging/omapdrm/omap_fbdev.c -index 96940bb..11acd4c 100644 ---- a/drivers/staging/omapdrm/omap_fbdev.c -+++ b/drivers/staging/omapdrm/omap_fbdev.c -@@ -37,6 +37,9 @@ struct omap_fbdev { - struct drm_framebuffer *fb; - struct drm_gem_object *bo; - bool ywrap_enabled; -+ -+ /* for deferred dmm roll when getting called in atomic ctx */ -+ struct work_struct work; - }; - - static void omap_fbdev_flush(struct fb_info *fbi, int x, int y, int w, int h); -@@ -75,12 +78,22 @@ static void omap_fbdev_imageblit(struct fb_info *fbi, - image->width, image->height); - } - -+static void pan_worker(struct work_struct *work) -+{ -+ struct omap_fbdev *fbdev = container_of(work, struct omap_fbdev, work); -+ struct fb_info *fbi = fbdev->base.fbdev; -+ int npages; -+ -+ /* DMM roll shifts in 4K pages: */ -+ npages = fbi->fix.line_length >> PAGE_SHIFT; -+ omap_gem_roll(fbdev->bo, fbi->var.yoffset * npages); -+} -+ - static int omap_fbdev_pan_display(struct fb_var_screeninfo *var, - struct fb_info *fbi) - { - struct drm_fb_helper *helper = get_fb(fbi); - struct omap_fbdev *fbdev = to_omap_fbdev(helper); -- int npages; - - if (!helper) - goto fallback; -@@ -88,9 +101,12 @@ static int omap_fbdev_pan_display(struct fb_var_screeninfo *var, - if (!fbdev->ywrap_enabled) - goto fallback; - -- /* DMM roll shifts in 4K pages: */ -- npages = fbi->fix.line_length >> PAGE_SHIFT; -- omap_gem_roll(fbdev->bo, var->yoffset * npages); -+ if (drm_can_sleep()) { -+ pan_worker(&fbdev->work); -+ } else { -+ struct omap_drm_private *priv = helper->dev->dev_private; -+ queue_work(priv->wq, &fbdev->work); -+ } - - return 0; - -@@ -336,6 +352,8 @@ struct drm_fb_helper *omap_fbdev_init(struct drm_device *dev) - goto fail; - } - -+ INIT_WORK(&fbdev->work, pan_worker); -+ - helper = &fbdev->base; - - helper->funcs = &omap_fb_helper_funcs; -diff --git a/drivers/staging/omapdrm/omap_gem.c b/drivers/staging/omapdrm/omap_gem.c -index b7d6f88..bd35520 100644 ---- a/drivers/staging/omapdrm/omap_gem.c -+++ b/drivers/staging/omapdrm/omap_gem.c -@@ -566,6 +566,8 @@ fail: - - /* Set scrolling position. This allows us to implement fast scrolling - * for console. -+ * -+ * Call only from non-atomic contexts. - */ - int omap_gem_roll(struct drm_gem_object *obj, uint32_t roll) - { -@@ -580,18 +582,6 @@ int omap_gem_roll(struct drm_gem_object *obj, uint32_t roll) - - omap_obj->roll = roll; - -- if (in_atomic() || mutex_is_locked(&obj->dev->struct_mutex)) { -- /* this can get called from fbcon in atomic context.. so -- * just ignore it and wait for next time called from -- * interruptible context to update the PAT.. the result -- * may be that user sees wrap-around instead of scrolling -- * momentarily on the screen. If we wanted to be fancier -- * we could perhaps schedule some workqueue work at this -- * point. -- */ -- return 0; -- } -- - mutex_lock(&obj->dev->struct_mutex); - - /* if we aren't mapped yet, we don't need to do anything */ --- -1.7.9.1 - diff --git a/patches/drm/0003-staging-drm-omap-use-current-time-for-page-flip-even.patch b/patches/drm/0003-staging-drm-omap-use-current-time-for-page-flip-even.patch deleted file mode 100644 index a9872f8ebdb587e3928ba96eb95e6f79ad0c45c2..0000000000000000000000000000000000000000 --- a/patches/drm/0003-staging-drm-omap-use-current-time-for-page-flip-even.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 09526ff5f9ea0d2722dbd9fabc31817a399fd01c Mon Sep 17 00:00:00 2001 -From: Rob Clark <rob@ti.com> -Date: Sun, 11 Mar 2012 21:11:22 -0500 -Subject: [PATCH 3/3] staging: drm/omap: use current time for page-flip event - -Because we don't have vblank hooked up via drm_irq (which is a bit -awkward due to separation between omapdss (which knows the irq #) -and omapdrm, for now use gettimeofday to have a semi-sane timestamp -in the page-flip event. Otherwise apps like weston drm compositor, -which use the timestamp in it's animations, get highly confused. - -Signed-off-by: Rob Clark <rob@ti.com> ---- - drivers/staging/omapdrm/omap_crtc.c | 10 ++++++++++ - 1 files changed, 10 insertions(+), 0 deletions(-) - -diff --git a/drivers/staging/omapdrm/omap_crtc.c b/drivers/staging/omapdrm/omap_crtc.c -index 13e3c7f..490a7f1 100644 ---- a/drivers/staging/omapdrm/omap_crtc.c -+++ b/drivers/staging/omapdrm/omap_crtc.c -@@ -134,9 +134,19 @@ static void vblank_cb(void *arg) - - /* wakeup userspace */ - if (event) { -+ do_gettimeofday(&now); -+ - spin_lock_irqsave(&dev->event_lock, flags); -+ /* TODO: we can't yet use the vblank time accounting, -+ * because omapdss lower layer is the one that knows -+ * the irq # and registers the handler, which more or -+ * less defeats how drm_irq works.. for now just fake -+ * the sequence number and use gettimeofday.. -+ * - event->event.sequence = drm_vblank_count_and_time( - dev, omap_crtc->id, &now); -+ */ -+ event->event.sequence = sequence++; - event->event.tv_sec = now.tv_sec; - event->event.tv_usec = now.tv_usec; - list_add_tail(&event->base.link, --- -1.7.9.1 - diff --git a/patches/drm/0003-ARM-OMAP3-HWMOD-Add-omap_hwmod_class_sysconfig-for-d.patch b/patches/drm/0004-ARM-OMAP3-HWMOD-Add-omap_hwmod_class_sysconfig-for-d.patch similarity index 79% rename from patches/drm/0003-ARM-OMAP3-HWMOD-Add-omap_hwmod_class_sysconfig-for-d.patch rename to patches/drm/0004-ARM-OMAP3-HWMOD-Add-omap_hwmod_class_sysconfig-for-d.patch index 96ac19229f136b5f0ee91cafa12479a840a30791..b9091bd3caeabd6e54fee43eb45999de39cd1322 100644 --- a/patches/drm/0003-ARM-OMAP3-HWMOD-Add-omap_hwmod_class_sysconfig-for-d.patch +++ b/patches/drm/0004-ARM-OMAP3-HWMOD-Add-omap_hwmod_class_sysconfig-for-d.patch @@ -1,7 +1,8 @@ -From 5397f2c790661d70e354d09131b3889852a949ad Mon Sep 17 00:00:00 2001 +From 6719e9f0d0c235cad2d52caac0cf51f7d822cb99 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen <tomi.valkeinen@ti.com> Date: Tue, 24 Jan 2012 12:45:20 +0200 -Subject: [PATCH 3/3] ARM: OMAP3: HWMOD: Add omap_hwmod_class_sysconfig for dsi +Subject: [PATCH 4/4] ARM: OMAP3: HWMOD: Add omap_hwmod_class_sysconfig for + dsi hwmod data for OMAP3 does not define sysconfig for DSI. This patch adds it. @@ -9,13 +10,13 @@ it. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> --- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 12 ++++++++++++ - 1 files changed, 12 insertions(+), 0 deletions(-) + 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c -index 76e6498..c3ab5e4 100644 +index 489c374..1c55295 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c -@@ -1547,8 +1547,20 @@ static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { +@@ -1558,8 +1558,20 @@ static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { * display serial interface controller */ @@ -37,5 +38,5 @@ index 76e6498..c3ab5e4 100644 static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = { -- -1.7.4.1 +1.7.10 diff --git a/patches/drm/0004-staging-drm-omap-some-minor-fb-cleanups.patch b/patches/drm/0004-staging-drm-omap-some-minor-fb-cleanups.patch deleted file mode 100644 index 61cd0757fd2977bdc65df05523c3e6a2090af3cb..0000000000000000000000000000000000000000 --- a/patches/drm/0004-staging-drm-omap-some-minor-fb-cleanups.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 0490d3c520219f8e612ff1cdd28ea57ea5fa6359 Mon Sep 17 00:00:00 2001 -From: Rob Clark <rob@ti.com> -Date: Mon, 5 Mar 2012 10:48:34 -0600 -Subject: [PATCH 04/10] staging: drm/omap: some minor fb cleanups - -Now that 'struct drm_plane' has a pixel_format field, use that. And -fix a minor typo. - -Signed-off-by: Rob Clark <rob@ti.com> ---- - drivers/staging/omapdrm/omap_fb.c | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/drivers/staging/omapdrm/omap_fb.c b/drivers/staging/omapdrm/omap_fb.c -index 116a8ff..08e2e35 100644 ---- a/drivers/staging/omapdrm/omap_fb.c -+++ b/drivers/staging/omapdrm/omap_fb.c -@@ -101,7 +101,7 @@ static int omap_framebuffer_create_handle(struct drm_framebuffer *fb, - static void omap_framebuffer_destroy(struct drm_framebuffer *fb) - { - struct omap_framebuffer *omap_fb = to_omap_framebuffer(fb); -- int i, n = drm_format_num_planes(omap_fb->format->pixel_format); -+ int i, n = drm_format_num_planes(fb->pixel_format); - - DBG("destroy: FB ID: %d (%p)", fb->base.id, fb); - -@@ -204,7 +204,7 @@ void omap_framebuffer_update_scanout(struct drm_framebuffer *fb, int x, int y, - struct drm_gem_object *omap_framebuffer_bo(struct drm_framebuffer *fb, int p) - { - struct omap_framebuffer *omap_fb = to_omap_framebuffer(fb); -- if (p >= drm_format_num_planes(omap_fb->format->pixel_format)) -+ if (p >= drm_format_num_planes(fb->pixel_format)) - return NULL; - return omap_fb->planes[p].bo; - } -@@ -351,8 +351,8 @@ struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev, - - plane->bo = bos[i]; - plane->offset = mode_cmd->offsets[i]; -- plane->pitch = mode_cmd->pitches[i]; -- plane->paddr = pitch; -+ plane->pitch = pitch; -+ plane->paddr = 0; - } - - drm_helper_mode_fill_fb_struct(fb, mode_cmd); --- -1.7.9.1 - diff --git a/patches/drm/0005-staging-drm-omap-defer-unpin-until-scanout-completes.patch b/patches/drm/0005-staging-drm-omap-defer-unpin-until-scanout-completes.patch deleted file mode 100644 index 439225160c40b3d61c658787506fa68fbc7bdb6a..0000000000000000000000000000000000000000 --- a/patches/drm/0005-staging-drm-omap-defer-unpin-until-scanout-completes.patch +++ /dev/null @@ -1,361 +0,0 @@ -From 2ef6a69fcad54e41554a72d266437afe375698a8 Mon Sep 17 00:00:00 2001 -From: Rob Clark <rob@ti.com> -Date: Mon, 5 Mar 2012 10:48:35 -0600 -Subject: [PATCH 05/10] staging: drm/omap: defer unpin until scanout completes - -When flipping, defer unpinning until scanout completes, as indicated -by the appropriate END_WIN irq. - -This also re-organizes things a bit, in replacing omap_fb_{pin,unpin} -with omap_fb_replace(), to make it easier to add support for scanout -synchronized DMM refill mode (flipping by just reprogramming DMM -synchronized with DSS scanout). - -Signed-off-by: Rob Clark <rob@ti.com> ---- - drivers/staging/omapdrm/omap_drv.h | 5 +- - drivers/staging/omapdrm/omap_fb.c | 84 ++++++++++++--------- - drivers/staging/omapdrm/omap_plane.c | 136 ++++++++++++++++++++++++++++++++-- - 3 files changed, 181 insertions(+), 44 deletions(-) - -diff --git a/drivers/staging/omapdrm/omap_drv.h b/drivers/staging/omapdrm/omap_drv.h -index a84547c..fe4766e 100644 ---- a/drivers/staging/omapdrm/omap_drv.h -+++ b/drivers/staging/omapdrm/omap_drv.h -@@ -101,8 +101,9 @@ struct drm_framebuffer *omap_framebuffer_create(struct drm_device *dev, - struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev, - struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos); - struct drm_gem_object *omap_framebuffer_bo(struct drm_framebuffer *fb, int p); --int omap_framebuffer_pin(struct drm_framebuffer *fb); --void omap_framebuffer_unpin(struct drm_framebuffer *fb); -+int omap_framebuffer_replace(struct drm_framebuffer *a, -+ struct drm_framebuffer *b, void *arg, -+ void (*unpin)(void *arg, struct drm_gem_object *bo)); - void omap_framebuffer_update_scanout(struct drm_framebuffer *fb, int x, int y, - struct omap_overlay_info *info); - struct drm_connector *omap_framebuffer_get_next_connector( -diff --git a/drivers/staging/omapdrm/omap_fb.c b/drivers/staging/omapdrm/omap_fb.c -index 08e2e35..fcb248f 100644 ---- a/drivers/staging/omapdrm/omap_fb.c -+++ b/drivers/staging/omapdrm/omap_fb.c -@@ -137,41 +137,6 @@ static const struct drm_framebuffer_funcs omap_framebuffer_funcs = { - .dirty = omap_framebuffer_dirty, - }; - --/* pins buffer in preparation for scanout */ --int omap_framebuffer_pin(struct drm_framebuffer *fb) --{ -- struct omap_framebuffer *omap_fb = to_omap_framebuffer(fb); -- int ret, i, n = drm_format_num_planes(omap_fb->format->pixel_format); -- -- for (i = 0; i < n; i++) { -- struct plane *plane = &omap_fb->planes[i]; -- ret = omap_gem_get_paddr(plane->bo, &plane->paddr, true); -- if (ret) -- goto fail; -- } -- -- return 0; -- --fail: -- while (--i > 0) { -- struct plane *plane = &omap_fb->planes[i]; -- omap_gem_put_paddr(plane->bo); -- } -- return ret; --} -- --/* releases buffer when done with scanout */ --void omap_framebuffer_unpin(struct drm_framebuffer *fb) --{ -- struct omap_framebuffer *omap_fb = to_omap_framebuffer(fb); -- int i, n = drm_format_num_planes(omap_fb->format->pixel_format); -- -- for (i = 0; i < n; i++) { -- struct plane *plane = &omap_fb->planes[i]; -- omap_gem_put_paddr(plane->bo); -- } --} -- - /* update ovl info for scanout, handles cases of multi-planar fb's, etc. - */ - void omap_framebuffer_update_scanout(struct drm_framebuffer *fb, int x, int y, -@@ -201,6 +166,55 @@ void omap_framebuffer_update_scanout(struct drm_framebuffer *fb, int x, int y, - } - } - -+/* Call for unpin 'a' (if not NULL), and pin 'b' (if not NULL). Although -+ * buffers to unpin are just just pushed to the unpin fifo so that the -+ * caller can defer unpin until vblank. -+ * -+ * Note if this fails (ie. something went very wrong!), all buffers are -+ * unpinned, and the caller disables the overlay. We could have tried -+ * to revert back to the previous set of pinned buffers but if things are -+ * hosed there is no guarantee that would succeed. -+ */ -+int omap_framebuffer_replace(struct drm_framebuffer *a, -+ struct drm_framebuffer *b, void *arg, -+ void (*unpin)(void *arg, struct drm_gem_object *bo)) -+{ -+ int ret = 0, i, na, nb; -+ struct omap_framebuffer *ofba = to_omap_framebuffer(a); -+ struct omap_framebuffer *ofbb = to_omap_framebuffer(b); -+ -+ na = a ? drm_format_num_planes(a->pixel_format) : 0; -+ nb = b ? drm_format_num_planes(b->pixel_format) : 0; -+ -+ for (i = 0; i < max(na, nb); i++) { -+ struct plane *pa, *pb; -+ -+ pa = (i < na) ? &ofba->planes[i] : NULL; -+ pb = (i < nb) ? &ofbb->planes[i] : NULL; -+ -+ if (pa) { -+ unpin(arg, pa->bo); -+ pa->paddr = 0; -+ } -+ -+ if (pb && !ret) -+ ret = omap_gem_get_paddr(pb->bo, &pb->paddr, true); -+ } -+ -+ if (ret) { -+ /* something went wrong.. unpin what has been pinned */ -+ for (i = 0; i < nb; i++) { -+ struct plane *pb = &ofba->planes[i]; -+ if (pb->paddr) { -+ unpin(arg, pb->bo); -+ pb->paddr = 0; -+ } -+ } -+ } -+ -+ return ret; -+} -+ - struct drm_gem_object *omap_framebuffer_bo(struct drm_framebuffer *fb, int p) - { - struct omap_framebuffer *omap_fb = to_omap_framebuffer(fb); -diff --git a/drivers/staging/omapdrm/omap_plane.c b/drivers/staging/omapdrm/omap_plane.c -index c5625e3..55ddc58 100644 ---- a/drivers/staging/omapdrm/omap_plane.c -+++ b/drivers/staging/omapdrm/omap_plane.c -@@ -17,6 +17,8 @@ - * this program. If not, see <http://www.gnu.org/licenses/>. - */ - -+#include <linux/kfifo.h> -+ - #include "omap_drv.h" - - /* some hackery because omapdss has an 'enum omap_plane' (which would be -@@ -46,8 +48,57 @@ struct omap_plane { - - uint32_t nformats; - uint32_t formats[32]; -+ -+ /* for synchronizing access to unpins fifo */ -+ struct mutex unpin_mutex; -+ -+ /* set of bo's pending unpin until next END_WIN irq */ -+ DECLARE_KFIFO_PTR(unpin_fifo, struct drm_gem_object *); -+ int num_unpins, pending_num_unpins; -+ -+ /* for deferred unpin when we need to wait for scanout complete irq */ -+ struct work_struct work; -+}; -+ -+/* map from ovl->id to the irq we are interested in for scanout-done */ -+static const uint32_t id2irq[] = { -+ [OMAP_DSS_GFX] = DISPC_IRQ_GFX_END_WIN, -+ [OMAP_DSS_VIDEO1] = DISPC_IRQ_VID1_END_WIN, -+ [OMAP_DSS_VIDEO2] = DISPC_IRQ_VID2_END_WIN, -+ [OMAP_DSS_VIDEO3] = DISPC_IRQ_VID3_END_WIN, - }; - -+static void dispc_isr(void *arg, uint32_t mask) -+{ -+ struct drm_plane *plane = arg; -+ struct omap_plane *omap_plane = to_omap_plane(plane); -+ struct omap_drm_private *priv = plane->dev->dev_private; -+ -+ omap_dispc_unregister_isr(dispc_isr, plane, -+ id2irq[omap_plane->ovl->id]); -+ -+ queue_work(priv->wq, &omap_plane->work); -+} -+ -+static void unpin_worker(struct work_struct *work) -+{ -+ struct omap_plane *omap_plane = -+ container_of(work, struct omap_plane, work); -+ -+ mutex_lock(&omap_plane->unpin_mutex); -+ DBG("unpinning %d of %d", omap_plane->num_unpins, -+ omap_plane->num_unpins + omap_plane->pending_num_unpins); -+ while (omap_plane->num_unpins > 0) { -+ struct drm_gem_object *bo = NULL; -+ int ret = kfifo_get(&omap_plane->unpin_fifo, &bo); -+ WARN_ON(!ret); -+ omap_gem_put_paddr(bo); -+ drm_gem_object_unreference_unlocked(bo); -+ omap_plane->num_unpins--; -+ } -+ mutex_unlock(&omap_plane->unpin_mutex); -+} -+ - /* push changes down to dss2 */ - static int commit(struct drm_plane *plane) - { -@@ -73,6 +124,11 @@ static int commit(struct drm_plane *plane) - return ret; - } - -+ mutex_lock(&omap_plane->unpin_mutex); -+ omap_plane->num_unpins += omap_plane->pending_num_unpins; -+ omap_plane->pending_num_unpins = 0; -+ mutex_unlock(&omap_plane->unpin_mutex); -+ - /* our encoder doesn't necessarily get a commit() after this, in - * particular in the dpms() and mode_set_base() cases, so force the - * manager to update: -@@ -85,8 +141,29 @@ static int commit(struct drm_plane *plane) - dev_err(dev->dev, "could not apply settings\n"); - return ret; - } -+ -+ /* -+ * NOTE: really this should be atomic w/ mgr->apply() but -+ * omapdss does not expose such an API -+ */ -+ if (omap_plane->num_unpins > 0) { -+ ret = omap_dispc_register_isr(dispc_isr, -+ plane, id2irq[ovl->id]); -+ } -+ -+ /* -+ * omapdss has upper limit on # of registered irq handlers, -+ * which we shouldn't hit.. but if we do the limit should -+ * be raised or bad things happen: -+ */ -+ WARN_ON(ret == -EBUSY); -+ -+ } else { -+ struct omap_drm_private *priv = dev->dev_private; -+ queue_work(priv->wq, &omap_plane->work); - } - -+ - if (ovl->is_enabled(ovl)) { - omap_framebuffer_flush(plane->fb, info->pos_x, info->pos_y, - info->out_width, info->out_height); -@@ -139,21 +216,48 @@ static void update_manager(struct drm_plane *plane) - } - } - -+static void unpin(void *arg, struct drm_gem_object *bo) -+{ -+ struct drm_plane *plane = arg; -+ struct omap_plane *omap_plane = to_omap_plane(plane); -+ -+ if (kfifo_put(&omap_plane->unpin_fifo, -+ (const struct drm_gem_object **)&bo)) { -+ omap_plane->pending_num_unpins++; -+ /* also hold a ref so it isn't free'd while pinned */ -+ drm_gem_object_reference(bo); -+ } else { -+ dev_err(plane->dev->dev, "unpin fifo full!\n"); -+ omap_gem_put_paddr(bo); -+ } -+} -+ - /* update which fb (if any) is pinned for scanout */ - static int update_pin(struct drm_plane *plane, struct drm_framebuffer *fb) - { - struct omap_plane *omap_plane = to_omap_plane(plane); -- int ret = 0; -+ struct drm_framebuffer *pinned_fb = omap_plane->pinned_fb; -+ -+ if (pinned_fb != fb) { -+ int ret; -+ -+ DBG("%p -> %p", pinned_fb, fb); -+ -+ mutex_lock(&omap_plane->unpin_mutex); -+ ret = omap_framebuffer_replace(pinned_fb, fb, plane, unpin); -+ mutex_unlock(&omap_plane->unpin_mutex); -+ -+ if (ret) { -+ dev_err(plane->dev->dev, "could not swap %p -> %p\n", -+ omap_plane->pinned_fb, fb); -+ omap_plane->pinned_fb = NULL; -+ return ret; -+ } - -- if (omap_plane->pinned_fb != fb) { -- if (omap_plane->pinned_fb) -- omap_framebuffer_unpin(omap_plane->pinned_fb); - omap_plane->pinned_fb = fb; -- if (fb) -- ret = omap_framebuffer_pin(fb); - } - -- return ret; -+ return 0; - } - - /* update parameters that are dependent on the framebuffer dimensions and -@@ -243,6 +347,8 @@ static void omap_plane_destroy(struct drm_plane *plane) - DBG("%s", omap_plane->ovl->name); - omap_plane_disable(plane); - drm_plane_cleanup(plane); -+ WARN_ON(omap_plane->pending_num_unpins + omap_plane->num_unpins > 0); -+ kfifo_free(&omap_plane->unpin_fifo); - kfree(omap_plane); - } - -@@ -260,8 +366,10 @@ int omap_plane_dpms(struct drm_plane *plane, int mode) - if (!r) - r = ovl->enable(ovl); - } else { -+ struct omap_drm_private *priv = plane->dev->dev_private; - r = ovl->disable(ovl); - update_pin(plane, NULL); -+ queue_work(priv->wq, &omap_plane->work); - } - - return r; -@@ -280,16 +388,30 @@ struct drm_plane *omap_plane_init(struct drm_device *dev, - { - struct drm_plane *plane = NULL; - struct omap_plane *omap_plane; -+ int ret; - - DBG("%s: possible_crtcs=%08x, priv=%d", ovl->name, - possible_crtcs, priv); - -+ /* friendly reminder to update table for future hw: */ -+ WARN_ON(ovl->id >= ARRAY_SIZE(id2irq)); -+ - omap_plane = kzalloc(sizeof(*omap_plane), GFP_KERNEL); - if (!omap_plane) { - dev_err(dev->dev, "could not allocate plane\n"); - goto fail; - } - -+ mutex_init(&omap_plane->unpin_mutex); -+ -+ ret = kfifo_alloc(&omap_plane->unpin_fifo, 16, GFP_KERNEL); -+ if (ret) { -+ dev_err(dev->dev, "could not allocate unpin FIFO\n"); -+ goto fail; -+ } -+ -+ INIT_WORK(&omap_plane->work, unpin_worker); -+ - omap_plane->nformats = omap_framebuffer_get_formats( - omap_plane->formats, ARRAY_SIZE(omap_plane->formats), - ovl->supported_modes); --- -1.7.9.1 - diff --git a/patches/drm/0006-staging-drm-omap-debugfs-for-object-and-fb-tracking.patch b/patches/drm/0006-staging-drm-omap-debugfs-for-object-and-fb-tracking.patch deleted file mode 100644 index 0181541c82398211fa4e15923edffe338c706d65..0000000000000000000000000000000000000000 --- a/patches/drm/0006-staging-drm-omap-debugfs-for-object-and-fb-tracking.patch +++ /dev/null @@ -1,331 +0,0 @@ -From 400976614840ab9b0fc908103d0d22ca71412cea Mon Sep 17 00:00:00 2001 -From: Rob Clark <rob@ti.com> -Date: Mon, 5 Mar 2012 10:48:36 -0600 -Subject: [PATCH 06/10] staging: drm/omap: debugfs for object and fb tracking - -Add some additional debugfs file to aid in tracking buffer usage. - -Signed-off-by: Rob Clark <rob@ti.com> ---- - drivers/staging/omapdrm/omap_debugfs.c | 98 +++++++++++++++++++++++++++++++- - drivers/staging/omapdrm/omap_drv.c | 2 + - drivers/staging/omapdrm/omap_drv.h | 8 +++ - drivers/staging/omapdrm/omap_fb.c | 18 ++++++ - drivers/staging/omapdrm/omap_gem.c | 64 ++++++++++++++++++++- - 5 files changed, 188 insertions(+), 2 deletions(-) - -diff --git a/drivers/staging/omapdrm/omap_debugfs.c b/drivers/staging/omapdrm/omap_debugfs.c -index da920df..e23f907 100644 ---- a/drivers/staging/omapdrm/omap_debugfs.c -+++ b/drivers/staging/omapdrm/omap_debugfs.c -@@ -20,23 +20,119 @@ - #include "omap_drv.h" - #include "omap_dmm_tiler.h" - -+#include "drm_fb_helper.h" -+ -+ - #ifdef CONFIG_DEBUG_FS - -+static int gem_show(struct seq_file *m, void *arg) -+{ -+ struct drm_info_node *node = (struct drm_info_node *) m->private; -+ struct drm_device *dev = node->minor->dev; -+ struct omap_drm_private *priv = dev->dev_private; -+ int ret; -+ -+ ret = mutex_lock_interruptible(&dev->struct_mutex); -+ if (ret) -+ return ret; -+ -+ seq_printf(m, "All Objects:\n"); -+ omap_gem_describe_objects(&priv->obj_list, m); -+ -+ mutex_unlock(&dev->struct_mutex); -+ -+ return 0; -+} -+ -+static int mm_show(struct seq_file *m, void *arg) -+{ -+ struct drm_info_node *node = (struct drm_info_node *) m->private; -+ struct drm_device *dev = node->minor->dev; -+ return drm_mm_dump_table(m, dev->mm_private); -+} -+ -+static int fb_show(struct seq_file *m, void *arg) -+{ -+ struct drm_info_node *node = (struct drm_info_node *) m->private; -+ struct drm_device *dev = node->minor->dev; -+ struct omap_drm_private *priv = dev->dev_private; -+ struct drm_framebuffer *fb; -+ int ret; -+ -+ ret = mutex_lock_interruptible(&dev->mode_config.mutex); -+ if (ret) -+ return ret; -+ -+ ret = mutex_lock_interruptible(&dev->struct_mutex); -+ if (ret) { -+ mutex_unlock(&dev->mode_config.mutex); -+ return ret; -+ } -+ -+ seq_printf(m, "fbcon "); -+ omap_framebuffer_describe(priv->fbdev->fb, m); -+ -+ list_for_each_entry(fb, &dev->mode_config.fb_list, head) { -+ if (fb == priv->fbdev->fb) -+ continue; -+ -+ seq_printf(m, "user "); -+ omap_framebuffer_describe(fb, m); -+ } -+ -+ mutex_unlock(&dev->struct_mutex); -+ mutex_unlock(&dev->mode_config.mutex); -+ -+ return 0; -+} -+ -+/* list of debufs files that are applicable to all devices */ - static struct drm_info_list omap_debugfs_list[] = { -+ {"gem", gem_show, 0}, -+ {"mm", mm_show, 0}, -+ {"fb", fb_show, 0}, -+}; -+ -+/* list of debugfs files that are specific to devices with dmm/tiler */ -+static struct drm_info_list omap_dmm_debugfs_list[] = { - {"tiler_map", tiler_map_show, 0}, - }; - - int omap_debugfs_init(struct drm_minor *minor) - { -- return drm_debugfs_create_files(omap_debugfs_list, -+ struct drm_device *dev = minor->dev; -+ int ret; -+ -+ ret = drm_debugfs_create_files(omap_debugfs_list, - ARRAY_SIZE(omap_debugfs_list), - minor->debugfs_root, minor); -+ -+ if (ret) { -+ dev_err(dev->dev, "could not install omap_debugfs_list\n"); -+ return ret; -+ } -+ -+ /* TODO: only do this if has_dmm.. but this fxn gets called before -+ * dev_load() so we don't know this yet.. -+ */ -+ ret = drm_debugfs_create_files(omap_dmm_debugfs_list, -+ ARRAY_SIZE(omap_dmm_debugfs_list), -+ minor->debugfs_root, minor); -+ -+ if (ret) { -+ dev_err(dev->dev, "could not install omap_dmm_debugfs_list\n"); -+ return ret; -+ } -+ -+ return ret; - } - - void omap_debugfs_cleanup(struct drm_minor *minor) - { - drm_debugfs_remove_files(omap_debugfs_list, - ARRAY_SIZE(omap_debugfs_list), minor); -+ drm_debugfs_remove_files(omap_dmm_debugfs_list, -+ ARRAY_SIZE(omap_dmm_debugfs_list), minor); - } - - #endif -diff --git a/drivers/staging/omapdrm/omap_drv.c b/drivers/staging/omapdrm/omap_drv.c -index 7417e1f..e2100bb 100644 ---- a/drivers/staging/omapdrm/omap_drv.c -+++ b/drivers/staging/omapdrm/omap_drv.c -@@ -573,6 +573,8 @@ static int dev_load(struct drm_device *dev, unsigned long flags) - priv->wq = alloc_workqueue("omapdrm", - WQ_UNBOUND | WQ_NON_REENTRANT, 1); - -+ INIT_LIST_HEAD(&priv->obj_list); -+ - omap_gem_init(dev); - - ret = omap_modeset_init(dev); -diff --git a/drivers/staging/omapdrm/omap_drv.h b/drivers/staging/omapdrm/omap_drv.h -index fe4766e..21e48cf 100644 ---- a/drivers/staging/omapdrm/omap_drv.h -+++ b/drivers/staging/omapdrm/omap_drv.h -@@ -42,10 +42,13 @@ - struct omap_drm_private { - unsigned int num_crtcs; - struct drm_crtc *crtcs[8]; -+ - unsigned int num_planes; - struct drm_plane *planes[8]; -+ - unsigned int num_encoders; - struct drm_encoder *encoders[8]; -+ - unsigned int num_connectors; - struct drm_connector *connectors[8]; - -@@ -53,12 +56,17 @@ struct omap_drm_private { - - struct workqueue_struct *wq; - -+ struct list_head obj_list; -+ - bool has_dmm; - }; - - #ifdef CONFIG_DEBUG_FS - int omap_debugfs_init(struct drm_minor *minor); - void omap_debugfs_cleanup(struct drm_minor *minor); -+void omap_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m); -+void omap_gem_describe(struct drm_gem_object *obj, struct seq_file *m); -+void omap_gem_describe_objects(struct list_head *list, struct seq_file *m); - #endif - - struct drm_fb_helper *omap_fbdev_init(struct drm_device *dev); -diff --git a/drivers/staging/omapdrm/omap_fb.c b/drivers/staging/omapdrm/omap_fb.c -index fcb248f..04b235b 100644 ---- a/drivers/staging/omapdrm/omap_fb.c -+++ b/drivers/staging/omapdrm/omap_fb.c -@@ -277,6 +277,24 @@ void omap_framebuffer_flush(struct drm_framebuffer *fb, - } - } - -+#ifdef CONFIG_DEBUG_FS -+void omap_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m) -+{ -+ struct omap_framebuffer *omap_fb = to_omap_framebuffer(fb); -+ int i, n = drm_format_num_planes(fb->pixel_format); -+ -+ seq_printf(m, "fb: %dx%d@%4.4s\n", fb->width, fb->height, -+ (char *)&fb->pixel_format); -+ -+ for (i = 0; i < n; i++) { -+ struct plane *plane = &omap_fb->planes[i]; -+ seq_printf(m, " %d: offset=%d pitch=%d, obj: ", -+ i, plane->offset, plane->pitch); -+ omap_gem_describe(plane->bo, m); -+ } -+} -+#endif -+ - struct drm_framebuffer *omap_framebuffer_create(struct drm_device *dev, - struct drm_file *file, struct drm_mode_fb_cmd2 *mode_cmd) - { -diff --git a/drivers/staging/omapdrm/omap_gem.c b/drivers/staging/omapdrm/omap_gem.c -index bd35520..1d734bc 100644 ---- a/drivers/staging/omapdrm/omap_gem.c -+++ b/drivers/staging/omapdrm/omap_gem.c -@@ -45,6 +45,8 @@ int _drm_gem_create_mmap_offset_size(struct drm_gem_object *obj, size_t size); - struct omap_gem_object { - struct drm_gem_object base; - -+ struct list_head mm_list; -+ - uint32_t flags; - - /** width/height for tiled formats (rounded up to slot boundaries) */ -@@ -254,13 +256,17 @@ static void omap_gem_detach_pages(struct drm_gem_object *obj) - /** get mmap offset */ - static uint64_t mmap_offset(struct drm_gem_object *obj) - { -+ struct drm_device *dev = obj->dev; -+ -+ WARN_ON(!mutex_is_locked(&dev->struct_mutex)); -+ - if (!obj->map_list.map) { - /* Make it mmapable */ - size_t size = omap_gem_mmap_size(obj); - int ret = _drm_gem_create_mmap_offset_size(obj, size); - - if (ret) { -- dev_err(obj->dev->dev, "could not allocate mmap offset"); -+ dev_err(dev->dev, "could not allocate mmap offset\n"); - return 0; - } - } -@@ -764,6 +770,56 @@ void *omap_gem_vaddr(struct drm_gem_object *obj) - return omap_obj->vaddr; - } - -+#ifdef CONFIG_DEBUG_FS -+void omap_gem_describe(struct drm_gem_object *obj, struct seq_file *m) -+{ -+ struct drm_device *dev = obj->dev; -+ struct omap_gem_object *omap_obj = to_omap_bo(obj); -+ uint64_t off = 0; -+ -+ WARN_ON(! mutex_is_locked(&dev->struct_mutex)); -+ -+ if (obj->map_list.map) -+ off = (uint64_t)obj->map_list.hash.key; -+ -+ seq_printf(m, "%08x: %2d (%2d) %08llx %08Zx (%2d) %p %4d", -+ omap_obj->flags, obj->name, obj->refcount.refcount.counter, -+ off, omap_obj->paddr, omap_obj->paddr_cnt, -+ omap_obj->vaddr, omap_obj->roll); -+ -+ if (omap_obj->flags & OMAP_BO_TILED) { -+ seq_printf(m, " %dx%d", omap_obj->width, omap_obj->height); -+ if (omap_obj->block) { -+ struct tcm_area *area = &omap_obj->block->area; -+ seq_printf(m, " (%dx%d, %dx%d)", -+ area->p0.x, area->p0.y, -+ area->p1.x, area->p1.y); -+ } -+ } else { -+ seq_printf(m, " %d", obj->size); -+ } -+ -+ seq_printf(m, "\n"); -+} -+ -+void omap_gem_describe_objects(struct list_head *list, struct seq_file *m) -+{ -+ struct omap_gem_object *omap_obj; -+ int count = 0; -+ size_t size = 0; -+ -+ list_for_each_entry(omap_obj, list, mm_list) { -+ struct drm_gem_object *obj = &omap_obj->base; -+ seq_printf(m, " "); -+ omap_gem_describe(obj, m); -+ count++; -+ size += obj->size; -+ } -+ -+ seq_printf(m, "Total %d objects, %zu bytes\n", count, size); -+} -+#endif -+ - /* Buffer Synchronization: - */ - -@@ -1030,6 +1086,10 @@ void omap_gem_free_object(struct drm_gem_object *obj) - - evict(obj); - -+ WARN_ON(!mutex_is_locked(&dev->struct_mutex)); -+ -+ list_del(&omap_obj->mm_list); -+ - if (obj->map_list.map) { - drm_gem_free_mmap_offset(obj); - } -@@ -1130,6 +1190,8 @@ struct drm_gem_object *omap_gem_new(struct drm_device *dev, - goto fail; - } - -+ list_add(&omap_obj->mm_list, &priv->obj_list); -+ - obj = &omap_obj->base; - - if ((flags & OMAP_BO_SCANOUT) && !priv->has_dmm) { --- -1.7.9.1 - diff --git a/patches/drm/0007-staging-drm-omap-Disable-DMM-debugfs-for-OMAP3.patch b/patches/drm/0007-staging-drm-omap-Disable-DMM-debugfs-for-OMAP3.patch deleted file mode 100644 index c02e911b32f88598392d9c11a381a9763a0cd82a..0000000000000000000000000000000000000000 --- a/patches/drm/0007-staging-drm-omap-Disable-DMM-debugfs-for-OMAP3.patch +++ /dev/null @@ -1,75 +0,0 @@ -From e92c62e618afaf5e9a4c276d7341da3a80d41fe1 Mon Sep 17 00:00:00 2001 -From: Andy Gross <andy.gross@ti.com> -Date: Mon, 5 Mar 2012 10:48:37 -0600 -Subject: [PATCH 07/10] staging: drm/omap: Disable DMM debugfs for OMAP3 - -OMAP3 does not contain a DMM/Tiler block. As such, we should not -be exposing any DMM debugfs entries on OMAP3 platforms. - -Added inline helper function to verify existence of DMM. - -Signed-off-by: Andy Gross <andy.gross@ti.com> -Signed-off-by: Rob Clark <rob@ti.com> ---- - drivers/staging/omapdrm/omap_debugfs.c | 15 +++++++-------- - drivers/staging/omapdrm/omap_dmm_tiler.h | 6 ++++++ - 2 files changed, 13 insertions(+), 8 deletions(-) - -diff --git a/drivers/staging/omapdrm/omap_debugfs.c b/drivers/staging/omapdrm/omap_debugfs.c -index e23f907..2f122e0 100644 ---- a/drivers/staging/omapdrm/omap_debugfs.c -+++ b/drivers/staging/omapdrm/omap_debugfs.c -@@ -112,12 +112,10 @@ int omap_debugfs_init(struct drm_minor *minor) - return ret; - } - -- /* TODO: only do this if has_dmm.. but this fxn gets called before -- * dev_load() so we don't know this yet.. -- */ -- ret = drm_debugfs_create_files(omap_dmm_debugfs_list, -- ARRAY_SIZE(omap_dmm_debugfs_list), -- minor->debugfs_root, minor); -+ if (dmm_is_available()) -+ ret = drm_debugfs_create_files(omap_dmm_debugfs_list, -+ ARRAY_SIZE(omap_dmm_debugfs_list), -+ minor->debugfs_root, minor); - - if (ret) { - dev_err(dev->dev, "could not install omap_dmm_debugfs_list\n"); -@@ -131,8 +129,9 @@ void omap_debugfs_cleanup(struct drm_minor *minor) - { - drm_debugfs_remove_files(omap_debugfs_list, - ARRAY_SIZE(omap_debugfs_list), minor); -- drm_debugfs_remove_files(omap_dmm_debugfs_list, -- ARRAY_SIZE(omap_dmm_debugfs_list), minor); -+ if (dmm_is_available()) -+ drm_debugfs_remove_files(omap_dmm_debugfs_list, -+ ARRAY_SIZE(omap_dmm_debugfs_list), minor); - } - - #endif -diff --git a/drivers/staging/omapdrm/omap_dmm_tiler.h b/drivers/staging/omapdrm/omap_dmm_tiler.h -index f87cb65..55ab284 100644 ---- a/drivers/staging/omapdrm/omap_dmm_tiler.h -+++ b/drivers/staging/omapdrm/omap_dmm_tiler.h -@@ -16,6 +16,7 @@ - #ifndef OMAP_DMM_TILER_H - #define OMAP_DMM_TILER_H - -+#include <plat/cpu.h> - #include "omap_drv.h" - #include "tcm.h" - -@@ -132,4 +133,9 @@ struct omap_dmm_platform_data { - int irq; - }; - -+static inline int dmm_is_available(void) -+{ -+ return cpu_is_omap44xx(); -+} -+ - #endif --- -1.7.9.1 - diff --git a/patches/drm/0008-staging-drm-omap-Validate-debugfs-device.patch b/patches/drm/0008-staging-drm-omap-Validate-debugfs-device.patch deleted file mode 100644 index 908fc992df6108c8b2e75a4a4f13bb382cc56c64..0000000000000000000000000000000000000000 --- a/patches/drm/0008-staging-drm-omap-Validate-debugfs-device.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 2f300144fb5bb4c006ad45b4b6f7c6730a8dcda7 Mon Sep 17 00:00:00 2001 -From: Andy Gross <andy.gross@ti.com> -Date: Mon, 5 Mar 2012 10:48:38 -0600 -Subject: [PATCH 08/10] staging: drm/omap: Validate debugfs device - -Added check for valid device information before dumping debugfs -information. - -Signed-off-by: Andy Gross <andy.gross@ti.com> -Signed-off-by: Rob Clark <rob@ti.com> ---- - drivers/staging/omapdrm/omap_dmm_tiler.c | 12 ++++++++++-- - 1 files changed, 10 insertions(+), 2 deletions(-) - -diff --git a/drivers/staging/omapdrm/omap_dmm_tiler.c b/drivers/staging/omapdrm/omap_dmm_tiler.c -index 852d944..e4c7bb6 100644 ---- a/drivers/staging/omapdrm/omap_dmm_tiler.c -+++ b/drivers/staging/omapdrm/omap_dmm_tiler.c -@@ -766,10 +766,18 @@ int tiler_map_show(struct seq_file *s, void *arg) - const char *a2d = special; - const char *m2dp = m2d, *a2dp = a2d; - char nice[128]; -- int h_adj = omap_dmm->lut_height / ydiv; -- int w_adj = omap_dmm->lut_width / xdiv; -+ int h_adj; -+ int w_adj; - unsigned long flags; - -+ if (!omap_dmm) { -+ /* early return if dmm/tiler device is not initialized */ -+ return 0; -+ } -+ -+ h_adj = omap_dmm->lut_height / ydiv; -+ w_adj = omap_dmm->lut_width / xdiv; -+ - map = kzalloc(h_adj * sizeof(*map), GFP_KERNEL); - global_map = kzalloc((w_adj + 1) * h_adj, GFP_KERNEL); - --- -1.7.9.1 - diff --git a/patches/drm/0009-staging-drm-omap-Get-DMM-resources-from-hwmod.patch b/patches/drm/0009-staging-drm-omap-Get-DMM-resources-from-hwmod.patch deleted file mode 100644 index 8f106c3cfb13c6b90912f9ef287e777de8ffffa1..0000000000000000000000000000000000000000 --- a/patches/drm/0009-staging-drm-omap-Get-DMM-resources-from-hwmod.patch +++ /dev/null @@ -1,311 +0,0 @@ -From bf2d2f6b3398693a3ee64c27fa613327e8af6edc Mon Sep 17 00:00:00 2001 -From: Andy Gross <andy.gross@ti.com> -Date: Mon, 5 Mar 2012 10:48:39 -0600 -Subject: [PATCH 09/10] staging: drm/omap: Get DMM resources from hwmod - -This patch splits the DMM off into a separate sub-device, in order to -utilize the platform device information that was created as part of -the OMAP hwmod entry for the DMM. - -The driver probe function queries the iomem resource and IRQ using -standard platform_get functions. - -The OMAP DRM driver now calls the platform_driver_register() function -for the subordinate DMM driver inside its probe function. This -guarantees the required order for the DMM and ensures the DMM resources -are available for use by the DRM driver. - -Signed-off-by: Andy Gross <andy.gross@ti.com> -Signed-off-by: Rob Clark <rob@ti.com> ---- - drivers/staging/omapdrm/omap_dmm_tiler.c | 79 +++++++++++++++++++++-------- - drivers/staging/omapdrm/omap_dmm_tiler.h | 11 +--- - drivers/staging/omapdrm/omap_drv.c | 6 ++ - drivers/staging/omapdrm/omap_gem.c | 8 +-- - 4 files changed, 68 insertions(+), 36 deletions(-) - -diff --git a/drivers/staging/omapdrm/omap_dmm_tiler.c b/drivers/staging/omapdrm/omap_dmm_tiler.c -index e4c7bb6..1ecb6a7 100644 ---- a/drivers/staging/omapdrm/omap_dmm_tiler.c -+++ b/drivers/staging/omapdrm/omap_dmm_tiler.c -@@ -34,6 +34,8 @@ - #include "omap_dmm_tiler.h" - #include "omap_dmm_priv.h" - -+#define DMM_DRIVER_NAME "dmm" -+ - /* mappings for associating views to luts */ - static struct tcm *containers[TILFMT_NFORMATS]; - static struct dmm *omap_dmm; -@@ -465,7 +467,12 @@ size_t tiler_vsize(enum tiler_fmt fmt, uint16_t w, uint16_t h) - return round_up(geom[fmt].cpp * w, PAGE_SIZE) * h; - } - --int omap_dmm_remove(void) -+bool dmm_is_initialized(void) -+{ -+ return omap_dmm ? true : false; -+} -+ -+static int omap_dmm_remove(struct platform_device *dev) - { - struct tiler_block *block, *_block; - int i; -@@ -499,40 +506,49 @@ int omap_dmm_remove(void) - if (omap_dmm->irq != -1) - free_irq(omap_dmm->irq, omap_dmm); - -+ iounmap(omap_dmm->base); - kfree(omap_dmm); -+ omap_dmm = NULL; - } - - return 0; - } - --int omap_dmm_init(struct drm_device *dev) -+static int omap_dmm_probe(struct platform_device *dev) - { - int ret = -EFAULT, i; - struct tcm_area area = {0}; - u32 hwinfo, pat_geom, lut_table_size; -- struct omap_drm_platform_data *pdata = dev->dev->platform_data; -- -- if (!pdata || !pdata->dmm_pdata) { -- dev_err(dev->dev, "dmm platform data not present, skipping\n"); -- return ret; -- } -+ struct resource *mem; - - omap_dmm = kzalloc(sizeof(*omap_dmm), GFP_KERNEL); - if (!omap_dmm) { -- dev_err(dev->dev, "failed to allocate driver data section\n"); -+ dev_err(&dev->dev, "failed to allocate driver data section\n"); - goto fail; - } - - /* lookup hwmod data - base address and irq */ -- omap_dmm->base = pdata->dmm_pdata->base; -- omap_dmm->irq = pdata->dmm_pdata->irq; -- omap_dmm->dev = dev->dev; -+ mem = platform_get_resource(dev, IORESOURCE_MEM, 0); -+ if (!mem) { -+ dev_err(&dev->dev, "failed to get base address resource\n"); -+ goto fail; -+ } -+ -+ omap_dmm->base = ioremap(mem->start, SZ_2K); - - if (!omap_dmm->base) { -- dev_err(dev->dev, "failed to get dmm base address\n"); -+ dev_err(&dev->dev, "failed to get dmm base address\n"); - goto fail; - } - -+ omap_dmm->irq = platform_get_irq(dev, 0); -+ if (omap_dmm->irq < 0) { -+ dev_err(&dev->dev, "failed to get IRQ resource\n"); -+ goto fail; -+ } -+ -+ omap_dmm->dev = &dev->dev; -+ - hwinfo = readl(omap_dmm->base + DMM_PAT_HWINFO); - omap_dmm->num_engines = (hwinfo >> 24) & 0x1F; - omap_dmm->num_lut = (hwinfo >> 16) & 0x1F; -@@ -556,7 +572,7 @@ int omap_dmm_init(struct drm_device *dev) - "omap_dmm_irq_handler", omap_dmm); - - if (ret) { -- dev_err(dev->dev, "couldn't register IRQ %d, error %d\n", -+ dev_err(&dev->dev, "couldn't register IRQ %d, error %d\n", - omap_dmm->irq, ret); - omap_dmm->irq = -1; - goto fail; -@@ -575,25 +591,30 @@ int omap_dmm_init(struct drm_device *dev) - - omap_dmm->lut = vmalloc(lut_table_size * sizeof(*omap_dmm->lut)); - if (!omap_dmm->lut) { -- dev_err(dev->dev, "could not allocate lut table\n"); -+ dev_err(&dev->dev, "could not allocate lut table\n"); - ret = -ENOMEM; - goto fail; - } - - omap_dmm->dummy_page = alloc_page(GFP_KERNEL | __GFP_DMA32); - if (!omap_dmm->dummy_page) { -- dev_err(dev->dev, "could not allocate dummy page\n"); -+ dev_err(&dev->dev, "could not allocate dummy page\n"); - ret = -ENOMEM; - goto fail; - } -+ -+ /* set dma mask for device */ -+ /* NOTE: this is a workaround for the hwmod not initializing properly */ -+ dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); -+ - omap_dmm->dummy_pa = page_to_phys(omap_dmm->dummy_page); - - /* alloc refill memory */ -- omap_dmm->refill_va = dma_alloc_coherent(dev->dev, -+ omap_dmm->refill_va = dma_alloc_coherent(&dev->dev, - REFILL_BUFFER_SIZE * omap_dmm->num_engines, - &omap_dmm->refill_pa, GFP_KERNEL); - if (!omap_dmm->refill_va) { -- dev_err(dev->dev, "could not allocate refill memory\n"); -+ dev_err(&dev->dev, "could not allocate refill memory\n"); - goto fail; - } - -@@ -602,7 +623,7 @@ int omap_dmm_init(struct drm_device *dev) - omap_dmm->num_engines * sizeof(struct refill_engine), - GFP_KERNEL); - if (!omap_dmm->engines) { -- dev_err(dev->dev, "could not allocate engines\n"); -+ dev_err(&dev->dev, "could not allocate engines\n"); - ret = -ENOMEM; - goto fail; - } -@@ -624,7 +645,7 @@ int omap_dmm_init(struct drm_device *dev) - omap_dmm->tcm = kzalloc(omap_dmm->num_lut * sizeof(*omap_dmm->tcm), - GFP_KERNEL); - if (!omap_dmm->tcm) { -- dev_err(dev->dev, "failed to allocate lut ptrs\n"); -+ dev_err(&dev->dev, "failed to allocate lut ptrs\n"); - ret = -ENOMEM; - goto fail; - } -@@ -636,7 +657,7 @@ int omap_dmm_init(struct drm_device *dev) - NULL); - - if (!omap_dmm->tcm[i]) { -- dev_err(dev->dev, "failed to allocate container\n"); -+ dev_err(&dev->dev, "failed to allocate container\n"); - ret = -ENOMEM; - goto fail; - } -@@ -676,7 +697,7 @@ int omap_dmm_init(struct drm_device *dev) - return 0; - - fail: -- omap_dmm_remove(); -+ omap_dmm_remove(dev); - return ret; - } - -@@ -836,3 +857,17 @@ error: - return 0; - } - #endif -+ -+struct platform_driver omap_dmm_driver = { -+ .probe = omap_dmm_probe, -+ .remove = omap_dmm_remove, -+ .driver = { -+ .owner = THIS_MODULE, -+ .name = DMM_DRIVER_NAME, -+ }, -+}; -+ -+MODULE_LICENSE("GPL v2"); -+MODULE_AUTHOR("Andy Gross <andy.gross@ti.com>"); -+MODULE_DESCRIPTION("OMAP DMM/Tiler Driver"); -+MODULE_ALIAS("platform:" DMM_DRIVER_NAME); -diff --git a/drivers/staging/omapdrm/omap_dmm_tiler.h b/drivers/staging/omapdrm/omap_dmm_tiler.h -index 55ab284..7b1052a 100644 ---- a/drivers/staging/omapdrm/omap_dmm_tiler.h -+++ b/drivers/staging/omapdrm/omap_dmm_tiler.h -@@ -73,10 +73,6 @@ struct tiler_block { - #define TIL_ADDR(x, orient, a)\ - ((u32) (x) | (orient) | ((a) << SHIFT_ACC_MODE)) - --/* externally accessible functions */ --int omap_dmm_init(struct drm_device *dev); --int omap_dmm_remove(void); -- - #ifdef CONFIG_DEBUG_FS - int tiler_map_show(struct seq_file *s, void *arg); - #endif -@@ -98,7 +94,9 @@ uint32_t tiler_stride(enum tiler_fmt fmt); - size_t tiler_size(enum tiler_fmt fmt, uint16_t w, uint16_t h); - size_t tiler_vsize(enum tiler_fmt fmt, uint16_t w, uint16_t h); - void tiler_align(enum tiler_fmt fmt, uint16_t *w, uint16_t *h); -+bool dmm_is_initialized(void); - -+extern struct platform_driver omap_dmm_driver; - - /* GEM bo flags -> tiler fmt */ - static inline enum tiler_fmt gem2fmt(uint32_t flags) -@@ -128,11 +126,6 @@ static inline bool validfmt(enum tiler_fmt fmt) - } - } - --struct omap_dmm_platform_data { -- void __iomem *base; -- int irq; --}; -- - static inline int dmm_is_available(void) - { - return cpu_is_omap44xx(); -diff --git a/drivers/staging/omapdrm/omap_drv.c b/drivers/staging/omapdrm/omap_drv.c -index e2100bb..3df5b4c 100644 ---- a/drivers/staging/omapdrm/omap_drv.c -+++ b/drivers/staging/omapdrm/omap_drv.c -@@ -21,6 +21,7 @@ - - #include "drm_crtc_helper.h" - #include "drm_fb_helper.h" -+#include "omap_dmm_tiler.h" - - #define DRIVER_NAME MODULE_NAME - #define DRIVER_DESC "OMAP DRM" -@@ -802,6 +803,9 @@ static void pdev_shutdown(struct platform_device *device) - static int pdev_probe(struct platform_device *device) - { - DBG("%s", device->name); -+ if (platform_driver_register(&omap_dmm_driver)) -+ dev_err(&device->dev, "DMM registration failed\n"); -+ - return drm_platform_init(&omap_drm_driver, device); - } - -@@ -809,6 +813,8 @@ static int pdev_remove(struct platform_device *device) - { - DBG(""); - drm_platform_exit(&omap_drm_driver, device); -+ -+ platform_driver_unregister(&omap_dmm_driver); - return 0; - } - -diff --git a/drivers/staging/omapdrm/omap_gem.c b/drivers/staging/omapdrm/omap_gem.c -index 1d734bc..5abd294 100644 ---- a/drivers/staging/omapdrm/omap_gem.c -+++ b/drivers/staging/omapdrm/omap_gem.c -@@ -1238,12 +1238,11 @@ void omap_gem_init(struct drm_device *dev) - const enum tiler_fmt fmts[] = { - TILFMT_8BIT, TILFMT_16BIT, TILFMT_32BIT - }; -- int i, j, ret; -+ int i, j; - -- ret = omap_dmm_init(dev); -- if (ret) { -+ if (!dmm_is_initialized()) { - /* DMM only supported on OMAP4 and later, so this isn't fatal */ -- dev_warn(dev->dev, "omap_dmm_init failed, disabling DMM\n"); -+ dev_warn(dev->dev, "DMM not available, disable DMM support\n"); - return; - } - -@@ -1293,6 +1292,5 @@ void omap_gem_deinit(struct drm_device *dev) - /* I believe we can rely on there being no more outstanding GEM - * objects which could depend on usergart/dmm at this point. - */ -- omap_dmm_remove(); - kfree(usergart); - } --- -1.7.9.1 - diff --git a/patches/drm/0010-staging-drm-omap-mmap-of-tiled-buffers-with-stride-4.patch b/patches/drm/0010-staging-drm-omap-mmap-of-tiled-buffers-with-stride-4.patch deleted file mode 100644 index 29249fcf8339d772d1cb33c536b216cc11d2dd80..0000000000000000000000000000000000000000 --- a/patches/drm/0010-staging-drm-omap-mmap-of-tiled-buffers-with-stride-4.patch +++ /dev/null @@ -1,159 +0,0 @@ -From 6a0b989797e682070cf6cadadd5e8b4c21629c27 Mon Sep 17 00:00:00 2001 -From: Rob Clark <rob@ti.com> -Date: Mon, 5 Mar 2012 10:48:40 -0600 -Subject: [PATCH 10/10] staging: drm/omap: mmap of tiled buffers with stride - >4kb - -Deal with the case of buffers with virtual stride larger than one -page in fault_2d(). - -Signed-off-by: Rob Clark <rob@ti.com> ---- - drivers/staging/omapdrm/omap_gem.c | 86 ++++++++++++++++++++++++----------- - 1 files changed, 59 insertions(+), 27 deletions(-) - -diff --git a/drivers/staging/omapdrm/omap_gem.c b/drivers/staging/omapdrm/omap_gem.c -index 5abd294..921f058 100644 ---- a/drivers/staging/omapdrm/omap_gem.c -+++ b/drivers/staging/omapdrm/omap_gem.c -@@ -153,10 +153,23 @@ static void evict_entry(struct drm_gem_object *obj, - enum tiler_fmt fmt, struct usergart_entry *entry) - { - if (obj->dev->dev_mapping) { -- size_t size = PAGE_SIZE * usergart[fmt].height; -+ struct omap_gem_object *omap_obj = to_omap_bo(obj); -+ int n = usergart[fmt].height; -+ size_t size = PAGE_SIZE * n; - loff_t off = mmap_offset(obj) + - (entry->obj_pgoff << PAGE_SHIFT); -- unmap_mapping_range(obj->dev->dev_mapping, off, size, 1); -+ const int m = 1 + ((omap_obj->width << fmt) / PAGE_SIZE); -+ if (m > 1) { -+ int i; -+ /* if stride > than PAGE_SIZE then sparse mapping: */ -+ for (i = n; i > 0; i--) { -+ unmap_mapping_range(obj->dev->dev_mapping, -+ off, PAGE_SIZE, 1); -+ off += PAGE_SIZE * m; -+ } -+ } else { -+ unmap_mapping_range(obj->dev->dev_mapping, off, size, 1); -+ } - } - - entry->obj = NULL; -@@ -342,26 +355,39 @@ static int fault_2d(struct drm_gem_object *obj, - void __user *vaddr; - int i, ret, slots; - -- if (!usergart) -- return -EFAULT; -- -- /* TODO: this fxn might need a bit tweaking to deal w/ tiled buffers -- * that are wider than 4kb -+ /* -+ * Note the height of the slot is also equal to the number of pages -+ * that need to be mapped in to fill 4kb wide CPU page. If the slot -+ * height is 64, then 64 pages fill a 4kb wide by 64 row region. -+ */ -+ const int n = usergart[fmt].height; -+ const int n_shift = usergart[fmt].height_shift; -+ -+ /* -+ * If buffer width in bytes > PAGE_SIZE then the virtual stride is -+ * rounded up to next multiple of PAGE_SIZE.. this need to be taken -+ * into account in some of the math, so figure out virtual stride -+ * in pages - */ -+ const int m = 1 + ((omap_obj->width << fmt) / PAGE_SIZE); - - /* We don't use vmf->pgoff since that has the fake offset: */ - pgoff = ((unsigned long)vmf->virtual_address - - vma->vm_start) >> PAGE_SHIFT; - -- /* actual address we start mapping at is rounded down to previous slot -+ /* -+ * Actual address we start mapping at is rounded down to previous slot - * boundary in the y direction: - */ -- base_pgoff = round_down(pgoff, usergart[fmt].height); -- vaddr = vmf->virtual_address - ((pgoff - base_pgoff) << PAGE_SHIFT); -- entry = &usergart[fmt].entry[usergart[fmt].last]; -+ base_pgoff = round_down(pgoff, m << n_shift); - -+ /* figure out buffer width in slots */ - slots = omap_obj->width >> usergart[fmt].slot_shift; - -+ vaddr = vmf->virtual_address - ((pgoff - base_pgoff) << PAGE_SHIFT); -+ -+ entry = &usergart[fmt].entry[usergart[fmt].last]; -+ - /* evict previous buffer using this usergart entry, if any: */ - if (entry->obj) - evict_entry(entry->obj, fmt, entry); -@@ -369,23 +395,30 @@ static int fault_2d(struct drm_gem_object *obj, - entry->obj = obj; - entry->obj_pgoff = base_pgoff; - -- /* now convert base_pgoff to phys offset from virt offset: -- */ -- base_pgoff = (base_pgoff >> usergart[fmt].height_shift) * slots; -- -- /* map in pages. Note the height of the slot is also equal to the -- * number of pages that need to be mapped in to fill 4kb wide CPU page. -- * If the height is 64, then 64 pages fill a 4kb wide by 64 row region. -- * Beyond the valid pixel part of the buffer, we set pages[i] to NULL to -- * get a dummy page mapped in.. if someone reads/writes it they will get -- * random/undefined content, but at least it won't be corrupting -- * whatever other random page used to be mapped in, or other undefined -- * behavior. -+ /* now convert base_pgoff to phys offset from virt offset: */ -+ base_pgoff = (base_pgoff >> n_shift) * slots; -+ -+ /* for wider-than 4k.. figure out which part of the slot-row we want: */ -+ if (m > 1) { -+ int off = pgoff % m; -+ entry->obj_pgoff += off; -+ base_pgoff /= m; -+ slots = min(slots - (off << n_shift), n); -+ base_pgoff += off << n_shift; -+ vaddr += off << PAGE_SHIFT; -+ } -+ -+ /* -+ * Map in pages. Beyond the valid pixel part of the buffer, we set -+ * pages[i] to NULL to get a dummy page mapped in.. if someone -+ * reads/writes it they will get random/undefined content, but at -+ * least it won't be corrupting whatever other random page used to -+ * be mapped in, or other undefined behavior. - */ - memcpy(pages, &omap_obj->pages[base_pgoff], - sizeof(struct page *) * slots); - memset(pages + slots, 0, -- sizeof(struct page *) * (usergart[fmt].height - slots)); -+ sizeof(struct page *) * (n - slots)); - - ret = tiler_pin(entry->block, pages, ARRAY_SIZE(pages), 0, true); - if (ret) { -@@ -393,16 +426,15 @@ static int fault_2d(struct drm_gem_object *obj, - return ret; - } - -- i = usergart[fmt].height; - pfn = entry->paddr >> PAGE_SHIFT; - - VERB("Inserting %p pfn %lx, pa %lx", vmf->virtual_address, - pfn, pfn << PAGE_SHIFT); - -- while (i--) { -+ for (i = n; i > 0; i--) { - vm_insert_mixed(vma, (unsigned long)vaddr, pfn); - pfn += usergart[fmt].stride_pfn; -- vaddr += PAGE_SIZE; -+ vaddr += PAGE_SIZE * m; - } - - /* simple round-robin: */ --- -1.7.9.1 - diff --git a/patches/omap/0001-staging-tidspbridge-remove-usage-of-OMAP2_L4_IO_ADDR.patch b/patches/omap/0001-staging-tidspbridge-remove-usage-of-OMAP2_L4_IO_ADDR.patch deleted file mode 100644 index 64a17117deecf423333b2ad03749d1751a6bb8da..0000000000000000000000000000000000000000 --- a/patches/omap/0001-staging-tidspbridge-remove-usage-of-OMAP2_L4_IO_ADDR.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 057f9277d9968942b82bfce63bd923162700450e Mon Sep 17 00:00:00 2001 -From: Omar Ramirez Luna <omar.ramirez@ti.com> -Date: Fri, 20 Apr 2012 20:22:41 -0500 -Subject: [PATCH] staging: tidspbridge: remove usage of OMAP2_L4_IO_ADDRESS -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Instead now use ioremap. This is needed for 3.4 since this change -emerged in mainline during one of the previous rc cycles. - -These solves the following compilation breaks: - -drivers/staging/tidspbridge/core/tiomap3430.c: - In function ‘bridge_brd_start’: -drivers/staging/tidspbridge/core/tiomap3430.c:425:4: - error: implicit declaration of function ‘OMAP2_L4_IO_ADDRESS’ - -drivers/staging/tidspbridge/core/wdt.c: In function ‘dsp_wdt_init’: -drivers/staging/tidspbridge/core/wdt.c:56:2: - error: implicit declaration of function ‘OMAP2_L4_IO_ADDRESS’ - -For control registers a new function needs to be defined so we -can get rid of a layer violation, but that approach must be queued -for the next merge window. - -As seen in: -http://www.arm.linux.org.uk/developer/build/ -platform: omap4430-sdp build: uImage -config: randconfig version: 3.4.0-rc3 -start time: Apr 20 2012 01:07 - -Reported-by: Tony Lindgren <tony@atomide.com> -Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com> ---- - drivers/staging/tidspbridge/core/tiomap3430.c | 20 ++++++++++++-------- - drivers/staging/tidspbridge/core/wdt.c | 8 +++++++- - 2 files changed, 19 insertions(+), 9 deletions(-) - -diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c -index 7862513..9cf29fc 100644 ---- a/drivers/staging/tidspbridge/core/tiomap3430.c -+++ b/drivers/staging/tidspbridge/core/tiomap3430.c -@@ -79,10 +79,6 @@ - #define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) - #define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) - --#define OMAP343X_CTRL_REGADDR(reg) \ -- OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) -- -- - /* Forward Declarations: */ - static int bridge_brd_monitor(struct bridge_dev_context *dev_ctxt); - static int bridge_brd_read(struct bridge_dev_context *dev_ctxt, -@@ -418,19 +414,27 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt, - - /* Assert RST1 i.e only the RST only for DSP megacell */ - if (!status) { -+ /* -+ * XXX: ioremapping MUST be removed once ctrl -+ * function is made available. -+ */ -+ void __iomem *ctrl = ioremap(OMAP343X_CTRL_BASE, SZ_4K); -+ if (!ctrl) -+ return -ENOMEM; -+ - (*pdata->dsp_prm_rmw_bits)(OMAP3430_RST1_IVA2_MASK, - OMAP3430_RST1_IVA2_MASK, OMAP3430_IVA2_MOD, - OMAP2_RM_RSTCTRL); - /* Mask address with 1K for compatibility */ - __raw_writel(dsp_addr & OMAP3_IVA2_BOOTADDR_MASK, -- OMAP343X_CTRL_REGADDR( -- OMAP343X_CONTROL_IVA2_BOOTADDR)); -+ ctrl + OMAP343X_CONTROL_IVA2_BOOTADDR); - /* - * Set bootmode to self loop if dsp_debug flag is true - */ - __raw_writel((dsp_debug) ? OMAP3_IVA2_BOOTMOD_IDLE : 0, -- OMAP343X_CTRL_REGADDR( -- OMAP343X_CONTROL_IVA2_BOOTMOD)); -+ ctrl + OMAP343X_CONTROL_IVA2_BOOTMOD); -+ -+ iounmap(ctrl); - } - } - if (!status) { -diff --git a/drivers/staging/tidspbridge/core/wdt.c b/drivers/staging/tidspbridge/core/wdt.c -index 70055c8..870f934 100644 ---- a/drivers/staging/tidspbridge/core/wdt.c -+++ b/drivers/staging/tidspbridge/core/wdt.c -@@ -53,7 +53,10 @@ int dsp_wdt_init(void) - int ret = 0; - - dsp_wdt.sm_wdt = NULL; -- dsp_wdt.reg_base = OMAP2_L4_IO_ADDRESS(OMAP34XX_WDT3_BASE); -+ dsp_wdt.reg_base = ioremap(OMAP34XX_WDT3_BASE, SZ_4K); -+ if (!dsp_wdt.reg_base) -+ return -ENOMEM; -+ - tasklet_init(&dsp_wdt.wdt3_tasklet, dsp_wdt_dpc, 0); - - dsp_wdt.fclk = clk_get(NULL, "wdt3_fck"); -@@ -99,6 +102,9 @@ void dsp_wdt_exit(void) - dsp_wdt.fclk = NULL; - dsp_wdt.iclk = NULL; - dsp_wdt.sm_wdt = NULL; -+ -+ if (dsp_wdt.reg_base) -+ iounmap(dsp_wdt.reg_base); - dsp_wdt.reg_base = NULL; - } - --- -1.7.9.5 - diff --git a/patches/omap/0001-Fix-sprz319-erratum-2.1.patch b/patches/omap_fixes/0001-Fix-sprz319-erratum-2.1.patch similarity index 100% rename from patches/omap/0001-Fix-sprz319-erratum-2.1.patch rename to patches/omap_fixes/0001-Fix-sprz319-erratum-2.1.patch diff --git a/patches/omap/0001-omap3-Increase-limit-on-bootarg-mpurate.patch b/patches/omap_fixes/0001-omap3-Increase-limit-on-bootarg-mpurate.patch similarity index 70% rename from patches/omap/0001-omap3-Increase-limit-on-bootarg-mpurate.patch rename to patches/omap_fixes/0001-omap3-Increase-limit-on-bootarg-mpurate.patch index 2ded17b5293a59764faecc143f9f3fc8c3f8a404..9c10885a56926db10cefea799e1617de90753ee3 100644 --- a/patches/omap/0001-omap3-Increase-limit-on-bootarg-mpurate.patch +++ b/patches/omap_fixes/0001-omap3-Increase-limit-on-bootarg-mpurate.patch @@ -1,7 +1,7 @@ -From a83e02714492311074ed3ae16dd42387ae2eac72 Mon Sep 17 00:00:00 2001 +From 50d565d7f1dd01192758813f4263d96ebc3b6e61 Mon Sep 17 00:00:00 2001 From: Sanjeev Premi <premi@ti.com> Date: Thu, 29 Apr 2010 14:09:42 +0530 -Subject: [PATCH] omap3: Increase limit on bootarg 'mpurate' +Subject: [PATCH 1/5] omap3: Increase limit on bootarg 'mpurate' The value of mpurate is currently expected to be less than 1000 when specified in MHz. @@ -13,13 +13,13 @@ for quite some time. Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- arch/arm/plat-omap/clock.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c -index 567e4b5..fe4e67c 100644 +index 62ec5c4..3ff0f3b 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c -@@ -186,7 +186,7 @@ static int __init omap_clk_setup(char *str) +@@ -185,7 +185,7 @@ static int __init omap_clk_setup(char *str) if (!mpurate) return 1; @@ -29,5 +29,5 @@ index 567e4b5..fe4e67c 100644 return 1; -- -1.7.9.1 +1.7.10 diff --git a/patches/omap/0001-OMAP2-UART-Remove-cpu-checks-for-populating-errata-f.patch b/patches/omap_fixes/0002-OMAP2-UART-Remove-cpu-checks-for-populating-errata-f.patch similarity index 90% rename from patches/omap/0001-OMAP2-UART-Remove-cpu-checks-for-populating-errata-f.patch rename to patches/omap_fixes/0002-OMAP2-UART-Remove-cpu-checks-for-populating-errata-f.patch index 7608e17c565d24e6cdb2cebc2476141f9daab909..7d61439c953aa6f0101bf8ce8c0ee362f89390fb 100644 --- a/patches/omap/0001-OMAP2-UART-Remove-cpu-checks-for-populating-errata-f.patch +++ b/patches/omap_fixes/0002-OMAP2-UART-Remove-cpu-checks-for-populating-errata-f.patch @@ -1,7 +1,7 @@ -From 172a6982ab3803f463d86640d96918f454788454 Mon Sep 17 00:00:00 2001 +From 665ba7490ad4d62f7c747599cff2dd0a915d4c3c Mon Sep 17 00:00:00 2001 From: "Govindraj.R" <govindraj.raja@ti.com> Date: Wed, 21 Mar 2012 15:54:59 +0530 -Subject: [PATCH 1/3] OMAP2+: UART: Remove cpu checks for populating errata +Subject: [PATCH 2/5] OMAP2+: UART: Remove cpu checks for populating errata flags Currently the errata is populated based on cpu checks this can @@ -15,16 +15,16 @@ Cc: Kevin Hilman <khilman@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Govindraj.R <govindraj.raja@ti.com> --- - arch/arm/mach-omap2/serial.c | 8 --- + arch/arm/mach-omap2/serial.c | 8 ---- arch/arm/plat-omap/include/plat/omap-serial.h | 1 - drivers/tty/serial/omap-serial.c | 62 ++++++++++++++++++++++++- 3 files changed, 61 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c -index e7c0462..bf8ca00 100644 +index 619f864..d99df9c 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c -@@ -357,14 +357,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata, +@@ -245,14 +245,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata, omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate; omap_up.autosuspend_timeout = info->autosuspend_timeout; @@ -52,7 +52,7 @@ index 9ff4444..1a52725 100644 unsigned int dma_rx_timeout; unsigned int autosuspend_timeout; diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c -index f809041..c7666d6 100644 +index d00b38e..3d02d93 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -44,6 +44,13 @@ @@ -128,7 +128,7 @@ index f809041..c7666d6 100644 static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev) { struct omap_uart_port_info *omap_up_info; -@@ -1443,7 +1502,6 @@ static int serial_omap_probe(struct platform_device *pdev) +@@ -1439,7 +1498,6 @@ static int serial_omap_probe(struct platform_device *pdev) "%d\n", DEFAULT_CLK_SPEED); } up->uart_dma.uart_base = mem->start; @@ -136,7 +136,7 @@ index f809041..c7666d6 100644 if (omap_up_info->dma_enabled) { up->uart_dma.uart_dma_tx = dma_tx->start; -@@ -1473,6 +1531,8 @@ static int serial_omap_probe(struct platform_device *pdev) +@@ -1469,6 +1527,8 @@ static int serial_omap_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); pm_runtime_get_sync(&pdev->dev); @@ -146,5 +146,5 @@ index f809041..c7666d6 100644 serial_omap_add_console_port(up); -- -1.7.9.1 +1.7.10 diff --git a/patches/omap/0002-OMAP2-UART-enable-tx-wakeup-bit-for-wer-reg.patch b/patches/omap_fixes/0003-OMAP2-UART-enable-tx-wakeup-bit-for-wer-reg.patch similarity index 91% rename from patches/omap/0002-OMAP2-UART-enable-tx-wakeup-bit-for-wer-reg.patch rename to patches/omap_fixes/0003-OMAP2-UART-enable-tx-wakeup-bit-for-wer-reg.patch index dedbe89bb640a5c000ac0b6c2fb39578f0c19acc..e1bd6924cc3f48fcfbed693a878569969c925579 100644 --- a/patches/omap/0002-OMAP2-UART-enable-tx-wakeup-bit-for-wer-reg.patch +++ b/patches/omap_fixes/0003-OMAP2-UART-enable-tx-wakeup-bit-for-wer-reg.patch @@ -1,7 +1,7 @@ -From 026177cdc5866b110c9e11d242ebc65612705059 Mon Sep 17 00:00:00 2001 +From 876c023653a9704518f658ffb4f21a84fe8dba95 Mon Sep 17 00:00:00 2001 From: "Govindraj.R" <govindraj.raja@ti.com> Date: Wed, 21 Mar 2012 15:55:00 +0530 -Subject: [PATCH 2/3] OMAP2+: UART: enable tx wakeup bit for wer reg +Subject: [PATCH 3/5] OMAP2+: UART: enable tx wakeup bit for wer reg From omap36xx onwards the module wakeup enable reg wer has TX wakeup bit available enable the same @@ -19,7 +19,7 @@ Signed-off-by: Govindraj.R <govindraj.raja@ti.com> --- arch/arm/plat-omap/include/plat/omap-serial.h | 7 +++++++ drivers/tty/serial/omap-serial.c | 9 ++++++++- - 2 files changed, 15 insertions(+), 1 deletions(-) + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h index 1a52725..8a4ca5c 100644 @@ -54,7 +54,7 @@ index 1a52725..8a4ca5c 100644 struct pm_qos_request pm_qos_request; diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c -index c7666d6..20d568d 100644 +index 3d02d93..40ba100 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -585,7 +585,11 @@ static int serial_omap_startup(struct uart_port *port) @@ -82,7 +82,7 @@ index c7666d6..20d568d 100644 break; default: break; -@@ -1629,6 +1635,7 @@ static void serial_omap_restore_context(struct uart_omap_port *up) +@@ -1626,6 +1632,7 @@ static void serial_omap_restore_context(struct uart_omap_port *up) serial_omap_mdr1_errataset(up, up->mdr1); else serial_out(up, UART_OMAP_MDR1, up->mdr1); @@ -91,5 +91,5 @@ index c7666d6..20d568d 100644 static int serial_omap_runtime_suspend(struct device *dev) -- -1.7.9.1 +1.7.10 diff --git a/patches/omap/0003-OMAP2-UART-replace-omap34xx-omap4xx-cpu-checks-with-.patch b/patches/omap_fixes/0004-OMAP2-UART-replace-omap34xx-omap4xx-cpu-checks-with-.patch similarity index 73% rename from patches/omap/0003-OMAP2-UART-replace-omap34xx-omap4xx-cpu-checks-with-.patch rename to patches/omap_fixes/0004-OMAP2-UART-replace-omap34xx-omap4xx-cpu-checks-with-.patch index f2358bf5232630039a73cd39e57725b2d8228aa3..dfbcf52e014d7ec3320df54c554790a3af656f1b 100644 --- a/patches/omap/0003-OMAP2-UART-replace-omap34xx-omap4xx-cpu-checks-with-.patch +++ b/patches/omap_fixes/0004-OMAP2-UART-replace-omap34xx-omap4xx-cpu-checks-with-.patch @@ -1,7 +1,7 @@ -From d1fbc55e2125ef337ebbcd634630d9967bcd6f4f Mon Sep 17 00:00:00 2001 +From 6f5b9920e0107e8b4f2ae2775dc4148782aa4c9f Mon Sep 17 00:00:00 2001 From: "Govindraj.R" <govindraj.raja@ti.com> Date: Wed, 21 Mar 2012 15:55:01 +0530 -Subject: [PATCH 3/3] OMAP2+: UART: replace omap34xx/omap4xx cpu checks with +Subject: [PATCH 4/5] OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx Minor cleanup, replace all omap34xx/omap44xx cpu checks with @@ -13,13 +13,13 @@ Cc: Kevin Hilman <khilman@ti.com> Signed-off-by: Govindraj.R <govindraj.raja@ti.com> --- arch/arm/mach-omap2/serial.c | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) + 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c -index bf8ca00..d628c2f 100644 +index d99df9c..987087d 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c -@@ -377,8 +377,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata, +@@ -263,8 +263,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata, oh->dev_attr = uart; @@ -30,5 +30,5 @@ index bf8ca00..d628c2f 100644 } -- -1.7.9.1 +1.7.10 diff --git a/patches/omap/0001-mfd-cpu_is_omap3430-wasnt-defined.patch b/patches/omap_fixes/0005-mfd-cpu_is_omap3430-wasnt-defined.patch similarity index 72% rename from patches/omap/0001-mfd-cpu_is_omap3430-wasnt-defined.patch rename to patches/omap_fixes/0005-mfd-cpu_is_omap3430-wasnt-defined.patch index 2d50e690a54a0c45572bfb04fadb5092992f2f92..4bc67edbd9354f2e9e0bf93b00b197e680e5b0c1 100644 --- a/patches/omap/0001-mfd-cpu_is_omap3430-wasnt-defined.patch +++ b/patches/omap_fixes/0005-mfd-cpu_is_omap3430-wasnt-defined.patch @@ -1,15 +1,15 @@ -From e87584e251f0aab5eab415eaf521b1fcc9de7c90 Mon Sep 17 00:00:00 2001 +From 8d52176da3a662e82995b947655bd5e057a3b58c Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Tue, 27 Mar 2012 20:56:03 -0500 -Subject: [PATCH] mfd: cpu_is_omap3430 wasnt defined +Subject: [PATCH 5/5] mfd: cpu_is_omap3430 wasnt defined Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- drivers/mfd/omap-usb-host.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c -index 9927129..95e5d7d 100644 +index c8aae66..7da9496 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c @@ -26,6 +26,7 @@ @@ -21,5 +21,5 @@ index 9927129..95e5d7d 100644 #define USBHS_DRIVER_NAME "usbhs_omap" -- -1.7.9.1 +1.7.10 diff --git a/patches/panda/0001-panda-fix-wl12xx-regulator.patch b/patches/panda/0001-panda-fix-wl12xx-regulator.patch index acfa897c25c80786805e9e930577c2f3ede92d87..d0d95182b1b2b9d23ad5e1d6346bcfc22d5f15a5 100644 --- a/patches/panda/0001-panda-fix-wl12xx-regulator.patch +++ b/patches/panda/0001-panda-fix-wl12xx-regulator.patch @@ -1,20 +1,20 @@ -From 996501f0f6f5cb28c6988af9f0883146c47d8c29 Mon Sep 17 00:00:00 2001 +From 4223f49a4e393c4d3fe3ee51815dec88d89ffb6a Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Tue, 2 Aug 2011 21:55:34 -0500 -Subject: [PATCH] panda: fix wl12xx regulator +Subject: [PATCH 1/3] panda: fix wl12xx regulator pulled from: http://elinux.org/Panda_How_to_kernel_3_0_rel Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- arch/arm/mach-omap2/twl-common.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c -index 10b20c6..5a1f23a 100644 +index 7a7b893..1d0db53 100644 --- a/arch/arm/mach-omap2/twl-common.c +++ b/arch/arm/mach-omap2/twl-common.c -@@ -281,6 +281,7 @@ static struct regulator_init_data omap4_vusb_idata = { +@@ -307,6 +307,7 @@ static struct regulator_init_data omap4_vusb_idata = { static struct regulator_init_data omap4_clk32kg_idata = { .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS, @@ -23,5 +23,5 @@ index 10b20c6..5a1f23a 100644 }; -- -1.7.9.1 +1.7.10 diff --git a/patches/panda/0001-panda-enable-bluetooth.patch b/patches/panda/0002-panda-enable-bluetooth.patch similarity index 91% rename from patches/panda/0001-panda-enable-bluetooth.patch rename to patches/panda/0002-panda-enable-bluetooth.patch index c3e68baa90ba00a6bb6b2bd48ae2ff2f83d6b7dd..588aaa9f60c7e04ad4b18c6ecb8696e614e28112 100644 --- a/patches/panda/0001-panda-enable-bluetooth.patch +++ b/patches/panda/0002-panda-enable-bluetooth.patch @@ -1,10 +1,10 @@ -From eed577b1f14ecd218a828d497145e377af5ed473 Mon Sep 17 00:00:00 2001 +From f8be41ffee54bdbd62bd6bcfe910dec45f5836cb Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Fri, 16 Mar 2012 10:23:09 -0500 -Subject: [PATCH] panda enable bluetooth +Subject: [PATCH 2/3] panda enable bluetooth The PandaBoard features a Texas Instruments WiLink7 Bluetooth -chip, supported by the "btwilink" driver. The "uim" deamon +chip, supported by the "btwilink" driver. The "uim" deamon requires sysfs entries that are filled in using this platform data. Signed-off-by: Mircea Gherzan <mgherzan@gmail.com> @@ -64,5 +64,5 @@ index 2ef4385..3ca0269 100644 * enum proto-type - The protocol on WiLink chips which share a * common physical interface like UART. -- -1.7.9.5 +1.7.10 diff --git a/patches/panda/0001-ti-st-st-kim-fixing-firmware-path.patch b/patches/panda/0003-ti-st-st-kim-fixing-firmware-path.patch similarity index 87% rename from patches/panda/0001-ti-st-st-kim-fixing-firmware-path.patch rename to patches/panda/0003-ti-st-st-kim-fixing-firmware-path.patch index 1535c9f38752a4526aaca7393555954f6efefdda..e7dc44adcc1b6f949377858f127970fd9588b7e6 100644 --- a/patches/panda/0001-ti-st-st-kim-fixing-firmware-path.patch +++ b/patches/panda/0003-ti-st-st-kim-fixing-firmware-path.patch @@ -1,13 +1,13 @@ -From 65dcc2d989e63b9a2f9269d2eae7e04a2378d993 Mon Sep 17 00:00:00 2001 +From e6606f579765adbbb5f5776b4a53875ecad340b5 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti de Araujo <ricardo.salveti@linaro.org> Date: Tue, 25 Oct 2011 10:06:39 +0200 -Subject: [PATCH] ti-st/st-kim: fixing firmware path +Subject: [PATCH 3/3] ti-st/st-kim: fixing firmware path Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@linaro.org> Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- drivers/misc/ti-st/st_kim.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index 7c14f8f..bbbc058 100644 @@ -32,5 +32,5 @@ index 7c14f8f..bbbc058 100644 int cmd_size; unsigned long timeout; -- -1.7.9.1 +1.7.10 diff --git a/patches/sakoman/2.6.39/0006-OMAP-DSS2-add-bootarg-for-selecting-svideo-or-compos.patch b/patches/sakoman/0001-OMAP-DSS2-add-bootarg-for-selecting-svideo.patch similarity index 84% rename from patches/sakoman/2.6.39/0006-OMAP-DSS2-add-bootarg-for-selecting-svideo-or-compos.patch rename to patches/sakoman/0001-OMAP-DSS2-add-bootarg-for-selecting-svideo.patch index 1ae7e7532b15f3836e83c43943c7a1047038ae5a..64539e31004901b553f2fc3d4d8fde30e7bd263f 100644 --- a/patches/sakoman/2.6.39/0006-OMAP-DSS2-add-bootarg-for-selecting-svideo-or-compos.patch +++ b/patches/sakoman/0001-OMAP-DSS2-add-bootarg-for-selecting-svideo.patch @@ -1,7 +1,7 @@ -From 4ff5659999bff3fe105ea9f8c39326e8f85840a2 Mon Sep 17 00:00:00 2001 +From 6cf2b8e06173c45cf65a43081718994f4202c9dc Mon Sep 17 00:00:00 2001 From: Steve Sakoman <steve@sakoman.com> Date: Tue, 19 Jan 2010 21:19:15 -0800 -Subject: [PATCH 06/87] OMAP: DSS2: add bootarg for selecting svideo +Subject: [PATCH 1/3] OMAP: DSS2: add bootarg for selecting svideo OMAP: DSS2: add bootarg for selecting svideo or composite for tv output also add pal-16 and ntsc-16 omapfb.mode settings for 16bpp @@ -10,10 +10,10 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- drivers/video/omap2/dss/venc.c | 22 ++++++++++++++++++++++ drivers/video/omap2/omapfb/omapfb-main.c | 10 +++++++++- - 2 files changed, 31 insertions(+), 1 deletions(-) + 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c -index 7533458..b404095 100644 +index 9c3daf7..75dd2dc 100644 --- a/drivers/video/omap2/dss/venc.c +++ b/drivers/video/omap2/dss/venc.c @@ -87,6 +87,11 @@ @@ -28,7 +28,7 @@ index 7533458..b404095 100644 struct venc_config { u32 f_control; u32 vidout_ctrl; -@@ -474,6 +479,23 @@ static int venc_panel_probe(struct omap_dss_device *dssdev) +@@ -490,6 +495,23 @@ static int venc_panel_probe(struct omap_dss_device *dssdev) { dssdev->panel.timings = omap_dss_pal_timings; @@ -53,10 +53,10 @@ index 7533458..b404095 100644 } diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c -index 70aa47d..dd27b00 100644 +index b00db40..bce8a4f 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c -@@ -2091,7 +2091,15 @@ static int omapfb_mode_to_timings(const char *mode_str, +@@ -2000,7 +2000,15 @@ static int omapfb_mode_to_timings(const char *mode_str, int r; #ifdef CONFIG_OMAP2_DSS_VENC @@ -74,5 +74,5 @@ index 70aa47d..dd27b00 100644 *bpp = 24; return 0; -- -1.7.9.1 +1.7.10 diff --git a/patches/sakoman/2.6.39/0007-video-add-timings-for-hd720.patch b/patches/sakoman/0002-video-add-timings-for-hd720.patch similarity index 78% rename from patches/sakoman/2.6.39/0007-video-add-timings-for-hd720.patch rename to patches/sakoman/0002-video-add-timings-for-hd720.patch index 20c352732a57147e1872205799bc595c78e36b1f..ba0460b0d277cd44fcc2219956f256a7d8859973 100644 --- a/patches/sakoman/2.6.39/0007-video-add-timings-for-hd720.patch +++ b/patches/sakoman/0002-video-add-timings-for-hd720.patch @@ -1,15 +1,15 @@ -From 8c40268db0c086856a2ad1a12b6c55fe57ceda84 Mon Sep 17 00:00:00 2001 +From 772b77bbbcef683dd578d94b51661360a2d0fc22 Mon Sep 17 00:00:00 2001 From: Steve Sakoman <steve@sakoman.com> Date: Sat, 19 Dec 2009 06:52:43 -0800 -Subject: [PATCH 07/87] video: add timings for hd720 +Subject: [PATCH 2/3] video: add timings for hd720 Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- drivers/video/modedb.c | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c -index bbe75c5..69ad1ec 100644 +index a9a907c..5b686de 100644 --- a/drivers/video/modedb.c +++ b/drivers/video/modedb.c @@ -103,6 +103,10 @@ static const struct fb_videomode modedb[] = { @@ -24,5 +24,5 @@ index bbe75c5..69ad1ec 100644 { NULL, 87, 1280, 1024, 12500, 56, 16, 128, 1, 216, 12, 0, FB_VMODE_INTERLACED }, -- -1.7.9.1 +1.7.10 diff --git a/patches/sakoman/2.6.39/0025-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch b/patches/sakoman/0003-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch similarity index 71% rename from patches/sakoman/2.6.39/0025-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch rename to patches/sakoman/0003-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch index 718c47480fa7b847d00e669f3217843e8ed96ea7..88ae834d8b55b17faccdc8f6a330e266cc671481 100644 --- a/patches/sakoman/2.6.39/0025-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch +++ b/patches/sakoman/0003-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch @@ -1,7 +1,7 @@ -From 95e72c69bb7afd873eee463ba5be2378545d15cd Mon Sep 17 00:00:00 2001 +From c6cb0de46a8ae91273fcd18397bd08d20f44f97c Mon Sep 17 00:00:00 2001 From: Steve Sakoman <steve@sakoman.com> Date: Wed, 12 Jan 2011 05:54:55 -0800 -Subject: [PATCH 25/87] omap: mmc: Adjust dto to eliminate timeout errors +Subject: [PATCH 3/3] omap: mmc: Adjust dto to eliminate timeout errors A number of SD card types were experiencing timeout errors. This could also lead to data corruption in some cases. @@ -11,13 +11,13 @@ This fix proposed by Sukumar Ghoral of TI. Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- drivers/mmc/host/omap_hsmmc.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c -index d5fe43d..f190d63 100644 +index 56d4499..819488f 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c -@@ -1513,6 +1513,7 @@ static void set_data_timeout(struct omap_hsmmc_host *host, +@@ -1376,6 +1376,7 @@ static void set_data_timeout(struct omap_hsmmc_host *host, cycle_ns = 1000000000 / (clk_get_rate(host->fclk) / clkd); timeout = timeout_ns / cycle_ns; timeout += timeout_clks; @@ -26,5 +26,5 @@ index d5fe43d..f190d63 100644 while ((timeout & 0x80000000) == 0) { dto += 1; -- -1.7.9.1 +1.7.10 diff --git a/patches/touchbook/0001-omap3-touchbook-remove-mmc-gpio_wp.patch b/patches/touchbook/0001-omap3-touchbook-remove-mmc-gpio_wp.patch deleted file mode 100644 index 189c42fe12ef132a3caba8220fbe6ddfbef2994a..0000000000000000000000000000000000000000 --- a/patches/touchbook/0001-omap3-touchbook-remove-mmc-gpio_wp.patch +++ /dev/null @@ -1,39 +0,0 @@ -From a276d3394379c8f9f5c45597d5f7807d2279800d Mon Sep 17 00:00:00 2001 -From: Robert Nelson <robertcnelson@gmail.com> -Date: Fri, 25 Feb 2011 10:41:07 -0600 -Subject: [PATCH 1/4] omap3: touchbook: remove mmc gpio_wp - -Signed-off-by: Robert Nelson <robertcnelson@gmail.com> ---- - arch/arm/mach-omap2/board-omap3touchbook.c | 8 +------- - 1 files changed, 1 insertions(+), 7 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c -index a2d0d19..6b4cd92 100644 ---- a/arch/arm/mach-omap2/board-omap3touchbook.c -+++ b/arch/arm/mach-omap2/board-omap3touchbook.c -@@ -99,7 +99,7 @@ static struct omap2_hsmmc_info mmc[] = { - { - .mmc = 1, - .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, -- .gpio_wp = 29, -+ .gpio_wp = -EINVAL, - }, - {} /* Terminator */ - }; -@@ -117,12 +117,6 @@ static struct gpio_led gpio_leds[]; - static int touchbook_twl_gpio_setup(struct device *dev, - unsigned gpio, unsigned ngpio) - { -- if (system_rev >= 0x20 && system_rev <= 0x34301000) { -- omap_mux_init_gpio(23, OMAP_PIN_INPUT); -- mmc[0].gpio_wp = 23; -- } else { -- omap_mux_init_gpio(29, OMAP_PIN_INPUT); -- } - /* gpio + 0 is "mmc0_cd" (input/IRQ) */ - mmc[0].gpio_cd = gpio + 0; - omap2_hsmmc_init(mmc); --- -1.7.9.1 - diff --git a/patches/touchbook/0001-touchbook-add-madc.patch b/patches/touchbook/0001-touchbook-add-madc.patch deleted file mode 100644 index f0cc767ab6ad0e6841bfcc2dd08dc439dc9d7f1a..0000000000000000000000000000000000000000 --- a/patches/touchbook/0001-touchbook-add-madc.patch +++ /dev/null @@ -1,44 +0,0 @@ -From e5a2dc7fc75d1855f533bfd69e0afb6b79ab3447 Mon Sep 17 00:00:00 2001 -From: Robert Nelson <robertcnelson@gmail.com> -Date: Thu, 14 Jul 2011 11:52:55 -0500 -Subject: [PATCH 1/2] touchbook: add madc - -Signed-off-by: Robert Nelson <robertcnelson@gmail.com> ---- - arch/arm/mach-omap2/board-omap3touchbook.c | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c -index c05b747..3bc27ae 100644 ---- a/arch/arm/mach-omap2/board-omap3touchbook.c -+++ b/arch/arm/mach-omap2/board-omap3touchbook.c -@@ -21,6 +21,7 @@ - #include <linux/io.h> - #include <linux/leds.h> - #include <linux/gpio.h> -+#include <linux/irq.h> - #include <linux/input.h> - #include <linux/gpio_keys.h> - -@@ -240,6 +241,10 @@ static struct twl4030_codec_data touchbook_codec_data = { - .audio = &touchbook_audio_data, - }; - -+static struct twl4030_madc_platform_data touchbook_madc_data = { -+ .irq_line = 1, -+}; -+ - static struct twl4030_platform_data touchbook_twldata = { - .irq_base = TWL4030_IRQ_BASE, - .irq_end = TWL4030_IRQ_END, -@@ -248,6 +253,7 @@ static struct twl4030_platform_data touchbook_twldata = { - .usb = &touchbook_usb_data, - .gpio = &touchbook_gpio_data, - .codec = &touchbook_codec_data, -+ .madc = &touchbook_madc_data, - .vmmc1 = &touchbook_vmmc1, - .vsim = &touchbook_vsim, - .vdac = &touchbook_vdac, --- -1.7.4.1 - diff --git a/patches/touchbook/0002-omap3-touchbook-drop-u-boot-readonly.patch b/patches/touchbook/0002-omap3-touchbook-drop-u-boot-readonly.patch deleted file mode 100644 index 5ccccab8463307ecdb817e8a7c37b185dd2d77f3..0000000000000000000000000000000000000000 --- a/patches/touchbook/0002-omap3-touchbook-drop-u-boot-readonly.patch +++ /dev/null @@ -1,25 +0,0 @@ -From cc7ae582fb0bf7f56c37a00edc92cf6abea66893 Mon Sep 17 00:00:00 2001 -From: Robert Nelson <robertcnelson@gmail.com> -Date: Fri, 25 Feb 2011 11:32:37 -0600 -Subject: [PATCH 2/4] omap3: touchbook: drop u-boot readonly - -Signed-off-by: Robert Nelson <robertcnelson@gmail.com> ---- - arch/arm/mach-omap2/board-omap3touchbook.c | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c -index 6b4cd92..5d209c1 100644 ---- a/arch/arm/mach-omap2/board-omap3touchbook.c -+++ b/arch/arm/mach-omap2/board-omap3touchbook.c -@@ -74,7 +74,6 @@ static struct mtd_partition omap3touchbook_nand_partitions[] = { - .name = "U-Boot", - .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */ - .size = 15 * NAND_BLOCK_SIZE, -- .mask_flags = MTD_WRITEABLE, /* force read-only */ - }, - { - .name = "U-Boot Env", --- -1.7.9.1 - diff --git a/patches/touchbook/0002-touchbook-add-twl4030-bci-battery.patch b/patches/touchbook/0002-touchbook-add-twl4030-bci-battery.patch deleted file mode 100644 index 64704a79775a20deb1fb43d1e424562ce7f37b3b..0000000000000000000000000000000000000000 --- a/patches/touchbook/0002-touchbook-add-twl4030-bci-battery.patch +++ /dev/null @@ -1,41 +0,0 @@ -From d41c0e5bad83be87224c68b747c850bb9913ff2f Mon Sep 17 00:00:00 2001 -From: Robert Nelson <robertcnelson@gmail.com> -Date: Thu, 14 Jul 2011 11:56:04 -0500 -Subject: [PATCH 2/2] touchbook: add twl4030 bci battery - -Signed-off-by: Robert Nelson <robertcnelson@gmail.com> ---- - arch/arm/mach-omap2/board-omap3touchbook.c | 10 ++++++++++ - 1 files changed, 10 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c -index 3bc27ae..9fb1d5c 100644 ---- a/arch/arm/mach-omap2/board-omap3touchbook.c -+++ b/arch/arm/mach-omap2/board-omap3touchbook.c -@@ -245,6 +245,15 @@ static struct twl4030_madc_platform_data touchbook_madc_data = { - .irq_line = 1, - }; - -+static struct twl4030_bci_platform_data touchbook_bci_data = { -+ .tblsize = 0, -+ .no_backup_battery = 1, -+ .manufacturer = "Always Innovating", -+ .model_name = "Tablet 6000mAh v1.0", -+ .technology = POWER_SUPPLY_TECHNOLOGY_LIPO, -+ .energy_full_design = 6000, -+}; -+ - static struct twl4030_platform_data touchbook_twldata = { - .irq_base = TWL4030_IRQ_BASE, - .irq_end = TWL4030_IRQ_END, -@@ -258,6 +267,7 @@ static struct twl4030_platform_data touchbook_twldata = { - .vsim = &touchbook_vsim, - .vdac = &touchbook_vdac, - .vpll2 = &touchbook_vpll2, -+ .bci = &touchbook_bci_data, - }; - - static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = { --- -1.7.4.1 - diff --git a/patches/touchbook/board-omap3touchbook.c.3.0.0 b/patches/touchbook/board-omap3touchbook.c.3.0.0 deleted file mode 100644 index d660fd2218dfb3f42f5b7c84013dfa286d2906a2..0000000000000000000000000000000000000000 --- a/patches/touchbook/board-omap3touchbook.c.3.0.0 +++ /dev/null @@ -1,650 +0,0 @@ -/* - * linux/arch/arm/mach-omap2/board-omap3touchbook.c - * This file supports the Touch Book v1 (board rev - * A1/B1/C1), as well as Touch Book v2 or Smart Book - * (board rev rev D5). - * - * linux/arch/arm/mach-omap2/board-omap3touchbook.c - * - * Copyright (C) 2009-2010 Always Innovating - * - * Modified from mach-omap2/board-omap3beagleboard.c - * - * Code: Grégoire Gentil, Tim Yamin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/delay.h> -#include <linux/err.h> -#include <linux/clk.h> -#include <linux/io.h> -#include <linux/leds.h> -#include <linux/gpio.h> -#include <linux/irq.h> -#include <linux/input.h> -#include <linux/gpio_keys.h> - -#include <linux/mtd/mtd.h> -#include <linux/mtd/partitions.h> -#include <linux/mtd/nand.h> -#include <linux/mmc/host.h> - -#include <plat/mcspi.h> -#include <linux/spi/spi.h> - -#include <linux/spi/ads7846.h> -#include <linux/mma7455l.h> -#include <linux/regulator/machine.h> -#include <linux/i2c/twl.h> -#include <linux/i2c/chacha.h> -#include <linux/i2c/bq27x00.h> -#include <linux/i2c-gpio.h> -#include <mach/hardware.h> -#include <asm/mach-types.h> -#include <asm/mach/arch.h> -#include <asm/mach/map.h> -#include <asm/mach/flash.h> - -#include <plat/board.h> -#include <plat/common.h> -#include <plat/display.h> -#include <plat/gpmc.h> -#include <plat/nand.h> -#include <plat/usb.h> -#include <plat/timer-gp.h> -#include <plat/clock.h> -#include <plat/omap-pm.h> - -#include "mux.h" -#include "hsmmc.h" -#include "timer-gp.h" -#include "common-board-devices.h" - -#include "pm.h" -#include "omap3-opp.h" -#include <asm/setup.h> -#include <plat/dmtimer.h> -#include <linux/backlight.h> - -#ifdef CONFIG_PANEL_SIL9022 -#include <mach/sil9022.h> -#endif - -#define OMAP3_AC_GPIO 136 -#define OMAP3_TS_GPIO 162 -#define TB_BL_PWM_TIMER 9 -#define TB_KILL_POWER_GPIO 168 - -static unsigned long touchbook_revision; - -static struct mtd_partition omap3touchbook_nand_partitions[] = { - /* All the partition sizes are listed in terms of NAND block size */ - { - .name = "X-Loader", - .offset = 0, - .size = 4 * NAND_BLOCK_SIZE, - .mask_flags = MTD_WRITEABLE, /* force read-only */ - }, - { - .name = "U-Boot", - .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */ - .size = 15 * NAND_BLOCK_SIZE, - }, - { - .name = "U-Boot Env", - .offset = MTDPART_OFS_APPEND, /* Offset = 0x260000 */ - .size = 1 * NAND_BLOCK_SIZE, - }, - { - .name = "Kernel", - .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */ - .size = 32 * NAND_BLOCK_SIZE, - }, - { - .name = "File System", - .offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */ - .size = MTDPART_SIZ_FULL, - }, -}; - -#include "sdram-micron-mt46h32m32lf-6.h" - -static struct omap2_hsmmc_info mmc[] = { - { - .mmc = 1, - .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, - .gpio_wp = -EINVAL, - }, - {} /* Terminator */ -}; - -static struct omap_dss_device *touchbook_dss_devices[] = { - &touchbook_dvi_device, -}; - -static struct omap_dss_board_info touchbook_dss_data = { - .num_devices = ARRAY_SIZE(touchbook_dss_devices), - .devices = touchbook_dss_devices, - .default_device = &touchbook_dvi_device, -}; - -static struct platform_device touchbook_dss_device = { - .name = "omapdss", - .id = -1, - .dev = { - .platform_data = &touchbook_dss_data, - }, -}; - -static void __init touchbook_display_init(void) -{ - int r; - - r = gpio_request(touchbook_dvi_device.reset_gpio, "DVI reset"); - if (r < 0) { - printk(KERN_ERR "Unable to get DVI reset GPIO\n"); - return; - } - - gpio_direction_output(touchbook_dvi_device.reset_gpio, 0); -} - -static struct regulator_consumer_supply touchbook_vmmc1_supply = { - .supply = "vmmc", -}; - -static struct regulator_consumer_supply touchbook_vsim_supply = { - .supply = "vmmc_aux", -}; - -static struct gpio_led gpio_leds[]; - -static int touchbook_twl_gpio_setup(struct device *dev, - unsigned gpio, unsigned ngpio) -{ - /* gpio + 0 is "mmc0_cd" (input/IRQ) */ - mmc[0].gpio_cd = gpio + 0; - omap2_hsmmc_init(mmc); - - /* link regulators to MMC adapters */ - touchbook_vmmc1_supply.dev = mmc[0].dev; - touchbook_vsim_supply.dev = mmc[0].dev; - - return 0; -} - -static struct twl4030_gpio_platform_data touchbook_gpio_data = { - .gpio_base = OMAP_MAX_GPIO_LINES, - .irq_base = TWL4030_GPIO_IRQ_BASE, - .irq_end = TWL4030_GPIO_IRQ_END, - .use_leds = true, - .pullups = BIT(1), - .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13) - | BIT(15) | BIT(16) | BIT(17), - .setup = touchbook_twl_gpio_setup, -}; - -static struct regulator_consumer_supply touchbook_vdac_supply = { - .supply = "vdda_dac", - .dev = &omap3_touchbook_lcd_device.dev, -}; - -static struct regulator_consumer_supply touchbook_vdvi_supply = { - .supply = "vdds_dsi", - .dev = &omap3_touchbook_lcd_device.dev, -}; - -/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ -static struct regulator_init_data touchbook_vmmc1 = { - .constraints = { - .min_uV = 1850000, - .max_uV = 3150000, - .valid_modes_mask = REGULATOR_MODE_NORMAL - | REGULATOR_MODE_STANDBY, - .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE - | REGULATOR_CHANGE_MODE - | REGULATOR_CHANGE_STATUS, - }, - .num_consumer_supplies = 1, - .consumer_supplies = &touchbook_vmmc1_supply, -}; - -/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ -static struct regulator_init_data touchbook_vsim = { - .constraints = { - .min_uV = 1800000, - .max_uV = 3000000, - .valid_modes_mask = REGULATOR_MODE_NORMAL - | REGULATOR_MODE_STANDBY, - .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE - | REGULATOR_CHANGE_MODE - | REGULATOR_CHANGE_STATUS, - }, - .num_consumer_supplies = 1, - .consumer_supplies = &touchbook_vsim_supply, -}; - -/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */ -static struct regulator_init_data touchbook_vdac = { - .constraints = { - .min_uV = 1800000, - .max_uV = 1800000, - .valid_modes_mask = REGULATOR_MODE_NORMAL - | REGULATOR_MODE_STANDBY, - .valid_ops_mask = REGULATOR_CHANGE_MODE - | REGULATOR_CHANGE_STATUS, - }, - .num_consumer_supplies = 1, - .consumer_supplies = &touchbook_vdac_supply, -}; - -/* VPLL2 for digital video outputs */ -static struct regulator_init_data touchbook_vpll2 = { - .constraints = { - .name = "VDVI", - .min_uV = 1800000, - .max_uV = 1800000, - .valid_modes_mask = REGULATOR_MODE_NORMAL - | REGULATOR_MODE_STANDBY, - .valid_ops_mask = REGULATOR_CHANGE_MODE - | REGULATOR_CHANGE_STATUS, - }, - .num_consumer_supplies = 1, - .consumer_supplies = &touchbook_vdvi_supply, -}; - -static struct twl4030_usb_data touchbook_usb_data = { - .usb_mode = T2_USB_MODE_ULPI, -}; - -static struct twl4030_codec_audio_data touchbook_audio_data; - -static struct twl4030_codec_data touchbook_codec_data = { - .audio_mclk = 26000000, - .audio = &touchbook_audio_data, -}; - -static struct twl4030_madc_platform_data touchbook_madc_data = { - .irq_line = 1, -}; - -static struct twl4030_bci_platform_data touchbook_bci_data = { - .tblsize = 0, - .no_backup_battery = 1, - .manufacturer = "Always Innovating", - .model_name = "Tablet 6000mAh v1.0", - .technology = POWER_SUPPLY_TECHNOLOGY_LIPO, - .energy_full_design = 6000, -}; - -static struct twl4030_platform_data touchbook_twldata = { - .irq_base = TWL4030_IRQ_BASE, - .irq_end = TWL4030_IRQ_END, - - /* platform_data for children goes here */ - .usb = &touchbook_usb_data, - .gpio = &touchbook_gpio_data, - .codec = &touchbook_codec_data, - .madc = &touchbook_madc_data, - .vmmc1 = &touchbook_vmmc1, - .vsim = &touchbook_vsim, - .vdac = &touchbook_vdac, - .vpll2 = &touchbook_vpll2, - .bci = &touchbook_bci_data, -}; - -static struct i2c_board_info __initdata touchbook_i2c_boardinfo_1[] = { - { - I2C_BOARD_INFO("twl4030", 0x48), - .flags = I2C_CLIENT_WAKE, - .irq = INT_34XX_SYS_NIRQ, - .platform_data = &touchbook_twldata, - }, -}; - -static struct bq27x00_platform_data touchbook_bq27200_data = { - .manufacturer = "Always Innovating", - .model_name = "Keyboard 12000mAh v1.0", - .technology = POWER_SUPPLY_TECHNOLOGY_LIPO, - .energy_full_design = 12000, - .voltage_discharging_full = 3900, - .voltage_discharging_empty = 2900, - .current_charging_full = 250, - .current_charging_empty = 1200, -}; - -static struct chacha_platform_data touchbook_chacha_t_data = { - .gpio = 155, - .version = 3, - .name = "Touchscreen Chacha Tablet", - .minX = 128, - .maxX = 17230, - .minY = 55555, - .maxY = 65300, -}; - -static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = { - { - I2C_BOARD_INFO("bq27200", 0x55), - .platform_data = &touchbook_bq27200_data, - }, - { - I2C_BOARD_INFO("chacha", 0x40), - .irq = OMAP_GPIO_IRQ(155), - .platform_data = &touchbook_chacha_t_data, - }, - { - I2C_BOARD_INFO("ds1307", 0x68), - }, -}; - -static int __init omap3_touchbook_i2c_init(void) -{ - int ret; - - /* Standard TouchBook bus */ - omap_register_i2c_bus(1, 2600, touchbook_i2c_boardinfo_1, ARRAY_SIZE(touchbook_i2c_boardinfo_1)); - - /* Additional TouchBook bus */ - omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo, - ARRAY_SIZE(touchBook_i2c_boardinfo)); - - ret = gpio_request_one(touchbook_chacha_t_data.gpio, GPIOF_IN, "chacha_t"); - if (ret < 0) { - printk(KERN_ERR "Failed to request GPIO %d for chacha_t IRQ\n", touchbook_chacha_t_data.gpio); - return 0; - } - - return 0; -} - -static struct ads7846_platform_data ads7846_pdata = { - .x_min = 100, - .y_min = 265, - .x_max = 3950, - .y_max = 3750, - .x_plate_ohms = 40, - .pressure_max = 255, - .debounce_max = 10, - .debounce_tol = 5, - .debounce_rep = 1, - .gpio_pendown = OMAP3_TS_GPIO, - .keep_vref_on = 1, -}; - -static struct gpio_led gpio_leds[] = { - { - .name = "touchbook::usr0", - .default_trigger = "heartbeat", - .gpio = 150, - }, - { - .name = "touchbook::usr1", - .default_trigger = "mmc0", - .gpio = 149, - }, -}; - -static struct gpio_led_platform_data gpio_led_info = { - .leds = gpio_leds, - .num_leds = ARRAY_SIZE(gpio_leds), -}; - -static struct platform_device leds_gpio = { - .name = "leds-gpio", - .id = -1, - .dev = { - .platform_data = &gpio_led_info, - }, -}; - -static struct gpio_keys_button gpio_buttons[] = { - { - .code = KEY_BACK, - .gpio = 7, - .desc = "user", - .wakeup = 1, - }, - { - .code = KEY_POWER, - .gpio = 183, - .desc = "power", - .wakeup = 1, - .active_low = 1, - }, -}; - -static struct gpio_keys_platform_data gpio_key_info = { - .buttons = gpio_buttons, - .nbuttons = ARRAY_SIZE(gpio_buttons), -}; - -static struct platform_device keys_gpio = { - .name = "gpio-keys", - .id = -1, - .dev = { - .platform_data = &gpio_key_info, - }, -}; - -#ifdef CONFIG_OMAP_MUX -static struct omap_board_mux board_mux[] __initdata = { - { .reg_offset = OMAP_MUX_TERMINATOR }, -}; -#endif - -static struct mma7455l_platform_data touchbook_mma7455l_config = { - .calibration_x = -4, - .calibration_y = 28, - .calibration_z = -28, - .axis_x = ABS_X, - .sign_x = 1, - .axis_y = ABS_Y, - .sign_y = 1, - .axis_z = ABS_Z, - .sign_z = 1, -}; - -static struct omap2_mcspi_device_config touchbook_mma7455l_mcspi_config = { - .turbo_mode = 0, - .single_channel = 1, /* 0: slave, 1: master */ -}; - -static struct spi_board_info __initdata touchbook_spi_board_info_3[] = { - { - .modalias = "mma7455l", - .bus_num = 3, - .chip_select = 0, - .max_speed_hz = 200000, - .irq = OMAP_GPIO_IRQ(136), - .controller_data = &touchbook_mma7455l_mcspi_config, - .platform_data = &touchbook_mma7455l_config, - } -}; - -static void __init touchbook_mma7455l_init(void) -{ - int ret; - int touchbook_mma7455l_gpio = 136; - - ret = gpio_request_one(touchbook_mma7455l_gpio, GPIOF_IN, "mma7455l"); - if (ret < 0) { - printk(KERN_ERR "Failed to request GPIO %d for mma7455l IRQ\n", touchbook_mma7455l_gpio); - return; - } -} - -static void __init omap3_touchbook_init_early(void) -{ - omap2_init_common_infrastructure(); - omap2_init_common_devices(mt46h32m32lf6_sdrc_params, - mt46h32m32lf6_sdrc_params); -} - -static void __init omap3_touchbook_init_irq(void) -{ - omap_init_irq(); -#ifdef CONFIG_OMAP_32K_TIMER - omap2_gp_clockevent_set_gptimer(12); -#endif -} - -static struct platform_device *omap3_touchbook_devices[] __initdata = { - &leds_gpio, - &keys_gpio, - &touchbook_dss_device, -}; - -static int touchbook_backlight_brightness = 50; -static struct omap_dm_timer *touchbook_backlight_pwm; - -static int touchbook_backlight_read(struct backlight_device *bd) -{ - return touchbook_backlight_brightness; -} - -static int touchbook_backlight_update(struct backlight_device *bd) -{ - int value = bd->props.brightness; - touchbook_backlight_brightness = value; - - /* Frequency calculation: - - For 200Hz PWM, you want to load -164 (=> -32768Hz / 200Hz). - - Minimum duty cycle for the backlight is 15%. - - You have (164*0.85) => ~140 levels of brightness. - */ - - /* Halve input brightness */ - if (!bd->props.boost) - value /= 2; - - /* For maximum brightness, just stop the timer... */ - if(value != bd->props.max_brightness) - { - /* Load the appropriate value for 200Hz PWM */ - u32 period = clk_get_rate(omap_dm_timer_get_fclk(touchbook_backlight_pwm)) / bd->props.pwm_fq; - - /* Minimum duty cycle is 15% */ - u32 minimum = (period * bd->props.min_duty) / 100; - u32 maximum = (period * 17) / 20; - - /* Work out match value */ - u32 match = (maximum * value) / 100; - - /* Start... */ - omap_dm_timer_set_load(touchbook_backlight_pwm, 1, 0xFFFFFFFF - period - 1); - omap_dm_timer_set_match(touchbook_backlight_pwm, 1, 0xFFFFFFFF - minimum - match); - omap_dm_timer_write_counter(touchbook_backlight_pwm, -1); - omap_dm_timer_start(touchbook_backlight_pwm); - } - else - omap_dm_timer_stop(touchbook_backlight_pwm); - - - return 0; -} - -static struct backlight_ops touchbook_backlight_properties = { - .get_brightness = touchbook_backlight_read, - .update_status = touchbook_backlight_update, -}; - -static const struct usbhs_omap_board_data usbhs_bdata __initconst = { - - .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, - .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, - .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, - - .phy_reset = true, - .reset_gpio_port[0] = -EINVAL, - .reset_gpio_port[1] = 147, - .reset_gpio_port[2] = -EINVAL -}; - -static void __init touchbook_backlight_init(void) -{ - static struct backlight_device *bd; - int touchbook_bl_pwm_timer = 9; - bd = backlight_device_register("touchbook", NULL, NULL, &touchbook_backlight_properties); - - if(bd) - { - touchbook_backlight_pwm = omap_dm_timer_request_specific(touchbook_bl_pwm_timer); - omap_dm_timer_enable(touchbook_backlight_pwm); - omap_dm_timer_set_source(touchbook_backlight_pwm, OMAP_TIMER_SRC_SYS_CLK); - omap_dm_timer_set_pwm(touchbook_backlight_pwm, 1, 1, OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE); - - bd->props.max_brightness = 100; - bd->props.brightness = touchbook_backlight_brightness; - bd->props.boost = 0; - bd->props.min_duty = 15; - bd->props.pwm_fq = 200; - } - - touchbook_backlight_update(bd); -} - -static void omap3_touchbook_poweroff(void) -{ - int pwr_off = TB_KILL_POWER_GPIO; - - if (gpio_request_one(pwr_off, GPIOF_OUT_INIT_LOW, "DVI reset") < 0) - printk(KERN_ERR "Unable to get kill power GPIO\n"); -} - -static int __init early_touchbook_revision(char *p) -{ - if (!p) - return 0; - - return strict_strtoul(p, 10, &touchbook_revision); -} -early_param("tbr", early_touchbook_revision); - -static void __init omap3_touchbook_init(void) -{ - omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); - - pm_power_off = omap3_touchbook_poweroff; - - omap3_touchbook_i2c_init(); - platform_add_devices(omap3_touchbook_devices, - ARRAY_SIZE(omap3_touchbook_devices)); - omap_serial_init(); - - /* Touchscreen and accelerometer */ - omap_ads7846_init(4, OMAP3_TS_GPIO, 310, &ads7846_pdata); - usb_musb_init(NULL); - usbhs_init(&usbhs_bdata); - omap_nand_flash_init(NAND_BUSWIDTH_16, omap3touchbook_nand_partitions, - ARRAY_SIZE(omap3touchbook_nand_partitions)); - - /* Ensure SDRC pins are mux'd for self-refresh */ - omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); - omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); - - touchbook_display_init(); - touchbook_backlight_init(); - - /* Touchscreen and accelerometer */ - spi_register_board_info(touchbook_spi_board_info_3, ARRAY_SIZE(touchbook_spi_board_info_3)); - touchbook_mma7455l_init(); - -} - -MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board") - /* Maintainer: Gregoire Gentil - http://www.alwaysinnovating.com */ - .boot_params = 0x80000100, - .reserve = omap_reserve, - .map_io = omap3_map_io, - .init_early = omap3_touchbook_init_early, - .init_irq = omap3_touchbook_init_irq, - .init_machine = omap3_touchbook_init, - .timer = &omap_timer, -MACHINE_END diff --git a/patches/touchbook/board-omap3touchbook.c.always.2.6.32 b/patches/touchbook/board-omap3touchbook.c.always.2.6.32 deleted file mode 100644 index a5b7ec25823659ec2256132302b89db9ede7fa66..0000000000000000000000000000000000000000 --- a/patches/touchbook/board-omap3touchbook.c.always.2.6.32 +++ /dev/null @@ -1,804 +0,0 @@ -/* - * linux/arch/arm/mach-omap2/board-omap3touchbook.c - * This file supports the Touch Book v1 (board rev - * A1/B1/C1), as well as Touch Book v2 or Smart Book - * (board rev rev D5). - * - * linux/arch/arm/mach-omap2/board-omap3touchbook.c - * - * Copyright (C) 2009-2010 Always Innovating - * - * Modified from mach-omap2/board-omap3beagleboard.c - * - * Code: Grégoire Gentil, Tim Yamin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/delay.h> -#include <linux/err.h> -#include <linux/clk.h> -#include <linux/io.h> -#include <linux/leds.h> -#include <linux/gpio.h> -#include <linux/irq.h> -#include <linux/input.h> -#include <linux/gpio_keys.h> -#include <linux/mtd/mtd.h> -#include <linux/mtd/partitions.h> -#include <linux/mtd/nand.h> -#include <plat/mcspi.h> -#include <linux/spi/spi.h> -#include <linux/spi/ads7846.h> -#include <linux/mma7455l.h> -#include <linux/regulator/machine.h> -#include <linux/i2c/twl.h> -#include <linux/i2c/chacha.h> -#include <linux/i2c/bq27x00.h> -#include <linux/i2c-gpio.h> -#include <mach/hardware.h> -#include <asm/mach-types.h> -#include <asm/mach/arch.h> -#include <asm/mach/map.h> -#include <asm/mach/flash.h> -#include <plat/board.h> -#include <plat/common.h> -#include <plat/display.h> -#include <plat/gpmc.h> -#include <plat/nand.h> -#include <plat/usb.h> -#include <plat/timer-gp.h> -#include <plat/clock.h> -#include <plat/omap-pm.h> -#include "mux.h" -#include "mmc-twl4030.h" -#include "pm.h" -#include "omap3-opp.h" -#include <asm/setup.h> -#include <plat/dmtimer.h> -#include <linux/backlight.h> -#include "sdram-micron-mt46h32m32lf-6.h" - -#ifdef CONFIG_PANEL_SIL9022 -#include <mach/sil9022.h> -#endif - -#ifdef CONFIG_PM -static struct omap_opp * _omap35x_mpu_rate_table = omap35x_mpu_rate_table; -static struct omap_opp * _omap37x_mpu_rate_table = omap37x_mpu_rate_table; -static struct omap_opp * _omap35x_dsp_rate_table = omap35x_dsp_rate_table; -static struct omap_opp * _omap37x_dsp_rate_table = omap37x_dsp_rate_table; -static struct omap_opp * _omap35x_l3_rate_table = omap35x_l3_rate_table; -static struct omap_opp * _omap37x_l3_rate_table = omap37x_l3_rate_table; -#else /* CONFIG_PM */ -static struct omap_opp * _omap35x_mpu_rate_table = NULL; -static struct omap_opp * _omap37x_mpu_rate_table = NULL; -static struct omap_opp * _omap35x_dsp_rate_table = NULL; -static struct omap_opp * _omap37x_dsp_rate_table = NULL; -static struct omap_opp * _omap35x_l3_rate_table = NULL; -static struct omap_opp * _omap37x_l3_rate_table = NULL; -#endif /* CONFIG_PM */ - -unsigned long touchbook_revision = 2; - -static int __init revision_instance(char *str) -{ - if (!str) - return -EINVAL; - - touchbook_revision = simple_strtoul(str, NULL, 10); - - return 0; -} - -static ssize_t show_revision(struct device *dev, struct device_attribute *devattr, char *buf) -{ - return sprintf(buf, "%lu\n", touchbook_revision); -} -static DEVICE_ATTR(revision, S_IRUGO, show_revision, NULL); - -early_param("tbr", revision_instance); - -static struct mtd_partition touchbook_nand_partitions[] = { - /* All the partition sizes are listed in terms of NAND block size */ - { - .name = "X-Loader", - .offset = 0, - .size = 4 * SZ_128K, - .mask_flags = MTD_WRITEABLE, /* force read-only */ - }, - { - .name = "U-Boot", - .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */ - .size = 15 * SZ_128K, - }, - { - .name = "U-Boot Env", - .offset = MTDPART_OFS_APPEND, /* Offset = 0x260000 */ - .size = 1 * SZ_128K, - }, - { - .name = "Kernel", - .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */ - .size = 32 * SZ_128K, - }, - { - .name = "File System", - .offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */ - .size = MTDPART_SIZ_FULL, - }, -}; - -static struct omap_nand_platform_data touchbook_nand_data = { - .options = NAND_BUSWIDTH_16, - .parts = touchbook_nand_partitions, - .nr_parts = ARRAY_SIZE(touchbook_nand_partitions), - .dma_channel = -1, /* disable DMA in OMAP NAND driver */ - .nand_setup = NULL, - .dev_ready = NULL, -}; - -static struct resource touchbook_nand_resource = { - .flags = IORESOURCE_MEM, -}; - -static struct platform_device touchbook_nand_device = { - .name = "omap2-nand", - .id = -1, - .dev = { - .platform_data = &touchbook_nand_data, - }, - .num_resources = 1, - .resource = &touchbook_nand_resource, -}; - -static int touchbook_enable_dvi(struct omap_dss_device *dssdev) -{ - if (dssdev->reset_gpio != -1) - gpio_set_value(dssdev->reset_gpio, 1); - - return 0; -} - -static void touchbook_disable_dvi(struct omap_dss_device *dssdev) -{ - if (dssdev->reset_gpio != -1) - gpio_set_value(dssdev->reset_gpio, 0); -} - -static struct omap_dss_device touchbook_dvi_device = { - .type = OMAP_DISPLAY_TYPE_DPI, - .name = "dvi", - .driver_name = "generic_panel", - .phy.dpi.data_lines = 24, - .reset_gpio = 176, - .platform_enable = touchbook_enable_dvi, - .platform_disable = touchbook_disable_dvi, -}; - -static struct omap_dss_device *touchbook_dss_devices[] = { - &touchbook_dvi_device, -}; - -static struct omap_dss_board_info touchbook_dss_data = { - .num_devices = ARRAY_SIZE(touchbook_dss_devices), - .devices = touchbook_dss_devices, - .default_device = &touchbook_dvi_device, -}; - -static struct platform_device touchbook_dss_device = { - .name = "omapdss", - .id = -1, - .dev = { - .platform_data = &touchbook_dss_data, - }, -}; - -static struct regulator_consumer_supply touchbook_vdac_supply = { - .supply = "vdda_dac", - .dev = &touchbook_dss_device.dev, -}; - -static struct regulator_consumer_supply touchbook_vdvi_supply = { - .supply = "vdds_dsi", - .dev = &touchbook_dss_device.dev, -}; - -static void __init touchbook_display_init(void) -{ - int r; - - r = gpio_request(touchbook_dvi_device.reset_gpio, "DVI reset"); - if (r < 0) { - printk(KERN_ERR "Unable to get DVI reset GPIO\n"); - return; - } - - gpio_direction_output(touchbook_dvi_device.reset_gpio, 0); -} - -static struct twl4030_hsmmc_info touchbook_mmc[] = { - { - .mmc = 1, - .wires = 8, - }, - {} /* Terminator */ -}; - -static struct regulator_consumer_supply touchbook_vmmc1_supply = { - .supply = "vmmc", -}; - -static struct regulator_consumer_supply touchbook_vsim_supply = { - .supply = "vmmc_aux", -}; - -static struct gpio_led gpio_leds[]; - -static int touchbook_twl_gpio_setup(struct device *dev, - unsigned gpio, unsigned ngpio) -{ - /* gpio + 0 is "mmc0_cd" (input/IRQ) */ - touchbook_mmc[0].gpio_cd = gpio + 0; - twl4030_mmc_init(touchbook_mmc); - - /* link regulators to MMC adapters */ - touchbook_vmmc1_supply.dev = touchbook_mmc[0].dev; - touchbook_vsim_supply.dev = touchbook_mmc[0].dev; - - return 0; -} - -static struct twl4030_gpio_platform_data touchbook_gpio_data = { - .gpio_base = OMAP_MAX_GPIO_LINES, - .irq_base = TWL4030_GPIO_IRQ_BASE, - .irq_end = TWL4030_GPIO_IRQ_END, - .use_leds = true, - .pullups = BIT(1), - .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13) - | BIT(15) | BIT(16) | BIT(17), - .setup = touchbook_twl_gpio_setup, -}; - -/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ -static struct regulator_init_data touchbook_vmmc1 = { - .constraints = { - .min_uV = 1850000, - .max_uV = 3150000, - .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY, - .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, - }, - .num_consumer_supplies = 1, - .consumer_supplies = &touchbook_vmmc1_supply, -}; - -/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ -static struct regulator_init_data touchbook_vsim = { - .constraints = { - .min_uV = 1800000, - .max_uV = 3000000, - .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY, - .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, - }, - .num_consumer_supplies = 1, - .consumer_supplies = &touchbook_vsim_supply, -}; - -/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */ -static struct regulator_init_data touchbook_vdac = { - .constraints = { - .min_uV = 1800000, - .max_uV = 1800000, - .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY, - .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, - }, - .num_consumer_supplies = 1, - .consumer_supplies = &touchbook_vdac_supply, -}; - -/* VPLL2 for digital video outputs */ -static struct regulator_init_data touchbook_vpll2 = { - .constraints = { - .name = "VDVI", - .min_uV = 1800000, - .max_uV = 1800000, - .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY, - .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, - }, - .num_consumer_supplies = 1, - .consumer_supplies = &touchbook_vdvi_supply, -}; - -static struct twl4030_usb_data touchbook_usb_data = { - .usb_mode = T2_USB_MODE_ULPI, -}; - -static struct twl4030_codec_audio_data touchbook_audio_data = { - .audio_mclk = 26000000, -}; - -static struct twl4030_codec_data touchbook_codec_data = { - .audio_mclk = 26000000, - .audio = &touchbook_audio_data, -}; - -static struct twl4030_madc_platform_data touchbook_madc_data = { - .irq_line = 1, -}; - -static struct twl4030_bci_platform_data touchbook_bci_data = { - .tblsize = 0, - .no_backup_battery = 1, - .manufacturer = "Always Innovating", - .model_name = "Tablet 6000mAh v1.0", - .technology = POWER_SUPPLY_TECHNOLOGY_LIPO, - .energy_full_design = 6000, -}; - -static struct twl4030_platform_data touchbook_twldata = { - .irq_base = TWL4030_IRQ_BASE, - .irq_end = TWL4030_IRQ_END, - - /* platform_data for children goes here */ - .usb = &touchbook_usb_data, - .gpio = &touchbook_gpio_data, - .codec = &touchbook_codec_data, - .madc = &touchbook_madc_data, - .vmmc1 = &touchbook_vmmc1, - .vsim = &touchbook_vsim, - .vdac = &touchbook_vdac, - .vpll2 = &touchbook_vpll2, - .bci = &touchbook_bci_data, -}; - -static struct i2c_board_info __initdata touchbook_i2c_boardinfo_1[] = { - { - I2C_BOARD_INFO("twl4030", 0x48), - .flags = I2C_CLIENT_WAKE, - .irq = INT_34XX_SYS_NIRQ, - .platform_data = &touchbook_twldata, - }, -}; - -static struct bq27x00_platform_data touchbook_bq27200_data = { - .manufacturer = "Always Innovating", - .model_name = "Keyboard 12000mAh v1.0", - .technology = POWER_SUPPLY_TECHNOLOGY_LIPO, - .energy_full_design = 12000, - .voltage_discharging_full = 3900, - .voltage_discharging_empty = 2900, - .current_charging_full = 250, - .current_charging_empty = 1200, -}; - -static struct chacha_platform_data touchbook_chacha_t_data = { - .gpio = 155, - .version = 3, - .name = "Touchscreen Chacha Tablet", - .minX = 128, - .maxX = 17230, - .minY = 55555, - .maxY = 65300, -}; - -static struct i2c_board_info __initdata touchbook_i2c_boardinfo_3[] = { - { - I2C_BOARD_INFO("bq27200", 0x55), - .platform_data = &touchbook_bq27200_data, - }, - { - I2C_BOARD_INFO("chacha", 0x40), - .irq = OMAP_GPIO_IRQ(155), - .platform_data = &touchbook_chacha_t_data, - }, - { - I2C_BOARD_INFO("ds1307", 0x68), - }, -}; - -static int __init touchbook_i2c_init(void) -{ - int ret; - - /* Standard TouchBook bus */ - omap_register_i2c_bus(1, 2600, touchbook_i2c_boardinfo_1, ARRAY_SIZE(touchbook_i2c_boardinfo_1)); - - /* Additional TouchBook bus */ - omap_register_i2c_bus(3, 100, touchbook_i2c_boardinfo_3, ARRAY_SIZE(touchbook_i2c_boardinfo_3)); - - ret = gpio_request(touchbook_chacha_t_data.gpio, "chacha_t"); - if (ret < 0) { - printk(KERN_ERR "Failed to request GPIO %d for chacha_t IRQ\n", touchbook_chacha_t_data.gpio); - return 0; - } - gpio_direction_input(touchbook_chacha_t_data.gpio); - - return 0; -} - -static struct gpio_led touchbook_gpio_leds[] = { - { - .name = "touchbook::usr0", - .default_trigger = "heartbeat", - .gpio = 150, - }, - { - .name = "touchbook::usr1", - .default_trigger = "mmc0", - .gpio = 149, - }, -}; - -static struct gpio_led_platform_data touchbook_gpio_led_info = { - .leds = touchbook_gpio_leds, - .num_leds = ARRAY_SIZE(touchbook_gpio_leds), -}; - -static struct platform_device touchbook_leds_gpio = { - .name = "leds-gpio", - .id = -1, - .dev = { - .platform_data = &touchbook_gpio_led_info, - }, -}; - -static struct gpio_keys_button touchbook_gpio_buttons[] = { - { - .code = KEY_BACK, - .gpio = 7, - .desc = "user", - .wakeup = 1, - }, - { - .code = KEY_POWER, - .gpio = 183, - .desc = "power", - .wakeup = 1, - .active_low = 1, - }, -}; - -static struct gpio_keys_platform_data touchbook_gpio_key_info = { - .buttons = touchbook_gpio_buttons, - .nbuttons = ARRAY_SIZE(touchbook_gpio_buttons), -}; - -static struct platform_device touchbook_keys_gpio = { - .name = "gpio-keys", - .id = -1, - .dev = { - .platform_data = &touchbook_gpio_key_info, - }, -}; - -static struct platform_device __initdata *touchbook_devices[] = { - &touchbook_leds_gpio, - &touchbook_keys_gpio, - &touchbook_dss_device, -}; - -static void __init touchbook_flash_init(void) -{ - u8 cs = 0; - u8 nandcs = GPMC_CS_NUM + 1; - - u32 gpmc_base_add = OMAP34XX_GPMC_VIRT; - - /* find out the chip-select on which NAND exists */ - while (cs < GPMC_CS_NUM) { - u32 ret = 0; - ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1); - - if ((ret & 0xC00) == 0x800) { - printk(KERN_INFO "Found NAND on CS%d\n", cs); - if (nandcs > GPMC_CS_NUM) - nandcs = cs; - } - cs++; - } - - if (nandcs > GPMC_CS_NUM) { - printk(KERN_INFO "NAND: Unable to find configuration " - "in GPMC\n "); - return; - } - - if (nandcs < GPMC_CS_NUM) { - touchbook_nand_data.cs = nandcs; - touchbook_nand_data.gpmc_cs_baseaddr = (void *) - (gpmc_base_add + 0x60 + nandcs * 0x30); - touchbook_nand_data.gpmc_baseaddr = - (void *) (gpmc_base_add); - - printk(KERN_INFO "Registering NAND on CS%d\n", nandcs); - if (platform_device_register(&touchbook_nand_device) < 0) - printk(KERN_ERR "Unable to register NAND device\n"); - } -} - -static struct ehci_hcd_omap_platform_data __initdata touchbook_ehci_pdata = { - - .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, - .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, - .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, - - .phy_reset = true, - .reset_gpio_port[0] = -EINVAL, - .reset_gpio_port[1] = 147, - .reset_gpio_port[2] = -EINVAL -}; - -#ifdef CONFIG_OMAP_MUX -static struct omap_board_mux touchbook_board_mux[] = { - { .reg_offset = OMAP_MUX_TERMINATOR }, -}; -#else -#define touchbook_board_mux NULL -#endif - -static struct ads7846_platform_data touchbook_ads7846_config = { - .x_min = 100, - .y_min = 265, - .x_max = 3950, - .y_max = 3750, - .x_plate_ohms = 40, - .pressure_max = 255, - .debounce_max = 10, - .debounce_tol = 5, - .debounce_rep = 1, - .gpio_pendown = 162, - .keep_vref_on = 1, -}; - -static struct omap2_mcspi_device_config touchbook_ads7846_mcspi_config = { - .turbo_mode = 0, - .single_channel = 1, /* 0: slave, 1: master */ -}; - -static struct spi_board_info __initdata touchbook_spi_board_info_4[] = { - { - .modalias = "ads7846", - .bus_num = 4, - .chip_select = 0, - .max_speed_hz = 1500000, - .controller_data = &touchbook_ads7846_mcspi_config, - .irq = OMAP_GPIO_IRQ(162), - .platform_data = &touchbook_ads7846_config, - } -}; - -static void __init touchbook_ads7846_init(void) -{ - if (gpio_request(touchbook_ads7846_config.gpio_pendown, "ads7846_pen_down")) { - printk(KERN_ERR "Failed to request GPIO %d for ads7846 pen down IRQ\n", touchbook_ads7846_config.gpio_pendown); - return; - } - - gpio_direction_input(touchbook_ads7846_config.gpio_pendown); - omap_set_gpio_debounce(touchbook_ads7846_config.gpio_pendown, 1); - omap_set_gpio_debounce_time(touchbook_ads7846_config.gpio_pendown, 0xa); -} - -static struct mma7455l_platform_data touchbook_mma7455l_config = { - .calibration_x = -4, - .calibration_y = 28, - .calibration_z = -28, - .axis_x = ABS_X, - .sign_x = 1, - .axis_y = ABS_Y, - .sign_y = 1, - .axis_z = ABS_Z, - .sign_z = 1, -}; - -static struct omap2_mcspi_device_config touchbook_mma7455l_mcspi_config = { - .turbo_mode = 0, - .single_channel = 1, /* 0: slave, 1: master */ -}; - -static struct spi_board_info __initdata touchbook_spi_board_info_3[] = { - { - .modalias = "mma7455l", - .bus_num = 3, - .chip_select = 0, - .max_speed_hz = 200000, - .irq = OMAP_GPIO_IRQ(136), - .controller_data = &touchbook_mma7455l_mcspi_config, - .platform_data = &touchbook_mma7455l_config, - } -}; - -static void __init touchbook_mma7455l_init(void) -{ - int ret; - int touchbook_mma7455l_gpio = 136; - - ret = gpio_request(touchbook_mma7455l_gpio, "mma7455l"); - if (ret < 0) { - printk(KERN_ERR "Failed to request GPIO %d for mma7455l IRQ\n", touchbook_mma7455l_gpio); - return; - } - - gpio_direction_input(touchbook_mma7455l_gpio); -} - -static int touchbook_backlight_brightness = 50; -static struct omap_dm_timer *touchbook_backlight_pwm; - -static int touchbook_backlight_read(struct backlight_device *bd) -{ - return touchbook_backlight_brightness; -} - -static int touchbook_backlight_update(struct backlight_device *bd) -{ - int value = bd->props.brightness; - touchbook_backlight_brightness = value; - - /* Frequency calculation: - - For 200Hz PWM, you want to load -164 (=> -32768Hz / 200Hz). - - Minimum duty cycle for the backlight is 15%. - - You have (164*0.85) => ~140 levels of brightness. - */ - - /* Halve input brightness */ - if (!bd->props.boost) - value /= 2; - - /* For maximum brightness, just stop the timer... */ - if(value != bd->props.max_brightness) - { - /* Load the appropriate value for 200Hz PWM */ - u32 period = clk_get_rate(omap_dm_timer_get_fclk(touchbook_backlight_pwm)) / bd->props.pwm_fq; - - /* Minimum duty cycle is 15% */ - u32 minimum = (period * bd->props.min_duty) / 100; - u32 maximum = (period * 17) / 20; - - /* Work out match value */ - u32 match = (maximum * value) / 100; - - /* Start... */ - omap_dm_timer_set_load(touchbook_backlight_pwm, 1, 0xFFFFFFFF - period - 1); - omap_dm_timer_set_match(touchbook_backlight_pwm, 1, 0xFFFFFFFF - minimum - match); - omap_dm_timer_write_counter(touchbook_backlight_pwm, -1); - omap_dm_timer_start(touchbook_backlight_pwm); - } - else - omap_dm_timer_stop(touchbook_backlight_pwm); - - - return 0; -} - -static struct backlight_ops touchbook_backlight_properties = { - .get_brightness = touchbook_backlight_read, - .update_status = touchbook_backlight_update, -}; - -static void __init touchbook_backlight_init(void) -{ - static struct backlight_device *bd; - int touchbook_bl_pwm_timer = 9; - bd = backlight_device_register("touchbook", NULL, NULL, &touchbook_backlight_properties); - - if(bd) - { - touchbook_backlight_pwm = omap_dm_timer_request_specific(touchbook_bl_pwm_timer); - omap_dm_timer_enable(touchbook_backlight_pwm); - omap_dm_timer_set_source(touchbook_backlight_pwm, OMAP_TIMER_SRC_SYS_CLK); - omap_dm_timer_set_pwm(touchbook_backlight_pwm, 1, 1, OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE); - - bd->props.max_brightness = 100; - bd->props.brightness = touchbook_backlight_brightness; - bd->props.boost = 0; - bd->props.min_duty = 15; - bd->props.pwm_fq = 200; - } - - touchbook_backlight_update(bd); -} - -static void touchbook_poweroff(void) -{ - int r; - int touchbook_kill_power_gpio = 168; - - r = gpio_request(touchbook_kill_power_gpio, "power reset"); - if (r < 0) { - printk(KERN_ERR "Unable to get kill power GPIO\n"); - return; - } - - gpio_direction_output(touchbook_kill_power_gpio, 0); -} - -static void __init touchbook_init(void) -{ - int r; - struct platform_device *pdev; - - printk(KERN_ERR "Touch Book rev. A*/B*/C*\n"); - - pm_power_off = touchbook_poweroff; - - omap3_mux_init(touchbook_board_mux, OMAP_PACKAGE_CBB); - touchbook_i2c_init(); - platform_add_devices(touchbook_devices, ARRAY_SIZE(touchbook_devices)); - omap_serial_init(); - - usb_musb_init(); - usb_ehci_init(&touchbook_ehci_pdata); - touchbook_flash_init(); - - /* Ensure SDRC pins are mux'd for self-refresh */ - omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); - omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); - - touchbook_display_init(); - touchbook_backlight_init(); - - /* Touchscreen and accelerometer */ - spi_register_board_info(touchbook_spi_board_info_4, ARRAY_SIZE(touchbook_spi_board_info_4)); - spi_register_board_info(touchbook_spi_board_info_3, ARRAY_SIZE(touchbook_spi_board_info_3)); - touchbook_ads7846_init(); - touchbook_mma7455l_init(); - - /* Export AI board revision */ - pdev = platform_device_alloc("touchbook", 0); - platform_device_add(pdev); - r = device_create_file(&pdev->dev, &dev_attr_revision); -} - -static void __init touchbook_map_io(void) -{ - omap2_set_globals_343x(); - omap2_map_common_io(); -} - -static void __init touchbook_init_irq(void) -{ - if (cpu_is_omap3630()) - { - omap2_init_common_hw(mt46h32m32lf6_sdrc_params, - mt46h32m32lf6_sdrc_params, - _omap37x_mpu_rate_table, - _omap37x_dsp_rate_table, - _omap37x_l3_rate_table); - } - else - { - omap2_init_common_hw(mt46h32m32lf6_sdrc_params, - mt46h32m32lf6_sdrc_params, - _omap35x_mpu_rate_table, - _omap35x_dsp_rate_table, - _omap35x_l3_rate_table); - } - - omap_init_irq(); -#ifdef CONFIG_OMAP_32K_TIMER - omap2_gp_clockevent_set_gptimer(12); -#endif - omap_gpio_init(); -} - -static void __init super_init(void) -{ - touchbook_init(); -} - -MACHINE_START(OMAP3_TOUCHBOOK, "OMAP3 touchbook Board") - /* Maintainer: Gregoire Gentil - http://www.alwaysinnovating.com */ - .phys_io = 0x48000000, - .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, - .boot_params = 0x80000100, - .map_io = touchbook_map_io, - .init_irq = touchbook_init_irq, - .init_machine = super_init, - .timer = &omap_timer, -MACHINE_END diff --git a/patches/touchbook/touchbook_fix.sh b/patches/touchbook/touchbook_fix.sh deleted file mode 100644 index 1e593651e9b012c4c5dd3e9cc1b708a335b56f78..0000000000000000000000000000000000000000 --- a/patches/touchbook/touchbook_fix.sh +++ /dev/null @@ -1,112 +0,0 @@ -#touchbook_nand_partitions -> omap3touchbook_nand_partitions -sed -i 's/touchbook_nand_partitions/omap3touchbook_nand_partitions/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: touchbook_nand_partitions -> omap3touchbook_nand_partitions' -s - -#SZ_128K -> NAND_BLOCK_SIZE -sed -i 's/SZ_128K/NAND_BLOCK_SIZE/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: SZ_128K -> NAND_BLOCK_SIZE' -s - -#touchbook_mmc -> mmc -sed -i 's/touchbook_mmc/mmc/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: touchbook_mmc -> mmc' -s - -#twl4030_mmc_init -> omap2_hsmmc_init -sed -i 's/twl4030_mmc_init/omap2_hsmmc_init/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: twl4030_mmc_init -> omap2_hsmmc_init' -s - -#twl4030_hsmmc_info -> omap2_hsmmc_info -sed -i 's/twl4030_hsmmc_info/omap2_hsmmc_info/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: twl4030_hsmmc_info -> omap2_hsmmc_info' -s - -#add #include <linux/mmc/host.h> - -#mmc-twl4030.h -> hsmmc.h -sed -i 's/mmc-twl4030.h/hsmmc.h/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: mmc-twl4030.h -> hsmmc.h' -s - -#touchbook_i2c_init -> omap3_touchbook_i2c_init -sed -i 's/touchbook_i2c_init/omap3_touchbook_i2c_init/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: touchbook_i2c_init -> omap3_touchbook_i2c_init' -s - -#touchbook_gpio_key_info -> gpio_key_info -sed -i 's/touchbook_gpio_key_info/gpio_key_info/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: touchbook_gpio_key_info -> gpio_key_info' -s - -#touchbook_gpio_led_info -> gpio_led_info -sed -i 's/touchbook_gpio_led_info/gpio_led_info/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: touchbook_gpio_led_info -> gpio_led_info' -s - -#touchbook_gpio_leds -> gpio_leds -sed -i 's/touchbook_gpio_leds/gpio_leds/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: touchbook_gpio_leds -> gpio_leds' -s - -#touchbook_leds_gpio -> leds_gpio -sed -i 's/touchbook_leds_gpio/leds_gpio/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: touchbook_leds_gpio -> leds_gpio' -s - -#touchbook_gpio_buttons -> gpio_buttons -sed -i 's/touchbook_gpio_buttons/gpio_buttons/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: touchbook_gpio_buttons -> gpio_buttons' -s - -#touchbook_keys_gpio -> keys_gpio -sed -i 's/touchbook_keys_gpio/keys_gpio/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: touchbook_keys_gpio -> keys_gpio' -s - -#touchbook_poweroff -> omap3_touchbook_poweroff -sed -i 's/touchbook_poweroff/omap3_touchbook_poweroff/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: touchbook_poweroff -> omap3_touchbook_poweroff' -s - -#touchbook_init_irq -> omap3_touchbook_init_irq -sed -i 's/touchbook_init_irq/omap3_touchbook_init_irq/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: touchbook_init_irq -> omap3_touchbook_init_irq' -s - -#touchbook_init -> omap3_touchbook_init -sed -i 's/touchbook_init/omap3_touchbook_init/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: touchbook_init -> omap3_touchbook_init' -s - -#touchbook_devices -> omap3_touchbook_devices -sed -i 's/touchbook_devices/omap3_touchbook_devices/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: touchbook_devices -> omap3_touchbook_devices' -s - -#touchbook_board_mux -> board_mux -sed -i 's/touchbook_board_mux/board_mux/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: touchbook_board_mux -> board_mux' -s - -#touchbook_i2c_boardinfo_3 -> touchBook_i2c_boardinfo -sed -i 's/touchbook_i2c_boardinfo_3/touchBook_i2c_boardinfo/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: touchbook_i2c_boardinfo_3 -> touchBook_i2c_boardinfo' -s - -#ehci_hcd_omap_platform_data -> usbhs_omap_board_data -sed -i 's/ehci_hcd_omap_platform_data/usbhs_omap_board_data/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: ehci_hcd_omap_platform_data -> usbhs_omap_board_data' -s - -#touchbook_ehci_pdata -> usbhs_bdata -sed -i 's/touchbook_ehci_pdata/usbhs_bdata/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: touchbook_ehci_pdata -> usbhs_bdata' -s - -#usb_ehci_init -> usbhs_init -sed -i 's/usb_ehci_init/usbhs_init/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: usb_ehci_init -> usbhs_init' -s - -#revision_instance -> early_touchbook_revision -sed -i 's/revision_instance/early_touchbook_revision/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: revision_instance -> early_touchbook_revision' -s - -#touchbook_dss_device.dev -> omap3_touchbook_lcd_device.dev -sed -i 's/touchbook_dss_device.dev/omap3_touchbook_lcd_device.dev/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: touchbook_dss_device.dev -> omap3_touchbook_lcd_device.dev' -s - - - - -#touchbook_ads7846_config -> ads7846_pdata -sed -i 's/touchbook_ads7846_config/ads7846_pdata/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: touchbook_ads7846_config -> ads7846_pdata' -s - - -sed -i 's/X/Y/g' board-omap3touchbook.c.3.0.0 -git commit -a -m 'changed: X -> Y' -s - - - -