]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - include/configs/tegra-common.h
ARM: tegra: Use architected timer on ARMv8
[karo-tx-uboot.git] / include / configs / tegra-common.h
index ba6c6bb9f5f80aadd8de9c71f9b3bf66a9354749..ffe167e85ac3bcdc90617cc2ff401d33f2ef09f9 100644 (file)
@@ -7,18 +7,23 @@
 
 #ifndef _TEGRA_COMMON_H_
 #define _TEGRA_COMMON_H_
-#include <asm/sizes.h>
+#include <linux/sizes.h>
 #include <linux/stringify.h>
 
 /*
  * High Level Configuration Options
  */
 #define CONFIG_ARMCORTEXA9             /* This is an ARM V7 CPU core */
-#define CONFIG_TEGRA                   /* which is a Tegra generic machine */
 #define CONFIG_SYS_L2CACHE_OFF         /* No L2 cache */
 
 #include <asm/arch/tegra.h>            /* get chip and board defs */
 
+/* Use the Tegra US timer on ARMv7, but the architected timer on ARMv8. */
+#ifndef CONFIG_ARM64
+#define CONFIG_SYS_TIMER_RATE          1000000
+#define CONFIG_SYS_TIMER_COUNTER       NV_PA_TMRUS_BASE
+#endif
+
 /*
  * Display CPU and Board information
  */
@@ -26,7 +31,6 @@
 #define CONFIG_DISPLAY_BOARDINFO
 
 #define CONFIG_CMDLINE_TAG             /* enable passing of ATAGs */
-#define CONFIG_OF_LIBFDT               /* enable passing of devicetree */
 
 /* Environment */
 #define CONFIG_ENV_VARS_UBOOT_CONFIG
 /*
  * Size of malloc() pool
  */
+#ifdef CONFIG_DFU_MMC
+#define CONFIG_SYS_MALLOC_LEN          ((4 << 20) + \
+                                       CONFIG_SYS_DFU_DATA_BUF_SIZE)
+#else
 #define CONFIG_SYS_MALLOC_LEN          (4 << 20)       /* 4MB  */
+#endif
+
+#ifndef CONFIG_ARM64
+#define CONFIG_SYS_NONCACHED_MEMORY    (1 << 20)       /* 1 MiB */
+#endif
 
 /*
  * NS16550 Configuration
  */
+#define CONFIG_TEGRA_SERIAL
 #define CONFIG_SYS_NS16550
-#define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_REG_SIZE    (-4)
-#define CONFIG_SYS_NS16550_CLK         V_NS16550_CLK
+
+/*
+ * Common HW configuration.
+ * If this varies between SoCs later, move to tegraNN-common.h
+ * Note: This is number of devices, not max device ID.
+ */
+#define CONFIG_SYS_MMC_MAX_DEVICE 4
 
 /*
  * select serial console configuration
 #define CONFIG_ENV_OVERWRITE
 #define CONFIG_BAUDRATE                        115200
 
-/* include default commands */
-#include <config_cmd_default.h>
-
-/* remove unused commands */
-#undef CONFIG_CMD_FLASH                /* flinfo, erase, protect */
-#undef CONFIG_CMD_FPGA         /* FPGA configuration support */
-#undef CONFIG_CMD_IMI
-#undef CONFIG_CMD_IMLS
-#undef CONFIG_CMD_NFS          /* NFS support */
-#undef CONFIG_CMD_NET          /* network support */
-
 /* turn on command-line edit/hist/auto */
-#define CONFIG_CMDLINE_EDITING
 #define CONFIG_COMMAND_HISTORY
-#define CONFIG_AUTO_COMPLETE
 
 /* turn on commonly used storage-related commands */
-
-#define CONFIG_DOS_PARTITION
-#define CONFIG_EFI_PARTITION
 #define CONFIG_PARTITION_UUIDS
-#define CONFIG_FS_EXT4
-#define CONFIG_FS_FAT
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_FAT
-#define CONFIG_CMD_FS_GENERIC
 #define CONFIG_CMD_PART
 
 #define CONFIG_SYS_NO_FLASH
 
 #define CONFIG_CONSOLE_MUX
 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
-#define CONFIG_BOOTDELAY       2               /* -1 to disable auto boot */
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_SYS_STDIO_DEREGISTER
+#endif
 
 /*
  * Miscellaneous configurable options
  */
-#define CONFIG_SYS_LONGHELP            /* undef to save memory */
-#define CONFIG_SYS_HUSH_PARSER         /* use "hush" command parser */
 #define CONFIG_SYS_PROMPT              V_PROMPT
 /*
  * Increasing the size of the IO buffer as default nfsargs size is more
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE              (CONFIG_SYS_CBSIZE + \
                                        sizeof(CONFIG_SYS_PROMPT) + 16)
-#define CONFIG_SYS_MAXARGS             16      /* max number of command args */
+#define CONFIG_SYS_MAXARGS             32      /* max number of command args */
 /* Boot Argument Buffer Size */
 #define CONFIG_SYS_BARGSIZE            (CONFIG_SYS_CBSIZE)
 
 #define CONFIG_SYS_MEMTEST_START       (NV_PA_SDRC_CS0 + 0x600000)
 #define CONFIG_SYS_MEMTEST_END         (CONFIG_SYS_MEMTEST_START + 0x100000)
 
-#define CONFIG_SYS_HZ                  1000
+#ifndef CONFIG_ARM64
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_USE_ARCH_MEMCPY
+#endif
+#endif
 
 /*-----------------------------------------------------------------------
  * Physical Memory Map
 #define CONFIG_TEGRA_GPIO
 #define CONFIG_CMD_GPIO
 #define CONFIG_CMD_ENTERRCM
-#define CONFIG_CMD_BOOTZ
-#define CONFIG_SUPPORT_RAW_INITRD
 
 /* Defines for SPL */
-#define CONFIG_SPL
 #define CONFIG_SPL_FRAMEWORK
 #define CONFIG_SPL_RAM_DEVICE
 #define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_GPIO_SUPPORT
 
 #define CONFIG_SYS_GENERIC_BOARD
+#define CONFIG_BOARD_EARLY_INIT_F
+#define CONFIG_BOARD_LATE_INIT
 
 /* Misc utility code */
 #define CONFIG_BOUNCE_BUFFER
 #define CONFIG_CRC32_VERIFY
 
+#ifndef CONFIG_SPL_BUILD
+#include <config_distro_defaults.h>
+#endif
+
 #endif /* _TEGRA_COMMON_H_ */