public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Patch sets coming
@ 2013-03-22 16:38 York Sun
  2013-03-22 16:38 ` [U-Boot] [PATCH 01/10] doc/ramboot.mpc85xx: Documented the RAMBOOT for MPC85xx York Sun
                   ` (10 more replies)
  0 siblings, 11 replies; 20+ messages in thread
From: York Sun @ 2013-03-22 16:38 UTC (permalink / raw)
  To: u-boot


Andy,

I am sending out several sets of backlog patches. Some of them may have been
sent before. To make them easier to apply, here they come in sets.

In case my git send-email fails to add the author(s) to the CC list, please add
them when you reply (it happened before).

York

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

* [U-Boot] [PATCH 01/10] doc/ramboot.mpc85xx: Documented the RAMBOOT for MPC85xx
  2013-03-22 16:38 [U-Boot] Patch sets coming York Sun
@ 2013-03-22 16:38 ` York Sun
  2013-03-22 16:38 ` [U-Boot] [PATCH 02/10] qoriq/p1_p2_rdb_pc: USB device-tree fixups for P1020 York Sun
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: York Sun @ 2013-03-22 16:38 UTC (permalink / raw)
  To: u-boot

From: Poonam Aggrwal <poonam.aggrwal@freescale.com>

There could be scenarios where the user would like to manually(via JTAG)
configure the DDR/L2SRAM and load the bootloader binary onto DDR/L2SRAM.
This document explains thse usecases and the detailed explanation of what needs
to be done to use it.

Most of the code from CONFIG_SYS_RAMBOOT will be used except for small changes
of CCSRBAR etc.

The changes are not very large, but it is good to document them so that user
can get it working at once.

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
---
 doc/README.ramboot-ppc85xx |  102 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 102 insertions(+)
 create mode 100644 doc/README.ramboot-ppc85xx

diff --git a/doc/README.ramboot-ppc85xx b/doc/README.ramboot-ppc85xx
new file mode 100644
index 0000000..8ed45fb
--- /dev/null
+++ b/doc/README.ramboot-ppc85xx
@@ -0,0 +1,102 @@
+			RAMBOOT for MPC85xx Platforms
+			==============================
+
+RAMBOOT literally means boot from DDR. But since DDR is volatile memory some
+pre-mechanism is required to load the DDR with the bootloader binary.
+- In case of SD and SPI boot this is done by BootROM code inside the chip
+  itself.
+- In case of NAND boot FCM supports loading initial 4K code from NAND flash
+  which can initialize the DDR and get the complete bootloader copied to DDR.
+
+In addition to the above there could be some more methods to initialize the DDR
+and load it manually.
+Two of them are described below.There is also an explanation as to where these
+methods could be handy.
+1. Load the RAM based bootloader onto DDR via JTAG/BDI interface. And then
+   execute the bootloader from DDR.
+   This may be handy in the following cases:
+     - In very early stage of platform bringup where other boot options are not
+       functional because of various reasons.
+     - In case the support to program the flashes on the board is not available.
+
+2. Load the RAM based bootloader onto DDR using already existing bootloader on
+   the board.And then execute the bootloader from DDR.
+   Some usecases where this may be used:
+      - While developing some new feature of u-boot, for example USB driver or
+        SPI driver.
+        Suppose the board already has a working bootloader on it. And you would
+        prefer to keep it intact, at the same time want to test your bootloader.
+        In this case you can get your test bootloader binary into DDR via tftp
+        for example. Then execute the test bootloader.
+     - Suppose a platform already has a propreitery bootloader which does not
+       support for example AMP boot. In this case also RAM boot loader can be
+       utilized.
+
+   So basically when the original bootloader is required to be kept intact
+   RAM based bootloader can offer an updated bootloader on the system.
+
+Both the above Bootloaders are slight variants of SDcard or SPI Flash
+bootloader or for that matter even NAND bootloader.
+All of them define CONFIG_SYS_RAMBOOT.
+The main difference among all of them is the way the pre-environment is getting
+configured and who is doing that.
+- In case of SD card and SPI flash bootloader this is done by On Chip BootROM inside the Si itself.
+- In case of NAND boot SPL/TPL code does it with some support from Si itself.
+- In case of the pure RAM based bootloaders we have to do it by JTAG manually or already existing bootloader.
+
+How to use them:
+1. Using JTAG
+   Boot up in core hold off mode or stop the core after reset using JTAG
+   interface.
+   Preconfigure DDR/L2SRAM through JTAG interface.
+	- setup DDR controller registers.
+	- setup DDR LAWs
+	- setup DDR TLB
+   Load the RAM based boot loader to the proper location in DDR/L2SRAM.
+   set up IAR (Instruction counter properly)
+   Enable the core to execute.
+
+2. Using already existing bootloader.
+   get the rambased boot loader binary into DDR/L2SRAM via tftp.
+   execute the RAM based bootloader.
+      => tftp 11000000 u-boot-ram.bin
+      => go 1107f000
+
+Please note that L2SRAM can also be used instead of DDR if the SOC has
+sufficient size of L2SRAM.
+
+Necessary Code changes Required:
+=====================================
+Please note that below mentioned changes are for 85xx platforms.
+They have been tested on P1020/P2020/P1010 RDB.
+
+The main difference between the above two methods from technical perspective is
+that in 1st case SOC is just out of reset so it is in default configuration.
+(CCSRBAR is at 0xff700000).
+In the 2nd case bootloader has already re-located CCSRBAR to 0xffe00000
+
+1. File name-> boards.cfg
+   There can be added specific Make options for RAMBoot. We can keep different
+   options for the two cases mentioned above.
+   for example
+   P1020RDB_JTAG_RAMBOOT and P1020RDB_GO_RAMBOOT.
+
+2. platform config file
+   for example include/configs/P1_P2_RDB.h
+
+   #ifdef CONFIG_RAMBOOT
+   #define CONFIG_SDCARD
+   #endif
+
+   This will finally use the CONFIG_SYS_RAMBOOT.
+
+3. File name-> arch/powerpc/include/asm/config_mpc85xx.h
+   In the section of the particular SOC, for example P1020,
+
+   #if defined(CONFIG_GO)
+   #define CONFIG_SYS_CCSRBAR_DEFAULT	0xffe00000
+   #else
+   #define CONFIG_SYS_CCSRBAR_DEFAULT	0xff700000
+   #endif
+
+For JTAG  RAMBOOT this is not required because CCSRBAR is at ff700000.
-- 
1.7.9.5

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

* [U-Boot] [PATCH 02/10] qoriq/p1_p2_rdb_pc: USB device-tree fixups for P1020
  2013-03-22 16:38 [U-Boot] Patch sets coming York Sun
  2013-03-22 16:38 ` [U-Boot] [PATCH 01/10] doc/ramboot.mpc85xx: Documented the RAMBOOT for MPC85xx York Sun
@ 2013-03-22 16:38 ` York Sun
  2013-03-22 16:38 ` [U-Boot] [PATCH 03/10] powerpc/85xx: add SerDes bank 4 lanes only if we have a bank 4 York Sun
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: York Sun @ 2013-03-22 16:38 UTC (permalink / raw)
  To: u-boot

From: Zhicheng Fan <B32736@freescale.com>

Resolve P1020 second USB controller multiplexing with eLBC
         - mandatory to mention USB2 in hwconfig string to select it
           over eLBC, otherwise USB2 node is removed
         - works only for SPI and SD boot

Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Zhicheng Fan <B32736@freescale.com>
---
 board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c |   47 +++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
index 5b5b86c..cc7f866 100644
--- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
+++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
@@ -421,6 +421,8 @@ void ft_board_setup(void *blob, bd_t *bd)
 {
 	phys_addr_t base;
 	phys_size_t size;
+	const char *soc_usb_compat = "fsl-usb2-dr";
+	int err, usb1_off, usb2_off;
 
 	ft_cpu_setup(blob, bd);
 
@@ -442,5 +444,50 @@ void ft_board_setup(void *blob, bd_t *bd)
 #if defined(CONFIG_HAS_FSL_DR_USB)
 	fdt_fixup_dr_usb(blob, bd);
 #endif
+
+#if defined(CONFIG_SDCARD) || defined(CONFIG_SPIFLASH)
+	/* Delete eLBC node as it is muxed with USB2 controller */
+	if (hwconfig("usb2")) {
+		const char *soc_elbc_compat = "fsl,p1020-elbc";
+		int off = fdt_node_offset_by_compatible(blob, -1,
+				soc_elbc_compat);
+		if (off < 0) {
+			printf("WARNING: could not find compatible node"
+				" %s: %s.\n", soc_elbc_compat,
+				fdt_strerror(off));
+				return;
+		}
+		err = fdt_del_node(blob, off);
+		if (err < 0) {
+			printf("WARNING: could not remove %s: %s.\n",
+				soc_elbc_compat, fdt_strerror(err));
+		}
+		return;
+	}
+#endif
+
+/* Delete USB2 node as it is muxed with eLBC */
+	usb1_off = fdt_node_offset_by_compatible(blob, -1,
+		soc_usb_compat);
+	if (usb1_off < 0) {
+		printf("WARNING: could not find compatible node"
+			"%s: %s.\n", soc_usb_compat,
+			fdt_strerror(usb1_off));
+		return;
+	}
+	usb2_off = fdt_node_offset_by_compatible(blob, usb1_off,
+			soc_usb_compat);
+	if (usb2_off < 0) {
+		printf("WARNING: could not find compatible node"
+			" %s: %s.\n", soc_usb_compat,
+			fdt_strerror(usb2_off));
+		return;
+	}
+	err = fdt_del_node(blob, usb2_off);
+	if (err < 0) {
+		printf("WARNING: could not remove %s: %s.\n",
+			soc_usb_compat, fdt_strerror(err));
+	}
+
 }
 #endif
-- 
1.7.9.5

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

* [U-Boot] [PATCH 03/10] powerpc/85xx: add SerDes bank 4 lanes only if we have a bank 4
  2013-03-22 16:38 [U-Boot] Patch sets coming York Sun
  2013-03-22 16:38 ` [U-Boot] [PATCH 01/10] doc/ramboot.mpc85xx: Documented the RAMBOOT for MPC85xx York Sun
  2013-03-22 16:38 ` [U-Boot] [PATCH 02/10] qoriq/p1_p2_rdb_pc: USB device-tree fixups for P1020 York Sun
@ 2013-03-22 16:38 ` York Sun
  2013-03-22 16:38 ` [U-Boot] [PATCH 04/10] powerpc/p1010rdb: Change flexcan compatible string York Sun
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: York Sun @ 2013-03-22 16:38 UTC (permalink / raw)
  To: u-boot

From: Timur Tabi

Only some chips have four SerDes banks, so don't define lanes for a bank
that doesn't exist.

This fixes warning message "excess elements in array initializer" for
array lanes[], because that array is defined with a size of SRDS_MAX_LANES,
and the value of SRDS_MAX_LANES depends on the number of SerDes banks.

Signed-off-by: Timur Tabi
---
 arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
index 5495dc5..00e1c11 100644
--- a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
@@ -103,6 +103,10 @@ static const struct {
 	{ 22, 168, FSL_SRDS_BANK_3 },
 	{ 23, 169, FSL_SRDS_BANK_3 },
 #endif
+#if SRDS_MAX_BANK > 3
+	{ 24, 175, FSL_SRDS_BANK_4 },
+	{ 25, 176, FSL_SRDS_BANK_4 },
+#endif
 };
 
 int serdes_get_lane_idx(int lane)
-- 
1.7.9.5

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

* [U-Boot] [PATCH 04/10] powerpc/p1010rdb: Change flexcan compatible string
  2013-03-22 16:38 [U-Boot] Patch sets coming York Sun
                   ` (2 preceding siblings ...)
  2013-03-22 16:38 ` [U-Boot] [PATCH 03/10] powerpc/85xx: add SerDes bank 4 lanes only if we have a bank 4 York Sun
@ 2013-03-22 16:38 ` York Sun
  2013-03-22 16:38 ` [U-Boot] [PATCH 05/10] powerpc/p1010rdb: add readme document for p1010rdb York Sun
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: York Sun @ 2013-03-22 16:38 UTC (permalink / raw)
  To: u-boot

From: Shengzhou Liu <Shengzhou.Liu@freescale.com>

Change flexcan compatible string from "fsl,flexcan-v1.0"
to "fsl,p1010-flexcan" to match the device tree.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
---
 board/freescale/p1010rdb/p1010rdb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/freescale/p1010rdb/p1010rdb.c b/board/freescale/p1010rdb/p1010rdb.c
index 11e2e8a..0c30d76 100644
--- a/board/freescale/p1010rdb/p1010rdb.c
+++ b/board/freescale/p1010rdb/p1010rdb.c
@@ -217,7 +217,7 @@ void fdt_del_flexcan(void *blob)
 	int nodeoff = 0;
 
 	while ((nodeoff = fdt_node_offset_by_compatible(blob, 0,
-				"fsl,flexcan-v1.0")) >= 0) {
+				"fsl,p1010-flexcan")) >= 0) {
 		fdt_del_node(blob, nodeoff);
 	}
 }
-- 
1.7.9.5

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

* [U-Boot] [PATCH 05/10] powerpc/p1010rdb: add readme document for p1010rdb
  2013-03-22 16:38 [U-Boot] Patch sets coming York Sun
                   ` (3 preceding siblings ...)
  2013-03-22 16:38 ` [U-Boot] [PATCH 04/10] powerpc/p1010rdb: Change flexcan compatible string York Sun
@ 2013-03-22 16:38 ` York Sun
  2013-03-22 16:38 ` [U-Boot] [PATCH 06/10] powerpc/mpc85xx: Extend workaround for erratum DDR_A003 to other SoCs York Sun
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: York Sun @ 2013-03-22 16:38 UTC (permalink / raw)
  To: u-boot

From: Shengzhou Liu <Shengzhou.Liu@freescale.com>

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
---
 doc/README.p1010rdb |  199 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 199 insertions(+)
 create mode 100644 doc/README.p1010rdb

diff --git a/doc/README.p1010rdb b/doc/README.p1010rdb
new file mode 100644
index 0000000..dee63d7
--- /dev/null
+++ b/doc/README.p1010rdb
@@ -0,0 +1,199 @@
+Overview
+=========
+The P1010RDB is a Freescale reference design board that hosts the P1010 SoC.
+
+The P1010 is a cost-effective, low-power, highly integrated host processor
+based on a Power Architecture e500v2 core (maximum core frequency 800/1000 MHz),
+that addresses the requirements of several routing, gateways, storage, consumer,
+and industrial applications. Applications of interest include the main CPUs and
+I/O processors in network attached storage (NAS), the voice over IP (VoIP)
+router/gateway, and wireless LAN (WLAN) and industrial controllers.
+
+The P1010RDB board features are as follows:
+Memory subsystem:
+	- 1Gbyte unbuffered DDR3 SDRAM discrete devices (32-bit bus)
+	- 32 Mbyte NOR flash single-chip memory
+	- 32 Mbyte NAND flash memory
+	- 256 Kbit M24256 I2C EEPROM
+	- 16 Mbyte SPI memory
+	- I2C Board EEPROM 128x8 bit memory
+	- SD/MMC connector to interface with the SD memory card
+Interfaces:
+	- PCIe:
+		- Lane0: x1 mini-PCIe slot
+		- Lane1: x1 PCIe standard slot
+	- SATA:
+		- 1 internal SATA connector to 2.5" 160G SATA2 HDD
+		- 1 eSATA connector to rear panel
+	- 10/100/1000 BaseT Ethernet ports:
+		- eTSEC1, RGMII: one 10/100/1000 port using Vitesse VSC8641XKO
+		- eTSEC2, SGMII: one 10/100/1000 port using Vitesse VSC8221
+		- eTSEC3, SGMII: one 10/100/1000 port using Vitesse VSC8221
+	- USB 2.0 port:
+		- x1 USB2.0 port: via an ULPI PHY to micro-AB connector
+		- x1 USB2.0 poort via an internal PHY to micro-AB connector
+	- FlexCAN ports:
+		- x2 DB-9 female connectors for FlexCAN bus(revision 2.0B)
+		   interface;
+	- DUART interface:
+		- DUART interface: supports two UARTs up to 115200 bps for
+		  console display
+		- J45 connectors are used for these 2 UART ports.
+	- TDM
+		- 2 FXS ports connected via an external SLIC to the TDM
+		   interface. SLIC is controllled via SPI.
+		- 1 FXO port connected via a relay to FXS for switchover to
+		   POTS
+Board connectors:
+	- Mini-ITX power supply connector
+	- JTAG/COP for debugging
+IEEE Std. 1588 signals for test and measurement
+Real-time clock on I2C bus
+POR
+	- support critical POR setting changed via switch on board
+PCB
+	- 6-layer routing (4-layer signals, 2-layer power and ground)
+
+
+Serial Port Configuration on P1010RDB
+=====================================
+Configure the serial port of the attached computer with the following values:
+	-Data rate: 115200 bps
+	-Number of data bits: 8
+	-Parity: None
+	-Number of Stop bits: 1
+	-Flow Control: Hardware/None
+
+
+Settings of DIP-switch
+======================
+  SW4[1:4]= 1111 and SW6[4]=0 for boot from 16bit NOR flash
+  SW4[1:4]= 1000 and SW6[4]=1 for boot from 8bit NAND flash
+  SW4[1:4]= 0110 and SW6[4]=0 for boot from SPI flash
+Note: 1 stands for 'on', 0 stands for 'off'
+
+
+Setting of hwconfig
+===================
+If FlexCAN or TDM is needed, please set "fsl_p1010mux:tdm_can=can" or
+"fsl_p1010mux:tdm_can=tdm" explicitly in u-booot prompt as below for example:
+setenv hwconfig "fsl_p1010mux:tdm_can=tdm;usb1:dr_mode=host,phy_type=utmi"
+By default, don't set fsl_p1010mux:tdm_can, in this case, spi chip selection
+is set to spi-flash instead of to SLIC/TDM/DAC and tdm_can_sel is set to TDM
+instead of to CAN/UART1.
+
+
+Build and burn u-boot to NOR flash
+==================================
+1. Build u-boot.bin image
+	export ARCH=powerpc
+	export CROSS_COMPILE=/your_path/powerpc-linux-gnu-
+	make P1010RDB_NOR
+
+2. Burn u-boot.bin into NOR flash
+	=> tftp $loadaddr $uboot
+	=> protect off eff80000 +$filesize
+	=> erase eff80000 +$filesize
+	=> cp.b $loadaddr eff80000 $filesize
+
+3. Check SW4[1:4]= 1111 and SW6[4]=0, then power on.
+
+
+Alternate NOR bank
+============================
+1. Burn u-boot.bin into alternate NOR bank
+	=> tftp $loadaddr $uboot
+	=> protect off eef80000 +$filesize
+	=> erase eef80000 +$filesize
+	=> cp.b $loadaddr eef80000 $filesize
+
+2. Switch to alternate NOR bank
+	=> mw.b ffb00009 1
+	=> reset
+	or set SW1[8]= ON
+
+SW1[8]= OFF: Upper bank used for booting start
+SW1[8]= ON:  Lower bank used for booting start
+CPLD NOR bank selection register address 0xFFB00009 Bit[0]:
+0 - boot from upper 4 sectors
+1 - boot from lower 4 sectors
+
+
+Build and burn u-boot to NAND flash
+===================================
+1. Build u-boot.bin image
+	export ARCH=powerpc
+	export CROSS_COMPILE=/your_path/powerpc-linux-gnu-
+	make P1010RDB_NAND
+
+2. Burn u-boot-nand.bin into NAND flash
+	=> tftp $loadaddr $uboot-nand
+	=> nand erase 0 $filesize
+	=> nand write $loadaddr 0 $filesize
+
+3. Check SW4[1:4]= 1000 and SW6[4]=1, then power on.
+
+
+
+Build and burn u-boot to SPI flash
+==================================
+1. Build u-boot-spi.bin image
+	make P1010RDB_SPIFLASH_config; make
+	Boot up kernel with rootfs.ext2.gz.uboot.p1010rdb
+	Download u-boot.bin to linux and you can find some config files
+	under /usr/share such as config_xx.dat. Do below command:
+	boot_format config_ddr3_1gb_p1010rdb_800M.dat u-boot.bin -spi \
+			u-boot-spi.bin
+	to generate u-boot-spi.bin.
+
+2. Burn u-boot-spi.bin into SPI flash
+	=> tftp $loadaddr $uboot-spi
+	=> sf erase 0 100000
+	=> sf write $loadaddr 0 $filesize
+
+3. Check SW4[1:4]= 0110 and SW6[4]=0, then power on.
+
+
+
+CPLD POR setting registers
+==========================
+1. Set POR switch selection register (addr 0xFFB00011) to 0.
+2. Write CPLD POR registers (BCSR0~BCSR3, addr 0xFFB00014~0xFFB00017) with
+   proper values.
+   If change boot ROM location to NOR or NAND flash, need write the IFC_CS0
+   switch command by I2C.
+3. Send reset command.
+   After reset, the new POR setting will be implemented.
+
+Two examples are given in below:
+Switch from NOR to NAND boot with default frequency:
+	=> i2c dev 0
+	=> i2c mw 18 1 f9
+	=> i2c mw 18 3 f0
+	=> mw.b ffb00011 0
+	=> mw.b ffb00017 1
+	=> reset
+Switch from NAND to NOR boot with Core/CCB/DDR (800/400/667 MHz):
+	=> i2c dev 0
+	=> i2c mw 18 1 f1
+	=> i2c mw 18 3 f0
+	=> mw.b ffb00011 0
+	=> mw.b ffb00014 2
+	=> mw.b ffb00015 5
+	=> mw.b ffb00016 3
+	=> mw.b ffb00017 f
+	=> reset
+
+
+
+Boot Linux from network using TFTP on P1010RDB
+==============================================
+Place uImage, p1010rdb.dtb and rootfs files in the TFTP disk area.
+	=> tftp 1000000 uImage
+	=> tftp 2000000 p1010rdb.dtb
+	=> tftp 3000000 rootfs.ext2.gz.uboot.p1010rdb
+	=> bootm 1000000 3000000 2000000
+
+
+Please contact your local field applications engineer or sales representative
+to obtain related documents, such as P1010-RDB User Guide for details.
-- 
1.7.9.5

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

* [U-Boot] [PATCH 06/10] powerpc/mpc85xx: Extend workaround for erratum DDR_A003 to other SoCs
  2013-03-22 16:38 [U-Boot] Patch sets coming York Sun
                   ` (4 preceding siblings ...)
  2013-03-22 16:38 ` [U-Boot] [PATCH 05/10] powerpc/p1010rdb: add readme document for p1010rdb York Sun
@ 2013-03-22 16:38 ` York Sun
  2013-03-22 16:38 ` [U-Boot] [PATCH 07/10] Changed LIODN offset values York Sun
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: York Sun @ 2013-03-22 16:38 UTC (permalink / raw)
  To: u-boot

Erratum DDR_A003 applies to P5020, P3041, P4080, P3060, P2041, P5040.

Signed-off-by: York Sun <yorksun@freescale.com>
---
 arch/powerpc/include/asm/config_mpc85xx.h |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/powerpc/include/asm/config_mpc85xx.h b/arch/powerpc/include/asm/config_mpc85xx.h
index d57c178..352e303 100644
--- a/arch/powerpc/include/asm/config_mpc85xx.h
+++ b/arch/powerpc/include/asm/config_mpc85xx.h
@@ -334,6 +334,7 @@
 #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
 #define CONFIG_SYS_FSL_ERRATUM_NMG_CPU_A011
 #define CONFIG_SYS_FSL_ERRATUM_CPU_A003999
+#define CONFIG_SYS_FSL_ERRATUM_DDR_A003
 #define CONFIG_SYS_FSL_ERRATUM_DDR_A003474
 #define CONFIG_SYS_FSL_SRIO_PCIE_BOOT_MASTER
 #define CONFIG_SYS_FSL_SRIO_MAX_PORTS	2
@@ -366,6 +367,7 @@
 #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
 #define CONFIG_SYS_FSL_ERRATUM_NMG_CPU_A011
 #define CONFIG_SYS_FSL_ERRATUM_CPU_A003999
+#define CONFIG_SYS_FSL_ERRATUM_DDR_A003
 #define CONFIG_SYS_FSL_ERRATUM_DDR_A003474
 #define CONFIG_SYS_FSL_SRIO_PCIE_BOOT_MASTER
 #define CONFIG_SYS_FSL_SRIO_MAX_PORTS	2
@@ -442,6 +444,7 @@
 #define CONFIG_SYS_FSL_USB2_PHY_ENABLE
 #define CONFIG_SYS_FSL_USB_INTERNAL_UTMI_PHY
 #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
+#define CONFIG_SYS_FSL_ERRATUM_DDR_A003
 #define CONFIG_SYS_FSL_ERRATUM_DDR_A003474
 #define CONFIG_SYS_FSL_SRIO_PCIE_BOOT_MASTER
 #define CONFIG_SYS_FSL_SRIO_MAX_PORTS	2
-- 
1.7.9.5

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

* [U-Boot] [PATCH 07/10] Changed LIODN offset values
  2013-03-22 16:38 [U-Boot] Patch sets coming York Sun
                   ` (5 preceding siblings ...)
  2013-03-22 16:38 ` [U-Boot] [PATCH 06/10] powerpc/mpc85xx: Extend workaround for erratum DDR_A003 to other SoCs York Sun
@ 2013-03-22 16:38 ` York Sun
  2013-03-22 16:38 ` [U-Boot] [PATCH 08/10] powerpc/p1_p2_rdb_pc: Add a pin to reset the DDR chip for P1021RDB-PC York Sun
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: York Sun @ 2013-03-22 16:38 UTC (permalink / raw)
  To: u-boot

From: Cristian Sovaiala <cristian.sovaiala@freescale.com>

Extending LIODN offset range from 1-5 to 1-10
While using a qman portal with a higher index the LIODN offset
is incorrectly set, thus extending the range of offsets covers
all 10 qman portals

Signed-off-by: Cristian Sovaiala <cristian.sovaiala@freescale.com>
Acked-by: Haiying Wang <Haiying.Wang@freescale.com>
---
 arch/powerpc/cpu/mpc85xx/p2041_ids.c |   20 ++++++++++----------
 arch/powerpc/cpu/mpc85xx/p3041_ids.c |   20 ++++++++++----------
 arch/powerpc/cpu/mpc85xx/p5020_ids.c |   20 ++++++++++----------
 3 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/p2041_ids.c b/arch/powerpc/cpu/mpc85xx/p2041_ids.c
index 91d9cac..ef685fe 100644
--- a/arch/powerpc/cpu/mpc85xx/p2041_ids.c
+++ b/arch/powerpc/cpu/mpc85xx/p2041_ids.c
@@ -27,16 +27,16 @@
 #ifdef CONFIG_SYS_DPAA_QBMAN
 struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = {
 	/* dqrr liodn, frame data liodn, liodn off, sdest */
-	SET_QP_INFO(1, 2, 1, 0),
-	SET_QP_INFO(3, 4, 2, 1),
-	SET_QP_INFO(5, 6, 3, 2),
-	SET_QP_INFO(7, 8, 4, 3),
-	SET_QP_INFO(9, 10, 5, 0),
-	SET_QP_INFO(11, 12, 1, 1),
-	SET_QP_INFO(13, 14, 2, 2),
-	SET_QP_INFO(15, 16, 3, 3),
-	SET_QP_INFO(17, 18, 4, 0), /* for now sdest to 0 */
-	SET_QP_INFO(19, 20, 5, 0), /* for now sdest to 0 */
+	SET_QP_INFO(1,  2,  1, 0),
+	SET_QP_INFO(3,  4,  2, 1),
+	SET_QP_INFO(5,  6,  3, 2),
+	SET_QP_INFO(7,  8,  4, 3),
+	SET_QP_INFO(9, 10,  5, 0),
+	SET_QP_INFO(11, 12,  6, 1),
+	SET_QP_INFO(13, 14,  7, 2),
+	SET_QP_INFO(15, 16,  8, 3),
+	SET_QP_INFO(17, 18,  9, 0), /* for now sdest to 0 */
+	SET_QP_INFO(19, 20, 10, 0), /* for now sdest to 0 */
 };
 #endif
 
diff --git a/arch/powerpc/cpu/mpc85xx/p3041_ids.c b/arch/powerpc/cpu/mpc85xx/p3041_ids.c
index e46a714..cab03f8 100644
--- a/arch/powerpc/cpu/mpc85xx/p3041_ids.c
+++ b/arch/powerpc/cpu/mpc85xx/p3041_ids.c
@@ -27,16 +27,16 @@
 #ifdef CONFIG_SYS_DPAA_QBMAN
 struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = {
 	/* dqrr liodn, frame data liodn, liodn off, sdest */
-	SET_QP_INFO(1, 2, 1, 0),
-	SET_QP_INFO(3, 4, 2, 1),
-	SET_QP_INFO(5, 6, 3, 2),
-	SET_QP_INFO(7, 8, 4, 3),
-	SET_QP_INFO(9, 10, 5, 0),
-	SET_QP_INFO(11, 12, 1, 1),
-	SET_QP_INFO(13, 14, 2, 2),
-	SET_QP_INFO(15, 16, 3, 3),
-	SET_QP_INFO(17, 18, 4, 0), /* for now sdest to 0 */
-	SET_QP_INFO(19, 20, 5, 0), /* for now sdest to 0 */
+	SET_QP_INFO(1,  2,  1, 0),
+	SET_QP_INFO(3,  4,  2, 1),
+	SET_QP_INFO(5,  6,  3, 2),
+	SET_QP_INFO(7,  8,  4, 3),
+	SET_QP_INFO(9, 10,  5, 0),
+	SET_QP_INFO(1, 12,  6, 1),
+	SET_QP_INFO(13, 14,  7, 2),
+	SET_QP_INFO(15, 16,  8, 3),
+	SET_QP_INFO(17, 18,  9, 0), /* for now sdest to 0 */
+	SET_QP_INFO(19, 20, 10, 0), /* for now sdest to 0 */
 };
 #endif
 
diff --git a/arch/powerpc/cpu/mpc85xx/p5020_ids.c b/arch/powerpc/cpu/mpc85xx/p5020_ids.c
index e8c26bf..ca05b9c 100644
--- a/arch/powerpc/cpu/mpc85xx/p5020_ids.c
+++ b/arch/powerpc/cpu/mpc85xx/p5020_ids.c
@@ -27,16 +27,16 @@
 #ifdef CONFIG_SYS_DPAA_QBMAN
 struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = {
 	/* dqrr liodn, frame data liodn, liodn off, sdest */
-	SET_QP_INFO(1, 2, 1, 0),
-	SET_QP_INFO(3, 4, 2, 1),
-	SET_QP_INFO(5, 6, 3, 0),
-	SET_QP_INFO(7, 8, 4, 1),
-	SET_QP_INFO(9, 10, 5, 0),
-	SET_QP_INFO(11, 12, 1, 1),
-	SET_QP_INFO(13, 14, 2, 0),
-	SET_QP_INFO(15, 16, 3, 1),
-	SET_QP_INFO(17, 18, 4, 0),
-	SET_QP_INFO(19, 20, 5, 1),
+	SET_QP_INFO(1,  2,  1, 0),
+	SET_QP_INFO(3,  4,  2, 1),
+	SET_QP_INFO(5,  6,  3, 0),
+	SET_QP_INFO(7,  8,  4, 1),
+	SET_QP_INFO(9, 10,  5, 0),
+	SET_QP_INFO(11, 12,  6, 1),
+	SET_QP_INFO(13, 14,  7, 0),
+	SET_QP_INFO(15, 16,  8, 1),
+	SET_QP_INFO(17, 18,  9, 0),
+	SET_QP_INFO(19, 20, 10, 1),
 };
 #endif
 
-- 
1.7.9.5

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

* [U-Boot] [PATCH 08/10] powerpc/p1_p2_rdb_pc: Add a pin to reset the DDR chip for P1021RDB-PC
  2013-03-22 16:38 [U-Boot] Patch sets coming York Sun
                   ` (6 preceding siblings ...)
  2013-03-22 16:38 ` [U-Boot] [PATCH 07/10] Changed LIODN offset values York Sun
@ 2013-03-22 16:38 ` York Sun
  2013-03-22 16:38 ` [U-Boot] [PATCH 09/10] powerpc/corenet_ds: Move SRIO enablement into specific boards York Sun
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: York Sun @ 2013-03-22 16:38 UTC (permalink / raw)
  To: u-boot

From: Xu Jiucheng <B37781@freescale.com>

When P1021RDB-PC reboot system, the board will hung at uboot DDR
configuration. For P1021RDB-PC DDR reset pin is multiplex with
QE, so uboot will reserve this pin for QE and skip DDR reset.
Other platforms without QE will do this reset. This patch adds
a slight code to reset DDR chip by QE CE_PB8 pin for NAND and
NOR FLASH boot. For booting from SPI FALSH and SD card, it
seems possible to use the rom on chip to write to the GPIO
pins before configuring the DDR.

Signed-off-by: Xu Jiucheng <B37781@freescale.com>
Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
---
 board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c |   19 ++++++++++++++++++-
 board/freescale/p1_p2_rdb_pc/spl_minimal.c  |   15 +++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
index cc7f866..08b095e 100644
--- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
+++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
@@ -55,6 +55,13 @@
 #define GPIO_SLIC_PIN		30
 #define GPIO_SLIC_DATA		(1 << (31 - GPIO_SLIC_PIN))
 
+#if defined(CONFIG_P1021RDB) && !defined(CONFIG_SYS_RAMBOOT)
+#define GPIO_DDR_RST_PORT	1
+#define GPIO_DDR_RST_PIN	8
+#define GPIO_DDR_RST_DATA	(1 << (31 - GPIO_DDR_RST_PIN))
+
+#define GPIO_2BIT_MASK		(0x3 << (32 - (GPIO_DDR_RST_PIN + 1) * 2))
+#endif
 
 #if defined(CONFIG_P1025RDB) || defined(CONFIG_P1021RDB)
 #define PCA_IOPORT_I2C_ADDR		0x23
@@ -67,7 +74,7 @@
 const qe_iop_conf_t qe_iop_conf_tab[] = {
 	/* GPIO */
 	{1,   1, 2, 0, 0}, /* GPIO7/PB1   - LOAD_DEFAULT_N */
-#if 0
+#if defined(CONFIG_P1021RDB) && !defined(CONFIG_SYS_RAMBOOT)
 	{1,   8, 1, 1, 0}, /* GPIO10/PB8  - DDR_RST */
 #endif
 	{0,  15, 1, 0, 0}, /* GPIO11/A15  - WDI */
@@ -159,6 +166,16 @@ void board_gpio_init(void)
 	ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
 	par_io_t *par_io = (par_io_t *) &(gur->qe_par_io);
 
+#if defined(CONFIG_P1021RDB) && !defined(CONFIG_SYS_RAMBOOT)
+	/* reset DDR3 */
+	setbits_be32(&par_io[GPIO_DDR_RST_PORT].cpdat, GPIO_DDR_RST_DATA);
+	udelay(1000);
+	clrbits_be32(&par_io[GPIO_DDR_RST_PORT].cpdat, GPIO_DDR_RST_DATA);
+	udelay(1000);
+	setbits_be32(&par_io[GPIO_DDR_RST_PORT].cpdat, GPIO_DDR_RST_DATA);
+	/* disable CE_PB8 */
+	clrbits_be32(&par_io[GPIO_DDR_RST_PORT].cpdir1, GPIO_2BIT_MASK);
+#endif
 	/* Enable VSC7385 switch */
 	setbits_be32(&par_io[GPIO_GETH_SW_PORT].cpdat, GPIO_GETH_SW_DATA);
 
diff --git a/board/freescale/p1_p2_rdb_pc/spl_minimal.c b/board/freescale/p1_p2_rdb_pc/spl_minimal.c
index 09019e9..0f6f81a 100644
--- a/board/freescale/p1_p2_rdb_pc/spl_minimal.c
+++ b/board/freescale/p1_p2_rdb_pc/spl_minimal.c
@@ -81,6 +81,8 @@ void board_init_f(ulong bootflag)
 	ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
 #ifndef CONFIG_QE
 	ccsr_gpio_t *pgpio = (void *)(CONFIG_SYS_MPC85xx_GPIO_ADDR);
+#elif defined(CONFIG_P1021RDB)
+	par_io_t *par_io = (par_io_t *) &(gur->qe_par_io);
 #endif
 
 	/* initialize selected port with appropriate baud rate */
@@ -102,6 +104,19 @@ void board_init_f(ulong bootflag)
 	__raw_writel(0x00200000, &pgpio->gpdat);
 	udelay(1000);
 	__raw_writel(0x00000000, &pgpio->gpdir);
+#elif defined(CONFIG_P1021RDB)
+	/* init DDR3 reset signal CE_PB8 */
+	out_be32(&par_io[1].cpdir1, 0x00004000);
+	out_be32(&par_io[1].cpodr, 0x00800000);
+	out_be32(&par_io[1].cppar1, 0x00000000);
+	/* reset DDR3 */
+	out_be32(&par_io[1].cpdat, 0x00800000);
+	udelay(1000);
+	out_be32(&par_io[1].cpdat, 0x00000000);
+	udelay(1000);
+	out_be32(&par_io[1].cpdat, 0x00800000);
+	/* disable the CE_PB8 */
+	out_be32(&par_io[1].cpdir1, 0x00000000);
 #endif
 
 #ifndef CONFIG_SYS_INIT_L2_ADDR
-- 
1.7.9.5

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

* [U-Boot] [PATCH 09/10] powerpc/corenet_ds: Move SRIO enablement into specific boards
  2013-03-22 16:38 [U-Boot] Patch sets coming York Sun
                   ` (7 preceding siblings ...)
  2013-03-22 16:38 ` [U-Boot] [PATCH 08/10] powerpc/p1_p2_rdb_pc: Add a pin to reset the DDR chip for P1021RDB-PC York Sun
@ 2013-03-22 16:38 ` York Sun
  2013-03-22 16:38 ` [U-Boot] [PATCH 10/10] powerpc/85xx: set USB2 default mode to 'device' for (super)hydra boards York Sun
  2013-03-22 20:45 ` [U-Boot] Patch sets coming Wolfgang Denk
  10 siblings, 0 replies; 20+ messages in thread
From: York Sun @ 2013-03-22 16:38 UTC (permalink / raw)
  To: u-boot

From: Kumar Gala <galak@kernel.crashing.org>

SRIO doesn't exist on the P5040DS board and we'll reuse the common
corenet_ds.h for it.  So move the SRIO defines into the board specific
headers.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 include/configs/P3041DS.h |    3 +++
 include/configs/P4080DS.h |    3 +++
 include/configs/P5020DS.h |    3 +++
 3 files changed, 9 insertions(+)

diff --git a/include/configs/P3041DS.h b/include/configs/P3041DS.h
index ce8f9b0..a0a4a3c 100644
--- a/include/configs/P3041DS.h
+++ b/include/configs/P3041DS.h
@@ -35,6 +35,9 @@
 #define CONFIG_FSL_SATA_V2
 #define CONFIG_PCIE3
 #define CONFIG_PCIE4
+#define CONFIG_SYS_SRIO
+#define CONFIG_SRIO1			/* SRIO port 1 */
+#define CONFIG_SRIO2			/* SRIO port 2 */
 #define CONFIG_SYS_DPAA_RMAN
 
 #define CONFIG_SYS_SRIO
diff --git a/include/configs/P4080DS.h b/include/configs/P4080DS.h
index 53979dd..257258b 100644
--- a/include/configs/P4080DS.h
+++ b/include/configs/P4080DS.h
@@ -32,6 +32,9 @@
 
 #define CONFIG_MMC
 #define CONFIG_PCIE3
+#define CONFIG_SYS_SRIO
+#define CONFIG_SRIO1			/* SRIO port 1 */
+#define CONFIG_SRIO2			/* SRIO port 2 */
 
 #define CONFIG_SYS_SRIO
 #define CONFIG_SRIO1			/* SRIO port 1 */
diff --git a/include/configs/P5020DS.h b/include/configs/P5020DS.h
index 778230d..a32b610 100644
--- a/include/configs/P5020DS.h
+++ b/include/configs/P5020DS.h
@@ -35,6 +35,9 @@
 #define CONFIG_FSL_SATA_V2
 #define CONFIG_PCIE3
 #define CONFIG_PCIE4
+#define CONFIG_SYS_SRIO
+#define CONFIG_SRIO1			/* SRIO port 1 */
+#define CONFIG_SRIO2			/* SRIO port 2 */
 #define CONFIG_SYS_FSL_RAID_ENGINE
 #define CONFIG_SYS_DPAA_RMAN
 
-- 
1.7.9.5

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

* [U-Boot] [PATCH 10/10] powerpc/85xx: set USB2 default mode to 'device' for (super)hydra boards
  2013-03-22 16:38 [U-Boot] Patch sets coming York Sun
                   ` (8 preceding siblings ...)
  2013-03-22 16:38 ` [U-Boot] [PATCH 09/10] powerpc/corenet_ds: Move SRIO enablement into specific boards York Sun
@ 2013-03-22 16:38 ` York Sun
  2013-03-22 20:45 ` [U-Boot] Patch sets coming Wolfgang Denk
  10 siblings, 0 replies; 20+ messages in thread
From: York Sun @ 2013-03-22 16:38 UTC (permalink / raw)
  To: u-boot

From: Shaohui Xie <Shaohui.Xie@freescale.com>

The Hydra and Superhydra (P3041DS, P5020DS, and P5040DS) boards have a
second USB port that can be configured in either host, peripheral (aka
device), or OTG (on-the-go) mode.  When configured in host mode, if
the port is connected to another USB host, damage to the board can
occur.

To avoid this, we change the default setting to peripheral mode.  Ideally,
we'd set it to OTG mode, but currently there is no OTG support for
these boards.

Setting the hwconfig variable will also update the device tree, and so
Linux will configure the port for peripheral mode as well.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Timur Tabi
---
 include/configs/corenet_ds.h |    1 +
 1 file changed, 1 insertion(+)

diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index 3f42cd9..5cc9b5a 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -714,6 +714,7 @@
 #define	CONFIG_EXTRA_ENV_SETTINGS				\
 	"hwconfig=fsl_ddr:ctlr_intlv=cacheline,"		\
 	"bank_intlv=cs0_cs1;"					\
+	"usb2:dr_mode=peripheral,phy_type=" __stringify(__USB_PHY_TYPE) ";"\
 	"usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0"\
 	"netdev=eth0\0"						\
 	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"		\
-- 
1.7.9.5

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

* [U-Boot] Patch sets coming
  2013-03-22 16:38 [U-Boot] Patch sets coming York Sun
                   ` (9 preceding siblings ...)
  2013-03-22 16:38 ` [U-Boot] [PATCH 10/10] powerpc/85xx: set USB2 default mode to 'device' for (super)hydra boards York Sun
@ 2013-03-22 20:45 ` Wolfgang Denk
  2013-03-22 21:05   ` York Sun
  10 siblings, 1 reply; 20+ messages in thread
From: Wolfgang Denk @ 2013-03-22 20:45 UTC (permalink / raw)
  To: u-boot

Dear York Sun,

In message <1363970293-21228-1-git-send-email-yorksun@freescale.com> you wrote:
> 
> Andy,
> 
> I am sending out several sets of backlog patches. Some of them may have been
> sent before. To make them easier to apply, here they come in sets.
> 
> In case my git send-email fails to add the author(s) to the CC list, please add
> them when you reply (it happened before).

It would be _really_ nice if you could get used to running your
patches through checkpatch _before_ posting these.

I see again a number of checkpatch issues, like:

WARNING: quoted string split across lines
#149: FILE: board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c:456:
+                       printf("WARNING: could not find compatible node"
+                               " %s: %s.\n", soc_elbc_compat,

CHECK: Alignment should match open parenthesis
#156: FILE: board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c:463:
+                       printf("WARNING: could not remove %s: %s.\n",
+                               soc_elbc_compat, fdt_strerror(err));

WARNING: quoted string split across lines
#167: FILE: board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c:474:
+               printf("WARNING: could not find compatible node"
+                       "%s: %s.\n", soc_usb_compat,

WARNING: quoted string split across lines
#175: FILE: board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c:482:
+               printf("WARNING: could not find compatible node"
+                       " %s: %s.\n", soc_usb_compat,

CHECK: Alignment should match open parenthesis
#182: FILE: board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c:489:
+               printf("WARNING: could not remove %s: %s.\n",
+                       soc_usb_compat, fdt_strerror(err));

ERROR: Unrecognized email address: 'Timur Tabi'
#116: 
Signed-off-by: Timur Tabi

CHECK: No space is necessary after a cast
#178: FILE: board/freescale/p1_p2_rdb_pc/spl_minimal.c:85:
+#elif defined(CONFIG_P1021RDB)
+       par_io_t *par_io = (par_io_t *) &(gur->qe_par_io);
ERROR: Unrecognized email address: 'Timur Tabi'
#122: 
Signed-off-by: Timur Tabi


Can you please fix these?

Thanks.

NAK for the series unless these issues are fixed.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I don't know if it's what you want, but it's what you get.  :-)
                      - Larry Wall in <10502@jpl-devvax.JPL.NASA.GOV>

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

* [U-Boot] Patch sets coming
  2013-03-22 20:45 ` [U-Boot] Patch sets coming Wolfgang Denk
@ 2013-03-22 21:05   ` York Sun
  2013-03-22 21:17     ` Wolfgang Denk
  0 siblings, 1 reply; 20+ messages in thread
From: York Sun @ 2013-03-22 21:05 UTC (permalink / raw)
  To: u-boot

On 03/22/2013 01:45 PM, Wolfgang Denk wrote:
> Dear York Sun,
> 
> In message <1363970293-21228-1-git-send-email-yorksun@freescale.com> you wrote:
>>
>> Andy,
>>
>> I am sending out several sets of backlog patches. Some of them may have been
>> sent before. To make them easier to apply, here they come in sets.
>>
>> In case my git send-email fails to add the author(s) to the CC list, please add
>> them when you reply (it happened before).
> 
> It would be _really_ nice if you could get used to running your
> patches through checkpatch _before_ posting these.
> 
> I see again a number of checkpatch issues, like:
> 
> WARNING: quoted string split across lines
> #149: FILE: board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c:456:
> +                       printf("WARNING: could not find compatible node"
> +                               " %s: %s.\n", soc_elbc_compat,
> 
> CHECK: Alignment should match open parenthesis
> #156: FILE: board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c:463:
> +                       printf("WARNING: could not remove %s: %s.\n",
> +                               soc_elbc_compat, fdt_strerror(err));
> 
> WARNING: quoted string split across lines
> #167: FILE: board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c:474:
> +               printf("WARNING: could not find compatible node"
> +                       "%s: %s.\n", soc_usb_compat,
> 
> WARNING: quoted string split across lines
> #175: FILE: board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c:482:
> +               printf("WARNING: could not find compatible node"
> +                       " %s: %s.\n", soc_usb_compat,
> 
> CHECK: Alignment should match open parenthesis
> #182: FILE: board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c:489:
> +               printf("WARNING: could not remove %s: %s.\n",
> +                       soc_usb_compat, fdt_strerror(err));
> 
> ERROR: Unrecognized email address: 'Timur Tabi'
> #116: 
> Signed-off-by: Timur Tabi
> 
> CHECK: No space is necessary after a cast
> #178: FILE: board/freescale/p1_p2_rdb_pc/spl_minimal.c:85:
> +#elif defined(CONFIG_P1021RDB)
> +       par_io_t *par_io = (par_io_t *) &(gur->qe_par_io);
> ERROR: Unrecognized email address: 'Timur Tabi'
> #122: 
> Signed-off-by: Timur Tabi
> 
> 
> Can you please fix these?
> 
Will fix. I often found unsure about some warnings, not knowing if
u-boot follow exactly the same standard. Beside, some old patches may
pass checkpatch then but fails today.

York

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

* [U-Boot] Patch sets coming
  2013-03-22 21:05   ` York Sun
@ 2013-03-22 21:17     ` Wolfgang Denk
  2013-03-22 21:25       ` Tom Rini
  0 siblings, 1 reply; 20+ messages in thread
From: Wolfgang Denk @ 2013-03-22 21:17 UTC (permalink / raw)
  To: u-boot

Dear York Sun,

In message <514CC7B1.2070706@freescale.com> you wrote:
>
> Will fix. I often found unsure about some warnings, not knowing if
> u-boot follow exactly the same standard. Beside, some old patches may
> pass checkpatch then but fails today.

Well, you are supposed to run checkpatch _today_, before posting, and
fix such issues.

There may be a few cases where you intentionally ignore such fixes
(like lines over 80 characters in tables of pin-muxc initializations,
where wrapping the code would make it even worse to read), but such
exceptions and your reasoning should be metioned in the comments.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
An Elephant is a mouse with an Operating System.              - Knuth

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

* [U-Boot] Patch sets coming
  2013-03-22 21:17     ` Wolfgang Denk
@ 2013-03-22 21:25       ` Tom Rini
  2013-03-22 21:33         ` York Sun
  2013-03-22 21:43         ` York Sun
  0 siblings, 2 replies; 20+ messages in thread
From: Tom Rini @ 2013-03-22 21:25 UTC (permalink / raw)
  To: u-boot

On Fri, Mar 22, 2013 at 10:17:03PM +0100, Wolfgang Denk wrote:
> Dear York Sun,
> 
> In message <514CC7B1.2070706@freescale.com> you wrote:
> >
> > Will fix. I often found unsure about some warnings, not knowing if
> > u-boot follow exactly the same standard. Beside, some old patches may
> > pass checkpatch then but fails today.
> 
> Well, you are supposed to run checkpatch _today_, before posting, and
> fix such issues.
> 
> There may be a few cases where you intentionally ignore such fixes
> (like lines over 80 characters in tables of pin-muxc initializations,
> where wrapping the code would make it even worse to read), but such
> exceptions and your reasoning should be metioned in the comments.

To be clear, I know of 2 cases checkpatch.pl gets wrong today and I have
patches for both to push to correct this:
http://patchwork.ozlabs.org/patch/228173/
http://patchwork.ozlabs.org/patch/227717/

Aside from that, it's once again checkpatch is correct unless obviously
wrong (first patch for example) and we should fix .checkpatch.conf so it
stops being wrong.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130322/e03a18fe/attachment.pgp>

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

* [U-Boot] Patch sets coming
  2013-03-22 21:25       ` Tom Rini
@ 2013-03-22 21:33         ` York Sun
  2013-03-22 21:43         ` York Sun
  1 sibling, 0 replies; 20+ messages in thread
From: York Sun @ 2013-03-22 21:33 UTC (permalink / raw)
  To: u-boot

On 03/22/2013 02:25 PM, Tom Rini wrote:
> On Fri, Mar 22, 2013 at 10:17:03PM +0100, Wolfgang Denk wrote:
>> Dear York Sun,
>>
>> In message <514CC7B1.2070706@freescale.com> you wrote:
>>>
>>> Will fix. I often found unsure about some warnings, not knowing if
>>> u-boot follow exactly the same standard. Beside, some old patches may
>>> pass checkpatch then but fails today.
>>
>> Well, you are supposed to run checkpatch _today_, before posting, and
>> fix such issues.
>>
>> There may be a few cases where you intentionally ignore such fixes
>> (like lines over 80 characters in tables of pin-muxc initializations,
>> where wrapping the code would make it even worse to read), but such
>> exceptions and your reasoning should be metioned in the comments.
> 
> To be clear, I know of 2 cases checkpatch.pl gets wrong today and I have
> patches for both to push to correct this:
> http://patchwork.ozlabs.org/patch/228173/
> http://patchwork.ozlabs.org/patch/227717/
> 
> Aside from that, it's once again checkpatch is correct unless obviously
> wrong (first patch for example) and we should fix .checkpatch.conf so it
> stops being wrong.
> 

Thanks, Tom. I was using checkpatch from linux. Will use
tools/checkpatch.pl from now on.

York

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

* [U-Boot] Patch sets coming
  2013-03-22 21:25       ` Tom Rini
  2013-03-22 21:33         ` York Sun
@ 2013-03-22 21:43         ` York Sun
  2013-03-22 22:45           ` Tom Rini
  1 sibling, 1 reply; 20+ messages in thread
From: York Sun @ 2013-03-22 21:43 UTC (permalink / raw)
  To: u-boot

On 03/22/2013 02:25 PM, Tom Rini wrote:
> On Fri, Mar 22, 2013 at 10:17:03PM +0100, Wolfgang Denk wrote:
>> Dear York Sun,
>>
>> In message <514CC7B1.2070706@freescale.com> you wrote:
>>>
>>> Will fix. I often found unsure about some warnings, not knowing if
>>> u-boot follow exactly the same standard. Beside, some old patches may
>>> pass checkpatch then but fails today.
>>
>> Well, you are supposed to run checkpatch _today_, before posting, and
>> fix such issues.
>>
>> There may be a few cases where you intentionally ignore such fixes
>> (like lines over 80 characters in tables of pin-muxc initializations,
>> where wrapping the code would make it even worse to read), but such
>> exceptions and your reasoning should be metioned in the comments.
> 
> To be clear, I know of 2 cases checkpatch.pl gets wrong today and I have
> patches for both to push to correct this:
> http://patchwork.ozlabs.org/patch/228173/
> http://patchwork.ozlabs.org/patch/227717/
> 
> Aside from that, it's once again checkpatch is correct unless obviously
> wrong (first patch for example) and we should fix .checkpatch.conf so it
> stops being wrong.
> 
How do I get rid of the "line over 80 characters" warning by fixing
"quoted string split across lines"?

checkpatch log shows

>     checkpatch: check for quoted strings broken across lines
>     
>     checkpatch already makes an exception to the 80-column rule for quoted
>     strings, and Documentation/CodingStyle recommends not splitting quoted
>     strings across lines, because it breaks the ability to grep for the
>     string.  Rather than just permitting this, actively warn about quoted
>     strings split across lines.

How do I activate the exception for quoted strings?

York

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

* [U-Boot] Patch sets coming
  2013-03-22 21:43         ` York Sun
@ 2013-03-22 22:45           ` Tom Rini
  2013-03-22 22:55             ` York Sun
  0 siblings, 1 reply; 20+ messages in thread
From: Tom Rini @ 2013-03-22 22:45 UTC (permalink / raw)
  To: u-boot

On Fri, Mar 22, 2013 at 02:43:28PM -0700, York Sun wrote:
> On 03/22/2013 02:25 PM, Tom Rini wrote:
> > On Fri, Mar 22, 2013 at 10:17:03PM +0100, Wolfgang Denk wrote:
> >> Dear York Sun,
> >>
> >> In message <514CC7B1.2070706@freescale.com> you wrote:
> >>>
> >>> Will fix. I often found unsure about some warnings, not knowing if
> >>> u-boot follow exactly the same standard. Beside, some old patches may
> >>> pass checkpatch then but fails today.
> >>
> >> Well, you are supposed to run checkpatch _today_, before posting, and
> >> fix such issues.
> >>
> >> There may be a few cases where you intentionally ignore such fixes
> >> (like lines over 80 characters in tables of pin-muxc initializations,
> >> where wrapping the code would make it even worse to read), but such
> >> exceptions and your reasoning should be metioned in the comments.
> > 
> > To be clear, I know of 2 cases checkpatch.pl gets wrong today and I have
> > patches for both to push to correct this:
> > http://patchwork.ozlabs.org/patch/228173/
> > http://patchwork.ozlabs.org/patch/227717/
> > 
> > Aside from that, it's once again checkpatch is correct unless obviously
> > wrong (first patch for example) and we should fix .checkpatch.conf so it
> > stops being wrong.
> > 
> How do I get rid of the "line over 80 characters" warning by fixing
> "quoted string split across lines"?
> 
> checkpatch log shows
> 
> >     checkpatch: check for quoted strings broken across lines
> >     
> >     checkpatch already makes an exception to the 80-column rule for quoted
> >     strings, and Documentation/CodingStyle recommends not splitting quoted
> >     strings across lines, because it breaks the ability to grep for the
> >     string.  Rather than just permitting this, actively warn about quoted
> >     strings split across lines.
> 
> How do I activate the exception for quoted strings?

Well, it has exceptions for print function within the kernel.  The
second patch I linked added an exception for 'debug' which the kernel
doesn't use (anymore).

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130322/2979821f/attachment.pgp>

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

* [U-Boot] Patch sets coming
  2013-03-22 22:45           ` Tom Rini
@ 2013-03-22 22:55             ` York Sun
  2013-03-23  1:09               ` Tom Rini
  0 siblings, 1 reply; 20+ messages in thread
From: York Sun @ 2013-03-22 22:55 UTC (permalink / raw)
  To: u-boot

On 03/22/2013 03:45 PM, Tom Rini wrote:
> On Fri, Mar 22, 2013 at 02:43:28PM -0700, York Sun wrote:
>> On 03/22/2013 02:25 PM, Tom Rini wrote:
>>> On Fri, Mar 22, 2013 at 10:17:03PM +0100, Wolfgang Denk wrote:
>>>> Dear York Sun,
>>>>
>>>> In message <514CC7B1.2070706@freescale.com> you wrote:
>>>>>
>>>>> Will fix. I often found unsure about some warnings, not knowing if
>>>>> u-boot follow exactly the same standard. Beside, some old patches may
>>>>> pass checkpatch then but fails today.
>>>>
>>>> Well, you are supposed to run checkpatch _today_, before posting, and
>>>> fix such issues.
>>>>
>>>> There may be a few cases where you intentionally ignore such fixes
>>>> (like lines over 80 characters in tables of pin-muxc initializations,
>>>> where wrapping the code would make it even worse to read), but such
>>>> exceptions and your reasoning should be metioned in the comments.
>>>
>>> To be clear, I know of 2 cases checkpatch.pl gets wrong today and I have
>>> patches for both to push to correct this:
>>> http://patchwork.ozlabs.org/patch/228173/
>>> http://patchwork.ozlabs.org/patch/227717/
>>>
>>> Aside from that, it's once again checkpatch is correct unless obviously
>>> wrong (first patch for example) and we should fix .checkpatch.conf so it
>>> stops being wrong.
>>>
>> How do I get rid of the "line over 80 characters" warning by fixing
>> "quoted string split across lines"?
>>
>> checkpatch log shows
>>
>>>     checkpatch: check for quoted strings broken across lines
>>>     
>>>     checkpatch already makes an exception to the 80-column rule for quoted
>>>     strings, and Documentation/CodingStyle recommends not splitting quoted
>>>     strings across lines, because it breaks the ability to grep for the
>>>     string.  Rather than just permitting this, actively warn about quoted
>>>     strings split across lines.
>>
>> How do I activate the exception for quoted strings?
> 
> Well, it has exceptions for print function within the kernel.  The
> second patch I linked added an exception for 'debug' which the kernel
> doesn't use (anymore).
> 

So instead of a printk, we need a print for u-boot. Is that going to happen?

York

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

* [U-Boot] Patch sets coming
  2013-03-22 22:55             ` York Sun
@ 2013-03-23  1:09               ` Tom Rini
  0 siblings, 0 replies; 20+ messages in thread
From: Tom Rini @ 2013-03-23  1:09 UTC (permalink / raw)
  To: u-boot

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/22/2013 06:55 PM, York Sun wrote:
> On 03/22/2013 03:45 PM, Tom Rini wrote:
>> On Fri, Mar 22, 2013 at 02:43:28PM -0700, York Sun wrote:
>>> On 03/22/2013 02:25 PM, Tom Rini wrote:
>>>> On Fri, Mar 22, 2013 at 10:17:03PM +0100, Wolfgang Denk
>>>> wrote:
>>>>> Dear York Sun,
>>>>> 
>>>>> In message <514CC7B1.2070706@freescale.com> you wrote:
>>>>>> 
>>>>>> Will fix. I often found unsure about some warnings, not
>>>>>> knowing if u-boot follow exactly the same standard.
>>>>>> Beside, some old patches may pass checkpatch then but
>>>>>> fails today.
>>>>> 
>>>>> Well, you are supposed to run checkpatch _today_, before
>>>>> posting, and fix such issues.
>>>>> 
>>>>> There may be a few cases where you intentionally ignore
>>>>> such fixes (like lines over 80 characters in tables of
>>>>> pin-muxc initializations, where wrapping the code would
>>>>> make it even worse to read), but such exceptions and your
>>>>> reasoning should be metioned in the comments.
>>>> 
>>>> To be clear, I know of 2 cases checkpatch.pl gets wrong today
>>>> and I have patches for both to push to correct this: 
>>>> http://patchwork.ozlabs.org/patch/228173/ 
>>>> http://patchwork.ozlabs.org/patch/227717/
>>>> 
>>>> Aside from that, it's once again checkpatch is correct unless
>>>> obviously wrong (first patch for example) and we should fix
>>>> .checkpatch.conf so it stops being wrong.
>>>> 
>>> How do I get rid of the "line over 80 characters" warning by
>>> fixing "quoted string split across lines"?
>>> 
>>> checkpatch log shows
>>> 
>>>> checkpatch: check for quoted strings broken across lines
>>>> 
>>>> checkpatch already makes an exception to the 80-column rule
>>>> for quoted strings, and Documentation/CodingStyle recommends
>>>> not splitting quoted strings across lines, because it breaks
>>>> the ability to grep for the string.  Rather than just
>>>> permitting this, actively warn about quoted strings split
>>>> across lines.
>>> 
>>> How do I activate the exception for quoted strings?
>> 
>> Well, it has exceptions for print function within the kernel.
>> The second patch I linked added an exception for 'debug' which
>> the kernel doesn't use (anymore).
>> 
> 
> So instead of a printk, we need a print for u-boot. Is that going
> to happen?

What line, exactly, is checkpatch.pl choking on in a patch when it
shouldn't?  Check out that second patch again, there's list of log
functions and everything should be caught correctly and not warned
about, but maybe something else is also missing.

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRTQC5AAoJENk4IS6UOR1WLfoQALDYiqBKDtYSI5bGGpyZ3KiE
Y2K6TCz+v4Vw/oGiUW68+QFrhd84aXgQNPJjl6vzwVwXANi/WoKohd7Y0pTSPwIN
EmDEB10i/ToPG9VUGQznEAx0mj2yidE5IfkTFXlQUZepZFrnG58HN7xUlS+qI0f+
+m76r7PhtJe79qrxlKU9f3Z4OyWY8N8cm07KJKMEZF2lk+TJh8OKrsYBCT4Rknz4
feLyHOhpFWPXVE9SddJx269Ztex7hkenqtTahdC5BhbiIkEzvoYDh0ytV/Q60SKe
sH1+WisYtjYcsPAL3rI0vqvb0Uk79vhELl++hpH9H89pxsgZOjHO2BTxt+7UQLQL
a5eLf1VLEXmDgCWL3fkFOH79ik2EdCCLzGqoYbHNgUWPkXSzsdMHuXRb2QWZkqHT
n3dWiuSz8LtcRsM3triNjXbuaNM4FkcZb6cJ4woA8iVg9wDHaPtmMF7W87gLTb33
/gJuSP5jHJb6rpYKklFI6O9HH77WuiRz9MtcX1rIeiLAz3mMdzzp+El1kEkl5kGl
t79cVQRekj6RBuVZNH/70pRHrg6njbIsUEViZpHb8ZBBBEslw2Vbk36vLMCdlR82
dAkQcKLSooipK1hewdfSZLeN8cULz8ruOe9U0+O19VynXXoEwYSqKzpqqZN34Lg3
UVKg07bv1HWXY8BfcUYW
=uIY6
-----END PGP SIGNATURE-----

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

end of thread, other threads:[~2013-03-23  1:09 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-22 16:38 [U-Boot] Patch sets coming York Sun
2013-03-22 16:38 ` [U-Boot] [PATCH 01/10] doc/ramboot.mpc85xx: Documented the RAMBOOT for MPC85xx York Sun
2013-03-22 16:38 ` [U-Boot] [PATCH 02/10] qoriq/p1_p2_rdb_pc: USB device-tree fixups for P1020 York Sun
2013-03-22 16:38 ` [U-Boot] [PATCH 03/10] powerpc/85xx: add SerDes bank 4 lanes only if we have a bank 4 York Sun
2013-03-22 16:38 ` [U-Boot] [PATCH 04/10] powerpc/p1010rdb: Change flexcan compatible string York Sun
2013-03-22 16:38 ` [U-Boot] [PATCH 05/10] powerpc/p1010rdb: add readme document for p1010rdb York Sun
2013-03-22 16:38 ` [U-Boot] [PATCH 06/10] powerpc/mpc85xx: Extend workaround for erratum DDR_A003 to other SoCs York Sun
2013-03-22 16:38 ` [U-Boot] [PATCH 07/10] Changed LIODN offset values York Sun
2013-03-22 16:38 ` [U-Boot] [PATCH 08/10] powerpc/p1_p2_rdb_pc: Add a pin to reset the DDR chip for P1021RDB-PC York Sun
2013-03-22 16:38 ` [U-Boot] [PATCH 09/10] powerpc/corenet_ds: Move SRIO enablement into specific boards York Sun
2013-03-22 16:38 ` [U-Boot] [PATCH 10/10] powerpc/85xx: set USB2 default mode to 'device' for (super)hydra boards York Sun
2013-03-22 20:45 ` [U-Boot] Patch sets coming Wolfgang Denk
2013-03-22 21:05   ` York Sun
2013-03-22 21:17     ` Wolfgang Denk
2013-03-22 21:25       ` Tom Rini
2013-03-22 21:33         ` York Sun
2013-03-22 21:43         ` York Sun
2013-03-22 22:45           ` Tom Rini
2013-03-22 22:55             ` York Sun
2013-03-23  1:09               ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox