Compressed kernel support for Netlogic XLP
cover Compressed kernel support for Netlogic XLP
Two patches to add support for compressed kernel on Netlogic XLP. The first patch has a fix (use of volatile for register access) and a change to support 32-bit register access.
The second patch is to add support for Netlogic XLR/XLS and XLP.
Jayachandran C (2):
MIPS: boot: Fixes for compressed/uart-16550.c
MIPS: Netlogic: Support compressed kernel
arch/mips/Kconfig | 4 ++++ arch/mips/boot/compressed/uart-16550.c | 22 +++++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/2 MIPS: boot: Fixes for compressed/uart-16550.c
Fix uart-16550.c for adding XLR/XLP support, changes are:
* Make register read/write use volatile pointers
* Support 32 bit IO read/write
* Increase timeout in waiting for UART LSR
--- arch/mips/boot/compressed/uart-16550.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
arch/mips/boot/compressed/uart-16550.c +7 -3
@@ -23,23 +23,27 @@#define PORT (offset) (UART0_BASE + (4 * offset))#endif +#ifndef IOTYPE +#define IOTYPE char +#endif +#ifndef PORT #error please define the serial port address for your own machine#endif static inline unsigned int serial_in (int offset) { -return *((char *)PORT (offset)); +return *((volatile IOTYPE *)PORT (offset)) &0xFF ; }static inline void serial_out (int offset,int value) { - *((char *)PORT (offset)) = value; + *((volatile IOTYPE *)PORT (offset)) = value &0xFF ; }void putc (char c) { -int timeout =1024 ; +int timeout =1000000 ;while (((serial_in (UART_LSR ) &UART_LSR_THRE ) ==0 ) && (timeout-- >0 )) ;
Signature · 1 line
1.7.9.5
PATCH 2/2 MIPS: Netlogic: Support compressed kernel
In reply to Jayachandran CAdd SYS_SUPPORTS_ZBOOT and SYS_SUPPORTS_ZBOOT_UART16550 config options for XLR and XLP.
Update boot/compressed/uart-16550.c to add UART port for XLR and XLP.
--- arch/mips/Kconfig | 4 ++++ arch/mips/boot/compressed/uart-16550.c | 12 ++++++++++++ 2 files changed, 16 insertions(+)
arch/mips/Kconfig +4 -0
@@ -806,6 +806,8 @@ config NLM_XLR_BOARD select SYS_HAS_EARLY_PRINTK select USB_ARCH_HAS_OHCI if USB_SUPPORT select USB_ARCH_HAS_EHCI if USB_SUPPORT + select SYS_SUPPORTS_ZBOOT + select SYS_SUPPORTS_ZBOOT_UART16550 help Support for systems based on Netlogic XLR and XLS processors. Say Y here if you have a XLR or XLS based board.
@@ -832,6 +834,8 @@ config NLM_XLP_BOARD select SYNC_R4K select SYS_HAS_EARLY_PRINTK select USE_OF + select SYS_SUPPORTS_ZBOOT + select SYS_SUPPORTS_ZBOOT_UART16550 help This board is based on Netlogic XLP Processor. Say Y here if you have a XLP based board.
arch/mips/boot/compressed/uart-16550.c +12 -0
@@ -23,6 +23,18 @@#define PORT (offset) (UART0_BASE + (4 * offset))#endif +#ifdef CONFIG_CPU_XLR +#define UART0_BASE 0x1EF14000 +#define PORT (offset) (CKSEG1ADDR(UART0_BASE) + (4 * offset)) +#define IOTYPE unsigned int +#endif + +#ifdef CONFIG_CPU_XLP +#define UART0_BASE 0x18030100 +#define PORT (offset) (CKSEG1ADDR(UART0_BASE) + (4 * offset)) +#define IOTYPE unsigned int +#endif +#ifndef IOTYPE #define IOTYPE char#endif
Signature · 1 line
1.7.9.5