blob: a244b8273173234ad87d4028497a8eda555a982d [file] [log] [blame]
Yinghai Luc65bd562007-02-01 00:10:05 +00001/*
Stefan Reinauer7e61e452008-01-18 10:35:56 +00002 * This file is part of the coreboot project.
Yinghai Luc65bd562007-02-01 00:10:05 +00003 *
4 * Copyright (C) 2007 AMD
5 * Written by Yinghai Lu <yinghai.lu@amd.com> for AMD.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
Yinghai Luc65bd562007-02-01 00:10:05 +000016 */
17
Uwe Hermannc7f0c8f2011-01-04 19:51:33 +000018#ifndef SOUTHBRIDGE_NVIDIA_MCP55_MCP55_H
19#define SOUTHBRIDGE_NVIDIA_MCP55_MCP55_H
Yinghai Luc65bd562007-02-01 00:10:05 +000020
Uwe Hermanndf323fc2010-11-25 09:03:55 +000021#if CONFIG_HT_CHAIN_END_UNITID_BASE != 0x20
Uwe Hermannc7f0c8f2011-01-04 19:51:33 +000022#define MCP55_DEVN_BASE CONFIG_HT_CHAIN_END_UNITID_BASE
Uwe Hermanndf323fc2010-11-25 09:03:55 +000023#else
Uwe Hermannc7f0c8f2011-01-04 19:51:33 +000024#define MCP55_DEVN_BASE CONFIG_HT_CHAIN_UNITID_BASE
Uwe Hermanndf323fc2010-11-25 09:03:55 +000025#endif
Yinghai Luc65bd562007-02-01 00:10:05 +000026
Stefan Reinauer6f57b512010-07-08 16:41:05 +000027#ifndef __PRE_RAM__
Uwe Hermanndf323fc2010-11-25 09:03:55 +000028#include "chip.h"
Yinghai Luc65bd562007-02-01 00:10:05 +000029void mcp55_enable(device_t dev);
Jonathan Kollaschdca8b1b2010-10-29 20:40:06 +000030extern struct pci_operations mcp55_pci_ops;
Stefan Reinauer6f57b512010-07-08 16:41:05 +000031#else
32void enable_fid_change_on_sb(unsigned sbbusn, unsigned sbdn);
Arthur Heymans11cf68c2017-02-24 14:37:57 +010033void enable_smbus(void);
34int smbus_recv_byte(unsigned device);
35int smbus_send_byte(unsigned device, unsigned char val);
36int smbus_read_byte(unsigned device, unsigned address);
37int smbus_write_byte(unsigned device, unsigned address, unsigned char val);
38int smbusx_recv_byte(unsigned smb_index, unsigned device);
39int smbusx_send_byte(unsigned smb_index, unsigned device, unsigned char val);
40int smbusx_read_byte(unsigned smb_index, unsigned device, unsigned address);
41int smbusx_write_byte(unsigned smb_index, unsigned device, unsigned address,
42 unsigned char val);
Uwe Hermanndf323fc2010-11-25 09:03:55 +000043#endif
Uwe Hermanndf323fc2010-11-25 09:03:55 +000044
Uwe Hermannc7f0c8f2011-01-04 19:51:33 +000045#endif