summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/common.h1
-rw-r--r--include/configs/omap3logic.h428
-rw-r--r--include/fastboot.h377
-rw-r--r--include/jffs2/load_kernel.h13
-rw-r--r--include/linux/string.h3
-rw-r--r--include/mtd_parts.h1
-rw-r--r--include/nand.h5
-rw-r--r--include/twl4030.h1
-rw-r--r--include/usb/musb_udc.h4
-rw-r--r--include/usbdevice.h8
10 files changed, 624 insertions, 217 deletions
diff --git a/include/common.h b/include/common.h
index 9ba1e93711..146a1c12b0 100644
--- a/include/common.h
+++ b/include/common.h
@@ -768,6 +768,7 @@ int cpu_release(int nr, int argc, char * const argv[]);
#ifdef CONFIG_MTDPARTS_DYNAMIC_DEFAULT
extern char *get_mtdids_default(void);
extern char *get_mtdparts_default(void);
+extern char *get_mtdflags_default(void);
#endif /* CONFIG_MTDPARTS_DYNAMIC_DEFAULT */
#endif /* __ASSEMBLY__ */
diff --git a/include/configs/omap3logic.h b/include/configs/omap3logic.h
index 5dfeb9bb72..6c91462576 100644
--- a/include/configs/omap3logic.h
+++ b/include/configs/omap3logic.h
@@ -125,6 +125,12 @@
/* DDR - I use Micron DDR */
#define CONFIG_OMAP3_MICRON_DDR 1
+#define CONFIG_USB_OMAP3 1
+#define CONFIG_MUSB_UDC 1
+#define CONFIG_FASTBOOT 1
+#define CONFIG_TWL4030_USB 1
+#define CONFIG_USB_DEVICE 1
+
#if 0
/* USB
* Enable CONFIG_MUSB_HCD for Host functionalities MSC, keyboard
@@ -152,15 +158,34 @@
#endif /* CONFIG_MUSB_HCD */
#ifdef CONFIG_MUSB_UDC
+# ifdef CONFIG_FASTBOOT
+# define CONFIG_CMD_FASTBOOT
+# define CONFIG_FASTBOOT_TRANSFER_BUFFER (PHYS_SDRAM_1 + SZ_16M)
+# define CONFIG_FASTBOOT_TRANSFER_BUFFER_SIZE (SZ_128M - SZ_16M)
+ /* if already present, use already existing NAND macros for block & oob size */
+# define FASTBOOT_NAND_BLOCK_SIZE 2048
+# define FASTBOOT_NAND_OOB_SIZE 64
+ /* Fastboot product name */
+# define FASTBOOT_PRODUCT_NAME "dm3730logic"
+ /* Use HS */
+# define USB_BCD_VERSION 0x0200
+
+# define CONFIG_USBD_VENDORID 0x0451
+# define CONFIG_USBD_PRODUCTID 0x5678
+# define CONFIG_USBD_MANUFACTURER "LogicPD"
+# define CONFIG_USBD_PRODUCT_NAME "EVM"
+//# define CONFIG_USBD_PRODUCT_NAME getenv("logic_model")
+# else
/* USB device configuration */
-#define CONFIG_USB_DEVICE 1
-#define CONFIG_USB_TTY 1
-#define CONFIG_SYS_CONSOLE_IS_IN_ENV 1
+# define CONFIG_USB_DEVICE 1
+# define CONFIG_USB_TTY 1
+# define CONFIG_SYS_CONSOLE_IS_IN_ENV 1
/* Change these to suit your needs */
-#define CONFIG_USBD_VENDORID 0x0451
-#define CONFIG_USBD_PRODUCTID 0x5678
-#define CONFIG_USBD_MANUFACTURER "Texas Instruments"
-#define CONFIG_USBD_PRODUCT_NAME "EVM"
+# define CONFIG_USBD_VENDORID 0x0451
+# define CONFIG_USBD_PRODUCTID 0x5678
+# define CONFIG_USBD_MANUFACTURER "Texas Instruments"
+# define CONFIG_USBD_PRODUCT_NAME "EVM"
+# endif /* CONFIG_FASTBOOT */
#endif /* CONFIG_MUSB_UDC */
#endif /* CONFIG_USB_OMAP3 */
@@ -178,6 +203,7 @@
#define CONFIG_CMD_I2C /* I2C serial bus support */
#define CONFIG_CMD_MMC /* MMC support */
#define CONFIG_CMD_NAND /* NAND support */
+#undef CONFIG_CMD_NAND_CHIP_ECC /* nandecc_chip command */
#define CONFIG_MTD_DEVICE /* needed for MTD mtdparts support */
#define CONFIG_CMD_MTDPARTS /* MTD partition support */
#define MTDIDS_NAND_DEFAULT "nand0=omap2-nand.0"
@@ -185,6 +211,7 @@
#define MTDPARTS_NAND_DEFAULT "mtdparts=omap2-nand.0:512k(x-loader),"\
"1664k(u-boot),384k(u-boot-env),"\
"5m(kernel),20m(ramdisk),-(fs)"
+#define MTDFLAGS_NAND_DEFAULT "default=ecc_chip;x-loader=ecc_hw,repeat;fs=yaffs"
#define MTDPARTS_NOR_DEFAULT "physmap-flash.0:-(nor)"
@@ -211,7 +238,7 @@
#define CONFIG_CMD_FLASH /* flinfo, erase, protect */
#undef CONFIG_CMD_FPGA /* FPGA configuration Support */
-#undef CONFIG_CMD_IMI /* iminfo */
+#define CONFIG_CMD_IMI /* iminfo */
#undef CONFIG_CMD_IMLS /* List all found images */
#define CONFIG_CMD_GPMC_CONFIG /* gpmc_config */
@@ -267,33 +294,35 @@
#define CONFIG_BOOTFILE uImage
#define CONFIG_PREBOOT \
- "echo ; " \
- "echo =================================== NOTICE ===================================;" \
- "echo \"The U-Boot environment was not found. If the display is not set properly \";"\
- "echo \"linux will not have video support.\";" \
- "echo ; " \
- "echo \"Valid display options are:\";" \
- "echo \" 2 == LQ121S1DG31 TFT SVGA (12.1) Sharp\";" \
- "echo \" 3 == LQ036Q1DA01 TFT QVGA (3.6) Sharp w/ASIC\";" \
- "echo \" 5 == LQ064D343 TFT VGA (6.4) Sharp\";" \
- "echo \" 7 == LQ10D368 TFT VGA (10.4) Sharp\";" \
- "echo \" 15 == LQ043T1DG01 TFT WQVGA (4.3) Sharp (DEFAULT)\";" \
- "echo \" vga[-16 OR -24] LCD VGA 640x480\";" \
- "echo \" svga[-16 OR -24] LCD SVGA 800x600\";" \
- "echo \" xga[-16 OR -24] LCD XGA 1024x768\";" \
- "echo \" 720p[-16 OR -24] LCD 720P 1280x720\";" \
- "echo \" sxga[-16 OR -24] LCD SXGA 1280x1024\";" \
- "echo \" uxga[-16 OR -24] LCD UXGA 1600x1200\";" \
- "echo ; " \
- "echo \"Default `display` environment variable is now being set to: 15\";" \
- "setenv display 15;" \
- "setenv preboot;" \
- "echo ; " \
- "echo \"At the U-Boot prompt type commands: `setenv display <num>`, then type\";" \
- "echo \"`saveenv` to save the environment to NAND flash. This will avoid seeing\";" \
- "echo \"this notice on future boots\" ; " \
- "echo =================================== NOTICE ===================================;" \
- "echo ; "
+ "if true;then\n" \
+ " echo\n" \
+ " echo =================================== NOTICE ===================================\n" \
+ " echo \"The U-Boot environment was not found. If the display is not set properly \"\n"\
+ " echo \"linux will not have video support.\"\n" \
+ " echo \n" \
+ " echo \"Valid display options are:\"\n" \
+ " echo \" 2 == LQ121S1DG31 TFT SVGA (12.1) Sharp\"\n" \
+ " echo \" 3 == LQ036Q1DA01 TFT QVGA (3.6) Sharp w/ASIC\"\n" \
+ " echo \" 5 == LQ064D343 TFT VGA (6.4) Sharp\"\n" \
+ " echo \" 7 == LQ10D368 TFT VGA (10.4) Sharp\"\n" \
+ " echo \" 15 == LQ043T1DG01 TFT WQVGA (4.3) Sharp (DEFAULT)\"\n" \
+ " echo \" vga[-16 OR -24] LCD VGA 640x480\"\n" \
+ " echo \" svga[-16 OR -24] LCD SVGA 800x600\"\n" \
+ " echo \" xga[-16 OR -24] LCD XGA 1024x768\"\n" \
+ " echo \" 720p[-16 OR -24] LCD 720P 1280x720\"\n" \
+ " echo \" sxga[-16 OR -24] LCD SXGA 1280x1024\"\n" \
+ " echo \" uxga[-16 OR -24] LCD UXGA 1600x1200\"\n" \
+ " echo \n " \
+ " echo \"Default `display` environment variable is now being set to: 15\"\n" \
+ " setenv display 15\n" \
+ " setenv preboot\n" \
+ " echo \n " \
+ " echo \"At the U-Boot prompt type commands: `setenv display <num>`, then type\"\n" \
+ " echo \"`saveenv` to save the environment to NAND flash. This will avoid seeing\"\n" \
+ " echo \"this notice on future boots\" \n " \
+ " echo =================================== NOTICE ===================================\n" \
+ " echo \n " \
+ "fi"
#ifdef CONFIG_USB_TTY
#define OMAP3LOGIC_USBTTY "usbtty=cdc_acm\0"
@@ -403,171 +432,153 @@
"nfsrootpath=/opt/nfs-exports/ltib-omap\0" \
"nfsoptions=,wsize=1500,rsize=1500\0" \
"rotation=0\0" \
- "autoboot=echo \"\n== Checking mmc1 for alternate boot script " CONFIG_MMC_BOOTSCRIPT_NAME " ==\";" \
+ "autoboot=run _autoboot\0_autoboot=echo \"\n== Checking mmc1 for alternate boot script " CONFIG_MMC_BOOTSCRIPT_NAME " ==\";" \
" if mmc init; then \n" \
- " if run loadbootscript; then \n" \
+ " if run _loadbootscript; then \n" \
" echo \"\"; \n" \
" echo \"== Found script on mmc 1, starting ==\"; \n" \
" run bootscript; \n" \
" else \n" \
" echo \"\"; \n" \
" echo \"== Script not found on mmc 1, proceeding with defaultboot ==\"; \n" \
- " run defaultboot;\n" \
+ " run _defaultboot;\n" \
" fi; \n" \
- " else run defaultboot; fi\0" \
- "loadbootscript=fatload mmc 1 $mmc_bootscript_addr " CONFIG_MMC_BOOTSCRIPT_NAME "\0" \
+ " else run _defaultboot; fi\0" \
+ "_loadbootscript=fatload mmc 1 $mmc_bootscript_addr " CONFIG_MMC_BOOTSCRIPT_NAME "\0" \
"bootscript=source ${mmc_bootscript_addr}\0" \
- "vrfb_arg=if itest ${rotation} -ne 0; then \n" \
- "setenv bootargs ${bootargs} omapfb.vrfb=y omapfb.rotate=${rotation}; \n" \
- "fi\0" \
+ "_vrfb_arg=if itest ${rotation} -ne 0; then \n" \
+ " setenv bootargs ${bootargs} omapfb.vrfb=y omapfb.rotate=${rotation}; \n" \
+ " fi\0" \
"dump_bootargs=echo \"\"; echo \"== Kernel bootargs ==\"; echo $bootargs; echo \"\"; \0" \
- "dump_boot_sources=echo \"kernel_location: $kernel_location, " \
+ "_dump_boot_sources=echo \"kernel_location: $kernel_location, " \
"rootfs_location: $rootfs_location, " \
"rootfs_type: $rootfs_type\"; " \
"echo \"\"; " \
"\0" \
- "load_kernel=if test $kernel_location = 'ram'; then \n" \
- " echo \"== kernel located at $loadaddr ==\"; \n" \
- " echo \"\"; \n" \
- " setenv bootm_arg1 ${loadaddr};\n" \
- " else \n" \
- " if test $kernel_location = 'nand'; then \n" \
- " echo \"== Loading kernel from nand to $loadaddr ==\"; \n" \
- " nand read.i $loadaddr $kernel_partition; \n" \
+ \
+ /* load_kernel_* targets */ \
+ "_load_kernel_ram=if true;then;\n" \
+ " echo \"== kernel located at $Loadaddr ==\n\"\n" \
+ " setenv bootm_arg1 ${loadaddr}\n" \
+ " fi\0" \
+ "_load_kernel_nand=if true;then;\n" \
+ " echo \"== Loading kernel from nand to $loadaddr ==\"; \n" \
+ " nand read.i $loadaddr $kernel_partition; \n" \
+ " echo \"\"; \n" \
+ " setenv bootm_arg1 ${loadaddr};\n" \
+ " fi\0" \
+ "_load_kernel_nand-part=if true;then;\n" \
+ " echo \"== Loading kernel from nand partition $kernel_partition to $loadaddr ==\"; \n" \
+ " nboot $loadaddr $kernel_partition; \n" \
+ " echo \"\"; \n" \
+ " setenv bootm_arg1 ${loadaddr};\n" \
+ " fi\0" \
+ "_load_kernel_mmc=if true;then;\n" \
+ " echo \"== Loading kernel file $kernelimage to $loadaddr ==\"; \n" \
+ " mmc init; \n" \
+ " fatload mmc 1 $loadaddr $kernelimage; \n" \
+ " echo \"\"; \n" \
+ " setenv bootm_arg1 ${loadaddr};\n" \
+ " fi\0" \
+ "_load_kernel_tftp=if true;then;\n" \
+ " echo \"== Loading kernel file $tftpdir$kernelimage to $loadaddr ==\"; \n" \
+ " tftpboot $loadaddr $tftpdir$kernelimage; \n" \
+ " echo \"\"; \n" \
+ " setenv bootm_arg1 ${loadaddr};\n" \
+ " fi\0" \
+ "_load_kernel=setenv bootm_arg1;if run _load_kernel_$kernel_location; then;else \n" \
+ " echo \"\033[31m== kernel_location must be set to ram, nand, mmc, or tftp!! ==\033[0m\"; \n" \
" echo \"\"; \n" \
- " setenv bootm_arg1 ${loadaddr};\n" \
- " else \n" \
- " if test $kernel_location = 'nand-part'; then \n" \
- " echo \"== Loading kernel from nand partition $kernel_partition to $loadaddr ==\"; \n" \
- " nboot $loadaddr $kernel_partition; \n" \
- " echo \"\"; \n" \
- " setenv bootm_arg1 ${loadaddr};\n" \
- " else \n" \
- " if test $kernel_location = 'mmc'; then \n" \
- " echo \"== Loading kernel file $kernelimage to $loadaddr ==\"; \n" \
- " mmc init; \n" \
- " fatload mmc 1 $loadaddr $kernelimage; \n" \
+ " fi\n\0" \
+ \
+ /* load_rootfs_* targets */ \
+ "_load_rootfs_ram=if true;then;\n" \
+ " echo \"== rootfs located at $ramdiskaddr ==\"; \n" \
" echo \"\"; \n" \
- " setenv bootm_arg1 ${loadaddr};\n" \
- " else \n" \
- " if test $kernel_location = 'tftp'; then \n" \
- " echo \"== Loading kernel file $tftpdir$kernelimage to $loadaddr ==\"; \n" \
- " tftpboot $loadaddr $tftpdir$kernelimage; \n" \
- " echo \"\"; \n" \
- " setenv bootm_arg1 ${loadaddr};\n" \
- " else \n" \
- " echo \"== kernel_location must be set to ram, nand, mmc, or tftp!! ==\"; \n" \
- " echo \"\"; \n" \
- " fi; \n" \
- " fi; \n" \
- " fi; \n" \
- " fi; \n" \
- " fi\n " \
- "\0" \
- "load_rootfs=if test $rootfs_location = 'ram'; then \n" \
- " echo \"== rootfs located at $ramdiskaddr ==\"; \n" \
- " echo \"\"; \n" \
- " setenv bootm_arg2 ${ramdiskaddr}; \n" \
- " else \n" \
- " if test $rootfs_location = 'tftp'; then \n" \
- " echo \"== Loading rootfs file $tftpdir$ramdiskimage to $ramdiskaddr ==\"; \n" \
- " tftpboot $ramdiskaddr $tftpdir$ramdiskimage;\n" \
- " echo \"\"; \n" \
- " setenv bootm_arg2 ${ramdiskaddr}; \n" \
- " else \n" \
- " if test $rootfs_location = '/dev'; then \n" \
- " echo \"== rootfs located in $rootfs_device ==\"; \n" \
- " echo \"\"; \n" \
- " setenv bootargs ${bootargs} root=${rootfs_device}; \n" \
- " setenv bootm_arg2; \n" \
- " else \n" \
- " if test $rootfs_location = 'nfs'; then \n" \
+ " setenv bootm_arg2 ${ramdiskaddr}; \n" \
+ " fi\0" \
+ "_load_rootfs_tftp=if true;then;\n" \
+ " echo \"== Loading rootfs file $tftpdir$ramdiskimage to $ramdiskaddr ==\"; \n" \
+ " tftpboot $ramdiskaddr $tftpdir$ramdiskimage;\n" \
+ " echo \"\"; \n" \
+ " setenv bootm_arg2 ${ramdiskaddr}; \n" \
+ " fi\0" \
+ "_load_rootfs_/dev=if true;then;\n" \
+ " echo \"== rootfs located in $rootfs_device ==\"; \n" \
+ " echo \"\"; \n" \
+ " setenv bootargs ${bootargs} root=${rootfs_device}; \n" \
+ " fi\0" \
+ "_load_rootfs_nfs=if true;then;\n" \
" echo \"== rootfs located at $nfsrootpath on server $serverip ==\"; \n" \
" echo \"\"; \n" \
" setenv bootargs ${bootargs} root=/dev/nfs; \n" \
- " setenv bootm_arg2; \n" \
- " else \n" \
- " if test $rootfs_location = 'mmc'; then\n " \
- " echo \"== Loading rootfs file $ramdiskimage to $ramdiskaddr ==\"; \n" \
- " fatload mmc 1 ${ramdiskaddr} ${ramdiskimage}; \n"\
- " setenv bootm_arg2 ${ramdiskaddr}; \n" \
- " else \n" \
- " if test $rootfs_location = 'nand'; then \n" \
- " echo \"== Loading rootfs from nand to $ramdiskaddr ==\"; \n" \
- " nand read.i $ramdiskaddr $ramdisk_partition; \n" \
- " setenv bootm_arg2 ${ramdiskaddr}; \n" \
- " else \n"\
- " if test $rootfs_location = 'nand-part'; then \n" \
+ " fi\0" \
+ "_load_rootfs_mmc=if true;then;\n" \
+ " echo \"== Loading rootfs file $ramdiskimage to $ramdiskaddr ==\"; \n" \
+ " fatload mmc 1 ${ramdiskaddr} ${ramdiskimage}; \n"\
+ " setenv bootm_arg2 ${ramdiskaddr}; \n" \
+ " fi\0" \
+ "_load_rootfs_nand=if true;then;\n" \
+ " echo \"== Loading rootfs from nand to $ramdiskaddr ==\"; \n" \
+ " nand read.i $ramdiskaddr $ramdisk_partition; \n" \
+ " setenv bootm_arg2 ${ramdiskaddr}; \n" \
+ " fi\0" \
+ "_load_rootfs_nand-part=if true;then;\n" \
" echo \"== Loading rootfs from nand partition $ramdisk_partition to $ramdiskaddr ==\"; \n" \
" nand read.i $ramdiskaddr $ramdisk_partition; \n" \
" setenv bootm_arg2 ${ramdiskaddr}; \n" \
- " else \n"\
- " echo \"== rootfs_location must be set to ram, tftp, /dev, nfs, mmc, nand-part or nand!! == \"; \n" \
- " echo \"\"; \n" \
- " fi; \n" \
- " fi; \n" \
- " fi; \n" \
- " fi; \n" \
- " fi; \n" \
- " fi; \n" \
- " fi" \
- "\0" \
- "set_rootfs_type=if test $rootfs_type = 'ramdisk'; then \n" \
- " setenv bootargs ${bootargs} root=/dev/ram rw ramdisk_size=${ramdisksize}; \n" \
- " else \n" \
- " if test $rootfs_type = 'jffs'; then \n" \
- " setenv bootargs ${bootargs} rw rootfstype=jffs2;\n" \
- " else \n" \
- " if test $rootfs_type = 'yaffs'; then \n" \
- " setenv bootargs ${bootargs} rw rootfstype=yaffs2;\n" \
- " else \n" \
- " if test $rootfs_type = 'ext3'; then \n" \
- " setenv bootargs ${bootargs} rw rootfstype=ext3 rootwait; \n" \
- " else \n" \
- " if test $rootfs_type = 'nfs'; then \n" \
- " setenv bootargs ${bootargs} rw nfsroot=${serverip}:${nfsrootpath}${nfsoptions} ip=dhcp; \n" \
- " else \n"\
- " echo \"$rootfs_type must be set to ramdisk, jffs, yaffs, ext3, or nfs\"; \n" \
- " echo \"\"; \n" \
- " fi; \n" \
- " fi; \n" \
- " fi; \n" \
- " fi; \n" \
- " fi" \
- "\0" \
- "addmtdparts=setenv bootargs ${bootargs} ${mtdparts} \0" \
- "common_bootargs=" \
- " setenv bootargs ${bootargs} display=${display} ${otherbootargs}; " \
- " run addmtdparts; " \
- " run vrfb_arg; " \
- "\0" \
- "dump_run_bootm=" \
- " echo \"bootm $bootm_arg1 $bootm_arg2\"; " \
- " echo \"\"; " \
- " bootm $bootm_arg1 $bootm_arg2\0" \
- "defaultboot=" \
- " run dump_boot_sources; " \
- " run setconsole; setenv bootargs console=${console}; " \
- " run common_bootargs; " \
- " run load_kernel; " \
- " run load_rootfs; " \
- " run set_rootfs_type; " \
- " run dump_bootargs; " \
- " run dump_run_bootm; " \
- "\0" \
- "nfsboot=" \
- " setenv kernel_location tftp; " \
- " setenv rootfs_location nfs; " \
- " setenv rootfs_type nfs; " \
- " run defaultboot; " \
- "\0" \
- "ramboot=" \
- " setenv kernel_location tftp; " \
- " setenv rootfs_location tftp; " \
- " setenv rootfs_type ramdisk; " \
- " run defaultboot; " \
- "\0" \
- "checkerror=if test $error = '';\n" \
+ " fi\0" \
+ "_load_rootfs=setenv bootm_arg2;if run _load_rootfs_$rootfs_location; then;else \n" \
+ " echo \"\033[31m== rootfs_location must be set to ram, tftp, /dev, nfs, mmc, nand-part or nand!! == \033[0m\"; \n" \
+ " echo \"\"; \n" \
+ " fi\n\0" \
+ \
+ /* set_rootfs_type_* targets */ \
+ "_set_rootfs_type_ramdisk=setenv bootargs ${bootargs} root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \
+ "_set_rootfs_type_jffs=setenv bootargs ${bootargs} rw rootfstype=jffs2\0" \
+ "_set_rootfs_type_yaffs=setenv bootargs ${bootargs} rw rootfstype=yaffs2\0" \
+ "_set_rootfs_type_ext3=setenv bootargs ${bootargs} rw rootfstype=ext3 rootwait\0" \
+ "_set_rootfs_type_nfs=setenv bootargs ${bootargs} rw nfsroot=${serverip}:${nfsrootpath}${nfsoptions} ip=dhcp\0" \
+ "_set_rootfs_type=if run _set_rootfs_type_${rootfs_type}; then;else \n" \
+ " echo \"\033[31m== $rootfs_type must be set to ramdisk, jffs, yaffs, ext3, or nfs ==\033[0m\"; \n" \
+ " echo \"\"; \n" \
+ " fi\0" \
+ \
+ /* Other misc. scripts */ \
+ "_addmtdparts=setenv bootargs ${bootargs} ${mtdparts} \0" \
+ "_common_bootargs=if true;then;\n" \
+ " setenv bootargs ${bootargs} display=${display} ${otherbootargs};\n" \
+ " run _addmtdparts;\n" \
+ " run _vrfb_arg;\n" \
+ " fi\0" \
+ "_dump_run_bootm=if true;then\n" \
+ " echo \"bootm $bootm_arg1 $bootm_arg2\";\n" \
+ " echo \"\";\n" \
+ " bootm $bootm_arg1 $bootm_arg2\n" \
+ " fi\0" \
+ "defaultboot=run _defaultboot\0_defaultboot=if true;then\n" \
+ " run _dump_boot_sources;\n" \
+ " run setconsole; setenv bootargs console=${console};\n" \
+ " run _common_bootargs;\n" \
+ " run _load_kernel;\n" \
+ " run _load_rootfs;\n" \
+ " run _set_rootfs_type;\n" \
+ " run dump_bootargs;\n" \
+ " run _dump_run_bootm;\n" \
+ " fi\0" \
+ "nfsboot=if true;then\n" \
+ " setenv kernel_location tftp\n" \
+ " setenv rootfs_location nfs\n" \
+ " setenv rootfs_type nfs\n" \
+ " run defaultboot\n" \
+ " fi\0" \
+ "ramboot=if true;then\n" \
+ " setenv kernel_location tftp\n" \
+ " setenv rootfs_location tftp\n" \
+ " setenv rootfs_type ramdisk\n" \
+ " run defaultboot\n" \
+ " fi\0" \
+ "_checkerror=if test $error = '';\n" \
" then\n" \
" echo \033[31m${error}\033[0m\n" \
" echo_lcd /pAA/k${error}\n" \
@@ -578,19 +589,19 @@
" echo_lcd /kand restart the devkit./n\n" \
" fi" \
"\0" \
- "initmmc=if test $error = '';then;else\n" \
+ "_initmmc=if test $error = '';then;else\n" \
" if mmc init;then;else;\n" \
" setenv error \"Failed to initialize MMC\"\n" \
" fi\n" \
" fi" \
"\0" \
- "checkmmcfile=if test $error = '';then;else\n" \
+ "_checkmmcfile=if test $error = '';then;else\n" \
" if fatload mmc 1 ${loadaddr} ${arg_filename} 1;then;else;\n" \
" setenv error \"Unable to load ${arg_filename}\";\n" \
" fi\n" \
" fi" \
"\0" \
- "burnfile=if test $error = '';then;else\n" \
+ "_burnfile=if test $error = '';then;else\n" \
" echo \"\033[1m== Loading ${arg_filename} ==\033[0m\"\n" \
" echo_lcd /pAA/kPartition ${arg_partition}:\n" \
" echo_lcd /pBA/kLoading ${arg_filename}/aC;lcd_percent \"/gC/k /P%...\"\n" \
@@ -599,7 +610,7 @@
" lcd_percent \"/pBA/kErasing Partition /P%...\"\n" \
" nand erase.part ${arg_partition}\n" \
" echo_lcd /pBA/kWriting ${arg_filename} to Partition/aC;lcd_percent \"/gC/k /P%...\"\n" \
- " nand ${arg_writecmd} ${loadaddr} ${arg_partition} ${filesize}\n" \
+ " nand write.auto ${loadaddr} ${arg_partition} ${filesize}\n" \
" lcd_percent \"\"\n" \
" echo_lcd /pAA/k/pAB/k\n" \
" else\n" \
@@ -607,51 +618,36 @@
" fi\n" \
" fi" \
"\0" \
- "burnmmcxloader=if test $error = '';then;else\n" \
- " nandecc hw;\n" \
- " arg_filename=${xloadimage};arg_partition=${xloader_partition};arg_writecmd=write.i;\n" \
- " run burnfile\n" \
- " if test $error = '';then;else\n" \
- " nand write.i ${loadaddr} 0x00020000 ${filesize}\n" \
- " nand write.i ${loadaddr} 0x00040000 ${filesize}\n" \
- " nand write.i ${loadaddr} 0x00060000 ${filesize}\n" \
- " fi\n" \
- " fi" \
- "\0" \
- "burncommon=if test $error = '';then;else\n" \
- " arg_filename=${xloadimage};run checkmmcfile;\n" \
- " arg_filename=${ubootimage};run checkmmcfile;\n" \
- " arg_filename=${kernelimage};run checkmmcfile;\n" \
- " run burnmmcxloader;\n" \
- " nandecc ${defaultecc};\n" \
- " arg_writecmd=write.i;\n" \
- " arg_filename=${ubootimage};arg_partition=${uboot_partition};run burnfile;\n" \
- " arg_filename=${kernelimage};arg_partition=${kernel_partition};run burnfile;\n" \
+ "_burncommon=if test $error = '';then;else\n" \
+ " arg_filename=${xloadimage};run _checkmmcfile;\n" \
+ " arg_filename=${ubootimage};run _checkmmcfile;\n" \
+ " arg_filename=${kernelimage};run _checkmmcfile;\n" \
+ " arg_filename=${xloadimage};arg_partition=${xloader_partition};run _burnfile;\n" \
+ " arg_filename=${ubootimage};arg_partition=${uboot_partition};run _burnfile;\n" \
+ " arg_filename=${kernelimage};arg_partition=${kernel_partition};run _burnfile;\n" \
" fi" \
"\0" \
- "makenandboot=if true;then;\n" \
+ "makenandboot=run _makenandboot\0_makenandboot=if true;then;\n" \
" setenv error;\n" \
- " run initmmc;\n" \
- " arg_filename=${ramdiskimage};run checkmmcfile;\n" \
- " run burncommon;\n" \
- " arg_filename=${ramdiskimage};arg_partition=${ramdisk_partition};arg_writecmd=write.i;\n" \
- " run burnfile;\n" \
+ " run _initmmc;\n" \
+ " arg_filename=${ramdiskimage};run _checkmmcfile;\n" \
+ " run _burncommon;\n" \
+ " arg_filename=${ramdiskimage};arg_partition=${ramdisk_partition};run _burnfile;\n" \
" if test $error = '';then;else\n" \
" setenv kernel_location nand-part\n" \
" setenv rootfs_location nand-part\n" \
" setenv rootfs_type ramdisk\n" \
" saveenv\n" \
" fi\n" \
- " run checkerror;\n" \
+ " run _checkerror;\n" \
" fi" \
"\0" \
- "makeyaffsboot=if true;then;\n" \
+ "makeyaffsboot=run _makeyaffsboot\0_makeyaffsboot=if true;then;\n" \
" setenv error;\n" \
- " run initmmc;\n" \
- " arg_filename=${yaffsimage};run checkmmcfile;\n" \
- " run burncommon;\n" \
- " arg_filename=${yaffsimage};arg_partition=${yaffs_partition};arg_writecmd=write.yaffs;\n" \
- " run burnfile;\n" \
+ " run _initmmc;\n" \
+ " arg_filename=${yaffsimage};run _checkmmcfile;\n" \
+ " run _burncommon;\n" \
+ " arg_filename=${yaffsimage};arg_partition=${yaffs_partition};run _burnfile\n" \
" if test $error = '';then;else\n" \
" setenv kernel_location nand-part\n" \
" setenv rootfs_location /dev\n" \
@@ -659,7 +655,7 @@
" setenv rootfs_device /dev/mtdblock5\n" \
" saveenv\n" \
" fi\n" \
- " run checkerror;\n" \
+ " run _checkerror;\n" \
" fi" \
"\0"
diff --git a/include/fastboot.h b/include/fastboot.h
new file mode 100644
index 0000000000..5bf06b3f32
--- /dev/null
+++ b/include/fastboot.h
@@ -0,0 +1,377 @@
+/*
+ * (C) Copyright 2008 - 2009
+ * Windriver, <www.windriver.com>
+ * Tom Rix <Tom.Rix@windriver.com>
+ *
+ * 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
+ *
+ * The logical naming of flash comes from the Android project
+ * Thse structures and functions that look like fastboot_flash_*
+ * They come from bootloader/legacy/include/boot/flash.h
+ *
+ * The boot_img_hdr structure and associated magic numbers also
+ * come from the Android project. They are from
+ * system/core/mkbootimg/bootimg.h
+ *
+ * Here are their copyrights
+ *
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+#ifndef FASTBOOT_H
+#define FASTBOOT_H
+
+#include <common.h>
+#include <command.h>
+
+/* This is the interface file between the common cmd_fastboot.c and
+ the board specific support.
+
+ To use this interface, define CONFIG_FASTBOOT in your board config file.
+ An example is include/configs/omap3430labrador.h
+ ...
+ #define CONFIG_FASTBOOT 1 / * Using fastboot interface * /
+ ...
+
+ An example of the board specific spupport for omap3 is found at
+ cpu/omap3/fastboot.c
+
+*/
+
+/* From fastboot client.. */
+#define FASTBOOT_INTERFACE_CLASS 0xff
+#define FASTBOOT_INTERFACE_SUB_CLASS 0x42
+#define FASTBOOT_INTERFACE_PROTOCOL 0x03
+
+#define FASTBOOT_VERSION "0.5"
+
+/* The fastboot client uses a value of 2048 for the
+ page size of it boot.img file format.
+ Reset this in your board config file as needed. */
+#ifndef CONFIG_FASTBOOT_MKBOOTIMAGE_PAGE_SIZE
+#define CONFIG_FASTBOOT_MKBOOTIMAGE_PAGE_SIZE 2048
+#endif
+
+/* Fastboot bulk packet sizes */
+#define CONFIG_USBD_FASTBOOT_BULK_PKTSIZE_HS 512
+#define CONFIG_USBD_FASTBOOT_BULK_PKTSIZE_FS 64
+
+/* Flags */
+#define FASTBOOT_FLAG_RESPONSE 1
+#define FASTBOOT_FLAG_DOWNLOAD 1
+
+/* To change design of memory handling (SD/MMC, NAND) faster, if required */
+#define FASTBOOT_PORT_OMAPZOOM_NAND_FLASHING
+/* To activate-deactivate fastboot upload command (not part of OmapZoom) */
+// #define FASTBOOT_UPLOAD
+
+struct cmd_fastboot_interface{
+
+ /* A getvar string for the product name
+ It can have a maximum of 60 characters
+
+ Set by board */
+ char *product_name;
+
+ /* A getvar string for the serial number
+ It can have a maximum of 60 characters
+
+ Set by board */
+ char *serial_no;
+
+ /* Nand block size
+ Supports the write option WRITE_NEXT_GOOD_BLOCK
+
+ Set by board */
+ unsigned int nand_block_size;
+
+ /* Nand oob size
+ Set by board */
+ unsigned int nand_oob_size;
+
+ /* Transfer buffer, for handling flash updates
+ Should be multiple of the nand_block_size
+ Care should be take so it does not overrun bootloader memory
+ Controlled by the configure variable CONFIG_FASTBOOT_TRANSFER_BUFFER
+
+ Set by board */
+ unsigned char *transfer_buffer;
+
+ /* How big is the transfer buffer
+ Controlled by the configure variable
+ CONFIG_FASTBOOT_TRANSFER_BUFFER_SIZE
+
+ Set by board */
+ unsigned int transfer_buffer_size;
+
+ /* Download size, if download has to be done. This can be checked to find
+ whether next packet is a command or a data */
+ unsigned int d_size;
+
+ /* Data downloaded so far */
+ unsigned int d_bytes;
+
+ /* Upload size, if download has to be done */
+ unsigned int u_size;
+
+ /* Data uploaded so far */
+ unsigned int u_bytes;
+
+ /* XXX: what should be the size, 64 or 65 ? */
+ char response[65];
+
+ /* Indicate response to be sent, data to be recieved */
+ unsigned int flag;
+
+ /* configuration status */
+ unsigned int configured;
+
+#ifdef FASTBOOT_PORT_OMAPZOOM_NAND_FLASHING
+ unsigned int download_bytes_unpadded;
+#endif
+
+ unsigned int exit;
+};
+
+/* Android-style flash naming */
+typedef struct fastboot_ptentry fastboot_ptentry;
+
+/* flash partitions are defined in terms of blocks
+** (flash erase units)
+*/
+struct fastboot_ptentry{
+
+ /* The logical name for this partition, null terminated */
+ char name[16];
+ /* The start wrt the nand part, must be multiple of nand block size */
+ unsigned int start;
+ /* The length of the partition, must be multiple of nand block size */
+ unsigned int length;
+ /* Controls the details of how operations are done on the partition
+ See the FASTBOOT_PTENTRY_FLAGS_*'s defined below */
+ unsigned int flags;
+};
+
+/* Lower byte shows if the read/write/erase operation in
+ repeated. The base address is incremented.
+ Either 0 or 1 is ok for a default */
+
+#define FASTBOOT_PTENTRY_FLAGS_REPEAT_MASK(n) (n & 0x0f)
+#define FASTBOOT_PTENTRY_FLAGS_REPEAT_4 0x00000004
+
+/* Writes happen a block at a time.
+ If the write fails, go to next block
+ NEXT_GOOD_BLOCK and CONTIGOUS_BLOCK can not both be set */
+#define FASTBOOT_PTENTRY_FLAGS_WRITE_NEXT_GOOD_BLOCK 0x00000010
+
+/* Find a contiguous block big enough for a the whole file
+ NEXT_GOOD_BLOCK and CONTIGOUS_BLOCK can not both be set */
+#define FASTBOOT_PTENTRY_FLAGS_WRITE_CONTIGUOUS_BLOCK 0x00000020
+
+/* Sets the ECC to hardware before writing
+ HW and SW ECC should not both be set. */
+#define FASTBOOT_PTENTRY_FLAGS_WRITE_HW_ECC 0x00000040
+
+/* Sets the ECC to software before writing
+ HW and SW ECC should not both be set. */
+#define FASTBOOT_PTENTRY_FLAGS_WRITE_SW_ECC 0x00000080
+
+/* Write the file with write.i */
+#define FASTBOOT_PTENTRY_FLAGS_WRITE_I 0x00000100
+
+/* Write the file with write.jffs2 */
+#define FASTBOOT_PTENTRY_FLAGS_WRITE_JFFS2 0x00000200
+
+/* Write the file as a series of variable/value pairs
+ using the setenv and saveenv commands */
+#define FASTBOOT_PTENTRY_FLAGS_WRITE_ENV 0x00000400
+
+/* Sets the NANDECC to use Kernel/FS layout for writing */
+#define FASTBOOT_PTENTRY_FLAGS_HW_ECC_LAYOUT_1 0x00000800
+
+/* Sets the NANDECC to use X-loader/U-boot layout for writing */
+#define FASTBOOT_PTENTRY_FLAGS_HW_ECC_LAYOUT_2 0x00001000
+
+/* Sets the ECC to software before writing
+ HW and SW ECC should not both be set. */
+#define FASTBOOT_PTENTRY_FLAGS_WRITE_CHIP_ECC 0x00002000
+
+/* Write the file with write.yaffs */
+#define FASTBOOT_PTENTRY_FLAGS_WRITE_YAFFS 0x00004000
+
+/* Status values */
+#define FASTBOOT_OK 0
+#define FASTBOOT_ERROR -1
+#define FASTBOOT_DISCONNECT 1
+#define FASTBOOT_INACTIVE 2
+
+/* Android bootimage file format */
+#define FASTBOOT_BOOT_MAGIC "ANDROID!"
+#define FASTBOOT_BOOT_MAGIC_SIZE 8
+#define FASTBOOT_BOOT_NAME_SIZE 16
+#define FASTBOOT_BOOT_ARGS_SIZE 512
+
+struct fastboot_boot_img_hdr {
+ unsigned char magic[FASTBOOT_BOOT_MAGIC_SIZE];
+
+ unsigned kernel_size; /* size in bytes */
+ unsigned kernel_addr; /* physical load addr */
+
+ unsigned ramdisk_size; /* size in bytes */
+ unsigned ramdisk_addr; /* physical load addr */
+
+ unsigned second_size; /* size in bytes */
+ unsigned second_addr; /* physical load addr */
+
+ unsigned tags_addr; /* physical addr for kernel tags */
+ unsigned page_size; /* flash page size we assume */
+ unsigned unused[2]; /* future expansion: should be 0 */
+
+ unsigned char name[FASTBOOT_BOOT_NAME_SIZE]; /* asciiz product name */
+
+ unsigned char cmdline[FASTBOOT_BOOT_ARGS_SIZE];
+
+ unsigned id[8]; /* timestamp / checksum / sha1 / etc */
+};
+
+#ifdef CONFIG_CMD_FASTBOOT
+/* A board specific test if u-boot should go into the fastboot command
+ ahead of the bootcmd
+ Returns 0 to continue with normal u-boot flow
+ Returns 1 to execute fastboot */
+extern int fastboot_preboot(void);
+
+/* Initizes the board specific fastboot
+ Returns 0 on success
+ Returns 1 on failure */
+extern int fastboot_init(struct cmd_fastboot_interface *interface);
+
+/* Cleans up the board specific fastboot */
+extern void fastboot_shutdown(void);
+
+/*
+ * Handles board specific usb protocol exchanges
+ * Returns 0 on success
+ * Returns 1 on disconnects, break out of loop
+ * Returns 2 if no USB activity detected
+ * Returns -1 on failure, unhandled usb requests and other error conditions
+*/
+extern int fastboot_poll(void);
+
+/* Is this high speed (2.0) or full speed (1.1) ?
+ Returns 0 on full speed
+ Returns 1 on high speed */
+extern int fastboot_is_highspeed(void);
+
+/* Return the size of the fifo */
+extern int fastboot_fifo_size(void);
+
+/* Send a status reply to the client app
+ buffer does not have to be null terminated.
+ buffer_size must be not be larger than what is returned by
+ fastboot_fifo_size
+ Returns 0 on success
+ Returns 1 on failure */
+extern int fastboot_tx_status(const char *buffer, unsigned int buffer_size);
+
+/*
+ * Send some data to the client app
+ * buffer does not have to be null terminated.
+ * buffer_size can be larger than what is returned by
+ * fastboot_fifo_size
+ * Returns number of bytes written
+ */
+extern int fastboot_tx(unsigned char *buffer, unsigned int buffer_size);
+
+/* A board specific variable handler.
+ The size of the buffers is governed by the fastboot spec.
+ rx_buffer is at most 57 bytes
+ tx_buffer is at most 60 bytes
+ Returns 0 on success
+ Returns 1 on failure */
+extern int fastboot_getvar(const char *rx_buffer, char *tx_buffer);
+
+/* The Android-style flash handling */
+
+/* tools to populate and query the partition table */
+extern void fastboot_flash_add_ptn(fastboot_ptentry *ptn);
+extern fastboot_ptentry *fastboot_flash_find_ptn(const char *name);
+extern fastboot_ptentry *fastboot_flash_get_ptn(unsigned n);
+extern unsigned int fastboot_flash_get_ptn_count(void);
+extern void fastboot_flash_dump_ptn(void);
+
+extern int fastboot_flash_init(void);
+extern int fastboot_flash_erase(fastboot_ptentry *ptn);
+extern int fastboot_flash_read_ext(fastboot_ptentry *ptn,
+ unsigned extra_per_page, unsigned offset,
+ void *data, unsigned bytes);
+#define fastboot_flash_read(ptn, offset, data, bytes) \
+ flash_read_ext(ptn, 0, offset, data, bytes)
+extern int fastboot_flash_write(fastboot_ptentry *ptn, unsigned extra_per_page,
+ const void *data, unsigned bytes);
+
+
+#else
+
+/* Stubs for when CONFIG_FASTBOOT is not defined */
+#define fastboot_preboot() 0
+#define fastboot_init(a) 1
+#define fastboot_shutdown()
+#define fastboot_poll() 1
+#define fastboot_is_highspeed() 0
+#define fastboot_fifo_size() 0
+#define fastboot_tx_status(a, b) 1
+#define fastboot_getvar(a, b) 1
+#define fastboot_tx(a, b) 1
+
+#define fastboot_flash_add_ptn(a)
+#define fastboot_flash_find_ptn(a) NULL
+#define fastboot_flash_get_ptn(a) NULL
+#define fastboot_flash_get_ptn_count() 0
+#define fastboot_flash_dump_ptn()
+#define fastboot_flash_init()
+#define fastboot_flash_erase(a) 1
+#define fastboot_flash_read_ext(a, b, c, d, e) 0
+#define fastboot_flash_read(a, b, c, d, e) 0
+#define fastboot_flash_write(a, b, c, d) 0
+
+#endif /* CONFIG_FASTBOOT */
+#endif /* FASTBOOT_H */
diff --git a/include/jffs2/load_kernel.h b/include/jffs2/load_kernel.h
index 7d549d957f..4b2da4c61a 100644
--- a/include/jffs2/load_kernel.h
+++ b/include/jffs2/load_kernel.h
@@ -35,6 +35,18 @@
#define MTD_DEV_TYPE(type) ((type == MTD_DEV_TYPE_NAND) ? "nand" : \
(type == MTD_DEV_TYPE_ONENAND) ? "onenand" : "nor")
+enum mtdflags
+{
+ MTDFLAGS_ECC_SW,
+ MTDFLAGS_ECC_HW,
+ MTDFLAGS_ECC_CHIP,
+ MTDFLAGS_ECC_BCH,
+ MTDFLAGS_YAFFS,
+ MTDFLAGS_REPEAT,
+};
+
+#define MTDFLAGS_DEFAULT_PERMITTED ((1 << MTDFLAGS_ECC_SW) | (1 << MTDFLAGS_ECC_HW) | (1 << MTDFLAGS_ECC_CHIP) | (1 << MTDFLAGS_ECC_BCH))
+
struct mtd_device {
struct list_head link;
struct mtdids *id; /* parent mtd id entry */
@@ -51,6 +63,7 @@ struct part_info {
void *jffs2_priv; /* used internaly by jffs2 */
u32 mask_flags; /* kernel MTD mask flags */
u32 sector_size; /* size of sector */
+ u32 mtdflags_mask; /* (1 << enum mtdflags) mask */
struct mtd_device *dev; /* parent device */
};
diff --git a/include/linux/string.h b/include/linux/string.h
index 62390399b0..69d5a61b98 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -26,6 +26,9 @@ extern char * strcpy(char *,const char *);
#ifndef __HAVE_ARCH_STRNCPY
extern char * strncpy(char *,const char *, __kernel_size_t);
#endif
+#ifndef __HAVE_ARCH_STPNCPY
+extern char * stpncpy(char * dest,const char *src,size_t count);
+#endif
#ifndef __HAVE_ARCH_STRCAT
extern char * strcat(char *, const char *);
#endif
diff --git a/include/mtd_parts.h b/include/mtd_parts.h
index 87e2882c69..9f383eece2 100644
--- a/include/mtd_parts.h
+++ b/include/mtd_parts.h
@@ -32,4 +32,5 @@ extern void mtd_set_part_priv(void *cookie, void *priv);
extern int mtd_id_parse(const char *id, const char **ret_id,
u8 *dev_type, u8 *dev_num, int quiet);
extern int mtdparts_init(void);
+extern int mtd_part_getmask(struct part_info *part);
#endif
diff --git a/include/nand.h b/include/nand.h
index d135927a29..0b87ca3260 100644
--- a/include/nand.h
+++ b/include/nand.h
@@ -131,6 +131,11 @@ int nand_get_lock_status(nand_info_t *meminfo, loff_t offset);
int nand_get_features( nand_info_t *meminfo, uint8_t faddr, uint8_t *features);
int nand_set_features( nand_info_t *meminfo, uint8_t faddr, uint8_t *features);
+#if CONFIG_OMAP3_LOGIC
+/* Function to disable the NAND in-chip ECC (if applicable) */
+void nand_disable_in_chip_ecc(void);
+#endif
+
#ifdef CONFIG_SYS_NAND_SELECT_DEVICE
void board_nand_select_device(struct nand_chip *nand, int chip);
#endif
diff --git a/include/twl4030.h b/include/twl4030.h
index ec6bc82774..271a7d2a18 100644
--- a/include/twl4030.h
+++ b/include/twl4030.h
@@ -305,6 +305,7 @@
#define TWL4030_PM_RECEIVER_MAINREF_REMAP 0xF1
/* Voltage Selection in PM Receiver Module */
+#define TWL4030_PM_RECEIVER_VAUX1_VSEL_30 0x04
#define TWL4030_PM_RECEIVER_VAUX2_VSEL_18 0x05
#define TWL4030_PM_RECEIVER_VAUX3_VSEL_28 0x03
#define TWL4030_PM_RECEIVER_VPLL2_VSEL_18 0x05
diff --git a/include/usb/musb_udc.h b/include/usb/musb_udc.h
index be808fd516..efd5b9eaab 100644
--- a/include/usb/musb_udc.h
+++ b/include/usb/musb_udc.h
@@ -50,4 +50,8 @@ int udc_init(void);
#endif /* CONFIG_USB_TTY */
+#ifdef CONFIG_CMD_FASTBOOT
+#define EP0_MAX_PACKET_SIZE 64
+#endif /* CONFIG_FASTBOOT */
+
#endif /* __MUSB_UDC_H__ */
diff --git a/include/usbdevice.h b/include/usbdevice.h
index 41716364b3..d46fa06789 100644
--- a/include/usbdevice.h
+++ b/include/usbdevice.h
@@ -291,8 +291,9 @@ struct usb_bus_instance;
* USB Spec Release number
*/
+#ifndef USB_BCD_VERSION
#define USB_BCD_VERSION 0x0110
-
+#endif
/*
* Device Requests (c.f Table 9-2)
@@ -467,7 +468,11 @@ typedef struct urb_link {
* function driver to inform it that data has arrived.
*/
+#if USB_BCD_VERSION == 0x0200
+#define URB_BUF_SIZE 2048
+#else
#define URB_BUF_SIZE 128 /* in linux we'd malloc this, but in u-boot we prefer static data */
+#endif
struct urb {
struct usb_endpoint_instance *endpoint;
@@ -595,6 +600,7 @@ struct usb_device_instance {
unsigned long usbd_rxtx_timestamp;
unsigned long usbd_last_rxtx_timestamp;
+ unsigned int speed;
};
/* Bus Interface configuration structure