* [PATCH] xilinx_hwicap: add support for virtex6 FPGAs
@ 2012-04-18 21:55 Daniel Borkmann
2012-04-19 7:03 ` [PATCH] xilinx_hwicap: reset XHI_MAX_RETRIES Daniel Borkmann
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Borkmann @ 2012-04-18 21:55 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Michal Simek, Arnd Bergmann, Ariane Keller, linux-kernel
This patch adds support for the virtex6 FPGA to the xilinx_hwicap driver.
Tested on a Xilinx ML605 board. The patch is against the latest linus-tree.
Signed-off-by: Ariane Keller <ariane.keller@tik.ee.ethz.ch>
Signed-off-by: Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>
---
drivers/char/xilinx_hwicap/xilinx_hwicap.c | 30 ++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
index 31ba11c..2c5d15b 100644
--- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c
+++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
@@ -167,6 +167,7 @@ static const struct config_registers v4_config_registers = {
.BOOTSTS = UNIMPLEMENTED,
.CTL_1 = UNIMPLEMENTED,
};
+
static const struct config_registers v5_config_registers = {
.CRC = 0,
.FAR = 1,
@@ -192,6 +193,31 @@ static const struct config_registers v5_config_registers = {
.CTL_1 = 19,
};
+static const struct config_registers v6_config_registers = {
+ .CRC = 0,
+ .FAR = 1,
+ .FDRI = 2,
+ .FDRO = 3,
+ .CMD = 4,
+ .CTL = 5,
+ .MASK = 6,
+ .STAT = 7,
+ .LOUT = 8,
+ .COR = 9,
+ .MFWR = 10,
+ .FLR = UNIMPLEMENTED,
+ .KEY = UNIMPLEMENTED,
+ .CBC = 11,
+ .IDCODE = 12,
+ .AXSS = 13,
+ .C0R_1 = 14,
+ .CSOB = 15,
+ .WBSTAR = 16,
+ .TIMER = 17,
+ .BOOTSTS = 22,
+ .CTL_1 = 24,
+};
+
/**
* hwicap_command_desync - Send a DESYNC command to the ICAP port.
* @drvdata: a pointer to the drvdata.
@@ -744,6 +770,8 @@ static int __devinit hwicap_of_probe(struct platform_device *op,
regs = &v4_config_registers;
} else if (!strcmp(family, "virtex5")) {
regs = &v5_config_registers;
+ } else if (!strcmp(family, "virtex6")) {
+ regs = &v6_config_registers;
}
}
return hwicap_setup(&op->dev, id ? *id : -1, &res, config,
@@ -785,6 +813,8 @@ static int __devinit hwicap_drv_probe(struct platform_device *pdev)
regs = &v4_config_registers;
} else if (!strcmp(family, "virtex5")) {
regs = &v5_config_registers;
+ } else if (!strcmp(family, "virtex6")) {
+ regs = &v6_config_registers;
}
}
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH] xilinx_hwicap: reset XHI_MAX_RETRIES
2012-04-18 21:55 [PATCH] xilinx_hwicap: add support for virtex6 FPGAs Daniel Borkmann
@ 2012-04-19 7:03 ` Daniel Borkmann
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Borkmann @ 2012-04-19 7:03 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Michal Simek, Arnd Bergmann, Ariane Keller, linux-kernel
Reset the XHI_MAX_RETRIES value. This allows the hardware enough time to
write configuration frames during partial reconfiguration. In case of 10
the driver returns an error, although it should just have polled the
register longer.
Tested on an ML605 board. The patch is against the latest linus-tree.
Signed-off-by: Ariane Keller <ariane.keller@tik.ee.ethz.ch>
Signed-off-by: Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>
---
drivers/char/xilinx_hwicap/xilinx_hwicap.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.h b/drivers/char/xilinx_hwicap/xilinx_hwicap.h
index 8cca119..d31ee23 100644
--- a/drivers/char/xilinx_hwicap/xilinx_hwicap.h
+++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.h
@@ -86,7 +86,7 @@ struct hwicap_driver_config {
};
/* Number of times to poll the done regsiter */
-#define XHI_MAX_RETRIES 10
+#define XHI_MAX_RETRIES 5000
/************ Constant Definitions *************/
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-19 7:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-18 21:55 [PATCH] xilinx_hwicap: add support for virtex6 FPGAs Daniel Borkmann
2012-04-19 7:03 ` [PATCH] xilinx_hwicap: reset XHI_MAX_RETRIES Daniel Borkmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox