aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-3.10/0143-i2c-bcm2708-fixed-baudrate.patch
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2014-09-27 19:10:51 +0000
committerFlorian Fainelli <florian@openwrt.org>2014-09-27 19:10:51 +0000
commit6918ea2484861cbf806c812b95a814ab40063c05 (patch)
tree3f4d53baabebad9339cadd1bbfaaf07ed61b9c1e /target/linux/brcm2708/patches-3.10/0143-i2c-bcm2708-fixed-baudrate.patch
parentff6b0d57b8e4dd9c72b13ac0586c523c8d6e8841 (diff)
downloadupstream-6918ea2484861cbf806c812b95a814ab40063c05.tar.gz
upstream-6918ea2484861cbf806c812b95a814ab40063c05.tar.bz2
upstream-6918ea2484861cbf806c812b95a814ab40063c05.zip
brcm2708: update 3.10 patches with raspberrypi/rpi-3.10.y of 27 Apr. 2014
Update the 3.10 rasperry patches by rebasing raspberry/rpi-3.10-y against linux-stable/v3.10.49. Signed-off-by: Florian Fainelli <florian@openwrt.org> SVN-Revision: 42678
Diffstat (limited to 'target/linux/brcm2708/patches-3.10/0143-i2c-bcm2708-fixed-baudrate.patch')
-rw-r--r--target/linux/brcm2708/patches-3.10/0143-i2c-bcm2708-fixed-baudrate.patch15
1 files changed, 10 insertions, 5 deletions
diff --git a/target/linux/brcm2708/patches-3.10/0143-i2c-bcm2708-fixed-baudrate.patch b/target/linux/brcm2708/patches-3.10/0143-i2c-bcm2708-fixed-baudrate.patch
index f805a898cc..69559075e1 100644
--- a/target/linux/brcm2708/patches-3.10/0143-i2c-bcm2708-fixed-baudrate.patch
+++ b/target/linux/brcm2708/patches-3.10/0143-i2c-bcm2708-fixed-baudrate.patch
@@ -1,7 +1,7 @@
-From fdd5f63fca69c692eaaac24b3a3d23e2cdf2fb4d Mon Sep 17 00:00:00 2001
+From bfece5de53315bba13fd253745d12d63a8803b11 Mon Sep 17 00:00:00 2001
From: brabl2 <pavelvrbka@seznam.cz>
Date: Sat, 21 Dec 2013 21:25:36 +0100
-Subject: [PATCH 143/174] i2c-bcm2708: fixed baudrate
+Subject: [PATCH 143/196] i2c-bcm2708: fixed baudrate
Fixed issue where the wrong CDIV value was set for baudrates below 3815 Hz (for 250MHz bus clock). In that case the computed CDIV value was more than 0xffff. However the CDIV register width is only 16 bits. This resulted in incorrect setting of CDIV and higher baudrate than intended.
Example: 3500Hz -> CDIV=0x11704 -> CDIV(16bit)=0x1704 -> 42430Hz
@@ -11,9 +11,11 @@ The correct baudrate is shown in the log after the cdiv > 0xffff correction.
drivers/i2c/busses/i2c-bcm2708.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
+diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c
+index 33f4e7d..dd7a5c8 100644
--- a/drivers/i2c/busses/i2c-bcm2708.c
+++ b/drivers/i2c/busses/i2c-bcm2708.c
-@@ -155,6 +155,8 @@ static inline void bcm2708_bsc_setup(str
+@@ -155,6 +155,8 @@ static inline void bcm2708_bsc_setup(struct bcm2708_i2c *bi)
bus_hz = clk_get_rate(bi->clk);
cdiv = bus_hz / baudrate;
@@ -22,7 +24,7 @@ The correct baudrate is shown in the log after the cdiv > 0xffff correction.
if (bi->msg->flags & I2C_M_RD)
c |= BSC_C_INTR | BSC_C_READ;
-@@ -268,6 +270,8 @@ static int bcm2708_i2c_probe(struct plat
+@@ -268,6 +270,8 @@ static int bcm2708_i2c_probe(struct platform_device *pdev)
struct clk *clk;
struct bcm2708_i2c *bi;
struct i2c_adapter *adap;
@@ -31,7 +33,7 @@ The correct baudrate is shown in the log after the cdiv > 0xffff correction.
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!regs) {
-@@ -343,8 +347,15 @@ static int bcm2708_i2c_probe(struct plat
+@@ -343,8 +347,15 @@ static int bcm2708_i2c_probe(struct platform_device *pdev)
goto out_free_irq;
}
@@ -49,3 +51,6 @@ The correct baudrate is shown in the log after the cdiv > 0xffff correction.
return 0;
+--
+1.9.1
+