Skip to content

Commit 25d743a

Browse files
authored
Get drivers building on Linux 5.8 (#4156)
Cleanup README
1 parent 9368a67 commit 25d743a

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

README.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@ Xilinx Runtime
1515

1616

1717
Xilinx Runtime (XRT) is implemented as as a combination of userspace and kernel
18-
driver components. XRT supports both PCIe based boards like U200, U250, U280 and MPSoC
19-
based embedded platforms. XRT provides a standardized software interface to Xilinx
20-
FPGA. The key user APIs are defined in
18+
driver components. XRT supports both PCIe based boards like U30, U50, U200, U250,
19+
U280, VCK190 and MPSoC based embedded platforms. XRT provides a standardized software
20+
interface to Xilinx FPGA. The key user APIs are defined in
2121
`xrt.h <src/runtime_src/core/include/xrt.h>`_ header file.
2222

2323
-------------------------------------------------------------------------------
2424

25-
`System Requirements <src/runtime_src/doc/toc/system_requirements.rst>`_
25+
`System Requirements <https://xilinx.github.io/XRT/master/html/system_requirements.html>`_
2626

2727
-------------------------------------------------------------------------------
2828

29-
`Build Instructions <src/runtime_src/doc/toc/build.rst>`_
29+
`Build Instructions <https://xilinx.github.io/XRT/master/html/build.html>`_
3030

3131
-------------------------------------------------------------------------------
3232

33-
`Test Instructions <src/runtime_src/doc/toc/test.rst>`_
33+
`Test Instructions <https://xilinx.github.io/XRT/master/html/test.html>`_
3434

3535
-------------------------------------------------------------------------------
3636

src/runtime_src/core/pcie/driver/linux/xocl/subdev/xiic.c

+9-4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <linux/interrupt.h>
2929
#include <linux/wait.h>
3030
#include <linux/io.h>
31+
#include <linux/version.h>
3132

3233
#include "../xocl_drv.h"
3334

@@ -110,7 +111,7 @@
110111
#define LM63_REG_REMOTE_TCRIT_1 0x01
111112

112113
#define MAX_TACH_THRESHOLD 0x940
113-
#define MGMT_LM96_IMPLEMENT 0
114+
#define MGMT_LM96_IMPLEMENT 0
114115

115116
enum xilinx_i2c_state {
116117
STATE_DONE,
@@ -792,7 +793,7 @@ static int xiic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
792793
err = -ETIMEDOUT;
793794
goto out;
794795
}
795-
796+
796797
out:
797798
return err;
798799
}
@@ -896,7 +897,7 @@ static int xiic_probe(struct platform_device *pdev)
896897
i2c->base = ioremap_nocache(res->start, res->end - res->start + 1);
897898

898899
i2c->adap = xiic_adapter;
899-
snprintf(i2c->adap.name, sizeof(i2c->adap.name) - 1,
900+
snprintf(i2c->adap.name, sizeof(i2c->adap.name) - 1,
900901
"xclmgmt-i2c-%s", dev_name(&pdev->dev));
901902
i2c_set_adapdata(&i2c->adap, i2c);
902903

@@ -977,7 +978,7 @@ static int xiic_probe(struct platform_device *pdev)
977978
tach_value = data.byte;
978979

979980
/* read MSB */
980-
981+
981982
i2c_smbus_xfer(&i2c->adap, LM63_ADDR, 0,
982983
I2C_SMBUS_READ, LM63_REG_TACH_COUNT_MSB,
983984
I2C_SMBUS_BYTE_DATA, &data);
@@ -1011,7 +1012,11 @@ static int xiic_probe(struct platform_device *pdev)
10111012
I2C_SMBUS_BYTE_DATA, &data);
10121013

10131014
cont:
1015+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)
1016+
i2c->lm63 = i2c_new_client_device(&i2c->adap, &lm96163_board_info);
1017+
#else
10141018
i2c->lm63 = i2c_new_device(&i2c->adap, &lm96163_board_info);
1019+
#endif
10151020
if (!i2c->lm63) {
10161021
xocl_err(&pdev->dev, "add lm96163 failed \n");
10171022
}

0 commit comments

Comments
 (0)