Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  * arch/sh/boards/shmin/setup.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  * Copyright (C) 2006 Takashi YOSHII
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7)  * SHMIN Support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #include <linux/init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/irq.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <asm/machvec.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <mach/shmin.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <asm/clock.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <asm/io.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #define PFC_PHCR	0xa400010eUL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #define INTC_ICR1	0xa4000010UL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) static void __init init_shmin_irq(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 	__raw_writew(0x2a00, PFC_PHCR);	// IRQ0-3=IRQ
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 	__raw_writew(0x0aaa, INTC_ICR1);	// IRQ0-3=IRQ-mode,Low-active.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 	plat_irq_setup_pins(IRQ_MODE_IRQ);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) static void __init shmin_setup(char **cmdline_p)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 	__set_io_port_base(SHMIN_IO_BASE);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) static struct sh_machine_vector mv_shmin __initmv = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 	.mv_name	= "SHMIN",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 	.mv_setup	= shmin_setup,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 	.mv_init_irq	= init_shmin_irq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) };