Lines Matching +full:a +full:- +full:z
4 * Copyright (C) 1995-2003 Geert Uytterhoeven
19 #include <linux/dma-mapping.h>
55 struct zorro_dev *z; in zorro_find_device() local
60 for (z = from ? from+1 : &zorro_autocon[0]; in zorro_find_device()
61 z < zorro_autocon+zorro_num_autocon; in zorro_find_device()
62 z++) in zorro_find_device()
63 if (id == ZORRO_WILDCARD || id == z->id) in zorro_find_device()
64 return z; in zorro_find_device()
72 * by the system. Every bit represents a 64K chunk, for a maximum of 8MB
73 * (128 chunks, physical 0x00200000-0x009fffff).
79 * - z2ram device
80 * - SCSI DMA bounce buffers
101 start = start < Z2RAM_START ? 0x00000000 : start-Z2RAM_START; in mark_region()
102 end = end > Z2RAM_END ? Z2RAM_SIZE : end-Z2RAM_START; in mark_region()
116 struct platform_device *bridge, struct zorro_dev *z) in zorro_find_parent_resource() argument
120 for (i = 0; i < bridge->num_resources; i++) { in zorro_find_parent_resource()
121 if (resource_contains(&bridge->resource[i], &z->resource)) in zorro_find_parent_resource()
122 return &bridge->resource[i]; in zorro_find_parent_resource()
132 struct zorro_dev *z; in amiga_zorro_probe() local
141 return -ENOMEM; in amiga_zorro_probe()
143 zorro_autocon = bus->devices; in amiga_zorro_probe()
144 bus->dev.parent = &pdev->dev; in amiga_zorro_probe()
145 dev_set_name(&bus->dev, zorro_bus_type.name); in amiga_zorro_probe()
146 error = device_register(&bus->dev); in amiga_zorro_probe()
149 put_device(&bus->dev); in amiga_zorro_probe()
161 z = &zorro_autocon[i]; in amiga_zorro_probe()
163 z->rom = zi->rom; in amiga_zorro_probe()
164 z->id = (be16_to_cpu(z->rom.er_Manufacturer) << 16) | in amiga_zorro_probe()
165 (z->rom.er_Product << 8); in amiga_zorro_probe()
166 if (z->id == ZORRO_PROD_GVP_EPC_BASE) { in amiga_zorro_probe()
168 unsigned long magic = zi->boardaddr + 0x8000; in amiga_zorro_probe()
170 z->id |= *(u16 *)ZTWO_VADDR(magic) & GVP_PRODMASK; in amiga_zorro_probe()
172 z->slotaddr = zi->slotaddr; in amiga_zorro_probe()
173 z->slotsize = zi->slotsize; in amiga_zorro_probe()
174 sprintf(z->name, "Zorro device %08x", z->id); in amiga_zorro_probe()
175 zorro_name_device(z); in amiga_zorro_probe()
176 z->resource = DEFINE_RES_MEM_NAMED(zi->boardaddr, zi->boardsize, z->name); in amiga_zorro_probe()
177 r = zorro_find_parent_resource(pdev, z); in amiga_zorro_probe()
178 error = request_resource(r, &z->resource); in amiga_zorro_probe()
179 if (error && !(z->rom.er_Type & ERTF_MEMLIST)) in amiga_zorro_probe()
180 dev_err(&bus->dev, in amiga_zorro_probe()
182 z->name, &z->resource); in amiga_zorro_probe()
183 z->dev.parent = &bus->dev; in amiga_zorro_probe()
184 z->dev.bus = &zorro_bus_type; in amiga_zorro_probe()
185 z->dev.id = i; in amiga_zorro_probe()
186 switch (z->rom.er_Type & ERT_TYPEMASK) { in amiga_zorro_probe()
188 z->dev.coherent_dma_mask = DMA_BIT_MASK(32); in amiga_zorro_probe()
193 z->dev.coherent_dma_mask = DMA_BIT_MASK(24); in amiga_zorro_probe()
196 z->dev.dma_mask = &z->dev.coherent_dma_mask; in amiga_zorro_probe()
201 z = &zorro_autocon[i]; in amiga_zorro_probe()
202 error = device_register(&z->dev); in amiga_zorro_probe()
204 dev_err(&bus->dev, "Error registering device %s\n", in amiga_zorro_probe()
205 z->name); in amiga_zorro_probe()
206 put_device(&z->dev); in amiga_zorro_probe()
212 zorro_for_each_dev(z) { in amiga_zorro_probe()
213 if (z->rom.er_Type & ERTF_MEMLIST) in amiga_zorro_probe()
214 mark_region(zorro_resource_start(z), in amiga_zorro_probe()
215 zorro_resource_end(z)+1, 1); in amiga_zorro_probe()
230 .name = "amiga-zorro",