diff options
author | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2013-02-02 19:29:59 +0100 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2013-02-02 19:29:59 +0100 |
commit | e5f5c4a977c411c0cd3899a4f9487eea77a0e150 (patch) | |
tree | 391225b279509f4403eb6d5e973f0b25e789a8af /arch/arm/cpu/arm926ejs/mxs/mxs.c | |
parent | 7cb70a34b976e68f6348ea0718780e8f38901482 (diff) | |
parent | 81ca840976e8e418ae8decaf03ea01f59b1b5be2 (diff) | |
download | u-boot-imx-e5f5c4a977c411c0cd3899a4f9487eea77a0e150.zip u-boot-imx-e5f5c4a977c411c0cd3899a4f9487eea77a0e150.tar.gz u-boot-imx-e5f5c4a977c411c0cd3899a4f9487eea77a0e150.tar.bz2 |
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Diffstat (limited to 'arch/arm/cpu/arm926ejs/mxs/mxs.c')
-rw-r--r-- | arch/arm/cpu/arm926ejs/mxs/mxs.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c index 6ce8019..e2b4196 100644 --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c @@ -1,5 +1,5 @@ /* - * Freescale i.MX28 common code + * Freescale i.MX23/i.MX28 common code * * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com> * on behalf of DENX Software Engineering GmbH @@ -35,6 +35,7 @@ #include <asm/arch/iomux.h> #include <asm/arch/imx-regs.h> #include <asm/arch/sys_proto.h> +#include <linux/compiler.h> DECLARE_GLOBAL_DATA_PTR; @@ -196,6 +197,8 @@ static const char *get_cpu_type(void) (struct mxs_digctl_regs *)MXS_DIGCTL_BASE; switch (readl(&digctl_regs->hw_digctl_chipid) & HW_DIGCTL_CHIPID_MASK) { + case HW_DIGCTL_CHIPID_MX23: + return "23"; case HW_DIGCTL_CHIPID_MX28: return "28"; default: @@ -210,6 +213,21 @@ static const char *get_cpu_rev(void) uint8_t rev = readl(&digctl_regs->hw_digctl_chipid) & 0x000000FF; switch (readl(&digctl_regs->hw_digctl_chipid) & HW_DIGCTL_CHIPID_MASK) { + case HW_DIGCTL_CHIPID_MX23: + switch (rev) { + case 0x0: + return "1.0"; + case 0x1: + return "1.1"; + case 0x2: + return "1.2"; + case 0x3: + return "1.3"; + case 0x4: + return "1.4"; + default: + return "??"; + } case HW_DIGCTL_CHIPID_MX28: switch (rev) { case 0x1: @@ -276,7 +294,7 @@ int cpu_eth_init(bd_t *bis) } #endif -static void __mx28_adjust_mac(int dev_id, unsigned char *mac) +__weak void mx28_adjust_mac(int dev_id, unsigned char *mac) { mac[0] = 0x00; mac[1] = 0x04; /* Use FSL vendor MAC address by default */ @@ -285,9 +303,6 @@ static void __mx28_adjust_mac(int dev_id, unsigned char *mac) mac[5] += 1; } -void mx28_adjust_mac(int dev_id, unsigned char *mac) - __attribute__((weak, alias("__mx28_adjust_mac"))); - #ifdef CONFIG_MX28_FEC_MAC_IN_OCOTP #define MXS_OCOTP_MAX_TIMEOUT 1000000 |