Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 6/8] kernel/jump_label: abstract jump_entry member accessors
From: kbuild test robot @ 2017-12-26 10:19 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171225205440.14575-7-ard.biesheuvel@linaro.org>

Hi Ard,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.15-rc5 next-20171222]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Ard-Biesheuvel/add-support-for-relative-references-in-special-sections/20171226-164147
config: s390-allmodconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=s390 

All error/warnings (new ones prefixed by >>):

   kernel/jump_label.c: In function 'jump_label_sort_entries':
>> kernel/jump_label.c:59:7: error: 'jump_label_swap' undeclared (first use in this function); did you mean 'jump_label_cmp'?
          jump_label_swap);
          ^~~~~~~~~~~~~~~
          jump_label_cmp
   kernel/jump_label.c:59:7: note: each undeclared identifier is reported only once for each function it appears in
   kernel/jump_label.c: In function 'jump_label_type':
>> kernel/jump_label.c:342:27: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct static_key *key = jump_entry_key(entry);
                              ^~~~~~~~~~~~~~
>> kernel/jump_label.c:344:16: error: implicit declaration of function 'jump_entry_is_branch'; did you mean 'jump_entry_key'? [-Werror=implicit-function-declaration]
     bool branch = jump_entry_is_branch(entry);
                   ^~~~~~~~~~~~~~~~~~~~
                   jump_entry_key
   kernel/jump_label.c: In function '__jump_label_update':
>> kernel/jump_label.c:354:50: warning: comparison between pointer and integer
     for (; (entry < stop) && (jump_entry_key(entry) == key); entry++) {
                                                     ^~
   kernel/jump_label.c: In function 'jump_label_init':
>> kernel/jump_label.c:396:9: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
      iterk = jump_entry_key(iter);
            ^
   kernel/jump_label.c: In function 'jump_label_init_type':
   kernel/jump_label.c:412:27: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct static_key *key = jump_entry_key(entry);
                              ^~~~~~~~~~~~~~
   kernel/jump_label.c: In function 'jump_label_add_module':
   kernel/jump_label.c:533:9: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
      iterk = jump_entry_key(iter);
            ^
   kernel/jump_label.c: In function 'jump_label_del_module':
   kernel/jump_label.c:583:28: warning: comparison between pointer and integer
      if (jump_entry_key(iter) == key)
                               ^~
   kernel/jump_label.c:586:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
      key = jump_entry_key(iter);
          ^
   cc1: some warnings being treated as errors

vim +59 kernel/jump_label.c

    50	
    51	static void
    52	jump_label_sort_entries(struct jump_entry *start, struct jump_entry *stop)
    53	{
    54		unsigned long size;
    55	
    56		size = (((unsigned long)stop - (unsigned long)start)
    57						/ sizeof(struct jump_entry));
    58		sort(start, size, sizeof(struct jump_entry), jump_label_cmp,
  > 59		     jump_label_swap);
    60	}
    61	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 48675 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171226/66a319a8/attachment-0001.gz>

^ permalink raw reply

* [PATCH] arm: imx: suspend/resume: use outer_disable/resume
From: Dong Aisheng @ 2017-12-26 10:20 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <DB6PR04MB3221FC8A0E2D6980F8AAB1A288060@DB6PR04MB3221.eurprd04.prod.outlook.com>

On Tue, Dec 26, 2017 at 10:11:41AM +0000, Peng Fan wrote:
> 
> Hi Aisheng,
> 
> > -----Original Message-----
> > From: Dong Aisheng [mailto:dongas86 at gmail.com]
> > Sent: Tuesday, December 26, 2017 6:04 PM
> > To: Peng Fan <peng.fan@nxp.com>
> > Cc: Shawn Guo <shawnguo@kernel.org>; A.s. Dong <aisheng.dong@nxp.com>;
> > linux-kernel at vger.kernel.org; Russell King <linux@armlinux.org.uk>; Fabio
> > Estevam <fabio.estevam@nxp.com>; Sascha Hauer <kernel@pengutronix.de>;
> > van.freenix at gmail.com; linux-arm-kernel at lists.infradead.org
> > Subject: Re: [PATCH] arm: imx: suspend/resume: use outer_disable/resume
> > 
> > On Tue, Dec 26, 2017 at 09:49:01AM +0000, Peng Fan wrote:
> > > Hi Shawn
> > >
> > > > -----Original Message-----
> > > > From: Shawn Guo [mailto:shawnguo at kernel.org]
> > > > Sent: Tuesday, December 26, 2017 5:13 PM
> > > > To: Peng Fan <peng.fan@nxp.com>
> > > > Cc: A.s. Dong <aisheng.dong@nxp.com>; linux-kernel at vger.kernel.org;
> > > > Russell King <linux@armlinux.org.uk>; Fabio Estevam
> > > > <fabio.estevam@nxp.com>; Sascha Hauer <kernel@pengutronix.de>;
> > > > van.freenix at gmail.com; linux-arm- kernel at lists.infradead.org
> > > > Subject: Re: [PATCH] arm: imx: suspend/resume: use
> > > > outer_disable/resume
> > > >
> > > > On Sun, Dec 10, 2017 at 08:07:18PM +0800, Peng Fan wrote:
> > > > > Use outer_disable/resume for suspend/resume.
> > > > > With the two APIs used, code could be simplified and easy to
> > > > > extend to introduce l2c_write_sec for i.MX platforms when moving
> > > > > Linux Kernel runs in non-secure world.
> > > > >
> > > > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > > > Cc: Shawn Guo <shawnguo@kernel.org>
> > > > > Cc: Sascha Hauer <kernel@pengutronix.de>
> > > > > Cc: Fabio Estevam <fabio.estevam@nxp.com>
> > > > > Cc: Russell King <linux@armlinux.org.uk>
> > > > > Cc: Dong Aisheng <aisheng.dong@nxp.com>
> > > >
> > > > Changed 'arm: ' prefix to 'ARM: ', and applied patch.
> > >
> > > I just tested it on 6sx-sdb, seems this patch breaks 6sx. Could you
> > > first drop this patch? I'll send out v2 fix the 6sx issue soon.
> > >
> > 
> > Yes, i tested mx6ul/mx6sl ok but mx6sx sdb failed.
> 
> Thanks for the test.
> 
> > 
> > After a few debug, it seems you removed the l2c310_early_resume in
> > v7_cpu_resume which is shared between lower power idle and suspend.
> > 
> > Current only mx6sx/mx6ul supports low power idle in upstream, but mx6ul is
> > A7 with internal L2, that's probably why only mx6sx showed the issue.
> > 
> > I did the following quick try to restore L2 after exit lower power idle, but still
> > can meet occasional crash during booting.
> > 
> > diff --git a/arch/arm/mach-imx/cpuidle-imx6sx.c b/arch/arm/mach-
> > imx/cpuidle-imx6sx.c
> > index c5a5c3a..edce5bd 100644
> > --- a/arch/arm/mach-imx/cpuidle-imx6sx.c
> > +++ b/arch/arm/mach-imx/cpuidle-imx6sx.c
> > @@ -26,7 +26,7 @@ static int imx6sx_idle_finish(unsigned long val)
> >          * to adding conditional code for L2 cache type,
> >          * just call flush_cache_all() is fine.
> >          */
> > -       flush_cache_all();
> > +//     flush_cache_all();
> 
> I think flush_cache_all is still needed, to flush L1 data, right?
> 

I thought it will be done in generic cpu_suspend.
See: __cpu_suspend_save()

So we still need it?


Regards
Dong Aisheng
> >         cpu_do_idle();
> > 
> >         return 0;
> > @@ -49,7 +49,9 @@ static int imx6sx_enter_wait(struct cpuidle_device *dev,
> >                 cpu_pm_enter();
> >                 cpu_cluster_pm_enter();
> > 
> > +               outer_disable();
> >                 cpu_suspend(0, imx6sx_idle_finish);
> > +               outer_resume();
> 
> Yes, this is in my V2 patch.
> 
> > 
> >                 cpu_cluster_pm_exit();
> >                 cpu_pm_exit();
> > 
> > As this changed the order to L2 restore and cpu resume, so i'm not quite sure if
> > lower power idle still requres L2 restore before CPU resume or something else
> > we're missing.
> 
> In low power idle, L2 may also lose power, so outer_disable/resume is needed, I think.
> 
> Thanks,
> Peng.
> 
> > 
> > Regards
> > Dong Aisheng
> > 
> > > Thanks,
> > > Peng.
> > >
> > > >
> > > > Shawn

^ permalink raw reply

* [PATCH v5 6/8] kernel/jump_label: abstract jump_entry member accessors
From: Ard Biesheuvel @ 2017-12-26 10:23 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <201712261806.hJg043uc%fengguang.wu@intel.com>

On 26 December 2017 at 10:19, kbuild test robot <lkp@intel.com> wrote:
> Hi Ard,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on linus/master]
> [also build test ERROR on v4.15-rc5 next-20171222]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url:    https://github.com/0day-ci/linux/commits/Ard-Biesheuvel/add-support-for-relative-references-in-special-sections/20171226-164147
> config: s390-allmodconfig (attached as .config)
> compiler: s390x-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         make.cross ARCH=s390
>

I guess the diffstat gives it away:

>  arch/arm/include/asm/jump_label.h     | 27 ++++++++++++++
>  arch/arm64/include/asm/jump_label.h   | 27 ++++++++++++++
>  arch/mips/include/asm/jump_label.h    | 27 ++++++++++++++
>  arch/powerpc/include/asm/jump_label.h | 27 ++++++++++++++
>  arch/s390/include/asm/jump_label.h    | 20 +++++++++++
>  arch/sparc/include/asm/jump_label.h   | 27 ++++++++++++++
>  arch/tile/include/asm/jump_label.h    | 27 ++++++++++++++
>  arch/x86/include/asm/jump_label.h     | 27 ++++++++++++++

Will fix in the next revision.

^ permalink raw reply

* [PATCH] arm: imx: suspend/resume: use outer_disable/resume
From: Dong Aisheng @ 2017-12-26 10:36 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171226102038.GB11724@b29396-OptiPlex-7040>

On Tue, Dec 26, 2017 at 06:20:38PM +0800, Dong Aisheng wrote:
> On Tue, Dec 26, 2017 at 10:11:41AM +0000, Peng Fan wrote:
> > 
> > Hi Aisheng,
> > 
> > > -----Original Message-----
> > > From: Dong Aisheng [mailto:dongas86 at gmail.com]
> > > Sent: Tuesday, December 26, 2017 6:04 PM
> > > To: Peng Fan <peng.fan@nxp.com>
> > > Cc: Shawn Guo <shawnguo@kernel.org>; A.s. Dong <aisheng.dong@nxp.com>;
> > > linux-kernel at vger.kernel.org; Russell King <linux@armlinux.org.uk>; Fabio
> > > Estevam <fabio.estevam@nxp.com>; Sascha Hauer <kernel@pengutronix.de>;
> > > van.freenix at gmail.com; linux-arm-kernel at lists.infradead.org
> > > Subject: Re: [PATCH] arm: imx: suspend/resume: use outer_disable/resume
> > > 
> > > On Tue, Dec 26, 2017 at 09:49:01AM +0000, Peng Fan wrote:
> > > > Hi Shawn
> > > >
> > > > > -----Original Message-----
> > > > > From: Shawn Guo [mailto:shawnguo at kernel.org]
> > > > > Sent: Tuesday, December 26, 2017 5:13 PM
> > > > > To: Peng Fan <peng.fan@nxp.com>
> > > > > Cc: A.s. Dong <aisheng.dong@nxp.com>; linux-kernel at vger.kernel.org;
> > > > > Russell King <linux@armlinux.org.uk>; Fabio Estevam
> > > > > <fabio.estevam@nxp.com>; Sascha Hauer <kernel@pengutronix.de>;
> > > > > van.freenix at gmail.com; linux-arm- kernel at lists.infradead.org
> > > > > Subject: Re: [PATCH] arm: imx: suspend/resume: use
> > > > > outer_disable/resume
> > > > >
> > > > > On Sun, Dec 10, 2017 at 08:07:18PM +0800, Peng Fan wrote:
> > > > > > Use outer_disable/resume for suspend/resume.
> > > > > > With the two APIs used, code could be simplified and easy to
> > > > > > extend to introduce l2c_write_sec for i.MX platforms when moving
> > > > > > Linux Kernel runs in non-secure world.
> > > > > >
> > > > > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > > > > Cc: Shawn Guo <shawnguo@kernel.org>
> > > > > > Cc: Sascha Hauer <kernel@pengutronix.de>
> > > > > > Cc: Fabio Estevam <fabio.estevam@nxp.com>
> > > > > > Cc: Russell King <linux@armlinux.org.uk>
> > > > > > Cc: Dong Aisheng <aisheng.dong@nxp.com>
> > > > >
> > > > > Changed 'arm: ' prefix to 'ARM: ', and applied patch.
> > > >
> > > > I just tested it on 6sx-sdb, seems this patch breaks 6sx. Could you
> > > > first drop this patch? I'll send out v2 fix the 6sx issue soon.
> > > >
> > > 
> > > Yes, i tested mx6ul/mx6sl ok but mx6sx sdb failed.
> > 
> > Thanks for the test.
> > 
> > > 
> > > After a few debug, it seems you removed the l2c310_early_resume in
> > > v7_cpu_resume which is shared between lower power idle and suspend.
> > > 
> > > Current only mx6sx/mx6ul supports low power idle in upstream, but mx6ul is
> > > A7 with internal L2, that's probably why only mx6sx showed the issue.
> > > 
> > > I did the following quick try to restore L2 after exit lower power idle, but still
> > > can meet occasional crash during booting.
> > > 
> > > diff --git a/arch/arm/mach-imx/cpuidle-imx6sx.c b/arch/arm/mach-
> > > imx/cpuidle-imx6sx.c
> > > index c5a5c3a..edce5bd 100644
> > > --- a/arch/arm/mach-imx/cpuidle-imx6sx.c
> > > +++ b/arch/arm/mach-imx/cpuidle-imx6sx.c
> > > @@ -26,7 +26,7 @@ static int imx6sx_idle_finish(unsigned long val)
> > >          * to adding conditional code for L2 cache type,
> > >          * just call flush_cache_all() is fine.
> > >          */
> > > -       flush_cache_all();
> > > +//     flush_cache_all();
> > 
> > I think flush_cache_all is still needed, to flush L1 data, right?
> > 
> 
> I thought it will be done in generic cpu_suspend.
> See: __cpu_suspend_save()
> 
> So we still need it?
> 

Shawn,

Do you have comments about it?

Regards
Dong Aisheng

^ permalink raw reply

* [PATCH v3 14/19] KVM: arm/arm64: Move HYP IO VAs to the "idmap" range
From: Marc Zyngier @ 2017-12-26 11:03 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171220131624.xvewngmlrv5niwzb@capper-debian.cambridge.arm.com>

Hi Steve,

On Wed, 20 Dec 2017 13:16:24 +0000,
Steve Capper wrote:
> 
> Hi Marc,
> 
> On Mon, Dec 18, 2017 at 05:39:21PM +0000, Marc Zyngier wrote:
> > We so far mapped our HYP IO (which is essencially the GICv2 control
> > registers) using the same method as for memory. It recently appeared
> > that is a bit unsafe:
> > 
> > we compute the HYP VA using the kern_hyp_va helper, but that helper
> > is only designed to deal with kernel VAs coming from the linear map,
> > and not from the vmalloc region... This could in turn cause some bad
> > aliasing between the two, amplified by the new VA randomisation.
> > 
> > A solution is to come up with our very own basic VA allocator for
> > MMIO. Since half of the HYP address space only contains a single
> > page (the idmap), we have plenty to borrow from. Let's use the idmap
> > as a base, and allocate downwards from it. GICv2 now lives on the
> > other side of the great VA barrier.
> > 
> > Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> > ---
> >  virt/kvm/arm/mmu.c | 40 ++++++++++++++++++++++++++++------------
> >  1 file changed, 28 insertions(+), 12 deletions(-)
> > 
> > diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c
> > index 6192d45d1e1a..0597c9846f1a 100644
> > --- a/virt/kvm/arm/mmu.c
> > +++ b/virt/kvm/arm/mmu.c
> 
> [...]
> 
> > @@ -721,7 +728,8 @@ int create_hyp_io_mappings(phys_addr_t phys_addr, size_t size,
> >  			   void __iomem **kaddr,
> >  			   void __iomem **haddr)
> >  {
> > -	unsigned long start, end;
> > +	pgd_t *pgd = hyp_pgd;
> > +	unsigned long base;
> >  	int ret;
> >  
> >  	*kaddr = ioremap(phys_addr, size);
> > @@ -733,19 +741,26 @@ int create_hyp_io_mappings(phys_addr_t phys_addr, size_t size,
> >  		return 0;
> >  	}
> >  
> > +	mutex_lock(&io_map_lock);
> > +
> > +	base = io_map_base - size;
> > +	base &= ~(size - 1);
> > +
> 
> Is it worth checking to see if we have "escaped" from our half of the
> HYP region?
> 
> So something like?
> 
> if (base ^ io_map_base & BIT(VA_BITS - 1))
>     allocationFailed...

Ah, cool trick. It took me a minute to grasp it (I blame the
turkey...), but that's definitely neat and a nice sanity check.

I'll add that to v4.

Thanks,

	M.

^ permalink raw reply

* [PATCH v2 0/3] drm/sun4i: hdmi: Fix sun4i_tmds_determine_rate
From: Jonathan Liu @ 2017-12-26 11:12 UTC (permalink / raw)
  To: linux-arm-kernel

This patchset fixes several issues in sun4i_tmds_determine_rate that I
discovered while trying to get a projector connected to an Olimex
A20-OLinuXino-LIME using HDMI with a native resolution of 1280x800 and
pixel clock of 83.5 MHz to display at its native resolution.

Changes for v2:
- Split into separate patches for each issue
- Add details to commit message for reproducing issue

Jonathan Liu (3):
  drm/sun4i: hdmi: Check for unset best_parent in
    sun4i_tmds_determine_rate
  drm/sun4i: hdmi: Fix incorrect assignment in sun4i_tmds_determine_rate
  drm/sun4i: hdmi: Add missing rate halving check in
    sun4i_tmds_determine_rate

 drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

-- 
2.15.0

^ permalink raw reply

* [PATCH v2 1/3] drm/sun4i: hdmi: Check for unset best_parent in sun4i_tmds_determine_rate
From: Jonathan Liu @ 2017-12-26 11:12 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171226111227.4526-1-net147@gmail.com>

We should check if the best match has been set before comparing it.

Fixes: 9c5681011a0c ("drm/sun4i: Add HDMI support")
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
 drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c
index dc332ea56f6c..4d235e5ea31c 100644
--- a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c
+++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c
@@ -102,7 +102,7 @@ static int sun4i_tmds_determine_rate(struct clk_hw *hw,
 					goto out;
 				}
 
-				if (abs(rate - rounded / i) <
+				if (!best_parent || abs(rate - rounded / i) <
 				    abs(rate - best_parent / best_div)) {
 					best_parent = rounded;
 					best_div = i;
-- 
2.15.0

^ permalink raw reply related

* [PATCH v2 2/3] drm/sun4i: hdmi: Fix incorrect assignment in sun4i_tmds_determine_rate
From: Jonathan Liu @ 2017-12-26 11:12 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171226111227.4526-1-net147@gmail.com>

best_div is set to i which corresponds to rate halving when it should be
set to j which corresponds to the divider.

Fixes: 9c5681011a0c ("drm/sun4i: Add HDMI support")
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
 drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c
index 4d235e5ea31c..88eeeaf34638 100644
--- a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c
+++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c
@@ -105,7 +105,7 @@ static int sun4i_tmds_determine_rate(struct clk_hw *hw,
 				if (!best_parent || abs(rate - rounded / i) <
 				    abs(rate - best_parent / best_div)) {
 					best_parent = rounded;
-					best_div = i;
+					best_div = j;
 				}
 			}
 		}
-- 
2.15.0

^ permalink raw reply related

* [PATCH v2 3/3] drm/sun4i: hdmi: Add missing rate halving check in sun4i_tmds_determine_rate
From: Jonathan Liu @ 2017-12-26 11:12 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171226111227.4526-1-net147@gmail.com>

It was only checking the divider when determing the closest match if
it could not match the requested rate exactly.

For a projector connected to an Olimex A20-OLinuXino-LIME using HDMI
with a native resolution of 1280x800 and pixel clock of 83.5 MHz, this
resulted in 1280x800 mode not being available and the following in dmesg
when the kernel is booted with drm.debug=0x3e:
[drm:drm_mode_debug_printmodeline] Modeline 37:"1280x800" 60 83500 1280 1352 1480 1680 800 810 816 831 0x48 0x5
[drm:drm_mode_prune_invalid] Not using 1280x800 mode: NOCLOCK

Fixes: 9c5681011a0c ("drm/sun4i: Add HDMI support")
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
 drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c
index 88eeeaf34638..3ecffa52c814 100644
--- a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c
+++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c
@@ -102,9 +102,12 @@ static int sun4i_tmds_determine_rate(struct clk_hw *hw,
 					goto out;
 				}
 
-				if (!best_parent || abs(rate - rounded / i) <
-				    abs(rate - best_parent / best_div)) {
+				if (!best_parent ||
+				    abs(rate - rounded / i / j) <
+				    abs(rate - best_parent / best_half /
+					best_div)) {
 					best_parent = rounded;
+					best_half = i;
 					best_div = j;
 				}
 			}
-- 
2.15.0

^ permalink raw reply related

* [PATCH] ARM: pxa3xx: fix static checker warning in ulpi
From: Igor Grinberg @ 2017-12-26 12:33 UTC (permalink / raw)
  To: linux-arm-kernel

Static checker reports the following warning:

arch/arm/mach-pxa/pxa3xx-ulpi.c:336 pxa3xx_u2d_probe()
warn: did you mean to pass the address of 'u2d'

Fix it by passing the correct pointer.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
---
 arch/arm/mach-pxa/pxa3xx-ulpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-pxa/pxa3xx-ulpi.c b/arch/arm/mach-pxa/pxa3xx-ulpi.c
index 60cb59a7ebd1..c00450764352 100644
--- a/arch/arm/mach-pxa/pxa3xx-ulpi.c
+++ b/arch/arm/mach-pxa/pxa3xx-ulpi.c
@@ -331,7 +331,7 @@ static int pxa3xx_u2d_probe(struct platform_device *pdev)
 			goto err_free_plat;
 	}
 
-	platform_set_drvdata(pdev, &u2d);
+	platform_set_drvdata(pdev, u2d);
 
 	return 0;
 
-- 
2.13.6

^ permalink raw reply related

* [PATCH] ARM: pxa: cm-x300: remove inline directive
From: Igor Grinberg @ 2017-12-26 12:45 UTC (permalink / raw)
  To: linux-arm-kernel

cm_x300_u2d_init() function is only used through its function pointer
that is passed through platform_data structure to the driver.
Therefore it can never be inlined.
Remove the inline directive.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
---
 arch/arm/mach-pxa/cm-x300.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index 868448d2cd82..912e905a6af6 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -509,7 +509,7 @@ static int cm_x300_ulpi_phy_reset(void)
 	return 0;
 }
 
-static inline int cm_x300_u2d_init(struct device *dev)
+static int cm_x300_u2d_init(struct device *dev)
 {
 	int err = 0;
 
-- 
2.13.6

^ permalink raw reply related

* [RESEND PATCH v2 1/2] drm/exynos/decon: Move headers from global to local place
From: Krzysztof Kozlowski @ 2017-12-26 13:07 UTC (permalink / raw)
  To: linux-arm-kernel

The DECON headers contain only defines for registers.  There are no
other drivers using them so this should be put locally to the Exynos DRM
driver.  Keeping headers local helps managing the code.

Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Resend after half a year...

Changes since v1:
1. Just re-order patches in patchset.
---
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c                          | 3 +--
 drivers/gpu/drm/exynos/exynos7_drm_decon.c                             | 2 +-
 .../exynos5433_decon.h => drivers/gpu/drm/exynos/regs-decon5433.h      | 0
 include/video/exynos7_decon.h => drivers/gpu/drm/exynos/regs-decon7.h  | 3 +--
 4 files changed, 3 insertions(+), 5 deletions(-)
 rename include/video/exynos5433_decon.h => drivers/gpu/drm/exynos/regs-decon5433.h (100%)
 rename include/video/exynos7_decon.h => drivers/gpu/drm/exynos/regs-decon7.h (99%)

diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index 6be5b53c3b27..1427c385bddc 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -21,13 +21,12 @@
 #include <linux/pm_runtime.h>
 #include <linux/regmap.h>
 
-#include <video/exynos5433_decon.h>
-
 #include "exynos_drm_drv.h"
 #include "exynos_drm_crtc.h"
 #include "exynos_drm_fb.h"
 #include "exynos_drm_plane.h"
 #include "exynos_drm_iommu.h"
+#include "regs-decon5433.h"
 
 #define DSD_CFG_MUX 0x1004
 #define DSD_CFG_MUX_TE_UNMASK_GLOBAL BIT(13)
diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
index 615efcf7782a..3931d5e33fe0 100644
--- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
@@ -25,13 +25,13 @@
 
 #include <video/of_display_timing.h>
 #include <video/of_videomode.h>
-#include <video/exynos7_decon.h>
 
 #include "exynos_drm_crtc.h"
 #include "exynos_drm_plane.h"
 #include "exynos_drm_drv.h"
 #include "exynos_drm_fb.h"
 #include "exynos_drm_iommu.h"
+#include "regs-decon7.h"
 
 /*
  * DECON stands for Display and Enhancement controller.
diff --git a/include/video/exynos5433_decon.h b/drivers/gpu/drm/exynos/regs-decon5433.h
similarity index 100%
rename from include/video/exynos5433_decon.h
rename to drivers/gpu/drm/exynos/regs-decon5433.h
diff --git a/include/video/exynos7_decon.h b/drivers/gpu/drm/exynos/regs-decon7.h
similarity index 99%
rename from include/video/exynos7_decon.h
rename to drivers/gpu/drm/exynos/regs-decon7.h
index a62b11b613f6..339ea1007ff5 100644
--- a/include/video/exynos7_decon.h
+++ b/drivers/gpu/drm/exynos/regs-decon7.h
@@ -1,5 +1,4 @@
-/* include/video/exynos7_decon.h
- *
+/*
  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
  * Author: Ajay Kumar <ajaykumar.rs@samsung.com>
  *
-- 
2.7.4

^ permalink raw reply related

* [RESEND PATCH v2 2/2] drm/exynos/decon: Add include guard to the Exynos7 header
From: Krzysztof Kozlowski @ 2017-12-26 13:07 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1514293639-18785-1-git-send-email-krzk@kernel.org>

Although header is included only once but still having an include guard
is a good practice.  To avoid confusion, add SoC prefix to existing
Exynos5433 header include guard.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Resend after half a year...

Changes since v1:
1. Just re-order patches in patchset and slightly adjust include guard
   name.
---
 drivers/gpu/drm/exynos/regs-decon5433.h | 6 +++---
 drivers/gpu/drm/exynos/regs-decon7.h    | 5 +++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/exynos/regs-decon5433.h b/drivers/gpu/drm/exynos/regs-decon5433.h
index 78957c9626f5..19ad9e47945e 100644
--- a/drivers/gpu/drm/exynos/regs-decon5433.h
+++ b/drivers/gpu/drm/exynos/regs-decon5433.h
@@ -6,8 +6,8 @@
  * published by the Free Software Foundationr
  */
 
-#ifndef EXYNOS_REGS_DECON_H
-#define EXYNOS_REGS_DECON_H
+#ifndef EXYNOS_REGS_DECON5433_H
+#define EXYNOS_REGS_DECON5433_H
 
 /* Exynos543X DECON */
 #define DECON_VIDCON0			0x0000
@@ -206,4 +206,4 @@
 #define CRCCTRL_CRCEN			(0x1 << 0)
 #define CRCCTRL_MASK			(0x7)
 
-#endif /* EXYNOS_REGS_DECON_H */
+#endif /* EXYNOS_REGS_DECON5433_H */
diff --git a/drivers/gpu/drm/exynos/regs-decon7.h b/drivers/gpu/drm/exynos/regs-decon7.h
index 339ea1007ff5..5df7765d2397 100644
--- a/drivers/gpu/drm/exynos/regs-decon7.h
+++ b/drivers/gpu/drm/exynos/regs-decon7.h
@@ -8,6 +8,9 @@
  * option) any later version.
  */
 
+#ifndef EXYNOS_REGS_DECON7_H
+#define EXYNOS_REGS_DECON7_H
+
 /* VIDCON0 */
 #define VIDCON0					0x00
 
@@ -346,3 +349,5 @@
 
 #define DECON_UPDATE_SLAVE_SYNC			(1 << 4)
 #define DECON_UPDATE_STANDALONE_F		(1 << 0)
+
+#endif /* EXYNOS_REGS_DECON7_H */
-- 
2.7.4

^ permalink raw reply related

* [PATCH] clk: pxa: unbreak lookup of CLK_POUT
From: Igor Grinberg @ 2017-12-26 13:30 UTC (permalink / raw)
  To: linux-arm-kernel

Since switching to clk drivers, the CLK_POUT cannot be searched for by
clk_get() API and thus it returns with ENOENT.
Register it with the clk_lookup and thus unbreak the users of it.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
---
 drivers/clk/pxa/clk-pxa3xx.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/pxa/clk-pxa3xx.c b/drivers/clk/pxa/clk-pxa3xx.c
index 42bdaa772be0..2d126df2bccd 100644
--- a/drivers/clk/pxa/clk-pxa3xx.c
+++ b/drivers/clk/pxa/clk-pxa3xx.c
@@ -329,12 +329,16 @@ static void __init pxa3xx_dummy_clocks_init(void)
 
 static void __init pxa3xx_base_clocks_init(void)
 {
+	struct clk *clk;
+
 	pxa3xx_register_plls();
 	pxa3xx_register_core();
 	clk_register_clk_pxa3xx_system_bus();
 	clk_register_clk_pxa3xx_ac97();
 	clk_register_clk_pxa3xx_smemc();
-	clk_register_gate(NULL, "CLK_POUT", "osc_13mhz", 0, OSCC, 11, 0, NULL);
+	clk = clk_register_gate(NULL, "CLK_POUT",
+				"osc_13mhz", 0, OSCC, 11, 0, NULL);
+	clk_register_clkdev(clk, "CLK_POUT", NULL);
 	clkdev_pxa_register(CLK_OSTIMER, "OSTIMER0", NULL,
 			    clk_register_fixed_factor(NULL, "os-timer0",
 						      "osc_13mhz", 0, 1, 4));
-- 
2.13.6

^ permalink raw reply related

* [PATCH] ARM: pxa: ulpi: fix ulpi timeout and slowpath warn
From: Igor Grinberg @ 2017-12-26 13:32 UTC (permalink / raw)
  To: linux-arm-kernel

Both cm-x300 and pxa3xx-ulpi use the plain clk_{en,dis}able() API.
With the new clocking framework this results in warnings of type:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:714 clk_core_enable+0x90/0x9c
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc5-cm-x300+ #15
Hardware name: CM-X300 module
[<c001007c>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[<c000df94>] (show_stack) from [<c00199a8>] (__warn+0xd8/0x100)
[<c00199a8>] (__warn) from [<c0019a0c>] (warn_slowpath_null+0x3c/0x48)
[<c0019a0c>] (warn_slowpath_null) from [<c024e8c0>] (clk_core_enable+0x90/0x9c)
[<c024e8c0>] (clk_core_enable) from [<c024ea54>] (clk_core_enable_lock+0x18/0x2c)
[<c024ea54>] (clk_core_enable_lock) from [<c0016994>] (cm_x300_u2d_init+0x4c/0xe8)
[<c0016994>] (cm_x300_u2d_init) from [<c00163e0>] (pxa3xx_u2d_probe+0xe0/0x244)
[<c00163e0>] (pxa3xx_u2d_probe) from [<c0283de0>] (platform_drv_probe+0x38/0x88)
...
------------[ cut here ]------------
and alike...

And finally, it results in:
------------[ cut here ]------------
pxa310_ulpi_poll: ULPI access timed out!
OTG transceiver init failed
------------[ cut here ]------------

It might be that disabling the warning in kernel config would also do
the job, but IMO a better solution would be to switch to
clk_prepare_enable() and clk_disable_unprepare() APIs.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
---
 arch/arm/mach-pxa/cm-x300.c     | 4 ++--
 arch/arm/mach-pxa/pxa3xx-ulpi.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index 912e905a6af6..9ccfb10a9e0f 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -521,7 +521,7 @@ static int cm_x300_u2d_init(struct device *dev)
 			pr_err("failed to get CLK_POUT: %d\n", err);
 			return err;
 		}
-		clk_enable(pout_clk);
+		clk_prepare_enable(pout_clk);
 
 		err = cm_x300_ulpi_phy_reset();
 		if (err) {
@@ -536,7 +536,7 @@ static int cm_x300_u2d_init(struct device *dev)
 static void cm_x300_u2d_exit(struct device *dev)
 {
 	if (cpu_is_pxa310()) {
-		clk_disable(pout_clk);
+		clk_disable_unprepare(pout_clk);
 		clk_put(pout_clk);
 	}
 }
diff --git a/arch/arm/mach-pxa/pxa3xx-ulpi.c b/arch/arm/mach-pxa/pxa3xx-ulpi.c
index c00450764352..b3e2016f24b1 100644
--- a/arch/arm/mach-pxa/pxa3xx-ulpi.c
+++ b/arch/arm/mach-pxa/pxa3xx-ulpi.c
@@ -256,7 +256,7 @@ int pxa3xx_u2d_start_hc(struct usb_bus *host)
 	if (!u2d)
 		return 0;
 
-	clk_enable(u2d->clk);
+	clk_prepare_enable(u2d->clk);
 
 	if (cpu_is_pxa310()) {
 		pxa310_u2d_setup_otg_hc();
@@ -276,7 +276,7 @@ void pxa3xx_u2d_stop_hc(struct usb_bus *host)
 	if (cpu_is_pxa310())
 		pxa310_stop_otg_hc();
 
-	clk_disable(u2d->clk);
+	clk_disable_unprepare(u2d->clk);
 }
 EXPORT_SYMBOL_GPL(pxa3xx_u2d_stop_hc);
 
-- 
2.13.6

^ permalink raw reply related

* [PATCH] arm64: dts: marvell: armada-37xx: add a crypto node
From: Antoine Tenart @ 2017-12-26 16:16 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds a crypto node describing the EIP97 engine found in
Armada 37xx SoCs. The cryptographic engine is enabled by default.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
---
 arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
index 90c26d616a54..4c4b7a2fb162 100644
--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
@@ -309,6 +309,20 @@
 				};
 			};
 
+			crypto: crypto at 90000 {
+				compatible = "inside-secure,safexcel-eip97";
+				reg = <0x90000 0x20000>;
+				interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-names = "mem", "ring0", "ring1",
+						  "ring2", "ring3", "eip";
+				clocks = <&nb_periph_clk 15>;
+			};
+
 			sdhci1: sdhci at d0000 {
 				compatible = "marvell,armada-3700-sdhci",
 					     "marvell,sdhci-xenon";
-- 
2.14.3

^ permalink raw reply related

* [PATCH v3 4/5] ARM: davinci: convert to common clock framework
From: David Lechner @ 2017-12-26 16:28 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <d196d078-8cd1-01c4-d780-74c7e4a54b8f@lechnology.com>

On 12/21/2017 10:52 AM, David Lechner wrote:
> If you can pick up the first 3 patches from this series, I have one or 
> two more I can send that depend on those changes that are not 
> intermediate steps.

I take this back. I have a v4 in the works that changes things a little bit.

^ permalink raw reply

* [PATCH net 1/2] dt-bindings: net: mediatek: add condition to property mediatek,pctl
From: David Miller @ 2017-12-26 17:05 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <e366efc29985d3292c8a1afb1389b5eac57c9037.1513762066.git.sean.wang@mediatek.com>

From: <sean.wang@mediatek.com>
Date: Wed, 20 Dec 2017 17:47:05 +0800

> From: Sean Wang <sean.wang@mediatek.com>
> 
> The property "mediatek,pctl" is only required for SoCs such as MT2701 and
> MT7623, so adding a few words for stating the condition.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>

Applied to net-next.

^ permalink raw reply

* [PATCH net 2/2] net: mediatek: remove superfluous pin setup for MT7622 SoC
From: David Miller @ 2017-12-26 17:06 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <e3bd43a5337df719e791bc9902135a0916a951ff.1513762066.git.sean.wang@mediatek.com>

From: <sean.wang@mediatek.com>
Date: Wed, 20 Dec 2017 17:47:06 +0800

> From: Sean Wang <sean.wang@mediatek.com>
> 
> Remove superfluous pin setup to get out of accessing invalid I/O pin
> registers because the way for pin configuring tends to be different from
> various SoCs and thus it should be better being managed and controlled by
> the pinctrl driver which MT7622 already can support.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>

Applied to net-next.

^ permalink raw reply

* [PATCH v2 4/5] ARM: dts: Add support for emtrion emCON-MX6 series
From: Rob Herring @ 2017-12-26 17:16 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171222105642.GD18255@piout.net>

On Fri, Dec 22, 2017 at 4:56 AM, Alexandre Belloni
<alexandre.belloni@free-electrons.com> wrote:
> + Philippe
>
> On 22/12/2017 at 11:43:33 +0100, Andreas F?rber wrote:
>> >> I'll change it for v3 of this patch however it will end up like this:
>> >> //SPDX-License...
>> >
>> > That should be /* SPDX-License */, // is for c files.
>>
>> Got any reference for that? Since we're using the C preprocessor before
>> feeding them to dtc, we can use the same // style for both, builds fine.
>>
>> Only for my private DT overlay files that I use directly with dtc I
>> couldn't adopt that style.

We are well past the point of being able to build most dts files with just dtc.

> The doc states:
>
> If a specific tool cannot handle the standard comment style, then the
> appropriate comment mechanism which the tool accepts shall be used. This
> is the reason for having the "/\* \*/" style comment in C header
> files.
>
> I interpreted that as dtc doesn't handle // comments, use /**/

It's been so long, I'd forgotten that. Perhaps we should fix dtc to
handle // comments.

>
> But I agree it also states:
> .dts{i}:          // SPDX-License-Identifier: <SPDX License Expression>

Or we could still change this. The guidelines aren't merged yet.

Rob

^ permalink raw reply

* [PATCH v2 1/5] drm/panel: Add support for the EDT ETM0700G0BDH6
From: Rob Herring @ 2017-12-26 17:25 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <95F51F4B902CAC40AF459205F6322F01B7FDFECC3D@BMK019S01.emtrion.local>

On Fri, Dec 22, 2017 at 4:43 AM, T?rk, Jan <Jan.Tuerk@emtrion.de> wrote:
>> Von: Rob Herring [mailto:robh at kernel.org]
>> Gesendet: Freitag, 22. Dezember 2017 00:00
>> Betreff: Re: [PATCH v2 1/5] drm/panel: Add support for the EDT
>> ETM0700G0BDH6
>>
>> On Wed, Dec 20, 2017 at 02:47:01PM +0100, jan.tuerk at emtrion.com wrote:
>> > From: Jan Tuerk <jan.tuerk@emtrion.com>
>> >
>> > The Emerging Display Technology ETM0700G0BDH6 is exactly the same
>> > display as the ETM0700G0DH6, exept the pixelclock polarity. Therefore
>> > re-use the ETM0700G0DH6 modes. It is used by default on emtrion Avari
>> > based development kits.
>>
>> As I asked on v1, why not document the panels together in a single doc?
>
> As denoted in the cover letter:

I generally don't read cover letters...

>>The documentation for the EDT display is kept as an extra file currently,
>>as it is done by the most displays in the documentation. Also a new
>>new Variant of the EDT already arrived. So merging their documentations
>>should be discussed separately.

You mean a 3rd variant?

> I think it will be even a little tricky to find a matching filename for both versions,
> as the recent ones adding an extra character in the description. Are you expecting sth.
> like edt,etm0700series.txt?

Yeah, or edt,etm0700g0.txt.

Rob

^ permalink raw reply

* [PATCH v5 15/15] devicetree: bindings: Document qcom,pvs
From: Rob Herring @ 2017-12-26 17:36 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <864b6cfd-d3eb-d876-82e2-ebc79c5a6956@codeaurora.org>

On Thu, Dec 21, 2017 at 5:53 AM, Sricharan R <sricharan@codeaurora.org> wrote:
> Hi Rob,
>
> On 12/21/2017 2:48 AM, Rob Herring wrote:
>> On Wed, Dec 20, 2017 at 11:55:33AM +0530, Sricharan R wrote:
>>> Hi Viresh,
>>>
>>> On 12/20/2017 8:56 AM, Viresh Kumar wrote:
>>>> On 19-12-17, 21:25, Sricharan R wrote:
>>>>> +  cpu at 0 {
>>>>> +          compatible = "qcom,krait";
>>>>> +          enable-method = "qcom,kpss-acc-v1";
>>>>> +          device_type = "cpu";
>>>>> +          reg = <0>;
>>>>> +          qcom,acc = <&acc0>;
>>>>> +          qcom,saw = <&saw0>;
>>>>> +          clocks = <&kraitcc 0>;
>>>>> +          clock-names = "cpu";
>>>>> +          cpu-supply = <&smb208_s2a>;
>>>>> +          operating-points-v2 = <&cpu_opp_table>;
>>>>> +  };
>>>>> +
>>>>> +  qcom,pvs {
>>>>> +          qcom,pvs-format-a;
>>>>> +  };
>>>>
>>>> Not sure what Rob is going to say on that :)
>>>>
>>>
>>>  Yes. Would be good to know the best way.
>>
>> Seems like this should be a property of an efuse node either implied by
>> the compatible or a separate property. What determines format A vs. B?
>>
>
>  Yes, this efuse registers are part of the eeprom (qfprom) tied to the soc.
>  So this property (details like bitfields and register offsets that it represents)
>  can be put soc specific and nvmem apis can be used to read
>  the registers. Does something like below look ok ?
>
>  qcom,pvs {
>         compatible = "qcom,pvs-ipq8064";
>         nvmem-cells = <&pvs_efuse>;
>  }

Why do you need this node? It doesn't look like it corresponds to a
h/w block. It looks like you are just creating it to instantiate a
driver.

>  qfprom: qfprom at 700000 {
>         compatible      = "qcom,qfprom";

Either this or...

>         reg             = <0x00700000 0x1000>;
>         #address-cells  = <1>;
>         #size-cells     = <1>;
>         ranges;
>         pvs_efuse: pvs {

a compatible here should be specific enough so the OS can know what
the bits are.

>         reg = <0xc0 0x8>;
>         };
>  };

^ permalink raw reply

* [PATCH 10/11 v2] ARM: s3c24xx/s3c64xx: constify gpio_led
From: Krzysztof Kozlowski @ 2017-12-26 17:42 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <adb77ba31b66d391a49a12434dfe7811e8a8ba0f.1514267721.git.arvind.yadav.cs@gmail.com>

On Tue, Dec 26, 2017 at 7:37 AM, Arvind Yadav <arvind.yadav.cs@gmail.com> wrote:
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Please write one-sentence long, easy to understand message describing
the change.

Best regards,
Krzysztof

> ---
> changes in v2:
>               The GPIO LED driver can be built as a module, it can
>               be loaded after the init sections have gone away.
>               So removed '__initconst'.
>
>  arch/arm/mach-s3c24xx/mach-h1940.c    | 2 +-
>  arch/arm/mach-s3c24xx/mach-rx1950.c   | 2 +-
>  arch/arm/mach-s3c64xx/mach-hmt.c      | 2 +-
>  arch/arm/mach-s3c64xx/mach-smartq5.c  | 2 +-
>  arch/arm/mach-s3c64xx/mach-smartq7.c  | 2 +-
>  arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +-
>  6 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
> index 7ed7861..6a3e0e6 100644
> --- a/arch/arm/mach-s3c24xx/mach-h1940.c
> +++ b/arch/arm/mach-s3c24xx/mach-h1940.c
> @@ -413,7 +413,7 @@ int h1940_led_blink_set(struct gpio_desc *desc, int state,
>  }
>  EXPORT_SYMBOL(h1940_led_blink_set);
>
> -static struct gpio_led h1940_leds_desc[] = {
> +static const struct gpio_led h1940_leds_desc[] = {
>         {
>                 .name                   = "Green",
>                 .default_trigger        = "main-battery-full",
> diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
> index e86ad6a..97bb6a5 100644
> --- a/arch/arm/mach-s3c24xx/mach-rx1950.c
> +++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
> @@ -295,7 +295,7 @@ static int rx1950_led_blink_set(struct gpio_desc *desc, int state,
>         return 0;
>  }
>
> -static struct gpio_led rx1950_leds_desc[] = {
> +static const struct gpio_led rx1950_leds_desc[] = {
>         {
>                 .name                   = "Green",
>                 .default_trigger        = "main-battery-full",
> diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c
> index 59b5531..f8d644f 100644
> --- a/arch/arm/mach-s3c64xx/mach-hmt.c
> +++ b/arch/arm/mach-s3c64xx/mach-hmt.c
> @@ -207,7 +207,7 @@ static struct s3c2410_platform_nand hmt_nand_info = {
>         .ecc_mode       = NAND_ECC_SOFT,
>  };
>
> -static struct gpio_led hmt_leds[] = {
> +static const struct gpio_led hmt_leds[] = {
>         { /* left function keys */
>                 .name                   = "left:blue",
>                 .gpio                   = S3C64XX_GPO(12),
> diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c
> index 0972b6c..5a7cd8f 100644
> --- a/arch/arm/mach-s3c64xx/mach-smartq5.c
> +++ b/arch/arm/mach-s3c64xx/mach-smartq5.c
> @@ -35,7 +35,7 @@
>  #include "common.h"
>  #include "mach-smartq.h"
>
> -static struct gpio_led smartq5_leds[] = {
> +static const struct gpio_led smartq5_leds[] = {
>         {
>                 .name                   = "smartq5:green",
>                 .active_low             = 1,
> diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c
> index 51ac1c6..9de9fc2 100644
> --- a/arch/arm/mach-s3c64xx/mach-smartq7.c
> +++ b/arch/arm/mach-s3c64xx/mach-smartq7.c
> @@ -35,7 +35,7 @@
>  #include "common.h"
>  #include "mach-smartq.h"
>
> -static struct gpio_led smartq7_leds[] = {
> +static const struct gpio_led smartq7_leds[] = {
>         {
>                 .name                   = "smartq7:red",
>                 .active_low             = 1,
> diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> index 92ec8c3..be9d98f 100644
> --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> @@ -497,7 +497,7 @@ static struct wm8350_platform_data __initdata smdk6410_wm8350_pdata = {
>  #endif
>
>  #ifdef CONFIG_SMDK6410_WM1192_EV1
> -static struct gpio_led wm1192_pmic_leds[] = {
> +static const struct gpio_led wm1192_pmic_leds[] = {
>         {
>                 .name = "PMIC:red:power",
>                 .gpio = GPIO_BOARD_START + 3,
> --
> 2.7.4
>

^ permalink raw reply

* [PATCH] ARM: dts: imx6qdl-hummingboard2: Remove leading zero in unit address
From: Fabio Estevam @ 2017-12-26 17:55 UTC (permalink / raw)
  To: linux-arm-kernel

From: Fabio Estevam <fabio.estevam@nxp.com>

Remove the leading zero from unit address to fix the following build
warning with W=1:

arch/arm/boot/dts/imx6dl-hummingboard2.dtb: Warning (unit_address_format): Node /soc/aips-bus at 2100000/i2c at 21a0000/codec at 0a unit name should not have leading 0s

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
index 117c4da..dffbc92 100644
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
@@ -188,7 +188,7 @@
 		reg = <0x68>;
 	};
 
-	sgtl5000: codec at 0a {
+	sgtl5000: codec at a {
 		clocks = <&clks IMX6QDL_CLK_CKO>;
 		compatible = "fsl,sgtl5000";
 		pinctrl-names = "default";
-- 
2.7.4

^ permalink raw reply related

* [PATCH net-next v7 2/2] net: ethernet: socionext: add AVE ethernet driver
From: David Miller @ 2017-12-26 17:58 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1513854776-4149-3-git-send-email-hayashi.kunihiko@socionext.com>

From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Date: Thu, 21 Dec 2017 20:12:56 +0900

> +	writel(AVE_TXDC_ADDR_START
> +		| (((priv->tx.ndesc * priv->desc_size) << 16) & AVE_TXDC_SIZE),
> +		priv->base + AVE_TXDC);
...
> +	writel(AVE_RXDC0_ADDR_START
> +	       | (((priv->rx.ndesc * priv->desc_size) << 16) & AVE_RXDC0_SIZE),
> +	       priv->base + AVE_RXDC0);
 ...
> +	cmdsts = AVE_STS_OWN | AVE_STS_1ST | AVE_STS_LAST
> +		| (skb->len & AVE_STS_PKTLEN_TX_MASK);

Please do not begin lines with operators, instead put them at the end
of the previous line, f.e.:

	cmdsts = AVE_STS_OWN | AVE_STS_1ST | AVE_STS_LAST |
		 (skb->len & AVE_STS_PKTLEN_TX_MASK);

Thank you.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox