Skip to contentSkip to conversation

PlatformDevice definitions for 82xx

RFC In review Vitaly Bordug 2 participants 4 messages Jun 2, 2005 – Jun 3, 2005

lore
Share & tools
lore
#0 lore raw

RFC 1/1 PlatformDevice definitions for 82xx

Hi!
This adds platform definition files for 82xx, while the platform_info is filled in board-specific .C file residing in platforms/82xx. Another disputable thing I did - I moved m8260_setup.c from the syslib/ up to platforms/82xx/. The file was slightly changed - added 2 prototypes from the cpm2_pic.h and removed the respective include.

These defs will be utilized by fs_enet driver which is developed currently by Pantelis and me.

Comments, suggestions appreciated.

Signature · 1 line
Sincerely, Vitaly

initial platform defenitions

---
commit 1a7a351106fed3353484b808074522e223b012a6
tree 072e120576417512a61676af3bfc422268ebfdf9
parent 88d7bd8cb9eb8d64bf7997600b0d64f7834047c5
author Vitaly Bordug <[email protected]> 1117637659 +0400 committer Vitaly Bordug <[email protected]> 1117637659 +0400

arch/ppc/Makefile (mode:100644 sha1:b251420f5dd9e85be90699e682799ff1e6993cc4) renamed from arch/ppc/Makefile (mode:100644 sha1:0432a25b47354e75d0a09e4b2817d1afe7849313) +1 -0
Index: arch/ppc/Makefile
===================================================================
@@ -60,6 +60,7 @@
 core-$(CONFIG_4xx)		+= arch/ppc/platforms/4xx/
 core-$(CONFIG_83xx)		+= arch/ppc/platforms/83xx/
 core-$(CONFIG_85xx)		+= arch/ppc/platforms/85xx/
+core-$(CONFIG_8260)		+= arch/ppc/platforms/82xx/
 core-$(CONFIG_MATH_EMULATION)	+= arch/ppc/math-emu/
 core-$(CONFIG_XMON)		+= arch/ppc/xmon/
 core-$(CONFIG_APUS)		+= arch/ppc/amiga/
arch/ppc/platforms/82xx/Makefile (mode:100644 sha1:6909aa63a062de13c246439b5fd97b4c45b110db) renamed from dev/null (tree:eed337ef5e9ae7d62caa84b7974a11fddc7f06e0) +4 -0
Index: arch/ppc/platforms/82xx/Makefile
===================================================================
@@ -0,0 +1,4 @@
+#
+# Makefile for the PowerPC 82xx linux kernel.
+#
+obj-$(CONFIG_8260)	+= m8260_setup.o pq2ads_pd.o
\ No newline at end of file
arch/ppc/platforms/82xx/m8260_setup.c (mode:100644 sha1:77d88db0490ccf71ddad38f6b10d0698e7aeb4cb) renamed from dev/null (tree:eed337ef5e9ae7d62caa84b7974a11fddc7f06e0) +268 -0

268 lines not on this page · raw message

arch/ppc/platforms/82xx/pq2ads_pd.c (mode:100644 sha1:e4c6ce54f2d8def183dbdc6490c0a9bbcb9c9470) renamed from dev/null (tree:eed337ef5e9ae7d62caa84b7974a11fddc7f06e0) +117 -0

117 lines not on this page · raw message

arch/ppc/platforms/82xx/pq2ads_pd.h (mode:100644 sha1:4debf007859d6043d0647f8f3e6741834b78b689) renamed from dev/null (tree:eed337ef5e9ae7d62caa84b7974a11fddc7f06e0) +63 -0

63 lines not on this page · raw message

arch/ppc/syslib/Makefile (mode:100644 sha1:ed2da02b7bba6780761857ccb082e4a5b5704fe1) renamed from arch/ppc/syslib/Makefile (mode:100644 sha1:dd418ea3426c70a4ed065986e464967fce8122fb) +3 -2
Index: arch/ppc/syslib/Makefile
===================================================================
@@ -80,10 +80,11 @@
 obj-$(CONFIG_SBC82xx)		+= todc_time.o
 obj-$(CONFIG_SPRUCE)		+= cpc700_pic.o indirect_pci.o pci_auto.o \
 				   todc_time.o
-obj-$(CONFIG_8260)		+= m8260_setup.o
 obj-$(CONFIG_PCI_8260)		+= m8260_pci.o indirect_pci.o
 obj-$(CONFIG_8260_PCI9)		+= m8260_pci_erratum9.o
-obj-$(CONFIG_CPM2)		+= cpm2_common.o cpm2_pic.o
+obj-$(CONFIG_CPM2)		+= cpm2_common.o cpm2_pic.o \
+				    mpc82xx_devices.o mpc82xx_sys.o ppc_sys.o
+
 ifeq ($(CONFIG_PPC_GEN550),y)
 obj-$(CONFIG_KGDB)		+= gen550_kgdb.o gen550_dbg.o
 obj-$(CONFIG_SERIAL_TEXT_DEBUG)	+= gen550_dbg.o
dev/null (tree:072e120576417512a61676af3bfc422268ebfdf9) renamed from arch/ppc/syslib/m8260_setup.c (mode:100644 sha1:23ea3f694de2066ec5b324ebedb38b1c027415ce) +0 -264

264 lines not on this page · raw message

arch/ppc/syslib/mpc82xx_devices.c (mode:100644 sha1:42501a5f121d8524576162eb03f3bc945bf19636) renamed from dev/null (tree:eed337ef5e9ae7d62caa84b7974a11fddc7f06e0) +121 -0

121 lines not on this page · raw message

arch/ppc/syslib/mpc82xx_sys.c (mode:100644 sha1:b793dd75df5055157e804e892223920c03641a73) renamed from dev/null (tree:eed337ef5e9ae7d62caa84b7974a11fddc7f06e0) +42 -0

42 lines not on this page · raw message

include/asm-ppc/mpc8260.h (mode:100644 sha1:a9c046b16be566e215143fb044e17a233a1c4194) renamed from include/asm-ppc/mpc8260.h (mode:100644 sha1:d820894e59916a4c491b8bdd0312830acec228a9) +5 -0
Index: include/asm-ppc/mpc8260.h
===================================================================
@@ -74,6 +74,11 @@
 extern unsigned char __res[];
 #endif
 
+enum ppc_sys_devices {
+	MPC82xx_FCC1,
+	MPC82xx_FCC2,
+};
+
 #endif /* CONFIG_8260 */
 #endif /* !__ASM_PPC_MPC8260_H__ */
 #endif /* __KERNEL__ */
include/asm-ppc/ppc_sys.h (mode:100644 sha1:2a7636166c83f1187631cbfe5aa1003c691d2d2b) renamed from include/asm-ppc/ppc_sys.h (mode:100644 sha1:24b991c427694d425225c2cacde01b5bc469ed0a) +2 -0
Index: include/asm-ppc/ppc_sys.h
===================================================================
@@ -27,6 +27,8 @@
 #include <asm/mpc85xx.h>
 #elif defined(CONFIG_PPC_MPC52xx)
 #include <asm/mpc52xx.h>
+#elif defined(CONFIG_8260)
+#include <asm/mpc8260.h>
 #else
 #error "need definition of ppc_sys_devices"
 #endif
include/linux/fs_enet_pd.h (mode:100644 sha1:314b72e4dab21c36f431c2c2950fee8586dcce8e) renamed from dev/null (tree:eed337ef5e9ae7d62caa84b7974a11fddc7f06e0) +107 -0

107 lines not on this page · raw message

!-------------------------------------------------------------flip-

#1 lore raw
Quoted 6 lines · Vitaly Bordug

Hi!
This adds platform definition files for 82xx, while the platform_info is filled in board-specific .C file residing in platforms/82xx. Another disputable thing I did - I moved m8260_setup.c from the syslib/ up to platforms/82xx/. The file was slightly changed - added 2 prototypes from the cpm2_pic.h and removed the respective include.

Why the move of m8260_setup.c? Also, if this is required can we do this as two different patches so we can see clearly any changes also maded to m8260_setup.c

mpc82xx_devices.c need a bit of work we need to at least cover the same set of devices that 85xx does for the CPM:

	SPI, I2C, USB, SCC1-4, FCC1-3, MCC1-2, SMC1-2

Additionally, the device name can not me FS_ENET_NAME, which assumes that FCC is only used for enet.

mpc82xx_sys.c: what is the .value field? is this the IMMR and if so why bother shifting it? Also there are a whole bunch of variants that need to be captured

Let's get clean versions of these two files before we worry about how to handle FCC enet specific bits.

- kumar

#2 lore raw
Quoted 11 lines · Kumar Gala
Quoted 6 lines · Vitaly Bordug

Hi!
This adds platform definition files for 82xx, while the platform_info is filled in board-specific .C file residing in platforms/82xx. Another disputable thing I did - I moved m8260_setup.c from the syslib/ up to platforms/82xx/. The file was slightly changed - added 2 prototypes from the cpm2_pic.h and removed the respective include.

Quoted 2 lines

Why the move of m8260_setup.c? Also, if this is required can we do this as two different patches so we can see clearly any changes also maded to m8260_setup.c

To my opinion platforms/82xx/m8260_setup.c is more relevant than in syslib. This is not a vital requirement though, I just want to know whether someone considers the same.

Quoted 3 lines

mpc82xx_devices.c need a bit of work we need to at least cover the same set of devices that 85xx does for the CPM:

    SPI, I2C, USB, SCC1-4, FCC1-3, MCC1-2, SMC1-2

OK. These stuff is not there yet because I wasn't sure what should come first - the platform stuff or driver that will utilize it. So, the correct way is to define PD first, than add drivers.

Quoted 2 lines

Additionally, the device name can not me FS_ENET_NAME, which assumes that FCC is only used for enet.

OK

Quoted 1 line

mpc82xx_sys.c: what is the .value field? is this the IMMR and if so why bother shifting it?

Because I want only partnum & masknum (RM, Fig. 4.26), remaining part is HRCW-dependent and can be written so couldn't be used as a device identification.

Quoted 2 lines

Also there are a whole bunch of variants that need to be captured

What exactly do you mean by this? Enumerate all the 82xx boards in mpc82xx_sys.c identifying them by immr, or?

Quoted 1 line

Let's get clean versions of these two files before we worry about how to handle FCC enet specific bits.

Agreed.

Quoted 4 lines

- kumar

Signature · 1 line
Sincerely, Vitaly
#3 lore raw
Quoted 13 lines · Vitaly Bordug
Quoted 11 lines · Kumar Gala
Quoted 6 lines · Vitaly Bordug

Hi!
This adds platform definition files for 82xx, while the platform_info is filled in board-specific .C file residing in platforms/82xx. Another disputable thing I did - I moved m8260_setup.c from the syslib/ up to platforms/82xx/. The file was slightly changed - added 2 prototypes from the cpm2_pic.h and removed the respective include.

Quoted 7 lines
Quoted 4 lines

Why the move of m8260_setup.c? Also, if this is required can we do this as two different patches so we can see clearly any changes also maded to m8260_setup.c

To my opinion platforms/82xx/m8260_setup.c is more relevant than in syslib. This is not a vital requirement though, I just want to know whether someone considers the same.

Let's leave it where it is for now.

Quoted 11 lines
Quoted 4 lines

mpc82xx_devices.c need a bit of work we need to at least cover the same set of devices that 85xx does for the CPM:

    SPI, I2C, USB, SCC1-4, FCC1-3, MCC1-2, SMC1-2

OK. These stuff is not there yet because I wasn't sure what should come first - the platform stuff or driver that will utilize it. So, the correct way is to define PD first, than add drivers.

Quoted 3 lines

Additionally, the device name can not me FS_ENET_NAME, which assumes that FCC is only used for enet.

Quoted 8 lines

OK

Quoted 2 lines

mpc82xx_sys.c: what is the .value field? is this the IMMR and if so why bother shifting it?

Because I want only partnum & masknum (RM, Fig. 4.26), remaining part is HRCW-dependent and can be written so couldn't be used as a device identification.

Ok, but is there any need to shift it? Just setup the mask up correctly.

Quoted 4 lines
Quoted 2 lines

Also there are a whole bunch of variants that need to be captured

What exactly do you mean by this? Enumerate all the 82xx boards in mpc82xx_sys.c identifying them by immr, or?

Not boards, but chips. Yes, enumerating the various IMMRs, I will ask one of our engineers to help with this.

- kumar