From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/8] x86: quark: Prepare device.h for inclusion by ASL
Date: Wed, 25 May 2016 01:48:54 -0700 [thread overview]
Message-ID: <1464166138-14975-5-git-send-email-bmeng.cn@gmail.com> (raw)
In-Reply-To: <1464166138-14975-1-git-send-email-bmeng.cn@gmail.com>
There is a device.h for quark on-chip devices, mainly for definitions
of internal PCI device numbers, but it's not ready to be included by
ASL files. Update to use hex numbers for PCI dev and __ACPI__.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---
arch/x86/include/asm/arch-quark/device.h | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/arch/x86/include/asm/arch-quark/device.h b/arch/x86/include/asm/arch-quark/device.h
index 7882f33..4b4c923 100644
--- a/arch/x86/include/asm/arch-quark/device.h
+++ b/arch/x86/include/asm/arch-quark/device.h
@@ -7,12 +7,17 @@
#ifndef _QUARK_DEVICE_H_
#define _QUARK_DEVICE_H_
-#include <pci.h>
+/*
+ * Internal PCI device numbers within the SoC.
+ *
+ * Note it must start with 0x_ prefix, as the device number macro will be
+ * included in the ACPI ASL files (see irq_helper.h and irq_route.h).
+ */
-#define QUARK_HOST_BRIDGE_DEV 0
+#define QUARK_HOST_BRIDGE_DEV 0x00
#define QUARK_HOST_BRIDGE_FUNC 0
-#define QUARK_DEV_20 20
+#define QUARK_DEV_20 0x14
#define QUARK_MMC_SDIO_FUNC 0
#define QUARK_UART0_FUNC 1
#define QUARK_USB_DEVICE_FUNC 2
@@ -22,18 +27,21 @@
#define QUARK_EMAC0_FUNC 6
#define QUARK_EMAC1_FUNC 7
-#define QUARK_DEV_21 21
+#define QUARK_DEV_21 0x15
#define QUARK_SPI0_FUNC 0
#define QUARK_SPI1_FUNC 1
#define QUARK_I2C_GPIO_FUNC 2
-#define QUARK_DEV_23 23
+#define QUARK_DEV_23 0x17
#define QUARK_PCIE0_FUNC 0
#define QUARK_PCIE1_FUNC 1
-#define QUARK_LGC_BRIDGE_DEV 31
+#define QUARK_LGC_BRIDGE_DEV 0x1f
#define QUARK_LGC_BRIDGE_FUNC 0
+#ifndef __ACPI__
+#include <pci.h>
+
#define QUARK_HOST_BRIDGE \
PCI_BDF(0, QUARK_HOST_BRIDGE_DEV, QUARK_HOST_BRIDGE_FUNC)
#define QUARK_MMC_SDIO \
@@ -64,5 +72,6 @@
PCI_BDF(0, QUARK_DEV_23, QUARK_PCIE1_FUNC)
#define QUARK_LEGACY_BRIDGE \
PCI_BDF(0, QUARK_LGC_BRIDGE_DEV, QUARK_LGC_BRIDGE_FUNC)
+#endif /* __ACPI__ */
#endif /* _QUARK_DEVICE_H_ */
--
1.8.2.1
next prev parent reply other threads:[~2016-05-25 8:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-25 8:48 [U-Boot] [PATCH 0/8] x86: quark: Add ACPI support Bin Meng
2016-05-25 8:48 ` [U-Boot] [PATCH 1/8] x86: acpi: Create a common irqlinks ASL file Bin Meng
2016-05-25 23:17 ` Simon Glass
2016-05-25 8:48 ` [U-Boot] [PATCH 2/8] x86: acpi: Make irqroute.asl common Bin Meng
2016-05-25 23:17 ` Simon Glass
2016-05-25 8:48 ` [U-Boot] [PATCH 3/8] acpi: Pass -D__ACPI__ when compiling ASL files Bin Meng
2016-05-25 23:17 ` Simon Glass
2016-05-26 0:08 ` Bin Meng
2016-05-25 8:48 ` Bin Meng [this message]
2016-05-25 23:17 ` [U-Boot] [PATCH 4/8] x86: quark: Prepare device.h for inclusion by ASL Simon Glass
2016-05-25 8:48 ` [U-Boot] [PATCH 5/8] x86: quark: Add platform ASL files Bin Meng
2016-05-25 23:17 ` Simon Glass
2016-05-26 0:10 ` Bin Meng
2016-05-25 8:48 ` [U-Boot] [PATCH 6/8] x86: quark: Generate ACPI FADT/MADT tables Bin Meng
2016-05-25 23:17 ` Simon Glass
2016-05-25 8:48 ` [U-Boot] [PATCH 7/8] x86: galileo: Enable ACPI table generation Bin Meng
2016-05-25 23:17 ` Simon Glass
2016-05-25 8:48 ` [U-Boot] [PATCH 8/8] x86: baytrail: acpi: Fix I/O APIC ID in the MADT table Bin Meng
2016-05-25 23:17 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1464166138-14975-5-git-send-email-bmeng.cn@gmail.com \
--to=bmeng.cn@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox