]> git.sur5r.net Git - u-boot/blobdiff - include/configs/otc570.h
Merge branch 'at91' of git://git.denx.de/u-boot-atmel
[u-boot] / include / configs / otc570.h
index bedaf1343153c22c3bf055f113b30f7c2efbe4be..4a1cedec0fe8dfdb9f46a74a1faafd3af42ca240 100644 (file)
@@ -35,6 +35,7 @@
 #define CONFIG_OTC570                  1       /* Board is esd OTC570 */
 #define CONFIG_ARM926EJS               1       /* This is an ARM926EJS Core */
 #define CONFIG_AT91SAM9263             1       /* It's an AT91SAM9263 SoC */
+#define CONFIG_SYS_AT91_MAIN_CLOCK     16000000/* 16.0 MHz crystal */
 #define CONFIG_SYS_HZ                  1000    /* decrementer freq */
 #define CONFIG_DISPLAY_BOARDINFO       1
 #define CONFIG_DISPLAY_CPUINFO         1       /* display cpu info and speed */
@@ -55,6 +56,7 @@
 /*
  * Hardware drivers
  */
+#define CONFIG_AT91_GPIO               1
 
 /* Console output */
 #define CONFIG_ATMEL_USART             1
 #ifdef CONFIG_SOFT_I2C
 #define CONFIG_I2C_CMD_TREE            1
 #define CONFIG_I2C_MULTI_BUS           1
-/* Enable peripheral clock and configure data and clock pins for pio */
+/* Configure data and clock pins for pio */
 #define I2C_INIT { \
-       at91_sys_write(AT91_PMC_PCER,   1 << AT91SAM9263_ID_PIOB |      \
-                                       1 << AT91SAM9263_ID_PIOCDE);    \
-       at91_set_gpio_output(AT91_PIN_PB4, 0);                          \
-       at91_set_gpio_output(AT91_PIN_PB5, 0);                          \
+       at91_set_pio_output(AT91_PIO_PORTB, 4, 0); \
+       at91_set_pio_output(AT91_PIO_PORTB, 5, 0); \
 }
+#define I2C_SOFT_DECLARATIONS
 /* Configure data pin as output */
-#define I2C_ACTIVE                     at91_set_gpio_output(AT91_PIN_PB4, 0)
+#define I2C_ACTIVE             at91_set_pio_output(AT91_PIO_PORTB, 4, 0)
 /* Configure data pin as input */
-#define I2C_TRISTATE                   at91_set_gpio_input(AT91_PIN_PB4, 0)
+#define I2C_TRISTATE           at91_set_pio_input(AT91_PIO_PORTB, 4, 0)
 /* Read data pin */
-#define I2C_READ                       at91_get_gpio_value(AT91_PIN_PB4)
+#define I2C_READ               at91_get_pio_value(AT91_PIO_PORTB, 4)
 /* Set data pin */
-#define I2C_SDA(bit)                   at91_set_gpio_value(AT91_PIN_PB4, bit)
+#define I2C_SDA(bit)           at91_set_pio_value(AT91_PIO_PORTB, 4, bit)
 /* Set clock pin */
-#define I2C_SCL(bit)                   at91_set_gpio_value(AT91_PIN_PB5, bit)
-#define I2C_DELAY                      udelay(2) /* 1/4 I2C clock duration */
+#define I2C_SCL(bit)           at91_set_pio_value(AT91_PIO_PORTB, 5, bit)
+#define I2C_DELAY              udelay(2) /* 1/4 I2C clock duration */
 #endif /* CONFIG_SOFT_I2C */
 
 #define CONFIG_BOOTDELAY               3
  * Command line configuration.
  */
 #include <config_cmd_default.h>
-#undef CONFIG_CMD_AUTOSCRIPT
 #undef CONFIG_CMD_FPGA
 #undef CONFIG_CMD_LOADS
 #undef CONFIG_CMD_IMLS
 #define CONFIG_SYS_NAND_MASK_ALE               (1 << 21)
 /* our CLE is AD22 */
 #define CONFIG_SYS_NAND_MASK_CLE               (1 << 22)
-#define CONFIG_SYS_NAND_ENABLE_PIN             AT91_PIN_PD15
-#define CONFIG_SYS_NAND_READY_PIN              AT91_PIN_PA22
+#define CONFIG_SYS_NAND_ENABLE_PIN             AT91_PIO_PORTD, 15
+#define CONFIG_SYS_NAND_READY_PIN              AT91_PIO_PORTA, 22
 #define CONFIG_SYS_64BIT_VSPRINTF              /* needed for nand_util.c */
 #endif