You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'tegra/soc' into next/soc
* tegra/soc: arm/tegra: Compile tegra_dt_init_irq only when CONFIG_OF arm/tegra: Make MACH_TEGRA_DT depend on ARCH_TEGRA_2x_SOC arm/tegra: Delete tegra_init_clock() arm/tegra: Fix section mismatch errors in tegra30 pinmux arm/tegra: Fix section mismatch errors in tegra20 pinmux arm/tegra: refresh defconfig for tegra30 arm/tegra: add support for tegra30 based board cardhu arm/tegra: implement support for tegra30 arm/tegra: pinmux tables and definitions for tegra30 arm/tegra: add new fields to struct tegra_pingroup_desc arm/tegra: prepare pinmux code for multiple tegra variants arm/tegra: rename tegra20 pinmux files arm/tegra: generalize L2 cache initialization arm/tegra: use PMC reset arm/tegra: rename board-dt.c to board-dt-tegra20.c arm/tegra: prepare early init for multiple tegra variants arm/tegra: don't export clk_measure_input_freq arm/tegra: prepare clock code for multiple tegra variants arm/tegra: cleanup tegra20 support arm/tegra: clk_get should not be fatal Conflicts: arch/arm/mach-tegra/board-dt-tegra20.c
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "tegra30.dtsi"
|
||||
|
||||
/ {
|
||||
model = "NVIDIA Tegra30 Cardhu evaluation board";
|
||||
compatible = "nvidia,cardhu", "nvidia,tegra30";
|
||||
|
||||
memory {
|
||||
reg = < 0x80000000 0x40000000 >;
|
||||
};
|
||||
|
||||
serial@70006000 {
|
||||
clock-frequency = < 408000000 >;
|
||||
};
|
||||
|
||||
i2c@7000c000 {
|
||||
clock-frequency = <100000>;
|
||||
};
|
||||
|
||||
i2c@7000c400 {
|
||||
clock-frequency = <100000>;
|
||||
};
|
||||
|
||||
i2c@7000c500 {
|
||||
clock-frequency = <100000>;
|
||||
};
|
||||
|
||||
i2c@7000c700 {
|
||||
clock-frequency = <100000>;
|
||||
};
|
||||
|
||||
i2c@7000d000 {
|
||||
clock-frequency = <100000>;
|
||||
};
|
||||
};
|
||||
@@ -9,9 +9,8 @@ CONFIG_RESOURCE_COUNTERS=y
|
||||
CONFIG_CGROUP_SCHED=y
|
||||
CONFIG_RT_GROUP_SCHED=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_EMBEDDED=y
|
||||
# CONFIG_SYSCTL_SYSCALL is not set
|
||||
# CONFIG_ELF_CORE is not set
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
@@ -20,6 +19,8 @@ CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_IOSCHED_CFQ is not set
|
||||
CONFIG_ARCH_TEGRA=y
|
||||
CONFIG_ARCH_TEGRA_2x_SOC=y
|
||||
CONFIG_ARCH_TEGRA_3x_SOC=y
|
||||
CONFIG_MACH_HARMONY=y
|
||||
CONFIG_MACH_KAEN=y
|
||||
CONFIG_MACH_PAZ00=y
|
||||
@@ -78,14 +79,12 @@ CONFIG_BLK_DEV_SD=y
|
||||
# CONFIG_SCSI_LOWLEVEL is not set
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_DUMMY=y
|
||||
CONFIG_NET_ETHERNET=y
|
||||
CONFIG_R8169=y
|
||||
# CONFIG_NETDEV_10000 is not set
|
||||
# CONFIG_WLAN is not set
|
||||
CONFIG_USB_PEGASUS=y
|
||||
CONFIG_USB_USBNET=y
|
||||
CONFIG_USB_NET_SMSC75XX=y
|
||||
CONFIG_USB_NET_SMSC95XX=y
|
||||
# CONFIG_WLAN is not set
|
||||
# CONFIG_INPUT is not set
|
||||
# CONFIG_SERIO is not set
|
||||
# CONFIG_VT is not set
|
||||
|
||||
@@ -2,11 +2,8 @@ if ARCH_TEGRA
|
||||
|
||||
comment "NVIDIA Tegra options"
|
||||
|
||||
choice
|
||||
prompt "Select Tegra processor family for target system"
|
||||
|
||||
config ARCH_TEGRA_2x_SOC
|
||||
bool "Tegra 2 family"
|
||||
bool "Enable support for Tegra20 family"
|
||||
select CPU_V7
|
||||
select ARM_GIC
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
@@ -17,22 +14,36 @@ config ARCH_TEGRA_2x_SOC
|
||||
Support for NVIDIA Tegra AP20 and T20 processors, based on the
|
||||
ARM CortexA9MP CPU and the ARM PL310 L2 cache controller
|
||||
|
||||
endchoice
|
||||
config ARCH_TEGRA_3x_SOC
|
||||
bool "Enable support for Tegra30 family"
|
||||
select CPU_V7
|
||||
select ARM_GIC
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select USB_ARCH_HAS_EHCI if USB_SUPPORT
|
||||
select USB_ULPI if USB_SUPPORT
|
||||
select USB_ULPI_VIEWPORT if USB_SUPPORT
|
||||
select USE_OF
|
||||
help
|
||||
Support for NVIDIA Tegra T30 processor family, based on the
|
||||
ARM CortexA9MP CPU and the ARM PL310 L2 cache controller
|
||||
|
||||
config TEGRA_PCI
|
||||
bool "PCI Express support"
|
||||
depends on ARCH_TEGRA_2x_SOC
|
||||
select PCI
|
||||
|
||||
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
|
||||
@@ -40,11 +51,13 @@ config MACH_KAEN
|
||||
|
||||
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
|
||||
@@ -52,25 +65,29 @@ config MACH_SEABOARD
|
||||
have large similarities with the seaboard design.
|
||||
|
||||
config MACH_TEGRA_DT
|
||||
bool "Generic Tegra board (FDT support)"
|
||||
bool "Generic Tegra20 board (FDT support)"
|
||||
depends on ARCH_TEGRA_2x_SOC
|
||||
select USE_OF
|
||||
help
|
||||
Support for generic nVidia Tegra boards using Flattened Device Tree
|
||||
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
|
||||
|
||||
@@ -5,12 +5,13 @@ obj-y += irq.o
|
||||
obj-y += clock.o
|
||||
obj-y += timer.o
|
||||
obj-y += pinmux.o
|
||||
obj-y += powergate.o
|
||||
obj-y += fuse.o
|
||||
obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += clock.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_2x_SOC) += pinmux-t2-tables.o
|
||||
obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += pinmux-tegra20-tables.o
|
||||
obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += pinmux-tegra30-tables.o
|
||||
obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += board-dt-tegra30.o
|
||||
obj-$(CONFIG_SMP) += platsmp.o localtimer.o headsmp.o
|
||||
obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
|
||||
obj-$(CONFIG_TEGRA_SYSTEM_DMA) += dma.o
|
||||
@@ -29,7 +30,7 @@ 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.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
|
||||
|
||||
@@ -7,3 +7,4 @@ 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
|
||||
|
||||
@@ -53,17 +53,6 @@ void seaboard_pinmux_init(void);
|
||||
void trimslice_pinmux_init(void);
|
||||
void ventana_pinmux_init(void);
|
||||
|
||||
static const struct of_device_id tegra_dt_irq_match[] __initconst = {
|
||||
{ .compatible = "arm,cortex-a9-gic", .data = gic_of_init },
|
||||
{ }
|
||||
};
|
||||
|
||||
void __init tegra_dt_init_irq(void)
|
||||
{
|
||||
tegra_init_irq();
|
||||
of_irq_init(tegra_dt_irq_match);
|
||||
}
|
||||
|
||||
struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
|
||||
OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC1_BASE, "sdhci-tegra.0", NULL),
|
||||
OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC2_BASE, "sdhci-tegra.1", NULL),
|
||||
@@ -139,7 +128,7 @@ static void __init tegra_dt_init(void)
|
||||
"Unknown platform! Pinmuxing not initialized\n");
|
||||
}
|
||||
|
||||
static const char * tegra_dt_board_compat[] = {
|
||||
static const char *tegra20_dt_board_compat[] = {
|
||||
"compulab,trimslice",
|
||||
"nvidia,harmony",
|
||||
"compal,paz00",
|
||||
@@ -148,12 +137,12 @@ static const char * tegra_dt_board_compat[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
DT_MACHINE_START(TEGRA_DT, "nVidia Tegra (Flattened Device Tree)")
|
||||
DT_MACHINE_START(TEGRA_DT, "nVidia Tegra20 (Flattened Device Tree)")
|
||||
.map_io = tegra_map_common_io,
|
||||
.init_early = tegra_init_early,
|
||||
.init_early = tegra20_init_early,
|
||||
.init_irq = tegra_dt_init_irq,
|
||||
.handle_irq = gic_handle_irq,
|
||||
.timer = &tegra_timer,
|
||||
.init_machine = tegra_dt_init,
|
||||
.dt_compat = tegra_dt_board_compat,
|
||||
.dt_compat = tegra20_dt_board_compat,
|
||||
MACHINE_END
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* arch/arm/mach-tegra/board-dt-tegra30.c
|
||||
*
|
||||
* NVIDIA Tegra30 device tree board support
|
||||
*
|
||||
* Copyright (C) 2011 NVIDIA Corporation
|
||||
*
|
||||
* Derived from:
|
||||
*
|
||||
* arch/arm/mach-tegra/board-dt-tegra20.c
|
||||
*
|
||||
* Copyright (C) 2010 Secret Lab Technologies, Ltd.
|
||||
* Copyright (C) 2010 Google, Inc.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_fdt.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_platform.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/hardware/gic.h>
|
||||
|
||||
#include "board.h"
|
||||
|
||||
static struct of_device_id tegra_dt_match_table[] __initdata = {
|
||||
{ .compatible = "simple-bus", },
|
||||
{}
|
||||
};
|
||||
|
||||
static void __init tegra30_dt_init(void)
|
||||
{
|
||||
of_platform_populate(NULL, tegra_dt_match_table,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
static const char *tegra30_dt_board_compat[] = {
|
||||
"nvidia,cardhu",
|
||||
NULL
|
||||
};
|
||||
|
||||
DT_MACHINE_START(TEGRA30_DT, "NVIDIA Tegra30 (Flattened Device Tree)")
|
||||
.map_io = tegra_map_common_io,
|
||||
.init_early = tegra30_init_early,
|
||||
.init_irq = tegra_dt_init_irq,
|
||||
.handle_irq = gic_handle_irq,
|
||||
.timer = &tegra_timer,
|
||||
.init_machine = tegra30_dt_init,
|
||||
.restart = tegra_assert_system_reset,
|
||||
.dt_compat = tegra30_dt_board_compat,
|
||||
MACHINE_END
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include <mach/pinmux.h>
|
||||
#include <mach/pinmux-tegra20.h>
|
||||
#include "board.h"
|
||||
#include "board-harmony.h"
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <linux/of.h>
|
||||
|
||||
#include <mach/pinmux.h>
|
||||
#include <mach/pinmux-tegra20.h>
|
||||
|
||||
#include "gpio-names.h"
|
||||
#include "board-harmony.h"
|
||||
|
||||
@@ -186,7 +186,7 @@ MACHINE_START(HARMONY, "harmony")
|
||||
.atag_offset = 0x100,
|
||||
.fixup = tegra_harmony_fixup,
|
||||
.map_io = tegra_map_common_io,
|
||||
.init_early = tegra_init_early,
|
||||
.init_early = tegra20_init_early,
|
||||
.init_irq = tegra_init_irq,
|
||||
.handle_irq = gic_handle_irq,
|
||||
.timer = &tegra_timer,
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <linux/of.h>
|
||||
|
||||
#include <mach/pinmux.h>
|
||||
#include <mach/pinmux-tegra20.h>
|
||||
|
||||
#include "gpio-names.h"
|
||||
#include "board-paz00.h"
|
||||
|
||||
@@ -189,7 +189,7 @@ MACHINE_START(PAZ00, "Toshiba AC100 / Dynabook AZ")
|
||||
.atag_offset = 0x100,
|
||||
.fixup = tegra_paz00_fixup,
|
||||
.map_io = tegra_map_common_io,
|
||||
.init_early = tegra_init_early,
|
||||
.init_early = tegra20_init_early,
|
||||
.init_irq = tegra_init_irq,
|
||||
.handle_irq = gic_handle_irq,
|
||||
.timer = &tegra_timer,
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <linux/of.h>
|
||||
|
||||
#include <mach/pinmux.h>
|
||||
#include <mach/pinmux-t2.h>
|
||||
#include <mach/pinmux-tegra20.h>
|
||||
|
||||
#include "gpio-names.h"
|
||||
#include "board-seaboard.h"
|
||||
|
||||
@@ -283,7 +283,7 @@ static void __init tegra_wario_init(void)
|
||||
MACHINE_START(SEABOARD, "seaboard")
|
||||
.atag_offset = 0x100,
|
||||
.map_io = tegra_map_common_io,
|
||||
.init_early = tegra_init_early,
|
||||
.init_early = tegra20_init_early,
|
||||
.init_irq = tegra_init_irq,
|
||||
.handle_irq = gic_handle_irq,
|
||||
.timer = &tegra_timer,
|
||||
@@ -293,7 +293,7 @@ MACHINE_END
|
||||
MACHINE_START(KAEN, "kaen")
|
||||
.atag_offset = 0x100,
|
||||
.map_io = tegra_map_common_io,
|
||||
.init_early = tegra_init_early,
|
||||
.init_early = tegra20_init_early,
|
||||
.init_irq = tegra_init_irq,
|
||||
.handle_irq = gic_handle_irq,
|
||||
.timer = &tegra_timer,
|
||||
@@ -303,7 +303,7 @@ MACHINE_END
|
||||
MACHINE_START(WARIO, "wario")
|
||||
.atag_offset = 0x100,
|
||||
.map_io = tegra_map_common_io,
|
||||
.init_early = tegra_init_early,
|
||||
.init_early = tegra20_init_early,
|
||||
.init_irq = tegra_init_irq,
|
||||
.handle_irq = gic_handle_irq,
|
||||
.timer = &tegra_timer,
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <linux/of.h>
|
||||
|
||||
#include <mach/pinmux.h>
|
||||
#include <mach/pinmux-tegra20.h>
|
||||
|
||||
#include "gpio-names.h"
|
||||
#include "board-trimslice.h"
|
||||
|
||||
@@ -175,7 +175,7 @@ MACHINE_START(TRIMSLICE, "trimslice")
|
||||
.atag_offset = 0x100,
|
||||
.fixup = tegra_trimslice_fixup,
|
||||
.map_io = tegra_map_common_io,
|
||||
.init_early = tegra_init_early,
|
||||
.init_early = tegra20_init_early,
|
||||
.init_irq = tegra_init_irq,
|
||||
.handle_irq = gic_handle_irq,
|
||||
.timer = &tegra_timer,
|
||||
|
||||
@@ -25,10 +25,11 @@
|
||||
|
||||
void tegra_assert_system_reset(char mode, const char *cmd);
|
||||
|
||||
void __init tegra_init_early(void);
|
||||
void __init tegra20_init_early(void);
|
||||
void __init tegra30_init_early(void);
|
||||
void __init tegra_map_common_io(void);
|
||||
void __init tegra_init_irq(void);
|
||||
void __init tegra_init_clock(void);
|
||||
void __init tegra_dt_init_irq(void);
|
||||
int __init tegra_pcie_init(bool init_port0, bool init_port1);
|
||||
|
||||
extern struct sys_timer tegra_timer;
|
||||
|
||||
@@ -387,35 +387,18 @@ EXPORT_SYMBOL(tegra_clk_init_from_table);
|
||||
|
||||
void tegra_periph_reset_deassert(struct clk *c)
|
||||
{
|
||||
tegra2_periph_reset_deassert(c);
|
||||
BUG_ON(!c->ops->reset);
|
||||
c->ops->reset(c, false);
|
||||
}
|
||||
EXPORT_SYMBOL(tegra_periph_reset_deassert);
|
||||
|
||||
void tegra_periph_reset_assert(struct clk *c)
|
||||
{
|
||||
tegra2_periph_reset_assert(c);
|
||||
BUG_ON(!c->ops->reset);
|
||||
c->ops->reset(c, true);
|
||||
}
|
||||
EXPORT_SYMBOL(tegra_periph_reset_assert);
|
||||
|
||||
void __init tegra_init_clock(void)
|
||||
{
|
||||
tegra2_init_clocks();
|
||||
}
|
||||
|
||||
/*
|
||||
* The SDMMC controllers have extra bits in the clock source register that
|
||||
* adjust the delay between the clock and data to compenstate for delays
|
||||
* on the PCB.
|
||||
*/
|
||||
void tegra_sdmmc_tap_delay(struct clk *c, int delay)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&c->spinlock, flags);
|
||||
tegra2_sdmmc_tap_delay(c, delay);
|
||||
spin_unlock_irqrestore(&c->spinlock, flags);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
|
||||
static int __clk_lock_all_spinlocks(void)
|
||||
|
||||
@@ -146,15 +146,11 @@ struct tegra_clk_init_table {
|
||||
};
|
||||
|
||||
void tegra2_init_clocks(void);
|
||||
void tegra2_periph_reset_deassert(struct clk *c);
|
||||
void tegra2_periph_reset_assert(struct clk *c);
|
||||
void clk_init(struct clk *clk);
|
||||
struct clk *tegra_get_clock_by_name(const char *name);
|
||||
unsigned long clk_measure_input_freq(void);
|
||||
int clk_reparent(struct clk *c, struct clk *parent);
|
||||
void tegra_clk_init_from_table(struct tegra_clk_init_table *table);
|
||||
unsigned long clk_get_rate_locked(struct clk *c);
|
||||
int clk_set_rate_locked(struct clk *c, unsigned long rate);
|
||||
void tegra2_sdmmc_tap_delay(struct clk *c, int delay);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* arch/arm/mach-tegra/board-harmony.c
|
||||
* arch/arm/mach-tegra/common.c
|
||||
*
|
||||
* Copyright (C) 2010 Google, Inc.
|
||||
*
|
||||
@@ -21,8 +21,10 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/of_irq.h>
|
||||
|
||||
#include <asm/hardware/cache-l2x0.h>
|
||||
#include <asm/hardware/gic.h>
|
||||
|
||||
#include <mach/iomap.h>
|
||||
#include <mach/system.h>
|
||||
@@ -33,18 +35,31 @@
|
||||
|
||||
void (*arch_reset)(char mode, const char *cmd) = tegra_assert_system_reset;
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
static const struct of_device_id tegra_dt_irq_match[] __initconst = {
|
||||
{ .compatible = "arm,cortex-a9-gic", .data = gic_of_init },
|
||||
{ }
|
||||
};
|
||||
|
||||
void __init tegra_dt_init_irq(void)
|
||||
{
|
||||
tegra_init_irq();
|
||||
of_irq_init(tegra_dt_irq_match);
|
||||
}
|
||||
#endif
|
||||
|
||||
void tegra_assert_system_reset(char mode, const char *cmd)
|
||||
{
|
||||
void __iomem *reset = IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x04);
|
||||
void __iomem *reset = IO_ADDRESS(TEGRA_PMC_BASE + 0);
|
||||
u32 reg;
|
||||
|
||||
/* use *_related to avoid spinlock since caches are off */
|
||||
reg = readl_relaxed(reset);
|
||||
reg |= 0x04;
|
||||
reg |= 0x10;
|
||||
writel_relaxed(reg, reset);
|
||||
}
|
||||
|
||||
static __initdata struct tegra_clk_init_table common_clk_init_table[] = {
|
||||
#ifdef CONFIG_ARCH_TEGRA_2x_SOC
|
||||
static __initdata struct tegra_clk_init_table tegra20_clk_init_table[] = {
|
||||
/* name parent rate enabled */
|
||||
{ "clk_m", NULL, 0, true },
|
||||
{ "pll_p", "clk_m", 216000000, true },
|
||||
@@ -60,24 +75,38 @@ static __initdata struct tegra_clk_init_table common_clk_init_table[] = {
|
||||
{ "cpu", NULL, 0, true },
|
||||
{ NULL, NULL, 0, 0},
|
||||
};
|
||||
#endif
|
||||
|
||||
static void __init tegra_init_cache(void)
|
||||
static void __init tegra_init_cache(u32 tag_latency, u32 data_latency)
|
||||
{
|
||||
#ifdef CONFIG_CACHE_L2X0
|
||||
void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000;
|
||||
u32 aux_ctrl, cache_type;
|
||||
|
||||
writel_relaxed(0x331, p + L2X0_TAG_LATENCY_CTRL);
|
||||
writel_relaxed(0x441, p + L2X0_DATA_LATENCY_CTRL);
|
||||
writel_relaxed(tag_latency, p + L2X0_TAG_LATENCY_CTRL);
|
||||
writel_relaxed(data_latency, p + L2X0_DATA_LATENCY_CTRL);
|
||||
|
||||
l2x0_init(p, 0x6C080001, 0x8200c3fe);
|
||||
cache_type = readl(p + L2X0_CACHE_TYPE);
|
||||
aux_ctrl = (cache_type & 0x700) << (17-8);
|
||||
aux_ctrl |= 0x6C000001;
|
||||
|
||||
l2x0_init(p, aux_ctrl, 0x8200c3fe);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void __init tegra_init_early(void)
|
||||
#ifdef CONFIG_ARCH_TEGRA_2x_SOC
|
||||
void __init tegra20_init_early(void)
|
||||
{
|
||||
tegra_init_fuse();
|
||||
tegra_init_clock();
|
||||
tegra_clk_init_from_table(common_clk_init_table);
|
||||
tegra_init_cache();
|
||||
tegra2_init_clocks();
|
||||
tegra_clk_init_from_table(tegra20_clk_init_table);
|
||||
tegra_init_cache(0x331, 0x441);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_TEGRA_3x_SOC
|
||||
void __init tegra30_init_early(void)
|
||||
{
|
||||
tegra_init_cache(0x441, 0x551);
|
||||
}
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user