diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-01-15 15:18:18 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-01-15 15:18:18 +0000 |
commit | a0720b558c3e2005c4573ea7b04586f078121541 (patch) | |
tree | b999a772126ae5335fce9d18aecc5c8d79f05440 /target/linux/imx6/patches-4.4/207-i2c-imx-add-retries-for-NAK-s-on-ventana-boards.patch | |
parent | 2144c554b6ee2947d80fdcccb33a00cff546bfad (diff) | |
download | master-187ad058-a0720b558c3e2005c4573ea7b04586f078121541.tar.gz master-187ad058-a0720b558c3e2005c4573ea7b04586f078121541.tar.bz2 master-187ad058-a0720b558c3e2005c4573ea7b04586f078121541.zip |
imx6: add 4.4 support
Build and boot tested on the following hardware:
* GW54xx
* GW53xx
* GW52xx
* GW51xx
* GW552x
* GW551x
Signed-off-by: Pushpal Sidhu <psidhu@gateworks.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48248 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/imx6/patches-4.4/207-i2c-imx-add-retries-for-NAK-s-on-ventana-boards.patch')
-rw-r--r-- | target/linux/imx6/patches-4.4/207-i2c-imx-add-retries-for-NAK-s-on-ventana-boards.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/target/linux/imx6/patches-4.4/207-i2c-imx-add-retries-for-NAK-s-on-ventana-boards.patch b/target/linux/imx6/patches-4.4/207-i2c-imx-add-retries-for-NAK-s-on-ventana-boards.patch new file mode 100644 index 0000000000..700513ab0a --- /dev/null +++ b/target/linux/imx6/patches-4.4/207-i2c-imx-add-retries-for-NAK-s-on-ventana-boards.patch @@ -0,0 +1,22 @@ +--- a/drivers/i2c/busses/i2c-imx.c ++++ b/drivers/i2c/busses/i2c-imx.c +@@ -468,6 +468,8 @@ static int i2c_imx_acked(struct imx_i2c_ + { + if (imx_i2c_read_reg(i2c_imx, IMX_I2C_I2SR) & I2SR_RXAK) { + dev_dbg(&i2c_imx->adapter.dev, "<%s> No ACK\n", __func__); ++ if (i2c_imx->adapter.retries) ++ return -EAGAIN; + return -ENXIO; /* No ACK */ + } + +@@ -1073,6 +1075,10 @@ static int i2c_imx_probe(struct platform + i2c_imx->adapter.nr = pdev->id; + i2c_imx->adapter.dev.of_node = pdev->dev.of_node; + i2c_imx->base = base; ++ if (of_machine_is_compatible("gw,ventana") && phy_addr == 0x021a0000) { ++ dev_info(&pdev->dev, "Adding retries for Ventana GSC\n"); ++ i2c_imx->adapter.retries = 3; ++ } + + /* Get I2C clock */ + i2c_imx->clk = devm_clk_get(&pdev->dev, NULL); |