Commit d92ef29a6fa971d9e314e412cd9c09757906411a

Authored by Mark Brown
Committed by Grant Likely
1 parent 76c05c8a0d

h8300: Move gpio.h to gpio-internal.h

The current h8300 GPIO implementation doesn't provide the standard GPIO
API, and in fact provides only direction control rather than normal GPIO
functionality. Currently this is only used by the platform interrupt
implementation rather than by a range of drivers so in preparation for
moving over to gpiolib move the header out of the way of the gpiolib
header, allowing a default GPIO implementation to be provided.

For actual use of these GPIOs with gpiolib a real driver would still need
to be written but there appears to be no current need for this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>

Showing 4 changed files with 54 additions and 54 deletions Side-by-side Diff

arch/h8300/include/asm/gpio-internal.h
  1 +#ifndef _H8300_GPIO_H
  2 +#define _H8300_GPIO_H
  3 +
  4 +#define H8300_GPIO_P1 0
  5 +#define H8300_GPIO_P2 1
  6 +#define H8300_GPIO_P3 2
  7 +#define H8300_GPIO_P4 3
  8 +#define H8300_GPIO_P5 4
  9 +#define H8300_GPIO_P6 5
  10 +#define H8300_GPIO_P7 6
  11 +#define H8300_GPIO_P8 7
  12 +#define H8300_GPIO_P9 8
  13 +#define H8300_GPIO_PA 9
  14 +#define H8300_GPIO_PB 10
  15 +#define H8300_GPIO_PC 11
  16 +#define H8300_GPIO_PD 12
  17 +#define H8300_GPIO_PE 13
  18 +#define H8300_GPIO_PF 14
  19 +#define H8300_GPIO_PG 15
  20 +#define H8300_GPIO_PH 16
  21 +
  22 +#define H8300_GPIO_B7 0x80
  23 +#define H8300_GPIO_B6 0x40
  24 +#define H8300_GPIO_B5 0x20
  25 +#define H8300_GPIO_B4 0x10
  26 +#define H8300_GPIO_B3 0x08
  27 +#define H8300_GPIO_B2 0x04
  28 +#define H8300_GPIO_B1 0x02
  29 +#define H8300_GPIO_B0 0x01
  30 +
  31 +#define H8300_GPIO_INPUT 0
  32 +#define H8300_GPIO_OUTPUT 1
  33 +
  34 +#define H8300_GPIO_RESERVE(port, bits) \
  35 + h8300_reserved_gpio(port, bits)
  36 +
  37 +#define H8300_GPIO_FREE(port, bits) \
  38 + h8300_free_gpio(port, bits)
  39 +
  40 +#define H8300_GPIO_DDR(port, bit, dir) \
  41 + h8300_set_gpio_dir(((port) << 8) | (bit), dir)
  42 +
  43 +#define H8300_GPIO_GETDIR(port, bit) \
  44 + h8300_get_gpio_dir(((port) << 8) | (bit))
  45 +
  46 +extern int h8300_reserved_gpio(int port, int bits);
  47 +extern int h8300_free_gpio(int port, int bits);
  48 +extern int h8300_set_gpio_dir(int port_bit, int dir);
  49 +extern int h8300_get_gpio_dir(int port_bit);
  50 +extern int h8300_init_gpio(void);
  51 +
  52 +#endif
arch/h8300/include/asm/gpio.h
1   -#ifndef _H8300_GPIO_H
2   -#define _H8300_GPIO_H
3   -
4   -#define H8300_GPIO_P1 0
5   -#define H8300_GPIO_P2 1
6   -#define H8300_GPIO_P3 2
7   -#define H8300_GPIO_P4 3
8   -#define H8300_GPIO_P5 4
9   -#define H8300_GPIO_P6 5
10   -#define H8300_GPIO_P7 6
11   -#define H8300_GPIO_P8 7
12   -#define H8300_GPIO_P9 8
13   -#define H8300_GPIO_PA 9
14   -#define H8300_GPIO_PB 10
15   -#define H8300_GPIO_PC 11
16   -#define H8300_GPIO_PD 12
17   -#define H8300_GPIO_PE 13
18   -#define H8300_GPIO_PF 14
19   -#define H8300_GPIO_PG 15
20   -#define H8300_GPIO_PH 16
21   -
22   -#define H8300_GPIO_B7 0x80
23   -#define H8300_GPIO_B6 0x40
24   -#define H8300_GPIO_B5 0x20
25   -#define H8300_GPIO_B4 0x10
26   -#define H8300_GPIO_B3 0x08
27   -#define H8300_GPIO_B2 0x04
28   -#define H8300_GPIO_B1 0x02
29   -#define H8300_GPIO_B0 0x01
30   -
31   -#define H8300_GPIO_INPUT 0
32   -#define H8300_GPIO_OUTPUT 1
33   -
34   -#define H8300_GPIO_RESERVE(port, bits) \
35   - h8300_reserved_gpio(port, bits)
36   -
37   -#define H8300_GPIO_FREE(port, bits) \
38   - h8300_free_gpio(port, bits)
39   -
40   -#define H8300_GPIO_DDR(port, bit, dir) \
41   - h8300_set_gpio_dir(((port) << 8) | (bit), dir)
42   -
43   -#define H8300_GPIO_GETDIR(port, bit) \
44   - h8300_get_gpio_dir(((port) << 8) | (bit))
45   -
46   -extern int h8300_reserved_gpio(int port, int bits);
47   -extern int h8300_free_gpio(int port, int bits);
48   -extern int h8300_set_gpio_dir(int port_bit, int dir);
49   -extern int h8300_get_gpio_dir(int port_bit);
50   -extern int h8300_init_gpio(void);
51   -
52   -#endif
arch/h8300/platform/h8300h/irq.c
... ... @@ -11,7 +11,7 @@
11 11 #include <asm/traps.h>
12 12 #include <asm/irq.h>
13 13 #include <asm/io.h>
14   -#include <asm/gpio.h>
  14 +#include <asm/gpio-internal.h>
15 15 #include <asm/regs306x.h>
16 16  
17 17 const int __initdata h8300_saved_vectors[] = {
arch/h8300/platform/h8s/irq.c
... ... @@ -14,7 +14,7 @@
14 14 #include <asm/traps.h>
15 15 #include <asm/irq.h>
16 16 #include <asm/io.h>
17   -#include <asm/gpio.h>
  17 +#include <asm/gpio-internal.h>
18 18 #include <asm/regs267x.h>
19 19  
20 20 /* saved vector list */