/tools/perf/scripts/python/

a href='/cgit/cgit.cgi/litmus-rt-budgetable-locks.git/.git/commit/drivers/serial/serial_txx9.c?h=update_litmus_2019&id=163e783e6a8b1e8bcb4c9084d438091386b589df'>commitdiffstats
path: root/drivers/serial/serial_txx9.c
blob: 7313c2edcb831b873d89156bb6200179dd642fb8 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                         
   








                                                                      
                        
                                  
                      



                              
 
                                     






                                                   

                                   


                                      
                                  
                                 
      












                                                    
                                            


                                     
                                        











































































































                                                                        
                                                              









                                                         
                                                               

































                                                                          
                                                       

                                                                  
                                                   

 
                                                        

                                                                  
                                                  




                                                                  
                                                       






                                                         
























                                                                      
                  
                                                              
 
                                                         



                                    
                                             

            



                                              


                                                                             



















                                                                               
                                                      
                                                          








                                                                       












                                                                       
                                                          
                                         


                                                                              
                    
                                                                      

                                                                    
                                    
                                  
                                  














                                                                  
                                               















                                                                     
                                               

 
                                                               
















                                                                     
                                                   






























                                                                               

                         



                                                                             






                                                                             
 



                                                             






















                                                                          
                                                    













                                                                         
                                                             



























































                                                                         

                                                                         





                                                                  





                                                

































































































                                                                                   








                                                                     
                                             







































































                                                                                 















                                                               
                                     

 






















                                                   



                                                        

                                                                      







                                                                  
                                   

                                                          

























                                                                    







                                                                       










                                                                                












                                                                          
                                                                             









                                                             
                                                                              



















                                                                       
                                          
























                                                                          







                                                    













                                                                   

                                                   


                 
                                       

















                                                                            
                                       

                                             

                                                                            
                              








                                                                       

                          




                                                    

                                                             






                                                                       
                                         













                                                                          
                                       




                                                            
                                  
                              
                                         

 
  




















                                                                                 
                                                                 

                                                                          

































































                                                                               















                                                                             




                                                 

                                                

                                                                                                   

                                        
         
                                                       





                                                                    
                                                         


                                   

                                                           



                                        
                
                                                                              
 
                                                         
 

                                                               

                                                               




                                                         
                                                         
 

                                         

                                                              

                 
      
 

                                                                                     






                                                                 
                

                                                     
      





                                              

                                                     






                                                                         


















                                                                         

                             
                                                           
      









                                                   









                                                       

                                                             




                                                                          










                                                 
/*
 *  drivers/serial/serial_txx9.c
 *
 * Derived from many drivers using generic_serial interface,
 * especially serial_tx3912.c by Steven J. Hill and r39xx_serial.c
 * (was in Linux/VR tree) by Jim Pick.
 *
 *  Copyright (C) 1999 Harald Koerfgen
 *  Copyright (C) 2000 Jim Pick <jim@jimpick.com>
 *  Copyright (C) 2001 Steven J. Hill (sjhill@realitydiluted.com)
 *  Copyright (C) 2000-2002 Toshiba Corporation
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 *  Serial driver for TX3927/TX4927/TX4925/TX4938 internal SIO controller
 */

#if defined(CONFIG_SERIAL_TXX9_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
#define SUPPORT_SYSRQ
#endif

#include <linux/module.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/console.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/pci.h>
#include <linux/serial_core.h>
#include <linux/serial.h>

#include <asm/io.h>

static char *serial_version = "1.11";
static char *serial_name = "TX39/49 Serial driver";

#define PASS_LIMIT	256

#if !defined(CONFIG_SERIAL_TXX9_STDSERIAL)
/* "ttyS" is used for standard serial driver */
#define TXX9_TTY_NAME "ttyTX"
#define TXX9_TTY_MINOR_START	196
#define TXX9_TTY_MAJOR	204
#else
/* acts like standard serial driver */
#define TXX9_TTY_NAME "ttyS"
#define TXX9_TTY_MINOR_START	64
#define TXX9_TTY_MAJOR	TTY_MAJOR
#endif

/* flag aliases */
#define UPF_TXX9_HAVE_CTS_LINE	UPF_BUGGY_UART
#define UPF_TXX9_USE_SCLK	UPF_MAGIC_MULTIPLIER

#ifdef CONFIG_PCI
/* support for Toshiba TC86C001 SIO */
#define ENABLE_SERIAL_TXX9_PCI
#endif

/*
 * Number of serial ports
 */
#define UART_NR  CONFIG_SERIAL_TXX9_NR_UARTS

struct uart_txx9_port {
	struct uart_port	port;
	/* No additional info for now */
};

#define TXX9_REGION_SIZE	0x24

/* TXX9 Serial Registers */
#define TXX9_SILCR	0x00
#define TXX9_SIDICR	0x04