diff mbox

[U-Boot,1/2] x86: qemu: Make host bridge (b.d.f=0.0.0) visible

Message ID BLU436-SMTP175AF7C3657A4C12C10727DBFC20@phx.gbl
State Superseded
Delegated to: Simon Glass
Headers show

Commit Message

Bin Meng May 20, 2015, 9:04 a.m. UTC
The default weak version of pci_skip_dev() in drivers/pci/pci_common.c
skips the host bridge (b.d.f = 0.0.0) which is actually the i440fx/q35
chipset for QEMU targets. Make it visible in the PCI configuration space.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 arch/x86/cpu/qemu/pci.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Simon Glass May 20, 2015, 5:45 p.m. UTC | #1
Hi Bin,

On 20 May 2015 at 03:04, Bin Meng <bmeng.cn@gmail.com> wrote:
> The default weak version of pci_skip_dev() in drivers/pci/pci_common.c
> skips the host bridge (b.d.f = 0.0.0) which is actually the i440fx/q35
> chipset for QEMU targets. Make it visible in the PCI configuration space.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
>  arch/x86/cpu/qemu/pci.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/arch/x86/cpu/qemu/pci.c b/arch/x86/cpu/qemu/pci.c
> index ac9c056..c09bdf2 100644
> --- a/arch/x86/cpu/qemu/pci.c
> +++ b/arch/x86/cpu/qemu/pci.c
> @@ -69,3 +69,13 @@ int board_pci_post_scan(struct pci_controller *hose)
>
>         return ret;
>  }
> +
> +/*
> + * The default weak version of pci_skip_dev() in drivers/pci/pci_common.c skips
> + * the host bridge (b.d.f = 0.0.0) which is actually the i440fx/q35 chipset for
> + * QEMU targets. We want to make it visible in the PCI configuration space.
> + */
> +int pci_skip_dev(struct pci_controller *hose, pci_dev_t dev)
> +{
> +       return 0;
> +}
> --

Would it be better to define CONFIG_PCI_CONFIG_HOST_BRIDGE?

Regards,
Simon
Bin Meng May 23, 2015, 4:02 p.m. UTC | #2
Hi Simon,

On Thu, May 21, 2015 at 1:45 AM, Simon Glass <sjg@chromium.org> wrote:
> Hi Bin,
>
> On 20 May 2015 at 03:04, Bin Meng <bmeng.cn@gmail.com> wrote:
>> The default weak version of pci_skip_dev() in drivers/pci/pci_common.c
>> skips the host bridge (b.d.f = 0.0.0) which is actually the i440fx/q35
>> chipset for QEMU targets. Make it visible in the PCI configuration space.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> ---
>>
>>  arch/x86/cpu/qemu/pci.c | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/arch/x86/cpu/qemu/pci.c b/arch/x86/cpu/qemu/pci.c
>> index ac9c056..c09bdf2 100644
>> --- a/arch/x86/cpu/qemu/pci.c
>> +++ b/arch/x86/cpu/qemu/pci.c
>> @@ -69,3 +69,13 @@ int board_pci_post_scan(struct pci_controller *hose)
>>
>>         return ret;
>>  }
>> +
>> +/*
>> + * The default weak version of pci_skip_dev() in drivers/pci/pci_common.c skips
>> + * the host bridge (b.d.f = 0.0.0) which is actually the i440fx/q35 chipset for
>> + * QEMU targets. We want to make it visible in the PCI configuration space.
>> + */
>> +int pci_skip_dev(struct pci_controller *hose, pci_dev_t dev)
>> +{
>> +       return 0;
>> +}
>> --
>
> Would it be better to define CONFIG_PCI_CONFIG_HOST_BRIDGE?

Yes, we should. Will get a v2.

Regards,
Bin
diff mbox

Patch

diff --git a/arch/x86/cpu/qemu/pci.c b/arch/x86/cpu/qemu/pci.c
index ac9c056..c09bdf2 100644
--- a/arch/x86/cpu/qemu/pci.c
+++ b/arch/x86/cpu/qemu/pci.c
@@ -69,3 +69,13 @@  int board_pci_post_scan(struct pci_controller *hose)
 
 	return ret;
 }
+
+/*
+ * The default weak version of pci_skip_dev() in drivers/pci/pci_common.c skips
+ * the host bridge (b.d.f = 0.0.0) which is actually the i440fx/q35 chipset for
+ * QEMU targets. We want to make it visible in the PCI configuration space.
+ */
+int pci_skip_dev(struct pci_controller *hose, pci_dev_t dev)
+{
+	return 0;
+}