]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
add new CONFIG_AT91_LEGACY
authorJens Scharsig <js_at_ng@scharsoft.de>
Wed, 3 Feb 2010 21:45:42 +0000 (22:45 +0100)
committerTom Rix <Tom.Rix@windriver.com>
Fri, 12 Feb 2010 18:31:54 +0000 (12:31 -0600)
* add's the new temporary CONFIG_AT91_LEGACY to all board configs
 This will need for backward compatiblity, while change the SoC access
 to c structures. If CONFIG_AT91_LEGACY is defined, the deprecated
 SoC is used.

Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
22 files changed:
doc/README.at91-soc [new file with mode: 0644]
include/configs/afeb9260.h
include/configs/at91cap9adk.h
include/configs/at91rm9200dk.h
include/configs/at91rm9200ek.h
include/configs/at91sam9260ek.h
include/configs/at91sam9261ek.h
include/configs/at91sam9263ek.h
include/configs/at91sam9m10g45ek.h
include/configs/at91sam9rlek.h
include/configs/cmc_pu2.h
include/configs/cpu9260.h
include/configs/cpuat91.h
include/configs/csb637.h
include/configs/kb9202.h
include/configs/m501sk.h
include/configs/meesc.h
include/configs/mp2usb.h
include/configs/pm9261.h
include/configs/pm9263.h
include/configs/sbc35_a9g20.h
include/configs/tny_a9260.h

diff --git a/doc/README.at91-soc b/doc/README.at91-soc
new file mode 100644 (file)
index 0000000..bed035c
--- /dev/null
@@ -0,0 +1,41 @@
+ New C structure AT91 SoC access
+=================================
+
+The goal
+--------
+
+Currently the at91 arch uses hundreds of address defines and special
+at91_xxxx_write/read functions to access the SOC.
+The u-boot project perferred method is to access memory mapped hw
+regisister via a c structure.
+
+e.g. old
+
+       *AT91C_PIOA_IDR = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
+       *AT91C_PIOC_PUDR = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
+       *AT91C_PIOC_PER = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
+       *AT91C_PIOC_OER = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
+       *AT91C_PIOC_PIO = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
+
+       at91_sys_write(AT91_RSTC_CR,
+               AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
+
+e.g new
+       pin = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
+       writel(pin, &pio->pioa.idr);
+       writel(pin, &pio->pioa.pudr);
+       writel(pin, &pio->pioa.per);
+       writel(pin, &pio->pioa.oer);
+       writel(pin, &pio->pioa.sodr);
+
+       writel(AT91_RSTC_KEY | AT91_RSTC_CR_PROCRST |
+               AT91_RSTC_CR_PERRST, &rstc->cr);
+
+The method for updating
+------------------------
+
+1. add's the temporary CONFIG_AT91_LEGACY to all at91 board configs
+2. Display a compile time warning, if the board has not been converted
+3. add new structures for SoC access
+4. Convert arch, driver and boards file to new SoC
+5. remove legacy code, if all boards and drives are ready
index 58b8c8c39581ceaaa607775bc736f6f232488749..3b69de8774246a1a9f1a419dc83d88aea03fb0b6 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 /* ARM asynchronous clock */
 #define AT91_MAIN_CLOCK                18429952        /* from 18.432 MHz crystal */
 #define CONFIG_SYS_HZ          1000
index 322718f4417bb9f46f0850fcf85e22364b9b2fb9..4c2782ac2e8779776ee9b999bf33604824429740 100644 (file)
@@ -27,6 +27,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 /* ARM asynchronous clock */
 #define AT91_MAIN_CLOCK                12000000        /* 12 MHz crystal */
 #define CONFIG_SYS_HZ          1000
index 5de70cb4d85bb95376570ab6ebcb49e89a66c834..d39e8f28a960e02338758326c502f9ce9d410406 100644 (file)
@@ -25,6 +25,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 /* ARM asynchronous clock */
 #define AT91C_MAIN_CLOCK       179712000       /* from 18.432 MHz crystal (18432000 / 4 * 39) */
 #define AT91C_MASTER_CLOCK     59904000        /* peripheral clock (AT91C_MASTER_CLOCK / 3) */
index 47508551f15c3988cafda13769a6da314558be32..145c3c37dacbbde326879973d3bff6a5d94ea5bd 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 /* ARM asynchronous clock */
 /*
  * from 18.432 MHz crystal
index 05090112525189dd437ea253a12b6d4ad0a41cef..a620d578eb8d372c960081700d47ca92c34f270e 100644 (file)
@@ -27,6 +27,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 /* ARM asynchronous clock */
 #define AT91_MAIN_CLOCK                18432000        /* 18.432 MHz crystal */
 #define CONFIG_SYS_HZ          1000
index fbf7389b900935703e25d7cba29bb06c29604c8f..832b1cd6537f8a641297e4ee3f2f78322765d20e 100644 (file)
@@ -27,6 +27,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 /* ARM asynchronous clock */
 #define AT91_MAIN_CLOCK                18432000        /* 18.432 MHz crystal */
 #define CONFIG_SYS_HZ          1000
index 571351ca7d5973d0893b2c65feac072900f6d21f..1d82a15545e592ca7649253fc6f71c305865c1aa 100644 (file)
@@ -27,6 +27,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 /* ARM asynchronous clock */
 #define AT91_MAIN_CLOCK                16367660        /* 16.367 MHz crystal */
 #define CONFIG_SYS_HZ          1000
index 06184e78eca928e9f972fc512dbf5f1dc655a2a9..50b118fa0433033bed757747bf826e6f62abfc95 100644 (file)
@@ -27,6 +27,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 /* ARM asynchronous clock */
 #define AT91_MAIN_CLOCK                12000000        /* from 12 MHz crystal */
 #define CONFIG_SYS_HZ          1000
index 6fad75d6be006c1de80f4b6deecb4a3d34e4992c..8db296a8cba8b6a1d93806db7e4ae782e33c5bf3 100644 (file)
@@ -27,6 +27,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 /* ARM asynchronous clock */
 #define AT91_MAIN_CLOCK                12000000        /* 12 MHz crystal */
 #define CONFIG_SYS_HZ          1000
index 00d0cec4fdc24518972a1eeaf6ab9c75e7707511..ffe83f091c0596b4cc020cd36b07636dd6659419 100644 (file)
@@ -25,6 +25,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 /* ARM asynchronous clock */
 #define AT91C_MAIN_CLOCK       179712000       /* from 18.432 MHz crystal (18432000 / 4 * 39) */
 #define AT91C_MASTER_CLOCK     (AT91C_MAIN_CLOCK/3)    /* peripheral clock */
index 4ef8566ea215a081795ba48c4fd8976102dc92dc..e967e7cdfa2b3b04c4c38aeffba161074820b574 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 #define CONFIG_DISPLAY_CPUINFO 1
 
 #define AT91_MAIN_CLOCK                18432000
index e872fe9abd18a2b28491ba29b6619d1c13c238ed..b4fda767310e88c0e18c68cf2a234dd8d8583e1e 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 #ifdef CONFIG_CPUAT91_RAM
 #define CONFIG_SKIP_LOWLEVEL_INIT      1
 #define CONFIG_SKIP_RELOCATE_UBOOT     1
index 689e7f0030f0e056a89cf13effadaa73c393f48c..efa27809920415fb7a187f58b112e43dc31fd12a 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 /* ARM asynchronous clock */
 #define AT91C_MAIN_CLOCK       184320000       /* from 3.6864 MHz crystal (3686400 * 50) */
 #define AT91C_MASTER_CLOCK     46080000        /* (AT91C_MAIN_CLOCK/4) peripheral clock */
index 3fe88feec21042527fe17d690bff49a605f433e0..41ec1d52e39b0309000952756e3ec2d5ab9d29e8 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 /* ARM asynchronous clock */
 #define AT91C_MAIN_CLOCK       180000000       /* from 10 MHz crystal */
 #define AT91C_MASTER_CLOCK     60000000        /* peripheral clock (AT91C_MASTER_CLOCK / 3) */
index a28fd27d4283569f60ca909adbde8d2a7a80c2d7..26c2bcb6893ff1c841f5f6b9443dfe613a93d88d 100644 (file)
@@ -27,6 +27,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 /* ARM asynchronous clock */
 /* from 18.432 MHz crystal (18432000 / 4 * 39) */
 #define AT91C_MAIN_CLOCK       179712000
index c3255fad6441756ff8964d9f31bc548755866cb8..e5bf5d0958d5b2cc4bac935f7e59c5709826a978 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 /* Common stuff */
 #define CONFIG_SYS_HZ                  1000    /* decrementer freq */
 #define CONFIG_MEESC                   1       /* Board is esd MEESC */
index 31eb1b666c7e80e6397b18f53ea06a10476d2c74..3138b493cd8d28e0099f9929228e748d81c30845 100644 (file)
@@ -28,6 +28,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 /* ARM asynchronous clock */
 #define AT91C_MAIN_CLOCK       179712000       /* from 18.432 MHz crystal (18432000 / 4 * 45) */
 #define AT91C_MASTER_CLOCK     (AT91C_MAIN_CLOCK/3)    /* peripheral clock */
index 399d15f9feebc62564f2db991c52bfc26ebaccd4..26a2fade07a33d4e8898fc3ab54665313aca6cc1 100644 (file)
@@ -28,6 +28,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 /* ARM asynchronous clock */
 #define AT91_CPU_NAME          "AT91SAM9261"
 
index 0af1280370b3a9f27831abc0a266e3c62d379102..e55098c5b120779db5ac31a509c76ce54511e73b 100644 (file)
@@ -28,6 +28,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 /* ARM asynchronous clock */
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
index f4b34775a636583534d280aca783bb084dd8771c..7bdc72963c9108835251fdd1396d7b7022131421 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 #if defined(CONFIG_SBC35_A9G20_NANDFLASH) || defined(CONFIG_SBC35_A9G20_EEPROM)
 #define CONFIG_SBC35_A9G20
 #endif
index 4ad081b0baf3bc9af56db9131460da758ac9a451..21475f85b7c29cd00bbc6557a3a48213d98a128a 100644 (file)
@@ -30,6 +30,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_AT91_LEGACY
+
 #if defined(CONFIG_TNY_A9260_NANDFLASH) || defined(CONFIG_TNY_A9260_EEPROM)
 #define CONFIG_TNY_A9260
 #elif defined(CONFIG_TNY_A9G20_NANDFLASH) || defined(CONFIG_TNY_A9G20_EEPROM)