| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/arch/arm/mach-pxa/lubbock.c |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 6 | 7 | * Author: Nicolas Pitre |
|---|
| 7 | 8 | * Created: Jun 15, 2001 |
|---|
| 8 | 9 | * Copyright: MontaVista Software Inc. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 11 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 12 | | - * published by the Free Software Foundation. |
|---|
| 13 | 10 | */ |
|---|
| 14 | 11 | #include <linux/clkdev.h> |
|---|
| 15 | 12 | #include <linux/gpio.h> |
|---|
| .. | .. |
|---|
| 39 | 36 | #include <asm/mach-types.h> |
|---|
| 40 | 37 | #include <mach/hardware.h> |
|---|
| 41 | 38 | #include <asm/irq.h> |
|---|
| 42 | | -#include <asm/sizes.h> |
|---|
| 39 | +#include <linux/sizes.h> |
|---|
| 43 | 40 | |
|---|
| 44 | 41 | #include <asm/mach/arch.h> |
|---|
| 45 | 42 | #include <asm/mach/map.h> |
|---|
| .. | .. |
|---|
| 119 | 116 | |
|---|
| 120 | 117 | static struct gpio_chip *lubbock_misc_wr_gc; |
|---|
| 121 | 118 | |
|---|
| 122 | | -void lubbock_set_misc_wr(unsigned int mask, unsigned int set) |
|---|
| 119 | +static void lubbock_set_misc_wr(unsigned int mask, unsigned int set) |
|---|
| 123 | 120 | { |
|---|
| 124 | 121 | unsigned long m = mask, v = set; |
|---|
| 125 | 122 | lubbock_misc_wr_gc->set_multiple(lubbock_misc_wr_gc, &m, &v); |
|---|
| 126 | 123 | } |
|---|
| 127 | | -EXPORT_SYMBOL(lubbock_set_misc_wr); |
|---|
| 128 | 124 | |
|---|
| 129 | 125 | static int lubbock_udc_is_connected(void) |
|---|
| 130 | 126 | { |
|---|
| .. | .. |
|---|
| 136 | 132 | // no D+ pullup; lubbock can't connect/disconnect in software |
|---|
| 137 | 133 | }; |
|---|
| 138 | 134 | |
|---|
| 135 | +/* GPIOs for SA1111 PCMCIA */ |
|---|
| 136 | +static struct gpiod_lookup_table sa1111_pcmcia_gpio_table = { |
|---|
| 137 | + .dev_id = "1800", |
|---|
| 138 | + .table = { |
|---|
| 139 | + { "sa1111", 0, "a0vpp", GPIO_ACTIVE_HIGH }, |
|---|
| 140 | + { "sa1111", 1, "a1vpp", GPIO_ACTIVE_HIGH }, |
|---|
| 141 | + { "sa1111", 2, "a0vcc", GPIO_ACTIVE_HIGH }, |
|---|
| 142 | + { "sa1111", 3, "a1vcc", GPIO_ACTIVE_HIGH }, |
|---|
| 143 | + { "lubbock", 14, "b0vcc", GPIO_ACTIVE_HIGH }, |
|---|
| 144 | + { "lubbock", 15, "b1vcc", GPIO_ACTIVE_HIGH }, |
|---|
| 145 | + { }, |
|---|
| 146 | + }, |
|---|
| 147 | +}; |
|---|
| 148 | + |
|---|
| 139 | 149 | static void lubbock_init_pcmcia(void) |
|---|
| 140 | 150 | { |
|---|
| 141 | 151 | struct clk *clk; |
|---|
| 152 | + |
|---|
| 153 | + gpiod_add_lookup_table(&sa1111_pcmcia_gpio_table); |
|---|
| 142 | 154 | |
|---|
| 143 | 155 | /* Add an alias for the SA1111 PCMCIA clock */ |
|---|
| 144 | 156 | clk = clk_get_sys("pxa2xx-pcmcia", NULL); |
|---|
| .. | .. |
|---|
| 181 | 193 | * (to J5) and poking board registers (as done below). Else it's only useful |
|---|
| 182 | 194 | * for the temperature sensors. |
|---|
| 183 | 195 | */ |
|---|
| 184 | | -static struct pxa2xx_spi_master pxa_ssp_master_info = { |
|---|
| 196 | +static struct pxa2xx_spi_controller pxa_ssp_master_info = { |
|---|
| 185 | 197 | .num_chipselect = 1, |
|---|
| 186 | 198 | }; |
|---|
| 187 | 199 | |
|---|
| .. | .. |
|---|
| 440 | 452 | .init = lubbock_mci_init, |
|---|
| 441 | 453 | .get_ro = lubbock_mci_get_ro, |
|---|
| 442 | 454 | .exit = lubbock_mci_exit, |
|---|
| 443 | | - .gpio_card_detect = -1, |
|---|
| 444 | | - .gpio_card_ro = -1, |
|---|
| 445 | | - .gpio_power = -1, |
|---|
| 446 | 455 | }; |
|---|
| 447 | 456 | |
|---|
| 448 | 457 | static void lubbock_irda_transceiver_mode(struct device *dev, int mode) |
|---|