Skip to contentSkip to conversation

powerpc: add support for the Freescale P1022DS reference board

PATCH Superseded Timur Tabi 1 participant 2 messages Jun 4, 2010 – Jun 8, 2010

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

PATCH v2 1/1 powerpc: add support for the Freescale P1022DS reference board

Add basic suport for the Freescale P1022DS reference board.

Specifics:

1) 36-bit only
2) Booting from NOR flash only
3) Environment stored in NOR flash only
4) No SPI support
5) No DIU support

---

v2: addresses most of Wolfgang's concerns.
DIU support removed so that it can be reworked later

This depends on the following patches:

Move ICS CLK chip frequenty calculation code into a common board library
fsl: add LAW target to fsl_pci_info structure

 MAINTAINERS                             |    1 +
 MAKEALL                                 |    1 +
 Makefile                                |    4 +
 arch/powerpc/cpu/mpc85xx/Makefile       |    1 +
 arch/powerpc/cpu/mpc85xx/p1022_serdes.c |  166 +++++++++++
 arch/powerpc/include/asm/fsl_serdes.h   |    2 +
 board/freescale/common/Makefile         |    1 +
 board/freescale/p1022ds/Makefile        |   39 +++
 board/freescale/p1022ds/config.mk       |   14 +
 board/freescale/p1022ds/ddr.c           |  106 +++++++
 board/freescale/p1022ds/law.c           |   21 ++
 board/freescale/p1022ds/p1022ds.c       |  284 ++++++++++++++++++
 board/freescale/p1022ds/tlb.c           |   76 +++++
 include/configs/P1022DS.h               |  473 +++++++++++++++++++++++++++++++
 14 files changed, 1189 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/cpu/mpc85xx/p1022_serdes.c
 create mode 100644 board/freescale/p1022ds/Makefile
 create mode 100644 board/freescale/p1022ds/config.mk
 create mode 100644 board/freescale/p1022ds/ddr.c
 create mode 100644 board/freescale/p1022ds/law.c
 create mode 100644 board/freescale/p1022ds/p1022ds.c
 create mode 100644 board/freescale/p1022ds/tlb.c
 create mode 100644 include/configs/P1022DS.h
MAINTAINERS +1 -0
index 5cbc845..4b059ee 100644
@@ -437,6 +437,7 @@ Timur Tabi <[email protected]>
 
 	MPC8349E-mITX	MPC8349
 	MPC8349E-mITX-GP MPC8349
+	P1022DS		P1022
 
 Erik Theisen <[email protected]>
 
MAKEALL +1 -0
index bb09627..0950578 100755
@@ -406,6 +406,7 @@ LIST_85xx="		\
 	MPC8569MDS_NAND \
 	MPC8572DS	\
 	MPC8572DS_36BIT	\
+	P1022DS		\
 	P2020DS		\
 	P2020DS_36BIT	\
 	P1011RDB	\
Makefile +4 -0
index 1445e8b..55426a7 100644
@@ -2489,6 +2489,10 @@ MPC8572DS_36BIT_config \
 MPC8572DS_config:       unconfig
 	@$(MKCONFIG) -t $(@:_config=) MPC8572DS powerpc mpc85xx mpc8572ds freescale
 
+# Also works when the P1022DS is switched to P1013 mode
+P1022DS_config:		unconfig
+	@$(MKCONFIG) -t $(@:_config=) P1022DS powerpc mpc85xx p1022ds freescale
+
 P2020DS_36BIT_config \
 P2020DS_config:		unconfig
 	@$(MKCONFIG) -t $(@:_config=) P2020DS powerpc mpc85xx p2020ds freescale
arch/powerpc/cpu/mpc85xx/Makefile +1 -0
index f064fee..a481326 100644
@@ -63,6 +63,7 @@ COBJS-$(CONFIG_CPM2)	+= ether_fcc.o
 COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
 COBJS-$(CONFIG_MP)	+= mp.o
 COBJS-$(CONFIG_MPC8536) += mpc8536_serdes.o
+COBJS-$(CONFIG_P1022)	+= p1022_serdes.o
 COBJS-$(CONFIG_PCI)	+= pci.o
 COBJS-$(CONFIG_QE)	+= qe_io.o
 COBJS-$(CONFIG_CPM2)	+= serial_scc.o
arch/powerpc/cpu/mpc85xx/p1022_serdes.c new file +166 -0

166 lines not on this page · raw message

arch/powerpc/include/asm/fsl_serdes.h +2 -0
index d4839f4..2056532 100644
@@ -45,4 +45,6 @@ enum srds_prtcl {
 
 int is_serdes_configured(enum srds_prtcl device);
 
+const char *serdes_slot_name(enum srds_prtcl device);
+
 #endif /* __FSL_SERDES_H */
board/freescale/common/Makefile +1 -0
index f62f623..eb15b71 100644
@@ -42,6 +42,7 @@ COBJS-${CONFIG_MPC8541CDS}	+= cds_pci_ft.o
 COBJS-${CONFIG_MPC8548CDS}	+= cds_pci_ft.o
 COBJS-${CONFIG_MPC8555CDS}	+= cds_pci_ft.o
 
+COBJS-$(CONFIG_P1022DS)		+= ics307_clk.o
 COBJS-$(CONFIG_P2020DS)		+= ics307_clk.o
 
 SRCS	:= $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
board/freescale/p1022ds/Makefile new file +39 -0
new file mode 100644
index 0000000..8ede2d6
@@ -0,0 +1,39 @@
+#
+# Copyright 2010 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).a
+
+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)
+	$(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/p1022ds/config.mk new file +14 -0
new file mode 100644
index 0000000..4581d20
@@ -0,0 +1,14 @@
+#
+# Copyright 2010 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.
+#
+
+ifndef TEXT_BASE
+TEXT_BASE = 0xeff80000
+endif
+
+RESET_VECTOR_ADDRESS = 0xeffffffc
board/freescale/p1022ds/ddr.c new file +106 -0

106 lines not on this page · raw message

board/freescale/p1022ds/law.c new file +21 -0
new file mode 100644
index 0000000..b23b8f9
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2010 Freescale Semiconductor, Inc.
+ * Authors: Srikanth Srinivasan <[email protected]>
+ *          Timur Tabi <[email protected]>
+ *
+ * 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 <common.h>
+#include <asm/fsl_law.h>
+#include <asm/mmu.h>
+
+struct law_entry law_table[] = {
+	SET_LAW(CONFIG_SYS_FLASH_BASE_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
+	SET_LAW(PIXIS_BASE_PHYS, LAW_SIZE_4K, LAW_TRGT_IF_LBC),
+};
+
+int num_law_entries = ARRAY_SIZE(law_table);
board/freescale/p1022ds/p1022ds.c new file +284 -0

284 lines not on this page · raw message

board/freescale/p1022ds/tlb.c new file +76 -0

76 lines not on this page · raw message

include/configs/P1022DS.h new file +473 -0

473 lines not on this page · raw message

Signature · 1 line
1.7.0.1
author
#1 lore raw

PATCH v2 1/1 powerpc: add support for the Freescale P1022DS reference board

Quoted 4 lines · Timur Tabi

Add basic suport for the Freescale P1022DS reference board.

Specifics:

Quoted 8 lines

1) 36-bit only
2) Booting from NOR flash only
3) Environment stored in NOR flash only
4) No SPI support
5) No DIU support

---

Any comments on this patch? I found a few minor bugs, so I have a v3 waiting, but I want to address any other comments before I post another patch. If no one has any comments, I'll just go ahead and post my v3 now.