aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-3.10/0143-i2c-bcm2708-fixed-baudrate.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-12-13 11:55:11 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-12-13 11:55:11 +0000
commitb0a3e61a589daf0438f4012146282cff2add11a2 (patch)
tree3db65380a0efbe72dc87e972a6f37c11e974daf8 /target/linux/brcm2708/patches-3.10/0143-i2c-bcm2708-fixed-baudrate.patch
parentd36e9ec877c39e04a9fbcf5c3e04c385eac93b2a (diff)
downloadmaster-187ad058-b0a3e61a589daf0438f4012146282cff2add11a2.tar.gz
master-187ad058-b0a3e61a589daf0438f4012146282cff2add11a2.tar.bz2
master-187ad058-b0a3e61a589daf0438f4012146282cff2add11a2.zip
brcm2708: remove linux 3.10 support
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43687 3c298f89-4303-0410-b956-a3cf2f4a3e73
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.patch56
1 files changed, 0 insertions, 56 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
deleted file mode 100644
index 69559075e1..0000000000
--- a/target/linux/brcm2708/patches-3.10/0143-i2c-bcm2708-fixed-baudrate.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-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/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
-After correction: 3500Hz -> CDIV=0x11704 -> CDIV(16bit)=0xffff -> 3815Hz
-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(struct bcm2708_i2c *bi)
-
- bus_hz = clk_get_rate(bi->clk);
- cdiv = bus_hz / baudrate;
-+ if (cdiv > 0xffff)
-+ cdiv = 0xffff;
-
- if (bi->msg->flags & I2C_M_RD)
- c |= BSC_C_INTR | BSC_C_READ;
-@@ -268,6 +270,8 @@ static int bcm2708_i2c_probe(struct platform_device *pdev)
- struct clk *clk;
- struct bcm2708_i2c *bi;
- struct i2c_adapter *adap;
-+ unsigned long bus_hz;
-+ u32 cdiv;
-
- regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!regs) {
-@@ -343,8 +347,15 @@ static int bcm2708_i2c_probe(struct platform_device *pdev)
- goto out_free_irq;
- }
-
-- dev_info(&pdev->dev, "BSC%d Controller at 0x%08lx (irq %d) (baudrate %dk)\n",
-- pdev->id, (unsigned long)regs->start, irq, baudrate/1000);
-+ bus_hz = clk_get_rate(bi->clk);
-+ cdiv = bus_hz / baudrate;
-+ if (cdiv > 0xffff) {
-+ cdiv = 0xffff;
-+ baudrate = bus_hz / cdiv;
-+ }
-+
-+ dev_info(&pdev->dev, "BSC%d Controller at 0x%08lx (irq %d) (baudrate %d)\n",
-+ pdev->id, (unsigned long)regs->start, irq, baudrate);
-
- return 0;
-
---
-1.9.1
-