Nobuhiro Iwamatsu | 1 Mar 2012 03:44

Re: [PATCH] sh: i2c: Add support I2C controller of SH7734

Hi, Mike.

Thank you for your review.

2012/2/22 Mike Frysinger <vapier <at> gentoo.org>:
> On Tuesday 21 February 2012 20:13:47 Nobuhiro Iwamatsu wrote:
>> --- /dev/null
>> +++ b/drivers/i2c/sh_sh7734_i2c.c
>>
>> +#if DEBUG
>> +static void sh_i2c_dump_reg(struct sh_i2c *base)
>> +{
>> +     printf("iccr1 : %02X\n", readb(&base->iccr1));
>> +     printf("iccr2 : %02X\n", readb(&base->iccr2));
>> +     printf("icmr  : %02X\n", readb(&base->icmr));
>> +     printf("icier : %02X\n", readb(&base->icier));
>> +     printf("icsr  : %02X\n", readb(&base->icsr));
>> +     printf("sar   : %02X\n", readb(&base->sar));
>> +     printf("icdrt : %02X\n", readb(&base->icdrt));
>> +     printf("icdrr : %02X\n", readb(&base->icdrr));
>> +     printf("nf2cyc: %02X\n", readb(&base->nf2cyc));
>> +}
>> +#endif
>
> if you used debug(), you wouldn't need the DEBUG check

OK, but sh_i2c_dump_reg function is not referred from anywhere, I remove.

>
>> +static int
(Continue reading)

Nobuhiro Iwamatsu | 1 Mar 2012 03:58

[PATCH v4] sh: i2c: Add support I2C controller of SH7734

Renesas SH7734 has two I2C interfaceis.
This supports these I2C.

V4: - Remove sh_i2c_dump_reg function.
    - Use puts() when there's no format.
    - Chnage check for I2C bus number.
    - Remove space before the semi-colon.
V3: - Fix error for whitespace.
V2: - Changed bit control to use the clr|set|clrsetbits_* functions.
    - Fix wrong comment style.
    - Add new line before for loop in i2c_read.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj <at> renesas.com>
Acked-by: Heiko Schocher <hs <at> denx.de>
---
 drivers/i2c/Makefile        |    1 +
 drivers/i2c/sh_sh7734_i2c.c |  426 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 427 insertions(+), 0 deletions(-)
 create mode 100644 drivers/i2c/sh_sh7734_i2c.c

diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
index 504db03..506269d 100644
--- a/drivers/i2c/Makefile
+++ b/drivers/i2c/Makefile
 <at>  <at>  -44,6 +44,7  <at>  <at>  COBJS-$(CONFIG_SPEAR_I2C) += spr_i2c.o
 COBJS-$(CONFIG_TSI108_I2C) += tsi108_i2c.o
 COBJS-$(CONFIG_U8500_I2C) += u8500_i2c.o
 COBJS-$(CONFIG_SH_I2C) += sh_i2c.o
+COBJS-$(CONFIG_SH_SH7734_I2C) += sh_sh7734_i2c.o

(Continue reading)

Mike Frysinger | 1 Mar 2012 04:24
Picon
Favicon
Gravatar

Re: [PATCH v4] sh: i2c: Add support I2C controller of SH7734

On Wednesday 29 February 2012 21:58:42 Nobuhiro Iwamatsu wrote:
> --- /dev/null
> +++ b/drivers/i2c/sh_sh7734_i2c.c
>
> +#include <common.h>
> +#include <asm/io.h>

should include i2c.h too so you know your funcs match the prototypes everyone 
else uses

> +static int check_stop(struct sh_i2c *base)
> +{
> +	int i, ret = 1;
> +
> +	for (i = 0; i < IRQ_WAIT; i++) {
> +		if (SH_I2C_ICSR_STOP & readb(&base->icsr)) {
> +			ret = 0;
> +			break;
> +		}
> +		udelay(10);
> +	}
> +
> +	clrbits_le8(&base->icsr, SH_I2C_ICSR_STOP);
> +
> +	return ret;
> +}
> +
> +static int check_tend(struct sh_i2c *base, int stop)
> +{
> +	int i, ret = 1;
(Continue reading)

Mike Frysinger | 1 Mar 2012 04:58
Picon
Favicon
Gravatar

[PATCH] Blackfin: move gd/bd to bss by default

We don't need these setup manually, so let the bss do the rest.  On
Blackfin systems, we clear the bss before executing any C code that
would use these, so this should be fine.

Signed-off-by: Mike Frysinger <vapier <at> gentoo.org>
---
 arch/blackfin/include/asm/config.h |    8 +----
 arch/blackfin/lib/board.c          |   58 ++++++++++++++++++++++++++----------
 2 files changed, 43 insertions(+), 23 deletions(-)

diff --git a/arch/blackfin/include/asm/config.h b/arch/blackfin/include/asm/config.h
index 1a8de49..25cd833 100644
--- a/arch/blackfin/include/asm/config.h
+++ b/arch/blackfin/include/asm/config.h
 <at>  <at>  -109,14 +109,8  <at>  <at> 
 #ifndef CONFIG_SYS_MALLOC_BASE
 # define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_MONITOR_BASE - CONFIG_SYS_MALLOC_LEN)
 #endif
-#ifndef CONFIG_SYS_GBL_DATA_ADDR
-# define CONFIG_SYS_GBL_DATA_ADDR (CONFIG_SYS_MALLOC_BASE - GENERATED_GBL_DATA_SIZE)
-#endif
-#ifndef CONFIG_SYS_BD_INFO_ADDR
-# define CONFIG_SYS_BD_INFO_ADDR (CONFIG_SYS_GBL_DATA_ADDR - GENERATED_BD_INFO_SIZE)
-#endif
 #ifndef CONFIG_STACKBASE
-# define CONFIG_STACKBASE (CONFIG_SYS_BD_INFO_ADDR - 4)
+# define CONFIG_STACKBASE (CONFIG_SYS_MALLOC_BASE - 4)
 #endif
 #ifndef CONFIG_SYS_MEMTEST_START
 # define CONFIG_SYS_MEMTEST_START 0
(Continue reading)

Prabhakar Kushwaha | 1 Mar 2012 05:00
Favicon

[PATCH] powerpc/85xx:Fix lds for nand boot debug info

Currently "u-boot", the elf file generated via u-boot-nand.lds does not
contain required debug information i.e. .debug_{line, info, abbrev, aranges,
ranges} into their respective _global_ sections.

The original ld script line arch/powerpc/cpu/mpc85xx/start.o
KEEP(*(.bootpg)) is not entirely correct because the start.o file is already
processed by the linker,therefore the file wildcard in "KEEP(*(.bootpg))" will
not process start.o again for bootpg.

So Fix u-boot-nand.lds to generate these debug information.

Signed-off-by: Anmol Paralkar <b07584 <at> freescale.com>
Signed-off-by: John Russo <John.Russo <at> freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar <at> freescale.com>
---

 Developed against  git://git.denx.de/u-boot.git branch master

 arch/powerpc/cpu/mpc85xx/u-boot-nand.lds |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds b/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
index 04bc731..b1a1dac 100644
--- a/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
+++ b/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
 <at>  <at>  -1,5 +1,5  <at>  <at> 
 /*
- * Copyright 2009 Freescale Semiconductor, Inc.
+ * Copyright 2009-2012 Freescale Semiconductor, Inc.
  *
(Continue reading)

Nobuhiro Iwamatsu | 1 Mar 2012 05:32

[PATCH] sh: timer: Remove unnecessary variable 'ticks'

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj <at> renesas.com>
Reported-by: Mike Frysinger <vapier <at> gentoo.org>
---
 arch/sh/lib/time.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/arch/sh/lib/time.c b/arch/sh/lib/time.c
index c70baed..a01596c 100644
--- a/arch/sh/lib/time.c
+++ b/arch/sh/lib/time.c
 <at>  <at>  -108,14 +108,9  <at>  <at>  int timer_init (void)
 unsigned long long get_ticks (void)
 {
 	unsigned long tcnt = 0 - readl(TCNT0);
-	unsigned long ticks;

-	if (last_tcnt > tcnt) { /* overflow */
+	if (last_tcnt > tcnt) /* overflow */
 		overflow_ticks++;
-		ticks = (0xffffffff - last_tcnt) + tcnt;
-	} else {
-		ticks = tcnt;
-	}
 	last_tcnt = tcnt;

 	return (overflow_ticks << 32) | tcnt;
--

-- 
1.7.9.1
Dirk Behme | 1 Mar 2012 07:30

Re: [PATCH v2] mx31: Setup AIPS registers

On 29.02.2012 21:56, Fabio Estevam wrote:
> On Wed, Feb 29, 2012 at 5:03 PM, Dirk Behme <dirk.behme <at> googlemail.com> wrote:
> 
>> Hmm, sorry if I missed anything because it's too late here. But:
>>
>> Why now an U-Boot patch? What's about the kernel patch you sent earlier?
>>
>> http://www.spinics.net/lists/arm-kernel/msg162109.html
> 
> The motivation for this patch came after I was debugging audio
> playback on mx31pdk.
> 
> I noticed that audio only worked when I used Redboot.
> 
> Comparing the sources of Redboot and U-boot I saw that the aips
> registers were not set.
> 
> Setting them in U-boot allowed me to get audio playback working.
> 
> Why did I send the aips setting to the kernel? Well, it is not always
> possible for customers to change the bootloader.
> 
> In case the bootloader does not set aips, then this should be done in
> the kernel.
> 
> You can also think on the possibility of someone using the mainline
> U-boot with a kernel that does not set aips, so the safest thing is to
> have such settings in the bootloader and in the kernel.

Ah, thanks for the explanation! :)
(Continue reading)

Thomas Chou | 1 Mar 2012 08:09
Picon

[PATCH] nios2: move gd and bd into BSS

As suggested by Graeme Russ, move gd and bd data structrures
to BSS instead of calculating the locations around the stack
and heap.

CC: Graeme Russ <graeme.russ <at> gmail.com>
CC: Mike Frysinger <vapier <at> gentoo.org>
CC: Alex Hornung <alex <at> alexhornung.com>
Signed-off-by: Thomas Chou <thomas <at> wytron.com.tw>
---
For u-boot.

 arch/nios2/lib/board.c          |   13 ++++++-------
 include/configs/nios2-generic.h |    8 ++------
 2 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/arch/nios2/lib/board.c b/arch/nios2/lib/board.c
index 65de26e..19e688a 100644
--- a/arch/nios2/lib/board.c
+++ b/arch/nios2/lib/board.c
 <at>  <at>  -83,21 +83,20  <at>  <at>  init_fnc_t *init_sequence[] = {

 
 /***********************************************************************/
+gd_t gd_data;
+bd_t bd_data;
+
 void board_init (void)
 {
 	bd_t *bd;
 	init_fnc_t **init_fnc_ptr;
(Continue reading)

Heiko Schocher | 1 Mar 2012 08:50
Picon
Picon
Favicon

Re: [PATCH v4 5/9] tegra: i2c: Add I2C driver

Hello Simon,

Simon Glass wrote:
> From: Yen Lin <yelin <at> nvidia.com>
> 
> Add basic i2c driver for Tegra2 with 8- and 16-bit address support.
> The driver requires CONFIG_OF_CONTROL to obtain its configuration
> from the device tree.
> 
> (Simon Glass: sjg <at> chromium.org modified for upstream)
> 
> Signed-off-by: Simon Glass <sjg <at> chromium.org>

just for completeness (Acked your v2 patch) here again:

Acked-by: Heiko Schocher <hs <at> denx.de>

bye,
Heiko
--

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Igor Grinberg | 1 Mar 2012 09:41
Picon
Favicon

Re: [PATCH] ARMv7: OMAP: Add init function for TWL4030 GBPR1 register

Hi Jonathan,

On 02/29/12 22:52, Jonathan Solnit wrote:
> The OMAP ROM code modifies the GBPR1 register, which can cause

s/GBPR1/GPBR1/

> unintended consequences. 

What do you mean by this?
Can you please elaborate, what issues do you see?
Also, why does the OMAP ROM code needs to touch the GPBR1?

> This patch adds a function to restore GBPR1 to
> its default value.
> 
> Signed-off-by: Jonathan Solnit <jsolnit <at> gmail.com>
> ---
>  drivers/power/twl4030.c |    8 ++++++++
>  include/twl4030.h       |   17 +++++++++++++++++
>  2 files changed, 25 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/power/twl4030.c b/drivers/power/twl4030.c
> index 4a4ddeb..ddaa7e1 100644
> --- a/drivers/power/twl4030.c
> +++ b/drivers/power/twl4030.c
>  <at>  <at>  -103,3 +103,11  <at>  <at>  void twl4030_power_mmc_init(void)
>  				TWL4030_PM_RECEIVER_VMMC1_DEV_GRP,
>  				TWL4030_PM_RECEIVER_DEV_GRP_P1);
>  }
(Continue reading)


Gmane