Commit 7152b1d0 authored by wdenk's avatar wdenk
Browse files

* Add support for SK98xx driver

* Add PCI support for SL8245 board

* Support IceCube board configurations with 1 x AMD AM29LV065 (8 MB)
  or 1 x AM29LV652 (two LV065 in one chip = 16 MB);
  Run IPB at 133 Mhz; adjust the MII clock frequency accordingly

* Set BRG_CLK on PM825/826 to 64MHz (VCO_OUT / 4, instead of 16  MHz)
  to allow for more accurate baudrate settings
  (error now 0.7% at 115 kbps, instead of 3.5% before)

* Patch by Andreas Mohr, 4 Sep 2003:
  Fix a lot of spelling errors
parent 4d816774
......@@ -2,6 +2,21 @@
Changes for U-Boot 0.4.7:
======================================================================
* Add support for SK98xx driver
* Add PCI support for SL8245 board
* Support IceCube board configurations with 1 x AMD AM29LV065 (8 MB)
or 1 x AM29LV652 (two LV065 in one chip = 16 MB);
Run IPB at 133 Mhz; adjust the MII clock frequency accordingly
* Set BRG_CLK on PM825/826 to 64MHz (VCO_OUT / 4, instead of 16 MHz)
to allow for more accurate baudrate settings
(error now 0.7% at 115 kbps, instead of 3.5% before)
* Patch by Andreas Mohr, 4 Sep 2003:
Fix a lot of spelling errors
* Add support for PPChameleon Eval Board
* Add support for P3G4 board
......
......@@ -87,6 +87,7 @@ SUBDIRS = tools \
rtc \
dtt \
drivers \
drivers/sk98lin \
post \
post/cpu \
examples
......@@ -112,6 +113,7 @@ LIBS += disk/libdisk.a
LIBS += rtc/librtc.a
LIBS += dtt/libdtt.a
LIBS += drivers/libdrivers.a
LIBS += drivers/sk98lin/libsk98lin.a
LIBS += post/libpost.a post/cpu/libcpu.a
LIBS += common/libcommon.a
LIBS += lib_generic/libgeneric.a
......@@ -142,7 +144,7 @@ u-boot.dis: u-boot
u-boot: depend subdirs $(OBJS) $(LIBS) $(LDSCRIPT)
UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
$(LD) $(LDFLAGS) $$UNDEF_SYM $(OBJS) \
--start-group $(LIBS) --end-group \
--start-group $(LIBS) $(PLATFORM_LIBS) --end-group \
-Map u-boot.map -o u-boot
subdirs:
......
......@@ -119,12 +119,12 @@ U-Boot will always have a patchlevel of "0".
Directory Hierarchy:
====================
- board Board dependend files
- common Misc architecture independend functions
- board Board dependent files
- common Misc architecture independent functions
- cpu CPU specific files
- disk Code for disk drive partition handling
- doc Documentation (don't expect too much)
- drivers Common used device drivers
- drivers Commonly used device drivers
- dtt Digital Thermometer and Thermostat drivers
- examples Example code for standalone applications, etc.
- include Header Files
......@@ -644,7 +644,7 @@ The following options need to be configured:
- Watchdog:
CONFIG_WATCHDOG
If this variable is defined, it enables watchdog
support. There must support in the platform specific
support. There must be support in the platform specific
code for a watchdog. For the 8xx and 8260 CPUs, the
SIU Watchdog feature is enabled in the SYPCR
register.
......@@ -852,7 +852,7 @@ The following options need to be configured:
Normally display is black on white background; define
CFG_WHITE_ON_BLACK to get it inverted.
- Spash Screen Support: CONFIG_SPLASH_SCREEN
- Splash Screen Support: CONFIG_SPLASH_SCREEN
If this option is set, the environment is checked for
a variable "splashimage". If found, the usual display
......@@ -1203,7 +1203,7 @@ The following options need to be configured:
U-Boot considers the values of the environment
variables "serial#" (Board Serial Number) and
"ethaddr" (Ethernet Address) to bb parameters that
"ethaddr" (Ethernet Address) to be parameters that
are set once by the board vendor / manufacturer, and
protects these variables from casual modification by
the user. Once set, these variables are read-only,
......@@ -1318,7 +1318,7 @@ The following options need to be configured:
Define this to contain any number of null terminated
strings (variable = value pairs) that will be part of
the default enviroment compiled into the boot image.
the default environment compiled into the boot image.
For example, place something like this in your
board's config file:
......@@ -1331,7 +1331,7 @@ The following options need to be configured:
internal format how the environment is stored by the
U-Boot code. This is NOT an official, exported
interface! Although it is unlikely that this format
will change soon, but there is no guarantee either.
will change soon, there is no guarantee either.
You better know what you are doing here.
Note: overly (ab)use of the default environment is
......@@ -1769,7 +1769,7 @@ Low Level (hardware related) configuration options:
- CFG_INIT_RAM_ADDR:
Start address of memory area tha can be used for
Start address of memory area that can be used for
initial data and stack; please note that this must be
writable memory that is working WITHOUT special
initialization, i. e. you CANNOT use normal RAM which
......@@ -1941,7 +1941,7 @@ Note: for some board special configuration names may exist; check if
Finally, type "make all", and you should get some working U-Boot
images ready for downlod to / installation on your system:
images ready for download to / installation on your system:
- "u-boot.bin" is a raw binary image
- "u-boot" is an image in ELF binary format
......@@ -1960,7 +1960,7 @@ steps:
1. Add a new configuration option for your board to the toplevel
"Makefile" and to the "MAKEALL" script, using the existing
entries as examples. Note that here and at many other places
boards and other names are listed alphabetically sorted. Please
boards and other names are listed in alphabetical sort order. Please
keep this order.
2. Create a new directory to hold your board specific code. Add any
files you need. In your board directory, you will need at least
......@@ -1990,7 +1990,7 @@ cation did not break existing code. At least make sure that *ALL* of
the supported boards compile WITHOUT ANY compiler warnings. To do so,
just run the "MAKEALL" script, which will configure and build U-Boot
for ALL supported system. Be warned, this will take a while. You can
select which (cross) compiler to use py passing a `CROSS_COMPILE'
select which (cross) compiler to use by passing a `CROSS_COMPILE'
environment variable to the script, i. e. to use the cross tools from
MontaVista's Hard Hat Linux you can type
......@@ -2117,10 +2117,10 @@ Some configuration options can be set using Environment Variables:
does not overwrite the U-Boot stack and data).
For instance, when you have a system with 16 MB
RAM, and want to reseve 4 MB from use by Linux,
RAM, and want to reserve 4 MB from use by Linux,
you can do this by adding "mem=12M" to the value of
the "bootargs" variable. However, now you must make
sure, that the initrd image is placed in the first
sure that the initrd image is placed in the first
12 MB as well - this can be done with
setenv initrd_high 00c00000
......@@ -2189,8 +2189,8 @@ only effect after the next boot (yes, that's just like Windoze :-).
Command Line Parsing:
=====================
There are two different command line parsers available with U-Boot:
the old "simple" one, and the much more pwerful "hush" shell:
There are two different command line parsers available with U-Boot:
the old "simple" one, and the much more powerful "hush" shell:
Old, simple command line parser:
--------------------------------
......@@ -2231,9 +2231,9 @@ General rules:
Note for Redundant Ethernet Interfaces:
=======================================
Some boards come with redundand ethernet interfaces; U-Boot supports
Some boards come with redundant ethernet interfaces; U-Boot supports
such configurations and is capable of automatic selection of a
"working" interface when needed. MAC assignemnt works as follows:
"working" interface when needed. MAC assignment works as follows:
Network interfaces are numbered eth0, eth1, eth2, ... Corresponding
MAC addresses can be stored in the environment as "ethaddr" (=>eth0),
......@@ -2292,21 +2292,21 @@ Linux Support:
==============
Although U-Boot should support any OS or standalone application
easily, Linux has always been in the focus during the design of
easily, the main focus has always been on Linux during the design of
U-Boot.
U-Boot includes many features that so far have been part of some
special "boot loader" code within the Linux kernel. Also, any
"initrd" images to be used are no longer part of one big Linux image;
instead, kernel and "initrd" are separate images. This implementation
serves serveral purposes:
serves several purposes:
- the same features can be used for other OS or standalone
applications (for instance: using compressed images to reduce the
Flash memory footprint)
- it becomes much easier to port new Linux kernel versions because
lots of low-level, hardware dependend stuff are done by U-Boot
lots of low-level, hardware dependent stuff are done by U-Boot
- the same Linux kernel image can now be used with different "initrd"
images; of course this also means that different kernel images can
......@@ -2558,7 +2558,7 @@ parameters. You can check and modify this variable using the
...
If you want to boot a Linux kernel with initial ram disk, you pass
the memory addreses of both the kernel and the initrd image (PPBCOOT
the memory addresses of both the kernel and the initrd image (PPBCOOT
format!) to the "bootm" command:
=> imi 40100000 40200000
......@@ -2738,7 +2738,7 @@ Hit 'q':
Minicom warning:
================
Over time, many people have reported problems when trying to used the
Over time, many people have reported problems when trying to use the
"minicom" terminal emulation program for serial download. I (wd)
consider minicom to be broken, and recommend not to use it. Under
Unix, I recommend to use C-Kermit for general purpose use (and
......@@ -2806,7 +2806,7 @@ models provide on-chip memory (like the IMMR area on MPC8xx and
MPC826x processors), on others (parts of) the data cache can be
locked as (mis-) used as memory, etc.
Chris Hallinan posted a good summy of these issues to the
Chris Hallinan posted a good summary of these issues to the
u-boot-users mailing list:
Subject: RE: [U-Boot-Users] RE: More On Memory Bank x (nothingness)?
......@@ -2852,9 +2852,9 @@ code for the initialization procedures:
* Do not use any unitialized global data (or implicitely initialized
as zero data - BSS segment) at all - this is undefined, initiali-
zation is performed later (when relocationg to RAM).
zation is performed later (when relocating to RAM).
* Stack space is very limited. Avoid big data buffers or things like
* Stack space is very limited. Avoid big data buffers or things like
that.
Having only the stack as writable memory limits means we cannot use
......@@ -2867,7 +2867,7 @@ the GCC compiler (Global Register Variables) to share the data: we
place a pointer (gd) to the global data into a register which we
reserve for this purpose.
When chosing a register for such a purpose we are restricted by the
When choosing a register for such a purpose we are restricted by the
relevant (E)ABI specifications for the current architecture, and by
GCC's implementation.
......@@ -2957,7 +2957,7 @@ System Initialization:
In the reset configuration, U-Boot starts at the reset entry point
(on most PowerPC systens at address 0x00000100). Because of the reset
configuration for CS0# this is a mirror of the onboard Flash memory.
To be able to re-map memory U-Boot then jumps to it's link address.
To be able to re-map memory U-Boot then jumps to its link address.
To be able to implement the initialization code in C, a (small!)
initial stack is set up in the internal Dual Ported RAM (in case CPUs
which provide such a feature like MPC8xx or MPC8260), or in a locked
......@@ -2973,7 +2973,7 @@ simple memory test is run that determines the size of the SDRAM
banks.
When there is more than one SDRAM bank, and the banks are of
different size, the larger is mapped first. For equal size, the first
different size, the largest is mapped first. For equal size, the first
bank (CS2#) is mapped first. The first mapping is always for address
0x00000000, with any additional banks following immediately to create
contiguous memory starting from 0.
......
......@@ -64,24 +64,20 @@ unsigned long flash_init (void)
unsigned long size = 0;
int i;
extern void flash_preinit(void);
extern void flash_afterinit(ulong);
ulong flashbase = CFG_FLASH_BASE;
flash_preinit();
/* Init: no FLASHes known */
for (i=0; i < CFG_MAX_FLASH_BANKS; ++i) {
ulong flashbase = CFG_FLASH_BASE;
memset(&flash_info[i], 0, sizeof(flash_info_t));
flash_info[i].size =
flash_get_size((FPW *)flashbase, &flash_info[i]);
if (flash_info[i].flash_id == FLASH_UNKNOWN) {
printf ("## Unknown FLASH on Bank %d - Size = 0x%08lx\n",
i, flash_info[i].size);
}
size += flash_info[i].size;
flashbase += 0x800000;
}
#if CFG_MONITOR_BASE >= CFG_FLASH_BASE
/* monitor protection ON by default */
......@@ -100,6 +96,7 @@ unsigned long flash_init (void)
#endif
flash_afterinit(size);
return size ? size : 1;
}
......@@ -126,7 +123,8 @@ static flash_info_t *flash_get_info(ulong base)
for (i = 0; i < CFG_MAX_FLASH_BANKS; i ++) {
info = & flash_info[i];
if (info->start[0] <= base && base <= info->start[0] + info->size - 1)
if (info->size &&
info->start[0] <= base && base <= info->start[0] + info->size - 1)
break;
}
......@@ -211,6 +209,8 @@ void flash_print_info (flash_info_t *info)
ulong flash_get_size (FPWV *addr, flash_info_t *info)
{
int i;
FPWV* addr2;
/* Write auto select command: read Manufacturer ID */
/* Write auto select command sequence and test FLASH answer */
addr[FLASH_CYCLE1] = (FPW)0x00AA00AA; /* for AMD, Intel ignores this */
......@@ -256,6 +256,17 @@ ulong flash_get_size (FPWV *addr, flash_info_t *info)
return (0); /* => no or unknown flash */
}
/* test for real flash at bank 1 */
addr2 = (FPW *)((ulong)addr | 0x800000);
if (addr2 != addr &&
((addr2[0] & 0xff) == (addr[0] & 0xff)) && ((FPW)addr2[1] == (FPW)addr[1])) {
/* Seems 2 banks are the same space (8Mb chip is installed,
* J24 in default position (CS0)). Disable this (first) bank.
*/
info->flash_id = FLASH_UNKNOWN;
info->sector_count = 0;
info->size = 0;
}
/* Put FLASH back in read mode */
flash_reset(info);
......
......@@ -171,6 +171,16 @@ void flash_preinit(void)
*(vu_long *)MPC5XXX_BOOTCS_CFG &= ~0x1; /* clear RO */
}
void flash_afterinit(ulong size)
{
if (size == 0x800000) { /* adjust mapping */
*(vu_long *)MPC5XXX_BOOTCS_START = *(vu_long *)MPC5XXX_CS0_START =
START_REG(CFG_BOOTCS_START | size);
*(vu_long *)MPC5XXX_BOOTCS_STOP = *(vu_long *)MPC5XXX_CS0_STOP =
STOP_REG(CFG_BOOTCS_START | size, size);
}
}
#ifdef CONFIG_PCI
static struct pci_controller hose;
......
......@@ -28,3 +28,4 @@
TEXT_BASE = 0xFFF00000
PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
PLATFORM_LIBS += $(shell $(CC) -print-libgcc-file-name)
......@@ -23,6 +23,7 @@
#include <common.h>
#include <mpc824x.h>
#include <pci.h>
int checkboard (void)
{
......@@ -84,3 +85,11 @@ Done:
return CFG_MAX_RAM_SIZE;
#endif
}
static struct pci_controller hose;
void pci_init_board(void)
{
pci_mpc824x_init(&hose);
}
......@@ -525,7 +525,7 @@ static int DoC_Address(struct DiskOnChip *doc, int numbytes, unsigned long ofs,
return DoC_WaitReady(doc);
}
/* Read a buffer from DoC, taking care of Millennium odditys */
/* Read a buffer from DoC, taking care of Millennium oddities */
static void DoC_ReadBuf(struct DiskOnChip *doc, u_char * buf, int len)
{
volatile int dummy;
......@@ -558,7 +558,7 @@ static void DoC_ReadBuf(struct DiskOnChip *doc, u_char * buf, int len)
}
}
/* Write a buffer to DoC, taking care of Millennium odditys */
/* Write a buffer to DoC, taking care of Millennium oddities */
static void DoC_WriteBuf(struct DiskOnChip *doc, const u_char * buf, int len)
{
unsigned long docptr;
......@@ -992,7 +992,7 @@ int doc_read_ecc(struct DiskOnChip* this, loff_t from, size_t len,
printf("ECC needs a full sector read (adr: %lx size %lx)\n",
(long) from, (long) len);
#ifdef PHYCH_DEBUG
#ifdef PSYCHO_DEBUG
printf("DoC_Read (adr: %lx size %lx)\n", (long) from, (long) len);
#endif
......
......@@ -24,14 +24,6 @@
#include <common.h>
#include <mpc5xxx.h>
#if defined(CONFIG_MGT5100)
#define START_REG(start) ((start) >> 15)
#define STOP_REG(start, size) (((start) + (size) - 1) >> 15)
#elif defined(CONFIG_MPC5200)
#define START_REG(start) ((start) >> 16)
#define STOP_REG(start, size) (((start) + (size) - 1) >> 16)
#endif
/*
* Breath some life into the CPU...
*
......@@ -159,6 +151,14 @@ void cpu_init_f (void)
#if defined(CONFIG_MPC5200)
/* enable timebase */
*(vu_long *)(MPC5XXX_XLBARB + 0x40) |= (1 << 13);
/* Motorola reports IPB should better run at 133 MHz. */
*(vu_long *)MPC5XXX_ADDECR |= 1;
/* pci_clk_sel = 0x02, ipb_clk_sel = 0x00; */
addecr = *(vu_long *)MPC5XXX_CDM_CFG;
addecr &= ~0x103;
addecr |= 0x02;
*(vu_long *)MPC5XXX_CDM_CFG = addecr;
#endif
}
......
......@@ -208,6 +208,7 @@ static void mpc5xxx_fec_set_hwaddr(mpc5xxx_fec_priv *fec, char *mac)
/********************************************************************/
static int mpc5xxx_fec_init(struct eth_device *dev, bd_t * bis)
{
DECLARE_GLOBAL_DATA_PTR;
mpc5xxx_fec_priv *fec = (mpc5xxx_fec_priv *)dev->priv;
struct mpc5xxx_sdma *sdma = (struct mpc5xxx_sdma *)MPC5XXX_SDMA;
const uint8 phyAddr = 0; /* Only one PHY */
......@@ -269,10 +270,10 @@ static int mpc5xxx_fec_init(struct eth_device *dev, bd_t * bis)
fec->eth->x_cntrl = 0x00000004; /* full-duplex, heartbeat disabled */
/*
* Set MII_SPEED = (1/(mii_speed * 2)) * System Clock(25Mhz)
* Set MII_SPEED = (1/(mii_speed * 2)) * System Clock
* and do not drop the Preamble.
*/
fec->eth->mii_speed = (0x5 << 1); /* No MII for 7-wire mode */
fec->eth->mii_speed = (((gd->ipb_clk >> 20) / 5) << 1); /* No MII for 7-wire mode */
}
/*
......
......@@ -5,7 +5,7 @@ This project is to support Power-On-Self-Test (POST) in U-Boot.
1. High-level requirements
The key rquirements for this project are as follows:
The key requirements for this project are as follows:
1) The project shall develop a flexible framework for implementing
and running Power-On-Self-Test in U-Boot. This framework shall
......@@ -72,7 +72,7 @@ tests. All POST tests will be divided into the following groups:
This group will contain those tests that do not take much
time and can be run on the regular basis (e.g. CPU test)
3) Tests running on in special "slow test more" only
3) Tests running in special "slow test mode" only
This group will contain POST tests that consume much time
and cannot be run regularly (e.g. strong memory test, I2C test)
......@@ -92,7 +92,7 @@ Specifically, the following groups will be singled out:
1) Tests running before relocating to RAM
These tests will run immediatelly after initializing RAM
These tests will run immediately after initializing RAM
as to enable modifying it without taking care of its
contents. Basically, this group will contain memory tests
only.
......
#
# (C) Copyright 2003
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
# project.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
# File: drivers/sk98lin/Makefile
#
# Makefile for the SysKonnect SK-98xx device driver.
#
LIB := libsk98lin.a
OBJS := skge.o skaddr.o skgehwt.o skgeinit.o skgepnmi.o skgesirq.o \
ski2c.o sklm80.o skqueue.o skrlmt.o sktimer.o skvpd.o \
skxmac2.o skcsum.o #skproc.o
OBJS += uboot_skb.o uboot_drv.o
# DBGDEF = \
# -DDEBUG
ifdef DEBUG
DBGDEF += \
-DSK_DEBUG_CHKMOD=0x00000000L \
-DSK_DEBUG_CHKCAT=0x00000000L
endif
# **** possible debug modules for SK_DEBUG_CHKMOD *****************
# SK_DBGMOD_MERR 0x00000001L /* general module error indication */
# SK_DBGMOD_HWM 0x00000002L /* Hardware init module */
# SK_DBGMOD_RLMT 0x00000004L /* RLMT module */
# SK_DBGMOD_VPD 0x00000008L /* VPD module */
# SK_DBGMOD_I2C 0x00000010L /* I2C module */
# SK_DBGMOD_PNMI 0x00000020L /* PNMI module */
# SK_DBGMOD_CSUM 0x00000040L /* CSUM module */
# SK_DBGMOD_ADDR 0x00000080L /* ADDR module */
# SK_DBGMOD_DRV 0x00010000L /* DRV module */
# **** possible debug categories for SK_DEBUG_CHKCAT **************
# *** common modules ***
# SK_DBGCAT_INIT 0x00000001L module/driver initialization
# SK_DBGCAT_CTRL 0x00000002L controlling: add/rmv MCA/MAC and other controls (IOCTL)
# SK_DBGCAT_ERR 0x00000004L error handling paths
# SK_DBGCAT_TX 0x00000008L transmit path
# SK_DBGCAT_RX 0x00000010L receive path
# SK_DBGCAT_IRQ 0x00000020L general IRQ handling
# SK_DBGCAT_QUEUE 0x00000040L any queue management
# SK_DBGCAT_DUMP 0x00000080L large data output e.g. hex dump
# SK_DBGCAT_FATAL 0x00000100L large data output e.g. hex dump
# *** driver (file skge.c) ***
# SK_DBGCAT_DRV_ENTRY 0x00010000 entry points
# SK_DBGCAT_DRV_??? 0x00020000 not used
# SK_DBGCAT_DRV_MCA 0x00040000 multicast
# SK_DBGCAT_DRV_TX_PROGRESS 0x00080000 tx path
# SK_DBGCAT_DRV_RX_PROGRESS 0x00100000 rx path
# SK_DBGCAT_DRV_PROGRESS 0x00200000 general runtime
# SK_DBGCAT_DRV_??? 0x00400000 not used
# SK_DBGCAT_DRV_PROM 0x00800000 promiscuous mode
# SK_DBGCAT_DRV_TX_FRAME 0x01000000 display tx frames
# SK_DBGCAT_DRV_ERROR 0x02000000 error conditions
# SK_DBGCAT_DRV_INT_SRC 0x04000000 interrupts sources
# SK_DBGCAT_DRV_EVENT 0x08000000 driver events
EXTRA_CFLAGS += -I. -DSK_USE_CSUM $(DBGDEF)
CFLAGS += $(EXTRA_CFLAGS)
all: $(LIB)
$(LIB): $(OBJS)
$(AR) crv $@ $(OBJS)
#########################################################################
.depend: Makefile $(OBJS:.o=.c)
$(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@
sinclude .depend
#########################################################################
/******************************************************************************
*
* Name: lm80.h
* Project: GEnesis, PCI Gigabit Ethernet Adapter
* Version: $Revision: 1.4 $
* Date: $Date: 2002/04/25 11:04:10 $
* Purpose: Contains all defines for the LM80 Chip
* (National Semiconductor).
*
******************************************************************************/
/******************************************************************************
*
* (C)Copyright 1998-2002 SysKonnect GmbH.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The information in this file is provided "AS IS" without warranty.
*
******************************************************************************/
/******************************************************************************
*
* History:
* $Log: lm80.h,v $
* Revision 1.4 2002/04/25 11:04:10 rschmidt
* Editorial changes
*
* Revision 1.3 1999/11/22 13:41:19 cgoos
* Changed license header to GPL.
*
* Revision 1.2 1999/03/12 13:26:51 malthoff
* remove __STDC__.
*
* Revision 1.1 1998/06/19 09:28:31 malthoff
* created.
*
*
******************************************************************************/
#ifndef __INC_LM80_H
#define __INC_LM80_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* defines ********************************************************************/
/*
* LM80 register definition
*
* All registers are 8 bit wide
*/
#define LM80_CFG 0x00 /* Configuration Register */
#define LM80_ISRC_1 0x01 /* Interrupt Status Register 1 */
#define LM80_ISRC_2 0x02 /* Interrupt Status Register 2 */
#define LM80_IMSK_1 0x03 /* Interrupt Mask Register 1 */
#define LM80_IMSK_2 0x04 /* Interrupt Mask Register 2 */
#define LM80_FAN_CTRL 0x05 /* Fan Devisor/RST#/OS# Register */
#define LM80_TEMP_CTRL 0x06 /* OS# Config, Temp Res. Reg */
/* 0x07 - 0x1f reserved */
/* current values */
#define LM80_VT0_IN 0x20 /* current Voltage 0 value */
#define LM80_VT1_IN 0x21 /* current Voltage 1 value */
#define LM80_VT2_IN 0x22 /* current Voltage 2 value */
#define LM80_VT3_IN 0x23 /* current Voltage 3 value */