Skip to contentSkip to conversation

at91sam9/at91cap: improve clock framework

PATCH New Jean-Christophe PLAGNIOL-VILLARD 2 participants 5 messages Mar 31, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 at91sam9/at91cap: improve clock framework

calculate dynamically the clock rate and pllb setting for usb

---
 board/atmel/at91cap9adk/at91cap9adk.c     |    3 +-
 board/atmel/at91sam9261ek/at91sam9261ek.c |    3 +-
 board/atmel/at91sam9263ek/at91sam9263ek.c |    3 +-
 board/atmel/at91sam9rlek/at91sam9rlek.c   |    3 +-
 cpu/arm926ejs/at91/Makefile               |    2 +
 cpu/arm926ejs/at91/clock.c                |  196 +++++++++++++++++++++++++++++
 cpu/arm926ejs/at91/cpu.c                  |   14 ++
 drivers/spi/atmel_dataflash_spi.c         |    7 +-
 drivers/usb/atmel_usb.c                   |    3 +-
 include/asm-arm/arch-at91/clk.h           |   17 ++-
 include/asm-arm/arch-at91/hardware.h      |    3 +
 include/asm-arm/u-boot-arm.h              |    3 +
 include/configs/afeb9260.h                |    6 +-
 include/configs/at91cap9adk.h             |    7 +-
 include/configs/at91sam9260ek.h           |    9 +--
 include/configs/at91sam9261ek.h           |    6 +-
 include/configs/at91sam9263ek.h           |    7 +-
 include/configs/at91sam9rlek.h            |    6 +-
 lib_arm/board.c                           |    3 +
 19 files changed, 254 insertions(+), 47 deletions(-)
 create mode 100644 cpu/arm926ejs/at91/clock.c
 create mode 100644 cpu/arm926ejs/at91/cpu.c
board/atmel/at91cap9adk/at91cap9adk.c +2 -1
index e8025e7..f52edaa 100644
@@ -29,6 +29,7 @@
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91_pmc.h>
 #include <asm/arch/at91_rstc.h>
+#include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/io.h>
 #include <asm/arch/hardware.h>
@@ -283,7 +284,7 @@ void lcd_show_board_info(void)
 	lcd_printf ("at91support at atmel.com\n");
 	lcd_printf ("%s CPU at %s MHz\n",
 		AT91_CPU_NAME,
-		strmhz(temp, AT91_CPU_CLOCK));
+		strmhz(temp, get_cpu_clk_rate()));
 
 	dram_size = 0;
 	for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)
board/atmel/at91sam9261ek/at91sam9261ek.c +2 -1
index bae4092..a89cb8b 100644
@@ -29,6 +29,7 @@
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91_pmc.h>
 #include <asm/arch/at91_rstc.h>
+#include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/io.h>
 #include <lcd.h>
@@ -185,7 +186,7 @@ void lcd_show_board_info(void)
 	lcd_printf ("at91support at atmel.com\n");
 	lcd_printf ("%s CPU at %s MHz\n",
 		AT91_CPU_NAME,
-		strmhz(temp, AT91_CPU_CLOCK));
+		strmhz(temp, get_cpu_clk_rate()));
 
 	dram_size = 0;
 	for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)
board/atmel/at91sam9263ek/at91sam9263ek.c +2 -1
index 1d52845..57d5c95 100644
@@ -30,6 +30,7 @@
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91_pmc.h>
 #include <asm/arch/at91_rstc.h>
+#include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/io.h>
 #include <asm/arch/hardware.h>
@@ -206,7 +207,7 @@ void lcd_show_board_info(void)
 	lcd_printf ("at91support at atmel.com\n");
 	lcd_printf ("%s CPU at %s MHz\n",
 		AT91_CPU_NAME,
-		strmhz(temp, AT91_CPU_CLOCK));
+		strmhz(temp, get_cpu_clk_rate()));
 
 	dram_size = 0;
 	for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)
board/atmel/at91sam9rlek/at91sam9rlek.c +2 -1
index 908b9c8..7013ba2 100644
@@ -29,6 +29,7 @@
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91_pmc.h>
 #include <asm/arch/at91_rstc.h>
+#include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/io.h>
 #include <lcd.h>
@@ -157,7 +158,7 @@ void lcd_show_board_info(void)
 	lcd_printf ("at91support at atmel.com\n");
 	lcd_printf ("%s CPU at %s MHz\n",
 		AT91_CPU_NAME,
-		strmhz(temp, AT91_CPU_CLOCK));
+		strmhz(temp, get_cpu_clk_rate()));
 
 	dram_size = 0;
 	for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)
cpu/arm926ejs/at91/Makefile +2 -0
index 038af82..685cee1 100644
@@ -61,6 +61,8 @@ COBJS-y				+= at91sam9rl_serial.o
 COBJS-$(CONFIG_HAS_DATAFLASH)	+= at91sam9rl_spi.o
 endif
 COBJS-$(CONFIG_AT91_LED)	+= led.o
+COBJS-y += clock.o
+COBJS-y += cpu.o
 COBJS-y	+= timer.o
 SOBJS	= lowlevel_init.o
 
cpu/arm926ejs/at91/clock.c new file +196 -0

196 lines not on this page · raw message

cpu/arm926ejs/at91/cpu.c new file +14 -0
new file mode 100644
index 0000000..a9705cf
@@ -0,0 +1,14 @@
+#include <config.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/at91_pmc.h>
+#include <asm/arch/clk.h>
+#include <asm/arch/io.h>
+
+int arch_cpu_init(void)
+{
+#ifdef AT91_MAIN_CLOCK
+	return at91_clock_init(AT91_MAIN_CLOCK);
+#else
+	return at91_clock_init(0);
+#endif
+}
drivers/spi/atmel_dataflash_spi.c +4 -3
index 3eb252c..614965c 100644
@@ -21,6 +21,7 @@
 
 #include <common.h>
 #include <asm/arch/hardware.h>
+#include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/io.h>
 #include <asm/arch/at91_pio.h>
@@ -45,7 +46,7 @@ void AT91F_SpiInit(void)
 	writel(AT91_SPI_NCPHA |
 	       (AT91_SPI_DLYBS & DATAFLASH_TCSS) |
 	       (AT91_SPI_DLYBCT & DATAFLASH_TCHS) |
-	       ((AT91_MASTER_CLOCK / AT91_SPI_CLK) << 8),
+	       ((get_mck_clk_rate() / AT91_SPI_CLK) << 8),
 	       AT91_BASE_SPI + AT91_SPI_CSR(0));
 
 #ifdef CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1
@@ -53,7 +54,7 @@ void AT91F_SpiInit(void)
 	writel(AT91_SPI_NCPHA |
 	       (AT91_SPI_DLYBS & DATAFLASH_TCSS) |
 	       (AT91_SPI_DLYBCT & DATAFLASH_TCHS) |
-	       ((AT91_MASTER_CLOCK / AT91_SPI_CLK) << 8),
+	       ((get_mck_clk_rate() / AT91_SPI_CLK) << 8),
 	       AT91_BASE_SPI + AT91_SPI_CSR(1));
 #endif
 
@@ -62,7 +63,7 @@ void AT91F_SpiInit(void)
 	writel(AT91_SPI_NCPHA |
 	       (AT91_SPI_DLYBS & DATAFLASH_TCSS) |
 	       (AT91_SPI_DLYBCT & DATAFLASH_TCHS) |
-	       ((AT91_MASTER_CLOCK / AT91_SPI_CLK) << 8),
+	       ((get_mck_clk_rate() / AT91_SPI_CLK) << 8),
 	       AT91_BASE_SPI + AT91_SPI_CSR(3));
 #endif
 
drivers/usb/atmel_usb.c +2 -1
index 7c44ad0..c35319c 100644
@@ -28,6 +28,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/io.h>
 #include <asm/arch/at91_pmc.h>
+#include <asm/arch/clk.h>
 
 int usb_cpu_init(void)
 {
@@ -35,7 +36,7 @@ int usb_cpu_init(void)
 #if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
     defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20)
 	/* Enable PLLB */
-	at91_sys_write(AT91_CKGR_PLLBR, CONFIG_SYS_AT91_PLLB);
+	at91_sys_write(AT91_CKGR_PLLBR, get_pllb_init());
 	while ((at91_sys_read(AT91_PMC_SR) & AT91_PMC_LOCKB) != AT91_PMC_LOCKB)
 		;
 #endif
include/asm-arm/arch-at91/clk.h +13 -4
index 85ab68e..6aaf82e 100644
@@ -2,6 +2,7 @@
  * (C) Copyright 2007
  * Stelian Pop <[email protected]>
  * Lead Tech Design <www.leadtechdesign.com>
+ * Copyright (C) 2009 Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -26,24 +27,32 @@
 
 #include <asm/arch/hardware.h>
 
+unsigned long get_cpu_clk_rate(void);
+unsigned long get_main_clk_rate(void);
+unsigned long get_mck_clk_rate(void);
+unsigned long get_plla_clk_rate(void);
+unsigned long get_pllb_clk_rate(void);
+unsigned int  get_pllb_init(void);
+
 static inline unsigned long get_macb_pclk_rate(unsigned int dev_id)
 {
-	return AT91_MASTER_CLOCK;
+	return get_mck_clk_rate();
 }
 
 static inline unsigned long get_usart_clk_rate(unsigned int dev_id)
 {
-	return AT91_MASTER_CLOCK;
+	return get_mck_clk_rate();
 }
 
 static inline unsigned long get_lcdc_clk_rate(unsigned int dev_id)
 {
-	return AT91_MASTER_CLOCK;
+	return get_mck_clk_rate();
 }
 
 static inline unsigned long get_twi_clk_rate(unsigned int dev_id)
 {
-	return AT91_MASTER_CLOCK;
+	return get_mck_clk_rate();
 }
 
+int at91_clock_init(unsigned long main_clock);
 #endif /* __ASM_ARM_ARCH_CLK_H__ */
include/asm-arm/arch-at91/hardware.h +3 -0
index fff82e4..756a242 100644
@@ -70,4 +70,7 @@
 #define AT91_SDRAM_BASE		AT91_CHIPSELECT_1
 #endif
 
+/* Clocks */
+#define AT91_SLOW_CLOCK		32768		/* slow clock */
+
 #endif
include/asm-arm/u-boot-arm.h +3 -0
index 4ee5a32..e7d58fe 100644
@@ -40,6 +40,9 @@ extern ulong FIQ_STACK_START;	/* top of FIQ stack */
 int	cpu_init(void);
 int	cleanup_before_linux(void);
 
+/* cpu/.../arch/cpu.c */
+int	arch_cpu_init(void);
+
 /* board/.../... */
 int	board_init(void);
 int	dram_init (void);
include/configs/afeb9260.h +1 -5
index bcd8d35..13cb8b9 100644
@@ -27,15 +27,11 @@
 #define __CONFIG_H
 
 /* ARM asynchronous clock */
-#define AT91_MAIN_CLOCK		18429952	/* from 18.432 MHz crystal */
-#define AT91_MASTER_CLOCK	89999598	/* peripheral = main / 2 */
-#define CONFIG_SYS_AT91_PLLB	0x107c3e18	/* PLLB settings for USB */
 #define CONFIG_SYS_HZ		1000000		/* 1us resolution */
 
-#define AT91_SLOW_CLOCK		32768	/* slow clock */
-
 #define CONFIG_AT91SAM9260	1	/* It's an Atmel AT91SAM9260 SoC*/
 #define CONFIG_AFEB9260		1	/* on an AFEB9260 Board	*/
+#define CONFIG_ARCH_CPU_INIT
 #undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/
 
 #define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs	*/
include/configs/at91cap9adk.h +1 -6
index af81f1d..8958c9c 100644
@@ -29,17 +29,12 @@
 
 /* ARM asynchronous clock */
 #define AT91_CPU_NAME		"AT91CAP9"
-#define AT91_MAIN_CLOCK		12000000	/* 12 MHz crystal */
-#define AT91_MASTER_CLOCK	100000000	/* peripheral */
-#define AT91_CPU_CLOCK		200000000	/* cpu */
-#define CONFIG_SYS_AT91_PLLB	0x10073e01	/* PLLB settings for USB */
 #define CONFIG_SYS_HZ		1000000		/* 1us resolution */
 
-#define AT91_SLOW_CLOCK		32768	/* slow clock */
-
 #define CONFIG_ARM926EJS	1	/* This is an ARM926EJS Core	*/
 #define CONFIG_AT91CAP9		1	/* It's an Atmel AT91CAP9 SoC	*/
 #define CONFIG_AT91CAP9ADK	1	/* on an AT91CAP9ADK Board	*/
+#define CONFIG_ARCH_CPU_INIT
 #undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/
 
 #define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs	*/
include/configs/at91sam9260ek.h +1 -8
index ac58f27..b06c819 100644
@@ -28,26 +28,19 @@
 #define __CONFIG_H
 
 /* ARM asynchronous clock */
-#define AT91_MAIN_CLOCK		18432000	/* 18.432 MHz crystal */
-#define CONFIG_SYS_AT91_PLLB	0x107c3e18	/* PLLB settings for USB */
 #define CONFIG_SYS_HZ		1000000		/* 1us resolution */
 
-#define AT91_SLOW_CLOCK		32768	/* slow clock */
-
 #define CONFIG_ARM926EJS	1	/* This is an ARM926EJS Core	*/
 
 #ifdef CONFIG_AT91SAM9G20EK
 #define AT91_CPU_NAME		"AT91SAM9G20"
-#define AT91_MASTER_CLOCK	132000000	/* peripheral */
-#define AT91_CPU_CLOCK		396000000	/* cpu */
 #define CONFIG_AT91SAM9G20	1	/* It's an Atmel AT91SAM9G20 SoC*/
 #else
 #define AT91_CPU_NAME		"AT91SAM9260"
-#define AT91_MASTER_CLOCK	100000000	/* peripheral */
-#define AT91_CPU_CLOCK		200000000	/* cpu */
 #define CONFIG_AT91SAM9260	1	/* It's an Atmel AT91SAM9260 SoC*/
 #endif
 
+#define CONFIG_ARCH_CPU_INIT
 #undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/
 
 #define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs	*/
include/configs/at91sam9261ek.h +1 -5
index 57bb9fa..7dfe126 100644
@@ -29,16 +29,12 @@
 
 /* ARM asynchronous clock */
 #define AT91_CPU_NAME		"AT91SAM9261"
-#define AT91_MAIN_CLOCK		18432000	/* 18.432 MHz crystal */
-#define AT91_MASTER_CLOCK	100000000	/* peripheral */
-#define AT91_CPU_CLOCK		200000000	/* cpu */
 #define CONFIG_SYS_HZ		1000000		/* 1us resolution */
 
-#define AT91_SLOW_CLOCK		32768	/* slow clock */
-
 #define CONFIG_ARM926EJS	1	/* This is an ARM926EJS Core	*/
 #define CONFIG_AT91SAM9261	1	/* It's an Atmel AT91SAM9261 SoC*/
 #define CONFIG_AT91SAM9261EK	1	/* on an AT91SAM9261EK Board	*/
+#define CONFIG_ARCH_CPU_INIT
 #undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/
 
 #define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs	*/
include/configs/at91sam9263ek.h +1 -6
index fc87241..e29fc57 100644
@@ -29,17 +29,12 @@
 
 /* ARM asynchronous clock */
 #define AT91_CPU_NAME		"AT91SAM9263"
-#define AT91_MAIN_CLOCK		16367660	/* 16.367 MHz crystal */
-#define AT91_MASTER_CLOCK	100000000	/* peripheral */
-#define AT91_CPU_CLOCK		200000000	/* cpu */
-#define CONFIG_SYS_AT91_PLLB	0x133a3e8d	/* PLLB settings for USB */
 #define CONFIG_SYS_HZ		1000000		/* 1us resolution */
 
-#define AT91_SLOW_CLOCK		32768	/* slow clock */
-
 #define CONFIG_ARM926EJS	1	/* This is an ARM926EJS Core	*/
 #define CONFIG_AT91SAM9263	1	/* It's an Atmel AT91SAM9263 SoC*/
 #define CONFIG_AT91SAM9263EK	1	/* on an AT91SAM9263EK Board	*/
+#define CONFIG_ARCH_CPU_INIT
 #undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/
 
 #define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs	*/
include/configs/at91sam9rlek.h +1 -5
index cef98e4..a670e35 100644
@@ -29,16 +29,12 @@
 
 /* ARM asynchronous clock */
 #define AT91_CPU_NAME		"AT91SAM9RL"
-#define AT91_MAIN_CLOCK		12000000	/* 12 MHz crystal */
-#define AT91_MASTER_CLOCK	100000000	/* peripheral */
-#define AT91_CPU_CLOCK		200000000	/* cpu */
 #define CONFIG_SYS_HZ		1000000		/* 1us resolution */
 
-#define AT91_SLOW_CLOCK		32768	/* slow clock */
-
 #define CONFIG_ARM926EJS	1	/* This is an ARM926EJS Core	*/
 #define CONFIG_AT91SAM9RL	1	/* It's an Atmel AT91SAM9RL SoC*/
 #define CONFIG_AT91SAM9RLEK	1	/* on an AT91SAM9RLEK Board	*/
+#define CONFIG_ARCH_CPU_INIT
 #undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/
 
 #define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs	*/
lib_arm/board.c +3 -0
index 3dfaec0..6847ea8 100644
@@ -262,6 +262,9 @@ int print_cpuinfo (void); /* test-only */
 
 init_fnc_t *init_sequence[] = {
 	cpu_init,		/* basic cpu dependent setup */
+#if defined(CONFIG_ARCH_CPU_INIT)
+	arch_cpu_init,		/* basic arch cpu dependent setup */
+#endif
 	board_init,		/* basic board dependent setup */
 	interrupt_init,		/* set up exceptions */
 	env_init,		/* initialize environment */
Signature · 1 line
1.6.1.3
#1 lore raw

PATCH 1/1 at91sam9/at91cap: improve clock framework

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 18 lines · In message <[email protected]> you wrote:

calculate dynamically the clock rate and pllb setting for usb

---
 board/atmel/at91cap9adk/at91cap9adk.c     |    3 +-
 board/atmel/at91sam9261ek/at91sam9261ek.c |    3 +-
 board/atmel/at91sam9263ek/at91sam9263ek.c |    3 +-
 board/atmel/at91sam9rlek/at91sam9rlek.c   |    3 +-
 cpu/arm926ejs/at91/Makefile               |    2 +
 cpu/arm926ejs/at91/clock.c                |  196 +++++++++++++++++++++++++++++
 cpu/arm926ejs/at91/cpu.c                  |   14 ++
 drivers/spi/atmel_dataflash_spi.c         |    7 +-
 drivers/usb/atmel_usb.c                   |    3 +-
 include/asm-arm/arch-at91/clk.h           |   17 ++-
 include/asm-arm/arch-at91/hardware.h      |    3 +
 include/asm-arm/u-boot-arm.h              |    3 +
 include/configs/afeb9260.h                |    6 +-
 include/configs/at91cap9adk.h             |    7 +-
Quoted 8 lines
 include/configs/at91sam9260ek.h           |    9 +--
 include/configs/at91sam9261ek.h           |    6 +-
 include/configs/at91sam9263ek.h           |    7 +-
 include/configs/at91sam9rlek.h            |    6 +-
 lib_arm/board.c                           |    3 +
 19 files changed, 254 insertions(+), 47 deletions(-)
 create mode 100644 cpu/arm926ejs/at91/clock.c
 create mode 100644 cpu/arm926ejs/at91/cpu.c

What is the impact of this patch on the memory footprint of the system?

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The perversity of nature is nowhere better demonstrated by  the  fact
that,  when  exposed to the same atmosphere, bread becomes hard while
crackers become soft.
#2 lore raw

PATCH 1/1 at91sam9/at91cap: improve clock framework

Quoted 30 lines · Wolfgang Denk

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 18 lines · In message <[email protected]> you wrote:

calculate dynamically the clock rate and pllb setting for usb

---
 board/atmel/at91cap9adk/at91cap9adk.c     |    3 +-
 board/atmel/at91sam9261ek/at91sam9261ek.c |    3 +-
 board/atmel/at91sam9263ek/at91sam9263ek.c |    3 +-
 board/atmel/at91sam9rlek/at91sam9rlek.c   |    3 +-
 cpu/arm926ejs/at91/Makefile               |    2 +
 cpu/arm926ejs/at91/clock.c                |  196 +++++++++++++++++++++++++++++
 cpu/arm926ejs/at91/cpu.c                  |   14 ++
 drivers/spi/atmel_dataflash_spi.c         |    7 +-
 drivers/usb/atmel_usb.c                   |    3 +-
 include/asm-arm/arch-at91/clk.h           |   17 ++-
 include/asm-arm/arch-at91/hardware.h      |    3 +
 include/asm-arm/u-boot-arm.h              |    3 +
 include/configs/afeb9260.h                |    6 +-
 include/configs/at91cap9adk.h             |    7 +-
Quoted 8 lines
 include/configs/at91sam9260ek.h           |    9 +--
 include/configs/at91sam9261ek.h           |    6 +-
 include/configs/at91sam9263ek.h           |    7 +-
 include/configs/at91sam9rlek.h            |    6 +-
 lib_arm/board.c                           |    3 +
 19 files changed, 254 insertions(+), 47 deletions(-)
 create mode 100644 cpu/arm926ejs/at91/clock.c
 create mode 100644 cpu/arm926ejs/at91/cpu.c
Quoted 2 lines

What is the impact of this patch on the memory footprint of the system?

708 bytes on the 9263ek

Best Regards,
J.

#3 lore raw

PATCH 1/1 at91sam9/at91cap: improve clock framework

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 31 lines · In message <[email protected]> you wrote:
Quoted 30 lines · Wolfgang Denk

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 26 lines · In message <[email protected]> you wrote:

calculate dynamically the clock rate and pllb setting for usb

---
 board/atmel/at91cap9adk/at91cap9adk.c     |    3 +-
 board/atmel/at91sam9261ek/at91sam9261ek.c |    3 +-
 board/atmel/at91sam9263ek/at91sam9263ek.c |    3 +-
 board/atmel/at91sam9rlek/at91sam9rlek.c   |    3 +-
 cpu/arm926ejs/at91/Makefile               |    2 +
 cpu/arm926ejs/at91/clock.c                |  196 +++++++++++++++++++++++++++++
 cpu/arm926ejs/at91/cpu.c                  |   14 ++
 drivers/spi/atmel_dataflash_spi.c         |    7 +-
 drivers/usb/atmel_usb.c                   |    3 +-
 include/asm-arm/arch-at91/clk.h           |   17 ++-
 include/asm-arm/arch-at91/hardware.h      |    3 +
 include/asm-arm/u-boot-arm.h              |    3 +
 include/configs/afeb9260.h                |    6 +-
 include/configs/at91cap9adk.h             |    7 +-
 include/configs/at91sam9260ek.h           |    9 +--
 include/configs/at91sam9261ek.h           |    6 +-
 include/configs/at91sam9263ek.h           |    7 +-
 include/configs/at91sam9rlek.h            |    6 +-
 lib_arm/board.c                           |    3 +
 19 files changed, 254 insertions(+), 47 deletions(-)
 create mode 100644 cpu/arm926ejs/at91/clock.c
 create mode 100644 cpu/arm926ejs/at91/cpu.c
Quoted 3 lines
Quoted 2 lines

What is the impact of this patch on the memory footprint of the system?

708 bytes on the 9263ek

708 bytes more or less? And how much on the others processors?

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Always leave room to add an explanation if it doesn't work out.
#4 lore raw

PATCH 1/1 at91sam9/at91cap: improve clock framework

Quoted 34 lines · Wolfgang Denk

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 31 lines · In message <[email protected]> you wrote:
Quoted 30 lines · Wolfgang Denk

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 26 lines · In message <[email protected]> you wrote:

calculate dynamically the clock rate and pllb setting for usb

---
 board/atmel/at91cap9adk/at91cap9adk.c     |    3 +-
 board/atmel/at91sam9261ek/at91sam9261ek.c |    3 +-
 board/atmel/at91sam9263ek/at91sam9263ek.c |    3 +-
 board/atmel/at91sam9rlek/at91sam9rlek.c   |    3 +-
 cpu/arm926ejs/at91/Makefile               |    2 +
 cpu/arm926ejs/at91/clock.c                |  196 +++++++++++++++++++++++++++++
 cpu/arm926ejs/at91/cpu.c                  |   14 ++
 drivers/spi/atmel_dataflash_spi.c         |    7 +-
 drivers/usb/atmel_usb.c                   |    3 +-
 include/asm-arm/arch-at91/clk.h           |   17 ++-
 include/asm-arm/arch-at91/hardware.h      |    3 +
 include/asm-arm/u-boot-arm.h              |    3 +
 include/configs/afeb9260.h                |    6 +-
 include/configs/at91cap9adk.h             |    7 +-
 include/configs/at91sam9260ek.h           |    9 +--
 include/configs/at91sam9261ek.h           |    6 +-
 include/configs/at91sam9263ek.h           |    7 +-
 include/configs/at91sam9rlek.h            |    6 +-
 lib_arm/board.c                           |    3 +
 19 files changed, 254 insertions(+), 47 deletions(-)
 create mode 100644 cpu/arm926ejs/at91/clock.c
 create mode 100644 cpu/arm926ejs/at91/cpu.c
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines

What is the impact of this patch on the memory footprint of the system?

708 bytes on the 9263ek

708 bytes more or less? And how much on the others processors?

more

9260ek  => +704
9261ek  => +680
9263ek  => +708
9rlek   => +648

cap9adk => +708

based on the pm9623 and pm9261 precedently patch it will be less or the same

Best Regards,
J.