Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v2 03/14] of: mtd: add documentation for nand-ecc-level property
From: Grant Likely @ 2014-02-05 11:15 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20140129175331.GA27143@localhost>

On Wed, 29 Jan 2014 14:53:32 -0300, Ezequiel Garcia <ezequiel.garcia@free-electrons.com> wrote:
> On Wed, Jan 29, 2014 at 03:34:13PM +0100, Boris BREZILLON wrote:
> > nand-ecc-level property statically defines NAND chip's ECC requirements.
> > 
> > Signed-off-by: Boris BREZILLON <b.brezillon.dev@gmail.com>
> > ---
> >  Documentation/devicetree/bindings/mtd/nand.txt |    3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/mtd/nand.txt b/Documentation/devicetree/bindings/mtd/nand.txt
> > index 03855c8..0c962296 100644
> > --- a/Documentation/devicetree/bindings/mtd/nand.txt
> > +++ b/Documentation/devicetree/bindings/mtd/nand.txt
> > @@ -3,5 +3,8 @@
> >  - nand-ecc-mode : String, operation mode of the NAND ecc mode.
> >    Supported values are: "none", "soft", "hw", "hw_syndrome", "hw_oob_first",
> >    "soft_bch".
> > +- nand-ecc-level : Two cells property defining the ECC level requirements.
> > +  The first cell represent the strength and the second cell the ECC block size.
> > +  E.g. : nand-ecc-level = <4 512>; /* 4 bits / 512 bytes */
> >  - nand-bus-width : 8 or 16 bus width if not present 8
> >  - nand-on-flash-bbt: boolean to enable on flash bbt option if not present false
> 
> Hm.. when was this proposal agreed? It seems I've missed the
> discussion...
> 
> FWIW, we've already proposed an equivalent one, but it received no
> feedback from the devicetree maintainers:

Sorry, binding review has become a huge undertaking.

> 
> http://comments.gmane.org/gmane.linux.drivers.devicetree/58764
> 
> Maybe we can discuss about it now?
> 
>   nand-ecc-strength : integer ECC required strength.
>   nand-ecc-size : integer step size associated to the ECC strength.

I'm okay with either, but the above binding is indeed more readable.

g.

^ permalink raw reply

* Linux-3.10 LTSI: Missing R-Car Sound Support on Marzen (R8A7779)
From: srikanth krishnakar @ 2014-02-05 11:13 UTC (permalink / raw)
  To: linux-arm-kernel

I am trying to boot the Renesas R-Car H1 (Marzen) board with 3.10 LTSi
kernel which is present at :

https://git.kernel.org/cgit/linux/kernel/git/horms/renesas-backport.git/

Branch: backport/v3.10.28-ltsi-rc1/snapshot

There are no sound cards detected on booting this kernel, although
graphics is found to be working. Are there any updates which adds the
RCAR_SOUND support to Marzen on v3.10 LTSi kernel ?

--------------------------

root at marzenh1:~# cat /proc/interrupts
            CPU0       CPU1       CPU2       CPU3
  29:       5840      17228       5026      14491       GIC  twd
  59:          0          0          0          0       GIC  renesas_intc_irqpin
  60:       8094          0          0          0       GIC  renesas_intc_irqpin
  61:          0          0          0          0       GIC  renesas_intc_irqpin
  62:          0          0          0          0       GIC  renesas_intc_irqpin
  63:          0          0          0          0       GIC
rcar-du-r8a7779, rcar-du-r8a7779
  64:         13          0          0          0       GIC  sh_tmu.0
  76:         60          0          0          0       GIC
ehci_hcd:usb1, ohci_hcd:usb3
  77:          1          0          0          0       GIC
ehci_hcd:usb2, ohci_hcd:usb4
  96:          0          0          0          0       GIC  r8a7779-vin.1
  98:          0          0          0          0       GIC  r8a7779-vin.3
 111:         82          0          0          0       GIC  i2c-rcar.0
 112:          0          0          0          0       GIC  i2c-rcar.2
 113:          0          0          0          0       GIC  i2c-rcar.3
 114:          0          0          0          0       GIC  i2c-rcar.1
 122:        982          0          0          0       GIC  sh-sci.2:mux
 132:          0          0          0          0       GIC  sata_rcar
 136:         52          0          0          0       GIC  sh_mobile_sdhi.0
 173:          0          0          0          0       GIC  gpio_rcar.0
 174:          0          0          0          0       GIC  gpio_rcar.1
 175:          0          0          0          0       GIC  gpio_rcar.2
 176:          0          0          0          0       GIC  gpio_rcar.3
 177:          0          0          0          0       GIC  gpio_rcar.4
 178:          0          0          0          0       GIC  gpio_rcar.5
 179:          0          0          0          0       GIC  gpio_rcar.6
2001:       8094          0          0          0  renesas_intc_irqpin  eth0
IPI0:          0          0          0          0  CPU wakeup interrupts
IPI1:          0          0          0          0  Timer broadcast interrupts
IPI2:        476       1715       1732       1236  Rescheduling interrupts
IPI3:         50         62        112        112  Function call interrupts
IPI4:          0          0          0          0  Single function
call interrupts
IPI5:          0          0          0          0  CPU stop interrupts
 Err:          0
...
....
.....
root at marzenh1:~# aplay -l
aplay: device_list:268: no soundcards found...

---------------------------
When will be the Audio support available for R-Car Marzen (R8A7779) on
v3.10 LTSi kernel ?

Thanks,
Srikanth

^ permalink raw reply

* [PATCH v7 2/7] dt-bindings: sram: describe option to reserve parts of the memory
From: Grant Likely @ 2014-02-05 11:12 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1782709.QdZpsrsctf@phil>

On Mon, 20 Jan 2014 16:42:58 +0100, Heiko St??bner <heiko@sntech.de> wrote:
> Some SoCs need parts of their sram for special purposes. So while being part
> of the peripheral, it should not be part of the genpool controlling the sram.
> 
> Therefore add an option mmio-sram-reserved to keep arbitrary portions of the
> sram from general usage.
> 
> Suggested-by: Rob Herring <robherring2@gmail.com>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> Tested-by: Ulrich Prinz <ulrich.prinz@googlemail.com>
> Acked-by: Rob Herring <robh@kernel.org>
> ---
>  Documentation/devicetree/bindings/misc/sram.txt |    8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/misc/sram.txt b/Documentation/devicetree/bindings/misc/sram.txt
> index 4d0a00e..09ee7a3 100644
> --- a/Documentation/devicetree/bindings/misc/sram.txt
> +++ b/Documentation/devicetree/bindings/misc/sram.txt
> @@ -8,9 +8,17 @@ Required properties:
>  
>  - reg : SRAM iomem address range
>  
> +Optional properties:
> +
> +- mmio-sram-reserved: ordered list of reserved chunks inside the sram that
> +  should not be used by the operating system.
> +  Format is <base size>, <base size>, ...; with base being relative to the
> +  reg property base.
> +

We've now got a draft binding for reserved memory. Can you use the format
here? Basically each reserved region is a sub node with either a reg
property or a size property.

This is specifically for sram, so I won't make a big deal about it, but
it would be good to have some commonality.

g.

^ permalink raw reply

* [PATCH v2 3/5] drivers: of: implement reserved-memory handling for cma
From: Grant Likely @ 2014-02-05 11:09 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1391515773-6112-4-git-send-email-m.szyprowski@samsung.com>

On Tue, 04 Feb 2014 13:09:31 +0100, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> From: Josh Cartwright <joshc@codeaurora.org>
> 
> Add support for handling 'shared-dma-pool' reserved-memory nodes using
> Contiguous Memory Allocator driver.
> 
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Laura Abbott <lauraa@codeaurora.org>
> Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/of/Kconfig               |    7 ++++
>  drivers/of/Makefile              |    1 +
>  drivers/of/of_reserved_mem_cma.c |   75 ++++++++++++++++++++++++++++++++++++++
>  3 files changed, 83 insertions(+)
>  create mode 100644 drivers/of/of_reserved_mem_cma.c
> 
> diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
> index 7ac330473ec9..5dd3a80910d2 100644
> --- a/drivers/of/Kconfig
> +++ b/drivers/of/Kconfig
> @@ -81,6 +81,13 @@ config OF_RESERVED_MEM
>  	help
>  	  Helpers to allow for reservation of memory regions
>  
> +config OF_RESERVED_MEM_CMA
> +	depends on OF_RESERVED_MEM
> +	depends on DMA_CMA
> +	def_bool y
> +	help
> +	  Helpers for reserving memory regions for DMA use
> +
>  config OF_RESERVED_MEM_DMA
>  	depends on OF_RESERVED_MEM
>  	depends on HAVE_GENERIC_DMA_COHERENT
> diff --git a/drivers/of/Makefile b/drivers/of/Makefile
> index 6142227ca854..49b9078637b8 100644
> --- a/drivers/of/Makefile
> +++ b/drivers/of/Makefile
> @@ -10,4 +10,5 @@ obj-$(CONFIG_OF_PCI)	+= of_pci.o
>  obj-$(CONFIG_OF_PCI_IRQ)  += of_pci_irq.o
>  obj-$(CONFIG_OF_MTD)	+= of_mtd.o
>  obj-$(CONFIG_OF_RESERVED_MEM) += of_reserved_mem.o
> +obj-$(CONFIG_OF_RESERVED_MEM_CMA) += of_reserved_mem_cma.o
>  obj-$(CONFIG_OF_RESERVED_MEM_DMA) += of_reserved_mem_dma.o
> diff --git a/drivers/of/of_reserved_mem_cma.c b/drivers/of/of_reserved_mem_cma.c
> new file mode 100644
> index 000000000000..601d80655102
> --- /dev/null
> +++ b/drivers/of/of_reserved_mem_cma.c
> @@ -0,0 +1,75 @@
> +/*
> + * Device tree based initialization code for DMA reserved regions.
> + *
> + * Copyright (c) 2013, The Linux Foundation. All Rights Reserved.
> + * Copyright (c) 2013 Samsung Electronics Co., Ltd.
> + *		http://www.samsung.com
> + * Author: Marek Szyprowski <m.szyprowski@samsung.com>
> + * Author: Josh Cartwright <joshc@codeaurora.org>
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of the
> + * License or (at your optional) any later version of the license.
> + */
> +#include <linux/err.h>
> +#include <linux/of.h>
> +#include <linux/of_fdt.h>
> +#include <linux/of_platform.h>
> +#include <linux/mm.h>
> +#include <linux/sizes.h>
> +#include <linux/mm_types.h>
> +#include <linux/dma-contiguous.h>
> +#include <linux/of_reserved_mem.h>
> +
> +static void rmem_cma_device_init(struct reserved_mem *rmem,
> +				 struct device *dev,
> +				 struct of_phandle_args *args)
> +{
> +	struct cma *cma = rmem->priv;
> +	dev_set_cma_area(dev, cma);
> +}
> +
> +static const struct reserved_mem_ops rmem_cma_ops = {
> +	.device_init	= rmem_cma_device_init,
> +};
> +
> +static int __init rmem_cma_setup(struct reserved_mem *rmem,
> +				 unsigned long node,
> +				 const char *uname)
> +{
> +	struct cma *cma;
> +	int err;
> +
> +	if (!of_get_flat_dt_prop(node, "reusable", NULL))
> +		return -EINVAL;
> +
> +	err = of_parse_flat_dt_reg(node, uname, &rmem->base, &rmem->size);
> +	if (!err)
> +		goto out_done;
> +
> +	rmem->base = 0;
> +	err = of_parse_flat_dt_size(node, uname, &rmem->size);
> +	if (err)
> +		goto out_err;
> +
> +out_done:

Please restrict gotos for error handling. Why not the following:

	err = of_parse_flat_dt_reg(node, uname, &rmem->base, &rmem->size);
	if (err) {
		rmem->base = 0;
		err = of_parse_flat_dt_size(node, uname, &rmem->size);
		if (err)
			goto out_err;
	}

> +	err = dma_contiguous_reserve_area(rmem->size, rmem->base, 0,
> +					  &cma);
> +	if (err) {
> +		pr_err("Reserved memory: unable to setup CMA region\n");
> +		return err;
> +	}
> +
> +	if (of_get_flat_dt_prop(node, "linux,cma-default", NULL))
> +		dma_contiguous_set_default(cma);
> +
> +	rmem->ops = &rmem_cma_ops;
> +	rmem->priv = cma;
> +
> +	return 0;
> +out_err:
> +	pr_err("Reseved memory: malformed node '%s'.\n", uname);
> +	return err;
> +}
> +RESERVEDMEM_OF_DECLARE(cma, "shared-dma-pool", rmem_cma_setup);
> -- 
> 1.7.9.5
> 

^ permalink raw reply

* [PATCH v2 1/5] drivers: of: add initialization code for reserved memory
From: Grant Likely @ 2014-02-05 11:05 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1391515773-6112-2-git-send-email-m.szyprowski@samsung.com>

On Tue, 04 Feb 2014 13:09:29 +0100, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> This patch adds device tree support for contiguous and reserved memory
> regions defined in device tree.
> 
> Large memory blocks can be reliably reserved only during early boot.
> This must happen before the whole memory management subsystem is
> initialized, because we need to ensure that the given contiguous blocks
> are not yet allocated by kernel. Also it must happen before kernel
> mappings for the whole low memory are created, to ensure that there will
> be no mappings (for reserved blocks) or mapping with special properties
> can be created (for CMA blocks). This all happens before device tree
> structures are unflattened, so we need to get reserved memory layout
> directly from fdt.
> 
> Later, those reserved memory regions are assigned to devices on each
> device structure initialization.
> 
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Laura Abbott <lauraa@codeaurora.org>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> [joshc: rework to implement new DT binding, provide mechanism for
>  plugging in new reserved-memory node handlers via
>  RESERVEDMEM_OF_DECLARE]
> Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
> [mszyprow: little code cleanup]
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/of/Kconfig                |    6 +
>  drivers/of/Makefile               |    1 +
>  drivers/of/of_reserved_mem.c      |  219 +++++++++++++++++++++++++++++++++++++
>  drivers/of/platform.c             |    7 ++
>  include/asm-generic/vmlinux.lds.h |   11 ++
>  include/linux/of_reserved_mem.h   |   62 +++++++++++
>  6 files changed, 306 insertions(+)
>  create mode 100644 drivers/of/of_reserved_mem.c
>  create mode 100644 include/linux/of_reserved_mem.h
> 
> diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
> index c6973f101a3e..aba13df56f3a 100644
> --- a/drivers/of/Kconfig
> +++ b/drivers/of/Kconfig
> @@ -75,4 +75,10 @@ config OF_MTD
>  	depends on MTD
>  	def_bool y
>  
> +config OF_RESERVED_MEM
> +	depends on HAVE_MEMBLOCK
> +	def_bool y
> +	help
> +	  Helpers to allow for reservation of memory regions
> +
>  endmenu # OF
> diff --git a/drivers/of/Makefile b/drivers/of/Makefile
> index efd05102c405..ed9660adad77 100644
> --- a/drivers/of/Makefile
> +++ b/drivers/of/Makefile
> @@ -9,3 +9,4 @@ obj-$(CONFIG_OF_MDIO)	+= of_mdio.o
>  obj-$(CONFIG_OF_PCI)	+= of_pci.o
>  obj-$(CONFIG_OF_PCI_IRQ)  += of_pci_irq.o
>  obj-$(CONFIG_OF_MTD)	+= of_mtd.o
> +obj-$(CONFIG_OF_RESERVED_MEM) += of_reserved_mem.o
> diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
> new file mode 100644
> index 000000000000..f17cd56e68d9
> --- /dev/null
> +++ b/drivers/of/of_reserved_mem.c
> @@ -0,0 +1,219 @@
> +/*
> + * Device tree based initialization code for reserved memory.
> + *
> + * Copyright (c) 2013, The Linux Foundation. All Rights Reserved.
> + * Copyright (c) 2013 Samsung Electronics Co., Ltd.
> + *		http://www.samsung.com
> + * Author: Marek Szyprowski <m.szyprowski@samsung.com>
> + * Author: Josh Cartwright <joshc@codeaurora.org>
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of the
> + * License or (at your optional) any later version of the license.
> + */
> +#include <linux/memblock.h>
> +#include <linux/err.h>
> +#include <linux/of.h>
> +#include <linux/of_fdt.h>
> +#include <linux/of_platform.h>
> +#include <linux/mm.h>
> +#include <linux/sizes.h>
> +#include <linux/of_reserved_mem.h>
> +
> +#define MAX_RESERVED_REGIONS	16
> +static struct reserved_mem reserved_mem[MAX_RESERVED_REGIONS];
> +static int reserved_mem_count;
> +
> +int __init of_parse_flat_dt_reg(unsigned long node, const char *uname,
> +				   phys_addr_t *base, phys_addr_t *size)

Useful utility function; move to drivers/of/fdt.c

> +{
> +	unsigned long len;
> +	__be32 *prop;
> +
> +	prop = of_get_flat_dt_prop(node, "reg", &len);
> +	if (!prop)
> +		return -EINVAL;
> +
> +	if (len < (dt_root_addr_cells + dt_root_size_cells) * sizeof(__be32)) {
> +		pr_err("Reserved memory: invalid reg property in '%s' node.\n",
> +				uname);
> +		return -EINVAL;
> +	}

This is /okay/ for an initial implementation, but it is naive. While I
suggested making #address-cells and #size-cells equal the root node
values for the purpose of simplicity, it should still be perfectly valid
to have different values if the ranges property is correctly formed.

> +
> +	*base = dt_mem_next_cell(dt_root_addr_cells, &prop);
> +	*size = dt_mem_next_cell(dt_root_size_cells, &prop);

Future enhancement; allow for parsing more than just the first reg
tuple.

> +	return 0;
> +}

> +
> +int __init of_parse_flat_dt_size(unsigned long node, const char *uname,
> +				    phys_addr_t *size)
> +{
> +	unsigned long len;
> +	__be32 *prop;
> +
> +	prop = of_get_flat_dt_prop(node, "size", &len);
> +	if (!prop)
> +		return -EINVAL;
> +
> +	if (len < dt_root_size_cells * sizeof(__be32)) {
> +		pr_err("Reserved memory: invalid size property in '%s' node.\n",
> +				uname);
> +		return -EINVAL;
> +	}

More than that, the size should be dead on. '==' would be the correct
test I think.

> +
> +	*size = dt_mem_next_cell(dt_root_size_cells, &prop);
> +	return 0;
> +}
> +
> +static int __init rmem_default_early_setup(struct reserved_mem *rmem,
> +					   unsigned long node,
> +					   const char *uname)
> +{
> +	int err;
> +
> +	if (of_get_flat_dt_prop(node, "compatible", NULL))
> +		return -EINVAL;
> +
> +	err = of_parse_flat_dt_reg(node, uname, &rmem->base, &rmem->size);
> +	if (err)
> +		return err;
> +
> +	if (of_get_flat_dt_prop(node, "no-map", NULL))
> +		err = memblock_remove(rmem->base, rmem->size);
> +	else
> +		err = memblock_reserve(rmem->base, rmem->size);

This is the only dependency on memblock. Make it an arch hook, and
create a default __weak implementation:

#if defined(CONFIG_HAVE_MEMBLOCK)
int __init __weak early_init_dt_reserve_memory_arch(u64 base, u64 size, bool nomap)
{
	if (nomap)
		return memblock_remove(base, size);
	return memblock_reserve(base, size);
}
#else
int __init __weak early_init_dt_reserve_memory_arch(u64 base, u64 size, bool nomap)
{
	pr_error("Reserved memory not supported, ignoring range 0x%llx - 0x%llx%s\n",
		base, size, nomap ? " (nomap)" : "");
}
#endif

> +
> +	if (err == 0)
> +		pr_info("Reserved memory: found '%s', memory base %pa, size %ld MiB\n",
> +			uname, &rmem->base, (unsigned long)rmem->size / SZ_1M);

pr_info will be too chatty I think. pr_debug please.

> +
> +	return err;
> +}
> +
> +static const struct of_device_id rmem_default_id
> +	__used __section(__reservedmem_of_table_end) = {
> +	.data		= rmem_default_early_setup,
> +};

I was going to say this isn't very type safe and that the only reason to
use of_device_id is when using of_match_node() which will iterate a
table for you. But reading further I see you're handling type checking
in the macro so this is okay.

> +
> +static int __init fdt_scan_reserved_mem(unsigned long node, const char *uname,
> +					int depth, void *data)

Move this function to fdt.c. It should be treated as a fundamental part
of memory node parsing. It should also always be enabled, regardless of
the CONFIG_OF_RESERVED_MEMORY state because the region should always be
set aside even when the kernel doesn't know how to use it.

> +{
> +	struct reserved_mem *rmem = &reserved_mem[reserved_mem_count];
> +	extern const struct of_device_id __reservedmem_of_table[];
> +	const struct of_device_id *id;
> +	const char *status;
> +
> +	if (reserved_mem_count == ARRAY_SIZE(reserved_mem)) {
> +		pr_err("Reserved memory: not enough space all defined regions.\n");
> +		return -ENOSPC;
> +	}

It is not okay to bail here. If a region is reserved, then the kernel
*MUST* honor it, even if drivers cannot make use of it. As a bare
minimum it should be removed from the memblock pool.

> +
> +	status = of_get_flat_dt_prop(node, "status", NULL);
> +	if (status && strcmp(status, "okay") != 0)
> +		return 0;
> +
> +	/*
> +	 * The default handler above ensures this section is terminated with a
> +	 * id whose compatible string is empty
> +	 */
> +	for (id = __reservedmem_of_table; id <= &rmem_default_id; id++) {
> +		reservedmem_of_init_fn initfn = id->data;
> +		const char *compat = id->compatible;
> +
> +		if (compat[0] && !of_flat_dt_is_compatible(node, compat))
> +			continue;
> +
> +		if (initfn(rmem, node, uname) == 0) {
> +			pr_info("Reserved memory: created %s node, compatible id %s\n",
> +				uname, compat);
> +			rmem->name = uname;
> +			reserved_mem_count++;
> +			break;
> +		}
> +	}

What would be the condition that a special setup hook is called, but the
memory is not removed from the memblock pool? I seems wrong to me that
memory blocks wouldn't always get removed from main memory; even if
special setup code is executed on them.

By calling out to extra setup functions it means that each one of them
needs to implement its own memory removal code and get it correct. There
is a strong possibility for bugs there.

> +
> +	return 0;
> +}
> +
> +static struct reserved_mem *find_rmem(struct device_node *np)
> +{
> +	const char *name;
> +	unsigned int i;
> +
> +	name = kbasename(np->full_name);
> +
> +	for (i = 0; i < reserved_mem_count; i++)
> +		if (strcmp(name, reserved_mem[i].name) == 0)
> +			return &reserved_mem[i];

This looks fragile. It needs to match on the full path, not just
kbasename(), but that is expensive. However, all reserved regions should
have a phandle. You can use that for matching.

> +
> +	return NULL;
> +}
> +
> +/**
> + * of_reserved_mem_device_init() - assign reserved memory region to given device
> + *
> + * This function assign memory region pointed by "memory-region" device tree
> + * property to the given device.
> + */
> +void of_reserved_mem_device_init(struct device *dev)
> +{
> +	struct device_node *np = dev->of_node;
> +	struct reserved_mem *rmem;
> +	struct of_phandle_args s;
> +	unsigned int i;
> +
> +	for (i = 0; of_parse_phandle_with_args(np, "memory-region",
> +				"#memory-region-cells", i, &s) == 0; i++) {
> +
> +		rmem = find_rmem(s.np);
> +		if (!rmem || !rmem->ops || !rmem->ops->device_init) {
> +			of_node_put(s.np);
> +			continue;
> +		}
> +
> +		rmem->ops->device_init(rmem, dev, &s);
> +		dev_info(dev, "assigned reserved memory node %s\n",
> +			 rmem->name);
> +		of_node_put(s.np);
> +		break;
> +	}
> +}
> +
> +/**
> + * of_reserved_mem_device_release() - release reserved memory device structures
> + *
> + * This function releases structures allocated for memory region handling for
> + * the given device.
> + */
> +void of_reserved_mem_device_release(struct device *dev)
> +{
> +	struct device_node *np = dev->of_node;
> +	struct reserved_mem *rmem;
> +	struct of_phandle_args s;
> +	unsigned int i;
> +
> +	for (i = 0; of_parse_phandle_with_args(np, "memory-region",
> +				"#memory-region-cells", i, &s) == 0; i++) {
> +
> +		rmem = find_rmem(s.np);
> +		if (rmem && rmem->ops && rmem->ops->device_release)
> +			rmem->ops->device_release(rmem, dev);
> +
> +		of_node_put(s.np);
> +	}
> +}
> +
> +/**
> + * early_init_dt_scan_reserved_mem() - create reserved memory regions
> + *
> + * This function grabs memory from early allocator for device exclusive use
> + * defined in device tree structures. It should be called by arch specific code
> + * once the early allocator (memblock) has been activated and all other
> + * subsystems have already allocated/reserved memory.

As commented on patch 4, this should be called by common parsing code,
not arch code.

Why do you require other subsystems to allocate/reserve memory before
the reserved regions? I would think that the reserved regions declared
in the device tree would take precedence.

> + */
> +void __init early_init_dt_scan_reserved_mem(void)
> +{
> +	of_scan_flat_dt_by_path("/reserved-memory", fdt_scan_reserved_mem,
> +				NULL);
> +}
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index 404d1daebefa..3df0b1826e8b 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -21,6 +21,7 @@
>  #include <linux/of_device.h>
>  #include <linux/of_irq.h>
>  #include <linux/of_platform.h>
> +#include <linux/of_reserved_mem.h>
>  #include <linux/platform_device.h>
>  
>  const struct of_device_id of_default_bus_match_table[] = {
> @@ -220,6 +221,8 @@ static struct platform_device *of_platform_device_create_pdata(
>  	dev->dev.bus = &platform_bus_type;
>  	dev->dev.platform_data = platform_data;
>  
> +	of_reserved_mem_device_init(&dev->dev);
> +
>  	/* We do not fill the DMA ops for platform devices by default.
>  	 * This is currently the responsibility of the platform code
>  	 * to do such, possibly using a device notifier
> @@ -227,6 +230,7 @@ static struct platform_device *of_platform_device_create_pdata(
>  
>  	if (of_device_add(dev) != 0) {
>  		platform_device_put(dev);
> +		of_reserved_mem_device_release(&dev->dev);
>  		return NULL;
>  	}
>  
> @@ -282,6 +286,8 @@ static struct amba_device *of_amba_device_create(struct device_node *node,
>  	else
>  		of_device_make_bus_id(&dev->dev);
>  
> +	of_reserved_mem_device_init(&dev->dev);
> +
>  	/* Allow the HW Peripheral ID to be overridden */
>  	prop = of_get_property(node, "arm,primecell-periphid", NULL);
>  	if (prop)
> @@ -308,6 +314,7 @@ static struct amba_device *of_amba_device_create(struct device_node *node,
>  	return dev;
>  
>  err_free:
> +	of_reserved_mem_device_release(&dev->dev);
>  	amba_device_put(dev);
>  	return NULL;
>  }
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index bc2121fa9132..f10f64fcc815 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -167,6 +167,16 @@
>  #define CLK_OF_TABLES()
>  #endif
>  
> +#ifdef CONFIG_OF_RESERVED_MEM
> +#define RESERVEDMEM_OF_TABLES()				\
> +	. = ALIGN(8);					\
> +	VMLINUX_SYMBOL(__reservedmem_of_table) = .;	\
> +	*(__reservedmem_of_table)			\
> +	*(__reservedmem_of_table_end)
> +#else
> +#define RESERVEDMEM_OF_TABLES()
> +#endif
> +
>  #define KERNEL_DTB()							\
>  	STRUCT_ALIGN();							\
>  	VMLINUX_SYMBOL(__dtb_start) = .;				\
> @@ -490,6 +500,7 @@
>  	TRACE_SYSCALLS()						\
>  	MEM_DISCARD(init.rodata)					\
>  	CLK_OF_TABLES()							\
> +	RESERVEDMEM_OF_TABLES()						\
>  	CLKSRC_OF_TABLES()						\
>  	KERNEL_DTB()							\
>  	IRQCHIP_OF_MATCH_TABLE()
> diff --git a/include/linux/of_reserved_mem.h b/include/linux/of_reserved_mem.h
> new file mode 100644
> index 000000000000..41f43828e1db
> --- /dev/null
> +++ b/include/linux/of_reserved_mem.h
> @@ -0,0 +1,62 @@
> +#ifndef __OF_RESERVED_MEM_H
> +#define __OF_RESERVED_MEM_H
> +
> +struct cma;
> +struct platform_device;
> +struct of_phandle_args;
> +struct reserved_mem_ops;
> +
> +struct reserved_mem {
> +	const char			*name;
> +	const struct reserved_mem_ops	*ops;
> +	phys_addr_t			base;
> +	phys_addr_t			size;
> +	void				*priv;
> +};
> +
> +struct reserved_mem_ops {
> +	void	(*device_init)(struct reserved_mem *rmem,
> +			       struct device *dev,
> +			       struct of_phandle_args *args);
> +	void	(*device_release)(struct reserved_mem *rmem,
> +				  struct device *dev);
> +};
> +
> +typedef int (*reservedmem_of_init_fn)(struct reserved_mem *rmem,
> +				      unsigned long node, const char *uname);
> +
> +#ifdef CONFIG_OF_RESERVED_MEM
> +void of_reserved_mem_device_init(struct device *dev);
> +void of_reserved_mem_device_release(struct device *dev);
> +void early_init_dt_scan_reserved_mem(void);
> +
> +int of_parse_flat_dt_reg(unsigned long node, const char *uname,
> +			 phys_addr_t *base, phys_addr_t *size);
> +int of_parse_flat_dt_size(unsigned long node, const char *uname,
> +			  phys_addr_t *size);
> +
> +#define RESERVEDMEM_OF_DECLARE(name, compat, init)			\
> +	static const struct of_device_id __reservedmem_of_table_##name	\
> +		__used __section(__reservedmem_of_table)		\
> +		 = { .compatible = compat,				\
> +		     .data = (init == (reservedmem_of_init_fn)NULL) ?	\
> +				init : init }

Clever type checking! I haven't known about doing it that way.

> +
> +#else
> +static inline void of_reserved_mem_device_init(struct device *dev) { }
> +
> +static inline
> +void of_reserved_mem_device_release(struct device *dev) { }
> +
> +static inline void early_init_dt_scan_reserved_mem(void) { }
> +
> +#define RESERVEDMEM_OF_DECLARE(name, compat, init)			\
> +	static const struct of_device_id __reservedmem_of_table_##name	\
> +		__attribute__((unused))					\
> +		 = { .compatible = compat,				\
> +		     .data = (init == (reservedmem_of_init_fn)NULL) ?	\
> +				init : init }
> +
> +#endif
> +
> +#endif /* __OF_RESERVED_MEM_H */
> -- 
> 1.7.9.5
> 

^ permalink raw reply

* [Linux-kernel] [PATCH 2/3] ARM: shmobile: r8a7790: specify multiple parents for cpg_clks
From: Laurent Pinchart @ 2014-02-05 10:57 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <52F21448.6060408@codethink.co.uk>

Hi Ben,

On Wednesday 05 February 2014 10:36:56 Ben Dooks wrote:
> On 05/02/14 10:32, Laurent Pinchart wrote:
> > On Wednesday 05 February 2014 09:15:31 Ben Dooks wrote:
> >> On 04/02/14 18:17, William Towle wrote:
> >>> The current drivers/clk/shmobile/clk-rcar-gen2.c uses the
> >>> extal_clk reference for the parent of all the clocks that
> >>> it registers. However the lb, qspi, sdh, sd0 and sd1 clocks
> >>> are all parented to either pll1 or pll1_div2 which means
> >>> that the clock rates are incorrect.
> >>> 
> >>> This is part of the fix that corrects the SDHI0 clock
> >>> 
> >>> rate error where it reports 1MHz instead of 97.5:
> >>>       sh_mobile_sdhi ee100000.sd: mmc0 base at 0xee100000 clock rate 1
> >>>       MHz
> >>> 
> >>> Notes:
> >>> - May require cross-merge with clk-rcar-gen2.c fix
> >>> - Also not clear which clock "z" is to fix it.
> >> 
> >> Laurent, if you could give us an idea of how to fix this then
> >> it would be helpful to get this patch fully fixed.
> > 
> > I've already sent a patch that fixes this issue.
> > 
> > "clk: shmobile: rcar-gen2: Fix clock parent all non-PLL clocks"
> > 
> > (http://www.spinics.net/lists/linux-sh/msg27275.html)
> > 
> > I've just pinged Mike to ask him to pick it up for v3.14.
> 
> I just saw and commented on it. I think the DT is the nicer way
> of actually doing this, especially if the driver may get re-used
> in future.

I've replied to that in the other mail thread, we can continue the discussion 
there.

> There's also an issue with SDHI0/1 divider table which has been posted too.

I've replied to that patch as well.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply

* [PATCH 1/3] clk: rcar-h2: fix sd0/sd1 divisor table
From: Laurent Pinchart @ 2014-02-05 10:56 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1391537858-28593-2-git-send-email-william.towle@codethink.co.uk>

Hi William,

Thank you for the patch.

On Tuesday 04 February 2014 18:17:36 William Towle wrote:
> The clk_div_table for cpg_sd01_div_table[] concurs with the manual
> but not with values found in the device itself (which are also the
> same as the ones in arch/arm/mach-shmobile/clock-r8a7790.c).
> 
> Update the clk-rcar-gen2.c driver to have the same table as the one
> used by the mach-shmobile driver which work once further issues are
> fixed in the clk-rcar-gen2.c driver.
> 
> Part of the fix for the following error where the driver reports the
> output as 1MHz but is really 97.5MHz:
>     sh_mobile_sdhi ee100000.sd: mmc0 base at 0xee100000 clock rate 1 MHz
> 
> [ben.dooks at codethink.co.uk: updated patch description]
> Signed-off-by: William Towle <william.towle@codethink.co.uk>
> Reviewed-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
>  drivers/clk/shmobile/clk-rcar-gen2.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/clk/shmobile/clk-rcar-gen2.c
> b/drivers/clk/shmobile/clk-rcar-gen2.c index a59ec21..df4a1e6 100644
> --- a/drivers/clk/shmobile/clk-rcar-gen2.c
> +++ b/drivers/clk/shmobile/clk-rcar-gen2.c
> @@ -170,6 +170,8 @@ static const struct clk_div_table cpg_sdh_div_table[] =
> { };
> 
>  static const struct clk_div_table cpg_sd01_div_table[] = {
> +	{  0,  2 }, {  1,  3 }, {  2,  4 }, {  3,  6 },
> +	{  4,  8 },
>  	{  5, 12 }, {  6, 16 }, {  7, 18 }, {  8, 24 },
>  	{ 10, 36 }, { 11, 48 }, { 12, 10 }, {  0,  0 },

With this applied the only difference between the sdh and sd0/1 dividers 
tables would be the { 12, 10 } entry, available for sd0/1 only. Given that the 
hardware does not match the documentation, could you check whether that entry 
is supported by sdh as well ? If so we could merge the two tables. Otherwise 
this patch looks good, could you please just reformat the table to avoid the 
mostly empty line in the middle ?

>  };

-- 
Regards,

Laurent Pinchart

^ permalink raw reply

* [PATCH] PCI: MVEBU: Use Device ID and revision from underlying endpoint
From: Andrew Lunn @ 2014-02-05 10:55 UTC (permalink / raw)
  To: linux-arm-kernel

Marvell SoCs place the SoC number into the PCIe endpoint device ID.
The SoC stepping is placed into the PCIe revision. The old plat-orion
PCIe driver allowed this information to be seen in user space with a
simple lspci command.

The new driver places a virtual PCI-PCI bridge on top of these
endpoints. It has its own hard coded PCI device ID. Thus it is no
longer possible to see what the SoC is using lspci.

When initializing the PCI-PCI bridge, set its device ID and revision
from the underlying endpoint, thus restoring this functionality.
Debian would like to use this in order to aid installing the correct
DTB file.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 drivers/pci/host/pci-mvebu.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
index 13478ecd4113..0e79665afd44 100644
--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -60,14 +60,6 @@
 #define PCIE_DEBUG_CTRL         0x1a60
 #define  PCIE_DEBUG_SOFT_RESET		BIT(20)
 
-/*
- * This product ID is registered by Marvell, and used when the Marvell
- * SoC is not the root complex, but an endpoint on the PCIe bus. It is
- * therefore safe to re-use this PCI ID for our emulated PCI-to-PCI
- * bridge.
- */
-#define MARVELL_EMULATED_PCI_PCI_BRIDGE_ID 0x7846
-
 /* PCI configuration space of a PCI-to-PCI bridge */
 struct mvebu_sw_pci_bridge {
 	u16 vendor;
@@ -388,7 +380,8 @@ static void mvebu_sw_pci_bridge_init(struct mvebu_pcie_port *port)
 
 	bridge->class = PCI_CLASS_BRIDGE_PCI;
 	bridge->vendor = PCI_VENDOR_ID_MARVELL;
-	bridge->device = MARVELL_EMULATED_PCI_PCI_BRIDGE_ID;
+	bridge->device = mvebu_readl(port, PCIE_DEV_ID_OFF) >> 16;
+	bridge->revision = mvebu_readl(port, PCIE_DEV_REV_OFF) & 0xff;
 	bridge->header_type = PCI_HEADER_TYPE_BRIDGE;
 	bridge->cache_line_size = 0x10;
 
-- 
1.8.5.2

^ permalink raw reply related

* [PATCH 1/2] clk: shmobile: rcar-gen2: Fix clock parent all non-PLL clocks
From: Laurent Pinchart @ 2014-02-05 10:51 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <52F213C9.2020501@codethink.co.uk>

Hi Ben,

On Wednesday 05 February 2014 10:34:49 Ben Dooks wrote:
> On 07/01/14 16:47, Laurent Pinchart wrote:
> > The lb, qspi, sdh, sd0 and sd1 clocks have the PLL1 (divided by 2) as
> > their parent, not the main clock. Fix it.
> 
> William Towle has already sent a patch to move this to device tree
> which I think is a better solution for this.

I actually disagree. The CPG is an IP core that generates a bunch of clocks 
from a single external parent. The fact that clocks are not flat but organized 
as a tree internally is an internal property of the CPG, and I prefer keeping 
it that way instead of exposing it in the device tree.

> Any chance of commenting on which to take please.
> 
> > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> > 
> >   drivers/clk/shmobile/clk-rcar-gen2.c | 10 +++++++++-
> >   1 file changed, 9 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/clk/shmobile/clk-rcar-gen2.c
> > b/drivers/clk/shmobile/clk-rcar-gen2.c index a59ec21..8c7bcbd 100644
> > --- a/drivers/clk/shmobile/clk-rcar-gen2.c
> > +++ b/drivers/clk/shmobile/clk-rcar-gen2.c
> > @@ -186,7 +186,7 @@ rcar_gen2_cpg_register_clock(struct device_node *np,
> > struct rcar_gen2_cpg *cpg,> 
> >   			     const char *name)
> >   {
> >   	const struct clk_div_table *table = NULL;
> > -	const char *parent_name = "main";
> > +	const char *parent_name;
> >   	unsigned int shift;
> >   	unsigned int mult = 1;
> >   	unsigned int div = 1;
> > @@ -201,23 +201,31 @@ rcar_gen2_cpg_register_clock(struct device_node *np,
> > struct rcar_gen2_cpg *cpg,> 
> >   		 * the multiplier value.
> >   		 */
> >   		u32 value = clk_readl(cpg->reg + CPG_PLL0CR);
> > +		parent_name = "main";
> >   		mult = ((value >> 24) & ((1 << 7) - 1)) + 1;
> >   	} else if (!strcmp(name, "pll1")) {
> > +		parent_name = "main";
> >   		mult = config->pll1_mult / 2;
> >   	} else if (!strcmp(name, "pll3")) {
> > +		parent_name = "main";
> >   		mult = config->pll3_mult;
> >   	} else if (!strcmp(name, "lb")) {
> > +		parent_name = "pll1_div2";
> >   		div = cpg_mode & BIT(18) ? 36 : 24;
> >   	} else if (!strcmp(name, "qspi")) {
> > +		parent_name = "pll1_div2";
> >   		div = (cpg_mode & (BIT(3) | BIT(2) | BIT(1))) == BIT(2)
> >   		    ? 16 : 20;
> >   	} else if (!strcmp(name, "sdh")) {
> > +		parent_name = "pll1_div2";
> >   		table = cpg_sdh_div_table;
> >   		shift = 8;
> >   	} else if (!strcmp(name, "sd0")) {
> > +		parent_name = "pll1_div2";
> >   		table = cpg_sd01_div_table;
> >   		shift = 4;
> >   	} else if (!strcmp(name, "sd1")) {
> > +		parent_name = "pll1_div2";
> >   		table = cpg_sd01_div_table;
> >   		shift = 0;
> >   	} else if (!strcmp(name, "z")) {

-- 
Regards,

Laurent Pinchart

^ permalink raw reply

* [PATCH 1/3] reset: Add of_reset_control_get
From: Maxime Ripard @ 2014-02-05 10:50 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1389179494.4297.9.camel@pizza.hi.pengutronix.de>

Hi Philipp,

On Wed, Jan 08, 2014 at 12:11:34PM +0100, Philipp Zabel wrote:
> > How do you want to get this merged? You'll probably want to take this
> > patch, and patches 2/3 and 3/3 depend on some patches merged by Daniel
> > Lezcano (that I forgot to CC on this, I'll resend).
> > 
> > Maybe the best way would be simply to merge this one for 3.14 through
> > your branch, and merge the two other patches in 3.15.
> 
> Alright, this is applied to my branch. I'll wait a bit for feedback on
> the GPIO reset patches and then send a pull request.

It doesn't seem to be in 3.14. Did I miss something?

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140205/611bab2f/attachment.sig>

^ permalink raw reply

* [PATCH 08/18] mfd: max14577: Rename state container to maxim_core
From: Krzysztof Kozlowski @ 2014-02-05 10:48 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20140203094258.GI13529@lee--X1>

+Cc: Chanwoo, Mark and Dmitry for ACK-s on their subsystems.

Krzysztof Kozlowski

On Mon, 2014-02-03 at 09:42 +0000, Lee Jones wrote:
> > This patch continues the preparation for adding support for max77836
> > device to existing max14577 driver.
> > 
> > The patch renames the struct "max14577" state container to "maxim_core".
> > This is only a rename-like patch, new code is not added.
> > 
> > Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> > Cc: Kyungmin Park <kyungmin.park@samsung.com>
> > Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> > ---
> >  drivers/extcon/extcon-max14577.c     |   22 +++++------
> >  drivers/mfd/max14577.c               |   68 +++++++++++++++++-----------------
> >  drivers/power/max14577_charger.c     |   16 ++++----
> >  drivers/regulator/max14577.c         |    6 +--
> >  include/linux/mfd/max14577-private.h |    5 ++-
> >  5 files changed, 60 insertions(+), 57 deletions(-)
> 
> Need some more maintainer Acks here.
> 
> > -struct max14577 {
> > +/*
> > + * State container for max14577-like drivers.
> > + */
> 
> I don't think this comment is required.
> 
> Besides that, the code looks fine:
>   Acked-by: Lee Jones <lee.jones@linaro.org>
> 
> > +struct maxim_core {
> >  	struct device *dev;
> >  	struct i2c_client *i2c; /* Slave addr = 0x4A */
> >  
> 

^ permalink raw reply

* [PATCH 09/18] mfd: max14577: Add "muic" suffix to regmap and irq_chip
From: Krzysztof Kozlowski @ 2014-02-05 10:48 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20140203094518.GJ13529@lee--X1>

+Cc: Chanwoo, Mark and Dmitry for ACK-s on their subsystems.

Krzysztof Kozlowski

On Mon, 2014-02-03 at 09:45 +0000, Lee Jones wrote:
> > This patch continues the preparation for adding support for max77836
> > device to existing max14577 driver.
> > 
> > Add "muic" suffix to regmap and irq_data fields in maxim_core state
> > container to prepare for max77836 support.
> > This is only a rename-like patch, new code is not added.
> > 
> > Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> > Cc: Kyungmin Park <kyungmin.park@samsung.com>
> > Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> > ---
> >  drivers/extcon/extcon-max14577.c     |   17 +++++++++--------
> >  drivers/mfd/max14577.c               |   22 +++++++++++-----------
> >  drivers/power/max14577_charger.c     |    8 ++++----
> >  drivers/regulator/max14577.c         |    2 +-
> >  include/linux/mfd/max14577-private.h |    4 ++--
> >  5 files changed, 27 insertions(+), 26 deletions(-)
> 
> Happy to apply this with maintainer Acks.
>   Acked-by: Lee Jones <lee.jones@linaro.org>
> 

^ permalink raw reply

* [PATCH 07/18] mfd: max14577: Rename and add MAX14577 symbols to prepare for max77836
From: Krzysztof Kozlowski @ 2014-02-05 10:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20140203093809.GH13529@lee--X1>

Thanks for ACK.

Dear Chanwoo, Mark and Dmitry, can you ACK this patch and also 8/18 and
9/18:
http://thread.gmane.org/gmane.linux.kernel/1636654/focus=1636674
http://thread.gmane.org/gmane.linux.kernel/1636654/focus=1636674
?

Best regards,
Krzysztof

On Mon, 2014-02-03 at 09:38 +0000, Lee Jones wrote:
> > This patch prepares for adding support for max77836 device to existing
> > max14577 driver:
> > 1. Renames most of symbols and defines prefixed with MAX14577 to MAXIM.
> > 2. Adds prefixes (MAXIM or MAX14577) to defines without any MAX* prefix.
> > 
> > This is only a rename-like patch, new code is not added.
> > 
> > Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> > Cc: Kyungmin Park <kyungmin.park@samsung.com>
> > Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> > ---
> >  drivers/extcon/extcon-max14577.c     |  105 ++++-----
> >  drivers/mfd/max14577.c               |   51 ++---
> >  drivers/power/max14577_charger.c     |   81 +++----
> >  drivers/regulator/max14577.c         |   44 ++--
> >  include/linux/mfd/max14577-private.h |  399 ++++++++++++++++------------------
> >  include/linux/mfd/max14577.h         |    2 +-
> >  6 files changed, 333 insertions(+), 349 deletions(-)
> 
> I think the name changes instil some clarity here.
> 
> I still need the other Acks before applying the patch though.
> 
> For now you can have my:
>   Acked-by: Lee Jones <lee.jones@linaro.org>
> 

^ permalink raw reply

* [PATCH 05/18] mfd: max14577: Use of_match_ptr() in i2c_driver
From: Krzysztof Kozlowski @ 2014-02-05 10:41 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20140203093013.GG13529@lee--X1>

On Mon, 2014-02-03 at 09:30 +0000, Lee Jones wrote:
> > Use of_match_ptr() in assignment of i2c_driver.of_match_table.
> > 
> > Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> > Cc: Kyungmin Park <kyungmin.park@samsung.com>
> > Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> > ---
> >  drivers/mfd/max14577.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/mfd/max14577.c b/drivers/mfd/max14577.c
> > index 2ac2f2d7cea6..75b37082a3fe 100644
> > --- a/drivers/mfd/max14577.c
> > +++ b/drivers/mfd/max14577.c
> > @@ -224,7 +224,7 @@ static struct i2c_driver max14577_i2c_driver = {
> >  		.name = "max14577",
> >  		.owner = THIS_MODULE,
> >  		.pm = &max14577_pm,
> > -		.of_match_table = max14577_dt_match,
> > +		.of_match_table = of_match_ptr(max14577_dt_match),
> 
> Are you sure this is required?

No, it was my mistake. Please ignore this patch.

Krzysztof

^ permalink raw reply

* [PATCH 11/18] extcon: max14577: Add max14577 prefix to muic_irqs
From: Krzysztof Kozlowski @ 2014-02-05 10:40 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <52F18A08.6070409@samsung.com>

On Wed, 2014-02-05 at 09:47 +0900, Chanwoo Choi wrote:
> Hi Krzysztof,
> 
> Following patch has conflict on extcon-next branch(Linus 3.14-rc1)
> when apply patchset by using git am.
> 
> [PATCH 11/18] extcon: max14577: Add max14577 prefix to muic_irqs
> [PATCH 12/18] extcon: max14577: Choose muic_irqs according to device type
> [PATCH 14/18] extcon: max14577: Add support for max77836
> 
> The base commit of this patchset isn't mainline. You need to rebase this patchset 
> on extcon-next branch and please resend this patchset.
> 
> Thanks,
> Chanwoo Choi

Hi,

This patch patch (along with other) depends on previous rename patches
from this patchset:
[PATCH 07/18] mfd: max14577: Rename and add MAX14577 symbols to prepare
for max77836
http://article.gmane.org/gmane.linux.kernel/1636674

I can resolve the conflict but then they will return on applying patch
7/18.

I think this patch may wait for a little until the rename-like patches
will be accepted.

Can you ACK other patches touch extcon?
 - [PATCH 07/18] mfd: max14577: Rename and add MAX14577 symbols...
 - [PATCH 08/18] mfd: max14577: Rename state container to maxim_core
 - [PATCH 09/18] mfd: max14577: Add "muic" suffix to regmap and irq_chip

Best regards,
Krzysztof

> On 01/28/2014 09:18 PM, Krzysztof Kozlowski wrote:
> > Add max14577 prefix to muic_irqs array. This prepares for max77836
> > support in this extcon driver.
> > 
> > Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> > Cc: Kyungmin Park <kyungmin.park@samsung.com>
> > Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> > ---
> >  drivers/extcon/extcon-max14577.c |   12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c
> > index fd48b4909470..fb343f4042d2 100644
> > --- a/drivers/extcon/extcon-max14577.c
> > +++ b/drivers/extcon/extcon-max14577.c
> > @@ -85,7 +85,7 @@ struct max14577_muic_irq {
> >  	unsigned int virq;
> >  };
> >  
> > -static struct max14577_muic_irq muic_irqs[] = {
> > +static struct max14577_muic_irq max14577_muic_irqs[] = {
> >  	{ MAXIM_IRQ_INT1_ADC,		"muic-ADC" },
> >  	{ MAXIM_IRQ_INT1_ADCLOW,	"muic-ADCLOW" },
> >  	{ MAXIM_IRQ_INT1_ADCERR,	"muic-ADCError" },
> > @@ -541,9 +541,9 @@ static irqreturn_t max14577_muic_irq_handler(int irq, void *data)
> >  	 * However we only need to know whether it was ADC, charger
> >  	 * or both interrupts so decode IRQ and turn on proper flags.
> >  	 */
> > -	for (i = 0; i < ARRAY_SIZE(muic_irqs); i++)
> > -		if (irq == muic_irqs[i].virq)
> > -			irq_type = muic_irqs[i].irq;
> > +	for (i = 0; i < ARRAY_SIZE(max14577_muic_irqs); i++)
> > +		if (irq == max14577_muic_irqs[i].virq)
> > +			irq_type = max14577_muic_irqs[i].irq;
> >  
> >  	switch (irq_type) {
> >  	case MAXIM_IRQ_INT1_ADC:
> > @@ -647,8 +647,8 @@ static int max14577_muic_probe(struct platform_device *pdev)
> >  	INIT_WORK(&info->irq_work, max14577_muic_irq_work);
> >  
> >  	/* Support irq domain for max14577 MUIC device */
> > -	for (i = 0; i < ARRAY_SIZE(muic_irqs); i++) {
> > -		struct max14577_muic_irq *muic_irq = &muic_irqs[i];
> > +	for (i = 0; i < ARRAY_SIZE(max14577_muic_irqs); i++) {
> > +		struct max14577_muic_irq *muic_irq = &max14577_muic_irqs[i];
> >  		unsigned int virq = 0;
> >  
> >  		virq = regmap_irq_get_virq(maxim_core->irq_data_muic,
> > 

^ permalink raw reply

* [PATCH v2 0/6] ARM: sunxi: Add driver for SD/MMC hosts found on allwinner sunxi SOCs
From: Maxime Ripard @ 2014-02-05 10:39 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20140204191648.29809.14611.stgit@dizzy-6.o2s.ch>

Hi David,

On Tue, Feb 04, 2014 at 08:24:13PM +0100, David Lanzend?rfer wrote:
> Hello
> The following patchset adds support for the SD/MMC host found in the Allwinner SoCs.
> It contains all the necessary modifications for clock environment and also the device
> tree script modification which add it to all the boards using it.
> The clock environment function needed for phase offset configuration has
> been proposed and implemented by Emilio.
> This patchset is the second attempt to send this driver upstream.
> I'm looking forward to the acceptance of this patchset into mainline.

I have four comments here:
  - Read Documentation/SubmittingPatches, especially Section 5 and 12
    (hints, you forgot the clock maintainers for your clock patches
    and you didn't put any signed-off-by tags)
  - You ignored pretty much all the comments that were made during the
    review of the first version. Go through
    http://lists.infradead.org/pipermail/linux-arm-kernel/2013-December/219339.html
    and address the comments that were made.
  - Each of your patches should compile. Fix the order of your
    patches.
  - Submit a v3, with the changes you made. Otherwise we have no way
    of knowing what have been fixed and what didn't

Looking forward for the next iteration!
Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140205/739e5515/attachment.sig>

^ permalink raw reply

* [Linux-kernel] [PATCH 2/3] ARM: shmobile: r8a7790: specify multiple parents for cpg_clks
From: Ben Dooks @ 2014-02-05 10:36 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1565445.R9bPDKl3Py@avalon>

On 05/02/14 10:32, Laurent Pinchart wrote:
> Hi Ben,
>
> On Wednesday 05 February 2014 09:15:31 Ben Dooks wrote:
>> On 04/02/14 18:17, William Towle wrote:
>>> The current drivers/clk/shmobile/clk-rcar-gen2.c uses the
>>> extal_clk reference for the parent of all the clocks that
>>> it registers. However the lb, qspi, sdh, sd0 and sd1 clocks
>>> are all parented to either pll1 or pll1_div2 which means
>>> that the clock rates are incorrect.
>>>
>>> This is part of the fix that corrects the SDHI0 clock
>>>
>>> rate error where it reports 1MHz instead of 97.5:
>>>       sh_mobile_sdhi ee100000.sd: mmc0 base at 0xee100000 clock rate 1 MHz
>>>
>>> Notes:
>>> - May require cross-merge with clk-rcar-gen2.c fix
>>> - Also not clear which clock "z" is to fix it.
>>
>> Laurent, if you could give us an idea of how to fix this then
>> it would be helpful to get this patch fully fixed.
>
> I've already sent a patch that fixes this issue.
>
> "clk: shmobile: rcar-gen2: Fix clock parent all non-PLL clocks"
>
> (http://www.spinics.net/lists/linux-sh/msg27275.html)
>
> I've just pinged Mike to ask him to pick it up for v3.14.

I just saw and commented on it. I think the DT is the nicer way
of actually doing this, especially if the driver may get re-used
in future.

There's also an issue with SDHI0/1 divider table which has been
posted too.

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

^ permalink raw reply

* [PATCH 1/2] clk: shmobile: rcar-gen2: Fix clock parent all non-PLL clocks
From: Ben Dooks @ 2014-02-05 10:34 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1389113273-10364-2-git-send-email-laurent.pinchart+renesas@ideasonboard.com>

On 07/01/14 16:47, Laurent Pinchart wrote:
> The lb, qspi, sdh, sd0 and sd1 clocks have the PLL1 (divided by 2) as
> their parent, not the main clock. Fix it.

William Towle has already sent a patch to move this to device tree
which I think is a better solution for this. Any chance of commenting
on which to take please.

> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>   drivers/clk/shmobile/clk-rcar-gen2.c | 10 +++++++++-
>   1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/shmobile/clk-rcar-gen2.c b/drivers/clk/shmobile/clk-rcar-gen2.c
> index a59ec21..8c7bcbd 100644
> --- a/drivers/clk/shmobile/clk-rcar-gen2.c
> +++ b/drivers/clk/shmobile/clk-rcar-gen2.c
> @@ -186,7 +186,7 @@ rcar_gen2_cpg_register_clock(struct device_node *np, struct rcar_gen2_cpg *cpg,
>   			     const char *name)
>   {
>   	const struct clk_div_table *table = NULL;
> -	const char *parent_name = "main";
> +	const char *parent_name;
>   	unsigned int shift;
>   	unsigned int mult = 1;
>   	unsigned int div = 1;
> @@ -201,23 +201,31 @@ rcar_gen2_cpg_register_clock(struct device_node *np, struct rcar_gen2_cpg *cpg,
>   		 * the multiplier value.
>   		 */
>   		u32 value = clk_readl(cpg->reg + CPG_PLL0CR);
> +		parent_name = "main";
>   		mult = ((value >> 24) & ((1 << 7) - 1)) + 1;
>   	} else if (!strcmp(name, "pll1")) {
> +		parent_name = "main";
>   		mult = config->pll1_mult / 2;
>   	} else if (!strcmp(name, "pll3")) {
> +		parent_name = "main";
>   		mult = config->pll3_mult;
>   	} else if (!strcmp(name, "lb")) {
> +		parent_name = "pll1_div2";
>   		div = cpg_mode & BIT(18) ? 36 : 24;
>   	} else if (!strcmp(name, "qspi")) {
> +		parent_name = "pll1_div2";
>   		div = (cpg_mode & (BIT(3) | BIT(2) | BIT(1))) == BIT(2)
>   		    ? 16 : 20;
>   	} else if (!strcmp(name, "sdh")) {
> +		parent_name = "pll1_div2";
>   		table = cpg_sdh_div_table;
>   		shift = 8;
>   	} else if (!strcmp(name, "sd0")) {
> +		parent_name = "pll1_div2";
>   		table = cpg_sd01_div_table;
>   		shift = 4;
>   	} else if (!strcmp(name, "sd1")) {
> +		parent_name = "pll1_div2";
>   		table = cpg_sd01_div_table;
>   		shift = 0;
>   	} else if (!strcmp(name, "z")) {
>


-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

^ permalink raw reply

* [Linux-kernel] [PATCH 2/3] ARM: shmobile: r8a7790: specify multiple parents for cpg_clks
From: Laurent Pinchart @ 2014-02-05 10:32 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <52F20133.6080107@codethink.co.uk>

Hi Ben,

On Wednesday 05 February 2014 09:15:31 Ben Dooks wrote:
> On 04/02/14 18:17, William Towle wrote:
> > The current drivers/clk/shmobile/clk-rcar-gen2.c uses the
> > extal_clk reference for the parent of all the clocks that
> > it registers. However the lb, qspi, sdh, sd0 and sd1 clocks
> > are all parented to either pll1 or pll1_div2 which means
> > that the clock rates are incorrect.
> > 
> > This is part of the fix that corrects the SDHI0 clock
> > 
> > rate error where it reports 1MHz instead of 97.5:
> >      sh_mobile_sdhi ee100000.sd: mmc0 base at 0xee100000 clock rate 1 MHz
> > 
> > Notes:
> > - May require cross-merge with clk-rcar-gen2.c fix
> > - Also not clear which clock "z" is to fix it.
> 
> Laurent, if you could give us an idea of how to fix this then
> it would be helpful to get this patch fully fixed.

I've already sent a patch that fixes this issue.

"clk: shmobile: rcar-gen2: Fix clock parent all non-PLL clocks"

(http://www.spinics.net/lists/linux-sh/msg27275.html)

I've just pinged Mike to ask him to pick it up for v3.14.

> > [ben.dooks at codethink.co.uk: updated patch description]
> > Signed-off-by: William Towle <william.towle@codethink.co.uk>
> > Reviewed-by: Ben Dooks <ben.dooks@codethink.co.uk>
> > ---
> > 
> >   arch/arm/boot/dts/r8a7790.dtsi |    8 +++++++-
> >   1 file changed, 7 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/boot/dts/r8a7790.dtsi
> > b/arch/arm/boot/dts/r8a7790.dtsi index ff55c6e..242e6e2 100644
> > --- a/arch/arm/boot/dts/r8a7790.dtsi
> > +++ b/arch/arm/boot/dts/r8a7790.dtsi
> > @@ -446,7 +446,13 @@
> > 
> >   			compatible = "renesas,r8a7790-cpg-clocks",
> >   			
> >   				     "renesas,rcar-gen2-cpg-clocks";
> >   			
> >   			reg = <0 0xe6150000 0 0x1000>;
> > 
> > -			clocks = <&extal_clk>;
> > +			clocks = <&extal_clk>, <&extal_clk>, <&extal_clk>, 
<&extal_clk>,
> > +				<&cpg_clocks R8A7790_CLK_PLL1>,
> > +				<&pll1_div2_clk>,
> > +				<&cpg_clocks R8A7790_CLK_PLL1>,
> > +				<&cpg_clocks R8A7790_CLK_PLL1>,
> > +				<&cpg_clocks R8A7790_CLK_PLL1>
> 
> Should we add a pll1_clk node, or leave this as is?
> 
> > +				/* not known for "z" ...,<> */;
> > 
> >   			#clock-cells = <1>;
> >   			clock-output-names = "main", "pll0", "pll1", "pll3",
> >   			
> >   					     "lb", "qspi", "sdh", "sd0", "sd1",

-- 
Regards,

Laurent Pinchart

^ permalink raw reply

* [PATCH v3 8/8] ARM: dts: sun7i: Add ethernet alias for GMAC
From: Maxime Ripard @ 2014-02-05 10:32 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CAGb2v659T_QTLChB0NRS0seQvwDBCmTAH6UBEghZng9Ac6uL4g@mail.gmail.com>

On Wed, Feb 05, 2014 at 12:43:18PM +0800, Chen-Yu Tsai wrote:
> On Tue, Feb 4, 2014 at 3:38 AM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > On Mon, Feb 03, 2014 at 11:32:26AM +0800, Chen-Yu Tsai wrote:
> >> U-Boot will insert MAC address into the device tree image.
> >> It looks up ethernet[0-5] aliases to find the ethernet nodes.
> >> Alias GMAC as ethernet0, as it is the only ethernet controller used.
> >>
> >> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> >> ---
> >>  arch/arm/boot/dts/sun7i-a20.dtsi | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
> >> index 65fb8d0..c48fb11 100644
> >> --- a/arch/arm/boot/dts/sun7i-a20.dtsi
> >> +++ b/arch/arm/boot/dts/sun7i-a20.dtsi
> >> @@ -17,7 +17,7 @@
> >>       interrupt-parent = <&gic>;
> >>
> >>       aliases {
> >> -             ethernet0 = &emac;
> >> +             ethernet0 = &gmac;
> >>       };
> >
> > I'm not very fond of this patch.
> >
> > People might rely on the fact that ethernet0 is actually the emac, and
> > are expecting u-boot to fill the ethaddr variable to the emac, and not
> > the gmac.
> >
> > Since u-boot is totally able to deal with several ethernet addresses,
> > please add it as ethernet1.
> 
> Actually I think we should override this in the board dts.
> The boards we currently support can only use emac or gmac,
> and in our u-boot tree, they have been converted to using
> gmac. If any future boards support both emac and gmac, we
> can address the ordering then. And the ordering should
> match u-boot.
> 
> What do you think?

That what u-boot does is not a good argument (especially when it's not
even mainline u-boot we're talking about). Otherwise, I can just cook
up a bootloader of my own, do crazy stuff in it, and use that as an
argument to get crazy things in the kernel.

And you can set eth1addr just fine in u-boot.

But thinking a bit more about your patch, I guess that this patch
makes some kind of sense anyway..

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140205/c90dca1e/attachment-0001.sig>

^ permalink raw reply

* [PATCH 0/2] clk: shmobile rcar-gen2 fixes
From: Laurent Pinchart @ 2014-02-05 10:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1591253.8BzYfubhGS@avalon>

Mike,

Ping ?

v3.14-rc1 is out, and those are bug fixes.

On Wednesday 08 January 2014 00:06:39 Laurent Pinchart wrote:
> On Tuesday 07 January 2014 17:59:01 Geert Uytterhoeven wrote:
> > On Tue, Jan 7, 2014 at 5:47 PM, Laurent Pinchart wrote:
> > > Geert, could you please verify that the series fixes your QSPI clock
> > > issues with the Koelsch board ?
> > > 
> > > Laurent Pinchart (2):
> > >   clk: shmobile: rcar-gen2: Fix clock parent all non-PLL clocks
> > >   clk: shmobile: rcar-gen2: Fix qspi divisor
> > 
> > Thanks, both:
> > 
> > Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> 
> Thank you.
> 
> Mike, could you please pick those patches up for v3.14 ?

-- 
Regards,

Laurent Pinchart

^ permalink raw reply

* [PATCHv2] arm64: Align CMA sizes to PAGE_SIZE
From: Catalin Marinas @ 2014-02-05 10:28 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1391555337-25380-1-git-send-email-lauraa@codeaurora.org>

On Tue, Feb 04, 2014 at 11:08:57PM +0000, Laura Abbott wrote:
> dma_alloc_from_contiguous takes number of pages for a size.
> Align up the dma size passed in to page size to avoid truncation
> and allocation failures on sizes less than PAGE_SIZE.
> 
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Signed-off-by: Laura Abbott <lauraa@codeaurora.org>

Thanks. Applied.

-- 
Catalin

^ permalink raw reply

* [PATCH 3/4] ARM: dts: Add support of STid127 Soc.
From: Patrice Chotard @ 2014-02-05 10:27 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <52EB9C03.70009@st.com>

Hi Srinivas

Thanks for reviewing, a V2 serie will be pushed with all required fixes.

Patrice

On 01/31/2014 01:50 PM, srinivas kandagatla wrote:
> Hi Patrice,
>
> On 30/01/14 14:55, Patrice CHOTARD wrote:
>> From: Alexandre TORGUE <alexandre.torgue@st.com>
>>
>> The STid127 integrates all harware components to function as a cable modem
> s/harware/hardware/
>
> s/STid127/STiD127
>
> Please fix other instances too.
>
>> or, in combination with a back end device, as a Gateway set top boxe.
> s/boxe/box/
>> Supported devices:
>> 	-UART0
>> 	-UART2
>>
>> Signed-off-by: alexandre torgue <alexandre.torgue@st.com>
>> ---
>>   arch/arm/boot/dts/stid127-clock.dtsi   |   31 ++++
>>   arch/arm/boot/dts/stid127-pinctrl.dtsi |  245 ++++++++++++++++++++++++++++++++
>>   arch/arm/boot/dts/stid127.dtsi         |  130 +++++++++++++++++
>>   3 files changed, 406 insertions(+)
>>   create mode 100644 arch/arm/boot/dts/stid127-clock.dtsi
>>   create mode 100644 arch/arm/boot/dts/stid127-pinctrl.dtsi
>>   create mode 100644 arch/arm/boot/dts/stid127.dtsi
>>
>> diff --git a/arch/arm/boot/dts/stid127-clock.dtsi b/arch/arm/boot/dts/stid127-clock.dtsi
>> new file mode 100644
>> index 0000000..c6cafa9
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/stid127-clock.dtsi
>> @@ -0,0 +1,31 @@
>> +/*
>> + * Copyright (C) 2013 STMicroelectronics (R&D) Limited
> 2014
>
>> + * Author(s): Giuseppe Cavallaro <peppe.cavallaro@st.com>
>> + *	      Alexandre Torgue <alexandre.torgue@st.com>
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + */
>> +/ {Acked-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
>> +	clocks {
>> +		/*
>> +		 * ARM Peripheral clock for timers
>> +		 */
>> +		arm_periph_clk: arm_periph_clk {
>> +			#clock-cells = <0>;
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <100000000>;
>> +		};
>> +		/*
>> +		 * Bootloader initialized system infrastructure clock for
>> +		 * serial devices.
>> +		 */
>> +		CLK_IC_LP_HD: clockgenA0 at 29 {
>> +			#clock-cells = <0>;
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <100000000>;
>> +			clock-output-names = "CLK_IC_LP_HD";
>> +		};
>> +	};
>> +};
>> diff --git a/arch/arm/boot/dts/stid127-pinctrl.dtsi b/arch/arm/boot/dts/stid127-pinctrl.dtsi
>> new file mode 100644
>> index 0000000..3fa66f3
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/stid127-pinctrl.dtsi
>> @@ -0,0 +1,245 @@
>> +/*
>> + * Copyright (C) 2012 STMicroelectronics Limited.
> 2014
>
>> + * Author(s): Giuseppe Cavallaro <peppe.cavallaro@st.com>
>> + *	      Alexandre Torgue <alexandre.torgue@st.com>
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * publishhed by the Free Software Foundation.
> s/publishhed/published/
>
>> + */
>> +#include "st-pincfg.h"
>> +/ {
>> +	aliases {
>> +		gpio0	= &PIO0;
>> +		gpio1	= &PIO1;
>> +		gpio2	= &PIO2;
>> +		gpio3	= &PIO3;
>> +		gpio4	= &PIO4;
>> +		gpio5	= &PIO5;
>> +		gpio6	= &PIO6;
>> +		gpio7	= &PIO7;
>> +		gpio8	= &PIO8;
>> +		gpio9	= &PIO9;
>> +		gpio10	= &PIO10;
>> +		gpio11	= &PIO11;
>> +		gpio12	= &PIO12;
>> +		gpio13	= &PIO13;
>> +		gpio14	= &PIO14;
>> +		gpio15	= &PIO15;
>> +		gpio16	= &PIO16;
>> +		gpio17	= &PIO17;
>> +		gpio18	= &PIO18;
>> +		gpio19	= &PIO19;
>> +		gpio20	= &PIO20;
>> +		gpio21	= &PIO21;
>> +		gpio22	= &PIO22;
>> +
>> +	};
>> +
>> +	soc {
>> +		pin-controller-pwest {
>> +			#address-cells	= <1>;
>> +			#size-cells	= <1>;
>> +			compatible	= "st,stid127-pwest-pinctrl";
>> +			st,syscfg	= <&syscfg_pwest>;
>> +			ranges		= <0 0xfebe0000 0x8000>;
> Can you add interrupt controller support to the pin controller.
>
> Patches are in : https://lkml.org/lkml/2014/1/16/342
> All these patches are due to be in v3.15.
>
>> +
>> +			PIO0: gpio at febe0000 {
>> +				gpio-controller;
>> +				#gpio-cells = <1>;
>> +				reg = <0 0x100>;
>> +				interrupts =  <0 149 0>;
>> +				st,bank-name  = "PIO0";
>> +			};
>> +						rx	= <&PIO3 0 ALT2	IN>;
>> +					};
>> +				};
>> +			};
>> +
>> +		};
> unnecessary empty line  here.
>
>> diff --git a/arch/arm/boot/dts/stid127.dtsi b/arch/arm/boot/dts/stid127.dtsi
>> new file mode 100644
>> index 0000000..a6f0b8fe
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/stid127.dtsi
>> @@ -0,0 +1,130 @@
>> +/*
>> + * Copyright (C) 2013 STMicroelectronics Limited.
> 2014
>> + * Author(s): Giuseppe Cavallaro <peppe.cavallaro@st.com>
>> + *	      Alexandre Torgue <alexandre.torgue@st.com>
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * publishhed by the Free Software Foundation.
> s/publishhed/published/
>
>> + */
>> +#include "stid127-pinctrl.dtsi"
>> +#include "stid127-clock.dtsi"
>> +/ {
>> +	#address-cells = <1>;
>> +	#size-cells = <1>;
>> +
>> +	cpus {
>> +		#address-cells = <1>;
>> +		#size-cells = <0>;
>> +
>> +		cpu at 0 {
>> +			device_type = "cpu";
>> +			compatible = "arm,cortex-a9";
>> +			reg = <0>;
>> +		};
>> +		cpu at 1 {
>> +			device_type = "cpu";
>> +			compatible = "arm,cortex-a9";
>> +			reg = <1>;
>> +		};
>> +	};
>> +
>> +	intc: interrupt-controller at fffe1000 {
>> +		compatible = "arm,cortex-a9-gic";
>> +		#interrupt-cells = <3>;
>> +		interrupt-controller;
>> +		reg = <0xfffe1000 0x1000>,
>> +		      <0xfffe0100 0x100>;
>> +	};
>> +
>> +	scu at fffe0000 {
>> +		compatible = "arm,cortex-a9-scu";
>> +		reg = <0xfffe0000 0x1000>;
>> +	};
>> +
>> +	timer at fffe0200 {
>> +			interrupt-parent = <&intc>;
>> +			compatible = "arm,cortex-a9-global-timer";
>> +			reg = <0xfffe0200 0x100>;
>> +			interrupts = <1 11 0x04>;
>> +			clocks = <&arm_periph_clk>;
> Fix the tab spacing here.
>
> Thanks,
> srini

^ permalink raw reply

* [PATCH] arm64: add DSB after icache flush in __flush_icache_all()
From: Catalin Marinas @ 2014-02-05 10:27 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1391592876-18627-1-git-send-email-vkale@apm.com>

On Wed, Feb 05, 2014 at 09:34:36AM +0000, Vinayak Kale wrote:
> Add DSB after icache flush to complete the cache maintenance operation.
> The function __flush_icache_all() is used only for user space mappings
> and an ISB is not required because of an exception return before executing
> user instructions. An exception return would behave like an ISB.
> 
> Signed-off-by: Vinayak Kale <vkale@apm.com>

Thanks. Applied.

-- 
Catalin

^ permalink raw reply

* [PATCH v3 3/6] misc: fuse: Add efuse driver for Tegra
From: Jim Lin @ 2014-02-05 10:26 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20140203141529.GF19389@tbergstrom-lnx.Nvidia.com>

Please ignore my comment.
I will try to use exported tegra_fuse_readl().

-----Original Message-----
From: Peter De Schrijver [mailto:pdeschrijver at nvidia.com] 
Sent: Monday, February 03, 2014 10:15 PM
To: Jim Lin
Cc: linux-arm-kernel at lists.infradead.org; linux-tegra at vger.kernel.org; linux-kernel at vger.kernel.org; Rob Landley; Stephen Warren; Thierry Reding; Grant Likely; Rob Herring; Danny Huang; linux-doc at vger.kernel.org; devicetree at vger.kernel.org
Subject: Re: [PATCH v3 3/6] misc: fuse: Add efuse driver for Tegra

On Wed, Jan 29, 2014 at 03:26:18AM +0100, Jim Lin wrote:
> On Wed, 2014-01-29 at 07:36 +0800, Peter De Schrijver wrote:
> > Implement fuse driver for Tegra20, Tegra30, Tegra114 and Tegra124.
> > 
> > Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
> > ---
> >  Documentation/ABI/testing/sysfs-driver-tegra-fuse |    8 +
> >  drivers/misc/fuse/Makefile                        |    1 +
> >  drivers/misc/fuse/tegra/Makefile                  |    7 +
> >  drivers/misc/fuse/tegra/fuse-tegra.c              |  228 ++++++++++++++++
> >  drivers/misc/fuse/tegra/fuse-tegra20.c            |  136 ++++++++++
> >  drivers/misc/fuse/tegra/fuse-tegra30.c            |  178 +++++++++++++
> >  drivers/misc/fuse/tegra/fuse.h                    |   82 ++++++
> Could we move this fuse.h to other folder under /include/linux (like 
> /include/linux/platform_data) for other driver to include?

I don't think we should expose everything in fuse.h to the world.

> So other driver can invoke function to read fuse data if needed.

Which functionality do you want? Just reading the fuse data exposed in the sysfs file from a driver? exporting tegra_fuse_readl() should do that I think?

Cheers,

Peter.

--nvpublic

^ 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