~vcs-imports/qemu/git

« back to all changes in this revision

Viewing changes to hw/smbus.c

  • Committer: ths
  • Date: 2007-10-08 12:45:38 UTC
  • Revision ID: git-v1:450d4ff553af32fc9d83fef20d7106b0151526b8
CRIS disassembler, originally from binutils, by Edgar E. Iglesias.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3356 c046a42c-6fe2-441c-8c8c-71466251a162

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 
10
10
/* TODO: Implement PEC.  */
11
11
 
12
 
#include "hw.h"
13
 
#include "i2c.h"
14
 
#include "smbus.h"
 
12
#include "vl.h"
15
13
 
16
14
//#define DEBUG_SMBUS 1
17
15
 
61
59
    }
62
60
}
63
61
 
64
 
static void smbus_i2c_event(i2c_slave *s, enum i2c_event event)
 
62
void smbus_i2c_event(i2c_slave *s, enum i2c_event event)
65
63
{
66
64
    SMBusDevice *dev = (SMBusDevice *)s;
67
65
    switch (event) {
196
194
    SMBusDevice *dev;
197
195
 
198
196
    if (size < sizeof(SMBusDevice))
199
 
        hw_error("SMBus struct too small");
 
197
        cpu_abort(cpu_single_env, "SMBus struct too small");
200
198
 
201
199
    dev = (SMBusDevice *)i2c_slave_init(bus, address, size);
202
200
    dev->i2c.event = smbus_i2c_event;