Add QUICC Engine (QE) infrastructure (1/2, try 2)
PATCH 1/1 Add QUICC Engine (QE) infrastructure (1/2, try 2)
From: Li Yang <[email protected]>
o marked ioregs as __be32/__be16
o removed platform_device code and redundant get_qe_base()
o removed redundant comments
o added cpu_relax() to qe_reset
o uncasted all get_property() assignments
o eliminated unneeded casts
o eliminated immrbar_phys_to_virt (not used)
any comments not addressed here will have to wait for Leo Li's return from vacation in about a week.
Scott and I have changes for ucc_geth, but since they're going through netdev, I'll hold off posting them until this qe_lib stuff settles and/or we get ethernet working again.
old comments added for completeness:
note: linuxppc-dev rejected patch 2/7, so I split 2/7 into two, of which this is the first. This patch only adds files in a new directory (arch/powerpc/sysdev/qe_lib) so as not to break git-bisect.
Add QUICC Engine (QE) configuration, header files, and QE management and library code that are used by QE devices drivers.
Includes Leo's modifications up to, and including, the platform_device to of_device adaptation:
"The series of patches add generic QE infrastructure called qe_lib, and MPC8360EMDS board support. Qe_lib is used by QE device drivers such as ucc_geth driver.
This version updates QE interrupt controller to use new irq mapping mechanism, addresses all the comments received with last submission and includes some style fixes.
v2: Change to use device tree for BCSR and MURAM; Remove I/O port interrupt handling code as it is not generic enough.
v3: Address comments from Kumar; Update definition of several device tree nodes; Copyright style change."
In addition, the following changes have been made:
o removed typedefs
o uint -> u32 conversions
o removed following defines:
QE_SIZEOF_BD, BD_BUFFER_ARG, BD_BUFFER_CLEAR, BD_BUFFER, BD_STATUS_AND_LENGTH_SET, BD_STATUS_AND_LENGTH, and BD_BUFFER_SET because they hid sizeof/in_be32/out_be32 operations from the reader.
o fixed qe_snums_init() serial num assignment to use a const array
o made CONFIG_UCC_FAST select UCC_SLOW
o reduced NR_QE_IC_INTS from 128 to 64
o remove _IO_BASE, etc. defines (not used)
o removed irrelevant comments, added others to resemble removed BD_ defines
o realigned struct definitions in headers
o various other style fixes including things like pinMask -> pin_mask
o fixed a ton of whitespace issues
--- arch/powerpc/sysdev/qe_lib/Kconfig | 30 ++ arch/powerpc/sysdev/qe_lib/Makefile | 8 arch/powerpc/sysdev/qe_lib/qe.c | 353 +++++++++++++++++++++ arch/powerpc/sysdev/qe_lib/qe_ic.c | 555 +++++++++++++++++++++++++++++++++ arch/powerpc/sysdev/qe_lib/qe_ic.h | 106 ++++++ arch/powerpc/sysdev/qe_lib/qe_io.c | 226 +++++++++++++ arch/powerpc/sysdev/qe_lib/ucc.c | 251 +++++++++++++++ arch/powerpc/sysdev/qe_lib/ucc_fast.c | 396 ++++++++++++++++++++++++ arch/powerpc/sysdev/qe_lib/ucc_slow.c | 404 ++++++++++++++++++++++++ 9 files changed, 2329 insertions(+), 0 deletions(-)
arch/powerpc/sysdev/qe_lib/Kconfig new file +30 -0
@@ -0,0 +1,30 @@ +# +# QE Communication options +# + +menu "QE Options" + depends on QUICC_ENGINE + +config UCC_SLOW + bool "UCC Slow Protocols Support" + default n + select UCC + help + This option provides qe_lib support to UCC slow + protocols: UART, BISYNC, QMC + +config UCC_FAST + bool "UCC Fast Protocols Support" + default n + select UCC + select UCC_SLOW + help + This option provides qe_lib support to UCC fast + protocols: HDLC, Ethernet, ATM, transparent + +config UCC + bool + default y if UCC_FAST || UCC_SLOW + +endmenu +
arch/powerpc/sysdev/qe_lib/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# +# Makefile for the linux ppc-specific parts of QE +# +obj-$(CONFIG_QUICC_ENGINE)+= qe.o qe_ic.o qe_io.o + +obj-$(CONFIG_UCC) += ucc.o +obj-$(CONFIG_UCC_SLOW) += ucc_slow.o +obj-$(CONFIG_UCC_FAST) += ucc_fast.o
arch/powerpc/sysdev/qe_lib/qe.c new file +353 -0
353 lines not on this page · raw message
arch/powerpc/sysdev/qe_lib/qe_ic.c new file +555 -0
555 lines not on this page · raw message
arch/powerpc/sysdev/qe_lib/qe_ic.h new file +106 -0
106 lines not on this page · raw message
arch/powerpc/sysdev/qe_lib/qe_io.c new file +226 -0
226 lines not on this page · raw message
arch/powerpc/sysdev/qe_lib/ucc.c new file +251 -0
251 lines not on this page · raw message
arch/powerpc/sysdev/qe_lib/ucc_fast.c new file +396 -0
396 lines not on this page · raw message
arch/powerpc/sysdev/qe_lib/ucc_slow.c new file +404 -0
404 lines not on this page · raw message
Signature · 1 line
1.4.2.3