opaque: Move last bits from chipdrivers.h into chipdrivers/opaque.h
There are only things related to opaque programmers left.
Change-Id: Iffb702336ccbf9e8b67a2f57e25a5a06ba91b6a9
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/448
diff --git a/flashchips.c b/flashchips.c
index 853fa23..dbcb11f 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -21,9 +21,9 @@
#include "ene.h"
#include "flash.h"
#include "flashchips.h"
-#include "chipdrivers.h"
#include "chipdrivers/edi.h"
#include "chipdrivers/spi.h"
+#include "chipdrivers/opaque.h"
#include "chipdrivers/memory_bus.h"
#include "writeprotect.h"
diff --git a/include/chipdrivers.h b/include/chipdrivers.h
deleted file mode 100644
index 2dae8b5..0000000
--- a/include/chipdrivers.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the flashrom project.
- *
- * Copyright (C) 2009 Carl-Daniel Hailfinger
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * Header file for flash chip drivers. Included from flash.h.
- * As a general rule, every function listed here should take a pointer to
- * struct flashctx as first parameter.
- */
-
-#ifndef __CHIPDRIVERS_H__
-#define __CHIPDRIVERS_H__ 1
-
-#include "flash.h" /* for chipaddr and flashctx */
-
-/* opaque.c */
-int probe_opaque(struct flashctx *flash);
-int read_opaque(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
-int write_opaque(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
-int erase_opaque(struct flashctx *flash, unsigned int blockaddr, unsigned int blocklen);
-
-#endif /* !__CHIPDRIVERS_H__ */
diff --git a/include/chipdrivers/opaque.h b/include/chipdrivers/opaque.h
new file mode 100644
index 0000000..a621f66
--- /dev/null
+++ b/include/chipdrivers/opaque.h
@@ -0,0 +1,28 @@
+/*
+ * This file is part of the flashrom project.
+ *
+ * Copyright (C) 2009 Carl-Daniel Hailfinger
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __CHIPDRIVERS_OPAQUE_H__
+#define __CHIPDRIVERS_OPAQUE_H__ 1
+
+#include <stdint.h>
+
+struct flashprog_flashctx;
+
+int probe_opaque(struct flashprog_flashctx *);
+int read_opaque(struct flashprog_flashctx *, uint8_t *buf, unsigned int start, unsigned int len);
+int write_opaque(struct flashprog_flashctx *, const uint8_t *buf, unsigned int start, unsigned int len);
+int erase_opaque(struct flashprog_flashctx *, unsigned int blockaddr, unsigned int blocklen);
+
+#endif /* !__CHIPDRIVERS_OPAQUE_H__ */
diff --git a/opaque.c b/opaque.c
index f54a032..33ba766 100644
--- a/opaque.c
+++ b/opaque.c
@@ -23,7 +23,7 @@
#include <stdint.h>
#include "flash.h"
#include "flashchips.h"
-#include "chipdrivers.h"
+#include "chipdrivers/opaque.h"
#include "programmer.h"
int probe_opaque(struct flashctx *flash)