€•XCŒ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”Œ$/translations/zh_CN/driver-api/zorro”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/zh_TW/driver-api/zorro”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/it_IT/driver-api/zorro”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/ja_JP/driver-api/zorro”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/ko_KR/driver-api/zorro”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/pt_BR/driver-api/zorro”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/sp_SP/driver-api/zorro”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ(Writing Device Drivers for Zorro Devices”h]”hŒ(Writing Device Drivers for Zorro Devices”…””}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³Œ>/var/lib/git/docbuild/linux/Documentation/driver-api/zorro.rst”h´KubhŒ field_list”“”)”}”(hhh]”(hŒfield”“”)”}”(hhh]”(hŒ field_name”“”)”}”(hŒAuthor”h]”hŒAuthor”…””}”(hh×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhhÒh³hÊh´KubhŒ field_body”“”)”}”(hŒ4Written by Geert Uytterhoeven ”h]”hŒ paragraph”“”)”}”(hhéh]”(hŒWritten by Geert Uytterhoeven <”…””}”(hhíh²hh³Nh´NubhŒ reference”“”)”}”(hŒgeert@linux-m68k.org”h]”hŒgeert@linux-m68k.org”…””}”(hhöh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:geert@linux-m68k.org”uh1hôhhíubhŒ>”…””}”(hhíh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Khhçubah}”(h]”h ]”h"]”h$]”h&]”uh1håhhÒubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÐh³hÊh´KhhÍh²hubhÑ)”}”(hhh]”(hÖ)”}”(hŒ Last revised”h]”hŒ Last revised”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjh³hÊh´Kubhæ)”}”(hŒSeptember 5, 2003 ”h]”hì)”}”(hŒSeptember 5, 2003”h]”hŒSeptember 5, 2003”…””}”(hj1h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Khj-ubah}”(h]”h ]”h"]”h$]”h&]”uh1håhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÐh³hÊh´KhhÍh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËhh·h²hh³hÊh´Kubh¶)”}”(hhh]”(h»)”}”(hŒ Introduction”h]”hŒ Introduction”…””}”(hjTh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjQh²hh³hÊh´K ubhì)”}”(hŒrThe Zorro bus is the bus used in the Amiga family of computers. Thanks to AutoConfig(tm), it's 100% Plug-and-Play.”h]”hŒtThe Zorro bus is the bus used in the Amiga family of computers. Thanks to AutoConfig(tm), it’s 100% Plug-and-Play.”…””}”(hjbh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K hjQh²hubhì)”}”(hŒ;There are two types of Zorro buses, Zorro II and Zorro III:”h]”hŒ;There are two types of Zorro buses, Zorro II and Zorro III:”…””}”(hjph²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´KhjQh²hubhŒ block_quote”“”)”}”(hŒÿ- The Zorro II address space is 24-bit and lies within the first 16 MB of the Amiga's address map. - Zorro III is a 32-bit extension of Zorro II, which is backwards compatible with Zorro II. The Zorro III address space lies outside the first 16 MB. ”h]”hŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒaThe Zorro II address space is 24-bit and lies within the first 16 MB of the Amiga's address map. ”h]”hì)”}”(hŒ`The Zorro II address space is 24-bit and lies within the first 16 MB of the Amiga's address map.”h]”hŒbThe Zorro II address space is 24-bit and lies within the first 16 MB of the Amiga’s address map.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´Khj‹ubah}”(h]”h ]”h"]”h$]”h&]”uh1j‰hj†ubjŠ)”}”(hŒ•Zorro III is a 32-bit extension of Zorro II, which is backwards compatible with Zorro II. The Zorro III address space lies outside the first 16 MB. ”h]”hì)”}”(hŒ“Zorro III is a 32-bit extension of Zorro II, which is backwards compatible with Zorro II. The Zorro III address space lies outside the first 16 MB.”h]”hŒ“Zorro III is a 32-bit extension of Zorro II, which is backwards compatible with Zorro II. The Zorro III address space lies outside the first 16 MB.”…””}”(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&]”Œbullet”Œ-”uh1j„h³hÊh´Khj€ubah}”(h]”h ]”h"]”h$]”h&]”uh1j~h³hÊh´KhjQh²hubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1hµhh·h²hh³hÊh´K ubh¶)”}”(hhh]”(h»)”}”(hŒProbing for Zorro Devices”h]”hŒProbing for Zorro Devices”…””}”(hjÔh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÑh²hh³hÊh´Kubhì)”}”(hŒÖZorro devices are found by calling ``zorro_find_device()``, which returns a pointer to the ``next`` Zorro device with the specified Zorro ID. A probe loop for the board with Zorro ID ``ZORRO_PROD_xxx`` looks like::”h]”(hŒ#Zorro devices are found by calling ”…””}”(hjâh²hh³Nh´NubhŒliteral”“”)”}”(hŒ``zorro_find_device()``”h]”hŒzorro_find_device()”…””}”(hjìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jêhjâubhŒ!, which returns a pointer to the ”…””}”(hjâh²hh³Nh´Nubjë)”}”(hŒ``next``”h]”hŒnext”…””}”(hjþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jêhjâubhŒT Zorro device with the specified Zorro ID. A probe loop for the board with Zorro ID ”…””}”(hjâh²hh³Nh´Nubjë)”}”(hŒ``ZORRO_PROD_xxx``”h]”hŒZORRO_PROD_xxx”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jêhjâubhŒ looks like:”…””}”(hjâh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´KhjÑh²hubhŒ literal_block”“”)”}”(hŒÏstruct zorro_dev *z = NULL; while ((z = zorro_find_device(ZORRO_PROD_xxx, z))) { if (!zorro_request_region(z->resource.start+MY_START, MY_SIZE, "My explanation")) ... }”h]”hŒÏstruct zorro_dev *z = NULL; while ((z = zorro_find_device(ZORRO_PROD_xxx, z))) { if (!zorro_request_region(z->resource.start+MY_START, MY_SIZE, "My explanation")) ... }”…””}”hj*sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1j(h³hÊh´KhjÑh²hubhì)”}”(hŒ“``ZORRO_WILDCARD`` acts as a wildcard and finds any Zorro device. If your driver supports different types of boards, you can use a construct like::”h]”(jë)”}”(hŒ``ZORRO_WILDCARD``”h]”hŒZORRO_WILDCARD”…””}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jêhj:ubhŒ€ acts as a wildcard and finds any Zorro device. If your driver supports different types of boards, you can use a construct like:”…””}”(hj:h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K'hjÑh²hubj))”}”(hX&struct zorro_dev *z = NULL; while ((z = zorro_find_device(ZORRO_WILDCARD, z))) { if (z->id != ZORRO_PROD_xxx1 && z->id != ZORRO_PROD_xxx2 && ...) continue; if (!zorro_request_region(z->resource.start+MY_START, MY_SIZE, "My explanation")) ... }”h]”hX&struct zorro_dev *z = NULL; while ((z = zorro_find_device(ZORRO_WILDCARD, z))) { if (z->id != ZORRO_PROD_xxx1 && z->id != ZORRO_PROD_xxx2 && ...) continue; if (!zorro_request_region(z->resource.start+MY_START, MY_SIZE, "My explanation")) ... }”…””}”hjVsbah}”(h]”h ]”h"]”h$]”h&]”j8j9uh1j(h³hÊh´K*hjÑh²hubeh}”(h]”Œprobing-for-zorro-devices”ah ]”h"]”Œprobing for zorro devices”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kubh¶)”}”(hhh]”(h»)”}”(hŒZorro Resources”h]”hŒZorro Resources”…””}”(hjoh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjlh²hh³hÊh´K6ubhì)”}”(hŒ¤Before you can access a Zorro device's registers, you have to make sure it's not yet in use. This is done using the I/O memory space resource management functions::”h]”hŒ§Before you can access a Zorro device’s registers, you have to make sure it’s not yet in use. This is done using the I/O memory space resource management functions:”…””}”(hj}h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÊh´K8hjlh²hubj))”}”(hŒ)request_mem_region() release_mem_region()”h]”hŒ)request_mem_region() release_mem_region()”…””}”hj‹sbah}”(h]”h ]”h"]”h$]”h&]”j8j9uh1j(h³hÊh´KŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jjjÎjËjijfjºj·j\jYjj uŒ nametypes”}”(j‰jΉji‰jº‰j\‰j‰uh}”(jh·jËjQjfjÑj·jljYj½j j_uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.