lwmon5.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551
  1. /*
  2. * (C) Copyright 2007-2013
  3. * Stefan Roese, DENX Software Engineering, sr@denx.de.
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #include <common.h>
  8. #include <command.h>
  9. #include <asm/ppc440.h>
  10. #include <asm/processor.h>
  11. #include <asm/ppc4xx-gpio.h>
  12. #include <asm/io.h>
  13. #include <post.h>
  14. #include <flash.h>
  15. #include <video.h>
  16. #include <mtd/cfi_flash.h>
  17. DECLARE_GLOBAL_DATA_PTR;
  18. static phys_addr_t lwmon5_cfi_flash_bank_addr[2] = CONFIG_SYS_FLASH_BANKS_LIST;
  19. ulong flash_get_size(ulong base, int banknum);
  20. int misc_init_r_kbd(void);
  21. int board_early_init_f(void)
  22. {
  23. u32 sdr0_pfc1, sdr0_pfc2;
  24. u32 reg;
  25. /* PLB Write pipelining disabled. Denali Core workaround */
  26. mtdcr(PLB4A0_ACR, 0xDE000000);
  27. mtdcr(PLB4A1_ACR, 0xDE000000);
  28. /*--------------------------------------------------------------------
  29. * Setup the interrupt controller polarities, triggers, etc.
  30. *-------------------------------------------------------------------*/
  31. mtdcr(UIC0SR, 0xffffffff); /* clear all. if write with 1 then the status is cleared */
  32. mtdcr(UIC0ER, 0x00000000); /* disable all */
  33. mtdcr(UIC0CR, 0x00000000); /* we have not critical interrupts at the moment */
  34. mtdcr(UIC0PR, 0xFFBFF1EF); /* Adjustment of the polarity */
  35. mtdcr(UIC0TR, 0x00000900); /* per ref-board manual */
  36. mtdcr(UIC0VR, 0x00000000); /* int31 highest, base=0x000 is within DDRAM */
  37. mtdcr(UIC0SR, 0xffffffff); /* clear all */
  38. mtdcr(UIC1SR, 0xffffffff); /* clear all */
  39. mtdcr(UIC1ER, 0x00000000); /* disable all */
  40. mtdcr(UIC1CR, 0x00000000); /* all non-critical */
  41. mtdcr(UIC1PR, 0xFFFFC6A5); /* Adjustment of the polarity */
  42. mtdcr(UIC1TR, 0x60000040); /* per ref-board manual */
  43. mtdcr(UIC1VR, 0x00000000); /* int31 highest, base=0x000 is within DDRAM */
  44. mtdcr(UIC1SR, 0xffffffff); /* clear all */
  45. mtdcr(UIC2SR, 0xffffffff); /* clear all */
  46. mtdcr(UIC2ER, 0x00000000); /* disable all */
  47. mtdcr(UIC2CR, 0x00000000); /* all non-critical */
  48. mtdcr(UIC2PR, 0x27C00000); /* Adjustment of the polarity */
  49. mtdcr(UIC2TR, 0x3C000000); /* per ref-board manual */
  50. mtdcr(UIC2VR, 0x00000000); /* int31 highest, base=0x000 is within DDRAM */
  51. mtdcr(UIC2SR, 0xffffffff); /* clear all */
  52. /* Trace Pins are disabled. SDR0_PFC0 Register */
  53. mtsdr(SDR0_PFC0, 0x0);
  54. /* select Ethernet pins */
  55. mfsdr(SDR0_PFC1, sdr0_pfc1);
  56. /* SMII via ZMII */
  57. sdr0_pfc1 = (sdr0_pfc1 & ~SDR0_PFC1_SELECT_MASK) |
  58. SDR0_PFC1_SELECT_CONFIG_6;
  59. mfsdr(SDR0_PFC2, sdr0_pfc2);
  60. sdr0_pfc2 = (sdr0_pfc2 & ~SDR0_PFC2_SELECT_MASK) |
  61. SDR0_PFC2_SELECT_CONFIG_6;
  62. /* enable SPI (SCP) */
  63. sdr0_pfc1 = (sdr0_pfc1 & ~SDR0_PFC1_SIS_MASK) | SDR0_PFC1_SIS_SCP_SEL;
  64. mtsdr(SDR0_PFC2, sdr0_pfc2);
  65. mtsdr(SDR0_PFC1, sdr0_pfc1);
  66. mtsdr(SDR0_PFC4, 0x80000000);
  67. /* PCI arbiter disabled */
  68. /* PCI Host Configuration disbaled */
  69. mfsdr(SDR0_PCI0, reg);
  70. reg = 0;
  71. mtsdr(SDR0_PCI0, 0x00000000 | reg);
  72. gpio_write_bit(CONFIG_SYS_GPIO_FLASH_WP, 1);
  73. #if CONFIG_POST & CONFIG_SYS_POST_BSPEC1
  74. /* enable the LSB transmitter */
  75. gpio_write_bit(CONFIG_SYS_GPIO_LSB_ENABLE, 1);
  76. /* enable the CAN transmitter */
  77. gpio_write_bit(CONFIG_SYS_GPIO_CAN_ENABLE, 1);
  78. reg = 0; /* reuse as counter */
  79. out_be32((void *)CONFIG_SYS_DSPIC_TEST_ADDR,
  80. in_be32((void *)CONFIG_SYS_DSPIC_TEST_ADDR)
  81. & ~CONFIG_SYS_DSPIC_TEST_MASK);
  82. while (gpio_read_in_bit(CONFIG_SYS_GPIO_DSPIC_READY) && reg++ < 1000) {
  83. udelay(1000);
  84. }
  85. if (gpio_read_in_bit(CONFIG_SYS_GPIO_DSPIC_READY)) {
  86. /* set "boot error" flag */
  87. out_be32((void *)CONFIG_SYS_DSPIC_TEST_ADDR,
  88. in_be32((void *)CONFIG_SYS_DSPIC_TEST_ADDR) |
  89. CONFIG_SYS_DSPIC_TEST_MASK);
  90. }
  91. #endif
  92. /*
  93. * Reset PHY's:
  94. * The PHY's need a 2nd reset pulse, since the MDIO address is latched
  95. * upon reset, and with the first reset upon powerup, the addresses are
  96. * not latched reliable, since the IRQ line is multiplexed with an
  97. * MDIO address. A 2nd reset at this time will make sure, that the
  98. * correct address is latched.
  99. */
  100. gpio_write_bit(CONFIG_SYS_GPIO_PHY0_RST, 1);
  101. gpio_write_bit(CONFIG_SYS_GPIO_PHY1_RST, 1);
  102. udelay(1000);
  103. gpio_write_bit(CONFIG_SYS_GPIO_PHY0_RST, 0);
  104. gpio_write_bit(CONFIG_SYS_GPIO_PHY1_RST, 0);
  105. udelay(1000);
  106. gpio_write_bit(CONFIG_SYS_GPIO_PHY0_RST, 1);
  107. gpio_write_bit(CONFIG_SYS_GPIO_PHY1_RST, 1);
  108. return 0;
  109. }
  110. /*
  111. * Override weak default with board specific version
  112. */
  113. phys_addr_t cfi_flash_bank_addr(int bank)
  114. {
  115. return lwmon5_cfi_flash_bank_addr[bank];
  116. }
  117. /*
  118. * Override the weak default mapping function with a board specific one
  119. */
  120. u32 flash_get_bank_size(int cs, int idx)
  121. {
  122. return flash_info[idx].size;
  123. }
  124. int board_early_init_r(void)
  125. {
  126. u32 val0, val1;
  127. /*
  128. * lwmon5 is manufactured in 2 different board versions:
  129. * The lwmon5a board has 64MiB NOR flash instead of the
  130. * 128MiB of the original lwmon5. Unfortunately the CFI driver
  131. * will report 2 banks of 64MiB even for the smaller flash
  132. * chip, since the bank is mirrored. To fix this, we bring
  133. * one bank into CFI query mode and read its response. This
  134. * enables us to detect the real number of flash devices/
  135. * banks which will be used later on by the common CFI driver.
  136. */
  137. /* Put bank 0 into CFI command mode and read */
  138. out_be32((void *)CONFIG_SYS_FLASH0, 0x00980098);
  139. val0 = in_be32((void *)CONFIG_SYS_FLASH0 + FLASH_OFFSET_CFI_RESP);
  140. val1 = in_be32((void *)CONFIG_SYS_FLASH1 + FLASH_OFFSET_CFI_RESP);
  141. /* Reset flash again out of query mode */
  142. out_be32((void *)CONFIG_SYS_FLASH0, 0x00f000f0);
  143. /* When not identical, we have 2 different flash devices/banks */
  144. if (val0 != val1)
  145. return 0;
  146. /*
  147. * Now we're sure that we're running on a LWMON5a board with
  148. * only 64MiB NOR flash in one bank:
  149. *
  150. * Set flash base address and bank count for CFI driver probing.
  151. */
  152. cfi_flash_num_flash_banks = 1;
  153. lwmon5_cfi_flash_bank_addr[0] = CONFIG_SYS_FLASH0;
  154. return 0;
  155. }
  156. int misc_init_r(void)
  157. {
  158. u32 pbcr;
  159. int size_val = 0;
  160. u32 reg;
  161. unsigned long usb2d0cr = 0;
  162. unsigned long usb2phy0cr, usb2h0cr = 0;
  163. unsigned long sdr0_pfc1, sdr0_srst;
  164. /*
  165. * FLASH stuff...
  166. */
  167. /* Re-do sizing to get full correct info */
  168. /* adjust flash start and offset */
  169. gd->bd->bi_flashstart = 0 - gd->bd->bi_flashsize;
  170. gd->bd->bi_flashoffset = 0;
  171. mfebc(PB0CR, pbcr);
  172. size_val = ffs(gd->bd->bi_flashsize) - 21;
  173. pbcr = (pbcr & 0x0001ffff) | gd->bd->bi_flashstart | (size_val << 17);
  174. mtebc(PB0CR, pbcr);
  175. /*
  176. * Re-check to get correct base address
  177. */
  178. flash_get_size(gd->bd->bi_flashstart, 0);
  179. /* Monitor protection ON by default */
  180. flash_protect(FLAG_PROTECT_SET, -CONFIG_SYS_MONITOR_LEN, 0xffffffff,
  181. &flash_info[cfi_flash_num_flash_banks - 1]);
  182. /* Env protection ON by default */
  183. flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR_REDUND,
  184. CONFIG_ENV_ADDR_REDUND + 2 * CONFIG_ENV_SECT_SIZE - 1,
  185. &flash_info[cfi_flash_num_flash_banks - 1]);
  186. /*
  187. * USB suff...
  188. */
  189. /* Reset USB */
  190. /* Reset of USB2PHY0 must be active at least 10 us */
  191. mtsdr(SDR0_SRST0, SDR0_SRST0_USB2H | SDR0_SRST0_USB2D);
  192. udelay(2000);
  193. mtsdr(SDR0_SRST1, SDR0_SRST1_USB20PHY | SDR0_SRST1_USB2HUTMI |
  194. SDR0_SRST1_USB2HPHY | SDR0_SRST1_OPBA2 |
  195. SDR0_SRST1_PLB42OPB1 | SDR0_SRST1_OPB2PLB40);
  196. udelay(2000);
  197. /* Errata CHIP_6 */
  198. /* 1. Set internal PHY configuration */
  199. /* SDR Setting */
  200. mfsdr(SDR0_PFC1, sdr0_pfc1);
  201. mfsdr(SDR0_USB0, usb2d0cr);
  202. mfsdr(SDR0_USB2PHY0CR, usb2phy0cr);
  203. mfsdr(SDR0_USB2H0CR, usb2h0cr);
  204. usb2phy0cr = usb2phy0cr & ~SDR0_USB2PHY0CR_XOCLK_MASK;
  205. usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_XOCLK_EXTERNAL; /*0*/
  206. usb2phy0cr = usb2phy0cr & ~SDR0_USB2PHY0CR_WDINT_MASK;
  207. usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_WDINT_16BIT_30MHZ; /*1*/
  208. usb2phy0cr = usb2phy0cr & ~SDR0_USB2PHY0CR_DVBUS_MASK;
  209. usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_DVBUS_PUREN; /*1*/
  210. usb2phy0cr = usb2phy0cr & ~SDR0_USB2PHY0CR_DWNSTR_MASK;
  211. usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_DWNSTR_HOST; /*1*/
  212. usb2phy0cr = usb2phy0cr & ~SDR0_USB2PHY0CR_UTMICN_MASK;
  213. usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_UTMICN_HOST; /*1*/
  214. /*
  215. * An 8-bit/60MHz interface is the only possible alternative
  216. * when connecting the Device to the PHY
  217. */
  218. usb2h0cr = usb2h0cr & ~SDR0_USB2H0CR_WDINT_MASK;
  219. usb2h0cr = usb2h0cr | SDR0_USB2H0CR_WDINT_16BIT_30MHZ; /*1*/
  220. mtsdr(SDR0_PFC1, sdr0_pfc1);
  221. mtsdr(SDR0_USB0, usb2d0cr);
  222. mtsdr(SDR0_USB2PHY0CR, usb2phy0cr);
  223. mtsdr(SDR0_USB2H0CR, usb2h0cr);
  224. /* 2. De-assert internal PHY reset */
  225. mfsdr(SDR0_SRST1, sdr0_srst);
  226. sdr0_srst = sdr0_srst & ~SDR0_SRST1_USB20PHY;
  227. mtsdr(SDR0_SRST1, sdr0_srst);
  228. /* 3. Wait for more than 1 ms */
  229. udelay(2000);
  230. /* 4. De-assert USB 2.0 Host main reset */
  231. mfsdr(SDR0_SRST0, sdr0_srst);
  232. sdr0_srst = sdr0_srst &~ SDR0_SRST0_USB2H;
  233. mtsdr(SDR0_SRST0, sdr0_srst);
  234. udelay(1000);
  235. /* 5. De-assert reset of OPB2 cores */
  236. mfsdr(SDR0_SRST1, sdr0_srst);
  237. sdr0_srst = sdr0_srst &~ SDR0_SRST1_PLB42OPB1;
  238. sdr0_srst = sdr0_srst &~ SDR0_SRST1_OPB2PLB40;
  239. sdr0_srst = sdr0_srst &~ SDR0_SRST1_OPBA2;
  240. mtsdr(SDR0_SRST1, sdr0_srst);
  241. udelay(1000);
  242. /* 6. Set EHCI Configure FLAG */
  243. /* 7. Reassert internal PHY reset: */
  244. mtsdr(SDR0_SRST1, SDR0_SRST1_USB20PHY);
  245. udelay(1000);
  246. /*
  247. * Clear resets
  248. */
  249. mtsdr(SDR0_SRST1, 0x00000000);
  250. mtsdr(SDR0_SRST0, 0x00000000);
  251. printf("USB: Host(int phy) Device(ext phy)\n");
  252. /*
  253. * Clear PLB4A0_ACR[WRP]
  254. * This fix will make the MAL burst disabling patch for the Linux
  255. * EMAC driver obsolete.
  256. */
  257. reg = mfdcr(PLB4A0_ACR) & ~PLB4Ax_ACR_WRP_MASK;
  258. mtdcr(PLB4A0_ACR, reg);
  259. /*
  260. * Init matrix keyboard
  261. */
  262. misc_init_r_kbd();
  263. return 0;
  264. }
  265. int checkboard(void)
  266. {
  267. char buf[64];
  268. int i = getenv_f("serial#", buf, sizeof(buf));
  269. printf("Board: %s", __stringify(CONFIG_HOSTNAME));
  270. if (i > 0) {
  271. puts(", serial# ");
  272. puts(buf);
  273. }
  274. putc('\n');
  275. return (0);
  276. }
  277. void hw_watchdog_reset(void)
  278. {
  279. int val;
  280. #if defined(CONFIG_WD_MAX_RATE)
  281. unsigned long long ct = get_ticks();
  282. /*
  283. * Don't allow watch-dog triggering more frequently than
  284. * the predefined value CONFIG_WD_MAX_RATE [ticks].
  285. */
  286. if (ct >= gd->arch.wdt_last) {
  287. if ((ct - gd->arch.wdt_last) < CONFIG_WD_MAX_RATE)
  288. return;
  289. } else {
  290. /* Time base counter had been reset */
  291. if (((unsigned long long)(-1) - gd->arch.wdt_last + ct) <
  292. CONFIG_WD_MAX_RATE)
  293. return;
  294. }
  295. gd->arch.wdt_last = get_ticks();
  296. #endif
  297. /*
  298. * Toggle watchdog output
  299. */
  300. val = gpio_read_out_bit(CONFIG_SYS_GPIO_WATCHDOG) == 0 ? 1 : 0;
  301. gpio_write_bit(CONFIG_SYS_GPIO_WATCHDOG, val);
  302. }
  303. int do_eeprom_wp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  304. {
  305. if (argc < 2)
  306. return cmd_usage(cmdtp);
  307. if ((strcmp(argv[1], "on") == 0))
  308. gpio_write_bit(CONFIG_SYS_GPIO_EEPROM_EXT_WP, 1);
  309. else if ((strcmp(argv[1], "off") == 0))
  310. gpio_write_bit(CONFIG_SYS_GPIO_EEPROM_EXT_WP, 0);
  311. else
  312. return cmd_usage(cmdtp);
  313. return 0;
  314. }
  315. U_BOOT_CMD(
  316. eepromwp, 2, 0, do_eeprom_wp,
  317. "eeprom write protect off/on",
  318. "<on|off> - enable (on) or disable (off) I2C EEPROM write protect"
  319. );
  320. #if defined(CONFIG_VIDEO)
  321. #include <video_fb.h>
  322. #include <mb862xx.h>
  323. extern GraphicDevice mb862xx;
  324. static const gdc_regs init_regs [] = {
  325. { 0x0100, 0x00000f00 },
  326. { 0x0020, 0x801401df },
  327. { 0x0024, 0x00000000 },
  328. { 0x0028, 0x00000000 },
  329. { 0x002c, 0x00000000 },
  330. { 0x0110, 0x00000000 },
  331. { 0x0114, 0x00000000 },
  332. { 0x0118, 0x01df0280 },
  333. { 0x0004, 0x031f0000 },
  334. { 0x0008, 0x027f027f },
  335. { 0x000c, 0x015f028f },
  336. { 0x0010, 0x020c0000 },
  337. { 0x0014, 0x01df01ea },
  338. { 0x0018, 0x00000000 },
  339. { 0x001c, 0x01e00280 },
  340. { 0x0100, 0x80010f00 },
  341. { 0x0, 0x0 }
  342. };
  343. const gdc_regs *board_get_regs(void)
  344. {
  345. return init_regs;
  346. }
  347. /* Returns Lime base address */
  348. unsigned int board_video_init(void)
  349. {
  350. /*
  351. * Reset Lime controller
  352. */
  353. gpio_write_bit(CONFIG_SYS_GPIO_LIME_S, 1);
  354. udelay(500);
  355. gpio_write_bit(CONFIG_SYS_GPIO_LIME_RST, 1);
  356. mb862xx.winSizeX = 640;
  357. mb862xx.winSizeY = 480;
  358. mb862xx.gdfBytesPP = 2;
  359. mb862xx.gdfIndex = GDF_15BIT_555RGB;
  360. return CONFIG_SYS_LIME_BASE_0;
  361. }
  362. #define DEFAULT_BRIGHTNESS 0x64
  363. static void board_backlight_brightness(int brightness)
  364. {
  365. if (brightness > 0) {
  366. /* pwm duty, lamp on */
  367. out_be32((void *)(CONFIG_SYS_FPGA_BASE_0 + 0x00000024), brightness);
  368. out_be32((void *)(CONFIG_SYS_FPGA_BASE_0 + 0x00000020), 0x701);
  369. } else {
  370. /* lamp off */
  371. out_be32((void *)(CONFIG_SYS_FPGA_BASE_0 + 0x00000024), 0x00);
  372. out_be32((void *)(CONFIG_SYS_FPGA_BASE_0 + 0x00000020), 0x00);
  373. }
  374. }
  375. void board_backlight_switch(int flag)
  376. {
  377. char * param;
  378. int rc;
  379. if (flag) {
  380. param = getenv("brightness");
  381. rc = param ? simple_strtol(param, NULL, 10) : -1;
  382. if (rc < 0)
  383. rc = DEFAULT_BRIGHTNESS;
  384. } else {
  385. rc = 0;
  386. }
  387. board_backlight_brightness(rc);
  388. }
  389. #if defined(CONFIG_CONSOLE_EXTRA_INFO)
  390. /*
  391. * Return text to be printed besides the logo.
  392. */
  393. void video_get_info_str(int line_number, char *info)
  394. {
  395. if (line_number == 1)
  396. strcpy(info, " Board: Lwmon5 (Liebherr Elektronik GmbH)");
  397. else
  398. info [0] = '\0';
  399. }
  400. #endif /* CONFIG_CONSOLE_EXTRA_INFO */
  401. #endif /* CONFIG_VIDEO */
  402. void board_reset(void)
  403. {
  404. gpio_write_bit(CONFIG_SYS_GPIO_BOARD_RESET, 1);
  405. }
  406. #ifdef CONFIG_SPL_OS_BOOT
  407. /*
  408. * lwmon5 specific implementation of spl_start_uboot()
  409. *
  410. * RETURN
  411. * 0 if booting into OS is selected (default)
  412. * 1 if booting into U-Boot is selected
  413. */
  414. int spl_start_uboot(void)
  415. {
  416. char s[8];
  417. env_init();
  418. getenv_f("boot_os", s, sizeof(s));
  419. if ((s != NULL) && (strcmp(s, "yes") == 0))
  420. return 0;
  421. return 1;
  422. }
  423. /*
  424. * This function is called from the SPL U-Boot version for
  425. * early init stuff, that needs to be done for OS (e.g. Linux)
  426. * booting. Doing it later in the real U-Boot would not work
  427. * in case that the SPL U-Boot boots Linux directly.
  428. */
  429. void spl_board_init(void)
  430. {
  431. const gdc_regs *regs = board_get_regs();
  432. /*
  433. * Setup PFC registers, mainly for ethernet support
  434. * later on in Linux
  435. */
  436. board_early_init_f();
  437. /* enable the LSB transmitter */
  438. gpio_write_bit(CONFIG_SYS_GPIO_LSB_ENABLE, 1);
  439. /*
  440. * Clear resets
  441. */
  442. mtsdr(SDR0_SRST1, 0x00000000);
  443. mtsdr(SDR0_SRST0, 0x00000000);
  444. /*
  445. * Reset Lime controller
  446. */
  447. gpio_write_bit(CONFIG_SYS_GPIO_LIME_S, 1);
  448. udelay(500);
  449. gpio_write_bit(CONFIG_SYS_GPIO_LIME_RST, 1);
  450. out_be32((void *)CONFIG_SYS_LIME_SDRAM_CLOCK, CONFIG_SYS_MB862xx_CCF);
  451. udelay(300);
  452. out_be32((void *)CONFIG_SYS_LIME_MMR, CONFIG_SYS_MB862xx_MMR);
  453. while (regs->index) {
  454. out_be32((void *)(CONFIG_SYS_LIME_BASE_0 + GC_DISP_BASE) +
  455. regs->index, regs->value);
  456. regs++;
  457. }
  458. board_backlight_brightness(DEFAULT_BRIGHTNESS);
  459. }
  460. #endif