summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTerry Lv <r65388@freescale.com>2010-01-26 20:18:22 +0800
committerTerry Lv <r65388@freescale.com>2010-01-27 13:29:28 +0800
commit3de15e03d89eeda18e665d270c6e3abf65c94d1d (patch)
treebcd1cb6bc3bc677cd148ee2cfe75519b90166c00 /include
parentc77b09d0ede28f2d9ab940ed15bd16bdafb7ea26 (diff)
downloadu-boot-imx-3de15e03d89eeda18e665d270c6e3abf65c94d1d.zip
u-boot-imx-3de15e03d89eeda18e665d270c6e3abf65c94d1d.tar.gz
u-boot-imx-3de15e03d89eeda18e665d270c6e3abf65c94d1d.tar.bz2
ENGR00120476: Add fuse support for mx51
Add fuse support for mx51. Signed-off-by: Terry Lv <r65388@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-mx51/imx_fuse.h33
-rw-r--r--include/asm-arm/arch-mx51/mx51.h35
-rw-r--r--include/configs/mx51_3stack.h6
-rw-r--r--include/configs/mx51_bbg.h6
4 files changed, 79 insertions, 1 deletions
diff --git a/include/asm-arm/arch-mx51/imx_fuse.h b/include/asm-arm/arch-mx51/imx_fuse.h
new file mode 100644
index 0000000..8a65613
--- /dev/null
+++ b/include/asm-arm/arch-mx51/imx_fuse.h
@@ -0,0 +1,33 @@
+/*
+ * (C) Copyright 2009-2010 Freescale Semiconductor, Inc.
+ *
+ * Configuration settings for the MX51-3Stack Freescale board.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef _IMX_FUSE_H_
+#define _IMX_FUSE_H_
+
+#define IIM_ERR_SHIFT 8
+#define POLL_FUSE_PRGD (IIM_STAT_PRGD | (IIM_ERR_PRGE << IIM_ERR_SHIFT))
+#define POLL_FUSE_SNSD (IIM_STAT_SNSD | (IIM_ERR_SNSE << IIM_ERR_SHIFT))
+
+int fuse_read(int bank, char row);
+int fuse_blow(int bank, int row, int val);
+int fuse_blow_func(char *func_name, char *func_val);
+
+#endif
diff --git a/include/asm-arm/arch-mx51/mx51.h b/include/asm-arm/arch-mx51/mx51.h
index 00e50cf..5fc57bb 100644
--- a/include/asm-arm/arch-mx51/mx51.h
+++ b/include/asm-arm/arch-mx51/mx51.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -390,6 +390,39 @@
#define DP_MFD_216 (4 - 1)
#define DP_MFN_216 3
+/* IIM */
+#define IIM_STAT_OFF 0x00
+#define IIM_STAT_BUSY (1 << 7)
+#define IIM_STAT_PRGD (1 << 1)
+#define IIM_STAT_SNSD (1 << 0)
+#define IIM_STATM_OFF 0x04
+#define IIM_ERR_OFF 0x08
+#define IIM_ERR_PRGE (1 << 7)
+#define IIM_ERR_WPE (1 << 6)
+#define IIM_ERR_OPE (1 << 5)
+#define IIM_ERR_RPE (1 << 4)
+#define IIM_ERR_WLRE (1 << 3)
+#define IIM_ERR_SNSE (1 << 2)
+#define IIM_ERR_PARITYE (1 << 1)
+#define IIM_EMASK_OFF 0x0C
+#define IIM_FCTL_OFF 0x10
+#define IIM_UA_OFF 0x14
+#define IIM_LA_OFF 0x18
+#define IIM_SDAT_OFF 0x1C
+#define IIM_PREV_OFF 0x20
+#define IIM_SREV_OFF 0x24
+#define IIM_PREG_P_OFF 0x28
+#define IIM_SCS0_OFF 0x2C
+#define IIM_SCS1_P_OFF 0x30
+#define IIM_SCS2_OFF 0x34
+#define IIM_SCS3_P_OFF 0x38
+
+#define IIM_PROD_REV_SH 3
+#define IIM_PROD_REV_LEN 5
+#define IIM_SREV_REV_SH 4
+#define IIM_SREV_REV_LEN 4
+#define PROD_SIGNATURE_MX51 0x1
+
#define CHIP_REV_1_0 0x10
#define CHIP_REV_1_1 0x11
#define CHIP_REV_2_0 0x20
diff --git a/include/configs/mx51_3stack.h b/include/configs/mx51_3stack.h
index 292e2cc..f6083c5 100644
--- a/include/configs/mx51_3stack.h
+++ b/include/configs/mx51_3stack.h
@@ -93,6 +93,12 @@
#define CONFIG_CMD_MII
#define CONFIG_CMD_NET
#define CONFIG_CMD_MMC
+#define CONFIG_CMD_FUSE
+
+/*
+ * FUSE Configs
+ * */
+#define CONFIG_IMX_FUSE
/*
* MMC Configs
diff --git a/include/configs/mx51_bbg.h b/include/configs/mx51_bbg.h
index aee33ba..f773563 100644
--- a/include/configs/mx51_bbg.h
+++ b/include/configs/mx51_bbg.h
@@ -119,6 +119,12 @@
#define CONFIG_CMD_SPI
#define CONFIG_CMD_SF
#define CONFIG_CMD_MMC
+#define CONFIG_CMD_FUSE
+
+/*
+ * FUSE Configs
+ * */
+#define CONFIG_IMX_FUSE
/*
* SPI Configs