[U-Boot] [PATCH 00/13] dm: arm: zynq: Convert serial driver to driver model

Simon Glass sjg at chromium.org
Sat Sep 5 01:40:52 CEST 2015


Hi Michal,

On 3 September 2015 at 23:53, Michal Simek <monstr at monstr.eu> wrote:
>
> On 09/02/2015 04:05 PM, Simon Glass wrote:
> > Hi Michael,
> >
> > On 1 September 2015 at 11:50, Michal Simek <monstr at monstr.eu> wrote:
> >> On 09/01/2015 07:41 PM, Michal Simek wrote:
> >>> On 09/01/2015 01:12 AM, Simon Glass wrote:
> >>>> Hi Michal,
> >>>>
> >>>> On 31 August 2015 at 08:11, Michal Simek <monstr at monstr.eu> wrote:
> >>>>> On 08/29/2015 05:10 PM, Simon Glass wrote:
> >>>>>> This series updates the Zynq serial driver to use driver model. Along the
> >>>>>> way several problems are fixed:
> >>>>>>
> >>>>>> - Support for /chosen/stdout-path using an alias
> >>>>>> - Fix to fdtgrep which is currently breaking alias building
> >>>>>> - Avoid building u-boot-spl-dtb.bin when it is not requested
> >>>>>> - Deal with boards which have BSS in SDRAM
> >>>>>>
> >>>>>> For zynq this series makes a few changes:
> >>>>>> - Use the new SPL init procedure, which just involves a few tweaks for zynq
> >>>>>> - Add debug UART support
> >>>>>> - Move to using a separate device tree instead of embedded
> >>>>>>
> >>>>>> Only zybo has been tested. Testing on other zynq boards is welcome. They are
> >>>>>> all set up roughly the same so I expect only minor problems.
> >>>>>>
> >>>>>> For some reason zynqmp does not have a device tree, so this series does not
> >>>>>> work on that. But that board fails to build on mainline for me anyway so
> >>>>>> perhaps nothing is lost. I don't have a board to test with so help on this
> >>>>>> would be appreciated!
> >>>>>
> >>>>> I have no problem to build zynqmp on my PC. Can you please c&p error
> >>>>> which you are getting?
> >>>>
> >>>> I get this:
> >>>>
> >>>> $ buildman zynqmp
> >>>> Building current source for 1 boards (1 thread, 32 jobs per thread)
> >>>>    aarch64:  +   xilinx_zynqmp_ep
> >>>> +      ((u32)(priv->rxbuffers) +
> >>>> +       ^
> >>>> +   writel((u32)priv->rx_bd, &regs->rxqbase);
> >>>> +          ^
> >>>> +arch/arm/include/asm/io.h:146:34: note: in definition of macro 'writel'
> >>>> + #define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v; })
> >>>> +                                  ^
> >>>> +  writel((u32)priv->tx_bd, &regs->txqbase);
> >>>> +         ^
> >>>> +  priv->tx_bd->addr = (u32)ptr;
> >>>> +                      ^
> >>>> +  addr = (u32) ptr;
> >>>> +  addr = (u32)priv->rxbuffers;
> >>>> +   net_process_received_packet((u8 *)addr, frame_len);
> >>>> +                               ^
> >>>> +  priv->rx_bd = (struct emac_bd *)((u32)bd_space + BD_SEPRN_SPACE);
> >>>> +                                   ^
> >>>> +                ^
> >>>> +  dwc3_flush_cache((int)trb, sizeof(*trb));
> >>>> +                   ^
> >>>> +  dma_unmap_single((void *)dwc->scratch_addr, dwc->nr_scratch *
> >>>> +  dma_unmap_single((void *)req->dma, req->length,
> >>>> +    dwc3_flush_cache((int)trb, sizeof(*trb));
> >>>> +                     ^
> >>>> +   dwc3_flush_cache((int)dwc->ep0_bounce, DWC3_EP0_BOUNCE_SIZE);
> >>>> +                    ^
> >>>> +  dwc->regs = (int *)(dwc3_dev->base + DWC3_GLOBALS_REGS_START);
> >>>> +              ^
> >>>> +  debug("%s: dev->in_req->length:%d to_cpy:%d\n", __func__,
> >>>> +  ^
> >>>> +    dwc3_flush_cache((int)evt->buf, evt->length);
> >>>> w+drivers/net/zynq_gem.c: In function 'zynq_gem_init':
> >>>> w+drivers/net/zynq_gem.c:330:7: warning: cast from pointer to integer
> >>>> of different size [-Wpointer-to-int-cast]
> >>>> w+In file included from drivers/net/zynq_gem.c:19:0:
> >>>> w+drivers/net/zynq_gem.c:336:10: warning: cast from pointer to integer
> >>>> of different size [-Wpointer-to-int-cast]
> >>>> w+drivers/net/zynq_gem.c: In function 'zynq_gem_send':
> >>>> w+drivers/net/zynq_gem.c:399:9: warning: cast from pointer to integer
> >>>> of different size [-Wpointer-to-int-cast]
> >>>> w+drivers/net/zynq_gem.c:404:22: warning: cast from pointer to integer
> >>>> of different size [-Wpointer-to-int-cast]
> >>>> w+drivers/net/zynq_gem.c:409:9: warning: cast from pointer to integer
> >>>> of different size [-Wpointer-to-int-cast]
> >>>> w+drivers/net/zynq_gem.c:414:9: warning: cast from pointer to integer
> >>>> of different size [-Wpointer-to-int-cast]
> >>>> w+drivers/net/zynq_gem.c: In function 'zynq_gem_recv':
> >>>> w+drivers/net/zynq_gem.c:454:31: warning: cast to pointer from integer
> >>>> of different size [-Wint-to-pointer-cast]
> >>>> w+drivers/net/zynq_gem.c: In function 'zynq_gem_initialize':
> >>>> w+drivers/net/zynq_gem.c:533:35: warning: cast from pointer to integer
> >>>> of different size [-Wpointer-to-int-cast]
> >>>> w+drivers/net/zynq_gem.c:533:16: warning: cast to pointer from integer
> >>>> of different size [-Wint-to-pointer-cast]
> >>>> w+drivers/usb/dwc3/ep0.c: In function 'dwc3_ep0_start_trans':
> >>>> w+drivers/usb/dwc3/ep0.c:85:19: warning: cast from pointer to integer
> >>>> of different size [-Wpointer-to-int-cast]
> >>>> w+drivers/usb/dwc3/core.c: In function 'dwc3_setup_scratch_buffers':
> >>>> w+drivers/usb/dwc3/core.c:284:19: warning: cast to pointer from
> >>>> integer of different size [-Wint-to-pointer-cast]
> >>>> w+drivers/usb/dwc3/core.c: In function 'dwc3_free_scratch_buffers':
> >>>> w+drivers/usb/dwc3/core.c:299:19: warning: cast to pointer from
> >>>> integer of different size [-Wint-to-pointer-cast]
> >>>> w+drivers/usb/gadget/udc/udc-core.c: In function 'usb_gadget_unmap_request':
> >>>> w+drivers/usb/gadget/udc/udc-core.c:68:19: warning: cast to pointer
> >>>> from integer of different size [-Wint-to-pointer-cast]
> >>>> w+drivers/usb/dwc3/ep0.c: In function 'dwc3_ep0_complete_data':
> >>>> w+drivers/usb/dwc3/ep0.c:793:19: warning: cast from pointer to integer
> >>>> of different size [-Wpointer-to-int-cast]
> >>>> w+drivers/usb/dwc3/ep0.c:824:21: warning: cast from pointer to integer
> >>>> of different size [-Wpointer-to-int-cast]
> >>>> w+drivers/usb/dwc3/ep0.c:834:20: warning: cast from pointer to integer
> >>>> of different size [-Wpointer-to-int-cast]
> >>>> w+drivers/usb/dwc3/core.c: In function 'dwc3_uboot_init':
> >>>> w+drivers/usb/dwc3/core.c:632:14: warning: cast to pointer from
> >>>> integer of different size [-Wint-to-pointer-cast]
> >>>> w+drivers/usb/dwc3/gadget.c: In function 'dwc3_prepare_one_trb':
> >>>> w+drivers/usb/dwc3/gadget.c:775:19: warning: cast from pointer to
> >>>> integer of different size [-Wpointer-to-int-cast]
> >>>> w+drivers/usb/dwc3/gadget.c: In function 'dwc3_cleanup_done_reqs':
> >>>> w+drivers/usb/dwc3/gadget.c:1772:19: warning: cast from pointer to
> >>>> integer of different size [-Wpointer-to-int-cast]
> >>>> w+drivers/usb/gadget/f_thor.c: In function 'thor_tx_data':
> >>>> w+drivers/usb/gadget/f_thor.c:568:2: warning: format '%d' expects
> >>>> argument of type 'int', but argument 4 has type 'long unsigned int'
> >>>> [-Wformat=]
> >>>> w+drivers/usb/dwc3/gadget.c: In function 'dwc3_gadget_uboot_handle_interrupt':
> >>>> w+drivers/usb/dwc3/gadget.c:2673:21: warning: cast from pointer to
> >>>> integer of different size [-Wpointer-to-int-cast]
> >>>>     0    1    0 /1      xilinx_zynqmp_ep
> >>>>
> >>>
> >>> Here are step for running qemu.
> >>>
> >>> git clone git://git.qemu.org/qemu.git
> >>> cd qemu
> >>> git submodule update --init pixman
> >>> ./configure --target-list=aarch64-softmmu --disable-werror
> >>>
> >>> ./aarch64-softmmu/qemu-system-aarch64 -M xlnx-ep108 -display none
> >>> -kernel /mnt/disk/u-boot/u-boot.elf -m 8000000 -nographic -serial mon:stdio
> >>>
> >>> Please try and you will see.
> >>>
> >>> I have ZynqMP Serial DM. Will send patches tmr.
> >>
> >> One more thing I forget is that for that get up and running I had to
> >> cherry-pick your reverted patch
> >> "fdt: Fix fdtdec_get_addr_size() for 64-bit"
> >> (sha1: 6fd4307bd55ba0e216770bdf362d2ce5f37a2311) because zynqmp is using
> >> address-cells 2 and size cells 1 which is not covered in the current HEAD.
> >
> > OK thanks for the info.
> >
> > Do you have patches to move zynqmp to device tree? That would be a
> > prerequisite for any patches I send.
>
> Did you see my previous email I sent? There is link to the repo with
> that patches.

Yes I see. That works for me, thanks.

I've pushed an updated tree to u-boot-dm/zynq-working. Please take a
look and see what you think. I'll send out patches once I hear from
you.

Unfortunately the revert you need is not the way I want to go. Instead
I'd like to apply this patch:

http://patchwork.ozlabs.org/patch/504918/

It breaks on zynqmp, so if you can figure out why that would be very
helpful. It seems to work OK on other platforms I have tested.

Regards,
Simon


More information about the U-Boot mailing list