From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 05/12] at91: add sram memory devices
Date: Sat, 31 Dec 2011 16:21:31 +0100 [thread overview]
Message-ID: <1325344898-7076-5-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <20111231151655.GB945@game.jcrosoft.org>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
arch/arm/mach-at91/at91rm9200_devices.c | 2 ++
arch/arm/mach-at91/at91sam9260_devices.c | 12 ++++++++++++
arch/arm/mach-at91/at91sam9261_devices.c | 7 +++++++
arch/arm/mach-at91/at91sam9263_devices.c | 4 ++++
arch/arm/mach-at91/at91sam9g45_devices.c | 2 ++
arch/arm/mach-at91/include/mach/at91sam9260.h | 10 ++++++++++
arch/arm/mach-at91/include/mach/at91sam9261.h | 3 +++
7 files changed, 40 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index 8c19846..7032789 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -23,6 +23,8 @@
void at91_add_device_sdram(u32 size)
{
arm_add_mem_device("ram0", AT91_CHIPSELECT_1, size);
+ add_mem_device("sram0", AT91RM9200_SRAM_BASE, AT91RM9200_SRAM_SIZE,
+ IORESOURCE_MEM_WRITEABLE);
}
/* --------------------------------------------------------------------
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 945530f..25a68ca 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -18,12 +18,24 @@
#include <mach/at91sam9260_matrix.h>
#include <mach/gpio.h>
#include <mach/io.h>
+#include <mach/cpu.h>
#include "generic.h"
void at91_add_device_sdram(u32 size)
{
arm_add_mem_device("ram0", AT91_CHIPSELECT_1, size);
+ if (cpu_is_at91sam9g20()) {
+ add_mem_device("sram0", AT91SAM9G20_SRAM0_BASE,
+ AT91SAM9G20_SRAM0_SIZE, IORESOURCE_MEM_WRITEABLE);
+ add_mem_device("sram1", AT91SAM9G20_SRAM1_BASE,
+ AT91SAM9G20_SRAM1_SIZE, IORESOURCE_MEM_WRITEABLE);
+ } else {
+ add_mem_device("sram0", AT91SAM9260_SRAM0_BASE,
+ AT91SAM9260_SRAM0_SIZE, IORESOURCE_MEM_WRITEABLE);
+ add_mem_device("sram1", AT91SAM9260_SRAM1_BASE,
+ AT91SAM9260_SRAM1_SIZE, IORESOURCE_MEM_WRITEABLE);
+ }
}
#if defined(CONFIG_USB_OHCI)
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index 4fd3c79..ff7a938 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -18,12 +18,19 @@
#include <mach/board.h>
#include <mach/gpio.h>
#include <mach/io.h>
+#include <mach/cpu.h>
#include "generic.h"
void at91_add_device_sdram(u32 size)
{
arm_add_mem_device("ram0", AT91_CHIPSELECT_1, size);
+ if (cpu_is_at91sam9g10())
+ add_mem_device("sram0", AT91SAM9G10_SRAM_BASE,
+ AT91SAM9G10_SRAM_SIZE, IORESOURCE_MEM_WRITEABLE);
+ else
+ add_mem_device("sram0", AT91SAM9261_SRAM_BASE,
+ AT91SAM9261_SRAM_SIZE, IORESOURCE_MEM_WRITEABLE);
}
/* --------------------------------------------------------------------
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index bbadc5d..d447e24 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -24,6 +24,10 @@
void at91_add_device_sdram(u32 size)
{
arm_add_mem_device("ram0", AT91_CHIPSELECT_1, size);
+ add_mem_device("sram0", AT91SAM9263_SRAM0_BASE,
+ AT91SAM9263_SRAM0_SIZE, IORESOURCE_MEM_WRITEABLE);
+ add_mem_device("sram1", AT91SAM9263_SRAM1_BASE,
+ AT91SAM9263_SRAM1_SIZE, IORESOURCE_MEM_WRITEABLE);
}
/* --------------------------------------------------------------------
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 1d47dcf..5f1a45a 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -24,6 +24,8 @@
void at91_add_device_sdram(u32 size)
{
arm_add_mem_device("ram0", AT91_CHIPSELECT_6, size);
+ add_mem_device("sram0", AT91SAM9G45_SRAM_BASE,
+ AT91SAM9G45_SRAM_SIZE, IORESOURCE_MEM_WRITEABLE);
}
/* --------------------------------------------------------------------
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260.h b/arch/arm/mach-at91/include/mach/at91sam9260.h
index 7d166b7..771e756 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9260.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9260.h
@@ -126,6 +126,16 @@
#define AT91SAM9XE_FLASH_BASE 0x00200000 /* Internal FLASH base address */
#define AT91SAM9XE_SRAM_BASE 0x00300000 /* Internal SRAM base address */
+#define AT91SAM9G20_ROM_BASE 0x00100000 /* Internal ROM base address */
+#define AT91SAM9G20_ROM_SIZE SZ_32K /* Internal ROM size (32Kb) */
+
+#define AT91SAM9G20_SRAM0_BASE 0x00200000 /* Internal SRAM 0 base address */
+#define AT91SAM9G20_SRAM0_SIZE SZ_16K /* Internal SRAM 0 size (16Kb) */
+#define AT91SAM9G20_SRAM1_BASE 0x00300000 /* Internal SRAM 1 base address */
+#define AT91SAM9G20_SRAM1_SIZE SZ_16K /* Internal SRAM 1 size (16Kb) */
+
+#define AT91SAM9G20_UHP_BASE 0x00500000 /* USB Host controller */
+
/*
* Cpu Name
*/
diff --git a/arch/arm/mach-at91/include/mach/at91sam9261.h b/arch/arm/mach-at91/include/mach/at91sam9261.h
index b303e07..c863887 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9261.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9261.h
@@ -95,6 +95,9 @@
#define AT91SAM9261_SRAM_BASE 0x00300000 /* Internal SRAM base address */
#define AT91SAM9261_SRAM_SIZE 0x00028000 /* Internal SRAM size (160Kb) */
+#define AT91SAM9G10_SRAM_BASE AT91SAM9261_SRAM_BASE /* Internal SRAM base address */
+#define AT91SAM9G10_SRAM_SIZE 0x00004000 /* Internal SRAM size (16Kb) */
+
#define AT91SAM9261_ROM_BASE 0x00400000 /* Internal ROM base address */
#define AT91SAM9261_ROM_SIZE SZ_32K /* Internal ROM size (32Kb) */
--
1.7.7
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-12-31 15:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-31 15:16 AT91: Pull Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 01/12] atmel: reference boards and Caloa boards bbt option enabled Jean-Christophe PLAGNIOL-VILLARD
2012-01-03 9:37 ` Sascha Hauer
2012-01-03 10:33 ` Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 02/12] ARM: import memcpy_from/toio and memset_io from linux Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 03/12] mtd: atmel_nand: optimize read/write buffer functions Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 04/12] atmel_nand: drop dead code Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-01-04 13:42 ` [PATCH 05/12] at91: add sram memory devices Sascha Hauer
2011-12-31 15:21 ` [PATCH 06/12] at91sam9263ek: add nor partition Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 07/12] at91sam9x: switch lowlevel init to c Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 08/12] at91/gpio: simplify resources Jean-Christophe PLAGNIOL-VILLARD
2012-01-04 13:40 ` Sascha Hauer
2012-01-04 18:01 ` Jean-Christophe PLAGNIOL-VILLARD
2012-01-04 18:05 ` Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 09/12] usb-a926x: add led support Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 10/12] usb-a926x: add dfu support Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 11/12] at91_udc: update vbus param only if updated Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 12/12] usb-a926x: update defconfig Jean-Christophe PLAGNIOL-VILLARD
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=1325344898-7076-5-git-send-email-plagnioj@jcrosoft.com \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.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