Re: [PATCH 1/1] riscv: enable SATA disk on qemu-riscv64_defconfig

2020-11-03 Thread Bin Meng
Hi Heinrich,

On Wed, Nov 4, 2020 at 3:26 PM Heinrich Schuchardt  wrote:
>
> On 11/4/20 3:45 AM, Bin Meng wrote:
> > On Wed, Nov 4, 2020 at 10:44 AM Bin Meng  wrote:
> >>
> >> Hi Heinrich,
> >>
> >> On Mon, Nov 2, 2020 at 7:37 PM Heinrich Schuchardt  
> >> wrote:
> >>>
> >>> Allow attaching a virtual SATA disk to qemu-riscv64_defconfig.
> >>>
> >>> Signed-off-by: Heinrich Schuchardt 
> >>> ---
> >>>  configs/qemu-riscv64_defconfig | 6 ++
> >>>  1 file changed, 6 insertions(+)
> >>>
> >>> diff --git a/configs/qemu-riscv64_defconfig 
> >>> b/configs/qemu-riscv64_defconfig
> >>> index daf5d655d0..a1426a9506 100644
> >>> --- a/configs/qemu-riscv64_defconfig
> >>> +++ b/configs/qemu-riscv64_defconfig
> >>> @@ -1,15 +1,21 @@
> >>>  CONFIG_RISCV=y
> >>>  CONFIG_NR_DRAM_BANKS=1
> >>>  CONFIG_ENV_SIZE=0x2
> >>> +CONFIG_AHCI=y
> >>>  CONFIG_TARGET_QEMU_VIRT=y
> >>>  CONFIG_ARCH_RV64I=y
> >>>  CONFIG_DISTRO_DEFAULTS=y
> >>>  CONFIG_FIT=y
> >>>  CONFIG_DISPLAY_CPUINFO=y
> >>>  CONFIG_DISPLAY_BOARDINFO=y
> >>> +CONFIG_PCI_INIT_R=y
> >>>  CONFIG_CMD_BOOTEFI_SELFTEST=y
> >>>  CONFIG_CMD_NVEDIT_EFI=y
> >>>  # CONFIG_CMD_MII is not set
> >>>  CONFIG_OF_PRIOR_STAGE=y
> >>>  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
> >>> +CONFIG_SCSI_AHCI=y
> >>> +CONFIG_AHCI_PCI=y
> >>>  CONFIG_DM_MTD=y
> >>> +CONFIG_SCSI=y
> >>> +CONFIG_DM_SCSI=y
> >>
> >> Please update BOARD_SPECIFIC_OPTIONS instead of the defconfig file.
>
> I searched the git repository for "BOARD_SPECIFIC_OPTIONS". I only find
> it as undocumented string in Kconfig files.
>
> Please, document what it is meant to be used for.
>
> Why do you prefer the undocumented BOARD_SPECIFIC_OPTIONS over defconfig?

This is what current qemu-riscv boards use. We need to follow the
convention here.

>
> >>
> >> Note NVMe is already enabled on this board. Why is SATA controller needed?
>
> Why should it be disabled?

Please document the QEMU command line in the board doc.

>
> I want to be able to run QEMU with:
>
> -drive if=none,file=riscv64.img,format=raw,id=mydisk \
> -device ich9-ahci,id=ahci -device ide-hd,drive=mydisk,bus=ahci.0
>
> Another use case: emulated CD-ROM drives cannot be NVMe.

Regards,
Bin


Re: [PATCH 1/1] riscv: enable SATA disk on qemu-riscv64_defconfig

2020-11-03 Thread Heinrich Schuchardt
On 11/4/20 3:45 AM, Bin Meng wrote:
> On Wed, Nov 4, 2020 at 10:44 AM Bin Meng  wrote:
>>
>> Hi Heinrich,
>>
>> On Mon, Nov 2, 2020 at 7:37 PM Heinrich Schuchardt  
>> wrote:
>>>
>>> Allow attaching a virtual SATA disk to qemu-riscv64_defconfig.
>>>
>>> Signed-off-by: Heinrich Schuchardt 
>>> ---
>>>  configs/qemu-riscv64_defconfig | 6 ++
>>>  1 file changed, 6 insertions(+)
>>>
>>> diff --git a/configs/qemu-riscv64_defconfig b/configs/qemu-riscv64_defconfig
>>> index daf5d655d0..a1426a9506 100644
>>> --- a/configs/qemu-riscv64_defconfig
>>> +++ b/configs/qemu-riscv64_defconfig
>>> @@ -1,15 +1,21 @@
>>>  CONFIG_RISCV=y
>>>  CONFIG_NR_DRAM_BANKS=1
>>>  CONFIG_ENV_SIZE=0x2
>>> +CONFIG_AHCI=y
>>>  CONFIG_TARGET_QEMU_VIRT=y
>>>  CONFIG_ARCH_RV64I=y
>>>  CONFIG_DISTRO_DEFAULTS=y
>>>  CONFIG_FIT=y
>>>  CONFIG_DISPLAY_CPUINFO=y
>>>  CONFIG_DISPLAY_BOARDINFO=y
>>> +CONFIG_PCI_INIT_R=y
>>>  CONFIG_CMD_BOOTEFI_SELFTEST=y
>>>  CONFIG_CMD_NVEDIT_EFI=y
>>>  # CONFIG_CMD_MII is not set
>>>  CONFIG_OF_PRIOR_STAGE=y
>>>  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
>>> +CONFIG_SCSI_AHCI=y
>>> +CONFIG_AHCI_PCI=y
>>>  CONFIG_DM_MTD=y
>>> +CONFIG_SCSI=y
>>> +CONFIG_DM_SCSI=y
>>
>> Please update BOARD_SPECIFIC_OPTIONS instead of the defconfig file.

I searched the git repository for "BOARD_SPECIFIC_OPTIONS". I only find
it as undocumented string in Kconfig files.

Please, document what it is meant to be used for.

Why do you prefer the undocumented BOARD_SPECIFIC_OPTIONS over defconfig?

>>
>> Note NVMe is already enabled on this board. Why is SATA controller needed?

Why should it be disabled?

I want to be able to run QEMU with:

-drive if=none,file=riscv64.img,format=raw,id=mydisk \
-device ich9-ahci,id=ahci -device ide-hd,drive=mydisk,bus=ahci.0

Another use case: emulated CD-ROM drives cannot be NVMe.

Best regards

Heinrich


Re: [PATCH 1/1] riscv: enable SATA disk on qemu-riscv64_defconfig

2020-11-03 Thread Bin Meng
On Wed, Nov 4, 2020 at 10:44 AM Bin Meng  wrote:
>
> Hi Heinrich,
>
> On Mon, Nov 2, 2020 at 7:37 PM Heinrich Schuchardt  wrote:
> >
> > Allow attaching a virtual SATA disk to qemu-riscv64_defconfig.
> >
> > Signed-off-by: Heinrich Schuchardt 
> > ---
> >  configs/qemu-riscv64_defconfig | 6 ++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/configs/qemu-riscv64_defconfig b/configs/qemu-riscv64_defconfig
> > index daf5d655d0..a1426a9506 100644
> > --- a/configs/qemu-riscv64_defconfig
> > +++ b/configs/qemu-riscv64_defconfig
> > @@ -1,15 +1,21 @@
> >  CONFIG_RISCV=y
> >  CONFIG_NR_DRAM_BANKS=1
> >  CONFIG_ENV_SIZE=0x2
> > +CONFIG_AHCI=y
> >  CONFIG_TARGET_QEMU_VIRT=y
> >  CONFIG_ARCH_RV64I=y
> >  CONFIG_DISTRO_DEFAULTS=y
> >  CONFIG_FIT=y
> >  CONFIG_DISPLAY_CPUINFO=y
> >  CONFIG_DISPLAY_BOARDINFO=y
> > +CONFIG_PCI_INIT_R=y
> >  CONFIG_CMD_BOOTEFI_SELFTEST=y
> >  CONFIG_CMD_NVEDIT_EFI=y
> >  # CONFIG_CMD_MII is not set
> >  CONFIG_OF_PRIOR_STAGE=y
> >  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
> > +CONFIG_SCSI_AHCI=y
> > +CONFIG_AHCI_PCI=y
> >  CONFIG_DM_MTD=y
> > +CONFIG_SCSI=y
> > +CONFIG_DM_SCSI=y
>
> Please update BOARD_SPECIFIC_OPTIONS instead of the defconfig file.
>
> Note NVMe is already enabled on this board. Why is SATA controller needed?

+Rick Chen


Re: [PATCH 1/1] riscv: enable SATA disk on qemu-riscv64_defconfig

2020-11-03 Thread Bin Meng
Hi Heinrich,

On Mon, Nov 2, 2020 at 7:37 PM Heinrich Schuchardt  wrote:
>
> Allow attaching a virtual SATA disk to qemu-riscv64_defconfig.
>
> Signed-off-by: Heinrich Schuchardt 
> ---
>  configs/qemu-riscv64_defconfig | 6 ++
>  1 file changed, 6 insertions(+)
>
> diff --git a/configs/qemu-riscv64_defconfig b/configs/qemu-riscv64_defconfig
> index daf5d655d0..a1426a9506 100644
> --- a/configs/qemu-riscv64_defconfig
> +++ b/configs/qemu-riscv64_defconfig
> @@ -1,15 +1,21 @@
>  CONFIG_RISCV=y
>  CONFIG_NR_DRAM_BANKS=1
>  CONFIG_ENV_SIZE=0x2
> +CONFIG_AHCI=y
>  CONFIG_TARGET_QEMU_VIRT=y
>  CONFIG_ARCH_RV64I=y
>  CONFIG_DISTRO_DEFAULTS=y
>  CONFIG_FIT=y
>  CONFIG_DISPLAY_CPUINFO=y
>  CONFIG_DISPLAY_BOARDINFO=y
> +CONFIG_PCI_INIT_R=y
>  CONFIG_CMD_BOOTEFI_SELFTEST=y
>  CONFIG_CMD_NVEDIT_EFI=y
>  # CONFIG_CMD_MII is not set
>  CONFIG_OF_PRIOR_STAGE=y
>  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
> +CONFIG_SCSI_AHCI=y
> +CONFIG_AHCI_PCI=y
>  CONFIG_DM_MTD=y
> +CONFIG_SCSI=y
> +CONFIG_DM_SCSI=y

Please update BOARD_SPECIFIC_OPTIONS instead of the defconfig file.

Note NVMe is already enabled on this board. Why is SATA controller needed?

Regards,
Bin


Re: [PATCH 1/1] riscv: enable SATA disk on qemu-riscv64_defconfig

2020-11-03 Thread Rick Chen
> From: U-Boot [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Heinrich 
> Schuchardt
> Sent: Monday, November 02, 2020 7:37 PM
> To: Bin Meng
> Cc: u-boot@lists.denx.de; Heinrich Schuchardt
> Subject: [PATCH 1/1] riscv: enable SATA disk on qemu-riscv64_defconfig
>
> Allow attaching a virtual SATA disk to qemu-riscv64_defconfig.
>
> Signed-off-by: Heinrich Schuchardt 
> ---
>  configs/qemu-riscv64_defconfig | 6 ++
>  1 file changed, 6 insertions(+)
>

Reviewed-by: Rick Chen 


[PATCH 1/1] riscv: enable SATA disk on qemu-riscv64_defconfig

2020-11-02 Thread Heinrich Schuchardt
Allow attaching a virtual SATA disk to qemu-riscv64_defconfig.

Signed-off-by: Heinrich Schuchardt 
---
 configs/qemu-riscv64_defconfig | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/configs/qemu-riscv64_defconfig b/configs/qemu-riscv64_defconfig
index daf5d655d0..a1426a9506 100644
--- a/configs/qemu-riscv64_defconfig
+++ b/configs/qemu-riscv64_defconfig
@@ -1,15 +1,21 @@
 CONFIG_RISCV=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_SIZE=0x2
+CONFIG_AHCI=y
 CONFIG_TARGET_QEMU_VIRT=y
 CONFIG_ARCH_RV64I=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
+CONFIG_PCI_INIT_R=y
 CONFIG_CMD_BOOTEFI_SELFTEST=y
 CONFIG_CMD_NVEDIT_EFI=y
 # CONFIG_CMD_MII is not set
 CONFIG_OF_PRIOR_STAGE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SCSI_AHCI=y
+CONFIG_AHCI_PCI=y
 CONFIG_DM_MTD=y
+CONFIG_SCSI=y
+CONFIG_DM_SCSI=y
--
2.28.0