Commit e9da030d authored by Alessandro Rubini's avatar Alessandro Rubini

core: check the gateware is correct

parent a44b5862
......@@ -142,6 +142,13 @@ int fd_probe(struct spec_dev *dev)
fd->calib = fd_default_calib;
/* Check the binary is there */
if (readl(fd->regs + FD_REG_IDR) != FD_MAGIC_FPGA) {
pr_err("%s: card at %04x:%04x has wrong gateware\n",
__func__, dev->pdev->bus->number, dev->pdev->devfn);
return -ENODEV;
}
/* First, hardware reset */
fd_do_reset(fd, 1);
......
......@@ -25,6 +25,7 @@ struct spec_fd {
};
#define FD_REGS_OFFSET 0x84000
#define FD_MAGIC_FPGA 0xf19ede1a /* FD_REG_IDR content */
/* Values for the configuration of the acam PLL. Can be changed */
#define ACAM_DESIRED_BIN 80.9553
......
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