From 91d1d7c75b54275690df0a2a3d0598a605b368cc Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Thu, 15 Sep 2016 12:38:14 +0200 Subject: ARM: mvebu_defconfig: oldconfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is the result of make mvebu_defconfig make savedefconfig mv defconfig arch/arm/configs/mvebu_defconfig . Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- arch/arm/configs/mvebu_defconfig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index bd978a9acb..faaeb1de84 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig @@ -17,7 +17,13 @@ CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y +CONFIG_BOOTM_SHOW_TYPE=y +CONFIG_BOOTM_VERBOSE=y +CONFIG_BOOTM_INITRD=y +CONFIG_BOOTM_OFTREE=y +CONFIG_BOOTM_OFTREE_UIMAGE=y CONFIG_BLSPEC=y +CONFIG_FLEXIBLE_BOOTARGS=y CONFIG_IMD_TARGET=y CONFIG_CONSOLE_ACTIVATE_NONE=y CONFIG_PARTITION_DISK_EFI=y @@ -26,13 +32,7 @@ CONFIG_CMD_IOMEM=y CONFIG_CMD_IMD=y CONFIG_CMD_MEMINFO=y CONFIG_CMD_ARM_MMUINFO=y -CONFIG_FLEXIBLE_BOOTARGS=y CONFIG_CMD_BOOT=y -CONFIG_BOOTM_SHOW_TYPE=y -CONFIG_BOOTM_VERBOSE=y -CONFIG_BOOTM_INITRD=y -CONFIG_BOOTM_OFTREE=y -CONFIG_BOOTM_OFTREE_UIMAGE=y CONFIG_CMD_GO=y CONFIG_CMD_LOADS=y CONFIG_CMD_LOADY=y -- cgit v1.2.3 From c786a876395d6435018b6e15e368195731e36614 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Thu, 15 Sep 2016 12:38:15 +0200 Subject: ARM: mvebu_defconfig: enable all machines, AEABI, nand and net driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- arch/arm/configs/mvebu_defconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index faaeb1de84..9998ce42d6 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig @@ -6,7 +6,9 @@ CONFIG_MACH_MARVELL_ARMADA_XP_GP=y CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3=y CONFIG_MACH_SOLIDRUN_CUBOX=y CONFIG_MACH_GLOBALSCALE_GURUPLUG=y +CONFIG_MACH_PLATHOME_OPENBLOCKS_A6=y CONFIG_MACH_USI_TOPKICK=y +CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_TEXT_BASE=0x0 CONFIG_MALLOC_SIZE=0x0 @@ -90,6 +92,7 @@ CONFIG_NET=y CONFIG_OFDEVICE=y CONFIG_OF_BAREBOX_DRIVERS=y CONFIG_DRIVER_SERIAL_NS16550=y +CONFIG_DRIVER_NET_MVNETA=y CONFIG_DRIVER_NET_ORION=y CONFIG_MARVELL_PHY=y CONFIG_DRIVER_SPI_GPIO=y @@ -100,6 +103,7 @@ CONFIG_MTD=y CONFIG_MTD_M25P80=y CONFIG_NAND=y CONFIG_NAND_ORION=y +CONFIG_NAND_MRVL_NFC=y CONFIG_DISK_AHCI=y CONFIG_USB_HOST=y CONFIG_USB_EHCI=y -- cgit v1.2.3 From 2b7823e7deeb7ec26d7b3c1b26cabcad9a827e19 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Thu, 15 Sep 2016 12:38:16 +0200 Subject: ARM: mvebu: select HAVE_DEFAULT_ENVIRONMENT_NEW MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit None of the available boards for mvebu has any environment additions, so this is safe. Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- arch/arm/Kconfig | 1 + arch/arm/configs/mvebu_defconfig | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 150320c6af..3c5572e700 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -125,6 +125,7 @@ config ARCH_MVEBU select CLKDEV_LOOKUP select GPIOLIB select HAS_DEBUG_LL + select HAVE_DEFAULT_ENVIRONMENT_NEW select HAVE_PBL_MULTI_IMAGES select HW_HAS_PCI select MVEBU_MBUS diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index 9998ce42d6..39e7ef1798 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig @@ -123,6 +123,8 @@ CONFIG_GPIO_ORION=y CONFIG_PCI_MVEBU=y CONFIG_FS_CRAMFS=y CONFIG_FS_EXT4=y +CONFIG_FS_TFTP=y +CONFIG_FS_NFS=y CONFIG_FS_FAT=y CONFIG_FS_FAT_WRITE=y CONFIG_FS_FAT_LFN=y -- cgit v1.2.3 From 1a43860506f293498b989822fb16444c602d0000 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Thu, 15 Sep 2016 12:38:17 +0200 Subject: net: mvneta: clean txdesc before usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes tx error detection which triggered way too often because the hardware doesn't seem to clear the error bits on success Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- drivers/net/mvneta.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index 1690f3b576..5c163cebc7 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -395,6 +395,7 @@ static int mvneta_send(struct eth_device *edev, void *data, int len) /* Flush transmit data */ dma_sync_single_for_device((unsigned long)data, len, DMA_TO_DEVICE); + memset(txdesc, 0, sizeof(*txdesc)); /* Fill the Tx descriptor */ txdesc->cmd_sts = MVNETA_TX_L4_CSUM_NOT | MVNETA_TXD_FLZ_DESC; txdesc->buf_ptr = (u32)data; -- cgit v1.2.3 From 331391d686ad87915a69a686220f01a20a7fd8e1 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Tue, 4 Oct 2016 08:35:11 +0200 Subject: scripts: kwboot: try to resync on packet boundary after receiving a NAK MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If we sent the boot message too often the CPU might already have started to interpret this as an xmodem packet. As sender and receiver are not in sync it's impossible to transfer a packet successfully. So when we get a NAK send '\xff' bytes until the receiver reaches the packet boundary. When we send too many the SoC replies with a NAK for each byte and doesn't interpret it as the start of a new package (which must start with SOH == '\x01'). A slower alternative would be to wait for another NAK which is sent when reception of the already started packet times out. This was tested on an Armada XP based machine with bootrom version 1.20. Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- scripts/kwboot.c | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/scripts/kwboot.c b/scripts/kwboot.c index 9b0d1d0602..9d680dc576 100644 --- a/scripts/kwboot.c +++ b/scripts/kwboot.c @@ -349,6 +349,48 @@ kwboot_xm_makeblock(struct kwboot_block *block, const void *data, return n; } +#define min(a, b) ((a) < (b) ? (a) : (b)) + +static int +kwboot_xm_resync(int fd) +{ + /* + * When the SoC has a different perception of where the package boundary + * is, just resending the packet doesn't help. To resync send 0xff until + * we get another NAK. + * The BootROM code (of the Armada XP at least) doesn't interpret 0xff + * as a start of a package and sends a NAK for each 0xff when waiting + * for SOH, so it's possible to send >1 byte without the SoC starting a + * new frame. + * When there is no response after sizeof(struct kwboot_block) bytes, + * there is another problem. + */ + int rc; + char buf[sizeof(struct kwboot_block)]; + unsigned interval = 1; + unsigned len; + char *p = buf; + + memset(buf, 0xff, sizeof(buf)); + + while (interval <= sizeof(buf)) { + len = min(interval, buf + sizeof(buf) - p); + rc = kwboot_tty_send(fd, p, len); + if (rc) + return rc; + + kwboot_tty_recv(fd, p, len, KWBOOT_BLK_RSP_TIMEO); + if (*p != 0xff) + /* got at least one char, if it's a NAK we're synced. */ + return (*p == NAK); + + p += len; + interval *= 2; + } + + return 0; +} + static int kwboot_xm_sendblock(int fd, struct kwboot_block *block) { @@ -371,7 +413,9 @@ kwboot_xm_sendblock(int fd, struct kwboot_block *block) } while (c != ACK && c != NAK && c != CAN); - if (c != ACK) + if (c == NAK && kwboot_xm_resync(fd)) + kwboot_progress(-1, 'S'); + else if (c != ACK) kwboot_progress(-1, '+'); } while (c == NAK && retries-- > 0); -- cgit v1.2.3 From 446ff0216e8df126b6bd5c284c1ba930fd8bb0ea Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Wed, 28 Sep 2016 20:50:12 +0200 Subject: scripts: kwboot: flush input and output only once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When flushing input before sending of a boot message the acknowledging reply for the previous message from the CPU might be discarded and so missed. So only flush once before sending boot messages in a loop. Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- scripts/kwboot.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/kwboot.c b/scripts/kwboot.c index 9d680dc576..9dfaf4a8df 100644 --- a/scripts/kwboot.c +++ b/scripts/kwboot.c @@ -273,11 +273,11 @@ kwboot_bootmsg(int tty, void *msg) else kwboot_printv("Sending boot message. Please reboot the target..."); - do { - rc = tcflush(tty, TCIOFLUSH); - if (rc) - break; + rc = tcflush(tty, TCIOFLUSH); + if (rc) + return rc; + do { rc = kwboot_tty_send(tty, msg, 8); if (rc) { usleep(KWBOOT_MSG_REQ_DELAY * 1000); @@ -302,13 +302,13 @@ kwboot_debugmsg(int tty, void *msg) kwboot_printv("Sending debug message. Please reboot the target..."); + rc = tcflush(tty, TCIOFLUSH); + if (rc) + return rc; + do { char buf[16]; - rc = tcflush(tty, TCIOFLUSH); - if (rc) - break; - rc = kwboot_tty_send(tty, msg, 8); if (rc) { usleep(KWBOOT_MSG_REQ_DELAY * 1000); -- cgit v1.2.3 From 1a64dd38544425e92de81aa505f6f390a7a53256 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Wed, 28 Sep 2016 20:50:13 +0200 Subject: scripts: kwboot: improve diagnostic output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After entering uart boot mode the CPU prints some diagnostic messages. Showing them to the user helps her to notice when the message window was missed or there is an other problem. Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- scripts/kwboot.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/kwboot.c b/scripts/kwboot.c index 9dfaf4a8df..0a089b5936 100644 --- a/scripts/kwboot.c +++ b/scripts/kwboot.c @@ -9,6 +9,7 @@ * 2008. Chapter 24.2 "BootROM Firmware". */ +#include #include #include #include @@ -285,12 +286,20 @@ kwboot_bootmsg(int tty, void *msg) } rc = kwboot_tty_recv(tty, &c, 1, KWBOOT_MSG_RSP_TIMEO); - - kwboot_spinner(); + while (!rc && c != NAK) { + if (c == '\\') + kwboot_printv("\\\\", c); + else if (isprint(c) || c == '\r' || c == '\n') + kwboot_printv("%c", c); + else + kwboot_printv("\\x%02hhx", c); + + rc = kwboot_tty_recv(tty, &c, 1, KWBOOT_MSG_RSP_TIMEO); + } } while (rc || c != NAK); - kwboot_printv("\n"); + kwboot_printv("\nGot expected NAK\n"); return rc; } -- cgit v1.2.3 From ebec4450929ad823e06bea14192c07d3cc69210a Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Wed, 28 Sep 2016 20:50:14 +0200 Subject: scripts: kwboot: shorten delay between two boot messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Together with the previous changes that allow to handle the scenario where too many messages were sent, this greatly improves the probability to hit the time window during which the CPU accepts a boot message. Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- scripts/kwboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kwboot.c b/scripts/kwboot.c index 0a089b5936..58ea1ad7a7 100644 --- a/scripts/kwboot.c +++ b/scripts/kwboot.c @@ -36,7 +36,7 @@ static unsigned char kwboot_msg_debug[] = { }; #define KWBOOT_MSG_REQ_DELAY 1000 /* ms */ -#define KWBOOT_MSG_RSP_TIMEO 1000 /* ms */ +#define KWBOOT_MSG_RSP_TIMEO 1 /* ms */ /* * Xmodem Transfers -- cgit v1.2.3 From 90184dbc3691fd0ba188682fdc55d82a2af230ed Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Wed, 28 Sep 2016 20:50:15 +0200 Subject: scripts: kwboot: simplify kwboot_mmap_image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There was only a single caller who passes prot=PROT_READ unconditionally. So drop this parameter and simplify accordingly. Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- scripts/kwboot.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/kwboot.c b/scripts/kwboot.c index 58ea1ad7a7..1fcb49b7ac 100644 --- a/scripts/kwboot.c +++ b/scripts/kwboot.c @@ -657,9 +657,9 @@ kwboot_check_image(const unsigned char *img, size_t size) } static void * -kwboot_mmap_image(const char *path, size_t *size, int prot) +kwboot_mmap_image(const char *path, size_t *size) { - int rc, fd, flags; + int rc, fd; struct stat st; void *img; @@ -674,9 +674,7 @@ kwboot_mmap_image(const char *path, size_t *size, int prot) if (rc) goto out; - flags = (prot & PROT_WRITE) ? MAP_PRIVATE : MAP_SHARED; - - img = mmap(NULL, st.st_size, prot, flags, fd, 0); + img = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0); if (img == MAP_FAILED) { img = NULL; goto out; @@ -793,7 +791,7 @@ main(int argc, char **argv) } if (imgpath) { - img = kwboot_mmap_image(imgpath, &size, PROT_READ); + img = kwboot_mmap_image(imgpath, &size); if (!img) { perror(imgpath); goto out; -- cgit v1.2.3 From 481274a9353ef62b64cbaf9e5b25cae47235b7f2 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Wed, 28 Sep 2016 20:50:16 +0200 Subject: scripts: kwboot: set boot source to UART before sending MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sending an image that specifies one of the alternative boot sources doesn't make sense. So change the boot source to UART on the fly. Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- scripts/kwboot.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/kwboot.c b/scripts/kwboot.c index 1fcb49b7ac..9e4181e539 100644 --- a/scripts/kwboot.c +++ b/scripts/kwboot.c @@ -600,7 +600,7 @@ out: } static int -kwboot_check_image(const unsigned char *img, size_t size) +kwboot_check_image(unsigned char *img, size_t size) { size_t i; size_t header_size, image_size; @@ -613,12 +613,20 @@ kwboot_check_image(const unsigned char *img, size_t size) } switch (img[0x0]) { - case 0x5a: /* SPI/NOR */ case 0x69: /* UART0 */ + break; + + case 0x5a: /* SPI/NOR */ case 0x78: /* SATA */ case 0x8b: /* NAND */ case 0x9c: /* PCIe */ + /* change boot source to UART and fix checksum */ + img[0x1f] -= img[0x0]; + img[0x1f] += 0x69; + img[0x0] = 0x69; + break; + default: fprintf(stderr, "Unknown boot source: 0x%hhx\n", img[0x0]); @@ -674,7 +682,7 @@ kwboot_mmap_image(const char *path, size_t *size) if (rc) goto out; - img = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0); + img = mmap(NULL, st.st_size, PROT_WRITE, MAP_PRIVATE, fd, 0); if (img == MAP_FAILED) { img = NULL; goto out; -- cgit v1.2.3 From 9cdfd7ab975fe367dcc3145b69aaae32f1ef16d3 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Wed, 28 Sep 2016 20:50:17 +0200 Subject: images: mvebu: don't generate uart images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit kwboot knows how to work with an image for a different boot medium now. So there is no reason to generate a dedicated UART image any more. Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- images/Makefile.mvebu | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/images/Makefile.mvebu b/images/Makefile.mvebu index 195f48d470..c925afd4a2 100644 --- a/images/Makefile.mvebu +++ b/images/Makefile.mvebu @@ -6,110 +6,81 @@ # ---------------------------------------------------------------- $(obj)/%.kwbimg: $(obj)/% FORCE $(call if_changed,kwb_image) -$(obj)/%.kwbuartimg: $(obj)/% FORCE - $(call if_changed,kwb_image) KWBOPTS = -c -d 0x1000000 -e 0x1000000 # ----------------------- Armada 370 based boards --------------------------- GLOBALSCALE_MIRABOX_KWBOPTS = ${KWBOPTS} -i $(board)/globalscale-mirabox/kwbimage.cfg OPTS_start_globalscale_mirabox.pblx.kwbimg = $(GLOBALSCALE_MIRABOX_KWBOPTS) -OPTS_start_globalscale_mirabox.pblx.kwbuartimg = -m uart $(GLOBALSCALE_MIRABOX_KWBOPTS) FILE_barebox-globalscale-mirabox.img = start_globalscale_mirabox.pblx.kwbimg -FILE_barebox-globalscale-mirabox-uart.img = start_globalscale_mirabox.pblx.kwbuartimg FILE_barebox-globalscale-mirabox-2nd.img = start_globalscale_mirabox.pblx pblx-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += start_globalscale_mirabox image-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += barebox-globalscale-mirabox.img -image-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += barebox-globalscale-mirabox-uart.img image-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += barebox-globalscale-mirabox-2nd.img NETGEAR_RN104_KWBOPTS = ${KWBOPTS} -i $(board)/netgear-rn104/kwbimage.cfg OPTS_start_netgear_rn104.pblx.kwbimg = $(NETGEAR_RN104_KWBOPTS) -OPTS_start_netgear_rn104.pblx.kwbuartimg = -m uart $(NETGEAR_RN104_KWBOPTS) FILE_barebox-netgear-rn104.img = start_netgear_rn104.pblx.kwbimg -FILE_barebox-netgear-rn104-uart.img = start_netgear_rn104.pblx.kwbuartimg FILE_barebox-netgear-rn104-2nd.img = start_netgear_rn104.pblx pblx-$(CONFIG_MACH_NETGEAR_RN104) += start_netgear_rn104 image-$(CONFIG_MACH_NETGEAR_RN104) += barebox-netgear-rn104.img -image-$(CONFIG_MACH_NETGEAR_RN104) += barebox-netgear-rn104-uart.img image-$(CONFIG_MACH_NETGEAR_RN104) += barebox-netgear-rn104-2nd.img # ----------------------- Armada XP based boards --------------------------- LENOVO_IX4_300D_KWBOPTS = ${KWBOPTS} -i $(board)/lenovo-ix4-300d/kwbimage.cfg OPTS_start_lenovo_ix4_300d.pblx.kwbimg = $(LENOVO_IX4_300D_KWBOPTS) -OPTS_start_lenovo_ix4_300d.pblx.kwbuartimg = -m uart $(LENOVO_IX4_300D_KWBOPTS) FILE_barebox-lenovo-ix4-300d.img = start_lenovo_ix4_300d.pblx.kwbimg -FILE_barebox-lenovo-ix4-300d-uart.img = start_lenovo_ix4_300d.pblx.kwbuartimg FILE_barebox-lenovo-ix4-300d-2nd.img = start_lenovo_ix4_300d.pblx pblx-$(CONFIG_MACH_LENOVO_IX4_300D) += start_lenovo_ix4_300d image-$(CONFIG_MACH_LENOVO_IX4_300D) += barebox-lenovo-ix4-300d.img -image-$(CONFIG_MACH_LENOVO_IX4_300D) += barebox-lenovo-ix4-300d-uart.img image-$(CONFIG_MACH_LENOVO_IX4_300D) += barebox-lenovo-ix4-300d-2nd.img MARVELL_ARMADA_XP_GP_KWBOPTS = ${KWBOPTS} -i $(board)/marvell-armada-xp-gp/kwbimage.cfg OPTS_start_marvell_armada_xp_gp.pblx.kwbimg = $(MARVELL_ARMADA_XP_GP_KWBOPTS) -OPTS_start_marvell_armada_xp_gp.pblx.kwbuartimg = -m uart $(MARVELL_ARMADA_XP_GP_KWBOPTS) FILE_barebox-marvell-armada-xp-gp.img = start_marvell_armada_xp_gp.pblx.kwbimg -FILE_barebox-marvell-armada-xp-gp-uart.img = start_marvell_armada_xp_gp.pblx.kwbuartimg FILE_barebox-marvell-armada-xp-gp-2nd.img = start_marvell_armada_xp_gp.pblx pblx-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += start_marvell_armada_xp_gp image-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += barebox-marvell-armada-xp-gp.img -image-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += barebox-marvell-armada-xp-gp-uart.img image-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += barebox-marvell-armada-xp-gp-2nd.img PLATHOME_OPENBLOCKS_AX3_KWBOPTS = ${KWBOPTS} -i $(board)/plathome-openblocks-ax3/kwbimage.cfg OPTS_start_plathome_openblocks_ax3.pblx.kwbimg = $(PLATHOME_OPENBLOCKS_AX3_KWBOPTS) -OPTS_start_plathome_openblocks_ax3.pblx.kwbuartimg = -m uart $(PLATHOME_OPENBLOCKS_AX3_KWBOPTS) FILE_barebox-plathome-openblocks-ax3.img = start_plathome_openblocks_ax3.pblx.kwbimg -FILE_barebox-plathome-openblocks-ax3-uart.img = start_plathome_openblocks_ax3.pblx.kwbuartimg FILE_barebox-plathome-openblocks-ax3-2nd.img = start_plathome_openblocks_ax3.pblx pblx-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3) += start_plathome_openblocks_ax3 image-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3) += barebox-plathome-openblocks-ax3.img -image-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3) += barebox-plathome-openblocks-ax3-uart.img image-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3) += barebox-plathome-openblocks-ax3-2nd.img # ----------------------- Dove 88AP510 based boards --------------------------- SOLIDRUN_CUBOX_KWBOPTS = ${KWBOPTS} -i $(board)/solidrun-cubox/kwbimage.cfg OPTS_start_solidrun_cubox.pblx.kwbimg = $(SOLIDRUN_CUBOX_KWBOPTS) -OPTS_start_solidrun_cubox.pblx.kwbuartimg = -m uart $(SOLIDRUN_CUBOX_KWBOPTS) FILE_barebox-solidrun-cubox.img = start_solidrun_cubox.pblx.kwbimg -FILE_barebox-solidrun-cubox-uart.img = start_solidrun_cubox.pblx.kwbuartimg FILE_barebox-solidrun-cubox-2nd.img = start_solidrun_cubox.pblx pblx-$(CONFIG_MACH_SOLIDRUN_CUBOX) += start_solidrun_cubox image-$(CONFIG_MACH_SOLIDRUN_CUBOX) += barebox-solidrun-cubox.img -image-$(CONFIG_MACH_SOLIDRUN_CUBOX) += barebox-solidrun-cubox-uart.img image-$(CONFIG_MACH_SOLIDRUN_CUBOX) += barebox-solidrun-cubox-2nd.img # ----------------------- Kirkwood based boards --------------------------- GLOBALSCALE_GURUPLUG_KWBOPTS = ${KWBOPTS} -i $(board)/globalscale-guruplug/kwbimage.cfg OPTS_start_globalscale_guruplug.pblx.kwbimg = $(GLOBALSCALE_GURUPLUG_KWBOPTS) -OPTS_start_globalscale_guruplug.pblx.kwbuartimg = -m uart $(GLOBALSCALE_GURUPLUG_KWBOPTS) FILE_barebox-globalscale-guruplug.img = start_globalscale_guruplug.pblx.kwbimg -FILE_barebox-globalscale-guruplug-uart.img = start_globalscale_guruplug.pblx.kwbuartimg FILE_barebox-globalscale-guruplug-2nd.img = start_globalscale_guruplug.pblx pblx-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += start_globalscale_guruplug image-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += barebox-globalscale-guruplug.img -image-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += barebox-globalscale-guruplug-uart.img image-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += barebox-globalscale-guruplug-2nd.img PLATHOME_OPENBLOCKS_A6_KWBOPTS = ${KWBOPTS} -i $(board)/plathome-openblocks-a6/kwbimage.cfg OPTS_start_plathome_openblocks_a6.pblx.kwbimg = $(PLATHOME_OPENBLOCKS_A6_KWBOPTS) -OPTS_start_plathome_openblocks_a6.pblx.kwbuartimg = -m uart $(PLATHOME_OPENBLOCKS_A6_KWBOPTS) FILE_barebox-plathome-openblocks-a6.img = start_plathome_openblocks_a6.pblx.kwbimg -FILE_barebox-plathome-openblocks-a6-uart.img = start_plathome_openblocks_a6.pblx.kwbuartimg FILE_barebox-plathome-openblocks-a6-2nd.img = start_plathome_openblocks_a6.pblx pblx-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_A6) += start_plathome_openblocks_a6 image-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_A6) += barebox-plathome-openblocks-a6.img -image-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_A6) += barebox-plathome-openblocks-a6-uart.img image-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_A6) += barebox-plathome-openblocks-a6-2nd.img USI_TOPKICK_KWBOPTS = ${KWBOPTS} -i $(board)/usi-topkick/kwbimage.cfg OPTS_start_usi_topkick.pblx.kwbimg = $(USI_TOPKICK_KWBOPTS) -OPTS_start_usi_topkick.pblx.kwbuartimg = -m uart $(USI_TOPKICK_KWBOPTS) FILE_barebox-usi-topkick.img = start_usi_topkick.pblx.kwbimg -FILE_barebox-usi-topkick-uart.img = start_usi_topkick.pblx.kwbuartimg FILE_barebox-usi-topkick-2nd.img = start_usi_topkick.pblx pblx-$(CONFIG_MACH_USI_TOPKICK) += start_usi_topkick image-$(CONFIG_MACH_USI_TOPKICK) += barebox-usi-topkick.img -image-$(CONFIG_MACH_USI_TOPKICK) += barebox-usi-topkick-uart.img image-$(CONFIG_MACH_USI_TOPKICK) += barebox-usi-topkick-2nd.img -- cgit v1.2.3 From 44eeb85eb185bf040024b39161cc938c88058025 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Wed, 28 Sep 2016 21:51:00 +0200 Subject: pinctrl: mvebu: add newline to error message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- drivers/pinctrl/mvebu/common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/mvebu/common.c b/drivers/pinctrl/mvebu/common.c index 5327052867..ae16b39268 100644 --- a/drivers/pinctrl/mvebu/common.c +++ b/drivers/pinctrl/mvebu/common.c @@ -78,7 +78,8 @@ static int mvebu_pinctrl_set_state(struct pinctrl_device *pdev, set = mvebu_pinctrl_find_setting_by_name(pctl, mode, function); if (!set) { - dev_err(pdev->dev, "unsupported function %s on pin %s", + dev_err(pdev->dev, + "unsupported function %s on pin %s\n", function, group); continue; } -- cgit v1.2.3 From 8aed8106c2ec4d943f5549b44539c27c09367d1c Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Tue, 4 Oct 2016 09:06:33 +0200 Subject: pinctrl: mvebu: armada-370 fix gpio name for mpp63 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was found that pin 63 also works as input and so the respective function is renamed from "gpo" to "gpio". The respective commit in Linux is: a526973e0291 ("pinctrl: mvebu: Fix mapping of pin 63 (gpo -> gpio)") which appeared in v4.1-rc3. The devicetrees are fixed accordingly since commit ce5cad51f381 ("ARM: dts: armada-370: Update the mpp63 function in the device tree on Armada 370") which appeared in v4.6-rc1. This fixes a runtime warning on the affected machines (globalscale-mirabox and netgear-rn104) and makes the pin functional again. Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- drivers/pinctrl/mvebu/armada-370.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/mvebu/armada-370.c b/drivers/pinctrl/mvebu/armada-370.c index 1c79bd62af..c2c1a0fa63 100644 --- a/drivers/pinctrl/mvebu/armada-370.c +++ b/drivers/pinctrl/mvebu/armada-370.c @@ -362,7 +362,7 @@ static struct mvebu_mpp_mode mv88f6710_mpp_modes[] = { MPP_FUNCTION(0x5, "audio", "mclk"), MPP_FUNCTION(0x6, "uart0", "cts")), MPP_MODE(63, "mpp63", armada_370_mpp_ctrl, - MPP_FUNCTION(0x0, "gpo", NULL), + MPP_FUNCTION(0x0, "gpio", NULL), MPP_FUNCTION(0x1, "spi0", "sck"), MPP_FUNCTION(0x2, "tclk", NULL)), MPP_MODE(64, "mpp64", armada_370_mpp_ctrl, -- cgit v1.2.3 From 81cabf127479e1bc8ce0cc294a19ce78d416c3ec Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Tue, 4 Oct 2016 21:13:05 +0200 Subject: ARM: mvebu: add support for Netgear RN2120 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- arch/arm/boards/Makefile | 1 + arch/arm/boards/netgear-rn2120/Makefile | 2 + arch/arm/boards/netgear-rn2120/board.c | 88 +++++++++++++++++++++++++++++ arch/arm/boards/netgear-rn2120/kwbimage.cfg | 7 +++ arch/arm/boards/netgear-rn2120/lowlevel.c | 41 ++++++++++++++ arch/arm/dts/Makefile | 1 + arch/arm/dts/armada-xp-rn2120-bb.dts | 11 ++++ arch/arm/mach-mvebu/Kconfig | 4 ++ images/Makefile.mvebu | 8 +++ 9 files changed, 163 insertions(+) create mode 100644 arch/arm/boards/netgear-rn2120/Makefile create mode 100644 arch/arm/boards/netgear-rn2120/board.c create mode 100644 arch/arm/boards/netgear-rn2120/kwbimage.cfg create mode 100644 arch/arm/boards/netgear-rn2120/lowlevel.c create mode 100644 arch/arm/dts/armada-xp-rn2120-bb.dts diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile index 23a8dbd7d0..b911d0357b 100644 --- a/arch/arm/boards/Makefile +++ b/arch/arm/boards/Makefile @@ -72,6 +72,7 @@ obj-$(CONFIG_MACH_MX28EVK) += freescale-mx28-evk/ obj-$(CONFIG_MACH_MX31MOBOARD) += mx31moboard/ obj-$(CONFIG_MACH_NESO) += guf-neso/ obj-$(CONFIG_MACH_NETGEAR_RN104) += netgear-rn104/ +obj-$(CONFIG_MACH_NETGEAR_RN2120) += netgear-rn2120/ obj-$(CONFIG_MACH_NOMADIK_8815NHK) += nhk8815/ obj-$(CONFIG_MACH_NVIDIA_BEAVER) += nvidia-beaver/ obj-$(CONFIG_MACH_NVIDIA_JETSON) += nvidia-jetson-tk1/ diff --git a/arch/arm/boards/netgear-rn2120/Makefile b/arch/arm/boards/netgear-rn2120/Makefile new file mode 100644 index 0000000000..01c7a259e9 --- /dev/null +++ b/arch/arm/boards/netgear-rn2120/Makefile @@ -0,0 +1,2 @@ +obj-y += board.o +lwl-y += lowlevel.o diff --git a/arch/arm/boards/netgear-rn2120/board.c b/arch/arm/boards/netgear-rn2120/board.c new file mode 100644 index 0000000000..caf106af50 --- /dev/null +++ b/arch/arm/boards/netgear-rn2120/board.c @@ -0,0 +1,88 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +static int rn2120_init(void) +{ + /* + * This is the machine type that the kernel shipped by Netgear is using. + * It's wrong but a given fact. + */ + armlinux_set_architecture(MACH_TYPE_ARMADA_XP_DB); + + return 0; +} +device_initcall(rn2120_init); + +struct hdpower { + unsigned gpio_detect; + unsigned gpio_power; + unsigned gpio_led; +}; + +/* + * It would be nice to have this abstracted in the device tree, but currently + * this isn't the case. + */ +static struct hdpower rn2120_hdpower[] = { + { + /* sata 1 */ + .gpio_detect = 32, + .gpio_power = 24, + .gpio_led = 31, + }, { + /* sata 2 */ + .gpio_detect = 33, + .gpio_power = 25, + .gpio_led = 40, + }, { + /* sata 3 */ + .gpio_detect = 34, + .gpio_power = 26, + .gpio_led = 44, + }, { + /* sata 4 */ + .gpio_detect = 35, + .gpio_power = 28, + .gpio_led = 47, + }, +}; + +static int rn2120_hddetect(void) +{ + int i; + + if (!of_machine_is_compatible("netgear,readynas-2120")) + return 0; + + for (i = 0; i < ARRAY_SIZE(rn2120_hdpower); ++i) { + int ret; + ret = gpio_direction_input(rn2120_hdpower[i].gpio_detect); + if (ret) { + pr_err("Failure to detect hd%d (%d)\n", i, ret); + continue; + } + + ret = gpio_get_value(rn2120_hdpower[i].gpio_detect); + if (ret) { + /* no disk present */ + gpio_direction_output(rn2120_hdpower[i].gpio_power, 0); + } else { + pr_info("Detected presence of disk #%d\n", i + 1); + /* make a pause after powering up 2 disks */ + if (i && !(i & 1)) { + pr_info("Delay power up\n"); + mdelay(7000); + } + + gpio_direction_output(rn2120_hdpower[i].gpio_power, 1); + } + } + return 0; +} +device_initcall(rn2120_hddetect); diff --git a/arch/arm/boards/netgear-rn2120/kwbimage.cfg b/arch/arm/boards/netgear-rn2120/kwbimage.cfg new file mode 100644 index 0000000000..a6f0aa6d3d --- /dev/null +++ b/arch/arm/boards/netgear-rn2120/kwbimage.cfg @@ -0,0 +1,7 @@ +VERSION 1 +BOOT_FROM nand +DESTADDR 00000000 +EXECADDR 00000000 +NAND_BLKSZ 00020000 +NAND_BADBLK_LOCATION 01 +BINARY binary.0 0000005b 00000068 diff --git a/arch/arm/boards/netgear-rn2120/lowlevel.c b/arch/arm/boards/netgear-rn2120/lowlevel.c new file mode 100644 index 0000000000..29c8b43c44 --- /dev/null +++ b/arch/arm/boards/netgear-rn2120/lowlevel.c @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2015 Pengutronix, Uwe Kleine-König + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include +#include + +extern char __dtb_armada_xp_rn2120_bb_start[]; + +ENTRY_FUNCTION(start_netgear_rn2120, r0, r1, r2) +{ + void *fdt; + + arm_cpu_lowlevel_init(); + + /* + * This is necessary to allow the machine to draw more power. Probably + * connected to a TI TPS65251. Without this resetting a phy makes the + * SoC reset. + * This is effectively gpio_direction_output(42, 1); + */ + writel((1 << 10) | readl((void *)0xd0018140), (void *)0xd0018140); + writel(~(1 << 10) & readl((void *)0xd0018144), (void *)0xd0018144); + + fdt = __dtb_armada_xp_rn2120_bb_start - + get_runtime_offset(); + + mvebu_barebox_entry(fdt); +} diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index d1a3fe8ae8..77f20d60d9 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -29,6 +29,7 @@ pbl-dtb-$(CONFIG_MACH_GW_VENTANA) += imx6q-gw54xx.dtb.o pbl-dtb-$(CONFIG_MACH_LENOVO_IX4_300D) += armada-xp-lenovo-ix4-300d-bb.dtb.o pbl-dtb-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += armada-xp-gp-bb.dtb.o pbl-dtb-$(CONFIG_MACH_NETGEAR_RN104) += armada-370-rn104-bb.dtb.o +pbl-dtb-$(CONFIG_MACH_NETGEAR_RN2120) += armada-xp-rn2120-bb.dtb.o pbl-dtb-$(CONFIG_MACH_NITROGEN6) += imx6q-nitrogen6x.dtb.o imx6dl-nitrogen6x.dtb.o imx6qp-nitrogen6_max.dtb.o pbl-dtb-$(CONFIG_MACH_NVIDIA_BEAVER) += tegra30-beaver.dtb.o pbl-dtb-$(CONFIG_MACH_NVIDIA_JETSON) += tegra124-jetson-tk1.dtb.o diff --git a/arch/arm/dts/armada-xp-rn2120-bb.dts b/arch/arm/dts/armada-xp-rn2120-bb.dts new file mode 100644 index 0000000000..969136b336 --- /dev/null +++ b/arch/arm/dts/armada-xp-rn2120-bb.dts @@ -0,0 +1,11 @@ +/* + * Barebox specific DT overlay for Netgear ReadyNAS 2120 + */ + +#include "arm/armada-xp-netgear-rn2120.dts" + +/ { + chosen { + stdout-path = "/soc/internal-regs/serial@12000"; + }; +}; diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 79fcc8d3ac..148b4f6d4c 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -55,6 +55,10 @@ config MACH_MARVELL_ARMADA_XP_GP bool "Marvell Armada XP GP" select ARCH_ARMADA_XP +config MACH_NETGEAR_RN2120 + bool "Netgear ReadyNAS 2120" + select ARCH_ARMADA_XP + config MACH_PLATHOME_OPENBLOCKS_AX3 bool "PlatHome OpenBlocks AX3" select ARCH_ARMADA_XP diff --git a/images/Makefile.mvebu b/images/Makefile.mvebu index c925afd4a2..b57291cbaf 100644 --- a/images/Makefile.mvebu +++ b/images/Makefile.mvebu @@ -43,6 +43,14 @@ pblx-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += start_marvell_armada_xp_gp image-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += barebox-marvell-armada-xp-gp.img image-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += barebox-marvell-armada-xp-gp-2nd.img +NETGEAR_RN2120_KWBOPTS = ${KWBOPTS} -i $(board)/netgear-rn2120/kwbimage.cfg +OPTS_start_netgear_rn2120.pblx.kwbimg = $(NETGEAR_RN2120_KWBOPTS) +FILE_barebox-netgear-rn2120.img = start_netgear_rn2120.pblx.kwbimg +FILE_barebox-netgear-rn2120-2nd.img = start_netgear_rn2120.pblx +pblx-$(CONFIG_MACH_NETGEAR_RN2120) += start_netgear_rn2120 +image-$(CONFIG_MACH_NETGEAR_RN2120) += barebox-netgear-rn2120.img +image-$(CONFIG_MACH_NETGEAR_RN2120) += barebox-netgear-rn2120-2nd.img + PLATHOME_OPENBLOCKS_AX3_KWBOPTS = ${KWBOPTS} -i $(board)/plathome-openblocks-ax3/kwbimage.cfg OPTS_start_plathome_openblocks_ax3.pblx.kwbimg = $(PLATHOME_OPENBLOCKS_AX3_KWBOPTS) FILE_barebox-plathome-openblocks-ax3.img = start_plathome_openblocks_ax3.pblx.kwbimg -- cgit v1.2.3 From d66e242213320a4fed9960eee0ecc870a9e4c616 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Tue, 4 Oct 2016 21:13:06 +0200 Subject: ARM: mvebu: document some general mvebu stuff and the rn2120 board MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- Documentation/boards/mvebu.rst | 50 ++++++++++++++++++++++ .../boards/mvebu/Netgear-ReadyNAS-2120.rst | 19 ++++++++ 2 files changed, 69 insertions(+) create mode 100644 Documentation/boards/mvebu.rst create mode 100644 Documentation/boards/mvebu/Netgear-ReadyNAS-2120.rst diff --git a/Documentation/boards/mvebu.rst b/Documentation/boards/mvebu.rst new file mode 100644 index 0000000000..b4f8e6043d --- /dev/null +++ b/Documentation/boards/mvebu.rst @@ -0,0 +1,50 @@ +Marvell Embedded Business Unit (mvebu) +====================================== + +Move of the Register Window +--------------------------- + +When an mvebu SoC comes up the internal registers are mapped at 0xd0000000 in +the address space. To make it possible to have more than 3.25 GiB of continuous +RAM in Linux this window is moved to 0xf1000000. +Unfortunately the register to configure the location of the registers is located +in this window, so there is no way to determine the location afterwards. + +RAM initialisation +------------------ + +Traditionally the RAM initialisation happens with a binary blob that have to be +extracted from the vendor U-Boot:: + + scripts/kwbimage -x -i /dev/mtdblock0 -o . + +This creates among others a file "binary.0" that has to be put into the board +directory. For license reasons this is usually not included in the barebox +repository. + +Note that in the meantime U-Boot has open source code to do the RAM +initialisation that could be taken. + +Booting second stage +-------------------- + +This is currently not possible because barebox assumes the registers are mapped +at 0xd0000000 as is the case when the boot ROM gives control to the bootloader. + +Booting from UART +----------------- + +The mvebu SoCs support booting from UART. For this there is a tool available in +barebox called kwboot. + +mvebu boards +------------ + +Not all supported boards have a description here. + +.. toctree:: + :glob: + :numbered: + :maxdepth: 1 + + mvebu/* diff --git a/Documentation/boards/mvebu/Netgear-ReadyNAS-2120.rst b/Documentation/boards/mvebu/Netgear-ReadyNAS-2120.rst new file mode 100644 index 0000000000..5bee03af9d --- /dev/null +++ b/Documentation/boards/mvebu/Netgear-ReadyNAS-2120.rst @@ -0,0 +1,19 @@ +Netgear ReadyNAS 2120 +===================== + +This is a rack mountable 4 bay NAS using an Armada XP dual-core processor. + +UART booting +------------ + +The first UART hides behind a sticker on 4 pins. + +The machine seems to do two resets at power on which makes UART booting hard. A +trick to work around this is:: + + scripts/kwboot -d /dev/ttyUSB0; kwboot -b images/barebox-netgear-rn2120.img -t /dev/ttyUSB0 + +This way the first window in which the CPU accepts the magic string is taken by +the first invokation which blocks until the second reset happens. The second +window is then hit with the image to boot. This is not 100% reliable but works +most of the time. -- cgit v1.2.3