€•¾CŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”(hhŒparent”hubaŒ 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)”…””}”(hhhh2ubah}”(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”…””}”(hhhhFubah}”(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”…””}”(hhhhZubah}”(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”…””}”(hhhhnubah}”(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ŒSpanish”…””}”(hhhh‚ubah}”(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ª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Å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 <”…””}”(hŒWritten by Geert Uytterhoeven <”hhÙhžhhŸNh NubhŒ reference”“”)”}”(hŒgeert@linux-m68k.org”h]”hŒgeert@linux-m68k.org”…””}”(hhhhãhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:geert@linux-m68k.org”uh1háhhÙubhŒ>”…””}”(hŒ>”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”…””}”(hjhj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÁhj hŸh¶h KubhÒ)”}”(hŒSeptember 5, 2003 ”h]”hØ)”}”(hŒSeptember 5, 2003”h]”hŒSeptember 5, 2003”…””}”(hj!hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑhj ubeh}”(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”…””}”(hjDhjBhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj?hž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.”…””}”(hjRhjPhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K hj?hž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:”…””}”(hj`hj^hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h Khj?hžhubhŒ block_quote”“”)”}”(hhh]”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.”…””}”(hj~hj|hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h Khjxubah}”(h]”h ]”h"]”h$]”h&]”uh1jvhjsubjw)”}”(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–hj”hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1jvhjsubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jqhŸh¶h Khjnubah}”(h]”h ]”h"]”h$]”h&]”uh1jlhj?hžhhŸNh Nubeh}”(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Ã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 ”…””}”(hŒ#Zorro devices are found by calling ”hjÏhžhhŸNh NubhŒliteral”“”)”}”(hŒ``zorro_find_device()``”h]”hŒzorro_find_device()”…””}”(hhhjÚhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jØhjÏubhŒ!, which returns a pointer to the ”…””}”(hŒ!, which returns a pointer to the ”hjÏhžhhŸNh NubjÙ)”}”(hŒ``next``”h]”hŒnext”…””}”(hhhjí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 ”…””}”(hŒ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”…””}”(hhhjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jØhjÏubhŒ looks like:”…””}”(hŒ 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")) ... }”…””}”(hhhjubah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jhŸ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”…””}”(hhhj/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:”…””}”(hŒ€ 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")) ... }”…””}”(hhhjHubah}”(h]”h ]”h"]”h$]”h&]”j)j*uh1jhŸ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”…””}”(hjchjahžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj^hž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:”…””}”(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:”hjohžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K8hj^hžhubj)”}”(hŒ)request_mem_region() release_mem_region()”h]”hŒ)request_mem_region() release_mem_region()”…””}”(hhhj~ubah}”(h]”h ]”h"]”h$]”h&]”j)j*uh1jhŸh¶h K