Hi Tomi, do you see the same error as I do:
arch/arm/mach-omap2/display.c: In function 'omap5_dsi_mux_pads': arch/arm/mach-omap2/display.c:161:2: error: implicit declaration of function 'omap4_ctrl_pad_readl' [-Werror=implicit-function-declaration] arch/arm/mach-omap2/display.c:164:2: error: implicit declaration of function 'omap4_ctrl_pad_writel' [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors
hns$ git blame arch/arm/mach-omap2/display.c … ddac6605 (Tomi Valkeinen 2014-03-07 12:45:14 +0200 159) enable_mask = 0x1f << enable_shift; ddac6605 (Tomi Valkeinen 2014-03-07 12:45:14 +0200 160) ddac6605 (Tomi Valkeinen 2014-03-07 12:45:14 +0200 161) reg = omap4_ctrl_pad_readl(OMAP5_CONTROL_DSIPHY); ddac6605 (Tomi Valkeinen 2014-03-07 12:45:14 +0200 162) reg &= ~enable_mask; ddac6605 (Tomi Valkeinen 2014-03-07 12:45:14 +0200 163) reg |= (lanes << enable_shift) & enable_mask; ddac6605 (Tomi Valkeinen 2014-03-07 12:45:14 +0200 164) omap4_ctrl_pad_writel(reg, OMAP5_CONTROL_DSIPHY); ddac6605 (Tomi Valkeinen 2014-03-07 12:45:14 +0200 165) ddac6605 (Tomi Valkeinen 2014-03-07 12:45:14 +0200 166) return 0; …
iMac:master hns$ fgrep omap4_ctrl_pad_readl -R * System.map:c0022e18 T omap4_ctrl_pad_readl Binary file arch/arm/mach-omap2/built-in.o matches arch/arm/mach-omap2/control.h:#define omap4_ctrl_pad_readl(x) 0 arch/arm/mach-omap2/display.c: reg = omap4_ctrl_pad_readl(OMAP5_CONTROL_DSIPHY);
iMac:master hns$ git blame arch/arm/mach-omap2/control.h … 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 443) #ifndef __ASSEMBLY__ 140455fa0 arch/arm/plat-omap/include/plat/control.h (Tony Lindgren 2010-02-12 12:26:48 -0800 444) #ifdef CONFIG_ARCH_OMAP2PLUS 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 445) extern u8 omap_ctrl_readb(u16 offset); 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 446) extern u16 omap_ctrl_readw(u16 offset); 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 447) extern u32 omap_ctrl_readl(u16 offset); 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 448) extern void omap_ctrl_writeb(u8 val, u16 offset); 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 449) extern void omap_ctrl_writew(u16 val, u16 offset); 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 450) extern void omap_ctrl_writel(u32 val, u16 offset); 801407868 arch/arm/plat-omap/include/plat/control.h (Rajendra Nayak 2008-09-26 17:48:46 +0530 451) 801407868 arch/arm/plat-omap/include/plat/control.h (Rajendra Nayak 2008-09-26 17:48:46 +0530 452) extern void omap3_save_scratchpad_contents(void); 801407868 arch/arm/plat-omap/include/plat/control.h (Rajendra Nayak 2008-09-26 17:48:46 +0530 453) extern void omap3_clear_scratchpad_contents(void); 14c79bbed arch/arm/mach-omap2/control.h (Kevin Hilman 2011-06-23 17:16:14 -0700 454) extern void omap3_restore(void); 14c79bbed arch/arm/mach-omap2/control.h (Kevin Hilman 2011-06-23 17:16:14 -0700 455) extern void omap3_restore_es3(void); 14c79bbed arch/arm/mach-omap2/control.h (Kevin Hilman 2011-06-23 17:16:14 -0700 456) extern void omap3_restore_3630(void); 801407868 arch/arm/plat-omap/include/plat/control.h (Rajendra Nayak 2008-09-26 17:48:46 +0530 457) extern u32 omap3_arm_context[128]; c96631e13 arch/arm/plat-omap/include/plat/control.h (Rajendra Nayak 2008-09-26 17:49:02 +0530 458) extern void omap3_control_save_context(void); c96631e13 arch/arm/plat-omap/include/plat/control.h (Rajendra Nayak 2008-09-26 17:49:02 +0530 459) extern void omap3_control_restore_context(void); 166353bd7 arch/arm/mach-omap2/control.h (Paul Walmsley 2010-12-21 20:01:21 -0700 460) extern void omap3_ctrl_write_boot_mode(u8 bootmode); 90f1380ef arch/arm/mach-omap2/control.h (Omar Ramirez Luna 2012-06-18 16:18:09 -0600 461) extern void omap_ctrl_write_dsp_boot_addr(u32 bootaddr); 90f1380ef arch/arm/mach-omap2/control.h (Omar Ramirez Luna 2012-06-18 16:18:09 -0600 462) extern void omap_ctrl_write_dsp_boot_mode(u8 bootmode); 458e999eb arch/arm/mach-omap2/control.h (Nishanth Menon 2010-12-20 14:05:06 -0600 463) extern void omap3630_ctrl_disable_rta(void); 596efe479 arch/arm/mach-omap2/control.h (Paul Walmsley 2010-12-21 21:05:16 -0700 464) extern int omap3_ctrl_save_padconf(void); ba12c2428 arch/arm/mach-omap2/control.h (Tero Kristo 2014-03-04 17:43:04 +0200 465) void omap3_ctrl_init(void); 2208bf115 arch/arm/mach-omap2/control.h (Tero Kristo 2014-11-13 19:17:34 +0200 466) int omap2_control_base_init(void); fe87414f7 arch/arm/mach-omap2/control.h (Tero Kristo 2014-03-12 18:33:45 +0200 467) int omap_control_init(void); efde23467 arch/arm/mach-omap2/control.h (Tero Kristo 2015-02-20 10:08:52 +0200 468) void omap2_set_globals_control(void __iomem *ctrl); 2208bf115 arch/arm/mach-omap2/control.h (Tero Kristo 2014-11-13 19:17:34 +0200 469) void __init omap3_control_legacy_iomap_init(void); 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 470) #else 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 471) #define omap_ctrl_readb(x) 0 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 472) #define omap_ctrl_readw(x) 0 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 473) #define omap_ctrl_readl(x) 0 70ba71a25 arch/arm/plat-omap/include/plat/control.h (Santosh Shilimkar 2010-09-27 14:02:57 -0600 474) #define omap4_ctrl_pad_readl(x) 0 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 475) #define omap_ctrl_writeb(x, y) WARN_ON(1) 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 476) #define omap_ctrl_writew(x, y) WARN_ON(1) 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 477) #define omap_ctrl_writel(x, y) WARN_ON(1) 70ba71a25 arch/arm/plat-omap/include/plat/control.h (Santosh Shilimkar 2010-09-27 14:02:57 -0600 478) #define omap4_ctrl_pad_writel(x, y) WARN_ON(1) 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 479) #endif 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 480) #endif /* __ASSEMBLY__ */ 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 481) 4814ced51 arch/arm/mach-omap2/control.h (Paul Walmsley 2010-10-08 11:40:20 -0600 482) #endif /* __ARCH_ARM_MACH_OMAP2_CONTROL_H */
So it does not exist if CONFIG_ARCH_OMAP2PLUS
How can I fix it?
BR, Nikolaus
Am 30.04.2015 um 17:27 schrieb Dr. H. Nikolaus Schaller hns@goldelico.com:
Hi Tomi, do you see the same error as I do:
arch/arm/mach-omap2/display.c: In function 'omap5_dsi_mux_pads': arch/arm/mach-omap2/display.c:161:2: error: implicit declaration of function 'omap4_ctrl_pad_readl' [-Werror=implicit-function-declaration] arch/arm/mach-omap2/display.c:164:2: error: implicit declaration of function 'omap4_ctrl_pad_writel' [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors
hns$ git blame arch/arm/mach-omap2/display.c … ddac6605 (Tomi Valkeinen 2014-03-07 12:45:14 +0200 159) enable_mask = 0x1f << enable_shift; ddac6605 (Tomi Valkeinen 2014-03-07 12:45:14 +0200 160) ddac6605 (Tomi Valkeinen 2014-03-07 12:45:14 +0200 161) reg = omap4_ctrl_pad_readl(OMAP5_CONTROL_DSIPHY); ddac6605 (Tomi Valkeinen 2014-03-07 12:45:14 +0200 162) reg &= ~enable_mask; ddac6605 (Tomi Valkeinen 2014-03-07 12:45:14 +0200 163) reg |= (lanes << enable_shift) & enable_mask; ddac6605 (Tomi Valkeinen 2014-03-07 12:45:14 +0200 164) omap4_ctrl_pad_writel(reg, OMAP5_CONTROL_DSIPHY); ddac6605 (Tomi Valkeinen 2014-03-07 12:45:14 +0200 165) ddac6605 (Tomi Valkeinen 2014-03-07 12:45:14 +0200 166) return 0; …
iMac:master hns$ fgrep omap4_ctrl_pad_readl -R * System.map:c0022e18 T omap4_ctrl_pad_readl Binary file arch/arm/mach-omap2/built-in.o matches arch/arm/mach-omap2/control.h:#define omap4_ctrl_pad_readl(x) 0 arch/arm/mach-omap2/display.c: reg = omap4_ctrl_pad_readl(OMAP5_CONTROL_DSIPHY);
iMac:master hns$ git blame arch/arm/mach-omap2/control.h … 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 443) #ifndef __ASSEMBLY__ 140455fa0 arch/arm/plat-omap/include/plat/control.h (Tony Lindgren 2010-02-12 12:26:48 -0800 444) #ifdef CONFIG_ARCH_OMAP2PLUS 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 445) extern u8 omap_ctrl_readb(u16 offset); 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 446) extern u16 omap_ctrl_readw(u16 offset); 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 447) extern u32 omap_ctrl_readl(u16 offset); 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 448) extern void omap_ctrl_writeb(u8 val, u16 offset); 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 449) extern void omap_ctrl_writew(u16 val, u16 offset); 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 450) extern void omap_ctrl_writel(u32 val, u16 offset); 801407868 arch/arm/plat-omap/include/plat/control.h (Rajendra Nayak 2008-09-26 17:48:46 +0530 451) 801407868 arch/arm/plat-omap/include/plat/control.h (Rajendra Nayak 2008-09-26 17:48:46 +0530 452) extern void omap3_save_scratchpad_contents(void); 801407868 arch/arm/plat-omap/include/plat/control.h (Rajendra Nayak 2008-09-26 17:48:46 +0530 453) extern void omap3_clear_scratchpad_contents(void); 14c79bbed arch/arm/mach-omap2/control.h (Kevin Hilman 2011-06-23 17:16:14 -0700 454) extern void omap3_restore(void); 14c79bbed arch/arm/mach-omap2/control.h (Kevin Hilman 2011-06-23 17:16:14 -0700 455) extern void omap3_restore_es3(void); 14c79bbed arch/arm/mach-omap2/control.h (Kevin Hilman 2011-06-23 17:16:14 -0700 456) extern void omap3_restore_3630(void); 801407868 arch/arm/plat-omap/include/plat/control.h (Rajendra Nayak 2008-09-26 17:48:46 +0530 457) extern u32 omap3_arm_context[128]; c96631e13 arch/arm/plat-omap/include/plat/control.h (Rajendra Nayak 2008-09-26 17:49:02 +0530 458) extern void omap3_control_save_context(void); c96631e13 arch/arm/plat-omap/include/plat/control.h (Rajendra Nayak 2008-09-26 17:49:02 +0530 459) extern void omap3_control_restore_context(void); 166353bd7 arch/arm/mach-omap2/control.h (Paul Walmsley 2010-12-21 20:01:21 -0700 460) extern void omap3_ctrl_write_boot_mode(u8 bootmode); 90f1380ef arch/arm/mach-omap2/control.h (Omar Ramirez Luna 2012-06-18 16:18:09 -0600 461) extern void omap_ctrl_write_dsp_boot_addr(u32 bootaddr); 90f1380ef arch/arm/mach-omap2/control.h (Omar Ramirez Luna 2012-06-18 16:18:09 -0600 462) extern void omap_ctrl_write_dsp_boot_mode(u8 bootmode); 458e999eb arch/arm/mach-omap2/control.h (Nishanth Menon 2010-12-20 14:05:06 -0600 463) extern void omap3630_ctrl_disable_rta(void); 596efe479 arch/arm/mach-omap2/control.h (Paul Walmsley 2010-12-21 21:05:16 -0700 464) extern int omap3_ctrl_save_padconf(void); ba12c2428 arch/arm/mach-omap2/control.h (Tero Kristo 2014-03-04 17:43:04 +0200 465) void omap3_ctrl_init(void); 2208bf115 arch/arm/mach-omap2/control.h (Tero Kristo 2014-11-13 19:17:34 +0200 466) int omap2_control_base_init(void); fe87414f7 arch/arm/mach-omap2/control.h (Tero Kristo 2014-03-12 18:33:45 +0200 467) int omap_control_init(void); efde23467 arch/arm/mach-omap2/control.h (Tero Kristo 2015-02-20 10:08:52 +0200 468) void omap2_set_globals_control(void __iomem *ctrl); 2208bf115 arch/arm/mach-omap2/control.h (Tero Kristo 2014-11-13 19:17:34 +0200 469) void __init omap3_control_legacy_iomap_init(void); 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 470) #else 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 471) #define omap_ctrl_readb(x) 0 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 472) #define omap_ctrl_readw(x) 0 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 473) #define omap_ctrl_readl(x) 0 70ba71a25 arch/arm/plat-omap/include/plat/control.h (Santosh Shilimkar 2010-09-27 14:02:57 -0600 474) #define omap4_ctrl_pad_readl(x) 0 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 475) #define omap_ctrl_writeb(x, y) WARN_ON(1) 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 476) #define omap_ctrl_writew(x, y) WARN_ON(1) 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 477) #define omap_ctrl_writel(x, y) WARN_ON(1) 70ba71a25 arch/arm/plat-omap/include/plat/control.h (Santosh Shilimkar 2010-09-27 14:02:57 -0600 478) #define omap4_ctrl_pad_writel(x, y) WARN_ON(1) 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 479) #endif 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 480) #endif /* __ASSEMBLY__ */ 69d88a00a include/asm-arm/arch-omap/control.h (Paul Walmsley 2008-03-18 10:02:50 +0200 481) 4814ced51 arch/arm/mach-omap2/control.h (Paul Walmsley 2010-10-08 11:40:20 -0600 482) #endif /* __ARCH_ARM_MACH_OMAP2_CONTROL_H */
So it does not exist if CONFIG_ARCH_OMAP2PLUS
Here, someone has a patch for a similar issue:
http://www.spinics.net/lists/arm-kernel/msg412011.html
And it looks as if those who have removed the function have not checked if anyone uses it:
http://lxr.free-electrons.com/ident?i=omap4_ctrl_pad_readl
BR, Nikolaus
On 30/04/15 18:27, Dr. H. Nikolaus Schaller wrote:
Hi Tomi, do you see the same error as I do:
arch/arm/mach-omap2/display.c: In function 'omap5_dsi_mux_pads': arch/arm/mach-omap2/display.c:161:2: error: implicit declaration of function 'omap4_ctrl_pad_readl' [-Werror=implicit-function-declaration] arch/arm/mach-omap2/display.c:164:2: error: implicit declaration of function 'omap4_ctrl_pad_writel' [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors
See commit 23d34981c7e36fb609d3eaacf0a52a05d75ae008 which changed the omap4 function. Similar change needs to be done for omap5. I'll update my patches when I find time.
Tomi
Hi Tomi,
Am 04.05.2015 um 08:10 schrieb Tomi Valkeinen tomi.valkeinen@ti.com:
On 30/04/15 18:27, Dr. H. Nikolaus Schaller wrote:
Hi Tomi, do you see the same error as I do:
arch/arm/mach-omap2/display.c: In function 'omap5_dsi_mux_pads': arch/arm/mach-omap2/display.c:161:2: error: implicit declaration of function 'omap4_ctrl_pad_readl' [-Werror=implicit-function-declaration] arch/arm/mach-omap2/display.c:164:2: error: implicit declaration of function 'omap4_ctrl_pad_writel' [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors
See commit 23d34981c7e36fb609d3eaacf0a52a05d75ae008 which changed the omap4 function. Similar change needs to be done for omap5.
Yes, that is what I would expect (without knowing or understanding any details).
I'll update my patches when I find time.
Please! This is IMHO a blocking bug since we can’t even compile kernel.org 4.1-rc1 or -rc2 for OMAP5 to test other functions.
Best regards, NIkolaus
Hi Tomi, before I submit the attached patch, please can you check that my assumption how to convert the register offset is right (I have no experience with OMAP4 and 5 in this area).
BR, Nikolaus
Am 04.05.2015 um 09:10 schrieb Dr. H. Nikolaus Schaller hns@goldelico.com:
Hi Tomi,
Am 04.05.2015 um 08:10 schrieb Tomi Valkeinen tomi.valkeinen@ti.com:
On 30/04/15 18:27, Dr. H. Nikolaus Schaller wrote:
Hi Tomi, do you see the same error as I do:
arch/arm/mach-omap2/display.c: In function 'omap5_dsi_mux_pads': arch/arm/mach-omap2/display.c:161:2: error: implicit declaration of function 'omap4_ctrl_pad_readl' [-Werror=implicit-function-declaration] arch/arm/mach-omap2/display.c:164:2: error: implicit declaration of function 'omap4_ctrl_pad_writel' [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors
See commit 23d34981c7e36fb609d3eaacf0a52a05d75ae008 which changed the omap4 function. Similar change needs to be done for omap5.
Yes, that is what I would expect (without knowing or understanding any details).
I'll update my patches when I find time.
Please! This is IMHO a blocking bug since we can’t even compile kernel.org 4.1-rc1 or -rc2 for OMAP5 to test other functions.
Best regards, NIkolaus
Note that 4.1-rc1 does not have the problem you describe, as the omap5 dsi support is not in the mainline.
I didn't look at omap5, if it has similar dt nodes etc, but how the numbers come for omap4:
The register in question is CONTROL_DSIPHY 0x4A100618.
The previous way was using omap4_ctrl_pad_writel with this define:
#define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY 0x0618
So presumably the control base is set to 0x4A100000.
The new code uses 'omap4_padconf_global' DT node as a base. So finding that from the omap4.dtsi, and looking at the offsets of that and its parent nodes, gives:
0x4a000000 + 0x100000 + 0x5a0
And the new offset in the display.c is:
#define OMAP4_DSIPHY_SYSCON_OFFSET 0x78
Which adds to:
0x4a000000 + 0x100000 + 0x5a0 + 0x78 = 0x4a100618
Tomi
On 10/05/15 15:22, Dr. H. Nikolaus Schaller wrote:
Hi Tomi, before I submit the attached patch, please can you check that my assumption how to convert the register offset is right (I have no experience with OMAP4 and 5 in this area).
BR, Nikolaus
Am 04.05.2015 um 09:10 schrieb Dr. H. Nikolaus Schaller hns@goldelico.com:
Hi Tomi,
Am 04.05.2015 um 08:10 schrieb Tomi Valkeinen tomi.valkeinen@ti.com:
On 30/04/15 18:27, Dr. H. Nikolaus Schaller wrote:
Hi Tomi, do you see the same error as I do:
arch/arm/mach-omap2/display.c: In function 'omap5_dsi_mux_pads': arch/arm/mach-omap2/display.c:161:2: error: implicit declaration of function 'omap4_ctrl_pad_readl' [-Werror=implicit-function-declaration] arch/arm/mach-omap2/display.c:164:2: error: implicit declaration of function 'omap4_ctrl_pad_writel' [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors
See commit 23d34981c7e36fb609d3eaacf0a52a05d75ae008 which changed the omap4 function. Similar change needs to be done for omap5.
Yes, that is what I would expect (without knowing or understanding any details).
I'll update my patches when I find time.
Please! This is IMHO a blocking bug since we can’t even compile kernel.org 4.1-rc1 or -rc2 for OMAP5 to test other functions.
Best regards, NIkolaus
Hi Tomi,
Am 11.05.2015 um 10:13 schrieb Tomi Valkeinen tomi.valkeinen@ti.com:
Note that 4.1-rc1 does not have the problem you describe, as the omap5 dsi support is not in the mainline.
Really? I noticed the compile problem first when merging 4.1-rc1 into our 4.0 working tree. But maybe we already did carry along something influencing the patch sequence.
I didn't look at omap5, if it has similar dt nodes etc, but how the numbers come for omap4:
The register in question is CONTROL_DSIPHY 0x4A100618.
The previous way was using omap4_ctrl_pad_writel with this define:
#define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY 0x0618
So presumably the control base is set to 0x4A100000.
The new code uses 'omap4_padconf_global' DT node as a base. So finding that from the omap4.dtsi, and looking at the offsets of that and its parent nodes, gives:
0x4a000000 + 0x100000 + 0x5a0
And the new offset in the display.c is:
#define OMAP4_DSIPHY_SYSCON_OFFSET 0x78
Which adds to:
0x4a000000 + 0x100000 + 0x5a0 + 0x78 = 0x4a100618
Ok. Looks reasonable.
Do you know which register it is for the OMAP5 and if something is different? Or can we simply assume the same offset?
If not I must dig into the 10k pages PDF of OMAP4&5…
BR, Nikolaus
Tomi
On 10/05/15 15:22, Dr. H. Nikolaus Schaller wrote:
Hi Tomi, before I submit the attached patch, please can you check that my assumption how to convert the register offset is right (I have no experience with OMAP4 and 5 in this area).
BR, Nikolaus
Am 04.05.2015 um 09:10 schrieb Dr. H. Nikolaus Schaller hns@goldelico.com:
Hi Tomi,
Am 04.05.2015 um 08:10 schrieb Tomi Valkeinen tomi.valkeinen@ti.com:
On 30/04/15 18:27, Dr. H. Nikolaus Schaller wrote:
Hi Tomi, do you see the same error as I do:
arch/arm/mach-omap2/display.c: In function 'omap5_dsi_mux_pads': arch/arm/mach-omap2/display.c:161:2: error: implicit declaration of function 'omap4_ctrl_pad_readl' [-Werror=implicit-function-declaration] arch/arm/mach-omap2/display.c:164:2: error: implicit declaration of function 'omap4_ctrl_pad_writel' [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors
See commit 23d34981c7e36fb609d3eaacf0a52a05d75ae008 which changed the omap4 function. Similar change needs to be done for omap5.
Yes, that is what I would expect (without knowing or understanding any details).
I'll update my patches when I find time.
Please! This is IMHO a blocking bug since we can’t even compile kernel.org 4.1-rc1 or -rc2 for OMAP5 to test other functions.
Best regards, NIkolaus
On 11/05/15 11:25, Dr. H. Nikolaus Schaller wrote:
Hi Tomi,
Am 11.05.2015 um 10:13 schrieb Tomi Valkeinen tomi.valkeinen@ti.com:
Note that 4.1-rc1 does not have the problem you describe, as the omap5 dsi support is not in the mainline.
Really? I noticed the compile problem first when merging 4.1-rc1 into our 4.0 working tree. But maybe we already did carry along something influencing the patch sequence.
I didn't look at omap5, if it has similar dt nodes etc, but how the numbers come for omap4:
The register in question is CONTROL_DSIPHY 0x4A100618.
The previous way was using omap4_ctrl_pad_writel with this define:
#define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY 0x0618
So presumably the control base is set to 0x4A100000.
The new code uses 'omap4_padconf_global' DT node as a base. So finding that from the omap4.dtsi, and looking at the offsets of that and its parent nodes, gives:
0x4a000000 + 0x100000 + 0x5a0
And the new offset in the display.c is:
#define OMAP4_DSIPHY_SYSCON_OFFSET 0x78
Which adds to:
0x4a000000 + 0x100000 + 0x5a0 + 0x78 = 0x4a100618
Ok. Looks reasonable.
Do you know which register it is for the OMAP5 and if something is different? Or can we simply assume the same offset?
If not I must dig into the 10k pages PDF of OMAP4&5…
On OMAP5 it's... hold for it... CONTROL_DSIPHY! ;)
The out-of-mainline "ARM: OMAP: add OMAP5 DSI muxing" patch adds the omap5 DSI handling, with the OMAP5 specific offset.
I made a quick patch, attached. Only compile tested, so no idea if it works.
Tomi
Hi,
Am 11.05.2015 um 11:00 schrieb Tomi Valkeinen tomi.valkeinen@ti.com:
On 11/05/15 11:25, Dr. H. Nikolaus Schaller wrote:
Hi Tomi,
Am 11.05.2015 um 10:13 schrieb Tomi Valkeinen tomi.valkeinen@ti.com:
Note that 4.1-rc1 does not have the problem you describe, as the omap5 dsi support is not in the mainline.
Really? I noticed the compile problem first when merging 4.1-rc1 into our 4.0 working tree. But maybe we already did carry along something influencing the patch sequence.
I didn't look at omap5, if it has similar dt nodes etc, but how the numbers come for omap4:
The register in question is CONTROL_DSIPHY 0x4A100618.
The previous way was using omap4_ctrl_pad_writel with this define:
#define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY 0x0618
So presumably the control base is set to 0x4A100000.
The new code uses 'omap4_padconf_global' DT node as a base. So finding that from the omap4.dtsi, and looking at the offsets of that and its parent nodes, gives:
0x4a000000 + 0x100000 + 0x5a0
And the new offset in the display.c is:
#define OMAP4_DSIPHY_SYSCON_OFFSET 0x78
Which adds to:
0x4a000000 + 0x100000 + 0x5a0 + 0x78 = 0x4a100618
Ok. Looks reasonable.
Do you know which register it is for the OMAP5 and if something is different? Or can we simply assume the same offset?
If not I must dig into the 10k pages PDF of OMAP4&5…
On OMAP5 it's... hold for it... CONTROL_DSIPHY! ;)
The out-of-mainline "ARM: OMAP: add OMAP5 DSI muxing" patch adds the omap5 DSI handling, with the OMAP5 specific offset.
I made a quick patch, attached. Only compile tested, so no idea if it works.
Looks even better than my patch. I have merged yours into our 4.1-rc3 and now I can compile for the OMAP5 Pyra.
MIPI-DSI appears to work as well as with 4.0. No obvious differences found.
So I think you can add it to the 4.1 hot fixes.
BR, Nikolaus
Tomi <0001-fix-omap5-dsi-squash.patch>
On 05/14/2015 01:23 PM, Dr. H. Nikolaus Schaller wrote:
I made a quick patch, attached. Only compile tested, so no idea if it works.
Looks even better than my patch. I have merged yours into our 4.1-rc3 and now I can compile for the OMAP5 Pyra.
I've compiled the 4.1-rc3 kernel, and am now running it on my board as well. Everything seems to work this far.
I've also applied that i2c bus recovery patch, no idea if it actually does anything yet, but i'll see if it still gets stuck in that loop.
On 14/05/15 14:23, Dr. H. Nikolaus Schaller wrote:
I made a quick patch, attached. Only compile tested, so no idea if it works.
Looks even better than my patch. I have merged yours into our 4.1-rc3 and now I can compile for the OMAP5 Pyra.
MIPI-DSI appears to work as well as with 4.0. No obvious differences found.
Ok, thanks for testing.
So I think you can add it to the 4.1 hot fixes.
No need. As I said, OMAP5 DSI is not supported in the mainline yet.
Tomi
Hi Tomi,
Am 19.05.2015 um 07:27 schrieb Tomi Valkeinen tomi.valkeinen@ti.com:
On 14/05/15 14:23, Dr. H. Nikolaus Schaller wrote:
I made a quick patch, attached. Only compile tested, so no idea if it works.
Looks even better than my patch. I have merged yours into our 4.1-rc3 and now I can compile for the OMAP5 Pyra.
MIPI-DSI appears to work as well as with 4.0. No obvious differences found.
Ok, thanks for testing.
So I think you can add it to the 4.1 hot fixes.
No need.
Well, we have a need - we can’t compile mainline without this patch… I think mainline must not necessarily work, but should at least compile without errors.
As I said, OMAP5 DSI is not supported in the mainline yet.
Maybe I am confusing something, but isn’t MIPI-DSI supported since 3.14 or so?
BR, Nikolaus
On 19/05/15 08:42, Dr. H. Nikolaus Schaller wrote:
No need.
Well, we have a need - we can’t compile mainline without this patch… I think mainline must not necessarily work, but should at least compile without errors.
Mainline kernel compiles fine. It does not have the code that fails to compile. You only have it in your tree.
As I said, OMAP5 DSI is not supported in the mainline yet.
Maybe I am confusing something, but isn’t MIPI-DSI supported since 3.14 or so?
No, mainline does not have OMAP5 DSI muxing.
Tomi
Hi Tomi,
Am 19.05.2015 um 07:47 schrieb Tomi Valkeinen tomi.valkeinen@ti.com:
On 19/05/15 08:42, Dr. H. Nikolaus Schaller wrote:
No need.
Well, we have a need - we can’t compile mainline without this patch… I think mainline must not necessarily work, but should at least compile without errors.
Mainline kernel compiles fine. It does not have the code that fails to compile. You only have it in your tree.
Hm. Which one? I have checked the diffs but did not find it.
As I said, OMAP5 DSI is not supported in the mainline yet.
Maybe I am confusing something, but isn’t MIPI-DSI supported since 3.14 or so?
No, mainline does not have OMAP5 DSI muxing.
BR, Nikolaus
On 19/05/15 08:56, Dr. H. Nikolaus Schaller wrote:
Hi Tomi,
Am 19.05.2015 um 07:47 schrieb Tomi Valkeinen tomi.valkeinen@ti.com:
On 19/05/15 08:42, Dr. H. Nikolaus Schaller wrote:
No need.
Well, we have a need - we can’t compile mainline without this patch… I think mainline must not necessarily work, but should at least compile without errors.
Mainline kernel compiles fine. It does not have the code that fails to compile. You only have it in your tree.
Hm. Which one? I have checked the diffs but did not find it.
Probably something like "ARM: OMAP: add OMAP5 DSI muxing". That's the patch in my work-in-progress branch that adds the now-broken code that uses omap4_ctrl_pad_readl/writel.
Tomi
Am 19.05.2015 um 07:59 schrieb Tomi Valkeinen tomi.valkeinen@ti.com:
On 19/05/15 08:56, Dr. H. Nikolaus Schaller wrote:
Hi Tomi,
Am 19.05.2015 um 07:47 schrieb Tomi Valkeinen tomi.valkeinen@ti.com:
On 19/05/15 08:42, Dr. H. Nikolaus Schaller wrote:
No need.
Well, we have a need - we can’t compile mainline without this patch… I think mainline must not necessarily work, but should at least compile without errors.
Mainline kernel compiles fine. It does not have the code that fails to compile. You only have it in your tree.
Hm. Which one? I have checked the diffs but did not find it.
Probably something like "ARM: OMAP: add OMAP5 DSI muxing". That's the patch in my work-in-progress branch that adds the now-broken code that uses omap4_ctrl_pad_readl/writel.
Ah, you are right. I did only look for diffs in drivers/video/fbdev/omap2 because we have tried to reduce all unnecessary diffs to mainline.
But it is an extension of omap_dsi_enable_pads() completely wrapped inside of arch/arm/mach-omap2/display.c and we have not yet looked at that file.
Then of course it is not (yet) in mainline. On the other hand it would be nice to see it there… You can add me as “tested by”. Our complete diff is attached.
BR and thanks, Nikolaus
iMac:master hns$ git diff v4.1-rc3 -- arch/arm/mach-omap2/display.c diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index f492ae1..31841f8 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c @@ -107,8 +107,10 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initconst = { };
#define OMAP4_DSIPHY_SYSCON_OFFSET 0x78 +#define OMAP5_DSIPHY_SYSCON_OFFSET 0x74
static struct regmap *omap4_dsi_mux_syscon; +static struct regmap *omap5_dsi_mux_syscon;
static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes) { @@ -143,11 +145,33 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes) return 0; }
+static int omap5_dsi_mux_pads(int dsi_id, unsigned lanes) +{ + u32 enable_mask, enable_shift, reg; + + if (dsi_id == 0) + enable_shift = 24; + else if (dsi_id == 1) + enable_shift = 19; + else + return -ENODEV; + + enable_mask = 0x1f << enable_shift; + + regmap_read(omap5_dsi_mux_syscon, OMAP5_DSIPHY_SYSCON_OFFSET, ®); + reg &= ~enable_mask; + reg |= (lanes << enable_shift) & enable_mask; + regmap_write(omap5_dsi_mux_syscon, OMAP5_DSIPHY_SYSCON_OFFSET, reg); + + return 0; +} + static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask) { if (cpu_is_omap44xx()) return omap4_dsi_mux_pads(dsi_id, lane_mask); - + else if (soc_is_omap54xx()) + return omap5_dsi_mux_pads(dsi_id, lane_mask); return 0; }
@@ -155,6 +179,8 @@ static void omap_dsi_disable_pads(int dsi_id, unsigned lane_mask) { if (cpu_is_omap44xx()) omap4_dsi_mux_pads(dsi_id, 0); + else if (soc_is_omap54xx()) + omap5_dsi_mux_pads(dsi_id, 0); }
static int omap_dss_set_min_bus_tput(struct device *dev, unsigned long tput) @@ -676,5 +702,10 @@ int __init omapdss_init_of(void) if (node) omap4_dsi_mux_syscon = syscon_node_to_regmap(node);
+ /* add DSI info for omap5 */ + node = of_find_node_by_name(NULL, "omap5_padconf_global"); + if (node) + omap5_dsi_mux_syscon = syscon_node_to_regmap(node); + return 0; } iMac:master hns$
On 19/05/15 09:20, Dr. H. Nikolaus Schaller wrote:
Ah, you are right. I did only look for diffs in drivers/video/fbdev/omap2 because we have tried to reduce all unnecessary diffs to mainline.
But it is an extension of omap_dsi_enable_pads() completely wrapped inside of arch/arm/mach-omap2/display.c and we have not yet looked at that file.
Then of course it is not (yet) in mainline. On the other hand it would be nice to see it there… You can add me as “tested by”. Our complete diff is attached.
Unfortunately I need to rewrite it for mainline (also the omap4 code), as the DSI muxing code should not even exist. It should be done using syscon, or possibly pinctrl.
Tomi
Hi Tomi,
Am 19.05.2015 um 08:35 schrieb Tomi Valkeinen tomi.valkeinen@ti.com:
On 19/05/15 09:20, Dr. H. Nikolaus Schaller wrote:
Ah, you are right. I did only look for diffs in drivers/video/fbdev/omap2 because we have tried to reduce all unnecessary diffs to mainline.
But it is an extension of omap_dsi_enable_pads() completely wrapped inside of arch/arm/mach-omap2/display.c and we have not yet looked at that file.
Then of course it is not (yet) in mainline. On the other hand it would be nice to see it there… You can add me as “tested by”. Our complete diff is attached.
Unfortunately I need to rewrite it for mainline (also the omap4 code), as the DSI muxing code should not even exist. It should be done using syscon, or possibly pinctrl.
Ok, I understand. With syscon or pinmux it would move to the CPU specific DT. We will keep it in our tree until we see an update arrive in mainline.
Or should we kick it out? IMHO it also could work without by relying on default pinmux.
BR, Nikolaus
On 19/05/15 09:39, Dr. H. Nikolaus Schaller wrote:
Hi Tomi,
Am 19.05.2015 um 08:35 schrieb Tomi Valkeinen tomi.valkeinen@ti.com:
On 19/05/15 09:20, Dr. H. Nikolaus Schaller wrote:
Ah, you are right. I did only look for diffs in drivers/video/fbdev/omap2 because we have tried to reduce all unnecessary diffs to mainline.
But it is an extension of omap_dsi_enable_pads() completely wrapped inside of arch/arm/mach-omap2/display.c and we have not yet looked at that file.
Then of course it is not (yet) in mainline. On the other hand it would be nice to see it there… You can add me as “tested by”. Our complete diff is attached.
Unfortunately I need to rewrite it for mainline (also the omap4 code), as the DSI muxing code should not even exist. It should be done using syscon, or possibly pinctrl.
Ok, I understand. With syscon or pinmux it would move to the CPU specific DT. We will keep it in our tree until we see an update arrive in mainline.
Or should we kick it out? IMHO it also could work without by relying on default pinmux.
I'd recommend keeping the patches (although you could squash them into one).
Tomi