34 reg32 =
read32(abar + 0x04);
39 reg32 =
read32(abar + 0x00);
52 reg32 =
read32(abar + 0xa0);
57 for (i = 0; i < 6; ++i) {
58 u8 *
addr = abar + 0x118 + (i * 0x80);
69 reg32 &= ~((7 << 6) | (7 << 3) | (7 << 0));
70 reg32 |= (3 << 3) | (3 << 0);
84 reg32 &= ~((7 << 3) | (7 << 0));
85 reg32 |= (3 << 3) | (3 << 0);
90 reg32 &= ~((7 << 27) | (7 << 24) | (7 << 11) | (7 << 8));
91 reg32 &= ~((7 << 19) | (7 << 16) | (7 << 3) | (7 << 0));
92 reg32 |= (4 << 27) | (4 << 24) | (2 << 11) | (2 << 8);
93 reg32 |= (4 << 19) | (4 << 16) | (2 << 3) | (2 << 0);
98 reg32 &= ~((7 << 27) | (7 << 24));
99 reg32 &= ~((7 << 19) | (7 << 16) | 0xffff);
100 reg32 |= (2 << 27) | (2 << 24);
101 reg32 |= (2 << 19) | (2 << 16) | 0x00aa;
109 reg32 &= ~((7 << 3) | (7 << 0));
110 reg32 |= (3 << 3) | (3 << 0);
115 reg32 &= ~((7 << 19) | (7 << 16) | (7 << 3) | (7 << 0));
116 reg32 |= (4 << 19) | (4 << 16) | (2 << 3) | (2 << 0);
121 reg32 &= ~((7 << 19) | (7 << 16) | 0xffff);
122 reg32 |= (2 << 19) | (2 << 16) | 0x000a;
137 "device not in devicetree.cb!\n");
177 reg16 |= (1 << 15) | ((
sata_mode == 0) ? 0x3f :
config->sata_port_map);
182 if (
config->sata_clock_request &&
186 sclkcg |= ((~
config->sata_port_map) & 0x3f) << 24;
215 map = 0x0040 | 0x0020;
217 map |= (
config->sata_port_map ^ 0x3f) << 8;
243 static const struct pci_driver pch_sata
__pci_driver = {
static void write32(void *addr, uint32_t val)
static uint32_t read32(const void *addr)
#define printk(level,...)
struct resource * probe_resource(const struct device *dev, unsigned int index)
See if a resource structure already exists for a given index.
#define D31F2_IDE_TIM_PRI
#define D31F2_IDE_TIM_SEC
static __always_inline void pci_write_config32(const struct device *dev, u16 reg, u32 val)
static __always_inline u16 pci_read_config16(const struct device *dev, u16 reg)
static __always_inline u32 pci_read_config32(const struct device *dev, u16 reg)
static __always_inline void pci_write_config16(const struct device *dev, u16 reg, u16 val)
static __always_inline void pci_write_config8(const struct device *dev, u16 reg, u8 val)
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
unsigned int get_uint_option(const char *name, const unsigned int fallback)
#define PCI_COMMAND_MASTER
#define PCI_COMMAND_MEMORY
#define PCI_BASE_ADDRESS_5
void pci_dev_enable_resources(struct device *dev)
void pci_dev_read_resources(struct device *dev)
struct pci_operations pci_dev_ops_pci
Default device operation for PCI devices.
void pci_dev_set_resources(struct device *dev)
static void * res2mmio(const struct resource *res, unsigned long offset, unsigned long mask)
void sata_enable(struct device *dev)
static void sata_init(struct device *const dev)
static const struct pci_driver pch_sata __pci_driver
static struct device_operations sata_ops
static void sata_enable_ahci_mmap(struct device *const dev, const u8 port_map)
static const unsigned short pci_device_ids[]
static void sata_program_indexed(struct device *const dev)
void(* read_resources)(struct device *dev)
DEVTREE_CONST void * chip_info
typedef void(X86APIP X86EMU_intrFuncs)(int num)