Changeset 0fb70e1 in mainline
- Timestamp:
- 2012-10-09T21:31:38Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 954b6458
- Parents:
- a829a5b
- Files:
-
- 4 added
- 4 edited
- 6 moved
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
ra829a5b r0fb70e1 420 420 % Output device class 421 421 @ "generic" Monitor or serial line 422 ! [PLATFORM=arm32&(MACHINE=gta02|MACHINE=integratorcp|MACHINE=beagleboardxm )] CONFIG_HID_OUT (choice)422 ! [PLATFORM=arm32&(MACHINE=gta02|MACHINE=integratorcp|MACHINE=beagleboardxm|MACHINE=beaglebone)] CONFIG_HID_OUT (choice) 423 423 424 424 % Output device class … … 480 480 ! [PLATFORM=arm32&MACHINE=gta02] CONFIG_S3C24XX_IRQC (y) 481 481 482 % Support for TI AMDM37X on-chip UART 482 % Support for TI AM335x on-chip UART 483 ! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&PLATFORM=arm32&MACHINE=beaglebone] CONFIG_AM335X_UART (y/n) 484 485 % Support for TI AMDM37x on-chip UART 483 486 ! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&PLATFORM=arm32&MACHINE=beagleboardxm] CONFIG_AMDM37X_UART (y/n) 484 487 … … 502 505 503 506 % Serial line input module 504 ! [CONFIG_DSRLNIN=y|(PLATFORM=arm32&MACHINE=gta02)|(PLATFORM=arm32&MACHINE=integratorcp&CONFIG_ARM926_UART=y)|(PLATFORM=arm32&MACHINE=beaglebo ardxm&CONFIG_AMDM37X_UART=y)|(PLATFORM=ia64&MACHINE=i460GX&CONFIG_NS16550=y)|(PLATFORM=ia64&MACHINE=ski)|(PLATFORM=sparc64&PROCESSOR=sun4v)] CONFIG_SRLN (y)507 ! [CONFIG_DSRLNIN=y|(PLATFORM=arm32&MACHINE=gta02)|(PLATFORM=arm32&MACHINE=integratorcp&CONFIG_ARM926_UART=y)|(PLATFORM=arm32&MACHINE=beaglebone&CONFIG_AM335X_UART=y)|(PLATFORM=arm32&MACHINE=beagleboardxm&CONFIG_AMDM37X_UART=y)|(PLATFORM=ia64&MACHINE=i460GX&CONFIG_NS16550=y)|(PLATFORM=ia64&MACHINE=ski)|(PLATFORM=sparc64&PROCESSOR=sun4v)] CONFIG_SRLN (y) 505 508 506 509 % EGA support -
kernel/arch/arm32/src/mach/beagleboardxm/beagleboardxm.c
ra829a5b r0fb70e1 35 35 #include <arch/exception.h> 36 36 #include <arch/mach/beagleboardxm/beagleboardxm.h> 37 #include <genarch/drivers/amdm37x _irc/amdm37x_irc.h>38 #include <genarch/drivers/amdm37x _uart/amdm37x_uart.h>39 #include <genarch/drivers/amdm37x _gpt/amdm37x_gpt.h>40 #include <genarch/drivers/amdm37x _dispc/amdm37x_dispc.h>37 #include <genarch/drivers/amdm37x/uart.h> 38 #include <genarch/drivers/amdm37x/irc.h> 39 #include <genarch/drivers/amdm37x/gpt.h> 40 #include <genarch/drivers/amdm37x/dispc.h> 41 41 #include <genarch/fb/fb.h> 42 42 #include <genarch/srln/srln.h> -
kernel/arch/arm32/src/mach/beaglebone/beaglebone.c
ra829a5b r0fb70e1 35 35 #include <arch/exception.h> 36 36 #include <arch/mach/beaglebone/beaglebone.h> 37 #include <genarch/drivers/am335x_irc/am335x_irc.h> 37 #include <genarch/drivers/am335x/irc.h> 38 #include <genarch/drivers/am335x/uart.h> 39 #include <genarch/srln/srln.h> 38 40 #include <interrupt.h> 39 41 #include <ddi/ddi.h> … … 54 56 static struct beaglebone { 55 57 am335x_irc_regs_t *irc_addr; 58 am335x_uart_t uart; 56 59 } bbone; 57 60 58 61 struct arm_machine_ops bbone_machine_ops = { 59 bbone_init,60 bbone_timer_irq_start,61 bbone_cpu_halt,62 bbone_get_memory_extents,63 bbone_irq_exception,64 bbone_frame_init,65 bbone_output_init,66 bbone_input_init,67 bbone_get_irq_count,68 bbone_get_platform_name62 .machine_init = bbone_init, 63 .machine_timer_irq_start = bbone_timer_irq_start, 64 .machine_cpu_halt = bbone_cpu_halt, 65 .machine_get_memory_extents = bbone_get_memory_extents, 66 .machine_irq_exception = bbone_irq_exception, 67 .machine_frame_init = bbone_frame_init, 68 .machine_output_init = bbone_output_init, 69 .machine_input_init = bbone_input_init, 70 .machine_get_irq_count = bbone_get_irq_count, 71 .machine_get_platform_name = bbone_get_platform_name, 69 72 }; 70 73 … … 105 108 static void bbone_output_init(void) 106 109 { 110 const bool ok = am335x_uart_init(&bbone.uart, 111 AM335x_UART0_IRQ, AM335x_UART0_BASE_ADDRESS, 112 AM335x_UART0_SIZE); 113 114 if (ok) 115 stdout_wire(&bbone.uart.outdev); 107 116 } 108 117 109 118 static void bbone_input_init(void) 110 119 { 120 srln_instance_t *srln_instance = srln_init(); 121 if (srln_instance) { 122 indev_t *sink = stdin_wire(); 123 indev_t *srln = srln_wire(srln_instance, sink); 124 am335x_uart_input_wire(&bbone.uart, srln); 125 am335x_irc_enable(bbone.irc_addr, AM335x_UART0_IRQ); 126 } 111 127 } 112 128 113 129 size_t bbone_get_irq_count(void) 114 130 { 115 return 0;131 return AM335x_IRC_IRQ_COUNT; 116 132 } 117 133 -
kernel/genarch/Makefile.inc
ra829a5b r0fb70e1 106 106 endif 107 107 108 ifeq ($(CONFIG_AM335X_UART),y) 109 GENARCH_SOURCES += \ 110 genarch/src/drivers/am335x/uart.c 111 endif 112 108 113 ifeq ($(CONFIG_AMDM37X_UART),y) 109 114 GENARCH_SOURCES += \ 110 genarch/src/drivers/amdm37x _uart/amdm37x_uart.c115 genarch/src/drivers/amdm37x/uart.c 111 116 endif 112 117 -
kernel/genarch/include/drivers/amdm37x/uart_regs.h
ra829a5b r0fb70e1 31 31 /** 32 32 * @file 33 * @brief Texas Instruments AMDM37x on-chip interrupt controller driver.33 * @brief Texas Instruments AMDM37x UART memory mapped registers. 34 34 */ 35 35 … … 40 40 #include <console/chardev.h> 41 41 #include <ddi/irq.h> 42 43 /* AMDM37x TRM p. 2950 */44 #define AMDM37x_UART1_BASE_ADDRESS 0x4806a00045 #define AMDM37x_UART1_SIZE 102446 #define AMDM37x_UART1_IRQ 72 /* AMDM37x TRM p. 2418 */47 48 #define AMDM37x_UART2_BASE_ADDRESS 0x4806b00049 #define AMDM37x_UART2_SIZE 102450 #define AMDM37x_UART2_IRQ 73 /* AMDM37x TRM p. 2418 */51 52 #define AMDM37x_UART3_BASE_ADDRESS 0x4902000053 #define AMDM37x_UART3_SIZE 102454 #define AMDM37x_UART3_IRQ 74 /* AMDM37x TRM p. 2418 */55 56 #define AMDM37x_UART4_BASE_ADDRESS 0x4904200057 #define AMDM37x_UART4_SIZE 102458 #define AMDM37x_UART4_IRQ 80 /* AMDM37x TRM p. 2418 */59 42 60 43 typedef struct { … … 343 326 344 327 /** BOF control register (IrDA only) */ 345 ioport32_t blr; /* UART3 s epcific */328 ioport32_t blr; /* UART3 specific */ 346 329 #define AMDM37x_IRDA_BLR_XBOF_TYPE_FLAG (1 << 6) 347 330 #define AMDM37x_IRDA_BLR_STS_FIFO_RESET (1 << 7) … … 442 425 } amdm37x_uart_regs_t; 443 426 444 typedef struct {445 amdm37x_uart_regs_t *regs;446 indev_t *indev;447 outdev_t outdev;448 irq_t irq;449 } amdm37x_uart_t;450 451 452 bool amdm37x_uart_init(amdm37x_uart_t *, inr_t, uintptr_t, size_t);453 void amdm37x_uart_input_wire(amdm37x_uart_t *, indev_t *);454 455 427 #endif 456 428 -
kernel/genarch/src/drivers/amdm37x/uart.c
ra829a5b r0fb70e1 34 34 */ 35 35 36 #include <genarch/drivers/amdm37x _uart/amdm37x_uart.h>36 #include <genarch/drivers/amdm37x/uart.h> 37 37 #include <ddi/device.h> 38 38 #include <str.h>
Note:
See TracChangeset
for help on using the changeset viewer.