RE: [PATCH V2 0/7] ARM: OMAP2+: Add device-tree support for timers
On Sat, Sep 29, 2012 at 03:17:51, Hunter, Jon wrote: On 09/28/2012 01:51 PM, Vaibhav Hiremath wrote: On 9/26/2012 10:23 PM, Jon Hunter wrote: On 09/20/2012 06:53 PM, Tony Lindgren wrote: * Benoit Cousson b-cous...@ti.com [120919 19:24]: Hi Tony, I was about to take the DTS patch, but was wondering if you will pull the driver changes for 3.7. I suggest that you do a separate branch on top of Paul's hwmod series when he posts those if that works for you? Benoit, I see that you have pulled in the DTS patch. Do you guys want me to rebase the remaining patches with Rob's change on Tony's master branch and re-submit? Jon, Sorry for delayed response, But I tried using your omap_test application to validate this patch series, but it is failing for me. How did you test it? Are you running same test application at your end? Sorry, I now see you are using the latest test code! I was too hasty when I saw the first error ;-) Jon, have patience ;-) I understand, sometimes it happens un-intentionally. I am debugging this issue, i just thought I should tell you this before its too late. Thanks. Below is the log - [root@arago /]# echo 3 /tmp/omap-test/timer/one [ 79.612223] omap_dm_timer_request_specific: Please use omap_dm_timer_request_by_cap() [ 79.620636] Timer 3 not available! This is expected because omap_dm_timer_request_specific() is no longer supported. I should remove in the omap-test/timer/one going forward. [root@arago /]# [root@arago /]# echo 3 /tmp/omap-test/timer/all [ 135.111949] Testing 48042000.timer with 2400 Hz clock ... [root@arago /]# [ 137.457389] Timer read test PASSED! No errors, 100 loops [ 137.463267] Timer interrupt test PASSED! [ 137.467650] Testing 48042000.timer with 32768 Hz clock ... [ 139.816892] Timer read test PASSED! No errors, 100 loops [ 139.830776] Timer interrupt test PASSED! [ 139.835245] Testing 48044000.timer with 2400 Hz clock ... [ 142.183912] Timer read test PASSED! No errors, 100 loops [ 142.189734] Timer interrupt test PASSED! [ 142.194076] Testing 48044000.timer with 32768 Hz clock ... [ 144.543451] Timer read test PASSED! No errors, 100 loops [ 144.557334] Timer interrupt test PASSED! [ 144.561806] Testing 48046000.timer with 2400 Hz clock ... [ 146.910469] Timer read test PASSED! No errors, 100 loops [ 147.910493] Timer interrupt test FAILED! No interrupt occurred in 1 sec [ 147.917598] Testing 48046000.timer with 32768 Hz clock ... [ 150.262203] Timer read test PASSED! No errors, 100 loops [ 151.262049] Timer interrupt test FAILED! No interrupt occurred in 1 sec [ 151.269298] Testing 48048000.timer with 2400 Hz clock ... [ 153.613596] Timer read test PASSED! No errors, 100 loops [ 154.613618] Timer interrupt test FAILED! No interrupt occurred in 1 sec [ 154.620725] Testing 48048000.timer with 32768 Hz clock ... [ 156.965324] Timer read test PASSED! No errors, 100 loops [ 157.965176] Timer interrupt test FAILED! No interrupt occurred in 1 sec [ 157.972419] Testing 4804a000.timer with 2400 Hz clock ... [root@arago /]# [ 160.316753] Timer read test PASSED! No errors, 100 loops [root@arago /]# [ 161.316728] Timer interrupt test FAILED! No interrupt occurred in 1 sec [ 161.323912] Testing 4804a000.timer with 32768 Hz clock ... [root@arago /]# [ 163.668490] Timer read test PASSED! No errors, 100 loops [ 164.668328] Timer interrupt test FAILED! No interrupt occurred in 1 sec [ 164.675545] Tested 5 timers, skipped 6 timers and detected 6 errors [ 164.682202] Test iteration 0 complete in 29 secs [ 164.687104] Test summary: Iterations 1, Errors 6 What is interesting is that it is the interrupt test that is failing for timers 5-7. Any chance there is a problem with the interrupt mapping? I checked the documentation for AM335x and I don't see anything obvious that is wrong with the binding unless the documentation itself is wrong. Given that the interrupts work on timers 3 and 4 it appears to be a interrupt configuration problem somewhere. We could adapt the test to see if an interrupt is pending in the timer peripheral when it fails. This would tell us that the timer is working but the interrupt is not being enabled correctly in the interrupt controller. I am also surprised to see this, and as you mentioned, nothing I looks obviously wrong to me in timer5-7. I have to debug this further and will keep you updated. Thanks, Vaibhav Cheers Jon -- 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 V4 0/5] OMAPDSS: Enable dynamic debug printing
Hi everyone, this patch series aims at cleaning up of DSS of printk()'s enabled with dss_debug and replace them with generic dynamic debug printing. The 1st patch * moved DEBUG flag definition to Makefile The 2nd patch * created two debug config options OMAP2_DSS_DEBUG and OMAP2_DSS_DEBUGFS The 3rd patch * replaces printk() in DSSDBG definition with pr_debug() * removes DSSDBGF definition and replaces its instances with DSSDBG() The 4th patch * cleans up printk()'s in omap_dispc_unregister_isr() and _dsi_print_reset_status() with pr_debug() The 5th patch * removes dss_debug variable Changes from V1 to V2: * added debug messages to DSSDBG calls * added patch OMAPDSS: Remove dss_debug variable Changes from V2 to V3 * added patch OMAPDSS: Move definition of DEBUG flag to Makefile Changes from V3 to V4: * added patch OMAPDSS: Create new debug config options * broke earlier patch OMAPDSS: Remove dss_debug variable into two parts as OMAPDSS: Replace multi part debug prints with pr_debug and OMAPDSS: Remove dss_debug variable All your comments and suggestions are welcome. Refenence Tree: git://gitorious.org/linux-omap-dss2/chandrabhanus-linux.git dss_cleanup Regards, Chandrabhanu Chandrabhanu Mahapatra (5): OMAPDSS: Move definition of DEBUG flag to Makefile OMAPDSS: Create new debug config options OMAPDSS: Cleanup DSSDBG with dynamic pr_debug function OMAPDSS: Replace multi part debug prints with pr_debug OMAPDSS: Remove dss_debug variable drivers/video/omap2/dss/Kconfig | 21 +++- drivers/video/omap2/dss/Makefile |1 + drivers/video/omap2/dss/apply.c |8 +++ drivers/video/omap2/dss/core.c | 11 +++-- drivers/video/omap2/dss/dispc.c | 40 --- drivers/video/omap2/dss/dsi.c| 49 -- drivers/video/omap2/dss/dss.c|2 +- drivers/video/omap2/dss/dss.h| 40 ++- 8 files changed, 66 insertions(+), 106 deletions(-) -- 1.7.10 -- 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 V4 1/5] OMAPDSS: Move definition of DEBUG flag to Makefile
In OMAPDSS the DEBUG flag is set only after the OMAPDSS module is called, for which the debugging capabilities are available only after its proper initialization. As a result of which tracking of bugs prior to or during initial process becomes difficult. So, the definition of DEBUG is being moved to the corresponding Makefile. Signed-off-by: Chandrabhanu Mahapatra cmahapa...@ti.com --- drivers/video/omap2/dss/Makefile |1 + drivers/video/omap2/dss/dss.h|4 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile index 4549869..86493e3 100644 --- a/drivers/video/omap2/dss/Makefile +++ b/drivers/video/omap2/dss/Makefile @@ -8,3 +8,4 @@ omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o omapdss-$(CONFIG_OMAP2_DSS_DSI) += dsi.o omapdss-$(CONFIG_OMAP4_DSS_HDMI) += hdmi.o \ hdmi_panel.o ti_hdmi_4xxx_ip.o +ccflags-$(CONFIG_OMAP2_DSS_DEBUG_SUPPORT) += -DDEBUG diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index 6728892..ffbba7e 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -23,10 +23,6 @@ #ifndef __OMAP2_DSS_H #define __OMAP2_DSS_H -#ifdef CONFIG_OMAP2_DSS_DEBUG_SUPPORT -#define DEBUG -#endif - #ifdef DEBUG extern bool dss_debug; #ifdef DSS_SUBSYS_NAME -- 1.7.10 -- 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 V4 2/5] OMAPDSS: Create new debug config options
The config option CONFIG_OMAP2_DSS_DEBUG_SUPPORT has been removed and replaced with CONFIG_OMAP2_DSS_DEBUG and CONFIG_OMAP2_DSS_DEBUGFS. CONFIG_OMAP2_DSS_DEBUG enables DEBUG flag and CONFIG_OMAP2_DSS_DEBUGFS enables creation of debugfs for OMAPDSS. Both the config options are disabled by default and can be enabled independently of one another as per convenience. Signed-off-by: Chandrabhanu Mahapatra cmahapa...@ti.com --- drivers/video/omap2/dss/Kconfig | 21 +++-- drivers/video/omap2/dss/Makefile |2 +- drivers/video/omap2/dss/core.c |6 +++--- drivers/video/omap2/dss/dss.c|2 +- drivers/video/omap2/dss/dss.h|2 +- 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/drivers/video/omap2/dss/Kconfig b/drivers/video/omap2/dss/Kconfig index 80f5390..866a563 100644 --- a/drivers/video/omap2/dss/Kconfig +++ b/drivers/video/omap2/dss/Kconfig @@ -18,16 +18,25 @@ config OMAP2_VRAM_SIZE You can also set this with vram=bytes kernel argument, or in the board file. -config OMAP2_DSS_DEBUG_SUPPORT -bool Debug support - default y +config OMAP2_DSS_DEBUG + bool Debug support + default n + help + This enables printing of debug messages. Alternatively, debug messages + can also be enabled by setting CONFIG_DYNAMIC_DEBUG and then setting + appropriate flags in debugfs/dynamic_debug/control. + +config OMAP2_DSS_DEBUGFS + bool Debugfs filesystem support + default n help - This enables debug messages. You need to enable printing - with 'debug' module parameter. + This enables debugfs for OMAPDSS at debugfs/omapdss. This enables + querying about clock configuration and register configuration of dss, + dispc, dsi, hdmi and rfbi. config OMAP2_DSS_COLLECT_IRQ_STATS bool Collect DSS IRQ statistics - depends on OMAP2_DSS_DEBUG_SUPPORT + depends on OMAP2_DSS_DEBUGFS default n help Collect DSS IRQ statistics, printable via debugfs. diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile index 86493e3..4070191 100644 --- a/drivers/video/omap2/dss/Makefile +++ b/drivers/video/omap2/dss/Makefile @@ -8,4 +8,4 @@ omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o omapdss-$(CONFIG_OMAP2_DSS_DSI) += dsi.o omapdss-$(CONFIG_OMAP4_DSS_HDMI) += hdmi.o \ hdmi_panel.o ti_hdmi_4xxx_ip.o -ccflags-$(CONFIG_OMAP2_DSS_DEBUG_SUPPORT) += -DDEBUG +ccflags-$(CONFIG_OMAP2_DSS_DEBUG) += -DDEBUG diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index b2af72d..1e1f50f 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c @@ -138,7 +138,7 @@ int dss_set_min_bus_tput(struct device *dev, unsigned long tput) return 0; } -#if defined(CONFIG_DEBUG_FS) defined(CONFIG_OMAP2_DSS_DEBUG_SUPPORT) +#if defined(CONFIG_DEBUG_FS) defined(CONFIG_OMAP2_DSS_DEBUGFS) static int dss_debug_show(struct seq_file *s, void *unused) { void (*func)(struct seq_file *) = s-private; @@ -193,7 +193,7 @@ int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) return 0; } -#else /* CONFIG_DEBUG_FS CONFIG_OMAP2_DSS_DEBUG_SUPPORT */ +#else /* CONFIG_DEBUG_FS CONFIG_OMAP2_DSS_DEBUGFS */ static inline int dss_initialize_debugfs(void) { return 0; @@ -205,7 +205,7 @@ int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) { return 0; } -#endif /* CONFIG_DEBUG_FS CONFIG_OMAP2_DSS_DEBUG_SUPPORT */ +#endif /* CONFIG_DEBUG_FS CONFIG_OMAP2_DSS_DEBUGFS */ /* PLATFORM DEVICE */ static int omap_dss_pm_notif(struct notifier_block *b, unsigned long v, void *d) diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 2ab1c3e..fe30855 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c @@ -746,7 +746,7 @@ static void dss_runtime_put(void) } /* DEBUGFS */ -#if defined(CONFIG_DEBUG_FS) defined(CONFIG_OMAP2_DSS_DEBUG_SUPPORT) +#if defined(CONFIG_DEBUG_FS) defined(CONFIG_OMAP2_DSS_DEBUGFS) void dss_debug_dump_clocks(struct seq_file *s) { dss_dump_clocks(s); diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index ffbba7e..a8a1ab4 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -301,7 +301,7 @@ enum dss_hdmi_venc_clk_source_select dss_get_hdmi_venc_clk_source(void); const char *dss_get_generic_clk_source_name(enum omap_dss_clk_source clk_src); void dss_dump_clocks(struct seq_file *s); -#if defined(CONFIG_DEBUG_FS) defined(CONFIG_OMAP2_DSS_DEBUG_SUPPORT) +#if defined(CONFIG_DEBUG_FS) defined(CONFIG_OMAP2_DSS_DEBUGFS) void dss_debug_dump_clocks(struct seq_file *s); #endif -- 1.7.10 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More
[PATCH V4 3/5] OMAPDSS: Cleanup DSSDBG with dynamic pr_debug function
The printk in DSSDBG function definition is replaced with dynamic debug enabled pr_debug(). The use of dynamic debugging provides more flexibility as each debug statement can be enabled or disabled dynamically on basis of source filename, line number, module name etc., by writing to a control file in debugfs filesystem. For better understanding please refer to Documentation/dynamic-debug-howto.txt. The DSSDBGF() differs from DSSDBG() by providing function name. However, function name, line number, module name and thread ID can be printed through dynamic debug by setting appropriate flags 'f','l','m' and 't' in the debugfs control file. So, DSSDBGF instances are replaced with DSSDBG. Signed-off-by: Chandrabhanu Mahapatra cmahapa...@ti.com --- drivers/video/omap2/dss/apply.c |8 drivers/video/omap2/dss/dsi.c | 12 ++-- drivers/video/omap2/dss/dss.h | 34 -- 3 files changed, 18 insertions(+), 36 deletions(-) diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index 19d66f4..e923d9f 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c @@ -573,7 +573,7 @@ static void dss_ovl_write_regs(struct omap_overlay *ovl) struct mgr_priv_data *mp; int r; - DSSDBGF(%d, ovl-id); + DSSDBG(writing ovl %d regs, ovl-id); if (!op-enabled || !op-info_dirty) return; @@ -608,7 +608,7 @@ static void dss_ovl_write_regs_extra(struct omap_overlay *ovl) struct ovl_priv_data *op = get_ovl_priv(ovl); struct mgr_priv_data *mp; - DSSDBGF(%d, ovl-id); + DSSDBG(writing ovl %d regs extra, ovl-id); if (!op-extra_info_dirty) return; @@ -632,7 +632,7 @@ static void dss_mgr_write_regs(struct omap_overlay_manager *mgr) struct mgr_priv_data *mp = get_mgr_priv(mgr); struct omap_overlay *ovl; - DSSDBGF(%d, mgr-id); + DSSDBG(writing mgr %d regs, mgr-id); if (!mp-enabled) return; @@ -658,7 +658,7 @@ static void dss_mgr_write_regs_extra(struct omap_overlay_manager *mgr) { struct mgr_priv_data *mp = get_mgr_priv(mgr); - DSSDBGF(%d, mgr-id); + DSSDBG(writing mgr %d regs extra, mgr-id); if (!mp-extra_info_dirty) return; diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index e37e6d8..b0345f3 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -1612,7 +1612,7 @@ int dsi_pll_set_clock_div(struct platform_device *dsidev, u8 regn_start, regn_end, regm_start, regm_end; u8 regm_dispc_start, regm_dispc_end, regm_dsi_start, regm_dsi_end; - DSSDBGF(); + DSSDBG(DSI PLL clock config starts); dsi-current_cinfo.clkin = cinfo-clkin; dsi-current_cinfo.fint = cinfo-fint; @@ -2431,7 +2431,7 @@ static int dsi_cio_init(struct platform_device *dsidev) int r; u32 l; - DSSDBGF(); + DSSDBG(DSI CIO init starts); r = dss_dsi_enable_pads(dsi-module_id, dsi_get_lane_mask(dsidev)); if (r) @@ -2782,7 +2782,7 @@ static void dsi_vc_initial_config(struct platform_device *dsidev, int channel) { u32 r; - DSSDBGF(%d, channel); + DSSDBG(Initial config of virtual channel %d, channel); r = dsi_read_reg(dsidev, DSI_VC_CTRL(channel)); @@ -2814,7 +2814,7 @@ static int dsi_vc_config_source(struct platform_device *dsidev, int channel, if (dsi-vc[channel].source == source) return 0; - DSSDBGF(%d, channel); + DSSDBG(Source config of virtual channel %d, channel); dsi_sync_vc(dsidev, channel); @@ -3572,7 +3572,7 @@ static int dsi_enter_ulps(struct platform_device *dsidev) int r, i; unsigned mask; - DSSDBGF(); + DSSDBG(Entering ULPS); WARN_ON(!dsi_bus_is_locked(dsidev)); @@ -4276,7 +4276,7 @@ int omapdss_dsi_set_clocks(struct omap_dss_device *dssdev, unsigned long pck; int r; - DSSDBGF(ddr_clk %lu, lp_clk %lu, ddr_clk, lp_clk); + DSSDBG(Setting DSI clocks: ddr_clk %lu, lp_clk %lu, ddr_clk, lp_clk); mutex_lock(dsi-lock); diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index a8a1ab4..8bef7ee 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -25,38 +25,20 @@ #ifdef DEBUG extern bool dss_debug; -#ifdef DSS_SUBSYS_NAME -#define DSSDBG(format, ...) \ - if (dss_debug) \ - printk(KERN_DEBUG omapdss DSS_SUBSYS_NAME : format, \ - ## __VA_ARGS__) -#else -#define DSSDBG(format, ...) \ - if (dss_debug) \ - printk(KERN_DEBUG omapdss: format, ## __VA_ARGS__) #endif -#ifdef DSS_SUBSYS_NAME -#define DSSDBGF(format, ...) \ - if (dss_debug) \ - printk(KERN_DEBUG omapdss DSS_SUBSYS_NAME \ - : %s(
[PATCH V4 4/5] OMAPDSS: Replace multi part debug prints with pr_debug
The omap_dispc_unregister_isr() and _dsi_print_reset_status() consist of a number of debug prints which need to be enabled all at once or none at all. So, these debug prints in corresponding functions are replaced with one dynamic debug enabled pr_debug() each. Signed-off-by: Chandrabhanu Mahapatra cmahapa...@ti.com --- drivers/video/omap2/dss/dispc.c | 32 +--- drivers/video/omap2/dss/dsi.c | 30 ++ 2 files changed, 27 insertions(+), 35 deletions(-) diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index a173a94..67d9f3b 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -3675,26 +3675,20 @@ static void print_irq_status(u32 status) if ((status dispc.irq_error_mask) == 0) return; - printk(KERN_DEBUG DISPC IRQ: 0x%x: , status); - -#define PIS(x) \ - if (status DISPC_IRQ_##x) \ - printk(#x ); - PIS(GFX_FIFO_UNDERFLOW); - PIS(OCP_ERR); - PIS(VID1_FIFO_UNDERFLOW); - PIS(VID2_FIFO_UNDERFLOW); - if (dss_feat_get_num_ovls() 3) - PIS(VID3_FIFO_UNDERFLOW); - PIS(SYNC_LOST); - PIS(SYNC_LOST_DIGIT); - if (dss_has_feature(FEAT_MGR_LCD2)) - PIS(SYNC_LOST2); - if (dss_has_feature(FEAT_MGR_LCD3)) - PIS(SYNC_LOST3); +#define PIS(x) (status DISPC_IRQ_##x) ? (#x ) : + + pr_debug(DISPC IRQ: 0x%x: %s%s%s%s%s%s%s%s%s\n, + status, + PIS(OCP_ERR), + PIS(GFX_FIFO_UNDERFLOW), + PIS(VID1_FIFO_UNDERFLOW), + PIS(VID2_FIFO_UNDERFLOW), + dss_feat_get_num_ovls() 3 ? PIS(VID3_FIFO_UNDERFLOW) : , + PIS(SYNC_LOST), + PIS(SYNC_LOST_DIGIT), + dss_has_feature(FEAT_MGR_LCD2) ? PIS(SYNC_LOST2) : , + dss_has_feature(FEAT_MGR_LCD3) ? PIS(SYNC_LOST3) : ); #undef PIS - - printk(\n); } #endif diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index b0345f3..6dd073a 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -1121,14 +1121,6 @@ static void _dsi_print_reset_status(struct platform_device *dsidev) * I/O. */ l = dsi_read_reg(dsidev, DSI_DSIPHY_CFG5); - printk(KERN_DEBUG DSI resets: ); - - l = dsi_read_reg(dsidev, DSI_PLL_STATUS); - printk(PLL (%d) , FLD_GET(l, 0, 0)); - - l = dsi_read_reg(dsidev, DSI_COMPLEXIO_CFG1); - printk(CIO (%d) , FLD_GET(l, 29, 29)); - if (dss_has_feature(FEAT_DSI_REVERSE_TXCLKESC)) { b0 = 28; b1 = 27; @@ -1139,14 +1131,20 @@ static void _dsi_print_reset_status(struct platform_device *dsidev) b2 = 26; } - l = dsi_read_reg(dsidev, DSI_DSIPHY_CFG5); - printk(PHY (%x%x%x, %d, %d, %d)\n, - FLD_GET(l, b0, b0), - FLD_GET(l, b1, b1), - FLD_GET(l, b2, b2), - FLD_GET(l, 29, 29), - FLD_GET(l, 30, 30), - FLD_GET(l, 31, 31)); +#define DSI_FLD_GET(fld, start, end)\ + FLD_GET(dsi_read_reg(dsidev, DSI_##fld), start, end) + + pr_debug(DSI resets: PLL (%d) CIO (%d) PHY (%x%x%x, %d, %d, %d)\n, + DSI_FLD_GET(PLL_STATUS, 0, 0), + DSI_FLD_GET(COMPLEXIO_CFG1, 29, 29), + DSI_FLD_GET(DSIPHY_CFG5, b0, b0), + DSI_FLD_GET(DSIPHY_CFG5, b1, b1), + DSI_FLD_GET(DSIPHY_CFG5, b2, b2), + DSI_FLD_GET(DSIPHY_CFG5, 29, 29), + DSI_FLD_GET(DSIPHY_CFG5, 30, 30), + DSI_FLD_GET(DSIPHY_CFG5, 31, 31)); + +#undef DSI_FLD_GET } #else #define _dsi_print_reset_status(x) -- 1.7.10 -- 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 V4 5/5] OMAPDSS: Remove dss_debug variable
All the debug prints have been replaced with pr_debug(). Thus, the dependency on dss_debug variable is replaced with dyndbg in dynamic debugging mode and DEBUG flag otherwise. So, the dss_debug variable is removed along with checks for DEBUG flag. Signed-off-by: Chandrabhanu Mahapatra cmahapa...@ti.com --- drivers/video/omap2/dss/core.c |5 - drivers/video/omap2/dss/dispc.c |8 ++-- drivers/video/omap2/dss/dsi.c |7 --- drivers/video/omap2/dss/dss.h |4 4 files changed, 2 insertions(+), 22 deletions(-) diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index 1e1f50f..9abcf43 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c @@ -53,11 +53,6 @@ static char *def_disp_name; module_param_named(def_disp, def_disp_name, charp, 0); MODULE_PARM_DESC(def_disp, default display name); -#ifdef DEBUG -bool dss_debug; -module_param_named(debug, dss_debug, bool, 0644); -#endif - const char *dss_get_default_display_name(void) { return core.default_display_name; diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index 67d9f3b..b5204b4 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -3669,7 +3669,6 @@ int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask) } EXPORT_SYMBOL(omap_dispc_unregister_isr); -#ifdef DEBUG static void print_irq_status(u32 status) { if ((status dispc.irq_error_mask) == 0) @@ -3690,7 +3689,6 @@ static void print_irq_status(u32 status) dss_has_feature(FEAT_MGR_LCD3) ? PIS(SYNC_LOST3) : ); #undef PIS } -#endif /* Called from dss.c. Note that we don't touch clocks here, * but we presume they are on because we got an IRQ. However, @@ -3723,10 +3721,8 @@ static irqreturn_t omap_dispc_irq_handler(int irq, void *arg) spin_unlock(dispc.irq_stats_lock); #endif -#ifdef DEBUG - if (dss_debug) - print_irq_status(irqstatus); -#endif + print_irq_status(irqstatus); + /* Ack the interrupt. Do it here before clocks are possibly turned * off */ dispc_write_reg(DISPC_IRQSTATUS, irqstatus); diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 6dd073a..4e41c7e 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -1107,15 +1107,11 @@ static inline void dsi_enable_pll_clock(struct platform_device *dsidev, } } -#ifdef DEBUG static void _dsi_print_reset_status(struct platform_device *dsidev) { u32 l; int b0, b1, b2; - if (!dss_debug) - return; - /* A dummy read using the SCP interface to any DSIPHY register is * required after DSIPHY reset to complete the reset of the DSI complex * I/O. */ @@ -1146,9 +1142,6 @@ static void _dsi_print_reset_status(struct platform_device *dsidev) #undef DSI_FLD_GET } -#else -#define _dsi_print_reset_status(x) -#endif static inline int dsi_if_enable(struct platform_device *dsidev, bool enable) { diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index 8bef7ee..739cfeb 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -23,10 +23,6 @@ #ifndef __OMAP2_DSS_H #define __OMAP2_DSS_H -#ifdef DEBUG -extern bool dss_debug; -#endif - #ifdef pr_fmt #undef pr_fmt #endif -- 1.7.10 -- 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/5] OMAPDSS: Create new debug config options
Hi Chandrabhanu, On Saturday 29 September 2012 04:19 PM, Chandrabhanu Mahapatra wrote: The config option CONFIG_OMAP2_DSS_DEBUG_SUPPORT has been removed and replaced with CONFIG_OMAP2_DSS_DEBUG and CONFIG_OMAP2_DSS_DEBUGFS. CONFIG_OMAP2_DSS_DEBUG enables DEBUG flag and CONFIG_OMAP2_DSS_DEBUGFS enables creation of debugfs for OMAPDSS. Both the config options are disabled by default and can be enabled independently of one another as per convenience. Signed-off-by: Chandrabhanu Mahapatra cmahapa...@ti.com --- drivers/video/omap2/dss/Kconfig | 21 +++-- drivers/video/omap2/dss/Makefile |2 +- drivers/video/omap2/dss/core.c |6 +++--- drivers/video/omap2/dss/dss.c|2 +- drivers/video/omap2/dss/dss.h|2 +- 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/drivers/video/omap2/dss/Kconfig b/drivers/video/omap2/dss/Kconfig index 80f5390..866a563 100644 --- a/drivers/video/omap2/dss/Kconfig +++ b/drivers/video/omap2/dss/Kconfig @@ -18,16 +18,25 @@ config OMAP2_VRAM_SIZE You can also set this with vram=bytes kernel argument, or in the board file. -config OMAP2_DSS_DEBUG_SUPPORT -bool Debug support - default y +config OMAP2_DSS_DEBUG + bool Debug support + default n + help + This enables printing of debug messages. Alternatively, debug messages + can also be enabled by setting CONFIG_DYNAMIC_DEBUG and then setting + appropriate flags in debugfs/dynamic_debug/control. + +config OMAP2_DSS_DEBUGFS + bool Debugfs filesystem support + default n You can make it as 'depends on CONFIG_DEBUG_FS', so that your check below [1] becomes cleaner. help - This enables debug messages. You need to enable printing - with 'debug' module parameter. + This enables debugfs for OMAPDSS at debugfs/omapdss. This enables + querying about clock configuration and register configuration of dss, + dispc, dsi, hdmi and rfbi. config OMAP2_DSS_COLLECT_IRQ_STATS bool Collect DSS IRQ statistics - depends on OMAP2_DSS_DEBUG_SUPPORT + depends on OMAP2_DSS_DEBUGFS default n help Collect DSS IRQ statistics, printable via debugfs. diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile index 86493e3..4070191 100644 --- a/drivers/video/omap2/dss/Makefile +++ b/drivers/video/omap2/dss/Makefile @@ -8,4 +8,4 @@ omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o omapdss-$(CONFIG_OMAP2_DSS_DSI) += dsi.o omapdss-$(CONFIG_OMAP4_DSS_HDMI) += hdmi.o \ hdmi_panel.o ti_hdmi_4xxx_ip.o -ccflags-$(CONFIG_OMAP2_DSS_DEBUG_SUPPORT) += -DDEBUG +ccflags-$(CONFIG_OMAP2_DSS_DEBUG) += -DDEBUG diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index b2af72d..1e1f50f 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c @@ -138,7 +138,7 @@ int dss_set_min_bus_tput(struct device *dev, unsigned long tput) return 0; } -#if defined(CONFIG_DEBUG_FS) defined(CONFIG_OMAP2_DSS_DEBUG_SUPPORT) +#if defined(CONFIG_DEBUG_FS) defined(CONFIG_OMAP2_DSS_DEBUGFS) [1]: here. static int dss_debug_show(struct seq_file *s, void *unused) { void (*func)(struct seq_file *) = s-private; @@ -193,7 +193,7 @@ int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) return 0; } -#else /* CONFIG_DEBUG_FS CONFIG_OMAP2_DSS_DEBUG_SUPPORT */ +#else /* CONFIG_DEBUG_FS CONFIG_OMAP2_DSS_DEBUGFS */ static inline int dss_initialize_debugfs(void) { return 0; @@ -205,7 +205,7 @@ int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) { return 0; } -#endif /* CONFIG_DEBUG_FS CONFIG_OMAP2_DSS_DEBUG_SUPPORT */ +#endif /* CONFIG_DEBUG_FS CONFIG_OMAP2_DSS_DEBUGFS */ /* PLATFORM DEVICE */ static int omap_dss_pm_notif(struct notifier_block *b, unsigned long v, void *d) diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 2ab1c3e..fe30855 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c @@ -746,7 +746,7 @@ static void dss_runtime_put(void) } /* DEBUGFS */ -#if defined(CONFIG_DEBUG_FS) defined(CONFIG_OMAP2_DSS_DEBUG_SUPPORT) +#if defined(CONFIG_DEBUG_FS) defined(CONFIG_OMAP2_DSS_DEBUGFS) void dss_debug_dump_clocks(struct seq_file *s) { dss_dump_clocks(s); diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index ffbba7e..a8a1ab4 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -301,7 +301,7 @@ enum dss_hdmi_venc_clk_source_select dss_get_hdmi_venc_clk_source(void); const char *dss_get_generic_clk_source_name(enum omap_dss_clk_source clk_src); void dss_dump_clocks(struct seq_file *s); -#if defined(CONFIG_DEBUG_FS) defined(CONFIG_OMAP2_DSS_DEBUG_SUPPORT) +#if defined(CONFIG_DEBUG_FS)
Re: [PATCH 2/4] ARM: OMAP: DMA: Move plat/dma hearder to platform_data/dma-omap
* Jon Hunter jon-hun...@ti.com [120928 12:36]: On 09/28/2012 10:54 AM, Russell King - ARM Linux wrote: On Fri, Sep 28, 2012 at 08:05:38AM -0700, Tony Lindgren wrote: * Shilimkar, Santosh santosh.shilim...@ti.com [120928 08:02]: On Fri, Sep 28, 2012 at 8:25 PM, Tony Lindgren t...@atomide.com wrote: * Lokesh Vutla lokeshvu...@ti.com [120928 06:41]: Move plat/dma.h header to platform_data/dma-omap.h as part of the single zImage work. Hmm there's no platform data in this header, just exported things for drivers to use. So it should not be placed into platform_data. Maybe it should be #include asm/mach/dma-omap.h for now? I wasn't sure either when the file was placed under platform-data. I agree for now we can keep it mach layer but than means OMAP1 and OMAP2+ DMA header and source code needs to be split. That is not so straight forward. No need for that, the path I'm suggesting is located under arch/arm/include/asm/mach, it's not same as include mach/dma-omap.h. With DMA engine conversion hopefully, we might get rid of the header eventually, but for now not sure whether we should go ahead and follow the splitting part. Thoughts ? No need for splitting anything :) The other possible location would be just include linux/dma-omap.h, but as we all know that will be going away, asm/mach/dma-omap.h is probably better. No, not asm/mach/anything, please. Let's try to get headers into the right place second time around. This header appears to contain: 1. definitions for DMA signals, used by drivers. This can be eliminated by using DT, platform data, or IORESOURCE_DMA (that's in preference order) which then means that these definitions can live in a header file in arch/arm/mach-omap*/ if at all. 2. data definitions and structures used by drivers using the legacy OMAP DMA API. So, it doesn't contain platform data (as said above). It's not an API definition between core ARM code and ARM platform code, so that rules out arch/arm/include/asm/mach. Obviously arch/arm/include/asm is out of the question too. I don't think we have a clear cut place for this to live - and lets be clear that this file will eventually be going away _anyway_ when OMAP is converted 100% to DMA engine. So, where to put the file? At the moment, I don't know, it doesn't seem to have an obvious home other than where it currently is, which then gets in the way of the single kernel work. I am having the same problem with the OMAP dmtimer platform driver that the legacy DMA driver has. It is slightly worse as currently it is pure custom platform driver. Obviously long-term it would be best to create a generic timer driver in drivers/timer/ that other devices and architectures could use but we are a long way from that. I know that this is ugly and has probably already been shot-down, but as a short-term fix, has creating arch/arm/plat-omap/include/plat-omap been NAK'ed for such problematic drivers? Sounds like that's the way to go then. What we did not want to do is just move all the files blindly there, but for these files that seems like the way to go until they are just regular device drivers. 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 v2 0/7] uio_pruss cleanup and platform support
cc Omar Hi Matt On Fri, 28 Sep 2012, Matt Porter wrote: The AM33xx support requires some help in hwmod due to the following comment in arch/arm/mach-omap2/omap_hwmod.c: /* * If an IP block contains HW reset lines and any of them are * asserted, we let integration code associated with that * block handle the enable. We've received very little * information on what those driver authors need, and until * detailed information is provided and the driver code is * posted to the public lists, this is probably the best we * can do. */ The approach to deal with the hardware reset (for at least the pruss hwmod) was to add a generic omap property to properly define this hardware. The implementation simply deasserts any rst lines that are called out in the property when the omap_device is instantiated. This is not the ideal implementation as the sequence is a bit wrong for pruss since the busy check during the hard reset will fail, even though it fails in a benign manner. Ideally, we would want the implementation to observe the ti,deassert-hard-reset property and use that in omap_hwmod.c:_enable() *after* the module is unidled and the clocks active. However, this is actually functional for purposes of getting the uio_pruss driver up and running. Could you please sync with Omar on the hard reset handling? He posted some patches that change the hard reset code. Perhaps you can align on an approach with him? A few general comments: if some new per-IP block flag is needed to control this, the best place for it right now would be the hwmod data in arch/arm/mach-omap2/omap_hwmod_*_data.c, rather than DT. At some point soon, the hard reset handling will be split between a PRM driver and some hwmod bus driver, and it seems best to deal with the DT binding question at that time. That way we don't wind up with a legacy binding that has to be supported over the long term. - 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 3/4] ARM: OMAP: Move omap_reserve() locally to mach-omap1/2
On Fri, Sep 28, 2012 at 07:10:08PM +0530, Lokesh Vutla wrote: omap_reserve() is a stub for omap1. So creating a stub locally in mach-omap1. And moving the definition to mach-omap2. This helps in moving plat/omap_secure.h local to mach-omap2 Signed-off-by: Lokesh Vutla lokeshvu...@ti.com Acked-by : Santosh Shilimkar santosh.shilim...@ti.com --- arch/arm/mach-omap1/common.h |3 +++ arch/arm/mach-omap2/common.c | 20 arch/arm/mach-omap2/common.h |1 + arch/arm/plat-omap/common.c | 17 - arch/arm/plat-omap/include/plat/common.h |1 - 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h index c2552b2..f7b01f1 100644 --- a/arch/arm/mach-omap1/common.h +++ b/arch/arm/mach-omap1/common.h @@ -90,4 +90,7 @@ extern int ocpi_enable(void); static inline int ocpi_enable(void) { return 0; } #endif +static inline void omap_reserve(void) +{ } This is the wrong approach. If OMAP1 doesn't need to do any reservation, then OMAP1 platforms should not be calling omap_reserve() and OMAP1 should not have this defined. Just because OMAP2 does something one way does not mean OMAP1 needs to copy it in every detail. -- 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: [GIT PULL 1/3] omap clock late patches for v3.7 merge window
On Mon, Sep 24, 2012 at 02:25:51PM -0700, Tony Lindgren wrote: The following changes since commit 1e2ee2a60df5c3ab74dd1c9155fb01b5bc6f807d: Merge tag 'omap-devel-am33xx-for-v3.7' into test_v3.6-rc6_ocb3.7_cff3.7_odaf3.7 (2012-09-23 17:16:04 -0600) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-devel-late-for-v3.7 Merged as late/soc (omap/devel-late) due to the heavy dependencies on other branches. I hope we can get it in after the rest goes in. -Olof -- 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: [GIT PULL 3/3] omap arch timer late changes for v3.7 merge window
On Mon, Sep 24, 2012 at 02:25:52PM -0700, Tony Lindgren wrote: The following changes since commit 3fe05bd9980df7207a35b4841a94dc2875e86960: Merge tag 'v3.6-rc6' into devel-dt (2012-09-24 11:42:13 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/devel-dt-arch-timer-for-v3.7 for you to fetch changes up to ef8fe6fee16f178cd80cf11b21565bca95b80182: Merge branch 'devel-dt-arch-timer' into devel-dt (2012-09-24 11:42:24 -0700) Merged on top of previous omap/dt (next/dt). -Olof -- 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: [GIT PULL 2/3] omap platform and board related late patches for v3.7 merge window
On Mon, Sep 24, 2012 at 08:31:36PM -0700, Tony Lindgren wrote: * Tony Lindgren t...@atomide.com [120924 17:41]: * Tony Lindgren t...@atomide.com [120924 14:30]: The following changes since commit 0e70156de4c8465bfb8cb45cdc1bbc2fa474ce14: ARM: OMAP2+: Make omap4-keypad.h local (2012-09-20 15:04:04 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-devel-board-late-v2-for-v3.7 for you to fetch changes up to ead53717d9ab28c942b9adf66f8c02442dbfbc8a: arm: make FORCE_MAX_ZONEORDER configurable for TI AM33XX (2012-09-24 10:32:39 -0700) These board and platform related patches have been posted quite a while ago but have somehow fallen though the cracks as most of the focus has been making things to work with device tree. As the first patch depends on sparse IRQ related removal of irqs.h and related header moves, these are based on omap-cleanup-local-headers-for-v3.7 tag. Let's scrap this pull request, Russell noted that Yegor's patch breaks sa. Here's the updated pull request with just the top patch dropped. Tony The following changes since commit 0e70156de4c8465bfb8cb45cdc1bbc2fa474ce14: ARM: OMAP2+: Make omap4-keypad.h local (2012-09-20 15:04:04 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-devel-board-late-v3-for-v3.7 Thanks, pulled this on top of the previous cleanup-headers. In the future, feel free to remove the tag that you don't want me to pull from the repo so I don't accidentally pull it anyway. -Olof -- 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