Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[MIPS] cleanup tx39/tx49 setup code

Remove some unnecessary codes, includes and files.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Atsushi Nemoto and committed by
Ralf Baechle
8b6c2324 619b6e18

+7 -280
-5
arch/mips/jmr3927/rbhma3100/setup.c
··· 29 29 30 30 #include <linux/init.h> 31 31 #include <linux/kernel.h> 32 - #include <linux/kdev_t.h> 33 32 #include <linux/types.h> 34 33 #include <linux/pci.h> 35 - #include <linux/ide.h> 36 34 #include <linux/ioport.h> 37 35 #include <linux/delay.h> 38 36 #include <linux/pm.h> 39 37 #include <linux/platform_device.h> 40 38 #ifdef CONFIG_SERIAL_TXX9 41 - #include <linux/tty.h> 42 - #include <linux/serial.h> 43 39 #include <linux/serial_core.h> 44 40 #endif 45 41 46 - #include <asm/addrspace.h> 47 42 #include <asm/txx9tmr.h> 48 43 #include <asm/reboot.h> 49 44 #include <asm/jmr3927/jmr3927.h>
+1 -1
arch/mips/tx4927/common/Makefile
··· 6 6 # unless it's something special (ie not a .c file). 7 7 # 8 8 9 - obj-y += tx4927_prom.o tx4927_setup.o tx4927_irq.o 9 + obj-y += tx4927_prom.o tx4927_irq.o 10 10 11 11 obj-$(CONFIG_TOSHIBA_FPCIB0) += smsc_fdc37m81x.o 12 12 obj-$(CONFIG_KGDB) += tx4927_dbgio.o
-186
arch/mips/tx4927/common/tx4927_setup.c
··· 1 - /* 2 - * Author: MontaVista Software, Inc. 3 - * source@mvista.com 4 - * 5 - * Copyright 2001-2002 MontaVista Software Inc. 6 - * 7 - * This program is free software; you can redistribute it and/or modify it 8 - * under the terms of the GNU General Public License as published by the 9 - * Free Software Foundation; either version 2 of the License, or (at your 10 - * option) any later version. 11 - * 12 - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 13 - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 14 - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 15 - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 16 - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 17 - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 18 - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 19 - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 20 - * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 21 - * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 - * 23 - * You should have received a copy of the GNU General Public License along 24 - * with this program; if not, write to the Free Software Foundation, Inc., 25 - * 675 Mass Ave, Cambridge, MA 02139, USA. 26 - */ 27 - #include <linux/errno.h> 28 - #include <linux/init.h> 29 - #include <linux/kernel_stat.h> 30 - #include <linux/module.h> 31 - #include <linux/signal.h> 32 - #include <linux/sched.h> 33 - #include <linux/types.h> 34 - #include <linux/interrupt.h> 35 - #include <linux/ioport.h> 36 - #include <linux/timex.h> 37 - #include <linux/slab.h> 38 - #include <linux/random.h> 39 - #include <linux/irq.h> 40 - #include <linux/bitops.h> 41 - #include <asm/bootinfo.h> 42 - #include <asm/io.h> 43 - #include <asm/irq.h> 44 - #include <asm/mipsregs.h> 45 - #include <asm/system.h> 46 - #include <asm/time.h> 47 - #include <asm/tx4927/tx4927.h> 48 - 49 - 50 - #undef DEBUG 51 - 52 - void dump_cp0(char *key); 53 - 54 - 55 - void __init plat_mem_setup(void) 56 - { 57 - #ifdef CONFIG_TOSHIBA_RBTX4927 58 - { 59 - extern void toshiba_rbtx4927_setup(void); 60 - toshiba_rbtx4927_setup(); 61 - } 62 - #endif 63 - } 64 - 65 - void __init plat_time_init(void) 66 - { 67 - #ifdef CONFIG_TOSHIBA_RBTX4927 68 - { 69 - extern void toshiba_rbtx4927_time_init(void); 70 - toshiba_rbtx4927_time_init(); 71 - } 72 - #endif 73 - } 74 - 75 - #ifdef DEBUG 76 - void print_cp0(char *key, int num, char *name, u32 val) 77 - { 78 - printk("%s cp0:%02d:%s=0x%08x\n", key, num, name, val); 79 - return; 80 - } 81 - 82 - void 83 - dump_cp0(char *key) 84 - { 85 - if (key == NULL) 86 - key = ""; 87 - 88 - print_cp0(key, 0, "INDEX ", read_c0_index()); 89 - print_cp0(key, 2, "ENTRYLO1", read_c0_entrylo0()); 90 - print_cp0(key, 3, "ENTRYLO2", read_c0_entrylo1()); 91 - print_cp0(key, 4, "CONTEXT ", read_c0_context()); 92 - print_cp0(key, 5, "PAGEMASK", read_c0_pagemask()); 93 - print_cp0(key, 6, "WIRED ", read_c0_wired()); 94 - //print_cp0(key, 8, "BADVADDR", read_c0_badvaddr()); 95 - print_cp0(key, 9, "COUNT ", read_c0_count()); 96 - print_cp0(key, 10, "ENTRYHI ", read_c0_entryhi()); 97 - print_cp0(key, 11, "COMPARE ", read_c0_compare()); 98 - print_cp0(key, 12, "STATUS ", read_c0_status()); 99 - print_cp0(key, 13, "CAUSE ", read_c0_cause() & 0xffff87ff); 100 - print_cp0(key, 16, "CONFIG ", read_c0_config()); 101 - return; 102 - } 103 - 104 - void print_pic(char *key, unsigned long reg, char *name) 105 - { 106 - printk(KERN_INFO "%s pic:0x%08lx:%s=0x%08x\n", key, reg, name, 107 - __raw_readl((void __iomem *)reg)); 108 - return; 109 - } 110 - 111 - 112 - void dump_pic(char *key) 113 - { 114 - if (key == NULL) 115 - key = ""; 116 - 117 - print_pic(key, 0xff1ff600, "IRDEN "); 118 - print_pic(key, 0xff1ff604, "IRDM0 "); 119 - print_pic(key, 0xff1ff608, "IRDM1 "); 120 - 121 - print_pic(key, 0xff1ff610, "IRLVL0 "); 122 - print_pic(key, 0xff1ff614, "IRLVL1 "); 123 - print_pic(key, 0xff1ff618, "IRLVL2 "); 124 - print_pic(key, 0xff1ff61c, "IRLVL3 "); 125 - print_pic(key, 0xff1ff620, "IRLVL4 "); 126 - print_pic(key, 0xff1ff624, "IRLVL5 "); 127 - print_pic(key, 0xff1ff628, "IRLVL6 "); 128 - print_pic(key, 0xff1ff62c, "IRLVL7 "); 129 - 130 - print_pic(key, 0xff1ff640, "IRMSK "); 131 - print_pic(key, 0xff1ff660, "IREDC "); 132 - print_pic(key, 0xff1ff680, "IRPND "); 133 - print_pic(key, 0xff1ff6a0, "IRCS "); 134 - 135 - print_pic(key, 0xff1ff514, "IRFLAG1 "); /* don't read IRLAG0 -- it hangs system */ 136 - 137 - print_pic(key, 0xff1ff518, "IRPOL "); 138 - print_pic(key, 0xff1ff51c, "IRRCNT "); 139 - print_pic(key, 0xff1ff520, "IRMASKINT"); 140 - print_pic(key, 0xff1ff524, "IRMASKEXT"); 141 - 142 - return; 143 - } 144 - 145 - 146 - void print_addr(char *hdr, char *key, unsigned long addr) 147 - { 148 - printk(KERN_INFO "%s %s:0x%08lx=0x%08x\n", hdr, key, addr, 149 - __raw_readl((void __iomem *)addr)); 150 - return; 151 - } 152 - 153 - 154 - void dump_180(char *key) 155 - { 156 - u32 i; 157 - 158 - for (i = 0x80000180; i < 0x80000180 + 0x80; i += 4) { 159 - print_addr("180", key, i); 160 - } 161 - return; 162 - } 163 - 164 - 165 - void dump_eh0(char *key) 166 - { 167 - int i; 168 - extern unsigned long exception_handlers[]; 169 - 170 - for (i = (int) exception_handlers; 171 - i < (int) (exception_handlers + 20); i += 4) { 172 - print_addr("eh0", key, i); 173 - } 174 - 175 - return; 176 - } 177 - 178 - void pk0(void) 179 - { 180 - volatile u32 val; 181 - 182 - __asm__ __volatile__("ori %0, $26, 0":"=r"(val) 183 - ); 184 - printk("k0=[0x%08x]\n", val); 185 - } 186 - #endif
+4 -37
arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
··· 45 45 #include <linux/init.h> 46 46 #include <linux/kernel.h> 47 47 #include <linux/types.h> 48 - #include <linux/mm.h> 49 - #include <linux/swap.h> 50 48 #include <linux/ioport.h> 51 - #include <linux/sched.h> 52 49 #include <linux/interrupt.h> 53 50 #include <linux/pci.h> 54 - #include <linux/timex.h> 55 51 #include <linux/pm.h> 56 52 #include <linux/platform_device.h> 57 53 58 54 #include <asm/bootinfo.h> 59 - #include <asm/page.h> 60 55 #include <asm/io.h> 61 - #include <asm/irq.h> 62 - #include <asm/irq_regs.h> 63 56 #include <asm/processor.h> 64 57 #include <asm/reboot.h> 65 58 #include <asm/time.h> 66 59 #include <asm/txx9tmr.h> 67 - #include <linux/bootmem.h> 68 - #include <linux/blkdev.h> 69 60 #ifdef CONFIG_TOSHIBA_FPCIB0 70 61 #include <asm/tx4927/smsc_fdc37m81x.h> 71 62 #endif ··· 64 73 #ifdef CONFIG_PCI 65 74 #include <asm/tx4927/tx4927_pci.h> 66 75 #endif 67 - #ifdef CONFIG_BLK_DEV_IDEPCI 68 - #include <linux/hdreg.h> 69 - #include <linux/ide.h> 70 - #endif 71 76 #ifdef CONFIG_SERIAL_TXX9 72 - #include <linux/tty.h> 73 - #include <linux/serial.h> 74 77 #include <linux/serial_core.h> 75 78 #endif 76 79 77 80 #undef TOSHIBA_RBTX4927_SETUP_DEBUG 78 81 79 82 #ifdef TOSHIBA_RBTX4927_SETUP_DEBUG 80 - #define TOSHIBA_RBTX4927_SETUP_NONE 0x00000000 81 - 82 - #define TOSHIBA_RBTX4927_SETUP_INFO ( 1 << 0 ) 83 - #define TOSHIBA_RBTX4927_SETUP_WARN ( 1 << 1 ) 84 - #define TOSHIBA_RBTX4927_SETUP_EROR ( 1 << 2 ) 85 - 86 - #define TOSHIBA_RBTX4927_SETUP_EFWFU ( 1 << 3 ) 87 83 #define TOSHIBA_RBTX4927_SETUP_SETUP ( 1 << 4 ) 88 84 #define TOSHIBA_RBTX4927_SETUP_PCIBIOS ( 1 << 7 ) 89 85 #define TOSHIBA_RBTX4927_SETUP_PCI1 ( 1 << 8 ) 90 86 #define TOSHIBA_RBTX4927_SETUP_PCI2 ( 1 << 9 ) 91 - #define TOSHIBA_RBTX4927_SETUP_PCI66 ( 1 << 10 ) 92 87 93 88 #define TOSHIBA_RBTX4927_SETUP_ALL 0xffffffff 94 89 #endif 95 90 96 91 #ifdef TOSHIBA_RBTX4927_SETUP_DEBUG 97 92 static const u32 toshiba_rbtx4927_setup_debug_flag = 98 - (TOSHIBA_RBTX4927_SETUP_NONE | TOSHIBA_RBTX4927_SETUP_INFO | 99 - TOSHIBA_RBTX4927_SETUP_WARN | TOSHIBA_RBTX4927_SETUP_EROR | 100 - TOSHIBA_RBTX4927_SETUP_EFWFU | TOSHIBA_RBTX4927_SETUP_SETUP | 93 + (TOSHIBA_RBTX4927_SETUP_SETUP | 101 94 | TOSHIBA_RBTX4927_SETUP_PCIBIOS | TOSHIBA_RBTX4927_SETUP_PCI1 | 102 - TOSHIBA_RBTX4927_SETUP_PCI2 | TOSHIBA_RBTX4927_SETUP_PCI66); 95 + TOSHIBA_RBTX4927_SETUP_PCI2); 103 96 #endif 104 97 105 98 #ifdef TOSHIBA_RBTX4927_SETUP_DEBUG ··· 693 718 /* no return */ 694 719 } 695 720 696 - void __init toshiba_rbtx4927_setup(void) 721 + void __init plat_mem_setup(void) 697 722 { 698 723 int i; 699 724 u32 cp0_config; ··· 715 740 cp0_config = read_c0_config(); 716 741 cp0_config = cp0_config & ~(TX49_CONF_IC | TX49_CONF_DC); 717 742 write_c0_config(cp0_config); 718 - 719 - #ifdef TOSHIBA_RBTX4927_SETUP_DEBUG 720 - { 721 - extern void dump_cp0(char *); 722 - dump_cp0("toshiba_rbtx4927_early_fw_fixup"); 723 - } 724 - #endif 725 743 726 744 set_io_port_base(KSEG1 + TBTX4927_ISA_IO_OFFSET); 727 745 TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_SETUP, ··· 904 936 "+\n"); 905 937 } 906 938 907 - void __init 908 - toshiba_rbtx4927_time_init(void) 939 + void __init plat_time_init(void) 909 940 { 910 941 mips_hpt_frequency = tx4927_cpu_clock / 2; 911 942 if (tx4927_ccfgptr->ccfg & TX4927_CCFG_TINTDIS)
+1 -1
arch/mips/tx4938/common/Makefile
··· 6 6 # unless it's something special (ie not a .c file). 7 7 # 8 8 9 - obj-y += prom.o setup.o irq.o 9 + obj-y += prom.o irq.o 10 10 obj-$(CONFIG_KGDB) += dbgio.o 11 11 12 12 EXTRA_CFLAGS += -Werror
-45
arch/mips/tx4938/common/setup.c
··· 1 - /* 2 - * linux/arch/mips/tx4938/common/setup.c 3 - * 4 - * common tx4938 setup routines 5 - * 6 - * 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the 7 - * terms of the GNU General Public License version 2. This program is 8 - * licensed "as is" without any warranty of any kind, whether express 9 - * or implied. 10 - * 11 - * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) 12 - */ 13 - 14 - #include <linux/errno.h> 15 - #include <linux/init.h> 16 - #include <linux/kernel_stat.h> 17 - #include <linux/module.h> 18 - #include <linux/signal.h> 19 - #include <linux/sched.h> 20 - #include <linux/types.h> 21 - #include <linux/interrupt.h> 22 - #include <linux/ioport.h> 23 - #include <linux/timex.h> 24 - #include <linux/slab.h> 25 - #include <linux/random.h> 26 - #include <linux/irq.h> 27 - #include <linux/bitops.h> 28 - #include <asm/bootinfo.h> 29 - #include <asm/io.h> 30 - #include <asm/irq.h> 31 - #include <asm/mipsregs.h> 32 - #include <asm/system.h> 33 - #include <asm/time.h> 34 - #include <asm/tx4938/rbtx4938.h> 35 - 36 - extern void toshiba_rbtx4938_setup(void); 37 - 38 - void __init tx4938_setup(void); 39 - void dump_cp0(char *key); 40 - 41 - void __init 42 - plat_mem_setup(void) 43 - { 44 - toshiba_rbtx4938_setup(); 45 - }
+1 -5
arch/mips/tx4938/toshiba_rbtx4938/setup.c
··· 24 24 25 25 #include <asm/wbflush.h> 26 26 #include <asm/reboot.h> 27 - #include <asm/irq.h> 28 27 #include <asm/time.h> 29 28 #include <asm/txx9tmr.h> 30 - #include <asm/uaccess.h> 31 29 #include <asm/io.h> 32 30 #include <asm/bootinfo.h> 33 31 #include <asm/tx4938/rbtx4938.h> 34 32 #ifdef CONFIG_SERIAL_TXX9 35 - #include <linux/tty.h> 36 - #include <linux/serial.h> 37 33 #include <linux/serial_core.h> 38 34 #endif 39 35 #include <linux/spi/spi.h> ··· 851 855 txx9_gbus_clock / 2); 852 856 } 853 857 854 - void __init toshiba_rbtx4938_setup(void) 858 + void __init plat_mem_setup(void) 855 859 { 856 860 unsigned long long pcfg; 857 861 char *argptr;