Skip to content

Commit

Permalink
Merge from eCos master repository on 2000-06-02-07:47:04-BST
Browse files Browse the repository at this point in the history
  • Loading branch information
jlarmour committed Jun 2, 2000
1 parent acace18 commit 3f5827f
Show file tree
Hide file tree
Showing 58 changed files with 2,861 additions and 527 deletions.
2 changes: 1 addition & 1 deletion host/tools/ecostest/common/eCosTestDownloadFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#include "eCosStd.h"
#include "eCosTrace.h"

#define DL_FILTER_VER "$Id: eCosTestDownloadFilter.cpp,v 1.9 2000/05/26 13:46:34 jlarmour Exp $"
#define DL_FILTER_VER "$Id: eCosTestDownloadFilter.cpp,v 1.10 2000/06/02 17:35:00 jlarmour Exp $"
#include "eCosTestDownloadFilter.h"

CeCosTestDownloadFilter::CeCosTestDownloadFilter():
Expand Down
2 changes: 1 addition & 1 deletion host/tools/ecostest/common/eCosTestMonitorFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

#include "eCosStd.h"

#define SER_FILTER_VER "$Id: eCosTestMonitorFilter.cpp,v 1.8 2000/05/26 13:46:34 jlarmour Exp $"
#define SER_FILTER_VER "$Id: eCosTestMonitorFilter.cpp,v 1.9 2000/06/02 17:35:00 jlarmour Exp $"
#include "eCosTestMonitorFilter.h"

CeCosTestMonitorFilter::CeCosTestMonitorFilter():
Expand Down
2 changes: 1 addition & 1 deletion host/tools/ecostest/common/eCosTestSerialFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

#include "eCosStd.h"

#define SER_FILTER_VER "$Id: eCosTestSerialFilter.cpp,v 1.9 2000/05/26 13:46:34 jlarmour Exp $"
#define SER_FILTER_VER "$Id: eCosTestSerialFilter.cpp,v 1.10 2000/06/02 17:35:00 jlarmour Exp $"
#include "eCosTestSerialFilter.h"
#include "eCosThreadUtils.h"

Expand Down
16 changes: 16 additions & 0 deletions packages/ChangeLog
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
Expand Down
5 changes: 5 additions & 0 deletions packages/NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
* Hitachi SH3 CqREEK (cq7708) platform HAL support added
Contributed by Haruki Kashiwaya [Still untested, serial not imported]
* Watchdog reworked much like wallclock.
Common code and API in io/watchdog, simpler (smaller) low-level drivers in
devs/watchdog/<arch>.
* IO serial driver
The common serial driver has been extended with a configurable option for
a non-blocking read/write mode. It has also been given some new callbacks
Expand Down
29 changes: 29 additions & 0 deletions packages/devs/wallclock/dallas/ds1742/current/ChangeLog
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 packages/devs/wallclock/dallas/ds1742/current/ds1742.inl
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 packages/devs/wallclock/dallas/ds1742/current/wallclock_ds1742.cdl
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."
}
7 changes: 7 additions & 0 deletions packages/devs/wallclock/sh3/current/ChangeLog
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.
Expand Down
3 changes: 0 additions & 3 deletions packages/devs/wallclock/sh3/current/cdl/wallclock_sh3.cdl
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ cdl_package CYGPKG_DEVICES_WALLCLOCK_SH3 {
requires CYGPKG_HAL_SH
hardware
compile wallclock_sh3.cxx
define_proc {
puts $::cdl_header "#undef CYGSEM_WALLCLOCK_SET_GET_MODE"
}
implements CYGINT_WALLCLOCK_HW_IMPLEMENTATIONS
active_if CYGIMP_WALLCLOCK_HARDWARE

Expand Down
5 changes: 2 additions & 3 deletions packages/devs/wallclock/sh3/current/src/wallclock_sh3.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,14 @@
#include <pkgconf/kernel.h> // Kernel config
#include <pkgconf/wallclock.h> // Wallclock device config

#include <cyg/hal/hal_io.h> // IO macros
#include <cyg/infra/cyg_type.h> // Common type definitions and support

#define __CYGBLD_DRIVER_PRIVATE
#include <cyg/io/wallclock.hxx> // The WallClock API
#include <cyg/io/wallclock/wallclock.inl> // Helpers

#include <cyg/hal/sh_regs.h> // RTC register definitions

#include <cyg/hal/hal_io.h> // IO macros

#include <cyg/infra/diag.h> // For debugging


Expand Down
35 changes: 35 additions & 0 deletions packages/devs/watchdog/arm/aeb/current/ChangeLog
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####
Loading

0 comments on commit 3f5827f

Please sign in to comment.