Commit 3c8040b9 authored by Luis Fernando Ruiz's avatar Luis Fernando Ruiz Committed by Alessandro Rubini

kernel/fd-core: accept SVEC as a carrier

Also, this turns the sdb part to spec-specific code, hopefully
as a temporary measure.
parent 77007f22
......@@ -152,9 +152,10 @@ int fd_probe(struct fmc_device *fmc)
return -ENOMEM;
}
if (strcmp (fmc->carrier_name, "SPEC")) {
dev_err(dev, "driver \"%s\" only works on SPEC card\n",
KBUILD_MODNAME);
if (strcmp(fmc->carrier_name, "SPEC") &&
strcmp(fmc->carrier_name, "SVEC") ) {
dev_err(dev, "driver \"%s\" only works on "
"SPEC/SVEC cards\n", KBUILD_MODNAME);
dev_err(dev, "support for carrier \"%s\" is missing\n",
fmc->carrier_name);
return -ENODEV;
......@@ -180,7 +181,9 @@ int fd_probe(struct fmc_device *fmc)
return ret; /* other error: pass over */
}
/* FIXME: factorize the following stuff */
if (!strcmp(fmc->carrier_name, "SPEC")) {
/* This is spec-specific by now. FIXME: factorize sdb */
/* Verify that we have SDB at offset 0 */
if (fmc_readl(fmc, 0) != 0x5344422d) {
dev_err(dev, "Can't find SDB magic (got 0x%x)\n",
......@@ -196,7 +199,7 @@ int fd_probe(struct fmc_device *fmc)
}
if (fd_show_sdb)
fmc_show_sdb_tree(fmc);
}
spin_lock_init(&fd->lock);
fmc->mezzanine_data = fd;
fd->fmc = fmc;
......
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