Subject: Don't use hvc_fss if hvc_rtas is available The latest version of Systemsim does come with HVC_RTAS support enabled. Use that one instead, since it brings us one step closer to using no special device drivers for systemsim. Signed-off-by: Arnd Bergmann Index: linus-2.6/drivers/char/hvc_fss.c =================================================================== --- linus-2.6.orig/drivers/char/hvc_fss.c +++ linus-2.6/drivers/char/hvc_fss.c @@ -37,6 +37,7 @@ #include #include +#include #include #include "hvc_console.h" @@ -97,13 +98,22 @@ module_init(hvc_fss_init); static int __init hvc_fss_console_init(void) { /* Don't register if we aren't running on the simulator */ - if (of_find_node_by_path("/mambo")) { - /* Tell the driver we know of one console device. We - * shouldn't get a collision on the index as long as no-one - * else instantiates on hardware they don't have. */ - hvc_instantiate(hvc_fss_cookie, 0, &hvc_fss_get_put_ops ); - add_preferred_console("hvc", 0, NULL); - } + if (!of_find_node_by_path("/mambo")) + return -ENODEV; + +#ifdef CONFIG_HVC_RTAS + /* Also don't register if rtas console is implemented by + * systemsim, so we don't get duplicate output */ + if (rtas_token("put-term-char") != RTAS_UNKNOWN_SERVICE) + return -EBUSY; +#endif + + /* Tell the driver we know of one console device. We + * shouldn't get a collision on the index as long as no-one + * else instantiates on hardware they don't have. */ + hvc_instantiate(hvc_fss_cookie, 0, &hvc_fss_get_put_ops ); + add_preferred_console("hvc", 0, NULL); + return 0; } console_initcall(hvc_fss_console_init);