Skip to contentSkip to conversation

mcb: Added bar descriptor support for non PCI bus MCB carrier

PATCH Applied Andreas Werner 2 participants 2 messages Jun 28, 2016 – Jul 5, 2016 Men chameleon bus (mcb)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mcb: Added bar descriptor support for non PCI bus MCB carrier

Added support for the bar descriptor. This type is used for FPGAs connect to the LPC or to a non PCI bus.

The Bar descriptor could have a maximum of 6 BARs. Each of the devices within the FPGA could be mapped to a different BAR. The BAR descriptor is comparable to the PCI header.

---
 drivers/mcb/mcb-internal.h |   9 ++++
 drivers/mcb/mcb-parse.c    | 125 ++++++++++++++++++++++++++++++++++++++++-----
 2 files changed, 120 insertions(+), 14 deletions(-)
drivers/mcb/mcb-internal.h +9 -0
index 5254e02..d6e6933 100644
@@ -112,6 +112,15 @@ struct chameleon_bdd {
 	u32 size;
 } __packed;
 
+struct chameleon_bar {
+	u32 addr;
+	u32 size;
+};
+
+#define BAR_CNT(x) ((x) & 0x07)
+#define CHAMELEON_BAR_MAX	6
+#define BAR_DESC_SIZE(x)	((x) * sizeof(struct chameleon_bar) + sizeof(__le32))
+
 int chameleon_parse_cells(struct mcb_bus *bus, phys_addr_t mapbase,
 			  void __iomem *base);
 
drivers/mcb/mcb-parse.c +111 -14

196 lines not on this page · raw message

Signature · 1 line
2.6.2
maintainer Applied
#1 lore raw
Quoted 8 lines · Andreas Werner

Added support for the bar descriptor. This type is used for FPGAs connect to the LPC or to a non PCI bus.

The Bar descriptor could have a maximum of 6 BARs. Each of the devices within the FPGA could be mapped to a different BAR. The BAR descriptor is comparable to the PCI header.

Applied, thanks.