Subject: Re: O2 sync almost done
To: Christopher SEKIYA <wileyc@rezrov.net>
From: Rafal Boni <rafal@attbi.com>
List: port-sgimips
Date: 01/07/2003 09:19:01
--==_Exmh_13552622811P
Content-Type: text/plain; charset=us-ascii

In message <20030107044403.GA11464@rezrov.net>, you write: 

-> On Tue, Jan 07, 2003 at 10:29:22AM +0900, Christopher SEKIYA wrote:
-> 
-> > I'm thinking maybe the FROM_IRIX_YEAR/TO_IRIX_YEAR bits might be incorrect
-> 
-> Nope, that wasn't it.

Hmm, note that Linux on IP32 does:

static unsigned char ip32_rtc_read_data(unsigned long addr)
{
        return (unsigned char) mace_read_8 (MACEISA_RTC_BASE + (addr << 8));
}

static void ip32_rtc_write_data(unsigned char data, unsigned long addr)
{
        mace_write_8 (MACEISA_RTC_BASE + (addr << 8), data);
}

Where mace_read_8 and mace_write_8 access (MACE_BASE + __offset), __offset
being the first argument.  Our bus_space code for sgimips OTOH, attempts to
access (MACEISA_RTC_BASE + (__offset << 8) + 7) instead if I convert the
parameters to match the linux nomenclature here...

I'm not sure why com@mace works but the RTC doesn't and I can't find the
sparse bits of docs I have  ATM.

--rafal

----
Rafal Boni                                                     rafal@attbi.com
  We are all worms.  But I do believe I am a glowworm.  -- Winston Churchill

--==_Exmh_13552622811P
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Content-Type: text/plain; charset=us-ascii

In message <20030107044403.GA11464@rezrov.net>, you write: 

- -> On Tue, Jan 07, 2003 at 10:29:22AM +0900, Christopher SEKIYA wrote:
- -> 
- -> > I'm thinking maybe the FROM_IRIX_YEAR/TO_IRIX_YEAR bits might be incorrect
- -> 
- -> Nope, that wasn't it.

Hmm, note that Linux on IP32 does:

static unsigned char ip32_rtc_read_data(unsigned long addr)
{
        return (unsigned char) mace_read_8 (MACEISA_RTC_BASE + (addr << 8));
}

static void ip32_rtc_write_data(unsigned char data, unsigned long addr)
{
        mace_write_8 (MACEISA_RTC_BASE + (addr << 8), data);
}

Where mace_read_8 and mace_write_8 access (MACE_BASE + __offset), __offset
being the first argument.  Our bus_space code for sgimips OTOH, attempts to
access (MACEISA_RTC_BASE + (__offset << 8) + 7) instead if I convert the
parameters to match the linux nomenclature here...

I'm not sure why com@mace works but the RTC doesn't and I can't find the
sparse bits of docs I have  ATM.

- --rafal

- ----
Rafal Boni                                                     rafal@attbi.com
  We are all worms.  But I do believe I am a glowworm.  -- Winston Churchill
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (NetBSD)
Comment: Exmh version 2.5 07/13/2001

iD8DBQE+GuHVEeBxM8fTAkwRAiExAKDQcszFSkvgxB0EQ70D+fHZgfn01QCghxzI
C1/dggzBgYQI2hCnD25RgXI=
=lIpi
-----END PGP SIGNATURE-----

--==_Exmh_13552622811P--