mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
Moved some generic 8254 PIT #defines out of the speaker code to legacy.h.
Use legacy.h PIT defines in Geode code. Signed-off-by: Marc Jones <marc.jones@amd.com> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@433 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
b1ef1489a0
commit
7c9c8db800
3 changed files with 38 additions and 10 deletions
|
@ -30,6 +30,7 @@
|
|||
#include <io.h>
|
||||
#include <amd_geodelx.h>
|
||||
#include <spd.h>
|
||||
#include <legacy.h>
|
||||
|
||||
/* all these functions used to be in a lot of fiddly little files. To
|
||||
* make it easier to find functions, we are merging them here. This
|
||||
|
@ -41,8 +42,6 @@
|
|||
|
||||
/**
|
||||
* Starts Timer 1 for port 61 use.
|
||||
* 0x43 is PIT command/control.
|
||||
* 0x41 is PIT counter 1.
|
||||
*
|
||||
* The command 0x56 means write counter 1 lower 8 bits in next IO,
|
||||
* set the counter mode to square wave generator (count down to 0
|
||||
|
@ -58,8 +57,8 @@
|
|||
*/
|
||||
void start_timer1(void)
|
||||
{
|
||||
outb(0x56, 0x43);
|
||||
outb(0x12, 0x41);
|
||||
outb(0x56, I82C54_CONTROL_WORD_REGISTER);
|
||||
outb(0x12, I82C54_COUNTER1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -27,12 +27,7 @@
|
|||
|
||||
#include <io.h>
|
||||
#include <lib.h>
|
||||
|
||||
#define I82C54_CONTROL_WORD_REGISTER 0x43 /* Write-only. */
|
||||
|
||||
#define I82C54_COUNTER0 0x40
|
||||
#define I82C54_COUNTER1 0x41
|
||||
#define I82C54_COUNTER2 0x42
|
||||
#include <legacy.h>
|
||||
|
||||
#define PC_SPEAKER_PORT 0x61
|
||||
|
||||
|
|
34
include/arch/x86/legacy.h
Normal file
34
include/arch/x86/legacy.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* This file is part of the LinuxBIOS project.
|
||||
*
|
||||
* Copyright (C) 2007 Uwe Hermann <uwe@hermann-uwe.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
* Datasheet:
|
||||
* - Name: 82C54 CHMOS Programmable Interval Timer
|
||||
* - PDF: http://www.intel.com/design/archives/periphrl/docs/23124406.pdf
|
||||
* - Order number: 231244-006
|
||||
*
|
||||
* See also:
|
||||
* - http://en.wikipedia.org/wiki/Intel_8253
|
||||
*/
|
||||
|
||||
#define I82C54_CONTROL_WORD_REGISTER 0x43 /* Write-only. */
|
||||
#define I82C54_COUNTER0 0x40
|
||||
#define I82C54_COUNTER1 0x41
|
||||
#define I82C54_COUNTER2 0x42
|
Loading…
Add table
Reference in a new issue