Thread (13 messages) 13 messages, 5 authors, 2010-01-26

Re: [PATCH 01/11] fs_enet: Add support for MPC512x to fs_enet driver

From: Scott Wood <hidden>
Date: 2010-01-19 20:51:02
Also in: linuxppc-dev

Anatolij Gustschin wrote:
+struct reg_tbl {
+	void __iomem *fec_ievent;
+	void __iomem *fec_imask;
+	void __iomem *fec_r_des_active;
+	void __iomem *fec_x_des_active;
+	void __iomem *fec_r_des_start;
+	void __iomem *fec_x_des_start;
+	void __iomem *fec_r_cntrl;
+	void __iomem *fec_ecntrl;
+	void __iomem *fec_ivec;
+	void __iomem *fec_mii_speed;
+	void __iomem *fec_addr_low;
+	void __iomem *fec_addr_high;
+	void __iomem *fec_hash_table_high;
+	void __iomem *fec_hash_table_low;
+	void __iomem *fec_r_buff_size;
+	void __iomem *fec_r_bound;
+	void __iomem *fec_r_fstart;
+	void __iomem *fec_x_fstart;
+	void __iomem *fec_fun_code;
+	void __iomem *fec_r_hash;
+	void __iomem *fec_x_cntrl;
+	void __iomem *fec_dma_control;
+};
Why void and not the specific type?
 static void set_promiscuous_mode(struct net_device *dev)
 {
 	struct fs_enet_private *fep = netdev_priv(dev);
-	fec_t __iomem *fecp = fep->fec.fecp;
+	struct reg_tbl *fecp = fep->fec.rtbl;
Hmm, having something called "fecp" that is a different type than other 
"fecp"s could be confusing.
quoted hunk ↗ jump to hunk
@@ -134,6 +143,20 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
 	if (!fec->fecp)
 		goto out_fec;
 
+	if (of_device_is_compatible(ofdev->node, "fsl,mpc5121-fec-mdio")) {
You can put a data pointer in the of_platform match struct, instead of 
re-checking the compatible.

-Scott
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help