]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - include/configs/am335x_evm.h
Convert CONFIG_BOOTCOUNT_AM33XX to Kconfig
[people/ms/u-boot.git] / include / configs / am335x_evm.h
index 796d5c32e946bc53a314c84356350939bbcbdec8..80a523ddce1f27c4c5bc10c77658645456072e7e 100644 (file)
 #define __CONFIG_AM335X_EVM_H
 
 #include <configs/ti_am335x_common.h>
+#include <linux/sizes.h>
 
 #ifndef CONFIG_SPL_BUILD
 # define CONFIG_TIMESTAMP
-# define CONFIG_LZO
 #endif
 
-#define CONFIG_SYS_BOOTM_LEN           (16 << 20)
+#define CONFIG_SYS_BOOTM_LEN           SZ_16M
 
 #define CONFIG_MACH_TYPE               MACH_TYPE_AM335XEVM
 
 #define CONFIG_SYS_LDSCRIPT            "board/ti/am335x/u-boot.lds"
 
 /* Always 128 KiB env size */
-#define CONFIG_ENV_SIZE                        (128 << 10)
+#define CONFIG_ENV_SIZE                        SZ_128K
 
 #ifdef CONFIG_NAND
 #define NANDARGS \
-       "mtdids=" MTDIDS_DEFAULT "\0" \
-       "mtdparts=" MTDPARTS_DEFAULT "\0" \
+       "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
+       "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
        "nandargs=setenv bootargs console=${console} " \
                "${optargs} " \
                "root=${nandroot} " \
        func(PXE, pxe, na) \
        func(DHCP, dhcp, na)
 
-#define CONFIG_BOOTCOMMAND \
-       "if test ${boot_fit} -eq 1; then "      \
-               "run update_to_fit;"    \
-       "fi;"   \
-       "run findfdt; " \
-       "run init_console; " \
-       "run envboot; " \
-       "run distro_bootcmd"
-
 #include <config_distro_bootcmd.h>
 
 #ifndef CONFIG_SPL_BUILD
        "console=ttyO0,115200n8\0" \
        "partitions=" \
                "uuid_disk=${uuid_gpt_disk};" \
-               "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \
+               "name=bootloader,start=384K,size=1792K," \
+                       "uuid=${uuid_gpt_bootloader};" \
+               "name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}\0" \
        "optargs=\0" \
        "ramroot=/dev/ram0 rw\0" \
        "ramrootfstype=ext2\0" \
 #define CONFIG_SYS_NS16550_COM5                0x481a8000      /* UART4 */
 #define CONFIG_SYS_NS16550_COM6                0x481aa000      /* UART5 */
 
-#define CONFIG_CMD_EEPROM
 #define CONFIG_ENV_EEPROM_IS_ON_I2C
 #define CONFIG_SYS_I2C_EEPROM_ADDR     0x50    /* Main EEPROM */
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
 /* SPL */
 #ifndef CONFIG_NOR_BOOT
 /* Bootcount using the RTC block */
-#define CONFIG_BOOTCOUNT_LIMIT
-#define CONFIG_BOOTCOUNT_AM33XX
 #define CONFIG_SYS_BOOTCOUNT_BE
 
 /* USB gadget RNDIS */
-
-#define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/u-boot-spl.lds"
 #endif
 
 #ifdef CONFIG_NAND
 #define CONFIG_SYS_NAND_OOBSIZE                64
 #define CONFIG_SYS_NAND_BLOCK_SIZE     (128*1024)
 /* NAND: driver related configs */
-#define CONFIG_NAND_OMAP_GPMC
-#define CONFIG_NAND_OMAP_GPMC_PREFETCH
-#define CONFIG_NAND_OMAP_ELM
 #define CONFIG_SYS_NAND_BAD_BLOCK_POS  NAND_LARGE_BADBLOCK_POS
 #define CONFIG_SYS_NAND_ECCPOS         { 2, 3, 4, 5, 6, 7, 8, 9, \
                                         10, 11, 12, 13, 14, 15, 16, 17, \
 #define CONFIG_SYS_NAND_ECCBYTES       14
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 #define CONFIG_NAND_OMAP_ECCSCHEME     OMAP_ECC_BCH8_CODE_HW
-#define MTDIDS_DEFAULT                 "nand0=nand.0"
-#define MTDPARTS_DEFAULT               "mtdparts=nand.0:" \
-                                       "128k(NAND.SPL)," \
-                                       "128k(NAND.SPL.backup1)," \
-                                       "128k(NAND.SPL.backup2)," \
-                                       "128k(NAND.SPL.backup3)," \
-                                       "256k(NAND.u-boot-spl-os)," \
-                                       "1m(NAND.u-boot)," \
-                                       "128k(NAND.u-boot-env)," \
-                                       "128k(NAND.u-boot-env.backup1)," \
-                                       "8m(NAND.kernel)," \
-                                       "-(NAND.file-system)"
 #define CONFIG_SYS_NAND_U_BOOT_OFFS    0x000c0000
 /* NAND: SPL related configs */
-#ifdef CONFIG_SPL_NAND_SUPPORT
-#define CONFIG_SPL_NAND_AM33XX_BCH
-#endif
 #ifdef CONFIG_SPL_OS_BOOT
-#define CONFIG_CMD_SPL_NAND_OFS        0x00080000 /* os parameters */
 #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS        0x00200000 /* kernel offset */
-#define CONFIG_CMD_SPL_WRITE_SIZE      0x2000
 #endif
 #endif /* !CONFIG_NAND */
 
  * For NOR boot, we must set this to the start of where NOR is mapped
  * in memory.
  */
-#ifdef CONFIG_NOR_BOOT
-#define CONFIG_SYS_TEXT_BASE           0x08000000
-#endif
 
 /*
  * USB configuration.  We enable MUSB support, both for host and for
  * add mass storage support and for gadget we add both RNDIS ethernet
  * and DFU.
  */
-#define CONFIG_USB_MUSB_DSPS
-#define CONFIG_USB_MUSB_PIO_ONLY
 #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
 #define CONFIG_AM335X_USB0
 #define CONFIG_AM335X_USB0_MODE        MUSB_PERIPHERAL
 #define CONFIG_AM335X_USB1
 #define CONFIG_AM335X_USB1_MODE MUSB_HOST
 
-#ifndef CONFIG_SPL_USBETH_SUPPORT
-/* Fastboot */
-#define CONFIG_USB_FUNCTION_FASTBOOT
-#define CONFIG_CMD_FASTBOOT
-#define CONFIG_ANDROID_BOOT_IMAGE
-#define CONFIG_FASTBOOT_BUF_ADDR       CONFIG_SYS_LOAD_ADDR
-#define CONFIG_FASTBOOT_BUF_SIZE       0x07000000
-
-#define CONFIG_FASTBOOT_FLASH_MMC_DEV   1
-#endif
-
-#ifdef CONFIG_USB_MUSB_GADGET
-#define CONFIG_USB_ETHER
-#define CONFIG_USB_ETH_RNDIS
-#define CONFIG_USBNET_HOST_ADDR        "de:ad:be:af:00:00"
-#endif /* CONFIG_USB_MUSB_GADGET */
-
 /*
  * Disable MMC DM for SPL build and can be re-enabled after adding
  * DM support in SPL
 
 #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT)
 /* Remove other SPL modes. */
-#define CONFIG_ENV_IS_NOWHERE
-#undef CONFIG_ENV_IS_IN_NAND
 /* disable host part of MUSB in SPL */
 /* disable EFI partitions and partition UUID support */
 #endif
 /* USB Device Firmware Update support */
 #ifndef CONFIG_SPL_BUILD
 #define DFUARGS \
-       "dfu_alt_info_emmc=rawemmc raw 0 3751936\0" \
+       DFU_ALT_INFO_EMMC \
        DFU_ALT_INFO_MMC \
        DFU_ALT_INFO_RAM \
        DFU_ALT_INFO_NAND
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x20000
 
-#define CONFIG_ENV_IS_IN_SPI_FLASH
 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 #define CONFIG_ENV_SPI_MAX_HZ          CONFIG_SF_DEFAULT_SPEED
 #define CONFIG_ENV_SECT_SIZE           (4 << 10) /* 4 KB sectors */
 #define CONFIG_ENV_OFFSET              (768 << 10) /* 768 KiB in */
 #define CONFIG_ENV_OFFSET_REDUND       (896 << 10) /* 896 KiB in */
-#define MTDIDS_DEFAULT                 "nor0=m25p80-flash.0"
-#define MTDPARTS_DEFAULT               "mtdparts=m25p80-flash.0:128k(SPL)," \
-                                       "512k(u-boot),128k(u-boot-env1)," \
-                                       "128k(u-boot-env2),3464k(kernel)," \
-                                       "-(rootfs)"
 #elif defined(CONFIG_EMMC_BOOT)
-#define CONFIG_ENV_IS_IN_MMC
 #define CONFIG_SYS_MMC_ENV_DEV         1
-#define CONFIG_SYS_MMC_ENV_PART                2
-#define CONFIG_ENV_OFFSET              0x0
+#define CONFIG_SYS_MMC_ENV_PART                0
+#define CONFIG_ENV_OFFSET              0x260000
 #define CONFIG_ENV_OFFSET_REDUND       (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 #define CONFIG_SYS_MMC_MAX_DEVICE      2
 #elif defined(CONFIG_NOR_BOOT)
-#define CONFIG_ENV_IS_IN_FLASH
 #define CONFIG_ENV_SECT_SIZE           (128 << 10)     /* 128 KiB */
 #define CONFIG_ENV_OFFSET              (512 << 10)     /* 512 KiB */
 #define CONFIG_ENV_OFFSET_REDUND       (768 << 10)     /* 768 KiB */
-#define MTDIDS_DEFAULT                 "nor0=physmap-flash.0"
-#define MTDPARTS_DEFAULT               "mtdparts=physmap-flash.0:" \
-                                       "512k(u-boot)," \
-                                       "128k(u-boot-env1)," \
-                                       "128k(u-boot-env2)," \
-                                       "4m(kernel),-(rootfs)"
 #elif defined(CONFIG_ENV_IS_IN_NAND)
 #define CONFIG_ENV_OFFSET              0x001c0000
 #define CONFIG_ENV_OFFSET_REDUND       0x001e0000
 #define CONFIG_SYS_ENV_SECT_SIZE       CONFIG_SYS_NAND_BLOCK_SIZE
-#elif !defined(CONFIG_ENV_IS_NOWHERE)
-/* Not NAND, SPI, NOR or eMMC env, so put ENV in a file on FAT */
-#define CONFIG_ENV_IS_IN_FAT
-#define FAT_ENV_INTERFACE              "mmc"
-#define FAT_ENV_DEVICE_AND_PART                "0:1"
-#define FAT_ENV_FILE                   "uboot.env"
 #endif
 
 /* SPI flash. */
 #define CONFIG_SF_DEFAULT_SPEED                24000000
 
 /* Network. */
-#define CONFIG_PHY_GIGE
-#define CONFIG_PHYLIB
 #define CONFIG_PHY_SMSC
 /* Enable Atheros phy driver */
 #define CONFIG_PHY_ATHEROS