Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3d3ef9d authored by Stephen Boyd's avatar Stephen Boyd Committed by David Brown
Browse files

msm: Support DEBUG_LL on MSM8660 and MSM8960



Add support for DEBUG_LL on the 8660 and 8960 development boards.
While we're here cleanup the uncompress.h code a bit. Avoid
the use of readl/writel as those are Linux specific APIs that
aren't guaranteed to work in the decompressor.

Cc: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
Acked-by: default avatarNicolas Pitre <nico@linaro.org>
Signed-off-by: default avatarDavid Brown <davidb@codeaurora.org>
parent 650e3f0d
Loading
Loading
Loading
Loading
+16 −0
Original line number Original line Diff line number Diff line
@@ -268,6 +268,22 @@ choice
		  Say Y here if you want the debug print routines to direct
		  Say Y here if you want the debug print routines to direct
		  their output to the third serial port on MSM devices.
		  their output to the third serial port on MSM devices.


	config DEBUG_MSM8660_UART
		bool "Kernel low-level debugging messages via MSM 8660 UART"
		depends on ARCH_MSM8X60
		select MSM_HAS_DEBUG_UART_HS
		help
		  Say Y here if you want the debug print routines to direct
		  their output to the serial port on MSM 8660 devices.

	config DEBUG_MSM8960_UART
		bool "Kernel low-level debugging messages via MSM 8960 UART"
		depends on ARCH_MSM8960
		select MSM_HAS_DEBUG_UART_HS
		help
		  Say Y here if you want the debug print routines to direct
		  their output to the serial port on MSM 8960 devices.

endchoice
endchoice


config EARLY_PRINTK
config EARLY_PRINTK
+3 −0
Original line number Original line Diff line number Diff line
@@ -60,6 +60,9 @@ config ARCH_MSM8960


endchoice
endchoice


config MSM_HAS_DEBUG_UART_HS
	bool

config MSM_SOC_REV_A
config MSM_SOC_REV_A
	bool
	bool
config  ARCH_MSM_SCORPIONMP
config  ARCH_MSM_SCORPIONMP
+29 −3
Original line number Original line Diff line number Diff line
/*
/*
 *
 *
 * Copyright (C) 2007 Google, Inc.
 * Copyright (C) 2007 Google, Inc.
 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
 * Author: Brian Swetland <swetland@google.com>
 * Author: Brian Swetland <swetland@google.com>
 *
 *
 * This software is licensed under the terms of the GNU General Public
 * This software is licensed under the terms of the GNU General Public
@@ -25,15 +26,40 @@
	.endm
	.endm


	.macro	senduart, rd, rx
	.macro	senduart, rd, rx
#ifdef CONFIG_MSM_HAS_DEBUG_UART_HS
	@ Write the 1 character to UARTDM_TF
	str	\rd, [\rx, #0x70]
#else
	teq	\rx, #0
	teq	\rx, #0
	strne	\rd, [\rx, #0x0C]
	strne	\rd, [\rx, #0x0C]
#endif
	.endm
	.endm


	.macro	waituart, rd, rx
	.macro	waituart, rd, rx
#ifdef CONFIG_MSM_HAS_DEBUG_UART_HS
	@ check for TX_EMT in UARTDM_SR
	ldr	\rd, [\rx, #0x08]
	tst	\rd, #0x08
	bne	1002f
	@ wait for TXREADY in UARTDM_ISR
1001:	ldr	\rd, [\rx, #0x14]
	tst	\rd, #0x80
	beq 	1001b
1002:
	@ Clear TX_READY by writing to the UARTDM_CR register
	mov	\rd, #0x300
	str	\rd, [\rx, #0x10]
	@ Write 0x1 to NCF register
	mov 	\rd, #0x1
	str	\rd, [\rx, #0x40]
	@ UARTDM reg. Read to induce delay
	ldr	\rd, [\rx, #0x08]
#else
	@ wait for TX_READY
	@ wait for TX_READY
1001:	ldr	\rd, [\rx, #0x08]
1001:	ldr	\rd, [\rx, #0x08]
	tst	\rd, #0x04
	tst	\rd, #0x04
	beq	1001b
	beq	1001b
#endif
	.endm
	.endm


	.macro	busyuart, rd, rx
	.macro	busyuart, rd, rx
+5 −0
Original line number Original line Diff line number Diff line
@@ -45,4 +45,9 @@
#define MSM8960_TMR0_PHYS	0x0208A000
#define MSM8960_TMR0_PHYS	0x0208A000
#define MSM8960_TMR0_SIZE	SZ_4K
#define MSM8960_TMR0_SIZE	SZ_4K


#ifdef CONFIG_DEBUG_MSM8960_UART
#define MSM_DEBUG_UART_BASE	0xE1040000
#define MSM_DEBUG_UART_PHYS	0x16440000
#endif

#endif
#endif
+5 −0
Original line number Original line Diff line number Diff line
@@ -62,4 +62,9 @@
#define MSM8X60_TMR0_PHYS	0x02040000
#define MSM8X60_TMR0_PHYS	0x02040000
#define MSM8X60_TMR0_SIZE	SZ_4K
#define MSM8X60_TMR0_SIZE	SZ_4K


#ifdef CONFIG_DEBUG_MSM8660_UART
#define MSM_DEBUG_UART_BASE	0xE1040000
#define MSM_DEBUG_UART_PHYS	0x19C40000
#endif

#endif
#endif
Loading