setup.c (8d795f2a5cf73338a467ac82bdeb73225e987c45) | setup.c (94a4c32939dede9328c6e4face335eb8441fc18d) |
---|---|
1/* 2 * linux/arch/mips/txx9/generic/setup.c 3 * 4 * Based on linux/arch/mips/txx9/rbtx4938/setup.c, 5 * and RBTX49xx patch from CELF patch archive. 6 * 7 * 2003-2005 (c) MontaVista Software, Inc. 8 * (C) Copyright TOSHIBA CORPORATION 2000-2001, 2004-2007 --- 16 unchanged lines hidden (view full) --- 25#include <asm/txx9/tx4938.h> 26#endif 27 28/* EBUSC settings of TX4927, etc. */ 29struct resource txx9_ce_res[8]; 30static char txx9_ce_res_name[8][4]; /* "CEn" */ 31 32/* pcode, internal register */ | 1/* 2 * linux/arch/mips/txx9/generic/setup.c 3 * 4 * Based on linux/arch/mips/txx9/rbtx4938/setup.c, 5 * and RBTX49xx patch from CELF patch archive. 6 * 7 * 2003-2005 (c) MontaVista Software, Inc. 8 * (C) Copyright TOSHIBA CORPORATION 2000-2001, 2004-2007 --- 16 unchanged lines hidden (view full) --- 25#include <asm/txx9/tx4938.h> 26#endif 27 28/* EBUSC settings of TX4927, etc. */ 29struct resource txx9_ce_res[8]; 30static char txx9_ce_res_name[8][4]; /* "CEn" */ 31 32/* pcode, internal register */ |
33unsigned int txx9_pcode; |
|
33char txx9_pcode_str[8]; 34static struct resource txx9_reg_res = { 35 .name = txx9_pcode_str, 36 .flags = IORESOURCE_MEM, 37}; 38void __init 39txx9_reg_res_init(unsigned int pcode, unsigned long base, unsigned long size) 40{ --- 13 unchanged lines hidden (view full) --- 54 } 55} 56 57/* clocks */ 58unsigned int txx9_master_clock; 59unsigned int txx9_cpu_clock; 60unsigned int txx9_gbus_clock; 61 | 34char txx9_pcode_str[8]; 35static struct resource txx9_reg_res = { 36 .name = txx9_pcode_str, 37 .flags = IORESOURCE_MEM, 38}; 39void __init 40txx9_reg_res_init(unsigned int pcode, unsigned long base, unsigned long size) 41{ --- 13 unchanged lines hidden (view full) --- 55 } 56} 57 58/* clocks */ 59unsigned int txx9_master_clock; 60unsigned int txx9_cpu_clock; 61unsigned int txx9_gbus_clock; 62 |
63int txx9_ccfg_toeon __initdata = 1; |
|
62 63/* Minimum CLK support */ 64 65struct clk *clk_get(struct device *dev, const char *id) 66{ 67 if (!strcmp(id, "spi-baseclk")) | 64 65/* Minimum CLK support */ 66 67struct clk *clk_get(struct device *dev, const char *id) 68{ 69 if (!strcmp(id, "spi-baseclk")) |
68 return (struct clk *)(txx9_gbus_clock / 2 / 4); | 70 return (struct clk *)((unsigned long)txx9_gbus_clock / 2 / 4); |
69 if (!strcmp(id, "imbus_clk")) | 71 if (!strcmp(id, "imbus_clk")) |
70 return (struct clk *)(txx9_gbus_clock / 2); | 72 return (struct clk *)((unsigned long)txx9_gbus_clock / 2); |
71 return ERR_PTR(-ENOENT); 72} 73EXPORT_SYMBOL(clk_get); 74 75int clk_enable(struct clk *clk) 76{ 77 return 0; 78} --- 39 unchanged lines hidden (view full) --- 118struct txx9_board_vec *txx9_board_vec __initdata; 119static char txx9_system_type[32]; 120 121void __init prom_init_cmdline(void) 122{ 123 int argc = (int)fw_arg0; 124 char **argv = (char **)fw_arg1; 125 int i; /* Always ignore the "-c" at argv[0] */ | 73 return ERR_PTR(-ENOENT); 74} 75EXPORT_SYMBOL(clk_get); 76 77int clk_enable(struct clk *clk) 78{ 79 return 0; 80} --- 39 unchanged lines hidden (view full) --- 120struct txx9_board_vec *txx9_board_vec __initdata; 121static char txx9_system_type[32]; 122 123void __init prom_init_cmdline(void) 124{ 125 int argc = (int)fw_arg0; 126 char **argv = (char **)fw_arg1; 127 int i; /* Always ignore the "-c" at argv[0] */ |
128#ifdef CONFIG_64BIT 129 char *fixed_argv[32]; 130 for (i = 0; i < argc; i++) 131 fixed_argv[i] = (char *)(long)(*((__s32 *)argv + i)); 132 argv = fixed_argv; 133#endif |
|
126 127 /* ignore all built-in args if any f/w args given */ 128 if (argc > 1) 129 *arcs_cmdline = '\0'; 130 131 for (i = 1; i < argc; i++) { 132 if (i != 1) 133 strcat(arcs_cmdline, " "); --- 41 unchanged lines hidden (view full) --- 175char * __init prom_getcmdline(void) 176{ 177 return &(arcs_cmdline[0]); 178} 179 180/* wrappers */ 181void __init plat_mem_setup(void) 182{ | 134 135 /* ignore all built-in args if any f/w args given */ 136 if (argc > 1) 137 *arcs_cmdline = '\0'; 138 139 for (i = 1; i < argc; i++) { 140 if (i != 1) 141 strcat(arcs_cmdline, " "); --- 41 unchanged lines hidden (view full) --- 183char * __init prom_getcmdline(void) 184{ 185 return &(arcs_cmdline[0]); 186} 187 188/* wrappers */ 189void __init plat_mem_setup(void) 190{ |
191 ioport_resource.start = 0; 192 ioport_resource.end = ~0UL; /* no limit */ 193 iomem_resource.start = 0; 194 iomem_resource.end = ~0UL; /* no limit */ |
|
183 txx9_board_vec->mem_setup(); 184} 185 186void __init arch_init_irq(void) 187{ 188 txx9_board_vec->irq_setup(); 189} 190 --- 42 unchanged lines hidden --- | 195 txx9_board_vec->mem_setup(); 196} 197 198void __init arch_init_irq(void) 199{ 200 txx9_board_vec->irq_setup(); 201} 202 --- 42 unchanged lines hidden --- |