linux_dsm_epyc7002/drivers/of
Kevin Cernekee 37786c7fee of: Add helper function to check MMIO register endianness
SoC peripherals can come in several different flavors:

 - little-endian: registers always need to be accessed in LE mode (so the
   kernel should perform a swap if the CPU is running BE)

 - big-endian: registers always need to be accessed in BE mode (so the
   kernel should perform a swap if the CPU is running LE)

 - native-endian: the bus will automatically swap accesses, so the kernel
   should never swap

Introduce a function that checks an OF device node to see whether it
contains a "big-endian" or "native-endian" property.  For the former case,
always return true.  For the latter case, return true iff the kernel was
built for BE (implying that the BE MMIO accessors do not perform a swap).
Otherwise return false, assuming LE registers.

LE registers are assumed by default because most existing drivers (libahci,
serial8250, usb) always use readl/writel in the absence of instructions
to the contrary, so that will be our fallback.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rob Herring <robh@kernel.org>
2015-04-14 19:35:44 -05:00
..
unittest-data of/unittest: replace 'selftest' with 'unittest' 2015-03-25 00:53:29 -05:00
address.c Linux 3.18-rc6 2014-11-24 14:50:07 +00:00
base.c of: Add helper function to check MMIO register endianness 2015-04-14 19:35:44 -05:00
device.c of: rename of_aliases_mutex to just of_mutex 2014-07-07 13:42:52 +01:00
dynamic.c of/reconfig: Always use the same structure for notifiers 2014-11-24 22:25:03 +00:00
fdt_address.c of/fdt: add FDT address translation support 2014-05-20 15:19:25 -05:00
fdt.c of/fdt: Remove "reg" data prints from early_init_dt_scan_memory 2015-04-14 19:35:43 -05:00
irq.c of/irq: Fix of_irq_parse_one() returned error codes 2015-03-19 08:39:14 -05:00
Kconfig of: OF_IRQ should depend on IRQ_DOMAIN 2015-04-14 19:22:09 -05:00
Makefile dt: OF_UNITTEST make dependency broken 2015-03-25 00:43:44 -05:00
of_mdio.c net: phy: adjust fixed_phy_register() return value 2014-10-07 13:06:45 -04:00
of_mtd.c of_mtd: Add helpers to get ECC strength and ECC step size 2014-03-10 22:42:28 -07:00
of_net.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-04-02 20:53:45 -07:00
of_pci_irq.c of_pci_irq: kill useless variable in of_irq_parse_pci() 2014-05-27 12:13:34 +01:00
of_pci.c of/pci: Remove duplicate kfree in of_pci_get_host_bridge_resources() 2015-02-11 15:27:15 -06:00
of_private.h of: Refactor __of_node_alloc() into __of_node_dup() 2014-11-24 22:24:41 +00:00
of_reserved_mem.c drivers: of: Export of_reserved_mem_device_{init,release} 2015-01-13 13:56:58 -06:00
overlay.c of/overlay: Remove unused variable 2015-03-10 10:34:33 -05:00
pdt.c of: Eliminate of_allnodes list 2014-11-04 13:29:38 +00:00
platform.c ARM: SoC driver updates 2015-02-17 09:38:59 -08:00
resolver.c of/resolver: Switch to new local fixups format. 2014-11-24 22:24:50 +00:00
unittest.c of/unittest: replace 'selftest' with 'unittest' 2015-03-25 00:53:29 -05:00