Lines Matching +full:resource +full:- +full:files
3 # It also adds FOO and files.FOO configuration files so you can compile
30 TOP=`cd /sys; pwd -P`
37 if [ -d ${TOP}/modules/${1} ]; then
39 echo -n "Should it be overwritten? [Y]"
41 if [ "-z" "$VAL" ]; then
47 rm -rf ${TOP}/dev/${1}
48 rm -rf ${TOP}/modules/${1}
49 rm ${TOP}/conf/files.${UPPER}
59 echo "The following files will be created:"
61 echo ${TOP}/conf/files.${UPPER}
82 cat >${TOP}/conf/files.${UPPER} <<DONE
92 files "${TOP}/conf/files.${UPPER}"
107 if [ ! -d ${TOP}/dev/${1} ]; then
108 mkdir -p ${TOP}/dev/${1}
155 #include <machine/resource.h>
165 /* XXX These should be defined in terms of bus-space ops. */
175 #define DEV2SOFTC(dev) ((struct ${1}_softc *) (dev)->si_drv1)
195 struct resource* res_ioport; /* Resource for port range. */
196 struct resource* res_memory; /* Resource for mem range. */
197 struct resource* res_irq; /* Resource for irq range. */
198 struct resource* res_drq; /* Resource for dma channel. */
202 void *vaddr; /* Virtual address of mem resource. */
269 * This list should only be used for cards that have some non-destructive
294 * some pnp-like method, or at least mentioned in the hints.
296 * For NON-PNP "dumb" devices:
304 * For NON-PNP "Smart" devices:
305 * If the device has a NON-PNP way of being detected and setting/sensing
391 scp->device = device;
399 * -- logic from if_ed_isa.c, added info from isa/isa_if.m:
404 * and return a value of '-2' or something if we could
407 * do all the extended functions. (See non-pnp part for more info).
421 * in case we are looking for an old pre-PNP card.
429 * and kern/subr_bus.c to create resource entries,
431 * Note that HINTS based resource requests have NO
450 * Make a temporary resource reservation.
474 * or set the memory size in the child resource list.
480 * We found one, return non-positive numbers..
481 * Return -N if we can't handle it, but not well.
482 * Return -2 if we would LIKE the device.
483 * Return -1 if we want it a lot.
488 error = -1; /* We want it but someone else
515 * any (yay new-bus!).
590 * This would allow a specific driver to over-ride us.
592 * See the comments in the ISA section regarding returning non-positive
601 while (ep->type && ep->type != type)
603 if (ep->desc) {
604 device_set_desc(device, ep->desc);
605 return 0; /* If there might be a better driver, return -2 */
634 * Common Attachment sub-functions
643 scp->dev = make_dev(&${1}_cdevsw, 0,
645 scp->dev->si_drv1 = scp;
650 scp->bt = rman_get_bustag(scp->res_ioport);
651 scp->bh = rman_get_bushandle(scp->res_ioport);
666 if (scp->res_irq) {
668 if (BUS_SETUP_INTR(parent, device, scp->res_irq, INTR_TYPE_TTY,
669 ${1}intr, scp, &scp->intr_cookie) == 0) {
683 scp->vaddr = rman_get_virtual(scp->res_memory);
716 if (scp->intr_cookie != NULL) {
718 scp->res_irq, scp->intr_cookie) != 0)
720 scp->intr_cookie = NULL;
727 scp->vaddr = NULL;
738 scp->res_ioport = bus_alloc_resource(device, SYS_RES_IOPORT,
739 &scp->rid_ioport, 0ul, ~0ul, size, RF_ACTIVE);
740 if (scp->res_ioport == NULL)
743 scp->res_irq = bus_alloc_resource(device, SYS_RES_IRQ,
744 &scp->rid_irq, 0ul, ~0ul, 1, RF_SHAREABLE|RF_ACTIVE);
745 if (scp->res_irq == NULL)
748 scp->res_drq = bus_alloc_resource(device, SYS_RES_DRQ,
749 &scp->rid_drq, 0ul, ~0ul, 1, RF_ACTIVE);
750 if (scp->res_drq == NULL)
753 scp->res_memory = bus_alloc_resource(device, SYS_RES_MEMORY,
754 &scp->rid_memory, 0ul, ~0ul, MSIZE, RF_ACTIVE);
755 if (scp->res_memory == NULL)
771 if (scp->res_irq != 0) {
773 scp->rid_irq, scp->res_irq);
775 scp->rid_irq, scp->res_irq);
776 scp->res_irq = 0;
778 if (scp->res_ioport != 0) {
780 scp->rid_ioport, scp->res_ioport);
782 scp->rid_ioport, scp->res_ioport);
783 scp->res_ioport = 0;
785 if (scp->res_memory != 0) {
787 scp->rid_memory, scp->res_memory);
789 scp->rid_memory, scp->res_memory);
790 scp->res_memory = 0;
792 if (scp->res_drq != 0) {
794 scp->rid_drq, scp->res_drq);
796 scp->rid_drq, scp->res_drq);
797 scp->res_drq = 0;
799 if (scp->dev)
800 destroy_dev(scp->dev);
876 toread = (min(uio->uio_resid, sizeof(scp->buffer)));
877 return(uiomove(scp->buffer, toread, uio));
891 towrite = (min(uio->uio_resid, sizeof(scp->buffer)));
892 return(uiomove(scp->buffer, towrite, uio));
906 if (offset > FRAMEBUFFERSIZE - PAGE_SIZE)
907 return (-1);
910 return (-1);
948 if [ ! -d ${TOP}/modules/${1} ]; then
949 mkdir -p ${TOP}/modules/${1}
967 echo -n "Do you want to build the '${1}' module? [Y]"
969 if [ "-z" "$VAL" ]; then
982 echo -n "Do you want to build the '${UPPER}' kernel? [Y]"
984 if [ "-z" "$VAL" ]; then
1002 #--------------end of script---------------