Advertisement
Guest User

Untitled

a guest
May 4th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.99 KB | None | 0 0
  1. Index: target/linux/ramips/rt288x/config-2.6.30
  2. ===================================================================
  3. --- target/linux/ramips/rt288x/config-2.6.30 (revision 19315)
  4. +++ target/linux/ramips/rt288x/config-2.6.30 (working copy)
  5. -13,8 +13,8 @@
  6. # CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set
  7. # CONFIG_CAVIUM_OCTEON_SIMULATOR is not set
  8. CONFIG_CC_OPTIMIZE_FOR_SIZE=y
  9. +CONFIG_CEVT_R4K=y
  10. CONFIG_CEVT_R4K_LIB=y
  11. -CONFIG_CEVT_R4K=y
  12. CONFIG_CMDLINE="console=ttyS1,57600 rootfstype=squashfs,jffs2"
  13. # CONFIG_CPU_BIG_ENDIAN is not set
  14. # CONFIG_CPU_CAVIUM_OCTEON is not set
  15. -23,9 +23,9 @@
  16. CONFIG_CPU_HAS_SYNC=y
  17. CONFIG_CPU_LITTLE_ENDIAN=y
  18. # CONFIG_CPU_LOONGSON2 is not set
  19. +CONFIG_CPU_MIPS32=y
  20. # CONFIG_CPU_MIPS32_R1 is not set
  21. CONFIG_CPU_MIPS32_R2=y
  22. -CONFIG_CPU_MIPS32=y
  23. # CONFIG_CPU_MIPS64_R1 is not set
  24. # CONFIG_CPU_MIPS64_R2 is not set
  25. CONFIG_CPU_MIPSR2=y
  26. -47,16 +47,16 @@
  27. # CONFIG_CPU_TX39XX is not set
  28. # CONFIG_CPU_TX49XX is not set
  29. # CONFIG_CPU_VR41XX is not set
  30. +CONFIG_CSRC_R4K=y
  31. CONFIG_CSRC_R4K_LIB=y
  32. -CONFIG_CSRC_R4K=y
  33. CONFIG_DECOMPRESS_LZMA=y
  34. CONFIG_DEVPORT=y
  35. # CONFIG_DM9000 is not set
  36. CONFIG_DMA_NEED_PCI_MAP_STATE=y
  37. CONFIG_DMA_NONCOHERENT=y
  38. CONFIG_EARLY_PRINTK=y
  39. +CONFIG_GENERIC_CLOCKEVENTS=y
  40. CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
  41. -CONFIG_GENERIC_CLOCKEVENTS=y
  42. CONFIG_GENERIC_CMOS_UPDATE=y
  43. CONFIG_GENERIC_FIND_LAST_BIT=y
  44. CONFIG_GENERIC_FIND_NEXT_BIT=y
  45. -88,8 +88,8 @@
  46. # CONFIG_MACH_VR41XX is not set
  47. # CONFIG_MII is not set
  48. # CONFIG_MIKROTIK_RB532 is not set
  49. +CONFIG_MIPS=y
  50. # CONFIG_MIPS_COBALT is not set
  51. -# CONFIG_MIPS_FPU_EMU is not set
  52. CONFIG_MIPS_L1_CACHE_SHIFT=4
  53. CONFIG_MIPS_MACHINE=y
  54. # CONFIG_MIPS_MALTA is not set
  55. -97,8 +97,8 @@
  56. # CONFIG_MIPS_MT_SMP is not set
  57. # CONFIG_MIPS_MT_SMTC is not set
  58. CONFIG_MIPS_RALINK=y
  59. +# CONFIG_MIPS_RAMIPS_NET is not set
  60. # CONFIG_MIPS_SIM is not set
  61. -CONFIG_MIPS=y
  62. # CONFIG_MTD_CFI_INTELEXT is not set
  63. # CONFIG_MTD_COMPLEX_MAPPINGS is not set
  64. CONFIG_MTD_PHYSMAP=y
  65. -117,6 +117,7 @@
  66. CONFIG_RALINK_RT288X=y
  67. # CONFIG_RALINK_RT305X is not set
  68. CONFIG_RT288X_MACH_RT_N15=y
  69. +CONFIG_RT288X_MACH_WZR_AGL300NH=y
  70. CONFIG_SCHED_OMIT_FRAME_POINTER=y
  71. # CONFIG_SCSI_DMA is not set
  72. # CONFIG_SERIAL_8250_EXTENDED is not set
  73. Index: target/linux/ramips/files/arch/mips/ralink/rt288x/Kconfig
  74. ===================================================================
  75. --- target/linux/ramips/files/arch/mips/ralink/rt288x/Kconfig (revision 19315)
  76. +++ target/linux/ramips/files/arch/mips/ralink/rt288x/Kconfig (working copy)
  77. -7,6 +7,11 @@
  78. default y
  79. select RALINK_DEV_GPIO_LEDS
  80.  
  81. +config RT288X_MACH_WZR_AGL300NH
  82. + bool "Buffalo WZR-AGL300NH board support"
  83. + default y
  84. + select RALINK_DEV_GPIO_LEDS
  85. +
  86. endmenu
  87.  
  88. endif
  89. Index: target/linux/ramips/files/arch/mips/ralink/rt288x/mach-wzr-agl300nh.c
  90. ===================================================================
  91. --- target/linux/ramips/files/arch/mips/ralink/rt288x/mach-wzr-agl300nh.c (revision 0)
  92. +++ target/linux/ramips/files/arch/mips/ralink/rt288x/mach-wzr-agl300nh.c (revision 0)
  93. -0,0 +1,105 @@
  94. +/*
  95. + * Buffalo WZR-AGL300NH board support
  96. + *
  97. + * Copyright (C) 2010 Joonas Lahtinen <joonas.lahtinen@gmail.com>
  98. + *
  99. + * This program is free software; you can redistribute it and/or modify it
  100. + * under the terms of the GNU General Public License version 2 as published
  101. + * by the Free Software Foundation.
  102. + */
  103. +
  104. +#include <linux/init.h>
  105. +#include <linux/platform_device.h>
  106. +#include <linux/mtd/mtd.h>
  107. +#include <linux/mtd/partitions.h>
  108. +#include <linux/mtd/physmap.h>
  109. +#include <linux/leds.h>
  110. +
  111. +#include <asm/mips_machine.h>
  112. +#include <asm/mach-ralink/machine.h>
  113. +#include <asm/mach-ralink/dev_gpio_leds.h>
  114. +#include <asm/mach-ralink/rt288x.h>
  115. +#include <asm/mach-ralink/rt288x_regs.h>
  116. +
  117. +#include "devices.h"
  118. +
  119. +#if 0
  120. +#define WZR_AGL300NH_GPIO_LED_POWER XX
  121. +#define WZR_AGL300NH_GPIO_BUTTON_AOSS XX
  122. +#define WZR_AGL300NH_GPIO_BUTTON_RESET XX
  123. +#endif // 0
  124. +
  125. +#ifdef CONFIG_MTD_PARTITIONS
  126. +
  127. +/*
  128. +From stock firmware:
  129. +mtd0: 00030000 00010000 "uboot"
  130. +mtd1: 00010000 00010000 "uboot_environ"
  131. +mtd2: 00010000 00010000 "factory_default"
  132. +mtd3: 000b0000 00010000 "linux"
  133. +mtd4: 002f0000 00010000 "rootfs"
  134. +mtd5: 00010000 00010000 "user_property"
  135. +*/
  136. +
  137. +static struct mtd_partition wzr_agl300nh_partitions[] = {
  138. + {
  139. + .name = "uboot",
  140. + .offset = 0,
  141. + .size = 0x030000,
  142. + .mask_flags = MTD_WRITEABLE,
  143. + }, {
  144. + .name = "uboot_environ",
  145. + .offset = 0x030000,
  146. + .size = 0x010000,
  147. + .mask_flags = MTD_WRITEABLE,
  148. + }, {
  149. + .name = "factory_default",
  150. + .offset = 0x040000,
  151. + .size = 0x010000,
  152. + .mask_flags = MTD_WRITEABLE,
  153. + }, {
  154. + .name = "linux",
  155. + .offset = 0x050000,
  156. + .size = 0x0b0000,
  157. + }, {
  158. + .name = "rootfs",
  159. + .offset = 0x100000,
  160. + .size = 0x2f0000,
  161. + }, {
  162. + .name = "user_property",
  163. + .offset = 0x3f0000,
  164. + .size = 0x010000,
  165. + }
  166. +};
  167. +#endif /* CONFIG_MTD_PARTITIONS */
  168. +
  169. +static struct physmap_flash_data wzr_agl300nh_flash_data = {
  170. +#ifdef CONFIG_MTD_PARTITIONS
  171. + .nr_parts = ARRAY_SIZE(wzr_agl300nh_partitions),
  172. + .parts = wzr_agl300nh_partitions,
  173. +#endif
  174. +};
  175. +
  176. +#if 0
  177. +static struct gpio_led wzr_agl300nh_leds_gpio[] __initdata = {
  178. + {
  179. + .name = "wzr-agl300nh:green:power",
  180. + .gpio = WZR_AGL300NH_GPIO_LED_POWER,
  181. + .active_low = ??,
  182. + }
  183. +};
  184. +#endif
  185. +
  186. +static void __init wzr_agl300nh_init(void)
  187. +{
  188. + rt288x_gpio_init(RT2880_GPIO_MODE_UART0);
  189. +
  190. + rt288x_register_flash(0, &wzr_agl300nh_flash_data);
  191. +
  192. +/*
  193. + ramips_register_gpio_leds(-1, ARRAY_SIZE(wzr_agl300nh_leds_gpio),
  194. + wzr_agl300nh_leds_gpio);
  195. +*/
  196. +}
  197. +
  198. +MIPS_MACHINE(RAMIPS_MACH_WZR_AGL300NH, "Buffalo WZR-AGL300NH", wzr_agl300nh_init);
  199. Index: target/linux/ramips/files/arch/mips/ralink/rt288x/Makefile
  200. ===================================================================
  201. --- target/linux/ramips/files/arch/mips/ralink/rt288x/Makefile (revision 19315)
  202. +++ target/linux/ramips/files/arch/mips/ralink/rt288x/Makefile (working copy)
  203. -1,6 +1,7 @@
  204. #
  205. # Makefile for the Ralink RT288x SoC specific parts of the kernel
  206. #
  207. +# Copyright (C) 2010 Joonas Lahtinen <joonas.lahtinen@gmail.com>
  208. # Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
  209. # Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
  210. #
  211. -13,3 +14,5 @@
  212. obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
  213.  
  214. obj-$(CONFIG_RT288X_MACH_RT_N15) += mach-rt-n15.o
  215. +
  216. +obj-$(CONFIG_RT288X_MACH_WZR_AGL300NH) += mach-wzr-agl300nh.o
  217. Index: target/linux/ramips/files/arch/mips/ralink/common/prom.c
  218. ===================================================================
  219. --- target/linux/ramips/files/arch/mips/ralink/common/prom.c (revision 19315)
  220. +++ target/linux/ramips/files/arch/mips/ralink/common/prom.c (working copy)
  221. -1,6 +1,7 @@
  222. /*
  223. * Ralink SoC specific prom routines
  224. *
  225. + * Copyright (C) 2010 Joonas Lahtinen <joonas.lahtinen@gmail.com>
  226. * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
  227. *
  228. * This program is free software; you can redistribute it and/or modify it
  229. -29,6 +30,9 @@
  230. .name = "RT-N15",
  231. .mach_type = RAMIPS_MACH_RT_N15,
  232. }, {
  233. + .name = "WZR-AGL300NH",
  234. + .mach_type = RAMIPS_MACH_WZR_AGL300NH,
  235. + }, {
  236. .name = "DIR-300-revB",
  237. .mach_type = RAMIPS_MACH_DIR_300_REVB,
  238. }, {
  239. Index: target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h
  240. ===================================================================
  241. --- target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h (revision 19315)
  242. +++ target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h (working copy)
  243. -1,6 +1,7 @@
  244. /*
  245. * Ralink machine types
  246. *
  247. + * Copyright (C) 2010 Joonas Lahtinen <joonas.lahtinen@gmail.com>
  248. * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
  249. *
  250. * This program is free software; you can redistribute it and/or modify it
  251. -12,6 +13,7 @@
  252. RAMIPS_MACH_GENERIC,
  253. /* RT2880 based machines */
  254. RAMIPS_MACH_RT_N15, /* Asus RT-N15 */
  255. + RAMIPS_MACH_WZR_AGL300NH, /* Buffalo WZR-AGL300NH */
  256.  
  257. /* RT3050 based machines */
  258. RAMIPS_MACH_DIR_300_REVB, /* D-Link DIR-300 rev B */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement