003-add-olinuxino.patch 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. --- /dev/null
  2. +++ b/linux_prep/board/imx23_olinuxino_dev.c
  3. @@ -0,0 +1,54 @@
  4. +/*
  5. + * Platform specific data for the IMX23_OLINUXINO development board
  6. + *
  7. + * Fadil Berisha <[email protected]>
  8. + *
  9. + * Copyright 2008 SigmaTel, Inc
  10. + * Copyright 2008 Embedded Alley Solutions, Inc
  11. + * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved.
  12. + *
  13. + * This file is licensed under the terms of the GNU General Public License
  14. + * version 2. This program is licensed "as is" without any warranty of any
  15. + * kind, whether express or implied.
  16. + *
  17. + * http://www.opensource.org/licenses/gpl-license.html
  18. + * http://www.gnu.org/copyleft/gpl.html
  19. + */
  20. +#include <setup.h>
  21. +#include <keys.h>
  22. +#include <lradc_buttons.h>
  23. +
  24. +/************************************************
  25. + * LRADC keyboard data *
  26. + ************************************************/
  27. +int lradc_keypad_ch = LRADC_CH0;
  28. +int lradc_vddio_ch = LRADC_CH6;
  29. +
  30. +struct lradc_keycode lradc_keycodes[] = {
  31. + { 100, KEY4 },
  32. + { 306, KEY5 },
  33. + { 601, KEY6 },
  34. + { 932, KEY7 },
  35. + { 1260, KEY8 },
  36. + { 1424, KEY9 },
  37. + { 1707, KEY10 },
  38. + { 2207, KEY11 },
  39. + { 2525, KEY12 },
  40. + { 2831, KEY13 },
  41. + { 3134, KEY14 },
  42. + { -1, 0 },
  43. +};
  44. +
  45. +/************************************************
  46. + * Magic key combinations for Armadillo *
  47. + ************************************************/
  48. +u32 magic_keys[MAGIC_KEY_NR] = {
  49. + [MAGIC_KEY1] = KEY4,
  50. + [MAGIC_KEY2] = KEY6,
  51. + [MAGIC_KEY3] = KEY10,
  52. +};
  53. +
  54. +/************************************************
  55. + * Default command line *
  56. + ************************************************/
  57. +char cmdline_def[] = "console=ttyAMA0,115200";
  58. --- /dev/null
  59. +++ b/linux_prep/cmdlines/imx23_olinuxino_dev.txt
  60. @@ -0,0 +1 @@
  61. +noinitrd console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait ssp1=mmc
  62. --- a/linux_prep/core/setup.c
  63. +++ b/linux_prep/core/setup.c
  64. @@ -84,6 +84,8 @@ static void *memcpy(void *s1, const void
  65. #include "../../mach-mx28/includes/registers/regsrtc.h"
  66. #elif defined(STMP378X)
  67. #include "../../mach-mx23/includes/registers/regsrtc.h"
  68. +#elif defined(IMX23_OLINUXINO)
  69. +#include "../../mach-mx23/includes/registers/regsrtc.h"
  70. #endif
  71. #define NAND_SECONDARY_BOOT 0x00000002
  72. --- a/linux_prep/include/mx23/platform.h
  73. +++ b/linux_prep/include/mx23/platform.h
  74. @@ -19,6 +19,10 @@
  75. #if defined (BOARD_STMP378X_DEV)
  76. #define MACHINE_ID 0xa45
  77. +
  78. +#elif defined (BOARD_IMX23_OLINUXINO_DEV)
  79. +#define MACHINE_ID 0x1009
  80. +
  81. #else
  82. #error "Allocate a machine ID for your board"
  83. #endif
  84. --- a/linux_prep/Makefile
  85. +++ b/linux_prep/Makefile
  86. @@ -69,6 +69,11 @@ ARCH = mx28
  87. HW_OBJS = $(LRADC_OBJS)
  88. CFLAGS += -DMX28 -DBOARD_MX28_EVK
  89. endif
  90. +ifeq ($(BOARD), imx23_olinuxino_dev)
  91. +ARCH = mx23
  92. +HW_OBJS = $(LRADC_OBJS)
  93. +CFLAGS += -DIMX23_OLINUXINO -DBOARD_IMX23_OLINUXINO_DEV
  94. +endif
  95. # Generic code
  96. CORE_OBJS = entry.o resume.o cmdlines.o setup.o keys.o
  97. --- a/Makefile
  98. +++ b/Makefile
  99. @@ -3,9 +3,9 @@ MEM_TYPE ?= MEM_DDR1
  100. export MEM_TYPE
  101. DFT_IMAGE=$(DEV_IMAGE)/boot/zImage
  102. -DFT_UBOOT=$(DEV_IMAGE)/boot/u-boot
  103. +DFT_UBOOT=../boot/u-boot
  104. -BOARD ?= stmp378x_dev
  105. +BOARD ?= imx23_olinuxino_dev
  106. ifeq ($(BOARD), stmp37xx_dev)
  107. ARCH = 37xx
  108. @@ -16,6 +16,9 @@ endif
  109. ifeq ($(BOARD), iMX28_EVK)
  110. ARCH = mx28
  111. endif
  112. +ifeq ($(BOARD), imx23_olinuxino_dev)
  113. +ARCH = mx23
  114. +endif
  115. all: build_prep gen_bootstream
  116. @@ -94,6 +97,8 @@ distclean: clean
  117. clean:
  118. -rm -rf *.sb
  119. rm -f sd_mmc_bootstream.raw
  120. + rm -f linux_prep/board/*.o
  121. + rm -f power_prep/*.o
  122. $(MAKE) -C linux_prep clean ARCH=$(ARCH)
  123. $(MAKE) -C boot_prep clean ARCH=$(ARCH)
  124. $(MAKE) -C power_prep clean ARCH=$(ARCH)
  125. --- a/uboot.db
  126. +++ b/uboot.db
  127. @@ -3,7 +3,7 @@
  128. sources {
  129. power_prep="./power_prep/power_prep";
  130. sdram_prep="./boot_prep/boot_prep";
  131. - image="/home/b18647/repos/ltib_latest/rootfs/boot/u-boot";
  132. + image="../boot/u-boot";
  133. }
  134. section (0) {