blob: 86b14894b675dad256598530a0769402793cb95e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
Hackishly enable all UART clocks before uncompressing the kernel,
so that using ttyAM1 or ttyAM2 as console can work.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Index: linux-2.6.23-rc5/include/asm-arm/arch-ep93xx/uncompress.h
===================================================================
--- linux-2.6.23-rc5.orig/include/asm-arm/arch-ep93xx/uncompress.h 2007-09-04 02:26:42.000000000 +0200
+++ linux-2.6.23-rc5/include/asm-arm/arch-ep93xx/uncompress.h 2007-09-04 02:26:47.000000000 +0200
@@ -78,6 +78,23 @@
/*
+ * We don't have clock management for the UARTs (amba-pl010)
+ * yet, so hackily enable all UART clocks here for now.
+ */
+#define PHYS_SYSCON_DEVICE_CONFIG 0x80930080
+#define PHYS_SYSCON_SWLOCK 0x809300c0
+
+static void enable_all_uart_clocks(void)
+{
+ unsigned int v;
+
+ v = __raw_readl(PHYS_SYSCON_DEVICE_CONFIG);
+ __raw_writel(0xaa, PHYS_SYSCON_SWLOCK);
+ __raw_writel(v | 0x01140000, PHYS_SYSCON_DEVICE_CONFIG);
+}
+
+
+/*
* Some bootloaders don't turn on the UARTBAUD bit, which means that
* the UARTs will be running off a divided 7.3728 MHz clock instead of
* the 14.7456 MHz peripheral clock when linux boots.
@@ -126,6 +143,7 @@
static void arch_decomp_setup(void)
{
ethernet_reset();
+ enable_all_uart_clocks();
fix_uart_base();
}
|