mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 05:31:32 +00:00
blackfin: Move machine specific gpio_port_t structure back to blackfin arch folder.
The gpio register mappings are different among blackfin processors. Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
This commit is contained in:
parent
84682854b6
commit
cae4d0403c
4 changed files with 21 additions and 18 deletions
|
@ -18,7 +18,7 @@ CEXTRA := initcode.o
|
||||||
SEXTRA := start.o
|
SEXTRA := start.o
|
||||||
SOBJS := interrupt.o cache.o
|
SOBJS := interrupt.o cache.o
|
||||||
COBJS-y += cpu.o
|
COBJS-y += cpu.o
|
||||||
COBJS-$(CONFIG_ADI_GPIO1) += gpio.o
|
COBJS-y += gpio.o
|
||||||
COBJS-y += interrupts.o
|
COBJS-y += interrupts.o
|
||||||
COBJS-$(CONFIG_JTAG_CONSOLE) += jtag-console.o
|
COBJS-$(CONFIG_JTAG_CONSOLE) += jtag-console.o
|
||||||
COBJS-y += os_log.o
|
COBJS-y += os_log.o
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include <asm/gpio.h>
|
#include <asm/gpio.h>
|
||||||
#include <asm/portmux.h>
|
#include <asm/portmux.h>
|
||||||
|
|
||||||
|
#ifdef CONFIG_ADI_GPIO1
|
||||||
#if ANOMALY_05000311 || ANOMALY_05000323
|
#if ANOMALY_05000311 || ANOMALY_05000323
|
||||||
enum {
|
enum {
|
||||||
AWA_data = SYSCR,
|
AWA_data = SYSCR,
|
||||||
|
@ -774,3 +775,19 @@ void gpio_labels(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
struct gpio_port_t * const gpio_array[] = {
|
||||||
|
(struct gpio_port_t *)PORTA_FER,
|
||||||
|
(struct gpio_port_t *)PORTB_FER,
|
||||||
|
(struct gpio_port_t *)PORTC_FER,
|
||||||
|
(struct gpio_port_t *)PORTD_FER,
|
||||||
|
(struct gpio_port_t *)PORTE_FER,
|
||||||
|
(struct gpio_port_t *)PORTF_FER,
|
||||||
|
(struct gpio_port_t *)PORTG_FER,
|
||||||
|
#if defined(CONFIG_BF54x)
|
||||||
|
(struct gpio_port_t *)PORTH_FER,
|
||||||
|
(struct gpio_port_t *)PORTI_FER,
|
||||||
|
(struct gpio_port_t *)PORTJ_FER,
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#define __ARCH_BLACKFIN_GPIO_H__
|
#define __ARCH_BLACKFIN_GPIO_H__
|
||||||
|
|
||||||
#include <asm-generic/gpio.h>
|
#include <asm-generic/gpio.h>
|
||||||
|
#include <asm/portmux.h>
|
||||||
|
|
||||||
#define gpio_bank(x) ((x) >> 4)
|
#define gpio_bank(x) ((x) >> 4)
|
||||||
#define gpio_bit(x) (1<<((x) & 0xF))
|
#define gpio_bit(x) (1<<((x) & 0xF))
|
||||||
|
@ -141,6 +142,8 @@ struct gpio_port_t {
|
||||||
unsigned short dummy16;
|
unsigned short dummy16;
|
||||||
unsigned short inen;
|
unsigned short inen;
|
||||||
};
|
};
|
||||||
|
#else
|
||||||
|
extern struct gpio_port_t * const gpio_array[];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ADI_SPECIAL_GPIO_BANKS
|
#ifdef ADI_SPECIAL_GPIO_BANKS
|
||||||
|
|
|
@ -10,22 +10,6 @@
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <asm/errno.h>
|
#include <asm/errno.h>
|
||||||
#include <asm/gpio.h>
|
#include <asm/gpio.h>
|
||||||
#include <asm/portmux.h>
|
|
||||||
|
|
||||||
static struct gpio_port_t * const gpio_array[] = {
|
|
||||||
(struct gpio_port_t *)PORTA_FER,
|
|
||||||
(struct gpio_port_t *)PORTB_FER,
|
|
||||||
(struct gpio_port_t *)PORTC_FER,
|
|
||||||
(struct gpio_port_t *)PORTD_FER,
|
|
||||||
(struct gpio_port_t *)PORTE_FER,
|
|
||||||
(struct gpio_port_t *)PORTF_FER,
|
|
||||||
(struct gpio_port_t *)PORTG_FER,
|
|
||||||
#if defined(CONFIG_BF54x)
|
|
||||||
(struct gpio_port_t *)PORTH_FER,
|
|
||||||
(struct gpio_port_t *)PORTI_FER,
|
|
||||||
(struct gpio_port_t *)PORTJ_FER,
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
#define RESOURCE_LABEL_SIZE 16
|
#define RESOURCE_LABEL_SIZE 16
|
||||||
|
|
||||||
|
@ -98,7 +82,6 @@ static void port_setup(unsigned gpio, unsigned short usage)
|
||||||
else
|
else
|
||||||
gpio_array[gpio_bank(gpio)]->port_fer_set = gpio_bit(gpio);
|
gpio_array[gpio_bank(gpio)]->port_fer_set = gpio_bit(gpio);
|
||||||
#endif
|
#endif
|
||||||
SSYNC();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void portmux_setup(unsigned short per)
|
inline void portmux_setup(unsigned short per)
|
||||||
|
|
Loading…
Add table
Reference in a new issue