-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge from eCos master repository on 2000-06-02-07:47:04-BST
- Loading branch information
jlarmour
committed
Jun 2, 2000
1 parent
acace18
commit 3f5827f
Showing
58 changed files
with
2,861 additions
and
527 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
2000-05-31 Jesper Skov <[email protected]> | ||
|
||
* ecos.db: Added CqREEK platform HAL (contributed by Haruki | ||
Kashiwaya). | ||
|
||
2000-05-31 Jesper Skov <[email protected]> | ||
|
||
* ecos.db: Moved watchdog drivers around. Common code in | ||
io/watchdog, low-level drivers in devs/watchdog/<arch>. | ||
CYGPKG_DEVICES_WATCHDOG is now called CYGPKG_IO_WATCHDOG and | ||
targets include individual hardware drivers. | ||
|
||
2000-05-26 Jesper Skov <[email protected]> | ||
|
||
* ecos.db: Added dallas 1742 wallclock driver package. | ||
|
||
2000-04-11 Hugo Tyson <[email protected]> | ||
|
||
* ecos.db: CYGPKG_IO_SERIAL should not be "hardware" now that it | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
2000-05-26 Jesper Skov <[email protected]> | ||
* wallclock_ds1742.cdl: | ||
Parent under IO/Wallclock. | ||
|
||
//####COPYRIGHTBEGIN#### | ||
// | ||
// ------------------------------------------- | ||
// The contents of this file are subject to the Red Hat eCos Public License | ||
// Version 1.1 (the "License"); you may not use this file except in | ||
// compliance with the License. You may obtain a copy of the License at | ||
// http://www.redhat.com/ | ||
// | ||
// Software distributed under the License is distributed on an "AS IS" | ||
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | ||
// License for the specific language governing rights and limitations under | ||
// the License. | ||
// | ||
// The Original Code is eCos - Embedded Configurable Operating System, | ||
// released September 30, 1998. | ||
// | ||
// The Initial Developer of the Original Code is Red Hat. | ||
// Portions created by Red Hat are | ||
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc. | ||
// All Rights Reserved. | ||
// ------------------------------------------- | ||
// | ||
//####COPYRIGHTEND#### | ||
|
||
|
174 changes: 174 additions & 0 deletions
174
packages/devs/wallclock/dallas/ds1742/current/ds1742.inl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
//========================================================================== | ||
// | ||
// devs/wallclock/ds1742.inl | ||
// | ||
// Wallclock implementation for Dallas 1742 | ||
// | ||
//========================================================================== | ||
//####COPYRIGHTBEGIN#### | ||
// | ||
// ------------------------------------------- | ||
// The contents of this file are subject to the Red Hat eCos Public License | ||
// Version 1.1 (the "License"); you may not use this file except in | ||
// compliance with the License. You may obtain a copy of the License at | ||
// http://www.redhat.com/ | ||
// | ||
// Software distributed under the License is distributed on an "AS IS" | ||
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | ||
// License for the specific language governing rights and limitations under | ||
// the License. | ||
// | ||
// The Original Code is eCos - Embedded Configurable Operating System, | ||
// released September 30, 1998. | ||
// | ||
// The Initial Developer of the Original Code is Red Hat. | ||
// Portions created by Red Hat are | ||
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc. | ||
// All Rights Reserved. | ||
// ------------------------------------------- | ||
// | ||
//####COPYRIGHTEND#### | ||
//========================================================================== | ||
//#####DESCRIPTIONBEGIN#### | ||
// | ||
// Author(s): jskov | ||
// Contributors: jskov | ||
// Date: 2000-05-25 | ||
// Purpose: Wallclock driver for Dallas 1742 | ||
// | ||
//####DESCRIPTIONEND#### | ||
// | ||
//========================================================================== | ||
|
||
#ifndef DS_BASE | ||
# error "Need to know base of DS1742 RAM" | ||
#endif | ||
|
||
#include <cyg/infra/cyg_type.h> // Common type definitions and support | ||
#include <cyg/hal/hal_io.h> // IO macros | ||
|
||
// Offsets from DS_BASE | ||
#define DS_SECONDS 0x7f9 // control bit! | ||
#define DS_SECONDS_MASK 0x7f | ||
#define DS_MINUTES 0x7fa | ||
#define DS_HOUR 0x7fb | ||
#define DS_DAY 0x7fc // control bits | ||
#define DS_DAY_MASK 0x07 | ||
#define DS_DATE 0x7fd | ||
#define DS_MONTH 0x7fe | ||
#define DS_YEAR 0x7ff | ||
#define DS_CENTURY 0x7f8 // control bits! | ||
#define DS_CENTURY_MASK 0x3f | ||
|
||
// Control bits | ||
#define DS_SECONDS_OSC 0x80 // set to stop oscillator (power save) | ||
#define DS_CENTURY_READ 0x40 // set during read | ||
#define DS_CENTURY_WRITE 0x80 // set during write | ||
#define DS_DAY_BF 0x80 // battery flag | ||
#define DS_DAY_FT 0x40 // frequency test | ||
|
||
|
||
// Make sure test modes are disabled and that clock is running. | ||
static void | ||
init_ds_hwclock(void) | ||
{ | ||
cyg_uint8 _tmp; | ||
|
||
// Enable clock | ||
HAL_READ_UINT8(DS_BASE+DS_SECONDS, _tmp); | ||
_tmp &= ~DS_SECONDS_OSC; | ||
HAL_WRITE_UINT8(DS_BASE+DS_SECONDS, _tmp); | ||
|
||
// clear frequency test | ||
HAL_READ_UINT8(DS_BASE+DS_DAY, _tmp); | ||
_tmp &= ~DS_DAY_FT; | ||
HAL_WRITE_UINT8(DS_BASE+DS_DAY, _tmp); | ||
} | ||
|
||
|
||
static void | ||
set_ds_hwclock(cyg_uint32 year, cyg_uint32 month, cyg_uint32 mday, | ||
cyg_uint32 hour, cyg_uint32 minute, cyg_uint32 second) | ||
{ | ||
cyg_uint8 _tmp; | ||
// Init write operation | ||
HAL_READ_UINT8(DS_BASE+DS_CENTURY, _tmp); | ||
_tmp &= ~(DS_CENTURY_WRITE|DS_CENTURY_READ); | ||
_tmp |= DS_CENTURY_WRITE; | ||
HAL_WRITE_UINT8(DS_BASE+DS_CENTURY, _tmp); | ||
|
||
// Entries with control bits | ||
HAL_READ_UINT8(DS_BASE+DS_CENTURY, _tmp); | ||
_tmp &= ~DS_CENTURY_MASK; | ||
_tmp |= TO_BCD(year/100) & DS_CENTURY_MASK; | ||
HAL_WRITE_UINT8(DS_BASE+DS_CENTURY, _tmp); | ||
|
||
HAL_READ_UINT8(DS_BASE+DS_SECONDS, _tmp); | ||
_tmp &= ~DS_SECONDS_MASK; | ||
_tmp |= TO_BCD(second) & DS_SECONDS_MASK; | ||
HAL_WRITE_UINT8(DS_BASE+DS_SECONDS, _tmp); | ||
|
||
HAL_READ_UINT8(DS_BASE+DS_DAY, _tmp); | ||
_tmp &= ~DS_DAY_FT; // clear frequency test | ||
HAL_WRITE_UINT8(DS_BASE+DS_DAY, _tmp); | ||
|
||
|
||
// Dedicated entries | ||
HAL_WRITE_UINT8(DS_BASE+DS_YEAR, TO_BCD(year % 100)); | ||
HAL_WRITE_UINT8(DS_BASE+DS_MONTH, TO_BCD(month)); | ||
HAL_WRITE_UINT8(DS_BASE+DS_DATE, TO_BCD(mday)); | ||
HAL_WRITE_UINT8(DS_BASE+DS_HOUR, TO_BCD(hour)); | ||
HAL_WRITE_UINT8(DS_BASE+DS_MINUTES, TO_BCD(minute)); | ||
|
||
// Enable clock | ||
HAL_READ_UINT8(DS_BASE+DS_SECONDS, _tmp); | ||
_tmp &= ~DS_SECONDS_OSC; | ||
HAL_WRITE_UINT8(DS_BASE+DS_SECONDS, _tmp); | ||
|
||
// Finish write operation | ||
HAL_READ_UINT8(DS_BASE+DS_CENTURY, _tmp); | ||
_tmp &= ~(DS_CENTURY_WRITE|DS_CENTURY_READ); | ||
HAL_WRITE_UINT8(DS_BASE+DS_CENTURY, _tmp); | ||
} | ||
|
||
static void | ||
get_ds_hwclock(cyg_uint32* year, cyg_uint32* month, cyg_uint32* mday, | ||
cyg_uint32* hour, cyg_uint32* minute, cyg_uint32* second) | ||
{ | ||
cyg_uint8 _tmp; | ||
|
||
// Init read operation | ||
HAL_READ_UINT8(DS_BASE+DS_CENTURY, _tmp); | ||
_tmp &= ~(DS_CENTURY_WRITE|DS_CENTURY_READ); | ||
_tmp |= DS_CENTURY_READ; | ||
HAL_WRITE_UINT8(DS_BASE+DS_CENTURY, _tmp); | ||
|
||
// Entries with control bits | ||
HAL_READ_UINT8(DS_BASE+DS_CENTURY, _tmp); | ||
_tmp &= DS_CENTURY_MASK; | ||
*year = 100*TO_DEC(_tmp); | ||
|
||
HAL_READ_UINT8(DS_BASE+DS_SECONDS, _tmp); | ||
_tmp &= DS_SECONDS_MASK; | ||
*second = TO_DEC(_tmp); | ||
|
||
// Dedicated entries | ||
HAL_READ_UINT8(DS_BASE+DS_YEAR, _tmp); | ||
*year += TO_DEC(_tmp); | ||
HAL_READ_UINT8(DS_BASE+DS_MONTH, _tmp); | ||
*month = TO_DEC(_tmp); | ||
HAL_READ_UINT8(DS_BASE+DS_DATE, _tmp); | ||
*mday = TO_DEC(_tmp); | ||
HAL_READ_UINT8(DS_BASE+DS_HOUR, _tmp); | ||
*hour = TO_DEC(_tmp); | ||
HAL_READ_UINT8(DS_BASE+DS_MINUTES, _tmp); | ||
*minute = TO_DEC(_tmp); | ||
|
||
// Finish read operation | ||
HAL_READ_UINT8(DS_BASE+DS_CENTURY, _tmp); | ||
_tmp &= ~(DS_CENTURY_WRITE|DS_CENTURY_READ); | ||
HAL_WRITE_UINT8(DS_BASE+DS_CENTURY, _tmp); | ||
} | ||
|
||
//----------------------------------------------------------------------------- | ||
// End of devs/wallclock/ds1742.inl |
51 changes: 51 additions & 0 deletions
51
packages/devs/wallclock/dallas/ds1742/current/wallclock_ds1742.cdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# ==================================================================== | ||
# | ||
# wallclock_ds1742.cdl | ||
# | ||
# eCos configuration data for Dallas 1742 | ||
# | ||
# ==================================================================== | ||
#####COPYRIGHTBEGIN#### | ||
# | ||
# ------------------------------------------- | ||
# The contents of this file are subject to the Red Hat eCos Public License | ||
# Version 1.1 (the "License"); you may not use this file except in | ||
# compliance with the License. You may obtain a copy of the License at | ||
# http://www.redhat.com/ | ||
# | ||
# Software distributed under the License is distributed on an "AS IS" | ||
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing rights and limitations under | ||
# the License. | ||
# | ||
# The Original Code is eCos - Embedded Configurable Operating System, | ||
# released September 30, 1998. | ||
# | ||
# The Initial Developer of the Original Code is Red Hat. | ||
# Portions created by Red Hat are | ||
# Copyright (C) 1998, 1999, 2000 Red Hat, Inc. | ||
# All Rights Reserved. | ||
# ------------------------------------------- | ||
# | ||
#####COPYRIGHTEND#### | ||
# ==================================================================== | ||
######DESCRIPTIONBEGIN#### | ||
# | ||
# Author(s): jskov | ||
# Contributors: jskov | ||
# Date: 2000-05-26 | ||
# | ||
#####DESCRIPTIONEND#### | ||
# | ||
# ==================================================================== | ||
|
||
cdl_package CYGPKG_DEVICES_WALLCLOCK_DALLAS_DS1742 { | ||
parent CYGPKG_IO_WALLCLOCK | ||
active_if CYGPKG_IO_WALLCLOCK | ||
display "Wallclock device driver for Dallas 1742" | ||
include_dir cyg/io/wallclock | ||
include_files ds1742.inl | ||
description " | ||
This package provides a file with init, get and set functions | ||
for the Dallas 1742 clock part." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
2000-05-26 Jesper Skov <[email protected]> | ||
|
||
* cdl/wallclock_sh3.cdl: CYGSEM_WALLCLOCK_SET_GET_MODE moved to IO | ||
package. | ||
|
||
* src/wallclock_sh3.cxx: Get helpers from new file. | ||
|
||
2000-04-06 Jesper Skov <[email protected]> | ||
|
||
* cdl/wallclock_sh3.cdl: Only active when wallclock is. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
2000-05-31 Jesper Skov <[email protected]> | ||
|
||
* cdl/watchdog_aeb.cdl: | ||
* src/watchdog_aeb.cxx: | ||
Driver moved to devs/watchdog/arm/aeb. Stripped out | ||
unrelated ChangeLog entries. | ||
|
||
1999-09-07 Jesper Skov <[email protected]> | ||
|
||
* src/aeb1.cxx: [added] | ||
Added watchdog driver for AEB-1 board. | ||
|
||
//####COPYRIGHTBEGIN#### | ||
// | ||
// ------------------------------------------- | ||
// The contents of this file are subject to the Red Hat eCos Public License | ||
// Version 1.1 (the "License"); you may not use this file except in | ||
// compliance with the License. You may obtain a copy of the License at | ||
// http://www.redhat.com/ | ||
// | ||
// Software distributed under the License is distributed on an "AS IS" | ||
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | ||
// License for the specific language governing rights and limitations under | ||
// the License. | ||
// | ||
// The Original Code is eCos - Embedded Configurable Operating System, | ||
// released September 30, 1998. | ||
// | ||
// The Initial Developer of the Original Code is Red Hat. | ||
// Portions created by Red Hat are | ||
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc. | ||
// All Rights Reserved. | ||
// ------------------------------------------- | ||
// | ||
//####COPYRIGHTEND#### |
Oops, something went wrong.