; Copyright 2002 Tematic Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
;     http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;

; Structure of generic HAL devices, as described in Kernel.Docs.HAL.NewAPI

OldOpt  SETA    {OPT}
        OPT     OptNoList+OptNoP1List

 [ :LNOT: :DEF: Included_Hdr_HALDevice
                       GBLL Included_Hdr_HALDevice
Included_Hdr_HALDevice SETL {TRUE}


                        ^       0
HALDevice_Type          #       2
HALDevice_ID            #       2
HALDevice_Location      #       4
HALDevice_Version       #       4
HALDevice_Description   #       4
HALDevice_Address       #       4
HALDevice_Reserved1     #       12
HALDevice_Activate      #       4
HALDevice_Deactivate    #       4
HALDevice_Reset         #       4
HALDevice_Sleep         #       4
HALDevice_Device        #       4
HALDevice_TestIRQ       #       4
HALDevice_ClearIRQ      #       4
HALDevice_Reserved2     #       4
HALDeviceSize           *       :INDEX: @


HALDeviceType_Video     *       1 :SHL: 8
                        ^       1
HALDeviceVideo_VDU      #       1       ; VDU display

HALDeviceType_Audio     *       2 :SHL: 8
                        ^       1
HALDeviceAudio_AudC     #       1       ; 16-bit sound input/output controller
HALDeviceAudio_Mixer    #       1       ; Sound I/O mixer

HALDeviceType_SysPeri   *       3 :SHL: 8
                        ^       1
HALDeviceSysPeri_IntC   #       1       ; Interrupt controller
HALDeviceSysPeri_DMAC   #       1       ; DMA controller
HALDeviceSysPeri_DMAB   #       1       ; DMA channel - buffer type
HALDeviceSysPeri_DMAL   #       1       ; DMA channel - list type
HALDeviceSysPeri_RTC    #       1       ; RTCDevice

HALDeviceType_Comms     *       4 :SHL: 8
                        ^       1
HALDeviceComms_UART     #       1       ; UART
HALDeviceComms_EtherNIC #       1       ; Ethernet NIC


HALDeviceBus_Pro        *       0 :SHL: 28

HALDeviceProBus_Core    *       0 :SHL: 24
HALDeviceProBus_CoPro   *       1 :SHL: 24

HALDeviceBus_Sys        *       1 :SHL: 28

HALDeviceSysBus_AHB     *       0 :SHL: 24
HALDeviceSysBus_ASB     *       1 :SHL: 24
HALDeviceSysBus_PXBus   *       2 :SHL: 24

HALDeviceBus_Peri       *       2 :SHL: 28

HALDevicePeriBus_APB    *       0 :SHL: 24
HALDevicePeriBus_GPMC   *       1 :SHL: 24

HALDeviceBus_Exp        *       3 :SHL: 28

HALDeviceExpBus_Acorn   *       0 :SHL: 24
HALDeviceExpBus_ISA     *       1 :SHL: 24
HALDeviceExpBus_PCI     *       2 :SHL: 24

HALDeviceBus_Ser        *       4 :SHL: 28

HALDeviceSerBus_ACLink  *       0 :SHL: 24
HALDeviceSerBus_IIC     *       1 :SHL: 24

HALDeviceBus_Interconnect    *  5 :SHL: 28 ; Not really a bus type, but the OMAP stuff had to go somewhere!

HALDeviceInterconnectBus_L3  *  0 :SHL: 24
HALDeviceInterconnectBus_L4  *  1 :SHL: 24

                                ^       0
HALDeviceID_AudC_M5451          #       1
HALDeviceID_AudC_TPS65950       #       1

                                ^       0
HALDeviceID_Mixer_STAC9750      #       1
HALDeviceID_Mixer_TPS65950      #       1

                                ^       0
HALDeviceID_DMAC_M1535          #       1
HALDeviceID_DMAC_M5229          #       1
HALDeviceID_DMAC_OMAP3          #       1

                                ^       0
HALDeviceID_DMAB_M1535          #       1
HALDeviceID_DMAB_OMAP3          #       1

                                ^       0
HALDeviceID_DMAL_M5229          #       1

                                ^       0
HALDeviceID_RTC_TPS65950        #       1

                                ^       0
HALDeviceID_VDU_OMAP3           #       1

                                ^       0
HALDeviceID_EtherNIC_SMSC9221   #       1
HALDeviceID_EtherNIC_DM9000     #       1

 ]

        OPT     OldOpt
        END