Add basic clock and pinmux functions to the Tegra2
Subsystems (2)
v4 cover Add basic clock and pinmux functions to the Tegra2
This patch series adds basic clock and pinmux functions to the Tegra2, and modifies the ap20 and board code to use them.
Changes in v2:
- Removed use of bitfield access macros
- Now uses manual shifts and masks
Changes in v3:
- Removed bitfield shift/mask macros and write these out manually
- Rebased to take account to new MMC patches
- Remove future time function
- No microsecond timing changes as I am unsure of the state of this in U-Boot
Changes in v4:
- Rebase against U-Boot master
- Remove future time function from header also
Simon Glass (4):
Tegra2: Add microsecond timer function
Tegra2: Add more clock support
Tegra2: Add additional pin multiplexing features
Tegra2: Use clock and pinmux functions to simplify code
arch/arm/cpu/armv7/tegra2/Makefile | 2 +- arch/arm/cpu/armv7/tegra2/ap20.c | 91 +++------- arch/arm/cpu/armv7/tegra2/clock.c | 158 +++++++++++++++++ arch/arm/cpu/armv7/tegra2/pinmux.c | 53 ++++++ arch/arm/cpu/armv7/tegra2/timer.c | 18 ++- arch/arm/include/asm/arch-tegra2/clk_rst.h | 127 ++++++-------- arch/arm/include/asm/arch-tegra2/clock.h | 264 ++++++++++++++++++++++++++++ arch/arm/include/asm/arch-tegra2/pinmux.h | 161 ++++++++++++++++-- arch/arm/include/asm/arch-tegra2/timer.h | 31 ++++ board/nvidia/common/board.c | 117 ++++--------- 10 files changed, 781 insertions(+), 241 deletions(-) create mode 100644 arch/arm/cpu/armv7/tegra2/clock.c create mode 100644 arch/arm/cpu/armv7/tegra2/pinmux.c create mode 100644 arch/arm/include/asm/arch-tegra2/clock.h create mode 100644 arch/arm/include/asm/arch-tegra2/timer.h
Signature · 1 line
1.7.3.1
PATCH v4 1/4 Tegra2: Add microsecond timer function
These functions provide access to the high resolution microsecond timer and tidy up a global variable in the code.
---
Changes in v3:
- Remove future time function
- No microsecond timing changes as I am unsure of the state of this in U-Boot
Changes in v4:
- Remove future time function from header also
arch/arm/cpu/armv7/tegra2/timer.c | 18 +++++++++++----- arch/arm/include/asm/arch-tegra2/timer.h | 31 ++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 arch/arm/include/asm/arch-tegra2/timer.h
arch/arm/cpu/armv7/tegra2/timer.c +12 -6
@@ -38,13 +38,12 @@#include <common.h> #include <asm/io.h> #include <asm/arch/tegra2.h> +#include <asm/arch/timer.h> DECLARE_GLOBAL_DATA_PTR ; -struct timerus *timer_base = (struct timerus *)NV_PA_TMRUS_BASE ; -/* counter runs at 1MHz */ -#define TIMER_CLK (1000000) +#define TIMER_CLK 1000000#define TIMER_LOAD_VAL 0xffffffff/* timer without interrupts */
@@ -57,10 +56,10 @@ ulong get_timer(ulong base)void __udelay (unsigned long usec) {long tmo = usec * (TIMER_CLK /1000 ) /1000 ; -unsigned long now, last =readl (&timer_base->cntr_1us); +unsigned long now, last =timer_get_us ();while (tmo >0 ) { - now =readl (&timer_base->cntr_1us); + now =timer_get_us ();if (last > now)/* count up timer overflow */ tmo -=TIMER_LOAD_VAL - last + now;else
@@ -74,7 +73,7 @@ ulong get_timer_masked(void)ulong now;/* current tick value */ - now =readl (&timer_base->cntr_1us) / (TIMER_CLK /CONFIG_SYS_HZ ); + now =timer_get_us () / (TIMER_CLK /CONFIG_SYS_HZ );if (now >= gd->lastinc)/* normal mode (non roll) */ /* move stamp forward with absolute diff ticks */
@@ -103,3 +102,10 @@ ulong get_tbclk(void) {return CONFIG_SYS_HZ ; } + +unsigned long timer_get_us (void ) +{ +struct timerus *timer_base = (struct timerus *)NV_PA_TMRUS_BASE ; + +return readl (&timer_base->cntr_1us); +}
arch/arm/include/asm/arch-tegra2/timer.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* Copyright (c) 2011 The Chromium OS Authors. +* See file CREDITS for list of people who contributed to this +* project. +* +* 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. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +/* Tegra2 timer functions */ + +#ifndef _TEGRA2_TIMER_H +#define _TEGRA2_TIMER_H + +/* returns the current monotonic timer value in microseconds */ +unsigned long timer_get_us (void ); + +#endif +
Signature · 1 line
1.7.3.1
PATCH v4 2/4 Tegra2: Add more clock support
In reply to Simon GlassThis adds functions to enable/disable clocks and reset to on-chip peripherals.
---
Changes in v2:
- Removed use of bitfield access macros
arch/arm/cpu/armv7/tegra2/Makefile | 2 +- arch/arm/cpu/armv7/tegra2/ap20.c | 52 ++---- arch/arm/cpu/armv7/tegra2/clock.c | 158 +++++++++++++++++ arch/arm/include/asm/arch-tegra2/clk_rst.h | 112 +++++++----- arch/arm/include/asm/arch-tegra2/clock.h | 264 ++++++++++++++++++++++++++++ board/nvidia/common/board.c | 79 +++------ 6 files changed, 525 insertions(+), 142 deletions(-) create mode 100644 arch/arm/cpu/armv7/tegra2/clock.c create mode 100644 arch/arm/include/asm/arch-tegra2/clock.h
arch/arm/cpu/armv7/tegra2/Makefile +1 -1
@@ -28,7 +28,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).o SOBJS := lowlevel_init.o -COBJS := ap20.o board.o sys_info.o timer.o +COBJS := ap20.o board.o clock.o sys_info.o timer.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
arch/arm/cpu/armv7/tegra2/ap20.c +17 -35
124 lines not on this page · raw message
arch/arm/cpu/armv7/tegra2/clock.c new file +158 -0
158 lines not on this page · raw message
arch/arm/include/asm/arch-tegra2/clk_rst.h +63 -49
139 lines not on this page · raw message
arch/arm/include/asm/arch-tegra2/clock.h new file +264 -0
264 lines not on this page · raw message
board/nvidia/common/board.c +22 -57
136 lines not on this page · raw message
Signature · 1 line
1.7.3.1
PATCH v4 3/4 Tegra2: Add additional pin multiplexing features
In reply to Simon GlassThis adds an enum for each pin and some functions for changing the pin muxing setup.
---
Changes in v2:
- Removed use of bitfield access macros
arch/arm/cpu/armv7/tegra2/Makefile | 2 +- arch/arm/cpu/armv7/tegra2/pinmux.c | 53 ++++++++++ arch/arm/include/asm/arch-tegra2/pinmux.h | 161 ++++++++++++++++++++++++++--- board/nvidia/common/board.c | 30 ++---- 4 files changed, 211 insertions(+), 35 deletions(-) create mode 100644 arch/arm/cpu/armv7/tegra2/pinmux.c
arch/arm/cpu/armv7/tegra2/Makefile +1 -1
@@ -28,7 +28,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).o SOBJS := lowlevel_init.o -COBJS := ap20.o board.o clock.o sys_info.o timer.o +COBJS := ap20.o board.o clock.o pinmux.o sys_info.o timer.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
arch/arm/cpu/armv7/tegra2/pinmux.c new file +53 -0
53 lines not on this page · raw message
arch/arm/include/asm/arch-tegra2/pinmux.h +148 -13
178 lines not on this page · raw message
board/nvidia/common/board.c +9 -21
@@ -143,19 +143,15 @@ static void pin_mux_uart(void) reg &=0xFFF0FFFF ;/* IRRX_/IRTX_SEL [19:16] = 00 UARTA */ writel (reg, &pmt->pmt_ctl_c); - reg =readl (&pmt->pmt_tri_a); - reg &= ~Z_IRRX ;/* Z_IRRX = normal (0) */ - reg &= ~Z_IRTX ;/* Z_IRTX = normal (0) */ -writel (reg, &pmt->pmt_tri_a); +pinmux_tristate_disable (PIN_IRRX ); +pinmux_tristate_disable (PIN_IRTX );#endif /* CONFIG_TEGRA2_ENABLE_UARTA */ #if defined(CONFIG_TEGRA2_ENABLE_UARTD ) reg =readl (&pmt->pmt_ctl_b); reg &=0xFFFFFFF3 ;/* GMC_SEL [3:2] = 00, UARTD */ writel (reg, &pmt->pmt_ctl_b); - reg =readl (&pmt->pmt_tri_a); - reg &= ~Z_GMC ;/* Z_GMC = normal (0) */ -writel (reg, &pmt->pmt_tri_a); +pinmux_tristate_disable (PIN_GMC );#endif /* CONFIG_TEGRA2_ENABLE_UARTD */ }
@@ -222,13 +218,9 @@ static void pin_mux_mmc(void) reg |= (3 <<0 );/* GME_SEL [1:0] = 11 SDIO4 */ writel (reg, &pmt->pmt_ctl_d); - reg =readl (&pmt->pmt_tri_a); - reg &= ~Z_ATB ;/* Z_ATB = normal (0) */ - reg &= ~Z_GMA ;/* Z_GMA = normal (0) */ -writel (reg, &pmt->pmt_tri_a); - reg =readl (&pmt->pmt_tri_b); - reg &= ~Z_GME ;/* Z_GME = normal (0) */ -writel (reg, &pmt->pmt_tri_b); +pinmux_tristate_disable (PIN_ATB ); +pinmux_tristate_disable (PIN_GMA ); +pinmux_tristate_disable (PIN_GME );/* SDMMC3 */ /* SDIO3_CLK, SDIO3_CMD, SDIO3_DAT[3:0] */
@@ -239,13 +231,9 @@ static void pin_mux_mmc(void) reg |= (2 <<14 );/* SDD_SEL [15:14] = 01 SDIO3 */ writel (reg, &pmt->pmt_ctl_d); - reg =readl (&pmt->pmt_tri_b); - reg &= ~Z_SDC ;/* Z_SDC = normal (0) */ - reg &= ~Z_SDD ;/* Z_SDD = normal (0) */ -writel (reg, &pmt->pmt_tri_b); - reg =readl (&pmt->pmt_tri_d); - reg &= ~Z_SDB ;/* Z_SDB = normal (0) */ -writel (reg, &pmt->pmt_tri_d); +pinmux_tristate_disable (PIN_SDC ); +pinmux_tristate_disable (PIN_SDD ); +pinmux_tristate_disable (PIN_SDB ); }/*
Signature · 1 line
1.7.3.1
PATCH v4 4/4 Tegra2: Use clock and pinmux functions to simplify code
In reply to Simon Glass---
Changes in v2:
- Removed use of bitfield access macros
- Now uses manual shifts and masks
Changes in v3:
- Removed bitfield shift/mask macros and write these out manually
- Rebased to take account to new MMC patches
Changes in v4:
- Rebase against U-Boot master
arch/arm/cpu/armv7/tegra2/ap20.c | 47 ++++++++------------------- arch/arm/include/asm/arch-tegra2/clk_rst.h | 37 ---------------------- board/nvidia/common/board.c | 12 +++--- 3 files changed, 20 insertions(+), 76 deletions(-)
arch/arm/cpu/armv7/tegra2/ap20.c +14 -33
@@ -40,23 +40,21 @@ void init_pllx(void)u32 reg;/* If PLLX is already enabled, just return */ - reg =readl (&pll->pll_base); -if (reg &PLL_ENABLE ) +if (readl (&pll->pll_base) &PLL_ENABLE_MASK )return ;/* Set PLLX_MISC */ - reg =CPCON ;/* CPCON[11:8] = 0001 */ -writel (reg, &pll->pll_misc); +writel (1 <<PLL_CPCON_SHIFT , &pll->pll_misc);/* Use 12MHz clock here */ - reg = (PLL_BYPASS |PLL_DIVM_VALUE ); - reg |= (1000 <<8 );/* DIVN = 0x3E8 */ + reg =PLL_BYPASS_MASK | (12 <<PLL_DIVM_SHIFT ); + reg |=1000 <<PLL_DIVN_SHIFT ;writel (reg, &pll->pll_base); - reg |=PLL_ENABLE ; + reg |=PLL_ENABLE_MASK ;writel (reg, &pll->pll_base); - reg &= ~PLL_BYPASS ; + reg &= ~PLL_BYPASS_MASK ;writel (reg, &pll->pll_base); }
@@ -90,16 +88,11 @@ static void enable_cpu_clock(int enable)* always stop the clock to CPU 1. */ clk =readl (&clkrst->crc_clk_cpu_cmplx); - clk |=CPU1_CLK_STP ; - -if (enable) { -/* Unstop the CPU clock */ - clk &= ~CPU0_CLK_STP ; - }else { -/* Stop the CPU clock */ - clk |=CPU0_CLK_STP ; - } + clk |=1 <<CPU1_CLK_STP_SHIFT ; +/* Stop/Unstop the CPU clock */ + clk &= ~CPU0_CLK_STP_MASK ; + clk |= !enable <<CPU0_CLK_STP_SHIFT ;writel (clk, &clkrst->crc_clk_cpu_cmplx);clock_enable (PERIPH_ID_CPU );
@@ -177,9 +170,6 @@ static void enable_cpu_power_rail(void)static void reset_A9_cpu (int reset) { -struct clk_rst_ctlr *clkrst = (struct clk_rst_ctlr *)NV_PA_CLK_RST_BASE ; -u32 cpu; -/* * NOTE: Regardless of whether the request is to hold the CPU in reset * or take it out of reset, every processor in the CPU complex
@@ -188,19 +178,10 @@ static void reset_A9_cpu(int reset)* are multiple processors in the CPU complex. */ -/* Hold CPU 1 in reset */ - cpu =SET_DBGRESET1 |SET_DERESET1 |SET_CPURESET1 ; -writel (cpu, &clkrst->crc_cpu_cmplx_set); - -if (reset) { -/* Now place CPU0 into reset */ - cpu |=SET_DBGRESET0 |SET_DERESET0 |SET_CPURESET0 ; -writel (cpu, &clkrst->crc_cpu_cmplx_set); - }else { -/* Take CPU0 out of reset */ - cpu =CLR_DBGRESET0 |CLR_DERESET0 |CLR_CPURESET0 ; -writel (cpu, &clkrst->crc_cpu_cmplx_clr); - } +/* Hold CPU 1 in reset, and CPU 0 if asked */ +reset_cmplx_set_enable (1 , crc_rst_cpu | crc_rst_de | crc_rst_debug,1 ); +reset_cmplx_set_enable (0 , crc_rst_cpu | crc_rst_de | crc_rst_debug, + reset);/* Enable/Disable master CPU reset */ reset_set_enable (PERIPH_ID_CPU , reset);
arch/arm/include/asm/arch-tegra2/clk_rst.h +0 -37
@@ -140,43 +140,6 @@ struct clk_rst_ctlr {uint crc_cpu_cmplx_clr;/* _CPU_CMPLX_CLR_0, 0x344 */ }; -#define PLL_BYPASS (1 << 31) -#define PLL_ENABLE (1 << 30) -#define PLL_BASE_OVRRIDE (1 << 28) -#define PLL_DIVP_VALUE (1 << 20)/* post divider, b22:20 */ -#define PLL_DIVM_VALUE 0x0C/* input divider, b4:0 */ - -#define SWR_UARTD_RST (1 << 1) -#define CLK_ENB_UARTD (1 << 1) -#define SWR_UARTA_RST (1 << 6) -#define CLK_ENB_UARTA (1 << 6) - -#define SWR_CPU_RST (1 << 0) -#define CLK_ENB_CPU (1 << 0) -#define SWR_CSITE_RST (1 << 9) -#define CLK_ENB_CSITE (1 << 9) - -#define SET_CPURESET0 (1 << 0) -#define SET_DERESET0 (1 << 4) -#define SET_DBGRESET0 (1 << 12) - -#define SET_CPURESET1 (1 << 1) -#define SET_DERESET1 (1 << 5) -#define SET_DBGRESET1 (1 << 13) - -#define CLR_CPURESET0 (1 << 0) -#define CLR_DERESET0 (1 << 4) -#define CLR_DBGRESET0 (1 << 12) - -#define CLR_CPURESET1 (1 << 1) -#define CLR_DERESET1 (1 << 5) -#define CLR_DBGRESET1 (1 << 13) - -#define CPU0_CLK_STP (1 << 8) -#define CPU1_CLK_STP (1 << 9) - -#define CPCON (1 << 8) -/* CLK_RST_CONTROLLER_CLK_CPU_CMPLX_0 */ #define CPU1_CLK_STP_SHIFT 9
board/nvidia/common/board.c +6 -6
@@ -81,20 +81,20 @@ static void clock_init_uart(void)u32 reg; reg =readl (&pll->pll_base); -if (!(reg &PLL_BASE_OVRRIDE )) { +if (!(reg &PLL_BASE_OVRRIDE_MASK )) {/* Override pllp setup for 216MHz operation. */ - reg = (PLL_BYPASS |PLL_BASE_OVRRIDE |PLL_DIVP_VALUE ); - reg |= (((NVRM_PLLP_FIXED_FREQ_KHZ /500 ) <<8 ) |PLL_DIVM_VALUE ); + reg =PLL_BYPASS_MASK |PLL_BASE_OVRRIDE_MASK | + (1 <<PLL_DIVP_SHIFT ) | (0xc <<PLL_DIVM_SHIFT ); + reg |= (NVRM_PLLP_FIXED_FREQ_KHZ /500 ) <<PLL_DIVN_SHIFT ;writel (reg, &pll->pll_base); - reg |=PLL_ENABLE ; + reg |=PLL_ENABLE_MASK ;writel (reg, &pll->pll_base); - reg &= ~PLL_BYPASS ; + reg &= ~PLL_BYPASS_MASK ;writel (reg, &pll->pll_base); } -/* Now do the UART reset/clock enable */ #if defined(CONFIG_TEGRA2_ENABLE_UARTA )/* Assert UART reset and enable clock */ reset_set_enable (PERIPH_ID_UART1 ,1 );
Signature · 1 line
1.7.3.1
v4 cover Add basic clock and pinmux functions to the Tegra2
In reply to Simon GlassLe 30/08/2011 18:23, Simon Glass a ?crit :
Quoted 17 lines
This patch series adds basic clock and pinmux functions to the Tegra2, and modifies the ap20 and board code to use them.
Changes in v2:
- Removed use of bitfield access macros
- Now uses manual shifts and masksChanges in v3:
- Removed bitfield shift/mask macros and write these out manually
- Rebased to take account to new MMC patches
- Remove future time function
- No microsecond timing changes as I am unsure of the state of this in U-BootChanges in v4:
- Rebase against U-Boot master
- Remove future time function from header also
Quoted 5 lines
Simon Glass (4):
Tegra2: Add microsecond timer function
Tegra2: Add more clock support
Tegra2: Add additional pin multiplexing features
Tegra2: Use clock and pinmux functions to simplify code
Patch series applied to u-boot-arm/master, with manual fix of three empty lines at EOF in patches 1 through 3.
These empty lines and other whitespace errors can be found and fixed by the submitter before sending the patch to the list: just apply the patches to a local branch created at the intended commit where application will happen, i.e.:
git fetch u-boot
or
git fetch u-boot-arm
(assuming you have a remote nicknamed u-boot[-arm])
git checkout u-boot/master -b temp
or
git checkout u-boot-arm/master -b temp git am 0001-xxxxx git am 0002-xxxxx
(etc)
If any empty line or bad whitespace warning occurs, go back to your working branch, fix and regenerate the patch set, then go back to temp and reset it:
git checkout temp git reset --hard u-boot/master
or
git reset u-boot-arm/master
Then you can run the
git am 0001-xxxxx ...
again.
When the patches are sent, you can go back to your working branch and then do a
git branch -D temp
to remove the temporary branch.
Amicalement,
Signature · 1 line
Albert.
v4 cover Add basic clock and pinmux functions to the Tegra2
Quoted 62 lines · Albert ARIBAUD
Le 30/08/2011 18:23, Simon Glass a ?crit :
Quoted 19 lines
This patch series adds basic clock and pinmux functions to the Tegra2, and modifies the ap20 and board code to use them.
Changes in v2:
- Removed use of bitfield access macros
- Now uses manual shifts and masksChanges in v3:
- Removed bitfield shift/mask macros and write these out manually
- Rebased to take account to new MMC patches
- Remove future time function
- No microsecond timing changes as I am unsure of the state of this in U-BootChanges in v4:
- Rebase against U-Boot master
- Remove future time function from header alsoQuoted 5 lines
Simon Glass (4):
? Tegra2: Add microsecond timer function
? Tegra2: Add more clock support
? Tegra2: Add additional pin multiplexing features ? Tegra2: Use clock and pinmux functions to simplify codePatch series applied to u-boot-arm/master, with manual fix of three empty lines at EOF in patches 1 through 3.
These empty lines and other whitespace errors can be found and fixed by the submitter before sending the patch to the list: just apply the patches to a local branch created at the intended commit where application will happen, i.e.:
? ? ? ?git fetch u-boot
or
? ? ? ?git fetch u-boot-arm(assuming you have a remote nicknamed u-boot[-arm])
? ? ? ?git checkout u-boot/master -b temp
or
? ? ? ?git checkout u-boot-arm/master -b temp? ? ? ?git am 0001-xxxxx
? ? ? ?git am 0002-xxxxx
(etc)If any empty line or bad whitespace warning occurs, go back to your working branch, fix and regenerate the patch set, then go back to temp and reset it:
? ? ? ?git checkout temp
? ? ? ?git reset --hard u-boot/master
or
? ? ? ?git reset u-boot-arm/masterThen you can run the
? ? ? ?git am 0001-xxxxx
? ? ? ?...
Quoted 8 lines
again.
When the patches are sent, you can go back to your working branch and then do a
? ? ? ?git branch -D temp
to remove the temporary branch.
OK thanks for the tips - will go back and take another look.
Regards,
Simon
Quoted 5 lines
Amicalement,
--
Albert.
v4 cover Add basic clock and pinmux functions to the Tegra2
In reply to Albert ARIBAUDQuoted 7 lines · On Tuesday, August 30, 2011 12:53:20 Albert ARIBAUD wrote:
Patch series applied to u-boot-arm/master, with manual fix of three empty lines at EOF in patches 1 through 3.
These empty lines and other whitespace errors can be found and fixed by the submitter before sending the patch to the list: just apply the patches to a local branch created at the intended commit where application will happen, i.e.:
checkpatch.pl should catch it too i would think
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110830/add981ed/attachment.pgp
v4 cover Add basic clock and pinmux functions to the Tegra2
Hi Mike,
Quoted 4 lines · Mike Frysinger
Quoted 3 lines · On Tuesday, August 30, 2011 12:53:20 Albert ARIBAUD wrote:
Patch series applied to u-boot-arm/master, with manual fix of three empty lines at EOF in patches 1 through 3.
Quoted 8 lines
Quoted 4 lines
These empty lines and other whitespace errors can be found and fixed by the submitter before sending the patch to the list: just apply the patches to a local branch created at the intended commit where application will happen, i.e.:
checkpatch.pl should catch it too i would think
-mike
-checkpatch.pl v0.31 and v0.32 do not detect this for me -git format-patch does not seem to have an option to report it -git am notices it, but as Albert notes, the procedure is torturous
For now I have added something to my script to find these errors in future, just by scanning the patches.
Regards,
Simon
v4 cover Add basic clock and pinmux functions to the Tegra2
Quoted 13 lines · On Wednesday, August 31, 2011 18:02:40 Simon Glass wrote:
Quoted 11 lines · Mike Frysinger
Quoted 8 lines · On Tuesday, August 30, 2011 12:53:20 Albert ARIBAUD wrote:
Patch series applied to u-boot-arm/master, with manual fix of three empty lines at EOF in patches 1 through 3.
These empty lines and other whitespace errors can be found and fixed by the submitter before sending the patch to the list: just apply the patches to a local branch created at the intended commit where
application will happen, i.e.:
checkpatch.pl should catch it too i would think
-mike
Review
Quoted 3 lines
(quoted diff) +0
-3-checkpatch.pl v0.31 and v0.32 do not detect this for me -git format-patch does not seem to have an option to report it -git am notices it, but as Albert notes, the procedure is torturous
if you turn on colorization, git diff should highlight it as well as git log -p. trailing new lines are a bit harder to catch than trailing spaces on lines ...
i'm surprised checkpatch didnt catch these ... i guess someone needs to fix that up :)
Quoted 2 lines
For now I have added something to my script to find these errors in future, just by scanning the patches.
yeah, i wrote my own little check-patches helper as another thing ive seen but checkpatch.pl doesnt catch is mixing of tabs and spaces.
grep -l '^[+].* \t' "$@"
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110831/0c20c46f/attachment.pgp