diff mbox series

[6/6] mips: Express dependencies of the Loongson 2E machine with kconfig

Message ID 20190203220744.11734-7-philmd@redhat.com
State New
Headers show
Series [1/6] mips: Express dependencies of the MIPSsim machine with kconfig | expand

Commit Message

Philippe Mathieu-Daudé Feb. 3, 2019, 10:07 p.m. UTC
The Loongson 2E uses a Bonito64 system controller as North Bridge and a
VT82C686 chipset as South Bridge. The network card chipset is a RTL8139D.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 default-configs/mips64el-softmmu.mak |  4 ----
 hw/isa/Kconfig                       | 13 +++++++++----
 hw/mips/Kconfig                      |  5 +++++
 3 files changed, 14 insertions(+), 8 deletions(-)

Comments

Thomas Huth Feb. 4, 2019, 8:46 a.m. UTC | #1
On 2019-02-03 23:07, Philippe Mathieu-Daudé wrote:
> The Loongson 2E uses a Bonito64 system controller as North Bridge and a
> VT82C686 chipset as South Bridge. The network card chipset is a RTL8139D.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
[...]
> diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig
> index 2940ff39ab..16b2bdb068 100644
> --- a/hw/mips/Kconfig
> +++ b/hw/mips/Kconfig
> @@ -42,6 +42,11 @@ config JAZZ
>  
>  config FULONG
>      bool
> +    select PCI_BONITO
> +    select VT82C686
> +    select SMBUS_EEPROM
> +    select RTL8139_PCI

If I've got the code right, the RTL8139 is optional for this board, i.e.
when you run with -nodefaults or -net none, then the board is still
usable. So this is not a hard requirement and thus I think it would be
nicer to drop the "select RTL8139_PCI" and rely on the "default y if
PCI_DEVICES" in the hw/net/Kconfig file.

 Thomas
Philippe Mathieu-Daudé Feb. 4, 2019, 8:16 p.m. UTC | #2
Hi Thomas,

On 2/4/19 9:46 AM, Thomas Huth wrote:
> On 2019-02-03 23:07, Philippe Mathieu-Daudé wrote:
>> The Loongson 2E uses a Bonito64 system controller as North Bridge and a
>> VT82C686 chipset as South Bridge. The network card chipset is a RTL8139D.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
> [...]
>> diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig
>> index 2940ff39ab..16b2bdb068 100644
>> --- a/hw/mips/Kconfig
>> +++ b/hw/mips/Kconfig
>> @@ -42,6 +42,11 @@ config JAZZ
>>  
>>  config FULONG
>>      bool
>> +    select PCI_BONITO
>> +    select VT82C686
>> +    select SMBUS_EEPROM
>> +    select RTL8139_PCI
> 
> If I've got the code right, the RTL8139 is optional for this board, i.e.
> when you run with -nodefaults or -net none, then the board is still
> usable. So this is not a hard requirement and thus I think it would be
> nicer to drop the "select RTL8139_PCI" and rely on the "default y if
> PCI_DEVICES" in the hw/net/Kconfig file.

I think since his introduction (051c190bce59) the code wants to deal
with no network backend, but the RTL8139D is always available.
On this picture you can se the chipset soldered on the back of the
board: https://www.linux-mips.org/wiki/Fulong#back
I'll keep the RTL8139_PCI selection and eventually propose a patch to
clean the hw/mips/mips_fulong2e.c.

Thanks for your other reviews!

Phil.
diff mbox series

Patch

diff --git a/default-configs/mips64el-softmmu.mak b/default-configs/mips64el-softmmu.mak
index ee583758e1..aa4f0d1a44 100644
--- a/default-configs/mips64el-softmmu.mak
+++ b/default-configs/mips64el-softmmu.mak
@@ -1,7 +1,3 @@ 
 # Default configuration for mips64el-softmmu
 
 include mips-softmmu-common.mak
-CONFIG_IDE_VIA=y
-CONFIG_FULONG=y
-CONFIG_PCI_BONITO=y
-CONFIG_VT82C686=y
diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig
index d580471c00..bd6f60dd3d 100644
--- a/hw/isa/Kconfig
+++ b/hw/isa/Kconfig
@@ -33,10 +33,15 @@  config PIIX4
 
 config VT82C686
     bool
-    select ISA_BUS
-    select ACPI_SMBUS
-    select SERIAL_ISA
-    select FDC
+    select PCI
+    select I8259
+    select I8254
+    select I8257
+    select PARALLEL
+    select IDE_ISA
+    select IDE_VIA
+    select USB_UHCI
+    #select PCKBD
 
 config SMC37C669
     bool
diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig
index 2940ff39ab..16b2bdb068 100644
--- a/hw/mips/Kconfig
+++ b/hw/mips/Kconfig
@@ -42,6 +42,11 @@  config JAZZ
 
 config FULONG
     bool
+    select PCI_BONITO
+    select VT82C686
+    select SMBUS_EEPROM
+    select RTL8139_PCI
+    select MC146818RTC
 
 config MIPS_CPS
     bool