diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/blackfin/cpu/Makefile | 2 | ||||
-rw-r--r-- | arch/blackfin/cpu/cpu.c | 3 | ||||
-rw-r--r-- | arch/blackfin/cpu/gpio.c | 17 | ||||
-rw-r--r-- | arch/blackfin/include/asm/gpio.h | 3 |
4 files changed, 24 insertions, 1 deletions
diff --git a/arch/blackfin/cpu/Makefile b/arch/blackfin/cpu/Makefile index 9bf544d..243dc22 100644 --- a/arch/blackfin/cpu/Makefile +++ b/arch/blackfin/cpu/Makefile @@ -14,7 +14,7 @@ extra-y += initcode.o extra-y += start.o obj-y := interrupt.o cache.o obj-y += cpu.o -obj-$(CONFIG_ADI_GPIO1) += gpio.o +obj-y += gpio.o obj-y += interrupts.o obj-$(CONFIG_JTAG_CONSOLE) += jtag-console.o obj-y += os_log.o diff --git a/arch/blackfin/cpu/cpu.c b/arch/blackfin/cpu/cpu.c index 218f57e..2409c30 100644 --- a/arch/blackfin/cpu/cpu.c +++ b/arch/blackfin/cpu/cpu.c @@ -104,6 +104,9 @@ void cpu_init_f(ulong bootflag, ulong loaded_from_ldr) serial_early_puts("Board init flash\n"); board_init_f(bootflag); + + /* should not be reached */ + while (1); } int exception_init(void) diff --git a/arch/blackfin/cpu/gpio.c b/arch/blackfin/cpu/gpio.c index f9aff4d..5e9c68a 100644 --- a/arch/blackfin/cpu/gpio.c +++ b/arch/blackfin/cpu/gpio.c @@ -12,6 +12,7 @@ #include <asm/gpio.h> #include <asm/portmux.h> +#ifdef CONFIG_ADI_GPIO1 #if ANOMALY_05000311 || ANOMALY_05000323 enum { AWA_data = SYSCR, @@ -774,3 +775,19 @@ void gpio_labels(void) 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 diff --git a/arch/blackfin/include/asm/gpio.h b/arch/blackfin/include/asm/gpio.h index 58a6191..376ec02 100644 --- a/arch/blackfin/include/asm/gpio.h +++ b/arch/blackfin/include/asm/gpio.h @@ -8,6 +8,7 @@ #define __ARCH_BLACKFIN_GPIO_H__ #include <asm-generic/gpio.h> +#include <asm/portmux.h> #define gpio_bank(x) ((x) >> 4) #define gpio_bit(x) (1<<((x) & 0xF)) @@ -141,6 +142,8 @@ struct gpio_port_t { unsigned short dummy16; unsigned short inen; }; +#else +extern struct gpio_port_t * const gpio_array[]; #endif #ifdef ADI_SPECIAL_GPIO_BANKS |