Skip to content

Commit b78e0bf

Browse files
mpemaddy-kerneldev
authored andcommitted
powerpc: Remove UDBG_RTAS_CONSOLE
The IBM Cell blade support was the last user of UDBG_RTAS_CONSOLE. Although it's still possible to build it via PPC_EARLY_DEBUG_UDBG_RTAS_CONSOLE, AFAIK it's not useful on any other platfoms, because only Cell and JS20 era machines provided the RTAS get/put-term-char functions. If anyone is using it or needs it we can always resurrect it from git. Signed-off-by: Michael Ellerman <[email protected]> Signed-off-by: Madhavan Srinivasan <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 1b52e09 commit b78e0bf

File tree

4 files changed

+0
-89
lines changed

4 files changed

+0
-89
lines changed

arch/powerpc/Kconfig.debug

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,6 @@ config PPC_EARLY_DEBUG_RTAS_PANEL
216216
help
217217
Select this to enable early debugging via the RTAS panel.
218218

219-
config PPC_EARLY_DEBUG_RTAS_CONSOLE
220-
bool "RTAS Console"
221-
depends on PPC_RTAS
222-
select UDBG_RTAS_CONSOLE
223-
help
224-
Select this to enable early debugging via the RTAS console.
225-
226219
config PPC_EARLY_DEBUG_PAS_REALMODE
227220
bool "PA Semi real mode"
228221
depends on PPC_PASEMI

arch/powerpc/kernel/rtas.c

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -798,66 +798,6 @@ void __init udbg_init_rtas_panel(void)
798798
udbg_putc = call_rtas_display_status_delay;
799799
}
800800

801-
#ifdef CONFIG_UDBG_RTAS_CONSOLE
802-
803-
/* If you think you're dying before early_init_dt_scan_rtas() does its
804-
* work, you can hard code the token values for your firmware here and
805-
* hardcode rtas.base/entry etc.
806-
*/
807-
static unsigned int rtas_putchar_token = RTAS_UNKNOWN_SERVICE;
808-
static unsigned int rtas_getchar_token = RTAS_UNKNOWN_SERVICE;
809-
810-
static void udbg_rtascon_putc(char c)
811-
{
812-
int tries;
813-
814-
if (!rtas.base)
815-
return;
816-
817-
/* Add CRs before LFs */
818-
if (c == '\n')
819-
udbg_rtascon_putc('\r');
820-
821-
/* if there is more than one character to be displayed, wait a bit */
822-
for (tries = 0; tries < 16; tries++) {
823-
if (rtas_call(rtas_putchar_token, 1, 1, NULL, c) == 0)
824-
break;
825-
udelay(1000);
826-
}
827-
}
828-
829-
static int udbg_rtascon_getc_poll(void)
830-
{
831-
int c;
832-
833-
if (!rtas.base)
834-
return -1;
835-
836-
if (rtas_call(rtas_getchar_token, 0, 2, &c))
837-
return -1;
838-
839-
return c;
840-
}
841-
842-
static int udbg_rtascon_getc(void)
843-
{
844-
int c;
845-
846-
while ((c = udbg_rtascon_getc_poll()) == -1)
847-
;
848-
849-
return c;
850-
}
851-
852-
853-
void __init udbg_init_rtas_console(void)
854-
{
855-
udbg_putc = udbg_rtascon_putc;
856-
udbg_getc = udbg_rtascon_getc;
857-
udbg_getc_poll = udbg_rtascon_getc_poll;
858-
}
859-
#endif /* CONFIG_UDBG_RTAS_CONSOLE */
860-
861801
void rtas_progress(char *s, unsigned short hex)
862802
{
863803
struct device_node *root;
@@ -2135,21 +2075,6 @@ int __init early_init_dt_scan_rtas(unsigned long node,
21352075
rtas.size = *sizep;
21362076
}
21372077

2138-
#ifdef CONFIG_UDBG_RTAS_CONSOLE
2139-
basep = of_get_flat_dt_prop(node, "put-term-char", NULL);
2140-
if (basep)
2141-
rtas_putchar_token = *basep;
2142-
2143-
basep = of_get_flat_dt_prop(node, "get-term-char", NULL);
2144-
if (basep)
2145-
rtas_getchar_token = *basep;
2146-
2147-
if (rtas_putchar_token != RTAS_UNKNOWN_SERVICE &&
2148-
rtas_getchar_token != RTAS_UNKNOWN_SERVICE)
2149-
udbg_init_rtas_console();
2150-
2151-
#endif
2152-
21532078
/* break now */
21542079
return 1;
21552080
}

arch/powerpc/kernel/udbg.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ void __init udbg_early_init(void)
3636
#elif defined(CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL)
3737
/* RTAS panel debug */
3838
udbg_init_rtas_panel();
39-
#elif defined(CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE)
40-
/* RTAS console debug */
41-
udbg_init_rtas_console();
4239
#elif defined(CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE)
4340
udbg_init_pas_realmode();
4441
#elif defined(CONFIG_PPC_EARLY_DEBUG_BOOTX)

arch/powerpc/platforms/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ config PPC_DT_CPU_FTRS
7070
firmware provides this binding.
7171
If you're not sure say Y.
7272

73-
config UDBG_RTAS_CONSOLE
74-
bool "RTAS based debug console"
75-
depends on PPC_RTAS
76-
7773
config PPC_SMP_MUXED_IPI
7874
bool
7975
help

0 commit comments

Comments
 (0)