On Fri, 2014-11-07 at 20:46 +0100, Hans de Goede wrote:
> From: Oliver Schinagl <oli...@schinagl.nl>
> 
> The A31 uses a new push-pull two wire interface, which features higher
> transfer speeds (upto 6 MHz) in theory. While the hardware can burst 8
> bytes each time, this driver will only see very little use and thus is
> limited to single byte transmission only.
> 
> Signed-off-by: Oliver Schinagl <oli...@schinagl.nl>
> Signed-off-by: Hans de Goede <hdego...@redhat.com>

Acked-by: Ian Campbell <i...@hellion.org.uk>

One question:
> +int p2wi_change_to_p2wi_mode(u8 slave_addr, u8 ctrl_reg, u8 init_data)
> +{
> +     struct sunxi_p2wi_reg *p2wi = (struct sunxi_p2wi_reg *)SUNXI_P2WI_BASE;
> +     unsigned long tmo = timer_get_us() + 1000000;
> +
> +     writel(P2WI_PM_DEV_ADDR(slave_addr) |
> +            P2WI_PM_CTRL_ADDR(ctrl_reg) |
> +            P2WI_PM_INIT_DATA(init_data) |
> +            P2WI_PM_INIT_SEND,
> +            &p2wi->pm);
> +
> +     while ((readl(&p2wi->pm) & P2WI_PM_INIT_SEND)) {
> +             if (timer_get_us() > tmo)
> +                     return -EFAULT;

You don't mean ETIME(DOUT) or something here, do you? EFAULT seems a bit
odd.

Ian.

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to