All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] pci: Remove CONFIG_ALWAYS_LOAD_OPROM
@ 2016-06-14  9:02 Bin Meng
  2016-06-14  9:02 ` [U-Boot] [PATCH 2/3] pci: Make load_oprom and run_oprom independent Bin Meng
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Bin Meng @ 2016-06-14  9:02 UTC (permalink / raw)
  To: u-boot

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;
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 2/3] pci: Make load_oprom and run_oprom independent
  2016-06-14  9:02 [U-Boot] [PATCH 1/3] pci: Remove CONFIG_ALWAYS_LOAD_OPROM Bin Meng
@ 2016-06-14  9:02 ` Bin Meng
  2016-06-16  0:40   ` Simon Glass
  2016-06-14  9:02 ` [U-Boot] [PATCH 3/3] pci: Add board_ prefix to should_load_oprom() and make it weak Bin Meng
  2016-06-16  0:40 ` [U-Boot] [PATCH 1/3] pci: Remove CONFIG_ALWAYS_LOAD_OPROM Simon Glass
  2 siblings, 1 reply; 9+ messages in thread
From: Bin Meng @ 2016-06-14  9:02 UTC (permalink / raw)
  To: u-boot

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)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 3/3] pci: Add board_ prefix to should_load_oprom() and make it weak
  2016-06-14  9:02 [U-Boot] [PATCH 1/3] pci: Remove CONFIG_ALWAYS_LOAD_OPROM Bin Meng
  2016-06-14  9:02 ` [U-Boot] [PATCH 2/3] pci: Make load_oprom and run_oprom independent Bin Meng
@ 2016-06-14  9:02 ` Bin Meng
  2016-06-16  0:40   ` Simon Glass
  2016-06-16  0:40 ` [U-Boot] [PATCH 1/3] pci: Remove CONFIG_ALWAYS_LOAD_OPROM Simon Glass
  2 siblings, 1 reply; 9+ messages in thread
From: Bin Meng @ 2016-06-14  9:02 UTC (permalink / raw)
  To: u-boot

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);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 1/3] pci: Remove CONFIG_ALWAYS_LOAD_OPROM
  2016-06-14  9:02 [U-Boot] [PATCH 1/3] pci: Remove CONFIG_ALWAYS_LOAD_OPROM Bin Meng
  2016-06-14  9:02 ` [U-Boot] [PATCH 2/3] pci: Make load_oprom and run_oprom independent Bin Meng
  2016-06-14  9:02 ` [U-Boot] [PATCH 3/3] pci: Add board_ prefix to should_load_oprom() and make it weak Bin Meng
@ 2016-06-16  0:40 ` Simon Glass
  2016-06-17  2:26   ` Bin Meng
  2 siblings, 1 reply; 9+ messages in thread
From: Simon Glass @ 2016-06-16  0:40 UTC (permalink / raw)
  To: u-boot

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>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 2/3] pci: Make load_oprom and run_oprom independent
  2016-06-14  9:02 ` [U-Boot] [PATCH 2/3] pci: Make load_oprom and run_oprom independent Bin Meng
@ 2016-06-16  0:40   ` Simon Glass
  2016-06-17  2:26     ` Bin Meng
  0 siblings, 1 reply; 9+ messages in thread
From: Simon Glass @ 2016-06-16  0:40 UTC (permalink / raw)
  To: u-boot

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>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 3/3] pci: Add board_ prefix to should_load_oprom() and make it weak
  2016-06-14  9:02 ` [U-Boot] [PATCH 3/3] pci: Add board_ prefix to should_load_oprom() and make it weak Bin Meng
@ 2016-06-16  0:40   ` Simon Glass
  2016-06-17  2:27     ` Bin Meng
  0 siblings, 1 reply; 9+ messages in thread
From: Simon Glass @ 2016-06-16  0:40 UTC (permalink / raw)
  To: u-boot

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>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 1/3] pci: Remove CONFIG_ALWAYS_LOAD_OPROM
  2016-06-16  0:40 ` [U-Boot] [PATCH 1/3] pci: Remove CONFIG_ALWAYS_LOAD_OPROM Simon Glass
@ 2016-06-17  2:26   ` Bin Meng
  0 siblings, 0 replies; 9+ messages in thread
From: Bin Meng @ 2016-06-17  2:26 UTC (permalink / raw)
  To: u-boot

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!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 2/3] pci: Make load_oprom and run_oprom independent
  2016-06-16  0:40   ` Simon Glass
@ 2016-06-17  2:26     ` Bin Meng
  0 siblings, 0 replies; 9+ messages in thread
From: Bin Meng @ 2016-06-17  2:26 UTC (permalink / raw)
  To: u-boot

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!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 3/3] pci: Add board_ prefix to should_load_oprom() and make it weak
  2016-06-16  0:40   ` Simon Glass
@ 2016-06-17  2:27     ` Bin Meng
  0 siblings, 0 replies; 9+ messages in thread
From: Bin Meng @ 2016-06-17  2:27 UTC (permalink / raw)
  To: u-boot

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!

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-06-17  2:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-14  9:02 [U-Boot] [PATCH 1/3] pci: Remove CONFIG_ALWAYS_LOAD_OPROM Bin Meng
2016-06-14  9:02 ` [U-Boot] [PATCH 2/3] pci: Make load_oprom and run_oprom independent Bin Meng
2016-06-16  0:40   ` Simon Glass
2016-06-17  2:26     ` Bin Meng
2016-06-14  9:02 ` [U-Boot] [PATCH 3/3] pci: Add board_ prefix to should_load_oprom() and make it weak Bin Meng
2016-06-16  0:40   ` Simon Glass
2016-06-17  2:27     ` Bin Meng
2016-06-16  0:40 ` [U-Boot] [PATCH 1/3] pci: Remove CONFIG_ALWAYS_LOAD_OPROM Simon Glass
2016-06-17  2:26   ` Bin Meng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.