[U-Boot] [PATCH 1/3] pci: Remove CONFIG_ALWAYS_LOAD_OPROM

This option is defined at nowhere. Remove it.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
drivers/pci/pci_rom.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c index 9eb605b..3ae9231 100644 --- a/drivers/pci/pci_rom.c +++ b/drivers/pci/pci_rom.c @@ -41,8 +41,6 @@ __weak bool board_should_run_oprom(struct udevice *dev)
static bool should_load_oprom(struct udevice *dev) { - if (IS_ENABLED(CONFIG_ALWAYS_LOAD_OPROM)) - return 1; if (board_should_run_oprom(dev)) return 1;

At present should_load_oprom() calls board_should_run_oprom() to determine whether oprom should be loaded. But sometimes we just want to load oprom without running. Make them independent.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
drivers/pci/pci_rom.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c index 3ae9231..a168559 100644 --- a/drivers/pci/pci_rom.c +++ b/drivers/pci/pci_rom.c @@ -41,10 +41,7 @@ __weak bool board_should_run_oprom(struct udevice *dev)
static bool should_load_oprom(struct udevice *dev) { - if (board_should_run_oprom(dev)) - return 1; - - return 0; + return true; }
__weak uint32_t board_map_oprom_vendev(uint32_t vendev)

On 14 June 2016 at 02:02, Bin Meng bmeng.cn@gmail.com wrote:
At present should_load_oprom() calls board_should_run_oprom() to determine whether oprom should be loaded. But sometimes we just want to load oprom without running. Make them independent.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
drivers/pci/pci_rom.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Thu, Jun 16, 2016 at 8:40 AM, Simon Glass sjg@chromium.org wrote:
On 14 June 2016 at 02:02, Bin Meng bmeng.cn@gmail.com wrote:
At present should_load_oprom() calls board_should_run_oprom() to determine whether oprom should be loaded. But sometimes we just want to load oprom without running. Make them independent.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
drivers/pci/pci_rom.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
applied to u-boot-x86/next, thanks!

For consistency with board_should_run_oprom(), do the same to should_load_oprom(). Board support codes can provide this one to override the default weak one.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
drivers/pci/pci_rom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c index a168559..399055b 100644 --- a/drivers/pci/pci_rom.c +++ b/drivers/pci/pci_rom.c @@ -39,7 +39,7 @@ __weak bool board_should_run_oprom(struct udevice *dev) return true; }
-static bool should_load_oprom(struct udevice *dev) +__weak bool board_should_load_oprom(struct udevice *dev) { return true; } @@ -273,7 +273,7 @@ int dm_pci_run_vga_bios(struct udevice *dev, int (*int15_handler)(void), return -ENODEV; }
- if (!should_load_oprom(dev)) + if (!board_should_load_oprom(dev)) return -ENXIO;
ret = pci_rom_probe(dev, &rom);

On 14 June 2016 at 02:02, Bin Meng bmeng.cn@gmail.com wrote:
For consistency with board_should_run_oprom(), do the same to should_load_oprom(). Board support codes can provide this one to override the default weak one.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
drivers/pci/pci_rom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Thu, Jun 16, 2016 at 8:40 AM, Simon Glass sjg@chromium.org wrote:
On 14 June 2016 at 02:02, Bin Meng bmeng.cn@gmail.com wrote:
For consistency with board_should_run_oprom(), do the same to should_load_oprom(). Board support codes can provide this one to override the default weak one.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
drivers/pci/pci_rom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
applied to u-boot-x86/next, thanks!

On 14 June 2016 at 02:02, Bin Meng bmeng.cn@gmail.com wrote:
This option is defined at nowhere. Remove it.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
drivers/pci/pci_rom.c | 2 -- 1 file changed, 2 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Thu, Jun 16, 2016 at 8:40 AM, Simon Glass sjg@chromium.org wrote:
On 14 June 2016 at 02:02, Bin Meng bmeng.cn@gmail.com wrote:
This option is defined at nowhere. Remove it.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
drivers/pci/pci_rom.c | 2 -- 1 file changed, 2 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
applied to u-boot-x86/next, thanks!
participants (2)
-
Bin Meng
-
Simon Glass