summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/gpio/mxc_gpio.c6
-rw-r--r--include/configs/mx6sxsabreauto.h30
-rw-r--r--include/configs/mx6sxsabresd.h12
-rw-r--r--include/configs/mx7dsabresd.h11
4 files changed, 50 insertions, 9 deletions
diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
index 6efe031..3631803 100644
--- a/drivers/gpio/mxc_gpio.c
+++ b/drivers/gpio/mxc_gpio.c
@@ -17,7 +17,7 @@
#include <asm/gpio.h>
#include <asm/io.h>
#include <errno.h>
-#ifdef CONFIG_MXC_RDC
+#ifdef CONFIG_IMX_RDC
#include <asm/imx-common/rdc-sema.h>
#include <asm/arch/imx-rdc.h>
#endif
@@ -65,7 +65,7 @@ static unsigned long gpio_ports[] = {
#endif
};
-#ifdef CONFIG_MXC_RDC
+#ifdef CONFIG_IMX_RDC
static unsigned int gpio_rdc[] = {
RDC_PER_GPIO1,
RDC_PER_GPIO2,
@@ -76,7 +76,7 @@ static unsigned int gpio_rdc[] = {
RDC_PER_GPIO7,
};
-#define RDC_CHECK(x) imx_rdc_check_permission(gpio_rdc[x])
+#define RDC_CHECK(x) imx_rdc_check_permission(gpio_rdc[x], 0)
#define RDC_SPINLOCK_UP(x) imx_rdc_sema_lock(gpio_rdc[x])
#define RDC_SPINLOCK_DOWN(x) imx_rdc_sema_unlock(gpio_rdc[x])
#else
diff --git a/include/configs/mx6sxsabreauto.h b/include/configs/mx6sxsabreauto.h
index 651472e..240e1ac 100644
--- a/include/configs/mx6sxsabreauto.h
+++ b/include/configs/mx6sxsabreauto.h
@@ -39,6 +39,30 @@
#define CONFIG_MFG_NAND_PARTITION ""
#endif
+#define CONFIG_SYS_AUXCORE_BOOTDATA 0x68000000 /* Set to QSPI1 B flash at default */
+#ifndef CONFIG_SYS_AUXCORE_FASTUP
+#define CONFIG_IMX_BOOTAUX /* Boot M4 by command, disable this when M4 fast up */
+#endif
+
+#ifdef CONFIG_IMX_BOOTAUX
+#define UPDATE_M4_ENV \
+ "m4image=m4_qspi.bin\0" \
+ "loadm4image=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4image}\0" \
+ "update_m4_from_sd=" \
+ "if sf probe 1:0; then " \
+ "if run loadm4image; then " \
+ "setexpr fw_sz ${filesize} + 0xffff; " \
+ "setexpr fw_sz ${fw_sz} / 0x10000; " \
+ "setexpr fw_sz ${fw_sz} * 0x10000; " \
+ "sf erase 0x0 ${fw_sz}; " \
+ "sf write ${loadaddr} 0x0 ${filesize}; " \
+ "fi; " \
+ "fi\0" \
+ "m4boot=sf probe 1:0; bootaux "__stringify(CONFIG_SYS_AUXCORE_BOOTDATA)"\0"
+#else
+#define UPDATE_M4_ENV ""
+#endif
+
#define CONFIG_MFG_ENV_SETTINGS \
"mfgtool_args=setenv bootargs console=${console},${baudrate} " \
"rdinit=/linuxrc " \
@@ -68,6 +92,7 @@
#else
#define CONFIG_EXTRA_ENV_SETTINGS \
+ UPDATE_M4_ENV \
CONFIG_MFG_ENV_SETTINGS \
"script=boot.scr\0" \
"image=zImage\0" \
@@ -165,7 +190,10 @@
#define CONFIG_SYS_INIT_SP_ADDR \
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
-#if defined CONFIG_SYS_BOOT_QSPI
+#ifdef CONFIG_SYS_AUXCORE_FASTUP
+/*#define CONFIG_IMX_RDC*/ /* Disable the RDC temporarily, will enable it in future */
+#define CONFIG_ENV_IS_IN_MMC /* Must disable QSPI driver, because M4 run on QSPI */
+#elif defined CONFIG_SYS_BOOT_QSPI
#define CONFIG_ENV_IS_IN_SPI_FLASH
#elif defined CONFIG_SYS_BOOT_NAND
#define CONFIG_ENV_IS_IN_NAND
diff --git a/include/configs/mx6sxsabresd.h b/include/configs/mx6sxsabresd.h
index 91a0586..a5a843d 100644
--- a/include/configs/mx6sxsabresd.h
+++ b/include/configs/mx6sxsabresd.h
@@ -41,10 +41,13 @@
#define CONFIG_MXC_UART
#define CONFIG_MXC_UART_BASE UART1_BASE
-#ifdef CONFIG_IMX_BOOTAUX
-/* Set to QSPI2 B flash at default */
#define CONFIG_SYS_AUXCORE_BOOTDATA 0x78000000
+#ifndef CONFIG_SYS_AUXCORE_FASTUP
+#define CONFIG_IMX_BOOTAUX
+/* Set to QSPI2 B flash at default */
+#endif
+#ifdef CONFIG_IMX_BOOTAUX
#define UPDATE_M4_ENV \
"m4image=m4_qspi.bin\0" \
"loadm4image=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4image}\0" \
@@ -173,7 +176,10 @@
#define CONFIG_SYS_INIT_SP_ADDR \
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
-#if defined CONFIG_SYS_BOOT_QSPI
+#ifdef CONFIG_SYS_AUXCORE_FASTUP
+/*#define CONFIG_IMX_RDC*/ /* Disable the RDC temporarily, will enable it in future */
+#define CONFIG_ENV_IS_IN_MMC /* Must disable QSPI driver, because M4 run on QSPI */
+#elif defined CONFIG_SYS_BOOT_QSPI
#define CONFIG_FSL_QSPI
#define CONFIG_ENV_IS_IN_SPI_FLASH
#else
diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h
index 7b28b39..3d39854 100644
--- a/include/configs/mx7dsabresd.h
+++ b/include/configs/mx7dsabresd.h
@@ -85,6 +85,7 @@
/* Set to QSPI1 A flash at default */
#define CONFIG_SYS_AUXCORE_BOOTDATA 0x60000000
+#ifdef CONFIG_SYS_USE_QSPI
#define UPDATE_M4_ENV \
"m4image=m4_qspi.bin\0" \
"loadm4image=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4image}\0" \
@@ -94,12 +95,18 @@
"setexpr fw_sz ${filesize} + 0xffff; " \
"setexpr fw_sz ${fw_sz} / 0x10000; " \
"setexpr fw_sz ${fw_sz} * 0x10000; " \
- "sf erase 0x0 ${fw_sz}; " \
- "sf write ${loadaddr} 0x0 ${filesize}; " \
+ "sf erase 0x100000 ${fw_sz}; " \
+ "sf write ${loadaddr} 0x100000 ${filesize}; " \
"fi; " \
"fi\0" \
"m4boot=sf probe 0:0; bootaux "__stringify(CONFIG_SYS_AUXCORE_BOOTDATA)"\0"
#else
+#define UPDATE_M4_ENV \
+ "m4image=m4_qspi.bin\0" \
+ "loadm4image=fatload mmc ${mmcdev}:${mmcpart} "__stringify(CONFIG_SYS_AUXCORE_BOOTDATA)" ${m4image}\0" \
+ "m4boot=run loadm4image; bootaux "__stringify(CONFIG_SYS_AUXCORE_BOOTDATA)"\0"
+#endif
+#else
#define UPDATE_M4_ENV ""
#endif