From df2f6c962134b4263e8726e56e1996da746ae4a8 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 28 Jan 2014 18:08:13 +0900 Subject: config: remove platform CONFIG_SYS_HZ definition part 3 This commit removes platform CONFIG_SYS_HZ definition for the remainders of part1 (commit cdb23792) and part2 (commit f232950f). Signed-off-by: Masahiro Yamada Cc: Rob Herring --- board/fads/fads.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'board') diff --git a/board/fads/fads.h b/board/fads/fads.h index cf6c928dc7..fa49080fb7 100644 --- a/board/fads/fads.h +++ b/board/fads/fads.h @@ -127,8 +127,6 @@ #define CONFIG_SYS_LOAD_ADDR 0x00100000 -#define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ - /* * Low Level Configuration Settings * (address mappings, register initial values, etc.) -- cgit v1.2.3 From e9024ef27d0fc011ac36100c61dbd92025c96108 Mon Sep 17 00:00:00 2001 From: Dan Murphy Date: Mon, 3 Feb 2014 06:59:02 -0600 Subject: ARM: O5/dra7xx: Add SATA boot support Add the SATA boot support for OMAP5 and dra7xx. Renamed the omap_sata_init to the common init_sata(int dev) for commonality in with sata stack. Added the ROM boot device ID for SATA. Signed-off-by: Dan Murphy Reviewed-by: Roger Quadros Signed-off-by: Tom Rini --- arch/arm/cpu/armv7/omap-common/sata.c | 3 ++- arch/arm/include/asm/arch-omap5/sata.h | 9 --------- arch/arm/include/asm/arch-omap5/spl.h | 1 + board/ti/dra7xx/evm.c | 3 ++- board/ti/omap5_uevm/evm.c | 3 ++- 5 files changed, 7 insertions(+), 12 deletions(-) (limited to 'board') diff --git a/arch/arm/cpu/armv7/omap-common/sata.c b/arch/arm/cpu/armv7/omap-common/sata.c index f5468c4c97..cad4feed00 100644 --- a/arch/arm/cpu/armv7/omap-common/sata.c +++ b/arch/arm/cpu/armv7/omap-common/sata.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include "pipe3-phy.h" @@ -31,7 +32,7 @@ struct omap_pipe3 sata_phy = { .dpll_map = dpll_map_sata, }; -int omap_sata_init(void) +int init_sata(int dev) { int ret; u32 val; diff --git a/arch/arm/include/asm/arch-omap5/sata.h b/arch/arm/include/asm/arch-omap5/sata.h index 2ca8947730..b69165b5ee 100644 --- a/arch/arm/include/asm/arch-omap5/sata.h +++ b/arch/arm/include/asm/arch-omap5/sata.h @@ -36,13 +36,4 @@ #define TI_SATA_IDLE_SMART_WAKE (0x3 << 2) #define TI_SATA_IDLE_SMART (0x2 << 2) -#ifdef CONFIG_SCSI_AHCI_PLAT -int omap_sata_init(void); -#else -static inline int omap_sata_init(void) -{ - return 0; -} -#endif /* CONFIG_SCSI_AHCI_PLAT */ - #endif /* _TI_SATA_H */ diff --git a/arch/arm/include/asm/arch-omap5/spl.h b/arch/arm/include/asm/arch-omap5/spl.h index 2d5a62e660..4a279cf052 100644 --- a/arch/arm/include/asm/arch-omap5/spl.h +++ b/arch/arm/include/asm/arch-omap5/spl.h @@ -15,6 +15,7 @@ #define BOOT_DEVICE_MMC1 5 #define BOOT_DEVICE_MMC2 6 #define BOOT_DEVICE_MMC2_2 7 +#define BOOT_DEVICE_SATA 9 #define BOOT_DEVICE_SPI 10 #define BOOT_DEVICE_UART 0x43 diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 1b60b8f672..bed828584b 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -12,6 +12,7 @@ */ #include #include +#include #include #include #include @@ -80,7 +81,7 @@ int board_init(void) int board_late_init(void) { - omap_sata_init(); + init_sata(0); return 0; } diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c index b549d72900..3eaa5ac398 100644 --- a/board/ti/omap5_uevm/evm.c +++ b/board/ti/omap5_uevm/evm.c @@ -15,6 +15,7 @@ #include "mux_data.h" #if defined(CONFIG_USB_EHCI) || defined(CONFIG_USB_XHCI_OMAP) +#include #include #include #include @@ -70,7 +71,7 @@ int board_init(void) int board_late_init(void) { - omap_sata_init(); + init_sata(0); return 0; } -- cgit v1.2.3 From e183a1745aa4ad05dac3d7caf5777dceff3f1958 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 4 Feb 2014 17:24:11 +0900 Subject: board: samsung: refactor host programs Some Samsung boards have their own tools under board/samsung//tools/. This commit refactor more makefiles with "hostprogs-y". Signed-off-by: Masahiro Yamada --- Makefile | 1 + board/samsung/origen/Makefile | 20 ++--- board/samsung/origen/tools/mkorigenspl.c | 110 +++++++++++++++++++++++++++ board/samsung/origen/tools/mkv310_image.c | 110 --------------------------- board/samsung/smdkv310/Makefile | 15 +--- board/samsung/smdkv310/tools/mksmdkv310spl.c | 101 ++++++++++++++++++++++++ board/samsung/smdkv310/tools/mkv310_image.c | 101 ------------------------ spl/Makefile | 4 +- 8 files changed, 228 insertions(+), 234 deletions(-) create mode 100644 board/samsung/origen/tools/mkorigenspl.c delete mode 100644 board/samsung/origen/tools/mkv310_image.c create mode 100644 board/samsung/smdkv310/tools/mksmdkv310spl.c delete mode 100644 board/samsung/smdkv310/tools/mkv310_image.c (limited to 'board') diff --git a/Makefile b/Makefile index a1e2810b33..8c585b60a8 100644 --- a/Makefile +++ b/Makefile @@ -809,6 +809,7 @@ clean: $(obj)tools/proftool @rm -f $(obj)board/cray/L1/{bootscript.c,bootscript.image} \ $(obj)board/matrix_vision/*/bootscript.img \ + $(obj)spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl \ $(obj)u-boot.lds \ $(obj)arch/blackfin/cpu/init.{lds,elf} @rm -f $(obj)include/bmp_logo.h diff --git a/board/samsung/origen/Makefile b/board/samsung/origen/Makefile index e8818bf9b1..31e88f4424 100644 --- a/board/samsung/origen/Makefile +++ b/board/samsung/origen/Makefile @@ -4,16 +4,16 @@ # SPDX-License-Identifier: GPL-2.0+ # -ifndef CONFIG_SPL_BUILD -obj-y += origen.o -endif - ifdef CONFIG_SPL_BUILD -all: $(OBJTREE)/tools/mk$(BOARD)spl -endif +hostprogs-y := tools/mkorigenspl +always := $(hostprogs-y) -# Fix ME after we implement hostprogs-y. -ifdef CONFIG_SPL_BUILD -$(OBJTREE)/tools/mk$(BOARD)spl: tools/mkv310_image.c - $(HOSTCC) tools/mkv310_image.c -o $(OBJTREE)/tools/mk$(BOARD)spl +# omit -O2 option to suppress +# warning: dereferencing type-punned pointer will break strict-aliasing rules +# +# TODO: +# Fix the root cause in tools/mkorigenspl.c and delete the following work-around +$(obj)tools/mkorigenspl: HOSTCFLAGS:=$(filter-out -O2,$(HOSTCFLAGS)) +else +obj-y += origen.o endif diff --git a/board/samsung/origen/tools/mkorigenspl.c b/board/samsung/origen/tools/mkorigenspl.c new file mode 100644 index 0000000000..3ed20efce3 --- /dev/null +++ b/board/samsung/origen/tools/mkorigenspl.c @@ -0,0 +1,110 @@ +/* + * Copyright (C) 2011 Samsung Electronics + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include + +#define BUFSIZE (16*1024) +#define IMG_SIZE (16*1024) +#define SPL_HEADER_SIZE 16 +#define FILE_PERM (S_IRUSR | S_IWUSR | S_IRGRP \ + | S_IWGRP | S_IROTH | S_IWOTH) +#define SPL_HEADER "S5PC210 HEADER " +/* +* Requirement: +* IROM code reads first 14K bytes from boot device. +* It then calculates the checksum of 14K-4 bytes and compare with data at +* 14K-4 offset. +* +* This function takes two filenames: +* IN "u-boot-spl.bin" and +* OUT "$(BOARD)-spl.bin as filenames. +* It reads the "u-boot-spl.bin" in 16K buffer. +* It calculates checksum of 14K-4 Bytes and stores at 14K-4 offset in buffer. +* It writes the buffer to "$(BOARD)-spl.bin" file. +*/ + +int main(int argc, char **argv) +{ + int i, len; + unsigned char buffer[BUFSIZE] = {0}; + int ifd, ofd; + unsigned int checksum = 0, count; + + if (argc != 3) { + printf(" %d Wrong number of arguments\n", argc); + exit(EXIT_FAILURE); + } + + ifd = open(argv[1], O_RDONLY); + if (ifd < 0) { + fprintf(stderr, "%s: Can't open %s: %s\n", + argv[0], argv[1], strerror(errno)); + exit(EXIT_FAILURE); + } + + ofd = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC, FILE_PERM); + if (ifd < 0) { + fprintf(stderr, "%s: Can't open %s: %s\n", + argv[0], argv[2], strerror(errno)); + if (ifd) + close(ifd); + exit(EXIT_FAILURE); + } + + len = lseek(ifd, 0, SEEK_END); + lseek(ifd, 0, SEEK_SET); + + memcpy(&buffer[0], SPL_HEADER, SPL_HEADER_SIZE); + + count = (len < (IMG_SIZE - SPL_HEADER_SIZE)) + ? len : (IMG_SIZE - SPL_HEADER_SIZE); + + if (read(ifd, buffer + SPL_HEADER_SIZE, count) != count) { + fprintf(stderr, "%s: Can't read %s: %s\n", + argv[0], argv[1], strerror(errno)); + + if (ifd) + close(ifd); + if (ofd) + close(ofd); + + exit(EXIT_FAILURE); + } + + for (i = 0; i < IMG_SIZE - SPL_HEADER_SIZE; i++) + checksum += buffer[i+16]; + + *(ulong *)buffer ^= 0x1f; + *(ulong *)(buffer+4) ^= checksum; + + for (i = 1; i < SPL_HEADER_SIZE; i++) + buffer[i] ^= buffer[i-1]; + + if (write(ofd, buffer, BUFSIZE) != BUFSIZE) { + fprintf(stderr, "%s: Can't write %s: %s\n", + argv[0], argv[2], strerror(errno)); + + if (ifd) + close(ifd); + if (ofd) + close(ofd); + + exit(EXIT_FAILURE); + } + + if (ifd) + close(ifd); + if (ofd) + close(ofd); + + return EXIT_SUCCESS; +} diff --git a/board/samsung/origen/tools/mkv310_image.c b/board/samsung/origen/tools/mkv310_image.c deleted file mode 100644 index 3ed20efce3..0000000000 --- a/board/samsung/origen/tools/mkv310_image.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (C) 2011 Samsung Electronics - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include -#include -#include -#include -#include - -#define BUFSIZE (16*1024) -#define IMG_SIZE (16*1024) -#define SPL_HEADER_SIZE 16 -#define FILE_PERM (S_IRUSR | S_IWUSR | S_IRGRP \ - | S_IWGRP | S_IROTH | S_IWOTH) -#define SPL_HEADER "S5PC210 HEADER " -/* -* Requirement: -* IROM code reads first 14K bytes from boot device. -* It then calculates the checksum of 14K-4 bytes and compare with data at -* 14K-4 offset. -* -* This function takes two filenames: -* IN "u-boot-spl.bin" and -* OUT "$(BOARD)-spl.bin as filenames. -* It reads the "u-boot-spl.bin" in 16K buffer. -* It calculates checksum of 14K-4 Bytes and stores at 14K-4 offset in buffer. -* It writes the buffer to "$(BOARD)-spl.bin" file. -*/ - -int main(int argc, char **argv) -{ - int i, len; - unsigned char buffer[BUFSIZE] = {0}; - int ifd, ofd; - unsigned int checksum = 0, count; - - if (argc != 3) { - printf(" %d Wrong number of arguments\n", argc); - exit(EXIT_FAILURE); - } - - ifd = open(argv[1], O_RDONLY); - if (ifd < 0) { - fprintf(stderr, "%s: Can't open %s: %s\n", - argv[0], argv[1], strerror(errno)); - exit(EXIT_FAILURE); - } - - ofd = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC, FILE_PERM); - if (ifd < 0) { - fprintf(stderr, "%s: Can't open %s: %s\n", - argv[0], argv[2], strerror(errno)); - if (ifd) - close(ifd); - exit(EXIT_FAILURE); - } - - len = lseek(ifd, 0, SEEK_END); - lseek(ifd, 0, SEEK_SET); - - memcpy(&buffer[0], SPL_HEADER, SPL_HEADER_SIZE); - - count = (len < (IMG_SIZE - SPL_HEADER_SIZE)) - ? len : (IMG_SIZE - SPL_HEADER_SIZE); - - if (read(ifd, buffer + SPL_HEADER_SIZE, count) != count) { - fprintf(stderr, "%s: Can't read %s: %s\n", - argv[0], argv[1], strerror(errno)); - - if (ifd) - close(ifd); - if (ofd) - close(ofd); - - exit(EXIT_FAILURE); - } - - for (i = 0; i < IMG_SIZE - SPL_HEADER_SIZE; i++) - checksum += buffer[i+16]; - - *(ulong *)buffer ^= 0x1f; - *(ulong *)(buffer+4) ^= checksum; - - for (i = 1; i < SPL_HEADER_SIZE; i++) - buffer[i] ^= buffer[i-1]; - - if (write(ofd, buffer, BUFSIZE) != BUFSIZE) { - fprintf(stderr, "%s: Can't write %s: %s\n", - argv[0], argv[2], strerror(errno)); - - if (ifd) - close(ifd); - if (ofd) - close(ofd); - - exit(EXIT_FAILURE); - } - - if (ifd) - close(ifd); - if (ofd) - close(ofd); - - return EXIT_SUCCESS; -} diff --git a/board/samsung/smdkv310/Makefile b/board/samsung/smdkv310/Makefile index dbc621bd61..9e37b4e780 100644 --- a/board/samsung/smdkv310/Makefile +++ b/board/samsung/smdkv310/Makefile @@ -4,16 +4,9 @@ # SPDX-License-Identifier: GPL-2.0+ # -ifndef CONFIG_SPL_BUILD -obj-y += smdkv310.o -endif - ifdef CONFIG_SPL_BUILD -all: $(OBJTREE)/tools/mk$(BOARD)spl -endif - -# Fix ME after we implement hostprogs-y. -ifdef CONFIG_SPL_BUILD -$(OBJTREE)/tools/mk$(BOARD)spl: tools/mkv310_image.c - $(HOSTCC) tools/mkv310_image.c -o $(OBJTREE)/tools/mk$(BOARD)spl +hostprogs-y := tools/mksmdkv310spl +always := $(hostprogs-y) +else +obj-y += smdkv310.o endif diff --git a/board/samsung/smdkv310/tools/mksmdkv310spl.c b/board/samsung/smdkv310/tools/mksmdkv310spl.c new file mode 100644 index 0000000000..9a64ca6ad6 --- /dev/null +++ b/board/samsung/smdkv310/tools/mksmdkv310spl.c @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2011 Samsung Electronics + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include + +#define CHECKSUM_OFFSET (14*1024-4) +#define BUFSIZE (16*1024) +#define FILE_PERM (S_IRUSR | S_IWUSR | S_IRGRP \ + | S_IWGRP | S_IROTH | S_IWOTH) +/* +* Requirement: +* IROM code reads first 14K bytes from boot device. +* It then calculates the checksum of 14K-4 bytes and compare with data at +* 14K-4 offset. +* +* This function takes two filenames: +* IN "u-boot-spl.bin" and +* OUT "u-boot-mmc-spl.bin" as filenames. +* It reads the "u-boot-spl.bin" in 16K buffer. +* It calculates checksum of 14K-4 Bytes and stores at 14K-4 offset in buffer. +* It writes the buffer to "u-boot-mmc-spl.bin" file. +*/ + +int main(int argc, char **argv) +{ + int i, len; + unsigned char buffer[BUFSIZE] = {0}; + int ifd, ofd; + unsigned int checksum = 0, count; + + if (argc != 3) { + printf(" %d Wrong number of arguments\n", argc); + exit(EXIT_FAILURE); + } + + ifd = open(argv[1], O_RDONLY); + if (ifd < 0) { + fprintf(stderr, "%s: Can't open %s: %s\n", + argv[0], argv[1], strerror(errno)); + exit(EXIT_FAILURE); + } + + ofd = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC, FILE_PERM); + if (ifd < 0) { + fprintf(stderr, "%s: Can't open %s: %s\n", + argv[0], argv[2], strerror(errno)); + if (ifd) + close(ifd); + exit(EXIT_FAILURE); + } + + len = lseek(ifd, 0, SEEK_END); + lseek(ifd, 0, SEEK_SET); + + count = (len < CHECKSUM_OFFSET) ? len : CHECKSUM_OFFSET; + + if (read(ifd, buffer, count) != count) { + fprintf(stderr, "%s: Can't read %s: %s\n", + argv[0], argv[1], strerror(errno)); + + if (ifd) + close(ifd); + if (ofd) + close(ofd); + + exit(EXIT_FAILURE); + } + + for (i = 0, checksum = 0; i < CHECKSUM_OFFSET; i++) + checksum += buffer[i]; + + memcpy(&buffer[CHECKSUM_OFFSET], &checksum, sizeof(checksum)); + + if (write(ofd, buffer, BUFSIZE) != BUFSIZE) { + fprintf(stderr, "%s: Can't write %s: %s\n", + argv[0], argv[2], strerror(errno)); + + if (ifd) + close(ifd); + if (ofd) + close(ofd); + + exit(EXIT_FAILURE); + } + + if (ifd) + close(ifd); + if (ofd) + close(ofd); + + return EXIT_SUCCESS; +} diff --git a/board/samsung/smdkv310/tools/mkv310_image.c b/board/samsung/smdkv310/tools/mkv310_image.c deleted file mode 100644 index 9a64ca6ad6..0000000000 --- a/board/samsung/smdkv310/tools/mkv310_image.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (C) 2011 Samsung Electronics - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include -#include -#include -#include -#include - -#define CHECKSUM_OFFSET (14*1024-4) -#define BUFSIZE (16*1024) -#define FILE_PERM (S_IRUSR | S_IWUSR | S_IRGRP \ - | S_IWGRP | S_IROTH | S_IWOTH) -/* -* Requirement: -* IROM code reads first 14K bytes from boot device. -* It then calculates the checksum of 14K-4 bytes and compare with data at -* 14K-4 offset. -* -* This function takes two filenames: -* IN "u-boot-spl.bin" and -* OUT "u-boot-mmc-spl.bin" as filenames. -* It reads the "u-boot-spl.bin" in 16K buffer. -* It calculates checksum of 14K-4 Bytes and stores at 14K-4 offset in buffer. -* It writes the buffer to "u-boot-mmc-spl.bin" file. -*/ - -int main(int argc, char **argv) -{ - int i, len; - unsigned char buffer[BUFSIZE] = {0}; - int ifd, ofd; - unsigned int checksum = 0, count; - - if (argc != 3) { - printf(" %d Wrong number of arguments\n", argc); - exit(EXIT_FAILURE); - } - - ifd = open(argv[1], O_RDONLY); - if (ifd < 0) { - fprintf(stderr, "%s: Can't open %s: %s\n", - argv[0], argv[1], strerror(errno)); - exit(EXIT_FAILURE); - } - - ofd = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC, FILE_PERM); - if (ifd < 0) { - fprintf(stderr, "%s: Can't open %s: %s\n", - argv[0], argv[2], strerror(errno)); - if (ifd) - close(ifd); - exit(EXIT_FAILURE); - } - - len = lseek(ifd, 0, SEEK_END); - lseek(ifd, 0, SEEK_SET); - - count = (len < CHECKSUM_OFFSET) ? len : CHECKSUM_OFFSET; - - if (read(ifd, buffer, count) != count) { - fprintf(stderr, "%s: Can't read %s: %s\n", - argv[0], argv[1], strerror(errno)); - - if (ifd) - close(ifd); - if (ofd) - close(ofd); - - exit(EXIT_FAILURE); - } - - for (i = 0, checksum = 0; i < CHECKSUM_OFFSET; i++) - checksum += buffer[i]; - - memcpy(&buffer[CHECKSUM_OFFSET], &checksum, sizeof(checksum)); - - if (write(ofd, buffer, BUFSIZE) != BUFSIZE) { - fprintf(stderr, "%s: Can't write %s: %s\n", - argv[0], argv[2], strerror(errno)); - - if (ifd) - close(ifd); - if (ofd) - close(ofd); - - exit(EXIT_FAILURE); - } - - if (ifd) - close(ifd); - if (ofd) - close(ofd); - - return EXIT_SUCCESS; -} diff --git a/spl/Makefile b/spl/Makefile index 3c40a7e523..5339338b2b 100644 --- a/spl/Makefile +++ b/spl/Makefile @@ -165,8 +165,8 @@ else VAR_SIZE_PARAM = endif $(obj)$(BOARD)-spl.bin: $(obj)u-boot-spl.bin - $(if $(wildcard $(OBJTREE)/tools/mk$(BOARD)spl),\ - $(OBJTREE)/tools/mk$(BOARD)spl,\ + $(if $(wildcard $(OBJTREE)/spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl),\ + $(OBJTREE)/spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl,\ $(OBJTREE)/tools/mkexynosspl) $(VAR_SIZE_PARAM) $< $@ endif -- cgit v1.2.3 From 9e4140329ee9a787d0f96ac2829d618d47f7973f Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 4 Feb 2014 17:24:24 +0900 Subject: kbuild: change out-of-tree build This commit changes the working directory where the build process occurs. Before this commit, build process occurred under the source tree for both in-tree and out-of-tree build. That's why we needed to add $(obj) prefix to all generated files in makefiles like follows: $(obj)u-boot.bin: $(obj)u-boot Here, $(obj) is empty for in-tree build, whereas it points to the output directory for out-of-tree build. And our old build system changes the current working directory with "make -C " syntax when descending into the sub-directories. On the other hand, Kbuild uses a different idea to handle out-of-tree build and directory descending. The build process of Kbuild always occurs under the output tree. When "O=dir/to/store/output/files" is given, the build system changes the current working directory to that directory and restarts the make. Kbuild uses "make -f $(srctree)/scripts/Makefile.build obj=" syntax for descending into sub-directories. (We can write it like "make $(obj)=" with a shorthand.) This means the current working directory is always the top of the output directory. Signed-off-by: Masahiro Yamada Tested-by: Gerhard Sittig --- MAKEALL | 6 +- Makefile | 569 ++++++++++++++------------ arch/arm/cpu/arm1136/config.mk | 2 +- arch/arm/cpu/arm926ejs/config.mk | 2 +- arch/arm/cpu/arm926ejs/davinci/config.mk | 2 +- arch/arm/cpu/armv7/am33xx/config.mk | 2 +- arch/arm/cpu/armv7/config.mk | 2 +- arch/arm/cpu/armv7/omap3/config.mk | 2 +- arch/arm/cpu/armv7/omap4/config.mk | 2 +- arch/arm/cpu/armv7/omap5/config.mk | 2 +- arch/arm/cpu/armv7/socfpga/config.mk | 2 +- arch/blackfin/config.mk | 10 +- arch/blackfin/cpu/Makefile | 8 +- arch/mips/cpu/mips32/config.mk | 2 +- arch/mips/cpu/mips64/config.mk | 2 +- arch/mips/cpu/xburst/config.mk | 2 +- arch/nds32/config.mk | 2 +- arch/powerpc/lib/Makefile | 4 +- arch/sandbox/cpu/Makefile | 4 +- arch/sparc/config.mk | 3 +- arch/x86/lib/Makefile | 2 +- board/ait/cam_enc_4xx/config.mk | 2 +- board/avionic-design/medcom-wide/Makefile | 2 +- board/avionic-design/plutux/Makefile | 2 +- board/avionic-design/tec-ng/Makefile | 2 +- board/avionic-design/tec/Makefile | 2 +- board/compal/paz00/Makefile | 2 +- board/compulab/trimslice/Makefile | 2 +- board/cray/L1/Makefile | 8 +- board/h2200/Makefile | 2 +- board/matrix_vision/mvblm7/Makefile | 4 +- board/matrix_vision/mvsmr/Makefile | 2 +- board/nvidia/common/Makefile | 2 +- board/pcs440ep/config.mk | 2 +- board/samsung/origen/Makefile | 2 +- common/Makefile | 9 +- config.mk | 42 +- doc/DocBook/Makefile | 6 +- drivers/bios_emulator/Makefile | 2 +- dts/Makefile | 6 +- examples/api/Makefile | 16 +- examples/standalone/Makefile | 14 +- fs/ubifs/Makefile | 2 +- lib/Makefile | 2 +- mkconfig | 2 +- nand_spl/board/amcc/acadia/Makefile | 30 +- nand_spl/board/amcc/bamboo/Makefile | 30 +- nand_spl/board/amcc/canyonlands/Makefile | 30 +- nand_spl/board/amcc/kilauea/Makefile | 28 +- nand_spl/board/amcc/sequoia/Makefile | 32 +- nand_spl/board/freescale/mpc8315erdb/Makefile | 30 +- nand_spl/board/freescale/mpc8536ds/Makefile | 42 +- nand_spl/board/freescale/mpc8569mds/Makefile | 42 +- nand_spl/board/freescale/mpc8572ds/Makefile | 42 +- nand_spl/board/freescale/p1023rds/Makefile | 42 +- nand_spl/board/freescale/p1_p2_rdb/Makefile | 42 +- nand_spl/board/sheldon/simpc8313/Makefile | 30 +- post/lib_powerpc/fpu/Makefile | 2 +- rules.mk | 19 +- scripts/Kbuild.include | 4 +- scripts/Makefile.build | 57 ++- scripts/Makefile.host.tmp | 18 +- spl/Makefile | 49 ++- tools/Makefile | 18 +- 64 files changed, 612 insertions(+), 744 deletions(-) (limited to 'board') diff --git a/MAKEALL b/MAKEALL index 54b0d893a6..d7ad51dc44 100755 --- a/MAKEALL +++ b/MAKEALL @@ -674,8 +674,6 @@ build_target() { output_dir="${OUTPUT_PREFIX}" fi - export BUILD_DIR="${output_dir}" - target_arch=$(get_target_arch ${target}) eval cross_toolchain=\$CROSS_COMPILE_`echo $target_arch | tr '[:lower:]' '[:upper:]'` if [ "${cross_toolchain}" ] ; then @@ -686,6 +684,10 @@ build_target() { MAKE=make fi + if [ "${output_dir}" != "." ] ; then + MAKE="${MAKE} O=${output_dir}" + fi + ${MAKE} distclean >/dev/null ${MAKE} -s ${target}_config diff --git a/Makefile b/Makefile index b24b425cb9..1409c8bf39 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,8 @@ U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) else U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL)$(EXTRAVERSION) endif -TIMESTAMP_FILE = $(obj)include/generated/timestamp_autogenerated.h -VERSION_FILE = $(obj)include/generated/version_autogenerated.h +TIMESTAMP_FILE = include/generated/timestamp_autogenerated.h +VERSION_FILE = include/generated/version_autogenerated.h HOSTARCH := $(shell uname -m | \ sed -e s/i.86/x86/ \ @@ -43,32 +43,82 @@ else XECHO = : endif -######################################################################### -# -# U-boot build supports generating object files in a separate external -# directory. Two use cases are supported: -# -# 1) Add O= to the make command line -# 'make O=/tmp/build all' -# -# 2) Set environment variable BUILD_DIR to point to the desired location -# 'export BUILD_DIR=/tmp/build' -# 'make' -# -# The second approach can also be used with a MAKEALL script -# 'export BUILD_DIR=/tmp/build' -# './MAKEALL' +# kbuild supports saving output files in a separate directory. +# To locate output files in a separate directory two syntaxes are supported. +# In both cases the working directory must be the root of the kernel src. +# 1) O= +# Use "make O=dir/to/store/output/files/" # -# Command line 'O=' setting overrides BUILD_DIR environment variable. -# -# When none of the above methods is used the local build is performed and -# the object files are placed in the source directory. +# 2) Set KBUILD_OUTPUT +# Set the environment variable KBUILD_OUTPUT to point to the directory +# where the output files shall be placed. +# export KBUILD_OUTPUT=dir/to/store/output/files/ +# make # +# The O= assignment takes precedence over the KBUILD_OUTPUT environment +# variable. + + +# KBUILD_SRC is set on invocation of make in OBJ directory +# KBUILD_SRC is not intended to be used by the regular user (for now) +ifeq ($(KBUILD_SRC),) +# OK, Make called in directory where kernel src resides +# Do we want to locate output files in a separate directory? ifeq ("$(origin O)", "command line") -BUILD_DIR := $(O) + KBUILD_OUTPUT := $(O) +endif + +ifeq ("$(origin W)", "command line") + export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W) endif +# That's our default target when none is given on the command line +PHONY := _all +_all: + +# Cancel implicit rules on top Makefile +$(CURDIR)/Makefile Makefile: ; + +ifneq ($(KBUILD_OUTPUT),) +# Invoke a second make in the output directory, passing relevant variables +# check that the output directory actually exists +saved-output := $(KBUILD_OUTPUT) +KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) +$(if $(KBUILD_OUTPUT),, \ + $(error output directory "$(saved-output)" does not exist)) + +PHONY += $(MAKECMDGOALS) sub-make + +$(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make + @: + +sub-make: FORCE + $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ + KBUILD_SRC=$(CURDIR) \ + KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile \ + $(filter-out _all sub-make,$(MAKECMDGOALS)) + +# Leave processing to above invocation of make +skip-makefile := 1 +endif # ifneq ($(KBUILD_OUTPUT),) +endif # ifeq ($(KBUILD_SRC),) + +# We process the rest of the Makefile if this is the final invocation of make +ifeq ($(skip-makefile),) + +PHONY += all +_all: all + +srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR)) +objtree := $(CURDIR) +src := $(srctree) +obj := $(objtree) + +VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD)) + +export srctree objtree VPATH + # Call a source code checker (by default, "sparse") as part of the # C compilation. # @@ -87,41 +137,16 @@ ifndef CHECKSRC endif export CHECKSRC -ifneq ($(BUILD_DIR),) -saved-output := $(BUILD_DIR) - -# Attempt to create a output directory. -$(shell [ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}) - -# Verify if it was successful. -BUILD_DIR := $(shell cd $(BUILD_DIR) && /bin/pwd) -$(if $(BUILD_DIR),,$(error output directory "$(saved-output)" does not exist)) -endif # ifneq ($(BUILD_DIR),) - -OBJTREE := $(if $(BUILD_DIR),$(BUILD_DIR),$(CURDIR)) +OBJTREE := $(objtree) SPLTREE := $(OBJTREE)/spl TPLTREE := $(OBJTREE)/tpl -SRCTREE := $(CURDIR) -srctree := $(SRCTREE) +SRCTREE := $(srctree) TOPDIR := $(SRCTREE) -LNDIR := $(OBJTREE) -export TOPDIR SRCTREE srctree OBJTREE SPLTREE TPLTREE +export TOPDIR SRCTREE OBJTREE SPLTREE TPLTREE MKCONFIG := $(SRCTREE)/mkconfig export MKCONFIG -# $(obj) and (src) are defined in config.mk but here in main Makefile -# we also need them before config.mk is included which is the case for -# some targets like unconfig, clean, clobber, distclean, etc. -ifneq ($(OBJTREE),$(SRCTREE)) -obj := $(OBJTREE)/ -src := $(SRCTREE)/ -else -obj := -src := -endif -export obj src - # Make sure CDPATH settings don't interfere unexport CDPATH @@ -136,14 +161,14 @@ SUBDIRS = $(SUBDIR_TOOLS) .PHONY : $(SUBDIRS) $(VERSION_FILE) $(TIMESTAMP_FILE) -ifeq ($(obj)include/config.mk,$(wildcard $(obj)include/config.mk)) +ifeq (include/config.mk,$(wildcard include/config.mk)) # Include autoconf.mk before config.mk so that the config options are available # to all top level build files. We need the dummy all: target to prevent the # dependency target in autoconf.mk.dep from being the default. all: -sinclude $(obj)include/autoconf.mk.dep -sinclude $(obj)include/autoconf.mk +sinclude include/autoconf.mk.dep +sinclude include/autoconf.mk SUBDIR_EXAMPLES-y := examples/standalone SUBDIR_EXAMPLES-$(CONFIG_API) += examples/api @@ -152,7 +177,7 @@ SUBDIRS += $(SUBDIR_EXAMPLES-y) endif # load ARCH, BOARD, and CPU configuration -include $(obj)include/config.mk +include include/config.mk export ARCH CPU BOARD VENDOR SOC # set default to nothing for native builds @@ -197,6 +222,9 @@ HOSTCFLAGS += $(call os_x_before, 10, 4, "-traditional-cpp") HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress") endif +# Look for make include files relative to root of kernel src +MAKEFLAGS += --include-dir=$(srctree) + # We need some generic definitions (do not try to remake the file). $(srctree)/scripts/Kbuild.include: ; include $(srctree)/scripts/Kbuild.include @@ -287,7 +315,7 @@ endif export CONFIG_SYS_TEXT_BASE -LDFLAGS_u-boot += -T $(obj)u-boot.lds $(LDFLAGS_FINAL) +LDFLAGS_u-boot += -T u-boot.lds $(LDFLAGS_FINAL) ifneq ($(CONFIG_SYS_TEXT_BASE),) LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE) endif @@ -350,9 +378,9 @@ head-y := $(CPUDIR)/start.o head-$(CONFIG_4xx) += arch/powerpc/cpu/ppc4xx/resetvec.o head-$(CONFIG_MPC85xx) += arch/powerpc/cpu/mpc85xx/resetvec.o -OBJS := $(addprefix $(obj),$(head-y)) +OBJS := $(head-y) -HAVE_VENDOR_COMMON_LIB = $(if $(wildcard board/$(VENDOR)/common/Makefile),y,n) +HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makefile),y,n) LIBS-y += lib/ LIBS-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/ @@ -412,7 +440,7 @@ LIBS-$(CONFIG_PPC) += arch/powerpc/cpu/ LIBS-y += board/$(BOARDDIR)/ LIBS-y := $(patsubst %/, %/built-in.o, $(LIBS-y)) -LIBS := $(addprefix $(obj),$(sort $(LIBS-y))) +LIBS := $(sort $(LIBS-y)) .PHONY : $(LIBS) # Add GCC lib @@ -437,9 +465,6 @@ LDPPFLAGS += \ $(shell $(LD) --version | \ sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p') -__OBJS := $(subst $(obj),,$(OBJS)) -__LIBS := $(subst $(obj),,$(LIBS)) - ######################################################################### ######################################################################### @@ -464,66 +489,66 @@ ifneq ($(CONFIG_STATIC_RELA),) DO_STATIC_RELA = \ start=$$($(NM) $(1) | grep __rel_dyn_start | cut -f 1 -d ' '); \ end=$$($(NM) $(1) | grep __rel_dyn_end | cut -f 1 -d ' '); \ - $(obj)tools/relocate-rela $(2) $(3) $$start $$end + tools/relocate-rela $(2) $(3) $$start $$end else DO_STATIC_RELA = endif # Always append ALL so that arch config.mk's can add custom ones -ALL-y += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map - -ALL-$(CONFIG_NAND_U_BOOT) += $(obj)u-boot-nand.bin -ALL-$(CONFIG_ONENAND_U_BOOT) += $(obj)u-boot-onenand.bin -ALL-$(CONFIG_RAMBOOT_PBL) += $(obj)u-boot.pbl -ALL-$(CONFIG_SPL) += $(obj)spl/u-boot-spl.bin -ALL-$(CONFIG_SPL_FRAMEWORK) += $(obj)u-boot.img -ALL-$(CONFIG_TPL) += $(obj)tpl/u-boot-tpl.bin -ALL-$(CONFIG_OF_SEPARATE) += $(obj)u-boot.dtb $(obj)u-boot-dtb.bin +ALL-y += u-boot.srec u-boot.bin System.map + +ALL-$(CONFIG_NAND_U_BOOT) += u-boot-nand.bin +ALL-$(CONFIG_ONENAND_U_BOOT) += u-boot-onenand.bin +ALL-$(CONFIG_RAMBOOT_PBL) += u-boot.pbl +ALL-$(CONFIG_SPL) += spl/u-boot-spl.bin +ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot.img +ALL-$(CONFIG_TPL) += tpl/u-boot-tpl.bin +ALL-$(CONFIG_OF_SEPARATE) += u-boot.dtb u-boot-dtb.bin ifneq ($(CONFIG_SPL_TARGET),) -ALL-$(CONFIG_SPL) += $(obj)$(CONFIG_SPL_TARGET:"%"=%) +ALL-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%) endif -ALL-$(CONFIG_REMAKE_ELF) += $(obj)u-boot.elf +ALL-$(CONFIG_REMAKE_ELF) += u-boot.elf # enable combined SPL/u-boot/dtb rules for tegra ifneq ($(CONFIG_TEGRA),) ifeq ($(CONFIG_SPL),y) ifeq ($(CONFIG_OF_SEPARATE),y) -ALL-y += $(obj)u-boot-dtb-tegra.bin +ALL-y += u-boot-dtb-tegra.bin else -ALL-y += $(obj)u-boot-nodtb-tegra.bin +ALL-y += u-boot-nodtb-tegra.bin endif endif endif all: $(ALL-y) $(SUBDIR_EXAMPLES-y) -$(obj)u-boot.dtb: checkdtc $(obj)u-boot - $(MAKE) $(build) dts binary - mv $(obj)dts/dt.dtb $@ +u-boot.dtb: checkdtc u-boot + $(MAKE) $(build)=dts binary + mv dts/dt.dtb $@ -$(obj)u-boot-dtb.bin: $(obj)u-boot.bin $(obj)u-boot.dtb +u-boot-dtb.bin: u-boot.bin u-boot.dtb cat $^ >$@ -$(obj)u-boot.hex: $(obj)u-boot +u-boot.hex: u-boot $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -$(obj)u-boot.srec: $(obj)u-boot +u-boot.srec: u-boot $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -$(obj)u-boot.bin: $(obj)u-boot +u-boot.bin: u-boot $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ $(call DO_STATIC_RELA,$<,$@,$(CONFIG_SYS_TEXT_BASE)) $(BOARD_SIZE_CHECK) -$(obj)u-boot.ldr: $(obj)u-boot +u-boot.ldr: u-boot $(CREATE_LDR_ENV) $(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS) $(BOARD_SIZE_CHECK) -$(obj)u-boot.ldr.hex: $(obj)u-boot.ldr +u-boot.ldr.hex: u-boot.ldr $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary -$(obj)u-boot.ldr.srec: $(obj)u-boot.ldr +u-boot.ldr.srec: u-boot.ldr $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary # @@ -534,79 +559,78 @@ ifndef CONFIG_SYS_UBOOT_START CONFIG_SYS_UBOOT_START := 0 endif -$(obj)u-boot.img: $(obj)u-boot.bin - $(obj)tools/mkimage -A $(ARCH) -T firmware -C none \ +u-boot.img: u-boot.bin + tools/mkimage -A $(ARCH) -T firmware -C none \ -O u-boot -a $(CONFIG_SYS_TEXT_BASE) \ -e $(CONFIG_SYS_UBOOT_START) \ -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \ sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \ -d $< $@ -$(obj)u-boot.imx: $(obj)u-boot.bin depend - $(MAKE) $(build) $(SRCTREE)/arch/arm/imx-common $(OBJTREE)/u-boot.imx +u-boot.imx: u-boot.bin depend + $(MAKE) $(build)=arch/arm/imx-common $(objtree)/u-boot.imx -$(obj)u-boot.kwb: $(obj)u-boot.bin - $(obj)tools/mkimage -n $(CONFIG_SYS_KWD_CONFIG) -T kwbimage \ +u-boot.kwb: u-boot.bin + tools/mkimage -n $(CONFIG_SYS_KWD_CONFIG) -T kwbimage \ -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -d $< $@ -$(obj)u-boot.pbl: $(obj)u-boot.bin - $(obj)tools/mkimage -n $(CONFIG_SYS_FSL_PBL_RCW) \ +u-boot.pbl: u-boot.bin + tools/mkimage -n $(CONFIG_SYS_FSL_PBL_RCW) \ -R $(CONFIG_SYS_FSL_PBL_PBI) -T pblimage \ -d $< $@ -$(obj)u-boot.sha1: $(obj)u-boot.bin - $(obj)tools/ubsha1 $(obj)u-boot.bin +u-boot.sha1: u-boot.bin + tools/ubsha1 u-boot.bin -$(obj)u-boot.dis: $(obj)u-boot +u-boot.dis: u-boot $(OBJDUMP) -d $< > $@ # $@ is output, $(1) and $(2) are inputs, $(3) is padded intermediate, # $(4) is pad-to SPL_PAD_APPEND = \ $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(4) -I binary -O binary \ - $(1) $(obj)$(3); \ - cat $(obj)$(3) $(2) > $@; \ - rm $(obj)$(3) + $(1) $(3); \ + cat $(3) $(2) > $@; \ + rm $(3) ifdef CONFIG_TPL -SPL_PAYLOAD := $(obj)tpl/u-boot-with-tpl.bin +SPL_PAYLOAD := tpl/u-boot-with-tpl.bin else -SPL_PAYLOAD := $(obj)u-boot.bin +SPL_PAYLOAD := u-boot.bin endif -$(obj)u-boot-with-spl.bin: $(obj)spl/u-boot-spl.bin $(SPL_PAYLOAD) +u-boot-with-spl.bin: spl/u-boot-spl.bin $(SPL_PAYLOAD) $(call SPL_PAD_APPEND,$<,$(SPL_PAYLOAD),spl/u-boot-spl-pad.bin,$(CONFIG_SPL_PAD_TO)) -$(obj)tpl/u-boot-with-tpl.bin: $(obj)tpl/u-boot-tpl.bin $(obj)u-boot.bin - $(call SPL_PAD_APPEND,$<,$(obj)u-boot.bin,tpl/u-boot-tpl-pad.bin,$(CONFIG_TPL_PAD_TO)) +tpl/u-boot-with-tpl.bin: tpl/u-boot-tpl.bin u-boot.bin + $(call SPL_PAD_APPEND,$<,u-boot.bin,tpl/u-boot-tpl-pad.bin,$(CONFIG_TPL_PAD_TO)) -$(obj)u-boot-with-spl.imx: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin - $(MAKE) $(build) $(SRCTREE)/arch/arm/imx-common \ +u-boot-with-spl.imx: spl/u-boot-spl.bin u-boot.bin + $(MAKE) $(build)=arch/arm/imx-common \ $(OBJTREE)/u-boot-with-spl.imx -$(obj)u-boot-with-nand-spl.imx: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin - $(MAKE) $(build) $(SRCTREE)/arch/arm/imx-common \ +u-boot-with-nand-spl.imx: spl/u-boot-spl.bin u-boot.bin + $(MAKE) $(build)=arch/arm/imx-common \ $(OBJTREE)/u-boot-with-nand-spl.imx -$(obj)u-boot.ubl: $(obj)u-boot-with-spl.bin - $(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \ - -e $(CONFIG_SYS_TEXT_BASE) -d $< $(obj)u-boot.ubl +u-boot.ubl: u-boot-with-spl.bin + tools/mkimage -n $(UBL_CONFIG) -T ublimage \ + -e $(CONFIG_SYS_TEXT_BASE) -d $< u-boot.ubl -$(obj)u-boot.ais: $(obj)spl/u-boot-spl.bin $(obj)u-boot.img - $(obj)tools/mkimage -s -n $(if $(CONFIG_AIS_CONFIG_FILE),$(CONFIG_AIS_CONFIG_FILE),"/dev/null") \ +u-boot.ais: spl/u-boot-spl.bin u-boot.img + tools/mkimage -s -n $(if $(CONFIG_AIS_CONFIG_FILE),$(srctree)/$(CONFIG_AIS_CONFIG_FILE:"%"=%),"/dev/null") \ -T aisimage \ -e $(CONFIG_SPL_TEXT_BASE) \ - -d $(obj)spl/u-boot-spl.bin \ - $(obj)spl/u-boot-spl.ais + -d spl/u-boot-spl.bin \ + spl/u-boot-spl.ais $(OBJCOPY) ${OBJCFLAGS} -I binary \ --pad-to=$(CONFIG_SPL_MAX_SIZE) -O binary \ - $(obj)spl/u-boot-spl.ais $(obj)spl/u-boot-spl-pad.ais - cat $(obj)spl/u-boot-spl-pad.ais $(obj)u-boot.img > \ - $(obj)u-boot.ais + spl/u-boot-spl.ais spl/u-boot-spl-pad.ais + cat spl/u-boot-spl-pad.ais u-boot.img > u-boot.ais -$(obj)u-boot.sb: $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin - $(MAKE) $(build) $(SRCTREE)/$(CPUDIR)/$(SOC)/ $(OBJTREE)/u-boot.sb +u-boot.sb: u-boot.bin spl/u-boot-spl.bin + $(MAKE) $(build)=$(CPUDIR)/$(SOC)/ $(OBJTREE)/u-boot.sb # On x600 (SPEAr600) U-Boot is appended to U-Boot SPL. # Both images are created using mkimage (crc etc), so that the ROM @@ -614,124 +638,123 @@ $(obj)u-boot.sb: $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin # SPL image (with mkimage header) and not the binary. Otherwise the resulting image # which is loaded/copied by the ROM bootloader to SRAM doesn't fit. # The resulting image containing both U-Boot images is called u-boot.spr -$(obj)u-boot.spr: $(obj)u-boot.img $(obj)spl/u-boot-spl.bin - $(obj)tools/mkimage -A $(ARCH) -T firmware -C none \ +u-boot.spr: u-boot.img spl/u-boot-spl.bin + tools/mkimage -A $(ARCH) -T firmware -C none \ -a $(CONFIG_SPL_TEXT_BASE) -e $(CONFIG_SPL_TEXT_BASE) -n XLOADER \ - -d $(obj)spl/u-boot-spl.bin $@ + -d spl/u-boot-spl.bin $@ $(OBJCOPY) -I binary -O binary \ --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff $@ - cat $(obj)u-boot.img >> $@ + cat u-boot.img >> $@ ifneq ($(CONFIG_TEGRA),) -$(obj)u-boot-nodtb-tegra.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin - $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SYS_TEXT_BASE) -O binary $(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin - cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin > $@ - rm $(obj)spl/u-boot-spl-pad.bin +u-boot-nodtb-tegra.bin: spl/u-boot-spl.bin u-boot.bin + $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SYS_TEXT_BASE) -O binary spl/u-boot-spl spl/u-boot-spl-pad.bin + cat spl/u-boot-spl-pad.bin u-boot.bin > $@ + rm spl/u-boot-spl-pad.bin ifeq ($(CONFIG_OF_SEPARATE),y) -$(obj)u-boot-dtb-tegra.bin: $(obj)u-boot-nodtb-tegra.bin $(obj)u-boot.dtb - cat $(obj)u-boot-nodtb-tegra.bin $(obj)u-boot.dtb > $@ +u-boot-dtb-tegra.bin: u-boot-nodtb-tegra.bin u-boot.dtb + cat u-boot-nodtb-tegra.bin u-boot.dtb > $@ endif endif -$(obj)u-boot-img.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.img - cat $(obj)spl/u-boot-spl.bin $(obj)u-boot.img > $@ +u-boot-img.bin: spl/u-boot-spl.bin u-boot.img + cat spl/u-boot-spl.bin u-boot.img > $@ # PPC4xx needs the SPL at the end of the image, since the reset vector # is located at 0xfffffffc. So we can't use the "u-boot-img.bin" target # and need to introduce a new build target with the full blown U-Boot # at the start padded up to the start of the SPL image. And then concat # the SPL image to the end. -$(obj)u-boot-img-spl-at-end.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.img +u-boot-img-spl-at-end.bin: spl/u-boot-spl.bin u-boot.img $(OBJCOPY) -I binary -O binary --pad-to=$(CONFIG_UBOOT_PAD_TO) \ - --gap-fill=0xff $(obj)u-boot.img $@ - cat $(obj)spl/u-boot-spl.bin >> $@ + --gap-fill=0xff u-boot.img $@ + cat spl/u-boot-spl.bin >> $@ # Create a new ELF from a raw binary file. This is useful for arm64 # where static relocation needs to be performed on the raw binary, # but certain simulators only accept an ELF file (but don't do the # relocation). # FIXME refactor dts/Makefile to share target/arch detection -$(obj)u-boot.elf: $(obj)u-boot.bin +u-boot.elf: u-boot.bin @$(OBJCOPY) -B aarch64 -I binary -O elf64-littleaarch64 \ - $< $(obj)u-boot-elf.o - @$(LD) $(obj)u-boot-elf.o -o $@ \ + $< u-boot-elf.o + @$(LD) u-boot-elf.o -o $@ \ --defsym=_start=$(CONFIG_SYS_TEXT_BASE) \ -Ttext=$(CONFIG_SYS_TEXT_BASE) ifeq ($(CONFIG_SANDBOX),y) GEN_UBOOT = \ - cd $(LNDIR) && $(CC) $(SYMS) -T $(obj)u-boot.lds \ - -Wl,--start-group $(__LIBS) -Wl,--end-group \ + $(CC) $(SYMS) -T u-boot.lds \ + -Wl,--start-group $(LIBS) -Wl,--end-group \ $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map -o u-boot else GEN_UBOOT = \ - cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \ - $(__OBJS) \ - --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \ + $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \ + $(OBJS) \ + --start-group $(LIBS) --end-group $(PLATFORM_LIBS) \ -Map u-boot.map -o u-boot endif -$(obj)u-boot: depend \ - $(SUBDIR_TOOLS) $(OBJS) $(LIBS) $(obj)u-boot.lds +u-boot: depend $(SUBDIR_TOOLS) $(OBJS) $(LIBS) u-boot.lds $(GEN_UBOOT) ifeq ($(CONFIG_KALLSYMS),y) - smap=`$(call SYSTEM_MAP,$(obj)u-boot) | \ + smap=`$(call SYSTEM_MAP,u-boot) | \ awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \ $(CC) $(CFLAGS) -DSYSTEM_MAP="\"$${smap}\"" \ - -c common/system_map.c -o $(obj)common/system_map.o - $(GEN_UBOOT) $(obj)common/system_map.o + -c $(srctree)/common/system_map.c -o common/system_map.o + $(GEN_UBOOT) common/system_map.o endif $(OBJS): @: $(LIBS): depend $(SUBDIR_TOOLS) - $(MAKE) $(build) $(dir $(subst $(obj),,$@)) + $(MAKE) $(build)=$(patsubst %/,%,$(dir $@)) $(SUBDIRS): depend - $(MAKE) $(build) $@ all + $(MAKE) $(build)=$@ all -$(SUBDIR_EXAMPLES-y): $(obj)u-boot +$(SUBDIR_EXAMPLES-y): u-boot -$(obj)u-boot.lds: $(LDSCRIPT) depend +u-boot.lds: $(LDSCRIPT) depend $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$< >$@ nand_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend - $(MAKE) $(build) nand_spl/board/$(BOARDDIR) all + $(MAKE) $(build)=nand_spl/board/$(BOARDDIR) all -$(obj)u-boot-nand.bin: nand_spl $(obj)u-boot.bin - cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin +u-boot-nand.bin: nand_spl u-boot.bin + cat nand_spl/u-boot-spl-16k.bin u-boot.bin > u-boot-nand.bin -$(obj)spl/u-boot-spl.bin: $(SUBDIR_TOOLS) depend - $(MAKE) -C spl all +spl/u-boot-spl.bin: $(SUBDIR_TOOLS) depend + $(MAKE) obj=spl -f $(srctree)/spl/Makefile all -$(obj)tpl/u-boot-tpl.bin: $(SUBDIR_TOOLS) depend - $(MAKE) -C spl all CONFIG_TPL_BUILD=y +tpl/u-boot-tpl.bin: $(SUBDIR_TOOLS) depend + $(MAKE) obj=tpl -f $(srctree)/spl/Makefile all CONFIG_TPL_BUILD=y # Explicitly make _depend in subdirs containing multiple targets to prevent # parallel sub-makes creating .depend files simultaneously. depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) \ - $(obj)include/spl-autoconf.mk \ - $(obj)include/tpl-autoconf.mk \ - $(obj)include/autoconf.mk \ - $(obj)include/generated/generic-asm-offsets.h \ - $(obj)include/generated/asm-offsets.h + include/spl-autoconf.mk \ + include/tpl-autoconf.mk \ + include/autoconf.mk \ + include/generated/generic-asm-offsets.h \ + include/generated/asm-offsets.h TAG_SUBDIRS = $(SUBDIRS) -TAG_SUBDIRS += $(dir $(__LIBS)) +TAG_SUBDIRS += $(dir $(LIBS)) TAG_SUBDIRS += include FIND := find FINDFLAGS := -L checkstack: - $(CROSS_COMPILE)objdump -d $(obj)u-boot \ - `$(FIND) $(obj) -name u-boot-spl -print` | \ - perl $(src)scripts/checkstack.pl $(ARCH) + $(CROSS_COMPILE)objdump -d u-boot \ + `$(FIND) . -name u-boot-spl -print` | \ + perl $(src)/scripts/checkstack.pl $(ARCH) tags ctags: - ctags -w -o $(obj)ctags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \ + ctags -w -o ctags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \ -name '*.[chS]' -print` etags: @@ -746,7 +769,7 @@ SYSTEM_MAP = \ $(NM) $1 | \ grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ LC_ALL=C sort -$(obj)System.map: $(obj)u-boot +System.map: u-boot @$(call SYSTEM_MAP,$<) > $@ checkthumb: @@ -778,76 +801,76 @@ checkdtc: # This target actually generates 2 files; autoconf.mk and autoconf.mk.dep. # the dep file is only include in this top level makefile to determine when # to regenerate the autoconf.mk file. -$(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h +include/autoconf.mk.dep: include/config.h include/common.h @$(XECHO) Generating $@ ; \ : Generate the dependancies ; \ $(CC) -x c -DDO_DEPS_ONLY -M $(CFLAGS) $(CPPFLAGS) \ - -MQ $(obj)include/autoconf.mk include/common.h > $@ || \ + -MQ include/autoconf.mk $(srctree)/include/common.h > $@ || \ rm $@ -$(obj)include/autoconf.mk: $(obj)include/config.h +include/autoconf.mk: include/config.h @$(XECHO) Generating $@ ; \ : Extract the config macros ; \ - $(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM include/common.h > $@.tmp && \ - sed -n -f tools/scripts/define2mk.sed $@.tmp > $@; \ + $(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \ + sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \ rm $@.tmp # Auto-generate the spl-autoconf.mk file (which is included by all makefiles for SPL) -$(obj)include/tpl-autoconf.mk: $(obj)include/config.h +include/tpl-autoconf.mk: include/config.h @$(XECHO) Generating $@ ; \ : Extract the config macros ; \ $(CPP) $(CFLAGS) -DCONFIG_TPL_BUILD -DCONFIG_SPL_BUILD\ - -DDO_DEPS_ONLY -dM include/common.h > $@.tmp && \ - sed -n -f tools/scripts/define2mk.sed $@.tmp > $@; \ + -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \ + sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \ rm $@.tmp -$(obj)include/spl-autoconf.mk: $(obj)include/config.h +include/spl-autoconf.mk: include/config.h @$(XECHO) Generating $@ ; \ : Extract the config macros ; \ - $(CPP) $(CFLAGS) -DCONFIG_SPL_BUILD -DDO_DEPS_ONLY -dM include/common.h > $@.tmp && \ - sed -n -f tools/scripts/define2mk.sed $@.tmp > $@; \ + $(CPP) $(CFLAGS) -DCONFIG_SPL_BUILD -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \ + sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \ rm $@.tmp -$(obj)include/generated/generic-asm-offsets.h: $(obj)lib/asm-offsets.s +include/generated/generic-asm-offsets.h: lib/asm-offsets.s @$(XECHO) Generating $@ - tools/scripts/make-asm-offsets $(obj)lib/asm-offsets.s $@ + $(srctree)/tools/scripts/make-asm-offsets lib/asm-offsets.s $@ -$(obj)lib/asm-offsets.s: $(obj)include/config.h $(src)lib/asm-offsets.c - @mkdir -p $(obj)lib +lib/asm-offsets.s: include/config.h $(srctree)/lib/asm-offsets.c + @mkdir -p lib $(CC) -DDO_DEPS_ONLY \ $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ - -o $@ $(src)lib/asm-offsets.c -c -S + -o $@ $(srctree)/lib/asm-offsets.c -c -S -$(obj)include/generated/asm-offsets.h: $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s +include/generated/asm-offsets.h: $(CPUDIR)/$(SOC)/asm-offsets.s @$(XECHO) Generating $@ - tools/scripts/make-asm-offsets $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s $@ + $(srctree)/tools/scripts/make-asm-offsets $(CPUDIR)/$(SOC)/asm-offsets.s $@ -$(obj)$(CPUDIR)/$(SOC)/asm-offsets.s: $(obj)include/config.h - @mkdir -p $(obj)$(CPUDIR)/$(SOC) - if [ -f $(src)$(CPUDIR)/$(SOC)/asm-offsets.c ];then \ +$(CPUDIR)/$(SOC)/asm-offsets.s: include/config.h + @mkdir -p $(CPUDIR)/$(SOC) + if [ -f $(srctree)/$(CPUDIR)/$(SOC)/asm-offsets.c ];then \ $(CC) -DDO_DEPS_ONLY \ $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ - -o $@ $(src)$(CPUDIR)/$(SOC)/asm-offsets.c -c -S; \ + -o $@ $(srctree)/$(CPUDIR)/$(SOC)/asm-offsets.c -c -S; \ else \ touch $@; \ fi ######################################################################### else # !config.mk -all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \ -$(obj)u-boot.img $(obj)u-boot.dis $(obj)u-boot \ +all u-boot.hex u-boot.srec u-boot.bin \ +u-boot.img u-boot.dis u-boot \ $(filter-out tools,$(SUBDIRS)) \ -depend dep tags ctags etags cscope $(obj)System.map: +depend dep tags ctags etags cscope System.map: @echo "System not configured - see README" >&2 @ exit 1 tools: $(VERSION_FILE) $(TIMESTAMP_FILE) - $(MAKE) $(build) $@ all + $(MAKE) $(build)=$@ all endif # config.mk # ARM relocations should all be R_ARM_RELATIVE (32-bit) or # R_AARCH64_RELATIVE (64-bit). -checkarmreloc: $(obj)u-boot +checkarmreloc: u-boot @RELOC="`$(CROSS_COMPILE)readelf -r -W $< | cut -d ' ' -f 4 | \ grep R_A | sort -u`"; \ if test "$$RELOC" != "R_ARM_RELATIVE" -a \ @@ -877,15 +900,15 @@ $(TIMESTAMP_FILE): @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ easylogo env gdb: - $(MAKE) $(build) tools/$@ MTD_VERSION=${MTD_VERSION} + $(MAKE) $(build)=tools/$@ MTD_VERSION=${MTD_VERSION} gdbtools: gdb xmldocs pdfdocs psdocs htmldocs mandocs: tools/kernel-doc/docproc - $(MAKE) U_BOOT_VERSION=$(U_BOOT_VERSION) -C doc/DocBook/ $@ + $(MAKE) U_BOOT_VERSION=$(U_BOOT_VERSION) $(build)=doc/DocBook $@ tools-all: easylogo env gdb $(VERSION_FILE) $(TIMESTAMP_FILE) - $(MAKE) $(build) tools HOST_TOOLS_ALL=y + $(MAKE) $(build)=tools HOST_TOOLS_ALL=y .PHONY : CHANGELOG CHANGELOG: @@ -897,57 +920,52 @@ include/license.h: tools/bin2header COPYING ######################################################################### unconfig: - @rm -f $(obj)include/config.h $(obj)include/config.mk \ - $(obj)board/*/config.tmp $(obj)board/*/*/config.tmp \ - $(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep \ - $(obj)include/spl-autoconf.mk \ - $(obj)include/tpl-autoconf.mk + @rm -f include/config.h include/config.mk \ + board/*/config.tmp board/*/*/config.tmp \ + include/autoconf.mk include/autoconf.mk.dep \ + include/spl-autoconf.mk \ + include/tpl-autoconf.mk %_config:: unconfig @$(MKCONFIG) -A $(@:_config=) -sinclude $(obj).boards.depend -$(obj).boards.depend: boards.cfg - @awk '(NF && $$1 !~ /^#/) { print $$7 ": " $$7 "_config; $$(MAKE)" }' $< > $@ - -######################################################################### ######################################################################### clean: - @rm -f $(obj)examples/standalone/atmel_df_pow2 \ - $(obj)examples/standalone/hello_world \ - $(obj)examples/standalone/interrupt \ - $(obj)examples/standalone/mem_to_mem_idma2intr \ - $(obj)examples/standalone/sched \ - $(addprefix $(obj)examples/standalone/, smc91111_eeprom smc911x_eeprom) \ - $(obj)examples/standalone/test_burst \ - $(obj)examples/standalone/timer - @rm -f $(addprefix $(obj)examples/api/, demo demo.bin) - @rm -f $(obj)tools/bmp_logo $(obj)tools/easylogo/easylogo \ - $(obj)tools/env/fw_printenv \ - $(obj)tools/envcrc \ - $(addprefix $(obj)tools/gdb/, gdbcont gdbsend) \ - $(obj)tools/gen_eth_addr $(obj)tools/img2srec \ - $(obj)tools/dumpimage \ - $(addprefix $(obj)tools/, mkenvimage mkimage) \ - $(obj)tools/mpc86x_clk \ - $(addprefix $(obj)tools/, mk$(BOARD)spl mkexynosspl) \ - $(obj)tools/mxsboot \ - $(obj)tools/ncb $(obj)tools/ubsha1 \ - $(obj)tools/kernel-doc/docproc \ - $(obj)tools/proftool - @rm -f $(addprefix $(obj)board/cray/L1/, bootscript.c bootscript.image) \ - $(obj)board/matrix_vision/*/bootscript.img \ - $(obj)spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl \ - $(obj)u-boot.lds \ - $(addprefix $(obj)arch/blackfin/cpu/, init.lds init.elf) - @rm -f $(obj)include/bmp_logo.h - @rm -f $(obj)include/bmp_logo_data.h - @rm -f $(obj)lib/asm-offsets.s - @rm -f $(obj)include/generated/asm-offsets.h - @rm -f $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s + @rm -f examples/standalone/atmel_df_pow2 \ + examples/standalone/hello_world \ + examples/standalone/interrupt \ + examples/standalone/mem_to_mem_idma2intr \ + examples/standalone/sched \ + $(addprefix examples/standalone/, smc91111_eeprom smc911x_eeprom) \ + examples/standalone/test_burst \ + examples/standalone/timer + @rm -f $(addprefix examples/api/, demo demo.bin) + @rm -f tools/bmp_logo tools/easylogo/easylogo \ + tools/env/fw_printenv \ + tools/envcrc \ + $(addprefix tools/gdb/, gdbcont gdbsend) \ + tools/gen_eth_addr tools/img2srec \ + tools/dumpimage \ + $(addprefix tools/, mkenvimage mkimage) \ + tools/mpc86x_clk \ + $(addprefix tools/, mk$(BOARD)spl mkexynosspl) \ + tools/mxsboot \ + tools/ncb tools/ubsha1 \ + tools/kernel-doc/docproc \ + tools/proftool + @rm -f $(addprefix board/cray/L1/, bootscript.c bootscript.image) \ + board/matrix_vision/*/bootscript.img \ + spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl \ + u-boot.lds \ + $(addprefix arch/blackfin/cpu/, init.lds init.elf) + @rm -f include/bmp_logo.h + @rm -f include/bmp_logo_data.h + @rm -f lib/asm-offsets.s + @rm -f include/generated/asm-offsets.h + @rm -f $(CPUDIR)/$(SOC)/asm-offsets.s @rm -f $(TIMESTAMP_FILE) $(VERSION_FILE) - @$(MAKE) -s -C doc/DocBook/ cleandocs + @$(MAKE) -f $(srctree)/doc/DocBook/Makefile cleandocs @find $(OBJTREE) -type f \ \( -name 'core' -o -name '*.bak' -o -name '*~' -o -name '*.su' \ -o -name '*.o' -o -name '*.a' -o -name '*.exe' \ @@ -962,38 +980,38 @@ clobber: tidy @find $(OBJTREE) -type f \( -name '*.srec' \ -o -name '*.bin' -o -name u-boot.img \) \ -print0 | xargs -0 rm -f - @rm -f $(OBJS) $(obj)*.bak $(obj)ctags $(obj)etags $(obj)TAGS \ - $(obj)cscope.* $(obj)*.*~ - @rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL-y) - @rm -f $(obj)u-boot.kwb - @rm -f $(obj)u-boot.pbl - @rm -f $(obj)u-boot.imx - @rm -f $(obj)u-boot-with-spl.imx - @rm -f $(obj)u-boot-with-nand-spl.imx - @rm -f $(obj)u-boot.ubl - @rm -f $(obj)u-boot.ais - @rm -f $(obj)u-boot.dtb - @rm -f $(obj)u-boot.sb - @rm -f $(obj)u-boot.spr - @rm -f $(addprefix $(obj)nand_spl/, u-boot.lds u-boot.lst System.map) - @rm -f $(addprefix $(obj)nand_spl/, u-boot-nand_spl.lds u-boot-spl u-boot-spl.map) - @rm -f $(addprefix $(obj)spl/, u-boot-spl u-boot-spl.bin u-boot-spl.map) - @rm -f $(obj)spl/u-boot-spl.lds - @rm -f $(addprefix $(obj)tpl/, u-boot-tpl u-boot-tpl.bin u-boot-tpl.map) - @rm -f $(obj)tpl/u-boot-spl.lds - @rm -f $(obj)MLO MLO.byteswap - @rm -f $(obj)SPL - @rm -f $(obj)tools/xway-swap-bytes - @rm -fr $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm - @rm -fr $(obj)include/generated - @[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l -print | xargs rm -f - @rm -f $(obj)dts/*.tmp - @rm -f $(addprefix $(obj)spl/, u-boot-spl.ais, u-boot-spl-pad.ais) + @rm -f $(OBJS) *.bak ctags etags TAGS \ + cscope.* *.*~ + @rm -f u-boot u-boot.map u-boot.hex $(ALL-y) + @rm -f u-boot.kwb + @rm -f u-boot.pbl + @rm -f u-boot.imx + @rm -f u-boot-with-spl.imx + @rm -f u-boot-with-nand-spl.imx + @rm -f u-boot.ubl + @rm -f u-boot.ais + @rm -f u-boot.dtb + @rm -f u-boot.sb + @rm -f u-boot.spr + @rm -f $(addprefix nand_spl/, u-boot.lds u-boot.lst System.map) + @rm -f $(addprefix nand_spl/, u-boot-nand_spl.lds u-boot-spl u-boot-spl.map) + @rm -f $(addprefix spl/, u-boot-spl u-boot-spl.bin u-boot-spl.map) + @rm -f spl/u-boot-spl.lds + @rm -f $(addprefix tpl/, u-boot-tpl u-boot-tpl.bin u-boot-tpl.map) + @rm -f tpl/u-boot-spl.lds + @rm -f MLO MLO.byteswap + @rm -f SPL + @rm -f tools/xway-swap-bytes + @rm -fr include/asm/proc include/asm/arch include/asm + @rm -fr include/generated + @[ ! -d nand_spl ] || find nand_spl -name "*" -type l -print | xargs rm -f + @rm -f dts/*.tmp + @rm -f $(addprefix spl/, u-boot-spl.ais, u-boot-spl-pad.ais) mrproper \ distclean: clobber unconfig ifneq ($(OBJTREE),$(SRCTREE)) - rm -rf $(obj)* + rm -rf * endif backup: @@ -1001,3 +1019,12 @@ backup: gtar --force-local -zcvf `LC_ALL=C date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F ######################################################################### + +endif # skip-makefile + +PHONY += FORCE +FORCE: + +# Declare the contents of the .PHONY variable as phony. We keep that +# information in a variable so we can use it in if_changed and friends. +.PHONY: $(PHONY) diff --git a/arch/arm/cpu/arm1136/config.mk b/arch/arm/cpu/arm1136/config.mk index f74228cdba..ab1fc4ad15 100644 --- a/arch/arm/cpu/arm1136/config.mk +++ b/arch/arm/cpu/arm1136/config.mk @@ -14,6 +14,6 @@ ifdef CONFIG_SPL_BUILD ALL-y += $(OBJTREE)/SPL endif else -ALL-y += $(obj)u-boot.imx +ALL-y += u-boot.imx endif endif diff --git a/arch/arm/cpu/arm926ejs/config.mk b/arch/arm/cpu/arm926ejs/config.mk index 4d9895f5d8..f27ca15086 100644 --- a/arch/arm/cpu/arm926ejs/config.mk +++ b/arch/arm/cpu/arm926ejs/config.mk @@ -13,6 +13,6 @@ ifdef CONFIG_SPL_BUILD ALL-y += $(OBJTREE)/SPL endif else -ALL-y += $(obj)u-boot.imx +ALL-y += u-boot.imx endif endif diff --git a/arch/arm/cpu/arm926ejs/davinci/config.mk b/arch/arm/cpu/arm926ejs/davinci/config.mk index d5c978b446..69e9d5ab21 100644 --- a/arch/arm/cpu/arm926ejs/davinci/config.mk +++ b/arch/arm/cpu/arm926ejs/davinci/config.mk @@ -4,5 +4,5 @@ # SPDX-License-Identifier: GPL-2.0+ # ifndef CONFIG_SPL_BUILD -ALL-$(CONFIG_SPL_FRAMEWORK) += $(obj)u-boot.ais +ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot.ais endif diff --git a/arch/arm/cpu/armv7/am33xx/config.mk b/arch/arm/cpu/armv7/am33xx/config.mk index 8e3668f781..1c06fb40a4 100644 --- a/arch/arm/cpu/armv7/am33xx/config.mk +++ b/arch/arm/cpu/armv7/am33xx/config.mk @@ -7,5 +7,5 @@ ifdef CONFIG_SPL_BUILD ALL-y += $(OBJTREE)/MLO ALL-$(CONFIG_SPL_SPI_SUPPORT) += $(OBJTREE)/MLO.byteswap else -ALL-y += $(obj)u-boot.img +ALL-y += u-boot.img endif diff --git a/arch/arm/cpu/armv7/config.mk b/arch/arm/cpu/armv7/config.mk index 38b7c401f8..d01f3d9f50 100644 --- a/arch/arm/cpu/armv7/config.mk +++ b/arch/arm/cpu/armv7/config.mk @@ -20,6 +20,6 @@ ifdef CONFIG_SPL_BUILD ALL-y += $(OBJTREE)/SPL endif else -ALL-y += $(obj)u-boot.imx +ALL-y += u-boot.imx endif endif diff --git a/arch/arm/cpu/armv7/omap3/config.mk b/arch/arm/cpu/armv7/omap3/config.mk index 1d6a57c66c..2a3d1c5c3a 100644 --- a/arch/arm/cpu/armv7/omap3/config.mk +++ b/arch/arm/cpu/armv7/omap3/config.mk @@ -11,5 +11,5 @@ ifdef CONFIG_SPL_BUILD ALL-y += $(OBJTREE)/MLO else -ALL-y += $(obj)u-boot.img +ALL-y += u-boot.img endif diff --git a/arch/arm/cpu/armv7/omap4/config.mk b/arch/arm/cpu/armv7/omap4/config.mk index 1d6a57c66c..2a3d1c5c3a 100644 --- a/arch/arm/cpu/armv7/omap4/config.mk +++ b/arch/arm/cpu/armv7/omap4/config.mk @@ -11,5 +11,5 @@ ifdef CONFIG_SPL_BUILD ALL-y += $(OBJTREE)/MLO else -ALL-y += $(obj)u-boot.img +ALL-y += u-boot.img endif diff --git a/arch/arm/cpu/armv7/omap5/config.mk b/arch/arm/cpu/armv7/omap5/config.mk index 2673af9668..261b272234 100644 --- a/arch/arm/cpu/armv7/omap5/config.mk +++ b/arch/arm/cpu/armv7/omap5/config.mk @@ -9,5 +9,5 @@ ifdef CONFIG_SPL_BUILD ALL-y += $(OBJTREE)/MLO else -ALL-y += $(obj)u-boot.img +ALL-y += u-boot.img endif diff --git a/arch/arm/cpu/armv7/socfpga/config.mk b/arch/arm/cpu/armv7/socfpga/config.mk index d33ab7d62f..3d18491577 100644 --- a/arch/arm/cpu/armv7/socfpga/config.mk +++ b/arch/arm/cpu/armv7/socfpga/config.mk @@ -4,5 +4,5 @@ # SPDX-License-Identifier: GPL-2.0+ # ifndef CONFIG_SPL_BUILD -ALL-y += $(obj)u-boot.img +ALL-y += u-boot.img endif diff --git a/arch/blackfin/config.mk b/arch/blackfin/config.mk index 73fa79855f..c752025aaf 100644 --- a/arch/blackfin/config.mk +++ b/arch/blackfin/config.mk @@ -12,7 +12,7 @@ CONFIG_STANDALONE_LOAD_ADDR ?= 0x1000 -m elf32bfin ifeq ($(CONFIG_BFIN_CPU),) CONFIG_BFIN_CPU := \ $(shell awk '$$2 == "CONFIG_BFIN_CPU" { print $$3 }' \ - $(src)include/configs/$(BOARD).h) + $(srctree)/include/configs/$(BOARD).h) else CONFIG_BFIN_CPU := $(strip $(CONFIG_BFIN_CPU:"%"=%)) endif @@ -28,10 +28,10 @@ PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections PLATFORM_RELFLAGS += -mcpu=$(CONFIG_BFIN_CPU) ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS) -ALL-y += $(obj)u-boot.ldr +ALL-y += u-boot.ldr endif ifeq ($(CONFIG_ENV_IS_EMBEDDED_IN_LDR),y) -CREATE_LDR_ENV = $(obj)tools/envcrc --binary > $(obj)env-ldr.o +CREATE_LDR_ENV = tools/envcrc --binary > env-ldr.o HOSTCFLAGS_NOPED_ADSP := \ $(shell $(CPP) -dD - -mcpu=$(CONFIG_BFIN_CPU) .*\' ; then \ echo "$< contains external references!" 1>&2 ; \ @@ -35,7 +35,7 @@ ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS) fi endif -$(obj)init.lds: init.lds.S +$(obj)/init.lds: $(src)/init.lds.S $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P $^ -o $@ -$(obj)init.elf: $(obj)init.lds $(obj)init.o $(obj)initcode.o +$(obj)/init.elf: $(obj)/init.lds $(obj)/init.o $(obj)/initcode.o $(LD) $(LDFLAGS) -T $^ -o $@ diff --git a/arch/mips/cpu/mips32/config.mk b/arch/mips/cpu/mips32/config.mk index 067f871525..7ee7faae8f 100644 --- a/arch/mips/cpu/mips32/config.mk +++ b/arch/mips/cpu/mips32/config.mk @@ -21,4 +21,4 @@ else PLATFORM_LDFLAGS += -m elf32ltsmip endif -CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 -T mips.lds +CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 -T $(srctree)/$(src)/mips.lds diff --git a/arch/mips/cpu/mips64/config.mk b/arch/mips/cpu/mips64/config.mk index d1a8b2c7aa..02113a1f09 100644 --- a/arch/mips/cpu/mips64/config.mk +++ b/arch/mips/cpu/mips64/config.mk @@ -21,4 +21,4 @@ else PLATFORM_LDFLAGS += -m elf64ltsmip endif -CONFIG_STANDALONE_LOAD_ADDR ?= 0xffffffff80200000 -T mips64.lds +CONFIG_STANDALONE_LOAD_ADDR ?= 0xffffffff80200000 -T $(srctree)/$(src)/mips64.lds diff --git a/arch/mips/cpu/xburst/config.mk b/arch/mips/cpu/xburst/config.mk index d81da21017..00b0fd9c9c 100644 --- a/arch/mips/cpu/xburst/config.mk +++ b/arch/mips/cpu/xburst/config.mk @@ -12,4 +12,4 @@ else PLATFORM_LDFLAGS += -m elf32ltsmip endif -CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 -T mips.lds +CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 -T $(srctree)/$(src)/mips.lds diff --git a/arch/nds32/config.mk b/arch/nds32/config.mk index e93e3a8c28..550f8a440e 100644 --- a/arch/nds32/config.mk +++ b/arch/nds32/config.mk @@ -10,7 +10,7 @@ CROSS_COMPILE ?= nds32le-linux- -CONFIG_STANDALONE_LOAD_ADDR = 0x300000 -T nds32.lds +CONFIG_STANDALONE_LOAD_ADDR = 0x300000 -T $(srctree)/$(src)/nds32.lds PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -mrelax PLATFORM_RELFLAGS += -gdwarf-2 diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile index a706d3cc70..ac780d4077 100644 --- a/arch/powerpc/lib/Makefile +++ b/arch/powerpc/lib/Makefile @@ -54,11 +54,11 @@ ifndef CONFIG_SPL_BUILD # Workaround for local bus unaligned access problems # on MPC512x and MPC5200 ifdef CONFIG_MPC512X -$(obj)ppcstring.o: AFLAGS += -Dmemcpy=__memcpy +$(obj)/ppcstring.o: AFLAGS += -Dmemcpy=__memcpy obj-y += memcpy_mpc5200.o endif ifdef CONFIG_MPC5200 -$(obj)ppcstring.o: AFLAGS += -Dmemcpy=__memcpy +$(obj)/ppcstring.o: AFLAGS += -Dmemcpy=__memcpy obj-y += memcpy_mpc5200.o endif endif diff --git a/arch/sandbox/cpu/Makefile b/arch/sandbox/cpu/Makefile index b564294a84..c5f5426b05 100644 --- a/arch/sandbox/cpu/Makefile +++ b/arch/sandbox/cpu/Makefile @@ -10,7 +10,7 @@ obj-y := cpu.o os.o start.o state.o # os.c is build in the system environment, so needs standard includes -$(obj)os.o: CFLAGS := $(filter-out -nostdinc,\ +$(obj)/os.o: CFLAGS := $(filter-out -nostdinc,\ $(patsubst -I%,-idirafter%,$(CFLAGS))) -$(obj).depend.os: CPPFLAGS := $(filter-out -nostdinc,\ +$(obj)/.depend.os: CPPFLAGS := $(filter-out -nostdinc,\ $(patsubst -I%,-idirafter%,$(CPPFLAGS))) diff --git a/arch/sparc/config.mk b/arch/sparc/config.mk index e94e7cbab5..9bb37241d2 100644 --- a/arch/sparc/config.mk +++ b/arch/sparc/config.mk @@ -7,6 +7,7 @@ CROSS_COMPILE ?= sparc-elf- -CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000 -L $(gcclibdir) -T sparc.lds +CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000 -L $(gcclibdir) \ + -T $(srctree)/$(src)/sparc.lds PLATFORM_CPPFLAGS += -DCONFIG_SPARC -D__sparc__ diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index 638f79069c..a35d062792 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -23,5 +23,5 @@ obj-$(CONFIG_CMD_ZBOOT) += zimage.o LIBGCC := $(notdir $(NORMAL_LIBGCC)) extra-y := $(LIBGCC) -$(obj)$(LIBGCC): $(NORMAL_LIBGCC) +$(obj)/$(LIBGCC): $(NORMAL_LIBGCC) $(OBJCOPY) $< $@ --prefix-symbols=__normal_ diff --git a/board/ait/cam_enc_4xx/config.mk b/board/ait/cam_enc_4xx/config.mk index d7e7894831..c7cfacacba 100644 --- a/board/ait/cam_enc_4xx/config.mk +++ b/board/ait/cam_enc_4xx/config.mk @@ -9,7 +9,7 @@ UBL_CONFIG = $(SRCTREE)/board/$(BOARDDIR)/ublimage.cfg ifndef CONFIG_SPL_BUILD -ALL-y += $(obj)u-boot.ubl +ALL-y += u-boot.ubl else # as SPL_TEXT_BASE is not page-aligned, we need for some # linkers the -n flag (Do not page align data), to prevent diff --git a/board/avionic-design/medcom-wide/Makefile b/board/avionic-design/medcom-wide/Makefile index 87e19123b0..bcf7ccfe2a 100644 --- a/board/avionic-design/medcom-wide/Makefile +++ b/board/avionic-design/medcom-wide/Makefile @@ -9,4 +9,4 @@ obj-y := ../common/tamonten.o -include ../../nvidia/common/common.mk +include $(srctree)/board/nvidia/common/common.mk diff --git a/board/avionic-design/plutux/Makefile b/board/avionic-design/plutux/Makefile index 87e19123b0..bcf7ccfe2a 100644 --- a/board/avionic-design/plutux/Makefile +++ b/board/avionic-design/plutux/Makefile @@ -9,4 +9,4 @@ obj-y := ../common/tamonten.o -include ../../nvidia/common/common.mk +include $(srctree)/board/nvidia/common/common.mk diff --git a/board/avionic-design/tec-ng/Makefile b/board/avionic-design/tec-ng/Makefile index 79d8602626..a556b92e8e 100644 --- a/board/avionic-design/tec-ng/Makefile +++ b/board/avionic-design/tec-ng/Makefile @@ -7,4 +7,4 @@ obj-y := ../common/tamonten-ng.o -include ../../nvidia/common/common.mk +include $(srctree)/board/nvidia/common/common.mk diff --git a/board/avionic-design/tec/Makefile b/board/avionic-design/tec/Makefile index 87e19123b0..bcf7ccfe2a 100644 --- a/board/avionic-design/tec/Makefile +++ b/board/avionic-design/tec/Makefile @@ -9,4 +9,4 @@ obj-y := ../common/tamonten.o -include ../../nvidia/common/common.mk +include $(srctree)/board/nvidia/common/common.mk diff --git a/board/compal/paz00/Makefile b/board/compal/paz00/Makefile index b2d3b6b4b2..e6a0b29997 100644 --- a/board/compal/paz00/Makefile +++ b/board/compal/paz00/Makefile @@ -16,4 +16,4 @@ obj-y := paz00.o -include ../../nvidia/common/common.mk +include $(srctree)/board/nvidia/common/common.mk diff --git a/board/compulab/trimslice/Makefile b/board/compulab/trimslice/Makefile index f3bd00dbf1..311eb92d7b 100644 --- a/board/compulab/trimslice/Makefile +++ b/board/compulab/trimslice/Makefile @@ -7,4 +7,4 @@ obj-y := trimslice.o -include ../../nvidia/common/common.mk +include $(srctree)/board/nvidia/common/common.mk diff --git a/board/cray/L1/Makefile b/board/cray/L1/Makefile index 5f6c690b7c..6aae9fa62f 100644 --- a/board/cray/L1/Makefile +++ b/board/cray/L1/Makefile @@ -9,8 +9,8 @@ obj-y = L1.o flash.o obj-y += init.o obj-y += bootscript.o -$(obj)bootscript.c: $(obj)bootscript.image - od -t x1 -v -A x $^ | awk -f x2c.awk > $@ +$(obj)/bootscript.c: $(obj)/bootscript.image + od -t x1 -v -A x $^ | awk -f $(srctree)/$(src)/x2c.awk > $@ -$(obj)bootscript.image: $(src)bootscript.hush $(src)Makefile - -$(OBJTREE)/tools/mkimage -A ppc -O linux -T script -C none -a 0 -e 0 -n bootscript -d $(src)bootscript.hush $@ +$(obj)/bootscript.image: $(src)/bootscript.hush + -$(OBJTREE)/tools/mkimage -A ppc -O linux -T script -C none -a 0 -e 0 -n bootscript -d $< $@ diff --git a/board/h2200/Makefile b/board/h2200/Makefile index d4fa15344c..e516e916b4 100644 --- a/board/h2200/Makefile +++ b/board/h2200/Makefile @@ -10,5 +10,5 @@ obj-y := h2200.o extra-y := h2200-header.bin -$(obj)h2200-header.bin: $(obj)h2200-header.o +$(obj)/h2200-header.bin: $(obj)/h2200-header.o $(OBJCOPY) -O binary $< $@ diff --git a/board/matrix_vision/mvblm7/Makefile b/board/matrix_vision/mvblm7/Makefile index 879d794655..1bc1d61dcf 100644 --- a/board/matrix_vision/mvblm7/Makefile +++ b/board/matrix_vision/mvblm7/Makefile @@ -8,5 +8,5 @@ obj-y := mvblm7.o pci.o fpga.o extra-y := bootscript.img -$(obj)bootscript.img: - @mkimage -T script -C none -n M7_script -d bootscript $@ +$(obj)/bootscript.img: $(src)/bootscript + @mkimage -T script -C none -n M7_script -d $< $@ diff --git a/board/matrix_vision/mvsmr/Makefile b/board/matrix_vision/mvsmr/Makefile index b6a4f6754b..9454259c17 100644 --- a/board/matrix_vision/mvsmr/Makefile +++ b/board/matrix_vision/mvsmr/Makefile @@ -12,5 +12,5 @@ obj-y := mvsmr.o fpga.o extra-y := bootscript.img -$(obj)bootscript.img: bootscript +$(obj)/bootscript.img: $(src)/bootscript @mkimage -T script -C none -n mvSMR_Script -d $< $@ diff --git a/board/nvidia/common/Makefile b/board/nvidia/common/Makefile index e3fcf2bdff..e3b2651570 100644 --- a/board/nvidia/common/Makefile +++ b/board/nvidia/common/Makefile @@ -1,4 +1,4 @@ # Copyright (c) 2011 The Chromium OS Authors. # SPDX-License-Identifier: GPL-2.0+ -include common.mk +include $(src)/common.mk diff --git a/board/pcs440ep/config.mk b/board/pcs440ep/config.mk index 1e761284e4..b90d5d0ec1 100644 --- a/board/pcs440ep/config.mk +++ b/board/pcs440ep/config.mk @@ -10,7 +10,7 @@ # # Check the U-Boot Image with a SHA1 checksum -ALL-y += $(obj)u-boot.sha1 +ALL-y += u-boot.sha1 PLATFORM_CPPFLAGS += -DCONFIG_440=1 diff --git a/board/samsung/origen/Makefile b/board/samsung/origen/Makefile index 31e88f4424..37acba71e0 100644 --- a/board/samsung/origen/Makefile +++ b/board/samsung/origen/Makefile @@ -13,7 +13,7 @@ always := $(hostprogs-y) # # TODO: # Fix the root cause in tools/mkorigenspl.c and delete the following work-around -$(obj)tools/mkorigenspl: HOSTCFLAGS:=$(filter-out -O2,$(HOSTCFLAGS)) +$(obj)/tools/mkorigenspl: HOSTCFLAGS:=$(filter-out -O2,$(HOSTCFLAGS)) else obj-y += origen.o endif diff --git a/common/Makefile b/common/Makefile index 2fe14ccc41..2d75843628 100644 --- a/common/Makefile +++ b/common/Makefile @@ -238,11 +238,10 @@ obj-$(CONFIG_FIT_SIGNATURE) += image-sig.o obj-y += memsize.o obj-y += stdio.o -$(obj)env_embedded.o: $(src)env_embedded.c +$(obj)/env_embedded.o: $(src)/env_embedded.c $(CC) $(AFLAGS) -Wa,--no-warn \ - -DENV_CRC=$(shell $(obj)../tools/envcrc) \ - -c -o $@ $(src)env_embedded.c + -DENV_CRC=$(shell tools/envcrc) -c -o $@ $< # SEE README.arm-unaligned-accesses -$(obj)hush.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) -$(obj)fdt_support.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) +$(obj)/hush.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) +$(obj)/fdt_support.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) diff --git a/config.mk b/config.mk index ed1a51972f..0fa316743c 100644 --- a/config.mk +++ b/config.mk @@ -6,42 +6,6 @@ # ######################################################################### -ifeq ($(CURDIR),$(SRCTREE)) -dir := -else -dir := $(subst $(SRCTREE)/,,$(CURDIR)) -endif - -ifneq ($(OBJTREE),$(SRCTREE)) -# Create object files for SPL in a separate directory -ifeq ($(CONFIG_SPL_BUILD),y) -ifeq ($(CONFIG_TPL_BUILD),y) -obj := $(if $(dir),$(TPLTREE)/$(dir)/,$(TPLTREE)/) -else -obj := $(if $(dir),$(SPLTREE)/$(dir)/,$(SPLTREE)/) -endif -else -obj := $(if $(dir),$(OBJTREE)/$(dir)/,$(OBJTREE)/) -endif -src := $(if $(dir),$(SRCTREE)/$(dir)/,$(SRCTREE)/) - -$(shell mkdir -p $(obj)) -else -# Create object files for SPL in a separate directory -ifeq ($(CONFIG_SPL_BUILD),y) -ifeq ($(CONFIG_TPL_BUILD),y) -obj := $(if $(dir),$(TPLTREE)/$(dir)/,$(TPLTREE)/) -else -obj := $(if $(dir),$(SPLTREE)/$(dir)/,$(SPLTREE)/) - -endif -$(shell mkdir -p $(obj)) -else -obj := -endif -src := -endif - # clean the slate ... PLATFORM_RELFLAGS = PLATFORM_CPPFLAGS = @@ -52,14 +16,14 @@ PLATFORM_LDFLAGS = # Load generated board configuration ifeq ($(CONFIG_TPL_BUILD),y) # Include TPL autoconf -sinclude $(OBJTREE)/include/tpl-autoconf.mk +sinclude include/tpl-autoconf.mk else ifeq ($(CONFIG_SPL_BUILD),y) # Include SPL autoconf -sinclude $(OBJTREE)/include/spl-autoconf.mk +sinclude include/spl-autoconf.mk else # Include normal autoconf -sinclude $(OBJTREE)/include/autoconf.mk +sinclude include/autoconf.mk endif endif sinclude $(OBJTREE)/include/config.mk diff --git a/doc/DocBook/Makefile b/doc/DocBook/Makefile index 29b79d7cd1..aa7c44b127 100644 --- a/doc/DocBook/Makefile +++ b/doc/DocBook/Makefile @@ -6,8 +6,6 @@ # To add a new book the only step required is to add the book to the # list of DOCBOOKS. -include $(TOPDIR)/config.mk - DOCBOOKS := fs.xml linker_lists.xml stdio.xml ### @@ -122,7 +120,7 @@ quiet_cmd_db2pdf = PDF $@ index = index.html -main_idx = $(index) +main_idx = doc/DocBook/$(index) build_main_index = rm -rf $(main_idx); \ echo '

U-Boot Bootloader HTML Documentation

' >> $(main_idx) && \ echo '

U-Boot Version: $(U_BOOT_VERSION)

' >> $(main_idx) && \ @@ -151,7 +149,7 @@ quiet_cmd_db2man = MAN $@ @(which xmlto > /dev/null 2>&1) || \ (echo "*** You need to install xmlto ***"; \ exit 1) - $(Q)mkdir -p $(obj)man + $(Q)mkdir -p $(obj)/man $(call cmd_db2man) @touch $@ diff --git a/drivers/bios_emulator/Makefile b/drivers/bios_emulator/Makefile index 52a2ceb475..330f36f3bd 100644 --- a/drivers/bios_emulator/Makefile +++ b/drivers/bios_emulator/Makefile @@ -8,7 +8,7 @@ obj-y = atibios.o biosemu.o besys.o bios.o \ $(X86DIR)/sys.o \ $(X86DIR)/debug.o -EXTRA_CFLAGS += -I. -I./include \ +EXTRA_CFLAGS += -I$(srctree)/$(src) -I$(srctree)/$(src)/include \ -D__PPC__ -D__BIG_ENDIAN__ CFLAGS += $(EXTRA_CFLAGS) diff --git a/dts/Makefile b/dts/Makefile index 6c7198f65f..d81f32d914 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -26,7 +26,7 @@ DTC_FLAGS := -R 4 -p 0x1000 \ # Use a constant name for this so we can access it from C code. # objcopy doesn't seem to allow us to set the symbol name independently of # the filename. -DT_BIN := $(obj)dt.dtb +DT_BIN := $(obj)/dt.dtb $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts $(CPP) $(DTS_CPPFLAGS) $< -o $(DT_BIN).dts.tmp @@ -38,7 +38,7 @@ process_lds = \ # Run the compiler and get the link script from the linker GET_LDS = $(CC) $(CFLAGS) $(LDFLAGS) -Wl,--verbose 2>&1 -$(obj)dt.o: $(DT_BIN) +$(obj)/dt.o: $(DT_BIN) # We want the output format and arch. # We also hope to win a prize for ugliest Makefile / shell interaction # We look in the LDSCRIPT first. @@ -62,7 +62,7 @@ $(obj)dt.o: $(DT_BIN) \ cd $(dir ${DT_BIN}) && \ $(OBJCOPY) -I binary -O $${oformat} -B $${oarch} \ - $(notdir ${DT_BIN}) $@ + $(notdir ${DT_BIN}) $(notdir $@) rm $(DT_BIN) obj-$(CONFIG_OF_EMBED) := dt.o diff --git a/examples/api/Makefile b/examples/api/Makefile index ee3c487c13..db0bb34afe 100644 --- a/examples/api/Makefile +++ b/examples/api/Makefile @@ -40,23 +40,23 @@ SRCS += $(addprefix $(SRCTREE)/examples/api/,$(COBJ_FILES-y:.o=.c)) SRCS += $(addprefix $(SRCTREE)/examples/api/,$(SOBJ_FILES-y:.o=.S)) # Create a list of object files to be compiled -OBJS += $(addprefix $(obj),$(SOBJ_FILES-y)) -OBJS += $(addprefix $(obj),$(COBJ_FILES-y)) -OBJS += $(addprefix $(obj),$(notdir $(EXT_COBJ_FILES-y))) -OBJS += $(addprefix $(obj),$(notdir $(EXT_SOBJ_FILES-y))) +OBJS += $(addprefix $(obj)/,$(SOBJ_FILES-y)) +OBJS += $(addprefix $(obj)/,$(COBJ_FILES-y)) +OBJS += $(addprefix $(obj)/,$(notdir $(EXT_COBJ_FILES-y))) +OBJS += $(addprefix $(obj)/,$(notdir $(EXT_SOBJ_FILES-y))) ######################################################################### -$(obj)demo: $(OBJS) +$(obj)/demo: $(OBJS) $(LD) --gc-sections -Ttext $(LOAD_ADDR) -o $@ $^ $(PLATFORM_LIBS) -$(obj)demo.bin: $(obj)demo +$(obj)/demo.bin: $(obj)/demo $(OBJCOPY) -O binary $< $@ 2>/dev/null # Rule to build generic library C files -$(addprefix $(obj),$(notdir $(EXT_COBJ_FILES-y))): $(obj)%.o: $(SRCTREE)/lib/%.c +$(addprefix $(obj)/,$(notdir $(EXT_COBJ_FILES-y))): $(obj)/%.o: $(SRCTREE)/lib/%.c $(CC) -g $(CFLAGS) -c -o $@ $< # Rule to build architecture-specific library assembly files -$(addprefix $(obj),$(notdir $(EXT_SOBJ_FILES-y))): $(obj)%.o: $(SRCTREE)/arch/$(ARCH)/lib/%.S +$(addprefix $(obj)/,$(notdir $(EXT_SOBJ_FILES-y))): $(obj)/%.o: $(SRCTREE)/arch/$(ARCH)/lib/%.S $(CC) -g $(CFLAGS) -c -o $@ $< diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile index 1f8d70ce8a..a6819f7792 100644 --- a/examples/standalone/Makefile +++ b/examples/standalone/Makefile @@ -31,7 +31,7 @@ clean-files := $(extra-) $(addsuffix .srec,$(extra-)) $(addsuffix .bin,$(extra- COBJS := $(ELF:=.o) -LIB = $(obj)libstubs.o +LIB = $(obj)/libstubs.o LIBAOBJS-$(CONFIG_PPC) += ppc_longjmp.o ppc_setjmp.o LIBAOBJS-$(CONFIG_8xx) += test_burst_lib.o @@ -39,11 +39,11 @@ LIBAOBJS := $(LIBAOBJS-y) LIBCOBJS = stubs.o -LIBOBJS = $(addprefix $(obj),$(LIBAOBJS) $(LIBCOBJS)) +LIBOBJS = $(addprefix $(obj)/,$(LIBAOBJS) $(LIBCOBJS)) SRCS := $(COBJS:.o=.c) $(LIBCOBJS:.o=.c) $(LIBAOBJS:.o=.S) -OBJS := $(addprefix $(obj),$(COBJS)) -ELF := $(addprefix $(obj),$(ELF)) +OBJS := $(addprefix $(obj)/,$(COBJS)) +ELF := $(addprefix $(obj)/,$(ELF)) gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`) @@ -67,13 +67,13 @@ $(LIB): $(LIBOBJS) $(call cmd_link_o_target, $(LIBOBJS)) $(ELF): -$(obj)%: $(obj)%.o $(LIB) +$(obj)/%: $(obj)/%.o $(LIB) $(LD) $(LDFLAGS) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \ -o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \ -L$(gcclibdir) -lgcc -$(obj)%.srec: $(obj)% +$(obj)/%.srec: $(obj)/% $(OBJCOPY) -O srec $< $@ 2>/dev/null -$(obj)%.bin: $(obj)% +$(obj)/%.bin: $(obj)/% $(OBJCOPY) -O binary $< $@ 2>/dev/null diff --git a/fs/ubifs/Makefile b/fs/ubifs/Makefile index 389b0e37e7..5682b16916 100644 --- a/fs/ubifs/Makefile +++ b/fs/ubifs/Makefile @@ -15,4 +15,4 @@ obj-y += tnc.o tnc_misc.o debug.o crc16.o budget.o obj-y += log.o orphan.o recovery.o replay.o # SEE README.arm-unaligned-accesses -$(obj)super.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) +$(obj)/super.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) diff --git a/lib/Makefile b/lib/Makefile index 760340fbde..43b13d09e2 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -67,4 +67,4 @@ obj-$(CONFIG_BOOTP_RANDOM_DELAY) += rand.o obj-$(CONFIG_CMD_LINK_LOCAL) += rand.o # SEE README.arm-unaligned-accesses -$(obj)bzlib.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) +$(obj)/bzlib.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) diff --git a/mkconfig b/mkconfig index b96c81fbc2..5f516f214a 100755 --- a/mkconfig +++ b/mkconfig @@ -23,7 +23,7 @@ options="" if [ \( $# -eq 2 \) -a \( "$1" = "-A" \) ] ; then # Automatic mode - line=`awk '($0 !~ /^#/ && $7 ~ /^'"$2"'$/) { print $1, $2, $3, $4, $5, $6, $7, $8 }' boards.cfg` + line=`awk '($0 !~ /^#/ && $7 ~ /^'"$2"'$/) { print $1, $2, $3, $4, $5, $6, $7, $8 }' $srctree/boards.cfg` if [ -z "$line" ] ; then echo "make: *** No rule to make target \`$2_config'. Stop." >&2 exit 1 diff --git a/nand_spl/board/amcc/acadia/Makefile b/nand_spl/board/amcc/acadia/Makefile index 3b00d496ea..041213f334 100644 --- a/nand_spl/board/amcc/acadia/Makefile +++ b/nand_spl/board/amcc/acadia/Makefile @@ -18,8 +18,8 @@ CFLAGS += -DCONFIG_NAND_SPL SOBJS = start.o resetvec.o cache.o COBJS = gpio.o nand_boot.o nand_ecc.o memory.o ndfc.o pll.o -SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) +OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) @@ -47,49 +47,41 @@ $(nandobj)u-boot.lds: $(LDSCRIPT) # create symbolic links for common files # from cpu directory -$(obj)cache.S: +$(obj)/cache.S: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/cache.S $@ -$(obj)gpio.c: +$(obj)/gpio.c: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/gpio.c $@ -$(obj)ndfc.c: +$(obj)/ndfc.c: @rm -f $@ ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@ -$(obj)resetvec.S: +$(obj)/resetvec.S: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@ -$(obj)start.S: +$(obj)/start.S: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@ # from board directory -$(obj)memory.c: +$(obj)/memory.c: @rm -f $@ ln -s $(SRCTREE)/board/amcc/acadia/memory.c $@ -$(obj)pll.c: +$(obj)/pll.c: @rm -f $@ ln -s $(SRCTREE)/board/amcc/acadia/pll.c $@ # from nand_spl directory -$(obj)nand_boot.c: +$(obj)/nand_boot.c: @rm -f $@ ln -s $(SRCTREE)/nand_spl/nand_boot.c $@ # from drivers/mtd/nand directory -$(obj)nand_ecc.c: +$(obj)/nand_ecc.c: @rm -f $@ ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@ - -######################################################################### - -$(obj)%.o: $(obj)%.S - $(CC) $(AFLAGS) -c -o $@ $< - -$(obj)%.o: $(obj)%.c - $(CC) $(CFLAGS) -c -o $@ $< diff --git a/nand_spl/board/amcc/bamboo/Makefile b/nand_spl/board/amcc/bamboo/Makefile index 4063274de6..92b604e9f5 100644 --- a/nand_spl/board/amcc/bamboo/Makefile +++ b/nand_spl/board/amcc/bamboo/Makefile @@ -18,8 +18,8 @@ CFLAGS += -DCONFIG_NAND_SPL SOBJS = start.o init.o resetvec.o COBJS = nand_boot.o nand_ecc.o ndfc.o sdram.o -SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) +OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) @@ -41,43 +41,29 @@ $(nandobj)u-boot.lds: $(LDSCRIPT) # create symbolic links for common files # from cpu directory -$(obj)ndfc.c: +$(obj)/ndfc.c: @rm -f $@ ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@ -$(obj)resetvec.S: +$(obj)/resetvec.S: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@ -$(obj)start.S: +$(obj)/start.S: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@ # from board directory -$(obj)init.S: +$(obj)/init.S: @rm -f $@ ln -s $(SRCTREE)/board/amcc/bamboo/init.S $@ # from nand_spl directory -$(obj)nand_boot.c: +$(obj)/nand_boot.c: @rm -f $@ ln -s $(SRCTREE)/nand_spl/nand_boot.c $@ # from drivers/mtd/nand directory -$(obj)nand_ecc.c: +$(obj)/nand_ecc.c: @rm -f $@ ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@ - -ifneq ($(OBJTREE), $(SRCTREE)) -$(obj)sdram.c: - @rm -f $@ - ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/sdram.c $@ -endif - -######################################################################### - -$(obj)%.o: $(obj)%.S - $(CC) $(AFLAGS) -c -o $@ $< - -$(obj)%.o: $(obj)%.c - $(CC) $(CFLAGS) -c -o $@ $< diff --git a/nand_spl/board/amcc/canyonlands/Makefile b/nand_spl/board/amcc/canyonlands/Makefile index 13c8b3690d..9a730e95f5 100644 --- a/nand_spl/board/amcc/canyonlands/Makefile +++ b/nand_spl/board/amcc/canyonlands/Makefile @@ -23,8 +23,8 @@ COBJS += nand_boot.o COBJS += nand_ecc.o COBJS += ndfc.o -SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) +OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) @@ -46,43 +46,29 @@ $(nandobj)u-boot.lds: $(LDSCRIPT) # create symbolic links for common files # from cpu directory -$(obj)ndfc.c: +$(obj)/ndfc.c: @rm -f $@ ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@ -$(obj)resetvec.S: +$(obj)/resetvec.S: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@ -$(obj)start.S: +$(obj)/start.S: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@ # from board directory -$(obj)init.S: +$(obj)/init.S: @rm -f $@ ln -s $(SRCTREE)/board/amcc/canyonlands/init.S $@ # from nand_spl directory -$(obj)nand_boot.c: +$(obj)/nand_boot.c: @rm -f $@ ln -s $(SRCTREE)/nand_spl/nand_boot.c $@ # from drivers/mtd/nand directory -$(obj)nand_ecc.c: +$(obj)/nand_ecc.c: @rm -f $@ ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@ - -ifneq ($(OBJTREE), $(SRCTREE)) -$(obj)ddr2_fixed.c: - @rm -f $@ - ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/ddr2_fixed.c $@ -endif - -######################################################################### - -$(obj)%.o: $(obj)%.S - $(CC) $(AFLAGS) -c -o $@ $< - -$(obj)%.o: $(obj)%.c - $(CC) $(CFLAGS) -c -o $@ $< diff --git a/nand_spl/board/amcc/kilauea/Makefile b/nand_spl/board/amcc/kilauea/Makefile index 9d07147d40..1c5498cfa5 100644 --- a/nand_spl/board/amcc/kilauea/Makefile +++ b/nand_spl/board/amcc/kilauea/Makefile @@ -18,8 +18,8 @@ CFLAGS += -DCONFIG_NAND_SPL SOBJS = start.o resetvec.o cache.o COBJS = 44x_spd_ddr2.o nand_boot.o nand_ecc.o ndfc.o -SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) +OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) @@ -41,44 +41,36 @@ $(nandobj)u-boot.lds: $(LDSCRIPT) # create symbolic links for common files # from cpu directory -$(obj)44x_spd_ddr2.c: $(obj)ecc.h +$(obj)/44x_spd_ddr2.c: $(obj)/ecc.h @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c $@ -$(obj)cache.S: +$(obj)/cache.S: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/cache.S $@ -$(obj)ecc.h: +$(obj)/ecc.h: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/ecc.h $@ -$(obj)ndfc.c: +$(obj)/ndfc.c: @rm -f $@ ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@ -$(obj)resetvec.S: +$(obj)/resetvec.S: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@ -$(obj)start.S: +$(obj)/start.S: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@ # from nand_spl directory -$(obj)nand_boot.c: +$(obj)/nand_boot.c: @rm -f $@ ln -s $(SRCTREE)/nand_spl/nand_boot.c $@ # from drivers/nand directory -$(obj)nand_ecc.c: +$(obj)/nand_ecc.c: @rm -f $@ ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@ - -######################################################################### - -$(obj)%.o: $(obj)%.S - $(CC) $(AFLAGS) -c -o $@ $< - -$(obj)%.o: $(obj)%.c - $(CC) $(CFLAGS) -c -o $@ $< diff --git a/nand_spl/board/amcc/sequoia/Makefile b/nand_spl/board/amcc/sequoia/Makefile index 111bb0d3aa..62131ab399 100644 --- a/nand_spl/board/amcc/sequoia/Makefile +++ b/nand_spl/board/amcc/sequoia/Makefile @@ -18,8 +18,8 @@ CFLAGS += -DCONFIG_NAND_SPL SOBJS = start.o init.o resetvec.o COBJS = denali_data_eye.o nand_boot.o nand_ecc.o ndfc.o sdram.o -SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) +OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) @@ -41,47 +41,39 @@ $(nandobj)u-boot.lds: $(LDSCRIPT) # create symbolic links for common files # from cpu directory -$(obj)denali_data_eye.c: +$(obj)/denali_data_eye.c: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/denali_data_eye.c $@ -$(obj)ndfc.c: +$(obj)/ndfc.c: @rm -f $@ ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@ -$(obj)resetvec.S: +$(obj)/resetvec.S: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@ -$(obj)start.S: +$(obj)/start.S: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@ # from board directory -$(obj)init.S: +$(obj)/init.S: @rm -f $@ ln -s $(SRCTREE)/board/amcc/sequoia/init.S $@ -$(obj)sdram.c: +$(obj)/sdram.c: @rm -f $@ - @rm -f $(obj)sdram.h + @rm -f $(obj)/sdram.h ln -s $(SRCTREE)/board/amcc/sequoia/sdram.c $@ - ln -s $(SRCTREE)/board/amcc/sequoia/sdram.h $(obj)sdram.h + ln -s $(SRCTREE)/board/amcc/sequoia/sdram.h $(obj)/sdram.h # from nand_spl directory -$(obj)nand_boot.c: +$(obj)/nand_boot.c: @rm -f $@ ln -s $(SRCTREE)/nand_spl/nand_boot.c $@ # from drivers/mtd/nand directory -$(obj)nand_ecc.c: +$(obj)/nand_ecc.c: @rm -f $@ ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@ - -######################################################################### - -$(obj)%.o: $(obj)%.S - $(CC) $(AFLAGS) -c -o $@ $< - -$(obj)%.o: $(obj)%.c - $(CC) $(CFLAGS) -c -o $@ $< diff --git a/nand_spl/board/freescale/mpc8315erdb/Makefile b/nand_spl/board/freescale/mpc8315erdb/Makefile index 7813823783..a2054ee1ab 100644 --- a/nand_spl/board/freescale/mpc8315erdb/Makefile +++ b/nand_spl/board/freescale/mpc8315erdb/Makefile @@ -20,8 +20,8 @@ SOBJS = start.o ticks.o COBJS = nand_boot_fsl_elbc.o $(BOARD).o sdram.o ns16550.o spl_minimal.o \ time.o cache.o -SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) +OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) @@ -42,37 +42,29 @@ $(nandobj)u-boot.lds: $(LDSCRIPT) # create symbolic links for common files -$(obj)start.S: +$(obj)/start.S: ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc83xx/start.S $@ -$(obj)nand_boot_fsl_elbc.c: +$(obj)/nand_boot_fsl_elbc.c: ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ -$(obj)sdram.c: +$(obj)/sdram.c: ln -sf $(SRCTREE)/board/$(BOARDDIR)/sdram.c $@ -$(obj)$(BOARD).c: +$(obj)/$(BOARD).c: ln -sf $(SRCTREE)/board/$(BOARDDIR)/$(BOARD).c $@ -$(obj)ns16550.c: +$(obj)/ns16550.c: ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@ -$(obj)spl_minimal.c: +$(obj)/spl_minimal.c: ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc83xx/spl_minimal.c $@ -$(obj)cache.c: +$(obj)/cache.c: ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@ -$(obj)time.c: +$(obj)/time.c: ln -sf $(SRCTREE)/arch/powerpc/lib/time.c $@ -$(obj)ticks.S: +$(obj)/ticks.S: ln -sf $(SRCTREE)/arch/powerpc/lib/ticks.S $@ - -######################################################################### - -$(obj)%.o: $(obj)%.S - $(CC) $(AFLAGS) -c -o $@ $< - -$(obj)%.o: $(obj)%.c - $(CC) $(CFLAGS) -c -o $@ $< diff --git a/nand_spl/board/freescale/mpc8536ds/Makefile b/nand_spl/board/freescale/mpc8536ds/Makefile index 5d9953b6f3..f711cf30ba 100644 --- a/nand_spl/board/freescale/mpc8536ds/Makefile +++ b/nand_spl/board/freescale/mpc8536ds/Makefile @@ -22,8 +22,8 @@ SOBJS = start.o resetvec.o COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o -SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) +OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) @@ -45,64 +45,50 @@ $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) # create symbolic links for common files -$(obj)cache.c: +$(obj)/cache.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@ -$(obj)cpu_init_early.c: +$(obj)/cpu_init_early.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@ -$(obj)spl_minimal.c: +$(obj)/spl_minimal.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@ -$(obj)fsl_law.c: +$(obj)/fsl_law.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@ -$(obj)law.c: +$(obj)/law.c: @rm -f $@ ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@ -$(obj)nand_boot_fsl_elbc.c: +$(obj)/nand_boot_fsl_elbc.c: @rm -f $@ ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ -$(obj)ns16550.c: +$(obj)/ns16550.c: @rm -f $@ ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@ -$(obj)resetvec.S: +$(obj)/resetvec.S: @rm -f $@ ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@ -$(obj)fixed_ivor.S: +$(obj)/fixed_ivor.S: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@ -$(obj)start.S: $(obj)fixed_ivor.S +$(obj)/start.S: $(obj)/fixed_ivor.S @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@ -$(obj)tlb.c: +$(obj)/tlb.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@ -$(obj)tlb_table.c: +$(obj)/tlb_table.c: @rm -f $@ ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@ - -ifneq ($(OBJTREE), $(SRCTREE)) -$(obj)nand_boot.c: - @rm -f $@ - ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $@ -endif - -######################################################################### - -$(obj)%.o: $(obj)%.S - $(CC) $(AFLAGS) -c -o $@ $< - -$(obj)%.o: $(obj)%.c - $(CC) $(CFLAGS) -c -o $@ $< diff --git a/nand_spl/board/freescale/mpc8569mds/Makefile b/nand_spl/board/freescale/mpc8569mds/Makefile index 5d9953b6f3..f711cf30ba 100644 --- a/nand_spl/board/freescale/mpc8569mds/Makefile +++ b/nand_spl/board/freescale/mpc8569mds/Makefile @@ -22,8 +22,8 @@ SOBJS = start.o resetvec.o COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o -SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) +OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) @@ -45,64 +45,50 @@ $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) # create symbolic links for common files -$(obj)cache.c: +$(obj)/cache.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@ -$(obj)cpu_init_early.c: +$(obj)/cpu_init_early.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@ -$(obj)spl_minimal.c: +$(obj)/spl_minimal.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@ -$(obj)fsl_law.c: +$(obj)/fsl_law.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@ -$(obj)law.c: +$(obj)/law.c: @rm -f $@ ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@ -$(obj)nand_boot_fsl_elbc.c: +$(obj)/nand_boot_fsl_elbc.c: @rm -f $@ ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ -$(obj)ns16550.c: +$(obj)/ns16550.c: @rm -f $@ ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@ -$(obj)resetvec.S: +$(obj)/resetvec.S: @rm -f $@ ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@ -$(obj)fixed_ivor.S: +$(obj)/fixed_ivor.S: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@ -$(obj)start.S: $(obj)fixed_ivor.S +$(obj)/start.S: $(obj)/fixed_ivor.S @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@ -$(obj)tlb.c: +$(obj)/tlb.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@ -$(obj)tlb_table.c: +$(obj)/tlb_table.c: @rm -f $@ ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@ - -ifneq ($(OBJTREE), $(SRCTREE)) -$(obj)nand_boot.c: - @rm -f $@ - ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $@ -endif - -######################################################################### - -$(obj)%.o: $(obj)%.S - $(CC) $(AFLAGS) -c -o $@ $< - -$(obj)%.o: $(obj)%.c - $(CC) $(CFLAGS) -c -o $@ $< diff --git a/nand_spl/board/freescale/mpc8572ds/Makefile b/nand_spl/board/freescale/mpc8572ds/Makefile index 5d9953b6f3..f711cf30ba 100644 --- a/nand_spl/board/freescale/mpc8572ds/Makefile +++ b/nand_spl/board/freescale/mpc8572ds/Makefile @@ -22,8 +22,8 @@ SOBJS = start.o resetvec.o COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o -SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) +OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) @@ -45,64 +45,50 @@ $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) # create symbolic links for common files -$(obj)cache.c: +$(obj)/cache.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@ -$(obj)cpu_init_early.c: +$(obj)/cpu_init_early.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@ -$(obj)spl_minimal.c: +$(obj)/spl_minimal.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@ -$(obj)fsl_law.c: +$(obj)/fsl_law.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@ -$(obj)law.c: +$(obj)/law.c: @rm -f $@ ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@ -$(obj)nand_boot_fsl_elbc.c: +$(obj)/nand_boot_fsl_elbc.c: @rm -f $@ ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ -$(obj)ns16550.c: +$(obj)/ns16550.c: @rm -f $@ ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@ -$(obj)resetvec.S: +$(obj)/resetvec.S: @rm -f $@ ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@ -$(obj)fixed_ivor.S: +$(obj)/fixed_ivor.S: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@ -$(obj)start.S: $(obj)fixed_ivor.S +$(obj)/start.S: $(obj)/fixed_ivor.S @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@ -$(obj)tlb.c: +$(obj)/tlb.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@ -$(obj)tlb_table.c: +$(obj)/tlb_table.c: @rm -f $@ ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@ - -ifneq ($(OBJTREE), $(SRCTREE)) -$(obj)nand_boot.c: - @rm -f $@ - ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $@ -endif - -######################################################################### - -$(obj)%.o: $(obj)%.S - $(CC) $(AFLAGS) -c -o $@ $< - -$(obj)%.o: $(obj)%.c - $(CC) $(CFLAGS) -c -o $@ $< diff --git a/nand_spl/board/freescale/p1023rds/Makefile b/nand_spl/board/freescale/p1023rds/Makefile index 652590df8d..21a6920e63 100644 --- a/nand_spl/board/freescale/p1023rds/Makefile +++ b/nand_spl/board/freescale/p1023rds/Makefile @@ -18,8 +18,8 @@ SOBJS = start.o resetvec.o COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o -SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) +OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) @@ -41,64 +41,50 @@ $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) # create symbolic links for common files -$(obj)cache.c: +$(obj)/cache.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@ -$(obj)cpu_init_early.c: +$(obj)/cpu_init_early.c: @rm -f $@ ln -sf $(SRCTREE)/$(CPUDIR)/cpu_init_early.c $@ -$(obj)spl_minimal.c: +$(obj)/spl_minimal.c: @rm -f $@ ln -sf $(SRCTREE)/$(CPUDIR)/spl_minimal.c $@ -$(obj)fsl_law.c: +$(obj)/fsl_law.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@ -$(obj)law.c: +$(obj)/law.c: @rm -f $@ ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@ -$(obj)nand_boot_fsl_elbc.c: +$(obj)/nand_boot_fsl_elbc.c: @rm -f $@ ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ -$(obj)ns16550.c: +$(obj)/ns16550.c: @rm -f $@ ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@ -$(obj)resetvec.S: +$(obj)/resetvec.S: @rm -f $@ ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@ -$(obj)fixed_ivor.S: +$(obj)/fixed_ivor.S: @rm -f $@ ln -sf $(SRCTREE)/$(CPUDIR)/fixed_ivor.S $@ -$(obj)start.S: $(obj)fixed_ivor.S +$(obj)/start.S: $(obj)/fixed_ivor.S @rm -f $@ ln -sf $(SRCTREE)/$(CPUDIR)/start.S $@ -$(obj)tlb.c: +$(obj)/tlb.c: @rm -f $@ ln -sf $(SRCTREE)/$(CPUDIR)/tlb.c $@ -$(obj)tlb_table.c: +$(obj)/tlb_table.c: @rm -f $@ ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@ - -ifneq ($(OBJTREE), $(SRCTREE)) -$(obj)nand_boot.c: - @rm -f $@ - ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $@ -endif - -######################################################################### - -$(obj)%.o: $(obj)%.S - $(CC) $(AFLAGS) -c -o $@ $< - -$(obj)%.o: $(obj)%.c - $(CC) $(CFLAGS) -c -o $@ $< diff --git a/nand_spl/board/freescale/p1_p2_rdb/Makefile b/nand_spl/board/freescale/p1_p2_rdb/Makefile index 5d9953b6f3..f711cf30ba 100644 --- a/nand_spl/board/freescale/p1_p2_rdb/Makefile +++ b/nand_spl/board/freescale/p1_p2_rdb/Makefile @@ -22,8 +22,8 @@ SOBJS = start.o resetvec.o COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o -SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) +OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) @@ -45,64 +45,50 @@ $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) # create symbolic links for common files -$(obj)cache.c: +$(obj)/cache.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@ -$(obj)cpu_init_early.c: +$(obj)/cpu_init_early.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@ -$(obj)spl_minimal.c: +$(obj)/spl_minimal.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@ -$(obj)fsl_law.c: +$(obj)/fsl_law.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@ -$(obj)law.c: +$(obj)/law.c: @rm -f $@ ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@ -$(obj)nand_boot_fsl_elbc.c: +$(obj)/nand_boot_fsl_elbc.c: @rm -f $@ ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ -$(obj)ns16550.c: +$(obj)/ns16550.c: @rm -f $@ ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@ -$(obj)resetvec.S: +$(obj)/resetvec.S: @rm -f $@ ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@ -$(obj)fixed_ivor.S: +$(obj)/fixed_ivor.S: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@ -$(obj)start.S: $(obj)fixed_ivor.S +$(obj)/start.S: $(obj)/fixed_ivor.S @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@ -$(obj)tlb.c: +$(obj)/tlb.c: @rm -f $@ ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@ -$(obj)tlb_table.c: +$(obj)/tlb_table.c: @rm -f $@ ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@ - -ifneq ($(OBJTREE), $(SRCTREE)) -$(obj)nand_boot.c: - @rm -f $@ - ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $@ -endif - -######################################################################### - -$(obj)%.o: $(obj)%.S - $(CC) $(AFLAGS) -c -o $@ $< - -$(obj)%.o: $(obj)%.c - $(CC) $(CFLAGS) -c -o $@ $< diff --git a/nand_spl/board/sheldon/simpc8313/Makefile b/nand_spl/board/sheldon/simpc8313/Makefile index 5e83abcb14..ca45ecd328 100644 --- a/nand_spl/board/sheldon/simpc8313/Makefile +++ b/nand_spl/board/sheldon/simpc8313/Makefile @@ -19,8 +19,8 @@ SOBJS = start.o ticks.o COBJS = nand_boot_fsl_elbc.o $(BOARD).o sdram.o ns16550.o spl_minimal.o \ time.o cache.o -SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) +OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) @@ -41,46 +41,38 @@ $(nandobj)u-boot.lds: $(LDSCRIPT) # create symbolic links for common files -$(obj)start.S: +$(obj)/start.S: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/cpu/mpc83xx/start.S $@ -$(obj)nand_boot_fsl_elbc.c: +$(obj)/nand_boot_fsl_elbc.c: @rm -f $@ ln -s $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ -$(obj)sdram.c: +$(obj)/sdram.c: @rm -f $@ ln -s $(SRCTREE)/board/$(BOARDDIR)/sdram.c $@ -$(obj)$(BOARD).c: +$(obj)/$(BOARD).c: @rm -f $@ ln -s $(SRCTREE)/board/$(BOARDDIR)/$(BOARD).c $@ -$(obj)ns16550.c: +$(obj)/ns16550.c: @rm -f $@ ln -s $(SRCTREE)/drivers/serial/ns16550.c $@ -$(obj)spl_minimal.c: +$(obj)/spl_minimal.c: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/cpu/mpc83xx/spl_minimal.c $@ -$(obj)cache.c: +$(obj)/cache.c: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/lib/cache.c $@ -$(obj)time.c: +$(obj)/time.c: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/lib/time.c $@ -$(obj)ticks.S: +$(obj)/ticks.S: @rm -f $@ ln -s $(SRCTREE)/arch/powerpc/lib/ticks.S $@ - -######################################################################### - -$(obj)%.o: $(obj)%.S - $(CC) $(AFLAGS) -c -o $@ $< - -$(obj)%.o: $(obj)%.c - $(CC) $(CFLAGS) -c -o $@ $< diff --git a/post/lib_powerpc/fpu/Makefile b/post/lib_powerpc/fpu/Makefile index a7aa5bcb7e..c720a26f61 100644 --- a/post/lib_powerpc/fpu/Makefile +++ b/post/lib_powerpc/fpu/Makefile @@ -18,7 +18,7 @@ obj-y += darwin-ldouble.o CFLAGS := $(shell echo $(CFLAGS) | sed s/-msoft-float//) CFLAGS += -mhard-float -fkeep-inline-functions -$(addprefix $(obj),$(obj-y)): $(obj)%.o: %.c +$(addprefix $(obj)/,$(obj-y)): $(obj)/%.o: $(src)/%.c $(CC) $(ALL_CFLAGS) -o $@.fp $< -c $(OBJCOPY) -R .gnu.attributes $@.fp $@ rm -f $@.fp diff --git a/rules.mk b/rules.mk index b36de4daa2..e4fd3371df 100644 --- a/rules.mk +++ b/rules.mk @@ -6,41 +6,42 @@ # ######################################################################### -_depend: $(obj).depend +_depend: $(obj)/.depend # Split the source files into two camps: those in the current directory, and # those somewhere else. For the first camp we want to support CPPFLAGS_ # and for the second we don't / can't. -PWD_SRCS := $(filter $(notdir $(SRCS)),$(SRCS)) -OTHER_SRCS := $(filter-out $(notdir $(SRCS)),$(SRCS)) +PWD_SRCS := $(foreach f,$(SRCS), $(if \ + $(filter $(if $(KBUILD_SRC),$(srctree)/)$(src)/$(notdir $f),$f), $f)) +OTHER_SRCS := $(filter-out $(PWD_SRCS),$(SRCS)) # This is a list of dependency files to generate -DEPS := $(basename $(patsubst %,$(obj).depend.%,$(PWD_SRCS))) +DEPS := $(basename $(addprefix $(obj)/.depend., $(notdir $(PWD_SRCS)))) # Join all the dependencies into a single file, in three parts # 1 .Concatenate all the generated depend files together # 2. Add in the deps from OTHER_SRCS which we couldn't process # 3. Add in the HOSTSRCS -$(obj).depend: $(src)Makefile $(TOPDIR)/config.mk $(DEPS) $(OTHER_SRCS) \ +$(obj)/.depend: $(TOPDIR)/config.mk $(DEPS) $(OTHER_SRCS) \ $(HOSTSRCS) cat /dev/null $(DEPS) >$@ @for f in $(OTHER_SRCS); do \ g=`basename $$f | sed -e 's/\(.*\)\.[[:alnum:]_]/\1.o/'`; \ - $(CC) -M $(CPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \ + $(CC) -M $(CPPFLAGS) -MQ $(obj)/$$g $$f >> $@ ; \ done @for f in $(HOSTSRCS); do \ g=`basename $$f | sed -e 's/\(.*\)\.[[:alnum:]_]/\1.o/'`; \ - $(HOSTCC) -M $(HOSTCPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \ + $(HOSTCC) -M $(HOSTCPPFLAGS) -MQ $(obj)/$$g $$f >> $@ ; \ done MAKE_DEPEND = $(CC) -M $(CPPFLAGS) $(EXTRA_CPPFLAGS_DEP) \ -MQ $(addsuffix .o,$(obj)$(basename $<)) $< >$@ -$(obj).depend.%: %.c +$(obj)/.depend.%: $(src)/%.c $(MAKE_DEPEND) -$(obj).depend.%: %.S +$(obj)/.depend.%: $(src)/%.S $(MAKE_DEPEND) ######################################################################### diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index ca5fd56ca2..6113c13d16 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -165,9 +165,7 @@ ar-option = $(call try-run, $(AR) rc$(1) "$$TMP",$(1),$(2)) # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj= # Usage: # $(Q)$(MAKE) $(build)=dir -#build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj -# temporary -build := -f $(srctree)/scripts/Makefile.build -C +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj ### # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.modbuiltin obj= diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 7789efab82..52a44ff377 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -2,17 +2,28 @@ .PHONY: all all: +ifeq ($(CONFIG_TPL_BUILD),y) + src := $(patsubst tpl/%,%,$(obj)) +else + ifeq ($(CONFIG_SPL_BUILD),y) + src := $(patsubst spl/%,%,$(obj)) + else + src := $(obj) + endif +endif + include $(srctree)/scripts/Kbuild.include -include $(TOPDIR)/config.mk +include $(srctree)/config.mk # variable LIB is used in examples/standalone/Makefile -__LIB := $(obj)built-in.o -LIBGCC = $(obj)libgcc.o +__LIB := $(obj)/built-in.o +LIBGCC = $(obj)/libgcc.o SRCS := subdir-y := obj-dirs := -include Makefile +kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) +include $(kbuild-dir)/Makefile # Do not include host rules unless needed ifneq ($(hostprogs-y)$(hostprogs-m),) @@ -28,31 +39,37 @@ lib-y := $(sort $(lib-y)) subdir-y += $(patsubst %/,%,$(filter %/, $(obj-y))) obj-y := $(patsubst %/, %/built-in.o, $(obj-y)) subdir-obj-y := $(filter %/built-in.o, $(obj-y)) -subdir-obj-y := $(addprefix $(obj),$(subdir-obj-y)) +subdir-obj-y := $(addprefix $(obj)/,$(subdir-obj-y)) + +SRCS += $(obj-y:.o=.c) $(obj-y:.o=.S) $(lib-y:.o=.c) \ + $(lib-y:.o=.S) $(extra-y:.o=.c) $(extra-y:.o=.S) -SRCS += $(wildcard $(obj-y:.o=.c) $(obj-y:.o=.S) $(lib-y:.o=.c) \ - $(lib-y:.o=.S) $(extra-y:.o=.c) $(extra-y:.o=.S)) -OBJS := $(addprefix $(obj),$(obj-y)) +SRCS := $(addprefix $(if $(KBUILD_SRC),$(srctree)/$(src)/,$(src)/),$(SRCS)) +SRCS := $(wildcard $(SRCS)) + +OBJS := $(addprefix $(obj)/,$(obj-y)) # $(obj-dirs) is a list of directories that contain object files obj-dirs += $(dir $(OBJS)) +_dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) + # Create directories for object files if directory does not exist # Needed when obj-y := dir/file.o syntax is used _dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d))) -LGOBJS := $(addprefix $(obj),$(sort $(lib-y))) +LGOBJS := $(addprefix $(obj)/,$(sort $(lib-y))) -all: $(__LIB) $(addprefix $(obj),$(extra-y) $(always)) $(subdir-y) +all: $(__LIB) $(addprefix $(obj)/,$(extra-y) $(always)) $(subdir-y) -$(__LIB): $(obj).depend $(OBJS) +$(__LIB): $(obj)/.depend $(OBJS) $(call cmd_link_o_target, $(OBJS)) ifneq ($(strip $(lib-y)),) all: $(LIBGCC) -$(LIBGCC): $(obj).depend $(LGOBJS) +$(LIBGCC): $(obj)/.depend $(LGOBJS) $(call cmd_link_o_target, $(LGOBJS)) endif @@ -63,7 +80,7 @@ endif ifneq ($(subdir-y),) $(subdir-y): FORCE - $(MAKE) -C $@ -f $(TOPDIR)/scripts/Makefile.build + $(MAKE) $(build)=$(obj)/$@ endif ######################################################################### @@ -78,18 +95,18 @@ ALL_CFLAGS += $(EXTRA_CPPFLAGS) # See rules.mk EXTRA_CPPFLAGS_DEP = $(CPPFLAGS_$(BCURDIR)/$(addsuffix .o,$(basename $<))) \ $(CPPFLAGS_$(BCURDIR)) -$(obj)%.s: %.S +$(obj)/%.s: $(src)/%.S $(CPP) $(ALL_AFLAGS) -o $@ $< -$(obj)%.o: %.S +$(obj)/%.o: $(src)/%.S $(CC) $(ALL_AFLAGS) -o $@ $< -c -$(obj)%.o: %.c +$(obj)/%.o: $(src)/%.c ifneq ($(CHECKSRC),0) $(CHECK) $(CHECKFLAGS) $(ALL_CFLAGS) $< endif $(CC) $(ALL_CFLAGS) -o $@ $< -c -$(obj)%.i: %.c +$(obj)/%.i: $(src)/%.c $(CPP) $(ALL_CFLAGS) -o $@ $< -c -$(obj)%.s: %.c +$(obj)/%.s: $(src)/%.c $(CC) $(ALL_CFLAGS) -o $@ $< -c -S # If the list of objects to link is empty, just create an empty built-in.o @@ -99,11 +116,11 @@ cmd_link_o_target = $(if $(strip $1),\ ######################################################################### -# defines $(obj).depend target +# defines $(obj)/.depend target include $(TOPDIR)/rules.mk -sinclude $(obj).depend +sinclude $(obj)/.depend ######################################################################### diff --git a/scripts/Makefile.host.tmp b/scripts/Makefile.host.tmp index 4b57846f4a..53fe9300be 100644 --- a/scripts/Makefile.host.tmp +++ b/scripts/Makefile.host.tmp @@ -21,11 +21,11 @@ host-objdirs += $(foreach f,$(host-cmulti), \ host-objdirs := $(strip $(sort $(filter-out ./,$(host-objdirs)))) -__hostprogs := $(addprefix $(obj),$(__hostprogs)) -host-csingle := $(addprefix $(obj),$(host-csingle)) -host-cmulti := $(addprefix $(obj),$(host-cmulti)) -host-cobjs := $(addprefix $(obj),$(host-cobjs)) -host-objdirs := $(addprefix $(obj),$(host-objdirs)) +__hostprogs := $(addprefix $(obj)/,$(__hostprogs)) +host-csingle := $(addprefix $(obj)/,$(host-csingle)) +host-cmulti := $(addprefix $(obj)/,$(host-cmulti)) +host-cobjs := $(addprefix $(obj)/,$(host-cobjs)) +host-objdirs := $(addprefix $(obj)/,$(host-objdirs)) obj-dirs += $(host-objdirs) @@ -49,13 +49,13 @@ hostc_flags = $(__hostc_flags) ##### # Compile programs on the host -$(host-csingle): $(obj)%: %.c +$(host-csingle): $(obj)/%: $(src)/%.c $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(HOSTLDFLAGS) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $< -$(host-cmulti): $(obj)%: $(host-cobjs) - $(HOSTCC) $(HOSTLDFLAGS) -o $@ $(addprefix $(obj),$($(@F)-objs)) $(HOSTLOADLIBES_$(@F)) +$(host-cmulti): $(obj)/%: $(host-cobjs) + $(HOSTCC) $(HOSTLDFLAGS) -o $@ $(addprefix $(obj)/,$($(@F)-objs)) $(HOSTLOADLIBES_$(@F)) -$(host-cobjs): $(obj)%.o: %.c +$(host-cobjs): $(obj)/%.o: $(src)/%.c $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $< -c targets += $(host-csingle) $(host-cmulti) $(host-cobjs) diff --git a/spl/Makefile b/spl/Makefile index 8d0e6c3b31..18606ac34c 100644 --- a/spl/Makefile +++ b/spl/Makefile @@ -14,6 +14,11 @@ # Based on top-level Makefile. # +src := $(obj) + +# Create output directory if not already present +_dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) + include $(srctree)/scripts/Kbuild.include CONFIG_SPL_BUILD := y @@ -37,14 +42,6 @@ endif include $(TOPDIR)/config.mk -# We want the final binaries in this directory -ifeq ($(CONFIG_TPL_BUILD),y) -obj := $(OBJTREE)/tpl/ -SPLTREE := $(TPLTREE) -else -obj := $(OBJTREE)/spl/ -endif - HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(SRCTREE)/board/$(VENDOR)/common/Makefile),y,n) ifdef CONFIG_SPL_START_S_PATH @@ -113,11 +110,13 @@ PLATFORM_LIBGCC = $(SPLTREE)/arch/$(ARCH)/lib/libgcc.o PLATFORM_LIBS := $(filter-out %/libgcc.o, $(filter-out -lgcc, $(PLATFORM_LIBS))) $(PLATFORM_LIBGCC) endif -START := $(addprefix $(SPLTREE)/,$(head-y)) -LIBS := $(addprefix $(SPLTREE)/,$(sort $(LIBS-y))) +LIBS-y := $(sort $(LIBS-y)) + +__START := $(head-y) +__LIBS := $(LIBS-y) -__START := $(subst $(obj),,$(START)) -__LIBS := $(subst $(obj),,$(LIBS)) +START := $(addprefix $(obj)/,$(head-y)) +LIBS := $(addprefix $(obj)/,$(LIBS-y)) # Linker Script ifdef CONFIG_SPL_LDSCRIPT @@ -148,21 +147,21 @@ LDPPFLAGS += \ $(shell $(LD) --version | \ sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p') -$(OBJTREE)/MLO: $(obj)u-boot-spl.bin +$(OBJTREE)/MLO: $(obj)/u-boot-spl.bin $(OBJTREE)/tools/mkimage -T omapimage \ -a $(CONFIG_SPL_TEXT_BASE) -d $< $@ -$(OBJTREE)/MLO.byteswap: $(obj)u-boot-spl.bin +$(OBJTREE)/MLO.byteswap: $(obj)/u-boot-spl.bin $(OBJTREE)/tools/mkimage -T omapimage -n byteswap \ -a $(CONFIG_SPL_TEXT_BASE) -d $< $@ -$(OBJTREE)/SPL : $(obj)u-boot-spl.bin depend - $(MAKE) $(build) $(SRCTREE)/arch/arm/imx-common $@ +$(objtree)/SPL : $(obj)/u-boot-spl.bin depend + $(MAKE) $(build)=spl/arch/arm/imx-common $@ -ALL-y += $(obj)$(SPL_BIN).bin +ALL-y += $(obj)/$(SPL_BIN).bin ifdef CONFIG_SAMSUNG -ALL-y += $(obj)$(BOARD)-spl.bin +ALL-y += $(obj)/$(BOARD)-spl.bin endif all: $(ALL-y) @@ -173,16 +172,16 @@ VAR_SIZE_PARAM = --vs else VAR_SIZE_PARAM = endif -$(obj)$(BOARD)-spl.bin: $(obj)u-boot-spl.bin +$(obj)/$(BOARD)-spl.bin: $(obj)/u-boot-spl.bin $(if $(wildcard $(OBJTREE)/spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl),\ $(OBJTREE)/spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl,\ $(OBJTREE)/tools/mkexynosspl) $(VAR_SIZE_PARAM) $< $@ endif -$(obj)$(SPL_BIN).bin: $(obj)$(SPL_BIN) +$(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN) $(OBJCOPY) $(OBJCFLAGS) $(SPL_OBJCFLAGS) -O binary $< $@ -LDFLAGS_$(SPL_BIN) += -T $(obj)u-boot-spl.lds $(LDFLAGS_FINAL) +LDFLAGS_$(SPL_BIN) += -T u-boot-spl.lds $(LDFLAGS_FINAL) ifneq ($(CONFIG_SPL_TEXT_BASE),) LDFLAGS_$(SPL_BIN) += -Ttext $(CONFIG_SPL_TEXT_BASE) endif @@ -192,19 +191,19 @@ GEN_UBOOT = \ --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \ -Map $(SPL_BIN).map -o $(SPL_BIN) -$(obj)$(SPL_BIN): depend $(START) $(LIBS) $(obj)u-boot-spl.lds +$(obj)/$(SPL_BIN): depend $(START) $(LIBS) $(obj)/u-boot-spl.lds $(GEN_UBOOT) $(START): @: $(LIBS): depend - $(MAKE) $(build) $(SRCTREE)$(dir $(subst $(SPLTREE),,$@)) + $(MAKE) $(build)=$(patsubst %/,%,$(dir $@)) -$(obj)u-boot-spl.lds: $(LDSCRIPT) depend +$(obj)/u-boot-spl.lds: $(LDSCRIPT) depend $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj). -ansi -D__ASSEMBLY__ -P - < $< > $@ -depend: $(obj).depend +depend: $(obj)/.depend .PHONY: depend # defines $(obj).depend target diff --git a/tools/Makefile b/tools/Makefile index 21341b7aff..9b19dcb264 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -142,8 +142,8 @@ HOSTCFLAGS_sha1.o := -pedantic always := $(hostprogs-y) # Generated LCD/video logo -LOGO_H = $(OBJTREE)/include/bmp_logo.h -LOGO_DATA_H = $(OBJTREE)/include/bmp_logo_data.h +LOGO_H = $(objtree)/include/bmp_logo.h +LOGO_DATA_H = $(objtree)/include/bmp_logo_data.h LOGO-$(CONFIG_LCD_LOGO) += $(LOGO_H) LOGO-$(CONFIG_LCD_LOGO) += $(LOGO_DATA_H) LOGO-$(CONFIG_VIDEO_LOGO) += $(LOGO_H) @@ -151,14 +151,14 @@ LOGO-$(CONFIG_VIDEO_LOGO) += $(LOGO_DATA_H) # Generic logo ifeq ($(LOGO_BMP),) -LOGO_BMP= logos/denx.bmp +LOGO_BMP= $(srctree)/$(src)/logos/denx.bmp # Use board logo and fallback to vendor ifneq ($(wildcard logos/$(BOARD).bmp),) -LOGO_BMP= logos/$(BOARD).bmp +LOGO_BMP= $(srctree)/$(src)/logos/$(BOARD).bmp else ifneq ($(wildcard logos/$(VENDOR).bmp),) -LOGO_BMP= logos/$(VENDOR).bmp +LOGO_BMP= $(srctree)/$(src)/logos/$(VENDOR).bmp endif endif @@ -187,8 +187,8 @@ all: $(LOGO-y) subdir-y := kernel-doc -$(LOGO_H): $(obj)bmp_logo $(LOGO_BMP) - $(obj)./bmp_logo --gen-info $(LOGO_BMP) > $@ +$(LOGO_H): $(obj)/bmp_logo $(LOGO_BMP) + $(obj)/bmp_logo --gen-info $(LOGO_BMP) > $@ -$(LOGO_DATA_H): $(obj)bmp_logo $(LOGO_BMP) - $(obj)./bmp_logo --gen-data $(LOGO_BMP) > $@ +$(LOGO_DATA_H): $(obj)/bmp_logo $(LOGO_BMP) + $(obj)/bmp_logo --gen-data $(LOGO_BMP) > $@ -- cgit v1.2.3 From 7c8278a866122ef6c1201b94cd602f98cc649a2f Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 4 Feb 2014 17:24:25 +0900 Subject: kbuild: add dummy obj-y to create built-in.o We are going to switch over to Kbuild in upcoming commits. Each makefile must have non-empty obj- or obj-y to generate built-in.o on Kbuild. Signed-off-by: Masahiro Yamada --- arch/arm/cpu/armv7/tegra114/Makefile | 3 ++- arch/arm/cpu/armv7/tegra30/Makefile | 3 ++- arch/nds32/cpu/n1213/Makefile | 3 +++ board/freescale/common/Makefile | 5 ++++- board/samsung/origen/Makefile | 3 +++ board/samsung/smdkv310/Makefile | 3 +++ board/spear/common/Makefile | 5 ++++- board/spear/x600/Makefile | 5 ++++- 8 files changed, 25 insertions(+), 5 deletions(-) (limited to 'board') diff --git a/arch/arm/cpu/armv7/tegra114/Makefile b/arch/arm/cpu/armv7/tegra114/Makefile index 886b5092d6..77e231959b 100644 --- a/arch/arm/cpu/armv7/tegra114/Makefile +++ b/arch/arm/cpu/armv7/tegra114/Makefile @@ -17,4 +17,5 @@ # along with this program. If not, see . # -obj- := +# necessary to create built-in.o +obj- := __dummy__.o diff --git a/arch/arm/cpu/armv7/tegra30/Makefile b/arch/arm/cpu/armv7/tegra30/Makefile index 518d6d1b3e..413eba102a 100644 --- a/arch/arm/cpu/armv7/tegra30/Makefile +++ b/arch/arm/cpu/armv7/tegra30/Makefile @@ -17,4 +17,5 @@ # along with this program. If not, see . # -obj- := +# necessary to create built-in.o +obj- := __dummy__.o diff --git a/arch/nds32/cpu/n1213/Makefile b/arch/nds32/cpu/n1213/Makefile index bb3550eb47..206d304d4c 100644 --- a/arch/nds32/cpu/n1213/Makefile +++ b/arch/nds32/cpu/n1213/Makefile @@ -9,4 +9,7 @@ # SPDX-License-Identifier: GPL-2.0+ # +# necessary to create built-in.o +obj- := __dummy__.o + extra-y = start.o diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile index 25f063d3ad..f6a0879753 100644 --- a/board/freescale/common/Makefile +++ b/board/freescale/common/Makefile @@ -13,7 +13,10 @@ MINIMAL=y endif endif -ifndef MINIMAL +ifdef MINIMAL +# necessary to create built-in.o +obj- := __dummy__.o +else obj-$(CONFIG_FSL_CADMUS) += cadmus.o obj-$(CONFIG_FSL_VIA) += cds_via.o obj-$(CONFIG_FMAN_ENET) += fman.o diff --git a/board/samsung/origen/Makefile b/board/samsung/origen/Makefile index 37acba71e0..1add9fe626 100644 --- a/board/samsung/origen/Makefile +++ b/board/samsung/origen/Makefile @@ -5,6 +5,9 @@ # ifdef CONFIG_SPL_BUILD +# necessary to create built-in.o +obj- := __dummy__.o + hostprogs-y := tools/mkorigenspl always := $(hostprogs-y) diff --git a/board/samsung/smdkv310/Makefile b/board/samsung/smdkv310/Makefile index 9e37b4e780..de0da167be 100644 --- a/board/samsung/smdkv310/Makefile +++ b/board/samsung/smdkv310/Makefile @@ -5,6 +5,9 @@ # ifdef CONFIG_SPL_BUILD +# necessary to create built-in.o +obj- := __dummy__.o + hostprogs-y := tools/mksmdkv310spl always := $(hostprogs-y) else diff --git a/board/spear/common/Makefile b/board/spear/common/Makefile index 08dc09f06d..b0ba320481 100644 --- a/board/spear/common/Makefile +++ b/board/spear/common/Makefile @@ -5,7 +5,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -ifndef CONFIG_SPL_BUILD +ifdef CONFIG_SPL_BUILD +# necessary to create built-in.o +obj- := __dummy__.o +else obj-y := spr_misc.o obj-y += spr_lowlevel_init.o endif diff --git a/board/spear/x600/Makefile b/board/spear/x600/Makefile index f9053feec3..18d3dd2e6f 100644 --- a/board/spear/x600/Makefile +++ b/board/spear/x600/Makefile @@ -5,6 +5,9 @@ # SPDX-License-Identifier: GPL-2.0+ # -ifndef CONFIG_SPL_BUILD +ifdef CONFIG_SPL_BUILD +# necessary to create built-in.o +obj- := __dummy__.o +else obj-y := fpga.o x600.o endif -- cgit v1.2.3 From 6825a95b0ba72c4e5667d02d8b31986e2e9abd5a Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 4 Feb 2014 17:24:28 +0900 Subject: kbuild: use Linux Kernel build scripts Now we are ready to switch over to real Kbuild. This commit disables temporary scripts: scripts/{Makefile.build.tmp, Makefile.host.tmp} and enables real Kbuild scripts: scripts/{Makefile.build,Makefile.host,Makefile.lib}. This switch is triggered by the line in scripts/Kbuild.include -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj We need to adjust some build scripts for U-Boot. But smaller amount of modification is preferable. Additionally, we need to fix compiler flags which are locally added or removed. In Kbuild, it is not allowed to change CFLAGS locally. Instead, ccflags-y, asflags-y, cppflags-y, CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o are prepared for that purpose. Signed-off-by: Masahiro Yamada Tested-by: Gerhard Sittig --- Makefile | 239 +++++++++++++++++++++----- arch/arm/imx-common/Makefile | 2 +- arch/blackfin/cpu/Makefile | 5 +- arch/blackfin/lib/Makefile | 5 +- arch/m68k/cpu/mcf5227x/Makefile | 2 +- arch/m68k/cpu/mcf523x/Makefile | 2 +- arch/m68k/cpu/mcf52x2/Makefile | 2 +- arch/m68k/cpu/mcf532x/Makefile | 2 +- arch/m68k/cpu/mcf5445x/Makefile | 2 +- arch/m68k/cpu/mcf547x_8x/Makefile | 2 +- arch/powerpc/cpu/mpc8xx/Makefile | 2 +- arch/powerpc/lib/Makefile | 4 +- arch/sandbox/cpu/Makefile | 11 +- board/bct-brettl2/config.mk | 7 +- board/bf518f-ezbrd/config.mk | 7 +- board/bf526-ezbrd/config.mk | 7 +- board/bf527-ad7160-eval/config.mk | 7 +- board/bf527-ezkit/config.mk | 7 +- board/bf527-sdp/config.mk | 7 +- board/bf533-ezkit/config.mk | 7 +- board/bf533-stamp/config.mk | 7 +- board/bf537-stamp/config.mk | 7 +- board/bf538f-ezkit/config.mk | 7 +- board/bf548-ezkit/config.mk | 7 +- board/bf561-acvilon/config.mk | 7 +- board/bf561-ezkit/config.mk | 7 +- board/br4/config.mk | 7 +- board/cm-bf527/config.mk | 7 +- board/cm-bf533/config.mk | 7 +- board/cm-bf537e/config.mk | 7 +- board/cm-bf537u/config.mk | 7 +- board/cm-bf548/config.mk | 7 +- board/cm-bf561/config.mk | 7 +- board/ip04/config.mk | 7 +- board/matrix_vision/mvblx/Makefile | 2 +- board/pr1/config.mk | 7 +- board/sandburst/karef/Makefile | 2 +- board/sandburst/metrobox/Makefile | 2 +- board/st-ericsson/snowball/Makefile | 2 +- board/st-ericsson/u8500/Makefile | 2 +- board/tcm-bf518/config.mk | 7 +- board/tcm-bf537/config.mk | 7 +- common/Makefile | 10 +- config.mk | 13 +- disk/Makefile | 2 +- doc/DocBook/Makefile | 67 ++++---- drivers/bios_emulator/Makefile | 5 +- drivers/hwmon/Makefile | 2 +- drivers/net/npe/Makefile | 4 +- drivers/rtc/Makefile | 2 +- drivers/usb/musb-new/Makefile | 7 +- dts/Makefile | 2 +- examples/api/Makefile | 15 +- examples/standalone/Makefile | 22 ++- fs/ubifs/Makefile | 2 +- fs/yaffs2/Makefile | 9 +- lib/Makefile | 2 +- lib/lzma/Makefile | 2 +- nand_spl/board/amcc/acadia/Makefile | 9 +- nand_spl/board/amcc/bamboo/Makefile | 9 +- nand_spl/board/amcc/canyonlands/Makefile | 9 +- nand_spl/board/amcc/kilauea/Makefile | 9 +- nand_spl/board/amcc/sequoia/Makefile | 9 +- nand_spl/board/freescale/mpc8315erdb/Makefile | 9 +- nand_spl/board/freescale/mpc8536ds/Makefile | 9 +- nand_spl/board/freescale/mpc8569mds/Makefile | 9 +- nand_spl/board/freescale/mpc8572ds/Makefile | 9 +- nand_spl/board/freescale/p1023rds/Makefile | 9 +- nand_spl/board/freescale/p1_p2_rdb/Makefile | 9 +- nand_spl/board/sheldon/simpc8313/Makefile | 9 +- net/Makefile | 2 +- post/lib_powerpc/fpu/Makefile | 29 ++-- scripts/Kbuild.include | 2 +- scripts/Makefile.build | 22 ++- scripts/Makefile.lib | 14 +- spl/Makefile | 27 +-- tools/Makefile | 23 +-- 77 files changed, 526 insertions(+), 325 deletions(-) (limited to 'board') diff --git a/Makefile b/Makefile index 1409c8bf39..4f00f08d31 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,78 @@ else XECHO = : endif +# *DOCUMENTATION* +# To see a list of typical targets execute "make help" +# More info can be located in ./README +# Comments in this file are targeted only to the developer, do not +# expect to learn how to build the kernel reading this file. + +# Do not: +# o use make's built-in rules and variables +# (this increases performance and avoids hard-to-debug behaviour); +# o print "Entering directory ..."; +MAKEFLAGS += -rR --no-print-directory + +# Avoid funny character set dependencies +unexport LC_ALL +LC_COLLATE=C +LC_NUMERIC=C +export LC_COLLATE LC_NUMERIC + +# We are using a recursive build, so we need to do a little thinking +# to get the ordering right. +# +# Most importantly: sub-Makefiles should only ever modify files in +# their own directory. If in some directory we have a dependency on +# a file in another dir (which doesn't happen often, but it's often +# unavoidable when linking the built-in.o targets which finally +# turn into vmlinux), we will call a sub make in that other dir, and +# after that we are sure that everything which is in that other dir +# is now up to date. +# +# The only cases where we need to modify files which have global +# effects are thus separated out and done before the recursive +# descending is started. They are now explicitly listed as the +# prepare rule. + +# To put more focus on warnings, be less verbose as default +# Use 'make V=1' to see the full commands + +ifeq ("$(origin V)", "command line") + KBUILD_VERBOSE = $(V) +endif +ifndef KBUILD_VERBOSE + KBUILD_VERBOSE = 0 +endif + +# Call a source code checker (by default, "sparse") as part of the +# C compilation. +# +# Use 'make C=1' to enable checking of only re-compiled files. +# Use 'make C=2' to enable checking of *all* source files, regardless +# of whether they are re-compiled or not. +# +# See the file "Documentation/sparse.txt" for more details, including +# where to get the "sparse" utility. + +ifeq ("$(origin C)", "command line") + KBUILD_CHECKSRC = $(C) +endif +ifndef KBUILD_CHECKSRC + KBUILD_CHECKSRC = 0 +endif + +# Use make M=dir to specify directory of external module to build +# Old syntax make ... SUBDIRS=$PWD is still supported +# Setting the environment variable KBUILD_EXTMOD take precedence +ifdef SUBDIRS + KBUILD_EXTMOD ?= $(SUBDIRS) +endif + +ifeq ("$(origin M)", "command line") + KBUILD_EXTMOD := $(M) +endif + # kbuild supports saving output files in a separate directory. # To locate output files in a separate directory two syntaxes are supported. # In both cases the working directory must be the root of the kernel src. @@ -107,8 +179,14 @@ endif # ifeq ($(KBUILD_SRC),) # We process the rest of the Makefile if this is the final invocation of make ifeq ($(skip-makefile),) +# If building an external module we do not care about the all: rule +# but instead _all depend on modules PHONY += all +ifeq ($(KBUILD_EXTMOD),) _all: all +else +_all: modules +endif srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR)) objtree := $(CURDIR) @@ -119,24 +197,6 @@ VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD)) export srctree objtree VPATH -# Call a source code checker (by default, "sparse") as part of the -# C compilation. -# -# Use 'make C=1' to enable checking of re-compiled files. -# -# See the linux kernel file "Documentation/sparse.txt" for more details, -# including where to get the "sparse" utility. - -ifdef C -ifeq ("$(origin C)", "command line") -CHECKSRC := $(C) -endif -endif -ifndef CHECKSRC - CHECKSRC = 0 -endif -export CHECKSRC - OBJTREE := $(objtree) SPLTREE := $(OBJTREE)/spl TPLTREE := $(OBJTREE)/tpl @@ -222,6 +282,78 @@ HOSTCFLAGS += $(call os_x_before, 10, 4, "-traditional-cpp") HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress") endif +# Decide whether to build built-in, modular, or both. +# Normally, just do built-in. + +KBUILD_MODULES := +KBUILD_BUILTIN := 1 + +# If we have only "make modules", don't compile built-in objects. +# When we're building modules with modversions, we need to consider +# the built-in objects during the descend as well, in order to +# make sure the checksums are up to date before we record them. + +ifeq ($(MAKECMDGOALS),modules) + KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1) +endif + +# If we have "make modules", compile modules +# in addition to whatever we do anyway. +# Just "make" or "make all" shall build modules as well + +# U-Boot does not need modules +#ifneq ($(filter all _all modules,$(MAKECMDGOALS)),) +# KBUILD_MODULES := 1 +#endif + +#ifeq ($(MAKECMDGOALS),) +# KBUILD_MODULES := 1 +#endif + +export KBUILD_MODULES KBUILD_BUILTIN +export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD + +# Beautify output +# --------------------------------------------------------------------------- +# +# Normally, we echo the whole command before executing it. By making +# that echo $($(quiet)$(cmd)), we now have the possibility to set +# $(quiet) to choose other forms of output instead, e.g. +# +# quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@ +# cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< +# +# If $(quiet) is empty, the whole command will be printed. +# If it is set to "quiet_", only the short version will be printed. +# If it is set to "silent_", nothing will be printed at all, since +# the variable $(silent_cmd_cc_o_c) doesn't exist. +# +# A simple variant is to prefix commands with $(Q) - that's useful +# for commands that shall be hidden in non-verbose mode. +# +# $(Q)ln $@ :< +# +# If KBUILD_VERBOSE equals 0 then the above command will be hidden. +# If KBUILD_VERBOSE equals 1 then the above command is displayed. + +ifeq ($(KBUILD_VERBOSE),1) + quiet = + Q = +else + quiet=quiet_ + Q = @ +endif + +# If the user is running make -s (silent mode), suppress echoing of +# commands + +ifneq ($(filter s% -s%,$(MAKEFLAGS)),) + quiet=silent_ +endif + +export quiet Q KBUILD_VERBOSE + + # Look for make include files relative to root of kernel src MAKEFLAGS += --include-dir=$(srctree) @@ -278,6 +410,31 @@ export DTC CHECK CHECKFLAGS export KBUILD_CPPFLAGS NOSTDINC_FLAGS UBOOTINCLUDE export KBUILD_CFLAGS KBUILD_AFLAGS +# When compiling out-of-tree modules, put MODVERDIR in the module +# tree rather than in the kernel tree. The kernel tree might +# even be read-only. +export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_versions + +# Files to ignore in find ... statements + +RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \ + -o -name .pc -o -name .hg -o -name .git \) -prune -o +export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ + --exclude CVS --exclude .pc --exclude .hg --exclude .git + +# =========================================================================== +# Rules shared between *config targets and build targets + +# Basic helpers built in scripts/ +PHONY += scripts_basic +scripts_basic: + $(Q)$(MAKE) $(build)=scripts/basic + $(Q)rm -f .tmp_quiet_recordmcount + +# To avoid any implicit rule to kick in, define an empty command. +scripts/basic/%: scripts_basic ; + + KBUILD_CFLAGS += -Os #-fomit-frame-pointer ifdef BUILD_TAG @@ -333,6 +490,10 @@ endif endif endif +# FIX ME +cpp_flags := $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(UBOOTINCLUDE) $(NOSTDINC_FLAGS) +c_flags := $(KBUILD_CFLAGS) $(cpp_flags) + # If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use # that (or fail if absent). Otherwise, search for a linker script in a # standard location. @@ -446,12 +607,12 @@ LIBS := $(sort $(LIBS-y)) # Add GCC lib ifdef USE_PRIVATE_LIBGCC ifeq ("$(USE_PRIVATE_LIBGCC)", "yes") -PLATFORM_LIBGCC = $(OBJTREE)/arch/$(ARCH)/lib/libgcc.o +PLATFORM_LIBGCC = $(OBJTREE)/arch/$(ARCH)/lib/lib.a else PLATFORM_LIBGCC = -L $(USE_PRIVATE_LIBGCC) -lgcc endif else -PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc +PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(c_flags) -print-libgcc-file-name`) -lgcc endif PLATFORM_LIBS += $(PLATFORM_LIBGCC) export PLATFORM_LIBS @@ -701,7 +862,7 @@ u-boot: depend $(SUBDIR_TOOLS) $(OBJS) $(LIBS) u-boot.lds ifeq ($(CONFIG_KALLSYMS),y) smap=`$(call SYSTEM_MAP,u-boot) | \ awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \ - $(CC) $(CFLAGS) -DSYSTEM_MAP="\"$${smap}\"" \ + $(CC) $(c_flags) -DSYSTEM_MAP="\"$${smap}\"" \ -c $(srctree)/common/system_map.c -o common/system_map.o $(GEN_UBOOT) common/system_map.o endif @@ -709,27 +870,27 @@ endif $(OBJS): @: -$(LIBS): depend $(SUBDIR_TOOLS) - $(MAKE) $(build)=$(patsubst %/,%,$(dir $@)) +$(LIBS): depend $(SUBDIR_TOOLS) scripts_basic + $(Q)$(MAKE) $(build)=$(patsubst %/,%,$(dir $@)) -$(SUBDIRS): depend - $(MAKE) $(build)=$@ all +$(SUBDIRS): depend scripts_basic + $(Q)$(MAKE) $(build)=$@ $(SUBDIR_EXAMPLES-y): u-boot u-boot.lds: $(LDSCRIPT) depend - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$< >$@ + $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$< >$@ -nand_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend +nand_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend scripts_basic $(MAKE) $(build)=nand_spl/board/$(BOARDDIR) all u-boot-nand.bin: nand_spl u-boot.bin cat nand_spl/u-boot-spl-16k.bin u-boot.bin > u-boot-nand.bin -spl/u-boot-spl.bin: $(SUBDIR_TOOLS) depend +spl/u-boot-spl.bin: $(SUBDIR_TOOLS) depend scripts_basic $(MAKE) obj=spl -f $(srctree)/spl/Makefile all -tpl/u-boot-tpl.bin: $(SUBDIR_TOOLS) depend +tpl/u-boot-tpl.bin: $(SUBDIR_TOOLS) depend scripts_basic $(MAKE) obj=tpl -f $(srctree)/spl/Makefile all CONFIG_TPL_BUILD=y # Explicitly make _depend in subdirs containing multiple targets to prevent @@ -804,14 +965,14 @@ checkdtc: include/autoconf.mk.dep: include/config.h include/common.h @$(XECHO) Generating $@ ; \ : Generate the dependancies ; \ - $(CC) -x c -DDO_DEPS_ONLY -M $(CFLAGS) $(CPPFLAGS) \ + $(CC) -x c -DDO_DEPS_ONLY -M $(c_flags) \ -MQ include/autoconf.mk $(srctree)/include/common.h > $@ || \ rm $@ include/autoconf.mk: include/config.h @$(XECHO) Generating $@ ; \ : Extract the config macros ; \ - $(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \ + $(CPP) $(c_flags) -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \ sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \ rm $@.tmp @@ -819,7 +980,7 @@ include/autoconf.mk: include/config.h include/tpl-autoconf.mk: include/config.h @$(XECHO) Generating $@ ; \ : Extract the config macros ; \ - $(CPP) $(CFLAGS) -DCONFIG_TPL_BUILD -DCONFIG_SPL_BUILD\ + $(CPP) $(c_flags) -DCONFIG_TPL_BUILD -DCONFIG_SPL_BUILD\ -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \ sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \ rm $@.tmp @@ -827,7 +988,7 @@ include/tpl-autoconf.mk: include/config.h include/spl-autoconf.mk: include/config.h @$(XECHO) Generating $@ ; \ : Extract the config macros ; \ - $(CPP) $(CFLAGS) -DCONFIG_SPL_BUILD -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \ + $(CPP) $(c_flags) -DCONFIG_SPL_BUILD -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \ sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \ rm $@.tmp @@ -838,7 +999,7 @@ include/generated/generic-asm-offsets.h: lib/asm-offsets.s lib/asm-offsets.s: include/config.h $(srctree)/lib/asm-offsets.c @mkdir -p lib $(CC) -DDO_DEPS_ONLY \ - $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ + $(c_flags) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ -o $@ $(srctree)/lib/asm-offsets.c -c -S include/generated/asm-offsets.h: $(CPUDIR)/$(SOC)/asm-offsets.s @@ -849,7 +1010,7 @@ $(CPUDIR)/$(SOC)/asm-offsets.s: include/config.h @mkdir -p $(CPUDIR)/$(SOC) if [ -f $(srctree)/$(CPUDIR)/$(SOC)/asm-offsets.c ];then \ $(CC) -DDO_DEPS_ONLY \ - $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ + $(c_flags) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ -o $@ $(srctree)/$(CPUDIR)/$(SOC)/asm-offsets.c -c -S; \ else \ touch $@; \ @@ -900,15 +1061,15 @@ $(TIMESTAMP_FILE): @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ easylogo env gdb: - $(MAKE) $(build)=tools/$@ MTD_VERSION=${MTD_VERSION} + $(Q)$(MAKE) $(build)=tools/$@ MTD_VERSION=${MTD_VERSION} gdbtools: gdb xmldocs pdfdocs psdocs htmldocs mandocs: tools/kernel-doc/docproc - $(MAKE) U_BOOT_VERSION=$(U_BOOT_VERSION) $(build)=doc/DocBook $@ + $(Q)$(MAKE) U_BOOT_VERSION=$(U_BOOT_VERSION) $(build)=doc/DocBook $@ tools-all: easylogo env gdb $(VERSION_FILE) $(TIMESTAMP_FILE) - $(MAKE) $(build)=tools HOST_TOOLS_ALL=y + $(Q)$(MAKE) $(build)=tools HOST_TOOLS_ALL=y .PHONY : CHANGELOG CHANGELOG: @@ -968,7 +1129,7 @@ clean: @$(MAKE) -f $(srctree)/doc/DocBook/Makefile cleandocs @find $(OBJTREE) -type f \ \( -name 'core' -o -name '*.bak' -o -name '*~' -o -name '*.su' \ - -o -name '*.o' -o -name '*.a' -o -name '*.exe' \ + -o -name '*.o' -o -name '*.a' -o -name '*.exe' -o -name '*.cmd' \ -o -name '*.cfgtmp' \) -print \ | xargs rm -f diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile index ee5c872f51..9dda59df04 100644 --- a/arch/arm/imx-common/Makefile +++ b/arch/arm/imx-common/Makefile @@ -25,7 +25,7 @@ obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp: $(OBJTREE)/%.cfgtmp : $(SRCTREE)/% mkdir -p $(dir $@) - $(CC) -E -x c $< $(CPPFLAGS) -o $@ + $(CPP) $(cpp_flags) -x c -o $@ $< $(OBJTREE)/u-boot.imx: $(OBJTREE)/u-boot.bin $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp $(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \ diff --git a/arch/blackfin/cpu/Makefile b/arch/blackfin/cpu/Makefile index 369dc74e94..dd4d2d13e0 100644 --- a/arch/blackfin/cpu/Makefile +++ b/arch/blackfin/cpu/Makefile @@ -25,7 +25,7 @@ extra-y += check_initcode # make sure our initcode (which goes into LDR) does not # have relocs or external references -$(obj)/initcode.o: CFLAGS += -fno-function-sections -fno-data-sections +CFLAGS_REMOVE_initcode.o := -ffunction-sections -fdata-sections READINIT = env LC_ALL=C $(CROSS_COMPILE)readelf -s $< $(obj)/check_initcode: $(obj)/initcode.o ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS) @@ -35,7 +35,6 @@ ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS) fi endif -$(obj)/init.lds: $(src)/init.lds.S - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P $^ -o $@ +CPPFLAGS_init.lds := -ansi $(obj)/init.elf: $(obj)/init.lds $(obj)/init.o $(obj)/initcode.o $(LD) $(LDFLAGS) -T $^ -o $@ diff --git a/arch/blackfin/lib/Makefile b/arch/blackfin/lib/Makefile index a5c552f38a..4ba7bf6949 100644 --- a/arch/blackfin/lib/Makefile +++ b/arch/blackfin/lib/Makefile @@ -9,7 +9,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS += -DBFIN_BOARD_NAME='"$(BOARD)"' +# Unnecessary. +# Use CONFIG_SYS_BOARD instead of BFIN_BOARD_NAME +# and delete this. +ccflags-y += -DBFIN_BOARD_NAME='"$(BOARD)"' obj-y += ins.o obj-y += memcmp.o diff --git a/arch/m68k/cpu/mcf5227x/Makefile b/arch/m68k/cpu/mcf5227x/Makefile index a47fd56739..e0c5db60f4 100644 --- a/arch/m68k/cpu/mcf5227x/Makefile +++ b/arch/m68k/cpu/mcf5227x/Makefile @@ -5,7 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -# CFLAGS += -DET_DEBUG +# ccflags-y += -DET_DEBUG extra-y = start.o obj-y = cpu.o speed.o cpu_init.o interrupts.o diff --git a/arch/m68k/cpu/mcf523x/Makefile b/arch/m68k/cpu/mcf523x/Makefile index a47fd56739..e0c5db60f4 100644 --- a/arch/m68k/cpu/mcf523x/Makefile +++ b/arch/m68k/cpu/mcf523x/Makefile @@ -5,7 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -# CFLAGS += -DET_DEBUG +# ccflags-y += -DET_DEBUG extra-y = start.o obj-y = cpu.o speed.o cpu_init.o interrupts.o diff --git a/arch/m68k/cpu/mcf52x2/Makefile b/arch/m68k/cpu/mcf52x2/Makefile index d9bf9008ec..b92fd864c4 100644 --- a/arch/m68k/cpu/mcf52x2/Makefile +++ b/arch/m68k/cpu/mcf52x2/Makefile @@ -5,7 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -# CFLAGS += -DET_DEBUG +# ccflags-y += -DET_DEBUG extra-y = start.o obj-y = interrupts.o cpu.o speed.o cpu_init.o diff --git a/arch/m68k/cpu/mcf532x/Makefile b/arch/m68k/cpu/mcf532x/Makefile index 97aa3f16a9..9c53c50c48 100644 --- a/arch/m68k/cpu/mcf532x/Makefile +++ b/arch/m68k/cpu/mcf532x/Makefile @@ -5,7 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -# CFLAGS += -DET_DEBUG +# ccflags-y += -DET_DEBUG extra-y := start.o obj-y = cpu.o speed.o cpu_init.o interrupts.o diff --git a/arch/m68k/cpu/mcf5445x/Makefile b/arch/m68k/cpu/mcf5445x/Makefile index b506719c8f..9be91ed157 100644 --- a/arch/m68k/cpu/mcf5445x/Makefile +++ b/arch/m68k/cpu/mcf5445x/Makefile @@ -5,7 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -# CFLAGS += -DET_DEBUG +# ccflags-y += -DET_DEBUG extra-y = start.o obj-y = cpu.o speed.o cpu_init.o interrupts.o pci.o diff --git a/arch/m68k/cpu/mcf547x_8x/Makefile b/arch/m68k/cpu/mcf547x_8x/Makefile index 0fa50bfccd..4f82099b6b 100644 --- a/arch/m68k/cpu/mcf547x_8x/Makefile +++ b/arch/m68k/cpu/mcf547x_8x/Makefile @@ -5,7 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -# CFLAGS += -DET_DEBUG +# ccflags-y += -DET_DEBUG extra-y = start.o obj-y = cpu.o speed.o cpu_init.o pci.o interrupts.o slicetimer.o diff --git a/arch/powerpc/cpu/mpc8xx/Makefile b/arch/powerpc/cpu/mpc8xx/Makefile index d40bdab1e1..f83fd5ecf4 100644 --- a/arch/powerpc/cpu/mpc8xx/Makefile +++ b/arch/powerpc/cpu/mpc8xx/Makefile @@ -5,7 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -# CFLAGS += -DET_DEBUG +# ccflags-y += -DET_DEBUG extra-y += start.o extra-y += traps.o diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile index ac780d4077..e6d8be51ca 100644 --- a/arch/powerpc/lib/Makefile +++ b/arch/powerpc/lib/Makefile @@ -54,11 +54,11 @@ ifndef CONFIG_SPL_BUILD # Workaround for local bus unaligned access problems # on MPC512x and MPC5200 ifdef CONFIG_MPC512X -$(obj)/ppcstring.o: AFLAGS += -Dmemcpy=__memcpy +AFLAGS_ppcstring.o += -Dmemcpy=__memcpy obj-y += memcpy_mpc5200.o endif ifdef CONFIG_MPC5200 -$(obj)/ppcstring.o: AFLAGS += -Dmemcpy=__memcpy +AFLAGS_ppcstring.o += -Dmemcpy=__memcpy obj-y += memcpy_mpc5200.o endif endif diff --git a/arch/sandbox/cpu/Makefile b/arch/sandbox/cpu/Makefile index c5f5426b05..63dededf70 100644 --- a/arch/sandbox/cpu/Makefile +++ b/arch/sandbox/cpu/Makefile @@ -10,7 +10,10 @@ obj-y := cpu.o os.o start.o state.o # os.c is build in the system environment, so needs standard includes -$(obj)/os.o: CFLAGS := $(filter-out -nostdinc,\ - $(patsubst -I%,-idirafter%,$(CFLAGS))) -$(obj)/.depend.os: CPPFLAGS := $(filter-out -nostdinc,\ - $(patsubst -I%,-idirafter%,$(CPPFLAGS))) +# CFLAGS_REMOVE_os.o cannot be used to drop header include path +quiet_cmd_cc_os.o = CC $(quiet_modtag) $@ +cmd_cc_os.o = $(CC) $(filter-out -nostdinc, \ + $(patsubst -I%,-idirafter%,$(c_flags))) -c -o $@ $< + +$(obj)/os.o: $(src)/os.c FORCE + $(call if_changed_dep,cc_os.o) diff --git a/board/bct-brettl2/config.mk b/board/bct-brettl2/config.mk index f1ef9bf682..0d3df2dbd9 100644 --- a/board/bct-brettl2/config.mk +++ b/board/bct-brettl2/config.mk @@ -7,6 +7,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif diff --git a/board/bf518f-ezbrd/config.mk b/board/bf518f-ezbrd/config.mk index f1ef9bf682..0d3df2dbd9 100644 --- a/board/bf518f-ezbrd/config.mk +++ b/board/bf518f-ezbrd/config.mk @@ -7,6 +7,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif diff --git a/board/bf526-ezbrd/config.mk b/board/bf526-ezbrd/config.mk index f1ef9bf682..0d3df2dbd9 100644 --- a/board/bf526-ezbrd/config.mk +++ b/board/bf526-ezbrd/config.mk @@ -7,6 +7,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif diff --git a/board/bf527-ad7160-eval/config.mk b/board/bf527-ad7160-eval/config.mk index f1ef9bf682..0d3df2dbd9 100644 --- a/board/bf527-ad7160-eval/config.mk +++ b/board/bf527-ad7160-eval/config.mk @@ -7,6 +7,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif diff --git a/board/bf527-ezkit/config.mk b/board/bf527-ezkit/config.mk index f1ef9bf682..0d3df2dbd9 100644 --- a/board/bf527-ezkit/config.mk +++ b/board/bf527-ezkit/config.mk @@ -7,6 +7,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif diff --git a/board/bf527-sdp/config.mk b/board/bf527-sdp/config.mk index 5f327a990e..af299f5f1e 100644 --- a/board/bf527-sdp/config.mk +++ b/board/bf527-sdp/config.mk @@ -7,9 +7,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 6 diff --git a/board/bf533-ezkit/config.mk b/board/bf533-ezkit/config.mk index 973d357559..97eaafef2e 100644 --- a/board/bf533-ezkit/config.mk +++ b/board/bf533-ezkit/config.mk @@ -7,9 +7,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 diff --git a/board/bf533-stamp/config.mk b/board/bf533-stamp/config.mk index 973d357559..97eaafef2e 100644 --- a/board/bf533-stamp/config.mk +++ b/board/bf533-stamp/config.mk @@ -7,9 +7,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 diff --git a/board/bf537-stamp/config.mk b/board/bf537-stamp/config.mk index ae2ea0b747..bc0e7476e5 100644 --- a/board/bf537-stamp/config.mk +++ b/board/bf537-stamp/config.mk @@ -7,9 +7,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 diff --git a/board/bf538f-ezkit/config.mk b/board/bf538f-ezkit/config.mk index 973d357559..97eaafef2e 100644 --- a/board/bf538f-ezkit/config.mk +++ b/board/bf538f-ezkit/config.mk @@ -7,9 +7,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 diff --git a/board/bf548-ezkit/config.mk b/board/bf548-ezkit/config.mk index ad3a7293df..8d2c60f308 100644 --- a/board/bf548-ezkit/config.mk +++ b/board/bf548-ezkit/config.mk @@ -7,9 +7,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --dma 6 diff --git a/board/bf561-acvilon/config.mk b/board/bf561-acvilon/config.mk index c33aef9d28..ce94715572 100644 --- a/board/bf561-acvilon/config.mk +++ b/board/bf561-acvilon/config.mk @@ -7,9 +7,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 diff --git a/board/bf561-ezkit/config.mk b/board/bf561-ezkit/config.mk index c33aef9d28..ce94715572 100644 --- a/board/bf561-ezkit/config.mk +++ b/board/bf561-ezkit/config.mk @@ -7,9 +7,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 diff --git a/board/br4/config.mk b/board/br4/config.mk index 5c18d5c9e4..2436ec07f4 100644 --- a/board/br4/config.mk +++ b/board/br4/config.mk @@ -9,6 +9,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif diff --git a/board/cm-bf527/config.mk b/board/cm-bf527/config.mk index f1ef9bf682..0d3df2dbd9 100644 --- a/board/cm-bf527/config.mk +++ b/board/cm-bf527/config.mk @@ -7,6 +7,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif diff --git a/board/cm-bf533/config.mk b/board/cm-bf533/config.mk index 973d357559..97eaafef2e 100644 --- a/board/cm-bf533/config.mk +++ b/board/cm-bf533/config.mk @@ -7,9 +7,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 diff --git a/board/cm-bf537e/config.mk b/board/cm-bf537e/config.mk index 973d357559..97eaafef2e 100644 --- a/board/cm-bf537e/config.mk +++ b/board/cm-bf537e/config.mk @@ -7,9 +7,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 diff --git a/board/cm-bf537u/config.mk b/board/cm-bf537u/config.mk index 973d357559..97eaafef2e 100644 --- a/board/cm-bf537u/config.mk +++ b/board/cm-bf537u/config.mk @@ -7,9 +7,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 diff --git a/board/cm-bf548/config.mk b/board/cm-bf548/config.mk index c005afb881..289c8a488e 100644 --- a/board/cm-bf548/config.mk +++ b/board/cm-bf548/config.mk @@ -7,9 +7,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --dma 6 diff --git a/board/cm-bf561/config.mk b/board/cm-bf561/config.mk index c33aef9d28..ce94715572 100644 --- a/board/cm-bf561/config.mk +++ b/board/cm-bf561/config.mk @@ -7,9 +7,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 diff --git a/board/ip04/config.mk b/board/ip04/config.mk index ae2ea0b747..bc0e7476e5 100644 --- a/board/ip04/config.mk +++ b/board/ip04/config.mk @@ -7,9 +7,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 diff --git a/board/matrix_vision/mvblx/Makefile b/board/matrix_vision/mvblx/Makefile index c6c0933956..c056ebaf78 100644 --- a/board/matrix_vision/mvblx/Makefile +++ b/board/matrix_vision/mvblx/Makefile @@ -8,4 +8,4 @@ obj-y += mvblx.o fpga.o obj-$(CONFIG_ID_EEPROM) += sys_eeprom.o -CFLAGS += -Werror +ccflags-y += -Werror diff --git a/board/pr1/config.mk b/board/pr1/config.mk index 5c18d5c9e4..2436ec07f4 100644 --- a/board/pr1/config.mk +++ b/board/pr1/config.mk @@ -9,6 +9,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif diff --git a/board/sandburst/karef/Makefile b/board/sandburst/karef/Makefile index f890008be2..d5a9b34f1d 100644 --- a/board/sandburst/karef/Makefile +++ b/board/sandburst/karef/Makefile @@ -13,7 +13,7 @@ BUILDUSER := $(shell whoami) FORCEBUILD := $(shell rm -f karef.o) -CFLAGS += -DBUILDUSER='"$(BUILDUSER)"' +ccflags-y += -DBUILDUSER='"$(BUILDUSER)"' # TBS: end debugging obj-y = karef.o ../common/flash.o ../common/sb_common.o diff --git a/board/sandburst/metrobox/Makefile b/board/sandburst/metrobox/Makefile index 37d91a51a3..8121cce514 100644 --- a/board/sandburst/metrobox/Makefile +++ b/board/sandburst/metrobox/Makefile @@ -12,7 +12,7 @@ BUILDUSER := $(shell whoami) FORCEBUILD := $(shell rm -f metrobox.o) -CFLAGS += -DBUILDUSER='"$(BUILDUSER)"' +ccflags-y += -DBUILDUSER='"$(BUILDUSER)"' # TBS: end debugging obj-y = metrobox.o ../common/flash.o ../common/sb_common.o diff --git a/board/st-ericsson/snowball/Makefile b/board/st-ericsson/snowball/Makefile index 6867a70b7c..f0605e2bcd 100644 --- a/board/st-ericsson/snowball/Makefile +++ b/board/st-ericsson/snowball/Makefile @@ -4,6 +4,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS += -D__RELEASE -D__STN_8500 +ccflags-y += -D__RELEASE -D__STN_8500 obj-y := snowball.o diff --git a/board/st-ericsson/u8500/Makefile b/board/st-ericsson/u8500/Makefile index b9dfbe9359..d6c4280475 100644 --- a/board/st-ericsson/u8500/Makefile +++ b/board/st-ericsson/u8500/Makefile @@ -4,6 +4,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS += -D__RELEASE -D__STN_8500 +ccflags-y += -D__RELEASE -D__STN_8500 obj-y := u8500_href.o gpio.o diff --git a/board/tcm-bf518/config.mk b/board/tcm-bf518/config.mk index f1ef9bf682..0d3df2dbd9 100644 --- a/board/tcm-bf518/config.mk +++ b/board/tcm-bf518/config.mk @@ -7,6 +7,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif diff --git a/board/tcm-bf537/config.mk b/board/tcm-bf537/config.mk index 973d357559..97eaafef2e 100644 --- a/board/tcm-bf537/config.mk +++ b/board/tcm-bf537/config.mk @@ -7,9 +7,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS_lib += -O2 -CFLAGS_lib/lzma += -O2 -CFLAGS_lib/zlib += -O2 +# FIX ME +ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) +ccflags-y := -O2 +endif # Set some default LDR flags based on boot mode. LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 diff --git a/common/Makefile b/common/Makefile index 2d75843628..3b2ff9bb52 100644 --- a/common/Makefile +++ b/common/Makefile @@ -238,10 +238,6 @@ obj-$(CONFIG_FIT_SIGNATURE) += image-sig.o obj-y += memsize.o obj-y += stdio.o -$(obj)/env_embedded.o: $(src)/env_embedded.c - $(CC) $(AFLAGS) -Wa,--no-warn \ - -DENV_CRC=$(shell tools/envcrc) -c -o $@ $< - -# SEE README.arm-unaligned-accesses -$(obj)/hush.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) -$(obj)/fdt_support.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) +CFLAGS_env_embedded.o := -Wa,--no-warn -DENV_CRC=$(shell tools/envcrc 2>/dev/null) +CFLAGS_hush.o := $(PLATFORM_NO_UNALIGNED) +CFLAGS_fdt_support.o := $(PLATFORM_NO_UNALIGNED) diff --git a/config.mk b/config.mk index 0fa316743c..1336ef871c 100644 --- a/config.mk +++ b/config.mk @@ -58,19 +58,10 @@ RELFLAGS= $(PLATFORM_RELFLAGS) OBJCFLAGS += --gap-fill=0xff -CPPFLAGS = $(KBUILD_CPPFLAGS) $(RELFLAGS) -CPPFLAGS += $(UBOOTINCLUDE) -CPPFLAGS += $(NOSTDINC_FLAGS) -pipe $(PLATFORM_CPPFLAGS) - -CFLAGS := $(KBUILD_CFLAGS) $(CPPFLAGS) +CPPFLAGS = $(RELFLAGS) +CPPFLAGS += -pipe $(PLATFORM_CPPFLAGS) BCURDIR = $(subst $(SRCTREE)/,,$(CURDIR:$(obj)%=%)) -AFLAGS := $(KBUILD_AFLAGS) $(CPPFLAGS) - LDFLAGS += $(PLATFORM_LDFLAGS) LDFLAGS_FINAL += -Bstatic - -######################################################################### - -export PLATFORM_CPPFLAGS PLATFORM_RELFLAGS CPPFLAGS CFLAGS AFLAGS diff --git a/disk/Makefile b/disk/Makefile index 48abec8328..6970cecc71 100644 --- a/disk/Makefile +++ b/disk/Makefile @@ -5,7 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -#CFLAGS += -DET_DEBUG -DDEBUG +#ccflags-y += -DET_DEBUG -DDEBUG obj-$(CONFIG_PARTITIONS) += part.o obj-$(CONFIG_MAC_PARTITION) += part_mac.o diff --git a/doc/DocBook/Makefile b/doc/DocBook/Makefile index aa7c44b127..75e59c2b0d 100644 --- a/doc/DocBook/Makefile +++ b/doc/DocBook/Makefile @@ -24,9 +24,9 @@ PS_METHOD = $(prefer-db2x) ### # The targets that may be used. -PHONY += $(obj).depend xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs +PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs -BOOKS := $(addprefix $(OBJTREE)/doc/DocBook/,$(DOCBOOKS)) +BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) xmldocs: $(BOOKS) sgmldocs: xmldocs @@ -51,10 +51,10 @@ installmandocs: mandocs ### #External programs used -KERNELDOC = $(SRCTREE)/tools/kernel-doc/kernel-doc -DOCPROC = $(OBJTREE)/tools/kernel-doc/docproc +KERNELDOC = $(srctree)/tools/kernel-doc/kernel-doc +DOCPROC = $(objtree)/tools/kernel-doc/docproc -XMLTOFLAGS = -m $(SRCTREE)/doc/DocBook/stylesheet.xsl +XMLTOFLAGS = -m $(srctree)/doc/DocBook/stylesheet.xsl XMLTOFLAGS += --skip-validation ### @@ -64,28 +64,36 @@ XMLTOFLAGS += --skip-validation # appropriate parameters. # The following rules are used to generate the .xml documentation # required to generate the final targets. (ps, pdf, html). -%.xml: %.tmpl - $(DOCPROC) doc $< >$@ - -ifeq ($@, "cleandocs") -sinclude $(obj).depend -$(obj).depend: $(patsubst %.xml, %.tmpl, $(DOCBOOKS)) - rm -f $(obj).depend ; \ - touch $(obj).depend ; \ - for file in $^ ; do \ - xmlfile=`echo "$${file}" | \ - sed "s/tmpl$$/xml/"` ; \ - echo -n "$${xmlfile}: ">> $(obj).depend ; \ - $(DOCPROC) depend $$file >> $(obj).depend ; \ - echo -e "\n\t$(DOCPROC) doc $< >$${xmlfile} " >> \ - $(obj).depend ; \ - done +quiet_cmd_docproc = DOCPROC $@ + cmd_docproc = SRCTREE=$(srctree)/ $(DOCPROC) doc $< >$@ +define rule_docproc + set -e; \ + $(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))';) \ + $(cmd_$(1)); \ + ( \ + echo 'cmd_$@ := $(cmd_$(1))'; \ + echo $@: `SRCTREE=$(srctree) $(DOCPROC) depend $<`; \ + ) > $(dir $@).$(notdir $@).cmd +endef + +%.xml: %.tmpl FORCE + $(call if_changed_rule,docproc) + +### +#Read in all saved dependency files +cmd_files := $(wildcard $(foreach f,$(BOOKS),$(dir $(f)).$(notdir $(f)).cmd)) + +ifneq ($(cmd_files),) + include $(cmd_files) endif ### # Changes in kernel-doc force a rebuild of all documentation $(BOOKS): $(KERNELDOC) +# Tell kbuild to always build the programs +always := $(hostprogs-y) + notfoundtemplate = echo "*** You have to install docbook-utils or xmlto ***"; \ exit 1 db2xtemplate = db2TYPE -o $(dir $@) $< @@ -111,12 +119,12 @@ endif quiet_cmd_db2ps = PS $@ cmd_db2ps = $(subst TYPE,ps, $($(PS_METHOD)template)) %.ps : %.xml - $(call cmd_db2ps) + $(call cmd,db2ps) quiet_cmd_db2pdf = PDF $@ cmd_db2pdf = $(subst TYPE,pdf, $($(PDF_METHOD)template)) %.pdf : %.xml - $(call cmd_db2pdf) + $(call cmd,db2pdf) index = index.html @@ -132,16 +140,16 @@ build_main_index = rm -rf $(main_idx); \ quiet_cmd_db2html = HTML $@ cmd_db2html = xmlto html $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \ echo ' \ - $(patsubst %.html,%,$(notdir $@))

' > $@ + $(patsubst %.html,%,$(notdir $@))

' > $@ %.html: %.xml @(which xmlto > /dev/null 2>&1) || \ (echo "*** You need to install xmlto ***"; \ exit 1) @rm -rf $@ $(patsubst %.html,%,$@) - $(call cmd_db2html) + $(call cmd,db2html) @if [ ! -z "$(PNG-$(basename $(notdir $@)))" ]; then \ - cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi + cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi quiet_cmd_db2man = MAN $@ cmd_db2man = if grep -q refentry $<; then xmlto man $(XMLTOFLAGS) -o $(obj)/man $< ; gzip -f $(obj)/man/*.9; fi @@ -150,7 +158,7 @@ quiet_cmd_db2man = MAN $@ (echo "*** You need to install xmlto ***"; \ exit 1) $(Q)mkdir -p $(obj)/man - $(call cmd_db2man) + $(call cmd,db2man) @touch $@ ### @@ -162,7 +170,7 @@ quiet_cmd_fig2eps = FIG2EPS $@ @(which fig2dev > /dev/null 2>&1) || \ (echo "*** You need to install transfig ***"; \ exit 1) - $(call cmd_fig2eps) + $(call cmd,fig2eps) quiet_cmd_fig2png = FIG2PNG $@ cmd_fig2png = fig2dev -Lpng $< $@ @@ -171,7 +179,7 @@ quiet_cmd_fig2png = FIG2PNG $@ @(which fig2dev > /dev/null 2>&1) || \ (echo "*** You need to install transfig ***"; \ exit 1) - $(call cmd_fig2png) + $(call cmd,fig2png) ### # Rule to convert a .c file to inline XML documentation @@ -217,7 +225,6 @@ clean-files := $(DOCBOOKS) \ clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man cleandocs: - @rm -f $(obj).depend @$(Q)rm -f $(call objectify, $(clean-files)) @$(Q)rm -rf $(call objectify, $(clean-dirs)) diff --git a/drivers/bios_emulator/Makefile b/drivers/bios_emulator/Makefile index 330f36f3bd..e56356ee86 100644 --- a/drivers/bios_emulator/Makefile +++ b/drivers/bios_emulator/Makefile @@ -8,8 +8,5 @@ obj-y = atibios.o biosemu.o besys.o bios.o \ $(X86DIR)/sys.o \ $(X86DIR)/debug.o -EXTRA_CFLAGS += -I$(srctree)/$(src) -I$(srctree)/$(src)/include \ +ccflags-y := -I$(srctree)/$(src) -I$(srctree)/$(src)/include \ -D__PPC__ -D__BIG_ENDIAN__ - -CFLAGS += $(EXTRA_CFLAGS) -CPPFLAGS += $(EXTRA_CFLAGS) diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile index a78a724253..25b8e8a2d7 100644 --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile @@ -8,7 +8,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -#CFLAGS += -DDEBUG +#ccflags-y += -DDEBUG obj-$(CONFIG_DTT_ADM1021) += adm1021.o obj-$(CONFIG_DTT_ADT7460) += adt7460.o diff --git a/drivers/net/npe/Makefile b/drivers/net/npe/Makefile index 0779255216..ff554cf152 100644 --- a/drivers/net/npe/Makefile +++ b/drivers/net/npe/Makefile @@ -5,9 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -LOCAL_CFLAGS += -I$(TOPDIR)/drivers/net/npe/include -DCONFIG_IXP425_COMPONENT_ETHDB -D__linux -CFLAGS += $(LOCAL_CFLAGS) -CPPFLAGS += $(LOCAL_CFLAGS) # needed for depend +ccflags-y += -I$(src)/include -DCONFIG_IXP425_COMPONENT_ETHDB -D__linux obj-y := npe.o \ miiphy.o \ diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index d5a2725c97..003d322d23 100644 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile @@ -5,7 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -#CFLAGS += -DDEBUG +#ccflags-y += -DDEBUG obj-$(CONFIG_RTC_AT91SAM9_RTT) += at91sam9_rtt.o obj-$(CONFIG_RTC_BFIN) += bfin_rtc.o diff --git a/drivers/usb/musb-new/Makefile b/drivers/usb/musb-new/Makefile index ba72348b76..3facf0fc10 100644 --- a/drivers/usb/musb-new/Makefile +++ b/drivers/usb/musb-new/Makefile @@ -9,7 +9,6 @@ obj-$(CONFIG_USB_MUSB_DSPS) += musb_dsps.o obj-$(CONFIG_USB_MUSB_AM35X) += am35x.o obj-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o -CFLAGS_NO_WARN := $(call cc-option,-Wno-unused-variable) \ - $(call cc-option,-Wno-unused-but-set-variable) \ - $(call cc-option,-Wno-unused-label) -CFLAGS += $(CFLAGS_NO_WARN) +ccflags-y := $(call cc-option,-Wno-unused-variable) \ + $(call cc-option,-Wno-unused-but-set-variable) \ + $(call cc-option,-Wno-unused-label) diff --git a/dts/Makefile b/dts/Makefile index d81f32d914..cc6ecf66eb 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -36,7 +36,7 @@ process_lds = \ $(1) | sed -r -n 's/^OUTPUT_$(2)[ ("]*([^")]*).*/\1/p' # Run the compiler and get the link script from the linker -GET_LDS = $(CC) $(CFLAGS) $(LDFLAGS) -Wl,--verbose 2>&1 +GET_LDS = $(CC) $(c_flags) $(ld_flags) -Wl,--verbose 2>&1 $(obj)/dt.o: $(DT_BIN) # We want the output format and arch. diff --git a/examples/api/Makefile b/examples/api/Makefile index db0bb34afe..8b79886074 100644 --- a/examples/api/Makefile +++ b/examples/api/Makefile @@ -5,7 +5,7 @@ # ifdef FTRACE -CFLAGS += -finstrument-functions -DFTRACE +ccflags-y += -finstrument-functions -DFTRACE endif ifeq ($(ARCH),powerpc) @@ -33,12 +33,6 @@ EXT_COBJ_FILES-y += lib/time.o EXT_COBJ_FILES-y += lib/vsprintf.o EXT_SOBJ_FILES-$(CONFIG_PPC) += arch/powerpc/lib/ppcstring.o -# Create a list of source files so their dependencies can be auto-generated -SRCS += $(addprefix $(SRCTREE)/,$(EXT_COBJ_FILES-y:.o=.c)) -SRCS += $(addprefix $(SRCTREE)/,$(EXT_SOBJ_FILES-y:.o=.S)) -SRCS += $(addprefix $(SRCTREE)/examples/api/,$(COBJ_FILES-y:.o=.c)) -SRCS += $(addprefix $(SRCTREE)/examples/api/,$(SOBJ_FILES-y:.o=.S)) - # Create a list of object files to be compiled OBJS += $(addprefix $(obj)/,$(SOBJ_FILES-y)) OBJS += $(addprefix $(obj)/,$(COBJ_FILES-y)) @@ -54,9 +48,10 @@ $(obj)/demo.bin: $(obj)/demo $(OBJCOPY) -O binary $< $@ 2>/dev/null # Rule to build generic library C files -$(addprefix $(obj)/,$(notdir $(EXT_COBJ_FILES-y))): $(obj)/%.o: $(SRCTREE)/lib/%.c - $(CC) -g $(CFLAGS) -c -o $@ $< +$(addprefix $(obj)/,$(notdir $(EXT_COBJ_FILES-y))): $(obj)/%.o: $(SRCTREE)/lib/%.c FORCE + $(call cmd,force_checksrc) + $(call if_changed_rule,cc_o_c) # Rule to build architecture-specific library assembly files $(addprefix $(obj)/,$(notdir $(EXT_SOBJ_FILES-y))): $(obj)/%.o: $(SRCTREE)/arch/$(ARCH)/lib/%.S - $(CC) -g $(CFLAGS) -c -o $@ $< + $(call if_changed_dep,as_o_S) diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile index a6819f7792..90e173b83e 100644 --- a/examples/standalone/Makefile +++ b/examples/standalone/Makefile @@ -6,7 +6,7 @@ # ifdef FTRACE -CFLAGS += -finstrument-functions -DFTRACE +ccflags-y += -finstrument-functions -DFTRACE endif extra-y := hello_world @@ -39,10 +39,11 @@ LIBAOBJS := $(LIBAOBJS-y) LIBCOBJS = stubs.o +.SECONDARY: $(call objectify,$(COBJS)) +targets += $(patsubst $(obj)/%,%,$(LIB)) $(COBJS) $(LIBAOBJS) $(LIBCOBJS) + LIBOBJS = $(addprefix $(obj)/,$(LIBAOBJS) $(LIBCOBJS)) -SRCS := $(COBJS:.o=.c) $(LIBCOBJS:.o=.c) $(LIBAOBJS:.o=.S) -OBJS := $(addprefix $(obj)/,$(COBJS)) ELF := $(addprefix $(obj)/,$(ELF)) gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`) @@ -52,19 +53,22 @@ gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`) # also causes the entry point of the standalone application to be # inconsistent. ifeq ($(ARCH),powerpc) -AFLAGS := $(filter-out $(RELFLAGS),$(AFLAGS)) -CFLAGS := $(filter-out $(RELFLAGS),$(CFLAGS)) -CPPFLAGS := $(filter-out $(RELFLAGS),$(CPPFLAGS)) +# FIX ME +CPPFLAGS := $(filter-out $(RELFLAGS), $(CPPFLAGS)) endif # We don't want gcc reordering functions if possible. This ensures that an # application's entry point will be the first function in the application's # source file. -CFLAGS += $(call cc-option,-fno-toplevel-reorder) +ccflags-y += $(call cc-option,-fno-toplevel-reorder) ######################################################################### -$(LIB): $(LIBOBJS) - $(call cmd_link_o_target, $(LIBOBJS)) + +quiet_cmd_link_lib = LD $@ + cmd_link_lib = $(LD) $(ld_flags) -r -o $@ $(filter $(LIBOBJS), $^) + +$(LIB): $(LIBOBJS) FORCE + $(call if_changed,link_lib) $(ELF): $(obj)/%: $(obj)/%.o $(LIB) diff --git a/fs/ubifs/Makefile b/fs/ubifs/Makefile index 5682b16916..6b1a9a5b00 100644 --- a/fs/ubifs/Makefile +++ b/fs/ubifs/Makefile @@ -15,4 +15,4 @@ obj-y += tnc.o tnc_misc.o debug.o crc16.o budget.o obj-y += log.o orphan.o recovery.o replay.o # SEE README.arm-unaligned-accesses -$(obj)/super.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) +CFLAGS_super.o := $(PLATFORM_NO_UNALIGNED) diff --git a/fs/yaffs2/Makefile b/fs/yaffs2/Makefile index d811287ddb..45ff7458c6 100644 --- a/fs/yaffs2/Makefile +++ b/fs/yaffs2/Makefile @@ -24,9 +24,6 @@ obj-y := \ yaffs_summary.o yaffs_tagscompat.o yaffs_verify.o yaffs_yaffs1.o \ yaffs_yaffs2.o yaffs_mtdif.o yaffs_mtdif2.o -YCFLAGS = -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM -YCFLAGS += -DCONFIG_YAFFS_YAFFS2 -DNO_Y_INLINE -YCFLAGS += -DCONFIG_YAFFS_PROVIDE_DEFS -DCONFIG_YAFFSFS_PROVIDE_VALUES - -CFLAGS += $(YCFLAGS) -CPPFLAGS += $(YCFLAGS) +ccflags-y = -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM \ + -DCONFIG_YAFFS_YAFFS2 -DNO_Y_INLINE \ + -DCONFIG_YAFFS_PROVIDE_DEFS -DCONFIG_YAFFSFS_PROVIDE_VALUES diff --git a/lib/Makefile b/lib/Makefile index 43b13d09e2..8c483c99a3 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -67,4 +67,4 @@ obj-$(CONFIG_BOOTP_RANDOM_DELAY) += rand.o obj-$(CONFIG_CMD_LINK_LOCAL) += rand.o # SEE README.arm-unaligned-accesses -$(obj)/bzlib.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) +CFLAGS_bzlib.o := $(PLATFORM_NO_UNALIGNED) diff --git a/lib/lzma/Makefile b/lib/lzma/Makefile index f8eda06c9f..b6c80671b9 100644 --- a/lib/lzma/Makefile +++ b/lib/lzma/Makefile @@ -8,6 +8,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -CFLAGS += -D_LZMA_PROB32 +ccflags-y += -D_LZMA_PROB32 obj-y += LzmaDec.o LzmaTools.o diff --git a/nand_spl/board/amcc/acadia/Makefile b/nand_spl/board/amcc/acadia/Makefile index 041213f334..d256abf9e1 100644 --- a/nand_spl/board/amcc/acadia/Makefile +++ b/nand_spl/board/amcc/acadia/Makefile @@ -12,17 +12,18 @@ nandobj := $(OBJTREE)/nand_spl/ LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ $(LDFLAGS_FINAL) -AFLAGS += -DCONFIG_NAND_SPL -CFLAGS += -DCONFIG_NAND_SPL +asflags-y += -DCONFIG_NAND_SPL +ccflags-y += -DCONFIG_NAND_SPL SOBJS = start.o resetvec.o cache.o COBJS = gpio.o nand_boot.o nand_ecc.o memory.o ndfc.o pll.o -SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) +targets += $(__OBJS) + all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin \ $(nandobj)System.map @@ -42,7 +43,7 @@ $(nandobj)System.map: $(nandobj)u-boot-spl sort > $@ $(nandobj)u-boot.lds: $(LDSCRIPT) - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ + $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ # create symbolic links for common files diff --git a/nand_spl/board/amcc/bamboo/Makefile b/nand_spl/board/amcc/bamboo/Makefile index 92b604e9f5..4f36d6c882 100644 --- a/nand_spl/board/amcc/bamboo/Makefile +++ b/nand_spl/board/amcc/bamboo/Makefile @@ -12,17 +12,18 @@ nandobj := $(OBJTREE)/nand_spl/ LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ $(LDFLAGS_FINAL) -AFLAGS += -DCONFIG_NAND_SPL -CFLAGS += -DCONFIG_NAND_SPL +asflags-y += -DCONFIG_NAND_SPL +ccflags-y += -DCONFIG_NAND_SPL SOBJS = start.o init.o resetvec.o COBJS = nand_boot.o nand_ecc.o ndfc.o sdram.o -SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) +targets += $(__OBJS) + all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl @@ -36,7 +37,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds -Map $(nandobj)u-boot-spl.map -o $@ $(nandobj)u-boot.lds: $(LDSCRIPT) - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ + $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ # create symbolic links for common files diff --git a/nand_spl/board/amcc/canyonlands/Makefile b/nand_spl/board/amcc/canyonlands/Makefile index 9a730e95f5..5c9c8e83ed 100644 --- a/nand_spl/board/amcc/canyonlands/Makefile +++ b/nand_spl/board/amcc/canyonlands/Makefile @@ -12,8 +12,8 @@ nandobj := $(OBJTREE)/nand_spl/ LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ $(LDFLAGS_FINAL) -AFLAGS += -DCONFIG_NAND_SPL -CFLAGS += -DCONFIG_NAND_SPL +asflags-y += -DCONFIG_NAND_SPL +ccflags-y += -DCONFIG_NAND_SPL SOBJS := start.o SOBJS += init.o @@ -23,11 +23,12 @@ COBJS += nand_boot.o COBJS += nand_ecc.o COBJS += ndfc.o -SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) +targets += $(__OBJS) + all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl @@ -41,7 +42,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds -Map $(nandobj)u-boot-spl.map -o $@ $(nandobj)u-boot.lds: $(LDSCRIPT) - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ + $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ # create symbolic links for common files diff --git a/nand_spl/board/amcc/kilauea/Makefile b/nand_spl/board/amcc/kilauea/Makefile index 1c5498cfa5..cfe308222b 100644 --- a/nand_spl/board/amcc/kilauea/Makefile +++ b/nand_spl/board/amcc/kilauea/Makefile @@ -12,17 +12,18 @@ nandobj := $(OBJTREE)/nand_spl/ LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ $(LDFLAGS_FINAL) -AFLAGS += -DCONFIG_NAND_SPL -CFLAGS += -DCONFIG_NAND_SPL +asflags-y += -DCONFIG_NAND_SPL +ccflags-y += -DCONFIG_NAND_SPL SOBJS = start.o resetvec.o cache.o COBJS = 44x_spd_ddr2.o nand_boot.o nand_ecc.o ndfc.o -SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) +targets += $(__OBJS) + all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl @@ -36,7 +37,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds -Map $(nandobj)u-boot-spl.map -o $@ $(nandobj)u-boot.lds: $(LDSCRIPT) - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ + $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ # create symbolic links for common files diff --git a/nand_spl/board/amcc/sequoia/Makefile b/nand_spl/board/amcc/sequoia/Makefile index 62131ab399..de02886b29 100644 --- a/nand_spl/board/amcc/sequoia/Makefile +++ b/nand_spl/board/amcc/sequoia/Makefile @@ -12,17 +12,18 @@ nandobj := $(OBJTREE)/nand_spl/ LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ $(LDFLAGS_FINAL) -AFLAGS += -DCONFIG_NAND_SPL -CFLAGS += -DCONFIG_NAND_SPL +asflags-y += -DCONFIG_NAND_SPL +ccflags-y += -DCONFIG_NAND_SPL SOBJS = start.o init.o resetvec.o COBJS = denali_data_eye.o nand_boot.o nand_ecc.o ndfc.o sdram.o -SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) +targets += $(__OBJS) + all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl @@ -36,7 +37,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds -Map $(nandobj)u-boot-spl.map -o $@ $(nandobj)u-boot.lds: $(LDSCRIPT) - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ + $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ # create symbolic links for common files diff --git a/nand_spl/board/freescale/mpc8315erdb/Makefile b/nand_spl/board/freescale/mpc8315erdb/Makefile index a2054ee1ab..a68567427e 100644 --- a/nand_spl/board/freescale/mpc8315erdb/Makefile +++ b/nand_spl/board/freescale/mpc8315erdb/Makefile @@ -13,18 +13,19 @@ nandobj := $(OBJTREE)/nand_spl/ LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ $(LDFLAGS) $(LDFLAGS_FINAL) -AFLAGS += -DCONFIG_NAND_SPL -CFLAGS += -DCONFIG_NAND_SPL +asflags-y += -DCONFIG_NAND_SPL +ccflags-y += -DCONFIG_NAND_SPL SOBJS = start.o ticks.o COBJS = nand_boot_fsl_elbc.o $(BOARD).o sdram.o ns16550.o spl_minimal.o \ time.o cache.o -SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) +targets += $(__OBJS) + all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl @@ -38,7 +39,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds -Map $(nandobj)u-boot-spl.map -o $@ $(nandobj)u-boot.lds: $(LDSCRIPT) - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ + $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ # create symbolic links for common files diff --git a/nand_spl/board/freescale/mpc8536ds/Makefile b/nand_spl/board/freescale/mpc8536ds/Makefile index f711cf30ba..f0beaedf1a 100644 --- a/nand_spl/board/freescale/mpc8536ds/Makefile +++ b/nand_spl/board/freescale/mpc8536ds/Makefile @@ -15,18 +15,19 @@ nandobj := $(OBJTREE)/nand_spl/ LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ $(LDFLAGS) $(LDFLAGS_FINAL) -AFLAGS += -DCONFIG_NAND_SPL -CFLAGS += -DCONFIG_NAND_SPL +asflags-y += -DCONFIG_NAND_SPL +ccflags-y += -DCONFIG_NAND_SPL SOBJS = start.o resetvec.o COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o -SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) +targets += $(__OBJS) + all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl @@ -40,7 +41,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds -Map $(nandobj)u-boot-spl.map -o $@ $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ + $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ -ansi -D__ASSEMBLY__ -P - <$< >$@ # create symbolic links for common files diff --git a/nand_spl/board/freescale/mpc8569mds/Makefile b/nand_spl/board/freescale/mpc8569mds/Makefile index f711cf30ba..f0beaedf1a 100644 --- a/nand_spl/board/freescale/mpc8569mds/Makefile +++ b/nand_spl/board/freescale/mpc8569mds/Makefile @@ -15,18 +15,19 @@ nandobj := $(OBJTREE)/nand_spl/ LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ $(LDFLAGS) $(LDFLAGS_FINAL) -AFLAGS += -DCONFIG_NAND_SPL -CFLAGS += -DCONFIG_NAND_SPL +asflags-y += -DCONFIG_NAND_SPL +ccflags-y += -DCONFIG_NAND_SPL SOBJS = start.o resetvec.o COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o -SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) +targets += $(__OBJS) + all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl @@ -40,7 +41,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds -Map $(nandobj)u-boot-spl.map -o $@ $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ + $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ -ansi -D__ASSEMBLY__ -P - <$< >$@ # create symbolic links for common files diff --git a/nand_spl/board/freescale/mpc8572ds/Makefile b/nand_spl/board/freescale/mpc8572ds/Makefile index f711cf30ba..f0beaedf1a 100644 --- a/nand_spl/board/freescale/mpc8572ds/Makefile +++ b/nand_spl/board/freescale/mpc8572ds/Makefile @@ -15,18 +15,19 @@ nandobj := $(OBJTREE)/nand_spl/ LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ $(LDFLAGS) $(LDFLAGS_FINAL) -AFLAGS += -DCONFIG_NAND_SPL -CFLAGS += -DCONFIG_NAND_SPL +asflags-y += -DCONFIG_NAND_SPL +ccflags-y += -DCONFIG_NAND_SPL SOBJS = start.o resetvec.o COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o -SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) +targets += $(__OBJS) + all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl @@ -40,7 +41,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds -Map $(nandobj)u-boot-spl.map -o $@ $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ + $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ -ansi -D__ASSEMBLY__ -P - <$< >$@ # create symbolic links for common files diff --git a/nand_spl/board/freescale/p1023rds/Makefile b/nand_spl/board/freescale/p1023rds/Makefile index 21a6920e63..3918ac585b 100644 --- a/nand_spl/board/freescale/p1023rds/Makefile +++ b/nand_spl/board/freescale/p1023rds/Makefile @@ -11,18 +11,19 @@ nandobj := $(OBJTREE)/nand_spl/ LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ $(LDFLAGS) $(LDFLAGS_FINAL) -AFLAGS += -DCONFIG_NAND_SPL -CFLAGS += -DCONFIG_NAND_SPL +asflags-y += -DCONFIG_NAND_SPL +ccflags-y += -DCONFIG_NAND_SPL SOBJS = start.o resetvec.o COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o -SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) +targets += $(__OBJS) + all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl @@ -36,7 +37,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds -Map $(nandobj)u-boot-spl.map -o $@ $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ + $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ -ansi -D__ASSEMBLY__ -P - <$< >$@ # create symbolic links for common files diff --git a/nand_spl/board/freescale/p1_p2_rdb/Makefile b/nand_spl/board/freescale/p1_p2_rdb/Makefile index f711cf30ba..f0beaedf1a 100644 --- a/nand_spl/board/freescale/p1_p2_rdb/Makefile +++ b/nand_spl/board/freescale/p1_p2_rdb/Makefile @@ -15,18 +15,19 @@ nandobj := $(OBJTREE)/nand_spl/ LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ $(LDFLAGS) $(LDFLAGS_FINAL) -AFLAGS += -DCONFIG_NAND_SPL -CFLAGS += -DCONFIG_NAND_SPL +asflags-y += -DCONFIG_NAND_SPL +ccflags-y += -DCONFIG_NAND_SPL SOBJS = start.o resetvec.o COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o -SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) +targets += $(__OBJS) + all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl @@ -40,7 +41,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds -Map $(nandobj)u-boot-spl.map -o $@ $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ + $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ -ansi -D__ASSEMBLY__ -P - <$< >$@ # create symbolic links for common files diff --git a/nand_spl/board/sheldon/simpc8313/Makefile b/nand_spl/board/sheldon/simpc8313/Makefile index ca45ecd328..35b1f974db 100644 --- a/nand_spl/board/sheldon/simpc8313/Makefile +++ b/nand_spl/board/sheldon/simpc8313/Makefile @@ -12,18 +12,19 @@ nandobj := $(OBJTREE)/nand_spl/ LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ $(LDFLAGS) $(LDFLAGS_FINAL) -AFLAGS += -DCONFIG_NAND_SPL -CFLAGS += -DCONFIG_NAND_SPL +asflags-y += -DCONFIG_NAND_SPL +ccflags-y += -DCONFIG_NAND_SPL SOBJS = start.o ticks.o COBJS = nand_boot_fsl_elbc.o $(BOARD).o sdram.o ns16550.o spl_minimal.o \ time.o cache.o -SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) __OBJS := $(SOBJS) $(COBJS) LNDIR := $(nandobj)board/$(BOARDDIR) +targets += $(__OBJS) + all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl @@ -37,7 +38,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds -Map $(nandobj)u-boot-spl.map -o $@ $(nandobj)u-boot.lds: $(LDSCRIPT) - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ + $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ # create symbolic links for common files diff --git a/net/Makefile b/net/Makefile index 31aadc2ffc..942595021d 100644 --- a/net/Makefile +++ b/net/Makefile @@ -5,7 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -# CFLAGS += -DDEBUG +#ccflags-y += -DDEBUG obj-$(CONFIG_CMD_NET) += arp.o obj-$(CONFIG_CMD_NET) += bootp.o diff --git a/post/lib_powerpc/fpu/Makefile b/post/lib_powerpc/fpu/Makefile index c720a26f61..556a833f6d 100644 --- a/post/lib_powerpc/fpu/Makefile +++ b/post/lib_powerpc/fpu/Makefile @@ -5,20 +5,19 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y += 20001122-1.o -obj-y += 20010114-2.o -obj-y += 20010226-1.o -obj-y += 980619-1.o -obj-y += acc1.o -obj-y += compare-fp-1.o -obj-y += fpu.o -obj-y += mul-subnormal-single-1.o -obj-y += darwin-ldouble.o +objs-before-objcopy := 20001122-1.o 20010114-2.o 20010226-1.o 980619-1.o \ + acc1.o compare-fp-1.o fpu.o mul-subnormal-single-1.o darwin-ldouble.o +targets += $(objs-before-objcopy) -CFLAGS := $(shell echo $(CFLAGS) | sed s/-msoft-float//) -CFLAGS += -mhard-float -fkeep-inline-functions +# remove -msoft-float flag +$(foreach m, $(objs-before-objcopy), $(eval CFLAGS_REMOVE_$m := -msoft-float)) +ccflags-y := -mhard-float -fkeep-inline-functions -$(addprefix $(obj)/,$(obj-y)): $(obj)/%.o: $(src)/%.c - $(CC) $(ALL_CFLAGS) -o $@.fp $< -c - $(OBJCOPY) -R .gnu.attributes $@.fp $@ - rm -f $@.fp +# Do not delete intermidiate files (*.o) +.SECONDARY: $(call objectify, $(objs-before-objcopy)) + +obj-y := $(objs-before-objcopy:.o=_.o) + +OBJCOPYFLAGS := -R .gnu.attributes +$(obj)/%_.o: $(obj)/%.o + $(call if_changed,objcopy) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 30a5551a4d..6113c13d16 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -165,7 +165,7 @@ ar-option = $(call try-run, $(AR) rc$(1) "$$TMP",$(1),$(2)) # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj= # Usage: # $(Q)$(MAKE) $(build)=dir -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj ### # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.modbuiltin obj= diff --git a/scripts/Makefile.build b/scripts/Makefile.build index d5d859c807..2a87984a31 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -2,7 +2,16 @@ # Building # ========================================================================== -src := $(obj) +# Modified for U-Boot +ifeq ($(CONFIG_TPL_BUILD),y) + src := $(patsubst tpl/%,%,$(obj)) +else + ifeq ($(CONFIG_SPL_BUILD),y) + src := $(patsubst spl/%,%,$(obj)) + else + src := $(obj) + endif +endif PHONY := __build __build: @@ -35,6 +44,11 @@ subdir-ccflags-y := include scripts/Kbuild.include +# Added for U-Boot +# We must include config.mk after Kbuild.include +# so that some config.mk can use cc-option. +include config.mk + # For backward compatibility check that these variables do not change save-cflags := $(CFLAGS) @@ -115,14 +129,16 @@ ifneq ($(hostprogs-y)$(hostprogs-m),) include scripts/Makefile.host endif -ifneq ($(KBUILD_SRC),) +# Uncommented for U-Boot +# We need to create output dicrectory for SPL and TPL even for in-tree build +#ifneq ($(KBUILD_SRC),) # Create output directory if not already present _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) # Create directories for object files if directory does not exist # Needed when obj-y := dir/file.o syntax is used _dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d))) -endif +#endif ifndef obj $(warning kbuild: Makefile.build is included improperly) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 49392ecbef..d4b5cb5d0e 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -101,12 +101,13 @@ basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))" modname_flags = $(if $(filter 1,$(words $(modname))),\ -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))") -orig_c_flags = $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(KBUILD_SUBDIR_CCFLAGS) \ +# U-Boot also uses $(CPPFLAGS) +orig_c_flags = $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(KBUILD_CFLAGS) $(KBUILD_SUBDIR_CCFLAGS) \ $(ccflags-y) $(CFLAGS_$(basetarget).o) _c_flags = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags)) -_a_flags = $(KBUILD_CPPFLAGS) $(KBUILD_AFLAGS) $(KBUILD_SUBDIR_ASFLAGS) \ +_a_flags = $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(KBUILD_AFLAGS) $(KBUILD_SUBDIR_ASFLAGS) \ $(asflags-y) $(AFLAGS_$(basetarget).o) -_cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F)) +_cpp_flags = $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F)) # # Enable gcov profiling flags for a file, directory or for all files depending @@ -137,14 +138,15 @@ __a_flags = $(call flags,_a_flags) __cpp_flags = $(call flags,_cpp_flags) endif -c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ +# Modified for U-Boot: LINUXINCLUDE -> UBOOTINCLUDE +c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE) \ $(__c_flags) $(modkern_cflags) \ -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags) -a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ +a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE) \ $(__a_flags) $(modkern_aflags) -cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ +cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE) \ $(__cpp_flags) ld_flags = $(LDFLAGS) $(ldflags-y) diff --git a/spl/Makefile b/spl/Makefile index 18606ac34c..6b985d1e4a 100644 --- a/spl/Makefile +++ b/spl/Makefile @@ -106,8 +106,7 @@ LIBS-y := $(patsubst %/, %/built-in.o, $(LIBS-y)) # Add GCC lib ifeq ("$(USE_PRIVATE_LIBGCC)", "yes") -PLATFORM_LIBGCC = $(SPLTREE)/arch/$(ARCH)/lib/libgcc.o -PLATFORM_LIBS := $(filter-out %/libgcc.o, $(filter-out -lgcc, $(PLATFORM_LIBS))) $(PLATFORM_LIBGCC) +PLATFORM_LIBS := $(SPLTREE)/arch/$(ARCH)/lib/lib.a endif LIBS-y := $(sort $(LIBS-y)) @@ -155,7 +154,7 @@ $(OBJTREE)/MLO.byteswap: $(obj)/u-boot-spl.bin $(OBJTREE)/tools/mkimage -T omapimage -n byteswap \ -a $(CONFIG_SPL_TEXT_BASE) -d $< $@ -$(objtree)/SPL : $(obj)/u-boot-spl.bin depend +$(objtree)/SPL : $(obj)/u-boot-spl.bin $(MAKE) $(build)=spl/arch/arm/imx-common $@ ALL-y += $(obj)/$(SPL_BIN).bin @@ -191,20 +190,24 @@ GEN_UBOOT = \ --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \ -Map $(SPL_BIN).map -o $(SPL_BIN) -$(obj)/$(SPL_BIN): depend $(START) $(LIBS) $(obj)/u-boot-spl.lds +$(obj)/$(SPL_BIN): $(START) $(LIBS) $(obj)/u-boot-spl.lds $(GEN_UBOOT) $(START): @: -$(LIBS): depend - $(MAKE) $(build)=$(patsubst %/,%,$(dir $@)) +$(LIBS): + $(Q)$(MAKE) $(build)=$(patsubst %/,%,$(dir $@)) -$(obj)/u-boot-spl.lds: $(LDSCRIPT) depend - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj). -ansi -D__ASSEMBLY__ -P - < $< > $@ +# FIX ME +cpp_flags := $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(UBOOTINCLUDE) $(NOSTDINC_FLAGS) -depend: $(obj)/.depend -.PHONY: depend +$(obj)/u-boot-spl.lds: $(LDSCRIPT) FORCE + $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(obj). -ansi -D__ASSEMBLY__ -P - < $< > $@ -# defines $(obj).depend target -include $(SRCTREE)/rules.mk +PHONY += FORCE +FORCE: + +# Declare the contents of the .PHONY variable as phony. We keep that +# information in a variable so we can use it in if_changed and friends. +.PHONY: $(PHONY) diff --git a/tools/Makefile b/tools/Makefile index 9b19dcb264..70a3fc2155 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -40,19 +40,19 @@ hostprogs-$(CONFIG_CMD_LICENSE) += bin2header$(SFX) hostprogs-$(CONFIG_LCD_LOGO) += bmp_logo$(SFX) hostprogs-$(CONFIG_VIDEO_LOGO) += bmp_logo$(SFX) -HOSTCFLAGS_bmp_logo$(SFX) := -pedantic +HOSTCFLAGS_bmp_logo$(SFX).o := -pedantic hostprogs-$(CONFIG_BUILD_ENVCRC) += envcrc$(SFX) envcrc$(SFX)-objs := crc32.o env_embedded.o envcrc.o sha1.o hostprogs-$(CONFIG_CMD_NET) += gen_eth_addr$(SFX) -HOSTCFLAGS_gen_eth_addr$(SFX) := -pedantic +HOSTCFLAGS_gen_eth_addr$(SFX).o := -pedantic hostprogs-$(CONFIG_CMD_LOADS) += img2srec$(SFX) -HOSTCFLAGS_img2srec$(SFX) := -pedantic +HOSTCFLAGS_img2srec$(SFX).o := -pedantic hostprogs-$(CONFIG_XWAY_SWAP_BYTES) += xway-swap-bytes$(SFX) -HOSTCFLAGS_xway-swap-bytes$(SFX) := -pedantic +HOSTCFLAGS_xway-swap-bytes$(SFX).o := -pedantic hostprogs-y += mkenvimage$(SFX) mkenvimage$(SFX)-objs := crc32.o mkenvimage.o os_support.o @@ -97,7 +97,7 @@ HOSTLOADLIBES_dumpimage$(SFX) := -lssl -lcrypto HOSTLOADLIBES_mkimage$(SFX) := -lssl -lcrypto # Add CONFIG_MXS into host CFLAGS, so we can check whether or not register # the mxsimage support within tools/mxsimage.c . -HOSTCFLAGS += -DCONFIG_MXS +HOSTCFLAGS_mxsimage.o += -DCONFIG_MXS endif ifdef CONFIG_FIT_SIGNATURE @@ -111,11 +111,11 @@ endif hostprogs-$(CONFIG_EXYNOS5250) += mkexynosspl$(SFX) hostprogs-$(CONFIG_EXYNOS5420) += mkexynosspl$(SFX) -HOSTCFLAGS_mkexynosspl$(SFX) := -pedantic +HOSTCFLAGS_mkexynosspl$(SFX).o := -pedantic hostprogs-$(CONFIG_MX23) += mxsboot$(SFX) hostprogs-$(CONFIG_MX28) += mxsboot$(SFX) -HOSTCFLAGS_mxsboot$(SFX) := -pedantic +HOSTCFLAGS_mxsboot$(SFX).o := -pedantic hostprogs-$(CONFIG_NETCONSOLE) += ncb$(SFX) hostprogs-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1$(SFX) @@ -137,7 +137,7 @@ HOSTCFLAGS_sha1.o := -pedantic # Don't build by default #hostprogs-$(CONFIG_PPC) += mpc86x_clk$(SFX) -#HOSTCFLAGS_mpc86x_clk$(SFX) := -pedantic +#HOSTCFLAGS_mpc86x_clk$(SFX).o := -pedantic always := $(hostprogs-y) @@ -164,11 +164,6 @@ endif endif # !LOGO_BMP -# now $(obj) is defined -HOSTSRCS += $(addprefix $(SRCTREE)/,$(EXT_OBJ_FILES-y:.o=.c)) -HOSTSRCS += $(addprefix $(SRCTREE)/tools/,$(OBJ_FILES-y:.o=.c)) -HOSTSRCS += $(addprefix $(SRCTREE)/lib/libfdt/,$(LIBFDT_OBJ_FILES-y:.o=.c)) - # # Use native tools and options # Define __KERNEL_STRICT_NAMES to prevent typedef overlaps @@ -183,7 +178,7 @@ HOST_EXTRACFLAGS += -include $(SRCTREE)/include/libfdt_env.h \ -D__KERNEL_STRICT_NAMES \ -D_GNU_SOURCE -all: $(LOGO-y) +__build: $(LOGO-y) subdir-y := kernel-doc -- cgit v1.2.3 From efcf861931f987d82b11caed75b8c2ad9d709274 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 4 Feb 2014 17:24:40 +0900 Subject: kbuild: use scripts/Makefile.clean This commit refactors cleaning targets such as clean, clobber, mrpropper, distclean with scripts/Makefile.clean. By using scripts/Makefile.clean, we can recursively descend into subdirectories and delete generated files there. We do not need add a big list of generated files to the "clean" target. Signed-off-by: Masahiro Yamada --- Makefile | 178 ++++++++++++++++++++++++--------------------- arch/blackfin/cpu/Makefile | 1 + board/cray/L1/Makefile | 2 + dts/Makefile | 12 +-- scripts/Makefile | 2 + scripts/Makefile.clean | 4 + 6 files changed, 111 insertions(+), 88 deletions(-) create mode 100644 scripts/Makefile (limited to 'board') diff --git a/Makefile b/Makefile index c3e1cfa6d9..1caa9f1a87 100644 --- a/Makefile +++ b/Makefile @@ -1110,93 +1110,96 @@ include/license.h: tools/bin2header COPYING cat COPYING | gzip -9 -c | ./tools/bin2header license_gzip > include/license.h ######################################################################### +### +# Cleaning is done on three levels. +# make clean Delete most generated files +# Leave enough to build external modules +# make mrproper Delete the current configuration, and all generated files +# make distclean Remove editor backup files, patch leftover files and the like + +# Directories & files removed with 'make clean' +CLEAN_DIRS += $(MODVERDIR) +CLEAN_FILES += u-boot.lds include/bmp_logo.h include/bmp_logo_data.h \ + board/*/config.tmp board/*/*/config.tmp dts/*.tmp \ + include/autoconf.mk* include/spl-autoconf.mk \ + include/tpl-autoconf.mk + +# Directories & files removed with 'make clobber' +CLOBBER_DIRS += $(patsubst %,spl/%, $(filter-out Makefile, \ + $(shell ls -1 spl 2>/dev/null))) \ + tpl +CLOBBER_FILES += u-boot* MLO MLO* SPL System.map nand_spl/u-boot* + +# Directories & files removed with 'make mrproper' +MRPROPER_DIRS += include/config include/generated +MRPROPER_FILES += .config .config.old \ + tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ + include/config.h include/config.mk + +# clean - Delete most, but leave enough to build external modules +# +clean: rm-dirs := $(CLEAN_DIRS) +clean: rm-files := $(CLEAN_FILES) + +clean-dirs := $(foreach f,$(u-boot-alldirs),$(if $(wildcard $f/Makefile),$f)) + +clean-dirs := $(addprefix _clean_, $(clean-dirs) doc/DocBook) + +PHONY += $(clean-dirs) clean archclean +$(clean-dirs): + $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) + +# TODO: Do not use *.cfgtmp +clean: $(clean-dirs) + $(call cmd,rmdirs) + $(call cmd,rmfiles) + @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \ + \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ + -o -name '*.ko.*' -o -name '*.su' -o -name '*.cfgtmp' \ + -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ + -o -name '*.symtypes' -o -name 'modules.order' \ + -o -name modules.builtin -o -name '.tmp_*.o.*' \ + -o -name '*.gcno' \) -type f -print | xargs rm -f + @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \ + -path './nand_spl/*' -type l -print | xargs rm -f + +# clobber +# +clobber: rm-dirs := $(CLOBBER_DIRS) +clobber: rm-files := $(CLOBBER_FILES) -######################################################################### - -clean: - @rm -f examples/standalone/atmel_df_pow2 \ - examples/standalone/hello_world \ - examples/standalone/interrupt \ - examples/standalone/mem_to_mem_idma2intr \ - examples/standalone/sched \ - $(addprefix examples/standalone/, smc91111_eeprom smc911x_eeprom) \ - examples/standalone/test_burst \ - examples/standalone/timer - @rm -f $(addprefix examples/api/, demo demo.bin) - @rm -f tools/bmp_logo tools/easylogo/easylogo \ - tools/env/fw_printenv \ - tools/envcrc \ - $(addprefix tools/gdb/, gdbcont gdbsend) \ - tools/gen_eth_addr tools/img2srec \ - tools/dumpimage \ - $(addprefix tools/, mkenvimage mkimage) \ - tools/mpc86x_clk \ - $(addprefix tools/, mk$(BOARD)spl mkexynosspl) \ - tools/mxsboot \ - tools/ncb tools/ubsha1 \ - tools/kernel-doc/docproc \ - tools/proftool - @rm -f $(addprefix board/cray/L1/, bootscript.c bootscript.image) \ - board/matrix_vision/*/bootscript.img \ - spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl \ - u-boot.lds \ - $(addprefix arch/blackfin/cpu/, init.lds init.elf) - @rm -f include/bmp_logo.h - @rm -f include/bmp_logo_data.h - @rm -f lib/asm-offsets.s - @rm -f include/generated/asm-offsets.h - @rm -f $(CPUDIR)/$(SOC)/asm-offsets.s - @rm -f $(TIMESTAMP_FILE) $(VERSION_FILE) - @$(MAKE) -f $(srctree)/doc/DocBook/Makefile cleandocs - @find $(OBJTREE) -type f \ - \( -name 'core' -o -name '*.bak' -o -name '*~' -o -name '*.su' \ - -o -name '*.o' -o -name '*.a' -o -name '*.exe' -o -name '*.cmd' \ - -o -name '*.cfgtmp' \) -print \ - | xargs rm -f +PHONY += clobber clobber: clean - @find $(OBJTREE) -type f \( -name '*.srec' \ - -o -name '*.bin' -o -name u-boot.img \) \ - -print0 | xargs -0 rm -f - @rm -f *.bak ctags etags TAGS \ - cscope.* *.*~ - @rm -f u-boot u-boot.map u-boot.hex $(ALL-y) - @rm -f u-boot.kwb - @rm -f u-boot.pbl - @rm -f u-boot.imx - @rm -f u-boot-with-spl.imx - @rm -f u-boot-with-nand-spl.imx - @rm -f u-boot.ubl - @rm -f u-boot.ais - @rm -f u-boot.dtb - @rm -f u-boot.sb - @rm -f u-boot.spr - @rm -f $(addprefix nand_spl/, u-boot.lds u-boot.lst System.map) - @rm -f $(addprefix nand_spl/, u-boot-nand_spl.lds u-boot-spl u-boot-spl.map) - @rm -f $(addprefix spl/, u-boot-spl u-boot-spl.bin u-boot-spl.map) - @rm -f spl/u-boot-spl.lds - @rm -f $(addprefix tpl/, u-boot-tpl u-boot-tpl.bin u-boot-tpl.map) - @rm -f tpl/u-boot-spl.lds - @rm -f MLO MLO.byteswap - @rm -f SPL - @rm -f tools/xway-swap-bytes - @rm -fr include/asm/proc include/asm/arch include/asm - @rm -fr include/generated - @[ ! -d nand_spl ] || find nand_spl -name "*" -type l -print | xargs rm -f - @rm -f dts/*.tmp - @rm -f $(addprefix spl/, u-boot-spl.ais, u-boot-spl-pad.ais) - -mrproper: clobber - @rm -f include/config.h include/config.mk \ - board/*/config.tmp board/*/*/config.tmp \ - include/autoconf.mk include/autoconf.mk.dep \ - include/spl-autoconf.mk \ - include/tpl-autoconf.mk + $(call cmd,rmdirs) + $(call cmd,rmfiles) + +# mrproper - Delete all generated files, including .config +# +mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS)) +mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) +mrproper-dirs := $(addprefix _mrproper_,scripts) + +PHONY += $(mrproper-dirs) mrproper archmrproper +$(mrproper-dirs): + $(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@) + +mrproper: clobber $(mrproper-dirs) + $(call cmd,rmdirs) + $(call cmd,rmfiles) + @rm -f arch/*/include/asm/arch arch/*/include/asm/proc + +# distclean +# +PHONY += distclean distclean: mrproper -ifneq ($(OBJTREE),$(SRCTREE)) - rm -rf * -endif + @find $(srctree) $(RCS_FIND_IGNORE) \ + \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ + -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ + -o -name '.*.rej' \ + -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \ + -type f -print | xargs rm -f backup: F=`basename $(TOPDIR)` ; cd .. ; \ @@ -1207,6 +1210,17 @@ backup: endif #ifeq ($(config-targets),1) endif #ifeq ($(mixed-targets),1) +quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs))) + cmd_rmdirs = rm -rf $(rm-dirs) + +quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files))) + cmd_rmfiles = rm -f $(rm-files) + +# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=dir +# Usage: +# $(Q)$(MAKE) $(clean)=dir +clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj + endif # skip-makefile PHONY += FORCE diff --git a/arch/blackfin/cpu/Makefile b/arch/blackfin/cpu/Makefile index dd4d2d13e0..426292f988 100644 --- a/arch/blackfin/cpu/Makefile +++ b/arch/blackfin/cpu/Makefile @@ -22,6 +22,7 @@ obj-y += reset.o obj-y += traps.o extra-y += check_initcode +clean-files := init.lds # make sure our initcode (which goes into LDR) does not # have relocs or external references diff --git a/board/cray/L1/Makefile b/board/cray/L1/Makefile index 6aae9fa62f..63f43dab29 100644 --- a/board/cray/L1/Makefile +++ b/board/cray/L1/Makefile @@ -14,3 +14,5 @@ $(obj)/bootscript.c: $(obj)/bootscript.image $(obj)/bootscript.image: $(src)/bootscript.hush -$(OBJTREE)/tools/mkimage -A ppc -O linux -T script -C none -a 0 -e 0 -n bootscript -d $< $@ + +clean-files := bootscript.c bootscript.image \ No newline at end of file diff --git a/dts/Makefile b/dts/Makefile index cc6ecf66eb..1e7609a467 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -7,12 +7,6 @@ # This Makefile builds the internal U-Boot fdt if CONFIG_OF_CONTROL is # enabled. See doc/README.fdt-control for more details. -ifeq ($(DEVICE_TREE),) -$(if $(CONFIG_DEFAULT_DEVICE_TREE),,\ -$(error Please define CONFIG_DEFAULT_DEVICE_TREE in your board header file)) -DEVICE_TREE = $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%) -endif - DTS_INCDIRS = $(SRCTREE)/board/$(VENDOR)/$(BOARD)/dts DTS_INCDIRS += $(SRCTREE)/board/$(VENDOR)/dts DTS_INCDIRS += $(SRCTREE)/arch/$(ARCH)/dts @@ -28,9 +22,15 @@ DTC_FLAGS := -R 4 -p 0x1000 \ # the filename. DT_BIN := $(obj)/dt.dtb +DEVICE_TREE ?= $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%) +ifeq ($(DEVICE_TREE),) +$(DT_BIN): FORCE + echo >&2 "Please define CONFIG_DEFAULT_DEVICE_TREE in your board header file" +else $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts $(CPP) $(DTS_CPPFLAGS) $< -o $(DT_BIN).dts.tmp $(DTC) $(DTC_FLAGS) -O dtb -o ${DT_BIN} $(DT_BIN).dts.tmp +endif process_lds = \ $(1) | sed -r -n 's/^OUTPUT_$(2)[ ("]*([^")]*).*/\1/p' diff --git a/scripts/Makefile b/scripts/Makefile new file mode 100644 index 0000000000..ebbadc9ba2 --- /dev/null +++ b/scripts/Makefile @@ -0,0 +1,2 @@ +# Let clean descend into subdirs +subdir- += basic diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean index 686cb0d31c..5cd0f51770 100644 --- a/scripts/Makefile.clean +++ b/scripts/Makefile.clean @@ -37,6 +37,10 @@ subdir-ymn := $(sort $(subdir-ym) $(subdir-n) $(subdir-)) subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn)) +# Temporal work-around for U-Boot + +subdir-ymn := $(foreach f, $(subdir-ymn), $(if $(wildcard $f/Makefile),$f)) + # build a list of files to remove, usually relative to the current # directory -- cgit v1.2.3 From b831bb36bbf138a209608f192270fb1c5239cb10 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 4 Feb 2014 17:24:43 +0900 Subject: board: sandburst: delete FORCEBUILD We had switched to Kbuild, so we do not need to delete sandburst board files at every build. U-Boot conventional build system did not check the update of command line option, -DBUILDUSER. Kbuild can handle it nicely and re-builds object files when command line options are changed. (The file ".*.cmd" stores the information how the file was generated at the previous build.) Signed-off-by: Masahiro Yamada --- board/sandburst/karef/Makefile | 6 +----- board/sandburst/metrobox/Makefile | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'board') diff --git a/board/sandburst/karef/Makefile b/board/sandburst/karef/Makefile index d5a9b34f1d..ce29b4100e 100644 --- a/board/sandburst/karef/Makefile +++ b/board/sandburst/karef/Makefile @@ -10,11 +10,7 @@ # # TBS: add for debugging purposes -BUILDUSER := $(shell whoami) -FORCEBUILD := $(shell rm -f karef.o) - -ccflags-y += -DBUILDUSER='"$(BUILDUSER)"' -# TBS: end debugging +ccflags-y += -DBUILDUSER='"$(shell whoami)"' obj-y = karef.o ../common/flash.o ../common/sb_common.o extra-y += init.o diff --git a/board/sandburst/metrobox/Makefile b/board/sandburst/metrobox/Makefile index 8121cce514..2c1028bd2b 100644 --- a/board/sandburst/metrobox/Makefile +++ b/board/sandburst/metrobox/Makefile @@ -9,11 +9,7 @@ # # TBS: add for debugging purposes -BUILDUSER := $(shell whoami) -FORCEBUILD := $(shell rm -f metrobox.o) - -ccflags-y += -DBUILDUSER='"$(BUILDUSER)"' -# TBS: end debugging +ccflags-y += -DBUILDUSER='"$(shell whoami)"' obj-y = metrobox.o ../common/flash.o ../common/sb_common.o extra-y += init.o -- cgit v1.2.3 From 5ab502cb8900aee483dfba28700640672e0b060e Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Wed, 5 Feb 2014 11:28:26 +0900 Subject: dts: move device tree sources to arch/$(ARCH)/dts/ Unlike Linux Kernel, U-Boot historically had *.dts files under board/$(VENDOR)/dts/ and *.dtsi files under arch/$(ARCH)/dts/. I think arch/$(ARCH)/dts dicretory is a better location to store both *.dts and *.dtsi files. For example, before this commit, board/xilinx/dts directory had both Microblaze dts (microblaze-generic.dts) and ARM dts (zynq-*.dts), which are totally unrelated. This commit moves *.dts to arch/$(ARCH)/dts/ directories, allowing us to describe nicely mutiple DTBs generation in the next commit. Signed-off-by: Masahiro Yamada --- arch/arm/dts/exynos5250-arndale.dts | 39 ++ arch/arm/dts/exynos5250-smdk5250.dts | 151 +++++++ arch/arm/dts/exynos5250-snow.dts | 187 +++++++++ arch/arm/dts/exynos5420-smdk5420.dts | 169 ++++++++ arch/arm/dts/tegra114-dalmore.dts | 71 ++++ arch/arm/dts/tegra20-colibri_t20_iris.dts | 45 ++ arch/arm/dts/tegra20-harmony.dts | 105 +++++ arch/arm/dts/tegra20-medcom-wide.dts | 77 ++++ arch/arm/dts/tegra20-paz00.dts | 91 +++++ arch/arm/dts/tegra20-plutux.dts | 45 ++ arch/arm/dts/tegra20-seaboard.dts | 191 +++++++++ arch/arm/dts/tegra20-tamonten.dtsi | 500 +++++++++++++++++++++++ arch/arm/dts/tegra20-tec.dts | 77 ++++ arch/arm/dts/tegra20-trimslice.dts | 64 +++ arch/arm/dts/tegra20-ventana.dts | 91 +++++ arch/arm/dts/tegra20-whistler.dts | 73 ++++ arch/arm/dts/tegra30-beaver.dts | 77 ++++ arch/arm/dts/tegra30-cardhu.dts | 72 ++++ arch/arm/dts/tegra30-tamonten.dtsi | 69 ++++ arch/arm/dts/tegra30-tec-ng.dts | 18 + arch/arm/dts/zynq-microzed.dts | 14 + arch/arm/dts/zynq-zc702.dts | 14 + arch/arm/dts/zynq-zc706.dts | 14 + arch/arm/dts/zynq-zc770-xm010.dts | 14 + arch/arm/dts/zynq-zc770-xm012.dts | 14 + arch/arm/dts/zynq-zc770-xm013.dts | 14 + arch/arm/dts/zynq-zed.dts | 14 + arch/microblaze/dts/microblaze-generic.dts | 7 + arch/x86/dts/alex.dts | 24 ++ arch/x86/dts/link.dts | 35 ++ board/avionic-design/dts/tegra20-medcom-wide.dts | 77 ---- board/avionic-design/dts/tegra20-plutux.dts | 45 -- board/avionic-design/dts/tegra20-tamonten.dtsi | 500 ----------------------- board/avionic-design/dts/tegra20-tec.dts | 77 ---- board/avionic-design/dts/tegra30-tamonten.dtsi | 69 ---- board/avionic-design/dts/tegra30-tec-ng.dts | 18 - board/chromebook-x86/dts/alex.dts | 24 -- board/chromebook-x86/dts/link.dts | 35 -- board/compal/dts/tegra20-paz00.dts | 91 ----- board/compulab/dts/tegra20-trimslice.dts | 64 --- board/nvidia/dts/tegra114-dalmore.dts | 71 ---- board/nvidia/dts/tegra20-harmony.dts | 105 ----- board/nvidia/dts/tegra20-seaboard.dts | 191 --------- board/nvidia/dts/tegra20-ventana.dts | 91 ----- board/nvidia/dts/tegra20-whistler.dts | 73 ---- board/nvidia/dts/tegra30-beaver.dts | 77 ---- board/nvidia/dts/tegra30-cardhu.dts | 72 ---- board/samsung/dts/exynos5250-arndale.dts | 39 -- board/samsung/dts/exynos5250-smdk5250.dts | 151 ------- board/samsung/dts/exynos5250-snow.dts | 187 --------- board/samsung/dts/exynos5420-smdk5420.dts | 169 -------- board/toradex/dts/tegra20-colibri_t20_iris.dts | 45 -- board/xilinx/dts/microblaze-generic.dts | 7 - board/xilinx/dts/zynq-microzed.dts | 14 - board/xilinx/dts/zynq-zc702.dts | 14 - board/xilinx/dts/zynq-zc706.dts | 14 - board/xilinx/dts/zynq-zc770-xm010.dts | 14 - board/xilinx/dts/zynq-zc770-xm012.dts | 14 - board/xilinx/dts/zynq-zc770-xm013.dts | 14 - board/xilinx/dts/zynq-zed.dts | 14 - dts/Makefile | 4 +- scripts/Makefile.lib | 1 - 62 files changed, 2378 insertions(+), 2379 deletions(-) create mode 100644 arch/arm/dts/exynos5250-arndale.dts create mode 100644 arch/arm/dts/exynos5250-smdk5250.dts create mode 100644 arch/arm/dts/exynos5250-snow.dts create mode 100644 arch/arm/dts/exynos5420-smdk5420.dts create mode 100644 arch/arm/dts/tegra114-dalmore.dts create mode 100644 arch/arm/dts/tegra20-colibri_t20_iris.dts create mode 100644 arch/arm/dts/tegra20-harmony.dts create mode 100644 arch/arm/dts/tegra20-medcom-wide.dts create mode 100644 arch/arm/dts/tegra20-paz00.dts create mode 100644 arch/arm/dts/tegra20-plutux.dts create mode 100644 arch/arm/dts/tegra20-seaboard.dts create mode 100644 arch/arm/dts/tegra20-tamonten.dtsi create mode 100644 arch/arm/dts/tegra20-tec.dts create mode 100644 arch/arm/dts/tegra20-trimslice.dts create mode 100644 arch/arm/dts/tegra20-ventana.dts create mode 100644 arch/arm/dts/tegra20-whistler.dts create mode 100644 arch/arm/dts/tegra30-beaver.dts create mode 100644 arch/arm/dts/tegra30-cardhu.dts create mode 100644 arch/arm/dts/tegra30-tamonten.dtsi create mode 100644 arch/arm/dts/tegra30-tec-ng.dts create mode 100644 arch/arm/dts/zynq-microzed.dts create mode 100644 arch/arm/dts/zynq-zc702.dts create mode 100644 arch/arm/dts/zynq-zc706.dts create mode 100644 arch/arm/dts/zynq-zc770-xm010.dts create mode 100644 arch/arm/dts/zynq-zc770-xm012.dts create mode 100644 arch/arm/dts/zynq-zc770-xm013.dts create mode 100644 arch/arm/dts/zynq-zed.dts create mode 100644 arch/microblaze/dts/microblaze-generic.dts create mode 100644 arch/x86/dts/alex.dts create mode 100644 arch/x86/dts/link.dts delete mode 100644 board/avionic-design/dts/tegra20-medcom-wide.dts delete mode 100644 board/avionic-design/dts/tegra20-plutux.dts delete mode 100644 board/avionic-design/dts/tegra20-tamonten.dtsi delete mode 100644 board/avionic-design/dts/tegra20-tec.dts delete mode 100644 board/avionic-design/dts/tegra30-tamonten.dtsi delete mode 100644 board/avionic-design/dts/tegra30-tec-ng.dts delete mode 100644 board/chromebook-x86/dts/alex.dts delete mode 100644 board/chromebook-x86/dts/link.dts delete mode 100644 board/compal/dts/tegra20-paz00.dts delete mode 100644 board/compulab/dts/tegra20-trimslice.dts delete mode 100644 board/nvidia/dts/tegra114-dalmore.dts delete mode 100644 board/nvidia/dts/tegra20-harmony.dts delete mode 100644 board/nvidia/dts/tegra20-seaboard.dts delete mode 100644 board/nvidia/dts/tegra20-ventana.dts delete mode 100644 board/nvidia/dts/tegra20-whistler.dts delete mode 100644 board/nvidia/dts/tegra30-beaver.dts delete mode 100644 board/nvidia/dts/tegra30-cardhu.dts delete mode 100644 board/samsung/dts/exynos5250-arndale.dts delete mode 100644 board/samsung/dts/exynos5250-smdk5250.dts delete mode 100644 board/samsung/dts/exynos5250-snow.dts delete mode 100644 board/samsung/dts/exynos5420-smdk5420.dts delete mode 100644 board/toradex/dts/tegra20-colibri_t20_iris.dts delete mode 100644 board/xilinx/dts/microblaze-generic.dts delete mode 100644 board/xilinx/dts/zynq-microzed.dts delete mode 100644 board/xilinx/dts/zynq-zc702.dts delete mode 100644 board/xilinx/dts/zynq-zc706.dts delete mode 100644 board/xilinx/dts/zynq-zc770-xm010.dts delete mode 100644 board/xilinx/dts/zynq-zc770-xm012.dts delete mode 100644 board/xilinx/dts/zynq-zc770-xm013.dts delete mode 100644 board/xilinx/dts/zynq-zed.dts (limited to 'board') diff --git a/arch/arm/dts/exynos5250-arndale.dts b/arch/arm/dts/exynos5250-arndale.dts new file mode 100644 index 0000000000..202f2ea6ed --- /dev/null +++ b/arch/arm/dts/exynos5250-arndale.dts @@ -0,0 +1,39 @@ +/* + * SAMSUNG Arndale board device tree source + * + * Copyright (c) 2013 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ +*/ + +/dts-v1/; +#include "exynos5250.dtsi" + +/ { + model = "SAMSUNG Arndale board based on EXYNOS5250"; + compatible = "samsung,arndale", "samsung,exynos5250"; + + aliases { + serial0 = "/serial@12C20000"; + console = "/serial@12C20000"; + }; + + mmc@12200000 { + samsung,bus-width = <8>; + samsung,timing = <1 3 3>; + }; + + mmc@12210000 { + status = "disabled"; + }; + + mmc@12220000 { + samsung,bus-width = <4>; + samsung,timing = <1 2 3>; + }; + + mmc@12230000 { + status = "disabled"; + }; +}; diff --git a/arch/arm/dts/exynos5250-smdk5250.dts b/arch/arm/dts/exynos5250-smdk5250.dts new file mode 100644 index 0000000000..9020382d97 --- /dev/null +++ b/arch/arm/dts/exynos5250-smdk5250.dts @@ -0,0 +1,151 @@ +/* + * SAMSUNG SMDK5250 board device tree source + * + * Copyright (c) 2012 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +/dts-v1/; +/include/ "exynos5250.dtsi" + +/ { + model = "SAMSUNG SMDK5250 board based on EXYNOS5250"; + compatible = "samsung,smdk5250", "samsung,exynos5250"; + + aliases { + i2c0 = "/i2c@12c60000"; + i2c1 = "/i2c@12c70000"; + i2c2 = "/i2c@12c80000"; + i2c3 = "/i2c@12c90000"; + i2c4 = "/i2c@12ca0000"; + i2c5 = "/i2c@12cb0000"; + i2c6 = "/i2c@12cc0000"; + i2c7 = "/i2c@12cd0000"; + spi0 = "/spi@12d20000"; + spi1 = "/spi@12d30000"; + spi2 = "/spi@12d40000"; + spi3 = "/spi@131a0000"; + spi4 = "/spi@131b0000"; + mmc0 = "/mmc@12200000"; + mmc1 = "/mmc@12210000"; + mmc2 = "/mmc@12220000"; + mmc3 = "/mmc@12230000"; + serial0 = "/serial@12C30000"; + console = "/serial@12C30000"; + i2s = "/sound@3830000"; + }; + + sromc@12250000 { + bank = <1>; + srom-timing = <1 9 12 1 6 1 1>; + width = <2>; + lan@5000000 { + compatible = "smsc,lan9215", "smsc,lan"; + reg = <0x5000000 0x100>; + phy-mode = "mii"; + }; + }; + + sound@3830000 { + samsung,codec-type = "wm8994"; + }; + + sound@12d60000 { + status = "disabled"; + }; + + i2c@12c70000 { + soundcodec@1a { + reg = <0x1a>; + compatible = "wolfson,wm8994-codec"; + }; + }; + + i2c@12c60000 { + pmic@9 { + reg = <0x9>; + compatible = "maxim,max77686_pmic"; + }; + }; + + tmu@10060000 { + samsung,min-temp = <25>; + samsung,max-temp = <125>; + samsung,start-warning = <95>; + samsung,start-tripping = <105>; + samsung,hw-tripping = <110>; + samsung,efuse-min-value = <40>; + samsung,efuse-value = <55>; + samsung,efuse-max-value = <100>; + samsung,slope = <274761730>; + samsung,dc-value = <25>; + }; + + fimd@14400000 { + samsung,vl-freq = <60>; + samsung,vl-col = <2560>; + samsung,vl-row = <1600>; + samsung,vl-width = <2560>; + samsung,vl-height = <1600>; + + samsung,vl-clkp; + samsung,vl-dp; + samsung,vl-bpix = <4>; + + samsung,vl-hspw = <32>; + samsung,vl-hbpd = <80>; + samsung,vl-hfpd = <48>; + samsung,vl-vspw = <6>; + samsung,vl-vbpd = <37>; + samsung,vl-vfpd = <3>; + samsung,vl-cmd-allow-len = <0xf>; + + samsung,winid = <3>; + samsung,interface-mode = <1>; + samsung,dp-enabled = <1>; + samsung,dual-lcd-enabled = <0>; + }; + + dp@145b0000 { + samsung,lt-status = <0>; + + samsung,master-mode = <0>; + samsung,bist-mode = <0>; + samsung,bist-pattern = <0>; + samsung,h-sync-polarity = <0>; + samsung,v-sync-polarity = <0>; + samsung,interlaced = <0>; + samsung,color-space = <0>; + samsung,dynamic-range = <0>; + samsung,ycbcr-coeff = <0>; + samsung,color-depth = <1>; + }; + + mmc@12200000 { + samsung,bus-width = <8>; + samsung,timing = <1 3 3>; + samsung,removable = <0>; + }; + + mmc@12210000 { + status = "disabled"; + }; + + mmc@12220000 { + samsung,bus-width = <4>; + samsung,timing = <1 2 3>; + samsung,removable = <1>; + }; + + mmc@12230000 { + status = "disabled"; + }; + + ehci@12110000 { + samsung,vbus-gpio = <&gpio 0x316 0>; /* X26 */ + }; +}; diff --git a/arch/arm/dts/exynos5250-snow.dts b/arch/arm/dts/exynos5250-snow.dts new file mode 100644 index 0000000000..9b48a0ccd8 --- /dev/null +++ b/arch/arm/dts/exynos5250-snow.dts @@ -0,0 +1,187 @@ +/* + * SAMSUNG Snow board device tree source + * + * Copyright (c) 2012 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +/dts-v1/; +/include/ "exynos5250.dtsi" + +/ { + model = "Google Snow"; + compatible = "google,snow", "samsung,exynos5250"; + + aliases { + i2c0 = "/i2c@12c60000"; + i2c1 = "/i2c@12c70000"; + i2c2 = "/i2c@12c80000"; + i2c3 = "/i2c@12c90000"; + i2c4 = "/i2c@12ca0000"; + i2c5 = "/i2c@12cb0000"; + i2c6 = "/i2c@12cc0000"; + i2c7 = "/i2c@12cd0000"; + spi0 = "/spi@12d20000"; + spi1 = "/spi@12d30000"; + spi2 = "/spi@12d40000"; + spi3 = "/spi@131a0000"; + spi4 = "/spi@131b0000"; + mmc0 = "/mmc@12200000"; + mmc1 = "/mmc@12210000"; + mmc2 = "/mmc@12220000"; + mmc3 = "/mmc@12230000"; + serial0 = "/serial@12C30000"; + console = "/serial@12C30000"; + i2s = "/sound@3830000"; + }; + + i2c4: i2c@12ca0000 { + cros-ec@1e { + reg = <0x1e>; + compatible = "google,cros-ec"; + i2c-max-frequency = <100000>; + ec-interrupt = <&gpio 782 1>; + }; + + power-regulator@48 { + compatible = "ti,tps65090"; + reg = <0x48>; + }; + }; + + spi@131b0000 { + spi-max-frequency = <1000000>; + spi-deactivate-delay = <100>; + cros-ec@0 { + reg = <0>; + compatible = "google,cros-ec"; + spi-max-frequency = <5000000>; + ec-interrupt = <&gpio 782 1>; + optimise-flash-write; + status = "disabled"; + }; + }; + + sound@3830000 { + samsung,codec-type = "max98095"; + codec-enable-gpio = <&gpio 0xb7 0>; + }; + + sound@12d60000 { + status = "disabled"; + }; + + i2c@12cd0000 { + soundcodec@22 { + reg = <0x22>; + compatible = "maxim,max98095-codec"; + }; + }; + + i2c@12c60000 { + pmic@9 { + reg = <0x9>; + compatible = "maxim,max77686_pmic"; + }; + }; + + mmc@12200000 { + samsung,bus-width = <8>; + samsung,timing = <1 3 3>; + samsung,removable = <0>; + }; + + mmc@12210000 { + status = "disabled"; + }; + + mmc@12220000 { + samsung,bus-width = <4>; + samsung,timing = <1 2 3>; + samsung,removable = <1>; + }; + + mmc@12230000 { + status = "disabled"; + }; + + ehci@12110000 { + samsung,vbus-gpio = <&gpio 0x309 0>; /* X11 */ + }; + + xhci@12000000 { + samsung,vbus-gpio = <&gpio 0x317 0>; /* X27 */ + }; + + tmu@10060000 { + samsung,min-temp = <25>; + samsung,max-temp = <125>; + samsung,start-warning = <95>; + samsung,start-tripping = <105>; + samsung,hw-tripping = <110>; + samsung,efuse-min-value = <40>; + samsung,efuse-value = <55>; + samsung,efuse-max-value = <100>; + samsung,slope = <274761730>; + samsung,dc-value = <25>; + }; + + cros-ec-keyb { + compatible = "google,cros-ec-keyb"; + google,key-rows = <8>; + google,key-columns = <13>; + google,repeat-delay-ms = <240>; + google,repeat-rate-ms = <30>; + google,ghost-filter; + /* + * Keymap entries take the form of 0xRRCCKKKK where + * RR=Row CC=Column KKKK=Key Code + * The values below are for a US keyboard layout and + * are taken from the Linux driver. Note that the + * 102ND key is not used for US keyboards. + */ + linux,keymap = < + /* CAPSLCK F1 B F10 */ + 0x0001003a 0x0002003b 0x00030030 0x00040044 + /* N = R_ALT ESC */ + 0x00060031 0x0008000d 0x000a0064 0x01010001 + /* F4 G F7 H */ + 0x0102003e 0x01030022 0x01040041 0x01060023 + /* ' F9 BKSPACE L_CTRL */ + 0x01080028 0x01090043 0x010b000e 0x0200001d + /* TAB F3 T F6 */ + 0x0201000f 0x0202003d 0x02030014 0x02040040 + /* ] Y 102ND [ */ + 0x0205001b 0x02060015 0x02070056 0x0208001a + /* F8 GRAVE F2 5 */ + 0x02090042 0x03010029 0x0302003c 0x03030006 + /* F5 6 - \ */ + 0x0304003f 0x03060007 0x0308000c 0x030b002b + /* R_CTRL A D F */ + 0x04000061 0x0401001e 0x04020020 0x04030021 + /* S K J ; */ + 0x0404001f 0x04050025 0x04060024 0x04080027 + /* L ENTER Z C */ + 0x04090026 0x040b001c 0x0501002c 0x0502002e + /* V X , M */ + 0x0503002f 0x0504002d 0x05050033 0x05060032 + /* L_SHIFT / . SPACE */ + 0x0507002a 0x05080035 0x05090034 0x050B0039 + /* 1 3 4 2 */ + 0x06010002 0x06020004 0x06030005 0x06040003 + /* 8 7 0 9 */ + 0x06050009 0x06060008 0x0608000b 0x0609000a + /* L_ALT DOWN RIGHT Q */ + 0x060a0038 0x060b006c 0x060c006a 0x07010010 + /* E R W I */ + 0x07020012 0x07030013 0x07040011 0x07050017 + /* U R_SHIFT P O */ + 0x07060016 0x07070036 0x07080019 0x07090018 + /* UP LEFT */ + 0x070b0067 0x070c0069>; + }; +}; diff --git a/arch/arm/dts/exynos5420-smdk5420.dts b/arch/arm/dts/exynos5420-smdk5420.dts new file mode 100644 index 0000000000..d73976356d --- /dev/null +++ b/arch/arm/dts/exynos5420-smdk5420.dts @@ -0,0 +1,169 @@ +/* + * SAMSUNG SMDK5420 board device tree source + * + * Copyright (c) 2013 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; +/include/ "exynos5420.dtsi" + +/ { + model = "SAMSUNG SMDK5420 board based on EXYNOS5420"; + compatible = "samsung,smdk5420", "samsung,exynos5"; + + config { + hwid = "smdk5420 TEST A-A 9382"; + }; + + aliases { + i2c0 = "/i2c@12c60000"; + i2c1 = "/i2c@12c70000"; + i2c2 = "/i2c@12c80000"; + i2c3 = "/i2c@12c90000"; + i2c4 = "/i2c@12ca0000"; + i2c5 = "/i2c@12cb0000"; + i2c6 = "/i2c@12cc0000"; + i2c7 = "/i2c@12cd0000"; + i2c8 = "/i2c@12e00000"; + i2c9 = "/i2c@12e10000"; + i2c10 = "/i2c@12e20000"; + spi0 = "/spi@12d20000"; + spi1 = "/spi@12d30000"; + spi2 = "/spi@12d40000"; + spi3 = "/spi@131a0000"; + spi4 = "/spi@131b0000"; + mmc0 = "/mmc@12200000"; + mmc1 = "/mmc@12210000"; + mmc2 = "/mmc@12220000"; + xhci0 = "/xhci@12000000"; + xhci1 = "/xhci@12400000"; + serial0 = "/serial@12C30000"; + console = "/serial@12C30000"; + }; + + tmu@10060000 { + samsung,min-temp = <25>; + samsung,max-temp = <125>; + samsung,start-warning = <95>; + samsung,start-tripping = <105>; + samsung,hw-tripping = <110>; + samsung,efuse-min-value = <40>; + samsung,efuse-value = <55>; + samsung,efuse-max-value = <100>; + samsung,slope = <274761730>; + samsung,dc-value = <25>; + }; + + /* s2mps11 is on i2c bus 4 */ + i2c@12ca0000 { + #address-cells = <1>; + #size-cells = <0>; + pmic@66 { + reg = <0x66>; + compatible = "samsung,s2mps11-pmic"; + }; + }; + + spi@12d20000 { /* spi0 */ + spi-max-frequency = <50000000>; + firmware_storage_spi: flash@0 { + reg = <0>; + }; + }; + + fimd@14400000 { + samsung,vl-freq = <60>; + samsung,vl-col = <2560>; + samsung,vl-row = <1600>; + samsung,vl-width = <2560>; + samsung,vl-height = <1600>; + + samsung,vl-clkp; + samsung,vl-dp; + samsung,vl-bpix = <4>; + + samsung,vl-hspw = <32>; + samsung,vl-hbpd = <80>; + samsung,vl-hfpd = <48>; + samsung,vl-vspw = <6>; + samsung,vl-vbpd = <37>; + samsung,vl-vfpd = <3>; + samsung,vl-cmd-allow-len = <0xf>; + + samsung,winid = <3>; + samsung,interface-mode = <1>; + samsung,dp-enabled = <1>; + samsung,dual-lcd-enabled = <0>; + }; + + sound@3830000 { + samsung,codec-type = "wm8994"; + }; + + i2c@12c70000 { + soundcodec@1a { + reg = <0x1a>; + compatible = "wolfson,wm8994-codec"; + }; + }; + + mmc@12200000 { + samsung,bus-width = <8>; + samsung,timing = <1 3 3>; + samsung,removable = <0>; + samsung,pre-init; + }; + + mmc@12210000 { + status = "disabled"; + }; + + mmc@12220000 { + samsung,bus-width = <4>; + samsung,timing = <1 2 3>; + samsung,removable = <1>; + }; + + mmc@12230000 { + status = "disabled"; + }; + + fimd@14400000 { + /* sysmmu is not used in U-Boot */ + samsung,disable-sysmmu; + }; + + dp@145b0000 { + samsung,lt-status = <0>; + + samsung,master-mode = <0>; + samsung,bist-mode = <0>; + samsung,bist-pattern = <0>; + samsung,h-sync-polarity = <0>; + samsung,v-sync-polarity = <0>; + samsung,interlaced = <0>; + samsung,color-space = <0>; + samsung,dynamic-range = <0>; + samsung,ycbcr-coeff = <0>; + samsung,color-depth = <1>; + }; + + dmc { + mem-type = "ddr3"; + }; + + xhci1: xhci@12400000 { + compatible = "samsung,exynos5250-xhci"; + reg = <0x12400000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; + + phy { + compatible = "samsung,exynos5250-usb3-phy"; + reg = <0x12500000 0x100>; + }; + }; +}; diff --git a/arch/arm/dts/tegra114-dalmore.dts b/arch/arm/dts/tegra114-dalmore.dts new file mode 100644 index 0000000000..435c01e9f6 --- /dev/null +++ b/arch/arm/dts/tegra114-dalmore.dts @@ -0,0 +1,71 @@ +/dts-v1/; + +#include "tegra114.dtsi" + +/ { + model = "NVIDIA Dalmore"; + compatible = "nvidia,dalmore", "nvidia,tegra114"; + + aliases { + i2c0 = "/i2c@7000d000"; + i2c1 = "/i2c@7000c000"; + i2c2 = "/i2c@7000c400"; + i2c3 = "/i2c@7000c500"; + i2c4 = "/i2c@7000c700"; + sdhci0 = "/sdhci@78000600"; + sdhci1 = "/sdhci@78000400"; + usb0 = "/usb@7d008000"; + }; + + memory { + device_type = "memory"; + reg = <0x80000000 0x80000000>; + }; + + i2c@7000c000 { + status = "okay"; + clock-frequency = <100000>; + }; + + i2c@7000c400 { + status = "okay"; + clock-frequency = <100000>; + }; + + i2c@7000c500 { + status = "okay"; + clock-frequency = <100000>; + }; + + i2c@7000c700 { + status = "okay"; + clock-frequency = <100000>; + }; + + i2c@7000d000 { + status = "okay"; + clock-frequency = <400000>; + }; + + spi@7000da00 { + status = "okay"; + spi-max-frequency = <25000000>; + }; + + sdhci@78000400 { + cd-gpios = <&gpio 170 1>; /* gpio PV2 */ + bus-width = <4>; + status = "okay"; + }; + + sdhci@78000600 { + bus-width = <8>; + status = "okay"; + }; + + usb@7d008000 { + /* SPDIF_IN: USB_VBUS_EN1 */ + nvidia,vbus-gpio = <&gpio 86 0>; + status = "okay"; + }; +}; diff --git a/arch/arm/dts/tegra20-colibri_t20_iris.dts b/arch/arm/dts/tegra20-colibri_t20_iris.dts new file mode 100644 index 0000000000..c0e54af886 --- /dev/null +++ b/arch/arm/dts/tegra20-colibri_t20_iris.dts @@ -0,0 +1,45 @@ +/dts-v1/; + +#include "tegra20.dtsi" + +/ { + model = "Toradex Colibri T20"; + compatible = "toradex,t20", "nvidia,tegra20"; + + aliases { + usb0 = "/usb@c5008000"; + usb1 = "/usb@c5000000"; + usb2 = "/usb@c5004000"; + sdhci0 = "/sdhci@c8000600"; + }; + + usb@c5000000 { + dr_mode = "otg"; + }; + + usb@c5004000 { + nvidia,phy-reset-gpio = <&gpio 169 0>; /* PV1 */ + nvidia,vbus-gpio = <&gpio 217 0>; /* PBB1 */ + }; + + usb@c5008000 { + nvidia,vbus-gpio = <&gpio 178 1>; /* PW2 low-active */ + }; + + nand-controller@70008000 { + nvidia,wp-gpios = <&gpio 144 0>; /* PS0 */ + nvidia,width = <8>; + nvidia,timing = <15 100 25 80 25 10 15 10 100>; + + nand@0 { + reg = <0>; + compatible = "nand-flash"; + }; + }; + + sdhci@c8000600 { + status = "okay"; + cd-gpios = <&gpio 23 1>; /* gpio PC7 */ + bus-width = <4>; + }; +}; diff --git a/arch/arm/dts/tegra20-harmony.dts b/arch/arm/dts/tegra20-harmony.dts new file mode 100644 index 0000000000..b115f87821 --- /dev/null +++ b/arch/arm/dts/tegra20-harmony.dts @@ -0,0 +1,105 @@ +/dts-v1/; + +#include "tegra20.dtsi" + +/ { + model = "NVIDIA Tegra20 Harmony evaluation board"; + compatible = "nvidia,harmony", "nvidia,tegra20"; + + aliases { + usb0 = "/usb@c5008000"; + usb1 = "/usb@c5004000"; + sdhci0 = "/sdhci@c8000600"; + sdhci1 = "/sdhci@c8000200"; + }; + + memory { + reg = <0x00000000 0x40000000>; + }; + + host1x { + status = "okay"; + dc@54200000 { + status = "okay"; + rgb { + status = "okay"; + nvidia,panel = <&lcd_panel>; + }; + }; + }; + + serial@70006300 { + clock-frequency = < 216000000 >; + }; + + nand-controller@70008000 { + nvidia,wp-gpios = <&gpio 23 0>; /* PC7 */ + nvidia,width = <8>; + nvidia,timing = <26 100 20 80 20 10 12 10 70>; + nand@0 { + reg = <0>; + compatible = "hynix,hy27uf4g2b", "nand-flash"; + }; + }; + + i2c@7000c000 { + status = "disabled"; + }; + + i2c@7000c400 { + status = "disabled"; + }; + + i2c@7000c500 { + status = "disabled"; + }; + + i2c@7000d000 { + status = "disabled"; + }; + + usb@c5000000 { + status = "disabled"; + }; + + usb@c5004000 { + nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */ + }; + + sdhci@c8000200 { + status = "okay"; + cd-gpios = <&gpio 69 1>; /* gpio PI5 */ + wp-gpios = <&gpio 57 0>; /* gpio PH1 */ + power-gpios = <&gpio 155 0>; /* gpio PT3 */ + bus-width = <4>; + }; + + sdhci@c8000600 { + status = "okay"; + cd-gpios = <&gpio 58 1>; /* gpio PH2 */ + wp-gpios = <&gpio 59 0>; /* gpio PH3 */ + power-gpios = <&gpio 70 0>; /* gpio PI6 */ + bus-width = <8>; + }; + + lcd_panel: panel { + clock = <42430000>; + xres = <1024>; + yres = <600>; + left-margin = <138>; + right-margin = <34>; + hsync-len = <136>; + lower-margin = <4>; + upper-margin = <21>; + vsync-len = <4>; + hsync-active-high; + vsyncx-active-high; + nvidia,bits-per-pixel = <16>; + nvidia,pwm = <&pwm 0 0>; + nvidia,backlight-enable-gpios = <&gpio 13 0>; /* PB5 */ + nvidia,lvds-shutdown-gpios = <&gpio 10 0>; /* PB2 */ + nvidia,backlight-vdd-gpios = <&gpio 176 0>; /* PW0 */ + nvidia,panel-vdd-gpios = <&gpio 22 0>; /* PC6 */ + nvidia,panel-timings = <0 0 200 0 0>; + }; +}; diff --git a/arch/arm/dts/tegra20-medcom-wide.dts b/arch/arm/dts/tegra20-medcom-wide.dts new file mode 100644 index 0000000000..a9a07f9bcd --- /dev/null +++ b/arch/arm/dts/tegra20-medcom-wide.dts @@ -0,0 +1,77 @@ +/dts-v1/; + +#include "tegra20-tamonten.dtsi" + +/ { + model = "Avionic Design Medcom-Wide"; + compatible = "ad,medcom-wide", "nvidia,tegra20"; + + aliases { + usb0 = "/usb@c5008000"; + sdhci0 = "/sdhci@c8000600"; + }; + + memory { + reg = <0x00000000 0x20000000>; + }; + + host1x { + status = "okay"; + + dc@54200000 { + status = "okay"; + + rgb { + nvidia,panel = <&lcd_panel>; + status = "okay"; + }; + }; + }; + + serial@70006300 { + clock-frequency = <216000000>; + }; + + i2c@7000c000 { + status = "disabled"; + }; + + i2c@7000c400 { + status = "disabled"; + }; + + i2c@7000c500 { + status = "disabled"; + }; + + i2c@7000d000 { + status = "disabled"; + }; + + usb@c5000000 { + status = "disabled"; + }; + + usb@c5004000 { + status = "disabled"; + }; + + lcd_panel: panel { + clock = <61715000>; + xres = <1366>; + yres = <768>; + left-margin = <2>; + right-margin = <47>; + hsync-len = <136>; + lower-margin = <21>; + upper-margin = <11>; + vsync-len = <4>; + + nvidia,bits-per-pixel = <16>; + nvidia,pwm = <&pwm 0 500000>; + nvidia,backlight-enable-gpios = <&gpio 13 0>; /* PB5 */ + nvidia,backlight-vdd-gpios = <&gpio 176 0>; /* PW0 */ + nvidia,lvds-shutdown-gpios = <&gpio 10 0>; /* PB2 */ + nvidia,panel-timings = <0 0 0 0>; + }; +}; diff --git a/arch/arm/dts/tegra20-paz00.dts b/arch/arm/dts/tegra20-paz00.dts new file mode 100644 index 0000000000..780203cfb3 --- /dev/null +++ b/arch/arm/dts/tegra20-paz00.dts @@ -0,0 +1,91 @@ +/dts-v1/; + +#include "tegra20.dtsi" + +/ { + model = "Toshiba AC100 / Dynabook AZ"; + compatible = "compal,paz00", "nvidia,tegra20"; + + aliases { + usb0 = "/usb@c5008000"; + sdhci0 = "/sdhci@c8000600"; + sdhci1 = "/sdhci@c8000000"; + }; + + memory { + reg = <0x00000000 0x20000000>; + }; + + host1x { + status = "okay"; + dc@54200000 { + status = "okay"; + rgb { + status = "okay"; + nvidia,panel = <&lcd_panel>; + }; + }; + }; + + serial@70006000 { + clock-frequency = < 216000000 >; + }; + + i2c@7000c000 { + status = "disabled"; + }; + + i2c@7000c400 { + status = "disabled"; + }; + + i2c@7000c500 { + status = "disabled"; + }; + + i2c@7000d000 { + status = "disabled"; + }; + + usb@c5000000 { + status = "disabled"; + }; + + usb@c5004000 { + status = "disabled"; + }; + + sdhci@c8000000 { + status = "okay"; + cd-gpios = <&gpio 173 1>; /* gpio PV5 */ + wp-gpios = <&gpio 57 0>; /* gpio PH1 */ + power-gpios = <&gpio 169 0>; /* gpio PV1 */ + bus-width = <4>; + }; + + sdhci@c8000600 { + status = "okay"; + bus-width = <8>; + }; + + lcd_panel: panel { + /* PAZ00 has 1024x600 */ + clock = <54030000>; + xres = <1024>; + yres = <600>; + right-margin = <160>; + left-margin = <24>; + hsync-len = <136>; + upper-margin = <3>; + lower-margin = <61>; + vsync-len = <6>; + hsync-active-high; + nvidia,bits-per-pixel = <16>; + nvidia,pwm = <&pwm 0 0>; + nvidia,backlight-enable-gpios = <&gpio 164 0>; /* PU4 */ + nvidia,lvds-shutdown-gpios = <&gpio 102 0>; /* PM6 */ + nvidia,backlight-vdd-gpios = <&gpio 176 0>; /* PW0 */ + nvidia,panel-vdd-gpios = <&gpio 4 0>; /* PA4 */ + nvidia,panel-timings = <400 4 203 17 15>; + }; +}; diff --git a/arch/arm/dts/tegra20-plutux.dts b/arch/arm/dts/tegra20-plutux.dts new file mode 100644 index 0000000000..20016f29bb --- /dev/null +++ b/arch/arm/dts/tegra20-plutux.dts @@ -0,0 +1,45 @@ +/dts-v1/; + +#include "tegra20-tamonten.dtsi" + +/ { + model = "Avionic Design Plutux"; + compatible = "ad,plutux", "nvidia,tegra20"; + + aliases { + usb0 = "/usb@c5008000"; + sdhci0 = "/sdhci@c8000600"; + }; + + memory { + reg = <0x00000000 0x20000000>; + }; + + serial@70006300 { + clock-frequency = <216000000>; + }; + + i2c@7000c000 { + status = "disabled"; + }; + + i2c@7000c400 { + status = "disabled"; + }; + + i2c@7000c500 { + status = "disabled"; + }; + + i2c@7000d000 { + status = "disabled"; + }; + + usb@c5000000 { + status = "disabled"; + }; + + usb@c5004000 { + status = "disabled"; + }; +}; diff --git a/arch/arm/dts/tegra20-seaboard.dts b/arch/arm/dts/tegra20-seaboard.dts new file mode 100644 index 0000000000..c0e2e1e5fd --- /dev/null +++ b/arch/arm/dts/tegra20-seaboard.dts @@ -0,0 +1,191 @@ +/dts-v1/; + +#include "tegra20.dtsi" + +/ { + model = "NVIDIA Seaboard"; + compatible = "nvidia,seaboard", "nvidia,tegra20"; + + chosen { + bootargs = "vmalloc=192M video=tegrafb console=ttyS0,115200n8 root=/dev/mmcblk1p3 rw rootwait"; + }; + + aliases { + /* This defines the order of our ports */ + usb0 = "/usb@c5008000"; + usb1 = "/usb@c5000000"; + i2c0 = "/i2c@7000d000"; + i2c1 = "/i2c@7000c000"; + i2c2 = "/i2c@7000c400"; + i2c3 = "/i2c@7000c500"; + sdhci0 = "/sdhci@c8000600"; + sdhci1 = "/sdhci@c8000400"; + }; + + memory { + device_type = "memory"; + reg = < 0x00000000 0x40000000 >; + }; + + host1x { + status = "okay"; + dc@54200000 { + status = "okay"; + rgb { + status = "okay"; + nvidia,panel = <&lcd_panel>; + }; + }; + }; + + /* This is not used in U-Boot, but is expected to be in kernel .dts */ + i2c@7000d000 { + clock-frequency = <100000>; + pmic@34 { + compatible = "ti,tps6586x"; + reg = <0x34>; + + clk_32k: clock { + compatible = "fixed-clock"; + /* + * leave out for now due to CPP: + * #clock-cells = <0>; + */ + clock-frequency = <32768>; + }; + }; + }; + + serial@70006300 { + clock-frequency = < 216000000 >; + }; + + nand-controller@70008000 { + nvidia,wp-gpios = <&gpio 59 0>; /* PH3 */ + nvidia,width = <8>; + nvidia,timing = <26 100 20 80 20 10 12 10 70>; + nand@0 { + reg = <0>; + compatible = "hynix,hy27uf4g2b", "nand-flash"; + }; + }; + + i2c@7000c000 { + clock-frequency = <100000>; + }; + + i2c@7000c400 { + status = "disabled"; + }; + + i2c@7000c500 { + clock-frequency = <100000>; + }; + + kbc@7000e200 { + linux,keymap = <0x00020011 0x0003001f 0x0004001e 0x0005002c + 0x000701d0 0x0107007d 0x02060064 0x02070038 0x03000006 + 0x03010005 0x03020013 0x03030012 0x03040021 0x03050020 + 0x0306002d 0x04000008 0x04010007 0x04020014 0x04030023 + 0x04040022 0x0405002f 0x0406002e 0x04070039 0x0500000a + 0x05010009 0x05020016 0x05030015 0x05040024 0x05050031 + 0x05060030 0x0507002b 0x0600000c 0x0601000b 0x06020018 + 0x06030017 0x06040026 0x06050025 0x06060033 0x06070032 + 0x0701000d 0x0702001b 0x0703001c 0x0707008b 0x08040036 + 0x0805002a 0x09050061 0x0907001d 0x0b00001a 0x0b010019 + 0x0b020028 0x0b030027 0x0b040035 0x0b050034 0x0c000044 + 0x0c010043 0x0c02000e 0x0c030004 0x0c040003 0x0c050067 + 0x0c0600d2 0x0c070077 0x0d00006e 0x0d01006f 0x0d030068 + 0x0d04006d 0x0d05006a 0x0d06006c 0x0d070069 0x0e000057 + 0x0e010058 0x0e020042 0x0e030010 0x0e04003e 0x0e05003d + 0x0e060002 0x0e070041 0x0f000001 0x0f010029 0x0f02003f + 0x0f03000f 0x0f04003b 0x0f05003c 0x0f06003a 0x0f070040 + 0x14000047 0x15000049 0x15010048 0x1502004b 0x1504004f + 0x16010062 0x1602004d 0x1603004c 0x16040051 0x16050050 + 0x16070052 0x1b010037 0x1b03004a 0x1b04004e 0x1b050053 + 0x1c050073 0x1d030066 0x1d04006b 0x1d0500e0 0x1d060072 + 0x1d0700e1 0x1e000045 0x1e010046 0x1e020071 + 0x1f04008a>; + linux,fn-keymap = <0x05040002>; + }; + + emc@7000f400 { + emc-table@190000 { + reg = < 190000 >; + compatible = "nvidia,tegra20-emc-table"; + clock-frequency = < 190000 >; + nvidia,emc-registers = < 0x0000000c 0x00000026 + 0x00000009 0x00000003 0x00000004 0x00000004 + 0x00000002 0x0000000c 0x00000003 0x00000003 + 0x00000002 0x00000001 0x00000004 0x00000005 + 0x00000004 0x00000009 0x0000000d 0x0000059f + 0x00000000 0x00000003 0x00000003 0x00000003 + 0x00000003 0x00000001 0x0000000b 0x000000c8 + 0x00000003 0x00000007 0x00000004 0x0000000f + 0x00000002 0x00000000 0x00000000 0x00000002 + 0x00000000 0x00000000 0x00000083 0xa06204ae + 0x007dc010 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 >; + }; + emc-table@380000 { + reg = < 380000 >; + compatible = "nvidia,tegra20-emc-table"; + clock-frequency = < 380000 >; + nvidia,emc-registers = < 0x00000017 0x0000004b + 0x00000012 0x00000006 0x00000004 0x00000005 + 0x00000003 0x0000000c 0x00000006 0x00000006 + 0x00000003 0x00000001 0x00000004 0x00000005 + 0x00000004 0x00000009 0x0000000d 0x00000b5f + 0x00000000 0x00000003 0x00000003 0x00000006 + 0x00000006 0x00000001 0x00000011 0x000000c8 + 0x00000003 0x0000000e 0x00000007 0x0000000f + 0x00000002 0x00000000 0x00000000 0x00000002 + 0x00000000 0x00000000 0x00000083 0xe044048b + 0x007d8010 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 >; + }; + }; + + usb@c5000000 { + nvidia,vbus-gpio = <&gpio 24 0>; /* PD0 */ + dr_mode = "otg"; + }; + + usb@c5004000 { + status = "disabled"; + }; + + sdhci@c8000400 { + status = "okay"; + cd-gpios = <&gpio 69 1>; /* gpio PI5 */ + wp-gpios = <&gpio 57 0>; /* gpio PH1 */ + power-gpios = <&gpio 70 0>; /* gpio PI6 */ + bus-width = <4>; + }; + + sdhci@c8000600 { + status = "okay"; + bus-width = <8>; + }; + + lcd_panel: panel { + /* Seaboard has 1366x768 */ + clock = <70600000>; + xres = <1366>; + yres = <768>; + left-margin = <58>; + right-margin = <58>; + hsync-len = <58>; + lower-margin = <4>; + upper-margin = <4>; + vsync-len = <4>; + hsync-active-high; + nvidia,bits-per-pixel = <16>; + nvidia,pwm = <&pwm 2 0>; + nvidia,backlight-enable-gpios = <&gpio 28 0>; /* PD4 */ + nvidia,lvds-shutdown-gpios = <&gpio 10 0>; /* PB2 */ + nvidia,backlight-vdd-gpios = <&gpio 176 0>; /* PW0 */ + nvidia,panel-vdd-gpios = <&gpio 22 0>; /* PC6 */ + nvidia,panel-timings = <400 4 203 17 15>; + }; +}; diff --git a/arch/arm/dts/tegra20-tamonten.dtsi b/arch/arm/dts/tegra20-tamonten.dtsi new file mode 100644 index 0000000000..f379622c94 --- /dev/null +++ b/arch/arm/dts/tegra20-tamonten.dtsi @@ -0,0 +1,500 @@ +#include "tegra20.dtsi" + +/ { + model = "Avionic Design Tamonten SOM"; + compatible = "ad,tamonten", "nvidia,tegra20"; + + memory { + reg = <0x00000000 0x20000000>; + }; + + host1x { + hdmi { + vdd-supply = <&hdmi_vdd_reg>; + pll-supply = <&hdmi_pll_reg>; + + nvidia,ddc-i2c-bus = <&hdmi_ddc>; + nvidia,hpd-gpio = <&gpio 111 0>; /* PN7 */ + }; + }; + + pinmux { + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: pinmux { + ata { + nvidia,pins = "ata"; + nvidia,function = "ide"; + }; + atb { + nvidia,pins = "atb", "gma", "gme"; + nvidia,function = "sdio4"; + }; + atc { + nvidia,pins = "atc"; + nvidia,function = "nand"; + }; + atd { + nvidia,pins = "atd", "ate", "gmb", "gmd", "gpu", + "spia", "spib", "spic"; + nvidia,function = "gmi"; + }; + cdev1 { + nvidia,pins = "cdev1"; + nvidia,function = "plla_out"; + }; + cdev2 { + nvidia,pins = "cdev2"; + nvidia,function = "pllp_out4"; + }; + crtp { + nvidia,pins = "crtp"; + nvidia,function = "crt"; + }; + csus { + nvidia,pins = "csus"; + nvidia,function = "vi_sensor_clk"; + }; + dap1 { + nvidia,pins = "dap1"; + nvidia,function = "dap1"; + }; + dap2 { + nvidia,pins = "dap2"; + nvidia,function = "dap2"; + }; + dap3 { + nvidia,pins = "dap3"; + nvidia,function = "dap3"; + }; + dap4 { + nvidia,pins = "dap4"; + nvidia,function = "dap4"; + }; + dta { + nvidia,pins = "dta", "dtd"; + nvidia,function = "sdio2"; + }; + dtb { + nvidia,pins = "dtb", "dtc", "dte"; + nvidia,function = "rsvd1"; + }; + dtf { + nvidia,pins = "dtf"; + nvidia,function = "i2c3"; + }; + gmc { + nvidia,pins = "gmc"; + nvidia,function = "uartd"; + }; + gpu7 { + nvidia,pins = "gpu7"; + nvidia,function = "rtck"; + }; + gpv { + nvidia,pins = "gpv", "slxa", "slxk"; + nvidia,function = "pcie"; + }; + hdint { + nvidia,pins = "hdint"; + nvidia,function = "hdmi"; + }; + i2cp { + nvidia,pins = "i2cp"; + nvidia,function = "i2cp"; + }; + irrx { + nvidia,pins = "irrx", "irtx"; + nvidia,function = "uarta"; + }; + kbca { + nvidia,pins = "kbca", "kbcb", "kbcc", "kbcd", + "kbce", "kbcf"; + nvidia,function = "kbc"; + }; + lcsn { + nvidia,pins = "lcsn", "ld0", "ld1", "ld2", + "ld3", "ld4", "ld5", "ld6", "ld7", + "ld8", "ld9", "ld10", "ld11", "ld12", + "ld13", "ld14", "ld15", "ld16", "ld17", + "ldc", "ldi", "lhp0", "lhp1", "lhp2", + "lhs", "lm0", "lm1", "lpp", "lpw0", + "lpw1", "lpw2", "lsc0", "lsc1", "lsck", + "lsda", "lsdi", "lspi", "lvp0", "lvp1", + "lvs"; + nvidia,function = "displaya"; + }; + owc { + nvidia,pins = "owc", "spdi", "spdo", "uac"; + nvidia,function = "rsvd2"; + }; + pmc { + nvidia,pins = "pmc"; + nvidia,function = "pwr_on"; + }; + rm { + nvidia,pins = "rm"; + nvidia,function = "i2c1"; + }; + sdb { + nvidia,pins = "sdb", "sdc", "sdd"; + nvidia,function = "pwm"; + }; + sdio1 { + nvidia,pins = "sdio1"; + nvidia,function = "sdio1"; + }; + slxc { + nvidia,pins = "slxc", "slxd"; + nvidia,function = "spdif"; + }; + spid { + nvidia,pins = "spid", "spie", "spif"; + nvidia,function = "spi1"; + }; + spig { + nvidia,pins = "spig", "spih"; + nvidia,function = "spi2_alt"; + }; + uaa { + nvidia,pins = "uaa", "uab", "uda"; + nvidia,function = "ulpi"; + }; + uad { + nvidia,pins = "uad"; + nvidia,function = "irda"; + }; + uca { + nvidia,pins = "uca", "ucb"; + nvidia,function = "uartc"; + }; + conf_ata { + nvidia,pins = "ata", "atb", "atc", "atd", "ate", + "cdev1", "cdev2", "dap1", "dtb", "gma", + "gmb", "gmc", "gmd", "gme", "gpu7", + "gpv", "i2cp", "pta", "rm", "slxa", + "slxk", "spia", "spib", "uac"; + nvidia,pull = <0>; + nvidia,tristate = <0>; + }; + conf_ck32 { + nvidia,pins = "ck32", "ddrc", "pmca", "pmcb", + "pmcc", "pmcd", "pmce", "xm2c", "xm2d"; + nvidia,pull = <0>; + }; + conf_csus { + nvidia,pins = "csus", "spid", "spif"; + nvidia,pull = <1>; + nvidia,tristate = <1>; + }; + conf_crtp { + nvidia,pins = "crtp", "dap2", "dap3", "dap4", + "dtc", "dte", "dtf", "gpu", "sdio1", + "slxc", "slxd", "spdi", "spdo", "spig", + "uda"; + nvidia,pull = <0>; + nvidia,tristate = <1>; + }; + conf_ddc { + nvidia,pins = "ddc", "dta", "dtd", "kbca", + "kbcb", "kbcc", "kbcd", "kbce", "kbcf", + "sdc"; + nvidia,pull = <2>; + nvidia,tristate = <0>; + }; + conf_hdint { + nvidia,pins = "hdint", "lcsn", "ldc", "lm1", + "lpw1", "lsc1", "lsck", "lsda", "lsdi", + "lvp0", "owc", "sdb"; + nvidia,tristate = <1>; + }; + conf_irrx { + nvidia,pins = "irrx", "irtx", "sdd", "spic", + "spie", "spih", "uaa", "uab", "uad", + "uca", "ucb"; + nvidia,pull = <2>; + nvidia,tristate = <1>; + }; + conf_lc { + nvidia,pins = "lc", "ls"; + nvidia,pull = <2>; + }; + conf_ld0 { + nvidia,pins = "ld0", "ld1", "ld2", "ld3", "ld4", + "ld5", "ld6", "ld7", "ld8", "ld9", + "ld10", "ld11", "ld12", "ld13", "ld14", + "ld15", "ld16", "ld17", "ldi", "lhp0", + "lhp1", "lhp2", "lhs", "lm0", "lpp", + "lpw0", "lpw2", "lsc0", "lspi", "lvp1", + "lvs", "pmc"; + nvidia,tristate = <0>; + }; + conf_ld17_0 { + nvidia,pins = "ld17_0", "ld19_18", "ld21_20", + "ld23_22"; + nvidia,pull = <1>; + }; + }; + + state_i2cmux_ddc: pinmux_i2cmux_ddc { + ddc { + nvidia,pins = "ddc"; + nvidia,function = "i2c2"; + }; + pta { + nvidia,pins = "pta"; + nvidia,function = "rsvd4"; + }; + }; + + state_i2cmux_pta: pinmux_i2cmux_pta { + ddc { + nvidia,pins = "ddc"; + nvidia,function = "rsvd4"; + }; + pta { + nvidia,pins = "pta"; + nvidia,function = "i2c2"; + }; + }; + + state_i2cmux_idle: pinmux_i2cmux_idle { + ddc { + nvidia,pins = "ddc"; + nvidia,function = "rsvd4"; + }; + pta { + nvidia,pins = "pta"; + nvidia,function = "rsvd4"; + }; + }; + }; + + i2s@70002800 { + status = "okay"; + }; + + serial@70006300 { + status = "okay"; + }; + + nand-controller@70008000 { + nvidia,wp-gpios = <&gpio 23 0>; /* PC7 */ + nvidia,width = <8>; + nvidia,timing = <26 100 20 80 20 10 12 10 70>; + + nand@0 { + reg = <0>; + compatible = "hynix,hy27uf4g2b", "nand-flash"; + }; + }; + + i2c@7000c000 { + clock-frequency = <400000>; + status = "okay"; + }; + + i2c@7000c400 { + clock-frequency = <100000>; + status = "okay"; + }; + + i2cmux { + compatible = "i2c-mux-pinctrl"; + #address-cells = <1>; + #size-cells = <0>; + + i2c-parent = <&{/i2c@7000c400}>; + + pinctrl-names = "ddc", "pta", "idle"; + pinctrl-0 = <&state_i2cmux_ddc>; + pinctrl-1 = <&state_i2cmux_pta>; + pinctrl-2 = <&state_i2cmux_idle>; + + hdmi_ddc: i2c@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + }; + }; + + i2c@7000d000 { + clock-frequency = <400000>; + status = "okay"; + + pmic: tps6586x@34 { + compatible = "ti,tps6586x"; + reg = <0x34>; + interrupts = <0 86 0x4>; + + ti,system-power-controller; + + #gpio-cells = <2>; + gpio-controller; + + sys-supply = <&vdd_5v0_reg>; + vin-sm0-supply = <&sys_reg>; + vin-sm1-supply = <&sys_reg>; + vin-sm2-supply = <&sys_reg>; + vinldo01-supply = <&sm2_reg>; + vinldo23-supply = <&sm2_reg>; + vinldo4-supply = <&sm2_reg>; + vinldo678-supply = <&sm2_reg>; + vinldo9-supply = <&sm2_reg>; + + regulators { + sys_reg: sys { + regulator-name = "vdd_sys"; + regulator-always-on; + }; + + sm0 { + regulator-name = "vdd_sys_sm0,vdd_core"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + }; + + sm1 { + regulator-name = "vdd_sys_sm1,vdd_cpu"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + }; + + sm2_reg: sm2 { + regulator-name = "vdd_sys_sm2,vin_ldo*"; + regulator-min-microvolt = <3700000>; + regulator-max-microvolt = <3700000>; + regulator-always-on; + }; + + ldo0 { + regulator-name = "vdd_ldo0,vddio_pex_clk"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + ldo1 { + regulator-name = "vdd_ldo1,avdd_pll*"; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + regulator-always-on; + }; + + ldo2 { + regulator-name = "vdd_ldo2,vdd_rtc"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + ldo3 { + regulator-name = "vdd_ldo3,avdd_usb*"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + ldo4 { + regulator-name = "vdd_ldo4,avdd_osc,vddio_sys"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + + ldo5 { + regulator-name = "vdd_ldo5,vcore_mmc"; + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; + + ldo6 { + regulator-name = "vdd_ldo6,avdd_vdac"; + /* + * According to the Tegra 2 Automotive + * DataSheet, a typical value for this + * would be 2.8V, but the PMIC only + * supports 2.85V. + */ + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; + + hdmi_vdd_reg: ldo7 { + regulator-name = "vdd_ldo7,avdd_hdmi"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + hdmi_pll_reg: ldo8 { + regulator-name = "vdd_ldo8,avdd_hdmi_pll"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + ldo9 { + regulator-name = "vdd_ldo9,vdd_ddr_rx,avdd_cam"; + /* + * According to the Tegra 2 Automotive + * DataSheet, a typical value for this + * would be 2.8V, but the PMIC only + * supports 2.85V. + */ + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + regulator-always-on; + }; + + ldo_rtc { + regulator-name = "vdd_rtc_out"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + }; + }; + + temperature-sensor@4c { + compatible = "onnn,nct1008"; + reg = <0x4c>; + }; + }; + + pmc { + nvidia,invert-interrupt; + }; + + usb@c5008000 { + status = "okay"; + }; + + sdhci@c8000600 { + cd-gpios = <&gpio 58 1>; /* gpio PH2 */ + wp-gpios = <&gpio 59 0>; /* gpio PH3 */ + bus-width = <4>; + status = "okay"; + }; + + regulators { + compatible = "simple-bus"; + + #address-cells = <1>; + #size-cells = <0>; + + vdd_5v0_reg: regulator@0 { + compatible = "regulator-fixed"; + reg = <0>; + regulator-name = "vdd_5v0"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + }; +}; diff --git a/arch/arm/dts/tegra20-tec.dts b/arch/arm/dts/tegra20-tec.dts new file mode 100644 index 0000000000..4c1b08d768 --- /dev/null +++ b/arch/arm/dts/tegra20-tec.dts @@ -0,0 +1,77 @@ +/dts-v1/; + +#include "tegra20-tamonten.dtsi" + +/ { + model = "Avionic Design Tamonten Evaluation Carrier"; + compatible = "ad,tec", "nvidia,tegra20"; + + aliases { + usb0 = "/usb@c5008000"; + sdhci0 = "/sdhci@c8000600"; + }; + + memory { + reg = <0x00000000 0x20000000>; + }; + + host1x { + status = "okay"; + + dc@54200000 { + status = "okay"; + + rgb { + nvidia,panel = <&lcd_panel>; + status = "okay"; + }; + }; + }; + + serial@70006300 { + clock-frequency = <216000000>; + }; + + i2c@7000c000 { + status = "disabled"; + }; + + i2c@7000c400 { + status = "disabled"; + }; + + i2c@7000c500 { + status = "disabled"; + }; + + i2c@7000d000 { + status = "disabled"; + }; + + usb@c5000000 { + status = "disabled"; + }; + + usb@c5004000 { + status = "disabled"; + }; + + lcd_panel: panel { + clock = <33260000>; + xres = <800>; + yres = <480>; + left-margin = <120>; + right-margin = <120>; + hsync-len = <16>; + lower-margin = <15>; + upper-margin = <15>; + vsync-len = <15>; + + nvidia,bits-per-pixel = <16>; + nvidia,pwm = <&pwm 0 500000>; + nvidia,backlight-enable-gpios = <&gpio 13 0>; /* PB5 */ + nvidia,backlight-vdd-gpios = <&gpio 176 0>; /* PW0 */ + nvidia,lvds-shutdown-gpios = <&gpio 10 0>; /* PB2 */ + nvidia,panel-timings = <0 0 0 0>; + }; +}; diff --git a/arch/arm/dts/tegra20-trimslice.dts b/arch/arm/dts/tegra20-trimslice.dts new file mode 100644 index 0000000000..ee31476c1e --- /dev/null +++ b/arch/arm/dts/tegra20-trimslice.dts @@ -0,0 +1,64 @@ +/dts-v1/; + +#include "tegra20.dtsi" + +/ { + model = "Compulab TrimSlice board"; + compatible = "compulab,trimslice", "nvidia,tegra20"; + + aliases { + usb0 = "/usb@c5008000"; + usb1 = "/usb@c5000000"; + sdhci0 = "/sdhci@c8000600"; + sdhci1 = "/sdhci@c8000000"; + }; + + memory { + reg = <0x00000000 0x40000000>; + }; + + serial@70006000 { + clock-frequency = <216000000>; + }; + + i2c@7000c000 { + status = "disabled"; + }; + + spi@7000c380 { + status = "okay"; + spi-max-frequency = <25000000>; + }; + + i2c@7000c400 { + status = "disabled"; + }; + + i2c@7000c500 { + status = "disabled"; + }; + + i2c@7000d000 { + status = "disabled"; + }; + + usb@c5000000 { + nvidia,vbus-gpio = <&gpio 170 0>; /* PV2 */ + }; + + usb@c5004000 { + status = "disabled"; + }; + + sdhci@c8000000 { + status = "okay"; + bus-width = <4>; + }; + + sdhci@c8000600 { + status = "okay"; + cd-gpios = <&gpio 121 1>; /* gpio PP1 */ + wp-gpios = <&gpio 122 0>; /* gpio PP2 */ + bus-width = <4>; + }; +}; diff --git a/arch/arm/dts/tegra20-ventana.dts b/arch/arm/dts/tegra20-ventana.dts new file mode 100644 index 0000000000..1a526bab64 --- /dev/null +++ b/arch/arm/dts/tegra20-ventana.dts @@ -0,0 +1,91 @@ +/dts-v1/; + +#include "tegra20.dtsi" + +/ { + model = "NVIDIA Tegra20 Ventana evaluation board"; + compatible = "nvidia,ventana", "nvidia,tegra20"; + + aliases { + usb0 = "/usb@c5008000"; + sdhci0 = "/sdhci@c8000600"; + sdhci1 = "/sdhci@c8000400"; + }; + + memory { + reg = <0x00000000 0x40000000>; + }; + + host1x { + status = "okay"; + dc@54200000 { + status = "okay"; + rgb { + status = "okay"; + nvidia,panel = <&lcd_panel>; + }; + }; + }; + + serial@70006300 { + clock-frequency = < 216000000 >; + }; + + i2c@7000c000 { + status = "disabled"; + }; + + i2c@7000c400 { + status = "disabled"; + }; + + i2c@7000c500 { + status = "disabled"; + }; + + i2c@7000d000 { + status = "disabled"; + }; + + usb@c5000000 { + status = "disabled"; + }; + + usb@c5004000 { + status = "disabled"; + }; + + sdhci@c8000400 { + status = "okay"; + cd-gpios = <&gpio 69 1>; /* gpio PI5 */ + wp-gpios = <&gpio 57 0>; /* gpio PH1 */ + power-gpios = <&gpio 70 0>; /* gpio PI6 */ + bus-width = <4>; + }; + + sdhci@c8000600 { + status = "okay"; + bus-width = <8>; + }; + + lcd_panel: panel { + clock = <72072000>; + xres = <1366>; + yres = <768>; + left-margin = <58>; + right-margin = <58>; + hsync-len = <58>; + lower-margin = <4>; + upper-margin = <4>; + vsync-len = <4>; + hsync-active-high; + vsync-active-high; + nvidia,bits-per-pixel = <16>; + nvidia,pwm = <&pwm 2 0>; + nvidia,backlight-enable-gpios = <&gpio 28 0>; /* PD4 */ + nvidia,lvds-shutdown-gpios = <&gpio 10 0>; /* PB2 */ + nvidia,backlight-vdd-gpios = <&gpio 176 0>; /* PW0 */ + nvidia,panel-vdd-gpios = <&gpio 22 0>; /* PC6 */ + nvidia,panel-timings = <0 0 200 0 0>; + }; +}; diff --git a/arch/arm/dts/tegra20-whistler.dts b/arch/arm/dts/tegra20-whistler.dts new file mode 100644 index 0000000000..eb92264f9d --- /dev/null +++ b/arch/arm/dts/tegra20-whistler.dts @@ -0,0 +1,73 @@ +/dts-v1/; + +#include "tegra20.dtsi" + +/ { + model = "NVIDIA Tegra20 Whistler evaluation board"; + compatible = "nvidia,whistler", "nvidia,tegra20"; + + aliases { + i2c0 = "/i2c@7000d000"; + usb0 = "/usb@c5008000"; + sdhci0 = "/sdhci@c8000600"; + sdhci1 = "/sdhci@c8000400"; + }; + + memory { + device_type = "memory"; + reg = < 0x00000000 0x20000000 >; + }; + + serial@70006000 { + clock-frequency = < 216000000 >; + }; + + i2c@7000c000 { + status = "disabled"; + }; + + i2c@7000c400 { + status = "disabled"; + }; + + i2c@7000c500 { + status = "disabled"; + }; + + i2c@7000d000 { + clock-frequency = <100000>; + + pmic@3c { + compatible = "maxim,max8907b"; + reg = <0x3c>; + + clk_32k: clock { + compatible = "fixed-clock"; + /* + * leave out for now due to CPP: + * #clock-cells = <0>; + */ + clock-frequency = <32768>; + }; + }; + }; + + usb@c5000000 { + status = "disabled"; + }; + + usb@c5004000 { + status = "disabled"; + }; + + sdhci@c8000400 { + status = "okay"; + wp-gpios = <&gpio 173 0>; /* gpio PV5 */ + bus-width = <8>; + }; + + sdhci@c8000600 { + status = "okay"; + bus-width = <8>; + }; +}; diff --git a/arch/arm/dts/tegra30-beaver.dts b/arch/arm/dts/tegra30-beaver.dts new file mode 100644 index 0000000000..a7cc93e93f --- /dev/null +++ b/arch/arm/dts/tegra30-beaver.dts @@ -0,0 +1,77 @@ +/dts-v1/; + +#include "tegra30.dtsi" + +/ { + model = "NVIDIA Beaver"; + compatible = "nvidia,beaver", "nvidia,tegra30"; + + aliases { + i2c0 = "/i2c@7000d000"; + i2c1 = "/i2c@7000c000"; + i2c2 = "/i2c@7000c400"; + i2c3 = "/i2c@7000c500"; + i2c4 = "/i2c@7000c700"; + sdhci0 = "/sdhci@78000600"; + sdhci1 = "/sdhci@78000000"; + usb0 = "/usb@7d008000"; + }; + + memory { + device_type = "memory"; + reg = <0x80000000 0x7ff00000>; + }; + + i2c@7000c000 { + status = "okay"; + clock-frequency = <100000>; + }; + + i2c@7000c400 { + status = "okay"; + clock-frequency = <100000>; + }; + + i2c@7000c500 { + status = "okay"; + clock-frequency = <100000>; + }; + + i2c@7000c700 { + status = "okay"; + clock-frequency = <100000>; + }; + + i2c@7000d000 { + status = "okay"; + clock-frequency = <100000>; + }; + + spi@7000da00 { + status = "okay"; + spi-max-frequency = <25000000>; + spi-flash@1 { + compatible = "winbond,w25q32"; + reg = <1>; + spi-max-frequency = <20000000>; + }; + }; + + sdhci@78000000 { + status = "okay"; + cd-gpios = <&gpio 69 1>; /* gpio PI5 */ + wp-gpios = <&gpio 155 0>; /* gpio PT3 */ + power-gpios = <&gpio 31 0>; /* gpio PD7 */ + bus-width = <4>; + }; + + sdhci@78000600 { + status = "okay"; + bus-width = <8>; + }; + + usb@7d008000 { + nvidia,vbus-gpio = <&gpio 236 0>; /* PDD4 */ + status = "okay"; + }; +}; diff --git a/arch/arm/dts/tegra30-cardhu.dts b/arch/arm/dts/tegra30-cardhu.dts new file mode 100644 index 0000000000..ea2cf76ff3 --- /dev/null +++ b/arch/arm/dts/tegra30-cardhu.dts @@ -0,0 +1,72 @@ +/dts-v1/; + +#include "tegra30.dtsi" + +/ { + model = "NVIDIA Cardhu"; + compatible = "nvidia,cardhu", "nvidia,tegra30"; + + aliases { + i2c0 = "/i2c@7000d000"; + i2c1 = "/i2c@7000c000"; + i2c2 = "/i2c@7000c400"; + i2c3 = "/i2c@7000c500"; + i2c4 = "/i2c@7000c700"; + sdhci0 = "/sdhci@78000600"; + sdhci1 = "/sdhci@78000000"; + usb0 = "/usb@7d008000"; + }; + + memory { + device_type = "memory"; + reg = <0x80000000 0x40000000>; + }; + + i2c@7000c000 { + status = "okay"; + clock-frequency = <100000>; + }; + + i2c@7000c400 { + status = "okay"; + clock-frequency = <100000>; + }; + + i2c@7000c500 { + status = "okay"; + clock-frequency = <100000>; + }; + + i2c@7000c700 { + status = "okay"; + clock-frequency = <100000>; + }; + + i2c@7000d000 { + status = "okay"; + clock-frequency = <100000>; + }; + + spi@7000da00 { + status = "okay"; + spi-max-frequency = <25000000>; + }; + + sdhci@78000000 { + status = "okay"; + cd-gpios = <&gpio 69 1>; /* gpio PI5 */ + wp-gpios = <&gpio 155 0>; /* gpio PT3 */ + power-gpios = <&gpio 31 0>; /* gpio PD7 */ + bus-width = <4>; + }; + + sdhci@78000600 { + status = "okay"; + bus-width = <8>; + }; + + usb@7d008000 { + nvidia,vbus-gpio = <&gpio 236 0>; /* PDD4 */ + status = "okay"; + }; +}; diff --git a/arch/arm/dts/tegra30-tamonten.dtsi b/arch/arm/dts/tegra30-tamonten.dtsi new file mode 100644 index 0000000000..50d5762311 --- /dev/null +++ b/arch/arm/dts/tegra30-tamonten.dtsi @@ -0,0 +1,69 @@ +#include "tegra30.dtsi" + +/ { + model = "Avionic Design Tamonten NG"; + compatible = "ad,tamonten-ng", "nvidia,tegra30"; + + memory { + reg = <0x80000000 0x40000000>; + }; + + aliases { + i2c0 = "/i2c@7000c000"; + i2c1 = "/i2c@7000c700"; + i2c2 = "/i2c@7000c400"; + i2c3 = "/i2c@7000c500"; + i2c4 = "/i2c@7000d000"; + sdhci0 = "/sdhci@78000600"; + sdhci1 = "/sdhci@78000400"; + sdhci2 = "/sdhci@78000000"; + usb0 = "/usb@7d008000"; + }; + + /* GEN1 */ + i2c@7000c000 { + status = "okay"; + clock-frequency = <100000>; + }; + + /* GEN2 */ + i2c@7000c400 { + clock-frequency = <100000>; + }; + + /* CAM */ + i2c@7000c500 { + status = "okay"; + clock-frequency = <100000>; + }; + + /* DDC */ + i2c@7000c700 { + status = "okay"; + clock-frequency = <100000>; + }; + + /* PWR */ + i2c@7000d000 { + status = "okay"; + clock-frequency = <100000>; + }; + + /* SD slot on the base board */ + sdhci@78000400 { + cd-gpios = <&gpio 69 1>; /* gpio PI5 */ + wp-gpios = <&gpio 67 0>; /* gpio PI3 */ + bus-width = <4>; + }; + + /* EMMC on the COM module */ + sdhci@78000600 { + status = "okay"; + bus-width = <8>; + }; + + usb@7d008000 { + status = "okay"; + }; + +}; diff --git a/arch/arm/dts/tegra30-tec-ng.dts b/arch/arm/dts/tegra30-tec-ng.dts new file mode 100644 index 0000000000..8a69e818ca --- /dev/null +++ b/arch/arm/dts/tegra30-tec-ng.dts @@ -0,0 +1,18 @@ +/dts-v1/; + +#include "tegra30-tamonten.dtsi" + +/ { + model = "Avionic Design Tamonten™ NG Evaluation Carrier"; + compatible = "ad,tec-ng", "nvidia,tegra30"; + + /* GEN2 */ + i2c@7000c400 { + status = "okay"; + }; + + /* SD card slot */ + sdhci@78000400 { + status = "okay"; + }; +}; diff --git a/arch/arm/dts/zynq-microzed.dts b/arch/arm/dts/zynq-microzed.dts new file mode 100644 index 0000000000..6da71c116d --- /dev/null +++ b/arch/arm/dts/zynq-microzed.dts @@ -0,0 +1,14 @@ +/* + * Xilinx MicroZED board DTS + * + * Copyright (C) 2013 Xilinx, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ +/dts-v1/; +#include "zynq-7000.dtsi" + +/ { + model = "Zynq MicroZED Board"; + compatible = "xlnx,zynq-microzed", "xlnx,zynq-7000"; +}; diff --git a/arch/arm/dts/zynq-zc702.dts b/arch/arm/dts/zynq-zc702.dts new file mode 100644 index 0000000000..667dc28256 --- /dev/null +++ b/arch/arm/dts/zynq-zc702.dts @@ -0,0 +1,14 @@ +/* + * Xilinx ZC702 board DTS + * + * Copyright (C) 2013 Xilinx, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ +/dts-v1/; +#include "zynq-7000.dtsi" + +/ { + model = "Zynq ZC702 Board"; + compatible = "xlnx,zynq-zc702", "xlnx,zynq-7000"; +}; diff --git a/arch/arm/dts/zynq-zc706.dts b/arch/arm/dts/zynq-zc706.dts new file mode 100644 index 0000000000..526fc8888b --- /dev/null +++ b/arch/arm/dts/zynq-zc706.dts @@ -0,0 +1,14 @@ +/* + * Xilinx ZC706 board DTS + * + * Copyright (C) 2013 Xilinx, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ +/dts-v1/; +#include "zynq-7000.dtsi" + +/ { + model = "Zynq ZC706 Board"; + compatible = "xlnx,zynq-zc706", "xlnx,zynq-7000"; +}; diff --git a/arch/arm/dts/zynq-zc770-xm010.dts b/arch/arm/dts/zynq-zc770-xm010.dts new file mode 100644 index 0000000000..8b542a109b --- /dev/null +++ b/arch/arm/dts/zynq-zc770-xm010.dts @@ -0,0 +1,14 @@ +/* + * Xilinx ZC770 XM010 board DTS + * + * Copyright (C) 2013 Xilinx, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ +/dts-v1/; +#include "zynq-7000.dtsi" + +/ { + model = "Zynq ZC770 XM010 Board"; + compatible = "xlnx,zynq-zc770-xm010", "xlnx,zynq-7000"; +}; diff --git a/arch/arm/dts/zynq-zc770-xm012.dts b/arch/arm/dts/zynq-zc770-xm012.dts new file mode 100644 index 0000000000..0379a07068 --- /dev/null +++ b/arch/arm/dts/zynq-zc770-xm012.dts @@ -0,0 +1,14 @@ +/* + * Xilinx ZC770 XM012 board DTS + * + * Copyright (C) 2013 Xilinx, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ +/dts-v1/; +#include "zynq-7000.dtsi" + +/ { + model = "Zynq ZC770 XM012 Board"; + compatible = "xlnx,zynq-zc770-xm012", "xlnx,zynq-7000"; +}; diff --git a/arch/arm/dts/zynq-zc770-xm013.dts b/arch/arm/dts/zynq-zc770-xm013.dts new file mode 100644 index 0000000000..a4f9e05fc0 --- /dev/null +++ b/arch/arm/dts/zynq-zc770-xm013.dts @@ -0,0 +1,14 @@ +/* + * Xilinx ZC770 XM013 board DTS + * + * Copyright (C) 2013 Xilinx, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ +/dts-v1/; +#include "zynq-7000.dtsi" + +/ { + model = "Zynq ZC770 XM013 Board"; + compatible = "xlnx,zynq-zc770-xm013", "xlnx,zynq-7000"; +}; diff --git a/arch/arm/dts/zynq-zed.dts b/arch/arm/dts/zynq-zed.dts new file mode 100644 index 0000000000..91a5deba4a --- /dev/null +++ b/arch/arm/dts/zynq-zed.dts @@ -0,0 +1,14 @@ +/* + * Xilinx ZED board DTS + * + * Copyright (C) 2013 Xilinx, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ +/dts-v1/; +#include "zynq-7000.dtsi" + +/ { + model = "Zynq ZED Board"; + compatible = "xlnx,zynq-zed", "xlnx,zynq-7000"; +}; diff --git a/arch/microblaze/dts/microblaze-generic.dts b/arch/microblaze/dts/microblaze-generic.dts new file mode 100644 index 0000000000..203330987b --- /dev/null +++ b/arch/microblaze/dts/microblaze-generic.dts @@ -0,0 +1,7 @@ +/dts-v1/; +/ { + #address-cells = <1>; + #size-cells = <1>; + aliases { + } ; +} ; diff --git a/arch/x86/dts/alex.dts b/arch/x86/dts/alex.dts new file mode 100644 index 0000000000..2f13544612 --- /dev/null +++ b/arch/x86/dts/alex.dts @@ -0,0 +1,24 @@ +/dts-v1/; + +/include/ "coreboot.dtsi" + +/ { + #address-cells = <1>; + #size-cells = <1>; + model = "Google Alex"; + compatible = "google,alex", "intel,atom-pineview"; + + config { + silent_console = <0>; + }; + + gpio: gpio {}; + + serial { + reg = <0x3f8 8>; + clock-frequency = <115200>; + }; + + chosen { }; + memory { device_type = "memory"; reg = <0 0>; }; +}; diff --git a/arch/x86/dts/link.dts b/arch/x86/dts/link.dts new file mode 100644 index 0000000000..4a37dac4ea --- /dev/null +++ b/arch/x86/dts/link.dts @@ -0,0 +1,35 @@ +/dts-v1/; + +/include/ "coreboot.dtsi" + +/ { + #address-cells = <1>; + #size-cells = <1>; + model = "Google Link"; + compatible = "google,link", "intel,celeron-ivybridge"; + + config { + silent_console = <0>; + }; + + gpio: gpio {}; + + serial { + reg = <0x3f8 8>; + clock-frequency = <115200>; + }; + + chosen { }; + memory { device_type = "memory"; reg = <0 0>; }; + + spi { + #address-cells = <1>; + #size-cells = <0>; + compatible = "intel,ich9"; + spi-flash@0 { + reg = <0>; + compatible = "winbond,w25q64", "spi-flash"; + memory-map = <0xff800000 0x00800000>; + }; + }; +}; diff --git a/board/avionic-design/dts/tegra20-medcom-wide.dts b/board/avionic-design/dts/tegra20-medcom-wide.dts deleted file mode 100644 index a9a07f9bcd..0000000000 --- a/board/avionic-design/dts/tegra20-medcom-wide.dts +++ /dev/null @@ -1,77 +0,0 @@ -/dts-v1/; - -#include "tegra20-tamonten.dtsi" - -/ { - model = "Avionic Design Medcom-Wide"; - compatible = "ad,medcom-wide", "nvidia,tegra20"; - - aliases { - usb0 = "/usb@c5008000"; - sdhci0 = "/sdhci@c8000600"; - }; - - memory { - reg = <0x00000000 0x20000000>; - }; - - host1x { - status = "okay"; - - dc@54200000 { - status = "okay"; - - rgb { - nvidia,panel = <&lcd_panel>; - status = "okay"; - }; - }; - }; - - serial@70006300 { - clock-frequency = <216000000>; - }; - - i2c@7000c000 { - status = "disabled"; - }; - - i2c@7000c400 { - status = "disabled"; - }; - - i2c@7000c500 { - status = "disabled"; - }; - - i2c@7000d000 { - status = "disabled"; - }; - - usb@c5000000 { - status = "disabled"; - }; - - usb@c5004000 { - status = "disabled"; - }; - - lcd_panel: panel { - clock = <61715000>; - xres = <1366>; - yres = <768>; - left-margin = <2>; - right-margin = <47>; - hsync-len = <136>; - lower-margin = <21>; - upper-margin = <11>; - vsync-len = <4>; - - nvidia,bits-per-pixel = <16>; - nvidia,pwm = <&pwm 0 500000>; - nvidia,backlight-enable-gpios = <&gpio 13 0>; /* PB5 */ - nvidia,backlight-vdd-gpios = <&gpio 176 0>; /* PW0 */ - nvidia,lvds-shutdown-gpios = <&gpio 10 0>; /* PB2 */ - nvidia,panel-timings = <0 0 0 0>; - }; -}; diff --git a/board/avionic-design/dts/tegra20-plutux.dts b/board/avionic-design/dts/tegra20-plutux.dts deleted file mode 100644 index 20016f29bb..0000000000 --- a/board/avionic-design/dts/tegra20-plutux.dts +++ /dev/null @@ -1,45 +0,0 @@ -/dts-v1/; - -#include "tegra20-tamonten.dtsi" - -/ { - model = "Avionic Design Plutux"; - compatible = "ad,plutux", "nvidia,tegra20"; - - aliases { - usb0 = "/usb@c5008000"; - sdhci0 = "/sdhci@c8000600"; - }; - - memory { - reg = <0x00000000 0x20000000>; - }; - - serial@70006300 { - clock-frequency = <216000000>; - }; - - i2c@7000c000 { - status = "disabled"; - }; - - i2c@7000c400 { - status = "disabled"; - }; - - i2c@7000c500 { - status = "disabled"; - }; - - i2c@7000d000 { - status = "disabled"; - }; - - usb@c5000000 { - status = "disabled"; - }; - - usb@c5004000 { - status = "disabled"; - }; -}; diff --git a/board/avionic-design/dts/tegra20-tamonten.dtsi b/board/avionic-design/dts/tegra20-tamonten.dtsi deleted file mode 100644 index f379622c94..0000000000 --- a/board/avionic-design/dts/tegra20-tamonten.dtsi +++ /dev/null @@ -1,500 +0,0 @@ -#include "tegra20.dtsi" - -/ { - model = "Avionic Design Tamonten SOM"; - compatible = "ad,tamonten", "nvidia,tegra20"; - - memory { - reg = <0x00000000 0x20000000>; - }; - - host1x { - hdmi { - vdd-supply = <&hdmi_vdd_reg>; - pll-supply = <&hdmi_pll_reg>; - - nvidia,ddc-i2c-bus = <&hdmi_ddc>; - nvidia,hpd-gpio = <&gpio 111 0>; /* PN7 */ - }; - }; - - pinmux { - pinctrl-names = "default"; - pinctrl-0 = <&state_default>; - - state_default: pinmux { - ata { - nvidia,pins = "ata"; - nvidia,function = "ide"; - }; - atb { - nvidia,pins = "atb", "gma", "gme"; - nvidia,function = "sdio4"; - }; - atc { - nvidia,pins = "atc"; - nvidia,function = "nand"; - }; - atd { - nvidia,pins = "atd", "ate", "gmb", "gmd", "gpu", - "spia", "spib", "spic"; - nvidia,function = "gmi"; - }; - cdev1 { - nvidia,pins = "cdev1"; - nvidia,function = "plla_out"; - }; - cdev2 { - nvidia,pins = "cdev2"; - nvidia,function = "pllp_out4"; - }; - crtp { - nvidia,pins = "crtp"; - nvidia,function = "crt"; - }; - csus { - nvidia,pins = "csus"; - nvidia,function = "vi_sensor_clk"; - }; - dap1 { - nvidia,pins = "dap1"; - nvidia,function = "dap1"; - }; - dap2 { - nvidia,pins = "dap2"; - nvidia,function = "dap2"; - }; - dap3 { - nvidia,pins = "dap3"; - nvidia,function = "dap3"; - }; - dap4 { - nvidia,pins = "dap4"; - nvidia,function = "dap4"; - }; - dta { - nvidia,pins = "dta", "dtd"; - nvidia,function = "sdio2"; - }; - dtb { - nvidia,pins = "dtb", "dtc", "dte"; - nvidia,function = "rsvd1"; - }; - dtf { - nvidia,pins = "dtf"; - nvidia,function = "i2c3"; - }; - gmc { - nvidia,pins = "gmc"; - nvidia,function = "uartd"; - }; - gpu7 { - nvidia,pins = "gpu7"; - nvidia,function = "rtck"; - }; - gpv { - nvidia,pins = "gpv", "slxa", "slxk"; - nvidia,function = "pcie"; - }; - hdint { - nvidia,pins = "hdint"; - nvidia,function = "hdmi"; - }; - i2cp { - nvidia,pins = "i2cp"; - nvidia,function = "i2cp"; - }; - irrx { - nvidia,pins = "irrx", "irtx"; - nvidia,function = "uarta"; - }; - kbca { - nvidia,pins = "kbca", "kbcb", "kbcc", "kbcd", - "kbce", "kbcf"; - nvidia,function = "kbc"; - }; - lcsn { - nvidia,pins = "lcsn", "ld0", "ld1", "ld2", - "ld3", "ld4", "ld5", "ld6", "ld7", - "ld8", "ld9", "ld10", "ld11", "ld12", - "ld13", "ld14", "ld15", "ld16", "ld17", - "ldc", "ldi", "lhp0", "lhp1", "lhp2", - "lhs", "lm0", "lm1", "lpp", "lpw0", - "lpw1", "lpw2", "lsc0", "lsc1", "lsck", - "lsda", "lsdi", "lspi", "lvp0", "lvp1", - "lvs"; - nvidia,function = "displaya"; - }; - owc { - nvidia,pins = "owc", "spdi", "spdo", "uac"; - nvidia,function = "rsvd2"; - }; - pmc { - nvidia,pins = "pmc"; - nvidia,function = "pwr_on"; - }; - rm { - nvidia,pins = "rm"; - nvidia,function = "i2c1"; - }; - sdb { - nvidia,pins = "sdb", "sdc", "sdd"; - nvidia,function = "pwm"; - }; - sdio1 { - nvidia,pins = "sdio1"; - nvidia,function = "sdio1"; - }; - slxc { - nvidia,pins = "slxc", "slxd"; - nvidia,function = "spdif"; - }; - spid { - nvidia,pins = "spid", "spie", "spif"; - nvidia,function = "spi1"; - }; - spig { - nvidia,pins = "spig", "spih"; - nvidia,function = "spi2_alt"; - }; - uaa { - nvidia,pins = "uaa", "uab", "uda"; - nvidia,function = "ulpi"; - }; - uad { - nvidia,pins = "uad"; - nvidia,function = "irda"; - }; - uca { - nvidia,pins = "uca", "ucb"; - nvidia,function = "uartc"; - }; - conf_ata { - nvidia,pins = "ata", "atb", "atc", "atd", "ate", - "cdev1", "cdev2", "dap1", "dtb", "gma", - "gmb", "gmc", "gmd", "gme", "gpu7", - "gpv", "i2cp", "pta", "rm", "slxa", - "slxk", "spia", "spib", "uac"; - nvidia,pull = <0>; - nvidia,tristate = <0>; - }; - conf_ck32 { - nvidia,pins = "ck32", "ddrc", "pmca", "pmcb", - "pmcc", "pmcd", "pmce", "xm2c", "xm2d"; - nvidia,pull = <0>; - }; - conf_csus { - nvidia,pins = "csus", "spid", "spif"; - nvidia,pull = <1>; - nvidia,tristate = <1>; - }; - conf_crtp { - nvidia,pins = "crtp", "dap2", "dap3", "dap4", - "dtc", "dte", "dtf", "gpu", "sdio1", - "slxc", "slxd", "spdi", "spdo", "spig", - "uda"; - nvidia,pull = <0>; - nvidia,tristate = <1>; - }; - conf_ddc { - nvidia,pins = "ddc", "dta", "dtd", "kbca", - "kbcb", "kbcc", "kbcd", "kbce", "kbcf", - "sdc"; - nvidia,pull = <2>; - nvidia,tristate = <0>; - }; - conf_hdint { - nvidia,pins = "hdint", "lcsn", "ldc", "lm1", - "lpw1", "lsc1", "lsck", "lsda", "lsdi", - "lvp0", "owc", "sdb"; - nvidia,tristate = <1>; - }; - conf_irrx { - nvidia,pins = "irrx", "irtx", "sdd", "spic", - "spie", "spih", "uaa", "uab", "uad", - "uca", "ucb"; - nvidia,pull = <2>; - nvidia,tristate = <1>; - }; - conf_lc { - nvidia,pins = "lc", "ls"; - nvidia,pull = <2>; - }; - conf_ld0 { - nvidia,pins = "ld0", "ld1", "ld2", "ld3", "ld4", - "ld5", "ld6", "ld7", "ld8", "ld9", - "ld10", "ld11", "ld12", "ld13", "ld14", - "ld15", "ld16", "ld17", "ldi", "lhp0", - "lhp1", "lhp2", "lhs", "lm0", "lpp", - "lpw0", "lpw2", "lsc0", "lspi", "lvp1", - "lvs", "pmc"; - nvidia,tristate = <0>; - }; - conf_ld17_0 { - nvidia,pins = "ld17_0", "ld19_18", "ld21_20", - "ld23_22"; - nvidia,pull = <1>; - }; - }; - - state_i2cmux_ddc: pinmux_i2cmux_ddc { - ddc { - nvidia,pins = "ddc"; - nvidia,function = "i2c2"; - }; - pta { - nvidia,pins = "pta"; - nvidia,function = "rsvd4"; - }; - }; - - state_i2cmux_pta: pinmux_i2cmux_pta { - ddc { - nvidia,pins = "ddc"; - nvidia,function = "rsvd4"; - }; - pta { - nvidia,pins = "pta"; - nvidia,function = "i2c2"; - }; - }; - - state_i2cmux_idle: pinmux_i2cmux_idle { - ddc { - nvidia,pins = "ddc"; - nvidia,function = "rsvd4"; - }; - pta { - nvidia,pins = "pta"; - nvidia,function = "rsvd4"; - }; - }; - }; - - i2s@70002800 { - status = "okay"; - }; - - serial@70006300 { - status = "okay"; - }; - - nand-controller@70008000 { - nvidia,wp-gpios = <&gpio 23 0>; /* PC7 */ - nvidia,width = <8>; - nvidia,timing = <26 100 20 80 20 10 12 10 70>; - - nand@0 { - reg = <0>; - compatible = "hynix,hy27uf4g2b", "nand-flash"; - }; - }; - - i2c@7000c000 { - clock-frequency = <400000>; - status = "okay"; - }; - - i2c@7000c400 { - clock-frequency = <100000>; - status = "okay"; - }; - - i2cmux { - compatible = "i2c-mux-pinctrl"; - #address-cells = <1>; - #size-cells = <0>; - - i2c-parent = <&{/i2c@7000c400}>; - - pinctrl-names = "ddc", "pta", "idle"; - pinctrl-0 = <&state_i2cmux_ddc>; - pinctrl-1 = <&state_i2cmux_pta>; - pinctrl-2 = <&state_i2cmux_idle>; - - hdmi_ddc: i2c@0 { - reg = <0>; - #address-cells = <1>; - #size-cells = <0>; - }; - - i2c@1 { - reg = <1>; - #address-cells = <1>; - #size-cells = <0>; - }; - }; - - i2c@7000d000 { - clock-frequency = <400000>; - status = "okay"; - - pmic: tps6586x@34 { - compatible = "ti,tps6586x"; - reg = <0x34>; - interrupts = <0 86 0x4>; - - ti,system-power-controller; - - #gpio-cells = <2>; - gpio-controller; - - sys-supply = <&vdd_5v0_reg>; - vin-sm0-supply = <&sys_reg>; - vin-sm1-supply = <&sys_reg>; - vin-sm2-supply = <&sys_reg>; - vinldo01-supply = <&sm2_reg>; - vinldo23-supply = <&sm2_reg>; - vinldo4-supply = <&sm2_reg>; - vinldo678-supply = <&sm2_reg>; - vinldo9-supply = <&sm2_reg>; - - regulators { - sys_reg: sys { - regulator-name = "vdd_sys"; - regulator-always-on; - }; - - sm0 { - regulator-name = "vdd_sys_sm0,vdd_core"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - regulator-always-on; - }; - - sm1 { - regulator-name = "vdd_sys_sm1,vdd_cpu"; - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <1000000>; - regulator-always-on; - }; - - sm2_reg: sm2 { - regulator-name = "vdd_sys_sm2,vin_ldo*"; - regulator-min-microvolt = <3700000>; - regulator-max-microvolt = <3700000>; - regulator-always-on; - }; - - ldo0 { - regulator-name = "vdd_ldo0,vddio_pex_clk"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - ldo1 { - regulator-name = "vdd_ldo1,avdd_pll*"; - regulator-min-microvolt = <1100000>; - regulator-max-microvolt = <1100000>; - regulator-always-on; - }; - - ldo2 { - regulator-name = "vdd_ldo2,vdd_rtc"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - ldo3 { - regulator-name = "vdd_ldo3,avdd_usb*"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - }; - - ldo4 { - regulator-name = "vdd_ldo4,avdd_osc,vddio_sys"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - }; - - ldo5 { - regulator-name = "vdd_ldo5,vcore_mmc"; - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - ldo6 { - regulator-name = "vdd_ldo6,avdd_vdac"; - /* - * According to the Tegra 2 Automotive - * DataSheet, a typical value for this - * would be 2.8V, but the PMIC only - * supports 2.85V. - */ - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - hdmi_vdd_reg: ldo7 { - regulator-name = "vdd_ldo7,avdd_hdmi"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - hdmi_pll_reg: ldo8 { - regulator-name = "vdd_ldo8,avdd_hdmi_pll"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - ldo9 { - regulator-name = "vdd_ldo9,vdd_ddr_rx,avdd_cam"; - /* - * According to the Tegra 2 Automotive - * DataSheet, a typical value for this - * would be 2.8V, but the PMIC only - * supports 2.85V. - */ - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - regulator-always-on; - }; - - ldo_rtc { - regulator-name = "vdd_rtc_out"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - }; - }; - }; - - temperature-sensor@4c { - compatible = "onnn,nct1008"; - reg = <0x4c>; - }; - }; - - pmc { - nvidia,invert-interrupt; - }; - - usb@c5008000 { - status = "okay"; - }; - - sdhci@c8000600 { - cd-gpios = <&gpio 58 1>; /* gpio PH2 */ - wp-gpios = <&gpio 59 0>; /* gpio PH3 */ - bus-width = <4>; - status = "okay"; - }; - - regulators { - compatible = "simple-bus"; - - #address-cells = <1>; - #size-cells = <0>; - - vdd_5v0_reg: regulator@0 { - compatible = "regulator-fixed"; - reg = <0>; - regulator-name = "vdd_5v0"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - regulator-always-on; - }; - }; -}; diff --git a/board/avionic-design/dts/tegra20-tec.dts b/board/avionic-design/dts/tegra20-tec.dts deleted file mode 100644 index 4c1b08d768..0000000000 --- a/board/avionic-design/dts/tegra20-tec.dts +++ /dev/null @@ -1,77 +0,0 @@ -/dts-v1/; - -#include "tegra20-tamonten.dtsi" - -/ { - model = "Avionic Design Tamonten Evaluation Carrier"; - compatible = "ad,tec", "nvidia,tegra20"; - - aliases { - usb0 = "/usb@c5008000"; - sdhci0 = "/sdhci@c8000600"; - }; - - memory { - reg = <0x00000000 0x20000000>; - }; - - host1x { - status = "okay"; - - dc@54200000 { - status = "okay"; - - rgb { - nvidia,panel = <&lcd_panel>; - status = "okay"; - }; - }; - }; - - serial@70006300 { - clock-frequency = <216000000>; - }; - - i2c@7000c000 { - status = "disabled"; - }; - - i2c@7000c400 { - status = "disabled"; - }; - - i2c@7000c500 { - status = "disabled"; - }; - - i2c@7000d000 { - status = "disabled"; - }; - - usb@c5000000 { - status = "disabled"; - }; - - usb@c5004000 { - status = "disabled"; - }; - - lcd_panel: panel { - clock = <33260000>; - xres = <800>; - yres = <480>; - left-margin = <120>; - right-margin = <120>; - hsync-len = <16>; - lower-margin = <15>; - upper-margin = <15>; - vsync-len = <15>; - - nvidia,bits-per-pixel = <16>; - nvidia,pwm = <&pwm 0 500000>; - nvidia,backlight-enable-gpios = <&gpio 13 0>; /* PB5 */ - nvidia,backlight-vdd-gpios = <&gpio 176 0>; /* PW0 */ - nvidia,lvds-shutdown-gpios = <&gpio 10 0>; /* PB2 */ - nvidia,panel-timings = <0 0 0 0>; - }; -}; diff --git a/board/avionic-design/dts/tegra30-tamonten.dtsi b/board/avionic-design/dts/tegra30-tamonten.dtsi deleted file mode 100644 index 50d5762311..0000000000 --- a/board/avionic-design/dts/tegra30-tamonten.dtsi +++ /dev/null @@ -1,69 +0,0 @@ -#include "tegra30.dtsi" - -/ { - model = "Avionic Design Tamonten NG"; - compatible = "ad,tamonten-ng", "nvidia,tegra30"; - - memory { - reg = <0x80000000 0x40000000>; - }; - - aliases { - i2c0 = "/i2c@7000c000"; - i2c1 = "/i2c@7000c700"; - i2c2 = "/i2c@7000c400"; - i2c3 = "/i2c@7000c500"; - i2c4 = "/i2c@7000d000"; - sdhci0 = "/sdhci@78000600"; - sdhci1 = "/sdhci@78000400"; - sdhci2 = "/sdhci@78000000"; - usb0 = "/usb@7d008000"; - }; - - /* GEN1 */ - i2c@7000c000 { - status = "okay"; - clock-frequency = <100000>; - }; - - /* GEN2 */ - i2c@7000c400 { - clock-frequency = <100000>; - }; - - /* CAM */ - i2c@7000c500 { - status = "okay"; - clock-frequency = <100000>; - }; - - /* DDC */ - i2c@7000c700 { - status = "okay"; - clock-frequency = <100000>; - }; - - /* PWR */ - i2c@7000d000 { - status = "okay"; - clock-frequency = <100000>; - }; - - /* SD slot on the base board */ - sdhci@78000400 { - cd-gpios = <&gpio 69 1>; /* gpio PI5 */ - wp-gpios = <&gpio 67 0>; /* gpio PI3 */ - bus-width = <4>; - }; - - /* EMMC on the COM module */ - sdhci@78000600 { - status = "okay"; - bus-width = <8>; - }; - - usb@7d008000 { - status = "okay"; - }; - -}; diff --git a/board/avionic-design/dts/tegra30-tec-ng.dts b/board/avionic-design/dts/tegra30-tec-ng.dts deleted file mode 100644 index 8a69e818ca..0000000000 --- a/board/avionic-design/dts/tegra30-tec-ng.dts +++ /dev/null @@ -1,18 +0,0 @@ -/dts-v1/; - -#include "tegra30-tamonten.dtsi" - -/ { - model = "Avionic Design Tamonten™ NG Evaluation Carrier"; - compatible = "ad,tec-ng", "nvidia,tegra30"; - - /* GEN2 */ - i2c@7000c400 { - status = "okay"; - }; - - /* SD card slot */ - sdhci@78000400 { - status = "okay"; - }; -}; diff --git a/board/chromebook-x86/dts/alex.dts b/board/chromebook-x86/dts/alex.dts deleted file mode 100644 index 2f13544612..0000000000 --- a/board/chromebook-x86/dts/alex.dts +++ /dev/null @@ -1,24 +0,0 @@ -/dts-v1/; - -/include/ "coreboot.dtsi" - -/ { - #address-cells = <1>; - #size-cells = <1>; - model = "Google Alex"; - compatible = "google,alex", "intel,atom-pineview"; - - config { - silent_console = <0>; - }; - - gpio: gpio {}; - - serial { - reg = <0x3f8 8>; - clock-frequency = <115200>; - }; - - chosen { }; - memory { device_type = "memory"; reg = <0 0>; }; -}; diff --git a/board/chromebook-x86/dts/link.dts b/board/chromebook-x86/dts/link.dts deleted file mode 100644 index 4a37dac4ea..0000000000 --- a/board/chromebook-x86/dts/link.dts +++ /dev/null @@ -1,35 +0,0 @@ -/dts-v1/; - -/include/ "coreboot.dtsi" - -/ { - #address-cells = <1>; - #size-cells = <1>; - model = "Google Link"; - compatible = "google,link", "intel,celeron-ivybridge"; - - config { - silent_console = <0>; - }; - - gpio: gpio {}; - - serial { - reg = <0x3f8 8>; - clock-frequency = <115200>; - }; - - chosen { }; - memory { device_type = "memory"; reg = <0 0>; }; - - spi { - #address-cells = <1>; - #size-cells = <0>; - compatible = "intel,ich9"; - spi-flash@0 { - reg = <0>; - compatible = "winbond,w25q64", "spi-flash"; - memory-map = <0xff800000 0x00800000>; - }; - }; -}; diff --git a/board/compal/dts/tegra20-paz00.dts b/board/compal/dts/tegra20-paz00.dts deleted file mode 100644 index 780203cfb3..0000000000 --- a/board/compal/dts/tegra20-paz00.dts +++ /dev/null @@ -1,91 +0,0 @@ -/dts-v1/; - -#include "tegra20.dtsi" - -/ { - model = "Toshiba AC100 / Dynabook AZ"; - compatible = "compal,paz00", "nvidia,tegra20"; - - aliases { - usb0 = "/usb@c5008000"; - sdhci0 = "/sdhci@c8000600"; - sdhci1 = "/sdhci@c8000000"; - }; - - memory { - reg = <0x00000000 0x20000000>; - }; - - host1x { - status = "okay"; - dc@54200000 { - status = "okay"; - rgb { - status = "okay"; - nvidia,panel = <&lcd_panel>; - }; - }; - }; - - serial@70006000 { - clock-frequency = < 216000000 >; - }; - - i2c@7000c000 { - status = "disabled"; - }; - - i2c@7000c400 { - status = "disabled"; - }; - - i2c@7000c500 { - status = "disabled"; - }; - - i2c@7000d000 { - status = "disabled"; - }; - - usb@c5000000 { - status = "disabled"; - }; - - usb@c5004000 { - status = "disabled"; - }; - - sdhci@c8000000 { - status = "okay"; - cd-gpios = <&gpio 173 1>; /* gpio PV5 */ - wp-gpios = <&gpio 57 0>; /* gpio PH1 */ - power-gpios = <&gpio 169 0>; /* gpio PV1 */ - bus-width = <4>; - }; - - sdhci@c8000600 { - status = "okay"; - bus-width = <8>; - }; - - lcd_panel: panel { - /* PAZ00 has 1024x600 */ - clock = <54030000>; - xres = <1024>; - yres = <600>; - right-margin = <160>; - left-margin = <24>; - hsync-len = <136>; - upper-margin = <3>; - lower-margin = <61>; - vsync-len = <6>; - hsync-active-high; - nvidia,bits-per-pixel = <16>; - nvidia,pwm = <&pwm 0 0>; - nvidia,backlight-enable-gpios = <&gpio 164 0>; /* PU4 */ - nvidia,lvds-shutdown-gpios = <&gpio 102 0>; /* PM6 */ - nvidia,backlight-vdd-gpios = <&gpio 176 0>; /* PW0 */ - nvidia,panel-vdd-gpios = <&gpio 4 0>; /* PA4 */ - nvidia,panel-timings = <400 4 203 17 15>; - }; -}; diff --git a/board/compulab/dts/tegra20-trimslice.dts b/board/compulab/dts/tegra20-trimslice.dts deleted file mode 100644 index ee31476c1e..0000000000 --- a/board/compulab/dts/tegra20-trimslice.dts +++ /dev/null @@ -1,64 +0,0 @@ -/dts-v1/; - -#include "tegra20.dtsi" - -/ { - model = "Compulab TrimSlice board"; - compatible = "compulab,trimslice", "nvidia,tegra20"; - - aliases { - usb0 = "/usb@c5008000"; - usb1 = "/usb@c5000000"; - sdhci0 = "/sdhci@c8000600"; - sdhci1 = "/sdhci@c8000000"; - }; - - memory { - reg = <0x00000000 0x40000000>; - }; - - serial@70006000 { - clock-frequency = <216000000>; - }; - - i2c@7000c000 { - status = "disabled"; - }; - - spi@7000c380 { - status = "okay"; - spi-max-frequency = <25000000>; - }; - - i2c@7000c400 { - status = "disabled"; - }; - - i2c@7000c500 { - status = "disabled"; - }; - - i2c@7000d000 { - status = "disabled"; - }; - - usb@c5000000 { - nvidia,vbus-gpio = <&gpio 170 0>; /* PV2 */ - }; - - usb@c5004000 { - status = "disabled"; - }; - - sdhci@c8000000 { - status = "okay"; - bus-width = <4>; - }; - - sdhci@c8000600 { - status = "okay"; - cd-gpios = <&gpio 121 1>; /* gpio PP1 */ - wp-gpios = <&gpio 122 0>; /* gpio PP2 */ - bus-width = <4>; - }; -}; diff --git a/board/nvidia/dts/tegra114-dalmore.dts b/board/nvidia/dts/tegra114-dalmore.dts deleted file mode 100644 index 435c01e9f6..0000000000 --- a/board/nvidia/dts/tegra114-dalmore.dts +++ /dev/null @@ -1,71 +0,0 @@ -/dts-v1/; - -#include "tegra114.dtsi" - -/ { - model = "NVIDIA Dalmore"; - compatible = "nvidia,dalmore", "nvidia,tegra114"; - - aliases { - i2c0 = "/i2c@7000d000"; - i2c1 = "/i2c@7000c000"; - i2c2 = "/i2c@7000c400"; - i2c3 = "/i2c@7000c500"; - i2c4 = "/i2c@7000c700"; - sdhci0 = "/sdhci@78000600"; - sdhci1 = "/sdhci@78000400"; - usb0 = "/usb@7d008000"; - }; - - memory { - device_type = "memory"; - reg = <0x80000000 0x80000000>; - }; - - i2c@7000c000 { - status = "okay"; - clock-frequency = <100000>; - }; - - i2c@7000c400 { - status = "okay"; - clock-frequency = <100000>; - }; - - i2c@7000c500 { - status = "okay"; - clock-frequency = <100000>; - }; - - i2c@7000c700 { - status = "okay"; - clock-frequency = <100000>; - }; - - i2c@7000d000 { - status = "okay"; - clock-frequency = <400000>; - }; - - spi@7000da00 { - status = "okay"; - spi-max-frequency = <25000000>; - }; - - sdhci@78000400 { - cd-gpios = <&gpio 170 1>; /* gpio PV2 */ - bus-width = <4>; - status = "okay"; - }; - - sdhci@78000600 { - bus-width = <8>; - status = "okay"; - }; - - usb@7d008000 { - /* SPDIF_IN: USB_VBUS_EN1 */ - nvidia,vbus-gpio = <&gpio 86 0>; - status = "okay"; - }; -}; diff --git a/board/nvidia/dts/tegra20-harmony.dts b/board/nvidia/dts/tegra20-harmony.dts deleted file mode 100644 index b115f87821..0000000000 --- a/board/nvidia/dts/tegra20-harmony.dts +++ /dev/null @@ -1,105 +0,0 @@ -/dts-v1/; - -#include "tegra20.dtsi" - -/ { - model = "NVIDIA Tegra20 Harmony evaluation board"; - compatible = "nvidia,harmony", "nvidia,tegra20"; - - aliases { - usb0 = "/usb@c5008000"; - usb1 = "/usb@c5004000"; - sdhci0 = "/sdhci@c8000600"; - sdhci1 = "/sdhci@c8000200"; - }; - - memory { - reg = <0x00000000 0x40000000>; - }; - - host1x { - status = "okay"; - dc@54200000 { - status = "okay"; - rgb { - status = "okay"; - nvidia,panel = <&lcd_panel>; - }; - }; - }; - - serial@70006300 { - clock-frequency = < 216000000 >; - }; - - nand-controller@70008000 { - nvidia,wp-gpios = <&gpio 23 0>; /* PC7 */ - nvidia,width = <8>; - nvidia,timing = <26 100 20 80 20 10 12 10 70>; - nand@0 { - reg = <0>; - compatible = "hynix,hy27uf4g2b", "nand-flash"; - }; - }; - - i2c@7000c000 { - status = "disabled"; - }; - - i2c@7000c400 { - status = "disabled"; - }; - - i2c@7000c500 { - status = "disabled"; - }; - - i2c@7000d000 { - status = "disabled"; - }; - - usb@c5000000 { - status = "disabled"; - }; - - usb@c5004000 { - nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */ - }; - - sdhci@c8000200 { - status = "okay"; - cd-gpios = <&gpio 69 1>; /* gpio PI5 */ - wp-gpios = <&gpio 57 0>; /* gpio PH1 */ - power-gpios = <&gpio 155 0>; /* gpio PT3 */ - bus-width = <4>; - }; - - sdhci@c8000600 { - status = "okay"; - cd-gpios = <&gpio 58 1>; /* gpio PH2 */ - wp-gpios = <&gpio 59 0>; /* gpio PH3 */ - power-gpios = <&gpio 70 0>; /* gpio PI6 */ - bus-width = <8>; - }; - - lcd_panel: panel { - clock = <42430000>; - xres = <1024>; - yres = <600>; - left-margin = <138>; - right-margin = <34>; - hsync-len = <136>; - lower-margin = <4>; - upper-margin = <21>; - vsync-len = <4>; - hsync-active-high; - vsyncx-active-high; - nvidia,bits-per-pixel = <16>; - nvidia,pwm = <&pwm 0 0>; - nvidia,backlight-enable-gpios = <&gpio 13 0>; /* PB5 */ - nvidia,lvds-shutdown-gpios = <&gpio 10 0>; /* PB2 */ - nvidia,backlight-vdd-gpios = <&gpio 176 0>; /* PW0 */ - nvidia,panel-vdd-gpios = <&gpio 22 0>; /* PC6 */ - nvidia,panel-timings = <0 0 200 0 0>; - }; -}; diff --git a/board/nvidia/dts/tegra20-seaboard.dts b/board/nvidia/dts/tegra20-seaboard.dts deleted file mode 100644 index c0e2e1e5fd..0000000000 --- a/board/nvidia/dts/tegra20-seaboard.dts +++ /dev/null @@ -1,191 +0,0 @@ -/dts-v1/; - -#include "tegra20.dtsi" - -/ { - model = "NVIDIA Seaboard"; - compatible = "nvidia,seaboard", "nvidia,tegra20"; - - chosen { - bootargs = "vmalloc=192M video=tegrafb console=ttyS0,115200n8 root=/dev/mmcblk1p3 rw rootwait"; - }; - - aliases { - /* This defines the order of our ports */ - usb0 = "/usb@c5008000"; - usb1 = "/usb@c5000000"; - i2c0 = "/i2c@7000d000"; - i2c1 = "/i2c@7000c000"; - i2c2 = "/i2c@7000c400"; - i2c3 = "/i2c@7000c500"; - sdhci0 = "/sdhci@c8000600"; - sdhci1 = "/sdhci@c8000400"; - }; - - memory { - device_type = "memory"; - reg = < 0x00000000 0x40000000 >; - }; - - host1x { - status = "okay"; - dc@54200000 { - status = "okay"; - rgb { - status = "okay"; - nvidia,panel = <&lcd_panel>; - }; - }; - }; - - /* This is not used in U-Boot, but is expected to be in kernel .dts */ - i2c@7000d000 { - clock-frequency = <100000>; - pmic@34 { - compatible = "ti,tps6586x"; - reg = <0x34>; - - clk_32k: clock { - compatible = "fixed-clock"; - /* - * leave out for now due to CPP: - * #clock-cells = <0>; - */ - clock-frequency = <32768>; - }; - }; - }; - - serial@70006300 { - clock-frequency = < 216000000 >; - }; - - nand-controller@70008000 { - nvidia,wp-gpios = <&gpio 59 0>; /* PH3 */ - nvidia,width = <8>; - nvidia,timing = <26 100 20 80 20 10 12 10 70>; - nand@0 { - reg = <0>; - compatible = "hynix,hy27uf4g2b", "nand-flash"; - }; - }; - - i2c@7000c000 { - clock-frequency = <100000>; - }; - - i2c@7000c400 { - status = "disabled"; - }; - - i2c@7000c500 { - clock-frequency = <100000>; - }; - - kbc@7000e200 { - linux,keymap = <0x00020011 0x0003001f 0x0004001e 0x0005002c - 0x000701d0 0x0107007d 0x02060064 0x02070038 0x03000006 - 0x03010005 0x03020013 0x03030012 0x03040021 0x03050020 - 0x0306002d 0x04000008 0x04010007 0x04020014 0x04030023 - 0x04040022 0x0405002f 0x0406002e 0x04070039 0x0500000a - 0x05010009 0x05020016 0x05030015 0x05040024 0x05050031 - 0x05060030 0x0507002b 0x0600000c 0x0601000b 0x06020018 - 0x06030017 0x06040026 0x06050025 0x06060033 0x06070032 - 0x0701000d 0x0702001b 0x0703001c 0x0707008b 0x08040036 - 0x0805002a 0x09050061 0x0907001d 0x0b00001a 0x0b010019 - 0x0b020028 0x0b030027 0x0b040035 0x0b050034 0x0c000044 - 0x0c010043 0x0c02000e 0x0c030004 0x0c040003 0x0c050067 - 0x0c0600d2 0x0c070077 0x0d00006e 0x0d01006f 0x0d030068 - 0x0d04006d 0x0d05006a 0x0d06006c 0x0d070069 0x0e000057 - 0x0e010058 0x0e020042 0x0e030010 0x0e04003e 0x0e05003d - 0x0e060002 0x0e070041 0x0f000001 0x0f010029 0x0f02003f - 0x0f03000f 0x0f04003b 0x0f05003c 0x0f06003a 0x0f070040 - 0x14000047 0x15000049 0x15010048 0x1502004b 0x1504004f - 0x16010062 0x1602004d 0x1603004c 0x16040051 0x16050050 - 0x16070052 0x1b010037 0x1b03004a 0x1b04004e 0x1b050053 - 0x1c050073 0x1d030066 0x1d04006b 0x1d0500e0 0x1d060072 - 0x1d0700e1 0x1e000045 0x1e010046 0x1e020071 - 0x1f04008a>; - linux,fn-keymap = <0x05040002>; - }; - - emc@7000f400 { - emc-table@190000 { - reg = < 190000 >; - compatible = "nvidia,tegra20-emc-table"; - clock-frequency = < 190000 >; - nvidia,emc-registers = < 0x0000000c 0x00000026 - 0x00000009 0x00000003 0x00000004 0x00000004 - 0x00000002 0x0000000c 0x00000003 0x00000003 - 0x00000002 0x00000001 0x00000004 0x00000005 - 0x00000004 0x00000009 0x0000000d 0x0000059f - 0x00000000 0x00000003 0x00000003 0x00000003 - 0x00000003 0x00000001 0x0000000b 0x000000c8 - 0x00000003 0x00000007 0x00000004 0x0000000f - 0x00000002 0x00000000 0x00000000 0x00000002 - 0x00000000 0x00000000 0x00000083 0xa06204ae - 0x007dc010 0x00000000 0x00000000 0x00000000 - 0x00000000 0x00000000 0x00000000 0x00000000 >; - }; - emc-table@380000 { - reg = < 380000 >; - compatible = "nvidia,tegra20-emc-table"; - clock-frequency = < 380000 >; - nvidia,emc-registers = < 0x00000017 0x0000004b - 0x00000012 0x00000006 0x00000004 0x00000005 - 0x00000003 0x0000000c 0x00000006 0x00000006 - 0x00000003 0x00000001 0x00000004 0x00000005 - 0x00000004 0x00000009 0x0000000d 0x00000b5f - 0x00000000 0x00000003 0x00000003 0x00000006 - 0x00000006 0x00000001 0x00000011 0x000000c8 - 0x00000003 0x0000000e 0x00000007 0x0000000f - 0x00000002 0x00000000 0x00000000 0x00000002 - 0x00000000 0x00000000 0x00000083 0xe044048b - 0x007d8010 0x00000000 0x00000000 0x00000000 - 0x00000000 0x00000000 0x00000000 0x00000000 >; - }; - }; - - usb@c5000000 { - nvidia,vbus-gpio = <&gpio 24 0>; /* PD0 */ - dr_mode = "otg"; - }; - - usb@c5004000 { - status = "disabled"; - }; - - sdhci@c8000400 { - status = "okay"; - cd-gpios = <&gpio 69 1>; /* gpio PI5 */ - wp-gpios = <&gpio 57 0>; /* gpio PH1 */ - power-gpios = <&gpio 70 0>; /* gpio PI6 */ - bus-width = <4>; - }; - - sdhci@c8000600 { - status = "okay"; - bus-width = <8>; - }; - - lcd_panel: panel { - /* Seaboard has 1366x768 */ - clock = <70600000>; - xres = <1366>; - yres = <768>; - left-margin = <58>; - right-margin = <58>; - hsync-len = <58>; - lower-margin = <4>; - upper-margin = <4>; - vsync-len = <4>; - hsync-active-high; - nvidia,bits-per-pixel = <16>; - nvidia,pwm = <&pwm 2 0>; - nvidia,backlight-enable-gpios = <&gpio 28 0>; /* PD4 */ - nvidia,lvds-shutdown-gpios = <&gpio 10 0>; /* PB2 */ - nvidia,backlight-vdd-gpios = <&gpio 176 0>; /* PW0 */ - nvidia,panel-vdd-gpios = <&gpio 22 0>; /* PC6 */ - nvidia,panel-timings = <400 4 203 17 15>; - }; -}; diff --git a/board/nvidia/dts/tegra20-ventana.dts b/board/nvidia/dts/tegra20-ventana.dts deleted file mode 100644 index 1a526bab64..0000000000 --- a/board/nvidia/dts/tegra20-ventana.dts +++ /dev/null @@ -1,91 +0,0 @@ -/dts-v1/; - -#include "tegra20.dtsi" - -/ { - model = "NVIDIA Tegra20 Ventana evaluation board"; - compatible = "nvidia,ventana", "nvidia,tegra20"; - - aliases { - usb0 = "/usb@c5008000"; - sdhci0 = "/sdhci@c8000600"; - sdhci1 = "/sdhci@c8000400"; - }; - - memory { - reg = <0x00000000 0x40000000>; - }; - - host1x { - status = "okay"; - dc@54200000 { - status = "okay"; - rgb { - status = "okay"; - nvidia,panel = <&lcd_panel>; - }; - }; - }; - - serial@70006300 { - clock-frequency = < 216000000 >; - }; - - i2c@7000c000 { - status = "disabled"; - }; - - i2c@7000c400 { - status = "disabled"; - }; - - i2c@7000c500 { - status = "disabled"; - }; - - i2c@7000d000 { - status = "disabled"; - }; - - usb@c5000000 { - status = "disabled"; - }; - - usb@c5004000 { - status = "disabled"; - }; - - sdhci@c8000400 { - status = "okay"; - cd-gpios = <&gpio 69 1>; /* gpio PI5 */ - wp-gpios = <&gpio 57 0>; /* gpio PH1 */ - power-gpios = <&gpio 70 0>; /* gpio PI6 */ - bus-width = <4>; - }; - - sdhci@c8000600 { - status = "okay"; - bus-width = <8>; - }; - - lcd_panel: panel { - clock = <72072000>; - xres = <1366>; - yres = <768>; - left-margin = <58>; - right-margin = <58>; - hsync-len = <58>; - lower-margin = <4>; - upper-margin = <4>; - vsync-len = <4>; - hsync-active-high; - vsync-active-high; - nvidia,bits-per-pixel = <16>; - nvidia,pwm = <&pwm 2 0>; - nvidia,backlight-enable-gpios = <&gpio 28 0>; /* PD4 */ - nvidia,lvds-shutdown-gpios = <&gpio 10 0>; /* PB2 */ - nvidia,backlight-vdd-gpios = <&gpio 176 0>; /* PW0 */ - nvidia,panel-vdd-gpios = <&gpio 22 0>; /* PC6 */ - nvidia,panel-timings = <0 0 200 0 0>; - }; -}; diff --git a/board/nvidia/dts/tegra20-whistler.dts b/board/nvidia/dts/tegra20-whistler.dts deleted file mode 100644 index eb92264f9d..0000000000 --- a/board/nvidia/dts/tegra20-whistler.dts +++ /dev/null @@ -1,73 +0,0 @@ -/dts-v1/; - -#include "tegra20.dtsi" - -/ { - model = "NVIDIA Tegra20 Whistler evaluation board"; - compatible = "nvidia,whistler", "nvidia,tegra20"; - - aliases { - i2c0 = "/i2c@7000d000"; - usb0 = "/usb@c5008000"; - sdhci0 = "/sdhci@c8000600"; - sdhci1 = "/sdhci@c8000400"; - }; - - memory { - device_type = "memory"; - reg = < 0x00000000 0x20000000 >; - }; - - serial@70006000 { - clock-frequency = < 216000000 >; - }; - - i2c@7000c000 { - status = "disabled"; - }; - - i2c@7000c400 { - status = "disabled"; - }; - - i2c@7000c500 { - status = "disabled"; - }; - - i2c@7000d000 { - clock-frequency = <100000>; - - pmic@3c { - compatible = "maxim,max8907b"; - reg = <0x3c>; - - clk_32k: clock { - compatible = "fixed-clock"; - /* - * leave out for now due to CPP: - * #clock-cells = <0>; - */ - clock-frequency = <32768>; - }; - }; - }; - - usb@c5000000 { - status = "disabled"; - }; - - usb@c5004000 { - status = "disabled"; - }; - - sdhci@c8000400 { - status = "okay"; - wp-gpios = <&gpio 173 0>; /* gpio PV5 */ - bus-width = <8>; - }; - - sdhci@c8000600 { - status = "okay"; - bus-width = <8>; - }; -}; diff --git a/board/nvidia/dts/tegra30-beaver.dts b/board/nvidia/dts/tegra30-beaver.dts deleted file mode 100644 index a7cc93e93f..0000000000 --- a/board/nvidia/dts/tegra30-beaver.dts +++ /dev/null @@ -1,77 +0,0 @@ -/dts-v1/; - -#include "tegra30.dtsi" - -/ { - model = "NVIDIA Beaver"; - compatible = "nvidia,beaver", "nvidia,tegra30"; - - aliases { - i2c0 = "/i2c@7000d000"; - i2c1 = "/i2c@7000c000"; - i2c2 = "/i2c@7000c400"; - i2c3 = "/i2c@7000c500"; - i2c4 = "/i2c@7000c700"; - sdhci0 = "/sdhci@78000600"; - sdhci1 = "/sdhci@78000000"; - usb0 = "/usb@7d008000"; - }; - - memory { - device_type = "memory"; - reg = <0x80000000 0x7ff00000>; - }; - - i2c@7000c000 { - status = "okay"; - clock-frequency = <100000>; - }; - - i2c@7000c400 { - status = "okay"; - clock-frequency = <100000>; - }; - - i2c@7000c500 { - status = "okay"; - clock-frequency = <100000>; - }; - - i2c@7000c700 { - status = "okay"; - clock-frequency = <100000>; - }; - - i2c@7000d000 { - status = "okay"; - clock-frequency = <100000>; - }; - - spi@7000da00 { - status = "okay"; - spi-max-frequency = <25000000>; - spi-flash@1 { - compatible = "winbond,w25q32"; - reg = <1>; - spi-max-frequency = <20000000>; - }; - }; - - sdhci@78000000 { - status = "okay"; - cd-gpios = <&gpio 69 1>; /* gpio PI5 */ - wp-gpios = <&gpio 155 0>; /* gpio PT3 */ - power-gpios = <&gpio 31 0>; /* gpio PD7 */ - bus-width = <4>; - }; - - sdhci@78000600 { - status = "okay"; - bus-width = <8>; - }; - - usb@7d008000 { - nvidia,vbus-gpio = <&gpio 236 0>; /* PDD4 */ - status = "okay"; - }; -}; diff --git a/board/nvidia/dts/tegra30-cardhu.dts b/board/nvidia/dts/tegra30-cardhu.dts deleted file mode 100644 index ea2cf76ff3..0000000000 --- a/board/nvidia/dts/tegra30-cardhu.dts +++ /dev/null @@ -1,72 +0,0 @@ -/dts-v1/; - -#include "tegra30.dtsi" - -/ { - model = "NVIDIA Cardhu"; - compatible = "nvidia,cardhu", "nvidia,tegra30"; - - aliases { - i2c0 = "/i2c@7000d000"; - i2c1 = "/i2c@7000c000"; - i2c2 = "/i2c@7000c400"; - i2c3 = "/i2c@7000c500"; - i2c4 = "/i2c@7000c700"; - sdhci0 = "/sdhci@78000600"; - sdhci1 = "/sdhci@78000000"; - usb0 = "/usb@7d008000"; - }; - - memory { - device_type = "memory"; - reg = <0x80000000 0x40000000>; - }; - - i2c@7000c000 { - status = "okay"; - clock-frequency = <100000>; - }; - - i2c@7000c400 { - status = "okay"; - clock-frequency = <100000>; - }; - - i2c@7000c500 { - status = "okay"; - clock-frequency = <100000>; - }; - - i2c@7000c700 { - status = "okay"; - clock-frequency = <100000>; - }; - - i2c@7000d000 { - status = "okay"; - clock-frequency = <100000>; - }; - - spi@7000da00 { - status = "okay"; - spi-max-frequency = <25000000>; - }; - - sdhci@78000000 { - status = "okay"; - cd-gpios = <&gpio 69 1>; /* gpio PI5 */ - wp-gpios = <&gpio 155 0>; /* gpio PT3 */ - power-gpios = <&gpio 31 0>; /* gpio PD7 */ - bus-width = <4>; - }; - - sdhci@78000600 { - status = "okay"; - bus-width = <8>; - }; - - usb@7d008000 { - nvidia,vbus-gpio = <&gpio 236 0>; /* PDD4 */ - status = "okay"; - }; -}; diff --git a/board/samsung/dts/exynos5250-arndale.dts b/board/samsung/dts/exynos5250-arndale.dts deleted file mode 100644 index 202f2ea6ed..0000000000 --- a/board/samsung/dts/exynos5250-arndale.dts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * SAMSUNG Arndale board device tree source - * - * Copyright (c) 2013 Samsung Electronics Co., Ltd. - * http://www.samsung.com - * - * SPDX-License-Identifier: GPL-2.0+ -*/ - -/dts-v1/; -#include "exynos5250.dtsi" - -/ { - model = "SAMSUNG Arndale board based on EXYNOS5250"; - compatible = "samsung,arndale", "samsung,exynos5250"; - - aliases { - serial0 = "/serial@12C20000"; - console = "/serial@12C20000"; - }; - - mmc@12200000 { - samsung,bus-width = <8>; - samsung,timing = <1 3 3>; - }; - - mmc@12210000 { - status = "disabled"; - }; - - mmc@12220000 { - samsung,bus-width = <4>; - samsung,timing = <1 2 3>; - }; - - mmc@12230000 { - status = "disabled"; - }; -}; diff --git a/board/samsung/dts/exynos5250-smdk5250.dts b/board/samsung/dts/exynos5250-smdk5250.dts deleted file mode 100644 index 9020382d97..0000000000 --- a/board/samsung/dts/exynos5250-smdk5250.dts +++ /dev/null @@ -1,151 +0,0 @@ -/* - * SAMSUNG SMDK5250 board device tree source - * - * Copyright (c) 2012 Samsung Electronics Co., Ltd. - * http://www.samsung.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. -*/ - -/dts-v1/; -/include/ "exynos5250.dtsi" - -/ { - model = "SAMSUNG SMDK5250 board based on EXYNOS5250"; - compatible = "samsung,smdk5250", "samsung,exynos5250"; - - aliases { - i2c0 = "/i2c@12c60000"; - i2c1 = "/i2c@12c70000"; - i2c2 = "/i2c@12c80000"; - i2c3 = "/i2c@12c90000"; - i2c4 = "/i2c@12ca0000"; - i2c5 = "/i2c@12cb0000"; - i2c6 = "/i2c@12cc0000"; - i2c7 = "/i2c@12cd0000"; - spi0 = "/spi@12d20000"; - spi1 = "/spi@12d30000"; - spi2 = "/spi@12d40000"; - spi3 = "/spi@131a0000"; - spi4 = "/spi@131b0000"; - mmc0 = "/mmc@12200000"; - mmc1 = "/mmc@12210000"; - mmc2 = "/mmc@12220000"; - mmc3 = "/mmc@12230000"; - serial0 = "/serial@12C30000"; - console = "/serial@12C30000"; - i2s = "/sound@3830000"; - }; - - sromc@12250000 { - bank = <1>; - srom-timing = <1 9 12 1 6 1 1>; - width = <2>; - lan@5000000 { - compatible = "smsc,lan9215", "smsc,lan"; - reg = <0x5000000 0x100>; - phy-mode = "mii"; - }; - }; - - sound@3830000 { - samsung,codec-type = "wm8994"; - }; - - sound@12d60000 { - status = "disabled"; - }; - - i2c@12c70000 { - soundcodec@1a { - reg = <0x1a>; - compatible = "wolfson,wm8994-codec"; - }; - }; - - i2c@12c60000 { - pmic@9 { - reg = <0x9>; - compatible = "maxim,max77686_pmic"; - }; - }; - - tmu@10060000 { - samsung,min-temp = <25>; - samsung,max-temp = <125>; - samsung,start-warning = <95>; - samsung,start-tripping = <105>; - samsung,hw-tripping = <110>; - samsung,efuse-min-value = <40>; - samsung,efuse-value = <55>; - samsung,efuse-max-value = <100>; - samsung,slope = <274761730>; - samsung,dc-value = <25>; - }; - - fimd@14400000 { - samsung,vl-freq = <60>; - samsung,vl-col = <2560>; - samsung,vl-row = <1600>; - samsung,vl-width = <2560>; - samsung,vl-height = <1600>; - - samsung,vl-clkp; - samsung,vl-dp; - samsung,vl-bpix = <4>; - - samsung,vl-hspw = <32>; - samsung,vl-hbpd = <80>; - samsung,vl-hfpd = <48>; - samsung,vl-vspw = <6>; - samsung,vl-vbpd = <37>; - samsung,vl-vfpd = <3>; - samsung,vl-cmd-allow-len = <0xf>; - - samsung,winid = <3>; - samsung,interface-mode = <1>; - samsung,dp-enabled = <1>; - samsung,dual-lcd-enabled = <0>; - }; - - dp@145b0000 { - samsung,lt-status = <0>; - - samsung,master-mode = <0>; - samsung,bist-mode = <0>; - samsung,bist-pattern = <0>; - samsung,h-sync-polarity = <0>; - samsung,v-sync-polarity = <0>; - samsung,interlaced = <0>; - samsung,color-space = <0>; - samsung,dynamic-range = <0>; - samsung,ycbcr-coeff = <0>; - samsung,color-depth = <1>; - }; - - mmc@12200000 { - samsung,bus-width = <8>; - samsung,timing = <1 3 3>; - samsung,removable = <0>; - }; - - mmc@12210000 { - status = "disabled"; - }; - - mmc@12220000 { - samsung,bus-width = <4>; - samsung,timing = <1 2 3>; - samsung,removable = <1>; - }; - - mmc@12230000 { - status = "disabled"; - }; - - ehci@12110000 { - samsung,vbus-gpio = <&gpio 0x316 0>; /* X26 */ - }; -}; diff --git a/board/samsung/dts/exynos5250-snow.dts b/board/samsung/dts/exynos5250-snow.dts deleted file mode 100644 index 9b48a0ccd8..0000000000 --- a/board/samsung/dts/exynos5250-snow.dts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * SAMSUNG Snow board device tree source - * - * Copyright (c) 2012 Samsung Electronics Co., Ltd. - * http://www.samsung.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. -*/ - -/dts-v1/; -/include/ "exynos5250.dtsi" - -/ { - model = "Google Snow"; - compatible = "google,snow", "samsung,exynos5250"; - - aliases { - i2c0 = "/i2c@12c60000"; - i2c1 = "/i2c@12c70000"; - i2c2 = "/i2c@12c80000"; - i2c3 = "/i2c@12c90000"; - i2c4 = "/i2c@12ca0000"; - i2c5 = "/i2c@12cb0000"; - i2c6 = "/i2c@12cc0000"; - i2c7 = "/i2c@12cd0000"; - spi0 = "/spi@12d20000"; - spi1 = "/spi@12d30000"; - spi2 = "/spi@12d40000"; - spi3 = "/spi@131a0000"; - spi4 = "/spi@131b0000"; - mmc0 = "/mmc@12200000"; - mmc1 = "/mmc@12210000"; - mmc2 = "/mmc@12220000"; - mmc3 = "/mmc@12230000"; - serial0 = "/serial@12C30000"; - console = "/serial@12C30000"; - i2s = "/sound@3830000"; - }; - - i2c4: i2c@12ca0000 { - cros-ec@1e { - reg = <0x1e>; - compatible = "google,cros-ec"; - i2c-max-frequency = <100000>; - ec-interrupt = <&gpio 782 1>; - }; - - power-regulator@48 { - compatible = "ti,tps65090"; - reg = <0x48>; - }; - }; - - spi@131b0000 { - spi-max-frequency = <1000000>; - spi-deactivate-delay = <100>; - cros-ec@0 { - reg = <0>; - compatible = "google,cros-ec"; - spi-max-frequency = <5000000>; - ec-interrupt = <&gpio 782 1>; - optimise-flash-write; - status = "disabled"; - }; - }; - - sound@3830000 { - samsung,codec-type = "max98095"; - codec-enable-gpio = <&gpio 0xb7 0>; - }; - - sound@12d60000 { - status = "disabled"; - }; - - i2c@12cd0000 { - soundcodec@22 { - reg = <0x22>; - compatible = "maxim,max98095-codec"; - }; - }; - - i2c@12c60000 { - pmic@9 { - reg = <0x9>; - compatible = "maxim,max77686_pmic"; - }; - }; - - mmc@12200000 { - samsung,bus-width = <8>; - samsung,timing = <1 3 3>; - samsung,removable = <0>; - }; - - mmc@12210000 { - status = "disabled"; - }; - - mmc@12220000 { - samsung,bus-width = <4>; - samsung,timing = <1 2 3>; - samsung,removable = <1>; - }; - - mmc@12230000 { - status = "disabled"; - }; - - ehci@12110000 { - samsung,vbus-gpio = <&gpio 0x309 0>; /* X11 */ - }; - - xhci@12000000 { - samsung,vbus-gpio = <&gpio 0x317 0>; /* X27 */ - }; - - tmu@10060000 { - samsung,min-temp = <25>; - samsung,max-temp = <125>; - samsung,start-warning = <95>; - samsung,start-tripping = <105>; - samsung,hw-tripping = <110>; - samsung,efuse-min-value = <40>; - samsung,efuse-value = <55>; - samsung,efuse-max-value = <100>; - samsung,slope = <274761730>; - samsung,dc-value = <25>; - }; - - cros-ec-keyb { - compatible = "google,cros-ec-keyb"; - google,key-rows = <8>; - google,key-columns = <13>; - google,repeat-delay-ms = <240>; - google,repeat-rate-ms = <30>; - google,ghost-filter; - /* - * Keymap entries take the form of 0xRRCCKKKK where - * RR=Row CC=Column KKKK=Key Code - * The values below are for a US keyboard layout and - * are taken from the Linux driver. Note that the - * 102ND key is not used for US keyboards. - */ - linux,keymap = < - /* CAPSLCK F1 B F10 */ - 0x0001003a 0x0002003b 0x00030030 0x00040044 - /* N = R_ALT ESC */ - 0x00060031 0x0008000d 0x000a0064 0x01010001 - /* F4 G F7 H */ - 0x0102003e 0x01030022 0x01040041 0x01060023 - /* ' F9 BKSPACE L_CTRL */ - 0x01080028 0x01090043 0x010b000e 0x0200001d - /* TAB F3 T F6 */ - 0x0201000f 0x0202003d 0x02030014 0x02040040 - /* ] Y 102ND [ */ - 0x0205001b 0x02060015 0x02070056 0x0208001a - /* F8 GRAVE F2 5 */ - 0x02090042 0x03010029 0x0302003c 0x03030006 - /* F5 6 - \ */ - 0x0304003f 0x03060007 0x0308000c 0x030b002b - /* R_CTRL A D F */ - 0x04000061 0x0401001e 0x04020020 0x04030021 - /* S K J ; */ - 0x0404001f 0x04050025 0x04060024 0x04080027 - /* L ENTER Z C */ - 0x04090026 0x040b001c 0x0501002c 0x0502002e - /* V X , M */ - 0x0503002f 0x0504002d 0x05050033 0x05060032 - /* L_SHIFT / . SPACE */ - 0x0507002a 0x05080035 0x05090034 0x050B0039 - /* 1 3 4 2 */ - 0x06010002 0x06020004 0x06030005 0x06040003 - /* 8 7 0 9 */ - 0x06050009 0x06060008 0x0608000b 0x0609000a - /* L_ALT DOWN RIGHT Q */ - 0x060a0038 0x060b006c 0x060c006a 0x07010010 - /* E R W I */ - 0x07020012 0x07030013 0x07040011 0x07050017 - /* U R_SHIFT P O */ - 0x07060016 0x07070036 0x07080019 0x07090018 - /* UP LEFT */ - 0x070b0067 0x070c0069>; - }; -}; diff --git a/board/samsung/dts/exynos5420-smdk5420.dts b/board/samsung/dts/exynos5420-smdk5420.dts deleted file mode 100644 index d73976356d..0000000000 --- a/board/samsung/dts/exynos5420-smdk5420.dts +++ /dev/null @@ -1,169 +0,0 @@ -/* - * SAMSUNG SMDK5420 board device tree source - * - * Copyright (c) 2013 Samsung Electronics Co., Ltd. - * http://www.samsung.com - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -/dts-v1/; -/include/ "exynos5420.dtsi" - -/ { - model = "SAMSUNG SMDK5420 board based on EXYNOS5420"; - compatible = "samsung,smdk5420", "samsung,exynos5"; - - config { - hwid = "smdk5420 TEST A-A 9382"; - }; - - aliases { - i2c0 = "/i2c@12c60000"; - i2c1 = "/i2c@12c70000"; - i2c2 = "/i2c@12c80000"; - i2c3 = "/i2c@12c90000"; - i2c4 = "/i2c@12ca0000"; - i2c5 = "/i2c@12cb0000"; - i2c6 = "/i2c@12cc0000"; - i2c7 = "/i2c@12cd0000"; - i2c8 = "/i2c@12e00000"; - i2c9 = "/i2c@12e10000"; - i2c10 = "/i2c@12e20000"; - spi0 = "/spi@12d20000"; - spi1 = "/spi@12d30000"; - spi2 = "/spi@12d40000"; - spi3 = "/spi@131a0000"; - spi4 = "/spi@131b0000"; - mmc0 = "/mmc@12200000"; - mmc1 = "/mmc@12210000"; - mmc2 = "/mmc@12220000"; - xhci0 = "/xhci@12000000"; - xhci1 = "/xhci@12400000"; - serial0 = "/serial@12C30000"; - console = "/serial@12C30000"; - }; - - tmu@10060000 { - samsung,min-temp = <25>; - samsung,max-temp = <125>; - samsung,start-warning = <95>; - samsung,start-tripping = <105>; - samsung,hw-tripping = <110>; - samsung,efuse-min-value = <40>; - samsung,efuse-value = <55>; - samsung,efuse-max-value = <100>; - samsung,slope = <274761730>; - samsung,dc-value = <25>; - }; - - /* s2mps11 is on i2c bus 4 */ - i2c@12ca0000 { - #address-cells = <1>; - #size-cells = <0>; - pmic@66 { - reg = <0x66>; - compatible = "samsung,s2mps11-pmic"; - }; - }; - - spi@12d20000 { /* spi0 */ - spi-max-frequency = <50000000>; - firmware_storage_spi: flash@0 { - reg = <0>; - }; - }; - - fimd@14400000 { - samsung,vl-freq = <60>; - samsung,vl-col = <2560>; - samsung,vl-row = <1600>; - samsung,vl-width = <2560>; - samsung,vl-height = <1600>; - - samsung,vl-clkp; - samsung,vl-dp; - samsung,vl-bpix = <4>; - - samsung,vl-hspw = <32>; - samsung,vl-hbpd = <80>; - samsung,vl-hfpd = <48>; - samsung,vl-vspw = <6>; - samsung,vl-vbpd = <37>; - samsung,vl-vfpd = <3>; - samsung,vl-cmd-allow-len = <0xf>; - - samsung,winid = <3>; - samsung,interface-mode = <1>; - samsung,dp-enabled = <1>; - samsung,dual-lcd-enabled = <0>; - }; - - sound@3830000 { - samsung,codec-type = "wm8994"; - }; - - i2c@12c70000 { - soundcodec@1a { - reg = <0x1a>; - compatible = "wolfson,wm8994-codec"; - }; - }; - - mmc@12200000 { - samsung,bus-width = <8>; - samsung,timing = <1 3 3>; - samsung,removable = <0>; - samsung,pre-init; - }; - - mmc@12210000 { - status = "disabled"; - }; - - mmc@12220000 { - samsung,bus-width = <4>; - samsung,timing = <1 2 3>; - samsung,removable = <1>; - }; - - mmc@12230000 { - status = "disabled"; - }; - - fimd@14400000 { - /* sysmmu is not used in U-Boot */ - samsung,disable-sysmmu; - }; - - dp@145b0000 { - samsung,lt-status = <0>; - - samsung,master-mode = <0>; - samsung,bist-mode = <0>; - samsung,bist-pattern = <0>; - samsung,h-sync-polarity = <0>; - samsung,v-sync-polarity = <0>; - samsung,interlaced = <0>; - samsung,color-space = <0>; - samsung,dynamic-range = <0>; - samsung,ycbcr-coeff = <0>; - samsung,color-depth = <1>; - }; - - dmc { - mem-type = "ddr3"; - }; - - xhci1: xhci@12400000 { - compatible = "samsung,exynos5250-xhci"; - reg = <0x12400000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; - - phy { - compatible = "samsung,exynos5250-usb3-phy"; - reg = <0x12500000 0x100>; - }; - }; -}; diff --git a/board/toradex/dts/tegra20-colibri_t20_iris.dts b/board/toradex/dts/tegra20-colibri_t20_iris.dts deleted file mode 100644 index c0e54af886..0000000000 --- a/board/toradex/dts/tegra20-colibri_t20_iris.dts +++ /dev/null @@ -1,45 +0,0 @@ -/dts-v1/; - -#include "tegra20.dtsi" - -/ { - model = "Toradex Colibri T20"; - compatible = "toradex,t20", "nvidia,tegra20"; - - aliases { - usb0 = "/usb@c5008000"; - usb1 = "/usb@c5000000"; - usb2 = "/usb@c5004000"; - sdhci0 = "/sdhci@c8000600"; - }; - - usb@c5000000 { - dr_mode = "otg"; - }; - - usb@c5004000 { - nvidia,phy-reset-gpio = <&gpio 169 0>; /* PV1 */ - nvidia,vbus-gpio = <&gpio 217 0>; /* PBB1 */ - }; - - usb@c5008000 { - nvidia,vbus-gpio = <&gpio 178 1>; /* PW2 low-active */ - }; - - nand-controller@70008000 { - nvidia,wp-gpios = <&gpio 144 0>; /* PS0 */ - nvidia,width = <8>; - nvidia,timing = <15 100 25 80 25 10 15 10 100>; - - nand@0 { - reg = <0>; - compatible = "nand-flash"; - }; - }; - - sdhci@c8000600 { - status = "okay"; - cd-gpios = <&gpio 23 1>; /* gpio PC7 */ - bus-width = <4>; - }; -}; diff --git a/board/xilinx/dts/microblaze-generic.dts b/board/xilinx/dts/microblaze-generic.dts deleted file mode 100644 index 203330987b..0000000000 --- a/board/xilinx/dts/microblaze-generic.dts +++ /dev/null @@ -1,7 +0,0 @@ -/dts-v1/; -/ { - #address-cells = <1>; - #size-cells = <1>; - aliases { - } ; -} ; diff --git a/board/xilinx/dts/zynq-microzed.dts b/board/xilinx/dts/zynq-microzed.dts deleted file mode 100644 index 6da71c116d..0000000000 --- a/board/xilinx/dts/zynq-microzed.dts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Xilinx MicroZED board DTS - * - * Copyright (C) 2013 Xilinx, Inc. - * - * SPDX-License-Identifier: GPL-2.0+ - */ -/dts-v1/; -#include "zynq-7000.dtsi" - -/ { - model = "Zynq MicroZED Board"; - compatible = "xlnx,zynq-microzed", "xlnx,zynq-7000"; -}; diff --git a/board/xilinx/dts/zynq-zc702.dts b/board/xilinx/dts/zynq-zc702.dts deleted file mode 100644 index 667dc28256..0000000000 --- a/board/xilinx/dts/zynq-zc702.dts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Xilinx ZC702 board DTS - * - * Copyright (C) 2013 Xilinx, Inc. - * - * SPDX-License-Identifier: GPL-2.0+ - */ -/dts-v1/; -#include "zynq-7000.dtsi" - -/ { - model = "Zynq ZC702 Board"; - compatible = "xlnx,zynq-zc702", "xlnx,zynq-7000"; -}; diff --git a/board/xilinx/dts/zynq-zc706.dts b/board/xilinx/dts/zynq-zc706.dts deleted file mode 100644 index 526fc8888b..0000000000 --- a/board/xilinx/dts/zynq-zc706.dts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Xilinx ZC706 board DTS - * - * Copyright (C) 2013 Xilinx, Inc. - * - * SPDX-License-Identifier: GPL-2.0+ - */ -/dts-v1/; -#include "zynq-7000.dtsi" - -/ { - model = "Zynq ZC706 Board"; - compatible = "xlnx,zynq-zc706", "xlnx,zynq-7000"; -}; diff --git a/board/xilinx/dts/zynq-zc770-xm010.dts b/board/xilinx/dts/zynq-zc770-xm010.dts deleted file mode 100644 index 8b542a109b..0000000000 --- a/board/xilinx/dts/zynq-zc770-xm010.dts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Xilinx ZC770 XM010 board DTS - * - * Copyright (C) 2013 Xilinx, Inc. - * - * SPDX-License-Identifier: GPL-2.0+ - */ -/dts-v1/; -#include "zynq-7000.dtsi" - -/ { - model = "Zynq ZC770 XM010 Board"; - compatible = "xlnx,zynq-zc770-xm010", "xlnx,zynq-7000"; -}; diff --git a/board/xilinx/dts/zynq-zc770-xm012.dts b/board/xilinx/dts/zynq-zc770-xm012.dts deleted file mode 100644 index 0379a07068..0000000000 --- a/board/xilinx/dts/zynq-zc770-xm012.dts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Xilinx ZC770 XM012 board DTS - * - * Copyright (C) 2013 Xilinx, Inc. - * - * SPDX-License-Identifier: GPL-2.0+ - */ -/dts-v1/; -#include "zynq-7000.dtsi" - -/ { - model = "Zynq ZC770 XM012 Board"; - compatible = "xlnx,zynq-zc770-xm012", "xlnx,zynq-7000"; -}; diff --git a/board/xilinx/dts/zynq-zc770-xm013.dts b/board/xilinx/dts/zynq-zc770-xm013.dts deleted file mode 100644 index a4f9e05fc0..0000000000 --- a/board/xilinx/dts/zynq-zc770-xm013.dts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Xilinx ZC770 XM013 board DTS - * - * Copyright (C) 2013 Xilinx, Inc. - * - * SPDX-License-Identifier: GPL-2.0+ - */ -/dts-v1/; -#include "zynq-7000.dtsi" - -/ { - model = "Zynq ZC770 XM013 Board"; - compatible = "xlnx,zynq-zc770-xm013", "xlnx,zynq-7000"; -}; diff --git a/board/xilinx/dts/zynq-zed.dts b/board/xilinx/dts/zynq-zed.dts deleted file mode 100644 index 91a5deba4a..0000000000 --- a/board/xilinx/dts/zynq-zed.dts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Xilinx ZED board DTS - * - * Copyright (C) 2013 Xilinx, Inc. - * - * SPDX-License-Identifier: GPL-2.0+ - */ -/dts-v1/; -#include "zynq-7000.dtsi" - -/ { - model = "Zynq ZED Board"; - compatible = "xlnx,zynq-zed", "xlnx,zynq-7000"; -}; diff --git a/dts/Makefile b/dts/Makefile index c47fba787c..5d2abd9f5c 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -12,9 +12,9 @@ ifeq ($(DEVICE_TREE),) DEVICE_TREE := notfound endif -DTS := $(srctree)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts +DTS := $(srctree)/arch/$(ARCH)/dts/$(DEVICE_TREE).dts -DTC_FLAGS += -i $(srctree)/arch/$(ARCH)/dts -R 4 -p 0x1000 +DTC_FLAGS += -R 4 -p 0x1000 $(obj)/dt.dtb: $(DTS) FORCE $(call if_changed_dep,dtc) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index ee3ceac7d1..02b17b1057 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -153,7 +153,6 @@ ld_flags = $(LDFLAGS) $(ldflags-y) # Modified for U-Boot dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \ - -I$(srctree)/board/$(VENDOR)/dts/ \ -I$(srctree)/arch/$(ARCH)/dts \ -undef -D__DTS__ -- cgit v1.2.3 From 365475e6d14bc1ea9d218c0fd1fe96878a9db94e Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 13 Feb 2014 18:30:26 +0900 Subject: Move #ifdef(CONFIG_DISPLAY_CPUINFO) from caller to callee - When CONFIG_DISPLAY_CPUINFO is not enabled, print_cpuinfo() should be defined as an empty function in a header, include/common.h - Remove #ifdef CONFIG_DISPLAY_CPUINFO .. #endif from caller, common/board_f.c and arch/arm/lib/board.c - Remove redundant prototypes in arch/arm/lib/board.c, arch/arm/include/asm/arch-am33x/sys_proto.h and board/nokia/rx51/rx51.h, keeping the one in include/common.h - Add #ifdef CONFIG_DISPLAY_CPUINFO to the func definition where it is missing Signed-off-by: Masahiro Yamada --- arch/arm/cpu/armv7/omap-common/hwinit-common.c | 3 +++ arch/arm/include/asm/arch-am33xx/sys_proto.h | 4 ---- arch/arm/lib/board.c | 4 ---- board/altera/socfpga/socfpga_cyclone5.c | 2 ++ board/freescale/mx53loco/mx53loco.c | 2 ++ board/nokia/rx51/rx51.h | 2 -- common/board_f.c | 2 -- include/common.h | 7 +++++++ 8 files changed, 14 insertions(+), 12 deletions(-) (limited to 'board') diff --git a/arch/arm/cpu/armv7/omap-common/hwinit-common.c b/arch/arm/cpu/armv7/omap-common/hwinit-common.c index bf2951031d..ade744e31f 100644 --- a/arch/arm/cpu/armv7/omap-common/hwinit-common.c +++ b/arch/arm/cpu/armv7/omap-common/hwinit-common.c @@ -248,6 +248,7 @@ u32 get_device_type(void) (DEVICE_TYPE_MASK)) >> DEVICE_TYPE_SHIFT; } +#if defined(CONFIG_DISPLAY_CPUINFO) /* * Print CPU information */ @@ -258,6 +259,8 @@ int print_cpuinfo(void) return 0; } +#endif + #ifndef CONFIG_SYS_DCACHE_OFF void enable_caches(void) { diff --git a/arch/arm/include/asm/arch-am33xx/sys_proto.h b/arch/arm/include/asm/arch-am33xx/sys_proto.h index 87b7d367b9..2e5c356e44 100644 --- a/arch/arm/include/asm/arch-am33xx/sys_proto.h +++ b/arch/arm/include/asm/arch-am33xx/sys_proto.h @@ -17,10 +17,6 @@ u32 get_cpu_rev(void); u32 get_sysboot_value(void); -#ifdef CONFIG_DISPLAY_CPUINFO -int print_cpuinfo(void); -#endif - extern struct ctrl_stat *cstat; u32 get_device_type(void); void save_omap_boot_params(void); diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 38b9c7d3c5..c320a35166 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -197,8 +197,6 @@ static int arm_pci_init(void) */ typedef int (init_fnc_t) (void); -int print_cpuinfo(void); - void __dram_init_banksize(void) { gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; @@ -250,9 +248,7 @@ init_fnc_t *init_sequence[] = { serial_init, /* serial communications setup */ console_init_f, /* stage 1 init of console */ display_banner, /* say that we are here */ -#if defined(CONFIG_DISPLAY_CPUINFO) print_cpuinfo, /* display cpu info (and speed) */ -#endif #if defined(CONFIG_DISPLAY_BOARDINFO) checkboard, /* display board info */ #endif diff --git a/board/altera/socfpga/socfpga_cyclone5.c b/board/altera/socfpga/socfpga_cyclone5.c index 576066bef1..a960eb6002 100644 --- a/board/altera/socfpga/socfpga_cyclone5.c +++ b/board/altera/socfpga/socfpga_cyclone5.c @@ -12,6 +12,7 @@ DECLARE_GLOBAL_DATA_PTR; +#if defined(CONFIG_DISPLAY_CPUINFO) /* * Print CPU information */ @@ -20,6 +21,7 @@ int print_cpuinfo(void) puts("CPU : Altera SOCFPGA Platform\n"); return 0; } +#endif /* * Print Board information diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c index db0bf17363..08dd66fcc6 100644 --- a/board/freescale/mx53loco/mx53loco.c +++ b/board/freescale/mx53loco/mx53loco.c @@ -343,6 +343,7 @@ int board_early_init_f(void) return 0; } +#if defined(CONFIG_DISPLAY_CPUINFO) int print_cpuinfo(void) { u32 cpurev; @@ -356,6 +357,7 @@ int print_cpuinfo(void) printf("Reset cause: %s\n", get_reset_cause()); return 0; } +#endif /* * Do not overwrite the console diff --git a/board/nokia/rx51/rx51.h b/board/nokia/rx51/rx51.h index 4a230dd596..0d2f0a54c5 100644 --- a/board/nokia/rx51/rx51.h +++ b/board/nokia/rx51/rx51.h @@ -22,8 +22,6 @@ struct emu_hal_params_rx51 { u32 param4; }; -int print_cpuinfo(void); - /* * IEN - Input Enable * IDIS - Input Disable diff --git a/common/board_f.c b/common/board_f.c index d0ee6f7656..02965b0df7 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -887,9 +887,7 @@ static init_fnc_t init_sequence_f[] = { #ifdef CONFIG_PPC checkcpu, #endif -#if defined(CONFIG_DISPLAY_CPUINFO) print_cpuinfo, /* display cpu info (and speed) */ -#endif #if defined(CONFIG_MPC5xxx) prt_mpc5xxx_clks, #endif /* CONFIG_MPC5xxx */ diff --git a/include/common.h b/include/common.h index 672c0b5c17..08b294cfd9 100644 --- a/include/common.h +++ b/include/common.h @@ -304,7 +304,14 @@ extern ulong monitor_flash_len; int mac_read_from_eeprom(void); extern u8 __dtb_dt_begin[]; /* embedded device tree blob */ int set_cpu_clk_info(void); +#if defined(CONFIG_DISPLAY_CPUINFO) int print_cpuinfo(void); +#else +static inline int print_cpuinfo(void) +{ + return 0; +} +#endif int update_flash_size(int flash_size); /** -- cgit v1.2.3