Skip to content

MPC5200 Bestcomm platform driver

Andrey Volkov linuxppc-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 of 2 patches 5 repliesIn review

1 of 2 patches is in this archive. The cover letter announces 2.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Fec MPC5200 eth driverdrivers/net/Kconfig drivers/net/Makefile drivers/net/fec_mpc52xx/Kconfig +5 more+1702 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [00/02] MPC5200 Bestcomm platform driver

Hi Sylvain

This is first part of "platformizied" bestcomm/fec drivers.

Comments/Commit?

--
Regards
Andrey Volkov

arch/ppc/Kconfig +5 -0
@@ -733,6 +733,11 @@ config EMBEDDEDBOOT
 config PPC_MPC52xx
 	bool
 
+config PPC_BESTCOMM
+	bool
+	depends on PPC_MPC52xx
+	default y
+
 config 8260
 	bool "CPM2 Support" if WILLOW
 	depends on 6xx
arch/ppc/syslib/Makefile +1 -0
@@ -116,3 +116,4 @@ obj-$(CONFIG_PPC_MPC52xx)	+= mpc52xx_set
 ifeq ($(CONFIG_PPC_MPC52xx),y)
 obj-$(CONFIG_PCI)		+= mpc52xx_pci.o
 endif
+obj-$(CONFIG_PPC_BESTCOMM)	+= bestcomm/
arch/ppc/syslib/bestcomm/Makefile new file +2 -0
new file mode 100644
@@ -0,0 +1,2 @@
+obj-$(CONFIG_PPC_BESTCOMM) 	+= bestcomm.o
+obj-$(CONFIG_FEC_MPC52xx)	+= sdma_fec_rx_task.o sdma_fec_tx_task.o fec.o
arch/ppc/syslib/bestcomm/bestcomm.c new file +408 -0

408 lines not on this page · raw message

arch/ppc/syslib/bestcomm/bestcomm.h new file +473 -0

473 lines not on this page · raw message

arch/ppc/syslib/bestcomm/fec.c new file +174 -0

174 lines not on this page · raw message

arch/ppc/syslib/bestcomm/fec.h new file +71 -0

71 lines not on this page · raw message

arch/ppc/syslib/bestcomm/sdma_fec_rx_task.c new file +71 -0

71 lines not on this page · raw message

arch/ppc/syslib/bestcomm/sdma_fec_tx_task.c new file +84 -0

84 lines not on this page · raw message

arch/ppc/syslib/mpc52xx_devices.c +22 -0
@@ -34,6 +34,28 @@ static struct fsl_i2c_platform_data mpc5
    possibly using IORESOURCE_DMA. But that's when BestComm is ready ... */
 
 struct platform_device ppc_sys_platform_devices[] = {
+	[MPC52xx_SDMA] = {
+		.name		= "mpc52xx-sdma",
+		.id		= -1,
+		.num_resources	= 3,
+		.resource	= (struct resource[]) {
+			{
+				.start	= 0x1200,
+				.end	= 0x12ff,
+				.flags	= IORESOURCE_MEM,
+			},
+			{
+				.start	= 0x8000,
+				.end	= 0xbfff,
+				.flags	= IORESOURCE_MEM,
+			},
+			{
+				.start	= MPC52xx_SDMA_IRQ,
+				.end	= MPC52xx_SDMA_IRQ,
+				.flags	= IORESOURCE_IRQ,
+			},
+		},
+	},
 	[MPC52xx_MSCAN1] = {
 		.name		= "mpc52xx-mscan",
 		.id		= 0,
arch/ppc/syslib/mpc52xx_sys.c +2 -2
@@ -21,10 +21,10 @@ struct ppc_sys_spec ppc_sys_specs[] = {
 		.ppc_sys_name	= "5200",
 		.mask		= 0xffff0000,
 		.value		= 0x80110000,
-		.num_devices	= 15,
+		.num_devices	= MPC52xx_NUM_DEVICES,
 		.device_list	= (enum ppc_sys_devices[])
 		{
-			MPC52xx_MSCAN1, MPC52xx_MSCAN2, MPC52xx_SPI,
+			MPC52xx_SDMA, MPC52xx_MSCAN1, MPC52xx_MSCAN2, MPC52xx_SPI,
 			MPC52xx_USB, MPC52xx_BDLC, MPC52xx_PSC1, MPC52xx_PSC2,
 			MPC52xx_PSC3, MPC52xx_PSC4, MPC52xx_PSC5, MPC52xx_PSC6,
 			MPC52xx_FEC, MPC52xx_ATA, MPC52xx_I2C1, MPC52xx_I2C2,
include/asm-ppc/mpc52xx.h +3 -0
@@ -34,6 +34,8 @@ struct pt_regs;
 /* ======================================================================== */
 
 enum ppc_sys_devices {
+	MPC52xx_SDMA,				 /* Must be first device to probe, 
+									else FEC/ATA will failed */
 	MPC52xx_MSCAN1,
 	MPC52xx_MSCAN2,
 	MPC52xx_SPI,
@@ -49,6 +51,7 @@ enum ppc_sys_devices {
 	MPC52xx_ATA,
 	MPC52xx_I2C1,
 	MPC52xx_I2C2,
+	MPC52xx_NUM_DEVICES
 };