hal_lld.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. /*
  2. ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. /**
  14. * @file SAMA5D2x/hal_lld.h
  15. * @brief SAMA5D2x HAL subsystem low level driver header.
  16. * @pre This module requires the following macros to be defined in the
  17. * @p board.h file:
  18. * - SAMA_MOSCXTCLK.
  19. * - SAMA_OSCXTCLK
  20. * .
  21. * One of the following macros must also be defined:
  22. * - SAMA5D21, SAMA5D22, SAMA5D23, SAMA5D24, SAMA5D25, SAMA5D26,
  23. * SAMA5D27, SAMA5D28.
  24. *
  25. * @addtogroup HAL
  26. * @{
  27. */
  28. #ifndef _HAL_LLD_H_
  29. #define _HAL_LLD_H_
  30. #include "sama_registry.h"
  31. /*===========================================================================*/
  32. /* Driver constants. */
  33. /*===========================================================================*/
  34. /**
  35. * @name Platform identification macros
  36. * @{
  37. */
  38. #if defined(SAMA5D21) || defined(__DOXYGEN__)
  39. #define PLATFORM_NAME "500Mhz processor with TrustZone, 16-bit DDR, BGA196"
  40. #elif defined(SAMA5D22)
  41. #define PLATFORM_NAME "500Mhz processor with TrustZone, 16-bit DDR, CAN, BGA196"
  42. #elif defined(SAMA5D23)
  43. #define PLATFORM_NAME "500Mhz processor with TrustZone, 16-bit DDR, CAN, Enhanced Security, BGA196"
  44. #elif defined(SAMA5D24)
  45. #define PLATFORM_NAME "A500Mhz processor with TrustZone, 16/32-bit DDR, USB HSIC, BGA256"
  46. #elif defined(SAMA5D25)
  47. #define PLATFORM_NAME "500Mhz processor with TrustZone, 16/32-bit DDR, BGA289"
  48. #elif defined(SAMA5D26)
  49. #define PLATFORM_NAME "500Mhz processor with TrustZone, 16/32-bit DDR, CAN, BGA289"
  50. #elif defined(SAMA5D27)
  51. #define PLATFORM_NAME "500Mhz processor with TrustZone, 16/32-bit DDR, CAN, Enhanced Security, BGA289"
  52. #elif defined(SAMA5D28)
  53. #define PLATFORM_NAME "500Mhz processor with TrustZone, 16/32-bit DDR, CAN, Enhanced Security, BGA289, 'internal DDR"
  54. #else
  55. #error "SAMA5D2x device unsupported or not specified"
  56. #endif
  57. /** @} */
  58. /**
  59. * @name Absolute Maximum Ratings
  60. * @{
  61. */
  62. /**
  63. * @brief Maximum processor clock frequency.
  64. */
  65. #define SAMA_PCK_MAX 504000000
  66. /**
  67. * @brief Minimum processor clock frequency.
  68. */
  69. #define SAMA_PCK_MIN 250000000
  70. /**
  71. * @brief Maximum master clock frequency.
  72. */
  73. #define SAMA_MCK_MAX 168000000
  74. /**
  75. * @brief Minimum master clock frequency.
  76. */
  77. #define SAMA_MCK_MIN 125000000
  78. /**
  79. * @brief Maximum Main Crystal Oscillator clock frequency.
  80. */
  81. #define SAMA_MOSCXTCLK_MAX 24000000
  82. /**
  83. * @brief Minimum Main Crystal Oscillator clock frequency.
  84. */
  85. #define SAMA_MOSCXTCLK_MIN 8000000
  86. /**
  87. * @brief Maximum PLLs input clock frequency.
  88. */
  89. #define SAMA_PLLIN_MAX 24000000
  90. /**
  91. * @brief Minimum PLLs input clock frequency.
  92. */
  93. #define SAMA_PLLIN_MIN 800000
  94. /**
  95. * @brief Maximum PLL output clock frequency.
  96. */
  97. #define SAMA_PLLOUT_MAX 1200000000
  98. /**
  99. * @brief Minimum PLL output clock frequency.
  100. */
  101. #define SAMA_PLLOUT_MIN 600000000
  102. /** @} */
  103. /**
  104. * @name Internal clock sources
  105. * @{
  106. */
  107. #define SAMA_MOSCRCCLK 12000000 /**< RC Main oscillator clock. */
  108. #define SAMA_OSCRCCLK 32000 /**< RC Slow oscillator clock. */
  109. /** @} */
  110. /**
  111. * @name SCK_CR register bits definitions
  112. * @{
  113. */
  114. #define SAMA_OSC_OSCRC (0 << 3) /**< Slow Clock source MOSCRC. */
  115. #define SAMA_OSC_OSCXT (1 << 3) /**< Slow Clock source MOSCXT. */
  116. /** @} */
  117. /**
  118. * @name PCM_MOR register bits definitions
  119. * @{
  120. */
  121. #define SAMA_MOSC_MOSCRC (0 << 24) /**< Main Clock source MOSCRC. */
  122. #define SAMA_MOSC_MOSCXT (1 << 24) /**< Main Clock source MOSCXT. */
  123. /** @} */
  124. /**
  125. * @name PCM_MCR register bits definitions
  126. * @{
  127. */
  128. #define SAMA_MCK_SLOW_CLK (0 << 0) /**< MCK source is Slow Clock. */
  129. #define SAMA_MCK_MAIN_CLK (1 << 0) /**< MCK source is Main Clock. */
  130. #define SAMA_MCK_PLLA_CLK (2 << 0) /**< MCK source is PLLA Clock. */
  131. #define SAMA_MCK_UPLL_CLK (3 << 0) /**< MCK source is UPLL Clock. */
  132. #define SAMA_MCK_PRE_DIV1 (0 << 4) /**< MCK not prescaled. */
  133. #define SAMA_MCK_PRE_DIV2 (1 << 4) /**< MCK prescaled by 2. */
  134. #define SAMA_MCK_PRE_DIV4 (2 << 4) /**< MCK prescaled by 4. */
  135. #define SAMA_MCK_PRE_DIV8 (3 << 4) /**< MCK prescaled by 8. */
  136. #define SAMA_MCK_PRE_DIV16 (4 << 4) /**< MCK prescaled by 16. */
  137. #define SAMA_MCK_PRE_DIV32 (5 << 4) /**< MCK prescaled by 32. */
  138. #define SAMA_MCK_PRE_DIV64 (6 << 4) /**< MCK prescaled by 64. */
  139. #define SAMA_MCK_MDIV_DIV1 (0 << 8) /**< MCK is not divided. */
  140. #define SAMA_MCK_MDIV_DIV2 (1 << 8) /**< MCK is divided by 2. */
  141. #define SAMA_MCK_MDIV_DIV3 (3 << 8) /**< MCK is divided by 3. */
  142. #define SAMA_MCK_MDIV_DIV4 (2 << 8) /**< MCK is divided by 4. */
  143. #define SAMA_MCK_PLLADIV2 (1 << 12) /**< PLLA is divided by 2. */
  144. /**
  145. * @name PCM_PCR register bits definitions
  146. * @{
  147. */
  148. #define SAMA_GCLK_SLOW_CLK (0x0u << 8) /**< GCLK Slow clock is selected */
  149. #define SAMA_GCLK_MAIN_CLK (0x1u << 8) /**< GCLK GMain clock is selected */
  150. #define SAMA_GCLK_PLLA_CLK (0x2u << 8) /**< GCLK PLLACK is selected */
  151. #define SAMA_GCLKUPLL_CLK (0x3u << 8) /**< GCLK UPLL Clock is selected */
  152. #define SAMA_GCLK_MCK_CLK (0x4u << 8) /**< GCLK Master Clock is selected */
  153. #define SAMA_GCLK_AUDIO_CLK (0x5u << 8) /**< GCLK Audio PLL clock is selected */
  154. /** @} */
  155. /*===========================================================================*/
  156. /* Driver pre-compile time settings. */
  157. /*===========================================================================*/
  158. /**
  159. * @name Configuration options
  160. * @{
  161. */
  162. /**
  163. * @brief Defines if the code is running in the secure side of the ARM Trust
  164. * Zone. It must be @p TRUE whenever the code is compiled for the
  165. * secure side.
  166. */
  167. #if !defined(SAMA_HAL_IS_SECURE) || defined(__DOXYGEN__)
  168. #define SAMA_HAL_IS_SECURE TRUE
  169. #endif
  170. /**
  171. * @brief Disables the PMC initialization in the HAL.
  172. */
  173. #if !defined(SAMA_NO_INIT) || defined(__DOXYGEN__)
  174. #define SAMA_NO_INIT FALSE
  175. #endif
  176. /**
  177. * @brief Enables or disables the MOSCRC clock source.
  178. */
  179. #if !defined(SAMA_MOSCRC_ENABLED) || defined(__DOXYGEN__)
  180. #define SAMA_MOSCRC_ENABLED TRUE
  181. #endif
  182. /**
  183. * @brief Enables or disables the MOSCXT clock source.
  184. */
  185. #if !defined(SAMA_MOSCXT_ENABLED) || defined(__DOXYGEN__)
  186. #define SAMA_MOSCXT_ENABLED FALSE
  187. #endif
  188. /**
  189. * @brief Main clock source selection.
  190. */
  191. #if !defined(SAMA_MOSC_SEL) || defined(__DOXYGEN__)
  192. #define SAMA_MOSC_SEL SAMA_MOSC_MOSCRC
  193. #endif
  194. /**
  195. * @brief Slow clock source selection.
  196. */
  197. #if !defined(SAMA_OSC_SEL) || defined(__DOXYGEN__)
  198. #define SAMA_OSC_SEL SAMA_OSC_OSCRC
  199. #endif
  200. /**
  201. * @brief Master clock source selection.
  202. */
  203. #if !defined(SAMA_MCK_SEL) || defined(__DOXYGEN__)
  204. #define SAMA_MCK_SEL SAMA_MCK_PLLA_CLK
  205. #endif
  206. /**
  207. * @brief Master clock prescaler.
  208. */
  209. #if !defined(SAMA_MCK_PRES_VALUE) || defined(__DOXYGEN__)
  210. #define SAMA_MCK_PRES_VALUE 1
  211. #endif
  212. /**
  213. * @brief Master clock divider.
  214. */
  215. #if !defined(SAMA_MCK_MDIV_VALUE) || defined(__DOXYGEN__)
  216. #define SAMA_MCK_MDIV_VALUE 3
  217. #endif
  218. /**
  219. * @brief PLLA clock multiplier.
  220. */
  221. #if !defined(SAMA_PLLA_MUL_VALUE) || defined(__DOXYGEN__)
  222. #define SAMA_PLLA_MUL_VALUE 83
  223. #endif
  224. /**
  225. * @brief PLLADIV2 clock divider.
  226. */
  227. #if !defined(SAMA_PLLADIV2_EN) || defined(__DOXYGEN__)
  228. #define SAMA_PLLADIV2_EN TRUE
  229. #endif
  230. /** @} */
  231. /*===========================================================================*/
  232. /* Derived constants and error checks. */
  233. /*===========================================================================*/
  234. /*
  235. * Configuration-related checks.
  236. */
  237. #if !defined(SAMA5D2x_MCUCONF)
  238. #error "Using a wrong mcuconf.h file, SAMA5D2x_MCUCONF not defined"
  239. #endif
  240. /**
  241. * @brief Slow clock value.
  242. */
  243. /* Main oscillator is fed by internal RC. */
  244. #if (SAMA_OSC_SEL == SAMA_OSC_OSCRC) || defined(__DOXYGEN__)
  245. #define SAMA_SLOW_CLK SAMA_OSCRCCLK
  246. #elif (SAMA_OSC_SEL == SAMA_OSC_OSCXT)
  247. #define SAMA_SLOW_CLK SAMA_OSCXTCLK
  248. #else
  249. #error "Wrong SAMA_OSC_SEL value."
  250. #endif
  251. /**
  252. * @brief MAIN clock value.
  253. */
  254. /* Main oscillator is fed by internal RC. */
  255. #if (SAMA_MOSC_SEL == SAMA_MOSC_MOSCRC) || defined(__DOXYGEN__)
  256. #if !SAMA_MOSCRC_ENABLED
  257. #error "Internal RC oscillator disabled (required by SAMA_MOSC_SEL)."
  258. #endif
  259. #define SAMA_MAIN_CLK SAMA_MOSCRCCLK
  260. /* Main oscillator is fed by external XTAL. */
  261. #elif (SAMA_MOSC_SEL == SAMA_MOSC_MOSCXT)
  262. #if !SAMA_MOSCXT_ENABLED
  263. #error "External crystal oscillator disabled (required by SAMA_MOSC_SEL)."
  264. #endif
  265. #define SAMA_MAIN_CLK SAMA_MOSCXTCLK
  266. /* Checks on external crystal range. */
  267. #if (SAMA_MOSCXTCLK > SAMA_MOSCXTCLK_MAX) || \
  268. (SAMA_MOSCXTCLK < SAMA_MOSCXTCLK_MIN)
  269. #error "External crystal oscillator out of range."
  270. #endif
  271. /* Unallowed condition. */
  272. #else
  273. #error "Wrong SAMA_MOSC_SEL value."
  274. #endif /* SAMA_MOSCXTCLK */
  275. #if (SAMA_MCK_SEL == SAMA_MCK_PLLA_CLK) || defined(__DOXYGEN__)
  276. #define SAMA_ACTIVATE_PLLA TRUE
  277. #else
  278. #define SAMA_ACTIVATE_PLLA FALSE
  279. #endif
  280. /**
  281. * @brief PLLAMUL field.
  282. */
  283. #if ((SAMA_PLLA_MUL_VALUE >= 1) && (SAMA_PLLA_MUL_VALUE <= 127)) || \
  284. defined(__DOXYGEN__)
  285. #define SAMA_PLLA_MUL ((SAMA_PLLA_MUL_VALUE - 1) << 18)
  286. #else
  287. #error "invalid SAMA_PLLA_MUL_VALUE value specified"
  288. #endif
  289. /**
  290. * @brief PLLA input clock frequency.
  291. * @todo Consider to add DIVA to this. On SAMA5D27 DIVA is a nonsense since
  292. * it could be only 1 or 0 whereas 0 means PLLA disabled. This could
  293. * be useful for other chip belonging to this family
  294. */
  295. #define SAMA_PLLACLKIN SAMA_MAIN_CLK
  296. /* PLLA input frequency range check.*/
  297. #if (SAMA_PLLACLKIN < SAMA_PLLIN_MIN) || (SAMA_PLLACLKIN > SAMA_PLLIN_MAX)
  298. #error "SAMA_PLLACLKIN out of range"
  299. #endif
  300. /**
  301. * @brief PLLA output clock frequency.
  302. */
  303. #define SAMA_PLLACLKOUT (SAMA_MAIN_CLK * SAMA_PLLA_MUL_VALUE)
  304. /* PLLA output frequency range check.*/
  305. #if (SAMA_PLLACLKOUT < SAMA_PLLOUT_MIN) || (SAMA_PLLACLKOUT > SAMA_PLLOUT_MAX)
  306. #error "SAMA_PLLACLKOUT out of range"
  307. #endif
  308. /**
  309. * @brief PLLADIV2 divider value.
  310. */
  311. #if SAMA_PLLADIV2_EN || defined(__DOXYGEN__)
  312. #define SAMA_PLLADIV2 SAMA_MCK_PLLADIV2
  313. #else
  314. #define SAMA_PLLADIV 0
  315. #endif
  316. /**
  317. * @brief Master Clock prescaler.
  318. */
  319. #if (SAMA_MCK_PRES_VALUE == 1) || defined(__DOXYGEN__)
  320. #define SAMA_MCK_PRES SAMA_MCK_PRE_DIV1
  321. #elif (SAMA_MCK_PRES_VALUE == 2)
  322. #define SAMA_MCK_PRES SAMA_MCK_PRE_DIV2
  323. #elif (SAMA_MCK_PRES_VALUE == 4)
  324. #define SAMA_MCK_PRES SAMA_MCK_PRE_DIV4
  325. #elif (SAMA_MCK_PRES_VALUE == 8)
  326. #define SAMA_MCK_PRES SAMA_MCK_PRE_DIV8
  327. #elif (SAMA_MCK_PRES_VALUE == 16)
  328. #define SAMA_MCK_PRES SAMA_MCK_PRE_DIV16
  329. #elif (SAMA_MCK_PRES_VALUE == 32)
  330. #define SAMA_MCK_PRES SAMA_MCK_PRE_DIV32
  331. #elif (SAMA_MCK_PRES_VALUE == 64)
  332. #define SAMA_MCK_PRES SAMA_MCK_PRE_DIV64
  333. #else
  334. #error "Wrong SAMA_MCK_PRES_VALUE."
  335. #endif
  336. /**
  337. * @brief Master Clock divider.
  338. */
  339. #if (SAMA_MCK_MDIV_VALUE == 1) || defined(__DOXYGEN__)
  340. #define SAMA_MCK_MDIV SAMA_MCK_MDIV_DIV1
  341. #elif (SAMA_MCK_MDIV_VALUE == 2)
  342. #define SAMA_MCK_MDIV SAMA_MCK_MDIV_DIV2
  343. #elif (SAMA_MCK_MDIV_VALUE == 3)
  344. #define SAMA_MCK_MDIV SAMA_MCK_MDIV_DIV3
  345. #elif (SAMA_MCK_MDIV_VALUE == 4)
  346. #define SAMA_MCK_MDIV SAMA_MCK_MDIV_DIV4
  347. #else
  348. #error "Wrong SAMA_MCK_MDIV_VALUE."
  349. #endif
  350. /* Check on MDIV and PLLADIV2 value. */
  351. #if (SAMA_MCK_MDIV == SAMA_MCK_MDIV_DIV3) && !SAMA_PLLADIV2_EN
  352. #error "PLLADIV2 must be always enabled when Main Clock Divider is 3"
  353. #endif
  354. /**
  355. * @brief Processor Clock frequency.
  356. */
  357. #if (SAMA_MCK_SEL == SAMA_MCK_SLOW_CLK) || defined(__DOXYGEN__)
  358. #define SAMA_PCK (SAMA_SLOW_CLK / SAMA_MCK_PRES_VALUE)
  359. #elif (SAMA_MCK_SEL == SAMA_MCK_MAIN_CLK)
  360. #define SAMA_PCK (SAMA_MAIN_CLK / SAMA_MCK_PRES_VALUE)
  361. #elif (SAMA_MCK_SEL == SAMA_MCK_PLLA_CLK)
  362. #if SAMA_PLLADIV2_EN
  363. #define SAMA_PCK (SAMA_PLLACLKOUT / SAMA_MCK_PRES_VALUE / 2)
  364. #else
  365. #define SAMA_PCK (SAMA_PLLACLKOUT / SAMA_MCK_PRES_VALUE)
  366. #endif
  367. #elif (SAMA_MCK_SEL == SAMA_MCK_UPLL_CLK)
  368. #error "UPLL still unsupported"
  369. #else
  370. #error "Wrong SAMA_MCK_SEL."
  371. #endif
  372. /**
  373. * @brief Master Clock frequency.
  374. */
  375. #define SAMA_MCK (SAMA_PCK / SAMA_MCK_MDIV_VALUE)
  376. /* Checks on Processor Clock crystal range. */
  377. #if (SAMA_PCK > SAMA_PCK_MAX) || (SAMA_PCK < SAMA_PCK_MIN)
  378. #error "Processor clock frequency out of range."
  379. #endif
  380. /* Checks on Master Clock crystal range. */
  381. #if (SAMA_MCK > SAMA_MCK_MAX) || (SAMA_MCK < SAMA_MCK_MIN)
  382. #error "Master clock frequency out of range."
  383. #define VALUE(x) #x
  384. #define VAR_NAME_VALUE(var) #var "=" VALUE(var)
  385. #pragma message(VAR_NAME_VALUE(SAMA_MCK))
  386. #endif
  387. /**
  388. * @brief Matrix H64H32 clock ratio.
  389. */
  390. #if ((SAMA_H64MX_H32MX_RATIO == 2) || defined(__DOXYGEN__))
  391. #define SAMA_H64MX_H32MX_DIV PMC_MCKR_H32MXDIV_H32MXDIV2
  392. #elif (SAMA_H64MX_H32MX_RATIO == 1)
  393. #define SAMA_H64MX_H32MX_DIV PMC_MCKR_H32MXDIV_H32MXDIV1
  394. #if (SAMA_MCK > 83000000)
  395. #error "Invalid H32MXCLK. MCK > 83MHz wants SAMA_H64MX_H32MX_RATIO == 2"
  396. #endif
  397. #else
  398. #error "H64MX H32MX clock ratio out of range."
  399. #endif
  400. /**
  401. * @brief UARTx clock.
  402. * TODO: Work only with PERIPH CLOCK
  403. */
  404. #define SAMA_UART0CLK (SAMA_MCK / SAMA_H64MX_H32MX_RATIO)
  405. #define SAMA_UART1CLK (SAMA_MCK / SAMA_H64MX_H32MX_RATIO)
  406. #define SAMA_UART2CLK (SAMA_MCK / SAMA_H64MX_H32MX_RATIO)
  407. #define SAMA_UART3CLK (SAMA_MCK / SAMA_H64MX_H32MX_RATIO)
  408. #define SAMA_UART4CLK (SAMA_MCK / SAMA_H64MX_H32MX_RATIO)
  409. /**
  410. * @brief FLEXCOMx clock.
  411. * TODO: Work only with PERIPH CLOCK
  412. */
  413. #define SAMA_FLEXCOM0CLK (SAMA_MCK / SAMA_H64MX_H32MX_RATIO)
  414. #define SAMA_FLEXCOM1CLK (SAMA_MCK / SAMA_H64MX_H32MX_RATIO)
  415. #define SAMA_FLEXCOM2CLK (SAMA_MCK / SAMA_H64MX_H32MX_RATIO)
  416. #define SAMA_FLEXCOM3CLK (SAMA_MCK / SAMA_H64MX_H32MX_RATIO)
  417. #define SAMA_FLEXCOM4CLK (SAMA_MCK / SAMA_H64MX_H32MX_RATIO)
  418. /**
  419. * @brief TCx clock.
  420. * TODO: Work only with PERIPH CLOCK
  421. */
  422. #define SAMA_TC0CLK (SAMA_MCK / SAMA_H64MX_H32MX_RATIO)
  423. #define SAMA_TC1CLK (SAMA_MCK / SAMA_H64MX_H32MX_RATIO)
  424. /**
  425. * @brief GMAC0 clock.
  426. * TODO: Work only with PERIPH CLOCK
  427. */
  428. #define SAMA_GMAC0CLK (SAMA_MCK / SAMA_H64MX_H32MX_RATIO)
  429. /**
  430. * @brief TWIHSx clock.
  431. * TODO: Work only with PERIPH CLOCK
  432. */
  433. #define SAMA_TWIHSxCLK (SAMA_MCK / SAMA_H64MX_H32MX_RATIO)
  434. /*===========================================================================*/
  435. /* Driver data structures and types. */
  436. /*===========================================================================*/
  437. /*===========================================================================*/
  438. /* Driver macros. */
  439. /*===========================================================================*/
  440. /*===========================================================================*/
  441. /* External declarations. */
  442. /*===========================================================================*/
  443. /* Various helpers.*/
  444. #include "sama_pmc.h"
  445. #include "sama_aic.h"
  446. #include "sama_matrix.h"
  447. #include "sama_xdmac.h"
  448. #include "sama_cache.h"
  449. #include "sama_tc_lld.h"
  450. #include "sama_lcdc.h"
  451. #include "sama_secumod.h"
  452. #include "sama_onewire.h"
  453. #include "sama_classd.h"
  454. #include "sama_rstc.h"
  455. #ifdef __cplusplus
  456. extern "C" {
  457. #endif
  458. void hal_lld_init(void);
  459. void sama_clock_init(void);
  460. #ifdef __cplusplus
  461. }
  462. #endif
  463. #endif /* _HAL_LLD_H_ */
  464. /** @} */