aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2011-08-25 14:06:57 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-26 14:01:15 -0400
commit191c5cf1ffc8acf61cd2d2407052ced1a1116130 (patch)
tree9b856f76de9c4946ca53372ecde26d9dd0d92f49 /drivers/tty
parentda4e40e271a30ecf8b87f70619cca93c25ed0199 (diff)
tty/powerpc: fix build break with ehv_bytechan.c on allyesconfig
The ePAPR hypervisor byte channel driver is supposed to work on all ePAPR-compliant embedded PowerPC systems, but it had a reference to the MSR_GS bit, which is available only on Book-E systems. Also fix a couple integer-to-pointer typecast problems. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/ehv_bytechan.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c
index e67f70bbf0ac..f733718bf8e7 100644
--- a/drivers/tty/ehv_bytechan.c
+++ b/drivers/tty/ehv_bytechan.c
@@ -226,10 +226,6 @@ void __init udbg_init_ehv_bc(void)
226 unsigned int rx_count, tx_count; 226 unsigned int rx_count, tx_count;
227 unsigned int ret; 227 unsigned int ret;
228 228
229 /* Check if we're running as a guest of a hypervisor */
230 if (!(mfmsr() & MSR_GS))
231 return;
232
233 /* Verify the byte channel handle */ 229 /* Verify the byte channel handle */
234 ret = ev_byte_channel_poll(CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE, 230 ret = ev_byte_channel_poll(CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE,
235 &rx_count, &tx_count); 231 &rx_count, &tx_count);
@@ -286,7 +282,7 @@ static int ehv_bc_console_byte_channel_send(unsigned int handle, const char *s,
286static void ehv_bc_console_write(struct console *co, const char *s, 282static void ehv_bc_console_write(struct console *co, const char *s,
287 unsigned int count) 283 unsigned int count)
288{ 284{
289 unsigned int handle = (unsigned int)co->data; 285 unsigned int handle = (uintptr_t)co->data;
290 char s2[EV_BYTE_CHANNEL_MAX_BYTES]; 286 char s2[EV_BYTE_CHANNEL_MAX_BYTES];
291 unsigned int i, j = 0; 287 unsigned int i, j = 0;
292 char c; 288 char c;
@@ -352,7 +348,7 @@ static int __init ehv_bc_console_init(void)
352 CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE); 348 CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE);
353#endif 349#endif
354 350
355 ehv_bc_console.data = (void *)stdout_bc; 351 ehv_bc_console.data = (void *)(uintptr_t)stdout_bc;
356 352
357 /* add_preferred_console() must be called before register_console(), 353 /* add_preferred_console() must be called before register_console(),
358 otherwise it won't work. However, we don't want to enumerate all the 354 otherwise it won't work. However, we don't want to enumerate all the