powerpc/85xx: Add basic support for P1023RDS board
PATCH 1/1 powerpc/85xx: Add basic support for P1023RDS board
The P1023RDS board is the reference board for the P1023 SoC.
Add support for booting it from NOR or NAND, with fixed 2G of DDR, PCIe, UART, I2C, etc.
---
based on "Prepare v2011.06-rc2"
MAINTAINERS | 1 + board/freescale/p1023rds/Makefile | 38 ++ board/freescale/p1023rds/bcsr.h | 53 +++ board/freescale/p1023rds/law.c | 35 ++ board/freescale/p1023rds/p1023rds.c | 162 +++++++ board/freescale/p1023rds/tlb.c | 118 +++++ boards.cfg | 2 + doc/README.p1023rds | 102 +++++ include/configs/P1023RDS.h | 567 +++++++++++++++++++++++++ nand_spl/board/freescale/p1023rds/Makefile | 133 ++++++ nand_spl/board/freescale/p1023rds/nand_boot.c | 99 +++++ 11 files changed, 1310 insertions(+), 0 deletions(-) create mode 100644 board/freescale/p1023rds/Makefile create mode 100644 board/freescale/p1023rds/bcsr.h create mode 100644 board/freescale/p1023rds/law.c create mode 100644 board/freescale/p1023rds/p1023rds.c create mode 100644 board/freescale/p1023rds/tlb.c create mode 100644 doc/README.p1023rds create mode 100644 include/configs/P1023RDS.h create mode 100644 nand_spl/board/freescale/p1023rds/Makefile create mode 100644 nand_spl/board/freescale/p1023rds/nand_boot.c
MAINTAINERS +1 -0
@@ -511,6 +511,7 @@ Ilya Yanok <[email protected]> Roy Zang <[email protected]> mpc7448hpc2 MPC7448 + P1023RDS P1023 John Zhan <[email protected]>
board/freescale/p1023rds/Makefile new file +38 -0
@@ -0,0 +1,38 @@ +# +# Copyright 2010-2011 Freescale Semiconductor, Inc. +# +# 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. +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS-y += $(BOARD).o +COBJS-y += law.o +COBJS-y += tlb.o + +SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS-y)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +clean: + rm -f $(OBJS) $(SOBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
board/freescale/p1023rds/bcsr.h new file +53 -0
53 lines not on this page · raw message
board/freescale/p1023rds/law.c new file +35 -0
@@ -0,0 +1,35 @@ +/* +* Copyright 2010-2011 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_NAND_BASE_PHYS ,LAW_SIZE_1M ,LAW_TRGT_IF_LBC ), +SET_LAW (CONFIG_SYS_QMAN_MEM_PHYS ,LAW_SIZE_4M , +LAW_TRGT_IF_DPAA_SWP_SRAM ), +/* The LAW 0xe0000000 ~ 0xefffffff for BCSR and NOR flash */ +SET_LAW (CONFIG_SYS_BCSR_BASE_PHYS ,LAW_SIZE_256M ,LAW_TRGT_IF_LBC ), +}; + +int num_law_entries =ARRAY_SIZE (law_table);
board/freescale/p1023rds/p1023rds.c new file +162 -0
162 lines not on this page · raw message
board/freescale/p1023rds/tlb.c new file +118 -0
118 lines not on this page · raw message
boards.cfg +2 -0
@@ -556,6 +556,8 @@ P1020RDB_SDCARD powerpc mpc85xx p1_p2_rdb freesca P1020RDB_SPIFLASH powerpc mpc85xx p1_p2_rdb freescale - P1_P2_RDB:P1020RDB,SPIFLASH P1022DS powerpc mpc85xx p1022ds freescale P1022DS_36BIT powerpc mpc85xx p1022ds freescale - P1022DS:36BIT +P1023RDS powerpc mpc85xx p1023rds freescale - P1023RDS +P1023RDS_NAND powerpc mpc85xx p1023rds freescale - P1023RDS:NAND P2010RDB powerpc mpc85xx p1_p2_rdb freescale - P1_P2_RDB:P2010RDB P2010RDB_36BIT powerpc mpc85xx p1_p2_rdb freescale - P1_P2_RDB:P2010RDB,36BIT P2010RDB_36BIT_SDCARD powerpc mpc85xx p1_p2_rdb freescale - P1_P2_RDB:P2010RDB,36BIT,SDCARD
doc/README.p1023rds new file +102 -0
102 lines not on this page · raw message
include/configs/P1023RDS.h new file +567 -0
567 lines not on this page · raw message
nand_spl/board/freescale/p1023rds/Makefile new file +133 -0
133 lines not on this page · raw message
nand_spl/board/freescale/p1023rds/nand_boot.c new file +99 -0
99 lines not on this page · raw message
Signature · 1 line
1.6.0.6
PATCH 1/1 powerpc/85xx: Add basic support for P1023RDS board
Dear Roy Zang,
Quoted 4 lines · In message <[email protected]> you…
The P1023RDS board is the reference board for the P1023 SoC.
Add support for booting it from NOR or NAND, with fixed 2G of DDR, PCIe, UART, I2C, etc.
Please fix the checkpatch warnings (7 lines over 80 characters)
...
Quoted 2 lines
include/configs/P1023RDS.h new file +2
-0+/* ECC will be enabled based on perf_mode environment variable */ +#undef CONFIG_DDR_ECC
...
Quoted 1 line
+#undef
CONFIG_CLOCKS_IN_MHZ
...
Quoted 1 line
+#undef
CONFIG_SYS_RAMBOOT
...
Quoted 1 line
+#undef
CONFIG_SERIAL_SOFTWARE_FIFO
...
Quoted 1 line
+#undef
CONFIG_SOFT_I2C/* I2C bit-banged */
...
Quoted 1 line
+#undef
CONFIG_WATCHDOG/* watchdog disabled */
...
Quoted 1 line
+#undef
CONFIG_BOOTARGS/* the boot command will set bootargs */
etc. Please do not undef what is not defined in the first place.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Real Programmers always confuse Christmas and Halloween because OCT 31 == DEC 25 ! - Andrew Rutherford (andrewr at ucs.adelaide.edu.au)
PATCH 1/1 powerpc/85xx: Add basic support for P1023RDS board
Quoted 13 lines
-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Wednesday, June 08, 2011 13:31 PM
To: Zang Roy-R61911
Cc: u-boot at lists.denx.de; Xu Lei-B33228; Kumar Gala; Wang Haiying-R54964; sun york-R58495; Lan Chunhe-B25806
Subject: Re: [U-Boot] [PATCH] powerpc/85xx: Add basic support for P1023RDS boardDear Roy Zang,
Quoted 8 lines
In message <[email protected]> you
Quoted 4 lines · wrote:
The P1023RDS board is the reference board for the P1023 SoC.
Add support for booting it from NOR or NAND, with fixed 2G of DDR, PCIe, UART, I2C, etc.
Please fix the checkpatch warnings (7 lines over 80 characters)
I can fix it. In fact, I use checkpatch every time before I send out patch. If you check the board header file, most of them has this problem.
Do you think
+ /* physical addr of CCSRBAR */
+#define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR
is better than
+#define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR /* physical addr of CCSRBAR */
???
Please clarify.
Quoted 11 lines
...
Quoted 2 lines
include/configs/P1023RDS.h new file +2
-0+/* ECC will be enabled based on perf_mode environment variable */ +#undef CONFIG_DDR_ECC...
Quoted 1 line
+#undef
CONFIG_CLOCKS_IN_MHZ...
Quoted 1 line
+#undef
CONFIG_SYS_RAMBOOT...
Quoted 1 line
+#undef
CONFIG_SERIAL_SOFTWARE_FIFO...
Quoted 8 lines
Quoted 1 line
+#undef
CONFIG_SOFT_I2C/* I2C bit-banged */...
Quoted 1 line
+#undef
CONFIG_WATCHDOG/* watchdog disabled */...
Quoted 1 line
+#undef
CONFIG_BOOTARGS/* the boot command will set bootargs*/
etc. Please do not undef what is not defined in the first place.
Will fix.
Thanks.
Roy
Quoted 13 lines
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Real Programmers always confuse Christmas and Halloween because OCT 31 == DEC 25 ! - Andrew Rutherford (andrewr at ucs.adelaide.edu.au)
PATCH 1/1 powerpc/85xx: Add basic support for P1023RDS board
Dear Zang Roy-R61911,
[excessive Cc: list trimmed]
Quoted 4 lines · In message <2239AC579C7D3646A720227A37E0268115768A@039-SN1MPN1-004.039d.mgd.msf…
Quoted 2 lines
Please fix the checkpatch warnings (7 lines over 80 characters)
I can fix it. In fact, I use checkpatch every time before I send out patch.
Then I do not understand why you submitted the patch at all before cleaning it up.
Quoted 1 line
If you check the board header file, most of them has this problem.
Cleanup patches are welcome.
Quoted 8 lines
Do you think
+ /* physical addr of CCSRBAR */
+#defineCONFIG_SYS_CCSRBAR_PHYSCONFIG_SYS_CCSRBAR
is better than
+#defineCONFIG_SYS_CCSRBAR_PHYSCONFIG_SYS_CCSRBAR/* physical
addr of CCSRBAR */
???
Please clarify.
At least the first version does not violate coding style requirements.
Regarding the general topic of comments - there are such and such comments. Things like
i = i + 1; /* Increment variable i by one */
are gratuitous and of no use at all.
In your example above, I ask myself why we need CONFIG_SYS_CCSRBAR_PHYS at all when whe already have CONFIG_SYS_CCSRBAR (or vice versa).
And why we need a comment that explains this in grat detail - separate for each single macro.
Please re-read "Chapter 8: Commenting" in the coding-style document for more details.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The philosophy exam was a piece of cake - which was a bit of a surprise, actually, because I was expecting some questions on a sheet of paper.