[U-Boot] [PATCH v5 5/5] mips: ath79: add AP121 reference board

Wills Wang wills.wang at live.com
Wed Dec 30 07:31:59 CET 2015



On 12/30/2015 03:27 AM, Daniel Schwierzeck wrote:
> diff --git a/include/configs/ap121.h b/include/configs/ap121.h
> new file mode 100644
> index 0000000..21fb04e
> --- /dev/null
> +++ b/include/configs/ap121.h
> @@ -0,0 +1,86 @@
> +#ifndef __CONFIG_H
> +#define __CONFIG_H
> +
> +#include <linux/sizes.h>
> +
> +#define CONFIG_SYS_TEXT_BASE            0x9f000000
> +
> +#define CONFIG_DISPLAY_CPUINFO
> +#define CONFIG_DISPLAY_BOARDINFO
> +#define CONFIG_BOARD_EARLY_INIT_F
> +
> +#define CONFIG_SYS_HZ                   1000
> +#define CONFIG_SYS_MHZ                  200
> +#define CONFIG_SYS_MIPS_TIMER_FREQ      (CONFIG_SYS_MHZ * 1000000)
> +
> +/* Cache Configuration */
> +#define CONFIG_SYS_DCACHE_SIZE          SZ_32K
> +#define CONFIG_SYS_ICACHE_SIZE          SZ_64K
> +#define CONFIG_SYS_CACHELINE_SIZE       32
> you wrote that without these values, your board will not boot. But it
> should on a MIPS 24Kc core. The kernel also works with auto-detected
> values. Please try again with this patch series. I would like to remove
> the cache code in the future, that depends on manually configured sizes.
>
I try it again, my board still don't work if remove these three lines.
>> +
>> +#define CONFIG_SYS_MONITOR_BASE         CONFIG_SYS_TEXT_BASE
>> +
>> +#define CONFIG_SYS_MALLOC_LEN           SZ_256K
>> +#define CONFIG_SYS_BOOTPARAMS_LEN       SZ_128K
> please use hexadecimal numbers instead of SZ_* macros. All those options
> are eventually converted to Kconfig symbols of type hex.
Ok.
>> +
>> +#define CONFIG_SYS_SDRAM_BASE           0x80000000
>> +#define CONFIG_SYS_LOAD_ADDR            0x81000000
>> +
>> +#define CONFIG_SYS_NO_FLASH
>> +
>> +#define CONFIG_SYS_INIT_RAM_ADDR        0xbd000000
>> +#define CONFIG_SYS_INIT_RAM_SIZE        SZ_32K
>> +
>> +#define CONFIG_SYS_INIT_SP_OFFSET \
>> +	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
>> +#define CONFIG_SYS_INIT_SP_ADDR \
>> +	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
> you only need
>
> #define CONFIG_SYS_INIT_SP_ADDR \
> 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE - 1)
>
> The space for global_data is automatically reserved in start.S above the
> stack pointer
Ok.

-- 
Best Regards
Wills



More information about the U-Boot mailing list