Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-13 Thread Stephen Warren
On 02/12/2013 11:12 PM, Hiroshi Doyu wrote: > Stephen Warren wrote @ Tue, 12 Feb 2013 17:35:56 > +0100: > >> However I'd like to avoid changing the body of those two functions at >> all if possible, since I hope the PCIe driver rework will be merged in >> 3.10, and that will allow the Harmony

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-13 Thread Stephen Warren
On 02/12/2013 11:12 PM, Hiroshi Doyu wrote: Stephen Warren swar...@wwwdotorg.org wrote @ Tue, 12 Feb 2013 17:35:56 +0100: However I'd like to avoid changing the body of those two functions at all if possible, since I hope the PCIe driver rework will be merged in 3.10, and that will allow

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-12 Thread Hiroshi Doyu
Stephen Warren wrote @ Tue, 12 Feb 2013 17:35:56 +0100: > However I'd like to avoid changing the body of those two functions at > all if possible, since I hope the PCIe driver rework will be merged in > 3.10, and that will allow the Harmony and TrimSlice init functions to be > removed entirely.

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-12 Thread Arnd Bergmann
On Tuesday 12 February 2013, Stephen Warren wrote: > I believe U-Boot enabled -ffunction-sections -fdata-sections or similar > (recently?) to get this kind of behaviour. I wonder why the kernel > didn't need that. Perhaps -O2 is more aggressive (within a file at > least) than I thought.

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-12 Thread Stephen Warren
On 02/12/2013 10:32 AM, Arnd Bergmann wrote: > On Tuesday 12 February 2013, Stephen Warren wrote: >>> I don't think that's going to help any link issues, so I'd drop it and >>> keep this function simple. >> >> As explained in the above, a complier will drop unnecessary functions

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-12 Thread Arnd Bergmann
On Tuesday 12 February 2013, Stephen Warren wrote: > > I don't think that's going to help any link issues, so I'd drop it and > > keep this function simple. > > As explained in the above, a complier will drop unnecessary functions > automatically with this IS_ENABLED(),

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-12 Thread Stephen Warren
On 02/12/2013 06:50 AM, Arnd Bergmann wrote: > On Tuesday 12 February 2013, Hiroshi Doyu wrote: >> static void __init paz00_init(void) >> @@ -129,6 +128,9 @@ static void __init tegra_dt_init_late(void) >> >> tegra_init_late(); >> >> + if (IS_ENABLED(CONFIG_PCI) &&

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-12 Thread Arnd Bergmann
On Tuesday 12 February 2013, Hiroshi Doyu wrote: > > >>> static void __init paz00_init(void) > > >>> @@ -129,6 +128,9 @@ static void __init tegra_dt_init_late(void) > > >>> > > >>> tegra_init_late(); > > >>> > > >>> + if (IS_ENABLED(CONFIG_PCI) && IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC)) > >

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-12 Thread Arnd Bergmann
On Tuesday 12 February 2013, Hiroshi Doyu wrote: static void __init paz00_init(void) @@ -129,6 +128,9 @@ static void __init tegra_dt_init_late(void) tegra_init_late(); + if (IS_ENABLED(CONFIG_PCI) IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC)) + return; I don't

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-12 Thread Stephen Warren
On 02/12/2013 06:50 AM, Arnd Bergmann wrote: On Tuesday 12 February 2013, Hiroshi Doyu wrote: static void __init paz00_init(void) @@ -129,6 +128,9 @@ static void __init tegra_dt_init_late(void) tegra_init_late(); + if (IS_ENABLED(CONFIG_PCI) IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC)) +

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-12 Thread Arnd Bergmann
On Tuesday 12 February 2013, Stephen Warren wrote: I don't think that's going to help any link issues, so I'd drop it and keep this function simple. As explained in the above, a complier will drop unnecessary functions automatically with this IS_ENABLED(), which could save many ifdefs.

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-12 Thread Stephen Warren
On 02/12/2013 10:32 AM, Arnd Bergmann wrote: On Tuesday 12 February 2013, Stephen Warren wrote: I don't think that's going to help any link issues, so I'd drop it and keep this function simple. As explained in the above, a complier will drop unnecessary functions automatically with this

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-12 Thread Arnd Bergmann
On Tuesday 12 February 2013, Stephen Warren wrote: I believe U-Boot enabled -ffunction-sections -fdata-sections or similar (recently?) to get this kind of behaviour. I wonder why the kernel didn't need that. Perhaps -O2 is more aggressive (within a file at least) than I thought.

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-12 Thread Hiroshi Doyu
Stephen Warren swar...@wwwdotorg.org wrote @ Tue, 12 Feb 2013 17:35:56 +0100: However I'd like to avoid changing the body of those two functions at all if possible, since I hope the PCIe driver rework will be merged in 3.10, and that will allow the Harmony and TrimSlice init functions to be

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-11 Thread Hiroshi Doyu
Stephen Warren wrote @ Tue, 12 Feb 2013 05:47:20 +0100: > >>> static void __init harmony_init(void) > >>> { > >>> -#ifdef CONFIG_TEGRA_PCI > >>> int ret; > >>> > >>> ret = harmony_pcie_init(); > >>> if (ret) > >>> pr_err("harmony_pcie_init() failed: %d\n", ret); > >>> -#endif

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-11 Thread Stephen Warren
On 02/11/2013 09:12 PM, Hiroshi Doyu wrote: > Stephen Warren wrote @ Tue, 12 Feb 2013 00:54:03 > +0100: > >>> -obj-$(CONFIG_ARCH_TEGRA_2x_SOC)+= tegra.o >>> -obj-$(CONFIG_ARCH_TEGRA_3x_SOC)+= board-dt-tegra30.o >>> -obj-$(CONFIG_ARCH_TEGRA_114_SOC) +=

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-11 Thread Hiroshi Doyu
Stephen Warren wrote @ Tue, 12 Feb 2013 00:54:03 +0100: > > -obj-$(CONFIG_ARCH_TEGRA_2x_SOC)+= tegra.o > > -obj-$(CONFIG_ARCH_TEGRA_3x_SOC)+= board-dt-tegra30.o > > -obj-$(CONFIG_ARCH_TEGRA_114_SOC) += board-dt-tegra114.o > > +obj-y

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-11 Thread Stephen Warren
On 02/10/2013 11:05 PM, Hiroshi Doyu wrote: > Unify board-dt-tegra{30,114} to the Tegra20 DT board file, "tegra.c". > diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile > obj-$(CONFIG_CPU_FREQ) += cpu-tegra.o > obj-$(CONFIG_TEGRA_PCI)

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-11 Thread Stephen Warren
On 02/10/2013 11:05 PM, Hiroshi Doyu wrote: Unify board-dt-tegra{30,114} to the Tegra20 DT board file, tegra.c. diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile obj-$(CONFIG_CPU_FREQ) += cpu-tegra.o obj-$(CONFIG_TEGRA_PCI) +=

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-11 Thread Hiroshi Doyu
Stephen Warren swar...@wwwdotorg.org wrote @ Tue, 12 Feb 2013 00:54:03 +0100: -obj-$(CONFIG_ARCH_TEGRA_2x_SOC)+= tegra.o -obj-$(CONFIG_ARCH_TEGRA_3x_SOC)+= board-dt-tegra30.o -obj-$(CONFIG_ARCH_TEGRA_114_SOC) += board-dt-tegra114.o +obj-y

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-11 Thread Stephen Warren
On 02/11/2013 09:12 PM, Hiroshi Doyu wrote: Stephen Warren swar...@wwwdotorg.org wrote @ Tue, 12 Feb 2013 00:54:03 +0100: -obj-$(CONFIG_ARCH_TEGRA_2x_SOC)+= tegra.o -obj-$(CONFIG_ARCH_TEGRA_3x_SOC)+= board-dt-tegra30.o -obj-$(CONFIG_ARCH_TEGRA_114_SOC) +=

Re: [v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-11 Thread Hiroshi Doyu
Stephen Warren swar...@wwwdotorg.org wrote @ Tue, 12 Feb 2013 05:47:20 +0100: static void __init harmony_init(void) { -#ifdef CONFIG_TEGRA_PCI int ret; ret = harmony_pcie_init(); if (ret) pr_err(harmony_pcie_init() failed: %d\n, ret); -#endif } Why

[v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-10 Thread Hiroshi Doyu
Unify board-dt-tegra{30,114} to the Tegra20 DT board file, "tegra.c". Signed-off-by: Hiroshi Doyu --- arch/arm/mach-tegra/Makefile|5 ++- arch/arm/mach-tegra/board-dt-tegra114.c | 46 arch/arm/mach-tegra/board-dt-tegra30.c | 60

[v2 3/3] ARM: tegra: Unify Device tree board files

2013-02-10 Thread Hiroshi Doyu
Unify board-dt-tegra{30,114} to the Tegra20 DT board file, tegra.c. Signed-off-by: Hiroshi Doyu hd...@nvidia.com --- arch/arm/mach-tegra/Makefile|5 ++- arch/arm/mach-tegra/board-dt-tegra114.c | 46 arch/arm/mach-tegra/board-dt-tegra30.c | 60