public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] omap3: i2c: correct register
@ 2017-04-08 22:34 Adam Ford
  2017-04-08 22:53 ` Tom Rini
  2017-04-28 13:07 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 6+ messages in thread
From: Adam Ford @ 2017-04-08 22:34 UTC (permalink / raw)
  To: u-boot

The register names and offset were not correct as per the TRM for OMAP3530
and OMAP3630.  Correct the naing and offsets per the documentation

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/arch/arm/include/asm/arch-omap3/i2c.h b/arch/arm/include/asm/arch-omap3/i2c.h
index b370290..6b3a3da 100644
--- a/arch/arm/include/asm/arch-omap3/i2c.h
+++ b/arch/arm/include/asm/arch-omap3/i2c.h
@@ -17,7 +17,7 @@ struct i2c {
 	unsigned short res2;
 	unsigned short stat;	/* 0x08 */
 	unsigned short res3;
-	unsigned short iv;	/* 0x0C */
+	unsigned short we;	/* 0x0C */
 	unsigned short res4;
 	unsigned short syss;	/* 0x10 */
 	unsigned short res4a;
@@ -43,6 +43,18 @@ struct i2c {
 	unsigned short res14;
 	unsigned short systest;	/* 0x3c */
 	unsigned short res15;
+	unsigned short bufstat;	/* 0x40 */
+	unsigned short res16;
+	unsigned short oa1;	/* 0x44 */
+	unsigned short res17;
+	unsigned short oa2;	/* 0x48 */
+	unsigned short res18;
+	unsigned short oa3;	/* 0x4c */
+	unsigned short res19;
+	unsigned short actoa;	/* 0x50 */
+	unsigned short res20;
+	unsigned short sblock;	/* 0x54 */
+	unsigned short res21;
 };
 
 #endif /* _OMAP3_I2C_H_ */
-- 
2.7.4

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

* [U-Boot] [PATCH] omap3: i2c: correct register
  2017-04-08 22:34 [U-Boot] [PATCH] omap3: i2c: correct register Adam Ford
@ 2017-04-08 22:53 ` Tom Rini
  2017-04-09  2:29   ` Adam Ford
  2017-04-28 13:07 ` [U-Boot] " Tom Rini
  1 sibling, 1 reply; 6+ messages in thread
From: Tom Rini @ 2017-04-08 22:53 UTC (permalink / raw)
  To: u-boot

On Sat, Apr 08, 2017 at 05:34:29PM -0500, Adam Ford wrote:

> The register names and offset were not correct as per the TRM for OMAP3530
> and OMAP3630.  Correct the naing and offsets per the documentation
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> 
> diff --git a/arch/arm/include/asm/arch-omap3/i2c.h b/arch/arm/include/asm/arch-omap3/i2c.h
> index b370290..6b3a3da 100644
> --- a/arch/arm/include/asm/arch-omap3/i2c.h
> +++ b/arch/arm/include/asm/arch-omap3/i2c.h
> @@ -17,7 +17,7 @@ struct i2c {
>  	unsigned short res2;
>  	unsigned short stat;	/* 0x08 */
>  	unsigned short res3;
> -	unsigned short iv;	/* 0x0C */
> +	unsigned short we;	/* 0x0C */
>  	unsigned short res4;
>  	unsigned short syss;	/* 0x10 */
>  	unsigned short res4a;
> @@ -43,6 +43,18 @@ struct i2c {
>  	unsigned short res14;
>  	unsigned short systest;	/* 0x3c */
>  	unsigned short res15;
> +	unsigned short bufstat;	/* 0x40 */
> +	unsigned short res16;
> +	unsigned short oa1;	/* 0x44 */
> +	unsigned short res17;
> +	unsigned short oa2;	/* 0x48 */
> +	unsigned short res18;
> +	unsigned short oa3;	/* 0x4c */
> +	unsigned short res19;
> +	unsigned short actoa;	/* 0x50 */
> +	unsigned short res20;
> +	unsigned short sblock;	/* 0x54 */
> +	unsigned short res21;
>  };

Are we making use of any of these new entries?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170408/84ac2d61/attachment.sig>

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

* [U-Boot] [PATCH] omap3: i2c: correct register
  2017-04-08 22:53 ` Tom Rini
@ 2017-04-09  2:29   ` Adam Ford
  2017-04-10 12:37     ` Tom Rini
  2017-04-10 15:56     ` Heiko Schocher
  0 siblings, 2 replies; 6+ messages in thread
From: Adam Ford @ 2017-04-09  2:29 UTC (permalink / raw)
  To: u-boot

On Sat, Apr 8, 2017 at 5:53 PM, Tom Rini <trini@konsulko.com> wrote:
>
> On Sat, Apr 08, 2017 at 05:34:29PM -0500, Adam Ford wrote:
>
> > The register names and offset were not correct as per the TRM for OMAP3530
> > and OMAP3630.  Correct the naing and offsets per the documentation
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> >
> > diff --git a/arch/arm/include/asm/arch-omap3/i2c.h b/arch/arm/include/asm/arch-omap3/i2c.h
> > index b370290..6b3a3da 100644
> > --- a/arch/arm/include/asm/arch-omap3/i2c.h
> > +++ b/arch/arm/include/asm/arch-omap3/i2c.h
> > @@ -17,7 +17,7 @@ struct i2c {
> >       unsigned short res2;
> >       unsigned short stat;    /* 0x08 */
> >       unsigned short res3;
> > -     unsigned short iv;      /* 0x0C */
> > +     unsigned short we;      /* 0x0C */
> >       unsigned short res4;
> >       unsigned short syss;    /* 0x10 */
> >       unsigned short res4a;
> > @@ -43,6 +43,18 @@ struct i2c {
> >       unsigned short res14;
> >       unsigned short systest; /* 0x3c */
> >       unsigned short res15;
> > +     unsigned short bufstat; /* 0x40 */
> > +     unsigned short res16;
> > +     unsigned short oa1;     /* 0x44 */
> > +     unsigned short res17;
> > +     unsigned short oa2;     /* 0x48 */
> > +     unsigned short res18;
> > +     unsigned short oa3;     /* 0x4c */
> > +     unsigned short res19;
> > +     unsigned short actoa;   /* 0x50 */
> > +     unsigned short res20;
> > +     unsigned short sblock;  /* 0x54 */
> > +     unsigned short res21;
> >  };
>
> Are we making use of any of these new entries?

Not really.  I am trying to get DM_I2C working on OMAP3 and I was
looking through the history of what was done to make it work on AM33xx
and OMAP4+.  Commit 3465f807d4b90378d86b3 ("omap4: i2c: correct
register offset for sync register") corrected some incorrect
registers, so I thought I'd look through the corresponding file for
omap3.  I noticed that offset 0x0C was not named right per the TRM, so
I read through to the rest.  I can see the argument for not pulling in
the new stuff, but I was trying to be consistent with what was done
for omap4 and omap5.

adam

>
>
> --
> Tom

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

* [U-Boot] [PATCH] omap3: i2c: correct register
  2017-04-09  2:29   ` Adam Ford
@ 2017-04-10 12:37     ` Tom Rini
  2017-04-10 15:56     ` Heiko Schocher
  1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2017-04-10 12:37 UTC (permalink / raw)
  To: u-boot

On Sat, Apr 08, 2017 at 09:29:16PM -0500, Adam Ford wrote:
> On Sat, Apr 8, 2017 at 5:53 PM, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Sat, Apr 08, 2017 at 05:34:29PM -0500, Adam Ford wrote:
> >
> > > The register names and offset were not correct as per the TRM for OMAP3530
> > > and OMAP3630.  Correct the naing and offsets per the documentation
> > >
> > > Signed-off-by: Adam Ford <aford173@gmail.com>
> > >
> > > diff --git a/arch/arm/include/asm/arch-omap3/i2c.h b/arch/arm/include/asm/arch-omap3/i2c.h
> > > index b370290..6b3a3da 100644
> > > --- a/arch/arm/include/asm/arch-omap3/i2c.h
> > > +++ b/arch/arm/include/asm/arch-omap3/i2c.h
> > > @@ -17,7 +17,7 @@ struct i2c {
> > >       unsigned short res2;
> > >       unsigned short stat;    /* 0x08 */
> > >       unsigned short res3;
> > > -     unsigned short iv;      /* 0x0C */
> > > +     unsigned short we;      /* 0x0C */
> > >       unsigned short res4;
> > >       unsigned short syss;    /* 0x10 */
> > >       unsigned short res4a;
> > > @@ -43,6 +43,18 @@ struct i2c {
> > >       unsigned short res14;
> > >       unsigned short systest; /* 0x3c */
> > >       unsigned short res15;
> > > +     unsigned short bufstat; /* 0x40 */
> > > +     unsigned short res16;
> > > +     unsigned short oa1;     /* 0x44 */
> > > +     unsigned short res17;
> > > +     unsigned short oa2;     /* 0x48 */
> > > +     unsigned short res18;
> > > +     unsigned short oa3;     /* 0x4c */
> > > +     unsigned short res19;
> > > +     unsigned short actoa;   /* 0x50 */
> > > +     unsigned short res20;
> > > +     unsigned short sblock;  /* 0x54 */
> > > +     unsigned short res21;
> > >  };
> >
> > Are we making use of any of these new entries?
> 
> Not really.  I am trying to get DM_I2C working on OMAP3 and I was
> looking through the history of what was done to make it work on AM33xx
> and OMAP4+.  Commit 3465f807d4b90378d86b3 ("omap4: i2c: correct
> register offset for sync register") corrected some incorrect
> registers, so I thought I'd look through the corresponding file for
> omap3.  I noticed that offset 0x0C was not named right per the TRM, so
> I read through to the rest.  I can see the argument for not pulling in
> the new stuff, but I was trying to be consistent with what was done
> for omap4 and omap5.

OK, thanks.

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170410/55b7df1a/attachment.sig>

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

* [U-Boot] [PATCH] omap3: i2c: correct register
  2017-04-09  2:29   ` Adam Ford
  2017-04-10 12:37     ` Tom Rini
@ 2017-04-10 15:56     ` Heiko Schocher
  1 sibling, 0 replies; 6+ messages in thread
From: Heiko Schocher @ 2017-04-10 15:56 UTC (permalink / raw)
  To: u-boot

Hello Adam,

Am 09.04.2017 um 04:29 schrieb Adam Ford:
> On Sat, Apr 8, 2017 at 5:53 PM, Tom Rini <trini@konsulko.com> wrote:
>>
>> On Sat, Apr 08, 2017 at 05:34:29PM -0500, Adam Ford wrote:
>>
>>> The register names and offset were not correct as per the TRM for OMAP3530
>>> and OMAP3630.  Correct the naing and offsets per the documentation
>>>
>>> Signed-off-by: Adam Ford <aford173@gmail.com>
>>>
>>> diff --git a/arch/arm/include/asm/arch-omap3/i2c.h b/arch/arm/include/asm/arch-omap3/i2c.h
>>> index b370290..6b3a3da 100644
>>> --- a/arch/arm/include/asm/arch-omap3/i2c.h
>>> +++ b/arch/arm/include/asm/arch-omap3/i2c.h
>>> @@ -17,7 +17,7 @@ struct i2c {
>>>        unsigned short res2;
>>>        unsigned short stat;    /* 0x08 */
>>>        unsigned short res3;
>>> -     unsigned short iv;      /* 0x0C */
>>> +     unsigned short we;      /* 0x0C */
>>>        unsigned short res4;
>>>        unsigned short syss;    /* 0x10 */
>>>        unsigned short res4a;
>>> @@ -43,6 +43,18 @@ struct i2c {
>>>        unsigned short res14;
>>>        unsigned short systest; /* 0x3c */
>>>        unsigned short res15;
>>> +     unsigned short bufstat; /* 0x40 */
>>> +     unsigned short res16;
>>> +     unsigned short oa1;     /* 0x44 */
>>> +     unsigned short res17;
>>> +     unsigned short oa2;     /* 0x48 */
>>> +     unsigned short res18;
>>> +     unsigned short oa3;     /* 0x4c */
>>> +     unsigned short res19;
>>> +     unsigned short actoa;   /* 0x50 */
>>> +     unsigned short res20;
>>> +     unsigned short sblock;  /* 0x54 */
>>> +     unsigned short res21;
>>>   };
>>
>> Are we making use of any of these new entries?
>
> Not really.  I am trying to get DM_I2C working on OMAP3 and I was
> looking through the history of what was done to make it work on AM33xx
> and OMAP4+.  Commit 3465f807d4b90378d86b3 ("omap4: i2c: correct
> register offset for sync register") corrected some incorrect
> registers, so I thought I'd look through the corresponding file for
> omap3.  I noticed that offset 0x0C was not named right per the TRM, so
> I read through to the rest.  I can see the argument for not pulling in
> the new stuff, but I was trying to be consistent with what was done
> for omap4 and omap5.

I like to have this corrected version, so:

Reviewed-by: Heiko Schocher <hs@denx.de>

but last OK should come from Tom, thanks!

bye,
Heiko
>
> adam
>
>>
>>
>> --
>> Tom
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
>

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

* [U-Boot] omap3: i2c: correct register
  2017-04-08 22:34 [U-Boot] [PATCH] omap3: i2c: correct register Adam Ford
  2017-04-08 22:53 ` Tom Rini
@ 2017-04-28 13:07 ` Tom Rini
  1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2017-04-28 13:07 UTC (permalink / raw)
  To: u-boot

On Sat, Apr 08, 2017 at 05:34:29PM -0500, Adam Ford wrote:

> The register names and offset were not correct as per the TRM for OMAP3530
> and OMAP3630.  Correct the naing and offsets per the documentation
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Heiko Schocher <hs@denx.de>
> 
> diff --git a/arch/arm/include/asm/arch-omap3/i2c.h b/arch/arm/include/asm/arch-omap3/i2c.h
> index b370290..6b3a3da 100644

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170428/bd80c2c9/attachment.sig>

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

end of thread, other threads:[~2017-04-28 13:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-08 22:34 [U-Boot] [PATCH] omap3: i2c: correct register Adam Ford
2017-04-08 22:53 ` Tom Rini
2017-04-09  2:29   ` Adam Ford
2017-04-10 12:37     ` Tom Rini
2017-04-10 15:56     ` Heiko Schocher
2017-04-28 13:07 ` [U-Boot] " Tom Rini

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