Commit 679b7083f415f05f55d96e40e9cf8968390276f6

Authored by Peng Fan
1 parent e552c624a0

MLK-10812-6 net: fec: add platform check to avoid to access the reserved register

Add platform check to avoid to access the reserved register

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>

Showing 1 changed file with 4 additions and 1 deletions Side-by-side Diff

drivers/net/fec_mxc.c
... ... @@ -529,8 +529,10 @@
529 529 static int fec_init(struct eth_device *dev, bd_t* bd)
530 530 {
531 531 struct fec_priv *fec = (struct fec_priv *)dev->priv;
  532 +#if !defined(CONFIG_MX6UL)
532 533 uint32_t mib_ptr = (uint32_t)&fec->eth->rmon_t_drop;
533 534 int i;
  535 +#endif
534 536  
535 537 /* Initialize MAC address */
536 538 fec_set_hwaddr(dev);
537 539  
... ... @@ -559,13 +561,14 @@
559 561 writel(0x00000000, &fec->eth->gaddr1);
560 562 writel(0x00000000, &fec->eth->gaddr2);
561 563  
562   -
  564 +#if !defined(CONFIG_MX6UL)
563 565 /* clear MIB RAM */
564 566 for (i = mib_ptr; i <= mib_ptr + 0xfc; i += 4)
565 567 writel(0, i);
566 568  
567 569 /* FIFO receive start register */
568 570 writel(0x520, &fec->eth->r_fstart);
  571 +#endif
569 572  
570 573 /* size and address of each buffer */
571 574 writel(FEC_MAX_PKT_SIZE, &fec->eth->emrbr);