€•%XŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”ŒE/translations/zh_CN/networking/device_drivers/ethernet/davicom/dm9000”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”ŒE/translations/zh_TW/networking/device_drivers/ethernet/davicom/dm9000”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”ŒE/translations/it_IT/networking/device_drivers/ethernet/davicom/dm9000”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”ŒE/translations/ja_JP/networking/device_drivers/ethernet/davicom/dm9000”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”ŒE/translations/ko_KR/networking/device_drivers/ethernet/davicom/dm9000”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”ŒE/translations/sp_SP/networking/device_drivers/ethernet/davicom/dm9000”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh£sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h¡hhhžhhŸŒ_/var/lib/git/docbuild/linux/Documentation/networking/device_drivers/ethernet/davicom/dm9000.rst”h KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒDM9000 Network driver”h]”hŒDM9000 Network driver”…””}”(hh»hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hh¶hžhhŸh³h KubhŒ paragraph”“”)”}”(hŒ"Copyright 2008 Simtec Electronics,”h]”hŒ"Copyright 2008 Simtec Electronics,”…””}”(hhËhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khh¶hžhubhŒ block_quote”“”)”}”(hŒ4Ben Dooks ”h]”hÊ)”}”(hŒ2Ben Dooks ”h]”(hŒ Ben Dooks <”…””}”(hhßhžhhŸNh NubhŒ reference”“”)”}”(hŒben@simtec.co.uk”h]”hŒben@simtec.co.uk”…””}”(hhéhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:ben@simtec.co.uk”uh1hçhhßubhŒ> <”…””}”(hhßhžhhŸNh Nubhè)”}”(hŒben-linux@fluff.org”h]”hŒben-linux@fluff.org”…””}”(hhýhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:ben-linux@fluff.org”uh1hçhhßubhŒ>”…””}”(hhßhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K hhÛubah}”(h]”h ]”h"]”h$]”h&]”uh1hÙhŸh³h K hh¶hžhubhµ)”}”(hhh]”(hº)”}”(hŒ Introduction”h]”hŒ Introduction”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjhžhhŸh³h K ubhÊ)”}”(hŒœThis file describes how to use the DM9000 platform-device based network driver that is contained in the files drivers/net/dm9000.c and drivers/net/dm9000.h.”h]”hŒœThis file describes how to use the DM9000 platform-device based network driver that is contained in the files drivers/net/dm9000.c and drivers/net/dm9000.h.”…””}”(hj.hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KhjhžhubhÊ)”}”(hŒðThe driver supports three DM9000 variants, the DM9000E which is the first chip supported as well as the newer DM9000A and DM9000B devices. It is currently maintained and tested by Ben Dooks, who should be CC: to any patches for this driver.”h]”hŒðThe driver supports three DM9000 variants, the DM9000E which is the first chip supported as well as the newer DM9000A and DM9000B devices. It is currently maintained and tested by Ben Dooks, who should be CC: to any patches for this driver.”…””}”(hj<hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khjhžhubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1h´hh¶hžhhŸh³h K ubhµ)”}”(hhh]”(hº)”}”(hŒDefining the platform device”h]”hŒDefining the platform device”…””}”(hjUhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjRhžhhŸh³h KubhÊ)”}”(hŒLThe minimum set of resources attached to the platform device are as follows:”h]”hŒLThe minimum set of resources attached to the platform device are as follows:”…””}”(hjchžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KhjRhžhubhÚ)”}”(hŒ™1) The physical address of the address register 2) The physical address of the data register 3) The IRQ line the device's interrupt pin is connected to. ”h]”hŒenumerated_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒ,The physical address of the address register”h]”hÊ)”}”(hj~h]”hŒ,The physical address of the address register”…””}”(hj€hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khj|ubah}”(h]”h ]”h"]”h$]”h&]”uh1jzhjwubj{)”}”(hŒ)The physical address of the data register”h]”hÊ)”}”(hj•h]”hŒ)The physical address of the data register”…””}”(hj—hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khj“ubah}”(h]”h ]”h"]”h$]”h&]”uh1jzhjwubj{)”}”(hŒ9The IRQ line the device's interrupt pin is connected to. ”h]”hÊ)”}”(hŒ8The IRQ line the device's interrupt pin is connected to.”h]”hŒ:The IRQ line the device’s interrupt pin is connected to.”…””}”(hj®hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khjªubah}”(h]”h ]”h"]”h$]”h&]”uh1jzhjwubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ)”uh1juhjqubah}”(h]”h ]”h"]”h$]”h&]”uh1hÙhŸh³h KhjRhžhubhÊ)”}”(hŒ¢These resources should be specified in that order, as the ordering of the two address regions is important (the driver expects these to be address and then data).”h]”hŒ¢These resources should be specified in that order, as the ordering of the two address regions is important (the driver expects these to be address and then data).”…””}”(hjÓhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K!hjRhžhubhÊ)”}”(hŒ2An example from arch/arm/mach-s3c/mach-bast.c is::”h]”hŒ1An example from arch/arm/mach-s3c/mach-bast.c is:”…””}”(hjáhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K%hjRhžhubhŒ literal_block”“”)”}”(hXstatic struct resource bast_dm9k_resource[] = { [0] = { .start = S3C2410_CS5 + BAST_PA_DM9000, .end = S3C2410_CS5 + BAST_PA_DM9000 + 3, .flags = IORESOURCE_MEM, }, [1] = { .start = S3C2410_CS5 + BAST_PA_DM9000 + 0x40, .end = S3C2410_CS5 + BAST_PA_DM9000 + 0x40 + 0x3f, .flags = IORESOURCE_MEM, }, [2] = { .start = IRQ_DM9000, .end = IRQ_DM9000, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, } }; static struct platform_device bast_device_dm9k = { .name = "dm9000", .id = 0, .num_resources = ARRAY_SIZE(bast_dm9k_resource), .resource = bast_dm9k_resource, };”h]”hXstatic struct resource bast_dm9k_resource[] = { [0] = { .start = S3C2410_CS5 + BAST_PA_DM9000, .end = S3C2410_CS5 + BAST_PA_DM9000 + 3, .flags = IORESOURCE_MEM, }, [1] = { .start = S3C2410_CS5 + BAST_PA_DM9000 + 0x40, .end = S3C2410_CS5 + BAST_PA_DM9000 + 0x40 + 0x3f, .flags = IORESOURCE_MEM, }, [2] = { .start = IRQ_DM9000, .end = IRQ_DM9000, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, } }; static struct platform_device bast_device_dm9k = { .name = "dm9000", .id = 0, .num_resources = ARRAY_SIZE(bast_dm9k_resource), .resource = bast_dm9k_resource, };”…””}”hjñsbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1jïhŸh³h K'hjRhžhubhÊ)”}”(hX Note the setting of the IRQ trigger flag in bast_dm9k_resource[2].flags, as this will generate a warning if it is not present. The trigger from the flags field will be passed to request_irq() when registering the IRQ handler to ensure that the IRQ is setup correctly.”h]”hX Note the setting of the IRQ trigger flag in bast_dm9k_resource[2].flags, as this will generate a warning if it is not present. The trigger from the flags field will be passed to request_irq() when registering the IRQ handler to ensure that the IRQ is setup correctly.”…””}”(hjÿhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K@hjRhžhubhÊ)”}”(hŒÑThis shows a typical platform device, without the optional configuration platform data supplied. The next example uses the same resources, but adds the optional platform data to pass extra configuration data::”h]”hŒÐThis shows a typical platform device, without the optional configuration platform data supplied. The next example uses the same resources, but adds the optional platform data to pass extra configuration data:”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KEhjRhžhubjð)”}”(hX–static struct dm9000_plat_data bast_dm9k_platdata = { .flags = DM9000_PLATF_16BITONLY, }; static struct platform_device bast_device_dm9k = { .name = "dm9000", .id = 0, .num_resources = ARRAY_SIZE(bast_dm9k_resource), .resource = bast_dm9k_resource, .dev = { .platform_data = &bast_dm9k_platdata, } };”h]”hX–static struct dm9000_plat_data bast_dm9k_platdata = { .flags = DM9000_PLATF_16BITONLY, }; static struct platform_device bast_device_dm9k = { .name = "dm9000", .id = 0, .num_resources = ARRAY_SIZE(bast_dm9k_resource), .resource = bast_dm9k_resource, .dev = { .platform_data = &bast_dm9k_platdata, } };”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1jïhŸh³h KIhjRhžhubhÊ)”}”(hŒKThe platform data is defined in include/linux/dm9000.h and described below.”h]”hŒKThe platform data is defined in include/linux/dm9000.h and described below.”…””}”(hj)hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KWhjRhžhubeh}”(h]”Œdefining-the-platform-device”ah ]”h"]”Œdefining the platform device”ah$]”h&]”uh1h´hh¶hžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒ Platform data”h]”hŒ Platform data”…””}”(hjBhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj?hžhhŸh³h K[ubhÊ)”}”(hŒÂExtra platform data for the DM9000 can describe the IO bus width to the device, whether or not an external PHY is attached to the device and the availability of an external configuration EEPROM.”h]”hŒÂExtra platform data for the DM9000 can describe the IO bus width to the device, whether or not an external PHY is attached to the device and the availability of an external configuration EEPROM.”…””}”(hjPhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K]hj?hžhubhÊ)”}”(hŒ