RELOCATABLE_RAMSTAGE: Fix weak symbols with option ROMs
After relocation the weak symbol map_oprom_vendev is no longer NULL. Always have empty stub function defined. Change-Id: I5b1bdeb3f37bb04363cf3d9dedaeafc9e193aaae Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/7956 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
parent
134f504cb7
commit
1bdd3217a2
|
@ -29,6 +29,9 @@
|
|||
#include <string.h>
|
||||
#include <cbfs.h>
|
||||
|
||||
/* Rmodules don't like weak symbols. */
|
||||
u32 __attribute__((weak)) map_oprom_vendev(u32 vendev) { return vendev; }
|
||||
|
||||
struct rom_header *pci_rom_probe(struct device *dev)
|
||||
{
|
||||
struct rom_header *rom_header;
|
||||
|
@ -41,8 +44,7 @@ struct rom_header *pci_rom_probe(struct device *dev)
|
|||
u32 vendev = (dev->vendor << 16) | dev->device;
|
||||
u32 mapped_vendev = vendev;
|
||||
|
||||
if (map_oprom_vendev)
|
||||
mapped_vendev = map_oprom_vendev(vendev);
|
||||
mapped_vendev = map_oprom_vendev(vendev);
|
||||
|
||||
if (!rom_header) {
|
||||
if (vendev != mapped_vendev) {
|
||||
|
|
|
@ -35,6 +35,6 @@ struct pci_data {
|
|||
|
||||
struct rom_header *pci_rom_probe(struct device *dev);
|
||||
struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_header);
|
||||
u32 __attribute__((weak)) map_oprom_vendev(u32 vendev);
|
||||
u32 map_oprom_vendev(u32 vendev);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue