1eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan/* 287427da55bc03dbce7906a5b09ed50279d654d28John Gregor * Copyright (c) 2006, 2007 QLogic Corporation. All rights reserved. 3eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * 4eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * This software is available to you under a choice of one of two 5eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * licenses. You may choose to be licensed under the terms of the GNU 6eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * General Public License (GPL) Version 2, available from the file 7eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * COPYING in the main directory of this source tree, or the 8eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * OpenIB.org BSD license below: 9eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * 10eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * Redistribution and use in source and binary forms, with or 11eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * without modification, are permitted provided that the following 12eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * conditions are met: 13eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * 14eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * - Redistributions of source code must retain the above 15eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * copyright notice, this list of conditions and the following 16eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * disclaimer. 17eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * 18eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * - Redistributions in binary form must reproduce the above 19eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * copyright notice, this list of conditions and the following 20eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * disclaimer in the documentation and/or other materials 21eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * provided with the distribution. 22eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * 23eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 27eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 28eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 29eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 30eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * SOFTWARE. 31eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan */ 32eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan 33eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan/* 34eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * This file is conditionally built on PowerPC only. Otherwise weak symbol 35eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * versions of the functions exported from here are used. 36eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan */ 37eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan 38eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan#include "ipath_kernel.h" 39eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan 40eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan/** 411fd3b40fde3bfacdf742cadfe99cfd47ffd05219Bryan O'Sullivan * ipath_enable_wc - enable write combining for MMIO writes to the device 421fd3b40fde3bfacdf742cadfe99cfd47ffd05219Bryan O'Sullivan * @dd: infinipath device 43eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * 441fd3b40fde3bfacdf742cadfe99cfd47ffd05219Bryan O'Sullivan * Nothing to do on PowerPC, so just return without error. 451fd3b40fde3bfacdf742cadfe99cfd47ffd05219Bryan O'Sullivan */ 461fd3b40fde3bfacdf742cadfe99cfd47ffd05219Bryan O'Sullivanint ipath_enable_wc(struct ipath_devdata *dd) 471fd3b40fde3bfacdf742cadfe99cfd47ffd05219Bryan O'Sullivan{ 481fd3b40fde3bfacdf742cadfe99cfd47ffd05219Bryan O'Sullivan return 0; 491fd3b40fde3bfacdf742cadfe99cfd47ffd05219Bryan O'Sullivan} 501fd3b40fde3bfacdf742cadfe99cfd47ffd05219Bryan O'Sullivan 511fd3b40fde3bfacdf742cadfe99cfd47ffd05219Bryan O'Sullivan/** 521fd3b40fde3bfacdf742cadfe99cfd47ffd05219Bryan O'Sullivan * ipath_unordered_wc - indicate whether write combining is unordered 53eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan * 541fd3b40fde3bfacdf742cadfe99cfd47ffd05219Bryan O'Sullivan * Because our performance depends on our ability to do write 551fd3b40fde3bfacdf742cadfe99cfd47ffd05219Bryan O'Sullivan * combining mmio writes in the most efficient way, we need to 561fd3b40fde3bfacdf742cadfe99cfd47ffd05219Bryan O'Sullivan * know if we are on a processor that may reorder stores when 571fd3b40fde3bfacdf742cadfe99cfd47ffd05219Bryan O'Sullivan * write combining. 58eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan */ 59eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivanint ipath_unordered_wc(void) 60eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan{ 61eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan return 1; 62eb9dc6f48dc7537ce53163109625bd992150e0cfBryan O'Sullivan} 63