Patchwork alix 2d2

login
register
about
Submitter Myles Watson
Date 2010-08-31 15:46:59
Message ID <AANLkTinYqGORaxw22i=i_k1RU=r-ZKk0L56+OGEEuKky@mail.gmail.com>
Download mbox | patch
Permalink /patch/1830/
State Superseded
Headers show

Comments

Myles Watson - 2010-08-31 15:46:59
On Sun, Aug 29, 2010 at 3:23 PM, Felix Salfelder
<salfelder@em.cs.uni-frankfurt.de> wrote:
> Hello.
>
> i adapted the alix 2d3 configuration to 2d2 i.e. removed one of the NICs
> in favor of a mini pci slot.
Since the change is so small, how about we just add a Kconfig option
to select the 2D2 variant of the board.

Signed-off-by: Myles Watson <mylesgw@gmail.com>

Thanks,
Myles

Patch

Index: svn/src/mainboard/pcengines/Kconfig
===================================================================
--- svn.orig/src/mainboard/pcengines/Kconfig
+++ svn/src/mainboard/pcengines/Kconfig
@@ -6,7 +6,7 @@  choice
 config BOARD_PCENGINES_ALIX1C
 	bool "ALIX.1C"
 config BOARD_PCENGINES_ALIX2D3
-	bool "ALIX.2D3"
+	bool "ALIX.2D3 or ALIX.2D2"
 
 endchoice
 
Index: svn/src/mainboard/pcengines/alix2d3/Kconfig
===================================================================
--- svn.orig/src/mainboard/pcengines/alix2d3/Kconfig
+++ svn/src/mainboard/pcengines/alix2d3/Kconfig
@@ -16,10 +16,20 @@  config MAINBOARD_DIR
 	string
 	default pcengines/alix2d3
 
+config VARIANT_ALIX_2D2
+	bool "ALIX.2D2"
+	default n
+
 config MAINBOARD_PART_NUMBER
 	string
+	depends on !VARIANT_ALIX_2D2
 	default "ALIX.2D3"
 
+config MAINBOARD_PART_NUMBER
+	string
+	depends on VARIANT_ALIX_2D2
+	default "ALIX.2D2"
+
 config IRQ_SLOT_COUNT
 	int
 	default 6
Index: svn/src/mainboard/pcengines/alix2d3/irq_tables.c
===================================================================
--- svn.orig/src/mainboard/pcengines/alix2d3/irq_tables.c
+++ svn/src/mainboard/pcengines/alix2d3/irq_tables.c
@@ -94,8 +94,10 @@  const struct irq_routing_table intel_irq
 		/* On-board ethernet (Left) */
 		{0x00, (0x09 << 3) | 0x0, {{L_PIRQB, M_PIRQB}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}}, 0x0, 0x0},
 
+#if !VARIANT_ALIX_2D2
 		/* On-board ethernet (Middle) */
 		{0x00, (0x0A << 3) | 0x0, {{L_PIRQC, M_PIRQC}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}}, 0x0, 0x0},
+#endif
 
 		/* On-board ethernet (Right) */
 		{0x00, (0x0B << 3) | 0x0, {{L_PIRQD, M_PIRQD}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}}, 0x0, 0x0},
@@ -103,6 +105,11 @@  const struct irq_routing_table intel_irq
 		/* Mini PCI (slot 1) */
 		{0x00, (0x0C << 3) | 0x0, {{L_PIRQA, M_PIRQA}, {L_PIRQB, M_PIRQB}, {0x00, 0x00}, {0x00, 0x00}}, 0x0, 0x0},
 
+#if VARIANT_ALIX_2D2
+		/* Mini PCI (slot 2) */
+		{0x00, (0x0E << 3) | 0x0, {{L_PIRQC, M_PIRQC}, {L_PIRQD, M_PIRQD}, {0x00, 0x00}, {0x00, 0x00}}, 0x0, 0x0},
+#endif
+
 		/* Chipset slots -- f.3 wires to B, and f.4 and f.5 wires to D. */
 		{0x00, (0x0F << 3) | 0x0, {{L_PIRQA, M_PIRQA}, {L_PIRQB, M_PIRQB}, {L_PIRQC, M_PIRQC}, {L_PIRQD, M_PIRQD}}, 0x0, 0x0},
 	}
Index: svn/src/mainboard/pcengines/alix2d3/mainboard.c
===================================================================
--- svn.orig/src/mainboard/pcengines/alix2d3/mainboard.c
+++ svn/src/mainboard/pcengines/alix2d3/mainboard.c
@@ -23,8 +23,8 @@ 
 
 static void init(struct device *dev)
 {
-	printk(BIOS_DEBUG, "ALIX.2D3 ENTER %s\n", __func__);
-	printk(BIOS_DEBUG, "ALIX.2D3 EXIT %s\n", __func__);
+	printk(BIOS_DEBUG, "ALIX ENTER %s\n", __func__);
+	printk(BIOS_DEBUG, "ALIX EXIT %s\n", __func__);
 }
 
 static void enable_dev(struct device *dev)
@@ -33,7 +33,7 @@  static void enable_dev(struct device *de
 }
 
 struct chip_operations mainboard_ops = {
-	CHIP_NAME("PC Engines ALIX.2D3 Mainboard")
+	CHIP_NAME("PC Engines ALIX.2D2 or 2D3 Mainboard")
 	.enable_dev = enable_dev,
 };