Commits (2)
  • Robert Sprowson's avatar
    Add missing BB rev C free to use table, correct the BBxM one · 40d5177d
    Robert Sprowson authored
    All versions of Beagleboard were referring to a single table, but at rev C three of the GPIO pins got moved, so we need a different table for that so that the GPIO module will enumerate the right one.
    For Beagleboard xM, 10 pins were missing.
    From discussion at
      https://www.riscosopen.org/forum/forums/11/topics/11903?page=2#posts-97755
    Tested on Beagleboard C4 and xM.
    
    Version 1.19. Tagged as 'HAL_OMAP3-1_19'
    40d5177d
  • Jeffrey Lee's avatar
    Fix UART TX FIFO thresholds · e98c29cc
    Jeffrey Lee authored
    HAL_UARTFIFOSize was incorrectly returning the TX FIFO size, instead of
    the number of characters that can be written when the TX empty IRQ is
    received. This was causing data loss when DualSerial drives the
    interface at high speed (> 19200 baud) (OMAP3530), or data aborts when
    writing to UART_THR (DM3750, some kind of hardware quirk when the FIFO
    is full?)
    
    Fix this by programming a sensible trigger level at startup, and
    returning the correct value from HAL_UARTFIFOSize.
    
    Version 1.20. Tagged as 'HAL_OMAP3-1_20'
    e98c29cc
/* (1.18)
/* (1.20)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.18
#define Module_MajorVersion_CMHG 1.20
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 01 Apr 2018
#define Module_Date_CMHG 08 Feb 2020
#define Module_MajorVersion "1.18"
#define Module_Version 118
#define Module_MajorVersion "1.20"
#define Module_Version 120
#define Module_MinorVersion ""
#define Module_Date "01 Apr 2018"
#define Module_Date "08 Feb 2020"
#define Module_ApplicationDate "01-Apr-18"
#define Module_ApplicationDate "08-Feb-20"
#define Module_ComponentName "OMAP3"
#define Module_ComponentPath "castle/RiscOS/Sources/HAL/OMAP3"
#define Module_ComponentName "HAL_OMAP3"
#define Module_FullVersion "1.18"
#define Module_HelpVersion "1.18 (01 Apr 2018)"
#define Module_LibraryVersionInfo "1:18"
#define Module_FullVersion "1.20"
#define Module_HelpVersion "1.20 (08 Feb 2020)"
#define Module_LibraryVersionInfo "1:20"
......@@ -32,6 +32,8 @@ UART_SYSS * &058
UART_DLL * &000
UART_DLM * &004
UART_EFR * &008
; IER
ERBI * 2_00000001
ETBEI * 2_00000010
......@@ -43,6 +45,11 @@ FIFOEN * 2_00000001
FIFORSTRX * 2_00000010
FIFORSTTX * 2_00000100
DMA * 2_00001000
FIFOTHT * 2_00110000
FIFOTHT_8 * 2_00000000
FIFOTHT_16 * 2_00010000
FIFOTHT_32 * 2_00100000
FIFOTHT_56 * 2_00110000
FIFOTHR * 2_11000000
FIFOTHR_8 * 2_00000000
FIFOTHR_16 * 2_01000000
......
......@@ -293,7 +293,8 @@ Wksp_GPIO_Size # 0
; Map Type/Revision to entry in GPIOFreeToUse table
^ 0
GPIOType_BB # 1 ; OMAP3530
GPIOType_BBab # 1 ; OMAP3530
GPIOType_BBc # 1 ; OMAP3530
GPIOType_BBxM # 1 ; DM3730
GPIOType_DevKit8000 # 1 ; OMAP3530
GPIOType_IGEPv2 # 1 ; DM3730
......@@ -302,9 +303,9 @@ GPIOType_Pandora # 1 ; OMAP3530
GPIOType_Max # 0
GPIOTypeMap
DCD BoardType_OMAP3_BeagleBoard, BoardRevision_BeagleBoard_AB, GPIOType_BB
DCD BoardType_OMAP3_BeagleBoard, BoardRevision_BeagleBoard_C123, GPIOType_BB
DCD BoardType_OMAP3_BeagleBoard, BoardRevision_BeagleBoard_C4, GPIOType_BB
DCD BoardType_OMAP3_BeagleBoard, BoardRevision_BeagleBoard_AB, GPIOType_BBab
DCD BoardType_OMAP3_BeagleBoard, BoardRevision_BeagleBoard_C123, GPIOType_BBc
DCD BoardType_OMAP3_BeagleBoard, BoardRevision_BeagleBoard_C4, GPIOType_BBc
DCD BoardType_OMAP3_BeagleBoard, BoardRevision_BeagleBoard_xMA, GPIOType_BBxM
DCD BoardType_OMAP3_BeagleBoard, BoardRevision_BeagleBoard_xMB, GPIOType_BBxM
DCD BoardType_OMAP3_BeagleBoard, BoardRevision_BeagleBoard_xMC, GPIOType_BBxM
......@@ -394,20 +395,27 @@ GPIOAltsTables
; Available pins per target board
GPIOFreeToUse
ASSERT (. - GPIOFreeToUse):SHR:2 = (GPIOType_BB * GPIO_PORT_MAX)
DCD 2_10000000000000000000100010000000 ; BeagleBoard
ASSERT (. - GPIOFreeToUse):SHR:2 = (GPIOType_BBab * GPIO_PORT_MAX)
DCD 2_10000000000000000000100010000000 ; BeagleBoard, A & B
DCD 2_00000000000000000000000000000000
DCD 2_00000000000000000000000000000000
DCD 2_00000000000000000000000000000000
DCD 2_11110000011000001111111111111100
DCD 2_00000000100000000000000100000110
ASSERT (. - GPIOFreeToUse):SHR:2 = (GPIOType_BBc * GPIO_PORT_MAX)
DCD 2_10000000000000000000100010000000 ; BeagleBoard, C
DCD 2_00000000000000000000000000000000
DCD 2_00000000000000000000000000000000
DCD 2_00000000000000000000000000000000
DCD 2_11110000011001111000111111111100
DCD 2_00000000100000000000000100000110
ASSERT (. - GPIOFreeToUse):SHR:2 = (GPIOType_BBxM * GPIO_PORT_MAX)
DCD 2_10000000111111111111100000010000 ; BeagleBoard-xM
DCD 2_00000010000000000000000000000000
DCD 2_11000000000000000000000000000000
DCD 2_00000000111100000111111111111111
DCD 2_00000000011000000000111111111100
DCD 2_00000000100000000000010110000000
DCD 2_11110000011001111000111111111100
DCD 2_00000000100000000000010110000110
ASSERT (. - GPIOFreeToUse):SHR:2 = (GPIOType_DevKit8000 * GPIO_PORT_MAX)
DCD 2_10000000000000000000100010000000 ; DevKit 8000
DCD 2_00000000000000000000000000000000
......
......@@ -85,12 +85,17 @@ HAL_UARTStartUp
MOV a2, #1+(2<<3)
STRB a2, [a1, #UART_SYSC]
MOV a2, #0
MOV a2, #&BF
STRB a2, [a1, #UART_LCR] ; Switch to config mode B for EFR access
MOV a2, #1<<4
STRB a2, [a1, #UART_EFR] ; Enable TX threshold programming
MOV a2, #WLS_8
STRB a2, [a1, #UART_LCR] ; Back to operational mode, default word length
MOV a2, #FIFOTHT_32 ; 32 byte TX threshold should be fine
STRB a2, [a3, #:INDEX:UARTFCRSoftCopy]
STRB a2, [a1, #UART_FCR]
MOV a2, #0
STRB a2, [a1, #UART_MCR]
MOV a2, #WLS_8
STRB a2, [a1, #UART_LCR]
MOV pc, lr
; int Features(int port)
......@@ -262,6 +267,7 @@ HAL_UARTFIFOSize
MOV a1, #64
TEQ a2, #0
STRNE a1, [a2]
MOV a1, #32
TEQ a3, #0
STRNE a1, [a3]
MOV pc, lr
......