qe: add ability to upload QE firmware
Subsystems (2)
Define the layout of a binary blob that contains a QE firmware and instructions on how to upload it. Add function qe_upload_firmware() to parse the blob and perform the actual upload. Fully define 'struct rsp' in immap_qe.h to include the actual RISC Special Registers.
Signed-off-by Timur Tabi <[email protected]>
---
This patch is for Kumar's for-2.6.25 branch. This code is necessary for my QE UART driver, which I will be posting soon.
Documentation/powerpc/00-INDEX | 3 + Documentation/powerpc/qe_firmware.txt | 295 +++++++++++++++++++++++++++++++++ arch/powerpc/platforms/Kconfig | 1 + arch/powerpc/sysdev/qe_lib/qe.c | 169 +++++++++++++++++++ include/asm-powerpc/immap_qe.h | 34 ++++- include/asm-powerpc/qe.h | 61 +++++++ 6 files changed, 561 insertions(+), 2 deletions(-) create mode 100644 Documentation/powerpc/qe_firmware.txt
Documentation/powerpc/00-INDEX +3 -0
@@ -28,3 +28,6 @@ sound.txt - info on sound support under Linux/PPC zImage_layout.txt - info on the kernel images for Linux/PPC +qe_firmware.txt + - describes the layout of firmware binaries for the Freescale QUICC + Engine and the code that parses and uploads the microcode therein.
Documentation/powerpc/qe_firmware.txt new file +295 -0
295 lines not on this page · raw message
arch/powerpc/platforms/Kconfig +1 -0
@@ -265,6 +265,7 @@ config TAU_AVERAGE config QUICC_ENGINE bool select PPC_LIB_RHEAP + select CRC32 help The QUICC Engine (QE) is a new generation of communications coprocessors on Freescale embedded CPUs (akin to CPM in older chips).
arch/powerpc/sysdev/qe_lib/qe.c +169 -0
178 lines not on this page · raw message
include/asm-powerpc/immap_qe.h +32 -2
@@ -393,9 +393,39 @@ struct dbg {u8 res2[0x48 ]; } __attribute__ ((packed)); -/* RISC Special Registers (Trap and Breakpoint) */ +/* +* RISC Special Registers (Trap and Breakpoint). These are described in +* the QE Developer's Handbook. +*/ struct rsp { -u32 reg[0x40 ];/* 64 32-bit registers */ +__be32 tibcr[16 ];/* Trap/instruction breakpoint control regs */ +u8 res0[64 ]; +__be32 ibcr0; +__be32 ibs0; +__be32 ibcnr0; +u8 res1[4 ]; +__be32 ibcr1; +__be32 ibs1; +__be32 ibcnr1; +__be32 npcr; +__be32 dbcr; +__be32 dbar; +__be32 dbamr; +__be32 dbsr; +__be32 dbcnr; +u8 res2[12 ]; +__be32 dbdr_h; +__be32 dbdr_l; +__be32 dbdmr_h; +__be32 dbdmr_l; +__be32 bsr; +__be32 bor; +__be32 bior; +u8 res3[4 ]; +__be32 iatr[4 ]; +__be32 eccr;/* Exception control configuration register */ +__be32 eicr; +u8 res4[0x100 -0xf8 ]; } __attribute__ ((packed));struct qe_immap {
include/asm-powerpc/qe.h +61 -0
73 lines not on this page · raw message
Signature · 1 line
1.5.2.4