[poky] [PATCH 12/25] u-boot-xilinx: ml507 uartlite support

Adrian Alonso aalonso at secretlab.ca
Mon Jan 17 12:29:25 PST 2011


* Add u-boot ml507 uartlite support
* Fix hardcodded macros for uartns550 setting uart and
  PLB bus frequency for ml507 target board
* Bump PR

Signed-off-by: Adrian Alonso <aalonso at secretlab.ca>
---
 .../files/ml507-add-uartlite-config-options.patch  |   51 ++++++++++++++++++++
 ...507-replace-hardcode-macros-for-uartns550.patch |   35 +++++++++++++
 recipes-bsp/uboot/u-boot-xilinx_git.bb             |    4 +-
 3 files changed, 89 insertions(+), 1 deletions(-)
 create mode 100644 recipes-bsp/uboot/files/ml507-add-uartlite-config-options.patch
 create mode 100644 recipes-bsp/uboot/files/ml507-replace-hardcode-macros-for-uartns550.patch

diff --git a/recipes-bsp/uboot/files/ml507-add-uartlite-config-options.patch b/recipes-bsp/uboot/files/ml507-add-uartlite-config-options.patch
new file mode 100644
index 0000000..cdde911
--- /dev/null
+++ b/recipes-bsp/uboot/files/ml507-add-uartlite-config-options.patch
@@ -0,0 +1,51 @@
+From 6e3db4846a393558324733a1d18fdf9858d543fe Mon Sep 17 00:00:00 2001
+From: Adrian Alonso <aalonso00 at gmail.com>
+Date: Fri, 17 Dec 2010 15:56:45 -0600
+Subject: [PATCH 1/2] ml507: add uartlite config options
+
+* Add CONFIG_XILINX_UARTLITE options
+* From xparameters find out which serial module
+  is included in the hardware project and configure
+  accord the available device
+
+Signed-off-by: Adrian Alonso <aalonso at secretlab.ca>
+---
+ include/configs/ml507.h |   16 +++++++++++++++-
+ 1 files changed, 15 insertions(+), 1 deletions(-)
+
+diff --git a/include/configs/ml507.h b/include/configs/ml507.h
+index 6454ef5..be429b6 100644
+--- a/include/configs/ml507.h
++++ b/include/configs/ml507.h
+@@ -172,7 +172,18 @@
+
+ #define CFG_MEMTEST_START	0x0400000	/* memtest works on	*/
+ #define CFG_MEMTEST_END		0x0C00000	/* 4 ... 12 MB in DRAM	*/
+-
++/*
++ *  * Serial port
++ *   * uartLite
++ *    */
++#ifdef XPAR_UARTLITE_0_BASEADDR
++#define CONFIG_XILINX_UARTLITE
++#define CONFIG_SERIAL_BASE      XPAR_UARTLITE_0_BASEADDR
++#define CONFIG_BAUDRATE         XPAR_UARTLITE_0_BAUDRATE
++#define CONFIG_SYS_BAUDRATE_TABLE   { CONFIG_BAUDRATE }
++#define XPAR_UART_0_CLOCK_FREQ_HZ XPAR_PLB_CLOCK_FREQ_HZ
++#else
++#ifdef XPAR_UARTNS550_0_BASEADDR
+ /*
+  * 16550 UART and console
+  */
+@@ -183,6 +194,9 @@
+ #define CFG_NS16550_REG_SIZE	-4
+ #define CFG_NS16550_CLK		XPAR_XUARTNS550_CLOCK_HZ
+ #define CFG_NS16550_COM1	(XPAR_UARTNS550_0_BASEADDR + 0x1003)
++#define XPAR_UART_0_CLOCK_FREQ_HZ   XPAR_XUARTNS550_CLOCK_HZ
++#endif
++#endif
+
+ #define CFG_BAUDRATE_TABLE	\
+ 	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200}
+--
+1.7.3.3
diff --git a/recipes-bsp/uboot/files/ml507-replace-hardcode-macros-for-uartns550.patch b/recipes-bsp/uboot/files/ml507-replace-hardcode-macros-for-uartns550.patch
new file mode 100644
index 0000000..8a94618
--- /dev/null
+++ b/recipes-bsp/uboot/files/ml507-replace-hardcode-macros-for-uartns550.patch
@@ -0,0 +1,35 @@
+From 9d8a9331156dcba4fe1aefb066a28f67c46468b4 Mon Sep 17 00:00:00 2001
+From: Adrian Alonso <aalonso00 at gmail.com>
+Date: Fri, 17 Dec 2010 15:58:53 -0600
+Subject: [PATCH 2/2] ml507: replace hardcode macros for uartns550
+
+* Replace hardcoded macros for setting PLB and uart
+  frecuency
+
+Signed-off-by: Adrian Alonso <aalonso at secretlab.ca>
+---
+ board/xilinx/ml507/ml507.c |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/board/xilinx/ml507/ml507.c b/board/xilinx/ml507/ml507.c
+index 8e6970e..0ef81c3 100644
+--- a/board/xilinx/ml507/ml507.c
++++ b/board/xilinx/ml507/ml507.c
+@@ -137,13 +137,13 @@ get_sys_info(sys_info_t * sysInfo)
+ {
+ 	sysInfo->freqProcessor = XPAR_CORE_CLOCK_FREQ_HZ;
+
+-	sysInfo->freqPLB = XPAR_UARTNS550_0_CLOCK_FREQ_HZ;
++	sysInfo->freqPLB = XPAR_UART_0_CLOCK_FREQ_HZ;
+ 	sysInfo->freqPCI = 0;
+
+ 	/* setup the uart clock frequency in the global data otherwise the 
+ 	 * fdt fixups on the device tree hoses it up
+ 	 */
+-	gd->uart_clk = XPAR_UARTNS550_0_CLOCK_FREQ_HZ;
++	gd->uart_clk = XPAR_UART_0_CLOCK_FREQ_HZ;
+ }
+
+ /*-----------------------------------------------------------------------------
+--
+1.7.3.3
diff --git a/recipes-bsp/uboot/u-boot-xilinx_git.bb b/recipes-bsp/uboot/u-boot-xilinx_git.bb
index 0a30602..c972311 100644
--- a/recipes-bsp/uboot/u-boot-xilinx_git.bb
+++ b/recipes-bsp/uboot/u-boot-xilinx_git.bb
@@ -1,5 +1,5 @@
 require ../meta/recipes-bsp/uboot/u-boot.inc
-PR = "r4"
+PR = "r5"
 THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
 FILESPATH =. "${@base_set_filespath(["${THISDIR}/files"], d)}:"
 
@@ -10,6 +10,8 @@ SRC_URI = "git://git.xilinx.com/u-boot-xlnx.git;branch=${BRANCH};protocol=git \
            file://uboot-remove-inline-qualifier-from-show_boot_progres.patch \
            file://ml405-add-uartlite-config-options.patch \
            file://ml405-replace-hardcode-macros-for-uartns550.patch \
+           file://ml507-add-uartlite-config-options.patch \
+           file://ml507-replace-hardcode-macros-for-uartns550.patch \
           "
 SRCREV = "${TAG}"
 
-- 
1.7.3.4




More information about the poky mailing list