Skip to contentSkip to conversation

ARM: Tegra: cleanup patches from Arnd Bergmann

PATCH Applied Alan Ott 4 participants 13 messages Mar 2, 2012 – Mar 18, 2012

Subsystems (3)
lore
Share & tools
lore

Alan Ott

author
#0 lore raw

v2 cover ARM: Tegra: cleanup patches from Arnd Bergmann

Sorry for the mess yesterday....
This is V2 of Arnd's Patch series from yesterday. Hopefully this one will be smoother.

Changes:
* set_irq_flags() removal patch is out
* driver-only patch has been moved to another set
* Distribution list should be cleaner
* Added proper sign-off
* Select CPU_FREQ_TABLE for ARCH_TEGRA_3x_SOC as well
* Fixed spacing on the localtimer patch
* added linux/export.h to the export usb phy symbols patch

Arnd Bergmann (6):
ARM: tegra: do not hide dma declarations
ARM: tegra: select CPU_FREQ_TABLE
ARM: tegra: build localtimer support only when needed
ARM: tegra: work around tegra THUMB2_KERNEL bug
ARM: tegra: USB_ULPI needs USB
ARM: tegra: export usb phy symbols

 arch/arm/Kconfig                       |    1 +
 arch/arm/mach-tegra/Kconfig            |    3 +++
 arch/arm/mach-tegra/Makefile           |    3 ++-
 arch/arm/mach-tegra/include/mach/dma.h |    4 ----
 arch/arm/mach-tegra/usb_phy.c          |   11 +++++++++++
 5 files changed, 17 insertions(+), 5 deletions(-)
#1 lore raw

Alan Ott wrote at Friday, March 02, 2012 1:58 PM:

Quoted 3 lines

Sorry for the mess yesterday....
This is V2 of Arnd's Patch series from yesterday. Hopefully this one will be smoother.

There was feedback on at least patches 4 and 5 that doesn't appear to have been incorporated into this updated version.

Signature · 1 line
nvpublic
author
#2 lore raw
Quoted 6 lines · Stephen Warren

Alan Ott wrote at Friday, March 02, 2012 1:58 PM:

Quoted 3 lines

Sorry for the mess yesterday....
This is V2 of Arnd's Patch series from yesterday. Hopefully this one will be smoother.

There was feedback on at least patches 4 and 5 that doesn't appear to have been incorporated into this updated version.

Hi Stephen,

For patch #4 (ARM: tegra: work around tegra THUMB2_KERNEL bug) I missed the last email in that series. I'm sorry, I'll drop this patch from v3.

For patch #5 (ARM: tegra: USB_ULPI needs USB), it didn't look to me like there was a resolution on that thread yesterday. On reading it again, if we change
select USB_ULPI if USB_SUPPORT
to:
select USB_ULPI if USB
for both Tegra 2 and 3, does that satisfy you and Arnd?

Thanks for catching these Stephen.

Alan.

#3 lore raw

Alan Ott wrote at Friday, March 02, 2012 2:39 PM:

Quoted 7 lines · Stephen Warren
Quoted 6 lines

Alan Ott wrote at Friday, March 02, 2012 1:58 PM:

Quoted 3 lines

Sorry for the mess yesterday....
This is V2 of Arnd's Patch series from yesterday. Hopefully this one will be smoother.

There was feedback on at least patches 4 and 5 that doesn't appear to have been incorporated into this updated version.

...

Quoted 7 lines

For patch #5 (ARM: tegra: USB_ULPI needs USB), it didn't look to me like there was a resolution on that thread yesterday. On reading it again, if we change
select USB_ULPI if USB_SUPPORT
to:
select USB_ULPI if USB
for both Tegra 2 and 3, does that satisfy you and Arnd?

I believe so yes. Thanks.

Signature · 1 line
nvpublic
#4 lore raw
Quoted 9 lines · Stephen Warren
Quoted 7 lines

For patch #5 (ARM: tegra: USB_ULPI needs USB), it didn't look to me like there was a resolution on that thread yesterday. On reading it again, if we change
select USB_ULPI if USB_SUPPORT
to:
select USB_ULPI if USB
for both Tegra 2 and 3, does that satisfy you and Arnd?

I believe so yes. Thanks.

Agreed.

Arnd

author
#5 lore raw

v3 cover ARM: Tegra: cleanup patches from Arnd Bergmann

In reply to Alan Ott

Version 3 of the patch set.

Changes:
* change of logic (and commit message change) for "select USB_ULPI if USB is selected"
* dropped THUMB2 patch

Arnd Bergmann (5):
ARM: tegra: do not hide dma declarations
ARM: tegra: select CPU_FREQ_TABLE
ARM: tegra: build localtimer support only when needed
ARM: tegra: select USB_ULPI if USB is selected
ARM: tegra: export usb phy symbols

 arch/arm/mach-tegra/Kconfig            |    6 ++++--
 arch/arm/mach-tegra/Makefile           |    3 ++-
 arch/arm/mach-tegra/include/mach/dma.h |    4 ----
 arch/arm/mach-tegra/usb_phy.c          |   11 +++++++++++
 4 files changed, 17 insertions(+), 7 deletions(-)
author
#6 lore raw

PATCH v3 1/5 ARM: tegra: do not hide dma declarations

From: Arnd Bergmann <[email protected]>

The declarations are actually required for the device definitions, and are still valid even if the dma controller is disabled:

arch/arm/mach-tegra/devices.c:559:12: error: 'TEGRA_DMA_REQ_SEL_I2S_1' undeclared here (not in a function) arch/arm/mach-tegra/devices.c:577:12: error: 'TEGRA_DMA_REQ_SEL_I2S2_1' undeclared here (not in a function)

---
 arch/arm/mach-tegra/include/mach/dma.h |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
arch/arm/mach-tegra/include/mach/dma.h +0 -4
index 3c93390..9077092 100644
@@ -51,8 +51,6 @@
 #define TEGRA_DMA_REQ_SEL_OWR			25
 #define TEGRA_DMA_REQ_SEL_INVALID		31
 
-#if defined(CONFIG_TEGRA_SYSTEM_DMA)
-
 struct tegra_dma_req;
 struct tegra_dma_channel;
 
@@ -151,5 +149,3 @@ void tegra_dma_free_channel(struct tegra_dma_channel *ch);
 int __init tegra_dma_init(void);
 
 #endif
-
-#endif
Signature · 1 line
1.7.0.4
author
#7 lore raw

PATCH v3 2/5 ARM: tegra: select CPU_FREQ_TABLE

In reply to Alan Ott

From: Arnd Bergmann <[email protected]>

The tegra cpufreq implementation relies on the cpu_freq_table code, so make sure that this is always there when needed.

---
 arch/arm/mach-tegra/Kconfig |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-tegra/Kconfig +2 -0
index 373652d..60f3e4b 100644
@@ -10,6 +10,7 @@ config ARCH_TEGRA_2x_SOC
 	select USB_ARCH_HAS_EHCI if USB_SUPPORT
 	select USB_ULPI if USB_SUPPORT
 	select USB_ULPI_VIEWPORT if USB_SUPPORT
+	select CPU_FREQ_TABLE if CPU_FREQ
 	help
 	  Support for NVIDIA Tegra AP20 and T20 processors, based on the
 	  ARM CortexA9MP CPU and the ARM PL310 L2 cache controller
@@ -23,6 +24,7 @@ config ARCH_TEGRA_3x_SOC
 	select USB_ULPI if USB_SUPPORT
 	select USB_ULPI_VIEWPORT if USB_SUPPORT
 	select USE_OF
+	select CPU_FREQ_TABLE if CPU_FREQ
 	help
 	  Support for NVIDIA Tegra T30 processor family, based on the
 	  ARM CortexA9MP CPU and the ARM PL310 L2 cache controller
Signature · 1 line
1.7.0.4
author
#8 lore raw

PATCH v3 3/5 ARM: tegra: build localtimer support only when needed

In reply to Alan Ott

From: Arnd Bergmann <[email protected]>

It is possible to build a tegra kernel without localtimer support, so the tegra specific parts should only be built when that is indeed enabled.

---
 arch/arm/mach-tegra/Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/mach-tegra/Makefile +2 -1
index e120ff5..829066f 100644
@@ -13,7 +13,8 @@ obj-$(CONFIG_ARCH_TEGRA_2x_SOC)		+= tegra2_emc.o
 obj-$(CONFIG_ARCH_TEGRA_2x_SOC)		+= pinmux-tegra20-tables.o
 obj-$(CONFIG_ARCH_TEGRA_3x_SOC)		+= pinmux-tegra30-tables.o
 obj-$(CONFIG_ARCH_TEGRA_3x_SOC)		+= board-dt-tegra30.o
-obj-$(CONFIG_SMP)                       += platsmp.o localtimer.o headsmp.o
+obj-$(CONFIG_SMP)			+= platsmp.o headsmp.o
+obj-$(CONFIG_LOCAL_TIMERS)		+= localtimer.o
 obj-$(CONFIG_HOTPLUG_CPU)               += hotplug.o
 obj-$(CONFIG_TEGRA_SYSTEM_DMA)		+= dma.o
 obj-$(CONFIG_CPU_FREQ)                  += cpu-tegra.o
Signature · 1 line
1.7.0.4
author
#9 lore raw

PATCH v3 4/5 ARM: tegra: select USB_ULPI if USB is selected

In reply to Alan Ott

From: Arnd Bergmann <[email protected]>

Automatically select USB_ULPI if USB is enabled on Tegra.

---
 arch/arm/mach-tegra/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-tegra/Kconfig +2 -2
index 60f3e4b..fdef6b2 100644
@@ -8,7 +8,7 @@ config ARCH_TEGRA_2x_SOC
 	select ARM_GIC
 	select ARCH_REQUIRE_GPIOLIB
 	select USB_ARCH_HAS_EHCI if USB_SUPPORT
-	select USB_ULPI if USB_SUPPORT
+	select USB_ULPI if USB
 	select USB_ULPI_VIEWPORT if USB_SUPPORT
 	select CPU_FREQ_TABLE if CPU_FREQ
 	help
@@ -21,7 +21,7 @@ config ARCH_TEGRA_3x_SOC
 	select ARM_GIC
 	select ARCH_REQUIRE_GPIOLIB
 	select USB_ARCH_HAS_EHCI if USB_SUPPORT
-	select USB_ULPI if USB_SUPPORT
+	select USB_ULPI if USB
 	select USB_ULPI_VIEWPORT if USB_SUPPORT
 	select USE_OF
 	select CPU_FREQ_TABLE if CPU_FREQ
Signature · 1 line
1.7.0.4
#10 lore raw

Re: [PATCH v3 4/5] ARM: tegra: select USB_ULPI if USB is selected

Quoted 6 lines · Alan Ott

From: Arnd Bergmann <[email protected]>

Automatically select USB_ULPI if USB is enabled on Tegra.

Thanks, applied. I think this was the last outstanding patch that I had not yet applied. Since there had been some slight confusion with v2 vs v3, please check the contents of the tegra for-next branch and make sure it contains what you would expect it to.

Thanks!

-Olof

author
#11 lore raw

PATCH v3 5/5 ARM: tegra: export usb phy symbols

In reply to Alan Ott

From: Arnd Bergmann <[email protected]>

The ehci driver can be a module, so the functions provided by the tegra platform code used by ehci-tegra need to be exported.

---
 arch/arm/mach-tegra/usb_phy.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
arch/arm/mach-tegra/usb_phy.c +11 -0
index 37576a7..6091cf3 100644
@@ -22,6 +22,7 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/err.h>
+#include <linux/export.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/gpio.h>
@@ -730,6 +731,7 @@ err0:
 	kfree(phy);
 	return ERR_PTR(err);
 }
+EXPORT_SYMBOL_GPL(tegra_usb_phy_open);
 
 int tegra_usb_phy_power_on(struct tegra_usb_phy *phy)
 {
@@ -738,6 +740,7 @@ int tegra_usb_phy_power_on(struct tegra_usb_phy *phy)
 	else
 		return utmi_phy_power_on(phy);
 }
+EXPORT_SYMBOL_GPL(tegra_usb_phy_power_on);
 
 void tegra_usb_phy_power_off(struct tegra_usb_phy *phy)
 {
@@ -746,18 +749,21 @@ void tegra_usb_phy_power_off(struct tegra_usb_phy *phy)
 	else
 		utmi_phy_power_off(phy);
 }
+EXPORT_SYMBOL_GPL(tegra_usb_phy_power_off);
 
 void tegra_usb_phy_preresume(struct tegra_usb_phy *phy)
 {
 	if (!phy_is_ulpi(phy))
 		utmi_phy_preresume(phy);
 }
+EXPORT_SYMBOL_GPL(tegra_usb_phy_preresume);
 
 void tegra_usb_phy_postresume(struct tegra_usb_phy *phy)
 {
 	if (!phy_is_ulpi(phy))
 		utmi_phy_postresume(phy);
 }
+EXPORT_SYMBOL_GPL(tegra_usb_phy_postresume);
 
 void tegra_ehci_phy_restore_start(struct tegra_usb_phy *phy,
 				 enum tegra_usb_phy_port_speed port_speed)
@@ -765,24 +771,28 @@ void tegra_ehci_phy_restore_start(struct tegra_usb_phy *phy,
 	if (!phy_is_ulpi(phy))
 		utmi_phy_restore_start(phy, port_speed);
 }
+EXPORT_SYMBOL_GPL(tegra_ehci_phy_restore_start);
 
 void tegra_ehci_phy_restore_end(struct tegra_usb_phy *phy)
 {
 	if (!phy_is_ulpi(phy))
 		utmi_phy_restore_end(phy);
 }
+EXPORT_SYMBOL_GPL(tegra_ehci_phy_restore_end);
 
 void tegra_usb_phy_clk_disable(struct tegra_usb_phy *phy)
 {
 	if (!phy_is_ulpi(phy))
 		utmi_phy_clk_disable(phy);
 }
+EXPORT_SYMBOL_GPL(tegra_usb_phy_clk_disable);
 
 void tegra_usb_phy_clk_enable(struct tegra_usb_phy *phy)
 {
 	if (!phy_is_ulpi(phy))
 		utmi_phy_clk_enable(phy);
 }
+EXPORT_SYMBOL_GPL(tegra_usb_phy_clk_enable);
 
 void tegra_usb_phy_close(struct tegra_usb_phy *phy)
 {
@@ -794,3 +804,4 @@ void tegra_usb_phy_close(struct tegra_usb_phy *phy)
 	clk_put(phy->pll_u);
 	kfree(phy);
 }
+EXPORT_SYMBOL_GPL(tegra_usb_phy_close);
Signature · 1 line
1.7.0.4
Acked-by on the v3 series
#12 lore raw
In reply to Alan Ott

Alan Ott wrote at Friday, March 02, 2012 3:25 PM:

Quoted 7 lines

Version 3 of the patch set.

Changes:
* change of logic (and commit message change) for "select USB_ULPI if USB is selected"
* dropped THUMB2 patch

Quoted 6 lines

Arnd Bergmann (5):
ARM: tegra: do not hide dma declarations
ARM: tegra: select CPU_FREQ_TABLE
ARM: tegra: build localtimer support only when needed
ARM: tegra: select USB_ULPI if USB is selected
ARM: tegra: export usb phy symbols

The series,

Thanks Arnd and Alan for cleaning Tegra up!

Signature · 1 line
nvpublic