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
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(-)
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
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
27 select BRCM_HAS_EMAC_0
28 @@ -454,7 +454,7 @@ config BCM7405D0
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
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;
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)
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, },
56 -#elif defined(CONFIG_DREAMBOX_DM7020HD)
57 +#elif defined(CONFIG_DREAMBOX_DM7020HD) || defined(CONFIG_DREAMBOX_DM800SE_V2) || defined(CONFIG_DREAMBOX_DM500HD_V2)
59 static struct mtd_partition fixed_partition_map[] = {
60 { .name = "complete", .offset = 0, .size = 1024 * 1024 * 1024, },
63 int __init board_get_partition_map(struct mtd_partition **p)
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);
78 -#if defined(CONFIG_DREAMBOX_DM800SE) || defined(CONFIG_DREAMBOX_DM500HD) || defined(CONFIG_DREAMBOX_DM7020HD)
79 +#ifdef CONFIG_DREAMBOX_1MBIT_CONSOLE
81 char *s = strstr(args, "115200n8");
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
91 +config DREAMBOX_1MBIT_CONSOLE
93 + default y if DREAMBOX_DM800SE || DREAMBOX_DM800SE_V2 || DREAMBOX_DM500HD || DREAMBOX_DM500HD_V2 || DREAMBOX_DM7020HD
94 + default n if DREAMBOX_DM8000 || DREAMBOX_DM800
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)
103 config DREAMBOX_FIRST_SUPPORTS_HW_ECC
105 @@ -23,13 +28,25 @@ config DREAMBOX_DM500HD
109 +config DREAMBOX_DM500HD_V2
111 + depends on BCM7405D0
112 + select DREAMBOX_FIRST_SUPPORTS_HW_ECC
113 + select BRCM_UPPER_MEMORY
115 config DREAMBOX_DM800
119 config DREAMBOX_DM800SE
120 - bool "DM 800 HD SE"
122 + depends on BCM7405D0
124 +config DREAMBOX_DM800SE_V2
127 + select DREAMBOX_FIRST_SUPPORTS_HW_ECC
128 + select BRCM_UPPER_MEMORY
130 config DREAMBOX_DM7020HD
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;
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