- 论坛徽章:
- 0
|
一块板子上有四个DM9000的网卡,现在linux内核只能驱动一个网卡eth0,别的都不能用,怎么办?
驱动程序是好的
/* DM9000 Drivers*/
/* address:nGCS1->0x08000000*/
/* Base addr->0x300*/
/* INT->EINT4*/
static struct resource smdk_dm9k0_resource[] = {
[0] = {
.start = S3C2410_CS1 + 0x300 + 0x0,
.end = S3C2410_CS1 + 0x300 + 0x3,
.flags = IORESOURCE_MEM
},
[1] = {
.start = S3C2410_CS1 + 0x300 + 0x4 ,
.end = S3C2410_CS1 + 0x300 + 0x4 + 0x3f,
.flags = IORESOURCE_MEM
},
[2] = {
.start = IRQ_EINT4,
.end = IRQ_EINT4,
.flags = IORESOURCE_IRQ
}
};
/**static struct resource smdk_dm9k1_resource[] = {
[0] = {
.start = S3C2410_CS3 + 0x300 + 0x0,
.end = S3C2410_CS3 + 0x300 + 0x3,
.flags = IORESOURCE_MEM
},
[1] = {
.start = S3C2410_CS3 + 0x300 + 0x4 ,
.end = S3C2410_CS3 + 0x300 + 0x4 + 0x3f,
.flags = IORESOURCE_MEM
},
[2] = {
.start = IRQ_EINT6,
.end = IRQ_EINT6,
.flags = IORESOURCE_IRQ
}
};**/
/*static struct resource smdk_dm9k2_resource[] = {
{
.start = S3C2410_CS4+ 0x300 + 0x0,
.end = S3C2410_CS4 + 0x300 + 0x3,
.flags = IORESOURCE_MEM,
}, {
.start = S3C2410_CS4 + 0x300 + 0x4,
.end = S3C2410_CS4 + 0x300 + 0x4 + 0x3f,
.flags = IORESOURCE_MEM,
}, {
.start = IRQ_EINT7,
.end = IRQ_EINT7,
.flags = IORESOURCE_IRQ,
},
};
* for the moment we limit ourselves to 16bit IO until some
* better IO routines can be written and tested
*/
static struct dm9000_plat_data smdk_dm9k_platdata = {
.flags = DM9000_PLATF_16BITONLY
};
/*static struct dm9000_plat_data smdk_vfd_platdata = {
.flags = DM9000_PLATF_8BITONLY
};
static struct platform_device smdk_device_dm9k2 = {
.name = "vfd",
.id = 2,
.num_resources = ARRAY_SIZE(smdk_dm9k2_resource),
.resource = smdk_dm9k2_resource,
.dev = {
.platform_data = &smdk_vfd_platdata,
}
};*/
static struct platform_device smdk_device_dm9k0 = {
.name = "dm9000",
.id = 0,
.num_resources = ARRAY_SIZE(smdk_dm9k0_resource),
.resource = smdk_dm9k0_resource,
.dev = {
.platform_data = &smdk_dm9k_platdata,
}
};
/**static struct platform_device smdk_device_dm9k1 = {
.name = "dm9000",
.id = 1,
.num_resources = ARRAY_SIZE(smdk_dm9k1_resource),
.resource = smdk_dm9k1_resource,
.dev = {
.platform_data = &smdk_dm9k_platdata,
}
};**/
#define UCON S3C2410_UCON_DEFAULT
#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
static struct s3c2410_uartcfg smdk2410_uartcfgs[] = {
[0] = {
.hwport = 0,
.flags = 0,
.ucon = UCON,
.ulcon = ULCON,
.ufcon = UFCON,
},
[1] = {
.hwport = 1,
.flags = 0,
.ucon = UCON,
.ulcon = ULCON,
.ufcon = UFCON,
},
[2] = {
.hwport = 2,
.flags = 0,
.ucon = UCON,
.ulcon = ULCON,
.ufcon = UFCON,
}
};
static struct platform_device *smdk2410_devices[] __initdata = {
&s3c_device_usb,
// &s3c_device_lcd,
&s3c_device_wdt,
&s3c_device_i2c,
&s3c_device_iis,
&s3c_device_nand,
&smdk_device_dm9k0,
//// &smdk_device_dm9k1,
// &smdk_device_dm9k2,
}; |
|