Add basic support for mini2440 dev board.
Subsystems (2)
PATCH 1/1 Add basic support for mini2440 dev board.
This work is mainly based on a9m2440 board implementation from Juergen Beisert <[email protected]>. Functionality was tested only running barebox from ram. Loading to flash and booting will not work because missing lowlevel_init functionality (lack of jtag debugger on my side ;)).
--- arch/arm/Makefile | 1 + arch/arm/boards/mini2440/Makefile | 2 + arch/arm/boards/mini2440/config.h | 50 +++++ arch/arm/boards/mini2440/env/bin/_update | 34 ++++ arch/arm/boards/mini2440/env/bin/boot | 40 ++++ arch/arm/boards/mini2440/env/bin/hush_hack | 1 + arch/arm/boards/mini2440/env/bin/init | 34 ++++ arch/arm/boards/mini2440/env/bin/update_kernel | 13 ++ arch/arm/boards/mini2440/env/bin/update_root | 13 ++ arch/arm/boards/mini2440/env/config | 27 +++ arch/arm/boards/mini2440/mini2440.c | 139 +++++++++++++ arch/arm/configs/mini2440_defconfig | 251 ++++++++++++++++++++++++ arch/arm/mach-s3c24xx/Kconfig | 9 + 13 files changed, 614 insertions(+), 0 deletions(-) create mode 100644 arch/arm/boards/mini2440/Makefile create mode 100644 arch/arm/boards/mini2440/config.h create mode 100644 arch/arm/boards/mini2440/env/bin/_update create mode 100644 arch/arm/boards/mini2440/env/bin/boot create mode 100644 arch/arm/boards/mini2440/env/bin/hush_hack create mode 100644 arch/arm/boards/mini2440/env/bin/init create mode 100644 arch/arm/boards/mini2440/env/bin/update_kernel create mode 100644 arch/arm/boards/mini2440/env/bin/update_root create mode 100644 arch/arm/boards/mini2440/env/config create mode 100644 arch/arm/boards/mini2440/mini2440.c create mode 100644 arch/arm/configs/mini2440_defconfig
arch/arm/Makefile +1 -0
@@ -80,6 +80,7 @@ board-$(CONFIG_MACH_PCM043) := pcm043 board-$(CONFIG_MACH_PM9263) := pm9263 board-$(CONFIG_MACH_SCB9328) := scb9328 board-$(CONFIG_MACH_NESO) := guf-neso +board-$(CONFIG_MACH_MINI2440) := mini2440 machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
arch/arm/boards/mini2440/Makefile new file +2 -0
@@ -0,0 +1,2 @@ + +obj-y += mini2440.o
arch/arm/boards/mini2440/config.h new file +50 -0
50 lines not on this page · raw message
arch/arm/boards/mini2440/env/bin/_update new file +34 -0
@@ -0,0 +1,34 @@ +#!/bin/sh + +if [ -z "$part" -o -z "$image" ]; then + echo "define \$part and \$image" + exit 1 +fi + +if [ ! -e "$part" ]; then + echo "Partition $part does not exist" + exit 1 +fi + +if [ $# = 1 ]; then + image=$1 +fi + +if [ x$ip = xdhcp ]; then + dhcp +fi + +ping $eth0.serverip +if [ $? -ne 0 ] ; then + echo "update aborted" + exit 1 +fi + +echo +echo "erasing partition $part" +erase $part + +echo +echo "flashing $image to $part" +echo +tftp $image $part
arch/arm/boards/mini2440/env/bin/boot new file +40 -0
@@ -0,0 +1,40 @@ +#!/bin/sh + +. /env/config + +if [ x$1 = xnand ]; then + root=nand + kernel=nand +fi + +if [ x$1 = xnet ]; then + root=net + kernel=net +fi + +if [ x$root = xnand ]; then + bootargs="$bootargs root=$rootpart_nand rootfstype=jffs2" +fi +if [ x$root = xnet ]; then + bootargs="$bootargs root=/dev/nfs nfsroot=$eth0.serverip:$nfsroot,v3,tcp" + if [ x$ip = xdhcp ]; then + bootargs="$bootargs ip=dhcp" + else + bootargs="$bootargs ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask:::" + fi +fi + +bootargs="$bootargs mtdparts=\"NAND 32MiB 3,3V 8-bit:$nand_parts\"" + +bootargs="$bootargs cs89x0_media=rj45 cs89x0_mac=$eth0.ethaddr" + +if [ x$kernel = xnet ]; then + if [ x$ip = xdhcp ]; then + dhcp + fi + tftp $uimage uImage || exit 1 + bootm uImage +else + bootm /dev/nand0.kernel.bb +fi +
arch/arm/boards/mini2440/env/bin/hush_hack new file +1 -0
@@ -0,0 +1 @@ +nand -a /dev/nand0.*
arch/arm/boards/mini2440/env/bin/init new file +34 -0
@@ -0,0 +1,34 @@ +#!/bin/sh + +PATH=/env/bin +export PATH + +. /env/config + +if [ -e /dev/nand0 ]; then +#addpart /dev/nand0 $nand_parts + + # Uh, oh, hush first expands wildcards and then starts executing + # commands. What a bug! + source /env/bin/hush_hack +fi + +if [ -z $eth0.ethaddr ]; then + while [ -z $eth0.ethaddr ]; do + readline "no MAC address set for eth0. please enter the one found on your board: " eth0.ethaddr + done + echo -a /env/config "eth0.ethaddr=$eth0.ethaddr" +fi + +echo +echo -n "Hit any key to stop autoboot: " +timeout -a $autoboot_timeout +if [ $? != 0 ]; then + echo + echo "type update_kernel [<imagename>] to update kernel into flash" + echo "type update_root [<imagename>] to update rootfs into flash" + echo + exit +fi + +boot
arch/arm/boards/mini2440/env/bin/update_kernel new file +13 -0
@@ -0,0 +1,13 @@ +#!/bin/sh + +. /env/config + +part=/dev/nand0.kernel.bb + +if [ x$1 = x ]; then + image=$uimage +else + image=$1 +fi + +. /env/bin/_update $image
arch/arm/boards/mini2440/env/bin/update_root new file +13 -0
@@ -0,0 +1,13 @@ +#!/bin/sh + +. /env/config + +part=/dev/nand0.root.bb + +if [ x$1 = x ]; then + image=$jffs2 +else + image=$1 +fi + +. /env/bin/_update $image
arch/arm/boards/mini2440/env/config new file +27 -0
@@ -0,0 +1,27 @@ +#!/bin/sh + +# can be either 'net' or 'nand'' +kernel=net +root=net + +#uimage=uImage-a9m2440 +uimage=uImage +jffs2=root-a9m2440.jffs2 + +autoboot_timeout=3 + +nfsroot="/home/open-nandra/rootfs" +bootargs="console=ttySAC0,115200" + +nand_parts="256k(barebox),128k(bareboxenv),1536k(kernel),-(root)" +rootpart_nand="/dev/mtdblock3" + +# use 'dhcp' to do dhcp in barebox and in kernel +#ip=dhcp + +# or set your networking parameters here +eth0.ipaddr=192.168.42.32 +eth0.netmask=255.255.0.0 +eth0.gateway=192.168.23.1 +eth0.serverip=192.168.23.2 +eth0.ethaddr=00:04:f3:00:06:35
arch/arm/boards/mini2440/mini2440.c new file +139 -0
139 lines not on this page · raw message
arch/arm/configs/mini2440_defconfig new file +251 -0
251 lines not on this page · raw message
arch/arm/mach-s3c24xx/Kconfig +9 -0
@@ -5,6 +5,7 @@ config ARCH_TEXT_BASE default 0x31fc0000 config BOARDINFO + default "Mini 2440" if MACH_MINI2440 default "Digi A9M2440" if MACH_A9M2440 default "Digi A9M2410" if MACH_A9M2410
@@ -37,6 +38,14 @@ config MACH_A9M2440 Say Y here if you are using Digi's Connect Core 9M equipped with a Samsung S3C2440 Processor +config MACH_MINI2440 + bool "Mini 2440" + select CPU_S3C2440 + select HAS_DM9000 + help + Say Y here if you are using Mini 2440 dev board equipped + with a Samsung S3C2440 Processor + endchoice menu "Board specific settings "
Signature · 7 lines
1.7.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 5 lines · Marek Belisko
This work is mainly based on a9m2440 board implementation from Juergen Beisert <[email protected]>. Functionality was tested only running barebox from ram. Loading to flash and booting will not work because missing
lowlevel_initfunctionality (lack of jtag debugger on my side ;)).
I have now access to a mini2440 at Pengutronix. I will add this feature soon.
Quoted 31 lines
[...]
arch/arm/boards/mini2440/mini2440.c new file +25
-0+static int mini2440_devices_init (void ) +{ +uint32_t reg; + + reg =readl (BWSCON ); + +/* CS#4 to access the network controller */ + reg &= ~0x000f0000 ; + reg |=0x000d0000 ;/* 16 bit */ +writel (0x1f4c ,BANKCON4 ); + +writel (reg,BWSCON ); + +/* release the reset signal to external devices */ + reg =readl (MISCCR ); + reg |=0x10000 ; +writel (reg,MISCCR ); + +register_device (&nand_dev); +register_device (&sdram_dev); +register_device (&dm9000_dev); +#ifdef CONFIG_NAND +/* ----------- add some vital partitions -------- */ +devfs_del_partition ("self_raw" ); + devfs_add_partition("nand0", 0x00000, 0x40000, PARTITION_FIXED,"
self_raw"); +dev_add_bb_dev("self_raw", NULL);arch/arm/boards/mini2440/mini2440.c new file +3
-0+ +devfs_del_partition ("env_raw" ); + devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED,"
env_raw"); +dev_add_bb_dev("env_raw", NULL);
arch/arm/boards/mini2440/mini2440.c line 116
Quoted 7 lines
arch/arm/boards/mini2440/mini2440.c new file +7
-0+#endif +armlinux_add_dram (&sdram_dev); +armlinux_set_bootparams ((void *)sdram_dev.map_base +0x100 ); +armlinux_set_architecture (MACH_TYPE_MINI2440 ); + +return 0 ; +}
We need some kind of management here, because the mini2440 comes with NOR and NAND flash. And both can be configured to boot the system from: We need a location to store the environment. Maybe in NOR, when booting from NOR, and in NAND, when booting form NAND? Or only one single location where to store the environment, independent from the boot source? Ideas?
jbe
Signature · 9 lines
Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | Phone: +49-8766-939 228 | Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 45 lines · Juergen Beisert
Quoted 5 lines · Marek Belisko
This work is mainly based on a9m2440 board implementation from Juergen Beisert <[email protected]>. Functionality was tested only running barebox from ram. Loading to flash and booting will not work because missing
lowlevel_initfunctionality (lack of jtag debugger on my side ;)).I have now access to a mini2440 at Pengutronix. I will add this feature soon.
Quoted 36 lines
[...]
arch/arm/boards/mini2440/mini2440.c new file +25
-0+static int mini2440_devices_init (void ) +{ +uint32_t reg; + + reg =readl (BWSCON ); + +/* CS#4 to access the network controller */ + reg &= ~0x000f0000 ; + reg |=0x000d0000 ;/* 16 bit */ +writel (0x1f4c ,BANKCON4 ); + +writel (reg,BWSCON ); + +/* release the reset signal to external devices */ + reg =readl (MISCCR ); + reg |=0x10000 ; +writel (reg,MISCCR ); + +register_device (&nand_dev); +register_device (&sdram_dev); +register_device (&dm9000_dev); +#ifdef CONFIG_NAND +/* ----------- add some vital partitions -------- */ +devfs_del_partition ("self_raw" ); + devfs_add_partition("nand0", 0x00000, 0x40000, PARTITION_FIXED,"
self_raw"); +dev_add_bb_dev("self_raw", NULL);arch/arm/boards/mini2440/mini2440.c new file +3
-0+ +devfs_del_partition ("env_raw" ); + devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED,"
env_raw"); +dev_add_bb_dev("env_raw", NULL);arch/arm/boards/mini2440/mini2440.c new file +5
-0+#endif +armlinux_add_dram (&sdram_dev); +armlinux_set_bootparams ((void *)sdram_dev.map_base +0x100 ); +armlinux_set_architecture (MACH_TYPE_MINI2440 ); +
Quoted 8 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ return 0; +}We need some kind of management here, because the mini2440 comes with NOR and NAND flash. And both can be configured to boot the system from: We need a location to store the environment. Maybe in NOR, when booting from NOR, and in NAND, when booting form NAND? Or only one single location where to store the environment, independent from the boot source? Ideas?
I like the idea to store in the boot media
Best Regards,
J.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 45 lines · Juergen Beisert
Quoted 5 lines · Marek Belisko
This work is mainly based on a9m2440 board implementation from Juergen Beisert <[email protected]>. Functionality was tested only running barebox from ram. Loading to flash and booting will not work because missing
lowlevel_initfunctionality (lack of jtag debugger on my side ;)).I have now access to a mini2440 at Pengutronix. I will add this feature soon.
Quoted 36 lines
[...]
arch/arm/boards/mini2440/mini2440.c new file +25
-0+static int mini2440_devices_init (void ) +{ + uint32_t reg; + + reg = readl(BWSCON); + + /* CS#4 to access the network controller */ + reg &= ~0x000f0000; + reg |= 0x000d0000; /* 16 bit */ + writel(0x1f4c, BANKCON4); + + writel(reg, BWSCON); + + /* release the reset signal to external devices */ + reg = readl(MISCCR); + reg |= 0x10000; + writel(reg, MISCCR); + + register_device(&nand_dev); + register_device(&sdram_dev); + register_device(&dm9000_dev); +#ifdef CONFIG_NAND + /* ----------- add some vital partitions -------- */ + devfs_del_partition("self_raw"); + devfs_add_partition("nand0", 0x00000, 0x40000, PARTITION_FIXED,"
self_raw"); + dev_add_bb_dev("self_raw", NULL);
+
+devfs_del_partition("env_raw");
+devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED, "env_raw"); +dev_add_bb_dev("env_raw", NULL);arch/arm/boards/mini2440/mini2440.c new file +5
-0+#endif + armlinux_add_dram(&sdram_dev); + armlinux_set_bootparams((void *)sdram_dev.map_base + 0x100); + armlinux_set_architecture(MACH_TYPE_MINI2440); +
Quoted 8 lines
Quoted 2 lines
+ return 0;
+}We need some kind of management here, because the mini2440 comes with NOR and NAND flash. And both can be configured to boot the system from: We need a location to store the environment. Maybe in NOR, when booting from NOR, and in NAND, when booting form NAND? Or only one single location where to store the environment, independent from the boot source? Ideas?
AFAIK NOR flash with supervivi bootloader is used just for repair content of NAND flash when something goes wrong. Do we really need to store barebox to NOR flash?
Quoted 9 lines
jbe
--
Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | Phone: +49-8766-939 228 | Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ |
thanks,
marek
Signature · 15 lines
as simple and primitive as possible ------------------------------------------------- Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite icq: 290551086 web: http://open-nandra.com _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 1 line · Belisko Marek
On Tue, Oct 19, 2010 at 10:28 AM, Juergen Beisert <[email protected]>
Quoted 55 lines · wrote:
Quoted 46 lines
Quoted 5 lines · Marek Belisko
This work is mainly based on a9m2440 board implementation from Juergen Beisert <[email protected]>. Functionality was tested only running barebox from ram. Loading to flash and booting will not work because missing
lowlevel_initfunctionality (lack of jtag debugger on my side ;)).I have now access to a mini2440 at Pengutronix. I will add this feature soon.
Quoted 36 lines
[...]
arch/arm/boards/mini2440/mini2440.c new file +25
-0+static int mini2440_devices_init (void ) +{ + uint32_t reg; + + reg = readl(BWSCON); + + /* CS#4 to access the network controller */ + reg &= ~0x000f0000; + reg |= 0x000d0000; /* 16 bit */ + writel(0x1f4c, BANKCON4); + + writel(reg, BWSCON); + + /* release the reset signal to external devices */ + reg = readl(MISCCR); + reg |= 0x10000; + writel(reg, MISCCR); + + register_device(&nand_dev); + register_device(&sdram_dev); + register_device(&dm9000_dev); +#ifdef CONFIG_NAND + /* ----------- add some vital partitions -------- */ + devfs_del_partition("self_raw"); + devfs_add_partition("nand0", 0x00000, 0x40000, PARTITION_FIXED,"
self_raw"); + dev_add_bb_dev("self_raw", NULL);
+
+devfs_del_partition("env_raw");
+devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED, "env_raw"); +dev_add_bb_dev("env_raw", NULL);arch/arm/boards/mini2440/mini2440.c new file +5
-0+#endif + armlinux_add_dram(&sdram_dev); + armlinux_set_bootparams((void *)sdram_dev.map_base + 0x100); + armlinux_set_architecture(MACH_TYPE_MINI2440); +Quoted 8 lines
Quoted 2 lines
+ return 0;
+}We need some kind of management here, because the mini2440 comes with NOR and NAND flash. And both can be configured to boot the system from: We need a location to store the environment. Maybe in NOR, when booting from NOR, and in NAND, when booting form NAND? Or only one single location where to store the environment, independent from the boot source? Ideas?
Quoted 3 lines
AFAIK NOR flash with supervivi bootloader is used just for repair content of NAND flash when something goes wrong. Do we really need to store barebox to NOR flash?
We do not need it. But maybe we want it ;-)
Why supervivi, when barebox supports the mini2440 completely? (okay, okay, needs more work....)
jbe
Signature · 9 lines
Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | Phone: +49-8766-939 228 | Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 58 lines · Juergen Beisert
Quoted 1 line · Belisko Marek
On Tue, Oct 19, 2010 at 10:28 AM, Juergen Beisert <[email protected]>
Quoted 55 lines · wrote:
Quoted 54 lines
Quoted 5 lines · Marek Belisko
This work is mainly based on a9m2440 board implementation from Juergen Beisert <[email protected]>. Functionality was tested only running barebox from ram. Loading to flash and booting will not work because missing
lowlevel_initfunctionality (lack of jtag debugger on my side ;)).I have now access to a mini2440 at Pengutronix. I will add this feature soon.
Quoted 31 lines
[...]
arch/arm/boards/mini2440/mini2440.c new file +25
-0+static int mini2440_devices_init (void ) +{ + uint32_t reg; + + reg = readl(BWSCON); + + /* CS#4 to access the network controller */ + reg &= ~0x000f0000; + reg |= 0x000d0000; /* 16 bit */ + writel(0x1f4c, BANKCON4); + + writel(reg, BWSCON); + + /* release the reset signal to external devices */ + reg = readl(MISCCR); + reg |= 0x10000; + writel(reg, MISCCR); + + register_device(&nand_dev); + register_device(&sdram_dev); + register_device(&dm9000_dev); +#ifdef CONFIG_NAND + /* ----------- add some vital partitions -------- */ + devfs_del_partition("self_raw"); + devfs_add_partition("nand0", 0x00000, 0x40000, PARTITION_FIXED,"
self_raw"); + dev_add_bb_dev("self_raw", NULL);
+
+devfs_del_partition("env_raw");
+devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED, "env_raw"); +dev_add_bb_dev("env_raw", NULL);arch/arm/boards/mini2440/mini2440.c line 116
Quoted 7 lines
arch/arm/boards/mini2440/mini2440.c new file +7
-0+#endif + armlinux_add_dram(&sdram_dev); + armlinux_set_bootparams((void *)sdram_dev.map_base + 0x100); + armlinux_set_architecture(MACH_TYPE_MINI2440); + + return 0; +}We need some kind of management here, because the mini2440 comes with NOR and NAND flash. And both can be configured to boot the system from: We need a location to store the environment. Maybe in NOR, when booting from NOR, and in NAND, when booting form NAND? Or only one single location where to store the environment, independent from the boot source? Ideas?
Quoted 8 lines
Quoted 3 lines
AFAIK NOR flash with supervivi bootloader is used just for repair content of NAND flash when something goes wrong. Do we really need to store barebox to NOR flash?
We do not need it. But maybe we want it ;-)
Why supervivi, when barebox supports the mini2440 completely? (okay, okay, needs more work....)
Well yes something like for my free-runner open-moko (in NOR u-boot) ;). You're right.
I can add more support but without jtag debugger I think I can't or just a matter of luck ;)
that it boot from FLASH. Hope this basic help somebody to add full support.
Quoted 9 lines
jbe
--
Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | Phone: +49-8766-939 228 | Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ |
marek
Signature · 15 lines
as simple and primitive as possible ------------------------------------------------- Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite icq: 290551086 web: http://open-nandra.com _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 56 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 46 lines · Juergen Beisert
Quoted 5 lines · Marek Belisko
This work is mainly based on a9m2440 board implementation from Juergen Beisert <[email protected]>. Functionality was tested only running barebox from ram. Loading to flash and booting will not work because missing
lowlevel_initfunctionality (lack of jtag debugger on my side ;)).I have now access to a mini2440 at Pengutronix. I will add this feature soon.
Quoted 36 lines
[...]
arch/arm/boards/mini2440/mini2440.c new file +25
-0+static int mini2440_devices_init (void ) +{ +uint32_t reg; + + reg =readl (BWSCON ); + +/* CS#4 to access the network controller */ + reg &= ~0x000f0000 ; + reg |=0x000d0000 ;/* 16 bit */ +writel (0x1f4c ,BANKCON4 ); + +writel (reg,BWSCON ); + +/* release the reset signal to external devices */ + reg =readl (MISCCR ); + reg |=0x10000 ; +writel (reg,MISCCR ); + +register_device (&nand_dev); +register_device (&sdram_dev); +register_device (&dm9000_dev); +#ifdef CONFIG_NAND +/* ----------- add some vital partitions -------- */ +devfs_del_partition ("self_raw" ); + devfs_add_partition("nand0", 0x00000, 0x40000, PARTITION_FIXED,"
self_raw"); +dev_add_bb_dev("self_raw", NULL);arch/arm/boards/mini2440/mini2440.c new file +3
-0+ +devfs_del_partition ("env_raw" ); + devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED,"
env_raw"); +dev_add_bb_dev("env_raw", NULL);arch/arm/boards/mini2440/mini2440.c new file +5
-0+#endif +armlinux_add_dram (&sdram_dev); +armlinux_set_bootparams ((void *)sdram_dev.map_base +0x100 ); +armlinux_set_architecture (MACH_TYPE_MINI2440 ); +Quoted 8 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ return 0; +}We need some kind of management here, because the mini2440 comes with NOR and NAND flash. And both can be configured to boot the system from: We need a location to store the environment. Maybe in NOR, when booting from NOR, and in NAND, when booting form NAND? Or only one single location where to store the environment, independent from the boot source? Ideas?
Quoted 1 line
I like the idea to store in the boot media
If you switch the boot media the environment moves, too? That may confuse users, as their settings are "moving away" in this case. Okay, its not a regular usecase. But with the mini2440 its simply a configuration switch on the board. My idea was to add some Kconfig menu entries to select one of the possible cases a) move the environment with the boot source or b) store and expect it always in NOR or NAND.
jbe
Signature · 9 lines
Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | Phone: +49-8766-939 228 | Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Will be this patch added to git repo? I have udc gadget patch available but has dependency on this one.
Quoted 74 lines · Juergen Beisert
Quoted 56 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 46 lines · Juergen Beisert
Quoted 5 lines · Marek Belisko
This work is mainly based on a9m2440 board implementation from Juergen Beisert <[email protected]>. Functionality was tested only running barebox from ram. Loading to flash and booting will not work because missing
lowlevel_initfunctionality (lack of jtag debugger on my side ;)).I have now access to a mini2440 at Pengutronix. I will add this feature soon.
Quoted 36 lines
[...]
arch/arm/boards/mini2440/mini2440.c new file +25
-0+static int mini2440_devices_init (void ) +{ +uint32_t reg; + + reg =readl (BWSCON ); + +/* CS#4 to access the network controller */ + reg &= ~0x000f0000 ; + reg |= 0x000d0000; /* 16 bit */ +writel (0x1f4c ,BANKCON4 ); + +writel (reg,BWSCON ); + +/* release the reset signal to external devices */ + reg =readl (MISCCR ); + reg |=0x10000 ; +writel (reg,MISCCR ); + +register_device (&nand_dev); +register_device (&sdram_dev); +register_device (&dm9000_dev); +#ifdef CONFIG_NAND +/* ----------- add some vital partitions -------- */ +devfs_del_partition ("self_raw" ); + devfs_add_partition("nand0", 0x00000, 0x40000, PARTITION_FIXED,"
self_raw"); + dev_add_bb_dev("self_raw", NULL);
+
+devfs_del_partition("env_raw");
+devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED, "env_raw"); +dev_add_bb_dev("env_raw", NULL);arch/arm/boards/mini2440/mini2440.c new file +5
-0+#endif +armlinux_add_dram (&sdram_dev); +armlinux_set_bootparams ((void *)sdram_dev.map_base +0x100 ); +armlinux_set_architecture (MACH_TYPE_MINI2440 ); +Quoted 8 lines
Quoted 2 lines
+ return 0;
+}We need some kind of management here, because the mini2440 comes with NOR and NAND flash. And both can be configured to boot the system from: We need a location to store the environment. Maybe in NOR, when booting from NOR, and in NAND, when booting form NAND? Or only one single location where to store the environment, independent from the boot source? Ideas?
Quoted 1 line
I like the idea to store in the boot media
If you switch the boot media the environment moves, too? That may confuse users, as their settings are "moving away" in this case. Okay, its not a regular usecase. But with the mini2440 its simply a configuration switch on the board. My idea was to add some
Kconfigmenu entries to select one of the possible cases a) move the environment with the boot source or b) store and expect it always in NOR or NAND.jbe
--
Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | Phone: +49-8766-939 228 | Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ |
Quoted 5 lines
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
thanks,
marek
Signature · 15 lines
as simple and primitive as possible ------------------------------------------------- Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite icq: 290551086 web: http://open-nandra.com _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox