diff options
-rw-r--r-- | Makefile | 649 | ||||
-rw-r--r-- | arch/arm/Makefile | 4 | ||||
-rw-r--r-- | arch/arm/boards/afi-gf/config.h | 22 | ||||
-rw-r--r-- | arch/arm/boards/altera-socdk/config.h | 1 | ||||
-rw-r--r-- | arch/arm/boards/ebv-socrates/config.h | 1 | ||||
-rw-r--r-- | arch/arm/boards/globalscale-guruplug/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/boards/globalscale-guruplug/board.c | 17 | ||||
-rw-r--r-- | arch/arm/boards/globalscale-mirabox/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/boards/globalscale-mirabox/board.c | 17 | ||||
-rw-r--r-- | arch/arm/boards/marvell-armada-xp-gp/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/boards/marvell-armada-xp-gp/board.c | 17 | ||||
-rw-r--r-- | arch/arm/boards/netgear-rn104/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/boards/netgear-rn104/board.c | 1 | ||||
-rw-r--r-- | arch/arm/boards/plathome-openblocks-a6/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/boards/plathome-openblocks-a6/board.c | 1 | ||||
-rw-r--r-- | arch/arm/boards/plathome-openblocks-ax3/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/boards/plathome-openblocks-ax3/board.c | 17 | ||||
-rw-r--r-- | arch/arm/boards/solidrun-cubox/config.h | 4 | ||||
-rw-r--r-- | arch/arm/boards/terasic-de0-nano-soc/config.h | 1 | ||||
-rw-r--r-- | arch/arm/boards/terasic-sockit/config.h | 1 | ||||
-rw-r--r-- | arch/arm/boards/turris-omnia/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/boards/turris-omnia/board.c | 1 | ||||
-rw-r--r-- | arch/arm/boards/usi-topkick/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/boards/usi-topkick/board.c | 17 | ||||
-rw-r--r-- | arch/arm/boards/zylonite/board.c | 2 | ||||
-rw-r--r-- | arch/arm/boards/zylonite/zylonite.h | 19 | ||||
-rw-r--r-- | arch/arm/configs/imx28_defconfig | 16 | ||||
-rw-r--r-- | arch/arm/dts/imx6qdl-phytec-pfla02.dtsi | 5 | ||||
-rw-r--r-- | arch/arm/dts/vexpress-v2p-ca9.dts | 26 | ||||
-rw-r--r-- | arch/arm/mach-at91/include/mach/board.h | 11 | ||||
-rw-r--r-- | arch/arm/mach-imx/Kconfig | 10 | ||||
-rw-r--r-- | arch/arm/mach-imx/boot.c | 43 | ||||
-rw-r--r-- | arch/arm/mach-imx/include/mach/habv4-imx6-gencsf.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/include/mach/habv4-imx8-gencsf.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/include/mach/imx6.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-mxs/power-init.c | 2 | ||||
-rw-r--r-- | arch/arm/tools/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/Makefile | 17 | ||||
-rw-r--r-- | arch/mips/boards/dlink-dir-320/Makefile | 1 | ||||
-rw-r--r-- | arch/mips/boards/dlink-dir-320/board.c | 15 | ||||
-rw-r--r-- | arch/mips/boards/loongson-ls1b/include/board/debug_ll.h | 22 | ||||
-rw-r--r-- | arch/mips/boards/netgear-wg102/include/board/debug_ll.h | 21 | ||||
-rw-r--r-- | arch/mips/boards/qemu-malta/include/board/debug_ll.h | 18 | ||||
-rw-r--r-- | arch/nios2/include/asm/io.h | 2 | ||||
-rw-r--r-- | arch/powerpc/Kbuild | 2 | ||||
-rw-r--r-- | arch/powerpc/Kconfig (renamed from arch/ppc/Kconfig) | 4 | ||||
-rw-r--r-- | arch/powerpc/Makefile (renamed from arch/ppc/Makefile) | 23 | ||||
-rw-r--r-- | arch/powerpc/boards/.gitignore (renamed from arch/ppc/boards/.gitignore) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1010rdb/Makefile (renamed from arch/ppc/boards/freescale-p1010rdb/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1010rdb/config.h (renamed from arch/ppc/boards/freescale-p1010rdb/config.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1010rdb/ddr.c (renamed from arch/ppc/boards/freescale-p1010rdb/ddr.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init (renamed from arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config (renamed from arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1010rdb/law.c (renamed from arch/ppc/boards/freescale-p1010rdb/law.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1010rdb/p1010rdb.c (renamed from arch/ppc/boards/freescale-p1010rdb/p1010rdb.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1010rdb/p1010rdb.h (renamed from arch/ppc/boards/freescale-p1010rdb/p1010rdb.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1010rdb/tlb.c (renamed from arch/ppc/boards/freescale-p1010rdb/tlb.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/Makefile (renamed from arch/ppc/boards/freescale-p1022ds/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/config.h (renamed from arch/ppc/boards/freescale-p1022ds/config.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/ddr.c (renamed from arch/ppc/boards/freescale-p1022ds/ddr.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init (renamed from arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config (renamed from arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/ics307_clk.c (renamed from arch/ppc/boards/freescale-p1022ds/ics307_clk.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/law.c (renamed from arch/ppc/boards/freescale-p1022ds/law.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/p1022ds.c (renamed from arch/ppc/boards/freescale-p1022ds/p1022ds.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/p1022ds.h (renamed from arch/ppc/boards/freescale-p1022ds/p1022ds.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p1022ds/tlb.c (renamed from arch/ppc/boards/freescale-p1022ds/tlb.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p2020rdb/Makefile (renamed from arch/ppc/boards/freescale-p2020rdb/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p2020rdb/config.h (renamed from arch/ppc/boards/freescale-p2020rdb/config.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init (renamed from arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config (renamed from arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p2020rdb/law.c (renamed from arch/ppc/boards/freescale-p2020rdb/law.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p2020rdb/p2020rdb.c (renamed from arch/ppc/boards/freescale-p2020rdb/p2020rdb.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/freescale-p2020rdb/tlb.c (renamed from arch/ppc/boards/freescale-p2020rdb/tlb.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/Makefile (renamed from arch/ppc/boards/owc-da923rc/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/config.h (renamed from arch/ppc/boards/owc-da923rc/config.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/da923rc.c (renamed from arch/ppc/boards/owc-da923rc/da923rc.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/ddr.c (renamed from arch/ppc/boards/owc-da923rc/ddr.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/boot (renamed from arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/boot) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init (renamed from arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/defaultenv-owc-da923rc/config (renamed from arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/config) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/law.c (renamed from arch/ppc/boards/owc-da923rc/law.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/nand.c (renamed from arch/ppc/boards/owc-da923rc/nand.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/product_data.c (renamed from arch/ppc/boards/owc-da923rc/product_data.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/product_data.h (renamed from arch/ppc/boards/owc-da923rc/product_data.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/owc-da923rc/tlb.c (renamed from arch/ppc/boards/owc-da923rc/tlb.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/pcm030/Makefile (renamed from arch/ppc/boards/pcm030/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/pcm030/barebox.lds.S (renamed from arch/ppc/boards/pcm030/barebox.lds.S) | 2 | ||||
-rw-r--r-- | arch/powerpc/boards/pcm030/config.h (renamed from arch/ppc/boards/pcm030/config.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/pcm030/eeprom.c (renamed from arch/ppc/boards/pcm030/eeprom.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/pcm030/env/init/mtdparts-nor (renamed from arch/ppc/boards/pcm030/env/init/mtdparts-nor) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/pcm030/env/nv/linux.bootargs.console (renamed from arch/ppc/boards/pcm030/env/nv/linux.bootargs.console) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/pcm030/mt46v32m16-75.h (renamed from arch/ppc/boards/pcm030/mt46v32m16-75.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/boards/pcm030/pcm030.c (renamed from arch/ppc/boards/pcm030/pcm030.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/configs/owc_da923rc_defconfig (renamed from arch/ppc/configs/owc_da923rc_defconfig) | 0 | ||||
-rw-r--r-- | arch/powerpc/configs/p1010rdb_defconfig (renamed from arch/ppc/configs/p1010rdb_defconfig) | 0 | ||||
-rw-r--r-- | arch/powerpc/configs/p1022ds_defconfig (renamed from arch/ppc/configs/p1022ds_defconfig) | 0 | ||||
-rw-r--r-- | arch/powerpc/configs/p2020rdb_defconfig (renamed from arch/ppc/configs/p2020rdb_defconfig) | 0 | ||||
-rw-r--r-- | arch/powerpc/configs/pcm030_defconfig (renamed from arch/ppc/configs/pcm030_defconfig) | 2 | ||||
-rw-r--r-- | arch/powerpc/cpu-85xx/Makefile (renamed from arch/ppc/cpu-85xx/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/cpu-85xx/fixed_ivor.S (renamed from arch/ppc/cpu-85xx/fixed_ivor.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/cpu-85xx/mmu.c (renamed from arch/ppc/cpu-85xx/mmu.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/cpu-85xx/resetvec.S (renamed from arch/ppc/cpu-85xx/resetvec.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/cpu-85xx/start.S (renamed from arch/ppc/cpu-85xx/start.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/cpu-85xx/tlb.c (renamed from arch/ppc/cpu-85xx/tlb.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/cpu-85xx/traps.c (renamed from arch/ppc/cpu-85xx/traps.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/Makefile (renamed from arch/ppc/ddr-8xxx/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/common_timing_params.h (renamed from arch/ppc/ddr-8xxx/common_timing_params.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/ctrl_regs.c (renamed from arch/ppc/ddr-8xxx/ctrl_regs.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/ddr.h (renamed from arch/ppc/ddr-8xxx/ddr.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/ddr2_dimm_params.c (renamed from arch/ppc/ddr-8xxx/ddr2_dimm_params.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/ddr3_dimm_params.c (renamed from arch/ppc/ddr-8xxx/ddr3_dimm_params.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/ddr_setctrl.c (renamed from arch/ppc/ddr-8xxx/ddr_setctrl.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/lc_common_dimm_params.c (renamed from arch/ppc/ddr-8xxx/lc_common_dimm_params.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/main.c (renamed from arch/ppc/ddr-8xxx/main.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/options.c (renamed from arch/ppc/ddr-8xxx/options.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/ddr-8xxx/util.c (renamed from arch/ppc/ddr-8xxx/util.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/atomic.h (renamed from arch/ppc/include/asm/atomic.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/bitops.h (renamed from arch/ppc/include/asm/bitops.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/bitsperlong.h (renamed from arch/ppc/include/asm/bitsperlong.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/byteorder.h (renamed from arch/ppc/include/asm/byteorder.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/cache.h (renamed from arch/ppc/include/asm/cache.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/common.h (renamed from arch/ppc/include/asm/common.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/config.h (renamed from arch/ppc/include/asm/config.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/dma.h (renamed from arch/ppc/include/asm/dma.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/elf.h (renamed from arch/ppc/include/asm/elf.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/fsl_ddr_dimm_params.h (renamed from arch/ppc/include/asm/fsl_ddr_dimm_params.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/fsl_ddr_sdram.h (renamed from arch/ppc/include/asm/fsl_ddr_sdram.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/fsl_ifc.h (renamed from arch/ppc/include/asm/fsl_ifc.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/fsl_law.h (renamed from arch/ppc/include/asm/fsl_law.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/fsl_lbc.h (renamed from arch/ppc/include/asm/fsl_lbc.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/io.h (renamed from arch/ppc/include/asm/io.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/mmu.h (renamed from arch/ppc/include/asm/mmu.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/module.h (renamed from arch/ppc/include/asm/module.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/pci_io.h (renamed from arch/ppc/include/asm/pci_io.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/posix_types.h (renamed from arch/ppc/include/asm/posix_types.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/ppc_asm.tmpl (renamed from arch/ppc/include/asm/ppc_asm.tmpl) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/ppc_defs.h (renamed from arch/ppc/include/asm/ppc_defs.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/processor.h (renamed from arch/ppc/include/asm/processor.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/ptrace.h (renamed from arch/ppc/include/asm/ptrace.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/sections.h (renamed from arch/ppc/include/asm/sections.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/sigcontext.h (renamed from arch/ppc/include/asm/sigcontext.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/signal.h (renamed from arch/ppc/include/asm/signal.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/status_led.h (renamed from arch/ppc/include/asm/status_led.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/string.h (renamed from arch/ppc/include/asm/string.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/swab.h (renamed from arch/ppc/include/asm/swab.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/types.h (renamed from arch/ppc/include/asm/types.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/include/asm/unaligned.h (renamed from arch/ppc/include/asm/unaligned.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/Makefile (renamed from arch/ppc/lib/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/asm-offsets.c (renamed from arch/ppc/lib/asm-offsets.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/bat_rw.c (renamed from arch/ppc/lib/bat_rw.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/board.c (renamed from arch/ppc/lib/board.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/crtsavres.S (renamed from arch/ppc/lib/crtsavres.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/extable.c (renamed from arch/ppc/lib/extable.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/kgdb.c (renamed from arch/ppc/lib/kgdb.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/misc.S (renamed from arch/ppc/lib/misc.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/module.c (renamed from arch/ppc/lib/module.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/ppclinux.c (renamed from arch/ppc/lib/ppclinux.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/ppcstring.S (renamed from arch/ppc/lib/ppcstring.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/reloc.S (renamed from arch/ppc/lib/reloc.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/lib/ticks.S (renamed from arch/ppc/lib/ticks.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/Kconfig (renamed from arch/ppc/mach-mpc5xxx/Kconfig) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/Makefile (renamed from arch/ppc/mach-mpc5xxx/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/cpu.c (renamed from arch/ppc/mach-mpc5xxx/cpu.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/cpu_init.c (renamed from arch/ppc/mach-mpc5xxx/cpu_init.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/firmware_sc_task.impl.S (renamed from arch/ppc/mach-mpc5xxx/firmware_sc_task.impl.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/firmware_sc_task_bestcomm.impl.S (renamed from arch/ppc/mach-mpc5xxx/firmware_sc_task_bestcomm.impl.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/include/mach/clock.h (renamed from arch/ppc/mach-mpc5xxx/include/mach/clock.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/include/mach/mpc5xxx.h (renamed from arch/ppc/mach-mpc5xxx/include/mach/mpc5xxx.h) | 2 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/include/mach/sdma.h (renamed from arch/ppc/mach-mpc5xxx/include/mach/sdma.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/io.S (renamed from arch/ppc/mach-mpc5xxx/io.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/loadtask.c (renamed from arch/ppc/mach-mpc5xxx/loadtask.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/pci_mpc5200.c (renamed from arch/ppc/mach-mpc5xxx/pci_mpc5200.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/reginfo.c (renamed from arch/ppc/mach-mpc5xxx/reginfo.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/speed.c (renamed from arch/ppc/mach-mpc5xxx/speed.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/start.S (renamed from arch/ppc/mach-mpc5xxx/start.S) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/time.c (renamed from arch/ppc/mach-mpc5xxx/time.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc5xxx/traps.c (renamed from arch/ppc/mach-mpc5xxx/traps.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/.gitignore (renamed from arch/ppc/mach-mpc85xx/.gitignore) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/Kconfig (renamed from arch/ppc/mach-mpc85xx/Kconfig) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/Makefile (renamed from arch/ppc/mach-mpc85xx/Makefile) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/barebox.lds.S (renamed from arch/ppc/mach-mpc85xx/barebox.lds.S) | 4 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/cpu.c (renamed from arch/ppc/mach-mpc85xx/cpu.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/cpu_init.c (renamed from arch/ppc/mach-mpc85xx/cpu_init.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/cpuid.c (renamed from arch/ppc/mach-mpc85xx/cpuid.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/eth-devices.c (renamed from arch/ppc/mach-mpc85xx/eth-devices.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/fdt.c (renamed from arch/ppc/mach-mpc85xx/fdt.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/fsl_gpio.c (renamed from arch/ppc/mach-mpc85xx/fsl_gpio.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/fsl_i2c.c (renamed from arch/ppc/mach-mpc85xx/fsl_i2c.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/fsl_law.c (renamed from arch/ppc/mach-mpc85xx/fsl_law.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/clock.h (renamed from arch/ppc/mach-mpc85xx/include/mach/clock.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/config_mpc85xx.h (renamed from arch/ppc/mach-mpc85xx/include/mach/config_mpc85xx.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/early_udelay.h (renamed from arch/ppc/mach-mpc85xx/include/mach/early_udelay.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/ffs64.h (renamed from arch/ppc/mach-mpc85xx/include/mach/ffs64.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/fsl_i2c.h (renamed from arch/ppc/mach-mpc85xx/include/mach/fsl_i2c.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/gianfar.h (renamed from arch/ppc/mach-mpc85xx/include/mach/gianfar.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/gpio.h (renamed from arch/ppc/mach-mpc85xx/include/mach/gpio.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/immap_85xx.h (renamed from arch/ppc/mach-mpc85xx/include/mach/immap_85xx.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/mmu.h (renamed from arch/ppc/mach-mpc85xx/include/mach/mmu.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/include/mach/mpc85xx.h (renamed from arch/ppc/mach-mpc85xx/include/mach/mpc85xx.h) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/speed.c (renamed from arch/ppc/mach-mpc85xx/speed.c) | 0 | ||||
-rw-r--r-- | arch/powerpc/mach-mpc85xx/time.c (renamed from arch/ppc/mach-mpc85xx/time.c) | 0 | ||||
-rw-r--r-- | arch/riscv/Makefile | 4 | ||||
-rw-r--r-- | arch/sandbox/Makefile | 4 | ||||
-rw-r--r-- | arch/sandbox/os/Makefile | 4 | ||||
-rw-r--r-- | arch/x86/Makefile | 4 | ||||
-rw-r--r-- | common/Kconfig | 17 | ||||
-rw-r--r-- | common/Makefile | 4 | ||||
-rw-r--r-- | common/filetype.c | 4 | ||||
-rw-r--r-- | common/image.c | 1 | ||||
-rw-r--r-- | common/imd.c | 7 | ||||
-rw-r--r-- | common/startup.c | 14 | ||||
-rw-r--r-- | drivers/aiodev/Kconfig | 2 | ||||
-rw-r--r-- | drivers/bus/Kconfig | 4 | ||||
-rw-r--r-- | drivers/clk/mxs/clk-imx28.c | 17 | ||||
-rw-r--r-- | drivers/clocksource/Kconfig | 40 | ||||
-rw-r--r-- | drivers/crypto/caam/Kconfig | 2 | ||||
-rw-r--r-- | drivers/crypto/imx-scc/Kconfig | 6 | ||||
-rw-r--r-- | drivers/ddr/fsl/Kconfig | 2 | ||||
-rw-r--r-- | drivers/gpio/Kconfig | 28 | ||||
-rw-r--r-- | drivers/hw_random/Kconfig | 4 | ||||
-rw-r--r-- | drivers/input/Kconfig | 2 | ||||
-rw-r--r-- | drivers/mci/Kconfig | 15 | ||||
-rw-r--r-- | drivers/mci/atmel_mci.c | 2 | ||||
-rw-r--r-- | drivers/mci/mxs.c | 9 | ||||
-rw-r--r-- | drivers/memory/Kconfig | 2 | ||||
-rw-r--r-- | drivers/mfd/Kconfig | 2 | ||||
-rw-r--r-- | drivers/mtd/mtdraw.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/Kconfig | 9 | ||||
-rw-r--r-- | drivers/net/Kconfig | 10 | ||||
-rw-r--r-- | drivers/net/cpsw.c | 154 | ||||
-rw-r--r-- | drivers/net/designware_eqos.c | 10 | ||||
-rw-r--r-- | drivers/net/phy/Kconfig | 2 | ||||
-rw-r--r-- | drivers/pci/Kconfig | 4 | ||||
-rw-r--r-- | drivers/phy/Kconfig | 2 | ||||
-rw-r--r-- | drivers/pinctrl/Kconfig | 12 | ||||
-rw-r--r-- | drivers/pwm/Kconfig | 5 | ||||
-rw-r--r-- | drivers/serial/Kconfig | 1 | ||||
-rw-r--r-- | drivers/serial/serial_auart.c | 1 | ||||
-rw-r--r-- | drivers/spi/Kconfig | 2 | ||||
-rw-r--r-- | drivers/usb/imx/Kconfig | 8 | ||||
-rw-r--r-- | drivers/usb/imx/Makefile | 3 | ||||
-rw-r--r-- | drivers/usb/imx/chipidea-imx.c | 60 | ||||
-rw-r--r-- | drivers/usb/imx/imx-usb-phy.c | 1 | ||||
-rw-r--r-- | drivers/video/backlight-pwm.c | 2 | ||||
-rw-r--r-- | drivers/video/ssd1307fb.c | 2 | ||||
-rw-r--r-- | drivers/watchdog/Kconfig | 18 | ||||
-rw-r--r-- | drivers/watchdog/im28wd.c | 9 | ||||
-rw-r--r-- | dts/Bindings/Makefile | 21 | ||||
-rw-r--r-- | dts/Bindings/display/panel/leadtek,ltk500hd1829.yaml | 1 | ||||
-rw-r--r-- | dts/Bindings/display/panel/lvds.yaml | 10 | ||||
-rw-r--r-- | dts/Bindings/display/panel/xinpeng,xpp055c272.yaml | 1 | ||||
-rw-r--r-- | dts/Bindings/dma/socionext,uniphier-xdmac.yaml | 7 | ||||
-rw-r--r-- | dts/Bindings/iio/adc/st,stm32-adc.yaml | 2 | ||||
-rw-r--r-- | dts/Bindings/mfd/st,stpmic1.yaml | 2 | ||||
-rw-r--r-- | dts/Bindings/phy/qcom,qusb2-phy.yaml | 6 | ||||
-rw-r--r-- | dts/Bindings/regulator/mps,mp5416.yaml | 1 | ||||
-rw-r--r-- | dts/Bindings/regulator/mps,mpq7920.yaml | 3 | ||||
-rw-r--r-- | dts/Bindings/regulator/rohm,bd71828-regulator.yaml | 6 | ||||
-rw-r--r-- | dts/Bindings/regulator/rohm,bd71837-regulator.yaml | 6 | ||||
-rw-r--r-- | dts/Bindings/regulator/rohm,bd71847-regulator.yaml | 6 | ||||
-rw-r--r-- | dts/Bindings/sound/rockchip-i2s.yaml | 3 | ||||
-rw-r--r-- | dts/Bindings/sound/rockchip-spdif.txt | 45 | ||||
-rw-r--r-- | dts/Bindings/sound/rockchip-spdif.yaml | 101 | ||||
-rw-r--r-- | dts/Bindings/usb/renesas,usb3-peri.yaml | 1 | ||||
-rw-r--r-- | dts/Bindings/usb/renesas,usbhs.yaml | 1 | ||||
-rw-r--r-- | dts/Bindings/usb/usb-xhci.txt | 3 | ||||
-rw-r--r-- | dts/src/arm/bcm2835-rpi.dtsi | 3 | ||||
-rw-r--r-- | dts/src/arm/bcm283x.dtsi | 1 | ||||
-rw-r--r-- | dts/src/arm/omap3-n950-n9.dtsi | 5 | ||||
-rw-r--r-- | firmware/Makefile | 2 | ||||
-rw-r--r-- | fs/fs.c | 1 | ||||
-rw-r--r-- | include/asm-generic/io.h | 4 | ||||
-rw-r--r-- | include/common.h | 27 | ||||
-rw-r--r-- | include/filetype.h | 1 | ||||
-rw-r--r-- | include/linux/export.h | 39 | ||||
-rw-r--r-- | include/linux/phy/phy.h | 8 | ||||
-rw-r--r-- | include/module.h | 28 | ||||
-rw-r--r-- | include/of.h | 4 | ||||
-rw-r--r-- | include/platform_data/atmel-mci.h | 15 | ||||
-rw-r--r-- | include/usb/chipidea-imx.h | 13 | ||||
-rw-r--r-- | lib/Kconfig | 2 | ||||
-rw-r--r-- | scripts/Kbuild.include | 113 | ||||
-rw-r--r-- | scripts/Makefile.build | 70 | ||||
-rw-r--r-- | scripts/Makefile.host | 2 | ||||
-rw-r--r-- | scripts/Makefile.lib | 2 | ||||
-rw-r--r-- | scripts/bareboximd.c | 13 | ||||
-rwxr-xr-x | scripts/mkmakefile | 43 | ||||
-rwxr-xr-x | scripts/tags.sh | 282 |
289 files changed, 1326 insertions, 1153 deletions
@@ -1,5 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0 VERSION = 2020 -PATCHLEVEL = 04 +PATCHLEVEL = 05 SUBLEVEL = 0 EXTRAVERSION = NAME = None @@ -10,11 +11,9 @@ NAME = None # 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 +# That's our default target when none is given on the command line +PHONY := _all +_all: # We are using a recursive build, so we need to do a little thinking # to get the ordering right. @@ -22,8 +21,8 @@ MAKEFLAGS += -rR --no-print-directory # 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 barebox), we will call a sub make in that other dir, and +# unavoidable when linking the built-in.a 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. # @@ -32,6 +31,45 @@ MAKEFLAGS += -rR --no-print-directory # descending is started. They are now explicitly listed as the # prepare rule. +ifneq ($(sub_make_done),1) + +# Do not use make's built-in rules and variables +# (this increases performance and avoids hard-to-debug behaviour) +MAKEFLAGS += -rR + +# Avoid funny character set dependencies +unexport LC_ALL +LC_COLLATE=C +LC_NUMERIC=C +export LC_COLLATE LC_NUMERIC + +# Avoid interference with shell env settings +unexport GREP_OPTIONS + +# 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. +# If KBUILD_VERBOSE equals 2 then give the reason why each target is rebuilt. +# # To put more focus on warnings, be less verbose as default # Use 'make V=1' to see the full commands @@ -42,6 +80,119 @@ ifndef KBUILD_VERBOSE KBUILD_VERBOSE = 0 endif +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 ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),) + quiet=silent_ +endif + +export quiet Q KBUILD_VERBOSE + +# Kbuild will save output files in the current working directory. +# This does not need to match to the root of the kernel source tree. +# +# For example, you can do this: +# +# cd /dir/to/store/output/files; make -f /dir/to/kernel/source/Makefile +# +# If you want to save output files in a different location, there are +# two syntaxes to specify it. +# +# 1) O= +# Use "make O=dir/to/store/output/files/" +# +# 2) Set KBUILD_OUTPUT +# Set the environment variable KBUILD_OUTPUT to point to the output directory. +# export KBUILD_OUTPUT=dir/to/store/output/files/; make +# +# The O= assignment takes precedence over the KBUILD_OUTPUT environment +# variable. + +# Do we want to change the working directory? +ifeq ("$(origin O)", "command line") + KBUILD_OUTPUT := $(O) +endif + +ifneq ($(KBUILD_OUTPUT),) +# Make's built-in functions such as $(abspath ...), $(realpath ...) cannot +# expand a shell special character '~'. We use a somewhat tedious way here. +abs_objtree := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) && pwd) +$(if $(abs_objtree),, \ + $(error failed to create output directory "$(KBUILD_OUTPUT)")) + +# $(realpath ...) resolves symlinks +abs_objtree := $(realpath $(abs_objtree)) +else +abs_objtree := $(CURDIR) +endif # ifneq ($(KBUILD_OUTPUT),) + +ifeq ($(abs_objtree),$(CURDIR)) +# Suppress "Entering directory ..." unless we are changing the work directory. +MAKEFLAGS += --no-print-directory +else +need-sub-make := 1 +endif + +abs_srctree := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) + +ifneq ($(words $(subst :, ,$(abs_srctree))), 1) +$(error source directory cannot contain spaces or colons) +endif + +ifneq ($(abs_srctree),$(abs_objtree)) +# Look for make include files relative to root of kernel src +# +# This does not become effective immediately because MAKEFLAGS is re-parsed +# once after the Makefile is read. We need to invoke sub-make. +MAKEFLAGS += --include-dir=$(abs_srctree) +need-sub-make := 1 +endif + +ifneq ($(filter 3.%,$(MAKE_VERSION)),) +# 'MAKEFLAGS += -rR' does not immediately become effective for GNU Make 3.x +# We need to invoke sub-make to avoid implicit rules in the top Makefile. +need-sub-make := 1 +# Cancel implicit rules for this Makefile. +$(lastword $(MAKEFILE_LIST)): ; +endif + +export abs_srctree abs_objtree +export sub_make_done := 1 + +ifeq ($(need-sub-make),1) + +PHONY += $(MAKECMDGOALS) sub-make + +$(filter-out _all sub-make $(lastword $(MAKEFILE_LIST)), $(MAKECMDGOALS)) _all: sub-make + @: + +# Invoke a second make in the output directory, passing relevant variables +sub-make: + $(Q)$(MAKE) -C $(abs_objtree) -f $(abs_srctree)/Makefile $(MAKECMDGOALS) + +endif # need-sub-make +endif # sub_make_done + +# We process the rest of the Makefile if this is the final invocation of make +ifeq ($(need-sub-make),) + +# CDPATH can have sideeffects; disable, since we do know where we want to cd to +export CDPATH= + +# Do not print "Entering directory ...", +# but we want to display it when entering to the output directory +# so that IDEs/editors are able to understand relative filenames. +MAKEFLAGS += --no-print-directory + # Call a source code checker (by default, "sparse") as part of the # C compilation. # @@ -49,8 +200,8 @@ endif # 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. +# See the file "Documentation/dev-tools/sparse.rst" for more details, +# including where to get the "sparse" utility. ifeq ("$(origin C)", "command line") KBUILD_CHECKSRC = $(C) @@ -59,91 +210,108 @@ 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 +# Use make M=dir or set the environment variable KBUILD_EXTMOD to specify the +# directory of external module to build. Setting M= takes precedence. ifeq ("$(origin M)", "command line") KBUILD_EXTMOD := $(M) endif +export KBUILD_CHECKSRC KBUILD_EXTMOD -# 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/" -# -# 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. +ifeq ($(abs_srctree),$(abs_objtree)) + # building in the source tree + building_out_of_srctree := +else + building_out_of_srctree := 1 +endif +srctree := $(abs_srctree) +objtree := $(abs_objtree) +src := $(srctree) +obj := $(objtree) -# 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),) +VPATH := $(srctree) -# 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") - KBUILD_OUTPUT := $(O) -endif +export building_out_of_srctree srctree objtree VPATH -# That's our default target when none is given on the command line -PHONY := _all -_all: +# To make sure we do not include .config for any of the *config targets +# catch them early, and hand them over to scripts/kconfig/Makefile +# It is allowed to specify more targets when calling make, including +# mixing *config targets and build targets. +# For example 'make oldconfig all'. +# Detect when mixed targets is specified, and make a second invocation +# of make so .config is not included in this case either (for *config). -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 mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \ - && /bin/pwd) -$(if $(KBUILD_OUTPUT),, \ - $(error failed to create output directory "$(saved-output)")) +version_h := include/generated/version.h -PHONY += $(MAKECMDGOALS) sub-make +clean-targets := %clean mrproper cleandocs +no-dot-config-targets := $(clean-targets) \ + cscope gtags TAGS tags help% %docs \ + $(version_h) kernelversion outputmakefile +no-sync-config-targets := $(no-dot-config-targets) install %install \ + kernelrelease -$(filter-out _all sub-make,$(MAKECMDGOALS)) _all: sub-make - @: +config-build := +mixed-build := +need-config := 1 +may-sync-config := 1 -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)) +ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),) + ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),) + need-config := + endif +endif -# Leave processing to above invocation of make -skip-makefile := 1 -endif # ifneq ($(KBUILD_OUTPUT),) -endif # ifeq ($(KBUILD_SRC),) +ifneq ($(filter $(no-sync-config-targets), $(MAKECMDGOALS)),) + ifeq ($(filter-out $(no-sync-config-targets), $(MAKECMDGOALS)),) + may-sync-config := + endif +endif -# We process the rest of the Makefile if this is the final invocation of make -ifeq ($(skip-makefile),) +ifneq ($(KBUILD_EXTMOD),) + may-sync-config := +endif -# If building an external module we do not care about the all: rule -# but instead _all depend on modules -PHONY += all -_all: all +ifeq ($(KBUILD_EXTMOD),) + ifneq ($(filter config %config,$(MAKECMDGOALS)),) + config-build := 1 + ifneq ($(words $(MAKECMDGOALS)),1) + mixed-build := 1 + endif + endif +endif -# CDPATH can have sideeffects; disable, since we do know where we want to cd to -export CDPATH= +# For "make -j clean all", "make -j mrproper defconfig all", etc. +ifneq ($(filter $(clean-targets),$(MAKECMDGOALS)),) + ifneq ($(filter-out $(clean-targets),$(MAKECMDGOALS)),) + mixed-build := 1 + endif +endif -srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR)) -objtree := $(CURDIR) -src := $(srctree) -obj := $(objtree) +ifdef mixed-build +# =========================================================================== +# We're called with mixed targets (*config and build targets). +# Handle them one by one. + +PHONY += $(MAKECMDGOALS) __build_one_by_one -VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD)) +$(filter-out __build_one_by_one, $(MAKECMDGOALS)): __build_one_by_one + @: -export srctree objtree VPATH +__build_one_by_one: + $(Q)set -e; \ + for i in $(MAKECMDGOALS); do \ + $(MAKE) -f $(srctree)/Makefile $$i; \ + done + +else # !mixed-build + +include scripts/Kbuild.include + +# Read KERNELRELEASE from include/config/kernel.release (if it exists) +KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) +KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) +export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION # Cross compiling and selecting different set of gcc/bin-utils # --------------------------------------------------------------------------- @@ -174,6 +342,11 @@ ifeq ($(ARCH),arm64) SRCARCH := arm endif +# Support ARCH=ppc for backward compatibility +ifeq ($(ARCH),ppc) + SRCARCH := powerpc +endif + KCONFIG_CONFIG ?= .config # Default file for 'make defconfig'. This may be overridden by arch-Makefile. @@ -193,84 +366,10 @@ HOSTCXX = g++ KBUILD_HOSTCFLAGS := -Wall -Wstrict-prototypes -O2 \ -fomit-frame-pointer $(HOST_LFS_CFLAGS) \ $(HOSTCFLAGS) -KBUILD_HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS) +KBUILD_HOSTCXXFLAGS := -Wall -O2 $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS) KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS) $(HOSTLDFLAGS) KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) $(HOSTLDLIBS) -# 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 <whatever> modules", compile modules -# in addition to whatever we do anyway. -# Just "make" or "make all" shall build modules as well - -ifneq ($(filter all _all modules,$(MAKECMDGOALS)),) - KBUILD_MODULES := 1 -endif - -export KBUILD_MODULES KBUILD_BUILTIN -export KBUILD_CHECKSRC KBUILD_SRC - -# 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 ($(findstring 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) - -# We need some generic definitions. -include $(srctree)/scripts/Kbuild.include -include $(srctree)/scripts/Makefile.lib - # Make variables (CC, etc...) AS = $(CROSS_COMPILE)as @@ -291,6 +390,7 @@ KALLSYMS = scripts/kallsyms PERL = perl PYTHON3 = python3 CHECK = sparse +BASH = bash CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise $(CF) CFLAGS_KERNEL = @@ -306,16 +406,17 @@ export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_ve # Use LINUXINCLUDE when you must reference the include/ directory. # Needed to be compatible with the O= option LINUXINCLUDE := -Iinclude -I$(srctree)/dts/include \ - $(if $(KBUILD_SRC), -I$(srctree)/include) \ + $(if $(building_out_of_srctree), -I$(srctree)/include) \ -I$(srctree)/arch/$(SRCARCH)/include \ -I$(objtree)/arch/$(SRCARCH)/include \ -include $(srctree)/include/linux/kconfig.h KBUILD_CPPFLAGS := -D__KERNEL__ -D__BAREBOX__ $(LINUXINCLUDE) -fno-builtin -ffreestanding -KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ - -Werror-implicit-function-declaration \ - -fno-strict-aliasing -fno-common -Os -pipe -Wmissing-prototypes +KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \ + -fno-strict-aliasing -fno-common \ + -Werror=implicit-function-declaration -Werror=implicit-int \ + -Os -pipe -Wmissing-prototypes KBUILD_AFLAGS := -D__ASSEMBLY__ LDFLAGS_barebox := -Map barebox.map @@ -324,12 +425,7 @@ LDFLAGS_barebox := -Map barebox.map LDFLAGS_barebox += $(call ld-option, --no-dynamic-linker) LDFLAGS_pbl += $(call ld-option, --no-dynamic-linker) -# Read KERNELRELEASE from include/config/kernel.release (if it exists) -KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) -KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) - -export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION -export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC +export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL PYTHON3 UTS_MACHINE export LEX YACC export HOSTCXX CHECK CHECKFLAGS @@ -345,78 +441,45 @@ export CFLAGS_UBSAN # 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 +export 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/ +# Basic helpers built in scripts/basic/ PHONY += scripts_basic scripts_basic: $(Q)$(MAKE) $(build)=scripts/basic -# To avoid any implicit rule to kick in, define an empty command. -scripts/basic/%: scripts_basic ; - PHONY += outputmakefile +# Before starting out-of-tree build, make sure the source tree is clean. # outputmakefile generates a Makefile in the output directory, if using a # separate output directory. This allows convenient use of make in the # output directory. +# At the same time when output Makefile generated, generate .gitignore to +# ignore whole output directory outputmakefile: -ifneq ($(KBUILD_SRC),) - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \ - $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) -endif - -# To make sure we do not include .config for any of the *config targets -# catch them early, and hand them over to scripts/kconfig/Makefile -# It is allowed to specify more targets when calling make, including -# mixing *config targets and build targets. -# For example 'make oldconfig all'. -# Detect when mixed targets is specified, and make a second invocation -# of make so .config is not included in this case either (for *config). - -no-dot-config-targets := clean mrproper distclean \ - cscope TAGS tags help %docs check% \ - include/generated/version.h headers_% \ - kernelrelease kernelversion - -config-targets := 0 -mixed-targets := 0 -dot-config := 1 - -ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),) - ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),) - dot-config := 0 - endif -endif - -ifneq ($(filter config %config,$(MAKECMDGOALS)),) - config-targets := 1 - ifneq ($(filter-out config %config,$(MAKECMDGOALS)),) - mixed-targets := 1 - endif +ifdef building_out_of_srctree + $(Q)if [ -f $(srctree)/.config -o \ + -d $(srctree)/include/config -o \ + -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \ + echo >&2 "***"; \ + echo >&2 "*** The source tree is not clean, please run 'make$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \ + echo >&2 "*** in $(abs_srctree)";\ + echo >&2 "***"; \ + false; \ + fi + $(Q)ln -fsn $(srctree) source + $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree) + $(Q)test -e .gitignore || \ + { echo "# this is build directory, ignore it"; echo "*"; } > .gitignore endif -ifeq ($(mixed-targets),1) -# =========================================================================== -# We're called with mixed targets (*config and build targets). -# Handle them one by one. - -PHONY += $(MAKECMDGOALS) __build_one_by_one - -$(filter-out __build_one_by_one, $(MAKECMDGOALS)): __build_one_by_one - @: - -__build_one_by_one: - $(Q)set -e; \ - for i in $(MAKECMDGOALS); do \ - $(MAKE) -f $(srctree)/Makefile $$i; \ - done - -else -ifeq ($(config-targets),1) +ifdef config-build # =========================================================================== # *config targets only - make sure prerequisites are updated, and descend # in scripts/kconfig to make the *config target @@ -427,34 +490,65 @@ ifeq ($(config-targets),1) include $(srctree)/arch/$(SRCARCH)/Makefile export KBUILD_DEFCONFIG -config: scripts_basic outputmakefile FORCE +config: outputmakefile scripts_basic FORCE $(Q)$(MAKE) $(build)=scripts/kconfig $@ -%config: scripts_basic outputmakefile FORCE +%config: outputmakefile scripts_basic FORCE $(Q)$(MAKE) $(build)=scripts/kconfig $@ -else +else #!config-build # =========================================================================== # Build targets only - this includes barebox, arch specific targets, clean # targets and others. In general all targets except *config targets. -# Additional helpers built in scripts/ -# Carefully list dependencies so we do not try to build scripts twice -# in parallel -PHONY += scripts -scripts: scripts_basic - $(Q)$(MAKE) $(build)=$(@) +# 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 -ifeq ($(dot-config),1) +# 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 <whatever> modules", compile modules +# in addition to whatever we do anyway. +# Just "make" or "make all" shall build modules as well + +ifneq ($(filter all _all modules,$(MAKECMDGOALS)),) + KBUILD_MODULES := 1 +endif + +export KBUILD_MODULES KBUILD_BUILTIN + +ifdef need-config include include/config/auto.conf endif +# We need some generic definitions. +include $(srctree)/scripts/Makefile.lib + # Objects we will link into barebox / subdirs we need to visit common-y := common/ drivers/ commands/ lib/ crypto/ net/ fs/ firmware/ include $(srctree)/arch/$(SRCARCH)/Makefile -ifeq ($(dot-config),1) +ifdef need-config +ifdef may-sync-config # Read in dependencies to all Kconfig* files, make sure to run syncconfig if # changes are detected. This should be included after arch/$(SRCARCH)/Makefile # because some architectures define CROSS_COMPILE there. @@ -478,7 +572,23 @@ $(KCONFIG_CONFIG): # (Note: use the grouped target '&:' when we bump to GNU Make 4.3) %/auto.conf %/auto.conf.cmd: $(KCONFIG_CONFIG) $(Q)$(MAKE) -f $(srctree)/Makefile syncconfig -endif # $(dot-config) +else # !may-sync-config +# External modules and some install targets need include/generated/autoconf.h +# and include/config/auto.conf but do not care if they are up-to-date. +# Use auto.conf to trigger the test +PHONY += include/config/auto.conf + +include/config/auto.conf: + $(Q)test -e include/generated/autoconf.h -a -e $@ || ( \ + echo >&2; \ + echo >&2 " ERROR: Kernel configuration is invalid."; \ + echo >&2 " include/generated/autoconf.h or $@ are missing.";\ + echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ + echo >&2 ; \ + /bin/false) + +endif # may-sync-config +endif # need-config KBUILD_CFLAGS += -ggdb3 @@ -621,28 +731,18 @@ quiet_cmd_barebox_version = GEN .version $(MAKE) $(build)=common # Generate System.map -quiet_cmd_sysmap = SYSMAP - cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap +quiet_cmd_sysmap = SYSMAP System.map + cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap $@ System.map # Link of barebox # If CONFIG_KALLSYMS is set .version is already updated # Generate System.map and verify that the content is consistent # Use + in front of the barebox_version rule to silent warning with make -j2 -# First command is ':' to allow us to use + in front of the rule define rule_barebox__ - : $(if $(CONFIG_KALLSYMS),,+$(call cmd,barebox_version)) $(call cmd,barebox__) - $(Q)echo 'cmd_$@ := $(cmd_barebox__)' > $(@D)/.$(@F).cmd - - $(Q)$(if $($(quiet)cmd_sysmap), \ - echo ' $($(quiet)cmd_sysmap) System.map' &&) \ - $(cmd_sysmap) $@ System.map; \ - if [ $$? -ne 0 ]; then \ - rm -f $@; \ - false; \ - fi; + $(call cmd,sysmap) endef ifdef CONFIG_KALLSYMS @@ -683,10 +783,8 @@ endef # Update barebox version before link # Use + in front of this rule to silent warning about make -j1 -# First command is ':' to allow us to use + in front of this rule cmd_ksym_ld = $(cmd_barebox__) define rule_ksym_ld - : +$(call cmd,barebox_version) $(call cmd,barebox__) $(Q)echo 'cmd_$@ := $(cmd_barebox__)' > $(@D)/.$(@F).cmd @@ -806,6 +904,13 @@ include/config/kernel.release: FORCE $(Q)rm -f $@ $(Q)echo $(KERNELVERSION)$(localversion) > $@ +# Additional helpers built in scripts/ +# Carefully list dependencies so we do not try to build scripts twice +# in parallel +PHONY += scripts +scripts: scripts_basic + $(Q)$(MAKE) $(build)=$(@) + # Things we need to do before we recursively start building the kernel # or the modules are listed in "prepare". # A multi level approach is used. prepareN is processed before prepareN-1. @@ -813,42 +918,20 @@ include/config/kernel.release: FORCE # version.h and scripts_basic is processed / created. # Listed in dependency order -PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3 - -# prepare-all is deprecated, use prepare as valid replacement -PHONY += prepare-all - -# prepare3 is used to check if we are building in a separate output directory, -# and if so do: -# 1) Check that make has not been executed in the kernel src $(srctree) -prepare3: include/config/kernel.release -ifneq ($(KBUILD_SRC),) - @echo ' Using $(srctree) as source for barebox' - $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \ - echo " $(srctree) is not clean, please run 'make mrproper'";\ - echo " in the '$(srctree)' directory.";\ - false; \ - fi; -endif - -# prepare2 creates a makefile if using a separate output directory -prepare2: prepare3 outputmakefile +PHONY += prepare archprepare prepare0 -prepare1: prepare2 include/generated/version.h include/generated/utsrelease.h \ - include/config.h +archprepare: outputmakefile scripts_basic include/config/kernel.release \ + $(version_h) include/generated/utsrelease.h include/config.h +prepare0: archprepare FORCE ifneq ($(KBUILD_MODULES),) $(Q)mkdir -p $(MODVERDIR) $(Q)rm -f $(MODVERDIR)/* endif - -archprepare: prepare1 scripts_basic - -prepare0: archprepare FORCE $(Q)$(MAKE) $(build)=. # All the preparing.. -prepare prepare-all: prepare0 +prepare: prepare0 # Leave this as default for preprocessing barebox.lds.S, which is now # done in arch/$(SRCARCH)/kernel/Makefile @@ -882,16 +965,16 @@ define filechk_utsrelease.h echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \ exit 1; \ fi; \ - (echo \#define UTS_RELEASE \"$(KERNELRELEASE)\";) + echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" endef define filechk_version.h - (echo \#define LINUX_VERSION_CODE $(shell \ - expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + $(SUBLEVEL)); \ - echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) + echo \#define LINUX_VERSION_CODE $(shell \ + expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \ + echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' endef -include/generated/version.h: $(srctree)/Makefile FORCE +include/generated/version.h: FORCE $(call filechk,version.h) include/generated/utsrelease.h: include/config/kernel.release FORCE @@ -1101,9 +1184,9 @@ help: # Generate tags for editors # --------------------------------------------------------------------------- quiet_cmd_tags = GEN $@ - cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@ + cmd_tags = $(BASH) $(srctree)/scripts/tags.sh $@ -tags TAGS cscope: FORCE +tags TAGS cscope gtags: FORCE $(call cmd,tags) SPHINXBUILD = sphinx-build @@ -1115,9 +1198,6 @@ docs: FORCE @$(SPHINXBUILD) -b html -d $(objtree)/doctrees $(srctree)/Documentation \ $(objtree)/Documentation/html -endif #ifeq ($(config-targets),1) -endif #ifeq ($(mixed-targets),1) - # Single targets # --------------------------------------------------------------------------- # Single targets are compatible with: @@ -1181,14 +1261,13 @@ ifneq ($(cmd_files),) include $(cmd_files) endif -endif # skip-makefile +endif # config-build +endif # mixed-build +endif # need-sub-make PHONY += FORCE FORCE: -# Cancel implicit rules on top Makefile, `-rR' will apply to sub-makes. -Makefile: ; - # 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/Makefile b/arch/arm/Makefile index 62b397a73e..6c7373c206 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -127,11 +127,7 @@ board-$(CONFIG_MACH_TINY6410) += friendlyarm-tiny6410 machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) -ifeq ($(KBUILD_SRC),) -KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(machdirs)) -else KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) -endif TEXT_BASE = $(CONFIG_TEXT_BASE) diff --git a/arch/arm/boards/afi-gf/config.h b/arch/arm/boards/afi-gf/config.h deleted file mode 100644 index aeeda3695b..0000000000 --- a/arch/arm/boards/afi-gf/config.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2012 Jan Luebbe <j.luebbe@pengutronix.de> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#endif /* __CONFIG_H */ diff --git a/arch/arm/boards/altera-socdk/config.h b/arch/arm/boards/altera-socdk/config.h deleted file mode 100644 index da84fa5f6b..0000000000 --- a/arch/arm/boards/altera-socdk/config.h +++ /dev/null @@ -1 +0,0 @@ -/* nothing */ diff --git a/arch/arm/boards/ebv-socrates/config.h b/arch/arm/boards/ebv-socrates/config.h deleted file mode 100644 index da84fa5f6b..0000000000 --- a/arch/arm/boards/ebv-socrates/config.h +++ /dev/null @@ -1 +0,0 @@ -/* nothing */ diff --git a/arch/arm/boards/globalscale-guruplug/Makefile b/arch/arm/boards/globalscale-guruplug/Makefile index 01c7a259e9..b08c4a93ca 100644 --- a/arch/arm/boards/globalscale-guruplug/Makefile +++ b/arch/arm/boards/globalscale-guruplug/Makefile @@ -1,2 +1 @@ -obj-y += board.o lwl-y += lowlevel.o diff --git a/arch/arm/boards/globalscale-guruplug/board.c b/arch/arm/boards/globalscale-guruplug/board.c deleted file mode 100644 index 9c800c5410..0000000000 --- a/arch/arm/boards/globalscale-guruplug/board.c +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright - * (C) 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -/* empty */ diff --git a/arch/arm/boards/globalscale-mirabox/Makefile b/arch/arm/boards/globalscale-mirabox/Makefile index 01c7a259e9..b08c4a93ca 100644 --- a/arch/arm/boards/globalscale-mirabox/Makefile +++ b/arch/arm/boards/globalscale-mirabox/Makefile @@ -1,2 +1 @@ -obj-y += board.o lwl-y += lowlevel.o diff --git a/arch/arm/boards/globalscale-mirabox/board.c b/arch/arm/boards/globalscale-mirabox/board.c deleted file mode 100644 index 9c800c5410..0000000000 --- a/arch/arm/boards/globalscale-mirabox/board.c +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright - * (C) 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -/* empty */ diff --git a/arch/arm/boards/marvell-armada-xp-gp/Makefile b/arch/arm/boards/marvell-armada-xp-gp/Makefile index 01c7a259e9..b08c4a93ca 100644 --- a/arch/arm/boards/marvell-armada-xp-gp/Makefile +++ b/arch/arm/boards/marvell-armada-xp-gp/Makefile @@ -1,2 +1 @@ -obj-y += board.o lwl-y += lowlevel.o diff --git a/arch/arm/boards/marvell-armada-xp-gp/board.c b/arch/arm/boards/marvell-armada-xp-gp/board.c deleted file mode 100644 index 9c800c5410..0000000000 --- a/arch/arm/boards/marvell-armada-xp-gp/board.c +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright - * (C) 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -/* empty */ diff --git a/arch/arm/boards/netgear-rn104/Makefile b/arch/arm/boards/netgear-rn104/Makefile index 01c7a259e9..b08c4a93ca 100644 --- a/arch/arm/boards/netgear-rn104/Makefile +++ b/arch/arm/boards/netgear-rn104/Makefile @@ -1,2 +1 @@ -obj-y += board.o lwl-y += lowlevel.o diff --git a/arch/arm/boards/netgear-rn104/board.c b/arch/arm/boards/netgear-rn104/board.c deleted file mode 100644 index 40a8c178f1..0000000000 --- a/arch/arm/boards/netgear-rn104/board.c +++ /dev/null @@ -1 +0,0 @@ -/* empty */ diff --git a/arch/arm/boards/plathome-openblocks-a6/Makefile b/arch/arm/boards/plathome-openblocks-a6/Makefile index 01c7a259e9..b08c4a93ca 100644 --- a/arch/arm/boards/plathome-openblocks-a6/Makefile +++ b/arch/arm/boards/plathome-openblocks-a6/Makefile @@ -1,2 +1 @@ -obj-y += board.o lwl-y += lowlevel.o diff --git a/arch/arm/boards/plathome-openblocks-a6/board.c b/arch/arm/boards/plathome-openblocks-a6/board.c deleted file mode 100644 index 40a8c178f1..0000000000 --- a/arch/arm/boards/plathome-openblocks-a6/board.c +++ /dev/null @@ -1 +0,0 @@ -/* empty */ diff --git a/arch/arm/boards/plathome-openblocks-ax3/Makefile b/arch/arm/boards/plathome-openblocks-ax3/Makefile index 01c7a259e9..b08c4a93ca 100644 --- a/arch/arm/boards/plathome-openblocks-ax3/Makefile +++ b/arch/arm/boards/plathome-openblocks-ax3/Makefile @@ -1,2 +1 @@ -obj-y += board.o lwl-y += lowlevel.o diff --git a/arch/arm/boards/plathome-openblocks-ax3/board.c b/arch/arm/boards/plathome-openblocks-ax3/board.c deleted file mode 100644 index 9c800c5410..0000000000 --- a/arch/arm/boards/plathome-openblocks-ax3/board.c +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright - * (C) 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -/* empty */ diff --git a/arch/arm/boards/solidrun-cubox/config.h b/arch/arm/boards/solidrun-cubox/config.h deleted file mode 100644 index ca15136817..0000000000 --- a/arch/arm/boards/solidrun-cubox/config.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef __CONFIG_H -#define __CONFIG_H - -#endif /* __CONFIG_H */ diff --git a/arch/arm/boards/terasic-de0-nano-soc/config.h b/arch/arm/boards/terasic-de0-nano-soc/config.h deleted file mode 100644 index da84fa5f6b..0000000000 --- a/arch/arm/boards/terasic-de0-nano-soc/config.h +++ /dev/null @@ -1 +0,0 @@ -/* nothing */ diff --git a/arch/arm/boards/terasic-sockit/config.h b/arch/arm/boards/terasic-sockit/config.h deleted file mode 100644 index da84fa5f6b..0000000000 --- a/arch/arm/boards/terasic-sockit/config.h +++ /dev/null @@ -1 +0,0 @@ -/* nothing */ diff --git a/arch/arm/boards/turris-omnia/Makefile b/arch/arm/boards/turris-omnia/Makefile index 01c7a259e9..b08c4a93ca 100644 --- a/arch/arm/boards/turris-omnia/Makefile +++ b/arch/arm/boards/turris-omnia/Makefile @@ -1,2 +1 @@ -obj-y += board.o lwl-y += lowlevel.o diff --git a/arch/arm/boards/turris-omnia/board.c b/arch/arm/boards/turris-omnia/board.c deleted file mode 100644 index 40a8c178f1..0000000000 --- a/arch/arm/boards/turris-omnia/board.c +++ /dev/null @@ -1 +0,0 @@ -/* empty */ diff --git a/arch/arm/boards/usi-topkick/Makefile b/arch/arm/boards/usi-topkick/Makefile index 01c7a259e9..b08c4a93ca 100644 --- a/arch/arm/boards/usi-topkick/Makefile +++ b/arch/arm/boards/usi-topkick/Makefile @@ -1,2 +1 @@ -obj-y += board.o lwl-y += lowlevel.o diff --git a/arch/arm/boards/usi-topkick/board.c b/arch/arm/boards/usi-topkick/board.c deleted file mode 100644 index 7dbe0aa943..0000000000 --- a/arch/arm/boards/usi-topkick/board.c +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright - * (C) 2013 Jason Cooper <jason@lakedaemon.net> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -/* empty */ diff --git a/arch/arm/boards/zylonite/board.c b/arch/arm/boards/zylonite/board.c index 2f26270571..e90e7dfdb8 100644 --- a/arch/arm/boards/zylonite/board.c +++ b/arch/arm/boards/zylonite/board.c @@ -38,8 +38,6 @@ #include <asm/mmu.h> #include <generated/mach-types.h> -#include "zylonite.h" - static struct smc91c111_pdata smsc91x_pdata; static struct mrvl_nand_platform_data nand_pdata = { .keep_config = 0, diff --git a/arch/arm/boards/zylonite/zylonite.h b/arch/arm/boards/zylonite/zylonite.h deleted file mode 100644 index 4a0fb90fe9..0000000000 --- a/arch/arm/boards/zylonite/zylonite.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * (C) 2011 Robert Jarzmik <robert.jarzmik@free.fr> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ -#ifndef _ZYLONITE_H_ -#define _ZYLONITE_H_ - - -#endif /* _ZYLONITE_H */ diff --git a/arch/arm/configs/imx28_defconfig b/arch/arm/configs/imx28_defconfig index 1acc8dd94f..4442c79cc4 100644 --- a/arch/arm/configs/imx28_defconfig +++ b/arch/arm/configs/imx28_defconfig @@ -20,7 +20,9 @@ CONFIG_BOOTM_SHOW_TYPE=y CONFIG_BOOTM_VERBOSE=y CONFIG_BOOTM_INITRD=y CONFIG_BLSPEC=y +CONFIG_CONSOLE_ACTIVATE_NONE=y CONFIG_CONSOLE_ALLOW_COLOR=y +CONFIG_PBL_CONSOLE=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y CONFIG_RESET_SOURCE=y CONFIG_CMD_DMESG=y @@ -28,11 +30,13 @@ CONFIG_LONGHELP=y CONFIG_CMD_IOMEM=y CONFIG_CMD_IMD=y CONFIG_CMD_MEMINFO=y +CONFIG_CMD_REGULATOR=y # CONFIG_CMD_BOOTU is not set CONFIG_CMD_GO=y CONFIG_CMD_RESET=y CONFIG_CMD_UIMAGE=y CONFIG_CMD_PARTITION=y +CONFIG_CMD_UBIFORMAT=y CONFIG_CMD_EXPORT=y CONFIG_CMD_LOADENV=y CONFIG_CMD_PRINTENV=y @@ -72,16 +76,20 @@ CONFIG_CMD_NANDTEST=y CONFIG_CMD_SPI=y CONFIG_CMD_LED_TRIGGER=y CONFIG_CMD_USBGADGET=y +CONFIG_CMD_WD=y CONFIG_CMD_BAREBOX_UPDATE=y CONFIG_CMD_OF_NODE=y CONFIG_CMD_OF_PROPERTY=y CONFIG_CMD_OFTREE=y CONFIG_CMD_TIME=y CONFIG_NET=y -CONFIG_OFDEVICE=y CONFIG_OF_BAREBOX_DRIVERS=y CONFIG_DRIVER_SERIAL_AUART=y CONFIG_DRIVER_NET_FEC_IMX=y +CONFIG_NET_USB=y +CONFIG_NET_USB_ASIX=y +CONFIG_USB_NET_AX88179_178A=y +CONFIG_NET_USB_SMSC95XX=y CONFIG_DRIVER_SPI_MXS=y CONFIG_I2C=y CONFIG_MTD=y @@ -89,6 +97,10 @@ CONFIG_NAND=y CONFIG_NAND_MXS=y CONFIG_MTD_UBI=y CONFIG_MTD_UBI_FASTMAP=y +CONFIG_USB_HOST=y +CONFIG_USB_IMX_CHIPIDEA=y +CONFIG_USB_EHCI=y +CONFIG_USB_STORAGE=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DFU=y CONFIG_USB_GADGET_SERIAL=y @@ -97,7 +109,6 @@ CONFIG_USB_GADGET_FASTBOOT_CMD_OEM=y CONFIG_VIDEO=y CONFIG_DRIVER_VIDEO_STM=y CONFIG_MCI=y -CONFIG_MCI_STARTUP=y CONFIG_MCI_MXS=y CONFIG_LED=y CONFIG_LED_GPIO=y @@ -108,6 +119,7 @@ CONFIG_WATCHDOG_MXS28=y CONFIG_MXS_APBH_DMA=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED=y +CONFIG_GENERIC_PHY=y CONFIG_FS_EXT4=y CONFIG_FS_TFTP=y CONFIG_FS_NFS=y diff --git a/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi b/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi index 841ad653b2..3cb8b3782a 100644 --- a/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi +++ b/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi @@ -12,10 +12,7 @@ #include <arm/imx6qdl-phytec-pfla02.dtsi> / { - memory { - /* let barebox fill the memory node */ - reg = <0 0>; - }; + /delete-node/ memory@10000000; chosen { environment-nand { diff --git a/arch/arm/dts/vexpress-v2p-ca9.dts b/arch/arm/dts/vexpress-v2p-ca9.dts index d0975330f2..b13c114f0c 100644 --- a/arch/arm/dts/vexpress-v2p-ca9.dts +++ b/arch/arm/dts/vexpress-v2p-ca9.dts @@ -16,19 +16,23 @@ #address-cells = <1>; #size-cells = <1>; - partition@0 { - label = "barebox"; - reg = <0x0 0x80000>; - }; + partitions { + compatible = "fixed-partitions"; - barebox_env: partition@80000 { - label = "barebox-environment"; - reg = <0x80000 0x80000>; - }; + partition@0 { + label = "barebox"; + reg = <0x0 0x80000>; + }; + + barebox_env: partition@80000 { + label = "barebox-environment"; + reg = <0x80000 0x80000>; + }; - state_storage: partition@100000 { - label = "barebox-state"; - reg = <0x100000 0x100000>; + state_storage: partition@100000 { + label = "barebox-state"; + reg = <0x100000 0x100000>; + }; }; }; }; diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h index 4c4b51180c..033341e270 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/include/mach/board.h @@ -147,16 +147,7 @@ static inline struct device_d * at91_register_uart(unsigned id, unsigned pins) } #endif -/* Multimedia Card Interface */ -struct atmel_mci_platform_data { - unsigned slot_b; - unsigned bus_width; - int detect_pin; - int wp_pin; - char *devname; -}; - -void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data); +#include <platform_data/atmel-mci.h> /* SPI Master platform data */ struct at91_spi_platform_data { diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 072c659008..6dd5cb2aca 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -845,6 +845,16 @@ config HAB_CERTS_ENV CONFIG_HABV4_CSF_CRT_PEM CONFIG_HABV4_IMG_CRT_PEM +config HABV4_SRK_INDEX + depends on HABV4 + int "SRK index" + default 0 + help + Select the Super Root Key used in the Command Sequence File to sign + the CSF binary. This should only be changed if a previous key was + revoked and another key needs to be used. For HABV4 the Index is in + the range from 0 to 3. + if HABV4 && !HAB_CERTS_ENV config HABV4_TABLE_BIN diff --git a/arch/arm/mach-imx/boot.c b/arch/arm/mach-imx/boot.c index 7bce1c710c..ef868301cd 100644 --- a/arch/arm/mach-imx/boot.c +++ b/arch/arm/mach-imx/boot.c @@ -31,6 +31,7 @@ #include <mach/imx8mq-regs.h> #include <mach/vf610-regs.h> #include <mach/imx8mq.h> +#include <mach/imx6.h> static void @@ -320,10 +321,13 @@ void imx53_boot_save_loc(void) #define IMX6_SRC_SBMR1 0x04 #define IMX6_SRC_SBMR2 0x1c +#define IMX6_SRC_GPR9 0x40 +#define IMX6_SRC_GPR10 0x44 #define IMX6_BMOD_SERIAL 0b01 #define IMX6_BMOD_RESERVED 0b11 #define IMX6_BMOD_FUSES 0b00 #define BT_FUSE_SEL BIT(4) +#define GPR10_BOOT_FROM_GPR9 BIT(28) static bool imx6_bootsource_reserved(uint32_t sbmr2) { @@ -342,6 +346,13 @@ static bool imx6_bootsource_serial(uint32_t sbmr2) !(sbmr2 & BT_FUSE_SEL)); } +static bool imx6_bootsource_serial_forced(uint32_t bootmode) +{ + if (cpu_mx6_is_mx6ul() || cpu_mx6_is_mx6ull()) + return bootmode == 2; + return bootmode == 1; +} + static int __imx6_bootsource_serial_rom(uint32_t r) { return FIELD_GET(BOOT_CFG4(2, 0), r); @@ -388,37 +399,53 @@ static int imx6_boot_instance_mmc(uint32_t r) return FIELD_GET(BOOT_CFG2(4, 3), r); } +static u32 imx6_get_src_boot_mode(void __iomem *src_base) +{ + if (readl(src_base + IMX6_SRC_GPR10) & GPR10_BOOT_FROM_GPR9) + return readl(src_base + IMX6_SRC_GPR9); + + return readl(src_base + IMX6_SRC_SBMR1); +} + void imx6_get_boot_source(enum bootsource *src, int *instance) { void __iomem *src_base = IOMEM(MX6_SRC_BASE_ADDR); - uint32_t sbmr1 = readl(src_base + IMX6_SRC_SBMR1); uint32_t sbmr2 = readl(src_base + IMX6_SRC_SBMR2); + uint32_t bootmode, bootsrc; + + bootmode = imx6_get_src_boot_mode(src_base); if (imx6_bootsource_reserved(sbmr2)) return; - if (imx6_bootsource_serial(sbmr2)) { + bootsrc = imx53_bootsource_internal(bootmode); + + if (imx6_bootsource_serial(sbmr2) || + imx6_bootsource_serial_forced(bootsrc)) { *src = BOOTSOURCE_SERIAL; return; } - switch (imx53_bootsource_internal(sbmr1)) { - case 2: + switch (bootsrc) { + case 1: /* only reachable for i.MX6UL(L) */ + *src = BOOTSOURCE_SPI; /* Really: qspi */ + return; + case 2: /* unreachable for i.MX6UL(L) */ *src = BOOTSOURCE_HD; break; case 3: - *src = imx6_bootsource_serial_rom(sbmr1); - *instance = imx6_boot_instance_serial_rom(sbmr1); + *src = imx6_bootsource_serial_rom(bootmode); + *instance = imx6_boot_instance_serial_rom(bootmode); break; case 4: case 5: case 6: case 7: *src = BOOTSOURCE_MMC; - *instance = imx6_boot_instance_mmc(sbmr1); + *instance = imx6_boot_instance_mmc(bootmode); break; default: - if (imx53_bootsource_nand(sbmr1)) + if (imx53_bootsource_nand(bootmode)) *src = BOOTSOURCE_NAND; break; } diff --git a/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf.h b/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf.h index 5818879609..2961b97b79 100644 --- a/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf.h +++ b/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf.h @@ -19,7 +19,7 @@ hab Engine = CAAM hab [Install SRK] hab File = CONFIG_HABV4_TABLE_BIN hab # SRK index within SRK-Table 0..3 -hab Source index = 0 +hab Source index = CONFIG_HABV4_SRK_INDEX hab [Install CSFK] /* target key index in keystore 1 */ diff --git a/arch/arm/mach-imx/include/mach/habv4-imx8-gencsf.h b/arch/arm/mach-imx/include/mach/habv4-imx8-gencsf.h index 34039ee590..9ed6893988 100644 --- a/arch/arm/mach-imx/include/mach/habv4-imx8-gencsf.h +++ b/arch/arm/mach-imx/include/mach/habv4-imx8-gencsf.h @@ -19,7 +19,7 @@ hab Engine = CAAM hab [Install SRK] hab File = CONFIG_HABV4_TABLE_BIN hab # SRK index within SRK-Table 0..3 -hab Source index = 0 +hab Source index = CONFIG_HABV4_SRK_INDEX hab [Install CSFK] /* target key index in keystore 1 */ diff --git a/arch/arm/mach-imx/include/mach/imx6.h b/arch/arm/mach-imx/include/mach/imx6.h index 5560774de9..b65cdaaf40 100644 --- a/arch/arm/mach-imx/include/mach/imx6.h +++ b/arch/arm/mach-imx/include/mach/imx6.h @@ -28,6 +28,7 @@ void __noreturn imx6_pm_stby_poweroff(struct poweroff_handler *handler); static inline int scu_get_core_count(void) { +#if __LINUX_ARM_ARCH__ <= 7 unsigned long base; unsigned int ncores; @@ -35,6 +36,9 @@ static inline int scu_get_core_count(void) ncores = readl(base + SCU_CONFIG); return (ncores & 0x03) + 1; +#else + return 0; +#endif } #define SI_REV_CPUTYPE(s) (((s) >> 16) & 0xff) diff --git a/arch/arm/mach-mxs/power-init.c b/arch/arm/mach-mxs/power-init.c index ca7c349d7f..c89f1f5f5d 100644 --- a/arch/arm/mach-mxs/power-init.c +++ b/arch/arm/mach-mxs/power-init.c @@ -1172,7 +1172,7 @@ static void mx23_ungate_power(void) writel(MX23_POWER_CTRL_CLKGATE, &power_regs->hw_power_ctrl_clr); } -struct mxs_power_ctrl mxs_vddd_default = { .target = 1500, .brownout = 1325 }; +struct mxs_power_ctrl mxs_vddd_default = { .target = 1550, .brownout = 1400 }; struct mxs_power_ctrl mxs_vdda_default = { .target = 1800, .brownout = 1650 }; struct mxs_power_ctrl mxs_vddio_default = { .target = 3300, .brownout = 3150 }; struct mxs_power_ctrl mx23_vddmem_default = { .target = 2500, .brownout = 1700 }; diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile index 67ae9e701b..bff825e58a 100644 --- a/arch/arm/tools/Makefile +++ b/arch/arm/tools/Makefile @@ -7,4 +7,4 @@ include/generated/mach-types.h: $(src)/gen-mach-types $(src)/mach-types $(Q)$(kecho) ' Generating $@' $(Q)mkdir -p $(dir $@) - $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; } + $(Q)$(AWK) -f $^ > $@ diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 4717f49a46..5604a0a10d 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -82,22 +82,7 @@ machine-$(CONFIG_MACH_MIPS_LOONGSON) := loongson machine-$(CONFIG_MACH_MIPS_XBURST) := xburst machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y)) -ifeq ($(KBUILD_SRC),) -KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(machdirs)) -else KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) -endif - -ifeq ($(incdir-y),) -incdir-y := $(machine-y) -endif -INCDIR := arch-$(incdir-y) - -ifeq ($(KBUILD_SRC),) -KBUILD_CPPFLAGS += -I$(BOARD)/include -else -KBUILD_CPPFLAGS += -I$(srctree)/$(BOARD)/include -endif ifneq ($(machine-y),) MACH := arch/mips/mach-$(machine-y)/ @@ -105,8 +90,6 @@ else MACH := endif -common-y += $(BOARD) - common-y += $(MACH) common-y += arch/mips/lib/ common-y += arch/mips/boot/ diff --git a/arch/mips/boards/dlink-dir-320/Makefile b/arch/mips/boards/dlink-dir-320/Makefile index 01c7a259e9..b08c4a93ca 100644 --- a/arch/mips/boards/dlink-dir-320/Makefile +++ b/arch/mips/boards/dlink-dir-320/Makefile @@ -1,2 +1 @@ -obj-y += board.o lwl-y += lowlevel.o diff --git a/arch/mips/boards/dlink-dir-320/board.c b/arch/mips/boards/dlink-dir-320/board.c deleted file mode 100644 index b75812cefe..0000000000 --- a/arch/mips/boards/dlink-dir-320/board.c +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * Copyright (C) 2011, 2014 Antony Pavlov <antonynpavlov@gmail.com> - */ - -#include <common.h> -#include <init.h> - -static int dir320_console_init(void) -{ - barebox_set_hostname("dir320"); - - return 0; -} -console_initcall(dir320_console_init); diff --git a/arch/mips/boards/loongson-ls1b/include/board/debug_ll.h b/arch/mips/boards/loongson-ls1b/include/board/debug_ll.h deleted file mode 100644 index 05420f73a1..0000000000 --- a/arch/mips/boards/loongson-ls1b/include/board/debug_ll.h +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com> - */ - -/** @file - * This File contains declaration for early output support - */ -#ifndef __LOONGSON_TECH_LS1B_DEBUG_LL_H__ -#define __LOONGSON_TECH_LS1B_DEBUG_LL_H__ - -#include <asm/addrspace.h> -#include <mach/loongson1.h> - -#define DEBUG_LL_UART_ADDR KSEG1ADDR(LS1X_UART2_BASE) -#define DEBUG_LL_UART_SHIFT 0 - -#define DEBUG_LL_UART_CLK (83000000 / 16) -#define DEBUG_LL_UART_BPS CONFIG_BAUDRATE -#define DEBUG_LL_UART_DIVISOR (DEBUG_LL_UART_CLK / DEBUG_LL_UART_BPS) - -#endif /* __LOONGSON_TECH_LS1B_DEBUG_LL_H__ */ diff --git a/arch/mips/boards/netgear-wg102/include/board/debug_ll.h b/arch/mips/boards/netgear-wg102/include/board/debug_ll.h deleted file mode 100644 index cc3b1d74b0..0000000000 --- a/arch/mips/boards/netgear-wg102/include/board/debug_ll.h +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * Copyright (C) 2013 Oleksij Rempel <linux@rempel-privat.de> - */ - -/** @file - * This File contains declaration for early output support - */ -#ifndef __NETGEAR_WG102_DEBUG_LL_H__ -#define __NETGEAR_WG102_DEBUG_LL_H__ - -#include <mach/ar2312_regs.h> - -#define DEBUG_LL_UART_ADDR KSEG1ADDR(AR2312_UART0) -#define DEBUG_LL_UART_SHIFT AR2312_UART_SHIFT - -#define DEBUG_LL_UART_CLK (45000000 / 16) -#define DEBUG_LL_UART_BPS CONFIG_BAUDRATE -#define DEBUG_LL_UART_DIVISOR (DEBUG_LL_UART_CLK / DEBUG_LL_UART_BPS) - -#endif /* __NETGEAR_WG102_DEBUG_LL_H__ */ diff --git a/arch/mips/boards/qemu-malta/include/board/debug_ll.h b/arch/mips/boards/qemu-malta/include/board/debug_ll.h deleted file mode 100644 index 5b112b8ae2..0000000000 --- a/arch/mips/boards/qemu-malta/include/board/debug_ll.h +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com> - */ - -#ifndef __INCLUDE_BOARD_DEBUG_LL_QEMU_MALTA_H__ -#define __INCLUDE_BOARD_DEBUG_LL_QEMU_MALTA_H__ - -#include <mach/hardware.h> - -#define DEBUG_LL_UART_ADDR MALTA_PIIX4_UART0 -#define DEBUG_LL_UART_SHIFT 0 - -#define DEBUG_LL_UART_CLK 1843200 -#define DEBUG_LL_UART_BPS CONFIG_BAUDRATE -#define DEBUG_LL_UART_DIVISOR (DEBUG_LL_UART_CLK / DEBUG_LL_UART_BPS) - -#endif /* __INCLUDE_BOARD_DEBUG_LL_QEMU_MALTA_H__ */ diff --git a/arch/nios2/include/asm/io.h b/arch/nios2/include/asm/io.h index 360d786ea0..a964c695e7 100644 --- a/arch/nios2/include/asm/io.h +++ b/arch/nios2/include/asm/io.h @@ -46,4 +46,6 @@ #define writel(val, addr)\ asm volatile("stwio %0, 0(%1)" : : "r" (val), "r" (addr)) +#include <asm-generic/io.h> + #endif /* __ASM_NIOS2_IO_H_ */ diff --git a/arch/powerpc/Kbuild b/arch/powerpc/Kbuild new file mode 100644 index 0000000000..503ce631c0 --- /dev/null +++ b/arch/powerpc/Kbuild @@ -0,0 +1,2 @@ +obj-$(CONFIG_ARCH_MPC85XX) += cpu-85xx/ +obj-y += lib/ diff --git a/arch/ppc/Kconfig b/arch/powerpc/Kconfig index 798f342fa4..90ec7b1702 100644 --- a/arch/ppc/Kconfig +++ b/arch/powerpc/Kconfig @@ -18,5 +18,5 @@ config ARCH_MPC85XX bool "Freescale MPC85xx" endchoice -source "arch/ppc/mach-mpc5xxx/Kconfig" -source "arch/ppc/mach-mpc85xx/Kconfig" +source "arch/powerpc/mach-mpc5xxx/Kconfig" +source "arch/powerpc/mach-mpc85xx/Kconfig" diff --git a/arch/ppc/Makefile b/arch/powerpc/Makefile index ed5c749cd3..aa76260496 100644 --- a/arch/ppc/Makefile +++ b/arch/powerpc/Makefile @@ -1,7 +1,7 @@ KBUILD_DEFCONFIG := p2020rdb_defconfig KBUILD_CPPFLAGS += -ffixed-r14 -m32 \ - -meabi -D __PPC__ -D CONFIG_PPC \ + -meabi -D __PPC__ \ -fno-strict-aliasing KBUILD_CPPFLAGS += $(call cc-option,-mno-spe) @@ -24,8 +24,6 @@ board-$(CONFIG_DA923RC) := owc-da923rc machine-$(CONFIG_ARCH_MPC5200) := mpc5xxx machine-$(CONFIG_ARCH_MPC85XX) := mpc85xx -cpu-$(CONFIG_ARCH_MPC85XX) := 85xx - TEXT_BASE = $(CONFIG_TEXT_BASE) KBUILD_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) @@ -36,13 +34,9 @@ KBUILD_CPPFLAGS += -fdata-sections -ffunction-sections LDFLAGS_barebox += --gc-sections endif -machdirs := $(patsubst %,arch/ppc/mach-%/,$(machine-y)) +machdirs := $(patsubst %,arch/powerpc/mach-%/,$(machine-y)) -ifeq ($(KBUILD_SRC),) -KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(machdirs)) -else KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) -endif archprepare: maketools @@ -50,25 +44,18 @@ PHONY += maketools ifneq ($(board-y),) -BOARD := arch/ppc/boards/$(board-y)/ +BOARD := arch/powerpc/boards/$(board-y)/ else BOARD := endif ifneq ($(machine-y),) -MACH := arch/ppc/mach-$(machine-y)/ +MACH := arch/powerpc/mach-$(machine-y)/ else MACH := endif -ifneq ($(cpu-y),) -CPU := arch/ppc/cpu-$(cpu-y)/ -else -CPU := -endif - -common-y += $(BOARD) $(CPU) $(MACH) -common-y += arch/ppc/lib/ +common-y += $(BOARD) $(MACH) arch/powerpc/ ifdef CONFIG_MPC85xx lds-y += $(MACH)/barebox.lds diff --git a/arch/ppc/boards/.gitignore b/arch/powerpc/boards/.gitignore index d1165788c9..d1165788c9 100644 --- a/arch/ppc/boards/.gitignore +++ b/arch/powerpc/boards/.gitignore diff --git a/arch/ppc/boards/freescale-p1010rdb/Makefile b/arch/powerpc/boards/freescale-p1010rdb/Makefile index a7b64eef4d..a7b64eef4d 100644 --- a/arch/ppc/boards/freescale-p1010rdb/Makefile +++ b/arch/powerpc/boards/freescale-p1010rdb/Makefile diff --git a/arch/ppc/boards/freescale-p1010rdb/config.h b/arch/powerpc/boards/freescale-p1010rdb/config.h index 4f67183507..4f67183507 100644 --- a/arch/ppc/boards/freescale-p1010rdb/config.h +++ b/arch/powerpc/boards/freescale-p1010rdb/config.h diff --git a/arch/ppc/boards/freescale-p1010rdb/ddr.c b/arch/powerpc/boards/freescale-p1010rdb/ddr.c index 18069f4df1..18069f4df1 100644 --- a/arch/ppc/boards/freescale-p1010rdb/ddr.c +++ b/arch/powerpc/boards/freescale-p1010rdb/ddr.c diff --git a/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init b/arch/powerpc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init index c0e04c1f2d..c0e04c1f2d 100644 --- a/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init +++ b/arch/powerpc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init diff --git a/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config b/arch/powerpc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config index bffd86882e..bffd86882e 100644 --- a/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config +++ b/arch/powerpc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config diff --git a/arch/ppc/boards/freescale-p1010rdb/law.c b/arch/powerpc/boards/freescale-p1010rdb/law.c index 6edfbc2fb8..6edfbc2fb8 100644 --- a/arch/ppc/boards/freescale-p1010rdb/law.c +++ b/arch/powerpc/boards/freescale-p1010rdb/law.c diff --git a/arch/ppc/boards/freescale-p1010rdb/p1010rdb.c b/arch/powerpc/boards/freescale-p1010rdb/p1010rdb.c index b163327597..b163327597 100644 --- a/arch/ppc/boards/freescale-p1010rdb/p1010rdb.c +++ b/arch/powerpc/boards/freescale-p1010rdb/p1010rdb.c diff --git a/arch/ppc/boards/freescale-p1010rdb/p1010rdb.h b/arch/powerpc/boards/freescale-p1010rdb/p1010rdb.h index f325ff48fd..f325ff48fd 100644 --- a/arch/ppc/boards/freescale-p1010rdb/p1010rdb.h +++ b/arch/powerpc/boards/freescale-p1010rdb/p1010rdb.h diff --git a/arch/ppc/boards/freescale-p1010rdb/tlb.c b/arch/powerpc/boards/freescale-p1010rdb/tlb.c index 23ef0f2ade..23ef0f2ade 100644 --- a/arch/ppc/boards/freescale-p1010rdb/tlb.c +++ b/arch/powerpc/boards/freescale-p1010rdb/tlb.c diff --git a/arch/ppc/boards/freescale-p1022ds/Makefile b/arch/powerpc/boards/freescale-p1022ds/Makefile index 48867fa851..48867fa851 100644 --- a/arch/ppc/boards/freescale-p1022ds/Makefile +++ b/arch/powerpc/boards/freescale-p1022ds/Makefile diff --git a/arch/ppc/boards/freescale-p1022ds/config.h b/arch/powerpc/boards/freescale-p1022ds/config.h index 666b9ff987..666b9ff987 100644 --- a/arch/ppc/boards/freescale-p1022ds/config.h +++ b/arch/powerpc/boards/freescale-p1022ds/config.h diff --git a/arch/ppc/boards/freescale-p1022ds/ddr.c b/arch/powerpc/boards/freescale-p1022ds/ddr.c index 1944518c79..1944518c79 100644 --- a/arch/ppc/boards/freescale-p1022ds/ddr.c +++ b/arch/powerpc/boards/freescale-p1022ds/ddr.c diff --git a/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init b/arch/powerpc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init index c0e04c1f2d..c0e04c1f2d 100644 --- a/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init +++ b/arch/powerpc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init diff --git a/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config b/arch/powerpc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config index bffd86882e..bffd86882e 100644 --- a/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config +++ b/arch/powerpc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config diff --git a/arch/ppc/boards/freescale-p1022ds/ics307_clk.c b/arch/powerpc/boards/freescale-p1022ds/ics307_clk.c index f7c5bbde99..f7c5bbde99 100644 --- a/arch/ppc/boards/freescale-p1022ds/ics307_clk.c +++ b/arch/powerpc/boards/freescale-p1022ds/ics307_clk.c diff --git a/arch/ppc/boards/freescale-p1022ds/law.c b/arch/powerpc/boards/freescale-p1022ds/law.c index 79cc20dd6e..79cc20dd6e 100644 --- a/arch/ppc/boards/freescale-p1022ds/law.c +++ b/arch/powerpc/boards/freescale-p1022ds/law.c diff --git a/arch/ppc/boards/freescale-p1022ds/p1022ds.c b/arch/powerpc/boards/freescale-p1022ds/p1022ds.c index d80c234ea9..d80c234ea9 100644 --- a/arch/ppc/boards/freescale-p1022ds/p1022ds.c +++ b/arch/powerpc/boards/freescale-p1022ds/p1022ds.c diff --git a/arch/ppc/boards/freescale-p1022ds/p1022ds.h b/arch/powerpc/boards/freescale-p1022ds/p1022ds.h index cbc2aca644..cbc2aca644 100644 --- a/arch/ppc/boards/freescale-p1022ds/p1022ds.h +++ b/arch/powerpc/boards/freescale-p1022ds/p1022ds.h diff --git a/arch/ppc/boards/freescale-p1022ds/tlb.c b/arch/powerpc/boards/freescale-p1022ds/tlb.c index 86ab43aec0..86ab43aec0 100644 --- a/arch/ppc/boards/freescale-p1022ds/tlb.c +++ b/arch/powerpc/boards/freescale-p1022ds/tlb.c diff --git a/arch/ppc/boards/freescale-p2020rdb/Makefile b/arch/powerpc/boards/freescale-p2020rdb/Makefile index b2497f695c..b2497f695c 100644 --- a/arch/ppc/boards/freescale-p2020rdb/Makefile +++ b/arch/powerpc/boards/freescale-p2020rdb/Makefile diff --git a/arch/ppc/boards/freescale-p2020rdb/config.h b/arch/powerpc/boards/freescale-p2020rdb/config.h index 0d3e095016..0d3e095016 100644 --- a/arch/ppc/boards/freescale-p2020rdb/config.h +++ b/arch/powerpc/boards/freescale-p2020rdb/config.h diff --git a/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init b/arch/powerpc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init index 4d7b03e26d..4d7b03e26d 100644 --- a/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init +++ b/arch/powerpc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init diff --git a/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config b/arch/powerpc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config index 23e0ba2a5d..23e0ba2a5d 100644 --- a/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config +++ b/arch/powerpc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config diff --git a/arch/ppc/boards/freescale-p2020rdb/law.c b/arch/powerpc/boards/freescale-p2020rdb/law.c index e76b9cb0f5..e76b9cb0f5 100644 --- a/arch/ppc/boards/freescale-p2020rdb/law.c +++ b/arch/powerpc/boards/freescale-p2020rdb/law.c diff --git a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c b/arch/powerpc/boards/freescale-p2020rdb/p2020rdb.c index cfbcc61e35..cfbcc61e35 100644 --- a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c +++ b/arch/powerpc/boards/freescale-p2020rdb/p2020rdb.c diff --git a/arch/ppc/boards/freescale-p2020rdb/tlb.c b/arch/powerpc/boards/freescale-p2020rdb/tlb.c index e5b1789b28..e5b1789b28 100644 --- a/arch/ppc/boards/freescale-p2020rdb/tlb.c +++ b/arch/powerpc/boards/freescale-p2020rdb/tlb.c diff --git a/arch/ppc/boards/owc-da923rc/Makefile b/arch/powerpc/boards/owc-da923rc/Makefile index 4cf6c5cf3c..4cf6c5cf3c 100644 --- a/arch/ppc/boards/owc-da923rc/Makefile +++ b/arch/powerpc/boards/owc-da923rc/Makefile diff --git a/arch/ppc/boards/owc-da923rc/config.h b/arch/powerpc/boards/owc-da923rc/config.h index 3895324e95..3895324e95 100644 --- a/arch/ppc/boards/owc-da923rc/config.h +++ b/arch/powerpc/boards/owc-da923rc/config.h diff --git a/arch/ppc/boards/owc-da923rc/da923rc.c b/arch/powerpc/boards/owc-da923rc/da923rc.c index 2665a15091..2665a15091 100644 --- a/arch/ppc/boards/owc-da923rc/da923rc.c +++ b/arch/powerpc/boards/owc-da923rc/da923rc.c diff --git a/arch/ppc/boards/owc-da923rc/ddr.c b/arch/powerpc/boards/owc-da923rc/ddr.c index fc0c50cdcd..fc0c50cdcd 100644 --- a/arch/ppc/boards/owc-da923rc/ddr.c +++ b/arch/powerpc/boards/owc-da923rc/ddr.c diff --git a/arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/boot b/arch/powerpc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/boot index ce7da18e63..ce7da18e63 100644 --- a/arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/boot +++ b/arch/powerpc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/boot diff --git a/arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init b/arch/powerpc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init index 80cc2cffb3..80cc2cffb3 100644 --- a/arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init +++ b/arch/powerpc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init diff --git a/arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/config b/arch/powerpc/boards/owc-da923rc/defaultenv-owc-da923rc/config index 79e2606a71..79e2606a71 100644 --- a/arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/config +++ b/arch/powerpc/boards/owc-da923rc/defaultenv-owc-da923rc/config diff --git a/arch/ppc/boards/owc-da923rc/law.c b/arch/powerpc/boards/owc-da923rc/law.c index 3d32c7e677..3d32c7e677 100644 --- a/arch/ppc/boards/owc-da923rc/law.c +++ b/arch/powerpc/boards/owc-da923rc/law.c diff --git a/arch/ppc/boards/owc-da923rc/nand.c b/arch/powerpc/boards/owc-da923rc/nand.c index 550d790570..550d790570 100644 --- a/arch/ppc/boards/owc-da923rc/nand.c +++ b/arch/powerpc/boards/owc-da923rc/nand.c diff --git a/arch/ppc/boards/owc-da923rc/product_data.c b/arch/powerpc/boards/owc-da923rc/product_data.c index 5135afdd2a..5135afdd2a 100644 --- a/arch/ppc/boards/owc-da923rc/product_data.c +++ b/arch/powerpc/boards/owc-da923rc/product_data.c diff --git a/arch/ppc/boards/owc-da923rc/product_data.h b/arch/powerpc/boards/owc-da923rc/product_data.h index cbbb8d377f..cbbb8d377f 100644 --- a/arch/ppc/boards/owc-da923rc/product_data.h +++ b/arch/powerpc/boards/owc-da923rc/product_data.h diff --git a/arch/ppc/boards/owc-da923rc/tlb.c b/arch/powerpc/boards/owc-da923rc/tlb.c index 889e2743b7..889e2743b7 100644 --- a/arch/ppc/boards/owc-da923rc/tlb.c +++ b/arch/powerpc/boards/owc-da923rc/tlb.c diff --git a/arch/ppc/boards/pcm030/Makefile b/arch/powerpc/boards/pcm030/Makefile index 4e5dc4f57b..4e5dc4f57b 100644 --- a/arch/ppc/boards/pcm030/Makefile +++ b/arch/powerpc/boards/pcm030/Makefile diff --git a/arch/ppc/boards/pcm030/barebox.lds.S b/arch/powerpc/boards/pcm030/barebox.lds.S index 4bf0bc0592..2536db745c 100644 --- a/arch/ppc/boards/pcm030/barebox.lds.S +++ b/arch/powerpc/boards/pcm030/barebox.lds.S @@ -28,7 +28,7 @@ SECTIONS { _text = .; _stext = .; - arch/ppc/mach-mpc5xxx/start.o (.text) + arch/powerpc/mach-mpc5xxx/start.o (.text) *(.text*) *(.got1*) . = ALIGN(16); diff --git a/arch/ppc/boards/pcm030/config.h b/arch/powerpc/boards/pcm030/config.h index 24cf9dc4ff..24cf9dc4ff 100644 --- a/arch/ppc/boards/pcm030/config.h +++ b/arch/powerpc/boards/pcm030/config.h diff --git a/arch/ppc/boards/pcm030/eeprom.c b/arch/powerpc/boards/pcm030/eeprom.c index aa00f361cd..aa00f361cd 100644 --- a/arch/ppc/boards/pcm030/eeprom.c +++ b/arch/powerpc/boards/pcm030/eeprom.c diff --git a/arch/ppc/boards/pcm030/env/init/mtdparts-nor b/arch/powerpc/boards/pcm030/env/init/mtdparts-nor index 44c07ead21..44c07ead21 100644 --- a/arch/ppc/boards/pcm030/env/init/mtdparts-nor +++ b/arch/powerpc/boards/pcm030/env/init/mtdparts-nor diff --git a/arch/ppc/boards/pcm030/env/nv/linux.bootargs.console b/arch/powerpc/boards/pcm030/env/nv/linux.bootargs.console index 31ce0e71eb..31ce0e71eb 100644 --- a/arch/ppc/boards/pcm030/env/nv/linux.bootargs.console +++ b/arch/powerpc/boards/pcm030/env/nv/linux.bootargs.console diff --git a/arch/ppc/boards/pcm030/mt46v32m16-75.h b/arch/powerpc/boards/pcm030/mt46v32m16-75.h index 5509a11f52..5509a11f52 100644 --- a/arch/ppc/boards/pcm030/mt46v32m16-75.h +++ b/arch/powerpc/boards/pcm030/mt46v32m16-75.h diff --git a/arch/ppc/boards/pcm030/pcm030.c b/arch/powerpc/boards/pcm030/pcm030.c index 330d29868e..330d29868e 100644 --- a/arch/ppc/boards/pcm030/pcm030.c +++ b/arch/powerpc/boards/pcm030/pcm030.c diff --git a/arch/ppc/configs/owc_da923rc_defconfig b/arch/powerpc/configs/owc_da923rc_defconfig index 183ddb15f9..183ddb15f9 100644 --- a/arch/ppc/configs/owc_da923rc_defconfig +++ b/arch/powerpc/configs/owc_da923rc_defconfig diff --git a/arch/ppc/configs/p1010rdb_defconfig b/arch/powerpc/configs/p1010rdb_defconfig index 73c02c2e7f..73c02c2e7f 100644 --- a/arch/ppc/configs/p1010rdb_defconfig +++ b/arch/powerpc/configs/p1010rdb_defconfig diff --git a/arch/ppc/configs/p1022ds_defconfig b/arch/powerpc/configs/p1022ds_defconfig index fce3eabaf9..fce3eabaf9 100644 --- a/arch/ppc/configs/p1022ds_defconfig +++ b/arch/powerpc/configs/p1022ds_defconfig diff --git a/arch/ppc/configs/p2020rdb_defconfig b/arch/powerpc/configs/p2020rdb_defconfig index 6cc0328727..6cc0328727 100644 --- a/arch/ppc/configs/p2020rdb_defconfig +++ b/arch/powerpc/configs/p2020rdb_defconfig diff --git a/arch/ppc/configs/pcm030_defconfig b/arch/powerpc/configs/pcm030_defconfig index bd83ff44f0..b97a8d5d0c 100644 --- a/arch/ppc/configs/pcm030_defconfig +++ b/arch/powerpc/configs/pcm030_defconfig @@ -6,7 +6,7 @@ CONFIG_AUTO_COMPLETE=y CONFIG_BOOTM_SHOW_TYPE=y CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/ppc/boards/pcm030/env" +CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/powerpc/boards/pcm030/env" CONFIG_LONGHELP=y CONFIG_CMD_IOMEM=y CONFIG_CMD_MEMINFO=y diff --git a/arch/ppc/cpu-85xx/Makefile b/arch/powerpc/cpu-85xx/Makefile index c649c4ec25..c649c4ec25 100644 --- a/arch/ppc/cpu-85xx/Makefile +++ b/arch/powerpc/cpu-85xx/Makefile diff --git a/arch/ppc/cpu-85xx/fixed_ivor.S b/arch/powerpc/cpu-85xx/fixed_ivor.S index 2cdb8d414e..2cdb8d414e 100644 --- a/arch/ppc/cpu-85xx/fixed_ivor.S +++ b/arch/powerpc/cpu-85xx/fixed_ivor.S diff --git a/arch/ppc/cpu-85xx/mmu.c b/arch/powerpc/cpu-85xx/mmu.c index 6b93c3e8db..6b93c3e8db 100644 --- a/arch/ppc/cpu-85xx/mmu.c +++ b/arch/powerpc/cpu-85xx/mmu.c diff --git a/arch/ppc/cpu-85xx/resetvec.S b/arch/powerpc/cpu-85xx/resetvec.S index 29555d4a00..29555d4a00 100644 --- a/arch/ppc/cpu-85xx/resetvec.S +++ b/arch/powerpc/cpu-85xx/resetvec.S diff --git a/arch/ppc/cpu-85xx/start.S b/arch/powerpc/cpu-85xx/start.S index 82c2c0ad8c..82c2c0ad8c 100644 --- a/arch/ppc/cpu-85xx/start.S +++ b/arch/powerpc/cpu-85xx/start.S diff --git a/arch/ppc/cpu-85xx/tlb.c b/arch/powerpc/cpu-85xx/tlb.c index 2c59806ec2..2c59806ec2 100644 --- a/arch/ppc/cpu-85xx/tlb.c +++ b/arch/powerpc/cpu-85xx/tlb.c diff --git a/arch/ppc/cpu-85xx/traps.c b/arch/powerpc/cpu-85xx/traps.c index 0a8862191f..0a8862191f 100644 --- a/arch/ppc/cpu-85xx/traps.c +++ b/arch/powerpc/cpu-85xx/traps.c diff --git a/arch/ppc/ddr-8xxx/Makefile b/arch/powerpc/ddr-8xxx/Makefile index 43ae3a41df..43ae3a41df 100644 --- a/arch/ppc/ddr-8xxx/Makefile +++ b/arch/powerpc/ddr-8xxx/Makefile diff --git a/arch/ppc/ddr-8xxx/common_timing_params.h b/arch/powerpc/ddr-8xxx/common_timing_params.h index 85a1e2868f..85a1e2868f 100644 --- a/arch/ppc/ddr-8xxx/common_timing_params.h +++ b/arch/powerpc/ddr-8xxx/common_timing_params.h diff --git a/arch/ppc/ddr-8xxx/ctrl_regs.c b/arch/powerpc/ddr-8xxx/ctrl_regs.c index e3d43ab09e..e3d43ab09e 100644 --- a/arch/ppc/ddr-8xxx/ctrl_regs.c +++ b/arch/powerpc/ddr-8xxx/ctrl_regs.c diff --git a/arch/ppc/ddr-8xxx/ddr.h b/arch/powerpc/ddr-8xxx/ddr.h index 2ef87f2776..2ef87f2776 100644 --- a/arch/ppc/ddr-8xxx/ddr.h +++ b/arch/powerpc/ddr-8xxx/ddr.h diff --git a/arch/ppc/ddr-8xxx/ddr2_dimm_params.c b/arch/powerpc/ddr-8xxx/ddr2_dimm_params.c index 22c05ca6da..22c05ca6da 100644 --- a/arch/ppc/ddr-8xxx/ddr2_dimm_params.c +++ b/arch/powerpc/ddr-8xxx/ddr2_dimm_params.c diff --git a/arch/ppc/ddr-8xxx/ddr3_dimm_params.c b/arch/powerpc/ddr-8xxx/ddr3_dimm_params.c index 4f44925ab9..4f44925ab9 100644 --- a/arch/ppc/ddr-8xxx/ddr3_dimm_params.c +++ b/arch/powerpc/ddr-8xxx/ddr3_dimm_params.c diff --git a/arch/ppc/ddr-8xxx/ddr_setctrl.c b/arch/powerpc/ddr-8xxx/ddr_setctrl.c index 115fb42070..115fb42070 100644 --- a/arch/ppc/ddr-8xxx/ddr_setctrl.c +++ b/arch/powerpc/ddr-8xxx/ddr_setctrl.c diff --git a/arch/ppc/ddr-8xxx/lc_common_dimm_params.c b/arch/powerpc/ddr-8xxx/lc_common_dimm_params.c index 9d90fb76db..9d90fb76db 100644 --- a/arch/ppc/ddr-8xxx/lc_common_dimm_params.c +++ b/arch/powerpc/ddr-8xxx/lc_common_dimm_params.c diff --git a/arch/ppc/ddr-8xxx/main.c b/arch/powerpc/ddr-8xxx/main.c index 99b877b5ca..99b877b5ca 100644 --- a/arch/ppc/ddr-8xxx/main.c +++ b/arch/powerpc/ddr-8xxx/main.c diff --git a/arch/ppc/ddr-8xxx/options.c b/arch/powerpc/ddr-8xxx/options.c index ccf5d5e9d8..ccf5d5e9d8 100644 --- a/arch/ppc/ddr-8xxx/options.c +++ b/arch/powerpc/ddr-8xxx/options.c diff --git a/arch/ppc/ddr-8xxx/util.c b/arch/powerpc/ddr-8xxx/util.c index 626b5f3f9b..626b5f3f9b 100644 --- a/arch/ppc/ddr-8xxx/util.c +++ b/arch/powerpc/ddr-8xxx/util.c diff --git a/arch/ppc/include/asm/atomic.h b/arch/powerpc/include/asm/atomic.h index af3c61a823..af3c61a823 100644 --- a/arch/ppc/include/asm/atomic.h +++ b/arch/powerpc/include/asm/atomic.h diff --git a/arch/ppc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h index 2fdd57eff0..2fdd57eff0 100644 --- a/arch/ppc/include/asm/bitops.h +++ b/arch/powerpc/include/asm/bitops.h diff --git a/arch/ppc/include/asm/bitsperlong.h b/arch/powerpc/include/asm/bitsperlong.h index 6dc0bb0c13..6dc0bb0c13 100644 --- a/arch/ppc/include/asm/bitsperlong.h +++ b/arch/powerpc/include/asm/bitsperlong.h diff --git a/arch/ppc/include/asm/byteorder.h b/arch/powerpc/include/asm/byteorder.h index aa6cc4fac9..aa6cc4fac9 100644 --- a/arch/ppc/include/asm/byteorder.h +++ b/arch/powerpc/include/asm/byteorder.h diff --git a/arch/ppc/include/asm/cache.h b/arch/powerpc/include/asm/cache.h index 147ceb6714..147ceb6714 100644 --- a/arch/ppc/include/asm/cache.h +++ b/arch/powerpc/include/asm/cache.h diff --git a/arch/ppc/include/asm/common.h b/arch/powerpc/include/asm/common.h index b91f51e462..b91f51e462 100644 --- a/arch/ppc/include/asm/common.h +++ b/arch/powerpc/include/asm/common.h diff --git a/arch/ppc/include/asm/config.h b/arch/powerpc/include/asm/config.h index ce6581a83f..ce6581a83f 100644 --- a/arch/ppc/include/asm/config.h +++ b/arch/powerpc/include/asm/config.h diff --git a/arch/ppc/include/asm/dma.h b/arch/powerpc/include/asm/dma.h index 27d269f491..27d269f491 100644 --- a/arch/ppc/include/asm/dma.h +++ b/arch/powerpc/include/asm/dma.h diff --git a/arch/ppc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h index bb8762b385..bb8762b385 100644 --- a/arch/ppc/include/asm/elf.h +++ b/arch/powerpc/include/asm/elf.h diff --git a/arch/ppc/include/asm/fsl_ddr_dimm_params.h b/arch/powerpc/include/asm/fsl_ddr_dimm_params.h index 9e6f6b4d34..9e6f6b4d34 100644 --- a/arch/ppc/include/asm/fsl_ddr_dimm_params.h +++ b/arch/powerpc/include/asm/fsl_ddr_dimm_params.h diff --git a/arch/ppc/include/asm/fsl_ddr_sdram.h b/arch/powerpc/include/asm/fsl_ddr_sdram.h index f4732389f6..f4732389f6 100644 --- a/arch/ppc/include/asm/fsl_ddr_sdram.h +++ b/arch/powerpc/include/asm/fsl_ddr_sdram.h diff --git a/arch/ppc/include/asm/fsl_ifc.h b/arch/powerpc/include/asm/fsl_ifc.h index 8faff75033..8faff75033 100644 --- a/arch/ppc/include/asm/fsl_ifc.h +++ b/arch/powerpc/include/asm/fsl_ifc.h diff --git a/arch/ppc/include/asm/fsl_law.h b/arch/powerpc/include/asm/fsl_law.h index 7acb63c9de..7acb63c9de 100644 --- a/arch/ppc/include/asm/fsl_law.h +++ b/arch/powerpc/include/asm/fsl_law.h diff --git a/arch/ppc/include/asm/fsl_lbc.h b/arch/powerpc/include/asm/fsl_lbc.h index cde0864378..cde0864378 100644 --- a/arch/ppc/include/asm/fsl_lbc.h +++ b/arch/powerpc/include/asm/fsl_lbc.h diff --git a/arch/ppc/include/asm/io.h b/arch/powerpc/include/asm/io.h index 025c06f3b7..025c06f3b7 100644 --- a/arch/ppc/include/asm/io.h +++ b/arch/powerpc/include/asm/io.h diff --git a/arch/ppc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h index c691de1c77..c691de1c77 100644 --- a/arch/ppc/include/asm/mmu.h +++ b/arch/powerpc/include/asm/mmu.h diff --git a/arch/ppc/include/asm/module.h b/arch/powerpc/include/asm/module.h index 09c04402c5..09c04402c5 100644 --- a/arch/ppc/include/asm/module.h +++ b/arch/powerpc/include/asm/module.h diff --git a/arch/ppc/include/asm/pci_io.h b/arch/powerpc/include/asm/pci_io.h index 9b738c383f..9b738c383f 100644 --- a/arch/ppc/include/asm/pci_io.h +++ b/arch/powerpc/include/asm/pci_io.h diff --git a/arch/ppc/include/asm/posix_types.h b/arch/powerpc/include/asm/posix_types.h index 22cae6230c..22cae6230c 100644 --- a/arch/ppc/include/asm/posix_types.h +++ b/arch/powerpc/include/asm/posix_types.h diff --git a/arch/ppc/include/asm/ppc_asm.tmpl b/arch/powerpc/include/asm/ppc_asm.tmpl index f4cb84f12c..f4cb84f12c 100644 --- a/arch/ppc/include/asm/ppc_asm.tmpl +++ b/arch/powerpc/include/asm/ppc_asm.tmpl diff --git a/arch/ppc/include/asm/ppc_defs.h b/arch/powerpc/include/asm/ppc_defs.h index 66875fd84b..66875fd84b 100644 --- a/arch/ppc/include/asm/ppc_defs.h +++ b/arch/powerpc/include/asm/ppc_defs.h diff --git a/arch/ppc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 39a89a9d15..39a89a9d15 100644 --- a/arch/ppc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h diff --git a/arch/ppc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h index b4d599f43b..b4d599f43b 100644 --- a/arch/ppc/include/asm/ptrace.h +++ b/arch/powerpc/include/asm/ptrace.h diff --git a/arch/ppc/include/asm/sections.h b/arch/powerpc/include/asm/sections.h index 2b8c516038..2b8c516038 100644 --- a/arch/ppc/include/asm/sections.h +++ b/arch/powerpc/include/asm/sections.h diff --git a/arch/ppc/include/asm/sigcontext.h b/arch/powerpc/include/asm/sigcontext.h index 4bd66a707d..4bd66a707d 100644 --- a/arch/ppc/include/asm/sigcontext.h +++ b/arch/powerpc/include/asm/sigcontext.h diff --git a/arch/ppc/include/asm/signal.h b/arch/powerpc/include/asm/signal.h index b11a28efd1..b11a28efd1 100644 --- a/arch/ppc/include/asm/signal.h +++ b/arch/powerpc/include/asm/signal.h diff --git a/arch/ppc/include/asm/status_led.h b/arch/powerpc/include/asm/status_led.h index eb81f371c9..eb81f371c9 100644 --- a/arch/ppc/include/asm/status_led.h +++ b/arch/powerpc/include/asm/status_led.h diff --git a/arch/ppc/include/asm/string.h b/arch/powerpc/include/asm/string.h index 33d143f04e..33d143f04e 100644 --- a/arch/ppc/include/asm/string.h +++ b/arch/powerpc/include/asm/string.h diff --git a/arch/ppc/include/asm/swab.h b/arch/powerpc/include/asm/swab.h index 110488e641..110488e641 100644 --- a/arch/ppc/include/asm/swab.h +++ b/arch/powerpc/include/asm/swab.h diff --git a/arch/ppc/include/asm/types.h b/arch/powerpc/include/asm/types.h index 2d3ce0a283..2d3ce0a283 100644 --- a/arch/ppc/include/asm/types.h +++ b/arch/powerpc/include/asm/types.h diff --git a/arch/ppc/include/asm/unaligned.h b/arch/powerpc/include/asm/unaligned.h index a41fa8cb4a..a41fa8cb4a 100644 --- a/arch/ppc/include/asm/unaligned.h +++ b/arch/powerpc/include/asm/unaligned.h diff --git a/arch/ppc/lib/Makefile b/arch/powerpc/lib/Makefile index ba2f078b62..ba2f078b62 100644 --- a/arch/ppc/lib/Makefile +++ b/arch/powerpc/lib/Makefile diff --git a/arch/ppc/lib/asm-offsets.c b/arch/powerpc/lib/asm-offsets.c index bef280edd7..bef280edd7 100644 --- a/arch/ppc/lib/asm-offsets.c +++ b/arch/powerpc/lib/asm-offsets.c diff --git a/arch/ppc/lib/bat_rw.c b/arch/powerpc/lib/bat_rw.c index bffa504aea..bffa504aea 100644 --- a/arch/ppc/lib/bat_rw.c +++ b/arch/powerpc/lib/bat_rw.c diff --git a/arch/ppc/lib/board.c b/arch/powerpc/lib/board.c index 9031b37ada..9031b37ada 100644 --- a/arch/ppc/lib/board.c +++ b/arch/powerpc/lib/board.c diff --git a/arch/ppc/lib/crtsavres.S b/arch/powerpc/lib/crtsavres.S index b0fbbfc997..b0fbbfc997 100644 --- a/arch/ppc/lib/crtsavres.S +++ b/arch/powerpc/lib/crtsavres.S diff --git a/arch/ppc/lib/extable.c b/arch/powerpc/lib/extable.c index e7adffa4e0..e7adffa4e0 100644 --- a/arch/ppc/lib/extable.c +++ b/arch/powerpc/lib/extable.c diff --git a/arch/ppc/lib/kgdb.c b/arch/powerpc/lib/kgdb.c index 762cc7a88c..762cc7a88c 100644 --- a/arch/ppc/lib/kgdb.c +++ b/arch/powerpc/lib/kgdb.c diff --git a/arch/ppc/lib/misc.S b/arch/powerpc/lib/misc.S index bd06ff2062..bd06ff2062 100644 --- a/arch/ppc/lib/misc.S +++ b/arch/powerpc/lib/misc.S diff --git a/arch/ppc/lib/module.c b/arch/powerpc/lib/module.c index 9ec6095571..9ec6095571 100644 --- a/arch/ppc/lib/module.c +++ b/arch/powerpc/lib/module.c diff --git a/arch/ppc/lib/ppclinux.c b/arch/powerpc/lib/ppclinux.c index 05c29be7da..05c29be7da 100644 --- a/arch/ppc/lib/ppclinux.c +++ b/arch/powerpc/lib/ppclinux.c diff --git a/arch/ppc/lib/ppcstring.S b/arch/powerpc/lib/ppcstring.S index cce85e3252..cce85e3252 100644 --- a/arch/ppc/lib/ppcstring.S +++ b/arch/powerpc/lib/ppcstring.S diff --git a/arch/ppc/lib/reloc.S b/arch/powerpc/lib/reloc.S index ad598e6f82..ad598e6f82 100644 --- a/arch/ppc/lib/reloc.S +++ b/arch/powerpc/lib/reloc.S diff --git a/arch/ppc/lib/ticks.S b/arch/powerpc/lib/ticks.S index e923f17b63..e923f17b63 100644 --- a/arch/ppc/lib/ticks.S +++ b/arch/powerpc/lib/ticks.S diff --git a/arch/ppc/mach-mpc5xxx/Kconfig b/arch/powerpc/mach-mpc5xxx/Kconfig index 4da947dc6c..4da947dc6c 100644 --- a/arch/ppc/mach-mpc5xxx/Kconfig +++ b/arch/powerpc/mach-mpc5xxx/Kconfig diff --git a/arch/ppc/mach-mpc5xxx/Makefile b/arch/powerpc/mach-mpc5xxx/Makefile index c532a6d1ee..c532a6d1ee 100644 --- a/arch/ppc/mach-mpc5xxx/Makefile +++ b/arch/powerpc/mach-mpc5xxx/Makefile diff --git a/arch/ppc/mach-mpc5xxx/cpu.c b/arch/powerpc/mach-mpc5xxx/cpu.c index a85e1667bc..a85e1667bc 100644 --- a/arch/ppc/mach-mpc5xxx/cpu.c +++ b/arch/powerpc/mach-mpc5xxx/cpu.c diff --git a/arch/ppc/mach-mpc5xxx/cpu_init.c b/arch/powerpc/mach-mpc5xxx/cpu_init.c index 949e49f871..949e49f871 100644 --- a/arch/ppc/mach-mpc5xxx/cpu_init.c +++ b/arch/powerpc/mach-mpc5xxx/cpu_init.c diff --git a/arch/ppc/mach-mpc5xxx/firmware_sc_task.impl.S b/arch/powerpc/mach-mpc5xxx/firmware_sc_task.impl.S index b668ee5cf8..b668ee5cf8 100644 --- a/arch/ppc/mach-mpc5xxx/firmware_sc_task.impl.S +++ b/arch/powerpc/mach-mpc5xxx/firmware_sc_task.impl.S diff --git a/arch/ppc/mach-mpc5xxx/firmware_sc_task_bestcomm.impl.S b/arch/powerpc/mach-mpc5xxx/firmware_sc_task_bestcomm.impl.S index 42d0e3ce08..42d0e3ce08 100644 --- a/arch/ppc/mach-mpc5xxx/firmware_sc_task_bestcomm.impl.S +++ b/arch/powerpc/mach-mpc5xxx/firmware_sc_task_bestcomm.impl.S diff --git a/arch/ppc/mach-mpc5xxx/include/mach/clock.h b/arch/powerpc/mach-mpc5xxx/include/mach/clock.h index b19686f18c..b19686f18c 100644 --- a/arch/ppc/mach-mpc5xxx/include/mach/clock.h +++ b/arch/powerpc/mach-mpc5xxx/include/mach/clock.h diff --git a/arch/ppc/mach-mpc5xxx/include/mach/mpc5xxx.h b/arch/powerpc/mach-mpc5xxx/include/mach/mpc5xxx.h index 9921cbd675..6949b1d950 100644 --- a/arch/ppc/mach-mpc5xxx/include/mach/mpc5xxx.h +++ b/arch/powerpc/mach-mpc5xxx/include/mach/mpc5xxx.h @@ -1,5 +1,5 @@ /* - * arch/ppc/mach-mpc5xxx/include/mach/mpc5xxx.h + * arch/powerpc/mach-mpc5xxx/include/mach/mpc5xxx.h * * Prototypes, etc. for the Motorola MGT5xxx/MPC5xxx * embedded cpu chips diff --git a/arch/ppc/mach-mpc5xxx/include/mach/sdma.h b/arch/powerpc/mach-mpc5xxx/include/mach/sdma.h index 6a25d79fb6..6a25d79fb6 100644 --- a/arch/ppc/mach-mpc5xxx/include/mach/sdma.h +++ b/arch/powerpc/mach-mpc5xxx/include/mach/sdma.h diff --git a/arch/ppc/mach-mpc5xxx/io.S b/arch/powerpc/mach-mpc5xxx/io.S index 871d65ae38..871d65ae38 100644 --- a/arch/ppc/mach-mpc5xxx/io.S +++ b/arch/powerpc/mach-mpc5xxx/io.S diff --git a/arch/ppc/mach-mpc5xxx/loadtask.c b/arch/powerpc/mach-mpc5xxx/loadtask.c index 1458cf7218..1458cf7218 100644 --- a/arch/ppc/mach-mpc5xxx/loadtask.c +++ b/arch/powerpc/mach-mpc5xxx/loadtask.c diff --git a/arch/ppc/mach-mpc5xxx/pci_mpc5200.c b/arch/powerpc/mach-mpc5xxx/pci_mpc5200.c index a3d62a168d..a3d62a168d 100644 --- a/arch/ppc/mach-mpc5xxx/pci_mpc5200.c +++ b/arch/powerpc/mach-mpc5xxx/pci_mpc5200.c diff --git a/arch/ppc/mach-mpc5xxx/reginfo.c b/arch/powerpc/mach-mpc5xxx/reginfo.c index e41d235a5d..e41d235a5d 100644 --- a/arch/ppc/mach-mpc5xxx/reginfo.c +++ b/arch/powerpc/mach-mpc5xxx/reginfo.c diff --git a/arch/ppc/mach-mpc5xxx/speed.c b/arch/powerpc/mach-mpc5xxx/speed.c index 0cec9522e5..0cec9522e5 100644 --- a/arch/ppc/mach-mpc5xxx/speed.c +++ b/arch/powerpc/mach-mpc5xxx/speed.c diff --git a/arch/ppc/mach-mpc5xxx/start.S b/arch/powerpc/mach-mpc5xxx/start.S index 31648a6529..31648a6529 100644 --- a/arch/ppc/mach-mpc5xxx/start.S +++ b/arch/powerpc/mach-mpc5xxx/start.S diff --git a/arch/ppc/mach-mpc5xxx/time.c b/arch/powerpc/mach-mpc5xxx/time.c index d1864673bd..d1864673bd 100644 --- a/arch/ppc/mach-mpc5xxx/time.c +++ b/arch/powerpc/mach-mpc5xxx/time.c diff --git a/arch/ppc/mach-mpc5xxx/traps.c b/arch/powerpc/mach-mpc5xxx/traps.c index 501a76252c..501a76252c 100644 --- a/arch/ppc/mach-mpc5xxx/traps.c +++ b/arch/powerpc/mach-mpc5xxx/traps.c diff --git a/arch/ppc/mach-mpc85xx/.gitignore b/arch/powerpc/mach-mpc85xx/.gitignore index d1165788c9..d1165788c9 100644 --- a/arch/ppc/mach-mpc85xx/.gitignore +++ b/arch/powerpc/mach-mpc85xx/.gitignore diff --git a/arch/ppc/mach-mpc85xx/Kconfig b/arch/powerpc/mach-mpc85xx/Kconfig index aa518b98fc..aa518b98fc 100644 --- a/arch/ppc/mach-mpc85xx/Kconfig +++ b/arch/powerpc/mach-mpc85xx/Kconfig diff --git a/arch/ppc/mach-mpc85xx/Makefile b/arch/powerpc/mach-mpc85xx/Makefile index de4f5efde2..de4f5efde2 100644 --- a/arch/ppc/mach-mpc85xx/Makefile +++ b/arch/powerpc/mach-mpc85xx/Makefile diff --git a/arch/ppc/mach-mpc85xx/barebox.lds.S b/arch/powerpc/mach-mpc85xx/barebox.lds.S index a09a01eba1..2b73fda4e6 100644 --- a/arch/ppc/mach-mpc85xx/barebox.lds.S +++ b/arch/powerpc/mach-mpc85xx/barebox.lds.S @@ -121,13 +121,13 @@ SECTIONS .bootpg RESET_VECTOR_ADDRESS - 0xffc : { _text = .; - arch/ppc/cpu-85xx/start.o (.bootpg) + arch/powerpc/cpu-85xx/start.o (.bootpg) } :text = 0xffff .resetvec RESET_VECTOR_ADDRESS : { KEEP(*(.resetvec)) - arch/ppc/cpu-85xx/resetvec.o (.resetvec) + arch/powerpc/cpu-85xx/resetvec.o (.resetvec) } :text = 0xffff . = RESET_VECTOR_ADDRESS + 0x4; diff --git a/arch/ppc/mach-mpc85xx/cpu.c b/arch/powerpc/mach-mpc85xx/cpu.c index 7c8a59edc9..7c8a59edc9 100644 --- a/arch/ppc/mach-mpc85xx/cpu.c +++ b/arch/powerpc/mach-mpc85xx/cpu.c diff --git a/arch/ppc/mach-mpc85xx/cpu_init.c b/arch/powerpc/mach-mpc85xx/cpu_init.c index 4e13404aff..4e13404aff 100644 --- a/arch/ppc/mach-mpc85xx/cpu_init.c +++ b/arch/powerpc/mach-mpc85xx/cpu_init.c diff --git a/arch/ppc/mach-mpc85xx/cpuid.c b/arch/powerpc/mach-mpc85xx/cpuid.c index ae82e3fd3f..ae82e3fd3f 100644 --- a/arch/ppc/mach-mpc85xx/cpuid.c +++ b/arch/powerpc/mach-mpc85xx/cpuid.c diff --git a/arch/ppc/mach-mpc85xx/eth-devices.c b/arch/powerpc/mach-mpc85xx/eth-devices.c index b1e830a37b..b1e830a37b 100644 --- a/arch/ppc/mach-mpc85xx/eth-devices.c +++ b/arch/powerpc/mach-mpc85xx/eth-devices.c diff --git a/arch/ppc/mach-mpc85xx/fdt.c b/arch/powerpc/mach-mpc85xx/fdt.c index de0114ad64..de0114ad64 100644 --- a/arch/ppc/mach-mpc85xx/fdt.c +++ b/arch/powerpc/mach-mpc85xx/fdt.c diff --git a/arch/ppc/mach-mpc85xx/fsl_gpio.c b/arch/powerpc/mach-mpc85xx/fsl_gpio.c index 468c780ff8..468c780ff8 100644 --- a/arch/ppc/mach-mpc85xx/fsl_gpio.c +++ b/arch/powerpc/mach-mpc85xx/fsl_gpio.c diff --git a/arch/ppc/mach-mpc85xx/fsl_i2c.c b/arch/powerpc/mach-mpc85xx/fsl_i2c.c index 51fcc64c26..51fcc64c26 100644 --- a/arch/ppc/mach-mpc85xx/fsl_i2c.c +++ b/arch/powerpc/mach-mpc85xx/fsl_i2c.c diff --git a/arch/ppc/mach-mpc85xx/fsl_law.c b/arch/powerpc/mach-mpc85xx/fsl_law.c index 2254c92544..2254c92544 100644 --- a/arch/ppc/mach-mpc85xx/fsl_law.c +++ b/arch/powerpc/mach-mpc85xx/fsl_law.c diff --git a/arch/ppc/mach-mpc85xx/include/mach/clock.h b/arch/powerpc/mach-mpc85xx/include/mach/clock.h index 0e68cf6667..0e68cf6667 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/clock.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/clock.h diff --git a/arch/ppc/mach-mpc85xx/include/mach/config_mpc85xx.h b/arch/powerpc/mach-mpc85xx/include/mach/config_mpc85xx.h index fad2c47d11..fad2c47d11 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/config_mpc85xx.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/config_mpc85xx.h diff --git a/arch/ppc/mach-mpc85xx/include/mach/early_udelay.h b/arch/powerpc/mach-mpc85xx/include/mach/early_udelay.h index 12020dd96d..12020dd96d 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/early_udelay.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/early_udelay.h diff --git a/arch/ppc/mach-mpc85xx/include/mach/ffs64.h b/arch/powerpc/mach-mpc85xx/include/mach/ffs64.h index 045498c513..045498c513 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/ffs64.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/ffs64.h diff --git a/arch/ppc/mach-mpc85xx/include/mach/fsl_i2c.h b/arch/powerpc/mach-mpc85xx/include/mach/fsl_i2c.h index d187c6cf49..d187c6cf49 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/fsl_i2c.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/fsl_i2c.h diff --git a/arch/ppc/mach-mpc85xx/include/mach/gianfar.h b/arch/powerpc/mach-mpc85xx/include/mach/gianfar.h index 660cb1e98f..660cb1e98f 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/gianfar.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/gianfar.h diff --git a/arch/ppc/mach-mpc85xx/include/mach/gpio.h b/arch/powerpc/mach-mpc85xx/include/mach/gpio.h index b41ecc5214..b41ecc5214 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/gpio.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/gpio.h diff --git a/arch/ppc/mach-mpc85xx/include/mach/immap_85xx.h b/arch/powerpc/mach-mpc85xx/include/mach/immap_85xx.h index d348f86dac..d348f86dac 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/immap_85xx.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/immap_85xx.h diff --git a/arch/ppc/mach-mpc85xx/include/mach/mmu.h b/arch/powerpc/mach-mpc85xx/include/mach/mmu.h index e2ecc62ef0..e2ecc62ef0 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/mmu.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/mmu.h diff --git a/arch/ppc/mach-mpc85xx/include/mach/mpc85xx.h b/arch/powerpc/mach-mpc85xx/include/mach/mpc85xx.h index 1d9993ace9..1d9993ace9 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/mpc85xx.h +++ b/arch/powerpc/mach-mpc85xx/include/mach/mpc85xx.h diff --git a/arch/ppc/mach-mpc85xx/speed.c b/arch/powerpc/mach-mpc85xx/speed.c index 7f3cfc4dcd..7f3cfc4dcd 100644 --- a/arch/ppc/mach-mpc85xx/speed.c +++ b/arch/powerpc/mach-mpc85xx/speed.c diff --git a/arch/ppc/mach-mpc85xx/time.c b/arch/powerpc/mach-mpc85xx/time.c index f0acd91a1d..f0acd91a1d 100644 --- a/arch/ppc/mach-mpc85xx/time.c +++ b/arch/powerpc/mach-mpc85xx/time.c diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index 5096bde0dc..c71319507c 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -27,11 +27,7 @@ KBUILD_BINARY := barebox.bin machdirs := $(patsubst %,arch/riscv/mach-%/,$(machine-y)) -ifeq ($(KBUILD_SRC),) -KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(machdirs)) -else KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) -endif archprepare: maketools diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile index c205f47ff4..3d2eb5bc11 100644 --- a/arch/sandbox/Makefile +++ b/arch/sandbox/Makefile @@ -29,11 +29,7 @@ KBUILD_CFLAGS += -Dmalloc=barebox_malloc -Dcalloc=barebox_calloc \ machdirs := $(patsubst %,arch/sandbox/mach-%/,$(machine-y)) -ifeq ($(KBUILD_SRC),) -KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(machdirs)) -else KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) -endif archprepare: maketools diff --git a/arch/sandbox/os/Makefile b/arch/sandbox/os/Makefile index 40306b5ffe..c012c9cf01 100644 --- a/arch/sandbox/os/Makefile +++ b/arch/sandbox/os/Makefile @@ -2,11 +2,7 @@ machine-y := sandbox machdirs := $(patsubst %,arch/sandbox/mach-%/,$(machine-y)) -ifeq ($(KBUILD_SRC),) -KBUILD_CPPFLAGS := $(patsubst %,-I%include,$(machdirs)) -else KBUILD_CPPFLAGS = $(patsubst %,-I$(srctree)/%include,$(machdirs)) -endif KBUILD_CPPFLAGS += -DCONFIG_MALLOC_SIZE=$(CONFIG_MALLOC_SIZE) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index c93a680e40..97f6d85f2f 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -46,11 +46,7 @@ endif machdirs := $(patsubst %,arch/x86/mach-%/,$(machine-y)) -ifeq ($(KBUILD_SRC),) -KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(machdirs)) -else KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) -endif ifneq ($(board-y),) BOARD := arch/x86/boards/$(board-y)/ diff --git a/common/Kconfig b/common/Kconfig index 97f609d84b..460ac487cb 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -38,8 +38,8 @@ config BLOCK_WRITE bool config ELF - bool - depends on MIPS + bool "ELF Support" if COMPILE_TEST + depends on MIPS || COMPILE_TEST config FILETYPE bool @@ -1332,6 +1332,19 @@ config KASAN Enables KASAN (KernelAddressSANitizer) - runtime memory debugger, designed to find out-of-bounds accesses and use-after-free bugs. +config COMPILE_TEST + bool "compile-test drivers of other platforms" + default n + help + Some drivers can be compiled on a different platform than they are + intended to be run on. Despite they cannot be used there due to + missing HW support, developers still, opposing to users, might want + to build such drivers to compile-test them. + + If you are a developer and want to build as much as currently possible, + say Y here. If you are a user, say N here to avoid being prompted for + inclusion of unrelated drivers. + endmenu config HAS_DEBUG_LL diff --git a/common/Makefile b/common/Makefile index 84463b4d48..c14af692f9 100644 --- a/common/Makefile +++ b/common/Makefile @@ -86,11 +86,9 @@ echo "\";" \ endef endif -include/generated/passwd.h: $(srctree)/$(src)/Makefile FORCE +include/generated/passwd.h: FORCE $(call filechk,passwd) -targets += include/generated/passwd.h - $(obj)/password.o: include/generated/passwd.h endif # CONFIG_PASSWORD diff --git a/common/filetype.c b/common/filetype.c index 799ede96bc..eda8ecb376 100644 --- a/common/filetype.c +++ b/common/filetype.c @@ -78,6 +78,7 @@ static const struct filetype_str filetype_str[] = { "ubootvar" }, [filetype_stm32_image_v1] = { "STM32 image (v1)", "stm32-image-v1" }, [filetype_zynq_image] = { "Zynq image", "zynq-image" }, + [filetype_mxs_sd_image] = { "i.MX23/28 SD card image", "mxs-sd-image" }, }; const char *file_type_to_string(enum filetype f) @@ -339,6 +340,9 @@ enum filetype file_detect_type(const void *_buf, size_t bufsize) if (buf[0] == 0x01ee0100 && buf[1] == 0xaa55aa55) return filetype_layerscape_qspi_image; + if (le32_to_cpu(buf[0]) == 0x00112233 && le32_to_cpu(buf[1]) == 0x1) + return filetype_mxs_sd_image; + if (bufsize < 64) return filetype_unknown; diff --git a/common/image.c b/common/image.c index 39732c57d7..8199e2df17 100644 --- a/common/image.c +++ b/common/image.c @@ -47,6 +47,7 @@ static table_entry_t arch_name[] = { { IH_ARCH_MIPS64, "mips64", "MIPS 64 Bit", }, { IH_ARCH_NIOS, "nios", "NIOS", }, { IH_ARCH_NIOS2, "nios2", "NIOS II", }, + { IH_ARCH_PPC, "powerpc", "PowerPC", }, { IH_ARCH_PPC, "ppc", "PowerPC", }, { IH_ARCH_S390, "s390", "IBM S390", }, { IH_ARCH_SH, "sh", "SuperH", }, diff --git a/common/imd.c b/common/imd.c index 62be30040e..96496514a5 100644 --- a/common/imd.c +++ b/common/imd.c @@ -367,6 +367,7 @@ static int imd_write_crc32(void *buf, const struct imd_header *imd_start, return -ENODATA; } else { uint32_t *p = (uint32_t *)(imd_crc + 1); + int ret; if (*p != crc) { uint32_t *flags = imd_crc32_flags(imd_crc); @@ -374,7 +375,11 @@ static int imd_write_crc32(void *buf, const struct imd_header *imd_start, debug("Update crc token from 0x%08x to 0x%08x (flags 0x%08x)\n", *p, crc, *flags); *p = crc; - write_file(filename, buf, size); + ret = write_file(filename, buf, size); + if (ret < 0) { + eprintf("CRC: write crc token to %s failed: %d\n", filename, ret); + return ret; + } } } diff --git a/common/startup.c b/common/startup.c index 2c3a999e10..511675ed55 100644 --- a/common/startup.c +++ b/common/startup.c @@ -74,6 +74,16 @@ fs_initcall(mount_root); #endif #ifdef CONFIG_ENV_HANDLING +static bool region_overlap(loff_t starta, loff_t lena, + loff_t startb, loff_t lenb) +{ + if (starta + lena <= startb) + return 0; + if (startb + lenb <= starta) + return 0; + return 1; +} + static int check_overlap(const char *path) { struct cdev *cenv, *cdisk, *cpart; @@ -104,8 +114,8 @@ static int check_overlap(const char *path) if (cpart == cenv) continue; - if (lregion_overlap(cpart->offset, cpart->size, - cenv->offset, cenv->size)) + if (region_overlap(cpart->offset, cpart->size, + cenv->offset, cenv->size)) goto conflict; } diff --git a/drivers/aiodev/Kconfig b/drivers/aiodev/Kconfig index 7f1d0fd4a9..a4909d8ecd 100644 --- a/drivers/aiodev/Kconfig +++ b/drivers/aiodev/Kconfig @@ -18,7 +18,7 @@ config IMX_THERMAL config QORIQ_THERMAL tristate "QorIQ Thermal Monitoring Unit" - depends on ARCH_IMX8MQ + depends on ARCH_IMX8MQ || COMPILE_TEST help Support for Thermal Monitoring Unit (TMU) found on QorIQ and i.MX8MQ platforms. diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig index 1a2ff9129e..6b4e1d30e3 100644 --- a/drivers/bus/Kconfig +++ b/drivers/bus/Kconfig @@ -7,7 +7,7 @@ config BUS_OMAP_GPMC bool "TI OMAP/AM33xx GPMC support" config TI_SYSC - depends on ARCH_OMAP + depends on ARCH_OMAP || COMPILE_TEST bool "TI sysc interconnect target module driver" default y help @@ -15,7 +15,7 @@ config TI_SYSC found on many TI SoCs. config IMX_WEIM - depends on ARCH_IMX + depends on ARCH_IMX || COMPILE_TEST bool "i.MX WEIM driver" config MVEBU_MBUS diff --git a/drivers/clk/mxs/clk-imx28.c b/drivers/clk/mxs/clk-imx28.c index 1dd724c8a6..bf65a4a3b8 100644 --- a/drivers/clk/mxs/clk-imx28.c +++ b/drivers/clk/mxs/clk-imx28.c @@ -11,6 +11,7 @@ #include <linux/clkdev.h> #include <linux/err.h> #include <mach/imx28-regs.h> +#include <of_address.h> #include "clk.h" @@ -38,6 +39,9 @@ #define FRAC1 (regs + 0x01c0) #define CLKSEQ (regs + 0x01d0) +static void __iomem *digctrl; +#define DIGCTRL digctrl + static const char *sel_cpu[] = { "ref_cpu", "ref_xtal", }; static const char *sel_io0[] = { "ref_io0", "ref_xtal", }; static const char *sel_io1[] = { "ref_io1", "ref_xtal", }; @@ -56,8 +60,8 @@ enum imx28_clk { emi_xtal, lcdif_div, etm_div, ptp, saif0_div, saif1_div, clk32k_div, rtc, lradc, spdif_div, clk32k, pwm, uart, ssp0, ssp1, ssp2, ssp3, gpmi, spdif, emi, saif0, saif1, lcdif, etm, - fec_sleep, fec, can0, can1, usb0, usb1, usb0_phy, usb1_phy, enet_out, - lcdif_comp, clk_max + fec, can0, can1, usb0, usb1, usb0_phy, usb1_phy, enet_out, + lcdif_comp, fec_sleep, clk_max }; static struct clk *clks[clk_max]; @@ -65,6 +69,8 @@ static struct clk_onecell_data clk_data; static int __init mx28_clocks_init(struct device_d *dev, void __iomem *regs) { + struct device_node *dcnp; + clks[ref_xtal] = clk_fixed("ref_xtal", 24000000); clks[pll0] = mxs_clk_pll("pll0", "ref_xtal", PLL0CTRL0, 17, 480000000); clks[pll1] = mxs_clk_pll("pll1", "ref_xtal", PLL1CTRL0, 17, 480000000); @@ -121,6 +127,13 @@ static int __init mx28_clocks_init(struct device_d *dev, void __iomem *regs) clks[lcdif_comp] = mxs_clk_lcdif("lcdif_comp", clks[ref_pix], clks[lcdif_div], clks[lcdif]); + dcnp = of_find_compatible_node(NULL, NULL, "fsl,imx28-digctl"); + if (dcnp) { + digctrl = of_iomap(dcnp, 0); + clks[usb0] = mxs_clk_gate("usb0", "usb0_phy", DIGCTRL, 2); + clks[usb1] = mxs_clk_gate("usb1", "usb1_phy", DIGCTRL, 16); + } + clk_set_rate(clks[ref_io0], 480000000); clk_set_rate(clks[ref_io1], 480000000); clk_set_parent(clks[ssp0_sel], clks[ref_io0]); diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index 8805cda39e..6dfe6151ac 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -12,16 +12,16 @@ config ARM_SMP_TWD depends on ARM && CPU_V7 config CLOCKSOURCE_BCM283X - bool - depends on ARCH_BCM283X + bool "BCM283x clock source" if COMPILE_TEST + depends on ARCH_BCM283X || COMPILE_TEST config CLOCKSOURCE_CLPS711X - bool - depends on ARCH_CLPS711X + bool "CLPS711x clock source" if COMPILE_TEST + depends on ARCH_CLPS711X || COMPILE_TEST config CLOCKSOURCE_DIGIC - bool - depends on ARCH_DIGIC + bool "DIGIC clock source" if COMPILE_TEST + depends on ARCH_DIGIC || COMPILE_TEST config CLOCKSOURCE_DUMMY_RATE int @@ -52,20 +52,20 @@ config CLOCKSOURCE_KVX depends on KVX config CLOCKSOURCE_MVEBU - bool - depends on ARCH_MVEBU + bool "MVEBU clock source" if COMPILE_TEST + depends on ARCH_MVEBU || COMPILE_TEST config CLOCKSOURCE_NOMADIK - bool - depends on ARM + bool "Nomadik clock source" if COMPILE_TEST + depends on ARM || COMPILE_TEST config CLOCKSOURCE_ORION - bool - depends on ARCH_MVEBU + bool "ORION clock source" if COMPILE_TEST + depends on ARCH_MVEBU || COMPILE_TEST config CLOCKSOURCE_UEMD - bool - depends on ARCH_UEMD + bool "UEMD clock source" if COMPILE_TEST + depends on ARCH_UEMD || COMPILE_TEST config CLOCKSOURCE_ROCKCHIP bool @@ -75,16 +75,18 @@ config CLOCKSOURCE_ATMEL_PIT bool config CLOCKSOURCE_ARM_ARCHITECTED_TIMER - bool + bool "ARM architected timer clock source" if COMPILE_TEST default y depends on ARM && (CPU_64v8 || CPU_V7) config CLOCKSOURCE_ARM_GLOBAL_TIMER - bool - depends on ARM && CPU_V7 + bool "ARM global timer clock source" if COMPILE_TEST + depends on (ARM && CPU_V7) || COMPILE_TEST + config CLOCKSOURCE_IMX_GPT - def_bool y - depends on ARCH_HAS_IMX_GPT + bool "i.MX GPT clock source" if COMPILE_TEST + default y if ARCH_HAS_IMX_GPT + depends on ARCH_HAS_IMX_GPT || COMPILE_TEST config CLOCKSOURCE_DW_APB_TIMER bool "DW APB timer driver" diff --git a/drivers/crypto/caam/Kconfig b/drivers/crypto/caam/Kconfig index 6bb8278d69..3981678501 100644 --- a/drivers/crypto/caam/Kconfig +++ b/drivers/crypto/caam/Kconfig @@ -1,6 +1,6 @@ config CRYPTO_DEV_FSL_CAAM bool "Freescale CAAM-Multicore driver backend" - depends on ARCH_IMX6 + depends on ARCH_IMX6 || COMPILE_TEST help Enables the driver module for Freescale's Cryptographic Accelerator and Assurance Module (CAAM), also known as the SEC version 4 (SEC4). diff --git a/drivers/crypto/imx-scc/Kconfig b/drivers/crypto/imx-scc/Kconfig index bc4676a10a..c3b69b2fd4 100644 --- a/drivers/crypto/imx-scc/Kconfig +++ b/drivers/crypto/imx-scc/Kconfig @@ -1,12 +1,14 @@ config CRYPTO_DEV_MXC_SCC tristate "Support for Freescale Security Controller (SCC)" - depends on ARCH_IMX25 && OFTREE + depends on (ARCH_IMX25 || COMPILE_TEST) && OFTREE + select CRYPTO_BLKCIPHER + select CRYPTO_DES help This option enables support for the Security Controller (SCC) found in Freescale i.MX25 chips. config CRYPTO_DEV_MXC_SCC_BLOB_GEN tristate "Support for SCC blob gen" - depends on ARCH_IMX25 + depends on ARCH_IMX25 || COMPILE_TEST select BLOBGEN select CRYPTO_DEV_MXC_SCC diff --git a/drivers/ddr/fsl/Kconfig b/drivers/ddr/fsl/Kconfig index 9cae9028a2..09920bb863 100644 --- a/drivers/ddr/fsl/Kconfig +++ b/drivers/ddr/fsl/Kconfig @@ -1,5 +1,5 @@ config DDR_FSL - bool + bool "Freescale DDR support" if COMPILE_TEST if DDR_FSL diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 7e4fc90d39..261b6e6662 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -11,7 +11,7 @@ config GPIO_GENERIC config GPIO_DIGIC bool "GPIO support for Canon DIGIC" - depends on ARCH_DIGIC + depends on ARCH_DIGIC || COMPILE_TEST config GPIO_74164 bool "Generic SPI attached shift register" @@ -23,7 +23,7 @@ config GPIO_74164 config GPIO_CLPS711X bool "GPIO support for CLPS711X" - depends on ARCH_CLPS711X + depends on ARCH_CLPS711X || COMPILE_TEST select GPIO_GENERIC help Say yes here to enable the GPIO driver for the CLPS711X CPUs @@ -31,7 +31,7 @@ config GPIO_CLPS711X config GPIO_DAVINCI bool "TI Davinci/Keystone GPIO support" default y if ARCH_DAVINCI - depends on ARM && ARCH_DAVINCI + depends on (ARM && ARCH_DAVINCI) || COMPILE_TEST help Say yes here to enable GPIO support for TI Davinci/Keystone SoCs. @@ -43,23 +43,26 @@ config GPIO_GENERIC_PLATFORM GPIO controllers config GPIO_IMX - def_bool ARCH_IMX + bool "i.MX GPIO controller" if COMPILE_TEST + default y if ARCH_IMX config GPIO_VF610 - def_bool ARCH_VF610 + bool "VF610 GPIO controller" if COMPILE_TEST + default y if ARCH_VF610 config GPIO_MXS - def_bool ARCH_MXS + bool "MXS GPIO controller" if COMPILE_TEST + default y if ARCH_MXS config GPIO_JZ4740 bool "GPIO support for Ingenic SoCs" - depends on MACH_MIPS_XBURST + depends on MACH_MIPS_XBURST || COMPILE_TEST help Say yes here to enable the GPIO driver for the Ingenic SoCs. config GPIO_MALTA_FPGA_I2C bool "Malta CBUS FPGA I2C GPIO" - depends on MACH_MIPS_MALTA + depends on MACH_MIPS_MALTA || COMPILE_TEST help Support access to the CBUS FPGA I2C lines through the gpio library. @@ -69,18 +72,19 @@ config GPIO_MALTA_FPGA_I2C config GPIO_MPC8XXX bool "MPC512x/MPC8xxx/QorIQ GPIO support" - depends on ARCH_LAYERSCAPE + depends on ARCH_LAYERSCAPE || COMPILE_TEST select GPIO_GENERIC help Say Y here if you're going to use hardware that connects to the MPC512x/831x/834x/837x/8572/8610/QorIQ GPIOs. config GPIO_OMAP - def_bool ARCH_OMAP + bool "OMAP GPIO controller" if COMPILE_TEST + default y if ARCH_OMAP config GPIO_ORION bool "GPIO support for Marvell Orion/MVEBU SoCs" - depends on ARCH_MVEBU + depends on ARCH_MVEBU || COMPILE_TEST help Say yes here to add the driver for the GPIO controller found on Marvell Orion and MVEBU SoCs (Armada 370/XP, @@ -142,7 +146,7 @@ config GPIO_STMPE config GPIO_TEGRA bool "GPIO support for the Tegra SoCs" - depends on ARCH_TEGRA + depends on ARCH_TEGRA || COMPILE_TEST help Say yes here to include the driver for the GPIO controller found on the Tegra line of SoCs. diff --git a/drivers/hw_random/Kconfig b/drivers/hw_random/Kconfig index 4921054568..1923c755db 100644 --- a/drivers/hw_random/Kconfig +++ b/drivers/hw_random/Kconfig @@ -9,14 +9,14 @@ if HWRNG config HWRNG_MXC_RNGC tristate "Freescale i.MX RNGC Random Number Generator" - depends on ARCH_IMX25 || ARCH_IMX35 || ARCH_IMX53 + depends on ARCH_IMX25 || ARCH_IMX35 || ARCH_IMX53 || COMPILE_TEST help This driver provides kernel-side support for the Random Number Generator hardware found on some Freescale i.MX processors. config HWRNG_STM32 tristate "STM32 Random Number Generator" - depends on ARCH_STM32MP + depends on ARCH_STM32MP || COMPILE_TEST help This driver provides barebox support for the Random Number Generator hardware found on the STM32 family of MPUs and MCUs. diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig index e40032d91b..95aa51ebfc 100644 --- a/drivers/input/Kconfig +++ b/drivers/input/Kconfig @@ -27,7 +27,7 @@ config KEYBOARD_GPIO config KEYBOARD_IMX_KEYPAD bool "IMX Keypad" - depends on ARCH_IMX + depends on ARCH_IMX || COMPILE_TEST select INPUT_MATRIXKMAP select POLLER select INPUT diff --git a/drivers/mci/Kconfig b/drivers/mci/Kconfig index d1a42e459d..60c60ceaa5 100644 --- a/drivers/mci/Kconfig +++ b/drivers/mci/Kconfig @@ -54,6 +54,7 @@ config MCI_DW_PIO config MCI_MXS bool "i.MX23/i.MX28" depends on ARCH_MXS + select STMP_DEVICE help Enable this entry to add support to read and write SD cards on a i.MX23/i.MX28 based system. @@ -67,16 +68,16 @@ config MCI_S3C config MCI_BCM283X bool "MCI support for BCM283X" - depends on ARCH_BCM283X + depends on ARCH_BCM283X || COMPILE_TEST config MCI_BCM283X_SDHOST bool "BCM283X sdhost" - depends on ARCH_BCM283X + depends on ARCH_BCM283X || COMPILE_TEST select MCI_SDHCI config MCI_DOVE bool "Marvell Dove SDHCI" - depends on ARCH_DOVE + depends on ARCH_DOVE || COMPILE_TEST select MCI_SDHCI help Enable this entry to add support to read and write SD cards on a @@ -84,14 +85,14 @@ config MCI_DOVE config MCI_IMX bool "i.MX" - depends on ARCH_IMX27 || ARCH_IMX31 + depends on ARCH_IMX27 || ARCH_IMX31 || COMPILE_TEST help Enable this entry to add support to read and write SD cards on a Freescale i.MX based system. config MCI_IMX_ESDHC bool "i.MX esdhc" - depends on ARCH_IMX || ARCH_LAYERSCAPE + depends on ARCH_IMX || ARCH_LAYERSCAPE || COMPILE_TEST select MCI_SDHCI help Enable this entry to add support to read and write SD cards on a @@ -119,7 +120,7 @@ config MCI_PXA config MCI_ATMEL bool "ATMEL (AT91)" - depends on ARCH_AT91 + depends on ARCH_AT91 || COMPILE_TEST help Enable this entry to add support to read and write SD cards on a Atmel AT91. @@ -141,7 +142,7 @@ config MCI_MMCI config MCI_TEGRA bool "Tegra SD/MMC" - depends on ARCH_TEGRA + depends on ARCH_TEGRA || COMPILE_TEST select MCI_SDHCI help Enable this to support SD and MMC card read/write on a Tegra based diff --git a/drivers/mci/atmel_mci.c b/drivers/mci/atmel_mci.c index 0d3b245ced..b4c4e7769e 100644 --- a/drivers/mci/atmel_mci.c +++ b/drivers/mci/atmel_mci.c @@ -21,9 +21,9 @@ #include <clock.h> #include <gpio.h> #include <io.h> -#include <mach/board.h> #include <linux/clk.h> #include <linux/err.h> +#include <platform_data/atmel-mci.h> #include <of_gpio.h> #include "atmel-mci-regs.h" diff --git a/drivers/mci/mxs.c b/drivers/mci/mxs.c index afd6a56397..5e9f17def8 100644 --- a/drivers/mci/mxs.c +++ b/drivers/mci/mxs.c @@ -542,6 +542,13 @@ static void mxs_mci_info(struct device_d *hw_dev) printf("\n"); } +static int mxs_mmc_detect(struct device_d *dev) +{ + struct mxs_mci_host *mxs_mci = dev->priv; + + return mci_detect_card(&mxs_mci->host); +} + static int mxs_mci_probe(struct device_d *hw_dev) { struct resource *iores; @@ -577,6 +584,8 @@ static int mxs_mci_probe(struct device_d *hw_dev) mci_of_parse(host); } + hw_dev->detect = mxs_mmc_detect; + mxs_mci->clk = clk_get(hw_dev, NULL); if (IS_ERR(mxs_mci->clk)) return PTR_ERR(mxs_mci->clk); diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig index 39fd644773..134dc9e37a 100644 --- a/drivers/memory/Kconfig +++ b/drivers/memory/Kconfig @@ -2,7 +2,7 @@ menu "Memory controller drivers" config MC_TEGRA124 bool "Support for Tegra124 memory controller" - depends on ARCH_TEGRA + depends on ARCH_TEGRA || COMPILE_TEST help Say yes here to include the driver for the memory controller found on the Tegra124 SoC. This driver performs the necessary initialization diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 32a2c661fc..42346154e6 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -84,7 +84,7 @@ config SMSC_SUPERIO config MFD_STM32_TIMERS bool "STM32 Timers" - depends on ARCH_STM32MP + depends on ARCH_STM32MP || COMPILE_TEST help Select this to get regmap support for the timer blocks on STM32 MCUs and MPUs. diff --git a/drivers/mtd/mtdraw.c b/drivers/mtd/mtdraw.c index f63da7b3b2..b71619244b 100644 --- a/drivers/mtd/mtdraw.c +++ b/drivers/mtd/mtdraw.c @@ -306,7 +306,7 @@ static int add_mtdraw_device(struct mtd_info *mtd, const char *devname, void **p mtdraw->mtd = mtd; mtdraw->cdev.ops = (struct cdev_operations *)&mtd_raw_fops; - mtdraw->cdev.size = mtd_div_by_wb(mtd->size, mtd) * mtdraw->rps; + mtdraw->cdev.size = (loff_t)mtd_div_by_wb(mtd->size, mtd) * mtdraw->rps; mtdraw->cdev.name = basprintf("%s.raw", mtd->cdev.name); mtdraw->cdev.priv = mtdraw; mtdraw->cdev.dev = &mtd->class_dev; diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 3c5da4a40c..fff9903d1d 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -74,6 +74,7 @@ config NAND_IMX config NAND_MXS bool select NAND_BBT + select STMP_DEVICE prompt "i.MX23/28/6 NAND driver" depends on MXS_APBH_DMA @@ -86,7 +87,7 @@ config NAND_OMAP_GPMC config MTD_NAND_OMAP_ELM bool "Support for ELM (Error Location Module) on OMAP platforms" - depends on NAND_OMAP_GPMC + depends on NAND_OMAP_GPMC || COMPILE_TEST help This config enables the ELM hardware engine, which can be used to locate and correct errors when using BCH ECC scheme. This offloads @@ -97,14 +98,14 @@ config MTD_NAND_OMAP_ELM config NAND_ORION bool prompt "Marvell Orion NAND driver" - depends on ARCH_KIRKWOOD + depends on ARCH_KIRKWOOD || COMPILE_TEST help Support for the Orion NAND controller, present in Kirkwood SoCs. config NAND_MRVL_NFC bool prompt "Marvell PXA3xx NAND driver" - depends on ARCH_ARMADA_370 || ARCH_ARMADA_XP || ARCH_PXA3XX + depends on ARCH_ARMADA_370 || ARCH_ARMADA_XP || ARCH_PXA3XX || COMPILE_TEST help Support for the PXA3xx NAND controller, present in Armada 370/XP and PXA3xx SoCs. @@ -117,7 +118,7 @@ config NAND_ATMEL config NAND_ATMEL_PMECC bool prompt "PMECC support" - depends on NAND_ATMEL + depends on NAND_ATMEL || COMPILE_TEST select NAND_ECC_HW help Support for PMECC present on the SoC sam9x5 and sam9n12 diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index efa16b30e4..9bb4985275 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -45,7 +45,7 @@ config DRIVER_NET_CALXEDA_XGMAC config DRIVER_NET_CS8900 bool "cs8900 ethernet driver" - depends on HAS_CS8900 + depends on HAS_CS8900 || COMPILE_TEST config DRIVER_NET_CPSW bool "CPSW ethernet driver" @@ -75,7 +75,7 @@ config DRIVER_NET_DESIGNWARE_GENERIC config DRIVER_NET_DESIGNWARE_SOCFPGA bool "Designware Universal MAC ethernet driver for SoCFPGA platforms" - depends on ARCH_SOCFPGA + depends on ARCH_SOCFPGA || COMPILE_TEST select MFD_SYSCON select RESET_CONTROLLER help @@ -112,7 +112,7 @@ endif config DRIVER_NET_DM9K bool "Davicom dm9k[E|A|B] ethernet driver" - depends on HAS_DM9000 + depends on HAS_DM9000 || COMPILE_TEST select PHYLIB config DRIVER_NET_E1000 @@ -154,7 +154,7 @@ config DRIVER_NET_ETHOC config DRIVER_NET_FEC_IMX bool "i.MX FEC Ethernet driver" - depends on ARCH_HAS_FEC_IMX + depends on ARCH_HAS_FEC_IMX || COMPILE_TEST select PHYLIB config DRIVER_NET_FSL_FMAN @@ -179,7 +179,7 @@ config DRIVER_NET_KS8851_MLL config DRIVER_NET_MACB bool "macb Ethernet driver" - depends on HAS_MACB + depends on HAS_MACB || COMPILE_TEST select PHYLIB config DRIVER_NET_MICREL diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c index b9a6575009..b01e7ac7a8 100644 --- a/drivers/net/cpsw.c +++ b/drivers/net/cpsw.c @@ -52,6 +52,10 @@ #define CPDMA_DESC_EOP BIT(30) #define CPDMA_DESC_OWNER BIT(29) #define CPDMA_DESC_EOQ BIT(28) +#define CPDMA_DESC_TO_PORT_EN BIT(20) +#define CPDMA_FROM_TO_PORT_SHIFT 16 +#define CPDMA_RX_SOURCE_PORT(__status__) \ + (((__status__) >> CPDMA_FROM_TO_PORT_SHIFT) & 0x7) #define SLIVER_SIZE 0x40 @@ -161,10 +165,12 @@ enum cpsw_ale_port_state { /* ALE unicast entry flags - passed into cpsw_ale_add_ucast() */ #define ALE_SECURE 1 #define ALE_BLOCKED 2 +#define ALE_VLAN 4 struct cpsw_slave { struct cpsw_slave_regs *regs; struct cpsw_sliver_regs *sliver; + int port_vlan; int slave_num; int phy_id; phy_interface_t phy_if; @@ -258,6 +264,7 @@ static inline void cpsw_ale_set_##name(u32 *ale_entry, u32 value) \ } DEFINE_ALE_FIELD(entry_type, 60, 2) +DEFINE_ALE_FIELD(vlan_id, 48, 12) DEFINE_ALE_FIELD(mcast_state, 62, 2) DEFINE_ALE_FIELD(port_mask, 66, 3) DEFINE_ALE_FIELD(ucast_type, 62, 2) @@ -265,6 +272,10 @@ DEFINE_ALE_FIELD(port_num, 66, 2) DEFINE_ALE_FIELD(blocked, 65, 1) DEFINE_ALE_FIELD(secure, 64, 1) DEFINE_ALE_FIELD(mcast, 40, 1) +DEFINE_ALE_FIELD(vlan_untag, 24, 3) +DEFINE_ALE_FIELD(vlan_reg_mcast, 16, 3) +DEFINE_ALE_FIELD(vlan_unreg_mcast, 8, 3) +DEFINE_ALE_FIELD(vlan_member_list, 0, 3) static char ethbdaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; @@ -309,6 +320,23 @@ static int cpsw_ale_write(struct cpsw_priv *priv, int idx, u32 *ale_entry) return idx; } +static int cpsw_ale_match_vlan(struct cpsw_priv *priv, u16 vid) +{ + u32 ale_entry[ALE_ENTRY_WORDS]; + int type, idx; + + for (idx = 0; idx < priv->ale_entries; idx++) { + cpsw_ale_read(priv, idx, ale_entry); + type = cpsw_ale_get_entry_type(ale_entry); + if (type != ALE_TYPE_VLAN) + continue; + if (cpsw_ale_get_vlan_id(ale_entry) == vid) + return idx; + } + + return -ENOENT; +} + static int cpsw_ale_match_addr(struct cpsw_priv *priv, u8* addr) { u32 ale_entry[ALE_ENTRY_WORDS]; @@ -373,13 +401,47 @@ static int cpsw_ale_find_ageable(struct cpsw_priv *priv) return -ENOENT; } +static int cpsw_ale_add_vlan(struct cpsw_priv *priv, u16 vid, int port_mask, + int untag, int reg_mcast, int unreg_mcast) +{ + u32 ale_entry[ALE_ENTRY_WORDS] = {0, 0, 0}; + int idx; + + idx = cpsw_ale_match_vlan(priv, vid); + if (idx >= 0) + cpsw_ale_read(priv, idx, ale_entry); + + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_VLAN); + cpsw_ale_set_vlan_id(ale_entry, vid); + cpsw_ale_set_vlan_untag(ale_entry, untag); + cpsw_ale_set_vlan_reg_mcast(ale_entry, reg_mcast); + cpsw_ale_set_vlan_unreg_mcast(ale_entry, unreg_mcast); + cpsw_ale_set_vlan_member_list(ale_entry, port_mask); + + if (idx < 0) + idx = cpsw_ale_match_free(priv); + if (idx < 0) + idx = cpsw_ale_find_ageable(priv); + if (idx < 0) + return -ENOMEM; + + cpsw_ale_write(priv, idx, ale_entry); + return 0; +} + static int cpsw_ale_add_ucast(struct cpsw_priv *priv, u8 *addr, - int port, int flags) + int port, int flags, u16 vid) { u32 ale_entry[ALE_ENTRY_WORDS] = {0, 0, 0}; int idx; - cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_ADDR); + if (flags & ALE_VLAN) { + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_VLAN_ADDR); + cpsw_ale_set_vlan_id(ale_entry, vid); + } else { + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_ADDR); + } + cpsw_ale_set_addr(ale_entry, addr); cpsw_ale_set_ucast_type(ale_entry, ALE_UCAST_PERSISTANT); cpsw_ale_set_secure(ale_entry, (flags & ALE_SECURE) ? 1 : 0); @@ -398,7 +460,8 @@ static int cpsw_ale_add_ucast(struct cpsw_priv *priv, u8 *addr, return 0; } -static int cpsw_ale_add_mcast(struct cpsw_priv *priv, u8 *addr, int port_mask) +static int cpsw_ale_add_mcast(struct cpsw_priv *priv, u8 *addr, int port_mask, + int flags, u16 vid, int mcast_state) { u32 ale_entry[ALE_ENTRY_WORDS] = {0, 0, 0}; int idx, mask; @@ -407,9 +470,14 @@ static int cpsw_ale_add_mcast(struct cpsw_priv *priv, u8 *addr, int port_mask) if (idx >= 0) cpsw_ale_read(priv, idx, ale_entry); - cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_ADDR); + if (flags & ALE_VLAN) { + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_VLAN_ADDR); + cpsw_ale_set_vlan_id(ale_entry, vid); + } else { + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_ADDR); + } cpsw_ale_set_addr(ale_entry, addr); - cpsw_ale_set_mcast_state(ale_entry, ALE_MCAST_FWD_2); + cpsw_ale_set_mcast_state(ale_entry, mcast_state); mask = cpsw_ale_get_port_mask(ale_entry); port_mask |= mask; @@ -673,6 +741,7 @@ static inline u32 cpsw_get_slave_port(struct cpsw_priv *priv, u32 slave_num) static void cpsw_slave_init(struct cpsw_slave *slave, struct cpsw_priv *priv) { u32 slave_port; + u32 port_mask; dev_dbg(&slave->dev, "* %s\n", __func__); @@ -689,8 +758,22 @@ static void cpsw_slave_init(struct cpsw_slave *slave, struct cpsw_priv *priv) slave_port = cpsw_get_slave_port(priv, slave->slave_num); cpsw_ale_port_state(priv, slave_port, ALE_PORT_STATE_FORWARD); + port_mask = BIT(slave_port) | BIT(priv->host_port); + + /* set port_vlan to host_vlan */ + writel(BIT(slave->slave_num), &slave->regs->port_vlan); + slave->port_vlan = readl(&slave->regs->port_vlan); + slave->port_vlan &= 0xfff; + + /* add dual emac default entries */ + cpsw_ale_add_vlan(priv, slave->port_vlan, port_mask, + port_mask, port_mask, 0); /* add broadcast address */ - cpsw_ale_add_mcast(priv, ethbdaddr, 1 << slave_port); + cpsw_ale_add_mcast(priv, ethbdaddr, BIT(priv->host_port), ALE_VLAN, + slave->port_vlan, 0); + cpsw_ale_add_ucast(priv, priv->mac_addr, priv->host_port, + ALE_SECURE | ALE_VLAN, + slave->port_vlan); } static struct cpdma_desc *cpdma_desc_alloc(struct cpsw_priv *priv) @@ -714,7 +797,7 @@ static void cpdma_desc_free(struct cpsw_priv *priv, struct cpdma_desc *desc) } static int cpdma_submit(struct cpsw_priv *priv, struct cpdma_chan *chan, - void *buffer, int len) + void *buffer, int len, int port) { struct cpdma_desc *desc, *prev; u32 mode; @@ -728,6 +811,10 @@ static int cpdma_submit(struct cpsw_priv *priv, struct cpdma_chan *chan, mode = CPDMA_DESC_OWNER | CPDMA_DESC_SOP | CPDMA_DESC_EOP; + if (port) + mode |= CPDMA_DESC_TO_PORT_EN | + (port << CPDMA_FROM_TO_PORT_SHIFT); + writel(0, &desc->hw_next); writel((u32)buffer, &desc->hw_buffer); writel(len, &desc->hw_len); @@ -758,10 +845,11 @@ done: return 0; } -static int cpdma_process(struct cpsw_priv *priv, struct cpdma_chan *chan, +static int cpdma_process(struct cpsw_slave *slave, struct cpdma_chan *chan, void **buffer, int *len) { struct cpdma_desc *desc = chan->head; + struct cpsw_priv *priv = slave->cpsw; u32 status; if (!desc) @@ -783,6 +871,14 @@ static int cpdma_process(struct cpsw_priv *priv, struct cpdma_chan *chan, return -EBUSY; } + /* cpsw_send is cleaning finished descriptors on next send + * so we only have to check for rx channel here + */ + if (CPDMA_RX_SOURCE_PORT(status) != BIT(slave->slave_num) && + chan == &priv->rx_chan) { + return -ENOMSG; + } + chan->head = (void *)readl(&desc->hw_next); writel((u32)desc, chan->cp); @@ -801,7 +897,7 @@ static int cpsw_open(struct eth_device *edev) { struct cpsw_slave *slave = edev->priv; struct cpsw_priv *priv = slave->cpsw; - int i, ret; + int ret; dev_dbg(&slave->dev, "* %s\n", __func__); @@ -810,6 +906,16 @@ static int cpsw_open(struct eth_device *edev) if (ret) return ret; + cpsw_slave_init(slave, priv); + + return 0; +} + +static int cpsw_setup(struct device_d *dev) +{ + struct cpsw_priv *priv = dev->priv; + int i, ret; + /* soft reset the controller and initialize priv */ soft_reset(priv, &priv->regs->soft_reset); @@ -817,7 +923,10 @@ static int cpsw_open(struct eth_device *edev) cpsw_ale_enable(priv, 1); cpsw_ale_clear(priv, 1); cpsw_ale_bypass(priv, 0); - cpsw_ale_vlan_aware(priv, 0); /* vlan unaware mode */ + cpsw_ale_vlan_aware(priv, 1); /* vlan aware mode */ + + /* dual mac mode in fifo */ + writel(BIT(16), &priv->host_port_regs->flow_thresh); /* setup host port priority mapping */ writel(0x76543210, &priv->host_port_regs->cpdma_tx_pri_map); @@ -831,12 +940,6 @@ static int cpsw_open(struct eth_device *edev) cpsw_ale_port_state(priv, priv->host_port, ALE_PORT_STATE_FORWARD); - cpsw_ale_add_ucast(priv, priv->mac_addr, priv->host_port, - ALE_SECURE); - cpsw_ale_add_mcast(priv, ethbdaddr, 1 << priv->host_port); - - cpsw_slave_init(slave, priv); - /* init descriptor pool */ for (i = 0; i < NUM_DESCS; i++) { u32 val = (i == (NUM_DESCS - 1)) ? 0 : (u32)&priv->descs[i + 1]; @@ -873,9 +976,9 @@ static int cpsw_open(struct eth_device *edev) /* submit rx descs */ for (i = 0; i < PKTBUFSRX - 2; i++) { ret = cpdma_submit(priv, &priv->rx_chan, NetRxPackets[i], - PKTSIZE); + PKTSIZE, 0); if (ret < 0) { - dev_err(&slave->dev, "error %d submitting rx desc\n", ret); + dev_err(dev, "error %d submitting rx desc\n", ret); break; } } @@ -910,12 +1013,13 @@ static int cpsw_send(struct eth_device *edev, void *packet, int length) dev_dbg(&slave->dev, "* %s slave %d\n", __func__, slave->slave_num); /* first reap completed packets */ - while (cpdma_process(priv, &priv->tx_chan, &buffer, &len) >= 0); + while (cpdma_process(slave, &priv->tx_chan, &buffer, &len) >= 0); dev_dbg(&slave->dev, "%s: %i bytes @ 0x%p\n", __func__, length, packet); dma_sync_single_for_device((unsigned long)packet, length, DMA_TO_DEVICE); - ret = cpdma_submit(priv, &priv->tx_chan, packet, length); + ret = cpdma_submit(priv, &priv->tx_chan, packet, + length, BIT(slave->slave_num)); dma_sync_single_for_cpu((unsigned long)packet, length, DMA_TO_DEVICE); return ret; @@ -928,13 +1032,13 @@ static int cpsw_recv(struct eth_device *edev) void *buffer; int len; - while (cpdma_process(priv, &priv->rx_chan, &buffer, &len) >= 0) { + while (cpdma_process(slave, &priv->rx_chan, &buffer, &len) >= 0) { dma_sync_single_for_cpu((unsigned long)buffer, len, DMA_FROM_DEVICE); net_receive(edev, buffer, len); dma_sync_single_for_device((unsigned long)buffer, len, DMA_FROM_DEVICE); - cpdma_submit(priv, &priv->rx_chan, buffer, PKTSIZE); + cpdma_submit(priv, &priv->rx_chan, buffer, PKTSIZE, 0); } return 0; @@ -1015,7 +1119,7 @@ static struct cpsw_data cpsw1_data = { .cpdma_reg_ofs = 0x100, .state_ram_ofs = 0x200, .ale_reg_ofs = 0x600, - .slave_ofs = 0x050, + .slave_ofs = 0x058, .slave_size = 0x040, .sliver_ofs = 0x700, /* FIXME: mdio_reg_ofs and cppi_ram_ofs missing */ @@ -1026,7 +1130,7 @@ static struct cpsw_data cpsw2_data = { .cpdma_reg_ofs = 0x800, .state_ram_ofs = 0xa00, .ale_reg_ofs = 0xd00, - .slave_ofs = 0x200, + .slave_ofs = 0x208, .slave_size = 0x100, .sliver_ofs = 0xd80, .mdio_reg_ofs = 0x1000, @@ -1241,6 +1345,8 @@ static int cpsw_probe(struct device_d *dev) dev->priv = priv; + cpsw_setup(dev); + return 0; out: free(priv->slaves); diff --git a/drivers/net/designware_eqos.c b/drivers/net/designware_eqos.c index cb52f3942d..d2baaeaf63 100644 --- a/drivers/net/designware_eqos.c +++ b/drivers/net/designware_eqos.c @@ -360,6 +360,11 @@ static int eqos_start(struct eth_device *edev) int ret; int i; + ret = phy_device_connect(edev, &eqos->miibus, eqos->phy_addr, + eqos->ops->adjust_link, 0, eqos->interface); + if (ret) + return ret; + setbits_le32(&eqos->dma_regs->mode, EQOS_DMA_MODE_SWR); ret = readl_poll_timeout(&eqos->dma_regs->mode, mode_set, @@ -379,11 +384,6 @@ static int eqos_start(struct eth_device *edev) val = (rate / USEC_PER_SEC) - 1; /* -1 because the data sheet says so */ writel(val, &eqos->mac_regs->us_tic_counter); - ret = phy_device_connect(edev, &eqos->miibus, eqos->phy_addr, - eqos->ops->adjust_link, 0, eqos->interface); - if (ret) - return ret; - /* Before we reset the mac, we must insure the PHY is not powered down * as the dw controller needs all clock domains to be running, including * the PHY clock, to come out of a mac reset. */ diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 2806af376f..6cb162a437 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -68,7 +68,7 @@ comment "MII bus device drivers" config MDIO_MVEBU bool "Driver for MVEBU SoC MDIO bus" - depends on ARCH_MVEBU + depends on ARCH_MVEBU || COMPILE_TEST help Driver for the MDIO bus found on Marvell EBU SoCs. diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index 025c418f2b..0585460976 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -1,5 +1,5 @@ config HW_HAS_PCI - bool + bool "Compile in PCI core" if COMPILE_TEST if HW_HAS_PCI @@ -49,7 +49,7 @@ config PCI_IMX6 config PCI_LAYERSCAPE bool "Freescale Layerscape PCIe controller" - depends on ARCH_LAYERSCAPE + depends on ARCH_LAYERSCAPE || COMPILE_TEST select PCIE_DW select OF_PCI select PCI diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig index b5c8e98b9e..0b513b68d0 100644 --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig @@ -26,7 +26,7 @@ source "drivers/phy/freescale/Kconfig" config PHY_STM32_USBPHYC tristate "STM32 USB HS PHY Controller" - depends on ARCH_STM32MP + depends on ARCH_STM32MP || COMPILE_TEST help Enable this to support the High-Speed USB transceivers that are part of some STMicroelectronics STM32 SoCs. diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index 4f05f5d494..6de9d94672 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig @@ -19,7 +19,7 @@ config PINCTRL_AT91 config PINCTRL_BCM283X bool "GPIO and pinmux support for BCM283X" - depends on ARCH_BCM283X + depends on ARCH_BCM283X || COMPILE_TEST help The pinmux controller on BCM2835 @@ -57,7 +57,7 @@ config PINCTRL_AT91PIO4 config PINCTRL_MXS bool "MXS pinctrl" - depends on ARCH_MXS + depends on ARCH_MXS || COMPILE_TEST default ARCH_MXS help This pinmux controller is found on i.MX23,28 @@ -73,20 +73,20 @@ config PINCTRL_SINGLE bool "pinctrl single" config PINCTRL_TEGRA20 - bool + bool "Tegra20 pinctrl support" if COMPILE_TEST default y if ARCH_TEGRA_2x_SOC help The pinmux controller found on the Tegra 20 line of SoCs. config PINCTRL_TEGRA30 - bool + bool "Tegra30 pinctrl support" if COMPILE_TEST default y if ARCH_TEGRA_3x_SOC default y if ARCH_TEGRA_124_SOC help The pinmux controller found on the Tegra 30+ line of SoCs. config PINCTRL_TEGRA_XUSB - bool + bool "Tegra SerDes pinmux support" if COMPILE_TEST default y if ARCH_TEGRA_124_SOC select GENERIC_PHY help @@ -100,7 +100,7 @@ config PINCTRL_VF610 Pinmux controller found on Vybrid VF610 family of SoCs config PINCTRL_STM32 - bool + bool "STM32 pinctrl support" if COMPILE_TEST default y if ARCH_STM32MP help Pinmux and GPIO controller found on STM32 family diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig index 9268aac912..478ea49eed 100644 --- a/drivers/pwm/Kconfig +++ b/drivers/pwm/Kconfig @@ -18,19 +18,20 @@ config PWM_PXA config PWM_IMX bool "i.MX PWM Support" - depends on ARCH_IMX + depends on ARCH_IMX || COMPILE_TEST help This enables PWM support for Freescale i.MX SoCs config PWM_MXS bool "i.MXs PWM Support" depends on ARCH_MXS + select STMP_DEVICE help This enables PWM support for Freescale i.MX23/i.MX28 SoCs config PWM_STM32 bool "STM32 PWM Support" - depends on ARCH_STM32MP + depends on ARCH_STM32MP || COMPILE_TEST help This enables PWM support for STM32 MCUs and MPUs. diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index bd02fe2137..14cd430ee4 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -48,6 +48,7 @@ config DRIVER_SERIAL_STM378X config DRIVER_SERIAL_AUART depends on ARCH_MXS + select STMP_DEVICE bool "i.MX23/i.MX28 application UART serial driver" config DRIVER_SERIAL_LINUX_CONSOLE diff --git a/drivers/serial/serial_auart.c b/drivers/serial/serial_auart.c index 05cc757970..ee64f2f8db 100644 --- a/drivers/serial/serial_auart.c +++ b/drivers/serial/serial_auart.c @@ -193,6 +193,7 @@ static int auart_serial_probe(struct device_d *dev) cdev->flush = auart_serial_flush; cdev->setbrg = auart_serial_setbaudrate; cdev->dev = dev; + cdev->linux_console_name = "ttyAPP"; dev->priv = priv; iores = dev_request_mem_resource(dev, 0); diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index c696213f50..323d93efeb 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -77,7 +77,7 @@ config DRIVER_SPI_IMX_2_3 config DRIVER_SPI_MXS bool "i.MX (23,28) SPI Master driver" depends on ARCH_IMX28 - depends on SPI + select STMP_DEVICE config DRIVER_SPI_MVEBU bool "Marvell MVEBU SoC SPI master driver" diff --git a/drivers/usb/imx/Kconfig b/drivers/usb/imx/Kconfig index 34f35e0ff6..2b9e63b21c 100644 --- a/drivers/usb/imx/Kconfig +++ b/drivers/usb/imx/Kconfig @@ -1,7 +1,7 @@ config USB_IMX_CHIPIDEA bool "i.MX USB support (read help)" - depends on ARCH_IMX + depends on ARCH_IMX || ARCH_MXS select USB_OTGDEV help The Freescale i.MX SoCs have a variant of the chipidea ci13xxx for @@ -15,8 +15,12 @@ config USB_IMX_CHIPIDEA support to work. It's safe to say yes here. Also select EHCI support for USB host. +config USB_IMX_CHIPIDEA_USBMISC + bool + default y if ARCH_IMX + config USB_IMX_PHY bool - default y if (ARCH_IMX6 || ARCH_VF610) && GENERIC_PHY + default y if (ARCH_IMX6 || ARCH_VF610 || ARCH_MXS) && GENERIC_PHY select STMP_DEVICE select MFD_SYSCON diff --git a/drivers/usb/imx/Makefile b/drivers/usb/imx/Makefile index e15bc711a9..ac17e91e99 100644 --- a/drivers/usb/imx/Makefile +++ b/drivers/usb/imx/Makefile @@ -1,2 +1,3 @@ -obj-$(CONFIG_USB_IMX_CHIPIDEA) += imx-usb-misc.o chipidea-imx.o +obj-$(CONFIG_USB_IMX_CHIPIDEA) += chipidea-imx.o +obj-$(CONFIG_USB_IMX_CHIPIDEA_USBMISC) += imx-usb-misc.o obj-$(CONFIG_USB_IMX_PHY) += imx-usb-phy.o diff --git a/drivers/usb/imx/chipidea-imx.c b/drivers/usb/imx/chipidea-imx.c index 03301d9c3e..635be02929 100644 --- a/drivers/usb/imx/chipidea-imx.c +++ b/drivers/usb/imx/chipidea-imx.c @@ -31,6 +31,10 @@ #define MXC_EHCI_PORTSC_MASK ((0xf << 28) | (1 << 25)) +struct imx_chipidea_data { + bool have_usb_misc; +}; + struct imx_chipidea { struct device_d *dev; void __iomem *base; @@ -47,13 +51,14 @@ struct imx_chipidea { struct clk *clk; struct ehci_host *ehci; struct fsl_udc *udc; + bool have_usb_misc; }; static int imx_chipidea_port_init(void *drvdata) { struct imx_chipidea *ci = drvdata; uint32_t portsc; - int ret; + int ret = 0; if ((ci->flags & MXC_EHCI_PORTSC_MASK) == MXC_EHCI_MODE_ULPI) { dev_dbg(ci->dev, "using ULPI phy\n"); @@ -72,9 +77,11 @@ static int imx_chipidea_port_init(void *drvdata) return ret; } - ret = imx_usbmisc_port_init(ci->usbmisc, ci->portno, ci->flags); - if (ret) - dev_err(ci->dev, "misc init failed: %s\n", strerror(-ret)); + if (ci->have_usb_misc) { + ret = imx_usbmisc_port_init(ci->usbmisc, ci->portno, ci->flags); + if (ret) + dev_err(ci->dev, "misc init failed: %s\n", strerror(-ret)); + } /* PFSC bit is reset by ehci_reset(), thus have to set it not in * probe but here, after ehci_reset() is already called */ @@ -90,11 +97,13 @@ static int imx_chipidea_port_init(void *drvdata) static int imx_chipidea_port_post_init(void *drvdata) { struct imx_chipidea *ci = drvdata; - int ret; + int ret = 0; - ret = imx_usbmisc_port_post_init(ci->usbmisc, ci->portno, ci->flags); - if (ret) - dev_err(ci->dev, "post misc init failed: %s\n", strerror(-ret)); + if (ci->have_usb_misc) { + ret = imx_usbmisc_port_post_init(ci->usbmisc, ci->portno, ci->flags); + if (ret) + dev_err(ci->dev, "post misc init failed: %s\n", strerror(-ret)); + } return ret; } @@ -103,15 +112,18 @@ static int imx_chipidea_probe_dt(struct imx_chipidea *ci) { struct of_phandle_args out_args; - if (of_parse_phandle_with_args(ci->dev->device_node, "fsl,usbmisc", - "#index-cells", 0, &out_args)) - return -ENODEV; + if (ci->have_usb_misc) { + if (of_parse_phandle_with_args(ci->dev->device_node, "fsl,usbmisc", + "#index-cells", 0, &out_args)) + return -ENODEV; + + ci->usbmisc = of_find_device_by_node(out_args.np); + if (!ci->usbmisc) + return -ENODEV; - ci->usbmisc = of_find_device_by_node(out_args.np); - if (!ci->usbmisc) - return -ENODEV; + ci->portno = out_args.args[0]; + } - ci->portno = out_args.args[0]; ci->flags = MXC_EHCI_MODE_UTMI_8BIT; ci->mode = of_usb_get_dr_mode(ci->dev->device_node, NULL); @@ -219,6 +231,7 @@ static int ci_set_mode(void *ctx, enum usb_dr_mode mode) static int imx_chipidea_probe(struct device_d *dev) { struct resource *iores; + struct imx_chipidea_data *imx_data; struct imxusb_platformdata *pdata = dev->platform_data; int ret; void __iomem *base; @@ -229,6 +242,10 @@ static int imx_chipidea_probe(struct device_d *dev) ci->dev = dev; dev->priv = ci; + ret = dev_get_drvdata(dev, (const void **)&imx_data); + if (!ret) + ci->have_usb_misc = imx_data->have_usb_misc; + if (IS_ENABLED(CONFIG_OFDEVICE) && dev->device_node) { ret = imx_chipidea_probe_dt(ci); if (ret) @@ -319,11 +336,24 @@ static void imx_chipidea_remove(struct device_d *dev) ci_udc_unregister(ci->udc); } +static const struct imx_chipidea_data imx_data = { + .have_usb_misc = 1, +}; + +static const struct imx_chipidea_data imx28_data = { + .have_usb_misc = 0, +}; + static __maybe_unused struct of_device_id imx_chipidea_dt_ids[] = { { .compatible = "fsl,imx27-usb", + .data = &imx_data, + }, { + .compatible = "fsl,imx28-usb", + .data = &imx28_data, }, { .compatible = "fsl,imx7d-usb", + .data = &imx_data, }, { /* sentinel */ }, diff --git a/drivers/usb/imx/imx-usb-phy.c b/drivers/usb/imx/imx-usb-phy.c index 069dddcacb..c23a747d0b 100644 --- a/drivers/usb/imx/imx-usb-phy.c +++ b/drivers/usb/imx/imx-usb-phy.c @@ -57,6 +57,7 @@ static int imx_usbphy_phy_init(struct phy *phy) int ret; clk_enable(imxphy->clk); + mdelay(1); ret = stmp_reset_block(imxphy->base + HW_USBPHY_CTRL, false); if (ret) diff --git a/drivers/video/backlight-pwm.c b/drivers/video/backlight-pwm.c index c2979f914d..cae016be8f 100644 --- a/drivers/video/backlight-pwm.c +++ b/drivers/video/backlight-pwm.c @@ -34,7 +34,6 @@ struct pwm_backlight { unsigned int *levels; int enable_gpio; int enable_active_high; - int max_value; int enabled; unsigned int scale; }; @@ -203,6 +202,7 @@ static int backlight_pwm_of_probe(struct device_d *dev) pwm_backlight->backlight.slew_time_ms = 100; pwm_backlight->backlight.brightness_set = backlight_pwm_set; + pwm_backlight->backlight.dev.parent = dev; pwm_backlight->backlight.node = dev->device_node; ret = backlight_register(&pwm_backlight->backlight); diff --git a/drivers/video/ssd1307fb.c b/drivers/video/ssd1307fb.c index 835814bf53..45f479b0ef 100644 --- a/drivers/video/ssd1307fb.c +++ b/drivers/video/ssd1307fb.c @@ -395,7 +395,7 @@ static int ssd1307fb_probe(struct device_d *dev) u32 vmem_size; struct ssd1307fb_par *par; struct ssd1307fb_array *array; - u8 *vmem; + u8 *vmem = NULL; int ret; int i, j; diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index fe979d9306..d9734ef588 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -18,7 +18,7 @@ config WATCHDOG_POLLER config WATCHDOG_AR9344 bool "QCA AR9344" - depends on SOC_QCA_AR9344 || SOC_QCA_AR9331 + depends on SOC_QCA_AR9344 || SOC_QCA_AR9331 || COMPILE_TEST help Add support for watchdog on the QCA AR9344 SoC. @@ -30,7 +30,7 @@ config WATCHDOG_EFI config WATCHDOG_DAVINCI bool "TI Davinci" - depends on ARCH_DAVINCI + depends on ARCH_DAVINCI || COMPILE_TEST help Add support for watchdog on the TI Davinci SoC. @@ -42,31 +42,31 @@ config WATCHDOG_DW config WATCHDOG_MXS28 bool "i.MX28" - depends on ARCH_IMX28 + depends on ARCH_IMX28 || COMPILE_TEST help Add support for watchdog management for the i.MX28 SoC. config WATCHDOG_IMX bool "i.MX watchdog" - depends on ARCH_IMX || ARCH_LAYERSCAPE + depends on ARCH_IMX || ARCH_LAYERSCAPE || COMPILE_TEST help Add support for watchdog found on Freescale i.MX SoCs. config WATCHDOG_JZ4740 bool "Ingenic jz4740 SoC hardware watchdog" - depends on MACH_MIPS_XBURST + depends on MACH_MIPS_XBURST || COMPILE_TEST help Hardware driver for the built-in watchdog timer on Ingenic jz4740 SoCs. config WATCHDOG_OMAP bool "TI OMAP" - depends on ARCH_OMAP + depends on ARCH_OMAP || COMPILE_TEST help Add support for watchdog on the TI OMAP SoC. config WATCHDOG_ORION bool "Watchdog for Armada XP" - depends on ARCH_ARMADA_XP + depends on ARCH_ARMADA_XP || COMPILE_TEST help Add support for watchdog on the Marvall Armada XP @@ -78,7 +78,7 @@ config WATCHDOG_KVX config WATCHDOG_BCM2835 bool "Watchdog for BCM283x SoCs" - depends on ARCH_BCM283X + depends on ARCH_BCM283X || COMPILE_TEST help Add support for watchdog on the Broadcom BCM283X SoCs. @@ -90,7 +90,7 @@ config RAVE_SP_WATCHDOG config STM32_IWDG_WATCHDOG bool "STM32 IWDG" - depends on ARCH_STM32MP + depends on ARCH_STM32MP || COMPILE_TEST select MFD_SYSCON help Enable to support configuration of the STM32's on-SoC IWDG watchdog. diff --git a/drivers/watchdog/im28wd.c b/drivers/watchdog/im28wd.c index 2b233ede20..6ebd97e5f5 100644 --- a/drivers/watchdog/im28wd.c +++ b/drivers/watchdog/im28wd.c @@ -229,9 +229,18 @@ static void imx28_wd_remove(struct device_d *dev) free(priv); } +static __maybe_unused struct of_device_id imx28_wdt_dt_ids[] = { + { + .compatible = "fsl,stmp3xxx-rtc", + }, { + /* sentinel */ + } +}; + static struct driver_d imx28_wd_driver = { .name = "im28wd", .probe = imx28_wd_probe, .remove = imx28_wd_remove, + .of_compatible = DRV_OF_COMPAT(imx28_wdt_dt_ids), }; device_platform_driver(imx28_wd_driver); diff --git a/dts/Bindings/Makefile b/dts/Bindings/Makefile index 1df680d074..7782d99850 100644 --- a/dts/Bindings/Makefile +++ b/dts/Bindings/Makefile @@ -2,6 +2,7 @@ DT_DOC_CHECKER ?= dt-doc-validate DT_EXTRACT_EX ?= dt-extract-example DT_MK_SCHEMA ?= dt-mk-schema +DT_MK_SCHEMA_USERONLY_FLAG := $(if $(DT_SCHEMA_FILES), -u) quiet_cmd_chk_binding = CHKDT $(patsubst $(srctree)/%,%,$<) cmd_chk_binding = $(DT_DOC_CHECKER) -u $(srctree)/$(src) $< ; \ @@ -13,16 +14,18 @@ $(obj)/%.example.dts: $(src)/%.yaml FORCE # Use full schemas when checking %.example.dts DT_TMP_SCHEMA := $(obj)/processed-schema-examples.yaml +find_cmd = find $(srctree)/$(src) \( -name '*.yaml' ! \ + -name 'processed-schema*' ! \ + -name '*.example.dt.yaml' \) + quiet_cmd_mk_schema = SCHEMA $@ - cmd_mk_schema = $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) -o $@ $(real-prereqs) + cmd_mk_schema = rm -f $@ ; \ + $(if $(DT_MK_SCHEMA_FLAGS), \ + echo $(real-prereqs), \ + $(find_cmd)) | \ + xargs $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) >> $@ -DT_DOCS = $(addprefix $(src)/, \ - $(shell \ - cd $(srctree)/$(src) && \ - find * \( -name '*.yaml' ! \ - -name 'processed-schema*' ! \ - -name '*.example.dt.yaml' \) \ - )) +DT_DOCS = $(shell $(find_cmd) | sed -e 's|^$(srctree)/||') DT_SCHEMA_FILES ?= $(DT_DOCS) @@ -37,7 +40,7 @@ override DTC_FLAGS := \ $(obj)/processed-schema-examples.yaml: $(DT_DOCS) FORCE $(call if_changed,mk_schema) -$(obj)/processed-schema.yaml: DT_MK_SCHEMA_FLAGS := -u +$(obj)/processed-schema.yaml: DT_MK_SCHEMA_FLAGS := $(DT_MK_SCHEMA_USERONLY_FLAG) $(obj)/processed-schema.yaml: $(DT_SCHEMA_FILES) FORCE $(call if_changed,mk_schema) diff --git a/dts/Bindings/display/panel/leadtek,ltk500hd1829.yaml b/dts/Bindings/display/panel/leadtek,ltk500hd1829.yaml index fd931b2938..b900973b5f 100644 --- a/dts/Bindings/display/panel/leadtek,ltk500hd1829.yaml +++ b/dts/Bindings/display/panel/leadtek,ltk500hd1829.yaml @@ -37,7 +37,6 @@ examples: dsi { #address-cells = <1>; #size-cells = <0>; - reg = <0xff450000 0x1000>; panel@0 { compatible = "leadtek,ltk500hd1829"; diff --git a/dts/Bindings/display/panel/lvds.yaml b/dts/Bindings/display/panel/lvds.yaml index d0083301ac..946dd35425 100644 --- a/dts/Bindings/display/panel/lvds.yaml +++ b/dts/Bindings/display/panel/lvds.yaml @@ -96,12 +96,20 @@ properties: If set, reverse the bit order described in the data mappings below on all data lanes, transmitting bits for slots 6 to 0 instead of 0 to 6. + port: true + ports: true + required: - compatible - data-mapping - width-mm - height-mm - panel-timing - - port + +oneOf: + - required: + - port + - required: + - ports ... diff --git a/dts/Bindings/display/panel/xinpeng,xpp055c272.yaml b/dts/Bindings/display/panel/xinpeng,xpp055c272.yaml index d9fdb58e06..6913923df5 100644 --- a/dts/Bindings/display/panel/xinpeng,xpp055c272.yaml +++ b/dts/Bindings/display/panel/xinpeng,xpp055c272.yaml @@ -37,7 +37,6 @@ examples: dsi { #address-cells = <1>; #size-cells = <0>; - reg = <0xff450000 0x1000>; panel@0 { compatible = "xinpeng,xpp055c272"; diff --git a/dts/Bindings/dma/socionext,uniphier-xdmac.yaml b/dts/Bindings/dma/socionext,uniphier-xdmac.yaml index 86cfb59925..371f187731 100644 --- a/dts/Bindings/dma/socionext,uniphier-xdmac.yaml +++ b/dts/Bindings/dma/socionext,uniphier-xdmac.yaml @@ -22,9 +22,7 @@ properties: const: socionext,uniphier-xdmac reg: - items: - - description: XDMAC base register region (offset and length) - - description: XDMAC extension register region (offset and length) + maxItems: 1 interrupts: maxItems: 1 @@ -49,12 +47,13 @@ required: - reg - interrupts - "#dma-cells" + - dma-channels examples: - | xdmac: dma-controller@5fc10000 { compatible = "socionext,uniphier-xdmac"; - reg = <0x5fc10000 0x1000>, <0x5fc20000 0x800>; + reg = <0x5fc10000 0x5300>; interrupts = <0 188 4>; #dma-cells = <2>; dma-channels = <16>; diff --git a/dts/Bindings/iio/adc/st,stm32-adc.yaml b/dts/Bindings/iio/adc/st,stm32-adc.yaml index 933ba37944..dd8eb15aeb 100644 --- a/dts/Bindings/iio/adc/st,stm32-adc.yaml +++ b/dts/Bindings/iio/adc/st,stm32-adc.yaml @@ -1,7 +1,7 @@ # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2 --- -$id: "http://devicetree.org/schemas/bindings/iio/adc/st,stm32-adc.yaml#" +$id: "http://devicetree.org/schemas/iio/adc/st,stm32-adc.yaml#" $schema: "http://devicetree.org/meta-schemas/core.yaml#" title: STMicroelectronics STM32 ADC bindings diff --git a/dts/Bindings/mfd/st,stpmic1.yaml b/dts/Bindings/mfd/st,stpmic1.yaml index f88d13d704..be7faa6dc0 100644 --- a/dts/Bindings/mfd/st,stpmic1.yaml +++ b/dts/Bindings/mfd/st,stpmic1.yaml @@ -259,8 +259,6 @@ properties: additionalProperties: false - additionalProperties: false - additionalProperties: false required: diff --git a/dts/Bindings/phy/qcom,qusb2-phy.yaml b/dts/Bindings/phy/qcom,qusb2-phy.yaml index 144ae29e71..f8bd28ff31 100644 --- a/dts/Bindings/phy/qcom,qusb2-phy.yaml +++ b/dts/Bindings/phy/qcom,qusb2-phy.yaml @@ -97,7 +97,7 @@ then: - $ref: /schemas/types.yaml#/definitions/uint32 - minimum: 0 maximum: 63 - default: 0 + default: 32 qcom,charge-ctrl-value: description: @@ -130,7 +130,7 @@ then: - $ref: /schemas/types.yaml#/definitions/uint32 - minimum: 0 maximum: 3 - default: 2 + default: 0 qcom,preemphasis-width: description: @@ -152,7 +152,7 @@ then: - $ref: /schemas/types.yaml#/definitions/uint32 - minimum: 0 maximum: 3 - default: 0 + default: 1 required: - compatible diff --git a/dts/Bindings/regulator/mps,mp5416.yaml b/dts/Bindings/regulator/mps,mp5416.yaml index f0acce2029..3b019fa6db 100644 --- a/dts/Bindings/regulator/mps,mp5416.yaml +++ b/dts/Bindings/regulator/mps,mp5416.yaml @@ -37,7 +37,6 @@ properties: type: object additionalProperties: false - additionalProperties: false required: - compatible diff --git a/dts/Bindings/regulator/mps,mpq7920.yaml b/dts/Bindings/regulator/mps,mpq7920.yaml index a682af0dc6..ae6e7ab36c 100644 --- a/dts/Bindings/regulator/mps,mpq7920.yaml +++ b/dts/Bindings/regulator/mps,mpq7920.yaml @@ -75,7 +75,8 @@ properties: description: | disables over voltage protection of this buck - additionalProperties: false + unevaluatedProperties: false + additionalProperties: false required: diff --git a/dts/Bindings/regulator/rohm,bd71828-regulator.yaml b/dts/Bindings/regulator/rohm,bd71828-regulator.yaml index 71ce032b8c..1e52dafcb5 100644 --- a/dts/Bindings/regulator/rohm,bd71828-regulator.yaml +++ b/dts/Bindings/regulator/rohm,bd71828-regulator.yaml @@ -35,6 +35,8 @@ patternProperties: description: should be "ldo1", ..., "ldo7" + unevaluatedProperties: false + "^BUCK[1-7]$": type: object allOf: @@ -103,5 +105,7 @@ patternProperties: required: - regulator-name - additionalProperties: false + + unevaluatedProperties: false + additionalProperties: false diff --git a/dts/Bindings/regulator/rohm,bd71837-regulator.yaml b/dts/Bindings/regulator/rohm,bd71837-regulator.yaml index a323b1696e..543d4b5239 100644 --- a/dts/Bindings/regulator/rohm,bd71837-regulator.yaml +++ b/dts/Bindings/regulator/rohm,bd71837-regulator.yaml @@ -41,6 +41,8 @@ patternProperties: description: should be "ldo1", ..., "ldo7" + unevaluatedProperties: false + "^BUCK[1-8]$": type: object allOf: @@ -99,5 +101,7 @@ patternProperties: required: - regulator-name - additionalProperties: false + + unevaluatedProperties: false + additionalProperties: false diff --git a/dts/Bindings/regulator/rohm,bd71847-regulator.yaml b/dts/Bindings/regulator/rohm,bd71847-regulator.yaml index 526fd00bcb..d797cc2340 100644 --- a/dts/Bindings/regulator/rohm,bd71847-regulator.yaml +++ b/dts/Bindings/regulator/rohm,bd71847-regulator.yaml @@ -40,6 +40,8 @@ patternProperties: description: should be "ldo1", ..., "ldo6" + unevaluatedProperties: false + "^BUCK[1-6]$": type: object allOf: @@ -93,5 +95,7 @@ patternProperties: required: - regulator-name - additionalProperties: false + + unevaluatedProperties: false + additionalProperties: false diff --git a/dts/Bindings/sound/rockchip-i2s.yaml b/dts/Bindings/sound/rockchip-i2s.yaml index 7cd0e278ed..a3ba2186d6 100644 --- a/dts/Bindings/sound/rockchip-i2s.yaml +++ b/dts/Bindings/sound/rockchip-i2s.yaml @@ -56,6 +56,9 @@ properties: - const: tx - const: rx + power-domains: + maxItems: 1 + rockchip,capture-channels: allOf: - $ref: /schemas/types.yaml#/definitions/uint32 diff --git a/dts/Bindings/sound/rockchip-spdif.txt b/dts/Bindings/sound/rockchip-spdif.txt deleted file mode 100644 index ec20c1271e..0000000000 --- a/dts/Bindings/sound/rockchip-spdif.txt +++ /dev/null @@ -1,45 +0,0 @@ -* Rockchip SPDIF transceiver - -The S/PDIF audio block is a stereo transceiver that allows the -processor to receive and transmit digital audio via an coaxial cable or -a fibre cable. - -Required properties: - -- compatible: should be one of the following: - - "rockchip,rk3066-spdif" - - "rockchip,rk3188-spdif" - - "rockchip,rk3228-spdif" - - "rockchip,rk3288-spdif" - - "rockchip,rk3328-spdif" - - "rockchip,rk3366-spdif" - - "rockchip,rk3368-spdif" - - "rockchip,rk3399-spdif" -- reg: physical base address of the controller and length of memory mapped - region. -- interrupts: should contain the SPDIF interrupt. -- dmas: DMA specifiers for tx dma. See the DMA client binding, - Documentation/devicetree/bindings/dma/dma.txt -- dma-names: should be "tx" -- clocks: a list of phandle + clock-specifier pairs, one for each entry - in clock-names. -- clock-names: should contain following: - - "hclk": clock for SPDIF controller - - "mclk" : clock for SPDIF bus - -Required properties on RK3288: - - rockchip,grf: the phandle of the syscon node for the general register - file (GRF) - -Example for the rk3188 SPDIF controller: - -spdif: spdif@1011e000 { - compatible = "rockchip,rk3188-spdif", "rockchip,rk3066-spdif"; - reg = <0x1011e000 0x2000>; - interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&dmac1_s 8>; - dma-names = "tx"; - clock-names = "hclk", "mclk"; - clocks = <&cru HCLK_SPDIF>, <&cru SCLK_SPDIF>; - #sound-dai-cells = <0>; -}; diff --git a/dts/Bindings/sound/rockchip-spdif.yaml b/dts/Bindings/sound/rockchip-spdif.yaml new file mode 100644 index 0000000000..c467152656 --- /dev/null +++ b/dts/Bindings/sound/rockchip-spdif.yaml @@ -0,0 +1,101 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/rockchip-spdif.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip SPDIF transceiver + +description: + The S/PDIF audio block is a stereo transceiver that allows the + processor to receive and transmit digital audio via a coaxial or + fibre cable. + +maintainers: + - Heiko Stuebner <heiko@sntech.de> + +properties: + compatible: + oneOf: + - const: rockchip,rk3066-spdif + - const: rockchip,rk3228-spdif + - const: rockchip,rk3328-spdif + - const: rockchip,rk3366-spdif + - const: rockchip,rk3368-spdif + - const: rockchip,rk3399-spdif + - items: + - enum: + - rockchip,rk3188-spdif + - rockchip,rk3288-spdif + - const: rockchip,rk3066-spdif + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: clock for SPDIF bus + - description: clock for SPDIF controller + + clock-names: + items: + - const: mclk + - const: hclk + + dmas: + maxItems: 1 + + dma-names: + const: tx + + power-domains: + maxItems: 1 + + rockchip,grf: + $ref: /schemas/types.yaml#/definitions/phandle + description: + The phandle of the syscon node for the GRF register. + Required property on RK3288. + + "#sound-dai-cells": + const: 0 + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - dmas + - dma-names + - "#sound-dai-cells" + +if: + properties: + compatible: + contains: + const: rockchip,rk3288-spdif + +then: + required: + - rockchip,grf + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/rk3188-cru.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + spdif: spdif@1011e000 { + compatible = "rockchip,rk3188-spdif", "rockchip,rk3066-spdif"; + reg = <0x1011e000 0x2000>; + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cru SCLK_SPDIF>, <&cru HCLK_SPDIF>; + clock-names = "mclk", "hclk"; + dmas = <&dmac1_s 8>; + dma-names = "tx"; + #sound-dai-cells = <0>; + }; diff --git a/dts/Bindings/usb/renesas,usb3-peri.yaml b/dts/Bindings/usb/renesas,usb3-peri.yaml index 92d8631b9a..031452aa25 100644 --- a/dts/Bindings/usb/renesas,usb3-peri.yaml +++ b/dts/Bindings/usb/renesas,usb3-peri.yaml @@ -18,6 +18,7 @@ properties: - renesas,r8a774c0-usb3-peri # RZ/G2E - renesas,r8a7795-usb3-peri # R-Car H3 - renesas,r8a7796-usb3-peri # R-Car M3-W + - renesas,r8a77961-usb3-peri # R-Car M3-W+ - renesas,r8a77965-usb3-peri # R-Car M3-N - renesas,r8a77990-usb3-peri # R-Car E3 - const: renesas,rcar-gen3-usb3-peri diff --git a/dts/Bindings/usb/renesas,usbhs.yaml b/dts/Bindings/usb/renesas,usbhs.yaml index 469affa872..a7ae95598c 100644 --- a/dts/Bindings/usb/renesas,usbhs.yaml +++ b/dts/Bindings/usb/renesas,usbhs.yaml @@ -40,6 +40,7 @@ properties: - renesas,usbhs-r8a774c0 # RZ/G2E - renesas,usbhs-r8a7795 # R-Car H3 - renesas,usbhs-r8a7796 # R-Car M3-W + - renesas,usbhs-r8a77961 # R-Car M3-W+ - renesas,usbhs-r8a77965 # R-Car M3-N - renesas,usbhs-r8a77990 # R-Car E3 - renesas,usbhs-r8a77995 # R-Car D3 diff --git a/dts/Bindings/usb/usb-xhci.txt b/dts/Bindings/usb/usb-xhci.txt index 3f378951d6..dc025f126d 100644 --- a/dts/Bindings/usb/usb-xhci.txt +++ b/dts/Bindings/usb/usb-xhci.txt @@ -16,7 +16,8 @@ Required properties: - "renesas,xhci-r8a7791" for r8a7791 SoC - "renesas,xhci-r8a7793" for r8a7793 SoC - "renesas,xhci-r8a7795" for r8a7795 SoC - - "renesas,xhci-r8a7796" for r8a7796 SoC + - "renesas,xhci-r8a7796" for r8a77960 SoC + - "renesas,xhci-r8a77961" for r8a77961 SoC - "renesas,xhci-r8a77965" for r8a77965 SoC - "renesas,xhci-r8a77990" for r8a77990 SoC - "renesas,rcar-gen2-xhci" for a generic R-Car Gen2 or RZ/G1 compatible diff --git a/dts/src/arm/bcm2835-rpi.dtsi b/dts/src/arm/bcm2835-rpi.dtsi index fd2c766e0f..f7ae5a4530 100644 --- a/dts/src/arm/bcm2835-rpi.dtsi +++ b/dts/src/arm/bcm2835-rpi.dtsi @@ -14,6 +14,9 @@ soc { firmware: firmware { compatible = "raspberrypi,bcm2835-firmware", "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + mboxes = <&mailbox>; dma-ranges; }; diff --git a/dts/src/arm/bcm283x.dtsi b/dts/src/arm/bcm283x.dtsi index e1abe8c730..b83a864e2e 100644 --- a/dts/src/arm/bcm283x.dtsi +++ b/dts/src/arm/bcm283x.dtsi @@ -372,6 +372,7 @@ "dsi0_ddr2", "dsi0_ddr"; + status = "disabled"; }; aux: aux@7e215000 { diff --git a/dts/src/arm/omap3-n950-n9.dtsi b/dts/src/arm/omap3-n950-n9.dtsi index a075b63f30..11d41e86f8 100644 --- a/dts/src/arm/omap3-n950-n9.dtsi +++ b/dts/src/arm/omap3-n950-n9.dtsi @@ -341,6 +341,11 @@ status = "disabled"; }; +/* RNG not directly accessible on N950/N9. */ +&rng_target { + status = "disabled"; +}; + &usb_otg_hs { interface-type = <0>; usb-phy = <&usb2_phy>; diff --git a/firmware/Makefile b/firmware/Makefile index 3f2c31868a..020d48440d 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -56,7 +56,7 @@ $(patsubst %,$(obj)/pbl-%.gen.o, $(fw-external-y)): $(obj)/pbl-%.gen.o: $(fwdir) obj-pbl-y += $(patsubst %,%.gen.o, $(fw-external-y)) -ifeq ($(KBUILD_SRC),) +ifndef building_out_of_srctree # Makefile.build only creates subdirectories for O= builds, but external # firmware might live outside the kernel source tree _dummy := $(foreach d,$(addprefix $(obj)/,$(dir $(fw-external-y))), $(shell [ -d $(d) ] || mkdir -p $(d))) @@ -220,6 +220,7 @@ int ftruncate(int fd, loff_t length) } f->size = length; + f->f_inode->i_size = f->size; return 0; } diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 973b8b954c..76e6d0dc11 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -420,4 +420,8 @@ static inline void iowrite64be(u64 value, volatile void __iomem *addr) #endif #endif /* CONFIG_64BIT */ +#ifndef IOMEM +#define IOMEM(addr) ((void __force __iomem *)(addr)) +#endif + #endif /* __ASM_GENERIC_IO_H */ diff --git a/include/common.h b/include/common.h index d73fc3d132..ce16ff83af 100644 --- a/include/common.h +++ b/include/common.h @@ -135,31 +135,4 @@ const char *barebox_get_hostname(void); void barebox_set_hostname(const char *); void barebox_set_hostname_no_overwrite(const char *); -#ifndef IOMEM -#define IOMEM(addr) ((void __force __iomem *)(addr)) -#endif - -/* - * Check if two regions overlap. returns true if they do, false otherwise - */ -static inline bool region_overlap(unsigned long starta, unsigned long lena, - unsigned long startb, unsigned long lenb) -{ - if (starta + lena <= startb) - return 0; - if (startb + lenb <= starta) - return 0; - return 1; -} - -static inline bool lregion_overlap(loff_t starta, loff_t lena, - loff_t startb, loff_t lenb) -{ - if (starta + lena <= startb) - return 0; - if (startb + lenb <= starta) - return 0; - return 1; -} - #endif /* __COMMON_H_ */ diff --git a/include/filetype.h b/include/filetype.h index c3a5bdfbbe..3019dda6ed 100644 --- a/include/filetype.h +++ b/include/filetype.h @@ -51,6 +51,7 @@ enum filetype { filetype_ubootvar, filetype_stm32_image_v1, filetype_zynq_image, + filetype_mxs_sd_image, filetype_max, }; diff --git a/include/linux/export.h b/include/linux/export.h new file mode 100644 index 0000000000..88d318bd8a --- /dev/null +++ b/include/linux/export.h @@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef _LINUX_EXPORT_H +#define _LINUX_EXPORT_H + +#define THIS_MODULE 0 + +#ifdef CONFIG_MODULES + +struct kernel_symbol +{ + unsigned long value; + const char *name; +}; + +/* For every exported symbol, place a struct in the __ksymtab section */ +#define __EXPORT_SYMBOL(sym, sec) \ + extern typeof(sym) sym; \ + static const char __ustrtab_##sym[] \ + __attribute__((section("__usymtab_strings"))) \ + = MODULE_SYMBOL_PREFIX #sym; \ + static const struct kernel_symbol __usymtab_##sym \ + __used \ + __attribute__((section("__usymtab" sec), unused)) \ + = { (unsigned long)&sym, __ustrtab_##sym } + +#define EXPORT_SYMBOL(sym) \ + __EXPORT_SYMBOL(sym, "") + +#define EXPORT_SYMBOL_GPL(sym) \ + __EXPORT_SYMBOL(sym, "") + +#else + +#define EXPORT_SYMBOL(sym) +#define EXPORT_SYMBOL_GPL(sym) + +#endif /* CONFIG_MODULES */ + +#endif /* _LINUX_EXPORT_H */ diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index e2fe42d90e..679ce6e420 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h @@ -139,8 +139,6 @@ struct phy *of_phy_get_by_phandle(struct device_d *dev, const char *phandle, u8 index); void phy_put(struct phy *phy); struct phy *of_phy_get(struct device_node *np, const char *con_id); -struct phy *of_phy_simple_xlate(struct device_d *dev, - struct of_phandle_args *args); struct phy *phy_create(struct device_d *dev, struct device_node *node, const struct phy_ops *ops); void phy_destroy(struct phy *phy); @@ -215,12 +213,6 @@ static inline struct phy *of_phy_get(struct device_node *np, const char *con_id) return ERR_PTR(-ENOSYS); } -static inline struct phy *of_phy_simple_xlate(struct device_d *dev, - struct of_phandle_args *args) -{ - return ERR_PTR(-ENOSYS); -} - static inline struct phy *phy_create(struct device_d *dev, struct device_node *node, const struct phy_ops *ops) diff --git a/include/module.h b/include/module.h index abf740a789..cea8c2e181 100644 --- a/include/module.h +++ b/include/module.h @@ -4,6 +4,7 @@ #include <elf.h> #include <linux/compiler.h> +#include <linux/export.h> #include <linux/list.h> #ifndef MODULE_SYMBOL_PREFIX @@ -11,36 +12,12 @@ #endif #define MODULE_NAME_LEN (64 - sizeof(unsigned long)) -#define THIS_MODULE 0 #ifdef CONFIG_MODULES #include <asm/module.h> -struct kernel_symbol -{ - unsigned long value; - const char *name; -}; - struct module * load_module(void *mod_image, unsigned long len); -/* For every exported symbol, place a struct in the __ksymtab section */ -#define __EXPORT_SYMBOL(sym, sec) \ - extern typeof(sym) sym; \ - static const char __ustrtab_##sym[] \ - __attribute__((section("__usymtab_strings"))) \ - = MODULE_SYMBOL_PREFIX #sym; \ - static const struct kernel_symbol __usymtab_##sym \ - __used \ - __attribute__((section("__usymtab" sec), unused)) \ - = { (unsigned long)&sym, __ustrtab_##sym } - -#define EXPORT_SYMBOL(sym) \ - __EXPORT_SYMBOL(sym, "") - -#define EXPORT_SYMBOL_GPL(sym) \ - __EXPORT_SYMBOL(sym, "") - struct module { /* Unique handle for this module */ char name[MODULE_NAME_LEN]; @@ -74,9 +51,6 @@ int apply_relocate_add(Elf_Shdr *sechdrs, unsigned int symindex, unsigned int relsec, struct module *mod); -#else -#define EXPORT_SYMBOL(sym) -#define EXPORT_SYMBOL_GPL(sym) #endif /* CONFIG_MODULES */ extern struct list_head module_list; diff --git a/include/of.h b/include/of.h index 85d55f9b57..08bbeaf4d2 100644 --- a/include/of.h +++ b/include/of.h @@ -79,8 +79,8 @@ struct fdt_header *of_get_fixed_tree(struct device_node *node); static inline u64 of_read_number(const __be32 *cell, int size) { u64 r = 0; - while (size--) - r = (r << 32) | be32_to_cpu(*(cell++)); + for (; size--; cell++) + r = (r << 32) | be32_to_cpu(*cell); return r; } diff --git a/include/platform_data/atmel-mci.h b/include/platform_data/atmel-mci.h new file mode 100644 index 0000000000..d99ee3d138 --- /dev/null +++ b/include/platform_data/atmel-mci.h @@ -0,0 +1,15 @@ +#ifndef PLATFORM_DATA_ATMEL_MCI_H +#define PLATFORM_DATA_ATMEL_MCI_H + +/* Multimedia Card Interface */ +struct atmel_mci_platform_data { + unsigned slot_b; + unsigned bus_width; + int detect_pin; + int wp_pin; + char *devname; +}; + +void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data); + +#endif /* PLATFORM_DATA_ATMEL_MCI_H */ diff --git a/include/usb/chipidea-imx.h b/include/usb/chipidea-imx.h index 5ea5fcc26d..dfd84a9650 100644 --- a/include/usb/chipidea-imx.h +++ b/include/usb/chipidea-imx.h @@ -43,7 +43,20 @@ struct imxusb_platformdata { enum usb_dr_mode mode; }; +#ifdef CONFIG_USB_IMX_CHIPIDEA_USBMISC int imx_usbmisc_port_init(struct device_d *dev, int port, unsigned flags); int imx_usbmisc_port_post_init(struct device_d *dev, int port, unsigned flags); +#else +static inline int imx_usbmisc_port_init(struct device_d *dev, int port, + unsigned flags) +{ + return 0; +} +static inline int imx_usbmisc_port_post_init(struct device_d *dev, int port, + unsigned flags) +{ + return 0; +} +#endif #endif /* __USB_CHIPIDEA_IMX_H */ diff --git a/lib/Kconfig b/lib/Kconfig index e4b3473759..b4a8079700 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -97,7 +97,7 @@ config IMAGE_SPARSE bool config STMP_DEVICE - bool + bool "STMP device support" if COMPILE_TEST config FSL_QE_FIRMWARE select CRC32 diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 227a022b41..838ab11e7c 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 #### # kbuild: Generic definitions @@ -24,10 +25,18 @@ depfile = $(subst $(comma),_,$(dot-target).d) basetarget = $(basename $(notdir $@)) ### +# real prerequisites without phony targets +real-prereqs = $(filter-out $(PHONY), $^) + +### # Escape single quote for use in echo statements escsq = $(subst $(squote),'\$(squote)',$1) ### +# Quote a string to pass it to C files. foo => '"foo"' +stringify = $(squote)$(quote)$1$(quote)$(squote) + +### # Easy method for doing a status message kecho := : quiet_kecho := echo @@ -37,11 +46,11 @@ kecho := $($(quiet)kecho) ### # filechk is used to check if the content of a generated file is updated. # Sample usage: -# define filechk_sample -# echo $KERNELRELEASE -# endef -# version.h : Makefile +# +# filechk_sample = echo $(KERNELRELEASE) +# version.h: FORCE # $(call filechk,sample) +# # The rule defined shall write to stdout the content of the new file. # The existing file will be compared with the new one. # - If no file exist it is created @@ -50,32 +59,31 @@ kecho := $($(quiet)kecho) # - stdin is piped in from the first prerequisite ($<) so one has # to specify a valid file as first prerequisite (often the kbuild file) define filechk - $(Q)set -e; \ - $(kecho) ' CHK $@'; \ - mkdir -p $(dir $@); \ - $(filechk_$(1)) < $< > $@.tmp; \ - if [ -r $@ ] && cmp -s $@ $@.tmp; then \ - rm -f $@.tmp; \ - else \ - $(kecho) ' UPD $@'; \ - mv -f $@.tmp $@; \ + $(Q)set -e; \ + mkdir -p $(dir $@); \ + trap "rm -f $(dot-target).tmp" EXIT; \ + { $(filechk_$(1)); } > $(dot-target).tmp; \ + if [ ! -r $@ ] || ! cmp -s $@ $(dot-target).tmp; then \ + $(kecho) ' UPD $@'; \ + mv -f $(dot-target).tmp $@; \ fi endef ###### # gcc support functions -# See documentation in Documentation/kbuild/makefiles.txt +# See documentation in Documentation/kbuild/makefiles.rst # cc-cross-prefix # Usage: CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-) -# Return first prefix where a prefix$(CC) is found in PATH. -# If no $(CC) found in PATH with listed prefixes return nothing -cc-cross-prefix = \ - $(word 1, $(foreach c,$(1), \ - $(shell set -e; \ - if (which $(strip $(c))$(CC)) > /dev/null 2>&1 ; then \ - echo $(c); \ - fi))) +# Return first <prefix> where a <prefix>gcc is found in PATH. +# If no gcc found in PATH with listed prefixes return nothing +# +# Note: '2>/dev/null' is here to force Make to invoke a shell. Otherwise, it +# would try to directly execute the shell builtin 'command'. This workaround +# should be kept for a long time since this issue was fixed only after the +# GNU Make 4.2.1 release. +cc-cross-prefix = $(firstword $(foreach c, $(1), \ + $(if $(shell command -v -- $(c)gcc 2>/dev/null), $(c)))) # output directory for tests below TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/) @@ -140,18 +148,13 @@ ld-option = $(call try-run,\ # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj= # Usage: # $(Q)$(MAKE) $(build)=dir -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj +build := -f $(srctree)/scripts/Makefile.build obj ### -# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.modbuiltin obj= -# Usage: -# $(Q)$(MAKE) $(modbuiltin)=dir -modbuiltin := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.modbuiltin obj - -# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=dir +# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj= # Usage: # $(Q)$(MAKE) $(clean)=dir -clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj +clean := -f $(srctree)/scripts/Makefile.clean obj # Prefix -I with $(srctree) if it is not an absolute path. # skip if -I has no parameter @@ -167,10 +170,7 @@ echo-cmd = $(if $($(quiet)cmd_$(1)),\ echo ' $(call escsq,$($(quiet)cmd_$(1)))$(echo-why)';) # printing commands -cmd = @$(echo-cmd) $(cmd_$(1)) - -# Add $(obj)/ for paths that are not absolute -objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o))) +cmd = @set -e; $(echo-cmd) $(cmd_$(1)) ### # if_changed - execute command if any prerequisite is newer than @@ -178,15 +178,15 @@ objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o))) # if_changed_dep - as if_changed, but uses fixdep to reveal dependencies # including used config symbols # if_changed_rule - as if_changed but execute rule instead -# See Documentation/kbuild/makefiles.txt for more info +# See Documentation/kbuild/makefiles.rst for more info ifneq ($(KBUILD_NOCMDDEP),1) -# Check if both arguments are the same including their order. Result is empty +# Check if both commands are the same including their order. Result is empty # string if equal. User may override this check using make KBUILD_NOCMDDEP=1 -arg-check = $(filter-out $(subst $(space),$(space_escape),$(strip $(cmd_$@))), \ +cmd-check = $(filter-out $(subst $(space),$(space_escape),$(strip $(cmd_$@))), \ $(subst $(space),$(space_escape),$(strip $(cmd_$1)))) else -arg-check = $(if $(strip $(cmd_$@)),,1) +cmd-check = $(if $(strip $(cmd_$@)),,1) endif # Replace >$< with >$$< to preserve $ when reloading the .cmd file @@ -197,34 +197,33 @@ endif # (needed for the shell) make-cmd = $(call escsq,$(subst $(pound),$$(pound),$(subst $$,$$$$,$(cmd_$(1))))) -# Find any prerequisites that is newer than target or that does not exist. +# Find any prerequisites that are newer than target or that do not exist. +# (This is not true for now; $? should contain any non-existent prerequisites, +# but it does not work as expected when .SECONDARY is present. This seems a bug +# of GNU Make.) # PHONY targets skipped in both cases. -any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^) +newer-prereqs = $(filter-out $(PHONY),$?) # Execute command if command has changed or prerequisite(s) are updated. -# -if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ - @set -e; \ - $(echo-cmd) $(cmd_$(1)); \ - printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd) +if_changed = $(if $(newer-prereqs)$(cmd-check), \ + $(cmd); \ + printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:) # Execute the command and also postprocess generated .d dependencies file. -if_changed_dep = $(if $(strip $(any-prereq) $(arg-check) ), \ - @set -e; \ - $(echo-cmd) $(cmd_$(1)); \ - scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp;\ - rm -f $(depfile); \ - mv -f $(dot-target).tmp $(dot-target).cmd) +if_changed_dep = $(if $(newer-prereqs)$(cmd-check),$(cmd_and_fixdep),@:) + +cmd_and_fixdep = \ + $(cmd); \ + scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).cmd;\ + rm -f $(depfile) # Usage: $(call if_changed_rule,foo) # Will check if $(cmd_foo) or any of the prerequisites changed, # and if so will execute $(rule_foo). -if_changed_rule = $(if $(strip $(any-prereq) $(arg-check) ), \ - @set -e; \ - $(rule_$(1))) +if_changed_rule = $(if $(newer-prereqs)$(cmd-check),$(rule_$(1)),@:) ### -# why - tell why a a target got build +# why - tell why a target got built # enabled by make V=2 # Output (listed in the order they are checked): # (1) - due to target is PHONY @@ -246,8 +245,8 @@ ifeq ($(KBUILD_VERBOSE),2) why = \ $(if $(filter $@, $(PHONY)),- due to target is PHONY, \ $(if $(wildcard $@), \ - $(if $(strip $(any-prereq)),- due to: $(any-prereq), \ - $(if $(arg-check), \ + $(if $(newer-prereqs),- due to: $(newer-prereqs), \ + $(if $(cmd-check), \ $(if $(cmd_$@),- due to command line change, \ $(if $(filter $@, $(targets)), \ - due to missing .cmd file, \ diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 57c9467691..0232158570 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -49,7 +49,7 @@ ifneq ($(hostprogs)$(hostprogs-y)$(hostprogs-m),) include scripts/Makefile.host endif -ifneq ($(KBUILD_SRC),) +ifdef building_out_of_srctree # Create output directory if not already present _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) @@ -88,10 +88,10 @@ __build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(pbl-target) $( # Linus' kernel sanity checking tool ifeq ($(KBUILD_CHECKSRC),1) quiet_cmd_checksrc = CHECK $< - cmd_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ; + cmd_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< else ifeq ($(KBUILD_CHECKSRC),2) quiet_cmd_force_checksrc = CHECK $< - cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ; + cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< endif # Compile C sources (.c) @@ -137,73 +137,23 @@ cmd_cc_i_c = $(CPP) $(c_flags) -o $@ $< %.i: %.c FORCE $(call if_changed_dep,cc_i_c) -quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@ -cmd_cc_symtypes_c = \ - $(CPP) -D__GENKSYMS__ $(c_flags) $< \ - | $(GENKSYMS) -T $@ >/dev/null; \ - test -s $@ || rm -f $@ - -%.symtypes : %.c FORCE - $(call if_changed_dep,cc_symtypes_c) - # C (.c) files # The C file is compiled and updated dependency information is generated. # (See cmd_cc_o_c + relevant part of rule_cc_o_c) quiet_cmd_cc_o_c = CC $(quiet_modtag) $@ + cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< quiet_cmd_pbl_cc_o_c = PBLCC $@ - -ifndef CONFIG_MODVERSIONS -cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< -cmd_pbl_cc_o_c = $(CC) -D__PBL__ $(c_flags) $(PBL_CPPFLAGS) -c -o $@ $< - -else -# When module versioning is enabled the following steps are executed: -# o compile a .tmp_<file>.o from <file>.c -# o if .tmp_<file>.o doesn't contain a __ksymtab version, i.e. does -# not export symbols, we just rename .tmp_<file>.o to <file>.o and -# are done. -# o otherwise, we calculate symbol versions using the good old -# genksyms on the preprocessed source and postprocess them in a way -# that they are usable as a linker script -# o generate <file>.o from .tmp_<file>.o using the linker to -# replace the unresolved symbols __crc_exported_symbol with -# the actual value of the checksum generated by genksyms - -cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $< -cmd_modversions = \ - if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ - $(CPP) -D__GENKSYMS__ $(c_flags) $< \ - | $(GENKSYMS) $(if $(KBUILD_SYMTYPES), \ - -T $(@D)/$(@F:.o=.symtypes)) \ - > $(@D)/.tmp_$(@F:.o=.ver); \ - \ - $(LD) $(KBUILD_LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ - -T $(@D)/.tmp_$(@F:.o=.ver); \ - rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ - else \ - mv -f $(@D)/.tmp_$(@F) $@; \ - fi; -endif + cmd_pbl_cc_o_c = $(CC) -D__PBL__ $(c_flags) $(PBL_CPPFLAGS) -c -o $@ $< define rule_cc_o_c - $(call echo-cmd,checksrc) $(cmd_checksrc) \ - $(call echo-cmd,cc_o_c) $(cmd_cc_o_c); \ - $(cmd_modversions) \ - scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,cc_o_c)' > \ - $(dot-target).tmp; \ - rm -f $(depfile); \ - mv -f $(dot-target).tmp $(dot-target).cmd + $(call cmd,checksrc) + $(call cmd_and_fixdep,cc_o_c) endef define rule_pbl_cc_o_c - $(call echo-cmd,checksrc) $(cmd_checksrc) \ - $(call echo-cmd,pbl_cc_o_c) $(cmd_pbl_cc_o_c); \ - $(cmd_modversions) \ - scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,pbl_cc_o_c)' > \ - $(dot-target).tmp; \ - rm -f $(depfile); \ - mv -f $(dot-target).tmp $(dot-target).cmd + $(call cmd,checksrc) + $(call cmd_and_fixdep,pbl_cc_o_c) endef # Built-in and composite module parts @@ -258,7 +208,7 @@ pbl-%.o: %.S FORCE $(call if_changed_dep,as_o_S) targets += $(real-objs-y) $(real-objs-m) $(lib-y) $(pbl-y) -targets += $(extra-y) $(MAKECMDGOALS) $(always) +targets += $(extra-y) $(always-y) $(MAKECMDGOALS) # Linker scripts preprocessor (.lds.S -> .lds) # --------------------------------------------------------------------------- diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 9740f3106b..55b565ce3f 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -86,7 +86,7 @@ _hostc_flags = $(KBUILD_HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ _hostcxx_flags = $(KBUILD_HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \ $(HOSTCXXFLAGS_$(target-stem).o) -ifeq ($(KBUILD_SRC),) +ifndef building_out_of_srctree __hostc_flags = $(_hostc_flags) __hostcxx_flags = $(_hostcxx_flags) else diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 985fc13035..39cc24b196 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -147,7 +147,7 @@ endif # If building barebox in a separate objtree expand all occurrences # of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/'). -ifeq ($(KBUILD_SRC),) +ifndef building_out_of_srctree __c_flags = $(_c_flags) __a_flags = $(_a_flags) __cpp_flags = $(_cpp_flags) diff --git a/scripts/bareboximd.c b/scripts/bareboximd.c index d11b661fa3..48c3e8ab3f 100644 --- a/scripts/bareboximd.c +++ b/scripts/bareboximd.c @@ -53,7 +53,7 @@ int imd_command_setenv(const char *variable_name, const char *value) static int write_file(const char *filename, const void *buf, size_t size) { - int fd; + int fd, ret = 0; int now; fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); @@ -62,19 +62,18 @@ static int write_file(const char *filename, const void *buf, size_t size) while (size) { now = write(fd, buf, size); - if (now == 0) { - errno = ENOSPC; - return -1; + if (now < 0) { + ret = now; + goto out; } - if (now < 0) - return now; size -= now; buf += now; } +out: close(fd); - return 0; + return ret; } static int read_file_2(const char *filename, size_t *size, void **outbuf, size_t max_size) diff --git a/scripts/mkmakefile b/scripts/mkmakefile index 84af27bf0f..1cb1747514 100755 --- a/scripts/mkmakefile +++ b/scripts/mkmakefile @@ -1,52 +1,17 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0 # Generates a small Makefile used in the root of the output # directory, to allow make to be started from there. # The Makefile also allow for more convinient build of external modules # Usage # $1 - Kernel src directory -# $2 - Output directory -# $3 - version -# $4 - patchlevel - -test ! -r $2/Makefile -o -O $2/Makefile || exit 0 -# Only overwrite automatically generated Makefiles -# (so we do not overwrite kernel Makefile) -if test -e $2/Makefile && ! grep -q Automatically $2/Makefile -then - exit 0 -fi if [ "${quiet}" != "silent_" ]; then - echo " GEN $2/Makefile" + echo " GEN Makefile" fi -cat << EOF > $2/Makefile +cat << EOF > Makefile # Automatically generated by $0: don't edit - -VERSION = $3 -PATCHLEVEL = $4 - -lastword = \$(word \$(words \$(1)),\$(1)) -makedir := \$(dir \$(call lastword,\$(MAKEFILE_LIST))) - -ifeq ("\$(origin V)", "command line") -VERBOSE := \$(V) -endif -ifneq (\$(VERBOSE),1) -Q := @ -endif - -MAKEARGS := -C $1 -MAKEARGS += O=\$(if \$(patsubst /%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$(makedir)) - -MAKEFLAGS += --no-print-directory - -.PHONY: __sub-make \$(MAKECMDGOALS) - -__sub-make: - \$(Q)\$(MAKE) \$(MAKEARGS) \$(MAKECMDGOALS) - -\$(filter-out __sub-make, \$(MAKECMDGOALS)): __sub-make - @: +include $1/Makefile EOF diff --git a/scripts/tags.sh b/scripts/tags.sh index 8ae44642a2..4e18ae5282 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -1,70 +1,64 @@ -#!/bin/sh +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0-only # Generate tags or cscope files # Usage tags.sh <mode> # # mode may be any of: tags, TAGS, cscope # # Uses the following environment variables: -# ARCH, SUBARCH, SRCARCH, srctree, src, obj +# SUBARCH, SRCARCH, srctree if [ "$KBUILD_VERBOSE" = "1" ]; then set -x fi -# This is a duplicate of RCS_FIND_IGNORE without escaped '()' -ignore="( -name SCCS -o -name BitKeeper -o -name .svn -o \ - -name CVS -o -name .pc -o -name .hg -o \ - -name .git ) \ - -prune -o" +# RCS_FIND_IGNORE has escaped ()s -- remove them. +ignore="$(echo "$RCS_FIND_IGNORE" | sed 's|\\||g' )" +# tags and cscope files should also ignore MODVERSION *.mod.c files +ignore="$ignore ( -name *.mod.c ) -prune -o" -# Do not use full path if we do not use O=.. builds -# Use make O=. {tags|cscope} +# Use make KBUILD_ABS_SRCTREE=1 {tags|cscope} # to force full paths for a non-O= build -if [ "${KBUILD_SRC}" = "" ]; then +if [ "${srctree}" = "." -o -z "${srctree}" ]; then tree= else tree=${srctree}/ fi -# Find all available archs -find_all_archs() -{ - ALLSOURCE_ARCHS="" - for arch in `ls ${tree}arch`; do - ALLSOURCE_ARCHS="${ALLSOURCE_ARCHS} "${arch##\/} - done -} +# ignore userspace tools +ignore="$ignore ( -path ${tree}tools ) -prune -o" # Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH if [ "${ALLSOURCE_ARCHS}" = "" ]; then ALLSOURCE_ARCHS=${SRCARCH} elif [ "${ALLSOURCE_ARCHS}" = "all" ]; then - find_all_archs + ALLSOURCE_ARCHS=$(find ${tree}arch/ -mindepth 1 -maxdepth 1 -type d -printf '%f ') fi -# find sources in arch/$ARCH +# find sources in arch/$1 find_arch_sources() { for i in $archincludedir; do prune="$prune -wholename $i -prune -o" done - find ${tree}arch/$1 $ignore $prune -name "$2" -print; + find ${tree}arch/$1 $ignore $prune -name "$2" -not -type l -print; } # find sources in arch/$1/include find_arch_include_sources() { - include=$(find ${tree}arch/$1/ -name include -type d); + include=$(find ${tree}arch/$1/ -name include -type d -print); if [ -n "$include" ]; then archincludedir="$archincludedir $include" - find $include $ignore -name "$2" -print; + find $include $ignore -name "$2" -not -type l -print; fi } # find sources in include/ find_include_sources() { - find ${tree}include $ignore -name config -prune -o -name "$1" -print; + find ${tree}include $ignore -name config -prune -o -name "$1" \ + -not -type l -print; } # find sources in rest of tree @@ -72,8 +66,8 @@ find_include_sources() find_other_sources() { find ${tree}* $ignore \ - \( -name include -o -name arch -o -name '.tmp_*' \) -prune -o \ - -name "$1" -print; + \( -path ${tree}include -o -path ${tree}arch -o -name '.tmp_*' \) -prune -o \ + -name "$1" -not -type l -print; } find_sources() @@ -95,8 +89,37 @@ all_sources() find_other_sources '*.[chS]' } +all_compiled_sources() +{ + for i in $(all_sources); do + case "$i" in + *.[cS]) + j=${i/\.[cS]/\.o} + j="${j#$tree}" + if [ -e $j ]; then + echo $i + fi + ;; + *) + echo $i + ;; + esac + done +} + +all_target_sources() +{ + if [ -n "$COMPILED_SOURCE" ]; then + all_compiled_sources + else + all_sources + fi +} + all_kconfigs() { + find ${tree}arch/ -maxdepth 1 $ignore \ + -name "Kconfig*" -not -type l -print; for arch in $ALLSOURCE_ARCHS; do find_sources $arch 'Kconfig*' done @@ -105,93 +128,159 @@ all_kconfigs() docscope() { - (echo \-k; echo \-q; all_sources) > cscope.files + (echo \-k; echo \-q; all_target_sources) > cscope.files cscope -b -f cscope.out } dogtags() { - all_sources | gtags -i -f - + all_target_sources | gtags -i -f - +} + +# Basic regular expressions with an optional /kind-spec/ for ctags and +# the following limitations: +# - No regex modifiers +# - Use \{0,1\} instead of \?, because etags expects an unescaped ? +# - \s is not working with etags, use a space or [ \t] +# - \w works, but does not match underscores in etags +# - etags regular expressions have to match at the start of a line; +# a ^[^#] is prepended by setup_regex unless an anchor is already present +regex_asm=( + '/^\(ENTRY\|_GLOBAL\)(\([[:alnum:]_\\]*\)).*/\2/' +) +regex_c=( + '/^SYSCALL_DEFINE[0-9](\([[:alnum:]_]*\).*/sys_\1/' + '/^BPF_CALL_[0-9](\([[:alnum:]_]*\).*/\1/' + '/^COMPAT_SYSCALL_DEFINE[0-9](\([[:alnum:]_]*\).*/compat_sys_\1/' + '/^TRACE_EVENT(\([[:alnum:]_]*\).*/trace_\1/' + '/^TRACE_EVENT(\([[:alnum:]_]*\).*/trace_\1_rcuidle/' + '/^DEFINE_EVENT([^,)]*, *\([[:alnum:]_]*\).*/trace_\1/' + '/^DEFINE_EVENT([^,)]*, *\([[:alnum:]_]*\).*/trace_\1_rcuidle/' + '/^DEFINE_INSN_CACHE_OPS(\([[:alnum:]_]*\).*/get_\1_slot/' + '/^DEFINE_INSN_CACHE_OPS(\([[:alnum:]_]*\).*/free_\1_slot/' + '/^PAGEFLAG(\([[:alnum:]_]*\).*/Page\1/' + '/^PAGEFLAG(\([[:alnum:]_]*\).*/SetPage\1/' + '/^PAGEFLAG(\([[:alnum:]_]*\).*/ClearPage\1/' + '/^TESTSETFLAG(\([[:alnum:]_]*\).*/TestSetPage\1/' + '/^TESTPAGEFLAG(\([[:alnum:]_]*\).*/Page\1/' + '/^SETPAGEFLAG(\([[:alnum:]_]*\).*/SetPage\1/' + '/\<__SETPAGEFLAG(\([[:alnum:]_]*\).*/__SetPage\1/' + '/\<TESTCLEARFLAG(\([[:alnum:]_]*\).*/TestClearPage\1/' + '/\<__TESTCLEARFLAG(\([[:alnum:]_]*\).*/TestClearPage\1/' + '/\<CLEARPAGEFLAG(\([[:alnum:]_]*\).*/ClearPage\1/' + '/\<__CLEARPAGEFLAG(\([[:alnum:]_]*\).*/__ClearPage\1/' + '/^__PAGEFLAG(\([[:alnum:]_]*\).*/__SetPage\1/' + '/^__PAGEFLAG(\([[:alnum:]_]*\).*/__ClearPage\1/' + '/^PAGEFLAG_FALSE(\([[:alnum:]_]*\).*/Page\1/' + '/\<TESTSCFLAG(\([[:alnum:]_]*\).*/TestSetPage\1/' + '/\<TESTSCFLAG(\([[:alnum:]_]*\).*/TestClearPage\1/' + '/\<SETPAGEFLAG_NOOP(\([[:alnum:]_]*\).*/SetPage\1/' + '/\<CLEARPAGEFLAG_NOOP(\([[:alnum:]_]*\).*/ClearPage\1/' + '/\<__CLEARPAGEFLAG_NOOP(\([[:alnum:]_]*\).*/__ClearPage\1/' + '/\<TESTCLEARFLAG_FALSE(\([[:alnum:]_]*\).*/TestClearPage\1/' + '/^PAGE_TYPE_OPS(\([[:alnum:]_]*\).*/Page\1/' + '/^PAGE_TYPE_OPS(\([[:alnum:]_]*\).*/__SetPage\1/' + '/^PAGE_TYPE_OPS(\([[:alnum:]_]*\).*/__ClearPage\1/' + '/^TASK_PFA_TEST([^,]*, *\([[:alnum:]_]*\))/task_\1/' + '/^TASK_PFA_SET([^,]*, *\([[:alnum:]_]*\))/task_set_\1/' + '/^TASK_PFA_CLEAR([^,]*, *\([[:alnum:]_]*\))/task_clear_\1/' + '/^DEF_MMIO_\(IN\|OUT\)_[XD](\([[:alnum:]_]*\),[^)]*)/\2/' + '/^DEBUGGER_BOILERPLATE(\([[:alnum:]_]*\))/\1/' + '/^DEF_PCI_AC_\(\|NO\)RET(\([[:alnum:]_]*\).*/\2/' + '/^PCI_OP_READ(\(\w*\).*[1-4])/pci_bus_read_config_\1/' + '/^PCI_OP_WRITE(\(\w*\).*[1-4])/pci_bus_write_config_\1/' + '/\<DEFINE_\(RT_MUTEX\|MUTEX\|SEMAPHORE\|SPINLOCK\)(\([[:alnum:]_]*\)/\2/v/' + '/\<DEFINE_\(RAW_SPINLOCK\|RWLOCK\|SEQLOCK\)(\([[:alnum:]_]*\)/\2/v/' + '/\<DECLARE_\(RWSEM\|COMPLETION\)(\([[:alnum:]_]\+\)/\2/v/' + '/\<DECLARE_BITMAP(\([[:alnum:]_]*\)/\1/v/' + '/\(^\|\s\)\(\|L\|H\)LIST_HEAD(\([[:alnum:]_]*\)/\3/v/' + '/\(^\|\s\)RADIX_TREE(\([[:alnum:]_]*\)/\2/v/' + '/\<DEFINE_PER_CPU([^,]*, *\([[:alnum:]_]*\)/\1/v/' + '/\<DEFINE_PER_CPU_SHARED_ALIGNED([^,]*, *\([[:alnum:]_]*\)/\1/v/' + '/\<DECLARE_WAIT_QUEUE_HEAD(\([[:alnum:]_]*\)/\1/v/' + '/\<DECLARE_\(TASKLET\|WORK\|DELAYED_WORK\)(\([[:alnum:]_]*\)/\2/v/' + '/\(^\s\)OFFSET(\([[:alnum:]_]*\)/\2/v/' + '/\(^\s\)DEFINE(\([[:alnum:]_]*\)/\2/v/' + '/\<\(DEFINE\|DECLARE\)_HASHTABLE(\([[:alnum:]_]*\)/\2/v/' + '/\<DEFINE_ID\(R\|A\)(\([[:alnum:]_]\+\)/\2/' + '/\<DEFINE_WD_CLASS(\([[:alnum:]_]\+\)/\1/' + '/\<ATOMIC_NOTIFIER_HEAD(\([[:alnum:]_]\+\)/\1/' + '/\<RAW_NOTIFIER_HEAD(\([[:alnum:]_]\+\)/\1/' + '/\<DECLARE_FAULT_ATTR(\([[:alnum:]_]\+\)/\1/' + '/\<BLOCKING_NOTIFIER_HEAD(\([[:alnum:]_]\+\)/\1/' + '/\<DEVICE_ATTR_\(RW\|RO\|WO\)(\([[:alnum:]_]\+\)/dev_attr_\2/' + '/\<DRIVER_ATTR_\(RW\|RO\|WO\)(\([[:alnum:]_]\+\)/driver_attr_\2/' + '/\<\(DEFINE\|DECLARE\)_STATIC_KEY_\(TRUE\|FALSE\)\(\|_RO\)(\([[:alnum:]_]\+\)/\4/' +) +regex_kconfig=( + '/^[[:blank:]]*\(menu\|\)config[[:blank:]]\+\([[:alnum:]_]\+\)/\2/' + '/^[[:blank:]]*\(menu\|\)config[[:blank:]]\+\([[:alnum:]_]\+\)/CONFIG_\2/' +) +setup_regex() +{ + local mode=$1 lang tmp=() r + shift + + regex=() + for lang; do + case "$lang" in + asm) tmp=("${regex_asm[@]}") ;; + c) tmp=("${regex_c[@]}") ;; + kconfig) tmp=("${regex_kconfig[@]}") ;; + esac + for r in "${tmp[@]}"; do + if test "$mode" = "exuberant"; then + regex[${#regex[@]}]="--regex-$lang=${r}b" + else + # Remove ctags /kind-spec/ + case "$r" in + /*/*/?/) + r=${r%?/} + esac + # Prepend ^[^#] unless already anchored + case "$r" in + /^*) ;; + *) + r="/^[^#]*${r#/}" + esac + regex[${#regex[@]}]="--regex=$r" + fi + done + done } exuberant() { - all_sources | xargs $1 -a \ - -I __initdata,__exitdata,__acquires,__releases \ - -I __read_mostly,____cacheline_aligned \ + setup_regex exuberant asm c + all_target_sources | xargs $1 -a \ + -I __initdata,__exitdata,__initconst,__ro_after_init \ + -I __initdata_memblock \ + -I __refdata,__attribute,__maybe_unused,__always_unused \ + -I __acquires,__releases,__deprecated,__always_inline \ + -I __read_mostly,__aligned,____cacheline_aligned \ -I ____cacheline_aligned_in_smp \ + -I __cacheline_aligned,__cacheline_aligned_in_smp \ -I ____cacheline_internodealigned_in_smp \ - -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ + -I __used,__packed,__packed2__,__must_check,__must_hold \ + -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL,ACPI_EXPORT_SYMBOL \ -I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \ - --extra=+f --c-kinds=+px \ - --regex-asm='/^(ENTRY|_GLOBAL)\(([^)]*)\).*/\2/' \ - --regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/' \ - --regex-c++='/^TRACE_EVENT\(([^,)]*).*/trace_\1/' \ - --regex-c++='/^DEFINE_EVENT\([^,)]*, *([^,)]*).*/trace_\1/' \ - --regex-c++='/PAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex-c++='/PAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex-c++='/PAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex-c++='/TESTSETFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex-c++='/TESTPAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex-c++='/SETPAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex-c++='/__SETPAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex-c++='/TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex-c++='/__TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex-c++='/CLEARPAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex-c++='/__CLEARPAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex-c++='/__PAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex-c++='/__PAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex-c++='/PAGEFLAG_FALSE\(([^,)]*).*/Page\1/' \ - --regex-c++='/TESTSCFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex-c++='/TESTSCFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex-c++='/SETPAGEFLAG_NOOP\(([^,)]*).*/SetPage\1/' \ - --regex-c++='/CLEARPAGEFLAG_NOOP\(([^,)]*).*/ClearPage\1/' \ - --regex-c++='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \ - --regex-c++='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ - --regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' \ - --regex-c='/PCI_OP_READ\(([a-z]*[a-z]).*[1-4]\)/pci_bus_read_config_\1/' \ - --regex-c='/PCI_OP_WRITE\(([a-z]*[a-z]).*[1-4]\)/pci_bus_write_config_\1/' + -I static,const \ + --extra=+fq --c-kinds=+px --fields=+iaS --langmap=c:+.h \ + "${regex[@]}" + setup_regex exuberant kconfig all_kconfigs | xargs $1 -a \ - --langdef=kconfig --language-force=kconfig \ - --regex-kconfig='/^[[:blank:]]*(menu|)config[[:blank:]]+([[:alnum:]_]+)/\2/' \ - --regex-kconfig='/^[[:blank:]]*(menu|)config[[:blank:]]+([[:alnum:]_]+)/CONFIG_\2/' + --langdef=kconfig --language-force=kconfig "${regex[@]}" + } emacs() { - all_sources | xargs $1 -a \ - --regex='/^(ENTRY|_GLOBAL)(\([^)]*\)).*/\2/' \ - --regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \ - --regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \ - --regex='/^DEFINE_EVENT([^,)]*, *\([^,)]*\).*/trace_\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex='/TESTSETFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex='/TESTPAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex='/SETPAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex='/__SETPAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex='/TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/__TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/CLEARPAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex='/__CLEARPAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex='/__PAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex='/__PAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex='/PAGEFLAG_FALSE\(([^,)]*).*/Page\1/' \ - --regex='/TESTSCFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex='/TESTSCFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/SETPAGEFLAG_NOOP\(([^,)]*).*/SetPage\1/' \ - --regex='/CLEARPAGEFLAG_NOOP\(([^,)]*).*/ClearPage\1/' \ - --regex='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \ - --regex='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ - --regex='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' \ - --regex='/PCI_OP_READ\(([a-z]*[a-z]).*[1-4]\)/pci_bus_read_config_\1/' \ - --regex='/PCI_OP_WRITE\(([a-z]*[a-z]).*[1-4]\)/pci_bus_write_config_\1/' + setup_regex emacs asm c + all_target_sources | xargs $1 -a "${regex[@]}" - all_kconfigs | xargs $1 -a \ - --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/' \ - --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/CONFIG_\3/' + setup_regex emacs kconfig + all_kconfigs | xargs $1 -a "${regex[@]}" } xtags() @@ -201,11 +290,10 @@ xtags() elif $1 --version 2>&1 | grep -iq emacs; then emacs $1 else - all_sources | xargs $1 -a - fi + all_target_sources | xargs $1 -a + fi } - # Support um (which uses SUBARCH) if [ "${ARCH}" = "um" ]; then if [ "$SUBARCH" = "i386" ]; then |