All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] External RTC in MPC860P (i2c - rtc DS1307)
Date: Wed, 10 May 2006 15:32:09 +0200	[thread overview]
Message-ID: <20060510133209.751EE352B0C@atlas.denx.de> (raw)
In-Reply-To: Your message of "Wed, 10 May 2006 05:21:58 PDT." <20060510122158.47635.qmail@web36907.mail.mud.yahoo.com>

In message <20060510122158.47635.qmail@web36907.mail.mud.yahoo.com> you wrote:
> 
> We are interfacing external RTC DS1307 in MPC860P(40MHz core frequency).
> I've configured the following files in U-boot-1.1.3.

Why are you using old code?

> 1.    In i2c.c

You should never have to modify this file.

> #define    CFG_I2C_SLAVE         0xFE
...
> 2.    In  include/configs/BOARD.h
...
> #define    CFG_I2C_SLAVE         0x7F

SO what is your slave address? 0xFE or 0x7F ?

> #define    CONFIG_HARD_I2C       1

Makes not much sense to me. I prefer to use soft-I2C.

> 3.    In <board/board.h>
...
> #define    CONFIG_HARD_I2C       1
> #define    CFG_I2C_SPEED        50000
> #define    CFG_I2C_SLAVE         0xFE

And yet another set of definitions?

Do NOT do this.

> Is the above things correct in order to get the date and time
> up and running in an MPC860P based custom board.

No, this is NOT correct. You must  not  define  the  same  things  in
several place, and differently. Use a single definition in your board
config file, and make sure it is correct.


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Ill-chosen abstraction is particularly evident in the design  of  the
ADA  runtime  system.  The  interface to the ADA runtime system is so
opaque that it is impossible to model  or  predict  its  performance,
making it effectively useless for real-time systems.
                              - Marc D.  Donner and David H. Jameson.

  reply	other threads:[~2006-05-10 13:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-10 12:21 [U-Boot-Users] External RTC in MPC860P (i2c - rtc DS1307) Anand Mallya
2006-05-10 13:32 ` Wolfgang Denk [this message]
2006-05-12  8:53   ` Anand Mallya
2006-05-12  9:04     ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060510133209.751EE352B0C@atlas.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.