Lines Matching +full:tegra20 +full:- +full:apbmisc
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
112 return -EPROBE_DEFER; in tegra194_miscreg_mask_serror()
116 return -EOPNOTSUPP; in tegra194_miscreg_mask_serror()
127 { .compatible = "nvidia,tegra20-apbmisc", },
128 { .compatible = "nvidia,tegra186-misc", },
129 { .compatible = "nvidia,tegra194-misc", },
130 { .compatible = "nvidia,tegra234-misc", },
149 if (chip_id == TEGRA20 && (tegra_fuse_read_spare(18) || in tegra_init_revision()
166 static void tegra_init_apbmisc_resources(struct resource *apbmisc, in tegra_init_apbmisc_resources() argument
171 apbmisc_base = ioremap(apbmisc->start, resource_size(apbmisc)); in tegra_init_apbmisc_resources()
175 pr_err("failed to map APBMISC registers\n"); in tegra_init_apbmisc_resources()
177 strapping_base = ioremap(straps->start, resource_size(straps)); in tegra_init_apbmisc_resources()
187 * tegra_init_apbmisc - Initializes Tegra APBMISC and Strapping registers.
189 * This is called during early init as some of the old 32-bit ARM code needs
190 * information from the APBMISC registers very early during boot.
194 struct resource apbmisc, straps; in tegra_init_apbmisc() local
200 * Fall back to legacy initialization for 32-bit ARM only. All in tegra_init_apbmisc()
201 * 64-bit ARM device tree files for Tegra are required to have in tegra_init_apbmisc()
202 * an APBMISC node. in tegra_init_apbmisc()
204 * This is for backwards-compatibility with old device trees in tegra_init_apbmisc()
205 * that didn't contain an APBMISC node. in tegra_init_apbmisc()
208 /* APBMISC registers (chip revision, ...) */ in tegra_init_apbmisc()
209 apbmisc.start = 0x70000800; in tegra_init_apbmisc()
210 apbmisc.end = 0x70000863; in tegra_init_apbmisc()
211 apbmisc.flags = IORESOURCE_MEM; in tegra_init_apbmisc()
224 pr_warn("Using APBMISC region %pR\n", &apbmisc); in tegra_init_apbmisc()
230 * nice with multi-platform kernels. in tegra_init_apbmisc()
239 if (of_address_to_resource(np, 0, &apbmisc) < 0) { in tegra_init_apbmisc()
240 pr_err("failed to get APBMISC registers\n"); in tegra_init_apbmisc()
250 tegra_init_apbmisc_resources(&apbmisc, &straps); in tegra_init_apbmisc()
251 long_ram_code = of_property_read_bool(np, "nvidia,long-ram-code"); in tegra_init_apbmisc()
272 adev = acpi_dev_get_first_match_dev(apbmisc_acpi_match[0].id, NULL, -1); in tegra_acpi_init_apbmisc()
280 pr_err("failed to get APBMISC memory resources"); in tegra_acpi_init_apbmisc()
287 * resources[0]: apbmisc. in tegra_acpi_init_apbmisc()
294 resources[rcount++] = rentry->res; in tegra_acpi_init_apbmisc()
298 pr_err("failed to get APBMISC registers\n"); in tegra_acpi_init_apbmisc()