summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-09-05 01:01:31 +0200
committerVladimir Serbinenko <phcoder@gmail.com>2014-09-13 00:42:14 +0200
commit75c83870e51e6bc48a83114c64177432d3204b1f (patch)
tree98284c8843dc1a27a2df4e46b493386934d51a32 /src/include
parenta812643723419f4fe3f079731a9d10d2dc083aae (diff)
azalia: Shrink boilerplate
Change-Id: Ib3e09644c0ee71aacb067adaa85653d151b52078 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/6840 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/device/azalia_device.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/include/device/azalia_device.h b/src/include/device/azalia_device.h
index 4940cd238d..0f477a357a 100644
--- a/src/include/device/azalia_device.h
+++ b/src/include/device/azalia_device.h
@@ -20,15 +20,26 @@
#ifndef DEVICE_AZALIA_H
#define DEVICE_AZALIA_H
+#include <types.h>
+#include <string.h>
+#include <console/console.h>
+#include <arch/acpi.h>
+#include <arch/io.h>
+#include <arch/interrupt.h>
+#include <build.h>
+
#include <device/device.h>
void azalia_audio_init(struct device *dev);
extern struct device_operations default_azalia_audio_ops;
-extern const u32 *cim_verb_data;
-extern u32 cim_verb_data_size;
-extern const u32 *pc_beep_verbs;
-extern u32 pc_beep_verbs_size;
+extern const u32 cim_verb_data[];
+extern const u32 cim_verb_data_size;
+extern const u32 pc_beep_verbs[];
+extern const u32 pc_beep_verbs_size;
+
+#define AZALIA_ARRAY_SIZES const u32 pc_beep_verbs_size = ARRAY_SIZE(pc_beep_verbs); \
+ const u32 cim_verb_data_size = sizeof(cim_verb_data)
#define AZALIA_PIN_CFG(codec, pin, val) \
((codec) << 28) | ((pin) << 20) | ( 0x71c << 8) | ((val) & 0xff), \