diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-06 18:30:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-06 18:30:54 -0500 |
commit | f70f5b9dc74ca7d0a64c4ead3fb28da09dc1b234 (patch) | |
tree | 01f79ae109966d2ec515358481c151cda549d9ab /arch/sparc/include | |
parent | b69fc2efc9205d58c820eb2eb1caa6bf873b4b0d (diff) | |
parent | 09798eb9479da3413bdf96e7d22a84d8b21e05e1 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6: (25 commits)
atyfb: Fix bootup hangs on sparc64.
sparc: update copyright in piggyback.c
sparc: unify strip command in boot/Makefile
sparc: rename piggyback_32 to piggyback
sparc: fix tftpboot.img for sparc64 on little-endian host
sparc: add $BITS to piggyback arguments
sparc: remove obsolete ELF support in piggyback_32.c
sparc: additional comments to piggyback_32.c
sparc: use _start for the start entry (like 64 bit does)
sparc: use trapbase in setup_arch
sparc: refactor piggy_32.c
Added support for ampopts in APBUART driver. Used in AMP systems.
APBUART: added raw AMBA vendor/device number to match against.
SPARC/LEON: avoid AMBAPP name duplicates in openprom fs when REG is missing
SPARC/LEON: added support for selecting Timer Core and Timer within core
LEON: added raw AMBA vendor/device number to find TIMER, IRQCTRL
SPARC/LEON: added support for IRQAMP IRQ Controller
SPARC/LEON: find IRQCTRL and Timer via OF-Tree, instead of hardcoded.
sparc: fix sparse warnings in arch/sparc/prom for 32 bit build
sparc: remove unused prom tree functions
...
Diffstat (limited to 'arch/sparc/include')
-rw-r--r-- | arch/sparc/include/asm/leon.h | 12 | ||||
-rw-r--r-- | arch/sparc/include/asm/leon_amba.h | 6 | ||||
-rw-r--r-- | arch/sparc/include/asm/oplib_32.h | 48 | ||||
-rw-r--r-- | arch/sparc/include/asm/oplib_64.h | 4 |
4 files changed, 22 insertions, 48 deletions
diff --git a/arch/sparc/include/asm/leon.h b/arch/sparc/include/asm/leon.h index 3ea5964c43b4..8580d1764f90 100644 --- a/arch/sparc/include/asm/leon.h +++ b/arch/sparc/include/asm/leon.h | |||
@@ -224,6 +224,18 @@ static inline void sparc_leon3_disable_cache(void) | |||
224 | "sta %%l2, [%%g0] 2\n\t" : : : "l1", "l2"); | 224 | "sta %%l2, [%%g0] 2\n\t" : : : "l1", "l2"); |
225 | }; | 225 | }; |
226 | 226 | ||
227 | static inline unsigned long sparc_leon3_asr17(void) | ||
228 | { | ||
229 | u32 asr17; | ||
230 | __asm__ __volatile__ ("rd %%asr17, %0\n\t" : "=r"(asr17)); | ||
231 | return asr17; | ||
232 | }; | ||
233 | |||
234 | static inline int sparc_leon3_cpuid(void) | ||
235 | { | ||
236 | return sparc_leon3_asr17() >> 28; | ||
237 | } | ||
238 | |||
227 | #endif /*!__ASSEMBLY__*/ | 239 | #endif /*!__ASSEMBLY__*/ |
228 | 240 | ||
229 | #ifdef CONFIG_SMP | 241 | #ifdef CONFIG_SMP |
diff --git a/arch/sparc/include/asm/leon_amba.h b/arch/sparc/include/asm/leon_amba.h index 618e88821795..263c719e96f5 100644 --- a/arch/sparc/include/asm/leon_amba.h +++ b/arch/sparc/include/asm/leon_amba.h | |||
@@ -100,9 +100,8 @@ struct leon3_irqctrl_regs_map { | |||
100 | u32 mpbroadcast; | 100 | u32 mpbroadcast; |
101 | u32 notused02; | 101 | u32 notused02; |
102 | u32 notused03; | 102 | u32 notused03; |
103 | u32 notused10; | 103 | u32 ampctrl; |
104 | u32 notused11; | 104 | u32 icsel[2]; |
105 | u32 notused12; | ||
106 | u32 notused13; | 105 | u32 notused13; |
107 | u32 notused20; | 106 | u32 notused20; |
108 | u32 notused21; | 107 | u32 notused21; |
@@ -112,6 +111,7 @@ struct leon3_irqctrl_regs_map { | |||
112 | u32 force[16]; | 111 | u32 force[16]; |
113 | /* Extended IRQ registers */ | 112 | /* Extended IRQ registers */ |
114 | u32 intid[16]; /* 0xc0 */ | 113 | u32 intid[16]; /* 0xc0 */ |
114 | u32 unused[(0x1000-0x100)/4]; | ||
115 | }; | 115 | }; |
116 | 116 | ||
117 | struct leon3_apbuart_regs_map { | 117 | struct leon3_apbuart_regs_map { |
diff --git a/arch/sparc/include/asm/oplib_32.h b/arch/sparc/include/asm/oplib_32.h index 9e5c64084b86..71e5e9aeb67e 100644 --- a/arch/sparc/include/asm/oplib_32.h +++ b/arch/sparc/include/asm/oplib_32.h | |||
@@ -48,18 +48,6 @@ extern void prom_init(struct linux_romvec *rom_ptr); | |||
48 | /* Boot argument acquisition, returns the boot command line string. */ | 48 | /* Boot argument acquisition, returns the boot command line string. */ |
49 | extern char *prom_getbootargs(void); | 49 | extern char *prom_getbootargs(void); |
50 | 50 | ||
51 | /* Device utilities. */ | ||
52 | |||
53 | /* Map and unmap devices in IO space at virtual addresses. Note that the | ||
54 | * virtual address you pass is a request and the prom may put your mappings | ||
55 | * somewhere else, so check your return value as that is where your new | ||
56 | * mappings really are! | ||
57 | * | ||
58 | * Another note, these are only available on V2 or higher proms! | ||
59 | */ | ||
60 | extern char *prom_mapio(char *virt_hint, int io_space, unsigned int phys_addr, unsigned int num_bytes); | ||
61 | extern void prom_unmapio(char *virt_addr, unsigned int num_bytes); | ||
62 | |||
63 | /* Miscellaneous routines, don't really fit in any category per se. */ | 51 | /* Miscellaneous routines, don't really fit in any category per se. */ |
64 | 52 | ||
65 | /* Reboot the machine with the command line passed. */ | 53 | /* Reboot the machine with the command line passed. */ |
@@ -76,7 +64,7 @@ extern void prom_cmdline(void); | |||
76 | /* Enter the prom, with no chance of continuation for the stand-alone | 64 | /* Enter the prom, with no chance of continuation for the stand-alone |
77 | * which calls this. | 65 | * which calls this. |
78 | */ | 66 | */ |
79 | extern void prom_halt(void) __attribute__ ((noreturn)); | 67 | extern void __noreturn prom_halt(void); |
80 | 68 | ||
81 | /* Set the PROM 'sync' callback function to the passed function pointer. | 69 | /* Set the PROM 'sync' callback function to the passed function pointer. |
82 | * When the user gives the 'sync' command at the prom prompt while the | 70 | * When the user gives the 'sync' command at the prom prompt while the |
@@ -117,25 +105,6 @@ extern void prom_write(const char *buf, unsigned int len); | |||
117 | extern int prom_startcpu(int cpunode, struct linux_prom_registers *context_table, | 105 | extern int prom_startcpu(int cpunode, struct linux_prom_registers *context_table, |
118 | int context, char *program_counter); | 106 | int context, char *program_counter); |
119 | 107 | ||
120 | /* Stop the CPU with the passed device tree node. */ | ||
121 | extern int prom_stopcpu(int cpunode); | ||
122 | |||
123 | /* Idle the CPU with the passed device tree node. */ | ||
124 | extern int prom_idlecpu(int cpunode); | ||
125 | |||
126 | /* Re-Start the CPU with the passed device tree node. */ | ||
127 | extern int prom_restartcpu(int cpunode); | ||
128 | |||
129 | /* PROM memory allocation facilities... */ | ||
130 | |||
131 | /* Allocated at possibly the given virtual address a chunk of the | ||
132 | * indicated size. | ||
133 | */ | ||
134 | extern char *prom_alloc(char *virt_hint, unsigned int size); | ||
135 | |||
136 | /* Free a previously allocated chunk. */ | ||
137 | extern void prom_free(char *virt_addr, unsigned int size); | ||
138 | |||
139 | /* Sun4/sun4c specific memory-management startup hook. */ | 108 | /* Sun4/sun4c specific memory-management startup hook. */ |
140 | 109 | ||
141 | /* Map the passed segment in the given context at the passed | 110 | /* Map the passed segment in the given context at the passed |
@@ -144,6 +113,8 @@ extern void prom_free(char *virt_addr, unsigned int size); | |||
144 | extern void prom_putsegment(int context, unsigned long virt_addr, | 113 | extern void prom_putsegment(int context, unsigned long virt_addr, |
145 | int physical_segment); | 114 | int physical_segment); |
146 | 115 | ||
116 | /* Initialize the memory lists based upon the prom version. */ | ||
117 | void prom_meminit(void); | ||
147 | 118 | ||
148 | /* PROM device tree traversal functions... */ | 119 | /* PROM device tree traversal functions... */ |
149 | 120 | ||
@@ -178,19 +149,11 @@ extern int prom_getbool(phandle node, char *prop); | |||
178 | /* Acquire a string property, null string on error. */ | 149 | /* Acquire a string property, null string on error. */ |
179 | extern void prom_getstring(phandle node, char *prop, char *buf, int bufsize); | 150 | extern void prom_getstring(phandle node, char *prop, char *buf, int bufsize); |
180 | 151 | ||
181 | /* Does the passed node have the given "name"? YES=1 NO=0 */ | ||
182 | extern int prom_nodematch(phandle thisnode, char *name); | ||
183 | |||
184 | /* Search all siblings starting at the passed node for "name" matching | 152 | /* Search all siblings starting at the passed node for "name" matching |
185 | * the given string. Returns the node on success, zero on failure. | 153 | * the given string. Returns the node on success, zero on failure. |
186 | */ | 154 | */ |
187 | extern phandle prom_searchsiblings(phandle node_start, char *name); | 155 | extern phandle prom_searchsiblings(phandle node_start, char *name); |
188 | 156 | ||
189 | /* Return the first property type, as a string, for the given node. | ||
190 | * Returns a null string on error. | ||
191 | */ | ||
192 | extern char *prom_firstprop(phandle node, char *buffer); | ||
193 | |||
194 | /* Returns the next property after the passed property for the given | 157 | /* Returns the next property after the passed property for the given |
195 | * node. Returns null string on failure. | 158 | * node. Returns null string on failure. |
196 | */ | 159 | */ |
@@ -199,9 +162,6 @@ extern char *prom_nextprop(phandle node, char *prev_property, char *buffer); | |||
199 | /* Returns phandle of the path specified */ | 162 | /* Returns phandle of the path specified */ |
200 | extern phandle prom_finddevice(char *name); | 163 | extern phandle prom_finddevice(char *name); |
201 | 164 | ||
202 | /* Returns 1 if the specified node has given property. */ | ||
203 | extern int prom_node_has_property(phandle node, char *property); | ||
204 | |||
205 | /* Set the indicated property at the given node with the passed value. | 165 | /* Set the indicated property at the given node with the passed value. |
206 | * Returns the number of bytes of your value that the prom took. | 166 | * Returns the number of bytes of your value that the prom took. |
207 | */ | 167 | */ |
@@ -219,6 +179,8 @@ extern void prom_apply_obio_ranges(struct linux_prom_registers *obioregs, int nr | |||
219 | extern void prom_apply_generic_ranges(phandle node, phandle parent, | 179 | extern void prom_apply_generic_ranges(phandle node, phandle parent, |
220 | struct linux_prom_registers *sbusregs, int nregs); | 180 | struct linux_prom_registers *sbusregs, int nregs); |
221 | 181 | ||
182 | void prom_ranges_init(void); | ||
183 | |||
222 | /* CPU probing helpers. */ | 184 | /* CPU probing helpers. */ |
223 | int cpu_find_by_instance(int instance, phandle *prom_node, int *mid); | 185 | int cpu_find_by_instance(int instance, phandle *prom_node, int *mid); |
224 | int cpu_find_by_mid(int mid, phandle *prom_node); | 186 | int cpu_find_by_mid(int mid, phandle *prom_node); |
diff --git a/arch/sparc/include/asm/oplib_64.h b/arch/sparc/include/asm/oplib_64.h index 8cd0df34e82b..97a90475c314 100644 --- a/arch/sparc/include/asm/oplib_64.h +++ b/arch/sparc/include/asm/oplib_64.h | |||
@@ -18,8 +18,8 @@ extern char prom_version[]; | |||
18 | */ | 18 | */ |
19 | extern phandle prom_root_node; | 19 | extern phandle prom_root_node; |
20 | 20 | ||
21 | /* PROM stdin and stdout */ | 21 | /* PROM stdout */ |
22 | extern int prom_stdin, prom_stdout; | 22 | extern int prom_stdout; |
23 | 23 | ||
24 | /* /chosen node of the prom device tree, this stays constant after | 24 | /* /chosen node of the prom device tree, this stays constant after |
25 | * initialization is complete. | 25 | * initialization is complete. |