diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arc/dts/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/dts/Makefile | 2 | ||||
-rw-r--r-- | arch/m68k/dts/Makefile | 2 | ||||
-rw-r--r-- | arch/microblaze/dts/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/dts/Makefile | 2 | ||||
-rw-r--r-- | arch/nds32/dts/Makefile | 2 | ||||
-rw-r--r-- | arch/nios2/dts/Makefile | 2 | ||||
-rw-r--r-- | arch/powerpc/dts/Makefile | 2 | ||||
-rw-r--r-- | arch/riscv/dts/Makefile | 2 | ||||
-rw-r--r-- | arch/sandbox/Makefile | 7 | ||||
-rw-r--r-- | arch/sandbox/cpu/Makefile | 11 | ||||
-rw-r--r-- | arch/sandbox/dts/Makefile | 2 | ||||
-rw-r--r-- | arch/sh/dts/Makefile | 2 | ||||
-rw-r--r-- | arch/x86/cpu/intel_common/acpi.c | 15 | ||||
-rw-r--r-- | arch/x86/cpu/tangier/acpi.c | 11 | ||||
-rw-r--r-- | arch/x86/dts/Makefile | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/acpi_table.h | 1 | ||||
-rw-r--r-- | arch/x86/lib/acpi_table.c | 52 | ||||
-rw-r--r-- | arch/xtensa/dts/Makefile | 2 |
19 files changed, 57 insertions, 66 deletions
diff --git a/arch/arc/dts/Makefile b/arch/arc/dts/Makefile index 515fe1fe535..532a8131c59 100644 --- a/arch/arc/dts/Makefile +++ b/arch/arc/dts/Makefile @@ -8,6 +8,8 @@ dtb-$(CONFIG_TARGET_EMSDP) += emsdp.dtb dtb-$(CONFIG_TARGET_HSDK) += hsdk.dtb hsdk-4xd.dtb dtb-$(CONFIG_TARGET_IOT_DEVKIT) += iot_devkit.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) DTC_FLAGS += -R 4 -p 0x1000 diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 5a5706918ae..c1cec726cf0 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -1205,6 +1205,8 @@ dtb-$(CONFIG_TARGET_EA_LPC3250DEVKITV2) += lpc3250-ea3250.dtb dtb-$(CONFIG_ARCH_QEMU) += qemu-arm.dtb qemu-arm64.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) # Add any required device tree compiler flags here diff --git a/arch/m68k/dts/Makefile b/arch/m68k/dts/Makefile index fdd435bc345..7988522eb98 100644 --- a/arch/m68k/dts/Makefile +++ b/arch/m68k/dts/Makefile @@ -18,6 +18,8 @@ dtb-$(CONFIG_TARGET_M5373EVB) += M5373EVB.dtb dtb-$(CONFIG_TARGET_AMCORE) += amcore.dtb dtb-$(CONFIG_TARGET_STMARK2) += stmark2.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) DTC_FLAGS += -R 4 -p 0x1000 diff --git a/arch/microblaze/dts/Makefile b/arch/microblaze/dts/Makefile index 4690dc1b9f0..427a8f9aaca 100644 --- a/arch/microblaze/dts/Makefile +++ b/arch/microblaze/dts/Makefile @@ -2,6 +2,8 @@ dtb-y += $(shell echo $(CONFIG_DEFAULT_DEVICE_TREE)).dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) DTC_FLAGS += -R 4 -p 0x1000 diff --git a/arch/mips/dts/Makefile b/arch/mips/dts/Makefile index 215283cfa05..95144b24dcf 100644 --- a/arch/mips/dts/Makefile +++ b/arch/mips/dts/Makefile @@ -34,6 +34,8 @@ dtb-$(CONFIG_SOC_JR2) += jr2_pcb110.dtb jr2_pcb111.dtb serval2_pcb112.dtb dtb-$(CONFIG_SOC_SERVALT) += servalt_pcb116.dtb dtb-$(CONFIG_SOC_SERVAL) += serval_pcb105.dtb serval_pcb106.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) # Add any required device tree compiler flags here diff --git a/arch/nds32/dts/Makefile b/arch/nds32/dts/Makefile index a8e23ad9ad8..5a09e3b45b3 100644 --- a/arch/nds32/dts/Makefile +++ b/arch/nds32/dts/Makefile @@ -2,6 +2,8 @@ dtb-$(CONFIG_TARGET_ADP_AG101P) += ag101p.dtb dtb-$(CONFIG_TARGET_ADP_AE3XX) += ae3xx.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) DTC_FLAGS += -R 4 -p 0x1000 diff --git a/arch/nios2/dts/Makefile b/arch/nios2/dts/Makefile index 0014acfdfb7..2b29fa90f6c 100644 --- a/arch/nios2/dts/Makefile +++ b/arch/nios2/dts/Makefile @@ -2,6 +2,8 @@ dtb-y += $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%).dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) DTC_FLAGS += -R 4 -p 0x1000 diff --git a/arch/powerpc/dts/Makefile b/arch/powerpc/dts/Makefile index 66d22ae8a45..a4b0d7ddc4f 100644 --- a/arch/powerpc/dts/Makefile +++ b/arch/powerpc/dts/Makefile @@ -30,6 +30,8 @@ dtb-$(CONFIG_TARGET_TUXX1) += kmtuxa1.dtb dtb-$(CONFIG_TARGET_MCR3000) += mcr3000.dtb dtb-$(CONFIG_TARGET_GAZERBEAM) += gazerbeam.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) # Add any required device tree compiler flags here diff --git a/arch/riscv/dts/Makefile b/arch/riscv/dts/Makefile index 90d3f35e6e3..5c15a0f303a 100644 --- a/arch/riscv/dts/Makefile +++ b/arch/riscv/dts/Makefile @@ -8,6 +8,8 @@ dtb-$(CONFIG_TARGET_SIFIVE_UNLEASHED) += hifive-unleashed-a00.dtb dtb-$(CONFIG_TARGET_SIFIVE_UNMATCHED) += hifive-unmatched-a00.dtb dtb-$(CONFIG_TARGET_SIPEED_MAIX) += k210-maix-bit.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) DTC_FLAGS += -R 4 -p 0x1000 diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile index f6cf859f249..a335f8acfde 100644 --- a/arch/sandbox/Makefile +++ b/arch/sandbox/Makefile @@ -4,3 +4,10 @@ head-y := arch/sandbox/cpu/start.o arch/sandbox/cpu/os.o head-$(CONFIG_SANDBOX_SDL) += arch/sandbox/cpu/sdl.o libs-y += arch/sandbox/cpu/ libs-y += arch/sandbox/lib/ + +# sdl.c fails to compile with -fshort-wchar using musl. +cmd_cc_sdl.o = $(CC) $(filter-out -nostdinc -fshort-wchar, \ + $(patsubst -I%,-idirafter%,$(c_flags))) -fno-lto -c -o $@ $< + +$(obj)/sdl.o: $(src)/sdl.c FORCE + $(call if_changed_dep,cc_sdl.o) diff --git a/arch/sandbox/cpu/Makefile b/arch/sandbox/cpu/Makefile index de7fe7f3918..7c5c52652f5 100644 --- a/arch/sandbox/cpu/Makefile +++ b/arch/sandbox/cpu/Makefile @@ -7,7 +7,7 @@ obj-y := cache.o cpu.o state.o extra-y := start.o os.o -extra-$(CONFIG_SANDBOX_SDL) += sdl.o +extra-$(CONFIG_SANDBOX_SDL) += sdl.o obj-$(CONFIG_SPL_BUILD) += spl.o obj-$(CONFIG_ETH_SANDBOX_RAW) += eth-raw-os.o @@ -19,8 +19,6 @@ cmd_cc_os.o = $(CC) $(filter-out -nostdinc, \ $(obj)/os.o: $(src)/os.c FORCE $(call if_changed_dep,cc_os.o) -$(obj)/sdl.o: $(src)/sdl.c FORCE - $(call if_changed_dep,cc_os.o) # eth-raw-os.c is built in the system env, so needs standard includes # CFLAGS_REMOVE_eth-raw-os.o cannot be used to drop header include path @@ -30,3 +28,10 @@ cmd_cc_eth-raw-os.o = $(CC) $(filter-out -nostdinc, \ $(obj)/eth-raw-os.o: $(src)/eth-raw-os.c FORCE $(call if_changed_dep,cc_eth-raw-os.o) + +# sdl.c fails to build with -fshort-wchar using musl +cmd_cc_sdl.o = $(CC) $(filter-out -nostdinc -fshort-wchar, \ + $(patsubst -I%,-idirafter%,$(c_flags))) -fno-lto -c -o $@ $< + +$(obj)/sdl.o: $(src)/sdl.c FORCE + $(call if_changed_dep,cc_sdl.o) diff --git a/arch/sandbox/dts/Makefile b/arch/sandbox/dts/Makefile index 3e5dc67d53e..6cbc9bbcaa1 100644 --- a/arch/sandbox/dts/Makefile +++ b/arch/sandbox/dts/Makefile @@ -8,6 +8,8 @@ endif dtb-$(CONFIG_UT_DM) += test.dtb dtb-$(CONFIG_CMD_EXTENSION) += overlay0.dtbo overlay1.dtbo +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) DTC_FLAGS += -R 4 -p 0x1000 diff --git a/arch/sh/dts/Makefile b/arch/sh/dts/Makefile index e423bfd5664..144fd3e7d22 100644 --- a/arch/sh/dts/Makefile +++ b/arch/sh/dts/Makefile @@ -1,5 +1,7 @@ dtb-y += sh7751-r2dplus.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) # Add any required device tree compiler flags here diff --git a/arch/x86/cpu/intel_common/acpi.c b/arch/x86/cpu/intel_common/acpi.c index 15f19da2067..d94ec208f65 100644 --- a/arch/x86/cpu/intel_common/acpi.c +++ b/arch/x86/cpu/intel_common/acpi.c @@ -31,14 +31,17 @@ #include <linux/err.h> #include <power/acpi_pmc.h> -u32 acpi_fill_mcfg(u32 current) +int acpi_fill_mcfg(struct acpi_ctx *ctx) { + size_t size; + /* PCI Segment Group 0, Start Bus Number 0, End Bus Number is 255 */ - current += acpi_create_mcfg_mmconfig((void *)current, - CONFIG_MMCONF_BASE_ADDRESS, 0, 0, - (CONFIG_SA_PCIEX_LENGTH >> 20) - - 1); - return current; + size = acpi_create_mcfg_mmconfig((void *)ctx->current, + CONFIG_MMCONF_BASE_ADDRESS, 0, 0, + (CONFIG_SA_PCIEX_LENGTH >> 20) - 1); + acpi_inc(ctx, size); + + return 0; } static int acpi_sci_irq(void) diff --git a/arch/x86/cpu/tangier/acpi.c b/arch/x86/cpu/tangier/acpi.c index 12f92896124..e3a2fcea76d 100644 --- a/arch/x86/cpu/tangier/acpi.c +++ b/arch/x86/cpu/tangier/acpi.c @@ -68,14 +68,17 @@ u32 acpi_fill_madt(u32 current) return current; } -u32 acpi_fill_mcfg(u32 current) +int acpi_fill_mcfg(struct acpi_ctx *ctx) { + size_t size; + /* TODO: Derive parameters from SFI MCFG table */ - current += acpi_create_mcfg_mmconfig - ((struct acpi_mcfg_mmconfig *)current, + size = acpi_create_mcfg_mmconfig + ((struct acpi_mcfg_mmconfig *)ctx->current, MCFG_BASE_ADDRESS, 0x0, 0x0, 0x0); + acpi_inc(ctx, size); - return current; + return 0; } static u32 acpi_fill_csrt_dma(struct acpi_csrt_group *grp) diff --git a/arch/x86/dts/Makefile b/arch/x86/dts/Makefile index 5c8c05ec499..cd77f4c4e81 100644 --- a/arch/x86/dts/Makefile +++ b/arch/x86/dts/Makefile @@ -22,6 +22,8 @@ dtb-y += bayleybay.dtb \ slimbootloader.dtb \ baytrail_som-db5800-som-6867.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) DTC_FLAGS += -R 4 -p $(if $(CONFIG_EFI_APP),0x8000,0x1000) diff --git a/arch/x86/include/asm/acpi_table.h b/arch/x86/include/asm/acpi_table.h index 0d07f7cad87..39547de0d4d 100644 --- a/arch/x86/include/asm/acpi_table.h +++ b/arch/x86/include/asm/acpi_table.h @@ -34,7 +34,6 @@ int acpi_create_madt_lapic_nmi(struct acpi_madt_lapic_nmi *lapic_nmi, u32 acpi_fill_madt(u32 current); int acpi_create_mcfg_mmconfig(struct acpi_mcfg_mmconfig *mmconfig, u32 base, u16 seg_nr, u8 start, u8 end); -u32 acpi_fill_mcfg(u32 current); /** * acpi_write_hpet() - Write out a HPET table diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c index c0534343f1f..c5b33dc65de 100644 --- a/arch/x86/lib/acpi_table.c +++ b/arch/x86/lib/acpi_table.c @@ -161,28 +161,6 @@ int acpi_write_madt(struct acpi_ctx *ctx, const struct acpi_writer *entry) } ACPI_WRITER(5x86, NULL, acpi_write_madt, 0); -int acpi_create_mcfg_mmconfig(struct acpi_mcfg_mmconfig *mmconfig, u32 base, - u16 seg_nr, u8 start, u8 end) -{ - memset(mmconfig, 0, sizeof(*mmconfig)); - mmconfig->base_address_l = base; - mmconfig->base_address_h = 0; - mmconfig->pci_segment_group_number = seg_nr; - mmconfig->start_bus_number = start; - mmconfig->end_bus_number = end; - - return sizeof(struct acpi_mcfg_mmconfig); -} - -__weak u32 acpi_fill_mcfg(u32 current) -{ - current += acpi_create_mcfg_mmconfig - ((struct acpi_mcfg_mmconfig *)current, - CONFIG_PCIE_ECAM_BASE, 0x0, 0x0, 255); - - return current; -} - /** * acpi_create_tcpa() - Create a TCPA table * @@ -480,36 +458,6 @@ int acpi_write_gnvs(struct acpi_ctx *ctx, const struct acpi_writer *entry) } ACPI_WRITER(4gnvs, "GNVS", acpi_write_gnvs, 0); -/* MCFG is defined in the PCI Firmware Specification 3.0 */ -int acpi_write_mcfg(struct acpi_ctx *ctx, const struct acpi_writer *entry) -{ - struct acpi_table_header *header; - struct acpi_mcfg *mcfg; - u32 current; - - mcfg = ctx->current; - header = &mcfg->header; - - current = (u32)mcfg + sizeof(struct acpi_mcfg); - - memset(mcfg, '\0', sizeof(struct acpi_mcfg)); - - /* Fill out header fields */ - acpi_fill_header(header, "MCFG"); - header->length = sizeof(struct acpi_mcfg); - header->revision = 1; - - /* (Re)calculate length and checksum */ - header->length = current - (u32)mcfg; - header->checksum = table_compute_checksum(mcfg, header->length); - - acpi_inc(ctx, mcfg->header.length); - acpi_add_table(ctx, mcfg); - - return 0; -} -ACPI_WRITER(5mcfg, "MCFG", acpi_write_mcfg, 0); - /** * acpi_write_hpet() - Write out a HPET table * diff --git a/arch/xtensa/dts/Makefile b/arch/xtensa/dts/Makefile index 06ee25d2da9..fbbdefaf2cf 100644 --- a/arch/xtensa/dts/Makefile +++ b/arch/xtensa/dts/Makefile @@ -2,6 +2,8 @@ dtb-$(CONFIG_XTFPGA) += ml605.dtb ml605_nommu.dtb kc705.dtb kc705_nommu.dtb +include $(srctree)/scripts/Makefile.dts + targets += $(dtb-y) DTC_FLAGS += |