Changes in / [13be2583:dd0c8a0] in mainline


Ignore:
Files:
9 added
2 deleted
16 edited

Legend:

Unmodified
Added
Removed
  • HelenOS.config

    r13be2583 rdd0c8a0  
    6666@ "beagleboardxm" BeagleBoard-xM
    6767@ "beaglebone" BeagleBone
     68@ "raspberrypi" Raspberry Pi
    6869! [PLATFORM=arm32] MACHINE (choice)
    6970
     
    99100! [PLATFORM=arm32&MACHINE=integratorcp] PROCESSOR (choice)
    100101
     102% CPU type
     103@ "arm1176" ARM1176
     104! [PLATFORM=arm32&MACHINE=raspberrypi] PROCESSOR (choice)
    101105
    102106# Add more ARMv4 CPUs
     
    109113@ "armv5" ARMv5
    110114! [PLATFORM=arm32&(PROCESSOR=arm926ej_s)] PROCESSOR_ARCH (choice)
     115
     116# Add more ARMv6 CPUs
     117% CPU arch
     118@ "armv6" ARMv6
     119! [PLATFORM=arm32&(PROCESSOR=arm1176)] PROCESSOR_ARCH (choice)
    111120
    112121# Add more ARMv7-A CPUs
     
    442451% Output device class
    443452@ "generic" Monitor or serial line
    444 ! [PLATFORM=arm32&(MACHINE=gta02|MACHINE=integratorcp|MACHINE=beagleboardxm|MACHINE=beaglebone)] CONFIG_HID_OUT (choice)
     453! [PLATFORM=arm32&(MACHINE=gta02|MACHINE=integratorcp|MACHINE=beagleboardxm|MACHINE=beaglebone|MACHINE=raspberrypi)] CONFIG_HID_OUT (choice)
    445454
    446455% Output device class
     
    473482! [(CONFIG_HID_IN=generic|CONFIG_HID_IN=serial)&PLATFORM=ia64&MACHINE=i460GX] CONFIG_NS16550 (y/n)
    474483
    475 % Support for ARM926 on-chip UART
    476 ! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&PLATFORM=arm32&MACHINE=integratorcp] CONFIG_ARM926_UART (y/n)
     484% Support for PL011 UART
     485! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&PLATFORM=arm32&(MACHINE=integratorcp|MACHINE=raspberrypi)] CONFIG_PL011_UART (y/n)
    477486
    478487% Support for Samsung S3C24XX on-chip UART
     
    488497! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&PLATFORM=arm32&(MACHINE=beagleboardxm|MACHINE=beaglebone)] CONFIG_OMAP_UART (y/n)
    489498
     499% Support for BCM2835 mailbox
     500! [PLATFORM=arm32&MACHINE=raspberrypi] CONFIG_BCM2835_MAILBOX (y/n)
     501
    490502% Support for i8042 controller
    491503! [CONFIG_PC_KBD=y] CONFIG_I8042 (y)
     
    507519
    508520% Serial line input module
    509 ! [CONFIG_DSRLNIN=y|(PLATFORM=arm32&MACHINE=gta02)|(PLATFORM=arm32&MACHINE=integratorcp&CONFIG_ARM926_UART=y)|(PLATFORM=arm32&MACHINE=beaglebone&CONFIG_OMAP_UART=y)|(PLATFORM=arm32&MACHINE=beagleboardxm&CONFIG_OMAP_UART=y)|(PLATFORM=ia64&MACHINE=i460GX&CONFIG_NS16550=y)|(PLATFORM=ia64&MACHINE=ski)|(PLATFORM=sparc64&PROCESSOR=sun4v)] CONFIG_SRLN (y)
     521! [CONFIG_DSRLNIN=y|(PLATFORM=arm32&MACHINE=gta02)|(PLATFORM=arm32&MACHINE=integratorcp&CONFIG_PL011_UART=y)|(PLATFORM=arm32&MACHINE=beaglebone&CONFIG_OMAP_UART=y)|(PLATFORM=arm32&MACHINE=beagleboardxm&CONFIG_OMAP_UART=y)|(PLATFORM=ia64&MACHINE=i460GX&CONFIG_NS16550=y)|(PLATFORM=ia64&MACHINE=ski)|(PLATFORM=sparc64&PROCESSOR=sun4v)|(PLATFORM=arm32&MACHINE=raspberrypi&CONFIG_PL011_UART=y)] CONFIG_SRLN (y)
    510522
    511523% EGA support
  • boot/arch/arm32/Makefile.inc

    r13be2583 rdd0c8a0  
    4343endif
    4444
     45ifeq ($(MACHINE), raspberrypi)
     46        BOOT_OUTPUT = image.boot
     47        POST_OUTPUT = $(ROOT_PATH)/uImage.bin   
     48        LADDR = 0x00008000
     49        SADDR = 0x00008000
     50        POSTBUILD = Makefile.uboot           
     51endif
     52
    4553BFD_NAME = elf32-littlearm
    4654BFD_OUTPUT = $(BFD_NAME)
  • boot/arch/arm32/include/arch.h

    r13be2583 rdd0c8a0  
    4646#elif defined MACHINE_beaglebone
    4747#define BOOT_BASE       0x80000000
     48#elif defined MACHINE_raspberrypi
     49#define BOOT_BASE       0x00008000
    4850#else
    4951#define BOOT_BASE       0x00000000
  • boot/arch/arm32/include/main.h

    r13be2583 rdd0c8a0  
    7575#define ICP_SCONS_ADDR          0x16000000
    7676
     77/** Raspberry PI serial console registers */
     78#define BCM2835_UART0_BASE      0x20201000
     79#define BCM2835_UART0_DR        (BCM2835_UART0_BASE + 0x00)
     80#define BCM2835_UART0_FR        (BCM2835_UART0_BASE + 0x18)
     81#define BCM2835_UART0_ILPR      (BCM2835_UART0_BASE + 0x20)
     82#define BCM2835_UART0_IBRD      (BCM2835_UART0_BASE + 0x24)
     83#define BCM2835_UART0_FBRD      (BCM2835_UART0_BASE + 0x28)
     84#define BCM2835_UART0_LCRH      (BCM2835_UART0_BASE + 0x2C)
     85#define BCM2835_UART0_CR        (BCM2835_UART0_BASE + 0x30)
     86#define BCM2835_UART0_ICR       (BCM2835_UART0_BASE + 0x44)
     87
     88#define BCM2835_UART0_FR_TXFF   (1 << 5)
     89#define BCM2835_UART0_LCRH_FEN  (1 << 4)
     90#define BCM2835_UART0_LCRH_WL8  ((1 << 5) | (1 << 6))
     91#define BCM2835_UART0_CR_UARTEN (1 << 0)
     92#define BCM2835_UART0_CR_TXE    (1 << 8)
     93#define BCM2835_UART0_CR_RXE    (1 << 9)
     94
     95
     96
    7797extern void bootstrap(void);
    7898
  • boot/arch/arm32/include/mm.h

    r13be2583 rdd0c8a0  
    6868#define AM335x_RAM_END     0xC0000000
    6969
     70/** Start of ram memory on BCM2835 */
     71#define BCM2835_RAM_START   0
     72/** End of ram memory on BCM2835 */
     73#define BCM2835_RAM_END     0x20000000
    7074
    7175/* Page table level 0 entry - "section" format is used
  • boot/arch/arm32/src/mm.c

    r13be2583 rdd0c8a0  
    116116        if (address >= AM335x_RAM_START && address < AM335x_RAM_END)
    117117                return 1;
     118#elif defined MACHINE_raspberrypi
     119        if (address < BCM2835_RAM_END)
     120                return 1;
    118121#endif
    119122        return address * 0;
  • boot/arch/arm32/src/putchar.c

    r13be2583 rdd0c8a0  
    122122#endif
    123123
     124#ifdef MACHINE_raspberrypi
     125
     126static int raspi_init;
     127
     128static inline void write32(uint32_t addr, uint32_t data)
     129{
     130        *(volatile uint32_t *)(addr) = data;
     131}
     132
     133static inline uint32_t read32(uint32_t addr)
     134{
     135        return *(volatile uint32_t *)(addr);
     136}
     137
     138static void scons_init_raspi(void)
     139{
     140        write32(BCM2835_UART0_CR, 0x0);         /* Disable UART */
     141        write32(BCM2835_UART0_ICR, 0x7f);       /* Clear interrupts */
     142        write32(BCM2835_UART0_IBRD, 1);         /* Set integer baud rate */
     143        write32(BCM2835_UART0_FBRD, 40);        /* Set fractional baud rate */
     144        write32(BCM2835_UART0_LCRH,
     145                BCM2835_UART0_LCRH_FEN |        /* Enable FIFOs */
     146                BCM2835_UART0_LCRH_WL8);        /* Word length: 8 */
     147        write32(BCM2835_UART0_CR,
     148                BCM2835_UART0_CR_UARTEN |       /* Enable UART */
     149                BCM2835_UART0_CR_TXE |          /* Enable TX */
     150                BCM2835_UART0_CR_RXE);          /* Enable RX */
     151}
     152
     153static void scons_sendb_raspi(uint8_t byte)
     154{
     155        if (!raspi_init) {
     156                scons_init_raspi();
     157                raspi_init = 1;
     158        }
     159
     160        while (read32(BCM2835_UART0_FR) & BCM2835_UART0_FR_TXFF);
     161
     162        write32(BCM2835_UART0_DR, byte);
     163}
     164#endif
     165
    124166/** Send a byte to the serial console.
    125167 *
     
    139181#ifdef MACHINE_integratorcp
    140182        scons_sendb_icp(byte);
     183#endif
     184#ifdef MACHINE_raspberrypi
     185        scons_sendb_raspi(byte);
    141186#endif
    142187}
  • kernel/arch/arm32/Makefile.inc

    r13be2583 rdd0c8a0  
    8989endif
    9090
     91ifeq ($(MACHINE),raspberrypi)
     92        ARCH_SOURCES += arch/$(KARCH)/src/mach/raspberrypi/raspberrypi.c
     93endif
     94
    9195ifeq ($(CONFIG_PL050),y)
    9296        ARCH_SOURCES += genarch/src/drivers/pl050/pl050.c
  • kernel/arch/arm32/_link.ld.in

    r13be2583 rdd0c8a0  
    1313#elif defined MACHINE_beaglebone
    1414#define KERNEL_LOAD_ADDRESS 0x80a00000
     15#elif defined MACHINE_raspberrypi
     16#define KERNEL_LOAD_ADDRESS 0x80a08000
    1517#else
    1618#define KERNEL_LOAD_ADDRESS 0x80a00000
  • kernel/arch/arm32/include/arch/cp15.h

    r13be2583 rdd0c8a0  
    231231        SCTLR_FAST_IRQ_EN_FLAG       = 1 << 21, /* Disable impl. specific feat*/
    232232        SCTLR_UNALIGNED_EN_FLAG      = 1 << 22, /* Must be 1 on armv7 */
     233        SCTLR_EXTENDED_PT_EN_FLAG    = 1 << 23,
    233234        SCTLR_IRQ_VECTORS_EN_FLAG    = 1 << 24,
    234235        SCTLR_BIG_ENDIAN_EXC_FLAG    = 1 << 25,
  • kernel/arch/arm32/include/arch/mach/integratorcp/integratorcp.h

    r13be2583 rdd0c8a0  
    4646#define ICP_IRQC_MAX_IRQ  8
    4747#define ICP_KBD_IRQ       3
    48 #define ICP_TIMER_IRQ    6
     48#define ICP_TIMER_IRQ     6
     49#define ICP_UART0_IRQ     1
    4950
    5051/** Timer frequency */
  • kernel/arch/arm32/include/arch/mm/frame.h

    r13be2583 rdd0c8a0  
    6363#define BOOT_PAGE_TABLE_ADDRESS  0x80008000
    6464
     65#elif defined MACHINE_raspberrypi
     66
     67#define PHYSMEM_START_ADDR       0x00000000
     68#define BOOT_PAGE_TABLE_ADDRESS  0x00010000
     69
    6570#else
    6671
  • kernel/arch/arm32/src/mach/integratorcp/integratorcp.c

    r13be2583 rdd0c8a0  
    3737#include <ipc/irq.h>
    3838#include <console/chardev.h>
     39#include <genarch/drivers/pl011/pl011.h>
    3940#include <genarch/drivers/pl050/pl050.h>
    40 #include <genarch/drivers/arm926_uart/arm926_uart.h>
    4141#include <genarch/kbrd/kbrd.h>
    4242#include <genarch/srln/srln.h>
     
    6161        icp_hw_map_t hw_map;
    6262        irq_t timer_irq;
    63         arm926_uart_t uart;
     63        pl011_uart_t uart;
    6464} icp;
    6565
     
    314314                stdout_wire(fbdev);
    315315#endif
    316 #ifdef CONFIG_ARM926_UART
    317         if (arm926_uart_init(&icp.uart, ARM926_UART0_IRQ,
    318             ARM926_UART0_BASE_ADDRESS, sizeof(arm926_uart_regs_t)))
     316#ifdef CONFIG_PL011_UART
     317        if (pl011_uart_init(&icp.uart, ICP_UART0_IRQ, ICP_UART))
    319318                stdout_wire(&icp.uart.outdev);
    320319#endif
     
    350349            ICP_KBD);
    351350
    352 #ifdef CONFIG_ARM926_UART
     351#ifdef CONFIG_PL011_UART
    353352        srln_instance_t *srln_instance = srln_init();
    354353        if (srln_instance) {
    355354                indev_t *sink = stdin_wire();
    356355                indev_t *srln = srln_wire(srln_instance, sink);
    357                 arm926_uart_input_wire(&icp.uart, srln);
    358                 icp_irqc_unmask(ARM926_UART0_IRQ);
     356                pl011_uart_input_wire(&icp.uart, srln);
     357                icp_irqc_unmask(ICP_UART0_IRQ);
    359358        }
    360359#endif
  • kernel/arch/arm32/src/machine_func.c

    r13be2583 rdd0c8a0  
    4343#include <arch/mach/beagleboardxm/beagleboardxm.h>
    4444#include <arch/mach/beaglebone/beaglebone.h>
     45#include <arch/mach/raspberrypi/raspberrypi.h>
    4546
    4647/** Pointer to machine_ops structure being used. */
     
    5859#elif defined(MACHINE_beaglebone)
    5960        machine_ops = &bbone_machine_ops;
     61#elif defined(MACHINE_raspberrypi)
     62        machine_ops = &raspberrypi_machine_ops;
    6063#else
    6164#error Machine type not defined.
  • kernel/arch/arm32/src/mm/page.c

    r13be2583 rdd0c8a0  
    5555        page_mapping_operations = &pt_mapping_operations;
    5656
     57#ifdef PROCESSOR_ARCH_armv6
     58        /* Select ARMv6 and ARMv7 memory model */
     59        SCTLR_write(SCTLR_read() | SCTLR_EXTENDED_PT_EN_FLAG);
     60#endif
    5761        page_table_lock(AS_KERNEL, true);
    5862       
  • kernel/genarch/Makefile.inc

    r13be2583 rdd0c8a0  
    9090endif
    9191
    92 ifeq ($(CONFIG_ARM926_UART),y)
     92ifeq ($(CONFIG_PL011_UART),y)
    9393        GENARCH_SOURCES += \
    94                 genarch/src/drivers/arm926_uart/arm926_uart.c
     94                genarch/src/drivers/pl011/pl011.c
    9595endif
    9696
     
    113113        GENARCH_SOURCES += \
    114114                genarch/src/drivers/am335x/timer.c
     115endif
     116
     117ifeq ($(CONFIG_BCM2835_MAILBOX),y)
     118        GENARCH_SOURCES += \
     119                genarch/src/drivers/bcm2835/mbox.c
    115120endif
    116121
Note: See TracChangeset for help on using the changeset viewer.