From b8ec2385038c094b07ec5b49336289a46b6e9cc6 Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Mon, 7 Jan 2008 13:31:19 -0600 Subject: 85xx: add ability to upload QE firmware 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. Add command-line command "qe fw" to take a firmware blob in memory and upload it. Update ft_cpu_setup() on 85xx to create the 'firmware' device tree node if U-Boot has uploaded a firmware. Fully define 'struct rsp' in immap_qe.h to include the actual RISC Special Registers. Signed-off-by: Timur Tabi --- include/asm-ppc/immap_qe.h | 33 +++++++++++++++++++++++++++++++-- include/fdt_support.h | 1 + 2 files changed, 32 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-ppc/immap_qe.h b/include/asm-ppc/immap_qe.h index a16a6d3fc5..39da3771c9 100644 --- a/include/asm-ppc/immap_qe.h +++ b/include/asm-ppc/immap_qe.h @@ -513,10 +513,39 @@ typedef struct dbg { u8 res2[0x48]; } __attribute__ ((packed)) dbg_t; -/* RISC Special Registers (Trap and Breakpoint) +/* + * RISC Special Registers (Trap and Breakpoint). These are described in + * the QE Developer's Handbook. */ typedef struct rsp { - u8 fixme[0x100]; + u32 tibcr[16]; /* Trap/instruction breakpoint control regs */ + u8 res0[64]; + u32 ibcr0; + u32 ibs0; + u32 ibcnr0; + u8 res1[4]; + u32 ibcr1; + u32 ibs1; + u32 ibcnr1; + u32 npcr; + u32 dbcr; + u32 dbar; + u32 dbamr; + u32 dbsr; + u32 dbcnr; + u8 res2[12]; + u32 dbdr_h; + u32 dbdr_l; + u32 dbdmr_h; + u32 dbdmr_l; + u32 bsr; + u32 bor; + u32 bior; + u8 res3[4]; + u32 iatr[4]; + u32 eccr; /* Exception control configuration register */ + u32 eicr; + u8 res4[0x100-0xf8]; } __attribute__ ((packed)) rsp_t; typedef struct qe_immap { diff --git a/include/fdt_support.h b/include/fdt_support.h index 58e26abf82..7836f28cda 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -48,6 +48,7 @@ int fdt_fixup_memory(void *blob, u64 start, u64 size); void fdt_fixup_ethernet(void *fdt, bd_t *bd); int fdt_find_and_setprop(void *fdt, const char *node, const char *prop, const void *val, int len, int create); +void fdt_fixup_qe_firmware(void *fdt); #ifdef CONFIG_OF_HAS_UBOOT_ENV int fdt_env(void *fdt); -- cgit v1.2.1