diff options
author | Andreas Werner <andreas.werner@men.de> | 2016-08-26 10:34:58 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-31 14:16:24 +0300 |
commit | ffc7bb3857e42acab131271e485735cbf673d0f0 (patch) | |
tree | 8747ff47afd68f8aa5ba40c93fa001d08521e9bb /drivers/mcb/mcb-internal.h | |
parent | 73edc8f7cceffe537d6888dc20703123769eb3f6 (diff) | |
download | linux-ffc7bb3857e42acab131271e485735cbf673d0f0.tar.xz |
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.
Signed-off-by: Andreas Werner <andreas.werner@men.de>
[ free bar descriptor in the non-error case ]
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mcb/mcb-internal.h')
-rw-r--r-- | drivers/mcb/mcb-internal.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mcb/mcb-internal.h b/drivers/mcb/mcb-internal.h index 5254e0285725..d6e6933b19f1 100644 --- a/drivers/mcb/mcb-internal.h +++ b/drivers/mcb/mcb-internal.h @@ -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); |