guruplug.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * (C) Copyright 2009-2014
  3. * Gerald Kerma <dreagle@doukki.net>
  4. * Marvell Semiconductor <www.marvell.com>
  5. * Written-by: Siddarth Gore <gores@marvell.com>
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #ifndef _CONFIG_GURUPLUG_H
  10. #define _CONFIG_GURUPLUG_H
  11. /*
  12. * High Level Configuration Options (easy to change)
  13. */
  14. #define CONFIG_SHEEVA_88SV131 1 /* CPU Core subversion */
  15. #define CONFIG_MACH_GURUPLUG /* Machine type */
  16. /*
  17. * Standard filesystems
  18. */
  19. #define CONFIG_SYS_MVFS
  20. /*
  21. * mv-plug-common.h should be defined after CMD configs since it used them
  22. * to enable certain macros
  23. */
  24. #include "mv-plug-common.h"
  25. /*
  26. * Environment variables configurations
  27. */
  28. #ifdef CONFIG_CMD_NAND
  29. #define CONFIG_ENV_IS_IN_NAND 1
  30. #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K */
  31. #else
  32. #define CONFIG_ENV_IS_NOWHERE 1 /* if env in SDRAM */
  33. #endif
  34. /*
  35. * max 4k env size is enough, but in case of nand
  36. * it has to be rounded to sector size
  37. */
  38. #define CONFIG_ENV_SIZE 0x20000 /* 128k */
  39. #define CONFIG_ENV_OFFSET 0xE0000 /* env starts here */
  40. /*
  41. * Default environment variables
  42. */
  43. #define CONFIG_BOOTCOMMAND \
  44. "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
  45. "ubi part root; " \
  46. "ubifsmount ubi:rootfs; " \
  47. "ubifsload 0x800000 ${kernel}; " \
  48. "ubifsload 0x700000 ${fdt}; " \
  49. "ubifsumount; " \
  50. "fdt addr 0x700000; fdt resize; fdt chosen; " \
  51. "bootz 0x800000 - 0x700000"
  52. #define CONFIG_MTDPARTS \
  53. "mtdparts=orion_nand:" \
  54. "896K(uboot),128K(uboot_env)," \
  55. "-@1M(root)\0"
  56. #define CONFIG_EXTRA_ENV_SETTINGS \
  57. "console=console=ttyS0,115200\0" \
  58. "mtdids=nand0=orion_nand\0" \
  59. "mtdparts="CONFIG_MTDPARTS \
  60. "kernel=/boot/zImage\0" \
  61. "fdt=/boot/guruplug-server-plus.dtb\0" \
  62. "bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs rw\0"
  63. #define MTDIDS_DEFAULT "nand0=orion_nand"
  64. #define MTDPARTS_DEFAULT \
  65. "mtdparts="CONFIG_MTDPARTS
  66. /*
  67. * Ethernet Driver configuration
  68. */
  69. #ifdef CONFIG_CMD_NET
  70. #define CONFIG_MVGBE_PORTS {1, 1} /* enable both ports */
  71. #define CONFIG_PHY_BASE_ADR 0
  72. #endif /* CONFIG_CMD_NET */
  73. /*
  74. * SATA Driver configuration
  75. */
  76. #ifdef CONFIG_MVSATA_IDE
  77. #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
  78. #endif /*CONFIG_MVSATA_IDE*/
  79. #endif /* _CONFIG_GURUPLUG_H */