9 #ifndef TEMU_BUS_AMBA_H 
   10 #define TEMU_BUS_AMBA_H 
   19 #include "temu-c/Support/Objsys.h" 
   28 static const uint32_t teAMBA_VendorGaisler = 0x01;
 
   29 static const uint32_t teAMBA_VendorPender =  0x02;
 
   30 static const uint32_t teAMBA_VendorEsa =  0x04;
 
   31 static const uint32_t teAMBA_VendorAstrium =  0x06;
 
   32 static const uint32_t teAMBA_VendorOpenChip =  0x07;
 
   33 static const uint32_t teAMBA_VendorOpenCores =  0x08;
 
   34 static const uint32_t teAMBA_VendorVarious =  0x09;
 
   35 static const uint32_t teAMBA_VendorDlr =  0x0a;
 
   36 static const uint32_t teAMBA_VendorEonic =  0x0b;
 
   37 static const uint32_t teAMBA_VendorParisTech =  0x0c;
 
   38 static const uint32_t teAMBA_VendorRadionor =  0x0f;
 
   39 static const uint32_t teAMBA_VendorGleichmann =  0x10;
 
   40 static const uint32_t teAMBA_VendorMenta =  0x11;
 
   41 static const uint32_t teAMBA_VendorSun =  0x13; 
 
   42 static const uint32_t teAMBA_VendorMovidia =  0x14;
 
   43 static const uint32_t teAMBA_VendorOrbita =  0x17;
 
   44 static const uint32_t teAMBA_VendorSiemens =  0x1a;
 
   45 static const uint32_t teAMBA_VendorActel =  0xac;
 
   46 static const uint32_t teAMBA_VendorCaltech =  0xca;
 
   47 static const uint32_t teAMBA_VendorEmbeddit =  0xea;
 
   65   temu_AhbPnpInfo* (*getAhbPnp)(
void *Obj);
 
   67 #define TEMU_AHB_IFACE_TYPE "AhbIface" 
   68 TEMU_IFACE_REFERENCE_TYPE(temu_Ahb);
 
   86   temu_ApbPnpInfo* (*getApbPnp)(
void *Obj);
 
   88 #define TEMU_APB_IFACE_TYPE "ApbIface" 
   89 TEMU_IFACE_REFERENCE_TYPE(temu_Apb);
 
   94 temu_ahbSetVendor(temu_AhbPnpInfo *Ahb, uint32_t Vendor)
 
  101 temu_ahbSetDeviceId(temu_AhbPnpInfo *Ahb, uint32_t Device)
 
  107 temu_ahbSetVersion(temu_AhbPnpInfo *Ahb, uint32_t Version)
 
  113 temu_ahbSetIrq(temu_AhbPnpInfo *Ahb, uint32_t Irq)
 
  118 static inline uint32_t
 
  119 temu_ahbGetIrq(temu_AhbPnpInfo *Ahb)
 
  125 temu_ahbSetUserDef(temu_AhbPnpInfo *Ahb, 
int Id, uint32_t User)
 
  131 temu_ahbSetAddr(temu_AhbPnpInfo *Ahb, 
int Id, uint32_t Addr)
 
  133   Ahb
->Bar[Id] = (Ahb
->Bar[Id] & 0x000fffff) | (Addr & 0xfff00000);
 
  137 temu_ahbSetCP(temu_AhbPnpInfo *Ahb, 
int Id, uint32_t CP)
 
  139   Ahb
->Bar[Id] = (Ahb
->Bar[Id] & 0xfff0ffff) | (CP << 16);
 
  143 temu_ahbSetMask(temu_AhbPnpInfo *Ahb, 
int Id, uint32_t Mask)
 
  145   Ahb
->Bar[Id] = (Ahb
->Bar[Id] & 0xffff000f) | (Mask << 4);
 
  149 temu_ahbSetType(temu_AhbPnpInfo *Ahb, 
int Id, uint32_t Type)
 
  151   Ahb
->Bar[Id] = (Ahb
->Bar[Id] & 0xfffffff0) | Type;
 
  157 temu_apbSetVendorId(temu_ApbPnpInfo *Apb, uint32_t Vendor)
 
  162 static inline uint32_t
 
  163 temu_apbGetVendorId(temu_ApbPnpInfo *Apb)
 
  169 temu_apbSetDeviceId(temu_ApbPnpInfo *Apb, uint32_t Device)
 
  174 static inline uint32_t
 
  175 temu_apbGetDeviceId(temu_ApbPnpInfo *Apb)
 
  182 temu_apbSetVersion(temu_ApbPnpInfo *Apb, uint32_t Version)
 
  187 static inline uint32_t
 
  188 temu_apbGetVersion(temu_ApbPnpInfo *Apb)
 
  195 temu_apbSetIrq(temu_ApbPnpInfo *Apb, uint32_t Irq)
 
  200 static inline uint32_t
 
  201 temu_apbGetIrq(temu_ApbPnpInfo *Apb)
 
  207 temu_apbSetAddr(temu_ApbPnpInfo *Apb, uint32_t Addr)
 
  209   Apb
->Bar = (Apb
->Bar & 0x000fffff) | ((Addr & 0x000fff00) << 12);
 
  213 temu_apbSetCP(temu_ApbPnpInfo *Apb, uint32_t CP)
 
  215   Apb
->Bar = (Apb
->Bar & 0xfff0ffff) | (CP << 16);
 
  219 temu_apbSetMask(temu_ApbPnpInfo *Apb, uint32_t Mask)
 
  221   Apb
->Bar = (Apb
->Bar & 0xffff000f) | (Mask << 4);
 
  225 temu_apbSetType(temu_ApbPnpInfo *Apb, uint32_t Type)