]> Pileus Git - ~andy/linux/blobdiff - arch/ppc64/kernel/pSeries_setup.c
[PATCH] pSeries - read irqs dynamically
[~andy/linux] / arch / ppc64 / kernel / pSeries_setup.c
index c5f3ccac7cd168a54161253c9cbf0a78b823ac15..f2b41243342c483a63088c5d5f8228744b09c2ef 100644 (file)
@@ -71,8 +71,6 @@
 #define DBG(fmt...)
 #endif
 
-extern void pSeries_final_fixup(void);
-
 extern void find_udbg_vterm(void);
 extern void system_reset_fwnmi(void);  /* from head.S */
 extern void machine_check_fwnmi(void); /* from head.S */
@@ -375,107 +373,6 @@ static void __init pSeries_init_early(void)
 }
 
 
-static void pSeries_progress(char *s, unsigned short hex)
-{
-       struct device_node *root;
-       int width, *p;
-       char *os;
-       static int display_character, set_indicator;
-       static int max_width;
-       static DEFINE_SPINLOCK(progress_lock);
-       static int pending_newline = 0;  /* did last write end with unprinted newline? */
-
-       if (!rtas.base)
-               return;
-
-       if (max_width == 0) {
-               if ((root = find_path_device("/rtas")) &&
-                    (p = (unsigned int *)get_property(root,
-                                                      "ibm,display-line-length",
-                                                      NULL)))
-                       max_width = *p;
-               else
-                       max_width = 0x10;
-               display_character = rtas_token("display-character");
-               set_indicator = rtas_token("set-indicator");
-       }
-
-       if (display_character == RTAS_UNKNOWN_SERVICE) {
-               /* use hex display if available */
-               if (set_indicator != RTAS_UNKNOWN_SERVICE)
-                       rtas_call(set_indicator, 3, 1, NULL, 6, 0, hex);
-               return;
-       }
-
-       spin_lock(&progress_lock);
-
-       /*
-        * Last write ended with newline, but we didn't print it since
-        * it would just clear the bottom line of output. Print it now
-        * instead.
-        *
-        * If no newline is pending, print a CR to start output at the
-        * beginning of the line.
-        */
-       if (pending_newline) {
-               rtas_call(display_character, 1, 1, NULL, '\r');
-               rtas_call(display_character, 1, 1, NULL, '\n');
-               pending_newline = 0;
-       } else {
-               rtas_call(display_character, 1, 1, NULL, '\r');
-       }
-       width = max_width;
-       os = s;
-       while (*os) {
-               if (*os == '\n' || *os == '\r') {
-                       /* Blank to end of line. */
-                       while (width-- > 0)
-                               rtas_call(display_character, 1, 1, NULL, ' ');
-                       /* If newline is the last character, save it
-                        * until next call to avoid bumping up the
-                        * display output.
-                        */
-                       if (*os == '\n' && !os[1]) {
-                               pending_newline = 1;
-                               spin_unlock(&progress_lock);
-                               return;
-                       }
-                       /* RTAS wants CR-LF, not just LF */
-                       if (*os == '\n') {
-                               rtas_call(display_character, 1, 1, NULL, '\r');
-                               rtas_call(display_character, 1, 1, NULL, '\n');
-                       } else {
-                               /* CR might be used to re-draw a line, so we'll
-                                * leave it alone and not add LF.
-                                */
-                               rtas_call(display_character, 1, 1, NULL, *os);
-                       }
-                       width = max_width;
-               } else {
-                       width--;
-                       rtas_call(display_character, 1, 1, NULL, *os);
-               }
-               os++;
-               /* if we overwrite the screen length */
-               if (width <= 0)
-                       while ((*os != 0) && (*os != '\n') && (*os != '\r'))
-                               os++;
-       }
-       /* Blank to end of line. */
-       while (width-- > 0)
-               rtas_call(display_character, 1, 1, NULL, ' ');
-
-       spin_unlock(&progress_lock);
-}
-
 static int pSeries_check_legacy_ioport(unsigned int baseport)
 {
        struct device_node *np;
@@ -526,6 +423,7 @@ struct machdep_calls __initdata pSeries_md = {
        .get_cpuinfo            = pSeries_get_cpuinfo,
        .log_error              = pSeries_log_error,
        .pcibios_fixup          = pSeries_final_fixup,
+       .irq_bus_setup          = pSeries_irq_bus_setup,
        .restart                = rtas_restart,
        .power_off              = rtas_power_off,
        .halt                   = rtas_halt,
@@ -535,7 +433,7 @@ struct machdep_calls __initdata pSeries_md = {
        .get_rtc_time           = rtas_get_rtc_time,
        .set_rtc_time           = rtas_set_rtc_time,
        .calibrate_decr         = generic_calibrate_decr,
-       .progress               = pSeries_progress,
+       .progress               = rtas_progress,
        .check_legacy_ioport    = pSeries_check_legacy_ioport,
        .system_reset_exception = pSeries_system_reset_exception,
        .machine_check_exception = pSeries_machine_check_exception,