€•YŒ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ŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”ŒE/translations/pt_BR/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”…””}”(hjh²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”…””}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj1h²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.”…””}”(hjBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj1h²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.”…””}”(hjPh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj1h²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”…””}”(hjih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjfh²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:”…””}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khjfh²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´Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhj‹ubj)”}”(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&]”uh1jŽhj‹ubj)”}”(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&]”uh1jŽhj‹ubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ)”uh1j‰hj…ubah}”(h]”h ]”h"]”h$]”h&]”uh1híh³hÇh´Khjfh²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!hjfh²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%hjfh²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, };”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jh³hÇh´K'hjfh²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.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K@hjfh²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´KEhjfh²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, } };”…””}”hj/sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jh³hÇh´KIhjfh²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´KWhjfh²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”…””}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjSh²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.”…””}”(hjdh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K]hjSh²hubhÞ)”}”(hŒ