Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>master
parent
1da87516e5
commit
0aa6c7df60
@ -1,49 +0,0 @@ |
||||
From f1ba020af5076172c9d29006a747ccf40027fedc Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f1ba020af5076172c9d29006a747ccf40027fedc.1458840219.git.mschiffer@universe-factory.net>
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 24 Mar 2016 15:34:05 +0100
|
||||
Subject: [PATCH] MIPS: ath79: make bootconsole wait for both THRE and TEMT
|
||||
|
||||
This makes the ath79 bootconsole behave the same way as the generic 8250
|
||||
bootconsole.
|
||||
|
||||
Also waiting for TEMT (transmit buffer is empty) instead of just THRE
|
||||
(transmit buffer is not full) ensures that all characters have been
|
||||
transmitted before the real serial driver starts reconfiguring the serial
|
||||
controller (which would sometimes result in garbage being transmitted.)
|
||||
This change does not cause a visible performance loss.
|
||||
|
||||
In addition, this seems to fix a hang observed in certain configurations on
|
||||
many AR7xxx/AR9xxx SoCs during autoconfig of the real serial driver.
|
||||
|
||||
A more complete follow-up patch will disable 8250 autoconfig for ath79
|
||||
altogether (the serial controller is detected as a 16550A, which is not
|
||||
fully compatible with the ath79 serial, and the autoconfig may lead to
|
||||
undefined behavior on ath79.)
|
||||
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
---
|
||||
arch/mips/ath79/early_printk.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/arch/mips/ath79/early_printk.c
|
||||
+++ b/arch/mips/ath79/early_printk.c
|
||||
@@ -31,13 +31,15 @@ static inline void prom_putchar_wait(voi
|
||||
} while (1);
|
||||
}
|
||||
|
||||
+#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
|
||||
+
|
||||
static void prom_putchar_ar71xx(unsigned char ch)
|
||||
{
|
||||
void __iomem *base = (void __iomem *)(KSEG1ADDR(AR71XX_UART_BASE));
|
||||
|
||||
- prom_putchar_wait(base + UART_LSR * 4, UART_LSR_THRE, UART_LSR_THRE);
|
||||
+ prom_putchar_wait(base + UART_LSR * 4, BOTH_EMPTY, BOTH_EMPTY);
|
||||
__raw_writel(ch, base + UART_TX * 4);
|
||||
- prom_putchar_wait(base + UART_LSR * 4, UART_LSR_THRE, UART_LSR_THRE);
|
||||
+ prom_putchar_wait(base + UART_LSR * 4, BOTH_EMPTY, BOTH_EMPTY);
|
||||
}
|
||||
|
||||
static void prom_putchar_ar933x(unsigned char ch)
|
@ -1,43 +0,0 @@ |
||||
From 4d4b769727386c6a1b7274e3083cc6b24364b4fa Mon Sep 17 00:00:00 2001
|
||||
From: Martin Sperl <kernel@martin.sperl.org>
|
||||
Date: Mon, 29 Feb 2016 11:39:17 +0000
|
||||
Subject: [PATCH 256/381] clk: bcm2835: pll_off should only update
|
||||
CM_PLL_ANARST
|
||||
|
||||
bcm2835_pll_off is currently assigning CM_PLL_ANARST to the control
|
||||
register, which may lose the other bits that are currently set by the
|
||||
clock dividers.
|
||||
|
||||
It also now locks during the read/modify/write cycle of both
|
||||
registers.
|
||||
|
||||
Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the
|
||||
audio domain clocks")
|
||||
|
||||
Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Reviewed-by: Eric Anholt <eric@anholt.net>
|
||||
(cherry picked from commit 6727f086cfe4ddcc651eb2bf4301abfcf619be06)
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -913,8 +913,14 @@ static void bcm2835_pll_off(struct clk_h
|
||||
struct bcm2835_cprman *cprman = pll->cprman;
|
||||
const struct bcm2835_pll_data *data = pll->data;
|
||||
|
||||
- cprman_write(cprman, data->cm_ctrl_reg, CM_PLL_ANARST);
|
||||
- cprman_write(cprman, data->a2w_ctrl_reg, A2W_PLL_CTRL_PWRDN);
|
||||
+ spin_lock(&cprman->regs_lock);
|
||||
+ cprman_write(cprman, data->cm_ctrl_reg,
|
||||
+ cprman_read(cprman, data->cm_ctrl_reg) |
|
||||
+ CM_PLL_ANARST);
|
||||
+ cprman_write(cprman, data->a2w_ctrl_reg,
|
||||
+ cprman_read(cprman, data->a2w_ctrl_reg) |
|
||||
+ A2W_PLL_CTRL_PWRDN);
|
||||
+ spin_unlock(&cprman->regs_lock);
|
||||
}
|
||||
|
||||
static int bcm2835_pll_on(struct clk_hw *hw)
|
@ -1,36 +0,0 @@ |
||||
From 260572944700ab13fa3f7a68a387556220cef277 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Sperl <kernel@martin.sperl.org>
|
||||
Date: Mon, 29 Feb 2016 11:39:20 +0000
|
||||
Subject: [PATCH 257/381] clk: bcm2835: divider value has to be 1 or more
|
||||
|
||||
Current clamping of a normal divider allows a value < 1 to be valid.
|
||||
|
||||
A divider of < 1 would actually only be possible if we had a PLL...
|
||||
|
||||
So this patch clamps the divider to 1.
|
||||
|
||||
Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the
|
||||
audio domain clocks")
|
||||
|
||||
Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Reviewed-by: Eric Anholt <eric@anholt.net>
|
||||
(cherry picked from commit 997f16bd5d2e9b3456027f96fcadfe1e2bf12f4e)
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -1202,8 +1202,9 @@ static u32 bcm2835_clock_choose_div(stru
|
||||
div += unused_frac_mask + 1;
|
||||
div &= ~unused_frac_mask;
|
||||
|
||||
- /* Clamp to the limits. */
|
||||
- div = max(div, unused_frac_mask + 1);
|
||||
+ /* clamp to min divider of 1 */
|
||||
+ div = max_t(u32, div, 1 << CM_DIV_FRAC_BITS);
|
||||
+ /* clamp to the highest possible fractional divider */
|
||||
div = min_t(u32, div, GENMASK(data->int_bits + CM_DIV_FRAC_BITS - 1,
|
||||
CM_DIV_FRAC_BITS - data->frac_bits));
|
||||
|
@ -1,58 +0,0 @@ |
||||
Some of the GPIO configs were wrong in the submitted DTS files,
|
||||
this patch fixes all affected boards.
|
||||
|
||||
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
|
||||
|
||||
Cc: <stable@vger.kernel.org> # v4.1 +
|
||||
---
|
||||
arch/arm/boot/dts/armada-385-linksys.dtsi | 6 +++---
|
||||
arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 4 ++--
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/armada-385-linksys.dtsi
|
||||
+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi
|
||||
@@ -245,7 +245,7 @@
|
||||
button@2 {
|
||||
label = "Factory Reset Button";
|
||||
linux,code = <KEY_RESTART>;
|
||||
- gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
|
||||
+ gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
};
|
||||
|
||||
sata {
|
||||
- gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
|
||||
+ gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
|
||||
default-state = "off";
|
||||
};
|
||||
};
|
||||
@@ -313,7 +313,7 @@
|
||||
|
||||
&pinctrl {
|
||||
keys_pin: keys-pin {
|
||||
- marvell,pins = "mpp24", "mpp47";
|
||||
+ marvell,pins = "mpp24", "mpp29";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
|
||||
--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
|
||||
+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
|
||||
@@ -304,13 +304,13 @@
|
||||
button@1 {
|
||||
label = "WPS";
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
- gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
|
||||
+ gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
button@2 {
|
||||
label = "Factory Reset Button";
|
||||
linux,code = <KEY_RESTART>;
|
||||
- gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
|
||||
+ gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in new issue