add support for dm500hd v2
[opendreambox.git] / meta-bsp / dm500hdv2 / 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 diff --git a/arch/mips/brcmstb/prom.c b/arch/mips/brcmstb/prom.c
62 index 1eac57d..9b1ea89 100644
63 --- a/arch/mips/brcmstb/prom.c
64 +++ b/arch/mips/brcmstb/prom.c
65 @@ -302,7 +302,7 @@ static inline void __init setup_early_16550(unsigned long base_pa)
66         sprintf(args, "uart,mmio,0x%08lx,115200n8", base_pa);
67  #endif
68  
69 -#if defined(CONFIG_DREAMBOX_DM800SE) || defined(CONFIG_DREAMBOX_DM500HD) || defined(CONFIG_DREAMBOX_DM7020HD)
70 +#ifdef CONFIG_DREAMBOX_1MBIT_CONSOLE
71         {
72                 char *s = strstr(args, "115200n8");
73                 if (s)
74 diff --git a/arch/mips/dreambox/Kconfig b/arch/mips/dreambox/Kconfig
75 index 7ba1e7d..f2d43cbc 100644
76 --- a/arch/mips/dreambox/Kconfig
77 +++ b/arch/mips/dreambox/Kconfig
78 @@ -6,10 +6,15 @@ config DREAMBOX
79         select FB_CFB_FILLRECT
80         select FB_CFB_IMAGEBLIT
81  
82 +config DREAMBOX_1MBIT_CONSOLE
83 +       bool
84 +       default y if DREAMBOX_DM800SE || DREAMBOX_DM800SE_V2 || DREAMBOX_DM500HD || DREAMBOX_DM500HD_V2 || DREAMBOX_DM7020HD
85 +       default n if DREAMBOX_DM8000 || DREAMBOX_DM800
86 +
87  config DREAMBOX_SWAP_ATA_PORTS
88         bool "Swap SATA ports"
89 -       default y if DREAMBOX_DM800SE
90 -       default n if !DREAMBOX_DM800SE
91 +       default y if DREAMBOX_DM800SE || DREAMBOX_DM800SE_V2
92 +       default n if !(DREAMBOX_DM800SE || DREAMBOX_DM800SE_V2)
93  
94  config DREAMBOX_FIRST_SUPPORTS_HW_ECC
95         bool
96 @@ -23,13 +28,25 @@ config DREAMBOX_DM500HD
97         bool "DM 500 HD"
98         depends on BCM7405B0
99  
100 +config DREAMBOX_DM500HD_V2
101 +       bool "DM 500 HDv2"
102 +       depends on BCM7405D0
103 +       select DREAMBOX_FIRST_SUPPORTS_HW_ECC
104 +       select BRCM_UPPER_MEMORY
105 +
106  config DREAMBOX_DM800
107         bool "DM 800 HD PVR"
108         depends on BCM7401C0
109  
110  config DREAMBOX_DM800SE
111 -       bool "DM 800 HD SE"
112 +       bool "DM 800 SE"
113 +       depends on BCM7405D0
114 +
115 +config DREAMBOX_DM800SE_V2
116 +       bool "DM 800 SEv2"
117         depends on BCM7405D0
118 +       select DREAMBOX_FIRST_SUPPORTS_HW_ECC
119 +       select BRCM_UPPER_MEMORY
120  
121  config DREAMBOX_DM7020HD
122         bool "DM 7020 HD"
123 diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c
124 index 2d2024d..5ff270d 100644
125 --- a/drivers/tty/serial/8250.c
126 +++ b/drivers/tty/serial/8250.c
127 @@ -2337,7 +2337,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios,
128                 cval |= UART_LCR_SPAR;
129  #endif
130  
131 -#if defined(CONFIG_DREAMBOX_DM500HD) || defined(CONFIG_DREAMBOX_DM800SE) || defined(CONFIG_DREAMBOX_DM7020HD)
132 +#ifdef CONFIG_DREAMBOX_1MBIT_CONSOLE
133         if (port->line == 0) {  // uart 0
134                 quot = 5;
135                 baud = 1000000;
136 -- 
137 1.7.10.4
138