diff options
author | Che-Liang Chiou <clchiou@chromium.org> | 2011-06-15 09:26:25 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:39:27 -0700 |
commit | 9efc9607223a216c37e03a574a43a47aa2d3521e (patch) | |
tree | d20e2bac33e98e26e9d0e5e89124f01aa4ad99a4 /board/nvidia/chromeos | |
parent | 418dbbd831c961695e8c28d863a3239e383f1d6d (diff) |
CHROMIUM: [6/7] fix to merely compilable; rewrite gpio accessor to the new tegra gpio dirver
This is the sixth of the seven commits in the series. For more
information, please refer to the first commit.
Changes in this commit:
* rewrite gpio accessor to the new tegra gpio dirver
BUG=chromium-os:16508
TEST=manual; see the first commit
Change-Id: Ib478e2b4f9f35b86acb067e7c35fde725e57f056
Reviewed-on: http://gerrit.chromium.org/gerrit/2680
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board/nvidia/chromeos')
-rw-r--r-- | board/nvidia/chromeos/gpio.c | 42 |
1 files changed, 7 insertions, 35 deletions
diff --git a/board/nvidia/chromeos/gpio.c b/board/nvidia/chromeos/gpio.c index 93a0b6653d..35c05ee7a3 100644 --- a/board/nvidia/chromeos/gpio.c +++ b/board/nvidia/chromeos/gpio.c @@ -3,32 +3,6 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * * Alternatively, this software may be distributed under the terms of the * GNU General Public License ("GPL") version 2 as published by the Free * Software Foundation. @@ -37,8 +11,8 @@ /* Implementation of per-board GPIO accessor functions */ #include <common.h> -#include "../../common/lcd/gpinit/gpinit.h" - +#include <asm/arch/gpio.h> +#include <asm/arch/tegra2.h> #include <chromeos/common.h> #include <chromeos/gpio.h> @@ -46,22 +20,20 @@ #define GPIO_ACTIVE_LOW 1 #define GPIO_ACCESSOR(gpio_number, polarity) \ - tg2_gpio_direction_input(TEGRA_GPIO_PORT(gpio_number), \ - TEGRA_GPIO_BIT(gpio_number)); \ - return (polarity) ^ tg2_gpio_get_value(TEGRA_GPIO_PORT(gpio_number), \ - TEGRA_GPIO_BIT(gpio_number)); + gpio_direction_input(gpio_number); \ + return (polarity) ^ gpio_get_value(gpio_number); int is_firmware_write_protect_gpio_asserted(void) { - GPIO_ACCESSOR(TEGRA_GPIO_PH3, GPIO_ACTIVE_HIGH); + GPIO_ACCESSOR(GPIO_PH3, GPIO_ACTIVE_HIGH); } int is_recovery_mode_gpio_asserted(void) { - GPIO_ACCESSOR(TEGRA_GPIO_PH0, GPIO_ACTIVE_LOW); + GPIO_ACCESSOR(GPIO_PH0, GPIO_ACTIVE_LOW); } int is_developer_mode_gpio_asserted(void) { - GPIO_ACCESSOR(TEGRA_GPIO_PV0, GPIO_ACTIVE_HIGH); + GPIO_ACCESSOR(GPIO_PV0, GPIO_ACTIVE_HIGH); } |