Re: [U-Boot] [PATCH v2 18/50] x86: Move init of debug UART to cpu.c

2019-05-01 Thread Bin Meng
On Fri, Apr 26, 2019 at 12:00 PM Simon Glass  wrote:
>
> At present the debug UART is set up in sdram.c which is not the best place
> since it has nothing in particular to do with SDRAM. Since we want to
> support initing this in SPL too, move it to a common file.
>
> Signed-off-by: Simon Glass 
> Reviewed-by: Bin Meng 
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/broadwell/cpu.c   | 13 +
>  arch/x86/cpu/broadwell/sdram.c | 11 ---
>  2 files changed, 13 insertions(+), 11 deletions(-)
>

applied to u-boot-x86, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v2 18/50] x86: Move init of debug UART to cpu.c

2019-04-25 Thread Simon Glass
At present the debug UART is set up in sdram.c which is not the best place
since it has nothing in particular to do with SDRAM. Since we want to
support initing this in SPL too, move it to a common file.

Signed-off-by: Simon Glass 
Reviewed-by: Bin Meng 
---

Changes in v2: None

 arch/x86/cpu/broadwell/cpu.c   | 13 +
 arch/x86/cpu/broadwell/sdram.c | 11 ---
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/arch/x86/cpu/broadwell/cpu.c b/arch/x86/cpu/broadwell/cpu.c
index 232fa40eb53..d53c7b863fb 100644
--- a/arch/x86/cpu/broadwell/cpu.c
+++ b/arch/x86/cpu/broadwell/cpu.c
@@ -12,7 +12,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -156,6 +158,17 @@ int print_cpuinfo(void)
return 0;
 }
 
+void board_debug_uart_init(void)
+{
+   struct udevice *bus = NULL;
+
+   /* com1 / com2 decode range */
+   pci_x86_write_config(bus, PCH_DEV_LPC, LPC_IO_DEC, 1 << 4, PCI_SIZE_16);
+
+   pci_x86_write_config(bus, PCH_DEV_LPC, LPC_EN, COMA_LPC_EN,
+PCI_SIZE_16);
+}
+
 /*
  * The core 100MHz BLCK is disabled in deeper c-states. One needs to calibrate
  * the 100MHz BCLCK against the 24MHz BLCK to restore the clocks properly
diff --git a/arch/x86/cpu/broadwell/sdram.c b/arch/x86/cpu/broadwell/sdram.c
index b8450cc9d29..b31d78c092a 100644
--- a/arch/x86/cpu/broadwell/sdram.c
+++ b/arch/x86/cpu/broadwell/sdram.c
@@ -194,17 +194,6 @@ int misc_init_r(void)
return 0;
 }
 
-void board_debug_uart_init(void)
-{
-   struct udevice *bus = NULL;
-
-   /* com1 / com2 decode range */
-   pci_x86_write_config(bus, PCH_DEV_LPC, LPC_IO_DEC, 1 << 4, PCI_SIZE_16);
-
-   pci_x86_write_config(bus, PCH_DEV_LPC, LPC_EN, COMA_LPC_EN,
-PCI_SIZE_16);
-}
-
 static const struct udevice_id broadwell_syscon_ids[] = {
{ .compatible = "intel,me", .data = X86_SYSCON_ME },
{ }
-- 
2.21.0.593.g511ec345e18-goog

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot