public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bryan Wu <bryan.wu@analog.com>
To: torvalds@linux-foundation.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org
Cc: Mike Frysinger <michael.frysinger@analog.com>,
	Bryan Wu <bryan.wu@analog.com>
Subject: [PATCH 17/32] Blackfin arch: move board specific setup out of common init code and into the board specific init code
Date: Mon, 21 May 2007 18:09:25 +0800	[thread overview]
Message-ID: <11797421851258-git-send-email-bryan.wu@analog.com> (raw)
In-Reply-To: <1179742180228-git-send-email-bryan.wu@analog.com>

From: Mike Frysinger <michael.frysinger@analog.com>

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
---
 arch/blackfin/kernel/setup.c            |   20 ++------------------
 arch/blackfin/mach-bf533/boards/stamp.c |   19 ++++++++++++++++---
 arch/blackfin/mach-bf561/boards/ezkit.c |   15 ++++++++++-----
 3 files changed, 28 insertions(+), 26 deletions(-)

diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index c456ee5..b6ac6f8 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -383,35 +383,19 @@ void __init setup_arch(char **cmdline_p)
 
 	bf53x_cache_init();
 
-#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
-# if defined(CONFIG_BFIN_SHARED_FLASH_ENET) && defined(CONFIG_BFIN533_STAMP)
-	/* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */
-	bfin_write_FIO_DIR(bfin_read_FIO_DIR() | (1 << CONFIG_ENET_FLASH_PIN));
-	bfin_write_FIO_FLAG_S(1 << CONFIG_ENET_FLASH_PIN);
-	SSYNC();
-# endif
-# if defined (CONFIG_BFIN561_EZKIT)
-	bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 12));
-	SSYNC();
-# endif /* defined (CONFIG_BFIN561_EZKIT) */
-#endif
-
 	printk(KERN_INFO "Hardware Trace Enabled\n");
 	bfin_write_TBUFCTL(0x03);
 }
 
-#if defined(CONFIG_BF561)
-static struct cpu cpu[2];
-#else
-static struct cpu cpu[1];
-#endif
 static int __init topology_init(void)
 {
 #if defined (CONFIG_BF561)
+	static struct cpu cpu[2];
 	register_cpu(&cpu[0], 0);
 	register_cpu(&cpu[1], 1);
 	return 0;
 #else
+	static struct cpu cpu[1];
 	return register_cpu(cpu, 0);
 #endif
 }
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index 7d3dfcb..9a472fe 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -338,12 +338,25 @@ static struct platform_device *stamp_devices[] __initdata = {
 
 static int __init stamp_init(void)
 {
+	int ret;
+
 	printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
-	platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
+	ret = platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
+	if (ret < 0)
+		return ret;
+
+#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
+# if defined(CONFIG_BFIN_SHARED_FLASH_ENET)
+	/* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */
+	bfin_write_FIO_DIR(bfin_read_FIO_DIR() | (1 << CONFIG_ENET_FLASH_PIN));
+	bfin_write_FIO_FLAG_S(1 << CONFIG_ENET_FLASH_PIN);
+	SSYNC();
+# endif
+#endif
+
 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
-	spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
+	return spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
 #endif
-	return 0;
 }
 
 arch_initcall(stamp_init);
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index e8d4058..9720b5c 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -184,13 +184,18 @@ static int __init ezkit_init(void)
 {
 	int ret;
 
-	printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
-	ret = platform_add_devices(ezkit_devices,
-		 ARRAY_SIZE(ezkit_devices));
+	printk(KERN_INFO "%s(): registering device resources\n", __func__);
+
+	ret = platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
 	if (ret < 0)
 		return ret;
-	return spi_register_board_info(bfin_spi_board_info,
-				ARRAY_SIZE(bfin_spi_board_info));
+
+#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
+	bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 12));
+	SSYNC();
+#endif
+
+	return spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
 }
 
 arch_initcall(ezkit_init);
-- 
1.5.1.2

  parent reply	other threads:[~2007-05-21 10:11 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-21 10:09 [PATCH 00/32] Blackfin update for 2.6.22-rc2 Bryan Wu
2007-05-21 10:09 ` [PATCH 01/32] Blackfin arch: Add Workaround for ANOMALY 05000257 Bryan Wu
2007-05-21 10:09 ` [PATCH 02/32] Blackfin arch: add SPI MMC driver support on bf533-stamp, tested on STAMP-BF533 Bryan Wu
2007-05-21 10:09 ` [PATCH 03/32] Blackfin arch: ISP1761 doesn't work for USB flash disk Bryan Wu
2007-05-21 10:09 ` [PATCH 04/32] Blackfin arch: fix a few random warnings Bryan Wu
2007-05-21 10:09 ` [PATCH 05/32] Blackfin arch: Add configuration data for ISP176x on BF561 Bryan Wu
2007-05-21 10:09 ` [PATCH 06/32] Blackfin arch: mark a bunch of local functions as static Bryan Wu
2007-05-21 10:09 ` [PATCH 07/32] Blackfin arch: Fix reserved map after we changed PORT_H definition Bryan Wu
2007-05-21 10:09 ` [PATCH 08/32] Blackfin arch: Move write to VR_CTL closer to IDLE Bryan Wu
2007-05-21 10:09 ` [PATCH 09/32] Blackfin arch: DMA operation cleanup Bryan Wu
2007-05-21 10:09 ` [PATCH 10/32] Blackfin arch: GPIO fix some defines Bryan Wu
2007-05-21 10:09 ` [PATCH 11/32] Blackfin arch: fix trace output for FLAT binaries Bryan Wu
2007-05-21 10:09 ` [PATCH 12/32] Blackfin arch: Fix bug using usb keyboard crashes kernel Bryan Wu
2007-05-21 11:39   ` Pekka Enberg
2007-05-21 10:09 ` [PATCH 13/32] Blackfin arch: initial tepla-bf561 board support Bryan Wu
2007-05-21 10:09 ` [PATCH 14/32] Blackfin arch: make sure we declare the revid functions as pure (since they are) Bryan Wu
2007-05-21 10:09 ` [PATCH 15/32] Blackfin arch: dont clear status register bits in SWRST so we can actually use it Bryan Wu
2007-05-21 10:09 ` [PATCH 16/32] Blackfin arch: finish removing p* volatile defines for MMRs Bryan Wu
2007-05-21 10:09 ` Bryan Wu [this message]
2007-05-21 10:09 ` [PATCH 18/32] Blackfin arch: issue reset via SWRST so we dont clobber the watchdog state Bryan Wu
2007-05-21 10:09 ` [PATCH 19/32] Blackfin arch: document why we have to touch the UART peripheral in our boot up code Bryan Wu
2007-05-21 10:09 ` [PATCH 20/32] Blackfin arch: dma_memcpy borken for > 64K Bryan Wu
2007-05-21 11:26   ` Pekka Enberg
2007-05-21 17:49     ` Mike Frysinger
2007-05-21 10:09 ` [PATCH 21/32] Blackfin arch: dont clear the bit that tells coreb to start booting Bryan Wu
2007-05-21 10:09 ` [PATCH 22/32] Blackfin arch: make sure we use local labels Bryan Wu
2007-05-21 10:09 ` [PATCH 24/32] Blackfin arch: cache SWRST value at bootup so other things like watchdog can non-destructively query it Bryan Wu
2007-05-21 10:09 ` [PATCH 25/32] Blackfin arch: fix signal handling bug Bryan Wu
2007-05-21 10:09 ` [PATCH 26/32] Blackfin arch: Change NO_ACCESS_CHECK to ACCESS_CHECK Bryan Wu
2007-05-21 10:09 ` [PATCH 27/32] Blackfin arch: add board default configs to blackfin arch Bryan Wu
2007-05-21 10:09 ` [PATCH 28/32] Blackfin arch: update defconfig files Bryan Wu
2007-05-21 10:09 ` [PATCH 29/32] Blackfin arch: update pm.c according to power management API change Bryan Wu
2007-05-21 10:09 ` [PATCH 30/32] Blackfin serial driver: fix overhead issue Bryan Wu
2007-05-21 10:09 ` [PATCH 31/32] Blackfin serial driver: implement support for ignoring parity/break errors Bryan Wu
2007-05-21 10:09 ` Bryan Wu
2007-05-21 14:35 ` [PATCH 00/32] Blackfin update for 2.6.22-rc2 Robin Getz
2007-05-21 14:37   ` Paul Mundt
2007-05-23  0:28     ` Mike Frysinger
2007-05-23  1:06       ` Paul Mundt
2007-05-21 17:36   ` Mike Frysinger
2007-05-21 21:52     ` Robin Getz
2007-05-21 22:01       ` Mike Frysinger
2007-05-22  8:37       ` Bryan Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11797421851258-git-send-email-bryan.wu@analog.com \
    --to=bryan.wu@analog.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.frysinger@analog.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox