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

Michal Simek
2015-09-01T17:50:34Z

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

Thanks,
Michal

--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150901/c961ba05/attachment.sig>