powerpc/85xx:Add PSC9131 RDB Support
PATCH v2 2/2 powerpc/85xx:Add PSC9131 RDB Support
PSC9131RDB is a Freescale reference design board for PSC9131 SoC. PSC9131 SOC is an integrated device that targets Femto base station market. It combines Power Architecture e500v2 and DSP StarCore SC3850 core technologies with MAPLE-B2F baseband acceleration processing elements
PSC9131RDB Overview
-----------------
-1Gbyte DDR3 (on board DDR)
-128Mbyte 2K page size NAND Flash
-256 Kbit M24256 I2C EEPROM
-128 Mbit SPI Flash memory
-USB-ULPI
-eTSEC1: Connected to RGMII PHY
-eTSEC2: Connected to RGMII PHY
-DUART interface: supports one UARTs up to 115200 bps for console display
Apart from the above it also consists various peripherals to support DSP functionalities.
This patch adds support for mainly Power side functionalities and peripherals
---
Applied on git://git.denx.de/u-boot.git (branch master) Changes for v2: Incorporated review comments from Wolfgang Denk
- Updated MAINTAINERS file
- Removed unwanted #defined
- Removed unwanted #undef
- use of get_ram_size()
MAINTAINERS | 2 + board/freescale/psc9131rdb/Makefile | 53 +++ board/freescale/psc9131rdb/ddr.c | 187 +++++++++ board/freescale/psc9131rdb/law.c | 31 ++ board/freescale/psc9131rdb/psc9131rdb.c | 116 ++++++ board/freescale/psc9131rdb/tlb.c | 67 ++++ boards.cfg | 2 + doc/README.psc9131rdb | 137 +++++++ include/configs/PSC9131RDB.h | 461 +++++++++++++++++++++++ nand_spl/board/freescale/psc9131rdb/Makefile | 145 +++++++ nand_spl/board/freescale/psc9131rdb/nand_boot.c | 122 ++++++ 11 files changed, 1323 insertions(+), 0 deletions(-) create mode 100644 board/freescale/psc9131rdb/Makefile create mode 100644 board/freescale/psc9131rdb/ddr.c create mode 100644 board/freescale/psc9131rdb/law.c create mode 100644 board/freescale/psc9131rdb/psc9131rdb.c create mode 100644 board/freescale/psc9131rdb/tlb.c create mode 100644 doc/README.psc9131rdb create mode 100644 include/configs/PSC9131RDB.h create mode 100644 nand_spl/board/freescale/psc9131rdb/Makefile create mode 100644 nand_spl/board/freescale/psc9131rdb/nand_boot.c
MAINTAINERS +2 -0
@@ -21,6 +21,8 @@ Poonam Aggrwal <[email protected]> P2020RDB P2020 + PSC9131RDB PSC9131 + Greg Allen <[email protected]> UTX8245 MPC8245
board/freescale/psc9131rdb/Makefile new file +53 -0
53 lines not on this page · raw message
board/freescale/psc9131rdb/ddr.c new file +187 -0
187 lines not on this page · raw message
board/freescale/psc9131rdb/law.c new file +31 -0
@@ -0,0 +1,31 @@ +/* +* Copyright 2011-2012 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_IFC ), +}; + +int num_law_entries =ARRAY_SIZE (law_table);
board/freescale/psc9131rdb/psc9131rdb.c new file +116 -0
116 lines not on this page · raw message
board/freescale/psc9131rdb/tlb.c new file +67 -0
67 lines not on this page · raw message
boards.cfg +2 -0
@@ -766,6 +766,8 @@ P5020DS_NAND powerpc mpc85xx corenet_ds freescale - P5020DS_SDCARD powerpc mpc85xx corenet_ds freescale - P5020DS:RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF80000 P5020DS_SECURE_BOOT powerpc mpc85xx corenet_ds freescale - P5020DS:SECURE_BOOT P5020DS_SPIFLASH powerpc mpc85xx corenet_ds freescale - P5020DS:RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF80000 +PSC9131RDB_NAND powerpc mpc85xx psc9131rdb freescale - PSC9131RDB:PSC9131RDB,NAND +PSC9131RDB_SPIFLASH powerpc mpc85xx psc9131rdb freescale - PSC9131RDB:PSC9131RDB,SPIFLASH stxgp3 powerpc mpc85xx stxgp3 stx stxssa powerpc mpc85xx stxssa stx - stxssa stxssa_4M powerpc mpc85xx stxssa stx - stxssa:STXSSA_4M
doc/README.psc9131rdb new file +137 -0
137 lines not on this page · raw message
include/configs/PSC9131RDB.h new file +461 -0
461 lines not on this page · raw message
nand_spl/board/freescale/psc9131rdb/Makefile new file +145 -0
145 lines not on this page · raw message
nand_spl/board/freescale/psc9131rdb/nand_boot.c new file +122 -0
122 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH v2 2/2 powerpc/85xx:Add PSC9131 RDB Support
Dear Prabhakar Kushwaha,
In message <[email protected]> you wrote:
...
include/configs/PSC9131RDB.h line 78
Quoted 2 lines
include/configs/PSC9131RDB.h new file +2
-0+#define CONFIG_L2_CACHE /* toggle L2 cache */ +#define CONFIG_BTB /* toggle branch predition */
Toggle? Do you really toggle, or enable?
Quoted 1 line
+#define
CONFIG_ADDR_STREAMING/* toggle addr streaming */
What is this good for?
It is undocumented, and there is no code that uses it.
include/configs/PSC9131RDB.h line 83
Quoted 2 lines
include/configs/PSC9131RDB.h new file +2
-0+#define CONFIG_SYS_MEMTEST_START 0x00000000/* memtest works on */ +#define CONFIG_SYS_MEMTEST_END 0x1fffffff
Have these been tested? A memtest starting at 0x0000 is likely to overwrite the exception vectors - I would expect the system will crash or hang immediately?
Quoted 1 line
+#define
CONFIG_PANIC_HANG/* do not reset board on panic */
Why is this needed?
...
include/configs/PSC9131RDB.h line 432
Quoted 10 lines
include/configs/PSC9131RDB.h new file +10
-0+#define CONFIG_HOSTNAME PSC9131rdb +#define CONFIG_ROOTPATH "/opt/nfsroot" +#define CONFIG_BOOTFILE "uImage" +#define CONFIG_UBOOTPATH u-boot.bin/* U-Boot image on TFTP server */ + +#define CONFIG_BAUDRATE 115200 + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "netdev=eth0\0" \ + "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \
Why didn't you follow my change request here? Define as "u-boot.bin" so it is at least consistent with the other strings, and drop the MK_STR here.
...
Quoted 2 lines
nand_spl/board/freescale/psc9131rdb/Makefile new file +0
-0
...
nand_spl/board/freescale/psc9131rdb/nand_boot.c
Quoted 2 lines
nand_spl/board/freescale/psc9131rdb/nand_boot.c new file +0
-0
Sorry, but this is the old, legacy SPL code. Please do not use this any more for new board.
Use the new code (in /spl/ directory) instead.
nand_spl/board/freescale/psc9131rdb/nand_boot.c line 32
Quoted 2 lines
nand_spl/board/freescale/psc9131rdb/nand_boot.c new file +2
-0+#define udelay (x) \ + {int i, j; for (i = 0; i < x; i++) for (j = 0; j < 10000; j++); }
Have you ever tested this? Or looked@what the compiler generates for it?
Quoted 1 line
+unsigned long
ddr_freq_mhz;
Do you have BSS before relocation?
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 God runs electromagnetics by wave theory on Monday, Wednesday, and Friday, and the Devil runs them by quantum theory on Tuesday, Thurs- day, and Saturday. -- William Bragg
PATCH v2 2/2 powerpc/85xx:Add PSC9131 RDB Support
Hi Wolfgang,
Thanks for reviewing it.
Please find my response in-lined.
Quoted 7 lines · Wolfgang Denk
Dear Prabhakar Kushwaha,
In message<[email protected]> you wrote:
...include/configs/PSC9131RDB.h line 78
Quoted 2 lines
include/configs/PSC9131RDB.h new file +2
-0+#define CONFIG_L2_CACHE /* toggle L2 cache */ +#define CONFIG_BTB /* toggle branch predition */ Toggle? Do you really toggle, or enable?
We enable the branch prediction. Comments is wrong. I will change it.
Quoted 4 lines
Quoted 1 line
+#define
CONFIG_ADDR_STREAMING/* toggle addr streaming */What is this good for?
It is undocumented, and there is no code that uses it.
This #define is no more in used. I just copy pasted from P1010RDB.h and P1_P2_RDB.h.
i will remove it.
Quoted 5 lines
include/configs/PSC9131RDB.h line 83
Quoted 2 lines
include/configs/PSC9131RDB.h new file +2
-0+#define CONFIG_SYS_MEMTEST_START 0x00000000/* memtest works on */ +#define CONFIG_SYS_MEMTEST_END 0x1fffffffHave these been tested? A memtest starting at
0x0000is likely to overwrite the exception vectors - I would expect the system will crash or hang immediately?
You are right. exception vector table is located here. I will add correct value.
Quoted 4 lines
Quoted 1 line
+#define
CONFIG_PANIC_HANG/* do not reset board on panic */Why is this needed?
...
It is defined in README at line 2093.
But as part of powerpc no code is written for this.
i will remove it.
Quoted 14 lines
include/configs/PSC9131RDB.h line 432
Quoted 10 lines
include/configs/PSC9131RDB.h new file +10
-0+#define CONFIG_HOSTNAME PSC9131rdb +#define CONFIG_ROOTPATH "/opt/nfsroot" +#define CONFIG_BOOTFILE "uImage" +#define CONFIG_UBOOTPATH u-boot.bin/* U-Boot image on TFTP server */ + +#define CONFIG_BAUDRATE 115200 + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "netdev=eth0\0" \ + "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \Why didn't you follow my change request here? Define as "u-boot.bin" so it is at least consistent with the other strings, and drop the
MK_STRhere.
Quoted 1 line
...
The requirement is to use u-boot.bin instead of CONFIG_UBOOTPATH? is my understanding correct?
Quoted 10 lines
Quoted 2 lines
nand_spl/board/freescale/psc9131rdb/Makefile new file +0
-0...
nand_spl/board/freescale/psc9131rdb/nand_boot.c
Quoted 2 lines
nand_spl/board/freescale/psc9131rdb/nand_boot.c new file +0
-0Sorry, but this is the old, legacy SPL code. Please do not use this any more for new board.
Use the new code (in /spl/ directory) instead.
I will check this point and re-spin the patch
Quoted 4 lines
nand_spl/board/freescale/psc9131rdb/nand_boot.c
Quoted 2 lines
nand_spl/board/freescale/psc9131rdb/nand_boot.c new file +2
-0+#define udelay (x) \ + {int i, j; for (i = 0; i< x; i++) for (j = 0; j< 10000; j++); }Have you ever tested this? Or looked at what the compiler generates for it?
I will check this point,,
Quoted 5 lines
Quoted 2 lines
+unsigned long
ddr_freq_mhz;Do you have BSS before relocation?
I will check this point
--Prabhakar
PATCH v2 2/2 powerpc/85xx:Add PSC9131 RDB Support
Dear Prabhakar Kushwaha,
Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 5 lines
Quoted 2 lines
+#define
CONFIG_ADDR_STREAMING/* toggle addr streaming */What is this good for?
It is undocumented, and there is no code that uses it.
This #define is no more in used. I just copy pasted from
P1010RDB.handP1_P2_RDB.h.
i will remove it.
It would be nice if you could provide an additional cleanup patch that removes the stale #define from the other files as well.
Quoted 14 lines
Quoted 14 lines
include/configs/PSC9131RDB.h line 432
Quoted 10 lines
include/configs/PSC9131RDB.h new file +10
-0+#define CONFIG_HOSTNAME PSC9131rdb +#define CONFIG_ROOTPATH "/opt/nfsroot" +#define CONFIG_BOOTFILE "uImage" +#define CONFIG_UBOOTPATH u-boot.bin/* U-Boot image on TFTP server */ + +#define CONFIG_BAUDRATE 115200 + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "netdev=eth0\0" \ + "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \Why didn't you follow my change request here? Define as "u-boot.bin" so it is at least consistent with the other strings, and drop the
MK_STRhere.
Quoted 4 lines
Quoted 1 line
...
The requirement is to use u-boot.bin instead of
CONFIG_UBOOTPATH? is my understanding correct?
No. Use
#define CONFIG_UBOOTPATH "u-boot.bin" /* U-Boot image on TFTP server */
so that you can then use
#define CONFIG_EXTRA_ENV_SETTINGS \ "netdev=eth0\0" \ "uboot=" CONFIG_UBOOTPATH "\0" \ ...
without the use of MK_STR(), and all string defines are done in a consistent way.
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 The nice thing about standards is that there are so many to choose from. - Andrew S. Tanenbaum
PATCH v2 2/2 powerpc/85xx:Add PSC9131 RDB Support
Hi Wolfgang,
Quoted 4 lines · Wolfgang Denk
Dear Prabhakar Kushwaha,
Quoted 1 line · In message<[email protected]> you wrote:
Quoted 1 line
Quoted 1 line
+#define
CONFIG_ADDR_STREAMING/* toggle addr streaming */
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
What is this good for?
It is undocumented, and there is no code that uses it.
This #define is no more in used. I just copy pasted from
P1010RDB.handP1_P2_RDB.h.
i will remove it.It would be nice if you could provide an additional cleanup patch that removes the stale #define from the other files as well.
Sure. I will try..
Quoted 23 lines
Quoted 14 lines
Quoted 14 lines
include/configs/PSC9131RDB.h line 432
Quoted 10 lines
include/configs/PSC9131RDB.h new file +10
-0+#define CONFIG_HOSTNAME PSC9131rdb +#define CONFIG_ROOTPATH "/opt/nfsroot" +#define CONFIG_BOOTFILE "uImage" +#define CONFIG_UBOOTPATH u-boot.bin/* U-Boot image on TFTP server */ + +#define CONFIG_BAUDRATE 115200 + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "netdev=eth0\0" \ + "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \Why didn't you follow my change request here? Define as "u-boot.bin" so it is at least consistent with the other strings, and drop the
MK_STRhere.Quoted 3 lines
Quoted 1 line
...
The requirement is to use u-boot.bin instead of
CONFIG_UBOOTPATH? is my understanding correct?No. Use
#define CONFIG_UBOOTPATH "u-boot.bin" /* U-Boot image on TFTP server */so that you can then use
Quoted 7 lines
#define CONFIG_EXTRA_ENV_SETTINGS \ "netdev=eth0\0" \ "uboot=" CONFIG_UBOOTPATH "\0" \ ...without the use of
MK_STR(), and all string defines are done in a consistent way.
Got it :)
I will provide the updated version asap.
Thanks,
Prabhakar