mpc85xx: support for Freescale COM Express P2020
v2 cover mpc85xx: support for Freescale COM Express P2020
This is a cleaned up version of the U-Boot port provided with the BSP for the Freescale COM Express P2020 evaluation kit.
Changes v1 -> v2:
- fix checkpatch warnings
- remove references to NAND (this board lacks NAND)
- disable CCSR relocation
Ira W. Snyder (2):
mpc85xx: support board-specific reset function
mpc85xx: support for Freescale COM Express P2020
MAINTAINERS | 4 + arch/powerpc/cpu/mpc85xx/cpu.c | 17 +- arch/powerpc/include/asm/immap_85xx.h | 1 + board/freescale/p2020come/Makefile | 46 +++ board/freescale/p2020come/ddr.c | 245 ++++++++++++++ board/freescale/p2020come/law.c | 36 ++ board/freescale/p2020come/p2020come.c | 401 +++++++++++++++++++++++ board/freescale/p2020come/tlb.c | 100 ++++++ boards.cfg | 2 + include/configs/P2020COME.h | 566 +++++++++++++++++++++++++++++++++ 10 files changed, 1417 insertions(+), 1 deletions(-) create mode 100644 board/freescale/p2020come/Makefile create mode 100644 board/freescale/p2020come/ddr.c create mode 100644 board/freescale/p2020come/law.c create mode 100644 board/freescale/p2020come/p2020come.c create mode 100644 board/freescale/p2020come/tlb.c create mode 100644 include/configs/P2020COME.h
Signature · 1 line
1.7.3.4
PATCH v2 1/2 mpc85xx: support board-specific reset function
This is useful for boards which cannot be reset in the usual way for the 85xx CPU. An example is a board which can only be reset by a hardware watchdog.
---
Unchanged from v1.
arch/powerpc/cpu/mpc85xx/cpu.c | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-)
arch/powerpc/cpu/mpc85xx/cpu.c +16 -1
@@ -42,6 +42,16 @@DECLARE_GLOBAL_DATA_PTR ; +/* +* Default board reset function +*/ +static void +__board_reset (void ) +{ +/* Do nothing */ +} +void board_reset (void ) __attribute__((weak,alias ("__board_reset" ))); +int checkcpu (void ) {sys_info_t sysinfo;
@@ -215,7 +225,12 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])mtspr (DBCR0 ,val);#else volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); -out_be32 (&gur->rstcr,0x2 );/* HRESET_REQ */ + +/* Attempt board-specific reset */ +board_reset (); + +/* Next try asserting HRESET_REQ */ +out_be32 (&gur->rstcr,0x2 );udelay (100 );#endif
Signature · 1 line
1.7.3.4
PATCH v2 2/2 mpc85xx: support for Freescale COM Express P2020
In reply to Ira W. SnyderThis adds support for the Freescale COM Express P2020 board. This board is similar to the P1_P2_RDB, but has some extra (as well as missing) peripherals.
Unlike all other mpc85xx boards, it uses a watchdog timeout to reset. Using the HRESET_REQ register does not work.
This board has no NOR flash, and can only be booted via SD or SPI. This procedure is documented in Freescale Document Number AN3659 "Booting from On-Chip RAM (eSDHC or eSPI)." Some alternative documentation is provided in Freescale Document Number P2020RM "P2020 QorIQ Integrated Processor Reference Manual" (section 4.5).
---
Changes v1 -> v2:
- fix checkpatch warnings
- remove all references to NAND
- update to top of tree U-Boot
- remove CCSR relocation (top of tree code doesn't work)
I wish I could debug the CCSR relocation issue on this board, but I don't have a JTAG setup which is capable of debugging this issue.
MAINTAINERS | 4 + arch/powerpc/include/asm/immap_85xx.h | 1 + board/freescale/p2020come/Makefile | 46 +++ board/freescale/p2020come/ddr.c | 245 ++++++++++++++ board/freescale/p2020come/law.c | 36 ++ board/freescale/p2020come/p2020come.c | 401 +++++++++++++++++++++++ board/freescale/p2020come/tlb.c | 100 ++++++ boards.cfg | 2 + include/configs/P2020COME.h | 566 +++++++++++++++++++++++++++++++++ 9 files changed, 1401 insertions(+), 0 deletions(-) create mode 100644 board/freescale/p2020come/Makefile create mode 100644 board/freescale/p2020come/ddr.c create mode 100644 board/freescale/p2020come/law.c create mode 100644 board/freescale/p2020come/p2020come.c create mode 100644 board/freescale/p2020come/tlb.c create mode 100644 include/configs/P2020COME.h
MAINTAINERS +4 -0
@@ -454,6 +454,10 @@ Jon Smirl <[email protected]> pcm030 MPC5200 +Ira W. Snyder <[email protected]> + + P2020COME P2020 + Timur Tabi <[email protected]> MPC8349E-mITX MPC8349
arch/powerpc/include/asm/immap_85xx.h +1 -0
@@ -2420,6 +2420,7 @@ struct ccsr_rman {#define CONFIG_SYS_MPC85xx_L2_OFFSET 0x20000#define CONFIG_SYS_MPC85xx_DMA_OFFSET 0x21000#define CONFIG_SYS_MPC85xx_USB_OFFSET 0x22000 +#define CONFIG_SYS_MPC85xx_USB2_OFFSET 0x23000#ifdef CONFIG_TSECV2 #define CONFIG_SYS_TSEC1_OFFSET 0xB0000#else
board/freescale/p2020come/Makefile new file +46 -0
46 lines not on this page · raw message
board/freescale/p2020come/ddr.c new file +245 -0
245 lines not on this page · raw message
board/freescale/p2020come/law.c new file +36 -0
@@ -0,0 +1,36 @@ +/* +* Copyright 2009 Freescale Semiconductor, Inc. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#include <common.h> +#include <asm/fsl_law.h> +#include <asm/mmu.h> + +struct law_entry law_table[] = { +SET_LAW (CONFIG_SYS_PCIE1_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCIE_1 ), +SET_LAW (CONFIG_SYS_PCIE1_IO_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_PCIE_1 ), +SET_LAW (CONFIG_SYS_PCIE2_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCIE_2 ), +SET_LAW (CONFIG_SYS_PCIE2_IO_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_PCIE_2 ), +SET_LAW (CONFIG_SYS_PCIE3_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCIE_3 ), +SET_LAW (CONFIG_SYS_PCIE3_IO_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_PCIE_3 ), +}; + +int num_law_entries =ARRAY_SIZE (law_table);
board/freescale/p2020come/p2020come.c new file +401 -0
401 lines not on this page · raw message
board/freescale/p2020come/tlb.c new file +100 -0
100 lines not on this page · raw message
boards.cfg +2 -0
@@ -714,6 +714,8 @@ P2020RDB-PC_36BIT powerpc mpc85xx p1_p2_rdb_pc freesca P2020RDB-PC_36BIT_NAND powerpc mpc85xx p1_p2_rdb_pc freescale - p1_p2_rdb_pc:P2020RDB,36BIT,NAND P2020RDB-PC_36BIT_SDCARD powerpc mpc85xx p1_p2_rdb_pc freescale - p1_p2_rdb_pc:P2020RDB,36BIT,SDCARD P2020RDB-PC_36BIT_SPIFLASH powerpc mpc85xx p1_p2_rdb_pc freescale - p1_p2_rdb_pc:P2020RDB,36BIT,SPIFLASH +P2020COME_SDCARD powerpc mpc85xx p2020come freescale - P2020COME:SDCARD +P2020COME_SPIFLASH powerpc mpc85xx p2020come freescale - P2020COME:SPIFLASH P2041RDB powerpc mpc85xx p2041rdb freescale P2041RDB_SDCARD powerpc mpc85xx p2041rdb freescale - P2041RDB:RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF80000 P2041RDB_SECURE_BOOT powerpc mpc85xx p2041rdb freescale - P2041RDB:SECURE_BOOT
include/configs/P2020COME.h new file +566 -0
566 lines not on this page · raw message
Signature · 1 line
1.7.3.4