Commit ac78ed3d authored by Anton Blanchard's avatar Anton Blanchard

ppc64: merge status indicator update from 2.4

parent f68f3400
......@@ -158,7 +158,6 @@ chrp_setup_arch(void)
for (openpic = 0; n > 0; --n)
openpic = (openpic << 32) + *opprop++;
printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic);
udbg_printf("OpenPIC addr: %lx\n", openpic);
OpenPIC_Addr = __ioremap(openpic, 0x40000, _PAGE_NO_CACHE);
}
......@@ -175,7 +174,9 @@ chrp_init2(void)
* -- tibit
*/
chrp_request_regions();
ppc_md.progress(UTS_RELEASE, 0x7777);
/* Manually leave the kernel version on the panel. */
ppc_md.progress("Linux ppc64\n", 0);
ppc_md.progress(UTS_RELEASE, 0);
}
/* Initialize firmware assisted non-maskable interrupts if
......@@ -268,7 +269,6 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md.progress = chrp_progress;
ppc_md.progress("Linux ppc64\n", 0x0);
}
void
......@@ -280,10 +280,7 @@ chrp_progress(char *s, unsigned short hex)
static int display_character, set_indicator;
static int max_width;
if (hex)
udbg_printf("<chrp_progress> %s\n", s);
if (!rtas.base || (naca->platform != PLATFORM_PSERIES))
if (!rtas.base)
return;
if (max_width == 0) {
......
......@@ -289,7 +289,7 @@ void __init openpic_init(int main_pic, int offset, unsigned char* chrp_ack,
}
OpenPIC = (volatile struct OpenPIC *)OpenPIC_Addr;
ppc_md.progress("openpic enter",0x122);
ppc64_boot_msg(0x20, "OpenPic Init");
t = openpic_read(&OpenPIC->Global.Feature_Reporting0);
switch (t & OPENPIC_FEATURE_VERSION_MASK) {
......@@ -326,7 +326,7 @@ void __init openpic_init(int main_pic, int offset, unsigned char* chrp_ack,
find_ISUs();
/* Initialize timer interrupts */
ppc_md.progress("openpic timer",0x3ba);
ppc64_boot_msg(0x21, "OpenPic Timer");
for (i = 0; i < OPENPIC_NUM_TIMERS; i++) {
/* Disabled, Priority 0 */
openpic_inittimer(i, 0, openpic_vec_timer+i);
......@@ -336,7 +336,7 @@ void __init openpic_init(int main_pic, int offset, unsigned char* chrp_ack,
#ifdef CONFIG_SMP
/* Initialize IPI interrupts */
ppc_md.progress("openpic ipi",0x3bb);
ppc64_boot_msg(0x22, "OpenPic IPI");
openpic_test_broken_IPI();
for (i = 0; i < OPENPIC_NUM_IPI; i++) {
/* Disabled, Priority 10..13 */
......@@ -348,7 +348,7 @@ void __init openpic_init(int main_pic, int offset, unsigned char* chrp_ack,
#endif
/* Initialize external interrupts */
ppc_md.progress("openpic ext",0x3bc);
ppc64_boot_msg(0x23, "OpenPic Ext");
openpic_set_priority(0xf);
......@@ -381,7 +381,7 @@ void __init openpic_init(int main_pic, int offset, unsigned char* chrp_ack,
irq_desc[i].handler = &open_pic;
/* Initialize the spurious interrupt */
ppc_md.progress("openpic spurious",0x3bd);
ppc64_boot_msg(0x24, "OpenPic Spurious");
openpic_set_spurious(openpic_vec_spurious);
/* Initialize the cascade */
......@@ -393,7 +393,7 @@ void __init openpic_init(int main_pic, int offset, unsigned char* chrp_ack,
openpic_set_priority(0);
openpic_disable_8259_pass_through();
ppc_md.progress("openpic exit",0x222);
ppc64_boot_msg(0x25, "OpenPic Done");
}
void openpic_setup_ISU(int isu_num, unsigned long addr)
......
......@@ -392,6 +392,7 @@ pcibios_init(void)
iSeries_pcibios_init();
#endif
ppc64_boot_msg(0x40, "PCI Probe");
printk("PCI: Probing PCI hardware\n");
PPCDBG(PPCDBG_BUSWALK,"PCI: Probing PCI hardware\n");
......@@ -431,6 +432,7 @@ pcibios_init(void)
printk("PCI: Probing PCI hardware done\n");
PPCDBG(PPCDBG_BUSWALK,"PCI: Probing PCI hardware done.\n");
ppc64_boot_msg(0x41, "PCI Done");
}
......
......@@ -399,7 +399,6 @@ void parse_cmd_line(unsigned long r3, unsigned long r4, unsigned long r5,
}
__max_memory = maxmem;
}
ppc_md.progress("id mach: done", 0x200);
}
......@@ -498,13 +497,13 @@ void __init setup_arch(char **cmdline_p)
calibrate_delay = ppc64_calibrate_delay;
ppc64_boot_msg(0x12, "Setup Arch");
#ifdef CONFIG_XMON
xmon_map_scc();
if (strstr(cmd_line, "xmon"))
xmon(0);
#endif /* CONFIG_XMON */
ppc_md.progress("setup_arch:enter", 0x3eab);
/*
* Set cache line size based on type of cpu as a default.
......@@ -528,13 +527,59 @@ void __init setup_arch(char **cmdline_p)
/* set up the bootmem stuff with available memory */
do_init_bootmem();
ppc_md.progress("setup_arch:bootmem", 0x3eab);
ppc_md.setup_arch();
paging_init();
sort_exception_table();
ppc_md.progress("setup_arch: exit", 0x3eab);
ppc64_boot_msg(0x15, "Setup Done");
}
/* ToDo: do something useful if ppc_md is not yet setup. */
#define PPC64_LINUX_FUNCTION 0x0f000000
#define PPC64_IPL_MESSAGE 0xc0000000
#define PPC64_TERM_MESSAGE 0xb0000000
#define PPC64_ATTN_MESSAGE 0xa0000000
#define PPC64_DUMP_MESSAGE 0xd0000000
static void ppc64_do_msg(unsigned int src, const char *msg)
{
if (ppc_md.progress) {
char buf[32];
sprintf(buf, "%08x \n", src);
ppc_md.progress(buf, 0);
sprintf(buf, "%-16s", msg);
ppc_md.progress(buf, 0);
}
}
/* Print a boot progress message. */
void ppc64_boot_msg(unsigned int src, const char *msg)
{
ppc64_do_msg(PPC64_LINUX_FUNCTION|PPC64_IPL_MESSAGE|src, msg);
printk("[boot]%04x %s\n", src, msg);
}
/* Print a termination message (print only -- does not stop the kernel) */
void ppc64_terminate_msg(unsigned int src, const char *msg)
{
ppc64_do_msg(PPC64_LINUX_FUNCTION|PPC64_TERM_MESSAGE|src, msg);
printk("[terminate]%04x %s\n", src, msg);
}
/* Print something that needs attention (device error, etc) */
void ppc64_attention_msg(unsigned int src, const char *msg)
{
ppc64_do_msg(PPC64_LINUX_FUNCTION|PPC64_ATTN_MESSAGE|src, msg);
printk("[attention]%04x %s\n", src, msg);
}
/* Print a dump progress message. */
void ppc64_dump_msg(unsigned int src, const char *msg)
{
ppc64_do_msg(PPC64_LINUX_FUNCTION|PPC64_DUMP_MESSAGE|src, msg);
printk("[dump]%04x %s\n", src, msg);
}
int set_spread_lpevents( char * str )
......
......@@ -296,6 +296,8 @@ xics_init_IRQ( void )
struct device_node *np;
uint *ireg, ilen, indx=0;
ppc64_boot_msg(0x20, "XICS Init");
ibm_get_xive = rtas_token("ibm,get-xive");
ibm_set_xive = rtas_token("ibm,set-xive");
ibm_int_off = rtas_token("ibm,int-off");
......@@ -413,6 +415,7 @@ xics_init_IRQ( void )
request_irq(XICS_IPI + XICS_IRQ_OFFSET, xics_ipi_action, 0, "IPI", 0);
irq_desc[XICS_IPI+XICS_IRQ_OFFSET].status |= IRQ_PER_CPU;
#endif
ppc64_boot_msg(0x21, "XICS Done");
}
void xics_isa_init(void)
......
......@@ -411,7 +411,7 @@ void __init mm_init_ppc64(void)
struct paca_struct *lpaca;
unsigned long guard_page, index;
ppc_md.progress("MM:init", 0);
ppc64_boot_msg(0x100, "MM Init");
/* Reserve all contexts < FIRST_USER_CONTEXT for kernel use.
* The range of contexts [FIRST_USER_CONTEXT, NUM_USER_CONTEXT)
......@@ -432,7 +432,7 @@ void __init mm_init_ppc64(void)
ppc_md.hpte_updateboltedpp(PP_RXRX, guard_page);
}
ppc_md.progress("MM:exit", 0x211);
ppc64_boot_msg(0x100, "MM Init Done");
}
/*
......
......@@ -119,5 +119,20 @@ struct machdep_calls {
extern struct machdep_calls ppc_md;
extern char cmd_line[512];
/* Functions to produce codes on the leds.
* The SRC code should be unique for the message category and should
* be limited to the lower 24 bits (the upper 8 are set by these funcs),
* and (for boot & dump) should be sorted numerically in the order
* the events occur.
*/
/* Print a boot progress message. */
void ppc64_boot_msg(unsigned int src, const char *msg);
/* Print a termination message (print only -- does not stop the kernel) */
void ppc64_terminate_msg(unsigned int src, const char *msg);
/* Print something that needs attention (device error, etc) */
void ppc64_attention_msg(unsigned int src, const char *msg);
/* Print a dump progress message. */
void ppc64_dump_msg(unsigned int src, const char *msg);
#endif /* _PPC64_MACHDEP_H */
#endif /* __KERNEL__ */
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