/usr/src/linux-headers-5.15.0-181/arch/m68k/include/asm
NameSizeModeActions
adb_iop.h11880644editdlrm
amigahw.h107370644editdlrm
amigaints.h35830644editdlrm
amigayle.h32710644editdlrm
amipcmcia.h25680644editdlrm
apollohw.h24100644editdlrm
asm-offsets.h350644editdlrm
asm-prototypes.h2110644editdlrm
atarihw.h209190644editdlrm
atariints.h56910644editdlrm
atarikb.h14340644editdlrm
atari_joystick.h4570644editdlrm
atari_stdma.h5140644editdlrm
atari_stram.h5280644editdlrm
atomic.h50160644editdlrm
bitops.h128270644editdlrm
blinken.h6410644editdlrm
bootinfo.h7830644editdlrm
bootstd.h47470644editdlrm
bug.h6590644editdlrm
bvme6000hw.h35290644editdlrm
cache.h2960644editdlrm
cacheflush.h1330644editdlrm
cacheflush_mm.h71730644editdlrm
cacheflush_no.h18840644editdlrm
checksum.h34970644editdlrm
cmpxchg.h31890644editdlrm
coldfire.h16530644editdlrm
contregs.h33900644editdlrm
current.h5800644editdlrm
delay.h35040644editdlrm
div64.h8580644editdlrm
dma.h170400644editdlrm
dsp56k.h12690644editdlrm
dvma.h99030644editdlrm
elf.h31450644editdlrm
entry.h59020644editdlrm
export.h530644editdlrm
fb.h9210644editdlrm
fbio.h101060644editdlrm
flat.h3330644editdlrm
floppy.h53300644editdlrm
fpu.h5350644editdlrm
ftrace.h120644editdlrm
gpio.h22940644editdlrm
hash.h21150644editdlrm
hp300hw.h1860644editdlrm
hwtest.h4670644editdlrm
ide.h17080644editdlrm
idprom.h7250644editdlrm
intersil.h11340644editdlrm
io.h2440644editdlrm
io_mm.h131980644editdlrm
io_no.h41960644editdlrm
irq.h26340644editdlrm
irqflags.h16520644editdlrm
Kbuild1650644editdlrm
kexec.h7320644editdlrm
kmap.h17540644editdlrm
linkage.h15830644editdlrm
m52xxacr.h36600644editdlrm
m53xxacr.h36830644editdlrm
m53xxsim.h552620644editdlrm
m54xxacr.h49340644editdlrm
m54xxgpt.h37500644editdlrm
m54xxpci.h62760644editdlrm
m54xxsim.h38920644editdlrm
m520xsim.h73230644editdlrm
m523xsim.h78820644editdlrm
m525xsim.h108220644editdlrm
m527xsim.h138350644editdlrm
m528xsim.h95990644editdlrm
m5206sim.h65550644editdlrm
m5272sim.h61990644editdlrm
m5307sim.h76980644editdlrm
m5407sim.h62890644editdlrm
m5441xsim.h102940644editdlrm
machdep.h13310644editdlrm
machines.h32090644editdlrm
machw.h5880644editdlrm
macintosh.h24380644editdlrm
macints.h32100644editdlrm
mac_asc.h5200644editdlrm
mac_baboon.h9990644editdlrm
mac_iop.h54990644editdlrm
mac_oss.h18730644editdlrm
mac_psc.h74270644editdlrm
mac_via.h117180644editdlrm
math-emu.h68970644editdlrm
MC68EZ328.h386500644editdlrm
MC68VZ328.h420060644editdlrm
MC68328.h387240644editdlrm
mc146818rtc.h5980644editdlrm
mcf8390.h38440644editdlrm
mcfclk.h9610644editdlrm
mcfdma.h66620644editdlrm
mcfgpio.h82690644editdlrm
mcfintc.h31610644editdlrm
mcfmmu.h37610644editdlrm
mcfpit.h22780644editdlrm
mcfqspi.h14660644editdlrm
mcfsim.h15310644editdlrm
mcfslt.h12400644editdlrm
mcftimer.h23570644editdlrm
mcfuart.h70760644editdlrm
mcfwdebug.h51060644editdlrm
mcf_pgalloc.h20000644editdlrm
mcf_pgtable.h83120644editdlrm
mmu.h2430644editdlrm
mmu_context.h72070644editdlrm
module.h8470644editdlrm
module.lds.h910644editdlrm
motorola_pgalloc.h21460644editdlrm
motorola_pgtable.h76100644editdlrm
movs.h14720644editdlrm
mvme16xhw.h22160644editdlrm
mvme147hw.h29380644editdlrm
natfeat.h5330644editdlrm
nettel.h30230644editdlrm
nubus.h12620644editdlrm
openprom.h81730644editdlrm
oplib.h97680644editdlrm
page.h17280644editdlrm
page_mm.h33990644editdlrm
page_no.h13220644editdlrm
page_offset.h2560644editdlrm
parport.h8370644editdlrm
pci.h2580644editdlrm
pgalloc.h4440644editdlrm
pgtable.h1270644editdlrm
pgtable_mm.h49310644editdlrm
pgtable_no.h14380644editdlrm
processor.h41580644editdlrm
ptrace.h6430644editdlrm
q40ints.h7490644editdlrm
q40_master.h23570644editdlrm
quicc_simple.h18300644editdlrm
raw_io.h120030644editdlrm
serial.h11650644editdlrm
setup.h94670644editdlrm
signal.h13770644editdlrm
smp.h320644editdlrm
string.h17170644editdlrm
sun3-head.h3530644editdlrm
sun3ints.h9890644editdlrm
sun3mmu.h50250644editdlrm
sun3x.h8680644editdlrm
sun3xflop.h57570644editdlrm
sun3xprom.h13430644editdlrm
sun3_pgalloc.h12670644editdlrm
sun3_pgtable.h65830644editdlrm
switch_to.h15490644editdlrm
syscall.h2510644editdlrm
thread_info.h22370644editdlrm
timex.h9740644editdlrm
tlb.h1350644editdlrm
tlbflush.h59890644editdlrm
traps.h86150644editdlrm
uaccess.h125630644editdlrm
ucontext.h5700644editdlrm
unistd.h9930644editdlrm
user.h38740644editdlrm
vga.h9020644editdlrm
virtconvert.h8340644editdlrm
vmalloc.h900644editdlrm
zorro.h12220644editdlrm
Edit: /usr/src/linux-headers-5.15.0-181/arch/m68k/include/asm/mcfgpio.h (8269B)
/* SPDX-License-Identifier: GPL-2.0-only */ /* * Coldfire generic GPIO support. * * (C) Copyright 2009, Steven King */ #ifndef mcfgpio_h #define mcfgpio_h #ifdef CONFIG_GPIOLIB #include #else int __mcfgpio_get_value(unsigned gpio); void __mcfgpio_set_value(unsigned gpio, int value); int __mcfgpio_direction_input(unsigned gpio); int __mcfgpio_direction_output(unsigned gpio, int value); int __mcfgpio_request(unsigned gpio); void __mcfgpio_free(unsigned gpio); /* our alternate 'gpiolib' functions */ static inline int __gpio_get_value(unsigned gpio) { if (gpio < MCFGPIO_PIN_MAX) return __mcfgpio_get_value(gpio); else return -EINVAL; } static inline void __gpio_set_value(unsigned gpio, int value) { if (gpio < MCFGPIO_PIN_MAX) __mcfgpio_set_value(gpio, value); } static inline int __gpio_cansleep(unsigned gpio) { if (gpio < MCFGPIO_PIN_MAX) return 0; else return -EINVAL; } static inline int __gpio_to_irq(unsigned gpio) { return -EINVAL; } static inline int gpio_direction_input(unsigned gpio) { if (gpio < MCFGPIO_PIN_MAX) return __mcfgpio_direction_input(gpio); else return -EINVAL; } static inline int gpio_direction_output(unsigned gpio, int value) { if (gpio < MCFGPIO_PIN_MAX) return __mcfgpio_direction_output(gpio, value); else return -EINVAL; } static inline int gpio_request(unsigned gpio, const char *label) { if (gpio < MCFGPIO_PIN_MAX) return __mcfgpio_request(gpio); else return -EINVAL; } static inline void gpio_free(unsigned gpio) { if (gpio < MCFGPIO_PIN_MAX) __mcfgpio_free(gpio); } #endif /* CONFIG_GPIOLIB */ /* * The Freescale Coldfire family is quite varied in how they implement GPIO. * Some parts have 8 bit ports, some have 16bit and some have 32bit; some have * only one port, others have multiple ports; some have a single data latch * for both input and output, others have a separate pin data register to read * input; some require a read-modify-write access to change an output, others * have set and clear registers for some of the outputs; Some have all the * GPIOs in a single control area, others have some GPIOs implemented in * different modules. * * This implementation attempts accommodate the differences while presenting * a generic interface that will optimize to as few instructions as possible. */ #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ defined(CONFIG_M53xx) || defined(CONFIG_M54xx) || \ defined(CONFIG_M5441x) /* These parts have GPIO organized by 8 bit ports */ #define MCFGPIO_PORTTYPE u8 #define MCFGPIO_PORTSIZE 8 #define mcfgpio_read(port) __raw_readb(port) #define mcfgpio_write(data, port) __raw_writeb(data, port) #elif defined(CONFIG_M5307) || defined(CONFIG_M5407) || defined(CONFIG_M5272) /* These parts have GPIO organized by 16 bit ports */ #define MCFGPIO_PORTTYPE u16 #define MCFGPIO_PORTSIZE 16 #define mcfgpio_read(port) __raw_readw(port) #define mcfgpio_write(data, port) __raw_writew(data, port) #elif defined(CONFIG_M5249) || defined(CONFIG_M525x) /* These parts have GPIO organized by 32 bit ports */ #define MCFGPIO_PORTTYPE u32 #define MCFGPIO_PORTSIZE 32 #define mcfgpio_read(port) __raw_readl(port) #define mcfgpio_write(data, port) __raw_writel(data, port) #endif #define mcfgpio_bit(gpio) (1 << ((gpio) % MCFGPIO_PORTSIZE)) #define mcfgpio_port(gpio) ((gpio) / MCFGPIO_PORTSIZE) #if defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ defined(CONFIG_M53xx) || defined(CONFIG_M54xx) || \ defined(CONFIG_M5441x) /* * These parts have an 'Edge' Port module (external interrupt/GPIO) which uses * read-modify-write to change an output and a GPIO module which has separate * set/clr registers to directly change outputs with a single write access. */ #if defined(CONFIG_M528x) /* * The 528x also has GPIOs in other modules (GPT, QADC) which use * read-modify-write as well as those controlled by the EPORT and GPIO modules. */ #define MCFGPIO_SCR_START 40 #elif defined(CONFIG_M5441x) /* The m5441x EPORT doesn't have its own GPIO port, uses PORT C */ #define MCFGPIO_SCR_START 0 #else #define MCFGPIO_SCR_START 8 #endif #define MCFGPIO_SETR_PORT(gpio) (MCFGPIO_SETR + \ mcfgpio_port(gpio - MCFGPIO_SCR_START)) #define MCFGPIO_CLRR_PORT(gpio) (MCFGPIO_CLRR + \ mcfgpio_port(gpio - MCFGPIO_SCR_START)) #else #define MCFGPIO_SCR_START MCFGPIO_PIN_MAX /* with MCFGPIO_SCR == MCFGPIO_PIN_MAX, these will be optimized away */ #define MCFGPIO_SETR_PORT(gpio) 0 #define MCFGPIO_CLRR_PORT(gpio) 0 #endif /* * Coldfire specific helper functions */ /* return the port pin data register for a gpio */ static inline u32 __mcfgpio_ppdr(unsigned gpio) { #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ defined(CONFIG_M5307) || defined(CONFIG_M5407) return MCFSIM_PADAT; #elif defined(CONFIG_M5272) if (gpio < 16) return MCFSIM_PADAT; else if (gpio < 32) return MCFSIM_PBDAT; else return MCFSIM_PCDAT; #elif defined(CONFIG_M5249) || defined(CONFIG_M525x) if (gpio < 32) return MCFSIM2_GPIOREAD; else return MCFSIM2_GPIO1READ; #elif defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ defined(CONFIG_M53xx) || defined(CONFIG_M54xx) || \ defined(CONFIG_M5441x) #if !defined(CONFIG_M5441x) if (gpio < 8) return MCFEPORT_EPPDR; #if defined(CONFIG_M528x) else if (gpio < 16) return MCFGPTA_GPTPORT; else if (gpio < 24) return MCFGPTB_GPTPORT; else if (gpio < 32) return MCFQADC_PORTQA; else if (gpio < 40) return MCFQADC_PORTQB; #endif /* defined(CONFIG_M528x) */ else #endif /* !defined(CONFIG_M5441x) */ return MCFGPIO_PPDR + mcfgpio_port(gpio - MCFGPIO_SCR_START); #else return 0; #endif } /* return the port output data register for a gpio */ static inline u32 __mcfgpio_podr(unsigned gpio) { #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ defined(CONFIG_M5307) || defined(CONFIG_M5407) return MCFSIM_PADAT; #elif defined(CONFIG_M5272) if (gpio < 16) return MCFSIM_PADAT; else if (gpio < 32) return MCFSIM_PBDAT; else return MCFSIM_PCDAT; #elif defined(CONFIG_M5249) || defined(CONFIG_M525x) if (gpio < 32) return MCFSIM2_GPIOWRITE; else return MCFSIM2_GPIO1WRITE; #elif defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ defined(CONFIG_M53xx) || defined(CONFIG_M54xx) || \ defined(CONFIG_M5441x) #if !defined(CONFIG_M5441x) if (gpio < 8) return MCFEPORT_EPDR; #if defined(CONFIG_M528x) else if (gpio < 16) return MCFGPTA_GPTPORT; else if (gpio < 24) return MCFGPTB_GPTPORT; else if (gpio < 32) return MCFQADC_PORTQA; else if (gpio < 40) return MCFQADC_PORTQB; #endif /* defined(CONFIG_M528x) */ else #endif /* !defined(CONFIG_M5441x) */ return MCFGPIO_PODR + mcfgpio_port(gpio - MCFGPIO_SCR_START); #else return 0; #endif } /* return the port direction data register for a gpio */ static inline u32 __mcfgpio_pddr(unsigned gpio) { #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ defined(CONFIG_M5307) || defined(CONFIG_M5407) return MCFSIM_PADDR; #elif defined(CONFIG_M5272) if (gpio < 16) return MCFSIM_PADDR; else if (gpio < 32) return MCFSIM_PBDDR; else return MCFSIM_PCDDR; #elif defined(CONFIG_M5249) || defined(CONFIG_M525x) if (gpio < 32) return MCFSIM2_GPIOENABLE; else return MCFSIM2_GPIO1ENABLE; #elif defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ defined(CONFIG_M53xx) || defined(CONFIG_M54xx) || \ defined(CONFIG_M5441x) #if !defined(CONFIG_M5441x) if (gpio < 8) return MCFEPORT_EPDDR; #if defined(CONFIG_M528x) else if (gpio < 16) return MCFGPTA_GPTDDR; else if (gpio < 24) return MCFGPTB_GPTDDR; else if (gpio < 32) return MCFQADC_DDRQA; else if (gpio < 40) return MCFQADC_DDRQB; #endif /* defined(CONFIG_M528x) */ else #endif /* !defined(CONFIG_M5441x) */ return MCFGPIO_PDDR + mcfgpio_port(gpio - MCFGPIO_SCR_START); #else return 0; #endif } #endif /* mcfgpio_h */