Commit 67de10fb authored by Stefan Wahren's avatar Stefan Wahren Committed by Wolfram Sang

i2c: bcm2835: Avoid clk stretch quirk for BCM2711

The I2C block on the BCM2711 isn't affected by the clk stretching bug.
So there is no need to apply the corresponding quirk.
Signed-off-by: default avatarStefan Wahren <wahrenst@gmx.net>
Reviewed-by: default avatarEric Anholt <eric@anholt.net>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent ca85ee74
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/of_device.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -389,7 +390,7 @@ static const struct i2c_algorithm bcm2835_i2c_algo = { ...@@ -389,7 +390,7 @@ static const struct i2c_algorithm bcm2835_i2c_algo = {
}; };
/* /*
* This HW was reported to have problems with clock stretching: * The BCM2835 was reported to have problems with clock stretching:
* http://www.advamation.com/knowhow/raspberrypi/rpi-i2c-bug.html * http://www.advamation.com/knowhow/raspberrypi/rpi-i2c-bug.html
* https://www.raspberrypi.org/forums/viewtopic.php?p=146272 * https://www.raspberrypi.org/forums/viewtopic.php?p=146272
*/ */
...@@ -475,7 +476,7 @@ static int bcm2835_i2c_probe(struct platform_device *pdev) ...@@ -475,7 +476,7 @@ static int bcm2835_i2c_probe(struct platform_device *pdev)
adap->algo = &bcm2835_i2c_algo; adap->algo = &bcm2835_i2c_algo;
adap->dev.parent = &pdev->dev; adap->dev.parent = &pdev->dev;
adap->dev.of_node = pdev->dev.of_node; adap->dev.of_node = pdev->dev.of_node;
adap->quirks = &bcm2835_i2c_quirks; adap->quirks = of_device_get_match_data(&pdev->dev);
bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, 0); bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, 0);
...@@ -501,7 +502,8 @@ static int bcm2835_i2c_remove(struct platform_device *pdev) ...@@ -501,7 +502,8 @@ static int bcm2835_i2c_remove(struct platform_device *pdev)
} }
static const struct of_device_id bcm2835_i2c_of_match[] = { static const struct of_device_id bcm2835_i2c_of_match[] = {
{ .compatible = "brcm,bcm2835-i2c" }, { .compatible = "brcm,bcm2711-i2c" },
{ .compatible = "brcm,bcm2835-i2c", .data = &bcm2835_i2c_quirks },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, bcm2835_i2c_of_match); MODULE_DEVICE_TABLE(of, bcm2835_i2c_of_match);
......
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