Edward O'Callaghan (eocallaghan(a)alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5621
-gerrit
commit ff060eec5bca6053428867a22404de9524974009
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Wed Apr 30 17:17:03 2014 +1000
superio/*: Deal with some chip.h special cases
While backing out the empty pc80 keyboard struct we encountered some
special cases where chip.h is used for other purposes. Deal with these
cases.
Change-Id: Ib11a46cfd14d050d5daa213623b9d8a401c06410
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
---
src/superio/ite/it8772f/chip.h | 5 +----
src/superio/nsc/pc97307/chip.h | 37 ---------------------------------
src/superio/nsc/pc97307/superio.c | 1 -
src/superio/nsc/pc97317/chip.h | 38 ----------------------------------
src/superio/nsc/pc97317/superio.c | 1 -
src/superio/winbond/w83697hf/chip.h | 2 +-
src/superio/winbond/w83697hf/superio.c | 2 +-
7 files changed, 3 insertions(+), 83 deletions(-)
diff --git a/src/superio/ite/it8772f/chip.h b/src/superio/ite/it8772f/chip.h
index 9c9aaa6..4a1b696 100644
--- a/src/superio/ite/it8772f/chip.h
+++ b/src/superio/ite/it8772f/chip.h
@@ -22,11 +22,8 @@
#define SUPERIO_ITE_IT8772F_CHIP_H
#include <device/device.h>
-#include <pc80/keyboard.h>
struct superio_ite_it8772f_config {
- struct pc_keyboard keyboard;
-
/* GPIO SimpleIO register values via devicetree.cb */
u8 gpio_set1;
u8 gpio_set2;
@@ -51,4 +48,4 @@ struct superio_ite_it8772f_config {
u8 fan3_enable;
};
-#endif
+#endif /* SUPERIO_ITE_IT8772F_CHIP_H */
diff --git a/src/superio/nsc/pc97307/chip.h b/src/superio/nsc/pc97307/chip.h
deleted file mode 100644
index e0c1330..0000000
--- a/src/superio/nsc/pc97307/chip.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2000 AG Electronics Ltd.
- *
- * 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; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef SUPERIO_NSC_PC97307_CHIP_H
-#define SUPERIO_NSC_PC97307_CHIP_H
-
-#ifndef PNP_INDEX_REG
-#define PNP_INDEX_REG 0x15C
-#endif
-#ifndef PNP_DATA_REG
-#define PNP_DATA_REG 0x15D
-#endif
-
-#include <pc80/keyboard.h>
-
-struct superio_nsc_pc97307_config {
-
- struct pc_keyboard keyboard;
-};
-#endif
diff --git a/src/superio/nsc/pc97307/superio.c b/src/superio/nsc/pc97307/superio.c
index af7ca77..6b15901 100644
--- a/src/superio/nsc/pc97307/superio.c
+++ b/src/superio/nsc/pc97307/superio.c
@@ -24,7 +24,6 @@
#include <device/pnp.h>
#include <stdlib.h>
#include <pc80/keyboard.h>
-#include "chip.h" /* FIXME */
#include "pc97307.h"
static void init(device_t dev)
diff --git a/src/superio/nsc/pc97317/chip.h b/src/superio/nsc/pc97317/chip.h
deleted file mode 100644
index d896916..0000000
--- a/src/superio/nsc/pc97317/chip.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2000 AG Electronics Ltd.
- *
- * 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; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef SUPERIO_NSC_PC97317_CHIP_H
-#define SUPERIO_NSC_PC97317_CHIP_H
-
-#ifndef PNP_INDEX_REG
-#define PNP_INDEX_REG 0x15C
-#endif
-#ifndef PNP_DATA_REG
-#define PNP_DATA_REG 0x15D
-#endif
-
-#include <pc80/keyboard.h>
-
-struct superio_nsc_pc97317_config {
-
- struct pc_keyboard keyboard;
-};
-
-#endif
diff --git a/src/superio/nsc/pc97317/superio.c b/src/superio/nsc/pc97317/superio.c
index 6f39c5d..09c3b5e 100644
--- a/src/superio/nsc/pc97317/superio.c
+++ b/src/superio/nsc/pc97317/superio.c
@@ -24,7 +24,6 @@
#include <device/pnp.h>
#include <stdlib.h>
#include <pc80/keyboard.h>
-#include "chip.h" /* FIXME */
#include "pc97317.h"
static void init(device_t dev)
diff --git a/src/superio/winbond/w83697hf/chip.h b/src/superio/winbond/w83697hf/chip.h
index df9ce4b..5ca9b20 100644
--- a/src/superio/winbond/w83697hf/chip.h
+++ b/src/superio/winbond/w83697hf/chip.h
@@ -27,4 +27,4 @@ struct superio_winbond_w83697hf_config {
unsigned int hwmon_fan2_divisor;
};
-#endif
+#endif /* SUPERIO_WINBOND_W83697HF_CHIP_H */
diff --git a/src/superio/winbond/w83697hf/superio.c b/src/superio/winbond/w83697hf/superio.c
index 933da95..9d9742c 100644
--- a/src/superio/winbond/w83697hf/superio.c
+++ b/src/superio/winbond/w83697hf/superio.c
@@ -28,7 +28,7 @@
#include <pc80/mc146818rtc.h>
#include <stdlib.h>
#include <pc80/keyboard.h>
-#include "chip.h" /* FIXME */
+#include "chip.h"
#include "w83697hf.h"
static void hwmon_set_fan_divisor(unsigned int base, int num, unsigned int divisor) {
Edward O'Callaghan (eocallaghan(a)alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5621
-gerrit
commit 0bfa75253f51695c71353603a73e6ffc372ddab9
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Wed Apr 30 17:17:03 2014 +1000
superio/*: Deal with some chip.h special cases
While backing out the empty pc80 keyboard struct we encountered some
special cases where chip.h is used for other purposes. Deal with these
cases.
Change-Id: Ib11a46cfd14d050d5daa213623b9d8a401c06410
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
---
src/superio/ite/it8772f/chip.h | 5 +----
src/superio/nsc/pc97307/chip.h | 37 ---------------------------------
src/superio/nsc/pc97307/superio.c | 1 -
src/superio/nsc/pc97317/chip.h | 38 ----------------------------------
src/superio/nsc/pc97317/superio.c | 1 -
src/superio/winbond/w83697hf/chip.h | 2 +-
src/superio/winbond/w83697hf/superio.c | 2 +-
7 files changed, 3 insertions(+), 83 deletions(-)
diff --git a/src/superio/ite/it8772f/chip.h b/src/superio/ite/it8772f/chip.h
index 9c9aaa6..4a1b696 100644
--- a/src/superio/ite/it8772f/chip.h
+++ b/src/superio/ite/it8772f/chip.h
@@ -22,11 +22,8 @@
#define SUPERIO_ITE_IT8772F_CHIP_H
#include <device/device.h>
-#include <pc80/keyboard.h>
struct superio_ite_it8772f_config {
- struct pc_keyboard keyboard;
-
/* GPIO SimpleIO register values via devicetree.cb */
u8 gpio_set1;
u8 gpio_set2;
@@ -51,4 +48,4 @@ struct superio_ite_it8772f_config {
u8 fan3_enable;
};
-#endif
+#endif /* SUPERIO_ITE_IT8772F_CHIP_H */
diff --git a/src/superio/nsc/pc97307/chip.h b/src/superio/nsc/pc97307/chip.h
deleted file mode 100644
index e0c1330..0000000
--- a/src/superio/nsc/pc97307/chip.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2000 AG Electronics Ltd.
- *
- * 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; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef SUPERIO_NSC_PC97307_CHIP_H
-#define SUPERIO_NSC_PC97307_CHIP_H
-
-#ifndef PNP_INDEX_REG
-#define PNP_INDEX_REG 0x15C
-#endif
-#ifndef PNP_DATA_REG
-#define PNP_DATA_REG 0x15D
-#endif
-
-#include <pc80/keyboard.h>
-
-struct superio_nsc_pc97307_config {
-
- struct pc_keyboard keyboard;
-};
-#endif
diff --git a/src/superio/nsc/pc97307/superio.c b/src/superio/nsc/pc97307/superio.c
index af7ca77..6b15901 100644
--- a/src/superio/nsc/pc97307/superio.c
+++ b/src/superio/nsc/pc97307/superio.c
@@ -24,7 +24,6 @@
#include <device/pnp.h>
#include <stdlib.h>
#include <pc80/keyboard.h>
-#include "chip.h" /* FIXME */
#include "pc97307.h"
static void init(device_t dev)
diff --git a/src/superio/nsc/pc97317/chip.h b/src/superio/nsc/pc97317/chip.h
deleted file mode 100644
index d896916..0000000
--- a/src/superio/nsc/pc97317/chip.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2000 AG Electronics Ltd.
- *
- * 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; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef SUPERIO_NSC_PC97317_CHIP_H
-#define SUPERIO_NSC_PC97317_CHIP_H
-
-#ifndef PNP_INDEX_REG
-#define PNP_INDEX_REG 0x15C
-#endif
-#ifndef PNP_DATA_REG
-#define PNP_DATA_REG 0x15D
-#endif
-
-#include <pc80/keyboard.h>
-
-struct superio_nsc_pc97317_config {
-
- struct pc_keyboard keyboard;
-};
-
-#endif
diff --git a/src/superio/nsc/pc97317/superio.c b/src/superio/nsc/pc97317/superio.c
index 6f39c5d..09c3b5e 100644
--- a/src/superio/nsc/pc97317/superio.c
+++ b/src/superio/nsc/pc97317/superio.c
@@ -24,7 +24,6 @@
#include <device/pnp.h>
#include <stdlib.h>
#include <pc80/keyboard.h>
-#include "chip.h" /* FIXME */
#include "pc97317.h"
static void init(device_t dev)
diff --git a/src/superio/winbond/w83697hf/chip.h b/src/superio/winbond/w83697hf/chip.h
index df9ce4b..5ca9b20 100644
--- a/src/superio/winbond/w83697hf/chip.h
+++ b/src/superio/winbond/w83697hf/chip.h
@@ -27,4 +27,4 @@ struct superio_winbond_w83697hf_config {
unsigned int hwmon_fan2_divisor;
};
-#endif
+#endif /* SUPERIO_WINBOND_W83697HF_CHIP_H */
diff --git a/src/superio/winbond/w83697hf/superio.c b/src/superio/winbond/w83697hf/superio.c
index 933da95..9d9742c 100644
--- a/src/superio/winbond/w83697hf/superio.c
+++ b/src/superio/winbond/w83697hf/superio.c
@@ -28,7 +28,7 @@
#include <pc80/mc146818rtc.h>
#include <stdlib.h>
#include <pc80/keyboard.h>
-#include "chip.h" /* FIXME */
+#include "chip.h"
#include "w83697hf.h"
static void hwmon_set_fan_divisor(unsigned int base, int num, unsigned int divisor) {
Edward O'Callaghan (eocallaghan(a)alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5621
-gerrit
commit c357723f13052be6bb71a5a6055074c1b69a7c25
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Wed Apr 30 17:17:03 2014 +1000
superio/*: Deal with some chip.h special cases
While backing out the empty pc80 keyboard struct we encountered some
special cases where chip.h is used for other purposes. Deal with these
cases.
Change-Id: Ib11a46cfd14d050d5daa213623b9d8a401c06410
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
---
src/superio/ite/it8772f/chip.h | 5 +----
src/superio/nsc/pc97307/chip.h | 37 ---------------------------------
src/superio/nsc/pc97307/superio.c | 1 -
src/superio/nsc/pc97317/chip.h | 38 ----------------------------------
src/superio/nsc/pc97317/superio.c | 1 -
src/superio/winbond/w83697hf/chip.h | 2 +-
src/superio/winbond/w83697hf/superio.c | 2 +-
7 files changed, 3 insertions(+), 83 deletions(-)
diff --git a/src/superio/ite/it8772f/chip.h b/src/superio/ite/it8772f/chip.h
index 9c9aaa6..4a1b696 100644
--- a/src/superio/ite/it8772f/chip.h
+++ b/src/superio/ite/it8772f/chip.h
@@ -22,11 +22,8 @@
#define SUPERIO_ITE_IT8772F_CHIP_H
#include <device/device.h>
-#include <pc80/keyboard.h>
struct superio_ite_it8772f_config {
- struct pc_keyboard keyboard;
-
/* GPIO SimpleIO register values via devicetree.cb */
u8 gpio_set1;
u8 gpio_set2;
@@ -51,4 +48,4 @@ struct superio_ite_it8772f_config {
u8 fan3_enable;
};
-#endif
+#endif /* SUPERIO_ITE_IT8772F_CHIP_H */
diff --git a/src/superio/nsc/pc97307/chip.h b/src/superio/nsc/pc97307/chip.h
deleted file mode 100644
index e0c1330..0000000
--- a/src/superio/nsc/pc97307/chip.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2000 AG Electronics Ltd.
- *
- * 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; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef SUPERIO_NSC_PC97307_CHIP_H
-#define SUPERIO_NSC_PC97307_CHIP_H
-
-#ifndef PNP_INDEX_REG
-#define PNP_INDEX_REG 0x15C
-#endif
-#ifndef PNP_DATA_REG
-#define PNP_DATA_REG 0x15D
-#endif
-
-#include <pc80/keyboard.h>
-
-struct superio_nsc_pc97307_config {
-
- struct pc_keyboard keyboard;
-};
-#endif
diff --git a/src/superio/nsc/pc97307/superio.c b/src/superio/nsc/pc97307/superio.c
index af7ca77..6b15901 100644
--- a/src/superio/nsc/pc97307/superio.c
+++ b/src/superio/nsc/pc97307/superio.c
@@ -24,7 +24,6 @@
#include <device/pnp.h>
#include <stdlib.h>
#include <pc80/keyboard.h>
-#include "chip.h" /* FIXME */
#include "pc97307.h"
static void init(device_t dev)
diff --git a/src/superio/nsc/pc97317/chip.h b/src/superio/nsc/pc97317/chip.h
deleted file mode 100644
index d896916..0000000
--- a/src/superio/nsc/pc97317/chip.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2000 AG Electronics Ltd.
- *
- * 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; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef SUPERIO_NSC_PC97317_CHIP_H
-#define SUPERIO_NSC_PC97317_CHIP_H
-
-#ifndef PNP_INDEX_REG
-#define PNP_INDEX_REG 0x15C
-#endif
-#ifndef PNP_DATA_REG
-#define PNP_DATA_REG 0x15D
-#endif
-
-#include <pc80/keyboard.h>
-
-struct superio_nsc_pc97317_config {
-
- struct pc_keyboard keyboard;
-};
-
-#endif
diff --git a/src/superio/nsc/pc97317/superio.c b/src/superio/nsc/pc97317/superio.c
index 6f39c5d..09c3b5e 100644
--- a/src/superio/nsc/pc97317/superio.c
+++ b/src/superio/nsc/pc97317/superio.c
@@ -24,7 +24,6 @@
#include <device/pnp.h>
#include <stdlib.h>
#include <pc80/keyboard.h>
-#include "chip.h" /* FIXME */
#include "pc97317.h"
static void init(device_t dev)
diff --git a/src/superio/winbond/w83697hf/chip.h b/src/superio/winbond/w83697hf/chip.h
index df9ce4b..5ca9b20 100644
--- a/src/superio/winbond/w83697hf/chip.h
+++ b/src/superio/winbond/w83697hf/chip.h
@@ -27,4 +27,4 @@ struct superio_winbond_w83697hf_config {
unsigned int hwmon_fan2_divisor;
};
-#endif
+#endif /* SUPERIO_WINBOND_W83697HF_CHIP_H */
diff --git a/src/superio/winbond/w83697hf/superio.c b/src/superio/winbond/w83697hf/superio.c
index 96f0c7c..a18b911 100644
--- a/src/superio/winbond/w83697hf/superio.c
+++ b/src/superio/winbond/w83697hf/superio.c
@@ -28,7 +28,7 @@
#include <pc80/mc146818rtc.h>
#include <stdlib.h>
#include <pc80/keyboard.h>
-#include "chip.h" /* FIXME */
+#include "chip.h"
#include "w83697hf.h"
static void hwmon_set_fan_divisor(unsigned int base, int num, unsigned int divisor) {
Edward O'Callaghan (eocallaghan(a)alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5621
-gerrit
commit b721e41df9791a145f488f5357c03cac866037f5
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Wed Apr 30 17:17:03 2014 +1000
superio/*: Deal with some chip.h special cases
While backing out the empty pc80 keyboard struct we encountered some
special cases where chip.h is used for other purposes. Deal with these
cases.
Change-Id: Ib11a46cfd14d050d5daa213623b9d8a401c06410
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
---
src/superio/ite/it8772f/chip.h | 5 +----
src/superio/nsc/pc97307/chip.h | 37 ---------------------------------
src/superio/nsc/pc97307/superio.c | 1 -
src/superio/nsc/pc97317/chip.h | 38 ----------------------------------
src/superio/nsc/pc97317/superio.c | 1 -
src/superio/winbond/w83697hf/chip.h | 2 +-
src/superio/winbond/w83697hf/superio.c | 2 +-
7 files changed, 3 insertions(+), 83 deletions(-)
diff --git a/src/superio/ite/it8772f/chip.h b/src/superio/ite/it8772f/chip.h
index 9c9aaa6..4a1b696 100644
--- a/src/superio/ite/it8772f/chip.h
+++ b/src/superio/ite/it8772f/chip.h
@@ -22,11 +22,8 @@
#define SUPERIO_ITE_IT8772F_CHIP_H
#include <device/device.h>
-#include <pc80/keyboard.h>
struct superio_ite_it8772f_config {
- struct pc_keyboard keyboard;
-
/* GPIO SimpleIO register values via devicetree.cb */
u8 gpio_set1;
u8 gpio_set2;
@@ -51,4 +48,4 @@ struct superio_ite_it8772f_config {
u8 fan3_enable;
};
-#endif
+#endif /* SUPERIO_ITE_IT8772F_CHIP_H */
diff --git a/src/superio/nsc/pc97307/chip.h b/src/superio/nsc/pc97307/chip.h
deleted file mode 100644
index e0c1330..0000000
--- a/src/superio/nsc/pc97307/chip.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2000 AG Electronics Ltd.
- *
- * 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; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef SUPERIO_NSC_PC97307_CHIP_H
-#define SUPERIO_NSC_PC97307_CHIP_H
-
-#ifndef PNP_INDEX_REG
-#define PNP_INDEX_REG 0x15C
-#endif
-#ifndef PNP_DATA_REG
-#define PNP_DATA_REG 0x15D
-#endif
-
-#include <pc80/keyboard.h>
-
-struct superio_nsc_pc97307_config {
-
- struct pc_keyboard keyboard;
-};
-#endif
diff --git a/src/superio/nsc/pc97307/superio.c b/src/superio/nsc/pc97307/superio.c
index af7ca77..6b15901 100644
--- a/src/superio/nsc/pc97307/superio.c
+++ b/src/superio/nsc/pc97307/superio.c
@@ -24,7 +24,6 @@
#include <device/pnp.h>
#include <stdlib.h>
#include <pc80/keyboard.h>
-#include "chip.h" /* FIXME */
#include "pc97307.h"
static void init(device_t dev)
diff --git a/src/superio/nsc/pc97317/chip.h b/src/superio/nsc/pc97317/chip.h
deleted file mode 100644
index d896916..0000000
--- a/src/superio/nsc/pc97317/chip.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2000 AG Electronics Ltd.
- *
- * 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; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef SUPERIO_NSC_PC97317_CHIP_H
-#define SUPERIO_NSC_PC97317_CHIP_H
-
-#ifndef PNP_INDEX_REG
-#define PNP_INDEX_REG 0x15C
-#endif
-#ifndef PNP_DATA_REG
-#define PNP_DATA_REG 0x15D
-#endif
-
-#include <pc80/keyboard.h>
-
-struct superio_nsc_pc97317_config {
-
- struct pc_keyboard keyboard;
-};
-
-#endif
diff --git a/src/superio/nsc/pc97317/superio.c b/src/superio/nsc/pc97317/superio.c
index 6f39c5d..09c3b5e 100644
--- a/src/superio/nsc/pc97317/superio.c
+++ b/src/superio/nsc/pc97317/superio.c
@@ -24,7 +24,6 @@
#include <device/pnp.h>
#include <stdlib.h>
#include <pc80/keyboard.h>
-#include "chip.h" /* FIXME */
#include "pc97317.h"
static void init(device_t dev)
diff --git a/src/superio/winbond/w83697hf/chip.h b/src/superio/winbond/w83697hf/chip.h
index df9ce4b..5ca9b20 100644
--- a/src/superio/winbond/w83697hf/chip.h
+++ b/src/superio/winbond/w83697hf/chip.h
@@ -27,4 +27,4 @@ struct superio_winbond_w83697hf_config {
unsigned int hwmon_fan2_divisor;
};
-#endif
+#endif /* SUPERIO_WINBOND_W83697HF_CHIP_H */
diff --git a/src/superio/winbond/w83697hf/superio.c b/src/superio/winbond/w83697hf/superio.c
index 96f0c7c..a18b911 100644
--- a/src/superio/winbond/w83697hf/superio.c
+++ b/src/superio/winbond/w83697hf/superio.c
@@ -28,7 +28,7 @@
#include <pc80/mc146818rtc.h>
#include <stdlib.h>
#include <pc80/keyboard.h>
-#include "chip.h" /* FIXME */
+#include "chip.h"
#include "w83697hf.h"
static void hwmon_set_fan_divisor(unsigned int base, int num, unsigned int divisor) {
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5620
-gerrit
commit 767e0dd523d252807142e967c76e12c11b101aef
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Wed Apr 30 01:37:58 2014 +0300
AMD: Drop redundant test for CONFIG_RAMTOP
Same test is already done in x86/mtrr.h.
Change-Id: Ib0785d047567374294b9ee7afc4f4244f9ced926
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/northbridge/amd/amdk8/raminit.c | 4 ----
src/northbridge/amd/amdk8/raminit_f.c | 4 ----
2 files changed, 8 deletions(-)
diff --git a/src/northbridge/amd/amdk8/raminit.c b/src/northbridge/amd/amdk8/raminit.c
index e4fe3df..25eb007 100644
--- a/src/northbridge/amd/amdk8/raminit.c
+++ b/src/northbridge/amd/amdk8/raminit.c
@@ -18,10 +18,6 @@
#include <arch/early_variables.h>
struct sys_info sysinfo_car CAR_GLOBAL;
-#if (CONFIG_RAMTOP & (CONFIG_RAMTOP -1)) != 0
-# error "CONFIG_RAMTOP must be a power of 2"
-#endif
-
void setup_resource_map(const unsigned int *register_values, int max)
{
int i;
diff --git a/src/northbridge/amd/amdk8/raminit_f.c b/src/northbridge/amd/amdk8/raminit_f.c
index 9c99250..36e0527 100644
--- a/src/northbridge/amd/amdk8/raminit_f.c
+++ b/src/northbridge/amd/amdk8/raminit_f.c
@@ -43,10 +43,6 @@
#include <arch/early_variables.h>
struct sys_info sysinfo_car CAR_GLOBAL;
-#if (CONFIG_RAMTOP & (CONFIG_RAMTOP -1)) != 0
-# error "CONFIG_RAMTOP must be a power of 2"
-#endif
-
#include "f_pci.c"
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4583
-gerrit
commit 28237b76dbf9596f82151dbc36d38e1b1593b9a0
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Sun Dec 29 12:07:54 2013 +0200
AMD (K8/fam10): Rewrite CAR migration in post_cache_as_ram
Old routine copied all of CAR region as-is right below CONFIG_RAMTOP.
Most of this region was reserved to interleave AP CPU address spaces
and unused on BSP CPU. The only part of CAR region requiring a copy
in RAM is the sysinfo structure.
Improved routine changes this as follows:
A region of size 'backup_size' below CONFIG_RAMTOP is cleared. In
case of S3 resume, OS context from this region is first copied to
high memory (CBMEM_ID_RESUME).
At stack switch, CAR stack is discarded. Top of the stack for BSP
is located at 'CONFIG_RAMTOP - car_size' for the remaining part
of the romstage. This region is part of 'backup_size' and was zeroed
before the switch took place.
Before CAR is torn down the region of CAR_GLOBALS (and CAR_CBMEM),
including the relevant sysinfo data for AP nodes memory training,
is copied at 'CONFIG_RAMTOP - car_size'.
Change-Id: Ie45b576aec6a2e006bfcb26b52fdb77c24f72e3b
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/cpu/amd/car/cache_as_ram.inc | 5 +-
src/cpu/amd/car/post_cache_as_ram.c | 176 ++++++++++++++++++------------------
src/include/cpu/amd/car.h | 4 +-
3 files changed, 92 insertions(+), 93 deletions(-)
diff --git a/src/cpu/amd/car/cache_as_ram.inc b/src/cpu/amd/car/cache_as_ram.inc
index dd02f6c..dadf8f7 100644
--- a/src/cpu/amd/car/cache_as_ram.inc
+++ b/src/cpu/amd/car/cache_as_ram.inc
@@ -424,10 +424,9 @@ CAR_FAM10_ap_out:
cache_as_ram_switch_stack:
/* Return address. */
popl %eax
- /* Resume memory. */
+ /* New stack. */
popl %eax
- subl $(( (CONFIG_DCACHE_RAM_BASE + CONFIG_DCACHE_RAM_SIZE)- (CONFIG_RAMTOP) )), %esp
- pushl %eax
+ movl %eax, %esp
call cache_as_ram_new_stack
all_mtrr_msrs:
diff --git a/src/cpu/amd/car/post_cache_as_ram.c b/src/cpu/amd/car/post_cache_as_ram.c
index 51caec5..2321f11 100644
--- a/src/cpu/amd/car/post_cache_as_ram.c
+++ b/src/cpu/amd/car/post_cache_as_ram.c
@@ -9,58 +9,78 @@
#include "cbmem.h"
#include "cpu/amd/car/disable_cache_as_ram.c"
-static inline void print_debug_pcar(const char *strval, uint32_t val)
-{
- printk(BIOS_DEBUG, "%s%08x\n", strval, val);
-}
+#if CONFIG_RAMTOP <= 0x100000
+ #error "You need to set CONFIG_RAMTOP greater than 1M"
+#endif
-/* from linux kernel 2.6.32 asm/string_32.h */
+#define PRINTK_IN_CAR 1
-static void inline __attribute__((always_inline)) memcopy(void *dest, const void *src, unsigned long bytes)
-{
- int d0, d1, d2;
- asm volatile("cld ; rep ; movsl\n\t"
- "movl %4,%%ecx\n\t"
- "andl $3,%%ecx\n\t"
- "jz 1f\n\t"
- "rep ; movsb\n\t"
- "1:"
- : "=&c" (d0), "=&D" (d1), "=&S" (d2)
- : "0" (bytes / 4), "g" (bytes), "1" ((long)dest), "2" ((long)src)
- : "memory", "cc");
-}
-
-#if CONFIG_HAVE_ACPI_RESUME
+#if PRINTK_IN_CAR
+#define print_car_debug(x) print_debug(x)
+#else
+#define print_car_debug(x)
+#endif
-static inline void *backup_resume(void) {
- void *resume_backup_memory;
- int suspend = acpi_is_wakeup_early();
+extern char _car_data_start[];
+extern char _car_data_end[];
- if (!suspend)
- return NULL;
+static size_t car_data_size(void)
+{
+ size_t car_size = &_car_data_end[0] - &_car_data_start[0];
+ return ALIGN(car_size, 64);
+}
- if (cbmem_recovery(1))
- return NULL;
+static size_t backup_size(void)
+{
+ size_t car_size = &_car_data_end[0] - &_car_data_start[0];
+ return ALIGN(car_size + 1024, 1024);
+}
- resume_backup_memory = cbmem_find(CBMEM_ID_RESUME);
+static void memcpy_(void *d, const void *s, size_t len)
+{
+#if PRINTK_IN_CAR
+ printk(BIOS_SPEW, " Copy [%08x-%08x] to [%08x - %08x] ... ",
+ (u32) s, (u32) (s + len - 1), (u32) d, (u32) (d + len - 1));
+#endif
+ memcpy(d, s, len);
+}
- /* copy 1MB - 64K to high tables ram_base to prevent memory corruption
- * through stage 2. We could keep stuff like stack and heap in high tables
- * memory completely, but that's a wonderful clean up task for another
- * day.
- */
+static void memset_(void *d, int val, size_t len)
+{
+#if PRINTK_IN_CAR
+ printk(BIOS_SPEW, " Fill [%08x-%08x] ... ", (u32) d, (u32) (d + len - 1));
+#endif
+ memset(d, val, len);
+}
+static void prepare_romstage_ramstack(void *resume_backup_memory)
+{
+ size_t backup_top = backup_size();
+ print_car_debug("Prepare CAR migration and stack regions...");
+#if CONFIG_HAVE_ACPI_RESUME
if (resume_backup_memory) {
- print_debug_pcar("Will copy coreboot region to: ", (uint32_t) resume_backup_memory);
- /* copy only backup only memory used for CAR */
- memcopy(resume_backup_memory+HIGH_MEMORY_SAVE-CONFIG_DCACHE_RAM_SIZE,
- (void *)((CONFIG_RAMTOP)-CONFIG_DCACHE_RAM_SIZE),
- CONFIG_DCACHE_RAM_SIZE); //inline
+ memcpy_(resume_backup_memory + HIGH_MEMORY_SAVE - backup_top,
+ (void *)(CONFIG_RAMTOP - backup_top), backup_top);
}
-
- return resume_backup_memory;
+#endif
+ memset_((void *)(CONFIG_RAMTOP - backup_top), 0, backup_top);
+ print_car_debug("Done\n");
}
+
+static void prepare_ramstage_region(void *resume_backup_memory)
+{
+ size_t backup_top = backup_size();
+ print_car_debug("Prepare ramstage memory region... ");
+#if CONFIG_HAVE_ACPI_RESUME
+ if (resume_backup_memory) {
+ memcpy_(resume_backup_memory, (void *) CONFIG_RAMBASE, HIGH_MEMORY_SAVE - backup_top);
+ memset_((void*) CONFIG_RAMBASE, 0, HIGH_MEMORY_SAVE - backup_top);
+ }
#endif
+ if (!resume_backup_memory)
+ memset_((void*)0, 0, CONFIG_RAMTOP - backup_top);
+ print_car_debug("Done\n");
+}
/* Disable Erratum 343 Workaround, see RevGuide for Fam10h, Pub#41322 Rev 3.33 */
@@ -79,48 +99,41 @@ static void vErrata343(void)
void post_cache_as_ram(void)
{
void *resume_backup_memory = NULL;
-#if 1
- {
- /* Check value of esp to verify if we have enough room for stack in Cache as RAM */
- unsigned v_esp;
- __asm__ volatile (
- "movl %%esp, %0\n\t"
- : "=a" (v_esp)
- );
- print_debug_pcar("v_esp=", v_esp);
- }
-#endif
-
- /* copy data from cache as ram to
- ram need to set CONFIG_RAMTOP to 2M and use var mtrr instead.
- */
-#if CONFIG_RAMTOP <= 0x100000
- #error "You need to set CONFIG_RAMTOP greater than 1M"
-#endif
#if CONFIG_HAVE_ACPI_RESUME
- resume_backup_memory = backup_resume();
+ int s3resume = acpi_is_wakeup_early();
+ if (s3resume) {
+ cbmem_recovery(s3resume);
+ resume_backup_memory = cbmem_find(CBMEM_ID_RESUME);
+ }
#endif
-
- print_debug("Copying data from cache to RAM -- switching to use RAM as stack... ");
+ prepare_romstage_ramstack(resume_backup_memory);
/* from here don't store more data in CAR */
vErrata343();
- memcopy((void *)((CONFIG_RAMTOP)-CONFIG_DCACHE_RAM_SIZE), (void *)CONFIG_DCACHE_RAM_BASE, CONFIG_DCACHE_RAM_SIZE); //inline
- cache_as_ram_switch_stack(resume_backup_memory);
-}
+ size_t car_size = car_data_size();
+ void *migrated_car = (void *)(CONFIG_RAMTOP - car_size);
-void
-cache_as_ram_new_stack (void *resume_backup_memory __attribute__ ((unused)))
-{
- /* We can put data to stack again */
+ print_car_debug("Copying data from cache to RAM... ");
+ memcpy_(migrated_car, &_car_data_start[0], car_size);
+ print_car_debug("Done\n");
- /* only global variable sysinfo in cache need to be offset */
- print_debug("Done\n");
+ /* New stack grows right below migrated_car. */
+ print_car_debug("Switching to use RAM as stack... ");
+ cache_as_ram_switch_stack(migrated_car);
- print_debug("Disabling cache as ram now \n");
+ /* We do not come back. */
+}
+void cache_as_ram_new_stack (void)
+{
+ void *resume_backup_memory = NULL;
+
+#if PRINTK_IN_CAR
+ printk(BIOS_DEBUG, "Top about %08x ... Done\n", (u32) &resume_backup_memory);
+#endif
+ print_car_debug("Disabling cache as ram now\n");
disable_cache_as_ram_bsp();
disable_cache();
@@ -128,24 +141,11 @@ cache_as_ram_new_stack (void *resume_backup_memory __attribute__ ((unused)))
enable_cache();
#if CONFIG_HAVE_ACPI_RESUME
- /* now copy the rest of the area, using the WB method because we already
- run normal RAM */
- if (resume_backup_memory) {
- memcopy(resume_backup_memory,
- (void *)(CONFIG_RAMBASE),
- (CONFIG_RAMTOP) - CONFIG_RAMBASE - CONFIG_DCACHE_RAM_SIZE);
+ if (acpi_is_wakeup_early()) {
+ resume_backup_memory = cbmem_find(CBMEM_ID_RESUME);
}
#endif
-
- print_debug("Clearing initial memory region: ");
-
-#if CONFIG_HAVE_ACPI_RESUME
- /* clear only coreboot used region of memory. Note: this may break ECC enabled boards */
- memset((void*) CONFIG_RAMBASE, 0, (CONFIG_RAMTOP) - CONFIG_RAMBASE - CONFIG_DCACHE_RAM_SIZE);
-#else
- memset((void*)0, 0, ((CONFIG_RAMTOP) - CONFIG_DCACHE_RAM_SIZE));
-#endif
- print_debug("Done\n");
+ prepare_ramstage_region(resume_backup_memory);
set_sysinfo_in_ram(1); // So other core0 could start to train mem
@@ -153,5 +153,5 @@ cache_as_ram_new_stack (void *resume_backup_memory __attribute__ ((unused)))
copy_and_run();
/* We will not return */
- print_debug("should not be here -\n");
+ print_car_debug("should not be here -\n");
}
diff --git a/src/include/cpu/amd/car.h b/src/include/cpu/amd/car.h
index a001c93..c00310a 100644
--- a/src/include/cpu/amd/car.h
+++ b/src/include/cpu/amd/car.h
@@ -5,8 +5,8 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx);
void done_cache_as_ram_main(void);
void post_cache_as_ram(void);
-void cache_as_ram_switch_stack(void *resume_backup_memory);
-void cache_as_ram_new_stack(void *resume_backup_memory);
+void cache_as_ram_switch_stack(void *stacktop);
+void cache_as_ram_new_stack(void);
#if CONFIG_CPU_AMD_AGESA
void disable_cache_as_ram(void);
the following patch was just integrated into master:
commit f385ba42e340863df18555bf3cfffe70a96e2d8c
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Tue Apr 29 23:27:32 2014 +0300
console: Move UART port defaults to mainboard
Correct selection of UART depends of board layout, not the CPU
internals, so default setting should originate from mainboard.
Change-Id: Ibf0ab0847ccce73c22704e86983dbe3d24ebc8a0
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: http://review.coreboot.org/5618
Tested-by: build bot (Jenkins)
Reviewed-by: David Hendricks <dhendrix(a)chromium.org>
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
See http://review.coreboot.org/5618 for details.
-gerrit