]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - include/configs/inka4x0.h
Move defaults from config_cmd_default.h to Kconfig
[people/ms/u-boot.git] / include / configs / inka4x0.h
index 405234cc851700aa84a781f7e0763e0b285a3386..c7bf531f6a86082e0061295bead94026779d86ac 100644 (file)
@@ -1,24 +1,11 @@
 /*
+ * (C) Copyright 2009
+ * Detlev Zundel, DENX Software Engineering, dzu@denx.de.
+ *
  * (C) Copyright 2003-2005
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #ifndef __CONFIG_H
  * (easy to change)
  */
 
-#define CONFIG_MPC5xxx         1       /* This is an MPC5xxx CPU               */
-#define CONFIG_MPC5200         1       /* (more precisely an MPC5200 CPU)      */
-#define CONFIG_INKA4X0         1       /* INKA4x0 board                        */
+#define CONFIG_MPC5200         1       /* This is an MPC5200 CPU       */
+#define CONFIG_INKA4X0         1       /* INKA4x0 board                */
 
-#define CONFIG_SYS_MPC5XXX_CLKIN       33000000 /* ... running at 33.000000MHz         */
+/*
+ * Valid values for CONFIG_SYS_TEXT_BASE are:
+ * 0xFFE00000  boot low
+ * 0x00100000  boot from RAM (for testing only)
+ */
+#ifndef CONFIG_SYS_TEXT_BASE
+#define CONFIG_SYS_TEXT_BASE   0xFFE00000      /* Standard: boot low */
+#endif
+#define CONFIG_SYS_LDSCRIPT    "arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds"
 
-#define BOOTFLAG_COLD          0x01    /* Normal Power-On: Boot from FLASH     */
-#define BOOTFLAG_WARM          0x02    /* Software reboot                      */
+#define CONFIG_SYS_MPC5XXX_CLKIN       33000000 /* ... running at 33.000000MHz         */
 
 #define CONFIG_MISC_INIT_F     1       /* Use misc_init_f()                    */
 
 /*
  * Command line configuration.
  */
-#include <config_cmd_default.h>
-
+#define CONFIG_CMD_DATE
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_EXT2
 #define CONFIG_CMD_FAT
 #define CONFIG_CMD_IDE
-#define CONFIG_CMD_NFS
 #define CONFIG_CMD_PCI
+#define CONFIG_CMD_PING
 #define CONFIG_CMD_SNTP
 #define CONFIG_CMD_USB
 
-
 #define        CONFIG_TIMESTAMP        1       /* Print image info with timestamp */
 
-#if (TEXT_BASE == 0xFFE00000)          /* Boot low */
+#if (CONFIG_SYS_TEXT_BASE == 0xFFE00000)               /* Boot low */
 #   define CONFIG_SYS_LOWBOOT          1
 #endif
 
 
 #undef CONFIG_BOOTARGS
 
-#define        CONFIG_ETHADDR          00:a0:a4:03:00:00
-#define        CONFIG_OVERWRITE_ETHADDR_ONCE
-
 #define        CONFIG_IPADDR           192.168.100.2
 #define        CONFIG_SERVERIP         192.168.100.1
 #define        CONFIG_NETMASK          255.255.255.0
 #define HOSTNAME               inka4x0
-#define CONFIG_BOOTFILE                /tftpboot/inka4x0/uImage
-#define        CONFIG_ROOTPATH         /opt/eldk/ppc_6xx
+#define CONFIG_BOOTFILE                "/tftpboot/inka4x0/uImage"
+#define        CONFIG_ROOTPATH         "/opt/eldk/ppc_6xx"
 
 #define CONFIG_EXTRA_ENV_SETTINGS                                      \
        "netdev=eth0\0"                                                 \
 
 /* Use ON-Chip SRAM until RAM will be available */
 #define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#ifdef CONFIG_POST
+
 /* preserve space for the post_word at end of on-chip SRAM */
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_POST_SIZE
+#define MPC5XXX_SRAM_POST_SIZE (MPC5XXX_SRAM_SIZE - 4)
+
+#ifdef CONFIG_POST
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_POST_SIZE
 #else
-#define CONFIG_SYS_INIT_RAM_END        MPC5XXX_SRAM_SIZE
+#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE
 #endif
 
-
-#define CONFIG_SYS_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
-#define CONFIG_SYS_MONITOR_BASE    TEXT_BASE
+#define CONFIG_SYS_MONITOR_BASE    CONFIG_SYS_TEXT_BASE
 #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
 #   define CONFIG_SYS_RAMBOOT          1
 #endif
  * Ethernet configuration
  */
 #define CONFIG_MPC5xxx_FEC     1
+#define CONFIG_MPC5xxx_FEC_MII100
 /*
- * Define CONFIG_FEC_10MBIT to force FEC at 10Mb
+ * Define CONFIG_MPC5xxx_FEC_MII10 to force FEC at 10Mb
  */
-/* #define CONFIG_FEC_10MBIT 1 */
+/* #define CONFIG_MPC5xxx_FEC_MII10 */
 #define CONFIG_PHY_ADDR                0x00
 #define CONFIG_MII
 
  *     01 -> CAN1 on I2C1, CAN2 on Tmr0/1 do not use on TQM5200 with onboard
  *           EEPROM
  * use PSC1 as UART: Bits 28-31 (mask: 0x00000007): 0100
- * use PSC6_1 and PSC6_3 as GPIO: Bits 9:11 (mask: 0x07000000):
- *     011 -> PSC6 could not be used as UART or CODEC. IrDA still possible.
+ * use PSC2 as UART: Bits 24-27 (mask: 0x00000070): 0100
+ * use PSC3 as UART: Bits 20-23 (mask: 0x00000700): 0100
+ * use PSC6 as UART: Bits  9-11 (mask: 0x00700000): 0101
  */
-#define CONFIG_SYS_GPS_PORT_CONFIG     0x01001004
+#define CONFIG_SYS_GPS_PORT_CONFIG     0x01501444
 
 /*
  * RTC configuration
  */
-#define CONFIG_RTC_MPC5200     1       /* use internal MPC5200 RTC */
+#define CONFIG_RTC_RTC4543     1       /* use external RTC */
+
+/*
+ * Software (bit-bang) three wire serial configuration
+ *
+ * Note that we need the ifdefs because otherwise compilation of
+ * mkimage.c fails.
+ */
+#define CONFIG_SOFT_TWS                1
+
+#ifdef TWS_IMPLEMENTATION
+#include <mpc5xxx.h>
+#include <asm/io.h>
+
+#define TWS_CE         MPC5XXX_GPIO_WKUP_PSC1_4 /* GPIO_WKUP_0 */
+#define TWS_WR         MPC5XXX_GPIO_WKUP_PSC2_4 /* GPIO_WKUP_1 */
+#define TWS_DATA       MPC5XXX_GPIO_SINT_PSC3_4 /* GPIO_SINT_0 */
+#define TWS_CLK                MPC5XXX_GPIO_SINT_PSC3_5 /* GPIO_SINT_1 */
+
+static inline void tws_ce(unsigned bit)
+{
+       struct mpc5xxx_wu_gpio *wu_gpio =
+               (struct mpc5xxx_wu_gpio *)MPC5XXX_WU_GPIO;
+       if (bit)
+               setbits_8(&wu_gpio->dvo, TWS_CE);
+       else
+               clrbits_8(&wu_gpio->dvo, TWS_CE);
+}
+
+static inline void tws_wr(unsigned bit)
+{
+       struct mpc5xxx_wu_gpio *wu_gpio =
+               (struct mpc5xxx_wu_gpio *)MPC5XXX_WU_GPIO;
+       if (bit)
+               setbits_8(&wu_gpio->dvo, TWS_WR);
+       else
+               clrbits_8(&wu_gpio->dvo, TWS_WR);
+}
+
+static inline void tws_clk(unsigned bit)
+{
+       struct mpc5xxx_gpio *gpio =
+               (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
+       if (bit)
+               setbits_8(&gpio->sint_dvo, TWS_CLK);
+       else
+               clrbits_8(&gpio->sint_dvo, TWS_CLK);
+}
+
+static inline void tws_data(unsigned bit)
+{
+       struct mpc5xxx_gpio *gpio =
+               (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
+       if (bit)
+               setbits_8(&gpio->sint_dvo, TWS_DATA);
+       else
+               clrbits_8(&gpio->sint_dvo, TWS_DATA);
+}
+
+static inline unsigned tws_data_read(void)
+{
+       struct mpc5xxx_gpio *gpio =
+                       (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
+       return !!(in_8(&gpio->sint_ival) & TWS_DATA);
+}
+
+static inline void tws_data_config_output(unsigned output)
+{
+       struct mpc5xxx_gpio *gpio =
+               (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
+       if (output)
+               setbits_8(&gpio->sint_ddr, TWS_DATA);
+       else
+               clrbits_8(&gpio->sint_ddr, TWS_DATA);
+}
+#endif /* TWS_IMPLEMENTATION */
 
 /*
  * Miscellaneous configurable options
  */
 #define CONFIG_SYS_LONGHELP                    /* undef to save memory     */
-#define CONFIG_SYS_PROMPT              "=> "   /* Monitor Command Prompt   */
 #if defined(CONFIG_CMD_KGDB)
 #define CONFIG_SYS_CBSIZE              1024    /* Console I/O Buffer Size  */
 #else
 
 #define CONFIG_SYS_LOAD_ADDR           0x100000        /* default load address */
 
-#define CONFIG_SYS_HZ                  1000    /* decrementer freq: 1 ms ticks */
-
 /*
  * Enable loopw command.
  */
 /*
  * Various low-level settings
  */
-#if defined(CONFIG_MPC5200)
 #define CONFIG_SYS_HID0_INIT           HID0_ICE | HID0_ICFI
 #define CONFIG_SYS_HID0_FINAL          HID0_ICE
-#else
-#define CONFIG_SYS_HID0_INIT           0
-#define CONFIG_SYS_HID0_FINAL          0
-#endif
 
 #define CONFIG_SYS_BOOTCS_START        CONFIG_SYS_FLASH_BASE
 #define CONFIG_SYS_BOOTCS_SIZE         CONFIG_SYS_FLASH_SIZE
 #undef CONFIG_IDE_8xx_DIRECT           /* Direct IDE    not supported  */
 #undef CONFIG_IDE_LED                  /* LED   for ide not supported  */
 
-#define        CONFIG_IDE_RESET                /* reset for ide supported      */
 #define CONFIG_IDE_PREINIT
 
 #define CONFIG_SYS_IDE_MAXBUS          1       /* max. 1 IDE bus               */