mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-30 22:03:54 -06:00

The Aspeed AST2400 integrates a set of 14 I2C/SMBus bus controllers directly connected to the APB bus. They can be programmed as master or slave but the propopsed model only supports the master mode. On the TODO list, we also have : - improve and harden the state machine. - bus recovery support (used by the Linux driver). - transfer mode state machine bits. this is not strictly necessary as it is mostly used for debug. The bus busy bit is deducted from the I2C core engine of qemu. - support of the pool buffer: 2048 bytes of internal SRAM (not used by the Linux driver). Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Message-id: 1464704307-25178-1-git-send-email-clg@kaod.org [PMM: removed unused functions aspeed_i2c_bus_get_state() and aspeed_i2c_bus_set_state()] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
37 lines
780 B
C
37 lines
780 B
C
/*
|
|
* ASPEED AST2400 SoC
|
|
*
|
|
* Andrew Jeffery <andrew@aj.id.au>
|
|
*
|
|
* Copyright 2016 IBM Corp.
|
|
*
|
|
* This code is licensed under the GPL version 2 or later. See
|
|
* the COPYING file in the top-level directory.
|
|
*/
|
|
|
|
#ifndef AST2400_H
|
|
#define AST2400_H
|
|
|
|
#include "hw/arm/arm.h"
|
|
#include "hw/intc/aspeed_vic.h"
|
|
#include "hw/timer/aspeed_timer.h"
|
|
#include "hw/i2c/aspeed_i2c.h"
|
|
|
|
typedef struct AST2400State {
|
|
/*< private >*/
|
|
DeviceState parent;
|
|
|
|
/*< public >*/
|
|
ARMCPU *cpu;
|
|
MemoryRegion iomem;
|
|
AspeedVICState vic;
|
|
AspeedTimerCtrlState timerctrl;
|
|
AspeedI2CState i2c;
|
|
} AST2400State;
|
|
|
|
#define TYPE_AST2400 "ast2400"
|
|
#define AST2400(obj) OBJECT_CHECK(AST2400State, (obj), TYPE_AST2400)
|
|
|
|
#define AST2400_SDRAM_BASE 0x40000000
|
|
|
|
#endif /* AST2400_H */
|