Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] modversions: treat symbol CRCs as 32 bit quantities on 64 bit archs
From: Ard Biesheuvel @ 2016-10-26 13:04 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <871sz3xw1s.fsf@concordia.ellerman.id.au>

On 26 October 2016 at 11:07, Michael Ellerman <mpe@ellerman.id.au> wrote:
> Hi Ard,
>
> I like the concept, but ...
>
> Ard Biesheuvel <ard.biesheuvel@linaro.org> writes:
>> The symbol CRCs are emitted as ELF symbols, which allows us to easily
>> populate the kcrctab sections by relying on the linker to associate
>> each kcrctab slot with the correct value.
>>
>> This has two downsides:
>> - given that the CRCs are treated as pointers, we waste 4 bytes for
>>   each CRC on 64 bit architectures,
>> - on architectures that support runtime relocation, a relocation entry is
>>   emitted for each CRC value, which may take up 24 bytes of __init space
>>   (on ELF64 systems)
>>
>> This comes down to a x8 overhead in [uncompressed] kernel size. In addition,
>> each relocation has to be reverted before the CRC value can be used.
>>
>> Switching to explicit 32 bit values on 64 bit architectures fixes both
>> issues, since 32 bit values are not treated as relocatable quantities on
>> ELF64 systems, even if the value ultimately resolves to a linker supplied
>> value.
>
> Are we sure that part is true? ("not treated as relocatable")
>

Thanks for testing this.

> A quick test build on powerpc gives me:
>
>   WARNING: 6829 bad relocations
>   c000000000ca3748 R_PPC64_ADDR16    *ABS*+0x0000000013f53da6
>   c000000000ca374a R_PPC64_ADDR16    *ABS*+0x00000000f7272059
>   c000000000ca374c R_PPC64_ADDR16    *ABS*+0x0000000002013d36
>   c000000000ca374e R_PPC64_ADDR16    *ABS*+0x00000000a59dffc8
>   ...
>
> Which is coming from our relocs_check.sh script, which checks that the
> generated relocations are ones we know how to handle.
>

OK, first of all, it appears the ppc64 assembler interprets .word
differently than the arm64 one, so I will need to fold this in

"""
diff --git a/include/linux/export.h b/include/linux/export.h
index fa51ab2ad190..a000d421526d 100644
--- a/include/linux/export.h
+++ b/include/linux/export.h
@@ -54,7 +54,7 @@ extern struct module __this_module;
 #define __CRC_SYMBOL(sym, sec)                                         \
        asm("   .section \"___kcrctab" sec "+" #sym "\", \"a\"  \n"     \
            "   .weak   " VMLINUX_SYMBOL_STR(__crc_##sym) "     \n"     \
-           "   .word   " VMLINUX_SYMBOL_STR(__crc_##sym) "     \n"     \
+           "   .long   " VMLINUX_SYMBOL_STR(__crc_##sym) "     \n"     \
            "   .previous                                       \n");
 #endif
 #else
"""

With that change, the CRCs are actually emitted as

WARNING: 7525 bad relocations
c000000000ce7f50 R_PPC64_ADDR32    *ABS*+0x0000000013f53da6
c000000000ce7f54 R_PPC64_ADDR32    *ABS*+0x0000000004f7c64e
c000000000ce7f58 R_PPC64_ADDR32    *ABS*+0x0000000092be8a3e

which is still a bit disappointing, given that we still have 7525 RELA
entries to process.
I tried several thing, i.e., adding -Bsymbolic to the linker command
line, emitting the reference above as .hidden or emit  the definition
from the linker script as HIDDEN(), but nothing seems to make any
difference. (On arm64, -Bsymbolic eliminates *all* runtime relocations
except R_<arch>_RELATIVE ones)

> And when I try to boot it I get:
>
>   virtio: disagrees about version of symbol module_layout
>   virtio: disagrees about version of symbol module_layout
>   scsi_mod: disagrees about version of symbol module_layout
>
> And it can't find my root file system (unsurprisingly as it's on scsi).
>

Something like the below should fix it, I hope.

"""
diff --git a/arch/powerpc/kernel/reloc_64.S b/arch/powerpc/kernel/reloc_64.S
index d88736fbece6..99cdf2311ab5 100644
--- a/arch/powerpc/kernel/reloc_64.S
+++ b/arch/powerpc/kernel/reloc_64.S
@@ -14,6 +14,7 @@
 RELA = 7
 RELACOUNT = 0x6ffffff9
 R_PPC64_RELATIVE = 22
+R_PPC64_ADDR32 = 1

 /*
  * r3 = desired final address of kernel
@@ -77,9 +78,22 @@ _GLOBAL(relocate)
        add     r0,r0,r3
        stdx    r0,r7,r6
        addi    r9,r9,24
-       bdnz    5b
+       b       7f
+
+       /*
+        * CRCs of exported symbols are emitted as 32-bit relocations against
+        * the *ABS* section with the CRC value recorded in the addend.
+        */
+6:     cmpdi   r0,R_PPC64_ADDR32
+       bne     7f
+       ld      r6,0(r9)        /* reloc->r_offset */
+       ld      r0,16(r9)       /* reloc->r_addend */
+       stwx    r0,r7,r6
+       addi    r9,r9,24
+
+7:     bdnz    5b
+       blr

-6:     blr

 .balign 8
 p_dyn: .llong  __dynamic_start - 0b
"""

Note that the loop no longer terminates at the first
non-R_PPC64_RELATIVE relocation, but that seems safer to me in any
case. It simply stores the value of r_addend at r_offset, which is the
correct thing to do for R_PPC64_ADDR32 relocations against the *ABS*
section, regardless of whether we are dealing with CRCs or something
else. Note that the comparison above will fail for R_PPC64_ADDR32
relocations against named symbols, since we compare the entire r_info
field and not just the type (as the comment a few lines higher up
suggests)

Also a fix for relocs_check.sh:

"""
diff --git a/arch/powerpc/relocs_check.sh b/arch/powerpc/relocs_check.sh
index ec2d5c835170..2f510fbc87da 100755
--- a/arch/powerpc/relocs_check.sh
+++ b/arch/powerpc/relocs_check.sh
@@ -43,7 +43,8 @@ R_PPC_ADDR16_HA
 R_PPC_RELATIVE
 R_PPC_NONE' |
        grep -E -v '\<R_PPC64_ADDR64[[:space:]]+mach_' |
-       grep -E -v '\<R_PPC64_ADDR64[[:space:]]+__crc_'
+       grep -E -v '\<R_PPC64_ADDR64[[:space:]]+__crc_' |
+       grep -E -v '\<R_PPC64_ADDR32[[:space:]]+\*ABS\*'
 )

 if [ -z "$bad_relocs" ]; then
"""

If these changes work for PPC, I think we should fold them in.
Hopefully, GNU ld for PPC will gain that ability to resolve absolute
relocations@build time (like other architectures), and then the
R_PPC64_ADDR32 handling will simply become dead code. In any case, it
is an improvement over the mangling of CRC values to undo the runtime
relocation, imo.

Regards,
Ard.

^ permalink raw reply related

* [PATCH] ARM: sti: stih410-clocks: Add PROC_STFE as a critical clock
From: Lee Jones @ 2016-10-26 13:00 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20161026085620.GA5476@griffinp-ThinkPad-X1-Carbon-2nd>

> > > > > If the clock is enabled when Linux boots, the Linux clock framework *needs*
> > > > > to assume the hardware may have been used in previous boot stages, and it should
> > > > > not attempt to disable the clock.
> > > > 
> > > > None of the boot loaders we use do this.
> > > 
> > > But the Linux kernel isn't just used by us. It is not uncommon for STB
> > > bootloaders to get information from the frontend as part of the boot process. 
> > 
> > Okay, this is the clincher.  Since we need to support non-standard
> > bootloaders, it's difficult to guarantee that the clock will be
> > disabled at boot.  For this reason, I believe that we can call this a
> > critical clock.

> That's good news as the STi maintainer already acked and applied the patch.

Matters not.  That's why we have `git rebase` and `git revert`. ;)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply

* [PATCH v5 3/9] drm/hisilicon/hibmc: Add support for frame buffer
From: Daniel Vetter @ 2016-10-26 12:59 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <58107523.20409@huawei.com>

On Wed, Oct 26, 2016 at 05:19:31PM +0800, Rongrong Zou wrote:
> Hi Daniel,
> 
> Thansk for reviewing!
> 
> ? 2016/10/26 13:56, Daniel Vetter ??:
> > On Wed, Oct 26, 2016 at 10:37:00AM +0800, Rongrong Zou wrote:
> > > Add support for fbdev and kms fb management.
> > > 
> > > Signed-off-by: Rongrong Zou <zourongrong@gmail.com>
> > 
> > Small drive-by comment below.
> > 
> > > diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
> > > index db8d80e..d41138a 100644
> > > --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
> > > +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
> > > @@ -20,9 +20,23 @@
> > >   #define HIBMC_DRM_DRV_H
> > > 
> > >   #include <drm/drmP.h>
> > > +#include <drm/drm_fb_helper.h>
> > >   #include <drm/ttm/ttm_bo_driver.h>
> > >   #include <drm/drm_gem.h>
> > > 
> > > +struct hibmc_framebuffer {
> > > +	struct drm_framebuffer fb;
> > > +	struct drm_gem_object *obj;
> > > +	bool is_fbdev_fb;
> > > +};
> > > +
> > > +struct hibmc_fbdev {
> > > +	struct drm_fb_helper helper;
> > > +	struct hibmc_framebuffer fb;
> > 
> > I wouldn't embed the single framebuffer here, but instead have a pointer
> > and just refcount it. This here is a pattern that predates framebuffer
> > refcounting, and it leads to plenty of surprises.
> 
> will allocate fbdev in next patch version, thanks.

Not the fbdev, the hibmc_framebuffer.

> > Maybe we should update the documentation of
> > drm_framebuffer_unregister_private() to mention that it is deprecated? The
> > overview doc in drm_framebuffer.c already explains that, but I guess
> > that's not obvious enough.
> 
> Just replace drm_framebuffer_unregister_private() with
> drm_framebuffer_remove()?
> 
> I found many other drivers use the following two functions in their
> own xxx_fbdev_destroy():
> 	drm_framebuffer_unregister_private(fbdev->fb);
> 	drm_framebuffer_remove(fbdev->fb);
> so the former is redundant and can be removed directly?

They all embed the fb instead of having a pointer, because those drivers
are all older than the fb refcounting support. In general good practice is
to look at the most recently merged driver, not at all of them. Only the
most recently one has a good chance to be up-to-date with latest best
practices. The function to call would be drm_framebuffer_unreference(),
and your struct above should be

struct hibmc_fbdev {
	struct drm_fb_helper helper;
	struct hibmc_framebuffer *fb;
	...
};

Note how fb is a pointer here, not an embedded struct.
-Daniel

> 
> > 
> > Can you pls do that patch? And pls make sure it all looks pretty when
> > building the docs with
> 
> No problem, i'll send another patch later.
> 
> Regards,
> Rongrong
> 
> > 
> > $ make htmldocs
> > 
> > Thanks, Daniel
> > 
> 
> 
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply

* [PATCH 3/4] mfd: altr-a10sr: Add Arria10 SR Monitor
From: Lee Jones @ 2016-10-26 12:52 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1476394329-31696-4-git-send-email-tthayer@opensource.altera.com>

On Thu, 13 Oct 2016, tthayer at opensource.altera.com wrote:

> From: Thor Thayer <tthayer@opensource.altera.com>
> 
> Add the Altera Arria10 DevKit System Resource Monitor functionality
> to the MFD device.
> 
> Signed-off-by: Thor Thayer <tthayer@opensource.altera.com>
> ---
>  drivers/mfd/altera-a10sr.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/mfd/altera-a10sr.c b/drivers/mfd/altera-a10sr.c
> index 06e1f7f..0942d7d 100644
> --- a/drivers/mfd/altera-a10sr.c
> +++ b/drivers/mfd/altera-a10sr.c
> @@ -33,6 +33,10 @@
>  		.name = "altr_a10sr_gpio",
>  		.of_compatible = "altr,a10sr-gpio",
>  	},
> +	{
> +		.name = "altr_a10sr_mon",
> +		.of_compatible = "altr,a10sr-mon",

"-monitor" would be better in my opinion.

> +	},
>  };
>  
>  static bool altr_a10sr_reg_readable(struct device *dev, unsigned int reg)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply

* [PATCH 1/4] dt-bindings: mfd: Add Altera Arria10 SR Monitor
From: Lee Jones @ 2016-10-26 12:51 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1476394329-31696-2-git-send-email-tthayer@opensource.altera.com>

On Thu, 13 Oct 2016, tthayer at opensource.altera.com wrote:

> From: Thor Thayer <tthayer@opensource.altera.com>
> 
> Add the Arria10 DevKit System Resource Chip register and state
> monitoring module to the MFD.
> 
> Signed-off-by: Thor Thayer <tthayer@opensource.altera.com>
> ---
> Note: This needs to be applied to the bindings document that
> was Acked & Applied but didn't reach the for-next branch.
> See https://patchwork.ozlabs.org/patch/629397/
> ---
> ---
>  .../devicetree/bindings/mfd/altera-a10sr.txt       |    9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/altera-a10sr.txt b/Documentation/devicetree/bindings/mfd/altera-a10sr.txt
> index ea151f2..0787ec6 100644
> --- a/Documentation/devicetree/bindings/mfd/altera-a10sr.txt
> +++ b/Documentation/devicetree/bindings/mfd/altera-a10sr.txt
> @@ -18,6 +18,7 @@ The A10SR consists of these sub-devices:
>  Device                   Description
>  ------                   ----------
>  a10sr_gpio               GPIO Controller
> +a10sr_monitor            Register and State Monitoring
>  
>  Arria10 GPIO
>  Required Properties:
> @@ -27,6 +28,10 @@ Required Properties:
>                        the second cell is used to specify flags.
>                        See ../gpio/gpio.txt for more information.
>  
> +Arria10 Register and State Monitor
> +Required Properties:
> +- compatible        : Should be "altr,a10sr-mon"

Why not "-monitor"?

>  Example:
>  
>          resource-manager at 0 {
> @@ -43,4 +48,8 @@ Example:
>  			gpio-controller;
>  			#gpio-cells = <2>;
>  		};
> +
> +		a10sr_monitor {
> +			compatible = "altr,a10sr-mon";
> +		};
>  	};

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply

* [PATCH v2] ARM: davinci: da8xx: Fix some redefined symbol warnings
From: Alexandre Bailon @ 2016-10-26 12:39 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <3dc1c2c2-c4c5-07d0-3d3e-b8d917adda81@ti.com>

On 10/26/2016 01:57 PM, Sekhar Nori wrote:
> On Tuesday 25 October 2016 05:41 PM, Alexandre Bailon wrote:
>> Some macro for DA8xx CFGCHIP are defined in usb-davinci.h,
>> but da8xx-cfgchip.h intend to replace them.
>> The usb-da8xx.c is using both headers, causing redefined symbol warnings.
>> Remove the macro and update the da830-evm board file to use da8xx-cfgchip.h
>>
>> Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
> 
> This leads to build error on v4.9-rc2:
Oops! Sorry for that. I will  fit it.
> 
> arch/arm/mach-davinci/board-da830-evm.c: In function 'da830_evm_usb_init':
> arch/arm/mach-davinci/board-da830-evm.c:120:15: error: 'CFGCHIP2_REFFREQ' undeclared (first use in this function)
>   cfgchip2 &= ~CFGCHIP2_REFFREQ;
> 
> Thanks,
> Sekhar
> 

^ permalink raw reply

* [PATCH v3] ARM: davinci: da8xx: Fix some redefined symbol warnings
From: Alexandre Bailon @ 2016-10-26 12:39 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1477485542-10555-1-git-send-email-abailon@baylibre.com>

Some macro for DA8xx CFGCHIP are defined in usb-davinci.h,
but da8xx-cfgchip.h intend to replace them.
The usb-da8xx.c is using both headers, causing redefined symbol warnings.
Remove the macro and update the board files to use da8xx-cfgchip.h

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
---
 arch/arm/mach-davinci/board-da830-evm.c     |  5 +++--
 arch/arm/mach-davinci/board-omapl138-hawk.c |  3 ++-
 include/linux/platform_data/usb-davinci.h   | 23 -----------------------
 3 files changed, 5 insertions(+), 26 deletions(-)

diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index 3d8cf8c..32ee227 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -27,6 +27,7 @@
 #include <linux/platform_data/mtd-davinci-aemif.h>
 #include <linux/platform_data/spi-davinci.h>
 #include <linux/platform_data/usb-davinci.h>
+#include <linux/mfd/da8xx-cfgchip.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -116,7 +117,7 @@ static __init void da830_evm_usb_init(void)
 	cfgchip2 = __raw_readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG));
 
 	/* USB2.0 PHY reference clock is 24 MHz */
-	cfgchip2 &= ~CFGCHIP2_REFFREQ;
+	cfgchip2 &= ~CFGCHIP2_REFFREQ_MASK;
 	cfgchip2 |=  CFGCHIP2_REFFREQ_24MHZ;
 
 	/*
@@ -133,7 +134,7 @@ static __init void da830_evm_usb_init(void)
 	 * controller won't be able to drive VBUS thinking that it's a B-device.
 	 * Otherwise, we want to use the OTG mode and enable VBUS comparators.
 	 */
-	cfgchip2 &= ~CFGCHIP2_OTGMODE;
+	cfgchip2 &= ~CFGCHIP2_OTGMODE_MASK;
 #ifdef	CONFIG_USB_MUSB_HOST
 	cfgchip2 |=  CFGCHIP2_FORCE_HOST;
 #else
diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c
index ee62486..5774742 100644
--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
+++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
@@ -14,6 +14,7 @@
 #include <linux/console.h>
 #include <linux/gpio.h>
 #include <linux/platform_data/gpio-davinci.h>
+#include <linux/mfd/da8xx-cfgchip.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -254,7 +255,7 @@ static __init void omapl138_hawk_usb_init(void)
 	/* Setup the Ref. clock frequency for the HAWK at 24 MHz. */
 
 	cfgchip2 = __raw_readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG));
-	cfgchip2 &= ~CFGCHIP2_REFFREQ;
+	cfgchip2 &= ~CFGCHIP2_REFFREQ_MASK;
 	cfgchip2 |=  CFGCHIP2_REFFREQ_24MHZ;
 	__raw_writel(cfgchip2, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG));
 
diff --git a/include/linux/platform_data/usb-davinci.h b/include/linux/platform_data/usb-davinci.h
index e0bc4ab..0926e99 100644
--- a/include/linux/platform_data/usb-davinci.h
+++ b/include/linux/platform_data/usb-davinci.h
@@ -11,29 +11,6 @@
 #ifndef __ASM_ARCH_USB_H
 #define __ASM_ARCH_USB_H
 
-/* DA8xx CFGCHIP2 (USB 2.0 PHY Control) register bits */
-#define CFGCHIP2_PHYCLKGD	(1 << 17)
-#define CFGCHIP2_VBUSSENSE	(1 << 16)
-#define CFGCHIP2_RESET		(1 << 15)
-#define CFGCHIP2_OTGMODE	(3 << 13)
-#define CFGCHIP2_NO_OVERRIDE	(0 << 13)
-#define CFGCHIP2_FORCE_HOST	(1 << 13)
-#define CFGCHIP2_FORCE_DEVICE 	(2 << 13)
-#define CFGCHIP2_FORCE_HOST_VBUS_LOW (3 << 13)
-#define CFGCHIP2_USB1PHYCLKMUX	(1 << 12)
-#define CFGCHIP2_USB2PHYCLKMUX	(1 << 11)
-#define CFGCHIP2_PHYPWRDN	(1 << 10)
-#define CFGCHIP2_OTGPWRDN	(1 << 9)
-#define CFGCHIP2_DATPOL 	(1 << 8)
-#define CFGCHIP2_USB1SUSPENDM	(1 << 7)
-#define CFGCHIP2_PHY_PLLON	(1 << 6)	/* override PLL suspend */
-#define CFGCHIP2_SESENDEN	(1 << 5)	/* Vsess_end comparator */
-#define CFGCHIP2_VBDTCTEN	(1 << 4)	/* Vbus comparator */
-#define CFGCHIP2_REFFREQ	(0xf << 0)
-#define CFGCHIP2_REFFREQ_12MHZ	(1 << 0)
-#define CFGCHIP2_REFFREQ_24MHZ	(2 << 0)
-#define CFGCHIP2_REFFREQ_48MHZ	(3 << 0)
-
 struct	da8xx_ohci_root_hub;
 
 typedef void (*da8xx_ocic_handler_t)(struct da8xx_ohci_root_hub *hub,
-- 
2.7.3

^ permalink raw reply related

* [PATCH v3] Fix some potential warnings
From: Alexandre Bailon @ 2016-10-26 12:39 UTC (permalink / raw)
  To: linux-arm-kernel

Some changes I'm working on causes some warning because two included
headers defines the same macros.

Change in V2:
Update the d830 evm board file to use the da8xx-cfgchip.h
These changes are required as I'm sending this patch apart from
the series "[PATCH/RFT v2 00/17] Add DT support for ohci-da8xx"

Change in v3:
Fix build issues happening in omapl138 hawk and da830 evm board files.

Alexandre Bailon (1):
  ARM: davinci: da8xx: Fix some redefined symbol warnings

 arch/arm/mach-davinci/board-da830-evm.c     |  5 +++--
 arch/arm/mach-davinci/board-omapl138-hawk.c |  3 ++-
 include/linux/platform_data/usb-davinci.h   | 23 -----------------------
 3 files changed, 5 insertions(+), 26 deletions(-)

-- 
2.7.3

^ permalink raw reply

* [PATCH 0/7] mfd: Fix all W=1 warnings
From: Lee Jones @ 2016-10-26 12:27 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <5506538.euWBouSNJd@wuerfel>

On Thu, 15 Sep 2016, Arnd Bergmann wrote:

> On Thursday, September 15, 2016 11:45:14 AM CEST Lee Jones wrote:
> > It really is as simple as it sounds!
> > 
> 
> I seem to have one that you didn't find.

Applied, thanks.

> 8<--------
> From 6c63171eba728fc6d8bc6358884deaccd4cee33d Mon Sep 17 00:00:00 2001
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Thu, 4 Aug 2016 15:28:51 +0200
> Subject: [PATCH] mfd: tps65912: move regmap config into core driver
> 
> When building with extra warnings enabled, most files including
> linux/mfd/tps65912.h warn about a static variable defined in the
> header:
> 
> include/linux/mfd/tps65912.h:331:35: warning: 'tps65912_regmap_config' defined but not used [-Wunused-const-variable=]
> 
> We also duplicate the data structure between the i2c and spi front-end
> drivers. Moving it into the driver code avoids the warning and
> the duplication.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> diff --git a/drivers/mfd/tps65912-core.c b/drivers/mfd/tps65912-core.c
> index a88cfa80dbc4..f33567bc428d 100644
> --- a/drivers/mfd/tps65912-core.c
> +++ b/drivers/mfd/tps65912-core.c
> @@ -77,6 +77,23 @@ static struct regmap_irq_chip tps65912_irq_chip = {
>  	.init_ack_masked = true,
>  };
>  
> +static const struct regmap_range tps65912_yes_ranges[] = {
> +	regmap_reg_range(TPS65912_INT_STS, TPS65912_GPIO5),
> +};
> +
> +static const struct regmap_access_table tps65912_volatile_table = {
> +	.yes_ranges = tps65912_yes_ranges,
> +	.n_yes_ranges = ARRAY_SIZE(tps65912_yes_ranges),
> +};
> +
> +const struct regmap_config tps65912_regmap_config = {
> +	.reg_bits = 8,
> +	.val_bits = 8,
> +	.cache_type = REGCACHE_RBTREE,
> +	.volatile_table = &tps65912_volatile_table,
> +};
> +EXPORT_SYMBOL_GPL(tps65912_regmap_config);
> +
>  int tps65912_device_init(struct tps65912 *tps)
>  {
>  	int ret;
> diff --git a/include/linux/mfd/tps65912.h b/include/linux/mfd/tps65912.h
> index 1a603701550e..b25d0297ba88 100644
> --- a/include/linux/mfd/tps65912.h
> +++ b/include/linux/mfd/tps65912.h
> @@ -319,21 +319,7 @@ struct tps65912 {
>  	struct regmap_irq_chip_data *irq_data;
>  };
>  
> -static const struct regmap_range tps65912_yes_ranges[] = {
> -	regmap_reg_range(TPS65912_INT_STS, TPS65912_GPIO5),
> -};
> -
> -static const struct regmap_access_table tps65912_volatile_table = {
> -	.yes_ranges = tps65912_yes_ranges,
> -	.n_yes_ranges = ARRAY_SIZE(tps65912_yes_ranges),
> -};
> -
> -static const struct regmap_config tps65912_regmap_config = {
> -	.reg_bits = 8,
> -	.val_bits = 8,
> -	.cache_type = REGCACHE_RBTREE,
> -	.volatile_table = &tps65912_volatile_table,
> -};
> +extern const struct regmap_config tps65912_regmap_config;
>  
>  int tps65912_device_init(struct tps65912 *tps);
>  int tps65912_device_exit(struct tps65912 *tps);
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply

* Pinctrl nodes missing for USB
From: Anand Moon @ 2016-10-26 12:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hi All,

I have tried to enable CONFIG_DEBUG_PINCTRL=y on Odroid XU4.
Just to try to understand the feature.
Is this feature suppoted for USB nodes.

Below is the output of failed to pase pinctrl for USB nodes via dts.

[   11.627809] samsung-pinctrl 13400000.pinctrl: request pin 39
(gpx3-7) for gpx3:39
[   11.726818] xhci-hcd xhci-hcd.2.auto: no of_node; not parsing pinctrl DT
[   11.801452] usb usb3: no of_node; not parsing pinctrl DT
[   11.805471] hub 3-0:1.0: no of_node; not parsing pinctrl DT
[   11.883263] usb usb4: no of_node; not parsing pinctrl DT
[   11.887362] hub 4-0:1.0: no of_node; not parsing pinctrl DT
[   11.926683] xhci-hcd xhci-hcd.5.auto: no of_node; not parsing pinctrl DT
[   11.999588] usb usb5: no of_node; not parsing pinctrl DT
[   12.003208] hub 5-0:1.0: no of_node; not parsing pinctrl DT
[   12.085100] usb usb6: no of_node; not parsing pinctrl DT
[   12.088936] hub 6-0:1.0: no of_node; not parsing pinctrl DT
[   12.491299] usb 3-1: no of_node; not parsing pinctrl DT
[   12.528446] hub 3-1:1.0: no of_node; not parsing pinctrl DT
[   12.555071] usb 4-1: no of_node; not parsing pinctrl DT
[   12.611412] hub 4-1:1.0: no of_node; not parsing pinctrl DT
[   13.020668] usb 4-1.1: no of_node; not parsing pinctrl DT
[   13.081803] usb-storage 4-1.1:1.0: no of_node; not parsing pinctrl DT
[   13.091721] usb 5-1: no of_node; not parsing pinctrl DT
[   13.127124] r8152 5-1:2.0: no of_node; not parsing pinctrl DT
[   13.208321] r8152 5-1:1.0: no of_node; not parsing pinctrl DT
[   14.281196] sd 0:0:0:0: no of_node; not parsing pinctrl DT
[   16.057197] usb 4-1.2: no of_node; not parsing pinctrl DT
[   16.079507] usb-storage 4-1.2:1.0: no of_node; not parsing pinctrl DT
[   17.236626] sd 1:0:0:0: no of_node; not parsing pinctrl DT
[   17.612139] usbhid 2-1:1.0: no of_node; not parsing pinctrl DT
[   17.625511] usbhid 2-1:1.1: no of_node; not parsing pinctrl DT
[   17.755059] hid-generic 0003:24AE:1000.0001: no of_node; not
parsing pinctrl DT
[   17.933665] hid-generic 0003:24AE:1000.0002: no of_node; not
parsing pinctrl DT
[ 1009.259380] usb 4-1.2: no of_node; not parsing pinctrl DT
[ 1009.267240] usb-storage 4-1.2:1.0: no of_node; not parsing pinctrl DT
[ 1010.311832] sd 1:0:0:0: no of_node; not parsing pinctrl DT


Below is the complete output of dmesg | grep pinctr
-------------------------------------
root at odroidcsh:/usr/src/odroidxu3-4.y-devel# dmesg | grep pinc
[    1.704176] pinctrl core: initialized pinctrl subsystem
[    1.716053] reg-dummy reg-dummy: no of_node; not parsing pinctrl DT
[    2.221885] samsung-pinctrl 13400000.pinctrl: try to register 40 pins ...
[    2.221925] pinctrl core: registered pin 0 (gpy7-0) on samsung-pinctrl
[    2.222005] pinctrl core: registered pin 1 (gpy7-1) on samsung-pinctrl
[    2.222041] pinctrl core: registered pin 2 (gpy7-2) on samsung-pinctrl
[    2.222077] pinctrl core: registered pin 3 (gpy7-3) on samsung-pinctrl
[    2.222113] pinctrl core: registered pin 4 (gpy7-4) on samsung-pinctrl
[    2.222148] pinctrl core: registered pin 5 (gpy7-5) on samsung-pinctrl
[    2.222183] pinctrl core: registered pin 6 (gpy7-6) on samsung-pinctrl
[    2.222217] pinctrl core: registered pin 7 (gpy7-7) on samsung-pinctrl
[    2.222275] pinctrl core: registered pin 8 (gpx0-0) on samsung-pinctrl
[    2.222320] pinctrl core: registered pin 9 (gpx0-1) on samsung-pinctrl
[    2.222364] pinctrl core: registered pin 10 (gpx0-2) on samsung-pinctrl
[    2.222406] pinctrl core: registered pin 11 (gpx0-3) on samsung-pinctrl
[    2.222449] pinctrl core: registered pin 12 (gpx0-4) on samsung-pinctrl
[    2.222491] pinctrl core: registered pin 13 (gpx0-5) on samsung-pinctrl
[    2.222532] pinctrl core: registered pin 14 (gpx0-6) on samsung-pinctrl
[    2.222573] pinctrl core: registered pin 15 (gpx0-7) on samsung-pinctrl
[    2.222614] pinctrl core: registered pin 16 (gpx1-0) on samsung-pinctrl
[    2.222653] pinctrl core: registered pin 17 (gpx1-1) on samsung-pinctrl
[    2.222693] pinctrl core: registered pin 18 (gpx1-2) on samsung-pinctrl
[    2.222732] pinctrl core: registered pin 19 (gpx1-3) on samsung-pinctrl
[    2.222771] pinctrl core: registered pin 20 (gpx1-4) on samsung-pinctrl
[    2.222809] pinctrl core: registered pin 21 (gpx1-5) on samsung-pinctrl
[    2.222847] pinctrl core: registered pin 22 (gpx1-6) on samsung-pinctrl
[    2.222885] pinctrl core: registered pin 23 (gpx1-7) on samsung-pinctrl
[    2.222922] pinctrl core: registered pin 24 (gpx2-0) on samsung-pinctrl
[    2.222958] pinctrl core: registered pin 25 (gpx2-1) on samsung-pinctrl
[    2.222994] pinctrl core: registered pin 26 (gpx2-2) on samsung-pinctrl
[    2.223030] pinctrl core: registered pin 27 (gpx2-3) on samsung-pinctrl
[    2.223065] pinctrl core: registered pin 28 (gpx2-4) on samsung-pinctrl
[    2.223100] pinctrl core: registered pin 29 (gpx2-5) on samsung-pinctrl
[    2.223134] pinctrl core: registered pin 30 (gpx2-6) on samsung-pinctrl
[    2.223168] pinctrl core: registered pin 31 (gpx2-7) on samsung-pinctrl
[    2.223202] pinctrl core: registered pin 32 (gpx3-0) on samsung-pinctrl
[    2.223258] pinctrl core: registered pin 33 (gpx3-1) on samsung-pinctrl
[    2.223302] pinctrl core: registered pin 34 (gpx3-2) on samsung-pinctrl
[    2.223345] pinctrl core: registered pin 35 (gpx3-3) on samsung-pinctrl
[    2.223388] pinctrl core: registered pin 36 (gpx3-4) on samsung-pinctrl
[    2.223430] pinctrl core: registered pin 37 (gpx3-5) on samsung-pinctrl
[    2.223471] pinctrl core: registered pin 38 (gpx3-6) on samsung-pinctrl
[    2.223512] pinctrl core: registered pin 39 (gpx3-7) on samsung-pinctrl
[    2.324367] samsung-pinctrl 13410000.pinctrl: try to register 85 pins ...
[    2.324441] pinctrl core: registered pin 40 (gpc0-0) on samsung-pinctrl
[    2.324501] pinctrl core: registered pin 41 (gpc0-1) on samsung-pinctrl
[    2.324547] pinctrl core: registered pin 42 (gpc0-2) on samsung-pinctrl
[    2.324591] pinctrl core: registered pin 43 (gpc0-3) on samsung-pinctrl
[    2.324634] pinctrl core: registered pin 44 (gpc0-4) on samsung-pinctrl
[    2.324676] pinctrl core: registered pin 45 (gpc0-5) on samsung-pinctrl
[    2.324718] pinctrl core: registered pin 46 (gpc0-6) on samsung-pinctrl
[    2.324760] pinctrl core: registered pin 47 (gpc0-7) on samsung-pinctrl
[    2.324801] pinctrl core: registered pin 48 (gpc1-0) on samsung-pinctrl
[    2.324841] pinctrl core: registered pin 49 (gpc1-1) on samsung-pinctrl
[    2.324881] pinctrl core: registered pin 50 (gpc1-2) on samsung-pinctrl
[    2.324921] pinctrl core: registered pin 51 (gpc1-3) on samsung-pinctrl
[    2.324960] pinctrl core: registered pin 52 (gpc1-4) on samsung-pinctrl
[    2.324999] pinctrl core: registered pin 53 (gpc1-5) on samsung-pinctrl
[    2.325038] pinctrl core: registered pin 54 (gpc1-6) on samsung-pinctrl
[    2.325076] pinctrl core: registered pin 55 (gpc1-7) on samsung-pinctrl
[    2.325113] pinctrl core: registered pin 56 (gpc2-0) on samsung-pinctrl
[    2.325151] pinctrl core: registered pin 57 (gpc2-1) on samsung-pinctrl
[    2.325187] pinctrl core: registered pin 58 (gpc2-2) on samsung-pinctrl
[    2.325224] pinctrl core: registered pin 59 (gpc2-3) on samsung-pinctrl
[    2.325259] pinctrl core: registered pin 60 (gpc2-4) on samsung-pinctrl
[    2.325295] pinctrl core: registered pin 61 (gpc2-5) on samsung-pinctrl
[    2.325330] pinctrl core: registered pin 62 (gpc2-6) on samsung-pinctrl
[    2.325365] pinctrl core: registered pin 63 (gpc3-0) on samsung-pinctrl
[    2.325468] pinctrl core: registered pin 64 (gpc3-1) on samsung-pinctrl
[    2.325503] pinctrl core: registered pin 65 (gpc3-2) on samsung-pinctrl
[    2.325560] pinctrl core: registered pin 66 (gpc3-3) on samsung-pinctrl
[    2.325604] pinctrl core: registered pin 67 (gpc4-0) on samsung-pinctrl
[    2.325647] pinctrl core: registered pin 68 (gpc4-1) on samsung-pinctrl
[    2.325795] pinctrl core: registered pin 69 (gpd1-0) on samsung-pinctrl
[    2.325839] pinctrl core: registered pin 70 (gpd1-1) on samsung-pinctrl
[    2.325881] pinctrl core: registered pin 71 (gpd1-2) on samsung-pinctrl
[    2.325923] pinctrl core: registered pin 72 (gpd1-3) on samsung-pinctrl
[    2.325963] pinctrl core: registered pin 73 (gpd1-4) on samsung-pinctrl
[    2.326004] pinctrl core: registered pin 74 (gpd1-5) on samsung-pinctrl
[    2.326044] pinctrl core: registered pin 75 (gpd1-6) on samsung-pinctrl
[    2.326084] pinctrl core: registered pin 76 (gpd1-7) on samsung-pinctrl
[    2.326123] pinctrl core: registered pin 77 (gpy0-0) on samsung-pinctrl
[    2.326163] pinctrl core: registered pin 78 (gpy0-1) on samsung-pinctrl
[    2.326201] pinctrl core: registered pin 79 (gpy0-2) on samsung-pinctrl
[    2.326239] pinctrl core: registered pin 80 (gpy0-3) on samsung-pinctrl
[    2.326277] pinctrl core: registered pin 81 (gpy0-4) on samsung-pinctrl
[    2.326314] pinctrl core: registered pin 82 (gpy0-5) on samsung-pinctrl
[    2.326351] pinctrl core: registered pin 83 (gpy1-0) on samsung-pinctrl
[    2.326387] pinctrl core: registered pin 84 (gpy1-1) on samsung-pinctrl
[    2.326423] pinctrl core: registered pin 85 (gpy1-2) on samsung-pinctrl
[    2.326459] pinctrl core: registered pin 86 (gpy1-3) on samsung-pinctrl
[    2.326493] pinctrl core: registered pin 87 (gpy2-0) on samsung-pinctrl
[    2.326528] pinctrl core: registered pin 88 (gpy2-1) on samsung-pinctrl
[    2.326562] pinctrl core: registered pin 89 (gpy2-2) on samsung-pinctrl
[    2.326596] pinctrl core: registered pin 90 (gpy2-3) on samsung-pinctrl
[    2.326653] pinctrl core: registered pin 91 (gpy2-4) on samsung-pinctrl
[    2.326697] pinctrl core: registered pin 92 (gpy2-5) on samsung-pinctrl
[    2.326740] pinctrl core: registered pin 93 (gpy3-0) on samsung-pinctrl
[    2.326782] pinctrl core: registered pin 94 (gpy3-1) on samsung-pinctrl
[    2.326824] pinctrl core: registered pin 95 (gpy3-2) on samsung-pinctrl
[    2.326866] pinctrl core: registered pin 96 (gpy3-3) on samsung-pinctrl
[    2.326908] pinctrl core: registered pin 97 (gpy3-4) on samsung-pinctrl
[    2.326949] pinctrl core: registered pin 98 (gpy3-5) on samsung-pinctrl
[    2.326990] pinctrl core: registered pin 99 (gpy3-6) on samsung-pinctrl
[    2.327030] pinctrl core: registered pin 100 (gpy3-7) on samsung-pinctrl
[    2.327070] pinctrl core: registered pin 101 (gpy4-0) on samsung-pinctrl
[    2.327110] pinctrl core: registered pin 102 (gpy4-1) on samsung-pinctrl
[    2.327148] pinctrl core: registered pin 103 (gpy4-2) on samsung-pinctrl
[    2.327187] pinctrl core: registered pin 104 (gpy4-3) on samsung-pinctrl
[    2.327225] pinctrl core: registered pin 105 (gpy4-4) on samsung-pinctrl
[    2.327263] pinctrl core: registered pin 106 (gpy4-5) on samsung-pinctrl
[    2.327300] pinctrl core: registered pin 107 (gpy4-6) on samsung-pinctrl
[    2.327337] pinctrl core: registered pin 108 (gpy4-7) on samsung-pinctrl
[    2.327373] pinctrl core: registered pin 109 (gpy5-0) on samsung-pinctrl
[    2.327409] pinctrl core: registered pin 110 (gpy5-1) on samsung-pinctrl
[    2.327445] pinctrl core: registered pin 111 (gpy5-2) on samsung-pinctrl
[    2.327479] pinctrl core: registered pin 112 (gpy5-3) on samsung-pinctrl
[    2.327514] pinctrl core: registered pin 113 (gpy5-4) on samsung-pinctrl
[    2.327548] pinctrl core: registered pin 114 (gpy5-5) on samsung-pinctrl
[    2.327583] pinctrl core: registered pin 115 (gpy5-6) on samsung-pinctrl
[    2.327639] pinctrl core: registered pin 116 (gpy5-7) on samsung-pinctrl
[    2.327683] pinctrl core: registered pin 117 (gpy6-0) on samsung-pinctrl
[    2.327726] pinctrl core: registered pin 118 (gpy6-1) on samsung-pinctrl
[    2.327769] pinctrl core: registered pin 119 (gpy6-2) on samsung-pinctrl
[    2.327812] pinctrl core: registered pin 120 (gpy6-3) on samsung-pinctrl
[    2.327853] pinctrl core: registered pin 121 (gpy6-4) on samsung-pinctrl
[    2.327894] pinctrl core: registered pin 122 (gpy6-5) on samsung-pinctrl
[    2.327935] pinctrl core: registered pin 123 (gpy6-6) on samsung-pinctrl
[    2.327976] pinctrl core: registered pin 124 (gpy6-7) on samsung-pinctrl
[    2.381195] samsung-pinctrl 14000000.pinctrl: try to register 46 pins ...
[    2.381304] pinctrl core: registered pin 125 (gpe0-0) on samsung-pinctrl
[    2.381343] pinctrl core: registered pin 126 (gpe0-1) on samsung-pinctrl
[    2.381381] pinctrl core: registered pin 127 (gpe0-2) on samsung-pinctrl
[    2.381452] pinctrl core: registered pin 128 (gpe0-3) on samsung-pinctrl
[    2.381489] pinctrl core: registered pin 129 (gpe0-4) on samsung-pinctrl
[    2.381526] pinctrl core: registered pin 130 (gpe0-5) on samsung-pinctrl
[    2.381562] pinctrl core: registered pin 131 (gpe0-6) on samsung-pinctrl
[    2.381597] pinctrl core: registered pin 132 (gpe0-7) on samsung-pinctrl
[    2.381633] pinctrl core: registered pin 133 (gpe1-0) on samsung-pinctrl
[    2.381668] pinctrl core: registered pin 134 (gpe1-1) on samsung-pinctrl
[    2.381702] pinctrl core: registered pin 135 (gpf0-0) on samsung-pinctrl
[    2.381737] pinctrl core: registered pin 136 (gpf0-1) on samsung-pinctrl
[    2.381794] pinctrl core: registered pin 137 (gpf0-2) on samsung-pinctrl
[    2.381838] pinctrl core: registered pin 138 (gpf0-3) on samsung-pinctrl
[    2.381881] pinctrl core: registered pin 139 (gpf0-4) on samsung-pinctrl
[    2.381923] pinctrl core: registered pin 140 (gpf0-5) on samsung-pinctrl
[    2.381965] pinctrl core: registered pin 141 (gpf1-0) on samsung-pinctrl
[    2.382006] pinctrl core: registered pin 142 (gpf1-1) on samsung-pinctrl
[    2.382048] pinctrl core: registered pin 143 (gpf1-2) on samsung-pinctrl
[    2.382089] pinctrl core: registered pin 144 (gpf1-3) on samsung-pinctrl
[    2.382129] pinctrl core: registered pin 145 (gpf1-4) on samsung-pinctrl
[    2.382169] pinctrl core: registered pin 146 (gpf1-5) on samsung-pinctrl
[    2.382209] pinctrl core: registered pin 147 (gpf1-6) on samsung-pinctrl
[    2.382248] pinctrl core: registered pin 148 (gpf1-7) on samsung-pinctrl
[    2.382287] pinctrl core: registered pin 149 (gpg0-0) on samsung-pinctrl
[    2.382326] pinctrl core: registered pin 150 (gpg0-1) on samsung-pinctrl
[    2.382363] pinctrl core: registered pin 151 (gpg0-2) on samsung-pinctrl
[    2.382400] pinctrl core: registered pin 152 (gpg0-3) on samsung-pinctrl
[    2.382437] pinctrl core: registered pin 153 (gpg0-4) on samsung-pinctrl
[    2.382473] pinctrl core: registered pin 154 (gpg0-5) on samsung-pinctrl
[    2.382509] pinctrl core: registered pin 155 (gpg0-6) on samsung-pinctrl
[    2.382544] pinctrl core: registered pin 156 (gpg0-7) on samsung-pinctrl
[    2.382580] pinctrl core: registered pin 157 (gpg1-0) on samsung-pinctrl
[    2.382614] pinctrl core: registered pin 158 (gpg1-1) on samsung-pinctrl
[    2.382649] pinctrl core: registered pin 159 (gpg1-2) on samsung-pinctrl
[    2.382683] pinctrl core: registered pin 160 (gpg1-3) on samsung-pinctrl
[    2.382717] pinctrl core: registered pin 161 (gpg1-4) on samsung-pinctrl
[    2.382774] pinctrl core: registered pin 162 (gpg1-5) on samsung-pinctrl
[    2.382818] pinctrl core: registered pin 163 (gpg1-6) on samsung-pinctrl
[    2.382861] pinctrl core: registered pin 164 (gpg1-7) on samsung-pinctrl
[    2.382903] pinctrl core: registered pin 165 (gpg2-0) on samsung-pinctrl
[    2.382945] pinctrl core: registered pin 166 (gpg2-1) on samsung-pinctrl
[    2.382987] pinctrl core: registered pin 167 (gpj4-0) on samsung-pinctrl
[    2.383027] pinctrl core: registered pin 168 (gpj4-1) on samsung-pinctrl
[    2.383068] pinctrl core: registered pin 169 (gpj4-2) on samsung-pinctrl
[    2.383108] pinctrl core: registered pin 170 (gpj4-3) on samsung-pinctrl
[    2.443773] samsung-pinctrl 14010000.pinctrl: try to register 54 pins ...
[    2.443876] pinctrl core: registered pin 171 (gpa0-0) on samsung-pinctrl
[    2.443912] pinctrl core: registered pin 172 (gpa0-1) on samsung-pinctrl
[    2.443948] pinctrl core: registered pin 173 (gpa0-2) on samsung-pinctrl
[    2.443983] pinctrl core: registered pin 174 (gpa0-3) on samsung-pinctrl
[    2.444041] pinctrl core: registered pin 175 (gpa0-4) on samsung-pinctrl
[    2.444085] pinctrl core: registered pin 176 (gpa0-5) on samsung-pinctrl
[    2.444129] pinctrl core: registered pin 177 (gpa0-6) on samsung-pinctrl
[    2.444172] pinctrl core: registered pin 178 (gpa0-7) on samsung-pinctrl
[    2.444213] pinctrl core: registered pin 179 (gpa1-0) on samsung-pinctrl
[    2.444255] pinctrl core: registered pin 180 (gpa1-1) on samsung-pinctrl
[    2.444297] pinctrl core: registered pin 181 (gpa1-2) on samsung-pinctrl
[    2.444338] pinctrl core: registered pin 182 (gpa1-3) on samsung-pinctrl
[    2.444379] pinctrl core: registered pin 183 (gpa1-4) on samsung-pinctrl
[    2.444419] pinctrl core: registered pin 184 (gpa1-5) on samsung-pinctrl
[    2.444458] pinctrl core: registered pin 185 (gpa2-0) on samsung-pinctrl
[    2.444497] pinctrl core: registered pin 186 (gpa2-1) on samsung-pinctrl
[    2.444536] pinctrl core: registered pin 187 (gpa2-2) on samsung-pinctrl
[    2.444575] pinctrl core: registered pin 188 (gpa2-3) on samsung-pinctrl
[    2.444612] pinctrl core: registered pin 189 (gpa2-4) on samsung-pinctrl
[    2.444650] pinctrl core: registered pin 190 (gpa2-5) on samsung-pinctrl
[    2.444687] pinctrl core: registered pin 191 (gpa2-6) on samsung-pinctrl
[    2.444756] pinctrl core: registered pin 192 (gpa2-7) on samsung-pinctrl
[    2.444792] pinctrl core: registered pin 193 (gpb0-0) on samsung-pinctrl
[    2.444828] pinctrl core: registered pin 194 (gpb0-1) on samsung-pinctrl
[    2.444864] pinctrl core: registered pin 195 (gpb0-2) on samsung-pinctrl
[    2.444899] pinctrl core: registered pin 196 (gpb0-3) on samsung-pinctrl
[    2.444934] pinctrl core: registered pin 197 (gpb0-4) on samsung-pinctrl
[    2.444968] pinctrl core: registered pin 198 (gpb1-0) on samsung-pinctrl
[    2.445002] pinctrl core: registered pin 199 (gpb1-1) on samsung-pinctrl
[    2.445059] pinctrl core: registered pin 200 (gpb1-2) on samsung-pinctrl
[    2.445102] pinctrl core: registered pin 201 (gpb1-3) on samsung-pinctrl
[    2.445145] pinctrl core: registered pin 202 (gpb1-4) on samsung-pinctrl
[    2.445188] pinctrl core: registered pin 203 (gpb2-0) on samsung-pinctrl
[    2.445231] pinctrl core: registered pin 204 (gpb2-1) on samsung-pinctrl
[    2.445273] pinctrl core: registered pin 205 (gpb2-2) on samsung-pinctrl
[    2.445314] pinctrl core: registered pin 206 (gpb2-3) on samsung-pinctrl
[    2.445355] pinctrl core: registered pin 207 (gpb3-0) on samsung-pinctrl
[    2.445395] pinctrl core: registered pin 208 (gpb3-1) on samsung-pinctrl
[    2.445435] pinctrl core: registered pin 209 (gpb3-2) on samsung-pinctrl
[    2.445475] pinctrl core: registered pin 210 (gpb3-3) on samsung-pinctrl
[    2.445514] pinctrl core: registered pin 211 (gpb3-4) on samsung-pinctrl
[    2.445553] pinctrl core: registered pin 212 (gpb3-5) on samsung-pinctrl
[    2.445591] pinctrl core: registered pin 213 (gpb3-6) on samsung-pinctrl
[    2.445629] pinctrl core: registered pin 214 (gpb3-7) on samsung-pinctrl
[    2.445766] pinctrl core: registered pin 215 (gpb4-0) on samsung-pinctrl
[    2.445806] pinctrl core: registered pin 216 (gpb4-1) on samsung-pinctrl
[    2.445843] pinctrl core: registered pin 217 (gph0-0) on samsung-pinctrl
[    2.445879] pinctrl core: registered pin 218 (gph0-1) on samsung-pinctrl
[    2.445915] pinctrl core: registered pin 219 (gph0-2) on samsung-pinctrl
[    2.445950] pinctrl core: registered pin 220 (gph0-3) on samsung-pinctrl
[    2.445985] pinctrl core: registered pin 221 (gph0-4) on samsung-pinctrl
[    2.446019] pinctrl core: registered pin 222 (gph0-5) on samsung-pinctrl
[    2.446053] pinctrl core: registered pin 223 (gph0-6) on samsung-pinctrl
[    2.446088] pinctrl core: registered pin 224 (gph0-7) on samsung-pinctrl
[    2.459704] samsung-pinctrl 3860000.pinctrl: try to register 7 pins ...
[    2.459809] pinctrl core: registered pin 225 (gpz-0) on samsung-pinctrl
[    2.459849] pinctrl core: registered pin 226 (gpz-1) on samsung-pinctrl
[    2.459888] pinctrl core: registered pin 227 (gpz-2) on samsung-pinctrl
[    2.459927] pinctrl core: registered pin 228 (gpz-3) on samsung-pinctrl
[    2.459965] pinctrl core: registered pin 229 (gpz-4) on samsung-pinctrl
[    2.460003] pinctrl core: registered pin 230 (gpz-5) on samsung-pinctrl
[    2.460040] pinctrl core: registered pin 231 (gpz-6) on samsung-pinctrl
[    2.939603] pinctrl core: add 4 pinctrl maps
[    2.939841] samsung-pinctrl 14010000.pinctrl: found group selector
6 for gpa0-6
[    2.939894] samsung-pinctrl 14010000.pinctrl: found group selector
6 for gpa0-6
[    2.939944] samsung-pinctrl 14010000.pinctrl: found group selector
7 for gpa0-7
[    2.939992] samsung-pinctrl 14010000.pinctrl: found group selector
7 for gpa0-7
[    2.940022] samsung-pinctrl 14010000.pinctrl: request pin 177
(gpa0-6) for 12c80000.i2c
[    2.940089] samsung-pinctrl 14010000.pinctrl: request pin 178
(gpa0-7) for 12c80000.i2c
[    2.941356] s3c-i2c 12c80000.i2c: obtain a copy of previously claimed pinctrl
[    4.370371] alarmtimer alarmtimer: no of_node; not parsing pinctrl DT
[    5.154339] pinctrl core: add 2 pinctrl maps
[    5.154682] pinctrl core: add 2 pinctrl maps
[    5.154943] samsung-pinctrl 14010000.pinctrl: found group selector
32 for gpb2-0
[    5.155011] samsung-pinctrl 14010000.pinctrl: found group selector
32 for gpb2-0
[    5.155082] samsung-pinctrl 14010000.pinctrl: found group selector
34 for gpb2-2
[    5.155148] samsung-pinctrl 14010000.pinctrl: found group selector
34 for gpb2-2
[    5.155183] samsung-pinctrl 14010000.pinctrl: request pin 203
(gpb2-0) for 12dd0000.pwm
[    5.155224] samsung-pinctrl 14010000.pinctrl: request pin 205
(gpb2-2) for 12dd0000.pwm
[    6.901592] serial8250 serial8250: no of_node; not parsing pinctrl DT
[    9.157724] pinctrl core: add 2 pinctrl maps
[    9.157952] samsung-pinctrl 13400000.pinctrl: found group selector
39 for gpx3-7
[    9.158011] samsung-pinctrl 13400000.pinctrl: found group selector
39 for gpx3-7
[    9.158041] samsung-pinctrl 13400000.pinctrl: request pin 39
(gpx3-7) for 14530000.hdmi
[    9.158853] samsung-pinctrl 13400000.pinctrl: request pin 39
(gpx3-7) for gpx3:39
[    9.169059] exynos-drm exynos-drm: no of_node; not parsing pinctrl DT
[    9.683767] usb usb1: no of_node; not parsing pinctrl DT
[    9.688758] hub 1-0:1.0: no of_node; not parsing pinctrl DT
[    9.854041] usb usb2: no of_node; not parsing pinctrl DT
[    9.857966] hub 2-0:1.0: no of_node; not parsing pinctrl DT
[    9.925566] pinctrl core: add 4 pinctrl maps
[    9.925744] samsung-pinctrl 14010000.pinctrl: found group selector
14 for gpa2-0
[    9.925992] samsung-pinctrl 14010000.pinctrl: found group selector
14 for gpa2-0
[    9.926046] samsung-pinctrl 14010000.pinctrl: found group selector
15 for gpa2-1
[    9.926092] samsung-pinctrl 14010000.pinctrl: found group selector
15 for gpa2-1
[    9.926122] samsung-pinctrl 14010000.pinctrl: request pin 185
(gpa2-0) for 12ca0000.i2c
[    9.926155] samsung-pinctrl 14010000.pinctrl: request pin 186
(gpa2-1) for 12ca0000.i2c
[    9.938344] pinctrl core: add 2 pinctrl maps
[    9.938564] samsung-pinctrl 13400000.pinctrl: found group selector
12 for gpx0-4
[    9.938620] samsung-pinctrl 13400000.pinctrl: found group selector
12 for gpx0-4
[    9.938649] samsung-pinctrl 13400000.pinctrl: request pin 12
(gpx0-4) for 4-0066
[    9.951595] s2mps11-pmic s2mps11-regulator: no of_node; not parsing
pinctrl DT
[   10.354652] s5m-rtc s2mps14-rtc: no of_node; not parsing pinctrl DT
[   10.358618] dummy 4-0006: no of_node; not parsing pinctrl DT
[   10.391220] s2mps11-clk s2mps11-clk: no of_node; not parsing pinctrl DT
[   10.504969] cpufreq-dt cpufreq-dt: no of_node; not parsing pinctrl DT
[   10.605180] pinctrl core: add 2 pinctrl maps
[   10.605286] samsung-pinctrl 13410000.pinctrl: found group selector
29 for gpd1-0
[   10.605313] samsung-pinctrl 13410000.pinctrl: found group selector
29 for gpd1-0
[   10.605331] samsung-pinctrl 13410000.pinctrl: request pin 69
(gpd1-0) for pwrseq
[   10.605645] samsung-pinctrl 13410000.pinctrl: request pin 69
(gpd1-0) for gpd1:69
[   10.623242] pinctrl core: add 2 pinctrl maps
[   10.623392] pinctrl core: add 2 pinctrl maps
[   10.623536] pinctrl core: add 2 pinctrl maps
[   10.623706] pinctrl core: add 6 pinctrl maps
[   10.623878] pinctrl core: add 8 pinctrl maps
[   10.624024] pinctrl core: add 2 pinctrl maps
[   10.624174] pinctrl core: add 2 pinctrl maps
[   10.624278] samsung-pinctrl 13410000.pinctrl: found group selector
0 for gpc0-0
[   10.624307] samsung-pinctrl 13410000.pinctrl: found group selector
0 for gpc0-0
[   10.624335] samsung-pinctrl 13410000.pinctrl: found group selector
1 for gpc0-1
[   10.624362] samsung-pinctrl 13410000.pinctrl: found group selector
1 for gpc0-1
[   10.624389] samsung-pinctrl 13410000.pinctrl: found group selector
3 for gpc0-3
[   10.624415] samsung-pinctrl 13410000.pinctrl: found group selector
3 for gpc0-3
[   10.624442] samsung-pinctrl 13410000.pinctrl: found group selector
4 for gpc0-4
[   10.624467] samsung-pinctrl 13410000.pinctrl: found group selector
4 for gpc0-4
[   10.624493] samsung-pinctrl 13410000.pinctrl: found group selector
5 for gpc0-5
[   10.624518] samsung-pinctrl 13410000.pinctrl: found group selector
5 for gpc0-5
[   10.624543] samsung-pinctrl 13410000.pinctrl: found group selector
6 for gpc0-6
[   10.624568] samsung-pinctrl 13410000.pinctrl: found group selector
6 for gpc0-6
[   10.624594] samsung-pinctrl 13410000.pinctrl: found group selector
23 for gpc3-0
[   10.624619] samsung-pinctrl 13410000.pinctrl: found group selector
23 for gpc3-0
[   10.624644] samsung-pinctrl 13410000.pinctrl: found group selector
24 for gpc3-1
[   10.624668] samsung-pinctrl 13410000.pinctrl: found group selector
24 for gpc3-1
[   10.624693] samsung-pinctrl 13410000.pinctrl: found group selector
25 for gpc3-2
[   10.624717] samsung-pinctrl 13410000.pinctrl: found group selector
25 for gpc3-2
[   10.624755] samsung-pinctrl 13410000.pinctrl: found group selector
26 for gpc3-3
[   10.624785] samsung-pinctrl 13410000.pinctrl: found group selector
26 for gpc3-3
[   10.624815] samsung-pinctrl 13410000.pinctrl: found group selector
2 for gpc0-2
[   10.624843] samsung-pinctrl 13410000.pinctrl: found group selector
2 for gpc0-2
[   10.624873] samsung-pinctrl 13410000.pinctrl: found group selector
7 for gpc0-7
[   10.624901] samsung-pinctrl 13410000.pinctrl: found group selector
7 for gpc0-7
[   10.624917] samsung-pinctrl 13410000.pinctrl: request pin 40
(gpc0-0) for 12200000.mmc
[   10.624936] samsung-pinctrl 13410000.pinctrl: request pin 41
(gpc0-1) for 12200000.mmc
[   10.624954] samsung-pinctrl 13410000.pinctrl: request pin 43
(gpc0-3) for 12200000.mmc
[   10.624972] samsung-pinctrl 13410000.pinctrl: request pin 44
(gpc0-4) for 12200000.mmc
[   10.624990] samsung-pinctrl 13410000.pinctrl: request pin 45
(gpc0-5) for 12200000.mmc
[   10.625007] samsung-pinctrl 13410000.pinctrl: request pin 46
(gpc0-6) for 12200000.mmc
[   10.625025] samsung-pinctrl 13410000.pinctrl: request pin 63
(gpc3-0) for 12200000.mmc
[   10.625043] samsung-pinctrl 13410000.pinctrl: request pin 64
(gpc3-1) for 12200000.mmc
[   10.625061] samsung-pinctrl 13410000.pinctrl: request pin 65
(gpc3-2) for 12200000.mmc
[   10.625078] samsung-pinctrl 13410000.pinctrl: request pin 66
(gpc3-3) for 12200000.mmc
[   10.625095] samsung-pinctrl 13410000.pinctrl: request pin 42
(gpc0-2) for 12200000.mmc
[   10.625113] samsung-pinctrl 13410000.pinctrl: request pin 47
(gpc0-7) for 12200000.mmc
[   10.654376] samsung-pinctrl 13410000.pinctrl: request pin 42
(gpc0-2) for gpc0:42
[   10.734790] pinctrl core: add 2 pinctrl maps
[   10.735262] pinctrl core: add 2 pinctrl maps
[   10.736085] pinctrl core: add 2 pinctrl maps
[   10.736604] pinctrl core: add 2 pinctrl maps
[   10.737220] pinctrl core: add 6 pinctrl maps
[   10.737601] samsung-pinctrl 13410000.pinctrl: found group selector
16 for gpc2-0
[   10.737699] samsung-pinctrl 13410000.pinctrl: found group selector
16 for gpc2-0
[   10.737803] samsung-pinctrl 13410000.pinctrl: found group selector
17 for gpc2-1
[   10.737899] samsung-pinctrl 13410000.pinctrl: found group selector
17 for gpc2-1
[   10.738001] samsung-pinctrl 13410000.pinctrl: found group selector
18 for gpc2-2
[   10.738095] samsung-pinctrl 13410000.pinctrl: found group selector
18 for gpc2-2
[   10.738196] samsung-pinctrl 13410000.pinctrl: found group selector
19 for gpc2-3
[   10.738289] samsung-pinctrl 13410000.pinctrl: found group selector
19 for gpc2-3
[   10.738389] samsung-pinctrl 13410000.pinctrl: found group selector
20 for gpc2-4
[   10.738481] samsung-pinctrl 13410000.pinctrl: found group selector
20 for gpc2-4
[   10.738642] samsung-pinctrl 13410000.pinctrl: found group selector
21 for gpc2-5
[   10.738749] samsung-pinctrl 13410000.pinctrl: found group selector
21 for gpc2-5
[   10.738863] samsung-pinctrl 13410000.pinctrl: found group selector
22 for gpc2-6
[   10.738968] samsung-pinctrl 13410000.pinctrl: found group selector
22 for gpc2-6
[   10.739022] samsung-pinctrl 13410000.pinctrl: request pin 56
(gpc2-0) for 12220000.mmc
[   10.739078] samsung-pinctrl 13410000.pinctrl: request pin 57
(gpc2-1) for 12220000.mmc
[   10.739127] samsung-pinctrl 13410000.pinctrl: request pin 58
(gpc2-2) for 12220000.mmc
[   10.739175] samsung-pinctrl 13410000.pinctrl: request pin 59
(gpc2-3) for 12220000.mmc
[   10.739224] samsung-pinctrl 13410000.pinctrl: request pin 60
(gpc2-4) for 12220000.mmc
[   10.739272] samsung-pinctrl 13410000.pinctrl: request pin 61
(gpc2-5) for 12220000.mmc
[   10.739320] samsung-pinctrl 13410000.pinctrl: request pin 62
(gpc2-6) for 12220000.mmc
[   10.923667] mmcblk mmc1:0007: no of_node; not parsing pinctrl DT
[   11.140046] snd-soc-dummy snd-soc-dummy: no of_node; not parsing pinctrl DT
[   11.220467] usb 2-1: no of_node; not parsing pinctrl DT
[   11.626518] pinctrl core: add 2 pinctrl maps
[   11.626743] samsung-pinctrl 13400000.pinctrl: found group selector
39 for gpx3-7
[   11.626793] samsung-pinctrl 13400000.pinctrl: found group selector
39 for gpx3-7
[   11.626820] samsung-pinctrl 13400000.pinctrl: request pin 39
(gpx3-7) for 14530000.hdmi
[   11.627809] samsung-pinctrl 13400000.pinctrl: request pin 39
(gpx3-7) for gpx3:39
[   11.726818] xhci-hcd xhci-hcd.2.auto: no of_node; not parsing pinctrl DT
[   11.801452] usb usb3: no of_node; not parsing pinctrl DT
[   11.805471] hub 3-0:1.0: no of_node; not parsing pinctrl DT
[   11.883263] usb usb4: no of_node; not parsing pinctrl DT
[   11.887362] hub 4-0:1.0: no of_node; not parsing pinctrl DT
[   11.926683] xhci-hcd xhci-hcd.5.auto: no of_node; not parsing pinctrl DT
[   11.999588] usb usb5: no of_node; not parsing pinctrl DT
[   12.003208] hub 5-0:1.0: no of_node; not parsing pinctrl DT
[   12.085100] usb usb6: no of_node; not parsing pinctrl DT
[   12.088936] hub 6-0:1.0: no of_node; not parsing pinctrl DT
[   12.491299] usb 3-1: no of_node; not parsing pinctrl DT
[   12.528446] hub 3-1:1.0: no of_node; not parsing pinctrl DT
[   12.555071] usb 4-1: no of_node; not parsing pinctrl DT
[   12.611412] hub 4-1:1.0: no of_node; not parsing pinctrl DT
[   13.020668] usb 4-1.1: no of_node; not parsing pinctrl DT
[   13.081803] usb-storage 4-1.1:1.0: no of_node; not parsing pinctrl DT
[   13.091721] usb 5-1: no of_node; not parsing pinctrl DT
[   13.127124] r8152 5-1:2.0: no of_node; not parsing pinctrl DT
[   13.208321] r8152 5-1:1.0: no of_node; not parsing pinctrl DT
[   14.281196] sd 0:0:0:0: no of_node; not parsing pinctrl DT
[   16.057197] usb 4-1.2: no of_node; not parsing pinctrl DT
[   16.079507] usb-storage 4-1.2:1.0: no of_node; not parsing pinctrl DT
[   17.236626] sd 1:0:0:0: no of_node; not parsing pinctrl DT
[   17.612139] usbhid 2-1:1.0: no of_node; not parsing pinctrl DT
[   17.625511] usbhid 2-1:1.1: no of_node; not parsing pinctrl DT
[   17.755059] hid-generic 0003:24AE:1000.0001: no of_node; not
parsing pinctrl DT
[   17.933665] hid-generic 0003:24AE:1000.0002: no of_node; not
parsing pinctrl DT
[ 1009.259380] usb 4-1.2: no of_node; not parsing pinctrl DT
[ 1009.267240] usb-storage 4-1.2:1.0: no of_node; not parsing pinctrl DT
[ 1010.311832] sd 1:0:0:0: no of_node; not parsing pinctrl DT

Best Regards
-Anand Moon

^ permalink raw reply

* [PATCH 1/4] mfd: ti_am335x_tscadc: store physical address
From: Lee Jones @ 2016-10-26 12:17 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <f271b805-82c2-a45e-0de9-39edafd34d2e@ti.com>

On Fri, 30 Sep 2016, Mugunthan V N wrote:

> On Wednesday 28 September 2016 01:10 AM, Lee Jones wrote:
> > On Wed, 21 Sep 2016, Mugunthan V N wrote:
> > 
> >> store the physical address of the device in its priv to use it
> >> for DMA addressing in the client drivers.
> >>
> >> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> >> ---
> >>  drivers/mfd/ti_am335x_tscadc.c       | 1 +
> >>  include/linux/mfd/ti_am335x_tscadc.h | 1 +
> >>  2 files changed, 2 insertions(+)
> >>
> >> diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
> >> index c8f027b..0f3fab4 100644
> >> --- a/drivers/mfd/ti_am335x_tscadc.c
> >> +++ b/drivers/mfd/ti_am335x_tscadc.c
> >> @@ -183,6 +183,7 @@ static	int ti_tscadc_probe(struct platform_device *pdev)
> >>  		tscadc->irq = err;
> >>  
> >>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >> +	tscadc->tscadc_phys_base = res->start;
> > 
> > This is unusual.  Can't you use a virt_to_phys() variant instead?
> > 
> 
> I tried using virt_to_phys(), but its not working for me.
> Also saw many drivers uses like this to get physical address
> ("git grep -n " res->start;" drivers/*").

Very well:

For my own reference:
  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

Let me know how you wish this set to be handled.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply

* [PATCH v14 4/9] acpi/arm64: Add GTDT table parse driver
From: Marc Zyngier @ 2016-10-26 12:11 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CADyBb7tLJpPiMqWs4KZE=uCpo3HX3WcNVju2UKNuPOR0+M4UDw@mail.gmail.com>

On 26/10/16 12:10, Fu Wei wrote:
> Hi Mark,
> 
> On 21 October 2016 at 00:37, Mark Rutland <mark.rutland@arm.com> wrote:
>> Hi,
>>
>> As a heads-up, on v4.9-rc1 I see conflicts at least against
>> arch/arm64/Kconfig. Luckily git am -3 seems to be able to fix that up
>> automatically, but this will need to be rebased before the next posting
>> and/or merging.
>>
>> On Thu, Sep 29, 2016 at 02:17:12AM +0800, fu.wei at linaro.org wrote:
>>> +static int __init map_gt_gsi(u32 interrupt, u32 flags)
>>> +{
>>> +     int trigger, polarity;
>>> +
>>> +     if (!interrupt)
>>> +             return 0;
>>
>> Urgh.
>>
>> Only the secure interrupt (which we do not need) is optional in this
>> manner, and (hilariously), zero appears to also be a valid GSIV, per
>> figure 5-24 in the ACPI 6.1 spec.
>>
>> So, I think that:
>>
>> (a) we should not bother parsing the secure interrupt
> 
> If I understand correctly, from this point of view, kernel don't
> handle the secure interrupt.
> But the current arm_arch_timer driver still enable/disable/request
> PHYS_SECURE_PPI
> with PHYS_NONSECURE_PPI.
> That means we still need to parse the secure interrupt.
> Please correct me, if I misunderstand something? :-)

That's because we can use the per-cpu timer when 32bit Linux is running
on the secure side (and we cannot distinguish between secure and
non-secure at runtime). ACPI is 64bit only, and Linux on 64bit isn't
supported on the secure side, so only registering the non-secure timer
is perfectly acceptable.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply

* [PATCH v4 0/7] Add R8A7743/SK-RZG1M board support
From: Geert Uytterhoeven @ 2016-10-26 12:08 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <2719479.geOc9vqcRS@wasted.cogentembedded.com>

Hi Sergei,

On Fri, Oct 21, 2016 at 10:39 PM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
>    Here's the set of 8 patches against Simon Horman's 'renesas.git' repo's
> 'renesas-devel-20161021-v4.9-rc1' tag. I'm adding the device tree support for
> the R8A7743-based SK-RZG1M board. The SoC is close to R8A7791 and the board
> seems identical to the R8A7791/Porter board. The device tree patches depend on
> the R8A7743 CPG/MSSR driver series just posted in order to compile and work.

They depend only on "[PATCH v3 1/2] ARM: shmobile: r8a7743: add CPG clock
index macros" of that series, right?

"[PATCH v3 2/2] clk: renesas: cpg-mssr: add R8A7743 support" is not needed,
and introduces an additional dependency on "[PATCH 1/3] clk: renesas:
cpg-mssr: add common R-Car Gen2 support".

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply

* [PATCH v4 00/23] soc: renesas: Add R-Car RST driver for obtaining mode pin state
From: Geert Uytterhoeven @ 2016-10-26 12:00 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1477055857-17936-1-git-send-email-geert+renesas@glider.be>

Hi Mike, Stephen,

On Fri, Oct 21, 2016 at 3:17 PM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> Currently the R-Car Clock Pulse Generator (CPG) drivers obtains the
> state of the mode pins either by a call from the platform code, or
> directly by using a hardcoded register access. This is a bit messy, and
> creates a dependency between driver and platform code.
>
> This patch series converts the various Renesas R-Car clock drivers
> and support code from reading the mode pin states using a hardcoded
> register access to using a new minimalistic R-Car RST driver.
>
> All R-Car clock drivers will rely on the presence in DT of a device node
> for the RST module.  Backwards compatibility with old DTBs is retained
> only for R-Car Gen2, which has fallback code using its own private copy
> of rcar_gen2_read_mode_pins().
>
> After this, there is still one remaining user of
> rcar_gen2_read_mode_pins() left in platform code. A patch series to
> remove that user has already been posted, though ("[PATCH/RFT 0/4] ARM:
> shmobile: R-Car Gen2: Allow booting secondary CPU cores in debug mode").
> Since v3, the other user has been removed in commit 9f5ce39ddb8f68b3
> ("ARM: shmobile: rcar-gen2: Obtain extal frequency from DT").
>
> This series consists of 5 parts:
>   A. Patches 1 and 2 add DT bindings and driver code for the R-Car RST
>      driver,
>   B. Patches 3-11 add device nodes for the RST modules to the R-Car DTS
>      files,
>   C. Patches 12-17 convert the clock drivers to call into the new R-Car
>      RST driver,
>   D. Patches 18-20 remove passing mode pin state to the clock drivers
>      from the platform code,
>   E. Patches 21-23 remove dead code from the clock drivers.
>
> As is usually the case with moving functionality from platform code to
> DT, there are lots of hard dependencies:
>   - The DT updates in Part B can be merged as soon as the DT bindings in
>     Part A have been approved,
>   - The clock driver updates in Part C depend functionally on the driver
>     code in Part A, and on the DT updates in Part B,
>   - The board code cleanups in Part D depend on the clock driver updates
>     in Part C,
>   - The block driver cleanups in part E depend on the board code
>     cleanups in part D.
>
> Hence to maintain the required lockstep between SoC driver, clock
> drivers, shmobile platform code, and shmobile DT, I propose to queue up
> all patches in a single branch against v4.9-rc1, and send pull requests
> to both Mike/Stephen (clock) and Simon (rest).
>
> ***

>   - Mike/Stephen/Simon/Magnus: Are you OK with the suggested merge
>     approach above?

Is this OK for you?

I'd like to move forward with this, as this is a prerequisite for adding
support for new SoCs (RZ/G) without adding more copies of
rcar_gen2_read_mode_pins(), and removing that function from platform code
for good.

Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply

* [PATCH v2] ARM: davinci: da8xx: Fix some redefined symbol warnings
From: Sekhar Nori @ 2016-10-26 11:57 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1477397492-7925-2-git-send-email-abailon@baylibre.com>

On Tuesday 25 October 2016 05:41 PM, Alexandre Bailon wrote:
> Some macro for DA8xx CFGCHIP are defined in usb-davinci.h,
> but da8xx-cfgchip.h intend to replace them.
> The usb-da8xx.c is using both headers, causing redefined symbol warnings.
> Remove the macro and update the da830-evm board file to use da8xx-cfgchip.h
> 
> Signed-off-by: Alexandre Bailon <abailon@baylibre.com>

This leads to build error on v4.9-rc2:

arch/arm/mach-davinci/board-da830-evm.c: In function 'da830_evm_usb_init':
arch/arm/mach-davinci/board-da830-evm.c:120:15: error: 'CFGCHIP2_REFFREQ' undeclared (first use in this function)
  cfgchip2 &= ~CFGCHIP2_REFFREQ;

Thanks,
Sekhar

^ permalink raw reply

* [PATCH v4 00/23] soc: renesas: Add R-Car RST driver for obtaining mode pin state
From: Geert Uytterhoeven @ 2016-10-26 11:56 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1477064730.2508.24.camel@pengutronix.de>

Hi Philip,

On Fri, Oct 21, 2016 at 5:45 PM, Philipp Zabel <p.zabel@pengutronix.de> wrote:
> Am Freitag, den 21.10.2016, 15:17 +0200 schrieb Geert Uytterhoeven:
>>         Hi Philipp, Mike, Stephen, Simon, Magnus,
>>       (see questions *** below!)
>>
>> Currently the R-Car Clock Pulse Generator (CPG) drivers obtains the
>> state of the mode pins either by a call from the platform code, or
>> directly by using a hardcoded register access. This is a bit messy, and
>> creates a dependency between driver and platform code.
>>
>> This patch series converts the various Renesas R-Car clock drivers
>> and support code from reading the mode pin states using a hardcoded
>> register access to using a new minimalistic R-Car RST driver.

[...]

>>   - Philip: While this is a driver for a reset-controller, currently it
>>     doesn't provide any reset-controller functionality. Hence I added it
>>     to drivers/soc/renesas/. Is that OK for you?
>
> Absolutely, as long as the driver isn't even a reset controller
> provider, this is the right place.

Thank you!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply

* Add Allwinner Q8 tablets hardware manager
From: Hans de Goede @ 2016-10-26 11:46 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20161024173900.GP15620@leverpostej>

Hi,

On 24-10-16 19:39, Mark Rutland wrote:
> On Fri, Oct 14, 2016 at 09:53:31AM +0200, Hans de Goede wrote:
>> Hi Rob, Mark, et al.,
>
> Hi Hans,
>
> Apologies for the delay in replying to this.

No worries, I believe that 1 week is actually a pretty good
turn around time, esp. directly after a conference.

> I'd like to be clear that I do understand that there is a problem that
> needs to be addressed here. However, I do not believe that the *current*
> in-kernel approach is correct. More on that below.

Ok.

>> Mark, I know that we discussed this at ELCE and you clearly indicated
>> that according to you this does not belong in the kernel. I was a bit
>> surprised by this part of the discussion.
>>
>> I had posted a RFC earlier and Rob had indicated that given that the q8
>> tablets are a special case, as my code uses actual probing rather then some
>> pre-arranged id mechanism with say an eeprom, that doing this in a
>> non-generic manner would be ok for my special case.
>
> To some extent, Rob and I may have differing views here; I'm not
> entirely sure what Rob's view is, and I cannot talk on his behalf. I
> certainly must apologise for having not commented on said RFC, however.
>
>> So on to why I believe that the kernel is the best place to do this, at least
>> for my special use-case:
>>
>> 1. Configurability
>>
>> Since the q8 tablets do not have any id mechanism I'm probing i2c busses to
>> generate i2c client dt nodes with the right address and compatible.
>> Some info in these nodes (e.g. touchscreen firmware-name) is not probable at
>> all and gets set by heuristics. This heuristics may get things wrong.
>> So my current implementation offers kernel cmdline options to override this.
>
> As I mentioned at ELCE, one major concern I have with this approach is
> this probing, which in part relies on a collection of heuristics.

This is quite use-case specific, anyways, the probing is a 2 step process:

1) Identify which hardware there is in the tablet, this is pretty
reliable, we only detect a fix set of known possible touchscreens
and accelerometers, at known addresses and almost all have an id
register to check.

2) Determine *defaults* for various none probable settings, like guessing
which firmware to load into the touchscreen controllers, as there are
at least 2 ways the gsl1680 is wired up on these tablets and this
requires 2 different firmware files. This uses heuristics, to, as said,
determine the defaults all of the non-probable bits are overidable
through config options (currently kernel module options). Getting these
wrong is not dangerous to the hardware, but will work in a non-functional
or misbehaving (wrong coordinates) touchscreen.

Note with the models I've access to so far the heuristics score 100%
but I'm not sure how representative the 16 models I've access to are
(they are all different and have been bought over a span of multiple
years).

> I'm worried that this is very fragile, and sets us up for having to
> maintain a much larger collection of heuristics and/or a database of
> particular boards in future. This is fragile, defeats much of the gain
> from DT.

I understand your worries, as said I'm confident the actual probing
is safe and getting the heuristics wrong will result in misbehavior,
but not in any hardware damage or such.

> Worse, this could be completely incompatible with some arbitrary board
> that comes by in future,

I assume you mean an arbitrary q8 tablet here, as the probe code does
bind by board/machine compatible, so for a really arbitrary board
this code will never activate.

> because the kernel assumed something that was
> not true, which it would not have done if things were explicitly
> described to the kernel.

I understand your worry, but moving the probing code to say u-boot
will not change any of this, the kernel will get the explicit
description created by the u-boot probe code, but it would be
just as wrong.

So maybe we need to answer 2 questions in a row:

1) Do we want such probe code at all ?

My answer to this is yes, these (cheap) tablets are interesting to
e.g. the maker community and I would like them to run mainline
(and run mainline well), but given the way there are put together
this require some code to dynamically adapt to the batch of the
month somewhere

2) Where do we put this code ?

If we agree on 1 (I assume we do) then this becomes the real
question, at which point your worries about the kernel assuming
something which is not true because the probe code got it wrong
may become true regardless where the code lives.

So wrt this worries is all I can do is ask you to trust me to
not mess things up, just like we all trust driver authors, etc.
all the time to not mess things up.

> As I mentioned at ELCE, I'm not opposed to the concept of the kernel
> applying overlays or fixups based on a well-defined set of criteria;
> having some of that embedded in the DT itself would be remarkably
> helpful.  However, I am very much not keen on loosely defined criteria as
> with here, as it couples the DT and kernel, and creates problems longer
> term, as described above.

Right, so again I think we need to split the discussion in 2 steps:

1) How do we apply the fixups, currently I'm using free-form changes
done from C-code. I can envision moving to something like the quirk
mechanism suggested by Pantelis in the past. Note this is not a perfect
fit for my rather corner-case use-case, but I can understand that in
general you want the variants to be described in dt, and activated
in some way, rather then have c-code make free-form changes to the dt

2) How do we select which fixups to apply. Again I can understand
you wanting some well defined mechanism for this, but again my
use-case is special and simply does not allow for this as there
is no id-eeprom to read or some such.

>> Although having to specify kernel cmdline options is not the plug and play
>> experience I want to give end-users most distros do have documentation on
>> how to do this and doing this is relatively easy for end-users. Moving this
>> to the bootloader means moving to some bootloader specific config mechanism
>> which is going to be quite hard (and possibly dangerous) for users to use.
>
> I have to ask, why is it more dangerous?

Because for normal end users meddling with the bootloader / with u-boot's
environment is like flashing a PC BIOS. Most (non technical) end users will
want to install u-boot once (or not at all) and then just have it work.

> Perhaps more difficult, but that can be solved,

More difficult means not doable for many users.

> if the manual
> corrections are simply a set of options to be passed to the kernel, I
> don't see why the bootloader cannot pick this up.
>
>> 2. Upgradability
>>
>> Most users treat the bootloader like they treat an x86 machine BIOS/EFI,
>> they will never upgrade it unless they really have to. This means that it
>> will be very difficult to get users to actual benefit from bug-fixes /
>> improvements done to the probing code. Where as the kernel on boards running
>> e.g. Debian or Fedora gets regular updates together with the rest of the
>> system.
>
> Given that DTBs are supposed to remain supported, users should find
> themselves with a system that continues to work, but may not have all
> the bells and whistles it could, much like elsewhere.
>
> While it's true that we have issues in this area, I don't think that's
> an argument for putting things into the kernel for this specific set of
> boards.

It is an argument to put much of the dynamic (dt) hardware support in
the kernel in general.

>> 3. Infrastructure
>>
>> The kernel simply has better infrastructure for doing these kind of things.
>
> At least on the DT front, a lot of work has gone into improving the
> infrastructure, e.g. the work that Free Electrons have done [1]. I
> appreciate that the infrastructure for things like poking SPI may not be
> as advanced.
>
> Which bits of infrastructure do you find lacking today?

Nothing really specific (I've not yet tried porting the probe code
to u-boot), but I just find working within the kernel easier in general,
since there really just is a lot more infrastructure. Note I'm the
upstream u-boot maintainer for the allwinner SoC support, so this
is not due to me being unfamiliar with u-boot.

>> Yes we could improve the bootloader, but the kernel is also improving
>> and likely at a faster rate. Besides that the purpose of the
>> bootloader is mostly to be simple and small, load the kernel and get
>> out of the way, not to be a general purpose os kernel. So it will
>> simply always have less infrastructure and that is a good thing,
>> otherwise we will be writing another general purpose os which is a
>> waste of effort.
>
> I think this conflates a number of details. Yes, we'd like firmware and
> bootloaders to be small, and yes, their infrastructure and feature
> support will be smaller than a general purpose OS.
>
> That doesn't imply that they cannot have features necessary to boostrap
> an OS.
>
> It's also not strictly necessary that the firmware or bootloader have
> the capability to do all this probing, as that could be contained in
> another part (e.g. a U-Boot application which is run once to detect the
> board details, logging this into a file).
>
> It's also possible to ship an intermediary stage (e.g. like the
> impedance matcher) which can be upgradeable independently of the kernel.

Yes there are other solutions, but they all involve a lot more
moving pieces (and thus will break) then a single isolated .c file
in the kernel, which is all this series adds.

Esp the intermediate solution just adds a ton of complexity with 0
gain.

>> 4. This is not a new board file
>>
>> Mark, at ELCE I got the feeling that your biggest worry / objection is
>> that this will bring back board files, but that is not the case, if you
>> look at the actual code it is nothing like a board-file at all. Where a
>> board file was instantiating device after device after device from c-code,
>> with maybe a few if-s in there to deal with board revisions. This code is
>> all about figuring out which accelerometer and touchscreen there are,
>> to then add nodes to the dt for this 2 devices, almost all the code is
>> probing, the actual dt modifying code is tiny and no direct device
>> instantiation is done at all.
>
> Sorry, but I must disagree. This code:
>
> (a) identifies a set of boards based on a top-level compatible string.
>     i.e. it's sole purpose is to handle those boards.
>
> (b) assumes non-general properties of those boards (e.g. that poking
>     certain SPI endpoints is safe).
>
> (c) applies arbitrary properties to the DT, applying in-built knowledge
>     of those boards (in addition to deep structural knowledge of the
>     DTB in question).
>
> To me, given the implicit knowledge, that qualifies as a "board file".
>
> As I mentioned at ELCE, if this had no knowledge of the boards in
> question, I would be less concerned. e.g. if there was a well-defined
> identification mechanism, describe in the DT, with fixups also defined
> in the DT.

And as I tried to explain before, for this specific use-case describing
all this board specific knowledge in a generic manner in dt is simply
impossible, unless we add a turing complete language to dt aka aml.

I've a feeling that you're mixing this, rather special, use-case with
the more generic use-case of daughter-boards for various small-board-computers
I agree that for the SBC use-case it makes sense to try and come up with
a shared core / dt bindings for much of this. Note that even this boards
will still need a board (or board-family) specific method for getting
the actual id from a daughter-board, but this board specific code could
then pass the id to some more general hw-manager core which starts applying
dt changes based on the id. But this assumes there is a single id to
uniquely identify the extensions, which in my case there simply is not.

>> 5. This is an exception, not the rule
>>
>> Yes this is introducing board (family of boards) specific c-code into the
>> kernel, so in a way it is reminiscent of board files. But sometimes this is
>> necessary, just look at all the vendor / platform specific code in the kernel
>> in drivers/platform/x86, or all the places where DMI strings are used to
>> uniquely identify a x86 board and adjust behavior.
>>
>> But this really is the exception, not the rule. I've written/upstreamed a
>> number of drivers for q8 tablets hardware and if you look at e.g. the
>> silead touchscreen driver then in linux-next this is already used for 5
>> ARM dts files where no board specific C-code is involved at all.
>>
>> So this again is very different from the board file era, where C-code
>> had to be used to fill device specific platform-data structs, here all
>> necessary info is contained in the dt-binding and there are many users
>> who do not need any board specific C-code in the kernel at all.
>>
>> So dt is working as it should and is avoiding board specific C-code for
>> the majority of the cases. But sometimes hardware is not as we ideally
>> would like it to be; and for those *exceptions* we are sometimes going
>> to need C-code in the kernel, just like there is "board" specific C-code
>> in the x86 code.
>
> Your talk convinced me that we're both going to see more variation
> within this family of boards, and that we'll see more families of boards
> following a similar patter. Given that, I think that we need a more
> general solution, as I commented on the RFC.
>
> That doesn't necessarily mean that this can't happen in the kernel, but
> it certainly needs to be more strictly defined, e.g. with match criteria
> and fixups explicit in the DTB.

The only answer I've to: "with match criteria and fixups explicit in the DTB"
is: ok, give my a turing complete language inside DTB then, anything else
will not suffice. So either we are doomed to reinvent ACPI; or we must
accept some board(family) specific C-code in the kernel.

Regards,

Hans

^ permalink raw reply

* [PATCH 1/5] ARM: davinci: Compile MMC in kernel
From: Sekhar Nori @ 2016-10-26 11:33 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1477075018-20176-2-git-send-email-david@lechnology.com>

On Saturday 22 October 2016 12:06 AM, David Lechner wrote:
> This changes the davinci default configuration to compile the davinci
> MMC driver into the kernel. This allows booting from an SD card without
> requiring an initrd containing the kernel module.
> 
> Signed-off-by: David Lechner <david@lechnology.com>

"build" is more relevant here than "compile" so I changed that. And also
used davinci_all_defconfig as detailed in last e-mail.

Applied to v4.10/defconfig

Thanks,
Sekhar

^ permalink raw reply

* [PATCH] ARM: imx6: Fix GPC probe error path
From: Fabio Estevam @ 2016-10-26 11:26 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <39c26009-8e50-d182-dbfd-49f44cb9402a@roeck-us.net>

Hi Guenter,

On Wed, Oct 26, 2016 at 12:35 AM, Guenter Roeck <linux@roeck-us.net> wrote:

> Looking into this some more, it turns out that
> of_genpd_add_provider_onecell()
> now returns an error if one of the provided power domains does not exist.
> In this case, the "ARM" power domain does not exist. I don't see where it is
> created, so it may well be that this now fails for all imx6 boards with
> multi_v7_defconfig. Looking into kernelci.org test results, this is
> confirmed
> for at least imx6dl-riotboard. Overall I think it is quite safe to assume
> that all imx6 boards crash with mainline kernels and multi_v7_defconfig.
>
> The change can be tracked down to commit 0159ec67076 ("PM / Domains: Verify
> the PM domain is present when adding a provider"). Adding everyone in the
> commit log for feedback.

Yes, this is the same conclusion I got. Please check:
https://git.kernel.org/cgit/linux/kernel/git/shawnguo/linux.git/commit/?h=imx/fixes&id=eef0b282bb586259d35548851cf6a4ce847bb804

^ permalink raw reply

* [PATCH v14 4/9] acpi/arm64: Add GTDT table parse driver
From: Fu Wei @ 2016-10-26 11:10 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20161020163719.GC27598@leverpostej>

Hi Mark,

On 21 October 2016 at 00:37, Mark Rutland <mark.rutland@arm.com> wrote:
> Hi,
>
> As a heads-up, on v4.9-rc1 I see conflicts at least against
> arch/arm64/Kconfig. Luckily git am -3 seems to be able to fix that up
> automatically, but this will need to be rebased before the next posting
> and/or merging.
>
> On Thu, Sep 29, 2016 at 02:17:12AM +0800, fu.wei at linaro.org wrote:
>> +static int __init map_gt_gsi(u32 interrupt, u32 flags)
>> +{
>> +     int trigger, polarity;
>> +
>> +     if (!interrupt)
>> +             return 0;
>
> Urgh.
>
> Only the secure interrupt (which we do not need) is optional in this
> manner, and (hilariously), zero appears to also be a valid GSIV, per
> figure 5-24 in the ACPI 6.1 spec.
>
> So, I think that:
>
> (a) we should not bother parsing the secure interrupt

If I understand correctly, from this point of view, kernel don't
handle the secure interrupt.
But the current arm_arch_timer driver still enable/disable/request
PHYS_SECURE_PPI
with PHYS_NONSECURE_PPI.
That means we still need to parse the secure interrupt.
Please correct me, if I misunderstand something? :-)

> (b) we should drop the check above

yes, if zero is a valid GSIV, this makes sense.

> (c) we should report the spec issue to the ASWG
>
>> +/*
>> + * acpi_gtdt_c3stop - got c3stop info from GTDT
>> + *
>> + * Returns 1 if the timer is powered in deep idle state, 0 otherwise.
>> + */
>> +bool __init acpi_gtdt_c3stop(void)
>> +{
>> +     struct acpi_table_gtdt *gtdt = acpi_gtdt_desc.gtdt;
>> +
>> +     return !(gtdt->non_secure_el1_flags & ACPI_GTDT_ALWAYS_ON);
>> +}
>
> It looks like this can differ per interrupt. Shouldn't we check the
> appropriate one?

yes, I think you are right.

>
>> +int __init acpi_gtdt_init(struct acpi_table_header *table)
>> +{
>> +     void *start;
>> +     struct acpi_table_gtdt *gtdt;
>> +
>> +     gtdt = container_of(table, struct acpi_table_gtdt, header);
>> +
>> +     acpi_gtdt_desc.gtdt = gtdt;
>> +     acpi_gtdt_desc.gtdt_end = (void *)table + table->length;
>> +
>> +     if (table->revision < 2) {
>> +             pr_debug("Revision:%d doesn't support Platform Timers.\n",
>> +                      table->revision);
>> +             return 0;
>> +     }
>> +
>> +     if (!gtdt->platform_timer_count) {
>> +             pr_debug("No Platform Timer.\n");
>> +             return 0;
>> +     }
>> +
>> +     start = (void *)gtdt + gtdt->platform_timer_offset;
>> +     if (start < (void *)table + sizeof(struct acpi_table_gtdt)) {
>> +             pr_err(FW_BUG "Failed to retrieve timer info from firmware: invalid data.\n");
>> +             return -EINVAL;
>> +     }
>> +     acpi_gtdt_desc.platform_timer_start = start;
>> +
>> +     return gtdt->platform_timer_count;
>> +}
>
> This is never used as anything other than a status code.
>
> Just return zero; we haven't parsed the platform timers themselves at
> this point anyway.

Sorry, in my driver, I use this return value to inform driver

 negative number : error
0 : we don't have platform timer in GTDT table.
positive number: the number of platform timer we have in GTDT table.

please correct me, if I am doing it in wrong way. Thanks :-)


>
> Thanks,
> Mark.



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat

^ permalink raw reply

* [PATCH 3/5] ARM: davinci: enable gpio poweroff in default config
From: Sekhar Nori @ 2016-10-26 11:09 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1477075018-20176-4-git-send-email-david@lechnology.com>

On Saturday 22 October 2016 12:06 AM, David Lechner wrote:
> The gpio-poweroff driver is needed by LEGO MINDSTORMS EV3 (AM1808 based
> board).
> 
> Signed-off-by: David Lechner <david@lechnology.com>

For defconfig patches, we have been using the davinci_all_defconfig
prefix (see git log --oneline arch/arm/configs/davinci_all_defconfig).

Applied to v4.10/defconfig with subject line changed to:

"ARM: davinci_all_defconfig: enable gpio poweroff driver"

Thanks,
Sekhar

^ permalink raw reply

* [PATCH v6 00/16] ACPI IORT ARM SMMU support
From: Lorenzo Pieralisi @ 2016-10-26 11:04 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20161018160414.1228-1-lorenzo.pieralisi@arm.com>

Rafael, Joerg (and anyone else CC'ed),

On Tue, Oct 18, 2016 at 05:03:58PM +0100, Lorenzo Pieralisi wrote:
> This patch series is v6 of a previous posting:
> 
> https://lkml.org/lkml/2016/9/9/418
> 
> v5 -> v6
> 	- Rebased against v4.9-rc1
> 	- Changed FWNODE_IOMMU to FWNODE_ACPI_STATIC
> 	- Moved platform devices creation into IORT code
> 	- Updated fwnode handling
> 	- Added default dma masks initialization

Any comments on v6 ? Patches touching generic ACPI code
are {1, 2, 7}, patch 4 updates the IOMMU of_iommu_{set/get}_ops()
API to make it work on ACPI systems too, by replacing the
device_node with a fwnode_handle pointer as look-up token;
the remainder of patches are ARM specific and creates the
infrastructure to probe ARM SMMU devices through ACPI,
ARM IORT table in particular. Given the generic bits changes
above I would not leave it to late -rc to reach an agreement
please, thank you.

Cheers,
Lorenzo

> v4 -> v5
> 	- Added SMMUv1/v2 support
> 	- Rebased against v4.8-rc5 and dependencies series
> 	- Consolidated IORT platform devices creation
> 
> v3 -> v4
> 	- Added single mapping API (for IORT named components)
> 	- Fixed arm_smmu_iort_xlate() return value
> 	- Reworked fwnode registration and platform device creation
> 	  ordering to fix probe ordering dependencies
> 	- Added code to keep device_node ref count with new iommu
> 	  fwspec API
> 	- Added patch to make iommu_fwspec arch agnostic
> 	- Dropped RFC status
> 	- Rebased against v4.8-rc2
> 
> v2 -> v3
> 	- Rebased on top of dependencies series [1][2][3](v4.7-rc3)
> 	- Added back reliance on ACPI early probing infrastructure
> 	- Patch[1-3] merged through other dependent series
> 	- Added back IOMMU fwnode generalization
> 	- Move SMMU v3 static functions configuration to IORT code
> 	- Implemented generic IOMMU fwspec API
> 	- Added code to implement fwnode platform device look-up
> 
> v1 -> v2:
> 	- Rebased on top of dependencies series [1][2][3](v4.7-rc1)
> 	- Removed IOMMU fwnode generalization
> 	- Implemented ARM SMMU v3 ACPI probing instead of ARM SMMU v2
> 	  owing to patch series dependencies [1]
> 	- Moved platform device creation logic to IORT code to
> 	  generalize its usage for ARM SMMU v1-v2-v3 components
> 	- Removed reliance on ACPI early device probing
> 	- Created IORT specific iommu_xlate() translation hook leaving
> 	  OF code unchanged according to v1 reviews
> 
> The ACPI IORT table provides information that allows instantiating
> ARM SMMU devices and carrying out id mappings between components on
> ARM based systems (devices, IOMMUs, interrupt controllers).
> 
> http://infocenter.arm.com/help/topic/com.arm.doc.den0049b/DEN0049B_IO_Remapping_Table.pdf
> 
> Building on basic IORT support, this patchset enables ARM SMMUs support
> on ACPI systems.
> 
> Most of the code is aimed at building the required generic ACPI
> infrastructure to create and enable IOMMU components and to bring
> the IOMMU infrastructure for ACPI on par with DT, which is going to
> make future ARM SMMU components easier to integrate.
> 
> PATCH (1) adds a FWNODE_ACPI_STATIC type to the struct fwnode_handle type.
>           It is required to attach a fwnode identifier to platform
>           devices allocated/detected through static ACPI table entries
>           (ie IORT tables entries).
>           IOMMU devices have to have an identifier to look them up
>           eg IOMMU core layer carrying out id translation. This can be
>           done through a fwnode_handle (ie IOMMU platform devices created
>           out of IORT tables are not ACPI devices hence they can't be
>           allocated as such, otherwise they would have a fwnode_handle of
>           type FWNODE_ACPI).
> 
> PATCH (2) makes use of the ACPI early probing API to add a linker script
>           section for probing devices via IORT ACPI kernel code.
> 
> PATCH (3) provides IORT support for registering IOMMU IORT node through
>           their fwnode handle.
> 
> PATCH (4) make of_iommu_{set/get}_ops() functions DT agnostic.
> 
> PATCH (5) convert ARM SMMU driver to use fwnode instead of of_node as
>           look-up and iommu_ops retrieval token.
> 
> PATCH (6) convert ARM SMMU v3 driver to use fwnode instead of of_node as
>           look-up and iommu_ops retrieval token.
> 
> PATCH (7) implements the of_dma_configure() API in ACPI world -
>           acpi_dma_configure() - and patches PCI and ACPI core code to
>           start making use of it.
> 
> PATCH (8) provides an IORT function to detect existence of specific type
>           of IORT components.
> 
> PATCH (9) creates the kernel infrastructure required to create ARM SMMU
>           platform devices for IORT nodes.
> 
> PATCH (10) refactors the ARM SMMU v3 driver so that the init functions are
>            split in a way that groups together code that probes through DT
>            and code that carries out HW registers FW agnostic probing, in
>            preparation for adding the ACPI probing path.
> 
> PATCH (11) adds ARM SMMU v3 IORT IOMMU operations to create and probe
>            ARM SMMU v3 components.
> 
> PATCH (12) refactors the ARM SMMU v1/v2 driver so that the init functions
>            are split in a way that groups together code that probes
>            through DT and code that carries out HW registers FW agnostic
>            probing, in preparation for adding the ACPI probing path.
> 
> PATCH (13) adds ARM SMMU v1/v2 IORT IOMMU operations to create and
>            probe ARM SMMU v1/v2 components.
> 
> PATCH (14) Extend the IORT iort_node_map_rid() to work on a type mask
>            instead of a single type so that the translation API can
>            be used on a range of components.
> 
> PATCH (15) Add IORT API to carry out id mappings for components that do
>            do not have an input identifier/RIDs (ie named components).
> 
> PATCH (16) provides IORT infrastructure to carry out IOMMU configuration
>            for devices and hook it up to the previously introduced ACPI
>            DMA configure API.
> 
> This patchset is provided for review/testing purposes here:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux.git acpi/iort-smmu-v6
> 
> Tested on Juno and FVP models for ARM SMMU v1 and v3 probing path.
> 
> Lorenzo Pieralisi (16):
>   drivers: acpi: add FWNODE_ACPI_STATIC fwnode type
>   drivers: acpi: iort: introduce linker section for IORT entries probing
>   drivers: acpi: iort: add support for IOMMU fwnode registration
>   drivers: iommu: make of_iommu_set/get_ops() DT agnostic
>   drivers: iommu: arm-smmu: convert struct device of_node to fwnode
>     usage
>   drivers: iommu: arm-smmu-v3: convert struct device of_node to fwnode
>     usage
>   drivers: acpi: implement acpi_dma_configure
>   drivers: acpi: iort: add node match function
>   drivers: acpi: iort: add support for ARM SMMU platform devices
>     creation
>   drivers: iommu: arm-smmu-v3: split probe functions into DT/generic
>     portions
>   drivers: iommu: arm-smmu-v3: add IORT configuration
>   drivers: iommu: arm-smmu: split probe functions into DT/generic
>     portions
>   drivers: iommu: arm-smmu: add IORT configuration
>   drivers: acpi: iort: replace rid map type with type mask
>   drivers: acpi: iort: add single mapping function
>   drivers: acpi: iort: introduce iort_iommu_configure
> 
>  drivers/acpi/arm64/iort.c         | 586 +++++++++++++++++++++++++++++++++++++-
>  drivers/acpi/glue.c               |   4 +-
>  drivers/acpi/scan.c               |  45 +++
>  drivers/iommu/arm-smmu-v3.c       | 105 +++++--
>  drivers/iommu/arm-smmu.c          | 155 ++++++++--
>  drivers/iommu/iommu.c             |  43 +++
>  drivers/iommu/of_iommu.c          |  39 ---
>  drivers/pci/probe.c               |   3 +-
>  include/acpi/acpi_bus.h           |   2 +
>  include/asm-generic/vmlinux.lds.h |   1 +
>  include/linux/acpi.h              |  26 ++
>  include/linux/acpi_iort.h         |  14 +
>  include/linux/fwnode.h            |   3 +-
>  include/linux/iommu.h             |  14 +
>  include/linux/of_iommu.h          |  12 +-
>  15 files changed, 951 insertions(+), 101 deletions(-)
> 
> -- 
> 2.10.0
> 

^ permalink raw reply

* [PATCH v14 1/9] clocksource/drivers/arm_arch_timer: Move enums and defines to header file
From: Fu Wei @ 2016-10-26 10:54 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20161026105144.GF19965@leverpostej>

Hi Mark

On 26 October 2016 at 18:51, Mark Rutland <mark.rutland@arm.com> wrote:
> On Wed, Oct 26, 2016 at 04:31:55PM +0800, Fu Wei wrote:
>> On 20 October 2016 at 22:45, Mark Rutland <mark.rutland@arm.com> wrote:
>> > On Thu, Sep 29, 2016 at 02:17:09AM +0800, fu.wei at linaro.org wrote:
>> >>  #include <linux/timecounter.h>
>> >>  #include <linux/types.h>
>> >>
>> >> +#define ARCH_CP15_TIMER                      BIT(0)
>> >> +#define ARCH_MEM_TIMER                       BIT(1)
>> >
>> > If we're going to expose these in a header, it would be better to rename
>> > them to something that makes their usage/meaning clear. These should
>> > probably be ARCH_TIMER_TYPE_{CP15,MEM}.
>
>> > With those changes (regardless of the ARCH_TIMER_TYPE_* bits):
>> >
>> > Acked-by: Mark Rutland <mark.rutland@arm.com>
>>
>> For ARCH_TIMER_TYPE_*, maybe I should add a patch at the end of this
>> patchset to fix it, OK ?
>
> Sure. If you could put that *earlier* in the patchset it would be
> preferable so as to minimize churn.

OK, NP, will do

>
> Thanks,
> Mark.



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat

^ permalink raw reply

* [PATCH 2/5] ARM: davinci: Don't append git rev to local version
From: Sekhar Nori @ 2016-10-26 10:54 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <bf8cac01-910d-5afa-e840-f0d7ee96d22a@lechnology.com>

On Monday 24 October 2016 08:45 PM, David Lechner wrote:
> On 10/24/2016 06:35 AM, Sekhar Nori wrote:
>> On Saturday 22 October 2016 12:06 AM, David Lechner wrote:
>>> In the davinci default configuration, don't append the git revision to
>>> the local kernel version by. This seems like the more desirable default
>>> value.
>>
>> Why? To the contrary I actually quite like the fact that the git commit
>> is appended to version string. Makes it easy for me to cross-check that
>> I am booting the right image.
>>
>>>
>>> Signed-off-by: David Lechner <david@lechnology.com>
>>
>> Thanks,
>> Sekhar
>>
> 
> Each time you make a commit, you get a new version, which installs
> another copy of the kernel modules on the device. This will fill up the
> SD card if you are making many commits.

Right, but thats easily fixable by removing existing modules before
installing new ones.

> Also, if someone wants to build the mainline kernel using the default
> configuration, it seems odd to have a git revision tacked on to the end
> even though you made no revisions.

If you checkout a tag and build, then no commit information is added.
Which I guess is what most end users will do.

I don't see this done in other defconfigs like omap2plus and multi_v7 as
well. I would like to keep it similar for davinci.

Thanks,
Sekhar

^ permalink raw reply

* [PATCH v14 1/9] clocksource/drivers/arm_arch_timer: Move enums and defines to header file
From: Mark Rutland @ 2016-10-26 10:51 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CADyBb7shWfCQycmo0GcheX2NSsrjYBpzdtYFqymvDNCKi0QM2A@mail.gmail.com>

On Wed, Oct 26, 2016 at 04:31:55PM +0800, Fu Wei wrote:
> On 20 October 2016 at 22:45, Mark Rutland <mark.rutland@arm.com> wrote:
> > On Thu, Sep 29, 2016 at 02:17:09AM +0800, fu.wei at linaro.org wrote:
> >>  #include <linux/timecounter.h>
> >>  #include <linux/types.h>
> >>
> >> +#define ARCH_CP15_TIMER                      BIT(0)
> >> +#define ARCH_MEM_TIMER                       BIT(1)
> >
> > If we're going to expose these in a header, it would be better to rename
> > them to something that makes their usage/meaning clear. These should
> > probably be ARCH_TIMER_TYPE_{CP15,MEM}.

> > With those changes (regardless of the ARCH_TIMER_TYPE_* bits):
> >
> > Acked-by: Mark Rutland <mark.rutland@arm.com>
> 
> For ARCH_TIMER_TYPE_*, maybe I should add a patch at the end of this
> patchset to fix it, OK ?

Sure. If you could put that *earlier* in the patchset it would be
preferable so as to minimize churn.

Thanks,
Mark.

^ 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