OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2008-2010 NVIDIA Corporation. |
| 3 * All rights reserved. |
| 4 * |
| 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: |
| 7 * |
| 8 * Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. |
| 10 * |
| 11 * Redistributions in binary form must reproduce the above copyright notice, |
| 12 * this list of conditions and the following disclaimer in the documentation |
| 13 * and/or other materials provided with the distribution. |
| 14 * |
| 15 * Neither the name of the NVIDIA Corporation nor the names of its contributors |
| 16 * may be used to endorse or promote products derived from this software |
| 17 * without specific prior written permission. |
| 18 * |
| 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
| 23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 29 * POSSIBILITY OF SUCH DAMAGE. |
| 30 * |
| 31 */ |
| 32 |
| 33 /* This header file defines shared structures used by Linux drivers |
| 34 * integrating with Tegra NvRM. |
| 35 */ |
| 36 |
| 37 #ifndef INCLUDED_nvrm_linux_H |
| 38 #define INCLUDED_nvrm_linux_H |
| 39 |
| 40 /* nvcommon.h exepcts NV_DEBUG to be defined */ |
| 41 #ifndef NV_DEBUG |
| 42 #ifdef DEBUG |
| 43 #define NV_DEBUG DEBUG |
| 44 #else |
| 45 #define NV_DEBUG 0 |
| 46 #endif |
| 47 #endif |
| 48 |
| 49 #include <nvrm_init.h> |
| 50 #include <nvrm_i2c.h> |
| 51 #include <nvrm_owr.h> |
| 52 #include <nvrm_gpio.h> |
| 53 #include <nvodm_query_pinmux.h> |
| 54 #include <nvodm_query.h> |
| 55 #include "nvddk_usbphy.h" |
| 56 |
| 57 extern NvRmDeviceHandle s_hRmGlobal; |
| 58 extern NvRmGpioHandle s_hGpioGlobal; |
| 59 |
| 60 int tegra_get_partition_info_by_name(const char *PartName, |
| 61 NvU64 *pSectorStart, NvU64 *pSectorLength, NvU32 *pSectorSize); |
| 62 |
| 63 int tegra_get_partition_info_by_num(int PartitionNum, char **pName, |
| 64 NvU64 *pSectorStart, NvU64 *pSectorEnd, NvU32 *pSectorSize); |
| 65 |
| 66 int tegra_was_boot_device(const char *pBootDev); |
| 67 |
| 68 NvU32 NvRmDmaUnreservedChannels(void); |
| 69 |
| 70 #ifndef CONFIG_SERIAL_TEGRA_UARTS |
| 71 #define TEGRA_SYSTEM_DMA_CH_UART 0 |
| 72 #else |
| 73 #define TEGRA_SYSTEM_DMA_CH_UART (2*CONFIG_SERIAL_TEGRA_UARTS) |
| 74 #endif |
| 75 |
| 76 #ifdef CONFIG_TEGRA_SYSTEM_DMA |
| 77 #define TEGRA_SYSTEM_DMA_CH_NUM (1 + TEGRA_SYSTEM_DMA_CH_UART) |
| 78 #else |
| 79 #define TEGRA_SYSTEM_DMA_CH_NUM (0) |
| 80 #endif |
| 81 |
| 82 /* DMA channels available to system DMA driver */ |
| 83 #define TEGRA_SYSTEM_DMA_CH_MIN NvRmDmaUnreservedChannels() |
| 84 #define TEGRA_SYSTEM_DMA_CH_MAX \ |
| 85 (TEGRA_SYSTEM_DMA_CH_MIN+TEGRA_SYSTEM_DMA_CH_NUM) |
| 86 |
| 87 #endif |
OLD | NEW |