qemu/include/hw/misc/sss.h
<<
>>
Prefs
   1#ifndef SSS__H
   2#define SSS__H
   3
   4#include "hw/sysbus.h"
   5#include "hw/stream.h"
   6
   7#define TYPE_SSS_BASE "sss-base"
   8#define TYPE_SSS_STREAM "sss-stream"
   9
  10#define SSS_BASE(obj) \
  11     OBJECT_CHECK(SSSBase, (obj), TYPE_SSS_BASE)
  12
  13#define SSS_STREAM(obj) \
  14     OBJECT_CHECK(SSSStream, (obj), TYPE_SSS_STREAM)
  15
  16#define NOT_REMOTE(s) \
  17    (s->num_remotes)
  18
  19typedef struct SSSBase SSSBase;
  20typedef struct SSSStream SSSStream;
  21
  22struct SSSStream {
  23    DeviceState parent_obj;
  24
  25    SSSBase *sss;
  26};
  27
  28struct SSSBase {
  29    SysBusDevice busdev;
  30
  31    StreamSlave **tx_devs;
  32    SSSStream *rx_devs;
  33
  34    uint32_t (*get_sss_regfield)(SSSBase *, int);
  35    StreamCanPushNotifyFn *notifys;
  36    void **notify_opaques;
  37
  38    const uint32_t *sss_population;
  39    const int *r_sss_shifts;
  40    const uint8_t *r_sss_encodings;
  41    uint8_t num_remotes;
  42};
  43
  44void sss_notify_all(SSSBase *s);
  45
  46#endif
  47