Skip to content

Commit

Permalink
Merge branch 'for-3.6/boards' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/swarren/linux-tegra into next/boards

From Stephen Warren <swarren@wwwdotorg.org>
This branch contains changes to Tegra board files, and related Kconfig and
Makefile changes. Highlights include:

* Removal of Seaboard/Springbank board files; these boards can now only be
  used with device tree.

* Use of small parts of some non-DT board files from the DT board files. This
  enables all features that the non-DT board files have, when booting from DT.
  This will allow almost complete removal of all non-DT board files in v3.7.

* Other miscellaneous changes.

This branch is based on Tegra's for-3.6/cleanup branch from a previous pull
request.

* 'for-3.6/boards' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra:
  ARM: tegra: use of_default_bus_match_table
  ARM: tegra: add device tree AUXDATA for APBDMA
  ARM: tegra: paz00: enable WiFi rfkill when booting from device tree
  ARM: tegra: harmony: init regulators, PCIe when booting from DT
  ARM: tegra: trimslice: enable PCIe when booting from device tree
  ARM: tegra: remove Seaboard board files
  ARM: tegra: remove CONFIG_MACH_TEGRA_DT
  ARM: tegra: make .dts compilation depend on Tegra2 support

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Arnd Bergmann committed Jul 6, 2012
2 parents 6887a41 + 2553dcc commit efab093
Show file tree
Hide file tree
Showing 41 changed files with 143 additions and 685 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Child device nodes describe the memory settings for different configurations and

Example:

emc@7000f400 {
memory-controller@7000f400 {
#address-cells = < 1 >;
#size-cells = < 0 >;
compatible = "nvidia,tegra20-emc";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Required properties:
- interrupts : Should contain MC General interrupt.

Example:
mc {
memory-controller@0x7000f000 {
compatible = "nvidia,tegra20-mc";
reg = <0x7000f000 0x024
0x7000f03c 0x3c4>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Required properties:
- interrupts : Should contain MC General interrupt.

Example:
mc {
memory-controller {
compatible = "nvidia,tegra30-mc";
reg = <0x7000f000 0x010
0x7000f03c 0x1b4
Expand Down
1 change: 1 addition & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ config ARCH_TEGRA
select MIGHT_HAVE_CACHE_L2X0
select NEED_MACH_IO_H if PCI
select ARCH_HAS_CPUFREQ
select USE_OF
help
This enables support for NVIDIA Tegra based systems (Tegra APX,
Tegra 6xx and Tegra 2 series).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@
cd-gpios = <&gpio 58 0>; /* gpio PH2 */
wp-gpios = <&gpio 59 0>; /* gpio PH3 */
power-gpios = <&gpio 70 0>; /* gpio PI6 */
support-8bit;
bus-width = <8>;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@

sdhci@c8000600 {
status = "okay";
support-8bit;
bus-width = <8>;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@
};
};

emc {
memory-controller@0x7000f400 {
emc-table@190000 {
reg = <190000>;
compatible = "nvidia,tegra20-emc-table";
Expand Down Expand Up @@ -397,7 +397,6 @@

sdhci@c8000600 {
status = "okay";
support-8bit;
bus-width = <8>;
};

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@

sdhci@c8000600 {
status = "okay";
support-8bit;
bus-width = <8>;
};

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/tegra20.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
reg = <0x7000e400 0x400>;
};

mc {
memory-controller@0x7000f000 {
compatible = "nvidia,tegra20-mc";
reg = <0x7000f000 0x024
0x7000f03c 0x3c4>;
Expand All @@ -177,7 +177,7 @@
0x58000000 0x02000000>; /* GART aperture */
};

emc {
memory-controller@0x7000f400 {
compatible = "nvidia,tegra20-emc";
reg = <0x7000f400 0x200>;
#address-cells = <1>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@

sdhci@78000600 {
status = "okay";
support-8bit;
bus-width = <8>;
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/tegra30.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
reg = <0x7000e400 0x400>;
};

mc {
memory-controller {
compatible = "nvidia,tegra30-mc";
reg = <0x7000f000 0x010
0x7000f03c 0x1b4
Expand Down
39 changes: 0 additions & 39 deletions arch/arm/mach-tegra/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -63,61 +63,22 @@ comment "Tegra board type"
config MACH_HARMONY
bool "Harmony board"
depends on ARCH_TEGRA_2x_SOC
select MACH_HAS_SND_SOC_TEGRA_WM8903 if SND_SOC
help
Support for nVidia Harmony development platform

config MACH_KAEN
bool "Kaen board"
depends on ARCH_TEGRA_2x_SOC
select MACH_SEABOARD
select MACH_HAS_SND_SOC_TEGRA_WM8903 if SND_SOC
help
Support for the Kaen version of Seaboard

config MACH_PAZ00
bool "Paz00 board"
depends on ARCH_TEGRA_2x_SOC
help
Support for the Toshiba AC100/Dynabook AZ netbook

config MACH_SEABOARD
bool "Seaboard board"
depends on ARCH_TEGRA_2x_SOC
select MACH_HAS_SND_SOC_TEGRA_WM8903 if SND_SOC
help
Support for nVidia Seaboard development platform. It will
also be included for some of the derivative boards that
have large similarities with the seaboard design.

config MACH_TEGRA_DT
bool "Generic Tegra20 board (FDT support)"
depends on ARCH_TEGRA_2x_SOC
select USE_OF
help
Support for generic NVIDIA Tegra20 boards using Flattened Device Tree

config MACH_TRIMSLICE
bool "TrimSlice board"
depends on ARCH_TEGRA_2x_SOC
select TEGRA_PCI
help
Support for CompuLab TrimSlice platform

config MACH_WARIO
bool "Wario board"
depends on ARCH_TEGRA_2x_SOC
select MACH_SEABOARD
help
Support for the Wario version of Seaboard

config MACH_VENTANA
bool "Ventana board"
depends on ARCH_TEGRA_2x_SOC
select MACH_TEGRA_DT
help
Support for the nVidia Ventana development platform

choice
prompt "Default low-level debug console UART"
default TEGRA_DEBUG_UART_NONE
Expand Down
13 changes: 3 additions & 10 deletions arch/arm/mach-tegra/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ obj-$(CONFIG_CPU_IDLE) += sleep.o
obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += powergate.o
obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_clocks.o
obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_emc.o
obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += board-dt-tegra30.o
obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30_clocks.o
obj-$(CONFIG_SMP) += platsmp.o headsmp.o
obj-$(CONFIG_SMP) += reset.o
Expand All @@ -23,6 +22,9 @@ obj-$(CONFIG_CPU_FREQ) += cpu-tegra.o
obj-$(CONFIG_TEGRA_PCI) += pcie.o
obj-$(CONFIG_USB_SUPPORT) += usb_phy.o

obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += board-dt-tegra20.o
obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += board-dt-tegra30.o

obj-$(CONFIG_MACH_HARMONY) += board-harmony.o
obj-$(CONFIG_MACH_HARMONY) += board-harmony-pinmux.o
obj-$(CONFIG_MACH_HARMONY) += board-harmony-pcie.o
Expand All @@ -31,14 +33,5 @@ obj-$(CONFIG_MACH_HARMONY) += board-harmony-power.o
obj-$(CONFIG_MACH_PAZ00) += board-paz00.o
obj-$(CONFIG_MACH_PAZ00) += board-paz00-pinmux.o

obj-$(CONFIG_MACH_SEABOARD) += board-seaboard.o
obj-$(CONFIG_MACH_SEABOARD) += board-seaboard-pinmux.o

obj-$(CONFIG_MACH_TEGRA_DT) += board-dt-tegra20.o
obj-$(CONFIG_MACH_TEGRA_DT) += board-harmony-pinmux.o
obj-$(CONFIG_MACH_TEGRA_DT) += board-seaboard-pinmux.o
obj-$(CONFIG_MACH_TEGRA_DT) += board-paz00-pinmux.o
obj-$(CONFIG_MACH_TEGRA_DT) += board-trimslice-pinmux.o

obj-$(CONFIG_MACH_TRIMSLICE) += board-trimslice.o
obj-$(CONFIG_MACH_TRIMSLICE) += board-trimslice-pinmux.o
12 changes: 6 additions & 6 deletions arch/arm/mach-tegra/Makefile.boot
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ zreladdr-$(CONFIG_ARCH_TEGRA_2x_SOC) += 0x00008000
params_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00000100
initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000

dtb-$(CONFIG_MACH_HARMONY) += tegra-harmony.dtb
dtb-$(CONFIG_MACH_PAZ00) += tegra-paz00.dtb
dtb-$(CONFIG_MACH_SEABOARD) += tegra-seaboard.dtb
dtb-$(CONFIG_MACH_TRIMSLICE) += tegra-trimslice.dtb
dtb-$(CONFIG_MACH_VENTANA) += tegra-ventana.dtb
dtb-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra-cardhu.dtb
dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-harmony.dtb
dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-paz00.dtb
dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-seaboard.dtb
dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-trimslice.dtb
dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-ventana.dtb
dtb-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30-cardhu.dtb
74 changes: 67 additions & 7 deletions arch/arm/mach-tegra/board-dt-tegra20.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
&tegra_ehci2_pdata),
OF_DEV_AUXDATA("nvidia,tegra20-ehci", TEGRA_USB3_BASE, "tegra-ehci.2",
&tegra_ehci3_pdata),
OF_DEV_AUXDATA("nvidia,tegra20-apbdma", 0x6000a000, "tegra-apbdma", NULL),
{}
};

Expand All @@ -81,11 +82,6 @@ static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = {
{ NULL, NULL, 0, 0},
};

static struct of_device_id tegra_dt_match_table[] __initdata = {
{ .compatible = "simple-bus", },
{}
};

static void __init tegra_dt_init(void)
{
tegra_clk_init_from_table(tegra_dt_clk_init_table);
Expand All @@ -94,10 +90,74 @@ static void __init tegra_dt_init(void)
* Finished with the static registrations now; fill in the missing
* devices
*/
of_platform_populate(NULL, tegra_dt_match_table,
of_platform_populate(NULL, of_default_bus_match_table,
tegra20_auxdata_lookup, NULL);
}

#ifdef CONFIG_MACH_TRIMSLICE
static void __init trimslice_init(void)
{
int ret;

ret = tegra_pcie_init(true, true);
if (ret)
pr_err("tegra_pci_init() failed: %d\n", ret);
}
#endif

#ifdef CONFIG_MACH_HARMONY
static void __init harmony_init(void)
{
int ret;

ret = harmony_regulator_init();
if (ret) {
pr_err("harmony_regulator_init() failed: %d\n", ret);
return;
}

ret = harmony_pcie_init();
if (ret)
pr_err("harmony_pcie_init() failed: %d\n", ret);
}
#endif

#ifdef CONFIG_MACH_PAZ00
static void __init paz00_init(void)
{
tegra_paz00_wifikill_init();
}
#endif

static struct {
char *machine;
void (*init)(void);
} board_init_funcs[] = {
#ifdef CONFIG_MACH_TRIMSLICE
{ "compulab,trimslice", trimslice_init },
#endif
#ifdef CONFIG_MACH_HARMONY
{ "nvidia,harmony", harmony_init },
#endif
#ifdef CONFIG_MACH_PAZ00
{ "compal,paz00", paz00_init },
#endif
};

static void __init tegra_dt_init_late(void)
{
int i;

tegra_init_late();

for (i = 0; i < ARRAY_SIZE(board_init_funcs); i++) {
if (of_machine_is_compatible(board_init_funcs[i].machine)) {
board_init_funcs[i].init();
break;
}
}
}

static const char *tegra20_dt_board_compat[] = {
"nvidia,tegra20",
NULL
Expand All @@ -110,7 +170,7 @@ DT_MACHINE_START(TEGRA_DT, "nVidia Tegra20 (Flattened Device Tree)")
.handle_irq = gic_handle_irq,
.timer = &tegra_timer,
.init_machine = tegra_dt_init,
.init_late = tegra_init_late,
.init_late = tegra_dt_init_late,
.restart = tegra_assert_system_reset,
.dt_compat = tegra20_dt_board_compat,
MACHINE_END
8 changes: 2 additions & 6 deletions arch/arm/mach-tegra/board-dt-tegra30.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
#include "board.h"
#include "clock.h"

static struct of_device_id tegra_dt_match_table[] __initdata = {
{ .compatible = "simple-bus", },
{}
};

struct of_dev_auxdata tegra30_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("nvidia,tegra20-sdhci", 0x78000000, "sdhci-tegra.0", NULL),
OF_DEV_AUXDATA("nvidia,tegra20-sdhci", 0x78000200, "sdhci-tegra.1", NULL),
Expand All @@ -52,6 +47,7 @@ struct of_dev_auxdata tegra30_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("nvidia,tegra20-i2c", 0x7000C700, "tegra-i2c.3", NULL),
OF_DEV_AUXDATA("nvidia,tegra20-i2c", 0x7000D000, "tegra-i2c.4", NULL),
OF_DEV_AUXDATA("nvidia,tegra30-ahub", 0x70080000, "tegra30-ahub", NULL),
OF_DEV_AUXDATA("nvidia,tegra30-apbdma", 0x6000a000, "tegra-apbdma", NULL),
{}
};

Expand All @@ -74,7 +70,7 @@ static void __init tegra30_dt_init(void)
{
tegra_clk_init_from_table(tegra_dt_clk_init_table);

of_platform_populate(NULL, tegra_dt_match_table,
of_platform_populate(NULL, of_default_bus_match_table,
tegra30_auxdata_lookup, NULL);
}

Expand Down
15 changes: 10 additions & 5 deletions arch/arm/mach-tegra/board-harmony-pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,11 @@

#ifdef CONFIG_TEGRA_PCI

static int __init harmony_pcie_init(void)
int __init harmony_pcie_init(void)
{
struct regulator *regulator = NULL;
int err;

if (!machine_is_harmony())
return 0;

err = gpio_request(TEGRA_GPIO_EN_VDD_1V05_GPIO, "EN_VDD_1V05");
if (err)
return err;
Expand Down Expand Up @@ -62,7 +59,15 @@ static int __init harmony_pcie_init(void)
return err;
}

static int __init harmony_pcie_initcall(void)
{
if (!machine_is_harmony())
return 0;

return harmony_pcie_init();
}

/* PCI should be initialized after I2C, mfd and regulators */
subsys_initcall_sync(harmony_pcie_init);
subsys_initcall_sync(harmony_pcie_initcall);

#endif
Loading

0 comments on commit efab093

Please sign in to comment.