Re: [PATCHv2] serial: xuartps: Get rid of register access macros.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Sören:

> > Get rid of cdns_uart_readl() and cdns_uart_writel() and just call
> > readl() and writel() directly.
> 
> I don't know whether there are any ramifications from migrating from
> io(read|write) to (read|write)l. For most use-cases I assume it is fine.
> But there are some folks plugging Zynq platforms into their x86(_64) 
PCIe
> slots and use Zynq peripherals from the x86 host. Could such a case be
> affected in any way by this migration?

The driver only supports memory-mapped I/O [by ioremap()], so readl/writel 
is actually the right thing to do, IMO. On x86 and ia64, ioread32/iowrite 
for MMIO addresses also maps to readl/writel. Are there any plans to 
support port-mapped I/O?

My guess is that ioread32/iowrite32 was simply copied from some other 
driver long ago (uartlite?), and forgotten.

I have looked at various Zynq peripheral drivers, and they all use some 
variant of readl/writel. The only exception is the CAN driver, 
drivers/net/can/xilinx_can.c, which uses ioread32/iowrite32 or 
ioread32be/iowrite32be, depending on endianness (similar to uartlite). I 
assume that this is because there is no big-endian version of 
readl/writel, so ioread32 vs. ioread32be looks better than, say, readl vs. 
be32_to_cpu(__raw_readl); or is there some other reason?

Best regards,
Thomas Betker
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux