add at91 SoC access with c structures
PATCH v2 3/3 add at91 SoC access with c structures
* insert AT91 SoC access using c-stuctures
Signed-off-by Jens Scharsig <[email protected]>
---
include/asm-arm/arch-at91/at91sam9g45.h +15 -0
@@ -51,6 +51,19 @@#define AT91SAM9G45_ID_VDEC 30/* Video Decoder */ #define AT91SAM9G45_ID_IRQ0 31/* Advanced Interrupt Controller */ +#define AT91_EMAC_BASE 0xfffbc000 +#define AT91_SMC_BASE 0xffffe800 +#define AT91_MATRIX_BASE 0xffffea00 + +#define AT91_PIO_BASE 0xfffff200 +#define AT91_PMC_BASE 0xfffffc00 +#define AT91_RSTC_BASE 0xfffffd00 + +#define AT91_PIT_BASE 0xfffffd30 +#define AT91_WDT_BASE 0xfffffd40 + +#ifdef CONFIG_AT91_LEGACY +/* * User Peripheral physical base addresses. */
@@ -114,6 +127,8 @@#define AT91_USART2 AT91SAM9G45_BASE_US2#define AT91_USART3 AT91SAM9G45_BASE_US3 +#endif +/* * Internal Memory. */
include/asm-arm/arch-at91/at91sam9rl.h +13 -1
@@ -44,6 +44,18 @@#define AT91SAM9RL_ID_AC97C 24/* AC97 Controller */ #define AT91SAM9RL_ID_IRQ0 31/* Advanced Interrupt Controller (IRQ0) */ +#define AT91_SDRAMC_BASE 0xffffea00 +#define AT91_SMC_BASE 0xffffec00 +#define AT91_MATRIX_BASE 0xffffee00 + +#define AT91_PIO_BASE 0xfffff400 +#define AT91_PMC_BASE 0xfffffc00 +#define AT91_RSTC_BASE 0xfffffd00 + +#define AT91_PIT_BASE 0xfffffd30 +#define AT91_WDT_BASE 0xfffffd40 + +#ifdef CONFIG_AT91_LEGACY /* * User Peripheral physical base addresses.
@@ -68,7 +80,6 @@#define AT91SAM9RL_BASE_AC97C 0xfffd8000#define AT91_BASE_SYS 0xffffc000 -/* * System Peripherals (offset from AT91_BASE_SYS) */
@@ -99,6 +110,7 @@#define AT91_USART2 AT91SAM9RL_BASE_US2#define AT91_USART3 AT91SAM9RL_BASE_US3 +#endif /* CONFIG_AT91_LEGACY */ /* * Internal Memory.
include/asm-arm/arch-at91/gpio.h +8 -148
179 lines not on this page · raw message
include/asm-arm/arch-at91/hardware.h +1 -1
@@ -17,7 +17,7 @@#include <asm/sizes.h> #if defined(CONFIG_AT91RM9200 ) -#include <asm/arch/at91rm9200.h> +#include <asm/arch-at91/at91rm9200.h> #elif defined(CONFIG_AT91SAM9260 ) || defined(CONFIG_AT91SAM9G20 )#include <asm/arch/at91sam9260.h> #define AT91_BASE_SPI AT91SAM9260_BASE_SPI0
include/asm-arm/arch-at91/io.h +3 -0
@@ -23,6 +23,8 @@#include <asm/io.h> +#ifdef CONFIG_AT91_LEGACY +static inline unsigned int at91_sys_read (unsigned int reg_offset) {void *addr = (void *)AT91_BASE_SYS ;
@@ -36,5 +38,6 @@ static inline void at91_sys_write(unsigned int reg_offset, unsigned long value)__raw_writel (value, addr + reg_offset); } +#endif #endif
include/i2c.h +5 -0
@@ -74,6 +74,11 @@# define I2C_SOFT_DECLARATIONS volatile ioport_t *iop = ioport_addr((immap_t *)CONFIG_SYS_IMMR, I2C_PORT);# elif defined(CONFIG_8xx)# define I2C_SOFT_DECLARATIONS volatile immap_t *immr = (immap_t *)CONFIG_SYS_IMMR; + +# elif (defined(CONFIG_AT91RM9200 ) || \ + defined(CONFIG_AT91SAM9260 ) || defined(CONFIG_AT91SAM9261 ) || \ + defined(CONFIG_AT91SAM9263 )) && !defined(CONFIG_AT91_LEGACY ) +# define I2C_SOFT_DECLARATIONS at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;# else # define I2C_SOFT_DECLARATIONS # endif
include/netdev.h +1 -0
@@ -42,6 +42,7 @@ int cpu_eth_init(bd_t *bis);/* Driver initialization prototypes */ int au1x00_enet_initialize (bd_t *); +int at91emac_register (bd_t *bis,unsigned long iobase);int bfin_EMAC_initialize (bd_t *bis);int cs8900_initialize (u8 dev_num,int base_addr);int dc21x4x_initialize (bd_t *bis);
Signature · 1 line
1.6.0.2