* [U-Boot-Users] DS1374 watchdog capabilities
@ 2006-08-28 10:24 llandre
2006-08-28 10:30 ` Liu Dave-r63238
2006-08-28 11:02 ` Wolfgang Denk
0 siblings, 2 replies; 6+ messages in thread
From: llandre @ 2006-08-28 10:24 UTC (permalink / raw)
To: u-boot
Hi,
I'd like to use DS1374 watchdog capabilities. Is it correct to put the
new stuff in the existing RTC driver (rtc/ds1374.c)? I was thinking
about something like this:
#if (defined(CONFIG_RTC_DS1374)) &&
#if (CONFIG_COMMANDS & CFG_CMD_DATE)
existing stuff
#endif
#if (CONFIG_WATCHDOG)
new stuff
#endif
#endif
If it is not acceptable, where should I put the new stuff?
TIA,
llandre
DAVE Electronics System House - R&D Department
web: http://www.dave-tech.it
email: r&d2 at dave-tech.it
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] DS1374 watchdog capabilities
2006-08-28 10:24 [U-Boot-Users] DS1374 watchdog capabilities llandre
@ 2006-08-28 10:30 ` Liu Dave-r63238
2006-08-28 11:02 ` Wolfgang Denk
1 sibling, 0 replies; 6+ messages in thread
From: Liu Dave-r63238 @ 2006-08-28 10:30 UTC (permalink / raw)
To: u-boot
> I'd like to use DS1374 watchdog capabilities. Is it correct
> to put the new stuff in the existing RTC driver
> (rtc/ds1374.c)? I was thinking about something like this:
>
> #if (defined(CONFIG_RTC_DS1374)) &&
>
> #if (CONFIG_COMMANDS & CFG_CMD_DATE)
> existing stuff
> #endif
>
> #if (CONFIG_WATCHDOG)
> new stuff
> #endif
>
> #endif
>
> If it is not acceptable, where should I put the new stuff?
I remember the u-boot of git support DS1374 RTC function.
-DAve
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] DS1374 watchdog capabilities
2006-08-28 10:24 [U-Boot-Users] DS1374 watchdog capabilities llandre
2006-08-28 10:30 ` Liu Dave-r63238
@ 2006-08-28 11:02 ` Wolfgang Denk
2006-08-28 11:13 ` llandre
1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2006-08-28 11:02 UTC (permalink / raw)
To: u-boot
In message <44F2C473.5030000@dave-tech.it> you wrote:
>
> I'd like to use DS1374 watchdog capabilities. Is it correct to put the
> new stuff in the existing RTC driver (rtc/ds1374.c)? I was thinking
I don't like this idea. Nobody will search there when looking for
watchdog code.
> #if (CONFIG_WATCHDOG)
> new stuff
> #endif
How much of such "new stuff" code will be needed? I guess it's just
some intialization, and eventually the trigger routine?
> If it is not acceptable, where should I put the new stuff?
drivers/watchdog/ds1374.c ?
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
A meeting is an event at which the minutes are kept and the hours are
lost.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] DS1374 watchdog capabilities
2006-08-28 11:02 ` Wolfgang Denk
@ 2006-08-28 11:13 ` llandre
2006-08-31 11:21 ` llandre
0 siblings, 1 reply; 6+ messages in thread
From: llandre @ 2006-08-28 11:13 UTC (permalink / raw)
To: u-boot
>> I'd like to use DS1374 watchdog capabilities. Is it correct to put the
>> new stuff in the existing RTC driver (rtc/ds1374.c)? I was thinking
>
> I don't like this idea. Nobody will search there when looking for
> watchdog code.
I see.
> How much of such "new stuff" code will be needed? I guess it's just
> some intialization, and eventually the trigger routine?
Yes, something like that.
>> If it is not acceptable, where should I put the new stuff?
>
> drivers/watchdog/ds1374.c ?
Ok.
What about the common stuff (registers definitions for example) in order
to avoid code duplication? Is it ok to add include/ds1374.h and to make
and to make functions rtc_read and rtc_write_raw non-static?
--
llandre
DAVE Electronics System House - R&D Department
web: http://www.dave-tech.it
email: r&d2 at dave-tech.it
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] DS1374 watchdog capabilities
2006-08-28 11:13 ` llandre
@ 2006-08-31 11:21 ` llandre
2006-08-31 12:27 ` Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: llandre @ 2006-08-31 11:21 UTC (permalink / raw)
To: u-boot
> What about the common stuff (registers definitions for example) in order
> to avoid code duplication? Is it ok to add include/ds1374.h
> and to make functions rtc_read and rtc_write_raw non-static?
What about this proposal?
--
llandre
DAVE Electronics System House - R&D Department
web: http://www.dave-tech.it
email: r&d2 at dave-tech.it
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] DS1374 watchdog capabilities
2006-08-31 11:21 ` llandre
@ 2006-08-31 12:27 ` Wolfgang Denk
0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2006-08-31 12:27 UTC (permalink / raw)
To: u-boot
In message <44F6C648.9010904@dave-tech.it> you wrote:
> > What about the common stuff (registers definitions for example) in order
> > to avoid code duplication? Is it ok to add include/ds1374.h
Sounds ok to me.
> > and to make functions rtc_read and rtc_write_raw non-static?
Then the functions should probably be renamed, too.
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
One does not thank logic.
-- Sarek, "Journey to Babel", stardate 3842.4
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-08-31 12:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-28 10:24 [U-Boot-Users] DS1374 watchdog capabilities llandre
2006-08-28 10:30 ` Liu Dave-r63238
2006-08-28 11:02 ` Wolfgang Denk
2006-08-28 11:13 ` llandre
2006-08-31 11:21 ` llandre
2006-08-31 12:27 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox