From c7c0bf6eb2f3ff9e70ec0238521de6bd71a1ece6 Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Mon, 16 Nov 2015 03:10:56 +0100 Subject: [PATCH] Remove old configs CONFIG_AR7240 and CONFIG_AR7100 --- u-boot/Makefile | 2 -- u-boot/common/cmd_bootm.c | 3 +-- u-boot/include/asm-mips/addrspace.h | 8 -------- u-boot/lib_mips/mips_linux.c | 31 +---------------------------- 4 files changed, 2 insertions(+), 42 deletions(-) diff --git a/u-boot/Makefile b/u-boot/Makefile index e3104db..f666612 100644 --- a/u-boot/Makefile +++ b/u-boot/Makefile @@ -341,7 +341,6 @@ endif hornet_common_config : common_config @echo "#define SOC_TYPE QCA_AR933X_SOC" >> include/config.h - @echo "#define CONFIG_AR7240 1" >> include/config.h @echo "#define CONFIG_MACH_HORNET 1" >> include/config.h @echo "#define CONFIG_HORNET_1_1_WAR 1" >> include/config.h @@ -606,7 +605,6 @@ gl-inet_config : unconfig hornet_common_config @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240 wasp_common_config : common_config - @echo "#define CONFIG_AR7240 1" >> include/config.h @echo "#define CONFIG_WASP 1" >> include/config.h @echo "#define CONFIG_WASP_SUPPORT 1" >> include/config.h diff --git a/u-boot/common/cmd_bootm.c b/u-boot/common/cmd_bootm.c index 2f51b4b..05047de 100644 --- a/u-boot/common/cmd_bootm.c +++ b/u-boot/common/cmd_bootm.c @@ -149,7 +149,7 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]){ eth_halt(); #endif -#if defined(CONFIG_AR7100) || defined(CONFIG_AR7240) + /* TODO: should we flush caches for kernel? */ /* * Flush everything, restore caches for linux */ @@ -158,7 +158,6 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]){ /* XXX - this causes problems when booting from flash */ /* dcache_disable(); */ -#endif /* case IH_COMP_LZMA:*/ puts("Uncompressing kernel image... "); diff --git a/u-boot/include/asm-mips/addrspace.h b/u-boot/include/asm-mips/addrspace.h index 67f1537..0c22947 100644 --- a/u-boot/include/asm-mips/addrspace.h +++ b/u-boot/include/asm-mips/addrspace.h @@ -44,15 +44,7 @@ * Returns the uncached address of a sdram address */ #ifndef __ASSEMBLY__ -#if defined(CONFIG_AU1X00) || defined(CONFIG_TB0229) -/* We use a 36 bit physical address map here and - cannot access physical memory directly from core */ -#define UNCACHED_SDRAM(a) (((unsigned long)(a)) | 0x20000000) -#elif defined(CONFIG_AR7100) || defined(CONFIG_AR7240) #define UNCACHED_SDRAM(a) KSEG1ADDR((a)) -#else /* !CONFIG_AR7100 */ -#define UNCACHED_SDRAM(a) PHYSADDR(a) -#endif /* CONFIG_AU1X00 */ #endif /* __ASSEMBLY__ */ /* * Map an address to a certain kernel segment diff --git a/u-boot/lib_mips/mips_linux.c b/u-boot/lib_mips/mips_linux.c index 546b637..6508ca5 100644 --- a/u-boot/lib_mips/mips_linux.c +++ b/u-boot/lib_mips/mips_linux.c @@ -26,13 +26,10 @@ #include #include #include +#include //#define DEBUG -#ifdef CONFIG_AR7240 -#include -#endif - DECLARE_GLOBAL_DATA_PTR; #define LINUX_MAX_ENVS 512 // was 256 @@ -68,21 +65,13 @@ void wasp_set_cca(void){ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]){ //ulong initrd_start = 0, initrd_end = 0; -#if defined(CONFIG_AR7100) || defined(CONFIG_AR7240) int flash_size_mbytes; void(*theKernel)(int, char **, char **, int); -#else - void(*theKernel)(int, char **, char **, int *); -#endif image_header_t *hdr = &header; char *commandline = getenv("bootargs"); char env_buf[12]; -#if defined(CONFIG_AR7100) || defined(CONFIG_AR7240) theKernel = (void (*)(int, char **, char **, int))ntohl(hdr->ih_ep); -#else - theKernel = (void (*)(int, char **, char **, int *))ntohl(hdr->ih_ep); -#endif #ifdef DEBUG printf("## Bootargs: %s\n", commandline); @@ -123,13 +112,9 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]){ ar7240_reg_wr(AR7240_GPIO_FUNC, (ar7240_reg_rd(AR7240_GPIO_FUNC) | 0x88)); #endif -#if defined(CONFIG_AR7100) || defined(CONFIG_AR7240) // Pass the flash size as expected by current Linux kernel for AR7100 flash_size_mbytes = gd->bd->bi_flashsize/(1024 * 1024); theKernel(linux_argc, linux_argv, linux_env, flash_size_mbytes); -#else - theKernel(linux_argc, linux_argv, linux_env, 0); -#endif } static void linux_params_init(ulong start, char *line){ @@ -171,18 +156,6 @@ static void linux_params_init(ulong start, char *line){ linux_argv[linux_argc] = argp; memcpy(argp, line, next - line); argp[next - line] = 0; -#if defined(CONFIG_AR7240) -#define REVSTR "REVISIONID" -#define PYTHON "python" -#define VIRIAN "virian" - if(strcmp(argp, REVSTR) == 0){ - if(is_ar7241() || is_ar7242()){ - strcpy(argp, VIRIAN); - } else { - strcpy(argp, PYTHON); - } - } -#endif argp += next - line + 1; linux_argc++; @@ -194,7 +167,6 @@ static void linux_params_init(ulong start, char *line){ line = next; } -#if defined(CONFIG_AR9100) || defined(CONFIG_AR7240) /* Add mem size to command line */ if(memstr[0]){ sprintf(memstr, "mem=%luM", gd->ram_size >> 20); @@ -203,7 +175,6 @@ static void linux_params_init(ulong start, char *line){ linux_argc++; argp += strlen(memstr) + 1; } -#endif linux_env = (char **)(((ulong)argp + 15) & ~15); linux_env[0] = 0; -- 2.25.1