Skip to contentSkip to conversation

add at91 SoC access with c structures

PATCH New Jens Scharsig 1 participant 1 message Dec 19, 2009 Arm/Microchip (AT91) SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 5/8 add at91 SoC access with c structures

* insert AT91 SoC access using c-stuctures

---
 board/atmel/at91sam9263ek/at91sam9263ek.c   |  146
+++++++++++++-------------
 board/atmel/at91sam9263ek/led.c             |    9 +-
 cpu/arm926ejs/at91/at91cap9_devices.c       |   88 ++++++++-------
 cpu/arm926ejs/at91/at91sam9261_devices.c    |   48 +++++----
 cpu/arm926ejs/at91/at91sam9263_devices.c    |  138 +++++++++++++-----------
 cpu/arm926ejs/at91/at91sam9m10g45_devices.c |   84 ++++++++-------
 cpu/arm926ejs/at91/at91sam9rl_devices.c     |   34 ++++---
 cpu/arm926ejs/at91/clock.c                  |   43 ++++----
 cpu/arm926ejs/at91/cpu.c                    |    4 +
 cpu/arm926ejs/at91/led.c                    |    7 ++
 cpu/arm926ejs/at91/lowlevel_init.S          |  113 +++++++++++---------
 cpu/arm926ejs/at91/reset.c                  |    8 +-
 cpu/arm926ejs/at91/timer.c                  |   16 ++-
 drivers/gpio/Makefile                       |    1 +
 drivers/i2c/soft_i2c.c                      |   11 +-
 drivers/net/Makefile                        |    1 +
 drivers/serial/at91rm9200_usart.c           |    8 ++
 drivers/serial/atmel_usart.c                |    4 +
 drivers/spi/atmel_dataflash_spi.c           |    4 +
 drivers/usb/host/ohci-at91.c                |    5 +
 drivers/video/bus_vcxk.c                    |   19 +++-
 include/asm-arm/arch-at91/at91_pio.h        |  107 ++++++++++++++++++
 include/asm-arm/arch-at91/at91_pit.h        |   15 +++
 include/asm-arm/arch-at91/at91_pmc.h        |  102 +++++++++++++++++
 include/asm-arm/arch-at91/at91_rstc.h       |   30 +++++-
 include/asm-arm/arch-at91/at91_spi.h        |   21 ++++
 include/asm-arm/arch-at91/at91_wdt.h        |   29 +++++
 include/asm-arm/arch-at91/at91cap9.h        |    9 ++
 include/asm-arm/arch-at91/at91sam9260.h     |   17 +++
 include/asm-arm/arch-at91/at91sam9261.h     |   14 +++-
 include/asm-arm/arch-at91/at91sam9263.h     |   22 ++++
 include/asm-arm/arch-at91/at91sam9_sdramc.h |   13 +++
 include/asm-arm/arch-at91/at91sam9_smc.h    |   63 +++++++++++
 include/asm-arm/arch-at91/at91sam9g45.h     |   15 +++
 include/asm-arm/arch-at91/at91sam9rl.h      |   14 +++-
 include/asm-arm/arch-at91/gpio.h            |  156
++-------------------------
 include/asm-arm/arch-at91/hardware.h        |    2 +-
 include/asm-arm/arch-at91/io.h              |    3 +
 include/i2c.h                               |    5 +
 include/netdev.h                            |    1 +
 40 files changed, 936 insertions(+), 493 deletions(-)
(quoted diff) +0 -0

b/board/atmel/at91sam9263ek/at91sam9263ek.c
index 0b7065b..05764fa 100644

board/atmel/at91sam9263ek/at91sam9263ek.c +73 -73

219 lines not on this page · raw message

(quoted diff) +0 -0

b/board/atmel/at91sam9263ek/led.c
index 82c5388..e5817df 100644

board/atmel/at91sam9263ek/led.c +6 -3
@@ -23,16 +23,19 @@
  */
 
 #include <common.h>
-#include <asm/arch/at91sam9263.h>
+#include <asm/arch/hardware.h>
 #include <asm/arch/at91_pmc.h>
+#include <asm/arch/at91_pio.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/io.h>
 
 void coloured_LED_init(void)
 {
 	/* Enable clock */
-	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_PIOB |
-				      1 << AT91SAM9263_ID_PIOCDE);
+	at91_pmc_t	*pmc	= (at91_pmc_t *) AT91_PMC_BASE;
+
+	writel(1 << AT91SAM9263_ID_PIOB | 1 << AT91SAM9263_ID_PIOCDE,
+		&pmc->pcer);
 
 	at91_set_gpio_output(CONFIG_RED_LED, 1);
 	at91_set_gpio_output(CONFIG_GREEN_LED, 1);
(quoted diff) +0 -0

b/cpu/arm926ejs/at91/at91cap9_devices.c
index 39e405f..f1466d1 100644

cpu/arm926ejs/at91/at91cap9_devices.c +46 -42

163 lines not on this page · raw message

(quoted diff) +0 -0

b/cpu/arm926ejs/at91/at91sam9261_devices.c
index 16d411f..c20c519 100644

cpu/arm926ejs/at91/at91sam9261_devices.c +26 -22

109 lines not on this page · raw message

(quoted diff) +0 -0

b/cpu/arm926ejs/at91/at91sam9263_devices.c
index f72efdf..2728aa8 100644

cpu/arm926ejs/at91/at91sam9263_devices.c +77 -61

229 lines not on this page · raw message