[U-Boot] [PATCH] ARM: arm720t: Add missing CONFIG_SKIP_LOWLEVEL_INIT guard for cpu_init_crit

2013-05-15 Thread Axel Lin
cpu_init_crit() can be skipped, but the code is still enabled requiring a platform to supply lowlevel_init(). Signed-off-by: Axel Lin axel@ingics.com --- arch/arm/cpu/arm720t/start.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/cpu/arm720t/start.S b/arch/arm/cpu/arm720t

Re: [U-Boot] [PATCH] ARM: arm720t: Add missing CONFIG_SKIP_LOWLEVEL_INIT guard for cpu_init_crit

2013-05-15 Thread Axel Lin
2013/5/15 Albert ARIBAUD albert.u.b...@aribaud.net: Hi Marek, On Wed, 15 May 2013 05:36:14 +0200, Marek Vasut ma...@denx.de wrote: Dear Axel Lin, cpu_init_crit() can be skipped, but the code is still enabled requiring a platform to supply lowlevel_init(). Signed-off-by: Axel Lin axel

Re: [U-Boot] [PATCH] ARM: arm720t: Add missing CONFIG_SKIP_LOWLEVEL_INIT guard for cpu_init_crit

2013-05-15 Thread Axel Lin
2013/5/15 Stephen Warren swar...@wwwdotorg.org: On 05/14/2013 09:04 PM, Axel Lin wrote: cpu_init_crit() can be skipped, but the code is still enabled requiring a platform to supply lowlevel_init(). diff --git a/arch/arm/cpu/arm720t/start.S b/arch/arm/cpu/arm720t/start.S +#ifndef

[U-Boot] [PATCH RFT] tegra: Define CONFIG_SKIP_LOWLEVEL_INIT for SPL build

2013-05-16 Thread Axel Lin
Then we can get rid of the #ifdef CONFIG_TEGRA guard in cpu_init_crit. Signed-off-by: Axel Lin axel@ingics.com --- Hi Stephen, This patch is on top of [PATCH] ARM: arm720t: Add missing CONFIG_SKIP_LOWLEVEL_INIT guard for cpu_init_crit [1] I make this as a separate patch because this patch

[U-Boot] [PATCH v2 2/2] tegra: Define CONFIG_SKIP_LOWLEVEL_INIT for SPL build

2013-05-21 Thread Axel Lin
Then we can get rid of the #ifdef CONFIG_TEGRA guard in cpu_init_crit. Signed-off-by: Axel Lin axel@ingics.com Tested-by: Stephen Warren swar...@nvidia.com --- arch/arm/cpu/arm720t/start.S| 2 -- include/configs/tegra-common-post.h | 2 ++ 2 files changed, 2 insertions(+), 2

[U-Boot] [PATCH v2 1/2] ARM: arm720t: Add missing CONFIG_SKIP_LOWLEVEL_INIT guard for cpu_init_crit

2013-05-21 Thread Axel Lin
cpu_init_crit() can be skipped, but the code is still enabled requiring a platform to supply lowlevel_init(). Signed-off-by: Axel Lin axel@ingics.com Tested-by: Stephen Warren swar...@nvidia.com --- arch/arm/cpu/arm720t/start.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm

[U-Boot] [PATCH] powerpc: mpc85xx/mpc86xx: Fix off-by-one boundary checking with ARRAY_SIZE

2013-05-26 Thread Axel Lin
If a variable is used as array subscript, it's valid value range is 0 ... ARRAY_SIZE -1. Signed-off-by: Axel Lin axel@ingics.com --- arch/powerpc/cpu/mpc85xx/mpc8536_serdes.c | 4 ++-- arch/powerpc/cpu/mpc85xx/mpc8544_serdes.c | 4 ++-- arch/powerpc/cpu/mpc85xx/mpc8548_serdes.c | 2 +- arch

[U-Boot] [PATCH] spi: armada100_spi: Remove unnecessary NULL test for dout and din

2013-06-11 Thread Axel Lin
Signed-off-by: Axel Lin axel@ingics.com --- drivers/spi/armada100_spi.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/spi/armada100_spi.c b/drivers/spi/armada100_spi.c index afdbe05..b237c7c 100644 --- a/drivers/spi/armada100_spi.c +++ b/drivers/spi

[U-Boot] [PATCH 1/2] spi: tegra114_spi: Convert to use spi_alloc_slave()

2013-06-13 Thread Axel Lin
Signed-off-by: Axel Lin axel@ingics.com --- Forgot to CC mailing list, so here is a resend. drivers/spi/tegra114_spi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/tegra114_spi.c b/drivers/spi/tegra114_spi.c index b11a0a1..4d2af48 100644 --- a/drivers/spi

[U-Boot] [PATCH 2/2] spi: tegra20_sflash: Remove redundant code to set bus and cs of struct spi_slave

2013-06-13 Thread Axel Lin
It's done in spi_alloc_slave(), thus remove the redundant code. Signed-off-by: Axel Lin axel@ingics.com --- drivers/spi/tegra20_sflash.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c index 9322ce7..7c3a3fc 100644

[U-Boot] [PATCH] spi: Use DIV_ROUND_UP at appropriate places

2013-06-14 Thread Axel Lin
This change slightly improves readability. Signed-off-by: Axel Lin axel@ingics.com --- drivers/spi/cf_qspi.c | 2 +- drivers/spi/mxc_spi.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/spi/cf_qspi.c b/drivers/spi/cf_qspi.c index a37ac4e..06bcf91 100644

Re: [U-Boot] [PATCH] spi: Use DIV_ROUND_UP at appropriate places

2013-06-14 Thread Axel Lin
at appropriate places I was thinking doing so may add maintainer's burden. (well for this case with 2 patches, it's not a problem) But since you prefer sending a fix per driver, I'll resend the patches. On Fri, Jun 14, 2013 at 1:29 PM, Axel Lin axel@ingics.com wrote: This change slightly

[U-Boot] [PATCH 1/2] spi: cf_qspi: Use DIV_ROUND_UP at appropriate place

2013-06-14 Thread Axel Lin
This change slightly improves readability. Signed-off-by: Axel Lin axel@ingics.com --- drivers/spi/cf_qspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/cf_qspi.c b/drivers/spi/cf_qspi.c index a37ac4e..06bcf91 100644 --- a/drivers/spi/cf_qspi.c +++ b

[U-Boot] [PATCH 2/2] spi: mxc_spi: Use DIV_ROUND_UP at appropriate places

2013-06-14 Thread Axel Lin
This change slightly improves readability. Signed-off-by: Axel Lin axel@ingics.com --- drivers/spi/mxc_spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c index 5bed858..2ea3228 100644 --- a/drivers/spi/mxc_spi.c +++ b

[U-Boot] spi: cf_spi: Question about checking (dspi-sr 0x0000F000) witch magic number 4

2013-06-14 Thread Axel Lin
Hi, While reading the code in cfspi_tx(): while ((dspi-sr 0xF000) = 4) ; I don't see the point of checking (dspi-sr 0xF000) = 4). I'm wondering if it should be while ((dspi-sr 0xF000) 12) = 4) ; or simply while (dspi-sr 0xF000) ; Current code

[U-Boot] [PATCH] gpio: altera_pio: Fix inversed logic of gpio_is_valid() implementation

2013-06-15 Thread Axel Lin
The implementation of gpio_is_valid() has inversed logic, fix it. Signed-off-by: Axel Lin axel@ingics.com --- Hi, I don't have this hardware to test, but current code looks obviously wrong. I'd appreciate if someone can review and test this patch. Axel drivers/gpio/altera_pio.c | 4 ++-- 1

[U-Boot] [PATCH] gpio: s3c2440_gpio: Fix wrong writel arguments

2013-06-15 Thread Axel Lin
Current code had writel arguments the wrong way around, fix it. Signed-off-by: Axel Lin axel@ingics.com --- Hi, I don't have this hardware to test, but current code looks obviously wrong. I'd appreciate if someone can review and test this patch. Axel drivers/gpio/s3c2440_gpio.c | 6

[U-Boot] [PATCH] gpio: s5p_gpio: Call s5p_gpio_set_value() instead of open-code

2013-06-15 Thread Axel Lin
Call s5p_gpio_set_value() to avoid code duplication. Signed-off-by: Axel Lin axel@ingics.com --- drivers/gpio/s5p_gpio.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c index 656bf4a..4efb768 100644 --- a/drivers

[U-Boot] gpio: Question about gpio_set_value() implementation in spear_gpio.c

2013-06-19 Thread Axel Lin
Current code looks strange because no matter the value argument is 0 or 1 it always calls writel(1 gpio, regs-gpiodata[DATA_REG_ADDR(gpio)]); And then gpio_get_value() always return 1. I'm wondering if it needs to be fixed, something like below change: diff --git

Re: [U-Boot] gpio: Question about gpio_set_value() implementation in spear_gpio.c

2013-06-19 Thread Axel Lin
2013/6/19 Marek Vasut ma...@denx.de: Dear Axel Lin, Current code looks strange because no matter the value argument is 0 or 1 it always calls writel(1 gpio, regs-gpiodata[DATA_REG_ADDR(gpio)]); And then gpio_get_value() always return 1. I'm wondering if it needs to be fixed

[U-Boot] [PATCH] gpio: omap_gpio: Remove check_gpio() function

2013-06-19 Thread Axel Lin
check_gpio() and gpio_is_valid() are both used to check if a gpio is valid or not. It looks pointless to have both function because we can just call gpio_is_valid() instead of check_gpio(). Thus remove check_gpio() function. Signed-off-by: Axel Lin axel@ingics.com --- drivers/gpio

[U-Boot] [PATCH] gpio: spear_gpio: Fix gpio_set_value() implementation

2013-06-20 Thread Axel Lin
In current gpio_set_value() implementation, it always sets the gpio control bit no matter the value argument is 0 or 1. Thus the GPIOs never set to low. This patch fixes this bug. Signed-off-by: Axel Lin axel@ingics.com --- drivers/gpio/spear_gpio.c | 5 - 1 file changed, 4 insertions

Re: [U-Boot] [PATCH] gpio: omap_gpio: Remove check_gpio() function

2013-06-20 Thread Axel Lin
2013/6/20 Nikita Kiryanov nik...@compulab.co.il Hi Axel, On 06/20/2013 04:03 AM, Axel Lin wrote: check_gpio() and gpio_is_valid() are both used to check if a gpio is valid or not. It looks pointless to have both function because we can just call gpio_is_valid() instead of check_gpio

Re: [U-Boot] [PATCH] gpio: spear_gpio: Fix gpio_set_value() implementation

2013-06-20 Thread Axel Lin
2013/6/20 Marek Vasut ma...@denx.de Dear Axel Lin, In current gpio_set_value() implementation, it always sets the gpio control bit no matter the value argument is 0 or 1. Thus the GPIOs never set to low. This patch fixes this bug. Signed-off-by: Axel Lin axel@ingics.com

[U-Boot] [PATCH] gpio: omap_gpio: Fix valid gpio range for AM33XX

2013-06-20 Thread Axel Lin
AM33XX has 4 gpio banks, thus the valid gpio range should be 0 ... 127. Signed-off-by: Axel Lin axel@ingics.com --- drivers/gpio/omap_gpio.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpio/omap_gpio.c b/drivers/gpio/omap_gpio.c index a30d7f0..9aa6d41 100644 --- a/drivers

[U-Boot] [PATCH v2] gpio: omap_gpio: Fix valid gpio range for AM33XX

2013-06-20 Thread Axel Lin
AM33XX has 4 gpio banks, thus the valid gpio range should be 0 ... 127. Signed-off-by: Axel Lin axel@ingics.com --- v2: define OMAP_MAX_GPIO and use it. This change is mainly based on Stefan's comment, however I use OMAP_MAX_GPIO instead of CONFIG_OMAP_MAX_GPIO because having CONFIG_ prefix

Re: [U-Boot] [PATCH v2] gpio: omap_gpio: Fix valid gpio range for AM33XX

2013-06-21 Thread Axel Lin
2013/6/21 Lubomir Popov lpo...@mm-sol.com: Hi Axel, On 21/06/13 06:07, Axel Lin wrote: AM33XX has 4 gpio banks, thus the valid gpio range should be 0 ... 127. Signed-off-by: Axel Lin axel@ingics.com --- v2: define OMAP_MAX_GPIO and use it. This change is mainly based on Stefan's

[U-Boot] [PATCH v3 1/2] gpio: omap_gpio: Fix valid gpio range for AM33XX

2013-06-21 Thread Axel Lin
AM33XX has 4 gpio banks, thus the valid gpio range should be 0 ... 127. Signed-off-by: Axel Lin axel@ingics.com Acked-by: Stefan Roese s...@denx.de --- v2: define OMAP_MAX_GPIO and use it. v3: no change, just for adding patch 2/2. drivers/gpio/omap_gpio.c | 8 +++- 1 file changed, 7

[U-Boot] [PATCH v3 2/2] gpio: omap_gpio: Fix valid GPIO range for OMAP5

2013-06-21 Thread Axel Lin
Signed-off-by: Axel Lin axel@ingics.com --- v3: just a new patch adding to this patch serial. Hi Lubomir, I'd appreciate if you can test this patch serial ( mainly for OMAP5 ). Thanks, Axel arch/arm/cpu/armv7/omap5/hwinit.c | 4 +++- arch/arm/include/asm/arch-omap5/gpio.h | 2

Re: [U-Boot] [PATCH v2] gpio: omap_gpio: Fix valid gpio range for AM33XX

2013-06-21 Thread Axel Lin
2013/6/21 Heiko Schocher h...@denx.de: Hello Lubomir, Am 21.06.2013 09:44, schrieb Lubomir Popov: One more thing that perhaps seems more reasonable in general: These OMAP_MAX_GPIO defines could go into the corresponding .../arch-omap*.h files, where the base addresses are defined, and the

[U-Boot] [PATCH 1/2] OMAP5: Fix gpio_bank_54xx setting

2013-06-21 Thread Axel Lin
OMAP54XX and DRA7XX SoCs have 8 banks per 32 GPIOs, that is, 256 in total. Fix the gpio bank setting. Signed-off-by: Axel Lin axel@ingics.com --- arch/arm/cpu/armv7/omap5/hwinit.c | 4 +++- arch/arm/include/asm/arch-omap5/gpio.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion

[U-Boot] [PATCH 2/2] OMAP: gpio: Introduce get_omap_gpio_count() function to get gpio count

2013-06-21 Thread Axel Lin
Now the omap_gpio driver is used by AM33XX, OMAP3/4, OMAP54XX and DRA7XX SoCs. These SoCs have various gpio count. Thus introduce get_omap_gpio_count() function to get correct gpio count. Signed-off-by: Axel Lin axel@ingics.com --- arch/arm/cpu/armv7/am33xx/board.c | 5 + arch/arm/cpu

[U-Boot] [PATCH] ARM: OMAP: GPIO: Fix valid range and enable usage of all GPIOs on OMAP5

2013-06-21 Thread Axel Lin
. Update gpio bank settings and enable GPIO modules 7 8 clocks for OMAP5. Thanks for Lubomir Popov to provide valuable comments to fix this issue. Signed-off-by: Axel Lin axel@ingics.com --- This patch supersedes below patches: [PATCH v3 1/2] gpio: omap_gpio: Fix valid gpio range for AM33XX [1

[U-Boot] [PATCH] gpio: pca953x: Use ARRAY_SIZE instead of reinventing it

2013-06-22 Thread Axel Lin
Signed-off-by: Axel Lin axel@ingics.com --- drivers/gpio/pca953x.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index be13745..7371cd4 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c @@ -47,9 +47,6

[U-Boot] [PATCH] cmd_i2c: Use ARRAY_SIZE instead of reinventing it

2013-06-22 Thread Axel Lin
Signed-off-by: Axel Lin axel@ingics.com --- common/cmd_i2c.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index 4380794..3215644 100644 --- a/common/cmd_i2c.c +++ b/common/cmd_i2c.c @@ -120,8 +120,6 @@ static uchar i2c_no_probes

[U-Boot] [PATCH] serial: Use ARRAY_SIZE instead of reinventing it

2013-06-22 Thread Axel Lin
Signed-off-by: Axel Lin axel@ingics.com --- drivers/serial/serial.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index daa8003..a19cec5 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -37,7

[U-Boot] [PATCH 1/3] hwmon: lm63: Use ARRAY_SIZE at appropriate place

2013-06-22 Thread Axel Lin
Signed-off-by: Axel Lin axel@ingics.com --- drivers/hwmon/lm63.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/hwmon/lm63.c b/drivers/hwmon/lm63.c index f3adf64..bb8e644 100644 --- a/drivers/hwmon/lm63.c +++ b/drivers/hwmon/lm63.c @@ -133,8 +133,7 @@ int

[U-Boot] [PATCH 2/3] mtd: cfi_flash: Use ARRAY_SIZE at appropriate places

2013-06-22 Thread Axel Lin
Signed-off-by: Axel Lin axel@ingics.com --- drivers/mtd/cfi_flash.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 25f8752..a13b0b8 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -1797,7

[U-Boot] [PATCH 3/3] usb: musb: Use ARRAY_SIZE at appropriate places

2013-06-22 Thread Axel Lin
Signed-off-by: Axel Lin axel@ingics.com --- drivers/usb/musb/musb_hcd.c | 3 +-- drivers/usb/musb/musb_udc.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c index 60e03a4..7bb91e5 100644 --- a/drivers/usb/musb

Re: [U-Boot] [PATCH] cmd_i2c: Use ARRAY_SIZE instead of reinventing it

2013-06-24 Thread Axel Lin
2013/6/25 Simon Glass s...@chromium.org: On Sat, Jun 22, 2013 at 6:56 AM, Axel Lin axel@ingics.com wrote: Signed-off-by: Axel Lin axel@ingics.com Missing commit message? Because the subject line is already very clear. And tools/checkpatch.pl does not complaint. Otherwise: Acked

[U-Boot] [PATCH 1/2] blackfin: gpio: Unreserve gpio in special_gpio_free()

2013-06-25 Thread Axel Lin
In special_gpio_free(), call unreserve() rather than reserve() to release gpio. Signed-off-by: Axel Lin axel@ingics.com --- arch/blackfin/cpu/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/blackfin/cpu/gpio.c b/arch/blackfin/cpu/gpio.c index f74a0b7

[U-Boot] [PATCH 2/2] gpio: adi_gpio2: Unreserve gpio in special_gpio_free()

2013-06-25 Thread Axel Lin
In special_gpio_free(), call unreserve() rather than reserve() to release gpio. Signed-off-by: Axel Lin axel@ingics.com --- drivers/gpio/adi_gpio2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/adi_gpio2.c b/drivers/gpio/adi_gpio2.c index 7a034eb

[U-Boot] [PATCH] blackfin: gpio: Use proper mask for comparing function

2013-06-28 Thread Axel Lin
-by: Axel Lin axel@ingics.com --- arch/blackfin/cpu/gpio.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/blackfin/cpu/gpio.c b/arch/blackfin/cpu/gpio.c index f74a0b7..c4cddaf 100644 --- a/arch/blackfin/cpu/gpio.c +++ b/arch/blackfin/cpu/gpio.c @@ -247,7

[U-Boot] [PATCH] blackfin: Fix using gd-baudrate before setting its value

2013-06-28 Thread Axel Lin
] include/vsprintf.h:27:7: note: expected 'const char *' but argument is of type 'unsigned int' This patch moves the code using gd-baudrate to be after init_baudrate() call, this ensures we get the baudrate setting before using it. Signed-off-by: Axel Lin axel@ingics.com --- I forgot to CC u-boot

Re: [U-Boot] [PATCH] blackfin: Fix using gd-baudrate before setting its value

2013-06-29 Thread Axel Lin
2013/6/29 Marek Vasut ma...@denx.de: Dear Axel Lin, Current code uses gd-baudrate before setting its value. Besides, I got below build warning which is introduced by commit ddb5c5be blackfin: add baudrate to bdinfo. board.c:235:3: warning: passing argument 1 of 'simple_strtoul' makes

[U-Boot] [PATCH] net: Use ARRAY_SIZE at appropriate places

2013-06-29 Thread Axel Lin
Use ARRAY_SIZE instead of having similar implementation in each drivers. Signed-off-by: Axel Lin axel@ingics.com Cc: Albert Aribaud albert.u.b...@aribaud.net Cc: Ben Warren biggerbadder...@gmail.com Cc: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Cc: Joe Hershberger joe.hershber

Re: [U-Boot] [PATCH] net: Use ARRAY_SIZE at appropriate places

2013-06-29 Thread Axel Lin
2013/6/30 Marek Vasut ma...@denx.de: Dear Axel Lin, Use ARRAY_SIZE instead of having similar implementation in each drivers. Signed-off-by: Axel Lin axel@ingics.com Cc: Albert Aribaud albert.u.b...@aribaud.net Cc: Ben Warren biggerbadder...@gmail.com Cc: Jean-Christophe PLAGNIOL

[U-Boot] [PATCH v2] net: Use ARRAY_SIZE at appropriate places

2013-06-29 Thread Axel Lin
Use ARRAY_SIZE instead of having similar implementation in each drivers. Signed-off-by: Axel Lin axel@ingics.com Cc: Albert Aribaud albert.u.b...@aribaud.net Cc: Ben Warren biggerbadder...@gmail.com Cc: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Cc: Joe Hershberger joe.hershber

Re: [U-Boot] [PATCH] net: Use ARRAY_SIZE at appropriate places

2013-06-29 Thread Axel Lin
diff --git a/drivers/net/npe/include/IxOsalTypes.h b/drivers/net/npe/include/IxOsalTypes.h index 06e71de..615c655 100644 --- a/drivers/net/npe/include/IxOsalTypes.h +++ b/drivers/net/npe/include/IxOsalTypes.h @@ -93,7 +93,7 @@ typedef volatile INT32 VINT32; #ifndef NUMELEMS -#define

Re: [U-Boot] [PATCH] gpio: spear_gpio: Fix gpio_set_value() implementation

2013-06-29 Thread Axel Lin
2013/6/21 Michael Trimarchi mich...@amarulasolutions.com: On 06/21/2013 06:40 AM, Vipin Kumar wrote: On 6/20/2013 7:26 PM, Axel Lin wrote: 2013/6/20 Marek Vasutma...@denx.de Dear Axel Lin, In current gpio_set_value() implementation, it always sets the gpio control bit no matter the value

[U-Boot] [PATCH] gpio: spear_gpio: Remove unused gpio_toggle_value() function

2013-06-30 Thread Axel Lin
There is no user calling this function, thus remove it. Signed-off-by: Axel Lin axel@ingics.com --- drivers/gpio/spear_gpio.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/gpio/spear_gpio.c b/drivers/gpio/spear_gpio.c index d3c728e..5b5521e 100644 --- a/drivers/gpio

Re: [U-Boot] [PATCH] gpio: spear_gpio: Fix gpio_set_value() implementation

2013-06-30 Thread Axel Lin
2013/6/30 Michael Trimarchi mich...@amarulasolutions.com: Hi Il giorno 30/giu/2013 06:18, Axel Lin axel@ingics.com ha scritto: 2013/6/21 Michael Trimarchi mich...@amarulasolutions.com: On 06/21/2013 06:40 AM, Vipin Kumar wrote: On 6/20/2013 7:26 PM, Axel Lin wrote: 2013/6/20 Marek

Re: [U-Boot] [PATCH] blackfin: Fix using gd-baudrate before setting its value

2013-06-30 Thread Axel Lin
2013/7/1 Sonic Zhang sonic@gmail.com: Hi Axel, On Sat, Jun 29, 2013 at 8:34 AM, Axel Lin axel@ingics.com wrote: Current code uses gd-baudrate before setting its value. Besides, I got below build warning which is introduced by commit ddb5c5be blackfin: add baudrate to bdinfo

[U-Boot] [PATCH v2] blackfin: Fix using gd-baudrate before setting its value

2013-06-30 Thread Axel Lin
] include/vsprintf.h:27:7: note: expected 'const char *' but argument is of type 'unsigned int' This patch ensures we get the baudrate setting before using it. Signed-off-by: Axel Lin axel@ingics.com --- v2: The change is based on Sonic 's suggestion: move gd-bd-bi_baudrate = gd-baudrate

Re: [U-Boot] [PATCH] gpio: spear_gpio: Fix gpio_set_value() implementation

2013-06-30 Thread Axel Lin
The questions raised here are valid and it forced me to re-read the datasheet. For your convenience, I must tell you that the device is actually pl061 from ARM, so the driver can also be named so. The datasheet is here

Re: [U-Boot] [PATCH v2] net: Use ARRAY_SIZE at appropriate places

2013-07-01 Thread Axel Lin
diff --git a/drivers/net/npe/IxEthDBFeatures.c b/drivers/net/npe/IxEthDBFeatures.c index c5b680a..d43efaa 100644 --- a/drivers/net/npe/IxEthDBFeatures.c +++ b/drivers/net/npe/IxEthDBFeatures.c @@ -143,22 +143,22 @@ void ixEthDBFeatureCapabilityScan(void) IX_ENSURE(sizeof

[U-Boot] [PATCH v3] net: Use ARRAY_SIZE at appropriate places

2013-07-02 Thread Axel Lin
Use ARRAY_SIZE instead of having similar implementation in each drivers. The NUMELEMS defined in drivers/net/npe/include/IxOsalTypes.h is not used at all, so this patch removes it instead of converting it to use ARRAY_SIZE. Signed-off-by: Axel Lin axel@ingics.com Cc: Albert Aribaud albert.u.b

[U-Boot] nds32: ag101/ag102: Inconsistent timer3 counter unit?

2013-07-03 Thread Axel Lin
Hi Macpaul, For the case CONFIG_FTTMR010_EXT_CLK is not defined: In reset_timer_masked(): lastdec = readl(tmr-timer3_counter) / (CONFIG_SYS_CLK_FREQ / 2); In get_timer_masked(): ulong now = readl(tmr-timer3_counter) / (CONFIG_SYS_CLK_FREQ / 2 / 1024); The code looks strange. (Why one needs to

[U-Boot] [PATCH] nds32: ag101/ag102: Fix setting lastdec and now values

2013-07-08 Thread Axel Lin
, thus fix the equation to set lastdec and now variables accordingly. Signed-off-by: Axel Lin axel@ingics.com --- Hi Kuan-Yu, This change is based on your suggestion. I don't have this hardware, can you test if this patch works? Thanks, Axel arch/nds32/cpu/n1213/ag101/timer.c | 7 --- arch

[U-Boot] [PATCH 1/3] spi: bfin_spi: Use DIV_ROUND_UP instead of open-coded

2013-07-12 Thread Axel Lin
Use DIV_ROUND_UP to simplify the code. Signed-off-by: Axel Lin axel@ingics.com --- drivers/spi/bfin_spi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/bfin_spi.c b/drivers/spi/bfin_spi.c index a9a4d92..f7192c2 100644 --- a/drivers/spi/bfin_spi.c +++ b

[U-Boot] [PATCH 2/3] spi: fsl_espi: Use DIV_ROUND_UP instead of open-coded

2013-07-12 Thread Axel Lin
Use DIV_ROUND_UP to simplify the code. Signed-off-by: Axel Lin axel@ingics.com --- drivers/spi/fsl_espi.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c index 28609ee..e20ab9f 100644 --- a/drivers/spi/fsl_espi.c +++ b

[U-Boot] [PATCH 3/3] spi: mpc8xxx_spi: Use DIV_ROUND_UP instead of open-coded

2013-07-12 Thread Axel Lin
Use DIV_ROUND_UP to simplify the code. Signed-off-by: Axel Lin axel@ingics.com --- drivers/spi/mpc8xxx_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c index 6b0e3b4..c90c0ce 100644 --- a/drivers/spi/mpc8xxx_spi.c

Re: [U-Boot] [PATCH v2] blackfin: Fix using gd-baudrate before setting its value

2013-07-14 Thread Axel Lin
2013/7/1 Sonic Zhang sonic@gmail.com: Acked-by: Sonic Zhangsonic.zh...@analog.com hi Sonic, I thought you will pick up this patch, but now I got your ACK and I have no idea who will take this patch. Just wondering if this patch should be applied for v2013.07? Regards, Axel

[U-Boot] Boot Linux kernel with initramfs fails

2013-07-18 Thread Axel Lin
Hi, When I boot Linux kernel with FIT Image, the kernel does not unpacking initramfs. ( The root cause is initrd_start is NULL.) The initramfs is built-in with kernel, so I don't specify ramdisk in my kernel.its file. Is this a known issue or do I need special setting to boot a Linux kernel

Re: [U-Boot] [PATCH] gpio: altera_pio: Fix inversed logic of gpio_is_valid() implementation

2013-08-04 Thread Axel Lin
2013/7/29 Albert ARIBAUD albert.u.b...@aribaud.net: Hi Axel, On Sat, 15 Jun 2013 17:10:38 +0800, Axel Lin axel@ingics.com wrote: The implementation of gpio_is_valid() has inversed logic, fix it. Signed-off-by: Axel Lin axel@ingics.com --- Hi, I don't have this hardware to test

Re: [U-Boot] [PATCH] gpio: spear_gpio: Fix gpio_set_value() implementation

2013-08-12 Thread Axel Lin
2013/7/1 Vipin Kumar vipin.ku...@st.com: On 7/1/2013 11:02 AM, Axel Lin wrote: The questions raised here are valid and it forced me to re-read the datasheet. For your convenience, I must tell you that the device is actually pl061 from ARM, so the driver can also be named so. The datasheet

[U-Boot] [PATCH] serial: arm_dcc: Convert to use default_serial_puts

2013-08-17 Thread Axel Lin
Use default_serial_puts() instead of its own implementation. Signed-off-by: Axel Lin axel@ingics.com --- drivers/serial/arm_dcc.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/serial/arm_dcc.c b/drivers/serial/arm_dcc.c index 29d9295..5dfb02f 100644

[U-Boot] [PATCH RESEND] gpio: spear_gpio: Fix gpio_set_value() implementation

2013-09-06 Thread Axel Lin
In current gpio_set_value() implementation, it always sets the gpio control bit no matter the value argument is 0 or 1. Thus the GPIOs never set to low. This patch fixes this bug. Signed-off-by: Axel Lin axel@ingics.com Acked-by: Stefan Roese s...@denx.de Reviewed-by: Vipin Kumar vipin.ku

[U-Boot] u-boot build error in current git tree

2013-09-09 Thread Axel Lin
Hit below build errors (on ARM platforms): axel@phoenix:~/repos/git/u-boot$ make mx31pdk Configuring for mx31pdk board... make make[1]: Entering directory `/home/axel/repos/git/u-boot' Generating include/autoconf.mk Generating include/autoconf.mk.dep make[1]: Leaving directory

[U-Boot] actux2 build error due to commit 4412db46

2013-09-09 Thread Axel Lin
Hi Jack, I hit below build error, revert commit 4412db464 standalone-examples: support custom GCC lib fixes the build error. $ ./MAKEALL actux2 Configuring for actux2 board... make[1]: *** [hello_world] Error 1 make: *** [examples/standalone] Error 2 textdata bss dec hex

Re: [U-Boot] u-boot build error in current git tree

2013-09-10 Thread Axel Lin
2013/9/11 Fabio Estevam feste...@gmail.com: On Tue, Sep 10, 2013 at 12:30 AM, Axel Lin axel@ingics.com wrote: Hit below build errors (on ARM platforms): axel@phoenix:~/repos/git/u-boot$ make mx31pdk Configuring for mx31pdk board... make Are you able to reproduce the error if you run

[U-Boot] [PATCH] boards.cfg: Fix the comment for invoking tools/reformat.py from vim

2013-09-12 Thread Axel Lin
Add the missing bang (!) to execute external command, otherwise it does not work. Signed-off-by: Axel Lin axel@ingics.com --- boards.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards.cfg b/boards.cfg index dbd8479..9fc77fb 100644 --- a/boards.cfg +++ b/boards.cfg

Re: [U-Boot] [PATCH RESEND] gpio: spear_gpio: Fix gpio_set_value() implementation

2013-09-14 Thread Axel Lin
2013/9/14 Albert ARIBAUD albert.u.b...@aribaud.net: Hi Axel, On Fri, 06 Sep 2013 14:22:40 +0800, Axel Lin axel@ingics.com wrote: In current gpio_set_value() implementation, it always sets the gpio control bit no matter the value argument is 0 or 1. Thus the GPIOs never set to low

[U-Boot] [PATCH v2] gpio: spear_gpio: Fix gpio_set_value() implementation

2013-09-15 Thread Axel Lin
bits without affecting any other pins in a single write operation. Thus we don't need a read-modify-write to update the register. Signed-off-by: Axel Lin axel@ingics.com Acked-by: Stefan Roese s...@denx.de Reviewed-by: Vipin Kumar vipin.ku...@st.com Reviewed-by: Michael Trimarchi mich

[U-Boot] [PATCH RESEND 2/2] serial: opencores_yanu: Avoid duplicate oc_serial_setbrg() implementation

2014-02-04 Thread Axel Lin
The implementation of oc_serial_setbrg() for CONFIG_SYS_NIOS_FIXEDBAUD and !CONFIG_SYS_NIOS_FIXEDBAUD are very similar. Add a baudrate variable and set it to either CONFIG_BAUDRATE or gd-baudrate. Then we can unify the code for both cases. Signed-off-by: Axel Lin axel@ingics.com --- drivers

[U-Boot] [PATCH RESEND 1/2] serial: opencores_yanu: Fix build error

2014-02-04 Thread Axel Lin
Fix build error due to missing include of serial.h and a trivial typo. Signed-off-by: Axel Lin axel@ingics.com --- Hi Tom, This patch was sent on http://lists.denx.de/pipermail/u-boot/2014-January/171093.html I don't get any feedback from NIOS2 maintainers so far. Maybe you can pick up

[U-Boot] [PATCH] serial: arc: Convert to use default_serial_puts

2014-02-07 Thread Axel Lin
Use default_serial_puts() instead of duplicating the implementation. Signed-off-by: Axel Lin axel@ingics.com --- drivers/serial/serial_arc.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/serial/serial_arc.c b/drivers/serial/serial_arc.c index e63d25d

[U-Boot] [PATCH] spi: atmel_dataflash: Simplify AT91F_SpiEnable implementation

2014-02-20 Thread Axel Lin
Refactor the code a bit to make it better in readability. Remove the comments because now the intention of the code is pretty clear. Signed-off-by: Axel Lin axel@ingics.com --- drivers/spi/atmel_dataflash_spi.c | 31 --- 1 file changed, 12 insertions(+), 19

[U-Boot] [RESEND][PATCH] gpio: spear_gpio: Fix gpio_set_value() implementation

2014-05-24 Thread Axel Lin
bits without affecting any other pins in a single write operation. Thus we don't need a read-modify-write to update the register. Signed-off-by: Axel Lin axel@ingics.com Acked-by: Stefan Roese s...@denx.de Reviewed-by: Vipin Kumar vipin.ku...@st.com Reviewed-by: Michael Trimarchi mich

[U-Boot] [PATCH] spi: davinci: Fix register address for SPI1_BUS

2014-06-17 Thread Axel Lin
Fix a trivial copy-paste bug. Signed-off-by: Axel Lin axel@ingics.com --- drivers/spi/davinci_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c index 28fb3a2..0ec5b9d 100644 --- a/drivers/spi/davinci_spi.c +++ b

[U-Boot] How to write jffs2 image to spi nor flash?

2013-11-27 Thread Axel Lin
Hi list, I use sf erase + sf write commands to write root image to spi nor flash. It works for writing a ext2 image. However, if I use the same commands to write a jffs2 image I got a lot of Magic bitmask 0x1985 not found at... messages and jffs2: inflate returned -3. jffs2:

Re: [U-Boot] How to write jffs2 image to spi nor flash?

2013-11-29 Thread Axel Lin
2013/11/28 Axel Lin axel@ingics.com: Hi list, I use sf erase + sf write commands to write root image to spi nor flash. It works for writing a ext2 image. However, if I use the same commands to write a jffs2 image I got a lot of Magic bitmask 0x1985 not found at... messages and jffs2

[U-Boot] [PATCH 1/2] spi: bfin_spi: Remove unnecessary test for bus and pins[bus]

2013-11-29 Thread Axel Lin
For invalid bus number, current code returns NULL in the default case of switch-case statements. In additional, pins[bus] is always not NULL because it is the address of specific row of the two-dimensional array. Thus this patch removes these unnecessary test. Signed-off-by: Axel Lin axel

[U-Boot] [PATCH 2/2] spi: bfin_spi6xx: Remove unnecessary test for bus and pins[bus]

2013-11-29 Thread Axel Lin
For invalid bus number, current code returns NULL in the default case of switch-case statements. In additional, pins[bus] is always not NULL because it is the address of specific row of the two-dimensional array. Thus this patch removes these unnecessary test. Signed-off-by: Axel Lin axel

[U-Boot] [PATCH] spi: sh_spi: Use sh_spi_clear_bit() instead of open-coded

2013-12-26 Thread Axel Lin
We have a sh_spi_clear_bit() function, there's no reason not to use it. Signed-off-by: Axel Lin axel@ingics.com --- drivers/spi/sh_spi.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/spi/sh_spi.c b/drivers/spi/sh_spi.c index 744afe3..7ca5e36 100644

[U-Boot] [PATCH] spi: oc_tiny_spi: Refactor to simplify spi_xfer implementation

2014-01-10 Thread Axel Lin
Currently we have similar code for (txp rxp), (txp !rxp), (!rxp txp), and (!txp !rxp) cases. This patch refactors the code a bit to avoid duplicate similar code. Signed-off-by: Axel Lin axel@ingics.com --- Hi Thomas, This path is similar to the patch I sent for spi-oc-tiny.c linux driver

[U-Boot] [PATCH 1/2] serial: opencores_yanu: Fix build error

2014-01-15 Thread Axel Lin
Fix build error due to missing include of serial.h and a trivial typo. Signed-off-by: Axel Lin axel@ingics.com --- drivers/serial/opencores_yanu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/serial/opencores_yanu.c b/drivers/serial/opencores_yanu.c index

[U-Boot] [PATCH 2/2] serial: opencores_yanu: Avoid duplicate oc_serial_setbrg() implementation

2014-01-15 Thread Axel Lin
The implementation of oc_serial_setbrg() for CONFIG_SYS_NIOS_FIXEDBAUD and !CONFIG_SYS_NIOS_FIXEDBAUD are very similar. Add a baudrate variable and set it to either CONFIG_BAUDRATE or gd-baudrate. Then we can unify the code for both cases. Signed-off-by: Axel Lin axel@ingics.com --- drivers

[U-Boot] [PATCH] serial: mxs_auart: Staticize local functions

2013-10-14 Thread Axel Lin
Staticize local functions in mxs_auart driver. Signed-off-by: Axel Lin axel@ingics.com --- drivers/serial/mxs_auart.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/serial/mxs_auart.c b/drivers/serial/mxs_auart.c index 7cfe5bc..fc0fa96 100644

Re: [U-Boot] [PATCH] serial: mxs_auart: Staticize local functions

2013-10-15 Thread Axel Lin
2013/10/15 Marek Vasut ma...@denx.de: Dear Axel Lin, Staticize local functions in mxs_auart driver. Signed-off-by: Axel Lin axel@ingics.com Acked-by: Marek Vasut ma...@denx.de Just curious, how did you find this? Did you lint the files with some tool? I just read the code. Regards

[U-Boot] [PATCH 1/2] serial: xuartlite: Staticize local functions

2013-10-15 Thread Axel Lin
Staticize local functions in xuartlite driver. Signed-off-by: Axel Lin axel@ingics.com --- drivers/serial/serial_xuartlite.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c index 9c1d025

[U-Boot] [PATCH 2/2] serial: s5p: Staticize local functions

2013-10-15 Thread Axel Lin
Staticize local functions in s5p serial driver. Signed-off-by: Axel Lin axel@ingics.com --- drivers/serial/serial_s5p.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c index f98b422..13ced26 100644

[U-Boot] [PATCH v2 1/2] serial: xuartlite: Staticize local functions

2013-10-15 Thread Axel Lin
Staticize local functions in xuartlite driver. Signed-off-by: Axel Lin axel@ingics.com --- v2: Also staticize userial##port##_* functions drivers/serial/serial_xuartlite.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/serial

[U-Boot] [PATCH v2 2/2] serial: s5p: Staticize local functions

2013-10-15 Thread Axel Lin
Staticize local functions in s5p serial driver. Signed-off-by: Axel Lin axel@ingics.com --- v2: Also staticize s5p_serial##port##_* functions drivers/serial/serial_s5p.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/serial

[U-Boot] [PATCH] gpio: intel_ich6: Set correct gpio output value in ich6_gpio_direction_output()

2014-12-06 Thread Axel Lin
Current code does not set gpio output value in ich6_gpio_direction_output(), fix it. Signed-off-by: Axel Lin axel@ingics.com --- drivers/gpio/intel_ich6_gpio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpio/intel_ich6_gpio.c b/drivers/gpio/intel_ich6_gpio.c index b095d17

[U-Boot] [PATCH] spi: designware_spi: Fix off-by-one for checking fifo depth

2014-12-18 Thread Axel Lin
The depth could be from 2 to 256 from HW spec, so fix off-by-one for checking fifo depth. Signed-off-by: Axel Lin axel@ingics.com --- Hi, I don't have this hardware handy, so please test it. drivers/spi/designware_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [U-Boot] [PATCH] spi: designware_spi: Fix off-by-one for checking fifo depth

2014-12-18 Thread Axel Lin
2014-12-19 15:35 GMT+08:00 Stefan Roese s...@denx.de: Hi Axel, On 19.12.2014 05:40, Axel Lin wrote: The depth could be from 2 to 256 from HW spec, so fix off-by-one for checking fifo depth. Signed-off-by: Axel Lin axel@ingics.com --- Hi, I don't have this hardware handy, so please

[U-Boot] [PATCH] mmc: sunxi: Fix misuse of gpio_direction_input()

2014-12-19 Thread Axel Lin
() is enough. Signed-off-by: Axel Lin axel@ingics.com --- Only compile tested, so please test this patch. Thanks. drivers/gpio/sunxi_gpio.c | 2 +- drivers/mmc/sunxi_mmc.c | 7 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c

Re: [U-Boot] [PATCH] mmc: sunxi: Fix misuse of gpio_direction_input()

2014-12-22 Thread Axel Lin
2014-12-22 20:59 GMT+08:00 Ian Campbell i...@hellion.org.uk: On Sun, 2014-12-21 at 11:53 -0700, Simon Glass wrote: On 19 December 2014 at 20:41, Axel Lin axel@ingics.com wrote: It does not make sense to make gpio_direction_input() return the gpio input status. The return value

[U-Boot] [PATCH] image: Convert to use fdt_for_each_subnode macro

2015-02-06 Thread Axel Lin
Signed-off-by: Axel Lin axel@ingics.com --- common/image-fit.c | 4 +--- common/image-sig.c | 16 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/common/image-fit.c b/common/image-fit.c index b47d110..778d2a1 100644 --- a/common/image-fit.c +++ b/common/image

  1   2   >