// SPDX-License-Identifier: GPL-1.0+ /* * OHCI HCD (Host Controller Driver) for USB. * * (C) Copyright 1999 Roman Weissgaerber <[email protected]> * (C) Copyright 2000-2002 David Brownell <[email protected]> * * This file is licenced under the GPL. */ /*-------------------------------------------------------------------------*/ /* * OHCI deals with three types of memory: * - data used only by the HCD ... kmalloc is fine * - async and periodic schedules, shared by HC and HCD ... these * need to use dma_pool or dma_alloc_coherent * - driver buffers, read/written by HC ... the hcd glue or the * device driver provides us with dma addresses * * There's also "register" data, which is memory mapped. * No memory seen by this driver (or any HCD) may be paged out. */ /*-------------------------------------------------------------------------*/ static void ohci_hcd_init (struct ohci_hcd *ohci) { … } /*-------------------------------------------------------------------------*/ static int ohci_mem_init (struct ohci_hcd *ohci) { … } static void ohci_mem_cleanup (struct ohci_hcd *ohci) { … } /*-------------------------------------------------------------------------*/ /* ohci "done list" processing needs this mapping */ static inline struct td * dma_to_td (struct ohci_hcd *hc, dma_addr_t td_dma) { … } /* TDs ... */ static struct td * td_alloc (struct ohci_hcd *hc, gfp_t mem_flags) { … } static void td_free (struct ohci_hcd *hc, struct td *td) { … } /*-------------------------------------------------------------------------*/ /* EDs ... */ static struct ed * ed_alloc (struct ohci_hcd *hc, gfp_t mem_flags) { … } static void ed_free (struct ohci_hcd *hc, struct ed *ed) { … }