Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/4] arm: vt8500: Remove single platform Kconfig options
From: Tony Prisk @ 2013-01-11 20:12 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1357935162-7672-1-git-send-email-linux@prisktech.co.nz>

This patch completes the move of arch-vt8500 to multiplatform only.

The remaining single-image Kconfig options are removed from
arch/arm/Kconfig and the options in arch/arm/mach-vt8500/Kconfig
are updated.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
---
 arch/arm/Kconfig             |   21 ---------------------
 arch/arm/mach-vt8500/Kconfig |   13 +++----------
 2 files changed, 3 insertions(+), 31 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index fbb9492..76efd43 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -950,27 +950,6 @@ config ARCH_OMAP
 	help
 	  Support for TI's OMAP platform (OMAP1/2/3/4).
 
-config ARCH_VT8500_SINGLE
-	bool "VIA/WonderMedia 85xx"
-	select ARCH_VT8500
-	select COMMON_CLK
-	select CPU_ARM926T
-	select MULTI_IRQ_HANDLER
-	select SPARSE_IRQ
-	select USE_OF
-	help
-	  Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip.
-
-config ARCH_WM8750_SINGLE
-	bool "WonderMedia WM8750/WM8850"
-	select ARCH_VT8500
-	select COMMON_CLK
-	select MULTI_IRQ_HANDLER
-	select SPARSE_IRQ
-	select USE_OF
-	help
-	  Support for WonderMedia WM8750/WM8850 System-on-Chip.
-
 endchoice
 
 menu "Multiple platform selection"
diff --git a/arch/arm/mach-vt8500/Kconfig b/arch/arm/mach-vt8500/Kconfig
index d67c7fa..f466b58 100644
--- a/arch/arm/mach-vt8500/Kconfig
+++ b/arch/arm/mach-vt8500/Kconfig
@@ -8,9 +8,8 @@ config ARCH_VT8500
 	select HAVE_CLK
 
 config ARCH_WM8505
-	bool "VIA/WonderMedia 85xx" if !ARCH_VT8500_SINGLE
+	bool "VIA/WonderMedia 85xx"
 	depends on ARCH_MULTI_V5
-	default ARCH_VT8500_SINGLE
 	select ARCH_VT8500
 	select CPU_ARM926T
 	help
@@ -18,7 +17,7 @@ config ARCH_WM8505
 
 config ARCH_WM8750
 	bool "WonderMedia WM8750"
-	depends on ARCH_MULTI_V6 || ARCH_WM8750_SINGLE
+	depends on ARCH_MULTI_V6
 	select ARCH_VT8500
 	select CPU_V6
 	help
@@ -26,14 +25,8 @@ config ARCH_WM8750
 
 config ARCH_WM8850
 	bool "WonderMedia WM8850"
-	depends on ARCH_MULTI_V7 || ARCH_WM8750_SINGLE
+	depends on ARCH_MULTI_V7
 	select ARCH_VT8500
 	select CPU_V7
 	help
 	  Support for WonderMedia WM8850 System-on-Chip.
-
-# ensure that ARCH_WM8850 is on if ARCH_WM8750 is off
-config ARCH_WM8850_AUTO
-      def_bool y
-      depends on ARCH_WM8750_SINGLE && !ARCH_WM8750
-      select ARCH_WM8850
-- 
1.7.9.5

^ permalink raw reply related

* [PATCH 3/4] arm: vt8500: Convert debug-macro.S to be multiplatform friendly
From: Tony Prisk @ 2013-01-11 20:12 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1357935162-7672-1-git-send-email-linux@prisktech.co.nz>

This patch moves debug-macro.S from arm/mach-vt8500/include/mach to
arm/include/debug/vt8500.S to provide multiplatform support.

Minor style changes in code for readability.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
---
 arch/arm/Kconfig.debug                          |    8 +++++
 arch/arm/include/debug/vt8500.S                 |   37 +++++++++++++++++++++++
 arch/arm/mach-vt8500/include/mach/debug-macro.S |   31 -------------------
 3 files changed, 45 insertions(+), 31 deletions(-)
 create mode 100644 arch/arm/include/debug/vt8500.S
 delete mode 100644 arch/arm/mach-vt8500/include/mach/debug-macro.S

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 661030d..bbb0a67 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -412,6 +412,13 @@ choice
 		  of the tiles using the RS1 memory map, including all new A-class
 		  core tiles, FPGA-based SMMs and software models.
 
+	config DEBUG_VT8500_UART0
+		bool "Use UART0 on VIA/Wondermedia SoCs"
+		depends on ARCH_VT8500
+		help
+		  This option selects UART0 on VIA/Wondermedia System-on-a-chip
+		  devices, including VT8500, WM8505, WM8650 and WM8850.
+
 	config DEBUG_LL_UART_NONE
 		bool "No low-level debugging UART"
 		depends on !ARCH_MULTIPLATFORM
@@ -506,6 +513,7 @@ config DEBUG_LL_INCLUDE
 	default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1
 	default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \
 		DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1
+	default "debug/vt8500.S" if DEBUG_VT8500_UART0
 	default "debug/tegra.S" if DEBUG_TEGRA_UART
 	default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1
 	default "mach/debug-macro.S"
diff --git a/arch/arm/include/debug/vt8500.S b/arch/arm/include/debug/vt8500.S
new file mode 100644
index 0000000..0e0ca08
--- /dev/null
+++ b/arch/arm/include/debug/vt8500.S
@@ -0,0 +1,37 @@
+/* 
+ * Debugging macro include header
+ *
+ *  Copyright (C) 2010 Alexey Charkov <alchark@gmail.com>
+ *    Moved from arch/arm/mach-vt8500/include/mach/debug-macro.S
+ *    Minor changes for readability.
+ *
+ * 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.
+ */
+
+#define DEBUG_LL_PHYS_BASE		0xD8000000
+#define DEBUG_LL_VIRT_BASE		0xF8000000
+#define DEBUG_LL_UART_OFFSET		0x00200000
+
+#if defined(CONFIG_DEBUG_VT8500_UART0)
+	.macro	addruart, rp, rv, tmp
+	mov	\rp,      #DEBUG_LL_UART_OFFSET
+	orr	\rv, \rp, #DEBUG_LL_VIRT_BASE
+	orr	\rp, \rp, #DEBUG_LL_PHYS_BASE
+	.endm
+
+	.macro	senduart,rd,rx
+	strb	\rd, [\rx, #0]
+	.endm
+
+	.macro	busyuart,rd,rx
+1001:	ldr	\rd, [\rx, #0x1c]
+	ands	\rd, \rd, #0x2
+	bne	1001b
+	.endm
+
+	.macro	waituart,rd,rx
+	.endm
+
+#endif
diff --git a/arch/arm/mach-vt8500/include/mach/debug-macro.S b/arch/arm/mach-vt8500/include/mach/debug-macro.S
deleted file mode 100644
index ca292f2..0000000
--- a/arch/arm/mach-vt8500/include/mach/debug-macro.S
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * arch/arm/mach-vt8500/include/mach/debug-macro.S
- *
- *  Copyright (C) 2010 Alexey Charkov <alchark@gmail.com>
- *
- * Debugging macro include header
- *
- * 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.
- *
-*/
-
-	.macro	addruart, rp, rv, tmp
-	mov	\rp,      #0x00200000
-	orr	\rv, \rp, #0xf8000000
-	orr	\rp, \rp, #0xd8000000
-	.endm
-
-	.macro	senduart,rd,rx
-	strb	\rd, [\rx, #0]
-	.endm
-
-	.macro	busyuart,rd,rx
-1001:	ldr	\rd, [\rx, #0x1c]
-	ands	\rd, \rd, #0x2
-	bne	1001b
-	.endm
-
-	.macro	waituart,rd,rx
-	.endm
-- 
1.7.9.5

^ permalink raw reply related

* [PATCH 4/4] arm: vt8500: Remove remaining mach includes
From: Tony Prisk @ 2013-01-11 20:12 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1357935162-7672-1-git-send-email-linux@prisktech.co.nz>

Remove the last two mach-vt8500/include/mach headers as they are
no longer required with multiplatform-only configuration.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
---
 arch/arm/mach-vt8500/include/mach/timex.h      |   26 -----------------
 arch/arm/mach-vt8500/include/mach/uncompress.h |   37 ------------------------
 2 files changed, 63 deletions(-)
 delete mode 100644 arch/arm/mach-vt8500/include/mach/timex.h
 delete mode 100644 arch/arm/mach-vt8500/include/mach/uncompress.h

diff --git a/arch/arm/mach-vt8500/include/mach/timex.h b/arch/arm/mach-vt8500/include/mach/timex.h
deleted file mode 100644
index 8487e4c..0000000
--- a/arch/arm/mach-vt8500/include/mach/timex.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *  arch/arm/mach-vt8500/include/mach/timex.h
- *
- *  Copyright (C) 2010 Alexey Charkov <alchark@gmail.com>
- *
- * 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 option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef MACH_TIMEX_H
-#define MACH_TIMEX_H
-
-#define CLOCK_TICK_RATE		(3000000)
-
-#endif /* MACH_TIMEX_H */
diff --git a/arch/arm/mach-vt8500/include/mach/uncompress.h b/arch/arm/mach-vt8500/include/mach/uncompress.h
deleted file mode 100644
index e6e81fd..0000000
--- a/arch/arm/mach-vt8500/include/mach/uncompress.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* arch/arm/mach-vt8500/include/mach/uncompress.h
- *
- * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com>
- *
- * Based on arch/arm/mach-dove/include/mach/uncompress.h
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#define UART0_PHYS	0xd8200000
-#define UART0_ADDR(x)	*(volatile unsigned char *)(UART0_PHYS + x)
-
-static void putc(const char c)
-{
-	while (UART0_ADDR(0x1c) & 0x2)
-		/* Tx busy, wait and poll */;
-
-	UART0_ADDR(0) = c;
-}
-
-static void flush(void)
-{
-}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
-#define arch_decomp_wdog()
-- 
1.7.9.5

^ permalink raw reply related

* [GIT PULL] enable multiplatform support for omap2+ for v3.9
From: Olof Johansson @ 2013-01-11 20:12 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20130111194319.GN14149@atomide.com>

On Fri, Jan 11, 2013 at 11:43 AM, Tony Lindgren <tony@atomide.com> wrote:
> * Tony Lindgren <tony@atomide.com> [130110 11:46]:
>> Hi Arnd, Olof,
>>
>> Below is a pull request to enable multiplatform support for omap2+.
>
> Now that -rc3 is out, here's this one rebased on v3.8-rc3 as requested
> by Olof.
>
> Regards,
>
> Tony
>
>
> The following changes since commit 9931faca02c604c22335f5a935a501bb2ace6e20:
>
>   Linux 3.8-rc3 (2013-01-09 18:59:55 -0800)
>
> are available in the git repository at:
>
>   git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-for-v3.9/multiplatform-enable-signed-v2

Pulled, thanks!

>  51 files changed, 314 insertions(+), 370 deletions(-)

Enabling multiplatform with a net negative patch delta -- awesome!


-Olof

^ permalink raw reply

* [PATCH v2] drivers/pinctrl: grab default handles from device core
From: Linus Walleij @ 2013-01-11 20:12 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <50EF27B4.60608@wwwdotorg.org>

On Thu, Jan 10, 2013 at 9:42 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 12/12/2012 01:25 PM, Linus Walleij wrote:
>> From: Linus Walleij <linus.walleij@linaro.org>
>>
>> This makes the device core auto-grab the pinctrl handle and set
>> the "default" (PINCTRL_STATE_DEFAULT) state for every device
>> that is present in the device model right before probe. This will
>> account for the lion's share of embedded silicon devcies.
>
> There are quite a few problems with this patch, and they end up
> completely breaking at least Tegra in next-20130110.

But I have not put this patch into linux-next.

I was still waiting for Greg to ACK it...

Apparently it was included in a pull request to the SH tree or something,
Simon can you remove these patches for now, this patch needs to
be elaborated on in the pinctrl tree first.

Yours,
Linus Walleij

^ permalink raw reply

* [PATCH v4 00/14] DMA Engine support for AM33XX
From: Arnd Bergmann @ 2013-01-11 20:12 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20130111183349.GA14660@beef>

On Friday 11 January 2013, Matt Porter wrote:
> We have tightly coupled the link-time dependency for
> omap_dma_filter_fn by going down the path of using
> dma_request_slave_channel_compat() as Tony suggested to avoid extra
> ifdefry.
> 
> That dependency will go away naturally if all the "legacy" OMAP platforms
> were required to only boot from DT...just as a newly added SoCs are.
> 
> Are you suggesting unwinding the _compat() approach?

No, I was thinking we could define omap_dma_filter_fn to NULL
for the DT-only case.

	Arnd

^ permalink raw reply

* arm: mvebu: Fix compile for multiplatform when ARMv6 is selected
From: Olof Johansson @ 2013-01-11 20:18 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20130111200531.GO14149@atomide.com>

On Fri, Jan 11, 2013 at 12:05:31PM -0800, Tony Lindgren wrote:
> Some systems compile in both ARMv6 and ARMv7 into multiplatform
> configurations. This means the default compiler flags are for ARMv6,
> and we will get:
> 
> arch/arm/mach-mvebu/coherency_ll.S: Assembler messages:
> arch/arm/mach-mvebu/coherency_ll.S:45: Error: selected processor does not support `dsb'
> 
> Fix this by specifying ARMv7 flags for coherency_ll.o.
> 
> Signed-off-by: Tony Lindgren <tony@atomide.com>

Applied to fixes, I don't expect Jason or others to complain about this
so I took the liberty. :)


-Olof

^ permalink raw reply

* [PATCH v2] drivers/pinctrl: grab default handles from device core
From: Linus Walleij @ 2013-01-11 20:22 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <50EF3BAF.4010200@wwwdotorg.org>

On Thu, Jan 10, 2013 at 11:07 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:

> I see that an attempt was made to solve this problem, in the patch
> immediately preceding this one (at least, as applied in the pinctrl
> tree). However, that patch only addresses the case where the pin
> controller is being looked up in the map, and not the case when
> converting device tree to the map in the first place. The patch below
> solves this:
>
> diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
> index fe2d1af..fd40a11 100644
> --- a/drivers/pinctrl/devicetree.c
> +++ b/drivers/pinctrl/devicetree.c
> @@ -141,6 +141,11 @@ static int dt_to_map_one_config(struct pinctrl *p,
> const char *statename,
>                 pctldev = find_pinctrl_by_of_node(np_pctldev);
>                 if (pctldev)
>                         break;
> +               /* Do not defer probing of hogs (circular loop) */
> +               if (np_pctldev == p->dev->of_node) {
> +                       of_node_put(np_pctldev);
> +                       return -ENODEV;
> +               }
>         }
>         of_node_put(np_pctldev);

OK I've duplicated this, will send out as patch.

Yours,
Linus Walleij

^ permalink raw reply

* arm: mvebu: Fix compile for multiplatform when ARMv6 is selected
From: Jason Cooper @ 2013-01-11 20:24 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20130111201850.GA20524@quad.lixom.net>

On Fri, Jan 11, 2013 at 12:18:50PM -0800, Olof Johansson wrote:
> On Fri, Jan 11, 2013 at 12:05:31PM -0800, Tony Lindgren wrote:
> > Some systems compile in both ARMv6 and ARMv7 into multiplatform
> > configurations. This means the default compiler flags are for ARMv6,
> > and we will get:
> > 
> > arch/arm/mach-mvebu/coherency_ll.S: Assembler messages:
> > arch/arm/mach-mvebu/coherency_ll.S:45: Error: selected processor does not support `dsb'
> > 
> > Fix this by specifying ARMv7 flags for coherency_ll.o.
> > 
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> 
> Applied to fixes, I don't expect Jason or others to complain about this
> so I took the liberty. :)

Complaint-withheld-by: Jason Cooper <jason@lakedaemon.net>

;-)

Jason.

^ permalink raw reply

* [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS
From: Alexander Graf @ 2013-01-11 20:26 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1357935078.5475.10@snotra>



Am 11.01.2013 um 21:11 schrieb Scott Wood <scottwood@freescale.com>:

> On 01/11/2013 09:42:55 AM, Alexander Graf wrote:
>> On 11.01.2013, at 02:10, Scott Wood wrote:
>> > struct kvm_device_attr {
>> >    __u32 device;
>> This needs some semantic specification. Is device a constant value? Is it the return value of CREATE_IRQCHIP?
> 
> As proposed, it's up to the architecture to provide that specification.  In theory this could be used for things other than IRQ chips.  We could still say that device creation functions return a valid device ID (if the device has any attributes), as well as have other architecture-specific ways of describing device IDs (static enumeration).  Or we could have non-architecture-specific static enumeration.  Or just require that all devices be explicitly created by something that returns the ID.
> 
> Do you have a preferred approach?

I am a fan of dynamically generated ids that get returned from the create functions (like open() and an fd).

I'm not sure if that would always work here though. It would mean that we explicitly have to create per-cpu interrupt controllers. Or append their state onto vcpu state.

Alex

> 
> -Scott

^ permalink raw reply

* [PATCH 10/14] PCI: tegra: Move PCIe driver to drivers/pci/host
From: Stephen Warren @ 2013-01-11 20:34 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20130111035246.GB28094@avionic-0098.adnet.avionic-design.de>

On 01/10/2013 08:52 PM, Thierry Reding wrote:
> On Thu, Jan 10, 2013 at 05:48:46PM -0700, Stephen Warren wrote:
>> On 01/09/2013 01:43 PM, Thierry Reding wrote:
>>> Move the PCIe driver from arch/arm/mach-tegra into the
>>> drivers/pci/host directory. The motivation is to collect
>>> various host controller drivers in the same location in order
>>> to facilitate refactoring.
>>> 
>>> The Tegra PCIe driver has been largely rewritten, both in order
>>> to turn it into a proper platform driver and to add MSI (based
>>> on code by Krishna Kishore <kthota@nvidia.com>) as well as
>>> device tree support.
>> 
>>> diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c
>>> b/arch/arm/mach-tegra/board-dt-tegra20.c

>>> +static int tegra_pcie_enable_controller(struct tegra_pcie
>>> *pcie) +{ +	unsigned int timeout; +	unsigned long value; + +	/*
>>> enable dual controller and both ports */ +	value =
>>> afi_readl(pcie, AFI_PCIE_CONFIG); +	value &=
>>> ~(AFI_PCIE_CONFIG_PCIEC0_DISABLE_DEVICE | +
>>> AFI_PCIE_CONFIG_PCIEC1_DISABLE_DEVICE | +
>>> AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_MASK); +	value |=
>>> AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_DUAL; +	afi_writel(pcie,
>>> value, AFI_PCIE_CONFIG);
>> 
>> Eventually, we should probably derive the port enables from the
>> state of the root port DT nodes, so that we can disable some and
>> presumably save a little power. Also, I notice that the
>> nvidia,num-lanes property isn't implemented yet. Still, we can
>> probably take care of this later.
> 
> Yes, the plan was to eventually derive the disable bits from the
> port status and setup the XBAR_CONFIG field based on the
> combination of nvidia,num-lanes properties.
> 
> I assume we should simply fail if the configuration specified by 
> nvidia,num-lanes is invalid?

Makes sense to me.

>>> +static int tegra_pcie_parse_dt(struct tegra_pcie *pcie)
>> 
>>> +	pcie->vdd_supply = devm_regulator_get(pcie->dev, "vdd"); +	if
>>> (IS_ERR(pcie->vdd_supply)) +		return
>>> PTR_ERR(pcie->vdd_supply); + +	pcie->pex_clk_supply =
>>> devm_regulator_get(pcie->dev, "pex-clk"); +	if
>>> (IS_ERR(pcie->pex_clk_supply)) +		return
>>> PTR_ERR(pcie->pex_clk_supply);
>> 
>> Oh, I guess the regulator_get() calls are already strict.
> 
> Yeah, I think they can't return NULL, right? In that case I can
> just drop the extra checks in tegra_pcie_power_{on,off}().

It looks like NULL can be returned if !CONFIG_REGULATOR. The comment
in the dummy implementation implies that drivers should treat a NULL
value as valid regulator in most cases.

^ permalink raw reply

* [PATCH v2] drivers/pinctrl: grab default handles from device core
From: Laurent Pinchart @ 2013-01-11 20:36 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CACRpkdZ0b=ZohgaBH3qPH_O5TiWmXJXs6872D+YPVA9g4BssYg@mail.gmail.com>

Hi Simon,

On Friday 11 January 2013 21:12:43 Linus Walleij wrote:
> On Thu, Jan 10, 2013 at 9:42 PM, Stephen Warren wrote:
> > On 12/12/2012 01:25 PM, Linus Walleij wrote:
> >> From: Linus Walleij <linus.walleij@linaro.org>
> >> 
> >> This makes the device core auto-grab the pinctrl handle and set
> >> the "default" (PINCTRL_STATE_DEFAULT) state for every device
> >> that is present in the device model right before probe. This will
> >> account for the lion's share of embedded silicon devcies.
> > 
> > There are quite a few problems with this patch, and they end up
> > completely breaking at least Tegra in next-20130110.
> 
> But I have not put this patch into linux-next.
> 
> I was still waiting for Greg to ACK it...
> 
> Apparently it was included in a pull request to the SH tree or something,
> Simon can you remove these patches for now, this patch needs to
> be elaborated on in the pinctrl tree first.

I've sent several patch series for the SH PFC (Pin Function Controller) to the 
linux-sh mailing list. One of the series included pinctrl core patches for 
easier testing, but I made it clear that they should *not* be pushed to 
mainline through the SH tree.

Actually the whole PFC series have been found out today by Guennadi 
Liakhovetski to be buggy. I will fix the problems and send a new version. In 
the meantime the pinmux-pinctrl and pinmux-dt series should not be pushed to 
mainline.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply

* [PATCH] ARM: VIC: use irq_domain_add_simple()
From: Linus Walleij @ 2013-01-11 20:38 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20130111185758.45FF73E215F@localhost>

On Fri, Jan 11, 2013 at 7:57 PM, Grant Likely <grant.likely@secretlab.ca> wrote:

>> Does the below patch work for you, it does two things:
>>
>> 1) Bump all Versatile IRQs to offset at 32, because it is using
>>   IRQ 0 which is NO_IRQ and illegal anyway so it's anyway
>>   a bug that should be fixed.
>>
>> 2) Make sure we call irq_create_mapping() if the start IRQ is
>>   anyway 0, as in the device tree case, and make sure to
>>   actually pass zero in that case.
>
> In actual fact, only changing the offset to 32 is required to get
> Versatile to boot with DT. That platform doesn't yet use vic_of_init().
> It currently depends on pre-allocated irq_descs.

OK both are already upstream, because there was someone
else verifying they solved the problem.

And the second patch was needed on the Integrator which
does use SPARSE_IRQ + vic_init_of().
Probably the DT-based SPEArs need it too.

Yours,
Linus Walleij

^ permalink raw reply

* ERROR: "__aeabi_uldivmod" [drivers/pinctrl/pinctrl-single.ko] undefined!
From: Linus Walleij @ 2013-01-11 20:44 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20130111150001.GA23505@n2100.arm.linux.org.uk>

On Fri, Jan 11, 2013 at 4:00 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:

> The above error happens in builds including pinctrl-single - the reason
> is this, where resource_size_t may be 64-bit.
>
>                 gpio->range.pin_base = (r.start - pcs->res->start) / mux_bytes;
>                 gpio->range.npins = (r.end - r.start) / mux_bytes + 1;
>
> This leads to a 64-bit division by an extended 64-bit, resulting in the
> call to our (unimplemented) 64-bit-by-64-bit division routines.
>
> This needs fixing - you probably want to cast the difference down to an
> 'unsigned' first, and also maybe check that it does fit in an unsigned
> too?

Agreed, Haojian can you provide a tested patch for this?
I think you added this code...

Tony: please check and ACK.

Yours,
Linus Walleij

^ permalink raw reply

* [PATCH v2] drivers/pinctrl: grab default handles from device core
From: Linus Walleij @ 2013-01-11 20:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <9702060.jEbHySsCv0@avalon>

On Fri, Jan 11, 2013 at 9:36 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:

> I've sent several patch series for the SH PFC (Pin Function Controller) to the
> linux-sh mailing list. One of the series included pinctrl core patches for
> easier testing, but I made it clear that they should *not* be pushed to
> mainline through the SH tree.

No big deal, what fun is linux-next if we don't break it ;-)

Yours,
Linus Walleij

^ permalink raw reply

* [PATCH] pinctrl: do not defer device tree hogs
From: Linus Walleij @ 2013-01-11 20:46 UTC (permalink / raw)
  To: linux-arm-kernel

From: Linus Walleij <linus.walleij@linaro.org>

commit af1024e0f7cde9023ddd0f3116db03911d5914c0
"pinctrl: skip deferral of hogs"

Attempts to avoid probe deferral on hogged pins, but we
forgot the device tree case. This patch fixes this.

Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reported-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/pinctrl/devicetree.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
index fe2d1af..fd40a11 100644
--- a/drivers/pinctrl/devicetree.c
+++ b/drivers/pinctrl/devicetree.c
@@ -141,6 +141,11 @@ static int dt_to_map_one_config(struct pinctrl *p, const char *statename,
 		pctldev = find_pinctrl_by_of_node(np_pctldev);
 		if (pctldev)
 			break;
+		/* Do not defer probing of hogs (circular loop) */
+		if (np_pctldev == p->dev->of_node) {
+			of_node_put(np_pctldev);
+			return -ENODEV;
+		}
 	}
 	of_node_put(np_pctldev);
 
-- 
1.7.11.3

^ permalink raw reply related

* [PATCH] KVM: ARM: Change psci_call return value to bool
From: Christoffer Dall @ 2013-01-11 20:51 UTC (permalink / raw)
  To: linux-arm-kernel

To avoid either using -1 or -EINVAL in return from kvm_psci_call change
the function to return a bool like the coprocessor handling functions
do.  Also clearly document this on on the function.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com>
---
 arch/arm/include/asm/kvm_psci.h |    2 +-
 arch/arm/kvm/arm.c              |    2 +-
 arch/arm/kvm/psci.c             |   21 ++++++++++++++++++---
 3 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/arch/arm/include/asm/kvm_psci.h b/arch/arm/include/asm/kvm_psci.h
index 992d7f1..9a83d98 100644
--- a/arch/arm/include/asm/kvm_psci.h
+++ b/arch/arm/include/asm/kvm_psci.h
@@ -18,6 +18,6 @@
 #ifndef __ARM_KVM_PSCI_H__
 #define __ARM_KVM_PSCI_H__
 
-int kvm_psci_call(struct kvm_vcpu *vcpu);
+bool kvm_psci_call(struct kvm_vcpu *vcpu);
 
 #endif /* __ARM_KVM_PSCI_H__ */
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index 4d5ed244..d3f1877 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -498,7 +498,7 @@ static int handle_svc_hyp(struct kvm_vcpu *vcpu, struct kvm_run *run)
 
 static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run)
 {
-	if (!kvm_psci_call(vcpu))
+	if (kvm_psci_call(vcpu))
 		return 1;
 
 	kvm_inject_undefined(vcpu);
diff --git a/arch/arm/kvm/psci.c b/arch/arm/kvm/psci.c
index 4a1c4f0..6be3687 100644
--- a/arch/arm/kvm/psci.c
+++ b/arch/arm/kvm/psci.c
@@ -21,6 +21,11 @@
 #include <asm/kvm_emulate.h>
 #include <asm/kvm_psci.h>
 
+/*
+ * This is an implementation of the Power State Coordination Interface
+ * as described in ARM document number ARM DEN 0022A.
+ */
+
 static void kvm_psci_vcpu_off(struct kvm_vcpu *vcpu)
 {
 	wait_queue_head_t *wq = kvm_arch_vcpu_wq(vcpu);
@@ -63,7 +68,17 @@ static unsigned long kvm_psci_vcpu_on(struct kvm_vcpu *source_vcpu)
 	return KVM_PSCI_RET_SUCCESS;
 }
 
-int kvm_psci_call(struct kvm_vcpu *vcpu)
+/**
+ * kvm_psci_call - handle PSCI call if r0 value is in range
+ * @vcpu: Pointer to the VCPU struct
+ *
+ * Handle PSCI calls from guests through traps from HVC or SMC instructions.
+ * The calling convention is similar to SMC calls to the secure world where
+ * the function number is placed in r0 and this function returns true if the
+ * function number specified in r0 is withing the PSCI range, and false
+ * otherwise.
+ */
+bool kvm_psci_call(struct kvm_vcpu *vcpu)
 {
 	unsigned long psci_fn = *vcpu_reg(vcpu, 0) & ~((u32) 0);
 	unsigned long val;
@@ -82,9 +97,9 @@ int kvm_psci_call(struct kvm_vcpu *vcpu)
 		break;
 
 	default:
-		return -1;
+		return false;
 	}
 
 	*vcpu_reg(vcpu, 0) = val;
-	return 0;
+	return true;
 }
-- 
1.7.9.5

^ permalink raw reply related

* [PATCH v4 6/9] clk: tegra: add clock support for tegra20
From: Stephen Warren @ 2013-01-11 20:54 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1357890387-23245-7-git-send-email-pgaikwad@nvidia.com>

On 01/11/2013 12:46 AM, Prashant Gaikwad wrote:
> Add tegra20 clock support based on common clock framework.

> diff --git a/drivers/clk/tegra/Makefile b/drivers/clk/tegra/Makefile

> +static void tegra20_pll_init(void)

> +	/* PLLE */
> +	clk = tegra_clk_plle("pll_e", "pll_ref", clk_base, NULL,
> +			     0, 1000000000, &pll_e_params,
> +			     0, pll_e_freq_table, NULL);

That 1000000000 (1GHz) needs to be 100000000 (100MHz). I can fix that up
when applying this.

With that change, everything I tested with this version of the series
works:-)

^ permalink raw reply

* [PATCH v2 01/10] spi: tegra: Do not use clock name to get clock
From: Stephen Warren @ 2013-01-11 20:58 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1357891289-23500-1-git-send-email-pgaikwad@nvidia.com>

On 01/11/2013 01:01 AM, Prashant Gaikwad wrote:
> Since Tegra spi devices do not have multiple clocks, no need to use
> clock name to get the clock.

Cc'ing in the SPI maintainers as an FYI and for Acks; this patch needs
to go through the Tegra tree due to dependencies.

> Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
> ---
> This series depends on v4 of Tegra's ccf-rework patch series.
> Tested on Ventana (Tegra20) and Cardhu (Tegra30).
> Rebased on Tegra's for-3.9/soc and for-3.9/cleanup.
> 
> Changes from V1:
> - Fixed clock lookup for SPI and nvec drivers.
> - Add clock information for nvec in device tree.
> ---
>  drivers/spi/spi-tegra20-sflash.c |    2 +-
>  drivers/spi/spi-tegra20-slink.c  |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c
> index 02feaa5..e5dce91 100644
> --- a/drivers/spi/spi-tegra20-sflash.c
> +++ b/drivers/spi/spi-tegra20-sflash.c
> @@ -525,7 +525,7 @@ static int tegra_sflash_probe(struct platform_device *pdev)
>  		goto exit_free_master;
>  	}
>  
> -	tsd->clk = devm_clk_get(&pdev->dev, "spi");
> +	tsd->clk = devm_clk_get(&pdev->dev, NULL);
>  	if (IS_ERR(tsd->clk)) {
>  		dev_err(&pdev->dev, "can not get clock\n");
>  		ret = PTR_ERR(tsd->clk);
> diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
> index fa208a5..e255e7a 100644
> --- a/drivers/spi/spi-tegra20-slink.c
> +++ b/drivers/spi/spi-tegra20-slink.c
> @@ -1191,7 +1191,7 @@ static int tegra_slink_probe(struct platform_device *pdev)
>  		goto exit_free_master;
>  	}
>  
> -	tspi->clk = devm_clk_get(&pdev->dev, "slink");
> +	tspi->clk = devm_clk_get(&pdev->dev, NULL);
>  	if (IS_ERR(tspi->clk)) {
>  		dev_err(&pdev->dev, "can not get clock\n");
>  		ret = PTR_ERR(tspi->clk);
> 

^ permalink raw reply

* [PATCH v2 06/10] ASoC: tegra: remove auxdata
From: Stephen Warren @ 2013-01-11 20:59 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1357891289-23500-6-git-send-email-pgaikwad@nvidia.com>

On 01/11/2013 01:01 AM, Prashant Gaikwad wrote:
> Configlink clock information is added to device tree. Get the clocks
> using device node. Remove AUXDATA.

Cc'ing in the ASoC maintainers as an FYI and for Acks; this patch needs
to go through the Tegra tree due to dependencies.

> 
> Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
> ---
>  sound/soc/tegra/tegra30_ahub.c |   14 ++------------
>  1 files changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c
> index bb31c41..2355630 100644
> --- a/sound/soc/tegra/tegra30_ahub.c
> +++ b/sound/soc/tegra/tegra30_ahub.c
> @@ -299,15 +299,6 @@ static const char * const configlink_clocks[] = {
>  	"spdif_in",
>  };
>  
> -struct of_dev_auxdata ahub_auxdata[] = {
> -	OF_DEV_AUXDATA("nvidia,tegra30-i2s", 0x70080300, "tegra30-i2s.0", NULL),
> -	OF_DEV_AUXDATA("nvidia,tegra30-i2s", 0x70080400, "tegra30-i2s.1", NULL),
> -	OF_DEV_AUXDATA("nvidia,tegra30-i2s", 0x70080500, "tegra30-i2s.2", NULL),
> -	OF_DEV_AUXDATA("nvidia,tegra30-i2s", 0x70080600, "tegra30-i2s.3", NULL),
> -	OF_DEV_AUXDATA("nvidia,tegra30-i2s", 0x70080700, "tegra30-i2s.4", NULL),
> -	{}
> -};
> -
>  #define LAST_REG(name) \
>  	(TEGRA30_AHUB_##name + \
>  	 (TEGRA30_AHUB_##name##_STRIDE * TEGRA30_AHUB_##name##_COUNT) - 4)
> @@ -451,7 +442,7 @@ static int tegra30_ahub_probe(struct platform_device *pdev)
>  	 * Ensure that here.
>  	 */
>  	for (i = 0; i < ARRAY_SIZE(configlink_clocks); i++) {
> -		clk = clk_get_sys(NULL, configlink_clocks[i]);
> +		clk = clk_get(&pdev->dev, configlink_clocks[i]);
>  		if (IS_ERR(clk)) {
>  			dev_err(&pdev->dev, "Can't get clock %s\n",
>  				configlink_clocks[i]);
> @@ -569,8 +560,7 @@ static int tegra30_ahub_probe(struct platform_device *pdev)
>  			goto err_pm_disable;
>  	}
>  
> -	of_platform_populate(pdev->dev.of_node, NULL, ahub_auxdata,
> -			     &pdev->dev);
> +	of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
>  
>  	return 0;
>  
> 

^ permalink raw reply

* [PATCH v2 09/10] clk: tegra20: remove unused TEGRA_CLK_DUPLICATE()s
From: Stephen Warren @ 2013-01-11 21:00 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1357891289-23500-9-git-send-email-pgaikwad@nvidia.com>

On 01/11/2013 01:01 AM, Prashant Gaikwad wrote:
> With device tree support added for Tegra clocks look up is done from
> device tree, remove unused TEGRA_CLK_DUPLICATE()s.

Cc'ing in the drivers/clk maintainer as an FYI and for Acks; this patch
needs to go through the Tegra tree due to dependencies.

> Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
> ---
>  drivers/clk/tegra/clk-tegra20.c |   17 -----------------
>  1 files changed, 0 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c
> index 4875261..9383b85 100644
> --- a/drivers/clk/tegra/clk-tegra20.c
> +++ b/drivers/clk/tegra/clk-tegra20.c
> @@ -1174,28 +1174,11 @@ static __initdata struct tegra_clk_init_table init_table[] = {
>   * table under two names.
>   */
>  static struct tegra_clk_duplicate tegra_clk_duplicates[] = {
> -	TEGRA_CLK_DUPLICATE(uarta,  "serial8250.0", NULL),
> -	TEGRA_CLK_DUPLICATE(uartb,  "serial8250.1", NULL),
> -	TEGRA_CLK_DUPLICATE(uartc,  "serial8250.2", NULL),
> -	TEGRA_CLK_DUPLICATE(uartd,  "serial8250.3", NULL),
> -	TEGRA_CLK_DUPLICATE(uarte,  "serial8250.4", NULL),
>  	TEGRA_CLK_DUPLICATE(usbd,   "utmip-pad",    NULL),
>  	TEGRA_CLK_DUPLICATE(usbd,   "tegra-ehci.0", NULL),
>  	TEGRA_CLK_DUPLICATE(usbd,   "tegra-otg",    NULL),
> -	TEGRA_CLK_DUPLICATE(pll_p,   "tegradc.0",    "parent"),
> -	TEGRA_CLK_DUPLICATE(pll_p,   "tegradc.1",    "parent"),
> -	TEGRA_CLK_DUPLICATE(pll_d_out0,   "hdmi",    "parent"),
> -	TEGRA_CLK_DUPLICATE(gr2d,   "tegra_grhost", "gr2d"),
> -	TEGRA_CLK_DUPLICATE(gr3d,   "tegra_grhost", "gr3d"),
> -	TEGRA_CLK_DUPLICATE(epp,    "tegra_grhost", "epp"),
> -	TEGRA_CLK_DUPLICATE(mpe,    "tegra_grhost", "mpe"),
> -	TEGRA_CLK_DUPLICATE(vde,    "tegra-aes",    "vde"),
>  	TEGRA_CLK_DUPLICATE(cclk,   NULL,           "cpu"),
>  	TEGRA_CLK_DUPLICATE(twd,    "smp_twd",      NULL),
> -	TEGRA_CLK_DUPLICATE(pll_p_out3, "tegra-i2c.0", "fast-clk"),
> -	TEGRA_CLK_DUPLICATE(pll_p_out3, "tegra-i2c.1", "fast-clk"),
> -	TEGRA_CLK_DUPLICATE(pll_p_out3, "tegra-i2c.2", "fast-clk"),
> -	TEGRA_CLK_DUPLICATE(pll_p_out3, "tegra-i2c.3", "fast-clk"),
>  	TEGRA_CLK_DUPLICATE(clk_max, NULL, NULL), /* Must be the last entry */
>  };
>  
> 

^ permalink raw reply

* [PATCH v2 10/10] clk: tegra30: remove unused TEGRA_CLK_DUPLICATE()s
From: Stephen Warren @ 2013-01-11 21:01 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1357891289-23500-10-git-send-email-pgaikwad@nvidia.com>

On 01/11/2013 01:01 AM, Prashant Gaikwad wrote:
> With device tree support added for Tegra clocks look up is done from
> device tree, remove unused TEGRA_CLK_DUPLICATE()s.

Cc'ing in the drivers/clk maintainer as an FYI and for Acks; this patch
needs to go through the Tegra tree due to dependencies.

> Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
> ---
>  drivers/clk/tegra/clk-tegra30.c |   70 ---------------------------------------
>  1 files changed, 0 insertions(+), 70 deletions(-)
> 
> diff --git a/drivers/clk/tegra/clk-tegra30.c b/drivers/clk/tegra/clk-tegra30.c
> index 987312c..6d1ff86 100644
> --- a/drivers/clk/tegra/clk-tegra30.c
> +++ b/drivers/clk/tegra/clk-tegra30.c
> @@ -1642,41 +1642,6 @@ static void __init tegra30_periph_clk_init(void)
>  	clk_register_clkdev(clk, "emc", NULL);
>  	clks[emc] = clk;
>  
> -	/* i2c1-fast */
> -	clk = clk_register_fixed_factor(NULL, "i2c1-fast", "pll_p_out3",
> -					CLK_SET_RATE_PARENT, 1, 1);
> -	clk_register_clkdev(clk, "fast-clk", "tegra-i2c.0");
> -
> -	/* i2c2-fast */
> -	clk = clk_register_fixed_factor(NULL, "i2c2-fast", "pll_p_out3",
> -					CLK_SET_RATE_PARENT, 1, 1);
> -	clk_register_clkdev(clk, "fast-clk", "tegra-i2c.1");
> -
> -	/* i2c3-fast */
> -	clk = clk_register_fixed_factor(NULL, "i2c3-fast", "pll_p_out3",
> -					CLK_SET_RATE_PARENT, 1, 1);
> -	clk_register_clkdev(clk, "fast-clk", "tegra-i2c.2");
> -
> -	/* i2c4-fast */
> -	clk = clk_register_fixed_factor(NULL, "i2c4-fast", "pll_p_out3",
> -					CLK_SET_RATE_PARENT, 1, 1);
> -	clk_register_clkdev(clk, "fast-clk", "tegra-i2c.3");
> -
> -	/* i2c5-fast */
> -	clk = clk_register_fixed_factor(NULL, "i2c5-fast", "pll_p_out3",
> -					CLK_SET_RATE_PARENT, 1, 1);
> -	clk_register_clkdev(clk, "fast-clk", "tegra-i2c.5");
> -
> -	/* dsi1-fixed */
> -	clk = clk_register_fixed_factor(NULL, "dsi1-fixed", "pll_p_out3",
> -					CLK_SET_RATE_PARENT, 1, 1);
> -	clk_register_clkdev(clk, "dsi-fixed", "tegradc.0");
> -
> -	/* dsi2-fixed */
> -	clk = clk_register_fixed_factor(NULL, "dsi2-fixed", "pll_p_out3",
> -					CLK_SET_RATE_PARENT, 1, 1);
> -	clk_register_clkdev(clk, "dsi-fixed", "tegradc.1");
> -
>  	for (i = 0; i < ARRAY_SIZE(tegra_periph_clk_list); i++) {
>  		data = &tegra_periph_clk_list[i];
>  		clk = tegra_clk_periph(data->name, data->parent_names,
> @@ -1935,19 +1900,9 @@ static __initdata struct tegra_clk_init_table init_table[] = {
>   * table under two names.
>   */
>  static struct tegra_clk_duplicate tegra_clk_duplicates[] = {
> -	TEGRA_CLK_DUPLICATE(uarta,  "serial8250.0", NULL),
> -	TEGRA_CLK_DUPLICATE(uartb,  "serial8250.1", NULL),
> -	TEGRA_CLK_DUPLICATE(uartc,  "serial8250.2", NULL),
> -	TEGRA_CLK_DUPLICATE(uartd,  "serial8250.3", NULL),
> -	TEGRA_CLK_DUPLICATE(uarte,  "serial8250.4", NULL),
>  	TEGRA_CLK_DUPLICATE(usbd, "utmip-pad", NULL),
>  	TEGRA_CLK_DUPLICATE(usbd, "tegra-ehci.0", NULL),
>  	TEGRA_CLK_DUPLICATE(usbd, "tegra-otg", NULL),
> -	TEGRA_CLK_DUPLICATE(pll_p, "tegradc.0", "parent"),
> -	TEGRA_CLK_DUPLICATE(pll_p, "tegradc.1", "parent"),
> -	TEGRA_CLK_DUPLICATE(pll_d2_out0, "hdmi", "parent"),
> -	TEGRA_CLK_DUPLICATE(dsib, "tegradc.0", "dsib"),
> -	TEGRA_CLK_DUPLICATE(dsia, "tegradc.1", "dsia"),
>  	TEGRA_CLK_DUPLICATE(bsev, "tegra-avp", "bsev"),
>  	TEGRA_CLK_DUPLICATE(bsev, "nvavp", "bsev"),
>  	TEGRA_CLK_DUPLICATE(vde, "tegra-aes", "vde"),
> @@ -1956,33 +1911,8 @@ static struct tegra_clk_duplicate tegra_clk_duplicates[] = {
>  	TEGRA_CLK_DUPLICATE(cml1, "tegra_sata_cml", NULL),
>  	TEGRA_CLK_DUPLICATE(cml0, "tegra_pcie", "cml"),
>  	TEGRA_CLK_DUPLICATE(pciex, "tegra_pcie", "pciex"),
> -	TEGRA_CLK_DUPLICATE(i2c1, "tegra-i2c-slave.0", NULL),
> -	TEGRA_CLK_DUPLICATE(i2c2, "tegra-i2c-slave.1", NULL),
> -	TEGRA_CLK_DUPLICATE(i2c3, "tegra-i2c-slave.2", NULL),
> -	TEGRA_CLK_DUPLICATE(i2c4, "tegra-i2c-slave.3", NULL),
> -	TEGRA_CLK_DUPLICATE(i2c5, "tegra-i2c-slave.4", NULL),
> -	TEGRA_CLK_DUPLICATE(sbc1, "spi_slave_tegra.0", NULL),
> -	TEGRA_CLK_DUPLICATE(sbc2, "spi_slave_tegra.1", NULL),
> -	TEGRA_CLK_DUPLICATE(sbc3, "spi_slave_tegra.2", NULL),
> -	TEGRA_CLK_DUPLICATE(sbc4, "spi_slave_tegra.3", NULL),
> -	TEGRA_CLK_DUPLICATE(sbc5, "spi_slave_tegra.4", NULL),
> -	TEGRA_CLK_DUPLICATE(sbc6, "spi_slave_tegra.5", NULL),
>  	TEGRA_CLK_DUPLICATE(twd, "smp_twd", NULL),
>  	TEGRA_CLK_DUPLICATE(vcp, "nvavp", "vcp"),
> -	TEGRA_CLK_DUPLICATE(i2s0, NULL, "i2s0"),
> -	TEGRA_CLK_DUPLICATE(i2s1, NULL, "i2s1"),
> -	TEGRA_CLK_DUPLICATE(i2s2, NULL, "i2s2"),
> -	TEGRA_CLK_DUPLICATE(i2s3, NULL, "i2s3"),
> -	TEGRA_CLK_DUPLICATE(i2s4, NULL, "i2s4"),
> -	TEGRA_CLK_DUPLICATE(dam0, NULL, "dam0"),
> -	TEGRA_CLK_DUPLICATE(dam1, NULL, "dam1"),
> -	TEGRA_CLK_DUPLICATE(dam2, NULL, "dam2"),
> -	TEGRA_CLK_DUPLICATE(spdif_in, NULL, "spdif_in"),
> -	TEGRA_CLK_DUPLICATE(pll_p_out3, "tegra-i2c.0", "fast-clk"),
> -	TEGRA_CLK_DUPLICATE(pll_p_out3, "tegra-i2c.1", "fast-clk"),
> -	TEGRA_CLK_DUPLICATE(pll_p_out3, "tegra-i2c.2", "fast-clk"),
> -	TEGRA_CLK_DUPLICATE(pll_p_out3, "tegra-i2c.3", "fast-clk"),
> -	TEGRA_CLK_DUPLICATE(pll_p_out3, "tegra-i2c.4", "fast-clk"),
>  	TEGRA_CLK_DUPLICATE(clk_max, NULL, NULL), /* MUST be the last entry */
>  };
>  
> 

^ permalink raw reply

* [PATCH v2 06/10] ASoC: tegra: remove auxdata
From: Mark Brown @ 2013-01-11 21:05 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <50F07D30.9020102@wwwdotorg.org>

On Fri, Jan 11, 2013 at 01:59:28PM -0700, Stephen Warren wrote:
> On 01/11/2013 01:01 AM, Prashant Gaikwad wrote:
> > Configlink clock information is added to device tree. Get the clocks
> > using device node. Remove AUXDATA.
> 
> Cc'ing in the ASoC maintainers as an FYI and for Acks; this patch needs
> to go through the Tegra tree due to dependencies.

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.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/20130111/27c7056d/attachment.sig>

^ permalink raw reply

* [PATCH v4 2/9] clk: tegra: Add tegra specific clocks
From: Stephen Warren @ 2013-01-11 21:35 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20130111.134820.1392079432650652356.hdoyu@nvidia.com>

On 01/11/2013 04:48 AM, Hiroshi Doyu wrote:
> Hi Prahant,
> 
> Some nit-pick/cosmetic comments inlined...

FYI, Prashant is on vacation for the next week or two, so I'll take over
this series to clean up any last review comments.

> Prashant Gaikwad <pgaikwad@nvidia.com> wrote @ Fri, 11 Jan 2013 08:46:20 +0100:
> 
>> Add tegra specific clocks, pll, pll_out, peripheral,
>> frac_divider, super.

(it's a good idea to quote as little text as possible; paging through
the whole patch to find your comments was slightly painful).

>> diff --git a/drivers/clk/tegra/clk-audio-sync.c b/drivers/clk/tegra/clk-audio-sync.c

>> +struct clk *tegra_clk_sync_source(const char *name, unsigned long rate,
>> +                                 unsigned long max_rate)
>> +{
>> +       struct tegra_clk_sync_source *sync;
>> +       struct clk_init_data init;
>> +       struct clk *clk;
>> +
>> +       sync = kzalloc(sizeof(struct tegra_clk_sync_source), GFP_KERNEL);
>> +       if (!sync) {
>> +               pr_err("%s: could not allocate sync source clk\n", __func__);
>> +               return ERR_PTR(-ENOMEM);
>> +       }
>> +
>> +       sync->rate = rate;
>> +       sync->max_rate = max_rate;
>> +
>> +       init.ops = &tegra_clk_sync_source_ops;
>> +       init.name = name;
>> +       init.flags = CLK_IS_ROOT;
>> +       init.parent_names = NULL;
>> +       init.num_parents = 0;
>> +
>> +       sync->hw.init = &init;
>> +
>> +       clk = clk_register(NULL, &sync->hw);
> 
> The above usage of "init" from stack may be a bit
> unfamilier. I can guess that its content is copied in clk_register()
> but it's originally defined in stack. So I just prefer to writing this
> as below. It may be somewhat explict that we know init is from stack.

The issue you mention is more about whether "init" is copied from the
stack or not; simplying changing the initialization to:

> struct clk *tegra_clk_sync_source(const char *name, unsigned long rate,
>                                  unsigned long max_rate)
> {
>         struct tegra_clk_sync_source *sync;
>         struct clk_init_data init = {
>                 .ops = &tegra_clk_sync_source_ops;
>                 .name = name;
>                 .flags = CLK_IS_ROOT;
>                 .parent_names = NULL;
>                 .num_parents = 0;
>         };

... doesn't really address that, although it's a perfectly reasonable
change.

To address the copying issue, why not just add a comment:

       /*
        * This data pointed at by this field is copied by
        * clk_register(), so a pointer to the stack is OK.
        */
       sync->hw.init = &init;

       clk = clk_register(NULL, &sync->hw);

I'll make the other changes you suggested.

^ permalink raw reply

* [PATCH v4 7/9] clk: tegra: add clock support for tegra30
From: Stephen Warren @ 2013-01-11 21:40 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20130111141725.ce3177ad04fc700186dc694d@nvidia.com>

On 01/11/2013 05:17 AM, Hiroshi Doyu wrote:
> On Fri, 11 Jan 2013 08:46:25 +0100
> Prashant Gaikwad <pgaikwad@nvidia.com> wrote:
> 
>> Add tegra30 clock support based on common clock framework.
>>
>> Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
> .......
>> +static void __init tegra30_pll_init(void)
>> +{
>> +       struct clk *clk;
>> +
>> +       /* PLLC */
>> +       clk = tegra_clk_pll("pll_c", "pll_ref", clk_base, pmc_base, 0,
>> +                           0, &pll_c_params,
>> +                           TEGRA_PLL_HAS_CPCON | TEGRA_PLL_USE_LOCK,
>> +                           pll_c_freq_table, NULL);
>> +       clk_register_clkdev(clk, "pll_c", NULL);
>> +       clks[pll_c] = clk;
> 
> Just I noticed that there are quite many same itegration of:
> 
> 	clk_register_clkdev(clk, <ID name>, ?);
> 	clks[<ID>] = clk;
> 
> ID == <ID name>
> 
> Can any macro/func do the above at once?

To my mind, a macro would obfuscate this fairly simple code, unless
there is a table somewhere the maps <ID> to <ID name> which would allow
saving some code space (I just looked; I don't think there is).
Eventually (later cleanup), I wouldn't be surprised if both parameters
to clk_register_clkdev() became NULL in most cases, since most lookups
are through DT by the end of this series.

^ 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