Angel Pons | 85bf79d | 2020-04-03 01:21:41 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Frans Hendriks | 43b6e2e | 2019-06-04 13:53:05 +0200 | [diff] [blame] | 2 | |
| 3 | #include <device/device.h> |
Frans Hendriks | 43b6e2e | 2019-06-04 13:53:05 +0200 | [diff] [blame] | 4 | |
| 5 | /* |
| 6 | * Declare the resources we are using |
| 7 | */ |
| 8 | static void mainboard_reserve_resources(struct device *dev) |
| 9 | { |
| 10 | unsigned int idx = 0; |
| 11 | struct resource *res; |
| 12 | |
| 13 | /* |
| 14 | * CPLD: Reserve the IRQ here all others are within the default LPC |
| 15 | * range 0 to 1000h |
| 16 | */ |
| 17 | res = new_resource(dev, idx++); |
| 18 | res->base = 0x7; |
| 19 | res->size = 0x1; |
| 20 | res->flags = IORESOURCE_IRQ | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; |
| 21 | } |
| 22 | |
Frans Hendriks | 43b6e2e | 2019-06-04 13:53:05 +0200 | [diff] [blame] | 23 | static void mainboard_enable(struct device *dev) |
| 24 | { |
| 25 | mainboard_reserve_resources(dev); |
| 26 | } |
| 27 | |
| 28 | struct chip_operations mainboard_ops = { |
| 29 | .enable_dev = mainboard_enable, |
| 30 | }; |