enigma2 20150309 -> 20150316
[opendreambox.git] / meta-bsp / dm800sev2 / recipes / linux / linux-dreambox-3.2 / 0001-add-support-for-DM800SEv2-and-DM500HDv2-simplified-1.patch
1 From 202e033373b10f069b078d2d67933bcf51657151 Mon Sep 17 00:00:00 2001
2 From: Andreas Monzner <andreas.monzner@dream-property.net>
3 Date: Thu, 29 Nov 2012 00:34:21 +0100
4 Subject: [PATCH] add support for DM800SEv2 and DM500HDv2, simplified 1MBIT
5  console support
6
7 ---
8  arch/mips/brcmstb/Kconfig  |    4 ++--
9  arch/mips/brcmstb/board.c  |    2 +-
10  arch/mips/brcmstb/prom.c   |    2 +-
11  arch/mips/dreambox/Kconfig |   23 ++++++++++++++++++++---
12  drivers/tty/serial/8250.c  |    2 +-
13  5 files changed, 25 insertions(+), 8 deletions(-)
14
15 diff --git a/arch/mips/brcmstb/Kconfig b/arch/mips/brcmstb/Kconfig
16 index f0852cb..e81c8e7 100644
17 --- a/arch/mips/brcmstb/Kconfig
18 +++ b/arch/mips/brcmstb/Kconfig
19 @@ -435,7 +435,7 @@ config BCM7405B0
20         select BCM7405
21         select BMIPS4380
22         select BRCM_UARTA_IS_16550
23 -       select BRCM_UARTB_IS_16550 if !DREAMBOX_DM500HD
24 +       select BRCM_UARTB_IS_16550 if !DREAMBOX_1MBIT_CONSOLE
25         select BRCM_UARTC_IS_16550
26         select BRCM_HAS_PCI23
27         select BRCM_HAS_EMAC_0
28 @@ -454,7 +454,7 @@ config BCM7405D0
29         select BCM7405
30         select BMIPS4380
31         select BRCM_UARTA_IS_16550
32 -       select BRCM_UARTB_IS_16550 if !(DREAMBOX_DM800SE || DREAMBOX_DM7020HD)
33 +       select BRCM_UARTB_IS_16550 if !DREAMBOX_1MBIT_CONSOLE
34         select BRCM_UARTC_IS_16550
35         select BRCM_HAS_PCI23
36         select BRCM_HAS_EMAC_0
37 diff --git a/arch/mips/brcmstb/board.c b/arch/mips/brcmstb/board.c
38 index ff1c219..53d24e9 100644
39 --- a/arch/mips/brcmstb/board.c
40 +++ b/arch/mips/brcmstb/board.c
41 @@ -159,7 +159,9 @@ void __init board_pinmux_setup(void)
42         brcm_ext_mii_mode = BRCM_PHY_TYPE_EXT_MII;
43  #endif
44  
45 -#elif defined(CONFIG_DREAMBOX_DM500HD) || defined(CONFIG_DREAMBOX_DM800SE) || defined(CONFIG_DREAMBOX_DM7020HD)
46 +#elif defined(CONFIG_DREAMBOX_DM7020HD) || \
47 +      defined(CONFIG_DREAMBOX_DM800SE) || defined(CONFIG_DREAMBOX_DM500HD) || \
48 +      defined(CONFIG_DREAMBOX_DM800SE_V2) || defined(CONFIG_DREAMBOX_DM500HD_V2)
49  
50         PINMUX(9, gpio_074, 4);         // UARTC RTS
51         PINMUX(9, gpio_073, 4);         // UARTC CTS
52 @@ -731,7 +731,7 @@ static struct mtd_partition fixed_partition_map[] = {
53         { .name = "root partition",     .offset = 4 * 1024 * 1024,      .size = 60 * 1024 * 1024,       },
54  };
55  
56 -#elif defined(CONFIG_DREAMBOX_DM7020HD)
57 +#elif defined(CONFIG_DREAMBOX_DM7020HD) || defined(CONFIG_DREAMBOX_DM800SE_V2) || defined(CONFIG_DREAMBOX_DM500HD_V2)
58  
59  static struct mtd_partition fixed_partition_map[] = {
60         { .name = "complete",           .offset = 0,                    .size = 1024 * 1024 * 1024,     },
61 @@ -781,7 +781,7 @@
62   */
63  int __init board_get_partition_map(struct mtd_partition **p)
64  {
65 -#if defined(CONFIG_DREAMBOX_DM7020HD)
66 +#if defined(CONFIG_DREAMBOX_DM7020HD)  || defined(CONFIG_DREAMBOX_DM800SE_V2) || defined(CONFIG_DREAMBOX_DM500HD_V2)
67         if (legacy_flash_map) {
68                 *p = fixed_partition_map_legacy;
69                 return ARRAY_SIZE(fixed_partition_map_legacy);
70 diff --git a/arch/mips/brcmstb/prom.c b/arch/mips/brcmstb/prom.c
71 index 1eac57d..9b1ea89 100644
72 --- a/arch/mips/brcmstb/prom.c
73 +++ b/arch/mips/brcmstb/prom.c
74 @@ -302,7 +302,7 @@ static inline void __init setup_early_16550(unsigned long base_pa)
75         sprintf(args, "uart,mmio,0x%08lx,115200n8", base_pa);
76  #endif
77  
78 -#if defined(CONFIG_DREAMBOX_DM800SE) || defined(CONFIG_DREAMBOX_DM500HD) || defined(CONFIG_DREAMBOX_DM7020HD)
79 +#ifdef CONFIG_DREAMBOX_1MBIT_CONSOLE
80         {
81                 char *s = strstr(args, "115200n8");
82                 if (s)
83 diff --git a/arch/mips/dreambox/Kconfig b/arch/mips/dreambox/Kconfig
84 index 7ba1e7d..f2d43cbc 100644
85 --- a/arch/mips/dreambox/Kconfig
86 +++ b/arch/mips/dreambox/Kconfig
87 @@ -6,10 +6,15 @@ config DREAMBOX
88         select FB_CFB_FILLRECT
89         select FB_CFB_IMAGEBLIT
90  
91 +config DREAMBOX_1MBIT_CONSOLE
92 +       bool
93 +       default y if DREAMBOX_DM800SE || DREAMBOX_DM800SE_V2 || DREAMBOX_DM500HD || DREAMBOX_DM500HD_V2 || DREAMBOX_DM7020HD
94 +       default n if DREAMBOX_DM8000 || DREAMBOX_DM800
95 +
96  config DREAMBOX_SWAP_ATA_PORTS
97         bool "Swap SATA ports"
98 -       default y if DREAMBOX_DM800SE
99 -       default n if !DREAMBOX_DM800SE
100 +       default y if DREAMBOX_DM800SE || DREAMBOX_DM800SE_V2
101 +       default n if !(DREAMBOX_DM800SE || DREAMBOX_DM800SE_V2)
102  
103  config DREAMBOX_FIRST_SUPPORTS_HW_ECC
104         bool
105 @@ -23,13 +28,25 @@ config DREAMBOX_DM500HD
106         bool "DM 500 HD"
107         depends on BCM7405B0
108  
109 +config DREAMBOX_DM500HD_V2
110 +       bool "DM 500 HDv2"
111 +       depends on BCM7405D0
112 +       select DREAMBOX_FIRST_SUPPORTS_HW_ECC
113 +       select BRCM_UPPER_MEMORY
114 +
115  config DREAMBOX_DM800
116         bool "DM 800 HD PVR"
117         depends on BCM7401C0
118  
119  config DREAMBOX_DM800SE
120 -       bool "DM 800 HD SE"
121 +       bool "DM 800 SE"
122 +       depends on BCM7405D0
123 +
124 +config DREAMBOX_DM800SE_V2
125 +       bool "DM 800 SEv2"
126         depends on BCM7405D0
127 +       select DREAMBOX_FIRST_SUPPORTS_HW_ECC
128 +       select BRCM_UPPER_MEMORY
129  
130  config DREAMBOX_DM7020HD
131         bool "DM 7020 HD"
132 diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c
133 index 2d2024d..5ff270d 100644
134 --- a/drivers/tty/serial/8250.c
135 +++ b/drivers/tty/serial/8250.c
136 @@ -2337,7 +2337,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios,
137                 cval |= UART_LCR_SPAR;
138  #endif
139  
140 -#if defined(CONFIG_DREAMBOX_DM500HD) || defined(CONFIG_DREAMBOX_DM800SE) || defined(CONFIG_DREAMBOX_DM7020HD)
141 +#ifdef CONFIG_DREAMBOX_1MBIT_CONSOLE
142         if (port->line == 0) {  // uart 0
143                 quot = 5;
144                 baud = 1000000;
145 -- 
146 1.7.10.4