| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * NVIDIA Tegra SoC device tree board support |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2011, 2013, NVIDIA Corporation |
|---|
| 5 | 6 | * Copyright (C) 2010 Secret Lab Technologies, Ltd. |
|---|
| 6 | 7 | * Copyright (C) 2010 Google, Inc. |
|---|
| 7 | | - * |
|---|
| 8 | | - * This software is licensed under the terms of the GNU General Public |
|---|
| 9 | | - * License version 2, as published by the Free Software Foundation, and |
|---|
| 10 | | - * may be copied, distributed, and modified under those terms. |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 13 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 15 | | - * GNU General Public License for more details. |
|---|
| 16 | | - * |
|---|
| 17 | 8 | */ |
|---|
| 18 | 9 | |
|---|
| 19 | 10 | #include <linux/clk.h> |
|---|
| .. | .. |
|---|
| 35 | 26 | #include <linux/sys_soc.h> |
|---|
| 36 | 27 | #include <linux/usb/tegra_usb_phy.h> |
|---|
| 37 | 28 | |
|---|
| 29 | +#include <linux/firmware/trusted_foundations.h> |
|---|
| 30 | + |
|---|
| 38 | 31 | #include <soc/tegra/fuse.h> |
|---|
| 39 | 32 | #include <soc/tegra/pmc.h> |
|---|
| 40 | 33 | |
|---|
| 34 | +#include <asm/firmware.h> |
|---|
| 41 | 35 | #include <asm/hardware/cache-l2x0.h> |
|---|
| 42 | 36 | #include <asm/mach/arch.h> |
|---|
| 43 | 37 | #include <asm/mach/time.h> |
|---|
| 44 | 38 | #include <asm/mach-types.h> |
|---|
| 39 | +#include <asm/psci.h> |
|---|
| 45 | 40 | #include <asm/setup.h> |
|---|
| 46 | | -#include <asm/trusted_foundations.h> |
|---|
| 47 | 41 | |
|---|
| 48 | 42 | #include "board.h" |
|---|
| 49 | 43 | #include "common.h" |
|---|
| 50 | | -#include "cpuidle.h" |
|---|
| 51 | 44 | #include "iomap.h" |
|---|
| 52 | | -#include "irq.h" |
|---|
| 53 | 45 | #include "pm.h" |
|---|
| 54 | 46 | #include "reset.h" |
|---|
| 55 | 47 | #include "sleep.h" |
|---|
| .. | .. |
|---|
| 74 | 66 | { |
|---|
| 75 | 67 | of_register_trusted_foundations(); |
|---|
| 76 | 68 | tegra_cpu_reset_handler_init(); |
|---|
| 69 | + call_firmware_op(l2x0_init); |
|---|
| 77 | 70 | } |
|---|
| 78 | 71 | |
|---|
| 79 | 72 | static void __init tegra_dt_init_irq(void) |
|---|
| .. | .. |
|---|
| 92 | 85 | static void __init tegra_dt_init_late(void) |
|---|
| 93 | 86 | { |
|---|
| 94 | 87 | tegra_init_suspend(); |
|---|
| 95 | | - tegra_cpuidle_init(); |
|---|
| 96 | 88 | |
|---|
| 97 | 89 | if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) && |
|---|
| 98 | 90 | of_machine_is_compatible("compal,paz00")) |
|---|
| .. | .. |
|---|
| 101 | 93 | if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) && |
|---|
| 102 | 94 | of_machine_is_compatible("nvidia,tegra20")) |
|---|
| 103 | 95 | platform_device_register_simple("tegra20-cpufreq", -1, NULL, 0); |
|---|
| 96 | + |
|---|
| 97 | + if (IS_ENABLED(CONFIG_ARM_TEGRA_CPUIDLE) && !psci_smp_available()) |
|---|
| 98 | + platform_device_register_simple("tegra-cpuidle", -1, NULL, 0); |
|---|
| 99 | + |
|---|
| 100 | + if (IS_ENABLED(CONFIG_ARCH_TEGRA_3x_SOC) && |
|---|
| 101 | + of_machine_is_compatible("nvidia,tegra30")) |
|---|
| 102 | + platform_device_register_simple("tegra20-cpufreq", -1, NULL, 0); |
|---|
| 104 | 103 | } |
|---|
| 105 | 104 | |
|---|
| 106 | 105 | static const char * const tegra_dt_board_compat[] = { |
|---|