mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
e856bdcfb4
We repeated partial moves for CONFIG_SYS_NO_FLASH, but this is not completed. Finish this work by the tool. During this move, let's rename it to CONFIG_MTD_NOR_FLASH. Actually, we have more instances of "#ifndef CONFIG_SYS_NO_FLASH" than those of "#ifdef CONFIG_SYS_NO_FLASH". Flipping the logic will make the code more readable. Besides, negative meaning symbols do not fit in obj-$(CONFIG_...) style Makefiles. This commit was created as follows: [1] Edit "default n" to "default y" in the config entry in common/Kconfig. [2] Run "tools/moveconfig.py -y -r HEAD SYS_NO_FLASH" [3] Rename the instances in defconfigs by the following: find . -path './configs/*_defconfig' | xargs sed -i \ -e '/CONFIG_SYS_NO_FLASH=y/d' \ -e 's/# CONFIG_SYS_NO_FLASH is not set/CONFIG_MTD_NOR_FLASH=y/' [4] Change the conditionals by the following: find . -name '*.[ch]' | xargs sed -i \ -e 's/ifndef CONFIG_SYS_NO_FLASH/ifdef CONFIG_MTD_NOR_FLASH/' \ -e 's/ifdef CONFIG_SYS_NO_FLASH/ifndef CONFIG_MTD_NOR_FLASH/' \ -e 's/!defined(CONFIG_SYS_NO_FLASH)/defined(CONFIG_MTD_NOR_FLASH)/' \ -e 's/defined(CONFIG_SYS_NO_FLASH)/!defined(CONFIG_MTD_NOR_FLASH)/' [5] Modify the following manually - Rename the rest of instances - Remove the description from README - Create the new Kconfig entry in drivers/mtd/Kconfig - Remove the old Kconfig entry from common/Kconfig - Remove the garbage comments from include/configs/*.h Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
125 lines
3.4 KiB
C
125 lines
3.4 KiB
C
/*
|
|
* (C) Copyright 2011, Stefan Kristiansson, stefan.kristianssons@saunalahti.fi
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#ifndef __CONFIG_H
|
|
#define __CONFIG_H
|
|
|
|
/*
|
|
* BOARD/CPU
|
|
*/
|
|
#define CONFIG_SYS_CLK_FREQ 50000000
|
|
#define CONFIG_SYS_RESET_ADDR 0x00000100
|
|
|
|
#define CONFIG_SYS_SDRAM_BASE 0x00000000
|
|
#define CONFIG_SYS_SDRAM_SIZE 0x02000000
|
|
|
|
#define CONFIG_SYS_CACHELINE_SIZE 16
|
|
|
|
#define CONFIG_SYS_UART_BASE 0x90000000
|
|
#define CONFIG_SYS_UART_FREQ CONFIG_SYS_CLK_FREQ
|
|
#define CONFIG_SYS_UART_BAUD 115200
|
|
|
|
#define CONFIG_BOARD_NAME "OpenRISC Generic"
|
|
|
|
#define CONFIG_SYS_MAX_FLASH_SECT 0
|
|
|
|
/*
|
|
* SERIAL
|
|
*/
|
|
# define CONFIG_SYS_NS16550_SERIAL
|
|
# define CONFIG_SYS_NS16550_REG_SIZE 1
|
|
# define CONFIG_CONS_INDEX 1
|
|
# define CONFIG_SYS_NS16550_COM1 (0x90000000)
|
|
# define CONFIG_SYS_NS16550_CLK CONFIG_SYS_CLK_FREQ
|
|
|
|
#define CONFIG_BAUDRATE CONFIG_SYS_UART_BAUD
|
|
#define CONFIG_SYS_BAUDRATE_TABLE {CONFIG_BAUDRATE}
|
|
#define CONSOLE_ARG "console=console=ttyS0,115200\0"
|
|
|
|
/*
|
|
* Ethernet
|
|
*/
|
|
#define CONFIG_SYS_ETHOC_BASE 0x92000000
|
|
|
|
#define CONFIG_BOOTFILE "boot.img"
|
|
#define CONFIG_LOADADDR 0x100000 /* 1MB mark */
|
|
|
|
/*
|
|
* TIMER
|
|
*/
|
|
#define CONFIG_SYS_OPENRISC_TMR_HZ 100
|
|
|
|
/*
|
|
* Memory organisation:
|
|
*
|
|
* RAM start ---------------------------
|
|
* | ... |
|
|
* ---------------------------
|
|
* | Stack |
|
|
* ---------------------------
|
|
* | Global data |
|
|
* ---------------------------
|
|
* | Environment |
|
|
* ---------------------------
|
|
* | Monitor |
|
|
* RAM end ---------------------------
|
|
*/
|
|
/* We're running in RAM */
|
|
#define CONFIG_MONITOR_IS_IN_RAM
|
|
#define CONFIG_SYS_MONITOR_LEN 0x40000 /* Reserve 256k */
|
|
#define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_SDRAM_BASE + \
|
|
CONFIG_SYS_SDRAM_SIZE - \
|
|
CONFIG_SYS_MONITOR_LEN)
|
|
|
|
#define CONFIG_ENV_IS_NOWHERE
|
|
#define CONFIG_ENV_SIZE 0x20000 /* Total Size of Environment, 128KB */
|
|
#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SIZE)
|
|
|
|
/*
|
|
* Global data object and stack pointer
|
|
*/
|
|
#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_ENV_ADDR \
|
|
- GENERATED_GBL_DATA_SIZE)
|
|
#define CONFIG_SYS_GBL_DATA_ADDR CONFIG_SYS_GBL_DATA_OFFSET
|
|
#define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET
|
|
#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
|
|
#define CONFIG_SYS_STACK_LENGTH 0x10000 /* 64KB */
|
|
#define CONFIG_SYS_MALLOC_LEN 0x400000 /* 4MB */
|
|
#define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_INIT_SP_OFFSET \
|
|
- CONFIG_SYS_STACK_LENGTH \
|
|
- CONFIG_SYS_MALLOC_LEN)
|
|
/*
|
|
* MISC
|
|
*/
|
|
#define CONFIG_SYS_LONGHELP /* Provide extended help */
|
|
#define CONFIG_SYS_CBSIZE 256 /* Console I/O buf size */
|
|
#define CONFIG_SYS_MAXARGS 16 /* Max command args */
|
|
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Bootarg buf size */
|
|
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
|
|
sizeof(CONFIG_SYS_PROMPT) + \
|
|
16) /* Print buf size */
|
|
#define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE
|
|
#define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + 0x2000)
|
|
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_INIT_SP_ADDR - 0x20000)
|
|
#define CONFIG_CMDLINE_EDITING
|
|
|
|
/*
|
|
* Command line configuration.
|
|
*/
|
|
#define CONFIG_CMD_IRQ
|
|
#define CONFIG_CMD_BSP
|
|
|
|
#define CONFIG_LMB
|
|
|
|
/*
|
|
* BOOTP options
|
|
*/
|
|
#define CONFIG_BOOTP_BOOTFILESIZE
|
|
#define CONFIG_BOOTP_BOOTPATH
|
|
#define CONFIG_BOOTP_GATEWAY
|
|
#define CONFIG_BOOTP_HOSTNAME
|
|
|
|
#endif /* __CONFIG_H */
|