Commit 58e25399 authored by Federico Vaga's avatar Federico Vaga

kernel: export FMC slot resource

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent a4eaad15
......@@ -28,6 +28,16 @@ static int verbose;
static void svec_destroy_misc_device(struct svec_dev *svec);
static const struct resource svec_fmc = {
.name = "SVEC FMC slots",
.start = 1,
.end = 2,
.flags = IORESOURCE_BUS,
.parent = NULL,
.child = NULL,
.sibling = NULL,
};
static const struct resource svec_csr = {
.name = "SVEC CSR mem",
.start = 0,
......@@ -431,6 +441,7 @@ static int svec_remove(struct device *pdev, unsigned int ndev)
svec_destroy_misc_device(svec);
svec_remove_sysfs_files(svec);
ddm_resource_del(&svec->vme_fmc);
if (svec->verbose)
dev_info(pdev, "removed\n");
......@@ -868,6 +879,13 @@ static int svec_probe(struct device *pdev, unsigned int ndev)
svec->vme_irq.parent = pdev;
svec->vme_irq.res = &svec->res_irq;
snprintf(svec->vme_fmc.id.name, DDM_REGISTRATION_NAME_LEN,
"svec-fmc");
svec->vme_fmc.id.id = vme_dev->slot;
svec->vme_fmc.parent = pdev;
svec->vme_fmc.res = &svec_fmc;
ddm_resource_add(&svec->vme_fmc);
svec->verbose = verbose;
svec->fmcs_n = SVEC_N_SLOTS; /* FIXME: Two mezzanines */
......
......@@ -93,6 +93,7 @@ struct svec_dev {
struct resource res_mem[__MAX_MAP];
struct resource res_irq;
struct ddm_resource vme_fmc;
struct ddm_resource vme_mem;
struct ddm_resource vme_irq;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment