Commit 667bc389 authored by David S. Miller's avatar David S. Miller

[SPARC]: Kill 'prom_palette'.

The idea of this thing is we could save/restore the firmware's
palette when breaking in and out of the firmware prompt.

Only one driver implemented this (atyfb) and it's value is
questionable.  If you're just debugging you don't really
care that the characters end up being purple or whatever.

And we can provide better debugging and firmware command
facilities with minimal in-kernel console I/O drivers.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 30b3cfe1
...@@ -141,16 +141,12 @@ void cpu_idle(void) ...@@ -141,16 +141,12 @@ void cpu_idle(void)
extern char reboot_command []; extern char reboot_command [];
extern void (*prom_palette)(int);
/* XXX cli/sti -> local_irq_xxx here, check this works once SMP is fixed. */ /* XXX cli/sti -> local_irq_xxx here, check this works once SMP is fixed. */
void machine_halt(void) void machine_halt(void)
{ {
local_irq_enable(); local_irq_enable();
mdelay(8); mdelay(8);
local_irq_disable(); local_irq_disable();
if (prom_palette)
prom_palette (1);
prom_halt(); prom_halt();
panic("Halt failed!"); panic("Halt failed!");
} }
...@@ -165,8 +161,6 @@ void machine_restart(char * cmd) ...@@ -165,8 +161,6 @@ void machine_restart(char * cmd)
p = strchr (reboot_command, '\n'); p = strchr (reboot_command, '\n');
if (p) *p = 0; if (p) *p = 0;
if (prom_palette)
prom_palette (1);
if (cmd) if (cmd)
prom_reboot(cmd); prom_reboot(cmd);
if (*reboot_command) if (*reboot_command)
......
...@@ -65,7 +65,6 @@ struct screen_info screen_info = { ...@@ -65,7 +65,6 @@ struct screen_info screen_info = {
*/ */
extern unsigned long trapbase; extern unsigned long trapbase;
void (*prom_palette)(int);
/* Pretty sick eh? */ /* Pretty sick eh? */
void prom_sync_me(void) void prom_sync_me(void)
...@@ -80,8 +79,6 @@ void prom_sync_me(void) ...@@ -80,8 +79,6 @@ void prom_sync_me(void)
"nop\n\t" "nop\n\t"
"nop\n\t" : : "r" (&trapbase)); "nop\n\t" : : "r" (&trapbase));
if (prom_palette)
prom_palette(1);
prom_printf("PROM SYNC COMMAND...\n"); prom_printf("PROM SYNC COMMAND...\n");
show_free_areas(); show_free_areas();
if(current->pid != 0) { if(current->pid != 0) {
......
...@@ -45,9 +45,6 @@ prom_feval(char *fstring) ...@@ -45,9 +45,6 @@ prom_feval(char *fstring)
spin_unlock_irqrestore(&prom_lock, flags); spin_unlock_irqrestore(&prom_lock, flags);
} }
/* We want to do this more nicely some day. */
extern void (*prom_palette)(int);
/* Drop into the prom, with the chance to continue with the 'go' /* Drop into the prom, with the chance to continue with the 'go'
* prom command. * prom command.
*/ */
...@@ -58,8 +55,6 @@ prom_cmdline(void) ...@@ -58,8 +55,6 @@ prom_cmdline(void)
extern void install_linux_ticker(void); extern void install_linux_ticker(void);
unsigned long flags; unsigned long flags;
if (prom_palette)
prom_palette (1);
spin_lock_irqsave(&prom_lock, flags); spin_lock_irqsave(&prom_lock, flags);
install_obp_ticker(); install_obp_ticker();
(*(romvec->pv_abort))(); (*(romvec->pv_abort))();
...@@ -69,8 +64,6 @@ prom_cmdline(void) ...@@ -69,8 +64,6 @@ prom_cmdline(void)
#ifdef CONFIG_SUN_AUXIO #ifdef CONFIG_SUN_AUXIO
set_auxio(AUXIO_LED, 0); set_auxio(AUXIO_LED, 0);
#endif #endif
if (prom_palette)
prom_palette (0);
} }
/* Drop into the prom, but completely terminate the program. /* Drop into the prom, but completely terminate the program.
......
...@@ -113,13 +113,9 @@ void cpu_idle(void) ...@@ -113,13 +113,9 @@ void cpu_idle(void)
extern char reboot_command []; extern char reboot_command [];
extern void (*prom_palette)(int);
void machine_halt(void) void machine_halt(void)
{ {
sstate_halt(); sstate_halt();
if (prom_palette)
prom_palette (1);
prom_halt(); prom_halt();
panic("Halt failed!"); panic("Halt failed!");
} }
...@@ -127,8 +123,6 @@ void machine_halt(void) ...@@ -127,8 +123,6 @@ void machine_halt(void)
void machine_alt_power_off(void) void machine_alt_power_off(void)
{ {
sstate_poweroff(); sstate_poweroff();
if (prom_palette)
prom_palette(1);
prom_halt_power_off(); prom_halt_power_off();
panic("Power-off failed!"); panic("Power-off failed!");
} }
...@@ -140,8 +134,6 @@ void machine_restart(char * cmd) ...@@ -140,8 +134,6 @@ void machine_restart(char * cmd)
sstate_reboot(); sstate_reboot();
p = strchr (reboot_command, '\n'); p = strchr (reboot_command, '\n');
if (p) *p = 0; if (p) *p = 0;
if (prom_palette)
prom_palette (1);
if (cmd) if (cmd)
prom_reboot(cmd); prom_reboot(cmd);
if (*reboot_command) if (*reboot_command)
......
...@@ -68,8 +68,6 @@ struct screen_info screen_info = { ...@@ -68,8 +68,6 @@ struct screen_info screen_info = {
16 /* orig-video-points */ 16 /* orig-video-points */
}; };
void (*prom_palette)(int);
static void static void
prom_console_write(struct console *con, const char *s, unsigned n) prom_console_write(struct console *con, const char *s, unsigned n)
{ {
......
...@@ -85,7 +85,6 @@ extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *); ...@@ -85,7 +85,6 @@ extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *);
extern long sparc32_open(const char __user * filename, int flags, int mode); extern long sparc32_open(const char __user * filename, int flags, int mode);
extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
unsigned long pfn, unsigned long size, pgprot_t prot); unsigned long pfn, unsigned long size, pgprot_t prot);
extern void (*prom_palette)(int);
extern int __ashrdi3(int, int); extern int __ashrdi3(int, int);
...@@ -355,5 +354,3 @@ EXPORT_SYMBOL(xor_niagara_2); ...@@ -355,5 +354,3 @@ EXPORT_SYMBOL(xor_niagara_2);
EXPORT_SYMBOL(xor_niagara_3); EXPORT_SYMBOL(xor_niagara_3);
EXPORT_SYMBOL(xor_niagara_4); EXPORT_SYMBOL(xor_niagara_4);
EXPORT_SYMBOL(xor_niagara_5); EXPORT_SYMBOL(xor_niagara_5);
EXPORT_SYMBOL(prom_palette);
...@@ -55,9 +55,6 @@ void prom_feval(const char *fstring) ...@@ -55,9 +55,6 @@ void prom_feval(const char *fstring)
P1275_INOUT(1, 1), fstring); P1275_INOUT(1, 1), fstring);
} }
/* We want to do this more nicely some day. */
extern void (*prom_palette)(int);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
extern void smp_capture(void); extern void smp_capture(void);
extern void smp_release(void); extern void smp_release(void);
...@@ -72,9 +69,6 @@ void prom_cmdline(void) ...@@ -72,9 +69,6 @@ void prom_cmdline(void)
local_irq_save(flags); local_irq_save(flags);
if (prom_palette)
prom_palette(1);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
smp_capture(); smp_capture();
#endif #endif
...@@ -85,9 +79,6 @@ void prom_cmdline(void) ...@@ -85,9 +79,6 @@ void prom_cmdline(void)
smp_release(); smp_release();
#endif #endif
if (prom_palette)
prom_palette(0);
local_irq_restore(flags); local_irq_restore(flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment