All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCHv2 0/8] Migrate NXP/Freescale Vybrid based boards to support pure DT
@ 2016-01-25 17:03 Bhuvanchandra DV
  2016-01-25 17:03 ` [U-Boot] [PATCHv2 1/8] arm: vybrid: Enable lpuart support Bhuvanchandra DV
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Bhuvanchandra DV @ 2016-01-25 17:03 UTC (permalink / raw)
  To: u-boot

Changes since V1:
- Update the license string in device tree's.
- Update all lpuart's uart nodes in device tree.
- Dropped *_dtb_defconfig and updated the default defconfig's with DT support.
- Reordered defconfig's using defconfig via savedefconfig.
- Use one patch to update all Vybrid based board defconfig's.
- Dropped vybrid_gpio driver legacy code. Thanks! Stefan for pointing this.
- Dropped the legacy way of enabling GPIO, UART and SPI on NXP/Freescale Vybrid
  based board's.

- Compile checked for vf610twr and pcm052  since I don't have access
  to such hardware at my end. Reviewer's and tester's welcome!

Bhuvanchandra DV (8):
  arm: vybrid: Enable lpuart support
  arm: colibri-vf: Enable serial support
  dm: lpuart: Drop the legacy code
  dm: vybrid_gpio: Drop legacy code
  arm: vybrid: Drop enabling gpio, uart and spi in legacy mode
  arm: vf610-twr: Add device tree files
  arm: pcm052: Add device tree files
  arm: vybrid: Update defconfig's

 arch/arm/dts/Makefile            |   4 +-
 arch/arm/dts/pcm052.dts          |  22 +++++++++
 arch/arm/dts/vf-colibri.dtsi     |   9 ++++
 arch/arm/dts/vf.dtsi             |  47 ++++++++++++++++--
 arch/arm/dts/vf500-colibri.dts   |   5 --
 arch/arm/dts/vf610-colibri.dts   |   5 --
 arch/arm/dts/vf610-twr.dts       |  22 +++++++++
 configs/colibri_vf_defconfig     |   8 ++++
 configs/colibri_vf_dtb_defconfig |  14 ------
 configs/pcm052_defconfig         |   7 +++
 configs/vf610twr_defconfig       |   7 +++
 configs/vf610twr_nand_defconfig  |   7 +++
 drivers/gpio/vybrid_gpio.c       |  18 -------
 drivers/serial/serial_lpuart.c   | 101 +--------------------------------------
 include/configs/colibri_vf.h     |  13 -----
 include/configs/pcm052.h         |   3 --
 include/configs/vf610twr.h       |   3 --
 17 files changed, 129 insertions(+), 166 deletions(-)
 create mode 100644 arch/arm/dts/pcm052.dts
 create mode 100644 arch/arm/dts/vf610-twr.dts
 delete mode 100644 configs/colibri_vf_dtb_defconfig

-- 
2.7.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCHv2 1/8] arm: vybrid: Enable lpuart support
  2016-01-25 17:03 [U-Boot] [PATCHv2 0/8] Migrate NXP/Freescale Vybrid based boards to support pure DT Bhuvanchandra DV
@ 2016-01-25 17:03 ` Bhuvanchandra DV
  2016-01-25 17:03 ` [U-Boot] [PATCHv2 2/8] arm: colibri-vf: Enable serial support Bhuvanchandra DV
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Bhuvanchandra DV @ 2016-01-25 17:03 UTC (permalink / raw)
  To: u-boot

- Add device tree node's for lpuart on Vybrid platform
- Update the license string.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
---
 arch/arm/dts/vf.dtsi           | 47 +++++++++++++++++++++++++++++++++++++-----
 arch/arm/dts/vf500-colibri.dts |  5 -----
 arch/arm/dts/vf610-colibri.dts |  5 -----
 3 files changed, 42 insertions(+), 15 deletions(-)

diff --git a/arch/arm/dts/vf.dtsi b/arch/arm/dts/vf.dtsi
index 78706e1..8b87b57 100644
--- a/arch/arm/dts/vf.dtsi
+++ b/arch/arm/dts/vf.dtsi
@@ -2,11 +2,6 @@
  * Copyright 2013 Freescale Semiconductor, Inc.
  *
  * SPDX-License-Identifier:     GPL-2.0+ or X11
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
  */
 /include/ "skeleton.dtsi"
 
@@ -17,6 +12,12 @@
 		gpio2 = &gpio2;
 		gpio3 = &gpio3;
 		gpio4 = &gpio4;
+		serial0 = &uart0;
+		serial1 = &uart1;
+		serial2 = &uart2;
+		serial3 = &uart3;
+		serial4 = &uart4;
+		serial5 = &uart5;
 		spi0 = &dspi0;
 		spi1 = &dspi1;
 	};
@@ -33,6 +34,30 @@
 			#size-cells = <1>;
 			ranges;
 
+			uart0: serial at 40027000 {
+				compatible = "fsl,vf610-lpuart";
+				reg = <0x40027000 0x1000>;
+				status = "disabled";
+			};
+
+			uart1: serial at 40028000 {
+				compatible = "fsl,vf610-lpuart";
+				reg = <0x40028000 0x1000>;
+				status = "disabled";
+			};
+
+			uart2: serial at 40029000 {
+				compatible = "fsl,vf610-lpuart";
+				reg = <0x40029000 0x1000>;
+				status = "disabled";
+			};
+
+			uart3: serial at 4002a000 {
+				compatible = "fsl,vf610-lpuart";
+				reg = <0x4002a000 0x1000>;
+				status = "disabled";
+			};
+
 			dspi0: dspi0 at 4002c000 {
 				#address-cells = <1>;
 				#size-cells = <0>;
@@ -95,6 +120,18 @@
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ranges;
+
+			uart4: serial at 400a9000 {
+				compatible = "fsl,vf610-lpuart";
+				reg = <0x400a9000 0x1000>;
+				status = "disabled";
+			};
+
+			uart5: serial at 400aa000 {
+				compatible = "fsl,vf610-lpuart";
+				reg = <0x400aa000 0x1000>;
+				status = "disabled";
+			};
 		};
 	};
 };
diff --git a/arch/arm/dts/vf500-colibri.dts b/arch/arm/dts/vf500-colibri.dts
index e383306..02d0ce8 100644
--- a/arch/arm/dts/vf500-colibri.dts
+++ b/arch/arm/dts/vf500-colibri.dts
@@ -2,11 +2,6 @@
  * Copyright 2014 Toradex AG
  *
  * SPDX-License-Identifier:     GPL-2.0+ or X11
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
  */
 
 /dts-v1/;
diff --git a/arch/arm/dts/vf610-colibri.dts b/arch/arm/dts/vf610-colibri.dts
index 63bb3f4..24dfcbe 100644
--- a/arch/arm/dts/vf610-colibri.dts
+++ b/arch/arm/dts/vf610-colibri.dts
@@ -2,11 +2,6 @@
  * Copyright 2014 Toradex AG
  *
  * SPDX-License-Identifier:     GPL-2.0+ or X11
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
  */
 
 /dts-v1/;
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCHv2 2/8] arm: colibri-vf: Enable serial support
  2016-01-25 17:03 [U-Boot] [PATCHv2 0/8] Migrate NXP/Freescale Vybrid based boards to support pure DT Bhuvanchandra DV
  2016-01-25 17:03 ` [U-Boot] [PATCHv2 1/8] arm: vybrid: Enable lpuart support Bhuvanchandra DV
@ 2016-01-25 17:03 ` Bhuvanchandra DV
  2016-01-25 17:19   ` Stefan Agner
  2016-01-25 17:03 ` [U-Boot] [PATCHv2 3/8] dm: lpuart: Drop the legacy code Bhuvanchandra DV
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 13+ messages in thread
From: Bhuvanchandra DV @ 2016-01-25 17:03 UTC (permalink / raw)
  To: u-boot

- Enable lpuart support on Toradex Colibri VF50/VF61
- Use UART0 for stdout.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
---
 arch/arm/dts/vf-colibri.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/dts/vf-colibri.dtsi b/arch/arm/dts/vf-colibri.dtsi
index 7a8e9bee..13a1dba 100644
--- a/arch/arm/dts/vf-colibri.dtsi
+++ b/arch/arm/dts/vf-colibri.dtsi
@@ -10,6 +10,12 @@
  */
 #include "vf.dtsi"
 
+/ {
+	chosen {
+		stdout-path = &uart0;
+	};
+};
+
 &dspi1 {
 	status = "okay";
 	bus-num = <1>;
@@ -19,3 +25,6 @@
 		spi-max-frequency = <50000000>;
 	};
 };
+&uart0 {
+	status = "okay";
+};
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCHv2 3/8] dm: lpuart: Drop the legacy code
  2016-01-25 17:03 [U-Boot] [PATCHv2 0/8] Migrate NXP/Freescale Vybrid based boards to support pure DT Bhuvanchandra DV
  2016-01-25 17:03 ` [U-Boot] [PATCHv2 1/8] arm: vybrid: Enable lpuart support Bhuvanchandra DV
  2016-01-25 17:03 ` [U-Boot] [PATCHv2 2/8] arm: colibri-vf: Enable serial support Bhuvanchandra DV
@ 2016-01-25 17:03 ` Bhuvanchandra DV
  2016-01-25 17:24   ` Stefan Agner
  2016-01-25 17:03 ` [U-Boot] [PATCHv2 4/8] dm: vybrid_gpio: Drop " Bhuvanchandra DV
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 13+ messages in thread
From: Bhuvanchandra DV @ 2016-01-25 17:03 UTC (permalink / raw)
  To: u-boot

All boards using this driver are with device tree support,
hence drop the legacy code in driver to have a pure DT solution.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
---
 drivers/serial/serial_lpuart.c | 101 +----------------------------------------
 1 file changed, 2 insertions(+), 99 deletions(-)

diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
index 3f9c4d1..fc3321f 100644
--- a/drivers/serial/serial_lpuart.c
+++ b/drivers/serial/serial_lpuart.c
@@ -48,8 +48,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-struct lpuart_fsl *base = (struct lpuart_fsl *)LPUART_BASE;
-
 struct lpuart_serial_platdata {
 	struct lpuart_fsl *reg;
 };
@@ -127,43 +125,6 @@ static int _lpuart_serial_init(struct lpuart_fsl *base)
 	return 0;
 }
 
-#ifndef CONFIG_DM_SERIAL
-static void lpuart_serial_setbrg(void)
-{
-	_lpuart_serial_setbrg(base, gd->baudrate);
-}
-
-static int lpuart_serial_getc(void)
-{
-	return _lpuart_serial_getc(base);
-}
-
-static void lpuart_serial_putc(const char c)
-{
-	_lpuart_serial_putc(base, c);
-}
-
-static int lpuart_serial_tstc(void)
-{
-	return _lpuart_serial_tstc(base);
-}
-
-static int lpuart_serial_init(void)
-{
-	return _lpuart_serial_init(base);
-}
-
-static struct serial_device lpuart_serial_drv = {
-	.name = "lpuart_serial",
-	.start = lpuart_serial_init,
-	.stop = NULL,
-	.setbrg = lpuart_serial_setbrg,
-	.putc = lpuart_serial_putc,
-	.puts = default_serial_puts,
-	.getc = lpuart_serial_getc,
-	.tstc = lpuart_serial_tstc,
-};
-#else /* CONFIG_DM_SERIAL */
 static int lpuart_serial_setbrg(struct udevice *dev, int baudrate)
 {
 	struct lpuart_serial_platdata *plat = dev->platdata;
@@ -210,8 +171,8 @@ static int lpuart_serial_probe(struct udevice *dev)
 
 	return _lpuart_serial_init(reg);
 }
-#endif /* CONFIG_DM_SERIAL */
 #else
+
 static void _lpuart32_serial_setbrg(struct lpuart_fsl *base, int baudrate)
 {
 	u32 clk = CONFIG_SYS_CLK_FREQ;
@@ -281,43 +242,6 @@ static int _lpuart32_serial_init(struct lpuart_fsl *base)
 	return 0;
 }
 
-#ifndef CONFIG_DM_SERIAL
-static void lpuart32_serial_setbrg(void)
-{
-	_lpuart32_serial_setbrg(base, gd->baudrate);
-}
-
-static int lpuart32_serial_getc(void)
-{
-	return _lpuart32_serial_getc(base);
-}
-
-static void lpuart32_serial_putc(const char c)
-{
-	_lpuart32_serial_putc(base, c);
-}
-
-static int lpuart32_serial_tstc(void)
-{
-	return _lpuart32_serial_tstc(base);
-}
-
-static int lpuart32_serial_init(void)
-{
-	return _lpuart32_serial_init(base);
-}
-
-static struct serial_device lpuart32_serial_drv = {
-	.name = "lpuart32_serial",
-	.start = lpuart32_serial_init,
-	.stop = NULL,
-	.setbrg = lpuart32_serial_setbrg,
-	.putc = lpuart32_serial_putc,
-	.puts = default_serial_puts,
-	.getc = lpuart32_serial_getc,
-	.tstc = lpuart32_serial_tstc,
-};
-#else /* CONFIG_DM_SERIAL */
 static int lpuart32_serial_setbrg(struct udevice *dev, int baudrate)
 {
 	struct lpuart_serial_platdata *plat = dev->platdata;
@@ -364,28 +288,8 @@ static int lpuart32_serial_probe(struct udevice *dev)
 
 	return _lpuart32_serial_init(reg);
 }
-#endif /* CONFIG_DM_SERIAL */
-#endif
-
-#ifndef CONFIG_DM_SERIAL
-void lpuart_serial_initialize(void)
-{
-#ifdef CONFIG_LPUART_32B_REG
-	serial_register(&lpuart32_serial_drv);
-#else
-	serial_register(&lpuart_serial_drv);
-#endif
-}
+#endif /* CONFIG_LPUART_32B_REG */
 
-__weak struct serial_device *default_serial_console(void)
-{
-#ifdef CONFIG_LPUART_32B_REG
-	return &lpuart32_serial_drv;
-#else
-	return &lpuart_serial_drv;
-#endif
-}
-#else /* CONFIG_DM_SERIAL */
 static int lpuart_serial_ofdata_to_platdata(struct udevice *dev)
 {
 	struct lpuart_serial_platdata *plat = dev->platdata;
@@ -447,4 +351,3 @@ U_BOOT_DRIVER(serial_lpuart32) = {
 	.flags = DM_FLAG_PRE_RELOC,
 };
 #endif /* CONFIG_LPUART_32B_REG */
-#endif /* CONFIG_DM_SERIAL */
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCHv2 4/8] dm: vybrid_gpio: Drop legacy code
  2016-01-25 17:03 [U-Boot] [PATCHv2 0/8] Migrate NXP/Freescale Vybrid based boards to support pure DT Bhuvanchandra DV
                   ` (2 preceding siblings ...)
  2016-01-25 17:03 ` [U-Boot] [PATCHv2 3/8] dm: lpuart: Drop the legacy code Bhuvanchandra DV
@ 2016-01-25 17:03 ` Bhuvanchandra DV
  2016-01-25 17:03 ` [U-Boot] [PATCHv2 5/8] arm: vybrid: Drop enabling GPIO, UART and SPI in legacy mode Bhuvanchandra DV
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Bhuvanchandra DV @ 2016-01-25 17:03 UTC (permalink / raw)
  To: u-boot

All boards using this driver are with device tree support,
hence drop the legacy code in driver to have a pure DT solution.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
---
 drivers/gpio/vybrid_gpio.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/drivers/gpio/vybrid_gpio.c b/drivers/gpio/vybrid_gpio.c
index 4d25f9a..a30ba5d 100644
--- a/drivers/gpio/vybrid_gpio.c
+++ b/drivers/gpio/vybrid_gpio.c
@@ -135,24 +135,6 @@ static int vybrid_gpio_bind(struct udevice *dev)
 	return 0;
 }
 
-#if !CONFIG_IS_ENABLED(OF_CONTROL)
-static const struct vybrid_gpio_platdata vybrid_gpio[] = {
-	{0, GPIO0_BASE_ADDR, "GPIO0 "},
-	{1, GPIO1_BASE_ADDR, "GPIO1 "},
-	{2, GPIO2_BASE_ADDR, "GPIO2 "},
-	{3, GPIO3_BASE_ADDR, "GPIO3 "},
-	{4, GPIO4_BASE_ADDR, "GPIO4 "},
-};
-
-U_BOOT_DEVICES(vybrid_gpio) = {
-	{ "gpio_vybrid", &vybrid_gpio[0] },
-	{ "gpio_vybrid", &vybrid_gpio[1] },
-	{ "gpio_vybrid", &vybrid_gpio[2] },
-	{ "gpio_vybrid", &vybrid_gpio[3] },
-	{ "gpio_vybrid", &vybrid_gpio[4] },
-};
-#endif
-
 static const struct udevice_id vybrid_gpio_ids[] = {
 	{ .compatible = "fsl,vf610-gpio" },
 	{ }
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCHv2 5/8] arm: vybrid: Drop enabling GPIO, UART and SPI in legacy mode
  2016-01-25 17:03 [U-Boot] [PATCHv2 0/8] Migrate NXP/Freescale Vybrid based boards to support pure DT Bhuvanchandra DV
                   ` (3 preceding siblings ...)
  2016-01-25 17:03 ` [U-Boot] [PATCHv2 4/8] dm: vybrid_gpio: Drop " Bhuvanchandra DV
@ 2016-01-25 17:03 ` Bhuvanchandra DV
  2016-02-02 16:12   ` Jagan Teki
  2016-01-25 17:03 ` [U-Boot] [PATCHv2 6/8] arm: vf610-twr: Add device tree file's Bhuvanchandra DV
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 13+ messages in thread
From: Bhuvanchandra DV @ 2016-01-25 17:03 UTC (permalink / raw)
  To: u-boot

Remove the legacy way of enabling UART, GPIO and SPI on Vybrid
based boards since these driver's now only supports DT mode.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
---
 include/configs/colibri_vf.h | 13 -------------
 include/configs/pcm052.h     |  3 ---
 include/configs/vf610twr.h   |  3 ---
 3 files changed, 19 deletions(-)

diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index 5aed3a5..6efff76 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -36,13 +36,10 @@
 
 #define CONFIG_BOARD_EARLY_INIT_F
 
-#define LPUART_BASE			UART0_BASE
-
 /* Allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
 #define CONFIG_VERSION_VARIABLE
-#define CONFIG_SYS_UART_PORT		(0)
 #define CONFIG_BAUDRATE			115200
 #define CONFIG_CMD_ASKENV
 
@@ -52,10 +49,6 @@
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 #define CONFIG_SYS_NAND_BASE		NFC_BASE_ADDR
 
-/* GPIO support */
-#define CONFIG_DM_GPIO
-#define CONFIG_VYBRID_GPIO
-
 /* Dynamic MTD partition support */
 #define CONFIG_CMD_MTDPARTS	/* Enable 'mtdparts' command line support */
 #define CONFIG_MTD_PARTITIONS
@@ -265,10 +258,4 @@
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #define CONFIG_CMD_USB_MASS_STORAGE
 
-/* Enable SPI support */
-#ifdef CONFIG_OF_CONTROL
-#define CONFIG_DM_SPI
-#define CONFIG_CMD_SPI
-#endif
-
 #endif /* __CONFIG_H */
diff --git a/include/configs/pcm052.h b/include/configs/pcm052.h
index 891bdb0..f3353f2 100644
--- a/include/configs/pcm052.h
+++ b/include/configs/pcm052.h
@@ -27,11 +27,8 @@
 
 #define CONFIG_BOARD_EARLY_INIT_F
 
-#define LPUART_BASE			UART1_BASE
-
 /* Allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
-#define CONFIG_SYS_UART_PORT		(1)
 #define CONFIG_BAUDRATE			115200
 
 #undef CONFIG_CMD_IMLS
diff --git a/include/configs/vf610twr.h b/include/configs/vf610twr.h
index dcfafaf..84ad2c3 100644
--- a/include/configs/vf610twr.h
+++ b/include/configs/vf610twr.h
@@ -34,11 +34,8 @@
 
 #define CONFIG_BOARD_EARLY_INIT_F
 
-#define LPUART_BASE			UART1_BASE
-
 /* Allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
-#define CONFIG_SYS_UART_PORT		(1)
 #define CONFIG_BAUDRATE			115200
 
 /* NAND support */
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCHv2 6/8] arm: vf610-twr: Add device tree file's
  2016-01-25 17:03 [U-Boot] [PATCHv2 0/8] Migrate NXP/Freescale Vybrid based boards to support pure DT Bhuvanchandra DV
                   ` (4 preceding siblings ...)
  2016-01-25 17:03 ` [U-Boot] [PATCHv2 5/8] arm: vybrid: Drop enabling GPIO, UART and SPI in legacy mode Bhuvanchandra DV
@ 2016-01-25 17:03 ` Bhuvanchandra DV
  2016-01-25 17:03 ` [U-Boot] [PATCHv2 7/8] arm: pcm052: " Bhuvanchandra DV
  2016-01-25 17:04 ` [U-Boot] [PATCHv2 8/8] arm: vybrid: Update defconfig's Bhuvanchandra DV
  7 siblings, 0 replies; 13+ messages in thread
From: Bhuvanchandra DV @ 2016-01-25 17:03 UTC (permalink / raw)
  To: u-boot

- Add device tree files for NXP/Freescale VF610 Tower Board.
- Enable lpuart support on NXP/Freescale VF610 Tower Board.
- Use UART1 as stdout.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
---
 arch/arm/dts/Makefile      |  3 ++-
 arch/arm/dts/vf610-twr.dts | 22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/vf610-twr.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index f66ff41..c6fb50c 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -190,7 +190,8 @@ dtb-$(CONFIG_MACH_SUN9I) += \
 	sun9i-a80-cubieboard4.dtb
 
 dtb-$(CONFIG_VF610) += vf500-colibri.dtb \
-	vf610-colibri.dtb
+	vf610-colibri.dtb \
+	vf610-twr.dtb
 
 dtb-$(CONFIG_SOC_KEYSTONE) += k2hk-evm.dtb \
 	k2l-evm.dtb \
diff --git a/arch/arm/dts/vf610-twr.dts b/arch/arm/dts/vf610-twr.dts
new file mode 100644
index 0000000..a4ccbcb
--- /dev/null
+++ b/arch/arm/dts/vf610-twr.dts
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2016 Toradex AG
+ *
+ * SPDX-License-Identifier:     GPL-2.0+ or X11
+ */
+
+/dts-v1/;
+#include "vf.dtsi"
+
+/ {
+	model = "VF610 Tower Board";
+	compatible = "fsl,vf610-twr", "fsl,vf610";
+
+	choosen {
+		stdout-path = &uart1;
+	};
+
+};
+
+&uart1 {
+	status = "okay";
+};
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCHv2 7/8] arm: pcm052: Add device tree file's
  2016-01-25 17:03 [U-Boot] [PATCHv2 0/8] Migrate NXP/Freescale Vybrid based boards to support pure DT Bhuvanchandra DV
                   ` (5 preceding siblings ...)
  2016-01-25 17:03 ` [U-Boot] [PATCHv2 6/8] arm: vf610-twr: Add device tree file's Bhuvanchandra DV
@ 2016-01-25 17:03 ` Bhuvanchandra DV
  2016-01-25 17:04 ` [U-Boot] [PATCHv2 8/8] arm: vybrid: Update defconfig's Bhuvanchandra DV
  7 siblings, 0 replies; 13+ messages in thread
From: Bhuvanchandra DV @ 2016-01-25 17:03 UTC (permalink / raw)
  To: u-boot

- Add device tree files for Phytec phyCORE-Vybrid Board.
- Enable lpuart support for Phytec phyCORE-Vybrid Board.
- Use UART1 for stdout.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
---
 arch/arm/dts/Makefile   |  3 ++-
 arch/arm/dts/pcm052.dts | 22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/pcm052.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index c6fb50c..b3bde5a 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -191,7 +191,8 @@ dtb-$(CONFIG_MACH_SUN9I) += \
 
 dtb-$(CONFIG_VF610) += vf500-colibri.dtb \
 	vf610-colibri.dtb \
-	vf610-twr.dtb
+	vf610-twr.dtb \
+	pcm052.dtb
 
 dtb-$(CONFIG_SOC_KEYSTONE) += k2hk-evm.dtb \
 	k2l-evm.dtb \
diff --git a/arch/arm/dts/pcm052.dts b/arch/arm/dts/pcm052.dts
new file mode 100644
index 0000000..0475f1f
--- /dev/null
+++ b/arch/arm/dts/pcm052.dts
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2016 Toradex AG
+ *
+ * SPDX-License-Identifier:     GPL-2.0+ or X11
+ */
+
+/dts-v1/;
+#include "vf.dtsi"
+
+/ {
+	model = "Phytec phyCORE-Vybrid";
+	compatible = "phytec,pcm052", "fsl,vf610";
+
+	choosen {
+		stdout-path = &uart1;
+	};
+
+};
+
+&uart1 {
+	status = "okay";
+};
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCHv2 8/8] arm: vybrid: Update defconfig's
  2016-01-25 17:03 [U-Boot] [PATCHv2 0/8] Migrate NXP/Freescale Vybrid based boards to support pure DT Bhuvanchandra DV
                   ` (6 preceding siblings ...)
  2016-01-25 17:03 ` [U-Boot] [PATCHv2 7/8] arm: pcm052: " Bhuvanchandra DV
@ 2016-01-25 17:04 ` Bhuvanchandra DV
  7 siblings, 0 replies; 13+ messages in thread
From: Bhuvanchandra DV @ 2016-01-25 17:04 UTC (permalink / raw)
  To: u-boot

Let's go with pure DT solution for board's
based on NXP/Freescale Vybrid platform.

- Merge the DT defconfig with non-DT defconfig for Toradex
  Colibri VF50/VF61 and drop the non-DT defconfig.
- Update the legacy defconfigs for NXP/Freescale VF610 Tower
  Board with DT.
- Update the legacy defconfigs for Phytec phyCORE-vybrid
  Board with DT.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
---
 configs/colibri_vf_defconfig     |  8 ++++++++
 configs/colibri_vf_dtb_defconfig | 14 --------------
 configs/pcm052_defconfig         |  7 +++++++
 configs/vf610twr_defconfig       |  7 +++++++
 configs/vf610twr_nand_defconfig  |  7 +++++++
 5 files changed, 29 insertions(+), 14 deletions(-)
 delete mode 100644 configs/colibri_vf_dtb_defconfig

diff --git a/configs/colibri_vf_defconfig b/configs/colibri_vf_defconfig
index 45917c8..27a41e7 100644
--- a/configs/colibri_vf_defconfig
+++ b/configs/colibri_vf_defconfig
@@ -1,11 +1,19 @@
 CONFIG_ARM=y
 CONFIG_TARGET_COLIBRI_VF=y
+CONFIG_DM_SERIAL=y
+CONFIG_DM_SPI=y
+CONFIG_DM_GPIO=y
+CONFIG_DEFAULT_DEVICE_TREE="vf610-colibri"
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_vf/imximage.cfg,ENV_IS_IN_NAND,IMX_NAND"
 CONFIG_SYS_PROMPT="Colibri VFxx # "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_SPI=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_OF_CONTROL=y
 CONFIG_DM=y
+CONFIG_VYBRID_GPIO=y
 CONFIG_NAND_VF610_NFC=y
 CONFIG_SYS_NAND_VF610_NFC_60_ECC_BYTES=y
 CONFIG_FSL_LPUART=y
+CONFIG_FSL_DSPI=y
diff --git a/configs/colibri_vf_dtb_defconfig b/configs/colibri_vf_dtb_defconfig
deleted file mode 100644
index b1a843a..0000000
--- a/configs/colibri_vf_dtb_defconfig
+++ /dev/null
@@ -1,14 +0,0 @@
-CONFIG_ARM=y
-CONFIG_TARGET_COLIBRI_VF=y
-CONFIG_DEFAULT_DEVICE_TREE="vf610-colibri"
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_vf/imximage.cfg,ENV_IS_IN_NAND,IMX_NAND"
-CONFIG_SYS_PROMPT="Colibri VFxx # "
-# CONFIG_CMD_IMLS is not set
-CONFIG_CMD_GPIO=y
-# CONFIG_CMD_SETEXPR is not set
-# CONFIG_CMD_NET is not set
-CONFIG_OF_CONTROL=y
-CONFIG_DM=y
-CONFIG_NAND_VF610_NFC=y
-CONFIG_SYS_NAND_VF610_NFC_60_ECC_BYTES=y
-CONFIG_FSL_LPUART=y
diff --git a/configs/pcm052_defconfig b/configs/pcm052_defconfig
index 26ab733..49159ce 100644
--- a/configs/pcm052_defconfig
+++ b/configs/pcm052_defconfig
@@ -1,6 +1,13 @@
 CONFIG_ARM=y
 CONFIG_TARGET_PCM052=y
+CONFIG_DM_SERIAL=y
+CONFIG_DM_GPIO=y
+CONFIG_DEFAULT_DEVICE_TREE="pcm052"
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/phytec/pcm052/imximage.cfg,ENV_IS_IN_NAND"
+CONFIG_CMD_GPIO=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_VYBRID_GPIO=y
 CONFIG_NAND_VF610_NFC=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_FSL_LPUART=y
diff --git a/configs/vf610twr_defconfig b/configs/vf610twr_defconfig
index d51c93b..d959293 100644
--- a/configs/vf610twr_defconfig
+++ b/configs/vf610twr_defconfig
@@ -1,8 +1,15 @@
 CONFIG_ARM=y
 CONFIG_TARGET_VF610TWR=y
+CONFIG_DM_SERIAL=y
+CONFIG_DM_GPIO=y
+CONFIG_DEFAULT_DEVICE_TREE="vf610-twr"
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/vf610twr/imximage.cfg,ENV_IS_IN_MMC"
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_VYBRID_GPIO=y
 CONFIG_NAND_VF610_NFC=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SPI_FLASH=y
diff --git a/configs/vf610twr_nand_defconfig b/configs/vf610twr_nand_defconfig
index 299fa8f..b6a96f2 100644
--- a/configs/vf610twr_nand_defconfig
+++ b/configs/vf610twr_nand_defconfig
@@ -1,8 +1,15 @@
 CONFIG_ARM=y
 CONFIG_TARGET_VF610TWR=y
+CONFIG_DM_SERIAL=y
+CONFIG_DM_GPIO=y
+CONFIG_DEFAULT_DEVICE_TREE="vf610-twr"
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/vf610twr/imximage.cfg,ENV_IS_IN_NAND"
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_VYBRID_GPIO=y
 CONFIG_NAND_VF610_NFC=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SPI_FLASH=y
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCHv2 2/8] arm: colibri-vf: Enable serial support
  2016-01-25 17:03 ` [U-Boot] [PATCHv2 2/8] arm: colibri-vf: Enable serial support Bhuvanchandra DV
@ 2016-01-25 17:19   ` Stefan Agner
  0 siblings, 0 replies; 13+ messages in thread
From: Stefan Agner @ 2016-01-25 17:19 UTC (permalink / raw)
  To: u-boot

On 2016-01-25 09:03, Bhuvanchandra DV wrote:
> - Enable lpuart support on Toradex Colibri VF50/VF61
> - Use UART0 for stdout.

Compared to the previous commit, I would say here it is fine, since
those two changes are really connected.

Acked-by: Stefan Agner <stefan.agner@toradex.com>

--
Stefan

> 
> Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
> ---
>  arch/arm/dts/vf-colibri.dtsi | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm/dts/vf-colibri.dtsi b/arch/arm/dts/vf-colibri.dtsi
> index 7a8e9bee..13a1dba 100644
> --- a/arch/arm/dts/vf-colibri.dtsi
> +++ b/arch/arm/dts/vf-colibri.dtsi
> @@ -10,6 +10,12 @@
>   */
>  #include "vf.dtsi"
>  
> +/ {
> +	chosen {
> +		stdout-path = &uart0;
> +	};
> +};
> +
>  &dspi1 {
>  	status = "okay";
>  	bus-num = <1>;
> @@ -19,3 +25,6 @@
>  		spi-max-frequency = <50000000>;
>  	};
>  };
> +&uart0 {
> +	status = "okay";
> +};

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCHv2 3/8] dm: lpuart: Drop the legacy code
  2016-01-25 17:03 ` [U-Boot] [PATCHv2 3/8] dm: lpuart: Drop the legacy code Bhuvanchandra DV
@ 2016-01-25 17:24   ` Stefan Agner
  2016-01-26  9:36     ` Bhuvanchandra DV
  0 siblings, 1 reply; 13+ messages in thread
From: Stefan Agner @ 2016-01-25 17:24 UTC (permalink / raw)
  To: u-boot

On 2016-01-25 09:03, Bhuvanchandra DV wrote:
> All boards using this driver are with device tree support,
> hence drop the legacy code in driver to have a pure DT solution.

Hm, dropping the legacy code at this point probably leads to a broken
state (bisectability...)

I would recommend to first move the boards to device tree and then drop
legacy stuff... Probably along these lines:

  arm: vybrid: Enable lpuart support
  arm: colibri-vf: Enable serial support
  arm: vybrid: Drop enabling gpio, uart and spi in legacy mode
  arm: vf610-twr: Add device tree files
  arm: pcm052: Add device tree files
  arm: vybrid: Update defconfig's
  dm: lpuart: Drop the legacy code
  dm: vybrid_gpio: Drop legacy code

--
Stefan

> 
> Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>  drivers/serial/serial_lpuart.c | 101 +----------------------------------------
>  1 file changed, 2 insertions(+), 99 deletions(-)
> 
> diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
> index 3f9c4d1..fc3321f 100644
> --- a/drivers/serial/serial_lpuart.c
> +++ b/drivers/serial/serial_lpuart.c
> @@ -48,8 +48,6 @@
>  
>  DECLARE_GLOBAL_DATA_PTR;
>  
> -struct lpuart_fsl *base = (struct lpuart_fsl *)LPUART_BASE;
> -
>  struct lpuart_serial_platdata {
>  	struct lpuart_fsl *reg;
>  };
> @@ -127,43 +125,6 @@ static int _lpuart_serial_init(struct lpuart_fsl *base)
>  	return 0;
>  }
>  
> -#ifndef CONFIG_DM_SERIAL
> -static void lpuart_serial_setbrg(void)
> -{
> -	_lpuart_serial_setbrg(base, gd->baudrate);
> -}
> -
> -static int lpuart_serial_getc(void)
> -{
> -	return _lpuart_serial_getc(base);
> -}
> -
> -static void lpuart_serial_putc(const char c)
> -{
> -	_lpuart_serial_putc(base, c);
> -}
> -
> -static int lpuart_serial_tstc(void)
> -{
> -	return _lpuart_serial_tstc(base);
> -}
> -
> -static int lpuart_serial_init(void)
> -{
> -	return _lpuart_serial_init(base);
> -}
> -
> -static struct serial_device lpuart_serial_drv = {
> -	.name = "lpuart_serial",
> -	.start = lpuart_serial_init,
> -	.stop = NULL,
> -	.setbrg = lpuart_serial_setbrg,
> -	.putc = lpuart_serial_putc,
> -	.puts = default_serial_puts,
> -	.getc = lpuart_serial_getc,
> -	.tstc = lpuart_serial_tstc,
> -};
> -#else /* CONFIG_DM_SERIAL */
>  static int lpuart_serial_setbrg(struct udevice *dev, int baudrate)
>  {
>  	struct lpuart_serial_platdata *plat = dev->platdata;
> @@ -210,8 +171,8 @@ static int lpuart_serial_probe(struct udevice *dev)
>  
>  	return _lpuart_serial_init(reg);
>  }
> -#endif /* CONFIG_DM_SERIAL */
>  #else
> +
>  static void _lpuart32_serial_setbrg(struct lpuart_fsl *base, int baudrate)
>  {
>  	u32 clk = CONFIG_SYS_CLK_FREQ;
> @@ -281,43 +242,6 @@ static int _lpuart32_serial_init(struct lpuart_fsl *base)
>  	return 0;
>  }
>  
> -#ifndef CONFIG_DM_SERIAL
> -static void lpuart32_serial_setbrg(void)
> -{
> -	_lpuart32_serial_setbrg(base, gd->baudrate);
> -}
> -
> -static int lpuart32_serial_getc(void)
> -{
> -	return _lpuart32_serial_getc(base);
> -}
> -
> -static void lpuart32_serial_putc(const char c)
> -{
> -	_lpuart32_serial_putc(base, c);
> -}
> -
> -static int lpuart32_serial_tstc(void)
> -{
> -	return _lpuart32_serial_tstc(base);
> -}
> -
> -static int lpuart32_serial_init(void)
> -{
> -	return _lpuart32_serial_init(base);
> -}
> -
> -static struct serial_device lpuart32_serial_drv = {
> -	.name = "lpuart32_serial",
> -	.start = lpuart32_serial_init,
> -	.stop = NULL,
> -	.setbrg = lpuart32_serial_setbrg,
> -	.putc = lpuart32_serial_putc,
> -	.puts = default_serial_puts,
> -	.getc = lpuart32_serial_getc,
> -	.tstc = lpuart32_serial_tstc,
> -};
> -#else /* CONFIG_DM_SERIAL */
>  static int lpuart32_serial_setbrg(struct udevice *dev, int baudrate)
>  {
>  	struct lpuart_serial_platdata *plat = dev->platdata;
> @@ -364,28 +288,8 @@ static int lpuart32_serial_probe(struct udevice *dev)
>  
>  	return _lpuart32_serial_init(reg);
>  }
> -#endif /* CONFIG_DM_SERIAL */
> -#endif
> -
> -#ifndef CONFIG_DM_SERIAL
> -void lpuart_serial_initialize(void)
> -{
> -#ifdef CONFIG_LPUART_32B_REG
> -	serial_register(&lpuart32_serial_drv);
> -#else
> -	serial_register(&lpuart_serial_drv);
> -#endif
> -}
> +#endif /* CONFIG_LPUART_32B_REG */
>  
> -__weak struct serial_device *default_serial_console(void)
> -{
> -#ifdef CONFIG_LPUART_32B_REG
> -	return &lpuart32_serial_drv;
> -#else
> -	return &lpuart_serial_drv;
> -#endif
> -}
> -#else /* CONFIG_DM_SERIAL */
>  static int lpuart_serial_ofdata_to_platdata(struct udevice *dev)
>  {
>  	struct lpuart_serial_platdata *plat = dev->platdata;
> @@ -447,4 +351,3 @@ U_BOOT_DRIVER(serial_lpuart32) = {
>  	.flags = DM_FLAG_PRE_RELOC,
>  };
>  #endif /* CONFIG_LPUART_32B_REG */
> -#endif /* CONFIG_DM_SERIAL */

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCHv2 3/8] dm: lpuart: Drop the legacy code
  2016-01-25 17:24   ` Stefan Agner
@ 2016-01-26  9:36     ` Bhuvanchandra DV
  0 siblings, 0 replies; 13+ messages in thread
From: Bhuvanchandra DV @ 2016-01-26  9:36 UTC (permalink / raw)
  To: u-boot

On 01/25/2016 10:54 PM, Stefan Agner wrote:
> On 2016-01-25 09:03, Bhuvanchandra DV wrote:
>> All boards using this driver are with device tree support,
>> hence drop the legacy code in driver to have a pure DT solution.
>
> Hm, dropping the legacy code at this point probably leads to a broken
> state (bisectability...)
>
> I would recommend to first move the boards to device tree and then drop
> legacy stuff... Probably along these lines:
>
>    arm: vybrid: Enable lpuart support
>    arm: colibri-vf: Enable serial support
>    arm: vybrid: Drop enabling gpio, uart and spi in legacy mode
>    arm: vf610-twr: Add device tree files
>    arm: pcm052: Add device tree files
>    arm: vybrid: Update defconfig's
>    dm: lpuart: Drop the legacy code
>    dm: vybrid_gpio: Drop legacy code

Will reorder the patches in next version.

>
> --
> Stefan
>
>>
>> Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
>> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
>> ---
>>   drivers/serial/serial_lpuart.c | 101 +----------------------------------------
>>   1 file changed, 2 insertions(+), 99 deletions(-)
>>
>> diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
>> index 3f9c4d1..fc3321f 100644
>> --- a/drivers/serial/serial_lpuart.c
>> +++ b/drivers/serial/serial_lpuart.c
>> @@ -48,8 +48,6 @@
>>
>>   DECLARE_GLOBAL_DATA_PTR;
>>
>> -struct lpuart_fsl *base = (struct lpuart_fsl *)LPUART_BASE;
>> -
>>   struct lpuart_serial_platdata {
>>   	struct lpuart_fsl *reg;
>>   };
>> @@ -127,43 +125,6 @@ static int _lpuart_serial_init(struct lpuart_fsl *base)
>>   	return 0;
>>   }
>>
>> -#ifndef CONFIG_DM_SERIAL
>> -static void lpuart_serial_setbrg(void)
>> -{
>> -	_lpuart_serial_setbrg(base, gd->baudrate);
>> -}
>> -
>> -static int lpuart_serial_getc(void)
>> -{
>> -	return _lpuart_serial_getc(base);
>> -}
>> -
>> -static void lpuart_serial_putc(const char c)
>> -{
>> -	_lpuart_serial_putc(base, c);
>> -}
>> -
>> -static int lpuart_serial_tstc(void)
>> -{
>> -	return _lpuart_serial_tstc(base);
>> -}
>> -
>> -static int lpuart_serial_init(void)
>> -{
>> -	return _lpuart_serial_init(base);
>> -}
>> -
>> -static struct serial_device lpuart_serial_drv = {
>> -	.name = "lpuart_serial",
>> -	.start = lpuart_serial_init,
>> -	.stop = NULL,
>> -	.setbrg = lpuart_serial_setbrg,
>> -	.putc = lpuart_serial_putc,
>> -	.puts = default_serial_puts,
>> -	.getc = lpuart_serial_getc,
>> -	.tstc = lpuart_serial_tstc,
>> -};
>> -#else /* CONFIG_DM_SERIAL */
>>   static int lpuart_serial_setbrg(struct udevice *dev, int baudrate)
>>   {
>>   	struct lpuart_serial_platdata *plat = dev->platdata;
>> @@ -210,8 +171,8 @@ static int lpuart_serial_probe(struct udevice *dev)
>>
>>   	return _lpuart_serial_init(reg);
>>   }
>> -#endif /* CONFIG_DM_SERIAL */
>>   #else
>> +
>>   static void _lpuart32_serial_setbrg(struct lpuart_fsl *base, int baudrate)
>>   {
>>   	u32 clk = CONFIG_SYS_CLK_FREQ;
>> @@ -281,43 +242,6 @@ static int _lpuart32_serial_init(struct lpuart_fsl *base)
>>   	return 0;
>>   }
>>
>> -#ifndef CONFIG_DM_SERIAL
>> -static void lpuart32_serial_setbrg(void)
>> -{
>> -	_lpuart32_serial_setbrg(base, gd->baudrate);
>> -}
>> -
>> -static int lpuart32_serial_getc(void)
>> -{
>> -	return _lpuart32_serial_getc(base);
>> -}
>> -
>> -static void lpuart32_serial_putc(const char c)
>> -{
>> -	_lpuart32_serial_putc(base, c);
>> -}
>> -
>> -static int lpuart32_serial_tstc(void)
>> -{
>> -	return _lpuart32_serial_tstc(base);
>> -}
>> -
>> -static int lpuart32_serial_init(void)
>> -{
>> -	return _lpuart32_serial_init(base);
>> -}
>> -
>> -static struct serial_device lpuart32_serial_drv = {
>> -	.name = "lpuart32_serial",
>> -	.start = lpuart32_serial_init,
>> -	.stop = NULL,
>> -	.setbrg = lpuart32_serial_setbrg,
>> -	.putc = lpuart32_serial_putc,
>> -	.puts = default_serial_puts,
>> -	.getc = lpuart32_serial_getc,
>> -	.tstc = lpuart32_serial_tstc,
>> -};
>> -#else /* CONFIG_DM_SERIAL */
>>   static int lpuart32_serial_setbrg(struct udevice *dev, int baudrate)
>>   {
>>   	struct lpuart_serial_platdata *plat = dev->platdata;
>> @@ -364,28 +288,8 @@ static int lpuart32_serial_probe(struct udevice *dev)
>>
>>   	return _lpuart32_serial_init(reg);
>>   }
>> -#endif /* CONFIG_DM_SERIAL */
>> -#endif
>> -
>> -#ifndef CONFIG_DM_SERIAL
>> -void lpuart_serial_initialize(void)
>> -{
>> -#ifdef CONFIG_LPUART_32B_REG
>> -	serial_register(&lpuart32_serial_drv);
>> -#else
>> -	serial_register(&lpuart_serial_drv);
>> -#endif
>> -}
>> +#endif /* CONFIG_LPUART_32B_REG */
>>
>> -__weak struct serial_device *default_serial_console(void)
>> -{
>> -#ifdef CONFIG_LPUART_32B_REG
>> -	return &lpuart32_serial_drv;
>> -#else
>> -	return &lpuart_serial_drv;
>> -#endif
>> -}
>> -#else /* CONFIG_DM_SERIAL */
>>   static int lpuart_serial_ofdata_to_platdata(struct udevice *dev)
>>   {
>>   	struct lpuart_serial_platdata *plat = dev->platdata;
>> @@ -447,4 +351,3 @@ U_BOOT_DRIVER(serial_lpuart32) = {
>>   	.flags = DM_FLAG_PRE_RELOC,
>>   };
>>   #endif /* CONFIG_LPUART_32B_REG */
>> -#endif /* CONFIG_DM_SERIAL */

-- 
Best regards,
Bhuvan

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCHv2 5/8] arm: vybrid: Drop enabling GPIO, UART and SPI in legacy mode
  2016-01-25 17:03 ` [U-Boot] [PATCHv2 5/8] arm: vybrid: Drop enabling GPIO, UART and SPI in legacy mode Bhuvanchandra DV
@ 2016-02-02 16:12   ` Jagan Teki
  0 siblings, 0 replies; 13+ messages in thread
From: Jagan Teki @ 2016-02-02 16:12 UTC (permalink / raw)
  To: u-boot

On 25 January 2016 at 22:33, Bhuvanchandra DV
<bhuvanchandra.dv@toradex.com> wrote:
> Remove the legacy way of enabling UART, GPIO and SPI on Vybrid
> based boards since these driver's now only supports DT mode.
>
> Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>

Reviewed-by: Jagan Teki <jteki@openedev.com>

-- 
Jagan.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-02-02 16:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-25 17:03 [U-Boot] [PATCHv2 0/8] Migrate NXP/Freescale Vybrid based boards to support pure DT Bhuvanchandra DV
2016-01-25 17:03 ` [U-Boot] [PATCHv2 1/8] arm: vybrid: Enable lpuart support Bhuvanchandra DV
2016-01-25 17:03 ` [U-Boot] [PATCHv2 2/8] arm: colibri-vf: Enable serial support Bhuvanchandra DV
2016-01-25 17:19   ` Stefan Agner
2016-01-25 17:03 ` [U-Boot] [PATCHv2 3/8] dm: lpuart: Drop the legacy code Bhuvanchandra DV
2016-01-25 17:24   ` Stefan Agner
2016-01-26  9:36     ` Bhuvanchandra DV
2016-01-25 17:03 ` [U-Boot] [PATCHv2 4/8] dm: vybrid_gpio: Drop " Bhuvanchandra DV
2016-01-25 17:03 ` [U-Boot] [PATCHv2 5/8] arm: vybrid: Drop enabling GPIO, UART and SPI in legacy mode Bhuvanchandra DV
2016-02-02 16:12   ` Jagan Teki
2016-01-25 17:03 ` [U-Boot] [PATCHv2 6/8] arm: vf610-twr: Add device tree file's Bhuvanchandra DV
2016-01-25 17:03 ` [U-Boot] [PATCHv2 7/8] arm: pcm052: " Bhuvanchandra DV
2016-01-25 17:04 ` [U-Boot] [PATCHv2 8/8] arm: vybrid: Update defconfig's Bhuvanchandra DV

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.