// SPDX-License-Identifier: MPL-2.0
#include "cpu/pit.h"
#include "cpu/asm.h"
void sh_pit_set_frequency(sh_uint64 hz) {
  sh_uint16 divisor=(sh_uint16)((sh_uint64)1193182/hz);
  sh_asm_outb(0x43,0x36);
  sh_asm_outb(0x40,(sh_uint8)(divisor&0xFF));
  sh_asm_outb(0x40,(sh_uint8)(divisor>>8));
}
