- fixup address definitions as done in at91
 - fixup required files in arch/avr32

Signed-off-by: Andreas Bießmann <biessm...@corscience.de>
---
 arch/avr32/cpu/at32ap700x/clk.c                    |    2 +-
 arch/avr32/cpu/at32ap700x/portmux.c                |    2 +-
 arch/avr32/cpu/at32ap700x/sm.h                     |    4 +-
 arch/avr32/cpu/cpu.c                               |    2 +-
 arch/avr32/cpu/hsdramc.c                           |    2 +-
 arch/avr32/cpu/hsdramc1.h                          |    4 +-
 arch/avr32/cpu/hsmc3.h                             |    4 +-
 arch/avr32/cpu/interrupts.c                        |    4 +-
 arch/avr32/cpu/portmux-gpio.c                      |    2 +-
 arch/avr32/cpu/portmux-pio.c                       |    2 +-
 arch/avr32/include/asm/arch-at32ap700x/gpio.h      |   12 ++--
 arch/avr32/include/asm/arch-at32ap700x/hardware.h  |   86 ++++++++++++++++++++
 .../avr32/include/asm/arch-at32ap700x/memory-map.h |   86 --------------------
 arch/avr32/include/asm/arch-at32ap700x/portmux.h   |   10 +-
 arch/avr32/include/asm/hmatrix-common.h            |    2 +-
 15 files changed, 112 insertions(+), 112 deletions(-)
 create mode 100644 arch/avr32/include/asm/arch-at32ap700x/hardware.h
 delete mode 100644 arch/avr32/include/asm/arch-at32ap700x/memory-map.h

diff --git a/arch/avr32/cpu/at32ap700x/clk.c b/arch/avr32/cpu/at32ap700x/clk.c
index 742bc6b..b63b9df 100644
--- a/arch/avr32/cpu/at32ap700x/clk.c
+++ b/arch/avr32/cpu/at32ap700x/clk.c
@@ -24,7 +24,7 @@
 #include <asm/io.h>
 
 #include <asm/arch/clk.h>
-#include <asm/arch/memory-map.h>
+#include <asm/arch/hardware.h>
 #include <asm/arch/portmux.h>
 
 #include "sm.h"
diff --git a/arch/avr32/cpu/at32ap700x/portmux.c 
b/arch/avr32/cpu/at32ap700x/portmux.c
index b1f2c6f..e3e38a2 100644
--- a/arch/avr32/cpu/at32ap700x/portmux.c
+++ b/arch/avr32/cpu/at32ap700x/portmux.c
@@ -24,7 +24,7 @@
 #include <asm/io.h>
 
 #include <asm/arch/chip-features.h>
-#include <asm/arch/memory-map.h>
+#include <asm/arch/hardware.h>
 #include <asm/arch/portmux.h>
 
 /*
diff --git a/arch/avr32/cpu/at32ap700x/sm.h b/arch/avr32/cpu/at32ap700x/sm.h
index b6e4409..9a3804e 100644
--- a/arch/avr32/cpu/at32ap700x/sm.h
+++ b/arch/avr32/cpu/at32ap700x/sm.h
@@ -197,8 +197,8 @@
 
 /* Register access macros */
 #define sm_readl(reg)                                  \
-       readl((void *)SM_BASE + SM_##reg)
+       readl((void *)ATMEL_BASE_SM + SM_##reg)
 #define sm_writel(reg,value)                           \
-       writel((value), (void *)SM_BASE + SM_##reg)
+       writel((value), (void *)ATMEL_BASE_SM + SM_##reg)
 
 #endif /* __CPU_AT32AP_SM_H__ */
diff --git a/arch/avr32/cpu/cpu.c b/arch/avr32/cpu/cpu.c
index e4489bb..7907837 100644
--- a/arch/avr32/cpu/cpu.c
+++ b/arch/avr32/cpu/cpu.c
@@ -27,7 +27,7 @@
 #include <asm/sysreg.h>
 
 #include <asm/arch/clk.h>
-#include <asm/arch/memory-map.h>
+#include <asm/arch/hardware.h>
 
 #include "hsmc3.h"
 
diff --git a/arch/avr32/cpu/hsdramc.c b/arch/avr32/cpu/hsdramc.c
index b6eae66..1485494 100644
--- a/arch/avr32/cpu/hsdramc.c
+++ b/arch/avr32/cpu/hsdramc.c
@@ -25,7 +25,7 @@
 #include <asm/sdram.h>
 
 #include <asm/arch/clk.h>
-#include <asm/arch/memory-map.h>
+#include <asm/arch/hardware.h>
 
 #include "hsdramc1.h"
 
diff --git a/arch/avr32/cpu/hsdramc1.h b/arch/avr32/cpu/hsdramc1.h
index 305d2cb..e18e074 100644
--- a/arch/avr32/cpu/hsdramc1.h
+++ b/arch/avr32/cpu/hsdramc1.h
@@ -136,8 +136,8 @@
 
 /* Register access macros */
 #define hsdramc1_readl(reg)                                    \
-       readl((void *)HSDRAMC_BASE + HSDRAMC1_##reg)
+       readl((void *)ATMEL_BASE_HSDRAMC + HSDRAMC1_##reg)
 #define hsdramc1_writel(reg,value)                             \
-       writel((value), (void *)HSDRAMC_BASE + HSDRAMC1_##reg)
+       writel((value), (void *)ATMEL_BASE_HSDRAMC + HSDRAMC1_##reg)
 
 #endif /* __ASM_AVR32_HSDRAMC1_H__ */
diff --git a/arch/avr32/cpu/hsmc3.h b/arch/avr32/cpu/hsmc3.h
index ca533b9..ac47295 100644
--- a/arch/avr32/cpu/hsmc3.h
+++ b/arch/avr32/cpu/hsmc3.h
@@ -119,8 +119,8 @@
 
 /* Register access macros */
 #define hsmc3_readl(reg)                                       \
-       readl((void *)HSMC_BASE + HSMC3_##reg)
+       readl((void *)ATMEL_BASE_HSMC + HSMC3_##reg)
 #define hsmc3_writel(reg,value)                                        \
-       writel((value), (void *)HSMC_BASE + HSMC3_##reg)
+       writel((value), (void *)ATMEL_BASE_HSMC + HSMC3_##reg)
 
 #endif /* __CPU_AT32AP_HSMC3_H__ */
diff --git a/arch/avr32/cpu/interrupts.c b/arch/avr32/cpu/interrupts.c
index c6d8d16..c6ea435 100644
--- a/arch/avr32/cpu/interrupts.c
+++ b/arch/avr32/cpu/interrupts.c
@@ -27,7 +27,7 @@
 #include <asm/processor.h>
 #include <asm/sysreg.h>
 
-#include <asm/arch/memory-map.h>
+#include <asm/arch/hardware.h>
 
 #define HANDLER_MASK   0x00ffffff
 #define INTLEV_SHIFT   30
@@ -125,7 +125,7 @@ static int set_interrupt_handler(unsigned int nr, void 
(*handler)(void),
 
        intpr = (handler_addr & HANDLER_MASK);
        intpr |= (priority & INTLEV_MASK) << INTLEV_SHIFT;
-       writel(intpr, (void *)INTC_BASE + 4 * nr);
+       writel(intpr, (void *)ATMEL_BASE_INTC + 4 * nr);
 
        return 0;
 }
diff --git a/arch/avr32/cpu/portmux-gpio.c b/arch/avr32/cpu/portmux-gpio.c
index 9acd040..7b64c89 100644
--- a/arch/avr32/cpu/portmux-gpio.c
+++ b/arch/avr32/cpu/portmux-gpio.c
@@ -22,7 +22,7 @@
 #include <common.h>
 
 #include <asm/io.h>
-#include <asm/arch/memory-map.h>
+#include <asm/arch/hardware.h>
 #include <asm/arch/gpio.h>
 
 void portmux_select_peripheral(void *port, unsigned long pin_mask,
diff --git a/arch/avr32/cpu/portmux-pio.c b/arch/avr32/cpu/portmux-pio.c
index a29f94e..cb5e962 100644
--- a/arch/avr32/cpu/portmux-pio.c
+++ b/arch/avr32/cpu/portmux-pio.c
@@ -22,7 +22,7 @@
 #include <common.h>
 
 #include <asm/io.h>
-#include <asm/arch/memory-map.h>
+#include <asm/arch/hardware.h>
 #include <asm/arch/gpio.h>
 
 void portmux_select_peripheral(void *port, unsigned long pin_mask,
diff --git a/arch/avr32/include/asm/arch-at32ap700x/gpio.h 
b/arch/avr32/include/asm/arch-at32ap700x/gpio.h
index 303e353..4322eac 100644
--- a/arch/avr32/include/asm/arch-at32ap700x/gpio.h
+++ b/arch/avr32/include/asm/arch-at32ap700x/gpio.h
@@ -23,7 +23,7 @@
 #define __ASM_AVR32_ARCH_GPIO_H__
 
 #include <asm/arch/chip-features.h>
-#include <asm/arch/memory-map.h>
+#include <asm/arch/hardware.h>
 
 #define NR_GPIO_CONTROLLERS    5
 
@@ -45,15 +45,15 @@ static inline void *pio_pin_to_port(unsigned int pin)
 {
        switch (pin >> 5) {
        case 0:
-               return (void *)PIOA_BASE;
+               return (void *)ATMEL_BASE_PIOA;
        case 1:
-               return (void *)PIOB_BASE;
+               return (void *)ATMEL_BASE_PIOB;
        case 2:
-               return (void *)PIOC_BASE;
+               return (void *)ATMEL_BASE_PIOC;
        case 3:
-               return (void *)PIOD_BASE;
+               return (void *)ATMEL_BASE_PIOD;
        case 4:
-               return (void *)PIOE_BASE;
+               return (void *)ATMEL_BASE_PIOE;
        default:
                return NULL;
        }
diff --git a/arch/avr32/include/asm/arch-at32ap700x/hardware.h 
b/arch/avr32/include/asm/arch-at32ap700x/hardware.h
new file mode 100644
index 0000000..9172eef
--- /dev/null
+++ b/arch/avr32/include/asm/arch-at32ap700x/hardware.h
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2005-2006 Atmel Corporation
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+#ifndef __AT32AP7000_HARDWARE_H__
+#define __AT32AP7000_HARDWARE_H__
+
+/* Internal and external memories */
+#define EBI_SRAM_CS0_BASE                      0x00000000
+#define EBI_SRAM_CS0_SIZE                      0x04000000
+#define EBI_SRAM_CS4_BASE                      0x04000000
+#define EBI_SRAM_CS4_SIZE                      0x04000000
+#define EBI_SRAM_CS2_BASE                      0x08000000
+#define EBI_SRAM_CS2_SIZE                      0x04000000
+#define EBI_SRAM_CS3_BASE                      0x0c000000
+#define EBI_SRAM_CS3_SIZE                      0x04000000
+#define EBI_SRAM_CS1_BASE                      0x10000000
+#define EBI_SRAM_CS1_SIZE                      0x10000000
+#define EBI_SRAM_CS5_BASE                      0x20000000
+#define EBI_SRAM_CS5_SIZE                      0x04000000
+
+#define EBI_SDRAM_BASE                         EBI_SRAM_CS1_BASE
+#define EBI_SDRAM_SIZE                         EBI_SRAM_CS1_SIZE
+
+#define INTERNAL_SRAM_BASE                     0x24000000
+#define INTERNAL_SRAM_SIZE                     0x00008000
+
+/* Devices on the High Speed Bus (HSB) */
+#define LCDC_BASE                                      0xFF000000
+#define DMAC_BASE                                      0xFF200000
+#define USB_FIFO                                       0xFF300000
+
+/* Devices on Peripheral Bus A (PBA) */
+#define ATMEL_BASE_SPI0                                0xFFE00000
+#define ATMEL_BASE_SPI1                                0xFFE00400
+#define ATMEL_BASE_TWI0                                0xFFE00800
+#define ATMEL_BASE_USART0                      0xFFE00C00
+#define ATMEL_BASE_USART1                      0xFFE01000
+#define ATMEL_BASE_USART2                      0xFFE01400
+#define ATMEL_BASE_USART3                      0xFFE01800
+#define ATMEL_BASE_SSC0                                0xFFE01C00
+#define ATMEL_BASE_SSC1                                0xFFE02000
+#define ATMEL_BASE_SSC2                                0xFFE02400
+#define ATMEL_BASE_PIOA                                0xFFE02800
+#define ATMEL_BASE_PIOB                                0xFFE02C00
+#define ATMEL_BASE_PIOC                                0xFFE03000
+#define ATMEL_BASE_PIOD                                0xFFE03400
+#define ATMEL_BASE_PIOE                                0xFFE03800
+#define ATMEL_BASE_PSIF                                0xFFE03C00
+
+/* Devices on Peripheral Bus B (PBB) */
+#define ATMEL_BASE_SM                          0xFFF00000
+#define ATMEL_BASE_INTC                                0xFFF00400
+#define ATMEL_BASE_HMATRIX                     0xFFF00800
+#define ATMEL_BASE_TIMER0                      0xFFF00C00
+#define ATMEL_BASE_TIMER1                      0xFFF01000
+#define ATMEL_BASE_PWM                         0xFFF01400
+#define ATMEL_BASE_MACB0                       0xFFF01800
+#define ATMEL_BASE_MACB1                       0xFFF01C00
+#define ATMEL_BASE_DAC                         0xFFF02000
+#define ATMEL_BASE_MMCI                                0xFFF02400
+#define ATMEL_BASE_AUDIOC                      0xFFF02800
+#define ATMEL_BASE_HISI                                0xFFF02C00
+#define ATMEL_BASE_USB                         0xFFF03000
+#define ATMEL_BASE_HSMC                                0xFFF03400
+#define ATMEL_BASE_HSDRAMC                     0xFFF03800
+#define ATMEL_BASE_ECC                         0xFFF03C00
+
+#endif /* __AT32AP7000_HARDWARE_H__ */
diff --git a/arch/avr32/include/asm/arch-at32ap700x/memory-map.h 
b/arch/avr32/include/asm/arch-at32ap700x/memory-map.h
deleted file mode 100644
index 6592c03..0000000
--- a/arch/avr32/include/asm/arch-at32ap700x/memory-map.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2005-2006 Atmel Corporation
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-#ifndef __AT32AP7000_MEMORY_MAP_H__
-#define __AT32AP7000_MEMORY_MAP_H__
-
-/* Internal and external memories */
-#define EBI_SRAM_CS0_BASE                      0x00000000
-#define EBI_SRAM_CS0_SIZE                      0x04000000
-#define EBI_SRAM_CS4_BASE                      0x04000000
-#define EBI_SRAM_CS4_SIZE                      0x04000000
-#define EBI_SRAM_CS2_BASE                      0x08000000
-#define EBI_SRAM_CS2_SIZE                      0x04000000
-#define EBI_SRAM_CS3_BASE                      0x0c000000
-#define EBI_SRAM_CS3_SIZE                      0x04000000
-#define EBI_SRAM_CS1_BASE                      0x10000000
-#define EBI_SRAM_CS1_SIZE                      0x10000000
-#define EBI_SRAM_CS5_BASE                      0x20000000
-#define EBI_SRAM_CS5_SIZE                      0x04000000
-
-#define EBI_SDRAM_BASE                         EBI_SRAM_CS1_BASE
-#define EBI_SDRAM_SIZE                         EBI_SRAM_CS1_SIZE
-
-#define INTERNAL_SRAM_BASE                     0x24000000
-#define INTERNAL_SRAM_SIZE                     0x00008000
-
-/* Devices on the High Speed Bus (HSB) */
-#define LCDC_BASE                              0xFF000000
-#define DMAC_BASE                              0xFF200000
-#define USB_FIFO                               0xFF300000
-
-/* Devices on Peripheral Bus A (PBA) */
-#define SPI0_BASE                              0xFFE00000
-#define SPI1_BASE                              0xFFE00400
-#define TWI_BASE                               0xFFE00800
-#define USART0_BASE                            0xFFE00C00
-#define USART1_BASE                            0xFFE01000
-#define USART2_BASE                            0xFFE01400
-#define USART3_BASE                            0xFFE01800
-#define SSC0_BASE                              0xFFE01C00
-#define SSC1_BASE                              0xFFE02000
-#define SSC2_BASE                              0xFFE02400
-#define PIOA_BASE                              0xFFE02800
-#define PIOB_BASE                              0xFFE02C00
-#define PIOC_BASE                              0xFFE03000
-#define PIOD_BASE                              0xFFE03400
-#define PIOE_BASE                              0xFFE03800
-#define PSIF_BASE                              0xFFE03C00
-
-/* Devices on Peripheral Bus B (PBB) */
-#define SM_BASE                                        0xFFF00000
-#define INTC_BASE                              0xFFF00400
-#define HMATRIX_BASE                           0xFFF00800
-#define TIMER0_BASE                            0xFFF00C00
-#define TIMER1_BASE                            0xFFF01000
-#define PWM_BASE                               0xFFF01400
-#define MACB0_BASE                             0xFFF01800
-#define MACB1_BASE                             0xFFF01C00
-#define DAC_BASE                               0xFFF02000
-#define MMCI_BASE                              0xFFF02400
-#define AUDIOC_BASE                            0xFFF02800
-#define HISI_BASE                              0xFFF02C00
-#define USB_BASE                               0xFFF03000
-#define HSMC_BASE                              0xFFF03400
-#define HSDRAMC_BASE                           0xFFF03800
-#define ECC_BASE                               0xFFF03C00
-
-#endif /* __AT32AP7000_MEMORY_MAP_H__ */
diff --git a/arch/avr32/include/asm/arch-at32ap700x/portmux.h 
b/arch/avr32/include/asm/arch-at32ap700x/portmux.h
index 1ba52e5..859c121 100644
--- a/arch/avr32/include/asm/arch-at32ap700x/portmux.h
+++ b/arch/avr32/include/asm/arch-at32ap700x/portmux.h
@@ -24,11 +24,11 @@
 
 #include <asm/arch/gpio.h>
 
-#define PORTMUX_PORT_A         ((void *)PIOA_BASE)
-#define PORTMUX_PORT_B         ((void *)PIOB_BASE)
-#define PORTMUX_PORT_C         ((void *)PIOC_BASE)
-#define PORTMUX_PORT_D         ((void *)PIOD_BASE)
-#define PORTMUX_PORT_E         ((void *)PIOE_BASE)
+#define PORTMUX_PORT_A         ((void *)ATMEL_BASE_PIOA)
+#define PORTMUX_PORT_B         ((void *)ATMEL_BASE_PIOB)
+#define PORTMUX_PORT_C         ((void *)ATMEL_BASE_PIOC)
+#define PORTMUX_PORT_D         ((void *)ATMEL_BASE_PIOD)
+#define PORTMUX_PORT_E         ((void *)ATMEL_BASE_PIOE)
 
 void portmux_enable_ebi(unsigned int bus_width, unsigned int addr_width,
                unsigned long flags, unsigned long drive_strength);
diff --git a/arch/avr32/include/asm/hmatrix-common.h 
b/arch/avr32/include/asm/hmatrix-common.h
index 4b7e610..9a86fe4 100644
--- a/arch/avr32/include/asm/hmatrix-common.h
+++ b/arch/avr32/include/asm/hmatrix-common.h
@@ -117,7 +117,7 @@ struct hmatrix_regs {
 
 /* Register access macros */
 #define __hmatrix_reg(reg)                                     \
-       (((volatile struct hmatrix_regs *)HMATRIX_BASE)->reg)
+       (((volatile struct hmatrix_regs *)ATMEL_BASE_HMATRIX)->reg)
 #define hmatrix_read(reg)                                      \
        (__hmatrix_reg(reg))
 #define hmatrix_write(reg, value)                              \
-- 
1.7.2.3

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to