Changes in / [13be2583:dd0c8a0] in mainline
- Files:
-
- 9 added
- 2 deleted
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
r13be2583 rdd0c8a0 66 66 @ "beagleboardxm" BeagleBoard-xM 67 67 @ "beaglebone" BeagleBone 68 @ "raspberrypi" Raspberry Pi 68 69 ! [PLATFORM=arm32] MACHINE (choice) 69 70 … … 99 100 ! [PLATFORM=arm32&MACHINE=integratorcp] PROCESSOR (choice) 100 101 102 % CPU type 103 @ "arm1176" ARM1176 104 ! [PLATFORM=arm32&MACHINE=raspberrypi] PROCESSOR (choice) 101 105 102 106 # Add more ARMv4 CPUs … … 109 113 @ "armv5" ARMv5 110 114 ! [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) 111 120 112 121 # Add more ARMv7-A CPUs … … 442 451 % Output device class 443 452 @ "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) 445 454 446 455 % Output device class … … 473 482 ! [(CONFIG_HID_IN=generic|CONFIG_HID_IN=serial)&PLATFORM=ia64&MACHINE=i460GX] CONFIG_NS16550 (y/n) 474 483 475 % Support for ARM926 on-chipUART476 ! [(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) 477 486 478 487 % Support for Samsung S3C24XX on-chip UART … … 488 497 ! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&PLATFORM=arm32&(MACHINE=beagleboardxm|MACHINE=beaglebone)] CONFIG_OMAP_UART (y/n) 489 498 499 % Support for BCM2835 mailbox 500 ! [PLATFORM=arm32&MACHINE=raspberrypi] CONFIG_BCM2835_MAILBOX (y/n) 501 490 502 % Support for i8042 controller 491 503 ! [CONFIG_PC_KBD=y] CONFIG_I8042 (y) … … 507 519 508 520 % 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) 510 522 511 523 % EGA support -
boot/arch/arm32/Makefile.inc
r13be2583 rdd0c8a0 43 43 endif 44 44 45 ifeq ($(MACHINE), raspberrypi) 46 BOOT_OUTPUT = image.boot 47 POST_OUTPUT = $(ROOT_PATH)/uImage.bin 48 LADDR = 0x00008000 49 SADDR = 0x00008000 50 POSTBUILD = Makefile.uboot 51 endif 52 45 53 BFD_NAME = elf32-littlearm 46 54 BFD_OUTPUT = $(BFD_NAME) -
boot/arch/arm32/include/arch.h
r13be2583 rdd0c8a0 46 46 #elif defined MACHINE_beaglebone 47 47 #define BOOT_BASE 0x80000000 48 #elif defined MACHINE_raspberrypi 49 #define BOOT_BASE 0x00008000 48 50 #else 49 51 #define BOOT_BASE 0x00000000 -
boot/arch/arm32/include/main.h
r13be2583 rdd0c8a0 75 75 #define ICP_SCONS_ADDR 0x16000000 76 76 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 77 97 extern void bootstrap(void); 78 98 -
boot/arch/arm32/include/mm.h
r13be2583 rdd0c8a0 68 68 #define AM335x_RAM_END 0xC0000000 69 69 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 70 74 71 75 /* Page table level 0 entry - "section" format is used -
boot/arch/arm32/src/mm.c
r13be2583 rdd0c8a0 116 116 if (address >= AM335x_RAM_START && address < AM335x_RAM_END) 117 117 return 1; 118 #elif defined MACHINE_raspberrypi 119 if (address < BCM2835_RAM_END) 120 return 1; 118 121 #endif 119 122 return address * 0; -
boot/arch/arm32/src/putchar.c
r13be2583 rdd0c8a0 122 122 #endif 123 123 124 #ifdef MACHINE_raspberrypi 125 126 static int raspi_init; 127 128 static inline void write32(uint32_t addr, uint32_t data) 129 { 130 *(volatile uint32_t *)(addr) = data; 131 } 132 133 static inline uint32_t read32(uint32_t addr) 134 { 135 return *(volatile uint32_t *)(addr); 136 } 137 138 static 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 153 static 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 124 166 /** Send a byte to the serial console. 125 167 * … … 139 181 #ifdef MACHINE_integratorcp 140 182 scons_sendb_icp(byte); 183 #endif 184 #ifdef MACHINE_raspberrypi 185 scons_sendb_raspi(byte); 141 186 #endif 142 187 } -
kernel/arch/arm32/Makefile.inc
r13be2583 rdd0c8a0 89 89 endif 90 90 91 ifeq ($(MACHINE),raspberrypi) 92 ARCH_SOURCES += arch/$(KARCH)/src/mach/raspberrypi/raspberrypi.c 93 endif 94 91 95 ifeq ($(CONFIG_PL050),y) 92 96 ARCH_SOURCES += genarch/src/drivers/pl050/pl050.c -
kernel/arch/arm32/_link.ld.in
r13be2583 rdd0c8a0 13 13 #elif defined MACHINE_beaglebone 14 14 #define KERNEL_LOAD_ADDRESS 0x80a00000 15 #elif defined MACHINE_raspberrypi 16 #define KERNEL_LOAD_ADDRESS 0x80a08000 15 17 #else 16 18 #define KERNEL_LOAD_ADDRESS 0x80a00000 -
kernel/arch/arm32/include/arch/cp15.h
r13be2583 rdd0c8a0 231 231 SCTLR_FAST_IRQ_EN_FLAG = 1 << 21, /* Disable impl. specific feat*/ 232 232 SCTLR_UNALIGNED_EN_FLAG = 1 << 22, /* Must be 1 on armv7 */ 233 SCTLR_EXTENDED_PT_EN_FLAG = 1 << 23, 233 234 SCTLR_IRQ_VECTORS_EN_FLAG = 1 << 24, 234 235 SCTLR_BIG_ENDIAN_EXC_FLAG = 1 << 25, -
kernel/arch/arm32/include/arch/mach/integratorcp/integratorcp.h
r13be2583 rdd0c8a0 46 46 #define ICP_IRQC_MAX_IRQ 8 47 47 #define ICP_KBD_IRQ 3 48 #define ICP_TIMER_IRQ 6 48 #define ICP_TIMER_IRQ 6 49 #define ICP_UART0_IRQ 1 49 50 50 51 /** Timer frequency */ -
kernel/arch/arm32/include/arch/mm/frame.h
r13be2583 rdd0c8a0 63 63 #define BOOT_PAGE_TABLE_ADDRESS 0x80008000 64 64 65 #elif defined MACHINE_raspberrypi 66 67 #define PHYSMEM_START_ADDR 0x00000000 68 #define BOOT_PAGE_TABLE_ADDRESS 0x00010000 69 65 70 #else 66 71 -
kernel/arch/arm32/src/mach/integratorcp/integratorcp.c
r13be2583 rdd0c8a0 37 37 #include <ipc/irq.h> 38 38 #include <console/chardev.h> 39 #include <genarch/drivers/pl011/pl011.h> 39 40 #include <genarch/drivers/pl050/pl050.h> 40 #include <genarch/drivers/arm926_uart/arm926_uart.h>41 41 #include <genarch/kbrd/kbrd.h> 42 42 #include <genarch/srln/srln.h> … … 61 61 icp_hw_map_t hw_map; 62 62 irq_t timer_irq; 63 arm926_uart_t uart;63 pl011_uart_t uart; 64 64 } icp; 65 65 … … 314 314 stdout_wire(fbdev); 315 315 #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)) 319 318 stdout_wire(&icp.uart.outdev); 320 319 #endif … … 350 349 ICP_KBD); 351 350 352 #ifdef CONFIG_ ARM926_UART351 #ifdef CONFIG_PL011_UART 353 352 srln_instance_t *srln_instance = srln_init(); 354 353 if (srln_instance) { 355 354 indev_t *sink = stdin_wire(); 356 355 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); 359 358 } 360 359 #endif -
kernel/arch/arm32/src/machine_func.c
r13be2583 rdd0c8a0 43 43 #include <arch/mach/beagleboardxm/beagleboardxm.h> 44 44 #include <arch/mach/beaglebone/beaglebone.h> 45 #include <arch/mach/raspberrypi/raspberrypi.h> 45 46 46 47 /** Pointer to machine_ops structure being used. */ … … 58 59 #elif defined(MACHINE_beaglebone) 59 60 machine_ops = &bbone_machine_ops; 61 #elif defined(MACHINE_raspberrypi) 62 machine_ops = &raspberrypi_machine_ops; 60 63 #else 61 64 #error Machine type not defined. -
kernel/arch/arm32/src/mm/page.c
r13be2583 rdd0c8a0 55 55 page_mapping_operations = &pt_mapping_operations; 56 56 57 #ifdef PROCESSOR_ARCH_armv6 58 /* Select ARMv6 and ARMv7 memory model */ 59 SCTLR_write(SCTLR_read() | SCTLR_EXTENDED_PT_EN_FLAG); 60 #endif 57 61 page_table_lock(AS_KERNEL, true); 58 62 -
kernel/genarch/Makefile.inc
r13be2583 rdd0c8a0 90 90 endif 91 91 92 ifeq ($(CONFIG_ ARM926_UART),y)92 ifeq ($(CONFIG_PL011_UART),y) 93 93 GENARCH_SOURCES += \ 94 genarch/src/drivers/ arm926_uart/arm926_uart.c94 genarch/src/drivers/pl011/pl011.c 95 95 endif 96 96 … … 113 113 GENARCH_SOURCES += \ 114 114 genarch/src/drivers/am335x/timer.c 115 endif 116 117 ifeq ($(CONFIG_BCM2835_MAILBOX),y) 118 GENARCH_SOURCES += \ 119 genarch/src/drivers/bcm2835/mbox.c 115 120 endif 116 121
Note:
See TracChangeset
for help on using the changeset viewer.