Skip to content

Commit

Permalink
ARM: imx: add soc revision helper functions
Browse files Browse the repository at this point in the history
Similar to what we do for cpu type, the patch adds helper functions
imx_set_soc_revision() and imx_get_soc_revision() to maintain
imx_soc_revision in cpu.c.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
  • Loading branch information
Shawn Guo committed Oct 21, 2013
1 parent c7c3eac commit bfefdff
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm/mach-imx/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ extern int imx6q_revision(void);
extern int mx53_display_revision(void);
extern void imx_set_aips(void __iomem *);
extern int mxc_device_init(void);
void imx_set_soc_revision(unsigned int rev);
unsigned int imx_get_soc_revision(void);

enum mxc_cpu_pwr_mode {
WAIT_CLOCKED, /* wfi only */
Expand Down
12 changes: 12 additions & 0 deletions arch/arm/mach-imx/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,23 @@
unsigned int __mxc_cpu_type;
EXPORT_SYMBOL(__mxc_cpu_type);

static unsigned int imx_soc_revision;

void mxc_set_cpu_type(unsigned int type)
{
__mxc_cpu_type = type;
}

void imx_set_soc_revision(unsigned int rev)
{
imx_soc_revision = rev;
}

unsigned int imx_get_soc_revision(void)
{
return imx_soc_revision;
}

void imx_print_silicon_rev(const char *cpu, int srev)
{
if (srev == IMX_CHIP_REVISION_UNKNOWN)
Expand Down

0 comments on commit bfefdff

Please sign in to comment.