bus.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788
  1. /*
  2. * linux/arch/arm/common/amba.c
  3. *
  4. * Copyright (C) 2003 Deep Blue Solutions Ltd, All Rights Reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #include <linux/module.h>
  11. #include <linux/init.h>
  12. #include <linux/device.h>
  13. #include <linux/string.h>
  14. #include <linux/slab.h>
  15. #include <linux/io.h>
  16. #include <linux/pm.h>
  17. #include <linux/pm_runtime.h>
  18. #include <linux/amba/bus.h>
  19. #include <asm/irq.h>
  20. #include <asm/sizes.h>
  21. #define to_amba_driver(d) container_of(d, struct amba_driver, drv)
  22. static const struct amba_id *
  23. amba_lookup(const struct amba_id *table, struct amba_device *dev)
  24. {
  25. int ret = 0;
  26. while (table->mask) {
  27. ret = (dev->periphid & table->mask) == table->id;
  28. if (ret)
  29. break;
  30. table++;
  31. }
  32. return ret ? table : NULL;
  33. }
  34. static int amba_match(struct device *dev, struct device_driver *drv)
  35. {
  36. struct amba_device *pcdev = to_amba_device(dev);
  37. struct amba_driver *pcdrv = to_amba_driver(drv);
  38. return amba_lookup(pcdrv->id_table, pcdev) != NULL;
  39. }
  40. #ifdef CONFIG_HOTPLUG
  41. static int amba_uevent(struct device *dev, struct kobj_uevent_env *env)
  42. {
  43. struct amba_device *pcdev = to_amba_device(dev);
  44. int retval = 0;
  45. retval = add_uevent_var(env, "AMBA_ID=%08x", pcdev->periphid);
  46. return retval;
  47. }
  48. #else
  49. #define amba_uevent NULL
  50. #endif
  51. #define amba_attr_func(name,fmt,arg...) \
  52. static ssize_t name##_show(struct device *_dev, \
  53. struct device_attribute *attr, char *buf) \
  54. { \
  55. struct amba_device *dev = to_amba_device(_dev); \
  56. return sprintf(buf, fmt, arg); \
  57. }
  58. #define amba_attr(name,fmt,arg...) \
  59. amba_attr_func(name,fmt,arg) \
  60. static DEVICE_ATTR(name, S_IRUGO, name##_show, NULL)
  61. amba_attr_func(id, "%08x\n", dev->periphid);
  62. amba_attr(irq0, "%u\n", dev->irq[0]);
  63. amba_attr(irq1, "%u\n", dev->irq[1]);
  64. amba_attr_func(resource, "\t%016llx\t%016llx\t%016lx\n",
  65. (unsigned long long)dev->res.start, (unsigned long long)dev->res.end,
  66. dev->res.flags);
  67. static struct device_attribute amba_dev_attrs[] = {
  68. __ATTR_RO(id),
  69. __ATTR_RO(resource),
  70. __ATTR_NULL,
  71. };
  72. #ifdef CONFIG_PM_SLEEP
  73. static int amba_legacy_suspend(struct device *dev, pm_message_t mesg)
  74. {
  75. struct amba_driver *adrv = to_amba_driver(dev->driver);
  76. struct amba_device *adev = to_amba_device(dev);
  77. int ret = 0;
  78. if (dev->driver && adrv->suspend)
  79. ret = adrv->suspend(adev, mesg);
  80. return ret;
  81. }
  82. static int amba_legacy_resume(struct device *dev)
  83. {
  84. struct amba_driver *adrv = to_amba_driver(dev->driver);
  85. struct amba_device *adev = to_amba_device(dev);
  86. int ret = 0;
  87. if (dev->driver && adrv->resume)
  88. ret = adrv->resume(adev);
  89. return ret;
  90. }
  91. static int amba_pm_prepare(struct device *dev)
  92. {
  93. struct device_driver *drv = dev->driver;
  94. int ret = 0;
  95. if (drv && drv->pm && drv->pm->prepare)
  96. ret = drv->pm->prepare(dev);
  97. return ret;
  98. }
  99. static void amba_pm_complete(struct device *dev)
  100. {
  101. struct device_driver *drv = dev->driver;
  102. if (drv && drv->pm && drv->pm->complete)
  103. drv->pm->complete(dev);
  104. }
  105. #else /* !CONFIG_PM_SLEEP */
  106. #define amba_pm_prepare NULL
  107. #define amba_pm_complete NULL
  108. #endif /* !CONFIG_PM_SLEEP */
  109. #ifdef CONFIG_SUSPEND
  110. static int amba_pm_suspend(struct device *dev)
  111. {
  112. struct device_driver *drv = dev->driver;
  113. int ret = 0;
  114. if (!drv)
  115. return 0;
  116. if (drv->pm) {
  117. if (drv->pm->suspend)
  118. ret = drv->pm->suspend(dev);
  119. } else {
  120. ret = amba_legacy_suspend(dev, PMSG_SUSPEND);
  121. }
  122. return ret;
  123. }
  124. static int amba_pm_suspend_noirq(struct device *dev)
  125. {
  126. struct device_driver *drv = dev->driver;
  127. int ret = 0;
  128. if (!drv)
  129. return 0;
  130. if (drv->pm) {
  131. if (drv->pm->suspend_noirq)
  132. ret = drv->pm->suspend_noirq(dev);
  133. }
  134. return ret;
  135. }
  136. static int amba_pm_resume(struct device *dev)
  137. {
  138. struct device_driver *drv = dev->driver;
  139. int ret = 0;
  140. if (!drv)
  141. return 0;
  142. if (drv->pm) {
  143. if (drv->pm->resume)
  144. ret = drv->pm->resume(dev);
  145. } else {
  146. ret = amba_legacy_resume(dev);
  147. }
  148. return ret;
  149. }
  150. static int amba_pm_resume_noirq(struct device *dev)
  151. {
  152. struct device_driver *drv = dev->driver;
  153. int ret = 0;
  154. if (!drv)
  155. return 0;
  156. if (drv->pm) {
  157. if (drv->pm->resume_noirq)
  158. ret = drv->pm->resume_noirq(dev);
  159. }
  160. return ret;
  161. }
  162. #else /* !CONFIG_SUSPEND */
  163. #define amba_pm_suspend NULL
  164. #define amba_pm_resume NULL
  165. #define amba_pm_suspend_noirq NULL
  166. #define amba_pm_resume_noirq NULL
  167. #endif /* !CONFIG_SUSPEND */
  168. #ifdef CONFIG_HIBERNATE_CALLBACKS
  169. static int amba_pm_freeze(struct device *dev)
  170. {
  171. struct device_driver *drv = dev->driver;
  172. int ret = 0;
  173. if (!drv)
  174. return 0;
  175. if (drv->pm) {
  176. if (drv->pm->freeze)
  177. ret = drv->pm->freeze(dev);
  178. } else {
  179. ret = amba_legacy_suspend(dev, PMSG_FREEZE);
  180. }
  181. return ret;
  182. }
  183. static int amba_pm_freeze_noirq(struct device *dev)
  184. {
  185. struct device_driver *drv = dev->driver;
  186. int ret = 0;
  187. if (!drv)
  188. return 0;
  189. if (drv->pm) {
  190. if (drv->pm->freeze_noirq)
  191. ret = drv->pm->freeze_noirq(dev);
  192. }
  193. return ret;
  194. }
  195. static int amba_pm_thaw(struct device *dev)
  196. {
  197. struct device_driver *drv = dev->driver;
  198. int ret = 0;
  199. if (!drv)
  200. return 0;
  201. if (drv->pm) {
  202. if (drv->pm->thaw)
  203. ret = drv->pm->thaw(dev);
  204. } else {
  205. ret = amba_legacy_resume(dev);
  206. }
  207. return ret;
  208. }
  209. static int amba_pm_thaw_noirq(struct device *dev)
  210. {
  211. struct device_driver *drv = dev->driver;
  212. int ret = 0;
  213. if (!drv)
  214. return 0;
  215. if (drv->pm) {
  216. if (drv->pm->thaw_noirq)
  217. ret = drv->pm->thaw_noirq(dev);
  218. }
  219. return ret;
  220. }
  221. static int amba_pm_poweroff(struct device *dev)
  222. {
  223. struct device_driver *drv = dev->driver;
  224. int ret = 0;
  225. if (!drv)
  226. return 0;
  227. if (drv->pm) {
  228. if (drv->pm->poweroff)
  229. ret = drv->pm->poweroff(dev);
  230. } else {
  231. ret = amba_legacy_suspend(dev, PMSG_HIBERNATE);
  232. }
  233. return ret;
  234. }
  235. static int amba_pm_poweroff_noirq(struct device *dev)
  236. {
  237. struct device_driver *drv = dev->driver;
  238. int ret = 0;
  239. if (!drv)
  240. return 0;
  241. if (drv->pm) {
  242. if (drv->pm->poweroff_noirq)
  243. ret = drv->pm->poweroff_noirq(dev);
  244. }
  245. return ret;
  246. }
  247. static int amba_pm_restore(struct device *dev)
  248. {
  249. struct device_driver *drv = dev->driver;
  250. int ret = 0;
  251. if (!drv)
  252. return 0;
  253. if (drv->pm) {
  254. if (drv->pm->restore)
  255. ret = drv->pm->restore(dev);
  256. } else {
  257. ret = amba_legacy_resume(dev);
  258. }
  259. return ret;
  260. }
  261. static int amba_pm_restore_noirq(struct device *dev)
  262. {
  263. struct device_driver *drv = dev->driver;
  264. int ret = 0;
  265. if (!drv)
  266. return 0;
  267. if (drv->pm) {
  268. if (drv->pm->restore_noirq)
  269. ret = drv->pm->restore_noirq(dev);
  270. }
  271. return ret;
  272. }
  273. #else /* !CONFIG_HIBERNATE_CALLBACKS */
  274. #define amba_pm_freeze NULL
  275. #define amba_pm_thaw NULL
  276. #define amba_pm_poweroff NULL
  277. #define amba_pm_restore NULL
  278. #define amba_pm_freeze_noirq NULL
  279. #define amba_pm_thaw_noirq NULL
  280. #define amba_pm_poweroff_noirq NULL
  281. #define amba_pm_restore_noirq NULL
  282. #endif /* !CONFIG_HIBERNATE_CALLBACKS */
  283. #ifdef CONFIG_PM
  284. static const struct dev_pm_ops amba_pm = {
  285. .prepare = amba_pm_prepare,
  286. .complete = amba_pm_complete,
  287. .suspend = amba_pm_suspend,
  288. .resume = amba_pm_resume,
  289. .freeze = amba_pm_freeze,
  290. .thaw = amba_pm_thaw,
  291. .poweroff = amba_pm_poweroff,
  292. .restore = amba_pm_restore,
  293. .suspend_noirq = amba_pm_suspend_noirq,
  294. .resume_noirq = amba_pm_resume_noirq,
  295. .freeze_noirq = amba_pm_freeze_noirq,
  296. .thaw_noirq = amba_pm_thaw_noirq,
  297. .poweroff_noirq = amba_pm_poweroff_noirq,
  298. .restore_noirq = amba_pm_restore_noirq,
  299. SET_RUNTIME_PM_OPS(
  300. pm_generic_runtime_suspend,
  301. pm_generic_runtime_resume,
  302. pm_generic_runtime_idle
  303. )
  304. };
  305. #define AMBA_PM (&amba_pm)
  306. #else /* !CONFIG_PM */
  307. #define AMBA_PM NULL
  308. #endif /* !CONFIG_PM */
  309. /*
  310. * Primecells are part of the Advanced Microcontroller Bus Architecture,
  311. * so we call the bus "amba".
  312. */
  313. struct bus_type amba_bustype = {
  314. .name = "amba",
  315. .dev_attrs = amba_dev_attrs,
  316. .match = amba_match,
  317. .uevent = amba_uevent,
  318. .pm = AMBA_PM,
  319. };
  320. static int __init amba_init(void)
  321. {
  322. return bus_register(&amba_bustype);
  323. }
  324. postcore_initcall(amba_init);
  325. static int amba_get_enable_pclk(struct amba_device *pcdev)
  326. {
  327. struct clk *pclk = clk_get(&pcdev->dev, "apb_pclk");
  328. int ret;
  329. pcdev->pclk = pclk;
  330. if (IS_ERR(pclk))
  331. return PTR_ERR(pclk);
  332. ret = clk_enable(pclk);
  333. if (ret)
  334. clk_put(pclk);
  335. return ret;
  336. }
  337. static void amba_put_disable_pclk(struct amba_device *pcdev)
  338. {
  339. struct clk *pclk = pcdev->pclk;
  340. clk_disable(pclk);
  341. clk_put(pclk);
  342. }
  343. static int amba_get_enable_vcore(struct amba_device *pcdev)
  344. {
  345. struct regulator *vcore = regulator_get(&pcdev->dev, "vcore");
  346. int ret;
  347. pcdev->vcore = vcore;
  348. if (IS_ERR(vcore)) {
  349. /* It is OK not to supply a vcore regulator */
  350. if (PTR_ERR(vcore) == -ENODEV)
  351. return 0;
  352. return PTR_ERR(vcore);
  353. }
  354. ret = regulator_enable(vcore);
  355. if (ret) {
  356. regulator_put(vcore);
  357. pcdev->vcore = ERR_PTR(-ENODEV);
  358. }
  359. return ret;
  360. }
  361. static void amba_put_disable_vcore(struct amba_device *pcdev)
  362. {
  363. struct regulator *vcore = pcdev->vcore;
  364. if (!IS_ERR(vcore)) {
  365. regulator_disable(vcore);
  366. regulator_put(vcore);
  367. }
  368. }
  369. /*
  370. * These are the device model conversion veneers; they convert the
  371. * device model structures to our more specific structures.
  372. */
  373. static int amba_probe(struct device *dev)
  374. {
  375. struct amba_device *pcdev = to_amba_device(dev);
  376. struct amba_driver *pcdrv = to_amba_driver(dev->driver);
  377. const struct amba_id *id = amba_lookup(pcdrv->id_table, pcdev);
  378. int ret;
  379. do {
  380. ret = amba_get_enable_vcore(pcdev);
  381. if (ret)
  382. break;
  383. ret = amba_get_enable_pclk(pcdev);
  384. if (ret)
  385. break;
  386. ret = pcdrv->probe(pcdev, id);
  387. if (ret == 0)
  388. break;
  389. amba_put_disable_pclk(pcdev);
  390. amba_put_disable_vcore(pcdev);
  391. } while (0);
  392. return ret;
  393. }
  394. static int amba_remove(struct device *dev)
  395. {
  396. struct amba_device *pcdev = to_amba_device(dev);
  397. struct amba_driver *drv = to_amba_driver(dev->driver);
  398. int ret = drv->remove(pcdev);
  399. amba_put_disable_pclk(pcdev);
  400. amba_put_disable_vcore(pcdev);
  401. return ret;
  402. }
  403. static void amba_shutdown(struct device *dev)
  404. {
  405. struct amba_driver *drv = to_amba_driver(dev->driver);
  406. drv->shutdown(to_amba_device(dev));
  407. }
  408. /**
  409. * amba_driver_register - register an AMBA device driver
  410. * @drv: amba device driver structure
  411. *
  412. * Register an AMBA device driver with the Linux device model
  413. * core. If devices pre-exist, the drivers probe function will
  414. * be called.
  415. */
  416. int amba_driver_register(struct amba_driver *drv)
  417. {
  418. drv->drv.bus = &amba_bustype;
  419. #define SETFN(fn) if (drv->fn) drv->drv.fn = amba_##fn
  420. SETFN(probe);
  421. SETFN(remove);
  422. SETFN(shutdown);
  423. return driver_register(&drv->drv);
  424. }
  425. /**
  426. * amba_driver_unregister - remove an AMBA device driver
  427. * @drv: AMBA device driver structure to remove
  428. *
  429. * Unregister an AMBA device driver from the Linux device
  430. * model. The device model will call the drivers remove function
  431. * for each device the device driver is currently handling.
  432. */
  433. void amba_driver_unregister(struct amba_driver *drv)
  434. {
  435. driver_unregister(&drv->drv);
  436. }
  437. static void amba_device_release(struct device *dev)
  438. {
  439. struct amba_device *d = to_amba_device(dev);
  440. if (d->res.parent)
  441. release_resource(&d->res);
  442. kfree(d);
  443. }
  444. /**
  445. * amba_device_register - register an AMBA device
  446. * @dev: AMBA device to register
  447. * @parent: parent memory resource
  448. *
  449. * Setup the AMBA device, reading the cell ID if present.
  450. * Claim the resource, and register the AMBA device with
  451. * the Linux device manager.
  452. */
  453. int amba_device_register(struct amba_device *dev, struct resource *parent)
  454. {
  455. u32 size;
  456. void __iomem *tmp;
  457. int i, ret;
  458. device_initialize(&dev->dev);
  459. /*
  460. * Copy from device_add
  461. */
  462. if (dev->dev.init_name) {
  463. dev_set_name(&dev->dev, "%s", dev->dev.init_name);
  464. dev->dev.init_name = NULL;
  465. }
  466. dev->dev.release = amba_device_release;
  467. dev->dev.bus = &amba_bustype;
  468. dev->dev.dma_mask = &dev->dma_mask;
  469. dev->res.name = dev_name(&dev->dev);
  470. if (!dev->dev.coherent_dma_mask && dev->dma_mask)
  471. dev_warn(&dev->dev, "coherent dma mask is unset\n");
  472. ret = request_resource(parent, &dev->res);
  473. if (ret)
  474. goto err_out;
  475. /* Hard-coded primecell ID instead of plug-n-play */
  476. if (dev->periphid != 0)
  477. goto skip_probe;
  478. /*
  479. * Dynamically calculate the size of the resource
  480. * and use this for iomap
  481. */
  482. size = resource_size(&dev->res);
  483. tmp = ioremap(dev->res.start, size);
  484. if (!tmp) {
  485. ret = -ENOMEM;
  486. goto err_release;
  487. }
  488. ret = amba_get_enable_pclk(dev);
  489. if (ret == 0) {
  490. u32 pid, cid;
  491. /*
  492. * Read pid and cid based on size of resource
  493. * they are located at end of region
  494. */
  495. for (pid = 0, i = 0; i < 4; i++)
  496. pid |= (readl(tmp + size - 0x20 + 4 * i) & 255) <<
  497. (i * 8);
  498. for (cid = 0, i = 0; i < 4; i++)
  499. cid |= (readl(tmp + size - 0x10 + 4 * i) & 255) <<
  500. (i * 8);
  501. amba_put_disable_pclk(dev);
  502. if (cid == AMBA_CID)
  503. dev->periphid = pid;
  504. if (!dev->periphid)
  505. ret = -ENODEV;
  506. }
  507. iounmap(tmp);
  508. if (ret)
  509. goto err_release;
  510. skip_probe:
  511. ret = device_add(&dev->dev);
  512. if (ret)
  513. goto err_release;
  514. if (dev->irq[0] != NO_IRQ)
  515. ret = device_create_file(&dev->dev, &dev_attr_irq0);
  516. if (ret == 0 && dev->irq[1] != NO_IRQ)
  517. ret = device_create_file(&dev->dev, &dev_attr_irq1);
  518. if (ret == 0)
  519. return ret;
  520. device_unregister(&dev->dev);
  521. err_release:
  522. release_resource(&dev->res);
  523. err_out:
  524. return ret;
  525. }
  526. /**
  527. * amba_device_unregister - unregister an AMBA device
  528. * @dev: AMBA device to remove
  529. *
  530. * Remove the specified AMBA device from the Linux device
  531. * manager. All files associated with this object will be
  532. * destroyed, and device drivers notified that the device has
  533. * been removed. The AMBA device's resources including
  534. * the amba_device structure will be freed once all
  535. * references to it have been dropped.
  536. */
  537. void amba_device_unregister(struct amba_device *dev)
  538. {
  539. device_unregister(&dev->dev);
  540. }
  541. struct find_data {
  542. struct amba_device *dev;
  543. struct device *parent;
  544. const char *busid;
  545. unsigned int id;
  546. unsigned int mask;
  547. };
  548. static int amba_find_match(struct device *dev, void *data)
  549. {
  550. struct find_data *d = data;
  551. struct amba_device *pcdev = to_amba_device(dev);
  552. int r;
  553. r = (pcdev->periphid & d->mask) == d->id;
  554. if (d->parent)
  555. r &= d->parent == dev->parent;
  556. if (d->busid)
  557. r &= strcmp(dev_name(dev), d->busid) == 0;
  558. if (r) {
  559. get_device(dev);
  560. d->dev = pcdev;
  561. }
  562. return r;
  563. }
  564. /**
  565. * amba_find_device - locate an AMBA device given a bus id
  566. * @busid: bus id for device (or NULL)
  567. * @parent: parent device (or NULL)
  568. * @id: peripheral ID (or 0)
  569. * @mask: peripheral ID mask (or 0)
  570. *
  571. * Return the AMBA device corresponding to the supplied parameters.
  572. * If no device matches, returns NULL.
  573. *
  574. * NOTE: When a valid device is found, its refcount is
  575. * incremented, and must be decremented before the returned
  576. * reference.
  577. */
  578. struct amba_device *
  579. amba_find_device(const char *busid, struct device *parent, unsigned int id,
  580. unsigned int mask)
  581. {
  582. struct find_data data;
  583. data.dev = NULL;
  584. data.parent = parent;
  585. data.busid = busid;
  586. data.id = id;
  587. data.mask = mask;
  588. bus_for_each_dev(&amba_bustype, NULL, &data, amba_find_match);
  589. return data.dev;
  590. }
  591. /**
  592. * amba_request_regions - request all mem regions associated with device
  593. * @dev: amba_device structure for device
  594. * @name: name, or NULL to use driver name
  595. */
  596. int amba_request_regions(struct amba_device *dev, const char *name)
  597. {
  598. int ret = 0;
  599. u32 size;
  600. if (!name)
  601. name = dev->dev.driver->name;
  602. size = resource_size(&dev->res);
  603. if (!request_mem_region(dev->res.start, size, name))
  604. ret = -EBUSY;
  605. return ret;
  606. }
  607. /**
  608. * amba_release_regions - release mem regions associated with device
  609. * @dev: amba_device structure for device
  610. *
  611. * Release regions claimed by a successful call to amba_request_regions.
  612. */
  613. void amba_release_regions(struct amba_device *dev)
  614. {
  615. u32 size;
  616. size = resource_size(&dev->res);
  617. release_mem_region(dev->res.start, size);
  618. }
  619. EXPORT_SYMBOL(amba_driver_register);
  620. EXPORT_SYMBOL(amba_driver_unregister);
  621. EXPORT_SYMBOL(amba_device_register);
  622. EXPORT_SYMBOL(amba_device_unregister);
  623. EXPORT_SYMBOL(amba_find_device);
  624. EXPORT_SYMBOL(amba_request_regions);
  625. EXPORT_SYMBOL(amba_release_regions);