* [U-Boot] [PATCH 1/9 V3] add new CONFIG_AT91_LEGACY
@ 2010-01-23 11:03 Jens Scharsig
2010-01-31 0:57 ` Tom
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Jens Scharsig @ 2010-01-23 11:03 UTC (permalink / raw)
To: u-boot
* 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.
* please see README.at91-soc for details
Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
---
doc/README.at91-soc | 42 ++++++++++++++++++++++++++++++++++++
include/configs/afeb9260.h | 2 +
include/configs/at91cap9adk.h | 2 +
include/configs/at91rm9200dk.h | 2 +
include/configs/at91rm9200ek.h | 2 +
include/configs/at91sam9260ek.h | 2 +
include/configs/at91sam9261ek.h | 2 +
include/configs/at91sam9263ek.h | 2 +
include/configs/at91sam9m10g45ek.h | 2 +
include/configs/at91sam9rlek.h | 2 +
include/configs/cmc_pu2.h | 2 +
include/configs/cpu9260.h | 2 +
include/configs/cpuat91.h | 2 +
include/configs/csb637.h | 2 +
include/configs/kb9202.h | 2 +
include/configs/m501sk.h | 2 +
include/configs/meesc.h | 2 +
include/configs/mp2usb.h | 2 +
include/configs/pm9261.h | 2 +
include/configs/pm9263.h | 2 +
include/configs/sbc35_a9g20.h | 2 +
include/configs/tny_a9260.h | 2 +
22 files changed, 84 insertions(+), 0 deletions(-)
create mode 100644 doc/README.at91-soc
diff --git a/doc/README.at91-soc b/doc/README.at91-soc
new file mode 100644
index 0000000..063016e
--- /dev/null
+++ b/doc/README.at91-soc
@@ -0,0 +1,42 @@
+ New C structure AT91 SoC access
+=================================
+
+The gool
+--------
+
+Currently the at91 arch uses hundreds of address defines and special
+at91_xxxx_write/read functions to access the SOC.
+The u-boot project prefer the better to readable access via c stuctures,
+which describe the SoC peripherie.
+
+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 Way
+-------
+
+1. add's the new temporary CONFIG_AT91_LEGACY to all board configs
+ that not converted to new SoC access
+2. add new structures for SoC access
+3. Convert arch, driver and boards file zu new SoC
+4. remove legacy code, if all boards and drives are ready
+
diff --git a/include/configs/afeb9260.h b/include/configs/afeb9260.h
index 58b8c8c..3b69de8 100644
--- a/include/configs/afeb9260.h
+++ b/include/configs/afeb9260.h
@@ -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
diff --git a/include/configs/at91cap9adk.h b/include/configs/at91cap9adk.h
index 322718f..4c2782a 100644
--- a/include/configs/at91cap9adk.h
+++ b/include/configs/at91cap9adk.h
@@ -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
diff --git a/include/configs/at91rm9200dk.h b/include/configs/at91rm9200dk.h
index 590c69a..bc61677 100644
--- a/include/configs/at91rm9200dk.h
+++ b/include/configs/at91rm9200dk.h
@@ -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) */
diff --git a/include/configs/at91rm9200ek.h b/include/configs/at91rm9200ek.h
index b4f075e..f5206b1 100644
--- a/include/configs/at91rm9200ek.h
+++ b/include/configs/at91rm9200ek.h
@@ -26,6 +26,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#define CONFIG_AT91_LEGACY
+
/* ARM asynchronous clock */
/*
* from 18.432 MHz crystal
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index 0509011..a620d57 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -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
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index fbf7389..832b1cd 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -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
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index 571351c..1d82a15 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -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
diff --git a/include/configs/at91sam9m10g45ek.h b/include/configs/at91sam9m10g45ek.h
index 06184e7..50b118f 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -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
diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
index 6fad75d..8db296a 100644
--- a/include/configs/at91sam9rlek.h
+++ b/include/configs/at91sam9rlek.h
@@ -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
diff --git a/include/configs/cmc_pu2.h b/include/configs/cmc_pu2.h
index be478b2..16ae03e 100644
--- a/include/configs/cmc_pu2.h
+++ b/include/configs/cmc_pu2.h
@@ -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 */
diff --git a/include/configs/cpu9260.h b/include/configs/cpu9260.h
index 4ef8566..e967e7c 100644
--- a/include/configs/cpu9260.h
+++ b/include/configs/cpu9260.h
@@ -31,6 +31,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#define CONFIG_AT91_LEGACY
+
#define CONFIG_DISPLAY_CPUINFO 1
#define AT91_MAIN_CLOCK 18432000
diff --git a/include/configs/cpuat91.h b/include/configs/cpuat91.h
index 8746f70..9f0ac03 100644
--- a/include/configs/cpuat91.h
+++ b/include/configs/cpuat91.h
@@ -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
diff --git a/include/configs/csb637.h b/include/configs/csb637.h
index f4fd808..90269a7 100644
--- a/include/configs/csb637.h
+++ b/include/configs/csb637.h
@@ -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 */
diff --git a/include/configs/kb9202.h b/include/configs/kb9202.h
index 7dd81e6..24fd1ef 100644
--- a/include/configs/kb9202.h
+++ b/include/configs/kb9202.h
@@ -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) */
diff --git a/include/configs/m501sk.h b/include/configs/m501sk.h
index 5c06642..17469e5 100644
--- a/include/configs/m501sk.h
+++ b/include/configs/m501sk.h
@@ -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
diff --git a/include/configs/meesc.h b/include/configs/meesc.h
index ab5cbca..253a53d 100644
--- a/include/configs/meesc.h
+++ b/include/configs/meesc.h
@@ -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 */
diff --git a/include/configs/mp2usb.h b/include/configs/mp2usb.h
index 0c2ee60..c66f8ea 100644
--- a/include/configs/mp2usb.h
+++ b/include/configs/mp2usb.h
@@ -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 */
diff --git a/include/configs/pm9261.h b/include/configs/pm9261.h
index 399d15f..26a2fad 100644
--- a/include/configs/pm9261.h
+++ b/include/configs/pm9261.h
@@ -28,6 +28,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#define CONFIG_AT91_LEGACY
+
/* ARM asynchronous clock */
#define AT91_CPU_NAME "AT91SAM9261"
diff --git a/include/configs/pm9263.h b/include/configs/pm9263.h
index 0af1280..e55098c 100644
--- a/include/configs/pm9263.h
+++ b/include/configs/pm9263.h
@@ -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
diff --git a/include/configs/sbc35_a9g20.h b/include/configs/sbc35_a9g20.h
index f4b3477..7bdc729 100644
--- a/include/configs/sbc35_a9g20.h
+++ b/include/configs/sbc35_a9g20.h
@@ -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
diff --git a/include/configs/tny_a9260.h b/include/configs/tny_a9260.h
index 4ad081b..21475f8 100644
--- a/include/configs/tny_a9260.h
+++ b/include/configs/tny_a9260.h
@@ -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)
^ permalink raw reply related [flat|nested] 11+ messages in thread* [U-Boot] [PATCH 1/9 V3] add new CONFIG_AT91_LEGACY
2010-01-23 11:03 [U-Boot] [PATCH 1/9 V3] add new CONFIG_AT91_LEGACY Jens Scharsig
@ 2010-01-31 0:57 ` Tom
2010-01-31 11:24 ` [U-Boot] [PATCH 1/9 V3.1] " Jens Scharsig
2010-02-03 21:45 ` [U-Boot] [PATCH 1/9 V4] " Jens Scharsig
2 siblings, 0 replies; 11+ messages in thread
From: Tom @ 2010-01-31 0:57 UTC (permalink / raw)
To: u-boot
Jens Scharsig wrote:
> * 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.
> * please see README.at91-soc for details
>
> Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
> ---
> doc/README.at91-soc | 42 ++++++++++++++++++++++++++++++++++++
> include/configs/afeb9260.h | 2 +
> include/configs/at91cap9adk.h | 2 +
> include/configs/at91rm9200dk.h | 2 +
> include/configs/at91rm9200ek.h | 2 +
> include/configs/at91sam9260ek.h | 2 +
> include/configs/at91sam9261ek.h | 2 +
> include/configs/at91sam9263ek.h | 2 +
> include/configs/at91sam9m10g45ek.h | 2 +
> include/configs/at91sam9rlek.h | 2 +
> include/configs/cmc_pu2.h | 2 +
> include/configs/cpu9260.h | 2 +
> include/configs/cpuat91.h | 2 +
> include/configs/csb637.h | 2 +
> include/configs/kb9202.h | 2 +
> include/configs/m501sk.h | 2 +
> include/configs/meesc.h | 2 +
> include/configs/mp2usb.h | 2 +
> include/configs/pm9261.h | 2 +
> include/configs/pm9263.h | 2 +
> include/configs/sbc35_a9g20.h | 2 +
> include/configs/tny_a9260.h | 2 +
> 22 files changed, 84 insertions(+), 0 deletions(-)
> create mode 100644 doc/README.at91-soc
>
> diff --git a/doc/README.at91-soc b/doc/README.at91-soc
> new file mode 100644
> index 0000000..063016e
> --- /dev/null
> +++ b/doc/README.at91-soc
> @@ -0,0 +1,42 @@
> + New C structure AT91 SoC access
> +=================================
> +
> +The gool
> +--------
change to '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 prefer the better to readable access via c stuctures,
> +which describe the SoC peripherie.
> +
change to
'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 Way
Change to
'The method for updating'
> +-------
> +
> +1. add's the new temporary CONFIG_AT91_LEGACY to all board configs
> + that not converted to new SoC access
Change to something like
'Display a compile time warning if the board has not been converted'
> +2. add new structures for SoC access
> +3. Convert arch, driver and boards file zu new SoC
Change from 'zu new SoC' to 'to the new c stucture based SoC acesss'
This readme is a big help
Thanks
Tom
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH 1/9 V3.1] add new CONFIG_AT91_LEGACY
2010-01-23 11:03 [U-Boot] [PATCH 1/9 V3] add new CONFIG_AT91_LEGACY Jens Scharsig
2010-01-31 0:57 ` Tom
@ 2010-01-31 11:24 ` Jens Scharsig
2010-02-03 21:45 ` [U-Boot] [PATCH 1/9 V4] " Jens Scharsig
2 siblings, 0 replies; 11+ messages in thread
From: Jens Scharsig @ 2010-01-31 11:24 UTC (permalink / raw)
To: u-boot
* 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>
---
doc/README.at91-soc | 41 ++++++++++++++++++++++++++++++++++++
include/configs/afeb9260.h | 2 +
include/configs/at91cap9adk.h | 2 +
include/configs/at91rm9200dk.h | 2 +
include/configs/at91rm9200ek.h | 2 +
include/configs/at91sam9260ek.h | 2 +
include/configs/at91sam9261ek.h | 2 +
include/configs/at91sam9263ek.h | 2 +
include/configs/at91sam9m10g45ek.h | 2 +
include/configs/at91sam9rlek.h | 2 +
include/configs/cmc_pu2.h | 2 +
include/configs/cpu9260.h | 2 +
include/configs/cpuat91.h | 2 +
include/configs/csb637.h | 2 +
include/configs/kb9202.h | 2 +
include/configs/m501sk.h | 2 +
include/configs/meesc.h | 2 +
include/configs/mp2usb.h | 2 +
include/configs/pm9261.h | 2 +
include/configs/pm9263.h | 2 +
include/configs/sbc35_a9g20.h | 2 +
include/configs/tny_a9260.h | 2 +
22 files changed, 83 insertions(+), 0 deletions(-)
create mode 100644 doc/README.at91-soc
diff --git a/doc/README.at91-soc b/doc/README.at91-soc
new file mode 100644
index 0000000..bed035c
--- /dev/null
+++ b/doc/README.at91-soc
@@ -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
diff --git a/include/configs/afeb9260.h b/include/configs/afeb9260.h
index 58b8c8c..3b69de8 100644
--- a/include/configs/afeb9260.h
+++ b/include/configs/afeb9260.h
@@ -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
diff --git a/include/configs/at91cap9adk.h b/include/configs/at91cap9adk.h
index 322718f..4c2782a 100644
--- a/include/configs/at91cap9adk.h
+++ b/include/configs/at91cap9adk.h
@@ -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
diff --git a/include/configs/at91rm9200dk.h b/include/configs/at91rm9200dk.h
index 590c69a..bc61677 100644
--- a/include/configs/at91rm9200dk.h
+++ b/include/configs/at91rm9200dk.h
@@ -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) */
diff --git a/include/configs/at91rm9200ek.h b/include/configs/at91rm9200ek.h
index b4f075e..f5206b1 100644
--- a/include/configs/at91rm9200ek.h
+++ b/include/configs/at91rm9200ek.h
@@ -26,6 +26,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#define CONFIG_AT91_LEGACY
+
/* ARM asynchronous clock */
/*
* from 18.432 MHz crystal
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index 0509011..a620d57 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -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
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index fbf7389..832b1cd 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -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
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index 571351c..1d82a15 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -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
diff --git a/include/configs/at91sam9m10g45ek.h b/include/configs/at91sam9m10g45ek.h
index 06184e7..50b118f 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -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
diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
index 6fad75d..8db296a 100644
--- a/include/configs/at91sam9rlek.h
+++ b/include/configs/at91sam9rlek.h
@@ -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
diff --git a/include/configs/cmc_pu2.h b/include/configs/cmc_pu2.h
index be478b2..16ae03e 100644
--- a/include/configs/cmc_pu2.h
+++ b/include/configs/cmc_pu2.h
@@ -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 */
diff --git a/include/configs/cpu9260.h b/include/configs/cpu9260.h
index 4ef8566..e967e7c 100644
--- a/include/configs/cpu9260.h
+++ b/include/configs/cpu9260.h
@@ -31,6 +31,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#define CONFIG_AT91_LEGACY
+
#define CONFIG_DISPLAY_CPUINFO 1
#define AT91_MAIN_CLOCK 18432000
diff --git a/include/configs/cpuat91.h b/include/configs/cpuat91.h
index 8746f70..9f0ac03 100644
--- a/include/configs/cpuat91.h
+++ b/include/configs/cpuat91.h
@@ -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
diff --git a/include/configs/csb637.h b/include/configs/csb637.h
index f4fd808..90269a7 100644
--- a/include/configs/csb637.h
+++ b/include/configs/csb637.h
@@ -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 */
diff --git a/include/configs/kb9202.h b/include/configs/kb9202.h
index 7dd81e6..24fd1ef 100644
--- a/include/configs/kb9202.h
+++ b/include/configs/kb9202.h
@@ -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) */
diff --git a/include/configs/m501sk.h b/include/configs/m501sk.h
index 5c06642..17469e5 100644
--- a/include/configs/m501sk.h
+++ b/include/configs/m501sk.h
@@ -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
diff --git a/include/configs/meesc.h b/include/configs/meesc.h
index ab5cbca..253a53d 100644
--- a/include/configs/meesc.h
+++ b/include/configs/meesc.h
@@ -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 */
diff --git a/include/configs/mp2usb.h b/include/configs/mp2usb.h
index 0c2ee60..c66f8ea 100644
--- a/include/configs/mp2usb.h
+++ b/include/configs/mp2usb.h
@@ -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 */
diff --git a/include/configs/pm9261.h b/include/configs/pm9261.h
index 399d15f..26a2fad 100644
--- a/include/configs/pm9261.h
+++ b/include/configs/pm9261.h
@@ -28,6 +28,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#define CONFIG_AT91_LEGACY
+
/* ARM asynchronous clock */
#define AT91_CPU_NAME "AT91SAM9261"
diff --git a/include/configs/pm9263.h b/include/configs/pm9263.h
index 0af1280..e55098c 100644
--- a/include/configs/pm9263.h
+++ b/include/configs/pm9263.h
@@ -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
diff --git a/include/configs/sbc35_a9g20.h b/include/configs/sbc35_a9g20.h
index f4b3477..7bdc729 100644
--- a/include/configs/sbc35_a9g20.h
+++ b/include/configs/sbc35_a9g20.h
@@ -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
diff --git a/include/configs/tny_a9260.h b/include/configs/tny_a9260.h
index 4ad081b..21475f8 100644
--- a/include/configs/tny_a9260.h
+++ b/include/configs/tny_a9260.h
@@ -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)
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH 1/9 V4] add new CONFIG_AT91_LEGACY
2010-01-23 11:03 [U-Boot] [PATCH 1/9 V3] add new CONFIG_AT91_LEGACY Jens Scharsig
2010-01-31 0:57 ` Tom
2010-01-31 11:24 ` [U-Boot] [PATCH 1/9 V3.1] " Jens Scharsig
@ 2010-02-03 21:45 ` Jens Scharsig
2010-02-06 14:19 ` Tom
2 siblings, 1 reply; 11+ messages in thread
From: Jens Scharsig @ 2010-02-03 21:45 UTC (permalink / raw)
To: u-boot
* 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>
---
doc/README.at91-soc | 41 ++++++++++++++++++++++++++++++++++++
include/configs/afeb9260.h | 2 +
include/configs/at91cap9adk.h | 2 +
include/configs/at91rm9200dk.h | 2 +
include/configs/at91rm9200ek.h | 2 +
include/configs/at91sam9260ek.h | 2 +
include/configs/at91sam9261ek.h | 2 +
include/configs/at91sam9263ek.h | 2 +
include/configs/at91sam9m10g45ek.h | 2 +
include/configs/at91sam9rlek.h | 2 +
include/configs/cmc_pu2.h | 2 +
include/configs/cpu9260.h | 2 +
include/configs/cpuat91.h | 2 +
include/configs/csb637.h | 2 +
include/configs/kb9202.h | 2 +
include/configs/m501sk.h | 2 +
include/configs/meesc.h | 2 +
include/configs/mp2usb.h | 2 +
include/configs/pm9261.h | 2 +
include/configs/pm9263.h | 2 +
include/configs/sbc35_a9g20.h | 2 +
include/configs/tny_a9260.h | 2 +
22 files changed, 83 insertions(+), 0 deletions(-)
create mode 100644 doc/README.at91-soc
diff --git a/doc/README.at91-soc b/doc/README.at91-soc
new file mode 100644
index 0000000..bed035c
--- /dev/null
+++ b/doc/README.at91-soc
@@ -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
diff --git a/include/configs/afeb9260.h b/include/configs/afeb9260.h
index 58b8c8c..3b69de8 100644
--- a/include/configs/afeb9260.h
+++ b/include/configs/afeb9260.h
@@ -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
diff --git a/include/configs/at91cap9adk.h b/include/configs/at91cap9adk.h
index 322718f..4c2782a 100644
--- a/include/configs/at91cap9adk.h
+++ b/include/configs/at91cap9adk.h
@@ -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
diff --git a/include/configs/at91rm9200dk.h b/include/configs/at91rm9200dk.h
index 590c69a..bc61677 100644
--- a/include/configs/at91rm9200dk.h
+++ b/include/configs/at91rm9200dk.h
@@ -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) */
diff --git a/include/configs/at91rm9200ek.h b/include/configs/at91rm9200ek.h
index b4f075e..f5206b1 100644
--- a/include/configs/at91rm9200ek.h
+++ b/include/configs/at91rm9200ek.h
@@ -26,6 +26,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#define CONFIG_AT91_LEGACY
+
/* ARM asynchronous clock */
/*
* from 18.432 MHz crystal
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index 0509011..a620d57 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -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
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index fbf7389..832b1cd 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -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
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index 571351c..1d82a15 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -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
diff --git a/include/configs/at91sam9m10g45ek.h b/include/configs/at91sam9m10g45ek.h
index 06184e7..50b118f 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -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
diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
index 6fad75d..8db296a 100644
--- a/include/configs/at91sam9rlek.h
+++ b/include/configs/at91sam9rlek.h
@@ -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
diff --git a/include/configs/cmc_pu2.h b/include/configs/cmc_pu2.h
index be478b2..16ae03e 100644
--- a/include/configs/cmc_pu2.h
+++ b/include/configs/cmc_pu2.h
@@ -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 */
diff --git a/include/configs/cpu9260.h b/include/configs/cpu9260.h
index 4ef8566..e967e7c 100644
--- a/include/configs/cpu9260.h
+++ b/include/configs/cpu9260.h
@@ -31,6 +31,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#define CONFIG_AT91_LEGACY
+
#define CONFIG_DISPLAY_CPUINFO 1
#define AT91_MAIN_CLOCK 18432000
diff --git a/include/configs/cpuat91.h b/include/configs/cpuat91.h
index 8746f70..9f0ac03 100644
--- a/include/configs/cpuat91.h
+++ b/include/configs/cpuat91.h
@@ -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
diff --git a/include/configs/csb637.h b/include/configs/csb637.h
index f4fd808..90269a7 100644
--- a/include/configs/csb637.h
+++ b/include/configs/csb637.h
@@ -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 */
diff --git a/include/configs/kb9202.h b/include/configs/kb9202.h
index 7dd81e6..24fd1ef 100644
--- a/include/configs/kb9202.h
+++ b/include/configs/kb9202.h
@@ -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) */
diff --git a/include/configs/m501sk.h b/include/configs/m501sk.h
index 5c06642..17469e5 100644
--- a/include/configs/m501sk.h
+++ b/include/configs/m501sk.h
@@ -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
diff --git a/include/configs/meesc.h b/include/configs/meesc.h
index ab5cbca..253a53d 100644
--- a/include/configs/meesc.h
+++ b/include/configs/meesc.h
@@ -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 */
diff --git a/include/configs/mp2usb.h b/include/configs/mp2usb.h
index 0c2ee60..c66f8ea 100644
--- a/include/configs/mp2usb.h
+++ b/include/configs/mp2usb.h
@@ -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 */
diff --git a/include/configs/pm9261.h b/include/configs/pm9261.h
index 399d15f..26a2fad 100644
--- a/include/configs/pm9261.h
+++ b/include/configs/pm9261.h
@@ -28,6 +28,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#define CONFIG_AT91_LEGACY
+
/* ARM asynchronous clock */
#define AT91_CPU_NAME "AT91SAM9261"
diff --git a/include/configs/pm9263.h b/include/configs/pm9263.h
index 0af1280..e55098c 100644
--- a/include/configs/pm9263.h
+++ b/include/configs/pm9263.h
@@ -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
diff --git a/include/configs/sbc35_a9g20.h b/include/configs/sbc35_a9g20.h
index f4b3477..7bdc729 100644
--- a/include/configs/sbc35_a9g20.h
+++ b/include/configs/sbc35_a9g20.h
@@ -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
diff --git a/include/configs/tny_a9260.h b/include/configs/tny_a9260.h
index 4ad081b..21475f8 100644
--- a/include/configs/tny_a9260.h
+++ b/include/configs/tny_a9260.h
@@ -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)
--
1.6.0.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH 1/9 V4] add new CONFIG_AT91_LEGACY
2010-02-03 21:45 ` [U-Boot] [PATCH 1/9 V4] " Jens Scharsig
@ 2010-02-06 14:19 ` Tom
2010-02-10 11:33 ` Daniel Gorsulowski
0 siblings, 1 reply; 11+ messages in thread
From: Tom @ 2010-02-06 14:19 UTC (permalink / raw)
To: u-boot
Jens Scharsig wrote:
> * 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>
This looks good.
The only problem is the new at91 target otc570 is breaking.
Please take a look at errors in otc570
otc570 :
at91sam9263_devices.c: In function 'at91_serial0_hw_init':
at91sam9263_devices.c:40: warning: implicit declaration of function
'at91_set_a_periph'
at91sam9263_devices.c: In function 'at91_spi0_hw_init':
at91sam9263_devices.c:96: warning: implicit declaration of function
'at91_set_b_periph'
at91sam9263_devices.c:116: warning: implicit declaration of function
'at91_set_pio_output'
clock.c: In function 'at91_clock_init':
clock.c:160: warning: implicit declaration of function 'at91_sys_read'
clock.c:160: error: 'AT91_CKGR_MCFR' undeclared (first use in this function)
clock.c:160: error: (Each undeclared identifier is reported only once
clock.c:160: error: for each function it appears in.)
Tom
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH 1/9 V4] add new CONFIG_AT91_LEGACY
2010-02-06 14:19 ` Tom
@ 2010-02-10 11:33 ` Daniel Gorsulowski
2010-02-11 13:56 ` Tom
0 siblings, 1 reply; 11+ messages in thread
From: Daniel Gorsulowski @ 2010-02-10 11:33 UTC (permalink / raw)
To: u-boot
Hello Tom,
Tom wrote:
> Jens Scharsig wrote:
>> * 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>
>
> This looks good.
> The only problem is the new at91 target otc570 is breaking.
>
> Please take a look at errors in otc570
>
> otc570 :
>
> at91sam9263_devices.c: In function 'at91_serial0_hw_init':
> at91sam9263_devices.c:40: warning: implicit declaration of function
> 'at91_set_a_periph'
> at91sam9263_devices.c: In function 'at91_spi0_hw_init':
> at91sam9263_devices.c:96: warning: implicit declaration of function
> 'at91_set_b_periph'
> at91sam9263_devices.c:116: warning: implicit declaration of function
> 'at91_set_pio_output'
> clock.c: In function 'at91_clock_init':
> clock.c:160: warning: implicit declaration of function 'at91_sys_read'
> clock.c:160: error: 'AT91_CKGR_MCFR' undeclared (first use in this function)
> clock.c:160: error: (Each undeclared identifier is reported only once
> clock.c:160: error: for each function it appears in.)
>
> Tom
This is caused by missing defines in include\configs\otc570.h:
#define CONFIG_AT91_LEGACY
and
#define CONFIG_AT91_GPIO 1
Should I send a patch to fix this, or should I wait for Jens patches coming
mainline?
Best regards,
Daniel Gorsulowski
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH 1/9 V4] add new CONFIG_AT91_LEGACY
2010-02-10 11:33 ` Daniel Gorsulowski
@ 2010-02-11 13:56 ` Tom
2010-02-12 6:47 ` Daniel Gorsulowski
0 siblings, 1 reply; 11+ messages in thread
From: Tom @ 2010-02-11 13:56 UTC (permalink / raw)
To: u-boot
Daniel Gorsulowski wrote:
> Hello Tom,
>
> Tom wrote:
>> Jens Scharsig wrote:
>>> * 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>
>> This looks good.
>> The only problem is the new at91 target otc570 is breaking.
>>
>> Please take a look at errors in otc570
>>
>> otc570 :
>>
>> at91sam9263_devices.c: In function 'at91_serial0_hw_init':
>> at91sam9263_devices.c:40: warning: implicit declaration of function
>> 'at91_set_a_periph'
>> at91sam9263_devices.c: In function 'at91_spi0_hw_init':
>> at91sam9263_devices.c:96: warning: implicit declaration of function
>> 'at91_set_b_periph'
>> at91sam9263_devices.c:116: warning: implicit declaration of function
>> 'at91_set_pio_output'
>> clock.c: In function 'at91_clock_init':
>> clock.c:160: warning: implicit declaration of function 'at91_sys_read'
>> clock.c:160: error: 'AT91_CKGR_MCFR' undeclared (first use in this function)
>> clock.c:160: error: (Each undeclared identifier is reported only once
>> clock.c:160: error: for each function it appears in.)
>>
>> Tom
>
> This is caused by missing defines in include\configs\otc570.h:
> #define CONFIG_AT91_LEGACY
> and
> #define CONFIG_AT91_GPIO 1
>
> Should I send a patch to fix this, or should I wait for Jens patches coming
> mainline?
>
Please send a patch.
It should be a 2-3 liner.
I will combine it with Jens' patchset and push them together.
Tom
> Best regards,
> Daniel Gorsulowski
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH 1/9 V4] add new CONFIG_AT91_LEGACY
2010-02-11 13:56 ` Tom
@ 2010-02-12 6:47 ` Daniel Gorsulowski
2010-02-12 13:08 ` Tom
2010-02-12 18:05 ` Tom
0 siblings, 2 replies; 11+ messages in thread
From: Daniel Gorsulowski @ 2010-02-12 6:47 UTC (permalink / raw)
To: u-boot
Tom wrote:
> Daniel Gorsulowski wrote:
>> Hello Tom,
>>
>> Tom wrote:
>>> Jens Scharsig wrote:
>>>> * 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>
>>> This looks good.
>>> The only problem is the new at91 target otc570 is breaking.
>>>
>>> Please take a look at errors in otc570
>>>
>>> otc570 :
>>>
>>> at91sam9263_devices.c: In function 'at91_serial0_hw_init':
>>> at91sam9263_devices.c:40: warning: implicit declaration of function
>>> 'at91_set_a_periph'
>>> at91sam9263_devices.c: In function 'at91_spi0_hw_init':
>>> at91sam9263_devices.c:96: warning: implicit declaration of function
>>> 'at91_set_b_periph'
>>> at91sam9263_devices.c:116: warning: implicit declaration of function
>>> 'at91_set_pio_output'
>>> clock.c: In function 'at91_clock_init':
>>> clock.c:160: warning: implicit declaration of function 'at91_sys_read'
>>> clock.c:160: error: 'AT91_CKGR_MCFR' undeclared (first use in this function)
>>> clock.c:160: error: (Each undeclared identifier is reported only once
>>> clock.c:160: error: for each function it appears in.)
>>>
>>> Tom
>>
>> This is caused by missing defines in include\configs\otc570.h:
>> #define CONFIG_AT91_LEGACY
>> and
>> #define CONFIG_AT91_GPIO 1
>>
>> Should I send a patch to fix this, or should I wait for Jens patches coming
>> mainline?
>>
>
> Please send a patch.
> It should be a 2-3 liner.
> I will combine it with Jens' patchset and push them together.
> Tom
>
You probably recognized that I did not sent a patch with CONFIG_AT91_LEGACY
support but I updated the otc570 board to new SoC access.
http://lists.denx.de/pipermail/u-boot/2010-February/067691.html
I guess, this is the best solution.
Best regards,
Daniel Gorsulowski
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH 1/9 V4] add new CONFIG_AT91_LEGACY
2010-02-12 6:47 ` Daniel Gorsulowski
@ 2010-02-12 13:08 ` Tom
2010-02-12 18:05 ` Tom
1 sibling, 0 replies; 11+ messages in thread
From: Tom @ 2010-02-12 13:08 UTC (permalink / raw)
To: u-boot
Daniel Gorsulowski wrote:
> Tom wrote:
>> Daniel Gorsulowski wrote:
>>> Hello Tom,
>>>
>>> Tom wrote:
>>>> Jens Scharsig wrote:
>>>>> * 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>
>>>> This looks good.
>>>> The only problem is the new at91 target otc570 is breaking.
>>>>
>>>> Please take a look at errors in otc570
>>>>
>>>> otc570 :
>>>>
>>>> at91sam9263_devices.c: In function 'at91_serial0_hw_init':
>>>> at91sam9263_devices.c:40: warning: implicit declaration of function
>>>> 'at91_set_a_periph'
>>>> at91sam9263_devices.c: In function 'at91_spi0_hw_init':
>>>> at91sam9263_devices.c:96: warning: implicit declaration of function
>>>> 'at91_set_b_periph'
>>>> at91sam9263_devices.c:116: warning: implicit declaration of function
>>>> 'at91_set_pio_output'
>>>> clock.c: In function 'at91_clock_init':
>>>> clock.c:160: warning: implicit declaration of function 'at91_sys_read'
>>>> clock.c:160: error: 'AT91_CKGR_MCFR' undeclared (first use in this function)
>>>> clock.c:160: error: (Each undeclared identifier is reported only once
>>>> clock.c:160: error: for each function it appears in.)
>>>>
>>>> Tom
>>> This is caused by missing defines in include\configs\otc570.h:
>>> #define CONFIG_AT91_LEGACY
>>> and
>>> #define CONFIG_AT91_GPIO 1
>>>
>>> Should I send a patch to fix this, or should I wait for Jens patches coming
>>> mainline?
>>>
>> Please send a patch.
>> It should be a 2-3 liner.
>> I will combine it with Jens' patchset and push them together.
>> Tom
>>
> You probably recognized that I did not sent a patch with CONFIG_AT91_LEGACY
> support but I updated the otc570 board to new SoC access.
> http://lists.denx.de/pipermail/u-boot/2010-February/067691.html
> I guess, this is the best solution.
>
Yes.
This is a better solution.
Thanks
Tom
> Best regards,
> Daniel Gorsulowski
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH 1/9 V4] add new CONFIG_AT91_LEGACY
2010-02-12 6:47 ` Daniel Gorsulowski
2010-02-12 13:08 ` Tom
@ 2010-02-12 18:05 ` Tom
2010-02-13 11:12 ` Daniel Gorsulowski
1 sibling, 1 reply; 11+ messages in thread
From: Tom @ 2010-02-12 18:05 UTC (permalink / raw)
To: u-boot
Daniel Gorsulowski wrote:
> Tom wrote:
>> Daniel Gorsulowski wrote:
>>> Hello Tom,
>>>
>>> Tom wrote:
>>>> Jens Scharsig wrote:
>>>>> * 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>
>>>> This looks good.
>>>> The only problem is the new at91 target otc570 is breaking.
>>>>
>>>> Please take a look at errors in otc570
>>>>
>>>> otc570 :
>>>>
>>>> at91sam9263_devices.c: In function 'at91_serial0_hw_init':
>>>> at91sam9263_devices.c:40: warning: implicit declaration of function
>>>> 'at91_set_a_periph'
>>>> at91sam9263_devices.c: In function 'at91_spi0_hw_init':
>>>> at91sam9263_devices.c:96: warning: implicit declaration of function
>>>> 'at91_set_b_periph'
>>>> at91sam9263_devices.c:116: warning: implicit declaration of function
>>>> 'at91_set_pio_output'
>>>> clock.c: In function 'at91_clock_init':
>>>> clock.c:160: warning: implicit declaration of function 'at91_sys_read'
>>>> clock.c:160: error: 'AT91_CKGR_MCFR' undeclared (first use in this function)
>>>> clock.c:160: error: (Each undeclared identifier is reported only once
>>>> clock.c:160: error: for each function it appears in.)
>>>>
>>>> Tom
>>> This is caused by missing defines in include\configs\otc570.h:
>>> #define CONFIG_AT91_LEGACY
>>> and
>>> #define CONFIG_AT91_GPIO 1
>>>
>>> Should I send a patch to fix this, or should I wait for Jens patches coming
>>> mainline?
>>>
>> Please send a patch.
>> It should be a 2-3 liner.
>> I will combine it with Jens' patchset and push them together.
>> Tom
>>
> You probably recognized that I did not sent a patch with CONFIG_AT91_LEGACY
> support but I updated the otc570 board to new SoC access.
> http://lists.denx.de/pipermail/u-boot/2010-February/067691.html
> I guess, this is the best solution.
>
Daniel,
I still see an error wrt otc570.
Jens,
I have pushed your patchset of around 2/4 to arm/master.
There will be an error in the otc570 build.
Tom
> Best regards,
> Daniel Gorsulowski
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-02-13 11:12 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-23 11:03 [U-Boot] [PATCH 1/9 V3] add new CONFIG_AT91_LEGACY Jens Scharsig
2010-01-31 0:57 ` Tom
2010-01-31 11:24 ` [U-Boot] [PATCH 1/9 V3.1] " Jens Scharsig
2010-02-03 21:45 ` [U-Boot] [PATCH 1/9 V4] " Jens Scharsig
2010-02-06 14:19 ` Tom
2010-02-10 11:33 ` Daniel Gorsulowski
2010-02-11 13:56 ` Tom
2010-02-12 6:47 ` Daniel Gorsulowski
2010-02-12 13:08 ` Tom
2010-02-12 18:05 ` Tom
2010-02-13 11:12 ` Daniel Gorsulowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox