musb_otg_atmelarm.c (186439) | musb_otg_atmelarm.c (187170) |
---|---|
1/* $FreeBSD: head/sys/dev/usb2/controller/musb2_otg_atmelarm.c 186439 2008-12-23 17:36:25Z thompsa $ */ | 1/* $FreeBSD: head/sys/dev/usb2/controller/musb2_otg_atmelarm.c 187170 2009-01-13 19:02:40Z thompsa $ */ |
2/*- 3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. --- 87 unchanged lines hidden (view full) --- 97 return (ENXIO); 98 } 99 /* setup MUSB OTG USB controller interface softc */ 100 101 sc->sc_otg.sc_clocks_on = &musbotg_clocks_on; 102 sc->sc_otg.sc_clocks_off = &musbotg_clocks_off; 103 sc->sc_otg.sc_clocks_arg = sc; 104 | 2/*- 3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. --- 87 unchanged lines hidden (view full) --- 97 return (ENXIO); 98 } 99 /* setup MUSB OTG USB controller interface softc */ 100 101 sc->sc_otg.sc_clocks_on = &musbotg_clocks_on; 102 sc->sc_otg.sc_clocks_off = &musbotg_clocks_off; 103 sc->sc_otg.sc_clocks_arg = sc; 104 |
105 /* get all DMA memory */ 106 | 105 /* initialise some bus fields */ |
107 sc->sc_otg.sc_bus.parent = dev; | 106 sc->sc_otg.sc_bus.parent = dev; |
107 sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices; 108 sc->sc_otg.sc_bus.devices_max = MUSB2_MAX_DEVICES; 109 110 /* get all DMA memory */ |
|
108 if (usb2_bus_mem_alloc_all(&sc->sc_otg.sc_bus, 109 USB_GET_DMA_TAG(dev), NULL)) { 110 return (ENOMEM); 111 } 112 rid = 0; 113 sc->sc_otg.sc_io_res = 114 bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); 115 --- 137 unchanged lines hidden --- | 111 if (usb2_bus_mem_alloc_all(&sc->sc_otg.sc_bus, 112 USB_GET_DMA_TAG(dev), NULL)) { 113 return (ENOMEM); 114 } 115 rid = 0; 116 sc->sc_otg.sc_io_res = 117 bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); 118 --- 137 unchanged lines hidden --- |