cpu.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  1. /*
  2. * Copyright 2004 Freescale Semiconductor
  3. * Jeff Brown (jeffrey@freescale.com)
  4. * Srikanth Srinivasan (srikanth.srinivasan@freescale.com)
  5. *
  6. * See file CREDITS for list of people who contributed to this
  7. * project.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  22. * MA 02111-1307 USA
  23. */
  24. #include <common.h>
  25. #include <watchdog.h>
  26. #include <command.h>
  27. #include <asm/cache.h>
  28. #include <mpc86xx.h>
  29. #if defined(CONFIG_OF_FLAT_TREE)
  30. #include <ft_build.h>
  31. #endif
  32. extern unsigned long get_board_sys_clk(ulong dummy);
  33. static __inline__ unsigned long get_dbat3u (void)
  34. {
  35. unsigned long dbat3u;
  36. asm volatile("mfspr %0, 542" : "=r" (dbat3u) :);
  37. return dbat3u;
  38. }
  39. static __inline__ unsigned long get_dbat3l (void)
  40. {
  41. unsigned long dbat3l;
  42. asm volatile("mfspr %0, 543" : "=r" (dbat3l) :);
  43. return dbat3l;
  44. }
  45. static __inline__ unsigned long get_msr (void)
  46. {
  47. unsigned long msr;
  48. asm volatile("mfmsr %0" : "=r" (msr) :);
  49. return msr;
  50. }
  51. int checkcpu (void)
  52. {
  53. sys_info_t sysinfo;
  54. uint pvr, svr;
  55. uint ver;
  56. uint major, minor;
  57. uint lcrr; /* local bus clock ratio register */
  58. uint clkdiv; /* clock divider portion of lcrr */
  59. puts("Freescale PowerPC\n");
  60. pvr = get_pvr();
  61. ver = PVR_VER(pvr);
  62. major = PVR_MAJ(pvr);
  63. minor = PVR_MIN(pvr);
  64. puts("CPU:\n");
  65. printf(" Core: ");
  66. switch (ver) {
  67. case PVR_VER(PVR_86xx):
  68. puts("E600");
  69. break;
  70. default:
  71. puts("Unknown");
  72. break;
  73. }
  74. printf(", Version: %d.%d, (0x%08x)\n", major, minor, pvr);
  75. svr = get_svr();
  76. ver = SVR_VER(svr);
  77. major = SVR_MAJ(svr);
  78. minor = SVR_MIN(svr);
  79. puts(" System: ");
  80. switch (ver) {
  81. case SVR_8641:
  82. puts("8641");
  83. break;
  84. case SVR_8641D:
  85. puts("8641D");
  86. break;
  87. default:
  88. puts("Unknown");
  89. break;
  90. }
  91. printf(", Version: %d.%d, (0x%08x)\n", major, minor, svr);
  92. get_sys_info(&sysinfo);
  93. puts(" Clocks: ");
  94. printf("CPU:%4lu MHz, ", sysinfo.freqProcessor / 1000000);
  95. printf("MPX:%4lu MHz, ", sysinfo.freqSystemBus / 1000000);
  96. printf("DDR:%4lu MHz, ", sysinfo.freqSystemBus / 2000000);
  97. #if defined(CFG_LBC_LCRR)
  98. lcrr = CFG_LBC_LCRR;
  99. #else
  100. {
  101. volatile immap_t *immap = (immap_t *)CFG_IMMR;
  102. volatile ccsr_lbc_t *lbc= &immap->im_lbc;
  103. lcrr = lbc->lcrr;
  104. }
  105. #endif
  106. clkdiv = lcrr & 0x0f;
  107. if (clkdiv == 2 || clkdiv == 4 || clkdiv == 8) {
  108. printf("LBC:%4lu MHz\n",
  109. sysinfo.freqSystemBus / 1000000 / clkdiv);
  110. } else {
  111. printf(" LBC: unknown (lcrr: 0x%08x)\n", lcrr);
  112. }
  113. printf(" L2: ");
  114. if (get_l2cr() & 0x80000000)
  115. printf("Enabled\n");
  116. else
  117. printf("Disabled\n");
  118. return 0;
  119. }
  120. /* -------------------------------------------------------------------- */
  121. static inline void
  122. soft_restart(unsigned long addr)
  123. {
  124. #ifndef CONFIG_MPC8641HPCN
  125. /* SRR0 has system reset vector, SRR1 has default MSR value */
  126. /* rfi restores MSR from SRR1 and sets the PC to the SRR0 value */
  127. __asm__ __volatile__ ("mtspr 26, %0" :: "r" (addr));
  128. __asm__ __volatile__ ("li 4, (1 << 6)" ::: "r4");
  129. __asm__ __volatile__ ("mtspr 27, 4");
  130. __asm__ __volatile__ ("rfi");
  131. #else /* CONFIG_MPC8641HPCN */
  132. out8(PIXIS_BASE+PIXIS_RST,0);
  133. #endif /* !CONFIG_MPC8641HPCN */
  134. while(1); /* not reached */
  135. }
  136. #ifdef CONFIG_MPC8641HPCN
  137. int set_px_sysclk(ulong sysclk)
  138. {
  139. u8 sysclk_s, sysclk_r, sysclk_v, vclkh, vclkl, sysclk_aux;
  140. /* Per table 27, page 58 of MPC8641HPCN spec*/
  141. switch(sysclk)
  142. {
  143. case 33:
  144. sysclk_s = 0x04;
  145. sysclk_r = 0x04;
  146. sysclk_v = 0x07;
  147. sysclk_aux = 0x00;
  148. break;
  149. case 40:
  150. sysclk_s = 0x01;
  151. sysclk_r = 0x1F;
  152. sysclk_v = 0x20;
  153. sysclk_aux = 0x01;
  154. break;
  155. case 50:
  156. sysclk_s = 0x01;
  157. sysclk_r = 0x1F;
  158. sysclk_v = 0x2A;
  159. sysclk_aux = 0x02;
  160. break;
  161. case 66:
  162. sysclk_s = 0x01;
  163. sysclk_r = 0x04;
  164. sysclk_v = 0x04;
  165. sysclk_aux = 0x03;
  166. break;
  167. case 83:
  168. sysclk_s = 0x01;
  169. sysclk_r = 0x1F;
  170. sysclk_v = 0x4B;
  171. sysclk_aux = 0x04;
  172. break;
  173. case 100:
  174. sysclk_s = 0x01;
  175. sysclk_r = 0x1F;
  176. sysclk_v = 0x5C;
  177. sysclk_aux = 0x05;
  178. break;
  179. case 134:
  180. sysclk_s = 0x06;
  181. sysclk_r = 0x1F;
  182. sysclk_v = 0x3B;
  183. sysclk_aux = 0x06;
  184. break;
  185. case 166:
  186. sysclk_s = 0x06;
  187. sysclk_r = 0x1F;
  188. sysclk_v = 0x4B;
  189. sysclk_aux = 0x07;
  190. break;
  191. default:
  192. printf("Unsupported SYSCLK frequency.\n");
  193. return 0;
  194. }
  195. vclkh = (sysclk_s << 5) | sysclk_r ;
  196. vclkl = sysclk_v;
  197. out8(PIXIS_BASE+PIXIS_VCLKH,vclkh);
  198. out8(PIXIS_BASE+PIXIS_VCLKL,vclkl);
  199. out8(PIXIS_BASE+PIXIS_AUX,sysclk_aux);
  200. return 1;
  201. }
  202. int set_px_mpxpll(ulong mpxpll)
  203. {
  204. u8 tmp;
  205. u8 val;
  206. switch(mpxpll)
  207. {
  208. case 2:
  209. case 4:
  210. case 6:
  211. case 8:
  212. case 10:
  213. case 12:
  214. case 14:
  215. case 16:
  216. val = (u8)mpxpll;
  217. break;
  218. default:
  219. printf("Unsupported MPXPLL ratio.\n");
  220. return 0;
  221. }
  222. tmp = in8(PIXIS_BASE+PIXIS_VSPEED1);
  223. tmp = (tmp & 0xF0) | (val & 0x0F);
  224. out8(PIXIS_BASE+PIXIS_VSPEED1,tmp);
  225. return 1;
  226. }
  227. int set_px_corepll(ulong corepll)
  228. {
  229. u8 tmp;
  230. u8 val;
  231. switch ((int)corepll) {
  232. case 20:
  233. val = 0x08;
  234. break;
  235. case 25:
  236. val = 0x0C;
  237. break;
  238. case 30:
  239. val = 0x10;
  240. break;
  241. case 35:
  242. val = 0x1C;
  243. break;
  244. case 40:
  245. val = 0x14;
  246. break;
  247. case 45:
  248. val = 0x0E;
  249. break;
  250. default:
  251. printf("Unsupported COREPLL ratio.\n");
  252. return 0;
  253. }
  254. tmp = in8(PIXIS_BASE+PIXIS_VSPEED0);
  255. tmp = (tmp & 0xE0) | (val & 0x1F);
  256. out8(PIXIS_BASE+PIXIS_VSPEED0,tmp);
  257. return 1;
  258. }
  259. void read_from_px_regs(int set)
  260. {
  261. u8 tmp, mask = 0x1C;
  262. tmp = in8(PIXIS_BASE+PIXIS_VCFGEN0);
  263. if (set)
  264. tmp = tmp | mask;
  265. else
  266. tmp = tmp & ~mask;
  267. out8(PIXIS_BASE+PIXIS_VCFGEN0,tmp);
  268. }
  269. void read_from_px_regs_altbank(int set)
  270. {
  271. u8 tmp, mask = 0x04;
  272. tmp = in8(PIXIS_BASE+PIXIS_VCFGEN1);
  273. if (set)
  274. tmp = tmp | mask;
  275. else
  276. tmp = tmp & ~mask;
  277. out8(PIXIS_BASE+PIXIS_VCFGEN1,tmp);
  278. }
  279. void set_altbank(void)
  280. {
  281. u8 tmp;
  282. tmp = in8(PIXIS_BASE+PIXIS_VBOOT);
  283. tmp ^= 0x40;
  284. out8(PIXIS_BASE+PIXIS_VBOOT,tmp);
  285. }
  286. void set_px_go(void)
  287. {
  288. u8 tmp;
  289. tmp = in8(PIXIS_BASE+PIXIS_VCTL);
  290. tmp = tmp & 0x1E;
  291. out8(PIXIS_BASE+PIXIS_VCTL,tmp);
  292. tmp = in8(PIXIS_BASE+PIXIS_VCTL);
  293. tmp = tmp | 0x01;
  294. out8(PIXIS_BASE+PIXIS_VCTL,tmp);
  295. }
  296. void set_px_go_with_watchdog(void)
  297. {
  298. u8 tmp;
  299. tmp = in8(PIXIS_BASE+PIXIS_VCTL);
  300. tmp = tmp & 0x1E;
  301. out8(PIXIS_BASE+PIXIS_VCTL,tmp);
  302. tmp = in8(PIXIS_BASE+PIXIS_VCTL);
  303. tmp = tmp | 0x09;
  304. out8(PIXIS_BASE+PIXIS_VCTL,tmp);
  305. }
  306. int disable_watchdog(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
  307. {
  308. u8 tmp;
  309. tmp = in8(PIXIS_BASE+PIXIS_VCTL);
  310. tmp = tmp & 0x1E;
  311. out8(PIXIS_BASE+PIXIS_VCTL,tmp);
  312. tmp = in8(PIXIS_BASE + PIXIS_VCTL);
  313. tmp &= ~ 0x08; /* setting VCTL[WDEN] to 0 to disable watch dog */
  314. out8(PIXIS_BASE + PIXIS_VCTL, tmp);
  315. return 0;
  316. }
  317. U_BOOT_CMD(
  318. diswd, 1, 0, disable_watchdog,
  319. "diswd - Disable watchdog timer \n",
  320. NULL
  321. );
  322. /* This function takes the non-integral cpu:mpx pll ratio
  323. * and converts it to an integer that can be used to assign
  324. * FPGA register values.
  325. * input: strptr i.e. argv[2]
  326. */
  327. ulong strfractoint(uchar *strptr)
  328. {
  329. int i,j,retval,intarr_len=0, decarr_len=0, mulconst, no_dec=0;
  330. ulong intval =0, decval=0;
  331. uchar intarr[3], decarr[3];
  332. /* Assign the integer part to intarr[]
  333. * If there is no decimal point i.e.
  334. * if the ratio is an integral value
  335. * simply create the intarr.
  336. */
  337. i=0;
  338. while(strptr[i] != 46)
  339. {
  340. if(strptr[i] == 0)
  341. {
  342. no_dec = 1;
  343. break; /* Break from loop once the end of string is reached */
  344. }
  345. intarr[i] = strptr[i];
  346. i++;
  347. }
  348. intarr_len = i; /* Assign length of integer part to intarr_len*/
  349. intarr[i] = '\0'; /* */
  350. if(no_dec)
  351. {
  352. mulconst=10; /* Currently needed only for single digit corepll ratios */
  353. decval = 0;
  354. }
  355. else
  356. {
  357. j=0;
  358. i++; /* Skipping the decimal point */
  359. while ((strptr[i] > 47) && (strptr[i] < 58))
  360. {
  361. decarr[j] = strptr[i];
  362. i++;
  363. j++;
  364. }
  365. decarr_len = j;
  366. decarr[j] = '\0';
  367. mulconst=1;
  368. for(i=0; i<decarr_len;i++)
  369. mulconst = mulconst*10;
  370. decval = simple_strtoul(decarr,NULL,10);
  371. }
  372. intval = simple_strtoul(intarr,NULL,10);
  373. intval = intval*mulconst;
  374. retval = intval+decval;
  375. return retval;
  376. }
  377. #endif /* CONFIG_MPC8641HPCN */
  378. /* no generic way to do board reset. simply call soft_reset. */
  379. void
  380. do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
  381. {
  382. char cmd;
  383. ulong addr, val;
  384. ulong corepll;
  385. #ifdef CFG_RESET_ADDRESS
  386. addr = CFG_RESET_ADDRESS;
  387. #else
  388. /*
  389. * note: when CFG_MONITOR_BASE points to a RAM address,
  390. * CFG_MONITOR_BASE - sizeof (ulong) is usually a valid
  391. * address. Better pick an address known to be invalid on your
  392. * system and assign it to CFG_RESET_ADDRESS.
  393. */
  394. addr = CFG_MONITOR_BASE - sizeof (ulong);
  395. #endif
  396. #ifndef CONFIG_MPC8641HPCN
  397. /* flush and disable I/D cache */
  398. __asm__ __volatile__ ("mfspr 3, 1008" ::: "r3");
  399. __asm__ __volatile__ ("ori 5, 5, 0xcc00" ::: "r5");
  400. __asm__ __volatile__ ("ori 4, 3, 0xc00" ::: "r4");
  401. __asm__ __volatile__ ("andc 5, 3, 5" ::: "r5");
  402. __asm__ __volatile__ ("sync");
  403. __asm__ __volatile__ ("mtspr 1008, 4");
  404. __asm__ __volatile__ ("isync");
  405. __asm__ __volatile__ ("sync");
  406. __asm__ __volatile__ ("mtspr 1008, 5");
  407. __asm__ __volatile__ ("isync");
  408. __asm__ __volatile__ ("sync");
  409. soft_restart(addr);
  410. #else /* CONFIG_MPC8641HPCN */
  411. if (argc > 1) {
  412. cmd = argv[1][1];
  413. switch(cmd) {
  414. case 'f': /* reset with frequency changed */
  415. if (argc < 5)
  416. goto my_usage;
  417. read_from_px_regs(0);
  418. val = set_px_sysclk(simple_strtoul(argv[2],NULL,10));
  419. corepll = strfractoint(argv[3]);
  420. val = val + set_px_corepll(corepll);
  421. val = val + set_px_mpxpll(simple_strtoul(argv[4],
  422. NULL, 10));
  423. if (val == 3) {
  424. printf("Setting registers VCFGEN0 and VCTL\n");
  425. read_from_px_regs(1);
  426. printf("Resetting board with values from VSPEED0, VSPEED1, VCLKH, and VCLKL ....\n");
  427. set_px_go();
  428. } else
  429. goto my_usage;
  430. while (1); /* Not reached */
  431. case 'l':
  432. if (argv[2][1] == 'f') {
  433. read_from_px_regs(0);
  434. read_from_px_regs_altbank(0);
  435. /* reset with frequency changed */
  436. val = set_px_sysclk(simple_strtoul(argv[3],NULL,10));
  437. corepll = strfractoint(argv[4]);
  438. val = val + set_px_corepll(corepll);
  439. val = val + set_px_mpxpll(simple_strtoul(argv[5],NULL,10));
  440. if (val == 3) {
  441. printf("Setting registers VCFGEN0, VCFGEN1, VBOOT, and VCTL\n");
  442. set_altbank();
  443. read_from_px_regs(1);
  444. read_from_px_regs_altbank(1);
  445. printf("Enabling watchdog timer on the FPGA and resetting board with values from VSPEED0, VSPEED1, VCLKH, and VCLKL to boot from the other bank ....\n");
  446. set_px_go_with_watchdog();
  447. } else
  448. goto my_usage;
  449. while(1); /* Not reached */
  450. } else if(argv[2][1] == 'd'){
  451. /* Reset from next bank without changing frequencies but with watchdog timer enabled */
  452. read_from_px_regs(0);
  453. read_from_px_regs_altbank(0);
  454. printf("Setting registers VCFGEN1, VBOOT, and VCTL\n");
  455. set_altbank();
  456. read_from_px_regs_altbank(1);
  457. printf("Enabling watchdog timer on the FPGA and resetting board to boot from the other bank....\n");
  458. set_px_go_with_watchdog();
  459. while(1); /* Not reached */
  460. } else {
  461. /* Reset from next bank without changing frequency and without watchdog timer enabled */
  462. read_from_px_regs(0);
  463. read_from_px_regs_altbank(0);
  464. if(argc > 2)
  465. goto my_usage;
  466. printf("Setting registers VCFGNE1, VBOOT, and VCTL\n");
  467. set_altbank();
  468. read_from_px_regs_altbank(1);
  469. printf("Resetting board to boot from the other bank....\n");
  470. set_px_go();
  471. }
  472. default:
  473. goto my_usage;
  474. }
  475. my_usage:
  476. printf("\nUsage: reset cf <SYSCLK freq> <COREPLL ratio> <MPXPLL ratio>\n");
  477. printf(" reset altbank [cf <SYSCLK freq> <COREPLL ratio> <MPXPLL ratio>]\n");
  478. printf("For example: reset cf 40 2.5 10\n");
  479. printf("See MPC8641HPCN Design Workbook for valid values of command line parameters.\n");
  480. return;
  481. } else
  482. out8(PIXIS_BASE+PIXIS_RST,0);
  483. #endif /* !CONFIG_MPC8641HPCN */
  484. while(1); /* not reached */
  485. }
  486. /*
  487. * Get timebase clock frequency
  488. */
  489. unsigned long get_tbclk(void)
  490. {
  491. sys_info_t sys_info;
  492. get_sys_info(&sys_info);
  493. return (sys_info.freqSystemBus + 3L) / 4L;
  494. }
  495. #if defined(CONFIG_WATCHDOG)
  496. void
  497. watchdog_reset(void)
  498. {
  499. }
  500. #endif /* CONFIG_WATCHDOG */
  501. #if defined(CONFIG_DDR_ECC)
  502. void dma_init(void)
  503. {
  504. volatile immap_t *immap = (immap_t *)CFG_IMMR;
  505. volatile ccsr_dma_t *dma = &immap->im_dma;
  506. dma->satr0 = 0x00040000;
  507. dma->datr0 = 0x00040000;
  508. asm("sync; isync");
  509. return;
  510. }
  511. uint dma_check(void)
  512. {
  513. volatile immap_t *immap = (immap_t *)CFG_IMMR;
  514. volatile ccsr_dma_t *dma = &immap->im_dma;
  515. volatile uint status = dma->sr0;
  516. /* While the channel is busy, spin */
  517. while((status & 4) == 4) {
  518. status = dma->sr0;
  519. }
  520. if (status != 0) {
  521. printf ("DMA Error: status = %x\n", status);
  522. }
  523. return status;
  524. }
  525. int dma_xfer(void *dest, uint count, void *src)
  526. {
  527. volatile immap_t *immap = (immap_t *)CFG_IMMR;
  528. volatile ccsr_dma_t *dma = &immap->im_dma;
  529. dma->dar0 = (uint) dest;
  530. dma->sar0 = (uint) src;
  531. dma->bcr0 = count;
  532. dma->mr0 = 0xf000004;
  533. asm("sync;isync");
  534. dma->mr0 = 0xf000005;
  535. asm("sync;isync");
  536. return dma_check();
  537. }
  538. #endif /* CONFIG_DDR_ECC */
  539. #ifdef CONFIG_OF_FLAT_TREE
  540. void ft_cpu_setup(void *blob, bd_t *bd)
  541. {
  542. u32 *p;
  543. ulong clock;
  544. int len;
  545. clock = bd->bi_busfreq;
  546. p = ft_get_prop(blob, "/cpus/" OF_CPU "/bus-frequency", &len);
  547. if (p != NULL)
  548. *p = cpu_to_be32(clock);
  549. p = ft_get_prop(blob, "/" OF_SOC "/serial@4500/clock-frequency", &len);
  550. if (p != NULL)
  551. *p = cpu_to_be32(clock);
  552. p = ft_get_prop(blob, "/" OF_SOC "/serial@4600/clock-frequency", &len);
  553. if (p != NULL)
  554. *p = cpu_to_be32(clock);
  555. #if defined(CONFIG_MPC86XX_TSEC1)
  556. p = ft_get_prop(blob, "/" OF_SOC "/ethernet@24000/address", &len);
  557. memcpy(p, bd->bi_enetaddr, 6);
  558. #endif
  559. #if defined(CONFIG_MPC86XX_TSEC2)
  560. p = ft_get_prop(blob, "/" OF_SOC "/ethernet@25000/address", &len);
  561. memcpy(p, bd->bi_enet1addr, 6);
  562. #endif
  563. #if defined(CONFIG_MPC86XX_TSEC3)
  564. p = ft_get_prop(blob, "/" OF_SOC "/ethernet@26000/address", &len);
  565. memcpy(p, bd->bi_enet2addr, 6);
  566. #endif
  567. #if defined(CONFIG_MPC86XX_TSEC4)
  568. p = ft_get_prop(blob, "/" OF_SOC "/ethernet@27000/address", &len);
  569. memcpy(p, bd->bi_enet3addr, 6);
  570. #endif
  571. }
  572. #endif