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