2015-04-11 01:44:37 +02:00
|
|
|
/* pic.h - public Intel 8259 PIC APIs */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2015 Wind River Systems, Inc.
|
|
|
|
*
|
2015-10-06 18:00:37 +02:00
|
|
|
* 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
|
2015-04-11 01:44:37 +02:00
|
|
|
*
|
2015-10-06 18:00:37 +02:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2015-04-11 01:44:37 +02:00
|
|
|
*
|
2015-10-06 18:00:37 +02:00
|
|
|
* 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.
|
2015-04-11 01:44:37 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __INCpich
|
|
|
|
#define __INCpich
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-09-09 20:25:04 +02:00
|
|
|
#if defined(CONFIG_PIC_DISABLE)
|
2015-04-11 01:44:37 +02:00
|
|
|
|
2015-06-15 15:20:24 +02:00
|
|
|
/* programmable interrupt controller info (pair of cascaded 8259A devices) */
|
|
|
|
|
|
|
|
#define PIC_MASTER_BASE_ADRS 0x20
|
|
|
|
#define PIC_SLAVE_BASE_ADRS 0xa0
|
|
|
|
#define PIC_REG_ADDR_INTERVAL 1
|
2015-04-11 01:44:37 +02:00
|
|
|
|
|
|
|
/* register definitions */
|
|
|
|
#define PIC_ADRS(baseAdrs, reg) (baseAdrs + (reg * PIC_REG_ADDR_INTERVAL))
|
|
|
|
|
|
|
|
#define PIC_PORT2(base) PIC_ADRS(base, 0x01) /* port 2 */
|
|
|
|
|
2015-08-05 22:39:27 +02:00
|
|
|
#ifndef _ASMLANGUAGE
|
2015-04-11 01:44:37 +02:00
|
|
|
|
2015-09-15 18:17:38 +02:00
|
|
|
extern int _i8259_init(struct device *unused);
|
2015-04-11 01:44:37 +02:00
|
|
|
|
|
|
|
#endif /* _ASMLANGUAGE */
|
|
|
|
|
2015-09-09 20:25:04 +02:00
|
|
|
#endif /* CONFIG_PIC_DISABLE */
|
2015-04-11 01:44:37 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __INCpich */
|