LibXenon
Bare-metal Xbox 360 homebrew library
Loading...
Searching...
No Matches
Macros | Functions | Variables
tinyehci.c File Reference
#include <stdlib.h>
#include <string.h>
#include <setjmp.h>
#include <byteswap.h>
#include <pci/io.h>
#include <ppc/timebase.h>
#include <ppc/cache.h>
#include <xetypes.h>
#include <debug.h>
#include "ehci_types.h"
#include "ehci.h"
#include "ehci.c"
Include dependency graph for tinyehci.c:

Go to the source code of this file.

Macros

#define debug_printf(a...)
 
#define print_hex_dump_bytes(a, b, c, d)
 
#define ehci_dbg(a...)   debug_printf(a)
 
#define printk(a...)   debug_printf(a)
 
#define BUG()   while(1)
 
#define BUG_ON(a)   while(1)
 
#define cpu_to_le32(a)   bswap_32(a)
 
#define le32_to_cpu(a)   bswap_32(a)
 
#define cpu_to_le16(a)   bswap_16(a)
 
#define le16_to_cpu(a)   bswap_16(a)
 
#define cpu_to_be32(a)   (a)
 
#define be32_to_cpu(a)   (a)
 
#define ehci_readl(a)   read32((u32)a)
 
#define ehci_writel(v, a)   write32((u32)a,v)
 
#define get_timer()   (mftb()/(PPC_TIMEBASE_FREQ/1000000LL))
 
#define EHCI_HCD_COUNT   2
 

Functions

s32 EHCI_Init (void)
 

Variables

struct ehci_hcd ehci_hcds [EHCI_HCD_COUNT]
 

Macro Definition Documentation

◆ be32_to_cpu

#define be32_to_cpu (   a)    (a)

Definition at line 58 of file tinyehci.c.

◆ BUG

#define BUG ( )    while(1)

Definition at line 51 of file tinyehci.c.

◆ BUG_ON

#define BUG_ON (   a)    while(1)

Definition at line 52 of file tinyehci.c.

◆ cpu_to_be32

#define cpu_to_be32 (   a)    (a)

Definition at line 57 of file tinyehci.c.

◆ cpu_to_le16

#define cpu_to_le16 (   a)    bswap_16(a)

Definition at line 55 of file tinyehci.c.

◆ cpu_to_le32

#define cpu_to_le32 (   a)    bswap_32(a)

Definition at line 53 of file tinyehci.c.

◆ debug_printf

#define debug_printf (   a...)

Definition at line 44 of file tinyehci.c.

◆ ehci_dbg

#define ehci_dbg (   a...)    debug_printf(a)

Definition at line 49 of file tinyehci.c.

◆ EHCI_HCD_COUNT

#define EHCI_HCD_COUNT   2

Definition at line 63 of file tinyehci.c.

◆ ehci_readl

#define ehci_readl (   a)    read32((u32)a)

Definition at line 59 of file tinyehci.c.

◆ ehci_writel

#define ehci_writel (   v,
 
)    write32((u32)a,v)

Definition at line 60 of file tinyehci.c.

◆ get_timer

#define get_timer ( )    (mftb()/(PPC_TIMEBASE_FREQ/1000000LL))

Definition at line 61 of file tinyehci.c.

◆ le16_to_cpu

#define le16_to_cpu (   a)    bswap_16(a)

Definition at line 56 of file tinyehci.c.

◆ le32_to_cpu

#define le32_to_cpu (   a)    bswap_32(a)

Definition at line 54 of file tinyehci.c.

◆ print_hex_dump_bytes

#define print_hex_dump_bytes (   a,
  b,
  c,
 
)

Definition at line 47 of file tinyehci.c.

◆ printk

#define printk (   a...)    debug_printf(a)

Definition at line 50 of file tinyehci.c.

Function Documentation

◆ EHCI_Init()

s32 EHCI_Init ( void  )

Definition at line 100 of file tinyehci.c.

Variable Documentation

◆ ehci_hcds

struct ehci_hcd ehci_hcds[EHCI_HCD_COUNT]

Definition at line 66 of file tinyehci.c.