From d374e77b3f4798b6e4663a07a9fc93ccdc5b75be Mon Sep 17 00:00:00 2001 From: Baikal Electronics Date: Fri, 7 Apr 2023 12:13:43 +0300 Subject: [PATCH] move and rename some options from baikal_mips.h to baikal_*_defconfig --- arch/mips/mach-baikal/mem.c | 2 +- board/baikal/Kconfig | 2 +- configs/baikal_bfk3_defconfig | 4 +++ configs/baikal_bfkx_defconfig | 20 +++++++----- include/configs/baikal_mips.h | 61 +++++++++++++++-------------------- 5 files changed, 44 insertions(+), 45 deletions(-) diff --git a/arch/mips/mach-baikal/mem.c b/arch/mips/mach-baikal/mem.c index 91919190cb..f30621bd78 100644 --- a/arch/mips/mach-baikal/mem.c +++ b/arch/mips/mach-baikal/mem.c @@ -135,7 +135,7 @@ int dram_init_banksize(void) * (The values set in fdt by arch_fixup_fdt() are later * overwritten in ft_board_setup().) */ - bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; + bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE; bd->bi_dram[0].size = DDR_BANK0_SIZE; return 0; diff --git a/board/baikal/Kconfig b/board/baikal/Kconfig index dd2b6ccd4b..07f7ef2955 100644 --- a/board/baikal/Kconfig +++ b/board/baikal/Kconfig @@ -36,7 +36,7 @@ config SYS_CONFIG_NAME default "baikal_bfk3" if BOARD_BFKX default "baikal_qemu" -config SYS_TEXT_BASE +config TEXT_BASE default 0x9FC00000 config BAIKAL_ECC diff --git a/configs/baikal_bfk3_defconfig b/configs/baikal_bfk3_defconfig index 485006476e..933fdfdbcb 100644 --- a/configs/baikal_bfk3_defconfig +++ b/configs/baikal_bfk3_defconfig @@ -110,3 +110,7 @@ CONFIG_MIPS_RELOCATION_TABLE_SIZE=0x9000 CONFIG_SYS_LOAD_ADDR=0x80100000 CONFIG_TOOLS_LIBCRYPTO=n CONFIG_SYS_CLK_FREQ=1200000000 +CONFIG_SYS_BOOTM_LEN=0x01000000 +CONFIG_SYS_PBSIZE=256 +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xBBF90000 \ No newline at end of file diff --git a/configs/baikal_bfkx_defconfig b/configs/baikal_bfkx_defconfig index ab3f7410ec..d8c45a591e 100644 --- a/configs/baikal_bfkx_defconfig +++ b/configs/baikal_bfkx_defconfig @@ -25,6 +25,7 @@ CONFIG_CMD_ENV_CALLBACK=y CONFIG_CMD_ENV_FLAGS=y CONFIG_CMD_CLK=y CONFIG_CMD_DM=y +CONFIG_CMD_I2C=y CONFIG_CMD_MTD=y CONFIG_CMD_PART=y CONFIG_CMD_PCI=y @@ -49,8 +50,11 @@ CONFIG_CLK_BAIKAL=y CONFIG_DM_GPIO=y CONFIG_DWAPB_GPIO=y CONFIG_DWMAC_GPIO=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_DW=y CONFIG_DM_KEYBOARD=y CONFIG_MISC=y +CONFIG_I2C_EEPROM=y CONFIG_MMC=y CONFIG_DM_MMC=y CONFIG_MMC_SPI=y @@ -66,8 +70,8 @@ CONFIG_PHY_MICREL=y CONFIG_PHY_MSCC=y CONFIG_DM_ETH=y CONFIG_ETH_DESIGNWARE=y -# CONFIG_PCI is not set -CONFIG_DM_PCI=y +CONFIG_PCI=y +CONFIG_PCIE_DW_GENERIC=y CONFIG_PCIE_DW=y CONFIG_NOP_PHY=y CONFIG_SCSI=y @@ -101,14 +105,14 @@ CONFIG_CPU_BAIKAL=y CONFIG_CUSTOM_SPD=y CONFIG_LIMIT_HIGHMEMORY_SIZE=y CONFIG_SYS_HIGHMEMORY_SIZE=0xD0000000 -CONFIG_CMD_I2C=y -CONFIG_DM_I2C=y -CONFIG_SYS_I2C_DW=y -CONFIG_I2C_EEPROM=y CONFIG_ENV_OFFSET=0x000C0000 CONFIG_ENV_SIZE=0x00010000 CONFIG_ENV_SECT_SIZE=0x00010000 -CONFIG_MIPS_RELOCATION_TABLE_SIZE=0x8700 +CONFIG_MIPS_RELOCATION_TABLE_SIZE=0x9000 CONFIG_SYS_LOAD_ADDR=0x80100000 CONFIG_TOOLS_LIBCRYPTO=n -CONFIG_SYS_CLK_FREQ=1200000000 \ No newline at end of file +CONFIG_SYS_CLK_FREQ=1200000000 +CONFIG_SYS_BOOTM_LEN=0x01000000 +CONFIG_SYS_PBSIZE=256 +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xBBF90000 \ No newline at end of file diff --git a/include/configs/baikal_mips.h b/include/configs/baikal_mips.h index 87a3f0b5b6..d02205ea18 100644 --- a/include/configs/baikal_mips.h +++ b/include/configs/baikal_mips.h @@ -6,8 +6,9 @@ * Dmitry Dunaev * Alexey.Malahov * Ekaterina.Skachko + * Danila Sharikov * - * Copyright (C) 2013-2021 Baikal Electronics JSC + * Copyright (C) 2013-2023 Baikal Electronics JSC */ #ifndef __CONFIG_BAIKAL_MIPS_H @@ -20,7 +21,7 @@ */ #ifndef __ASSEMBLER__ extern unsigned long baikal_clk_freq; -#define CONFIG_SYS_MIPS_TIMER_FREQ (baikal_clk_freq / 2) +#define CONFIG_SYS_MIPS_TIMER_FREQ (baikal_clk_freq / 2) #endif /* @@ -28,41 +29,39 @@ extern unsigned long baikal_clk_freq; * U-Boot initial parameters *----------------------------------------------- */ -#define CONFIG_SYS_MONITOR_LEN (1 << 20) /* 1 MB */ -#define CONFIG_SYS_BOOTPARAMS_LEN (128 << 10) /* 128 KB */ -#define CONFIG_SYS_BOOTM_LEN 0x01000000 +#define CONFIG_SYS_BOOTPARAMS_LEN (128 << 10) /* 128 KB */ /* *----------------------------------------------- * SRAM and it variables *----------------------------------------------- */ -#define CONFIG_SRAM_BASE 0xBBF80000 -#define CONFIG_SRAM_SIZE 0x10000 -#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SRAM_BASE + CONFIG_SRAM_SIZE) +/* Moved to baikal_bfk3_defconfig +#define CONFIG_SRAM_BASE 0xBBF80000 +#define CONFIG_SRAM_SIZE 0x10000 +#define CUSTOM_SYS_INIT_SP_ADDR 0xBBF90000 (CONFIG_SRAM_BASE + CONFIG_SRAM_SIZE) +*/ /* *----------------------------------------------- * Physical Memory Map *----------------------------------------------- */ -#define CONFIG_SYS_SDRAM_BASE 0x80000000 +#define CFG_SYS_SDRAM_BASE 0x80000000 /* Only one bank on lower 512 MB can be reached without MMU */ -#define CONFIG_SYS_SDRAM_SIZE 0x08000000 +#define CFG_SYS_SDRAM_SIZE 0x08000000 /* *----------------------------------------------- * Miscellaneous configurable options *----------------------------------------------- */ -/* Console I/O Buffer Size */ -#define CONFIG_SYS_CBSIZE 1024 -/* Print Buffer Size */ -#define CONFIG_SYS_PBSIZE 256 -/* Мax number of command args */ -#define CONFIG_SYS_MAXARGS 16 -/* Boot Argument Buffer Size */ -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE +/* Console I/O Buffer Size */ +#define CONFIG_SYS_CBSIZE 1024 +/* Мax number of command args */ +#define CONFIG_SYS_MAXARGS 16 +/* Boot Argument Buffer Size */ +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* *----------------------------------------------- @@ -74,30 +73,23 @@ extern unsigned long baikal_clk_freq; #ifndef CONFIG_DM_SERIAL /* UART pool base address */ -#define BAIKAL_NS16550_BASE 0xBF04A000 +#define BAIKAL_NS16550_BASE 0xBF04A000 /* Register width 4 bytes, little endian */ -#define CONFIG_SYS_NS16550_REG_SIZE (-4) +#define CONFIG_SYS_NS16550_REG_SIZE (-4) /* Use NS16550 UART as Serial device */ -#define CONFIG_SYS_NS16550_SERIAL 1 +#define CONFIG_SYS_NS16550_SERIAL 1 /* UART1 is enable and COM1 Port base */ -#define CONFIG_SYS_NS16550_COM1 (BAIKAL_NS16550_BASE + 0x0000) -/* UART2 is enable and COM2 Port base */ -#define CONFIG_SYS_NS16550_COM2 (BAIKAL_NS16550_BASE + 0x1000) +#define CONFIG_SYS_NS16550_COM1 (BAIKAL_NS16550_BASE + 0x0000) +/* UART2 is enable and COM2 Port base */ +#define CONFIG_SYS_NS16550_COM2 (BAIKAL_NS16550_BASE + 0x1000) #endif -/* UART CLK divisor */ -#if defined(CONFIG_BAIKAL_T1) -#define CONFIG_SYS_NS16550_CLK (7350000) /* 7.35MHZ / DIV=4 */ -#else -#define CONFIG_SYS_NS16550_CLK (12500000) /* 12.5MHZ / DIV=10 */ -#endif /* CONFIG_BAIKAL_T1 */ - /* *----------------------------------------------- * SPI-flash/Boot controller parameters *----------------------------------------------- */ -#define CONFIG_SYS_FLASH_BASE 0x9C000000 +#define CONFIG_SYS_FLASH_BASE 0x9C000000 /* *----------------------------------------------- @@ -118,8 +110,7 @@ extern unsigned long baikal_clk_freq; * Misc parameters *----------------------------------------------- */ -#define MACH_SKIP_L2_BYPASS /* Don't set L2B flag - it cannot be cleared */ - -#define BAIKAL_CPU_CLK_NAME "cpu_clk" +#define MACH_SKIP_L2_BYPASS /* Don't set L2B flag - it cannot be cleared */ +#define BAIKAL_CPU_CLK_NAME "cpu_clk" #endif /* __CONFIG_BAIKAL_MIPS_H */ -- 2.39.5