microblaze: Cleanup series
cover microblaze: Cleanup series
Hi,
I looked at microblaze configs and clean up some things. All changes were done in connection to detect nor flash based on information taken from DT.
Thanks
Michal
Michal Simek (6):
microblaze: Clean config file from ifdef mess
microblaze: Simplify cache handling
microblaze: Get rid of xparameters.h
microblaze: Remove CONFIG_SYS_FDT_SIZE
microblaze: Get rid of setting for SPL_NOR/XIP support
microblaze: Detect NOR flash based on DT
board/xilinx/microblaze-generic/xparameters.h | 18 ---- configs/microblaze-generic_defconfig | 2 + include/configs/microblaze-generic.h | 86 ++----------------- scripts/config_whitelist.txt | 1 - 4 files changed, 8 insertions(+), 99 deletions(-) delete mode 100644 board/xilinx/microblaze-generic/xparameters.h
Signature · 1 line
2.29.2
PATCH 1/6 microblaze: Clean config file from ifdef mess
A lot of configs has been moved to Kconfig and it ends up in ifdef mess with no bodies. That's why remove all of them.
---
include/configs/microblaze-generic.h | 24 ------------------------ 1 file changed, 24 deletions(-)
include/configs/microblaze-generic.h +0 -24
@@ -67,24 +67,6 @@# define CONFIG_SYS_MAX_FLASH_BANKS 1/* max number of sectors on one chip */ # define CONFIG_SYS_MAX_FLASH_SECT 512 -/* hardware flash protection */ -/* use buffered writes (20x faster) */ -# ifdef RAMENV -# else /* FLASH && !RAMENV */ -/* 128K(one sector) for env */ -# endif /* FLASH && !RAMBOOT */ -#else /* !FLASH */ - -#ifdef SPIFLASH -# ifdef RAMENV -# else /* SPIFLASH && !RAMENV */ -/* 128K(two sectors) for env */ -/* Warning: adjust the offset in respect of other flash content and size */ -# endif /* SPIFLASH && !RAMBOOT */ -#else /* !SPIFLASH */ - -/* ENV in RAM */ -#endif /* !SPIFLASH */ #endif /* !FLASH */ #define XILINX_USE_ICACHE 1
@@ -111,12 +93,6 @@*/ #define CONFIG_BOOTP_BOOTFILESIZE -#if defined(CONFIG_MTD_PARTITIONS ) -/* MTD partitions */ - -/* default mtd partition table */ -#endif -/* size of console buffer */ #define CONFIG_SYS_CBSIZE 512/* max number of command args */
Signature · 1 line
2.29.2
PATCH 2/6 microblaze: Simplify cache handling
In reply to Michal SimekEnable caches by default. For now just simplify config file but it should be read from DT or PVRs.
---
include/configs/microblaze-generic.h | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-)
include/configs/microblaze-generic.h +2 -14
@@ -69,20 +69,8 @@# define CONFIG_SYS_MAX_FLASH_SECT 512#endif /* !FLASH */ -#define XILINX_USE_ICACHE 1 -#define XILINX_USE_DCACHE 1 - -#if defined(XILINX_USE_ICACHE ) -# define CONFIG_ICACHE -#else -# undef CONFIG_ICACHE -#endif - -#if defined(XILINX_USE_DCACHE ) -# define CONFIG_DCACHE -#else -# undef CONFIG_DCACHE -#endif +#define CONFIG_ICACHE +#define CONFIG_DCACHE #ifndef XILINX_DCACHE_BYTE_SIZE #define XILINX_DCACHE_BYTE_SIZE 32768
Signature · 1 line
2.29.2
PATCH 3/6 microblaze: Get rid of xparameters.h
In reply to Michal SimekThere is no need to use this file anymore. Include it in main config file and simplify logic based on it.
---
board/xilinx/microblaze-generic/xparameters.h | 18 ------------------ include/configs/microblaze-generic.h | 7 ++++++- 2 files changed, 6 insertions(+), 19 deletions(-) delete mode 100644 board/xilinx/microblaze-generic/xparameters.h
board/xilinx/microblaze-generic/xparameters.h deleted +0 -18
@@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* -* (C) Copyright 2007 Michal Simek -* -* Michal SIMEK <[email protected]> -* -* CAUTION: This file is a faked configuration !!! -* There is no real target for the microblaze-generic -* configuration. You have to replace this file with -* the generated file from your Xilinx design flow. -*/ - -/* Microblaze is microblaze_0 */ -#define XILINX_FSL_NUMBER 3 - -/* Flash Memory is FLASH_2Mx32 */ -#define XILINX_FLASH_START 0x2c000000 -#define XILINX_FLASH_SIZE 0x00800000
include/configs/microblaze-generic.h +6 -1
@@ -8,7 +8,12 @@#ifndef __CONFIG_H#define __CONFIG_H -#include "../board/xilinx/microblaze-generic/xparameters.h" +/* Microblaze is microblaze_0 */ +#define XILINX_FSL_NUMBER 3 + +/* Flash Memory is FLASH_2Mx32 */ +#define XILINX_FLASH_START 0x2c000000 +#define XILINX_FLASH_SIZE 0x00800000/* MicroBlaze CPU */ #define MICROBLAZE_V5 1
Signature · 1 line
2.29.2
PATCH 4/6 microblaze: Remove CONFIG_SYS_FDT_SIZE
In reply to Michal SimekCONFIG_SYS_FDT_SIZE is not use anywhere that's why remove it.
---
include/configs/microblaze-generic.h | 1 - scripts/config_whitelist.txt | 1 - 2 files changed, 2 deletions(-)
include/configs/microblaze-generic.h +0 -1
@@ -171,7 +171,6 @@#define CONFIG_SYS_FDT_BASE (CONFIG_SYS_FLASH_BASE + \ 0x40000) -#define CONFIG_SYS_FDT_SIZE (16 << 10)#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_TEXT_BASE + \ 0x1000000)
scripts/config_whitelist.txt +0 -1
@@ -2170,7 +2170,6 @@ CONFIG_SYS_FCC_PSMR CONFIG_SYS_FDT_BASE CONFIG_SYS_FDT_LOAD_ADDR CONFIG_SYS_FDT_PAD -CONFIG_SYS_FDT_SIZE CONFIG_SYS_FEC0_IOBASE CONFIG_SYS_FEC1_IOBASE CONFIG_SYS_FECI2C
Signature · 1 line
2.29.2
PATCH 5/6 microblaze: Get rid of setting for SPL_NOR/XIP support
In reply to Michal SimekSPL_NOR/XIP is not enabled in SPL that's why no reason to keep macros for it. These macros are hardcoded to certain offset which doesn't work for generic target. Information has to be found at run time based on DT anyway.
---
include/configs/microblaze-generic.h | 7 ------- 1 file changed, 7 deletions(-)
include/configs/microblaze-generic.h +0 -7
@@ -163,14 +163,7 @@/* SPL part */ -#ifdef CONFIG_SYS_FLASH_BASE -# define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_FLASH_BASE -#endif -/* for booting directly linux */ - -#define CONFIG_SYS_FDT_BASE (CONFIG_SYS_FLASH_BASE + \ - 0x40000)#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_TEXT_BASE + \ 0x1000000)
Signature · 1 line
2.29.2
PATCH 6/6 microblaze: Detect NOR flash based on DT
In reply to Michal SimekRemove fixed configuration and detect flash based on DT.
Also increase amount of flash sectors to 2048 because on kc705 flash has 1027 sectors.
Bank # 1: CFI conformant flash (16 x 16) Size: 128 MB in 1027 Sectors
Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x8962 Erase timeout: 4096 ms, write timeout: 2 ms
Buffer write timeout: 5 ms, buffer size: 1024 bytes
---
configs/microblaze-generic_defconfig | 2 ++ include/configs/microblaze-generic.h | 41 ++-------------------------- 2 files changed, 5 insertions(+), 38 deletions(-)
configs/microblaze-generic_defconfig +2 -0
@@ -54,8 +54,10 @@ CONFIG_DM_I2C=y CONFIG_LED=y CONFIG_LED_GPIO=y CONFIG_MTD=y +CONFIG_DM_MTD=y CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y +CONFIG_CFI_FLASH=y CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y CONFIG_FLASH_CFI_MTD=y CONFIG_SYS_FLASH_PROTECTION=y
include/configs/microblaze-generic.h +3 -38
63 lines not on this page · raw message
Signature · 1 line
2.29.2