blob: 7882f339f0aa849511ffa082de1a495c85ef63ea [file] [log] [blame]
Bin Mengb994efb2015-02-02 22:35:23 +08001/*
2 * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#ifndef _QUARK_DEVICE_H_
8#define _QUARK_DEVICE_H_
9
10#include <pci.h>
11
Bin Meng05b98ec2015-05-25 22:35:06 +080012#define QUARK_HOST_BRIDGE_DEV 0
13#define QUARK_HOST_BRIDGE_FUNC 0
14
15#define QUARK_DEV_20 20
16#define QUARK_MMC_SDIO_FUNC 0
17#define QUARK_UART0_FUNC 1
18#define QUARK_USB_DEVICE_FUNC 2
19#define QUARK_USB_EHCI_FUNC 3
20#define QUARK_USB_OHCI_FUNC 4
21#define QUARK_UART1_FUNC 5
22#define QUARK_EMAC0_FUNC 6
23#define QUARK_EMAC1_FUNC 7
24
25#define QUARK_DEV_21 21
26#define QUARK_SPI0_FUNC 0
27#define QUARK_SPI1_FUNC 1
28#define QUARK_I2C_GPIO_FUNC 2
29
30#define QUARK_DEV_23 23
31#define QUARK_PCIE0_FUNC 0
32#define QUARK_PCIE1_FUNC 1
33
34#define QUARK_LGC_BRIDGE_DEV 31
35#define QUARK_LGC_BRIDGE_FUNC 0
36
37#define QUARK_HOST_BRIDGE \
38 PCI_BDF(0, QUARK_HOST_BRIDGE_DEV, QUARK_HOST_BRIDGE_FUNC)
39#define QUARK_MMC_SDIO \
40 PCI_BDF(0, QUARK_DEV_20, QUARK_MMC_SDIO_FUNC)
41#define QUARK_UART0 \
42 PCI_BDF(0, QUARK_DEV_20, QUARK_UART0_FUNC)
43#define QUARK_USB_DEVICE \
44 PCI_BDF(0, QUARK_DEV_20, QUARK_USB_DEVICE_FUNC)
45#define QUARK_USB_EHCI \
46 PCI_BDF(0, QUARK_DEV_20, QUARK_USB_EHCI_FUNC)
47#define QUARK_USB_OHCI \
48 PCI_BDF(0, QUARK_DEV_20, QUARK_USB_OHCI_FUNC)
49#define QUARK_UART1 \
50 PCI_BDF(0, QUARK_DEV_20, QUARK_UART1_FUNC)
51#define QUARK_EMAC0 \
52 PCI_BDF(0, QUARK_DEV_20, QUARK_EMAC0_FUNC)
53#define QUARK_EMAC1 \
54 PCI_BDF(0, QUARK_DEV_20, QUARK_EMAC1_FUNC)
55#define QUARK_SPI0 \
56 PCI_BDF(0, QUARK_DEV_21, QUARK_SPI0_FUNC)
57#define QUARK_SPI1 \
58 PCI_BDF(0, QUARK_DEV_21, QUARK_SPI1_FUNC)
59#define QUARK_I2C_GPIO \
60 PCI_BDF(0, QUARK_DEV_21, QUARK_I2C_GPIO_FUNC)
61#define QUARK_PCIE0 \
62 PCI_BDF(0, QUARK_DEV_23, QUARK_PCIE0_FUNC)
63#define QUARK_PCIE1 \
64 PCI_BDF(0, QUARK_DEV_23, QUARK_PCIE1_FUNC)
65#define QUARK_LEGACY_BRIDGE \
66 PCI_BDF(0, QUARK_LGC_BRIDGE_DEV, QUARK_LGC_BRIDGE_FUNC)
Bin Mengb994efb2015-02-02 22:35:23 +080067
68#endif /* _QUARK_DEVICE_H_ */