162306a36Sopenharmony_ci/*
262306a36Sopenharmony_ci * IBM PowerPC eBus Infrastructure Support.
362306a36Sopenharmony_ci *
462306a36Sopenharmony_ci * Copyright (c) 2005 IBM Corporation
562306a36Sopenharmony_ci *  Joachim Fenkes <fenkes@de.ibm.com>
662306a36Sopenharmony_ci *  Heiko J Schick <schickhj@de.ibm.com>
762306a36Sopenharmony_ci *
862306a36Sopenharmony_ci * All rights reserved.
962306a36Sopenharmony_ci *
1062306a36Sopenharmony_ci * This source code is distributed under a dual license of GPL v2.0 and OpenIB
1162306a36Sopenharmony_ci * BSD.
1262306a36Sopenharmony_ci *
1362306a36Sopenharmony_ci * OpenIB BSD License
1462306a36Sopenharmony_ci *
1562306a36Sopenharmony_ci * Redistribution and use in source and binary forms, with or without
1662306a36Sopenharmony_ci * modification, are permitted provided that the following conditions are met:
1762306a36Sopenharmony_ci *
1862306a36Sopenharmony_ci * Redistributions of source code must retain the above copyright notice, this
1962306a36Sopenharmony_ci * list of conditions and the following disclaimer.
2062306a36Sopenharmony_ci *
2162306a36Sopenharmony_ci * Redistributions in binary form must reproduce the above copyright notice,
2262306a36Sopenharmony_ci * this list of conditions and the following disclaimer in the documentation
2362306a36Sopenharmony_ci * and/or other materials
2462306a36Sopenharmony_ci * provided with the distribution.
2562306a36Sopenharmony_ci *
2662306a36Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2762306a36Sopenharmony_ci * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2862306a36Sopenharmony_ci * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2962306a36Sopenharmony_ci * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
3062306a36Sopenharmony_ci * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
3162306a36Sopenharmony_ci * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
3262306a36Sopenharmony_ci * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
3362306a36Sopenharmony_ci * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
3462306a36Sopenharmony_ci * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3562306a36Sopenharmony_ci * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3662306a36Sopenharmony_ci * POSSIBILITY OF SUCH DAMAGE.
3762306a36Sopenharmony_ci */
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci#ifndef _ASM_EBUS_H
4062306a36Sopenharmony_ci#define _ASM_EBUS_H
4162306a36Sopenharmony_ci#ifdef __KERNEL__
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci#include <linux/device.h>
4462306a36Sopenharmony_ci#include <linux/interrupt.h>
4562306a36Sopenharmony_ci#include <linux/mod_devicetable.h>
4662306a36Sopenharmony_ci#include <linux/of_device.h>
4762306a36Sopenharmony_ci#include <linux/of_platform.h>
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_cistruct platform_driver;
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ciextern struct bus_type ibmebus_bus_type;
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_ciint ibmebus_register_driver(struct platform_driver *drv);
5462306a36Sopenharmony_civoid ibmebus_unregister_driver(struct platform_driver *drv);
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ciint ibmebus_request_irq(u32 ist, irq_handler_t handler,
5762306a36Sopenharmony_ci			unsigned long irq_flags, const char *devname,
5862306a36Sopenharmony_ci			void *dev_id);
5962306a36Sopenharmony_civoid ibmebus_free_irq(u32 ist, void *dev_id);
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci#endif /* __KERNEL__ */
6262306a36Sopenharmony_ci#endif /* _ASM_IBMEBUS_H */
63