| 
									
										
										
										
											2006-09-27 17:41:31 +09:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * arch/sh/boards/shmin/setup.c | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Copyright (C) 2006 Takashi YOSHII | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * SHMIN Support. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | #include <linux/init.h>
 | 
					
						
							| 
									
										
										
										
											2007-06-15 18:56:19 +09:00
										 |  |  | #include <linux/irq.h>
 | 
					
						
							| 
									
										
										
										
											2006-09-27 17:41:31 +09:00
										 |  |  | #include <asm/machvec.h>
 | 
					
						
							| 
									
										
										
										
											2008-10-20 13:02:48 +09:00
										 |  |  | #include <mach/shmin.h>
 | 
					
						
							| 
									
										
										
										
											2006-09-27 17:41:31 +09:00
										 |  |  | #include <asm/clock.h>
 | 
					
						
							|  |  |  | #include <asm/io.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-12-25 18:35:24 +09:00
										 |  |  | #define PFC_PHCR	0xa400010eUL
 | 
					
						
							| 
									
										
										
										
											2007-02-07 13:54:39 +09:00
										 |  |  | #define INTC_ICR1	0xa4000010UL
 | 
					
						
							| 
									
										
										
										
											2006-09-27 17:41:31 +09:00
										 |  |  | 
 | 
					
						
							|  |  |  | static void __init init_shmin_irq(void) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2010-01-26 12:58:40 +09:00
										 |  |  | 	__raw_writew(0x2a00, PFC_PHCR);	// IRQ0-3=IRQ
 | 
					
						
							|  |  |  | 	__raw_writew(0x0aaa, INTC_ICR1);	// IRQ0-3=IRQ-mode,Low-active.
 | 
					
						
							| 
									
										
										
										
											2007-08-03 14:24:29 +09:00
										 |  |  | 	plat_irq_setup_pins(IRQ_MODE_IRQ); | 
					
						
							| 
									
										
										
										
											2006-09-27 17:41:31 +09:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-17 12:42:20 +09:00
										 |  |  | static void __init shmin_setup(char **cmdline_p) | 
					
						
							| 
									
										
										
										
											2006-09-27 17:41:31 +09:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2008-12-17 12:42:20 +09:00
										 |  |  | 	__set_io_port_base(SHMIN_IO_BASE); | 
					
						
							| 
									
										
										
										
											2006-09-27 17:41:31 +09:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-05-15 15:19:34 +09:00
										 |  |  | static struct sh_machine_vector mv_shmin __initmv = { | 
					
						
							| 
									
										
										
										
											2006-09-27 18:17:31 +09:00
										 |  |  | 	.mv_name	= "SHMIN", | 
					
						
							| 
									
										
										
										
											2008-12-17 12:42:20 +09:00
										 |  |  | 	.mv_setup	= shmin_setup, | 
					
						
							| 
									
										
										
										
											2006-09-27 17:41:31 +09:00
										 |  |  | 	.mv_init_irq	= init_shmin_irq, | 
					
						
							|  |  |  | }; |