2 * This file is part of the coreboot project.
4 * Copyright (C) 2007 Advanced Micro Devices, Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
19 /* initialization for SMBus Controller */
20 static void cs5536_enable_smbus(void)
23 /* Set SCL freq and enable SMB controller */
24 /*outb((0x20 << 1) | SMB_CTRL2_ENABLE, smbus_io_base + SMB_CTRL2); */
25 outb((0x7F << 1) | SMB_CTRL2_ENABLE
, SMBUS_IO_BASE
+ SMB_CTRL2
);
27 /* Setup SMBus host controller address to 0xEF */
28 outb((0xEF | SMB_ADD_SAEN
), SMBUS_IO_BASE
+ SMB_ADD
);
32 static inline int smbus_read_byte(unsigned device
, unsigned address
)
34 return do_smbus_read_byte(SMBUS_IO_BASE
, device
, address
);