| Nico Huber | 21da574 | 2017-01-20 14:00:53 +0100 | [diff] [blame] | 1 | -- |
| 2 | -- Copyright (C) 2017 secunet Security Networks AG |
| 3 | -- |
| 4 | -- This program is free software; you can redistribute it and/or modify |
| 5 | -- it under the terms of the GNU General Public License as published by |
| 6 | -- the Free Software Foundation; either version 2 of the License, or |
| 7 | -- (at your option) any later version. |
| 8 | -- |
| 9 | -- This program is distributed in the hope that it will be useful, |
| 10 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | -- GNU General Public License for more details. |
| 13 | -- |
| 14 | |
| 15 | private package HW.GFX.GMA.PLLs |
| 16 | with |
| 17 | Abstract_State => (State with Part_Of => GMA.State) |
| 18 | is |
| 19 | |
| 20 | -- Broxton DDI PHY PLLs are tied to the port. |
| 21 | -- So the allocation will be a stub. |
| 22 | |
| 23 | -- XXX: Types should be private (but that triggers a bug in SPARK GPL 2016) |
| 24 | type T is (Invalid_PLL, DPLL_A, DPLL_B, DPLL_C); |
| 25 | Invalid : constant T := Invalid_PLL; |
| 26 | |
| 27 | procedure Initialize is null |
| 28 | with |
| 29 | Global => (Output => State); |
| 30 | |
| 31 | procedure Alloc |
| 32 | (Port_Cfg : in Port_Config; |
| 33 | PLL : out T; |
| 34 | Success : out Boolean); |
| 35 | |
| Nico Huber | 21da574 | 2017-01-20 14:00:53 +0100 | [diff] [blame] | 36 | procedure Free (PLL : T); |
| 37 | |
| 38 | procedure All_Off; |
| Nico Huber | 21da574 | 2017-01-20 14:00:53 +0100 | [diff] [blame] | 39 | |
| Nico Huber | 4b0239f | 2017-02-07 18:26:51 +0100 | [diff] [blame^] | 40 | -- Just an interface stub since PLLs are tied to the port. |
| 41 | type Word_Array is array (T) of Word32; |
| 42 | Register_Value : constant Word_Array := (others => 0); |
| Nico Huber | 21da574 | 2017-01-20 14:00:53 +0100 | [diff] [blame] | 43 | |
| 44 | end HW.GFX.GMA.PLLs; |