Re: [U-Boot] [PATCH v2 11/13] ns16550: zap CONFIG_NS16550_SERIAL

2015-11-18 Thread Bin Meng
Hi Thomas,

On Wed, Nov 18, 2015 at 9:44 PM, Thomas Chou  wrote:
> Zap CONFIG_NS16550_SERIAL, as the unification of ns16550 drivers
> is completed.
>
> Signed-off-by: Thomas Chou 
> ---
>  configs/efi-x86_defconfig|  1 -
>  drivers/serial/Kconfig   | 12 
>  drivers/serial/ns16550.c |  4 
>  include/configs/am43xx_evm.h |  2 --
>  include/configs/cm_t43.h |  1 -
>  include/configs/mv-common.h  |  4 
>  include/configs/omap3_pandora.h  |  1 -
>  include/configs/sniper.h |  4 +---
>  include/configs/sunxi-common.h   |  4 +---
>  include/configs/tb100.h  |  1 -
>  include/configs/tegra-common.h   |  1 -
>  include/configs/ti_am335x_common.h   |  4 
>  include/configs/ti_armv7_keystone2.h |  2 --
>  include/configs/ti_omap3_common.h|  4 
>  include/configs/ti_omap4_common.h|  2 --
>  include/configs/ti_omap5_common.h|  2 --
>  16 files changed, 2 insertions(+), 47 deletions(-)
>
> diff --git a/configs/efi-x86_defconfig b/configs/efi-x86_defconfig
> index b1573df..904b564 100644
> --- a/configs/efi-x86_defconfig
> +++ b/configs/efi-x86_defconfig
> @@ -3,7 +3,6 @@ CONFIG_VENDOR_EFI=y
>  CONFIG_DEFAULT_DEVICE_TREE="efi"
>  CONFIG_TARGET_EFI=y
>  CONFIG_TSC_CALIBRATION_BYPASS=y
> -# CONFIG_NS16550_SERIAL is not set

This line should not be removed.

>  # CONFIG_CMD_BOOTM is not set
>  # CONFIG_CMD_NET is not set
>  CONFIG_OF_CONTROL=y
> diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
> index 1239416..fe407b7 100644
> --- a/drivers/serial/Kconfig
> +++ b/drivers/serial/Kconfig
> @@ -186,18 +186,6 @@ config ALTERA_UART
>   Select this to enable an UART for Altera devices. Please find
>   details on the "Embedded Peripherals IP User Guide" of Altera.
>
> -config NS16550_SERIAL
> -   bool "NS16550 UART or compatible"
> -   depends on DM_SERIAL
> -   default y if X86 || PPC || ARCH_ROCKCHIP
> -   help
> - Support NS16550 UART or compatible with driver model. This can be
> - enabled in the device tree with the correct input clock frequency.
> - If the input clock frequency is not defined in the device tree,
> - the macro CONFIG_SYS_NS16550_CLK defined in a legacy board header
> - file will be used. It can be a constant or a function to get clock,
> - eg, get_serial_clock().
> -
>  config SANDBOX_SERIAL
> bool "Sandbox UART support"
> depends on SANDBOX
> diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
> index f0a9aac..d5bcbc3 100644
> --- a/drivers/serial/ns16550.c
> +++ b/drivers/serial/ns16550.c
> @@ -404,7 +404,6 @@ int ns16550_serial_ofdata_to_platdata(struct udevice *dev)
> plat->base = addr;
> plat->reg_shift = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
>  "reg-shift", 1);
> -#ifdef CONFIG_NS16550_SERIAL
> plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
>  "clock-frequency",
>  CONFIG_SYS_NS16550_CLK);
> @@ -412,7 +411,6 @@ int ns16550_serial_ofdata_to_platdata(struct udevice *dev)
> debug("ns16550 clock not defined\n");
> return -EINVAL;
> }
> -#endif /* CONFIG_NS16550_SERIAL */
>
> return 0;
>  }
> @@ -425,7 +423,6 @@ const struct dm_serial_ops ns16550_serial_ops = {
> .setbrg = ns16550_serial_setbrg,
>  };
>
> -#ifdef CONFIG_NS16550_SERIAL
>  #if CONFIG_IS_ENABLED(OF_CONTROL)
>  static const struct udevice_id ns16550_serial_ids[] = {
> { .compatible = "ns16550" },
> @@ -454,5 +451,4 @@ U_BOOT_DRIVER(ns16550_serial) = {
> .probe = ns16550_serial_probe,
> .ops= _serial_ops,
>  };
> -#endif /* CONFIG_NS16550_SERIAL */
>  #endif /* CONFIG_DM_SERIAL */
> diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
> index a962bf5..75b8f53 100644
> --- a/include/configs/am43xx_evm.h
> +++ b/include/configs/am43xx_evm.h
> @@ -27,8 +27,6 @@
>  #if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_DM_SERIAL)
>  #define CONFIG_SYS_NS16550_SERIAL
>  #define CONFIG_SYS_NS16550_REG_SIZE(-4)
> -#else
> -#define CONFIG_NS16550_SERIAL
>  #endif
>
>  /* I2C Configuration */
> diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h
> index e1019ff..f8c39bf 100644
> --- a/include/configs/cm_t43.h
> +++ b/include/configs/cm_t43.h
> @@ -18,7 +18,6 @@
>  #include 
>
>  /* Serial support */
> -#define CONFIG_NS16550_SERIAL
>  #define CONFIG_DM_SERIAL
>  #define CONFIG_SYS_NS16550
>  #define CONFIG_SYS_NS16550_SERIAL
> diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h
> index 0e33a89..575e53e 100644
> --- a/include/configs/mv-common.h
> +++ b/include/configs/mv-common.h
> @@ -39,10 +39,6 @@
>  /*
>   * NS16550 Configuration
>   */
> -#if 

Re: [U-Boot] [PATCH v2 11/13] ns16550: zap CONFIG_NS16550_SERIAL

2015-11-18 Thread Thomas Chou

Hi Bin,

On 2015年11月18日 22:09, Bin Meng wrote:

Hi Thomas,

On Wed, Nov 18, 2015 at 9:44 PM, Thomas Chou  wrote:

Zap CONFIG_NS16550_SERIAL, as the unification of ns16550 drivers
is completed.

Signed-off-by: Thomas Chou 
---
  configs/efi-x86_defconfig|  1 -
  drivers/serial/Kconfig   | 12 
  drivers/serial/ns16550.c |  4 
  include/configs/am43xx_evm.h |  2 --
  include/configs/cm_t43.h |  1 -
  include/configs/mv-common.h  |  4 
  include/configs/omap3_pandora.h  |  1 -
  include/configs/sniper.h |  4 +---
  include/configs/sunxi-common.h   |  4 +---
  include/configs/tb100.h  |  1 -
  include/configs/tegra-common.h   |  1 -
  include/configs/ti_am335x_common.h   |  4 
  include/configs/ti_armv7_keystone2.h |  2 --
  include/configs/ti_omap3_common.h|  4 
  include/configs/ti_omap4_common.h|  2 --
  include/configs/ti_omap5_common.h|  2 --
  16 files changed, 2 insertions(+), 47 deletions(-)

diff --git a/configs/efi-x86_defconfig b/configs/efi-x86_defconfig
index b1573df..904b564 100644
--- a/configs/efi-x86_defconfig
+++ b/configs/efi-x86_defconfig
@@ -3,7 +3,6 @@ CONFIG_VENDOR_EFI=y
  CONFIG_DEFAULT_DEVICE_TREE="efi"
  CONFIG_TARGET_EFI=y
  CONFIG_TSC_CALIBRATION_BYPASS=y
-# CONFIG_NS16550_SERIAL is not set


This line should not be removed.


The CONFIG_NS16550_SERIAL is used only during the transition and it is 
removed now. It does not need this for efi serial to work.


Thank you again for the review.

Best regards,
Thomas
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 11/13] ns16550: zap CONFIG_NS16550_SERIAL

2015-11-18 Thread Thomas Chou
Zap CONFIG_NS16550_SERIAL, as the unification of ns16550 drivers
is completed.

Signed-off-by: Thomas Chou 
---
 configs/efi-x86_defconfig|  1 -
 drivers/serial/Kconfig   | 12 
 drivers/serial/ns16550.c |  4 
 include/configs/am43xx_evm.h |  2 --
 include/configs/cm_t43.h |  1 -
 include/configs/mv-common.h  |  4 
 include/configs/omap3_pandora.h  |  1 -
 include/configs/sniper.h |  4 +---
 include/configs/sunxi-common.h   |  4 +---
 include/configs/tb100.h  |  1 -
 include/configs/tegra-common.h   |  1 -
 include/configs/ti_am335x_common.h   |  4 
 include/configs/ti_armv7_keystone2.h |  2 --
 include/configs/ti_omap3_common.h|  4 
 include/configs/ti_omap4_common.h|  2 --
 include/configs/ti_omap5_common.h|  2 --
 16 files changed, 2 insertions(+), 47 deletions(-)

diff --git a/configs/efi-x86_defconfig b/configs/efi-x86_defconfig
index b1573df..904b564 100644
--- a/configs/efi-x86_defconfig
+++ b/configs/efi-x86_defconfig
@@ -3,7 +3,6 @@ CONFIG_VENDOR_EFI=y
 CONFIG_DEFAULT_DEVICE_TREE="efi"
 CONFIG_TARGET_EFI=y
 CONFIG_TSC_CALIBRATION_BYPASS=y
-# CONFIG_NS16550_SERIAL is not set
 # CONFIG_CMD_BOOTM is not set
 # CONFIG_CMD_NET is not set
 CONFIG_OF_CONTROL=y
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 1239416..fe407b7 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -186,18 +186,6 @@ config ALTERA_UART
  Select this to enable an UART for Altera devices. Please find
  details on the "Embedded Peripherals IP User Guide" of Altera.
 
-config NS16550_SERIAL
-   bool "NS16550 UART or compatible"
-   depends on DM_SERIAL
-   default y if X86 || PPC || ARCH_ROCKCHIP
-   help
- Support NS16550 UART or compatible with driver model. This can be
- enabled in the device tree with the correct input clock frequency.
- If the input clock frequency is not defined in the device tree,
- the macro CONFIG_SYS_NS16550_CLK defined in a legacy board header
- file will be used. It can be a constant or a function to get clock,
- eg, get_serial_clock().
-
 config SANDBOX_SERIAL
bool "Sandbox UART support"
depends on SANDBOX
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index f0a9aac..d5bcbc3 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -404,7 +404,6 @@ int ns16550_serial_ofdata_to_platdata(struct udevice *dev)
plat->base = addr;
plat->reg_shift = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
 "reg-shift", 1);
-#ifdef CONFIG_NS16550_SERIAL
plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
 "clock-frequency",
 CONFIG_SYS_NS16550_CLK);
@@ -412,7 +411,6 @@ int ns16550_serial_ofdata_to_platdata(struct udevice *dev)
debug("ns16550 clock not defined\n");
return -EINVAL;
}
-#endif /* CONFIG_NS16550_SERIAL */
 
return 0;
 }
@@ -425,7 +423,6 @@ const struct dm_serial_ops ns16550_serial_ops = {
.setbrg = ns16550_serial_setbrg,
 };
 
-#ifdef CONFIG_NS16550_SERIAL
 #if CONFIG_IS_ENABLED(OF_CONTROL)
 static const struct udevice_id ns16550_serial_ids[] = {
{ .compatible = "ns16550" },
@@ -454,5 +451,4 @@ U_BOOT_DRIVER(ns16550_serial) = {
.probe = ns16550_serial_probe,
.ops= _serial_ops,
 };
-#endif /* CONFIG_NS16550_SERIAL */
 #endif /* CONFIG_DM_SERIAL */
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index a962bf5..75b8f53 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -27,8 +27,6 @@
 #if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_DM_SERIAL)
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE(-4)
-#else
-#define CONFIG_NS16550_SERIAL
 #endif
 
 /* I2C Configuration */
diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h
index e1019ff..f8c39bf 100644
--- a/include/configs/cm_t43.h
+++ b/include/configs/cm_t43.h
@@ -18,7 +18,6 @@
 #include 
 
 /* Serial support */
-#define CONFIG_NS16550_SERIAL
 #define CONFIG_DM_SERIAL
 #define CONFIG_SYS_NS16550
 #define CONFIG_SYS_NS16550_SERIAL
diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h
index 0e33a89..575e53e 100644
--- a/include/configs/mv-common.h
+++ b/include/configs/mv-common.h
@@ -39,10 +39,6 @@
 /*
  * NS16550 Configuration
  */
-#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_DM_SERIAL)
-#define CONFIG_NS16550_SERIAL
-#endif
-
 #define CONFIG_SYS_NS16550
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_CLK CONFIG_SYS_TCLK
diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h
index c15c699..803f4b8 100644
--- a/include/configs/omap3_pandora.h
+++ 

Re: [U-Boot] [PATCH v2 11/13] ns16550: zap CONFIG_NS16550_SERIAL

2015-11-18 Thread Bin Meng
Hi Thomas,

On Wed, Nov 18, 2015 at 10:36 PM, Thomas Chou  wrote:
> Hi Bin,
>
>
> On 2015年11月18日 22:09, Bin Meng wrote:
>>
>> Hi Thomas,
>>
>> On Wed, Nov 18, 2015 at 9:44 PM, Thomas Chou  wrote:
>>>
>>> Zap CONFIG_NS16550_SERIAL, as the unification of ns16550 drivers
>>> is completed.
>>>
>>> Signed-off-by: Thomas Chou 
>>> ---
>>>   configs/efi-x86_defconfig|  1 -
>>>   drivers/serial/Kconfig   | 12 
>>>   drivers/serial/ns16550.c |  4 
>>>   include/configs/am43xx_evm.h |  2 --
>>>   include/configs/cm_t43.h |  1 -
>>>   include/configs/mv-common.h  |  4 
>>>   include/configs/omap3_pandora.h  |  1 -
>>>   include/configs/sniper.h |  4 +---
>>>   include/configs/sunxi-common.h   |  4 +---
>>>   include/configs/tb100.h  |  1 -
>>>   include/configs/tegra-common.h   |  1 -
>>>   include/configs/ti_am335x_common.h   |  4 
>>>   include/configs/ti_armv7_keystone2.h |  2 --
>>>   include/configs/ti_omap3_common.h|  4 
>>>   include/configs/ti_omap4_common.h|  2 --
>>>   include/configs/ti_omap5_common.h|  2 --
>>>   16 files changed, 2 insertions(+), 47 deletions(-)
>>>
>>> diff --git a/configs/efi-x86_defconfig b/configs/efi-x86_defconfig
>>> index b1573df..904b564 100644
>>> --- a/configs/efi-x86_defconfig
>>> +++ b/configs/efi-x86_defconfig
>>> @@ -3,7 +3,6 @@ CONFIG_VENDOR_EFI=y
>>>   CONFIG_DEFAULT_DEVICE_TREE="efi"
>>>   CONFIG_TARGET_EFI=y
>>>   CONFIG_TSC_CALIBRATION_BYPASS=y
>>> -# CONFIG_NS16550_SERIAL is not set
>>
>>
>> This line should not be removed.
>
>
> The CONFIG_NS16550_SERIAL is used only during the transition and it is
> removed now. It does not need this for efi serial to work.
>

Yes, I just checked patch#12 "ns16550: move CONFIG_SYS_NS16550 to
Kconfig" (a huge patchset) and found CONFIG_SYS_NS16550 is not on by
default for x86, so this line in efi-x86 can be removed. Previously I
was thinking the option is still on and if that's the case, this line
in efi-x86 should not be removed otherwise efi-x86 won't work.

> Thank you again for the review.
>
> Best regards,
> Thomas

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