Re: [PATCH V5 0/6] OMAPDSS: Cleanup cpu_is checks
On Wed, 2012-08-29 at 17:20 -0700, Tony Lindgren wrote: * Chandrabhanu Mahapatra cmahapa...@ti.com [120820 06:26]: Hi everyone, this patch series aims at cleaning up of DSS of cpu_is checks thereby making it more generic. The 1st patch cleans up cpu_is checks from DISPC code. The 2nd patch removes unused functions from DSS code. The 3rd patch cleans up cpu_is checks from DSS code. The 4th patch removes cpu_is checks from VENC code. The 5th patch disables VENC support on OMAP4. The 6th patch removes cpu_is checks from DPI code and replaces it with a dss feature. Good to see this, we need this badly to avoid blocking single zImage effort on omaps. Can you also please take What is the issue with single zImage? How do cpu_is_ check affect it? a look at the omap dss headers and make sure that drivers/video/omap code does not do any #include mach/*.h or plat/*.h? The driver specific headers should be now moved to live in include/linux/platform_data directory instead of the current arch/arm/*omap*/include/*. I had a brief look at drivers/video/omap*. Here's a brief status. I don't really know much about the old fb driver (drivers/video/omap) so my comments may not be totally correct. And all fixing I do there is done in blind, I don't have any omap1 devices. I've left out the trivial cleanups from the list (i.e. file includes a header that it doesn't need), there were a bunch of those. I'll make a patch for these. $ git grep -E plat|mach drivers/video/omap* drivers/video/omap/lcd_ams_delta.c:#include plat/board-ams-delta.h * Needs to be moved * lcd_ams_delta uses also omap_write/read drivers/video/omap/lcd_inn1510.c:#include plat/fpga.h * No idea about this. Who wants to convert the fpga support? =) drivers/video/omap/lcd_mipid.c:#include plat/lcd_mipid.h * Needs to be moved drivers/video/omap/lcd_osk.c:#include plat/mux.h * Uses omap_cfg_reg(PWL). I don't know what this is... * lcd_osk.c uses omap_write/read drivers/video/omap/lcdc.c:#include mach/lcdc.h * Needs to be moved drivers/video/omap/lcdc.c:#include plat/dma.h * Uses arch/arm/mach-omap1/lcd_dma.c. Any idea about this? Will DMA engine support OMAP1's LCD DMA? drivers/video/omap/omapfb_main.c:#include plat/dma.h * Uses DMA API to set DMA priority drivers/video/omap/sossi.c:#include plat/dma.h * Uses arch/arm/mach-omap1/lcd_dma.c drivers/video/omap2/dss/dss.c:#include plat/cpu.h * Uses cpu_is_* to find out the DSS version. dispc.c also uses cpu_is_* functions, but doesn't include plat/cpu.h. I know cpu_is_* checks should be removed, but is there some other file to include for the time being than plat/cpu.h? drivers/video/omap2/dss/dss_features.c:#include plat/cpu.h * Uses cpu_is_* to find out the DSS version drivers/video/omap2/omapfb/omapfb-ioctl.c:#include plat/vrfb.h drivers/video/omap2/omapfb/omapfb-ioctl.c:#include plat/vram.h drivers/video/omap2/omapfb/omapfb-main.c:#include plat/vram.h drivers/video/omap2/omapfb/omapfb-main.c:#include plat/vrfb.h drivers/video/omap2/omapfb/omapfb-sysfs.c:#include plat/vrfb.h drivers/video/omap2/vram.c:#include plat/vram.h drivers/video/omap2/vram.c:#include plat/dma.h drivers/video/omap2/vrfb.c:#include plat/vrfb.h drivers/video/omap2/vrfb.c:#include plat/sdrc.h Of these, I'm not sure how to handle. Grep shows that vram.c is only used by (the newer) omapfb, so it could be considered a part of that driver. It still needs to be built-in, as it needs to reserve memory early in the boot process (done with a call from arch/arm/plat-omap/common.c). Also board files can use a func call to define the amount of memory to allocate, but only rx51 seems to do this in the mainline. Anyway, I believe vram.c is going away when we start to use CMA. As for vrfb... I'm not really sure where it belongs. It is used by the newer omapfb and OMAP V4L2 driver. VRFB is a part of the OMAP's memory controller, so I'm not sure if it's really a normal driver. Tomi signature.asc Description: This is a digitally signed message part
Re: [PATCH v4 2/3] ARM: omap: hwmod: get rid of all omap_clk_get_by_name usage
On Thursday 30 August 2012 05:38 AM, Russell King - ARM Linux wrote: On Wed, Aug 29, 2012 at 02:26:15PM +0530, Rajendra Nayak wrote: Moving to Common clk framework for OMAP would mean we no longer use internal lookup mechanism like omap_clk_get_by_name(). get rid of all its usage mostly from hwmod and omap_device code. Also use IS_ERR_OR_NULL() for error checking. This is wrong. IS_ERR() is the only check you should ever use with clk_get(). okay, thanks, will fix. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 2/3] ARM: omap: hwmod: get rid of all omap_clk_get_by_name usage
On Thursday 30 August 2012 05:45 AM, Turquette, Mike wrote: On Wed, Aug 29, 2012 at 1:56 AM, Rajendra Nayakrna...@ti.com wrote: diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index d7f55e4..a3831a2 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c @@ -3156,6 +3156,7 @@ static struct omap_clk omap44xx_clks[] = { CLK(NULL, dss_tv_clk,dss_tv_clk,CK_443X), CLK(NULL, dss_48mhz_clk,dss_48mhz_clk, CK_443X), CLK(NULL, dss_dss_clk,dss_dss_clk, CK_443X), + CLK(NULL, dss_fck,dss_fck, CK_443X), CLK(omapdss_dss, ick,dss_fck, CK_443X), Is it right to re-use dss_fck for the ick here? I think it is due to omap4 modulemode stuff but I don't have DM in front of me and wanted a double-check... yes, its because of the wierdness of DSS clocks where a so-called optional clock is actually a function clock. Regards, Mike -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 0/3] MFD/GPIO: Add twl6040 GPO driver
Hi Samuel, Linus, On 08/16/2012 03:13 PM, Peter Ujfalusi wrote: Hello, Changes since v1: - Removed the ti,use-gpo property from DT bindings - Register the GPO driver if we booted with DT blob or in legacy if the pdata for the GPO driver is present - DT binding Documentation update The Documentation update has reference to the twl6040.dtsi file which will be created to hold the common/static properties for the twl6040. To avoid cross tree merge issues later I have only included the Documentation update to this series and I will send the actual .dtsi/.dts changes via linux-omap. If this is not a problem. Did you had time to look at this series? Do you want me to resend it? Thank you, Péter The dependencies for this series are in mainline and I think this series can go via GPIO if Samuel agrees with the changes. Intro mail from v1: The following series adds support for the GPO (General Purpose Output) on the twl6040/41 audio chip. The series has been tested on SDP4430, compile tested for x86_64 and x86_32 bit to be sure it does not introduce build breakage. Regards, Peter --- Peter Ujfalusi (3): mfd: twl6040: Fix GPO mask mfd: twl6040: Add twl6040-gpio child gpio: Add basic support for TWL6040 GPOs Documentation/devicetree/bindings/mfd/twl6040.txt |9 +- drivers/gpio/Kconfig |7 + drivers/gpio/Makefile |1 + drivers/gpio/gpio-twl6040.c | 137 + drivers/mfd/twl6040-core.c| 15 +++ include/linux/mfd/twl6040.h | 11 ++- 6 files changed, 175 insertions(+), 5 deletions(-) create mode 100644 drivers/gpio/gpio-twl6040.c -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 02/14] MFD: twl4030-audio: Convert to use devm_kzalloc
Hi Tero, On 08/28/2012 12:50 PM, Tero Kristo wrote: On Tue, 2012-08-14 at 17:22 +0300, Peter Ujfalusi wrote: Signed-off-by: Peter Ujfalusi peter.ujfal...@ti.com I think this one could use a short commit message, also about why kfree():s are dropped (handled internally by devm_* etc.) I don't like empty commit messages either but this patch is self explaining I would think that the commit title explains it. -- Péter -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v8 13/13] usb: otg: nop: add dt support
Added device tree support for nop transceiver driver and updated the Documentation with device tree binding information for am33xx platform. Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com --- .../devicetree/bindings/usb/am33xx-usb.txt |3 +++ drivers/usb/otg/nop-usb-xceiv.c| 10 ++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/am33xx-usb.txt b/Documentation/devicetree/bindings/usb/am33xx-usb.txt index b0caac3..e2702df 100644 --- a/Documentation/devicetree/bindings/usb/am33xx-usb.txt +++ b/Documentation/devicetree/bindings/usb/am33xx-usb.txt @@ -14,3 +14,6 @@ AM33XX MUSB GLUE 500mA when operating in host mode. - usb0-phy : phandle for usb0 NOP PHY - usb1-phy : phandle for usb1 NOP PHY + +NOP USB PHY + - compatible : Should be nop-xceiv-usb diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c index 7e0dba3..fdbc285 100644 --- a/drivers/usb/otg/nop-usb-xceiv.c +++ b/drivers/usb/otg/nop-usb-xceiv.c @@ -27,6 +27,7 @@ */ #include linux/module.h +#include linux/of.h #include linux/platform_device.h #include linux/dma-mapping.h #include linux/usb/otg.h @@ -194,12 +195,21 @@ static int __devexit nop_usb_xceiv_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id nop_xceiv_id_table[] = { + { .compatible = nop-xceiv-usb }, + {} +}; +MODULE_DEVICE_TABLE(of, nop_xceiv_id_table); +#endif + static struct platform_driver nop_usb_xceiv_driver = { .probe = nop_usb_xceiv_probe, .remove = __devexit_p(nop_usb_xceiv_remove), .driver = { .name = nop_usb_xceiv, .owner = THIS_MODULE, + .of_match_table = of_match_ptr(nop_xceiv_id_table), }, }; -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v8 07/13] usb: musb: dsps: add dt support
From: Ajay Kumar Gupta ajay.gu...@ti.com Added device tree support for dsps musb glue driver and updated the Documentation with device tree binding information. Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com Signed-off-by: Santhapuri, Damodar damodar.santhap...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com --- .../devicetree/bindings/usb/am33xx-usb.txt | 14 + drivers/usb/musb/musb_dsps.c | 60 +--- 2 files changed, 65 insertions(+), 9 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/am33xx-usb.txt diff --git a/Documentation/devicetree/bindings/usb/am33xx-usb.txt b/Documentation/devicetree/bindings/usb/am33xx-usb.txt new file mode 100644 index 000..ca8fa56 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/am33xx-usb.txt @@ -0,0 +1,14 @@ +AM33XX MUSB GLUE + - compatible : Should be ti,musb-am33xx + - ti,hwmods : must be usb_otg_hs + - multipoint : Should be 1 indicating the musb controller supports + multipoint. This is a MUSB configuration-specific setting. + - num_eps : Specifies the number of endpoints. This is also a + MUSB configuration-specific setting. Should be set to 16 + - ram_bits : Specifies the ram address size. Should be set to 12 + - port0_mode : Should be 3 to represent OTG. 1 signifies HOST and 2 + represents PERIPHERAL. + - port1_mode : Should be 1 to represent HOST. 3 signifies OTG and 2 + represents PERIPHERAL. + - power : Should be 250. This signifies the controller can supply upto + 500mA when operating in host mode. diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 25e395b..2c104bf 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -31,6 +31,7 @@ #include linux/init.h #include linux/io.h +#include linux/of.h #include linux/err.h #include linux/platform_device.h #include linux/dma-mapping.h @@ -46,6 +47,10 @@ #include musb_core.h +#ifdef CONFIG_OF +static const struct of_device_id musb_dsps_of_match[]; +#endif + /** * avoid using musb_readx()/musb_writex() as glue layer should not be * dependent on musb core layer symbols. @@ -486,6 +491,8 @@ static int __devinit dsps_create_musb_pdev(struct dsps_glue *glue, u8 id) struct device *dev = glue-dev; struct platform_device *pdev = to_platform_device(dev); struct musb_hdrc_platform_data *pdata = dev-platform_data; + struct device_node *np = pdev-dev.of_node; + struct musb_hdrc_config *config; struct platform_device *musb; struct resource *res; struct resource resources[2]; @@ -552,14 +559,40 @@ static int __devinit dsps_create_musb_pdev(struct dsps_glue *glue, u8 id) glue-musb[id] = musb; - pdata-platform_ops = dsps_ops; - ret = platform_device_add_resources(musb, resources, 2); if (ret) { dev_err(dev, failed to add resources\n); goto err2; } + if (np) { + pdata = devm_kzalloc(pdev-dev, sizeof(*pdata), GFP_KERNEL); + if (!pdata) { + dev_err(pdev-dev, + failed to allocate musb platfrom data\n); + ret = -ENOMEM; + goto err2; + } + + config = devm_kzalloc(pdev-dev, sizeof(*config), GFP_KERNEL); + if (!config) { + dev_err(pdev-dev, + failed to allocate musb hdrc config\n); + goto err2; + } + + of_property_read_u32(np, num_eps, (u32 *)config-num_eps); + of_property_read_u32(np, ram_bits, (u32 *)config-ram_bits); + sprintf(res_name, port%d_mode, id); + of_property_read_u32(np, res_name, (u32 *)pdata-mode); + of_property_read_u32(np, power, (u32 *)pdata-power); + config-multipoint = of_property_read_bool(np, multipoint); + + pdata-config = config; + } + + pdata-platform_ops = dsps_ops; + ret = platform_device_add_data(musb, pdata, sizeof(*pdata)); if (ret) { dev_err(dev, failed to add platform_data\n); @@ -591,14 +624,22 @@ static void __devexit dsps_delete_musb_pdev(struct dsps_glue *glue, u8 id) static int __devinit dsps_probe(struct platform_device *pdev) { - const struct platform_device_id *id = platform_get_device_id(pdev); - const struct dsps_musb_wrapper *wrp = - (struct dsps_musb_wrapper *)id-driver_data; + struct device_node *np = pdev-dev.of_node; + const struct of_device_id *match; + const struct dsps_musb_wrapper *wrp; struct dsps_glue *glue; struct resource *iomem; u32 __iomem *usbss; int ret, i; + match =
[PATCH v8 04/13] usb: musb: kill global and static for multi instance
From: Ajay Kumar Gupta ajay.gu...@ti.com Moved global variable musb_debugfs_root and static variable old_state to 'struct musb' to help support multi instance of musb controller as present on AM335x platform. Also removed the global variable orig_dma_mask and filled the dev-dma_mask with parent device's dma_mask. Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com Signed-off-by: Santhapuri, Damodar damodar.santhap...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com --- drivers/usb/musb/musb_core.c| 22 +++--- drivers/usb/musb/musb_core.h|4 drivers/usb/musb/musb_debugfs.c |8 +++- 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 7499fbb..44c8caa 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -100,6 +100,7 @@ #include linux/platform_device.h #include linux/io.h #include linux/idr.h +#include linux/dma-mapping.h #include musb_core.h @@ -1797,10 +1798,9 @@ static const struct attribute_group musb_attr_group = { static void musb_irq_work(struct work_struct *data) { struct musb *musb = container_of(data, struct musb, irq_work); - static int old_state; - if (musb-xceiv-state != old_state) { - old_state = musb-xceiv-state; + if (musb-xceiv-state != musb-xceiv_old_state) { + musb-xceiv_old_state = musb-xceiv-state; sysfs_notify(musb-controller-kobj, NULL, mode); } } @@ -2060,11 +2060,6 @@ fail0: /* all implementations (PCI bridge to FPGA, VLYNQ, etc) should just * bridge to a platform device; this driver then suffices. */ - -#ifndef CONFIG_MUSB_PIO_ONLY -static u64 *orig_dma_mask; -#endif - static int __devinit musb_probe(struct platform_device *pdev) { struct device *dev = pdev-dev; @@ -2083,10 +2078,6 @@ static int __devinit musb_probe(struct platform_device *pdev) return -ENOMEM; } -#ifndef CONFIG_MUSB_PIO_ONLY - /* clobbered by use_dma=n */ - orig_dma_mask = dev-dma_mask; -#endif status = musb_init_controller(dev, irq, base); if (status 0) iounmap(base); @@ -2096,7 +2087,8 @@ static int __devinit musb_probe(struct platform_device *pdev) static int __devexit musb_remove(struct platform_device *pdev) { - struct musb *musb = dev_to_musb(pdev-dev); + struct device *dev = pdev-dev; + struct musb *musb = dev_to_musb(dev); void __iomem*ctrl_base = musb-ctrl_base; /* this gets called on rmmod. @@ -2109,9 +2101,9 @@ static int __devexit musb_remove(struct platform_device *pdev) musb_free(musb); iounmap(ctrl_base); - device_init_wakeup(pdev-dev, 0); + device_init_wakeup(dev, 0); #ifndef CONFIG_MUSB_PIO_ONLY - pdev-dev.dma_mask = orig_dma_mask; + dma_set_mask(dev, *dev-parent-dma_mask); #endif return 0; } diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index a69ffd6..c158aac 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h @@ -437,6 +437,10 @@ struct musb { #ifdef MUSB_CONFIG_PROC_FS struct proc_dir_entry *proc_entry; #endif + int xceiv_old_state; +#ifdef CONFIG_DEBUG_FS + struct dentry *debugfs_root; +#endif }; static inline struct musb *gadget_to_musb(struct usb_gadget *g) diff --git a/drivers/usb/musb/musb_debugfs.c b/drivers/usb/musb/musb_debugfs.c index 40a37c9..1d6e8af 100644 --- a/drivers/usb/musb/musb_debugfs.c +++ b/drivers/usb/musb/musb_debugfs.c @@ -103,8 +103,6 @@ static const struct musb_register_map musb_regmap[] = { { }/* Terminating Entry */ }; -static struct dentry *musb_debugfs_root; - static int musb_regdump_show(struct seq_file *s, void *unused) { struct musb *musb = s-private; @@ -241,7 +239,7 @@ int __devinit musb_init_debugfs(struct musb *musb) struct dentry *file; int ret; - root = debugfs_create_dir(musb, NULL); + root = debugfs_create_dir(dev_name(musb-controller), NULL); if (!root) { ret = -ENOMEM; goto err0; @@ -261,7 +259,7 @@ int __devinit musb_init_debugfs(struct musb *musb) goto err1; } - musb_debugfs_root = root; + musb-debugfs_root = root; return 0; @@ -274,5 +272,5 @@ err0: void /* __init_or_exit */ musb_exit_debugfs(struct musb *musb) { - debugfs_remove_recursive(musb_debugfs_root); + debugfs_remove_recursive(musb-debugfs_root); } -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v8 01/13] usb: musb: dsps: add phy control logic to glue
From: Santhapuri, Damodar damodar.santhap...@ti.com AM335x uses NOP transceiver driver and need to enable builtin PHY by writing into usb_ctrl register available in system control module register space. This is being added at musb glue driver layer untill a separate system control module driver is available. Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com Signed-off-by: Santhapuri, Damodar damodar.santhap...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com --- arch/arm/mach-omap2/board-ti8168evm.c |1 - arch/arm/mach-omap2/omap_phy_internal.c | 35 arch/arm/plat-omap/include/plat/usb.h |5 +- drivers/usb/musb/musb_dsps.c| 87 +-- 4 files changed, 73 insertions(+), 55 deletions(-) diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c index d4c8392..0c7c098 100644 --- a/arch/arm/mach-omap2/board-ti8168evm.c +++ b/arch/arm/mach-omap2/board-ti8168evm.c @@ -26,7 +26,6 @@ #include plat/usb.h static struct omap_musb_board_data musb_board_data = { - .set_phy_power = ti81xx_musb_phy_power, .interface_type = MUSB_INTERFACE_ULPI, .mode = MUSB_OTG, .power = 500, diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c index d52651a..d80bb16 100644 --- a/arch/arm/mach-omap2/omap_phy_internal.c +++ b/arch/arm/mach-omap2/omap_phy_internal.c @@ -254,38 +254,3 @@ void am35x_set_mode(u8 musb_mode) omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2); } - -void ti81xx_musb_phy_power(u8 on) -{ - void __iomem *scm_base = NULL; - u32 usbphycfg; - - scm_base = ioremap(TI81XX_SCM_BASE, SZ_2K); - if (!scm_base) { - pr_err(system control module ioremap failed\n); - return; - } - - usbphycfg = __raw_readl(scm_base + USBCTRL0); - - if (on) { - if (cpu_is_ti816x()) { - usbphycfg |= TI816X_USBPHY0_NORMAL_MODE; - usbphycfg = ~TI816X_USBPHY_REFCLK_OSC; - } else if (cpu_is_ti814x()) { - usbphycfg = ~(USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN - | USBPHY_DPINPUT | USBPHY_DMINPUT); - usbphycfg |= (USBPHY_OTGVDET_EN | USBPHY_OTGSESSEND_EN - | USBPHY_DPOPBUFCTL | USBPHY_DMOPBUFCTL); - } - } else { - if (cpu_is_ti816x()) - usbphycfg = ~TI816X_USBPHY0_NORMAL_MODE; - else if (cpu_is_ti814x()) - usbphycfg |= USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN; - - } - __raw_writel(usbphycfg, scm_base + USBCTRL0); - - iounmap(scm_base); -} diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h index 548a4c8..c2aa4ae 100644 --- a/arch/arm/plat-omap/include/plat/usb.h +++ b/arch/arm/plat-omap/include/plat/usb.h @@ -95,7 +95,6 @@ extern void am35x_musb_reset(void); extern void am35x_musb_phy_power(u8 on); extern void am35x_musb_clear_irq(void); extern void am35x_set_mode(u8 musb_mode); -extern void ti81xx_musb_phy_power(u8 on); /* AM35x */ /* USB 2.0 PHY Control */ @@ -120,8 +119,8 @@ extern void ti81xx_musb_phy_power(u8 on); #define CONF2_DATPOL (1 1) /* TI81XX specific definitions */ -#define USBCTRL0 0x620 -#define USBSTAT0 0x624 +#define MUSB_USBSS_REV_816X0x9 +#define MUSB_USBSS_REV_814X0xb /* TI816X PHY controls bits */ #define TI816X_USBPHY0_NORMAL_MODE (1 0) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 84d8181..960258d 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -116,9 +116,46 @@ struct dsps_glue { struct platform_device *musb; /* child musb pdev */ const struct dsps_musb_wrapper *wrp; /* wrapper register offsets */ struct timer_list timer;/* otg_workaround timer */ + u32 __iomem *usb_ctrl; + u8 usbss_rev; }; /** + * musb_dsps_phy_control - phy on/off + * @glue: struct dsps_glue * + * @on: flag for phy to be switched on or off + * + * This is to enable the PHY using usb_ctrl register in system control + * module space. + * + * XXX: This function will be removed once we have a seperate driver for + * control module + */ +static void musb_dsps_phy_control(struct dsps_glue *glue, u8 on) +{ + u32 usbphycfg; + + usbphycfg = __raw_readl(glue-usb_ctrl); + + if (on) { + if (glue-usbss_rev == MUSB_USBSS_REV_816X) { + usbphycfg |= TI816X_USBPHY0_NORMAL_MODE; + usbphycfg = ~TI816X_USBPHY_REFCLK_OSC; + } else if (glue-usbss_rev == MUSB_USBSS_REV_814X) { + usbphycfg = ~(USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN + | USBPHY_DPINPUT | USBPHY_DMINPUT); +
[PATCH v8 00/13] usb: musb: adding multi instance support
This series of patches adds, a) Multi instances support in musb driver b) DT support for musb_dsps glue layer c) DT support for NOP transceiver AM33xx and TI81xx has dual musb controller and has two usb PHY of same type. This patch series uses 'phandle' based API devm_usb_get_phy_by_phandle() to get the PHY of same type. This API support is being added by Kishon's patch discussed at [1] The series applies to felipe/master [1] branch + Vaibhav baseport patches on his tree at [4] + Kishon's multi phy patches on Felipe's branch 'xceiv' + Kishon's patch on phandle at [2] + Damodar's recent patch at [3] + Ajay's Damodar's patches at [5] and [6] included in this series 1. http://git.kernel.org/?p=linux/kernel/git/balbi/usb.git;a=summary 2. http://marc.info/?l=linux-usbm=134070369306112w=2 3. http://marc.info/?l=linux-usbm=134200284230689w=2 4. https://github.com/hvaibhav/am335x-linux/commits/am335x-upstream-staging 5. http://marc.info/?l=linux-usbm=134200285530701w=2 6. http://marc.info/?l=linux-usbm=134208820028625w=2 Changes from v7: - patches rebased on felipe/master branch verified - included additional two patches 0001 0002 as part of this series which are already submitted [5] [6] Changes from v6: - Removed parent_pdev to get glue and used dev_get_getdrv() as per Felipe's comment - use pr_debug() instead of pr_info() as per Felipe's comment Changes from v5: - Removed musb-id as per Felipe's comment - used nop_ida as per Felipe's comment Changes from v4: - Fixed Felipe's comment for adding EXPORT_SYMBOL_GPL() - Fixed Felipe's comment on using dev_set_mask() Changes from v3: - Fixed Kishon's comment on removing id from phy struct and removing unneeded #else part. Changes from v2: - Fixed Sergei's comment on not using address prefix in musb_dsps glue and nop transceiver dt dats. - Also removed the ti string in compatible property for nop data. Changes from v1: - Defined musb_ida to manage core ids based on Felipe's comment in [PATCH 01/11] Ajay Kumar Gupta (7): usb: musb: dsps: enable phy control for am335x usb: musb: kill global and static for multi instance usb: musb: dsps: add dt support arm/dts: am33xx: Add dt data for usbss arm/dts: am33xx: add dt data for usb nop phy usb: musb: dsps: remove explicit NOP device creation arm/dts: am33xx: add phy phandle to usbss Ravi Babu (3): usb: musb: add musb_ida for multi instance support usb: musb: am335x: add support for dual instance usb: otg: nop: add dt support Santhapuri, Damodar (3): usb: musb: dsps: add phy control logic to glue usb: otg: nop: add support for multiple tranceiver usb: musb: dsps: get the PHY using phandle api .../devicetree/bindings/usb/am33xx-usb.txt | 19 ++ arch/arm/boot/dts/am33xx.dtsi | 21 ++ arch/arm/mach-omap2/board-ti8168evm.c |1 - arch/arm/mach-omap2/omap_phy_internal.c| 35 --- arch/arm/plat-omap/include/plat/usb.h |6 +- drivers/usb/musb/am35x.c | 44 ++- drivers/usb/musb/blackfin.c| 28 ++- drivers/usb/musb/da8xx.c | 36 ++- drivers/usb/musb/davinci.c | 38 ++- drivers/usb/musb/musb_core.c | 53 +++- drivers/usb/musb/musb_core.h |6 + drivers/usb/musb/musb_debugfs.c|8 +- drivers/usb/musb/musb_dsps.c | 281 +++- drivers/usb/musb/omap2430.c| 26 ++- drivers/usb/musb/tusb6010.c| 30 ++- drivers/usb/musb/ux500.c | 33 ++- drivers/usb/otg/nop-usb-xceiv.c| 64 - include/linux/usb/nop-usb-xceiv.h |4 +- 18 files changed, 523 insertions(+), 210 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/am33xx-usb.txt -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v8 05/13] usb: musb: am335x: add support for dual instance
AM335x and TI81xx platform has dual musb controller so updating the musb_dspc.c to support the same. Changes: - Moved otg_workaround timer to glue structure - Moved static local variable last_timer to glue structure - PHY on/off related cleanups Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com Signed-off-by: Santhapuri, Damodar damodar.santhap...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com --- drivers/usb/musb/musb_dsps.c | 112 +- 1 files changed, 66 insertions(+), 46 deletions(-) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 36130ba..f883c25 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -106,6 +106,8 @@ struct dsps_musb_wrapper { /* miscellaneous stuff */ u32 musb_core_offset; u8 poll_seconds; + /* number of musb instances */ + u8 instances; }; /** @@ -113,16 +115,18 @@ struct dsps_musb_wrapper { */ struct dsps_glue { struct device *dev; - struct platform_device *musb; /* child musb pdev */ + struct platform_device *musb[2];/* child musb pdev */ const struct dsps_musb_wrapper *wrp; /* wrapper register offsets */ - struct timer_list timer;/* otg_workaround timer */ - u32 __iomem *usb_ctrl; + struct timer_list timer[2]; /* otg_workaround timer */ + unsigned long last_timer[2];/* last timer data for each instance */ + u32 __iomem *usb_ctrl[2]; u8 usbss_rev; }; /** * musb_dsps_phy_control - phy on/off * @glue: struct dsps_glue * + * @id: musb instance * @on: flag for phy to be switched on or off * * This is to enable the PHY using usb_ctrl register in system control @@ -131,11 +135,11 @@ struct dsps_glue { * XXX: This function will be removed once we have a seperate driver for * control module */ -static void musb_dsps_phy_control(struct dsps_glue *glue, u8 on) +static void musb_dsps_phy_control(struct dsps_glue *glue, u8 id, u8 on) { u32 usbphycfg; - usbphycfg = __raw_readl(glue-usb_ctrl); + usbphycfg = __raw_readl(glue-usb_ctrl[id]); if (on) { if (glue-usbss_rev == MUSB_USBSS_REV_816X) { @@ -158,7 +162,7 @@ static void musb_dsps_phy_control(struct dsps_glue *glue, u8 on) glue-usbss_rev == MUSB_USBSS_REV_33XX) usbphycfg |= USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN; } - __raw_writel(usbphycfg, glue-usb_ctrl); + __raw_writel(usbphycfg, glue-usb_ctrl[id]); } /** * dsps_musb_enable - enable interrupts @@ -207,8 +211,8 @@ static void otg_timer(unsigned long _musb) struct musb *musb = (void *)_musb; void __iomem *mregs = musb-mregs; struct device *dev = musb-controller; - struct platform_device *pdev = to_platform_device(dev-parent); - struct dsps_glue *glue = platform_get_drvdata(pdev); + struct platform_device *pdev = to_platform_device(dev); + struct dsps_glue *glue = dev_get_drvdata(dev-parent); const struct dsps_musb_wrapper *wrp = glue-wrp; u8 devctl; unsigned long flags; @@ -244,7 +248,7 @@ static void otg_timer(unsigned long _musb) case OTG_STATE_B_IDLE: devctl = dsps_readb(mregs, MUSB_DEVCTL); if (devctl MUSB_DEVCTL_BDEVICE) - mod_timer(glue-timer, + mod_timer(glue-timer[pdev-id], jiffies + wrp-poll_seconds * HZ); else musb-xceiv-state = OTG_STATE_A_IDLE; @@ -258,9 +262,8 @@ static void otg_timer(unsigned long _musb) static void dsps_musb_try_idle(struct musb *musb, unsigned long timeout) { struct device *dev = musb-controller; - struct platform_device *pdev = to_platform_device(dev-parent); - struct dsps_glue *glue = platform_get_drvdata(pdev); - static unsigned long last_timer; + struct platform_device *pdev = to_platform_device(dev); + struct dsps_glue *glue = dev_get_drvdata(dev-parent); if (timeout == 0) timeout = jiffies + msecs_to_jiffies(3); @@ -270,22 +273,23 @@ static void dsps_musb_try_idle(struct musb *musb, unsigned long timeout) musb-xceiv-state == OTG_STATE_A_WAIT_BCON)) { dev_dbg(musb-controller, %s active, deleting timer\n, otg_state_string(musb-xceiv-state)); - del_timer(glue-timer); - last_timer = jiffies; + del_timer(glue-timer[pdev-id]); + glue-last_timer[pdev-id] = jiffies; return; } - if (time_after(last_timer, timeout) timer_pending(glue-timer)) { + if (time_after(glue-last_timer[pdev-id], timeout) +
[PATCH v8 02/13] usb: musb: dsps: enable phy control for am335x
From: Ajay Kumar Gupta ajay.gu...@ti.com Enabled the phy control logic for am335x also based on usbss revision register. Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com Signed-off-by: Santhapuri, Damodar damodar.santhap...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com --- arch/arm/plat-omap/include/plat/usb.h |1 + drivers/usb/musb/musb_dsps.c | 17 +++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h index c2aa4ae..6459b10 100644 --- a/arch/arm/plat-omap/include/plat/usb.h +++ b/arch/arm/plat-omap/include/plat/usb.h @@ -121,6 +121,7 @@ extern void am35x_set_mode(u8 musb_mode); /* TI81XX specific definitions */ #define MUSB_USBSS_REV_816X0x9 #define MUSB_USBSS_REV_814X0xb +#define MUSB_USBSS_REV_33XX0xd /* TI816X PHY controls bits */ #define TI816X_USBPHY0_NORMAL_MODE (1 0) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 960258d..e62fa05 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -141,16 +141,21 @@ static void musb_dsps_phy_control(struct dsps_glue *glue, u8 on) if (glue-usbss_rev == MUSB_USBSS_REV_816X) { usbphycfg |= TI816X_USBPHY0_NORMAL_MODE; usbphycfg = ~TI816X_USBPHY_REFCLK_OSC; - } else if (glue-usbss_rev == MUSB_USBSS_REV_814X) { - usbphycfg = ~(USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN - | USBPHY_DPINPUT | USBPHY_DMINPUT); - usbphycfg |= (USBPHY_OTGVDET_EN | USBPHY_OTGSESSEND_EN - | USBPHY_DPOPBUFCTL | USBPHY_DMOPBUFCTL); + } else if (glue-usbss_rev == MUSB_USBSS_REV_814X || + glue-usbss_rev == MUSB_USBSS_REV_33XX) { + usbphycfg = ~(USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN); + usbphycfg |= USBPHY_OTGVDET_EN | USBPHY_OTGSESSEND_EN; + if (glue-usbss_rev == MUSB_USBSS_REV_814X) { + usbphycfg = ~(USBPHY_DPINPUT | USBPHY_DMINPUT); + usbphycfg |= USBPHY_DPOPBUFCTL + | USBPHY_DMOPBUFCTL; + } } } else { if (glue-usbss_rev == MUSB_USBSS_REV_816X) usbphycfg = ~TI816X_USBPHY0_NORMAL_MODE; - else if (glue-usbss_rev == MUSB_USBSS_REV_814X) + else if (glue-usbss_rev == MUSB_USBSS_REV_814X || + glue-usbss_rev == MUSB_USBSS_REV_33XX) usbphycfg |= USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN; } __raw_writel(usbphycfg, glue-usb_ctrl); -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v8 08/13] arm/dts: am33xx: Add dt data for usbss
From: Ajay Kumar Gupta ajay.gu...@ti.com Added device tree data for usbss on am33xx. There are two musb controllers on am33xx platform so have port0_mode and port1_mode additional data. Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com Signed-off-by: Santhapuri, Damodar damodar.santhap...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com --- arch/arm/boot/dts/am33xx.dtsi | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 59509c4..778b95e 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi @@ -154,5 +154,16 @@ #size-cells = 0; ti,hwmods = i2c3; }; + + usb_otg_hs: usb_otg_hs { + compatible = ti,musb-am33xx; + ti,hwmods = usb_otg_hs; + multipoint = 1; + num_eps = 16; + ram_bits = 12; + port0_mode = 3; + port1_mode = 3; + power = 250; + }; }; }; -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v8 10/13] usb: musb: dsps: remove explicit NOP device creation
From: Ajay Kumar Gupta ajay.gu...@ti.com As NOP device node is now added in am33xx tree so remove the call which creates the NOP platform_device. Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com Signed-off-by: Santhapuri, Damodar damodar.santhap...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com --- drivers/usb/musb/musb_dsps.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 2c104bf..2775496 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -418,8 +418,7 @@ static int dsps_musb_init(struct musb *musb) /* mentor core register starts at offset of 0x400 from musb base */ musb-mregs += wrp-musb_core_offset; - /* Register NOP driver */ - usb_nop_xceiv_register(); + /* Get the NOP PHY */ musb-xceiv = usb_get_phy(USB_PHY_TYPE_USB2); if (IS_ERR_OR_NULL(musb-xceiv)) return -ENODEV; -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v8 03/13] usb: musb: add musb_ida for multi instance support
Added musb_ida in musb_core.c to manage the multi core ids. Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com Signed-off-by: Santhapuri, Damodar damodar.santhap...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com --- drivers/usb/musb/am35x.c | 42 -- drivers/usb/musb/blackfin.c | 26 -- drivers/usb/musb/da8xx.c | 34 -- drivers/usb/musb/davinci.c | 34 -- drivers/usb/musb/musb_core.c | 31 +++ drivers/usb/musb/musb_core.h |2 ++ drivers/usb/musb/musb_dsps.c | 25 ++--- drivers/usb/musb/omap2430.c | 26 -- drivers/usb/musb/tusb6010.c | 26 -- drivers/usb/musb/ux500.c | 33 +++-- 10 files changed, 210 insertions(+), 69 deletions(-) diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c index 29b1d60..457f25e 100644 --- a/drivers/usb/musb/am35x.c +++ b/drivers/usb/musb/am35x.c @@ -459,6 +459,7 @@ static int __devinit am35x_probe(struct platform_device *pdev) struct clk *clk; int ret = -ENOMEM; + int musbid; glue = kzalloc(sizeof(*glue), GFP_KERNEL); if (!glue) { @@ -466,38 +467,47 @@ static int __devinit am35x_probe(struct platform_device *pdev) goto err0; } - musb = platform_device_alloc(musb-hdrc, -1); + /* get the musb id */ + musbid = musb_get_id(pdev-dev, GFP_KERNEL); + if (musbid 0) { + dev_err(pdev-dev, failed to allocate musb id\n); + ret = -ENOMEM; + goto err1; + } + + musb = platform_device_alloc(musb-hdrc, musbid); if (!musb) { dev_err(pdev-dev, failed to allocate musb device\n); - goto err1; + goto err2; } phy_clk = clk_get(pdev-dev, fck); if (IS_ERR(phy_clk)) { dev_err(pdev-dev, failed to get PHY clock\n); ret = PTR_ERR(phy_clk); - goto err2; + goto err3; } clk = clk_get(pdev-dev, ick); if (IS_ERR(clk)) { dev_err(pdev-dev, failed to get clock\n); ret = PTR_ERR(clk); - goto err3; + goto err4; } ret = clk_enable(phy_clk); if (ret) { dev_err(pdev-dev, failed to enable PHY clock\n); - goto err4; + goto err5; } ret = clk_enable(clk); if (ret) { dev_err(pdev-dev, failed to enable clock\n); - goto err5; + goto err6; } + musb-id= musbid; musb-dev.parent= pdev-dev; musb-dev.dma_mask = am35x_dmamask; musb-dev.coherent_dma_mask = am35x_dmamask; @@ -515,38 +525,41 @@ static int __devinit am35x_probe(struct platform_device *pdev) pdev-num_resources); if (ret) { dev_err(pdev-dev, failed to add resources\n); - goto err6; + goto err7; } ret = platform_device_add_data(musb, pdata, sizeof(*pdata)); if (ret) { dev_err(pdev-dev, failed to add platform_data\n); - goto err6; + goto err7; } ret = platform_device_add(musb); if (ret) { dev_err(pdev-dev, failed to register musb device\n); - goto err6; + goto err7; } return 0; -err6: +err7: clk_disable(clk); -err5: +err6: clk_disable(phy_clk); -err4: +err5: clk_put(clk); -err3: +err4: clk_put(phy_clk); -err2: +err3: platform_device_put(musb); +err2: + musb_put_id(pdev-dev, musbid); + err1: kfree(glue); @@ -558,6 +571,7 @@ static int __devexit am35x_remove(struct platform_device *pdev) { struct am35x_glue *glue = platform_get_drvdata(pdev); + musb_put_id(pdev-dev, glue-musb-id); platform_device_del(glue-musb); platform_device_put(glue-musb); clk_disable(glue-clk); diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index 2a80dec..e8cff9b 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb/blackfin.c @@ -455,6 +455,7 @@ static int __devinit bfin_probe(struct platform_device *pdev) struct bfin_glue*glue; int ret = -ENOMEM; + int musbid; glue = kzalloc(sizeof(*glue), GFP_KERNEL); if (!glue) { @@ -462,12 +463,21 @@ static int __devinit bfin_probe(struct platform_device *pdev)
[PATCH v8 11/13] usb: musb: dsps: get the PHY using phandle api
From: Santhapuri, Damodar damodar.santhap...@ti.com AM33xx has two PHY of same type used by each musb controller so use phandle of phy nodes to get the phy pointer. Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com Signed-off-by: Santhapuri, Damodar damodar.santhap...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com --- .../devicetree/bindings/usb/am33xx-usb.txt |2 ++ drivers/usb/musb/musb_dsps.c |5 - 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/am33xx-usb.txt b/Documentation/devicetree/bindings/usb/am33xx-usb.txt index ca8fa56..b0caac3 100644 --- a/Documentation/devicetree/bindings/usb/am33xx-usb.txt +++ b/Documentation/devicetree/bindings/usb/am33xx-usb.txt @@ -12,3 +12,5 @@ AM33XX MUSB GLUE represents PERIPHERAL. - power : Should be 250. This signifies the controller can supply upto 500mA when operating in host mode. + - usb0-phy : phandle for usb0 NOP PHY + - usb1-phy : phandle for usb1 NOP PHY diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 2775496..46a2344 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -409,9 +409,11 @@ static int dsps_musb_init(struct musb *musb) { struct device *dev = musb-controller; struct platform_device *pdev = to_platform_device(dev); + struct platform_device *parent_pdev = to_platform_device(dev-parent); struct dsps_glue *glue = dev_get_drvdata(dev-parent); const struct dsps_musb_wrapper *wrp = glue-wrp; void __iomem *reg_base = musb-ctrl_base; + char name[10]; u32 rev, val; int status; @@ -419,7 +421,8 @@ static int dsps_musb_init(struct musb *musb) musb-mregs += wrp-musb_core_offset; /* Get the NOP PHY */ - musb-xceiv = usb_get_phy(USB_PHY_TYPE_USB2); + sprintf(name, usb%d-phy, pdev-id); + musb-xceiv = devm_usb_get_phy_by_phandle(parent_pdev-dev, name); if (IS_ERR_OR_NULL(musb-xceiv)) return -ENODEV; -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v8 09/13] arm/dts: am33xx: add dt data for usb nop phy
From: Ajay Kumar Gupta ajay.gu...@ti.com AM33xx has two musb controller and they have one NOP PHY each. Added the device tree data for NOP PHY. Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com Signed-off-by: Santhapuri, Damodar damodar.santhap...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com --- arch/arm/boot/dts/am33xx.dtsi |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 778b95e..789c384 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi @@ -155,6 +155,14 @@ ti,hwmods = i2c3; }; + usb0_phy: phy0 { + compatible = nop-xceiv-usb; + }; + + usb1_phy: phy1 { + compatible = nop-xceiv-usb; + }; + usb_otg_hs: usb_otg_hs { compatible = ti,musb-am33xx; ti,hwmods = usb_otg_hs; -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v8 06/13] usb: otg: nop: add support for multiple tranceiver
From: Santhapuri, Damodar damodar.santhap...@ti.com Currently we have one single nop transceiver support as same is defined as a global variable in drivers/usb/otg/nop-usb-xceiv.c. This need to be changed to support multiple otg controller each using nop transceiver on a platform such as am335x. Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com Signed-off-by: Santhapuri, Damodar damodar.santhap...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com --- drivers/usb/musb/am35x.c |2 +- drivers/usb/musb/blackfin.c |2 +- drivers/usb/musb/da8xx.c |2 +- drivers/usb/musb/davinci.c|4 +- drivers/usb/musb/musb_dsps.c |8 +++--- drivers/usb/musb/tusb6010.c |4 +- drivers/usb/otg/nop-usb-xceiv.c | 54 - include/linux/usb/nop-usb-xceiv.h |4 +- 8 files changed, 60 insertions(+), 20 deletions(-) diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c index 457f25e..e3099fc 100644 --- a/drivers/usb/musb/am35x.c +++ b/drivers/usb/musb/am35x.c @@ -399,7 +399,7 @@ static int am35x_musb_exit(struct musb *musb) data-set_phy_power(0); usb_put_phy(musb-xceiv); - usb_nop_xceiv_unregister(); + usb_nop_xceiv_unregister(musb-xceiv); return 0; } diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index e8cff9b..32b4fe4 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb/blackfin.c @@ -427,7 +427,7 @@ static int bfin_musb_exit(struct musb *musb) gpio_free(musb-config-gpio_vrsel); usb_put_phy(musb-xceiv); - usb_nop_xceiv_unregister(); + usb_nop_xceiv_unregister(musb-xceiv); return 0; } diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c index ce11d20..f86a1c7 100644 --- a/drivers/usb/musb/da8xx.c +++ b/drivers/usb/musb/da8xx.c @@ -451,7 +451,7 @@ static int da8xx_musb_exit(struct musb *musb) phy_off(); usb_put_phy(musb-xceiv); - usb_nop_xceiv_unregister(); + usb_nop_xceiv_unregister(musb-xceiv); return 0; } diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c index 606bfd0..e12d20a 100644 --- a/drivers/usb/musb/davinci.c +++ b/drivers/usb/musb/davinci.c @@ -437,7 +437,7 @@ static int davinci_musb_init(struct musb *musb) fail: usb_put_phy(musb-xceiv); unregister: - usb_nop_xceiv_unregister(); + usb_nop_xceiv_unregister(musb-xceiv); return -ENODEV; } @@ -485,7 +485,7 @@ static int davinci_musb_exit(struct musb *musb) phy_off(); usb_put_phy(musb-xceiv); - usb_nop_xceiv_unregister(); + usb_nop_xceiv_unregister(musb-xceiv); return 0; } diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index f883c25..25e395b 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -413,7 +413,7 @@ static int dsps_musb_init(struct musb *musb) /* mentor core register starts at offset of 0x400 from musb base */ musb-mregs += wrp-musb_core_offset; - /* NOP driver needs change if supporting dual instance */ + /* Register NOP driver */ usb_nop_xceiv_register(); musb-xceiv = usb_get_phy(USB_PHY_TYPE_USB2); if (IS_ERR_OR_NULL(musb-xceiv)) @@ -447,7 +447,7 @@ static int dsps_musb_init(struct musb *musb) return 0; err0: usb_put_phy(musb-xceiv); - usb_nop_xceiv_unregister(); + usb_nop_xceiv_unregister(musb-xceiv); return status; } @@ -462,9 +462,9 @@ static int dsps_musb_exit(struct musb *musb) /* Shutdown the on-chip PHY and its PLL. */ musb_dsps_phy_control(glue, pdev-id, 0); - /* NOP driver needs change if supporting dual instance */ + /* Unregister NOP driver */ usb_put_phy(musb-xceiv); - usb_nop_xceiv_unregister(); + usb_nop_xceiv_unregister(musb-xceiv); return 0; } diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c index dc4d75e..71c4778 100644 --- a/drivers/usb/musb/tusb6010.c +++ b/drivers/usb/musb/tusb6010.c @@ -1117,7 +1117,7 @@ done: iounmap(sync); usb_put_phy(musb-xceiv); - usb_nop_xceiv_unregister(); + usb_nop_xceiv_unregister(musb-xceiv); } return ret; } @@ -1133,7 +1133,7 @@ static int tusb_musb_exit(struct musb *musb) iounmap(musb-sync_va); usb_put_phy(musb-xceiv); - usb_nop_xceiv_unregister(); + usb_nop_xceiv_unregister(musb-xceiv); return 0; } diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c index e52e35e..7e0dba3 100644 --- a/drivers/usb/otg/nop-usb-xceiv.c +++ b/drivers/usb/otg/nop-usb-xceiv.c @@ -32,30 +32,69 @@ #include linux/usb/otg.h #include linux/usb/nop-usb-xceiv.h #include linux/slab.h +#include linux/idr.h struct nop_usb_xceiv {
[PATCH v8 12/13] arm/dts: am33xx: add phy phandle to usbss
From: Ajay Kumar Gupta ajay.gu...@ti.com Added NOP PHY phandle to usbss device node as same will be used to get the phy from otg framework. Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com Signed-off-by: Santhapuri, Damodar damodar.santhap...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com --- arch/arm/boot/dts/am33xx.dtsi |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 789c384..c36b886 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi @@ -172,6 +172,8 @@ port0_mode = 3; port1_mode = 3; power = 250; + usb0-phy = usb0_phy; + usb1-phy = usb1_phy; }; }; }; -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v8 08/13] arm/dts: am33xx: Add dt data for usbss
Hello. On 30-08-2012 14:50, Ravi Babu wrote: From: Ajay Kumar Gupta ajay.gu...@ti.com Added device tree data for usbss on am33xx. There are two musb controllers on am33xx platform so have port0_mode and port1_mode additional data. Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com Signed-off-by: Santhapuri, Damodar damodar.santhap...@ti.com Signed-off-by: Ravi Babu ravib...@ti.com --- arch/arm/boot/dts/am33xx.dtsi | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 59509c4..778b95e 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi @@ -154,5 +154,16 @@ #size-cells = 0; ti,hwmods = i2c3; }; + + usb_otg_hs: usb_otg_hs { + compatible = ti,musb-am33xx; + ti,hwmods = usb_otg_hs; + multipoint = 1; + num_eps = 16; + ram_bits = 12; + port0_mode = 3; + port1_mode = 3; Hyphen is preferred traditionally to underscore in the device tree files... WBR, Sergei -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 00/23] OMAPDSS: Create output entities
Create a new entity in OMAPDSS called outputs. These represent the interfaces/outputs like DSI, HDMI etc. that a panel connects to. An output sits in between an overlay manager and a panel. More details about outputs are explained in the first patch of the series. This series adds omap_dss_output as an entity along with omap_overlay, omap_overlay_manager and omap_dss_device. It changes the code to establish links between managers and outputs, and outputs and devices. Changes since v1: - Output drivers private data structs hold the output struct rather than output.c allocating it. This struct is added to a list when dss_register_output()is called. - Outputs are not passed from panel driver to output driver anymore. We are sticking to passing omap_dss_device for now till we get a clearer picture on how common panel framework turns out. Outputs are still used within the output driver, rather than passing dssdev everywhere. Reference tree: git://gitorious.org/~boddob/linux-omap-dss2/archit-dss2-clone.git 2-add-outputs Archit Taneja (23): OMAPDSS: outputs: Create a new entity called outputs OMAPDSS: outputs: Create and register output instances OMAPDSS: output: Add set/unset device ops for omap_dss_output OMAPDSS: APPLY: Add manager set/unset output ops for omap_overlay_manager OMAPDSS: Remove manager-device references OMAP_VOUT: Remove manager-device references OMAPFB: remove manager-device references OMAPDRM: Remove manager-device references OMAPDSS: Create links between managers, outputs and devices OMAPDSS: DPI: Pass omap_dss_output within the driver OMAPDSS: DSI: Remove dsi_pdev_map global struct OMAPDSS: DSI: Pass omap_dss_output within the driver OMAPDSS: SDI: Pass omap_dss_output within the driver OMAPDSS: RFBI: Pass omap_dss_output within the driver OMAPDSS: RFBI: Add dssdev pointers as arguments to all exported functions OMAPDSS: VENC: Pass omap_dss_output within the driver OMAPDSS: HDMI: Pass omap_dss_output within the driver OMAPDSS: HDMI: Add dssdev pointer as an argument to all functions used by hdmi panel driver OMAPDSS/OMAPFB: Change dssdev-manager references OMAPDSS: MANAGER: Update display sysfs store OMAPDSS: MANAGER: Get device via output OMAPDSS: APPLY: Remove omap_dss_device references from dss_ovl_enable/disable OMAPDSS: Remove old way of setting manager and device links drivers/media/video/omap/omap_vout.c | 81 +++--- drivers/staging/omapdrm/omap_drv.c|5 +- drivers/video/omap2/displays/panel-n8x0.c | 55 --- drivers/video/omap2/dss/Makefile |2 +- drivers/video/omap2/dss/apply.c | 52 +++--- drivers/video/omap2/dss/dispc.c | 10 +- drivers/video/omap2/dss/display.c | 11 +- drivers/video/omap2/dss/dpi.c | 70 +--- drivers/video/omap2/dss/dsi.c | 249 ++--- drivers/video/omap2/dss/dss.h | 23 ++- drivers/video/omap2/dss/dss_features.c| 52 ++ drivers/video/omap2/dss/dss_features.h|1 + drivers/video/omap2/dss/hdmi.c| 72 ++--- drivers/video/omap2/dss/hdmi_panel.c | 20 +-- drivers/video/omap2/dss/manager.c | 48 -- drivers/video/omap2/dss/output.c | 110 + drivers/video/omap2/dss/overlay.c | 96 ++- drivers/video/omap2/dss/rfbi.c| 66 +--- drivers/video/omap2/dss/sdi.c | 35 ++-- drivers/video/omap2/dss/venc.c| 47 -- drivers/video/omap2/omapfb/omapfb-ioctl.c |7 +- drivers/video/omap2/omapfb/omapfb-main.c |7 +- drivers/video/omap2/omapfb/omapfb.h |5 +- include/video/omapdss.h | 72 +++-- 24 files changed, 848 insertions(+), 348 deletions(-) create mode 100644 drivers/video/omap2/dss/output.c -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 01/23] OMAPDSS: outputs: Create a new entity called outputs
The current OMAPDSS design contains 3 software entities: Overlays, Managers and Devices. These map to pipelines, overlay managers and the panels respectively in hardware. One or more overlays connect to a manager to represent a composition, the manager connects to a device(generally a display) to display the content. The part of DSS hardware which isn't represented by any of the above entities are interfaces/outputs that connect to an overlay manager, i.e blocks like DSI, HDMI, VENC and so on. Currently, an overlay manager directly connects to the display, and the output to which it is actually connected is ignored. The panel driver of the display is responsible of calling output specific functions to configure the output. Adding outputs as a new software entity gives us the following benefits: - Have exact information on the possible connections between managers and outputs: A manager can't connect to each and every output, there only limited hardware links between a manager's video port and some of the outputs. - Remove hacks related to connecting managers and devices: Currently, default links between managers and devices are set in a not so clean way. Matching is done via comparing the device type, and the display types supported by the manager. This isn't sufficient to establish all the possible links between managers, outputs and devices in hardware. - Make panel drivers more generic: The DSS panel drivers currently call interface/output specific functions to configure the hardware IP. When making these calls, the driver isn't actually aware of the underlying output. The output driver extracts information from the panel's omap_dss_device pointer to figure out which interface it is connected to, and then configures the corresponding output block. An example of this is when a DSI panel calls dsi functions, the dsi driver figures out whether the panel is connected to DSI1 or DSI2. This isn't correct, and having output as entities will give the panel driver the exact information on which output to configure. Having outputs also gives the opportunity to make panel drivers generic across different platforms/SoCs, this is achieved as omap specific output calls can be replaced by ops of a particular output type. - Have more complex connections between managers, outputs and devices: OMAPDSS currently doesn't support use cases like 2 outputs connect to a single device. This can be achieved by extending properties of outputs to connect to more managers or devices. - Represent writeback as an output: The writeback pipeline fits well in OMAPDSS as compared to overlays, managers or devices. Add a new struct to represent outputs. An output struct holds pointers to the manager and device structs to which it is connected. Add functions which can register an output, or look for one. Create an enum which represent each output instance. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/Makefile |2 +- drivers/video/omap2/dss/dss.h|3 +++ drivers/video/omap2/dss/output.c | 43 ++ include/video/omapdss.h | 30 ++ 4 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 drivers/video/omap2/dss/output.c diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile index 30a48fb..645f8c3 100644 --- a/drivers/video/omap2/dss/Makefile +++ b/drivers/video/omap2/dss/Makefile @@ -1,6 +1,6 @@ obj-$(CONFIG_OMAP2_DSS) += omapdss.o omapdss-y := core.o dss.o dss_features.o dispc.o dispc_coefs.o display.o \ - manager.o overlay.o apply.o + manager.o overlay.o output.o apply.o omapdss-$(CONFIG_OMAP2_DSS_DPI) += dpi.o omapdss-$(CONFIG_OMAP2_DSS_RFBI) += rfbi.o omapdss-$(CONFIG_OMAP2_DSS_VENC) += venc.o venc_panel.o diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index d6cca82..e77d8d2 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -222,6 +222,9 @@ int dss_ovl_set_manager(struct omap_overlay *ovl, struct omap_overlay_manager *mgr); int dss_ovl_unset_manager(struct omap_overlay *ovl); +/* output */ +void dss_register_output(struct omap_dss_output *out); + /* display */ int dss_suspend_all_devices(void); int dss_resume_all_devices(void); diff --git a/drivers/video/omap2/dss/output.c b/drivers/video/omap2/dss/output.c new file mode 100644 index 000..7d81be5 --- /dev/null +++ b/drivers/video/omap2/dss/output.c @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2012 Texas Instruments Ltd + * Author: Archit Taneja arc...@ti.com + * + * 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. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of
[PATCH v2 02/23] OMAPDSS: outputs: Create and register output instances
Add output structs to output driver's private data. Register output instances by having an init function in the probes of the platform device drivers for different outputs. The *_init_output for each output registers the output and fill up the output's plaform device, type and id fields. In the probe of each interface driver, the output entities are initialized before the *_probe_pdata() functions intentionally. This is done to ensure that the output entity is prepared before the panels connected to the output are registered. We need the output entities to be ready because OMAPDSS will try to make connections between overlays, managers, outputs and devices during the panel's probe. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/dpi.c | 15 +++ drivers/video/omap2/dss/dsi.c | 18 ++ drivers/video/omap2/dss/hdmi.c | 15 +++ drivers/video/omap2/dss/rfbi.c | 17 + drivers/video/omap2/dss/sdi.c | 15 +++ drivers/video/omap2/dss/venc.c | 15 +++ 6 files changed, 95 insertions(+) diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index 25fb895..9a7aee5 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c @@ -45,6 +45,8 @@ static struct { struct omap_video_timings timings; struct dss_lcd_mgr_config mgr_config; int data_lines; + + struct omap_dss_output output; } dpi; static struct platform_device *dpi_get_dsidev(enum omap_dss_clk_source clk) @@ -410,10 +412,23 @@ static void __init dpi_probe_pdata(struct platform_device *pdev) } } +static void __init dpi_init_output(struct platform_device *pdev) +{ + struct omap_dss_output *out = dpi.output; + + dss_register_output(out); + + out-pdev = pdev; + out-id = OMAP_DSS_OUTPUT_DPI; + out-type = OMAP_DISPLAY_TYPE_DPI; +} + static int __init omap_dpi_probe(struct platform_device *pdev) { mutex_init(dpi.lock); + dpi_init_output(pdev); + dpi_probe_pdata(pdev); return 0; diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 659b6cd..6a83ab7 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -337,6 +337,8 @@ struct dsi_data { enum omap_dss_dsi_pixel_format pix_fmt; enum omap_dss_dsi_mode mode; struct omap_dss_dsi_videomode_timings vm_timings; + + struct omap_dss_output output; }; struct dsi_packet_sent_handler_data { @@ -4903,6 +4905,20 @@ static void __init dsi_probe_pdata(struct platform_device *dsidev) } } +static void __init dsi_init_output(struct platform_device *dsidev, + struct dsi_data *dsi) +{ + struct omap_dss_output *out = dsi-output; + + dss_register_output(out); + + out-pdev = dsidev; + out-id = dsi-module_id == 0 ? + OMAP_DSS_OUTPUT_DSI1 : OMAP_DSS_OUTPUT_DSI2; + + out-type = OMAP_DISPLAY_TYPE_DSI; +} + /* DSI1 HW IP initialisation */ static int __init omap_dsihw_probe(struct platform_device *dsidev) { @@ -4997,6 +5013,8 @@ static int __init omap_dsihw_probe(struct platform_device *dsidev) else dsi-num_lanes_supported = 3; + dsi_init_output(dsidev, dsi); + dsi_probe_pdata(dsidev); dsi_runtime_put(dsidev); diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 0cdf246..d93954d 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -61,6 +61,8 @@ static struct { struct hdmi_ip_data ip_data; struct clk *sys_clk; + + struct omap_dss_output output; } hdmi; /* @@ -890,6 +892,17 @@ static void __init hdmi_probe_pdata(struct platform_device *pdev) } } +static void __init hdmi_init_output(struct platform_device *pdev) +{ + struct omap_dss_output *out = hdmi.output; + + dss_register_output(out); + + out-pdev = pdev; + out-id = OMAP_DSS_OUTPUT_HDMI; + out-type = OMAP_DISPLAY_TYPE_HDMI; +} + /* HDMI HW IP initialisation */ static int __init omapdss_hdmihw_probe(struct platform_device *pdev) { @@ -933,6 +946,8 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev) dss_debugfs_create_file(hdmi, hdmi_dump_regs); + hdmi_init_output(pdev); + hdmi_probe_pdata(pdev); return 0; diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index 5a9c0e9..3450f51 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c @@ -116,6 +116,8 @@ static struct { int pixel_size; int data_lines; struct rfbi_timings intf_timings; + + struct omap_dss_output output; } rfbi; static inline void rfbi_write_reg(const struct rfbi_reg idx, u32 val) @@ -967,6 +969,19 @@ static void __init rfbi_probe_pdata(struct platform_device *pdev) } }
[PATCH v2 03/23] OMAPDSS: output: Add set/unset device ops for omap_dss_output
An output entity represented by the struct omap_dss_output connects to a omap_dss_device entity. Add functions to set or unset an output's device. This is similar to how managers and devices were connected previously. An output can connect to a device without being connected to a manager. However, the output needs to eventually connect to a manager so that the connected panel can be enabled. Keep the omap_overlay_manager pointer in omap_dss_device for now to prevent breaking things. This will be removed later when outputs are supported completely. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/output.c | 67 ++ include/video/omapdss.h |5 +++ 2 files changed, 72 insertions(+) diff --git a/drivers/video/omap2/dss/output.c b/drivers/video/omap2/dss/output.c index 7d81be5..abc3aa2 100644 --- a/drivers/video/omap2/dss/output.c +++ b/drivers/video/omap2/dss/output.c @@ -24,9 +24,76 @@ #include dss.h static LIST_HEAD(output_list); +static DEFINE_MUTEX(output_lock); + +static int dss_output_set_device(struct omap_dss_output *out, + struct omap_dss_device *dssdev) +{ + int r; + + mutex_lock(output_lock); + + if (out-device) { + DSSERR(output already has device %s connected to it\n, + out-device-name); + r = -EINVAL; + goto err; + } + + if (out-type != dssdev-type) { + DSSERR(output type and display type don't match\n); + r = -EINVAL; + goto err; + } + + out-device = dssdev; + dssdev-output = out; + + mutex_unlock(output_lock); + + return 0; +err: + mutex_unlock(output_lock); + + return r; +} + +static int dss_output_unset_device(struct omap_dss_output *out) +{ + int r; + + mutex_lock(output_lock); + + if (!out-device) { + DSSERR(output doesn't have a device connected to it\n); + r = -EINVAL; + goto err; + } + + if (out-device-state != OMAP_DSS_DISPLAY_DISABLED) { + DSSERR(device %s is not disabled, cannot unset device\n, + out-device-name); + r = -EINVAL; + goto err; + } + + out-device-output = NULL; + out-device = NULL; + + mutex_unlock(output_lock); + + return 0; +err: + mutex_unlock(output_lock); + + return r; +} void dss_register_output(struct omap_dss_output *out) { + out-set_device = dss_output_set_device; + out-unset_device = dss_output_unset_device; + list_add_tail(out-list, output_list); } diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 2926a04..b3fba19 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -518,6 +518,10 @@ struct omap_dss_output { struct omap_overlay_manager *manager; struct omap_dss_device *device; + + int (*set_device) (struct omap_dss_output *out, + struct omap_dss_device *dssdev); + int (*unset_device) (struct omap_dss_output *out); }; struct omap_dss_device { @@ -619,6 +623,7 @@ struct omap_dss_device { enum omap_display_caps caps; struct omap_overlay_manager *manager; + struct omap_dss_output *output; enum omap_dss_display_state state; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 04/23] OMAPDSS: APPLY: Add manager set/unset output ops for omap_overlay_manager
Add set_output/unset_output ops for overlay managers, these form links between managers and outputs. Create a function in dss features which tell all the output instances that connect to a manager, use it when a manager tries to set an output. Add a constraint of not unsetting an output when the manager is enabled. Keep the omap_dss_device pointer and set/unset_device ops in overlay_manager for now to not break things. Keep the dss feature function get_supported_displays as it's used in some places. These will be removed later. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/apply.c| 70 drivers/video/omap2/dss/dss.h |3 ++ drivers/video/omap2/dss/dss_features.c | 52 drivers/video/omap2/dss/dss_features.h |1 + drivers/video/omap2/dss/manager.c |4 ++ include/video/omapdss.h|5 +++ 6 files changed, 135 insertions(+) diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index 74f1a58..d241407 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c @@ -1311,6 +1311,76 @@ err: return r; } +int dss_mgr_set_output(struct omap_overlay_manager *mgr, + struct omap_dss_output *output) +{ + int r; + + mutex_lock(apply_lock); + + if (mgr-output) { + DSSERR(manager %s is already connected to an output\n, + mgr-name); + r = -EINVAL; + goto err; + } + + if ((mgr-supported_outputs output-id) == 0) { + DSSERR(output does not support manager %s\n, + mgr-name); + r = -EINVAL; + goto err; + } + + output-manager = mgr; + mgr-output = output; + + mutex_unlock(apply_lock); + + return 0; +err: + mutex_unlock(apply_lock); + return r; +} + +int dss_mgr_unset_output(struct omap_overlay_manager *mgr) +{ + int r; + struct mgr_priv_data *mp = get_mgr_priv(mgr); + unsigned long flags; + + mutex_lock(apply_lock); + + if (!mgr-output) { + DSSERR(failed to unset output, output not set\n); + r = -EINVAL; + goto err; + } + + spin_lock_irqsave(data_lock, flags); + + if (mp-enabled) { + DSSERR(output can't be unset when manager is enabled\n); + r = -EINVAL; + goto err1; + } + + spin_unlock_irqrestore(data_lock, flags); + + mgr-output-manager = NULL; + mgr-output = NULL; + + mutex_unlock(apply_lock); + + return 0; +err1: + spin_unlock_irqrestore(data_lock, flags); +err: + mutex_unlock(apply_lock); + + return r; +} + static void dss_apply_mgr_timings(struct omap_overlay_manager *mgr, const struct omap_video_timings *timings) { diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index e77d8d2..de2fb9d 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -205,6 +205,9 @@ void dss_mgr_get_info(struct omap_overlay_manager *mgr, int dss_mgr_set_device(struct omap_overlay_manager *mgr, struct omap_dss_device *dssdev); int dss_mgr_unset_device(struct omap_overlay_manager *mgr); +int dss_mgr_set_output(struct omap_overlay_manager *mgr, + struct omap_dss_output *output); +int dss_mgr_unset_output(struct omap_overlay_manager *mgr); void dss_mgr_set_timings(struct omap_overlay_manager *mgr, const struct omap_video_timings *timings); void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr, diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index 2fe39d6..2872329 100644 --- a/drivers/video/omap2/dss/dss_features.c +++ b/drivers/video/omap2/dss/dss_features.c @@ -47,6 +47,7 @@ struct omap_dss_features { const int num_mgrs; const int num_ovls; const enum omap_display_type *supported_displays; + const enum omap_dss_output_id *supported_outputs; const enum omap_color_mode *supported_color_modes; const enum omap_overlay_caps *overlay_caps; const char * const *clksrc_names; @@ -144,6 +145,46 @@ static const enum omap_display_type omap4_dss_supported_displays[] = { OMAP_DISPLAY_TYPE_DSI, }; +static const enum omap_dss_output_id omap2_dss_supported_outputs[] = { + /* OMAP_DSS_CHANNEL_LCD */ + OMAP_DSS_OUTPUT_DPI | OMAP_DSS_OUTPUT_DBI, + + /* OMAP_DSS_CHANNEL_DIGIT */ + OMAP_DSS_OUTPUT_VENC, +}; + +static const enum omap_dss_output_id omap3430_dss_supported_outputs[] = { + /* OMAP_DSS_CHANNEL_LCD */ + OMAP_DSS_OUTPUT_DPI | OMAP_DSS_OUTPUT_DBI | + OMAP_DSS_OUTPUT_SDI | OMAP_DSS_OUTPUT_DSI1, + + /* OMAP_DSS_CHANNEL_DIGIT */ + OMAP_DSS_OUTPUT_VENC, +}; + +static const enum
[PATCH v2 05/23] OMAPDSS: Remove manager-device references
With the introduction of output entities, managers will now connect to outputs. Create a helper op for managers named get_device. This will abstract away the information on how to get the device from an overlay manager. The get_device op currently retrieves the output via a manager-device reference. This will be later replaced by a manager-output-device reference. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/apply.c |6 -- drivers/video/omap2/dss/dispc.c | 10 +++--- drivers/video/omap2/dss/manager.c | 19 ++- include/video/omapdss.h |2 ++ 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index d241407..8a05cbc 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c @@ -1607,7 +1607,8 @@ int dss_ovl_enable(struct omap_overlay *ovl) goto err1; } - if (ovl-manager == NULL || ovl-manager-device == NULL) { + if (ovl-manager == NULL || + ovl-manager-get_device(ovl-manager) == NULL) { r = -EINVAL; goto err1; } @@ -1676,7 +1677,8 @@ int dss_ovl_disable(struct omap_overlay *ovl) goto err; } - if (ovl-manager == NULL || ovl-manager-device == NULL) { + if (ovl-manager == NULL || + ovl-manager-get_device(ovl-manager) == NULL) { r = -EINVAL; goto err; } diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index 0de9a7e..bfd73f5 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -3549,7 +3549,7 @@ static void dispc_error_worker(struct work_struct *work) bit = mgr_desc[i].sync_lost_irq; if (bit errors) { - struct omap_dss_device *dssdev = mgr-device; + struct omap_dss_device *dssdev = mgr-get_device(mgr); bool enable; DSSERR(SYNC_LOST on channel %s, restarting the output @@ -3580,9 +3580,13 @@ static void dispc_error_worker(struct work_struct *work) DSSERR(OCP_ERR\n); for (i = 0; i omap_dss_get_num_overlay_managers(); ++i) { struct omap_overlay_manager *mgr; + struct omap_dss_device *dssdev; + mgr = omap_dss_get_overlay_manager(i); - if (mgr-device mgr-device-driver) - mgr-device-driver-disable(mgr-device); + dssdev = mgr-get_device(mgr); + + if (dssdev dssdev-driver) + dssdev-driver-disable(dssdev); } } diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c index e15fa5f..fd39f66 100644 --- a/drivers/video/omap2/dss/manager.c +++ b/drivers/video/omap2/dss/manager.c @@ -43,8 +43,10 @@ static ssize_t manager_name_show(struct omap_overlay_manager *mgr, char *buf) static ssize_t manager_display_show(struct omap_overlay_manager *mgr, char *buf) { - return snprintf(buf, PAGE_SIZE, %s\n, - mgr-device ? mgr-device-name : none); + struct omap_dss_device *dssdev = mgr-get_device(mgr); + + return snprintf(buf, PAGE_SIZE, %s\n, dssdev ? + dssdev-name : none); } static ssize_t manager_display_store(struct omap_overlay_manager *mgr, @@ -72,7 +74,7 @@ static ssize_t manager_display_store(struct omap_overlay_manager *mgr, if (dssdev) DSSDBG(display %s found\n, dssdev-name); - if (mgr-device) { + if (mgr-get_device(mgr)) { r = mgr-unset_device(mgr); if (r) { DSSERR(failed to unset display\n); @@ -490,9 +492,15 @@ static struct kobj_type manager_ktype = { .default_attrs = manager_sysfs_attrs, }; +static inline struct omap_dss_device *dss_mgr_get_device(struct omap_overlay_manager *mgr) +{ + return mgr-device; +} + static int dss_mgr_wait_for_vsync(struct omap_overlay_manager *mgr) { unsigned long timeout = msecs_to_jiffies(500); + struct omap_dss_device *dssdev = mgr-get_device(mgr); u32 irq; int r; @@ -500,9 +508,9 @@ static int dss_mgr_wait_for_vsync(struct omap_overlay_manager *mgr) if (r) return r; - if (mgr-device-type == OMAP_DISPLAY_TYPE_VENC) + if (dssdev-type == OMAP_DISPLAY_TYPE_VENC) irq = DISPC_IRQ_EVSYNC_ODD; - else if (mgr-device-type == OMAP_DISPLAY_TYPE_HDMI) + else if (dssdev-type == OMAP_DISPLAY_TYPE_HDMI) irq = DISPC_IRQ_EVSYNC_EVEN; else irq = dispc_mgr_get_vsync_irq(mgr-id); @@ -556,6 +564,7 @@ int dss_init_overlay_managers(struct platform_device
[PATCH v2 06/23] OMAP_VOUT: Remove manager-device references
With the introduction of output entities, managers will now connect to outputs. Use the helper op for managers named get_device. This will abstract away the information on how to get the device from an overlay manager. Using the helper function will reduce the number of pointer dereferences a user of OMAPDSS needs to do and reduce risk of a NULL dereference. Cc: Vaibhav Hiremath hvaib...@ti.com Signed-off-by: Archit Taneja arc...@ti.com --- drivers/media/video/omap/omap_vout.c | 81 -- 1 file changed, 57 insertions(+), 24 deletions(-) diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c index 88cf9d9..0ebf87e 100644 --- a/drivers/media/video/omap/omap_vout.c +++ b/drivers/media/video/omap/omap_vout.c @@ -454,11 +454,16 @@ static int omapvid_init(struct omap_vout_device *vout, u32 addr) win = vout-win; for (i = 0; i ovid-num_overlays; i++) { + struct omap_dss_device *dssdev; + ovl = ovid-overlays[i]; - if (!ovl-manager || !ovl-manager-device) + dssdev = ovl-manager ? + ovl-manager-get_device(ovl-manager) : NULL; + + if (!dssdev) return -EINVAL; - timing = ovl-manager-device-panel.timings; + timing = dssdev-panel.timings; outw = win-w.width; outh = win-w.height; @@ -515,8 +520,12 @@ static int omapvid_apply_changes(struct omap_vout_device *vout) struct omapvideo_info *ovid = vout-vid_info; for (i = 0; i ovid-num_overlays; i++) { + struct omap_dss_device *dssdev; + ovl = ovid-overlays[i]; - if (!ovl-manager || !ovl-manager-device) + dssdev = ovl-manager ? + ovl-manager-get_device(ovl-manager) : NULL; + if (!dssdev) return -EINVAL; ovl-manager-apply(ovl-manager); } @@ -579,12 +588,15 @@ static void omap_vout_isr(void *arg, unsigned int irqstatus) ovid = vout-vid_info; ovl = ovid-overlays[0]; - /* get the display device attached to the overlay */ - if (!ovl-manager || !ovl-manager-device) - return; mgr_id = ovl-manager-id; - cur_display = ovl-manager-device; + + /* get the display device attached to the overlay */ + cur_display = ovl-manager ? + ovl-manager-get_device(ovl-manager) : NULL; + + if (!cur_display) + return; spin_lock(vout-vbq_lock); do_gettimeofday(timevalue); @@ -948,7 +960,10 @@ static int omap_vout_release(struct file *file) /* Disable all the overlay managers connected with this interface */ for (i = 0; i ovid-num_overlays; i++) { struct omap_overlay *ovl = ovid-overlays[i]; - if (ovl-manager ovl-manager-device) + struct omap_dss_device *dssdev = ovl-manager ? + ovl-manager-get_device(ovl-manager) : NULL; + + if (dssdev) ovl-disable(ovl); } /* Turn off the pipeline */ @@ -1081,14 +1096,17 @@ static int vidioc_try_fmt_vid_out(struct file *file, void *fh, struct omapvideo_info *ovid; struct omap_video_timings *timing; struct omap_vout_device *vout = fh; + struct omap_dss_device *dssdev; ovid = vout-vid_info; ovl = ovid-overlays[0]; + /* get the display device attached to the overlay */ + dssdev = ovl-manager ? ovl-manager-get_device(ovl-manager) : NULL; - if (!ovl-manager || !ovl-manager-device) + if (!dssdev) return -EINVAL; - /* get the display device attached to the overlay */ - timing = ovl-manager-device-panel.timings; + + timing = dssdev-panel.timings; vout-fbuf.fmt.height = timing-y_res; vout-fbuf.fmt.width = timing-x_res; @@ -1105,6 +1123,7 @@ static int vidioc_s_fmt_vid_out(struct file *file, void *fh, struct omapvideo_info *ovid; struct omap_video_timings *timing; struct omap_vout_device *vout = fh; + struct omap_dss_device *dssdev; if (vout-streaming) return -EBUSY; @@ -1113,13 +1132,14 @@ static int vidioc_s_fmt_vid_out(struct file *file, void *fh, ovid = vout-vid_info; ovl = ovid-overlays[0]; + dssdev = ovl-manager ? ovl-manager-get_device(ovl-manager) : NULL; /* get the display device attached to the overlay */ - if (!ovl-manager || !ovl-manager-device) { + if (!dssdev) { ret = -EINVAL; goto s_fmt_vid_out_exit; } - timing = ovl-manager-device-panel.timings; + timing = dssdev-panel.timings; /* We dont support RGB24-packed mode if vrfb rotation * is enabled*/ @@ -1298,6 +1318,7 @@ static int
[PATCH v2 07/23] OMAPFB: remove manager-device references
With the introduction of output entities, managers will now connect to outputs. Use the helper op for managers named get_device. This will abstract away the information on how to get the device from an overlay manager. Using the helper function will reduce the number of pointer dereferences a user of OMAPDSS needs to do and reduce risk of a NULL dereference. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/omapfb/omapfb-main.c |7 +-- drivers/video/omap2/omapfb/omapfb.h |5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index fc671d3..c6992be 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c @@ -2353,6 +2353,7 @@ static int __init omapfb_probe(struct platform_device *pdev) struct omap_overlay *ovl; struct omap_dss_device *def_display; struct omap_dss_device *dssdev; + struct omap_dss_device *mgr_device; DBG(omapfb_probe\n); @@ -2426,8 +2427,10 @@ static int __init omapfb_probe(struct platform_device *pdev) /* gfx overlay should be the default one. find a display * connected to that, and use it as default display */ ovl = omap_dss_get_overlay(0); - if (ovl-manager ovl-manager-device) { - def_display = ovl-manager-device; + mgr_device = ovl-manager ? + ovl-manager-get_device(ovl-manager) : NULL; + if (mgr_device) { + def_display = mgr_device; } else { dev_warn(pdev-dev, cannot find default display\n); def_display = NULL; diff --git a/drivers/video/omap2/omapfb/omapfb.h b/drivers/video/omap2/omapfb/omapfb.h index 30361a0..2782b1f 100644 --- a/drivers/video/omap2/omapfb/omapfb.h +++ b/drivers/video/omap2/omapfb/omapfb.h @@ -148,8 +148,9 @@ static inline struct omap_dss_device *fb2display(struct fb_info *fbi) /* XXX: returns the display connected to first attached overlay */ for (i = 0; i ofbi-num_overlays; i++) { - if (ofbi-overlays[i]-manager) - return ofbi-overlays[i]-manager-device; + struct omap_overlay_manager *mgr = ofbi-overlays[i]-manager; + if (mgr) + return mgr-get_device(mgr); } return NULL; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 08/23] OMAPDRM: Remove manager-device references
With the introduction of output entities, managers will now connect to outputs. Use the helper op for managers named get_device. This will abstract away the information on how to get the device from an overlay manager. Using the helper function will reduce the number of pointer dereferences a user of OMAPDSS needs to do and reduce risk of a NULL dereference. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/staging/omapdrm/omap_drv.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/omapdrm/omap_drv.c b/drivers/staging/omapdrm/omap_drv.c index 4beab94..64a354a 100644 --- a/drivers/staging/omapdrm/omap_drv.c +++ b/drivers/staging/omapdrm/omap_drv.c @@ -106,7 +106,8 @@ static void dump_video_chains(void) for (i = 0; i omap_dss_get_num_overlays(); i++) { struct omap_overlay *ovl = omap_dss_get_overlay(i); struct omap_overlay_manager *mgr = ovl-manager; - struct omap_dss_device *dssdev = mgr ? mgr-device : NULL; + struct omap_dss_device *dssdev = mgr ? + mgr-get_device(mgr) : NULL; if (dssdev) { DBG(%d: %s - %s - %s, i, ovl-name, mgr-name, dssdev-name); @@ -185,7 +186,7 @@ static int create_connector(struct drm_device *dev, for (j = 0; j priv-num_encoders; j++) { struct omap_overlay_manager *mgr = omap_encoder_get_manager(priv-encoders[j]); - if (mgr-device == dssdev) { + if (mgr-get_device(mgr) == dssdev) { drm_mode_connector_attach_encoder(connector, priv-encoders[j]); } -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 09/23] OMAPDSS: Create links between managers, outputs and devices
Links between DSS entities are made in dss_recheck_connections when a new panel is probed. Rewrite the code in dss_recheck_connections to link managers to outputs, and outputs to devices. The fields in omap_dss_device struct gives information on which output and manager to connect to. The desired manager and output pointers are retrieved and prepared(existing outputs/devices unset, if default display)) to form the desired links. The output is linked to the device, and then the manager to the output. If a probed device's required manager isn't free, the required output is still connected to the device so that it's easier to use the panel in the future. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/overlay.c | 96 + 1 file changed, 56 insertions(+), 40 deletions(-) diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c index 952c6fa..07605f1 100644 --- a/drivers/video/omap2/dss/overlay.c +++ b/drivers/video/omap2/dss/overlay.c @@ -525,51 +525,67 @@ void dss_init_overlays(struct platform_device *pdev) void dss_recheck_connections(struct omap_dss_device *dssdev, bool force) { int i; - struct omap_overlay_manager *lcd_mgr; - struct omap_overlay_manager *tv_mgr; - struct omap_overlay_manager *lcd2_mgr = NULL; - struct omap_overlay_manager *lcd3_mgr = NULL; struct omap_overlay_manager *mgr = NULL; + struct omap_dss_output *out = NULL; + enum omap_dss_output_id id; + + switch (dssdev-type) { + case OMAP_DISPLAY_TYPE_DPI: + out = omap_dss_get_output(OMAP_DSS_OUTPUT_DPI); + break; + case OMAP_DISPLAY_TYPE_DBI: + out = omap_dss_get_output(OMAP_DSS_OUTPUT_DBI); + break; + case OMAP_DISPLAY_TYPE_SDI: + out = omap_dss_get_output(OMAP_DSS_OUTPUT_SDI); + break; + case OMAP_DISPLAY_TYPE_VENC: + out = omap_dss_get_output(OMAP_DSS_OUTPUT_VENC); + break; + case OMAP_DISPLAY_TYPE_HDMI: + out = omap_dss_get_output(OMAP_DSS_OUTPUT_HDMI); + break; + case OMAP_DISPLAY_TYPE_DSI: + id = dssdev-phy.dsi.module == 0 ? OMAP_DSS_OUTPUT_DSI1 : + OMAP_DSS_OUTPUT_DSI2; + out = omap_dss_get_output(id); + break; + default: + break; + } - lcd_mgr = omap_dss_get_overlay_manager(OMAP_DSS_CHANNEL_LCD); - tv_mgr = omap_dss_get_overlay_manager(OMAP_DSS_CHANNEL_DIGIT); - if (dss_has_feature(FEAT_MGR_LCD3)) - lcd3_mgr = omap_dss_get_overlay_manager(OMAP_DSS_CHANNEL_LCD3); - if (dss_has_feature(FEAT_MGR_LCD2)) - lcd2_mgr = omap_dss_get_overlay_manager(OMAP_DSS_CHANNEL_LCD2); - - if (dssdev-channel == OMAP_DSS_CHANNEL_LCD3) { - if (!lcd3_mgr-device || force) { - if (lcd3_mgr-device) - lcd3_mgr-unset_device(lcd3_mgr); - lcd3_mgr-set_device(lcd3_mgr, dssdev); - mgr = lcd3_mgr; - } - } else if (dssdev-channel == OMAP_DSS_CHANNEL_LCD2) { - if (!lcd2_mgr-device || force) { - if (lcd2_mgr-device) - lcd2_mgr-unset_device(lcd2_mgr); - lcd2_mgr-set_device(lcd2_mgr, dssdev); - mgr = lcd2_mgr; - } - } else if (dssdev-type != OMAP_DISPLAY_TYPE_VENC -dssdev-type != OMAP_DISPLAY_TYPE_HDMI) { - if (!lcd_mgr-device || force) { - if (lcd_mgr-device) - lcd_mgr-unset_device(lcd_mgr); - lcd_mgr-set_device(lcd_mgr, dssdev); - mgr = lcd_mgr; - } + /* +* We don't want to touch board files and mention channel for VENC +* devices. Force the channel as DIGIT for HDMI and VENC devices +*/ + if (dssdev-type == OMAP_DISPLAY_TYPE_VENC || + dssdev-type == OMAP_DISPLAY_TYPE_HDMI) + dssdev-channel = OMAP_DSS_CHANNEL_DIGIT; + + mgr = omap_dss_get_overlay_manager(dssdev-channel); + + if (!mgr || !out) { + DSSERR(Incorrect manager or output\n); + return; } - if (dssdev-type == OMAP_DISPLAY_TYPE_VENC - || dssdev-type == OMAP_DISPLAY_TYPE_HDMI) { - if (!tv_mgr-device || force) { - if (tv_mgr-device) - tv_mgr-unset_device(tv_mgr); - tv_mgr-set_device(tv_mgr, dssdev); - mgr = tv_mgr; + if (!mgr-output || force) { + struct omap_dss_output *curr_out = mgr-output; + + if (curr_out) { + if
[PATCH v2 10/23] OMAPDSS: DPI: Pass omap_dss_output within the driver
When a panel driver calls a DPI function, it passes the omap_dss_device pointer, this pointer currently propagates within the DPI driver to configure the interface. Extract the omap_dss_output pointer from omap_dss_device received from the panel driver, pass the output pointer to DPI functions local to the driver to configure the interface, these functions no longer need omap_dss_device since the driver now maintains a copy of output parameters. Replace dssdev-manager references with out-manager references as only these will be valid later. With the addition of outputs. There is a possibility that an omap_dss_device isn't connected to an output, or a manager isn't connected to an output yet. Ensure that the DPI interface functions proceed only if the output is non NULL. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/dpi.c | 55 + 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index 9a7aee5..cb17adb 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c @@ -73,7 +73,7 @@ static bool dpi_use_dsi_pll(struct omap_dss_device *dssdev) return false; } -static int dpi_set_dsi_clk(struct omap_dss_device *dssdev, +static int dpi_set_dsi_clk(struct omap_dss_output *out, unsigned long pck_req, unsigned long *fck, int *lck_div, int *pck_div) { @@ -90,7 +90,7 @@ static int dpi_set_dsi_clk(struct omap_dss_device *dssdev, if (r) return r; - dss_select_dispc_clk_source(dssdev-clocks.dispc.dispc_fclk_src); + dss_select_dispc_clk_source(out-device-clocks.dispc.dispc_fclk_src); dpi.mgr_config.clock_info = dispc_cinfo; @@ -101,7 +101,7 @@ static int dpi_set_dsi_clk(struct omap_dss_device *dssdev, return 0; } -static int dpi_set_dispc_clk(struct omap_dss_device *dssdev, +static int dpi_set_dispc_clk(struct omap_dss_output *out, unsigned long pck_req, unsigned long *fck, int *lck_div, int *pck_div) { @@ -126,7 +126,7 @@ static int dpi_set_dispc_clk(struct omap_dss_device *dssdev, return 0; } -static int dpi_set_mode(struct omap_dss_device *dssdev) +static int dpi_set_mode(struct omap_dss_output *out) { struct omap_video_timings *t = dpi.timings; int lck_div = 0, pck_div = 0; @@ -134,11 +134,11 @@ static int dpi_set_mode(struct omap_dss_device *dssdev) unsigned long pck; int r = 0; - if (dpi_use_dsi_pll(dssdev)) - r = dpi_set_dsi_clk(dssdev, t-pixel_clock * 1000, fck, + if (dpi_use_dsi_pll(out-device)) + r = dpi_set_dsi_clk(out, t-pixel_clock * 1000, fck, lck_div, pck_div); else - r = dpi_set_dispc_clk(dssdev, t-pixel_clock * 1000, fck, + r = dpi_set_dispc_clk(out, t-pixel_clock * 1000, fck, lck_div, pck_div); if (r) return r; @@ -153,12 +153,12 @@ static int dpi_set_mode(struct omap_dss_device *dssdev) t-pixel_clock = pck; } - dss_mgr_set_timings(dssdev-manager, t); + dss_mgr_set_timings(out-manager, t); return 0; } -static void dpi_config_lcd_manager(struct omap_dss_device *dssdev) +static void dpi_config_lcd_manager(struct omap_dss_output *out) { dpi.mgr_config.io_pad_mode = DSS_IO_PAD_MODE_BYPASS; @@ -169,11 +169,12 @@ static void dpi_config_lcd_manager(struct omap_dss_device *dssdev) dpi.mgr_config.lcden_sig_polarity = 0; - dss_mgr_set_lcd_config(dssdev-manager, dpi.mgr_config); + dss_mgr_set_lcd_config(out-manager, dpi.mgr_config); } int omapdss_dpi_display_enable(struct omap_dss_device *dssdev) { + struct omap_dss_output *out = dssdev-output; int r; mutex_lock(dpi.lock); @@ -184,10 +185,10 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev) goto err_no_reg; } - if (dssdev-manager == NULL) { - DSSERR(failed to enable display: no manager\n); + if (out == NULL || out-manager == NULL) { + DSSERR(failed to enable display: no output/manager\n); r = -ENODEV; - goto err_no_mgr; + goto err_no_out_mgr; } r = omap_dss_start_device(dssdev); @@ -216,15 +217,15 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev) goto err_dsi_pll_init; } - r = dpi_set_mode(dssdev); + r = dpi_set_mode(out); if (r) goto err_set_mode; - dpi_config_lcd_manager(dssdev); + dpi_config_lcd_manager(out); mdelay(2); - r = dss_mgr_enable(dssdev-manager); + r = dss_mgr_enable(out-manager); if (r) goto err_mgr_enable; @@ -247,7 +248,7 @@
[PATCH v2 11/23] OMAPDSS: DSI: Remove dsi_pdev_map global struct
dsi_pdev_map is a struct visible globally in the DSI driver to get the platform device pointer of the DSI device corresponding to it's module ID. This was required because there was no clean way to derive the platform device from the DSI module instance number or from the connected panel. With the new output entity, it is possible to retrieve the platform device pointer if the omap_dss_output pointer is available. Modify the functions dsi_get_dsidev_from_dssdev() dsi_get_dsidev_from_id() so that they use output instead of dsi_pdev_map to retrieve the dsi platform device pointer. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/dsi.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 6a83ab7..78212c4 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -346,8 +346,6 @@ struct dsi_packet_sent_handler_data { struct completion *completion; }; -static struct platform_device *dsi_pdev_map[MAX_NUM_DSI]; - #ifdef DEBUG static bool dsi_perf; module_param(dsi_perf, bool, 0644); @@ -360,12 +358,19 @@ static inline struct dsi_data *dsi_get_dsidrv_data(struct platform_device *dside static inline struct platform_device *dsi_get_dsidev_from_dssdev(struct omap_dss_device *dssdev) { - return dsi_pdev_map[dssdev-phy.dsi.module]; + return dssdev-output-pdev; } struct platform_device *dsi_get_dsidev_from_id(int module) { - return dsi_pdev_map[module]; + struct omap_dss_output *out; + enum omap_dss_output_id id; + + id = module == 0 ? OMAP_DSS_OUTPUT_DSI1 : OMAP_DSS_OUTPUT_DSI2; + + out = omap_dss_get_output(id); + + return out-pdev; } static inline void dsi_write_reg(struct platform_device *dsidev, @@ -4933,7 +4938,6 @@ static int __init omap_dsihw_probe(struct platform_device *dsidev) dsi-module_id = dsidev-id; dsi-pdev = dsidev; - dsi_pdev_map[dsi-module_id] = dsidev; dev_set_drvdata(dsidev-dev, dsi); spin_lock_init(dsi-irq_lock); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 12/23] OMAPDSS: DSI: Pass omap_dss_output within the driver
When a panel driver calls a DSI function, it passes the omap_dss_device pointer, this pointer currently propagates within the DSI driver to configure the interface. Extract the omap_dss_output pointer from omap_dss_device received from the panel driver, pass the output pointer to DSI functions local to the driver to configure the interface, these functions no longer need omap_dss_device since the driver now maintains a copy of output parameters. Replace dssdev-manager references with out-manager references as only these will be valid later. With the addition of outputs. There is a possibility that an omap_dss_device isn't connected to an output, or a manager isn't connected to an output yet. Ensure that the DSI interface functions proceed only if the output is non NULL. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/dsi.c | 219 - 1 file changed, 131 insertions(+), 88 deletions(-) diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 78212c4..228510f 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -356,9 +356,9 @@ static inline struct dsi_data *dsi_get_dsidrv_data(struct platform_device *dside return dev_get_drvdata(dsidev-dev); } -static inline struct platform_device *dsi_get_dsidev_from_dssdev(struct omap_dss_device *dssdev) +static inline struct platform_device *dsi_get_dsidev_from_output(struct omap_dss_output *out) { - return dssdev-output-pdev; + return out-pdev; } struct platform_device *dsi_get_dsidev_from_id(int module) @@ -391,7 +391,8 @@ static inline u32 dsi_read_reg(struct platform_device *dsidev, void dsi_bus_lock(struct omap_dss_device *dssdev) { - struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); + struct omap_dss_output *out = dssdev-output; + struct platform_device *dsidev = dsi_get_dsidev_from_output(out); struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); down(dsi-bus_lock); @@ -400,7 +401,8 @@ EXPORT_SYMBOL(dsi_bus_lock); void dsi_bus_unlock(struct omap_dss_device *dssdev) { - struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); + struct omap_dss_output *out = dssdev-output; + struct platform_device *dsidev = dsi_get_dsidev_from_output(out); struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); up(dsi-bus_lock); @@ -1205,15 +1207,15 @@ static unsigned long dsi_fclk_rate(struct platform_device *dsidev) return r; } -static int dsi_set_lp_clk_divisor(struct omap_dss_device *dssdev) +static int dsi_set_lp_clk_divisor(struct omap_dss_output *out) { - struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); + struct platform_device *dsidev = dsi_get_dsidev_from_output(out); struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); unsigned long dsi_fclk; unsigned lp_clk_div; unsigned long lp_clk; - lp_clk_div = dssdev-clocks.dsi.lp_clk_div; + lp_clk_div = out-device-clocks.dsi.lp_clk_div; if (lp_clk_div == 0 || lp_clk_div dsi-lpdiv_max) return -EINVAL; @@ -2689,7 +2691,8 @@ static int dsi_vc_config_source(struct platform_device *dsidev, int channel, void omapdss_dsi_vc_enable_hs(struct omap_dss_device *dssdev, int channel, bool enable) { - struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); + struct omap_dss_output *out = dssdev-output; + struct platform_device *dsidev = dsi_get_dsidev_from_output(out); struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); DSSDBG(dsi_vc_enable_hs(%d, %d)\n, channel, enable); @@ -2817,7 +2820,8 @@ static int dsi_vc_send_bta(struct platform_device *dsidev, int channel) int dsi_vc_send_bta_sync(struct omap_dss_device *dssdev, int channel) { - struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); + struct omap_dss_output *out = dssdev-output; + struct platform_device *dsidev = dsi_get_dsidev_from_output(out); DECLARE_COMPLETION_ONSTACK(completion); int r = 0; u32 err; @@ -2986,7 +2990,8 @@ static int dsi_vc_send_short(struct platform_device *dsidev, int channel, int dsi_vc_send_null(struct omap_dss_device *dssdev, int channel) { - struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); + struct omap_dss_output *out = dssdev-output; + struct platform_device *dsidev = dsi_get_dsidev_from_output(out); return dsi_vc_send_long(dsidev, channel, MIPI_DSI_NULL_PACKET, NULL, 0, 0); @@ -3026,7 +3031,8 @@ static int dsi_vc_write_nosync_common(struct platform_device *dsidev, int dsi_vc_dcs_write_nosync(struct omap_dss_device *dssdev, int channel, u8 *data, int len) { - struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); + struct omap_dss_output *out =
[PATCH v2 13/23] OMAPDSS: SDI: Pass omap_dss_output within the driver
When a panel driver calls a SDI function, it passes the omap_dss_device pointer, this pointer currently propagates within the SDI driver to configure the interface. Extract the omap_dss_output pointer from omap_dss_device received from the panel driver, pass the output pointer to SDI functions local to the driver to configure the interface, these functions no longer need omap_dss_device since the driver now maintains a copy of output parameters. Replace dssdev-manager references with out-manager references as only these will be valid later. With the addition of outputs. There is a possibility that an omap_dss_device isn't connected to an output, or a manager isn't connected to an output yet. Ensure that the SDI interface functions proceed only if the output is non NULL. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/sdi.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c index d8879f3..24f9ba0 100644 --- a/drivers/video/omap2/dss/sdi.c +++ b/drivers/video/omap2/dss/sdi.c @@ -40,7 +40,7 @@ static struct { struct omap_dss_output output; } sdi; -static void sdi_config_lcd_manager(struct omap_dss_device *dssdev) +static void sdi_config_lcd_manager(struct omap_dss_output *out) { sdi.mgr_config.io_pad_mode = DSS_IO_PAD_MODE_BYPASS; @@ -50,19 +50,20 @@ static void sdi_config_lcd_manager(struct omap_dss_device *dssdev) sdi.mgr_config.video_port_width = 24; sdi.mgr_config.lcden_sig_polarity = 1; - dss_mgr_set_lcd_config(dssdev-manager, sdi.mgr_config); + dss_mgr_set_lcd_config(out-manager, sdi.mgr_config); } int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) { + struct omap_dss_output *out = dssdev-output; struct omap_video_timings *t = sdi.timings; struct dss_clock_info dss_cinfo; struct dispc_clock_info dispc_cinfo; unsigned long pck; int r; - if (dssdev-manager == NULL) { - DSSERR(failed to enable display: no manager\n); + if (out == NULL || out-manager == NULL) { + DSSERR(failed to enable display: no output/manager\n); return -ENODEV; } @@ -100,14 +101,13 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) t-pixel_clock = pck; } - - dss_mgr_set_timings(dssdev-manager, t); + dss_mgr_set_timings(out-manager, t); r = dss_set_clock_div(dss_cinfo); if (r) goto err_set_dss_clock_div; - sdi_config_lcd_manager(dssdev); + sdi_config_lcd_manager(out); dss_sdi_init(sdi.datapairs); @@ -116,7 +116,7 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) goto err_sdi_enable; mdelay(2); - r = dss_mgr_enable(dssdev-manager); + r = dss_mgr_enable(out-manager); if (r) goto err_mgr_enable; @@ -139,7 +139,9 @@ EXPORT_SYMBOL(omapdss_sdi_display_enable); void omapdss_sdi_display_disable(struct omap_dss_device *dssdev) { - dss_mgr_disable(dssdev-manager); + struct omap_dss_output *out = dssdev-output; + + dss_mgr_disable(out-manager); dss_sdi_disable(); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 14/23] OMAPDSS: RFBI: Pass omap_dss_output within the driver
When a panel driver calls a RFBI function, it passes the omap_dss_device pointer, this pointer currently propagates within the RFBI driver to configure the interface. Extract the omap_dss_output pointer from omap_dss_device received from the panel driver, pass the output pointer to RFBI functions local to the driver to configure the interface, these functions no longer need omap_dss_device since the driver now maintains a copy of output parameters. Replace dssdev-manager references with out-manager references as only these will be valid later. With the addition of outputs. There is a possibility that an omap_dss_device isn't connected to an output, or a manager isn't connected to an output yet. Ensure that the RFBI interface functions proceed only if the output is non NULL. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/rfbi.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index 3450f51..545e14f 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c @@ -307,11 +307,12 @@ void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width, } EXPORT_SYMBOL(omap_rfbi_write_pixels); -static int rfbi_transfer_area(struct omap_dss_device *dssdev, +static int rfbi_transfer_area(struct omap_dss_output *out, void (*callback)(void *data), void *data) { u32 l; int r; + struct omap_overlay_manager *mgr = out-manager; u16 width = rfbi.timings.x_res; u16 height = rfbi.timings.y_res; @@ -320,9 +321,9 @@ static int rfbi_transfer_area(struct omap_dss_device *dssdev, DSSDBG(rfbi_transfer_area %dx%d\n, width, height); - dss_mgr_set_timings(dssdev-manager, rfbi.timings); + dss_mgr_set_timings(mgr, rfbi.timings); - r = dss_mgr_enable(dssdev-manager); + r = dss_mgr_enable(mgr); if (r) return r; @@ -779,7 +780,9 @@ EXPORT_SYMBOL(omap_rfbi_configure); int omap_rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *), void *data) { - return rfbi_transfer_area(dssdev, callback, data); + struct omap_dss_output *out = dssdev-output; + + return rfbi_transfer_area(out, callback, data); } EXPORT_SYMBOL(omap_rfbi_update); @@ -849,7 +852,7 @@ static void rfbi_dump_regs(struct seq_file *s) #undef DUMPREG } -static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev) +static void rfbi_config_lcd_manager(struct omap_dss_output *out) { struct dss_lcd_mgr_config mgr_config; @@ -862,7 +865,7 @@ static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev) mgr_config.video_port_width = rfbi.pixel_size; mgr_config.lcden_sig_polarity = 0; - dss_mgr_set_lcd_config(dssdev-manager, mgr_config); + dss_mgr_set_lcd_config(out-manager, mgr_config); /* * Set rfbi.timings with default values, the x_res and y_res fields @@ -883,15 +886,16 @@ static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev) rfbi.timings.de_level = OMAPDSS_SIG_ACTIVE_HIGH; rfbi.timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES; - dss_mgr_set_timings(dssdev-manager, rfbi.timings); + dss_mgr_set_timings(out-manager, rfbi.timings); } int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev) { + struct omap_dss_output *out = dssdev-output; int r; - if (dssdev-manager == NULL) { - DSSERR(failed to enable display: no manager\n); + if (out == NULL || out-manager == NULL) { + DSSERR(failed to enable display: no output/manager\n); return -ENODEV; } @@ -912,7 +916,7 @@ int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev) goto err1; } - rfbi_config_lcd_manager(dssdev); + rfbi_config_lcd_manager(out); rfbi_configure(dssdev-phy.rfbi.channel, rfbi.pixel_size, rfbi.data_lines); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 15/23] OMAPDSS: RFBI: Add dssdev pointers as arguments to all exported functions
All functions of an interface driver used by a panel driver should have an omap_dss_device pointer as an argument. This may not be needed by some of the interfaces now as driver data is globally visible in them. The correct way to retrieve driver data is to extract the platform device from the output, and then extract the driver data from the platform device. Add dssdev arguments from functions used by panel drivers which currently miss it. This will come to use when the RFBI functions retrieve the driver data in the correct manner. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/displays/panel-n8x0.c | 55 - drivers/video/omap2/dss/rfbi.c| 25 +++-- include/video/omapdss.h | 25 +++-- 3 files changed, 60 insertions(+), 45 deletions(-) diff --git a/drivers/video/omap2/displays/panel-n8x0.c b/drivers/video/omap2/displays/panel-n8x0.c index 17ae85e..e3a8c44 100644 --- a/drivers/video/omap2/displays/panel-n8x0.c +++ b/drivers/video/omap2/displays/panel-n8x0.c @@ -88,27 +88,30 @@ struct panel_drv_data *get_drv_data(const struct omap_dss_device *dssdev) } -static inline void blizzard_cmd(u8 cmd) +static inline void blizzard_cmd(struct omap_dss_device *dssdev, u8 cmd) { - omap_rfbi_write_command(cmd, 1); + omap_rfbi_write_command(dssdev, cmd, 1); } -static inline void blizzard_write(u8 cmd, const u8 *buf, int len) +static inline void blizzard_write(struct omap_dss_device *dssdev, u8 cmd, + const u8 *buf, int len) { - omap_rfbi_write_command(cmd, 1); - omap_rfbi_write_data(buf, len); + omap_rfbi_write_command(dssdev, cmd, 1); + omap_rfbi_write_data(dssdev, buf, len); } -static inline void blizzard_read(u8 cmd, u8 *buf, int len) +static inline void blizzard_read(struct omap_dss_device *dssdev, u8 cmd, + u8 *buf, int len) { - omap_rfbi_write_command(cmd, 1); - omap_rfbi_read_data(buf, len); + omap_rfbi_write_command(dssdev, cmd, 1); + omap_rfbi_read_data(dssdev, buf, len); } -static u8 blizzard_read_reg(u8 cmd) +static u8 blizzard_read_reg(struct omap_dss_device *dssdev, u8 cmd) { u8 data; - blizzard_read(cmd, data, 1); + + blizzard_read(dssdev, cmd, data, 1); return data; } @@ -155,7 +158,7 @@ static void blizzard_ctrl_setup_update(struct omap_dss_device *dssdev, omap_rfbi_configure(dssdev); - blizzard_write(BLIZZARD_INPUT_WIN_X_START_0, tmp, 18); + blizzard_write(dssdev, BLIZZARD_INPUT_WIN_X_START_0, tmp, 18); omapdss_rfbi_set_pixel_size(dssdev, 16); omapdss_rfbi_set_data_lines(dssdev, 16); @@ -313,8 +316,8 @@ static int n8x0_panel_power_on(struct omap_dss_device *dssdev) if (r) goto err_rfbi_en; - rev = blizzard_read_reg(BLIZZARD_REV_CODE); - conf = blizzard_read_reg(BLIZZARD_CONFIG); + rev = blizzard_read_reg(dssdev, BLIZZARD_REV_CODE); + conf = blizzard_read_reg(dssdev, BLIZZARD_CONFIG); switch (rev 0xfc) { case 0x9c: @@ -536,11 +539,11 @@ static int n8x0_panel_enable(struct omap_dss_device *dssdev) mutex_lock(ddata-lock); - rfbi_bus_lock(); + rfbi_bus_lock(dssdev); r = n8x0_panel_power_on(dssdev); - rfbi_bus_unlock(); + rfbi_bus_unlock(dssdev); if (r) { mutex_unlock(ddata-lock); @@ -562,11 +565,11 @@ static void n8x0_panel_disable(struct omap_dss_device *dssdev) mutex_lock(ddata-lock); - rfbi_bus_lock(); + rfbi_bus_lock(dssdev); n8x0_panel_power_off(dssdev); - rfbi_bus_unlock(); + rfbi_bus_unlock(dssdev); dssdev-state = OMAP_DSS_DISPLAY_DISABLED; @@ -581,11 +584,11 @@ static int n8x0_panel_suspend(struct omap_dss_device *dssdev) mutex_lock(ddata-lock); - rfbi_bus_lock(); + rfbi_bus_lock(dssdev); n8x0_panel_power_off(dssdev); - rfbi_bus_unlock(); + rfbi_bus_unlock(dssdev); dssdev-state = OMAP_DSS_DISPLAY_SUSPENDED; @@ -603,11 +606,11 @@ static int n8x0_panel_resume(struct omap_dss_device *dssdev) mutex_lock(ddata-lock); - rfbi_bus_lock(); + rfbi_bus_lock(dssdev); r = n8x0_panel_power_on(dssdev); - rfbi_bus_unlock(); + rfbi_bus_unlock(dssdev); if (r) { mutex_unlock(ddata-lock); @@ -630,7 +633,9 @@ static void n8x0_panel_get_resolution(struct omap_dss_device *dssdev, static void update_done(void *data) { - rfbi_bus_unlock(); + struct omap_dss_device *dssdev = (struct omap_dss_device *) data; + + rfbi_bus_unlock(dssdev); } static int n8x0_panel_update(struct omap_dss_device *dssdev, @@ -651,7 +656,7 @@ static int n8x0_panel_update(struct omap_dss_device *dssdev, } mutex_lock(ddata-lock); - rfbi_bus_lock(); + rfbi_bus_lock(dssdev);
[PATCH v2 16/23] OMAPDSS: VENC: Pass omap_dss_output within the driver
When a panel driver calls a VENC function, it passes the omap_dss_device pointer, this pointer currently propagates within the VENC driver to configure the interface. Extract the omap_dss_output pointer from omap_dss_device received from the panel driver, pass the output pointer to VENC functions local to the driver to configure the interface, these functions no longer need omap_dss_device since the driver now maintains a copy of output parameters. Replace dssdev-manager references with out-manager references as only these will be valid later. With the addition of outputs. There is a possibility that an omap_dss_device isn't connected to an output, or a manager isn't connected to an output yet. Ensure that the VENC interface functions proceed only if the output is non NULL. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/venc.c | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c index 942a378..3fe974f 100644 --- a/drivers/video/omap2/dss/venc.c +++ b/drivers/video/omap2/dss/venc.c @@ -428,7 +428,7 @@ static const struct venc_config *venc_timings_to_config( return NULL; } -static int venc_power_on(struct omap_dss_device *dssdev) +static int venc_power_on(struct omap_dss_output *out) { u32 l; int r; @@ -455,13 +455,13 @@ static int venc_power_on(struct omap_dss_device *dssdev) venc_write_reg(VENC_OUTPUT_CONTROL, l); - dss_mgr_set_timings(dssdev-manager, venc.timings); + dss_mgr_set_timings(out-manager, venc.timings); r = regulator_enable(venc.vdda_dac_reg); if (r) goto err1; - r = dss_mgr_enable(dssdev-manager); + r = dss_mgr_enable(out-manager); if (r) goto err2; @@ -478,12 +478,12 @@ err0: return r; } -static void venc_power_off(struct omap_dss_device *dssdev) +static void venc_power_off(struct omap_dss_output *out) { venc_write_reg(VENC_OUTPUT_CONTROL, 0); dss_set_dac_pwrdn_bgz(0); - dss_mgr_disable(dssdev-manager); + dss_mgr_disable(out-manager); regulator_disable(venc.vdda_dac_reg); @@ -498,14 +498,15 @@ unsigned long venc_get_pixel_clock(void) int omapdss_venc_display_enable(struct omap_dss_device *dssdev) { + struct omap_dss_output *out = dssdev-output; int r; DSSDBG(venc_display_enable\n); mutex_lock(venc.venc_lock); - if (dssdev-manager == NULL) { - DSSERR(Failed to enable display: no manager\n); + if (out == NULL || out-manager == NULL) { + DSSERR(Failed to enable display: no output/manager\n); r = -ENODEV; goto err0; } @@ -520,7 +521,7 @@ int omapdss_venc_display_enable(struct omap_dss_device *dssdev) dssdev-platform_enable(dssdev); - r = venc_power_on(dssdev); + r = venc_power_on(out); if (r) goto err1; @@ -540,11 +541,13 @@ err0: void omapdss_venc_display_disable(struct omap_dss_device *dssdev) { + struct omap_dss_output *out = dssdev-output; + DSSDBG(venc_display_disable\n); mutex_lock(venc.venc_lock); - venc_power_off(dssdev); + venc_power_off(out); omap_dss_stop_device(dssdev); @@ -557,8 +560,13 @@ void omapdss_venc_display_disable(struct omap_dss_device *dssdev) void omapdss_venc_set_timings(struct omap_dss_device *dssdev, struct omap_video_timings *timings) { + struct omap_dss_output *out = dssdev-output; + DSSDBG(venc_set_timings\n); + if (out == NULL) + return; + mutex_lock(venc.venc_lock); /* Reset WSS data when the TV standard changes. */ @@ -571,13 +579,13 @@ void omapdss_venc_set_timings(struct omap_dss_device *dssdev, int r; /* turn the venc off and on to get new timings to use */ - venc_power_off(dssdev); + venc_power_off(out); - r = venc_power_on(dssdev); + r = venc_power_on(out); if (r) DSSERR(failed to power on VENC\n); } else { - dss_mgr_set_timings(dssdev-manager, timings); + dss_mgr_set_timings(out-manager, timings); } mutex_unlock(venc.venc_lock); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 17/23] OMAPDSS: HDMI: Pass omap_dss_output within the driver
When a panel driver calls a HDMI function, it passes the omap_dss_device pointer, this pointer currently propagates within the HDMI driver to configure the interface. Extract the omap_dss_output pointer from omap_dss_device received from the panel driver, pass the output pointer to HDMI functions local to the driver to configure the interface, these functions no longer need omap_dss_device since the driver now maintains a copy of output parameters. Replace dssdev-manager references with out-manager references as only these will be valid later. With the addition of outputs. There is a possibility that an omap_dss_device isn't connected to an output, or a manager isn't connected to an output yet. Ensure that the HDMI interface functions proceed only if the output is non NULL. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/hdmi.c | 40 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index d93954d..3c89904 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -407,9 +407,10 @@ unsigned long hdmi_get_pixel_clock(void) return hdmi.ip_data.cfg.timings.pixel_clock * 1000; } -static void hdmi_compute_pll(struct omap_dss_device *dssdev, int phy, +static void hdmi_compute_pll(struct omap_dss_output *out, int phy, struct hdmi_pll_info *pi) { + struct omap_dss_device *dssdev = out-device; unsigned long clkin, refclk; u32 mf; @@ -458,7 +459,7 @@ static void hdmi_compute_pll(struct omap_dss_device *dssdev, int phy, DSSDBG(range = %d sd = %d\n, pi-dcofreq, pi-regsd); } -static int hdmi_power_on(struct omap_dss_device *dssdev) +static int hdmi_power_on(struct omap_dss_output *out) { int r; struct omap_video_timings *p; @@ -468,7 +469,7 @@ static int hdmi_power_on(struct omap_dss_device *dssdev) if (r) return r; - dss_mgr_disable(dssdev-manager); + dss_mgr_disable(out-manager); p = hdmi.ip_data.cfg.timings; @@ -476,7 +477,7 @@ static int hdmi_power_on(struct omap_dss_device *dssdev) phy = p-pixel_clock; - hdmi_compute_pll(dssdev, phy, hdmi.ip_data.pll_data); + hdmi_compute_pll(out, phy, hdmi.ip_data.pll_data); hdmi.ip_data.ops-video_disable(hdmi.ip_data); @@ -504,19 +505,19 @@ static int hdmi_power_on(struct omap_dss_device *dssdev) * dynamically by user. This can be moved to single location , say * Boardfile. */ - dss_select_dispc_clk_source(dssdev-clocks.dispc.dispc_fclk_src); + dss_select_dispc_clk_source(out-device-clocks.dispc.dispc_fclk_src); /* bypass TV gamma table */ dispc_enable_gamma_table(0); /* tv size */ - dss_mgr_set_timings(dssdev-manager, p); + dss_mgr_set_timings(out-manager, p); r = hdmi.ip_data.ops-video_enable(hdmi.ip_data); if (r) goto err_vid_enable; - r = dss_mgr_enable(dssdev-manager); + r = dss_mgr_enable(out-manager); if (r) goto err_mgr_enable; @@ -533,9 +534,9 @@ err: return -EIO; } -static void hdmi_power_off(struct omap_dss_device *dssdev) +static void hdmi_power_off(struct omap_dss_output *out) { - dss_mgr_disable(dssdev-manager); + dss_mgr_disable(out-manager); hdmi.ip_data.ops-video_disable(hdmi.ip_data); hdmi.ip_data.ops-phy_disable(hdmi.ip_data); @@ -560,9 +561,13 @@ int omapdss_hdmi_display_check_timing(struct omap_dss_device *dssdev, void omapdss_hdmi_display_set_timing(struct omap_dss_device *dssdev, struct omap_video_timings *timings) { + struct omap_dss_output *out = dssdev-output; struct hdmi_cm cm; const struct hdmi_config *t; + if (out == NULL) + return; + mutex_lock(hdmi.lock); cm = hdmi_get_code(timings); @@ -575,13 +580,13 @@ void omapdss_hdmi_display_set_timing(struct omap_dss_device *dssdev, if (dssdev-state == OMAP_DSS_DISPLAY_ACTIVE) { int r; - hdmi_power_off(dssdev); + hdmi_power_off(out); - r = hdmi_power_on(dssdev); + r = hdmi_power_on(out); if (r) DSSERR(failed to power on device\n); } else { - dss_mgr_set_timings(dssdev-manager, t-timings); + dss_mgr_set_timings(out-manager, t-timings); } mutex_unlock(hdmi.lock); @@ -640,14 +645,15 @@ bool omapdss_hdmi_detect(void) int omapdss_hdmi_display_enable(struct omap_dss_device *dssdev) { struct omap_dss_hdmi_data *priv = dssdev-data; + struct omap_dss_output *out = dssdev-output; int r = 0; DSSDBG(ENTER hdmi_display_enable\n); mutex_lock(hdmi.lock); - if (dssdev-manager == NULL) { -
[PATCH v2 18/23] OMAPDSS: HDMI: Add dssdev pointer as an argument to all functions used by hdmi panel driver
All functions of an output driver used by a panel driver should have an omap_dss_device pointer as an argument. This is needed as the function would somehow need to retrieve the output driver's private data. It may not be needed by some of the outputs for now as driver data is globally visible within them. The correct way to retrieve driver data is to extract the platform device from the output, and then extract the driver data from the platform device. Add dssdev arguments to functions used by panel drivers which currently miss it. This will come to use when the HDMI functions retrieve the driver data in the correct manner. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/dss.h| 17 + drivers/video/omap2/dss/hdmi.c | 17 + drivers/video/omap2/dss/hdmi_panel.c | 20 ++-- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index de2fb9d..11c245d 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -506,17 +506,18 @@ void omapdss_hdmi_display_set_timing(struct omap_dss_device *dssdev, struct omap_video_timings *timings); int omapdss_hdmi_display_check_timing(struct omap_dss_device *dssdev, struct omap_video_timings *timings); -int omapdss_hdmi_read_edid(u8 *buf, int len); -bool omapdss_hdmi_detect(void); +int omapdss_hdmi_read_edid(struct omap_dss_device *dssdev, u8 *buf, int len); +bool omapdss_hdmi_detect(struct omap_dss_device *dssdev); int hdmi_panel_init(void); void hdmi_panel_exit(void); #ifdef CONFIG_OMAP4_DSS_HDMI_AUDIO -int hdmi_audio_enable(void); -void hdmi_audio_disable(void); -int hdmi_audio_start(void); -void hdmi_audio_stop(void); -bool hdmi_mode_has_audio(void); -int hdmi_audio_config(struct omap_dss_audio *audio); +int hdmi_audio_enable(struct omap_dss_device *dssdev); +void hdmi_audio_disable(struct omap_dss_device *dssdev); +int hdmi_audio_start(struct omap_dss_device *dssdev); +void hdmi_audio_stop(struct omap_dss_device *dssdev); +bool hdmi_mode_has_audio(struct omap_dss_device *dssdev); +int hdmi_audio_config(struct omap_dss_device *dssdev, + struct omap_dss_audio *audio); #endif /* RFBI */ diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 3c89904..2d3b959 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -608,7 +608,7 @@ static void hdmi_dump_regs(struct seq_file *s) mutex_unlock(hdmi.lock); } -int omapdss_hdmi_read_edid(u8 *buf, int len) +int omapdss_hdmi_read_edid(struct omap_dss_device *dssdev, u8 *buf, int len) { int r; @@ -625,7 +625,7 @@ int omapdss_hdmi_read_edid(u8 *buf, int len) return r; } -bool omapdss_hdmi_detect(void) +bool omapdss_hdmi_detect(struct omap_dss_device *dssdev) { int r; @@ -833,35 +833,35 @@ int hdmi_compute_acr(u32 sample_freq, u32 *n, u32 *cts) return 0; } -int hdmi_audio_enable(void) +int hdmi_audio_enable(struct omap_dss_device *dssdev) { DSSDBG(audio_enable\n); return hdmi.ip_data.ops-audio_enable(hdmi.ip_data); } -void hdmi_audio_disable(void) +void hdmi_audio_disable(struct omap_dss_device *dssdev) { DSSDBG(audio_disable\n); hdmi.ip_data.ops-audio_disable(hdmi.ip_data); } -int hdmi_audio_start(void) +int hdmi_audio_start(struct omap_dss_device *dssdev) { DSSDBG(audio_start\n); return hdmi.ip_data.ops-audio_start(hdmi.ip_data); } -void hdmi_audio_stop(void) +void hdmi_audio_stop(struct omap_dss_device *dssdev) { DSSDBG(audio_stop\n); hdmi.ip_data.ops-audio_stop(hdmi.ip_data); } -bool hdmi_mode_has_audio(void) +bool hdmi_mode_has_audio(struct omap_dss_device *dssdev) { if (hdmi.ip_data.cfg.cm.mode == HDMI_HDMI) return true; @@ -869,7 +869,8 @@ bool hdmi_mode_has_audio(void) return false; } -int hdmi_audio_config(struct omap_dss_audio *audio) +int hdmi_audio_config(struct omap_dss_device *dssdev, + struct omap_dss_audio *audio) { return hdmi.ip_data.ops-audio_config(hdmi.ip_data, audio); } diff --git a/drivers/video/omap2/dss/hdmi_panel.c b/drivers/video/omap2/dss/hdmi_panel.c index 69fb115..ef3fc86 100644 --- a/drivers/video/omap2/dss/hdmi_panel.c +++ b/drivers/video/omap2/dss/hdmi_panel.c @@ -88,13 +88,13 @@ static int hdmi_panel_audio_enable(struct omap_dss_device *dssdev) /* enable audio only if the display is active and supports audio */ if (dssdev-state != OMAP_DSS_DISPLAY_ACTIVE || - !hdmi_mode_has_audio()) { + !hdmi_mode_has_audio(dssdev)) { DSSERR(audio not supported or display is off\n); r = -EPERM; goto err; } - r = hdmi_audio_enable(); + r = hdmi_audio_enable(dssdev); if (!r)
[PATCH v2 19/23] OMAPDSS/OMAPFB: Change dssdev-manager references
To retrieve the manager pointer via a device, we need to now access it via the output to which the device is connected. Make this change in the places where such a reference is made. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/display.c | 11 +-- drivers/video/omap2/omapfb/omapfb-ioctl.c |7 +-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c index 5bd957e..07fd1c7 100644 --- a/drivers/video/omap2/dss/display.c +++ b/drivers/video/omap2/dss/display.c @@ -349,8 +349,15 @@ void dss_uninit_device(struct platform_device *pdev, while ((attr = display_sysfs_attrs[i++]) != NULL) device_remove_file(dssdev-dev, attr); - if (dssdev-manager) - dssdev-manager-unset_device(dssdev-manager); + if (dssdev-output) { + if (dssdev-output-manager) { + struct omap_overlay_manager *mgr = + dssdev-output-manager; + + mgr-unset_output(mgr); + } + dssdev-output-unset_device(dssdev-output); + } } static int dss_suspend_device(struct device *dev, void *data) diff --git a/drivers/video/omap2/omapfb/omapfb-ioctl.c b/drivers/video/omap2/omapfb/omapfb-ioctl.c index c6cf372..606b89f 100644 --- a/drivers/video/omap2/omapfb/omapfb-ioctl.c +++ b/drivers/video/omap2/omapfb/omapfb-ioctl.c @@ -599,6 +599,7 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg) struct omapfb_info *ofbi = FB2OFB(fbi); struct omapfb2_device *fbdev = ofbi-fbdev; struct omap_dss_device *display = fb2display(fbi); + struct omap_overlay_manager *mgr; union { struct omapfb_update_window_old uwnd_o; @@ -786,12 +787,14 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg) case OMAPFB_WAITFORVSYNC: DBG(ioctl WAITFORVSYNC\n); - if (!display) { + if (!display !display-output !display-output-manager) { r = -EINVAL; break; } - r = display-manager-wait_for_vsync(display-manager); + mgr = display-output-manager; + + r = mgr-wait_for_vsync(mgr); break; case OMAPFB_WAITFORGO: -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 20/23] OMAPDSS: MANAGER: Update display sysfs store
The display sysfs attribute's store function needs to be changed with the introduction of outputs. Providing a manager to the display isn't enough to create a link now, the manager needs and output to connect to. A manager's display store file only has the information of the manager and the desired display, it is not aware of which output should the manager connect to. Because of this, a new constraint needs to be set up when setting a display via this sysfs file. The constraint is that the desired display should already be connected to an output before calling this sysfs function. This might break some existing user space stuff which uses sysfs directly. But in most cases dss_recheck_connections will connect displays to floating outputs. DSS sysfs files are being planned to be remove anyway, so it's not much of a harm. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/manager.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c index fd39f66..d808ce2 100644 --- a/drivers/video/omap2/dss/manager.c +++ b/drivers/video/omap2/dss/manager.c @@ -74,18 +74,33 @@ static ssize_t manager_display_store(struct omap_overlay_manager *mgr, if (dssdev) DSSDBG(display %s found\n, dssdev-name); - if (mgr-get_device(mgr)) { - r = mgr-unset_device(mgr); + if (mgr-output) { + if (mgr-output-device) { + r = mgr-output-unset_device(mgr-output); + if (r) { + goto put_device; + DSSERR(failed to unset device from output\n); + } + } + + r = mgr-unset_output(mgr); if (r) { - DSSERR(failed to unset display\n); + DSSERR(failed to unset current output\n); goto put_device; } } if (dssdev) { - r = mgr-set_device(mgr, dssdev); + struct omap_dss_output *out = dssdev-output; + + if (!out) { + DSSERR(no output connected to device\n); + goto put_device; + } + + r = mgr-set_output(mgr, out); if (r) { - DSSERR(failed to set manager\n); + DSSERR(failed to set manager output\n); goto put_device; } -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 21/23] OMAPDSS: MANAGER: Get device via output
A manager is not connected to a device directly any more. It first connects to an output, and then to the display. Update the manager's get_device op to return the device via the connected output. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/manager.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c index d808ce2..d14ffc5 100644 --- a/drivers/video/omap2/dss/manager.c +++ b/drivers/video/omap2/dss/manager.c @@ -509,7 +509,7 @@ static struct kobj_type manager_ktype = { static inline struct omap_dss_device *dss_mgr_get_device(struct omap_overlay_manager *mgr) { - return mgr-device; + return mgr-output ? mgr-output-device : NULL; } static int dss_mgr_wait_for_vsync(struct omap_overlay_manager *mgr) -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 22/23] OMAPDSS: APPLY: Remove omap_dss_device references from dss_ovl_enable/disable
An overlay isn't allowed to be enabled/disabled if it isn't connected to an omap_dss_device. This requirement isn't needed any more. An overlay can be enabled/disabled as long as it has an output connected to it. The output may not be connected to a device, but we can be assured that the connected manager's output is in use by an output interface. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/apply.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index 8a05cbc..d584f0c 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c @@ -1607,8 +1607,7 @@ int dss_ovl_enable(struct omap_overlay *ovl) goto err1; } - if (ovl-manager == NULL || - ovl-manager-get_device(ovl-manager) == NULL) { + if (ovl-manager == NULL || ovl-manager-output == NULL) { r = -EINVAL; goto err1; } @@ -1677,8 +1676,7 @@ int dss_ovl_disable(struct omap_overlay *ovl) goto err; } - if (ovl-manager == NULL || - ovl-manager-get_device(ovl-manager) == NULL) { + if (ovl-manager == NULL || ovl-manager-output == NULL) { r = -EINVAL; goto err; } -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 23/23] OMAPDSS: Remove old way of setting manager and device links
Now that an omap_dss_output can be used to link between managers and devices, we can remove the old way of setting manager and device links. This involves removing the device and manager pointers from omap_overlay_manager and omap_dss_device respectively, and removing the set_device/unset_device ops from omap_overlay_manager. Signed-off-by: Archit Taneja arc...@ti.com --- drivers/video/omap2/dss/apply.c | 64 - drivers/video/omap2/dss/manager.c |2 -- include/video/omapdss.h |5 --- 3 files changed, 71 deletions(-) diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index d584f0c..0ae70ab 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c @@ -1247,70 +1247,6 @@ void dss_mgr_get_info(struct omap_overlay_manager *mgr, spin_unlock_irqrestore(data_lock, flags); } -int dss_mgr_set_device(struct omap_overlay_manager *mgr, - struct omap_dss_device *dssdev) -{ - int r; - - mutex_lock(apply_lock); - - if (dssdev-manager) { - DSSERR(display '%s' already has a manager '%s'\n, - dssdev-name, dssdev-manager-name); - r = -EINVAL; - goto err; - } - - if ((mgr-supported_displays dssdev-type) == 0) { - DSSERR(display '%s' does not support manager '%s'\n, - dssdev-name, mgr-name); - r = -EINVAL; - goto err; - } - - dssdev-manager = mgr; - mgr-device = dssdev; - - mutex_unlock(apply_lock); - - return 0; -err: - mutex_unlock(apply_lock); - return r; -} - -int dss_mgr_unset_device(struct omap_overlay_manager *mgr) -{ - int r; - - mutex_lock(apply_lock); - - if (!mgr-device) { - DSSERR(failed to unset display, display not set.\n); - r = -EINVAL; - goto err; - } - - /* -* Don't allow currently enabled displays to have the overlay manager -* pulled out from underneath them -*/ - if (mgr-device-state != OMAP_DSS_DISPLAY_DISABLED) { - r = -EINVAL; - goto err; - } - - mgr-device-manager = NULL; - mgr-device = NULL; - - mutex_unlock(apply_lock); - - return 0; -err: - mutex_unlock(apply_lock); - return r; -} - int dss_mgr_set_output(struct omap_overlay_manager *mgr, struct omap_dss_output *output) { diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c index d14ffc5..953f5ee 100644 --- a/drivers/video/omap2/dss/manager.c +++ b/drivers/video/omap2/dss/manager.c @@ -570,8 +570,6 @@ int dss_init_overlay_managers(struct platform_device *pdev) break; } - mgr-set_device = dss_mgr_set_device; - mgr-unset_device = dss_mgr_unset_device; mgr-set_output = dss_mgr_set_output; mgr-unset_output = dss_mgr_unset_output; mgr-apply = omap_dss_mgr_apply; diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 0e73ef8..4ff43e6 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -466,7 +466,6 @@ struct omap_overlay_manager { enum omap_dss_output_id supported_outputs; /* dynamic fields */ - struct omap_dss_device *device; struct omap_dss_output *output; /* @@ -480,9 +479,6 @@ struct omap_overlay_manager { * interrupt context */ - int (*set_device)(struct omap_overlay_manager *mgr, - struct omap_dss_device *dssdev); - int (*unset_device)(struct omap_overlay_manager *mgr); int (*set_output)(struct omap_overlay_manager *mgr, struct omap_dss_output *output); int (*unset_output)(struct omap_overlay_manager *mgr); @@ -634,7 +630,6 @@ struct omap_dss_device { enum omap_display_caps caps; - struct omap_overlay_manager *manager; struct omap_dss_output *output; enum omap_dss_display_state state; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 2/3] ARM: omap: hwmod: get rid of all omap_clk_get_by_name usage
On 08/30/2012 10:39 AM, Rajendra Nayak wrote: On Thursday 30 August 2012 05:45 AM, Turquette, Mike wrote: On Wed, Aug 29, 2012 at 1:56 AM, Rajendra Nayakrna...@ti.com wrote: diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index d7f55e4..a3831a2 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c @@ -3156,6 +3156,7 @@ static struct omap_clk omap44xx_clks[] = { CLK(NULL, dss_tv_clk,dss_tv_clk,CK_443X), CLK(NULL, dss_48mhz_clk,dss_48mhz_clk, CK_443X), CLK(NULL, dss_dss_clk,dss_dss_clk, CK_443X), + CLK(NULL, dss_fck,dss_fck, CK_443X), CLK(omapdss_dss, ick,dss_fck, CK_443X), Is it right to re-use dss_fck for the ick here? I think it is due to omap4 modulemode stuff but I don't have DM in front of me and wanted a double-check... yes, its because of the wierdness of DSS clocks where a so-called optional clock is actually a function clock. Not only, it is a hack to allow the DSS to be enabled whenever a DSS submodule has to be enabled. Since they are sharing the ick, it will enable the modulemode when the DISPC will be enabled. That hack should disappear as soon as the DSS will be able to handle the PM dependency between DSS submodules and the DSS itself using pm_runtime parent/child link. And then we will have to remove this fake ick modulemode clock node and let hwmod handle that properly. Tomi already cleaned the DSS part, I guess it should be upstreamed soon, if this is not already the case. Regards, Benoit -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC PATCH 1/5] i2c: introduce i2c-cbus driver
On Wed, Aug 29, 2012 at 12:34:23AM +0300, Aaro Koskinen wrote: Add i2c driver to enable access to devices behind CBUS on Nokia Internet Tablets. Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi Cc: linux-...@vger.kernel.org Acked-by: Felipe Balbi ba...@ti.com --- drivers/i2c/busses/Kconfig| 10 ++ drivers/i2c/busses/Makefile |1 + drivers/i2c/busses/i2c-cbus.c | 342 + include/linux/i2c-cbus.h | 27 4 files changed, 380 insertions(+), 0 deletions(-) create mode 100644 drivers/i2c/busses/i2c-cbus.c create mode 100644 include/linux/i2c-cbus.h diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index b4aaa1b..184ef43 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -331,6 +331,16 @@ config I2C_BLACKFIN_TWI_CLK_KHZ help The unit of the TWI clock is kHz. +config I2C_CBUS + tristate CBUS I2C driver + depends on GENERIC_GPIO + help + Support for CBUS access using I2C API. Mostly relevant for Nokia + Internet Tablets (770, N800 and N810). + + This driver can also be built as a module. If so, the module + will be called i2c-cbus. + config I2C_CPM tristate Freescale CPM1 or CPM2 (MPC8xx/826x) depends on (CPM1 || CPM2) OF_I2C diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile index ce3c2be..44dbfd1 100644 --- a/drivers/i2c/busses/Makefile +++ b/drivers/i2c/busses/Makefile @@ -31,6 +31,7 @@ obj-$(CONFIG_I2C_POWERMAC) += i2c-powermac.o obj-$(CONFIG_I2C_AT91) += i2c-at91.o obj-$(CONFIG_I2C_AU1550) += i2c-au1550.o obj-$(CONFIG_I2C_BLACKFIN_TWI) += i2c-bfin-twi.o +obj-$(CONFIG_I2C_CBUS) += i2c-cbus.o obj-$(CONFIG_I2C_CPM)+= i2c-cpm.o obj-$(CONFIG_I2C_DAVINCI)+= i2c-davinci.o obj-$(CONFIG_I2C_DESIGNWARE_PLATFORM)+= i2c-designware-platform.o diff --git a/drivers/i2c/busses/i2c-cbus.c b/drivers/i2c/busses/i2c-cbus.c new file mode 100644 index 000..3cc5be4 --- /dev/null +++ b/drivers/i2c/busses/i2c-cbus.c @@ -0,0 +1,342 @@ +/* + * CBUS I2C driver for Nokia Internet Tablets. + * + * Copyright (C) 2004-2010 Nokia Corporation + * + * Based on code written by Juha Yrjölä, David Weinehall, Mikko Ylinen and + * Felipe Balbi. Converted to I2C driver by Aaro Koskinen. + * + * This file is subject to the terms and conditions of the GNU General + * Public License. See the file COPYING in the main directory of this + * archive for more details. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include linux/gpio.h +#include linux/interrupt.h +#include linux/kernel.h +#include linux/module.h +#include linux/delay.h +#include linux/slab.h +#include linux/init.h +#include linux/errno.h +#include linux/platform_device.h +#include linux/i2c.h +#include linux/i2c-cbus.h +#include linux/io.h + +struct cbus_host { + /* host lock */ + spinlock_t lock; + + struct device *dev; + + int clk_gpio; + int dat_gpio; + int sel_gpio; +}; + +/** + * cbus_send_bit - sends one bit over the bus + * @host: the host we're using + * @bit: one bit of information to send + * @input: whether to set data pin as input after sending + */ +static int cbus_send_bit(struct cbus_host *host, unsigned bit, + unsigned input) +{ + int ret = 0; + + gpio_set_value(host-dat_gpio, bit ? 1 : 0); + gpio_set_value(host-clk_gpio, 1); + + /* The data bit is read on the rising edge of CLK */ + if (input) + ret = gpio_direction_input(host-dat_gpio); + + gpio_set_value(host-clk_gpio, 0); + + return ret; +} + +/** + * cbus_send_data - sends @len amount of data over the bus + * @host: the host we're using + * @data: the data to send + * @len: size of the transfer + * @input: whether to set data pin as input after sending + */ +static int cbus_send_data(struct cbus_host *host, unsigned data, unsigned len, + unsigned input) +{ + int ret = 0; + int i; + + for (i = len; i 0; i--) { + ret = cbus_send_bit(host, data (1 (i - 1)), + input (i == 1)); + if (ret 0) + goto out; + } + +out: + return ret; +} + +/** + * cbus_receive_bit - receives one bit from the bus + * @host: the host we're using + */ +static int cbus_receive_bit(struct cbus_host *host) +{ + int ret; + + gpio_set_value(host-clk_gpio, 1); + ret = gpio_get_value(host-dat_gpio); + if (ret 0) + goto out; + gpio_set_value(host-clk_gpio, 0); +
Re: [RFC PATCH 2/5] mfd: introduce retu-mfd driver
On Wed, Aug 29, 2012 at 12:34:24AM +0300, Aaro Koskinen wrote: Retu is a multi-function device found on Nokia Internet Tablets implementing at least watchdog, RTC, headset detection and power button functionality. This patch implements a minimum functionality providing only register access functions. Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi Cc: sa...@linux.intel.com --- drivers/mfd/Kconfig |8 +++ drivers/mfd/Makefile |1 + drivers/mfd/retu-mfd.c | 114 ++ include/linux/mfd/retu.h | 20 4 files changed, 143 insertions(+), 0 deletions(-) create mode 100644 drivers/mfd/retu-mfd.c create mode 100644 include/linux/mfd/retu.h diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index b1a1462..8ca1270 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1003,6 +1003,14 @@ config MFD_PALMAS If you say yes here you get support for the Palmas series of PMIC chips from Texas Instruments. +config MFD_RETU + tristate Support for Retu multi-function device + select MFD_CORE + depends on I2C + help + Retu is a multi-function device found on Nokia Internet Tables ^^ tablets + (770, N800 and N810). + endmenu endif diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index 79dd22d..962ec9d 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile @@ -132,3 +132,4 @@ obj-$(CONFIG_MFD_RC5T583) += rc5t583.o rc5t583-irq.o obj-$(CONFIG_MFD_SEC_CORE) += sec-core.o sec-irq.o obj-$(CONFIG_MFD_ANATOP) += anatop-mfd.o obj-$(CONFIG_MFD_LM3533) += lm3533-core.o lm3533-ctrlbank.o +obj-$(CONFIG_MFD_RETU) += retu-mfd.o diff --git a/drivers/mfd/retu-mfd.c b/drivers/mfd/retu-mfd.c new file mode 100644 index 000..f0097d7 --- /dev/null +++ b/drivers/mfd/retu-mfd.c @@ -0,0 +1,114 @@ +/* + * Retu MFD driver + * + * Copyright (C) 2004, 2005 Nokia Corporation + * + * Based on code written by Juha Yrjölä, David Weinehall and Mikko Ylinen. + * Rewritten to MFD/I2C driver by Aaro Koskinen. + * + * This file is subject to the terms and conditions of the GNU General + * Public License. See the file COPYING in the main directory of this + * archive for more details. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include linux/err.h +#include linux/i2c.h +#include linux/init.h +#include linux/slab.h +#include linux/mutex.h +#include linux/module.h +#include linux/mfd/core.h +#include linux/mfd/retu.h +#include linux/moduleparam.h + +/* Registers */ +#define RETU_REG_ASICR 0x00/* ASIC ID and revision */ +#define RETU_REG_ASICR_VILMA (1 7)/* Bit indicating Vilma */ + +static struct mfd_cell retu_devs[] = { + { .name = retu-wdt }, +}; + +int retu_read(struct retu_dev *rdev, u8 reg) +{ + return i2c_smbus_read_word_data(rdev-i2c, reg); +} +EXPORT_SYMBOL_GPL(retu_read); + +int retu_write(struct retu_dev *rdev, u8 reg, u16 data) +{ + return i2c_smbus_write_word_data(rdev-i2c, reg, data); +} +EXPORT_SYMBOL_GPL(retu_write); + +static int __devinit retu_probe(struct i2c_client *i2c, + const struct i2c_device_id *id) +{ + struct retu_dev *rdev; + int ret; + + rdev = kzalloc(sizeof(*rdev), GFP_KERNEL); + if (rdev == NULL) + return -ENOMEM; + + i2c_set_clientdata(i2c, rdev); + rdev-dev = i2c-dev; + rdev-i2c = i2c; + + ret = retu_read(rdev, RETU_REG_ASICR); + if (ret 0) { + dev_err(rdev-dev, could not read Retu revision: %d\n, ret); + return -EIO; + } + + dev_info(rdev-dev, Retu%s v%d.%d found\n, + (ret RETU_REG_ASICR_VILMA) ? Vilma : , + (ret 4) 0x7, ret 0xf); + + ret = mfd_add_devices(rdev-dev, -1, retu_devs, ARRAY_SIZE(retu_devs), + NULL, 0); + if (ret 0) + goto error; + + return ret; + +error: + kfree(rdev); + return ret; +} looks like this misses the entire irq_chip... maybe on later patches (?) +static int __devexit retu_remove(struct i2c_client *i2c) +{ + struct retu_dev *rdev = i2c_get_clientdata(i2c); + + mfd_remove_devices(rdev-dev); + kfree(rdev); + + return 0; +} + +static const struct i2c_device_id retu_id[] = { + { retu-mfd, 0 }, + { } +}; +MODULE_DEVICE_TABLE(i2c, retu_id); + +static struct i2c_driver retu_driver = { + .driver = { + .name = retu-mfd, +
Re: [RFC PATCH 4/5] arm: omap: n8x0: add i2c-cbus platform data
On Wed, Aug 29, 2012 at 12:34:26AM +0300, Aaro Koskinen wrote: Add platform data to enable i2c-cbus on N8x0. It will be I2C bus #3. Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi Acked-by: Felipe Balbi ba...@ti.com --- arch/arm/mach-omap2/board-n8x0.c | 27 +++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index 677357f..8ea0dea 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -18,6 +18,7 @@ #include linux/io.h #include linux/stddef.h #include linux/i2c.h +#include linux/i2c-cbus.h #include linux/spi/spi.h #include linux/usb/musb.h #include sound/tlv320aic3x.h @@ -42,6 +43,31 @@ #define TUSB6010_GPIO_ENABLE 0 #define TUSB6010_DMACHAN 0x3f +#if defined(CONFIG_I2C_CBUS) || defined(CONFIG_I2C_CBUS_MODULE) +static struct i2c_cbus_platform_data n8x0_cbus_data = { + .clk_gpio = 66, + .dat_gpio = 65, + .sel_gpio = 64, +}; + +static struct platform_device n8x0_cbus_device = { + .name = i2c-cbus, + .id = 3, + .dev= { + .platform_data = n8x0_cbus_data, + }, +}; + +static void __init n8x0_cbus_init(void) +{ + platform_device_register(n8x0_cbus_device); +} +#else /* CONFIG_I2C_CBUS */ +static void __init n8x0_cbus_init(void) +{ +} +#endif /* CONFIG_I2C_CBUS */ + #if defined(CONFIG_USB_MUSB_TUSB6010) || defined(CONFIG_USB_MUSB_TUSB6010_MODULE) /* * Enable or disable power to TUSB6010. When enabling, turn on 3.3 V and @@ -681,6 +707,7 @@ static void __init n8x0_init_machine(void) gpmc_onenand_init(board_onenand_data); n8x0_mmc_init(); n8x0_usb_init(); + n8x0_cbus_init(); } MACHINE_START(NOKIA_N800, Nokia N800) -- 1.7.2.5 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- balbi signature.asc Description: Digital signature
Re: [RFC PATCH 5/5] arm: omap: n8x0: enable retu
On Wed, Aug 29, 2012 at 12:34:27AM +0300, Aaro Koskinen wrote: Add Retu configuration. Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi Acked-by: Felipe Balbi ba...@ti.com --- arch/arm/mach-omap2/board-n8x0.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index 8ea0dea..6ac8cd9 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -58,8 +58,16 @@ static struct platform_device n8x0_cbus_device = { }, }; +static struct i2c_board_info n8x0_i2c_board_info_3[] __initdata = { + { + I2C_BOARD_INFO(retu-mfd, 0x01), + }, +}; + static void __init n8x0_cbus_init(void) { + i2c_register_board_info(3, n8x0_i2c_board_info_3, + ARRAY_SIZE(n8x0_i2c_board_info_3)); platform_device_register(n8x0_cbus_device); } #else /* CONFIG_I2C_CBUS */ -- 1.7.2.5 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- balbi signature.asc Description: Digital signature
Re: [RFC PATCH 0/5] cbus/retu drivers to mainline
Hi, On Wed, Aug 29, 2012 at 12:34:22AM +0300, Aaro Koskinen wrote: Hi, I would like to start converting cbus drivers from linux-omap cbus branch for mainline inclusion. Currently e.g. watchdog support is missing at least on Nokia N800, so you cannot run the mainline kernel for longer than ~60 seconds (and there is no way to disable the watchdog). My proposal is to make cbus an i2c bus driver. For other drivers, it should be easier to find a proper place in the tree. Here's a first quickly made attempt to provide watchdog driver functionality for N800. Please comment. Aaro Koskinen (5): i2c: introduce i2c-cbus driver mfd: introduce retu-mfd driver watchdog: introduce retu_wdt driver arm: omap: n8x0: add i2c-cbus platform data arm: omap: n8x0: enable retu Very good to see these going upstream :-) -- balbi signature.asc Description: Digital signature
Re: TI SoC Linux BoF @ Linux Plumbers Conference: tomorrow
On Wed, 29 Aug 2012, Locke, Matthew wrote: During lunch On the schedule[1], the TI Linux BoF is from 12:35pm to 13:20pm. So it looks like people can get a quick lunch outside from 12:05pm to 12:30pm, then head to Nautilus 1 for the BoF. It's all informal, so please drop in and say hello if you're using OMAP/AM/DM/C6x/whatever chips. - Paul 1. http://summit.linuxplumbersconf.org/lpc-2012/2012-08-30/display? -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 2/3] ARM: omap: hwmod: get rid of all omap_clk_get_by_name usage
On Thu, 2012-08-30 at 13:57 +0200, Benoit Cousson wrote: On 08/30/2012 10:39 AM, Rajendra Nayak wrote: On Thursday 30 August 2012 05:45 AM, Turquette, Mike wrote: On Wed, Aug 29, 2012 at 1:56 AM, Rajendra Nayakrna...@ti.com wrote: diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index d7f55e4..a3831a2 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c @@ -3156,6 +3156,7 @@ static struct omap_clk omap44xx_clks[] = { CLK(NULL, dss_tv_clk,dss_tv_clk,CK_443X), CLK(NULL, dss_48mhz_clk,dss_48mhz_clk, CK_443X), CLK(NULL, dss_dss_clk,dss_dss_clk, CK_443X), + CLK(NULL, dss_fck,dss_fck, CK_443X), CLK(omapdss_dss, ick,dss_fck, CK_443X), Is it right to re-use dss_fck for the ick here? I think it is due to omap4 modulemode stuff but I don't have DM in front of me and wanted a double-check... yes, its because of the wierdness of DSS clocks where a so-called optional clock is actually a function clock. Not only, it is a hack to allow the DSS to be enabled whenever a DSS submodule has to be enabled. Since they are sharing the ick, it will enable the modulemode when the DISPC will be enabled. That hack should disappear as soon as the DSS will be able to handle the PM dependency between DSS submodules and the DSS itself using pm_runtime parent/child link. And then we will have to remove this fake ick modulemode clock node and let hwmod handle that properly. Tomi already cleaned the DSS part, I guess it should be upstreamed soon, if this is not already the case. This is in 3.5. omapdss_dss is now the parent for the rest of the dss submodules, and runtime PM is being used. I think we should now revisit this dss clock handling to see if there are any other changes required in the omapdss side, but I hope they are already according to our discussions and correct. Tomi signature.asc Description: This is a digitally signed message part
Re: [PATCH RESEND 1/4] ARM: OMAP2+: AM33XX: Add tps65910 device tree data
On Wed, Aug 29, 2012 at 09:31:31AM +0100, Lee Jones wrote: On Tue, Aug 28, 2012 at 10:21:33AM -0700, Mark Brown wrote: The regulator-name property is used to populate constrains-name. Are you sure you still want them all removed? Yes, of course. There's no way that a generic .dtsi used for any possible board could come up with a sensible value. So how should constrains-name be populated then? Would you prefer regulator-names moved to the .dts file(s), or something else? Of course, yes. The sole purpose of that field is to give a board specific name to the supply. It can't usefully be set by anything except the board. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V5 0/6] OMAPDSS: Cleanup cpu_is checks
Hi, * Tomi Valkeinen tomi.valkei...@ti.com [120830 00:35]: On Wed, 2012-08-29 at 17:20 -0700, Tony Lindgren wrote: Good to see this, we need this badly to avoid blocking single zImage effort on omaps. Can you also please take What is the issue with single zImage? How do cpu_is_ check affect it? The usage for that should only be limited to arch/arm/mach-omap2 so we can make cpu.h local as we can't include mach and plat header files from the drivers with single zImage. I had a brief look at drivers/video/omap*. Here's a brief status. I don't really know much about the old fb driver (drivers/video/omap) so my comments may not be totally correct. And all fixing I do there is done in blind, I don't have any omap1 devices. I've left out the trivial cleanups from the list (i.e. file includes a header that it doesn't need), there were a bunch of those. I'll make a patch for these. $ git grep -E plat|mach drivers/video/omap* drivers/video/omap/lcd_ams_delta.c:#include plat/board-ams-delta.h * Needs to be moved Yes, that should be either mach/board-ams-delta.h, or separate driver specific headers in include/linux/platform_data. For omap1 we are not planning common zImage support, so let's just make sure we're not breaking anything there as people are still using it. * lcd_ams_delta uses also omap_write/read Limiting omap_write/read to omap1 is OK for now, unless the fix is trivial to do with ioremap + readw/writew. drivers/video/omap/lcd_inn1510.c:#include plat/fpga.h * No idea about this. Who wants to convert the fpga support? =) I'll move it to mach/fpga.h as it's omap1 specifc. drivers/video/omap/lcd_mipid.c:#include plat/lcd_mipid.h * Needs to be moved drivers/video/omap/lcd_osk.c:#include plat/mux.h * Uses omap_cfg_reg(PWL). I don't know what this is... I'll move plat/mux.h into mach for omap1. For omap2+, we have a local mux.h and are moving to use device tree based pinctrl-single driver. * lcd_osk.c uses omap_write/read drivers/video/omap/lcdc.c:#include mach/lcdc.h * Needs to be moved This you can move to platform_data or mach for omap1? drivers/video/omap/lcdc.c:#include plat/dma.h * Uses arch/arm/mach-omap1/lcd_dma.c. Any idea about this? Will DMA engine support OMAP1's LCD DMA? I think it should eventually as it can detect the device and could automatically call those functions. Not sure if all options for configuring it are available yet in dma engine. drivers/video/omap/omapfb_main.c:#include plat/dma.h * Uses DMA API to set DMA priority drivers/video/omap/sossi.c:#include plat/dma.h * Uses arch/arm/mach-omap1/lcd_dma.c drivers/video/omap2/dss/dss.c:#include plat/cpu.h * Uses cpu_is_* to find out the DSS version. dispc.c also uses cpu_is_* functions, but doesn't include plat/cpu.h. I know cpu_is_* checks should be removed, but is there some other file to include for the time being than plat/cpu.h? We could make it mach/cpu.h for omap1, but ideally we would just pass DSS_VERSION_XYZ type flag in platform data on omap1. drivers/video/omap2/dss/dss_features.c:#include plat/cpu.h * Uses cpu_is_* to find out the DSS version Here too. drivers/video/omap2/omapfb/omapfb-ioctl.c:#include plat/vrfb.h drivers/video/omap2/omapfb/omapfb-ioctl.c:#include plat/vram.h drivers/video/omap2/omapfb/omapfb-main.c:#include plat/vram.h drivers/video/omap2/omapfb/omapfb-main.c:#include plat/vrfb.h drivers/video/omap2/omapfb/omapfb-sysfs.c:#include plat/vrfb.h drivers/video/omap2/vram.c:#include plat/vram.h drivers/video/omap2/vram.c:#include plat/dma.h drivers/video/omap2/vrfb.c:#include plat/vrfb.h drivers/video/omap2/vrfb.c:#include plat/sdrc.h Of these, I'm not sure how to handle. These should eventually be in platform_data as driver specific headers. Grep shows that vram.c is only used by (the newer) omapfb, so it could be considered a part of that driver. It still needs to be built-in, as it needs to reserve memory early in the boot process (done with a call from arch/arm/plat-omap/common.c). Hmm it sounds like omap_vram_reserve_sdram_memblock() should be in plat-omap and just pass the pointer for later use for vram.c. Also board files can use a func call to define the amount of memory to allocate, but only rx51 seems to do this in the mainline. Anyway, I believe vram.c is going away when we start to use CMA. OK cool. As for vrfb... I'm not really sure where it belongs. It is used by the newer omapfb and OMAP V4L2 driver. VRFB is a part of the OMAP's memory controller, so I'm not sure if it's really a normal driver. Maybe just split it to platform code for the memblock stuff and pass the necessary information to the driver in platform_data? Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 1/9] ir-rx51: Adjust dependencies
Although this kind of IR diode circuitry is known to exist only in N900 hardware, nothing prevents making similar circuitry on any OMAP based board. The MACH_NOKIA_RX51 dependency is thus not something we want to be there. Also, this should depend on LIRC as it is a LIRC driver. Signed-off-by: Timo Kokkonen timo.t.kokko...@iki.fi --- drivers/media/rc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig index ffef8b4..093982b 100644 --- a/drivers/media/rc/Kconfig +++ b/drivers/media/rc/Kconfig @@ -273,7 +273,7 @@ config IR_IGUANA config IR_RX51 tristate Nokia N900 IR transmitter diode - depends on MACH_NOKIA_RX51 OMAP_DM_TIMER + depends on OMAP_DM_TIMER LIRC ---help--- Say Y or M here if you want to enable support for the IR transmitter diode built in the Nokia N900 (RX51) device. -- 1.7.12 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 8/9] ir-rx51: Remove useless variable from struct lirc_rx51
As clearly visible from the patch, this variable has no useful purpose what so ever. Thus, it can be removed altogether without any side effects. Signed-off-by: Timo Kokkonen timo.t.kokko...@iki.fi --- drivers/media/rc/ir-rx51.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/media/rc/ir-rx51.c b/drivers/media/rc/ir-rx51.c index 96ed23d..edb1562 100644 --- a/drivers/media/rc/ir-rx51.c +++ b/drivers/media/rc/ir-rx51.c @@ -57,7 +57,6 @@ struct lirc_rx51 { unsigned intfreq; /* carrier frequency */ unsigned intduty_cycle; /* carrier duty cycle */ unsigned intirq_num; - unsigned intmatch; int wbuf[WBUF_LEN]; int wbuf_index; unsigned long device_is_open; @@ -102,8 +101,6 @@ static int init_timing_params(struct lirc_rx51 *lirc_rx51) omap_dm_timer_set_int_enable(lirc_rx51-pulse_timer, 0); omap_dm_timer_start(lirc_rx51-pulse_timer); - lirc_rx51-match = 0; - return 0; } @@ -113,11 +110,7 @@ static int pulse_timer_set_timeout(struct lirc_rx51 *lirc_rx51, int usec) BUG_ON(usec 0); - if (lirc_rx51-match == 0) - counter = omap_dm_timer_read_counter(lirc_rx51-pulse_timer); - else - counter = lirc_rx51-match; - + counter = omap_dm_timer_read_counter(lirc_rx51-pulse_timer); counter += (u32)(lirc_rx51-fclk_khz * usec / (1000)); omap_dm_timer_set_match(lirc_rx51-pulse_timer, 1, counter); omap_dm_timer_set_int_enable(lirc_rx51-pulse_timer, -- 1.7.12 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 7/9] ir-rx51: Convert latency constraints to PM QoS API
Convert the driver from the obsolete omap_pm_set_max_mpu_wakeup_lat API to the new PM QoS API. This allows the callback to be removed from the platform data structure. The latency requirements are also adjusted to prevent the MPU from going into sleep mode. This is needed as the GP timers have no means to wake up the MPU once it has gone into sleep. The side effect is that from now on the driver actually works even if there is no background load keeping the MPU awake. Signed-off-by: Timo Kokkonen timo.t.kokko...@iki.fi Acked-by: Tony Lindgren t...@atomide.com Acked-by: Jean Pihet j-pi...@ti.com --- arch/arm/mach-omap2/board-rx51-peripherals.c | 2 -- drivers/media/rc/ir-rx51.c | 17 - include/media/ir-rx51.h | 2 -- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index ca07264..e0750cb 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -34,7 +34,6 @@ #include plat/gpmc.h #include plat/onenand.h #include plat/gpmc-smc91x.h -#include plat/omap-pm.h #include mach/board-rx51.h @@ -1227,7 +1226,6 @@ static void __init rx51_init_tsc2005(void) #if defined(CONFIG_IR_RX51) || defined(CONFIG_IR_RX51_MODULE) static struct lirc_rx51_platform_data rx51_lirc_data = { - .set_max_mpu_wakeup_lat = omap_pm_set_max_mpu_wakeup_lat, .pwm_timer = 9, /* Use GPT 9 for CIR */ }; diff --git a/drivers/media/rc/ir-rx51.c b/drivers/media/rc/ir-rx51.c index 6e1ffa6..96ed23d 100644 --- a/drivers/media/rc/ir-rx51.c +++ b/drivers/media/rc/ir-rx51.c @@ -25,6 +25,7 @@ #include linux/platform_device.h #include linux/sched.h #include linux/wait.h +#include linux/pm_qos.h #include plat/dmtimer.h #include plat/clock.h @@ -49,6 +50,7 @@ struct lirc_rx51 { struct omap_dm_timer *pulse_timer; struct device*dev; struct lirc_rx51_platform_data *pdata; + struct pm_qos_request pm_qos_request; wait_queue_head_t wqueue; unsigned long fclk_khz; @@ -268,10 +270,16 @@ static ssize_t lirc_rx51_write(struct file *file, const char *buf, lirc_rx51-wbuf[count] = -1; /* Insert termination mark */ /* -* Adjust latency requirements so the device doesn't go in too -* deep sleep states +* If the MPU is going into too deep sleep state while we are +* transmitting the IR code, timers will not be able to wake +* up the MPU. Thus, we need to set a strict enough latency +* requirement in order to ensure the interrupts come though +* properly. The 10us latency requirement is low enough to +* keep MPU from sleeping and thus ensures the interrupts are +* getting through properly. */ - lirc_rx51-pdata-set_max_mpu_wakeup_lat(lirc_rx51-dev, 50); + pm_qos_add_request(lirc_rx51-pm_qos_request, + PM_QOS_CPU_DMA_LATENCY, 10); lirc_rx51_on(lirc_rx51); lirc_rx51-wbuf_index = 1; @@ -292,8 +300,7 @@ static ssize_t lirc_rx51_write(struct file *file, const char *buf, */ lirc_rx51_stop_tx(lirc_rx51); - /* We can sleep again */ - lirc_rx51-pdata-set_max_mpu_wakeup_lat(lirc_rx51-dev, -1); + pm_qos_remove_request(lirc_rx51-pm_qos_request); return n; } diff --git a/include/media/ir-rx51.h b/include/media/ir-rx51.h index 104aa89..57523f2 100644 --- a/include/media/ir-rx51.h +++ b/include/media/ir-rx51.h @@ -3,8 +3,6 @@ struct lirc_rx51_platform_data { int pwm_timer; - - int(*set_max_mpu_wakeup_lat)(struct device *dev, long t); }; #endif -- 1.7.12 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 2/9] ir-rx51: Handle signals properly
The lirc-dev expects the ir-code to be transmitted when the write call returns back to the user space. We should not leave TX ongoing no matter what is the reason we return to the user space. Easiest solution for that is to simply remove interruptible sleeps. The first wait_event_interruptible is thus replaced with return -EBUSY in case there is still ongoing transfer. This should suffice as the concept of sending multiple codes in parallel does not make sense. The second wait_event_interruptible call is replaced with wait_even_timeout with a fixed and safe timeout that should prevent the process from getting stuck in kernel for too long. Also, from now on we will force the TX to stop before we return from write call. If the TX happened to time out for some reason, we should not leave the HW transmitting anything. Signed-off-by: Timo Kokkonen timo.t.kokko...@iki.fi --- drivers/media/rc/ir-rx51.c | 39 --- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/drivers/media/rc/ir-rx51.c b/drivers/media/rc/ir-rx51.c index 9487dd3..e2db94e 100644 --- a/drivers/media/rc/ir-rx51.c +++ b/drivers/media/rc/ir-rx51.c @@ -74,6 +74,19 @@ static void lirc_rx51_off(struct lirc_rx51 *lirc_rx51) OMAP_TIMER_TRIGGER_NONE); } +static void lirc_rx51_stop_tx(struct lirc_rx51 *lirc_rx51) +{ + if (lirc_rx51-wbuf_index 0) + return; + + lirc_rx51_off(lirc_rx51); + lirc_rx51-wbuf_index = -1; + omap_dm_timer_stop(lirc_rx51-pwm_timer); + omap_dm_timer_stop(lirc_rx51-pulse_timer); + omap_dm_timer_set_int_enable(lirc_rx51-pulse_timer, 0); + wake_up(lirc_rx51-wqueue); +} + static int init_timing_params(struct lirc_rx51 *lirc_rx51) { u32 load, match; @@ -160,13 +173,7 @@ static irqreturn_t lirc_rx51_interrupt_handler(int irq, void *ptr) return IRQ_HANDLED; end: - /* Stop TX here */ - lirc_rx51_off(lirc_rx51); - lirc_rx51-wbuf_index = -1; - omap_dm_timer_stop(lirc_rx51-pwm_timer); - omap_dm_timer_stop(lirc_rx51-pulse_timer); - omap_dm_timer_set_int_enable(lirc_rx51-pulse_timer, 0); - wake_up_interruptible(lirc_rx51-wqueue); + lirc_rx51_stop_tx(lirc_rx51); return IRQ_HANDLED; } @@ -246,8 +253,9 @@ static ssize_t lirc_rx51_write(struct file *file, const char *buf, if ((count WBUF_LEN) || (count % 2 == 0)) return -EINVAL; - /* Wait any pending transfers to finish */ - wait_event_interruptible(lirc_rx51-wqueue, lirc_rx51-wbuf_index 0); + /* We can have only one transmit at a time */ + if (lirc_rx51-wbuf_index = 0) + return -EBUSY; if (copy_from_user(lirc_rx51-wbuf, buf, n)) return -EFAULT; @@ -273,9 +281,18 @@ static ssize_t lirc_rx51_write(struct file *file, const char *buf, /* * Don't return back to the userspace until the transfer has -* finished +* finished. However, we wish to not spend any more than 500ms +* in kernel. No IR code TX should ever take that long. +*/ + i = wait_event_timeout(lirc_rx51-wqueue, lirc_rx51-wbuf_index 0, + HZ / 2); + + /* +* Ensure transmitting has really stopped, even if the timers +* went mad or something else happened that caused it still +* sending out something. */ - wait_event_interruptible(lirc_rx51-wqueue, lirc_rx51-wbuf_index 0); + lirc_rx51_stop_tx(lirc_rx51); /* We can sleep again */ lirc_rx51-pdata-set_max_mpu_wakeup_lat(lirc_rx51-dev, -1); -- 1.7.12 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 9/9] ir-rx51: Add missing quote mark in Kconfig text
This trivial fix cures the following warning message: drivers/media/rc/Kconfig:275:warning: multi-line strings not supported Signed-off-by: Timo Kokkonen timo.t.kokko...@iki.fi --- drivers/media/rc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig index 4a68014..1300655 100644 --- a/drivers/media/rc/Kconfig +++ b/drivers/media/rc/Kconfig @@ -272,7 +272,7 @@ config IR_IGUANA be called iguanair. config IR_RX51 - tristate Nokia N900 IR transmitter diode + tristate Nokia N900 IR transmitter diode depends on OMAP_DM_TIMER LIRC ---help--- Say Y or M here if you want to enable support for the IR -- 1.7.12 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 6/9] ir-rx51: Replace module_{init,exit} macros with module_platform_driver
No reason to avoid using the existing helpers. Signed-off-by: Timo Kokkonen timo.t.kokko...@iki.fi --- drivers/media/rc/ir-rx51.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/media/rc/ir-rx51.c b/drivers/media/rc/ir-rx51.c index 16b3c1f..6e1ffa6 100644 --- a/drivers/media/rc/ir-rx51.c +++ b/drivers/media/rc/ir-rx51.c @@ -495,17 +495,7 @@ struct platform_driver lirc_rx51_platform_driver = { }, }; -static int __init lirc_rx51_init(void) -{ - return platform_driver_register(lirc_rx51_platform_driver); -} -module_init(lirc_rx51_init); - -static void __exit lirc_rx51_exit(void) -{ - platform_driver_unregister(lirc_rx51_platform_driver); -} -module_exit(lirc_rx51_exit); +module_platform_driver(lirc_rx51_platform_driver); MODULE_DESCRIPTION(LIRC TX driver for Nokia RX51); MODULE_AUTHOR(Nokia Corporation); -- 1.7.12 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 3/9] ir-rx51: Trivial fixes
-Fix typo -Change pwm_timer_num type to match type in platform data -Remove extra parenthesis -Replace magic constant with proper bit defintions -Remove duplicate exit pointer Signed-off-by: Timo Kokkonen timo.t.kokko...@iki.fi --- drivers/media/rc/Kconfig | 2 +- drivers/media/rc/ir-rx51.c | 10 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig index 093982b..4a68014 100644 --- a/drivers/media/rc/Kconfig +++ b/drivers/media/rc/Kconfig @@ -278,7 +278,7 @@ config IR_RX51 Say Y or M here if you want to enable support for the IR transmitter diode built in the Nokia N900 (RX51) device. - The driver uses omap DM timers for gereating the carrier + The driver uses omap DM timers for generating the carrier wave and pulses. config RC_LOOPBACK diff --git a/drivers/media/rc/ir-rx51.c b/drivers/media/rc/ir-rx51.c index e2db94e..125d4c3 100644 --- a/drivers/media/rc/ir-rx51.c +++ b/drivers/media/rc/ir-rx51.c @@ -59,7 +59,7 @@ struct lirc_rx51 { int wbuf[WBUF_LEN]; int wbuf_index; unsigned long device_is_open; - unsigned intpwm_timer_num; + int pwm_timer_num; }; static void lirc_rx51_on(struct lirc_rx51 *lirc_rx51) @@ -138,11 +138,14 @@ static irqreturn_t lirc_rx51_interrupt_handler(int irq, void *ptr) if (!retval) return IRQ_NONE; - if ((retval ~OMAP_TIMER_INT_MATCH)) + if (retval ~OMAP_TIMER_INT_MATCH) dev_err_ratelimited(lirc_rx51-dev, : Unexpected interrupt source: %x\n, retval); - omap_dm_timer_write_status(lirc_rx51-pulse_timer, 7); + omap_dm_timer_write_status(lirc_rx51-pulse_timer, + OMAP_TIMER_INT_MATCH| + OMAP_TIMER_INT_OVERFLOW | + OMAP_TIMER_INT_CAPTURE); if (lirc_rx51-wbuf_index 0) { dev_err_ratelimited(lirc_rx51-dev, : BUG wbuf_index has value of %i\n, @@ -489,7 +492,6 @@ struct platform_driver lirc_rx51_platform_driver = { .remove = __exit_p(lirc_rx51_remove), .suspend= lirc_rx51_suspend, .resume = lirc_rx51_resume, - .remove = __exit_p(lirc_rx51_remove), .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, -- 1.7.12 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 5/9] ir-rx51: Move platform data checking into probe function
This driver is useless without proper platform data. If data is not available, we should not register the driver at all. Once this check is done, the BUG_ON check during device open is no longer needed. Signed-off-by: Timo Kokkonen timo.t.kokko...@iki.fi --- drivers/media/rc/ir-rx51.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/rc/ir-rx51.c b/drivers/media/rc/ir-rx51.c index f22e5e4..16b3c1f 100644 --- a/drivers/media/rc/ir-rx51.c +++ b/drivers/media/rc/ir-rx51.c @@ -378,7 +378,6 @@ static long lirc_rx51_ioctl(struct file *filep, static int lirc_rx51_open(struct inode *inode, struct file *file) { struct lirc_rx51 *lirc_rx51 = lirc_get_pdata(file); - BUG_ON(!lirc_rx51); file-private_data = lirc_rx51; @@ -458,6 +457,9 @@ static int lirc_rx51_resume(struct platform_device *dev) static int __devinit lirc_rx51_probe(struct platform_device *dev) { + if (!dev-dev.platform_data) + return -ENODEV; + lirc_rx51_driver.features = LIRC_RX51_DRIVER_FEATURES; lirc_rx51.pdata = dev-dev.platform_data; lirc_rx51.pwm_timer_num = lirc_rx51.pdata-pwm_timer; -- 1.7.12 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 4/9] ir-rx51: Clean up timer initialization code
Remove a redundant macro definition. This is unneeded and becomes more readable once the actual timer code is refactored a little. Signed-off-by: Timo Kokkonen timo.t.kokko...@iki.fi --- drivers/media/rc/ir-rx51.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/media/rc/ir-rx51.c b/drivers/media/rc/ir-rx51.c index 125d4c3..f22e5e4 100644 --- a/drivers/media/rc/ir-rx51.c +++ b/drivers/media/rc/ir-rx51.c @@ -105,11 +105,9 @@ static int init_timing_params(struct lirc_rx51 *lirc_rx51) return 0; } -#define tics_after(a, b) ((long)(b) - (long)(a) 0) - static int pulse_timer_set_timeout(struct lirc_rx51 *lirc_rx51, int usec) { - int counter; + int counter, counter_now; BUG_ON(usec 0); @@ -122,11 +120,8 @@ static int pulse_timer_set_timeout(struct lirc_rx51 *lirc_rx51, int usec) omap_dm_timer_set_match(lirc_rx51-pulse_timer, 1, counter); omap_dm_timer_set_int_enable(lirc_rx51-pulse_timer, OMAP_TIMER_INT_MATCH); - if (tics_after(omap_dm_timer_read_counter(lirc_rx51-pulse_timer), - counter)) { - return 1; - } - return 0; + counter_now = omap_dm_timer_read_counter(lirc_rx51-pulse_timer); + return (counter - counter_now) 0; } static irqreturn_t lirc_rx51_interrupt_handler(int irq, void *ptr) -- 1.7.12 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 0/9] Fixes in response to review comments
These patches fix most of the issues pointed out in the patch review by Sean Young and Sakari Ailus. The most noticeable change after these patch set is that the IR transmission no longer times out even if the timers are not waking up the MPU as it should be. Now that Jean Pihet kindly instructed me how to use the PM QoS API for setting the latency constraints, the driver will now work without any background load. Someone might consider such restriction a blocker bug, that is fixed on this patch set. Changes since v2: - The 10us PM QoS latency requrement is documented in the code - A missing quote mark is added into the Kconfig text Changes since v1: - Replace wake_up_interruptible with wake_up, as the driver is having non-interruptible sleeps - Instead of just removing the set_max_mpu_wakeup_lat calls, replace them with QoS API calls Timo Kokkonen (9): ir-rx51: Adjust dependencies ir-rx51: Handle signals properly ir-rx51: Trivial fixes ir-rx51: Clean up timer initialization code ir-rx51: Move platform data checking into probe function ir-rx51: Replace module_{init,exit} macros with module_platform_driver ir-rx51: Convert latency constraints to PM QoS API ir-rx51: Remove useless variable from struct lirc_rx51 ir-rx51: Add missing quote mark in Kconfig text arch/arm/mach-omap2/board-rx51-peripherals.c | 2 - drivers/media/rc/Kconfig | 6 +- drivers/media/rc/ir-rx51.c | 102 ++- include/media/ir-rx51.h | 2 - 4 files changed, 57 insertions(+), 55 deletions(-) -- 1.7.12 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 0/3] remoteproc: introduce rproc recovery
These set of patches make possible the remoteproc recover after a crash. This is a hard recovery, that means the remoteproc is reset and it will start from the beginning. When a crash happen all the virtio devices are destroyed. Therefore, both rpmsg drivers and devices are gracefully removed which also cause rproc users become 0 and the remoteproc is turned off. After the virtio devices are destroyed the crash handler function will read the virtio information from the firmware in order to recreate the virtio devices that will boot the remoteproc and everything will be functional again. -Version 2 * Wait untill there is no more rproc users before realoding the FW again in order to make sure the recovery will work fine. As suggested by Sjur BRENDELAND Fernando Guzman Lugo (3): remoteproc: add rproc_report_crash function to notify rproc crashes remoteproc: recover a remoteproc when it has crashed remoteproc: create debugfs entry to disable/enable recovery dynamically Documentation/remoteproc.txt |7 ++ drivers/remoteproc/remoteproc_core.c | 116 -- drivers/remoteproc/remoteproc_debugfs.c | 83 + drivers/remoteproc/remoteproc_internal.h |1 + include/linux/remoteproc.h | 22 ++ 5 files changed, 222 insertions(+), 7 deletions(-) -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 3/3] remoteproc: create debugfs entry to disable/enable recovery dynamically
Add a debugfs entry (named recovery) so that recovery can be disabled dynamically at runtime. This entry is very useful when you are trying to debug a rproc crash. Without this a recovery will take place making impossible to debug the issue. Original idea from Ohad Ben-Cohen and contributions from Subramaniam Chanderashekarapuram Example: -disabling recovery: $ echo disabled debugfs/remoteproc/remoteproc0/recovery -enabling recovery: $ echo enabled debugfs/remoteproc/remoteproc0/recovery -in case you have disabled recovery and you want to continue debugging you can recover the remoteproc once using recover. This will not change the state of the recovery entry, it will only recovery the rproc if its state is RPROC_CRASHED $ echo recover debugfs/remoteproc/remoteproc0/recovery Signed-off-by: Fernando Guzman Lugo fernando.l...@ti.com --- drivers/remoteproc/remoteproc_core.c|3 +- drivers/remoteproc/remoteproc_debugfs.c | 83 +++ include/linux/remoteproc.h |2 + 3 files changed, 87 insertions(+), 1 deletions(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 9fbd364..16e20f7 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -936,7 +936,8 @@ static void rproc_crash_handler_work(struct work_struct *work) ++rproc-crash_cnt, rproc-name); mutex_unlock(rproc-lock); - rproc_trigger_recover(rproc); + if (!rproc-recovery_disabled) + rproc_trigger_recover(rproc); } /** diff --git a/drivers/remoteproc/remoteproc_debugfs.c b/drivers/remoteproc/remoteproc_debugfs.c index 0383385..aa95cde 100644 --- a/drivers/remoteproc/remoteproc_debugfs.c +++ b/drivers/remoteproc/remoteproc_debugfs.c @@ -28,6 +28,9 @@ #include linux/debugfs.h #include linux/remoteproc.h #include linux/device.h +#include linux/uaccess.h + +#include remoteproc_internal.h /* remoteproc debugfs parent dir */ static struct dentry *rproc_dbg; @@ -111,6 +114,84 @@ static const struct file_operations rproc_name_ops = { .llseek = generic_file_llseek, }; +/* expose recovery flag via debugfs */ +static ssize_t rproc_recovery_read(struct file *filp, char __user *userbuf, + size_t count, loff_t *ppos) +{ + struct rproc *rproc = filp-private_data; + char *buf = rproc-recovery_disabled ? disabled\n : enabled\n; + + return simple_read_from_buffer(userbuf, count, ppos, buf, strlen(buf)); +} + + +/* + * Writing to the recovey debugfs entry we can change the behavior of the + * recovery dynamically. The default value of this entry is enabled. + * + * There are 3 possible options you can write to the recovery debug entry: + * enabled, disabled and recover + * + * enabled:In this case recovery will be enabled, every time there is a + * rproc crashed the rproc will be recovered. If recovery has been + * disabled and it crashed and you enable recovery it will be + * recover as soon as you enable recovery. + * disabled: In this case recovery will be disabled, that means if a rproc + * crashes it will remain in crashed state. Therefore the rproc + * won't be functional any more. But this option is used for + * debugging purposes. Otherwise, debugging a crash would not be + * possible. + * recover:This function will trigger a recovery without taking care of + * the recovery state (enabled/disabled) and without changing it. + * This useful for the cases when you are debugging a crash and + * after enabling recovery you get another crash immediately. As + * the recovery state will be enabled it will recover the rproc + * without let you debug the new crash. So, it is recommended to + * disabled recovery, then starting debugging and use recovery + * command while still debugging and when you are done then you + * case use enabled command. + */ +static ssize_t rproc_recovery_write(struct file *filp, + const char __user *user_buf, size_t count, loff_t *ppos) +{ + struct rproc *rproc = filp-private_data; + char buf[10]; + int ret; + + if (count sizeof(buf)) + return count; + + ret = copy_from_user(buf, user_buf, count); + if (ret) + return ret; + + /* remove end of line */ + if (buf[count - 1] == '\n') + buf[count - 1] = '\0'; + + if (!strncmp(buf, enabled, count)) { + rproc-recovery_disabled = false; + /* if rproc has crashed trigger recovery */ + if (rproc-state == RPROC_CRASHED) + rproc_trigger_recover(rproc); + } else if (!strncmp(buf, disabled, count)) { + rproc-recovery_disabled = true; + } else if (!strncmp(buf, recover, count)) {
[PATCHv2 1/3] remoteproc: add rproc_report_crash function to notify rproc crashes
This patch is exporting the rproc_report_crash function which can be used to report a rproc crash to the remoteproc core. This function is specially thought to be called by low-level remoteproc driver code in case of detecting a crash (remoteproc is not functional anymore). Using this function from another driver (non rproc driver) should be analyzed very carefully most of the time that will be considered wrong. rproc_report_crash function can be called from any context, that means, it can be called from atomic context without any problem. The reporter function is creating a new thread (workqueue work) in charge of handling the crash (if possible). Creating this new thread is done for two main reasons. First reason is to be able to call it from atomic context, due to the fact that many crashes trigger an interrupt, so this function can be called directly from ISR context. Second reason is avoid any deadlock condition which could happen if the rproc_report_crash function is called from a function which is indirectly holding a rproc lock. The reporter function is scheduling the crash handler task. This task is thought to have some features like: -remoteproc register dump -remoteproc stack dump -remoteproc core dump -Saving of the remoteproc traces in order to be visible after the crash -Reseting the remoteproc in order to make it functional again (hard recovery) Right now, it is only printing the crash type which was detected. The types of crashes are represented by an enum. I have only added mmufault crash type. Remoteproc low-level drivers can add more types when needed. Signed-off-by: Fernando Guzman Lugo fernando.l...@ti.com --- Documentation/remoteproc.txt |7 +++ drivers/remoteproc/remoteproc_core.c | 80 +++--- include/linux/remoteproc.h | 18 3 files changed, 98 insertions(+), 7 deletions(-) diff --git a/Documentation/remoteproc.txt b/Documentation/remoteproc.txt index 23a09b8..e6469fd 100644 --- a/Documentation/remoteproc.txt +++ b/Documentation/remoteproc.txt @@ -129,6 +129,13 @@ int dummy_rproc_example(struct rproc *my_rproc) Returns 0 on success and -EINVAL if @rproc isn't valid. + void rproc_report_crash(struct rproc *rproc, enum rproc_crash_type type) +- Report a crash in a remoteproc + This function must be called every time a crash is detected by the + platform specific rproc implementation. This should not be called from a + non-remoteproc driver. This function can be called from atomic/interrupt + context. + 5. Implementation callbacks These callbacks should be provided by platform-specific remoteproc diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index d5c2dbf..3a6f1a1 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -50,6 +50,18 @@ typedef int (*rproc_handle_resource_t)(struct rproc *rproc, void *, int avail); /* Unique indices for remoteproc devices */ static DEFINE_IDA(rproc_dev_index); +static const char * const rproc_crash_names[] = { + [RPROC_MMUFAULT]= mmufault, +}; + +/* translate rproc_crash_type to string */ +static const char *rproc_crash_to_string(enum rproc_crash_type type) +{ + if (type ARRAY_SIZE(rproc_crash_names)) + return rproc_crash_names[type]; + return unkown; +} + /* * This is the IOMMU fault handler we register with the IOMMU API * (when relevant; not all remote processors access memory through @@ -57,19 +69,17 @@ static DEFINE_IDA(rproc_dev_index); * * IOMMU core will invoke this handler whenever the remote processor * will try to access an unmapped device address. - * - * Currently this is mostly a stub, but it will be later used to trigger - * the recovery of the remote processor. */ static int rproc_iommu_fault(struct iommu_domain *domain, struct device *dev, unsigned long iova, int flags, void *token) { + struct rproc *rproc = token; + dev_err(dev, iommu fault: da 0x%lx flags 0x%x\n, iova, flags); - /* -* Let the iommu core know we're not really handling this fault; -* we just plan to use this as a recovery trigger. -*/ + rproc_report_crash(rproc, RPROC_MMUFAULT); + + /* Let the iommu core know we're not really handling this fault; */ return -ENOSYS; } @@ -872,6 +882,34 @@ out: } /** + * rproc_crash_handler_work() - handle a crash + * + * This function needs to handle everything related to a crash, like cpu + * registers and stack dump, information to help to debug the fatal error, etc. + */ +static void rproc_crash_handler_work(struct work_struct *work) +{ + struct rproc *rproc = container_of(work, struct rproc, crash_handler); + struct device *dev = rproc-dev; + + dev_dbg(dev, enter %s\n, __func__); + + mutex_lock(rproc-lock); + if (rproc-state == RPROC_CRASHED || rproc-state ==
[PATCHv2 2/3] remoteproc: recover a remoteproc when it has crashed
This patch is introducing rproc_trigger_recover function which is in charge of recovering the rproc. One way to recover the rproc after a crash is resetting all its virtio devices. Doing that, all rpmsg drivers are restored along with the rpmsg devices and that also causes the reset of the remoteproc making the rpmsg communication with the remoteproc functional again. So far, rproc_trigger_recover function is only resetting all virtio devices, if in the future other rproc features are introduced and need to be reset too, rproc_trigger_recover function should take care of that. Signed-off-by: Fernando Guzman Lugo fernando.l...@ti.com --- drivers/remoteproc/remoteproc_core.c | 37 +- drivers/remoteproc/remoteproc_internal.h |1 + include/linux/remoteproc.h |2 + 3 files changed, 39 insertions(+), 1 deletions(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 3a6f1a1..9fbd364 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -882,6 +882,36 @@ out: } /** + * rproc_trigger_recover() - recover a remoteproc + * @rproc: the remote processor + * + * The recovery is done by reseting all the virtio devices, that way all the + * rpmsg drivers will be reseted along with the remote processor making the + * remoteproc functional again. + * + * This function can sleep, so that it cannot be called from atomic context. + */ +int rproc_trigger_recover(struct rproc *rproc) +{ + struct rproc_vdev *rvdev, *rvtmp; + + dev_err(rproc-dev, recovering %s\n, rproc-name); + + init_completion(rproc-crash_comp); + /* clean up remote vdev entries */ + list_for_each_entry_safe(rvdev, rvtmp, rproc-rvdevs, node) + rproc_remove_virtio_dev(rvdev); + + /* wait until there is no more rproc users */ + wait_for_completion(rproc-crash_comp); + + /* run rproc_fw_config_virtio to create vdevs again */ + return request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, + rproc-firmware, rproc-dev, GFP_KERNEL, + rproc, rproc_fw_config_virtio); +} + +/** * rproc_crash_handler_work() - handle a crash * * This function needs to handle everything related to a crash, like cpu @@ -906,7 +936,7 @@ static void rproc_crash_handler_work(struct work_struct *work) ++rproc-crash_cnt, rproc-name); mutex_unlock(rproc-lock); - /* TODO: handle crash */ + rproc_trigger_recover(rproc); } /** @@ -1030,6 +1060,10 @@ void rproc_shutdown(struct rproc *rproc) rproc_disable_iommu(rproc); + /* if in crash state, unlock crash handler */ + if (rproc-state == RPROC_CRASHED) + complete_all(rproc-crash_comp); + rproc-state = RPROC_OFFLINE; dev_info(dev, stopped remote processor %s\n, rproc-name); @@ -1204,6 +1238,7 @@ struct rproc *rproc_alloc(struct device *dev, const char *name, INIT_LIST_HEAD(rproc-rvdevs); INIT_WORK(rproc-crash_handler, rproc_crash_handler_work); + init_completion(rproc-crash_comp); rproc-state = RPROC_OFFLINE; diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h index a690ebe..d9c0730 100644 --- a/drivers/remoteproc/remoteproc_internal.h +++ b/drivers/remoteproc/remoteproc_internal.h @@ -63,6 +63,7 @@ void rproc_free_vring(struct rproc_vring *rvring); int rproc_alloc_vring(struct rproc_vdev *rvdev, int i); void *rproc_da_to_va(struct rproc *rproc, u64 da, int len); +int rproc_trigger_recover(struct rproc *rproc); static inline int rproc_fw_sanity_check(struct rproc *rproc, const struct firmware *fw) diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index a46ed27..0c1a2f9 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -398,6 +398,7 @@ enum rproc_crash_type { * @index: index of this rproc device * @crash_handler: workqueue for handling a crash * @crash_cnt: crash counter + * @crash_comp: completion used to sync crash handler and the rproc reload */ struct rproc { struct klist_node node; @@ -423,6 +424,7 @@ struct rproc { int index; struct work_struct crash_handler; unsigned crash_cnt; + struct completion crash_comp; }; /* we currently support only two vrings per rvdev */ -- 1.7.1 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/9] ARM: OMAP: cleanup plat/board.h file
* Igor Grinberg grinb...@compulab.co.il [120828 16:19]: This patch series cleans up the plat/board.h and related files. Great, thanks for doing this! Nice that we can finally remove all of that. I've also tested that 770 boots after this, so looks like we've already fixed up whatever it was depending on. I'll be applying this into the cleanup branch as soon as I'll have an immutable commit for Arnd's treewide changes to move the obvious things into include/linux/platform_data. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 10/10] mtd: nand: omap2: use gpmc provided irqs
* Artem Bityutskiy dedeki...@gmail.com [120825 04:49]: On Tue, 2012-08-21 at 15:14 +0530, Afzal Mohammed wrote: GPMC platform initialization provides it's clients with interrupts that can be used through struct resource. Make use of it for irq mode functionality. Also now write protect disable is done by GPMC, hence remove it. Signed-off-by: Afzal Mohammed af...@ti.com Acked-by: Artem Bityutskiy artem.bityuts...@linux.intel.com Thanks I'll apply these into omap devel-gpmc branch. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC RESEND 1/4] arm/dts: OMAP: Add timer nodes
* Jon Hunter jon-hun...@ti.com [120816 08:05]: On 08/15/2012 04:11 AM, Vaibhav Hiremath wrote: Did we get conclude on this? I haven't got anything further on this thread, this may block baseport support for the new devices in omap2 family, like AM33xx and OMAP5. Sorry I have been out of the office. However, no update on this so far. I need to check with Tony if he has any preference for handling this. I will follow-up with him and keep you posted. Jon please repost these without the RFC in the subject line assuming the pending comments have been addressed so people can ack them. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ARM: OMAP: timer: obey the !CONFIG_OMAP_32K_TIMER
* Igor Grinberg grinb...@compulab.co.il [120829 15:02]: On 08/28/12 01:43, Shilimkar, Santosh wrote: On Mon, Aug 27, 2012 at 3:26 PM, Igor Grinberg grinb...@compulab.co.il wrote: Currently, omap2_sync32k_clocksource_init() function initializes the 32K timer as the system clock source regardless of the CONFIG_OMAP_32K_TIMER setting. Fix this by providing a default implementation for !CONFIG_OMAP_32K_TIMER case. Signed-off-by: Igor Grinberg grinb...@compulab.co.il Reviewed-by: Paul Walmsley p...@pwsan.com --- Acked-by: Santosh Shilimkar santosh.shilim...@ti.com Thanks Santosh! Tony, apparently, this bug has been there for a while, so probably I should have added: Cc: sta...@vger.kernel.org Thanks I'll apply this into fixes with Cc: stable. Note that Cc: stable is usually added at commit time, or at least you're not supposed to send the patch for review there. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/5] hwrng/ARM: OMAP: convert to use runtime PM
* Paul Walmsley p...@pwsan.com [120827 16:39]: This series converts the OMAP hardware random number generator driver to use runtime PM. Hardware integration data is added for OMAP2xxx systems. I'm pretty sure this device is available on other OMAP chips too, but may require some experimentation with the integration details. Good to hear. I believe that at some point this got moved to be only accessible in the secure mode on later omaps? There are still a few rough edges with this series. Something is still not right with the reset behavior on OMAP2430, at least. But it would be good to get acks from the hwrng folks for the three patches that touch files in that directory. Will continue with the testing process here. Yes Matt Herbert, care to ack the drivers/char/hw_random related changes? This series will conflict with the planned ARM common zImage changes that we have planned so I'd like to merge them via the ARM soc tree. Regards, Tony - Paul --- Paul Walmsley (5): ARM: OMAP2/3: hwmod: add RNG integration data hwrng: OMAP: store per-device data in per-device variables, not file statics hwrng: OMAP: convert to use runtime PM ARM: OMAP: split OMAP1, OMAP2+ RNG device registration hwrng: OMAP: remove SoC restrictions from driver registration arch/arm/mach-omap1/devices.c | 28 + arch/arm/mach-omap2/devices.c | 18 +++ arch/arm/mach-omap2/omap_hwmod_2420_data.c |1 arch/arm/mach-omap2/omap_hwmod_2430_data.c |1 .../mach-omap2/omap_hwmod_2xxx_interconnect_data.c | 17 +++ arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 37 ++ arch/arm/mach-omap2/omap_hwmod_common_data.h |5 - arch/arm/plat-omap/Makefile|3 arch/arm/plat-omap/devices.c | 92 --- drivers/char/hw_random/omap-rng.c | 121 10 files changed, 176 insertions(+), 147 deletions(-) delete mode 100644 arch/arm/plat-omap/devices.c -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/5] hwrng/ARM: OMAP: convert to use runtime PM
On Thu, Aug 30, 2012 at 01:27:08PM -0700, Tony Lindgren wrote: * Paul Walmsley p...@pwsan.com [120827 16:39]: This series converts the OMAP hardware random number generator driver to use runtime PM. Hardware integration data is added for OMAP2xxx systems. I'm pretty sure this device is available on other OMAP chips too, but may require some experimentation with the integration details. Good to hear. I believe that at some point this got moved to be only accessible in the secure mode on later omaps? There are still a few rough edges with this series. Something is still not right with the reset behavior on OMAP2430, at least. But it would be good to get acks from the hwrng folks for the three patches that touch files in that directory. Will continue with the testing process here. Yes Matt Herbert, care to ack the drivers/char/hw_random related changes? Acked-by: Herbert Xu herb...@gondor.apana.org.au This series will conflict with the planned ARM common zImage changes that we have planned so I'd like to merge them via the ARM soc tree. Thanks, -- Email: Herbert Xu herb...@gondor.apana.org.au Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH RESEND v4 1/3] arm/dts: AM33XX: Add basic pinctrl device tree data
* AnilKumar Ch anilku...@ti.com [120828 01:11]: Adds basic pinctrl device tree data for AM33XX family of devices. This patch is based on the pinctrl-single driver. Signed-off-by: AnilKumar Ch anilku...@ti.com --- arch/arm/boot/dts/am33xx.dtsi |9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index dde76f7..dfe9c559 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi @@ -40,6 +40,15 @@ }; }; + am3358_pinmux: pinmux@44E10800 { + compatible = pinctrl-single; + reg = 0x44E10800 0x0238; + #address-cells = 1; + #size-cells = 0; + pinctrl-single,register-width = 32; + pinctrl-single,function-mask = 0x7F; + }; + Nit: Please use lower case for the hex numbers as that's the standard in Linux kernel. Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH RESEND v4 2/3] arm/dts: AM33XX: Configure pinmuxs for user leds control on Bone
* AnilKumar Ch anilku...@ti.com [120828 01:11]: Adds GPIO pinctrl nodes to am3358_pinmux master node to control user leds (USR0, USR1, USR2 and USR3) present on BeagleBone. Signed-off-by: AnilKumar Ch anilku...@ti.com --- arch/arm/boot/dts/am335x-bone.dts | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts index a7906cb..58f5042 100644 --- a/arch/arm/boot/dts/am335x-bone.dts +++ b/arch/arm/boot/dts/am335x-bone.dts @@ -18,6 +18,20 @@ reg = 0x8000 0x1000; /* 256 MB */ }; + am3358_pinmux: pinmux@44E10800 { + pinctrl-names = default; + pinctrl-0 = userled_pins; + + userled_pins: pinmux_userled_pins { + pinctrl-single,pins = + 0x54 0x7/* gpmc_a5.gpio1_21, OUTPUT | MODE7 */ + 0x58 0x17 /* gpmc_a6.gpio1_22, OUTPUT_PULLUP | MODE7 */ + 0x5C 0x7/* gpmc_a7.gpio1_23, OUTPUT | MODE7 */ + 0x60 0x17 /* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */ + ; + }; + }; + Looks like this patch should also claim these pins by the led driver. Then the led driver should just do pinctrl_get_select_default(pdev-dev) in it's probe function to set the pins. Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 3/3] arm/dts: AM33XX: Add D_CAN device tree data
* AnilKumar Ch anilku...@ti.com [120828 01:11]: Add Bosch D_CAN controller device tree data to AM33XX dtsi file by adding d_can device nodes with all the necessary parameters. Signed-off-by: AnilKumar Ch anilku...@ti.com --- arch/arm/boot/dts/am33xx.dtsi | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index dfe9c559..d965137 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi @@ -177,5 +177,23 @@ compatible = ti,omap3-wdt; ti,hwmods = wd_timer2; }; + + dcan0: d_can@481CC000 { + compatible = bosch,d_can; + ti,hwmods = d_can0; + reg = 0x481CC000 0x2000; + interrupts = 52; + interrupt-parent = intc; + status = disabled; + }; + + dcan1: d_can@481D { + compatible = bosch,d_can; + ti,hwmods = d_can1; + reg = 0x481D 0x2000; + interrupts = 55; + interrupt-parent = intc; + status = disabled; + }; }; }; Use lower case for hex numbers here too and add support to claim the pins in the dcan driver. Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] arm: omap: sram: skip the first 16K on OMAP3 HS
* Shilimkar, Santosh santosh.shilim...@ti.com [120829 08:30]: On Wed, Aug 29, 2012 at 8:24 AM, Aaro Koskinen aaro.koski...@iki.fi wrote: In some OMAP3 HS devices (at least Nokia N9 and N950), the public SRAM seems to conflict with secure portition of SRAM. When booting the 3.6-rc3 kernel (and also earlier) on these devices, the kernel gets tainted with tons of the following warnings: [6.894348] In-band Error seen by MPU at address 0 [...] [6.894378] WARNING: at arch/arm/mach-omap2/omap_l3_smx.c:162 Fix this by skipping the first 16K of the public SRAM. (Note that the mapping could not be changed, as it resulted in secure monitor call failure in save_secure_sram().) This will leave 12K SRAM available that should be still sufficient. The patch has been boot tested with vanilla 3.6-rc3 on N900, N950 and N9. Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi --- arch/arm/plat-omap/sram.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) Looks good. Acked-by: Santosh Shilimkar santosh.shilim...@ti.com Thanks applying both into fixes. Aaro, note that now that we're merging patches via the arm soc tree, let's use ARM: OMAP: for the subject so I don't need to fix it up ;) Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] arm/dts: Cleanup regulator naming and remove @0,1..
* Rajendra Nayak rna...@ti.com [120827 23:22]: Hi Tony, * Rajendra Nayakrna...@ti.com [120730 06:17]: regulators do not have a 'reg' property, hence the regulator@0, regulator@1 do not make sense. get rid of it. Looks like this needs to be refreshed to apply. Care to refresh against current devel-dt branch in case other places need the same change? Looks like devel-dt is missing the PATCH 1/2 from this series, which you have already pushed in the -rc for merge. With that applied, this ones applies cleanly too. Oh OK thanks :) I'll apply it on top of the fix and merge into devel-dt. Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/1] Config fix for omap3-touchbook board
* Radek Pilar mr...@mrkva.eu [120817 09:04]: Fix inconsistency between mach-types and CONFIG_ name that prevents touchbook board from booting. Thanks, applying into fixes. Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 0/3] Prepare for OMAP2+ movement to Common Clk
Hi Rajendra On Wed, 29 Aug 2012, Rajendra Nayak wrote: Changes in v4: * Added *hack* comments around clk_prepare usage in hwmod rebased on 3.6-rc Assuming this is so (haven't looked closely at this series yet), and after the existing comments are taken into consideration and a new version reposted, will queue this series for 3.7. Care to respin your series that converts the data also, on top of your new version of this series? We should try to get that into 3.7 also. BTW are you still waiting for something from Vaibhav Hiremath for this? Or can the scripts convert the existing clock33xx_data.c also? - Paul -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/5] hwrng/ARM: OMAP: convert to use runtime PM
On Thu, 30 Aug 2012, Herbert Xu wrote: Acked-by: Herbert Xu herb...@gondor.apana.org.au Great, thanks Herbert. At some point in the next month or so, there should be similar series for the OMAP crypto IP blocks too, which will need some acks - just as a heads-up. - Paul -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 0/4] Add AM33XX regulators device tree data
* Mark Brown broo...@opensource.wolfsonmicro.com [120821 06:58]: On Tue, Aug 21, 2012 at 04:47:26PM +0530, AnilKumar Ch wrote: This patch series add AM33XX regulators (tps65910/tps65217) device tree data to am335x-evm and am335x-bone dts files. These patches are based on Tony L devel-dt tree with these patches http://www.mail-archive.com/linux-omap@vger.kernel.org/msg73843.html and these patches has been tested on AM335x EVM and Bone devices. Reviewed-by: Mark Brown broo...@opensource.wolfsonmicro.com Applying these into omap devel-dt branch. Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ARM: OMAP: timer: obey the !CONFIG_OMAP_32K_TIMER
On 08/30/12 23:20, Tony Lindgren wrote: * Igor Grinberg grinb...@compulab.co.il [120829 15:02]: On 08/28/12 01:43, Shilimkar, Santosh wrote: On Mon, Aug 27, 2012 at 3:26 PM, Igor Grinberg grinb...@compulab.co.il wrote: Currently, omap2_sync32k_clocksource_init() function initializes the 32K timer as the system clock source regardless of the CONFIG_OMAP_32K_TIMER setting. Fix this by providing a default implementation for !CONFIG_OMAP_32K_TIMER case. Signed-off-by: Igor Grinberg grinb...@compulab.co.il Reviewed-by: Paul Walmsley p...@pwsan.com --- Acked-by: Santosh Shilimkar santosh.shilim...@ti.com Thanks Santosh! Tony, apparently, this bug has been there for a while, so probably I should have added: Cc: sta...@vger.kernel.org Thanks I'll apply this into fixes with Cc: stable. Note that Cc: stable is usually added at commit time, or at least you're not supposed to send the patch for review there. Yeah yeah, I know, I just forgot to add it while committing. Thanks! -- Regards, Igor. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/9] Clean up hardcoded IRQs for mach-omap2, enable SPARSE_IRQ, plaform_data/gpio-omap.h
Hi all, Here's the first set of omap header clean-up patches needed for single zImage support. This series is based v3.6-rc3 and the following patches to avoid merge conflicts with the includes: - Arnd's patch ARM: omap: move platform_data definitions - Igor's series ARM: OMAP: cleanup plat/board.h file - Afzal's series Prepare for GPMC driver conversion (w.r.t MTD) Regards, Tony --- Tony Lindgren (9): ARM: OMAP1: Move define of OMAP_LCD_DMA to dma.h ARM: OMAP1: Define OMAP1_INT_I2C locally ARM: OMAP2+: Make INTCPS_NR_IRQS local for mach-omap2/irq.c ARM: OMAP2+: Remove unused nand_irq for GPMC ARM: OMAP2+: Remove hardcoded twl4030 gpio_base, irq_base and irq_end ARM: OMAP: Move gpio.h to include/linux/platform_data ARM: OMAP2+: Prepare for irqs.h removal ARM: OMAP2+: Remove hardcoded IRQs and enable SPARSE_IRQ ARM: OMAP1: Move plat/irqs.h to mach/irqs.h arch/arm/mach-omap1/ams-delta-fiq-handler.S|1 arch/arm/mach-omap1/board-ams-delta.c |3 arch/arm/mach-omap1/board-osk.c|1 arch/arm/mach-omap1/dma.c |3 arch/arm/mach-omap1/gpio15xx.c |1 arch/arm/mach-omap1/gpio16xx.c |1 arch/arm/mach-omap1/gpio7xx.c |1 arch/arm/mach-omap1/include/mach/ams-delta-fiq.h |2 arch/arm/mach-omap1/include/mach/gpio.h|2 arch/arm/mach-omap1/include/mach/irqs.h| 267 arch/arm/mach-omap1/leds-h2p2-debug.c |4 arch/arm/mach-omap1/leds.c |1 arch/arm/mach-omap2/board-2430sdp.c| 10 arch/arm/mach-omap2/board-3430sdp.c|3 arch/arm/mach-omap2/board-4430sdp.c|3 arch/arm/mach-omap2/board-am3517evm.c | 12 - arch/arm/mach-omap2/board-cm-t35.c | 15 - arch/arm/mach-omap2/board-cm-t3517.c |6 arch/arm/mach-omap2/board-devkit8000.c |3 arch/arm/mach-omap2/board-flash.c |3 arch/arm/mach-omap2/board-igep0020.c | 10 arch/arm/mach-omap2/board-ldp.c|3 arch/arm/mach-omap2/board-n8x0.c |3 arch/arm/mach-omap2/board-omap3beagle.c|3 arch/arm/mach-omap2/board-omap3evm.c |3 arch/arm/mach-omap2/board-omap3logic.c |3 arch/arm/mach-omap2/board-omap3pandora.c |3 arch/arm/mach-omap2/board-omap3stalker.c |3 arch/arm/mach-omap2/board-omap3touchbook.c |3 arch/arm/mach-omap2/board-omap4panda.c |3 arch/arm/mach-omap2/board-overo.c |3 arch/arm/mach-omap2/board-rm680.c |9 arch/arm/mach-omap2/board-rx51-peripherals.c |5 arch/arm/mach-omap2/board-ti8168evm.c |3 arch/arm/mach-omap2/board-zoom-debugboard.c|1 arch/arm/mach-omap2/board-zoom-display.c |6 arch/arm/mach-omap2/board-zoom-peripherals.c |9 arch/arm/mach-omap2/cpuidle34xx.c |1 arch/arm/mach-omap2/devices.c |7 arch/arm/mach-omap2/gpio.c |1 arch/arm/mach-omap2/gpmc-smc91x.c |1 arch/arm/mach-omap2/gpmc.c | 11 arch/arm/mach-omap2/hsmmc.c|5 arch/arm/mach-omap2/include/mach/gpio.h|2 arch/arm/mach-omap2/include/mach/irqs.h|2 arch/arm/mach-omap2/io.c |2 arch/arm/mach-omap2/irq.c |2 arch/arm/mach-omap2/mailbox.c |3 arch/arm/mach-omap2/mcbsp.c|1 arch/arm/mach-omap2/msdi.c |1 arch/arm/mach-omap2/omap-iommu.c |1 arch/arm/mach-omap2/omap-wakeupgen.c |1 arch/arm/mach-omap2/omap4-common.c |7 arch/arm/mach-omap2/omap_hwmod_2420_data.c |2 arch/arm/mach-omap2/omap_hwmod_2430_data.c |9 .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c | 12 - arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |4 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 33 + arch/arm/mach-omap2/omap_hwmod_44xx_data.c |6 arch/arm/mach-omap2/omap_l3_noc.c |6 arch/arm/mach-omap2/omap_phy_internal.c|2 arch/arm/mach-omap2/pm24xx.c |3 arch/arm/mach-omap2/pm34xx.c |2 arch/arm/mach-omap2/prcm.c |1 arch/arm/mach-omap2/prm2xxx_3xxx.c |3 arch/arm/mach-omap2/prm44xx.c |4 arch/arm/mach-omap2/prm_common.c |1 arch/arm/mach-omap2/serial.c
[PATCH 1/9] ARM: OMAP1: Move define of OMAP_LCD_DMA to dma.h
This is needed to start removing hardcoded IRQs on omap2+. Signed-off-by: Tony Lindgren t...@atomide.com --- arch/arm/plat-omap/include/plat/dma.h |2 ++ arch/arm/plat-omap/include/plat/irqs.h |1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/plat-omap/include/plat/dma.h b/arch/arm/plat-omap/include/plat/dma.h index c5811d4..0a87b05 100644 --- a/arch/arm/plat-omap/include/plat/dma.h +++ b/arch/arm/plat-omap/include/plat/dma.h @@ -31,6 +31,8 @@ /* Move omap4 specific defines to dma-44xx.h */ #include dma-44xx.h +#define INT_DMA_LCD25 + /* DMA channels for omap1 */ #define OMAP_DMA_NO_DEVICE 0 #define OMAP_DMA_MCSI1_TX 1 diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h index 37b..15f497c 100644 --- a/arch/arm/plat-omap/include/plat/irqs.h +++ b/arch/arm/plat-omap/include/plat/irqs.h @@ -53,7 +53,6 @@ #define INT_DMA_CH322 #define INT_DMA_CH423 #define INT_DMA_CH524 -#define INT_DMA_LCD25 #define INT_TIMER1 26 #define INT_WD_TIMER 27 #define INT_BRIDGE_PUB 28 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/9] ARM: OMAP1: Define OMAP1_INT_I2C locally
This is needed to start removing hardcoded IRQs for omap2+. Signed-off-by: Tony Lindgren t...@atomide.com --- arch/arm/plat-omap/i2c.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c index db071bc..40bc06a 100644 --- a/arch/arm/plat-omap/i2c.c +++ b/arch/arm/plat-omap/i2c.c @@ -39,6 +39,7 @@ #define OMAP_I2C_SIZE 0x3f #define OMAP1_I2C_BASE 0xfffb3800 +#define OMAP1_INT_I2C (32 + 4) static const char name[] = omap_i2c; @@ -105,7 +106,7 @@ static inline int omap1_i2c_add_bus(int bus_id) res = pdev-resource; res[0].start = OMAP1_I2C_BASE; res[0].end = res[0].start + OMAP_I2C_SIZE; - res[1].start = INT_I2C; + res[1].start = OMAP1_INT_I2C; pdata = i2c_pdata[bus_id - 1]; /* all OMAP1 have IP version 1 register set */ -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/9] ARM: OMAP2+: Make INTCPS_NR_IRQS local for mach-omap2/irq.c
Make INTCPS_NR_IRQS local for mach-omap2/irq.c Signed-off-by: Tony Lindgren t...@atomide.com --- arch/arm/mach-omap2/irq.c |2 ++ arch/arm/plat-omap/include/plat/irqs.h |3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index bcd83db..ac59f96 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c @@ -49,6 +49,8 @@ #define OMAP3_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE) #define INTCPS_SIR_IRQ_OFFSET 0x0040 /* omap2/3 active interrupt offset */ #define ACTIVEIRQ_MASK 0x7f/* omap2/3 active interrupt bits */ +#define INTCPS_NR_MIR_REGS 3 +#define INTCPS_NR_IRQS 96 /* * OMAP2 has a number of different interrupt controllers, each interrupt diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h index 15f497c..fc3959c 100644 --- a/arch/arm/plat-omap/include/plat/irqs.h +++ b/arch/arm/plat-omap/include/plat/irqs.h @@ -440,9 +440,6 @@ #define OMAP_IRQ_BIT(irq) (1 ((irq) % 32)) -#define INTCPS_NR_MIR_REGS 3 -#define INTCPS_NR_IRQS 96 - #include mach/hardware.h #ifdef CONFIG_FIQ -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/9] ARM: OMAP2+: Remove unused nand_irq for GPMC
This is no longer needed and assumes a fixed IRQ number that won't work with SPARSE_IRQ. Signed-off-by: Tony Lindgren t...@atomide.com --- arch/arm/mach-omap2/board-flash.c|1 - include/linux/platform_data/mtd-nand-omap2.h |1 - 2 files changed, 2 deletions(-) diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c index a1ef5f0..c8d4382 100644 --- a/arch/arm/mach-omap2/board-flash.c +++ b/arch/arm/mach-omap2/board-flash.c @@ -140,7 +140,6 @@ __init board_nand_init(struct mtd_partition *nand_parts, board_nand_data.devsize = nand_type; board_nand_data.ecc_opt = OMAP_ECC_HAMMING_CODE_DEFAULT; - board_nand_data.gpmc_irq = OMAP_GPMC_IRQ_BASE + cs; gpmc_nand_init(board_nand_data); } #endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */ diff --git a/include/linux/platform_data/mtd-nand-omap2.h b/include/linux/platform_data/mtd-nand-omap2.h index 290cef5..1a68c1e 100644 --- a/include/linux/platform_data/mtd-nand-omap2.h +++ b/include/linux/platform_data/mtd-nand-omap2.h @@ -24,7 +24,6 @@ struct omap_nand_platform_data { struct gpmc_timings *gpmc_t; int nr_parts; booldev_ready; - int gpmc_irq; enum nand_ioxfer_type; int devsize; enum omap_ecc ecc_opt; -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/9] ARM: OMAP2+: Remove hardcoded twl4030 gpio_base, irq_base and irq_end
We can't use hardcoded interrupts for SPARSE_IRQ, and can replace the hardcoded gpio_base with twl_gpiochip.base after it's been allocated. Cc: Grant Likely grant.lik...@secretlab.ca Cc: Linus Walleij linus.wall...@linaro.org Cc: Samuel Ortiz sa...@linux.intel.com Cc: Peter Ujfalusi peter.ujfal...@ti.com Signed-off-by: Tony Lindgren t...@atomide.com --- arch/arm/mach-omap2/board-2430sdp.c |3 --- arch/arm/mach-omap2/board-3430sdp.c |3 --- arch/arm/mach-omap2/board-4430sdp.c |1 - arch/arm/mach-omap2/board-cm-t35.c |3 --- arch/arm/mach-omap2/board-devkit8000.c |3 --- arch/arm/mach-omap2/board-igep0020.c |3 --- arch/arm/mach-omap2/board-ldp.c |3 --- arch/arm/mach-omap2/board-omap3beagle.c |3 --- arch/arm/mach-omap2/board-omap3evm.c |3 --- arch/arm/mach-omap2/board-omap3logic.c |3 --- arch/arm/mach-omap2/board-omap3pandora.c |3 --- arch/arm/mach-omap2/board-omap3stalker.c |3 --- arch/arm/mach-omap2/board-omap3touchbook.c |3 --- arch/arm/mach-omap2/board-omap4panda.c |1 - arch/arm/mach-omap2/board-overo.c|3 --- arch/arm/mach-omap2/board-rm680.c|3 --- arch/arm/mach-omap2/board-rx51-peripherals.c |3 --- arch/arm/mach-omap2/board-zoom-peripherals.c |3 --- drivers/gpio/gpio-twl4030.c | 15 ++- include/linux/i2c/twl.h |3 --- include/linux/mfd/twl6040.h |2 -- 21 files changed, 10 insertions(+), 60 deletions(-) diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index 36eee4b..cacc498 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c @@ -211,9 +211,6 @@ static struct regulator_init_data sdp2430_vmmc1 = { }; static struct twl4030_gpio_platform_data sdp2430_gpio_data = { - .gpio_base = OMAP_MAX_GPIO_LINES, - .irq_base = TWL4030_GPIO_IRQ_BASE, - .irq_end= TWL4030_GPIO_IRQ_END, }; static struct twl4030_platform_data sdp2430_twldata = { diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index dac5cdf..5fd3934 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c @@ -229,9 +229,6 @@ static int sdp3430_twl_gpio_setup(struct device *dev, } static struct twl4030_gpio_platform_data sdp3430_gpio_data = { - .gpio_base = OMAP_MAX_GPIO_LINES, - .irq_base = TWL4030_GPIO_IRQ_BASE, - .irq_end= TWL4030_GPIO_IRQ_END, .pulldowns = BIT(2) | BIT(6) | BIT(8) | BIT(13) | BIT(16) | BIT(17), .setup = sdp3430_twl_gpio_setup, diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 04e8574..ee82604 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -543,7 +543,6 @@ static struct twl6040_platform_data twl6040_data = { .codec = twl6040_codec, .vibra = twl6040_vibra, .audpwron_gpio = 127, - .irq_base = TWL6040_CODEC_IRQ_BASE, }; static struct twl4030_platform_data sdp4430_twldata = { diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 6e20b82..ad83654 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c @@ -469,9 +469,6 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio, } static struct twl4030_gpio_platform_data cm_t35_gpio_data = { - .gpio_base = OMAP_MAX_GPIO_LINES, - .irq_base = TWL4030_GPIO_IRQ_BASE, - .irq_end= TWL4030_GPIO_IRQ_END, .setup = cm_t35_twl_gpio_setup, }; diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 214be52..d96eab5 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c @@ -235,9 +235,6 @@ static int devkit8000_twl_gpio_setup(struct device *dev, } static struct twl4030_gpio_platform_data devkit8000_gpio_data = { - .gpio_base = OMAP_MAX_GPIO_LINES, - .irq_base = TWL4030_GPIO_IRQ_BASE, - .irq_end= TWL4030_GPIO_IRQ_END, .use_leds = true, .pulldowns = BIT(1) | BIT(2) | BIT(6) | BIT(8) | BIT(13) | BIT(15) | BIT(16) | BIT(17), diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 7a3e536..0b9677b 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c @@ -424,9 +424,6 @@ static int igep_twl_gpio_setup(struct device *dev, }; static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = { - .gpio_base = OMAP_MAX_GPIO_LINES, - .irq_base = TWL4030_GPIO_IRQ_BASE, -
[PATCH 6/9] ARM: OMAP: Move gpio.h to include/linux/platform_data
This way we can remove includes of plat/gpio.h which won't work with the single zImage support. Note that we also remove the cpu_class_is_omap2() check in gpio-omap.c as the drivers should not call it as we need to make it local to arch/arm/mach-omap2 for single zImage support. While at it, arrange the related includes in the standard way. Cc: Grant Likely grant.lik...@secretlab.ca Cc: Linus Walleij linus.wall...@linaro.org Cc: linux-...@lists.infradead.org Cc: alsa-de...@alsa-project.org Acked-by: Tony Lindgren t...@atomide.com --- arch/arm/mach-omap1/board-ams-delta.c |3 ++- arch/arm/mach-omap1/board-osk.c|1 + arch/arm/mach-omap1/gpio15xx.c |1 + arch/arm/mach-omap1/gpio16xx.c |1 + arch/arm/mach-omap1/gpio7xx.c |1 + arch/arm/mach-omap1/include/mach/gpio.h|2 -- arch/arm/mach-omap1/leds-h2p2-debug.c |4 +++- arch/arm/mach-omap1/leds.c |1 + arch/arm/mach-omap2/board-am3517evm.c |9 ++--- arch/arm/mach-omap2/board-cm-t35.c | 12 +++- arch/arm/mach-omap2/board-zoom-display.c |6 +- arch/arm/mach-omap2/board-zoom-peripherals.c |1 + arch/arm/mach-omap2/gpio.c |1 + arch/arm/mach-omap2/hsmmc.c|5 - arch/arm/mach-omap2/include/mach/gpio.h|2 -- arch/arm/mach-omap2/msdi.c |1 + arch/arm/mach-omap2/omap_hwmod_2420_data.c |1 - arch/arm/mach-omap2/omap_hwmod_2430_data.c |6 +++--- arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |2 +- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |6 +++--- arch/arm/mach-omap2/omap_hwmod_44xx_data.c |6 +++--- arch/arm/mach-omap2/pm24xx.c |1 + arch/arm/mach-omap2/pm34xx.c |2 ++ drivers/gpio/gpio-omap.c | 15 --- drivers/mtd/nand/ams-delta.c |8 ++-- include/linux/platform_data/gpio-omap.h| 15 ++- sound/soc/omap/sdp3430.c |1 + 27 files changed, 65 insertions(+), 49 deletions(-) rename arch/arm/plat-omap/include/plat/gpio.h = include/linux/platform_data/gpio-omap.h (94%) diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 147d665..4b5578b 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -26,6 +26,8 @@ #include linux/export.h #include linux/omapfb.h #include linux/io.h +#include linux/platform_data/gpio-omap.h +#include linux/platform_data/keypad-omap.h #include media/soc_camera.h @@ -35,7 +37,6 @@ #include asm/mach/map.h #include plat/board-ams-delta.h -#include linux/platform_data/keypad-omap.h #include plat/mux.h #include mach/hardware.h diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index 9413fd3..c780a1b 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c @@ -39,6 +39,7 @@ #include linux/mtd/partitions.h #include linux/mtd/physmap.h #include linux/i2c/tps65010.h +#include linux/platform_data/gpio-omap.h #include linux/platform_data/omap1_bl.h #include asm/mach-types.h diff --git a/arch/arm/mach-omap1/gpio15xx.c b/arch/arm/mach-omap1/gpio15xx.c index ebef15e..98e6f39 100644 --- a/arch/arm/mach-omap1/gpio15xx.c +++ b/arch/arm/mach-omap1/gpio15xx.c @@ -17,6 +17,7 @@ */ #include linux/gpio.h +#include linux/platform_data/gpio-omap.h #define OMAP1_MPUIO_VBASE OMAP1_MPUIO_BASE #define OMAP1510_GPIO_BASE 0xFFFCE000 diff --git a/arch/arm/mach-omap1/gpio16xx.c b/arch/arm/mach-omap1/gpio16xx.c index 2a48cd2..33f4192 100644 --- a/arch/arm/mach-omap1/gpio16xx.c +++ b/arch/arm/mach-omap1/gpio16xx.c @@ -17,6 +17,7 @@ */ #include linux/gpio.h +#include linux/platform_data/gpio-omap.h #define OMAP1610_GPIO1_BASE0xfffbe400 #define OMAP1610_GPIO2_BASE0xfffbec00 diff --git a/arch/arm/mach-omap1/gpio7xx.c b/arch/arm/mach-omap1/gpio7xx.c index acf12b7..958ce9a 100644 --- a/arch/arm/mach-omap1/gpio7xx.c +++ b/arch/arm/mach-omap1/gpio7xx.c @@ -17,6 +17,7 @@ */ #include linux/gpio.h +#include linux/platform_data/gpio-omap.h #define OMAP7XX_GPIO1_BASE 0xfffbc000 #define OMAP7XX_GPIO2_BASE 0xfffbc800 diff --git a/arch/arm/mach-omap1/include/mach/gpio.h b/arch/arm/mach-omap1/include/mach/gpio.h index e737706..ebf86c0 100644 --- a/arch/arm/mach-omap1/include/mach/gpio.h +++ b/arch/arm/mach-omap1/include/mach/gpio.h @@ -1,5 +1,3 @@ /* * arch/arm/mach-omap1/include/mach/gpio.h */ - -#include plat/gpio.h diff --git a/arch/arm/mach-omap1/leds-h2p2-debug.c b/arch/arm/mach-omap1/leds-h2p2-debug.c index f6b14a1..3ea12c7 100644 ---
[PATCH 7/9] ARM: OMAP2+: Prepare for irqs.h removal
As the interrupts should only be defined in the platform_data, and eventually coming from device tree, there's no need to define them in header files. Let's remove the hardcoded references to irqs.h and fix up the includes so we don't rely on headers included in irqs.h. While at it, sort the includes the standard way. Signed-off-by: Tony Lindgren t...@atomide.com --- arch/arm/mach-omap2/board-2430sdp.c|7 +++-- arch/arm/mach-omap2/board-4430sdp.c|2 + arch/arm/mach-omap2/board-am3517evm.c |3 +- arch/arm/mach-omap2/board-cm-t3517.c |6 ++-- arch/arm/mach-omap2/board-flash.c |2 + arch/arm/mach-omap2/board-igep0020.c |7 +++-- arch/arm/mach-omap2/board-n8x0.c |3 +- arch/arm/mach-omap2/board-omap4panda.c |2 + arch/arm/mach-omap2/board-rm680.c |6 +++- arch/arm/mach-omap2/board-rx51-peripherals.c |2 + arch/arm/mach-omap2/board-ti8168evm.c |3 +- arch/arm/mach-omap2/board-zoom-debugboard.c|1 + arch/arm/mach-omap2/board-zoom-peripherals.c |5 ++-- arch/arm/mach-omap2/cpuidle34xx.c |1 - arch/arm/mach-omap2/devices.c |7 + arch/arm/mach-omap2/gpmc-smc91x.c |1 + arch/arm/mach-omap2/gpmc.c | 11 +--- arch/arm/mach-omap2/io.c |2 + arch/arm/mach-omap2/mailbox.c |3 +- arch/arm/mach-omap2/mcbsp.c|1 - arch/arm/mach-omap2/omap-iommu.c |1 - arch/arm/mach-omap2/omap-wakeupgen.c |1 + arch/arm/mach-omap2/omap4-common.c |7 ++--- arch/arm/mach-omap2/omap_hwmod_2420_data.c |1 - arch/arm/mach-omap2/omap_hwmod_2430_data.c |3 +- .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c | 12 - arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |2 - arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 27 ++-- arch/arm/mach-omap2/omap_l3_noc.c |6 +++- arch/arm/mach-omap2/omap_phy_internal.c|2 + arch/arm/mach-omap2/pm24xx.c |2 - arch/arm/mach-omap2/prcm.c |1 - arch/arm/mach-omap2/prm2xxx_3xxx.c |3 +- arch/arm/mach-omap2/prm44xx.c |4 +-- arch/arm/mach-omap2/prm_common.c |1 - arch/arm/mach-omap2/serial.c |1 + arch/arm/mach-omap2/timer.c| 10 --- arch/arm/mach-omap2/twl-common.c |3 +- arch/arm/mach-omap2/twl-common.h |6 +--- arch/arm/mach-omap2/usb-host.c |1 - arch/arm/mach-omap2/usb-musb.c |1 - arch/arm/plat-omap/include/plat/omap44xx.h |1 + drivers/dma/omap-dma.c |2 + drivers/mfd/twl-core.c |2 + drivers/mtd/onenand/omap2.c|8 -- drivers/tty/serial/8250/8250.c |4 +-- drivers/video/omap2/dss/dispc.c|1 + drivers/video/omap2/omapfb/omapfb-main.c |4 ++- sound/soc/omap/mcbsp.c |3 +- sound/soc/omap/omap-mcbsp.c|1 + sound/soc/omap/omap-pcm.c |1 + 51 files changed, 105 insertions(+), 92 deletions(-) diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index cacc498..3a587d0 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c @@ -28,19 +28,20 @@ #include linux/io.h #include linux/gpio.h -#include mach/hardware.h #include asm/mach-types.h #include asm/mach/arch.h #include asm/mach/map.h -#include common.h #include plat/gpmc.h #include plat/usb.h #include plat/gpmc-smc91x.h +#include mach/hardware.h + #include video/omapdss.h #include video/omap-panel-generic-dpi.h +#include common.h #include mux.h #include hsmmc.h #include common-board-devices.h @@ -231,7 +232,7 @@ static int __init omap2430_i2c_init(void) sdp2430_i2c1_boardinfo[0].irq = gpio_to_irq(78); omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo, ARRAY_SIZE(sdp2430_i2c1_boardinfo)); - omap_pmic_init(2, 100, twl4030, INT_24XX_SYS_NIRQ, + omap_pmic_init(2, 100, twl4030, 7, sdp2430_twldata); return 0; } diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index ee82604..31456ea 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -579,7 +579,7 @@ static int __init omap4_i2c_init(void) TWL_COMMON_REGULATOR_V1V8 |
[PATCH 9/9] ARM: OMAP1: Move plat/irqs.h to mach/irqs.h
This is now omap1 specific files. Signed-off-by: Tony Lindgren t...@atomide.com --- arch/arm/mach-omap1/ams-delta-fiq-handler.S |1 arch/arm/mach-omap1/dma.c|3 arch/arm/mach-omap1/include/mach/ams-delta-fiq.h |2 arch/arm/mach-omap1/include/mach/irqs.h | 267 ++ arch/arm/plat-omap/include/plat/irqs.h | 268 -- 5 files changed, 268 insertions(+), 273 deletions(-) delete mode 100644 arch/arm/plat-omap/include/plat/irqs.h diff --git a/arch/arm/mach-omap1/ams-delta-fiq-handler.S b/arch/arm/mach-omap1/ams-delta-fiq-handler.S index a051cb8..d2b6acc 100644 --- a/arch/arm/mach-omap1/ams-delta-fiq-handler.S +++ b/arch/arm/mach-omap1/ams-delta-fiq-handler.S @@ -18,6 +18,7 @@ #include plat/board-ams-delta.h +#include mach/irqs.h #include mach/ams-delta-fiq.h #include iomap.h diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c index 3ef7d52..b0b0f0f 100644 --- a/arch/arm/mach-omap1/dma.c +++ b/arch/arm/mach-omap1/dma.c @@ -27,7 +27,8 @@ #include plat/dma.h #include plat/tc.h -#include plat/irqs.h + +#include mach/irqs.h #define OMAP1_DMA_BASE (0xfffed800) #define OMAP1_LOGICAL_DMA_CH_COUNT 17 diff --git a/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h b/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h index 23eed00..adb5e76 100644 --- a/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h +++ b/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h @@ -14,8 +14,6 @@ #ifndef __AMS_DELTA_FIQ_H #define __AMS_DELTA_FIQ_H -#include plat/irqs.h - /* * Interrupt number used for passing control from FIQ to IRQ. * IRQ12, described as reserved, has been selected. diff --git a/arch/arm/mach-omap1/include/mach/irqs.h b/arch/arm/mach-omap1/include/mach/irqs.h index 9292fdc..729992d 100644 --- a/arch/arm/mach-omap1/include/mach/irqs.h +++ b/arch/arm/mach-omap1/include/mach/irqs.h @@ -1,5 +1,268 @@ /* - * arch/arm/mach-omap1/include/mach/irqs.h + * arch/arm/plat-omap/include/mach/irqs.h + * + * Copyright (C) Greg Lonnon 2001 + * Updated for OMAP-1610 by Tony Lindgren t...@atomide.com + * + * Copyright (C) 2009 Texas Instruments + * Added OMAP4 support - Santosh Shilimkar santosh.shilim...@ti.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * NOTE: The interrupt vectors for the OMAP-1509, OMAP-1510, and OMAP-1610 + * are different. */ -#include plat/irqs.h +#ifndef __ASM_ARCH_OMAP15XX_IRQS_H +#define __ASM_ARCH_OMAP15XX_IRQS_H + +/* + * IRQ numbers for interrupt handler 1 + * + * NOTE: See also the OMAP-1510 and 1610 specific IRQ numbers below + * + */ +#define INT_CAMERA 1 +#define INT_FIQ3 +#define INT_RTDX 6 +#define INT_DSP_MMU_ABORT 7 +#define INT_HOST 8 +#define INT_ABORT 9 +#define INT_BRIDGE_PRIV13 +#define INT_GPIO_BANK1 14 +#define INT_UART3 15 +#define INT_TIMER3 16 +#define INT_DMA_CH0_6 19 +#define INT_DMA_CH1_7 20 +#define INT_DMA_CH2_8 21 +#define INT_DMA_CH322 +#define INT_DMA_CH423 +#define INT_DMA_CH524 +#define INT_TIMER1 26 +#define INT_WD_TIMER 27 +#define INT_BRIDGE_PUB 28 +#define INT_TIMER2 30 +#define INT_LCD_CTRL 31 + +/* + * OMAP-1510 specific IRQ numbers for interrupt handler 1 + */ +#define INT_1510_IH2_IRQ 0 +#define INT_1510_RES2 2 +#define INT_1510_SPI_TX4 +#define INT_1510_SPI_RX5 +#define INT_1510_DSP_MAILBOX1 10 +#define INT_1510_DSP_MAILBOX2 11 +#define INT_1510_RES12 12 +#define INT_1510_LB_MMU17 +#define INT_1510_RES18 18 +#define INT_1510_LOCAL_BUS 29 + +/* + * OMAP-1610 specific IRQ numbers for interrupt handler 1 + */ +#define INT_1610_IH2_IRQ INT_1510_IH2_IRQ +#define INT_1610_IH2_FIQ 2 +#define INT_1610_McBSP2_TX 4 +#define INT_1610_McBSP2_RX 5 +#define INT_1610_DSP_MAILBOX1 10 +#define INT_1610_DSP_MAILBOX2 11 +#define INT_1610_LCD_LINE 12 +#define INT_1610_GPTIMER1 17 +#define INT_1610_GPTIMER2 18 +#define INT_1610_SSR_FIFO_029 + +/* + * OMAP-7xx specific IRQ numbers for
Re: [PATCH v4 0/3] Prepare for OMAP2+ movement to Common Clk
On 8/31/2012 2:26 AM, Paul Walmsley wrote: Hi Rajendra On Wed, 29 Aug 2012, Rajendra Nayak wrote: Changes in v4: * Added *hack* comments around clk_prepare usage in hwmod rebased on 3.6-rc Assuming this is so (haven't looked closely at this series yet), and after the existing comments are taken into consideration and a new version reposted, will queue this series for 3.7. Care to respin your series that converts the data also, on top of your new version of this series? We should try to get that into 3.7 also. BTW are you still waiting for something from Vaibhav Hiremath for this? Or can the scripts convert the existing clock33xx_data.c also? I believe I have already shared all the patches with Rajendra, so please let me know if anything is pending on me. Thanks, Vaibhav - Paul ___ linux-arm-kernel mailing list linux-arm-ker...@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/9] Clean up hardcoded IRQs for mach-omap2, enable SPARSE_IRQ, plaform_data/gpio-omap.h
On 08/30/2012 07:52 PM, Tony Lindgren wrote: Hi all, Here's the first set of omap header clean-up patches needed for single zImage support. This series is based v3.6-rc3 and the following patches to avoid merge conflicts with the includes: - Arnd's patch ARM: omap: move platform_data definitions - Igor's series ARM: OMAP: cleanup plat/board.h file - Afzal's series Prepare for GPMC driver conversion (w.r.t MTD) Looks like I can drop my omap gpio changes with this. Do you have a git tree with this? Rob Regards, Tony --- Tony Lindgren (9): ARM: OMAP1: Move define of OMAP_LCD_DMA to dma.h ARM: OMAP1: Define OMAP1_INT_I2C locally ARM: OMAP2+: Make INTCPS_NR_IRQS local for mach-omap2/irq.c ARM: OMAP2+: Remove unused nand_irq for GPMC ARM: OMAP2+: Remove hardcoded twl4030 gpio_base, irq_base and irq_end ARM: OMAP: Move gpio.h to include/linux/platform_data ARM: OMAP2+: Prepare for irqs.h removal ARM: OMAP2+: Remove hardcoded IRQs and enable SPARSE_IRQ ARM: OMAP1: Move plat/irqs.h to mach/irqs.h arch/arm/mach-omap1/ams-delta-fiq-handler.S|1 arch/arm/mach-omap1/board-ams-delta.c |3 arch/arm/mach-omap1/board-osk.c|1 arch/arm/mach-omap1/dma.c |3 arch/arm/mach-omap1/gpio15xx.c |1 arch/arm/mach-omap1/gpio16xx.c |1 arch/arm/mach-omap1/gpio7xx.c |1 arch/arm/mach-omap1/include/mach/ams-delta-fiq.h |2 arch/arm/mach-omap1/include/mach/gpio.h|2 arch/arm/mach-omap1/include/mach/irqs.h| 267 arch/arm/mach-omap1/leds-h2p2-debug.c |4 arch/arm/mach-omap1/leds.c |1 arch/arm/mach-omap2/board-2430sdp.c| 10 arch/arm/mach-omap2/board-3430sdp.c|3 arch/arm/mach-omap2/board-4430sdp.c|3 arch/arm/mach-omap2/board-am3517evm.c | 12 - arch/arm/mach-omap2/board-cm-t35.c | 15 - arch/arm/mach-omap2/board-cm-t3517.c |6 arch/arm/mach-omap2/board-devkit8000.c |3 arch/arm/mach-omap2/board-flash.c |3 arch/arm/mach-omap2/board-igep0020.c | 10 arch/arm/mach-omap2/board-ldp.c|3 arch/arm/mach-omap2/board-n8x0.c |3 arch/arm/mach-omap2/board-omap3beagle.c|3 arch/arm/mach-omap2/board-omap3evm.c |3 arch/arm/mach-omap2/board-omap3logic.c |3 arch/arm/mach-omap2/board-omap3pandora.c |3 arch/arm/mach-omap2/board-omap3stalker.c |3 arch/arm/mach-omap2/board-omap3touchbook.c |3 arch/arm/mach-omap2/board-omap4panda.c |3 arch/arm/mach-omap2/board-overo.c |3 arch/arm/mach-omap2/board-rm680.c |9 arch/arm/mach-omap2/board-rx51-peripherals.c |5 arch/arm/mach-omap2/board-ti8168evm.c |3 arch/arm/mach-omap2/board-zoom-debugboard.c|1 arch/arm/mach-omap2/board-zoom-display.c |6 arch/arm/mach-omap2/board-zoom-peripherals.c |9 arch/arm/mach-omap2/cpuidle34xx.c |1 arch/arm/mach-omap2/devices.c |7 arch/arm/mach-omap2/gpio.c |1 arch/arm/mach-omap2/gpmc-smc91x.c |1 arch/arm/mach-omap2/gpmc.c | 11 arch/arm/mach-omap2/hsmmc.c|5 arch/arm/mach-omap2/include/mach/gpio.h|2 arch/arm/mach-omap2/include/mach/irqs.h|2 arch/arm/mach-omap2/io.c |2 arch/arm/mach-omap2/irq.c |2 arch/arm/mach-omap2/mailbox.c |3 arch/arm/mach-omap2/mcbsp.c|1 arch/arm/mach-omap2/msdi.c |1 arch/arm/mach-omap2/omap-iommu.c |1 arch/arm/mach-omap2/omap-wakeupgen.c |1 arch/arm/mach-omap2/omap4-common.c |7 arch/arm/mach-omap2/omap_hwmod_2420_data.c |2 arch/arm/mach-omap2/omap_hwmod_2430_data.c |9 .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c | 12 - arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |4 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 33 + arch/arm/mach-omap2/omap_hwmod_44xx_data.c |6 arch/arm/mach-omap2/omap_l3_noc.c |6 arch/arm/mach-omap2/omap_phy_internal.c|2 arch/arm/mach-omap2/pm24xx.c |3 arch/arm/mach-omap2/pm34xx.c |2 arch/arm/mach-omap2/prcm.c