Changeset 34547


Ignore:
Timestamp:
2012-12-06T23:39:33+01:00 (5 years ago)
Author:
florian
Message:

[adm8668] implement early_printk without an early_console

Signed-off-by: Florian Fainelli <florian@…>

Location:
trunk/target/linux/adm8668
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/adm8668/config-3.3

    r34403 r34547  
    66CONFIG_CEVT_R4K=y 
    77CONFIG_CEVT_R4K_LIB=y 
     8CONFIG_CMDLINE="console=ttyS0 earlyprintk" 
     9CONFIG_CMDLINE_BOOL=y 
     10CONFIG_CMDLINE_OVERRIDE=y 
    811CONFIG_CPU_HAS_PREFETCH=y 
    912CONFIG_CPU_HAS_SYNC=y 
     
    1821CONFIG_DECOMPRESS_LZMA=y 
    1922CONFIG_DMA_NONCOHERENT=y 
     23CONFIG_EARLY_PRINTK=y 
    2024CONFIG_EEPROM_93CX6=m 
    2125CONFIG_GENERIC_ATOMIC64=y 
     
    7074CONFIG_SWAP_IO_SPACE=y 
    7175CONFIG_SYS_HAS_CPU_MIPS32_R1=y 
     76CONFIG_SYS_HAS_EARLY_PRINTK=y 
    7277CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 
    7378CONFIG_SYS_SUPPORTS_ARBIT_HZ=y 
  • trunk/target/linux/adm8668/files/arch/mips/adm8668/Makefile

    r34544 r34547  
    44 
    55obj-y           := irq.o pci.o prom.o platform.o serial.o proc.o \ 
    6                    setup.o time.o \ 
     6                   setup.o time.o early_printk.o \ 
    77                   net_core.o net_intr.o 
  • trunk/target/linux/adm8668/files/arch/mips/adm8668/prom.c

    r25175 r34547  
    2525 
    2626register volatile struct global_data *gd asm ("k0"); 
    27  
    28 #ifdef CONFIG_SERIAL_ADM8668_CONSOLE 
    29 static inline unsigned int adm_uart_readl(unsigned int offset) 
    30 { 
    31         return (*(volatile unsigned int *)(0xbe400000 + offset)); 
    32 } 
    33  
    34 static inline void adm_uart_writel(unsigned int value, unsigned int offset) 
    35 { 
    36         (*((volatile unsigned int *)(0xbe400000 + offset))) = value; 
    37 } 
    38  
    39 static void prom_putchar(char c) 
    40 { 
    41         adm_uart_writel(c, UART_DR_REG); 
    42         while ((adm_uart_readl(UART_FR_REG) & UART_TX_FIFO_FULL) != 0) 
    43                 ; 
    44 } 
    45  
    46 static void __init 
    47 early_console_write(struct console *con, const char *s, unsigned n) 
    48 { 
    49         while (n-- && *s) { 
    50                 if (*s == '\n') 
    51                         prom_putchar('\r'); 
    52                 prom_putchar(*s); 
    53                 s++; 
    54         } 
    55 } 
    56  
    57 static struct console early_console __initdata = { 
    58         .name   = "early", 
    59         .write  = early_console_write, 
    60         .flags  = CON_BOOT, 
    61         .index  = -1 
    62 }; 
    63  
    64 #endif 
    6527 
    6628void __init prom_free_prom_memory(void) 
     
    12385        int memsize; 
    12486 
    125 #ifdef CONFIG_SERIAL_ADM8668_CONSOLE 
    126         register_console(&early_console); 
    127 #endif 
    128  
    12987        memsize = bd->bi_memsize; 
    13088        printk("Board info:\n"); 
  • trunk/target/linux/adm8668/patches-3.3/001-adm8668_arch.patch

    r31480 r34547  
    1111--- a/arch/mips/Kconfig 
    1212+++ b/arch/mips/Kconfig 
    13 @@ -105,6 +105,26 @@ config BCM47XX 
     13@@ -105,6 +105,27 @@ config BCM47XX 
    1414        help 
    1515         Support for BCM47XX based boards 
     
    3131+       select SERIAL_ADM8668 
    3232+       select SERIAL_ADM8668_CONSOLE 
     33+       select SYS_HAS_EARLY_PRINTK 
    3334+       help 
    3435+               ADM8668 board support by neutronscott 
Note: See TracChangeset for help on using the changeset viewer.