mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] nios2: use barebox_add_memory_bank in generic.c
@ 2012-11-14 22:23 Franck Jullien
  2012-11-14 22:23 ` [PATCH 2/2] nios2: update generic_defconfig Franck Jullien
  2012-11-15  7:47 ` [PATCH 1/2] nios2: use barebox_add_memory_bank in generic.c Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Franck Jullien @ 2012-11-14 22:23 UTC (permalink / raw)
  To: barebox

In the nios2 generic board generic.c file, use the
new barebox_add_memory_bank to init ram memory.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
---
 arch/nios2/boards/generic/generic.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/arch/nios2/boards/generic/generic.c b/arch/nios2/boards/generic/generic.c
index 66eb856..499d93b 100644
--- a/arch/nios2/boards/generic/generic.c
+++ b/arch/nios2/boards/generic/generic.c
@@ -3,6 +3,7 @@
 #include <driver.h>
 #include <partition.h>
 #include <fs.h>
+#include <memory.h>
 
 static int phy_address = 1;
 
@@ -32,11 +33,17 @@ static struct device_d mac_dev = {
 	.platform_data = &phy_address,
 };
 
+static int mem_init(void)
+{
+	barebox_add_memory_bank("ram0", NIOS_SOPC_MEMORY_BASE, NIOS_SOPC_MEMORY_SIZE);
+
+	return 0;
+}
+mem_initcall(mem_init);
+
 static int generic_devices_init(void)
 {
 	add_cfi_flash_device(DEVICE_ID_DYNAMIC, NIOS_SOPC_FLASH_BASE, NIOS_SOPC_FLASH_SIZE, 0);
-	add_mem_device("ram0", NIOS_SOPC_MEMORY_BASE, NIOS_SOPC_MEMORY_SIZE,
-		       IORESOURCE_MEM_WRITEABLE);
 	platform_device_register(&mac_dev);
 	/*register_device(&epcs_flash_device);*/
 
-- 
1.7.1


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

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

* [PATCH 2/2] nios2: update generic_defconfig
  2012-11-14 22:23 [PATCH 1/2] nios2: use barebox_add_memory_bank in generic.c Franck Jullien
@ 2012-11-14 22:23 ` Franck Jullien
  2012-11-15  7:47 ` [PATCH 1/2] nios2: use barebox_add_memory_bank in generic.c Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Franck Jullien @ 2012-11-14 22:23 UTC (permalink / raw)
  To: barebox

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
---
 arch/nios2/configs/generic_defconfig |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/arch/nios2/configs/generic_defconfig b/arch/nios2/configs/generic_defconfig
index 279a71e..5e27cc8 100644
--- a/arch/nios2/configs/generic_defconfig
+++ b/arch/nios2/configs/generic_defconfig
@@ -14,10 +14,19 @@ CONFIG_CMD_LOADENV=y
 CONFIG_CMD_EXPORT=y
 CONFIG_CMD_PRINTENV=y
 CONFIG_CMD_READLINE=y
+CONFIG_CMD_TFTP=y
+CONFIG_CMD_ECHO_E=y
 CONFIG_CMD_FLASH=y
-CONFIG_CMD_BOOTM_ZLIB=y
+CONFIG_CMD_BOOTM_SHOW_TYPE=y
+CONFIG_CMD_BOOTM_VERBOSE=y
+CONFIG_CMD_UIMAGE=y
 CONFIG_CMD_RESET=y
 CONFIG_CMD_GO=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
+CONFIG_NET=y
+CONFIG_NET_PING=y
+CONFIG_DRIVER_NET_TSE=y
 CONFIG_DRIVER_CFI=y
+CONFIG_FS_TFTP=y
+CONFIG_ZLIB=y
-- 
1.7.1


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

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

* Re: [PATCH 1/2] nios2: use barebox_add_memory_bank in generic.c
  2012-11-14 22:23 [PATCH 1/2] nios2: use barebox_add_memory_bank in generic.c Franck Jullien
  2012-11-14 22:23 ` [PATCH 2/2] nios2: update generic_defconfig Franck Jullien
@ 2012-11-15  7:47 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2012-11-15  7:47 UTC (permalink / raw)
  To: Franck Jullien; +Cc: barebox

On Wed, Nov 14, 2012 at 11:23:32PM +0100, Franck Jullien wrote:
> In the nios2 generic board generic.c file, use the
> new barebox_add_memory_bank to init ram memory.
> 
> Signed-off-by: Franck Jullien <franck.jullien@gmail.com>

Applied, thanks

Sascha

> ---
>  arch/nios2/boards/generic/generic.c |   11 +++++++++--
>  1 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/nios2/boards/generic/generic.c b/arch/nios2/boards/generic/generic.c
> index 66eb856..499d93b 100644
> --- a/arch/nios2/boards/generic/generic.c
> +++ b/arch/nios2/boards/generic/generic.c
> @@ -3,6 +3,7 @@
>  #include <driver.h>
>  #include <partition.h>
>  #include <fs.h>
> +#include <memory.h>
>  
>  static int phy_address = 1;
>  
> @@ -32,11 +33,17 @@ static struct device_d mac_dev = {
>  	.platform_data = &phy_address,
>  };
>  
> +static int mem_init(void)
> +{
> +	barebox_add_memory_bank("ram0", NIOS_SOPC_MEMORY_BASE, NIOS_SOPC_MEMORY_SIZE);
> +
> +	return 0;
> +}
> +mem_initcall(mem_init);
> +
>  static int generic_devices_init(void)
>  {
>  	add_cfi_flash_device(DEVICE_ID_DYNAMIC, NIOS_SOPC_FLASH_BASE, NIOS_SOPC_FLASH_SIZE, 0);
> -	add_mem_device("ram0", NIOS_SOPC_MEMORY_BASE, NIOS_SOPC_MEMORY_SIZE,
> -		       IORESOURCE_MEM_WRITEABLE);
>  	platform_device_register(&mac_dev);
>  	/*register_device(&epcs_flash_device);*/
>  
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> 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] 3+ messages in thread

end of thread, other threads:[~2012-11-15  7:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-14 22:23 [PATCH 1/2] nios2: use barebox_add_memory_bank in generic.c Franck Jullien
2012-11-14 22:23 ` [PATCH 2/2] nios2: update generic_defconfig Franck Jullien
2012-11-15  7:47 ` [PATCH 1/2] nios2: use barebox_add_memory_bank in generic.c Sascha Hauer

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