summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2013-04-12 22:07:57 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2013-04-12 22:07:57 +0200
commit18122019972ca639ee3b581257e3a63ff7c8efeb (patch)
tree52f7223e7c63f43322f3eee4722743e12190a19f /include
parent90639feaa0d66a204f9d03a325ab14e2f97f6cbb (diff)
parent785881f775252940185e10fbb2d5299c9ffa6bce (diff)
downloadu-boot-imx-18122019972ca639ee3b581257e3a63ff7c8efeb.zip
u-boot-imx-18122019972ca639ee3b581257e3a63ff7c8efeb.tar.gz
u-boot-imx-18122019972ca639ee3b581257e3a63ff7c8efeb.tar.bz2
Merge branch 'u-boot/master' into 'u-boot-arm/master'
Conflicts: drivers/video/exynos_fb.c
Diffstat (limited to 'include')
-rw-r--r--include/ansi.h42
-rw-r--r--include/at91rm9200_net.h4
-rw-r--r--include/bedbug/ppc.h5
-rw-r--r--include/configs/R360MPI.h1
-rw-r--r--include/configs/RBC823.h1
-rw-r--r--include/configs/RPXlite_DW.h1
-rw-r--r--include/configs/RRvision.h4
-rw-r--r--include/configs/TQM823L.h1
-rw-r--r--include/configs/TQM823M.h1
-rw-r--r--include/configs/am335x_evm.h52
-rw-r--r--include/configs/lubbock.h1
-rw-r--r--include/configs/lwmon.h1
-rw-r--r--include/configs/nokia_rx51.h40
-rw-r--r--include/configs/palmld.h1
-rw-r--r--include/configs/palmtc.h1
-rw-r--r--include/configs/pxa255_idp.h1
-rw-r--r--include/configs/svm_sc8xx.h1
-rw-r--r--include/configs/v37.h1
-rw-r--r--include/configs/zipitz2.h1
-rw-r--r--include/dfu.h53
-rw-r--r--include/environment.h18
-rw-r--r--include/fpga.h8
-rw-r--r--include/galileo/core.h6
-rw-r--r--include/lcd.h74
-rw-r--r--include/linux/mtd/nand.h2
-rw-r--r--include/linux/types.h1
-rw-r--r--include/linux/usb/gadget.h6
-rw-r--r--include/malloc.h2
-rw-r--r--include/menu.h5
-rw-r--r--include/mtd/cfi_flash.h41
-rw-r--r--include/nand.h4
-rw-r--r--include/scsi.h8
-rw-r--r--include/sym53c8xx.h7
-rw-r--r--include/ubi_uboot.h3
-rw-r--r--include/usbdevice.h4
-rw-r--r--include/xyzModem.h8
36 files changed, 267 insertions, 143 deletions
diff --git a/include/ansi.h b/include/ansi.h
new file mode 100644
index 0000000..0e40b1d
--- /dev/null
+++ b/include/ansi.h
@@ -0,0 +1,42 @@
+/*
+ * (C) Copyright 2012
+ * Pali Rohár <pali.rohar@gmail.com>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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
+ */
+
+/*
+ * ANSI terminal
+ */
+
+#define ANSI_CURSOR_UP "\e[%dA"
+#define ANSI_CURSOR_DOWN "\e[%dB"
+#define ANSI_CURSOR_FORWARD "\e[%dC"
+#define ANSI_CURSOR_BACK "\e[%dD"
+#define ANSI_CURSOR_NEXTLINE "\e[%dE"
+#define ANSI_CURSOR_PREVIOUSLINE "\e[%dF"
+#define ANSI_CURSOR_COLUMN "\e[%dG"
+#define ANSI_CURSOR_POSITION "\e[%d;%dH"
+#define ANSI_CURSOR_SHOW "\e[?25h"
+#define ANSI_CURSOR_HIDE "\e[?25l"
+#define ANSI_CLEAR_CONSOLE "\e[2J"
+#define ANSI_CLEAR_LINE_TO_END "\e[0K"
+#define ANSI_CLEAR_LINE "\e[2K"
+#define ANSI_COLOR_RESET "\e[0m"
+#define ANSI_COLOR_REVERSE "\e[7m"
diff --git a/include/at91rm9200_net.h b/include/at91rm9200_net.h
index f799206..804105f 100644
--- a/include/at91rm9200_net.h
+++ b/include/at91rm9200_net.h
@@ -23,10 +23,6 @@
#include <asm/io.h>
#include <asm/arch/hardware.h>
-#define FALSE 0
-#define TRUE 1
-
-
#define ETHERNET_ADDRESS_SIZE 6
typedef unsigned char UCHAR;
diff --git a/include/bedbug/ppc.h b/include/bedbug/ppc.h
index 46bf8db..76d86fd 100644
--- a/include/bedbug/ppc.h
+++ b/include/bedbug/ppc.h
@@ -296,11 +296,6 @@ struct operand {
((rc) & 0x1))
#define MDS_MASK MDS_OPCODE(0x3f,0xf,0x1)
-#ifndef FALSE
-#define FALSE 0
-#define TRUE (!FALSE)
-#endif
-
#define INSTRUCTION( memaddr ) ntohl(*(unsigned long *)(memaddr))
#define MAX_OPERANDS 8
diff --git a/include/configs/R360MPI.h b/include/configs/R360MPI.h
index 868a0b8..60cccff 100644
--- a/include/configs/R360MPI.h
+++ b/include/configs/R360MPI.h
@@ -39,6 +39,7 @@
#define CONFIG_SYS_TEXT_BASE 0x40000000
#define CONFIG_LCD
+#define CONFIG_MPC8XX_LCD
#undef CONFIG_EDT32F10
#define CONFIG_SHARP_LQ057Q3DC02
diff --git a/include/configs/RBC823.h b/include/configs/RBC823.h
index b042c67..d4bcc62 100644
--- a/include/configs/RBC823.h
+++ b/include/configs/RBC823.h
@@ -47,6 +47,7 @@
#endif
#define CONFIG_KEYBOARD 1 /* This board has a custom keybpard */
#define CONFIG_LCD 1 /* use LCD controller ... */
+#define CONFIG_MPC8XX_LCD
#define CONFIG_HITACHI_SP19X001_Z1A /* The LCD type we use */
#define CONFIG_8xx_CONS_SMC2 1 /* Console is on SMC2 */
diff --git a/include/configs/RPXlite_DW.h b/include/configs/RPXlite_DW.h
index 67ab1e9..d8e28d5 100644
--- a/include/configs/RPXlite_DW.h
+++ b/include/configs/RPXlite_DW.h
@@ -54,6 +54,7 @@
#define CONFIG_SYS_TEXT_BASE 0xff000000
#ifdef CONFIG_LCD /* with LCD controller ? */
+#define CONFIG_MPC8XX_LCD
#define CONFIG_SPLASH_SCREEN /* ... with splashscreen support*/
#endif
diff --git a/include/configs/RRvision.h b/include/configs/RRvision.h
index e2b22f0..e2ea016 100644
--- a/include/configs/RRvision.h
+++ b/include/configs/RRvision.h
@@ -110,7 +110,9 @@
#define CONFIG_RTC_MPC8xx /* use internal RTC of MPC8xx */
-#ifndef CONFIG_LCD
+#ifdef CONFIG_LCD
+#define CONFIG_MPC8XX_LCD
+#else
#define CONFIG_VIDEO 1 /* To enable the video initialization */
/* Video related */
diff --git a/include/configs/TQM823L.h b/include/configs/TQM823L.h
index 9fac5d1..cccf3af 100644
--- a/include/configs/TQM823L.h
+++ b/include/configs/TQM823L.h
@@ -39,6 +39,7 @@
#define CONFIG_SYS_TEXT_BASE 0x40000000
#ifdef CONFIG_LCD /* with LCD controller ? */
+#define CONFIG_MPC8XX_LCD
#define CONFIG_LCD_LOGO 1 /* print our logo on the LCD */
#define CONFIG_LCD_INFO 1 /* ... and some board info */
#define CONFIG_SPLASH_SCREEN /* ... with splashscreen support*/
diff --git a/include/configs/TQM823M.h b/include/configs/TQM823M.h
index 932f158..b2d1af0 100644
--- a/include/configs/TQM823M.h
+++ b/include/configs/TQM823M.h
@@ -39,6 +39,7 @@
#define CONFIG_SYS_TEXT_BASE 0x40000000
#ifdef CONFIG_LCD /* with LCD controller ? */
+#define CONFIG_MPC8XX_LCD
/* #define CONFIG_NEC_NL6448BC20 1 / * use NEC NL6448BC20 display */
#endif
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index dbd5ef3..ef00306 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -39,6 +39,8 @@
#define CONFIG_SETUP_MEMORY_TAGS
#define CONFIG_INITRD_TAG
+#define CONFIG_SYS_CACHELINE_SIZE 64
+
/* commands to include */
#include <config_cmd_default.h>
@@ -60,6 +62,11 @@
"fdtfile=\0" \
"console=ttyO0,115200n8\0" \
"optargs=\0" \
+ "mtdids=" MTDIDS_DEFAULT "\0" \
+ "mtdparts=" MTDPARTS_DEFAULT "\0" \
+ "dfu_alt_info_mmc=" DFU_ALT_INFO_MMC "\0" \
+ "dfu_alt_info_emmc=rawemmc mmc 0 3751936\0" \
+ "dfu_alt_info_nand=" DFU_ALT_INFO_NAND "\0" \
"mmcdev=0\0" \
"mmcroot=/dev/mmcblk0p2 ro\0" \
"mmcrootfstype=ext4 rootwait\0" \
@@ -167,8 +174,8 @@
#define CONFIG_CMD_ECHO
-/* max number of command args */
-#define CONFIG_SYS_MAXARGS 16
+/* We set the max number of command args high to avoid HUSH bugs. */
+#define CONFIG_SYS_MAXARGS 64
/* Console I/O Buffer Size */
#define CONFIG_SYS_CBSIZE 512
@@ -197,6 +204,7 @@
#define CONFIG_CMD_MMC
#define CONFIG_DOS_PARTITION
#define CONFIG_CMD_FAT
+#define CONFIG_FAT_WRITE
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_EXT4
#define CONFIG_CMD_FS_GENERIC
@@ -209,6 +217,38 @@
#define CONFIG_CMD_SF
#define CONFIG_SF_DEFAULT_SPEED (24000000)
+/* USB Composite download gadget - g_dnl */
+#define CONFIG_USB_GADGET
+#define CONFIG_USBDOWNLOAD_GADGET
+
+/* USB TI's IDs */
+#define CONFIG_USBD_HS
+#define CONFIG_G_DNL_VENDOR_NUM 0x0403
+#define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
+#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
+
+/* USB Device Firmware Update support */
+#define CONFIG_DFU_FUNCTION
+#define CONFIG_DFU_MMC
+#define CONFIG_DFU_NAND
+#define CONFIG_CMD_DFU
+#define DFU_ALT_INFO_MMC \
+ "boot part 0 1;" \
+ "rootfs part 0 2;" \
+ "MLO fat 0 1;" \
+ "MLO.raw mmc 100 100;" \
+ "u-boot.img.raw mmc 300 3C0;" \
+ "u-boot.img fat 0 1;" \
+ "uEnv.txt fat 0 1"
+#define DFU_ALT_INFO_NAND \
+ "SPL part 0 1;" \
+ "SPL.backup1 part 0 2;" \
+ "SPL.backup2 part 0 3;" \
+ "SPL.backup3 part 0 4;" \
+ "u-boot part 0 5;" \
+ "kernel part 0 7;" \
+ "rootfs part 0 8"
+
/* Physical Memory Map */
#define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
#define PHYS_DRAM_1 0x80000000 /* DRAM Bank #1 */
@@ -354,6 +394,7 @@
#define CONFIG_MUSB_PIO_ONLY
#define CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT
#define CONFIG_USB_GADGET_DUALSPEED
+#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_MUSB_HOST
#define CONFIG_AM335X_USB0
#define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL
@@ -425,6 +466,13 @@
/* NAND support */
#ifdef CONFIG_NAND
#define CONFIG_CMD_NAND
+#define CONFIG_CMD_MTDPARTS
+#define MTDIDS_DEFAULT "nand0=omap2-nand.0"
+#define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:128k(SPL)," \
+ "128k(SPL.backup1)," \
+ "128k(SPL.backup2)," \
+ "128k(SPL.backup3),1920k(u-boot)," \
+ "128k(u-boot-env),5m(kernel),-(rootfs)"
#define CONFIG_NAND_OMAP_GPMC
#define GPMC_NAND_ECC_LP_x16_LAYOUT 1
#define CONFIG_SYS_NAND_BASE (0x08000000) /* physical address */
diff --git a/include/configs/lubbock.h b/include/configs/lubbock.h
index 5886a15..b99a056 100644
--- a/include/configs/lubbock.h
+++ b/include/configs/lubbock.h
@@ -38,6 +38,7 @@
#define CONFIG_LUBBOCK 1 /* on an LUBBOCK Board */
#define CONFIG_LCD 1
#ifdef CONFIG_LCD
+#define CONFIG_PXA_LCD
#define CONFIG_SHARP_LM8V31
#endif
#define CONFIG_MMC
diff --git a/include/configs/lwmon.h b/include/configs/lwmon.h
index df49781..3c02b73 100644
--- a/include/configs/lwmon.h
+++ b/include/configs/lwmon.h
@@ -54,6 +54,7 @@
#define CONFIG_MISC_INIT_R 1 /* Call misc_init_r() */
#define CONFIG_LCD 1 /* use LCD controller ... */
+#define CONFIG_MPC8XX_LCD
#define CONFIG_HLD1045 1 /* ... with a HLD1045 display */
#define CONFIG_LCD_LOGO 1 /* print our logo on the LCD */
diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h
index 8506604..965330a 100644
--- a/include/configs/nokia_rx51.h
+++ b/include/configs/nokia_rx51.h
@@ -148,6 +148,7 @@
#define CONFIG_CMDLINE_EDITING /* add command line history */
#define CONFIG_AUTO_COMPLETE /* add autocompletion support */
+#define CONFIG_CMD_BOOTMENU /* ANSI terminal Boot Menu */
#define CONFIG_CMD_CLEAR /* ANSI terminal clear screen command */
#ifdef ONENAND_SUPPORT
@@ -287,8 +288,6 @@ int rx51_kp_getc(void);
#endif
/* Environment information */
-#define CONFIG_BOOTDELAY 3
-
#define CONFIG_EXTRA_ENV_SETTINGS \
"mtdparts=" MTDPARTS_DEFAULT "\0" \
"usbtty=cdc_acm\0" \
@@ -360,10 +359,40 @@ int rx51_kp_getc(void);
"fi\0" \
"emmcboot=setenv mmcnum 1; run trymmcboot\0" \
"sdboot=setenv mmcnum 0; run trymmcboot\0" \
+ "menucmd=bootmenu\0" \
+ "bootmenu_0=Attached kernel=run attachboot\0" \
+ "bootmenu_1=Internal eMMC=run emmcboot\0" \
+ "bootmenu_2=External SD card=run sdboot\0" \
+ "bootmenu_3=U-Boot boot order=boot\0" \
+ "bootmenu_delay=30\0" \
""
#define CONFIG_PREBOOT \
- "if run slide; then true; else run attachboot; fi;" \
+ "setenv mmcnum 1; setenv mmcpart 1;" \
+ "setenv mmcscriptfile bootmenu.scr;" \
+ "if run switchmmc; then " \
+ "setenv mmcdone true;" \
+ "setenv mmctype fat;" \
+ "if run scriptload; then true; else " \
+ "setenv mmctype ext2;" \
+ "if run scriptload; then true; else " \
+ "setenv mmctype ext4;" \
+ "if run scriptload; then true; else " \
+ "setenv mmcdone false;" \
+ "fi;" \
+ "fi;" \
+ "fi;" \
+ "if ${mmcdone}; then " \
+ "run scriptboot;" \
+ "fi;" \
+ "fi;" \
+ "if run slide; then true; else " \
+ "setenv bootmenu_delay 0;" \
+ "setenv bootdelay 0;" \
+ "fi"
+
+#define CONFIG_POSTBOOTMENU \
+ "echo;" \
"echo Extra commands:;" \
"echo run sercon - Use serial port for control.;" \
"echo run usbcon - Use usbtty for control.;" \
@@ -379,6 +408,11 @@ int rx51_kp_getc(void);
"run attachboot;" \
"echo"
+#define CONFIG_BOOTDELAY 30
+#define CONFIG_AUTOBOOT_KEYED
+#define CONFIG_MENU
+#define CONFIG_MENU_SHOW
+
/*
* Miscellaneous configurable options
*/
diff --git a/include/configs/palmld.h b/include/configs/palmld.h
index 3f9802c..4ee2e46 100644
--- a/include/configs/palmld.h
+++ b/include/configs/palmld.h
@@ -72,6 +72,7 @@
#define CONFIG_CMD_MMC
#define CONFIG_CMD_IDE
#define CONFIG_LCD
+#define CONFIG_PXA_LCD
/*
* MMC Card Configuration
diff --git a/include/configs/palmtc.h b/include/configs/palmtc.h
index 64771e7..70fe05c 100644
--- a/include/configs/palmtc.h
+++ b/include/configs/palmtc.h
@@ -74,6 +74,7 @@
#define CONFIG_CMD_ENV
#define CONFIG_CMD_MMC
#define CONFIG_LCD
+#define CONFIG_PXA_LCD
/*
* MMC Card Configuration
diff --git a/include/configs/pxa255_idp.h b/include/configs/pxa255_idp.h
index 5a15af6..39c167f 100644
--- a/include/configs/pxa255_idp.h
+++ b/include/configs/pxa255_idp.h
@@ -59,6 +59,7 @@
#undef CONFIG_LCD
#ifdef CONFIG_LCD
+#define CONFIG_PXA_LCD
#define CONFIG_SHARP_LM8V31
#endif
diff --git a/include/configs/svm_sc8xx.h b/include/configs/svm_sc8xx.h
index 2b24997..3c8c74d 100644
--- a/include/configs/svm_sc8xx.h
+++ b/include/configs/svm_sc8xx.h
@@ -38,6 +38,7 @@
/* SC85T,SC860T, FEL8xx-AT(855T/860T) */
/*#define CONFIG_FEL8xx_AT */
/*#define CONFIG_LCD */
+/*#define CONFIG_MPC8XX_LCD*/
/* if core > 50MHz , un-comment CONFIG_BUS_DIV2 */
/* #define CONFIG_50MHz */
/* #define CONFIG_66MHz */
diff --git a/include/configs/v37.h b/include/configs/v37.h
index e36d249..f9965db 100644
--- a/include/configs/v37.h
+++ b/include/configs/v37.h
@@ -39,6 +39,7 @@
#define CONFIG_SYS_TEXT_BASE 0x40000000
#define CONFIG_LCD
+#define CONFIG_MPC8XX_LCD
#define CONFIG_SHARP_LQ084V1DG21
#undef CONFIG_LCD_LOGO
diff --git a/include/configs/zipitz2.h b/include/configs/zipitz2.h
index b92f70b..f79dd3b 100644
--- a/include/configs/zipitz2.h
+++ b/include/configs/zipitz2.h
@@ -103,6 +103,7 @@
#ifdef CONFIG_CMD_SPI
#define CONFIG_SOFT_SPI
#define CONFIG_LCD
+#define CONFIG_PXA_LCD
#define CONFIG_LMS283GF05
#define CONFIG_VIDEO_LOGO
#define CONFIG_CMD_BMP
diff --git a/include/dfu.h b/include/dfu.h
index 5350d79..a107f4b 100644
--- a/include/dfu.h
+++ b/include/dfu.h
@@ -52,14 +52,26 @@ struct mmc_internal_data {
unsigned int part;
};
+struct nand_internal_data {
+ /* RAW programming */
+ u64 start;
+ u64 size;
+
+ unsigned int dev;
+ unsigned int part;
+};
+
static inline unsigned int get_mmc_blk_size(int dev)
{
return find_mmc_device(dev)->read_bl_len;
}
-#define DFU_NAME_SIZE 32
-#define DFU_CMD_BUF_SIZE 128
-#define DFU_DATA_BUF_SIZE (1024*1024*4) /* 4 MiB */
+#define DFU_NAME_SIZE 32
+#define DFU_CMD_BUF_SIZE 128
+#define DFU_DATA_BUF_SIZE (1024*1024*8) /* 8 MiB */
+#ifndef CONFIG_SYS_DFU_MAX_FILE_SIZE
+#define CONFIG_SYS_DFU_MAX_FILE_SIZE (4 << 20) /* 4 MiB */
+#endif
struct dfu_entity {
char name[DFU_NAME_SIZE];
@@ -71,12 +83,32 @@ struct dfu_entity {
union {
struct mmc_internal_data mmc;
+ struct nand_internal_data nand;
} data;
- int (*read_medium)(struct dfu_entity *dfu, void *buf, long *len);
- int (*write_medium)(struct dfu_entity *dfu, void *buf, long *len);
+ int (*read_medium)(struct dfu_entity *dfu,
+ u64 offset, void *buf, long *len);
+
+ int (*write_medium)(struct dfu_entity *dfu,
+ u64 offset, void *buf, long *len);
+
+ int (*flush_medium)(struct dfu_entity *dfu);
struct list_head list;
+
+ /* on the fly state */
+ u32 crc;
+ u64 offset;
+ int i_blk_seq_num;
+ u8 *i_buf;
+ u8 *i_buf_start;
+ u8 *i_buf_end;
+ long r_left;
+ long b_left;
+
+ u32 bad_skip; /* for nand use */
+
+ unsigned int inited:1;
};
int dfu_config_entities(char *s, char *interface, int num);
@@ -100,4 +132,15 @@ static inline int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *s)
return -1;
}
#endif
+
+#ifdef CONFIG_DFU_NAND
+extern int dfu_fill_entity_nand(struct dfu_entity *dfu, char *s);
+#else
+static inline int dfu_fill_entity_nand(struct dfu_entity *dfu, char *s)
+{
+ puts("NAND support not available!\n");
+ return -1;
+}
+#endif
+
#endif /* __DFU_ENTITY_H_ */
diff --git a/include/environment.h b/include/environment.h
index e64b43d..4c6a37b 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -96,6 +96,24 @@ extern unsigned long nand_env_oob_offset;
# endif
#endif /* CONFIG_ENV_IS_IN_NAND */
+#if defined(CONFIG_ENV_IS_IN_UBI)
+# ifndef CONFIG_ENV_UBI_PART
+# error "Need to define CONFIG_ENV_UBI_PART when using CONFIG_ENV_IS_IN_UBI"
+# endif
+# ifndef CONFIG_ENV_UBI_VOLUME
+# error "Need to define CONFIG_ENV_UBI_VOLUME when using CONFIG_ENV_IS_IN_UBI"
+# endif
+# if defined(CONFIG_ENV_UBI_VOLUME_REDUND)
+# define CONFIG_SYS_REDUNDAND_ENVIRONMENT
+# endif
+# ifndef CONFIG_ENV_SIZE
+# error "Need to define CONFIG_ENV_SIZE when using CONFIG_ENV_IS_IN_UBI"
+# endif
+# ifndef CONFIG_CMD_UBI
+# error "Need to define CONFIG_CMD_UBI when using CONFIG_ENV_IS_IN_UBI"
+# endif
+#endif /* CONFIG_ENV_IS_IN_UBI */
+
/* Embedded env is only supported for some flash types */
#ifdef CONFIG_ENV_IS_EMBEDDED
# if !defined(CONFIG_ENV_IS_IN_FLASH) && \
diff --git a/include/fpga.h b/include/fpga.h
index e0b1fe7..30a4e6a 100644
--- a/include/fpga.h
+++ b/include/fpga.h
@@ -31,14 +31,6 @@
#define CONFIG_MAX_FPGA_DEVICES 5
#endif
-/* these probably belong somewhere else */
-#ifndef FALSE
-#define FALSE (0)
-#endif
-#ifndef TRUE
-#define TRUE (!FALSE)
-#endif
-
/* CONFIG_FPGA bit assignments */
#define CONFIG_SYS_FPGA_MAN(x) (x)
#define CONFIG_SYS_FPGA_DEV(x) ((x) << 8 )
diff --git a/include/galileo/core.h b/include/galileo/core.h
index c277509..95013fa 100644
--- a/include/galileo/core.h
+++ b/include/galileo/core.h
@@ -14,6 +14,7 @@ space). The macros take care of Big/Little endian conversions.
/* includes */
#include "gt64260R.h"
+#include <stdbool.h>
extern unsigned int INTERNAL_REG_BASE_ADDR;
@@ -110,11 +111,6 @@ extern unsigned int INTERNAL_REG_BASE_ADDR;
#define _1G 0x40000000
#define _2G 0x80000000
-#ifndef BOOL_WAS_DEFINED
-#define BOOL_WAS_DEFINED
-typedef enum _bool{false,true} bool;
-#endif
-
/* Little to Big endian conversion macros */
#ifdef LE /* Little Endian */
diff --git a/include/lcd.h b/include/lcd.h
index a6822d2..c6e7fc5 100644
--- a/include/lcd.h
+++ b/include/lcd.h
@@ -32,31 +32,22 @@
extern char lcd_is_enabled;
extern int lcd_line_length;
-extern int lcd_color_fg;
-extern int lcd_color_bg;
-/*
- * Frame buffer memory information
- */
-extern void *lcd_base; /* Start of framebuffer memory */
-extern void *lcd_console_address; /* Start of console buffer */
-
-extern short console_col;
-extern short console_row;
extern struct vidinfo panel_info;
-extern void lcd_ctrl_init (void *lcdbase);
-extern void lcd_enable (void);
-extern int board_splash_screen_prepare(void);
+void lcd_ctrl_init(void *lcdbase);
+void lcd_enable(void);
+int board_splash_screen_prepare(void);
/* setcolreg used in 8bpp/16bpp; initcolregs used in monochrome */
-extern void lcd_setcolreg (ushort regno,
- ushort red, ushort green, ushort blue);
-extern void lcd_initcolregs (void);
+void lcd_setcolreg(ushort regno, ushort red, ushort green, ushort blue);
+void lcd_initcolregs(void);
+
+int lcd_getfgcolor(void);
/* gunzip_bmp used if CONFIG_VIDEO_BMP_GZIP */
-extern struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp);
-extern int bmp_display(ulong addr, int x, int y);
+struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp);
+int bmp_display(ulong addr, int x, int y);
/**
* Set whether we need to flush the dcache when changing the LCD image. This
@@ -258,7 +249,6 @@ typedef struct vidinfo {
unsigned int sclk_div;
unsigned int dual_lcd_enabled;
-
} vidinfo_t;
void init_panel_info(vidinfo_t *vid);
@@ -283,14 +273,12 @@ extern vidinfo_t panel_info;
/* Video functions */
#if defined(CONFIG_RBC823)
-void lcd_disable (void);
+void lcd_disable(void);
#endif
-
-/* int lcd_init (void *lcdbase); */
-void lcd_putc (const char c);
-void lcd_puts (const char *s);
-void lcd_printf (const char *fmt, ...);
+void lcd_putc(const char c);
+void lcd_puts(const char *s);
+void lcd_printf(const char *fmt, ...);
void lcd_clear(void);
int lcd_display_bitmap(ulong bmp_image, int x, int y);
@@ -350,7 +338,7 @@ int lcd_get_size(int *line_length);
* is connected, as we can't autodetect anything.
*/
#define CONFIG_SYS_HIGH 0 /* Pins are active high */
-#define CONFIG_SYS_LOW 1 /* Pins are active low */
+#define CONFIG_SYS_LOW 1 /* Pins are active low */
#define LCD_MONOCHROME 0
#define LCD_COLOR2 1
@@ -364,10 +352,10 @@ int lcd_get_size(int *line_length);
# define LCD_INFO_Y (BMP_LOGO_HEIGHT + VIDEO_FONT_HEIGHT)
#elif defined(CONFIG_LCD_LOGO)
# define LCD_INFO_X (BMP_LOGO_WIDTH + 4 * VIDEO_FONT_WIDTH)
-# define LCD_INFO_Y (VIDEO_FONT_HEIGHT)
+# define LCD_INFO_Y VIDEO_FONT_HEIGHT
#else
-# define LCD_INFO_X (VIDEO_FONT_WIDTH)
-# define LCD_INFO_Y (VIDEO_FONT_HEIGHT)
+# define LCD_INFO_X VIDEO_FONT_WIDTH
+# define LCD_INFO_Y VIDEO_FONT_HEIGHT
#endif
/* Default to 8bpp if bit depth not specified */
@@ -424,33 +412,5 @@ int lcd_get_size(int *line_length);
#endif
/************************************************************************/
-/* ** CONSOLE DEFINITIONS & FUNCTIONS */
-/************************************************************************/
-#if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO)
-# define CONSOLE_ROWS ((panel_info.vl_row-BMP_LOGO_HEIGHT) \
- / VIDEO_FONT_HEIGHT)
-#else
-# define CONSOLE_ROWS (panel_info.vl_row / VIDEO_FONT_HEIGHT)
-#endif
-
-#define CONSOLE_COLS (panel_info.vl_col / VIDEO_FONT_WIDTH)
-#define CONSOLE_ROW_SIZE (VIDEO_FONT_HEIGHT * lcd_line_length)
-#define CONSOLE_ROW_FIRST (lcd_console_address)
-#define CONSOLE_ROW_SECOND (lcd_console_address + CONSOLE_ROW_SIZE)
-#define CONSOLE_ROW_LAST (lcd_console_address + CONSOLE_SIZE \
- - CONSOLE_ROW_SIZE)
-#define CONSOLE_SIZE (CONSOLE_ROW_SIZE * CONSOLE_ROWS)
-#define CONSOLE_SCROLL_SIZE (CONSOLE_SIZE - CONSOLE_ROW_SIZE)
-
-#if LCD_BPP == LCD_MONOCHROME
-# define COLOR_MASK(c) ((c) | (c) << 1 | (c) << 2 | (c) << 3 | \
- (c) << 4 | (c) << 5 | (c) << 6 | (c) << 7)
-#elif (LCD_BPP == LCD_COLOR8) || (LCD_BPP == LCD_COLOR16)
-# define COLOR_MASK(c) (c)
-#else
-# error Unsupported LCD BPP.
-#endif
-
-/************************************************************************/
#endif /* _LCD_H_ */
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index e9e9045..98bf255 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -180,7 +180,7 @@ typedef enum {
*/
#define BBT_AUTO_REFRESH 0x00000080
/*
- * Chip does not require ready check on read. True
+ * Chip does not require ready check on read. true
* for all large page devices, as they do not support
* autoincrement.
*/
diff --git a/include/linux/types.h b/include/linux/types.h
index 1b0b4a4..f07ba41 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -7,6 +7,7 @@
#include <linux/posix_types.h>
#include <asm/types.h>
+#include <stdbool.h>
#ifndef __KERNEL_STRICT_NAMES
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index eba865e..220d068 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -421,11 +421,11 @@ struct device {
* driver setup() requests
* @ep_list: List of other endpoints supported by the device.
* @speed: Speed of current connection to USB host.
- * @is_dualspeed: True if the controller supports both high and full speed
+ * @is_dualspeed: true if the controller supports both high and full speed
* operation. If it does, the gadget driver must also support both.
- * @is_otg: True if the USB device port uses a Mini-AB jack, so that the
+ * @is_otg: true if the USB device port uses a Mini-AB jack, so that the
* gadget driver must provide a USB OTG descriptor.
- * @is_a_peripheral: False unless is_otg, the "A" end of a USB cable
+ * @is_a_peripheral: false unless is_otg, the "A" end of a USB cable
* is in the Mini-AB jack, and HNP has been used to switch roles
* so that the "A" device currently acts as A-Peripheral, not A-Host.
* @a_hnp_support: OTG device feature flag, indicating that the A-Host
diff --git a/include/malloc.h b/include/malloc.h
index 6295929..c33f3b4 100644
--- a/include/malloc.h
+++ b/include/malloc.h
@@ -196,7 +196,7 @@
MORECORE_FAILURE (default: -1)
The value returned upon failure of MORECORE.
MORECORE_CLEARS (default 1)
- True (1) if the routine mapped to MORECORE zeroes out memory (which
+ true (1) if the routine mapped to MORECORE zeroes out memory (which
holds for sbrk).
DEFAULT_TRIM_THRESHOLD
DEFAULT_TOP_PAD
diff --git a/include/menu.h b/include/menu.h
index 7af5fdb..d8200ee 100644
--- a/include/menu.h
+++ b/include/menu.h
@@ -21,12 +21,15 @@
struct menu;
struct menu *menu_create(char *title, int timeout, int prompt,
- void (*item_data_print)(void *));
+ void (*item_data_print)(void *),
+ char *(*item_choice)(void *),
+ void *item_choice_data);
int menu_default_set(struct menu *m, char *item_key);
int menu_get_choice(struct menu *m, void **choice);
int menu_item_add(struct menu *m, char *item_key, void *item_data);
int menu_destroy(struct menu *m);
void menu_display_statusline(struct menu *m);
+int menu_default_choice(struct menu *m, void **choice);
#if defined(CONFIG_MENU_SHOW)
int menu_show(int bootdelay);
diff --git a/include/mtd/cfi_flash.h b/include/mtd/cfi_flash.h
index 966b5e0..9bd76eb 100644
--- a/include/mtd/cfi_flash.h
+++ b/include/mtd/cfi_flash.h
@@ -78,29 +78,30 @@
#define FLASH_CONTINUATION_CODE 0x7F
#define FLASH_OFFSET_MANUFACTURER_ID 0x00
-#define FLASH_OFFSET_DEVICE_ID 0x01
-#define FLASH_OFFSET_DEVICE_ID2 0x0E
-#define FLASH_OFFSET_DEVICE_ID3 0x0F
-#define FLASH_OFFSET_CFI 0x55
+#define FLASH_OFFSET_DEVICE_ID 0x02
+#define FLASH_OFFSET_DEVICE_ID2 0x1C
+#define FLASH_OFFSET_DEVICE_ID3 0x1E
+#define FLASH_OFFSET_CFI 0xAA
+
#define FLASH_OFFSET_CFI_ALT 0x555
-#define FLASH_OFFSET_CFI_RESP 0x10
-#define FLASH_OFFSET_PRIMARY_VENDOR 0x13
+#define FLASH_OFFSET_CFI_RESP 0x20
+#define FLASH_OFFSET_PRIMARY_VENDOR 0x26
/* extended query table primary address */
-#define FLASH_OFFSET_EXT_QUERY_T_P_ADDR 0x15
+#define FLASH_OFFSET_EXT_QUERY_T_P_ADDR 0x2A
#define FLASH_OFFSET_WTOUT 0x1F
-#define FLASH_OFFSET_WBTOUT 0x20
-#define FLASH_OFFSET_ETOUT 0x21
-#define FLASH_OFFSET_CETOUT 0x22
-#define FLASH_OFFSET_WMAX_TOUT 0x23
-#define FLASH_OFFSET_WBMAX_TOUT 0x24
-#define FLASH_OFFSET_EMAX_TOUT 0x25
-#define FLASH_OFFSET_CEMAX_TOUT 0x26
-#define FLASH_OFFSET_SIZE 0x27
-#define FLASH_OFFSET_INTERFACE 0x28
-#define FLASH_OFFSET_BUFFER_SIZE 0x2A
-#define FLASH_OFFSET_NUM_ERASE_REGIONS 0x2C
-#define FLASH_OFFSET_ERASE_REGIONS 0x2D
-#define FLASH_OFFSET_PROTECT 0x02
+#define FLASH_OFFSET_WBTOUT 0x40
+#define FLASH_OFFSET_ETOUT 0x4A
+#define FLASH_OFFSET_CETOUT 0x44
+#define FLASH_OFFSET_WMAX_TOUT 0x46
+#define FLASH_OFFSET_WBMAX_TOUT 0x48
+#define FLASH_OFFSET_EMAX_TOUT 0x4A
+#define FLASH_OFFSET_CEMAX_TOUT 0x4C
+#define FLASH_OFFSET_SIZE 0x4E
+#define FLASH_OFFSET_INTERFACE 0x50
+#define FLASH_OFFSET_BUFFER_SIZE 0x54
+#define FLASH_OFFSET_NUM_ERASE_REGIONS 0x58
+#define FLASH_OFFSET_ERASE_REGIONS 0x5A
+#define FLASH_OFFSET_PROTECT 0x04
#define FLASH_OFFSET_USER_PROTECTION 0x85
#define FLASH_OFFSET_INTEL_PROTECTION 0x81
diff --git a/include/nand.h b/include/nand.h
index dded4e2..f0f3bf9 100644
--- a/include/nand.h
+++ b/include/nand.h
@@ -129,7 +129,7 @@ struct nand_erase_options {
typedef struct nand_erase_options nand_erase_options_t;
int nand_read_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
- u_char *buffer);
+ size_t *actual, loff_t lim, u_char *buffer);
#define WITH_YAFFS_OOB (1 << 0) /* whether write with yaffs format. This flag
* is a 'mode' meaning it cannot be mixed with
@@ -137,7 +137,7 @@ int nand_read_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
#define WITH_DROP_FFS (1 << 1) /* drop trailing all-0xff pages */
int nand_write_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
- u_char *buffer, int flags);
+ size_t *actual, loff_t lim, u_char *buffer, int flags);
int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts);
int nand_torture(nand_info_t *nand, loff_t offset);
diff --git a/include/scsi.h b/include/scsi.h
index 9da764b..c764e15 100644
--- a/include/scsi.h
+++ b/include/scsi.h
@@ -204,12 +204,4 @@ int scsi_get_disk_count(void);
#define SCSI_INT_STATE 0x00010000 /* unknown Interrupt number is stored in 16 LSB */
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
#endif /* _SCSI_H */
diff --git a/include/sym53c8xx.h b/include/sym53c8xx.h
index 7d3ded5..9696db0 100644
--- a/include/sym53c8xx.h
+++ b/include/sym53c8xx.h
@@ -568,11 +568,4 @@
#define SCSI_IDENTIFY 0xC0
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
#endif
diff --git a/include/ubi_uboot.h b/include/ubi_uboot.h
index 69006e2..7f72022 100644
--- a/include/ubi_uboot.h
+++ b/include/ubi_uboot.h
@@ -214,6 +214,9 @@ static inline long IS_ERR(const void *ptr)
extern int ubi_mtd_param_parse(const char *val, struct kernel_param *kp);
extern int ubi_init(void);
extern void ubi_exit(void);
+extern int ubi_part(char *part_name, const char *vid_header_offset);
+extern int ubi_volume_write(char *volume, void *buf, size_t size);
+extern int ubi_volume_read(char *volume, char *buf, size_t size);
extern struct ubi_device *ubi_devices[];
diff --git a/include/usbdevice.h b/include/usbdevice.h
index 7037efd..265ba4a 100644
--- a/include/usbdevice.h
+++ b/include/usbdevice.h
@@ -676,8 +676,8 @@ struct usb_device_descriptor *usbd_device_device_descriptor(struct
#if defined(CONFIG_USBD_HS)
/*
* is_usbd_high_speed routine needs to be defined by specific gadget driver
- * It returns TRUE if device enumerates at High speed
- * Retuns FALSE otherwise
+ * It returns true if device enumerates at High speed
+ * Retuns false otherwise
*/
int is_usbd_high_speed(void);
#endif
diff --git a/include/xyzModem.h b/include/xyzModem.h
index f437bbd..a3ea768 100644
--- a/include/xyzModem.h
+++ b/include/xyzModem.h
@@ -97,14 +97,6 @@ typedef struct {
#endif
} connection_info_t;
-#ifndef BOOL_WAS_DEFINED
-#define BOOL_WAS_DEFINED
-typedef unsigned int bool;
-#endif
-
-#define false 0
-#define true 1
-
#endif