Skip to content

Commit

Permalink
Merge branch 'for-5.16/soc' into for-5.16/cpuidle
Browse files Browse the repository at this point in the history
  • Loading branch information
Thierry Reding committed Oct 5, 2021
2 parents f083c4b + 0d7281b commit a602aff
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 7 deletions.
31 changes: 26 additions & 5 deletions include/soc/tegra/fuse.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#ifndef __SOC_TEGRA_FUSE_H__
#define __SOC_TEGRA_FUSE_H__

#include <linux/types.h>

#define TEGRA20 0x20
#define TEGRA30 0x30
#define TEGRA114 0x35
Expand All @@ -22,11 +24,6 @@

#ifndef __ASSEMBLY__

u32 tegra_read_chipid(void);
u8 tegra_get_chip_id(void);
u8 tegra_get_platform(void);
bool tegra_is_silicon(void);

enum tegra_revision {
TEGRA_REVISION_UNKNOWN = 0,
TEGRA_REVISION_A01,
Expand Down Expand Up @@ -57,6 +54,10 @@ extern struct tegra_sku_info tegra_sku_info;
u32 tegra_read_straps(void);
u32 tegra_read_ram_code(void);
int tegra_fuse_readl(unsigned long offset, u32 *value);
u32 tegra_read_chipid(void);
u8 tegra_get_chip_id(void);
u8 tegra_get_platform(void);
bool tegra_is_silicon(void);
#else
static struct tegra_sku_info tegra_sku_info __maybe_unused;

Expand All @@ -74,6 +75,26 @@ static inline int tegra_fuse_readl(unsigned long offset, u32 *value)
{
return -ENODEV;
}

static inline u32 tegra_read_chipid(void)
{
return 0;
}

static inline u8 tegra_get_chip_id(void)
{
return 0;
}

static inline u8 tegra_get_platform(void)
{
return 0;
}

static inline bool tegra_is_silicon(void)
{
return false;
}
#endif

struct device *tegra_soc_device_register(void);
Expand Down
9 changes: 8 additions & 1 deletion include/soc/tegra/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@
#ifndef __SOC_TEGRA_IRQ_H
#define __SOC_TEGRA_IRQ_H

#if defined(CONFIG_ARM)
#include <linux/types.h>

#if defined(CONFIG_ARM) && defined(CONFIG_ARCH_TEGRA)
bool tegra_pending_sgi(void);
#else
static inline bool tegra_pending_sgi(void)
{
return false;
}
#endif

#endif /* __SOC_TEGRA_IRQ_H */
2 changes: 1 addition & 1 deletion include/soc/tegra/pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ enum tegra_suspend_mode {
TEGRA_SUSPEND_NOT_READY,
};

#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_ARM)
#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_ARM) && defined(CONFIG_ARCH_TEGRA)
enum tegra_suspend_mode
tegra_pm_validate_suspend_mode(enum tegra_suspend_mode mode);

Expand Down

0 comments on commit a602aff

Please sign in to comment.