mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/3] qemu-malta nor flash support
@ 2012-04-30 11:57 Jean-Christophe PLAGNIOL-VILLARD
  2012-04-30 12:00 ` [PATCH 1/3] mips: add in_be16/32 and out_be16/32 for cfi support Jean-Christophe PLAGNIOL-VILLARD
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-04-30 11:57 UTC (permalink / raw)
  To: barebox

Hi,

	The following patch serie add CFI flash support

The following changes since commit 6b489256ee1358973d536e723c77c2483e6b9f5b:

  Makefile: add barebox.srec to 'clean' (2012-04-30 14:01:34 +0200)

are available in the git repository at:

  git://git.jcrosoft.org/barebox.git tags/malta-cfi-flash

for you to fetch changes up to 37a97ca3fce6a92e25e7855359270f83548793bd:

  qemu-malta: add nor flash support (2012-04-30 20:16:28 +0800)

----------------------------------------------------------------
Mips: malta add cfi flash support

----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (3):
      mips: add in_be16/32 and out_be16/32 for cfi support
      qemu-malta: rename serial.c to init.c
      qemu-malta: add nor flash support

 arch/mips/boards/qemu-malta/Makefile             |    2 +-
 arch/mips/boards/qemu-malta/{serial.c => init.c} |   14 ++++++++++++++
 arch/mips/configs/qemu-malta_defconfig           |    5 +++++
 arch/mips/include/asm/io.h                       |    5 +++++
 4 files changed, 25 insertions(+), 1 deletions(-)
 rename arch/mips/boards/qemu-malta/{serial.c => init.c} (76%)

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] mips: add in_be16/32 and out_be16/32 for cfi support
  2012-04-30 11:57 [PATCH 0/3] qemu-malta nor flash support Jean-Christophe PLAGNIOL-VILLARD
@ 2012-04-30 12:00 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-04-30 12:00 ` [PATCH 2/3] qemu-malta: rename serial.c to init.c Jean-Christophe PLAGNIOL-VILLARD
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-04-30 12:00 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/mips/include/asm/io.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
index 5e12860..4100e1e 100644
--- a/arch/mips/include/asm/io.h
+++ b/arch/mips/include/asm/io.h
@@ -71,4 +71,9 @@ static inline void __raw_writel(u32 b, volatile void __iomem *addr)
 #define writew(b,addr) __raw_writew(__cpu_to_le16(b),addr)
 #define writel(b,addr) __raw_writel(__cpu_to_le32(b),addr)
 
+#define in_be16(a)	__be16_to_cpu(__raw_readw(a))
+#define in_be32(a)	__be32_to_cpu(__raw_readl(a))
+#define out_be16(a, v)	__raw_writew(__cpu_to_be16(v), a)
+#define out_be32(a, v)	__raw_writel(__cpu_to_be32(v), a)
+
 #endif	/* __ASM_MIPS_IO_H */
-- 
1.7.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/3] qemu-malta: rename serial.c to init.c
  2012-04-30 11:57 [PATCH 0/3] qemu-malta nor flash support Jean-Christophe PLAGNIOL-VILLARD
  2012-04-30 12:00 ` [PATCH 1/3] mips: add in_be16/32 and out_be16/32 for cfi support Jean-Christophe PLAGNIOL-VILLARD
@ 2012-04-30 12:00 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-04-30 12:00 ` [PATCH 3/3] qemu-malta: add nor flash support Jean-Christophe PLAGNIOL-VILLARD
  2012-05-01 19:41 ` [PATCH 0/3] qemu-malta " Sascha Hauer
  3 siblings, 0 replies; 5+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-04-30 12:00 UTC (permalink / raw)
  To: barebox

as the garbage collector will remove the empty function and the
add_ns16550_device is a empty inline if the driver is not enabled.

This will simplify add device adding.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/mips/boards/qemu-malta/Makefile             |    2 +-
 arch/mips/boards/qemu-malta/{serial.c => init.c} |    0
 2 files changed, 1 insertions(+), 1 deletions(-)
 rename arch/mips/boards/qemu-malta/{serial.c => init.c} (100%)

diff --git a/arch/mips/boards/qemu-malta/Makefile b/arch/mips/boards/qemu-malta/Makefile
index ff1a655..eb072c0 100644
--- a/arch/mips/boards/qemu-malta/Makefile
+++ b/arch/mips/boards/qemu-malta/Makefile
@@ -1 +1 @@
-obj-$(CONFIG_DRIVER_SERIAL_NS16550) += serial.o
+obj-y += init.o
diff --git a/arch/mips/boards/qemu-malta/serial.c b/arch/mips/boards/qemu-malta/init.c
similarity index 100%
rename from arch/mips/boards/qemu-malta/serial.c
rename to arch/mips/boards/qemu-malta/init.c
-- 
1.7.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 3/3] qemu-malta: add nor flash support
  2012-04-30 11:57 [PATCH 0/3] qemu-malta nor flash support Jean-Christophe PLAGNIOL-VILLARD
  2012-04-30 12:00 ` [PATCH 1/3] mips: add in_be16/32 and out_be16/32 for cfi support Jean-Christophe PLAGNIOL-VILLARD
  2012-04-30 12:00 ` [PATCH 2/3] qemu-malta: rename serial.c to init.c Jean-Christophe PLAGNIOL-VILLARD
@ 2012-04-30 12:00 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-05-01 19:41 ` [PATCH 0/3] qemu-malta " Sascha Hauer
  3 siblings, 0 replies; 5+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-04-30 12:00 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/mips/boards/qemu-malta/init.c     |   13 +++++++++++++
 arch/mips/configs/qemu-malta_defconfig |    5 +++++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/arch/mips/boards/qemu-malta/init.c b/arch/mips/boards/qemu-malta/init.c
index 502b346..4709989 100644
--- a/arch/mips/boards/qemu-malta/init.c
+++ b/arch/mips/boards/qemu-malta/init.c
@@ -25,8 +25,21 @@
 #include <ns16550.h>
 #include <mach/hardware.h>
 #include <io.h>
+#include <partition.h>
+#include <sizes.h>
 #include <asm/common.h>
 
+static int malta_devices_init(void)
+{
+	add_cfi_flash_device(0, 0x1e000000, SZ_4M, 0);
+
+	devfs_add_partition("nor0", 0x0, SZ_512K, PARTITION_FIXED, "self");
+	devfs_add_partition("nor0", SZ_512K, SZ_64K, PARTITION_FIXED, "env0");
+
+	return 0;
+}
+device_initcall(malta_devices_init);
+
 static struct NS16550_plat serial_plat = {
 	.clock = 1843200, /* no matter for emulated port */
 	.shift = 0,
diff --git a/arch/mips/configs/qemu-malta_defconfig b/arch/mips/configs/qemu-malta_defconfig
index eac21e7..50e0dc4 100644
--- a/arch/mips/configs/qemu-malta_defconfig
+++ b/arch/mips/configs/qemu-malta_defconfig
@@ -50,6 +50,11 @@ CONFIG_NET_TFTP_PUSH=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 # CONFIG_SPI is not set
+CONFIG_DRIVER_CFI=y
+# CONFIG_DRIVER_CFI_AMD is not set
+# CONFIG_DRIVER_CFI_BANK_WIDTH_1 is not set
+# CONFIG_DRIVER_CFI_BANK_WIDTH_2 is not set
+CONFIG_CFI_BUFFER_WRITE=y
 CONFIG_MTD=y
 CONFIG_FS_CRAMFS=y
 CONFIG_FS_FAT=y
-- 
1.7.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] qemu-malta nor flash support
  2012-04-30 11:57 [PATCH 0/3] qemu-malta nor flash support Jean-Christophe PLAGNIOL-VILLARD
                   ` (2 preceding siblings ...)
  2012-04-30 12:00 ` [PATCH 3/3] qemu-malta: add nor flash support Jean-Christophe PLAGNIOL-VILLARD
@ 2012-05-01 19:41 ` Sascha Hauer
  3 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2012-05-01 19:41 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

On Mon, Apr 30, 2012 at 01:57:03PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Hi,
> 
> 	The following patch serie add CFI flash support
> 
> The following changes since commit 6b489256ee1358973d536e723c77c2483e6b9f5b:
> 
>   Makefile: add barebox.srec to 'clean' (2012-04-30 14:01:34 +0200)
> 
> are available in the git repository at:
> 
>   git://git.jcrosoft.org/barebox.git tags/malta-cfi-flash
> 
> for you to fetch changes up to 37a97ca3fce6a92e25e7855359270f83548793bd:

Pulled, thanks.

Sascha

> 
>   qemu-malta: add nor flash support (2012-04-30 20:16:28 +0800)
> 
> ----------------------------------------------------------------
> Mips: malta add cfi flash support
> 
> ----------------------------------------------------------------
> Jean-Christophe PLAGNIOL-VILLARD (3):
>       mips: add in_be16/32 and out_be16/32 for cfi support
>       qemu-malta: rename serial.c to init.c
>       qemu-malta: add nor flash support
> 
>  arch/mips/boards/qemu-malta/Makefile             |    2 +-
>  arch/mips/boards/qemu-malta/{serial.c => init.c} |   14 ++++++++++++++
>  arch/mips/configs/qemu-malta_defconfig           |    5 +++++
>  arch/mips/include/asm/io.h                       |    5 +++++
>  4 files changed, 25 insertions(+), 1 deletions(-)
>  rename arch/mips/boards/qemu-malta/{serial.c => init.c} (76%)
> 
> Best Regards,
> J.
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-01 19:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-30 11:57 [PATCH 0/3] qemu-malta nor flash support Jean-Christophe PLAGNIOL-VILLARD
2012-04-30 12:00 ` [PATCH 1/3] mips: add in_be16/32 and out_be16/32 for cfi support Jean-Christophe PLAGNIOL-VILLARD
2012-04-30 12:00 ` [PATCH 2/3] qemu-malta: rename serial.c to init.c Jean-Christophe PLAGNIOL-VILLARD
2012-04-30 12:00 ` [PATCH 3/3] qemu-malta: add nor flash support Jean-Christophe PLAGNIOL-VILLARD
2012-05-01 19:41 ` [PATCH 0/3] qemu-malta " Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox