mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: linux-kernel@vger.kernel.org
Cc: uclinux-dist-devel@blackfin.uclinux.org
Subject: [PATCH 03/25] Blackfin: bf533-ezkit: add resources for FISP devices
Date: Sat, 20 Jun 2009 14:44:26 -0400	[thread overview]
Message-ID: <1245523488-26536-4-git-send-email-vapier@gentoo.org> (raw)
In-Reply-To: <1245523488-26536-1-git-send-email-vapier@gentoo.org>

The BF533-EZKIT has two Flash In-System Programming devices hooked up to
the async memory bus, so add resources for the primary flashes and the
SRAMs on the devices.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 arch/blackfin/mach-bf533/boards/ezkit.c |  106 +++++++++++++++++++++++++++++++
 1 files changed, 106 insertions(+), 0 deletions(-)

diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index 89a5ec4..4e3e511 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -32,6 +32,7 @@
 #include <linux/platform_device.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
+#include <linux/mtd/plat-ram.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/flash.h>
 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
@@ -86,6 +87,101 @@ static struct platform_device smc91x_device = {
 };
 #endif
 
+#if defined(CONFIG_MTD_PSD4256G) || defined(CONFIG_MTD_PSD4256G_MODULE)
+static const char *map_probes[] = {
+	"stm_flash",
+	NULL,
+};
+
+static struct platdata_mtd_ram stm_pri_data_a = {
+	.mapname    = "Flash A Primary",
+	.map_probes = map_probes,
+	.bankwidth  = 2,
+};
+
+static struct resource stm_pri_resource_a = {
+	.start = 0x20000000,
+	.end   = 0x200fffff,
+	.flags = IORESOURCE_MEM,
+};
+
+static struct platform_device stm_pri_device_a = {
+	.name          = "mtd-ram",
+	.id            = 0,
+	.dev = {
+		.platform_data = &stm_pri_data_a,
+	},
+	.num_resources = 1,
+	.resource      = &stm_pri_resource_a,
+};
+
+static struct platdata_mtd_ram stm_pri_data_b = {
+	.mapname    = "Flash B Primary",
+	.map_probes = map_probes,
+	.bankwidth  = 2,
+};
+
+static struct resource stm_pri_resource_b = {
+	.start = 0x20100000,
+	.end   = 0x201fffff,
+	.flags = IORESOURCE_MEM,
+};
+
+static struct platform_device stm_pri_device_b = {
+	.name          = "mtd-ram",
+	.id            = 4,
+	.dev = {
+		.platform_data = &stm_pri_data_b,
+	},
+	.num_resources = 1,
+	.resource      = &stm_pri_resource_b,
+};
+#endif
+
+#if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE)
+static struct platdata_mtd_ram sram_data_a = {
+	.mapname   = "Flash A SRAM",
+	.bankwidth = 2,
+};
+
+static struct resource sram_resource_a = {
+	.start = 0x20240000,
+	.end   = 0x2024ffff,
+	.flags = IORESOURCE_MEM,
+};
+
+static struct platform_device sram_device_a = {
+	.name          = "mtd-ram",
+	.id            = 8,
+	.dev = {
+		.platform_data = &sram_data_a,
+	},
+	.num_resources = 1,
+	.resource      = &sram_resource_a,
+};
+
+static struct platdata_mtd_ram sram_data_b = {
+	.mapname   = "Flash B SRAM",
+	.bankwidth = 2,
+};
+
+static struct resource sram_resource_b = {
+	.start = 0x202c0000,
+	.end   = 0x202cffff,
+	.flags = IORESOURCE_MEM,
+};
+
+static struct platform_device sram_device_b = {
+	.name          = "mtd-ram",
+	.id            = 9,
+	.dev = {
+		.platform_data = &sram_data_b,
+	},
+	.num_resources = 1,
+	.resource      = &sram_resource_b,
+};
+#endif
+
 #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
 static struct mtd_partition bfin_spi_flash_partitions[] = {
 	{
@@ -357,6 +453,16 @@ static struct platform_device *ezkit_devices[] __initdata = {
 
 	&bfin_dpmc,
 
+#if defined(CONFIG_MTD_PSD4256G) || defined(CONFIG_MTD_PSD4256G_MODULE)
+	&stm_pri_device_a,
+	&stm_pri_device_b,
+#endif
+
+#if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE)
+	&sram_device_a,
+	&sram_device_b,
+#endif
+
 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
 	&smc91x_device,
 #endif
-- 
1.6.3.1


  parent reply	other threads:[~2009-06-20 18:46 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-20 18:44 [PATCH 00/25] Blackfin arch updates for 2.6.31 (part 3) Mike Frysinger
2009-06-20 18:44 ` [PATCH 01/25] Blackfin: unify memory region checks between kgdb and traps Mike Frysinger
2009-06-20 18:44 ` [PATCH 02/25] Blackfin: bf518f-ezbrd: update DSA resources Mike Frysinger
2009-06-20 18:44 ` Mike Frysinger [this message]
2009-06-20 18:44 ` [PATCH 04/25] Blackfin: update anomaly lists Mike Frysinger
2009-06-20 18:44 ` [PATCH 05/25] Blackfin: redo handling of bad irqs Mike Frysinger
2009-06-20 18:44 ` [PATCH 06/25] Blackfin: only build show_interrupts() when procfs is enabled Mike Frysinger
2009-06-20 18:44 ` [PATCH 07/25] Blackfin: simplify irq stack overflow checking Mike Frysinger
2009-06-20 18:44 ` [PATCH 08/25] Blackfin: abstract irq14 lowering in do_irq Mike Frysinger
2009-06-20 18:44 ` [PATCH 09/25] Blackfin: fix accidental reset in some boot modes Mike Frysinger
2009-06-20 18:44 ` [PATCH 10/25] Blackfin: bf526-ezbrd: set SPI flash resources to SST device Mike Frysinger
2009-06-20 18:44 ` [PATCH 11/25] Blackfin: allow people to select BF51x-0.1 silicon rev Mike Frysinger
2009-06-20 18:44 ` [PATCH 12/25] Blackfin: convert interrupt pipeline to irqflags Mike Frysinger
2009-06-20 18:44 ` [PATCH 13/25] Blackfin: allow CONFIG_TICKSOURCE_GPTMR0 with interrupt pipeline Mike Frysinger
2009-06-20 18:44 ` [PATCH 14/25] Blackfin: remove obsolete mcount support from I-pipe code Mike Frysinger
2009-06-20 18:44 ` [PATCH 15/25] Blackfin: update I-pipe patch level Mike Frysinger
2009-06-20 18:44 ` [PATCH 16/25] Blackfin: decouple unrelated cache settings to get exact behavior Mike Frysinger
2009-06-20 18:44 ` [PATCH 17/25] Blackfin: update defconfigs Mike Frysinger
2009-06-20 18:44 ` [PATCH 18/25] Blackfin: stick the CPU name into boot image name Mike Frysinger
2009-06-20 18:44 ` [PATCH 19/25] Blackfin: unify memory map headers Mike Frysinger
2009-06-20 18:44 ` [PATCH 20/25] Blackfin: fix typo in TRAS define in mem_init.h header Mike Frysinger
2009-06-20 18:44 ` [PATCH 21/25] Blackfin: bf526-ezbrd: handle different SDRAM chips Mike Frysinger
2009-06-20 18:44 ` [PATCH 22/25] Blackfin: drop unused ISP1760 port1_disable from board resources Mike Frysinger
2009-06-20 18:44 ` [PATCH 23/25] Blackfin: fix GPTMR0_CLOCKSOURCE dependency on BFIN_GPTIMERS Mike Frysinger
2009-06-20 18:44 ` [PATCH 24/25] Blackfin: fix early crash when booting on wrong cpu Mike Frysinger
2009-06-20 18:44 ` [PATCH 25/25] Blackfin: drop BF535-specific text for exception 0x2A (unaligned instruction) Mike Frysinger

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=1245523488-26536-4-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=uclinux-dist-devel@blackfin.uclinux.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

all inboxes | Powered by JetHome®