Skip to contentSkip to conversation

powerpc/85xx: Add P1023RDB board support

PATCH Superseded Chunhe Lan 2 participants 2 messages Jun 13, 2013 PowerPC

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Chunhe Lan

author
#0 lore raw

PATCH v3 1/1 powerpc/85xx: Add P1023RDB board support

P1023RDB Specification:
-----------------------
Memory subsystem:
512MB DDR3 (Fixed DDR on board)
64MB NOR flash
128MB NAND flash

Ethernet:
eTSEC1: Connected to Atheros AR8035 GETH PHY
eTSEC2: Connected to Atheros AR8035 GETH PHY

PCIe:
Three mini-PCIe slots

USB: Two USB2.0 Type A ports

I2C:
AT24C08 8K Board EEPROM (8 bit address)

---
 arch/powerpc/cpu/mpc85xx/Makefile   |    1 +
 board/freescale/p1023rdb/Makefile   |   33 +++
 board/freescale/p1023rdb/ddr.c      |  105 +++++++++
 board/freescale/p1023rdb/law.c      |   34 +++
 board/freescale/p1023rdb/p1023rdb.c |  161 ++++++++++++++
 board/freescale/p1023rdb/tlb.c      |  115 ++++++++++
 boards.cfg                          |    1 +
 include/configs/P1023RDB.h          |  401 +++++++++++++++++++++++++++++++++++
 8 files changed, 851 insertions(+), 0 deletions(-)
 create mode 100644 board/freescale/p1023rdb/Makefile
 create mode 100644 board/freescale/p1023rdb/ddr.c
 create mode 100644 board/freescale/p1023rdb/law.c
 create mode 100644 board/freescale/p1023rdb/p1023rdb.c
 create mode 100644 board/freescale/p1023rdb/tlb.c
 create mode 100644 include/configs/P1023RDB.h
arch/powerpc/cpu/mpc85xx/Makefile +1 -0
index 2318064..4669883 100644
@@ -73,6 +73,7 @@ COBJS-$(CONFIG_P1014)	+= ddr-gen3.o
 COBJS-$(CONFIG_P1020)	+= ddr-gen3.o
 COBJS-$(CONFIG_P1021)	+= ddr-gen3.o
 COBJS-$(CONFIG_P1022)	+= ddr-gen3.o
+COBJS-$(CONFIG_P1023)	+= ddr-gen3.o
 COBJS-$(CONFIG_P1024)	+= ddr-gen3.o
 COBJS-$(CONFIG_P1025)	+= ddr-gen3.o
 COBJS-$(CONFIG_P2010)	+= ddr-gen3.o
board/freescale/p1023rdb/Makefile new file +33 -0
new file mode 100644
index 0000000..45c4f8b
@@ -0,0 +1,33 @@
+#
+# Copyright 2013 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	+= ddr.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)
+	$(call cmd_link_o_target, $(OBJS))
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
board/freescale/p1023rdb/ddr.c new file +105 -0

105 lines not on this page · raw message

board/freescale/p1023rdb/law.c new file +34 -0
new file mode 100644
index 0000000..331662c
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2013 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),
+	SET_LAW(CONFIG_SYS_FLASH_BASE_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
+};
+
+int num_law_entries = ARRAY_SIZE(law_table);
board/freescale/p1023rdb/p1023rdb.c new file +161 -0

161 lines not on this page · raw message

board/freescale/p1023rdb/tlb.c new file +115 -0

115 lines not on this page · raw message

boards.cfg +1 -0
index e2a8d42..21eb5f9 100644
@@ -829,6 +829,7 @@ P1022DS_36BIT_SPIFLASH       powerpc     mpc85xx     p1022ds             freesca
 P1022DS_SDCARD               powerpc     mpc85xx     p1022ds             freescale	-	    P1022DS:SDCARD
 P1022DS_36BIT_SDCARD         powerpc     mpc85xx     p1022ds             freescale	-	    P1022DS:36BIT,SDCARD
 P1022DS_36BIT                powerpc     mpc85xx     p1022ds             freescale      -           P1022DS:36BIT
+P1023RDB                     powerpc     mpc85xx     p1023rdb            freescale      -           P1023RDB
 P1023RDS                     powerpc     mpc85xx     p1023rds            freescale      -           P1023RDS
 P1023RDS_NAND                powerpc     mpc85xx     p1023rds            freescale      -           P1023RDS:NAND
 P1024RDB                     powerpc     mpc85xx     p1_p2_rdb_pc        freescale      -           p1_p2_rdb_pc:P1024RDB
include/configs/P1023RDB.h new file +401 -0

401 lines not on this page · raw message

Signature · 1 line
1.7.6.5
#1 lore raw

PATCH v3 1/1 powerpc/85xx: Add P1023RDB board support

Quoted 16 lines · Chunhe Lan

+/*
+ * Memory map
+ *
+ * 0x0000_0000 0x1fff_ffff DDR 500M
Cacheable
+ * 0x8000_0000 0xbfff_ffff PCI Express Mem 1G
non-cacheable
+ * 0xc000_0000 0xdfff_ffff PCI 512M
non-cacheable
+ * 0xe100_0000 0xe3ff_ffff PCI IO range 4M
non-cacheable
+ * 0xff00_0000 0xff3f_ffff DPAA_QBMAN 4M
+ *
+ * Localbus non-cacheable
+ *
+ * 0xec00_0000 0xefff_ffff NOR flash 64M NOR

Quoted 8 lines

flash
+ * 0xff60_0000 0xff7f_ffff CCSR 2M
non-cacheable
+ * 0xffa0_0000 0xffaf_ffff NAND 1M
non-cacheable
+ * 0xffd0_0000 0xffd0_3fff L1 for stack 16K
Cacheable TLB0
+ */

Same comments as before -- only two of those last four are under the localbus, and only three are non-cacheable.

Also, DPAA_QBMAN should say "4M cacheable" rather than "4M" for consistency. Also, please capitalize consistently ("non-cacheable" and "Cacheable"). :-)

-Scott