8 #include <soc/pci_devs.h>
11 #define DUAL_ROLE_CFG0 0x80d8
12 # define DRD_CONFIG_MASK (0x3 << 0)
13 # define DRD_CONFIG_DYNAMIC (0x0 << 0)
14 # define DRD_CONFIG_HOST (0x1 << 0)
15 # define DRD_CONFIG_DEVICE (0x2 << 0)
16 # define SW_VBUS_VALID_MASK (1 << 24)
17 # define SW_VBUS_DEASSERT_VALID (0 << 24)
18 # define SW_VBUS_ASSERT_VALID (1 << 24)
19 # define SW_IDPIN_EN_MASK (1 << 21)
20 # define SW_IDPIN_DIS (0 << 21)
21 # define SW_IDPIN_EN (1 << 21)
22 # define SW_IDPIN_MASK (1 << 20)
23 # define SW_IDPIN_HOST (0 << 20)
24 # define SW_IDPIN_DEVICE (1 << 20)
25 #define DUAL_ROLE_CFG1 0x80dc
26 # define DRD_MODE_MASK (1 << 29)
27 # define DRD_MODE_DEVICE (0 << 29)
28 # define DRD_MODE_HOST (1 << 29)
#define SW_VBUS_VALID_MASK
static void configure_host_mode_port0(struct device *dev)
void soc_xdci_init(struct device *dev)
#define SW_VBUS_DEASSERT_VALID
#define DRD_CONFIG_DYNAMIC
static void write32(void *addr, uint32_t val)
static uint32_t read32(const void *addr)
#define printk(level,...)
struct resource * find_resource(const struct device *dev, unsigned int index)
Return an existing resource structure for a given index.
static int stopwatch_expired(struct stopwatch *sw)
static long stopwatch_duration_msecs(struct stopwatch *sw)
static void stopwatch_init_msecs_expire(struct stopwatch *sw, long ms)
#define BIOS_INFO
BIOS_INFO - Expected events.
#define PCI_BASE_ADDRESS_0