projects
/
coreboot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
printk_foo -> printk(BIOS_FOO, ...)
[coreboot.git]
/
src
/
southbridge
/
nvidia
/
ck804
/
ck804_sata.c
diff --git
a/src/southbridge/nvidia/ck804/ck804_sata.c
b/src/southbridge/nvidia/ck804/ck804_sata.c
index 9dabd662d170aa083e0006f6b5699c0a6ce5b367..8eed906ce847684fe5de7e8a9918ef6c03e17fca 100644
(file)
--- a/
src/southbridge/nvidia/ck804/ck804_sata.c
+++ b/
src/southbridge/nvidia/ck804/ck804_sata.c
@@
-11,6
+11,11
@@
#include <device/pci_ops.h>
#include "ck804.h"
#include <device/pci_ops.h>
#include "ck804.h"
+#ifndef CK804_SATA_RESET_FOR_ATAPI
+#define CK804_SATA_RESET_FOR_ATAPI 0
+#endif
+
+#if CK804_SATA_RESET_FOR_ATAPI
static void sata_com_reset(struct device *dev, unsigned reset)
// reset = 1 : reset
// reset = 0 : clear
static void sata_com_reset(struct device *dev, unsigned reset)
// reset = 1 : reset
// reset = 0 : clear
@@
-21,7
+26,7
@@
static void sata_com_reset(struct device *dev, unsigned reset)
base = (uint32_t *) pci_read_config32(dev, 0x24);
base = (uint32_t *) pci_read_config32(dev, 0x24);
- printk
_debug("base = %08x\r
\n", base);
+ printk
(BIOS_DEBUG, "base = %08lx
\n", base);
if (reset) {
*(base + 4) = 0xffffffff;
if (reset) {
*(base + 4) = 0xffffffff;
@@
-46,7
+51,7
@@
static void sata_com_reset(struct device *dev, unsigned reset)
return;
dword = *(base + 0);
return;
dword = *(base + 0);
- printk
_debug(
"*(base+0)=%08x\r\n", dword);
+ printk
(BIOS_DEBUG,
"*(base+0)=%08x\r\n", dword);
if (dword == 0x113) {
loop = 200000; // 2
do {
if (dword == 0x113) {
loop = 200000; // 2
do {
@@
-55,11
+60,11
@@
static void sata_com_reset(struct device *dev, unsigned reset)
break;
udelay(10);
} while (--loop > 0);
break;
udelay(10);
} while (--loop > 0);
- printk
_debug(
"loop=%d, *(base+4)=%08x\r\n", loop, dword);
+ printk
(BIOS_DEBUG,
"loop=%d, *(base+4)=%08x\r\n", loop, dword);
}
dword = *(base + 0x40);
}
dword = *(base + 0x40);
- printk
_debug(
"*(base+0x40)=%08x\r\n", dword);
+ printk
(BIOS_DEBUG,
"*(base+0x40)=%08x\r\n", dword);
if (dword == 0x113) {
loop = 200000; //2
do {
if (dword == 0x113) {
loop = 200000; //2
do {
@@
-68,9
+73,10
@@
static void sata_com_reset(struct device *dev, unsigned reset)
break;
udelay(10);
} while (--loop > 0);
break;
udelay(10);
} while (--loop > 0);
- printk
_debug(
"loop=%d, *(base+0x44)=%08x\r\n", loop, dword);
+ printk
(BIOS_DEBUG,
"loop=%d, *(base+0x44)=%08x\r\n", loop, dword);
}
}
}
}
+#endif
static void sata_init(struct device *dev)
{
static void sata_init(struct device *dev)
{
@@
-85,12
+91,12
@@
static void sata_init(struct device *dev)
if (conf->sata1_enable) {
/* Enable secondary SATA interface. */
dword |= (1 << 0);
if (conf->sata1_enable) {
/* Enable secondary SATA interface. */
dword |= (1 << 0);
- printk
_debug(
"SATA S \t");
+ printk
(BIOS_DEBUG,
"SATA S \t");
}
if (conf->sata0_enable) {
/* Enable primary SATA interface. */
dword |= (1 << 1);
}
if (conf->sata0_enable) {
/* Enable primary SATA interface. */
dword |= (1 << 1);
- printk
_debug(
"SATA P \n");
+ printk
(BIOS_DEBUG,
"SATA P \n");
}
#if 0
/* Write back */
}
#if 0
/* Write back */
@@
-132,7
+138,7
@@
static void sata_init(struct device *dev)
dword |= 2;
pci_write_config32(dev, 0xf8, dword);
dword |= 2;
pci_write_config32(dev, 0xf8, dword);
-#if
0
+#if
CK804_SATA_RESET_FOR_ATAPI
dword = pci_read_config32(dev, 0xac);
dword &= ~((1 << 13) | (1 << 14));
dword |= (1 << 13) | (0 << 14);
dword = pci_read_config32(dev, 0xac);
dword &= ~((1 << 13) | (1 << 14));
dword |= (1 << 13) | (0 << 14);