coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
aspeed_coreboot.h File Reference
#include <delay.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <arch/io.h>
#include <device/mmio.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ops.h>
Include dependency graph for aspeed_coreboot.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  firmware
 
struct  drm_device
 

Macros

#define __iomem
 
#define pci_dev   device
 
#define SZ_16M   0x01000000
 
#define min_t(type, x, y)
 
#define dev_info(dev, format, arg...)   printk(BIOS_INFO, "%s: " format, __func__, ##arg)
 
#define dev_dbg(dev, format, arg...)   printk(BIOS_DEBUG, "%s: " format, __func__, ##arg)
 
#define dev_err(dev, format, arg...)   printk(BIOS_ERR, "%s: " format, __func__, ##arg)
 
#define pr_info(format, arg...)   printk(BIOS_INFO, "%s: " format, __func__, ##arg)
 
#define pr_debug(format, arg...)   printk(BIOS_INFO, "%s: " format, __func__, ##arg)
 
#define pr_err(format, arg...)   printk(BIOS_ERR, "%s: " format, __func__, ##arg)
 
#define DRM_INFO   pr_info
 
#define GFP_KERNEL   0
 
#define GFP_ATOMIC   1
 
#define kfree(address)   free(address)
 
#define EIO   5
 
#define ENOMEM   12
 

Typedefs

typedef u64 phys_addr_t
 

Functions

static voidkzalloc (size_t size, int flags)
 
static int pci_read_config_dword (struct pci_dev *dev, int where, u32 *val)
 
static int pci_write_config_dword (struct pci_dev *dev, int where, u32 val)
 
static int pci_read_config_byte (struct pci_dev *dev, int where, u8 *val)
 
static struct resourceresource_at_bar (struct pci_dev *dev, u8 bar)
 
static resource_t pci_resource_len (struct pci_dev *dev, u8 bar)
 
static resource_t pci_resource_start (struct pci_dev *dev, u8 bar)
 
static unsigned int ioread32 (void __iomem *p)
 
static void iowrite32 (u32 val, void __iomem *p)
 
static unsigned int ioread16 (void __iomem *p)
 
static void iowrite16 (u16 val, void __iomem *p)
 
static unsigned int ioread8 (void __iomem *p)
 
static void iowrite8 (u8 val, void __iomem *p)
 
static unsigned int ioread_cbio32 (void __iomem *p)
 
static void iowrite_cbio32 (u32 val, void __iomem *p)
 
static unsigned int ioread_cbio16 (void __iomem *p)
 
static void iowrite_cbio16 (u16 val, void __iomem *p)
 
static unsigned int ioread_cbio8 (void __iomem *p)
 
static void iowrite_cbio8 (u8 val, void __iomem *p)
 
static void msleep (unsigned int msecs)
 

Macro Definition Documentation

◆ __iomem

#define __iomem

Definition at line 19 of file aspeed_coreboot.h.

◆ dev_dbg

#define dev_dbg (   dev,
  format,
  arg... 
)    printk(BIOS_DEBUG, "%s: " format, __func__, ##arg)

Definition at line 31 of file aspeed_coreboot.h.

◆ dev_err

#define dev_err (   dev,
  format,
  arg... 
)    printk(BIOS_ERR, "%s: " format, __func__, ##arg)

Definition at line 32 of file aspeed_coreboot.h.

◆ dev_info

#define dev_info (   dev,
  format,
  arg... 
)    printk(BIOS_INFO, "%s: " format, __func__, ##arg)

Definition at line 30 of file aspeed_coreboot.h.

◆ DRM_INFO

#define DRM_INFO   pr_info

Definition at line 38 of file aspeed_coreboot.h.

◆ EIO

#define EIO   5

Definition at line 44 of file aspeed_coreboot.h.

◆ ENOMEM

#define ENOMEM   12

Definition at line 45 of file aspeed_coreboot.h.

◆ GFP_ATOMIC

#define GFP_ATOMIC   1

Definition at line 41 of file aspeed_coreboot.h.

◆ GFP_KERNEL

#define GFP_KERNEL   0

Definition at line 40 of file aspeed_coreboot.h.

◆ kfree

#define kfree (   address)    free(address)

Definition at line 42 of file aspeed_coreboot.h.

◆ min_t

#define min_t (   type,
  x,
  y 
)
Value:
({ \
type __min1 = (x); \
type __min2 = (y); \
__min1 < __min2 ? __min1 : __min2; })
int y
Definition: edid.c:994
int x
Definition: edid.c:994

Definition at line 25 of file aspeed_coreboot.h.

◆ pci_dev

#define pci_dev   device

Definition at line 21 of file aspeed_coreboot.h.

◆ pr_debug

#define pr_debug (   format,
  arg... 
)    printk(BIOS_INFO, "%s: " format, __func__, ##arg)

Definition at line 35 of file aspeed_coreboot.h.

◆ pr_err

#define pr_err (   format,
  arg... 
)    printk(BIOS_ERR, "%s: " format, __func__, ##arg)

Definition at line 36 of file aspeed_coreboot.h.

◆ pr_info

#define pr_info (   format,
  arg... 
)    printk(BIOS_INFO, "%s: " format, __func__, ##arg)

Definition at line 34 of file aspeed_coreboot.h.

◆ SZ_16M

#define SZ_16M   0x01000000

Definition at line 23 of file aspeed_coreboot.h.

Typedef Documentation

◆ phys_addr_t

typedef u64 phys_addr_t

Definition at line 20 of file aspeed_coreboot.h.

Function Documentation

◆ ioread16()

static unsigned int ioread16 ( void __iomem p)
inlinestatic

Definition at line 124 of file aspeed_coreboot.h.

References read16().

Here is the call graph for this function:

◆ ioread32()

static unsigned int ioread32 ( void __iomem p)
inlinestatic

Definition at line 116 of file aspeed_coreboot.h.

References read32().

Here is the call graph for this function:

◆ ioread8()

static unsigned int ioread8 ( void __iomem p)
inlinestatic

Definition at line 132 of file aspeed_coreboot.h.

References read8().

Here is the call graph for this function:

◆ ioread_cbio16()

static unsigned int ioread_cbio16 ( void __iomem p)
inlinestatic

Definition at line 148 of file aspeed_coreboot.h.

References inw().

Here is the call graph for this function:

◆ ioread_cbio32()

static unsigned int ioread_cbio32 ( void __iomem p)
inlinestatic

Definition at line 140 of file aspeed_coreboot.h.

References inl().

Here is the call graph for this function:

◆ ioread_cbio8()

static unsigned int ioread_cbio8 ( void __iomem p)
inlinestatic

Definition at line 156 of file aspeed_coreboot.h.

References inb().

Here is the call graph for this function:

◆ iowrite16()

static void iowrite16 ( u16  val,
void __iomem p 
)
inlinestatic

Definition at line 128 of file aspeed_coreboot.h.

References val, and write16().

Here is the call graph for this function:

◆ iowrite32()

static void iowrite32 ( u32  val,
void __iomem p 
)
inlinestatic

Definition at line 120 of file aspeed_coreboot.h.

References val, and write32().

Here is the call graph for this function:

◆ iowrite8()

static void iowrite8 ( u8  val,
void __iomem p 
)
inlinestatic

Definition at line 136 of file aspeed_coreboot.h.

References val, and write8().

Here is the call graph for this function:

◆ iowrite_cbio16()

static void iowrite_cbio16 ( u16  val,
void __iomem p 
)
inlinestatic

Definition at line 152 of file aspeed_coreboot.h.

References outw(), and val.

Here is the call graph for this function:

◆ iowrite_cbio32()

static void iowrite_cbio32 ( u32  val,
void __iomem p 
)
inlinestatic

Definition at line 144 of file aspeed_coreboot.h.

References outl(), and val.

Here is the call graph for this function:

◆ iowrite_cbio8()

static void iowrite_cbio8 ( u8  val,
void __iomem p 
)
inlinestatic

Definition at line 160 of file aspeed_coreboot.h.

References outb(), and val.

Here is the call graph for this function:

◆ kzalloc()

static void* kzalloc ( size_t  size,
int  flags 
)
inlinestatic

Definition at line 61 of file aspeed_coreboot.h.

References malloc(), and memset().

Referenced by ast_detect_chip(), and ast_driver_load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ msleep()

static void msleep ( unsigned int  msecs)
inlinestatic

Definition at line 164 of file aspeed_coreboot.h.

References udelay().

Referenced by ast_set_dp501_video_output().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pci_read_config_byte()

static int pci_read_config_byte ( struct pci_dev dev,
int  where,
u8 val 
)
inlinestatic

Definition at line 81 of file aspeed_coreboot.h.

References pci_read_config8(), and val.

Here is the call graph for this function:

◆ pci_read_config_dword()

static int pci_read_config_dword ( struct pci_dev dev,
int  where,
u32 val 
)
inlinestatic

Definition at line 67 of file aspeed_coreboot.h.

References pci_read_config32(), and val.

Referenced by ast_detect_chip(), ast_post_gpu(), and ast_set_def_ext_reg().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pci_resource_len()

static resource_t pci_resource_len ( struct pci_dev dev,
u8  bar 
)
inlinestatic

Definition at line 100 of file aspeed_coreboot.h.

References resource_at_bar(), and resource::size.

Here is the call graph for this function:

◆ pci_resource_start()

static resource_t pci_resource_start ( struct pci_dev dev,
u8  bar 
)
inlinestatic

Definition at line 108 of file aspeed_coreboot.h.

References resource::base, and resource_at_bar().

Here is the call graph for this function:

◆ pci_write_config_dword()

static int pci_write_config_dword ( struct pci_dev dev,
int  where,
u32  val 
)
inlinestatic

Definition at line 74 of file aspeed_coreboot.h.

References pci_write_config32(), and val.

Referenced by ast_post_gpu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resource_at_bar()

static struct resource* resource_at_bar ( struct pci_dev dev,
u8  bar 
)
inlinestatic

Definition at line 88 of file aspeed_coreboot.h.

References resource::next, and NULL.

Referenced by pci_resource_len(), and pci_resource_start().

Here is the caller graph for this function: