From 438ff3f3cc33833206a48492e9d6674e4e82bed8 Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Mon, 29 Oct 2007 15:28:07 +0100 Subject: [AVR32] Add support for AT32AP7001 and AT32AP7002 These are derivatives of the AT32AP7000 chip, which means that most of the code stays the same. Rename a few files, functions, definitions and config symbols to reflect that they apply to all AP700x chips, and exclude some platform devices from chips where they aren't present. Signed-off-by: Haavard Skinnemoen --- include/asm-avr32/arch-at32ap/at32ap7000.h | 35 ------------------------------ include/asm-avr32/arch-at32ap/at32ap700x.h | 35 ++++++++++++++++++++++++++++++ include/asm-avr32/arch-at32ap/cpu.h | 2 +- include/asm-avr32/arch-at32ap/io.h | 4 ++-- 4 files changed, 38 insertions(+), 38 deletions(-) delete mode 100644 include/asm-avr32/arch-at32ap/at32ap7000.h create mode 100644 include/asm-avr32/arch-at32ap/at32ap700x.h (limited to 'include/asm-avr32/arch-at32ap') diff --git a/include/asm-avr32/arch-at32ap/at32ap7000.h b/include/asm-avr32/arch-at32ap/at32ap7000.h deleted file mode 100644 index 3914d7b94ff4..000000000000 --- a/include/asm-avr32/arch-at32ap/at32ap7000.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Pin definitions for AT32AP7000. - * - * Copyright (C) 2006 Atmel Corporation - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#ifndef __ASM_ARCH_AT32AP7000_H__ -#define __ASM_ARCH_AT32AP7000_H__ - -#define GPIO_PERIPH_A 0 -#define GPIO_PERIPH_B 1 - -#define NR_GPIO_CONTROLLERS 4 - -/* - * Pin numbers identifying specific GPIO pins on the chip. They can - * also be converted to IRQ numbers by passing them through - * gpio_to_irq(). - */ -#define GPIO_PIOA_BASE (0) -#define GPIO_PIOB_BASE (GPIO_PIOA_BASE + 32) -#define GPIO_PIOC_BASE (GPIO_PIOB_BASE + 32) -#define GPIO_PIOD_BASE (GPIO_PIOC_BASE + 32) -#define GPIO_PIOE_BASE (GPIO_PIOD_BASE + 32) - -#define GPIO_PIN_PA(N) (GPIO_PIOA_BASE + (N)) -#define GPIO_PIN_PB(N) (GPIO_PIOB_BASE + (N)) -#define GPIO_PIN_PC(N) (GPIO_PIOC_BASE + (N)) -#define GPIO_PIN_PD(N) (GPIO_PIOD_BASE + (N)) -#define GPIO_PIN_PE(N) (GPIO_PIOE_BASE + (N)) - -#endif /* __ASM_ARCH_AT32AP7000_H__ */ diff --git a/include/asm-avr32/arch-at32ap/at32ap700x.h b/include/asm-avr32/arch-at32ap/at32ap700x.h new file mode 100644 index 000000000000..99684d6f3967 --- /dev/null +++ b/include/asm-avr32/arch-at32ap/at32ap700x.h @@ -0,0 +1,35 @@ +/* + * Pin definitions for AT32AP7000. + * + * Copyright (C) 2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef __ASM_ARCH_AT32AP700X_H__ +#define __ASM_ARCH_AT32AP700X_H__ + +#define GPIO_PERIPH_A 0 +#define GPIO_PERIPH_B 1 + +#define NR_GPIO_CONTROLLERS 4 + +/* + * Pin numbers identifying specific GPIO pins on the chip. They can + * also be converted to IRQ numbers by passing them through + * gpio_to_irq(). + */ +#define GPIO_PIOA_BASE (0) +#define GPIO_PIOB_BASE (GPIO_PIOA_BASE + 32) +#define GPIO_PIOC_BASE (GPIO_PIOB_BASE + 32) +#define GPIO_PIOD_BASE (GPIO_PIOC_BASE + 32) +#define GPIO_PIOE_BASE (GPIO_PIOD_BASE + 32) + +#define GPIO_PIN_PA(N) (GPIO_PIOA_BASE + (N)) +#define GPIO_PIN_PB(N) (GPIO_PIOB_BASE + (N)) +#define GPIO_PIN_PC(N) (GPIO_PIOC_BASE + (N)) +#define GPIO_PIN_PD(N) (GPIO_PIOD_BASE + (N)) +#define GPIO_PIN_PE(N) (GPIO_PIOE_BASE + (N)) + +#endif /* __ASM_ARCH_AT32AP700X_H__ */ diff --git a/include/asm-avr32/arch-at32ap/cpu.h b/include/asm-avr32/arch-at32ap/cpu.h index a762f42cbb71..0dc20261c1ea 100644 --- a/include/asm-avr32/arch-at32ap/cpu.h +++ b/include/asm-avr32/arch-at32ap/cpu.h @@ -14,7 +14,7 @@ * Only AT32AP7000 is defined for now. We can identify the specific * chip at runtime, but I'm not sure if it's really worth it. */ -#ifdef CONFIG_CPU_AT32AP7000 +#ifdef CONFIG_CPU_AT32AP700X # define cpu_is_at32ap7000() (1) #else # define cpu_is_at32ap7000() (0) diff --git a/include/asm-avr32/arch-at32ap/io.h b/include/asm-avr32/arch-at32ap/io.h index ee59e401f041..4ec6abc68ea3 100644 --- a/include/asm-avr32/arch-at32ap/io.h +++ b/include/asm-avr32/arch-at32ap/io.h @@ -4,7 +4,7 @@ /* For "bizarre" halfword swapping */ #include -#if defined(CONFIG_AP7000_32_BIT_SMC) +#if defined(CONFIG_AP700X_32_BIT_SMC) # define __swizzle_addr_b(addr) (addr ^ 3UL) # define __swizzle_addr_w(addr) (addr ^ 2UL) # define __swizzle_addr_l(addr) (addr) @@ -14,7 +14,7 @@ # define __mem_ioswabb(a, x) (x) # define __mem_ioswabw(a, x) swab16(x) # define __mem_ioswabl(a, x) swab32(x) -#elif defined(CONFIG_AP7000_16_BIT_SMC) +#elif defined(CONFIG_AP700X_16_BIT_SMC) # define __swizzle_addr_b(addr) (addr ^ 1UL) # define __swizzle_addr_w(addr) (addr) # define __swizzle_addr_l(addr) (addr) -- cgit v1.2.1