• Jeffrey Lee's avatar
    Bring HAL branch of hdr/HALDevice, h/HALDevice in line with Cortex branch · ff0710fa
    Jeffrey Lee authored
    Detail:
      A fair number of bus/device types and IDs have been added to the Cortex branch since the branch was created.
      Now that the ClearIRQ entry has also been added, it's about time that the HAL branch was brought up to date.
    Admin:
      Untested, but should be fine.
    
    
    Version 5.35, 4.79.2.111. Tagged as 'Kernel-5_35-4_79_2_111'
    ff0710fa
HALDevice 1.18 KB
/* Copyright 2003 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.
 */
#ifndef GLOBAL_HALDEVICE_H

#include <stdbool.h>
#include <stdint.h>

struct device
{
  uint16_t type;
  uint16_t id;
  uint32_t location;
  uint32_t version;
  const char *description;
  void *address;
  uint32_t reserved1[3];
  bool (*Activate)(struct device *);
  void (*Deactivate)(struct device *);
  void (*Reset)(struct device *);
  int32_t (*Sleep)(struct device *, int32_t state);
  int32_t devicenumber;
  bool (*TestIRQ)(struct device *);
  void (*ClearIRQ)(struct device *);
  uint32_t reserved2[1];
};

#endif
/* In the exported copy of this file, the Hdr2H translation of hdr.HALDevice will follow. */