source: uKadecot/trunk/ssp/target/grsakura_ccrx/uip_target_config.c@ 101

Last change on this file since 101 was 101, checked in by coas-nagasima, 8 years ago

TOPPERS/uKadecotのソースコードを追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/plain
File size: 3.9 KB
Line 
1/*
2 * TINET (TCP/IP Protocol Stack)
3 *
4 * Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
5 * Tomakomai National College of Technology, JAPAN
6 *
7 * ã‹L’˜ìŒ ŽÒ‚́CˆÈ‰º‚Ì(1)`(4)‚ÌðŒ‚ð–ž‚½‚·ê‡‚ÉŒÀ‚èC–{ƒ\ƒtƒgƒEƒF
8 * ƒAi–{ƒ\ƒtƒgƒEƒFƒA‚ð‰ü•Ï‚µ‚½‚à‚Ì‚ðŠÜ‚ށDˆÈ‰º“¯‚¶j‚ðŽg—pE•¡»E‰ü
9 * •ÏEÄ”z•ziˆÈ‰ºC—˜—p‚ƌĂԁj‚·‚邱‚Ƃ𖳏ž‚Å‹–‘ø‚·‚éD
10 * (1) –{ƒ\ƒtƒgƒEƒFƒA‚ðƒ\[ƒXƒR[ƒh‚ÌŒ`‚Å—˜—p‚·‚éê‡‚ɂ́Cã‹L‚Ì’˜ì
11 * Œ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’肪C‚»‚Ì‚Ü‚Ü‚ÌŒ`‚Ń\[
12 * ƒXƒR[ƒh’†‚ÉŠÜ‚Ü‚ê‚Ä‚¢‚邱‚ƁD
13 * (2) –{ƒ\ƒtƒgƒEƒFƒA‚ðCƒ‰ƒCƒuƒ‰ƒŠŒ`Ž®‚ȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
14 * —p‚Å‚«‚éŒ`‚ōĔz•z‚·‚éê‡‚ɂ́CÄ”z•z‚É”º‚¤ƒhƒLƒ…
15ƒƒ“ƒgi—˜—p
16 * ŽÒƒ}ƒjƒ…
17ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L
18 * ‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
19 * (3) –{ƒ\ƒtƒgƒEƒFƒA‚ðC‹@Ší‚É‘g‚ݍž‚ނȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
20 * —p‚Å‚«‚È‚¢Œ`‚ōĔz•z‚·‚éê‡‚ɂ́CŽŸ‚Ì‚¢‚¸‚ê‚©‚ÌðŒ‚ð–ž‚½‚·‚±
21 * ‚ƁD
22 * (a) Ä”z•z‚É”º‚¤ƒhƒLƒ…
23ƒƒ“ƒgi—˜—pŽÒƒ}ƒjƒ…
24ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜
25 * ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
26 * (b) Ä”z•z‚ÌŒ`‘Ô‚ðC•Ê‚É’è‚ß‚é•û–@‚É‚æ‚Á‚āCTOPPERSƒvƒƒWƒFƒNƒg‚É
27 * •ñ‚·‚邱‚ƁD
28 * (4) –{ƒ\ƒtƒgƒEƒFƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚é‚¢‚©‚Ȃ鑹
29 * ŠQ‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð–Ɛӂ·‚邱‚ƁD
30 * ‚Ü‚½C–{ƒ\ƒtƒgƒEƒFƒA‚̃†[ƒU‚Ü‚½‚̓Gƒ“ƒhƒ†[ƒU‚©‚ç‚Ì‚¢‚©‚Ȃ闝
31 * —R‚ÉŠî‚­¿‹‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð
32 * –Ɛӂ·‚邱‚ƁD
33 *
34 * –{ƒ\ƒtƒgƒEƒFƒA‚́C–³•ÛØ‚Å’ñ‹Ÿ‚³‚ê‚Ä‚¢‚é‚à‚Ì‚Å‚ ‚éDã‹L’˜ìŒ ŽÒ‚¨
35 * ‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚́C–{ƒ\ƒtƒgƒEƒFƒA‚ÉŠÖ‚µ‚āC“Á’è‚ÌŽg—p–Ú“I
36 * ‚ɑ΂·‚é“K‡«‚àŠÜ‚߂āC‚¢‚©‚È‚é•ÛØ‚às‚í‚È‚¢D‚Ü‚½C–{ƒ\ƒtƒgƒEƒF
37 * ƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚½‚¢‚©‚Ȃ鑹ŠQ‚ÉŠÖ‚µ‚Ä‚àC‚»
38 * ‚̐ӔC‚𕉂í‚È‚¢D
39 *
40 * @(#) $Id: uip_target_config.c 101 2015-06-02 15:37:23Z coas-nagasima $
41 */
42
43/*
44 * ƒ^[ƒQƒbƒgˆË‘¶ƒ‚ƒWƒ…
45[ƒ‹iRX63N—pj
46 */
47
48#include <sil.h>
49
50#include <uip-conf.h>
51#ifdef __RX
52#include <rx630_ccrx/rx630.h>
53#else
54#include <rx630_msvc/rx630.h>
55#endif
56
57/*
58 * rx62n_bus_init -- ƒ^[ƒQƒbƒgˆË‘¶•”‚̃oƒX‚̏‰Šú‰»
59 */
60
61void
62rx62n_bus_init (void)
63{
64 /* ƒC[ƒTƒlƒbƒgEƒRƒ“ƒgƒ[ƒ‰‚Ì“®ì‚ð‹–‰Â */
65 sil_wrh_mem((uint16_t *)SYSTEM_PRCR_ADDR, (uint16_t)0xA502); /* ‘ž‚Ý‹–‰Â */
66 sil_wrw_mem((uint32_t *)SYSTEM_MSTPCRB_ADDR,
67 sil_rew_mem((uint32_t *)SYSTEM_MSTPCRB_ADDR) & ~SYSTEM_MSTPCRB_MSTPB15_BIT);
68 sil_wrh_mem((uint16_t *)SYSTEM_PRCR_ADDR, (uint16_t)0xA500); /* ‘ž‚Ý‹ÖŽ~ */
69
70 /* EtherNET—LŒø */
71 /* PA3`5 RMII_MDIO, RMII_MDC, RMII_LINKSTA */
72 sil_wrb_mem((uint8_t *)PORTA_PMR_ADDR,
73 sil_reb_mem((uint8_t *)PORTA_PMR_ADDR) | (1 << 3) | (1 << 4) | (1 << 5));
74 /* PB0`7 RXD1, RXD0, REF50CK, RX-ER, TXD-EN, TXD0, TXD1, CRS */
75 sil_wrb_mem((uint8_t *)PORTB_PMR_ADDR,
76 sil_reb_mem((uint8_t *)PORTB_PMR_ADDR) | 0xFF);
77
78 /* ‘‚«ž‚݃vƒƒeƒNƒgƒŒƒWƒXƒ^‚̐ݒè PFSWEƒrƒbƒg‚ւ̏‘‚«ž‚Ý‚ð‹–‰Â */
79 sil_wrb_mem((uint8_t *)(MPC_PWPR_ADDR) , 0x00);
80 /* ‘‚«ž‚݃vƒƒeƒNƒgƒŒƒWƒXƒ^‚̐ݒè PxxFSƒŒƒWƒXƒ^‚ւ̏‘‚«ž‚Ý‚ð‹–‰Â */
81 sil_wrb_mem((uint8_t *)(MPC_PWPR_ADDR) , 0x40);
82
83 /* PA3‚ðET_MDIO‚Æ‚·‚é */
84 sil_wrb_mem((uint8_t *)MPC_PA3PFS_ADDR, 0x11);
85 /* PA4‚ðET_MDC‚Æ‚·‚é */
86 sil_wrb_mem((uint8_t *)MPC_PA4PFS_ADDR, 0x11);
87 /* PA5‚ðET_LINKSTA‚Æ‚·‚é */
88 sil_wrb_mem((uint8_t *)MPC_PA5PFS_ADDR, 0x11);
89
90 /* PB0‚ðRXD1‚Æ‚·‚é */
91 sil_wrb_mem((uint8_t *)MPC_PB0PFS_ADDR, 0x12);
92 /* PB1‚ðRXD0‚Æ‚·‚é */
93 sil_wrb_mem((uint8_t *)MPC_PB1PFS_ADDR, 0x12);
94 /* PB2‚ðREF50CK‚Æ‚·‚é */
95 sil_wrb_mem((uint8_t *)MPC_PB2PFS_ADDR, 0x12);
96 /* PB3‚ðRX-ER‚Æ‚·‚é */
97 sil_wrb_mem((uint8_t *)MPC_PB3PFS_ADDR, 0x12);
98 /* PB4‚ðTXD-EN‚Æ‚·‚é */
99 sil_wrb_mem((uint8_t *)MPC_PB4PFS_ADDR, 0x12);
100 /* PB5‚ðTXD0‚Æ‚·‚é */
101 sil_wrb_mem((uint8_t *)MPC_PB5PFS_ADDR, 0x12);
102 /* PB6‚ðTXD1‚Æ‚·‚é */
103 sil_wrb_mem((uint8_t *)MPC_PB6PFS_ADDR, 0x12);
104 /* PB7‚ðCRS‚Æ‚·‚é */
105 sil_wrb_mem((uint8_t *)MPC_PB7PFS_ADDR, 0x12);
106
107 /* ‘‚«ž‚݃vƒƒeƒNƒgƒŒƒWƒXƒ^‚ÌÝ’è ‘‚«ž‚Ý‚ð‹ÖŽ~ */
108 sil_wrb_mem((uint8_t *)(MPC_PWPR_ADDR) , 0x80);
109}
110
111/*
112 * rx62n_inter_init -- ƒ^[ƒQƒbƒgˆË‘¶•”‚ÌŠ„ž‚݂̏‰Šú‰»
113 */
114
115void
116rx62n_inter_init (void)
117{
118}
Note: See TracBrowser for help on using the repository browser.