i8254.hh revision 5443
12379SN/A/*
210298Salexandru.dutu@amd.com * Copyright (c) 2008 The Regents of The University of Michigan
32379SN/A * All rights reserved.
42379SN/A *
52379SN/A * Redistribution and use in source and binary forms, with or without
62379SN/A * modification, are permitted provided that the following conditions are
72379SN/A * met: redistributions of source code must retain the above copyright
82379SN/A * notice, this list of conditions and the following disclaimer;
92379SN/A * redistributions in binary form must reproduce the above copyright
102379SN/A * notice, this list of conditions and the following disclaimer in the
112379SN/A * documentation and/or other materials provided with the distribution;
122379SN/A * neither the name of the copyright holders nor the names of its
132379SN/A * contributors may be used to endorse or promote products derived from
142379SN/A * this software without specific prior written permission.
152379SN/A *
162379SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
172379SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
182379SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
192379SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
202379SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
212379SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
222379SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
232379SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
242379SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
252379SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
262379SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272379SN/A *
282665Ssaidi@eecs.umich.edu * Authors: Gabe Black
292665Ssaidi@eecs.umich.edu */
302665Ssaidi@eecs.umich.edu
313311Ssaidi@eecs.umich.edu#ifndef __DEV_X86_SOUTH_BRIDGE_I8254_HH__
322379SN/A#define __DEV_X86_SOUTH_BRIDGE_I8254_HH__
332379SN/A
342379SN/A#include "arch/x86/x86_traits.hh"
352379SN/A#include "base/range.hh"
3610298Salexandru.dutu@amd.com#include "dev/intel_8254_timer.hh"
372379SN/A#include "dev/x86/south_bridge/sub_device.hh"
388229Snate@binkert.org
398229Snate@binkert.org#include <string>
402379SN/A
412379SN/Anamespace X86ISA
422399SN/A{
432379SN/A
442379SN/Aclass I8254 : public SubDevice
456658Snate@binkert.org{
468232Snate@binkert.org  protected:
472379SN/A    Intel8254Timer pit;
487678Sgblack@eecs.umich.edu
492379SN/A  public:
502379SN/A
512399SN/A    I8254(const std::string &name) : pit(name)
522423SN/A    {}
532399SN/A    I8254(const std::string &name, Tick _latency) :
5410298Salexandru.dutu@amd.com        SubDevice(_latency), pit(name)
5510298Salexandru.dutu@amd.com    {}
562379SN/A    I8254(const std::string &name, Addr start, Addr size, Tick _latency) :
572379SN/A        SubDevice(start, size, _latency), pit(name)
582379SN/A    {}
5910298Salexandru.dutu@amd.com
602379SN/A    Tick read(PacketPtr pkt);
612379SN/A
622379SN/A    Tick write(PacketPtr pkt);
632399SN/A};
6410298Salexandru.dutu@amd.com
652399SN/A}; // namespace X86ISA
662399SN/A
672399SN/A#endif //__DEV_X86_SOUTH_BRIDGE_I8254_HH__
682399SN/A