~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/net/cs89x0.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
  Dmitry Pervushin  : dpervushin@ru.mvista.com
96
96
                    : PNX010X platform support
97
97
 
 
98
  Domenico Andreoli : cavokz@gmail.com
 
99
                    : QQ2440 platform support
 
100
 
98
101
*/
99
102
 
100
103
/* Always include 'config.h' first in case the user wants to turn on
176
179
#elif defined(CONFIG_ARCH_IXDP2X01)
177
180
static unsigned int netcard_portlist[] __used __initdata = {IXDP2X01_CS8900_VIRT_BASE, 0};
178
181
static unsigned int cs8900_irq_map[] = {IRQ_IXDP2X01_CS8900, 0, 0, 0};
 
182
#elif defined(CONFIG_MACH_QQ2440)
 
183
#include <mach/qq2440.h>
 
184
static unsigned int netcard_portlist[] __used __initdata = { QQ2440_CS8900_VIRT_BASE + 0x300, 0 };
 
185
static unsigned int cs8900_irq_map[] = { QQ2440_CS8900_IRQ, 0, 0, 0 };
179
186
#elif defined(CONFIG_MACH_MX31ADS)
180
187
#include <mach/board-mx31ads.h>
181
188
static unsigned int netcard_portlist[] __used __initdata = {
521
528
#endif
522
529
                lp->force = g_cs89x0_media__force;
523
530
#endif
 
531
 
 
532
#if defined(CONFIG_MACH_QQ2440)
 
533
                lp->force |= FORCE_RJ45 | FORCE_FULL;
 
534
#endif
524
535
        }
525
536
 
526
537
        /* Grab the region so we can find another board if autoIRQ fails. */
943
954
static void __init reset_chip(struct net_device *dev)
944
955
{
945
956
#if !defined(CONFIG_MACH_MX31ADS)
946
 
#if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01)
 
957
#if !defined(CS89x0_NONISA_IRQ)
947
958
        struct net_local *lp = netdev_priv(dev);
948
959
        int ioaddr = dev->base_addr;
949
 
#endif
 
960
#endif /* CS89x0_NONISA_IRQ */
950
961
        int reset_start_time;
951
962
 
952
963
        writereg(dev, PP_SelfCTL, readreg(dev, PP_SelfCTL) | POWER_ON_RESET);
954
965
        /* wait 30 ms */
955
966
        msleep(30);
956
967
 
957
 
#if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01)
 
968
#if !defined(CS89x0_NONISA_IRQ)
958
969
        if (lp->chip_type != CS8900) {
959
970
                /* Hardware problem requires PNP registers to be reconfigured after a reset */
960
971
                writeword(ioaddr, ADD_PORT, PP_CS8920_ISAINT);
965
976
                outb((dev->mem_start >> 16) & 0xff, ioaddr + DATA_PORT);
966
977
                outb((dev->mem_start >> 8) & 0xff,   ioaddr + DATA_PORT + 1);
967
978
        }
968
 
#endif  /* IXDP2x01 */
 
979
#endif /* CS89x0_NONISA_IRQ */
969
980
 
970
981
        /* Wait until the chip is reset */
971
982
        reset_start_time = jiffies;