From ec62c07aab88bf6d620cacf070e857ce5d8b91f4 Mon Sep 17 00:00:00 2001 From: Guillaume GARDET Date: Thu, 20 Nov 2014 08:38:31 +0100 Subject: [PATCH 01/14] imx: mx53loco: Add raw initrd support Signed-off-by: Guillaume GARDET Cc: Stefano Babic Cc: Jason Liu Acked-by: Jason Liu --- include/configs/mx53loco.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h index 10fb1f4901..42bc3c869f 100644 --- a/include/configs/mx53loco.h +++ b/include/configs/mx53loco.h @@ -94,6 +94,7 @@ /* Command definition */ #include #define CONFIG_CMD_BOOTZ +#define CONFIG_SUPPORT_RAW_INITRD #undef CONFIG_CMD_IMLS From d8d160e4205aa2885cfe659102c9555ef0859fae Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Fri, 21 Nov 2014 17:54:42 +0100 Subject: [PATCH 02/14] mxs_ocotp: prevent error path from returning success The code may goto 'fail' upon error with 'ret' variable set to an error code, but this variable was being overwritten by a final preparation function to restore the HCLK, so success was (in general) returned even after an error was hit previously. With this change, the function may now return success even if the final preparation function fails, but it's probably enough to print a message because (if successful) the real programming of the fuses has already completed. Signed-off-by: Hector Palacios --- drivers/misc/mxs_ocotp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/misc/mxs_ocotp.c b/drivers/misc/mxs_ocotp.c index 545d3ebf52..09002814f2 100644 --- a/drivers/misc/mxs_ocotp.c +++ b/drivers/misc/mxs_ocotp.c @@ -223,11 +223,8 @@ static int mxs_ocotp_write_fuse(uint32_t addr, uint32_t mask) fail: mxs_ocotp_scale_vddio(0, &vddio_val); - ret = mxs_ocotp_scale_hclk(0, &hclk_val); - if (ret) { + if (mxs_ocotp_scale_hclk(0, &hclk_val)) puts("Failed scaling up the HCLK!\n"); - return ret; - } return ret; } From ad5dd7ae4b0474b8e359c691cddb310940276695 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Fri, 21 Nov 2014 17:54:43 +0100 Subject: [PATCH 03/14] mxs_ocotp: check for errors from the OTP controller after writing The write operation may fail when trying to write to a locked area. In this case the ERROR bit is set in the CTRL register. Check for that condition and return an error. Signed-off-by: Hector Palacios Reviewed-by: Fabio Estevam --- drivers/misc/mxs_ocotp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/misc/mxs_ocotp.c b/drivers/misc/mxs_ocotp.c index 09002814f2..1659ee6a5e 100644 --- a/drivers/misc/mxs_ocotp.c +++ b/drivers/misc/mxs_ocotp.c @@ -221,6 +221,13 @@ static int mxs_ocotp_write_fuse(uint32_t addr, uint32_t mask) goto fail; } + /* Check for errors */ + if (readl(&ocotp_regs->hw_ocotp_ctrl) & OCOTP_CTRL_ERROR) { + puts("Failed writing fuses!\n"); + ret = -EPERM; + goto fail; + } + fail: mxs_ocotp_scale_vddio(0, &vddio_val); if (mxs_ocotp_scale_hclk(0, &hclk_val)) From 3d99fcbc159915405a77e8bd5d719ba446137875 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Fri, 21 Nov 2014 17:54:44 +0100 Subject: [PATCH 04/14] mxs_ocotp: clear the error flag before initiating write operation A previous operation may have set the error flag, which must be cleared before a new write operation can be issued. Signed-off-by: Hector Palacios --- drivers/misc/mxs_ocotp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/mxs_ocotp.c b/drivers/misc/mxs_ocotp.c index 1659ee6a5e..6f0a1d3e6d 100644 --- a/drivers/misc/mxs_ocotp.c +++ b/drivers/misc/mxs_ocotp.c @@ -187,6 +187,8 @@ static int mxs_ocotp_write_fuse(uint32_t addr, uint32_t mask) uint32_t hclk_val, vddio_val; int ret; + mxs_ocotp_clear_error(); + /* Make sure the banks are closed for reading. */ ret = mxs_ocotp_read_bank_open(0); if (ret) { From 7267c925b3817478c9ccd0c4a1286ff81f7859f9 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 24 Nov 2014 12:24:15 -0200 Subject: [PATCH 05/14] thermal: imx_thermal: Do not display calibration data Printing the calibration data on every boot does not provide really useful information: U-Boot 2015.01-rc1-18266-ge7eb277 (Nov 24 2014 - 11:29:51) CPU: Freescale i.MX6Q rev1.2 at 792 MHz CPU: Thermal calibration data: 0x5d85067d CPU: Temperature 33 C Reset cause: POR Board: MX6-SabreSD Do not display the calibration data in order to have a cleaner boot log. Signed-off-by: Fabio Estevam --- drivers/thermal/imx_thermal.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index 116158511d..0bd9cfd030 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -156,8 +156,6 @@ static int imx_thermal_probe(struct udevice *dev) if (fuse == 0 || fuse == ~0) { printf("CPU: Thermal invalid data, fuse: 0x%x\n", fuse); return -EPERM; - } else { - printf("CPU: Thermal calibration data: 0x%x\n", fuse); } *priv = fuse; From 4b16fd228673a027ab122e33819695e9b7c73dd3 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Tue, 25 Nov 2014 13:11:07 -0200 Subject: [PATCH 06/14] mx6sxsabresd: Add thermal support Add thermal support so that the temperature of the chip can be displayed on boot: U-Boot 2015.01-rc1-18268-g1366c05-dirty (Nov 25 2014 - 13:02:42) CPU: Freescale i.MX6SX rev1.0 at 792 MHz CPU: Temperature 50 C Signed-off-by: Fabio Estevam --- include/configs/mx6sxsabresd.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/configs/mx6sxsabresd.h b/include/configs/mx6sxsabresd.h index d8ab2917ea..5e0edabf37 100644 --- a/include/configs/mx6sxsabresd.h +++ b/include/configs/mx6sxsabresd.h @@ -208,6 +208,16 @@ #define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(2, 1) #endif +#define CONFIG_DM +#define CONFIG_DM_THERMAL +#define CONFIG_SYS_MALLOC_F_LEN (1 << 10) +#define CONFIG_IMX6_THERMAL + +#define CONFIG_CMD_FUSE +#if defined(CONFIG_CMD_FUSE) || defined(CONFIG_IMX6_THERMAL) +#define CONFIG_MXC_OCOTP +#endif + /* FLASH and environment organization */ #define CONFIG_SYS_NO_FLASH From a847fff11cc4f3745d0087d45d2e5964c47f55d2 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Tue, 25 Nov 2014 13:11:08 -0200 Subject: [PATCH 07/14] mxc_ocotp: Do not disable the OCOTP clock after every access MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Leave the OCOTP turned on, so that we subsequent access do not fail. After enabling the thermal driver on a mx6sxsabresd board: U-Boot 2015.01-rc1-18267-g99d4189-dirty (Nov 24 2014 - 12:59:01) CPU: Freescale i.MX6SX rev1.0 at 792 MHz CPU: Temperature 48 C Reset cause: POR Board: MX6SX SABRE SDB I2C: ready DRAM: 1 GiB PMIC: PFUZE100 ID=0x10 MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2 00:01.0 - 16c3:abcd - Bridge device 01:00.0 - 8086:08b1 - Network controller In: serial Out: serial Err: serial Net: (hang) As the thermal driver accesses the ocotp registers, its clock will be disabled afterwards. Then when the MAC address is read (also from ocotp registers) it will cause a hang. Do not disable the ocotp clock to prevent this problem. Signed-off-by: Fabio Estevam Reviewed-by: Benoît Thébaudeau --- drivers/misc/mxc_ocotp.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/misc/mxc_ocotp.c b/drivers/misc/mxc_ocotp.c index 89737af9b7..d92044eeda 100644 --- a/drivers/misc/mxc_ocotp.c +++ b/drivers/misc/mxc_ocotp.c @@ -81,8 +81,6 @@ static int finish_access(struct ocotp_regs *regs, const char *caller) err = !!(readl(®s->ctrl) & BM_CTRL_ERROR); clear_error(regs); - enable_ocotp_clk(0); - if (err) { printf("mxc_ocotp %s(): Access protect error\n", caller); return -EIO; From f8bbd7f7b0c6eb3accc30deab9aafb2c50f9ee9a Mon Sep 17 00:00:00 2001 From: Soeren Moch Date: Wed, 26 Nov 2014 12:39:24 +0100 Subject: [PATCH 08/14] tbs2910: fix Kconfig fix Kconfig for tbs2910 board to prevent crash on relocation Signed-off-by: Soeren Moch --- arch/arm/Kconfig | 1 + board/tbs/tbs2910/Kconfig | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index b9ac59e1a4..be703af356 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -650,6 +650,7 @@ config TARGET_KOSAGI_NOVENA config TARGET_TBS2910 bool "Support tbs2910" + select CPU_V7 config TARGET_TQMA6 bool "TQ Systems TQMa6 board" diff --git a/board/tbs/tbs2910/Kconfig b/board/tbs/tbs2910/Kconfig index c514e24fa1..84b243e352 100644 --- a/board/tbs/tbs2910/Kconfig +++ b/board/tbs/tbs2910/Kconfig @@ -1,23 +1,15 @@ if TARGET_TBS2910 -config SYS_CPU - string - default "armv7" - config SYS_BOARD - string default "tbs2910" config SYS_VENDOR - string default "tbs" config SYS_SOC - string default "mx6" config SYS_CONFIG_NAME - string default "tbs2910" endif From dd1c8f1b5fb63a682fce62a53464108d8587b0a2 Mon Sep 17 00:00:00 2001 From: Soeren Moch Date: Thu, 27 Nov 2014 10:11:41 +0100 Subject: [PATCH 09/14] sata: fix reset_sata for dwc_ahsata - fix crash when sata device is not initialized - remove disable_sata_clock() since it is not clear which clock for which device should be disabled here - call disable_sata_clock() for mx6 in preboot_os instead Signed-off-by: Soeren Moch Acked-by: Nikita Kiryanov Tested-by: Nikita Kiryanov --- arch/arm/imx-common/cpu.c | 3 +++ drivers/block/dwc_ahsata.c | 14 ++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c index b58df7da6f..28ccd29594 100644 --- a/arch/arm/imx-common/cpu.c +++ b/arch/arm/imx-common/cpu.c @@ -206,6 +206,9 @@ void arch_preboot_os(void) { #if defined(CONFIG_CMD_SATA) sata_stop(); +#if defined(CONFIG_MX6) + disable_sata_clock(); +#endif #endif #if defined(CONFIG_VIDEO_IPUV3) /* disable video before launching O/S */ diff --git a/drivers/block/dwc_ahsata.c b/drivers/block/dwc_ahsata.c index 9a2b547af2..01a4148a52 100644 --- a/drivers/block/dwc_ahsata.c +++ b/drivers/block/dwc_ahsata.c @@ -594,22 +594,24 @@ int init_sata(int dev) int reset_sata(int dev) { - struct ahci_probe_ent *probe_ent = - (struct ahci_probe_ent *)sata_dev_desc[dev].priv; - struct sata_host_regs *host_mmio = - (struct sata_host_regs *)probe_ent->mmio_base; + struct ahci_probe_ent *probe_ent; + struct sata_host_regs *host_mmio; if (dev < 0 || dev > (CONFIG_SYS_SATA_MAX_DEVICE - 1)) { printf("The sata index %d is out of ranges\n\r", dev); return -1; } + probe_ent = (struct ahci_probe_ent *)sata_dev_desc[dev].priv; + if (NULL == probe_ent) + /* not initialized, so nothing to reset */ + return 0; + + host_mmio = (struct sata_host_regs *)probe_ent->mmio_base; setbits_le32(&host_mmio->ghc, SATA_HOST_GHC_HR); while (readl(&host_mmio->ghc) & SATA_HOST_GHC_HR) udelay(100); - disable_sata_clock(); - return 0; } From 7731745c139a4e8591cde93174c1be3277f0b94b Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Thu, 27 Nov 2014 13:46:43 +0100 Subject: [PATCH 10/14] arm: mx6: Change defines ENET_xxMHz to ENET_xxMHZ (no CamelCase) As checkpatch complaines about these camel-case defines, lets change them to only use upper-case characters. Signed-off-by: Stefan Roese Acked-by: Heiko Schocher Cc: Fabio Estevam Cc: Jon Nettleton Cc: Stefano Babic Reviewed-by: Fabio Estevam --- arch/arm/cpu/armv7/mx6/clock.c | 2 +- arch/arm/include/asm/arch-mx6/clock.h | 8 ++++---- board/aristainetos/aristainetos.c | 2 +- board/freescale/mx6slevk/mx6slevk.c | 2 +- board/freescale/mx6sxsabresd/mx6sxsabresd.c | 2 +- board/solidrun/hummingboard/hummingboard.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c index ab7ac3d703..93a02adcec 100644 --- a/arch/arm/cpu/armv7/mx6/clock.c +++ b/arch/arm/cpu/armv7/mx6/clock.c @@ -443,7 +443,7 @@ int enable_fec_anatop_clock(enum enet_freq freq) struct anatop_regs __iomem *anatop = (struct anatop_regs __iomem *)ANATOP_BASE_ADDR; - if (freq < ENET_25MHz || freq > ENET_125MHz) + if (freq < ENET_25MHZ || freq > ENET_125MHZ) return -EINVAL; reg = readl(&anatop->pll_enet); diff --git a/arch/arm/include/asm/arch-mx6/clock.h b/arch/arm/include/asm/arch-mx6/clock.h index 323805c75c..226a4cde17 100644 --- a/arch/arm/include/asm/arch-mx6/clock.h +++ b/arch/arm/include/asm/arch-mx6/clock.h @@ -43,10 +43,10 @@ enum mxc_clock { }; enum enet_freq { - ENET_25MHz, - ENET_50MHz, - ENET_100MHz, - ENET_125MHz, + ENET_25MHZ, + ENET_50MHZ, + ENET_100MHZ, + ENET_125MHZ, }; u32 imx_get_uartclk(void); diff --git a/board/aristainetos/aristainetos.c b/board/aristainetos/aristainetos.c index 06922c0020..67ac260055 100644 --- a/board/aristainetos/aristainetos.c +++ b/board/aristainetos/aristainetos.c @@ -301,7 +301,7 @@ int board_eth_init(bd_t *bis) /* clear gpr1[14], gpr1[18:17] to select anatop clock */ clrsetbits_le32(&iomuxc_regs->gpr[1], IOMUX_GPR1_FEC_MASK, 0); - ret = enable_fec_anatop_clock(ENET_50MHz); + ret = enable_fec_anatop_clock(ENET_50MHZ); if (ret) return ret; diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c index 8111edf804..cac6d73a7f 100644 --- a/board/freescale/mx6slevk/mx6slevk.c +++ b/board/freescale/mx6slevk/mx6slevk.c @@ -234,7 +234,7 @@ static int setup_fec(void) /* clear gpr1[14], gpr1[18:17] to select anatop clock */ clrsetbits_le32(&iomuxc_regs->gpr[1], IOMUX_GPR1_FEC_MASK, 0); - return enable_fec_anatop_clock(ENET_50MHz); + return enable_fec_anatop_clock(ENET_50MHZ); } #endif diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c index 7aee074a87..8b959b9fc6 100644 --- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c +++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c @@ -168,7 +168,7 @@ static int setup_fec(void) reg |= BM_ANADIG_PLL_ENET_REF_25M_ENABLE; writel(reg, &anatop->pll_enet); - return enable_fec_anatop_clock(ENET_125MHz); + return enable_fec_anatop_clock(ENET_125MHZ); } int board_eth_init(bd_t *bis) diff --git a/board/solidrun/hummingboard/hummingboard.c b/board/solidrun/hummingboard/hummingboard.c index 6d204b343e..52c384bdd4 100644 --- a/board/solidrun/hummingboard/hummingboard.c +++ b/board/solidrun/hummingboard/hummingboard.c @@ -146,7 +146,7 @@ int board_eth_init(bd_t *bis) { struct iomuxc *const iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR; - int ret = enable_fec_anatop_clock(ENET_25MHz); + int ret = enable_fec_anatop_clock(ENET_25MHZ); if (ret) return ret; From daa12e3f22b4928263684a89c0f0b31f3571c8a5 Mon Sep 17 00:00:00 2001 From: Soeren Moch Date: Thu, 27 Nov 2014 21:21:44 +0100 Subject: [PATCH 11/14] tbs2910: fix lost characters on serial input With enabled console_mux for serial input and usb keyboard sometimes characters get lost when typing too fast at the serial input (pasting strings in serial console window). Fix this by using INT_QUEUE for polling the usb keyboard. Signed-off-by: Soeren Moch --- include/configs/tbs2910.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h index 6ab2184418..c097b98575 100644 --- a/include/configs/tbs2910.h +++ b/include/configs/tbs2910.h @@ -167,7 +167,7 @@ #define CONFIG_USB_STORAGE #define CONFIG_USB_KEYBOARD #ifdef CONFIG_USB_KEYBOARD -#define CONFIG_SYS_USB_EVENT_POLL +#define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE #define CONFIG_SYS_STDIO_DEREGISTER #define CONFIG_PREBOOT "if hdmidet; then usb start; fi" #endif /* CONFIG_USB_KEYBOARD */ From 31cc2c85dc38429e2558dbf1a42e18480e8e9ba6 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Thu, 27 Nov 2014 20:41:44 -0200 Subject: [PATCH 12/14] config_fallbacks: Add a default entry for CONFIG_SYS_PBSIZE Entering the maximum number of characters defined by CONFIG_SYS_CBSIZE into the console and hitting enter afterwards, causes a hang in the system because CONFIG_SYS_PBSIZE is not capable of storing the characters of the error message: "Unknown command '' - try 'help'". Provide a default size for CONFIG_SYS_PBSIZE so that it can store the error message and allows the error message to be printed correctly with no hang. Signed-off-by: Fabio Estevam --- include/config_fallbacks.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h index 7d8daa2b8e..508db5626b 100644 --- a/include/config_fallbacks.h +++ b/include/config_fallbacks.h @@ -79,6 +79,10 @@ #define CONFIG_SYS_PROMPT "=> " #endif +#ifndef CONFIG_SYS_PBSIZE +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + 128) +#endif + #ifndef CONFIG_FIT_SIGNATURE #define CONFIG_IMAGE_FORMAT_LEGACY #endif From 16159be761c2f8f2a3c33e307e5fc9865191e3da Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Thu, 27 Nov 2014 20:41:45 -0200 Subject: [PATCH 13/14] mx6sabre_common: Use the default CONFIG_SYS_PBSIZE Entering the maximum number of characters defined by CONFIG_SYS_CBSIZE into the console and hitting enter afterwards, causes a hang in the system because CONFIG_SYS_PBSIZE is not capable of storing the characters of the error message: "Unknown command '' - try 'help'". Use the default CONFIG_SYS_PBSIZE definition from config_fallbacks.h to solve this problem. Signed-off-by: Fabio Estevam --- include/configs/mx6sabre_common.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h index 9fdd8410a4..f0f721e9b7 100644 --- a/include/configs/mx6sabre_common.h +++ b/include/configs/mx6sabre_common.h @@ -220,9 +220,6 @@ #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " #define CONFIG_AUTO_COMPLETE #define CONFIG_SYS_CBSIZE 256 - -/* Print Buffer Size */ -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) #define CONFIG_SYS_MAXARGS 16 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE From 9e89a64fbd0ddfde17741b38cc95fbdc02679d86 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 27 Nov 2014 23:58:20 +0100 Subject: [PATCH 14/14] arm: vf610: improve evaluation of reset source Improve the evaluation of the reset source. Bit description according to latest reference manual rev. 7. Signed-off-by: Stefan Agner --- arch/arm/cpu/armv7/vf610/generic.c | 21 +++++++++++---------- arch/arm/include/asm/arch-vf610/imx-regs.h | 8 ++++++++ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c index a26d63ebe0..92aaad9415 100644 --- a/arch/arm/cpu/armv7/vf610/generic.c +++ b/arch/arm/cpu/armv7/vf610/generic.c @@ -265,20 +265,21 @@ static char *get_reset_cause(void) cause = readl(&src_regs->srsr); writel(cause, &src_regs->srsr); - cause &= 0xff; - switch (cause) { - case 0x08: - return "WDOG"; - case 0x20: + if (cause & SRC_SRSR_POR_RST) + return "POWER ON RESET"; + else if (cause & SRC_SRSR_WDOG_A5) + return "WDOG A5"; + else if (cause & SRC_SRSR_WDOG_M4) + return "WDOG M4"; + else if (cause & SRC_SRSR_JTAG_RST) return "JTAG HIGH-Z"; - case 0x80: + else if (cause & SRC_SRSR_SW_RST) + return "SW RESET"; + else if (cause & SRC_SRSR_RESETB) return "EXTERNAL RESET"; - case 0xfd: - return "POR"; - default: + else return "unknown reset"; - } } int print_cpuinfo(void) diff --git a/arch/arm/include/asm/arch-vf610/imx-regs.h b/arch/arm/include/asm/arch-vf610/imx-regs.h index 9d797dbe1f..6b10bdf961 100644 --- a/arch/arm/include/asm/arch-vf610/imx-regs.h +++ b/arch/arm/include/asm/arch-vf610/imx-regs.h @@ -256,6 +256,14 @@ #define DDRMC_CR161_TODTH_RD(v) (((v) & 0xf) << 8) #define DDRMC_CR161_TODTH_WR(v) ((v) & 0xf) +/* System Reset Controller (SRC) */ +#define SRC_SRSR_SW_RST (0x1 << 18) +#define SRC_SRSR_RESETB (0x1 << 7) +#define SRC_SRSR_JTAG_RST (0x1 << 5) +#define SRC_SRSR_WDOG_M4 (0x1 << 4) +#define SRC_SRSR_WDOG_A5 (0x1 << 3) +#define SRC_SRSR_POR_RST (0x1 << 0) + #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__)) #include