Re: [PATCH 8/8] barebox remote control: Documentation

2016-01-18 Thread Sascha Hauer
Hi Andrey,

On Sun, Jan 17, 2016 at 05:16:02PM -0800, Andrey Smirnov wrote:
> I'd like to suggest following additions to this patch

Thanks for the fixups. I integrated your additions/suggestions into the
RATP branch. See -next for the result. I also fixed the compile breakage
with CONFIG_RATP disabled.

Sascha

-- 
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- |

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


Re: [PATCH 6/8] host side for barebox remote control

2016-01-18 Thread Jan Lübbe
On So, 2016-01-17 at 17:07 -0800, Andrey Smirnov wrote:
> >
> > Signed-off-by: Jan Lübbe 
> > Signed-off-by: Sascha Hauer 
> 
> With fixes above,
> 
> Tested-by: Andrey Smirnov 

These fixes look fine,

Acked-by: Jan Lübbe 
-- 
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- |


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


[RFC] usb: port UHCI driver from the u-boot

2016-01-18 Thread pmamonov
From: Peter Mamonov 

Here is a UHCI driver ported from the u-boot.
There are a few pending FIXMEs, but the driver should work.

Can anyone test it?

BINDING:
uhci: uhci@ {
compatible = "generic-uhci";
reg = <0x 0x200>;

/* specify companion EHCI controller if any */
companion = <>;
};

Signed-off-by: Peter Mamonov 
---
 drivers/usb/host/Kconfig|4 +
 drivers/usb/host/Makefile   |1 +
 drivers/usb/host/uhci-hcd.c | 1336 +++
 drivers/usb/host/uhci-hcd.h |  165 ++
 4 files changed, 1506 insertions(+)
 create mode 100644 drivers/usb/host/uhci-hcd.c
 create mode 100644 drivers/usb/host/uhci-hcd.h

diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 54eaf46..61d981e 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -1,3 +1,7 @@
+config USB_UHCI
+   bool "UHCI driver"
+   depends on HAS_DMA
+
 config USB_EHCI
bool "EHCI driver"
depends on HAS_DMA
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index 0478d34..628ba61 100644
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
@@ -1,3 +1,4 @@
+obj-$(CONFIG_USB_UHCI) += uhci-hcd.o
 obj-$(CONFIG_USB_EHCI) += ehci-hcd.o
 obj-$(CONFIG_USB_EHCI_OMAP)+= ehci-omap.o
 obj-$(CONFIG_USB_EHCI_ATMEL)   += ehci-atmel.o
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
new file mode 100644
index 000..cabd783
--- /dev/null
+++ b/drivers/usb/host/uhci-hcd.c
@@ -0,0 +1,1336 @@
+/*
+ * Part of this code has been derived from linux:
+ * Universal Host Controller Interface driver for USB (take II).
+ *
+ * (c) 1999-2001 Georg Acher, ac...@in.tum.de (executive slave) (base guitar)
+ *   Deti Fliegl, d...@fliegl.de (executive slave) (lead voice)
+ *   Thomas Sailer, sai...@ife.ee.ethz.ch (chief consultant) (cheer
+ *   leader)
+ *   Roman Weissgaerber, wei...@vienna.at (virt root hub) (studio
+ *   porter)
+ * (c) 2000  Yggdrasil Computing, Inc. (port of new PCI interface support
+ *   from usb-ohci.c by Adam Richter, a...@yggdrasil.com).
+ * (C) 2000  David Brownell, davi...@pacbell.net (usb-ohci.c)
+ *
+ * HW-initalization based on material of
+ *
+ * (C) Copyright 1999 Linus Torvalds
+ * (C) Copyright 1999 Johannes Erdfelt
+ * (C) Copyright 1999 Randy Dunlap
+ * (C) Copyright 1999 Gregory P. Smith
+ *
+ *
+ * Adapted for U-Boot:
+ * (C) Copyright 2001 Denis Peter, MPL AG Switzerland
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+/**
+ * How it works:
+ * -
+ * The framelist / Transfer descriptor / Queue Heads are similar like
+ * in the linux usb_uhci.c.
+ *
+ * During initialization, the following skeleton is allocated in init_skel:
+ *
+ * framespecific   |   common chain
+ *
+ * framelist[]
+ * [  0 ]-> TD -\
+ * [  1 ]-> TD --> TD --> QH ---> QH ---> QH ---> NULL
+ *   ...TD -/
+ * [1023]-> TD /
+ *
+ *  ^^ ^^ ^^  ^^  ^^
+ *  7 TDs for  1 TD for   Start ofStart ofEnd Chain
+ *  INT (2-128ms)  1ms-INTCTRL Chain  BULK Chain
+ *
+ *
+ * Since this is a bootloader, the isochronous transfer descriptor have been
+ * removed.
+ *
+ * Interrupt Transfers.
+ * 
+ * For Interrupt transfers USB_MAX_TEMP_INT_TD Transfer descriptor are
+ * available. They will be inserted after the appropriate (depending the
+ * interval setting) skeleton TD.  If an interrupt has been detected the
+ * dev->irqhandler is called. The status and number of transfered bytes is
+ * stored in dev->irq_status resp. dev->irq_act_len. If the dev->irqhandler
+ * returns 0, the interrupt TD is removed and disabled. If an 1 is returned, 
the
+ * interrupt TD will be reactivated.
+ *
+ * Control Transfers
+ * -
+ * Control Transfers are issued by filling the tmp_td with the appropriate data
+ * and connect them to the qh_cntrl queue header. Before other control/bulk
+ * transfers can be issued, the programm has to wait for completion. This does
+ * not allows asynchronous data transfer.
+ *
+ * Bulk Transfers
+ * --
+ * Bulk Transfers are issued by filling the tmp_td with the appropriate data 
and
+ * connect them to the qh_bulk queue header. Before other control/bulk 
transfers
+ * can be issued, the programm has to wait for completion. This does not allows
+ * asynchronous data transfer.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "uhci-hcd.h"
+
+/* number of temporary TDs for bulk and control transfers */
+#define USB_MAX_TEMP_TD  128
+/* number of temporary TDs for 

Re: [PATCH] ARM: PXA: move HAVE_CLK select

2016-01-18 Thread Sascha Hauer
On Mon, Jan 18, 2016 at 11:19:20AM +0100, Lucas Stach wrote:
> Claiming that all of PXA has CLK implemented, while only PXA3XX
> selects the relevant clock implementations causes lots of build
> failures for the other PXA architectures.

I can't see any build failures here. which config/branch are you using?

Sascha

-- 
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- |

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


[PATCH] bootm: Add option to force booting signed images

2016-01-18 Thread Sascha Hauer
With CONFIG_BOOTM_FORCE_SIGNED_IMAGES the bootm code will refuse to boot
unsigned images. Since currently FIT is the only image type which
supports signing this means we with this option we enforce using FIT
images. All additionally passed in device trees and initrds will be
ignored so that only the ones from the FIT image can be used.

Signed-off-by: Sascha Hauer 
---
 common/bootm.c | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/common/bootm.c b/common/bootm.c
index d8acff8..3efc17e 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -68,8 +68,10 @@ enum bootm_verify bootm_get_verify_mode(void)
 }
 
 static const char * const bootm_verify_names[] = {
+#ifndef CONFIG_BOOTM_FORCE_SIGNED_IMAGES
[BOOTM_VERIFY_NONE] = "none",
[BOOTM_VERIFY_HASH] = "hash",
+#endif
[BOOTM_VERIFY_SIGNATURE] = "signature",
 };
 
@@ -526,6 +528,23 @@ int bootm_boot(struct bootm_data *bootm_data)
goto err_out;
}
 
+   if (IS_ENABLED(CONFIG_BOOTM_FORCE_SIGNED_IMAGES))
+   data->verify = BOOTM_VERIFY_SIGNATURE;
+
+   /*
+* When we only allow booting signed images make sure everything
+* we boot is in the OS image and not given separately.
+*/
+   data->oftree = NULL;
+   data->oftree_file = NULL;
+   data->initrd_file = NULL;
+   if (os_type != filetype_oftree) {
+   printf("Signed boot and image is no FIT image, 
aborting\n");
+   ret = -EINVAL;
+   goto err_out;
+   }
+   }
+
if (IS_ENABLED(CONFIG_FITIMAGE) && os_type == filetype_oftree) {
struct fit_handle *fit;
 
-- 
2.7.0.rc3


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