@@ -66,9 +66,9 @@ endif
endif
ifeq ($(EARLY_PRINTK_INC),scif)
ifneq ($(word 3,$(EARLY_PRINTK_CFG)),)
-CFLAGS-y += -DEARLY_PRINTK_VERSION_$(word 3,$(EARLY_PRINTK_CFG))
+CFLAGS-y += -DCONFIG_EARLY_UART_SCIF_VERSION_$(word 3,$(EARLY_PRINTK_CFG))
else
-CFLAGS-y += -DEARLY_PRINTK_VERSION_NONE
+CFLAGS-y += -DCONFIG_EARLY_UART_SCIF_VERSION_NONE
endif
endif
@@ -77,11 +77,11 @@ EARLY_PRINTK := y
endif
CFLAGS-$(EARLY_PRINTK) += -DCONFIG_EARLY_PRINTK
-CFLAGS-$(EARLY_PRINTK_INIT_UART) += -DEARLY_PRINTK_INIT_UART
-CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_INC=\"debug-$(EARLY_PRINTK_INC).inc\"
-CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_BAUD=$(EARLY_PRINTK_BAUD)
-CFLAGS-$(EARLY_PRINTK) += -DEARLY_UART_BASE_ADDRESS=$(EARLY_UART_BASE_ADDRESS)
-CFLAGS-$(EARLY_PRINTK) += -DEARLY_UART_REG_SHIFT=$(EARLY_UART_REG_SHIFT)
+CFLAGS-$(EARLY_PRINTK_INIT_UART) += -DCONFIG_EARLY_UART_INIT
+CFLAGS-$(EARLY_PRINTK) += -DCONFIG_EARLY_PRINTK_INC=\"debug-$(EARLY_PRINTK_INC).inc\"
+CFLAGS-$(EARLY_PRINTK) += -DCONFIG_EARLY_UART_PL011_BAUD_RATE=$(EARLY_PRINTK_BAUD)
+CFLAGS-$(EARLY_PRINTK) += -DCONFIG_EARLY_UART_BASE_ADDRESS=$(EARLY_UART_BASE_ADDRESS)
+CFLAGS-$(EARLY_PRINTK) += -DCONFIG_EARLY_UART_8250_REG_SHIFT=$(EARLY_UART_REG_SHIFT)
else # !CONFIG_DEBUG
@@ -23,7 +23,7 @@
*/
.macro early_uart_ready rb rc
1:
- ldr \rc, [\rb, #(UART_LSR << EARLY_UART_REG_SHIFT)] /* Read LSR */
+ ldr \rc, [\rb, #(UART_LSR << CONFIG_EARLY_UART_8250_REG_SHIFT)] /* Read LSR */
tst \rc, #UART_LSR_THRE /* Check Xmit holding register flag */
beq 1b /* Wait for the UART to be ready */
.endm
@@ -25,9 +25,9 @@
* rd: scratch register 2 (unused here)
*/
.macro early_uart_init rb, rc, rd
- mov \rc, #(7372800 / EARLY_PRINTK_BAUD % 16)
+ mov \rc, #(7372800 / CONFIG_EARLY_UART_PL011_BAUD_RATE % 16)
str \rc, [\rb, #FBRD] /* -> UARTFBRD (Baud divisor fraction) */
- mov \rc, #(7372800 / EARLY_PRINTK_BAUD / 16)
+ mov \rc, #(7372800 / CONFIG_EARLY_UART_PL011_BAUD_RATE / 16)
str \rc, [\rb, #IBRD] /* -> UARTIBRD (Baud divisor integer) */
mov \rc, #0x60 /* 8n1 */
str \rc, [\rb, #LCR_H] /* -> UARTLCR_H (Line control) */
@@ -19,10 +19,10 @@
#include <asm/scif-uart.h>
-#ifdef EARLY_PRINTK_VERSION_NONE
+#ifdef CONFIG_EARLY_UART_SCIF_VERSION_NONE
#define STATUS_REG SCIF_SCFSR
#define TX_FIFO_REG SCIF_SCFTDR
-#elif EARLY_PRINTK_VERSION_A
+#elif CONFIG_EARLY_UART_SCIF_VERSION_A
#define STATUS_REG SCIFA_SCASSR
#define TX_FIFO_REG SCIFA_SCAFTDR
#endif
@@ -19,8 +19,8 @@
#include <asm/early_printk.h>
-#ifdef EARLY_PRINTK_INC
-#include EARLY_PRINTK_INC
+#if defined (CONFIG_EARLY_PRINTK_INC)
+#include CONFIG_EARLY_PRINTK_INC
#endif
/*
@@ -36,8 +36,8 @@
#define XEN_FIRST_SLOT first_table_offset(XEN_VIRT_START)
#define XEN_SECOND_SLOT second_table_offset(XEN_VIRT_START)
-#if (defined (CONFIG_EARLY_PRINTK)) && (defined (EARLY_PRINTK_INC))
-#include EARLY_PRINTK_INC
+#if defined(CONFIG_EARLY_PRINTK) && defined(CONFIG_EARLY_PRINTK_INC)
+#include CONFIG_EARLY_PRINTK_INC
#endif
/*
@@ -223,7 +223,7 @@ GLOBAL(init_secondary)
1:
#ifdef CONFIG_EARLY_PRINTK
- mov_w r11, EARLY_UART_BASE_ADDRESS /* r11 := UART base address */
+ mov_w r11, CONFIG_EARLY_UART_BASE_ADDRESS /* r11 := UART base address */
PRINT("- CPU ")
print_reg r7
PRINT(" booting -\r\n")
@@ -706,8 +706,8 @@ ENTRY(switch_ttbr)
* Clobbers r0 - r3
*/
init_uart:
- mov_w r11, EARLY_UART_BASE_ADDRESS
-#ifdef EARLY_PRINTK_INIT_UART
+ mov_w r11, CONFIG_EARLY_UART_BASE_ADDRESS
+#ifdef CONFIG_EARLY_UART_INIT
early_uart_init r11, r1, r2
#endif
PRINT("- UART enabled -\r\n")
@@ -25,7 +25,7 @@
*/
.macro early_uart_ready xb c
1:
- ldrb w\c, [\xb, #UART_LSR << EARLY_UART_REG_SHIFT]
+ ldrb w\c, [\xb, #UART_LSR << CONFIG_EARLY_UART_8250_REG_SHIFT]
and w\c, w\c, #UART_LSR_THRE
cmp w\c, #UART_LSR_THRE
b.ne 1b
@@ -38,7 +38,7 @@
*/
.macro early_uart_transmit xb wt
/* UART_THR transmit holding */
- strb \wt, [\xb, #UART_THR << EARLY_UART_REG_SHIFT]
+ strb \wt, [\xb, #UART_THR << CONFIG_EARLY_UART_8250_REG_SHIFT]
.endm
/*
@@ -24,9 +24,9 @@
* c: scratch register number
*/
.macro early_uart_init xb, c
- mov x\c, #(7372800 / EARLY_PRINTK_BAUD % 16)
+ mov x\c, #(7372800 / CONFIG_EARLY_UART_PL011_BAUD_RATE % 16)
strh w\c, [\xb, #0x28] /* -> UARTFBRD (Baud divisor fraction) */
- mov x\c, #(7372800 / EARLY_PRINTK_BAUD / 16)
+ mov x\c, #(7372800 / CONFIG_EARLY_UART_PL011_BAUD_RATE / 16)
strh w\c, [\xb, #0x24] /* -> UARTIBRD (Baud divisor integer) */
mov x\c, #0x60 /* 8n1 */
str w\c, [\xb, #0x2C] /* -> UARTLCR_H (Line control) */
@@ -19,8 +19,8 @@
#include <asm/early_printk.h>
-#ifdef EARLY_PRINTK_INC
-#include EARLY_PRINTK_INC
+#ifdef CONFIG_EARLY_PRINTK_INC
+#include CONFIG_EARLY_PRINTK_INC
#endif
/*
@@ -45,8 +45,8 @@
#define __HEAD_FLAGS ((__HEAD_FLAG_PAGE_SIZE << 1) | \
(__HEAD_FLAG_PHYS_BASE << 3))
-#if (defined (CONFIG_EARLY_PRINTK)) && (defined (EARLY_PRINTK_INC))
-#include EARLY_PRINTK_INC
+#if defined(CONFIG_EARLY_PRINTK) && defined(CONFIG_EARLY_PRINTK_INC)
+#include CONFIG_EARLY_PRINTK_INC
#endif
/*
@@ -363,7 +363,7 @@ GLOBAL(init_secondary)
1:
#ifdef CONFIG_EARLY_PRINTK
- ldr x23, =EARLY_UART_BASE_ADDRESS /* x23 := UART base address */
+ ldr x23, =CONFIG_EARLY_UART_BASE_ADDRESS /* x23 := UART base address */
PRINT("- CPU ")
print_reg x24
PRINT(" booting -\r\n")
@@ -843,8 +843,8 @@ ENTRY(switch_ttbr)
* Clobbers x0 - x1
*/
init_uart:
- ldr x23, =EARLY_UART_BASE_ADDRESS
-#ifdef EARLY_PRINTK_INIT_UART
+ ldr x23, =CONFIG_EARLY_UART_BASE_ADDRESS
+#ifdef CONFIG_EARLY_UART_INIT
early_uart_init x23, 0
#endif
PRINT("- UART enabled -\r\n")
@@ -15,7 +15,7 @@
/* need to add the uart address offset in page to the fixmap address */
#define EARLY_UART_VIRTUAL_ADDRESS \
- (FIXMAP_ADDR(FIXMAP_CONSOLE) +(EARLY_UART_BASE_ADDRESS & ~PAGE_MASK))
+ (FIXMAP_ADDR(FIXMAP_CONSOLE) + (CONFIG_EARLY_UART_BASE_ADDRESS & ~PAGE_MASK))
#endif /* !CONFIG_EARLY_PRINTK */