Skip to contentSkip to conversation

Setup extra MIMC200 chip selects

PATCH New Mark Jackson 2 participants 2 messages Feb 13, 2009 – Feb 23, 2009

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Setup extra MIMC200 chip selects

Added code to setup the extra Flash and FRAM chip selects as used on the MIMC200 board.

V2 moves the init code from the common "cpu.c" file into the board specific setup file.

---
  board/mimc/mimc200/mimc200.c |   14 ++++++++++++++
  1 files changed, 14 insertions(+), 0 deletions(-)
board/mimc/mimc200/mimc200.c +14 -0
index 8516dcb..423238b 100644
@@ -29,6 +29,8 @@
  #include <asm/arch/hmatrix.h>
  #include <lcd.h>
 
+#include "../../../cpu/at32ap/hsmc3.h"
+
  #define SM_PM_GCCTRL				0x0060
 
  DECLARE_GLOBAL_DATA_PTR;
@@ -98,6 +100,18 @@ int board_early_init_f(void)
  	/* release phys reset */
  	gpio_set_value(GPIO_PIN_PC18, 0);	/* PHY RESET (Release)	*/
 
+	/* setup Data Flash chip select (NCS2) */
+	hsmc3_writel(MODE2, 0x20121003);
+	hsmc3_writel(CYCLE2, 0x000a0009);
+	hsmc3_writel(PULSE2, 0x0a060806);
+	hsmc3_writel(SETUP2, 0x00030102);
+
+	/* setup FRAM chip select (NCS3) */
+	hsmc3_writel(MODE3, 0x10120001);
+	hsmc3_writel(CYCLE3, 0x001e001d);
+	hsmc3_writel(PULSE3, 0x08040704);
+	hsmc3_writel(SETUP3, 0x02050204);
+
  #if defined(CONFIG_MACB)
  	/* init macb0 pins */
  	gpio_select_periph_A(GPIO_PIN_PC3,  0);	/* TXD0	*/
#1 lore raw

PATCH v2 1/1 Setup extra MIMC200 chip selects

Quoted 7 lines · Mark Jackson

Added code to setup the extra Flash and FRAM chip selects as used on the MIMC200 board.

V2 moves the init code from the common "cpu.c" file into the board specific setup file.

Applied to mimc200 after fixing up some whitespace damage, thanks.

board/mimc/mimc200/mimc200.c line 32

Quoted 13 lines
---
  board/mimc/mimc200/mimc200.c |   14 ++++++++++++++
  1 files changed, 14 insertions(+), 0 deletions(-)
board/mimc/mimc200/mimc200.c +1 -0
index 8516dcb..423238b 100644
@@ -29,6 +29,8 @@
  #include <asm/arch/hmatrix.h>
  #include <lcd.h>
 
+#include "../../../cpu/at32ap/hsmc3.h"

it would probably be better if this file was moved somewhere under include/asm-avr32, however.

Haavard