Blame view

include/asm-generic/early_ioremap.h 1.66 KB
b24413180   Greg Kroah-Hartman   License cleanup: ...
1
  /* SPDX-License-Identifier: GPL-2.0 */
9e5c33d7a   Mark Salter   mm: create generi...
2
3
4
5
6
7
8
9
10
11
12
13
14
  #ifndef _ASM_EARLY_IOREMAP_H_
  #define _ASM_EARLY_IOREMAP_H_
  
  #include <linux/types.h>
  
  /*
   * early_ioremap() and early_iounmap() are for temporary early boot-time
   * mappings, before the real ioremap() is functional.
   */
  extern void __iomem *early_ioremap(resource_size_t phys_addr,
  				   unsigned long size);
  extern void *early_memremap(resource_size_t phys_addr,
  			    unsigned long size);
2592dbbbf   Juergen Gross   mm: provide early...
15
16
  extern void *early_memremap_ro(resource_size_t phys_addr,
  			       unsigned long size);
f88a68fac   Tom Lendacky   x86/mm: Extend ea...
17
18
  extern void *early_memremap_prot(resource_size_t phys_addr,
  				 unsigned long size, unsigned long prot_val);
9e5c33d7a   Mark Salter   mm: create generi...
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
  extern void early_iounmap(void __iomem *addr, unsigned long size);
  extern void early_memunmap(void *addr, unsigned long size);
  
  /*
   * Weak function called by early_ioremap_reset(). It does nothing, but
   * architectures may provide their own version to do any needed cleanups.
   */
  extern void early_ioremap_shutdown(void);
  
  #if defined(CONFIG_GENERIC_EARLY_IOREMAP) && defined(CONFIG_MMU)
  /* Arch-specific initialization */
  extern void early_ioremap_init(void);
  
  /* Generic initialization called by architecture code */
  extern void early_ioremap_setup(void);
  
  /*
   * Called as last step in paging_init() so library can act
   * accordingly for subsequent map/unmap requests.
   */
  extern void early_ioremap_reset(void);
6b0f68e32   Mark Salter   mm: add utility f...
40
41
42
43
44
  /*
   * Early copy from unmapped memory to kernel mapped memory.
   */
  extern void copy_from_early_mem(void *dest, phys_addr_t src,
  				unsigned long size);
9e5c33d7a   Mark Salter   mm: create generi...
45
46
47
48
49
50
51
  #else
  static inline void early_ioremap_init(void) { }
  static inline void early_ioremap_setup(void) { }
  static inline void early_ioremap_reset(void) { }
  #endif
  
  #endif /* _ASM_EARLY_IOREMAP_H_ */