diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-07-05 16:25:22 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-07-06 16:17:19 -0400 |
commit | daab59ac05d8fd1092e34a4c695ac265ae700141 (patch) | |
tree | c9fe90a80281235d0bf3043d1d2e7c218f3ed383 /arch/avr32/cpu/portmux-pio.c | |
parent | 747c4c68c042babb2179b52b60bc78611e3e1183 (diff) |
avr32: Retire AVR32 for good
AVR32 is gone. It's already more than two years for no support in Buildroot,
even longer there is no support in GCC (last version is heavily patched 4.2.4).
Linux kernel v4.12 got rid of it (and v4.11 didn't build successfully).
There is no good point to keep this support in U-Boot either.
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'arch/avr32/cpu/portmux-pio.c')
-rw-r--r-- | arch/avr32/cpu/portmux-pio.c | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/arch/avr32/cpu/portmux-pio.c b/arch/avr32/cpu/portmux-pio.c deleted file mode 100644 index 8ce51e64df..0000000000 --- a/arch/avr32/cpu/portmux-pio.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2006, 2008 Atmel Corporation - * - * SPDX-License-Identifier: GPL-2.0+ - */ -#include <common.h> - -#include <asm/io.h> -#include <asm/arch/hardware.h> -#include <asm/arch/gpio.h> - -void portmux_select_peripheral(void *port, unsigned long pin_mask, - enum portmux_function func, unsigned long flags) -{ - if (flags & PORTMUX_PULL_UP) - pio_writel(port, PUER, pin_mask); - else - pio_writel(port, PUDR, pin_mask); - - switch (func) { - case PORTMUX_FUNC_A: - pio_writel(port, ASR, pin_mask); - break; - case PORTMUX_FUNC_B: - pio_writel(port, BSR, pin_mask); - break; - } - - pio_writel(port, PDR, pin_mask); -} - -void portmux_select_gpio(void *port, unsigned long pin_mask, - unsigned long flags) -{ - if (flags & PORTMUX_PULL_UP) - pio_writel(port, PUER, pin_mask); - else - pio_writel(port, PUDR, pin_mask); - - if (flags & PORTMUX_OPEN_DRAIN) - pio_writel(port, MDER, pin_mask); - else - pio_writel(port, MDDR, pin_mask); - - if (flags & PORTMUX_DIR_OUTPUT) { - if (flags & PORTMUX_INIT_HIGH) - pio_writel(port, SODR, pin_mask); - else - pio_writel(port, CODR, pin_mask); - pio_writel(port, OER, pin_mask); - } else { - pio_writel(port, ODR, pin_mask); - } - - pio_writel(port, PER, pin_mask); -} - -void pio_set_output_value(unsigned int pin, int value) -{ - void *port = pio_pin_to_port(pin); - - if (!port) - panic("Invalid GPIO pin %u\n", pin); - - __pio_set_output_value(port, pin & 0x1f, value); -} - -int pio_get_input_value(unsigned int pin) -{ - void *port = pio_pin_to_port(pin); - - if (!port) - panic("Invalid GPIO pin %u\n", pin); - - return __pio_get_input_value(port, pin & 0x1f); -} |