Skip to contentSkip to conversation

ppc32 8xx: core PRxK board family support

PLEASE REVIEW Marcelo Tosatti 2 participants 2 messages Nov 14, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

The following patch adds support for Cyclades's PRxK boards (based on the 855T processor). These boards are used to build dedicated HW such as console servers and KVM managers. There are about 15 board configurations supported.

We would like to merge the support in to the mainline kernel. This would facilitate our maintenance burden and also allow users to compile their own kernels more easily.

Any comments (including coding style ones) are welcome.

arch/ppc/Kconfig +6 -0
diff -Nur -p --exclude-from=linux-2.6.14-rc4/Documentation/dontdiff linux-2.6.14-rc4.orig/arch/ppc/Kconfig linux-2.6.14-rc4/arch/ppc/Kconfig
@@ -455,6 +455,12 @@ config TQM860L
 	  <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at
 	  <http://www.denx.de/embedded-ppc-en.html>.
 
+config PRxK
+	bool "PRxK"
+	help
+	  Say Y here to support Cyclades embedded PowerPC family: console
+	  servers, kvm managers, routers, etc.
+
 config FPS850L
 	bool "FPS850L"
 
arch/ppc/boot/include/cyc_banner.h +74 -0

74 lines not on this page · raw message

arch/ppc/boot/include/cyc_config.h +66 -0

66 lines not on this page · raw message

arch/ppc/boot/simple/embed_config.c +292 -0

298 lines not on this page · raw message

arch/ppc/boot/simple/head.S +11 -0
diff -Nur -p --exclude-from=linux-2.6.14-rc4/Documentation/dontdiff linux-2.6.14-rc4.orig/arch/ppc/boot/simple/head.S linux-2.6.14-rc4/arch/ppc/boot/simple/head.S
@@ -32,6 +32,17 @@
  *
  */
 
+#ifdef CONFIG_PRxK
+	.globl  start1
+start1: .long   0x00002120
+	.ascii  "Entry Point\x00"
+	.long   0x00000000
+	.long   0x00000000
+	.long   0x00000000
+	.long   0x00000000
+#endif
+
+
 	.globl	start
 start:
 	bl	start_
arch/ppc/configs/prxk_defconfig +756 -0

756 lines not on this page · raw message

arch/ppc/platforms/Makefile +1 -0
diff -Nur -p --exclude-from=linux-2.6.14-rc4/Documentation/dontdiff linux-2.6.14-rc4.orig/arch/ppc/platforms/Makefile linux-2.6.14-rc4/arch/ppc/platforms/Makefile
@@ -42,6 +42,7 @@ obj-$(CONFIG_SBC82xx)		+= sbc82xx.o
 obj-$(CONFIG_SPRUCE)		+= spruce.o
 obj-$(CONFIG_LITE5200)		+= lite5200.o
 obj-$(CONFIG_EV64360)		+= ev64360.o
+obj-$(CONFIG_PRxK)		+= prxk.o cyc_spi.o
 
 ifeq ($(CONFIG_SMP),y)
 obj-$(CONFIG_PPC_PMAC)		+= pmac_smp.o
arch/ppc/platforms/cpld.h +191 -0

191 lines not on this page · raw message

arch/ppc/platforms/cyc_flash.h +60 -0

60 lines not on this page · raw message

arch/ppc/platforms/cyc_osd.h +39 -0
diff -Nur -p --exclude-from=linux-2.6.14-rc4/Documentation/dontdiff linux-2.6.14-rc4.orig/arch/ppc/platforms/cyc_osd.h linux-2.6.14-rc4/arch/ppc/platforms/cyc_osd.h
@@ -0,0 +1,39 @@
+#define NUM_OF_OSDS		2
+#define MAX_VIDEO_CHANNELS	6
+
+#define	SPI_FROM_RTC		0
+#define SPI_FROM_OSD1		1
+#define SPI_FROM_OSD2		2
+
+#define OSDGETVIDEO		0
+#define OSDSETVIDEOON		1
+#define	OSDSETVIDEOOFF		2
+#define OSDSETPORT		3
+#define OSDGETPORT		4
+#define OSDGETOSD		5
+#define OSDSETOSDON		6
+#define	OSDSETOSDOFF		7
+#define OSDSETPOLARITY		8
+#define OSDSETBRIGHTNESS   	9
+#define OSDGETBRIGHTNESS   	10
+#define OSDSETCONTRAST     	11
+#define OSDGETCONTRAST     	12
+#define OSDAGCON		13
+#define	OSDAGCOFF		14
+#define	OSDGETAGC		15
+#define OSDSETTRANSPARENTON	16
+#define OSDSETTRANSPARENTOFF	17
+#define OSDSETVIDEOCOLOR	18
+#define OSDGETVERSION		19
+#define OSDGETSCREEN		20
+#define OSDSETLOCAL		21
+#define OSDSETREMOTE		22
+#define OSDSETRAMCHAR		23
+
+#define NUM_RAM_CHARS		8
+
+struct osdreq_ramchar{
+	__u16 index;
+	__u16 data[18];
+};
+
arch/ppc/platforms/cyc_spi.c +586 -0

586 lines not on this page · raw message

arch/ppc/platforms/prxk.c +307 -0

307 lines not on this page · raw message

arch/ppc/platforms/prxk.h +135 -0

135 lines not on this page · raw message

arch/ppc/syslib/m8xx_setup.c +4 -2
diff -Nur -p --exclude-from=linux-2.6.14-rc4/Documentation/dontdiff linux-2.6.14-rc4.orig/arch/ppc/syslib/m8xx_setup.c linux-2.6.14-rc4/arch/ppc/syslib/m8xx_setup.c
@@ -356,12 +356,14 @@ m8xx_map_io(void)
         io_block_mapping(PCI_ISA_IO_ADDR, PCI_ISA_IO_ADDR, 0x4000, _PAGE_IO);
         io_block_mapping(PCI_IDE_ADDR, PCI_IDE_ADDR, 0x4000, _PAGE_IO);
 #endif
-#if defined(CONFIG_RPXLITE) || defined(CONFIG_RPXCLASSIC)
-	io_block_mapping(RPX_CSR_ADDR, RPX_CSR_ADDR, RPX_CSR_SIZE, _PAGE_IO);
+#if defined(CONFIG_RPXLITE) || defined(CONFIG_RPXCLASSIC) || defined(CONFIG_PRxK)
 #if !defined(CONFIG_PCI)
 	io_block_mapping(_IO_BASE,_IO_BASE,_IO_BASE_SIZE, _PAGE_IO);
 #endif
 #endif
+#if defined(CONFIG_RPXLITE) || defined(CONFIG_RPXCLASSIC)
+	io_block_mapping(RPX_CSR_ADDR, RPX_CSR_ADDR, RPX_CSR_SIZE, _PAGE_IO);
+#endif
 #if defined(CONFIG_HTDMSOUND) || defined(CONFIG_RPXTOUCH) || defined(CONFIG_FB_RPX)
 	io_block_mapping(HIOX_CSR_ADDR, HIOX_CSR_ADDR, HIOX_CSR_SIZE, _PAGE_IO);
 #endif
include/asm-ppc/mpc8xx.h +4 -0
diff -Nur -p --exclude-from=linux-2.6.14-rc4/Documentation/dontdiff linux-2.6.14-rc4.orig/include/asm-ppc/mpc8xx.h linux-2.6.14-rc4/include/asm-ppc/mpc8xx.h
@@ -68,6 +68,10 @@
 #include <platforms/mpc885ads.h>
 #endif
 
+#if defined (CONFIG_PRxK)
+#include <platforms/prxk.h>
+#endif
+
 /* Currently, all 8xx boards that support a processor to PCI/ISA bridge
  * use the same memory map.
  */
#1 lore raw
Quoted 2 lines · Marcelo Tosatti

+++ linux-2.6.14-rc4/arch/ppc/boot/include/cyc_banner.h 2005-10-25
07:01:57.000000000 -0500

I'm not a big fan of all of these banners, printing, and ascii text in the kernel, but if you think you must have it ........

Review

Quoted 11 lines
arch/ppc/boot/include/cyc_config.h +4 -0
+//XXX: remove? Its unused.
+#if 0
+struct type0000 {
+    unsigned char	flash_sign[FLASH_SIGN_SIZE];    /* mark initialized 

CMOS */

arch/ppc/boot/include/cyc_config.h +3 -0
+    unsigned char	version;            /* Configure vector version */
+    unsigned char	routing_protocol;   /* RIP, OSPF, etc */
+    unsigned char	save_sw;            /* TRUE : the RTBOOT must be 

saved into flash */

(quoted diff) +2 -0
+};
+#endif

Yes please, remove it.

arch/ppc/boot/include/cyc_config.h line 29

Quoted 2 lines
arch/ppc/boot/include/cyc_config.h +2 -0
+    //[GB]May/06/05  Ethernet Receive Rate Limit
+    // unsigned char    reserved1[4];

Get rid of trash like this, too, or make it a real C style comment that explains what is going on here for the rest of us.

Quoted 2 lines

+++ linux-2.6.14-rc4/arch/ppc/boot/simple/embed_config.c 2005-10-25
13:55:04.000000000 -0500

This is a pretty big chunk of board specific code beyond just setting up the board configuration info. Consider making it a separate file.

Quoted 2 lines

+++ linux-2.6.14-rc4/arch/ppc/platforms/cpld.h 2005-10-24
15:35:25.000000000 -0500

Would you name this something a little more descriptive, like perhaps cyc_cpld.h? Makes it easier to understand where the files are used.

arch/ppc/platforms/cpld.h line 139

Quoted 2 lines
arch/ppc/platforms/cpld.h +2 -0
+struct fpga_pc_regs {
+	unsigned char fpga_pc_misc;	// Controls PCMCIA IO's window size

I still don't like // comments ....... :-)

Quoted 1 line

+// mem_addr = (unsigned long *)(&cpmp->cp_dpmem[dp_addr]);

Just remove it.

Quoted 1 line

+// dp_addr = m8xx_cpm_dpalloc(32);

Ditto, and anywhere else. If code isn't used, let's just get rid of it. Or put in a comment why there may be alternative or if you are testing something.

Thanks!

	-- Dan