arm: tegra: init tn8 and ardbeg as separate devices
Ahung Cheng [Mon, 29 Jul 2013 10:06:40 +0000 (18:06 +0800)]
Need to call DT_MACHINE_START for each platform so that
ro.hardware property is set according to platform name.
This also enforces one dts file per platform.

Bug 1328162

Change-Id: I368669af638ec2ee237fe090ad70c0d63375fef1
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/255003
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

arch/arm/boot/dts/tegra124-tn8.dts [new file with mode: 0644]
arch/arm/mach-tegra/board-ardbeg-sdhci.c
arch/arm/mach-tegra/board-ardbeg.c
arch/arm/mach-tegra/board-tn8-power.c

diff --git a/arch/arm/boot/dts/tegra124-tn8.dts b/arch/arm/boot/dts/tegra124-tn8.dts
new file mode 100644 (file)
index 0000000..a4dc6d0
--- /dev/null
@@ -0,0 +1,50 @@
+/dts-v1/;
+
+/include/ "tegra124.dtsi"
+
+/ {
+       model = "NVIDIA Tegra124 TN8";
+       compatible = "nvidia,tn8", "nvidia,tegra124";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       chosen {
+               bootargs = "tegraid=40.0.0.00.00 vmalloc=256M video=tegrafb console=ttyS0,115200n8 earlyprintk";
+               linux,initrd-start = <0x85000000>;
+               linux,initrd-end = <0x851bc400>;
+       };
+
+       gpio: gpio@6000d000 {
+               status = "okay";
+       };
+
+        serial@70006000 {
+                compatible = "nvidia,tegra114-hsuart";
+                status = "okay";
+        };
+
+        serial@70006040 {
+                compatible = "nvidia,tegra114-hsuart";
+                status = "okay";
+        };
+
+        serial@70006200 {
+                compatible = "nvidia,tegra114-hsuart";
+                status = "okay";
+        };
+
+       memory@0x80000000 {
+               device_type = "memory";
+               reg = <0x80000000 0x80000000>;
+       };
+
+       spi@7000d400 {
+               status = "okay";
+               spi-max-frequency = <25000000>;
+       };
+
+       spi@7000da00 {
+               status = "okay";
+               spi-max-frequency = <25000000>;
+       };
+};
index d58a097..26a250d 100644 (file)
@@ -283,7 +283,8 @@ static int __init ardbeg_wifi_init(void)
 static int __init ardbeg_wifi_prepower(void)
 {
        if (!of_machine_is_compatible("nvidia,ardbeg") &&
-               !of_machine_is_compatible("nvidia,laguna"))
+               !of_machine_is_compatible("nvidia,laguna") &&
+               !of_machine_is_compatible("nvidia,tn8"))
                return 0;
        ardbeg_wifi_power(1);
 
index 8d9eeb9..c68f8b6 100644 (file)
@@ -1034,6 +1034,8 @@ static void __init tegra_ardbeg_early_init(void)
        tegra_clk_verify_parents();
        if (of_machine_is_compatible("nvidia,laguna"))
                tegra_soc_device_init("laguna");
+       else if (of_machine_is_compatible("nvidia,tn8"))
+               tegra_soc_device_init("tn8");
        else
                tegra_soc_device_init("ardbeg");
 }
@@ -1150,6 +1152,11 @@ static const char * const laguna_dt_board_compat[] = {
        NULL
 };
 
+static const char * const tn8_dt_board_compat[] = {
+       "nvidia,tn8",
+       NULL
+};
+
 DT_MACHINE_START(LAGUNA, "laguna")
        .atag_offset    = 0x100,
        .smp            = smp_ops(tegra_smp_ops),
@@ -1163,6 +1170,19 @@ DT_MACHINE_START(LAGUNA, "laguna")
        .dt_compat      = laguna_dt_board_compat,
 MACHINE_END
 
+DT_MACHINE_START(TN8, "tn8")
+       .atag_offset    = 0x100,
+       .smp            = smp_ops(tegra_smp_ops),
+       .map_io         = tegra_map_common_io,
+       .reserve        = tegra_ardbeg_reserve,
+       .init_early     = tegra12x_init_early,
+       .init_irq       = tegra_dt_init_irq,
+       .init_time      = tegra_init_timer,
+       .init_machine   = tegra_ardbeg_dt_init,
+       .restart        = tegra_assert_system_reset,
+       .dt_compat      = tn8_dt_board_compat,
+MACHINE_END
+
 DT_MACHINE_START(ARDBEG, "ardbeg")
        .atag_offset    = 0x100,
        .smp            = smp_ops(tegra_smp_ops),
index 7a5eb11..f51a46e 100644 (file)
@@ -574,7 +574,7 @@ static int __init tn8_fixed_regulator_init(void)
 {
        struct board_info pmu_board_info;
 
-       if (!of_machine_is_compatible("nvidia,ardbeg"))
+       if (!of_machine_is_compatible("nvidia,tn8"))
                return 0;
 
        tegra_get_pmu_board_info(&pmu_board_info);