diff options
author | Alex Landau <landau.alex@gmail.com> | 2007-07-12 00:11:48 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-07-12 00:11:48 -0400 |
commit | f40d24d909ad99c802a6813ff32b6feb20ab8c71 (patch) | |
tree | 5404a10d8c894f82334965a4ea5af603ac334b6e /drivers/net | |
parent | 9be343c5bcd1cf285c2150f363bc9dd7aab8b7fb (diff) |
Blackfin arch: Port the dm9000 driver to Blackfin by using the correct low-level io routines
Signed-off-by: Alex Landau <landau.alex@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/Kconfig | 2 | ||||
-rw-r--r-- | drivers/net/dm9000.c | 17 |
2 files changed, 17 insertions, 2 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index b941c74a06c4..80572e2c9dab 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -877,7 +877,7 @@ config NET_NETX | |||
877 | 877 | ||
878 | config DM9000 | 878 | config DM9000 |
879 | tristate "DM9000 support" | 879 | tristate "DM9000 support" |
880 | depends on ARM || MIPS | 880 | depends on ARM || BLACKFIN || MIPS |
881 | select CRC32 | 881 | select CRC32 |
882 | select MII | 882 | select MII |
883 | ---help--- | 883 | ---help--- |
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index 264fa0e2e075..c3de81bf090a 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c | |||
@@ -104,6 +104,18 @@ | |||
104 | #define PRINTK(args...) printk(KERN_DEBUG args) | 104 | #define PRINTK(args...) printk(KERN_DEBUG args) |
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | #ifdef CONFIG_BLACKFIN | ||
108 | #define readsb insb | ||
109 | #define readsw insw | ||
110 | #define readsl insl | ||
111 | #define writesb outsb | ||
112 | #define writesw outsw | ||
113 | #define writesl outsl | ||
114 | #define DM9000_IRQ_FLAGS (IRQF_SHARED | IRQF_TRIGGER_HIGH) | ||
115 | #else | ||
116 | #define DM9000_IRQ_FLAGS IRQF_SHARED | ||
117 | #endif | ||
118 | |||
107 | /* | 119 | /* |
108 | * Transmit timeout, default 5 seconds. | 120 | * Transmit timeout, default 5 seconds. |
109 | */ | 121 | */ |
@@ -431,6 +443,9 @@ dm9000_probe(struct platform_device *pdev) | |||
431 | db->io_addr = (void __iomem *)base; | 443 | db->io_addr = (void __iomem *)base; |
432 | db->io_data = (void __iomem *)(base + 4); | 444 | db->io_data = (void __iomem *)(base + 4); |
433 | 445 | ||
446 | /* ensure at least we have a default set of IO routines */ | ||
447 | dm9000_set_io(db, 2); | ||
448 | |||
434 | } else { | 449 | } else { |
435 | db->addr_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 450 | db->addr_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
436 | db->data_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); | 451 | db->data_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
@@ -614,7 +629,7 @@ dm9000_open(struct net_device *dev) | |||
614 | 629 | ||
615 | PRINTK2("entering dm9000_open\n"); | 630 | PRINTK2("entering dm9000_open\n"); |
616 | 631 | ||
617 | if (request_irq(dev->irq, &dm9000_interrupt, IRQF_SHARED, dev->name, dev)) | 632 | if (request_irq(dev->irq, &dm9000_interrupt, DM9000_IRQ_FLAGS, dev->name, dev)) |
618 | return -EAGAIN; | 633 | return -EAGAIN; |
619 | 634 | ||
620 | /* Initialize DM9000 board */ | 635 | /* Initialize DM9000 board */ |