Skip to contentSkip to conversation

MIPS: Alchemy: various build fixes

PATCH Applied Manuel Lauss 2 participants 5 messages Feb 26, 2010 MIPS

lore
Share & tools
lore
#0 lore raw

cover MIPS: Alchemy: various build fixes

The following two patches fix build issues found by Ralf.

I also have a massive third patch (300kb) which updates the devboard defconfigs to get rid of other build failures (by switching to the new pcmcia socket driver). I'm pretty sure I'll be eaten by the lmo mailer, so how should I proceed?

Manuel Lauss (2):
MIPS: Alchemy: Repair db1500/bosporus builds
MIPS: Alchemy: fix Au1100 ethernet build failure

 arch/mips/alchemy/common/platform.c              |   19 ++++----
 arch/mips/alchemy/devboards/db1x00/board_setup.c |   52 ++++++++++++----------
 2 files changed, 38 insertions(+), 33 deletions(-)
#1 lore raw

PATCH 1/2 MIPS: Alchemy: Repair db1500/bosporus builds

A few hunks somehow ended up outside their #ifdef/endif blocks, leading to -Werror-induces build failures.

---
 arch/mips/alchemy/devboards/db1x00/board_setup.c |   52 ++++++++++++----------
 1 files changed, 28 insertions(+), 24 deletions(-)
arch/mips/alchemy/devboards/db1x00/board_setup.c +28 -24
index 559d9b2..50c9bef 100644
@@ -46,19 +46,25 @@ char irq_tab_alchemy[][5] __initdata = {
 	[13] = { -1, AU1500_PCI_INTA, AU1500_PCI_INTB, AU1500_PCI_INTC, AU1500_PCI_INTD }, /* IDSEL 13 - PCI slot */
 };
 
-static void bosporus_power_off(void)
-{
-	printk(KERN_INFO "It's now safe to turn off power\n");
-	while (1)
-		asm volatile (".set mips3 ; wait ; .set mips0");
-}
+#endif
 
-const char *get_system_type(void)
-{
-	return "Alchemy Bosporus Gateway Reference";
-}
+
+#ifdef CONFIG_MIPS_DB1550
+char irq_tab_alchemy[][5] __initdata = {
+	[11] = { -1, AU1550_PCI_INTC, 0xff, 0xff, 0xff }, /* IDSEL 11 - on-board HPT371 */
+	[12] = { -1, AU1550_PCI_INTB, AU1550_PCI_INTC, AU1550_PCI_INTD, AU1550_PCI_INTA }, /* IDSEL 12 - PCI slot 2 (left) */
+	[13] = { -1, AU1550_PCI_INTA, AU1550_PCI_INTB, AU1550_PCI_INTC, AU1550_PCI_INTD }, /* IDSEL 13 - PCI slot 1 (right) */
+};
 #endif
 
+
+#ifdef CONFIG_MIPS_BOSPORUS
+char irq_tab_alchemy[][5] __initdata = {
+	[11] = { -1, AU1500_PCI_INTA, AU1500_PCI_INTB, 0xff, 0xff }, /* IDSEL 11 - miniPCI  */
+	[12] = { -1, AU1500_PCI_INTA, 0xff, 0xff, 0xff }, /* IDSEL 12 - SN1741   */
+	[13] = { -1, AU1500_PCI_INTA, AU1500_PCI_INTB, AU1500_PCI_INTC, AU1500_PCI_INTD }, /* IDSEL 13 - PCI slot */
+};
+
 /*
  * Micrel/Kendin 5 port switch attached to MAC0,
  * MAC0 is associated with PHY address 5 (== WAN port)
@@ -71,16 +77,20 @@ static struct au1000_eth_platform_data eth0_pdata = {
 	.phy_addr		= 5,
 };
 
-#ifdef CONFIG_MIPS_BOSPORUS
-char irq_tab_alchemy[][5] __initdata = {
-	[11] = { -1, AU1500_PCI_INTA, AU1500_PCI_INTB, 0xff, 0xff }, /* IDSEL 11 - miniPCI  */
-	[12] = { -1, AU1500_PCI_INTA, 0xff, 0xff, 0xff }, /* IDSEL 12 - SN1741   */
-	[13] = { -1, AU1500_PCI_INTA, AU1500_PCI_INTB, AU1500_PCI_INTC, AU1500_PCI_INTD }, /* IDSEL 13 - PCI slot */
-};
-
+static void bosporus_power_off(void)
+{
+	printk(KERN_INFO "It's now safe to turn off power\n");
+	while (1)
+		asm volatile (".set mips3 ; wait ; .set mips0");
+}
 
+const char *get_system_type(void)
+{
+	return "Alchemy Bosporus Gateway Reference";
+}
 #endif
 
+
 #ifdef CONFIG_MIPS_MIRAGE
 char irq_tab_alchemy[][5] __initdata = {
 	[11] = { -1, AU1500_PCI_INTD, 0xff, 0xff, 0xff }, /* IDSEL 11 - SMI VGX */
@@ -99,13 +109,6 @@ const char *get_system_type(void)
 }
 #endif
 
-#ifdef CONFIG_MIPS_DB1550
-char irq_tab_alchemy[][5] __initdata = {
-	[11] = { -1, AU1550_PCI_INTC, 0xff, 0xff, 0xff }, /* IDSEL 11 - on-board HPT371 */
-	[12] = { -1, AU1550_PCI_INTB, AU1550_PCI_INTC, AU1550_PCI_INTD, AU1550_PCI_INTA }, /* IDSEL 12 - PCI slot 2 (left) */
-	[13] = { -1, AU1550_PCI_INTA, AU1550_PCI_INTB, AU1550_PCI_INTC, AU1550_PCI_INTD }, /* IDSEL 13 - PCI slot 1 (right) */
-};
-#endif
 
 #if defined(CONFIG_MIPS_BOSPORUS) || defined(CONFIG_MIPS_MIRAGE)
 static void mips_softreset(void)
@@ -121,6 +124,7 @@ const char *get_system_type(void)
 }
 #endif
 
+
 void __init board_setup(void)
 {
 	unsigned long bcsr1, bcsr2;
Signature · 1 line
1.7.0
Applied
#2 lore raw

Re: [PATCH 1/2] MIPS: Alchemy: Repair db1500/bosporus builds

Thanks, applied.

Ralf

#3 lore raw

PATCH 2/2 MIPS: Alchemy: fix Au1100 ethernet build failure

In reply to Manuel Lauss

don't define platform info for second mac on au1100 (which only has a single mac).

---
 arch/mips/alchemy/common/platform.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)
arch/mips/alchemy/common/platform.c +10 -9
index 3fbe30c..2580e77 100644
@@ -357,15 +357,6 @@ static struct resource au1xxx_eth0_resources[] = {
 #endif
 };
 
-static struct resource au1xxx_eth1_resources[] = {
-#if defined(CONFIG_SOC_AU1000)
-	MAC_RES(AU1000_ETH1_BASE, AU1000_MAC1_ENABLE, AU1000_MAC1_DMA_INT),
-#elif defined(CONFIG_SOC_AU1550)
-	MAC_RES(AU1550_ETH1_BASE, AU1550_MAC1_ENABLE, AU1550_MAC1_DMA_INT),
-#elif defined(CONFIG_SOC_AU1500)
-	MAC_RES(AU1500_ETH1_BASE, AU1500_MAC1_ENABLE, AU1500_MAC1_DMA_INT),
-#endif
-};
 
 static struct au1000_eth_platform_data au1xxx_eth0_platform_data = {
 	.phy1_search_mac0 = 1,
@@ -380,6 +371,16 @@ static struct platform_device au1xxx_eth0_device = {
 };
 
 #ifndef CONFIG_SOC_AU1100
+static struct resource au1xxx_eth1_resources[] = {
+#if defined(CONFIG_SOC_AU1000)
+	MAC_RES(AU1000_ETH1_BASE, AU1000_MAC1_ENABLE, AU1000_MAC1_DMA_INT),
+#elif defined(CONFIG_SOC_AU1550)
+	MAC_RES(AU1550_ETH1_BASE, AU1550_MAC1_ENABLE, AU1550_MAC1_DMA_INT),
+#elif defined(CONFIG_SOC_AU1500)
+	MAC_RES(AU1500_ETH1_BASE, AU1500_MAC1_ENABLE, AU1500_MAC1_DMA_INT),
+#endif
+};
+
 static struct au1000_eth_platform_data au1xxx_eth1_platform_data = {
 	.phy1_search_mac0 = 1,
 };
Signature · 1 line
1.7.0
Applied
#4 lore raw

Re: [PATCH 2/2] MIPS: Alchemy: fix Au1100 ethernet build failure

Thanks, applied as well.

Ralf