提交 3964917c 编写于 作者: F Florian Fainelli 提交者: Ralf Baechle

MIPS: Netlogic: handle modular AHCI builds

Commits a9514409 ("MIPS: Netlogic: Support for XLP3XX on-chip SATA")
and fedfcb11 ("MIPS: Netlogic: XLP9XX on-chip SATA support") added
ahci-init and ahci-init-xlp2 as objects to build when CONFIG_SATA_AHCI
is enabled.

If CONFIG_SATA_AHCI is made modular, these two files will also get built
as modules (obj-m), which will result in the following linking failure:

ERROR: "nlm_set_pic_extra_ack" [arch/mips/netlogic/xlp/ahci-init.ko]
undefined!
ERROR: "nlm_io_base" [arch/mips/netlogic/xlp/ahci-init.ko] undefined!
ERROR: "nlm_nodes" [arch/mips/netlogic/xlp/ahci-init-xlp2.ko] undefined!
ERROR: "nlm_set_pic_extra_ack"
[arch/mips/netlogic/xlp/ahci-init-xlp2.ko] undefined!
ERROR: "xlp_socdev_to_node" [arch/mips/netlogic/xlp/ahci-init-xlp2.ko]
undefined!
ERROR: "nlm_io_base" [arch/mips/netlogic/xlp/ahci-init-xlp2.ko]
undefined!

Just check whether CONFIG_SATA_AHCI is defined for this build, and if
that is the case, add these objects to the list of built-in object
files.
Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: ganesanr@broadcom.com
Cc: jchandra@broadcom.com
Patchwork: https://patchwork.linux-mips.org/patch/7855/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 717ce646
...@@ -4,5 +4,7 @@ ifdef CONFIG_USB ...@@ -4,5 +4,7 @@ ifdef CONFIG_USB
obj-y += usb-init.o obj-y += usb-init.o
obj-y += usb-init-xlp2.o obj-y += usb-init-xlp2.o
endif endif
obj-$(CONFIG_SATA_AHCI) += ahci-init.o ifdef CONFIG_SATA_AHCI
obj-$(CONFIG_SATA_AHCI) += ahci-init-xlp2.o obj-y += ahci-init.o
obj-y += ahci-init-xlp2.o
endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册