Re: [U-Boot] [PATCH 05/12] x86: qemu: split qfw command interface and qfw core

2016-05-16 Thread Bin Meng
Hi Miao,

On Mon, May 16, 2016 at 5:50 PM, Miao Yan  wrote:
> Hi Bin,
>
> 2016-05-16 16:47 GMT+08:00 Bin Meng :
>> Hi Miao,
>>
>> On Fri, May 13, 2016 at 2:29 PM, Miao Yan  wrote:
>>> This patch splits qfw command interface and qfw core function into two
>>> files, and introduces a new Kconfig option (CONFIG_QFW). for
>>> qfw core.
>>>
>>> Now when qfw command interface is enabled, it will automatically select
>>> qfw core. This patch also makes the ACPI table generation select
>>> CONFIG_QFW.
>>>
>>> Signed-off-by: Miao Yan 
>>> ---
>>>  arch/x86/Kconfig   |   2 +-
>>>  arch/x86/cpu/mp_init.c |   6 +-
>>>  arch/x86/cpu/qemu/Makefile |   3 +-
>>>  arch/x86/cpu/qemu/acpi_table.c |   2 +
>>>  arch/x86/cpu/qemu/qemu.c   |   4 +
>>>  cmd/Kconfig|   1 +
>>>  cmd/Makefile   |   2 +-
>>>  cmd/cmd_qfw.c  | 182 +
>>
>> The file name should be qfw.c without cmd_
>>
>>>  cmd/qemu_fw_cfg.c  | 353 
>>> -
>>
>> And I suspect you can also use "git mv" for cmd/qemu_fw_cfg.c. "git mv
>> cmd/qemu_fw_cfg.c cmd/qfw.c"
>
> But there is already a qfw.c under driver/misc/, having two files
> using the same name seems a bit confusing.
>

No problem because they are in different directory, and the command
one is in a directory named 'cmd'.

Regards,
Bin
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 05/12] x86: qemu: split qfw command interface and qfw core

2016-05-16 Thread Miao Yan
Hi Bin,

2016-05-16 16:47 GMT+08:00 Bin Meng :
> Hi Miao,
>
> On Fri, May 13, 2016 at 2:29 PM, Miao Yan  wrote:
>> This patch splits qfw command interface and qfw core function into two
>> files, and introduces a new Kconfig option (CONFIG_QFW). for
>> qfw core.
>>
>> Now when qfw command interface is enabled, it will automatically select
>> qfw core. This patch also makes the ACPI table generation select
>> CONFIG_QFW.
>>
>> Signed-off-by: Miao Yan 
>> ---
>>  arch/x86/Kconfig   |   2 +-
>>  arch/x86/cpu/mp_init.c |   6 +-
>>  arch/x86/cpu/qemu/Makefile |   3 +-
>>  arch/x86/cpu/qemu/acpi_table.c |   2 +
>>  arch/x86/cpu/qemu/qemu.c   |   4 +
>>  cmd/Kconfig|   1 +
>>  cmd/Makefile   |   2 +-
>>  cmd/cmd_qfw.c  | 182 +
>
> The file name should be qfw.c without cmd_
>
>>  cmd/qemu_fw_cfg.c  | 353 
>> -
>
> And I suspect you can also use "git mv" for cmd/qemu_fw_cfg.c. "git mv
> cmd/qemu_fw_cfg.c cmd/qfw.c"

But there is already a qfw.c under driver/misc/, having two files
using the same name seems a bit confusing.

Thanks,
Miao

>
>>  common/Kconfig |   1 +
>>  drivers/misc/Kconfig   |   6 +
>>  drivers/misc/Makefile  |   1 +
>>  drivers/misc/qemu_fw_cfg.c | 185 +
>>  13 files changed, 390 insertions(+), 358 deletions(-)
>>  create mode 100644 cmd/cmd_qfw.c
>>  delete mode 100644 cmd/qemu_fw_cfg.c
>>  create mode 100644 drivers/misc/qemu_fw_cfg.c
>>
>
> Regards,
> Bin
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 05/12] x86: qemu: split qfw command interface and qfw core

2016-05-16 Thread Miao Yan
Hi Bin,

2016-05-13 22:00 GMT+08:00 Bin Meng :
> Hi Miao,
>
> On Fri, May 13, 2016 at 2:29 PM, Miao Yan  wrote:
>> This patch splits qfw command interface and qfw core function into two
>> files, and introduces a new Kconfig option (CONFIG_QFW). for
>> qfw core.
>>
>> Now when qfw command interface is enabled, it will automatically select
>> qfw core. This patch also makes the ACPI table generation select
>> CONFIG_QFW.
>>
>> Signed-off-by: Miao Yan 
>> ---
>>  arch/x86/Kconfig   |   2 +-
>>  arch/x86/cpu/mp_init.c |   6 +-
>>  arch/x86/cpu/qemu/Makefile |   3 +-
>>  arch/x86/cpu/qemu/acpi_table.c |   2 +
>>  arch/x86/cpu/qemu/qemu.c   |   4 +
>>  cmd/Kconfig|   1 +
>>  cmd/Makefile   |   2 +-
>>  cmd/cmd_qfw.c  | 182 +
>>  cmd/qemu_fw_cfg.c  | 353 
>> -
>>  common/Kconfig |   1 +
>>  drivers/misc/Kconfig   |   6 +
>>  drivers/misc/Makefile  |   1 +
>>  drivers/misc/qemu_fw_cfg.c | 185 +
>>  13 files changed, 390 insertions(+), 358 deletions(-)
>>  create mode 100644 cmd/cmd_qfw.c
>>  delete mode 100644 cmd/qemu_fw_cfg.c
>>  create mode 100644 drivers/misc/qemu_fw_cfg.c
>>
>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>> index a60e0da..2f63170 100644
>> --- a/arch/x86/Kconfig
>> +++ b/arch/x86/Kconfig
>> @@ -436,7 +436,7 @@ config GENERATE_MP_TABLE
>>  config GENERATE_ACPI_TABLE
>> bool "Generate an ACPI (Advanced Configuration and Power Interface) 
>> table"
>> default n
>> -   select QEMU_FW_CFG if QEMU
>> +   select QFW if QEMU
>> help
>>   The Advanced Configuration and Power Interface (ACPI) specification
>>   provides an open standard for device configuration and management
>> diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c
>> index 13bec7a..109b3d7 100644
>> --- a/arch/x86/cpu/mp_init.c
>> +++ b/arch/x86/cpu/mp_init.c
>> @@ -11,7 +11,9 @@
>>  #include 
>>  #include 
>>  #include 
>> +#ifdef CONFIG_QFW
>>  #include 
>> +#endif
>
> There is no need to wrap header file with #ifdef.

OK. And will fix the reset of them.


>
>>  #include 
>>  #include 
>>  #include 
>> @@ -420,7 +422,7 @@ static int init_bsp(struct udevice **devp)
>> return 0;
>>  }
>>
>> -#ifdef CONFIG_QEMU
>> +#ifdef CONFIG_QFW
>>  static int qemu_cpu_fixup(void)
>>  {
>> int ret;
>> @@ -496,7 +498,7 @@ int mp_init(struct mp_params *p)
>> if (ret)
>> return ret;
>>
>> -#ifdef CONFIG_QEMU
>> +#ifdef CONFIG_QFW
>> ret = qemu_cpu_fixup();
>> if (ret)
>> return ret;
>> diff --git a/arch/x86/cpu/qemu/Makefile b/arch/x86/cpu/qemu/Makefile
>> index 43ee4bd..7c08c3d 100644
>> --- a/arch/x86/cpu/qemu/Makefile
>> +++ b/arch/x86/cpu/qemu/Makefile
>> @@ -7,5 +7,6 @@
>>  ifndef CONFIG_EFI_STUB
>>  obj-y += car.o dram.o
>>  endif
>> -obj-y += cpu.o qemu.o
>> +obj-y += qemu.o
>> +obj-$(CONFIG_QFW) += cpu.o
>>  obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi_table.o
>> diff --git a/arch/x86/cpu/qemu/acpi_table.c b/arch/x86/cpu/qemu/acpi_table.c
>> index b17fa03..4584fc7 100644
>> --- a/arch/x86/cpu/qemu/acpi_table.c
>> +++ b/arch/x86/cpu/qemu/acpi_table.c
>> @@ -8,7 +8,9 @@
>>  #include 
>>  #include 
>>  #include 
>> +#ifdef CONFIG_QFW
>>  #include 
>> +#endif
>
> ditto.
>
>>  #include 
>>  #include 
>>  #include 
>> diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c
>> index b41e4ec..2631e99 100644
>> --- a/arch/x86/cpu/qemu/qemu.c
>> +++ b/arch/x86/cpu/qemu/qemu.c
>> @@ -6,7 +6,9 @@
>>
>>  #include 
>>  #include 
>> +#ifdef CONFIG_QFW
>>  #include 
>> +#endif
>
> ditto.
>
>>  #include 
>>  #include 
>>  #include 
>> @@ -88,7 +90,9 @@ static void qemu_chipset_init(void)
>> enable_pm_ich9();
>> }
>>
>> +#ifdef CONFIG_QFW
>> qemu_fwcfg_init();
>> +#endif
>>  }
>>
>>  int arch_cpu_init(void)
>> diff --git a/cmd/Kconfig b/cmd/Kconfig
>> index c0fffe3..08b761f 100644
>> --- a/cmd/Kconfig
>> +++ b/cmd/Kconfig
>> @@ -596,6 +596,7 @@ config CMD_SOUND
>>  config CMD_QEMU_FW_CFG
>> bool "qfw"
>> depends on X86
>> +   select QFW
>> help
>>   This provides access to the QEMU firmware interface.  The main
>>   feature is to allow easy loading of files passed to qemu-system
>> diff --git a/cmd/Makefile b/cmd/Makefile
>> index f99e67d..31e4da7 100644
>> --- a/cmd/Makefile
>> +++ b/cmd/Makefile
>> @@ -105,7 +105,7 @@ endif
>>  obj-y += pcmcia.o
>>  obj-$(CONFIG_CMD_PORTIO) += portio.o
>>  obj-$(CONFIG_CMD_PXE) += pxe.o
>> -obj-$(CONFIG_CMD_QEMU_FW_CFG) += qemu_fw_cfg.o
>> +obj-$(CONFIG_CMD_QEMU_FW_CFG) += cmd_qfw.o
>>  obj-$(CONFIG_CMD_READ) += read.o
>>  obj-$(CONFIG_CMD_REGINFO) += reginfo.o
>>  obj-$(CONFIG_CMD_REISER) += reiser.o
>> diff --git a/cmd/cmd_qfw.c 

Re: [U-Boot] [PATCH 05/12] x86: qemu: split qfw command interface and qfw core

2016-05-16 Thread Bin Meng
Hi Miao,

On Fri, May 13, 2016 at 2:29 PM, Miao Yan  wrote:
> This patch splits qfw command interface and qfw core function into two
> files, and introduces a new Kconfig option (CONFIG_QFW). for
> qfw core.
>
> Now when qfw command interface is enabled, it will automatically select
> qfw core. This patch also makes the ACPI table generation select
> CONFIG_QFW.
>
> Signed-off-by: Miao Yan 
> ---
>  arch/x86/Kconfig   |   2 +-
>  arch/x86/cpu/mp_init.c |   6 +-
>  arch/x86/cpu/qemu/Makefile |   3 +-
>  arch/x86/cpu/qemu/acpi_table.c |   2 +
>  arch/x86/cpu/qemu/qemu.c   |   4 +
>  cmd/Kconfig|   1 +
>  cmd/Makefile   |   2 +-
>  cmd/cmd_qfw.c  | 182 +

The file name should be qfw.c without cmd_

>  cmd/qemu_fw_cfg.c  | 353 
> -

And I suspect you can also use "git mv" for cmd/qemu_fw_cfg.c. "git mv
cmd/qemu_fw_cfg.c cmd/qfw.c"

>  common/Kconfig |   1 +
>  drivers/misc/Kconfig   |   6 +
>  drivers/misc/Makefile  |   1 +
>  drivers/misc/qemu_fw_cfg.c | 185 +
>  13 files changed, 390 insertions(+), 358 deletions(-)
>  create mode 100644 cmd/cmd_qfw.c
>  delete mode 100644 cmd/qemu_fw_cfg.c
>  create mode 100644 drivers/misc/qemu_fw_cfg.c
>

Regards,
Bin
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 05/12] x86: qemu: split qfw command interface and qfw core

2016-05-13 Thread Bin Meng
Hi Miao,

On Fri, May 13, 2016 at 2:29 PM, Miao Yan  wrote:
> This patch splits qfw command interface and qfw core function into two
> files, and introduces a new Kconfig option (CONFIG_QFW). for
> qfw core.
>
> Now when qfw command interface is enabled, it will automatically select
> qfw core. This patch also makes the ACPI table generation select
> CONFIG_QFW.
>
> Signed-off-by: Miao Yan 
> ---
>  arch/x86/Kconfig   |   2 +-
>  arch/x86/cpu/mp_init.c |   6 +-
>  arch/x86/cpu/qemu/Makefile |   3 +-
>  arch/x86/cpu/qemu/acpi_table.c |   2 +
>  arch/x86/cpu/qemu/qemu.c   |   4 +
>  cmd/Kconfig|   1 +
>  cmd/Makefile   |   2 +-
>  cmd/cmd_qfw.c  | 182 +
>  cmd/qemu_fw_cfg.c  | 353 
> -
>  common/Kconfig |   1 +
>  drivers/misc/Kconfig   |   6 +
>  drivers/misc/Makefile  |   1 +
>  drivers/misc/qemu_fw_cfg.c | 185 +
>  13 files changed, 390 insertions(+), 358 deletions(-)
>  create mode 100644 cmd/cmd_qfw.c
>  delete mode 100644 cmd/qemu_fw_cfg.c
>  create mode 100644 drivers/misc/qemu_fw_cfg.c
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index a60e0da..2f63170 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -436,7 +436,7 @@ config GENERATE_MP_TABLE
>  config GENERATE_ACPI_TABLE
> bool "Generate an ACPI (Advanced Configuration and Power Interface) 
> table"
> default n
> -   select QEMU_FW_CFG if QEMU
> +   select QFW if QEMU
> help
>   The Advanced Configuration and Power Interface (ACPI) specification
>   provides an open standard for device configuration and management
> diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c
> index 13bec7a..109b3d7 100644
> --- a/arch/x86/cpu/mp_init.c
> +++ b/arch/x86/cpu/mp_init.c
> @@ -11,7 +11,9 @@
>  #include 
>  #include 
>  #include 
> +#ifdef CONFIG_QFW
>  #include 
> +#endif

There is no need to wrap header file with #ifdef.

>  #include 
>  #include 
>  #include 
> @@ -420,7 +422,7 @@ static int init_bsp(struct udevice **devp)
> return 0;
>  }
>
> -#ifdef CONFIG_QEMU
> +#ifdef CONFIG_QFW
>  static int qemu_cpu_fixup(void)
>  {
> int ret;
> @@ -496,7 +498,7 @@ int mp_init(struct mp_params *p)
> if (ret)
> return ret;
>
> -#ifdef CONFIG_QEMU
> +#ifdef CONFIG_QFW
> ret = qemu_cpu_fixup();
> if (ret)
> return ret;
> diff --git a/arch/x86/cpu/qemu/Makefile b/arch/x86/cpu/qemu/Makefile
> index 43ee4bd..7c08c3d 100644
> --- a/arch/x86/cpu/qemu/Makefile
> +++ b/arch/x86/cpu/qemu/Makefile
> @@ -7,5 +7,6 @@
>  ifndef CONFIG_EFI_STUB
>  obj-y += car.o dram.o
>  endif
> -obj-y += cpu.o qemu.o
> +obj-y += qemu.o
> +obj-$(CONFIG_QFW) += cpu.o
>  obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi_table.o
> diff --git a/arch/x86/cpu/qemu/acpi_table.c b/arch/x86/cpu/qemu/acpi_table.c
> index b17fa03..4584fc7 100644
> --- a/arch/x86/cpu/qemu/acpi_table.c
> +++ b/arch/x86/cpu/qemu/acpi_table.c
> @@ -8,7 +8,9 @@
>  #include 
>  #include 
>  #include 
> +#ifdef CONFIG_QFW
>  #include 
> +#endif

ditto.

>  #include 
>  #include 
>  #include 
> diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c
> index b41e4ec..2631e99 100644
> --- a/arch/x86/cpu/qemu/qemu.c
> +++ b/arch/x86/cpu/qemu/qemu.c
> @@ -6,7 +6,9 @@
>
>  #include 
>  #include 
> +#ifdef CONFIG_QFW
>  #include 
> +#endif

ditto.

>  #include 
>  #include 
>  #include 
> @@ -88,7 +90,9 @@ static void qemu_chipset_init(void)
> enable_pm_ich9();
> }
>
> +#ifdef CONFIG_QFW
> qemu_fwcfg_init();
> +#endif
>  }
>
>  int arch_cpu_init(void)
> diff --git a/cmd/Kconfig b/cmd/Kconfig
> index c0fffe3..08b761f 100644
> --- a/cmd/Kconfig
> +++ b/cmd/Kconfig
> @@ -596,6 +596,7 @@ config CMD_SOUND
>  config CMD_QEMU_FW_CFG
> bool "qfw"
> depends on X86
> +   select QFW
> help
>   This provides access to the QEMU firmware interface.  The main
>   feature is to allow easy loading of files passed to qemu-system
> diff --git a/cmd/Makefile b/cmd/Makefile
> index f99e67d..31e4da7 100644
> --- a/cmd/Makefile
> +++ b/cmd/Makefile
> @@ -105,7 +105,7 @@ endif
>  obj-y += pcmcia.o
>  obj-$(CONFIG_CMD_PORTIO) += portio.o
>  obj-$(CONFIG_CMD_PXE) += pxe.o
> -obj-$(CONFIG_CMD_QEMU_FW_CFG) += qemu_fw_cfg.o
> +obj-$(CONFIG_CMD_QEMU_FW_CFG) += cmd_qfw.o
>  obj-$(CONFIG_CMD_READ) += read.o
>  obj-$(CONFIG_CMD_REGINFO) += reginfo.o
>  obj-$(CONFIG_CMD_REISER) += reiser.o
> diff --git a/cmd/cmd_qfw.c b/cmd/cmd_qfw.c
> new file mode 100644
> index 000..eefaf65
> --- /dev/null
> +++ b/cmd/cmd_qfw.c
> @@ -0,0 +1,182 @@
> +/*
> + * (C) Copyright 2015 Miao Yan 
> + *
> + * SPDX-License-Identifier:GPL-2.0+
> + */
> +
> +#include 
> +#include 
> +#include 
>