Make 'struct superio_registers' globally available, pretty much
all Super I/Os can (and should!) use this (trivial). Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2778 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
0120e1a3d8
commit
4cb7e71732
|
@ -21,25 +21,7 @@
|
||||||
|
|
||||||
#include "superiotool.h"
|
#include "superiotool.h"
|
||||||
|
|
||||||
#define EOT -1 /* End Of Table */
|
const static struct superio_registers ite_reg_table[] = {
|
||||||
#define NOLDN -2 /* NO LDN needed */
|
|
||||||
#define NANA -3 /* Not Available */
|
|
||||||
#define MAXNAMELEN 20 /* Maximum Name Length */
|
|
||||||
#define MAXLDN 0xa /* Biggest LDN */
|
|
||||||
#define LDNSIZE (MAXLDN + 3) /* Biggest LDN + 0 + NOLDN + EOT */
|
|
||||||
#define MAXNUMIDX 70 /* Maximum number of indexes */
|
|
||||||
#define IDXSIZE (MAXNUMIDX + 1)
|
|
||||||
|
|
||||||
const static struct ite_registers {
|
|
||||||
/* Yes, superio_id should be unsigned, but EOT has to be negative. */
|
|
||||||
signed short superio_id;
|
|
||||||
const char name[MAXNAMELEN];
|
|
||||||
struct ite_ldnidx {
|
|
||||||
signed short ldn;
|
|
||||||
signed short idx[IDXSIZE];
|
|
||||||
signed short def[IDXSIZE];
|
|
||||||
} ldn[LDNSIZE];
|
|
||||||
} ite_reg_table[] = {
|
|
||||||
{0x8702, "IT8702", {
|
{0x8702, "IT8702", {
|
||||||
{EOT}}},
|
{EOT}}},
|
||||||
{0x8705, "IT8705 or IT8700", {
|
{0x8705, "IT8705 or IT8700", {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of the LinuxBIOS project.
|
* This file is part of the LinuxBIOS project.
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 2007 Carl-Daniel Hailfinger
|
||||||
* Copyright (C) 2007 Uwe Hermann <uwe@hermann-uwe.de>
|
* Copyright (C) 2007 Uwe Hermann <uwe@hermann-uwe.de>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -25,6 +26,27 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <sys/io.h>
|
#include <sys/io.h>
|
||||||
|
|
||||||
|
#define EOT -1 /* End Of Table */
|
||||||
|
#define NOLDN -2 /* NO LDN needed */
|
||||||
|
#define NANA -3 /* Not Available */
|
||||||
|
#define MAXNAMELEN 20 /* Maximum Name Length */
|
||||||
|
#define MAXLDN 0xa /* Biggest LDN */
|
||||||
|
#define LDNSIZE (MAXLDN + 3) /* Biggest LDN + 0 + NOLDN + EOT */
|
||||||
|
#define MAXNUMIDX 70 /* Maximum number of indexes */
|
||||||
|
#define IDXSIZE (MAXNUMIDX + 1)
|
||||||
|
|
||||||
|
struct superio_registers {
|
||||||
|
/* Yes, superio_id should be unsigned, but EOT has to be negative. */
|
||||||
|
signed short superio_id;
|
||||||
|
const char name[MAXNAMELEN];
|
||||||
|
struct ite_ldnidx {
|
||||||
|
signed short ldn;
|
||||||
|
signed short idx[IDXSIZE];
|
||||||
|
signed short def[IDXSIZE];
|
||||||
|
} ldn[LDNSIZE];
|
||||||
|
};
|
||||||
|
|
||||||
|
/* superiotool.c */
|
||||||
unsigned char regval(unsigned short port, unsigned char reg);
|
unsigned char regval(unsigned short port, unsigned char reg);
|
||||||
void regwrite(unsigned short port, unsigned char reg, unsigned char val);
|
void regwrite(unsigned short port, unsigned char reg, unsigned char val);
|
||||||
void probe_superio(unsigned short port);
|
void probe_superio(unsigned short port);
|
||||||
|
|
Loading…
Reference in New Issue